mirror of
				https://github.com/steveiliop56/tinyauth.git
				synced 2025-11-04 08:05:42 +00:00 
			
		
		
		
	Compare commits
	
		
			6 Commits
		
	
	
		
			ddc5596f13
			...
			feat/heade
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					1a83e1c811 | ||
| 
						 | 
					b15f91967b | ||
| 
						 | 
					6e88a89730 | ||
| 
						 | 
					78920cba64 | ||
| 
						 | 
					b6bc3d0020 | ||
| 
						 | 
					ca772ed24f | 
@@ -112,7 +112,6 @@ func init() {
 | 
				
			|||||||
		{"ldap-search-filter", "(uid=%s)", "LDAP search filter for user lookup."},
 | 
							{"ldap-search-filter", "(uid=%s)", "LDAP search filter for user lookup."},
 | 
				
			||||||
		{"resources-dir", "/data/resources", "Path to a directory containing custom resources (e.g. background image)."},
 | 
							{"resources-dir", "/data/resources", "Path to a directory containing custom resources (e.g. background image)."},
 | 
				
			||||||
		{"database-path", "/data/tinyauth.db", "Path to the Sqlite database file."},
 | 
							{"database-path", "/data/tinyauth.db", "Path to the Sqlite database file."},
 | 
				
			||||||
		{"trusted-proxies", "", "Comma separated list of trusted proxies (IP addresses) for correct client IP detection and for header ACLs."},
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for _, opt := range configOptions {
 | 
						for _, opt := range configOptions {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,44 +9,44 @@
 | 
				
			|||||||
        "@radix-ui/react-select": "^2.2.6",
 | 
					        "@radix-ui/react-select": "^2.2.6",
 | 
				
			||||||
        "@radix-ui/react-separator": "^1.1.7",
 | 
					        "@radix-ui/react-separator": "^1.1.7",
 | 
				
			||||||
        "@radix-ui/react-slot": "^1.2.3",
 | 
					        "@radix-ui/react-slot": "^1.2.3",
 | 
				
			||||||
        "@tailwindcss/vite": "^4.1.13",
 | 
					        "@tailwindcss/vite": "^4.1.12",
 | 
				
			||||||
        "@tanstack/react-query": "^5.87.1",
 | 
					        "@tanstack/react-query": "^5.85.5",
 | 
				
			||||||
        "axios": "^1.11.0",
 | 
					        "axios": "^1.11.0",
 | 
				
			||||||
        "class-variance-authority": "^0.7.1",
 | 
					        "class-variance-authority": "^0.7.1",
 | 
				
			||||||
        "clsx": "^2.1.1",
 | 
					        "clsx": "^2.1.1",
 | 
				
			||||||
        "i18next": "^25.5.2",
 | 
					        "i18next": "^25.4.2",
 | 
				
			||||||
        "i18next-browser-languagedetector": "^8.2.0",
 | 
					        "i18next-browser-languagedetector": "^8.2.0",
 | 
				
			||||||
        "i18next-resources-to-backend": "^1.2.1",
 | 
					        "i18next-resources-to-backend": "^1.2.1",
 | 
				
			||||||
        "input-otp": "^1.4.2",
 | 
					        "input-otp": "^1.4.2",
 | 
				
			||||||
        "lucide-react": "^0.543.0",
 | 
					        "lucide-react": "^0.541.0",
 | 
				
			||||||
        "next-themes": "^0.4.6",
 | 
					        "next-themes": "^0.4.6",
 | 
				
			||||||
        "react": "^19.1.1",
 | 
					        "react": "^19.1.1",
 | 
				
			||||||
        "react-dom": "^19.1.1",
 | 
					        "react-dom": "^19.1.1",
 | 
				
			||||||
        "react-hook-form": "^7.62.0",
 | 
					        "react-hook-form": "^7.62.0",
 | 
				
			||||||
        "react-i18next": "^15.7.3",
 | 
					        "react-i18next": "^15.7.2",
 | 
				
			||||||
        "react-markdown": "^10.1.0",
 | 
					        "react-markdown": "^10.1.0",
 | 
				
			||||||
        "react-router": "^7.8.2",
 | 
					        "react-router": "^7.8.2",
 | 
				
			||||||
        "sonner": "^2.0.7",
 | 
					        "sonner": "^2.0.7",
 | 
				
			||||||
        "tailwind-merge": "^3.3.1",
 | 
					        "tailwind-merge": "^3.3.1",
 | 
				
			||||||
        "tailwindcss": "^4.1.13",
 | 
					        "tailwindcss": "^4.1.12",
 | 
				
			||||||
        "zod": "^4.1.5",
 | 
					        "zod": "^4.1.3",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "devDependencies": {
 | 
					      "devDependencies": {
 | 
				
			||||||
        "@eslint/js": "^9.35.0",
 | 
					        "@eslint/js": "^9.34.0",
 | 
				
			||||||
        "@tanstack/eslint-plugin-query": "^5.86.0",
 | 
					        "@tanstack/eslint-plugin-query": "^5.83.1",
 | 
				
			||||||
        "@types/node": "^24.3.1",
 | 
					        "@types/node": "^24.3.0",
 | 
				
			||||||
        "@types/react": "^19.1.12",
 | 
					        "@types/react": "^19.1.11",
 | 
				
			||||||
        "@types/react-dom": "^19.1.9",
 | 
					        "@types/react-dom": "^19.1.8",
 | 
				
			||||||
        "@vitejs/plugin-react": "^5.0.2",
 | 
					        "@vitejs/plugin-react": "^5.0.1",
 | 
				
			||||||
        "eslint": "^9.35.0",
 | 
					        "eslint": "^9.34.0",
 | 
				
			||||||
        "eslint-plugin-react-hooks": "^5.2.0",
 | 
					        "eslint-plugin-react-hooks": "^5.2.0",
 | 
				
			||||||
        "eslint-plugin-react-refresh": "^0.4.19",
 | 
					        "eslint-plugin-react-refresh": "^0.4.19",
 | 
				
			||||||
        "globals": "^16.4.0",
 | 
					        "globals": "^16.3.0",
 | 
				
			||||||
        "prettier": "3.6.2",
 | 
					        "prettier": "3.6.2",
 | 
				
			||||||
        "tw-animate-css": "^1.3.8",
 | 
					        "tw-animate-css": "^1.3.7",
 | 
				
			||||||
        "typescript": "~5.9.2",
 | 
					        "typescript": "~5.9.2",
 | 
				
			||||||
        "typescript-eslint": "^8.43.0",
 | 
					        "typescript-eslint": "^8.41.0",
 | 
				
			||||||
        "vite": "^7.1.5",
 | 
					        "vite": "^7.1.3",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -143,7 +143,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.4", "", { "os": "win32", "cpu": "x64" }, "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ=="],
 | 
					    "@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.4", "", { "os": "win32", "cpu": "x64" }, "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.9.0", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g=="],
 | 
					    "@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.7.0", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@eslint-community/regexpp": ["@eslint-community/regexpp@4.12.1", "", {}, "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ=="],
 | 
					    "@eslint-community/regexpp": ["@eslint-community/regexpp@4.12.1", "", {}, "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -155,7 +155,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "@eslint/eslintrc": ["@eslint/eslintrc@3.3.1", "", { "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^10.0.1", "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" } }, "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ=="],
 | 
					    "@eslint/eslintrc": ["@eslint/eslintrc@3.3.1", "", { "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^10.0.1", "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" } }, "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@eslint/js": ["@eslint/js@9.35.0", "", {}, "sha512-30iXE9whjlILfWobBkNerJo+TXYsgVM5ERQwMcMKCHckHflCmf7wXDAHlARoWnh0s1U72WqlbeyE7iAcCzuCPw=="],
 | 
					    "@eslint/js": ["@eslint/js@9.34.0", "", {}, "sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@eslint/object-schema": ["@eslint/object-schema@2.1.6", "", {}, "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA=="],
 | 
					    "@eslint/object-schema": ["@eslint/object-schema@2.1.6", "", {}, "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -189,7 +189,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="],
 | 
					    "@jridgewell/set-array": ["@jridgewell/set-array@1.2.1", "", {}, "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.5", "", {}, "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og=="],
 | 
					    "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="],
 | 
					    "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.25", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -255,7 +255,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "@radix-ui/rect": ["@radix-ui/rect@1.1.1", "", {}, "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw=="],
 | 
					    "@radix-ui/rect": ["@radix-ui/rect@1.1.1", "", {}, "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-beta.34", "", {}, "sha512-LyAREkZHP5pMom7c24meKmJCdhf2hEyvam2q0unr3or9ydwDL+DJ8chTF6Av/RFPb3rH8UFBdMzO5MxTZW97oA=="],
 | 
					    "@rolldown/pluginutils": ["@rolldown/pluginutils@1.0.0-beta.32", "", {}, "sha512-QReCdvxiUZAPkvp1xpAg62IeNzykOFA6syH2CnClif4YmALN1XKpB39XneL80008UbtMShthSVDKmrx05N1q/g=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.46.2", "", { "os": "android", "cpu": "arm" }, "sha512-Zj3Hl6sN34xJtMv7Anwb5Gu01yujyE/cLBDB2gnHTAHaWS1Z38L7kuSG+oAh0giZMqG060f/YBStXtMH6FvPMA=="],
 | 
					    "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.46.2", "", { "os": "android", "cpu": "arm" }, "sha512-Zj3Hl6sN34xJtMv7Anwb5Gu01yujyE/cLBDB2gnHTAHaWS1Z38L7kuSG+oAh0giZMqG060f/YBStXtMH6FvPMA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -299,41 +299,41 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "@standard-schema/utils": ["@standard-schema/utils@0.3.0", "", {}, "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g=="],
 | 
					    "@standard-schema/utils": ["@standard-schema/utils@0.3.0", "", {}, "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/node": ["@tailwindcss/node@4.1.13", "", { "dependencies": { "@jridgewell/remapping": "^2.3.4", "enhanced-resolve": "^5.18.3", "jiti": "^2.5.1", "lightningcss": "1.30.1", "magic-string": "^0.30.18", "source-map-js": "^1.2.1", "tailwindcss": "4.1.13" } }, "sha512-eq3ouolC1oEFOAvOMOBAmfCIqZBJuvWvvYWh5h5iOYfe1HFC6+GZ6EIL0JdM3/niGRJmnrOc+8gl9/HGUaaptw=="],
 | 
					    "@tailwindcss/node": ["@tailwindcss/node@4.1.12", "", { "dependencies": { "@jridgewell/remapping": "^2.3.4", "enhanced-resolve": "^5.18.3", "jiti": "^2.5.1", "lightningcss": "1.30.1", "magic-string": "^0.30.17", "source-map-js": "^1.2.1", "tailwindcss": "4.1.12" } }, "sha512-3hm9brwvQkZFe++SBt+oLjo4OLDtkvlE8q2WalaD/7QWaeM7KEJbAiY/LJZUaCs7Xa8aUu4xy3uoyX4q54UVdQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide": ["@tailwindcss/oxide@4.1.13", "", { "dependencies": { "detect-libc": "^2.0.4", "tar": "^7.4.3" }, "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.1.13", "@tailwindcss/oxide-darwin-arm64": "4.1.13", "@tailwindcss/oxide-darwin-x64": "4.1.13", "@tailwindcss/oxide-freebsd-x64": "4.1.13", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.13", "@tailwindcss/oxide-linux-arm64-gnu": "4.1.13", "@tailwindcss/oxide-linux-arm64-musl": "4.1.13", "@tailwindcss/oxide-linux-x64-gnu": "4.1.13", "@tailwindcss/oxide-linux-x64-musl": "4.1.13", "@tailwindcss/oxide-wasm32-wasi": "4.1.13", "@tailwindcss/oxide-win32-arm64-msvc": "4.1.13", "@tailwindcss/oxide-win32-x64-msvc": "4.1.13" } }, "sha512-CPgsM1IpGRa880sMbYmG1s4xhAy3xEt1QULgTJGQmZUeNgXFR7s1YxYygmJyBGtou4SyEosGAGEeYqY7R53bIA=="],
 | 
					    "@tailwindcss/oxide": ["@tailwindcss/oxide@4.1.12", "", { "dependencies": { "detect-libc": "^2.0.4", "tar": "^7.4.3" }, "optionalDependencies": { "@tailwindcss/oxide-android-arm64": "4.1.12", "@tailwindcss/oxide-darwin-arm64": "4.1.12", "@tailwindcss/oxide-darwin-x64": "4.1.12", "@tailwindcss/oxide-freebsd-x64": "4.1.12", "@tailwindcss/oxide-linux-arm-gnueabihf": "4.1.12", "@tailwindcss/oxide-linux-arm64-gnu": "4.1.12", "@tailwindcss/oxide-linux-arm64-musl": "4.1.12", "@tailwindcss/oxide-linux-x64-gnu": "4.1.12", "@tailwindcss/oxide-linux-x64-musl": "4.1.12", "@tailwindcss/oxide-wasm32-wasi": "4.1.12", "@tailwindcss/oxide-win32-arm64-msvc": "4.1.12", "@tailwindcss/oxide-win32-x64-msvc": "4.1.12" } }, "sha512-gM5EoKHW/ukmlEtphNwaGx45fGoEmP10v51t9unv55voWh6WrOL19hfuIdo2FjxIaZzw776/BUQg7Pck++cIVw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-android-arm64": ["@tailwindcss/oxide-android-arm64@4.1.13", "", { "os": "android", "cpu": "arm64" }, "sha512-BrpTrVYyejbgGo57yc8ieE+D6VT9GOgnNdmh5Sac6+t0m+v+sKQevpFVpwX3pBrM2qKrQwJ0c5eDbtjouY/+ew=="],
 | 
					    "@tailwindcss/oxide-android-arm64": ["@tailwindcss/oxide-android-arm64@4.1.12", "", { "os": "android", "cpu": "arm64" }, "sha512-oNY5pq+1gc4T6QVTsZKwZaGpBb2N1H1fsc1GD4o7yinFySqIuRZ2E4NvGasWc6PhYJwGK2+5YT1f9Tp80zUQZQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/oxide-darwin-arm64@4.1.13", "", { "os": "darwin", "cpu": "arm64" }, "sha512-YP+Jksc4U0KHcu76UhRDHq9bx4qtBftp9ShK/7UGfq0wpaP96YVnnjFnj3ZFrUAjc5iECzODl/Ts0AN7ZPOANQ=="],
 | 
					    "@tailwindcss/oxide-darwin-arm64": ["@tailwindcss/oxide-darwin-arm64@4.1.12", "", { "os": "darwin", "cpu": "arm64" }, "sha512-cq1qmq2HEtDV9HvZlTtrj671mCdGB93bVY6J29mwCyaMYCP/JaUBXxrQQQm7Qn33AXXASPUb2HFZlWiiHWFytw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/oxide-darwin-x64@4.1.13", "", { "os": "darwin", "cpu": "x64" }, "sha512-aAJ3bbwrn/PQHDxCto9sxwQfT30PzyYJFG0u/BWZGeVXi5Hx6uuUOQEI2Fa43qvmUjTRQNZnGqe9t0Zntexeuw=="],
 | 
					    "@tailwindcss/oxide-darwin-x64": ["@tailwindcss/oxide-darwin-x64@4.1.12", "", { "os": "darwin", "cpu": "x64" }, "sha512-6UCsIeFUcBfpangqlXay9Ffty9XhFH1QuUFn0WV83W8lGdX8cD5/+2ONLluALJD5+yJ7k8mVtwy3zMZmzEfbLg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/oxide-freebsd-x64@4.1.13", "", { "os": "freebsd", "cpu": "x64" }, "sha512-Wt8KvASHwSXhKE/dJLCCWcTSVmBj3xhVhp/aF3RpAhGeZ3sVo7+NTfgiN8Vey/Fi8prRClDs6/f0KXPDTZE6nQ=="],
 | 
					    "@tailwindcss/oxide-freebsd-x64": ["@tailwindcss/oxide-freebsd-x64@4.1.12", "", { "os": "freebsd", "cpu": "x64" }, "sha512-JOH/f7j6+nYXIrHobRYCtoArJdMJh5zy5lr0FV0Qu47MID/vqJAY3r/OElPzx1C/wdT1uS7cPq+xdYYelny1ww=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/oxide-linux-arm-gnueabihf@4.1.13", "", { "os": "linux", "cpu": "arm" }, "sha512-mbVbcAsW3Gkm2MGwA93eLtWrwajz91aXZCNSkGTx/R5eb6KpKD5q8Ueckkh9YNboU8RH7jiv+ol/I7ZyQ9H7Bw=="],
 | 
					    "@tailwindcss/oxide-linux-arm-gnueabihf": ["@tailwindcss/oxide-linux-arm-gnueabihf@4.1.12", "", { "os": "linux", "cpu": "arm" }, "sha512-v4Ghvi9AU1SYgGr3/j38PD8PEe6bRfTnNSUE3YCMIRrrNigCFtHZ2TCm8142X8fcSqHBZBceDx+JlFJEfNg5zQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/oxide-linux-arm64-gnu@4.1.13", "", { "os": "linux", "cpu": "arm64" }, "sha512-wdtfkmpXiwej/yoAkrCP2DNzRXCALq9NVLgLELgLim1QpSfhQM5+ZxQQF8fkOiEpuNoKLp4nKZ6RC4kmeFH0HQ=="],
 | 
					    "@tailwindcss/oxide-linux-arm64-gnu": ["@tailwindcss/oxide-linux-arm64-gnu@4.1.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-YP5s1LmetL9UsvVAKusHSyPlzSRqYyRB0f+Kl/xcYQSPLEw/BvGfxzbH+ihUciePDjiXwHh+p+qbSP3SlJw+6g=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/oxide-linux-arm64-musl@4.1.13", "", { "os": "linux", "cpu": "arm64" }, "sha512-hZQrmtLdhyqzXHB7mkXfq0IYbxegaqTmfa1p9MBj72WPoDD3oNOh1Lnxf6xZLY9C3OV6qiCYkO1i/LrzEdW2mg=="],
 | 
					    "@tailwindcss/oxide-linux-arm64-musl": ["@tailwindcss/oxide-linux-arm64-musl@4.1.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-V8pAM3s8gsrXcCv6kCHSuwyb/gPsd863iT+v1PGXC4fSL/OJqsKhfK//v8P+w9ThKIoqNbEnsZqNy+WDnwQqCA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/oxide-linux-x64-gnu@4.1.13", "", { "os": "linux", "cpu": "x64" }, "sha512-uaZTYWxSXyMWDJZNY1Ul7XkJTCBRFZ5Fo6wtjrgBKzZLoJNrG+WderJwAjPzuNZOnmdrVg260DKwXCFtJ/hWRQ=="],
 | 
					    "@tailwindcss/oxide-linux-x64-gnu": ["@tailwindcss/oxide-linux-x64-gnu@4.1.12", "", { "os": "linux", "cpu": "x64" }, "sha512-xYfqYLjvm2UQ3TZggTGrwxjYaLB62b1Wiysw/YE3Yqbh86sOMoTn0feF98PonP7LtjsWOWcXEbGqDL7zv0uW8Q=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/oxide-linux-x64-musl@4.1.13", "", { "os": "linux", "cpu": "x64" }, "sha512-oXiPj5mi4Hdn50v5RdnuuIms0PVPI/EG4fxAfFiIKQh5TgQgX7oSuDWntHW7WNIi/yVLAiS+CRGW4RkoGSSgVQ=="],
 | 
					    "@tailwindcss/oxide-linux-x64-musl": ["@tailwindcss/oxide-linux-x64-musl@4.1.12", "", { "os": "linux", "cpu": "x64" }, "sha512-ha0pHPamN+fWZY7GCzz5rKunlv9L5R8kdh+YNvP5awe3LtuXb5nRi/H27GeL2U+TdhDOptU7T6Is7mdwh5Ar3A=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-wasm32-wasi": ["@tailwindcss/oxide-wasm32-wasi@4.1.13", "", { "dependencies": { "@emnapi/core": "^1.4.5", "@emnapi/runtime": "^1.4.5", "@emnapi/wasi-threads": "^1.0.4", "@napi-rs/wasm-runtime": "^0.2.12", "@tybys/wasm-util": "^0.10.0", "tslib": "^2.8.0" }, "cpu": "none" }, "sha512-+LC2nNtPovtrDwBc/nqnIKYh/W2+R69FA0hgoeOn64BdCX522u19ryLh3Vf3F8W49XBcMIxSe665kwy21FkhvA=="],
 | 
					    "@tailwindcss/oxide-wasm32-wasi": ["@tailwindcss/oxide-wasm32-wasi@4.1.12", "", { "dependencies": { "@emnapi/core": "^1.4.5", "@emnapi/runtime": "^1.4.5", "@emnapi/wasi-threads": "^1.0.4", "@napi-rs/wasm-runtime": "^0.2.12", "@tybys/wasm-util": "^0.10.0", "tslib": "^2.8.0" }, "cpu": "none" }, "sha512-4tSyu3dW+ktzdEpuk6g49KdEangu3eCYoqPhWNsZgUhyegEda3M9rG0/j1GV/JjVVsj+lG7jWAyrTlLzd/WEBg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/oxide-win32-arm64-msvc@4.1.13", "", { "os": "win32", "cpu": "arm64" }, "sha512-dziTNeQXtoQ2KBXmrjCxsuPk3F3CQ/yb7ZNZNA+UkNTeiTGgfeh+gH5Pi7mRncVgcPD2xgHvkFCh/MhZWSgyQg=="],
 | 
					    "@tailwindcss/oxide-win32-arm64-msvc": ["@tailwindcss/oxide-win32-arm64-msvc@4.1.12", "", { "os": "win32", "cpu": "arm64" }, "sha512-iGLyD/cVP724+FGtMWslhcFyg4xyYyM+5F4hGvKA7eifPkXHRAUDFaimu53fpNg9X8dfP75pXx/zFt/jlNF+lg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.1.13", "", { "os": "win32", "cpu": "x64" }, "sha512-3+LKesjXydTkHk5zXX01b5KMzLV1xl2mcktBJkje7rhFUpUlYJy7IMOLqjIRQncLTa1WZZiFY/foAeB5nmaiTw=="],
 | 
					    "@tailwindcss/oxide-win32-x64-msvc": ["@tailwindcss/oxide-win32-x64-msvc@4.1.12", "", { "os": "win32", "cpu": "x64" }, "sha512-NKIh5rzw6CpEodv/++r0hGLlfgT/gFN+5WNdZtvh6wpU2BpGNgdjvj6H2oFc8nCM839QM1YOhjpgbAONUb4IxA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/vite": ["@tailwindcss/vite@4.1.13", "", { "dependencies": { "@tailwindcss/node": "4.1.13", "@tailwindcss/oxide": "4.1.13", "tailwindcss": "4.1.13" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7" } }, "sha512-0PmqLQ010N58SbMTJ7BVJ4I2xopiQn/5i6nlb4JmxzQf8zcS5+m2Cv6tqh+sfDwtIdjoEnOvwsGQ1hkUi8QEHQ=="],
 | 
					    "@tailwindcss/vite": ["@tailwindcss/vite@4.1.12", "", { "dependencies": { "@tailwindcss/node": "4.1.12", "@tailwindcss/oxide": "4.1.12", "tailwindcss": "4.1.12" }, "peerDependencies": { "vite": "^5.2.0 || ^6 || ^7" } }, "sha512-4pt0AMFDx7gzIrAOIYgYP0KCBuKWqyW8ayrdiLEjoJTT4pKTjrzG/e4uzWtTLDziC+66R9wbUqZBccJalSE5vQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tanstack/eslint-plugin-query": ["@tanstack/eslint-plugin-query@5.86.0", "", { "dependencies": { "@typescript-eslint/utils": "^8.37.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0" } }, "sha512-tmXdnx/fF3yY5G5jpzrJQbASY3PNzsKF0gq9IsZVqz3LJ4sExgdUFGQ305nao0wTMBOclyrSC13v/VQ3yOXu/Q=="],
 | 
					    "@tanstack/eslint-plugin-query": ["@tanstack/eslint-plugin-query@5.83.1", "", { "dependencies": { "@typescript-eslint/utils": "^8.37.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0" } }, "sha512-tdkpPFfzkTksN9BIlT/qjixSAtKrsW6PUVRwdKWaOcag7DrD1vpki3UzzdfMQGDRGeg1Ue1Dg+rcl5FJGembNg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tanstack/query-core": ["@tanstack/query-core@5.87.1", "", {}, "sha512-HOFHVvhOCprrWvtccSzc7+RNqpnLlZ5R6lTmngb8aq7b4rc2/jDT0w+vLdQ4lD9bNtQ+/A4GsFXy030Gk4ollA=="],
 | 
					    "@tanstack/query-core": ["@tanstack/query-core@5.85.5", "", {}, "sha512-KO0WTob4JEApv69iYp1eGvfMSUkgw//IpMnq+//cORBzXf0smyRwPLrUvEe5qtAEGjwZTXrjxg+oJNP/C00t6w=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tanstack/react-query": ["@tanstack/react-query@5.87.1", "", { "dependencies": { "@tanstack/query-core": "5.87.1" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-YKauf8jfMowgAqcxj96AHs+Ux3m3bWT1oSVKamaRPXSnW2HqSznnTCEkAVqctF1e/W9R/mPcyzzINIgpOH94qg=="],
 | 
					    "@tanstack/react-query": ["@tanstack/react-query@5.85.5", "", { "dependencies": { "@tanstack/query-core": "5.85.5" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-/X4EFNcnPiSs8wM2v+b6DqS5mmGeuJQvxBglmDxl6ZQb5V26ouD2SJYAcC3VjbNwqhY2zjxVD15rDA5nGbMn3A=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="],
 | 
					    "@types/babel__core": ["@types/babel__core@7.20.5", "", { "dependencies": { "@babel/parser": "^7.20.7", "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -357,37 +357,37 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
 | 
					    "@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@types/node": ["@types/node@24.3.1", "", { "dependencies": { "undici-types": "~7.10.0" } }, "sha512-3vXmQDXy+woz+gnrTvuvNrPzekOi+Ds0ReMxw0LzBiK3a+1k0kQn9f2NWk+lgD4rJehFUmYy2gMhJ2ZI+7YP9g=="],
 | 
					    "@types/node": ["@types/node@24.3.0", "", { "dependencies": { "undici-types": "~7.10.0" } }, "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@types/react": ["@types/react@19.1.12", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-cMoR+FoAf/Jyq6+Df2/Z41jISvGZZ2eTlnsaJRptmZ76Caldwy1odD4xTr/gNV9VLj0AWgg/nmkevIyUfIIq5w=="],
 | 
					    "@types/react": ["@types/react@19.1.11", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-lr3jdBw/BGj49Eps7EvqlUaoeA0xpj3pc0RoJkHpYaCHkVK7i28dKyImLQb3JVlqs3aYSXf7qYuWOW/fgZnTXQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@types/react-dom": ["@types/react-dom@19.1.9", "", { "peerDependencies": { "@types/react": "^19.0.0" } }, "sha512-qXRuZaOsAdXKFyOhRBg6Lqqc0yay13vN7KrIg4L7N4aaHN68ma9OK3NE1BoDFgFOTfM7zg+3/8+2n8rLUH3OKQ=="],
 | 
					    "@types/react-dom": ["@types/react-dom@19.1.8", "", { "peerDependencies": { "@types/react": "^19.0.0" } }, "sha512-xG7xaBMJCpcK0RpN8jDbAACQo54ycO6h4dSSmgv8+fu6ZIAdANkx/WsawASUjVXYfy+J9AbUpRMNNEsXCDfDBQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
 | 
					    "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.43.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.43.0", "@typescript-eslint/type-utils": "8.43.0", "@typescript-eslint/utils": "8.43.0", "@typescript-eslint/visitor-keys": "8.43.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.43.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-8tg+gt7ENL7KewsKMKDHXR1vm8tt9eMxjJBYINf6swonlWgkYn5NwyIgXpbbDxTNU5DgpDFfj95prcTq2clIQQ=="],
 | 
					    "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.41.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.10.0", "@typescript-eslint/scope-manager": "8.41.0", "@typescript-eslint/type-utils": "8.41.0", "@typescript-eslint/utils": "8.41.0", "@typescript-eslint/visitor-keys": "8.41.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.41.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-8fz6oa6wEKZrhXWro/S3n2eRJqlRcIa6SlDh59FXJ5Wp5XRZ8B9ixpJDcjadHq47hMx0u+HW6SNa6LjJQ6NLtw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/parser": ["@typescript-eslint/parser@8.43.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.43.0", "@typescript-eslint/types": "8.43.0", "@typescript-eslint/typescript-estree": "8.43.0", "@typescript-eslint/visitor-keys": "8.43.0", "debug": "^4.3.4" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-B7RIQiTsCBBmY+yW4+ILd6mF5h1FUwJsVvpqkrgpszYifetQ2Ke+Z4u6aZh0CblkUGIdR59iYVyXqqZGkZ3aBw=="],
 | 
					    "@typescript-eslint/parser": ["@typescript-eslint/parser@8.41.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.41.0", "@typescript-eslint/types": "8.41.0", "@typescript-eslint/typescript-estree": "8.41.0", "@typescript-eslint/visitor-keys": "8.41.0", "debug": "^4.3.4" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.43.0", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.43.0", "@typescript-eslint/types": "^8.43.0", "debug": "^4.3.4" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-htB/+D/BIGoNTQYffZw4uM4NzzuolCoaA/BusuSIcC8YjmBYQioew5VUZAYdAETPjeed0hqCaW7EHg+Robq8uw=="],
 | 
					    "@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.41.0", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.41.0", "@typescript-eslint/types": "^8.41.0", "debug": "^4.3.4" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.41.0", "", { "dependencies": { "@typescript-eslint/types": "8.41.0", "@typescript-eslint/visitor-keys": "8.41.0" } }, "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ=="],
 | 
					    "@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.38.0", "", { "dependencies": { "@typescript-eslint/types": "8.38.0", "@typescript-eslint/visitor-keys": "8.38.0" } }, "sha512-WJw3AVlFFcdT9Ri1xs/lg8LwDqgekWXWhH3iAF+1ZM+QPd7oxQ6jvtW/JPwzAScxitILUIFs0/AnQ/UWHzbATQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.43.0", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-ALC2prjZcj2YqqL5X/bwWQmHA2em6/94GcbB/KKu5SX3EBDOsqztmmX1kMkvAJHzxk7TazKzJfFiEIagNV3qEA=="],
 | 
					    "@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.41.0", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-TDhxYFPUYRFxFhuU5hTIJk+auzM/wKvWgoNYOPcOf6i4ReYlOoYN8q1dV5kOTjNQNJgzWN3TUUQMtlLOcUgdUw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.43.0", "", { "dependencies": { "@typescript-eslint/types": "8.43.0", "@typescript-eslint/typescript-estree": "8.43.0", "@typescript-eslint/utils": "8.43.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-qaH1uLBpBuBBuRf8c1mLJ6swOfzCXryhKND04Igr4pckzSEW9JX5Aw9AgW00kwfjWJF0kk0ps9ExKTfvXfw4Qg=="],
 | 
					    "@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.41.0", "", { "dependencies": { "@typescript-eslint/types": "8.41.0", "@typescript-eslint/typescript-estree": "8.41.0", "@typescript-eslint/utils": "8.41.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-63qt1h91vg3KsjVVonFJWjgSK7pZHSQFKH6uwqxAH9bBrsyRhO6ONoKyXxyVBzG1lJnFAJcKAcxLS54N1ee1OQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/types": ["@typescript-eslint/types@8.41.0", "", {}, "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag=="],
 | 
					    "@typescript-eslint/types": ["@typescript-eslint/types@8.38.0", "", {}, "sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.43.0", "", { "dependencies": { "@typescript-eslint/project-service": "8.43.0", "@typescript-eslint/tsconfig-utils": "8.43.0", "@typescript-eslint/types": "8.43.0", "@typescript-eslint/visitor-keys": "8.43.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-7Vv6zlAhPb+cvEpP06WXXy/ZByph9iL6BQRBDj4kmBsW98AqEeQHlj/13X+sZOrKSo9/rNKH4Ul4f6EICREFdw=="],
 | 
					    "@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.41.0", "", { "dependencies": { "@typescript-eslint/project-service": "8.41.0", "@typescript-eslint/tsconfig-utils": "8.41.0", "@typescript-eslint/types": "8.41.0", "@typescript-eslint/visitor-keys": "8.41.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/utils": ["@typescript-eslint/utils@8.41.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", "@typescript-eslint/scope-manager": "8.41.0", "@typescript-eslint/types": "8.41.0", "@typescript-eslint/typescript-estree": "8.41.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A=="],
 | 
					    "@typescript-eslint/utils": ["@typescript-eslint/utils@8.38.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", "@typescript-eslint/scope-manager": "8.38.0", "@typescript-eslint/types": "8.38.0", "@typescript-eslint/typescript-estree": "8.38.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } }, "sha512-hHcMA86Hgt+ijJlrD8fX0j1j8w4C92zue/8LOPAFioIno+W0+L7KqE8QZKCcPGc/92Vs9x36w/4MPTJhqXdyvg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.43.0", "", { "dependencies": { "@typescript-eslint/types": "8.43.0", "eslint-visitor-keys": "^4.2.1" } }, "sha512-T+S1KqRD4sg/bHfLwrpF/K3gQLBM1n7Rp7OjjikjTEssI2YJzQpi5WXoynOaQ93ERIuq3O8RBTOUYDKszUCEHw=="],
 | 
					    "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.41.0", "", { "dependencies": { "@typescript-eslint/types": "8.41.0", "eslint-visitor-keys": "^4.2.1" } }, "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@ungap/structured-clone": ["@ungap/structured-clone@1.3.0", "", {}, "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g=="],
 | 
					    "@ungap/structured-clone": ["@ungap/structured-clone@1.3.0", "", {}, "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@vitejs/plugin-react": ["@vitejs/plugin-react@5.0.2", "", { "dependencies": { "@babel/core": "^7.28.3", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-beta.34", "@types/babel__core": "^7.20.5", "react-refresh": "^0.17.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, "sha512-tmyFgixPZCx2+e6VO9TNITWcCQl8+Nl/E8YbAyPVv85QCc7/A3JrdfG2A8gIzvVhWuzMOVrFW1aReaNxrI6tbw=="],
 | 
					    "@vitejs/plugin-react": ["@vitejs/plugin-react@5.0.1", "", { "dependencies": { "@babel/core": "^7.28.3", "@babel/plugin-transform-react-jsx-self": "^7.27.1", "@babel/plugin-transform-react-jsx-source": "^7.27.1", "@rolldown/pluginutils": "1.0.0-beta.32", "@types/babel__core": "^7.20.5", "react-refresh": "^0.17.0" }, "peerDependencies": { "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" } }, "sha512-DE4UNaBXwtVoDJ0ccBdLVjFTWL70NRuWNCxEieTI3lrq9ORB9aOCQEKstwDXBl87NvFdbqh/p7eINGyj0BthJA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="],
 | 
					    "acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -493,7 +493,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
 | 
					    "escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "eslint": ["eslint@9.35.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.0", "@eslint/config-helpers": "^0.3.1", "@eslint/core": "^0.15.2", "@eslint/eslintrc": "^3.3.1", "@eslint/js": "9.35.0", "@eslint/plugin-kit": "^0.3.5", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.4.0", "eslint-visitor-keys": "^4.2.1", "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-QePbBFMJFjgmlE+cXAlbHZbHpdFVS2E/6vzCy7aKlebddvl1vadiC4JFV5u/wqTkNUwEV8WrQi257jf5f06hrg=="],
 | 
					    "eslint": ["eslint@9.34.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.0", "@eslint/config-helpers": "^0.3.1", "@eslint/core": "^0.15.2", "@eslint/eslintrc": "^3.3.1", "@eslint/js": "9.34.0", "@eslint/plugin-kit": "^0.3.5", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.4.0", "eslint-visitor-keys": "^4.2.1", "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "eslint-plugin-react-hooks": ["eslint-plugin-react-hooks@5.2.0", "", { "peerDependencies": { "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" } }, "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg=="],
 | 
					    "eslint-plugin-react-hooks": ["eslint-plugin-react-hooks@5.2.0", "", { "peerDependencies": { "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0" } }, "sha512-+f15FfK64YQwZdJNELETdn5ibXEUQmW1DZL6KXhNnc2heoy/sg9VJJeT7n8TlMWouzWqSWavFkIhHyIbIAEapg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -557,7 +557,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "glob-parent": ["glob-parent@6.0.2", "", { "dependencies": { "is-glob": "^4.0.3" } }, "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A=="],
 | 
					    "glob-parent": ["glob-parent@6.0.2", "", { "dependencies": { "is-glob": "^4.0.3" } }, "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "globals": ["globals@16.4.0", "", {}, "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw=="],
 | 
					    "globals": ["globals@16.3.0", "", {}, "sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="],
 | 
					    "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -581,7 +581,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "html-url-attributes": ["html-url-attributes@3.0.1", "", {}, "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ=="],
 | 
					    "html-url-attributes": ["html-url-attributes@3.0.1", "", {}, "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "i18next": ["i18next@25.5.2", "", { "dependencies": { "@babel/runtime": "^7.27.6" }, "peerDependencies": { "typescript": "^5" }, "optionalPeers": ["typescript"] }, "sha512-lW8Zeh37i/o0zVr+NoCHfNnfvVw+M6FQbRp36ZZ/NyHDJ3NJVpp2HhAUyU9WafL5AssymNoOjMRB48mmx2P6Hw=="],
 | 
					    "i18next": ["i18next@25.4.2", "", { "dependencies": { "@babel/runtime": "^7.27.6" }, "peerDependencies": { "typescript": "^5" }, "optionalPeers": ["typescript"] }, "sha512-gD4T25a6ovNXsfXY1TwHXXXLnD/K2t99jyYMCSimSCBnBRJVQr5j+VAaU83RJCPzrTGhVQ6dqIga66xO2rtd5g=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "i18next-browser-languagedetector": ["i18next-browser-languagedetector@8.2.0", "", { "dependencies": { "@babel/runtime": "^7.23.2" } }, "sha512-P+3zEKLnOF0qmiesW383vsLdtQVyKtCNA9cjSoKCppTKPQVfKd2W8hbVo5ZhNJKDqeM7BOcvNoKJOjpHh4Js9g=="],
 | 
					    "i18next-browser-languagedetector": ["i18next-browser-languagedetector@8.2.0", "", { "dependencies": { "@babel/runtime": "^7.23.2" } }, "sha512-P+3zEKLnOF0qmiesW383vsLdtQVyKtCNA9cjSoKCppTKPQVfKd2W8hbVo5ZhNJKDqeM7BOcvNoKJOjpHh4Js9g=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -665,9 +665,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="],
 | 
					    "lru-cache": ["lru-cache@5.1.1", "", { "dependencies": { "yallist": "^3.0.2" } }, "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "lucide-react": ["lucide-react@0.543.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-fpVfuOQO0V3HBaOA1stIiP/A2fPCXHIleRZL16Mx3HmjTYwNSbimhnFBygs2CAfU1geexMX5ItUcWBGUaqw5CA=="],
 | 
					    "lucide-react": ["lucide-react@0.541.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-s0Vircsu5WaGv2KoJZ5+SoxiAJ3UXV5KqEM3eIFDHaHkcLIFdIWgXtZ412+Gh02UsdS7Was+jvEpBvPCWQISlg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "magic-string": ["magic-string@0.30.19", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw=="],
 | 
					    "magic-string": ["magic-string@0.30.17", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" } }, "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="],
 | 
					    "math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -793,7 +793,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "react-hook-form": ["react-hook-form@7.62.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17 || ^18 || ^19" } }, "sha512-7KWFejc98xqG/F4bAxpL41NB3o1nnvQO1RWZT3TqRZYL8RryQETGfEdVnJN2fy1crCiBLLjkRBVK05j24FxJGA=="],
 | 
					    "react-hook-form": ["react-hook-form@7.62.0", "", { "peerDependencies": { "react": "^16.8.0 || ^17 || ^18 || ^19" } }, "sha512-7KWFejc98xqG/F4bAxpL41NB3o1nnvQO1RWZT3TqRZYL8RryQETGfEdVnJN2fy1crCiBLLjkRBVK05j24FxJGA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "react-i18next": ["react-i18next@15.7.3", "", { "dependencies": { "@babel/runtime": "^7.27.6", "html-parse-stringify": "^3.0.1" }, "peerDependencies": { "i18next": ">= 25.4.1", "react": ">= 16.8.0", "typescript": "^5" }, "optionalPeers": ["typescript"] }, "sha512-AANws4tOE+QSq/IeMF/ncoHlMNZaVLxpa5uUGW1wjike68elVYr0018L9xYoqBr1OFO7G7boDPrbn0HpMCJxTw=="],
 | 
					    "react-i18next": ["react-i18next@15.7.2", "", { "dependencies": { "@babel/runtime": "^7.27.6", "html-parse-stringify": "^3.0.1" }, "peerDependencies": { "i18next": ">= 25.4.1", "react": ">= 16.8.0", "typescript": "^5" }, "optionalPeers": ["typescript"] }, "sha512-xJxq7ibnhUlMvd82lNC4te1GxGUMoM1A05KKyqoqsBXVZtEvZg/fz/fnVzdlY/hhQ3SpP/79qCocZOtICGhd3g=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "react-markdown": ["react-markdown@10.1.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "html-url-attributes": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "unified": "^11.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" }, "peerDependencies": { "@types/react": ">=18", "react": ">=18" } }, "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ=="],
 | 
					    "react-markdown": ["react-markdown@10.1.0", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "devlop": "^1.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "html-url-attributes": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "unified": "^11.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" }, "peerDependencies": { "@types/react": ">=18", "react": ">=18" } }, "sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -847,13 +847,13 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "tailwind-merge": ["tailwind-merge@3.3.1", "", {}, "sha512-gBXpgUm/3rp1lMZZrM/w7D8GKqshif0zAymAhbCyIt8KMe+0v9DQ7cdYLR4FHH/cKpdTXb+A/tKKU3eolfsI+g=="],
 | 
					    "tailwind-merge": ["tailwind-merge@3.3.1", "", {}, "sha512-gBXpgUm/3rp1lMZZrM/w7D8GKqshif0zAymAhbCyIt8KMe+0v9DQ7cdYLR4FHH/cKpdTXb+A/tKKU3eolfsI+g=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "tailwindcss": ["tailwindcss@4.1.13", "", {}, "sha512-i+zidfmTqtwquj4hMEwdjshYYgMbOrPzb9a0M3ZgNa0JMoZeFC6bxZvO8yr8ozS6ix2SDz0+mvryPeBs2TFE+w=="],
 | 
					    "tailwindcss": ["tailwindcss@4.1.12", "", {}, "sha512-DzFtxOi+7NsFf7DBtI3BJsynR+0Yp6etH+nRPTbpWnS2pZBaSksv/JGctNwSWzbFjp0vxSqknaUylseZqMDGrA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "tapable": ["tapable@2.2.1", "", {}, "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ=="],
 | 
					    "tapable": ["tapable@2.2.1", "", {}, "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "tar": ["tar@7.4.3", "", { "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.0.1", "mkdirp": "^3.0.1", "yallist": "^5.0.0" } }, "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw=="],
 | 
					    "tar": ["tar@7.4.3", "", { "dependencies": { "@isaacs/fs-minipass": "^4.0.0", "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.0.1", "mkdirp": "^3.0.1", "yallist": "^5.0.0" } }, "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "tinyglobby": ["tinyglobby@0.2.15", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.3" } }, "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ=="],
 | 
					    "tinyglobby": ["tinyglobby@0.2.14", "", { "dependencies": { "fdir": "^6.4.4", "picomatch": "^4.0.2" } }, "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="],
 | 
					    "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -865,13 +865,13 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
 | 
					    "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "tw-animate-css": ["tw-animate-css@1.3.8", "", {}, "sha512-Qrk3PZ7l7wUcGYhwZloqfkWCmaXZAoqjkdbIDvzfGshwGtexa/DAs9koXxIkrpEasyevandomzCBAV1Yyop5rw=="],
 | 
					    "tw-animate-css": ["tw-animate-css@1.3.7", "", {}, "sha512-lvLb3hTIpB5oGsk8JmLoAjeCHV58nKa2zHYn8yWOoG5JJusH3bhJlF2DLAZ/5NmJ+jyH3ssiAx/2KmbhavJy/A=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="],
 | 
					    "type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "typescript": ["typescript@5.9.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A=="],
 | 
					    "typescript": ["typescript@5.9.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "typescript-eslint": ["typescript-eslint@8.43.0", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.43.0", "@typescript-eslint/parser": "8.43.0", "@typescript-eslint/typescript-estree": "8.43.0", "@typescript-eslint/utils": "8.43.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-FyRGJKUGvcFekRRcBKFBlAhnp4Ng8rhe8tuvvkR9OiU0gfd4vyvTRQHEckO6VDlH57jbeUQem2IpqPq9kLJH+w=="],
 | 
					    "typescript-eslint": ["typescript-eslint@8.41.0", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.41.0", "@typescript-eslint/parser": "8.41.0", "@typescript-eslint/typescript-estree": "8.41.0", "@typescript-eslint/utils": "8.41.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-n66rzs5OBXW3SFSnZHr2T685q1i4ODm2nulFJhMZBotaTavsS8TrI3d7bDlRSs9yWo7HmyWrN9qDu14Qv7Y0Dw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "undici-types": ["undici-types@7.10.0", "", {}, "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag=="],
 | 
					    "undici-types": ["undici-types@7.10.0", "", {}, "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -899,7 +899,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "vfile-message": ["vfile-message@4.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw=="],
 | 
					    "vfile-message": ["vfile-message@4.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "vite": ["vite@7.1.5", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.15" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-4cKBO9wR75r0BeIWWWId9XK9Lj6La5X846Zw9dFfzMRw38IlTk2iCcUt6hsyiDRcPidc55ZParFYDXi0nXOeLQ=="],
 | 
					    "vite": ["vite@7.1.3", "", { "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", "rollup": "^4.43.0", "tinyglobby": "^0.2.14" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "jiti": ">=1.21.0", "less": "^4.0.0", "lightningcss": "^1.21.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-OOUi5zjkDxYrKhTV3V7iKsoS37VUM7v40+HuwEmcrsf11Cdx9y3DIr2Px6liIcZFwt3XSRpQvFpL3WVy7ApkGw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "void-elements": ["void-elements@3.1.0", "", {}, "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w=="],
 | 
					    "void-elements": ["void-elements@3.1.0", "", {}, "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -911,7 +911,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="],
 | 
					    "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "zod": ["zod@4.1.5", "", {}, "sha512-rcUUZqlLJgBC33IT3PNMgsCq6TzLQEG/Ei/KTCU0PedSWRMAXoOUN+4t/0H+Q8bdnLPdqUYnvboJT0bn/229qg=="],
 | 
					    "zod": ["zod@4.1.3", "", {}, "sha512-1neef4bMce1hNTrxvHVKxWjKfGDn0oAli3Wy1Uwb7TRO1+wEwoZUZNP1NXIEESybOBiFnBOhI6a4m6tCLE8dog=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="],
 | 
					    "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -935,14 +935,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "@humanfs/node/@humanwhocodes/retry": ["@humanwhocodes/retry@0.3.1", "", {}, "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA=="],
 | 
					    "@humanfs/node/@humanwhocodes/retry": ["@humanwhocodes/retry@0.3.1", "", {}, "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@jridgewell/gen-mapping/@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="],
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    "@jridgewell/remapping/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.12", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg=="],
 | 
					    "@jridgewell/remapping/@jridgewell/gen-mapping": ["@jridgewell/gen-mapping@0.3.12", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, "sha512-OuLGC46TjB5BbN1dH8JULVVZY4WTdkF7tV9Ys6wLL1rubZnCMstOhNHueU5bLCrnRuDhKPDM4g6sw4Bel5Gzqg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@jridgewell/remapping/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.29", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ=="],
 | 
					    "@jridgewell/remapping/@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.29", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-uw6guiW/gcAGPDhLmd77/6lW8QLeiV5RUTsAX46Db6oLhGaVj4lhnPwb184s1bkc8kdVg/+h988dro8GRDpmYQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@jridgewell/trace-mapping/@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="],
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    "@tailwindcss/node/jiti": ["jiti@2.5.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w=="],
 | 
					    "@tailwindcss/node/jiti": ["jiti@2.5.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-twQoecYPiVA5K/h6SxtORw/Bs3ar+mLUtoPSc7iMXzQzK8d7eJ/R09wmTwAjiamETn1cXYPGfNnu7DMoHgu12w=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.4.5", "", { "dependencies": { "@emnapi/wasi-threads": "1.0.4", "tslib": "^2.4.0" }, "bundled": true }, "sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q=="],
 | 
					    "@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.4.5", "", { "dependencies": { "@emnapi/wasi-threads": "1.0.4", "tslib": "^2.4.0" }, "bundled": true }, "sha512-XsLw1dEOpkSX/WucdqUhPWP7hDxSvZiY+fsUC14h+FtQ2Ifni4znbBt8punRX+Uj2JG/uDb8nEHVKvrVlvdZ5Q=="],
 | 
				
			||||||
@@ -971,35 +967,33 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "@types/estree-jsx/@types/estree": ["@types/estree@1.0.7", "", {}, "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ=="],
 | 
					    "@types/estree-jsx/@types/estree": ["@types/estree@1.0.7", "", {}, "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.43.0", "", { "dependencies": { "@typescript-eslint/types": "8.43.0", "@typescript-eslint/visitor-keys": "8.43.0" } }, "sha512-daSWlQ87ZhsjrbMLvpuuMAt3y4ba57AuvadcR7f3nl8eS3BjRc8L9VLxFLk92RL5xdXOg6IQ+qKjjqNEimGuAg=="],
 | 
					    "@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.41.0", "", { "dependencies": { "@typescript-eslint/types": "8.41.0", "@typescript-eslint/visitor-keys": "8.41.0" } }, "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/eslint-plugin/@typescript-eslint/utils": ["@typescript-eslint/utils@8.43.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", "@typescript-eslint/scope-manager": "8.43.0", "@typescript-eslint/types": "8.43.0", "@typescript-eslint/typescript-estree": "8.43.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-S1/tEmkUeeswxd0GGcnwuVQPFWo8NzZTOMxCvw8BX7OMxnNae+i8Tm7REQen/SwUIPoPqfKn7EaZ+YLpiB3k9g=="],
 | 
					    "@typescript-eslint/eslint-plugin/@typescript-eslint/utils": ["@typescript-eslint/utils@8.41.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", "@typescript-eslint/scope-manager": "8.41.0", "@typescript-eslint/types": "8.41.0", "@typescript-eslint/typescript-estree": "8.41.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/eslint-plugin/ignore": ["ignore@7.0.4", "", {}, "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A=="],
 | 
					    "@typescript-eslint/eslint-plugin/ignore": ["ignore@7.0.4", "", {}, "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/parser/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.43.0", "", { "dependencies": { "@typescript-eslint/types": "8.43.0", "@typescript-eslint/visitor-keys": "8.43.0" } }, "sha512-daSWlQ87ZhsjrbMLvpuuMAt3y4ba57AuvadcR7f3nl8eS3BjRc8L9VLxFLk92RL5xdXOg6IQ+qKjjqNEimGuAg=="],
 | 
					    "@typescript-eslint/parser/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.41.0", "", { "dependencies": { "@typescript-eslint/types": "8.41.0", "@typescript-eslint/visitor-keys": "8.41.0" } }, "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/parser/@typescript-eslint/types": ["@typescript-eslint/types@8.43.0", "", {}, "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw=="],
 | 
					    "@typescript-eslint/parser/@typescript-eslint/types": ["@typescript-eslint/types@8.41.0", "", {}, "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/project-service/@typescript-eslint/types": ["@typescript-eslint/types@8.43.0", "", {}, "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw=="],
 | 
					    "@typescript-eslint/project-service/@typescript-eslint/types": ["@typescript-eslint/types@8.41.0", "", {}, "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/scope-manager/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.41.0", "", { "dependencies": { "@typescript-eslint/types": "8.41.0", "eslint-visitor-keys": "^4.2.1" } }, "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg=="],
 | 
					    "@typescript-eslint/scope-manager/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.38.0", "", { "dependencies": { "@typescript-eslint/types": "8.38.0", "eslint-visitor-keys": "^4.2.1" } }, "sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/type-utils/@typescript-eslint/types": ["@typescript-eslint/types@8.43.0", "", {}, "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw=="],
 | 
					    "@typescript-eslint/type-utils/@typescript-eslint/types": ["@typescript-eslint/types@8.41.0", "", {}, "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/type-utils/@typescript-eslint/utils": ["@typescript-eslint/utils@8.43.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", "@typescript-eslint/scope-manager": "8.43.0", "@typescript-eslint/types": "8.43.0", "@typescript-eslint/typescript-estree": "8.43.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-S1/tEmkUeeswxd0GGcnwuVQPFWo8NzZTOMxCvw8BX7OMxnNae+i8Tm7REQen/SwUIPoPqfKn7EaZ+YLpiB3k9g=="],
 | 
					    "@typescript-eslint/type-utils/@typescript-eslint/utils": ["@typescript-eslint/utils@8.41.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", "@typescript-eslint/scope-manager": "8.41.0", "@typescript-eslint/types": "8.41.0", "@typescript-eslint/typescript-estree": "8.41.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/typescript-estree/@typescript-eslint/types": ["@typescript-eslint/types@8.43.0", "", {}, "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw=="],
 | 
					    "@typescript-eslint/typescript-estree/@typescript-eslint/types": ["@typescript-eslint/types@8.41.0", "", {}, "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
 | 
					    "@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/typescript-estree/semver": ["semver@7.7.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="],
 | 
					    "@typescript-eslint/typescript-estree/semver": ["semver@7.7.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/utils/@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.7.0", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw=="],
 | 
					    "@typescript-eslint/utils/@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.38.0", "", { "dependencies": { "@typescript-eslint/project-service": "8.38.0", "@typescript-eslint/tsconfig-utils": "8.38.0", "@typescript-eslint/types": "8.38.0", "@typescript-eslint/visitor-keys": "8.38.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "typescript": ">=4.8.4 <5.9.0" } }, "sha512-fooELKcAKzxux6fA6pxOflpNS0jc+nOQEEOipXFNjSlBS6fqrJOVY/whSn70SScHrcJ2LDsxWrneFoWYSVfqhQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/utils/@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.41.0", "", { "dependencies": { "@typescript-eslint/project-service": "8.41.0", "@typescript-eslint/tsconfig-utils": "8.41.0", "@typescript-eslint/types": "8.41.0", "@typescript-eslint/visitor-keys": "8.41.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ=="],
 | 
					    "@typescript-eslint/visitor-keys/@typescript-eslint/types": ["@typescript-eslint/types@8.41.0", "", {}, "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag=="],
 | 
				
			||||||
 | 
					 | 
				
			||||||
    "@typescript-eslint/visitor-keys/@typescript-eslint/types": ["@typescript-eslint/types@8.43.0", "", {}, "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw=="],
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
 | 
					    "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1015,11 +1009,11 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],
 | 
					    "parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "typescript-eslint/@typescript-eslint/utils": ["@typescript-eslint/utils@8.43.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", "@typescript-eslint/scope-manager": "8.43.0", "@typescript-eslint/types": "8.43.0", "@typescript-eslint/typescript-estree": "8.43.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-S1/tEmkUeeswxd0GGcnwuVQPFWo8NzZTOMxCvw8BX7OMxnNae+i8Tm7REQen/SwUIPoPqfKn7EaZ+YLpiB3k9g=="],
 | 
					    "tinyglobby/fdir": ["fdir@6.4.6", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@babel/generator/@jridgewell/gen-mapping/@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="],
 | 
					    "tinyglobby/picomatch": ["picomatch@4.0.2", "", {}, "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@babel/generator/@jridgewell/trace-mapping/@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="],
 | 
					    "typescript-eslint/@typescript-eslint/utils": ["@typescript-eslint/utils@8.41.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", "@typescript-eslint/scope-manager": "8.41.0", "@typescript-eslint/types": "8.41.0", "@typescript-eslint/typescript-estree": "8.41.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@babel/helper-module-imports/@babel/traverse/@babel/generator": ["@babel/generator@7.27.1", "", { "dependencies": { "@babel/parser": "^7.27.1", "@babel/types": "^7.27.1", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" } }, "sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w=="],
 | 
					    "@babel/helper-module-imports/@babel/traverse/@babel/generator": ["@babel/generator@7.27.1", "", { "dependencies": { "@babel/parser": "^7.27.1", "@babel/types": "^7.27.1", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" } }, "sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1031,33 +1025,27 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    "@eslint/eslintrc/espree/eslint-visitor-keys": ["eslint-visitor-keys@4.2.0", "", {}, "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw=="],
 | 
					    "@eslint/eslintrc/espree/eslint-visitor-keys": ["eslint-visitor-keys@4.2.0", "", {}, "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@jridgewell/remapping/@jridgewell/gen-mapping/@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="],
 | 
					    "@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager/@typescript-eslint/types": ["@typescript-eslint/types@8.41.0", "", {}, "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@jridgewell/remapping/@jridgewell/trace-mapping/@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.0", "", {}, "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ=="],
 | 
					    "@typescript-eslint/eslint-plugin/@typescript-eslint/utils/@typescript-eslint/types": ["@typescript-eslint/types@8.41.0", "", {}, "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager/@typescript-eslint/types": ["@typescript-eslint/types@8.43.0", "", {}, "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw=="],
 | 
					    "@typescript-eslint/type-utils/@typescript-eslint/utils/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.41.0", "", { "dependencies": { "@typescript-eslint/types": "8.41.0", "@typescript-eslint/visitor-keys": "8.41.0" } }, "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ=="],
 | 
				
			||||||
 | 
					 | 
				
			||||||
    "@typescript-eslint/eslint-plugin/@typescript-eslint/utils/@typescript-eslint/types": ["@typescript-eslint/types@8.43.0", "", {}, "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw=="],
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    "@typescript-eslint/type-utils/@typescript-eslint/utils/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.43.0", "", { "dependencies": { "@typescript-eslint/types": "8.43.0", "@typescript-eslint/visitor-keys": "8.43.0" } }, "sha512-daSWlQ87ZhsjrbMLvpuuMAt3y4ba57AuvadcR7f3nl8eS3BjRc8L9VLxFLk92RL5xdXOg6IQ+qKjjqNEimGuAg=="],
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
 | 
					    "@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/utils/@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],
 | 
					    "@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.38.0", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.38.0", "@typescript-eslint/types": "^8.38.0", "debug": "^4.3.4" }, "peerDependencies": { "typescript": ">=4.8.4 <5.9.0" } }, "sha512-dbK7Jvqcb8c9QfH01YB6pORpqX1mn5gDZc9n63Ak/+jD67oWXn3Gs0M6vddAN+eDXBCS5EmNWzbSxsn9SzFWWg=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.41.0", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.41.0", "@typescript-eslint/types": "^8.41.0", "debug": "^4.3.4" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ=="],
 | 
					    "@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.38.0", "", { "peerDependencies": { "typescript": ">=4.8.4 <5.9.0" } }, "sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.41.0", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-TDhxYFPUYRFxFhuU5hTIJk+auzM/wKvWgoNYOPcOf6i4ReYlOoYN8q1dV5kOTjNQNJgzWN3TUUQMtlLOcUgdUw=="],
 | 
					    "@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.38.0", "", { "dependencies": { "@typescript-eslint/types": "8.38.0", "eslint-visitor-keys": "^4.2.1" } }, "sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g=="],
 | 
				
			||||||
 | 
					 | 
				
			||||||
    "@typescript-eslint/utils/@typescript-eslint/typescript-estree/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.41.0", "", { "dependencies": { "@typescript-eslint/types": "8.41.0", "eslint-visitor-keys": "^4.2.1" } }, "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg=="],
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/utils/@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
 | 
					    "@typescript-eslint/utils/@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/utils/@typescript-eslint/typescript-estree/semver": ["semver@7.7.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="],
 | 
					    "@typescript-eslint/utils/@typescript-eslint/typescript-estree/semver": ["semver@7.7.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "typescript-eslint/@typescript-eslint/utils/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.43.0", "", { "dependencies": { "@typescript-eslint/types": "8.43.0", "@typescript-eslint/visitor-keys": "8.43.0" } }, "sha512-daSWlQ87ZhsjrbMLvpuuMAt3y4ba57AuvadcR7f3nl8eS3BjRc8L9VLxFLk92RL5xdXOg6IQ+qKjjqNEimGuAg=="],
 | 
					    "typescript-eslint/@typescript-eslint/utils/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.41.0", "", { "dependencies": { "@typescript-eslint/types": "8.41.0", "@typescript-eslint/visitor-keys": "8.41.0" } }, "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "typescript-eslint/@typescript-eslint/utils/@typescript-eslint/types": ["@typescript-eslint/types@8.43.0", "", {}, "sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw=="],
 | 
					    "typescript-eslint/@typescript-eslint/utils/@typescript-eslint/types": ["@typescript-eslint/types@8.41.0", "", {}, "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag=="],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "@typescript-eslint/utils/@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
 | 
					    "@typescript-eslint/utils/@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,43 +15,43 @@
 | 
				
			|||||||
    "@radix-ui/react-select": "^2.2.6",
 | 
					    "@radix-ui/react-select": "^2.2.6",
 | 
				
			||||||
    "@radix-ui/react-separator": "^1.1.7",
 | 
					    "@radix-ui/react-separator": "^1.1.7",
 | 
				
			||||||
    "@radix-ui/react-slot": "^1.2.3",
 | 
					    "@radix-ui/react-slot": "^1.2.3",
 | 
				
			||||||
    "@tailwindcss/vite": "^4.1.13",
 | 
					    "@tailwindcss/vite": "^4.1.12",
 | 
				
			||||||
    "@tanstack/react-query": "^5.87.1",
 | 
					    "@tanstack/react-query": "^5.85.5",
 | 
				
			||||||
    "axios": "^1.11.0",
 | 
					    "axios": "^1.11.0",
 | 
				
			||||||
    "class-variance-authority": "^0.7.1",
 | 
					    "class-variance-authority": "^0.7.1",
 | 
				
			||||||
    "clsx": "^2.1.1",
 | 
					    "clsx": "^2.1.1",
 | 
				
			||||||
    "i18next": "^25.5.2",
 | 
					    "i18next": "^25.4.2",
 | 
				
			||||||
    "i18next-browser-languagedetector": "^8.2.0",
 | 
					    "i18next-browser-languagedetector": "^8.2.0",
 | 
				
			||||||
    "i18next-resources-to-backend": "^1.2.1",
 | 
					    "i18next-resources-to-backend": "^1.2.1",
 | 
				
			||||||
    "input-otp": "^1.4.2",
 | 
					    "input-otp": "^1.4.2",
 | 
				
			||||||
    "lucide-react": "^0.543.0",
 | 
					    "lucide-react": "^0.541.0",
 | 
				
			||||||
    "next-themes": "^0.4.6",
 | 
					    "next-themes": "^0.4.6",
 | 
				
			||||||
    "react": "^19.1.1",
 | 
					    "react": "^19.1.1",
 | 
				
			||||||
    "react-dom": "^19.1.1",
 | 
					    "react-dom": "^19.1.1",
 | 
				
			||||||
    "react-hook-form": "^7.62.0",
 | 
					    "react-hook-form": "^7.62.0",
 | 
				
			||||||
    "react-i18next": "^15.7.3",
 | 
					    "react-i18next": "^15.7.2",
 | 
				
			||||||
    "react-markdown": "^10.1.0",
 | 
					    "react-markdown": "^10.1.0",
 | 
				
			||||||
    "react-router": "^7.8.2",
 | 
					    "react-router": "^7.8.2",
 | 
				
			||||||
    "sonner": "^2.0.7",
 | 
					    "sonner": "^2.0.7",
 | 
				
			||||||
    "tailwind-merge": "^3.3.1",
 | 
					    "tailwind-merge": "^3.3.1",
 | 
				
			||||||
    "tailwindcss": "^4.1.13",
 | 
					    "tailwindcss": "^4.1.12",
 | 
				
			||||||
    "zod": "^4.1.5"
 | 
					    "zod": "^4.1.3"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "devDependencies": {
 | 
					  "devDependencies": {
 | 
				
			||||||
    "@eslint/js": "^9.35.0",
 | 
					    "@eslint/js": "^9.34.0",
 | 
				
			||||||
    "@tanstack/eslint-plugin-query": "^5.86.0",
 | 
					    "@tanstack/eslint-plugin-query": "^5.83.1",
 | 
				
			||||||
    "@types/node": "^24.3.1",
 | 
					    "@types/node": "^24.3.0",
 | 
				
			||||||
    "@types/react": "^19.1.12",
 | 
					    "@types/react": "^19.1.11",
 | 
				
			||||||
    "@types/react-dom": "^19.1.9",
 | 
					    "@types/react-dom": "^19.1.8",
 | 
				
			||||||
    "@vitejs/plugin-react": "^5.0.2",
 | 
					    "@vitejs/plugin-react": "^5.0.1",
 | 
				
			||||||
    "eslint": "^9.35.0",
 | 
					    "eslint": "^9.34.0",
 | 
				
			||||||
    "eslint-plugin-react-hooks": "^5.2.0",
 | 
					    "eslint-plugin-react-hooks": "^5.2.0",
 | 
				
			||||||
    "eslint-plugin-react-refresh": "^0.4.19",
 | 
					    "eslint-plugin-react-refresh": "^0.4.19",
 | 
				
			||||||
    "globals": "^16.4.0",
 | 
					    "globals": "^16.3.0",
 | 
				
			||||||
    "prettier": "3.6.2",
 | 
					    "prettier": "3.6.2",
 | 
				
			||||||
    "tw-animate-css": "^1.3.8",
 | 
					    "tw-animate-css": "^1.3.7",
 | 
				
			||||||
    "typescript": "~5.9.2",
 | 
					    "typescript": "~5.9.2",
 | 
				
			||||||
    "typescript-eslint": "^8.43.0",
 | 
					    "typescript-eslint": "^8.41.0",
 | 
				
			||||||
    "vite": "^7.1.5"
 | 
					    "vite": "^7.1.3"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
							
								
								
									
										12
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								go.mod
									
									
									
									
									
								
							@@ -5,7 +5,6 @@ go 1.23.2
 | 
				
			|||||||
require (
 | 
					require (
 | 
				
			||||||
	github.com/cenkalti/backoff/v5 v5.0.3
 | 
						github.com/cenkalti/backoff/v5 v5.0.3
 | 
				
			||||||
	github.com/gin-gonic/gin v1.10.1
 | 
						github.com/gin-gonic/gin v1.10.1
 | 
				
			||||||
	github.com/glebarez/sqlite v1.11.0
 | 
					 | 
				
			||||||
	github.com/go-playground/validator/v10 v10.27.0
 | 
						github.com/go-playground/validator/v10 v10.27.0
 | 
				
			||||||
	github.com/golang-migrate/migrate/v4 v4.18.3
 | 
						github.com/golang-migrate/migrate/v4 v4.18.3
 | 
				
			||||||
	github.com/google/go-querystring v1.1.0
 | 
						github.com/google/go-querystring v1.1.0
 | 
				
			||||||
@@ -16,9 +15,9 @@ require (
 | 
				
			|||||||
	github.com/spf13/viper v1.20.1
 | 
						github.com/spf13/viper v1.20.1
 | 
				
			||||||
	github.com/traefik/paerser v0.2.2
 | 
						github.com/traefik/paerser v0.2.2
 | 
				
			||||||
	golang.org/x/crypto v0.41.0
 | 
						golang.org/x/crypto v0.41.0
 | 
				
			||||||
	golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b
 | 
						gorm.io/driver/sqlite v1.6.0
 | 
				
			||||||
	gorm.io/gorm v1.30.1
 | 
						gorm.io/gorm v1.30.1
 | 
				
			||||||
	gotest.tools/v3 v3.5.2
 | 
						modernc.org/sqlite v1.38.2
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
require (
 | 
					require (
 | 
				
			||||||
@@ -29,9 +28,9 @@ require (
 | 
				
			|||||||
	github.com/containerd/errdefs/pkg v0.3.0 // indirect
 | 
						github.com/containerd/errdefs/pkg v0.3.0 // indirect
 | 
				
			||||||
	github.com/containerd/log v0.1.0 // indirect
 | 
						github.com/containerd/log v0.1.0 // indirect
 | 
				
			||||||
	github.com/glebarez/go-sqlite v1.21.2 // indirect
 | 
						github.com/glebarez/go-sqlite v1.21.2 // indirect
 | 
				
			||||||
 | 
						github.com/glebarez/sqlite v1.11.0 // indirect
 | 
				
			||||||
	github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect
 | 
						github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 // indirect
 | 
				
			||||||
	github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
 | 
						github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
 | 
				
			||||||
	github.com/google/go-cmp v0.6.0 // indirect
 | 
					 | 
				
			||||||
	github.com/hashicorp/errwrap v1.1.0 // indirect
 | 
						github.com/hashicorp/errwrap v1.1.0 // indirect
 | 
				
			||||||
	github.com/hashicorp/go-multierror v1.1.1 // indirect
 | 
						github.com/hashicorp/go-multierror v1.1.1 // indirect
 | 
				
			||||||
	github.com/jinzhu/inflection v1.0.0 // indirect
 | 
						github.com/jinzhu/inflection v1.0.0 // indirect
 | 
				
			||||||
@@ -45,11 +44,12 @@ require (
 | 
				
			|||||||
	go.opentelemetry.io/auto/sdk v1.1.0 // indirect
 | 
						go.opentelemetry.io/auto/sdk v1.1.0 // indirect
 | 
				
			||||||
	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 // indirect
 | 
						go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 // indirect
 | 
				
			||||||
	go.opentelemetry.io/otel/sdk v1.34.0 // indirect
 | 
						go.opentelemetry.io/otel/sdk v1.34.0 // indirect
 | 
				
			||||||
 | 
						golang.org/x/exp v0.0.0-20250620022241-b7579e27df2b // indirect
 | 
				
			||||||
	golang.org/x/term v0.34.0 // indirect
 | 
						golang.org/x/term v0.34.0 // indirect
 | 
				
			||||||
 | 
						gotest.tools/v3 v3.5.2 // indirect
 | 
				
			||||||
	modernc.org/libc v1.66.3 // indirect
 | 
						modernc.org/libc v1.66.3 // indirect
 | 
				
			||||||
	modernc.org/mathutil v1.7.1 // indirect
 | 
						modernc.org/mathutil v1.7.1 // indirect
 | 
				
			||||||
	modernc.org/memory v1.11.0 // indirect
 | 
						modernc.org/memory v1.11.0 // indirect
 | 
				
			||||||
	modernc.org/sqlite v1.38.2 // indirect
 | 
					 | 
				
			||||||
	rsc.io/qr v0.2.0 // indirect
 | 
						rsc.io/qr v0.2.0 // indirect
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -86,6 +86,8 @@ require (
 | 
				
			|||||||
	github.com/go-playground/universal-translator v0.18.1 // indirect
 | 
						github.com/go-playground/universal-translator v0.18.1 // indirect
 | 
				
			||||||
	github.com/goccy/go-json v0.10.4 // indirect
 | 
						github.com/goccy/go-json v0.10.4 // indirect
 | 
				
			||||||
	github.com/gogo/protobuf v1.3.2 // indirect
 | 
						github.com/gogo/protobuf v1.3.2 // indirect
 | 
				
			||||||
 | 
						github.com/gorilla/securecookie v1.1.2 // indirect
 | 
				
			||||||
 | 
						github.com/gorilla/sessions v1.4.0
 | 
				
			||||||
	github.com/inconshreveable/mousetrap v1.1.0 // indirect
 | 
						github.com/inconshreveable/mousetrap v1.1.0 // indirect
 | 
				
			||||||
	github.com/json-iterator/go v1.1.12 // indirect
 | 
						github.com/json-iterator/go v1.1.12 // indirect
 | 
				
			||||||
	github.com/klauspost/cpuid/v2 v2.2.9 // indirect
 | 
						github.com/klauspost/cpuid/v2 v2.2.9 // indirect
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										8
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								go.sum
									
									
									
									
									
								
							@@ -132,10 +132,16 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN
 | 
				
			|||||||
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
 | 
					github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=
 | 
				
			||||||
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
 | 
					github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
 | 
				
			||||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 | 
					github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 | 
				
			||||||
 | 
					github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
 | 
				
			||||||
 | 
					github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
 | 
				
			||||||
github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs=
 | 
					github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e h1:ijClszYn+mADRFY17kjQEVQ1XRhq2/JR1M3sGqeJoxs=
 | 
				
			||||||
github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
 | 
					github.com/google/pprof v0.0.0-20250317173921-a4b03ec1a45e/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
 | 
				
			||||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
 | 
					github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
 | 
				
			||||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 | 
					github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 | 
				
			||||||
 | 
					github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA=
 | 
				
			||||||
 | 
					github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo=
 | 
				
			||||||
 | 
					github.com/gorilla/sessions v1.4.0 h1:kpIYOp/oi6MG/p5PgxApU8srsSw9tuFbt46Lt7auzqQ=
 | 
				
			||||||
 | 
					github.com/gorilla/sessions v1.4.0/go.mod h1:FLWm50oby91+hl7p/wRxDth9bWSuk0qVL2emc7lT5ik=
 | 
				
			||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 h1:VNqngBF40hVlDloBruUehVYC3ArSgIyScOAyMRqBxRg=
 | 
					github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 h1:VNqngBF40hVlDloBruUehVYC3ArSgIyScOAyMRqBxRg=
 | 
				
			||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1/go.mod h1:RBRO7fro65R6tjKzYgLAFo0t1QEXY1Dp+i/bvpRiqiQ=
 | 
					github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1/go.mod h1:RBRO7fro65R6tjKzYgLAFo0t1QEXY1Dp+i/bvpRiqiQ=
 | 
				
			||||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
 | 
					github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
 | 
				
			||||||
@@ -374,6 +380,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV
 | 
				
			|||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 | 
					gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 | 
				
			||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 | 
					gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 | 
				
			||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 | 
					gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 | 
				
			||||||
 | 
					gorm.io/driver/sqlite v1.6.0 h1:WHRRrIiulaPiPFmDcod6prc4l2VGVWHz80KspNsxSfQ=
 | 
				
			||||||
 | 
					gorm.io/driver/sqlite v1.6.0/go.mod h1:AO9V1qIQddBESngQUKWL9yoH93HIeA1X6V633rBwyT8=
 | 
				
			||||||
gorm.io/gorm v1.30.1 h1:lSHg33jJTBxs2mgJRfRZeLDG+WZaHYCk3Wtfl6Ngzo4=
 | 
					gorm.io/gorm v1.30.1 h1:lSHg33jJTBxs2mgJRfRZeLDG+WZaHYCk3Wtfl6Ngzo4=
 | 
				
			||||||
gorm.io/gorm v1.30.1/go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE=
 | 
					gorm.io/gorm v1.30.1/go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE=
 | 
				
			||||||
gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
 | 
					gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q=
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -146,7 +146,6 @@ func (app *BootstrapApp) Setup() error {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	// Create engine
 | 
						// Create engine
 | 
				
			||||||
	engine := gin.New()
 | 
						engine := gin.New()
 | 
				
			||||||
	engine.SetTrustedProxies(strings.Split(app.Config.TrustedProxies, ","))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if config.Version != "development" {
 | 
						if config.Version != "development" {
 | 
				
			||||||
		gin.SetMode(gin.ReleaseMode)
 | 
							gin.SetMode(gin.ReleaseMode)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -53,7 +53,6 @@ type Config struct {
 | 
				
			|||||||
	LdapSearchFilter        string `mapstructure:"ldap-search-filter"`
 | 
						LdapSearchFilter        string `mapstructure:"ldap-search-filter"`
 | 
				
			||||||
	ResourcesDir            string `mapstructure:"resources-dir"`
 | 
						ResourcesDir            string `mapstructure:"resources-dir"`
 | 
				
			||||||
	DatabasePath            string `mapstructure:"database-path" validate:"required"`
 | 
						DatabasePath            string `mapstructure:"database-path" validate:"required"`
 | 
				
			||||||
	TrustedProxies          string `mapstructure:"trusted-proxies"`
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// OAuth/OIDC config
 | 
					// OAuth/OIDC config
 | 
				
			||||||
@@ -124,9 +123,9 @@ type RedirectQuery struct {
 | 
				
			|||||||
	RedirectURI string `url:"redirect_uri"`
 | 
						RedirectURI string `url:"redirect_uri"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Labels
 | 
					// App config
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Apps struct {
 | 
					type AppConfigs struct {
 | 
				
			||||||
	Apps map[string]App
 | 
						Apps map[string]App
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,135 +0,0 @@
 | 
				
			|||||||
package controller_test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	"encoding/json"
 | 
					 | 
				
			||||||
	"net/http/httptest"
 | 
					 | 
				
			||||||
	"testing"
 | 
					 | 
				
			||||||
	"tinyauth/internal/config"
 | 
					 | 
				
			||||||
	"tinyauth/internal/controller"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"github.com/gin-gonic/gin"
 | 
					 | 
				
			||||||
	"gotest.tools/v3/assert"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var controllerCfg = controller.ContextControllerConfig{
 | 
					 | 
				
			||||||
	ConfiguredProviders:   []string{"github", "google", "generic"},
 | 
					 | 
				
			||||||
	Title:                 "Test App",
 | 
					 | 
				
			||||||
	GenericName:           "Generic",
 | 
					 | 
				
			||||||
	AppURL:                "http://localhost:8080",
 | 
					 | 
				
			||||||
	RootDomain:            "localhost",
 | 
					 | 
				
			||||||
	ForgotPasswordMessage: "Contact admin to reset your password.",
 | 
					 | 
				
			||||||
	BackgroundImage:       "/assets/bg.jpg",
 | 
					 | 
				
			||||||
	OAuthAutoRedirect:     "google",
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var userContext = config.UserContext{
 | 
					 | 
				
			||||||
	Username:    "testuser",
 | 
					 | 
				
			||||||
	Name:        "testuser",
 | 
					 | 
				
			||||||
	Email:       "test@example.com",
 | 
					 | 
				
			||||||
	IsLoggedIn:  true,
 | 
					 | 
				
			||||||
	OAuth:       false,
 | 
					 | 
				
			||||||
	Provider:    "username",
 | 
					 | 
				
			||||||
	TotpPending: false,
 | 
					 | 
				
			||||||
	OAuthGroups: "",
 | 
					 | 
				
			||||||
	TotpEnabled: false,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func setupContextController(middlewares *[]gin.HandlerFunc) (*gin.Engine, *httptest.ResponseRecorder) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	gin.SetMode(gin.TestMode)
 | 
					 | 
				
			||||||
	router := gin.Default()
 | 
					 | 
				
			||||||
	recorder := httptest.NewRecorder()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if middlewares != nil {
 | 
					 | 
				
			||||||
		for _, m := range *middlewares {
 | 
					 | 
				
			||||||
			router.Use(m)
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	group := router.Group("/api")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	ctrl := controller.NewContextController(controllerCfg, group)
 | 
					 | 
				
			||||||
	ctrl.SetupRoutes()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return router, recorder
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestAppContextHandler(t *testing.T) {
 | 
					 | 
				
			||||||
	expectedRes := controller.AppContextResponse{
 | 
					 | 
				
			||||||
		Status:                200,
 | 
					 | 
				
			||||||
		Message:               "Success",
 | 
					 | 
				
			||||||
		ConfiguredProviders:   controllerCfg.ConfiguredProviders,
 | 
					 | 
				
			||||||
		Title:                 controllerCfg.Title,
 | 
					 | 
				
			||||||
		GenericName:           controllerCfg.GenericName,
 | 
					 | 
				
			||||||
		AppURL:                controllerCfg.AppURL,
 | 
					 | 
				
			||||||
		RootDomain:            controllerCfg.RootDomain,
 | 
					 | 
				
			||||||
		ForgotPasswordMessage: controllerCfg.ForgotPasswordMessage,
 | 
					 | 
				
			||||||
		BackgroundImage:       controllerCfg.BackgroundImage,
 | 
					 | 
				
			||||||
		OAuthAutoRedirect:     controllerCfg.OAuthAutoRedirect,
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	router, recorder := setupContextController(nil)
 | 
					 | 
				
			||||||
	req := httptest.NewRequest("GET", "/api/context/app", nil)
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 200, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	var ctrlRes controller.AppContextResponse
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	err := json.Unmarshal(recorder.Body.Bytes(), &ctrlRes)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expectedRes, ctrlRes)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestUserContextHandler(t *testing.T) {
 | 
					 | 
				
			||||||
	expectedRes := controller.UserContextResponse{
 | 
					 | 
				
			||||||
		Status:      200,
 | 
					 | 
				
			||||||
		Message:     "Success",
 | 
					 | 
				
			||||||
		IsLoggedIn:  userContext.IsLoggedIn,
 | 
					 | 
				
			||||||
		Username:    userContext.Username,
 | 
					 | 
				
			||||||
		Name:        userContext.Name,
 | 
					 | 
				
			||||||
		Email:       userContext.Email,
 | 
					 | 
				
			||||||
		Provider:    userContext.Provider,
 | 
					 | 
				
			||||||
		OAuth:       userContext.OAuth,
 | 
					 | 
				
			||||||
		TotpPending: userContext.TotpPending,
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test with context
 | 
					 | 
				
			||||||
	router, recorder := setupContextController(&[]gin.HandlerFunc{
 | 
					 | 
				
			||||||
		func(c *gin.Context) {
 | 
					 | 
				
			||||||
			c.Set("context", &userContext)
 | 
					 | 
				
			||||||
			c.Next()
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	req := httptest.NewRequest("GET", "/api/context/user", nil)
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 200, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	var ctrlRes controller.UserContextResponse
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	err := json.Unmarshal(recorder.Body.Bytes(), &ctrlRes)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expectedRes, ctrlRes)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test no context
 | 
					 | 
				
			||||||
	expectedRes = controller.UserContextResponse{
 | 
					 | 
				
			||||||
		Status:     401,
 | 
					 | 
				
			||||||
		Message:    "Unauthorized",
 | 
					 | 
				
			||||||
		IsLoggedIn: false,
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	router, recorder = setupContextController(nil)
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("GET", "/api/context/user", nil)
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 200, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	err = json.Unmarshal(recorder.Body.Bytes(), &ctrlRes)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expectedRes, ctrlRes)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -108,7 +108,6 @@ func (controller *OAuthController) oauthCallbackHandler(c *gin.Context) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if err != nil || state != csrfCookie {
 | 
						if err != nil || state != csrfCookie {
 | 
				
			||||||
		log.Warn().Err(err).Msg("CSRF token mismatch or cookie missing")
 | 
							log.Warn().Err(err).Msg("CSRF token mismatch or cookie missing")
 | 
				
			||||||
		c.SetCookie(controller.config.CSRFCookieName, "", -1, "/", fmt.Sprintf(".%s", controller.config.RootDomain), controller.config.SecureCookie, true)
 | 
					 | 
				
			||||||
		c.Redirect(http.StatusTemporaryRedirect, fmt.Sprintf("%s/error", controller.config.AppURL))
 | 
							c.Redirect(http.StatusTemporaryRedirect, fmt.Sprintf("%s/error", controller.config.AppURL))
 | 
				
			||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,6 +7,7 @@ import (
 | 
				
			|||||||
	"tinyauth/internal/config"
 | 
						"tinyauth/internal/config"
 | 
				
			||||||
	"tinyauth/internal/service"
 | 
						"tinyauth/internal/service"
 | 
				
			||||||
	"tinyauth/internal/utils"
 | 
						"tinyauth/internal/utils"
 | 
				
			||||||
 | 
						"tinyauth/internal/utils/decoders"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/gin-gonic/gin"
 | 
						"github.com/gin-gonic/gin"
 | 
				
			||||||
	"github.com/google/go-querystring/query"
 | 
						"github.com/google/go-querystring/query"
 | 
				
			||||||
@@ -55,15 +56,6 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
 | 
				
			|||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if req.Proxy != "nginx" && req.Proxy != "traefik" && req.Proxy != "caddy" {
 | 
					 | 
				
			||||||
		log.Warn().Str("proxy", req.Proxy).Msg("Invalid proxy")
 | 
					 | 
				
			||||||
		c.JSON(400, gin.H{
 | 
					 | 
				
			||||||
			"status":  400,
 | 
					 | 
				
			||||||
			"message": "Bad Request",
 | 
					 | 
				
			||||||
		})
 | 
					 | 
				
			||||||
		return
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	isBrowser := strings.Contains(c.Request.Header.Get("Accept"), "text/html")
 | 
						isBrowser := strings.Contains(c.Request.Header.Get("Accept"), "text/html")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if isBrowser {
 | 
						if isBrowser {
 | 
				
			||||||
@@ -76,6 +68,16 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
 | 
				
			|||||||
	proto := c.Request.Header.Get("X-Forwarded-Proto")
 | 
						proto := c.Request.Header.Get("X-Forwarded-Proto")
 | 
				
			||||||
	host := c.Request.Header.Get("X-Forwarded-Host")
 | 
						host := c.Request.Header.Get("X-Forwarded-Host")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						var app config.App
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						headers, err := decoders.DecodeHeaders(utils.NormalizeHeaders(c.Request.Header))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							log.Error().Err(err).Msg("Failed to decode headers")
 | 
				
			||||||
 | 
							controller.handleError(c, req, isBrowser)
 | 
				
			||||||
 | 
							return
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	labels, err := controller.docker.GetLabels(host)
 | 
						labels, err := controller.docker.GetLabels(host)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
@@ -84,10 +86,21 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
 | 
				
			|||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if len(headers.Apps) > 0 {
 | 
				
			||||||
 | 
							for k, v := range headers.Apps {
 | 
				
			||||||
 | 
								log.Debug().Str("app", k).Msg("Using headers for app config instead of labels")
 | 
				
			||||||
 | 
								app = v
 | 
				
			||||||
 | 
								break
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							log.Debug().Msg("No app config found in headers, using labels")
 | 
				
			||||||
 | 
							app = labels
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	clientIP := c.ClientIP()
 | 
						clientIP := c.ClientIP()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if controller.auth.IsBypassedIP(labels.IP, clientIP) {
 | 
						if controller.auth.IsBypassedIP(app.IP, clientIP) {
 | 
				
			||||||
		controller.setHeaders(c, labels)
 | 
							controller.setHeaders(c, app)
 | 
				
			||||||
		c.JSON(200, gin.H{
 | 
							c.JSON(200, gin.H{
 | 
				
			||||||
			"status":  200,
 | 
								"status":  200,
 | 
				
			||||||
			"message": "Authenticated",
 | 
								"message": "Authenticated",
 | 
				
			||||||
@@ -95,7 +108,7 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
 | 
				
			|||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	authEnabled, err := controller.auth.IsAuthEnabled(uri, labels.Path)
 | 
						authEnabled, err := controller.auth.IsAuthEnabled(uri, app.Path)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		log.Error().Err(err).Msg("Failed to check if auth is enabled for resource")
 | 
							log.Error().Err(err).Msg("Failed to check if auth is enabled for resource")
 | 
				
			||||||
@@ -105,7 +118,7 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if !authEnabled {
 | 
						if !authEnabled {
 | 
				
			||||||
		log.Debug().Msg("Authentication disabled for resource, allowing access")
 | 
							log.Debug().Msg("Authentication disabled for resource, allowing access")
 | 
				
			||||||
		controller.setHeaders(c, labels)
 | 
							controller.setHeaders(c, app)
 | 
				
			||||||
		c.JSON(200, gin.H{
 | 
							c.JSON(200, gin.H{
 | 
				
			||||||
			"status":  200,
 | 
								"status":  200,
 | 
				
			||||||
			"message": "Authenticated",
 | 
								"message": "Authenticated",
 | 
				
			||||||
@@ -113,7 +126,7 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
 | 
				
			|||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if !controller.auth.CheckIP(labels.IP, clientIP) {
 | 
						if !controller.auth.CheckIP(app.IP, clientIP) {
 | 
				
			||||||
		if req.Proxy == "nginx" || !isBrowser {
 | 
							if req.Proxy == "nginx" || !isBrowser {
 | 
				
			||||||
			c.JSON(401, gin.H{
 | 
								c.JSON(401, gin.H{
 | 
				
			||||||
				"status":  401,
 | 
									"status":  401,
 | 
				
			||||||
@@ -156,7 +169,7 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if userContext.IsLoggedIn {
 | 
						if userContext.IsLoggedIn {
 | 
				
			||||||
		appAllowed := controller.auth.IsResourceAllowed(c, userContext, labels)
 | 
							appAllowed := controller.auth.IsResourceAllowed(c, userContext, app)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if !appAllowed {
 | 
							if !appAllowed {
 | 
				
			||||||
			log.Warn().Str("user", userContext.Username).Str("resource", strings.Split(host, ".")[0]).Msg("User not allowed to access resource")
 | 
								log.Warn().Str("user", userContext.Username).Str("resource", strings.Split(host, ".")[0]).Msg("User not allowed to access resource")
 | 
				
			||||||
@@ -190,7 +203,7 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if userContext.OAuth {
 | 
							if userContext.OAuth {
 | 
				
			||||||
			groupOK := controller.auth.IsInOAuthGroup(c, userContext, labels.OAuth.Groups)
 | 
								groupOK := controller.auth.IsInOAuthGroup(c, userContext, app.OAuth.Groups)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if !groupOK {
 | 
								if !groupOK {
 | 
				
			||||||
				log.Warn().Str("user", userContext.Username).Str("resource", strings.Split(host, ".")[0]).Msg("User OAuth groups do not match resource requirements")
 | 
									log.Warn().Str("user", userContext.Username).Str("resource", strings.Split(host, ".")[0]).Msg("User OAuth groups do not match resource requirements")
 | 
				
			||||||
@@ -230,7 +243,7 @@ func (controller *ProxyController) proxyHandler(c *gin.Context) {
 | 
				
			|||||||
		c.Header("Remote-Email", utils.SanitizeHeader(userContext.Email))
 | 
							c.Header("Remote-Email", utils.SanitizeHeader(userContext.Email))
 | 
				
			||||||
		c.Header("Remote-Groups", utils.SanitizeHeader(userContext.OAuthGroups))
 | 
							c.Header("Remote-Groups", utils.SanitizeHeader(userContext.OAuthGroups))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		controller.setHeaders(c, labels)
 | 
							controller.setHeaders(c, app)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		c.JSON(200, gin.H{
 | 
							c.JSON(200, gin.H{
 | 
				
			||||||
			"status":  200,
 | 
								"status":  200,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,164 +0,0 @@
 | 
				
			|||||||
package controller_test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	"net/http/httptest"
 | 
					 | 
				
			||||||
	"testing"
 | 
					 | 
				
			||||||
	"tinyauth/internal/config"
 | 
					 | 
				
			||||||
	"tinyauth/internal/controller"
 | 
					 | 
				
			||||||
	"tinyauth/internal/service"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"github.com/gin-gonic/gin"
 | 
					 | 
				
			||||||
	"gotest.tools/v3/assert"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func setupProxyController(t *testing.T, middlewares *[]gin.HandlerFunc) (*gin.Engine, *httptest.ResponseRecorder, *service.AuthService) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	gin.SetMode(gin.TestMode)
 | 
					 | 
				
			||||||
	router := gin.Default()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if middlewares != nil {
 | 
					 | 
				
			||||||
		for _, m := range *middlewares {
 | 
					 | 
				
			||||||
			router.Use(m)
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	group := router.Group("/api")
 | 
					 | 
				
			||||||
	recorder := httptest.NewRecorder()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Database
 | 
					 | 
				
			||||||
	databaseService := service.NewDatabaseService(service.DatabaseServiceConfig{
 | 
					 | 
				
			||||||
		DatabasePath: "/tmp/tinyauth_test.db",
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, databaseService.Init())
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	database := databaseService.GetDatabase()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Docker
 | 
					 | 
				
			||||||
	dockerService := service.NewDockerService()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, dockerService.Init())
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Auth service
 | 
					 | 
				
			||||||
	authService := service.NewAuthService(service.AuthServiceConfig{
 | 
					 | 
				
			||||||
		Users: []config.User{
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				Username: "testuser",
 | 
					 | 
				
			||||||
				Password: "$2a$10$ne6z693sTgzT3ePoQ05PgOecUHnBjM7sSNj6M.l5CLUP.f6NyCnt.", // test
 | 
					 | 
				
			||||||
			},
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
		OauthWhitelist:    "",
 | 
					 | 
				
			||||||
		SessionExpiry:     3600,
 | 
					 | 
				
			||||||
		SecureCookie:      false,
 | 
					 | 
				
			||||||
		RootDomain:        "localhost",
 | 
					 | 
				
			||||||
		LoginTimeout:      300,
 | 
					 | 
				
			||||||
		LoginMaxRetries:   3,
 | 
					 | 
				
			||||||
		SessionCookieName: "tinyauth-session",
 | 
					 | 
				
			||||||
	}, dockerService, nil, database)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Controller
 | 
					 | 
				
			||||||
	ctrl := controller.NewProxyController(controller.ProxyControllerConfig{
 | 
					 | 
				
			||||||
		AppURL: "http://localhost:8080",
 | 
					 | 
				
			||||||
	}, group, dockerService, authService)
 | 
					 | 
				
			||||||
	ctrl.SetupRoutes()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return router, recorder, authService
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestProxyHandler(t *testing.T) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	router, recorder, authService := setupProxyController(t, nil)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test invalid proxy
 | 
					 | 
				
			||||||
	req := httptest.NewRequest("GET", "/api/auth/invalidproxy", nil)
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 400, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test logged out user (traefik/caddy)
 | 
					 | 
				
			||||||
	recorder = httptest.NewRecorder()
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("GET", "/api/auth/traefik", nil)
 | 
					 | 
				
			||||||
	req.Header.Set("X-Forwarded-Proto", "https")
 | 
					 | 
				
			||||||
	req.Header.Set("X-Forwarded-Host", "example.com")
 | 
					 | 
				
			||||||
	req.Header.Set("X-Forwarded-Uri", "/somepath")
 | 
					 | 
				
			||||||
	req.Header.Set("Accept", "text/html")
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 307, recorder.Code)
 | 
					 | 
				
			||||||
	assert.Equal(t, "http://localhost:8080/login?redirect_uri=https%3A%2F%2Fexample.com%2Fsomepath", recorder.Header().Get("Location"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test logged out user (nginx)
 | 
					 | 
				
			||||||
	recorder = httptest.NewRecorder()
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("GET", "/api/auth/nginx", nil)
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 401, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test logged in user
 | 
					 | 
				
			||||||
	c := gin.CreateTestContextOnly(recorder, router)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	err := authService.CreateSessionCookie(c, &config.SessionCookie{
 | 
					 | 
				
			||||||
		Username:    "testuser",
 | 
					 | 
				
			||||||
		Name:        "testuser",
 | 
					 | 
				
			||||||
		Email:       "testuser@example.com",
 | 
					 | 
				
			||||||
		Provider:    "username",
 | 
					 | 
				
			||||||
		TotpPending: false,
 | 
					 | 
				
			||||||
		OAuthGroups: "",
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	cookie := c.Writer.Header().Get("Set-Cookie")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	router, recorder, _ = setupProxyController(t, &[]gin.HandlerFunc{
 | 
					 | 
				
			||||||
		func(c *gin.Context) {
 | 
					 | 
				
			||||||
			c.Set("context", &config.UserContext{
 | 
					 | 
				
			||||||
				Username:    "testuser",
 | 
					 | 
				
			||||||
				Name:        "testuser",
 | 
					 | 
				
			||||||
				Email:       "testuser@example.com",
 | 
					 | 
				
			||||||
				IsLoggedIn:  true,
 | 
					 | 
				
			||||||
				OAuth:       false,
 | 
					 | 
				
			||||||
				Provider:    "username",
 | 
					 | 
				
			||||||
				TotpPending: false,
 | 
					 | 
				
			||||||
				OAuthGroups: "",
 | 
					 | 
				
			||||||
				TotpEnabled: false,
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
			c.Next()
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("GET", "/api/auth/traefik", nil)
 | 
					 | 
				
			||||||
	req.Header.Set("Cookie", cookie)
 | 
					 | 
				
			||||||
	req.Header.Set("Accept", "text/html")
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 200, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "testuser", recorder.Header().Get("Remote-User"))
 | 
					 | 
				
			||||||
	assert.Equal(t, "testuser", recorder.Header().Get("Remote-Name"))
 | 
					 | 
				
			||||||
	assert.Equal(t, "testuser@example.com", recorder.Header().Get("Remote-Email"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Ensure basic auth is disabled for TOTP enabled users
 | 
					 | 
				
			||||||
	router, recorder, _ = setupProxyController(t, &[]gin.HandlerFunc{
 | 
					 | 
				
			||||||
		func(c *gin.Context) {
 | 
					 | 
				
			||||||
			c.Set("context", &config.UserContext{
 | 
					 | 
				
			||||||
				Username:    "testuser",
 | 
					 | 
				
			||||||
				Name:        "testuser",
 | 
					 | 
				
			||||||
				Email:       "testuser@example.com",
 | 
					 | 
				
			||||||
				IsLoggedIn:  true,
 | 
					 | 
				
			||||||
				OAuth:       false,
 | 
					 | 
				
			||||||
				Provider:    "basic",
 | 
					 | 
				
			||||||
				TotpPending: false,
 | 
					 | 
				
			||||||
				OAuthGroups: "",
 | 
					 | 
				
			||||||
				TotpEnabled: true,
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
			c.Next()
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("GET", "/api/auth/traefik", nil)
 | 
					 | 
				
			||||||
	req.SetBasicAuth("testuser", "test")
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 401, recorder.Code)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,56 +0,0 @@
 | 
				
			|||||||
package controller_test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	"net/http/httptest"
 | 
					 | 
				
			||||||
	"os"
 | 
					 | 
				
			||||||
	"testing"
 | 
					 | 
				
			||||||
	"tinyauth/internal/controller"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"github.com/gin-gonic/gin"
 | 
					 | 
				
			||||||
	"gotest.tools/v3/assert"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestResourcesHandler(t *testing.T) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	gin.SetMode(gin.TestMode)
 | 
					 | 
				
			||||||
	router := gin.New()
 | 
					 | 
				
			||||||
	group := router.Group("/")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	ctrl := controller.NewResourcesController(controller.ResourcesControllerConfig{
 | 
					 | 
				
			||||||
		ResourcesDir: "/tmp/tinyauth",
 | 
					 | 
				
			||||||
	}, group)
 | 
					 | 
				
			||||||
	ctrl.SetupRoutes()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Create test data
 | 
					 | 
				
			||||||
	err := os.Mkdir("/tmp/tinyauth", 0755)
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	file, err := os.Create("/tmp/tinyauth/test.txt")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	_, err = file.WriteString("This is a test file.")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	file.Close()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test existing file
 | 
					 | 
				
			||||||
	req := httptest.NewRequest("GET", "/resources/test.txt", nil)
 | 
					 | 
				
			||||||
	recorder := httptest.NewRecorder()
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 200, recorder.Code)
 | 
					 | 
				
			||||||
	assert.Equal(t, "This is a test file.", recorder.Body.String())
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test non-existing file
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("GET", "/resources/nonexistent.txt", nil)
 | 
					 | 
				
			||||||
	recorder = httptest.NewRecorder()
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 404, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test directory traversal attack
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("GET", "/resources/../etc/passwd", nil)
 | 
					 | 
				
			||||||
	recorder = httptest.NewRecorder()
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 404, recorder.Code)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,297 +0,0 @@
 | 
				
			|||||||
package controller_test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	"encoding/json"
 | 
					 | 
				
			||||||
	"net/http"
 | 
					 | 
				
			||||||
	"net/http/httptest"
 | 
					 | 
				
			||||||
	"strings"
 | 
					 | 
				
			||||||
	"testing"
 | 
					 | 
				
			||||||
	"time"
 | 
					 | 
				
			||||||
	"tinyauth/internal/config"
 | 
					 | 
				
			||||||
	"tinyauth/internal/controller"
 | 
					 | 
				
			||||||
	"tinyauth/internal/service"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"github.com/gin-gonic/gin"
 | 
					 | 
				
			||||||
	"github.com/pquerna/otp/totp"
 | 
					 | 
				
			||||||
	"gotest.tools/v3/assert"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var cookieValue string
 | 
					 | 
				
			||||||
var totpSecret = "6WFZXPEZRK5MZHHYAFW4DAOUYQMCASBJ"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func setupUserController(t *testing.T, middlewares *[]gin.HandlerFunc) (*gin.Engine, *httptest.ResponseRecorder) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	gin.SetMode(gin.TestMode)
 | 
					 | 
				
			||||||
	router := gin.Default()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if middlewares != nil {
 | 
					 | 
				
			||||||
		for _, m := range *middlewares {
 | 
					 | 
				
			||||||
			router.Use(m)
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	group := router.Group("/api")
 | 
					 | 
				
			||||||
	recorder := httptest.NewRecorder()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Database
 | 
					 | 
				
			||||||
	databaseService := service.NewDatabaseService(service.DatabaseServiceConfig{
 | 
					 | 
				
			||||||
		DatabasePath: "/tmp/tinyauth_test.db",
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, databaseService.Init())
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	database := databaseService.GetDatabase()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Auth service
 | 
					 | 
				
			||||||
	authService := service.NewAuthService(service.AuthServiceConfig{
 | 
					 | 
				
			||||||
		Users: []config.User{
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				Username: "testuser",
 | 
					 | 
				
			||||||
				Password: "$2a$10$ne6z693sTgzT3ePoQ05PgOecUHnBjM7sSNj6M.l5CLUP.f6NyCnt.", // test
 | 
					 | 
				
			||||||
			},
 | 
					 | 
				
			||||||
			{
 | 
					 | 
				
			||||||
				Username:   "totpuser",
 | 
					 | 
				
			||||||
				Password:   "$2a$10$ne6z693sTgzT3ePoQ05PgOecUHnBjM7sSNj6M.l5CLUP.f6NyCnt.", // test
 | 
					 | 
				
			||||||
				TotpSecret: totpSecret,
 | 
					 | 
				
			||||||
			},
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
		OauthWhitelist:    "",
 | 
					 | 
				
			||||||
		SessionExpiry:     3600,
 | 
					 | 
				
			||||||
		SecureCookie:      false,
 | 
					 | 
				
			||||||
		RootDomain:        "localhost",
 | 
					 | 
				
			||||||
		LoginTimeout:      300,
 | 
					 | 
				
			||||||
		LoginMaxRetries:   3,
 | 
					 | 
				
			||||||
		SessionCookieName: "tinyauth-session",
 | 
					 | 
				
			||||||
	}, nil, nil, database)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Controller
 | 
					 | 
				
			||||||
	ctrl := controller.NewUserController(controller.UserControllerConfig{
 | 
					 | 
				
			||||||
		RootDomain: "localhost",
 | 
					 | 
				
			||||||
	}, group, authService)
 | 
					 | 
				
			||||||
	ctrl.SetupRoutes()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return router, recorder
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestLoginHandler(t *testing.T) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	router, recorder := setupUserController(t, nil)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	loginReq := controller.LoginRequest{
 | 
					 | 
				
			||||||
		Username: "testuser",
 | 
					 | 
				
			||||||
		Password: "test",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	loginReqJson, err := json.Marshal(loginReq)
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test
 | 
					 | 
				
			||||||
	req := httptest.NewRequest("POST", "/api/user/login", strings.NewReader(string(loginReqJson)))
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 200, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	cookie := recorder.Result().Cookies()[0]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "tinyauth-session", cookie.Name)
 | 
					 | 
				
			||||||
	assert.Assert(t, cookie.Value != "")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	cookieValue = cookie.Value
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test invalid credentials
 | 
					 | 
				
			||||||
	loginReq = controller.LoginRequest{
 | 
					 | 
				
			||||||
		Username: "testuser",
 | 
					 | 
				
			||||||
		Password: "invalid",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	loginReqJson, err = json.Marshal(loginReq)
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	recorder = httptest.NewRecorder()
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("POST", "/api/user/login", strings.NewReader(string(loginReqJson)))
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 401, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test totp required
 | 
					 | 
				
			||||||
	loginReq = controller.LoginRequest{
 | 
					 | 
				
			||||||
		Username: "totpuser",
 | 
					 | 
				
			||||||
		Password: "test",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	loginReqJson, err = json.Marshal(loginReq)
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	recorder = httptest.NewRecorder()
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("POST", "/api/user/login", strings.NewReader(string(loginReqJson)))
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 200, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	loginResJson, err := json.Marshal(map[string]any{
 | 
					 | 
				
			||||||
		"message":     "TOTP required",
 | 
					 | 
				
			||||||
		"status":      200,
 | 
					 | 
				
			||||||
		"totpPending": true,
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.Equal(t, string(loginResJson), recorder.Body.String())
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test invalid json
 | 
					 | 
				
			||||||
	recorder = httptest.NewRecorder()
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("POST", "/api/user/login", strings.NewReader("{invalid json}"))
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 400, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test rate limiting
 | 
					 | 
				
			||||||
	loginReq = controller.LoginRequest{
 | 
					 | 
				
			||||||
		Username: "testuser",
 | 
					 | 
				
			||||||
		Password: "invalid",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	loginReqJson, err = json.Marshal(loginReq)
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	for range 5 {
 | 
					 | 
				
			||||||
		recorder = httptest.NewRecorder()
 | 
					 | 
				
			||||||
		req = httptest.NewRequest("POST", "/api/user/login", strings.NewReader(string(loginReqJson)))
 | 
					 | 
				
			||||||
		router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 429, recorder.Code)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestLogoutHandler(t *testing.T) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	router, recorder := setupUserController(t, nil)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test
 | 
					 | 
				
			||||||
	req := httptest.NewRequest("POST", "/api/user/logout", nil)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	req.AddCookie(&http.Cookie{
 | 
					 | 
				
			||||||
		Name:  "tinyauth-session",
 | 
					 | 
				
			||||||
		Value: cookieValue,
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 200, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	cookie := recorder.Result().Cookies()[0]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "tinyauth-session", cookie.Name)
 | 
					 | 
				
			||||||
	assert.Equal(t, "", cookie.Value)
 | 
					 | 
				
			||||||
	assert.Equal(t, -1, cookie.MaxAge)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestTotpHandler(t *testing.T) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	router, recorder := setupUserController(t, &[]gin.HandlerFunc{
 | 
					 | 
				
			||||||
		func(c *gin.Context) {
 | 
					 | 
				
			||||||
			c.Set("context", &config.UserContext{
 | 
					 | 
				
			||||||
				Username:    "totpuser",
 | 
					 | 
				
			||||||
				Name:        "totpuser",
 | 
					 | 
				
			||||||
				Email:       "totpuser@example.com",
 | 
					 | 
				
			||||||
				IsLoggedIn:  false,
 | 
					 | 
				
			||||||
				OAuth:       false,
 | 
					 | 
				
			||||||
				Provider:    "username",
 | 
					 | 
				
			||||||
				TotpPending: true,
 | 
					 | 
				
			||||||
				OAuthGroups: "",
 | 
					 | 
				
			||||||
				TotpEnabled: true,
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
			c.Next()
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test
 | 
					 | 
				
			||||||
	code, err := totp.GenerateCode(totpSecret, time.Now())
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	totpReq := controller.TotpRequest{
 | 
					 | 
				
			||||||
		Code: code,
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	totpReqJson, err := json.Marshal(totpReq)
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	req := httptest.NewRequest("POST", "/api/user/totp", strings.NewReader(string(totpReqJson)))
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 200, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	cookie := recorder.Result().Cookies()[0]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "tinyauth-session", cookie.Name)
 | 
					 | 
				
			||||||
	assert.Assert(t, cookie.Value != "")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test invalid json
 | 
					 | 
				
			||||||
	recorder = httptest.NewRecorder()
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("POST", "/api/user/totp", strings.NewReader("{invalid json}"))
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 400, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test rate limiting
 | 
					 | 
				
			||||||
	totpReq = controller.TotpRequest{
 | 
					 | 
				
			||||||
		Code: "000000",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	totpReqJson, err = json.Marshal(totpReq)
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	for range 5 {
 | 
					 | 
				
			||||||
		recorder = httptest.NewRecorder()
 | 
					 | 
				
			||||||
		req = httptest.NewRequest("POST", "/api/user/totp", strings.NewReader(string(totpReqJson)))
 | 
					 | 
				
			||||||
		router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 429, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test invalid code
 | 
					 | 
				
			||||||
	router, recorder = setupUserController(t, &[]gin.HandlerFunc{
 | 
					 | 
				
			||||||
		func(c *gin.Context) {
 | 
					 | 
				
			||||||
			c.Set("context", &config.UserContext{
 | 
					 | 
				
			||||||
				Username:    "totpuser",
 | 
					 | 
				
			||||||
				Name:        "totpuser",
 | 
					 | 
				
			||||||
				Email:       "totpuser@example.com",
 | 
					 | 
				
			||||||
				IsLoggedIn:  false,
 | 
					 | 
				
			||||||
				OAuth:       false,
 | 
					 | 
				
			||||||
				Provider:    "username",
 | 
					 | 
				
			||||||
				TotpPending: true,
 | 
					 | 
				
			||||||
				OAuthGroups: "",
 | 
					 | 
				
			||||||
				TotpEnabled: true,
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
			c.Next()
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("POST", "/api/user/totp", strings.NewReader(string(totpReqJson)))
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 401, recorder.Code)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test no totp pending
 | 
					 | 
				
			||||||
	router, recorder = setupUserController(t, &[]gin.HandlerFunc{
 | 
					 | 
				
			||||||
		func(c *gin.Context) {
 | 
					 | 
				
			||||||
			c.Set("context", &config.UserContext{
 | 
					 | 
				
			||||||
				Username:    "totpuser",
 | 
					 | 
				
			||||||
				Name:        "totpuser",
 | 
					 | 
				
			||||||
				Email:       "totpuser@example.com",
 | 
					 | 
				
			||||||
				IsLoggedIn:  false,
 | 
					 | 
				
			||||||
				OAuth:       false,
 | 
					 | 
				
			||||||
				Provider:    "username",
 | 
					 | 
				
			||||||
				TotpPending: false,
 | 
					 | 
				
			||||||
				OAuthGroups: "",
 | 
					 | 
				
			||||||
				TotpEnabled: false,
 | 
					 | 
				
			||||||
			})
 | 
					 | 
				
			||||||
			c.Next()
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
	})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	req = httptest.NewRequest("POST", "/api/user/totp", strings.NewReader(string(totpReqJson)))
 | 
					 | 
				
			||||||
	router.ServeHTTP(recorder, req)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 401, recorder.Code)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -13,13 +13,13 @@ import (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Get root domain parses a hostname and returns the upper domain (e.g. sub1.sub2.domain.com -> sub2.domain.com)
 | 
					// Get root domain parses a hostname and returns the upper domain (e.g. sub1.sub2.domain.com -> sub2.domain.com)
 | 
				
			||||||
func GetRootDomain(u string) (string, error) {
 | 
					func GetRootDomain(appUrl string) (string, error) {
 | 
				
			||||||
	appUrl, err := url.Parse(u)
 | 
						appUrlParsed, err := url.Parse(appUrl)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return "", err
 | 
							return "", err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	host := appUrl.Hostname()
 | 
						host := appUrlParsed.Hostname()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if netIP := net.ParseIP(host); netIP != nil {
 | 
						if netIP := net.ParseIP(host); netIP != nil {
 | 
				
			||||||
		return "", errors.New("IP addresses are not allowed")
 | 
							return "", errors.New("IP addresses are not allowed")
 | 
				
			||||||
@@ -27,7 +27,7 @@ func GetRootDomain(u string) (string, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	urlParts := strings.Split(host, ".")
 | 
						urlParts := strings.Split(host, ".")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(urlParts) < 3 {
 | 
						if len(urlParts) < 2 {
 | 
				
			||||||
		return "", errors.New("invalid domain, must be at least second level domain")
 | 
							return "", errors.New("invalid domain, must be at least second level domain")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -49,7 +49,6 @@ func ParseFileToLine(content string) string {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func Filter[T any](slice []T, test func(T) bool) (res []T) {
 | 
					func Filter[T any](slice []T, test func(T) bool) (res []T) {
 | 
				
			||||||
	res = make([]T, 0)
 | 
					 | 
				
			||||||
	for _, value := range slice {
 | 
						for _, value := range slice {
 | 
				
			||||||
		if test(value) {
 | 
							if test(value) {
 | 
				
			||||||
			res = append(res, value)
 | 
								res = append(res, value)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,197 +0,0 @@
 | 
				
			|||||||
package utils_test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	"testing"
 | 
					 | 
				
			||||||
	"tinyauth/internal/config"
 | 
					 | 
				
			||||||
	"tinyauth/internal/utils"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"github.com/gin-gonic/gin"
 | 
					 | 
				
			||||||
	"gotest.tools/v3/assert"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestGetRootDomain(t *testing.T) {
 | 
					 | 
				
			||||||
	// Normal case
 | 
					 | 
				
			||||||
	domain := "http://sub.example.com"
 | 
					 | 
				
			||||||
	expected := "example.com"
 | 
					 | 
				
			||||||
	result, err := utils.GetRootDomain(domain)
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Domain with multiple subdomains
 | 
					 | 
				
			||||||
	domain = "http://b.c.example.com"
 | 
					 | 
				
			||||||
	expected = "c.example.com"
 | 
					 | 
				
			||||||
	result, err = utils.GetRootDomain(domain)
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Domain with no subdomain
 | 
					 | 
				
			||||||
	domain = "http://example.com"
 | 
					 | 
				
			||||||
	expected = "example.com"
 | 
					 | 
				
			||||||
	_, err = utils.GetRootDomain(domain)
 | 
					 | 
				
			||||||
	assert.Error(t, err, "invalid domain, must be at least second level domain")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Invalid domain (only TLD)
 | 
					 | 
				
			||||||
	domain = "com"
 | 
					 | 
				
			||||||
	_, err = utils.GetRootDomain(domain)
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "invalid domain")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// IP address
 | 
					 | 
				
			||||||
	domain = "http://10.10.10.10"
 | 
					 | 
				
			||||||
	_, err = utils.GetRootDomain(domain)
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "IP addresses are not allowed")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Invalid URL
 | 
					 | 
				
			||||||
	domain = "http://[::1]:namedport"
 | 
					 | 
				
			||||||
	_, err = utils.GetRootDomain(domain)
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "parse \"http://[::1]:namedport\": invalid port \":namedport\" after host")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// URL with scheme and path
 | 
					 | 
				
			||||||
	domain = "https://sub.example.com/path"
 | 
					 | 
				
			||||||
	expected = "example.com"
 | 
					 | 
				
			||||||
	result, err = utils.GetRootDomain(domain)
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// URL with port
 | 
					 | 
				
			||||||
	domain = "http://sub.example.com:8080"
 | 
					 | 
				
			||||||
	expected = "example.com"
 | 
					 | 
				
			||||||
	result, err = utils.GetRootDomain(domain)
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, result)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestParseFileToLine(t *testing.T) {
 | 
					 | 
				
			||||||
	// Normal case
 | 
					 | 
				
			||||||
	content := "user1\nuser2\nuser3"
 | 
					 | 
				
			||||||
	expected := "user1,user2,user3"
 | 
					 | 
				
			||||||
	result := utils.ParseFileToLine(content)
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with empty lines and spaces
 | 
					 | 
				
			||||||
	content = " user1 \n\n user2 \n user3 \n"
 | 
					 | 
				
			||||||
	expected = "user1,user2,user3"
 | 
					 | 
				
			||||||
	result = utils.ParseFileToLine(content)
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with only empty lines
 | 
					 | 
				
			||||||
	content = "\n\n\n"
 | 
					 | 
				
			||||||
	expected = ""
 | 
					 | 
				
			||||||
	result = utils.ParseFileToLine(content)
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with single user
 | 
					 | 
				
			||||||
	content = "singleuser"
 | 
					 | 
				
			||||||
	expected = "singleuser"
 | 
					 | 
				
			||||||
	result = utils.ParseFileToLine(content)
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with trailing newline
 | 
					 | 
				
			||||||
	content = "user1\nuser2\n"
 | 
					 | 
				
			||||||
	expected = "user1,user2"
 | 
					 | 
				
			||||||
	result = utils.ParseFileToLine(content)
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, result)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestFilter(t *testing.T) {
 | 
					 | 
				
			||||||
	// Normal case
 | 
					 | 
				
			||||||
	slice := []int{1, 2, 3, 4, 5}
 | 
					 | 
				
			||||||
	testFunc := func(n int) bool { return n%2 == 0 }
 | 
					 | 
				
			||||||
	expected := []int{2, 4}
 | 
					 | 
				
			||||||
	result := utils.Filter(slice, testFunc)
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expected, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with no matches
 | 
					 | 
				
			||||||
	slice = []int{1, 3, 5}
 | 
					 | 
				
			||||||
	testFunc = func(n int) bool { return n%2 == 0 }
 | 
					 | 
				
			||||||
	expected = []int{}
 | 
					 | 
				
			||||||
	result = utils.Filter(slice, testFunc)
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expected, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with all matches
 | 
					 | 
				
			||||||
	slice = []int{2, 4, 6}
 | 
					 | 
				
			||||||
	testFunc = func(n int) bool { return n%2 == 0 }
 | 
					 | 
				
			||||||
	expected = []int{2, 4, 6}
 | 
					 | 
				
			||||||
	result = utils.Filter(slice, testFunc)
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expected, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with empty slice
 | 
					 | 
				
			||||||
	slice = []int{}
 | 
					 | 
				
			||||||
	testFunc = func(n int) bool { return n%2 == 0 }
 | 
					 | 
				
			||||||
	expected = []int{}
 | 
					 | 
				
			||||||
	result = utils.Filter(slice, testFunc)
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expected, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with different type (string)
 | 
					 | 
				
			||||||
	sliceStr := []string{"apple", "banana", "cherry"}
 | 
					 | 
				
			||||||
	testFuncStr := func(s string) bool { return len(s) > 5 }
 | 
					 | 
				
			||||||
	expectedStr := []string{"banana", "cherry"}
 | 
					 | 
				
			||||||
	resultStr := utils.Filter(sliceStr, testFuncStr)
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expectedStr, resultStr)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestGetContext(t *testing.T) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	gin.SetMode(gin.TestMode)
 | 
					 | 
				
			||||||
	c, _ := gin.CreateTestContext(nil)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Normal case
 | 
					 | 
				
			||||||
	c.Set("context", &config.UserContext{Username: "testuser"})
 | 
					 | 
				
			||||||
	result, err := utils.GetContext(c)
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.Equal(t, "testuser", result.Username)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with no context
 | 
					 | 
				
			||||||
	c.Set("context", nil)
 | 
					 | 
				
			||||||
	_, err = utils.GetContext(c)
 | 
					 | 
				
			||||||
	assert.Error(t, err, "invalid user context in request")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with invalid context type
 | 
					 | 
				
			||||||
	c.Set("context", "invalid type")
 | 
					 | 
				
			||||||
	_, err = utils.GetContext(c)
 | 
					 | 
				
			||||||
	assert.Error(t, err, "invalid user context in request")
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestIsRedirectSafe(t *testing.T) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	domain := "example.com"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with no subdomain
 | 
					 | 
				
			||||||
	redirectURL := "http://example.com/welcome"
 | 
					 | 
				
			||||||
	result := utils.IsRedirectSafe(redirectURL, domain)
 | 
					 | 
				
			||||||
	assert.Equal(t, false, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with different domain
 | 
					 | 
				
			||||||
	redirectURL = "http://malicious.com/phishing"
 | 
					 | 
				
			||||||
	result = utils.IsRedirectSafe(redirectURL, domain)
 | 
					 | 
				
			||||||
	assert.Equal(t, false, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with subdomain
 | 
					 | 
				
			||||||
	redirectURL = "http://sub.example.com/page"
 | 
					 | 
				
			||||||
	result = utils.IsRedirectSafe(redirectURL, domain)
 | 
					 | 
				
			||||||
	assert.Equal(t, true, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with empty redirect URL
 | 
					 | 
				
			||||||
	redirectURL = ""
 | 
					 | 
				
			||||||
	result = utils.IsRedirectSafe(redirectURL, domain)
 | 
					 | 
				
			||||||
	assert.Equal(t, false, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with invalid URL
 | 
					 | 
				
			||||||
	redirectURL = "http://[::1]:namedport"
 | 
					 | 
				
			||||||
	result = utils.IsRedirectSafe(redirectURL, domain)
 | 
					 | 
				
			||||||
	assert.Equal(t, false, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with URL having port
 | 
					 | 
				
			||||||
	redirectURL = "http://sub.example.com:8080/page"
 | 
					 | 
				
			||||||
	result = utils.IsRedirectSafe(redirectURL, domain)
 | 
					 | 
				
			||||||
	assert.Equal(t, true, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with URL having different subdomain
 | 
					 | 
				
			||||||
	redirectURL = "http://another.example.com/page"
 | 
					 | 
				
			||||||
	result = utils.IsRedirectSafe(redirectURL, domain)
 | 
					 | 
				
			||||||
	assert.Equal(t, true, result)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case with URL having different TLD
 | 
					 | 
				
			||||||
	redirectURL = "http://example.org/page"
 | 
					 | 
				
			||||||
	result = utils.IsRedirectSafe(redirectURL, domain)
 | 
					 | 
				
			||||||
	assert.Equal(t, false, result)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										119
									
								
								internal/utils/decoders/header_decoder.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										119
									
								
								internal/utils/decoders/header_decoder.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,119 @@
 | 
				
			|||||||
 | 
					package decoders
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"fmt"
 | 
				
			||||||
 | 
						"sort"
 | 
				
			||||||
 | 
						"strings"
 | 
				
			||||||
 | 
						"tinyauth/internal/config"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"github.com/traefik/paerser/parser"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Based on: https://github.com/traefik/paerser/blob/master/parser/labels_decode.go (Apache 2.0 License)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func DecodeHeaders(headers map[string]string) (config.AppConfigs, error) {
 | 
				
			||||||
 | 
						var app config.AppConfigs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						err := decodeHeadersHelper(headers, &app, "tinyauth", "tinyauth-apps")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return config.AppConfigs{}, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return app, nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func decodeHeadersHelper(headers map[string]string, element any, rootName string, filters ...string) error {
 | 
				
			||||||
 | 
						node, err := decodeHeadersToNode(headers, rootName, filters...)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						opts := parser.MetadataOpts{TagName: "header", AllowSliceAsStruct: true}
 | 
				
			||||||
 | 
						err = parser.AddMetadata(element, node, opts)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return parser.Fill(element, node, parser.FillerOpts{AllowSliceAsStruct: true})
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func decodeHeadersToNode(headers map[string]string, rootName string, filters ...string) (*parser.Node, error) {
 | 
				
			||||||
 | 
						sortedKeys := sortKeys(headers, filters)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						var node *parser.Node
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for i, key := range sortedKeys {
 | 
				
			||||||
 | 
							split := strings.Split(strings.ToLower(key), "-")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if split[0] != rootName {
 | 
				
			||||||
 | 
								return nil, fmt.Errorf("invalid header root %s", split[0])
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for _, v := range split {
 | 
				
			||||||
 | 
								if v == "" {
 | 
				
			||||||
 | 
									return nil, fmt.Errorf("invalid element: %s", key)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if i == 0 {
 | 
				
			||||||
 | 
								node = &parser.Node{}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							decodeHeaderToNode(node, split, headers[key])
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return node, nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func decodeHeaderToNode(root *parser.Node, path []string, value string) {
 | 
				
			||||||
 | 
						if len(root.Name) == 0 {
 | 
				
			||||||
 | 
							root.Name = path[0]
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if len(path) > 1 {
 | 
				
			||||||
 | 
							node := containsNode(root.Children, path[1])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if node != nil {
 | 
				
			||||||
 | 
								decodeHeaderToNode(node, path[1:], value)
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								child := &parser.Node{Name: path[1]}
 | 
				
			||||||
 | 
								decodeHeaderToNode(child, path[1:], value)
 | 
				
			||||||
 | 
								root.Children = append(root.Children, child)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							root.Value = value
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func containsNode(nodes []*parser.Node, name string) *parser.Node {
 | 
				
			||||||
 | 
						for _, node := range nodes {
 | 
				
			||||||
 | 
							if strings.EqualFold(node.Name, name) {
 | 
				
			||||||
 | 
								return node
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func sortKeys(headers map[string]string, filters []string) []string {
 | 
				
			||||||
 | 
						var sortedKeys []string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for key := range headers {
 | 
				
			||||||
 | 
							if len(filters) == 0 {
 | 
				
			||||||
 | 
								sortedKeys = append(sortedKeys, key)
 | 
				
			||||||
 | 
								continue
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for _, filter := range filters {
 | 
				
			||||||
 | 
								if strings.HasPrefix(strings.ToLower(key), strings.ToLower(filter)) {
 | 
				
			||||||
 | 
									sortedKeys = append(sortedKeys, key)
 | 
				
			||||||
 | 
									continue
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						sort.Strings(sortedKeys)
 | 
				
			||||||
 | 
						return sortedKeys
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										73
									
								
								internal/utils/decoders/header_decoder_test.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										73
									
								
								internal/utils/decoders/header_decoder_test.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,73 @@
 | 
				
			|||||||
 | 
					package decoders_test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"reflect"
 | 
				
			||||||
 | 
						"testing"
 | 
				
			||||||
 | 
						"tinyauth/internal/config"
 | 
				
			||||||
 | 
						"tinyauth/internal/utils/decoders"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func TestDecodeHeaders(t *testing.T) {
 | 
				
			||||||
 | 
						// Variables
 | 
				
			||||||
 | 
						expected := config.AppConfigs{
 | 
				
			||||||
 | 
							Apps: map[string]config.App{
 | 
				
			||||||
 | 
								"foo": {
 | 
				
			||||||
 | 
									Config: config.AppConfig{
 | 
				
			||||||
 | 
										Domain: "example.com",
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									Users: config.AppUsers{
 | 
				
			||||||
 | 
										Allow: "user1,user2",
 | 
				
			||||||
 | 
										Block: "user3",
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									OAuth: config.AppOAuth{
 | 
				
			||||||
 | 
										Whitelist: "somebody@example.com",
 | 
				
			||||||
 | 
										Groups:    "group3",
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									IP: config.AppIP{
 | 
				
			||||||
 | 
										Allow:  []string{"10.71.0.1/24", "10.71.0.2"},
 | 
				
			||||||
 | 
										Block:  []string{"10.10.10.10", "10.0.0.0/24"},
 | 
				
			||||||
 | 
										Bypass: []string{"192.168.1.1"},
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									Response: config.AppResponse{
 | 
				
			||||||
 | 
										Headers: []string{"X-Foo=Bar", "X-Baz=Qux"},
 | 
				
			||||||
 | 
										BasicAuth: config.AppBasicAuth{
 | 
				
			||||||
 | 
											Username:     "admin",
 | 
				
			||||||
 | 
											Password:     "password",
 | 
				
			||||||
 | 
											PasswordFile: "/path/to/passwordfile",
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
									Path: config.AppPath{
 | 
				
			||||||
 | 
										Allow: "/public",
 | 
				
			||||||
 | 
										Block: "/private",
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						test := map[string]string{
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-Config-Domain":                   "example.com",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-Users-Allow":                     "user1,user2",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-Users-Block":                     "user3",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-OAuth-Whitelist":                 "somebody@example.com",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-OAuth-Groups":                    "group3",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-IP-Allow":                        "10.71.0.1/24,10.71.0.2",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-IP-Block":                        "10.10.10.10,10.0.0.0/24",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-IP-Bypass":                       "192.168.1.1",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-Response-Headers":                "X-Foo=Bar,X-Baz=Qux",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-Response-BasicAuth-Username":     "admin",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-Response-BasicAuth-Password":     "password",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-Response-BasicAuth-PasswordFile": "/path/to/passwordfile",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-Path-Allow":                      "/public",
 | 
				
			||||||
 | 
							"Tinyauth-Apps-Foo-Path-Block":                      "/private",
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Test
 | 
				
			||||||
 | 
						result, err := decoders.DecodeHeaders(test)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							t.Fatalf("Unexpected error: %v", err)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if !reflect.DeepEqual(expected, result) {
 | 
				
			||||||
 | 
							t.Fatalf("Expected %v but got %v", expected, result)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -6,13 +6,13 @@ import (
 | 
				
			|||||||
	"github.com/traefik/paerser/parser"
 | 
						"github.com/traefik/paerser/parser"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func DecodeLabels(labels map[string]string) (config.Apps, error) {
 | 
					func DecodeLabels(labels map[string]string) (config.AppConfigs, error) {
 | 
				
			||||||
	var appLabels config.Apps
 | 
						var appLabels config.AppConfigs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err := parser.Decode(labels, &appLabels, "tinyauth", "tinyauth.apps")
 | 
						err := parser.Decode(labels, &appLabels, "tinyauth", "tinyauth.apps")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return config.Apps{}, err
 | 
							return config.AppConfigs{}, err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return appLabels, nil
 | 
						return appLabels, nil
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,7 +9,7 @@ import (
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func TestDecodeLabels(t *testing.T) {
 | 
					func TestDecodeLabels(t *testing.T) {
 | 
				
			||||||
	// Variables
 | 
						// Variables
 | 
				
			||||||
	expected := config.Apps{
 | 
						expected := config.AppConfigs{
 | 
				
			||||||
		Apps: map[string]config.App{
 | 
							Apps: map[string]config.App{
 | 
				
			||||||
			"foo": {
 | 
								"foo": {
 | 
				
			||||||
				Config: config.AppConfig{
 | 
									Config: config.AppConfig{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,31 +0,0 @@
 | 
				
			|||||||
package utils
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	"os"
 | 
					 | 
				
			||||||
	"testing"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"gotest.tools/v3/assert"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestReadFile(t *testing.T) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	file, err := os.Create("/tmp/tinyauth_test_file")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	_, err = file.WriteString("file content\n")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	err = file.Close()
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	defer os.Remove("/tmp/tinyauth_test_file")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Normal case
 | 
					 | 
				
			||||||
	content, err := ReadFile("/tmp/tinyauth_test_file")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.Equal(t, "file content\n", content)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Non-existing file
 | 
					 | 
				
			||||||
	content, err = ReadFile("/tmp/non_existing_file")
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "no such file or directory")
 | 
					 | 
				
			||||||
	assert.Equal(t, "", content)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -32,3 +32,13 @@ func SanitizeHeader(header string) string {
 | 
				
			|||||||
		return -1
 | 
							return -1
 | 
				
			||||||
	}, header)
 | 
						}, header)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func NormalizeHeaders(headers http.Header) map[string]string {
 | 
				
			||||||
 | 
						var result = make(map[string]string)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for key, values := range headers {
 | 
				
			||||||
 | 
							result[key] = strings.Join(values, ",")
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return result
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,87 +0,0 @@
 | 
				
			|||||||
package utils_test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	"testing"
 | 
					 | 
				
			||||||
	"tinyauth/internal/utils"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"gotest.tools/v3/assert"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestParseHeaders(t *testing.T) {
 | 
					 | 
				
			||||||
	// Normal case
 | 
					 | 
				
			||||||
	headers := []string{
 | 
					 | 
				
			||||||
		"X-Custom-Header=Value",
 | 
					 | 
				
			||||||
		"Another-Header=AnotherValue",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	expected := map[string]string{
 | 
					 | 
				
			||||||
		"X-Custom-Header": "Value",
 | 
					 | 
				
			||||||
		"Another-Header":  "AnotherValue",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expected, utils.ParseHeaders(headers))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Case insensitivity and trimming
 | 
					 | 
				
			||||||
	headers = []string{
 | 
					 | 
				
			||||||
		"  x-custom-header =  Value  ",
 | 
					 | 
				
			||||||
		"ANOTHER-HEADER=AnotherValue",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	expected = map[string]string{
 | 
					 | 
				
			||||||
		"X-Custom-Header": "Value",
 | 
					 | 
				
			||||||
		"Another-Header":  "AnotherValue",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expected, utils.ParseHeaders(headers))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Invalid headers (missing '=', empty key/value)
 | 
					 | 
				
			||||||
	headers = []string{
 | 
					 | 
				
			||||||
		"InvalidHeader",
 | 
					 | 
				
			||||||
		"=NoKey",
 | 
					 | 
				
			||||||
		"NoValue=",
 | 
					 | 
				
			||||||
		"   =   ",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	expected = map[string]string{}
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expected, utils.ParseHeaders(headers))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Headers with unsafe characters
 | 
					 | 
				
			||||||
	headers = []string{
 | 
					 | 
				
			||||||
		"X-Custom-Header=Val\x00ue",       // Null byte
 | 
					 | 
				
			||||||
		"Another-Header=Anoth\x7FerValue", // DEL character
 | 
					 | 
				
			||||||
		"Good-Header=GoodValue",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	expected = map[string]string{
 | 
					 | 
				
			||||||
		"X-Custom-Header": "Value",
 | 
					 | 
				
			||||||
		"Another-Header":  "AnotherValue",
 | 
					 | 
				
			||||||
		"Good-Header":     "GoodValue",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expected, utils.ParseHeaders(headers))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Header with spaces in key (should be ignored)
 | 
					 | 
				
			||||||
	headers = []string{
 | 
					 | 
				
			||||||
		"X Custom Header=Value",
 | 
					 | 
				
			||||||
		"Valid-Header=ValidValue",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	expected = map[string]string{
 | 
					 | 
				
			||||||
		"Valid-Header": "ValidValue",
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	assert.DeepEqual(t, expected, utils.ParseHeaders(headers))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestSanitizeHeader(t *testing.T) {
 | 
					 | 
				
			||||||
	// Normal case
 | 
					 | 
				
			||||||
	header := "X-Custom-Header"
 | 
					 | 
				
			||||||
	expected := "X-Custom-Header"
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, utils.SanitizeHeader(header))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Header with unsafe characters
 | 
					 | 
				
			||||||
	header = "X-Cust\x00om-Hea\x7Fder" // Null byte and DEL character
 | 
					 | 
				
			||||||
	expected = "X-Custom-Header"
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, utils.SanitizeHeader(header))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Header with only unsafe characters
 | 
					 | 
				
			||||||
	header = "\x00\x01\x02\x7F"
 | 
					 | 
				
			||||||
	expected = ""
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, utils.SanitizeHeader(header))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Header with spaces and tabs (should be preserved)
 | 
					 | 
				
			||||||
	header = "X Custom\tHeader"
 | 
					 | 
				
			||||||
	expected = "X Custom\tHeader"
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, utils.SanitizeHeader(header))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -46,14 +46,10 @@ func GetBasicAuth(username string, password string) string {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func FilterIP(filter string, ip string) (bool, error) {
 | 
					func FilterIP(filter string, ip string) (bool, error) {
 | 
				
			||||||
	ipAddr := net.ParseIP(ip)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if ipAddr == nil {
 | 
					 | 
				
			||||||
		return false, errors.New("invalid IP address")
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	filter = strings.Replace(filter, "-", "/", -1)
 | 
						filter = strings.Replace(filter, "-", "/", -1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ipAddr := net.ParseIP(ip)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if strings.Contains(filter, "/") {
 | 
						if strings.Contains(filter, "/") {
 | 
				
			||||||
		_, cidr, err := net.ParseCIDR(filter)
 | 
							_, cidr, err := net.ParseCIDR(filter)
 | 
				
			||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,151 +0,0 @@
 | 
				
			|||||||
package utils_test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	"os"
 | 
					 | 
				
			||||||
	"testing"
 | 
					 | 
				
			||||||
	"tinyauth/internal/utils"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"gotest.tools/v3/assert"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestGetSecret(t *testing.T) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	file, err := os.Create("/tmp/tinyauth_test_secret")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	_, err = file.WriteString("       secret       \n")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	err = file.Close()
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	defer os.Remove("/tmp/tinyauth_test_secret")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Get from config
 | 
					 | 
				
			||||||
	assert.Equal(t, "mysecret", utils.GetSecret("mysecret", ""))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Get from file
 | 
					 | 
				
			||||||
	assert.Equal(t, "secret", utils.GetSecret("", "/tmp/tinyauth_test_secret"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Get from both (config should take precedence)
 | 
					 | 
				
			||||||
	assert.Equal(t, "mysecret", utils.GetSecret("mysecret", "/tmp/tinyauth_test_secret"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Get from none
 | 
					 | 
				
			||||||
	assert.Equal(t, "", utils.GetSecret("", ""))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Get from non-existing file
 | 
					 | 
				
			||||||
	assert.Equal(t, "", utils.GetSecret("", "/tmp/non_existing_file"))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestParseSecretFile(t *testing.T) {
 | 
					 | 
				
			||||||
	// Normal case
 | 
					 | 
				
			||||||
	content := "   mysecret   \n"
 | 
					 | 
				
			||||||
	assert.Equal(t, "mysecret", utils.ParseSecretFile(content))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Multiple lines (should take the first non-empty line)
 | 
					 | 
				
			||||||
	content = "\n\n   firstsecret   \nsecondsecret\n"
 | 
					 | 
				
			||||||
	assert.Equal(t, "firstsecret", utils.ParseSecretFile(content))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// All empty lines
 | 
					 | 
				
			||||||
	content = "\n   \n  \n"
 | 
					 | 
				
			||||||
	assert.Equal(t, "", utils.ParseSecretFile(content))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Empty content
 | 
					 | 
				
			||||||
	content = ""
 | 
					 | 
				
			||||||
	assert.Equal(t, "", utils.ParseSecretFile(content))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestGetBasicAuth(t *testing.T) {
 | 
					 | 
				
			||||||
	// Normal case
 | 
					 | 
				
			||||||
	username := "user"
 | 
					 | 
				
			||||||
	password := "pass"
 | 
					 | 
				
			||||||
	expected := "dXNlcjpwYXNz" // base64 of "user:pass"
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, utils.GetBasicAuth(username, password))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Empty username
 | 
					 | 
				
			||||||
	username = ""
 | 
					 | 
				
			||||||
	password = "pass"
 | 
					 | 
				
			||||||
	expected = "OnBhc3M=" // base64 of ":pass"
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, utils.GetBasicAuth(username, password))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Empty password
 | 
					 | 
				
			||||||
	username = "user"
 | 
					 | 
				
			||||||
	password = ""
 | 
					 | 
				
			||||||
	expected = "dXNlcjo=" // base64 of "user:"
 | 
					 | 
				
			||||||
	assert.Equal(t, expected, utils.GetBasicAuth(username, password))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestFilterIP(t *testing.T) {
 | 
					 | 
				
			||||||
	// Exact match IPv4
 | 
					 | 
				
			||||||
	ok, err := utils.FilterIP("10.10.0.1", "10.10.0.1")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.Equal(t, true, ok)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Non-match IPv4
 | 
					 | 
				
			||||||
	ok, err = utils.FilterIP("10.10.0.1", "10.10.0.2")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.Equal(t, false, ok)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// CIDR match IPv4
 | 
					 | 
				
			||||||
	ok, err = utils.FilterIP("10.10.0.0/24", "10.10.0.2")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.Equal(t, true, ok)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// CIDR match IPv4 with '-' instead of '/'
 | 
					 | 
				
			||||||
	ok, err = utils.FilterIP("10.10.10.0-24", "10.10.10.5")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.Equal(t, true, ok)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// CIDR non-match IPv4
 | 
					 | 
				
			||||||
	ok, err = utils.FilterIP("10.10.0.0/24", "10.5.0.1")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	assert.Equal(t, false, ok)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Invalid CIDR
 | 
					 | 
				
			||||||
	ok, err = utils.FilterIP("10.10.0.0/222", "10.0.0.1")
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "invalid CIDR address")
 | 
					 | 
				
			||||||
	assert.Equal(t, false, ok)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Invalid IP in filter
 | 
					 | 
				
			||||||
	ok, err = utils.FilterIP("invalid_ip", "10.5.5.5")
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "invalid IP address in filter")
 | 
					 | 
				
			||||||
	assert.Equal(t, false, ok)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Invalid IP to check
 | 
					 | 
				
			||||||
	ok, err = utils.FilterIP("10.10.10.10", "invalid_ip")
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "invalid IP address")
 | 
					 | 
				
			||||||
	assert.Equal(t, false, ok)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestCheckFilter(t *testing.T) {
 | 
					 | 
				
			||||||
	// Empty filter
 | 
					 | 
				
			||||||
	assert.Equal(t, true, utils.CheckFilter("", "anystring"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Exact match
 | 
					 | 
				
			||||||
	assert.Equal(t, true, utils.CheckFilter("hello", "hello"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Regex match
 | 
					 | 
				
			||||||
	assert.Equal(t, true, utils.CheckFilter("/^h.*o$/", "hello"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Invalid regex
 | 
					 | 
				
			||||||
	assert.Equal(t, false, utils.CheckFilter("/[unclosed", "test"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Comma-separated values
 | 
					 | 
				
			||||||
	assert.Equal(t, true, utils.CheckFilter("apple, banana, cherry", "banana"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// No match
 | 
					 | 
				
			||||||
	assert.Equal(t, false, utils.CheckFilter("apple, banana, cherry", "grape"))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestGenerateIdentifier(t *testing.T) {
 | 
					 | 
				
			||||||
	// Consistent output for same input
 | 
					 | 
				
			||||||
	id1 := utils.GenerateIdentifier("teststring")
 | 
					 | 
				
			||||||
	id2 := utils.GenerateIdentifier("teststring")
 | 
					 | 
				
			||||||
	assert.Equal(t, id1, id2)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Different output for different input
 | 
					 | 
				
			||||||
	id3 := utils.GenerateIdentifier("differentstring")
 | 
					 | 
				
			||||||
	assert.Assert(t, id1 != id3)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Check length (should be 8 characters from first segment of UUID)
 | 
					 | 
				
			||||||
	assert.Equal(t, 8, len(id1))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,50 +0,0 @@
 | 
				
			|||||||
package utils_test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	"testing"
 | 
					 | 
				
			||||||
	"tinyauth/internal/utils"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"gotest.tools/v3/assert"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestCapitalize(t *testing.T) {
 | 
					 | 
				
			||||||
	// Test empty string
 | 
					 | 
				
			||||||
	assert.Equal(t, "", utils.Capitalize(""))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test single character
 | 
					 | 
				
			||||||
	assert.Equal(t, "A", utils.Capitalize("a"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test multiple characters
 | 
					 | 
				
			||||||
	assert.Equal(t, "Hello", utils.Capitalize("hello"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test already capitalized
 | 
					 | 
				
			||||||
	assert.Equal(t, "World", utils.Capitalize("World"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test non-alphabetic first character
 | 
					 | 
				
			||||||
	assert.Equal(t, "1number", utils.Capitalize("1number"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test Unicode characters
 | 
					 | 
				
			||||||
	assert.Equal(t, "Γειά", utils.Capitalize("γειά"))
 | 
					 | 
				
			||||||
	assert.Equal(t, "Привет", utils.Capitalize("привет"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestCoalesceToString(t *testing.T) {
 | 
					 | 
				
			||||||
	// Test with []any containing strings
 | 
					 | 
				
			||||||
	assert.Equal(t, "a,b,c", utils.CoalesceToString([]any{"a", "b", "c"}))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test with []any containing mixed types
 | 
					 | 
				
			||||||
	assert.Equal(t, "a,c", utils.CoalesceToString([]any{"a", 1, "c", true}))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test with []any containing no strings
 | 
					 | 
				
			||||||
	assert.Equal(t, "", utils.CoalesceToString([]any{1, 2, 3}))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test with string input
 | 
					 | 
				
			||||||
	assert.Equal(t, "hello", utils.CoalesceToString("hello"))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test with non-string, non-[]any input
 | 
					 | 
				
			||||||
	assert.Equal(t, "", utils.CoalesceToString(123))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test with nil input
 | 
					 | 
				
			||||||
	assert.Equal(t, "", utils.CoalesceToString(nil))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,163 +0,0 @@
 | 
				
			|||||||
package utils_test
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	"os"
 | 
					 | 
				
			||||||
	"testing"
 | 
					 | 
				
			||||||
	"tinyauth/internal/utils"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	"gotest.tools/v3/assert"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestGetUsers(t *testing.T) {
 | 
					 | 
				
			||||||
	// Setup
 | 
					 | 
				
			||||||
	file, err := os.Create("/tmp/tinyauth_users_test.txt")
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	_, err = file.WriteString("      user1:$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G        \n         user2:$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G                    ") // Spacing is on purpose
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	err = file.Close()
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
	defer os.Remove("/tmp/tinyauth_users_test.txt")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test file
 | 
					 | 
				
			||||||
	users, err := utils.GetUsers("", "/tmp/tinyauth_users_test.txt")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 2, len(users))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "user1", users[0].Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", users[0].Password)
 | 
					 | 
				
			||||||
	assert.Equal(t, "user2", users[1].Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", users[1].Password)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test config
 | 
					 | 
				
			||||||
	users, err = utils.GetUsers("user3:$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G,user4:$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", "")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 2, len(users))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "user3", users[0].Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", users[0].Password)
 | 
					 | 
				
			||||||
	assert.Equal(t, "user4", users[1].Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", users[1].Password)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test both
 | 
					 | 
				
			||||||
	users, err = utils.GetUsers("user5:$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", "/tmp/tinyauth_users_test.txt")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 3, len(users))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "user5", users[0].Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", users[0].Password)
 | 
					 | 
				
			||||||
	assert.Equal(t, "user1", users[1].Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", users[1].Password)
 | 
					 | 
				
			||||||
	assert.Equal(t, "user2", users[2].Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", users[2].Password)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test empty
 | 
					 | 
				
			||||||
	users, err = utils.GetUsers("", "")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 0, len(users))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Test non-existent file
 | 
					 | 
				
			||||||
	users, err = utils.GetUsers("", "/tmp/non_existent_file.txt")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "no such file or directory")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 0, len(users))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestParseUsers(t *testing.T) {
 | 
					 | 
				
			||||||
	// Valid users
 | 
					 | 
				
			||||||
	users, err := utils.ParseUsers("user1:$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G,user2:$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G:ABCDEF") // user2 has TOTP
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 2, len(users))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "user1", users[0].Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", users[0].Password)
 | 
					 | 
				
			||||||
	assert.Equal(t, "", users[0].TotpSecret)
 | 
					 | 
				
			||||||
	assert.Equal(t, "user2", users[1].Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", users[1].Password)
 | 
					 | 
				
			||||||
	assert.Equal(t, "ABCDEF", users[1].TotpSecret)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Valid weirdly spaced users
 | 
					 | 
				
			||||||
	users, err = utils.ParseUsers("      user1:$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G        ,         user2:$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G:ABCDEF                    ") // Spacing is on purpose
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, 2, len(users))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "user1", users[0].Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", users[0].Password)
 | 
					 | 
				
			||||||
	assert.Equal(t, "", users[0].TotpSecret)
 | 
					 | 
				
			||||||
	assert.Equal(t, "user2", users[1].Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", users[1].Password)
 | 
					 | 
				
			||||||
	assert.Equal(t, "ABCDEF", users[1].TotpSecret)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func TestParseUser(t *testing.T) {
 | 
					 | 
				
			||||||
	// Valid user without TOTP
 | 
					 | 
				
			||||||
	user, err := utils.ParseUser("user1:$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "user1", user.Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", user.Password)
 | 
					 | 
				
			||||||
	assert.Equal(t, "", user.TotpSecret)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Valid user with TOTP
 | 
					 | 
				
			||||||
	user, err = utils.ParseUser("user2:$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G:ABCDEF")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "user2", user.Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "$2a$10$Mz5xhkfSJUtPWkzCd/TdaePh9CaXc5QcGII5wIMPLSR46eTwma30G", user.Password)
 | 
					 | 
				
			||||||
	assert.Equal(t, "ABCDEF", user.TotpSecret)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Valid user with $$ in password
 | 
					 | 
				
			||||||
	user, err = utils.ParseUser("user3:pa$$word123")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "user3", user.Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "pa$word123", user.Password)
 | 
					 | 
				
			||||||
	assert.Equal(t, "", user.TotpSecret)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// User with spaces
 | 
					 | 
				
			||||||
	user, err = utils.ParseUser("   user4   :   password123   :   TOTPSECRET   ")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.NilError(t, err)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	assert.Equal(t, "user4", user.Username)
 | 
					 | 
				
			||||||
	assert.Equal(t, "password123", user.Password)
 | 
					 | 
				
			||||||
	assert.Equal(t, "TOTPSECRET", user.TotpSecret)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	// Invalid users
 | 
					 | 
				
			||||||
	_, err = utils.ParseUser("user1") // Missing password
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "invalid user format")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	_, err = utils.ParseUser("user1:")
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "invalid user format")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	_, err = utils.ParseUser(":password123")
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "invalid user format")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	_, err = utils.ParseUser("user1:password123:ABC:EXTRA") // Too many parts
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "invalid user format")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	_, err = utils.ParseUser("user1::ABC")
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "invalid user format")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	_, err = utils.ParseUser(":password123:ABC")
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "invalid user format")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	_, err = utils.ParseUser("   :   :   ")
 | 
					 | 
				
			||||||
	assert.ErrorContains(t, err, "invalid user format")
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user