@uniqbit/mate-core 0.20.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +1 -1
- package/claude-capability-plugins/companion-mentions/hooks/register.ts +1 -1
- package/claude-plugin/hooks/hooks.json +10 -1
- package/claude-plugin/hooks/rtk-worktree-git.mjs +58 -0
- package/opencode-plugin/src/server.ts +9 -2
- package/package.json +2 -1
- package/src/cli/commands/artifact/delivery/environment.ts +28 -8
- package/src/cli/commands/artifact/delivery/link.ts +28 -9
- package/src/cli/commands/artifact/delivery/output.ts +7 -0
- package/src/cli/commands/companion/update.ts +2 -19
- package/src/cli/commands/factory/factory.ts +11 -1
- package/src/cli/commands/install.ts +47 -36
- package/src/cli/commands/launch/claude.ts +2 -0
- package/src/cli/commands/launch/shared.ts +33 -6
- package/src/cli/commands/plugin/install.ts +27 -11
- package/src/cli/commands/report/index.ts +180 -184
- package/src/cli/commands/report/markdown.ts +67 -72
- package/src/cli/commands/shared/companion-selection.ts +3 -1
- package/src/cli/commands/studio/access.ts +6 -14
- package/src/cli/commands/studio/areas.ts +112 -33
- package/src/cli/commands/studio/companion-add.ts +87 -0
- package/src/cli/commands/studio/companion-removal.ts +15 -8
- package/src/cli/commands/studio/factory-credential.ts +1 -15
- package/src/cli/commands/studio/factory-git-tokens.ts +40 -0
- package/src/cli/commands/studio/factory-relay.ts +18 -0
- package/src/cli/commands/studio/graph-model.ts +61 -0
- package/src/cli/commands/studio/graph.ts +336 -0
- package/src/cli/commands/studio/index.ts +4 -4
- package/src/cli/commands/studio/payload.ts +42 -15
- package/src/cli/commands/studio/repository-add.ts +116 -0
- package/src/cli/commands/studio/routes.ts +6 -0
- package/src/cli/commands/studio/selection.ts +12 -3
- package/src/cli/commands/studio/server.ts +127 -5
- package/src/cli/commands/studio/services.ts +40 -0
- package/src/cli/commands/studio/terminal.ts +45 -3
- package/src/cli/commands/studio/views/vault/markdown-tree.ts +84 -3
- package/src/cli/commands/studio/workset-session.ts +47 -14
- package/src/cli/commands/unwrap.ts +3 -0
- package/src/cli/commands/update.ts +2 -0
- package/src/cli/commands/vscode/release-vsix.json +4 -0
- package/src/cli/commands/vscode/setup.ts +71 -13
- package/src/cli/commands/vscode/vsix.ts +48 -7
- package/src/cli/commands/working/cleanup.ts +40 -8
- package/src/cli/commands/working/worktree.ts +176 -35
- package/src/cli/main.ts +17 -2
- package/src/cli/usage.ts +1 -1
- package/src/hooks/rtk-worktree-git.ts +48 -0
- package/src/hooks/validate-artifact-path.ts +38 -7
- package/src/lib/delivery/branch-template.ts +122 -0
- package/src/lib/delivery/branches.ts +21 -16
- package/src/lib/delivery/checkout.ts +102 -0
- package/src/lib/delivery/environment.ts +2 -0
- package/src/lib/delivery/merge-git.ts +13 -1
- package/src/lib/delivery/record-delivery.ts +83 -29
- package/src/lib/delivery/record.ts +15 -3
- package/src/lib/delivery/resolve-branch.ts +157 -110
- package/src/lib/factory/attach-client.ts +11 -1
- package/src/lib/factory/broker.ts +37 -40
- package/src/lib/factory/client.ts +22 -1
- package/src/lib/factory/clone-url.ts +39 -0
- package/src/lib/factory/command.ts +21 -5
- package/src/lib/factory/git-auth.ts +61 -0
- package/src/lib/factory/git-credential-store.ts +181 -0
- package/src/lib/factory/ids.ts +12 -2
- package/src/lib/factory/outcomes/actions.ts +20 -4
- package/src/lib/factory/outcomes/index.ts +77 -11
- package/src/lib/factory/outcomes/lifecycle.ts +9 -2
- package/src/lib/factory/outcomes/sessions.ts +23 -1
- package/src/lib/factory/prepare.ts +9 -3
- package/src/lib/factory/runner/scheduler.ts +96 -14
- package/src/lib/factory/runner/workflow.ts +5 -1
- package/src/lib/factory/runtime.ts +143 -43
- package/src/lib/orchestrator/companion-hub.ts +6 -1
- package/src/lib/orchestrator/engine-floor.ts +48 -0
- package/src/lib/orchestrator/launcher.ts +34 -1
- package/src/lib/orchestrator/projection-claude-commands.ts +2 -2
- package/src/lib/orchestrator/projection-claude-entry.ts +42 -21
- package/src/lib/orchestrator/projection-claude-links.ts +32 -8
- package/src/lib/orchestrator/projection-claude-skills.ts +2 -2
- package/src/lib/orchestrator/projection-entries.ts +22 -18
- package/src/lib/orchestrator/projection-opencode-copies.ts +65 -21
- package/src/lib/orchestrator/projection-runtime-documents.ts +66 -43
- package/src/lib/orchestrator/projection-types.ts +28 -1
- package/src/lib/orchestrator/refresh-working-claude-links.ts +3 -1
- package/src/lib/orchestrator/session-prepare.ts +6 -1
- package/src/lib/orchestrator/setup-compatibilities.ts +1 -1
- package/src/lib/orchestrator/types.ts +4 -0
- package/src/lib/orchestrator/umbrella-checkouts.ts +102 -0
- package/src/lib/orchestrator/working-repo-projection.ts +24 -4
- package/src/lib/orchestrator/wrap-pass.ts +1 -0
- package/src/lib/public-npm.ts +95 -50
- package/src/lib/session-state.ts +72 -2
- package/src/lib/update-checker.ts +7 -1
- package/src/lib/usage/aggregate.ts +202 -0
- package/src/lib/usage/cache.ts +87 -0
- package/src/lib/usage/claude-pricing.ts +71 -0
- package/src/lib/usage/claude.ts +189 -0
- package/src/lib/usage/collect.ts +56 -0
- package/src/lib/usage/opencode.ts +188 -0
- package/src/lib/usage/records.ts +80 -0
- package/src/lib/usage/rtk-database.ts +72 -0
- package/src/lib/usage/savings.ts +209 -0
- package/src/lib/usage/scope.ts +182 -0
- package/src/lib/usage/source.ts +102 -0
- package/src/lib/usage/types.ts +143 -0
- package/src/lib/usage/window.ts +37 -0
- package/src/lib/workset/factory-local.ts +157 -0
- package/src/lib/workset/record.ts +25 -11
- package/src/lib/workset/repositories.ts +118 -25
- package/src/lib/workset/worktree-include.ts +161 -0
- package/src/lib/workset/worktree-index.ts +6 -2
- package/src/lib/workset/worktree.ts +591 -101
- package/src/opencode/companion-hooks.ts +46 -8
- package/src/opencode/companion-policy.ts +18 -5
- package/src/opencode/enter-worktree.ts +254 -6
- package/src/opencode/session-register.ts +2 -2
- package/src/runtime/claude-bg-isolation.ts +138 -0
- package/src/runtime/companion-git.ts +10 -2
- package/src/runtime/companion-guidance.ts +17 -4
- package/src/runtime/current-branch.ts +16 -2
- package/src/runtime/entered-worktree.ts +24 -0
- package/src/runtime/git-tracked.ts +60 -0
- package/src/runtime/repo-destination.ts +72 -0
- package/src/runtime/repo-local.ts +25 -3
- package/src/runtime/rtk-git-guard.ts +66 -0
- package/src/runtime/runtime-document-manifest.ts +229 -19
- package/src/runtime/runtime-document-manifest.typecheck.ts +10 -0
- package/src/runtime/secret-guard.ts +9 -2
- package/src/runtime/secret-policy-weakening.ts +122 -0
- package/src/runtime/serving-claude-wrap.ts +15 -2
- package/src/runtime/umbrella-folder.ts +56 -0
- package/src/runtime/wrap-state.ts +5 -13
- package/src/studio.ts +37 -0
- package/src/templates/mate-skills/agents/mate-apply-change/SKILL.md +61 -6
- package/src/templates/mate-skills/agents/mate-explore-change/SKILL.md +8 -4
- package/src/templates/mate-skills/agents/mate-propose-change/SKILL.md +9 -5
- package/src/templates/mate-skills/agents/mate-publish-artifact/SKILL.md +5 -4
- package/src/templates/mate-skills/agents/mate-show-me/SKILL.md +10 -4
- package/src/templates/mate-skills/agents/mate-simplify-code/SKILL.md +5 -1
- package/src/templates/mate-skills/claude/mate-apply-change/SKILL.md +61 -6
- package/src/templates/mate-skills/claude/mate-explore-change/SKILL.md +8 -4
- package/src/templates/mate-skills/claude/mate-propose-change/SKILL.md +9 -5
- package/src/templates/mate-skills/claude/mate-publish-artifact/SKILL.md +5 -4
- package/src/templates/mate-skills/claude/mate-show-me/SKILL.md +10 -4
- package/src/templates/mate-skills/claude/mate-simplify-code/SKILL.md +5 -1
- package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +307 -42
- package/src/tools/setup/capabilities/rtk.ts +93 -1
- package/src/tools/setup/dynamic-plugins/audiences.ts +65 -21
- package/src/tools/setup/dynamic-plugins/frozen.ts +32 -13
- package/src/tools/setup/dynamic-plugins/hydrate.ts +4 -4
- package/src/tools/setup/dynamic-plugins/install.ts +24 -22
- package/src/tools/setup/dynamic-plugins/loader.ts +11 -7
- package/src/tools/setup/dynamic-plugins/paths.ts +30 -10
- package/src/tools/setup/dynamic-plugins/verify.ts +10 -7
- package/src/tools/setup/dynamic-plugins/workspaces.ts +153 -0
- package/src/tools/setup/mate.ts +3 -3
- package/src/tools/setup/plugins/gitignore.ts +15 -9
- package/src/tools/setup/providers/claude-plugin-hooks.ts +12 -0
- package/src/tools/setup/providers/claude.ts +25 -3
- package/src/tools/setup/utils.ts +4 -2
- package/src/tools/setup/working-repo-cleanup.ts +2 -2
- package/src/tools/setup/working-repo-local-state.ts +2 -0
- package/src/tools/setup.ts +25 -14
- package/studio-dist/client/assets/app-D9cw6szy.css +2 -0
- package/studio-dist/client/assets/artifacts-WD2ZXYrx.js +1 -0
- package/studio-dist/client/assets/button-Br0O1sXw.js +1 -0
- package/studio-dist/client/assets/combobox-DA7RAUUZ.js +1 -0
- package/studio-dist/client/assets/companion-view-CrabvxS8.js +1 -0
- package/studio-dist/client/assets/factory-DGS0E16C.js +6 -0
- package/studio-dist/client/assets/fields-6aXBpFhJ.js +1 -0
- package/studio-dist/client/assets/getting-started-Clde4w6P.js +1 -0
- package/studio-dist/client/assets/getting-started-D6kgWwWZ.js +1 -0
- package/studio-dist/client/assets/getting-started._topic-BiunccbT.js +1 -0
- package/studio-dist/client/assets/getting-started.index-DpiNoGw8.js +1 -0
- package/studio-dist/client/assets/graph-B_TCBVbu.js +2 -0
- package/studio-dist/client/assets/graph-canvas-Ba37Y5AE.js +3242 -0
- package/studio-dist/client/assets/guides-Du_RtJxP.js +1 -0
- package/studio-dist/client/assets/index-Df8L1LQa.js +40 -0
- package/studio-dist/client/assets/jsx-runtime-MZURdZre.js +1 -0
- package/studio-dist/client/assets/markdown-view-BOX6x0rL.js +1 -0
- package/studio-dist/client/assets/panel-dbmCx7Mx.js +1 -0
- package/studio-dist/client/assets/queries-RvHeXY12.js +1 -0
- package/studio-dist/client/assets/react-3QStrcDO.js +27 -0
- package/studio-dist/client/assets/report-url-XRL0x1SY.js +1 -0
- package/studio-dist/client/assets/reports-r3IK7Doz.js +1 -0
- package/studio-dist/client/assets/routes-C0A5LTFc.js +1 -0
- package/studio-dist/client/assets/select-CnaMd617.js +1 -0
- package/studio-dist/client/assets/skills-CzjzHpBT.js +1 -0
- package/studio-dist/client/assets/specs-B0ldF_6J.js +1 -0
- package/studio-dist/client/assets/specs-view-BnCLA0gW.js +1 -0
- package/studio-dist/client/assets/spinner-Dcm3fqK1.js +1 -0
- package/studio-dist/client/assets/steps-C0p2N1Pb.js +1 -0
- package/studio-dist/client/assets/store-Dw34catY.js +1 -0
- package/studio-dist/client/assets/studio-Cpz_HRHp.js +100 -0
- package/studio-dist/client/assets/studio-queries-ibmpFo6R.js +2 -0
- package/studio-dist/client/assets/usage-C2QJ_0IZ.js +55 -0
- package/studio-dist/client/assets/useAnchoredPopupScrollLock-Bj-FWb8z.js +1 -0
- package/studio-dist/client/assets/useMutation-aAr2uiay.js +1 -0
- package/studio-dist/client/assets/useSelector-AYcH7lB0.js +2 -0
- package/studio-dist/client/assets/vault-BGcxkSIY.js +1 -0
- package/studio-dist/client/assets/warnings-R1cE1rLf.js +1 -0
- package/studio-dist/client/assets/workflow-C2qTrMDH.js +1 -0
- package/studio-dist/server/assets/__23tanstack-start-server-fn-resolver-Bn896ZYj.js +122 -0
- package/studio-dist/server/assets/_tanstack-start-manifest_v.js +102 -35
- package/studio-dist/server/assets/{actions-Bvgj9eb8.js → actions-DYSv-9VV.js} +10 -4
- package/studio-dist/server/assets/artifacts-DnF9L3dZ.js +216 -0
- package/studio-dist/server/assets/{button-CIJqAhni.js → button-CgOIVdmD.js} +13 -1702
- package/studio-dist/server/assets/combobox-DV_s9W0s.js +483 -0
- package/studio-dist/server/assets/{companion-view-DISASvdJ.js → companion-view-BKVXD3TO.js} +3 -3
- package/studio-dist/server/assets/companions-C7fctnU9.js +31 -0
- package/studio-dist/server/assets/{createServerRpc-tK2lE9R2.js → createServerRpc-bFKFpGFG.js} +1 -1
- package/studio-dist/server/assets/{factory-DUTa0eDs.js → factory-C7Ybg0xG.js} +1256 -353
- package/studio-dist/server/assets/{factory-DGPmNGbo.js → factory-Df5uAHjb.js} +53 -6
- package/studio-dist/server/assets/fields-BbieQTD0.js +1190 -0
- package/studio-dist/server/assets/getting-started-B136TP57.js +4 -0
- package/studio-dist/server/assets/getting-started-CRxMWorQ.js +67 -0
- package/studio-dist/server/assets/getting-started._topic-DJKQAzYl.js +13 -0
- package/studio-dist/server/assets/getting-started.index-D84gec1t.js +13 -0
- package/studio-dist/server/assets/graph-CSje3029.js +801 -0
- package/studio-dist/server/assets/graph-DDZzXM1L.js +16 -0
- package/studio-dist/server/assets/graph-canvas-22bWB5-2.js +21066 -0
- package/studio-dist/server/assets/graph-wire-BdSUx0G5.js +58 -0
- package/studio-dist/server/assets/guides-D9dk1Frq.js +13 -0
- package/studio-dist/server/assets/guides-IE-19POz.js +5 -0
- package/studio-dist/server/assets/guides.server-vcYRY5wx.js +66 -0
- package/studio-dist/server/assets/jsx-runtime-Bt0s0YKS.js +451 -0
- package/studio-dist/server/assets/{markdown-view-Bn7xPdks.js → markdown-view-BR8dJ7aR.js} +28 -9
- package/studio-dist/server/assets/{panel-3Jmn4awF.js → panel-BR_t9iMM.js} +4 -4
- package/studio-dist/server/assets/queries-DWoTin-q.js +32 -0
- package/studio-dist/server/assets/react-CdqSUhaL.js +89 -0
- package/studio-dist/server/assets/redirect-BaZ_QyqF.js +39 -0
- package/studio-dist/server/assets/report-url-BUXPcE_8.js +9 -0
- package/studio-dist/server/assets/{reports-D6YMqhnO.js → reports-CQ9qQ1-n.js} +9 -10
- package/studio-dist/server/assets/{reports-C06RXVE2.js → reports-dYDEoBeq.js} +3 -3
- package/studio-dist/server/assets/{router-C8MGqlAY.js → router-DkRHNTpE.js} +787 -2862
- package/studio-dist/server/assets/{routes-BcFgvqf7.js → routes-B6GfOew4.js} +22 -171
- package/studio-dist/server/assets/{search-JAKurDNh.js → search-BJnWLfkG.js} +21 -2
- package/studio-dist/server/assets/select-Af7Wibii.js +1609 -0
- package/studio-dist/server/assets/{shell-DS3wUexh.js → shell-Hq-hXgnT.js} +6 -5
- package/studio-dist/server/assets/{skills-BEnOxiDl.js → skills-B7nEuVbx.js} +9 -8
- package/studio-dist/server/assets/{skills-CtrBAtX3.js → skills-B_YYL7q8.js} +3 -3
- package/studio-dist/server/assets/specs-BpLUFntA.js +51 -0
- package/studio-dist/server/assets/specs-view-0peMVd22.js +426 -0
- package/studio-dist/server/assets/spinner-CdwJW4VB.js +20 -0
- package/studio-dist/server/assets/{steps-Dq_CwY_s.js → steps-D56DApvK.js} +1 -1
- package/studio-dist/server/assets/store-Cs17okNG.js +280 -0
- package/studio-dist/server/assets/studio-CAcKp3bM.js +10340 -0
- package/studio-dist/server/assets/studio-queries-BtRGzDdh.js +1451 -0
- package/studio-dist/server/assets/usage-COdjd1gD.js +25570 -0
- package/studio-dist/server/assets/usage-f6pqE1tm.js +24 -0
- package/studio-dist/server/assets/useAnchoredPopupScrollLock-DlBKHRw7.js +756 -0
- package/studio-dist/server/assets/useMutation-DzTZGenE.js +690 -0
- package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-M2GBs8s3.js → useSelector-DUmCUXAs.js} +4 -668
- package/studio-dist/server/assets/{vault-Fvxt2Tzl.js → vault-BDuIUq0F.js} +8 -5
- package/studio-dist/server/assets/{vault-BmWnryh3.js → vault-BVLp6zu3.js} +3 -3
- package/studio-dist/server/assets/{views-BgYa-za2.js → views-flRUr21z.js} +4 -4
- package/studio-dist/server/assets/{warnings-DzR6fyZh.js → warnings-CDy9pdgL.js} +3 -2
- package/studio-dist/server/assets/{delivery-path-C29fBynY.js → workflow-D9GKI2EV.js} +132 -106
- package/studio-dist/server/server.js +582 -8
- package/src/cli/commands/report/collector.ts +0 -288
- package/studio-dist/client/assets/app-CdPiFv59.css +0 -2
- package/studio-dist/client/assets/button-BIIHE0EQ.js +0 -3
- package/studio-dist/client/assets/companion-view-DM6YyXaR.js +0 -1
- package/studio-dist/client/assets/delivery-path-DELxj0Av.js +0 -1
- package/studio-dist/client/assets/factory-BZy0E8ty.js +0 -4
- package/studio-dist/client/assets/index-B3wkMzjA.js +0 -40
- package/studio-dist/client/assets/markdown-view-pQ2Qp_i5.js +0 -1
- package/studio-dist/client/assets/panel-CbajlC3p.js +0 -1
- package/studio-dist/client/assets/prepaint-CwSrpdFA.js +0 -27
- package/studio-dist/client/assets/react-CN2GSx7x.js +0 -1
- package/studio-dist/client/assets/reports-DllhYQ5_.js +0 -1
- package/studio-dist/client/assets/rolldown-runtime-WkwZ5CU-.js +0 -1
- package/studio-dist/client/assets/routes-COm-G3mK.js +0 -1
- package/studio-dist/client/assets/skills-DmWAy-jZ.js +0 -1
- package/studio-dist/client/assets/specs-BG3Wi3ln.js +0 -1
- package/studio-dist/client/assets/steps-DFsH3Neu.js +0 -1
- package/studio-dist/client/assets/vault-B2q1nBY5.js +0 -1
- package/studio-dist/client/assets/warnings-BSXIyuSQ.js +0 -1
- package/studio-dist/client/assets/workflow-DlsQD6Hc.js +0 -1
- package/studio-dist/server/assets/companions-BYbHWKOZ.js +0 -15
- package/studio-dist/server/assets/createServerFn-F5sAOF8V.js +0 -459
- package/studio-dist/server/assets/prepaint-DJfTQ_VH.js +0 -45
- package/studio-dist/server/assets/react-Ce6dj15C.js +0 -46
- package/studio-dist/server/assets/rolldown-runtime-DYf_mQCB.js +0 -34
- package/studio-dist/server/assets/specs-C8rv34-5.js +0 -211
- package/studio-dist/server/assets/studio-BeltxxKt.js +0 -216
- package/studio-dist/server/assets/workflow-liRYecHk.js +0 -73
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t,r as n,t as r}from"./jsx-runtime-MZURdZre.js";import{$ as i,B as a,H as o,K as s,R as c,V as l,Z as u,at as d,et as f,it as p,nt as m,ot as h,q as g,rt as _,st as v,tt as y,z as b}from"./studio-queries-ibmpFo6R.js";var x=n((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return s(e,t,null,n)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.7`})),S=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=x()})),C=e(t(),1),w=r(),T=C.createContext(void 0),E=e=>{let t=C.useContext(T);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},D=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,w.jsx)(T.Provider,{value:e,children:t})),O=()=>s,k=()=>O(),A=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},j=new class extends A{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},M=h;function N(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=M,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var P=N(),F=new class extends A{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function I(e){return Math.min(1e3*2**e,3e4)}function L(e){return(e??`online`)!==`online`||F.isOnline()}var ee=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function R(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(u);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new ee(t);_(n),e.onCancel?.(n)}},d=()=>{t=!0},f=()=>{t=!1},m=()=>j.isFocused()&&(e.networkMode===`always`||F.isOnline())&&e.canRun(),h=()=>L(e.networkMode)&&e.canRun(),g=e=>{c()||(r?.(),i=`resolved`,a(e))},_=e=>{c()||(r?.(),i=`rejected`,o(e))},v=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),y=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(g).catch(r=>{if(c())return;let i=e.retry??(k()?0:3),a=e.retryDelay??I,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?_(r):(n++,e.onFail?.(n,r),p(o).then(()=>c()||m()?void 0:v(m)).then(()=>{t?_(r):y()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:d,continueRetry:f,canStart:h,start:()=>(h()?y():v(h).then(y),s)}}var te=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),g(this.gcTime)&&(this.#e=v.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(k()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(v.clearTimeout(this.#e),this.#e=void 0)}};function z(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],u=t.state.data?.pageParams||[],d={pages:[],pageParams:[]},f=0,p=async()=>{let n=!1,p=t,m=e=>{c(e,()=>t.signal,()=>n=!0,p[o])},h=l(t.options,t.fetchOptions),g=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let o=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return m(e),e})(),s=await h(o),{maxPages:c}=t.options,l=i?a:b;return{pages:l(e.pages,s,c),pageParams:l(e.pageParams,r,c)}};if(i&&s.length){let e=i===`backward`,t=e?ne:B,n={pages:s,pageParams:u};d=await g(n,t(r,n),e)}else{let t=e??s.length;do{let e=f===0?u[0]===void 0?r.initialPageParam:u[0]:B(r,d);if(f>0&&e==null)break;d=await g(d,e),f++}while(f<t)}return d};t.fetchFn=t.options.persister?()=>t.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):p}}}function B(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ne(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var re=class extends te{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ae(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ae(this.options);e.data!==void 0&&(this.setState(ie(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=i(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(u).catch(u):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>f(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===_||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>f(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!d(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[o]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=l(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?z(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta});let s=this.#a=R({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ee&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),c=(async()=>{try{let e=await s.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ee){if(e.silent){if(this.#a!==s&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===s&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=c,s.start(),c}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...V(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...ie(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function V(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:L(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function ie(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ae(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var oe=class extends A{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ce(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return le(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return le(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof f(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!y(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&ue(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||f(this.options.enabled,this.#t)!==f(t.enabled,this.#t)||f(this.options.staleTime,this.#t)!==f(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||f(this.options.enabled,this.#t)!==f(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return y(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(u)),t}#h(e){return!k()&&f(this.options.enabled,this.#t)!==!1&&g(e)}#g(){this.#b();let e=f(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=d(this.#r.dataUpdatedAt,e)+1;this.#u=v.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return f(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=v.setInterval(()=>{(this.options.refetchIntervalInBackground||j.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(v.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(v.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,a=this.#r,o=this.#i,s=this.#a,c=e===n?this.#n:e.state,{state:l}=e,u={...l},d=!1,p;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&ce(e,t),o=i&&ue(e,n,t,r);(a||o)&&(u={...u,...V(l.data,e.options)}),t._optimisticResults===`isRestoring`&&(u.fetchStatus=`idle`)}let{error:m,errorUpdatedAt:h,status:g}=u;p=u.data;let _=!1;if(t.placeholderData!==void 0&&p===void 0&&g===`pending`){let e;a?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(e=a.data,_=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(g=`success`,p=i(a?.data,e,t),d=!0)}if(t.select&&p!==void 0&&!_){if(a&&p===o?.data&&t.select===this.#s)p=this.#c;else try{this.#s=t.select,p=t.select(p),p=i(a?.data,p,t),this.#c=p,this.#o=null}catch(e){this.#o=e}}else p===void 0&&(this.#o=null);this.#o&&(m=this.#o,p=this.#c,h=Date.now(),g=`error`,d=!1);let v=u.fetchStatus===`fetching`,y=g===`pending`,b=g===`error`,x=y&&v,S=p!==void 0;return{status:g,fetchStatus:u.fetchStatus,isPending:y,isSuccess:g===`success`,isError:b,isInitialLoading:x,isLoading:x,data:p,dataUpdatedAt:u.dataUpdatedAt,error:m,errorUpdatedAt:h,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:u.dataUpdateCount>c.dataUpdateCount||u.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!y,isLoadingError:b&&!S,isPaused:u.fetchStatus===`paused`,isPlaceholderData:d,isRefetchError:b&&S,isStale:de(e,t),refetch:this.refetch,isEnabled:f(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),y(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();P.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function se(e,t){return f(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||f(t.retryOnMount,e)!==!1)}function ce(e,t){return se(e,t)||e.state.data!==void 0&&le(e,t,t.refetchOnMount)}function le(e,t,n){if(f(t.enabled,e)!==!1&&f(t.staleTime,e)!==`static`){let r=f(n,e);return r===`always`||r!==!1&&de(e,t)}return!1}function ue(e,t,n,r){return(e!==t||f(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&de(e,n)}function de(e,t){return f(t.enabled,e)!==!1&&e.isStaleByTime(f(t.staleTime,e))}var fe=C.createContext(!1),pe=()=>C.useContext(fe);fe.Provider;function me(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var he=C.createContext(me()),ge=()=>C.useContext(he),_e=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?m(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},ve=e=>{C.useEffect(()=>{e.clearReset()},[e])},ye=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||m(n,[e.error,r])),be=(e,t)=>t.state.data===void 0,xe=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Se=(e,t)=>e?.suspense&&t.isPending,Ce=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function we(e,t,n){let r=pe(),i=ge(),a=E(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,xe(o),_e(o,i,s),ve(i);let[l]=C.useState(()=>new t(a,o)),d=l.getOptimisticResult(o);C.useEffect(()=>{l.setOptions(o)},[o,l]);let f=!r&&c;if(C.useSyncExternalStore(C.useCallback(e=>{let t=f?l.subscribe(P.batchCalls(e)):u;return l.updateResult(),t},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),Se(o,d))throw Ce(o,l,i);if(ye({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return o.notifyOnChangeProps?d:l.trackResult(d)}function Te(e,t){return we(e,oe,t)}function Ee(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ee(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function De(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ee(e))&&(r&&(r+=` `),r+=t);return r}var Oe=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},ke=(e,t)=>({classGroupId:e,validator:t}),Ae=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),je=`-`,Me=[],Ne=`arbitrary..`,Pe=e=>{let t=Le(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Ie(e);let n=e.split(je);return Fe(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Oe(i,t):t:i||Me}return n[e]||Me}}},Fe=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Fe(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(je):e.slice(t).join(je),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Ie=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Ne+r:void 0})(),Le=e=>{let{theme:t,classGroups:n}=e;return Re(n,t)},Re=(e,t)=>{let n=Ae();for(let r in e){let i=e[r];ze(i,n,r,t)}return n},ze=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Be(i,t,n,r)}},Be=(e,t,n,r)=>{typeof e==`string`?Ve(e,t,n):typeof e==`function`?He(e,t,n,r):Ue(e,t,n,r)},Ve=(e,t,n)=>{let r=e===``?t:We(t,e);r.classGroupId=n},He=(e,t,n,r)=>{Ge(e)?ze(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(ke(n,e)))},Ue=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ze(o,We(t,a),n,r)}},We=(e,t)=>{let n=e,r=t.split(je),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Ae(),n.nextPart.set(t,i)),n=i}return n},Ge=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ke=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},qe=`!`,Je=`:`,Ye=[],Xe=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Ze=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Je){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(qe)?(c=s.slice(0,-1),l=!0):s.startsWith(qe)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Xe(t,l,c,u)};if(t){let e=t+Je,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Xe(Ye,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Qe=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},$e=e=>({cache:Ke(e.cacheSize),parseClassName:Ze(e),sortModifiers:Qe(e),postfixLookupClassGroupIds:et(e),...Pe(e)}),et=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},tt=/\s+/,nt=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(tt),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+qe:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},rt=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=it(n))&&(i&&(i+=` `),i+=r);return i},it=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=it(e[r]))&&(n&&(n+=` `),n+=t);return n},at=(e,...t)=>{let n,r,i,a,o=o=>(n=$e(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=nt(e,n);return i(e,a),a};return a=o,(...e)=>a(rt(...e))},ot=[],H=e=>{let t=t=>t[e]||ot;return t.isThemeGetter=!0,t.themeKey=e,t},st=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ct=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ut=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ft=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,pt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ht=e=>lt.test(e),U=e=>!!e&&!Number.isNaN(Number(e)),gt=e=>!!e&&Number.isInteger(Number(e)),_t=e=>e.endsWith(`%`)&&U(e.slice(0,-1)),vt=e=>ut.test(e),yt=()=>!0,bt=e=>dt.test(e)&&!ft.test(e),xt=()=>!1,St=e=>pt.test(e),Ct=e=>mt.test(e),wt=e=>!W(e)&&!G(e),Tt=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Et=e=>Vt(e,Gt,xt),W=e=>st.test(e),Dt=e=>Vt(e,Kt,bt),Ot=e=>Vt(e,qt,U),kt=e=>Vt(e,Yt,yt),At=e=>Vt(e,Jt,xt),jt=e=>Vt(e,Ut,xt),Mt=e=>Vt(e,Wt,Ct),Nt=e=>Vt(e,Xt,St),G=e=>ct.test(e),Pt=e=>Ht(e,Kt),Ft=e=>Ht(e,Jt),It=e=>Ht(e,Ut),Lt=e=>Ht(e,Gt),Rt=e=>Ht(e,Wt),zt=e=>Ht(e,Xt,!0),Bt=e=>Ht(e,Yt,!0),Vt=(e,t,n)=>{let r=st.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ht=(e,t,n=!1)=>{let r=ct.exec(e);return r?r[1]?t(r[1]):n:!1},Ut=e=>e===`position`||e===`percentage`,Wt=e=>e===`image`||e===`url`,Gt=e=>e===`length`||e===`size`||e===`bg-size`,Kt=e=>e===`length`,qt=e=>e===`number`,Jt=e=>e===`family-name`,Yt=e=>e===`number`||e===`weight`,Xt=e=>e===`shadow`,Zt=at(()=>{let e=H(`color`),t=H(`font`),n=H(`text`),r=H(`font-weight`),i=H(`tracking`),a=H(`leading`),o=H(`breakpoint`),s=H(`container`),c=H(`spacing`),l=H(`radius`),u=H(`shadow`),d=H(`inset-shadow`),f=H(`text-shadow`),p=H(`drop-shadow`),m=H(`blur`),h=H(`perspective`),g=H(`aspect`),_=H(`ease`),v=H(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),G,W],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[G,W,c],T=()=>[ht,`full`,`auto`,...w()],E=()=>[gt,`none`,`subgrid`,G,W],D=()=>[`auto`,{span:[`full`,gt,G,W]},gt,G,W],O=()=>[gt,`auto`,G,W],k=()=>[`auto`,`min`,`max`,`fr`,G,W],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ht,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,ht,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[ht,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,G,W],L=()=>[...b(),It,jt,{position:[G,W]}],ee=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],R=()=>[`auto`,`cover`,`contain`,Lt,Et,{size:[G,W]}],te=()=>[_t,Pt,Dt],z=()=>[``,`none`,`full`,l,G,W],B=()=>[``,U,Pt,Dt],ne=()=>[`solid`,`dashed`,`dotted`,`double`],re=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],V=()=>[U,_t,It,jt],ie=()=>[``,`none`,m,G,W],ae=()=>[`none`,U,G,W],oe=()=>[`none`,U,G,W],se=()=>[U,G,W],ce=()=>[ht,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[vt],breakpoint:[vt],color:[yt],container:[vt],"drop-shadow":[vt],ease:[`in`,`out`,`in-out`],font:[wt],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[vt],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[vt],shadow:[vt],spacing:[`px`,U],text:[vt],"text-shadow":[vt],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ht,W,G,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,G,W]}],"container-named":[Tt],columns:[{columns:[U,`auto`,W,G,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[gt,`auto`,G,W]}],basis:[{basis:[ht,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[U,ht,`auto`,`initial`,`none`,W]}],grow:[{grow:[``,U,G,W]}],shrink:[{shrink:[``,U,G,W]}],order:[{order:[gt,`first`,`last`,`none`,G,W]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,Pt,Dt]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Bt,kt]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,_t,W]}],"font-family":[{font:[Ft,At,t]}],"font-features":[{"font-features":[W]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,G,W]}],"line-clamp":[{"line-clamp":[U,`none`,G,Ot]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,G,W]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,G,W]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ne(),`wavy`]}],"text-decoration-thickness":[{decoration:[U,`from-font`,`auto`,G,Dt]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[U,`auto`,G,W]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[gt,G,W]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,G,W]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,G,W]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:R()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},gt,G,W],radial:[``,G,W],conic:[``,gt,G,W]},Rt,Mt]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-bs":[{"border-bs":B()}],"border-w-be":[{"border-be":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":B()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ne(),`hidden`,`none`]}],"divide-style":[{divide:[...ne(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ne(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[U,G,W]}],"outline-w":[{outline:[``,U,Pt,Dt]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`inner`,`none`,u,zt,Nt]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,zt,Nt]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:B()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[U,Dt]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,zt,Nt]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[U,G,W]}],"mix-blend":[{"mix-blend":[...re(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[U]}],"mask-image-linear-from-pos":[{"mask-linear-from":V()}],"mask-image-linear-to-pos":[{"mask-linear-to":V()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":V()}],"mask-image-t-to-pos":[{"mask-t-to":V()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":V()}],"mask-image-r-to-pos":[{"mask-r-to":V()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":V()}],"mask-image-b-to-pos":[{"mask-b-to":V()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":V()}],"mask-image-l-to-pos":[{"mask-l-to":V()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":V()}],"mask-image-x-to-pos":[{"mask-x-to":V()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":V()}],"mask-image-y-to-pos":[{"mask-y-to":V()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[G,W]}],"mask-image-radial-from-pos":[{"mask-radial-from":V()}],"mask-image-radial-to-pos":[{"mask-radial-to":V()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[U]}],"mask-image-conic-from-pos":[{"mask-conic-from":V()}],"mask-image-conic-to-pos":[{"mask-conic-to":V()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,G,W]}],filter:[{filter:[``,`none`,G,W]}],blur:[{blur:ie()}],brightness:[{brightness:[U,G,W]}],contrast:[{contrast:[U,G,W]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,zt,Nt]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,U,G,W]}],"hue-rotate":[{"hue-rotate":[U,G,W]}],invert:[{invert:[``,U,G,W]}],saturate:[{saturate:[U,G,W]}],sepia:[{sepia:[``,U,G,W]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,G,W]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[U,G,W]}],"backdrop-contrast":[{"backdrop-contrast":[U,G,W]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,U,G,W]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[U,G,W]}],"backdrop-invert":[{"backdrop-invert":[``,U,G,W]}],"backdrop-opacity":[{"backdrop-opacity":[U,G,W]}],"backdrop-saturate":[{"backdrop-saturate":[U,G,W]}],"backdrop-sepia":[{"backdrop-sepia":[``,U,G,W]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,G,W]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[U,`initial`,G,W]}],ease:[{ease:[`linear`,`initial`,_,G,W]}],delay:[{delay:[U,G,W]}],animate:[{animate:[`none`,v,G,W]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,G,W]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":[`scale-3d`],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[G,W,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":[`translate-none`],zoom:[{zoom:[gt,G,W]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,G,W]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,G,W]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[U,Pt,Dt,Ot]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Qt(...e){return Zt(De(e))}function $t({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=C.useRef(e!==void 0),[a,o]=C.useState(()=>t);return[i&&e!==void 0?e:a,C.useCallback(e=>{i||o(e)},[])]}var en={...C};function tn(){let[,e]=C.useState({});return C.useCallback(()=>{e({})},[])}var nn=0;function rn(e,t=`mui`){let n=C.useRef(void 0),r=tn(),i=e??n.current;return C.useEffect(()=>{n.current??(nn+=1,n.current=`${t}-${nn}`,e??r())},[e,t,r]),i}var an=en.useId;function on(e,t){if(an!==void 0){let n=an();return e??(t?`${t}-${n}`:n)}return rn(e,t)}function sn(e){return on(e,`base-ui`)}var cn={};function K(e,t){let n=C.useRef(cn);return n.current===cn&&(n.current=e(t)),n}function ln(e,t,n,r){let i=K(dn).current;return fn(i,e,t,n,r)&&mn(i,[e,t,n,r]),i.callback}function un(e){let t=K(dn).current;return pn(t,e)&&mn(t,e),t.callback}function dn(){return{callback:null,cleanup:null,refs:[]}}function fn(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function pn(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function mn(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null:n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var hn=19;function gn(e){return hn>=e}function _n(e){if(!C.isValidElement(e))return null;let t=e,n=t.props;return(gn(19)?n?.ref:t.ref)??null}function vn(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function yn(){}var bn=Object.freeze([]),q=Object.freeze({});function xn(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Sn(e,t){return typeof e==`function`?e(t):e}function Cn(e,t){return typeof e==`function`?e(t):e}var wn={};function Tn(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Dn(t);let a=Dn(e);return t&&(a=On(a,t)),n&&(a=On(a,n)),r&&(a=On(a,r)),i&&(a=On(a,i)),a}function En(e){if(e.length===0)return wn;if(e.length===1)return Dn(e[0]);let t=Dn(e[0]);for(let n=1;n<e.length;n+=1)t=On(t,e[n]);return t}function Dn(e){return Mn(e)?{...e(wn)}:kn(e)}function On(e,t){return Mn(t)?t(e):An(e,t)}function kn(e){let t={...e};for(let e in t){let n=t[e];jn(e,n)&&(t[e]=Pn(n))}return t}function An(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=vn(e.style,r);break;case`className`:e[n]=In(e.className,r);break;default:e[n]=jn(n,r)?Nn(e[n],r):r}}return e}function jn(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function Mn(e){return typeof e==`function`}function Nn(e,t){return t?e?(...n)=>{let r=n[0];if(Ln(r)){let i=r;Fn(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:Pn(t):e}function Pn(e){return e&&((...t)=>{let n=t[0];return Ln(n)&&Fn(n),e(...t)})}function Fn(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function In(e,t){return t?e?t+` `+e:t:e}function Ln(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function Rn(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Hn(r));let i=zn(t,n,r);if(n.enabled===!1)return null;let a=n.state??q;return Un(e,r,i,a)}function zn(e,t,n){let{className:r,style:i}=e,{state:a=q,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Sn(r,a):void 0,d=l?Cn(i,a):void 0,f=l?xn(a,c):q,p=l&&s?Bn(s):void 0,m=l?vn(f,p)??{}:q;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?un([m.ref,_n(n),...o]):ln(m.ref,_n(n),o):ln(null,null)),l?(u!==void 0&&(m.className=In(m.className,u)),d!==void 0&&(m.style=vn(m.style,d)),m):q}function Bn(e){return Array.isArray(e)?En(e):Tn(void 0,e)}var Vn=Symbol.for(`react.lazy`);function Hn(e){if(e?.$$typeof!==Vn)return e;let t=C.Children.toArray(e)[0];return C.isValidElement(t)?t:e}function Un(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=Tn(n,t.props);return e.ref=n.ref,C.cloneElement(t,e)}return Wn(e,n)}function Wn(e,t){return e===`button`?(0,C.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,C.createElement)(`img`,{alt:``,...t,key:t.key}):C.createElement(e,t)}var Gn=C.createContext(void 0);function Kn(){return C.useContext(Gn)}function qn(){return typeof window<`u`}function J(e){return Xn(e)?(e.nodeName||``).toLowerCase():`#document`}function Jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yn(e){return((Xn(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Xn(e){return qn()?e instanceof Node||e instanceof Jn(e).Node:!1}function Zn(e){return qn()?e instanceof Element||e instanceof Jn(e).Element:!1}function Y(e){return qn()?e instanceof HTMLElement||e instanceof Jn(e).HTMLElement:!1}function Qn(e){return!qn()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Jn(e).ShadowRoot}function $n(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ur(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function er(e){return/^(table|td|th)$/.test(J(e))}function tr(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var nr=/transform|translate|scale|rotate|perspective|filter/,rr=/paint|layout|strict|content/,ir=e=>!!e&&e!==`none`,ar;function or(e){let t=Zn(e)?ur(e):e;return ir(t.transform)||ir(t.translate)||ir(t.scale)||ir(t.rotate)||ir(t.perspective)||!cr()&&(ir(t.backdropFilter)||ir(t.filter))||nr.test(t.willChange||``)||rr.test(t.contain||``)}function sr(e){let t=fr(e);for(;Y(t)&&!lr(t);){if(or(t))return t;if(tr(t))return null;t=fr(t)}return null}function cr(){return ar??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ar}function lr(e){return/^(html|body|#document)$/.test(J(e))}function ur(e){return Jn(e).getComputedStyle(e)}function dr(e){return Zn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fr(e){if(J(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Qn(e)&&e.host||Yn(e);return Qn(t)?t.host:t}function pr(e){let t=fr(e);return lr(t)?(e.ownerDocument||e).body:Y(t)&&$n(t)?t:pr(t)}function mr(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=pr(e),i=r===e.ownerDocument?.body,a=Jn(r);if(i){let e=hr(a);return t.concat(a,a.visualViewport||[],$n(r)?r:[],e&&n?mr(e):[])}return t.concat(r,mr(r,[],n))}function hr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var gr=en.useInsertionEffect,_r=gr&&gr!==en.useLayoutEffect?gr:e=>e();function X(e){let t=K(vr).current;return t.next=e,_r(t.effect),t.trampoline}function vr(){let e={next:void 0,callback:yr,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function yr(){}var Z=typeof document<`u`?C.useLayoutEffect:()=>{};function br(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var xr=br(`https://base-ui.com/production-error`,`Base UI`),Sr=C.createContext(void 0);function Cr(e=!1){let t=C.useContext(Sr);if(t===void 0&&!e)throw Error(xr(16));return t}function wr(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:C.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Tr(e){return e?.ownerDocument||document}function Er(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(Jn(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Dr(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=C.useRef(null),s=Cr(!0),c=a??s!==void 0,{props:l}=wr({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=C.useCallback(()=>{let e=o.current;Or(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return Z(u,[u]),{getButtonProps:C.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return Tn({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(Fn(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=Or(r),s=!i&&kr(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),Er(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),Er(r,e)))},onKeyUp(e){t||(Fn(e),a?.(e),e.target===e.currentTarget&&i&&c&&Or(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||c||e.defaultPrevented||e.key!==` `||(e.preventBaseUIHandler(),Er(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:X(e=>{o.current=e,u()})}}function Or(e){return Y(e)&&e.tagName===`BUTTON`}function kr(e){return Y(e)&&e.tagName===`A`&&!!e.href}var Ar=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function jr(){return C.useContext(Ar)}function Mr(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=jr(),u=C.useRef(-1),[d,f]=C.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=C.useRef(null),h=C.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return Z(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}function Nr(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Cr(),{ref:i,index:a}=Mr(e),o=n===a,s=C.useRef(null),c=ln(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}function Pr(e){let{render:t,className:n,style:r,state:i=q,props:a=bn,refs:o=bn,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=Nr({metadata:s});return Rn(l,e,{state:i,ref:[f,...o],props:[d,...a,u],stateAttributesMapping:c})}function Fr(e,t,n,r){let i=!1,a=!1,o=r??q;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function Ir(e,t,n){let r=n??q;return{reason:e,event:t??new Event(`base-ui`),...r}}var Lr=`none`,Rr=`trigger-press`,zr=`trigger-hover`,Br=`trigger-focus`,Vr=`outside-press`,Hr=`item-press`,Ur=`close-press`,Wr=`input-change`,Gr=`input-clear`,Kr=`input-press`,qr=`focus-out`,Jr=`escape-key`,Yr=`list-navigation`,Xr=`keyboard`,Zr=`pointer`,Qr=`cancel-open`,$r=`disabled`,ei=`imperative-action`,ti=`window-resize`,ni=C.forwardRef(function(e,t){let{className:n,defaultPressed:r=!1,disabled:i=!1,form:a,onPressedChange:o,pressed:s,render:c,type:l,value:u,nativeButton:d=!0,style:f,...p}=e,m=sn(u||void 0),h=Kn(),g=h?.value??[],_=(i||h?.disabled)??!1,[v,y]=$t({controlled:h?m!==void 0&&g.indexOf(m)>-1:s,default:r,name:`Toggle`,state:`pressed`}),{getButtonProps:b,buttonRef:x}=Dr({disabled:_,native:d}),S={disabled:_,pressed:v},T=[x,t],E=[{"aria-pressed":v,onClick(e){let t=!v,n=Fr(Lr,e.nativeEvent);o?.(t,n),n.isCanceled||(m&&h?.setGroupValue?.(m,t,n),n.isCanceled||y(t))}},p,b],D=Rn(`button`,e,{enabled:!h,state:S,ref:T,props:E}),O=C.useMemo(()=>({disabled:_,focusableWhenDisabled:!1}),[_]);return h?(0,w.jsx)(Pr,{tag:`button`,render:c,className:n,style:f,metadata:O,state:S,refs:T,props:E}):D});function ri(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=X(i),[,o]=C.useState(0),s=K(ai).current,c=K(ii).current,l=C.useRef(0),u=C.useRef(!0),d=C.useRef(null),f=C.useRef(null),p=X(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=X((e,t)=>{c.set(e,t),p()}),h=X(e=>{c.delete(e),p()}),g=X(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!ci(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&li(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=si(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=X(()=>{let[e,t]=oi(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});Z(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),Z(()=>{u.current&&v()}),Z(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=X(e=>(s.add(e),()=>{s.delete(e)})),b=C.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,w.jsx)(Ar.Provider,{value:b,children:t})}function ii(){return new Map}function ai(){return new Set}function oi(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>li(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function si(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function ci(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function li(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function ui(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function di(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:fi,platform:pi,maxTouchPoints:mi}=di(),hi=fi.toLowerCase(),gi=pi.toLowerCase(),_i=/^i(os$|p)/.test(gi)||gi===`macintel`&&mi>1,vi=`android`,yi=gi===vi||hi.includes(vi),bi=!_i&&gi.startsWith(`mac`);gi.startsWith(`win`),!yi&&/^(linux|chrome os)/.test(gi);var xi=bi||_i,Si=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`),Ci=!Si&&hi.includes(`firefox`);!Si&&hi.includes(`chrom`);var wi=xi,Ti=/jsdom|happydom/.test(hi),Ei=e(S(),1);function Di(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Oi(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Qn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ki(e,t){let n=e;for(;n;){if(Zn(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(Qn(n)?n.host:null)}return null}function Ai(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var ji=`data-base-ui-focusable`,Mi=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Ni=`ArrowLeft`,Pi=`ArrowRight`,Fi=`ArrowUp`,Ii=`ArrowDown`,Li=`data-starting-style`,Ri=`data-ending-style`,zi={[Li]:``},Bi={[Ri]:``},Vi={transitionStatus(e){return e===`starting`?zi:e===`ending`?Bi:null}},Hi=`data-open`,Ui=`data-closed`,Wi=Li,Gi=Ri,Ki=`data-anchor-hidden`,qi=`data-popup-open`,Ji=`data-pressed`,Yi={[qi]:``},Xi={[qi]:``,[Ji]:``},Zi={[Hi]:``},Qi={[Ui]:``},$i={[Ki]:``},ea={open(e){return e?Yi:null}},ta={open(e){return e?Xi:null}},na={open(e){return e?Zi:Qi},anchorHidden(e){return e?$i:null}},ra={...na,...Vi},ia=`data-trigger-disabled`;function aa(e,t){if(!Zn(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(ia);for(let[,e]of t.entries())if(Oi(e,n))return!e.hasAttribute(ia);return!1}function oa(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function sa(e){return e.matches(`html,body`)}function ca(e){return Y(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function la(e){return ki(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Mi}`)!=null}function ua(e){return e?e.getAttribute(`role`)===`combobox`&&ca(e):!1}function da(e){if(!e||Ti)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function fa(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function pa(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...pa(e,t.id,n)])}function ma(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function ha(e){e.preventDefault(),e.stopPropagation()}function ga(e){return`nativeEvent`in e}function _a(e){return e.pointerType===``&&e.isTrusted?!0:yi&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function va(e){return Ti?!1:!yi&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(yi||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function ya(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function ba(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var xa=Math.min,Sa=Math.max,Ca=Math.round,wa=Math.floor,Ta=e=>({x:e,y:e}),Ea={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Da(e,t,n){return Sa(e,xa(t,n))}function Oa(e,t){return typeof e==`function`?e(t):e}function ka(e){return e.split(`-`)[0]}function Aa(e){return e.split(`-`)[1]}function ja(e){return e===`x`?`y`:`x`}function Ma(e){return e===`y`?`height`:`width`}function Na(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Pa(e){return ja(Na(e))}function Fa(e,t,n){n===void 0&&(n=!1);let r=Aa(e),i=Pa(e),a=Ma(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Wa(o)),[o,Wa(o)]}function Ia(e){let t=Wa(e);return[La(e),t,La(t)]}function La(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ra=[`left`,`right`],za=[`right`,`left`],Ba=[`top`,`bottom`],Va=[`bottom`,`top`];function Ha(e,t,n){switch(e){case`top`:case`bottom`:return n?t?za:Ra:t?Ra:za;case`left`:case`right`:return t?Ba:Va;default:return[]}}function Ua(e,t,n,r){let i=Aa(e),a=Ha(ka(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(La)))),a}function Wa(e){let t=ka(e);return Ea[t]+e.slice(t.length)}function Ga(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Ka(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ga(e)}function qa(e){let{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 Ja(e,t,n){return Math.floor(e/t)!==n}function Ya(e,t){return t<0||t>=e.length}function Xa(e,t){return Q(e.current,{disabledIndices:t})}function Za(e,t){return Q(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Qa(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>Q(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:Ya(e,u)?-1:u,wrapped:d}}function Q(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&eo(e,a,r));return a}function $a(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=ki(e,`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1),r=i(t,u,n[o][e]??n[o][0]);o=a[r]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!eo(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=wa(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!eo(e,r,s))return r}};d&&ha(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=Q(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=Q(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}Ya(e,f)&&(f=u)}if(n===`both`){let n=wa(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&ha(t),u%o===o-1?r&&(f=Q(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Q(e,{startingIndex:u,disabledIndices:s}),r&&Ja(f,o,n)&&(f=Q(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),Ja(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&ha(t),u%o===0?r&&(f=Q(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Q(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&Ja(f,o,n)&&(f=Q(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),Ja(f,o,n)&&(f=u));let c=wa(l/o)===n;Ya(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:Q(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function eo(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!no(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function to(e){return e.visibility===`hidden`||e.visibility===`collapse`}function no(e,t=e?ur(e):null){return!e||!e.isConnected||!t||to(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var ro=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function io(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Qn(n)?n.host:null}function ao(e){for(let t of Array.from(e.children))if(J(t)===`summary`)return t;return null}function oo(e,t){let n=ao(t);return!!n&&(e===n||Oi(n,e))}function so(e){let t=e?J(e):``;return e!=null&&e.matches(ro)&&(t!==`summary`||e.parentElement!=null&&J(e.parentElement)===`details`&&ao(e.parentElement)===e)&&(t!==`details`||ao(e)==null)&&(t!==`input`||e.type!==`hidden`)}function co(e){if(!so(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=io(t)){let n=t!==e,r=J(t)===`slot`;if(t.hasAttribute(`inert`)||n&&J(t)===`details`&&!t.open&&!oo(e,t)||t.hasAttribute(`hidden`)||!r&&!lo(t,n))return!1}return!0}function lo(e,t){let n=ur(e);return t?n.display!==`none`:no(e,n)}function uo(e){let t=e.tabIndex;if(t<0){let t=J(e);if(t===`details`||t===`audio`||t===`video`||Y(e)&&e.isContentEditable)return 0}return t}function fo(e){if(J(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function po(e,t){let n=fo(e);if(!n)return!0;let r=t.find(e=>{let t=fo(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=fo(e);return t?.name===n.name&&t.form===n.form})===n}function mo(e){if(Y(e)&&J(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Y(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function ho(e,t){mo(e).forEach(e=>{so(e)&&t.push(e),ho(e,t)})}function go(e,t,n){mo(e).forEach(e=>{Y(e)&&e.matches(t)&&n.push(e),go(e,t,n)})}function _o(e){return co(e)&&uo(e)>=0}function vo(e){let t=[];return ho(e,t),t.filter(co)}function yo(e){let t=vo(e);return t.filter(e=>uo(e)>=0&&po(e,t))}function bo(e,t){let n=yo(e),r=n.length;if(r===0)return;let i=Di(Tr(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function xo(e){return bo(Tr(e).body,1)||e}function So(e){return bo(Tr(e).body,-1)||e}function Co(e,t,n){if(!e)return null;let r=[];ho(Tr(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(co);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!Oi(n,o)&&_o(o)&&po(o,a))return o}return r[i]}function wo(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Oi(n,r)}function To(e){yo(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Eo(e){let t=[];go(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var Do=`ArrowUp`,Oo=`ArrowDown`,ko=`ArrowLeft`,Ao=`ArrowRight`,jo=new Set([Do,Oo,ko,Ao,`Home`,`End`]),Mo=[`Shift`,`Control`,`Alt`,`Meta`];function No(e){return Y(e)&&e.tagName===`INPUT`}function Po(e){return!!(No(e)&&e.selectionStart!=null||Y(e)&&e.tagName===`TEXTAREA`)}function Fo(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=Io(e,t,`left`),a=Lo(e),o=Lo(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Io(e,t,`top`),r=Lo(e),i=Lo(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Io(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function Lo(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function Ro(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:s,rootRef:c,enableHomeAndEndKeys:l=!1,stopEventPropagation:u,disabledIndices:d,modifierKeys:f=bn}=e,[p,m]=C.useState(0),h=r!=null,g=C.useRef(null),_=ln(g,c),v=C.useRef([]),y=C.useRef(!1),b=C.useRef(null),x=o??p,S=X((e,t=!1)=>{if(b.current=v.current[e]??null,(s??m)(e),t){let t=v.current[e];Fo(g.current,t,a,n)}}),w=X(e=>{if(e.size===0)return;if(y.current){let e=v.current,t=e.indexOf(b.current);if(t===-1){let t=e[x];!t||eo(e,x,d)?S(zo(e,d)):b.current=t}else t!==x&&S(t);return}y.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)S(i);else if(eo(t,x,d)){let e=Q(t,{disabledIndices:d});Ya(t,e)||S(e)}Fo(g.current,r,a,n)});Z(()=>{if(d==null||o!=null||!y.current)return;let e=v.current;if(eo(e,x,d)){let t=Q(e,{disabledIndices:d});Ya(e,t)||S(t)}},[d,o,x,v,S]);let T=X((e,t,n)=>i?i(e,t,n,v):n),E=X(e=>{let o=e.key===`Home`||e.key===`End`;if(!jo.has(e.key)||!l&&o||Bo(e,f)||!g.current)return;let s=a===`rtl`,c=s?ko:Ao,p=s?Ao:ko,m=n===`vertical`?Oo:c,_=n===`vertical`?Do:p,y=Ai(e.nativeEvent);if(y!=null&&Po(y)&&!ui(y)){let t=y.selectionStart,n=y.selectionEnd,r=y.value;if(t==null||e.shiftKey||t!==n||e.key!==_&&t<r.length||e.key!==m&&t>0)return}let b=x,C=Xa(v,d),w=Za(v,d);r!=null&&(b=r({disabledIndices:d,elementsRef:v,event:e,highlightedIndex:x,loopFocus:t,maxIndex:w,minIndex:C,onLoop:T,orientation:n,rtl:s}));let E=n!==`vertical`&&e.key===c||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===p||n!==`horizontal`&&e.key===`ArrowUp`;l&&(e.key===`Home`?b=C:e.key===`End`&&(b=w)),b===x&&(E||D)&&(t&&b===w&&E?(b=C,i&&(b=i(e,x,b,v))):t&&b===C&&D?(b=w,i&&(b=i(e,x,b,v))):b=Q(v.current,{startingIndex:b,decrement:D,disabledIndices:d})),b!==x&&!Ya(v.current,b)&&(u&&e.stopPropagation(),(h||o||E||D)&&e.preventDefault(),S(b,!0),queueMicrotask(()=>{v.current[b]?.focus()}))});return{props:{ref:_,onFocus(e){let t=g.current,n=Ai(e.nativeEvent);t&&n!=null&&Po(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:E},highlightedIndex:x,onHighlightedIndexChange:S,elementsRef:v,onMapChange:w,relayKeyboardEvent:E}}function zo(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!eo(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function Bo(e,t){for(let n of Mo)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}var Vo=C.createContext(void 0);function Ho(){return C.useContext(Vo)?.direction??`ltr`}function Uo(e){let{render:t,className:n,style:r,refs:i=bn,props:a=bn,state:o=q,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:l,orientation:u,grid:d,loopFocus:f,onLoop:p,enableHomeAndEndKeys:m,onMapChange:h,stopEventPropagation:g=!0,rootRef:_,disabledIndices:v,modifierKeys:y,highlightItemOnHover:b=!1,tag:x=`div`,...S}=e,{props:T,highlightedIndex:E,onHighlightedIndexChange:D,elementsRef:O,onMapChange:k,relayKeyboardEvent:A}=Ro({grid:d,loopFocus:f,onLoop:p,orientation:u,highlightedIndex:c,onHighlightedIndexChange:l,rootRef:_,stopEventPropagation:g,enableHomeAndEndKeys:m,direction:Ho(),disabledIndices:v,modifierKeys:y}),j=Rn(x,e,{state:o,ref:i,props:[T,...a,S],stateAttributesMapping:s}),M=C.useMemo(()=>({highlightedIndex:E,onHighlightedIndexChange:D,highlightItemOnHover:b,relayKeyboardEvent:A}),[E,D,b,A]);return(0,w.jsx)(Sr.Provider,{value:M,children:(0,w.jsx)(ri,{elementsRef:O,onMapChange:e=>{h?.(e),k(e)},children:j})})}var Wo=C.createContext(void 0);function Go(e){let t=C.useContext(Wo);if(t===void 0&&!e)throw Error(xr(69));return t}var Ko=C.createContext(void 0);function qo(){return C.useContext(Ko)}var Jo=C.forwardRef(function(e,t){let{defaultValue:n,disabled:r=!1,loopFocus:i=!0,onValueChange:a,orientation:o=`horizontal`,multiple:s=!1,value:c,className:l,render:u,style:d,...f}=e,p=Go(!0),m=qo(),h=n??bn,g=c!==void 0||n!==void 0,_=(p?.disabled??!1)||(m?.disabled??!1)||r,[v,y]=$t({controlled:c,default:h,name:`ToggleGroup`,state:`value`}),b=X((e,t,n)=>{let r;s?(r=v.slice(),t?r.push(e):r.splice(v.indexOf(e),1)):r=t?[e]:[],a?.(r,n),n.isCanceled||y(r)}),x={disabled:_,multiple:s,orientation:o},S=C.useMemo(()=>({disabled:_,setGroupValue:b,value:v,isValueInitialized:g}),[_,b,v,g]),T={role:`group`},E=Rn(`div`,e,{enabled:!!p,state:x,ref:t,props:[T,f]});return(0,w.jsx)(Gn.Provider,{value:S,children:p?E:(0,w.jsx)(Uo,{render:u,className:l,style:d,state:x,refs:[t],props:[T,f],loopFocus:i,enableHomeAndEndKeys:!0,orientation:o})})});function Yo({className:e,...t}){return(0,w.jsx)(Jo,{"data-slot":`toggle-group`,className:Qt(`flex flex-wrap items-center gap-1.5`,e),...t})}var Xo={pill:`inline-flex h-7 items-center gap-2 rounded-control border border-rule bg-transparent px-3 text-sm text-muted transition-colors hover:border-accent hover:text-text data-pressed:border-accent data-pressed:bg-accent-soft data-pressed:font-semibold data-pressed:text-text`,segment:`inline-flex h-7 items-center justify-center gap-1.5 rounded-[6px] border-0 bg-transparent px-2 text-xs text-muted transition-colors hover:text-text data-pressed:bg-surface data-pressed:font-semibold data-pressed:text-text data-pressed:ring-1 data-pressed:ring-rule disabled:cursor-not-allowed disabled:line-through disabled:opacity-60`};function Zo({className:e,look:t=`pill`,...n}){return(0,w.jsx)(ni,{"data-slot":`toggle-group-item`,className:Qt(Xo[t],e),...n})}var Qo=[],$o=void 0;function es(){return $o}function ts(e){Qo.push(e)}function ns(e){let t=(t,n)=>{let r=K(is).current,i;try{$o=r;for(let e of Qo)e.before(r);i=e(t,n);for(let e of Qo)e.after(r);r.didInitialize=!0}finally{$o=void 0}return i};return t.displayName=e.displayName||e.name,t}function rs(e){return C.forwardRef(ns(e))}function is(){return{didInitialize:!1}}function as(e){C.useEffect(e,bn)}var os=0,ss=class e{static create(){return new e}currentId=os;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=os,t()},e)}isStarted(){return this.currentId!==os}clear=()=>{this.currentId!==os&&(clearTimeout(this.currentId),this.currentId=os)};disposeEffect=()=>this.clear};function cs(){let e=K(ss.create).current;return as(e.disposeEffect),e}function $(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ls(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function us(e){let t=K(ds,e).current;return t.next=e,Z(t.effect),t}function ds(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var fs=null;globalThis.requestAnimationFrame;var ps=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},ms=class e{static create(){return new e}static request(e){return ps.request(e)}static cancel(e){return ps.cancel(e)}currentId=fs;request(e){this.cancel(),this.currentId=ps.request(()=>{this.currentId=fs,e()})}cancel=()=>{this.currentId!==fs&&(ps.cancel(this.currentId),this.currentId=fs)};disposeEffect=()=>this.cancel};function hs(){let e=K(ms.create).current;return as(e.disposeEffect),e}var gs={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},_s={...gs,position:`fixed`,margin:0,top:0,left:0},vs={...gs,position:`absolute`},ys=C.forwardRef(function(e,t){let[n,r]=C.useState();Z(()=>{wi&&Si&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,w.jsx)(`span`,{...e,ref:t,style:_s,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function bs(e){return`data-base-ui-${e}`}var xs={style:{transition:`none`}},Ss=`data-base-ui-click-trigger`,Cs={fallbackAxisSide:`none`},ws={fallbackAxisSide:`end`},Ts={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Es=C.createContext(null),Ds=()=>C.useContext(Es),Os=bs(`portal`);function ks(e={}){let{ref:t,container:n,componentProps:r=q,elementProps:i}=e,a=on(),o=Ds()?.portalNode,[s,c]=C.useState(null),[l,u]=C.useState(null),d=X(e=>{e!==null&&u(e)}),f=C.useRef(null);Z(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(Xn(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=Rn(`div`,r,{ref:[t,d],props:[{id:a,[Os]:``},i]}),m=s&&p?Ei.createPortal(p,s):null;return{node:l,nodeId:C.isValidElement(p)?p.props.id:void 0,subtree:m}}var As=C.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=ks({container:o,ref:t,componentProps:e,elementProps:c}),f=C.useRef(null),p=C.useRef(null),m=C.useRef(null),h=C.useRef(null),[g,_]=C.useState(null),v=C.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;C.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&wo(e)&&(e.type===`focusin`?v.current&&=(Eo(l),!1):(To(l),v.current=!0))}return ls($(l,`focusin`,e,!0),$(l,`focusout`,e,!0))},[l,y]),Z(()=>{l&&b===!0&&v.current&&(Eo(l),v.current=!1)},[b,l]);let S=C.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,w.jsxs)(C.Fragment,{children:[d,(0,w.jsxs)(Es.Provider,{value:S,children:[x&&l&&(0,w.jsx)(ys,{"data-type":`outside`,ref:f,onFocus:e=>{wo(e,l)?m.current?.focus():So(g?g.domReference:null)?.focus()}}),x&&l&&(0,w.jsx)(`span`,{role:s,"aria-owns":u,style:Ts}),l&&Ei.createPortal(a,l),x&&l&&(0,w.jsx)(ys,{"data-type":`outside`,ref:p,onFocus:e=>{wo(e,l)?h.current?.focus():(xo(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,Fr(`focus-out`,e.nativeEvent)))}})]})]})});function js(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Ms=class{nodesRef={current:[]};events=js();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},Ns=C.createContext(null),Ps=C.createContext(null),Fs=()=>C.useContext(Ns)?.id||null,Is=e=>{let t=C.useContext(Ps);return e??t};function Ls(e){let t=on(),n=Is(e),r=Fs();return Z(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Rs(e){let{children:t,id:n}=e,r=Fs();return(0,w.jsx)(Ns.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function zs(e){let{children:t,externalTree:n}=e,r=K(()=>n??new Ms).current;return(0,w.jsx)(Ps.Provider,{value:r,children:t})}function Bs(e){return e==null?e:`current`in e?e.current:e}function Vs(){return!1}function Hs(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Us(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Vs,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=Is(c),m=X(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=X(()=>a),{escapeKey:v,outsidePress:y}=Hs(s),b=C.useRef(!1),x=C.useRef(!1),S=C.useRef(!1),w=C.useRef(!1),T=C.useRef(!1),E=C.useRef(``),D=C.useRef(null),O=cs(),k=cs(),A=cs(),j=X(()=>{k.clear(),d.current.insideReactTree=!1}),M=X(e=>{let t=d.current.floatingContext?.nodeId;return(p?pa(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),N=X(t=>oa(t,e.select(`floatingElement`))||oa(t,e.select(`domReferenceElement`))),P=X(t=>{o()&&e.setOpen(!1,Fr(Rr,t.nativeEvent))}),F=X(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=ga(t)?t.nativeEvent:t;if(T.current||i.isComposing||!v&&M(`__escapeKeyBubbles`))return;let a=Fr(Jr,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),I=X(()=>{d.current.insideReactTree=!0,k.start(0,j)}),L=X(t=>{if(!l||!n||t.button!==0)return;let r=Ai(t.nativeEvent);Oi(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),ee=X(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});C.useEffect(()=>{function e(e){e.open||(w.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),C.useEffect(()=>j,[j]),C.useEffect(()=>{if(!l||!n)return l||(w.current=!1,T.current=!1,E.current=``,D.current=null),j;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new ss,i=Tr(u);function a(){A.clear(),T.current=!0}function o(){T.current=!0,A.start(Si?5:0,()=>{T.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=E.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function C(e){let t=d.current.floatingContext?.nodeId,n=p&&pa(p.nodesRef.current,t).some(t=>oa(e,t.context?.elements.floating));return N(e)||n}function k(n){if(m(n)){n.type!==`click`&&!N(n)&&(t.clear(),S.current=!1),j();return}if(d.current.insideReactTree){j();return}let r=Ai(n),i=`[${bs(`inert`)}]`,a=Zn(r)?r.getRootNode():null,o=Array.from((Qn(a)?a:Tr(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Oi(e,r))))return;let c=Zn(r)?r:null;for(;c&&!lr(c);){let e=fr(c);if(lr(e)||!Zn(e))break;c=e}if(!(o.length&&Zn(r)&&!sa(r)&&!Oi(r,e.select(`floatingElement`))&&o.every(e=>!Oi(c,e)))){if(Y(r)&&!(`touches`in n)){let e=lr(r),t=ur(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!C(n)){if(f()===`intentional`){if(n.detail!==0&&!_a(n)&&!w.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||M(`__outsidePressBubbles`)||(e.setOpen(!1,Fr(Vr,n)),j())}}}function P(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!N(t)&&k(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||N(t))return;let r=t.touches[0];r&&(D.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{D.current&&(D.current.dismissOnTouchEnd=!1,D.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=Ai(e);if(!n)return;let r=$(n,e.type,()=>{t(e),r()})}function ee(e){E.current=`touch`,L(e,I)}function R(e){O.clear(),e.type===`pointerdown`&&(e.button===0&&(w.current=!0),E.current=e.pointerType),(e.type!==`mousedown`||!D.current||D.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?P(e):k(e)})}function te(e){if(e.type===`pointercancel`&&(w.current=!1),!b.current)return;let n=x.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():C(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),S.current=!0,j())))}function z(e){if(f()!==`sloppy`||!D.current||N(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-D.current.startX),r=Math.abs(t.clientY-D.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(D.current.dismissOnTouchEnd=!0),i>10&&(k(e),O.clear(),D.current=null)}function B(e){L(e,z)}function ne(e){f()===`sloppy`&&D.current&&!N(e)&&(D.current.dismissOnTouchEnd&&k(e),O.clear(),D.current=null)}function re(e){L(e,ne)}let V=ls(r&&ls($(i,`keydown`,F),$(i,`compositionstart`,a),$(i,`compositionend`,o)),g&&ls($(i,`click`,R,!0),$(i,`pointerdown`,R,!0),$(i,`pointerup`,te,!0),$(i,`pointercancel`,te,!0),$(i,`mousedown`,R,!0),$(i,`mouseup`,te,!0),$(i,`touchstart`,ee,{capture:!0,passive:!0}),$(i,`touchmove`,B,{capture:!0,passive:!0}),$(i,`touchend`,re,{capture:!0,passive:!0})));return()=>{V(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,F,j,_,M,N,p,e,O,A]);let R=C.useMemo(()=>({onKeyDown:F,onPointerDown:P,onClick:P}),[F,P]),te=C.useMemo(()=>({onKeyDown:F,onPointerDown:ee,onMouseDown:ee,onClickCapture:I,onMouseDownCapture(e){I(),L(e)},onPointerDownCapture(e){I(),L(e)},onMouseUpCapture:I,onTouchEndCapture:I,onTouchMoveCapture:I}),[F,I,L,ee]);return C.useMemo(()=>n?{reference:R,floating:te,trigger:R}:{},[n,R,te])}function Ws(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),Z(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};Zn(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function Gs(e,t=!1,n=!1,r=!1){let[i,a]=C.useState(e&&t?`idle`:void 0),[o,s]=C.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),Z(()=>{if(!e&&o&&i!==`ending`&&n){let e=ms.request(()=>{a(`ending`)});return()=>{ms.cancel(e)}}},[e,o,i,n]),Z(()=>{if(!e||t||i===void 0)return;let n=ms.request(()=>{a(void 0)});return()=>{ms.cancel(n)}},[t,e,i]),Z(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=ms.request(()=>{a(`idle`)});return()=>{ms.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function Ks(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var qs=null;function Js(e){if(!qs){let e=[];qs=e,queueMicrotask(()=>{qs=null,Ei.flushSync(()=>{for(let t of e)t()})})}qs.push(e)}function Ys(e,t=!1,n=!1){let r=hs();return X((i,a=null)=>{r.cancel();let o=Bs(e);if(o==null)return;let s=o,c=()=>{n?Js(()=>{a?.aborted||i()}):Ei.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(Ks(s).map(e=>e.finished.then(yn))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(Ks(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=Li;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function Xs(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=X(a),s=Ys(r,n,i);C.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function Zs(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=X(i),{mounted:c,setMounted:l,transitionStatus:u}=Gs(t,!1,!1,o),d=!t&&r;Z(()=>{t&&s(!1)},[t,s]);let f=C.useRef(c),p=C.useRef(!1),m=tn(),h=()=>{f.current=!1,l(!1),a()};Z(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=X(()=>{f.current&&(t?(p.current=!0,m()):h())});return Xs({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var Qs={tabIndex:-1,[ji]:``};function $s(e){return t=>t!==`touch`||e.current}function ec(e,t=!1){let n=on(),r=Fs()!=null,i=K(()=>e(n,r)).current;return Ws({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function tc({handle:e,store:t}){return Z(()=>e.attachStore(t),[e,t]),null}function nc(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function rc(e,t){let n=C.useRef(null);return X(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),nc(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),nc(t))})}function ic(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function ac(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function oc(e,t,n,r={}){let i=n.reason,a=i===zr,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=ac(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=ic(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?Ei.flushSync(l):l()}function sc(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=rc(e,n),o=X(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=X(e=>{a(e),e&&o(e)});return Z(()=>(s(t.current),()=>s(null)),[s,t,n,e]),Z(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function cc(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=C.useRef(null),i=e.useState(`open`);Z(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=Fr(Lr);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function lc(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=Zs({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return K(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function uc(e,t){e.useSyncedValues(t),Z(()=>()=>{e.update({activeTriggerProps:q,inactiveTriggerProps:q,popupProps:q})},[e])}function dc(e,t){Z(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),Z(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var fc=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},pc=n((e=>{var n=t();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),mc=n(((e,t)=>{t.exports=pc()})),hc=n((e=>{var n=t(),r=mc();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=n.useRef,c=n.useEffect,l=n.useMemo,u=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),gc=n(((e,t)=>{t.exports=hc()})),_c=mc(),vc=gc(),yc=gn(19)?Sc:Cc;function bc(e,t,n,r,i){return yc(e,t,n,r,i)}function xc(e,t,n,r,i){let a=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,_c.useSyncExternalStore)(e.subscribe,a,a)}ts({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,_c.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Sc(e,t,n,r,i){let a=es();if(!a)return xc(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Cc(e,t,n,r,i){return(0,vc.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var wc=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return bc(this,e,t,n,r)}},Tc=class extends wc{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){C.useDebugValue(e);let n=this;Z(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;Z(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;Z(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){C.useDebugValue(e);let n=this,r=t!==void 0;Z(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return C.useDebugValue(e),bc(this,this.selectors[e],t,n,r)}useContextCallback(e,t){C.useDebugValue(e);let n=X(t??yn);this.context[e]=n}useStateSetter(e){let t=C.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Ec={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Dc=class extends Tc{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:js(),nested:n,triggerElements:i},Ec),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&ba(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}},Oc={home:`M3 10.5 10 4l7 6.5M5 9v7h4v-4h2v4h4V9`,flow:`M6 4v4m0 4v4M6 8a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm0 0h5a3 3 0 0 1 3 3v1m0 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z`,spark:`M10 3v3m0 8v3M3 10h3m8 0h3M5.5 5.5l2 2m5 5 2 2m0-9-2 2m-5 5-2 2`,doc:`M6 3h5l4 4v10H6zM11 3v4h4M8.5 11h4M8.5 14h4`,folder:`M3 6.5V15h14V8H9.5L8 6H3.5`,chart:`M4 16V9m4 7V5m4 11v-5m4 5V8`,graph:`M3 6a2 2 0 1 0 4 0 2 2 0 1 0-4 0m10-1a2 2 0 1 0 4 0 2 2 0 1 0-4 0m-5 10a2 2 0 1 0 4 0 2 2 0 1 0-4 0M7 5.8l6-.6M5.7 7.9l3.6 5.3m5-6.3-3.4 6.3`,search:`M9 15a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm4.5-1.5L17 17`,chevron:`m7 8 3 3 3-3`,right:`m8 6 4 4-4 4`,left:`m12 6-4 4 4 4`,close:`m6 6 8 8m0-8-8 8`,copy:`M7 7V4h9v9h-3M4 7h9v9H4z`,refresh:`M16 10a6 6 0 1 1-1.8-4.3M16 4v3h-3`,theme:`M10 3a7 7 0 1 0 7 7 5 5 0 0 1-7-7Z`,terminal:`M3 4h14v12H3zM6 8l2.5 2L6 12m4 0h4`,check:`m5 10.5 3 3 7-7`,play:`M7 5v10l8-5z`,factory:`M3 17V9l4 2.5V9l4 2.5V5h3l1 12zM3 17h14`,plus:`M10 4v12M4 10h12`,external:`M11 4h5v5M16 4l-7 7M14 12v4H4V6h4`,sidebar:`M3 4h14v12H3zM8 4v12`,code:`m7 6-4 4 4 4m6-8 4 4-4 4`,eye:`M2.5 10S5 4.5 10 4.5 17.5 10 17.5 10 15 15.5 10 15.5 2.5 10 2.5 10Zm7.5 2.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z`,pencil:`m12.5 4.5 3 3L7 16H4v-3zM11 6l3 3`,more:`M5 10h.01M10 10h.01M15 10h.01`,trash:`M4 6h12M8 6V4h4v2M6 6l1 10h6l1-10M9 9v4m2-4v4`};function kc({name:e,className:t}){return(0,w.jsx)(`svg`,{className:Qt(`size-4 flex-none fill-none stroke-current [stroke-linecap:round] [stroke-linejoin:round] [stroke-width:1.6]`,t),viewBox:`0 0 20 20`,"aria-hidden":`true`,focusable:`false`,children:(0,w.jsx)(`path`,{d:Oc[e]})})}var Ac=C.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=Dr({disabled:i,focusableWhenDisabled:a,native:o});return Rn(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})}),jc=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Mc=De,Nc=((e,t)=>n=>{if(t?.variants==null)return Mc(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=jc(t)||jc(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Mc(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)})(`inline-flex shrink-0 items-center justify-center gap-2 rounded-control border font-medium whitespace-nowrap transition-colors select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none`,{variants:{variant:{default:`border-rule bg-surface text-text hover:border-accent hover:bg-accent-soft`,primary:`border-accent bg-accent-soft font-semibold text-text hover:bg-accent hover:text-on-accent`,ghost:`border-transparent bg-transparent text-muted hover:border-rule hover:bg-surface hover:text-text`,link:`border-transparent bg-transparent px-0 text-accent underline-offset-3 hover:underline`,danger:`border-bad bg-bad-soft font-semibold text-bad hover:bg-bad hover:text-page`},size:{default:`h-8 px-3 text-sm`,sm:`h-7 px-2.5 text-xs`,icon:`size-8`,"icon-sm":`size-7`}},defaultVariants:{variant:`default`,size:`default`}});function Pc({className:e,variant:t,size:n,type:r=`button`,...i}){return(0,w.jsx)(Ac,{"data-slot":`button`,type:r,className:Qt(Nc({variant:t,size:n}),e),...i})}export{Yo as $,hr as $n,ea as $t,Fs as A,Gr as An,oe as Ar,Ka as At,ys as B,Rr as Bn,S as Br,ha as Bt,Ys as C,Qr as Cn,on as Cr,Pa as Ct,Rs as D,qr as Dn,Te as Dr,ja as Dt,Bs as E,Jr as En,De as Er,Ia as Et,Ss as F,Lr as Fn,P as Fr,qa as Ft,us as G,Dr as Gn,aa as Gt,vs as H,Fr as Hn,pa as Ht,xs as I,Vr as In,j as Ir,Ca as It,ss as J,Z as Jn,da as Jt,ls as K,Tr as Kn,ua as Kt,Cs as L,Zr as Ln,A as Lr,ya as Lt,As as M,Hr as Mn,te as Mr,Na as Mt,ks as N,Xr as Nn,R as Nr,Sa as Nt,zs as O,ei as On,we as Or,Ua as Ot,Ds as P,Yr as Pn,F as Pr,xa as Pt,rs as Q,Yn as Qn,ta as Qt,ws as R,Br as Rn,D as Rr,_a as Rt,Xs as S,ri as Sn,sn as Sr,Aa as St,Us as T,$r as Tn,Qt as Tr,Ma as Tt,ms as U,Ir as Un,fa as Ut,_s as V,ti as Vn,ma as Vt,hs as W,Mr as Wn,la as Wt,as as X,ur as Xn,na as Xt,cs as Y,X as Yn,ia as Yt,ns as Z,sr as Zn,ra as Zt,uc as _,Si as _n,q as _r,eo as _t,Tc as a,Wi as an,or as ar,xo as at,sc as b,bi as bn,ln as br,Oa as bt,fc as c,Ni as cn,lr as cr,wo as ct,oc as d,Di as dn,er as dr,$a as dt,qi as en,J as er,Zo as et,ac as f,ki as fn,tr as fr,Za as ft,lc as g,Ci as gn,bn as gr,Ya as gt,cc as h,Ti as hn,Tn as hr,no as ht,Dc as i,Hi as in,Jn as ir,vo as it,Is as j,Kr as jn,re as jr,ka as jt,Ls as k,Wr as kn,be as kr,Wa as kt,Qs as l,Pi as ln,$n as lr,_o as lt,ic as m,Ai as mn,Rn as mr,Qa as mt,Nc as n,Ui as nn,mr as nr,Ho as nt,gc as o,Vi as on,Zn as or,So as ot,$s as p,Oi as pn,cr as pr,Xa as pt,$ as q,xr as qn,ca as qt,kc as r,Gi as rn,fr as rr,jo as rt,mc as s,Ii as sn,Y as sr,Co as st,Pc as t,Ji as tn,dr as tr,Go as tt,tc as u,Fi as un,Qn as ur,yo as ut,ec as v,yi as vn,yn as vr,Da as vt,Gs as w,Ur as wn,$t as wr,Fa as wt,Zs as x,ui as xn,K as xr,wa as xt,dc as y,_i as yn,gn as yr,Ta as yt,bs as z,zr as zn,E as zr,va as zt};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t,t as n}from"./jsx-runtime-MZURdZre.js";import{Bt as r,Cn as i,Fn as a,Gn as o,Hn as s,Jn as c,Kn as l,L as u,M as d,Pn as f,S as p,Tr as m,Wt as h,Xt as g,Y as _,Yn as v,jn as y,mn as b,mr as x,on as S,or as C,pn as w,qn as T,r as E}from"./button-Br0O1sXw.js";import{_ as D,a as O,c as k,l as A,m as j,o as M,v as N}from"./fields-6aXBpFhJ.js";import{S as ee,t as P}from"./useAnchoredPopupScrollLock-Bj-FWb8z.js";import{d as F,f as te,i as I,m as ne,n as L,p as re,r as ie,t as ae,u as R}from"./select-CnaMd617.js";import{$ as z,Q as oe,Z as B,_t as se,at as V,ct as ce,dt as le,et as ue,ft as H,it as de,lt as fe,nt as U,ot as pe,rt as me,st as he,tt as ge,ut as W,vt as G,yt as _e}from"./index-Df8L1LQa.js";var K=e(t(),1),ve=K.forwardRef(function(e,t){let{render:n,className:c,nativeButton:u=!0,disabled:d=!1,id:p,style:m,...h}=e,{state:g,disabled:y,setTouched:S,validationMode:C,validation:T}=j(),{labelId:E}=A(),D=H(),O=D.useState(`selectionMode`),N=D.useState(`disabled`),P=D.useState(`readOnly`),F=D.useState(`required`),I=D.useState(`positionerElement`),L=D.useState(`listElement`),ie=D.useState(`popupId`),ae=D.useState(`triggerProps`),R=D.useState(`inputInsidePopup`),z=D.useState(`id`),oe=D.useState(`labelId`),B=D.useState(`open`),se=D.useState(`selectedValue`),ce=D.useState(`activeIndex`),ue=D.useState(`selectedIndex`),de=D.useState(`hasSelectedValue`),U=W(),me=le(),ge=_(),G=y||N||d,_e=V(),ve=pe(D),q=K.useRef(null),J=M(G,q);k({id:R?p:void 0});let Y=R?p??z:p,ye=te(E,oe),X;B&&R?X=ie??fe(z):B&&(X=L?.id);let Z=K.useRef(``);function Q(e){Z.current=e.pointerType}let{reference:be}=ne(U,{enabled:!B&&!P&&!N&&O===`single`,listRef:D.context.labelsRef,activeIndex:ce,selectedIndex:ue,onMatch(e){let t=D.context.valuesRef.current[e];t!==void 0&&D.context.setSelectedValue(t,s(a))}}),{reference:$}=ee(U,{enabled:!N,event:`mousedown`}),{buttonRef:xe,getButtonProps:Se}=o({native:u,disabled:G}),Ce={...g,readOnly:P,open:B,disabled:G,popupSide:ve,listEmpty:_e,placeholder:O!==`none`&&!de},we=v(e=>{D.set(`triggerElement`,e)});return x(`button`,e,{ref:[t,xe,q,we],state:Ce,props:[ae,$,be,{id:Y,tabIndex:R?0:-1,role:R?`combobox`:void 0,"aria-expanded":B,"aria-haspopup":R?`dialog`:`listbox`,"aria-controls":X,"aria-required":R&&F||void 0,"aria-readonly":R&&P||void 0,"aria-labelledby":ye,onPointerDown:Q,onPointerEnter:Q,onFocus(){J(!0),G||ge.start(0,D.context.forceMount)},onBlur(e){if(!w(I,e.relatedTarget)&&(S(!0),J(!1),C===`onBlur`)){let e=O===`none`?me:se;T.commit(e)}},onMouseDown(e){if(G||(R||U.set(`domReferenceElement`,e.currentTarget),D.context.forceMount(),Z.current!==`touch`&&(D.context.inputRef.current?.focus(),R||e.preventDefault()),B))return;let t=l(e.currentTarget);function n(e){let t=D.state.triggerElement;if(!t)return;let n=b(e),r=D.state.positionerElement,a=D.state.listElement;w(t,n)||w(r,n)||w(a,n)||re(e,t)||D.context.setOpen(!1,s(i,e))}R&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(r(e),D.context.setOpen(!0,s(f,e.nativeEvent)),D.context.inputRef.current?.focus())}},T.getValidationProps(G,h),Se],stateAttributesMapping:he})});function q(e,t,n,r){if(e.baseUIHandlerPrevented)return;let i=b(e.nativeEvent),a=C(i)?i:null;(a===e.currentTarget||!r?.(a)&&!h(a))&&(e.preventDefault(),n||(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,s(y,e.nativeEvent))))}var J=K.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=j(),s=H(),c=s.useState(`open`),l=s.useState(`disabled`),u=s.useState(`readOnly`),d=s.useState(`hasSelectedValue`),f=s.useState(`selectionMode`),p=pe(s),m=l,h=V(),g=f!==`none`&&!d,_={...o,open:c,disabled:m,readOnly:u,popupSide:p,listEmpty:h,placeholder:g},y=v(e=>{s.set(`inputGroupElement`,e)});return x(`div`,e,{ref:[t,y],props:[{role:`group`,onMouseDown(e){q(e,s,m,e=>w(s.context.chipsContainerRef.current,e))}},a],state:_,stateAttributesMapping:he})}),Y=K.createContext(void 0);function ye(){let e=K.useContext(Y);if(e===void 0)throw Error(T(20));return e}var X=n(),Z=K.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=H(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,X.jsx)(Y.Provider,{value:n,children:(0,X.jsx)(d,{ref:t,...r})}):null}),Q=K.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:s,sideOffset:l,alignOffset:d,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p,arrowPadding:m,sticky:h,disableAnchorTracking:g=!1,collisionAvoidance:_=u,style:y,...b}=e,x=H(),S=W(),C=ye(),w=x.useState(`modal`),T=x.useState(`open`),E=x.useState(`mounted`),k=x.useState(`openMethod`),A=x.useState(`positionerElement`),j=x.useState(`triggerElement`),M=x.useState(`inputElement`),N=x.useState(`inputGroupElement`),ee=x.useState(`inputInsidePopup`),F=x.useState(`transitionStatus`),te=V(),I=_e({anchor:i??(ee?j:N??M),floatingRootContext:S,positionMethod:a,mounted:E,side:o,sideOffset:l,align:s,alignOffset:d,arrowPadding:m,collisionBoundary:f,collisionPadding:p,sticky:h,disableAnchorTracking:g,keepMounted:C,collisionAvoidance:_,lazyFlip:!0});P(T&&w,k===`touch`,A,j);let ne={open:T,side:I.side,align:I.align,anchorHidden:I.anchorHidden,empty:te};c(()=>{x.set(`popupSide`,I.side)},[x,I.side]);let L=v(e=>{x.set(`positionerElement`,e)}),re=se(e,ne,{styles:I.positionerStyles,transitionStatus:F,props:b,refs:[t,L],hidden:!E,inert:!T});return(0,X.jsxs)(me.Provider,{value:I,children:[E&&w&&(0,X.jsx)(O,{inert:D(!T),cutout:N??M??j}),re]})}),be={...g,...S},$=K.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,l=H(),u=de(),d=W(),f=l.useState(`mounted`),m=l.useState(`open`),h=l.useState(`openMethod`),g=l.useState(`popupProps`),_=l.useState(`transitionStatus`),v=l.useState(`inputInsidePopup`),y=l.useState(`inputElement`),S=l.useState(`modal`),C=l.useState(`id`),T=V(),E=s.id??(v?fe(C):void 0);c(()=>(l.set(`popupId`,l.context.popupRef.current?.id||E),()=>{l.set(`popupId`,void 0)}),[l,E]),p({open:m,ref:l.context.popupRef,onComplete(){m&&l.context.onOpenChangeComplete(!0)}});let D={open:m,side:u.side,align:u.align,anchorHidden:u.anchorHidden,transitionStatus:_,empty:T},O=x(`div`,e,{state:D,ref:[t,l.context.popupRef],props:[g,{id:E,role:v?`dialog`:`presentation`,onFocus(e){let t=b(e.nativeEvent);h!==`touch`&&(w(l.state.listElement,t)||t===e.currentTarget)&&l.context.inputRef.current?.focus()}},G(_),s],stateAttributesMapping:be}),k=a===void 0?v?e=>e===`touch`?l.context.popupRef.current:y:!1:a,A;A=o??(v?void 0:!1);let j=!v||S;return(0,X.jsx)(N,{context:d,disabled:!f,modal:j,openInteractionType:h,initialFocus:k,returnFocus:A,getInsideElements:()=>[l.context.startDismissRef.current,l.context.endDismissRef.current],children:(0,X.jsxs)(K.Fragment,{children:[O,j&&(0,X.jsx)(U,{ref:l.context.endDismissRef})]})})});function xe(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,X.jsx)(ce,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var Se=K.forwardRef(function(e,t){let{selected:n}=z();return e.keepMounted||n?(0,X.jsx)(F,{...e,selected:n,ref:t}):null}),Ce=xe;function we({className:e,...t}){return(0,X.jsxs)(J,{"data-slot":`combobox-input-group`,className:m(`relative flex items-center`,e),children:[(0,X.jsx)(ge,{"data-slot":`combobox-input`,className:m(R,`placeholder:text-muted focus:border-accent`),...t}),(0,X.jsx)(ve,{"data-slot":`combobox-trigger`,"aria-label":`Show options`,className:`absolute inset-y-0 right-0 flex w-9 items-center justify-center outline-none`,children:(0,X.jsx)(E,{name:`chevron`,className:ae})})]})}function Te({className:e,...t}){return(0,X.jsx)(Z,{children:(0,X.jsx)(Q,{sideOffset:6,className:`z-40`,children:(0,X.jsx)($,{"data-slot":`combobox-content`,className:m(I,e),...t})})})}var Ee=ue;function De({className:e,...t}){return(0,X.jsx)(B,{"data-slot":`combobox-empty`,className:m(`px-2.5 py-1.5 text-sm text-muted empty:hidden`,e),...t})}function Oe({className:e,children:t,...n}){return(0,X.jsxs)(oe,{"data-slot":`combobox-item`,className:m(L,e),...n,children:[(0,X.jsx)(`span`,{className:`truncate`,children:t}),(0,X.jsx)(Se,{className:ie,children:(0,X.jsx)(E,{name:`check`,className:`size-4`})})]})}export{Oe as a,we as i,Te as n,Ee as o,De as r,Ce as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{xt as e}from"./index-Df8L1LQa.js";import{o as t}from"./studio-queries-ibmpFo6R.js";import{t as n}from"./jsx-runtime-MZURdZre.js";var r=n();function i({companionPath:e,reason:t}){return(0,r.jsxs)(`section`,{className:`error mx-8 grid gap-1.5 rounded-card border border-[color-mix(in_srgb,var(--bad)_40%,var(--border))] bg-bad-soft px-5 py-4 max-sm:mx-4`,children:[(0,r.jsx)(`h2`,{className:`m-0 text-md font-semibold text-bad`,children:`Could not read this companion`}),(0,r.jsx)(`p`,{className:`m-0 font-mono text-xs break-all`,children:e}),(0,r.jsx)(`p`,{className:`m-0 text-sm`,children:t})]})}function a({view:n,search:a,children:o}){let{data:s}=e(t(n,a));return s.error?(0,r.jsx)(i,{companionPath:s.error.companionPath,reason:s.error.reason}):(0,r.jsx)(r.Fragment,{children:o(s)})}export{a as t};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{A as e,B as t,C as n,D as r,E as i,H as a,O as o,S as s,U as c,V as l,W as u,_ as d,b as f,f as p,g as m,h,j as g,k as _,m as v,p as y,pt as b,u as x,v as S,x as C,xt as w,y as T,z as E}from"./index-Df8L1LQa.js";import{C as D,D as O,E as ee,F as te,I as ne,P as re,S as ie,b as ae,n as k,p as oe,pt as se,s as ce,w as le,x as ue}from"./studio-queries-ibmpFo6R.js";import{a as de,n as fe,t as pe}from"./jsx-runtime-MZURdZre.js";import{Br as me,Dr as A,Tr as j,r as M,t as N,zr as P}from"./button-Br0O1sXw.js";import{t as he}from"./warnings-R1cE1rLf.js";import{i as ge,t as _e}from"./artifacts-WD2ZXYrx.js";import{c as ve,d as ye,s as be,u as xe}from"./store-Dw34catY.js";import{a as Se,c as Ce,l as we,o as Te,s as Ee}from"./select-CnaMd617.js";import{a as De,i as Oe,o as ke,r as Ae,s as je}from"./panel-dbmCx7Mx.js";import{t as F}from"./useMutation-aAr2uiay.js";import{t as Me}from"./fields-6aXBpFhJ.js";import{t as Ne}from"./react-3QStrcDO.js";import{t as Pe}from"./report-url-XRL0x1SY.js";import"./studio-Cpz_HRHp.js";import{t as Fe}from"./spinner-Dcm3fqK1.js";function Ie(e){if(Array.isArray(e.questions)&&e.questions.length>0)return e.questions;let t=e;return typeof t.question==`string`?[t]:[]}function Le(e,t){return t===`failed`||t===`interrupted`?null:`Workset ${e} has no failed or interrupted run to retry`}var Re=[`start`,`later`,`answer`,`take-control`,`return`,`retry`,`cancel`,`feedback`,`regenerate`,`start-apply`,`publish`,`delete`],ze=`the AFK runner needs the appliance's factory mode for this companion`;function Be(e,t,n,r){let{id:i,stage:a,stageLabel:o}=t,s=n?.state??`idle`;if(e===`start`)return a===`done`?`Workset ${i} is done`:null;if(e===`later`)return a===`done`?`Workset ${i} is done`:a!==`clarify-intent`||s===`running`||s===`waiting`?`work on Workset ${i} has begun (${o}, ${s}); it can no longer move to Later`:null;if(!r.runner)return ze;switch(e){case`answer`:return s===`waiting`?null:`this question was already answered`;case`take-control`:return n?.conversation?n.control?`a person already has, or asked for, this Outcome's conversation`:a===`done`?`Workset ${i} is done`:null:`this Outcome has no factory conversation to take over`;case`return`:return n?.control&&n.control.mode!==`automatic`?null:`the factory already drives this Outcome`;case`retry`:return Le(i,s);case`cancel`:return s===`queued`||s===`running`?null:`Workset ${i} has no run to cancel`;case`feedback`:return a===`human-review`||a===`apply`||a===`merge-wait`?null:`Workset ${i} takes no feedback at ${o}; start a new outcome instead`;case`regenerate`:case`start-apply`:return a===`human-review`?null:`Workset ${i} is not in the Human Reviews; it is at ${o}`;case`publish`:return a===`publish`?null:`Workset ${i} is not merged and archived; it is at ${o}`;case`delete`:return a===`done`?`Workset ${i} is done`:t.changes.length>0?`Workset ${i} has a change (${t.changes.join(`, `)}); only an Outcome without one can be deleted`:n?.control?`a person has taken over this Outcome; return it to automation first`:null}}function I(e,t,n){return new Set(Re.filter(r=>Be(r,e,t,n)===null))}var Ve=de(me(),1),L=de(fe(),1),R=pe(),He={spec:`Spec`,tasks:`Tasks`};function Ue({companion:e,dir:t}){let n=A(oe(e,`${t}/specs`));if(n.isPending)return(0,R.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Loading…`});if(n.isError)return(0,R.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`The spec could not be read.`});let r=(n.data?.entries??[]).filter(e=>e.kind===`directory`);return r.length===0?(0,R.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`The change has no spec yet.`}):(0,R.jsx)(R.Fragment,{children:r.map(t=>(0,R.jsxs)(`section`,{"aria-label":`Spec ${t.name}`,children:[r.length>1?(0,R.jsx)(`h3`,{className:`mono`,children:t.name}):null,(0,R.jsx)(_e,{companion:e,path:`${t.path}/spec.md`})]},t.path))})}function We({companion:e,change:t,doc:n,onBack:r}){let i=`openspec/changes/${t}`,a=(0,L.useRef)(null);return(0,L.useEffect)(()=>a.current?.focus(),[]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`header`,{className:`outcome-dialog-head outcome-report-head`,children:[(0,R.jsxs)(`button`,{ref:a,type:`button`,className:`outcome-report-back`,onClick:r,children:[(0,R.jsx)(M,{name:`left`}),` Back`]}),(0,R.jsxs)(`h2`,{children:[He[n],` · `,(0,R.jsx)(`span`,{className:`mono`,children:t})]})]}),(0,R.jsx)(`div`,{className:`outcome-doc`,"data-outcome-doc":n,children:n===`spec`?(0,R.jsx)(Ue,{companion:e,dir:i}):(0,R.jsx)(_e,{companion:e,path:`${i}/tasks.md`})})]})}var z=(0,L.createContext)(``),B=[{kind:`subscription`,tab:`Claude subscription`,label:`Subscription token`,hint:(0,R.jsxs)(`ol`,{className:`note agents-steps`,children:[(0,R.jsxs)(`li`,{children:[`In a terminal on your own machine, run `,(0,R.jsx)(`code`,{children:`claude setup-token`}),`.`]}),(0,R.jsx)(`li`,{children:`Sign in with your Claude account in the browser it opens.`}),(0,R.jsxs)(`li`,{children:[`Paste the token it prints below. It starts with `,(0,R.jsx)(`code`,{children:`sk-ant-oat`}),` and is valid for a year.`]})]})},{kind:`api-key`,tab:`API key`,label:`Anthropic API key`,hint:(0,R.jsx)(`p`,{className:`note`,children:`Agents bill this key. It starts with sk-ant-api.`})}],Ge={subscription:`Claude subscription token`,"api-key":`Anthropic API key`};function Ke(e){if(!e)return`Checking…`;if(!e.kind)return`No credential set. Worksets cannot start agents until one is.`;let t=e.source===`studio`?`set in Studio${e.setAt?` on ${new Date(e.setAt).toLocaleString()}`:``}`:`supplied at startup`;return`${Ge[e.kind]}, ${t}.`}function qe(e,t){e.preventDefault();let n=e.currentTarget,r=new FormData(n).get(t);return n.reset(),typeof r==`string`?r:``}function Je({kind:e,label:t,hint:n,onSaved:r}){let i=F({mutationFn:t=>O(e,t),onSuccess:r});return(0,R.jsxs)(`form`,{className:`factory-sheet`,"data-agents-form":e,onSubmit:e=>i.mutate(qe(e,`value`)),children:[n,(0,R.jsxs)(`label`,{className:`agents-field`,children:[(0,R.jsx)(`span`,{children:t}),(0,R.jsx)(`input`,{type:`password`,name:`value`,autoComplete:`off`,spellCheck:!1,required:!0})]}),(0,R.jsx)(`div`,{className:`factory-sheet-actions`,children:(0,R.jsx)(`button`,{type:`submit`,disabled:i.isPending,children:`Save`})}),i.error?(0,R.jsx)(`p`,{className:`factory-problems`,role:`alert`,children:i.error.message}):null]})}function Ye({onClose:e}){let t=P(),n=A(le()),[r,i]=(0,L.useState)(`subscription`),[a,o]=(0,L.useState)(!1),s=B.find(e=>e.kind===r),c=e=>{t.setQueryData(D,e),o(!0)},l=F({mutationFn:ee,onSuccess:e=>{t.setQueryData(D,e),o(!1)}});return(0,R.jsx)(Oe,{open:!0,onOpenChange:t=>{t||e()},children:(0,R.jsxs)(ke,{className:`agents-dialog`,"aria-labelledby":`agents-title`,initialFocus:()=>document.querySelector(`.agents-dialog .outcome-dialog-close`),children:[(0,R.jsxs)(`header`,{className:`outcome-dialog-head`,children:[(0,R.jsxs)(`div`,{className:`outcome-dialog-heading`,children:[(0,R.jsx)(je,{id:`agents-title`,children:`Workset agents`}),(0,R.jsx)(`p`,{className:`outcome-dialog-state`,"data-agents-status":``,children:n.error?n.error.message:Ke(n.data)})]}),(0,R.jsxs)(De,{className:`outcome-dialog-close`,"aria-keyshortcuts":`Escape`,children:[`Close `,(0,R.jsx)(`kbd`,{children:`Esc`})]})]}),(0,R.jsxs)(`div`,{className:`agents-dialog-body`,children:[(0,R.jsx)(`div`,{role:`tablist`,"aria-label":`How to sign in`,className:`agents-tabs`,children:B.map(e=>(0,R.jsx)(`button`,{type:`button`,role:`tab`,id:`agents-tab-${e.kind}`,"aria-controls":`agents-panel`,"aria-selected":r===e.kind,onClick:()=>{i(e.kind),o(!1)},children:e.tab},e.kind))}),(0,R.jsx)(`div`,{role:`tabpanel`,id:`agents-panel`,"aria-labelledby":`agents-tab-${r}`,children:(0,R.jsx)(Je,{kind:s.kind,label:s.label,hint:s.hint,onSaved:c},s.kind)}),a?(0,R.jsx)(`p`,{className:`note`,role:`status`,children:`Saved. The next agent start uses it.`}):null,n.data?.source===`studio`?(0,R.jsxs)(`div`,{className:`factory-sheet-actions agents-clear`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:()=>l.mutate(),disabled:l.isPending,children:`Remove the credential set in Studio`}),l.error?(0,R.jsx)(`p`,{className:`factory-problems`,role:`alert`,children:l.error.message}):null]}):null]})]})})}function Xe(e){return e.source===`studio`?`set in Studio${e.setAt?` on ${e.setAt.slice(0,10)}`:``}`:`supplied at startup`}function Ze({onClose:e}){let t=P(),n=A(_()),[a,s]=(0,L.useState)(!1),c=F({mutationFn:r,onSuccess:e=>{t.setQueryData(o,e),s(!1)}}),l=n.data?.tokens??[];return(0,R.jsx)(Oe,{open:!0,onOpenChange:t=>{t||e()},children:(0,R.jsxs)(ke,{className:`agents-dialog`,"aria-labelledby":`git-access-title`,initialFocus:()=>document.querySelector(`.agents-dialog .outcome-dialog-close`),children:[(0,R.jsxs)(`header`,{className:`outcome-dialog-head`,children:[(0,R.jsxs)(`div`,{className:`outcome-dialog-heading`,children:[(0,R.jsx)(je,{id:`git-access-title`,children:`Git access`}),(0,R.jsx)(`p`,{className:`outcome-dialog-state`,"data-git-access-status":``,children:n.error?n.error.message:n.data?`${l.length} ${l.length===1?`key`:`keys`} set.`:`Checking…`})]}),(0,R.jsxs)(De,{className:`outcome-dialog-close`,"aria-keyshortcuts":`Escape`,children:[`Close `,(0,R.jsx)(`kbd`,{children:`Esc`})]})]}),(0,R.jsxs)(`div`,{className:`agents-dialog-body`,children:[(0,R.jsx)(`p`,{className:`note`,children:`A token clones private repositories. Set it for a host, or for a host and organization; the organization's token wins. Tokens are kept by the factory and never shown again.`}),l.length>0?(0,R.jsx)(`ul`,{className:`git-access-keys`,"data-git-access-keys":``,children:l.map(e=>(0,R.jsxs)(`li`,{"data-git-access-key":e.key,children:[(0,R.jsx)(`span`,{className:`mono`,children:e.key}),` `,(0,R.jsx)(`span`,{className:`note`,children:Xe(e)}),e.source===`studio`?(0,R.jsx)(`button`,{type:`button`,onClick:()=>c.mutate(e.key),disabled:c.isPending,children:`Remove`}):null]},e.key))}):null,c.error?(0,R.jsx)(`p`,{className:`factory-problems`,role:`alert`,children:c.error.message}):null,(0,R.jsx)(i,{onSaved:()=>s(!0)}),a?(0,R.jsx)(`p`,{className:`note`,role:`status`,children:`Saved. The next clone uses it.`}):null]})]})})}var V=[{mode:`url`,label:`Git URL`,field:`Git URL of the repository`,placeholder:`https://git.acme.test/acme/web.git`,hint:`The factory checks the remote answers before it is listed. A private repository asks for a Git token.`},{mode:`path`,label:`Local path`,field:`Absolute path of a checkout`,placeholder:`/home/dev/acme-web`,hint:`Only the checkout's origin URL is listed. The factory clones from that URL, so commits not pushed there are not seen.`}];function Qe({open:e,companion:n,listed:r,onClose:o,onAdded:s}){let d=P(),[f,p]=(0,L.useState)(`url`),[m,h]=(0,L.useState)(``),[g,_]=(0,L.useState)(null),[v,y]=(0,L.useState)(null),b=V.find(e=>e.mode===f),x=()=>f===`url`?{kind:`url`,url:m}:{kind:`path`,path:m},S=F({mutationFn:()=>ae({data:{companion:n,input:x()}}),onSuccess:async e=>{e.ok?(await k(d,n),h(``),y(e.warning??null),s(e.identity),e.warning||o()):_(e)}}),C=F({mutationFn:e=>ue({data:{companion:n,identity:e}}),onSuccess:async e=>{e.ok?await k(d,n):_(e)}});function w(){h(``),_(null),y(null),S.reset()}return(0,R.jsx)(t,{open:e,onOpenChange:e=>{e||(w(),o())},children:(0,R.jsxs)(a,{className:`grid w-[min(520px,calc(100vw-32px))] gap-4 p-5`,children:[(0,R.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,R.jsx)(u,{className:`text-md`,children:`Add a repository`}),(0,R.jsx)(c,{children:b.hint})]}),(0,R.jsx)(`div`,{role:`tablist`,"aria-label":`How to add`,className:`flex gap-1.5`,children:V.map(e=>(0,R.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":f===e.mode,className:j(`h-7 rounded-full border border-rule bg-transparent px-3 text-sm text-muted`,f===e.mode&&`border-accent bg-accent-soft text-text`),onClick:()=>{p(e.mode),w()},children:e.label},e.mode))}),(0,R.jsxs)(`form`,{className:`grid gap-3`,"data-add-repository-form":``,onSubmit:e=>{e.preventDefault(),_(null),y(null),S.mutate()},children:[(0,R.jsxs)(`label`,{className:`grid gap-1.5 text-sm`,children:[(0,R.jsx)(`span`,{children:b.field}),(0,R.jsx)(Me,{value:m,placeholder:b.placeholder,autoComplete:`off`,spellCheck:!1,required:!0,onChange:e=>h(e.currentTarget.value),"aria-label":b.field})]}),g?(0,R.jsx)(`p`,{className:`m-0 text-sm text-bad`,role:`alert`,children:g.reason}):null,S.isError?(0,R.jsx)(`p`,{className:`m-0 text-sm text-bad`,role:`alert`,children:S.error instanceof Error?S.error.message:`The repository was not added.`}):null,v?(0,R.jsxs)(`p`,{className:`m-0 text-sm text-muted`,role:`status`,children:[`Added. `,v]}):null,(0,R.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,R.jsx)(l,{render:(0,R.jsx)(N,{variant:`ghost`,type:`button`}),children:`Close`}),(0,R.jsx)(N,{type:`submit`,disabled:S.isPending||m.trim()===``,children:S.isPending?`Checking…`:`Add repository`})]})]}),g&&`tokenKey`in g&&g.tokenKey?(0,R.jsxs)(`div`,{className:`grid gap-2 border-t border-rule pt-3`,"data-add-repository-token":``,children:[(0,R.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Set a Git token for this host, then add the repository again.`}),(0,R.jsx)(i,{defaultKey:g.tokenKey,onSaved:()=>{_(null),S.mutate()}})]}):null,r.length>0?(0,R.jsx)(`ul`,{className:`m-0 grid list-none gap-1.5 border-t border-rule p-0 pt-3`,"data-listed-repositories":``,children:r.map(e=>(0,R.jsxs)(`li`,{className:`flex items-center justify-between gap-2 text-sm`,children:[(0,R.jsx)(`span`,{className:`font-mono`,children:e}),(0,R.jsx)(N,{type:`button`,variant:`ghost`,disabled:C.isPending,onClick:()=>C.mutate(e),children:`Remove`})]},e))}):null]})})}function $e({open:e,tokenKey:n,onClose:r}){return(0,R.jsx)(t,{open:e,onOpenChange:e=>{e||r()},children:(0,R.jsxs)(a,{className:`grid w-[min(520px,calc(100vw-32px))] gap-4 p-5`,children:[(0,R.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,R.jsx)(u,{className:`text-md`,children:`Set a Git token`}),(0,R.jsx)(c,{children:`A token clones private repositories from this host. It is kept by the factory and never shown again.`})]}),(0,R.jsx)(i,{defaultKey:n,onSaved:r},n),(0,R.jsx)(`div`,{className:`flex justify-end`,children:(0,R.jsx)(l,{render:(0,R.jsx)(N,{variant:`ghost`,type:`button`}),children:`Close`})})]})})}function H({action:e,id:t,className:n,children:r,onDone:i,...a}){let o=(0,L.useContext)(z),s=P(),c=F({mutationFn:n=>ie({data:{companion:o,action:e,id:t,fields:n}}),onSuccess:()=>k(s,o)});return(0,R.jsxs)(`form`,{className:n,"data-factory-action":t?`/${t}/${e}`:`/${e}`,onSubmit:e=>{e.preventDefault();let t=e.currentTarget,n=e.nativeEvent.submitter,r={};for(let[e,i]of new FormData(t,n))typeof i==`string`&&(r[e]=i);c.mutate(r,{onSuccess:()=>{t.reset(),i?.()}})},"aria-busy":c.isPending||void 0,...a,children:[(0,R.jsx)(`fieldset`,{className:`factory-form-fields`,disabled:c.isPending,children:r}),c.error?(0,R.jsx)(`p`,{className:`factory-problems`,role:`alert`,children:c.error.message}):null]})}function et(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var U=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return U(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return U(t)(e)}}}},W=Ne()(((e,t)=>(n,r,i)=>{let a={storage:et(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(...e)=>(f(...e),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return U(u.getItem.bind(u))(a.name).then(e=>{if(e){if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state]}return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{++s,u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p})(e=>({filter:``,setFilter:t=>e({filter:t}),stepped:!1,setStepped:t=>e({stepped:t}),agentsOpen:!1,setAgentsOpen:t=>e({agentsOpen:t}),gitAccessOpen:!1,setGitAccessOpen:t=>e({gitAccessOpen:t})}),{name:`mate.factory.filter`,storage:et(()=>sessionStorage),partialize:({filter:e})=>({filter:e})})),tt=`mate.factory.needsYou`;function nt(e,t){let n=e.toLowerCase();return t.toLowerCase().split(/\s+/).every(e=>n.includes(e))}function rt(e,t){let n=e.replace(/^\(\d+\) /,``);return t>0?`(${t}) ${n}`:n}function it(e,t,n){let r=t?e.indexOf(t):-1;return r===-1?e[0]:e[Math.min(e.length-1,Math.max(0,r+n))]}function at(e){return E(e)||!!e?.closest?.(`.outcome-terminal`)}function ot(e,t){if(/^[1-9]$/.test(t))return e.querySelector(`[data-option-key="${t}"]`);let n={j:`Next`,k:`Previous`}[t];return n?(e.closest(`[data-slot=sheet-content]`)??e).querySelector(`button[aria-label="${n}"]`):null}function st(e,t){return t===`n`?e.querySelector(`form[data-outcome-input] textarea`):t===`/`?e.querySelector(`[data-outcome-filter]`):null}function ct(e){return t=>{if(t.defaultPrevented||t.altKey)return;let n=t.target;if(t.key===`Enter`&&(t.ctrlKey||t.metaKey)){let e=n?.closest?.(`form`);if(n?.localName===`textarea`&&e){if(t.preventDefault(),e.querySelector(`button[type="submit"].factory-primary:disabled`))return;let n=e.querySelector(`button[value="start"]`);e.requestSubmit(n??void 0)}return}if(t.ctrlKey||t.metaKey||at(n))return;let r=n?.closest?.(`[data-slot="sheet-content"], [data-slot="dialog-content"]`);if(r&&!r.querySelector(`[data-outcome-panel]`))return;let i=e.querySelector(`[data-outcome-panel]`);if(i){let e=ot(i,t.key);e&&(t.preventDefault(),e.click());return}let a=st(e,t.key);if(a){t.preventDefault(),a.focus();return}let o=!!n?.matches?.(`[data-outcome-row]`),s=t.key===`j`||o&&t.key===`ArrowDown`,c=t.key===`k`||o&&t.key===`ArrowUp`;if(!s&&!c)return;let l=it([...e.querySelectorAll(`[data-outcome-row]`)].filter(e=>e.getClientRects().length>0),e.activeElement,s?1:-1);l&&(t.preventDefault(),l.focus(),l.scrollIntoView({block:`nearest`}))}}function lt(){(0,L.useEffect)(()=>{let e=ct(document);return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[])}function ut(e){(0,L.useEffect)(()=>{if(document.title=rt(document.title,e),typeof Notification>`u`||Notification.permission!==`granted`)return;let t=0;try{t=Number(sessionStorage.getItem(tt)||`0`),sessionStorage.setItem(tt,String(e))}catch{}e>t&&new Notification(`Mate factory`,{body:e===1?`1 decision needs you`:`${e} decisions need you`})},[e]),(0,L.useEffect)(()=>()=>void(document.title=rt(document.title,0)),[])}function dt(){let[e,t]=(0,L.useState)(()=>typeof Notification<`u`&&Notification.permission==="default");return{offered:e,ask:()=>void Notification.requestPermission().then(()=>t(!1))}}function G(e,t){if(t===void 0)return``;let n=Math.max(0,Math.floor((t-Date.parse(e))/6e4));return n>=1440?`${Math.floor(n/1440)}d`:n>=60?`${Math.floor(n/60)}h`:`${n}m`}var ft={pieces:[],open:{}},pt=/^(> |committed: |pushed |published |linked |Returned to automation|no review report |the review report for |\S+ is now at )/;function mt(e){let t=[];for(let n of e.split(/(?<=\n)/)){let e=pt.test(n)?`factory`:`agent`,r=t.at(-1);r&&(r.kind===e||n.trim()===``)?r.text+=n:t.push({kind:e,text:n})}return t}function ht(e,t){let n=(t,n,r)=>{let i=[...e.pieces,r===void 0?{kind:t,text:n}:{id:r,kind:t,text:n}];return{pieces:i,open:r===void 0?e.open:{...e.open,[r]:i.length-1}}},r=(t,r)=>{let i=e.open[t];if(i===void 0)return n(`agent`,r,t);let a=[...e.pieces];return a[i]={...a[i],text:a[i].text+r},{...e,pieces:a}};switch(t.type){case`replay`:{let e={pieces:mt(t.log),open:{}};for(let n of t.open)e=ht(e,{type:`text`,...n,delta:n.text});return e}case`text`:return t.id===void 0?n(`agent`,t.delta):r(t.id,t.delta);case`text-end`:{let e=r(t.id,`
|
|
2
|
+
`),{[t.id]:n,...i}=e.open;return{...e,open:i}}case`tool`:return n(`tool`,`› ${t.name} ${t.summary}\n`);case`tool-done`:return t.failed?n(`failed`,` ${t.name} failed\n`):e;case`log`:return n(`factory`,t.text);case`lost`:return n(`factory`,`
|
|
3
|
+
This view fell behind the run; close and reopen the Outcome.
|
|
4
|
+
`);case`settled`:return e}}function gt(e){let[t,n]=(0,L.useReducer)((e,t)=>t.type===`reset`?{...ft,ended:!1}:{...ht(e,t),ended:e.ended||t.type===`lost`},{...ft,ended:!1});return(0,L.useEffect)(()=>{if(n({type:`reset`}),!e||typeof EventSource>`u`)return;let t=new EventSource(e);return t.addEventListener(`message`,e=>{try{n(JSON.parse(e.data))}catch{}}),()=>t.close()},[e]),{pieces:t.pieces,ended:t.ended}}function _t(e){return e.reason===`returned`?`The Outcome is back with automation.`:e.reason===`deleted`?`The Outcome was deleted.`:e.type===`ended`?`The session ended. Return to automation when you are done, or close and reopen the Outcome to start it again.`:e.status===0||e.status===130?`Claude closed. The Outcome returns to automation; if it does not, return it with the button.`:`Claude stopped unexpectedly. The Outcome stays with you; return it to automation when you are done.`}var vt=class{mount;outcome;companion;failed;phase;focus;term=null;ws=null;sessionId=null;observer=null;closed=!1;live=!1;restarted=!1;attaching=!1;constructor(e,t,n,r,i,a){this.mount=e,this.outcome=t,this.companion=n,this.failed=r,this.phase=i,this.focus=a,this.open()}async open(){try{let e=await p();if(this.closed)return;let t=new e(this.mount,{cursorBlink:!0,autoResize:!1,wasmUrl:re});if(this.term=t,t.onData=e=>this.send({type:`input`,data:e}),t.onResize=()=>this.send({type:`resize`,cols:t.cols,rows:t.rows}),await t.init(),this.closed)return;t.fit(),this.observer=new ResizeObserver(()=>{this.mount.clientWidth&&this.mount.clientHeight&&t.fit()}),this.observer.observe(this.mount),this.connect()}catch{this.term=null,this.failed()}}send(e){h(this.ws,e)}notice(e){this.term?.write(`\r\n\u001b[2m${e}\u001b[0m\r\n`)}start(){if(!this.term)return;let{cols:e,rows:t}=this.term;this.send({type:`start`,workset:this.outcome,companion:this.companion,cols:e,rows:t})}connect(){let e=y();this.ws=e,e.onopen=()=>{if(!this.term)return;let{cols:e,rows:t}=this.term;this.sessionId?(this.attaching=!0,this.send({type:`attach`,sessionId:this.sessionId,cols:e,rows:t})):this.start()},e.onmessage=e=>this.receive(e.data),e.onclose=()=>{this.ws===e&&(this.ws=null,!this.live&&!this.closed&&this.show({kind:`refused`,reason:`The connection closed before the session started.`}))}}receive(e){let t=this.term;if(!t)return;if(typeof e!=`string`){this.live||this.show({kind:`live`}),t.write(new Uint8Array(e));return}let n=v(e);if(n){if(n.type===`ready`)this.restarted=!1,this.sessionId=n.sessionId??null,this.attaching&&this.show({kind:`live`}),this.attaching=!1,t.write(`\x1Bc`),this.focus&&t.focus();else if(n.type===`gone`){if(this.sessionId=null,this.attaching=!1,this.restarted){this.show({kind:`refused`,reason:`The session could not be started.`});return}this.restarted=!0,this.show({kind:`starting`}),this.start()}else n.type===`exit`||n.type===`ended`?(this.sessionId=null,this.show({kind:`live`}),this.notice(_t(n))):n.type===`takenOver`?this.notice(`Another tab has this session now.`):n.type===`error`&&n.reason&&(this.live?this.notice(n.reason):this.show({kind:`refused`,reason:n.reason}))}}show(e){this.live=e.kind===`live`,this.phase(e)}retry(){this.restarted=!1,this.show({kind:`starting`}),this.start()}close(){this.closed=!0,this.observer?.disconnect(),this.ws?.close(),this.ws=null,this.term?.destroy(),this.term=null}};function yt({outcome:e,companion:t,focus:n=!0}){let r=(0,L.useRef)(null),[i,a]=(0,L.useState)(!1),[o,s]=(0,L.useState)({kind:`starting`}),c=`${t}\n${e}`,[l,u]=(0,L.useState)(c);l!==c&&(u(c),s({kind:`starting`}));let d=(0,L.useRef)(n),f=(0,L.useRef)(null);return(0,L.useEffect)(()=>{let n=new vt(r.current,e,t,()=>a(!0),s,d.current);return f.current=n,()=>n.close()},[e,t]),(0,R.jsxs)(`div`,{className:`outcome-terminal-frame`,children:[(0,R.jsx)(`div`,{ref:r,className:`outcome-terminal`,"data-outcome-terminal":e,"data-companion":t,"data-terminal-error":i?``:void 0,children:i?`The terminal could not start in this browser. Close and reopen the Outcome to retry.`:null}),o.kind===`live`||i?null:(0,R.jsx)(`div`,{className:`outcome-terminal-cover`,role:o.kind===`refused`?`alert`:`status`,"data-terminal-phase":o.kind,children:o.kind===`refused`?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`p`,{children:o.reason}),(0,R.jsx)(`button`,{type:`button`,onClick:()=>f.current?.retry(),children:`Try again`})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Fe,{"aria-hidden":`true`,className:`size-7 text-accent`}),(0,R.jsx)(`p`,{children:`Starting the session…`})]})})]})}var bt={control:`You have control`,decision:`Decision needed`,review:`Plan ready for review`,merge:`Ready to merge`,publish:`Ready to publish`,problem:`Something went wrong`},xt=`You work in the factory's own conversation. Exit Claude, then return the Outcome to automation; the factory checks what changed and continues.`,St=`Pauses automation after the current stage; you continue the factory's own conversation here.`,Ct=5;function K(e,t){let n=t?.state===`waiting`?Ie(t).length:0;return e===`decision`&&n>1?`Decisions needed (${n})`:bt[e]}function wt({context:e}){return e.ticketFormat===`jira`?(0,R.jsx)(`input`,{name:`ticket`,className:`outcome-ticket`,placeholder:`ABC-123`,"aria-label":`Ticket (optional)`,autoComplete:`off`,spellCheck:!1}):null}var Tt=new Set([`answer`,`start-apply`,`publish`,`return`,`retry`,`start`]);function Et({id:e,action:t,label:n,primary:r=Tt.has(t),children:i}){return(0,R.jsxs)(H,{id:e,action:t,className:`factory-action`,children:[i,(0,R.jsx)(`button`,{type:`submit`,className:r?`factory-primary`:void 0,children:n})]})}function q(e,t){let n=I(e.workset,e.run,t);return(r,i,a,o)=>t.writable&&n.has(r)?(0,R.jsx)(Et,{id:e.workset.id,action:r,label:i,primary:o,children:a}):null}var Dt=(e,t)=>t.writable&&I(e.workset,e.run,t).has(`delete`);function Ot({item:e,context:t,onDeleted:n}){let[r,i]=(0,L.useState)(!1),a=(0,L.useRef)(null);(0,L.useEffect)(()=>{r&&a.current?.focus()},[r]);let{workset:o,run:s}=e;return Dt(e,t)?r?(0,R.jsxs)(H,{id:o.id,action:`delete`,className:`factory-action factory-confirm`,onDone:n,children:[(0,R.jsxs)(`p`,{className:`note`,children:[`Delete “`,o.title,`”?`,J(s)?` Its run will be stopped first.`:``,` Its request is removed; branches stay.`]}),(0,R.jsxs)(`div`,{className:`factory-confirm-actions`,children:[(0,R.jsx)(`button`,{ref:a,type:`submit`,className:`factory-delete`,children:`Delete outcome`}),(0,R.jsx)(`button`,{type:`button`,onClick:()=>i(!1),children:`Cancel`})]})]}):(0,R.jsx)(`button`,{type:`button`,className:`factory-delete`,onClick:()=>i(!0),children:`Delete`}):null}function kt({activity:e}){return(0,R.jsx)(`span`,{className:`activity-dot`,"data-activity":e,title:m[e],"aria-hidden":`true`})}function At(e,t,n){let[r,i]=(0,L.useState)(!1),[a,o]=(0,L.useState)(null),s=Object.entries(t??{}).flatMap(([e,t])=>t===`list`?[e]:[]);return{ask:()=>i(!0),dialog:(0,R.jsx)(Qe,{open:r,companion:n,listed:s,onClose:()=>i(!1),onAdded:o}),value:a!==null&&e.includes(a)?a:e[0]??``,choose:o}}var jt={linked:`linked`,list:`listed`,environment:`configured`};function Mt(t,n,r){let i=r?.[t],a=i?e(i):null,o=n?.[t];return[t,a,o?jt[o]:null].filter(Boolean).join(` · `)}function Nt({tokenKey:t,covered:n,onSet:r}){return(0,R.jsxs)(`p`,{className:`note`,"data-repository-token":n?`covered`:`none`,children:[n?`A Git token is set for ${e(t)}.`:`No Git token for ${t}: only public repositories clone.`,` `,(0,R.jsx)(`button`,{type:`button`,"data-open-set-token":``,onClick:r,children:`Set token…`})]})}function Pt({repositories:e,sources:t,keys:n,factoryMode:r,context:i}){let a=At(e,t,i.companionDigest),[o,s]=(0,L.useState)(!1),c=A({..._(),enabled:r&&i.writable}),l=e.map(e=>({value:e,label:Mt(e,t,n)})),u=n?.[a.value],d=r&&c.data&&u?(0,R.jsx)(Nt,{tokenKey:u,covered:g(u,c.data.tokens),onSet:()=>s(!0)}):null,f=r?(0,R.jsx)(`button`,{type:`button`,"data-open-add-repository":``,onClick:a.ask,children:`Add repository…`}):null;return i.writable?e.length===0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`p`,{className:`note`,children:`Link a Working Repository to this companion to describe outcomes.`}),f,r?a.dialog:null]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(H,{action:`create`,className:`outcome-input`,"data-outcome-input":``,children:[(0,R.jsxs)(`label`,{children:[(0,R.jsx)(`span`,{className:`outcome-input-label`,children:`What should we build or improve?`}),(0,R.jsx)(`textarea`,{name:`text`,rows:3,required:!0,placeholder:`Make onboarding easier: fewer signup steps, and keep authentication working.`})]}),(0,R.jsxs)(`div`,{className:`outcome-input-actions`,children:[(0,R.jsxs)(`button`,{type:`submit`,name:`start`,value:`start`,className:`factory-primary`,children:[`Start `,(0,R.jsx)(`kbd`,{children:`⌘↵`})]}),(0,R.jsx)(`button`,{type:`submit`,name:`start`,value:`later`,children:`Save for later`}),(0,R.jsx)(wt,{context:i}),e.length>1?(0,R.jsxs)(Se,{name:`repository`,required:!0,items:l,value:a.value,onValueChange:e=>{e!==null&&a.choose(e)},children:[(0,R.jsx)(Ce,{"aria-label":`Working Repository`,className:`w-auto max-w-80`,children:(0,R.jsx)(we,{})}),(0,R.jsx)(Te,{children:l.map(e=>(0,R.jsx)(Ee,{value:e.value,children:e.label},e.value))})]}):(0,R.jsxs)(`span`,{"data-working-repository":``,children:[(0,R.jsx)(`input`,{type:`hidden`,name:`repository`,value:a.value}),Mt(a.value,t,n)]}),f]}),d]}),r?a.dialog:null,u?(0,R.jsx)($e,{open:o,tokenKey:u,onClose:()=>s(!1)}):null]}):(0,R.jsx)(`p`,{className:`note`,children:`Read-only mode. Start Studio with --writable to describe outcomes.`})}function Ft({workset:e}){let t=f(e),n=t.filter(e=>e.reached).length,r=t.find(e=>!e.reached);return(0,R.jsxs)(`span`,{className:`outcome-row-track`,title:`${n} of ${t.length} milestones${r?`; next: ${r.label}`:``}`,children:[(0,R.jsx)(`span`,{className:`outcome-row-pips`,"aria-hidden":`true`,children:t.map(e=>(0,R.jsx)(`i`,{"data-reached":e.reached?`true`:`false`},e.label))}),(0,R.jsxs)(`span`,{className:`mono`,children:[n,`/`,t.length]})]})}function It({checks:e}){return e?.length?(0,R.jsx)(`ul`,{className:`outcome-checks`,"aria-label":`Checks`,children:e.map(e=>(0,R.jsxs)(`li`,{"data-passed":e.passed?`true`:`false`,children:[e.passed?`✓`:`✗`,` `,e.name]},e.name))}):null}function Lt({label:e,change:t,several:n,onOpenReport:r}){return(0,R.jsxs)(`button`,{type:`button`,className:`outcome-report-open`,"data-open-report":t,onClick:e=>r(t,e.currentTarget),children:[e,n?` · ${t}`:``]})}function Rt(e){let t=Object.keys(e.run?.reviewReports??{});return e.workset.changes.length>1||t.length>1}function zt({item:e,onOpenReport:t}){let n=Object.keys(e.run?.reviewReports??{}),r=e.run?.compareUrl;return n.length===0&&!r?null:(0,R.jsxs)(`div`,{className:`outcome-results`,children:[n.map(n=>(0,R.jsx)(Lt,{label:`Review plan`,change:n,several:Rt(e),onOpenReport:t},n)),r?(0,R.jsx)(`a`,{href:r,target:`_blank`,rel:`noreferrer`,children:`View changes`}):null]})}function Bt({change:e,report:t,onBack:n}){let r=b(e=>e.theme),i=Pe(t,r),a=(0,L.useRef)(null);return(0,L.useEffect)(()=>a.current?.focus(),[]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`header`,{className:`outcome-dialog-head outcome-report-head`,children:[(0,R.jsxs)(`button`,{ref:a,type:`button`,className:`outcome-report-back`,onClick:n,children:[(0,R.jsx)(M,{name:`left`}),` Back`]}),(0,R.jsxs)(`h2`,{children:[`Review report · `,(0,R.jsx)(`span`,{className:`mono`,children:e})]}),(0,R.jsxs)(`a`,{href:i,target:`_blank`,rel:`noopener noreferrer`,children:[(0,R.jsx)(M,{name:`external`}),` Open in new tab`]})]}),(0,R.jsx)(`iframe`,{className:`outcome-report-frame`,src:i,title:`Review report for ${e}`,sandbox:`allow-scripts allow-modals`,referrerPolicy:`no-referrer`})]})}function Vt({item:e,context:t}){if(!t.writable)return null;let{stage:n}=e.workset;return n===`publish`||n===`done`?(0,R.jsxs)(H,{action:`create`,className:`outcome-feedback`,children:[(0,R.jsx)(`textarea`,{name:`text`,rows:2,required:!0,"aria-label":`A new outcome`}),(0,R.jsx)(wt,{context:t}),(0,R.jsx)(`button`,{type:`submit`,name:`start`,value:`start`,children:`Start as a new outcome`})]}):q(e,t)(`feedback`,`Request a change`,(0,R.jsx)(`textarea`,{name:`feedback`,rows:2,required:!0,"aria-label":`Request a change`,placeholder:`What should change?`}))}var J=e=>e?.state===`running`||e?.state===`queued`;function Ht(e,t){let n=[];for(let r of e.toReversed())for(let e of r.text.split(`
|
|
5
|
+
`).toReversed())if(e.trim()!==``&&n.unshift(e),n.length===t)return n;return n}function Ut({item:e,log:t}){let{workset:n,run:r}=e,i=J(r);return!r?.hasLog&&!i?null:(0,R.jsxs)(`section`,{className:`outcome-log-section`,"aria-label":`Log`,children:[(0,R.jsxs)(`header`,{className:`outcome-section-head`,children:[(0,R.jsx)(`h3`,{children:`Log`}),i?(0,R.jsx)(`span`,{className:`outcome-log-live`,children:`live`}):null,(0,R.jsx)(`a`,{href:te(n.id),target:`_blank`,rel:`noreferrer`,children:`Full log`})]}),(0,R.jsx)(Wt,{id:n.id,log:t})]})}function Wt({id:e,log:t}){let{pieces:n,ended:r}=t,i=(0,L.useRef)(null),a=(0,L.useRef)(!0),[o,s]=(0,L.useState)(!1);return(0,L.useEffect)(()=>{let e=i.current;e&&n.length>0&&a.current&&(e.scrollTop=e.scrollHeight)},[n]),(0,R.jsxs)(`div`,{className:`outcome-log-frame`,children:[(0,R.jsx)(`pre`,{ref:i,role:`log`,"aria-label":`Run log`,tabIndex:0,onScroll:e=>{let t=e.currentTarget;a.current=t.scrollHeight-t.scrollTop-t.clientHeight<48,s(!a.current)},className:`outcome-log`,"data-outcome-log":ne(e),"data-ended":r||void 0,children:n.length>0?n.map((e,t)=>(0,R.jsx)(`span`,{"data-kind":e.kind,children:e.text},t)):(0,R.jsx)(`span`,{className:`outcome-log-empty`,children:`Waiting for output.`})}),o?(0,R.jsx)(`button`,{type:`button`,className:`outcome-log-jump`,onClick:()=>{let e=i.current;e&&(e.scrollTop=e.scrollHeight,a.current=!0,s(!1))},children:`Jump to latest`}):null]})}function Gt({item:e,context:t}){let{workset:n,run:r}=e,i=W(e=>e.stepped);return(0,R.jsxs)(`div`,{className:`factory-sheet outcome-control`,children:[(0,R.jsxs)(`div`,{className:`outcome-control-note`,children:[r?.control?.reason?(0,R.jsx)(`p`,{className:`outcome-control-reason`,children:r.control.reason}):null,(0,R.jsx)(`p`,{className:`note`,children:xt})]}),t.sessions&&r?.control?.mode===`manual`?(0,R.jsx)(yt,{outcome:n.id,companion:t.companionDigest,focus:!i}):(0,R.jsx)(`p`,{className:`note`,children:`The terminal is not available in this Studio.`})]})}function Kt({run:e,now:t}){if(e?.control?.mode!==`takeover-requested`)return null;let n=e.state===`running`?e.stage:null,r=e.control.updatedAt?G(e.control.updatedAt,t):``;return(0,R.jsxs)(`p`,{className:`outcome-attention-hint`,"data-pending":``,role:`status`,"aria-label":`Taking control`,children:[`Control passes to you once`,` `,n?(0,R.jsxs)(R.Fragment,{children:[`the `,(0,R.jsx)(`span`,{className:`mono`,children:n}),` stage`]}):`the current stage`,` `,`ends; the log below keeps following it. The terminal opens here then.`,r?(0,R.jsxs)(`span`,{className:`factory-age mono`,children:[` · asked `,r,` ago`]}):null]})}function Y(e,t){if(!e||e.state===`idle`)return`idle`;let n=e.state===`running`?e.startedAt:e.updatedAt;return`${e.state} ${e.stage}${n?` · ${G(n,t)}`:``}`}function qt({item:e,context:t,onDeleted:n}){let{workset:r,run:i}=e,a=q(e,t),o=r.stage!==`done`,s=a(`return`,`Return to automation`),c=o&&!r.queuedAt?a(`start`,`Start`):null,l=J(i)?a(`cancel`,`Cancel run`):null,u=r.stage===`human-review`?a(`regenerate`,`Regenerate reports`):null,d=o&&r.queuedAt?a(`later`,`Move to later`):null,f=Jt(e,t),p=(0,R.jsx)(Ot,{item:e,context:t,onDeleted:n});return![s,c,l,u,d,f].some(Boolean)&&!Dt(e,t)?null:(0,R.jsxs)(`footer`,{className:`outcome-dialog-foot`,children:[(0,R.jsxs)(`div`,{className:`outcome-actions`,role:`group`,"aria-label":`Run actions`,children:[s,c,l,u,d,f,p]}),f?(0,R.jsx)(`p`,{className:`note`,children:St}):null]})}function Jt(e,t){let{workset:n,run:r}=e;return!r?.conversation||r.control||n.stage===`done`?null:q(e,t)(`take-control`,`Take control`)}function Yt({item:e,context:t}){let{workset:n,run:r}=e;return(0,R.jsxs)(`dl`,{className:`outcome-facts`,children:[(0,R.jsx)(`dt`,{children:`Stage`}),(0,R.jsx)(`dd`,{children:n.stageLabel}),(0,R.jsx)(`dt`,{children:`Run`}),(0,R.jsx)(`dd`,{children:Y(r,t.now)}),(0,R.jsx)(`dt`,{children:`Changes`}),(0,R.jsx)(`dd`,{className:`mono`,children:n.changes.join(`, `)||`none yet`}),r?.pushedBranch?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`dt`,{children:`Branch`}),(0,R.jsx)(`dd`,{className:`mono`,children:r.pushedBranch})]}):null,(0,R.jsx)(`dt`,{children:`Id`}),(0,R.jsx)(`dd`,{className:`mono`,children:n.id})]})}function X(){return(0,R.jsx)(`span`,{className:`factory-recommended`,children:`recommended`})}function Xt({item:e,asked:t,round:n,context:r}){let i=r.writable&&I(e.workset,e.run,r).has(`answer`);return(0,R.jsxs)(`div`,{className:`factory-sheet`,children:[(0,R.jsx)(`p`,{className:`factory-question`,children:t.question}),t.options?.length?(0,R.jsx)(`div`,{className:`factory-options`,role:`group`,"aria-label":`Answers`,children:t.options.map((r,a)=>{let o=r===t.recommended,s=a<9?String(a+1):void 0;return i?(0,R.jsxs)(H,{id:e.workset.id,action:`answer`,className:`factory-option`,children:[(0,R.jsx)(`input`,{type:`hidden`,name:`round`,value:n}),(0,R.jsx)(`input`,{type:`hidden`,name:`answer`,value:r}),(0,R.jsxs)(`button`,{type:`submit`,"data-recommended":o?`true`:`false`,"data-option-key":s,"aria-keyshortcuts":s,children:[s?(0,R.jsx)(`kbd`,{"aria-hidden":`true`,children:s}):null,(0,R.jsx)(`span`,{children:r}),o?(0,R.jsx)(X,{}):null]})]},r):(0,R.jsxs)(`span`,{className:`factory-choice`,"data-recommended":o?`true`:`false`,children:[r,o?(0,R.jsx)(X,{}):null]},r)})}):t.recommended?(0,R.jsxs)(`p`,{className:`note`,children:[`Recommended: `,t.recommended]}):null,q(e,r)(`answer`,t.options?.length?`Send my words`:`Answer`,(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`input`,{type:`hidden`,name:`round`,value:n}),(0,R.jsx)(`textarea`,{name:`answer`,rows:2,required:!0,"aria-label":`Answer in your words`,placeholder:t.options?.length?`Or answer in your words`:`Your answer`})]}))]})}function Zt({asked:e,index:t}){return(0,R.jsxs)(`fieldset`,{className:`factory-question-set`,children:[(0,R.jsxs)(`legend`,{className:`factory-question`,children:[(0,R.jsxs)(`span`,{className:`mono`,children:[t+1,`.`]}),` `,e.question]}),e.options?.length?(0,R.jsx)(`div`,{className:`factory-choices`,children:e.options.map(n=>{let r=n===e.recommended;return(0,R.jsxs)(`label`,{className:`factory-choice`,"data-recommended":r?`true`:`false`,children:[(0,R.jsx)(`input`,{type:`radio`,name:`choice-${t}`,value:n}),(0,R.jsx)(`span`,{children:n}),r?(0,R.jsx)(X,{}):null]},n)})}):e.recommended?(0,R.jsxs)(`p`,{className:`note`,children:[`Recommended: `,e.recommended]}):null,(0,R.jsx)(`textarea`,{name:`answer-${t}`,rows:1,"aria-label":`Answer to question ${t+1} in your words`,placeholder:e.options?.length?`Or in your words (overrides the choice)`:`Your answer`})]})}function Qt(e,t){let n=new FormData(e),r=0;for(let e=0;e<t;e+=1){let t=n.get(`answer-${e}`);(n.get(`choice-${e}`)||typeof t==`string`&&t.trim())&&(r+=1)}return r}function $t({item:e,questions:t,round:n,context:r}){let[i,a]=(0,L.useState)(0);if(!r.writable||!I(e.workset,e.run,r).has(`answer`))return(0,R.jsx)(`ol`,{className:`outcome-history`,children:t.map(e=>(0,R.jsx)(`li`,{children:e.question},e.question))});let o=e=>{let n=e.currentTarget.closest(`form`);n&&a(Qt(n,t.length))},s=t.every(e=>e.recommended);return(0,R.jsxs)(`div`,{className:`factory-sheet`,children:[(0,R.jsxs)(H,{id:e.workset.id,action:`answer`,className:`factory-action factory-round`,children:[(0,R.jsx)(`input`,{type:`hidden`,name:`round`,value:n}),(0,R.jsx)(`div`,{className:`factory-round-questions`,onChange:o,onInput:o,children:t.map((e,t)=>(0,R.jsx)(Zt,{asked:e,index:t},e.question))}),(0,R.jsxs)(`div`,{className:`factory-sheet-actions`,children:[(0,R.jsx)(`button`,{type:`submit`,className:`factory-primary`,disabled:i<t.length,children:`Send answers`}),(0,R.jsxs)(`span`,{className:`factory-round-count mono`,"aria-live":`polite`,children:[i,` of `,t.length,` answered`]})]})]}),s?(0,R.jsxs)(H,{id:e.workset.id,action:`answer`,className:`factory-action`,children:[(0,R.jsx)(`input`,{type:`hidden`,name:`round`,value:n}),t.map((e,t)=>(0,R.jsx)(`input`,{type:`hidden`,name:`choice-${t}`,value:e.recommended},e.question)),(0,R.jsx)(`button`,{type:`submit`,children:`Accept all recommendations`})]}):null]})}function en({item:e,run:t,context:n}){let r=Ie(t);return r.length===1?(0,R.jsx)(Xt,{item:e,asked:r[0],round:t.round??``,context:n}):(0,R.jsx)($t,{item:e,questions:r,round:t.round??``,context:n})}function tn({item:e,context:t,onOpenReport:n,onOpenDoc:r}){let{workset:i,run:a}=e,o=a?.reviewReports??{},s=Rt(e),c=(e,t)=>s?`${e} · ${t}`:e,l=t.writable&&I(i,a,t).has(`feedback`),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(``),m=(0,L.useRef)(null),h=(0,L.useRef)(null);(0,L.useEffect)(()=>{u&&m.current?.focus()},[u]);let g=()=>{(0,Ve.flushSync)(()=>d(!1)),h.current?.focus()};return(0,R.jsxs)(`div`,{className:`outcome-plan`,children:[i.changes.map(e=>(0,R.jsxs)(`p`,{className:`outcome-read`,children:[(0,R.jsx)(`span`,{className:`muted`,children:`Read`}),o[e]?(0,R.jsx)(Lt,{label:`Show me`,change:e,several:s,onOpenReport:n}):(0,R.jsxs)(`span`,{className:`note`,"data-report-missing":e,children:[`No review report for `,(0,R.jsx)(`span`,{className:`mono`,children:e}),`.`]}),[`spec`,`tasks`].map(t=>(0,R.jsx)(`button`,{type:`button`,className:`outcome-report-open`,"data-open-doc":`${t}:${e}`,onClick:n=>r(e,t,n.currentTarget),children:c(`Show ${t}`,e)},t))]},e)),(0,R.jsxs)(`div`,{className:`factory-sheet-actions`,children:[q(e,t)(`start-apply`,`Approve plan`,void 0,!u),l?(0,R.jsx)(`button`,{ref:h,type:`button`,"aria-expanded":u,onClick:()=>u?g():d(!0),children:`Request changes`}):null]}),l&&u?(0,R.jsxs)(H,{id:i.id,action:`feedback`,className:`outcome-request`,onDone:()=>{p(``),d(!1)},children:[(0,R.jsx)(`textarea`,{ref:m,name:`feedback`,rows:3,"aria-label":`What should change?`,placeholder:`What should change?`,value:f,onChange:e=>p(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),g())}}),(0,R.jsxs)(`div`,{className:`factory-sheet-actions`,children:[(0,R.jsx)(`button`,{type:`submit`,className:`factory-primary`,disabled:f.trim()===``,children:`Send changes`}),(0,R.jsx)(`button`,{type:`button`,onClick:g,children:`Cancel`})]})]}):null]})}function nn({item:e,kind:t,context:n,onOpenReport:r,onOpenDoc:i}){let{run:a}=e,o=q(e,n);return t===`control`?(0,R.jsx)(Gt,{item:e,context:n}):t===`decision`&&a?.state===`waiting`?(0,R.jsx)(en,{item:e,run:a,context:n}):t===`problem`?(0,R.jsxs)(`div`,{className:`factory-sheet`,children:[(0,R.jsx)(`p`,{className:`factory-problems`,children:a?.state===`failed`?a.reason:`Stopped when Studio restarted.`}),a?.needsCredential?(0,R.jsx)(_n,{label:`Set the agent credential`}):null,o(`retry`,`Retry`)]}):t===`review`?(0,R.jsx)(tn,{item:e,context:n,onOpenReport:r,onOpenDoc:i}):t===`merge`?(0,R.jsx)(`div`,{className:`factory-sheet`,children:a?.compareUrl?(0,R.jsxs)(`a`,{href:a.compareUrl,target:`_blank`,rel:`noreferrer`,children:[`Open `,a.pushedBranch??`the branch`,` to merge`]}):(0,R.jsxs)(`p`,{className:`note`,children:[`Merge `,(0,R.jsx)(`span`,{className:`mono`,children:a?.pushedBranch??`the delivery branch`}),`, then refresh.`]})}):(0,R.jsx)(`div`,{className:`factory-sheet`,children:o(`publish`,`Publish`)})}var rn=e=>`outcome-${e}`;function an(){let e=se(),t=(t,n=!1)=>void e({to:`/factory`,search:e=>({...e,outcome:t}),replace:n,resetScroll:!1});return{open:e=>t(e),step:e=>t(e,!0),close:()=>t(void 0)}}function Z({item:e,context:t,lead:r,progress:i=!0,trailing:a}){let{workset:o,run:s}=e,c=n(o,s),l=c.at??(s?.updatedAt||o.queuedAt),u=an();return(0,R.jsxs)(`li`,{className:`outcome-row-item`,"data-workset":o.id,children:[(0,R.jsxs)(`button`,{type:`button`,className:`outcome-row`,"data-outcome-row":``,onClick:()=>{W.getState().setStepped(!1),u.open(o.id)},children:[(0,R.jsx)(kt,{activity:S(o,s)}),(0,R.jsx)(`span`,{className:`outcome-row-title`,children:o.title}),(0,R.jsx)(`span`,{className:`outcome-row-where`,children:r??c.text}),(0,R.jsx)(`span`,{className:`outcome-row-progress`,children:i?(0,R.jsx)(Ft,{workset:o}):null}),(0,R.jsx)(`span`,{className:`outcome-row-age mono`,children:l?G(l,t.now):``})]}),a]})}function Q({label:e,section:t,count:n,children:r}){return(0,R.jsx)(`div`,{className:`outcome-list-section`,"data-section":t,children:(0,R.jsx)(be,{title:e,count:n,tone:t===`attention`?`warn`:void 0,children:(0,R.jsx)(`ul`,{className:`outcome-list`,children:r})})})}var on=(e,t)=>e.replace(/\.$/,``).toLowerCase()===t.replace(/\.$/,``).toLowerCase();function sn(e,t){return e.workset.problems.length>0||(t.checks?.some(e=>!e.passed)??!1)}function cn({item:e,situation:t,onOpenReport:n}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(It,{checks:t.checks}),(0,R.jsx)(zt,{item:e,onOpenReport:n}),e.workset.problems.length>0?(0,R.jsx)(`ul`,{className:`factory-problems`,children:e.workset.problems.map(e=>(0,R.jsx)(`li`,{children:e},e))}):null]})}function ln({text:e,tasks:t,tail:n}){return(0,R.jsxs)(`div`,{className:`outcome-working`,role:`status`,"aria-label":`Working on`,children:[(0,R.jsx)(`p`,{className:`outcome-working-step`,children:e}),t?(0,R.jsx)(ye,{done:t.done,total:t.total}):null,n.length>0?(0,R.jsx)(`ol`,{className:`outcome-tail`,"aria-label":`Latest log`,children:n.map((e,t)=>(0,R.jsx)(`li`,{children:e},t))}):(0,R.jsx)(`p`,{className:`note`,children:`Waiting for output.`})]})}function un({item:e,kind:t,context:n,situation:r,log:i,onOpenReport:a,onOpenDoc:o}){let{workset:s,run:c}=e,l=C(s,c),u=c?.state===`running`?Ht(i.pieces,3):null;return(0,R.jsxs)(`section`,{className:`outcome-focus`,"data-kind":t??void 0,"aria-label":t?`Needs you`:`Where it is`,children:[t?(0,R.jsx)(`h3`,{children:K(t,c)}):null,u?(0,R.jsx)(ln,{text:r.text,tasks:n.tasksOf(s),tail:u}):(0,R.jsxs)(`p`,{className:`outcome-situation`,children:[r.text,on(l,r.text)?null:(0,R.jsxs)(`span`,{className:`outcome-next`,children:[(0,R.jsx)(`span`,{className:`muted`,children:`Next:`}),` `,l]})]}),(0,R.jsx)(Kt,{run:c,now:n.now}),sn(e,r)?(0,R.jsx)(cn,{item:e,situation:r,onOpenReport:a}):null,t?(0,R.jsx)(nn,{item:e,kind:t,context:n,onOpenReport:a,onOpenDoc:o}):null]})}function dn({run:e,now:t}){return e?.situations?.length?(0,R.jsxs)(`section`,{className:`outcome-history-section`,"aria-label":`What happened`,children:[(0,R.jsx)(`h3`,{children:`What happened`}),(0,R.jsx)(`ol`,{className:`outcome-history`,children:e.situations.map(e=>(0,R.jsxs)(`li`,{children:[(0,R.jsx)(`span`,{className:`factory-age mono`,children:G(e.at,t)}),(0,R.jsx)(`span`,{children:e.text})]},e.at))})]}):null}function $({label:e,summary:t,className:n,children:r}){return(0,R.jsxs)(`details`,{className:j(`outcome-row-fold`,n),"aria-label":e,children:[(0,R.jsxs)(`summary`,{children:[(0,R.jsx)(`span`,{className:`outcome-row-fold-label`,children:e}),(0,R.jsx)(`span`,{className:`outcome-row-fold-summary`,children:t})]}),(0,R.jsx)(`div`,{className:`outcome-row-fold-body`,children:r})]})}function fn({item:e,kind:t,context:n,situation:r,log:i,onOpenReport:a}){let{workset:o,run:s}=e,c=s?.situations?.length??0,l=!!s?.hasLog||J(s),u=[c>0?`${c} ${c===1?`update`:`updates`}`:``,l?`log`:``].filter(Boolean).join(` · `),d=t===`review`?null:(0,R.jsx)(Vt,{item:e,context:n});return(0,R.jsxs)(R.Fragment,{children:[u?(0,R.jsxs)($,{label:`Activity`,summary:u,children:[(0,R.jsx)(dn,{run:s,now:n.now}),(0,R.jsx)(Ut,{item:e,log:i})]}):null,o.intent||d?(0,R.jsxs)($,{label:`Request`,summary:o.intent.split(`
|
|
6
|
+
`)[0]??``,children:[o.intent?(0,R.jsx)(`p`,{className:`outcome-intent`,children:o.intent}):null,d]}):null,(0,R.jsxs)($,{label:`Details`,summary:`${o.stageLabel} · ${Y(s,n.now)}`,className:`outcome-dialog-rail`,children:[sn(e,r)?null:(0,R.jsx)(cn,{item:e,situation:r,onOpenReport:a}),(0,R.jsx)(Yt,{item:e,context:n})]})]})}function pn({item:e,kind:t,context:r,onDeleted:i}){let{workset:a,run:o}=e,c=n(a,o),l=S(a,o),u=o?.state===`running`?o.startedAt:o?.updatedAt||c.at,f=rn(a.id),p=gt(o?.hasLog||J(o)?ne(a.id):null),[h,g]=(0,L.useState)(null),_=(0,L.useRef)(null);h&&o?.reviewReports?.[h.change]!==h.report&&g(null);let[v,y]=(0,L.useState)(null);v&&(a.stage!==`human-review`||!a.changes.includes(v.change))&&y(null);let b=(e,t)=>{let n=o?.reviewReports?.[e];n&&(_.current=t,y(null),g({change:e,report:n}))},x=(e,t,n)=>{_.current=n,g(null),y({change:e,doc:t})},C=()=>{(0,Ve.flushSync)(()=>{g(null),y(null)}),_.current?.focus()},w=h!==null||v!==null,T;return w?T=`report`:t===`control`&&(T=`control`),(0,R.jsxs)(`div`,{id:f,className:`outcome-dialog`,"data-outcome-panel":``,"data-workset":a.id,"data-layout":T,children:[h?(0,R.jsx)(Bt,{change:h.change,report:h.report,onBack:C}):null,v?(0,R.jsx)(We,{companion:r.companionDigest,change:v.change,doc:v.doc,onBack:C}):null,(0,R.jsx)(`header`,{className:`outcome-dialog-head`,hidden:w,children:(0,R.jsxs)(`div`,{className:`outcome-dialog-heading`,children:[(0,R.jsx)(`h2`,{id:`${f}-title`,children:a.title}),(0,R.jsxs)(`p`,{className:`outcome-dialog-state`,"data-activity":l,children:[(0,R.jsx)(kt,{activity:l}),m[l],u?(0,R.jsxs)(`span`,{className:`factory-age mono`,children:[`· `,G(u,r.now)]}):null]})]})}),(0,R.jsxs)(`div`,{className:`outcome-dialog-main`,hidden:w,children:[(0,R.jsx)(`div`,{className:`outcome-path`,children:(0,R.jsx)(ge,{compact:!0,steps:d,...s(a,o)})}),(0,R.jsx)(un,{item:e,kind:t,context:r,situation:c,log:p,onOpenReport:b,onOpenDoc:x}),(0,R.jsx)(fn,{item:e,kind:t,context:r,situation:c,log:p,onOpenReport:b}),(0,R.jsx)(qt,{item:e,context:r,onDeleted:i})]})]})}function mn({items:e,context:t,expanded:n}){if(e.length===0)return null;let r=n?[]:e.slice(Ct),i=e=>(0,R.jsx)(Z,{item:e,context:t,progress:!1},e.workset.id);return(0,R.jsxs)(Q,{label:`Done`,section:`completed`,count:e.length,children:[(n?e:e.slice(0,Ct)).map(i),r.length>0?(0,R.jsx)(`li`,{children:(0,R.jsxs)(`details`,{className:`outcome-list-more`,children:[(0,R.jsxs)(`summary`,{children:[`Show all `,e.length]}),(0,R.jsx)(`ul`,{className:`outcome-list`,children:r.map(i)})]})}):null]})}function hn(){return(0,R.jsxs)(`section`,{className:`factory-first-run`,"aria-label":`How the factory works`,children:[(0,R.jsx)(`h3`,{children:`How an outcome gets delivered`}),(0,R.jsxs)(`ol`,{children:[(0,R.jsx)(`li`,{children:`Describe what you want built or improved, and start it.`}),(0,R.jsx)(`li`,{children:`The factory clarifies and explores; answer its questions as they come up.`}),(0,R.jsx)(`li`,{children:`It writes a plan. Review it, then approve or request a change.`}),(0,R.jsx)(`li`,{children:`It builds the plan on a delivery branch. Merge the branch, then publish.`})]}),(0,R.jsx)(`p`,{className:`note`,children:`Everything that needs you shows under Needs you. Open an outcome to follow its log or take control of its conversation.`})]})}function gn(e){let t=W(e=>e.filter).trim(),r=new Map(e.attention.map(e=>[e.workset.id,e.kind])),i=e.active.filter(e=>!r.has(e.workset.id)),a=e=>{if(!t)return!0;let i=r.get(e.workset.id),a=i?K(i,e.run):``;return nt(`${e.workset.title} ${n(e.workset,e.run).text} ${a}`,t)},o=e.attention.filter(a),s=i.filter(a),c=e.later.filter(a),l=e.completed.filter(a);return{kinds:r,query:t,ordered:[...e.attention,...i,...e.later,...e.completed],attention:o,running:{all:i,shown:s},later:c,completed:l,shownCount:o.length+s.length+c.length+l.length}}function _n({label:e}){let t=W(e=>e.setAgentsOpen);return(0,R.jsx)(`button`,{type:`button`,"data-open-agents":``,onClick:()=>t(!0),children:e})}function vn(){let e=W(e=>e.setGitAccessOpen);return(0,R.jsx)(`button`,{type:`button`,"data-open-git-access":``,onClick:()=>e(!0),children:`Git access`})}function yn({count:e,worksets:t,writable:n,factoryMode:r,onPass:i,children:a}){let o=W(e=>e.filter),s=W(e=>e.setFilter),c=dt();return(0,R.jsxs)(`div`,{className:`view-intro`,"data-factory-live":``,"data-needs-you":e,children:[a,t>0?(0,R.jsx)(`input`,{type:`search`,className:`outcome-filter`,"data-outcome-filter":``,placeholder:`Filter outcomes`,"aria-label":`Filter outcomes`,"aria-keyshortcuts":`/`,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(s(``),e.currentTarget.blur())}}):null,(0,R.jsxs)(`p`,{className:`factory-keys`,children:[n?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`kbd`,{children:`N`}),` new`]}):null,t>0?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`kbd`,{children:`/`}),` filter`]}):null,(0,R.jsx)(`kbd`,{children:`J`}),(0,R.jsx)(`kbd`,{children:`K`}),` move `,(0,R.jsx)(`kbd`,{children:`↵`}),` open `,(0,R.jsx)(`kbd`,{children:`1`}),`–`,(0,R.jsx)(`kbd`,{children:`9`}),` answer`]}),(0,R.jsx)(`button`,{type:`button`,"data-factory-notify":``,hidden:!c.offered,onClick:c.ask,children:`Notify me about decisions`}),r&&n?(0,R.jsx)(_n,{label:`Agents`}):null,r&&n?(0,R.jsx)(vn,{}):null,i?(0,R.jsxs)(`button`,{type:`button`,className:`factory-primary factory-pass`,onClick:i,children:[`Clear what needs you `,(0,R.jsx)(`span`,{className:`mono`,children:e})]}):null]})}function bn(e){let t=new Map((e??[]).map(e=>[e.name,e]));return e=>{let n=0,r=0;for(let i of e.changes){let e=t.get(i);n+=e?.completedTasks??0,r+=e?.totalTasks??0}return r>0?{done:n,total:r}:null}}function xn({payload:e,companionDigest:t,writable:n,sessions:r=null,runs:i=null,now:a}){return{home:T(e.worksets,i),context:{companionDigest:t,writable:n,sessions:r,runner:i!==null,now:a,ticketFormat:e.ticketFormat,tasksOf:bn(e.changes)}}}function Sn({payload:e,companionDigest:t,writable:n,sessions:r=null,runs:i=null,now:a,openId:o,factoryMode:s=!1}){let{home:c,context:l}=xn({payload:e,companionDigest:t,writable:n,sessions:r,runs:i,now:a}),{kinds:u,ordered:d,attention:f,running:p,later:m,completed:h,shownCount:g,query:_}=gn(c),v=p.all.length===0&&c.attention.length===0;lt(),ut(c.attention.length);let[y,b]=(0,L.useState)(`all`),[x,S]=(0,L.useState)(!1),C=an(),w=e=>y===`all`||y===e,T=x?c.attention:d,E=o?d.find(e=>e.workset.id===o)??null:null,D=W(e=>e.agentsOpen),O=W(e=>e.setAgentsOpen),ee=W(e=>e.gitAccessOpen),te=W(e=>e.setGitAccessOpen);return(0,R.jsx)(z.Provider,{value:t,children:(0,R.jsxs)(`section`,{className:j(ve,`view-section factory-home grid content-start gap-4 pb-10`),"aria-label":`Factory`,children:[(0,R.jsx)(Pt,{repositories:e.linkedRepositories,sources:e.repositorySources,keys:e.repositoryKeys,factoryMode:s,context:l}),(0,R.jsx)(yn,{count:c.attention.length,worksets:e.worksets.length,writable:n,factoryMode:s,onPass:c.attention.length>0?()=>{S(!0),W.getState().setStepped(!1),C.open(c.attention[0].workset.id)}:void 0,children:e.worksets.length>0?(0,R.jsx)(xe,{label:`Show outcomes`,value:y,onChange:b,options:[{value:`all`,label:`All`,count:e.worksets.length},{value:`attention`,label:`Needs you`,count:c.attention.length,tone:`warn`},{value:`active`,label:`Running`,count:p.all.length},{value:`later`,label:`Later`,count:c.later.length},{value:`completed`,label:`Done`,count:c.completed.length}]}):null}),w(`attention`)&&f.length>0?(0,R.jsx)(Q,{label:`Needs you`,section:`attention`,count:f.length,children:f.map(e=>(0,R.jsx)(Z,{item:e,context:l,lead:(0,R.jsx)(`span`,{className:`attention-kind`,"data-kind":e.kind,children:K(e.kind,e.run)})},e.workset.id))}):null,w(`active`)&&p.shown.length>0?(0,R.jsx)(Q,{label:`Running`,section:`active`,count:p.shown.length,children:p.shown.map(e=>(0,R.jsx)(Z,{item:e,context:l},e.workset.id))}):null,e.worksets.length===0?(0,R.jsx)(hn,{}):v?(0,R.jsx)(`p`,{className:`note`,children:`The factory is idle. Describe an outcome to get it started.`}):null,(0,R.jsx)(`p`,{className:`note outcome-filter-empty`,"data-outcome-filter-empty":``,hidden:!_||g>0,children:`No outcomes match the filter.`}),w(`later`)&&m.length>0?(0,R.jsx)(Q,{label:`Later`,section:`later`,count:m.length,children:m.map(e=>(0,R.jsx)(Z,{item:e,context:l,progress:!1,trailing:(0,R.jsxs)(R.Fragment,{children:[q(e,l)(`start`,`Start`),(0,R.jsx)(Ot,{item:e,context:l})]})},e.workset.id))}):null,w(`completed`)?(0,R.jsx)(mn,{items:h,context:l,expanded:!!_}):null,(0,R.jsx)(Ae,{items:T.map(e=>e.workset.id),current:E?.workset.id??null,onSelect:e=>{e===null?(S(!1),C.close()):(W.getState().setStepped(!0),C.step(e))},pass:x?`Needs you`:void 0,wide:!0,title:E?E.workset.title:`Outcome`,children:E?(0,R.jsx)(pn,{item:E,kind:u.get(E.workset.id)??null,context:l,onDeleted:C.close},E.workset.id):null}),e.worksetProblems.length>0?(0,R.jsx)(he,{warnings:e.worksetProblems.map(e=>`${e.path} ${e.reason}`)}):null,(0,R.jsx)(he,{warnings:e.warnings}),s&&n&&D?(0,R.jsx)(Ye,{onClose:()=>O(!1)}):null,s&&n&&ee?(0,R.jsx)(Ze,{onClose:()=>te(!1)}):null]})})}function Cn(){let{companion:e,outcome:t}=x.useSearch(),n=se();return(0,L.useEffect)(()=>{let e=/^#outcome-([a-z0-9][a-z0-9-]*)$/.exec(window.location.hash)?.[1];e&&!t&&n({to:`/factory`,search:t=>({...t,outcome:e}),hash:``,replace:!0})},[n,t]),e?(0,R.jsx)(wn,{companion:e,outcome:t}):null}function wn({companion:e,outcome:t}){let{data:n}=w(ce(e));return n.payload?(0,R.jsx)(Sn,{payload:n.payload,companionDigest:e,writable:n.writable,factoryMode:n.factoryMode,sessions:n.sessions,runs:n.runs,now:n.renderedAt,openId:t}):(0,R.jsx)(`section`,{className:`mx-8 max-sm:mx-4`,children:(0,R.jsx)(`p`,{className:`empty m-0 rounded-card border border-dashed border-rule px-6 py-7 text-muted`,children:n.error??`No state collected for this companion.`})})}export{Cn as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t,t as n}from"./jsx-runtime-MZURdZre.js";import{B as r,Bt as i,Dn as a,E as o,Fn as s,G as c,Hn as l,Ht as u,J as d,Jn as f,K as ee,Kn as p,Kt as te,P as ne,Rt as m,Sr as re,Tr as h,U as g,Ut as _,Vt as v,W as ie,Y as ae,Yn as y,_n as b,_r as x,at as oe,br as se,ct as S,dn as C,er as ce,fn as le,ht as ue,ir as w,it as T,j as de,lr as E,lt as fe,mn as D,mr as O,ot as pe,pn as k,q as A,qn as me,qt as he,sr as j,ur as ge,ut as _e,vr as M,xr as N,yn as P,yr as F,z as ve,zt as ye}from"./button-Br0O1sXw.js";var I=e(t(),1),L=0;function be(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(L);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),M;let o=requestAnimationFrame(a);return L=o,()=>{L===o&&(cancelAnimationFrame(o),L=0)}}var R=`data-base-ui-inert`,z=new WeakMap,B=new WeakSet,V=new WeakMap,H=0;function xe(e){return e?ge(e)?e.host:xe(e.parentNode):null}var Se=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=xe(t);return e.contains(n)?n:null}).filter(e=>e!=null),U=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Ce=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{ce(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function W(e,t,n,{mark:r=!0}){let i=Se(t,e),a=r?Ce(t,U(i),new Set(i)):[],o=[],s=[];if(n){let e=Se(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);Ce(t,U(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(z.get(e)||0)+1;z.set(e,r),o.push(e),r===1&&n&&B.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(V.get(e)||0)+1;V.set(e,t),s.push(e),t===1&&e.setAttribute(R,``)}),H+=1,()=>{o.forEach(e=>{let t=(z.get(e)||0)-1;z.set(e,t),t||(B.has(e)||e.removeAttribute(`aria-hidden`),B.delete(e))}),r&&s.forEach(e=>{let t=(V.get(e)||0)-1;V.set(e,t),t||e.removeAttribute(R)}),--H,H||(z=new WeakMap,B=new WeakSet,V=new WeakMap)}}function we(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=p(e[0]).body;return W(e,i,n,{mark:r})}var G=n();function Te(e,t){let n=w(D(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(m(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var K=20,q=[];function Ee(){q=q.filter(e=>e.deref()?.isConnected)}function De(e){Ee(),e&&ce(e)!==`body`&&(q.push(new WeakRef(e)),q.length>K&&(q=q.slice(-20)))}function Oe(){return Ee(),q[q.length-1]?.deref()}function ke(e){return e?fe(e)?e:_e(e)[0]||e:null}function Ae(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=T(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return fe(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function J(e){let{context:t,children:n,disabled:s=!1,initialFocus:d=!0,returnFocus:re=!0,explicitReturnFocus:h,restoreFocus:g=!1,modal:x=!0,closeOnFocusOut:w=!0,openInteractionType:T=``,nextFocusableElement:E,previousFocusableElement:O,beforeContentFocusGuardRef:me,externalTree:ge,getInsideElements:M}=e,N=t.useState(`open`),P=t.useState(`domReferenceElement`),F=t.useState(`floatingElement`),{events:L,dataRef:R}=t.context,z=y(()=>R.current.floatingContext?.nodeId),B=d===!1,V=te(P)&&B,H=c(d),xe=c(re),Se=c(h),U=c(T),Ce=c(N),W=de(ge),K=ne(),q=I.useRef(!1),J=I.useRef(!1),je=I.useRef(!1),Me=I.useRef(null),Ne=I.useRef(``),Pe=I.useRef(``),Fe=I.useRef(null),Ie=I.useRef(null),Le=se(Fe,me,K?.beforeInsideRef),Re=se(Ie,K?.afterInsideRef),ze=ae(),Y=ae(),Be=ie(),Ve=K!=null,X=_(F),Z=y((e=X)=>e?_e(e):[]),Q=y(()=>M?.().filter(e=>e!=null)??[]);I.useEffect(()=>{if(s||!x)return;function e(e){e.key===`Tab`&&k(X,C(p(X)))&&Z().length===0&&!V&&i(e)}let t=p(X);return A(t,`keydown`,e)},[s,X,x,V,Z]),I.useEffect(()=>{if(s||!N)return;let e=p(X);function t(){je.current=!1}function n(e){let t=D(e),n=Q(),r=k(F,t)||k(P,t)||k(K?.portalNode,t)||n.some(e=>e===t||k(e,t));je.current=!r,Pe.current=e.pointerType||`keyboard`,le(t,`[data-base-ui-click-trigger]`)&&(J.current=!0,Y.start(0,()=>{J.current=!1}))}function r(){Pe.current=`keyboard`}return ee(A(e,`pointerdown`,n,!0),A(e,`pointerup`,t,!0),A(e,`pointercancel`,t,!0),A(e,`keydown`,r,!0),t)},[s,F,P,X,N,K,Y,Q]),I.useEffect(()=>{if(s||!w)return;let e=p(X);function n(){J.current=!0,Y.start(0,()=>{J.current=!1})}function r(e){let t=D(e);fe(t)&&(Me.current=t)}function i(n){let r=n.relatedTarget,i=n.currentTarget,s=D(n);x&&r==null&&s!=null&&k(F,s)&&De(s),queueMicrotask(()=>{let c=z(),d=t.context.triggerElements,f=Q(),ee=r?.hasAttribute(ve(`focus-guard`))&&[Fe.current,Ie.current,K?.beforeInsideRef.current,K?.afterInsideRef.current,K?.beforeOutsideRef.current,K?.afterOutsideRef.current,o(O),o(E)].includes(r),p=!(k(P,r)||k(F,r)||k(r,F)||k(K?.portalNode,r)||f.some(e=>e===r||k(e,r))||d.hasMatchingElement(e=>k(e,r))||ee||W&&(u(W.nodesRef.current,c).find(e=>k(e.context?.elements.floating,r)||k(e.context?.elements.domReference,r))||v(W.nodesRef.current,c).find(e=>[e.context?.elements.floating,_(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===P&&X&&Ae(X),g&&i!==P&&!ue(s)&&C(e)===e.body){if(j(X)&&(X.focus(),g===`popup`)){Be.request(()=>{X.focus()});return}let e=Z(),t=Me.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||X;j(n)&&n.focus()}R.current.insideReactTree?R.current.insideReactTree=!1:(V||!x)&&r&&p&&!J.current&&(V||r!==Oe())&&(q.current=!0,t.setOpen(!1,l(a,n)))})}function c(){je.current||(R.current.insideReactTree=!0,ze.start(0,()=>{R.current.insideReactTree=!1}))}let d=j(P)?P:null;if(F||d)return ee(d&&A(d,`focusout`,i),d&&A(d,`pointerdown`,n),F&&A(F,`focusin`,r),F&&A(F,`focusout`,i),F&&K&&A(F,`focusout`,c,!0))},[s,P,F,X,x,W,K,t,w,g,Z,V,z,R,ze,Y,Be,E,O,Q]),I.useEffect(()=>{if(s||!F||!N)return;let e=Array.from(K?.portalNode?.querySelectorAll(`[${ve(`portal`)}]`)||[]),t=(W?v(W.nodesRef.current,z()):[]).find(e=>te(e.context?.elements.domReference||null))?.context?.elements.domReference,n=we([F,...e,Fe.current,Ie.current,K?.beforeOutsideRef.current,K?.afterOutsideRef.current,...Q(),t,o(O),o(E),V?P:null].filter(e=>e!=null),{ariaHidden:x||V,mark:!1}),r=we([F,...e].filter(e=>e!=null));return()=>{r(),n()}},[N,s,P,F,x,K,V,W,z,E,O,Q]),f(()=>{if(!N||s||!j(X))return;Ne.current=``,Pe.current=``;let e=p(X),t=C(e);queueMicrotask(()=>{let n=H.current,r=typeof n==`function`?n(U.current||``):n;if(r===void 0||r===!1||k(X,t))return;let i=null,a=()=>(i??=Z(X),i[0]||X),s;s=r===!0||r===null?a():o(r),s||=a();let c=k(X,C(e)),l=R.current.openEvent,u=l?.type===`mousedown`&&m(l);be(s,{sync:u,preventScroll:s===X,shouldFocus(){if(!Ce.current)return!1;if(c)return!0;let t=C(e);return!(t!==s&&k(X,t))}})})},[s,N,X,Z,H,U,Ce,R]);let $=I.useRef(null);f(()=>{if(s||!X){$.current=null;return}$.current&&=($.current.cancelled=!0,null);let e=p(X),t=C(e),n=U.current==null;De(t);function r(e){if(e.open||(Ne.current=Te(e.nativeEvent,Pe.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(ve(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(q.current=!0),e.reason===`outside-press`){if(e.nested)q.current=!1;else if(m(e.nativeEvent)||ye(e.nativeEvent))q.current=!1;else{let e=!1;p(X).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?q.current=!1:q.current=!0}}}L.on(`openchange`,r);function i(e){let r=xe.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=P?.isConnected?P:null,s=t?.isConnected&&ce(t)!==`body`?t:null,c=n?s||a:a||s;return c||=Oe()||null,typeof i==`boolean`?c:o(i)||c||null}return()=>{L.off(`openchange`,r);let t=C(e),n=Q(),a=k(F,t)||n.some(e=>e===t||k(e,t))||W&&u(W.nodesRef.current,z(),!1).some(e=>k(e.context?.elements.floating,t)),o=xe.current,s=Ne.current,c=i(s),l={cancelled:!1};$.current=l,queueMicrotask(()=>{$.current===l&&($.current=null);let n=ke(c),r=Se.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!q.current&&j(n)&&(r||n===t||t===e.body||a)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}q.current=!1})}},[s,F,X,xe,Se,U,L,W,P,z,Q]),f(()=>{if(!b||N||!F)return;let e=C(p(F));j(e)&&he(e)&&k(F,e)&&e.blur()},[N,F]),f(()=>{if(!s&&K)return K.setFocusManagerState({modal:x,closeOnFocusOut:w,open:N,onOpenChange:t.setOpen,domReference:P}),()=>{K.setFocusManagerState(null)}},[s,K,x,N,t,w,P]),f(()=>{if(!s&&X)return Ae(X),()=>{queueMicrotask(Ee)}},[s,X]);let He=!s&&(!x||!V)&&(Ve||x);return(0,G.jsxs)(I.Fragment,{children:[He&&(0,G.jsx)(r,{"data-type":`inside`,ref:Le,onFocus:e=>{if(x){let e=Z();be(e[e.length-1])}else K?.portalNode&&(q.current=!1,S(e,K.portalNode)?oe(P)?.focus():o(O??K.beforeOutsideRef)?.focus())}}),n,He&&(0,G.jsx)(r,{"data-type":`inside`,ref:Re,onFocus:e=>{x?be(Z()[0]):K?.portalNode&&(w&&(q.current=!0),S(e,K.portalNode)?pe(P)?.focus():o(E??K.afterOutsideRef)?.focus())}})]})}function je(e){return F(19)?e:e?`true`:void 0}var Me=`data-valid`,Ne=`data-invalid`,Pe={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Fe={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},Ie={disabled:!1,...Fe},Le={valid(e){return e===null?null:e?{[Me]:``}:{[Ne]:``}}},Re={invalid:void 0,name:void 0,validityData:{state:Pe,errors:[],error:``,value:``,initialValue:null},setValidityData:M,disabled:void 0,setTouched:M,setDirty:M,setFilled:M,setFocused:M,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:Ie,registerFieldControl:M,validation:{getValidationProps:(e,t=x)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:M,getInputControl:()=>null,commit:async()=>{},change:M}},ze=I.createContext(Re);function Y(e=!0){let t=I.useContext(ze);if(t.setValidityData===M&&!e)throw Error(me(28));return t}function Be(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Y(),s=N(()=>Symbol());f(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),f(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var Ve=I.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:M,validationMode:`onSubmit`,submitCountRef:{current:0}});function X(){return I.useContext(Ve)}var Z=I.createContext({controlId:void 0,registerControlId:M,resetControlId:M,labelId:void 0,setLabelId:M,messageIds:[],setMessageIds:M,getDescriptionProps:e=>e});function Q(){return I.useContext(Z)}function $(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=Q(),o=re(),s=N(()=>Symbol()),c=I.useRef(!1),l=I.useRef(!1),u=y(()=>{c.current&&i!==M&&(c.current=!1,i(s.current,void 0))});return f(()=>{if(!n||i===M){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),f(()=>u,[u]),(n?r:void 0)??t??o}function He(e,t){let n=I.useRef(e),r=y(t);f(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function Ue(e,t,n){let{setFocused:r,focusOwnerRef:i}=Y(),a=y(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return f(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}var We=I.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Ge={},Ke={},qe=``;function Je(e,t){return E(e)?e:t}function Ye(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Je(t,n)).overflowY)}function Xe(e){if(typeof document>`u`)return!1;let t=p(e);return w(t).innerWidth-t.documentElement.clientWidth>0}function Ze(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=p(e),n=t.documentElement,r=t.body,i=Je(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Qe(e){let t=p(e),n=t.documentElement,r=t.body,i=Je(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function $e(e){let t=p(e),n=t.documentElement,r=t.body,i=w(n),a=0,o=0,s=!1,c=g.create();if(b&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Ge={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},qe=n.style.scrollBehavior,Ke={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,ee=t.overflowX===`scroll`||c.overflowX===`scroll`,p=Math.max(0,i.innerWidth-r.clientWidth),te=Math.max(0,i.innerHeight-r.clientHeight),ne=parseFloat(c.marginTop)+parseFloat(c.marginBottom),m=parseFloat(c.marginLeft)+parseFloat(c.marginRight),re=Je(n,r);s=Ze(e),s?(n.style.scrollbarGutter=l,re.style.overflowY=`hidden`,re.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||ee)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:ne||te?`calc(100dvh - ${ne+te}px)`:`100dvh`,width:m||p?`calc(100vw - ${m+p}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,Ge),Object.assign(r.style,Ke),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=qe)}function d(){u(),c.request(l)}l();let f=A(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var et=new class{lockCount=0;restore=null;timeoutLock=d.create();timeoutUnlock=d.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=p(e),n=t.documentElement,r=t.body,i=w(n);if(Ye(i,n,r)){let t=new i.MutationObserver(()=>{Ye(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=P||!Xe(e);this.restore=a?Qe(e):$e(e)}};function tt(e=!0,t=null){f(()=>{if(e)return et.acquire(t)},[e,t])}var nt=I.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:c=!1,onValueChange:u,defaultValue:d,autoFocus:ee=!1,style:p,...te}=e,{state:ne,name:m,disabled:re,setTouched:h,setDirty:g,validityData:_,setFilled:v,validationMode:ie,validation:b}=Y(),{clearErrors:x,elementRef:oe,submitCountRef:se}=X(),S=re||c,C=m??a,ce={...ne,disabled:S},{labelId:le}=Q(),ue=$({id:i}),w=o!==void 0,T=o==null?void 0:String(o),de=y(()=>b.inputRef.current?.value);Be(b.inputRef,ue,T,de,!S,a),f(()=>{let e=T??b.inputRef.current?.value;e!==void 0&&v(e!==``)},[T,d,b.inputRef,v]),He(T,()=>{T!==void 0&&(x(C),g(T!==(_.initialValue??``)),b.change(T))});let E=I.useRef(null),fe=Ue(S,E),D=ae();return O(`input`,e,{ref:[t,E],state:ce,props:[{id:ue,disabled:S,name:C,ref:b.inputRef,"aria-labelledby":le,autoFocus:ee,...w?{value:o}:{defaultValue:d},onChange(e){let t=e.currentTarget.value,n=l(s,e.nativeEvent);u?.(t,n),w||(g(t!==(_.initialValue??``)),v(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(x(C),b.change(t)))},onFocus(){fe(!0)},onBlur(e){if(h(!0),fe(!1),ie===`onBlur`){let t=e.currentTarget.value;b.commit(t),w&&queueMicrotask(()=>{let e=b.inputRef.current?.value;e!==void 0&&e!==t&&e!==(_.initialValue??``)&&b.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){h(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===oe.current&&!e.defaultPrevented){let t=e.currentTarget,n=se.current;D.start(0,()=>{se.current===n&&b.commit(t.value)})}else b.commit(t)}}},te,e=>b.getValidationProps(S,e)],stateAttributesMapping:Le})}),rt=I.forwardRef(function(e,t){return(0,G.jsx)(nt,{ref:t,...e})}),it=I.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return O(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function at({className:e,...t}){return(0,G.jsx)(`kbd`,{"data-slot":`kbd`,className:h(`inline-grid h-[18px] min-w-[18px] place-items-center rounded-[4px] border border-b-2 border-rule bg-page px-1 font-mono text-[0.66rem] leading-none font-semibold text-muted select-none`,e),...t})}var ot=`w-full min-w-0 rounded-control border border-rule bg-page px-3 text-sm text-text outline-none transition-colors placeholder:text-muted focus:border-accent disabled:cursor-not-allowed disabled:opacity-60`;function st({className:e,...t}){return(0,G.jsx)(rt,{"data-slot":`input`,className:h(ot,`h-9`,e),...t})}function ct({className:e,orientation:t=`horizontal`,...n}){return(0,G.jsx)(it,{"data-slot":`separator`,orientation:t,className:h(`shrink-0 bg-rule-soft data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch`,e),...n})}export{je as _,We as a,$ as c,Be as d,Re as f,Le as g,Fe as h,tt as i,Q as l,Y as m,at as n,Ue as o,ze as p,ct as r,He as s,st as t,X as u,J as v,be as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{St as e}from"./index-Df8L1LQa.js";var t=e;export{t as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ft as e}from"./studio-queries-ibmpFo6R.js";import{t}from"./markdown-view-BOX6x0rL.js";import{t as n}from"./jsx-runtime-MZURdZre.js";var r=n(),i=[{id:`start`,label:`Start here`,path:`/getting-started`},{id:`worktrees`,label:`Worktrees`,path:`/getting-started/worktrees`},{id:`vscode`,label:`VS Code & Cursor`,path:`/getting-started/vscode`}];function a({topic:n,guide:a,search:o}){let s={companion:o.companion,studioMode:o.studioMode};return(0,r.jsxs)(`div`,{className:`guide-reader min-w-0 px-6 max-sm:px-4`,children:[(0,r.jsx)(`nav`,{"aria-label":`Getting Started topics`,className:`mb-6 flex flex-wrap gap-2 border-b border-rule pb-3`,children:i.map(({id:t,label:i,path:a})=>(0,r.jsx)(e,{to:a,search:s,activeOptions:{exact:!0},"aria-current":n===t?`page`:void 0,className:`rounded-control px-3 py-2 text-sm text-muted hover:bg-surface hover:text-text aria-[current=page]:bg-accent-soft aria-[current=page]:font-semibold aria-[current=page]:text-accent`,children:i},t))}),(0,r.jsxs)(`article`,{className:`min-w-0 max-w-[70ch] pb-8`,"aria-label":a?.title??`Guide not found`,children:[a&&n!==`start`?(0,r.jsx)(`h2`,{className:`mb-4 text-lg font-semibold`,children:a.title}):null,a?(0,r.jsx)(t,{nodes:a.nodes,guideSearch:s}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`h2`,{className:`mb-2 text-lg font-semibold`,children:`Guide not found`}),(0,r.jsxs)(`p`,{children:[`This topic is not bundled with Studio.`,` `,(0,r.jsx)(e,{to:`/getting-started`,search:s,className:`text-accent underline`,children:`Return to Start here`}),`.`]})]})]})]})}export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./getting-started-D6kgWwWZ.js";import{t}from"./index-Df8L1LQa.js";import{t as n}from"./jsx-runtime-MZURdZre.js";var r=n(),i=function(){return(0,r.jsx)(e,{topic:t.useParams().topic,guide:t.useLoaderData(),search:t.useSearch()})};export{i as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./getting-started-D6kgWwWZ.js";import{n as t}from"./index-Df8L1LQa.js";import{t as n}from"./jsx-runtime-MZURdZre.js";var r=n(),i=function(){return(0,r.jsx)(e,{topic:`start`,guide:t.useLoaderData(),search:t.useSearch()})};export{i as component};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graph-canvas-Ba37Y5AE.js","assets/studio-Cpz_HRHp.js","assets/jsx-runtime-MZURdZre.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Dr as e,Tr as t,r as n}from"./button-Br0O1sXw.js";import"./studio-Cpz_HRHp.js";import{a as r,i,n as a,t as o}from"./jsx-runtime-MZURdZre.js";import{c as s,o as c}from"./store-Dw34catY.js";import{c as l,ft as u}from"./studio-queries-ibmpFo6R.js";import{n as d,r as f,t as p}from"./panel-dbmCx7Mx.js";import{a as m,i as h,o as g,s as _,t as v}from"./specs-view-BnCLA0gW.js";import{t as y}from"./preload-helper-BLdHbfdN.js";import{l as b}from"./index-Df8L1LQa.js";var x=r(a(),1),S={repository:8,area:5,capability:2.5},C=e=>`e${e}`;function w(e,t){let n=2166136261^t;for(let t=0;t<e.length;t++)n=Math.imul(n^e.charCodeAt(t),16777619);return(n>>>0)%1e5/1e5}function T(e,t,n){let r=w(t,1)*Math.PI*2,i=n*(.35+.65*w(t,2));return{x:e.x+Math.cos(r)*i,y:e.y+Math.sin(r)*i}}function E(e){let t=e.nodes.map(()=>({x:0,y:0})),n=e.nodes.flatMap((e,t)=>e.kind===`repository`?[t]:[]),r=Math.sqrt(e.nodes.length)*10;n.forEach((e,i)=>{let a=i/Math.max(1,n.length)*Math.PI*2;t[e]=n.length===1?{x:0,y:0}:{x:Math.cos(a)*r,y:Math.sin(a)*r}});let i=new Map,a=new Map;return O(e,(e,t,n)=>{n===`in`&&a.set(e,t),n===`binds`&&!i.has(e)&&i.set(e,t)}),e.nodes.forEach((e,n)=>{if(e.kind!==`area`)return;let i=a.get(n);t[n]=T(i===void 0?{x:0,y:0}:t[i],e.id,r/2)}),e.nodes.forEach((e,n)=>{if(e.kind!==`capability`)return;let a=i.get(n);t[n]=a===void 0?T({x:0,y:0},e.id,r*1.4):T(t[a],e.id,r/5)}),t}function D(e,t){if(!t)return{positions:E(e),missing:e.nodes.length};let n=e.nodes.map(e=>t.get(e.id)),r=n.filter(e=>!e).length;if(r===0)return{positions:n,missing:r};let i=new Map,a=(e,t)=>{let r=n[t];if(n[e]||!r)return;let a=i.get(e)??{x:0,y:0,count:0};i.set(e,{x:a.x+r.x,y:a.y+r.y,count:a.count+1})};O(e,(e,t)=>{a(e,t),a(t,e)});let o=E(e);return{positions:n.map((t,n)=>{if(t)return t;let r=i.get(n);return r?T({x:r.x/r.count,y:r.y/r.count},e.nodes[n].id,1):o[n]}),missing:r}}function O(e,t){for(let n=0,r=0;n<e.edges.length;n+=4,r++)t(e.edges[n],e.edges[n+1],h[e.edges[n+2]],e.edges[n+3],r)}var k={hidden:new Set,minWeight:1};function A(e,t){return t.hidden.has(e.kind)?!1:e.kind!==`co-change`||e.weight>=t.minWeight}function j(e){return e.kind===`binds`||e.kind===`in`?.3:e.kind===`mentions`?1:Math.min(4,e.weight)}function M(e,t,n=8){let r=t.trim().toLowerCase();if(!r)return[];let i={capability:0,area:1,repository:2};return e.nodes.filter(e=>[e.label,e.area,e.repository].some(e=>e?.toLowerCase().includes(r))).toSorted((e,t)=>Number(t.label.toLowerCase()===r)-Number(e.label.toLowerCase()===r)||i[e.kind]-i[t.kind]||e.label.localeCompare(t.label)).slice(0,n)}function ee(e){let t=new Map(e.nodes.map((e,t)=>[e.id,t])),n=e.nodes.map(()=>[]);return O(e,(e,t,r,i,a)=>{n[e].push({other:t,kind:r,edge:a,outgoing:!0}),n[t].push({other:e,kind:r,edge:a,outgoing:!1})}),{byId:t,links:n}}function te(e,t,n){let r=new Set(e.history[n]);return e.history[t].flatMap(t=>r.has(t)?[e.archives[t]]:[])}function N(e,t){let n=t*4;return!Number.isInteger(t)||t<0||n>=e.edges.length?null:{source:e.edges[n],target:e.edges[n+1],kind:h[e.edges[n+2]],weight:e.edges[n+3]}}function P(e,t,n){if(`edge`in n){let t=N(e,n.edge);return t?`Connection ${e.nodes[t.source].label} and ${e.nodes[t.target].label}`:`Connection`}let r=t.byId.get(n.node);if(r===void 0)return`Graph`;let i=e.nodes[r];return`${F[i.kind]} ${i.label}`}var F={capability:`Spec`,area:`Area`,repository:`Repository`};function I(e){return e?`edge`in e?`edge:${e.edge}`:e.node:null}function L(e){return e.kind===`capability`?`spec`:e.kind===`area`?e.repository??``:`repository`}var R=o(),z={"proposal.md":`proposal`,"design.md":`design`,"tasks.md":`tasks`,"verification.md":`verification`},B=e=>e.label;function V({search:e,path:t,children:n}){return(0,R.jsx)(u,{className:`text-sm`,to:`/vault`,search:{companion:e.companion,studioMode:e.studioMode,path:t},children:n})}function H({archive:e,capabilities:t,search:n}){return(0,R.jsxs)(`li`,{className:`grid gap-1 border-t border-rule-soft py-2 first:border-t-0`,"data-archive":e.anchor,children:[(0,R.jsxs)(`span`,{className:`flex items-baseline gap-2`,children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate font-mono text-sm`,children:e.name}),(0,R.jsx)(`time`,{className:`ml-auto font-mono text-2xs text-muted`,dateTime:e.archivedOn,children:e.archivedOn})]}),(0,R.jsxs)(`span`,{className:`flex flex-wrap gap-x-3 gap-y-1`,children:[e.artifacts.map(t=>(0,R.jsx)(V,{search:n,path:g(e.anchor,t),children:z[t]??t},t)),t.map(r=>(0,R.jsx)(V,{search:n,path:g(e.anchor,`specs/${r}/spec.md`),children:t.length>1?`${r} delta`:`delta spec`},r))]})]})}function U({archives:e,capabilities:t,search:n,empty:r}){return e.length===0?(0,R.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:r}):(0,R.jsx)(`ul`,{className:`m-0 list-none p-0`,children:e.map(e=>(0,R.jsx)(H,{archive:e,capabilities:t,search:n},e.anchor))})}function W({nodes:e,onSelectNode:n}){return(0,R.jsx)(`ul`,{className:`m-0 grid list-none gap-0.5 p-0`,children:e.map(e=>(0,R.jsx)(`li`,{children:(0,R.jsx)(`button`,{type:`button`,className:t(`w-full truncate rounded-[4px] border-0 bg-transparent px-1.5 py-0.5 text-left text-sm text-text hover:bg-surface`,e.kind===`capability`&&`font-mono`),"data-graph-node":e.id,onClick:()=>n(e.id),children:e.label})},e.id))})}function G(e,t,n,r,i){return t.links[n].flatMap(t=>t.kind===r&&(i===void 0||t.outgoing===i)?[e.nodes[t.other]]:[]).toSorted((e,t)=>e.label.localeCompare(t.label))}function K({wire:e,index:t,search:n,onSelectNode:r,node:i}){let a=B(e.nodes[i]),o=G(e,t,i,`binds`,!0).map(({repository:e,area:t})=>({repository:e,area:t})),s=e.history[i].map(t=>e.archives[t]),c=G(e,t,i,`mentions`,!0),l=G(e,t,i,`mentions`,!1),u=G(e,t,i,`co-change`);return(0,R.jsxs)(v,{spec:{capability:a,scopes:o},companion:n.companion,withStatus:!1,children:[(0,R.jsx)(d,{title:`History`,aside:`${s.length} archived`,children:(0,R.jsx)(U,{archives:s,capabilities:[a],search:n,empty:`No archived change names this spec.`})}),c.length+l.length+u.length>0?(0,R.jsxs)(d,{title:`Connected specs`,children:[c.length>0?(0,R.jsx)(q,{label:`Mentions`,nodes:c,onSelectNode:r}):null,l.length>0?(0,R.jsx)(q,{label:`Mentioned by`,nodes:l,onSelectNode:r}):null,u.length>0?(0,R.jsx)(q,{label:`Changed together`,nodes:u,onSelectNode:r}):null]}):null]})}function q({label:e,nodes:t,onSelectNode:n}){return(0,R.jsxs)(`div`,{className:`grid gap-1`,children:[(0,R.jsx)(`span`,{className:`text-xs text-muted`,children:e}),(0,R.jsx)(W,{nodes:t,onSelectNode:n})]})}function J({wire:e,index:t,onSelectNode:n,node:r}){let i=e.nodes[r],a=G(e,t,r,`binds`,!1),o=G(e,t,r,`in`,!0)[0];return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(p,{mono:i.area!==`.`,title:i.label,kicker:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`span`,{children:`Area`}),o?(0,R.jsx)(`button`,{type:`button`,className:`ml-auto border-0 bg-transparent p-0 font-mono text-xs text-muted hover:text-text`,onClick:()=>n(o.id),children:o.label}):null]})}),(0,R.jsx)(d,{title:`Capabilities`,aside:a.length,children:(0,R.jsx)(W,{nodes:a,onSelectNode:n})})]})}function Y({wire:e,index:t,onSelectNode:n,node:r}){let i=e.nodes[r],a=G(e,t,r,`in`,!1);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(p,{mono:!0,title:i.label,kicker:(0,R.jsx)(`span`,{children:`Repository`})}),a.map(r=>{let i=G(e,t,t.byId.get(r.id),`binds`,!1);return(0,R.jsxs)(d,{title:r.area===`.`?m:r.label,aside:i.length,children:[(0,R.jsx)(`button`,{type:`button`,className:`justify-self-start border-0 bg-transparent p-0 text-xs text-muted hover:text-text`,onClick:()=>n(r.id),children:`Open Area`}),(0,R.jsx)(W,{nodes:i,onSelectNode:n})]},r.id)})]})}var X={binds:`Binds`,in:`In repository`,mentions:`Mentions`,"co-change":`Changed together`};function Z({wire:e,search:t,onSelectNode:n,edge:r}){let i=N(e,r);if(!i)return(0,R.jsx)(`p`,{className:`m-0 px-5 py-4 text-sm text-muted`,children:`This connection is no longer in the graph.`});let a=e.nodes[i.source],o=e.nodes[i.target],s=i.kind===`co-change`?te(e,i.source,i.target):[];return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(p,{title:X[i.kind],kicker:i.kind===`co-change`?(0,R.jsx)(`span`,{children:`${i.weight} shared archived ${i.weight===1?`change`:`changes`}`}):null,children:(0,R.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5 font-mono text-sm`,children:[(0,R.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent p-0 text-accent`,onClick:()=>n(a.id),children:a.label}),(0,R.jsx)(`span`,{className:`text-muted`,"aria-hidden":`true`,children:i.kind===`co-change`?`↔`:`→`}),(0,R.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent p-0 text-accent`,onClick:()=>n(o.id),children:o.label})]})}),i.kind===`co-change`?(0,R.jsx)(d,{title:`Archived changes`,aside:s.length,children:(0,R.jsx)(U,{archives:s,capabilities:[a.label,o.label],search:t,empty:`No archive names both specs.`})}):null]})}function ne({selection:e,...t}){if(`edge`in e)return(0,R.jsx)(Z,{...t,edge:e.edge});let n=t.index.byId.get(e.node);if(n===void 0)return null;let r=t.wire.nodes[n].kind;return r===`capability`?(0,R.jsx)(K,{...t,node:n}):r===`area`?(0,R.jsx)(J,{...t,node:n}):(0,R.jsx)(Y,{...t,node:n})}var re=(0,x.lazy)(()=>y(()=>import(`./graph-canvas-Ba37Y5AE.js`),__vite__mapDeps([0,1,2]))),ie={binds:`Areas`,in:`Repositories`,mentions:`Mentions`,"co-change":`Changed together`};function ae({search:n,node:r,onNodeChange:i}){let a=e({...l(n.companion??``),enabled:!!n.companion});return a.data?(0,R.jsx)(oe,{wire:a.data,search:n,node:r,onNodeChange:i}):a.isError?(0,R.jsx)(`section`,{className:t(s,`pb-10`),children:(0,R.jsxs)(c,{children:[`The spec graph could not be built: `,a.error.message]})}):(0,R.jsx)(`section`,{className:t(s,`pb-10`),children:(0,R.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Building the spec graph…`})})}function oe({wire:e,search:n,node:r,onNodeChange:i}){let a=(0,x.useMemo)(()=>ee(e),[e]),[o,l]=(0,x.useState)(k),[u,d]=(0,x.useState)(null),p=u?.wire===e?u.edge:null,[m,h]=(0,x.useState)(null),g=e.nodes.filter(e=>e.kind===`capability`).length,_=r!==void 0&&a.byId.has(r)?r:null,v=p===null?_?{node:_}:null:{edge:p},y=e=>{d(null),i(e??void 0)},b=e=>{y(e),h(t=>({id:e,nonce:(t?.nonce??0)+1}))};if(g===0)return(0,R.jsx)(`section`,{className:t(s,`pb-10`),children:(0,R.jsx)(c,{children:`No specs in this companion.`})});let S=I(v);return(0,R.jsxs)(`section`,{className:t(s,`flex min-h-[480px] flex-1 flex-col gap-2 pb-4`),"aria-label":`Spec graph`,"data-graph-view":!0,children:[(0,R.jsx)(se,{wire:e,filter:o,onFilter:l,onFocus:b}),(0,R.jsx)(Q,{wire:e,onSelectNode:b}),(0,R.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-hidden rounded-card border border-rule`,children:[(0,R.jsx)(x.Suspense,{fallback:(0,R.jsx)(`p`,{className:`m-0 p-4 text-sm text-muted`,children:`Loading the renderer…`}),children:(0,R.jsx)(re,{wire:e,layoutKey:n.companion??``,filter:o,selected:_,focus:m,onSelectNode:y,onSelectEdge:t=>{i(void 0),d({wire:e,edge:t})}})}),(0,R.jsx)(ce,{})]}),(0,R.jsx)(f,{items:S?[S]:[],current:S,onSelect:e=>{e===null&&y(null)},wide:!0,title:v?P(e,a,v):`Graph`,children:v?(0,R.jsx)(ne,{selection:v,wire:e,index:a,search:n,onSelectNode:b}):null})]})}function se({wire:e,filter:t,onFilter:r,onFocus:i}){let[a,o]=(0,x.useState)(``),s=(0,x.useId)(),c=(0,x.useMemo)(()=>M(e,a),[e,a]),l=(0,x.useMemo)(()=>{let t=1;return O(e,(e,n,r,i)=>{r===`co-change`&&(t=Math.max(t,i))}),t},[e]),u=e=>{let n=new Set(t.hidden);n.has(e)?n.delete(e):n.add(e),r({...t,hidden:n})};return(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-2`,role:`toolbar`,"aria-label":`Graph controls`,children:[(0,R.jsxs)(`form`,{className:`relative`,role:`search`,onSubmit:e=>{e.preventDefault(),c[0]&&(i(c[0].id),o(``))},children:[(0,R.jsxs)(`label`,{className:`flex h-8 items-center gap-2 rounded-control border border-rule bg-surface px-2.5`,children:[(0,R.jsx)(n,{name:`search`,className:`size-3.5 text-muted`}),(0,R.jsx)(`span`,{className:`sr-only`,children:`Find a spec, Area or repository`}),(0,R.jsx)(`input`,{className:`w-56 border-0 bg-transparent text-sm text-text outline-none placeholder:text-muted`,placeholder:`Find a spec, Area or repository`,value:a,onChange:e=>o(e.target.value),"aria-controls":s,"aria-autocomplete":`list`,"data-graph-search":!0})]}),c.length>0?(0,R.jsx)(`ul`,{id:s,className:`absolute top-9 left-0 z-20 m-0 grid w-80 list-none gap-0.5 rounded-control border border-rule bg-surface p-1 shadow-float`,"aria-label":`Matches`,children:c.map(e=>(0,R.jsx)(`li`,{children:(0,R.jsxs)(`button`,{type:`button`,className:`flex w-full items-baseline gap-2 rounded-[4px] border-0 bg-transparent px-2 py-1 text-left text-sm text-text hover:bg-page`,onClick:()=>{i(e.id),o(``)},children:[(0,R.jsx)(`span`,{className:`min-w-0 truncate font-mono`,children:e.label}),(0,R.jsx)(`span`,{className:`ml-auto text-2xs text-muted`,children:L(e)})]})},e.id))}):null]}),(0,R.jsxs)(`fieldset`,{className:`m-0 flex flex-wrap items-center gap-3 border-0 p-0`,children:[(0,R.jsx)(`legend`,{className:`sr-only`,children:`Connections shown`}),h.map(e=>(0,R.jsxs)(`label`,{className:`inline-flex items-center gap-1.5 text-xs text-muted`,children:[(0,R.jsx)(`input`,{type:`checkbox`,checked:!t.hidden.has(e),onChange:()=>u(e),"data-graph-edge-kind":e}),ie[e]]},e))]}),l>1?(0,R.jsxs)(`label`,{className:`inline-flex items-center gap-2 text-xs text-muted`,children:[`Changed together at least`,(0,R.jsx)(`input`,{type:`range`,min:1,max:l,value:t.minWeight,onChange:e=>r({...t,minWeight:Number(e.target.value)}),disabled:t.hidden.has(`co-change`),"data-graph-min-weight":!0}),(0,R.jsxs)(`span`,{className:`w-4 font-mono tabular-nums`,children:[t.minWeight,`×`]})]}):null]})}function Q({wire:e,onSelectNode:t}){if(e.unbound.length===0&&e.broken.length===0)return null;let n=[e.unbound.length>0?`${e.unbound.length} unbound ${e.unbound.length===1?`spec`:`specs`}`:null,e.broken.length>0?`${e.broken.length} broken ${e.broken.length===1?`link`:`links`}`:null].filter(Boolean);return(0,R.jsxs)(`details`,{className:`text-xs text-muted`,"data-graph-problems":!0,children:[(0,R.jsx)(`summary`,{className:`cursor-pointer text-warn`,children:n.join(` · `)}),(0,R.jsxs)(`div`,{className:`grid gap-2 pt-2`,children:[e.unbound.length>0?(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`m-0`,children:`They name no repository/Area pair, so they bind nothing:`}),(0,R.jsx)(`p`,{className:`m-0 flex flex-wrap gap-x-2 font-mono`,children:e.unbound.map(e=>(0,R.jsx)(`button`,{type:`button`,className:`border-0 bg-transparent p-0 text-text hover:text-accent`,onClick:()=>t(_(e)),children:e},e))})]}):null,e.broken.length>0?(0,R.jsx)(`ul`,{className:`m-0 grid list-none gap-0.5 p-0 font-mono`,"aria-label":`Broken links`,children:e.broken.map(e=>(0,R.jsxs)(`li`,{children:[e.from,` → `,(0,R.jsx)(`span`,{className:`text-bad`,children:e.target})]},`${e.from}>${e.target}`))}):null]})]})}function ce(){return(0,R.jsxs)(`ul`,{className:`pointer-events-none absolute top-2 left-2 m-0 flex list-none gap-3 rounded-control bg-[color-mix(in_srgb,var(--panel)_85%,transparent)] px-2 py-1 text-2xs text-muted`,"aria-label":`Legend`,children:[(0,R.jsxs)(`li`,{className:`inline-flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`size-1.5 rounded-full bg-accent`,"aria-hidden":`true`}),` Spec`]}),(0,R.jsxs)(`li`,{className:`inline-flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`size-2 rounded-full bg-info`,"aria-hidden":`true`}),` Area`]}),(0,R.jsxs)(`li`,{className:`inline-flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`size-2.5 rounded-full bg-why`,"aria-hidden":`true`}),` Repository`]})]})}var le=i({component:()=>$}),$=function(){let e=b.useSearch(),t=b.useNavigate();return e.companion?(0,R.jsx)(ae,{search:{companion:e.companion,studioMode:e.studioMode},node:e.node,onNodeChange:e=>void t({search:t=>({...t,node:e}),replace:!1})}):null};export{O as a,E as c,$ as component,A as i,S as n,j as o,C as r,D as s,le as t};
|