shraga 0.1.100 → 0.1.101

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.
@@ -140,7 +140,7 @@ Schedule: { id, name, enabled, trigger, task, scope, createdBy, nextRun?, lastRu
140
140
 
141
141
  `task.model` / `task.engine` pin what the run executes on, instead of the instance default:
142
142
  `model` takes an alias (`opus`, `haiku`) or a provider-qualified id (`cursor/composer-2.5`);
143
- `engine` names a registered runtime (`claude-code`, `agentx`, `cursor` — availability is
143
+ `engine` names a registered runtime (`claude-code`, `cursor`, or any engine an add-on registers — availability is
144
144
  deployment-specific). Both are prepended to the prompt as a `[engine:…,model:…]` directive, so a
145
145
  prompt that opens with its OWN model group (`[opus] …`) would out-rank the pin — drop it from the
146
146
  prompt text when pinning. `job` tasks run a command, not an agent, so neither applies.
@@ -40,7 +40,7 @@ The workspace (`data/workspace/`) has two scopes. Full architecture: `defaults/w
40
40
  - Be direct and concise. Answer succinctly.
41
41
  - Always respond with a brief verbal acknowledgment before making tool calls. For example: "Let me check that" or "Looking into it." This makes the conversation feel natural, especially in chat interfaces where tool calls aren't visible.
42
42
  - Do NOT spawn sub-agents. This gates the `Agent`/`Task` tool ONLY. External CLI processes you launch
43
- with `Bash` (`agentx`, `claude -p`, `cursor-agent`, …) are not sub-agents and are never blocked by this
43
+ with `Bash` (a headless agent CLI, `claude -p`, …) are not sub-agents and are never blocked by this
44
44
  rule — when a skill documents a Bash launch, use it.
45
45
  - Never abort a task on a *suspected* capability or permission block. Load the relevant skill and actually
46
46
  attempt the documented path first; report the real error, not an assumed one.
@@ -1,4 +1,4 @@
1
- *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.\!dark{--background: 222.2 84% 4.9% !important;--foreground: 210 40% 98% !important;--card: 222.2 84% 4.9% !important;--card-foreground: 210 40% 98% !important;--primary: 210 40% 98% !important;--primary-foreground: 222.2 47.4% 11.2% !important;--secondary: 217.2 32.6% 17.5% !important;--secondary-foreground: 210 40% 98% !important;--muted: 217.2 32.6% 17.5% !important;--muted-foreground: 215 20.2% 65.1% !important;--accent: 217.2 32.6% 17.5% !important;--accent-foreground: 210 40% 98% !important;--destructive: 0 62.8% 30.6% !important;--destructive-foreground: 210 40% 98% !important;--border: 217.2 32.6% 17.5% !important;--input: 217.2 32.6% 17.5% !important;--ring: 212.7 26.8% 83.9% !important}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";color:hsl(var(--foreground));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}html,body,#root{height:100%}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px var(--tw-prose-kbd-shadows),0 3px 0 var(--tw-prose-kbd-shadows);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: rgb(17 24 39 / 10%);--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: rgb(255 255 255 / 10%);--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-inline-start:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding-top:.1428571em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-inline-start:.3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.-right-1\.5{right:-.375rem}.-top-1\.5{top:-.375rem}.bottom-3{bottom:.75rem}.bottom-4{bottom:1rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2,.left-\[50\%\]{left:50%}.right-12{right:3rem}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[1090\]{z-index:1090}.z-\[1100\]{z-index:1100}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-mt-1{margin-top:-.25rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[100vh\]{height:100vh}.h-\[70dvh\]{height:70dvh}.h-\[85vh\]{height:85vh}.h-\[90vh\]{height:90vh}.h-full{height:100%}.max-h-48{max-height:12rem}.max-h-64{max-height:16rem}.max-h-96{max-height:24rem}.max-h-\[200px\]{max-height:200px}.max-h-\[40vh\]{max-height:40vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85dvh\]{max-height:85dvh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.min-h-0{min-height:0px}.min-h-\[28px\]{min-height:28px}.min-h-\[40px\]{min-height:40px}.min-h-\[80px\]{min-height:80px}.w-1\.5{width:.375rem}.w-1\/3{width:33.333333%}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-36{width:9rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[100vw\]{width:100vw}.w-\[90vw\]{width:90vw}.w-\[calc\(100vw-2rem\)\]{width:calc(100vw - 2rem)}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[170px\]{min-width:170px}.min-w-\[220px\]{min-width:220px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-\[120px\]{max-width:120px}.max-w-\[160px\]{max-width:160px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[400px\]{max-width:400px}.max-w-\[90vw\]{max-width:90vw}.max-w-\[92\%\]{max-width:92%}.max-w-\[95vw\]{max-width:95vw}.max-w-\[calc\(100vw-1rem\)\]{max-width:calc(100vw - 1rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-top-left{transform-origin:top left}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.flex-row-reverse{flex-direction:row-reverse}.\!flex-col{flex-direction:column!important}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.\!gap-0{gap:0px!important}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-y-0\.5{row-gap:.125rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-r-lg{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-tr-sm{border-top-right-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-\[3px\]{border-left-width:3px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-500\/20{border-color:#f59e0b33}.border-amber-500\/30{border-color:#f59e0b4d}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-500\/20{border-color:#3b82f633}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-current{border-color:currentColor}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/40{border-color:hsl(var(--destructive) / .4)}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(22 163 74 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-muted-foreground{border-color:hsl(var(--muted-foreground))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-violet-500\/20{border-color:#8b5cf633}.border-zinc-300{--tw-border-opacity: 1;border-color:rgb(212 212 216 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-50\/50{background-color:#fffbeb80}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/5{background-color:#f59e0b0d}.bg-background{background-color:hsl(var(--background))}.bg-background\/60{background-color:hsl(var(--background) / .6)}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-background\/90{background-color:hsl(var(--background) / .9)}.bg-background\/95{background-color:hsl(var(--background) / .95)}.bg-black\/80{background-color:#000c}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-50\/50{background-color:#eff6ff80}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/20{background-color:#3b82f633}.bg-blue-500\/5{background-color:#3b82f60d}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.bg-muted\/10{background-color:hsl(var(--muted) / .1)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-rose-50{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-violet-50{--tw-bg-opacity: 1;background-color:rgb(245 243 255 / var(--tw-bg-opacity, 1))}.bg-violet-500\/5{background-color:#8b5cf60d}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.fill-amber-500{fill:#f59e0b}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.\!p-0{padding:0!important}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pr-16{padding-right:4rem}.pr-7{padding-right:1.75rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/80{color:hsl(var(--foreground) / .8)}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/60{color:hsl(var(--muted-foreground) / .6)}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-violet-300{--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.text-violet-400{--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.text-violet-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.decoration-dotted{text-decoration-style:dotted}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_8px_30px_rgb\(0\,0\,0\,0\.12\)\]{--tw-shadow: 0 8px 30px rgb(0,0,0,.12);--tw-shadow-colored: 0 8px 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-amber-600\/20{--tw-ring-color: rgb(217 119 6 / .2)}.ring-blue-600\/20{--tw-ring-color: rgb(37 99 235 / .2)}.ring-border{--tw-ring-color: hsl(var(--border))}.ring-emerald-600\/20{--tw-ring-color: rgb(5 150 105 / .2)}.ring-green-600\/20{--tw-ring-color: rgb(22 163 74 / .2)}.ring-purple-600\/20{--tw-ring-color: rgb(147 51 234 / .2)}.ring-rose-600\/20{--tw-ring-color: rgb(225 29 72 / .2)}.ring-violet-600\/20{--tw-ring-color: rgb(124 58 237 / .2)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);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)}.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{--tw-backdrop-blur: blur(8px);-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)}.backdrop-filter{-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{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in{--tw-enter-opacity: 0}.zoom-in{--tw-enter-scale: 0}.slide-in-from-bottom-2{--tw-enter-translate-y: .5rem}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\!running{animation-play-state:running!important}.running{animation-play-state:running}.\[engine\:agentx\]{engine:agentx}.\[model\:claude-sonnet-5\]{model:claude-sonnet-5}.\[model\:composer-2\.5\]{model:composer-2.5}.\[model\:cursor\/composer-2\.5\]{model:cursor/composer-2.5}.\[turns\:120\,think\]{turns:120,think}.\[turns\:120\]{turns:120}.\[turns\:9\]{turns:9}.dark\:prose-invert:is(.dark *){--tw-prose-body: var(--tw-prose-invert-body);--tw-prose-headings: var(--tw-prose-invert-headings);--tw-prose-lead: var(--tw-prose-invert-lead);--tw-prose-links: var(--tw-prose-invert-links);--tw-prose-bold: var(--tw-prose-invert-bold);--tw-prose-counters: var(--tw-prose-invert-counters);--tw-prose-bullets: var(--tw-prose-invert-bullets);--tw-prose-hr: var(--tw-prose-invert-hr);--tw-prose-quotes: var(--tw-prose-invert-quotes);--tw-prose-quote-borders: var(--tw-prose-invert-quote-borders);--tw-prose-captions: var(--tw-prose-invert-captions);--tw-prose-kbd: var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows: var(--tw-prose-invert-kbd-shadows);--tw-prose-code: var(--tw-prose-invert-code);--tw-prose-pre-code: var(--tw-prose-invert-pre-code);--tw-prose-pre-bg: var(--tw-prose-invert-pre-bg);--tw-prose-th-borders: var(--tw-prose-invert-th-borders);--tw-prose-td-borders: var(--tw-prose-invert-td-borders)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:border-0:last-child{border-width:0px}@media(hover:hover)and (pointer:fine){.hover\:border-muted-foreground:hover{border-color:hsl(var(--muted-foreground))}.hover\:border-ring:hover{border-color:hsl(var(--ring))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent\/50:hover{background-color:hsl(var(--accent) / .5)}.hover\:bg-amber-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-500\/20:hover{background-color:#f59e0b33}.hover\:bg-blue-500\/10:hover{background-color:#3b82f61a}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-green-50:hover{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-purple-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-violet-500\/10:hover{background-color:#8b5cf61a}.hover\:bg-zinc-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-amber-300:hover{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.hover\:text-amber-400:hover{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.hover\:text-blue-900:hover{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-primary:focus{--tw-ring-color: hsl(var(--primary))}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(hover:hover)and (pointer:fine){.group\/row:hover .group-hover\/row\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.prose-code\:before\:content-none :is(:where(code):not(:where([class~=not-prose],[class~=not-prose] *))):before{--tw-content: none;content:var(--tw-content)}.prose-code\:after\:content-none :is(:where(code):not(:where([class~=not-prose],[class~=not-prose] *))):after{--tw-content: none;content:var(--tw-content)}.prose-pre\:border :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){border-width:1px}.prose-pre\:bg-muted :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){background-color:hsl(var(--muted))}@supports (backdrop-filter: var(--tw)){.supports-\[backdrop-filter\]\:bg-background\/60{background-color:hsl(var(--background) / .6)}}.dark\:border-amber-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(180 83 9 / var(--tw-border-opacity, 1))}.dark\:border-amber-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(146 64 14 / var(--tw-border-opacity, 1))}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.dark\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.dark\:border-green-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(20 83 45 / var(--tw-border-opacity, 1))}.dark\:border-red-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity, 1))}.dark\:border-zinc-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(82 82 91 / var(--tw-border-opacity, 1))}.dark\:bg-amber-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.dark\:bg-amber-950\/20:is(.dark *){background-color:#451a0333}.dark\:bg-amber-950\/40:is(.dark *){background-color:#451a0366}.dark\:bg-amber-950\/50:is(.dark *){background-color:#451a0380}.dark\:bg-blue-950\/20:is(.dark *){background-color:#17255433}.dark\:bg-blue-950\/40:is(.dark *){background-color:#17255466}.dark\:bg-blue-950\/50:is(.dark *){background-color:#17255480}.dark\:bg-emerald-950\/50:is(.dark *){background-color:#022c2280}.dark\:bg-green-950\/30:is(.dark *){background-color:#052e164d}.dark\:bg-green-950\/50:is(.dark *){background-color:#052e1680}.dark\:bg-purple-950\/50:is(.dark *){background-color:#3b076480}.dark\:bg-red-950\/20:is(.dark *){background-color:#450a0a33}.dark\:bg-red-950\/30:is(.dark *){background-color:#450a0a4d}.dark\:bg-red-950\/50:is(.dark *){background-color:#450a0a80}.dark\:bg-rose-950\/50:is(.dark *){background-color:#4c051980}.dark\:bg-violet-950\/50:is(.dark *){background-color:#2e106580}.dark\:bg-zinc-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity, 1))}.dark\:bg-zinc-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity, 1))}.dark\:text-amber-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.dark\:text-amber-400:is(.dark *){--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-emerald-300:is(.dark *){--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.dark\:text-emerald-400:is(.dark *){--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-purple-300:is(.dark *){--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-rose-300:is(.dark *){--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.dark\:text-violet-300:is(.dark *){--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.dark\:shadow-\[0_8px_30px_rgb\(0\,0\,0\,0\.5\)\]:is(.dark *){--tw-shadow: 0 8px 30px rgb(0,0,0,.5);--tw-shadow-colored: 0 8px 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:ring-amber-400\/30:is(.dark *){--tw-ring-color: rgb(251 191 36 / .3)}.dark\:ring-blue-400\/30:is(.dark *){--tw-ring-color: rgb(96 165 250 / .3)}.dark\:ring-emerald-400\/30:is(.dark *){--tw-ring-color: rgb(52 211 153 / .3)}.dark\:ring-green-400\/30:is(.dark *){--tw-ring-color: rgb(74 222 128 / .3)}.dark\:ring-purple-400\/30:is(.dark *){--tw-ring-color: rgb(192 132 252 / .3)}.dark\:ring-rose-400\/30:is(.dark *){--tw-ring-color: rgb(251 113 133 / .3)}.dark\:ring-violet-400\/30:is(.dark *){--tw-ring-color: rgb(167 139 250 / .3)}@media(hover:hover)and (pointer:fine){.dark\:hover\:bg-green-950\/30:hover:is(.dark *){background-color:#052e164d}.dark\:hover\:bg-green-950\/50:hover:is(.dark *){background-color:#052e1680}.dark\:hover\:bg-purple-950\/70:hover:is(.dark *){background-color:#3b0764b3}.dark\:hover\:bg-red-950\/50:hover:is(.dark *){background-color:#450a0a80}.dark\:hover\:bg-zinc-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(63 63 70 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-blue-100:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity, 1))}}@media(min-width:640px){.sm\:relative{position:relative}.sm\:inset-auto{inset:auto}.sm\:z-auto{z-index:auto}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:flex{display:flex}.sm\:inline-flex{display:inline-flex}.sm\:hidden{display:none}.sm\:h-8{height:2rem}.sm\:h-\[520px\]{height:520px}.sm\:w-52{width:13rem}.sm\:w-64{width:16rem}.sm\:w-8{width:2rem}.sm\:w-\[480px\]{width:480px}.sm\:max-w-2xl{max-width:42rem}.sm\:max-w-\[85\%\]{max-width:85%}.sm\:shrink-0{flex-shrink:0}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2{gap:.5rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:border-r{border-right-width:1px}.sm\:p-6{padding:1.5rem}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}.sm\:text-left{text-align:left}}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.\!dark{--background: 222.2 84% 4.9% !important;--foreground: 210 40% 98% !important;--card: 222.2 84% 4.9% !important;--card-foreground: 210 40% 98% !important;--primary: 210 40% 98% !important;--primary-foreground: 222.2 47.4% 11.2% !important;--secondary: 217.2 32.6% 17.5% !important;--secondary-foreground: 210 40% 98% !important;--muted: 217.2 32.6% 17.5% !important;--muted-foreground: 215 20.2% 65.1% !important;--accent: 217.2 32.6% 17.5% !important;--accent-foreground: 210 40% 98% !important;--destructive: 0 62.8% 30.6% !important;--destructive-foreground: 210 40% 98% !important;--border: 217.2 32.6% 17.5% !important;--input: 217.2 32.6% 17.5% !important;--ring: 212.7 26.8% 83.9% !important}.dark{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";color:hsl(var(--foreground));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}html,body,#root{height:100%}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.prose{color:var(--tw-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px var(--tw-prose-kbd-shadows),0 3px 0 var(--tw-prose-kbd-shadows);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}.prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: rgb(17 24 39 / 10%);--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: rgb(255 255 255 / 10%);--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}.prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.prose-sm{font-size:.875rem;line-height:1.7142857}.prose-sm :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;line-height:1.5555556;margin-top:.8888889em;margin-bottom:.8888889em}.prose-sm :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.3333333em;margin-bottom:1.3333333em;padding-inline-start:1.1111111em}.prose-sm :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:2.1428571em;margin-top:0;margin-bottom:.8em;line-height:1.2}.prose-sm :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.4285714em;margin-top:1.6em;margin-bottom:.8em;line-height:1.4}.prose-sm :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:1.2857143em;margin-top:1.5555556em;margin-bottom:.4444444em;line-height:1.5555556}.prose-sm :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.4285714em;margin-bottom:.5714286em;line-height:1.4285714}.prose-sm :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;border-radius:.3125rem;padding-top:.1428571em;padding-inline-end:.3571429em;padding-bottom:.1428571em;padding-inline-start:.3571429em}.prose-sm :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em}.prose-sm :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.9em}.prose-sm :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8888889em}.prose-sm :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.6666667;margin-top:1.6666667em;margin-bottom:1.6666667em;border-radius:.25rem;padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em;padding-inline-start:1.5714286em}.prose-sm :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;margin-bottom:.2857143em}.prose-sm :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.4285714em}.prose-sm :where(.prose-sm>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(.prose-sm>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(.prose-sm>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.1428571em}.prose-sm :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5714286em;margin-bottom:.5714286em}.prose-sm :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em;margin-bottom:1.1428571em}.prose-sm :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.1428571em}.prose-sm :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.2857143em;padding-inline-start:1.5714286em}.prose-sm :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2.8571429em;margin-bottom:2.8571429em}.prose-sm :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.5}.prose-sm :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.6666667em;padding-inline-end:1em;padding-bottom:.6666667em;padding-inline-start:1em}.prose-sm :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose-sm :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose-sm :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.7142857em;margin-bottom:1.7142857em}.prose-sm :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose-sm :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){font-size:.8571429em;line-height:1.3333333;margin-top:.6666667em}.prose-sm :where(.prose-sm>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose-sm :where(.prose-sm>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.-right-1\.5{right:-.375rem}.-top-1\.5{top:-.375rem}.bottom-3{bottom:.75rem}.bottom-4{bottom:1rem}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2,.left-\[50\%\]{left:50%}.right-12{right:3rem}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-2{top:.5rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-10{z-index:10}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[1090\]{z-index:1090}.z-\[1100\]{z-index:1100}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-mt-1{margin-top:-.25rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-1\.5{margin-right:.375rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[100vh\]{height:100vh}.h-\[70dvh\]{height:70dvh}.h-\[85vh\]{height:85vh}.h-\[90vh\]{height:90vh}.h-full{height:100%}.max-h-48{max-height:12rem}.max-h-64{max-height:16rem}.max-h-96{max-height:24rem}.max-h-\[200px\]{max-height:200px}.max-h-\[40vh\]{max-height:40vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85dvh\]{max-height:85dvh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.min-h-0{min-height:0px}.min-h-\[28px\]{min-height:28px}.min-h-\[40px\]{min-height:40px}.min-h-\[80px\]{min-height:80px}.w-1\.5{width:.375rem}.w-1\/3{width:33.333333%}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-36{width:9rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[100vw\]{width:100vw}.w-\[90vw\]{width:90vw}.w-\[calc\(100vw-2rem\)\]{width:calc(100vw - 2rem)}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[170px\]{min-width:170px}.min-w-\[220px\]{min-width:220px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-\[120px\]{max-width:120px}.max-w-\[160px\]{max-width:160px}.max-w-\[200px\]{max-width:200px}.max-w-\[280px\]{max-width:280px}.max-w-\[400px\]{max-width:400px}.max-w-\[90vw\]{max-width:90vw}.max-w-\[92\%\]{max-width:92%}.max-w-\[95vw\]{max-width:95vw}.max-w-\[calc\(100vw-1rem\)\]{max-width:calc(100vw - 1rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-top-left{transform-origin:top left}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-5{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.flex-row-reverse{flex-direction:row-reverse}.\!flex-col{flex-direction:column!important}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.\!gap-0{gap:0px!important}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-y-0\.5{row-gap:.125rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-r-lg{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-tr-sm{border-top-right-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-l-\[3px\]{border-left-width:3px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-500\/20{border-color:#f59e0b33}.border-amber-500\/30{border-color:#f59e0b4d}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-500\/20{border-color:#3b82f633}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-current{border-color:currentColor}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/40{border-color:hsl(var(--destructive) / .4)}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-green-600{--tw-border-opacity: 1;border-color:rgb(22 163 74 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-muted-foreground{border-color:hsl(var(--muted-foreground))}.border-primary{border-color:hsl(var(--primary))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-violet-500\/20{border-color:#8b5cf633}.border-zinc-300{--tw-border-opacity: 1;border-color:rgb(212 212 216 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-50\/50{background-color:#fffbeb80}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/5{background-color:#f59e0b0d}.bg-background{background-color:hsl(var(--background))}.bg-background\/60{background-color:hsl(var(--background) / .6)}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-background\/90{background-color:hsl(var(--background) / .9)}.bg-background\/95{background-color:hsl(var(--background) / .95)}.bg-black\/80{background-color:#000c}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-50\/50{background-color:#eff6ff80}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/20{background-color:#3b82f633}.bg-blue-500\/5{background-color:#3b82f60d}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity, 1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted-foreground{background-color:hsl(var(--muted-foreground))}.bg-muted\/10{background-color:hsl(var(--muted) / .1)}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-rose-50{--tw-bg-opacity: 1;background-color:rgb(255 241 242 / var(--tw-bg-opacity, 1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-violet-50{--tw-bg-opacity: 1;background-color:rgb(245 243 255 / var(--tw-bg-opacity, 1))}.bg-violet-500\/5{background-color:#8b5cf60d}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.fill-amber-500{fill:#f59e0b}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.\!p-0{padding:0!important}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pr-16{padding-right:4rem}.pr-7{padding-right:1.75rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/80{color:hsl(var(--foreground) / .8)}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/30{color:hsl(var(--muted-foreground) / .3)}.text-muted-foreground\/40{color:hsl(var(--muted-foreground) / .4)}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/60{color:hsl(var(--muted-foreground) / .6)}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-violet-300{--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.text-violet-400{--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.text-violet-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.decoration-dotted{text-decoration-style:dotted}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_8px_30px_rgb\(0\,0\,0\,0\.12\)\]{--tw-shadow: 0 8px 30px rgb(0,0,0,.12);--tw-shadow-colored: 0 8px 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-amber-600\/20{--tw-ring-color: rgb(217 119 6 / .2)}.ring-blue-600\/20{--tw-ring-color: rgb(37 99 235 / .2)}.ring-border{--tw-ring-color: hsl(var(--border))}.ring-emerald-600\/20{--tw-ring-color: rgb(5 150 105 / .2)}.ring-green-600\/20{--tw-ring-color: rgb(22 163 74 / .2)}.ring-purple-600\/20{--tw-ring-color: rgb(147 51 234 / .2)}.ring-rose-600\/20{--tw-ring-color: rgb(225 29 72 / .2)}.ring-violet-600\/20{--tw-ring-color: rgb(124 58 237 / .2)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);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)}.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{--tw-backdrop-blur: blur(8px);-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)}.backdrop-filter{-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{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in{--tw-enter-opacity: 0}.zoom-in{--tw-enter-scale: 0}.slide-in-from-bottom-2{--tw-enter-translate-y: .5rem}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.\!running{animation-play-state:running!important}.running{animation-play-state:running}.\[engine\:ext-agent\]{engine:ext-agent}.\[model\:claude-sonnet-5\]{model:claude-sonnet-5}.\[model\:composer-2\.5\]{model:composer-2.5}.\[model\:cursor\/composer-2\.5\]{model:cursor/composer-2.5}.\[turns\:120\,think\]{turns:120,think}.\[turns\:120\]{turns:120}.\[turns\:9\]{turns:9}.dark\:prose-invert:is(.dark *){--tw-prose-body: var(--tw-prose-invert-body);--tw-prose-headings: var(--tw-prose-invert-headings);--tw-prose-lead: var(--tw-prose-invert-lead);--tw-prose-links: var(--tw-prose-invert-links);--tw-prose-bold: var(--tw-prose-invert-bold);--tw-prose-counters: var(--tw-prose-invert-counters);--tw-prose-bullets: var(--tw-prose-invert-bullets);--tw-prose-hr: var(--tw-prose-invert-hr);--tw-prose-quotes: var(--tw-prose-invert-quotes);--tw-prose-quote-borders: var(--tw-prose-invert-quote-borders);--tw-prose-captions: var(--tw-prose-invert-captions);--tw-prose-kbd: var(--tw-prose-invert-kbd);--tw-prose-kbd-shadows: var(--tw-prose-invert-kbd-shadows);--tw-prose-code: var(--tw-prose-invert-code);--tw-prose-pre-code: var(--tw-prose-invert-pre-code);--tw-prose-pre-bg: var(--tw-prose-invert-pre-bg);--tw-prose-th-borders: var(--tw-prose-invert-th-borders);--tw-prose-td-borders: var(--tw-prose-invert-td-borders)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:border-0:last-child{border-width:0px}@media(hover:hover)and (pointer:fine){.hover\:border-muted-foreground:hover{border-color:hsl(var(--muted-foreground))}.hover\:border-ring:hover{border-color:hsl(var(--ring))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-accent\/50:hover{background-color:hsl(var(--accent) / .5)}.hover\:bg-amber-50:hover{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-500\/20:hover{background-color:#f59e0b33}.hover\:bg-blue-500\/10:hover{background-color:#3b82f61a}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-green-50:hover{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/10:hover{background-color:hsl(var(--primary) / .1)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-purple-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-violet-500\/10:hover{background-color:#8b5cf61a}.hover\:bg-zinc-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-amber-300:hover{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.hover\:text-amber-400:hover{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.hover\:text-blue-900:hover{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-primary:focus{--tw-ring-color: hsl(var(--primary))}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(hover:hover)and (pointer:fine){.group\/row:hover .group-hover\/row\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.prose-code\:before\:content-none :is(:where(code):not(:where([class~=not-prose],[class~=not-prose] *))):before{--tw-content: none;content:var(--tw-content)}.prose-code\:after\:content-none :is(:where(code):not(:where([class~=not-prose],[class~=not-prose] *))):after{--tw-content: none;content:var(--tw-content)}.prose-pre\:border :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){border-width:1px}.prose-pre\:bg-muted :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){background-color:hsl(var(--muted))}@supports (backdrop-filter: var(--tw)){.supports-\[backdrop-filter\]\:bg-background\/60{background-color:hsl(var(--background) / .6)}}.dark\:border-amber-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(180 83 9 / var(--tw-border-opacity, 1))}.dark\:border-amber-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(146 64 14 / var(--tw-border-opacity, 1))}.dark\:border-blue-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(29 78 216 / var(--tw-border-opacity, 1))}.dark\:border-blue-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.dark\:border-green-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(20 83 45 / var(--tw-border-opacity, 1))}.dark\:border-red-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity, 1))}.dark\:border-zinc-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(82 82 91 / var(--tw-border-opacity, 1))}.dark\:bg-amber-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.dark\:bg-amber-950\/20:is(.dark *){background-color:#451a0333}.dark\:bg-amber-950\/40:is(.dark *){background-color:#451a0366}.dark\:bg-amber-950\/50:is(.dark *){background-color:#451a0380}.dark\:bg-blue-950\/20:is(.dark *){background-color:#17255433}.dark\:bg-blue-950\/40:is(.dark *){background-color:#17255466}.dark\:bg-blue-950\/50:is(.dark *){background-color:#17255480}.dark\:bg-emerald-950\/50:is(.dark *){background-color:#022c2280}.dark\:bg-green-950\/30:is(.dark *){background-color:#052e164d}.dark\:bg-green-950\/50:is(.dark *){background-color:#052e1680}.dark\:bg-purple-950\/50:is(.dark *){background-color:#3b076480}.dark\:bg-red-950\/20:is(.dark *){background-color:#450a0a33}.dark\:bg-red-950\/30:is(.dark *){background-color:#450a0a4d}.dark\:bg-red-950\/50:is(.dark *){background-color:#450a0a80}.dark\:bg-rose-950\/50:is(.dark *){background-color:#4c051980}.dark\:bg-violet-950\/50:is(.dark *){background-color:#2e106580}.dark\:bg-zinc-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity, 1))}.dark\:bg-zinc-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity, 1))}.dark\:text-amber-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.dark\:text-amber-400:is(.dark *){--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-emerald-300:is(.dark *){--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.dark\:text-emerald-400:is(.dark *){--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.dark\:text-green-300:is(.dark *){--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is(.dark *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-purple-300:is(.dark *){--tw-text-opacity: 1;color:rgb(216 180 254 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is(.dark *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-rose-300:is(.dark *){--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.dark\:text-violet-300:is(.dark *){--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.dark\:shadow-\[0_8px_30px_rgb\(0\,0\,0\,0\.5\)\]:is(.dark *){--tw-shadow: 0 8px 30px rgb(0,0,0,.5);--tw-shadow-colored: 0 8px 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:ring-amber-400\/30:is(.dark *){--tw-ring-color: rgb(251 191 36 / .3)}.dark\:ring-blue-400\/30:is(.dark *){--tw-ring-color: rgb(96 165 250 / .3)}.dark\:ring-emerald-400\/30:is(.dark *){--tw-ring-color: rgb(52 211 153 / .3)}.dark\:ring-green-400\/30:is(.dark *){--tw-ring-color: rgb(74 222 128 / .3)}.dark\:ring-purple-400\/30:is(.dark *){--tw-ring-color: rgb(192 132 252 / .3)}.dark\:ring-rose-400\/30:is(.dark *){--tw-ring-color: rgb(251 113 133 / .3)}.dark\:ring-violet-400\/30:is(.dark *){--tw-ring-color: rgb(167 139 250 / .3)}@media(hover:hover)and (pointer:fine){.dark\:hover\:bg-green-950\/30:hover:is(.dark *){background-color:#052e164d}.dark\:hover\:bg-green-950\/50:hover:is(.dark *){background-color:#052e1680}.dark\:hover\:bg-purple-950\/70:hover:is(.dark *){background-color:#3b0764b3}.dark\:hover\:bg-red-950\/50:hover:is(.dark *){background-color:#450a0a80}.dark\:hover\:bg-zinc-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(63 63 70 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-blue-100:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(219 234 254 / var(--tw-text-opacity, 1))}}@media(min-width:640px){.sm\:relative{position:relative}.sm\:inset-auto{inset:auto}.sm\:z-auto{z-index:auto}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:flex{display:flex}.sm\:inline-flex{display:inline-flex}.sm\:hidden{display:none}.sm\:h-8{height:2rem}.sm\:h-\[520px\]{height:520px}.sm\:w-52{width:13rem}.sm\:w-64{width:16rem}.sm\:w-8{width:2rem}.sm\:w-\[480px\]{width:480px}.sm\:max-w-2xl{max-width:42rem}.sm\:max-w-\[85\%\]{max-width:85%}.sm\:shrink-0{flex-shrink:0}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2{gap:.5rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:border-r{border-right-width:1px}.sm\:p-6{padding:1.5rem}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-6{padding-top:1.5rem;padding-bottom:1.5rem}.sm\:text-left{text-align:left}}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
2
2
  Theme: GitHub
3
3
  Description: Light theme as seen on github.com
4
4
  Author: github.com
@@ -1844,7 +1844,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),hn=ge,kt=je),nt===void
1844
1844
  `)},lM=function(){var e=parseInt(document.body.getAttribute(fu)||"0",10);return isFinite(e)?e:0},sne=function(){y.useEffect(function(){return document.body.setAttribute(fu,(lM()+1).toString()),function(){var e=lM()-1;e<=0?document.body.removeAttribute(fu):document.body.setAttribute(fu,e.toString())}},[])},lne=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;sne();var a=y.useMemo(function(){return ine(i)},[i]);return y.createElement(ane,{styles:one(a,!t,i,n?"":"!important")})},Rw=!1;if(typeof window<"u")try{var lm=Object.defineProperty({},"passive",{get:function(){return Rw=!0,!0}});window.addEventListener("test",lm,lm),window.removeEventListener("test",lm,lm)}catch{Rw=!1}var Bc=Rw?{passive:!1}:!1,cne=function(e){return e.tagName==="TEXTAREA"},Nz=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!cne(e)&&n[t]==="visible")},une=function(e){return Nz(e,"overflowY")},fne=function(e){return Nz(e,"overflowX")},cM=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Mz(e,r);if(i){var a=Iz(e,r),s=a[1],c=a[2];if(s>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},dne=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},hne=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Mz=function(e,t){return e==="v"?une(t):fne(t)},Iz=function(e,t){return e==="v"?dne(t):hne(t)},pne=function(e,t){return e==="h"&&t==="rtl"?-1:1},mne=function(e,t,n,r,i){var a=pne(e,window.getComputedStyle(t).direction),s=a*r,c=n.target,u=t.contains(c),f=!1,h=s>0,p=0,m=0;do{if(!c)break;var v=Iz(e,c),x=v[0],b=v[1],S=v[2],_=b-S-a*x;(x||_)&&Mz(e,c)&&(p+=_,m+=x);var O=c.parentNode;c=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(h&&Math.abs(p)<1||!h&&Math.abs(m)<1)&&(f=!0),f},cm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uM=function(e){return[e.deltaX,e.deltaY]},fM=function(e){return e&&"current"in e?e.current:e},gne=function(e,t){return e[0]===t[0]&&e[1]===t[1]},vne=function(e){return`
1845
1845
  .block-interactivity-`.concat(e,` {pointer-events: none;}
1846
1846
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
1847
- `)},yne=0,Uc=[];function bne(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(yne++)[0],a=y.useState(Tz)[0],s=y.useRef(e);y.useEffect(function(){s.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=qH([e.lockRef.current],(e.shards||[]).map(fM),!0).filter(Boolean);return b.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=y.useCallback(function(b,S){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!s.current.allowPinchZoom;var _=cm(b),O=n.current,k="deltaX"in b?b.deltaX:O[0]-_[0],T="deltaY"in b?b.deltaY:O[1]-_[1],C,N=b.target,P=Math.abs(k)>Math.abs(T)?"h":"v";if("touches"in b&&P==="h"&&N.type==="range")return!1;var D=window.getSelection(),j=D&&D.anchorNode,R=j?j===N||j.contains(N):!1;if(R)return!1;var F=cM(P,N);if(!F)return!0;if(F?C=P:(C=P==="v"?"h":"v",F=cM(P,N)),!F)return!1;if(!r.current&&"changedTouches"in b&&(k||T)&&(r.current=C),!C)return!0;var I=r.current||C;return mne(I,S,b,I==="h"?k:T)},[]),u=y.useCallback(function(b){var S=b;if(!(!Uc.length||Uc[Uc.length-1]!==a)){var _="deltaY"in S?uM(S):cm(S),O=t.current.filter(function(C){return C.name===S.type&&(C.target===S.target||S.target===C.shadowParent)&&gne(C.delta,_)})[0];if(O&&O.should){S.cancelable&&S.preventDefault();return}if(!O){var k=(s.current.shards||[]).map(fM).filter(Boolean).filter(function(C){return C.contains(S.target)}),T=k.length>0?c(S,k[0]):!s.current.noIsolation;T&&S.cancelable&&S.preventDefault()}}},[]),f=y.useCallback(function(b,S,_,O){var k={name:b,delta:S,target:_,should:O,shadowParent:xne(_)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(T){return T!==k})},1)},[]),h=y.useCallback(function(b){n.current=cm(b),r.current=void 0},[]),p=y.useCallback(function(b){f(b.type,uM(b),b.target,c(b,e.lockRef.current))},[]),m=y.useCallback(function(b){f(b.type,cm(b),b.target,c(b,e.lockRef.current))},[]);y.useEffect(function(){return Uc.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",u,Bc),document.addEventListener("touchmove",u,Bc),document.addEventListener("touchstart",h,Bc),function(){Uc=Uc.filter(function(b){return b!==a}),document.removeEventListener("wheel",u,Bc),document.removeEventListener("touchmove",u,Bc),document.removeEventListener("touchstart",h,Bc)}},[]);var v=e.removeScrollBar,x=e.inert;return y.createElement(y.Fragment,null,x?y.createElement(a,{styles:vne(i)}):null,v?y.createElement(lne,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xne(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wne=Yte(Cz,bne);var qE=y.forwardRef(function(e,t){return y.createElement(_v,aa({},e,{ref:t,sideCar:wne}))});qE.classNames=_v.classNames;var Ene=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Fc=new WeakMap,um=new WeakMap,fm={},hx=0,Rz=function(e){return e&&(e.host||Rz(e.parentNode))},Sne=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Rz(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},_ne=function(e,t,n,r){var i=Sne(t,Array.isArray(e)?e:[e]);fm[n]||(fm[n]=new WeakMap);var a=fm[n],s=[],c=new Set,u=new Set(i),f=function(p){!p||c.has(p)||(c.add(p),f(p.parentNode))};i.forEach(f);var h=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(m){if(c.has(m))h(m);else try{var v=m.getAttribute(r),x=v!==null&&v!=="false",b=(Fc.get(m)||0)+1,S=(a.get(m)||0)+1;Fc.set(m,b),a.set(m,S),s.push(m),b===1&&x&&um.set(m,!0),S===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(_){console.error("aria-hidden: cannot operate on ",m,_)}})};return h(t),c.clear(),hx++,function(){s.forEach(function(p){var m=Fc.get(p)-1,v=a.get(p)-1;Fc.set(p,m),a.set(p,v),m||(um.has(p)||p.removeAttribute(r),um.delete(p)),v||p.removeAttribute(n)}),hx--,hx||(Fc=new WeakMap,Fc=new WeakMap,um=new WeakMap,fm={})}},Pz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Ene(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),_ne(r,i,n,"aria-hidden")):function(){return null}},Av="Dialog",[Dz]=Mj(Av),[Ane,$i]=Dz(Av),jz=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,c=y.useRef(null),u=y.useRef(null),[f,h]=xte({prop:r,defaultProp:i??!1,onChange:a,caller:Av});return E.jsx(Ane,{scope:t,triggerRef:c,contentRef:u,contentId:sx(),titleId:sx(),descriptionId:sx(),open:f,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(p=>!p),[h]),modal:s,children:n})};jz.displayName=Av;var Lz="DialogTrigger",zz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(Lz,n),a=ti(t,i.triggerRef);return E.jsx(Pr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":XE(i.open),...r,ref:a,onClick:vr(e.onClick,i.onOpenToggle)})});zz.displayName=Lz;var GE="DialogPortal",[kne,$z]=Dz(GE,{forceMount:void 0}),Bz=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=$i(GE,t);return E.jsx(kne,{scope:t,forceMount:n,children:y.Children.map(r,s=>E.jsx(Rs,{present:n||a.open,children:E.jsx(kz,{asChild:!0,container:i,children:s})}))})};Bz.displayName=GE;var pg="DialogOverlay",VE=y.forwardRef((e,t)=>{const n=$z(pg,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$i(pg,e.__scopeDialog);return a.modal?E.jsx(Rs,{present:r||a.open,children:E.jsx(Cne,{...i,ref:t})}):null});VE.displayName=pg;var One=xE("DialogOverlay.RemoveScroll"),Cne=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(pg,n),a=Cte(),s=ti(t,a);return E.jsx(qE,{as:One,allowPinchZoom:!0,shards:[i.contentRef],children:E.jsx(Pr.div,{"data-state":XE(i.open),...r,ref:s,style:{pointerEvents:"auto",...r.style}})})}),Eu="DialogContent",WE=y.forwardRef((e,t)=>{const n=$z(Eu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$i(Eu,e.__scopeDialog);return E.jsx(Rs,{present:r||a.open,children:a.modal?E.jsx(Tne,{...i,ref:t}):E.jsx(Nne,{...i,ref:t})})});WE.displayName=Eu;var Tne=y.forwardRef((e,t)=>{const n=$i(Eu,e.__scopeDialog),r=y.useRef(null),i=ti(t,n.contentRef,r);return y.useEffect(()=>{const a=r.current;if(a)return Pz(a)},[]),E.jsx(Uz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:vr(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:vr(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&a.preventDefault()}),onFocusOutside:vr(e.onFocusOutside,a=>a.preventDefault())})}),Nne=y.forwardRef((e,t)=>{const n=$i(Eu,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return E.jsx(Uz,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,c;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,f;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((f=n.triggerRef.current)==null?void 0:f.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),Uz=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,c=$i(Eu,n);return Bte(),E.jsx(E.Fragment,{children:E.jsx(_z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:E.jsx(Ez,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":XE(c.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),Fz="DialogTitle",YE=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(Fz,n);return E.jsx(Pr.h2,{id:i.titleId,...r,ref:t})});YE.displayName=Fz;var Hz="DialogDescription",Mne=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(Hz,n);return E.jsx(Pr.p,{id:i.descriptionId,...r,ref:t})});Mne.displayName=Hz;var Kz="DialogClose",qz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(Kz,n);return E.jsx(Pr.button,{type:"button",...r,ref:t,onClick:vr(e.onClick,()=>i.onOpenChange(!1))})});qz.displayName=Kz;function XE(e){return e?"open":"closed"}const Es=jz,ch=zz,Ine=Bz,Gz=y.forwardRef(({className:e,...t},n)=>E.jsx(VE,{ref:n,className:He("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Gz.displayName=VE.displayName;const uo=y.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(Ine,{children:[E.jsx(Gz,{}),E.jsxs(WE,{ref:r,className:He("fixed left-[50%] top-[50%] z-50 flex flex-col w-[calc(100vw-2rem)] max-w-lg max-h-[85dvh] overflow-y-auto translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-4 sm:p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",e),...n,children:[t,E.jsxs(qz,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[E.jsx(Pl,{className:"h-4 w-4"}),E.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));uo.displayName=WE.displayName;function jl({className:e,...t}){return E.jsx("div",{className:He("shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t})}function Vz({className:e,...t}){return E.jsx("div",{"data-dialog-body":!0,className:He("flex-1 min-h-0 overflow-y-auto -mx-4 px-4 sm:-mx-6 sm:px-6",e),...t})}function Wz({className:e,...t}){return E.jsx("div",{className:He("shrink-0 -mx-4 px-4 pt-3 border-t sm:-mx-6 sm:px-6","flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t})}const Ss=y.forwardRef(({className:e,...t},n)=>E.jsx(YE,{ref:n,className:He("text-lg font-semibold leading-none tracking-tight",e),...t}));Ss.displayName=YE.displayName;const Rne=new Set(["png","jpg","jpeg","gif","webp","svg","ico","bmp","avif"]),Pne=new Set(["pdf","mp4","webm","mp3","ogg","wav"]);async function Dne(e,t){const n=await t();if(!n)return[];const r=await fetch(`/api/workspace/ls?path=${encodeURIComponent(e)}`,{headers:{Authorization:`Bearer ${n}`}});return r.ok?(await r.json()).entries??[]:[]}function jne({getToken:e,onRefresh:t,refreshKey:n}){const[r,i]=y.useState(new Map),[a,s]=y.useState(()=>new Set),[c,u]=y.useState(null),[f,h]=y.useState(!1),[p,m]=y.useState("fit"),[v,x]=y.useState(null),[b,S]=y.useState(null),_=y.useRef(null),[O,k]=y.useState(null),[T,C]=y.useState(!1),[N,P]=y.useState([]),D=y.useCallback(async B=>{const Y=await Dne(B,e);i(H=>new Map(H).set(B,Y))},[e]);y.useEffect(()=>{D(""),a.forEach(B=>D(B))},[D,n]);const j=r.get("")??[],R=y.useCallback(B=>{try{const Y=B.contentDocument;if(!(Y!=null&&Y.body))return;const H=Math.max(Y.body.offsetWidth,Y.body.scrollWidth),K=Math.max(Y.body.offsetHeight,Y.body.scrollHeight);H&&K&&S({w:H,h:K})}catch{}},[]),F=y.useCallback(()=>{const B=_.current,Y=b;if(!B||!Y)return;const H=16,K=B.clientWidth-H,L=B.clientHeight-H,U=Math.min(K/Y.w,L/Y.h,1);x({scale:U,w:Y.w,h:Y.h})},[b]);y.useEffect(()=>{if(!(c!=null&&c.html)||p!=="fit"){x(null);return}const B=_.current;if(!B)return;const Y=new ResizeObserver(()=>requestAnimationFrame(F));return Y.observe(B),()=>Y.disconnect()},[c==null?void 0:c.html,f,p,F]),y.useEffect(()=>{T&&e().then(B=>{B&&fetch("/api/data-sync/log",{headers:{Authorization:`Bearer ${B}`}}).then(Y=>Y.json()).then(P).catch(()=>{})})},[T]);const I=B=>{s(Y=>{const H=new Set(Y);return H.has(B)?H.delete(B):(H.add(B),r.has(B)||D(B)),H})},G=(B,Y)=>{const H=new URLSearchParams({path:B});return O&&H.set("token",O),Y&&H.set("dl","1"),`/api/workspace/raw?${H}`},V=async B=>{var K;const Y=await e();if(!Y)return;k(Y);const H=((K=B.split(".").pop())==null?void 0:K.toLowerCase())??"";if(H==="html"||H==="htm"){u({path:B,content:"",binary:!1,html:!0});return}if(Rne.has(H)){u({path:B,content:"",binary:!1,image:!0});return}if(Pne.has(H)){u({path:B,content:"",binary:!1,html:!0});return}try{const L=await fetch(`/api/workspace/file?path=${encodeURIComponent(B)}`,{headers:{Authorization:`Bearer ${Y}`}});if(!L.ok)return;const U=await L.json();u({path:B,content:U.content,binary:!!U.binary})}catch{}},q=(B,Y)=>E.jsx(E.Fragment,{children:B.map(H=>{const K=H.path.split("/").pop();return E.jsxs("div",{children:[H.type==="dir"?E.jsxs("button",{onClick:()=>I(H.path),className:"w-full flex items-center gap-1 px-2 py-1 rounded hover:bg-accent/50 text-left text-sm",style:{paddingLeft:8+Y*12},children:[E.jsx(Is,{className:He("w-3 h-3 shrink-0 transition-transform",a.has(H.path)&&"rotate-90")}),E.jsx(eG,{className:"w-3.5 h-3.5 shrink-0 text-muted-foreground"}),E.jsx("span",{className:"truncate",children:K})]}):E.jsxs("button",{onClick:()=>V(H.path),className:"w-full flex items-center gap-1 px-2 py-1 rounded hover:bg-accent/50 text-left text-sm",style:{paddingLeft:8+Y*12+12},title:H.oneLiner||H.path,children:[E.jsx(mE,{className:"w-3.5 h-3.5 shrink-0 text-muted-foreground"}),E.jsx("span",{className:"truncate",children:K})]}),H.type==="dir"&&a.has(H.path)&&q(r.get(H.path)??[],Y+1)]},H.path)})});return E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"flex items-center justify-between px-3 pt-2 pb-1 shrink-0",children:[E.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Workspace"}),E.jsxs("div",{className:"flex items-center gap-0.5",children:[E.jsx("button",{onClick:()=>C(!0),className:"p-0.5 rounded hover:bg-accent text-muted-foreground",title:"Activity log",children:E.jsx(nG,{className:"w-3 h-3"})}),E.jsx("button",{onClick:()=>{D(""),a.forEach(B=>D(B)),t==null||t()},className:"p-0.5 rounded hover:bg-accent text-muted-foreground",title:"Refresh",children:E.jsx(fG,{className:"w-3 h-3"})})]})]}),E.jsx("div",{className:"px-1 pb-2 overflow-y-auto min-h-0",children:j.length===0?E.jsx("p",{className:"text-xs text-muted-foreground px-3 py-2",children:"Empty. Drop .md files into data/workspace/ or ask the agent to create some."}):q(j,0)}),E.jsx(Es,{open:!!c,onOpenChange:B=>{B||(u(null),h(!1),m("fit"),S(null))},children:E.jsxs(uo,{className:He(c!=null&&c.html?He("!flex !flex-col !p-0 !gap-0 overflow-hidden",f?"max-w-none w-[100vw] h-[100vh] rounded-none border-0":"max-w-[90vw] w-[90vw] h-[85vh]"):"max-w-3xl max-h-[80vh] !flex !flex-col overflow-hidden"),children:[E.jsxs("div",{className:"absolute right-12 top-4 flex items-center gap-1.5 z-10",children:[(c==null?void 0:c.html)&&E.jsxs(E.Fragment,{children:[E.jsx("button",{onClick:()=>m(B=>B==="fit"?"scroll":"fit"),className:"rounded-sm opacity-70 hover:opacity-100 text-muted-foreground",title:p==="fit"?"Switch to scrollable (1:1)":"Switch to scale-to-fit",children:p==="fit"?E.jsx(sG,{className:"w-4 h-4"}):E.jsx(hG,{className:"w-4 h-4"})}),E.jsx("button",{onClick:()=>h(B=>!B),className:"rounded-sm opacity-70 hover:opacity-100 text-muted-foreground",title:f?"Restore":"Maximize",children:f?E.jsx(vE,{className:"w-4 h-4"}):E.jsx(gE,{className:"w-4 h-4"})})]}),c&&E.jsx("a",{href:G(c.path,!0),download:!0,className:"rounded-sm opacity-70 hover:opacity-100 text-muted-foreground",title:"Download",children:E.jsx(kj,{className:"w-4 h-4"})})]}),E.jsx(jl,{className:He((c==null?void 0:c.html)&&"px-4 py-3 shrink-0 border-b"),children:E.jsx(Ss,{className:"font-mono text-sm truncate pr-16",children:c==null?void 0:c.path})}),E.jsx("div",{ref:c!=null&&c.html?_:void 0,className:He(c!=null&&c.html?He("flex-1 min-h-0 bg-muted/10",p==="fit"?"overflow-hidden flex items-center justify-center":"overflow-auto"):"flex-1 min-h-0 overflow-y-auto"),children:c!=null&&c.html?p==="fit"?E.jsx("div",{style:v?{width:v.w*v.scale,height:v.h*v.scale}:{width:"100%",height:"100%"},children:E.jsx("iframe",{src:G(c.path),className:"border-0 bg-white origin-top-left",title:c.path,onLoad:B=>{R(B.currentTarget),F()},style:v?{width:v.w,height:v.h,transform:`scale(${v.scale})`}:{width:"100%",height:"100%"}})}):E.jsx("iframe",{src:G(c.path),className:"border-0 bg-white mx-auto block",title:c.path,onLoad:B=>R(B.currentTarget),style:{width:(b==null?void 0:b.w)||"100%",height:(b==null?void 0:b.h)||"100%"}}):c!=null&&c.image?E.jsx("div",{className:"flex items-center justify-center p-4",children:E.jsx("img",{src:G(c.path),alt:c.path,className:"max-w-full max-h-[70vh] object-contain"})}):c!=null&&c.binary?E.jsx("p",{className:"text-sm text-muted-foreground",children:"(binary file — preview unavailable)"}):c!=null&&c.path.toLowerCase().endsWith(".md")||c!=null&&c.path.toLowerCase().endsWith(".markdown")?E.jsx("div",{className:"text-sm",children:E.jsx(TL,{remarkPlugins:[JL],rehypePlugins:[wz],className:"prose prose-sm max-w-none dark:prose-invert prose-pre:bg-muted prose-pre:border prose-code:before:content-none prose-code:after:content-none",children:c.content})}):E.jsx("pre",{className:"text-xs whitespace-pre-wrap break-all",children:c==null?void 0:c.content})})]})}),E.jsx(Es,{open:T,onOpenChange:C,children:E.jsxs(uo,{className:"max-w-2xl max-h-[80vh] overflow-hidden flex flex-col",children:[E.jsx(jl,{children:E.jsx(Ss,{className:"text-sm",children:"Activity Log"})}),E.jsxs("div",{className:"overflow-y-auto flex-1 space-y-2",children:[N.map(B=>E.jsxs("div",{className:"border-b border-border/50 pb-2 last:border-0",children:[E.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[E.jsx("span",{className:"text-sm text-foreground",children:B.message}),E.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:Lne(B.date)})]}),B.files.length>0&&E.jsx("div",{className:"text-[11px] text-muted-foreground mt-0.5",children:B.files.map(Y=>E.jsx("span",{className:"inline-block mr-2 font-mono",children:Y},Y))})]},B.hash)),N.length===0&&E.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No activity yet"})]})]})})]})}function Lne(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/6e4);if(i<60)return`${i}m ago`;const a=Math.floor(i/60);return a<24?`${a}h ago`:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Yz(e,t=Date.now()){if(!e)return null;const n=new Date(e).getTime()-t;if(!Number.isFinite(n)||n<=0)return null;const r=Math.round(n/6e4);if(r<1)return"1m";if(r<60)return`${r}m`;const i=Math.floor(r/60),a=r%60;if(i<48)return a?`${i}h ${a}m`:`${i}h`;const s=Math.floor(i/24),c=i%24;return c?`${s}d ${c}h`:`${s}d`}const zne=/resets\s+(\d{1,2})(?::(\d{2}))?\s*(am|pm)?\s*\(UTC\)/i;function $ne(e,t=Date.now(),n=Date.now()){var p;const r=e.match(zne);if(!r)return e;let i=Number(r[1]);const a=r[2]?Number(r[2]):0,s=(p=r[3])==null?void 0:p.toLowerCase();if(s==="pm"&&i<12&&(i+=12),s==="am"&&i===12&&(i=0),i>23||a>59)return e;const c=new Date(t),u=new Date(Date.UTC(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),i,a));u.getTime()<=t&&u.setUTCDate(u.getUTCDate()+1);const f=u.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),h=Yz(u.toISOString(),n);return e.replace(r[0],`resets ${f}${h?` (in ${h})`:""}`)}var Bne=Object.defineProperty,Lu=(e,t)=>Bne(e,"name",{value:t,configurable:!0}),Xz=!!(typeof window<"u"&&window.document&&window.document.createElement);function ys(e,t,{checkForDefaultPrevented:n=!0}={}){return Lu(function(i){if(e==null||e(i),n===!1||!i||!i.defaultPrevented)return t==null?void 0:t(i)},"handleEvent")}Lu(ys,"composeEventHandlers");function Une(e){var t;if(!Xz)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}Lu(Une,"getOwnerWindow");function Pw(e){if(!Xz)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}Lu(Pw,"getOwnerDocument");function Zz(e,t=!1){const{activeElement:n}=Pw(e);if(!(n!=null&&n.nodeName))return null;if(Qz(n)&&n.contentDocument)return Zz(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=Pw(n).getElementById(r);if(i)return i}}return n}Lu(Zz,"getActiveElement");function Qz(e){return e.tagName==="IFRAME"}Lu(Qz,"isFrame");var Fne=Object.defineProperty,ZE=(e,t)=>Fne(e,"name",{value:t,configurable:!0});function Dw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ZE(Dw,"setRef");function Jz(...e){return t=>{let n=!1;const r=e.map(i=>{const a=Dw(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():Dw(e[i],null)}}}}ZE(Jz,"composeRefs");function zu(...e){return y.useCallback(Jz(...e),e)}ZE(zu,"useComposedRefs");var Hne=Object.defineProperty,bi=(e,t)=>Hne(e,"name",{value:t,configurable:!0});function Kne(e,t){const n=y.createContext(t);n.displayName=e+"Context";const r=bi(a=>{const{children:s,...c}=a,u=y.useMemo(()=>c,Object.values(c));return E.jsx(n.Provider,{value:u,children:s})},"Provider");r.displayName=e+"Provider";function i(a,s={}){const{optional:c=!1}=s,u=y.useContext(n);if(u)return u;if(t!==void 0)return t;if(!c)throw new Error(`\`${a}\` must be used within \`${e}\``)}return bi(i,"useContext"),[r,i]}bi(Kne,"createContext");function e3(e,t=[]){let n=[];function r(a,s){const c=y.createContext(s);c.displayName=a+"Context";const u=n.length;n=[...n,s];const f=bi(p=>{var _;const{scope:m,children:v,...x}=p,b=((_=m==null?void 0:m[e])==null?void 0:_[u])||c,S=y.useMemo(()=>x,Object.values(x));return E.jsx(b.Provider,{value:S,children:v})},"Provider");f.displayName=a+"Provider";function h(p,m,v={}){var _;const{optional:x=!1}=v,b=((_=m==null?void 0:m[e])==null?void 0:_[u])||c,S=y.useContext(b);if(S)return S;if(s!==void 0)return s;if(!x)throw new Error(`\`${p}\` must be used within \`${a}\``)}return bi(h,"useContext"),[f,h]}bi(r,"createContext");const i=bi(()=>{const a=n.map(s=>y.createContext(s));return bi(function(c){const u=(c==null?void 0:c[e])||a;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])},"useScope")},"createScope");return i.scopeName=e,[r,t3(i,...t)]}bi(e3,"createContextScope");function t3(...e){const t=e[0];if(e.length===1)return t;const n=bi(()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return bi(function(a){const s=r.reduce((c,{useScope:u,scopeName:f})=>{const p=u(a)[`__scope${f}`];return{...c,...p}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}bi(t3,"composeContextScopes");var qne=Object.defineProperty,Bi=(e,t)=>qne(e,"name",{value:t,configurable:!0});function QE(e){const t=y.forwardRef((n,r)=>{let{children:i,...a}=n,s=null,c=!1;const u=[];jw(i)&&typeof dm=="function"&&(i=dm(i._payload)),y.Children.forEach(i,m=>{var v;if(a3(m)){c=!0;const x=m;let b="child"in x.props?x.props.child:x.props.children;jw(b)&&typeof dm=="function"&&(b=dm(b._payload)),s=Vne(x,b),u.push((v=s==null?void 0:s.props)==null?void 0:v.children)}else u.push(m)}),s?s=y.cloneElement(s,void 0,u):!c&&y.Children.count(i)===1&&y.isValidElement(i)&&(s=i);const f=s?i3(s):void 0,h=zu(r,f);if(!s){if(i||i===0)throw new Error(c?Xne(e):Yne(e));return i}const p=r3(a,s.props??{});return s.type!==y.Fragment&&(p.ref=r?h:f),y.cloneElement(s,p)});return t.displayName=`${e}.Slot`,t}Bi(QE,"createSlot");var n3=Symbol.for("radix.slottable");function Gne(e){const t=Bi(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=n3,t}Bi(Gne,"createSlottable");var Vne=Bi((e,t)=>{if("child"in e.props){const n=e.props.child;return y.isValidElement(n)?y.cloneElement(n,void 0,e.props.children(n.props.children)):null}return y.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function r3(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...c)=>{const u=a(...c);return i(...c),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}Bi(r3,"mergeProps");function i3(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Bi(i3,"getElementRef");function a3(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===n3}Bi(a3,"isSlottable");var Wne=Symbol.for("react.lazy");function jw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Wne&&"_payload"in e&&o3(e._payload)}Bi(jw,"isLazyComponent");function o3(e){return typeof e=="object"&&e!==null&&"then"in e}Bi(o3,"isPromiseLike");var Yne=Bi(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Xne=Bi(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),dm=wa[" use ".trim().toString()],Zne=Object.defineProperty,Qne=(e,t)=>Zne(e,"name",{value:t,configurable:!0}),Jne=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],kv=Jne.reduce((e,t)=>{const n=QE(`Primitive.${t}`),r=y.forwardRef((i,a)=>{const{asChild:s,...c}=i,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(u,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function s3(e,t){e&&Ea.flushSync(()=>e.dispatchEvent(t))}Qne(s3,"dispatchDiscreteCustomEvent");var ere=Object.defineProperty,tre=(e,t)=>ere(e,"name",{value:t,configurable:!0});function Ov(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}tre(Ov,"useCallbackRef");var nre=Object.defineProperty,Fn=(e,t)=>nre(e,"name",{value:t,configurable:!0}),Lw="dismissableLayer.update",rre="dismissableLayer.pointerDownOutside",ire="dismissableLayer.focusOutside",dM,l3=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),are=y.forwardRef(Fn(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,onDismiss:f,...h}=t,p=y.useContext(l3),[m,v]=y.useState(null),x=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=y.useState({}),S=zu(n,v),_=Array.from(p.layers),[O]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),k=O?_.indexOf(O):-1,T=m?_.indexOf(m):-1,C=p.layersWithOutsidePointerEventsDisabled.size>0,N=T>=k,P=y.useRef(!1),D=c3(I=>{s==null||s(I),u==null||u(I),I.defaultPrevented||f==null||f()},{ownerDocument:x,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:P,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:y.useCallback(I=>{if(!(I instanceof Node))return!1;const G=[...p.branches].some(V=>V.contains(I));return N&&!G},[p.branches,N])}),j=u3(I=>{if(i&&P.current)return;const G=I.target;[...p.branches].some(q=>q.contains(G))||(c==null||c(I),u==null||u(I),I.defaultPrevented||f==null||f())},x),R=m?T===_.length-1:!1,F=Ov(I=>{I.key==="Escape"&&(a==null||a(I),!I.defaultPrevented&&f&&(I.preventDefault(),f()))});return y.useEffect(()=>{if(R)return x.addEventListener("keydown",F,{capture:!0}),()=>x.removeEventListener("keydown",F,{capture:!0})},[x,R,F]),y.useEffect(()=>{if(m)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(dM=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),zw(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(x.body.style.pointerEvents=dM))}},[m,x,r,p]),y.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),zw())},[m,p]),y.useEffect(()=>{const I=Fn(()=>b({}),"handleUpdate");return document.addEventListener(Lw,I),()=>document.removeEventListener(Lw,I)},[]),E.jsx(kv.div,{...h,ref:S,style:{pointerEvents:C?N?"auto":"none":void 0,...t.style},onFocusCapture:ys(t.onFocusCapture,j.onFocusCapture),onBlurCapture:ys(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:ys(t.onPointerDownCapture,D.onPointerDownCapture)})},"DismissableLayer"));function ore(){const e=y.useContext(l3),[t,n]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Fn(ore,"useDismissableLayerSurface");var sre=Fn(()=>!0,"IS_TRUE");function c3(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:s=sre}=t,c=Ov(e),u=y.useRef(!1),f=y.useRef(!1),h=y.useRef(new Map),p=y.useRef(()=>{});return y.useEffect(()=>{function m(){f.current=!1,i.current=!1,h.current.clear()}Fn(m,"resetOutsideInteraction");function v(){return Array.from(h.current.values()).some(Boolean)}Fn(v,"isOutsideInteractionIntercepted");function x(k){if(!f.current)return;const T=k.target;T instanceof Node&&[...a].some(N=>N.contains(T))||h.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}Fn(x,"handleInteractionCapture");function b(k){f.current&&h.current.set(k.type,!1)}Fn(b,"handleInteractionBubble");const S=Fn(k=>{if(k.target&&!u.current){let T=function(){n.removeEventListener("click",p.current);const N=v();m(),N||JE(rre,c,C,{discrete:!0})};if(Fn(T,"handleAndDispatchPointerDownOutsideEvent"),!s(k.target)){n.removeEventListener("click",p.current),m(),u.current=!1;return}const C={originalEvent:k};f.current=!0,i.current=r&&k.button===0,h.current.clear(),!r||k.button!==0?T():(n.removeEventListener("click",p.current),p.current=T,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),m();u.current=!1},"handlePointerDown"),_=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of _)n.addEventListener(k,x,!0),n.addEventListener(k,b);const O=window.setTimeout(()=>{n.addEventListener("pointerdown",S)},0);return()=>{window.clearTimeout(O),n.removeEventListener("pointerdown",S),n.removeEventListener("click",p.current);for(const k of _)n.removeEventListener(k,x,!0),n.removeEventListener(k,b)}},[n,c,r,i,a,s]),{onPointerDownCapture:Fn(()=>u.current=!0,"onPointerDownCapture")}}Fn(c3,"usePointerDownOutside");function u3(e,t=globalThis==null?void 0:globalThis.document){const n=Ov(e),r=y.useRef(!1);return y.useEffect(()=>{const i=Fn(a=>{a.target&&!r.current&&JE(ire,n,{originalEvent:a},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:Fn(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Fn(()=>r.current=!1,"onBlurCapture")}}Fn(u3,"useFocusOutside");function zw(){const e=new CustomEvent(Lw);document.dispatchEvent(e)}Fn(zw,"dispatchUpdate");function JE(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?s3(i,a):i.dispatchEvent(a)}Fn(JE,"handleAndDispatchCustomEvent");var lre=Object.defineProperty,eS=(e,t)=>lre(e,"name",{value:t,configurable:!0}),hm=0,Xi=null;function cre(e){return tS(),e.children}eS(cre,"FocusGuards");function tS(){y.useEffect(()=>{Xi||(Xi={start:$w(),end:$w()});const{start:e,end:t}=Xi;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),hm++,()=>{hm===1&&(Xi==null||Xi.start.remove(),Xi==null||Xi.end.remove(),Xi=null),hm=Math.max(0,hm-1)}},[])}eS(tS,"useFocusGuards");function $w(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}eS($w,"createFocusGuard");var ure=Object.defineProperty,fre=(e,t)=>ure(e,"name",{value:t,configurable:!0});function Bw(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}fre(Bw,"useCallbackRef");var dre=Object.defineProperty,mr=(e,t)=>dre(e,"name",{value:t,configurable:!0}),px="focusScope.autoFocusOnMount",mx="focusScope.autoFocusOnUnmount",hM={bubbles:!1,cancelable:!0},hre=y.forwardRef(mr(function(t,n){const{loop:r=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...c}=t,[u,f]=y.useState(null),h=Bw(a),p=Bw(s),m=y.useRef(null),v=zu(n,f),x=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(i){let S=function(T){if(x.paused||!u)return;const C=T.target;u.contains(C)?m.current=C:Ya(m.current,{select:!0})},_=function(T){if(x.paused||!u)return;const C=T.relatedTarget;C!==null&&(u.contains(C)||Ya(m.current,{select:!0}))},O=function(T){if(document.activeElement===document.body)for(const N of T)N.removedNodes.length>0&&Ya(u)};mr(S,"handleFocusIn"),mr(_,"handleFocusOut"),mr(O,"handleMutations"),document.addEventListener("focusin",S),document.addEventListener("focusout",_);const k=new MutationObserver(O);return u&&k.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",_),k.disconnect()}}},[i,u,x.paused]),y.useEffect(()=>{if(u){pM.add(x);const S=document.activeElement;if(!u.contains(S)){const O=new CustomEvent(px,hM);u.addEventListener(px,h),u.dispatchEvent(O),O.defaultPrevented||(f3(g3(nS(u)),{select:!0}),document.activeElement===S&&Ya(u))}return()=>{u.removeEventListener(px,h),setTimeout(()=>{const O=new CustomEvent(mx,hM);u.addEventListener(mx,p),u.dispatchEvent(O),O.defaultPrevented||Ya(S??document.body,{select:!0}),u.removeEventListener(mx,p),pM.remove(x)},0)}}},[u,h,p,x]);const b=y.useCallback(S=>{if(!r&&!i||x.paused)return;const _=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,O=document.activeElement;if(_&&O){const k=S.currentTarget,[T,C]=d3(k);T&&C?!S.shiftKey&&O===C?(S.preventDefault(),r&&Ya(T,{select:!0})):S.shiftKey&&O===T&&(S.preventDefault(),r&&Ya(C,{select:!0})):O===k&&S.preventDefault()}},[r,i,x.paused]);return E.jsx(kv.div,{tabIndex:-1,...c,ref:v,onKeyDown:b})},"FocusScope"));function f3(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ya(r,{select:t}),document.activeElement!==n)return}mr(f3,"focusFirst");function d3(e){const t=nS(e),n=Uw(t,e),r=Uw(t.reverse(),e);return[n,r]}mr(d3,"getTabbableEdges");function nS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:mr(r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}mr(nS,"getTabbableCandidates");function Uw(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):h3(r,{upTo:t})))return r}mr(Uw,"findVisible");function h3(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}mr(h3,"isHidden");function p3(e){return e instanceof HTMLInputElement&&"select"in e}mr(p3,"isSelectableInput");function Ya(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&p3(e)&&t&&e.select()}}mr(Ya,"focus");var pM=m3();function m3(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Fw(e,t),e.unshift(t)},remove(t){var n;e=Fw(e,t),(n=e[0])==null||n.resume()}}}mr(m3,"createFocusScopesStack");function Fw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}mr(Fw,"arrayRemove");function g3(e){return e.filter(t=>t.tagName!=="A")}mr(g3,"removeLinks");var pre=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},mre=Object.defineProperty,gre=(e,t)=>mre(e,"name",{value:t,configurable:!0}),vre=wa[" useId ".trim().toString()]||(()=>{}),yre=0;function v3(e){const[t,n]=y.useState(vre());return pre(()=>{e||n(r=>r??String(yre++))},[e]),e||(t?`radix-${t}`:"")}gre(v3,"useId");const bre=["top","right","bottom","left"],_s=Math.min,io=Math.max,mg=Math.round,pm=Math.floor,ao=e=>({x:e,y:e}),xre={left:"right",right:"left",bottom:"top",top:"bottom"};function y3(e,t,n){return io(e,_s(t,n))}function fo(e,t){return typeof e=="function"?e(t):e}function As(e){return e.split("-")[0]}function $u(e){return e.split("-")[1]}function rS(e){return e==="x"?"y":"x"}function iS(e){return e==="y"?"height":"width"}function oa(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function aS(e){return rS(oa(e))}function wre(e,t,n){n===void 0&&(n=!1);const r=$u(e),i=aS(e),a=iS(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=gg(s)),[s,gg(s)]}function Ere(e){const t=gg(e);return[Hw(e),t,Hw(t)]}function Hw(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const mM=["left","right"],gM=["right","left"],Sre=["top","bottom"],_re=["bottom","top"];function Are(e,t,n){switch(e){case"top":case"bottom":return n?t?gM:mM:t?mM:gM;case"left":case"right":return t?Sre:_re;default:return[]}}function kre(e,t,n,r){const i=$u(e);let a=Are(As(e),n==="start",r);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(Hw)))),a}function gg(e){const t=As(e);return xre[t]+e.slice(t.length)}function Ore(e){var t,n,r,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(i=e.left)!=null?i:0}}function b3(e){return typeof e!="number"?Ore(e):{top:e,right:e,bottom:e,left:e}}function vg(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function vM(e,t,n){let{reference:r,floating:i}=e;const a=oa(t),s=aS(t),c=iS(s),u=As(t),f=a==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[c]/2-i[c]/2;let v;switch(u){case"top":v={x:h,y:r.y-i.height};break;case"bottom":v={x:h,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-i.width,y:p};break;default:v={x:r.x,y:r.y}}const x=$u(t);return x&&(v[s]+=m*(x==="end"?1:-1)*(n&&f?-1:1)),v}async function Cre(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:s,elements:c,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=fo(t,e),x=b3(v),S=c[m?p==="floating"?"reference":"floating":p],_=vg(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(S)))==null||n?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:u})),O=p==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),T=await(a.isElement==null?void 0:a.isElement(k))&&await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1},C=vg(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:O,offsetParent:k,strategy:u}):O);return{top:(_.top-C.top+x.top)/T.y,bottom:(C.bottom-_.bottom+x.bottom)/T.y,left:(_.left-C.left+x.left)/T.x,right:(C.right-_.right+x.right)/T.x}}const Tre=50,Nre=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:Cre},u=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=vM(f,r,u),m=r,v=0;const x={};for(let b=0;b<a.length;b++){const S=a[b];if(!S)continue;const{name:_,fn:O}=S,{x:k,y:T,data:C,reset:N}=await O({x:h,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:x,rects:f,platform:c,elements:{reference:e,floating:t}});h=k??h,p=T??p,x[_]={...x[_],...C},N&&v<Tre&&(v++,typeof N=="object"&&(N.placement&&(m=N.placement),N.rects&&(f=N.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:h,y:p}=vM(f,m,u)),b=-1)}return{x:h,y:p,placement:m,strategy:i,middlewareData:x}},Mre=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:s,elements:c,middlewareData:u}=t,{element:f,padding:h=0}=fo(e,t)||{};if(f==null)return{};const p=b3(h),m={x:n,y:r},v=aS(i),x=iS(v),b=await s.getDimensions(f),S=v==="y",_=S?"top":"left",O=S?"bottom":"right",k=S?"clientHeight":"clientWidth",T=a.reference[x]+a.reference[v]-m[v]-a.floating[x],C=m[v]-a.reference[v],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let P=N?N[k]:0;(!P||!await(s.isElement==null?void 0:s.isElement(N)))&&(P=c.floating[k]||a.floating[x]);const D=T/2-C/2,j=P/2-b[x]/2-1,R=_s(p[_],j),F=_s(p[O],j),I=P-b[x]-F,G=P/2-b[x]/2+D,V=y3(R,G,I),q=!u.arrow&&$u(i)!=null&&G!==V&&a.reference[x]/2-(G<R?R:F)-b[x]/2<0,B=q?G<R?G-R:G-I:0;return{[v]:m[v]+B,data:{[v]:V,centerOffset:G-V-B,...q&&{alignmentOffset:B}},reset:q}}}),Ire=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:s,initialPlacement:c,platform:u,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:b=!0,...S}=fo(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const _=As(i),O=oa(c),k=As(c)===c,T=await(u.isRTL==null?void 0:u.isRTL(f.floating)),C=m||(k||!b?[gg(c)]:Ere(c)),N=x!=="none";!m&&N&&C.push(...kre(c,b,x,T));const P=[c,...C],D=await u.detectOverflow(t,S),j=[];let R=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&j.push(D[_]),p){const V=wre(i,s,T);j.push(D[V[0]],D[V[1]])}if(R=[...R,{placement:i,overflows:j}],!j.every(V=>V<=0)){var F,I;const V=(((F=a.flip)==null?void 0:F.index)||0)+1,q=P[V];if(q&&(!(p==="alignment"?O!==oa(q):!1)||R.every(H=>oa(H.placement)===O?H.overflows[0]>0:!0)))return{data:{index:V,overflows:R},reset:{placement:q}};let B=(I=R.filter(Y=>Y.overflows[0]<=0).sort((Y,H)=>Y.overflows[1]-H.overflows[1])[0])==null?void 0:I.placement;if(!B)switch(v){case"bestFit":{var G;const Y=(G=R.filter(H=>{if(N){const K=oa(H.placement);return K===O||K==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(K=>K>0).reduce((K,L)=>K+L,0)]).sort((H,K)=>H[1]-K[1])[0])==null?void 0:G[0];Y&&(B=Y);break}case"initialPlacement":B=c;break}if(i!==B)return{reset:{placement:B}}}return{}}}};function yM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bM(e){return bre.some(t=>e[t]>=0)}const Rre=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=fo(e,t);switch(i){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=yM(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:bM(c)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),c=yM(s,n.floating);return{data:{escapedOffsets:c,escaped:bM(c)}}}default:return{}}}}},x3=new Set(["left","top"]);async function Pre(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=As(n),c=$u(n),u=oa(n)==="y",f=x3.has(s)?-1:1,h=a&&u?-1:1,p=fo(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof x=="number"&&(v=c==="end"?x*-1:x),u?{x:v*h,y:m*f}:{x:m*f,y:v*h}}const Dre=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:s,middlewareData:c}=t,u=await Pre(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:s}}}}},jre=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:u={fn:O=>{let{x:k,y:T}=O;return{x:k,y:T}}},...f}=fo(e,t),h={x:n,y:r},p=await a.detectOverflow(t,f),m=oa(i),v=rS(m);let x=h[v],b=h[m];const S=(O,k)=>y3(k+p[O==="y"?"top":"left"],k,k-p[O==="y"?"bottom":"right"]);s&&(x=S(v,x)),c&&(b=S(m,b));const _=u.fn({...t,[v]:x,[m]:b});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[v]:s,[m]:c}}}}}},Lre=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:i,y:a,placement:s,rects:c,middlewareData:u}=t,{offset:f=0,mainAxis:h=!0,crossAxis:p=!0}=fo(e,t),m={x:i,y:a},v=oa(s),x=rS(v);let b=m[x],S=m[v];const _=fo(f,t),O=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(r=_.crossAxis)!=null?r:0};if(h){const C=x==="y"?"height":"width",N=c.reference[x]-c.floating[C]+O.mainAxis,P=c.reference[x]+c.reference[C]-O.mainAxis;b<N?b=N:b>P&&(b=P)}if(p){var k,T;const C=x==="y"?"width":"height",N=x3.has(As(s)),P=c.reference[v]-c.floating[C]+(N&&((k=u.offset)==null?void 0:k[v])||0)+(N?0:O.crossAxis),D=c.reference[v]+c.reference[C]+(N?0:((T=u.offset)==null?void 0:T[v])||0)-(N?O.crossAxis:0);S<P?S=P:S>D&&(S=D)}return{[x]:b,[v]:S}}}},zre=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:a}=t,{apply:s=()=>{},...c}=fo(e,t),u=await i.detectOverflow(t,c),f=As(n),h=$u(n),p=oa(n)==="y",{width:m,height:v}=r.floating;let x,b;f==="top"||f==="bottom"?(x=f,b=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,x=h==="end"?"top":"bottom");const S=v-u.top-u.bottom,_=m-u.left-u.right,O=_s(v-u[x],S),k=_s(m-u[b],_),T=t.middlewareData.shift,C=!T;let N=O,P=k;T!=null&&T.enabled.x&&(P=_),T!=null&&T.enabled.y&&(N=S),C&&!h&&(p?P=m-2*io(u.left,u.right):N=v-2*io(u.top,u.bottom)),await s({...t,availableWidth:P,availableHeight:N});const D=await i.getDimensions(a.floating);return m!==D.width||v!==D.height?{reset:{rects:!0}}:{}}}};function Cv(){return typeof window<"u"}function Bu(e){return w3(e)?(e.nodeName||"").toLowerCase():"#document"}function Rr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bo(e){var t;return(t=(w3(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function w3(e){return Cv()?e instanceof Node||e instanceof Rr(e).Node:!1}function pa(e){return Cv()?e instanceof Element||e instanceof Rr(e).Element:!1}function Ds(e){return Cv()?e instanceof HTMLElement||e instanceof Rr(e).HTMLElement:!1}function xM(e){return!Cv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rr(e).ShadowRoot}function Tv(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ma(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function $re(e){return/^(table|td|th)$/.test(Bu(e))}function Nv(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Bre=/transform|translate|scale|rotate|perspective|filter/,Ure=/paint|layout|strict|content/,ll=e=>!!e&&e!=="none";let gx;function oS(e){const t=pa(e)?ma(e):e;return ll(t.transform)||ll(t.translate)||ll(t.scale)||ll(t.rotate)||ll(t.perspective)||!sS()&&(ll(t.backdropFilter)||ll(t.filter))||Bre.test(t.willChange||"")||Ure.test(t.contain||"")}function Fre(e){let t=Ll(e);for(;Ds(t)&&!Ld(t);){if(oS(t))return t;if(Nv(t))return null;t=Ll(t)}return null}function sS(){return gx==null&&(gx=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gx}function Ld(e){return/^(html|body|#document)$/.test(Bu(e))}function ma(e){return Rr(e).getComputedStyle(e)}function Mv(e){return pa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ll(e){if(Bu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xM(e)&&e.host||bo(e);return xM(t)?t.host:t}function E3(e){const t=Ll(e);return Ld(t)?(e.ownerDocument||e).body:Ds(t)&&Tv(t)?t:E3(t)}function zd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=E3(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),s=Rr(i);if(a){const c=Kw(s);return t.concat(s,s.visualViewport||[],Tv(i)?i:[],c&&n?zd(c):[])}else return t.concat(i,zd(i,[],n))}function Kw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function S3(e){const t=ma(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ds(e),a=i?e.offsetWidth:n,s=i?e.offsetHeight:r,c=mg(n)!==a||mg(r)!==s;return c&&(n=a,r=s),{width:n,height:r,$:c}}function lS(e){return pa(e)?e:e.contextElement}function du(e){const t=lS(e);if(!Ds(t))return ao(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=S3(t);let s=(a?mg(n.width):n.width)/r,c=(a?mg(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const Hre=ao(0);function _3(e){const t=Rr(e);return!sS()||!t.visualViewport?Hre:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kre(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Rr(e)}function zl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=lS(e);let s=ao(1);t&&(r?pa(r)&&(s=du(r)):s=du(e));const c=Kre(a,n,r)?_3(a):ao(0);let u=(i.left+c.x)/s.x,f=(i.top+c.y)/s.y,h=i.width/s.x,p=i.height/s.y;if(a&&r){const m=Rr(a),v=pa(r)?Rr(r):r;let x=m,b=Kw(x);for(;b&&v!==x;){const S=du(b),_=b.getBoundingClientRect(),O=ma(b),k=_.left+(b.clientLeft+parseFloat(O.paddingLeft))*S.x,T=_.top+(b.clientTop+parseFloat(O.paddingTop))*S.y;u*=S.x,f*=S.y,h*=S.x,p*=S.y,u+=k,f+=T,x=Rr(b),b=Kw(x)}}return vg({width:h,height:p,x:u,y:f})}function Iv(e,t){const n=Mv(e).scrollLeft;return t?t.left+n:zl(bo(e)).left+n}function A3(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Iv(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function qre(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",s=bo(r),c=t?Nv(t.floating):!1;if(r===s||c&&a)return n;let u={scrollLeft:0,scrollTop:0},f=ao(1);const h=ao(0),p=Ds(r);if((p||!a)&&((Bu(r)!=="body"||Tv(s))&&(u=Mv(r)),p)){const v=zl(r);f=du(r),h.x=v.x+r.clientLeft,h.y=v.y+r.clientTop}const m=s&&!p&&!a?A3(s,u):ao(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+h.x+m.x,y:n.y*f.y-u.scrollTop*f.y+h.y+m.y}}function Gre(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Vre(e){const t=Mv(e),n=e.ownerDocument.body,r=io(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=io(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Iv(e);const s=-t.scrollTop;return ma(n).direction==="rtl"&&(a+=io(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:s}}const Wre=25;function Yre(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",i=Rr(e),a=bo(e),s=i.visualViewport;let c=a.clientWidth,u=a.clientHeight,f=0,h=0;if(s){const m=!sS()||t==="fixed";r?m||(f=-s.offsetLeft,h=-s.offsetTop):(c=s.width,u=s.height,m&&(f=s.offsetLeft,h=s.offsetTop))}if(Iv(a)<=0){const m=a.ownerDocument,v=m.body,x=getComputedStyle(v),b=m.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,S=Math.abs(a.clientWidth-v.clientWidth-b),_=getComputedStyle(a).scrollbarGutter==="stable both-edges"?S/2:S;_<=Wre&&(c-=_)}return{width:c,height:u,x:f,y:h}}function Xre(e,t){const n=zl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=du(e),s=e.clientWidth*a.x,c=e.clientHeight*a.y,u=i*a.x,f=r*a.y;return{width:s,height:c,x:u,y:f}}function wM(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=Yre(e,n,t);else if(t==="document")r=Vre(bo(e));else if(pa(t))r=Xre(t,n);else{const i=_3(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return vg(r)}function Zre(e,t){const n=t.get(e);if(n)return n;let r=zd(e,[],!1).filter(c=>pa(c)&&Bu(c)!=="body"),i=null;const a=ma(e).position==="fixed";let s=a?Ll(e):e;for(;pa(s)&&!Ld(s);){const c=ma(s),u=oS(s),f=i?i.position:a?"fixed":"";!u&&(f==="fixed"||f==="absolute"&&c.position==="static")?r=r.filter(p=>p!==s):i=c,s=Ll(s)}return t.set(e,r),r}function Qre(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Nv(t)?[]:Zre(t,this._c):[].concat(n),r],c=wM(t,s[0],i);let u=c.top,f=c.right,h=c.bottom,p=c.left;for(let m=1;m<s.length;m++){const v=wM(t,s[m],i);u=io(v.top,u),f=_s(v.right,f),h=_s(v.bottom,h),p=io(v.left,p)}return{width:f-p,height:h-u,x:p,y:u}}function Jre(e){const{width:t,height:n}=S3(e);return{width:t,height:n}}function eie(e,t,n){const r=Ds(t),i=bo(t),a=n==="fixed",s=zl(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const u=ao(0);if((r||!a)&&((Bu(t)!=="body"||Tv(i))&&(c=Mv(t)),r)){const m=zl(t,!0,a,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}!r&&i&&(u.x=Iv(i));const f=i&&!r&&!a?A3(i,c):ao(0),h=s.left+c.scrollLeft-u.x-f.x,p=s.top+c.scrollTop-u.y-f.y;return{x:h,y:p,width:s.width,height:s.height}}function vx(e){return ma(e).position==="static"}function EM(e,t){if(!Ds(e)||ma(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return bo(e)===n&&(n=n.ownerDocument.body),n}function k3(e,t){const n=Rr(e);if(Nv(e))return n;if(!Ds(e)){let i=Ll(e);for(;i&&!Ld(i);){if(pa(i)&&!vx(i))return i;i=Ll(i)}return n}let r=EM(e,t);for(;r&&$re(r)&&vx(r);)r=EM(r,t);return r&&Ld(r)&&vx(r)&&!oS(r)?n:r||Fre(e)||n}const tie=async function(e){const t=this.getOffsetParent||k3,n=this.getDimensions,r=await n(e.floating);return{reference:eie(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nie(e){return ma(e).direction==="rtl"}const rie={convertOffsetParentRelativeRectToViewportRelativeRect:qre,getDocumentElement:bo,getClippingRect:Qre,getOffsetParent:k3,getElementRects:tie,getClientRects:Gre,getDimensions:Jre,getScale:du,isElement:pa,isRTL:nie};function O3(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iie(e,t,n){let r=null,i;const a=bo(e);function s(){var h;clearTimeout(i),(h=r)==null||h.disconnect(),r=null}function c(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),s();const m=e.getBoundingClientRect(),{left:v,top:x,width:b,height:S}=m;if(h||t(),!b||!S)return;const _=pm(x),O=pm(a.clientWidth-(v+b)),k=pm(a.clientHeight-(x+S)),T=pm(v),N={rootMargin:-_+"px "+-O+"px "+-k+"px "+-T+"px",threshold:io(0,_s(1,p))||1};let P=!0;function D(j){const R=j[0].intersectionRatio;if(!O3(m,e.getBoundingClientRect()))return c();if(R!==p){if(!P)return c();R?c(!1,R):i=setTimeout(()=>{c(!1,1e-7)},1e3)}P=!1}try{r=new IntersectionObserver(D,{...N,root:a.ownerDocument})}catch{r=new IntersectionObserver(D,N)}r.observe(e)}const u=Rr(e),f=()=>c(n);return u.addEventListener("resize",f),c(!0),()=>{u.removeEventListener("resize",f),s()}}function aie(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=lS(e),h=i||a?[...f?zd(f):[],...t?zd(t):[]]:[];h.forEach(_=>{i&&_.addEventListener("scroll",n),a&&_.addEventListener("resize",n)});const p=f&&c?iie(f,n,a):null;let m=-1,v=null;s&&(v=new ResizeObserver(_=>{let[O]=_;O&&O.target===f&&v&&t&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=v)==null||k.observe(t)})),n()}),f&&!u&&v.observe(f),t&&v.observe(t));let x,b=u?zl(e):null;u&&S();function S(){const _=zl(e);b&&!O3(b,_)&&n(),b=_,x=requestAnimationFrame(S)}return n(),()=>{var _;h.forEach(O=>{i&&O.removeEventListener("scroll",n),a&&O.removeEventListener("resize",n)}),p==null||p(),(_=v)==null||_.disconnect(),v=null,u&&cancelAnimationFrame(x)}}const oie=Dre,sie=jre,lie=Ire,cie=zre,uie=Rre,SM=Mre,fie=Lre,die=(e,t,n)=>{const r=new Map,i=n??{},a={...rie,...i.platform,_c:r};return Nre(e,t,{...i,platform:a})};var hie=typeof document<"u",pie=function(){},Um=hie?y.useLayoutEffect:pie;function yg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!yg(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!yg(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function C3(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _M(e,t){const n=C3(e);return Math.round(t*n)/n}function yx(e){const t=y.useRef(e);return Um(()=>{t.current=e}),t}function mie(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:s}={},transform:c=!0,whileElementsMounted:u,open:f}=e,[h,p]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=y.useState(r);yg(m,r)||v(r);const[x,b]=y.useState(null),[S,_]=y.useState(null),O=y.useCallback(H=>{H!==N.current&&(N.current=H,b(H))},[]),k=y.useCallback(H=>{H!==P.current&&(P.current=H,_(H))},[]),T=a||x,C=s||S,N=y.useRef(null),P=y.useRef(null),D=y.useRef(h),j=u!=null,R=yx(u),F=yx(i),I=yx(f),G=y.useCallback(()=>{if(!N.current||!P.current)return;const H={placement:t,strategy:n,middleware:m};F.current&&(H.platform=F.current),die(N.current,P.current,H).then(K=>{const L={...K,isPositioned:I.current!==!1};V.current&&!yg(D.current,L)&&(D.current=L,Ea.flushSync(()=>{p(L)}))})},[m,t,n,F,I]);Um(()=>{f===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(H=>({...H,isPositioned:!1})))},[f]);const V=y.useRef(!1);Um(()=>(V.current=!0,()=>{V.current=!1}),[]),Um(()=>{if(T&&(N.current=T),C&&(P.current=C),T&&C){if(R.current)return R.current(T,C,G);G()}},[T,C,G,R,j]);const q=y.useMemo(()=>({reference:N,floating:P,setReference:O,setFloating:k}),[O,k]),B=y.useMemo(()=>({reference:T,floating:C}),[T,C]),Y=y.useMemo(()=>{const H={position:n,left:0,top:0};if(!B.floating)return H;const K=_M(B.floating,h.x),L=_M(B.floating,h.y);return c?{...H,transform:"translate("+K+"px, "+L+"px)",...C3(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:L}},[n,c,B.floating,h.x,h.y]);return y.useMemo(()=>({...h,update:G,refs:q,elements:B,floatingStyles:Y}),[h,G,q,B,Y])}const gie=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?SM({element:r.current,padding:i}).fn(n):{}:r?SM({element:r,padding:i}).fn(n):{}}}},vie=(e,t)=>{const n=oie(e);return{name:n.name,fn:n.fn,options:[e,t]}},yie=(e,t)=>{const n=sie(e);return{name:n.name,fn:n.fn,options:[e,t]}},bie=(e,t)=>({fn:fie(e).fn,options:[e,t]}),xie=(e,t)=>{const n=lie(e);return{name:n.name,fn:n.fn,options:[e,t]}},wie=(e,t)=>{const n=cie(e);return{name:n.name,fn:n.fn,options:[e,t]}},Eie=(e,t)=>{const n=uie(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sie=(e,t)=>{const n=gie(e);return{name:n.name,fn:n.fn,options:[e,t]}};var _ie=Object.defineProperty,cS=(e,t)=>_ie(e,"name",{value:t,configurable:!0});function qw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}cS(qw,"setRef");function T3(...e){return t=>{let n=!1;const r=e.map(i=>{const a=qw(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():qw(e[i],null)}}}}cS(T3,"composeRefs");function Rv(...e){return y.useCallback(T3(...e),e)}cS(Rv,"useComposedRefs");var Aie=Object.defineProperty,xi=(e,t)=>Aie(e,"name",{value:t,configurable:!0});function kie(e,t){const n=y.createContext(t);n.displayName=e+"Context";const r=xi(a=>{const{children:s,...c}=a,u=y.useMemo(()=>c,Object.values(c));return E.jsx(n.Provider,{value:u,children:s})},"Provider");r.displayName=e+"Provider";function i(a,s={}){const{optional:c=!1}=s,u=y.useContext(n);if(u)return u;if(t!==void 0)return t;if(!c)throw new Error(`\`${a}\` must be used within \`${e}\``)}return xi(i,"useContext"),[r,i]}xi(kie,"createContext");function N3(e,t=[]){let n=[];function r(a,s){const c=y.createContext(s);c.displayName=a+"Context";const u=n.length;n=[...n,s];const f=xi(p=>{var _;const{scope:m,children:v,...x}=p,b=((_=m==null?void 0:m[e])==null?void 0:_[u])||c,S=y.useMemo(()=>x,Object.values(x));return E.jsx(b.Provider,{value:S,children:v})},"Provider");f.displayName=a+"Provider";function h(p,m,v={}){var _;const{optional:x=!1}=v,b=((_=m==null?void 0:m[e])==null?void 0:_[u])||c,S=y.useContext(b);if(S)return S;if(s!==void 0)return s;if(!x)throw new Error(`\`${p}\` must be used within \`${a}\``)}return xi(h,"useContext"),[f,h]}xi(r,"createContext");const i=xi(()=>{const a=n.map(s=>y.createContext(s));return xi(function(c){const u=(c==null?void 0:c[e])||a;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])},"useScope")},"createScope");return i.scopeName=e,[r,M3(i,...t)]}xi(N3,"createContextScope");function M3(...e){const t=e[0];if(e.length===1)return t;const n=xi(()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return xi(function(a){const s=r.reduce((c,{useScope:u,scopeName:f})=>{const p=u(a)[`__scope${f}`];return{...c,...p}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}xi(M3,"composeContextScopes");var Oie=Object.defineProperty,Ui=(e,t)=>Oie(e,"name",{value:t,configurable:!0});function I3(e){const t=y.forwardRef((n,r)=>{let{children:i,...a}=n,s=null,c=!1;const u=[];Gw(i)&&typeof mm=="function"&&(i=mm(i._payload)),y.Children.forEach(i,m=>{var v;if(j3(m)){c=!0;const x=m;let b="child"in x.props?x.props.child:x.props.children;Gw(b)&&typeof mm=="function"&&(b=mm(b._payload)),s=Tie(x,b),u.push((v=s==null?void 0:s.props)==null?void 0:v.children)}else u.push(m)}),s?s=y.cloneElement(s,void 0,u):!c&&y.Children.count(i)===1&&y.isValidElement(i)&&(s=i);const f=s?D3(s):void 0,h=Rv(r,f);if(!s){if(i||i===0)throw new Error(c?Iie(e):Mie(e));return i}const p=P3(a,s.props??{});return s.type!==y.Fragment&&(p.ref=r?h:f),y.cloneElement(s,p)});return t.displayName=`${e}.Slot`,t}Ui(I3,"createSlot");var R3=Symbol.for("radix.slottable");function Cie(e){const t=Ui(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=R3,t}Ui(Cie,"createSlottable");var Tie=Ui((e,t)=>{if("child"in e.props){const n=e.props.child;return y.isValidElement(n)?y.cloneElement(n,void 0,e.props.children(n.props.children)):null}return y.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function P3(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...c)=>{const u=a(...c);return i(...c),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}Ui(P3,"mergeProps");function D3(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ui(D3,"getElementRef");function j3(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===R3}Ui(j3,"isSlottable");var Nie=Symbol.for("react.lazy");function Gw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Nie&&"_payload"in e&&L3(e._payload)}Ui(Gw,"isLazyComponent");function L3(e){return typeof e=="object"&&e!==null&&"then"in e}Ui(L3,"isPromiseLike");var Mie=Ui(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Iie=Ui(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),mm=wa[" use ".trim().toString()],Rie=Object.defineProperty,Pie=(e,t)=>Rie(e,"name",{value:t,configurable:!0}),Die=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],z3=Die.reduce((e,t)=>{const n=I3(`Primitive.${t}`),r=y.forwardRef((i,a)=>{const{asChild:s,...c}=i,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(u,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function jie(e,t){e&&Ea.flushSync(()=>e.dispatchEvent(t))}Pie(jie,"dispatchDiscreteCustomEvent");var Lie=Object.defineProperty,zie=(e,t)=>Lie(e,"name",{value:t,configurable:!0});function $3(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}zie($3,"useCallbackRef");var bx=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},$ie=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},Bie=Object.defineProperty,Uie=(e,t)=>Bie(e,"name",{value:t,configurable:!0});function B3(e){const[t,n]=y.useState(void 0);return $ie(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,c;if("borderBoxSize"in a){const u=a.borderBoxSize,f=Array.isArray(u)?u[0]:u;s=f.inlineSize,c=f.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}Uie(B3,"useSize");var Fie=Object.defineProperty,bs=(e,t)=>Fie(e,"name",{value:t,configurable:!0}),U3="Popper",[F3,H3]=N3(U3),[Hie,K3]=F3(U3),Kie=bs(e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null),[a,s]=y.useState(void 0);return E.jsx(Hie,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:s,children:n})},"Popper"),qie="PopperAnchor",Gie=y.forwardRef(bs(function(t,n){const{__scopePopper:r,virtualRef:i,...a}=t,s=K3(qie,r),c=y.useRef(null),u=s.onAnchorChange,f=y.useCallback(b=>{c.current=b,b&&u(b)},[u]),h=Rv(n,f),p=y.useRef(null);y.useEffect(()=>{if(!i)return;const b=p.current;p.current=i.current,b!==p.current&&u(p.current)});const m=s.placementState&&Pv(s.placementState),v=m==null?void 0:m[0],x=m==null?void 0:m[1];return i?null:E.jsx(z3.div,{"data-radix-popper-side":v,"data-radix-popper-align":x,...a,ref:h})},"PopperAnchor")),q3="PopperContent",[Vie,jOe]=F3(q3),Wie=y.forwardRef(bs(function(t,n){var he,Oe,we,fe,ht,qe,Ae;const{__scopePopper:r,side:i="bottom",sideOffset:a=0,align:s="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:b,...S}=t,_=K3(q3,r),[O,k]=y.useState(null),T=Rv(n,k),[C,N]=y.useState(null),P=B3(C),D=(P==null?void 0:P.width)??0,j=(P==null?void 0:P.height)??0,R=i+(s!=="center"?"-"+s:""),F=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},I=Array.isArray(h)?h:[h],G=I.length>0,V={padding:F,boundary:I.filter(G3),altBoundary:G},{refs:q,floatingStyles:B,placement:Y,isPositioned:H,middlewareData:K}=mie({strategy:"fixed",placement:R,whileElementsMounted:bs((...De)=>aie(...De,{animationFrame:x==="always"}),"whileElementsMounted"),elements:{reference:_.anchor},middleware:[vie({mainAxis:a+j,alignmentAxis:c}),f&&yie({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?bie():void 0,...V}),f&&xie({...V}),wie({...V,apply:bs(({elements:De,rects:Kt,availableWidth:kn,availableHeight:zn})=>{const{width:ur,height:Oi}=Kt.reference,ni=De.floating.style;ni.setProperty("--radix-popper-available-width",`${kn}px`),ni.setProperty("--radix-popper-available-height",`${zn}px`),ni.setProperty("--radix-popper-anchor-width",`${ur}px`),ni.setProperty("--radix-popper-anchor-height",`${Oi}px`)},"apply")}),C&&Sie({element:C,padding:u}),Yie({arrowWidth:D,arrowHeight:j}),v&&Eie({strategy:"referenceHidden",...V,boundary:G?V.boundary:void 0})]}),L=_.setPlacementState;bx(()=>(L(Y),()=>{L(void 0)}),[Y,L]);const[U,Q]=Pv(Y),z=$3(b);bx(()=>{H&&(z==null||z())},[H,z]);const ce=(he=K.arrow)==null?void 0:he.x,pe=(Oe=K.arrow)==null?void 0:Oe.y,de=((we=K.arrow)==null?void 0:we.centerOffset)!==0,[Ee,Ge]=y.useState();return bx(()=>{O&&Ge(window.getComputedStyle(O).zIndex)},[O]),E.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:H?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ee,"--radix-popper-transform-origin":[(fe=K.transformOrigin)==null?void 0:fe.x,(ht=K.transformOrigin)==null?void 0:ht.y].join(" "),...((qe=K.hide)==null?void 0:qe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:E.jsx(Vie,{scope:r,placedSide:U,placedAlign:Q,onArrowChange:N,arrowX:ce,arrowY:pe,shouldHideArrow:de,children:E.jsx(z3.div,{"data-side":U,"data-align":Q,...S,ref:T,style:{...S.style,animation:H?(Ae=S.style)==null?void 0:Ae.animation:"none"}})})})},"PopperContent"));function G3(e){return e!==null}bs(G3,"isNotNull");var Yie=bs(e=>({name:"transformOrigin",options:e,fn(t){var S,_,O;const{placement:n,rects:r,middlewareData:i}=t,s=((S=i.arrow)==null?void 0:S.centerOffset)!==0,c=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[f,h]=Pv(n),p={start:"0%",center:"50%",end:"100%"}[h],m=(((_=i.arrow)==null?void 0:_.x)??0)+c/2,v=(((O=i.arrow)==null?void 0:O.y)??0)+u/2;let x="",b="";return f==="bottom"?(x=s?p:`${m}px`,b=`${-u}px`):f==="top"?(x=s?p:`${m}px`,b=`${r.floating.height+u}px`):f==="right"?(x=`${-u}px`,b=s?p:`${v}px`):f==="left"&&(x=`${r.floating.width+u}px`,b=s?p:`${v}px`),{data:{x,y:b}}}}),"transformOrigin");function Pv(e){const[t,n="center"]=e.split("-");return[t,n]}bs(Pv,"getSideAndAlignFromPlacement");var Xie=Kie,Zie=Gie,Qie=Wie,Jie=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},eae=Object.defineProperty,tae=(e,t)=>eae(e,"name",{value:t,configurable:!0}),nae=y.forwardRef(tae(function(t,n){var u;const{container:r,...i}=t,[a,s]=y.useState(!1);Jie(()=>s(!0),[]);const c=r||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return c?Ea.createPortal(E.jsx(kv.div,{...i,ref:n}),c):null},"Portal")),AM=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},rae=Object.defineProperty,ho=(e,t)=>rae(e,"name",{value:t,configurable:!0});function V3(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}ho(V3,"useStateMachine");var W3=ho(e=>{const{present:t,children:n}=e,r=Y3(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),a=X3(r.ref,Z3(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:a}):null},"Presence");function Y3(e){const[t,n]=y.useState(),r=y.useRef(null),i=y.useRef(e),a=y.useRef("none"),s=y.useRef(void 0),c=e?"mounted":"unmounted",[u,f]=V3(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{u==="mounted"?(a.current=s.current??tu(r.current),s.current=void 0):a.current="none"},[u]),AM(()=>{const h=r.current,p=i.current;if(p!==e){const v=a.current,x=tu(h);e?(s.current=x,f("MOUNT")):x==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(p&&v!==x?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),AM(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,m=ho(x=>{const S=tu(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&S&&(f("ANIMATION_END"),!i.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},"handleAnimationEnd"),v=ho(x=>{x.target===t&&(a.current=tu(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(h=>{if(h){const p=getComputedStyle(h);r.current=p,s.current=tu(p)}else r.current=null;n(h)},[])}}ho(Y3,"usePresence");function Vw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ho(Vw,"setRef");function X3(...e){const t=y.useRef(e);return t.current=e,y.useCallback(n=>{const r=t.current;let i=!1;const a=r.map(s=>{const c=Vw(s,n);return!i&&typeof c=="function"&&(i=!0),c});if(i)return()=>{for(let s=0;s<a.length;s++){const c=a[s];typeof c=="function"?c():Vw(r[s],null)}}},[])}ho(X3,"useStableComposedRefs");function tu(e){return(e==null?void 0:e.animationName)||"none"}ho(tu,"getAnimationName");function Z3(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ho(Z3,"getElementRef");var Q3=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},iae=Object.defineProperty,aae=(e,t)=>iae(e,"name",{value:t,configurable:!0}),kM=wa[" useEffectEvent ".trim().toString()],OM=wa[" useInsertionEffect ".trim().toString()];function J3(e){if(typeof kM=="function")return kM(e);const t=y.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof OM=="function"?OM(()=>{t.current=e}):Q3(()=>{t.current=e}),y.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}aae(J3,"useEffectEvent");var oae=Object.defineProperty,uh=(e,t)=>oae(e,"name",{value:t,configurable:!0}),sae=wa[" useInsertionEffect ".trim().toString()]||Q3;function e$({prop:e,defaultProp:t,onChange:n=uh(()=>{},"onChange"),caller:r}){const[i,a,s]=t$({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:i,f=y.useCallback(h=>{var p;if(c){const m=n$(h)?h(e):h;m!==e&&((p=s.current)==null||p.call(s,m))}else a(h)},[c,e,a,s]);return[u,f]}uh(e$,"useControllableState");function t$({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),i=y.useRef(n),a=y.useRef(t);return sae(()=>{a.current=t},[t]),y.useEffect(()=>{var s;i.current!==n&&((s=a.current)==null||s.call(a,n),i.current=n)},[n,i]),[n,r,a]}uh(t$,"useUncontrolledState");function n$(e){return typeof e=="function"}uh(n$,"isFunction");var CM=Symbol("RADIX:SYNC_STATE");function lae(e,t,n,r){const{prop:i,defaultProp:a,onChange:s,caller:c}=t,u=i!==void 0,f=J3(s),h=[{...n,state:a}];r&&h.push(r);const[p,m]=y.useReducer((S,_)=>{if(_.type===CM)return{...S,state:_.state};const O=e(S,_);return u&&!Object.is(O.state,S.state)&&f(O.state),O},...h),v=p.state,x=y.useRef(v);y.useEffect(()=>{x.current!==v&&(x.current=v,u||f(v))},[v,x,u]);const b=y.useMemo(()=>i!==void 0?{...p,state:i}:p,[p,i]);return y.useEffect(()=>{u&&!Object.is(i,p.state)&&m({type:CM,state:i})},[i,p.state,u]),[b,m]}uh(lae,"useControllableStateReducer");var cae=Object.defineProperty,js=(e,t)=>cae(e,"name",{value:t,configurable:!0}),uS="Popover",[r$,LOe]=e3(uS,[H3]),fS=H3(),[uae,Uu]=r$(uS),fae=js(e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,c=fS(t),u=y.useRef(null),[f,h]=y.useState(!1),[p,m]=e$({prop:r,defaultProp:i??!1,onChange:a,caller:uS});return E.jsx(Xie,{...c,children:E.jsx(uae,{scope:t,contentId:v3(),triggerRef:u,open:p,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(v=>!v),[m]),hasCustomAnchor:f,onCustomAnchorAdd:y.useCallback(()=>h(!0),[]),onCustomAnchorRemove:y.useCallback(()=>h(!1),[]),modal:s,children:n})})},"Popover"),dae="PopoverTrigger",hae=y.forwardRef(js(function(t,n){const{__scopePopover:r,...i}=t,a=Uu(dae,r),s=fS(r),c=zu(n,a.triggerRef),u=E.jsx(kv.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":dS(a.open),...i,ref:c,onClick:ys(t.onClick,a.onOpenToggle)});return a.hasCustomAnchor?u:E.jsx(Zie,{asChild:!0,...s,children:u})},"PopoverTrigger")),i$="PopoverPortal",[pae,mae]=r$(i$,{forceMount:void 0}),gae=js(e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Uu(i$,t);return E.jsx(pae,{scope:t,forceMount:n,children:E.jsx(W3,{present:n||a.open,children:E.jsx(nae,{asChild:!0,container:i,children:r})})})},"PopoverPortal"),$d="PopoverContent",vae=y.forwardRef(js(function(t,n){const r=mae($d,t.__scopePopover),{forceMount:i=r.forceMount,...a}=t,s=Uu($d,t.__scopePopover);return E.jsx(W3,{present:i||s.open,children:s.modal?E.jsx(bae,{...a,ref:n}):E.jsx(xae,{...a,ref:n})})},"PopoverContent")),yae=QE("PopoverContent.RemoveScroll"),bae=y.forwardRef(js(function(t,n){const r=Uu($d,t.__scopePopover),i=y.useRef(null),a=zu(n,i),s=y.useRef(!1);return y.useEffect(()=>{const c=i.current;if(c)return Pz(c)},[]),E.jsx(qE,{as:yae,allowPinchZoom:!0,children:E.jsx(a$,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ys(t.onCloseAutoFocus,c=>{var u;c.preventDefault(),s.current||(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:ys(t.onPointerDownOutside,c=>{const u=c.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,h=u.button===2||f;s.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:ys(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),xae=y.forwardRef(js(function(t,n){const r=Uu($d,t.__scopePopover),i=y.useRef(!1),a=y.useRef(!1);return E.jsx(a$,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,u;(c=t.onCloseAutoFocus)==null||c.call(t,s),s.defaultPrevented||(i.current||(u=r.triggerRef.current)==null||u.focus(),s.preventDefault()),i.current=!1,a.current=!1},onInteractOutside:s=>{var f,h;(f=t.onInteractOutside)==null||f.call(t,s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=s.target;((h=r.triggerRef.current)==null?void 0:h.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})},"PopoverContentNonModal")),a$=y.forwardRef(js(function(t,n){const{__scopePopover:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,...m}=t,v=Uu($d,r),x=fS(r);return tS(),E.jsx(hre,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:s,children:E.jsx(are,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:p,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onDismiss:()=>v.onOpenChange(!1),deferPointerDownOutside:!0,children:E.jsx(Qie,{"data-state":dS(v.open),role:"dialog",id:v.contentId,...x,...m,ref:n,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function dS(e){return e?"open":"closed"}js(dS,"getState");var wae=fae,Eae=hae,Sae=gae,o$=vae;const _ae=wae,Aae=Eae,s$=y.forwardRef(({className:e,align:t="start",side:n="top",sideOffset:r=8,collisionPadding:i=8,...a},s)=>E.jsx(Sae,{children:E.jsx(o$,{ref:s,align:t,side:n,sideOffset:r,collisionPadding:i,className:He("z-50 w-64 max-w-[calc(100vw-1rem)] rounded-md border bg-card p-3 text-card-foreground shadow-md outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...a})}));s$.displayName=o$.displayName;const l$=92,c$=96;function xx(e){if(!Number.isFinite(e)||e<0)return"?";const t=["B","KB","MB","GB","TB","PB"];let n=0;for(;e>=1024&&n<t.length-1;)e/=1024,n++;return`${e<10&&n>0?e.toFixed(1):Math.round(e)} ${t[n]}`}const TM=3e5;function kae({socket:e,getToken:t}){const[n,r]=y.useState([]);if(y.useEffect(()=>{t().then(a=>a?fetch("/api/stats",{headers:{Authorization:`Bearer ${a}`}}):null).then(a=>a==null?void 0:a.json()).then(a=>(a==null?void 0:a.samples)&&r(a.samples)).catch(a=>console.warn("[MachineStats] seed failed",a))},[t]),y.useEffect(()=>{if(!e)return;const a=e.on(s=>{s.type==="stats"&&r(c=>[...c,s.sample].slice(-120))});return()=>{a()}},[e]),!n.length)return null;const i=n[n.length-1];return E.jsxs("div",{className:"w-full flex flex-wrap items-center justify-center gap-x-2 gap-y-0.5 text-[10px] text-muted-foreground/60",children:[E.jsx(Fm,{label:"cpu",value:i.cpu,series:n.map(a=>a.cpu)}),E.jsx(Fm,{label:"mem",value:i.mem,series:n.map(a=>a.mem)}),i.disk>=0&&E.jsx(Fm,{label:"disk",value:i.disk,severity:Pae(i.disk),title:jae(i)}),E.jsx(Oae,{getToken:t})]})}function Oae({getToken:e}){const[t,n]=y.useState(null);return y.useEffect(()=>{let r=!0,i=0;const a=async()=>{var f;try{const h=await e();if(!h)return;i=Date.now();const p=await fetch("/api/claude-usage",{headers:{Authorization:`Bearer ${h}`}});if(!r)return;if(p.status===204){n(null);return}if(p.status!==200)return;const m=await p.json();if(!r||!((f=m==null?void 0:m.limits)!=null&&f.length))return;n(m)}catch(h){console.warn("[MachineStats] claude usage poll failed",h)}},s=()=>{document.visibilityState==="visible"&&a()},c=()=>{document.visibilityState==="visible"&&Date.now()-i>=TM&&a()};s();const u=setInterval(s,TM);return document.addEventListener("visibilitychange",c),()=>{r=!1,clearInterval(u),document.removeEventListener("visibilitychange",c)}},[e]),E.jsx(Cae,{usage:t})}function Cae({usage:e}){const t=e&&u$(e.limits),[n,r]=y.useState(Ww),i=y.useRef(null),a=()=>{i.current&&(clearTimeout(i.current),i.current=null)},s=y.useCallback((c,u=0)=>{if(a(),!u){r(f=>MM(f,c));return}i.current=setTimeout(()=>{i.current=null,r(f=>MM(f,c))},u)},[]);return y.useEffect(()=>a,[]),!e||!t?null:E.jsxs(_ae,{open:n.open,onOpenChange:c=>s(c?{type:"activate"}:{type:"dismiss"}),children:[E.jsx(Aae,{asChild:!0,children:E.jsx("button",{type:"button","aria-label":"claude usage breakdown",className:"cursor-default rounded-sm outline-none focus-visible:ring-1 focus-visible:ring-ring",onPointerEnter:c=>s({type:"pointerenter",pointerType:c.pointerType},Tae),onPointerLeave:c=>s({type:"pointerleave",pointerType:c.pointerType},NM),children:E.jsx(Fm,{label:"usage",value:t.percent,severity:t.severity})})}),E.jsx(s$,{onOpenAutoFocus:c=>c.preventDefault(),onPointerEnter:()=>a(),onPointerLeave:c=>s({type:"pointerleave",pointerType:c.pointerType},NM),children:E.jsx(Nae,{usage:e})})]})}const Tae=120,NM=80,Ww={open:!1,byHover:!1};function MM(e,t){switch(t.type){case"pointerenter":return IM(t.pointerType)?{open:!0,byHover:!0}:e;case"pointerleave":return IM(t.pointerType)&&e.byHover?Ww:e;case"activate":return{open:!0,byHover:!1};case"dismiss":return Ww}}const IM=e=>e==="mouse"||e==="";function Nae({usage:e}){const t=u$(e.limits);return E.jsxs("div",{className:"text-[11px] leading-tight",children:[E.jsxs("div",{className:"flex items-baseline justify-between gap-2 pb-2 text-muted-foreground",children:[E.jsx("span",{className:"uppercase tracking-wide",children:"claude usage"}),e.subscriptionType&&E.jsxs("span",{className:"tabular-nums",children:[e.subscriptionType," plan"]})]}),E.jsxs("div",{className:"-mt-1 flex items-baseline justify-between gap-2 pb-2 text-[10px] text-muted-foreground",children:[e.account&&E.jsx("span",{className:"truncate",title:e.account,children:e.account}),E.jsx("span",{className:"shrink-0",children:Iae(e)})]}),E.jsx("div",{className:"flex flex-col gap-3",children:e.limits.map((n,r)=>{const i=Yz(n.resetsAt),a=n===t;return E.jsxs("div",{"data-headline":a||void 0,className:He("flex flex-col gap-1",!a&&"opacity-60"),children:[E.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[E.jsxs("span",{className:He("truncate",a&&"font-medium"),children:[a&&E.jsx("span",{className:"mr-1 text-muted-foreground","aria-hidden":!0,children:"▸"}),Mae(n)]}),E.jsxs("span",{className:He("tabular-nums shrink-0",Yw(n.percent,n.severity)),children:[n.percent,"%"]})]}),E.jsx(f$,{value:n.percent,className:He("w-full",Yw(n.percent,n.severity))}),E.jsx("span",{className:"text-[10px] text-muted-foreground",children:i?`resets in ${i}`:"no reset reported"})]},`${n.kind}-${r}`)})}),E.jsx("div",{className:"mt-3 border-t pt-2 text-[10px] text-muted-foreground",children:"▸ is the window the strip is showing"})]})}function Mae(e){return e.scopeLabel?`${e.scopeLabel} window`:e.kind==="session"?"current session":e.kind==="weekly_all"?"all models":e.kind.replace(/_/g," ")}function u$(e){return e.reduce((t,n)=>!t||n.percent>t.percent?n:t,null)}function Iae(e){const t=Rae(e.fetchedAt);return t?e.stale?`${t} old — refresh failed`:`updated ${t} ago`:e.stale?"last reading — refresh failed":"updated just now"}function Rae(e){if(!e)return null;const t=Date.now()-new Date(e).getTime();if(!Number.isFinite(t))return null;const n=Math.round(Math.max(0,t)/6e4);if(n<1)return null;if(n<60)return`${n}m`;const r=Math.floor(n/60),i=n%60;return r<24?i?`${r}h ${i}m`:`${r}h`:`${Math.floor(r/24)}d`}function Pae(e){return e>=c$?"critical":e>=l$?"warning":"ok"}const Dae={critical:"text-red-500",exceeded:"text-red-500",warning:"text-amber-500",warn:"text-amber-500",ok:"text-emerald-500"};function Yw(e,t){const n=t?Dae[t]:void 0;return n||(e>=90?"text-red-500":e>=75?"text-amber-500":"text-emerald-500")}function jae(e){const t=`warn at ${l$}%, critical at ${c$}%`;if(e.diskUsedBytes==null||e.diskTotalBytes==null)return`disk ${e.disk}% used — ${t}`;const n=Math.max(0,e.diskTotalBytes-e.diskUsedBytes);return`disk ${e.disk}% used — ${xx(e.diskUsedBytes)} of ${xx(e.diskTotalBytes)}, ${xx(n)} free — ${t}`}function Fm({label:e,value:t,series:n,title:r,severity:i}){const a=Yw(t,i),s=r??(n?`${e} ${t}% — last ${n.length} samples`:void 0);return E.jsxs("span",{className:"flex items-center gap-1",title:s,children:[E.jsx("span",{className:"uppercase tracking-wide",children:e}),n?E.jsx(Lae,{series:n,className:a}):E.jsx(f$,{value:t,className:a}),E.jsxs("span",{className:He("tabular-nums",a),children:[t,"%"]})]})}function f$({value:e,className:t}){const i=Math.max(0,Math.min(100,e))/100*40;return E.jsxs("svg",{width:40,height:12,viewBox:"0 0 40 12",className:He("overflow-visible",t),preserveAspectRatio:"none",children:[E.jsx("rect",{x:0,y:12/2-2,width:40,height:4,rx:2,fill:"currentColor",opacity:.2}),i>0&&E.jsx("rect",{x:0,y:12/2-2,width:i,height:4,rx:2,fill:"currentColor"})]})}function Lae({series:e,className:t}){const i=e.length;if(i<2)return null;const a=e.map((s,c)=>{const u=i>1?c/(i-1)*40:0,f=12-Math.max(0,Math.min(100,s))/100*12;return`${u.toFixed(1)},${f.toFixed(1)}`}).join(" ");return E.jsx("svg",{width:40,height:12,viewBox:"0 0 40 12",className:He("overflow-visible",t),preserveAspectRatio:"none",children:E.jsx("polyline",{points:a,fill:"none",stroke:"currentColor",strokeWidth:1,strokeLinejoin:"round",strokeLinecap:"round"})})}const id=50;function zae({getToken:e,filter:t,refreshKey:n,hydrateIds:r}){const[i,a]=y.useState([]),[s,c]=y.useState(null),[u,f]=y.useState(!1),[h,p]=y.useState({}),m=y.useRef(new Set),v=y.useRef(null),x=y.useRef(null),b=y.useRef(t);b.current=t;const S=y.useRef(id),_=y.useRef(t);_.current!==t&&(_.current=t,S.current=id);const O=y.useCallback(async(P,D)=>{const j=await e();if(!j||D!=null&&D.aborted)return null;const R=await fetch(`/api/sessions?${new URLSearchParams(P)}`,{signal:D,headers:{Authorization:`Bearer ${j}`}});if(!R.ok)return null;const F=await R.json();return Array.isArray(F==null?void 0:F.sessions)?F:null},[e]),k=y.useCallback(async(P,D,j)=>{const R=[];let F,I=null;for(;R.length<P;){const G={filter:D,limit:String(Math.min(id,P-R.length))};F&&(G.before=F);const V=await O(G,j);if(!V)return null;if(R.push(...V.sessions),I=V.nextCursor,!I||!V.sessions.length)break;F=I}return{sessions:R,nextCursor:I}},[O]);y.useEffect(()=>{var D,j;(D=v.current)==null||D.abort(),(j=x.current)==null||j.abort();const P=new AbortController;return v.current=P,f(!0),m.current.clear(),p({}),k(S.current,t,P.signal).then(R=>{!R||P.signal.aborted||(a(R.sessions),c(R.nextCursor))}).catch(()=>{}).finally(()=>{P.signal.aborted||f(!1)}),()=>P.abort()},[k,t,n]);const T=y.useCallback(()=>{var j;if(!s||u)return;(j=x.current)==null||j.abort();const P=new AbortController;x.current=P;const D=b.current;f(!0),O({filter:D,limit:String(id),before:s},P.signal).then(R=>{!R||P.signal.aborted||D!==b.current||(a(F=>{const I=new Set(F.map(V=>V.sessionId)),G=[...F,...R.sessions.filter(V=>!I.has(V.sessionId))];return S.current=Math.max(id,G.length),G}),c(R.nextCursor))}).catch(()=>{}).finally(()=>{P.signal.aborted||f(!1)})},[s,u,O]),C=y.useMemo(()=>{const P=new Map;for(const D of Object.values(h))P.set(D.sessionId,D);for(const D of i)P.set(D.sessionId,D);return P},[i,h]),N=r.join(",");return y.useEffect(()=>{const P=r.filter(j=>!!j&&!C.has(j)&&!m.current.has(j)).slice(0,200);if(!P.length)return;for(const j of P)m.current.add(j);let D=!1;return O({ids:P.join(",")}).then(j=>{!j||D||p(R=>{const F={...R};for(const I of j.sessions)F[I.sessionId]=I;return F})}).catch(()=>{}),()=>{D=!0}},[N,C,O]),{sessions:i,cursor:s,loading:u,byId:C,loadMore:T}}const ad="0.1.100";function $ae(e){const t=Date.now()-e,n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);if(r<24)return`${r}h ago`;const i=Math.floor(r/24);return i<7?`${i}d ago`:new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}const od="w-4 h-4 mt-0.5 shrink-0";function Bae(e){const t=e.slackContext;return(t==null?void 0:t.type)==="dm"?E.jsx(oG,{className:`${od} text-purple-400`}):(t==null?void 0:t.type)==="mention"?E.jsx(Wq,{className:`${od} text-blue-400`}):(t==null?void 0:t.type)==="channel"?E.jsx(tG,{className:`${od} text-green-400`}):e.sessionId.startsWith("slack-")?E.jsx(bw,{className:`${od} text-yellow-400`}):E.jsx(bw,{className:`${od} text-muted-foreground`})}function Uae(e){const t=e.slackContext;return(t==null?void 0:t.type)==="dm"?`DM${t.userName?` · ${t.userName}`:""}`:(t==null?void 0:t.type)==="mention"?`@mention${t.channelName?` · #${t.channelName}`:""}`:(t==null?void 0:t.type)==="channel"?`#${t.channelName||"channel"}`:e.sessionId.startsWith("slack-")?"Slack":null}function Fae(e,t,n){return Object.keys(e).map(r=>t.get(r)).filter(r=>!!r&&(n==="all"||r.mine!==!1))}const RM="chats-filter",PM="chats-unread-filter";function Hae({getToken:e,activeSessionId:t,onSelect:n,onNew:r,refreshKey:i,workspaceRefreshKey:a,onRefreshWorkspace:s,unreads:c={},busySessions:u=new Set,socket:f}){var H;const h=Sa(),[p,m]=y.useState(()=>localStorage.getItem(RM)||"mine"),[v,x]=y.useState(()=>localStorage.getItem(PM)==="true"),[b,S]=y.useState(""),_=y.useRef(null);function O(K){m(K),localStorage.setItem(RM,K)}function k(){const K=!v;x(K),localStorage.setItem(PM,String(K))}const T=y.useMemo(()=>[t,...Object.keys(c)].filter(K=>!!K),[t,c]),{sessions:C,cursor:N,loading:P,byId:D,loadMore:j}=zae({getToken:e,filter:p,refreshKey:i,hydrateIds:T}),R=y.useMemo(()=>Fae(c,D,p),[c,D,p]),F=R.length,I=y.useMemo(()=>v?[...R].sort((K,L)=>L.lastModified-K.lastModified):C,[v,R,C]),G=t&&!I.some(K=>K.sessionId===t)?D.get(t):void 0;y.useEffect(()=>{_.current&&_.current.scrollIntoView({block:"nearest"})},[t,I,G]);const V=y.useRef(null),q=y.useRef(j);q.current=j,y.useEffect(()=>{const K=V.current;if(!K||!N||v)return;const L=new IntersectionObserver(U=>{U.some(Q=>Q.isIntersecting)&&q.current()},{rootMargin:"300px"});return L.observe(K),()=>L.disconnect()},[N,P,v]),y.useEffect(()=>{e().then(K=>K?fetch("/api/version",{headers:{Authorization:`Bearer ${K}`}}):null).then(K=>K==null?void 0:K.json()).then(K=>K&&S(K.version)).catch(()=>{})},[]);const B=!!b&&b!=="unknown"&&ad!=="dev"&&b!==ad;y.useEffect(()=>{B&&console.warn(`[shraga] stale client bundle: built from v${ad}, server runs v${b} — rebuild dist/client`)},[B,b]);function Y(K){const L=c[K.sessionId],U=u.has(K.sessionId)||K.runStatus==="running"||K.scheduleRunStatus==="running",Q=!U&&(!!K.lastStopReason||K.scheduleRunStatus==="error"||K.scheduleRunStatus==="aborted"),z=U?"border-amber-500":Q?"border-red-500":L?"border-blue-500":"",ce=!!(U||Q||L);return E.jsx("button",{ref:K.sessionId===t?_:void 0,onClick:()=>n(K.sessionId,K.title),className:He("w-full text-left px-3 py-2.5 text-sm transition-colors hover:bg-accent/50 group",ce?`rounded-r-lg border-l-[3px] ${z}`:"rounded-lg",t===K.sessionId&&"bg-accent"),children:E.jsxs("div",{className:"flex items-start gap-2",children:[Bae(K),E.jsxs("div",{className:"min-w-0 flex-1",children:[E.jsx("span",{className:He("block truncate text-sm leading-snug",L&&"font-semibold"),children:K.title||"New session"}),E.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[E.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:Uae(K)||K.userName}),E.jsx("span",{className:"text-[10px] text-muted-foreground/50",children:"·"}),E.jsx("span",{className:"text-[10px] text-muted-foreground",children:$ae(K.lastModified)})]})]})]})},K.sessionId)}return E.jsxs("div",{className:"flex flex-col h-full bg-muted/30",children:[E.jsx("div",{className:"p-3",children:E.jsxs(Re,{variant:"outline",size:"sm",className:"w-full gap-2 justify-start",onClick:r,title:"New Chat (Ctrl+N)",children:[E.jsx(gv,{className:"w-4 h-4"})," New Chat",E.jsx("span",{className:"ml-auto flex items-center gap-0.5 text-[10px] text-muted-foreground/50 font-mono",children:"⌃N"})]})}),E.jsx("div",{className:"border-b shrink-0 flex flex-col max-h-[40vh]",children:E.jsx(jne,{getToken:e,onRefresh:s,refreshKey:a})}),E.jsxs("div",{className:"flex items-center justify-between px-3 pt-2 pb-1",children:[E.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Chats"}),E.jsxs("div",{className:"flex gap-0.5",children:[["mine","all"].map(K=>E.jsx("button",{onClick:()=>O(K),className:He("text-[10px] px-1.5 rounded-full transition-colors capitalize leading-none",p===K?"text-foreground font-medium":"text-muted-foreground/60 hover:text-muted-foreground"),children:K},K)),E.jsxs("button",{onClick:k,className:He("text-[10px] px-1.5 rounded-full transition-colors leading-none",v?"text-blue-600 dark:text-blue-400 font-medium":"text-muted-foreground/60 hover:text-muted-foreground"),children:["unread",F>0&&E.jsx("span",{className:"inline-block w-1.5 h-1.5 ml-1 rounded-full bg-blue-500 align-middle"})]})]})]}),E.jsx(qj,{className:"flex-1",children:E.jsxs("div",{className:"px-2 pb-2 space-y-0.5",children:[I.length===0&&!G&&E.jsx("p",{className:"text-xs text-muted-foreground px-3 py-6 text-center",children:P?"Loading…":v?"No unread conversations":"No conversations yet"}),G&&Y(G),I.map(Y),!v&&N&&E.jsx("div",{ref:V,className:"py-3 text-center text-[11px] text-muted-foreground/60",children:P?"Loading older…":"···"})]})}),E.jsxs("div",{className:"px-4 py-2 flex flex-col items-center gap-1",children:[E.jsx(kae,{socket:f??null,getToken:e}),(H=h.sidebarExtras)==null?void 0:H.call(h),b&&(B?E.jsxs("button",{onClick:()=>location.reload(),title:`This page was built from v${ad}, the server runs v${b} — reload to update`,className:"text-[10px] text-amber-400 hover:text-amber-300 text-center underline decoration-dotted",children:["⚠️ stale page (v",ad," → v",b,") · reload"]}):E.jsxs("div",{className:"text-[10px] text-muted-foreground/50 text-center",children:["v",b]}))]})]})}function Vr(e,t){const n=e[e.length-1];if((n==null?void 0:n.role)==="assistant"){if(t.type==="text"||t.type==="thinking"){const r=[...n.blocks],i=r[r.length-1];return(i==null?void 0:i.type)===t.type?(r[r.length-1]={...i,text:i.text+t.text},[...e.slice(0,-1),{...n,blocks:r}]):[...e.slice(0,-1),{...n,blocks:[...r,t]}]}return[...e.slice(0,-1),{...n,blocks:[...n.blocks,t]}]}return[...e,{id:ms(),role:"assistant",blocks:[t]}]}function DM(e,t,n="text"){const r=e[e.length-1],i={type:n,text:t};return(r==null?void 0:r.role)==="assistant"?[...e.slice(0,-1),{...r,blocks:[...r.blocks,i]}]:[...e,{id:ms(),role:"assistant",blocks:[i]}]}function d$(e,t,n){for(let r=e.length-1;r>=0;r--){const i=e[r];if(i.role!=="assistant")continue;const a=i.blocks.findIndex(c=>c.type==="tool_use"&&c.toolUseId===t);if(a===-1)continue;const s=[...i.blocks];return s[a]={...s[a],input:n},[...e.slice(0,r),{...i,blocks:s},...e.slice(r+1)]}return e}function Kae(e,t){const[n,r]=y.useState([]),[i,a]=y.useState(!1),[s,c]=y.useState([]),u=y.useRef(t.initialSessionId),f=y.useRef(!1),h=y.useRef(s);h.current=s;const p=y.useRef(t.getToken);p.current=t.getToken;const m=y.useRef(t.onNewSession);m.current=t.onNewSession;const v=y.useRef(t.onDirectivesChanged);v.current=t.onDirectivesChanged;const x=y.useRef(t.onParticipantsChanged);x.current=t.onParticipantsChanged;const b=y.useRef(t.onEvent);b.current=t.onEvent;const S=y.useRef(e);S.current=e;const _=y.useCallback(I=>I!=null&&I===u.current,[]),O=y.useCallback(async()=>{var G;const I=u.current;if(I)try{const q=await(await bl(`/api/sessions/${I}/messages`,p.current)).json();r(wj(q)),a(!!q.busy),(G=x.current)==null||G.call(x,Array.isArray(q.participants)&&q.participants.length>1)}catch{}},[]);y.useEffect(()=>{if(!e)return;const I=e.on(G=>{var q,B,Y,H,K,L;(q=b.current)==null||q.call(b,G);const V=G;if(V.type==="compact_marker")return _(V.sessionId)?r(U=>[...U,{id:ms(),role:"assistant",blocks:[{type:"compact_marker",summary:V.summary??"",compactedCount:V.compactedCount??0}]}]):void 0;switch(G.type){case"thinking_delta":return _(G.sessionId)?r(U=>Vr(U,{type:"thinking",text:G.text})):void 0;case"text_delta":return _(G.sessionId)?r(U=>Vr(U,{type:"text",text:G.text})):void 0;case"tool_use":return _(G.sessionId)?r(U=>Vr(U,{type:"tool_use",tool:G.tool,toolUseId:G.toolUseId,input:G.input})):void 0;case"tool_use_input":return _(G.sessionId)?r(U=>d$(U,G.toolUseId,G.input)):void 0;case"tool_result":return _(G.sessionId)?r(U=>Vr(U,{type:"tool_result",toolUseId:G.toolUseId,output:G.output})):void 0;case"tool_result_image":return _(G.sessionId)?r(U=>Vr(U,{type:"image",src:G.dataUrl})):void 0;case"permission_request":return _(G.sessionId)?r(U=>Vr(U,{type:"permission_request",id:G.id,tool:G.tool,input:G.input})):void 0;case"question_request":return _(G.sessionId)?r(U=>Vr(U,{type:"question_request",id:G.id,questions:G.questions})):void 0;case"directives":return f.current?(B=v.current)==null?void 0:B.call(v,G.directives):void 0;case"session_id":return!f.current||u.current?void 0:(u.current=G.sessionId,(Y=m.current)==null?void 0:Y.call(m,G.sessionId));case"forked":return G.sourceSessionId!==u.current?void 0:(u.current=G.sessionId,(H=m.current)==null?void 0:H.call(m,G.sessionId));case"session_busy":G.sessionId===u.current&&a(G.busy);return;case"session_stream":return G.sessionId!==u.current?void 0:qae(r,G.event);case"session_messages_changed":G.sessionId===u.current&&O();return;case"done":{if(G.sessionId!==u.current)return;G.stopReason==="max_turns_reached"&&r(Q=>Vr(Q,{type:"text",text:`
1847
+ `)},yne=0,Uc=[];function bne(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(yne++)[0],a=y.useState(Tz)[0],s=y.useRef(e);y.useEffect(function(){s.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var b=qH([e.lockRef.current],(e.shards||[]).map(fM),!0).filter(Boolean);return b.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=y.useCallback(function(b,S){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!s.current.allowPinchZoom;var _=cm(b),O=n.current,k="deltaX"in b?b.deltaX:O[0]-_[0],T="deltaY"in b?b.deltaY:O[1]-_[1],C,N=b.target,P=Math.abs(k)>Math.abs(T)?"h":"v";if("touches"in b&&P==="h"&&N.type==="range")return!1;var D=window.getSelection(),j=D&&D.anchorNode,R=j?j===N||j.contains(N):!1;if(R)return!1;var F=cM(P,N);if(!F)return!0;if(F?C=P:(C=P==="v"?"h":"v",F=cM(P,N)),!F)return!1;if(!r.current&&"changedTouches"in b&&(k||T)&&(r.current=C),!C)return!0;var I=r.current||C;return mne(I,S,b,I==="h"?k:T)},[]),u=y.useCallback(function(b){var S=b;if(!(!Uc.length||Uc[Uc.length-1]!==a)){var _="deltaY"in S?uM(S):cm(S),O=t.current.filter(function(C){return C.name===S.type&&(C.target===S.target||S.target===C.shadowParent)&&gne(C.delta,_)})[0];if(O&&O.should){S.cancelable&&S.preventDefault();return}if(!O){var k=(s.current.shards||[]).map(fM).filter(Boolean).filter(function(C){return C.contains(S.target)}),T=k.length>0?c(S,k[0]):!s.current.noIsolation;T&&S.cancelable&&S.preventDefault()}}},[]),f=y.useCallback(function(b,S,_,O){var k={name:b,delta:S,target:_,should:O,shadowParent:xne(_)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(T){return T!==k})},1)},[]),h=y.useCallback(function(b){n.current=cm(b),r.current=void 0},[]),p=y.useCallback(function(b){f(b.type,uM(b),b.target,c(b,e.lockRef.current))},[]),m=y.useCallback(function(b){f(b.type,cm(b),b.target,c(b,e.lockRef.current))},[]);y.useEffect(function(){return Uc.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:m}),document.addEventListener("wheel",u,Bc),document.addEventListener("touchmove",u,Bc),document.addEventListener("touchstart",h,Bc),function(){Uc=Uc.filter(function(b){return b!==a}),document.removeEventListener("wheel",u,Bc),document.removeEventListener("touchmove",u,Bc),document.removeEventListener("touchstart",h,Bc)}},[]);var v=e.removeScrollBar,x=e.inert;return y.createElement(y.Fragment,null,x?y.createElement(a,{styles:vne(i)}):null,v?y.createElement(lne,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xne(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const wne=Yte(Cz,bne);var qE=y.forwardRef(function(e,t){return y.createElement(_v,aa({},e,{ref:t,sideCar:wne}))});qE.classNames=_v.classNames;var Ene=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Fc=new WeakMap,um=new WeakMap,fm={},hx=0,Rz=function(e){return e&&(e.host||Rz(e.parentNode))},Sne=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Rz(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},_ne=function(e,t,n,r){var i=Sne(t,Array.isArray(e)?e:[e]);fm[n]||(fm[n]=new WeakMap);var a=fm[n],s=[],c=new Set,u=new Set(i),f=function(p){!p||c.has(p)||(c.add(p),f(p.parentNode))};i.forEach(f);var h=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(m){if(c.has(m))h(m);else try{var v=m.getAttribute(r),x=v!==null&&v!=="false",b=(Fc.get(m)||0)+1,S=(a.get(m)||0)+1;Fc.set(m,b),a.set(m,S),s.push(m),b===1&&x&&um.set(m,!0),S===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(_){console.error("aria-hidden: cannot operate on ",m,_)}})};return h(t),c.clear(),hx++,function(){s.forEach(function(p){var m=Fc.get(p)-1,v=a.get(p)-1;Fc.set(p,m),a.set(p,v),m||(um.has(p)||p.removeAttribute(r),um.delete(p)),v||p.removeAttribute(n)}),hx--,hx||(Fc=new WeakMap,Fc=new WeakMap,um=new WeakMap,fm={})}},Pz=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Ene(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),_ne(r,i,n,"aria-hidden")):function(){return null}},Av="Dialog",[Dz]=Mj(Av),[Ane,$i]=Dz(Av),jz=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,c=y.useRef(null),u=y.useRef(null),[f,h]=xte({prop:r,defaultProp:i??!1,onChange:a,caller:Av});return E.jsx(Ane,{scope:t,triggerRef:c,contentRef:u,contentId:sx(),titleId:sx(),descriptionId:sx(),open:f,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(p=>!p),[h]),modal:s,children:n})};jz.displayName=Av;var Lz="DialogTrigger",zz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(Lz,n),a=ti(t,i.triggerRef);return E.jsx(Pr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":XE(i.open),...r,ref:a,onClick:vr(e.onClick,i.onOpenToggle)})});zz.displayName=Lz;var GE="DialogPortal",[kne,$z]=Dz(GE,{forceMount:void 0}),Bz=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=$i(GE,t);return E.jsx(kne,{scope:t,forceMount:n,children:y.Children.map(r,s=>E.jsx(Rs,{present:n||a.open,children:E.jsx(kz,{asChild:!0,container:i,children:s})}))})};Bz.displayName=GE;var pg="DialogOverlay",VE=y.forwardRef((e,t)=>{const n=$z(pg,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$i(pg,e.__scopeDialog);return a.modal?E.jsx(Rs,{present:r||a.open,children:E.jsx(Cne,{...i,ref:t})}):null});VE.displayName=pg;var One=xE("DialogOverlay.RemoveScroll"),Cne=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(pg,n),a=Cte(),s=ti(t,a);return E.jsx(qE,{as:One,allowPinchZoom:!0,shards:[i.contentRef],children:E.jsx(Pr.div,{"data-state":XE(i.open),...r,ref:s,style:{pointerEvents:"auto",...r.style}})})}),Eu="DialogContent",WE=y.forwardRef((e,t)=>{const n=$z(Eu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=$i(Eu,e.__scopeDialog);return E.jsx(Rs,{present:r||a.open,children:a.modal?E.jsx(Tne,{...i,ref:t}):E.jsx(Nne,{...i,ref:t})})});WE.displayName=Eu;var Tne=y.forwardRef((e,t)=>{const n=$i(Eu,e.__scopeDialog),r=y.useRef(null),i=ti(t,n.contentRef,r);return y.useEffect(()=>{const a=r.current;if(a)return Pz(a)},[]),E.jsx(Uz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:vr(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:vr(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&a.preventDefault()}),onFocusOutside:vr(e.onFocusOutside,a=>a.preventDefault())})}),Nne=y.forwardRef((e,t)=>{const n=$i(Eu,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return E.jsx(Uz,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,c;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,f;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((f=n.triggerRef.current)==null?void 0:f.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),Uz=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,c=$i(Eu,n);return Bte(),E.jsx(E.Fragment,{children:E.jsx(_z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:E.jsx(Ez,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":XE(c.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),Fz="DialogTitle",YE=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(Fz,n);return E.jsx(Pr.h2,{id:i.titleId,...r,ref:t})});YE.displayName=Fz;var Hz="DialogDescription",Mne=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(Hz,n);return E.jsx(Pr.p,{id:i.descriptionId,...r,ref:t})});Mne.displayName=Hz;var Kz="DialogClose",qz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(Kz,n);return E.jsx(Pr.button,{type:"button",...r,ref:t,onClick:vr(e.onClick,()=>i.onOpenChange(!1))})});qz.displayName=Kz;function XE(e){return e?"open":"closed"}const Es=jz,ch=zz,Ine=Bz,Gz=y.forwardRef(({className:e,...t},n)=>E.jsx(VE,{ref:n,className:He("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Gz.displayName=VE.displayName;const uo=y.forwardRef(({className:e,children:t,...n},r)=>E.jsxs(Ine,{children:[E.jsx(Gz,{}),E.jsxs(WE,{ref:r,className:He("fixed left-[50%] top-[50%] z-50 flex flex-col w-[calc(100vw-2rem)] max-w-lg max-h-[85dvh] overflow-y-auto translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-4 sm:p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",e),...n,children:[t,E.jsxs(qz,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[E.jsx(Pl,{className:"h-4 w-4"}),E.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));uo.displayName=WE.displayName;function jl({className:e,...t}){return E.jsx("div",{className:He("shrink-0 flex flex-col space-y-1.5 text-center sm:text-left",e),...t})}function Vz({className:e,...t}){return E.jsx("div",{"data-dialog-body":!0,className:He("flex-1 min-h-0 overflow-y-auto -mx-4 px-4 sm:-mx-6 sm:px-6",e),...t})}function Wz({className:e,...t}){return E.jsx("div",{className:He("shrink-0 -mx-4 px-4 pt-3 border-t sm:-mx-6 sm:px-6","flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t})}const Ss=y.forwardRef(({className:e,...t},n)=>E.jsx(YE,{ref:n,className:He("text-lg font-semibold leading-none tracking-tight",e),...t}));Ss.displayName=YE.displayName;const Rne=new Set(["png","jpg","jpeg","gif","webp","svg","ico","bmp","avif"]),Pne=new Set(["pdf","mp4","webm","mp3","ogg","wav"]);async function Dne(e,t){const n=await t();if(!n)return[];const r=await fetch(`/api/workspace/ls?path=${encodeURIComponent(e)}`,{headers:{Authorization:`Bearer ${n}`}});return r.ok?(await r.json()).entries??[]:[]}function jne({getToken:e,onRefresh:t,refreshKey:n}){const[r,i]=y.useState(new Map),[a,s]=y.useState(()=>new Set),[c,u]=y.useState(null),[f,h]=y.useState(!1),[p,m]=y.useState("fit"),[v,x]=y.useState(null),[b,S]=y.useState(null),_=y.useRef(null),[O,k]=y.useState(null),[T,C]=y.useState(!1),[N,P]=y.useState([]),D=y.useCallback(async B=>{const Y=await Dne(B,e);i(H=>new Map(H).set(B,Y))},[e]);y.useEffect(()=>{D(""),a.forEach(B=>D(B))},[D,n]);const j=r.get("")??[],R=y.useCallback(B=>{try{const Y=B.contentDocument;if(!(Y!=null&&Y.body))return;const H=Math.max(Y.body.offsetWidth,Y.body.scrollWidth),K=Math.max(Y.body.offsetHeight,Y.body.scrollHeight);H&&K&&S({w:H,h:K})}catch{}},[]),F=y.useCallback(()=>{const B=_.current,Y=b;if(!B||!Y)return;const H=16,K=B.clientWidth-H,L=B.clientHeight-H,U=Math.min(K/Y.w,L/Y.h,1);x({scale:U,w:Y.w,h:Y.h})},[b]);y.useEffect(()=>{if(!(c!=null&&c.html)||p!=="fit"){x(null);return}const B=_.current;if(!B)return;const Y=new ResizeObserver(()=>requestAnimationFrame(F));return Y.observe(B),()=>Y.disconnect()},[c==null?void 0:c.html,f,p,F]),y.useEffect(()=>{T&&e().then(B=>{B&&fetch("/api/data-sync/log",{headers:{Authorization:`Bearer ${B}`}}).then(Y=>Y.json()).then(P).catch(()=>{})})},[T]);const I=B=>{s(Y=>{const H=new Set(Y);return H.has(B)?H.delete(B):(H.add(B),r.has(B)||D(B)),H})},G=(B,Y)=>{const H=new URLSearchParams({path:B});return O&&H.set("token",O),Y&&H.set("dl","1"),`/api/workspace/raw?${H}`},V=async B=>{var K;const Y=await e();if(!Y)return;k(Y);const H=((K=B.split(".").pop())==null?void 0:K.toLowerCase())??"";if(H==="html"||H==="htm"){u({path:B,content:"",binary:!1,html:!0});return}if(Rne.has(H)){u({path:B,content:"",binary:!1,image:!0});return}if(Pne.has(H)){u({path:B,content:"",binary:!1,html:!0});return}try{const L=await fetch(`/api/workspace/file?path=${encodeURIComponent(B)}`,{headers:{Authorization:`Bearer ${Y}`}});if(!L.ok)return;const U=await L.json();u({path:B,content:U.content,binary:!!U.binary})}catch{}},q=(B,Y)=>E.jsx(E.Fragment,{children:B.map(H=>{const K=H.path.split("/").pop();return E.jsxs("div",{children:[H.type==="dir"?E.jsxs("button",{onClick:()=>I(H.path),className:"w-full flex items-center gap-1 px-2 py-1 rounded hover:bg-accent/50 text-left text-sm",style:{paddingLeft:8+Y*12},children:[E.jsx(Is,{className:He("w-3 h-3 shrink-0 transition-transform",a.has(H.path)&&"rotate-90")}),E.jsx(eG,{className:"w-3.5 h-3.5 shrink-0 text-muted-foreground"}),E.jsx("span",{className:"truncate",children:K})]}):E.jsxs("button",{onClick:()=>V(H.path),className:"w-full flex items-center gap-1 px-2 py-1 rounded hover:bg-accent/50 text-left text-sm",style:{paddingLeft:8+Y*12+12},title:H.oneLiner||H.path,children:[E.jsx(mE,{className:"w-3.5 h-3.5 shrink-0 text-muted-foreground"}),E.jsx("span",{className:"truncate",children:K})]}),H.type==="dir"&&a.has(H.path)&&q(r.get(H.path)??[],Y+1)]},H.path)})});return E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"flex items-center justify-between px-3 pt-2 pb-1 shrink-0",children:[E.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Workspace"}),E.jsxs("div",{className:"flex items-center gap-0.5",children:[E.jsx("button",{onClick:()=>C(!0),className:"p-0.5 rounded hover:bg-accent text-muted-foreground",title:"Activity log",children:E.jsx(nG,{className:"w-3 h-3"})}),E.jsx("button",{onClick:()=>{D(""),a.forEach(B=>D(B)),t==null||t()},className:"p-0.5 rounded hover:bg-accent text-muted-foreground",title:"Refresh",children:E.jsx(fG,{className:"w-3 h-3"})})]})]}),E.jsx("div",{className:"px-1 pb-2 overflow-y-auto min-h-0",children:j.length===0?E.jsx("p",{className:"text-xs text-muted-foreground px-3 py-2",children:"Empty. Drop .md files into data/workspace/ or ask the agent to create some."}):q(j,0)}),E.jsx(Es,{open:!!c,onOpenChange:B=>{B||(u(null),h(!1),m("fit"),S(null))},children:E.jsxs(uo,{className:He(c!=null&&c.html?He("!flex !flex-col !p-0 !gap-0 overflow-hidden",f?"max-w-none w-[100vw] h-[100vh] rounded-none border-0":"max-w-[90vw] w-[90vw] h-[85vh]"):"max-w-3xl max-h-[80vh] !flex !flex-col overflow-hidden"),children:[E.jsxs("div",{className:"absolute right-12 top-4 flex items-center gap-1.5 z-10",children:[(c==null?void 0:c.html)&&E.jsxs(E.Fragment,{children:[E.jsx("button",{onClick:()=>m(B=>B==="fit"?"scroll":"fit"),className:"rounded-sm opacity-70 hover:opacity-100 text-muted-foreground",title:p==="fit"?"Switch to scrollable (1:1)":"Switch to scale-to-fit",children:p==="fit"?E.jsx(sG,{className:"w-4 h-4"}):E.jsx(hG,{className:"w-4 h-4"})}),E.jsx("button",{onClick:()=>h(B=>!B),className:"rounded-sm opacity-70 hover:opacity-100 text-muted-foreground",title:f?"Restore":"Maximize",children:f?E.jsx(vE,{className:"w-4 h-4"}):E.jsx(gE,{className:"w-4 h-4"})})]}),c&&E.jsx("a",{href:G(c.path,!0),download:!0,className:"rounded-sm opacity-70 hover:opacity-100 text-muted-foreground",title:"Download",children:E.jsx(kj,{className:"w-4 h-4"})})]}),E.jsx(jl,{className:He((c==null?void 0:c.html)&&"px-4 py-3 shrink-0 border-b"),children:E.jsx(Ss,{className:"font-mono text-sm truncate pr-16",children:c==null?void 0:c.path})}),E.jsx("div",{ref:c!=null&&c.html?_:void 0,className:He(c!=null&&c.html?He("flex-1 min-h-0 bg-muted/10",p==="fit"?"overflow-hidden flex items-center justify-center":"overflow-auto"):"flex-1 min-h-0 overflow-y-auto"),children:c!=null&&c.html?p==="fit"?E.jsx("div",{style:v?{width:v.w*v.scale,height:v.h*v.scale}:{width:"100%",height:"100%"},children:E.jsx("iframe",{src:G(c.path),className:"border-0 bg-white origin-top-left",title:c.path,onLoad:B=>{R(B.currentTarget),F()},style:v?{width:v.w,height:v.h,transform:`scale(${v.scale})`}:{width:"100%",height:"100%"}})}):E.jsx("iframe",{src:G(c.path),className:"border-0 bg-white mx-auto block",title:c.path,onLoad:B=>R(B.currentTarget),style:{width:(b==null?void 0:b.w)||"100%",height:(b==null?void 0:b.h)||"100%"}}):c!=null&&c.image?E.jsx("div",{className:"flex items-center justify-center p-4",children:E.jsx("img",{src:G(c.path),alt:c.path,className:"max-w-full max-h-[70vh] object-contain"})}):c!=null&&c.binary?E.jsx("p",{className:"text-sm text-muted-foreground",children:"(binary file — preview unavailable)"}):c!=null&&c.path.toLowerCase().endsWith(".md")||c!=null&&c.path.toLowerCase().endsWith(".markdown")?E.jsx("div",{className:"text-sm",children:E.jsx(TL,{remarkPlugins:[JL],rehypePlugins:[wz],className:"prose prose-sm max-w-none dark:prose-invert prose-pre:bg-muted prose-pre:border prose-code:before:content-none prose-code:after:content-none",children:c.content})}):E.jsx("pre",{className:"text-xs whitespace-pre-wrap break-all",children:c==null?void 0:c.content})})]})}),E.jsx(Es,{open:T,onOpenChange:C,children:E.jsxs(uo,{className:"max-w-2xl max-h-[80vh] overflow-hidden flex flex-col",children:[E.jsx(jl,{children:E.jsx(Ss,{className:"text-sm",children:"Activity Log"})}),E.jsxs("div",{className:"overflow-y-auto flex-1 space-y-2",children:[N.map(B=>E.jsxs("div",{className:"border-b border-border/50 pb-2 last:border-0",children:[E.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[E.jsx("span",{className:"text-sm text-foreground",children:B.message}),E.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0",children:Lne(B.date)})]}),B.files.length>0&&E.jsx("div",{className:"text-[11px] text-muted-foreground mt-0.5",children:B.files.map(Y=>E.jsx("span",{className:"inline-block mr-2 font-mono",children:Y},Y))})]},B.hash)),N.length===0&&E.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No activity yet"})]})]})})]})}function Lne(e){const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/6e4);if(i<60)return`${i}m ago`;const a=Math.floor(i/60);return a<24?`${a}h ago`:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Yz(e,t=Date.now()){if(!e)return null;const n=new Date(e).getTime()-t;if(!Number.isFinite(n)||n<=0)return null;const r=Math.round(n/6e4);if(r<1)return"1m";if(r<60)return`${r}m`;const i=Math.floor(r/60),a=r%60;if(i<48)return a?`${i}h ${a}m`:`${i}h`;const s=Math.floor(i/24),c=i%24;return c?`${s}d ${c}h`:`${s}d`}const zne=/resets\s+(\d{1,2})(?::(\d{2}))?\s*(am|pm)?\s*\(UTC\)/i;function $ne(e,t=Date.now(),n=Date.now()){var p;const r=e.match(zne);if(!r)return e;let i=Number(r[1]);const a=r[2]?Number(r[2]):0,s=(p=r[3])==null?void 0:p.toLowerCase();if(s==="pm"&&i<12&&(i+=12),s==="am"&&i===12&&(i=0),i>23||a>59)return e;const c=new Date(t),u=new Date(Date.UTC(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate(),i,a));u.getTime()<=t&&u.setUTCDate(u.getUTCDate()+1);const f=u.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),h=Yz(u.toISOString(),n);return e.replace(r[0],`resets ${f}${h?` (in ${h})`:""}`)}var Bne=Object.defineProperty,Lu=(e,t)=>Bne(e,"name",{value:t,configurable:!0}),Xz=!!(typeof window<"u"&&window.document&&window.document.createElement);function ys(e,t,{checkForDefaultPrevented:n=!0}={}){return Lu(function(i){if(e==null||e(i),n===!1||!i||!i.defaultPrevented)return t==null?void 0:t(i)},"handleEvent")}Lu(ys,"composeEventHandlers");function Une(e){var t;if(!Xz)throw new Error("Cannot access window outside of the DOM");return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)??window}Lu(Une,"getOwnerWindow");function Pw(e){if(!Xz)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}Lu(Pw,"getOwnerDocument");function Zz(e,t=!1){const{activeElement:n}=Pw(e);if(!(n!=null&&n.nodeName))return null;if(Qz(n)&&n.contentDocument)return Zz(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const i=Pw(n).getElementById(r);if(i)return i}}return n}Lu(Zz,"getActiveElement");function Qz(e){return e.tagName==="IFRAME"}Lu(Qz,"isFrame");var Fne=Object.defineProperty,ZE=(e,t)=>Fne(e,"name",{value:t,configurable:!0});function Dw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ZE(Dw,"setRef");function Jz(...e){return t=>{let n=!1;const r=e.map(i=>{const a=Dw(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():Dw(e[i],null)}}}}ZE(Jz,"composeRefs");function zu(...e){return y.useCallback(Jz(...e),e)}ZE(zu,"useComposedRefs");var Hne=Object.defineProperty,bi=(e,t)=>Hne(e,"name",{value:t,configurable:!0});function Kne(e,t){const n=y.createContext(t);n.displayName=e+"Context";const r=bi(a=>{const{children:s,...c}=a,u=y.useMemo(()=>c,Object.values(c));return E.jsx(n.Provider,{value:u,children:s})},"Provider");r.displayName=e+"Provider";function i(a,s={}){const{optional:c=!1}=s,u=y.useContext(n);if(u)return u;if(t!==void 0)return t;if(!c)throw new Error(`\`${a}\` must be used within \`${e}\``)}return bi(i,"useContext"),[r,i]}bi(Kne,"createContext");function e3(e,t=[]){let n=[];function r(a,s){const c=y.createContext(s);c.displayName=a+"Context";const u=n.length;n=[...n,s];const f=bi(p=>{var _;const{scope:m,children:v,...x}=p,b=((_=m==null?void 0:m[e])==null?void 0:_[u])||c,S=y.useMemo(()=>x,Object.values(x));return E.jsx(b.Provider,{value:S,children:v})},"Provider");f.displayName=a+"Provider";function h(p,m,v={}){var _;const{optional:x=!1}=v,b=((_=m==null?void 0:m[e])==null?void 0:_[u])||c,S=y.useContext(b);if(S)return S;if(s!==void 0)return s;if(!x)throw new Error(`\`${p}\` must be used within \`${a}\``)}return bi(h,"useContext"),[f,h]}bi(r,"createContext");const i=bi(()=>{const a=n.map(s=>y.createContext(s));return bi(function(c){const u=(c==null?void 0:c[e])||a;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])},"useScope")},"createScope");return i.scopeName=e,[r,t3(i,...t)]}bi(e3,"createContextScope");function t3(...e){const t=e[0];if(e.length===1)return t;const n=bi(()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return bi(function(a){const s=r.reduce((c,{useScope:u,scopeName:f})=>{const p=u(a)[`__scope${f}`];return{...c,...p}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}bi(t3,"composeContextScopes");var qne=Object.defineProperty,Bi=(e,t)=>qne(e,"name",{value:t,configurable:!0});function QE(e){const t=y.forwardRef((n,r)=>{let{children:i,...a}=n,s=null,c=!1;const u=[];jw(i)&&typeof dm=="function"&&(i=dm(i._payload)),y.Children.forEach(i,m=>{var v;if(a3(m)){c=!0;const x=m;let b="child"in x.props?x.props.child:x.props.children;jw(b)&&typeof dm=="function"&&(b=dm(b._payload)),s=Vne(x,b),u.push((v=s==null?void 0:s.props)==null?void 0:v.children)}else u.push(m)}),s?s=y.cloneElement(s,void 0,u):!c&&y.Children.count(i)===1&&y.isValidElement(i)&&(s=i);const f=s?i3(s):void 0,h=zu(r,f);if(!s){if(i||i===0)throw new Error(c?Xne(e):Yne(e));return i}const p=r3(a,s.props??{});return s.type!==y.Fragment&&(p.ref=r?h:f),y.cloneElement(s,p)});return t.displayName=`${e}.Slot`,t}Bi(QE,"createSlot");var n3=Symbol.for("radix.slottable");function Gne(e){const t=Bi(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=n3,t}Bi(Gne,"createSlottable");var Vne=Bi((e,t)=>{if("child"in e.props){const n=e.props.child;return y.isValidElement(n)?y.cloneElement(n,void 0,e.props.children(n.props.children)):null}return y.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function r3(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...c)=>{const u=a(...c);return i(...c),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}Bi(r3,"mergeProps");function i3(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Bi(i3,"getElementRef");function a3(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===n3}Bi(a3,"isSlottable");var Wne=Symbol.for("react.lazy");function jw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Wne&&"_payload"in e&&o3(e._payload)}Bi(jw,"isLazyComponent");function o3(e){return typeof e=="object"&&e!==null&&"then"in e}Bi(o3,"isPromiseLike");var Yne=Bi(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Xne=Bi(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),dm=wa[" use ".trim().toString()],Zne=Object.defineProperty,Qne=(e,t)=>Zne(e,"name",{value:t,configurable:!0}),Jne=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],kv=Jne.reduce((e,t)=>{const n=QE(`Primitive.${t}`),r=y.forwardRef((i,a)=>{const{asChild:s,...c}=i,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(u,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function s3(e,t){e&&Ea.flushSync(()=>e.dispatchEvent(t))}Qne(s3,"dispatchDiscreteCustomEvent");var ere=Object.defineProperty,tre=(e,t)=>ere(e,"name",{value:t,configurable:!0});function Ov(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}tre(Ov,"useCallbackRef");var nre=Object.defineProperty,Fn=(e,t)=>nre(e,"name",{value:t,configurable:!0}),Lw="dismissableLayer.update",rre="dismissableLayer.pointerDownOutside",ire="dismissableLayer.focusOutside",dM,l3=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),are=y.forwardRef(Fn(function(t,n){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:u,onDismiss:f,...h}=t,p=y.useContext(l3),[m,v]=y.useState(null),x=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=y.useState({}),S=zu(n,v),_=Array.from(p.layers),[O]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),k=O?_.indexOf(O):-1,T=m?_.indexOf(m):-1,C=p.layersWithOutsidePointerEventsDisabled.size>0,N=T>=k,P=y.useRef(!1),D=c3(I=>{s==null||s(I),u==null||u(I),I.defaultPrevented||f==null||f()},{ownerDocument:x,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:P,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:y.useCallback(I=>{if(!(I instanceof Node))return!1;const G=[...p.branches].some(V=>V.contains(I));return N&&!G},[p.branches,N])}),j=u3(I=>{if(i&&P.current)return;const G=I.target;[...p.branches].some(q=>q.contains(G))||(c==null||c(I),u==null||u(I),I.defaultPrevented||f==null||f())},x),R=m?T===_.length-1:!1,F=Ov(I=>{I.key==="Escape"&&(a==null||a(I),!I.defaultPrevented&&f&&(I.preventDefault(),f()))});return y.useEffect(()=>{if(R)return x.addEventListener("keydown",F,{capture:!0}),()=>x.removeEventListener("keydown",F,{capture:!0})},[x,R,F]),y.useEffect(()=>{if(m)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(dM=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),zw(),()=>{r&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(x.body.style.pointerEvents=dM))}},[m,x,r,p]),y.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),zw())},[m,p]),y.useEffect(()=>{const I=Fn(()=>b({}),"handleUpdate");return document.addEventListener(Lw,I),()=>document.removeEventListener(Lw,I)},[]),E.jsx(kv.div,{...h,ref:S,style:{pointerEvents:C?N?"auto":"none":void 0,...t.style},onFocusCapture:ys(t.onFocusCapture,j.onFocusCapture),onBlurCapture:ys(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:ys(t.onPointerDownCapture,D.onPointerDownCapture)})},"DismissableLayer"));function ore(){const e=y.useContext(l3),[t,n]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Fn(ore,"useDismissableLayerSurface");var sre=Fn(()=>!0,"IS_TRUE");function c3(e,t){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:s=sre}=t,c=Ov(e),u=y.useRef(!1),f=y.useRef(!1),h=y.useRef(new Map),p=y.useRef(()=>{});return y.useEffect(()=>{function m(){f.current=!1,i.current=!1,h.current.clear()}Fn(m,"resetOutsideInteraction");function v(){return Array.from(h.current.values()).some(Boolean)}Fn(v,"isOutsideInteractionIntercepted");function x(k){if(!f.current)return;const T=k.target;T instanceof Node&&[...a].some(N=>N.contains(T))||h.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}Fn(x,"handleInteractionCapture");function b(k){f.current&&h.current.set(k.type,!1)}Fn(b,"handleInteractionBubble");const S=Fn(k=>{if(k.target&&!u.current){let T=function(){n.removeEventListener("click",p.current);const N=v();m(),N||JE(rre,c,C,{discrete:!0})};if(Fn(T,"handleAndDispatchPointerDownOutsideEvent"),!s(k.target)){n.removeEventListener("click",p.current),m(),u.current=!1;return}const C={originalEvent:k};f.current=!0,i.current=r&&k.button===0,h.current.clear(),!r||k.button!==0?T():(n.removeEventListener("click",p.current),p.current=T,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),m();u.current=!1},"handlePointerDown"),_=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of _)n.addEventListener(k,x,!0),n.addEventListener(k,b);const O=window.setTimeout(()=>{n.addEventListener("pointerdown",S)},0);return()=>{window.clearTimeout(O),n.removeEventListener("pointerdown",S),n.removeEventListener("click",p.current);for(const k of _)n.removeEventListener(k,x,!0),n.removeEventListener(k,b)}},[n,c,r,i,a,s]),{onPointerDownCapture:Fn(()=>u.current=!0,"onPointerDownCapture")}}Fn(c3,"usePointerDownOutside");function u3(e,t=globalThis==null?void 0:globalThis.document){const n=Ov(e),r=y.useRef(!1);return y.useEffect(()=>{const i=Fn(a=>{a.target&&!r.current&&JE(ire,n,{originalEvent:a},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:Fn(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Fn(()=>r.current=!1,"onBlurCapture")}}Fn(u3,"useFocusOutside");function zw(){const e=new CustomEvent(Lw);document.dispatchEvent(e)}Fn(zw,"dispatchUpdate");function JE(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?s3(i,a):i.dispatchEvent(a)}Fn(JE,"handleAndDispatchCustomEvent");var lre=Object.defineProperty,eS=(e,t)=>lre(e,"name",{value:t,configurable:!0}),hm=0,Xi=null;function cre(e){return tS(),e.children}eS(cre,"FocusGuards");function tS(){y.useEffect(()=>{Xi||(Xi={start:$w(),end:$w()});const{start:e,end:t}=Xi;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),hm++,()=>{hm===1&&(Xi==null||Xi.start.remove(),Xi==null||Xi.end.remove(),Xi=null),hm=Math.max(0,hm-1)}},[])}eS(tS,"useFocusGuards");function $w(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}eS($w,"createFocusGuard");var ure=Object.defineProperty,fre=(e,t)=>ure(e,"name",{value:t,configurable:!0});function Bw(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}fre(Bw,"useCallbackRef");var dre=Object.defineProperty,mr=(e,t)=>dre(e,"name",{value:t,configurable:!0}),px="focusScope.autoFocusOnMount",mx="focusScope.autoFocusOnUnmount",hM={bubbles:!1,cancelable:!0},hre=y.forwardRef(mr(function(t,n){const{loop:r=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...c}=t,[u,f]=y.useState(null),h=Bw(a),p=Bw(s),m=y.useRef(null),v=zu(n,f),x=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(i){let S=function(T){if(x.paused||!u)return;const C=T.target;u.contains(C)?m.current=C:Ya(m.current,{select:!0})},_=function(T){if(x.paused||!u)return;const C=T.relatedTarget;C!==null&&(u.contains(C)||Ya(m.current,{select:!0}))},O=function(T){if(document.activeElement===document.body)for(const N of T)N.removedNodes.length>0&&Ya(u)};mr(S,"handleFocusIn"),mr(_,"handleFocusOut"),mr(O,"handleMutations"),document.addEventListener("focusin",S),document.addEventListener("focusout",_);const k=new MutationObserver(O);return u&&k.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",_),k.disconnect()}}},[i,u,x.paused]),y.useEffect(()=>{if(u){pM.add(x);const S=document.activeElement;if(!u.contains(S)){const O=new CustomEvent(px,hM);u.addEventListener(px,h),u.dispatchEvent(O),O.defaultPrevented||(f3(g3(nS(u)),{select:!0}),document.activeElement===S&&Ya(u))}return()=>{u.removeEventListener(px,h),setTimeout(()=>{const O=new CustomEvent(mx,hM);u.addEventListener(mx,p),u.dispatchEvent(O),O.defaultPrevented||Ya(S??document.body,{select:!0}),u.removeEventListener(mx,p),pM.remove(x)},0)}}},[u,h,p,x]);const b=y.useCallback(S=>{if(!r&&!i||x.paused)return;const _=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,O=document.activeElement;if(_&&O){const k=S.currentTarget,[T,C]=d3(k);T&&C?!S.shiftKey&&O===C?(S.preventDefault(),r&&Ya(T,{select:!0})):S.shiftKey&&O===T&&(S.preventDefault(),r&&Ya(C,{select:!0})):O===k&&S.preventDefault()}},[r,i,x.paused]);return E.jsx(kv.div,{tabIndex:-1,...c,ref:v,onKeyDown:b})},"FocusScope"));function f3(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ya(r,{select:t}),document.activeElement!==n)return}mr(f3,"focusFirst");function d3(e){const t=nS(e),n=Uw(t,e),r=Uw(t.reverse(),e);return[n,r]}mr(d3,"getTabbableEdges");function nS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:mr(r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}mr(nS,"getTabbableCandidates");function Uw(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):h3(r,{upTo:t})))return r}mr(Uw,"findVisible");function h3(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}mr(h3,"isHidden");function p3(e){return e instanceof HTMLInputElement&&"select"in e}mr(p3,"isSelectableInput");function Ya(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&p3(e)&&t&&e.select()}}mr(Ya,"focus");var pM=m3();function m3(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Fw(e,t),e.unshift(t)},remove(t){var n;e=Fw(e,t),(n=e[0])==null||n.resume()}}}mr(m3,"createFocusScopesStack");function Fw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}mr(Fw,"arrayRemove");function g3(e){return e.filter(t=>t.tagName!=="A")}mr(g3,"removeLinks");var pre=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},mre=Object.defineProperty,gre=(e,t)=>mre(e,"name",{value:t,configurable:!0}),vre=wa[" useId ".trim().toString()]||(()=>{}),yre=0;function v3(e){const[t,n]=y.useState(vre());return pre(()=>{e||n(r=>r??String(yre++))},[e]),e||(t?`radix-${t}`:"")}gre(v3,"useId");const bre=["top","right","bottom","left"],_s=Math.min,io=Math.max,mg=Math.round,pm=Math.floor,ao=e=>({x:e,y:e}),xre={left:"right",right:"left",bottom:"top",top:"bottom"};function y3(e,t,n){return io(e,_s(t,n))}function fo(e,t){return typeof e=="function"?e(t):e}function As(e){return e.split("-")[0]}function $u(e){return e.split("-")[1]}function rS(e){return e==="x"?"y":"x"}function iS(e){return e==="y"?"height":"width"}function oa(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function aS(e){return rS(oa(e))}function wre(e,t,n){n===void 0&&(n=!1);const r=$u(e),i=aS(e),a=iS(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=gg(s)),[s,gg(s)]}function Ere(e){const t=gg(e);return[Hw(e),t,Hw(t)]}function Hw(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const mM=["left","right"],gM=["right","left"],Sre=["top","bottom"],_re=["bottom","top"];function Are(e,t,n){switch(e){case"top":case"bottom":return n?t?gM:mM:t?mM:gM;case"left":case"right":return t?Sre:_re;default:return[]}}function kre(e,t,n,r){const i=$u(e);let a=Are(As(e),n==="start",r);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(Hw)))),a}function gg(e){const t=As(e);return xre[t]+e.slice(t.length)}function Ore(e){var t,n,r,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(i=e.left)!=null?i:0}}function b3(e){return typeof e!="number"?Ore(e):{top:e,right:e,bottom:e,left:e}}function vg(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function vM(e,t,n){let{reference:r,floating:i}=e;const a=oa(t),s=aS(t),c=iS(s),u=As(t),f=a==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[c]/2-i[c]/2;let v;switch(u){case"top":v={x:h,y:r.y-i.height};break;case"bottom":v={x:h,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:p};break;case"left":v={x:r.x-i.width,y:p};break;default:v={x:r.x,y:r.y}}const x=$u(t);return x&&(v[s]+=m*(x==="end"?1:-1)*(n&&f?-1:1)),v}async function Cre(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:s,elements:c,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:v=0}=fo(t,e),x=b3(v),S=c[m?p==="floating"?"reference":"floating":p],_=vg(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(S)))==null||n?S:S.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:u})),O=p==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),T=await(a.isElement==null?void 0:a.isElement(k))&&await(a.getScale==null?void 0:a.getScale(k))||{x:1,y:1},C=vg(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:O,offsetParent:k,strategy:u}):O);return{top:(_.top-C.top+x.top)/T.y,bottom:(C.bottom-_.bottom+x.bottom)/T.y,left:(_.left-C.left+x.left)/T.x,right:(C.right-_.right+x.right)/T.x}}const Tre=50,Nre=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:Cre},u=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=vM(f,r,u),m=r,v=0;const x={};for(let b=0;b<a.length;b++){const S=a[b];if(!S)continue;const{name:_,fn:O}=S,{x:k,y:T,data:C,reset:N}=await O({x:h,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:x,rects:f,platform:c,elements:{reference:e,floating:t}});h=k??h,p=T??p,x[_]={...x[_],...C},N&&v<Tre&&(v++,typeof N=="object"&&(N.placement&&(m=N.placement),N.rects&&(f=N.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:h,y:p}=vM(f,m,u)),b=-1)}return{x:h,y:p,placement:m,strategy:i,middlewareData:x}},Mre=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:s,elements:c,middlewareData:u}=t,{element:f,padding:h=0}=fo(e,t)||{};if(f==null)return{};const p=b3(h),m={x:n,y:r},v=aS(i),x=iS(v),b=await s.getDimensions(f),S=v==="y",_=S?"top":"left",O=S?"bottom":"right",k=S?"clientHeight":"clientWidth",T=a.reference[x]+a.reference[v]-m[v]-a.floating[x],C=m[v]-a.reference[v],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let P=N?N[k]:0;(!P||!await(s.isElement==null?void 0:s.isElement(N)))&&(P=c.floating[k]||a.floating[x]);const D=T/2-C/2,j=P/2-b[x]/2-1,R=_s(p[_],j),F=_s(p[O],j),I=P-b[x]-F,G=P/2-b[x]/2+D,V=y3(R,G,I),q=!u.arrow&&$u(i)!=null&&G!==V&&a.reference[x]/2-(G<R?R:F)-b[x]/2<0,B=q?G<R?G-R:G-I:0;return{[v]:m[v]+B,data:{[v]:V,centerOffset:G-V-B,...q&&{alignmentOffset:B}},reset:q}}}),Ire=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:s,initialPlacement:c,platform:u,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:b=!0,...S}=fo(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const _=As(i),O=oa(c),k=As(c)===c,T=await(u.isRTL==null?void 0:u.isRTL(f.floating)),C=m||(k||!b?[gg(c)]:Ere(c)),N=x!=="none";!m&&N&&C.push(...kre(c,b,x,T));const P=[c,...C],D=await u.detectOverflow(t,S),j=[];let R=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&j.push(D[_]),p){const V=wre(i,s,T);j.push(D[V[0]],D[V[1]])}if(R=[...R,{placement:i,overflows:j}],!j.every(V=>V<=0)){var F,I;const V=(((F=a.flip)==null?void 0:F.index)||0)+1,q=P[V];if(q&&(!(p==="alignment"?O!==oa(q):!1)||R.every(H=>oa(H.placement)===O?H.overflows[0]>0:!0)))return{data:{index:V,overflows:R},reset:{placement:q}};let B=(I=R.filter(Y=>Y.overflows[0]<=0).sort((Y,H)=>Y.overflows[1]-H.overflows[1])[0])==null?void 0:I.placement;if(!B)switch(v){case"bestFit":{var G;const Y=(G=R.filter(H=>{if(N){const K=oa(H.placement);return K===O||K==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(K=>K>0).reduce((K,L)=>K+L,0)]).sort((H,K)=>H[1]-K[1])[0])==null?void 0:G[0];Y&&(B=Y);break}case"initialPlacement":B=c;break}if(i!==B)return{reset:{placement:B}}}return{}}}};function yM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bM(e){return bre.some(t=>e[t]>=0)}const Rre=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=fo(e,t);switch(i){case"referenceHidden":{const s=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=yM(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:bM(c)}}}case"escaped":{const s=await r.detectOverflow(t,{...a,altBoundary:!0}),c=yM(s,n.floating);return{data:{escapedOffsets:c,escaped:bM(c)}}}default:return{}}}}},x3=new Set(["left","top"]);async function Pre(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=As(n),c=$u(n),u=oa(n)==="y",f=x3.has(s)?-1:1,h=a&&u?-1:1,p=fo(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:x}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof x=="number"&&(v=c==="end"?x*-1:x),u?{x:v*h,y:m*f}:{x:m*f,y:v*h}}const Dre=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:s,middlewareData:c}=t,u=await Pre(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:s}}}}},jre=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:u={fn:O=>{let{x:k,y:T}=O;return{x:k,y:T}}},...f}=fo(e,t),h={x:n,y:r},p=await a.detectOverflow(t,f),m=oa(i),v=rS(m);let x=h[v],b=h[m];const S=(O,k)=>y3(k+p[O==="y"?"top":"left"],k,k-p[O==="y"?"bottom":"right"]);s&&(x=S(v,x)),c&&(b=S(m,b));const _=u.fn({...t,[v]:x,[m]:b});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[v]:s,[m]:c}}}}}},Lre=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:i,y:a,placement:s,rects:c,middlewareData:u}=t,{offset:f=0,mainAxis:h=!0,crossAxis:p=!0}=fo(e,t),m={x:i,y:a},v=oa(s),x=rS(v);let b=m[x],S=m[v];const _=fo(f,t),O=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(r=_.crossAxis)!=null?r:0};if(h){const C=x==="y"?"height":"width",N=c.reference[x]-c.floating[C]+O.mainAxis,P=c.reference[x]+c.reference[C]-O.mainAxis;b<N?b=N:b>P&&(b=P)}if(p){var k,T;const C=x==="y"?"width":"height",N=x3.has(As(s)),P=c.reference[v]-c.floating[C]+(N&&((k=u.offset)==null?void 0:k[v])||0)+(N?0:O.crossAxis),D=c.reference[v]+c.reference[C]+(N?0:((T=u.offset)==null?void 0:T[v])||0)-(N?O.crossAxis:0);S<P?S=P:S>D&&(S=D)}return{[x]:b,[v]:S}}}},zre=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:a}=t,{apply:s=()=>{},...c}=fo(e,t),u=await i.detectOverflow(t,c),f=As(n),h=$u(n),p=oa(n)==="y",{width:m,height:v}=r.floating;let x,b;f==="top"||f==="bottom"?(x=f,b=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,x=h==="end"?"top":"bottom");const S=v-u.top-u.bottom,_=m-u.left-u.right,O=_s(v-u[x],S),k=_s(m-u[b],_),T=t.middlewareData.shift,C=!T;let N=O,P=k;T!=null&&T.enabled.x&&(P=_),T!=null&&T.enabled.y&&(N=S),C&&!h&&(p?P=m-2*io(u.left,u.right):N=v-2*io(u.top,u.bottom)),await s({...t,availableWidth:P,availableHeight:N});const D=await i.getDimensions(a.floating);return m!==D.width||v!==D.height?{reset:{rects:!0}}:{}}}};function Cv(){return typeof window<"u"}function Bu(e){return w3(e)?(e.nodeName||"").toLowerCase():"#document"}function Rr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function bo(e){var t;return(t=(w3(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function w3(e){return Cv()?e instanceof Node||e instanceof Rr(e).Node:!1}function pa(e){return Cv()?e instanceof Element||e instanceof Rr(e).Element:!1}function Ds(e){return Cv()?e instanceof HTMLElement||e instanceof Rr(e).HTMLElement:!1}function xM(e){return!Cv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rr(e).ShadowRoot}function Tv(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ma(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function $re(e){return/^(table|td|th)$/.test(Bu(e))}function Nv(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Bre=/transform|translate|scale|rotate|perspective|filter/,Ure=/paint|layout|strict|content/,ll=e=>!!e&&e!=="none";let gx;function oS(e){const t=pa(e)?ma(e):e;return ll(t.transform)||ll(t.translate)||ll(t.scale)||ll(t.rotate)||ll(t.perspective)||!sS()&&(ll(t.backdropFilter)||ll(t.filter))||Bre.test(t.willChange||"")||Ure.test(t.contain||"")}function Fre(e){let t=Ll(e);for(;Ds(t)&&!Ld(t);){if(oS(t))return t;if(Nv(t))return null;t=Ll(t)}return null}function sS(){return gx==null&&(gx=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),gx}function Ld(e){return/^(html|body|#document)$/.test(Bu(e))}function ma(e){return Rr(e).getComputedStyle(e)}function Mv(e){return pa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ll(e){if(Bu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xM(e)&&e.host||bo(e);return xM(t)?t.host:t}function E3(e){const t=Ll(e);return Ld(t)?(e.ownerDocument||e).body:Ds(t)&&Tv(t)?t:E3(t)}function zd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=E3(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),s=Rr(i);if(a){const c=Kw(s);return t.concat(s,s.visualViewport||[],Tv(i)?i:[],c&&n?zd(c):[])}else return t.concat(i,zd(i,[],n))}function Kw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function S3(e){const t=ma(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ds(e),a=i?e.offsetWidth:n,s=i?e.offsetHeight:r,c=mg(n)!==a||mg(r)!==s;return c&&(n=a,r=s),{width:n,height:r,$:c}}function lS(e){return pa(e)?e:e.contextElement}function du(e){const t=lS(e);if(!Ds(t))return ao(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=S3(t);let s=(a?mg(n.width):n.width)/r,c=(a?mg(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const Hre=ao(0);function _3(e){const t=Rr(e);return!sS()||!t.visualViewport?Hre:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Kre(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Rr(e)}function zl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=lS(e);let s=ao(1);t&&(r?pa(r)&&(s=du(r)):s=du(e));const c=Kre(a,n,r)?_3(a):ao(0);let u=(i.left+c.x)/s.x,f=(i.top+c.y)/s.y,h=i.width/s.x,p=i.height/s.y;if(a&&r){const m=Rr(a),v=pa(r)?Rr(r):r;let x=m,b=Kw(x);for(;b&&v!==x;){const S=du(b),_=b.getBoundingClientRect(),O=ma(b),k=_.left+(b.clientLeft+parseFloat(O.paddingLeft))*S.x,T=_.top+(b.clientTop+parseFloat(O.paddingTop))*S.y;u*=S.x,f*=S.y,h*=S.x,p*=S.y,u+=k,f+=T,x=Rr(b),b=Kw(x)}}return vg({width:h,height:p,x:u,y:f})}function Iv(e,t){const n=Mv(e).scrollLeft;return t?t.left+n:zl(bo(e)).left+n}function A3(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Iv(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function qre(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",s=bo(r),c=t?Nv(t.floating):!1;if(r===s||c&&a)return n;let u={scrollLeft:0,scrollTop:0},f=ao(1);const h=ao(0),p=Ds(r);if((p||!a)&&((Bu(r)!=="body"||Tv(s))&&(u=Mv(r)),p)){const v=zl(r);f=du(r),h.x=v.x+r.clientLeft,h.y=v.y+r.clientTop}const m=s&&!p&&!a?A3(s,u):ao(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+h.x+m.x,y:n.y*f.y-u.scrollTop*f.y+h.y+m.y}}function Gre(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Vre(e){const t=Mv(e),n=e.ownerDocument.body,r=io(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=io(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Iv(e);const s=-t.scrollTop;return ma(n).direction==="rtl"&&(a+=io(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:s}}const Wre=25;function Yre(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",i=Rr(e),a=bo(e),s=i.visualViewport;let c=a.clientWidth,u=a.clientHeight,f=0,h=0;if(s){const m=!sS()||t==="fixed";r?m||(f=-s.offsetLeft,h=-s.offsetTop):(c=s.width,u=s.height,m&&(f=s.offsetLeft,h=s.offsetTop))}if(Iv(a)<=0){const m=a.ownerDocument,v=m.body,x=getComputedStyle(v),b=m.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,S=Math.abs(a.clientWidth-v.clientWidth-b),_=getComputedStyle(a).scrollbarGutter==="stable both-edges"?S/2:S;_<=Wre&&(c-=_)}return{width:c,height:u,x:f,y:h}}function Xre(e,t){const n=zl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=du(e),s=e.clientWidth*a.x,c=e.clientHeight*a.y,u=i*a.x,f=r*a.y;return{width:s,height:c,x:u,y:f}}function wM(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=Yre(e,n,t);else if(t==="document")r=Vre(bo(e));else if(pa(t))r=Xre(t,n);else{const i=_3(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return vg(r)}function Zre(e,t){const n=t.get(e);if(n)return n;let r=zd(e,[],!1).filter(c=>pa(c)&&Bu(c)!=="body"),i=null;const a=ma(e).position==="fixed";let s=a?Ll(e):e;for(;pa(s)&&!Ld(s);){const c=ma(s),u=oS(s),f=i?i.position:a?"fixed":"";!u&&(f==="fixed"||f==="absolute"&&c.position==="static")?r=r.filter(p=>p!==s):i=c,s=Ll(s)}return t.set(e,r),r}function Qre(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?Nv(t)?[]:Zre(t,this._c):[].concat(n),r],c=wM(t,s[0],i);let u=c.top,f=c.right,h=c.bottom,p=c.left;for(let m=1;m<s.length;m++){const v=wM(t,s[m],i);u=io(v.top,u),f=_s(v.right,f),h=_s(v.bottom,h),p=io(v.left,p)}return{width:f-p,height:h-u,x:p,y:u}}function Jre(e){const{width:t,height:n}=S3(e);return{width:t,height:n}}function eie(e,t,n){const r=Ds(t),i=bo(t),a=n==="fixed",s=zl(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const u=ao(0);if((r||!a)&&((Bu(t)!=="body"||Tv(i))&&(c=Mv(t)),r)){const m=zl(t,!0,a,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}!r&&i&&(u.x=Iv(i));const f=i&&!r&&!a?A3(i,c):ao(0),h=s.left+c.scrollLeft-u.x-f.x,p=s.top+c.scrollTop-u.y-f.y;return{x:h,y:p,width:s.width,height:s.height}}function vx(e){return ma(e).position==="static"}function EM(e,t){if(!Ds(e)||ma(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return bo(e)===n&&(n=n.ownerDocument.body),n}function k3(e,t){const n=Rr(e);if(Nv(e))return n;if(!Ds(e)){let i=Ll(e);for(;i&&!Ld(i);){if(pa(i)&&!vx(i))return i;i=Ll(i)}return n}let r=EM(e,t);for(;r&&$re(r)&&vx(r);)r=EM(r,t);return r&&Ld(r)&&vx(r)&&!oS(r)?n:r||Fre(e)||n}const tie=async function(e){const t=this.getOffsetParent||k3,n=this.getDimensions,r=await n(e.floating);return{reference:eie(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nie(e){return ma(e).direction==="rtl"}const rie={convertOffsetParentRelativeRectToViewportRelativeRect:qre,getDocumentElement:bo,getClippingRect:Qre,getOffsetParent:k3,getElementRects:tie,getClientRects:Gre,getDimensions:Jre,getScale:du,isElement:pa,isRTL:nie};function O3(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iie(e,t,n){let r=null,i;const a=bo(e);function s(){var h;clearTimeout(i),(h=r)==null||h.disconnect(),r=null}function c(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),s();const m=e.getBoundingClientRect(),{left:v,top:x,width:b,height:S}=m;if(h||t(),!b||!S)return;const _=pm(x),O=pm(a.clientWidth-(v+b)),k=pm(a.clientHeight-(x+S)),T=pm(v),N={rootMargin:-_+"px "+-O+"px "+-k+"px "+-T+"px",threshold:io(0,_s(1,p))||1};let P=!0;function D(j){const R=j[0].intersectionRatio;if(!O3(m,e.getBoundingClientRect()))return c();if(R!==p){if(!P)return c();R?c(!1,R):i=setTimeout(()=>{c(!1,1e-7)},1e3)}P=!1}try{r=new IntersectionObserver(D,{...N,root:a.ownerDocument})}catch{r=new IntersectionObserver(D,N)}r.observe(e)}const u=Rr(e),f=()=>c(n);return u.addEventListener("resize",f),c(!0),()=>{u.removeEventListener("resize",f),s()}}function aie(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=lS(e),h=i||a?[...f?zd(f):[],...t?zd(t):[]]:[];h.forEach(_=>{i&&_.addEventListener("scroll",n),a&&_.addEventListener("resize",n)});const p=f&&c?iie(f,n,a):null;let m=-1,v=null;s&&(v=new ResizeObserver(_=>{let[O]=_;O&&O.target===f&&v&&t&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=v)==null||k.observe(t)})),n()}),f&&!u&&v.observe(f),t&&v.observe(t));let x,b=u?zl(e):null;u&&S();function S(){const _=zl(e);b&&!O3(b,_)&&n(),b=_,x=requestAnimationFrame(S)}return n(),()=>{var _;h.forEach(O=>{i&&O.removeEventListener("scroll",n),a&&O.removeEventListener("resize",n)}),p==null||p(),(_=v)==null||_.disconnect(),v=null,u&&cancelAnimationFrame(x)}}const oie=Dre,sie=jre,lie=Ire,cie=zre,uie=Rre,SM=Mre,fie=Lre,die=(e,t,n)=>{const r=new Map,i=n??{},a={...rie,...i.platform,_c:r};return Nre(e,t,{...i,platform:a})};var hie=typeof document<"u",pie=function(){},Um=hie?y.useLayoutEffect:pie;function yg(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!yg(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!yg(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function C3(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _M(e,t){const n=C3(e);return Math.round(t*n)/n}function yx(e){const t=y.useRef(e);return Um(()=>{t.current=e}),t}function mie(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:s}={},transform:c=!0,whileElementsMounted:u,open:f}=e,[h,p]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=y.useState(r);yg(m,r)||v(r);const[x,b]=y.useState(null),[S,_]=y.useState(null),O=y.useCallback(H=>{H!==N.current&&(N.current=H,b(H))},[]),k=y.useCallback(H=>{H!==P.current&&(P.current=H,_(H))},[]),T=a||x,C=s||S,N=y.useRef(null),P=y.useRef(null),D=y.useRef(h),j=u!=null,R=yx(u),F=yx(i),I=yx(f),G=y.useCallback(()=>{if(!N.current||!P.current)return;const H={placement:t,strategy:n,middleware:m};F.current&&(H.platform=F.current),die(N.current,P.current,H).then(K=>{const L={...K,isPositioned:I.current!==!1};V.current&&!yg(D.current,L)&&(D.current=L,Ea.flushSync(()=>{p(L)}))})},[m,t,n,F,I]);Um(()=>{f===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(H=>({...H,isPositioned:!1})))},[f]);const V=y.useRef(!1);Um(()=>(V.current=!0,()=>{V.current=!1}),[]),Um(()=>{if(T&&(N.current=T),C&&(P.current=C),T&&C){if(R.current)return R.current(T,C,G);G()}},[T,C,G,R,j]);const q=y.useMemo(()=>({reference:N,floating:P,setReference:O,setFloating:k}),[O,k]),B=y.useMemo(()=>({reference:T,floating:C}),[T,C]),Y=y.useMemo(()=>{const H={position:n,left:0,top:0};if(!B.floating)return H;const K=_M(B.floating,h.x),L=_M(B.floating,h.y);return c?{...H,transform:"translate("+K+"px, "+L+"px)",...C3(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:L}},[n,c,B.floating,h.x,h.y]);return y.useMemo(()=>({...h,update:G,refs:q,elements:B,floatingStyles:Y}),[h,G,q,B,Y])}const gie=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?SM({element:r.current,padding:i}).fn(n):{}:r?SM({element:r,padding:i}).fn(n):{}}}},vie=(e,t)=>{const n=oie(e);return{name:n.name,fn:n.fn,options:[e,t]}},yie=(e,t)=>{const n=sie(e);return{name:n.name,fn:n.fn,options:[e,t]}},bie=(e,t)=>({fn:fie(e).fn,options:[e,t]}),xie=(e,t)=>{const n=lie(e);return{name:n.name,fn:n.fn,options:[e,t]}},wie=(e,t)=>{const n=cie(e);return{name:n.name,fn:n.fn,options:[e,t]}},Eie=(e,t)=>{const n=uie(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sie=(e,t)=>{const n=gie(e);return{name:n.name,fn:n.fn,options:[e,t]}};var _ie=Object.defineProperty,cS=(e,t)=>_ie(e,"name",{value:t,configurable:!0});function qw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}cS(qw,"setRef");function T3(...e){return t=>{let n=!1;const r=e.map(i=>{const a=qw(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():qw(e[i],null)}}}}cS(T3,"composeRefs");function Rv(...e){return y.useCallback(T3(...e),e)}cS(Rv,"useComposedRefs");var Aie=Object.defineProperty,xi=(e,t)=>Aie(e,"name",{value:t,configurable:!0});function kie(e,t){const n=y.createContext(t);n.displayName=e+"Context";const r=xi(a=>{const{children:s,...c}=a,u=y.useMemo(()=>c,Object.values(c));return E.jsx(n.Provider,{value:u,children:s})},"Provider");r.displayName=e+"Provider";function i(a,s={}){const{optional:c=!1}=s,u=y.useContext(n);if(u)return u;if(t!==void 0)return t;if(!c)throw new Error(`\`${a}\` must be used within \`${e}\``)}return xi(i,"useContext"),[r,i]}xi(kie,"createContext");function N3(e,t=[]){let n=[];function r(a,s){const c=y.createContext(s);c.displayName=a+"Context";const u=n.length;n=[...n,s];const f=xi(p=>{var _;const{scope:m,children:v,...x}=p,b=((_=m==null?void 0:m[e])==null?void 0:_[u])||c,S=y.useMemo(()=>x,Object.values(x));return E.jsx(b.Provider,{value:S,children:v})},"Provider");f.displayName=a+"Provider";function h(p,m,v={}){var _;const{optional:x=!1}=v,b=((_=m==null?void 0:m[e])==null?void 0:_[u])||c,S=y.useContext(b);if(S)return S;if(s!==void 0)return s;if(!x)throw new Error(`\`${p}\` must be used within \`${a}\``)}return xi(h,"useContext"),[f,h]}xi(r,"createContext");const i=xi(()=>{const a=n.map(s=>y.createContext(s));return xi(function(c){const u=(c==null?void 0:c[e])||a;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])},"useScope")},"createScope");return i.scopeName=e,[r,M3(i,...t)]}xi(N3,"createContextScope");function M3(...e){const t=e[0];if(e.length===1)return t;const n=xi(()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return xi(function(a){const s=r.reduce((c,{useScope:u,scopeName:f})=>{const p=u(a)[`__scope${f}`];return{...c,...p}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}xi(M3,"composeContextScopes");var Oie=Object.defineProperty,Ui=(e,t)=>Oie(e,"name",{value:t,configurable:!0});function I3(e){const t=y.forwardRef((n,r)=>{let{children:i,...a}=n,s=null,c=!1;const u=[];Gw(i)&&typeof mm=="function"&&(i=mm(i._payload)),y.Children.forEach(i,m=>{var v;if(j3(m)){c=!0;const x=m;let b="child"in x.props?x.props.child:x.props.children;Gw(b)&&typeof mm=="function"&&(b=mm(b._payload)),s=Tie(x,b),u.push((v=s==null?void 0:s.props)==null?void 0:v.children)}else u.push(m)}),s?s=y.cloneElement(s,void 0,u):!c&&y.Children.count(i)===1&&y.isValidElement(i)&&(s=i);const f=s?D3(s):void 0,h=Rv(r,f);if(!s){if(i||i===0)throw new Error(c?Iie(e):Mie(e));return i}const p=P3(a,s.props??{});return s.type!==y.Fragment&&(p.ref=r?h:f),y.cloneElement(s,p)});return t.displayName=`${e}.Slot`,t}Ui(I3,"createSlot");var R3=Symbol.for("radix.slottable");function Cie(e){const t=Ui(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=R3,t}Ui(Cie,"createSlottable");var Tie=Ui((e,t)=>{if("child"in e.props){const n=e.props.child;return y.isValidElement(n)?y.cloneElement(n,void 0,e.props.children(n.props.children)):null}return y.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function P3(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...c)=>{const u=a(...c);return i(...c),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}Ui(P3,"mergeProps");function D3(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Ui(D3,"getElementRef");function j3(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===R3}Ui(j3,"isSlottable");var Nie=Symbol.for("react.lazy");function Gw(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Nie&&"_payload"in e&&L3(e._payload)}Ui(Gw,"isLazyComponent");function L3(e){return typeof e=="object"&&e!==null&&"then"in e}Ui(L3,"isPromiseLike");var Mie=Ui(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Iie=Ui(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),mm=wa[" use ".trim().toString()],Rie=Object.defineProperty,Pie=(e,t)=>Rie(e,"name",{value:t,configurable:!0}),Die=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],z3=Die.reduce((e,t)=>{const n=I3(`Primitive.${t}`),r=y.forwardRef((i,a)=>{const{asChild:s,...c}=i,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(u,{...c,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function jie(e,t){e&&Ea.flushSync(()=>e.dispatchEvent(t))}Pie(jie,"dispatchDiscreteCustomEvent");var Lie=Object.defineProperty,zie=(e,t)=>Lie(e,"name",{value:t,configurable:!0});function $3(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}zie($3,"useCallbackRef");var bx=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},$ie=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},Bie=Object.defineProperty,Uie=(e,t)=>Bie(e,"name",{value:t,configurable:!0});function B3(e){const[t,n]=y.useState(void 0);return $ie(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,c;if("borderBoxSize"in a){const u=a.borderBoxSize,f=Array.isArray(u)?u[0]:u;s=f.inlineSize,c=f.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}Uie(B3,"useSize");var Fie=Object.defineProperty,bs=(e,t)=>Fie(e,"name",{value:t,configurable:!0}),U3="Popper",[F3,H3]=N3(U3),[Hie,K3]=F3(U3),Kie=bs(e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null),[a,s]=y.useState(void 0);return E.jsx(Hie,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:s,children:n})},"Popper"),qie="PopperAnchor",Gie=y.forwardRef(bs(function(t,n){const{__scopePopper:r,virtualRef:i,...a}=t,s=K3(qie,r),c=y.useRef(null),u=s.onAnchorChange,f=y.useCallback(b=>{c.current=b,b&&u(b)},[u]),h=Rv(n,f),p=y.useRef(null);y.useEffect(()=>{if(!i)return;const b=p.current;p.current=i.current,b!==p.current&&u(p.current)});const m=s.placementState&&Pv(s.placementState),v=m==null?void 0:m[0],x=m==null?void 0:m[1];return i?null:E.jsx(z3.div,{"data-radix-popper-side":v,"data-radix-popper-align":x,...a,ref:h})},"PopperAnchor")),q3="PopperContent",[Vie,jOe]=F3(q3),Wie=y.forwardRef(bs(function(t,n){var he,Oe,we,fe,ht,qe,Ae;const{__scopePopper:r,side:i="bottom",sideOffset:a=0,align:s="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:v=!1,updatePositionStrategy:x="optimized",onPlaced:b,...S}=t,_=K3(q3,r),[O,k]=y.useState(null),T=Rv(n,k),[C,N]=y.useState(null),P=B3(C),D=(P==null?void 0:P.width)??0,j=(P==null?void 0:P.height)??0,R=i+(s!=="center"?"-"+s:""),F=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},I=Array.isArray(h)?h:[h],G=I.length>0,V={padding:F,boundary:I.filter(G3),altBoundary:G},{refs:q,floatingStyles:B,placement:Y,isPositioned:H,middlewareData:K}=mie({strategy:"fixed",placement:R,whileElementsMounted:bs((...De)=>aie(...De,{animationFrame:x==="always"}),"whileElementsMounted"),elements:{reference:_.anchor},middleware:[vie({mainAxis:a+j,alignmentAxis:c}),f&&yie({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?bie():void 0,...V}),f&&xie({...V}),wie({...V,apply:bs(({elements:De,rects:Kt,availableWidth:kn,availableHeight:zn})=>{const{width:ur,height:Oi}=Kt.reference,ni=De.floating.style;ni.setProperty("--radix-popper-available-width",`${kn}px`),ni.setProperty("--radix-popper-available-height",`${zn}px`),ni.setProperty("--radix-popper-anchor-width",`${ur}px`),ni.setProperty("--radix-popper-anchor-height",`${Oi}px`)},"apply")}),C&&Sie({element:C,padding:u}),Yie({arrowWidth:D,arrowHeight:j}),v&&Eie({strategy:"referenceHidden",...V,boundary:G?V.boundary:void 0})]}),L=_.setPlacementState;bx(()=>(L(Y),()=>{L(void 0)}),[Y,L]);const[U,Q]=Pv(Y),z=$3(b);bx(()=>{H&&(z==null||z())},[H,z]);const ce=(he=K.arrow)==null?void 0:he.x,pe=(Oe=K.arrow)==null?void 0:Oe.y,de=((we=K.arrow)==null?void 0:we.centerOffset)!==0,[Ee,Ge]=y.useState();return bx(()=>{O&&Ge(window.getComputedStyle(O).zIndex)},[O]),E.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:H?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ee,"--radix-popper-transform-origin":[(fe=K.transformOrigin)==null?void 0:fe.x,(ht=K.transformOrigin)==null?void 0:ht.y].join(" "),...((qe=K.hide)==null?void 0:qe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:E.jsx(Vie,{scope:r,placedSide:U,placedAlign:Q,onArrowChange:N,arrowX:ce,arrowY:pe,shouldHideArrow:de,children:E.jsx(z3.div,{"data-side":U,"data-align":Q,...S,ref:T,style:{...S.style,animation:H?(Ae=S.style)==null?void 0:Ae.animation:"none"}})})})},"PopperContent"));function G3(e){return e!==null}bs(G3,"isNotNull");var Yie=bs(e=>({name:"transformOrigin",options:e,fn(t){var S,_,O;const{placement:n,rects:r,middlewareData:i}=t,s=((S=i.arrow)==null?void 0:S.centerOffset)!==0,c=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[f,h]=Pv(n),p={start:"0%",center:"50%",end:"100%"}[h],m=(((_=i.arrow)==null?void 0:_.x)??0)+c/2,v=(((O=i.arrow)==null?void 0:O.y)??0)+u/2;let x="",b="";return f==="bottom"?(x=s?p:`${m}px`,b=`${-u}px`):f==="top"?(x=s?p:`${m}px`,b=`${r.floating.height+u}px`):f==="right"?(x=`${-u}px`,b=s?p:`${v}px`):f==="left"&&(x=`${r.floating.width+u}px`,b=s?p:`${v}px`),{data:{x,y:b}}}}),"transformOrigin");function Pv(e){const[t,n="center"]=e.split("-");return[t,n]}bs(Pv,"getSideAndAlignFromPlacement");var Xie=Kie,Zie=Gie,Qie=Wie,Jie=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},eae=Object.defineProperty,tae=(e,t)=>eae(e,"name",{value:t,configurable:!0}),nae=y.forwardRef(tae(function(t,n){var u;const{container:r,...i}=t,[a,s]=y.useState(!1);Jie(()=>s(!0),[]);const c=r||a&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return c?Ea.createPortal(E.jsx(kv.div,{...i,ref:n}),c):null},"Portal")),AM=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},rae=Object.defineProperty,ho=(e,t)=>rae(e,"name",{value:t,configurable:!0});function V3(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}ho(V3,"useStateMachine");var W3=ho(e=>{const{present:t,children:n}=e,r=Y3(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),a=X3(r.ref,Z3(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:a}):null},"Presence");function Y3(e){const[t,n]=y.useState(),r=y.useRef(null),i=y.useRef(e),a=y.useRef("none"),s=y.useRef(void 0),c=e?"mounted":"unmounted",[u,f]=V3(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{u==="mounted"?(a.current=s.current??tu(r.current),s.current=void 0):a.current="none"},[u]),AM(()=>{const h=r.current,p=i.current;if(p!==e){const v=a.current,x=tu(h);e?(s.current=x,f("MOUNT")):x==="none"||(h==null?void 0:h.display)==="none"?f("UNMOUNT"):f(p&&v!==x?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),AM(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,m=ho(x=>{const S=tu(r.current).includes(CSS.escape(x.animationName));if(x.target===t&&S&&(f("ANIMATION_END"),!i.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},"handleAnimationEnd"),v=ho(x=>{x.target===t&&(a.current=tu(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:y.useCallback(h=>{if(h){const p=getComputedStyle(h);r.current=p,s.current=tu(p)}else r.current=null;n(h)},[])}}ho(Y3,"usePresence");function Vw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ho(Vw,"setRef");function X3(...e){const t=y.useRef(e);return t.current=e,y.useCallback(n=>{const r=t.current;let i=!1;const a=r.map(s=>{const c=Vw(s,n);return!i&&typeof c=="function"&&(i=!0),c});if(i)return()=>{for(let s=0;s<a.length;s++){const c=a[s];typeof c=="function"?c():Vw(r[s],null)}}},[])}ho(X3,"useStableComposedRefs");function tu(e){return(e==null?void 0:e.animationName)||"none"}ho(tu,"getAnimationName");function Z3(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}ho(Z3,"getElementRef");var Q3=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},iae=Object.defineProperty,aae=(e,t)=>iae(e,"name",{value:t,configurable:!0}),kM=wa[" useEffectEvent ".trim().toString()],OM=wa[" useInsertionEffect ".trim().toString()];function J3(e){if(typeof kM=="function")return kM(e);const t=y.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof OM=="function"?OM(()=>{t.current=e}):Q3(()=>{t.current=e}),y.useMemo(()=>((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)}),[])}aae(J3,"useEffectEvent");var oae=Object.defineProperty,uh=(e,t)=>oae(e,"name",{value:t,configurable:!0}),sae=wa[" useInsertionEffect ".trim().toString()]||Q3;function e$({prop:e,defaultProp:t,onChange:n=uh(()=>{},"onChange"),caller:r}){const[i,a,s]=t$({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:i,f=y.useCallback(h=>{var p;if(c){const m=n$(h)?h(e):h;m!==e&&((p=s.current)==null||p.call(s,m))}else a(h)},[c,e,a,s]);return[u,f]}uh(e$,"useControllableState");function t$({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),i=y.useRef(n),a=y.useRef(t);return sae(()=>{a.current=t},[t]),y.useEffect(()=>{var s;i.current!==n&&((s=a.current)==null||s.call(a,n),i.current=n)},[n,i]),[n,r,a]}uh(t$,"useUncontrolledState");function n$(e){return typeof e=="function"}uh(n$,"isFunction");var CM=Symbol("RADIX:SYNC_STATE");function lae(e,t,n,r){const{prop:i,defaultProp:a,onChange:s,caller:c}=t,u=i!==void 0,f=J3(s),h=[{...n,state:a}];r&&h.push(r);const[p,m]=y.useReducer((S,_)=>{if(_.type===CM)return{...S,state:_.state};const O=e(S,_);return u&&!Object.is(O.state,S.state)&&f(O.state),O},...h),v=p.state,x=y.useRef(v);y.useEffect(()=>{x.current!==v&&(x.current=v,u||f(v))},[v,x,u]);const b=y.useMemo(()=>i!==void 0?{...p,state:i}:p,[p,i]);return y.useEffect(()=>{u&&!Object.is(i,p.state)&&m({type:CM,state:i})},[i,p.state,u]),[b,m]}uh(lae,"useControllableStateReducer");var cae=Object.defineProperty,js=(e,t)=>cae(e,"name",{value:t,configurable:!0}),uS="Popover",[r$,LOe]=e3(uS,[H3]),fS=H3(),[uae,Uu]=r$(uS),fae=js(e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,c=fS(t),u=y.useRef(null),[f,h]=y.useState(!1),[p,m]=e$({prop:r,defaultProp:i??!1,onChange:a,caller:uS});return E.jsx(Xie,{...c,children:E.jsx(uae,{scope:t,contentId:v3(),triggerRef:u,open:p,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(v=>!v),[m]),hasCustomAnchor:f,onCustomAnchorAdd:y.useCallback(()=>h(!0),[]),onCustomAnchorRemove:y.useCallback(()=>h(!1),[]),modal:s,children:n})})},"Popover"),dae="PopoverTrigger",hae=y.forwardRef(js(function(t,n){const{__scopePopover:r,...i}=t,a=Uu(dae,r),s=fS(r),c=zu(n,a.triggerRef),u=E.jsx(kv.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":dS(a.open),...i,ref:c,onClick:ys(t.onClick,a.onOpenToggle)});return a.hasCustomAnchor?u:E.jsx(Zie,{asChild:!0,...s,children:u})},"PopoverTrigger")),i$="PopoverPortal",[pae,mae]=r$(i$,{forceMount:void 0}),gae=js(e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Uu(i$,t);return E.jsx(pae,{scope:t,forceMount:n,children:E.jsx(W3,{present:n||a.open,children:E.jsx(nae,{asChild:!0,container:i,children:r})})})},"PopoverPortal"),$d="PopoverContent",vae=y.forwardRef(js(function(t,n){const r=mae($d,t.__scopePopover),{forceMount:i=r.forceMount,...a}=t,s=Uu($d,t.__scopePopover);return E.jsx(W3,{present:i||s.open,children:s.modal?E.jsx(bae,{...a,ref:n}):E.jsx(xae,{...a,ref:n})})},"PopoverContent")),yae=QE("PopoverContent.RemoveScroll"),bae=y.forwardRef(js(function(t,n){const r=Uu($d,t.__scopePopover),i=y.useRef(null),a=zu(n,i),s=y.useRef(!1);return y.useEffect(()=>{const c=i.current;if(c)return Pz(c)},[]),E.jsx(qE,{as:yae,allowPinchZoom:!0,children:E.jsx(a$,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ys(t.onCloseAutoFocus,c=>{var u;c.preventDefault(),s.current||(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:ys(t.onPointerDownOutside,c=>{const u=c.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,h=u.button===2||f;s.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:ys(t.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),xae=y.forwardRef(js(function(t,n){const r=Uu($d,t.__scopePopover),i=y.useRef(!1),a=y.useRef(!1);return E.jsx(a$,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,u;(c=t.onCloseAutoFocus)==null||c.call(t,s),s.defaultPrevented||(i.current||(u=r.triggerRef.current)==null||u.focus(),s.preventDefault()),i.current=!1,a.current=!1},onInteractOutside:s=>{var f,h;(f=t.onInteractOutside)==null||f.call(t,s),s.defaultPrevented||(i.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=s.target;((h=r.triggerRef.current)==null?void 0:h.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})},"PopoverContentNonModal")),a$=y.forwardRef(js(function(t,n){const{__scopePopover:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onInteractOutside:p,...m}=t,v=Uu($d,r),x=fS(r);return tS(),E.jsx(hre,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:s,children:E.jsx(are,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:p,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:h,onDismiss:()=>v.onOpenChange(!1),deferPointerDownOutside:!0,children:E.jsx(Qie,{"data-state":dS(v.open),role:"dialog",id:v.contentId,...x,...m,ref:n,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function dS(e){return e?"open":"closed"}js(dS,"getState");var wae=fae,Eae=hae,Sae=gae,o$=vae;const _ae=wae,Aae=Eae,s$=y.forwardRef(({className:e,align:t="start",side:n="top",sideOffset:r=8,collisionPadding:i=8,...a},s)=>E.jsx(Sae,{children:E.jsx(o$,{ref:s,align:t,side:n,sideOffset:r,collisionPadding:i,className:He("z-50 w-64 max-w-[calc(100vw-1rem)] rounded-md border bg-card p-3 text-card-foreground shadow-md outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...a})}));s$.displayName=o$.displayName;const l$=92,c$=96;function xx(e){if(!Number.isFinite(e)||e<0)return"?";const t=["B","KB","MB","GB","TB","PB"];let n=0;for(;e>=1024&&n<t.length-1;)e/=1024,n++;return`${e<10&&n>0?e.toFixed(1):Math.round(e)} ${t[n]}`}const TM=3e5;function kae({socket:e,getToken:t}){const[n,r]=y.useState([]);if(y.useEffect(()=>{t().then(a=>a?fetch("/api/stats",{headers:{Authorization:`Bearer ${a}`}}):null).then(a=>a==null?void 0:a.json()).then(a=>(a==null?void 0:a.samples)&&r(a.samples)).catch(a=>console.warn("[MachineStats] seed failed",a))},[t]),y.useEffect(()=>{if(!e)return;const a=e.on(s=>{s.type==="stats"&&r(c=>[...c,s.sample].slice(-120))});return()=>{a()}},[e]),!n.length)return null;const i=n[n.length-1];return E.jsxs("div",{className:"w-full flex flex-wrap items-center justify-center gap-x-2 gap-y-0.5 text-[10px] text-muted-foreground/60",children:[E.jsx(Fm,{label:"cpu",value:i.cpu,series:n.map(a=>a.cpu)}),E.jsx(Fm,{label:"mem",value:i.mem,series:n.map(a=>a.mem)}),i.disk>=0&&E.jsx(Fm,{label:"disk",value:i.disk,severity:Pae(i.disk),title:jae(i)}),E.jsx(Oae,{getToken:t})]})}function Oae({getToken:e}){const[t,n]=y.useState(null);return y.useEffect(()=>{let r=!0,i=0;const a=async()=>{var f;try{const h=await e();if(!h)return;i=Date.now();const p=await fetch("/api/claude-usage",{headers:{Authorization:`Bearer ${h}`}});if(!r)return;if(p.status===204){n(null);return}if(p.status!==200)return;const m=await p.json();if(!r||!((f=m==null?void 0:m.limits)!=null&&f.length))return;n(m)}catch(h){console.warn("[MachineStats] claude usage poll failed",h)}},s=()=>{document.visibilityState==="visible"&&a()},c=()=>{document.visibilityState==="visible"&&Date.now()-i>=TM&&a()};s();const u=setInterval(s,TM);return document.addEventListener("visibilitychange",c),()=>{r=!1,clearInterval(u),document.removeEventListener("visibilitychange",c)}},[e]),E.jsx(Cae,{usage:t})}function Cae({usage:e}){const t=e&&u$(e.limits),[n,r]=y.useState(Ww),i=y.useRef(null),a=()=>{i.current&&(clearTimeout(i.current),i.current=null)},s=y.useCallback((c,u=0)=>{if(a(),!u){r(f=>MM(f,c));return}i.current=setTimeout(()=>{i.current=null,r(f=>MM(f,c))},u)},[]);return y.useEffect(()=>a,[]),!e||!t?null:E.jsxs(_ae,{open:n.open,onOpenChange:c=>s(c?{type:"activate"}:{type:"dismiss"}),children:[E.jsx(Aae,{asChild:!0,children:E.jsx("button",{type:"button","aria-label":"claude usage breakdown",className:"cursor-default rounded-sm outline-none focus-visible:ring-1 focus-visible:ring-ring",onPointerEnter:c=>s({type:"pointerenter",pointerType:c.pointerType},Tae),onPointerLeave:c=>s({type:"pointerleave",pointerType:c.pointerType},NM),children:E.jsx(Fm,{label:"usage",value:t.percent,severity:t.severity})})}),E.jsx(s$,{onOpenAutoFocus:c=>c.preventDefault(),onPointerEnter:()=>a(),onPointerLeave:c=>s({type:"pointerleave",pointerType:c.pointerType},NM),children:E.jsx(Nae,{usage:e})})]})}const Tae=120,NM=80,Ww={open:!1,byHover:!1};function MM(e,t){switch(t.type){case"pointerenter":return IM(t.pointerType)?{open:!0,byHover:!0}:e;case"pointerleave":return IM(t.pointerType)&&e.byHover?Ww:e;case"activate":return{open:!0,byHover:!1};case"dismiss":return Ww}}const IM=e=>e==="mouse"||e==="";function Nae({usage:e}){const t=u$(e.limits);return E.jsxs("div",{className:"text-[11px] leading-tight",children:[E.jsxs("div",{className:"flex items-baseline justify-between gap-2 pb-2 text-muted-foreground",children:[E.jsx("span",{className:"uppercase tracking-wide",children:"claude usage"}),e.subscriptionType&&E.jsxs("span",{className:"tabular-nums",children:[e.subscriptionType," plan"]})]}),E.jsxs("div",{className:"-mt-1 flex items-baseline justify-between gap-2 pb-2 text-[10px] text-muted-foreground",children:[e.account&&E.jsx("span",{className:"truncate",title:e.account,children:e.account}),E.jsx("span",{className:"shrink-0",children:Iae(e)})]}),E.jsx("div",{className:"flex flex-col gap-3",children:e.limits.map((n,r)=>{const i=Yz(n.resetsAt),a=n===t;return E.jsxs("div",{"data-headline":a||void 0,className:He("flex flex-col gap-1",!a&&"opacity-60"),children:[E.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[E.jsxs("span",{className:He("truncate",a&&"font-medium"),children:[a&&E.jsx("span",{className:"mr-1 text-muted-foreground","aria-hidden":!0,children:"▸"}),Mae(n)]}),E.jsxs("span",{className:He("tabular-nums shrink-0",Yw(n.percent,n.severity)),children:[n.percent,"%"]})]}),E.jsx(f$,{value:n.percent,className:He("w-full",Yw(n.percent,n.severity))}),E.jsx("span",{className:"text-[10px] text-muted-foreground",children:i?`resets in ${i}`:"no reset reported"})]},`${n.kind}-${r}`)})}),E.jsx("div",{className:"mt-3 border-t pt-2 text-[10px] text-muted-foreground",children:"▸ is the window the strip is showing"})]})}function Mae(e){return e.scopeLabel?`${e.scopeLabel} window`:e.kind==="session"?"current session":e.kind==="weekly_all"?"all models":e.kind.replace(/_/g," ")}function u$(e){return e.reduce((t,n)=>!t||n.percent>t.percent?n:t,null)}function Iae(e){const t=Rae(e.fetchedAt);return t?e.stale?`${t} old — refresh failed`:`updated ${t} ago`:e.stale?"last reading — refresh failed":"updated just now"}function Rae(e){if(!e)return null;const t=Date.now()-new Date(e).getTime();if(!Number.isFinite(t))return null;const n=Math.round(Math.max(0,t)/6e4);if(n<1)return null;if(n<60)return`${n}m`;const r=Math.floor(n/60),i=n%60;return r<24?i?`${r}h ${i}m`:`${r}h`:`${Math.floor(r/24)}d`}function Pae(e){return e>=c$?"critical":e>=l$?"warning":"ok"}const Dae={critical:"text-red-500",exceeded:"text-red-500",warning:"text-amber-500",warn:"text-amber-500",ok:"text-emerald-500"};function Yw(e,t){const n=t?Dae[t]:void 0;return n||(e>=90?"text-red-500":e>=75?"text-amber-500":"text-emerald-500")}function jae(e){const t=`warn at ${l$}%, critical at ${c$}%`;if(e.diskUsedBytes==null||e.diskTotalBytes==null)return`disk ${e.disk}% used — ${t}`;const n=Math.max(0,e.diskTotalBytes-e.diskUsedBytes);return`disk ${e.disk}% used — ${xx(e.diskUsedBytes)} of ${xx(e.diskTotalBytes)}, ${xx(n)} free — ${t}`}function Fm({label:e,value:t,series:n,title:r,severity:i}){const a=Yw(t,i),s=r??(n?`${e} ${t}% — last ${n.length} samples`:void 0);return E.jsxs("span",{className:"flex items-center gap-1",title:s,children:[E.jsx("span",{className:"uppercase tracking-wide",children:e}),n?E.jsx(Lae,{series:n,className:a}):E.jsx(f$,{value:t,className:a}),E.jsxs("span",{className:He("tabular-nums",a),children:[t,"%"]})]})}function f$({value:e,className:t}){const i=Math.max(0,Math.min(100,e))/100*40;return E.jsxs("svg",{width:40,height:12,viewBox:"0 0 40 12",className:He("overflow-visible",t),preserveAspectRatio:"none",children:[E.jsx("rect",{x:0,y:12/2-2,width:40,height:4,rx:2,fill:"currentColor",opacity:.2}),i>0&&E.jsx("rect",{x:0,y:12/2-2,width:i,height:4,rx:2,fill:"currentColor"})]})}function Lae({series:e,className:t}){const i=e.length;if(i<2)return null;const a=e.map((s,c)=>{const u=i>1?c/(i-1)*40:0,f=12-Math.max(0,Math.min(100,s))/100*12;return`${u.toFixed(1)},${f.toFixed(1)}`}).join(" ");return E.jsx("svg",{width:40,height:12,viewBox:"0 0 40 12",className:He("overflow-visible",t),preserveAspectRatio:"none",children:E.jsx("polyline",{points:a,fill:"none",stroke:"currentColor",strokeWidth:1,strokeLinejoin:"round",strokeLinecap:"round"})})}const id=50;function zae({getToken:e,filter:t,refreshKey:n,hydrateIds:r}){const[i,a]=y.useState([]),[s,c]=y.useState(null),[u,f]=y.useState(!1),[h,p]=y.useState({}),m=y.useRef(new Set),v=y.useRef(null),x=y.useRef(null),b=y.useRef(t);b.current=t;const S=y.useRef(id),_=y.useRef(t);_.current!==t&&(_.current=t,S.current=id);const O=y.useCallback(async(P,D)=>{const j=await e();if(!j||D!=null&&D.aborted)return null;const R=await fetch(`/api/sessions?${new URLSearchParams(P)}`,{signal:D,headers:{Authorization:`Bearer ${j}`}});if(!R.ok)return null;const F=await R.json();return Array.isArray(F==null?void 0:F.sessions)?F:null},[e]),k=y.useCallback(async(P,D,j)=>{const R=[];let F,I=null;for(;R.length<P;){const G={filter:D,limit:String(Math.min(id,P-R.length))};F&&(G.before=F);const V=await O(G,j);if(!V)return null;if(R.push(...V.sessions),I=V.nextCursor,!I||!V.sessions.length)break;F=I}return{sessions:R,nextCursor:I}},[O]);y.useEffect(()=>{var D,j;(D=v.current)==null||D.abort(),(j=x.current)==null||j.abort();const P=new AbortController;return v.current=P,f(!0),m.current.clear(),p({}),k(S.current,t,P.signal).then(R=>{!R||P.signal.aborted||(a(R.sessions),c(R.nextCursor))}).catch(()=>{}).finally(()=>{P.signal.aborted||f(!1)}),()=>P.abort()},[k,t,n]);const T=y.useCallback(()=>{var j;if(!s||u)return;(j=x.current)==null||j.abort();const P=new AbortController;x.current=P;const D=b.current;f(!0),O({filter:D,limit:String(id),before:s},P.signal).then(R=>{!R||P.signal.aborted||D!==b.current||(a(F=>{const I=new Set(F.map(V=>V.sessionId)),G=[...F,...R.sessions.filter(V=>!I.has(V.sessionId))];return S.current=Math.max(id,G.length),G}),c(R.nextCursor))}).catch(()=>{}).finally(()=>{P.signal.aborted||f(!1)})},[s,u,O]),C=y.useMemo(()=>{const P=new Map;for(const D of Object.values(h))P.set(D.sessionId,D);for(const D of i)P.set(D.sessionId,D);return P},[i,h]),N=r.join(",");return y.useEffect(()=>{const P=r.filter(j=>!!j&&!C.has(j)&&!m.current.has(j)).slice(0,200);if(!P.length)return;for(const j of P)m.current.add(j);let D=!1;return O({ids:P.join(",")}).then(j=>{!j||D||p(R=>{const F={...R};for(const I of j.sessions)F[I.sessionId]=I;return F})}).catch(()=>{}),()=>{D=!0}},[N,C,O]),{sessions:i,cursor:s,loading:u,byId:C,loadMore:T}}const ad="0.1.101";function $ae(e){const t=Date.now()-e,n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);if(r<24)return`${r}h ago`;const i=Math.floor(r/24);return i<7?`${i}d ago`:new Date(e).toLocaleDateString(void 0,{month:"short",day:"numeric"})}const od="w-4 h-4 mt-0.5 shrink-0";function Bae(e){const t=e.slackContext;return(t==null?void 0:t.type)==="dm"?E.jsx(oG,{className:`${od} text-purple-400`}):(t==null?void 0:t.type)==="mention"?E.jsx(Wq,{className:`${od} text-blue-400`}):(t==null?void 0:t.type)==="channel"?E.jsx(tG,{className:`${od} text-green-400`}):e.sessionId.startsWith("slack-")?E.jsx(bw,{className:`${od} text-yellow-400`}):E.jsx(bw,{className:`${od} text-muted-foreground`})}function Uae(e){const t=e.slackContext;return(t==null?void 0:t.type)==="dm"?`DM${t.userName?` · ${t.userName}`:""}`:(t==null?void 0:t.type)==="mention"?`@mention${t.channelName?` · #${t.channelName}`:""}`:(t==null?void 0:t.type)==="channel"?`#${t.channelName||"channel"}`:e.sessionId.startsWith("slack-")?"Slack":null}function Fae(e,t,n){return Object.keys(e).map(r=>t.get(r)).filter(r=>!!r&&(n==="all"||r.mine!==!1))}const RM="chats-filter",PM="chats-unread-filter";function Hae({getToken:e,activeSessionId:t,onSelect:n,onNew:r,refreshKey:i,workspaceRefreshKey:a,onRefreshWorkspace:s,unreads:c={},busySessions:u=new Set,socket:f}){var H;const h=Sa(),[p,m]=y.useState(()=>localStorage.getItem(RM)||"mine"),[v,x]=y.useState(()=>localStorage.getItem(PM)==="true"),[b,S]=y.useState(""),_=y.useRef(null);function O(K){m(K),localStorage.setItem(RM,K)}function k(){const K=!v;x(K),localStorage.setItem(PM,String(K))}const T=y.useMemo(()=>[t,...Object.keys(c)].filter(K=>!!K),[t,c]),{sessions:C,cursor:N,loading:P,byId:D,loadMore:j}=zae({getToken:e,filter:p,refreshKey:i,hydrateIds:T}),R=y.useMemo(()=>Fae(c,D,p),[c,D,p]),F=R.length,I=y.useMemo(()=>v?[...R].sort((K,L)=>L.lastModified-K.lastModified):C,[v,R,C]),G=t&&!I.some(K=>K.sessionId===t)?D.get(t):void 0;y.useEffect(()=>{_.current&&_.current.scrollIntoView({block:"nearest"})},[t,I,G]);const V=y.useRef(null),q=y.useRef(j);q.current=j,y.useEffect(()=>{const K=V.current;if(!K||!N||v)return;const L=new IntersectionObserver(U=>{U.some(Q=>Q.isIntersecting)&&q.current()},{rootMargin:"300px"});return L.observe(K),()=>L.disconnect()},[N,P,v]),y.useEffect(()=>{e().then(K=>K?fetch("/api/version",{headers:{Authorization:`Bearer ${K}`}}):null).then(K=>K==null?void 0:K.json()).then(K=>K&&S(K.version)).catch(()=>{})},[]);const B=!!b&&b!=="unknown"&&ad!=="dev"&&b!==ad;y.useEffect(()=>{B&&console.warn(`[shraga] stale client bundle: built from v${ad}, server runs v${b} — rebuild dist/client`)},[B,b]);function Y(K){const L=c[K.sessionId],U=u.has(K.sessionId)||K.runStatus==="running"||K.scheduleRunStatus==="running",Q=!U&&(!!K.lastStopReason||K.scheduleRunStatus==="error"||K.scheduleRunStatus==="aborted"),z=U?"border-amber-500":Q?"border-red-500":L?"border-blue-500":"",ce=!!(U||Q||L);return E.jsx("button",{ref:K.sessionId===t?_:void 0,onClick:()=>n(K.sessionId,K.title),className:He("w-full text-left px-3 py-2.5 text-sm transition-colors hover:bg-accent/50 group",ce?`rounded-r-lg border-l-[3px] ${z}`:"rounded-lg",t===K.sessionId&&"bg-accent"),children:E.jsxs("div",{className:"flex items-start gap-2",children:[Bae(K),E.jsxs("div",{className:"min-w-0 flex-1",children:[E.jsx("span",{className:He("block truncate text-sm leading-snug",L&&"font-semibold"),children:K.title||"New session"}),E.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[E.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:Uae(K)||K.userName}),E.jsx("span",{className:"text-[10px] text-muted-foreground/50",children:"·"}),E.jsx("span",{className:"text-[10px] text-muted-foreground",children:$ae(K.lastModified)})]})]})]})},K.sessionId)}return E.jsxs("div",{className:"flex flex-col h-full bg-muted/30",children:[E.jsx("div",{className:"p-3",children:E.jsxs(Re,{variant:"outline",size:"sm",className:"w-full gap-2 justify-start",onClick:r,title:"New Chat (Ctrl+N)",children:[E.jsx(gv,{className:"w-4 h-4"})," New Chat",E.jsx("span",{className:"ml-auto flex items-center gap-0.5 text-[10px] text-muted-foreground/50 font-mono",children:"⌃N"})]})}),E.jsx("div",{className:"border-b shrink-0 flex flex-col max-h-[40vh]",children:E.jsx(jne,{getToken:e,onRefresh:s,refreshKey:a})}),E.jsxs("div",{className:"flex items-center justify-between px-3 pt-2 pb-1",children:[E.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Chats"}),E.jsxs("div",{className:"flex gap-0.5",children:[["mine","all"].map(K=>E.jsx("button",{onClick:()=>O(K),className:He("text-[10px] px-1.5 rounded-full transition-colors capitalize leading-none",p===K?"text-foreground font-medium":"text-muted-foreground/60 hover:text-muted-foreground"),children:K},K)),E.jsxs("button",{onClick:k,className:He("text-[10px] px-1.5 rounded-full transition-colors leading-none",v?"text-blue-600 dark:text-blue-400 font-medium":"text-muted-foreground/60 hover:text-muted-foreground"),children:["unread",F>0&&E.jsx("span",{className:"inline-block w-1.5 h-1.5 ml-1 rounded-full bg-blue-500 align-middle"})]})]})]}),E.jsx(qj,{className:"flex-1",children:E.jsxs("div",{className:"px-2 pb-2 space-y-0.5",children:[I.length===0&&!G&&E.jsx("p",{className:"text-xs text-muted-foreground px-3 py-6 text-center",children:P?"Loading…":v?"No unread conversations":"No conversations yet"}),G&&Y(G),I.map(Y),!v&&N&&E.jsx("div",{ref:V,className:"py-3 text-center text-[11px] text-muted-foreground/60",children:P?"Loading older…":"···"})]})}),E.jsxs("div",{className:"px-4 py-2 flex flex-col items-center gap-1",children:[E.jsx(kae,{socket:f??null,getToken:e}),(H=h.sidebarExtras)==null?void 0:H.call(h),b&&(B?E.jsxs("button",{onClick:()=>location.reload(),title:`This page was built from v${ad}, the server runs v${b} — reload to update`,className:"text-[10px] text-amber-400 hover:text-amber-300 text-center underline decoration-dotted",children:["⚠️ stale page (v",ad," → v",b,") · reload"]}):E.jsxs("div",{className:"text-[10px] text-muted-foreground/50 text-center",children:["v",b]}))]})]})}function Vr(e,t){const n=e[e.length-1];if((n==null?void 0:n.role)==="assistant"){if(t.type==="text"||t.type==="thinking"){const r=[...n.blocks],i=r[r.length-1];return(i==null?void 0:i.type)===t.type?(r[r.length-1]={...i,text:i.text+t.text},[...e.slice(0,-1),{...n,blocks:r}]):[...e.slice(0,-1),{...n,blocks:[...r,t]}]}return[...e.slice(0,-1),{...n,blocks:[...n.blocks,t]}]}return[...e,{id:ms(),role:"assistant",blocks:[t]}]}function DM(e,t,n="text"){const r=e[e.length-1],i={type:n,text:t};return(r==null?void 0:r.role)==="assistant"?[...e.slice(0,-1),{...r,blocks:[...r.blocks,i]}]:[...e,{id:ms(),role:"assistant",blocks:[i]}]}function d$(e,t,n){for(let r=e.length-1;r>=0;r--){const i=e[r];if(i.role!=="assistant")continue;const a=i.blocks.findIndex(c=>c.type==="tool_use"&&c.toolUseId===t);if(a===-1)continue;const s=[...i.blocks];return s[a]={...s[a],input:n},[...e.slice(0,r),{...i,blocks:s},...e.slice(r+1)]}return e}function Kae(e,t){const[n,r]=y.useState([]),[i,a]=y.useState(!1),[s,c]=y.useState([]),u=y.useRef(t.initialSessionId),f=y.useRef(!1),h=y.useRef(s);h.current=s;const p=y.useRef(t.getToken);p.current=t.getToken;const m=y.useRef(t.onNewSession);m.current=t.onNewSession;const v=y.useRef(t.onDirectivesChanged);v.current=t.onDirectivesChanged;const x=y.useRef(t.onParticipantsChanged);x.current=t.onParticipantsChanged;const b=y.useRef(t.onEvent);b.current=t.onEvent;const S=y.useRef(e);S.current=e;const _=y.useCallback(I=>I!=null&&I===u.current,[]),O=y.useCallback(async()=>{var G;const I=u.current;if(I)try{const q=await(await bl(`/api/sessions/${I}/messages`,p.current)).json();r(wj(q)),a(!!q.busy),(G=x.current)==null||G.call(x,Array.isArray(q.participants)&&q.participants.length>1)}catch{}},[]);y.useEffect(()=>{if(!e)return;const I=e.on(G=>{var q,B,Y,H,K,L;(q=b.current)==null||q.call(b,G);const V=G;if(V.type==="compact_marker")return _(V.sessionId)?r(U=>[...U,{id:ms(),role:"assistant",blocks:[{type:"compact_marker",summary:V.summary??"",compactedCount:V.compactedCount??0}]}]):void 0;switch(G.type){case"thinking_delta":return _(G.sessionId)?r(U=>Vr(U,{type:"thinking",text:G.text})):void 0;case"text_delta":return _(G.sessionId)?r(U=>Vr(U,{type:"text",text:G.text})):void 0;case"tool_use":return _(G.sessionId)?r(U=>Vr(U,{type:"tool_use",tool:G.tool,toolUseId:G.toolUseId,input:G.input})):void 0;case"tool_use_input":return _(G.sessionId)?r(U=>d$(U,G.toolUseId,G.input)):void 0;case"tool_result":return _(G.sessionId)?r(U=>Vr(U,{type:"tool_result",toolUseId:G.toolUseId,output:G.output})):void 0;case"tool_result_image":return _(G.sessionId)?r(U=>Vr(U,{type:"image",src:G.dataUrl})):void 0;case"permission_request":return _(G.sessionId)?r(U=>Vr(U,{type:"permission_request",id:G.id,tool:G.tool,input:G.input})):void 0;case"question_request":return _(G.sessionId)?r(U=>Vr(U,{type:"question_request",id:G.id,questions:G.questions})):void 0;case"directives":return f.current?(B=v.current)==null?void 0:B.call(v,G.directives):void 0;case"session_id":return!f.current||u.current?void 0:(u.current=G.sessionId,(Y=m.current)==null?void 0:Y.call(m,G.sessionId));case"forked":return G.sourceSessionId!==u.current?void 0:(u.current=G.sessionId,(H=m.current)==null?void 0:H.call(m,G.sessionId));case"session_busy":G.sessionId===u.current&&a(G.busy);return;case"session_stream":return G.sessionId!==u.current?void 0:qae(r,G.event);case"session_messages_changed":G.sessionId===u.current&&O();return;case"done":{if(G.sessionId!==u.current)return;G.stopReason==="max_turns_reached"&&r(Q=>Vr(Q,{type:"text",text:`
1848
1848
 
1849
1849
  ---
1850
1850
  ⚠️ Reached the maximum number of steps for this turn. Send "continue" to pick up where I left off.`})),(K=m.current)==null||K.call(m,G.sessionId);const U=h.current;if(U.length>0){const Q=U.join(`
@@ -13,8 +13,8 @@
13
13
  <link rel="preconnect" href="https://fonts.googleapis.com" />
14
14
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
15
15
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet" />
16
- <script type="module" crossorigin src="/assets/index-N-aqowqg.js"></script>
17
- <link rel="stylesheet" crossorigin href="/assets/index-DlgCLI89.css">
16
+ <script type="module" crossorigin src="/assets/index-DWt6xZV9.js"></script>
17
+ <link rel="stylesheet" crossorigin href="/assets/index-CibL2gLy.css">
18
18
  </head>
19
19
  <body>
20
20
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shraga",
3
- "version": "0.1.100",
3
+ "version": "0.1.101",
4
4
  "description": "The teammate you delegate coding to — a self-hostable, multi-user AI coding agent web UI (Claude Code, with a pluggable engine seam).",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -41,7 +41,7 @@ export function deriveRuntimeBadges(input: {
41
41
  // A recorded model is ground truth about the MODEL whether or not an engine was recorded beside
42
42
  // it, so it is never dropped — dropping it made the UI report the REQUESTED runtime for a turn
43
43
  // that had already run, the one claim this must never make. What a lone model cannot do is name
44
- // the engine: an id is bare or prefixed by PROVIDER, and a provider is not an engine (agentx runs
44
+ // the engine: an id is bare or prefixed by PROVIDER, and a provider is not an engine (an add-on engine runs
45
45
  // anthropic models). So with no `lastEngine`, the engine stays unknown rather than guessed.
46
46
  const engine = provenance === 'ran' ? input.actualEngine! : provenance === 'pending' ? requestedEngine : undefined;
47
47
  const rawModel =
@@ -91,7 +91,7 @@ function RuntimePicker({ prompt, onChange, getToken }: { prompt: string; onChang
91
91
  const engineListed = listed(sel.engine, engines.map((e) => e.name));
92
92
  // Only an engine the directive NAMES is carried forward. An inferred one belongs to the model it
93
93
  // was inferred from: re-emitting it while the user picks another engine's model would silently
94
- // pin a pairing nobody chose (agentx running a claude-code model).
94
+ // pin a pairing nobody chose (one engine running another engine's model).
95
95
  const set = (next: { engine?: string; model?: string }) =>
96
96
  onChange(writeRuntimeDirective(prompt, { engine: sel.engineExplicit ? sel.engine : undefined, model: sel.model, ...next }));
97
97
  const selectClass = 'h-8 rounded-md border border-input bg-background px-2 text-xs';
@@ -19,7 +19,7 @@ export interface EngineInfo {
19
19
  *
20
20
  * It also installs the model resolver the directive parser uses, seeded from the same response.
21
21
  * Without it the client reads `[composer-2.5]` as prose while the server reads it as a model on
22
- * the agentx engine — and an editor that disagrees with the parser corrupts what it rewrites.
22
+ * an add-on engine — and an editor that disagrees with the parser corrupts what it rewrites.
23
23
  */
24
24
  // One process-wide registry cache behind one resolver installed at import time. Per-hook install/
25
25
  // teardown would let one component's unmount clear the resolver another is still parsing with.
@@ -54,7 +54,7 @@ export function writeRuntimeDirective(text: string, sel: RuntimeSelection): stri
54
54
  }
55
55
  }
56
56
  // An engine the chosen model already implies is not written: `[model:cursor/composer-2.5]` and
57
- // `[engine:agentx,model:cursor/composer-2.5]` mean the same thing to the parser, and emitting the
57
+ // `[engine:ext-agent,model:cursor/composer-2.5]` mean the same thing to the parser, and emitting the
58
58
  // longer one would stamp a pin the user never chose onto every schedule that carries a model-only
59
59
  // directive (11 of the 15 live ones) the moment the picker is touched.
60
60
  const impliedEngine = sel.model ? resolveModelAlias(sel.model)?.engine : undefined;
@@ -6,10 +6,10 @@
6
6
  // polling is not the fix; something has to WAKE the session when the process exits.
7
7
  //
8
8
  // Shape:
9
- // • The registry is owned by the SERVER (module singleton), not by the turn. agentx builds a fresh
9
+ // • The registry is owned by the SERVER (module singleton), not by the turn. An add-on engine builds a fresh
10
10
  // `Agent` per turn, so a registry created there would die with the turn — the very failure above.
11
11
  // Hosts hand each turn a thin per-session VIEW (`sessionJobRegistry`) over this one store; the
12
- // view is duck-compatible with agentx's `ShellJobRegistry`, so `Shell({background:true})` and the
12
+ // view is duck-compatible with the add-on engine's `ShellJobRegistry`, so `Shell({background:true})` and the
13
13
  // ShellOutput/ShellStatus/ShellKill tools light up with no folklore `nohup`.
14
14
  // • On exit we report through wake.ts — the same "close then report" path polls.ts already uses in
15
15
  // production, so a job outcome lands wherever the session speaks (Slack thread / web UI).
@@ -193,10 +193,10 @@ function pidAgeSeconds(pid: number): number | null {
193
193
  /**
194
194
  * Env for a job's shell: the server's own, minus anything that looks like a credential.
195
195
  *
196
- * agentx's foreground `Bash` redacts these by default (RealShellOptions.redactEnv). Backgrounding a
196
+ * An add-on engine's foreground `Bash` redacts these by default (RealShellOptions.redactEnv). Backgrounding a
197
197
  * command must not be a way around that — otherwise `Bash({background:true})` becomes a strictly
198
198
  * weaker sandbox than `Bash({})`, and `echo $ANTHROPIC_API_KEY` lands in a job log we then feed back
199
- * into the model. Mirrors agentx's SECRET_ENV_RE; a job that genuinely needs a credential gets it
199
+ * into the model. Mirrors the add-on engine's SECRET_ENV_RE; a job that genuinely needs a credential gets it
200
200
  * explicitly via `JobOwner.env`.
201
201
  */
202
202
  const SECRET_ENV_RE = /(API_KEY|_TOKEN|_SECRET|_PASSWORD|_PRIVATE_KEY|^AWS_|^GITHUB_TOKEN$|^OPENAI_|^ANTHROPIC_|^GOOGLE_|^GEMINI_|^GROQ_|^NPM_TOKEN$|^SLACK_)/i;
@@ -519,7 +519,7 @@ function pruneOld(): void {
519
519
  // ── The per-turn view handed to the agent engine ───────────────────────────────
520
520
 
521
521
  /**
522
- * A session-scoped facade over the process-wide store, duck-compatible with agentx's
522
+ * A session-scoped facade over the process-wide store, duck-compatible with the add-on engine's
523
523
  * `ShellJobRegistry` — pass it as `makeRealShellTool({ registry })` and to `makeShellJobTools`.
524
524
  *
525
525
  * Cheap to build per turn (it holds no state); the jobs it starts belong to the server, so they
@@ -38,7 +38,7 @@ const DIRECTIVE_KEYS = ['model', 'turns', 'thinking', 'think', 'effort', 'engine
38
38
  const isQualifiedModel = (v: string) => /^[a-z0-9._-]+\/[a-z0-9./_-]+$/.test(v);
39
39
 
40
40
  /** Resolves a model token the alias table doesn't know against the REGISTERED engines' own model
41
- * lists, and reports which engine owns it. Without this, `[composer-2.5]` (an agentx model) was
41
+ * lists, and reports which engine owns it. Without this, `[composer-2.5]` (an add-on engine's model) was
42
42
  * warned about and dropped, so the turn silently ran on the previous engine/model. Injected by
43
43
  * `initEngines()` — directives.ts stays pure and dependency-free for CE and for tests. */
44
44
  export type ModelResolver = (token: string) => { model: string; engine?: string } | null;
@@ -70,7 +70,7 @@ export function resolveAndGetEngine(directives?: { engine?: string }, agentConfi
70
70
  const name = resolveEngine(directives, agentConfig);
71
71
  // An optional engine may be unregistered on a given boot (add-on not loaded, missing API key or
72
72
  // failed init). Rerouting to claude-code here silently switched PROVIDER AND BILLING under the
73
- // caller — a cursor/agentx run billed Anthropic while the UI still showed the cursor chips. Fail
73
+ // caller — an add-on engine's run billed Anthropic while the UI still showed the cursor chips. Fail
74
74
  // loudly instead; the degradation is surfaced to whoever asked (user, schedule) as a turn error.
75
75
  if (!hasEngine(name)) throw new EngineUnavailableError(name, getAvailableEngines());
76
76
  return getEngine(name);
@@ -4,7 +4,7 @@
4
4
  * `kickstart -k` starts the replacement while the old process drains (up to 90s), so the new one
5
5
  * meets EADDRINUSE. Exiting immediately hands the problem to the service manager — which respawns
6
6
  * on a ~10s throttle, meets the same still-draining owner, and exits again. MEASURED 2026-09-06 on
7
- * the feedox box: one watchdog kick produced ~20 start/exit cycles over five minutes, every one of
7
+ * a production box: one watchdog kick produced ~20 start/exit cycles over five minutes, every one of
8
8
  * them `port already in use`, and every scheduled run in that window died with it. The manager was
9
9
  * doing exactly what it was asked to; the retry it was standing in for just belonged here, where
10
10
  * the wait is one process holding still instead of N processes racing.
@@ -68,7 +68,7 @@ export const APP_ROOT = resolveAppRoot();
68
68
  * (shipped assets) explicitly.
69
69
  *
70
70
  * Aliased to APP_ROOT, not PACKAGE_ROOT, deliberately: every remaining external consumer of this
71
- * export (shraga-ee `engine/cursor.ts`, `engine/agentx.ts`) uses it as the agent's project root —
71
+ * export (shraga-ee's optional engines, e.g. `engine/cursor.ts`) uses it as the agent's project root —
72
72
  * i.e. they meant APP_ROOT and were hitting the same npm-layout bug. Pointing the alias here fixes
73
73
  * them without an EE change. Nothing in this package reads shipped assets through it.
74
74
  */
@@ -7,7 +7,7 @@ import { execFileSync } from 'node:child_process';
7
7
  * when the server's launchd/systemd parent dies first: the server reparents to pid 1, nothing will
8
8
  * ever signal it, and it holds the port FOREVER. The replacement then dies on every respawn while
9
9
  * the orphan keeps serving the OLD code, so `kickstart -k` looks successful and changes nothing
10
- * (observed on feedox 2026-08-28: a deploy "restarted" the service four times, and the process
10
+ * (observed on a production deployment 2026-08-28: a deploy "restarted" the service four times, and the process
11
11
  * answering :3032 was three hours and one version old).
12
12
  *
13
13
  * Reclaiming is deliberately narrow — an over-broad "kill whatever holds my port" is how a deploy
@@ -22,7 +22,7 @@ export function reclaimStalePort(port: number, opts: { entrypoint?: string; cwd?
22
22
 
23
23
  // Any state, not just LISTEN: an orphan that closed its listener inside a drain it never finished
24
24
  // still OWNS the socket, and looking only for LISTEN made it invisible while it blocked every
25
- // replacement (feedox 2026-09-06: ppid-1 orphan, listener closed, port held for six minutes and
25
+ // replacement (a production deployment 2026-09-06: ppid-1 orphan, listener closed, port held for six minutes and
26
26
  // counting). `isStaleSelf` is what keeps this narrow — a bystander is never a candidate.
27
27
  const holders = [...new Set([...listeners(port), ...portUsers(port)])]
28
28
  .filter((pid) => pid !== process.pid && isStaleSelf(pid, entrypoint, cwd));
@@ -112,7 +112,7 @@ export function backfillScope(schedules: Schedule[]): void {
112
112
  }
113
113
  // Undo the `engine: 'claude-code'` pin reconcile stamped onto the failure notifier. It shipped on
114
114
  // a premise the box's own logs disprove — nothing was ever misrouted; the deployment was simply
115
- // globally on claude-code then and on agentx now — and it made the alarm the second casualty of
115
+ // globally on claude-code then and on an add-on engine now — and it made the alarm the second casualty of
116
116
  // the real failure mode (an org cap on the pinned provider). Narrow on purpose: exactly the
117
117
  // state that clause produced (this id, that engine, no model), so it cannot eat a real choice.
118
118
  if (s.id === FAILURE_NOTIFIER_SCHEDULE_ID && task.engine === 'claude-code' && !task.model) {
@@ -139,7 +139,7 @@ wait_for_version() { # version timeout
139
139
  # One dropped probe is not a crash-loop. This runs on a busy box where a single request can lose a
140
140
  # 10s race (MCP mounts, a GC pause, the drain window of the restart we just did), and a zero-
141
141
  # tolerance soak turns that blip into an automatic rollback of a perfectly good version — observed
142
- # reverting 0.1.48 on feedox while the process stayed up throughout. Require CONSECUTIVE misses, so
142
+ # reverting 0.1.48 on a production deployment while the process stayed up throughout. Require CONSECUTIVE misses, so
143
143
  # a real crash (which never answers again) still fails fast.
144
144
  SOAK_MISS_LIMIT="${SOAK_MISS_LIMIT:-3}"
145
145
  soak() { # version seconds