@mcp-graph-workflow/mcp-graph 5.26.0 → 5.28.0

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.
Files changed (128) hide show
  1. package/README.md +10 -9
  2. package/dist/api/router.d.ts.map +1 -1
  3. package/dist/api/router.js +2 -0
  4. package/dist/api/router.js.map +1 -1
  5. package/dist/api/routes/code-graph.js +1 -1
  6. package/dist/api/routes/code-graph.js.map +1 -1
  7. package/dist/api/routes/docs-reference.d.ts +7 -0
  8. package/dist/api/routes/docs-reference.d.ts.map +1 -0
  9. package/dist/api/routes/docs-reference.js +136 -0
  10. package/dist/api/routes/docs-reference.js.map +1 -0
  11. package/dist/api/routes/knowledge.d.ts.map +1 -1
  12. package/dist/api/routes/knowledge.js +90 -8
  13. package/dist/api/routes/knowledge.js.map +1 -1
  14. package/dist/cli/commands/update.js +1 -1
  15. package/dist/cli/commands/update.js.map +1 -1
  16. package/dist/core/code/code-indexer.d.ts.map +1 -1
  17. package/dist/core/code/code-indexer.js +11 -1
  18. package/dist/core/code/code-indexer.js.map +1 -1
  19. package/dist/core/config/ai-memory-generator.d.ts +2 -2
  20. package/dist/core/config/ai-memory-generator.d.ts.map +1 -1
  21. package/dist/core/config/ai-memory-generator.js +33 -176
  22. package/dist/core/config/ai-memory-generator.js.map +1 -1
  23. package/dist/core/config/config-schema.d.ts +10 -0
  24. package/dist/core/config/config-schema.d.ts.map +1 -1
  25. package/dist/core/config/config-schema.js +4 -1
  26. package/dist/core/config/config-schema.js.map +1 -1
  27. package/dist/core/config/ignore-templates.d.ts +20 -0
  28. package/dist/core/config/ignore-templates.d.ts.map +1 -0
  29. package/dist/core/config/ignore-templates.js +176 -0
  30. package/dist/core/config/ignore-templates.js.map +1 -0
  31. package/dist/core/config/reference-content.d.ts +35 -0
  32. package/dist/core/config/reference-content.d.ts.map +1 -0
  33. package/dist/core/config/reference-content.js +449 -0
  34. package/dist/core/config/reference-content.js.map +1 -0
  35. package/dist/core/deployer/deploy-readiness.d.ts +12 -0
  36. package/dist/core/deployer/deploy-readiness.d.ts.map +1 -0
  37. package/dist/core/deployer/deploy-readiness.js +102 -0
  38. package/dist/core/deployer/deploy-readiness.js.map +1 -0
  39. package/dist/core/docs/doc-generator.d.ts +23 -0
  40. package/dist/core/docs/doc-generator.d.ts.map +1 -0
  41. package/dist/core/docs/doc-generator.js +86 -0
  42. package/dist/core/docs/doc-generator.js.map +1 -0
  43. package/dist/core/docs/doc-updater.d.ts +10 -0
  44. package/dist/core/docs/doc-updater.d.ts.map +1 -0
  45. package/dist/core/docs/doc-updater.js +27 -0
  46. package/dist/core/docs/doc-updater.js.map +1 -0
  47. package/dist/core/docs/route-introspector.d.ts +19 -0
  48. package/dist/core/docs/route-introspector.d.ts.map +1 -0
  49. package/dist/core/docs/route-introspector.js +60 -0
  50. package/dist/core/docs/route-introspector.js.map +1 -0
  51. package/dist/core/docs/tool-introspector.d.ts +17 -0
  52. package/dist/core/docs/tool-introspector.d.ts.map +1 -0
  53. package/dist/core/docs/tool-introspector.js +82 -0
  54. package/dist/core/docs/tool-introspector.js.map +1 -0
  55. package/dist/core/planner/lifecycle-phase.d.ts +1 -1
  56. package/dist/core/planner/lifecycle-phase.d.ts.map +1 -1
  57. package/dist/core/planner/lifecycle-phase.js +52 -0
  58. package/dist/core/planner/lifecycle-phase.js.map +1 -1
  59. package/dist/core/rag/phase-metadata.d.ts.map +1 -1
  60. package/dist/core/rag/phase-metadata.js +5 -0
  61. package/dist/core/rag/phase-metadata.js.map +1 -1
  62. package/dist/core/store/knowledge-store.d.ts +7 -0
  63. package/dist/core/store/knowledge-store.d.ts.map +1 -1
  64. package/dist/core/store/knowledge-store.js +15 -0
  65. package/dist/core/store/knowledge-store.js.map +1 -1
  66. package/dist/mcp/init-project.d.ts.map +1 -1
  67. package/dist/mcp/init-project.js +68 -8
  68. package/dist/mcp/init-project.js.map +1 -1
  69. package/dist/mcp/server.js +45 -22
  70. package/dist/mcp/server.js.map +1 -1
  71. package/dist/mcp/tools/analyze.d.ts.map +1 -1
  72. package/dist/mcp/tools/analyze.js +40 -1
  73. package/dist/mcp/tools/analyze.js.map +1 -1
  74. package/dist/mcp/tools/help.d.ts +3 -0
  75. package/dist/mcp/tools/help.d.ts.map +1 -0
  76. package/dist/mcp/tools/help.js +74 -0
  77. package/dist/mcp/tools/help.js.map +1 -0
  78. package/dist/mcp/tools/index.d.ts.map +1 -1
  79. package/dist/mcp/tools/index.js +2 -0
  80. package/dist/mcp/tools/index.js.map +1 -1
  81. package/dist/mcp/tools/list-skills.js +1 -1
  82. package/dist/mcp/tools/list-skills.js.map +1 -1
  83. package/dist/mcp/tools/manage-skill.js +1 -1
  84. package/dist/mcp/tools/manage-skill.js.map +1 -1
  85. package/dist/mcp/tools/reindex-knowledge.js +1 -1
  86. package/dist/mcp/tools/reindex-knowledge.js.map +1 -1
  87. package/dist/mcp/tools/set-phase.js +1 -1
  88. package/dist/mcp/tools/set-phase.js.map +1 -1
  89. package/dist/schemas/deployer-schema.d.ts +34 -0
  90. package/dist/schemas/deployer-schema.d.ts.map +1 -0
  91. package/dist/schemas/deployer-schema.js +17 -0
  92. package/dist/schemas/deployer-schema.js.map +1 -0
  93. package/dist/schemas/skill.schema.d.ts +3 -0
  94. package/dist/schemas/skill.schema.d.ts.map +1 -1
  95. package/dist/schemas/skill.schema.js +1 -1
  96. package/dist/schemas/skill.schema.js.map +1 -1
  97. package/dist/web/dashboard/dist/assets/{benchmark-tab-BAfHRc8R.js → benchmark-tab-Dx9G7cqf.js} +1 -1
  98. package/dist/web/dashboard/dist/assets/{circle-alert-Xp4yHA83.js → circle-alert-B17sfIdw.js} +1 -1
  99. package/dist/web/dashboard/dist/assets/constants-Dd6A34aQ.js +1 -0
  100. package/dist/web/dashboard/dist/assets/{context-tab-WZWpYE4Q.js → context-tab-BX2hlI9H.js} +1 -1
  101. package/dist/web/dashboard/dist/assets/docs-tab-sxC7Gxc7.js +1 -0
  102. package/dist/web/dashboard/dist/assets/{gitnexus-tab-BL3gMYaZ.js → gitnexus-tab-DEcNhLvY.js} +1 -1
  103. package/dist/web/dashboard/dist/assets/{graph-section-B-cObR6x.js → graph-section-CsHifp70.js} +1 -1
  104. package/dist/web/dashboard/dist/assets/{graph-tab-DC5Iama3.js → graph-tab-D8ZSUyGR.js} +1 -1
  105. package/dist/web/dashboard/dist/assets/{graph-utils-CdV9peLO.js → graph-utils-D10A5HwE.js} +1 -1
  106. package/dist/web/dashboard/dist/assets/{index-iWhfMJa8.js → index-07Y4UWP1.js} +1 -1
  107. package/dist/web/dashboard/dist/assets/{index-z9HSPrpH.js → index-CVRN6scU.js} +1 -1
  108. package/dist/web/dashboard/dist/assets/index-DVIgWBT4.css +1 -0
  109. package/dist/web/dashboard/dist/assets/{index-DfEJaZLA.js → index-Dbaws8C6.js} +46 -41
  110. package/dist/web/dashboard/dist/assets/{insights-tab-Cu1cH-bN.js → insights-tab-DJAtypOr.js} +1 -1
  111. package/dist/web/dashboard/dist/assets/{journey-tab-BtqgC4Wj.js → journey-tab-CXtDFeGm.js} +1 -1
  112. package/dist/web/dashboard/dist/assets/languages-tab-03j3C58E.js +123 -0
  113. package/dist/web/dashboard/dist/assets/{loader-circle-MkZSJbxU.js → loader-circle-BNEIXs1s.js} +1 -1
  114. package/dist/web/dashboard/dist/assets/{logs-tab-CA2dPs0v.js → logs-tab-D3BE923P.js} +1 -1
  115. package/dist/web/dashboard/dist/assets/{lsp-tab-DuF6UV_3.js → lsp-tab-cac4ysh4.js} +1 -1
  116. package/dist/web/dashboard/dist/assets/memories-tab-BPJTM45d.js +1 -0
  117. package/dist/web/dashboard/dist/assets/{prd-backlog-tab-DtwzxFyr.js → prd-backlog-tab-5PCpKm0j.js} +1 -1
  118. package/dist/web/dashboard/dist/assets/{refresh-cw-VhHh0g7N.js → refresh-cw-CI2U4FGa.js} +1 -1
  119. package/dist/web/dashboard/dist/assets/{siebel-tab-DP6xoWD8.js → siebel-tab-BuhOpZO3.js} +3 -3
  120. package/dist/web/dashboard/dist/assets/{skills-tab-Tspln3N1.js → skills-tab-BHWwOBtm.js} +1 -1
  121. package/dist/web/dashboard/dist/assets/{style-CsU39IOg.js → style-BPgBTbDw.js} +1 -1
  122. package/dist/web/dashboard/dist/assets/{triangle-alert-ZnXg11jO.js → triangle-alert-aqoYdsgW.js} +1 -1
  123. package/dist/web/dashboard/dist/index.html +2 -2
  124. package/package.json +15 -2
  125. package/dist/web/dashboard/dist/assets/constants-lq4BIQN3.js +0 -1
  126. package/dist/web/dashboard/dist/assets/index-CTdsOcRa.css +0 -1
  127. package/dist/web/dashboard/dist/assets/languages-tab-BeJF5wPH.js +0 -128
  128. package/dist/web/dashboard/dist/assets/memories-tab-blOtravG.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-graph-workflow/mcp-graph",
3
- "version": "5.26.0",
3
+ "version": "5.28.0",
4
4
  "description": "MCP local-first PRD to task graph — transforms text into executable structure",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,7 +29,8 @@
29
29
  "typecheck": "tsc --noEmit",
30
30
  "lint": "eslint src/ --max-warnings 9",
31
31
  "lint:fix": "eslint src/ --fix",
32
- "setup:mcp": "bash scripts/setup-mcp.sh"
32
+ "setup:mcp": "bash scripts/setup-mcp.sh",
33
+ "prepare": "husky"
33
34
  },
34
35
  "keywords": [
35
36
  "mcp",
@@ -60,6 +61,8 @@
60
61
  "node": ">=20.0.0"
61
62
  },
62
63
  "devDependencies": {
64
+ "@commitlint/cli": "^20.5.0",
65
+ "@commitlint/config-conventional": "^20.5.0",
63
66
  "@eslint/js": "^10.0.1",
64
67
  "@playwright/test": "^1.58.2",
65
68
  "@types/adm-zip": "^0.5.8",
@@ -73,6 +76,8 @@
73
76
  "eslint": "^10.0.3",
74
77
  "eslint-plugin-security": "^4.0.0",
75
78
  "graphology": "^0.26.0",
79
+ "husky": "^9.1.7",
80
+ "lint-staged": "^16.4.0",
76
81
  "supertest": "^7.2.2",
77
82
  "tsx": "^4.21.0",
78
83
  "typescript-eslint": "^8.57.0",
@@ -108,5 +113,13 @@
108
113
  "typescript": {
109
114
  "optional": true
110
115
  }
116
+ },
117
+ "lint-staged": {
118
+ "src/**/*.ts": [
119
+ "eslint --max-warnings 9"
120
+ ],
121
+ "src/**/*.tsx": [
122
+ "eslint --max-warnings 9"
123
+ ]
111
124
  }
112
125
  }
@@ -1 +0,0 @@
1
- const e={epic:"#7c3aed",task:"#2196f3",subtask:"#10b981",requirement:"#f59e0b",constraint:"#ef4444",milestone:"#8b5cf6",acceptance_criteria:"#06b6d4",risk:"#f97316",decision:"#ec4899"},s={done:"#4caf50",in_progress:"#2196f3",blocked:"#f44336",ready:"#ff9800",backlog:"#9e9e9e"},o={done:"Done",in_progress:"In Progress",blocked:"Blocked",ready:"Ready",backlog:"Backlog"},a={depends_on:{color:"#6c757d",dashed:!1,label:"depends on"},blocks:{color:"#f44336",dashed:!0,label:"blocks"},parent_of:{color:"#7c3aed",dashed:!1,label:"parent of"},child_of:{color:"#10b981",dashed:!1,label:"child of"},related_to:{color:"#9e9e9e",dashed:!0,label:"related to"},priority_over:{color:"#ff9800",dashed:!0,label:"priority over"},implements:{color:"#2196f3",dashed:!1,label:"implements"},derived_from:{color:"#06b6d4",dashed:!0,label:"derived from"}},l=["backlog","ready","in_progress","blocked","done"],c=["epic","task","subtask","requirement","constraint","milestone","acceptance_criteria","risk","decision"],d=["ANALYZE","DESIGN","PLAN","IMPLEMENT","VALIDATE","REVIEW","HANDOFF","LISTENING"],t={ANALYZE:"#8b5cf6",DESIGN:"#3b82f6",PLAN:"#06b6d4",IMPLEMENT:"#10b981",VALIDATE:"#f59e0b",REVIEW:"#ef4444",HANDOFF:"#ec4899",LISTENING:"#6b7280"},n={function:"#4fc3f7",class:"#ce93d8",method:"#81c784",interface:"#4dd0e1",variable:"#ffd54f",module:"#b39ddb",file:"#90a4ae",folder:"#78909c"},r={imports:"#546e7a",calls:"#4fc3f7",belongs_to:"#ce93d8",extends:"#81c784",implements:"#4dd0e1"},b={belongs_to:"Contains",imports:"Imports",calls:"Calls",extends:"Extends",implements:"Implements"},f={screen:"#8b5cf6",view:"#3b82f6",applet:"#06b6d4",business_object:"#7c3aed",business_component:"#10b981",business_service:"#f59e0b",workflow:"#ef4444",table:"#78909c",integration_object:"#ec4899",web_template:"#6b7280",pick_list:"#a78bfa",field:"#94a3b8",link:"#64748b",column:"#94a3b8",control:"#94a3b8",list_column:"#94a3b8",menu_item:"#94a3b8",project:"#d97706"},i={uses:{color:"#2196f3",dashed:!1,label:"uses"},references:{color:"#6c757d",dashed:!0,label:"references"},contains:{color:"#7c3aed",dashed:!1,label:"contains"},extends:{color:"#10b981",dashed:!0,label:"extends"},based_on:{color:"#f59e0b",dashed:!1,label:"based on"},linked_to:{color:"#ef4444",dashed:!0,label:"linked to"},parent_of:{color:"#8b5cf6",dashed:!1,label:"parent of"}};export{l as A,n as C,a as E,d as L,e as N,t as P,s as S,c as a,r as b,b as c,o as d,f as e,i as f};
@@ -1 +0,0 @@
1
- /*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-900:oklch(39.6% .141 25.723);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-900:oklch(39.3% .095 152.535);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-indigo-500:oklch(58.5% .233 277.117);--color-purple-500:oklch(62.7% .265 303.9);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-lg:32rem;--container-5xl:64rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wider:.05em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-accent:#4263eb;--color-accent-light:#5c7cfa;--color-success:#4caf50;--color-warning:#ff9800;--color-danger:#f44336;--color-surface:#fff;--color-surface-alt:#f8f9fa;--color-surface-elevated:#e9ecef;--color-foreground:#212529;--color-muted:#475569;--color-edge:#dee2e6}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-full{top:100%}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.bottom-2{bottom:calc(var(--spacing) * 2)}.left-0{left:calc(var(--spacing) * 0)}.left-1\.5{left:calc(var(--spacing) * 1.5)}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-full{left:100%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-2{margin:calc(var(--spacing) * 2)}.m-4{margin:calc(var(--spacing) * 4)}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.-mt-20{margin-top:calc(var(--spacing) * -20)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-1\.5{margin-left:calc(var(--spacing) * 1.5)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-16{margin-left:calc(var(--spacing) * 16)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.\!h-2{height:calc(var(--spacing) * 2)!important}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:calc(var(--spacing) * 1)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-40{height:calc(var(--spacing) * 40)}.h-44{height:calc(var(--spacing) * 44)}.h-48{height:calc(var(--spacing) * 48)}.h-\[18px\]{height:18px}.h-full{height:100%}.h-screen{height:100vh}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[300px\]{max-height:300px}.max-h-\[400px\]{max-height:400px}.max-h-\[500px\]{max-height:500px}.min-h-0{min-height:calc(var(--spacing) * 0)}.\!w-2{width:calc(var(--spacing) * 2)!important}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/3{width:33.3333%}.w-1\/4{width:25%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-2\/3{width:66.6667%}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-64{width:calc(var(--spacing) * 64)}.w-80{width:calc(var(--spacing) * 80)}.w-96{width:calc(var(--spacing) * 96)}.w-\[18px\]{width:18px}.w-\[240px\]{width:240px}.w-full{width:100%}.w-px{width:1px}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-\[300px\]{max-width:300px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[200px\]{min-width:200px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-edge>:not(:last-child)){border-color:var(--color-edge)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-b-lg{border-bottom-right-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-2{border-right-style:var(--tw-border-style);border-right-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent{border-color:var(--color-accent)}.border-accent\/30{border-color:#4263eb4d}@supports (color:color-mix(in lab,red,red)){.border-accent\/30{border-color:color-mix(in oklab,var(--color-accent) 30%,transparent)}}.border-accent\/40{border-color:#4263eb66}@supports (color:color-mix(in lab,red,red)){.border-accent\/40{border-color:color-mix(in oklab,var(--color-accent) 40%,transparent)}}.border-blue-500\/30{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-500\/30{border-color:color-mix(in oklab,var(--color-blue-500) 30%,transparent)}}.border-current\/20{border-color:currentColor}@supports (color:color-mix(in lab,red,red)){.border-current\/20{border-color:color-mix(in oklab,currentcolor 20%,transparent)}}.border-danger\/20{border-color:#f4433633}@supports (color:color-mix(in lab,red,red)){.border-danger\/20{border-color:color-mix(in oklab,var(--color-danger) 20%,transparent)}}.border-edge{border-color:var(--color-edge)}.border-edge\/50{border-color:#dee2e680}@supports (color:color-mix(in lab,red,red)){.border-edge\/50{border-color:color-mix(in oklab,var(--color-edge) 50%,transparent)}}.border-green-500\/20{border-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.border-green-500\/20{border-color:color-mix(in oklab,var(--color-green-500) 20%,transparent)}}.border-green-500\/30{border-color:#00c7584d}@supports (color:color-mix(in lab,red,red)){.border-green-500\/30{border-color:color-mix(in oklab,var(--color-green-500) 30%,transparent)}}.border-green-500\/40{border-color:#00c75866}@supports (color:color-mix(in lab,red,red)){.border-green-500\/40{border-color:color-mix(in oklab,var(--color-green-500) 40%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500) 30%,transparent)}}.border-transparent{border-color:#0000}.border-warning{border-color:var(--color-warning)}.border-yellow-500\/30{border-color:#edb2004d}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/30{border-color:color-mix(in oklab,var(--color-yellow-500) 30%,transparent)}}.\!bg-blue-500{background-color:var(--color-blue-500)!important}.\!bg-green-500{background-color:var(--color-green-500)!important}.bg-\[\#06b6d420\]{background-color:#06b6d420}.bg-\[\#8b5cf6\]{background-color:#8b5cf6}.bg-\[\#ef4444\]{background-color:#ef4444}.bg-\[\#f59e0b\]{background-color:#f59e0b}.bg-accent{background-color:var(--color-accent)}.bg-accent\/5{background-color:#4263eb0d}@supports (color:color-mix(in lab,red,red)){.bg-accent\/5{background-color:color-mix(in oklab,var(--color-accent) 5%,transparent)}}.bg-accent\/10{background-color:#4263eb1a}@supports (color:color-mix(in lab,red,red)){.bg-accent\/10{background-color:color-mix(in oklab,var(--color-accent) 10%,transparent)}}.bg-accent\/15{background-color:#4263eb26}@supports (color:color-mix(in lab,red,red)){.bg-accent\/15{background-color:color-mix(in oklab,var(--color-accent) 15%,transparent)}}.bg-accent\/20{background-color:#4263eb33}@supports (color:color-mix(in lab,red,red)){.bg-accent\/20{background-color:color-mix(in oklab,var(--color-accent) 20%,transparent)}}.bg-accent\/60{background-color:#4263eb99}@supports (color:color-mix(in lab,red,red)){.bg-accent\/60{background-color:color-mix(in oklab,var(--color-accent) 60%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500) 10%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-danger\/5{background-color:#f443360d}@supports (color:color-mix(in lab,red,red)){.bg-danger\/5{background-color:color-mix(in oklab,var(--color-danger) 5%,transparent)}}.bg-danger\/15{background-color:#f4433626}@supports (color:color-mix(in lab,red,red)){.bg-danger\/15{background-color:color-mix(in oklab,var(--color-danger) 15%,transparent)}}.bg-edge{background-color:var(--color-edge)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-500\/10{background-color:#6a72821a}@supports (color:color-mix(in lab,red,red)){.bg-gray-500\/10{background-color:color-mix(in oklab,var(--color-gray-500) 10%,transparent)}}.bg-gray-500\/20{background-color:#6a728233}@supports (color:color-mix(in lab,red,red)){.bg-gray-500\/20{background-color:color-mix(in oklab,var(--color-gray-500) 20%,transparent)}}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/5{background-color:#00c7580d}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/5{background-color:color-mix(in oklab,var(--color-green-500) 5%,transparent)}}.bg-green-500\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/10{background-color:color-mix(in oklab,var(--color-green-500) 10%,transparent)}}.bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500) 20%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-green-900\/30{background-color:#0d542b4d}@supports (color:color-mix(in lab,red,red)){.bg-green-900\/30{background-color:color-mix(in oklab,var(--color-green-900) 30%,transparent)}}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-muted\/10{background-color:#4755691a}@supports (color:color-mix(in lab,red,red)){.bg-muted\/10{background-color:color-mix(in oklab,var(--color-muted) 10%,transparent)}}.bg-muted\/15{background-color:#47556926}@supports (color:color-mix(in lab,red,red)){.bg-muted\/15{background-color:color-mix(in oklab,var(--color-muted) 15%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\/10{background-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/10{background-color:color-mix(in oklab,var(--color-purple-500) 10%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500) 5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500) 15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-600\/20{background-color:#e4001433}@supports (color:color-mix(in lab,red,red)){.bg-red-600\/20{background-color:color-mix(in oklab,var(--color-red-600) 20%,transparent)}}.bg-red-900\/30{background-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.bg-red-900\/30{background-color:color-mix(in oklab,var(--color-red-900) 30%,transparent)}}.bg-success\/15{background-color:#4caf5026}@supports (color:color-mix(in lab,red,red)){.bg-success\/15{background-color:color-mix(in oklab,var(--color-success) 15%,transparent)}}.bg-surface{background-color:var(--color-surface)}.bg-surface-alt{background-color:var(--color-surface-alt)}.bg-surface-elevated{background-color:var(--color-surface-elevated)}.bg-surface\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-surface\/20{background-color:color-mix(in oklab,var(--color-surface) 20%,transparent)}}.bg-surface\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.bg-surface\/30{background-color:color-mix(in oklab,var(--color-surface) 30%,transparent)}}.bg-surface\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-surface\/50{background-color:color-mix(in oklab,var(--color-surface) 50%,transparent)}}.bg-transparent{background-color:#0000}.bg-warning\/10{background-color:#ff98001a}@supports (color:color-mix(in lab,red,red)){.bg-warning\/10{background-color:color-mix(in oklab,var(--color-warning) 10%,transparent)}}.bg-warning\/15{background-color:#ff980026}@supports (color:color-mix(in lab,red,red)){.bg-warning\/15{background-color:color-mix(in oklab,var(--color-warning) 15%,transparent)}}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-yellow-500\/5{background-color:#edb2000d}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/5{background-color:color-mix(in oklab,var(--color-yellow-500) 5%,transparent)}}.bg-yellow-500\/10{background-color:#edb2001a}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/10{background-color:color-mix(in oklab,var(--color-yellow-500) 10%,transparent)}}.bg-yellow-500\/20{background-color:#edb20033}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/20{background-color:color-mix(in oklab,var(--color-yellow-500) 20%,transparent)}}.bg-yellow-500\/60{background-color:#edb20099}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/60{background-color:color-mix(in oklab,var(--color-yellow-500) 60%,transparent)}}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-900{background-color:var(--color-zinc-900)}.fill-current{fill:currentColor}.object-cover{object-fit:cover}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pl-1{padding-left:calc(var(--spacing) * 1)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#3a3a5a\]{color:#3a3a5a}.text-\[\#06b6d4\]{color:#06b6d4}.text-accent{color:var(--color-accent)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-danger{color:var(--color-danger)}.text-foreground{color:var(--color-foreground)}.text-foreground\/80{color:#212529cc}@supports (color:color-mix(in lab,red,red)){.text-foreground\/80{color:color-mix(in oklab,var(--color-foreground) 80%,transparent)}}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-green-300\/80{color:#7bf1a8cc}@supports (color:color-mix(in lab,red,red)){.text-green-300\/80{color:color-mix(in oklab,var(--color-green-300) 80%,transparent)}}.text-green-400{color:var(--color-green-400)}.text-green-400\/70{color:#05df72b3}@supports (color:color-mix(in lab,red,red)){.text-green-400\/70{color:color-mix(in oklab,var(--color-green-400) 70%,transparent)}}.text-green-500{color:var(--color-green-500)}.text-indigo-500{color:var(--color-indigo-500)}.text-muted{color:var(--color-muted)}.text-muted\/30{color:#4755694d}@supports (color:color-mix(in lab,red,red)){.text-muted\/30{color:color-mix(in oklab,var(--color-muted) 30%,transparent)}}.text-muted\/40{color:#47556966}@supports (color:color-mix(in lab,red,red)){.text-muted\/40{color:color-mix(in oklab,var(--color-muted) 40%,transparent)}}.text-muted\/50{color:#47556980}@supports (color:color-mix(in lab,red,red)){.text-muted\/50{color:color-mix(in oklab,var(--color-muted) 50%,transparent)}}.text-muted\/60{color:#47556999}@supports (color:color-mix(in lab,red,red)){.text-muted\/60{color:color-mix(in oklab,var(--color-muted) 60%,transparent)}}.text-muted\/70{color:#475569b3}@supports (color:color-mix(in lab,red,red)){.text-muted\/70{color:color-mix(in oklab,var(--color-muted) 70%,transparent)}}.text-orange-400{color:var(--color-orange-400)}.text-purple-500{color:var(--color-purple-500)}.text-red-300\/80{color:#ffa3a3cc}@supports (color:color-mix(in lab,red,red)){.text-red-300\/80{color:color-mix(in oklab,var(--color-red-300) 80%,transparent)}}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-success{color:var(--color-success)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.text-yellow-400{color:var(--color-yellow-400)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-500\/80{color:#edb200cc}@supports (color:color-mix(in lab,red,red)){.text-yellow-500\/80{color:color-mix(in oklab,var(--color-yellow-500) 80%,transparent)}}.text-yellow-600{color:var(--color-yellow-600)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.accent-accent{accent-color:var(--color-accent)}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-accent{--tw-ring-color:var(--color-accent)}.ring-orange-400\/50{--tw-ring-color:#ff8b1a80}@supports (color:color-mix(in lab,red,red)){.ring-orange-400\/50{--tw-ring-color:color-mix(in oklab, var(--color-orange-400) 50%, transparent)}}.ring-red-500\/60{--tw-ring-color:#fb2c3699}@supports (color:color-mix(in lab,red,red)){.ring-red-500\/60{--tw-ring-color:color-mix(in oklab, var(--color-red-500) 60%, transparent)}}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\[1px\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media(hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.file\:mr-2::file-selector-button{margin-right:calc(var(--spacing) * 2)}.file\:rounded-md::file-selector-button{border-radius:var(--radius-md)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-accent::file-selector-button{background-color:var(--color-accent)}.file\:px-3::file-selector-button{padding-inline:calc(var(--spacing) * 3)}.file\:py-1\.5::file-selector-button{padding-block:calc(var(--spacing) * 1.5)}.file\:text-xs::file-selector-button{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-white::file-selector-button{color:var(--color-white)}.placeholder\:text-muted::placeholder{color:var(--color-muted)}.placeholder\:text-muted\/50::placeholder{color:#47556980}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-muted\/50::placeholder{color:color-mix(in oklab,var(--color-muted) 50%,transparent)}}@media(hover:hover){.hover\:border-accent:hover{border-color:var(--color-accent)}.hover\:border-accent\/50:hover{border-color:#4263eb80}@supports (color:color-mix(in lab,red,red)){.hover\:border-accent\/50:hover{border-color:color-mix(in oklab,var(--color-accent) 50%,transparent)}}.hover\:border-accent\/60:hover{border-color:#4263eb99}@supports (color:color-mix(in lab,red,red)){.hover\:border-accent\/60:hover{border-color:color-mix(in oklab,var(--color-accent) 60%,transparent)}}.hover\:border-foreground:hover{border-color:var(--color-foreground)}.hover\:border-red-500\/50:hover{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.hover\:border-red-500\/50:hover{border-color:color-mix(in oklab,var(--color-red-500) 50%,transparent)}}.hover\:bg-accent-light:hover{background-color:var(--color-accent-light)}.hover\:bg-accent\/10:hover{background-color:#4263eb1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/10:hover{background-color:color-mix(in oklab,var(--color-accent) 10%,transparent)}}.hover\:bg-accent\/20:hover{background-color:#4263eb33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/20:hover{background-color:color-mix(in oklab,var(--color-accent) 20%,transparent)}}.hover\:bg-accent\/90:hover{background-color:#4263ebe6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/90:hover{background-color:color-mix(in oklab,var(--color-accent) 90%,transparent)}}.hover\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\:bg-edge:hover{background-color:var(--color-edge)}.hover\:bg-green-500:hover{background-color:var(--color-green-500)}.hover\:bg-green-500\/5:hover{background-color:#00c7580d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-green-500\/5:hover{background-color:color-mix(in oklab,var(--color-green-500) 5%,transparent)}}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.hover\:bg-red-600\/40:hover{background-color:#e4001466}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-600\/40:hover{background-color:color-mix(in oklab,var(--color-red-600) 40%,transparent)}}.hover\:bg-surface:hover{background-color:var(--color-surface)}.hover\:bg-surface-alt:hover{background-color:var(--color-surface-alt)}.hover\:bg-surface-elevated:hover{background-color:var(--color-surface-elevated)}.hover\:bg-warning\/10:hover{background-color:#ff98001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-warning\/10:hover{background-color:color-mix(in oklab,var(--color-warning) 10%,transparent)}}.hover\:bg-zinc-600:hover{background-color:var(--color-zinc-600)}.hover\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\:text-accent:hover{color:var(--color-accent)}.hover\:text-foreground:hover{color:var(--color-foreground)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:text-red-500:hover{color:var(--color-red-500)}.hover\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:file\:opacity-90:hover::file-selector-button{opacity:.9}}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:fixed:focus{position:fixed}.focus\:top-2:focus{top:calc(var(--spacing) * 2)}.focus\:left-2:focus{left:calc(var(--spacing) * 2)}.focus\:z-\[100\]:focus{z-index:100}.focus\:rounded-lg:focus{border-radius:var(--radius-lg)}.focus\:border-accent:focus{border-color:var(--color-accent)}.focus\:border-accent\/50:focus{border-color:#4263eb80}@supports (color:color-mix(in lab,red,red)){.focus\:border-accent\/50:focus{border-color:color-mix(in oklab,var(--color-accent) 50%,transparent)}}.focus\:bg-accent:focus{background-color:var(--color-accent)}.focus\:px-4:focus{padding-inline:calc(var(--spacing) * 4)}.focus\:py-2:focus{padding-block:calc(var(--spacing) * 2)}.focus\:text-sm:focus{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.focus\:font-medium:focus{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.focus\:text-white:focus{color:var(--color-white)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-accent:focus{--tw-ring-color:var(--color-accent)}.focus\:ring-accent\/50:focus{--tw-ring-color:#4263eb80}@supports (color:color-mix(in lab,red,red)){.focus\:ring-accent\/50:focus{--tw-ring-color:color-mix(in oklab, var(--color-accent) 50%, transparent)}}.focus\:ring-warning:focus{--tw-ring-color:var(--color-warning)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-surface\/50:disabled{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.disabled\:bg-surface\/50:disabled{background-color:color-mix(in oklab,var(--color-surface) 50%,transparent)}}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media(prefers-reduced-motion:reduce){.motion-reduce\:animate-none{animation:none}}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media(min-width:48rem){.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-60{width:calc(var(--spacing) * 60)}.md\:w-\[30\%\]{width:30%}.md\:min-w-\[280px\]{min-width:280px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.md\:border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.md\:px-6{padding-inline:calc(var(--spacing) * 6)}.md\:pl-0{padding-left:calc(var(--spacing) * 0)}}@media(min-width:64rem){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media(prefers-color-scheme:dark){.dark\:text-yellow-400{color:var(--color-yellow-400)}}}.dark{--color-surface:#1a1b1e;--color-surface-alt:#25262b;--color-surface-elevated:#2c2e33;--color-foreground:#c1c2c5;--color-muted:#909296;--color-edge:#373a40}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:var(--color-surface);color:var(--color-foreground);margin:0;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:16px;line-height:1.5;transition:background .2s,color .2s}.react-flow__node{font-size:12px}.react-flow__attribution{display:none!important}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:var(--color-surface-alt)}::-webkit-scrollbar-thumb{background:var(--color-edge);border-radius:3px}button,[role=tab],[role=button],a{cursor:pointer}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}
@@ -1,128 +0,0 @@
1
- import{c as y,r as u,a as C,j as e,d as K,u as ie,L as xe,G as B}from"./index-DfEJaZLA.js";import{L as A}from"./loader-circle-MkZSJbxU.js";import{T as W,C as te,a as se,S as ae,F as re}from"./triangle-alert-ZnXg11jO.js";import{R as J}from"./refresh-cw-VhHh0g7N.js";/**
2
- * @license lucide-react v1.7.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const ue=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],me=y("arrow-left-right",ue);/**
7
- * @license lucide-react v1.7.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const he=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],pe=y("arrow-left",he);/**
12
- * @license lucide-react v1.7.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const ge=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],q=y("book-open",ge);/**
17
- * @license lucide-react v1.7.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const fe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],I=y("check",fe);/**
22
- * @license lucide-react v1.7.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const be=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],je=y("circle-check-big",be);/**
27
- * @license lucide-react v1.7.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const Ne=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ne=y("circle-check",Ne);/**
32
- * @license lucide-react v1.7.0 - ISC
33
- *
34
- * This source code is licensed under the ISC license.
35
- * See the LICENSE file in the root directory of this source tree.
36
- */const ye=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ve=y("circle-x",ye);/**
37
- * @license lucide-react v1.7.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */const we=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Ce=y("clock",we);/**
42
- * @license lucide-react v1.7.0 - ISC
43
- *
44
- * This source code is licensed under the ISC license.
45
- * See the LICENSE file in the root directory of this source tree.
46
- */const ke=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Z=y("copy",ke);/**
47
- * @license lucide-react v1.7.0 - ISC
48
- *
49
- * This source code is licensed under the ISC license.
50
- * See the LICENSE file in the root directory of this source tree.
51
- */const Se=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Me=y("cpu",Se);/**
52
- * @license lucide-react v1.7.0 - ISC
53
- *
54
- * This source code is licensed under the ISC license.
55
- * See the LICENSE file in the root directory of this source tree.
56
- */const $e=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],U=y("download",$e);/**
57
- * @license lucide-react v1.7.0 - ISC
58
- *
59
- * This source code is licensed under the ISC license.
60
- * See the LICENSE file in the root directory of this source tree.
61
- */const ze=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Fe=y("eye",ze);/**
62
- * @license lucide-react v1.7.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */const Le=[["path",{d:"M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5",key:"4pqfef"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 12v-1",key:"1ej8lb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M8 7V6",key:"1nbb54"}],["circle",{cx:"8",cy:"20",r:"2",key:"ckkr5m"}]],Te=y("file-archive",Le);/**
67
- * @license lucide-react v1.7.0 - ISC
68
- *
69
- * This source code is licensed under the ISC license.
70
- * See the LICENSE file in the root directory of this source tree.
71
- */const Ae=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],Re=y("file-code-corner",Ae);/**
72
- * @license lucide-react v1.7.0 - ISC
73
- *
74
- * This source code is licensed under the ISC license.
75
- * See the LICENSE file in the root directory of this source tree.
76
- */const Pe=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],De=y("files",Pe);/**
77
- * @license lucide-react v1.7.0 - ISC
78
- *
79
- * This source code is licensed under the ISC license.
80
- * See the LICENSE file in the root directory of this source tree.
81
- */const _e=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Ee=y("folder",_e);/**
82
- * @license lucide-react v1.7.0 - ISC
83
- *
84
- * This source code is licensed under the ISC license.
85
- * See the LICENSE file in the root directory of this source tree.
86
- */const Ie=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],Ue=y("inbox",Ie);/**
87
- * @license lucide-react v1.7.0 - ISC
88
- *
89
- * This source code is licensed under the ISC license.
90
- * See the LICENSE file in the root directory of this source tree.
91
- */const Oe=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],le=y("play",Oe);/**
92
- * @license lucide-react v1.7.0 - ISC
93
- *
94
- * This source code is licensed under the ISC license.
95
- * See the LICENSE file in the root directory of this source tree.
96
- */const Ge=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Ve=y("rotate-ccw",Ge);/**
97
- * @license lucide-react v1.7.0 - ISC
98
- *
99
- * This source code is licensed under the ISC license.
100
- * See the LICENSE file in the root directory of this source tree.
101
- */const He=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Be=y("shield",He);/**
102
- * @license lucide-react v1.7.0 - ISC
103
- *
104
- * This source code is licensed under the ISC license.
105
- * See the LICENSE file in the root directory of this source tree.
106
- */const Je=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],qe=y("sparkles",Je);/**
107
- * @license lucide-react v1.7.0 - ISC
108
- *
109
- * This source code is licensed under the ISC license.
110
- * See the LICENSE file in the root directory of this source tree.
111
- */const Ke=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],We=y("trash-2",Ke);/**
112
- * @license lucide-react v1.7.0 - ISC
113
- *
114
- * This source code is licensed under the ISC license.
115
- * See the LICENSE file in the root directory of this source tree.
116
- */const Ze=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Qe=y("upload",Ze),Q={phase:"idle",analysis:null,prepareResult:null,finalizeResult:null,error:null,loading:!1};function Xe(){var l;const[s,t]=u.useState(Q),a=u.useCallback(async(c,m,x="snippet")=>{t(d=>({...d,phase:"analyzing",loading:!0,error:null}));try{const p=new Promise((b,r)=>setTimeout(()=>r(new Error("Analysis timed out after 30s. Please try again.")),3e4)),g=await Promise.race([C.translationCreateJob(c,m,x),p]);t({phase:"prepared",analysis:g.analysis,prepareResult:g,finalizeResult:null,error:null,loading:!1})}catch(d){t(p=>({...p,phase:"error",error:d instanceof Error?d.message:"Analysis failed",loading:!1}))}},[]),n=u.useCallback(async c=>{var x;const m=(x=s.prepareResult)==null?void 0:x.jobId;if(!m){t(d=>({...d,phase:"error",error:"No active job to finalize"}));return}t(d=>({...d,phase:"finalizing",loading:!0,error:null}));try{const d=await C.translationFinalize(m,c);t(p=>({...p,phase:"done",finalizeResult:d,loading:!1}))}catch(d){t(p=>({...p,phase:"error",error:d instanceof Error?d.message:"Finalize failed",loading:!1}))}},[(l=s.prepareResult)==null?void 0:l.jobId]),o=u.useCallback(()=>{t(Q)},[]);return[s,{analyze:a,finalize:n,reset:o}]}function Ye(){const[s,t]=u.useState([]),[a,n]=u.useState(null),[o,l]=u.useState(!0),[c,m]=u.useState(null),x=u.useCallback(async()=>{l(!0),m(null);try{const[p,g]=await Promise.all([C.translationListJobs(),C.translationStats()]);t(p.jobs),n(g)}catch(p){m(p instanceof Error?p.message:"Failed to load history")}finally{l(!1)}},[]),d=u.useCallback(async p=>{try{await C.translationDeleteJob(p),t(b=>b.filter(r=>r.id!==p));const g=await C.translationStats();n(g)}catch(g){m(g instanceof Error?g.message:"Delete failed")}},[]);return u.useEffect(()=>{x()},[x]),[{jobs:s,stats:a,loading:o,error:c},{refresh:x,deleteJob:d}]}const X={mode:"idle",project:null,files:[],summary:null,selectedFileId:null,error:null,loading:!1};function et(){var b;const[s,t]=u.useState(X),a=u.useRef(null),n=u.useCallback(async(r,i,h)=>{t(f=>({...f,mode:"uploading",loading:!0,error:null}));try{const f=await C.translationUploadProject(r,i,h);a.current=f.project.id,t({mode:"ready",project:f.project,files:f.files,summary:null,selectedFileId:null,error:null,loading:!1})}catch(f){t(w=>({...w,mode:"error",error:f instanceof Error?f.message:"Upload failed",loading:!1}))}},[]),o=u.useCallback(async r=>{t(i=>({...i,loading:!0,error:null}));try{const i=await C.translationGetProject(r);a.current=i.project.id,t({mode:"ready",project:i.project,files:i.files,summary:null,selectedFileId:null,error:null,loading:!1})}catch(i){t(h=>({...h,mode:"error",error:i instanceof Error?i.message:"Failed to load project",loading:!1}))}},[]),l=u.useCallback(r=>{t(i=>({...i,selectedFileId:r}))},[]),c=u.useCallback(async r=>{const i=a.current;if(!i){t(h=>({...h,mode:"error",error:"No active project"}));return}t(h=>({...h,loading:!0,error:null}));try{await C.translationPrepareFiles(i,r);const h=await C.translationGetProject(i);t(f=>({...f,project:h.project,files:h.files,loading:!1}))}catch(h){t(f=>({...f,error:h instanceof Error?h.message:"Prepare failed",loading:!1}))}},[]),m=u.useCallback(async(r,i)=>{const h=a.current;if(!h){t(f=>({...f,mode:"error",error:"No active project"}));return}t(f=>({...f,loading:!0,error:null}));try{await C.translationFinalizeFile(h,r,i);const f=await C.translationGetProject(h);t(w=>({...w,project:f.project,files:f.files,loading:!1}))}catch(f){t(w=>({...w,error:f instanceof Error?f.message:"Finalize failed",loading:!1}))}},[]),x=u.useCallback(async()=>{var i;const r=a.current;if(!r){t(h=>({...h,mode:"error",error:"No active project"}));return}t(h=>({...h,loading:!0,error:null}));try{const h=await C.translationDownloadProject(r),f=(i=s.project)!=null&&i.name?`${s.project.name}-translated.zip`:"translated-project.zip",w=URL.createObjectURL(h),k=document.createElement("a");k.href=w,k.download=f,k.click(),URL.revokeObjectURL(w),t(S=>({...S,loading:!1}))}catch(h){t(f=>({...f,error:h instanceof Error?h.message:"Download failed",loading:!1}))}},[(b=s.project)==null?void 0:b.name]),d=u.useCallback(async r=>{const i=a.current;if(!i){t(h=>({...h,mode:"error",error:"No active project"}));return}t(h=>({...h,loading:!0,error:null}));try{const h=await C.translationDownloadFile(i,r),f=s.files.find($=>$.id===r),w=f!=null&&f.filePath?f.filePath.split("/").pop()??"translated-file":"translated-file",k=URL.createObjectURL(h),S=document.createElement("a");S.href=k,S.download=w,S.click(),URL.revokeObjectURL(k),t($=>({...$,loading:!1}))}catch(h){t(f=>({...f,error:h instanceof Error?h.message:"File download failed",loading:!1}))}},[s.files]),p=u.useCallback(async()=>{const r=a.current;if(!r){t(i=>({...i,mode:"error",error:"No active project"}));return}t(i=>({...i,loading:!0,error:null}));try{const i=await C.translationProjectSummary(r);t(h=>({...h,summary:i,loading:!1}))}catch(i){t(h=>({...h,error:i instanceof Error?i.message:"Failed to refresh summary",loading:!1}))}},[]),g=u.useCallback(()=>{a.current=null,t(X)},[]);return[s,{upload:n,loadProject:o,selectFile:l,prepareFiles:c,finalizeFile:m,downloadProject:x,downloadFile:d,refreshSummary:p,reset:g}]}const tt=["python","javascript","typescript","java","csharp","go","rust","ruby","php","swift","kotlin","scala","cpp"],st=["snippet","function","module"];function at({sourceCode:s,setSourceCode:t,targetLanguage:a,setTargetLanguage:n,scope:o,setScope:l,generatedCode:c,setGeneratedCode:m,translation:x,onAnalyze:d,onFinalize:p,onReset:g}){var T,_,E;const{phase:b,prepareResult:r,error:i,loading:h}=x,f=b==="idle"||b==="error",w=b==="prepared",k=b==="done",[S,$]=u.useState(!1),G=()=>{r!=null&&r.prompt&&(navigator.clipboard.writeText(r.prompt),$(!0),setTimeout(()=>$(!1),2e3))};return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-edge",children:[e.jsx("h3",{className:"text-xs font-semibold text-foreground",children:"Source Code"}),e.jsx("p",{className:"text-[10px] text-muted mt-0.5",children:"Paste the code you want to translate"})]}),e.jsxs("div",{className:"p-4 relative",children:[!f&&!w&&!k&&e.jsx("div",{className:"absolute inset-0 bg-surface/20 backdrop-blur-[1px] rounded-lg z-10 pointer-events-none"}),e.jsx("textarea",{value:s,onChange:v=>t(v.target.value),placeholder:"// Paste your code here...",rows:10,disabled:!f,className:"w-full px-3 py-2 text-xs rounded-md border border-edge bg-surface text-foreground placeholder:text-muted focus:outline-none focus:ring-1 focus:ring-accent font-mono disabled:opacity-60 disabled:cursor-not-allowed disabled:bg-surface/50"}),e.jsxs("div",{className:"flex items-center gap-3 mt-3",children:[e.jsxs("div",{className:"flex-1 grid grid-cols-3 gap-3",children:[(T=x.analysis)!=null&&T.detectedLanguage?e.jsxs("div",{className:"px-3 py-1.5 text-xs rounded-md border border-edge bg-surface/50 text-muted flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[10px] text-muted/70",children:"from:"}),e.jsx("span",{className:"text-foreground font-medium",children:x.analysis.detectedLanguage})]}):e.jsx("div",{className:"px-3 py-1.5 text-xs rounded-md border border-edge/50 bg-surface/30 text-muted/50 flex items-center gap-1.5",children:e.jsx("span",{className:"text-[10px]",children:"from: auto-detect"})}),e.jsx("select",{value:a,onChange:v=>n(v.target.value),disabled:!f,className:"px-3 py-1.5 text-xs rounded-md border border-edge bg-surface text-foreground focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50",children:tt.map(v=>e.jsx("option",{value:v,children:v},v))}),e.jsx("div",{className:"flex gap-1",children:st.map(v=>e.jsx("button",{onClick:()=>l(v),disabled:!f,className:`flex-1 px-2 py-1.5 text-[10px] font-medium rounded-md border transition-colors disabled:opacity-50 ${o===v?"border-accent bg-accent/10 text-accent":"border-edge bg-surface text-muted hover:text-foreground"}`,children:v},v))})]}),f&&e.jsxs("button",{onClick:d,disabled:!s.trim()||h,className:"flex items-center gap-1.5 px-4 py-1.5 text-xs font-medium rounded-md bg-accent text-white hover:opacity-90 disabled:opacity-50 transition-opacity",children:[h?e.jsx(A,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(le,{className:"w-3.5 h-3.5"}),h?"Analyzing...":"Analyze"]}),(w||k)&&e.jsxs("button",{onClick:g,className:"flex items-center gap-1.5 px-4 py-1.5 text-xs font-medium rounded-md border border-edge text-muted hover:text-foreground transition-colors",children:[e.jsx(Ve,{className:"w-3.5 h-3.5"}),"New"]}),k&&((E=(_=x.finalizeResult)==null?void 0:_.job)==null?void 0:E.targetCode)&&e.jsxs("button",{onClick:()=>{var N,M;const v=(M=(N=x.finalizeResult)==null?void 0:N.job)==null?void 0:M.targetCode;if(!v)return;const j=new Blob([v],{type:"text/plain"}),F=URL.createObjectURL(j),L=document.createElement("a");L.href=F,L.download="translated.txt",L.click(),URL.revokeObjectURL(F)},className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md border border-green-500/30 text-green-500 text-xs font-medium hover:bg-green-500/5 transition-colors",children:[e.jsx(U,{className:"w-3 h-3"}),"Download"]})]})]})]}),i&&e.jsx("div",{className:"px-4 py-3 rounded-lg border border-red-500/30 bg-red-500/5 text-xs text-red-400",children:i}),w&&r&&e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-edge flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-xs font-semibold text-foreground",children:"AI Prompt"}),e.jsx("p",{className:"text-[10px] text-muted mt-0.5",children:"Copy this prompt, generate the code with AI, then paste the result below"})]}),e.jsxs("button",{onClick:G,className:`flex items-center gap-1 px-2 py-1 text-[10px] rounded border transition-all duration-200 ${S?"border-green-500/30 text-green-500 bg-green-500/5":"border-edge text-muted hover:text-foreground"}`,children:[S?e.jsx(I,{className:"w-3 h-3"}):e.jsx(Z,{className:"w-3 h-3"}),S?"Copied!":"Copy"]})]}),e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsx("pre",{className:"text-[10px] p-3 rounded-md bg-surface border border-edge max-h-48 overflow-auto whitespace-pre-wrap text-muted font-mono",children:r.prompt.length>3e3?r.prompt.slice(0,3e3)+`
117
-
118
- ... (truncated, use Copy for full prompt)`:r.prompt}),e.jsx("textarea",{value:c,onChange:v=>m(v.target.value),placeholder:"// Paste the AI-generated code here...",rows:8,className:"w-full px-3 py-2 text-xs rounded-md border border-edge bg-surface text-foreground placeholder:text-muted focus:outline-none focus:ring-1 focus:ring-accent font-mono"}),e.jsxs("button",{onClick:p,disabled:!c.trim()||h,className:"flex items-center gap-1.5 px-4 py-1.5 text-xs font-medium rounded-md bg-green-600 text-white hover:opacity-90 disabled:opacity-50 transition-opacity",children:[h?e.jsx(A,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(je,{className:"w-3.5 h-3.5"}),h?"Finalizing...":"Finalize Translation"]})]})]})]})}function rt(s){const t=s.totalConstructs;if(t===0)return{percentage:100,ruleCount:0,aiCount:0,total:0,aiConstructs:[]};const a=s.ambiguousConstructs??[],n=a.length,l=s.constructs.map(m=>m.canonicalName).filter(m=>!a.includes(m)).length,c=t>0?Math.round((t-n)/t*100):100;return{percentage:Math.min(100,Math.max(0,c)),ruleCount:l,aiCount:n,total:t,aiConstructs:a}}function nt(s){return s>=90?{border:"border-green-500/30",bg:"bg-green-500/5",text:"text-green-500",bar:"bg-green-500"}:s>=50?{border:"border-yellow-500/30",bg:"bg-yellow-500/5",text:"text-yellow-500",bar:"bg-yellow-500"}:{border:"border-red-500/30",bg:"bg-red-500/5",text:"text-red-500",bar:"bg-red-500"}}function O({analysis:s,deterministicPct:t,totalConstructs:a,isProjectLevel:n,onDownload:o,aiPrompt:l}){const[c,m]=u.useState(!1),x=s?rt(s):{percentage:t??0,ruleCount:Math.round((t??0)/100*(a??0)),aiCount:Math.round((100-(t??0))/100*(a??0)),total:a??0,aiConstructs:[]},d=nt(x.percentage),p=x.percentage===100,g=100-x.percentage,b=u.useCallback(()=>{l&&navigator.clipboard.writeText(l).then(()=>{m(!0),setTimeout(()=>m(!1),2e3)})},[l]);return x.total===0&&!t?null:e.jsxs("div",{className:`rounded-lg border ${d.border} ${d.bg} p-4 space-y-3`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:`text-3xl font-bold ${d.text}`,children:[x.percentage,"%"]}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-xs font-semibold text-foreground",children:[n?"Project ":"","Deterministic Translation"]}),e.jsxs("p",{className:"text-[10px] text-muted",children:[x.ruleCount,"/",x.total," constructs by rules",x.aiCount>0&&` · ${x.aiCount} need AI`]})]})]}),p&&e.jsxs("span",{className:"flex items-center gap-1 px-2 py-1 rounded-md bg-green-500/10 text-green-500 text-[10px] font-medium",children:[e.jsx(ne,{className:"w-3 h-3"}),"No AI Required"]})]}),e.jsxs("div",{className:"h-2.5 rounded-full bg-surface overflow-hidden flex",role:"progressbar","aria-valuenow":x.percentage,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Deterministic translation: ${x.percentage}%`,children:[x.percentage>0&&e.jsx("div",{className:`h-full ${d.bar} transition-all duration-500`,style:{width:`${x.percentage}%`}}),g>0&&e.jsx("div",{className:"h-full bg-yellow-500/60 transition-all duration-500",style:{width:`${g}%`}})]}),e.jsxs("div",{className:"flex items-center gap-4 text-[10px]",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:`w-2 h-2 rounded-full ${d.bar}`}),e.jsxs("span",{className:"text-muted",children:["Rule-based (",x.ruleCount,")"]})]}),x.aiCount>0&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-yellow-500/60"}),e.jsxs("span",{className:"text-muted",children:["AI-assisted (",x.aiCount,")"]})]})]}),x.aiConstructs.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:x.aiConstructs.map(r=>e.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 text-[10px] rounded border border-yellow-500/30 bg-yellow-500/5 text-yellow-500",children:[e.jsx(qe,{className:"w-2.5 h-2.5"}),r]},r))}),e.jsx("div",{className:"flex items-center gap-2 pt-1",children:p&&o?e.jsxs("button",{onClick:o,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md bg-green-600 text-white text-xs font-medium hover:bg-green-700 transition-colors w-full justify-center",children:[e.jsx(U,{className:"w-3.5 h-3.5"}),"Ready to Download"]}):e.jsxs(e.Fragment,{children:[l&&e.jsxs("button",{onClick:b,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md bg-accent/10 text-accent text-xs font-medium hover:bg-accent/20 transition-colors",children:[c?e.jsx(I,{className:"w-3.5 h-3.5"}):e.jsx(Z,{className:"w-3.5 h-3.5"}),c?"Copied!":`Copy AI Prompt for ${x.aiCount} construct${x.aiCount!==1?"s":""}`]}),o&&e.jsxs("button",{onClick:o,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md border border-edge text-foreground text-xs font-medium hover:bg-surface transition-colors",children:[e.jsx(U,{className:"w-3.5 h-3.5"}),"Download Partial"]})]})})]})}function Y({value:s,max:t=100,label:a}){const n=Math.min(100,Math.round(s/t*100)),o=n>=80?"bg-green-500":n>=50?"bg-yellow-500":"bg-red-500";return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-[10px]",children:[e.jsx("span",{className:"text-muted",children:a}),e.jsxs("span",{className:"text-foreground font-medium",children:[n,"%"]})]}),e.jsx("div",{className:"h-1.5 rounded-full bg-surface overflow-hidden",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`${a}: ${n}%`,children:e.jsx("div",{className:`h-full rounded-full ${o} transition-all duration-500`,style:{width:`${n}%`}})})]})}function oe({analysis:s}){return s?e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-edge flex items-center gap-2",children:[e.jsx(Me,{className:"w-3.5 h-3.5 text-accent"}),e.jsx("h3",{className:"text-xs font-semibold text-foreground",children:"Analysis Results"})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"px-2 py-0.5 text-[10px] font-medium rounded bg-accent/10 text-accent",children:s.detectedLanguage}),s.detectedConfidence!=null&&e.jsxs("span",{className:"text-[10px] text-muted",children:[Math.round(s.detectedConfidence*100),"% confidence"]}),e.jsxs("span",{className:"text-[10px] text-muted",children:[s.totalConstructs," constructs detected"]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(Y,{value:s.complexityScore,label:"Complexity"}),e.jsx(Y,{value:s.estimatedTranslatability,label:"Translatability"})]}),s.constructs.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-muted mb-2",children:"Detected Constructs"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.constructs.map(t=>e.jsxs("span",{className:"px-1.5 py-0.5 text-[10px] rounded border border-edge bg-surface text-foreground",title:`count: ${t.count}, confidence: ${Math.round(t.confidence*100)}%`,children:[t.canonicalName," ",e.jsxs("span",{className:"text-muted",children:["x",t.count]})]},t.canonicalName))})]}),e.jsx(O,{analysis:s}),s.ambiguousConstructs&&s.ambiguousConstructs.length>0&&e.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded-md border border-yellow-500/30 bg-yellow-500/5",children:[e.jsx(W,{className:"w-3.5 h-3.5 text-yellow-500 mt-0.5 shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-medium text-yellow-500",children:"Ambiguous Constructs"}),e.jsx("p",{className:"text-[10px] text-muted mt-0.5",children:s.ambiguousConstructs.join(", ")})]})]})]})]}):null}function lt({score:s}){const t=Math.round(s*100),a=t>=80?"bg-green-500/10 text-green-500":t>=50?"bg-yellow-500/10 text-yellow-500":"bg-red-500/10 text-red-500";return e.jsxs("span",{className:`px-2 py-0.5 text-xs font-semibold rounded ${a}`,children:[t,"%"]})}const ot={high:"bg-red-500/10 text-red-500",medium:"bg-yellow-500/10 text-yellow-500",low:"bg-blue-500/10 text-blue-500"};function ct({result:s}){if(!s)return null;const{evidence:t}=s;return e.jsxs("div",{className:"rounded-lg border border-green-500/30 bg-surface-alt",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-edge flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Be,{className:"w-3.5 h-3.5 text-green-500"}),e.jsx("h3",{className:"text-xs font-semibold text-foreground",children:"Translation Evidence"})]}),e.jsx(lt,{score:t.confidenceScore})]}),e.jsxs("div",{className:"p-4 space-y-4",children:[e.jsx(O,{deterministicPct:Math.round(t.confidenceScore*100),totalConstructs:t.translatedConstructs.length+t.risks.length}),t.translatedConstructs.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(Re,{className:"w-3 h-3 text-muted"}),e.jsx("p",{className:"text-[10px] text-muted font-medium",children:"Translated Constructs"})]}),e.jsxs("table",{className:"w-full text-[10px]",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-edge",children:[e.jsx("th",{className:"text-left px-2 py-1 font-medium text-muted",children:"Source"}),e.jsx("th",{className:"text-left px-2 py-1 font-medium text-muted",children:"Target"}),e.jsx("th",{className:"text-left px-2 py-1 font-medium text-muted",children:"Method"})]})}),e.jsx("tbody",{children:t.translatedConstructs.map((a,n)=>e.jsxs("tr",{className:"border-b border-edge/50",children:[e.jsx("td",{className:"px-2 py-1 font-mono text-foreground",children:a.source}),e.jsx("td",{className:"px-2 py-1 font-mono text-accent",children:a.target}),e.jsx("td",{className:"px-2 py-1 text-muted",children:a.method})]},n))})]})]}),t.risks.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(W,{className:"w-3 h-3 text-yellow-500"}),e.jsxs("p",{className:"text-[10px] text-muted font-medium",children:["Risks (",t.risks.length,")"]})]}),e.jsx("div",{className:"space-y-1.5",children:t.risks.map((a,n)=>e.jsxs("div",{className:"flex items-start gap-2 px-2 py-1.5 rounded border border-edge/50 bg-surface",children:[e.jsx("span",{className:`shrink-0 px-1.5 py-0.5 rounded text-[10px] font-medium ${ot[a.severity]??"bg-surface text-muted"}`,children:a.severity}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] font-medium text-foreground",children:a.construct}),e.jsx("span",{className:"text-[10px] text-muted ml-1",children:a.message})]})]},n))})]}),t.humanReviewPoints.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-2",children:[e.jsx(Fe,{className:"w-3 h-3 text-muted"}),e.jsx("p",{className:"text-[10px] text-muted font-medium",children:"Human Review Points"})]}),e.jsx("ul",{className:"space-y-1 text-[10px] text-muted list-disc list-inside",children:t.humanReviewPoints.map((a,n)=>e.jsx("li",{children:a},n))})]}),t.diff&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-muted font-medium mb-2",children:"Diff"}),e.jsx("pre",{className:"text-[10px] p-3 rounded-md bg-surface border border-edge max-h-64 overflow-auto whitespace-pre-wrap text-muted font-mono",children:t.diff})]})]})]})}const dt={pending:"bg-yellow-500/10 text-yellow-500",analyzing:"bg-blue-500/10 text-blue-500",translating:"bg-indigo-500/10 text-indigo-500",validating:"bg-purple-500/10 text-purple-500",done:"bg-green-500/10 text-green-500",failed:"bg-red-500/10 text-red-500"};function it(s){const t=Date.now(),a=new Date(s).getTime(),n=t-a,o=Math.floor(n/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const l=Math.floor(o/60);if(l<24)return`${l}h ago`;const c=Math.floor(l/24);return c<7?`${c}d ago`:new Date(s).toLocaleDateString()}function P({label:s,value:t,accent:a}){return e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt px-4 py-3",children:[e.jsx("p",{className:"text-[10px] text-muted",children:s}),e.jsx("p",{className:`text-lg font-semibold ${a??"text-foreground"}`,children:t})]})}function V(){return e.jsx("tr",{className:"border-b border-edge/50",children:Array.from({length:7}).map((s,t)=>e.jsx("td",{className:"px-4 py-2",children:e.jsx("div",{className:"h-3 rounded bg-surface animate-pulse",style:{width:`${40+Math.random()*40}%`}})},t))})}function xt({job:s}){return e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"px-4 py-3 bg-surface/50",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[s.sourceCode&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-medium text-muted mb-1",children:"Source Code"}),e.jsxs("pre",{className:"text-[10px] p-2 rounded-md bg-surface border border-edge max-h-40 overflow-auto whitespace-pre-wrap font-mono text-foreground",children:[s.sourceCode.slice(0,500),s.sourceCode.length>500?`
119
- ...`:""]})]}),s.targetCode&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-medium text-muted mb-1",children:"Translated Code"}),e.jsxs("pre",{className:"text-[10px] p-2 rounded-md bg-surface border border-green-500/20 max-h-40 overflow-auto whitespace-pre-wrap font-mono text-foreground",children:[s.targetCode.slice(0,500),s.targetCode.length>500?`
120
- ...`:""]})]}),!s.sourceCode&&!s.targetCode&&e.jsx("p",{className:"text-[10px] text-muted col-span-2",children:"No code details available for this job."})]})})})}function ut({state:s,actions:t,showInsights:a}){const{jobs:n,stats:o,loading:l,error:c}=s,[m,x]=u.useState(null),[d,p]=u.useState(null),g=r=>{d===r?(p(null),t.deleteJob(r)):(p(r),setTimeout(()=>p(i=>i===r?null:i),3e3))},b=r=>{x(i=>i===r?null:r)};return l&&n.length===0?e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3",children:Array.from({length:5}).map((r,i)=>e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt px-4 py-3 animate-pulse",children:[e.jsx("div",{className:"h-2 w-16 rounded bg-surface mb-2"}),e.jsx("div",{className:"h-5 w-10 rounded bg-surface"})]},i))}),e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt",children:[e.jsx("div",{className:"px-4 py-3 border-b border-edge",children:e.jsx("div",{className:"h-3 w-32 rounded bg-surface animate-pulse"})}),e.jsx("table",{className:"w-full",children:e.jsxs("tbody",{children:[e.jsx(V,{}),e.jsx(V,{}),e.jsx(V,{})]})})]})]}):c?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3",children:[e.jsx("p",{className:"text-xs text-red-400",children:c}),e.jsxs("button",{onClick:()=>void t.refresh(),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md border border-edge text-muted hover:text-foreground transition-colors cursor-pointer",children:[e.jsx(J,{className:"w-3 h-3"})," Retry"]})]}):e.jsxs("div",{className:"space-y-4",children:[o&&e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3",children:[e.jsx(P,{label:"Total Jobs",value:o.totalJobs}),e.jsx(P,{label:"Completed",value:o.done,accent:"text-green-500"}),e.jsx(P,{label:"Failed",value:o.failed,accent:o.failed>0?"text-red-500":"text-foreground"}),e.jsx(P,{label:"Pending",value:o.pending,accent:o.pending>0?"text-yellow-500":"text-foreground"}),e.jsx(P,{label:"Avg Confidence",value:`${Math.round(o.avgConfidence*100)}%`})]}),a&&n.length>0&&e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-edge flex items-center gap-2",children:[e.jsx(K,{className:"w-3.5 h-3.5 text-accent"}),e.jsx("h3",{className:"text-xs font-semibold text-foreground",children:"Translation Pairs"})]}),e.jsx("div",{className:"p-4",children:e.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(n.reduce((r,i)=>{const h=`${i.sourceLanguage} → ${i.targetLanguage}`;return r[h]=(r[h]??0)+1,r},{})).sort(([,r],[,i])=>i-r).map(([r,i])=>e.jsxs("span",{className:"px-2 py-1 text-[10px] rounded-md border border-edge bg-surface cursor-pointer hover:border-accent/50 transition-colors",children:[e.jsx("span",{className:"font-medium text-foreground",children:r}),e.jsxs("span",{className:"text-muted ml-1.5",children:["x",i]})]},r))})})]}),e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-edge flex items-center justify-between",children:[e.jsxs("h3",{className:"text-xs font-semibold text-foreground",children:["Translation Jobs (",n.length,")"]}),e.jsx("button",{onClick:()=>void t.refresh(),className:"p-1 rounded text-muted hover:text-foreground transition-colors cursor-pointer",title:"Refresh",children:e.jsx(J,{className:`w-3.5 h-3.5 ${l?"animate-spin":""}`})})]}),n.length===0?e.jsxs("div",{className:"px-4 py-12 flex flex-col items-center justify-center gap-3 text-center",children:[e.jsx(Ue,{className:"w-8 h-8 text-muted/40"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted",children:"No translation jobs yet"}),e.jsx("p",{className:"text-[10px] text-muted/60 mt-1",children:"Start by translating some code in the Convert tab"})]})]}):e.jsx("div",{className:"overflow-auto max-h-96",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{className:"sticky top-0 bg-surface-alt shadow-sm",children:e.jsxs("tr",{className:"border-b border-edge",children:[e.jsx("th",{className:"text-left px-4 py-2 font-medium text-muted w-6"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium text-muted",children:"ID"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium text-muted",children:"Languages"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium text-muted",children:"Scope"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium text-muted",children:"Status"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium text-muted",children:"Confidence"}),e.jsx("th",{className:"text-left px-4 py-2 font-medium text-muted",children:"Created"}),e.jsx("th",{className:"text-right px-4 py-2 font-medium text-muted"})]})}),e.jsx("tbody",{children:n.map(r=>e.jsxs(e.Fragment,{children:[e.jsxs("tr",{onClick:()=>b(r.id),className:"border-b border-edge/50 hover:bg-surface transition-colors cursor-pointer",children:[e.jsx("td",{className:"px-4 py-1.5 text-muted",children:m===r.id?e.jsx(te,{className:"w-3 h-3"}):e.jsx(se,{className:"w-3 h-3"})}),e.jsx("td",{className:"px-4 py-1.5 font-mono text-muted",title:r.id,children:r.id.slice(0,8)}),e.jsxs("td",{className:"px-4 py-1.5",children:[e.jsx("span",{className:"text-foreground",children:r.sourceLanguage}),e.jsx("span",{className:"text-muted mx-1",children:"→"}),e.jsx("span",{className:"text-accent",children:r.targetLanguage})]}),e.jsx("td",{className:"px-4 py-1.5 text-muted",children:r.scope}),e.jsx("td",{className:"px-4 py-1.5",children:e.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-medium ${dt[r.status]}`,children:r.status})}),e.jsx("td",{className:"px-4 py-1.5 text-muted",children:r.confidenceScore!=null?`${Math.round(r.confidenceScore*100)}%`:"—"}),e.jsx("td",{className:"px-4 py-1.5 text-muted",title:new Date(r.createdAt).toLocaleString(),children:it(r.createdAt)}),e.jsx("td",{className:"px-4 py-1.5 text-right",onClick:i=>i.stopPropagation(),children:e.jsx("button",{onClick:()=>g(r.id),className:`px-2 py-0.5 rounded text-[10px] transition-all cursor-pointer ${d===r.id?"bg-red-500/10 text-red-400 font-medium border border-red-500/30":"text-muted hover:text-red-400"}`,title:d===r.id?"Click again to confirm":"Delete job",children:d===r.id?"Confirm?":e.jsx(We,{className:"w-3 h-3"})})})]},r.id),m===r.id&&e.jsx(xt,{job:r},`${r.id}-details`)]}))})]})})]})]})}function mt({onUpload:s,loading:t,disabled:a}){const[n,o]=u.useState(!1),l=u.useRef(null),c=u.useCallback(g=>{g.preventDefault(),g.stopPropagation(),!a&&!t&&o(!0)},[a,t]),m=u.useCallback(g=>{g.preventDefault(),g.stopPropagation(),o(!1)},[]),x=u.useCallback(g=>{if(g.preventDefault(),g.stopPropagation(),o(!1),a||t)return;const b=g.dataTransfer.files[0];b&&b.name.endsWith(".zip")&&s(b)},[a,t,s]),d=u.useCallback(()=>{var g;!a&&!t&&((g=l.current)==null||g.click())},[a,t]),p=u.useCallback(g=>{var r;const b=(r=g.target.files)==null?void 0:r[0];b&&b.name.endsWith(".zip")&&s(b),g.target.value=""},[s]);return e.jsxs("div",{role:"button",tabIndex:a?-1:0,className:`
121
- flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed
122
- px-4 py-5 text-center transition-colors cursor-pointer
123
- ${n?"border-accent bg-accent/5":"border-edge bg-surface"}
124
- ${a||t?"opacity-50 cursor-not-allowed":"hover:border-accent/60"}
125
- `,onDragOver:c,onDragLeave:m,onDrop:x,onClick:d,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&d()},children:[e.jsx("input",{ref:l,type:"file",accept:".zip",className:"hidden",onChange:p,disabled:a||t}),t?e.jsxs(e.Fragment,{children:[e.jsx(A,{className:"h-6 w-6 animate-spin text-accent"}),e.jsx("span",{className:"text-sm text-muted",children:"Uploading..."})]}):e.jsxs(e.Fragment,{children:[n?e.jsx(Te,{className:"h-6 w-6 text-accent"}):e.jsx(Qe,{className:"h-6 w-6 text-muted"}),e.jsxs("span",{className:"text-sm text-muted",children:["Drop a ",e.jsx("code",{className:"text-xs",children:".zip"})," file or click to browse"]})]})]})}const ee={done:"bg-green-500",analyzed:"bg-yellow-500",translating:"bg-blue-500",analyzing:"bg-blue-500",failed:"bg-red-500",pending:"bg-gray-500"};function ht(s){const t={children:[]};for(const n of s){const o=n.filePath.split("/");let l=t;for(let c=0;c<o.length;c++){const m=o[c],x=c===o.length-1,d=o.slice(0,c+1).join("/");if(x)l.children.push({name:m,path:d,isDir:!1,children:[],file:n});else{let p=l.children.find(g=>g.isDir&&g.name===m);p||(p={name:m,path:d,isDir:!0,children:[]},l.children.push(p)),l=p}}}const a=n=>{const o=[...n].sort((l,c)=>l.isDir!==c.isDir?l.isDir?-1:1:l.name.localeCompare(c.name));for(const l of o)l.isDir&&(l.children=a(l.children));return o};return a(t.children)}function pt(s){const t={};for(const a of s)t[a.status]=(t[a.status]??0)+1;return t}function ce(s,t){const a=t.toLowerCase(),n=[];for(const o of s)if(o.isDir){const l=ce(o.children,t);l.length>0&&n.push({...o,children:l})}else o.path.toLowerCase().includes(a)&&n.push(o);return n}const gt=u.memo(function s({node:t,depth:a,selectedFileId:n,onSelectFile:o,expandedPaths:l,onToggle:c}){var r,i,h;const m=l.has(t.path),x=!t.isDir&&((r=t.file)==null?void 0:r.id)===n,d=a*16+8;if(t.isDir)return e.jsxs("div",{style:{contentVisibility:"auto"},children:[e.jsxs("button",{type:"button",className:"flex w-full items-center gap-1.5 rounded px-1 py-0.5 text-sm text-muted hover:bg-surface-hover",style:{paddingLeft:d},onClick:()=>c(t.path),children:[m?e.jsx(te,{className:"h-3.5 w-3.5 shrink-0"}):e.jsx(se,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx(Ee,{className:"h-3.5 w-3.5 shrink-0 text-yellow-500/80"}),e.jsx("span",{className:"truncate",children:t.name})]}),m&&t.children.map(f=>e.jsx(s,{node:f,depth:a+1,selectedFileId:n,onSelectFile:o,expandedPaths:l,onToggle:c},f.path))]});const p=((i=t.file)==null?void 0:i.status)??"pending",g=(h=t.file)==null?void 0:h.confidenceScore,b=ee[p]??ee.pending;return e.jsxs("button",{type:"button",className:`
126
- flex w-full items-center gap-1.5 rounded px-1 py-0.5 text-sm transition-colors
127
- ${x?"bg-accent/10 border border-accent text-foreground":"text-muted hover:bg-surface-hover border border-transparent"}
128
- `,style:{paddingLeft:d,contentVisibility:"auto"},onClick:()=>t.file&&o(t.file.id),children:[e.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${b}`}),e.jsx(re,{className:"h-3.5 w-3.5 shrink-0"}),e.jsx("span",{className:"truncate",children:t.name}),g!=null&&e.jsxs("span",{className:"ml-auto shrink-0 text-xs text-muted",children:[Math.round(g*100),"%"]})]})});function ft({files:s,selectedFileId:t,onSelectFile:a}){const[n,o]=u.useState(""),[l,c]=u.useState(new Set),m=u.useMemo(()=>ht(s),[s]),x=u.useMemo(()=>n.trim()?ce(m,n.trim()):m,[m,n]),d=u.useMemo(()=>pt(s),[s]),p=u.useCallback(i=>{c(h=>{const f=new Set(h);return f.has(i)?f.delete(i):f.add(i),f})},[]),g=(d.done??0)+(d.analyzed??0),b=d.translating??0,r=d.failed??0;return e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"text-xs text-muted px-1",children:[s.length," files: ",g," ready, ",b," need AI, ",r," error"]}),e.jsxs("div",{className:"relative",children:[e.jsx(ae,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted"}),e.jsx("input",{type:"text",placeholder:"Filter files...",value:n,onChange:i=>o(i.target.value),className:"w-full rounded border border-edge bg-surface py-1 pl-7 pr-2 text-sm text-foreground placeholder:text-muted focus:border-accent focus:outline-none"})]}),e.jsxs("div",{className:"overflow-y-auto max-h-[60vh]",children:[x.map(i=>e.jsx(gt,{node:i,depth:0,selectedFileId:t,onSelectFile:a,expandedPaths:l,onToggle:p},i.path)),x.length===0&&e.jsx("div",{className:"py-4 text-center text-xs text-muted",children:"No files match your filter"})]})]})}function bt(s,t){if(t){const d=t.translatedFiles,p=t.pendingFiles+t.analyzedFiles;return{totalFiles:t.totalFiles,deterministicCount:d,needsAiCount:p,errorCount:t.failedFiles,avgConfidence:t.overallConfidence,deterministicPct:t.deterministicPct}}const a=s.length;if(a===0)return{totalFiles:0,deterministicCount:0,needsAiCount:0,errorCount:0,avgConfidence:0,deterministicPct:0};const n=s.filter(d=>d.deterministic===!0).length,o=s.filter(d=>d.status==="failed").length,l=s.filter(d=>d.deterministic===!1&&d.status!=="failed").length,c=s.filter(d=>d.confidenceScore!=null),m=c.length>0?c.reduce((d,p)=>d+(p.confidenceScore??0),0)/c.length:0,x=a>0?Math.round(n/a*100):0;return{totalFiles:a,deterministicCount:n,needsAiCount:l,errorCount:o,avgConfidence:m,deterministicPct:x}}function D({icon:s,value:t,label:a,colorClass:n="text-foreground"}){return e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s,e.jsx("span",{className:`text-xl font-bold ${n}`,children:t})]}),e.jsx("p",{className:"text-[10px] text-muted",children:a})]})}function jt({project:s,files:t,summary:a,onPrepareAll:n,onDownloadAll:o,loading:l}){const c=bt(t,a),m=c.deterministicPct===100&&c.totalFiles>0;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-5 gap-3",children:[e.jsx(D,{icon:e.jsx(De,{className:"w-3.5 h-3.5 text-accent"}),value:c.totalFiles,label:"Total Files"}),e.jsx(D,{icon:e.jsx(ne,{className:"w-3.5 h-3.5 text-green-500"}),value:c.deterministicCount,label:"Deterministic",colorClass:"text-green-500"}),e.jsx(D,{icon:e.jsx(W,{className:"w-3.5 h-3.5 text-yellow-500"}),value:c.needsAiCount,label:"Needs AI",colorClass:"text-yellow-500"}),e.jsx(D,{icon:e.jsx(ve,{className:"w-3.5 h-3.5 text-red-500"}),value:c.errorCount,label:"Errors",colorClass:"text-red-500"}),e.jsx(D,{icon:e.jsx(K,{className:"w-3.5 h-3.5 text-accent"}),value:`${Math.round(c.avgConfidence*100)}%`,label:"Avg Confidence"})]}),e.jsx(O,{isProjectLevel:!0,deterministicPct:c.deterministicPct,totalConstructs:c.totalFiles}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:n,disabled:l||c.totalFiles===0,className:"flex items-center gap-1.5 px-4 py-2 rounded-md bg-accent text-white text-xs font-medium hover:bg-accent/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx(le,{className:"w-3.5 h-3.5"}),"Convert All"]}),e.jsxs("button",{onClick:o,disabled:l||c.totalFiles===0,className:`flex items-center gap-1.5 px-4 py-2 rounded-md text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${m?"bg-green-600 text-white hover:bg-green-700":"border border-edge text-foreground hover:bg-surface"}`,children:[e.jsx(U,{className:"w-3.5 h-3.5"}),"Download All .zip"]})]})]})}function Nt({file:s,prompt:t,onBack:a,onFinalize:n,loading:o}){const[l,c]=u.useState(""),[m,x]=u.useState(!1),d=s.status==="done",p=u.useCallback(()=>{t&&navigator.clipboard.writeText(t).then(()=>{x(!0),setTimeout(()=>x(!1),2e3)})},[t]),g=u.useCallback(()=>{l.trim()&&n(l.trim())},[l,n]);return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("button",{onClick:a,className:"flex items-center gap-1.5 text-xs text-muted hover:text-foreground transition-colors",children:[e.jsx(pe,{className:"w-3.5 h-3.5"}),"Back to project"]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-edge bg-surface-alt",children:[e.jsx(re,{className:"w-4 h-4 text-accent shrink-0"}),e.jsx("span",{className:"text-xs font-mono text-foreground truncate",children:s.filePath})]}),s.analysis&&e.jsx(oe,{analysis:s.analysis}),e.jsx(O,{analysis:s.analysis,aiPrompt:t}),t&&e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-edge flex items-center justify-between",children:[e.jsx("h3",{className:"text-xs font-semibold text-foreground",children:"AI Prompt"}),e.jsxs("button",{onClick:p,className:"flex items-center gap-1 px-2 py-1 rounded text-[10px] text-muted hover:text-foreground hover:bg-surface transition-colors",children:[m?e.jsx(I,{className:"w-3 h-3"}):e.jsx(Z,{className:"w-3 h-3"}),m?"Copied!":"Copy"]})]}),e.jsx("pre",{className:"p-4 text-[11px] text-foreground/80 overflow-x-auto whitespace-pre-wrap font-mono leading-relaxed max-h-60 overflow-y-auto",children:t})]}),d&&e.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 rounded-lg border border-green-500/30 bg-green-500/5",children:[e.jsx(I,{className:"w-4 h-4 text-green-500 shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-green-500",children:"Translation Complete"}),s.confidenceScore!=null&&e.jsxs("p",{className:"text-[10px] text-muted mt-0.5",children:["Confidence: ",Math.round(s.confidenceScore*100),"%"]})]})]}),!d&&e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-edge",children:[e.jsx("h3",{className:"text-xs font-semibold text-foreground",children:"Generated Code"}),e.jsx("p",{className:"text-[10px] text-muted mt-0.5",children:"Paste the AI-generated translation below to finalize this file."})]}),e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsx("textarea",{value:l,onChange:b=>c(b.target.value),placeholder:"Paste generated code here...",className:"w-full h-48 px-3 py-2 rounded-md border border-edge bg-surface text-xs font-mono text-foreground placeholder:text-muted/50 resize-y focus:outline-none focus:ring-1 focus:ring-accent/50"}),e.jsx("button",{onClick:g,disabled:o||!l.trim(),className:"flex items-center gap-1.5 px-4 py-2 rounded-md bg-accent text-white text-xs font-medium hover:bg-accent/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Finalize Translation"})]})]})]})}function yt({project:s,files:t,summary:a,selectedFileId:n,onSelectFile:o,onPrepareAll:l,onDownloadAll:c,onFinalizeFile:m,prompts:x,loading:d}){const p=n?t.find(r=>r.id===n)??null:null,g=()=>{o(null)},b=r=>{n&&m(n,r)};return e.jsxs("div",{className:"flex h-full flex-col md:flex-row",children:[e.jsx("div",{className:"w-full md:w-60 border-b md:border-b-0 md:border-r border-edge overflow-hidden flex flex-col shrink-0",children:e.jsx(ft,{files:t,selectedFileId:n,onSelectFile:o})}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:p?e.jsx(Nt,{file:p,prompt:x==null?void 0:x[p.id],onBack:g,onFinalize:b,loading:d}):e.jsx(jt,{project:s,files:t,summary:a,onPrepareAll:l,onDownloadAll:c,loading:d})})]})}const vt={knowledge:null,searchResults:[],loading:!1,error:null};function wt(){const[s,t]=u.useState(vt),a=u.useCallback(async()=>{t(o=>({...o,loading:!0,error:null}));try{const o=await C.translationGetKnowledge();t(l=>({...l,knowledge:o,loading:!1}))}catch(o){t(l=>({...l,error:o instanceof Error?o.message:"Failed to load knowledge stats",loading:!1}))}},[]),n=u.useCallback(async o=>{t(l=>({...l,loading:!0,error:null}));try{const l=await C.translationSearchKnowledge(o);t(c=>({...c,searchResults:l.results,loading:!1}))}catch(l){t(c=>({...c,error:l instanceof Error?l.message:"Search failed",loading:!1}))}},[]);return u.useEffect(()=>{a()},[a]),[s,{search:n,refresh:a}]}function H({label:s,value:t}){return e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt px-4 py-3",children:[e.jsx("p",{className:"text-[10px] text-muted",children:s}),e.jsx("p",{className:"text-lg font-semibold text-foreground",children:t})]})}function Ct({entry:s}){return e.jsxs("div",{className:"rounded-lg border border-edge bg-surface-alt px-4 py-3",children:[e.jsx("p",{className:"text-xs font-medium text-foreground truncate",children:s.title}),e.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[s.sourceLanguage&&s.targetLanguage&&e.jsxs("span",{className:"text-[10px] text-muted",children:[s.sourceLanguage," → ",s.targetLanguage]}),s.confidence!=null&&e.jsxs("span",{className:"text-[10px] text-accent",children:[Math.round(s.confidence*100),"%"]}),e.jsx("span",{className:"text-[10px] text-muted ml-auto",children:new Date(s.createdAt).toLocaleDateString()})]})]})}function kt(){var d,p,g;const[s,{search:t,refresh:a}]=wt(),[n,o]=u.useState(""),l=b=>{b.preventDefault(),t(n)},c=()=>{a()},m=s.searchResults&&s.searchResults.length>0?s.searchResults:((d=s.knowledge)==null?void 0:d.recentEntries)??[],x=s.searchResults&&s.searchResults.length>0;return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("form",{onSubmit:l,className:"flex items-center gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(ae,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted"}),e.jsx("input",{type:"text",value:n,onChange:b=>o(b.target.value),placeholder:"Search knowledge base...",className:"w-full pl-8 pr-3 py-1.5 text-xs rounded-md border border-edge bg-surface text-foreground placeholder:text-muted focus:outline-none focus:border-accent/50"})]}),e.jsxs("button",{type:"button",onClick:c,disabled:s.loading,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md border border-edge text-muted hover:text-foreground transition-colors cursor-pointer disabled:opacity-50",title:"Reindex knowledge",children:[e.jsx(J,{className:`w-3.5 h-3.5 ${s.loading?"animate-spin":""}`}),"Reindex"]})]}),s.loading&&!s.knowledge&&e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(A,{className:"w-6 h-6 text-muted animate-spin"})}),!s.loading&&!s.knowledge&&m.length===0&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3 text-center",children:[e.jsx(q,{className:"w-12 h-12 text-muted/40"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted",children:"No learnings yet."}),e.jsx("p",{className:"text-[10px] text-muted/60 mt-1",children:"Complete some translations to build the knowledge base."})]})]}),s.knowledge&&e.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[e.jsx(H,{label:"Total Entries",value:s.knowledge.totalDocuments??0}),e.jsx(H,{label:"Language Pairs",value:((p=s.knowledge.byLanguagePair)==null?void 0:p.length)??0}),e.jsx(H,{label:"Avg Confidence",value:s.knowledge.avgConfidence!=null?`${Math.round(s.knowledge.avgConfidence*100)}%`:"—"})]}),((g=s.knowledge)==null?void 0:g.byLanguagePair)&&s.knowledge.byLanguagePair.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.knowledge.byLanguagePair.map(b=>e.jsxs("span",{className:"px-2 py-0.5 text-[10px] font-medium rounded bg-accent/10 text-accent",children:[b.pair," (",b.count,")"]},b.pair))}),m.length>0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(q,{className:"w-3.5 h-3.5 text-accent"}),e.jsx("h3",{className:"text-xs font-semibold text-foreground",children:x?"Search Results":"Recent Entries"}),e.jsxs("span",{className:"text-[10px] text-muted",children:["(",m.length,")"]})]}),m.length>0&&e.jsx("div",{className:"space-y-2 max-h-80 overflow-auto",children:m.map(b=>e.jsx(Ct,{entry:b},b.id))})]})}const St=[{id:"convert",label:"Convert",icon:e.jsx(me,{className:"w-3.5 h-3.5"})},{id:"history",label:"History",icon:e.jsx(Ce,{className:"w-3.5 h-3.5"})},{id:"insights",label:"Insights",icon:e.jsx(K,{className:"w-3.5 h-3.5"})},{id:"knowledge",label:"Knowledge",icon:e.jsx(q,{className:"w-3.5 h-3.5"})},{id:"graph",label:"Graph",icon:e.jsx(B,{className:"w-3.5 h-3.5"})}],z={sourceCode:"",targetLanguage:"python",scope:"snippet",generatedCode:""};function Lt(){const[s,t]=u.useState("convert"),[a,n]=Xe(),[o,l]=Ye(),[c,m]=et(),[x,d]=u.useState(z.sourceCode),[p,g]=u.useState(z.targetLanguage),[b,r]=u.useState(z.scope),[i,h]=u.useState(z.generatedCode),f=u.useCallback(j=>{z.sourceCode=j,d(j)},[]),w=u.useCallback(j=>{z.targetLanguage=j,g(j)},[]),k=u.useCallback(j=>{z.scope=j,r(j)},[]),S=u.useCallback(j=>{z.generatedCode=j,h(j)},[]),$=c.mode!=="idle",G=u.useCallback(j=>{m.upload(j,p)},[m,p]),T=a.phase;ie(u.useCallback(j=>{j.startsWith("translation:")&&T!=="analyzing"&&T!=="finalizing"&&l.refresh()},[l,T]));const _=()=>{n.analyze(x,p,b)},E=()=>{n.finalize(i).then(()=>l.refresh())},v=()=>{n.reset(),f(""),S(""),w("python"),k("snippet")};return e.jsx("div",{className:"h-full overflow-auto",children:e.jsxs("div",{className:"p-4 space-y-4 max-w-5xl mx-auto",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(xe,{className:"w-5 h-5 text-accent"}),e.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Language Convert"}),e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 bg-warning/10 text-warning rounded-full",children:"Beta"})]}),e.jsx("div",{className:"flex gap-1 border-b border-edge pb-1",children:St.map(j=>e.jsxs("button",{onClick:()=>t(j.id),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-t transition-colors ${s===j.id?"bg-accent text-white":"text-muted hover:text-foreground hover:bg-surface"}`,children:[j.icon,j.label]},j.id))}),s==="convert"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx(mt,{onUpload:G,loading:c.loading}),$?e.jsx(yt,{project:c.project,files:c.files,summary:c.summary,selectedFileId:c.selectedFileId,onSelectFile:m.selectFile,onPrepareAll:()=>void m.prepareFiles(),onDownloadAll:()=>void m.downloadProject(),onFinalizeFile:(j,F)=>void m.finalizeFile(j,F),loading:c.loading}):e.jsxs(e.Fragment,{children:[e.jsx(at,{sourceCode:x,setSourceCode:f,targetLanguage:p,setTargetLanguage:w,scope:b,setScope:k,generatedCode:i,setGeneratedCode:S,translation:a,onAnalyze:_,onFinalize:E,onReset:v}),a.phase==="analyzing"&&e.jsxs("div",{className:"rounded-lg border-2 border-accent/40 bg-accent/5 p-5 transition-all duration-300",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute inset-0 rounded-full bg-accent/20 animate-ping"}),e.jsx(A,{className:"w-5 h-5 text-accent animate-spin relative"})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-xs font-semibold text-foreground",children:"Analyzing your code..."}),e.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[e.jsx("span",{className:"text-[10px] text-accent font-medium",children:"Detecting language"}),e.jsx("span",{className:"text-[10px] text-muted",children:"→"}),e.jsx("span",{className:"text-[10px] text-muted",children:"Analyzing constructs"}),e.jsx("span",{className:"text-[10px] text-muted",children:"→"}),e.jsx("span",{className:"text-[10px] text-muted",children:"Generating prompt"})]})]})]}),e.jsx("div",{className:"mt-3 h-1 rounded-full bg-surface overflow-hidden",children:e.jsx("div",{className:"h-full bg-accent/60 rounded-full animate-pulse",style:{width:"60%"}})})]}),a.phase==="finalizing"&&e.jsx("div",{className:"rounded-lg border-2 border-green-500/40 bg-green-500/5 p-5 transition-all duration-300",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(A,{className:"w-5 h-5 text-green-500 animate-spin"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-foreground",children:"Finalizing translation..."}),e.jsx("p",{className:"text-[10px] text-muted mt-1",children:"Validating output and generating evidence pack"})]})]})}),a.analysis&&e.jsx("div",{className:"animate-in fade-in-0 duration-300",style:{animationFillMode:"both"},children:e.jsx(oe,{analysis:a.analysis})}),a.finalizeResult&&e.jsx("div",{className:"animate-in fade-in-0 duration-300",style:{animationFillMode:"both"},children:e.jsx(ct,{result:a.finalizeResult})})]})]}),(s==="history"||s==="insights")&&e.jsx(ut,{state:o,actions:l,showInsights:s==="insights"}),s==="knowledge"&&e.jsx(kt,{}),s==="graph"&&e.jsx("div",{className:"space-y-4",children:(()=>{const j=o.jobs.filter(N=>N.status==="done"&&N.confidenceScore!=null);if(j.length===0)return e.jsxs("div",{className:"text-center py-12",children:[e.jsx(B,{className:"w-12 h-12 text-muted mx-auto mb-3"}),e.jsx("p",{className:"text-sm text-muted",children:"Translation graph visualization"}),e.jsx("p",{className:"text-[10px] text-muted mt-1",children:"Complete some translations to see the relationship graph"})]});const F=[],L=new Map;for(const N of j){const M=`${N.sourceLanguage}→${N.targetLanguage}`,R=L.get(M);R?(R.totalConf+=N.confidenceScore??0,R.count++):L.set(M,{source:N.sourceLanguage,target:N.targetLanguage,totalConf:N.confidenceScore??0,count:1})}for(const N of L.values())F.push({source:N.source,target:N.target,confidence:N.totalConf/N.count,count:N.count});return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(B,{className:"w-4 h-4 text-accent"}),e.jsx("h3",{className:"text-xs font-semibold text-foreground",children:"Translation Flow Graph"}),e.jsxs("span",{className:"text-[10px] text-muted",children:["(",j.length," completed translations)"]})]}),e.jsx("div",{className:"grid gap-3",children:F.map(N=>{const M=Math.round(N.confidence*100),R=M>=80?"border-green-500/30 bg-green-500/5":M>=50?"border-yellow-500/30 bg-yellow-500/5":"border-red-500/30 bg-red-500/5",de=M>=80?"text-green-500":M>=50?"text-yellow-500":"text-red-500";return e.jsxs("div",{className:`flex items-center gap-4 rounded-lg border ${R} px-4 py-3`,children:[e.jsx("span",{className:"px-2 py-0.5 text-[10px] font-medium rounded bg-blue-500/10 text-blue-400",children:N.source}),e.jsxs("div",{className:"flex-1 flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-0.5 bg-edge rounded"}),e.jsxs("span",{className:"text-[10px] text-muted",children:["x",N.count]}),e.jsx("div",{className:"flex-1 h-0.5 bg-edge rounded"})]}),e.jsx("span",{className:"px-2 py-0.5 text-[10px] font-medium rounded bg-green-500/10 text-green-400",children:N.target}),e.jsxs("span",{className:`text-xs font-bold ${de}`,children:[M,"%"]})]},`${N.source}→${N.target}`)})})]})})()})]})})}export{Lt as LanguagesTab};
@@ -1 +0,0 @@
1
- import{r as c,a as N,j as e}from"./index-DfEJaZLA.js";function w(r){const o=[];for(const n of r){const t=n.name.split("/");let i=o;for(let l=0;l<t.length;l++){const s=t[l],d=t.slice(0,l+1).join("/"),u=l===t.length-1;let x=i.find(f=>f.name===s);x||(x={name:s,path:d,children:[]},u&&(x.memory=n),i.push(x)),u&&!x.memory&&(x.memory=n),i=x.children}}return o}function k(){const[r,o]=c.useState([]),[n,t]=c.useState(null),[i,l]=c.useState(null),[s,d]=c.useState(!0),[u,x]=c.useState(!1),[f,g]=c.useState(new Map),m=c.useCallback(async()=>{try{d(!0);const a=await N.getMemories().catch(()=>[]);o(a)}catch(a){l(a instanceof Error?a.message:"Failed to load")}finally{d(!1)}},[]);c.useEffect(()=>{m()},[m]);const p=c.useCallback(async a=>{t(a);const h=f.get(a.name);if(h!==void 0){t({...a,content:h});return}try{x(!0);const j=await N.readMemory(a.name);g(y=>{const b=new Map(y);return b.set(a.name,j.content),b}),t({...a,content:j.content})}catch{t({...a,content:"[Failed to load content]"})}finally{x(!1)}},[f]);return s?e.jsxs("div",{className:"h-full flex",children:[e.jsxs("div",{className:"w-64 border-r border-edge bg-surface-alt p-2 space-y-2",children:[e.jsx("div",{className:"h-4 w-16 rounded bg-surface animate-pulse"}),e.jsx("div",{className:"h-6 w-full rounded bg-surface animate-pulse"}),Array.from({length:6}).map((a,h)=>e.jsx("div",{className:"h-4 rounded bg-surface animate-pulse",style:{width:`${50+Math.random()*40}%`,marginLeft:`${h%3*12}px`}},h))]}),e.jsx("div",{className:"flex-1 flex items-center justify-center text-muted text-xs",children:"Loading memories..."})]}):i?e.jsxs("div",{className:"flex items-center justify-center h-full text-danger",children:["Failed to load: ",i]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-edge bg-surface-alt",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Memories"}),e.jsx(C,{label:"Memories",active:r.length>0}),e.jsxs("span",{className:"text-[10px] text-muted",children:[r.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(S,{memories:r,selectedMemory:n,onSelect:p}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(M,{selectedMemory:n,contentLoading:u})})]})]})}function C({label:r,active:o}){const n=o?"var(--color-success)":"var(--color-text-muted)",t=o?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${n}20`,color:n},children:[r,": ",t]})}function S({memories:r,selectedMemory:o,onSelect:n}){const[t,i]=c.useState(""),[l,s]=c.useState(!1),[d,u]=c.useState(new Set),x=c.useMemo(()=>{if(!t.trim())return r;const m=t.toLowerCase();return r.filter(p=>p.name.toLowerCase().includes(m))},[r,t]),f=c.useMemo(()=>w(x),[x]),g=c.useCallback(m=>{u(p=>{const a=new Set(p);return a.has(m)?a.delete(m):a.add(m),a})},[]);return l?e.jsx("div",{className:"w-8 border-r border-edge bg-surface-alt flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>s(!1),className:"text-[10px] text-muted hover:text-foreground rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-edge bg-surface-alt flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-edge",children:[e.jsx("span",{className:"text-[10px] font-semibold text-muted uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>s(!0),className:"text-[10px] text-muted hover:text-foreground",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-edge",children:e.jsx("input",{type:"text",value:t,onChange:m=>i(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-surface border border-edge focus:outline-none focus:border-accent"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:r.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-muted",children:"No memories"}):e.jsx(v,{nodes:f,depth:0,expandedPaths:d,onToggle:g,selectedMemory:o,onSelect:n})})]})}function v({nodes:r,depth:o,expandedPaths:n,onToggle:t,selectedMemory:i,onSelect:l}){return e.jsx(e.Fragment,{children:r.map(s=>{const d=s.children.length>0,u=n.has(s.path),x=s.memory!=null&&(i==null?void 0:i.name)===s.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{d&&t(s.path),s.memory&&l(s.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-surface-elevated transition-colors cursor-pointer ${x?"bg-accent15 text-accent":"text-foreground"}`,style:{paddingLeft:`${o*12+8}px`},children:[d?e.jsx("span",{className:"w-3 text-[9px] text-muted",children:u?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-muted",children:"·"}),e.jsx("span",{className:"truncate",children:s.name})]}),d&&u&&e.jsx(v,{nodes:s.children,depth:o+1,expandedPaths:n,onToggle:t,selectedMemory:i,onSelect:l})]},s.path)})})}function M({selectedMemory:r,contentLoading:o}){const[n,t]=c.useState(!1);if(!r)return e.jsx("div",{className:"flex items-center justify-center h-full text-muted",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs text-muted/60",children:"Project memories appear as navigable files"})]})});const i=()=>{navigator.clipboard.writeText(r.content),t(!0),setTimeout(()=>t(!1),2e3)},l=r.name.split("/");return e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center gap-1 mb-2 text-[10px] text-muted",children:[e.jsx("span",{children:"memories"}),l.map((s,d)=>e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{children:"/"}),e.jsx("span",{className:d===l.length-1?"text-foreground font-medium":"",children:s})]},d))]}),e.jsxs("div",{className:"flex items-center justify-between mb-3 pb-2 border-b border-edge",children:[e.jsx("span",{className:"text-sm font-semibold",children:l[l.length-1]}),e.jsx("button",{onClick:i,disabled:o,className:`text-[10px] px-2 py-0.5 rounded border transition-all cursor-pointer ${n?"border-green-500/30 text-green-500 bg-green-500/5":"border-edge text-muted hover:text-foreground"}`,children:n?"Copied!":"Copy"})]}),o?e.jsx("div",{className:"space-y-2",children:Array.from({length:8}).map((s,d)=>e.jsx("div",{className:"h-3 rounded bg-surface animate-pulse",style:{width:`${40+Math.random()*50}%`}},d))}):e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-muted font-mono leading-relaxed",children:r.content})]})}export{k as MemoriesTab};