cross-seed 7.0.0-1 → 7.0.0-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Result.d.ts +27 -0
- package/dist/Result.js +64 -0
- package/dist/Result.js.map +1 -0
- package/dist/action.d.ts +34 -0
- package/dist/action.js +694 -0
- package/dist/action.js.map +1 -0
- package/dist/arr.d.ts +31 -0
- package/dist/arr.js +267 -0
- package/dist/arr.js.map +1 -0
- package/dist/auth.d.ts +3 -0
- package/dist/auth.js +28 -0
- package/dist/auth.js.map +1 -0
- package/dist/clients/Deluge.d.ts +153 -0
- package/dist/clients/Deluge.js +698 -0
- package/dist/clients/Deluge.js.map +1 -0
- package/dist/clients/QBittorrent.d.ts +218 -0
- package/dist/clients/QBittorrent.js +785 -0
- package/dist/clients/QBittorrent.js.map +1 -0
- package/dist/clients/RTorrent.d.ts +43 -0
- package/dist/clients/RTorrent.js +657 -0
- package/dist/clients/RTorrent.js.map +1 -0
- package/dist/clients/TorrentClient.d.ts +108 -0
- package/dist/clients/TorrentClient.js +341 -0
- package/dist/clients/TorrentClient.js.map +1 -0
- package/dist/clients/Transmission.d.ts +43 -0
- package/dist/clients/Transmission.js +404 -0
- package/dist/clients/Transmission.js.map +1 -0
- package/dist/cmd.d.ts +2 -0
- package/dist/cmd.js +128 -0
- package/dist/cmd.js.map +1 -0
- package/dist/configSchema.d.ts +1 -0
- package/dist/configSchema.js +2 -0
- package/dist/configSchema.js.map +1 -0
- package/dist/configuration.d.ts +63 -0
- package/dist/configuration.js +321 -0
- package/dist/configuration.js.map +1 -0
- package/dist/constants.d.ts +108 -0
- package/dist/constants.js +251 -0
- package/dist/constants.js.map +1 -0
- package/dist/dataFiles.d.ts +8 -0
- package/dist/dataFiles.js +223 -0
- package/dist/dataFiles.js.map +1 -0
- package/dist/db.d.ts +3 -0
- package/dist/db.js +216 -0
- package/dist/db.js.map +1 -0
- package/dist/dbConfig.d.ts +4 -0
- package/dist/dbConfig.js +67 -0
- package/dist/dbConfig.js.map +1 -0
- package/dist/decide.d.ts +25 -0
- package/dist/decide.js +553 -0
- package/dist/decide.js.map +1 -0
- package/dist/diff.d.ts +1 -0
- package/dist/diff.js +24 -0
- package/dist/diff.js.map +1 -0
- package/dist/errors.d.ts +3 -0
- package/dist/errors.js +7 -0
- package/dist/errors.js.map +1 -0
- package/dist/indexers.d.ts +105 -0
- package/dist/indexers.js +248 -0
- package/dist/indexers.js.map +1 -0
- package/dist/inject.d.ts +2 -0
- package/dist/inject.js +594 -0
- package/dist/inject.js.map +1 -0
- package/dist/jobs.d.ts +29 -0
- package/dist/jobs.js +151 -0
- package/dist/jobs.js.map +1 -0
- package/dist/logger.d.ts +29 -0
- package/dist/logger.js +157 -0
- package/dist/logger.js.map +1 -0
- package/dist/migrations/00-initialSchema.d.ts +9 -0
- package/dist/migrations/00-initialSchema.js +30 -0
- package/dist/migrations/00-initialSchema.js.map +1 -0
- package/dist/migrations/01-jobs.d.ts +9 -0
- package/dist/migrations/01-jobs.js +12 -0
- package/dist/migrations/01-jobs.js.map +1 -0
- package/dist/migrations/02-timestamps.d.ts +9 -0
- package/dist/migrations/02-timestamps.js +21 -0
- package/dist/migrations/02-timestamps.js.map +1 -0
- package/dist/migrations/03-rateLimits.d.ts +9 -0
- package/dist/migrations/03-rateLimits.js +14 -0
- package/dist/migrations/03-rateLimits.js.map +1 -0
- package/dist/migrations/04-auth.d.ts +9 -0
- package/dist/migrations/04-auth.js +13 -0
- package/dist/migrations/04-auth.js.map +1 -0
- package/dist/migrations/05-caps.d.ts +9 -0
- package/dist/migrations/05-caps.js +16 -0
- package/dist/migrations/05-caps.js.map +1 -0
- package/dist/migrations/06-uniqueDecisions.d.ts +9 -0
- package/dist/migrations/06-uniqueDecisions.js +29 -0
- package/dist/migrations/06-uniqueDecisions.js.map +1 -0
- package/dist/migrations/07-limits.d.ts +9 -0
- package/dist/migrations/07-limits.js +12 -0
- package/dist/migrations/07-limits.js.map +1 -0
- package/dist/migrations/08-rss.d.ts +9 -0
- package/dist/migrations/08-rss.js +15 -0
- package/dist/migrations/08-rss.js.map +1 -0
- package/dist/migrations/09-clientAndDataSearchees.d.ts +9 -0
- package/dist/migrations/09-clientAndDataSearchees.js +34 -0
- package/dist/migrations/09-clientAndDataSearchees.js.map +1 -0
- package/dist/migrations/10-indexerNameAudioBookCaps.d.ts +9 -0
- package/dist/migrations/10-indexerNameAudioBookCaps.js +18 -0
- package/dist/migrations/10-indexerNameAudioBookCaps.js.map +1 -0
- package/dist/migrations/11-trackers.d.ts +9 -0
- package/dist/migrations/11-trackers.js +38 -0
- package/dist/migrations/11-trackers.js.map +1 -0
- package/dist/migrations/12-user-auth.d.ts +9 -0
- package/dist/migrations/12-user-auth.js +22 -0
- package/dist/migrations/12-user-auth.js.map +1 -0
- package/dist/migrations/13-settings.d.ts +9 -0
- package/dist/migrations/13-settings.js +23 -0
- package/dist/migrations/13-settings.js.map +1 -0
- package/dist/migrations/14-indexer-enabled-flag.d.ts +9 -0
- package/dist/migrations/14-indexer-enabled-flag.js +12 -0
- package/dist/migrations/14-indexer-enabled-flag.js.map +1 -0
- package/dist/migrations/15-remove-url-unique-constraint.d.ts +9 -0
- package/dist/migrations/15-remove-url-unique-constraint.js +14 -0
- package/dist/migrations/15-remove-url-unique-constraint.js.map +1 -0
- package/dist/migrations/16-prune-inactive-indexers.d.ts +9 -0
- package/dist/migrations/16-prune-inactive-indexers.js +17 -0
- package/dist/migrations/16-prune-inactive-indexers.js.map +1 -0
- package/dist/migrations/migrations.d.ts +13 -0
- package/dist/migrations/migrations.js +41 -0
- package/dist/migrations/migrations.js.map +1 -0
- package/dist/parseTorrent.d.ts +53 -0
- package/dist/parseTorrent.js +128 -0
- package/dist/parseTorrent.js.map +1 -0
- package/dist/pipeline.d.ts +41 -0
- package/dist/pipeline.js +574 -0
- package/dist/pipeline.js.map +1 -0
- package/dist/preFilter.d.ts +25 -0
- package/dist/preFilter.js +250 -0
- package/dist/preFilter.js.map +1 -0
- package/dist/problems/linking.d.ts +2 -0
- package/dist/problems/linking.js +80 -0
- package/dist/problems/linking.js.map +1 -0
- package/dist/problems/path.d.ts +22 -0
- package/dist/problems/path.js +96 -0
- package/dist/problems/path.js.map +1 -0
- package/dist/problems.d.ts +13 -0
- package/dist/problems.js +48 -0
- package/dist/problems.js.map +1 -0
- package/dist/pushNotifier.d.ts +19 -0
- package/dist/pushNotifier.js +137 -0
- package/dist/pushNotifier.js.map +1 -0
- package/dist/routes/baseApi.d.ts +2 -0
- package/dist/routes/baseApi.js +354 -0
- package/dist/routes/baseApi.js.map +1 -0
- package/dist/routes/indexerApi.d.ts +6 -0
- package/dist/routes/indexerApi.js +165 -0
- package/dist/routes/indexerApi.js.map +1 -0
- package/dist/routes/staticFrontendPlugin.d.ts +4 -0
- package/dist/routes/staticFrontendPlugin.js +63 -0
- package/dist/routes/staticFrontendPlugin.js.map +1 -0
- package/dist/runtimeConfig.d.ts +6 -0
- package/dist/runtimeConfig.js +27 -0
- package/dist/runtimeConfig.js.map +1 -0
- package/dist/searchee.d.ts +108 -0
- package/dist/searchee.js +689 -0
- package/dist/searchee.js.map +1 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +65 -0
- package/dist/server.js.map +1 -0
- package/dist/services/indexerService.d.ts +96 -0
- package/dist/services/indexerService.js +287 -0
- package/dist/services/indexerService.js.map +1 -0
- package/dist/sessionCookies.d.ts +5 -0
- package/dist/sessionCookies.js +27 -0
- package/dist/sessionCookies.js.map +1 -0
- package/dist/startup.d.ts +25 -0
- package/dist/startup.js +157 -0
- package/dist/startup.js.map +1 -0
- package/dist/torrent.d.ts +69 -0
- package/dist/torrent.js +641 -0
- package/dist/torrent.js.map +1 -0
- package/dist/torznab.d.ts +60 -0
- package/dist/torznab.js +711 -0
- package/dist/torznab.js.map +1 -0
- package/dist/trpc/fastifyAdapter.d.ts +2 -0
- package/dist/trpc/fastifyAdapter.js +9 -0
- package/dist/trpc/fastifyAdapter.js.map +1 -0
- package/dist/trpc/index.d.ts +49 -0
- package/dist/trpc/index.js +53 -0
- package/dist/trpc/index.js.map +1 -0
- package/dist/trpc/routers/auth.d.ts +43 -0
- package/dist/trpc/routers/auth.js +116 -0
- package/dist/trpc/routers/auth.js.map +1 -0
- package/dist/trpc/routers/clients.d.ts +21 -0
- package/dist/trpc/routers/clients.js +65 -0
- package/dist/trpc/routers/clients.js.map +1 -0
- package/dist/trpc/routers/health.d.ts +14 -0
- package/dist/trpc/routers/health.js +20 -0
- package/dist/trpc/routers/health.js.map +1 -0
- package/dist/trpc/routers/index.d.ts +391 -0
- package/dist/trpc/routers/index.js +23 -0
- package/dist/trpc/routers/index.js.map +1 -0
- package/dist/trpc/routers/indexers.d.ts +75 -0
- package/dist/trpc/routers/indexers.js +79 -0
- package/dist/trpc/routers/indexers.js.map +1 -0
- package/dist/trpc/routers/jobs.d.ts +33 -0
- package/dist/trpc/routers/jobs.js +84 -0
- package/dist/trpc/routers/jobs.js.map +1 -0
- package/dist/trpc/routers/logs.d.ts +27 -0
- package/dist/trpc/routers/logs.js +91 -0
- package/dist/trpc/routers/logs.js.map +1 -0
- package/dist/trpc/routers/searchees.d.ts +51 -0
- package/dist/trpc/routers/searchees.js +156 -0
- package/dist/trpc/routers/searchees.js.map +1 -0
- package/dist/trpc/routers/settings.d.ts +83 -0
- package/dist/trpc/routers/settings.js +92 -0
- package/dist/trpc/routers/settings.js.map +1 -0
- package/dist/trpc/routers/stats.d.ts +42 -0
- package/dist/trpc/routers/stats.js +102 -0
- package/dist/trpc/routers/stats.js.map +1 -0
- package/dist/userAuth.d.ts +21 -0
- package/dist/userAuth.js +86 -0
- package/dist/userAuth.js.map +1 -0
- package/dist/utils/authUtils.d.ts +10 -0
- package/dist/utils/authUtils.js +24 -0
- package/dist/utils/authUtils.js.map +1 -0
- package/dist/utils/logWatcher.d.ts +28 -0
- package/dist/utils/logWatcher.js +218 -0
- package/dist/utils/logWatcher.js.map +1 -0
- package/dist/utils/object.d.ts +1 -0
- package/dist/utils/object.js +4 -0
- package/dist/utils/object.js.map +1 -0
- package/dist/utils.d.ts +175 -0
- package/dist/utils.js +660 -0
- package/dist/utils.js.map +1 -0
- package/package.json +17 -58
- package/LICENSE +0 -201
- package/README.md +0 -33
- package/dist/webui/assets/FieldInfo-Bxj_j8SJ.js +0 -1
- package/dist/webui/assets/Page-C3rteCZt.js +0 -1
- package/dist/webui/assets/array-field-DVSC6nHP.js +0 -1
- package/dist/webui/assets/badge-DTZMtS0e.js +0 -1
- package/dist/webui/assets/check-Bu3ldi63.js +0 -1
- package/dist/webui/assets/chevron-down-CRy8M0kJ.js +0 -1
- package/dist/webui/assets/clients-CW8oEZoQ.js +0 -1
- package/dist/webui/assets/connect-YBNsnjWT.js +0 -1
- package/dist/webui/assets/debug-mz8-WYZj.js +0 -1
- package/dist/webui/assets/directories-BSK28RgR.js +0 -1
- package/dist/webui/assets/duration-field-C6xoSlJg.js +0 -1
- package/dist/webui/assets/general-lJJxZhH7.js +0 -1
- package/dist/webui/assets/health-CXbsVrie.js +0 -1
- package/dist/webui/assets/index-Bi48hI2z.js +0 -54
- package/dist/webui/assets/index-C-Ul7GNg.css +0 -1
- package/dist/webui/assets/index-C2cH1Gst.js +0 -1
- package/dist/webui/assets/index-Cc5bDmJr.js +0 -1
- package/dist/webui/assets/jobs-CxmNab9w.js +0 -1
- package/dist/webui/assets/library-vaj2W8sE.js +0 -1
- package/dist/webui/assets/loader-circle-M0gu1gZ-.js +0 -1
- package/dist/webui/assets/logs-Cu9RyKS0.js +0 -1
- package/dist/webui/assets/search-2R5sIdT8.js +0 -1
- package/dist/webui/assets/select-field-BCqNLDrJ.js +0 -1
- package/dist/webui/assets/select-zHgqMzLj.js +0 -1
- package/dist/webui/assets/settings-CMYjpTbZ.js +0 -1
- package/dist/webui/assets/submit-button-BtcnyggQ.js +0 -1
- package/dist/webui/assets/switch-G0W3uJVN.js +0 -1
- package/dist/webui/assets/switch-field-IBd9ORNq.js +0 -1
- package/dist/webui/assets/table-DvgJU7Gh.js +0 -1
- package/dist/webui/assets/test-tube-BIwmoM45.js +0 -1
- package/dist/webui/assets/text-field-DruSbGhy.js +0 -1
- package/dist/webui/assets/time-BSMZjmyW.js +0 -1
- package/dist/webui/assets/trackers-D-OpAe63.js +0 -7
- package/dist/webui/assets/use-form-validation-context-BkAfWAh0.js +0 -1
- package/dist/webui/assets/use-settings-form-submit-CDRh-E9U.js +0 -2
- package/dist/webui/assets/useQuery-A4Hv_4uX.js +0 -1
- package/dist/webui/index.html +0 -13
- package/node_modules/@cross-seed/shared/dist/configSchema.d.ts +0 -261
- package/node_modules/@cross-seed/shared/dist/configSchema.d.ts.map +0 -1
- package/node_modules/@cross-seed/shared/dist/configSchema.js +0 -53
- package/node_modules/@cross-seed/shared/dist/configSchema.js.map +0 -1
- package/node_modules/@cross-seed/shared/dist/constants.d.ts +0 -122
- package/node_modules/@cross-seed/shared/dist/constants.d.ts.map +0 -1
- package/node_modules/@cross-seed/shared/dist/constants.js +0 -127
- package/node_modules/@cross-seed/shared/dist/constants.js.map +0 -1
- package/node_modules/@cross-seed/shared/dist/tsconfig.tsbuildinfo +0 -1
- package/node_modules/@cross-seed/shared/dist/utils.d.ts +0 -6
- package/node_modules/@cross-seed/shared/dist/utils.d.ts.map +0 -1
- package/node_modules/@cross-seed/shared/dist/utils.js +0 -9
- package/node_modules/@cross-seed/shared/dist/utils.js.map +0 -1
- package/node_modules/@cross-seed/shared/package.json +0 -22
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EACN,MAAM,EACN,SAAS,EACT,OAAO,EACP,IAAI,EACJ,MAAM,EACN,SAAS,GACT,MAAM,aAAa,CAAC;AACrB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACN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|
"name": "cross-seed",
|
|
3
|
-
"version": "7.0.0-
|
|
3
|
+
"version": "7.0.0-3",
|
|
4
4
|
"description": "Fully-automatic cross-seeding with Torznab",
|
|
5
|
-
"
|
|
6
|
-
".",
|
|
7
|
-
"packages/shared",
|
|
8
|
-
"packages/webui",
|
|
9
|
-
"packages/api-types"
|
|
10
|
-
],
|
|
11
|
-
"scripts": {
|
|
12
|
-
"test": "vitest",
|
|
13
|
-
"coverage": "vitest run --coverage",
|
|
14
|
-
"build": "npm run build:backend",
|
|
15
|
-
"build:backend": "tsc -b tsconfig.json",
|
|
16
|
-
"build:webui": "cd packages/webui && npm run build",
|
|
17
|
-
"copy:webui": "rimraf dist/webui && mkdir -p dist && cp -r packages/webui/dist dist/webui",
|
|
18
|
-
"build:api-types": "tsc -b packages/api-types/tsconfig.json",
|
|
19
|
-
"build:all": "npm run build:backend && npm run build:api-types && npm run build:webui && npm run copy:webui",
|
|
20
|
-
"watch": "tsc -b --watch --preserveWatchOutput",
|
|
21
|
-
"dev": "concurrently --names \"TS,BE,FE\" --prefix-colors \"blue,green,magenta\" \"npm run watch\" \"npm run dev:backend\" \"npm run dev:frontend\"",
|
|
22
|
-
"dev:backend": "node --watch dist/cmd.js daemon",
|
|
23
|
-
"dev:frontend": "cd packages/webui && npm run dev",
|
|
24
|
-
"prepare": "node -e \"const fs=require('fs'); if(!fs.existsSync('.git')) process.exit(0); require('child_process').execSync('husky install',{stdio:'inherit'})\"",
|
|
25
|
-
"prepublishOnly": "rimraf dist && npm run build:all && husky install",
|
|
26
|
-
"lint": "concurrently --names \"Prettier,ESLint\" \"prettier --check '{src,tests}/{**/*,*}.{js,ts,cjs,mjs}'\" \"eslint '{src,tests}/{**/*,*}.{js,ts,cjs,mjs}'\"",
|
|
27
|
-
"typecheck": "tsc -b tsconfig.json && tsc -p tsconfig.tests.json",
|
|
28
|
-
"format": "prettier --write '{src,tests}/{**/*,*}.{js,ts,cjs,mjs}' package.json"
|
|
29
|
-
},
|
|
5
|
+
"type": "module",
|
|
30
6
|
"bin": {
|
|
31
7
|
"cross-seed": "dist/cmd.js"
|
|
32
8
|
},
|
|
@@ -36,10 +12,21 @@
|
|
|
36
12
|
"files": [
|
|
37
13
|
"dist/"
|
|
38
14
|
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "vitest",
|
|
17
|
+
"coverage": "vitest run --coverage",
|
|
18
|
+
"build": "tsc -b tsconfig.json",
|
|
19
|
+
"watch": "tsc -b --watch --preserveWatchOutput",
|
|
20
|
+
"dev": "node --watch dist/cmd.js daemon",
|
|
21
|
+
"prepublishOnly": "rimraf dist tsconfig.tsbuildinfo && npm -C ../.. run build",
|
|
22
|
+
"lint": "concurrently --names \"Prettier,ESLint\" \"prettier --check '{src,tests}/{**/*,*}.{js,ts,cjs,mjs}'\" \"eslint '{src,tests}/{**/*,*}.{js,ts,cjs,mjs}'\"",
|
|
23
|
+
"typecheck": "tsc -b tsconfig.json && tsc -p tsconfig.tests.json",
|
|
24
|
+
"format": "prettier --write '{src,tests}/{**/*,*}.{js,ts,cjs,mjs}' package.json"
|
|
25
|
+
},
|
|
39
26
|
"bundledDependencies": [
|
|
40
|
-
"@cross-seed/shared"
|
|
27
|
+
"@cross-seed/shared",
|
|
28
|
+
"webui"
|
|
41
29
|
],
|
|
42
|
-
"type": "module",
|
|
43
30
|
"repository": {
|
|
44
31
|
"type": "git",
|
|
45
32
|
"url": "git://github.com/cross-seed/cross-seed.git"
|
|
@@ -47,7 +34,7 @@
|
|
|
47
34
|
"author": "Michael Goodnow",
|
|
48
35
|
"license": "Apache-2.0",
|
|
49
36
|
"dependencies": {
|
|
50
|
-
"@cross-seed/shared": "file
|
|
37
|
+
"@cross-seed/shared": "file:../shared",
|
|
51
38
|
"@fastify/cookie": "^11.0.2",
|
|
52
39
|
"@trpc/server": "^11.1.2",
|
|
53
40
|
"bcryptjs": "^3.0.2",
|
|
@@ -62,39 +49,11 @@
|
|
|
62
49
|
"strip-ansi": "^7.1.0",
|
|
63
50
|
"winston": "^3.3.3",
|
|
64
51
|
"winston-daily-rotate-file": "^4.5.5",
|
|
52
|
+
"webui": "file:../webui",
|
|
65
53
|
"xml2js": "^0.5.0",
|
|
66
54
|
"xmlrpc": "^1.3.2",
|
|
67
55
|
"zod": "^3.22.4"
|
|
68
56
|
},
|
|
69
|
-
"devDependencies": {
|
|
70
|
-
"@types/bcryptjs": "^2.4.6",
|
|
71
|
-
"@types/bencode": "^2.0.1",
|
|
72
|
-
"@types/ms": "^0.7.34",
|
|
73
|
-
"@types/node": "^24.10.1",
|
|
74
|
-
"@types/xml2js": "^0.4.9",
|
|
75
|
-
"@types/xmlrpc": "^1.3.6",
|
|
76
|
-
"@typescript-eslint/eslint-plugin": "^6.16.0",
|
|
77
|
-
"@typescript-eslint/parser": "^6.16.0",
|
|
78
|
-
"@vitest/coverage-v8": "^3.1.1",
|
|
79
|
-
"concurrently": "^9.1.2",
|
|
80
|
-
"eslint": "^8.56.0",
|
|
81
|
-
"husky": "^7.0.0",
|
|
82
|
-
"lint-staged": "^12.1.4",
|
|
83
|
-
"prettier": "^3.2.5",
|
|
84
|
-
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
85
|
-
"rimraf": "^3.0.2",
|
|
86
|
-
"typescript": "^5.6.2",
|
|
87
|
-
"vitest": "^3.1.1"
|
|
88
|
-
},
|
|
89
|
-
"prettier": {
|
|
90
|
-
"tabWidth": 4,
|
|
91
|
-
"useTabs": true,
|
|
92
|
-
"proseWrap": "always"
|
|
93
|
-
},
|
|
94
|
-
"lint-staged": {
|
|
95
|
-
"*.{js,ts}": "eslint --cache",
|
|
96
|
-
"*.{js,json,ts,css,md}": "prettier --write"
|
|
97
|
-
},
|
|
98
57
|
"np": {
|
|
99
58
|
"yarn": false
|
|
100
59
|
}
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
package/README.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# cross-seed: Fully-automatic cross-seeding
|
|
2
|
-
|
|
3
|
-
`cross-seed` automatically finds and downloads torrents that are "cross seeds"
|
|
4
|
-
existing across your other trackers, all based on your existing torrents and/or
|
|
5
|
-
data. It is designed to match comprehensively while minimizing manual
|
|
6
|
-
intervention, but it's also highly configurable to match your preferences.
|
|
7
|
-
|
|
8
|
-
## Torrent Client Integration
|
|
9
|
-
|
|
10
|
-
`cross-seed` can inject new torrents it finds directly into your torrent client.
|
|
11
|
-
|
|
12
|
-
If you use another client we do not currently support, and would like to help
|
|
13
|
-
integrate it into `cross-seed`,
|
|
14
|
-
[please open an issue here on GitHub to discuss it with us](https://github.com/cross-seed/cross-seed/issues).
|
|
15
|
-
|
|
16
|
-
## Requirements
|
|
17
|
-
|
|
18
|
-
- [Node >= 24](https://nodejs.org/en/download)
|
|
19
|
-
- Indexers that support Torznab or an tracker/indexer manager such as
|
|
20
|
-
Prowlarr/Jackett (Prowlarr is preferred)
|
|
21
|
-
|
|
22
|
-
## Tutorial
|
|
23
|
-
|
|
24
|
-
Head on over to [cross-seed.org](https://www.cross-seed.org) to get started.
|
|
25
|
-
|
|
26
|
-
If you are migrating version to the latest available, please read
|
|
27
|
-
[the v6 migration guide](https://www.cross-seed.org/docs/v6-migration).
|
|
28
|
-
|
|
29
|
-
## Troubleshooting
|
|
30
|
-
|
|
31
|
-
Feel free to
|
|
32
|
-
[start a discussion](https://github.com/cross-seed/cross-seed/discussions/new),
|
|
33
|
-
or reach out on [Discord](https://discord.gg/jpbUFzS5Wb).
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./index-Bi48hI2z.js";const l=({fieldMeta:r})=>r&&r.errors&&r.errors.length>0?s.jsx(s.Fragment,{children:s.jsx("span",{className:"text-sm text-red-600",children:r.errors.map((n,t)=>typeof n=="object"&&n!==null?s.jsx("span",{children:n?.message||JSON.stringify(n)},t):s.jsx("span",{children:n},t))})}):null;export{l as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Y as Ct,c as xe,r as s,j as a,Z as re,b as ae,$ as L,f as j,a0 as ve,d as A,g as h,e as Ne,a1 as Me,a2 as Te,a3 as _t,a4 as Rt,P as se,a5 as bt,a6 as It,a7 as yt,a8 as St,a9 as Et,aa as Pt,ab as Dt,ac as Nt,ad as Tt,i as O,ae as jt,B as At,af as Ot,S as kt}from"./index-Bi48hI2z.js";function Ft(e){return Ct({select:t=>t.location})}const Lt=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Gt=xe("ChevronRight",Lt);const Kt=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],$t=xe("Moon",Kt);const Bt=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Ut=xe("Sun",Bt);function Pe(e){const t=Vt(e),n=s.forwardRef((o,r)=>{const{children:c,...i}=o,u=s.Children.toArray(c),p=u.find(Yt);if(p){const f=p.props.children,d=u.map(l=>l===p?s.Children.count(f)>1?s.Children.only(null):s.isValidElement(f)?f.props.children:null:l);return a.jsx(t,{...i,ref:r,children:s.isValidElement(f)?s.cloneElement(f,void 0,d):null})}return a.jsx(t,{...i,ref:r,children:c})});return n.displayName=`${e}.Slot`,n}function Vt(e){const t=s.forwardRef((n,o)=>{const{children:r,...c}=n;if(s.isValidElement(r)){const i=Ht(r),u=zt(c,r.props);return r.type!==s.Fragment&&(u.ref=o?re(o,i):i),s.cloneElement(r,u)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Wt=Symbol("radix.slottable");function Yt(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wt}function zt(e,t){const n={...t};for(const o in t){const r=e[o],c=t[o];/^on[A-Z]/.test(o)?r&&c?n[o]=(...u)=>{const p=c(...u);return r(...u),p}:r&&(n[o]=r):o==="style"?n[o]={...r,...c}:o==="className"&&(n[o]=[r,c].filter(Boolean).join(" "))}return{...e,...n}}function Ht(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function je(e){const t=e+"CollectionProvider",[n,o]=ae(t),[r,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=_=>{const{scope:g,children:M}=_,y=L.useRef(null),w=L.useRef(new Map).current;return a.jsx(r,{scope:g,itemMap:w,collectionRef:y,children:M})};i.displayName=t;const u=e+"CollectionSlot",p=Pe(u),f=L.forwardRef((_,g)=>{const{scope:M,children:y}=_,w=c(u,M),R=j(g,w.collectionRef);return a.jsx(p,{ref:R,children:y})});f.displayName=u;const d=e+"CollectionItemSlot",l="data-radix-collection-item",v=Pe(d),C=L.forwardRef((_,g)=>{const{scope:M,children:y,...w}=_,R=L.useRef(null),T=j(g,R),P=c(d,M);return L.useEffect(()=>(P.itemMap.set(R,{ref:R,...w}),()=>void P.itemMap.delete(R))),a.jsx(v,{[l]:"",ref:T,children:y})});C.displayName=d;function x(_){const g=c(e+"CollectionConsumer",_);return L.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${l}]`));return Array.from(g.itemMap.values()).sort((P,D)=>w.indexOf(P.ref.current)-w.indexOf(D.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:f,ItemSlot:C},x,o]}var Xt=s.createContext(void 0);function Ae(e){const t=s.useContext(Xt);return e||t||"ltr"}var pe="rovingFocusGroup.onEntryFocus",Zt={bubbles:!1,cancelable:!0},q="RovingFocusGroup",[ge,Oe,qt]=je(q),[Jt,ke]=ae(q,[qt]),[Qt,en]=Jt(q),Fe=s.forwardRef((e,t)=>a.jsx(ge.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(ge.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(tn,{...e,ref:t})})}));Fe.displayName=q;var tn=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:c,currentTabStopId:i,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:p,onEntryFocus:f,preventScrollOnEntryFocus:d=!1,...l}=e,v=s.useRef(null),C=j(t,v),x=Ae(c),[_,g]=Ne({prop:i,defaultProp:u??null,onChange:p,caller:q}),[M,y]=s.useState(!1),w=Me(f),R=Oe(n),T=s.useRef(!1),[P,D]=s.useState(0);return s.useEffect(()=>{const b=v.current;if(b)return b.addEventListener(pe,w),()=>b.removeEventListener(pe,w)},[w]),a.jsx(Qt,{scope:n,orientation:o,dir:x,loop:r,currentTabStopId:_,onItemFocus:s.useCallback(b=>g(b),[g]),onItemShiftTab:s.useCallback(()=>y(!0),[]),onFocusableItemAdd:s.useCallback(()=>D(b=>b+1),[]),onFocusableItemRemove:s.useCallback(()=>D(b=>b-1),[]),children:a.jsx(A.div,{tabIndex:M||P===0?-1:0,"data-orientation":o,...l,ref:C,style:{outline:"none",...e.style},onMouseDown:h(e.onMouseDown,()=>{T.current=!0}),onFocus:h(e.onFocus,b=>{const $=!T.current;if(b.target===b.currentTarget&&$&&!M){const k=new CustomEvent(pe,Zt);if(b.currentTarget.dispatchEvent(k),!k.defaultPrevented){const V=R().filter(N=>N.focusable),W=V.find(N=>N.active),ee=V.find(N=>N.id===_),le=[W,ee,...V].filter(Boolean).map(N=>N.ref.current);Ke(le,d)}}T.current=!1}),onBlur:h(e.onBlur,()=>y(!1))})})}),Le="RovingFocusGroupItem",Ge=s.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:c,children:i,...u}=e,p=ve(),f=c||p,d=en(Le,n),l=d.currentTabStopId===f,v=Oe(n),{onFocusableItemAdd:C,onFocusableItemRemove:x,currentTabStopId:_}=d;return s.useEffect(()=>{if(o)return C(),()=>x()},[o,C,x]),a.jsx(ge.ItemSlot,{scope:n,id:f,focusable:o,active:r,children:a.jsx(A.span,{tabIndex:l?0:-1,"data-orientation":d.orientation,...u,ref:t,onMouseDown:h(e.onMouseDown,g=>{o?d.onItemFocus(f):g.preventDefault()}),onFocus:h(e.onFocus,()=>d.onItemFocus(f)),onKeyDown:h(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const M=rn(g,d.orientation,d.dir);if(M!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let w=v().filter(R=>R.focusable).map(R=>R.ref.current);if(M==="last")w.reverse();else if(M==="prev"||M==="next"){M==="prev"&&w.reverse();const R=w.indexOf(g.currentTarget);w=d.loop?an(w,R+1):w.slice(R+1)}setTimeout(()=>Ke(w))}}),children:typeof i=="function"?i({isCurrentTabStop:l,hasTabStop:_!=null}):i})})});Ge.displayName=Le;var nn={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function on(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function rn(e,t,n){const o=on(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return nn[o]}function Ke(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function an(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var sn=Fe,cn=Ge;function un(e){const t=ln(e),n=s.forwardRef((o,r)=>{const{children:c,...i}=o,u=s.Children.toArray(c),p=u.find(fn);if(p){const f=p.props.children,d=u.map(l=>l===p?s.Children.count(f)>1?s.Children.only(null):s.isValidElement(f)?f.props.children:null:l);return a.jsx(t,{...i,ref:r,children:s.isValidElement(f)?s.cloneElement(f,void 0,d):null})}return a.jsx(t,{...i,ref:r,children:c})});return n.displayName=`${e}.Slot`,n}function ln(e){const t=s.forwardRef((n,o)=>{const{children:r,...c}=n;if(s.isValidElement(r)){const i=mn(r),u=pn(c,r.props);return r.type!==s.Fragment&&(u.ref=o?re(o,i):i),s.cloneElement(r,u)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dn=Symbol("radix.slottable");function fn(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dn}function pn(e,t){const n={...t};for(const o in t){const r=e[o],c=t[o];/^on[A-Z]/.test(o)?r&&c?n[o]=(...u)=>{const p=c(...u);return r(...u),p}:r&&(n[o]=r):o==="style"?n[o]={...r,...c}:o==="className"&&(n[o]=[r,c].filter(Boolean).join(" "))}return{...e,...n}}function mn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var he=["Enter"," "],vn=["ArrowDown","PageUp","Home"],$e=["ArrowUp","PageDown","End"],gn=[...vn,...$e],hn={ltr:[...he,"ArrowRight"],rtl:[...he,"ArrowLeft"]},xn={ltr:["ArrowLeft"],rtl:["ArrowRight"]},J="Menu",[X,Mn,wn]=je(J),[G,Be]=ae(J,[wn,Te,ke]),ce=Te(),Ue=ke(),[Cn,K]=G(J),[_n,Q]=G(J),Ve=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:c,modal:i=!0}=e,u=ce(t),[p,f]=s.useState(null),d=s.useRef(!1),l=Me(c),v=Ae(r);return s.useEffect(()=>{const C=()=>{d.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>d.current=!1;return document.addEventListener("keydown",C,{capture:!0}),()=>{document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),a.jsx(_t,{...u,children:a.jsx(Cn,{scope:t,open:n,onOpenChange:l,content:p,onContentChange:f,children:a.jsx(_n,{scope:t,onClose:s.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:d,dir:v,modal:i,children:o})})})};Ve.displayName=J;var Rn="MenuAnchor",we=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=ce(n);return a.jsx(Rt,{...r,...o,ref:t})});we.displayName=Rn;var Ce="MenuPortal",[bn,We]=G(Ce,{forceMount:void 0}),Ye=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,c=K(Ce,t);return a.jsx(bn,{scope:t,forceMount:n,children:a.jsx(se,{present:n||c.open,children:a.jsx(bt,{asChild:!0,container:r,children:o})})})};Ye.displayName=Ce;var E="MenuContent",[In,_e]=G(E),ze=s.forwardRef((e,t)=>{const n=We(E,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,c=K(E,e.__scopeMenu),i=Q(E,e.__scopeMenu);return a.jsx(X.Provider,{scope:e.__scopeMenu,children:a.jsx(se,{present:o||c.open,children:a.jsx(X.Slot,{scope:e.__scopeMenu,children:i.modal?a.jsx(yn,{...r,ref:t}):a.jsx(Sn,{...r,ref:t})})})})}),yn=s.forwardRef((e,t)=>{const n=K(E,e.__scopeMenu),o=s.useRef(null),r=j(t,o);return s.useEffect(()=>{const c=o.current;if(c)return It(c)},[]),a.jsx(Re,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Sn=s.forwardRef((e,t)=>{const n=K(E,e.__scopeMenu);return a.jsx(Re,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),En=un("MenuContent.ScrollLock"),Re=s.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:c,onCloseAutoFocus:i,disableOutsidePointerEvents:u,onEntryFocus:p,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:v,onDismiss:C,disableOutsideScroll:x,..._}=e,g=K(E,n),M=Q(E,n),y=ce(n),w=Ue(n),R=Mn(n),[T,P]=s.useState(null),D=s.useRef(null),b=j(t,D,g.onContentChange),$=s.useRef(0),k=s.useRef(""),V=s.useRef(0),W=s.useRef(null),ee=s.useRef("right"),te=s.useRef(0),le=x?Et:s.Fragment,N=x?{as:En,allowPinchZoom:!0}:void 0,wt=m=>{const U=k.current+m,F=R().filter(S=>!S.disabled),Y=document.activeElement,de=F.find(S=>S.ref.current===Y)?.textValue,fe=F.map(S=>S.textValue),Se=Kn(fe,U,de),z=F.find(S=>S.textValue===Se)?.ref.current;(function S(Ee){k.current=Ee,window.clearTimeout($.current),Ee!==""&&($.current=window.setTimeout(()=>S(""),1e3))})(U),z&&setTimeout(()=>z.focus())};s.useEffect(()=>()=>window.clearTimeout($.current),[]),St();const B=s.useCallback(m=>ee.current===W.current?.side&&Bn(m,W.current?.area),[]);return a.jsx(In,{scope:n,searchRef:k,onItemEnter:s.useCallback(m=>{B(m)&&m.preventDefault()},[B]),onItemLeave:s.useCallback(m=>{B(m)||(D.current?.focus(),P(null))},[B]),onTriggerLeave:s.useCallback(m=>{B(m)&&m.preventDefault()},[B]),pointerGraceTimerRef:V,onPointerGraceIntentChange:s.useCallback(m=>{W.current=m},[]),children:a.jsx(le,{...N,children:a.jsx(Pt,{asChild:!0,trapped:r,onMountAutoFocus:h(c,m=>{m.preventDefault(),D.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:a.jsx(Dt,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:v,onDismiss:C,children:a.jsx(sn,{asChild:!0,...w,dir:M.dir,orientation:"vertical",loop:o,currentTabStopId:T,onCurrentTabStopIdChange:P,onEntryFocus:h(p,m=>{M.isUsingKeyboardRef.current||m.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(Nt,{role:"menu","aria-orientation":"vertical","data-state":ut(g.open),"data-radix-menu-content":"",dir:M.dir,...y,..._,ref:b,style:{outline:"none",..._.style},onKeyDown:h(_.onKeyDown,m=>{const F=m.target.closest("[data-radix-menu-content]")===m.currentTarget,Y=m.ctrlKey||m.altKey||m.metaKey,de=m.key.length===1;F&&(m.key==="Tab"&&m.preventDefault(),!Y&&de&&wt(m.key));const fe=D.current;if(m.target!==fe||!gn.includes(m.key))return;m.preventDefault();const z=R().filter(S=>!S.disabled).map(S=>S.ref.current);$e.includes(m.key)&&z.reverse(),Ln(z)}),onBlur:h(e.onBlur,m=>{m.currentTarget.contains(m.target)||(window.clearTimeout($.current),k.current="")}),onPointerMove:h(e.onPointerMove,Z(m=>{const U=m.target,F=te.current!==m.clientX;if(m.currentTarget.contains(U)&&F){const Y=m.clientX>te.current?"right":"left";ee.current=Y,te.current=m.clientX}}))})})})})})})});ze.displayName=E;var Pn="MenuGroup",be=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return a.jsx(A.div,{role:"group",...o,ref:t})});be.displayName=Pn;var Dn="MenuLabel",He=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return a.jsx(A.div,{...o,ref:t})});He.displayName=Dn;var ne="MenuItem",De="menu.itemSelect",ie=s.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,c=s.useRef(null),i=Q(ne,e.__scopeMenu),u=_e(ne,e.__scopeMenu),p=j(t,c),f=s.useRef(!1),d=()=>{const l=c.current;if(!n&&l){const v=new CustomEvent(De,{bubbles:!0,cancelable:!0});l.addEventListener(De,C=>o?.(C),{once:!0}),yt(l,v),v.defaultPrevented?f.current=!1:i.onClose()}};return a.jsx(Xe,{...r,ref:p,disabled:n,onClick:h(e.onClick,d),onPointerDown:l=>{e.onPointerDown?.(l),f.current=!0},onPointerUp:h(e.onPointerUp,l=>{f.current||l.currentTarget?.click()}),onKeyDown:h(e.onKeyDown,l=>{const v=u.searchRef.current!=="";n||v&&l.key===" "||he.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});ie.displayName=ne;var Xe=s.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...c}=e,i=_e(ne,n),u=Ue(n),p=s.useRef(null),f=j(t,p),[d,l]=s.useState(!1),[v,C]=s.useState("");return s.useEffect(()=>{const x=p.current;x&&C((x.textContent??"").trim())},[c.children]),a.jsx(X.ItemSlot,{scope:n,disabled:o,textValue:r??v,children:a.jsx(cn,{asChild:!0,...u,focusable:!o,children:a.jsx(A.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...c,ref:f,onPointerMove:h(e.onPointerMove,Z(x=>{o?i.onItemLeave(x):(i.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:h(e.onPointerLeave,Z(x=>i.onItemLeave(x))),onFocus:h(e.onFocus,()=>l(!0)),onBlur:h(e.onBlur,()=>l(!1))})})})}),Nn="MenuCheckboxItem",Ze=s.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return a.jsx(tt,{scope:e.__scopeMenu,checked:n,children:a.jsx(ie,{role:"menuitemcheckbox","aria-checked":oe(n)?"mixed":n,...r,ref:t,"data-state":ye(n),onSelect:h(r.onSelect,()=>o?.(oe(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ze.displayName=Nn;var qe="MenuRadioGroup",[Tn,jn]=G(qe,{value:void 0,onValueChange:()=>{}}),Je=s.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,c=Me(o);return a.jsx(Tn,{scope:e.__scopeMenu,value:n,onValueChange:c,children:a.jsx(be,{...r,ref:t})})});Je.displayName=qe;var Qe="MenuRadioItem",et=s.forwardRef((e,t)=>{const{value:n,...o}=e,r=jn(Qe,e.__scopeMenu),c=n===r.value;return a.jsx(tt,{scope:e.__scopeMenu,checked:c,children:a.jsx(ie,{role:"menuitemradio","aria-checked":c,...o,ref:t,"data-state":ye(c),onSelect:h(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});et.displayName=Qe;var Ie="MenuItemIndicator",[tt,An]=G(Ie,{checked:!1}),nt=s.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,c=An(Ie,n);return a.jsx(se,{present:o||oe(c.checked)||c.checked===!0,children:a.jsx(A.span,{...r,ref:t,"data-state":ye(c.checked)})})});nt.displayName=Ie;var On="MenuSeparator",ot=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return a.jsx(A.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});ot.displayName=On;var kn="MenuArrow",rt=s.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=ce(n);return a.jsx(Tt,{...r,...o,ref:t})});rt.displayName=kn;var Fn="MenuSub",[Vo,at]=G(Fn),H="MenuSubTrigger",st=s.forwardRef((e,t)=>{const n=K(H,e.__scopeMenu),o=Q(H,e.__scopeMenu),r=at(H,e.__scopeMenu),c=_e(H,e.__scopeMenu),i=s.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:p}=c,f={__scopeMenu:e.__scopeMenu},d=s.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return s.useEffect(()=>d,[d]),s.useEffect(()=>{const l=u.current;return()=>{window.clearTimeout(l),p(null)}},[u,p]),a.jsx(we,{asChild:!0,...f,children:a.jsx(Xe,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":ut(n.open),...e,ref:re(t,r.onTriggerChange),onClick:l=>{e.onClick?.(l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:h(e.onPointerMove,Z(l=>{c.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(c.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:h(e.onPointerLeave,Z(l=>{d();const v=n.content?.getBoundingClientRect();if(v){const C=n.content?.dataset.side,x=C==="right",_=x?-5:5,g=v[x?"left":"right"],M=v[x?"right":"left"];c.onPointerGraceIntentChange({area:[{x:l.clientX+_,y:l.clientY},{x:g,y:v.top},{x:M,y:v.top},{x:M,y:v.bottom},{x:g,y:v.bottom}],side:C}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(l),l.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:h(e.onKeyDown,l=>{const v=c.searchRef.current!=="";e.disabled||v&&l.key===" "||hn[o.dir].includes(l.key)&&(n.onOpenChange(!0),n.content?.focus(),l.preventDefault())})})})});st.displayName=H;var ct="MenuSubContent",it=s.forwardRef((e,t)=>{const n=We(E,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,c=K(E,e.__scopeMenu),i=Q(E,e.__scopeMenu),u=at(ct,e.__scopeMenu),p=s.useRef(null),f=j(t,p);return a.jsx(X.Provider,{scope:e.__scopeMenu,children:a.jsx(se,{present:o||c.open,children:a.jsx(X.Slot,{scope:e.__scopeMenu,children:a.jsx(Re,{id:u.contentId,"aria-labelledby":u.triggerId,...r,ref:f,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{i.isUsingKeyboardRef.current&&p.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:h(e.onFocusOutside,d=>{d.target!==u.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:h(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:h(e.onKeyDown,d=>{const l=d.currentTarget.contains(d.target),v=xn[i.dir].includes(d.key);l&&v&&(c.onOpenChange(!1),u.trigger?.focus(),d.preventDefault())})})})})})});it.displayName=ct;function ut(e){return e?"open":"closed"}function oe(e){return e==="indeterminate"}function ye(e){return oe(e)?"indeterminate":e?"checked":"unchecked"}function Ln(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Gn(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function Kn(e,t,n){const r=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,c=n?e.indexOf(n):-1;let i=Gn(e,Math.max(c,0));r.length===1&&(i=i.filter(f=>f!==n));const p=i.find(f=>f.toLowerCase().startsWith(r.toLowerCase()));return p!==n?p:void 0}function $n(e,t){const{x:n,y:o}=e;let r=!1;for(let c=0,i=t.length-1;c<t.length;i=c++){const u=t[c],p=t[i],f=u.x,d=u.y,l=p.x,v=p.y;d>o!=v>o&&n<(l-f)*(o-d)/(v-d)+f&&(r=!r)}return r}function Bn(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return $n(n,t)}function Z(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Un=Ve,Vn=we,Wn=Ye,Yn=ze,zn=be,Hn=He,Xn=ie,Zn=Ze,qn=Je,Jn=et,Qn=nt,eo=ot,to=rt,no=st,oo=it,ue="DropdownMenu",[ro]=ae(ue,[Be]),I=Be(),[ao,lt]=ro(ue),dt=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:c,onOpenChange:i,modal:u=!0}=e,p=I(t),f=s.useRef(null),[d,l]=Ne({prop:r,defaultProp:c??!1,onChange:i,caller:ue});return a.jsx(ao,{scope:t,triggerId:ve(),triggerRef:f,contentId:ve(),open:d,onOpenChange:l,onOpenToggle:s.useCallback(()=>l(v=>!v),[l]),modal:u,children:a.jsx(Un,{...p,open:d,onOpenChange:l,dir:o,modal:u,children:n})})};dt.displayName=ue;var ft="DropdownMenuTrigger",pt=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,c=lt(ft,n),i=I(n);return a.jsx(Vn,{asChild:!0,...i,children:a.jsx(A.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:re(t,c.triggerRef),onPointerDown:h(e.onPointerDown,u=>{!o&&u.button===0&&u.ctrlKey===!1&&(c.onOpenToggle(),c.open||u.preventDefault())}),onKeyDown:h(e.onKeyDown,u=>{o||(["Enter"," "].includes(u.key)&&c.onOpenToggle(),u.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});pt.displayName=ft;var so="DropdownMenuPortal",mt=e=>{const{__scopeDropdownMenu:t,...n}=e,o=I(t);return a.jsx(Wn,{...o,...n})};mt.displayName=so;var vt="DropdownMenuContent",gt=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=lt(vt,n),c=I(n),i=s.useRef(!1);return a.jsx(Yn,{id:r.contentId,"aria-labelledby":r.triggerId,...c,...o,ref:t,onCloseAutoFocus:h(e.onCloseAutoFocus,u=>{i.current||r.triggerRef.current?.focus(),i.current=!1,u.preventDefault()}),onInteractOutside:h(e.onInteractOutside,u=>{const p=u.detail.originalEvent,f=p.button===0&&p.ctrlKey===!0,d=p.button===2||f;(!r.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gt.displayName=vt;var co="DropdownMenuGroup",io=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return a.jsx(zn,{...r,...o,ref:t})});io.displayName=co;var uo="DropdownMenuLabel",ht=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return a.jsx(Hn,{...r,...o,ref:t})});ht.displayName=uo;var lo="DropdownMenuItem",xt=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return a.jsx(Xn,{...r,...o,ref:t})});xt.displayName=lo;var fo="DropdownMenuCheckboxItem",po=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return a.jsx(Zn,{...r,...o,ref:t})});po.displayName=fo;var mo="DropdownMenuRadioGroup",vo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return a.jsx(qn,{...r,...o,ref:t})});vo.displayName=mo;var go="DropdownMenuRadioItem",ho=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return a.jsx(Jn,{...r,...o,ref:t})});ho.displayName=go;var xo="DropdownMenuItemIndicator",Mo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return a.jsx(Qn,{...r,...o,ref:t})});Mo.displayName=xo;var wo="DropdownMenuSeparator",Mt=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return a.jsx(eo,{...r,...o,ref:t})});Mt.displayName=wo;var Co="DropdownMenuArrow",_o=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return a.jsx(to,{...r,...o,ref:t})});_o.displayName=Co;var Ro="DropdownMenuSubTrigger",bo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return a.jsx(no,{...r,...o,ref:t})});bo.displayName=Ro;var Io="DropdownMenuSubContent",yo=s.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=I(n);return a.jsx(oo,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});yo.displayName=Io;var So=dt,Eo=pt,Po=mt,Do=gt,No=ht,To=xt,jo=Mt;function Ao({...e}){return a.jsx(So,{"data-slot":"dropdown-menu",...e})}function Oo({...e}){return a.jsx(Eo,{"data-slot":"dropdown-menu-trigger",...e})}function ko({className:e,sideOffset:t=4,...n}){return a.jsx(Po,{children:a.jsx(Do,{"data-slot":"dropdown-menu-content",sideOffset:t,className:O("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function me({className:e,inset:t,variant:n="default",...o}){return a.jsx(To,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:O("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}function Wo({className:e,inset:t,...n}){return a.jsx(No,{"data-slot":"dropdown-menu-label","data-inset":t,className:O("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function Yo({className:e,...t}){return a.jsx(jo,{"data-slot":"dropdown-menu-separator",className:O("bg-border -mx-1 my-1 h-px",e),...t})}const Fo=({className:e})=>{const{setTheme:t}=jt();return a.jsxs(Ao,{children:[a.jsx(Oo,{asChild:!0,children:a.jsxs(At,{variant:"ghost",size:"icon",className:e,children:[a.jsx(Ut,{className:"h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"}),a.jsx($t,{className:"absolute h-[1.2rem] w-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"}),a.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),a.jsxs(ko,{children:[a.jsx(me,{onClick:()=>t("light"),children:"Light"}),a.jsx(me,{onClick:()=>t("dark"),children:"Dark"}),a.jsx(me,{onClick:()=>t("system"),children:"System"})]})]})};function Lo({...e}){return a.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function Go({className:e,...t}){return a.jsx("ol",{"data-slot":"breadcrumb-list",className:O("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}function Ko({className:e,...t}){return a.jsx("li",{"data-slot":"breadcrumb-item",className:O("inline-flex items-center gap-1.5",e),...t})}function $o({className:e,...t}){return a.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:O("text-foreground font-normal",e),...t})}function Bo({children:e,className:t,...n}){return a.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:O("[&>svg]:size-3.5",t),...n,children:e??a.jsx(Gt,{})})}function zo({breadcrumbs:e,actions:t,children:n}){const o=Ft(),r=s.useMemo(()=>e||o.pathname.split("/").filter(Boolean).map(i=>i.charAt(0).toUpperCase()+i.slice(1)),[o.pathname,e]);return a.jsxs(a.Fragment,{children:[a.jsxs("header",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[a.jsx(Ot,{className:"-ml-1"}),a.jsx(kt,{orientation:"vertical",className:"mr-2 h-4"}),a.jsx(Lo,{children:a.jsx(Go,{children:r.map((c,i)=>a.jsxs(s.Fragment,{children:[a.jsx(Ko,{children:i===r.length-1?a.jsx($o,{children:c}):c}),i<r.length-1&&a.jsx(Bo,{})]},i))})}),a.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[t,a.jsx(Fo,{})]})]}),a.jsx("div",{className:"flex flex-1 flex-col",children:a.jsx("div",{className:"@container/main",children:a.jsx("div",{className:"flex flex-col gap-4 p-4",children:n})})})]})}export{Gt as C,Ao as D,zo as P,Oo as a,ko as b,me as c,Wo as d,Yo as e,je as f,Ae as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as i,j as t,B as o,i as n,J as c}from"./index-Bi48hI2z.js";import{m as d}from"./use-settings-form-submit-CDRh-E9U.js";const u=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],x=i("Trash2",u),m=({className:a,onClick:s})=>t.jsxs(o,{type:"button",variant:"destructive",className:n("",a),onClick:s,children:[t.jsx("span",{className:"sr-only",children:"Delete option"}),t.jsx(x,{className:"size-4"})]}),y=({className:a,showDelete:s=!1,onDelete:r})=>{const e=d();return t.jsxs("div",{className:n("flex items-center gap-2",a),children:[t.jsx(c,{type:"text",id:`${e.name}`,className:"form-input",value:e.state.value?String(e.state.value):"","aria-invalid":!!(e.state.meta.isTouched&&e.state.meta.errorMap.onBlur?.length>0),onBlur:e.handleBlur,onChange:l=>e.handleChange(l.target.value)}),s&&t.jsx(m,{onClick:r})]})};export{y as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as n,K as s,i as o,M as d}from"./index-Bi48hI2z.js";const c=d("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",destructive:"bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 border-transparent text-white",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function u({className:e,variant:r,asChild:t=!1,...a}){const i=t?s:"span";return n.jsx(i,{"data-slot":"badge",className:o(c({variant:r}),e),...a})}export{u as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c}from"./index-Bi48hI2z.js";const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("Check",e);export{t as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as o}from"./index-Bi48hI2z.js";const n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],c=o("ChevronDown",n);export{c as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as ge,j as e,y as W,z as X,A as Z,E as ee,F as se,L as O,G as te,B as v,H as ne,Q as je,r as g,u as re,t as J}from"./index-Bi48hI2z.js";import{u as le,i as q,j as ie,b as ae,c as z,F as oe,k as B,f as Ce,p as be,a as we,A as Ne}from"./use-settings-form-submit-CDRh-E9U.js";import{u as de}from"./useQuery-A4Hv_4uX.js";import{P as Se,D as ve,a as Fe,b as ye,d as Te,c as I}from"./Page-C3rteCZt.js";import{T as Ae,a as De,b as H,c as V,d as Ue,e as F}from"./table-DvgJU7Gh.js";import{P as ce,T as Le,E as Oe,a as Ve,b as ke}from"./test-tube-BIwmoM45.js";import{L as Pe}from"./loader-circle-M0gu1gZ-.js";const Ee=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],Re=ge("Trash",Ee);function Me({open:l,onOpenChange:a,client:r,onEdit:d}){return e.jsx(W,{open:l,onOpenChange:a,children:e.jsxs(X,{className:"sm:max-w-md",children:[e.jsxs(Z,{children:[e.jsx(ee,{children:"View Torrent Client"}),e.jsx(se,{children:"View torrent client details."})]}),e.jsxs("div",{className:"grid flex-1 auto-rows-min gap-6 px-4",children:[e.jsxs("div",{className:"grid gap-3",children:[e.jsx(O,{children:"URL"}),e.jsx("div",{className:"bg-muted/50 rounded-md border px-3 py-2 font-mono text-sm break-all",children:r?.url||"N/A"})]}),e.jsxs("div",{className:"grid gap-3",children:[e.jsx(O,{children:"Username"}),e.jsx("div",{className:"bg-muted/50 rounded-md border px-3 py-2 font-mono text-sm break-all",children:r?.user||"N/A"})]}),e.jsxs("div",{className:"grid gap-3",children:[e.jsx(O,{children:"Password"}),e.jsx("div",{className:"bg-muted/50 rounded-md border px-3 py-2 font-mono text-sm break-all",children:r?.password?"********":"N/A"})]}),e.jsxs("div",{className:"grid gap-3",children:[e.jsx(O,{children:"Read only"}),e.jsx("div",{className:"bg-muted/50 rounded-md border px-3 py-2 font-mono text-sm break-all",children:r?.readOnly?"Yes":"No"})]})]}),e.jsxs(te,{children:[d&&e.jsxs(v,{type:"button",onClick:()=>d(r),className:"flex-1",children:[e.jsx(ce,{className:"mr-2 h-4 w-4"}),"Edit"]}),e.jsx(ne,{asChild:!0,className:"flex-1",children:e.jsx(v,{type:"button",variant:"outline",className:"flex-1",children:"Close"})})]})]})})}function _(l){return new URL(l).protocol}function Q(l){return new URL(l).host}const $e=l=>{try{const a=_(l),r=Q(l);return`${a}//${r}`}catch(a){return console.warn("Unable to strip credentials from client URL",a),l}};function qe({client:l,protocol:a,host:r,username:d="",password:h}){let o="";l!=="deluge"&&d&&(o=d),h&&(o+=`:${h}`),o+="@";const C=ue(l,!1);return`${a}//${o}${r}${C}`}function Be({client:l,protocol:a,host:r,username:d="",password:h="",readonly:o=!1,usePlugin:C=!1}){let m="";d&&(m+=d),h&&(m+=`:${h}`),m+="@";const w=ue(l,C);return`${l.toLowerCase()}:${o?"readonly:":""}${a}//${m}${r}${w}`}function ue(l,a){switch(l.toLowerCase()){case"qbittorrent":return"";case"transmission":return"/transmission/rpc";case"deluge":return"/json";case"rtorrent":return a?"/rutorrent/plugins/httprpc/action.php":"/RPC2";default:return""}}const Ie=async({client:l,url:a,username:r="",password:d,plugin:h=!1})=>{try{return{success:(await je.clients.testConnection.mutate({client:l.toLowerCase(),url:a,username:r,password:d,readonly:!1,plugin:h})).success}}catch(o){return console.error("Error testing connection:",o),{success:!1}}},K={qbittorrent:"qBittorrent",rtorrent:"rTorrent",transmission:"Transmission",deluge:"Deluge"};function He({open:l,onOpenChange:a,mode:r,client:d}){const[h,o]=g.useState(!1),{isFieldRequired:C}=le(q),m=re(),{data:w}=de(m.settings.get.queryOptions(void 0,{select:t=>t.config.torrentClients||[]})),{saveConfig:N,isLoading:k}=ie(),c=ae({...z,defaultValues:d??{},onSubmit:async({value:t})=>{try{const p={...t,readOnly:t?.readOnly??!1},x=q.safeParse(p);if(x.success){const i=x.data,f=_(i.url),S=Q(i.url),j=Be({client:i.client,protocol:f,host:S,username:i.user??"",password:i.password??"",readonly:i.readOnly});let b;r==="edit"&&d&&d.index!==void 0?(b=[...w||[]],b[d.index]=j):b=[...w||[],j],N({torrentClients:b}),a(!1)}else throw console.error("FULL VALIDATION FAILED:",x.error.format()),new Error("Validation failed")}catch(p){return console.error("Exception during full validation:",p),{status:"error",error:{_form:"An unexpected error occurred during validation"}}}},validators:{onSubmit:q}}),P=async()=>{o(!0);const t=String(c.getFieldValue("client")),p=String(c.getFieldValue("url")),x=String(c.getFieldValue("user")||""),i=String(c.getFieldValue("password")||""),f=qe({client:t,protocol:_(p),host:Q(p),username:x,password:i});(await Ie({client:t,url:f,username:x,password:i,plugin:!1})).success?(J.success("Connection successful!",{description:"The torrent client connection was successful."}),o(!1)):(J.error("Connection failed",{description:"Failed to connect to the torrent client."}),o(!1))},y=k||h;return e.jsx(W,{open:l,onOpenChange:a,children:e.jsx(X,{className:"sm:max-w-md",children:e.jsx(oe,{isFieldRequired:C,children:e.jsxs("form",{onSubmit:t=>{t.preventDefault(),t.stopPropagation(),c.handleSubmit()},children:[e.jsxs(Z,{children:[e.jsx(ee,{children:r==="edit"?"Edit Client":"Create Client"}),e.jsx(se,{children:r==="edit"?"Edit the details of the torrent client.":"Create a new torrent client."})]}),e.jsxs("div",{className:"grid flex-1 auto-rows-min gap-6 px-4",children:[e.jsx("div",{className:"grid gap-3",children:e.jsx(c.AppField,{name:"client",children:t=>e.jsxs(e.Fragment,{children:[e.jsx(t.SelectField,{label:"Client",options:K}),t.state.value===K.rtorrent.toLowerCase()&&e.jsx(c.AppField,{name:"plugin",children:p=>e.jsx(p.SwitchField,{label:"Use Plugin URL"})})]})})}),e.jsx("div",{className:"grid gap-3",children:e.jsx(c.AppField,{name:"url",children:t=>e.jsx(t.TextField,{label:"Client URL"})})}),e.jsx("div",{className:"grid gap-3",children:e.jsx(c.AppField,{name:"user",children:t=>e.jsx(t.TextField,{label:"User"})})}),e.jsx("div",{className:"grid gap-3",children:e.jsx(c.AppField,{name:"password",children:t=>e.jsx(t.TextField,{label:"Password",type:"password"})})}),e.jsx("div",{className:"grid gap-3",children:e.jsx(c.AppField,{name:"readOnly",children:t=>e.jsx(t.SwitchField,{label:"Read only"})})}),e.jsx(c.Subscribe,{selector:t=>({urlValue:t.values.url,urlMeta:t.fieldMeta.url,userValue:t.values.user,userMeta:t.fieldMeta.user,passwordValue:t.values.password,passwordMeta:t.fieldMeta.password,clientValue:t.values.client}),children:({urlValue:t,urlMeta:p,userValue:x,userMeta:i,passwordValue:f,passwordMeta:S,clientValue:j})=>{const b=t&&!p?.errors?.length,E=j==="transmission"&&f===void 0?!0:f&&!S?.errors?.length,R=j==="deluge"||j==="transmission"?!0:x&&!i?.errors?.length,T=b&&E&&R;return e.jsxs(e.Fragment,{children:[e.jsx(v,{type:"button",variant:"outline",onClick:P,disabled:!T,className:"w-full",children:h?e.jsxs(e.Fragment,{children:[e.jsx(Pe,{className:"animate-spin"}),"Testing connection..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Le,{className:"mr-2"}),"Test Connection"]})}),j==="qbittorrent"&&e.jsxs("p",{className:"text-muted-foreground -mt-4 px-2 text-sm italic",children:["Note: Testing connections can return false positives if"," ",e.jsx("code",{className:"bg-yellow-100 px-1",children:"Bypass auth on localhost"})," ","is enabled in qBittorrent."]})]})}})]}),e.jsxs(te,{className:"mt-6",children:[e.jsx(c.AppForm,{children:e.jsx(c.SubmitButton,{label:r==="edit"?"Update":"Create",actionLabel:r==="edit"?"Updating...":"Creating..."})}),e.jsx(ne,{asChild:!0,children:e.jsx(v,{type:"button",variant:"outline",disabled:y,children:"Cancel"})})]})]})})})})}function We(){const l=re(),{saveConfig:a}=ie(),[r,d]=g.useState(void 0),[h,o]=g.useState(null),[C,m]=g.useState(null),[w,N]=g.useState(!1),[k,c]=g.useState(!1),[P,y]=g.useState("create"),{isFieldRequired:t}=le(B),{data:p}=de(l.settings.get.queryOptions(void 0,{select:s=>{const n=Ce(s.config);return be(B,n,{includeUndefined:!0})}})),x=we(),i=ae({...z,defaultValues:p??z.defaultValues,onSubmit:x,validators:{onSubmit:B}}),[f,S]=g.useState(null);g.useEffect(()=>{f&&(document.getElementById(f)?.focus(),S(null))},[f]),g.useEffect(()=>{const s=p?.torrentClients??[];if(!s.length){d([]);return}const n=s.map((u,xe)=>{if(!u)return null;let A="",D="",U=!1,M="",$="";if(typeof u=="object")A=u.client,U=u.readOnly||!1,D=u.url,M=u.user||"",$=u.password||"";else if(typeof u=="string"){A=String(u).split(":")[0],U=String(u).includes("readonly");const fe=String(u).indexOf(":"),L=U?String(u).substring(String(u).indexOf(":",fe+1)+1):String(u).substring(String(u).indexOf(":")+1);if(!L)return null;const G=$e(L);if(!G)return null;D=G,M=j(L),$=b(L)}return!A||!D?null:{index:xe,client:A,url:D,user:M,password:$,readOnly:U}}).filter(Boolean);d(n)},[p]);const j=s=>{if(s.includes("@")){const n=s.split("://")[1].split("@")[0];return n.includes(":")?n.split(":")[0]:n.replace(":","")}return""},b=s=>{if(s.includes("@")){const n=s.split("://")[1].split("@")[0];if(n.includes(":"))return n.split(":")[1]}return""},E=s=>{s.preventDefault(),s.stopPropagation(),m(null),y("create"),c(!0)},R=s=>{N(s),s||o(null)},T=(s,n)=>{s.preventDefault(),s.stopPropagation(),o(null),m(n),N(!0)},Y=s=>{o(null),m(s),y("edit"),N(!1),c(!0)},pe=s=>{o(null);const n=r?.filter(u=>u.url!==s.url);d(n),a({torrentClients:n||[]})},he=s=>{c(s),s||o(null)},me=e.jsxs(v,{onClick:E,type:"button",size:"sm",children:[e.jsx(ke,{className:"mr-2 h-4 w-4"}),"Add Torrent Client"]});return e.jsxs(Se,{breadcrumbs:["Settings","Torrent Clients"],actions:me,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Torrent Clients"}),e.jsx("p",{className:"text-muted-foreground",children:"Manage your torrent clients"})]}),r?e.jsx("div",{className:"mt-4 mb-7 overflow-x-auto rounded-lg border",children:e.jsxs(Ae,{children:[e.jsx(De,{className:"bg-muted sticky top-0 z-10",children:e.jsxs(H,{className:"border-b",children:[e.jsx(V,{children:"Client"}),e.jsx(V,{children:"RPC URL"}),e.jsx(V,{children:"Read only"}),e.jsx(V,{className:"text-right",children:"Actions"})]})}),e.jsxs(Ue,{children:[r?.length===0&&e.jsx(H,{children:e.jsx(F,{colSpan:6,className:"text-center",children:e.jsx("p",{className:"text-muted-foreground",children:"No torrent clients configured. Add a client to start downloading."})})}),r?.map(s=>e.jsxs(H,{className:"hover:bg-muted/50 cursor-pointer",onClick:n=>T(n,s),children:[e.jsx(F,{className:"font-medium",children:s.client}),e.jsx(F,{className:"font-mono text-sm",children:s.url}),e.jsx(F,{children:s.readOnly?"Yes":"No"}),e.jsx(F,{className:"text-right",children:e.jsxs(ve,{open:h===s.url,onOpenChange:n=>o(n?s.url:null),children:[e.jsx(Fe,{asChild:!0,children:e.jsxs(v,{variant:"ghost",className:"h-8 w-8 p-0",type:"button",onClick:n=>{n.preventDefault(),n.stopPropagation()},children:[e.jsx("span",{className:"sr-only",children:"Actions"}),e.jsx(Oe,{className:"h-4 w-4"})]})}),e.jsxs(ye,{align:"end",children:[e.jsx(Te,{children:"Actions"}),e.jsxs(I,{onClick:n=>{T(n,s)},children:[e.jsx(Ve,{className:"mr-2 h-4 w-4"}),"View Details"]}),e.jsxs(I,{onClick:n=>{n.stopPropagation(),Y(s)},children:[e.jsx(ce,{className:"mr-2 h-4 w-4"}),"Edit"]}),e.jsxs(I,{variant:"destructive",onClick:n=>{n.stopPropagation(),pe(s)},children:[e.jsx(Re,{className:"mr-2 h-4 w-4"}),"Delete"]})]})]})})]},s.url))]})]})}):e.jsx("p",{className:"mb-4 text-lg",children:"No torrent clients configured. Add a client"}),e.jsx(oe,{isFieldRequired:t,children:e.jsx("form",{className:"form flex flex-col gap-4",onSubmit:s=>{s.preventDefault(),s.stopPropagation(),i.handleSubmit()},noValidate:!0,children:e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("h2",{className:"text-xl font-bold",children:"Torrent Client Options"}),e.jsxs("fieldset",{className:"form-fieldset w-full gap-6 rounded-md",children:[e.jsx("div",{className:"",children:e.jsx(i.AppField,{name:"action",children:s=>e.jsx(s.SelectField,{label:"Action",options:Ne})})}),e.jsx("div",{className:"",children:e.jsx(i.AppField,{name:"linkCategory",validators:{},children:s=>e.jsx(s.TextField,{label:"Link Category",required:!1})})}),e.jsx("div",{className:"",children:e.jsx(i.AppField,{name:"torrentDir",validators:{},children:s=>e.jsx(s.TextField,{label:"Torrent Directory",required:!1})})}),e.jsx("div",{className:"",children:e.jsx(i.AppField,{name:"outputDir",validators:{},children:s=>e.jsx(s.TextField,{label:"Output Directory",required:!1})})}),e.jsxs("div",{className:"form-field-switches col-span-2 gap-x-12",children:[e.jsx(i.AppField,{name:"skipRecheck",children:s=>e.jsx(s.SwitchField,{label:"Skip Recheck"})}),e.jsx(i.AppField,{name:"useClientTorrents",children:s=>e.jsx(s.SwitchField,{label:"Use Client Torrents"})}),e.jsx(i.AppField,{name:"duplicateCategories",children:s=>e.jsx(s.SwitchField,{label:"Duplicate Categories"})})]})]}),e.jsx(i.AppForm,{children:e.jsx(i.SubmitButton,{})})]})})})]}),e.jsx(Me,{open:w,onOpenChange:R,client:C,onEdit:Y}),e.jsx(He,{open:k,onOpenChange:he,client:C,mode:P})]})}export{We as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as g,r as x,j as e,L as d,B as i}from"./index-Bi48hI2z.js";import{F as m}from"./FieldInfo-Bxj_j8SJ.js";import{u as y,h as u,f as N,p as f,a as A,b as $,c as j,F as S,d as h,l as p}from"./use-settings-form-submit-CDRh-E9U.js";import{u as w}from"./useQuery-A4Hv_4uX.js";import{P as D}from"./Page-C3rteCZt.js";function R(){const{isFieldRequired:n}=y(u),v=g(),{data:b}=w(v.settings.get.queryOptions(void 0,{select:a=>{const r=N(a.config);return f(u,r,{includeUndefined:!0})}})),F=A(),l=$({...j,defaultValues:b??j.defaultValues,onSubmit:F,validators:{onSubmit:u}}),[c,o]=x.useState(null);return x.useEffect(()=>{c&&(document.getElementById(c)?.focus(),o(null))},[c]),e.jsx(D,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Connected App Settings"}),e.jsx("p",{className:"text-muted-foreground",children:"Manage apps connected to Cross-seed."})]}),e.jsx(S,{isFieldRequired:n,children:e.jsx("form",{className:"form flex flex-col gap-4",onSubmit:a=>{a.preventDefault(),a.stopPropagation(),l.handleSubmit()},noValidate:!0,children:e.jsxs("div",{className:"flex flex-wrap gap-6",children:[e.jsxs("fieldset",{className:"form-fieldset w-full gap-6",children:[e.jsx("div",{children:e.jsx(l.AppField,{name:"host",validators:{},children:a=>e.jsx(a.TextField,{label:"Host"})})}),e.jsx("div",{className:"",children:e.jsx(l.AppField,{name:"port",validators:{},children:a=>e.jsx(a.TextField,{label:"Port",type:"number"})})}),e.jsx("div",{className:"",children:e.jsx(l.AppField,{name:"apiKey",validators:{},children:a=>e.jsx(a.TextField,{label:"API Key"})})})]}),e.jsxs("fieldset",{className:"form-fieldset border-border w-full gap-6 rounded-md border",children:[e.jsx("legend",{children:"Connect to Other Apps"}),e.jsx("div",{className:"",children:e.jsx(l.Field,{name:"sonarr",mode:"array",validators:{},children:a=>e.jsxs("div",{className:"space-y-3",children:[e.jsxs(d,{htmlFor:a.name,className:"block w-full",children:["Sonarr URL(s)",n(a.name)&&e.jsx("span",{className:"pl-1 text-red-500",children:"*"})]}),a.state.value&&a.state.value.map((r,s)=>e.jsxs("div",{className:"gap-y- mb-3 flex flex-col",children:[e.jsx(l.AppField,{name:`sonarr[${s}]`,validators:{onBlur:h().url().or(p(""))},children:t=>e.jsx(t.ArrayField,{showDelete:a.state.value&&a.state.value?.length>1,index:s,onDelete:()=>{a.removeValue(s)}})}),e.jsx(l.Subscribe,{selector:t=>t.fieldMeta[`${a.name}[${s}]`],children:t=>e.jsx(m,{fieldMeta:t})})]},s)),e.jsx(i,{variant:"secondary",type:"button",onClick:()=>{a.pushValue("");const r=`${a.name}-${a.state.value?.length?a.state.value.length-1:0}`;o(r)},title:`Add ${a.name}`,children:"Add"})]})})}),e.jsx("div",{children:e.jsx(l.Field,{name:"radarr",mode:"array",validators:{},children:a=>e.jsxs("div",{className:"space-y-3",children:[e.jsxs(d,{htmlFor:a.name,className:"block w-full",children:["Radarr URL(s)",n(a.name)&&e.jsx("span",{className:"pl-1 text-red-500",children:"*"})]}),a.state.value&&a.state.value.map((r,s)=>e.jsxs("div",{className:"gap-y- mb-3 flex flex-col",children:[e.jsx(l.AppField,{name:`radarr[${s}]`,validators:{onBlur:h().url().or(p(""))},children:t=>e.jsx(t.ArrayField,{showDelete:a.state.value&&a.state.value?.length>1,index:s,onDelete:()=>{a.removeValue(s)}})}),e.jsx(l.Subscribe,{selector:t=>t.fieldMeta[`${a.name}[${s}]`],children:t=>e.jsx(m,{fieldMeta:t})})]},s)),e.jsx(i,{variant:"secondary",type:"button",onClick:()=>{a.pushValue("");const r=`${a.name}-${a.state.value?.length?a.state.value.length-1:0}`;o(r)},title:`Add ${a.name}`,children:"Add"})]})})}),e.jsx("div",{className:"",children:e.jsx(l.Field,{name:"notificationWebhookUrls",mode:"array",validators:{},children:a=>e.jsxs("div",{className:"space-y-3",children:[e.jsxs(d,{htmlFor:a.name,className:"block w-full",children:["Notification Webhook URL(s)",n(a.name)&&e.jsx("span",{className:"pl-1 text-red-500",children:"*"})]}),a.state.value?.map((r,s)=>e.jsxs("div",{className:"gap-y- mb-3 flex flex-col",children:[e.jsx(l.AppField,{name:`notificationWebhookUrls[${s}]`,validators:{onBlur:h().min(3).url().or(p(""))},children:t=>e.jsx(t.ArrayField,{showDelete:a.state.value&&a.state.value?.length>1,index:s,onDelete:()=>{a.removeValue(s)}})}),e.jsx(l.Subscribe,{selector:t=>t.fieldMeta[`${a.name}[${s}]`],children:t=>e.jsx(m,{fieldMeta:t})})]},s)),e.jsx(i,{variant:"secondary",type:"button",onClick:()=>{a.pushValue("");const r=`${a.name}-${a.state.value?.length?a.state.value.length-1:0}`;o(r)},title:`Add ${a.name}`,children:"Add"})]})})})]}),e.jsx(l.AppForm,{children:e.jsx(l.SubmitButton,{})})]})})})]})})}export{R as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,u as O,I as k,l as w,t as o,j as s,B as x}from"./index-Bi48hI2z.js";import{u as C}from"./useQuery-A4Hv_4uX.js";import{P as h}from"./Page-C3rteCZt.js";function P(){const[c,d]=t.useState(""),[n,l]=t.useState(!0),[p,u]=t.useState(""),f=t.useRef(null),m=O(),v=k(),{data:r,isLoading:b}=C(m.settings.get.queryOptions()),a=w(m.settings.replace.mutationOptions({onSuccess:()=>{o.success("Settings saved successfully!",{description:"Your changes will take effect on the next restart."}),v.invalidateQueries({queryKey:["settings.get"]})},onError:e=>{o.error("Failed to save settings",{description:e.message||"An unknown error occurred"})}})),g=()=>{const e=f.current;if(e){const i=window.pageYOffset||document.documentElement.scrollTop;e.style.height="auto",e.style.height=`${e.scrollHeight}px`,requestAnimationFrame(()=>{window.scrollTo(0,i)})}};t.useEffect(()=>{r?.config&&d(JSON.stringify(r.config,null,2))},[r]),t.useEffect(()=>{g()},[c]);const y=e=>{try{return JSON.parse(e),l(!0),u(""),!0}catch(i){return l(!1),u(i instanceof Error?i.message:"Invalid JSON"),!1}},j=e=>{d(e),y(e),setTimeout(g,0)},S=()=>{if(!n){o.error("Cannot save invalid JSON");return}try{const e=JSON.parse(c);a.mutate(e)}catch{o.error("Failed to parse JSON")}},N=()=>{r?.config&&(d(JSON.stringify(r.config,null,2)),l(!0),u(""),setTimeout(g,0))};if(b)return s.jsx(h,{breadcrumbs:["Diagnostics","Debug"],children:s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsx("div",{children:"Loading settings..."})})});const J=s.jsxs("div",{className:"flex gap-2",children:[s.jsx(x,{variant:"outline",onClick:N,disabled:a.isPending,children:"Reset"}),s.jsx(x,{onClick:S,disabled:!n||a.isPending,children:a.isPending?"Saving...":"Save"})]});return s.jsx(h,{breadcrumbs:["Diagnostics","Debug"],actions:J,children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Debug Settings"}),s.jsx("p",{className:"text-muted-foreground",children:"Raw JSON editor for debugging configuration issues"})]}),s.jsx("div",{className:"relative",children:s.jsx("textarea",{ref:f,value:c,onChange:e=>j(e.target.value),className:`min-h-96 w-full resize-none overflow-hidden rounded-md border p-3 font-mono text-sm ${n?"border-gray-300 dark:border-gray-600":"border-red-500 dark:border-red-400"} bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100`,spellCheck:!1,placeholder:"Loading settings..."})}),!n&&s.jsxs("div",{className:"rounded-md bg-red-50 p-3 text-sm text-red-700 dark:bg-red-900/20 dark:text-red-400",children:[s.jsx("strong",{children:"JSON Error:"})," ",p]})]})})}export{P as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as f,r as d,j as e,L as m,B as u}from"./index-Bi48hI2z.js";import{u as g,e as c,f as b,p as y,a as D,b as N,c as p,F as S,d as h,L as A}from"./use-settings-form-submit-CDRh-E9U.js";import{F as x}from"./FieldInfo-Bxj_j8SJ.js";import{u as k}from"./useQuery-A4Hv_4uX.js";import{P as $}from"./Page-C3rteCZt.js";function T(){const{isFieldRequired:n}=g(c),j=f(),{data:v}=k(j.settings.get.queryOptions(void 0,{select:a=>{const r=b(a.config);return y(c,r,{includeUndefined:!0})}})),F=D(),s=N({...p,defaultValues:v??p.defaultValues,onSubmit:F,validators:{onSubmit:c}}),[i,o]=d.useState(null);return d.useEffect(()=>{i&&(document.getElementById(i)?.focus(),o(null))},[i]),e.jsx($,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Directory & Path Settings"}),e.jsx("p",{className:"text-muted-foreground",children:"Manage the directories and paths used by cross-seed."})]}),e.jsx(S,{isFieldRequired:n,children:e.jsx("form",{className:"form flex flex-col gap-4",onSubmit:a=>{a.preventDefault(),a.stopPropagation(),s.handleSubmit()},noValidate:!0,children:e.jsxs("div",{className:"flex flex-wrap gap-6",children:[e.jsxs("fieldset",{className:"form-fieldset w-full gap-6",children:[e.jsx("div",{className:"",children:e.jsx(s.Field,{name:"dataDirs",mode:"array",validators:{},children:a=>e.jsxs("div",{className:"space-y-3",children:[e.jsxs(m,{htmlFor:a.name,className:"block w-full",children:["Data Directories",n(a.name)&&e.jsx("span",{className:"pl-1 text-red-500",children:"*"})]}),a.state.value&&a.state.value.map((r,t)=>e.jsxs("div",{className:"gap-y- mb-3 flex flex-col",children:[e.jsx(s.AppField,{name:`dataDirs[${t}]`,validators:{onBlur:h()},children:l=>e.jsx(l.ArrayField,{showDelete:a.state.value&&a.state.value?.length>1,index:t,onDelete:()=>{a.removeValue(t)}})}),e.jsx(s.Subscribe,{selector:l=>l.fieldMeta[`${a.name}[${t}]`],children:l=>e.jsx(x,{fieldMeta:l})})]},t)),e.jsx(u,{variant:"secondary",type:"button",onClick:()=>{a.pushValue(""),a.state.value?.length&&o(`${a.name}-${a.state.value.length-1}`)},title:`Add ${a.name}`,children:"Add"})]})})}),e.jsx(s.AppField,{name:"flatLinking",validators:{},children:a=>e.jsx(a.SwitchField,{label:"Flat Linking",className:"form-field__switch flex flex-col items-start gap-5"})}),e.jsx("div",{className:"",children:e.jsx(s.AppField,{name:"linkType",children:a=>e.jsx(a.SelectField,{label:"Link Type",options:A})})}),e.jsx("div",{className:"",children:e.jsx(s.Field,{name:"linkDirs",mode:"array",validators:{},children:a=>e.jsxs("div",{className:"space-y-3",children:[e.jsxs(m,{htmlFor:a.name,className:"block w-full",children:["Link Directories",n(a.name)&&e.jsx("span",{className:"pl-1 text-red-500",children:"*"})]}),a.state.value?.map((r,t)=>e.jsxs("div",{className:"gap-y- mb-3 flex flex-col",children:[e.jsx(s.AppField,{name:`linkDirs[${t}]`,validators:{onBlur:h()},children:l=>e.jsx(l.ArrayField,{showDelete:(a.state.value&&a.state.value?.length>1)??void 0,index:t,onDelete:()=>{a.removeValue(t)}})}),e.jsx(s.Subscribe,{selector:l=>l.fieldMeta[`${a.name}[${t}]`],children:l=>e.jsx(x,{fieldMeta:l})})]},t)),e.jsx(u,{variant:"secondary",type:"button",onClick:()=>{a.pushValue("");const r=`${a.name}-${a.state.value?.length?a.state.value.length-1:0}`;o(r)},title:`Add ${a.name}`,children:"Add"})]})})}),e.jsx("div",{className:"",children:e.jsx(s.AppField,{name:"maxDataDepth",validators:{},children:a=>e.jsx(a.TextField,{label:"Max Data Depth",type:"number"})})})]}),e.jsx(s.AppForm,{children:e.jsx(s.SubmitButton,{})})]})})})]})})}export{T as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,j as r,i as S,J as D,L as C}from"./index-Bi48hI2z.js";import{S as L,a as M,b as P,c as y,d as E}from"./select-zHgqMzLj.js";import{m as R}from"./use-settings-form-submit-CDRh-E9U.js";import{u as T,R as k}from"./use-form-validation-context-BkAfWAh0.js";import{F as w}from"./FieldInfo-Bxj_j8SJ.js";import"./Page-C3rteCZt.js";import"./index-C2cH1Gst.js";import"./chevron-down-CRy8M0kJ.js";import"./check-Bu3ldi63.js";const B=[{label:"Millisecond",labelPlural:"Milliseconds",value:"milliseconds",ms:1},{label:"Second",labelPlural:"Seconds",value:"seconds",ms:1e3},{label:"Minute",labelPlural:"Minutes",value:"minutes",ms:60*1e3},{label:"Hour",labelPlural:"Hours",value:"hours",ms:3600*1e3},{label:"Day",labelPlural:"Days",value:"days",ms:1440*60*1e3}];function H({id:e,className:l,value:a,onChange:t,onBlur:d,units:c=B,disabled:p=!1}){const s=i.useMemo(()=>c,[c]),u=i.useMemo(()=>A(a),[a]),[o,h]=i.useState(()=>u!=null?v(u,s).value:s[2]?.value??s[0].value),[x,f]=i.useState(""),[g,U]=i.useState(!1),b=s.find(n=>n.value===o)??s[0],F=N(x),j=_(b,F);i.useEffect(()=>{if(!g&&u!=null){const n=v(u,s);n.value!==o&&h(n.value)}},[g,u,o,s]),i.useEffect(()=>{if(u==null){f("");return}const n=s.find(m=>m.value===o)??s[0];f($(u,n.ms))},[u,o,s]);const I=n=>{U(!0),f(n);const m=N(n);if(m==null){t(null);return}t(m*b.ms)},V=n=>{U(!0),h(n)};return r.jsxs("div",{className:S("flex items-center gap-3",l),children:[r.jsx(D,{id:e,name:e,type:"number",min:0,step:"any",className:"flex-1 shadow-none",value:x,onBlur:d,inputMode:"decimal",disabled:p,onChange:n=>I(n.target.value)}),r.jsxs(L,{value:b.value,onValueChange:V,disabled:p,children:[r.jsx(M,{className:"w-32 shadow-none",children:r.jsx(P,{"aria-label":j,children:j})}),r.jsx(y,{children:s.map(n=>r.jsx(E,{value:n.value,children:n.labelPlural??`${n.label}s`},n.value))})]})]})}function v(e,l){if(!Number.isFinite(e)||e<=0)return l[0];for(let a=l.length-1;a>=0;a-=1){const t=l[a];if(e>=t.ms)return t}return l[0]}function N(e){if(!e||e.trim()==="")return null;const l=Number(e);return!Number.isFinite(l)||l<0?null:l}function $(e,l){if(l===0)return"";const a=e/l;return Number.isInteger(a)?a.toString():z(a.toFixed(6))}function z(e){return e.includes(".")?e.replace(/\.?0+$/,""):e}function A(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const l=Number(e);return Number.isFinite(l)?l:null}function _(e,l){return l==null||l!==1?e.labelPlural??`${e.label}s`:e.label}const Y=({label:e,className:l,hideLabel:a=!1})=>{const t=R(),{isFieldRequired:d}=T();return r.jsxs("div",{className:S("space-y-3",l),children:[!a&&r.jsxs(C,{htmlFor:t.name,className:"block w-full",children:[e,d(t.name)&&r.jsx(k,{})]}),r.jsx(H,{id:t.name,value:t.state.value??null,onBlur:t.handleBlur,onChange:c=>t.handleChange(c)}),r.jsx(w,{fieldMeta:t.state.meta})]})};export{Y as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as h,r as c,j as e,L as j,B as F}from"./index-Bi48hI2z.js";import{F as f}from"./FieldInfo-Bxj_j8SJ.js";import{u as v,g as r,f as b,p as g,a as S,b as y,c as m,F as N,d as A}from"./use-settings-form-submit-CDRh-E9U.js";import{u as D}from"./useQuery-A4Hv_4uX.js";import{P as w}from"./Page-C3rteCZt.js";function B(){const{isFieldRequired:o}=v(r),u=h(),{data:p}=D(u.settings.get.queryOptions(void 0,{select:s=>{const n=b(s.config);return g(r,n,{includeUndefined:!0})}})),x=S(),a=y({...m,defaultValues:p??m.defaultValues,onSubmit:x,validators:{onSubmit:r}}),[i,d]=c.useState(null);return c.useEffect(()=>{i&&(document.getElementById(i)?.focus(),d(null))},[i]),e.jsx(w,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{children:e.jsx("h1",{className:"text-2xl font-bold",children:"General Settings"})}),e.jsx(N,{isFieldRequired:o,children:e.jsx("form",{className:"form flex flex-col gap-4",onSubmit:s=>{s.preventDefault(),s.stopPropagation(),a.handleSubmit()},noValidate:!0,children:e.jsxs("div",{className:"flex flex-wrap gap-6",children:[e.jsxs("fieldset",{className:"form-fieldset w-full gap-6",children:[e.jsx(a.AppField,{name:"includeNonVideos",children:s=>e.jsx(s.SwitchField,{label:"Include Non-Videos"})}),e.jsx(a.AppField,{name:"includeSingleEpisodes",children:s=>e.jsx(s.SwitchField,{label:"Include Single Episodes"})}),e.jsx("div",{className:"",children:e.jsx(a.AppField,{name:"snatchTimeout",validators:{},children:s=>e.jsx(s.DurationField,{label:"Snatch Timeout"})})}),e.jsx("div",{className:"",children:e.jsx(a.AppField,{name:"fuzzySizeThreshold",validators:{},children:s=>e.jsx(s.TextField,{label:"Fuzzy Size Threshold",type:"number"})})}),e.jsx("div",{className:"",children:e.jsx(a.AppField,{name:"seasonFromEpisodes",validators:{},children:s=>e.jsx(s.TextField,{label:"Season from Episodes",type:"number"})})}),e.jsx("div",{className:"",children:e.jsx(a.AppField,{name:"autoResumeMaxDownload",validators:{},children:s=>e.jsx(s.TextField,{label:"Auto-resume Max Download",type:"number"})})}),e.jsx("div",{className:"",children:e.jsx(a.Field,{name:"blockList",mode:"array",validators:{},children:s=>e.jsxs("div",{className:"space-y-3",children:[e.jsxs(j,{htmlFor:s.name,className:"block w-full",children:["Block List",o(s.name)&&e.jsx("span",{className:"pl-1 text-red-500",children:"*"})]}),s.state.value&&(s.state.value.length?s.state.value:[""]).map((n,l)=>e.jsxs("div",{className:"gap-y- mb-3 flex flex-col",children:[e.jsx(a.AppField,{name:`blockList[${l}]`,validators:{onBlur:A()},children:t=>e.jsx(t.ArrayField,{showDelete:s.state.value&&s.state.value?.length>1,index:l,onDelete:()=>{s.removeValue(l)}})}),e.jsx(a.Subscribe,{selector:t=>t.fieldMeta[`${s.name}[${l}]`],children:t=>e.jsx(f,{fieldMeta:t})})]},l)),e.jsx(F,{variant:"secondary",type:"button",onClick:()=>{s.pushValue("");const n=`${s.name}-${s.state.value?.length?s.state.value.length-1:0}`;d(n)},title:`Add ${s.name}`,children:"Add"})]})})})]}),e.jsx(a.AppForm,{children:e.jsx(a.SubmitButton,{})})]})})})]})})}export{B as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as t,u as h,k as m,j as e,N as y,i as n,B as x}from"./index-Bi48hI2z.js";import{P as p}from"./Page-C3rteCZt.js";const u=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],g=t("CircleCheck",u);const f=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],v=t("Info",f);const k=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],N=t("OctagonAlert",k);const j=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],b=t("RefreshCw",j),i={error:0,warning:1,info:2},M={error:"border-red-500/60 bg-red-500/10",warning:"border-amber-500/60 bg-amber-500/10",info:"border-sky-500/60 bg-sky-500/10"},w={error:N,warning:y,info:v};function _(){const d=h(),{data:{problems:o},refetch:l,isFetching:a}=m(d.health.get.queryOptions()),c=[...o].sort((s,r)=>i[s.severity]-i[r.severity]);return e.jsx(p,{breadcrumbs:["Diagnostics","Health"],actions:e.jsxs(x,{variant:"outline",size:"sm",onClick:()=>l(),disabled:a,children:[e.jsx(b,{className:n("mr-2 h-4 w-4",a&&"text-primary animate-spin")}),"Refresh"]}),children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Health"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"A quick snapshot of anything that needs attention. Issues are ordered by severity."})]}),c.length===0?e.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-emerald-500/30 bg-emerald-500/10 p-4 text-sm text-emerald-700",children:[e.jsx(g,{className:"h-5 w-5"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"All clear"}),e.jsx("p",{className:"text-muted-foreground",children:"No health issues detected. Everything looks good."})]})]}):e.jsx("div",{className:"space-y-3",children:c.map(s=>{const r=w[s.severity];return e.jsxs("div",{className:n("flex items-start gap-3 rounded-lg border p-4 text-sm",M[s.severity]),children:[e.jsx(r,{className:"mt-0.5 h-5 w-5 flex-shrink-0"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"font-medium",children:s.summary}),s.details&&e.jsx("p",{className:"text-muted-foreground",children:s.details})]})]},s.id)})})]})})}export{_ as component};
|