@uniqbit/mate-core 1.0.0-canary.9 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/claude-capability-plugins/companion-mentions/.claude-plugin/plugin.json +1 -1
  2. package/package.json +5 -4
  3. package/src/cli/commands/artifact/delivery/link.ts +1 -1
  4. package/src/cli/commands/artifact/delivery/output.ts +10 -1
  5. package/src/cli/commands/artifact/delivery/resolve.ts +3 -2
  6. package/src/cli/commands/artifact/delivery/submit.ts +9 -4
  7. package/src/cli/commands/artifact/delivery/take.ts +12 -9
  8. package/src/cli/commands/artifact/finish/command.ts +16 -14
  9. package/src/cli/commands/artifact/finish/engine.ts +8 -8
  10. package/src/cli/commands/artifact/project/command.ts +2 -3
  11. package/src/cli/commands/companion/hub.ts +11 -6
  12. package/src/cli/commands/companion/link.ts +173 -46
  13. package/src/cli/commands/report/contract.ts +0 -17
  14. package/src/cli/commands/studio/access.ts +4 -0
  15. package/src/cli/commands/studio/actions.ts +35 -2
  16. package/src/cli/commands/studio/mcp-manager.ts +162 -0
  17. package/src/cli/commands/studio/routes.ts +12 -0
  18. package/src/cli/commands/studio/selection.ts +44 -11
  19. package/src/cli/commands/studio/server.ts +246 -2
  20. package/src/cli/commands/studio/services.ts +26 -0
  21. package/src/cli/commands/studio/terminal-launch.ts +21 -4
  22. package/src/cli/commands/studio/terminal.ts +3 -14
  23. package/src/cli/commands/studio/work-requests.ts +9 -0
  24. package/src/cli/commands/studio/work.ts +473 -0
  25. package/src/cli/commands/vscode/release-vsix.json +2 -2
  26. package/src/cli/commands/working/cleanup.ts +1 -18
  27. package/src/cli/companion-link-wizard.tsx +158 -91
  28. package/src/cli/usage.ts +1 -1
  29. package/src/lib/agent-credential.ts +131 -0
  30. package/src/lib/credential-kinds.ts +7 -0
  31. package/src/lib/delivery/merge-git.ts +16 -0
  32. package/src/lib/delivery/record-delivery.ts +12 -6
  33. package/src/lib/delivery/record.ts +5 -0
  34. package/src/lib/delivery/refresh.ts +34 -6
  35. package/src/lib/delivery/staging/refs.ts +9 -4
  36. package/src/lib/delivery/staging/submit.ts +81 -22
  37. package/src/lib/mcp-manager/resolve.ts +27 -9
  38. package/src/lib/mcp-manager/store.ts +35 -11
  39. package/src/lib/mcp-manager/types.ts +14 -0
  40. package/src/lib/mcp-manager/validate.ts +6 -10
  41. package/src/lib/opencode-server.ts +2 -17
  42. package/src/lib/orchestrator/repo-local-store.ts +14 -0
  43. package/src/lib/orchestrator/repository-link.ts +80 -52
  44. package/src/lib/orchestrator/root-context.ts +17 -1
  45. package/src/lib/studio-chat/agent.ts +139 -0
  46. package/src/lib/studio-chat/companion-context.ts +136 -0
  47. package/src/lib/studio-chat/credential.ts +79 -0
  48. package/src/lib/studio-chat/harness-chat-agent.ts +334 -0
  49. package/src/lib/studio-chat/host-sandbox.ts +578 -0
  50. package/src/lib/studio-chat/prepare-bridges.ts +95 -0
  51. package/src/lib/studio-chat/session.ts +15 -0
  52. package/src/lib/studio-chat/turns.ts +112 -0
  53. package/src/lib/workset/claims.ts +85 -0
  54. package/src/lib/workset/execution.ts +71 -0
  55. package/src/lib/workset/git-transaction.ts +74 -0
  56. package/src/lib/workset/groups.ts +176 -0
  57. package/src/lib/workset/inventory.ts +196 -0
  58. package/src/lib/workset/projection.ts +237 -0
  59. package/src/lib/workset/record.ts +101 -36
  60. package/src/lib/workset/repositories.ts +24 -0
  61. package/src/lib/workset/sharing.ts +951 -0
  62. package/src/lib/workset/stages.ts +50 -14
  63. package/src/lib/workset/transactions.ts +158 -0
  64. package/src/runtime/companion-git-state.ts +1 -0
  65. package/src/runtime/companion-guidance.ts +2 -2
  66. package/src/runtime/forge-remote.ts +6 -0
  67. package/src/runtime/host-process.ts +28 -0
  68. package/src/runtime/secret-guard.ts +18 -1
  69. package/src/runtime/secret-patterns.ts +4 -3
  70. package/src/runtime/submitted-arrivals.ts +28 -2
  71. package/src/runtime/write-atomic.ts +2 -2
  72. package/src/studio.ts +52 -8
  73. package/src/templates/capabilities/openspec-cap/mate-full/schema.yaml +1 -1
  74. package/src/templates/capabilities/openspec-cap/mate-full/templates/proposal.md +1 -1
  75. package/src/templates/mate-skills/agents/mate-publish-artifact/SKILL.md +3 -2
  76. package/src/templates/mate-skills/agents/mate-submit-change/SKILL.md +5 -3
  77. package/src/templates/mate-skills/claude/mate-publish-artifact/SKILL.md +3 -2
  78. package/src/templates/mate-skills/claude/mate-submit-change/SKILL.md +5 -3
  79. package/src/tools/setup/__snapshots__/runtime-surface-golden.test.ts.snap +12 -12
  80. package/src/tools/setup/capabilities/mcp-manager.ts +1 -2
  81. package/src/tools/setup/dynamic-plugins/declarations.ts +0 -26
  82. package/src/tools/setup/plugins/gitignore.ts +1 -0
  83. package/src/tools/setup/providers/claude-format.ts +1 -5
  84. package/src/tools/setup/providers/claude.ts +28 -3
  85. package/src/tools/setup/providers/opencode.ts +7 -18
  86. package/src/tools/setup/providers/relative-path-warnings.ts +26 -0
  87. package/studio-dist/THIRD-PARTY-NOTICES.md +297 -0
  88. package/studio-dist/client/THIRD-PARTY-LICENSES.md +4294 -0
  89. package/studio-dist/client/assets/DialogTitle-DOhjDa7H.js +1 -0
  90. package/studio-dist/client/assets/app-CG3vCgyA.css +2 -0
  91. package/studio-dist/client/assets/bundle-mjs-CdK3cBzO.js +1 -0
  92. package/studio-dist/client/assets/button-upSzkd-q.js +1 -0
  93. package/studio-dist/client/assets/chat-DbaMXb8H.js +157 -0
  94. package/studio-dist/client/assets/cn-BCnYnarL.js +1 -0
  95. package/studio-dist/client/assets/combobox-cP9OsRf2.js +1 -0
  96. package/studio-dist/client/assets/{companion-view-C1F0_jbt.js → companion-view-B54_Lj0S.js} +1 -1
  97. package/studio-dist/client/assets/fields-DNZ4a89M.js +1 -0
  98. package/studio-dist/client/assets/friction-DgEimeDB.js +1 -0
  99. package/studio-dist/client/assets/getting-started-BTfYCt5s.js +1 -0
  100. package/studio-dist/client/assets/{getting-started-BN4aTpsz.js → getting-started-CAszmdDJ.js} +1 -1
  101. package/studio-dist/client/assets/getting-started._topic-CHJMf0pa.js +1 -0
  102. package/studio-dist/client/assets/getting-started.index-MR6HftWs.js +1 -0
  103. package/studio-dist/client/assets/{graph-canvas-Be5qgdDt.js → graph-canvas-BdNk2F9O.js} +1 -1
  104. package/studio-dist/client/assets/graph-hRijsC89.js +2 -0
  105. package/studio-dist/client/assets/guides-CwFnh08E.js +1 -0
  106. package/studio-dist/client/assets/highlighted-body-JLMTFACH-BcroQey-.js +1 -0
  107. package/studio-dist/client/assets/index-D5oGyvG8.js +41 -0
  108. package/studio-dist/client/assets/{markdown-view-dku7MGPn.js → markdown-view-CJ8JsLb7.js} +1 -1
  109. package/studio-dist/client/assets/marked.esm-vFuq1cCd.js +65 -0
  110. package/studio-dist/client/assets/mcp-BE9M-bkO.js +4 -0
  111. package/studio-dist/client/assets/mermaid-WFAXDIZX-BjSsakrn.js +1 -0
  112. package/studio-dist/client/assets/panel-CDQ6Lryw.js +1 -0
  113. package/studio-dist/client/assets/plugins._service._view-DRVPUAWN.js +1 -0
  114. package/studio-dist/client/assets/{prepaint-BkoDSw5X.js → prepaint-sD_LlrDN.js} +1 -1
  115. package/studio-dist/client/assets/{queries-CMvC2OkU.js → queries-COL925ML.js} +1 -1
  116. package/studio-dist/client/assets/react-dom-K3Hp2Cdj.js +1 -0
  117. package/studio-dist/client/assets/{react-BYUSgtBs.js → react-h2xQ_NSp.js} +1 -1
  118. package/studio-dist/client/assets/reports-BClsojkb.js +1 -0
  119. package/studio-dist/client/assets/routes-CJQ2MAej.js +1 -0
  120. package/studio-dist/client/assets/search-DhWdEiKT.js +1 -0
  121. package/studio-dist/client/assets/select-B2FsN9FY.js +1 -0
  122. package/studio-dist/client/assets/skills-SoUHk77W.js +1 -0
  123. package/studio-dist/client/assets/{specs-Bqd1ajyD.js → specs-C_tZnAvF.js} +1 -1
  124. package/studio-dist/client/assets/specs-view-C6t3Y5IT.js +1 -0
  125. package/studio-dist/client/assets/steps-CF3-Zpmh.js +1 -0
  126. package/studio-dist/client/assets/{store-BYnEU33C.js → store-pY9gU4uS.js} +1 -1
  127. package/studio-dist/client/assets/studio-X7bnFrRe.js +36 -0
  128. package/studio-dist/client/assets/studio-queries-CKtAnIKP.js +2 -0
  129. package/studio-dist/client/assets/usage-BaaqUpTG.js +55 -0
  130. package/studio-dist/client/assets/useAnchoredPopupScrollLock-BspHR7Wt.js +1 -0
  131. package/studio-dist/client/assets/useBlocker-BQOfcu_f.js +1 -0
  132. package/studio-dist/client/assets/useMutation-DKeEoP5S.js +1 -0
  133. package/studio-dist/client/assets/useOpenInteractionType-CtaZCaFT.js +1 -0
  134. package/studio-dist/client/assets/usePopupHandleStore-Bc7Q4bnF.js +1 -0
  135. package/studio-dist/client/assets/vault-sAPFUnPN.js +1 -0
  136. package/studio-dist/client/assets/{warnings-Cnw99ugO.js → warnings-D7YY1HSG.js} +1 -1
  137. package/studio-dist/client/assets/work-BZek_LGB.js +5 -0
  138. package/studio-dist/client/assets/workflow-N5boHXFz.js +1 -0
  139. package/studio-dist/server/THIRD-PARTY-LICENSES.md +4371 -0
  140. package/studio-dist/server/assets/DialogTitle-DnKSl2V0.js +421 -0
  141. package/studio-dist/server/assets/{__23tanstack-start-server-fn-resolver-CS3QRY4Q.js → __23tanstack-start-server-fn-resolver-Bli9bpSB.js} +38 -18
  142. package/studio-dist/server/assets/_tanstack-start-manifest_v.js +91 -59
  143. package/studio-dist/server/assets/{actions-D8erOphH.js → actions-CHEFA1i9.js} +33 -1
  144. package/studio-dist/server/assets/{cn-DWFJaP_9.js → bundle-mjs-Ot6dQ8Pq.js} +1 -2056
  145. package/studio-dist/server/assets/{button-Ct_WeYLc.js → button-BqA1urbl.js} +14 -7
  146. package/studio-dist/server/assets/chat-zl332Tvu.js +49486 -0
  147. package/studio-dist/server/assets/cn-B0fl6NWK.js +2057 -0
  148. package/studio-dist/server/assets/{combobox-17vO5Uz8.js → combobox-iTjvPCtS.js} +7 -6
  149. package/studio-dist/server/assets/{companion-view-JkxnGLlp.js → companion-view-DIQ6AFIY.js} +2 -2
  150. package/studio-dist/server/assets/{companions-YNLsbnch.js → companions-aVwjRL8j.js} +1 -1
  151. package/studio-dist/server/assets/{fields-VytPpqBq.js → fields-BMap2_Ju.js} +10 -3
  152. package/studio-dist/server/assets/{friction-BW86PCPM.js → friction-BER50hoD.js} +2 -2
  153. package/studio-dist/server/assets/{friction-B6osqFSm.js → friction-BPs9KWdq.js} +8 -8
  154. package/studio-dist/server/assets/{getting-started-CFHSeX5h.js → getting-started-DGfRVmZ_.js} +2 -2
  155. package/studio-dist/server/assets/{getting-started._topic-BK2eU6AS.js → getting-started._topic-BgrBA4Vj.js} +2 -2
  156. package/studio-dist/server/assets/{getting-started.index-DZLuXnNO.js → getting-started.index-BaFfQ9Mn.js} +2 -2
  157. package/studio-dist/server/assets/{graph-BJVZBevL.js → graph-Cgzlrv3P.js} +8 -8
  158. package/studio-dist/server/assets/{graph-DGZHV-Ek.js → graph-DODpuOy_.js} +1 -1
  159. package/studio-dist/server/assets/{graph-canvas-lrNT6jbl.js → graph-canvas-DW_zU1nA.js} +2 -2
  160. package/studio-dist/server/assets/{guides-_G8Vucsk.js → guides-CA_EMG7E.js} +1 -1
  161. package/studio-dist/server/assets/{guides-CEwLOZb9.js → guides-D0SpoD32.js} +1 -1
  162. package/studio-dist/server/assets/{guides.server-ZWFKX2XJ.js → guides.server-DJjQuy03.js} +1 -1
  163. package/studio-dist/server/assets/highlighted-body-JLMTFACH-BeHllu-r.js +41 -0
  164. package/studio-dist/server/assets/{markdown-view-Bmjghg_Z.js → markdown-view-CvVBGMZV.js} +1 -1
  165. package/studio-dist/server/assets/mcp-BU0fLYyJ.js +1103 -0
  166. package/studio-dist/server/assets/mcp-manager-D9YctTQe.js +50 -0
  167. package/studio-dist/server/assets/mermaid-WFAXDIZX-B1yDN6vG.js +1 -0
  168. package/studio-dist/server/assets/{panel-DvRjyil3.js → panel-D1K6Bsux.js} +4 -32
  169. package/studio-dist/server/assets/{plugins._service._view-B32LzraG.js → plugins._service._view-DdO1nELF.js} +4 -4
  170. package/studio-dist/server/assets/{prepaint-BEHwKl51.js → prepaint-BB3dwSmz.js} +1 -1
  171. package/studio-dist/server/assets/{queries-D6Vq0AuZ.js → queries-BwiDxQy5.js} +1 -1
  172. package/studio-dist/server/assets/{react-CiBZPDs8.js → react-B2cLiz-i.js} +1 -1
  173. package/studio-dist/server/assets/{reports-Dn92pLap.js → reports-9Pr7Bz6o.js} +7 -7
  174. package/studio-dist/server/assets/{reports-DDaH5k0H.js → reports-Cc9M3phM.js} +1 -1
  175. package/studio-dist/server/assets/{router-Bjf4S9tO.js → router-DcWe0J7Y.js} +827 -548
  176. package/studio-dist/server/assets/{routes-B4sNiE0X.js → routes-BEXxl0py.js} +8 -8
  177. package/studio-dist/server/assets/{search-DKeJRvg8.js → search-bltT7gwy.js} +39 -7
  178. package/studio-dist/server/assets/{select-CVHYL7oR.js → select-CZvHgGCi.js} +7 -6
  179. package/studio-dist/server/assets/{shell-BxbYYaAk.js → shell-BQ0vMKXN.js} +13 -4
  180. package/studio-dist/server/assets/{skills-Bj8eOgzR.js → skills-Be_52h0i.js} +1 -1
  181. package/studio-dist/server/assets/{skills-B4-0qpqN.js → skills-BpGGUl6L.js} +8 -8
  182. package/studio-dist/server/assets/{specs-rfMug6qW.js → specs-CCGgXE-V.js} +5 -5
  183. package/studio-dist/server/assets/{specs-view-qi1SE1Sl.js → specs-view-DtL5JxYM.js} +12 -11
  184. package/studio-dist/server/assets/{steps-rger6HJc.js → steps-BWFSO6dM.js} +1 -1
  185. package/studio-dist/server/assets/{store-Dg9T7oWs.js → store-X7yLPp7v.js} +1 -1
  186. package/studio-dist/server/assets/{studio-queries-CeFfmIuM.js → studio-queries-ur1ygXi3.js} +117 -13
  187. package/studio-dist/server/assets/{studio-D79JzDLc.js → studio-qzH-UETC.js} +209 -180
  188. package/studio-dist/server/assets/{usage-Dw_UQFX-.js → usage-C1o0DLzS.js} +1 -1
  189. package/studio-dist/server/assets/{usage-BJgYWRCX.js → usage-DWbSPrPD.js} +10 -9
  190. package/studio-dist/server/assets/{useAnchoredPopupScrollLock-ciS_sEq3.js → useAnchoredPopupScrollLock-DLDmv6kM.js} +4 -135
  191. package/studio-dist/server/assets/useBlocker-CQtANHK8.js +111 -0
  192. package/studio-dist/server/assets/{useMutation-DnWK0PhO.js → useMutation-NjlA8oFY.js} +2 -2
  193. package/studio-dist/server/assets/useOpenInteractionType-CZYscfOb.js +136 -0
  194. package/studio-dist/server/assets/usePopupHandleStore-DEEXJYv0.js +26 -0
  195. package/studio-dist/server/assets/{vault-BzarssiL.js → vault-B_kfi1h-.js} +1 -1
  196. package/studio-dist/server/assets/{vault-CvlrLd2H.js → vault-dL79JlKH.js} +8 -115
  197. package/studio-dist/server/assets/{views-CAxwKHMK.js → views-BSGH56lb.js} +3 -3
  198. package/studio-dist/server/assets/{warnings-BpVCugHm.js → warnings-DtUVPV-k.js} +2 -2
  199. package/studio-dist/server/assets/work-D789VXGH.js +110 -0
  200. package/studio-dist/server/assets/work-DsCEfhmK.js +3817 -0
  201. package/studio-dist/server/assets/work-requests-BLhOmQFO.js +11 -0
  202. package/studio-dist/server/assets/{workflow-BdrzcCt8.js → workflow-BOZ2sRYg.js} +9 -9
  203. package/studio-dist/server/server.js +3 -3
  204. package/wrappers/bin/openspec +87 -2
  205. package/studio-dist/client/assets/app-ggXJ_QVh.css +0 -2
  206. package/studio-dist/client/assets/button-C9SQW3kI.js +0 -1
  207. package/studio-dist/client/assets/cn-DC80MJV0.js +0 -1
  208. package/studio-dist/client/assets/combobox-D7mKYCBb.js +0 -1
  209. package/studio-dist/client/assets/fields-CEep8IFT.js +0 -1
  210. package/studio-dist/client/assets/friction-D9dBU7WN.js +0 -1
  211. package/studio-dist/client/assets/getting-started-BDyGvHhc.js +0 -1
  212. package/studio-dist/client/assets/getting-started._topic-B9ajbF4o.js +0 -1
  213. package/studio-dist/client/assets/getting-started.index-CYiBPtb7.js +0 -1
  214. package/studio-dist/client/assets/graph-ah7ZXfTa.js +0 -2
  215. package/studio-dist/client/assets/guides-CsL0660B.js +0 -1
  216. package/studio-dist/client/assets/index-zmRH87D4.js +0 -40
  217. package/studio-dist/client/assets/panel-COgk0vP5.js +0 -1
  218. package/studio-dist/client/assets/plugins._service._view-Cn3WBHab.js +0 -1
  219. package/studio-dist/client/assets/reports-C_AqLBYH.js +0 -1
  220. package/studio-dist/client/assets/routes-BokQmHtC.js +0 -1
  221. package/studio-dist/client/assets/search-DxidNK2M.js +0 -1
  222. package/studio-dist/client/assets/select-CYFCbHUd.js +0 -1
  223. package/studio-dist/client/assets/skills-R3vttWHM.js +0 -1
  224. package/studio-dist/client/assets/specs-view-znqFPx9p.js +0 -1
  225. package/studio-dist/client/assets/steps-tVDWn7j6.js +0 -1
  226. package/studio-dist/client/assets/studio-ndtFcS2Y.js +0 -100
  227. package/studio-dist/client/assets/studio-queries-CkUSByy7.js +0 -2
  228. package/studio-dist/client/assets/usage-Kuhr8dSl.js +0 -55
  229. package/studio-dist/client/assets/useAnchoredPopupScrollLock-dc_kP4Go.js +0 -1
  230. package/studio-dist/client/assets/useMutation-CqtM9COw.js +0 -1
  231. package/studio-dist/client/assets/vault-CSP8kwRg.js +0 -1
  232. package/studio-dist/client/assets/workflow-BPJAmmZi.js +0 -1
@@ -1 +0,0 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-MZURdZre.js";import{$ as r,A as i,H as a,J as o,K as s,L as c,M as l,N as u,Q as d,R as f,W as p,X as m,Y as h,Z as g,j as _,k as v,q as y}from"./studio-queries-CkUSByy7.js";var b=e(t(),1),x=n(),S=b.createContext(void 0),C=e=>{let t=b.useContext(S);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},w=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,x.jsx)(S.Provider,{value:e,children:t})),T=()=>c,E=()=>T(),D=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(){}},O=new class extends D{#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`}},ee=d;function te(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ee,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 k=te(),A=new class extends D{#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 j(e){return Math.min(1e3*2**e,3e4)}function M(e){return(e??`online`)!==`online`||A.isOnline()}var N=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function P(e){let t=!1,n=0,r,i=`pending`,o,s,c=new Promise((e,t)=>{o=e,s=t});c.catch(a);let l=()=>i!==`pending`,u=t=>{if(!l()){let n=new N(t);_(n),e.onCancel?.(n)}},d=()=>{t=!0},f=()=>{t=!1},p=()=>O.isFocused()&&(e.networkMode===`always`||A.isOnline())&&e.canRun(),h=()=>M(e.networkMode)&&e.canRun(),g=e=>{l()||(r?.(),i=`resolved`,o(e))},_=e=>{l()||(r?.(),i=`rejected`,s(e))},v=t=>new Promise(n=>{r=e=>{(l()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,l()||e.onContinue?.()}),y=()=>{if(l())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(l())return;let i=e.retry??(E()?0:3),a=e.retryDelay??j,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),m(o).then(()=>l()||p()?void 0:v(p)).then(()=>{t?_(r):y()}))})};return{promise:c,status:()=>i,cancel:u,continue:()=>(r?.(),c),cancelRetry:d,continueRetry:f,canStart:h,start:()=>(h()?y():v(h).then(y),c)}}var ne=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),f(this.gcTime)&&(this.#e=r.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(E()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(r.clearTimeout(this.#e),this.#e=void 0)}};function re(e){return{onFetch:(t,n)=>{let r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],s=t.state.data?.pageParams||[],c={pages:[],pageParams:[]},d=0,f=async()=>{let n=!1,f=t,p=e=>{v(e,()=>t.signal,()=>n=!0,f[u])},m=l(t.options,t.fetchOptions),h=async(e,r,a)=>{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:a?`backward`:`forward`,meta:t.options.meta};return p(e),e})(),s=await m(o),{maxPages:c}=t.options,l=a?_:i;return{pages:l(e.pages,s,c),pageParams:l(e.pageParams,r,c)}};if(a&&o.length){let e=a===`backward`,t=e?ae:ie,n={pages:o,pageParams:s};c=await h(n,t(r,n),e)}else{let t=e??o.length;do{let e=d===0?s[0]===void 0?r.initialPageParam:s[0]:ie(r,c);if(d>0&&e==null)break;c=await h(c,e),d++}while(d<t)}return c};t.fetchFn=t.options.persister?()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):f}}}function ie(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 ae(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var F=class extends ne{#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=oe(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=oe(this.options);e.data!==void 0&&(this.setState(L(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=p(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(a).catch(a):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=>s(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===h||!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=>s(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:!g(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,{[u]:{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`?re(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 o=this.#a=P({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof N&&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}),s=(async()=>{try{let e=await o.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 N){if(e.silent){if(this.#a!==o&&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===o&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=s,o.start(),s}#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,...I(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...L(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),k.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function I(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:M(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function L(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function oe(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 R=class extends D{#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),z(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return B(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return B(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 s(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&&V(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||s(this.options.enabled,this.#t)!==s(t.enabled,this.#t)||s(this.options.staleTime,this.#t)!==s(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||s(this.options.enabled,this.#t)!==s(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(a)),t}#h(e){return!E()&&s(this.options.enabled,this.#t)!==!1&&f(e)}#g(){this.#b();let e=s(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=g(this.#r.dataUpdatedAt,e)+1;this.#u=r.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return s(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=r.setInterval(()=>{(this.options.refetchIntervalInBackground||O.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(r.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(r.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,c=e===n?this.#n:e.state,{state:l}=e,u={...l},d=!1,f;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&z(e,t),o=i&&V(e,n,t,r);(a||o)&&(u={...u,...I(l.data,e.options)}),t._optimisticResults===`isRestoring`&&(u.fetchStatus=`idle`)}let{error:m,errorUpdatedAt:h,status:g}=u;f=u.data;let _=!1;if(t.placeholderData!==void 0&&f===void 0&&g===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,_=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(g=`success`,f=p(i?.data,e,t),d=!0)}if(t.select&&f!==void 0&&!_){if(i&&f===a?.data&&t.select===this.#s)f=this.#c;else try{this.#s=t.select,f=t.select(f),f=p(i?.data,f,t),this.#c=f,this.#o=null}catch(e){this.#o=e}}else f===void 0&&(this.#o=null);this.#o&&(m=this.#o,f=this.#c,h=Date.now(),g=`error`,d=!1);let v=u.fetchStatus===`fetching`,y=g===`pending`,b=g===`error`,x=y&&v,S=f!==void 0;return{status:g,fetchStatus:u.fetchStatus,isPending:y,isSuccess:g===`success`,isError:b,isInitialLoading:x,isLoading:x,data:f,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:H(e,t),refetch:this.refetch,isEnabled:s(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})();k.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 s(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||s(t.retryOnMount,e)!==!1)}function z(e,t){return se(e,t)||e.state.data!==void 0&&B(e,t,t.refetchOnMount)}function B(e,t,n){if(s(t.enabled,e)!==!1&&s(t.staleTime,e)!==`static`){let r=s(n,e);return r===`always`||r!==!1&&H(e,t)}return!1}function V(e,t,n,r){return(e!==t||s(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&H(e,n)}function H(e,t){return s(t.enabled,e)!==!1&&e.isStaleByTime(s(t.staleTime,e))}var ce=b.createContext(!1),le=()=>b.useContext(ce);ce.Provider;function ue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var de=b.createContext(ue()),fe=()=>b.useContext(de),pe=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?o(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},me=e=>{b.useEffect(()=>{e.clearReset()},[e])},he=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||o(n,[e.error,r])),ge=(e,t)=>t.state.data===void 0,_e=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))}},ve=(e,t)=>e?.suspense&&t.isPending,ye=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function be(e,t,n){let r=le(),i=fe(),o=C(n),s=o.defaultQueryOptions(e),c=o.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=r?`isRestoring`:l?`optimistic`:void 0,_e(s),pe(s,i,c),me(i);let[u]=b.useState(()=>new t(o,s)),d=u.getOptimisticResult(s);b.useEffect(()=>{u.setOptions(s)},[s,u]);let f=!r&&l;if(b.useSyncExternalStore(b.useCallback(e=>{let t=f?u.subscribe(k.batchCalls(e)):a;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),ve(s,d))throw ye(s,u,i);if(he({result:d,errorResetBoundary:i,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw d.error;return s.notifyOnChangeProps?d:u.trackResult(d)}function xe(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=xe(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Se(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=xe(e))&&(r&&(r+=` `),r+=t);return r}var Ce=(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},we=(e,t)=>({classGroupId:e,validator:t}),Te=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ee=`-`,De=[],Oe=`arbitrary..`,ke=e=>{let t=Me(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return je(e);let n=e.split(Ee);return Ae(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Ce(i,t):t:i||De}return n[e]||De}}},Ae=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Ae(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(Ee):e.slice(t).join(Ee),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},je=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?Oe+r:void 0})(),Me=e=>{let{theme:t,classGroups:n}=e;return Ne(n,t)},Ne=(e,t)=>{let n=Te();for(let r in e){let i=e[r];Pe(i,n,r,t)}return n},Pe=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Fe(i,t,n,r)}},Fe=(e,t,n,r)=>{typeof e==`string`?Ie(e,t,n):typeof e==`function`?Le(e,t,n,r):Re(e,t,n,r)},Ie=(e,t,n)=>{let r=e===``?t:ze(t,e);r.classGroupId=n},Le=(e,t,n,r)=>{Be(e)?Pe(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(we(n,e)))},Re=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Pe(o,ze(t,a),n,r)}},ze=(e,t)=>{let n=e,r=t.split(Ee),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Te(),n.nextPart.set(t,i)),n=i}return n},Be=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Ve=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)}}},He=`!`,Ue=`:`,We=[],Ge=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Ke=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===Ue){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(He)?(c=s.slice(0,-1),l=!0):s.startsWith(He)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Ge(t,l,c,u)};if(t){let e=t+Ue,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Ge(We,!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}},Je=e=>({cache:Ve(e.cacheSize),parseClassName:Ke(e),sortModifiers:qe(e),postfixLookupClassGroupIds:Ye(e),...ke(e)}),Ye=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},Xe=/\s+/,Ze=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Xe),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?_+He:_,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},Qe=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=$e(n))&&(i&&(i+=` `),i+=r);return i},$e=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=$e(e[r]))&&(n&&(n+=` `),n+=t);return n},et=(e,...t)=>{let n,r,i,a,o=o=>(n=Je(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=Ze(e,n);return i(e,a),a};return a=o,(...e)=>a(Qe(...e))},tt=[],U=e=>{let t=t=>t[e]||tt;return t.isThemeGetter=!0,t.themeKey=e,t},nt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,rt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,it=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,at=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ot=/\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$/,st=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,ct=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,W=e=>it.test(e),G=e=>!!e&&!Number.isNaN(Number(e)),K=e=>!!e&&Number.isInteger(Number(e)),ut=e=>e.endsWith(`%`)&&G(e.slice(0,-1)),q=e=>at.test(e),dt=()=>!0,ft=e=>ot.test(e)&&!st.test(e),pt=()=>!1,mt=e=>ct.test(e),ht=e=>lt.test(e),gt=e=>!J(e)&&!X(e),_t=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)),vt=e=>Q(e,Nt,pt),J=e=>nt.test(e),Y=e=>Q(e,Pt,ft),yt=e=>Q(e,Ft,G),bt=e=>Q(e,Lt,dt),xt=e=>Q(e,It,pt),St=e=>Q(e,jt,pt),Ct=e=>Q(e,Mt,ht),wt=e=>Q(e,Rt,mt),X=e=>rt.test(e),Z=e=>$(e,Pt),Tt=e=>$(e,It),Et=e=>$(e,jt),Dt=e=>$(e,Nt),Ot=e=>$(e,Mt),kt=e=>$(e,Rt,!0),At=e=>$(e,Lt,!0),Q=(e,t,n)=>{let r=nt.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$=(e,t,n=!1)=>{let r=rt.exec(e);return r?r[1]?t(r[1]):n:!1},jt=e=>e===`position`||e===`percentage`,Mt=e=>e===`image`||e===`url`,Nt=e=>e===`length`||e===`size`||e===`bg-size`,Pt=e=>e===`length`,Ft=e=>e===`number`,It=e=>e===`family-name`,Lt=e=>e===`number`||e===`weight`,Rt=e=>e===`shadow`,zt=et(()=>{let e=U(`color`),t=U(`font`),n=U(`text`),r=U(`font-weight`),i=U(`tracking`),a=U(`leading`),o=U(`breakpoint`),s=U(`container`),c=U(`spacing`),l=U(`radius`),u=U(`shadow`),d=U(`inset-shadow`),f=U(`text-shadow`),p=U(`drop-shadow`),m=U(`blur`),h=U(`perspective`),g=U(`aspect`),_=U(`ease`),v=U(`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(),X,J],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[X,J,c],T=()=>[W,`full`,`auto`,...w()],E=()=>[K,`none`,`subgrid`,X,J],D=()=>[`auto`,{span:[`full`,K,X,J]},K,X,J],O=()=>[K,`auto`,X,J],ee=()=>[`auto`,`min`,`max`,`fr`,X,J],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],j=()=>[W,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[s,W,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],N=()=>[W,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,X,J],ne=()=>[...b(),Et,St,{position:[X,J]}],re=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ie=()=>[`auto`,`cover`,`contain`,Dt,vt,{size:[X,J]}],ae=()=>[ut,Z,Y],F=()=>[``,`none`,`full`,l,X,J],I=()=>[``,G,Z,Y],L=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],R=()=>[G,ut,Et,St],se=()=>[``,`none`,m,X,J],z=()=>[`none`,G,X,J],B=()=>[`none`,G,X,J],V=()=>[G,X,J],H=()=>[W,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[q],breakpoint:[q],color:[dt],container:[q],"drop-shadow":[q],ease:[`in`,`out`,`in-out`],font:[gt],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[q],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[q],shadow:[q],spacing:[`px`,G],text:[q],"text-shadow":[q],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,W,J,X,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,X,J]}],"container-named":[_t],columns:[{columns:[G,`auto`,J,X,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:[K,`auto`,X,J]}],basis:[{basis:[W,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[G,W,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,G,X,J]}],shrink:[{shrink:[``,G,X,J]}],order:[{order:[K,`first`,`last`,`none`,X,J]}],"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":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],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:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...M()]}],"min-inline-size":[{"min-inline":[`auto`,...M()]}],"max-inline-size":[{"max-inline":[`none`,...M()]}],"block-size":[{block:[`auto`,...N()]}],"min-block-size":[{"min-block":[`auto`,...N()]}],"max-block-size":[{"max-block":[`none`,...N()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...j()]}],"font-size":[{text:[`base`,n,Z,Y]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,At,bt]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ut,J]}],"font-family":[{font:[Tt,xt,t]}],"font-features":[{"font-features":[J]}],"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,X,J]}],"line-clamp":[{"line-clamp":[G,`none`,X,yt]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,X,J]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,X,J]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[G,`from-font`,`auto`,X,Y]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[G,`auto`,X,J]}],"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:[K,X,J]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,X,J]}],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`,X,J]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:ie()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},K,X,J],radial:[``,X,J],conic:[``,K,X,J]},Ot,Ct]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[G,X,J]}],"outline-w":[{outline:[``,G,Z,Y]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`inner`,`none`,u,kt,wt]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,kt,wt]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[G,Y]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,kt,wt]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[G,X,J]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"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":[G]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[X,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":[G]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:ie()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,X,J]}],filter:[{filter:[``,`none`,X,J]}],blur:[{blur:se()}],brightness:[{brightness:[G,X,J]}],contrast:[{contrast:[G,X,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,kt,wt]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,G,X,J]}],"hue-rotate":[{"hue-rotate":[G,X,J]}],invert:[{invert:[``,G,X,J]}],saturate:[{saturate:[G,X,J]}],sepia:[{sepia:[``,G,X,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,X,J]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[G,X,J]}],"backdrop-contrast":[{"backdrop-contrast":[G,X,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,G,X,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[G,X,J]}],"backdrop-invert":[{"backdrop-invert":[``,G,X,J]}],"backdrop-opacity":[{"backdrop-opacity":[G,X,J]}],"backdrop-saturate":[{"backdrop-saturate":[G,X,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,G,X,J]}],"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`,X,J]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[G,`initial`,X,J]}],ease:[{ease:[`linear`,`initial`,_,X,J]}],delay:[{delay:[G,X,J]}],animate:[{animate:[`none`,v,X,J]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,X,J]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:B()}],"scale-x":[{"scale-x":B()}],"scale-y":[{"scale-y":B()}],"scale-z":[{"scale-z":B()}],"scale-3d":[`scale-3d`],skew:[{skew:V()}],"skew-x":[{"skew-x":V()}],"skew-y":[{"skew-y":V()}],transform:[{transform:[X,J,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":[`translate-none`],zoom:[{zoom:[K,X,J]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"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`,X,J]}],"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":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"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`,X,J]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[G,Z,Y,yt]}],stroke:[{stroke:[`none`,...P()]}],"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 Bt(...e){return zt(Se(e))}export{R as a,P as c,O as d,D as f,ge as i,A as l,C as m,Se as n,F as o,w as p,be as r,ne as s,Bt as t,k as u};
@@ -1 +0,0 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-MZURdZre.js";import{En as r,Er as i,Fn as a,Kn as o,L as s,M as c,Qt as l,S as u,Tn as d,Un as f,Y as p,ar as m,cn as h,er as g,ir as _,nn as v,or as y,qn as b,r as x,rr as S,sr as C,vn as w,vr as T}from"./button-C9SQW3kI.js";import{t as E}from"./cn-DC80MJV0.js";import{_ as D,a as O,c as k,l as A,m as j,o as M,v as N}from"./fields-CEep8IFT.js";import{S as ee,t as P}from"./useAnchoredPopupScrollLock-dc_kP4Go.js";import{d as F,f as te,i as I,m as L,n as R,p as ne,r as re,t as ie,u as z}from"./select-CYFCbHUd.js";import{$ as B,B as V,G as ae,H,J as oe,K as U,Q as se,R as ce,U as le,V as ue,W as de,X as fe,Y as W,Z as G,at as pe,ot as me,q as he,st as K,z as ge}from"./index-zmRH87D4.js";var q=e(t(),1),_e=q.forwardRef(function(e,t){let{render:n,className:s,nativeButton:c=!0,disabled:u=!1,id:f,style:m,...h}=e,{state:v,disabled:y,setTouched:x,validationMode:w,validation:T}=j(),{labelId:E}=A(),D=B(),O=D.useState(`selectionMode`),N=D.useState(`disabled`),P=D.useState(`readOnly`),F=D.useState(`required`),I=D.useState(`positionerElement`),R=D.useState(`listElement`),re=D.useState(`popupId`),ie=D.useState(`triggerProps`),z=D.useState(`inputInsidePopup`),V=D.useState(`id`),ae=D.useState(`labelId`),H=D.useState(`open`),ce=D.useState(`selectedValue`),le=D.useState(`activeIndex`),ue=D.useState(`selectedIndex`),de=D.useState(`hasSelectedValue`),W=G(),pe=se(),me=p(),K=y||N||u,ge=U(),_e=he(D),J=q.useRef(null),Y=M(K,J);k({id:z?f:void 0});let X=z?f??V:f,ve=te(E,ae),Z;H&&z?Z=re??fe(V):H&&(Z=R?.id);let Q=q.useRef(``);function $(e){Q.current=e.pointerType}let{reference:ye}=L(W,{enabled:!H&&!P&&!N&&O===`single`,listRef:D.context.labelsRef,activeIndex:le,selectedIndex:ue,onMatch(e){let t=D.context.valuesRef.current[e];t!==void 0&&D.context.setSelectedValue(t,g(b))}}),{reference:be}=ee(W,{enabled:!N,event:`mousedown`}),{buttonRef:xe,getButtonProps:Se}=S({native:c,disabled:K}),Ce={...v,readOnly:P,open:H,disabled:K,popupSide:_e,listEmpty:ge,placeholder:O!==`none`&&!de},we=C(e=>{D.set(`triggerElement`,e)});return i(`button`,e,{ref:[t,xe,J,we],state:Ce,props:[ie,be,ye,{id:X,tabIndex:z?0:-1,role:z?`combobox`:void 0,"aria-expanded":H,"aria-haspopup":z?`dialog`:`listbox`,"aria-controls":Z,"aria-required":z&&F||void 0,"aria-readonly":z&&P||void 0,"aria-labelledby":ve,onPointerDown:$,onPointerEnter:$,onFocus(){Y(!0),K||me.start(0,D.context.forceMount)},onBlur(e){if(!d(I,e.relatedTarget)&&(x(!0),Y(!1),w===`onBlur`)){let e=O===`none`?pe:ce;T.commit(e)}},onMouseDown(e){if(K||(z||W.set(`domReferenceElement`,e.currentTarget),D.context.forceMount(),Q.current!==`touch`&&(D.context.inputRef.current?.focus(),z||e.preventDefault()),H))return;let t=_(e.currentTarget);function n(e){let t=D.state.triggerElement;if(!t)return;let n=r(e),i=D.state.positionerElement,o=D.state.listElement;d(t,n)||d(i,n)||d(o,n)||ne(e,t)||D.context.setOpen(!1,g(a,e))}z&&t.addEventListener(`mouseup`,n,{once:!0})},onKeyDown(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(l(e),D.context.setOpen(!0,g(o,e.nativeEvent)),D.context.inputRef.current?.focus())}},T.getValidationProps(K,h),Se],stateAttributesMapping:oe})});function J(e,t,n,i){if(e.baseUIHandlerPrevented)return;let a=r(e.nativeEvent),o=T(a)?a:null;(o===e.currentTarget||!i?.(o)&&!v(o))&&(e.preventDefault(),n||(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,g(f,e.nativeEvent))))}var Y=q.forwardRef(function(e,t){let{render:n,className:r,style:a,...o}=e,{state:s}=j(),c=B(),l=c.useState(`open`),u=c.useState(`disabled`),f=c.useState(`readOnly`),p=c.useState(`hasSelectedValue`),m=c.useState(`selectionMode`),h=he(c),g=u,_=U(),v=m!==`none`&&!p,y={...s,open:l,disabled:g,readOnly:f,popupSide:h,listEmpty:_,placeholder:v},b=C(e=>{c.set(`inputGroupElement`,e)});return i(`div`,e,{ref:[t,b],props:[{role:`group`,onMouseDown(e){J(e,c,g,e=>d(c.context.chipsContainerRef.current,e))}},o],state:y,stateAttributesMapping:oe})}),X=q.createContext(void 0);function ve(){let e=q.useContext(X);if(e===void 0)throw Error(m(20));return e}var Z=n(),Q=q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=B(),a=i.useState(`mounted`),o=i.useState(`forceMounted`);return a||n||o?(0,Z.jsx)(X.Provider,{value:n,children:(0,Z.jsx)(c,{ref:t,...r})}):null}),$=q.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a,side:o,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=s,style:_,...v}=e,b=B(),x=G(),S=ve(),w=b.useState(`modal`),T=b.useState(`open`),E=b.useState(`mounted`),k=b.useState(`openMethod`),A=b.useState(`positionerElement`),j=b.useState(`triggerElement`),M=b.useState(`inputElement`),N=b.useState(`inputGroupElement`),ee=b.useState(`inputInsidePopup`),F=b.useState(`transitionStatus`),te=U(),I=K({anchor:i??(ee?j:N??M),floatingRootContext:x,positionMethod:a,mounted:E,side:o,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:S,collisionAvoidance:g,lazyFlip:!0});P(T&&w,k===`touch`,A,j);let L={open:T,side:I.side,align:I.align,anchorHidden:I.anchorHidden,empty:te};y(()=>{b.set(`popupSide`,I.side)},[b,I.side]);let R=C(e=>{b.set(`positionerElement`,e)}),ne=pe(e,L,{styles:I.positionerStyles,transitionStatus:F,props:v,refs:[t,R],hidden:!E,inert:!T});return(0,Z.jsxs)(de.Provider,{value:I,children:[E&&w&&(0,Z.jsx)(O,{inert:D(!T),cutout:N??M??j}),ne]})}),ye={...h,...w},be=q.forwardRef(function(e,t){let{render:n,className:a,style:o,initialFocus:s,finalFocus:c,...l}=e,f=B(),p=ae(),m=G(),h=f.useState(`mounted`),g=f.useState(`open`),_=f.useState(`openMethod`),v=f.useState(`popupProps`),b=f.useState(`transitionStatus`),x=f.useState(`inputInsidePopup`),S=f.useState(`inputElement`),C=f.useState(`modal`),w=f.useState(`id`),T=U(),E=l.id??(x?fe(w):void 0);y(()=>(f.set(`popupId`,f.context.popupRef.current?.id||E),()=>{f.set(`popupId`,void 0)}),[f,E]),u({open:g,ref:f.context.popupRef,onComplete(){g&&f.context.onOpenChangeComplete(!0)}});let D={open:g,side:p.side,align:p.align,anchorHidden:p.anchorHidden,transitionStatus:b,empty:T},O=i(`div`,e,{state:D,ref:[t,f.context.popupRef],props:[v,{id:E,role:x?`dialog`:`presentation`,onFocus(e){let t=r(e.nativeEvent);_!==`touch`&&(d(f.state.listElement,t)||t===e.currentTarget)&&f.context.inputRef.current?.focus()}},me(b),l],stateAttributesMapping:ye}),k=s===void 0?x?e=>e===`touch`?f.context.popupRef.current:S:!1:s,A;A=c??(x?void 0:!1);let j=!x||C;return(0,Z.jsx)(N,{context:m,disabled:!h,modal:j,openInteractionType:_,initialFocus:k,returnFocus:A,getInsideElements:()=>[f.context.startDismissRef.current,f.context.endDismissRef.current],children:(0,Z.jsxs)(q.Fragment,{children:[O,j&&(0,Z.jsx)(le,{ref:f.context.endDismissRef})]})})});function xe(e){let{multiple:t=!1,defaultValue:n,value:r,onValueChange:i,autoComplete:a,...o}=e;return(0,Z.jsx)(W,{...o,selectionMode:t?`multiple`:`single`,selectedValue:r,defaultSelectedValue:n,onSelectedValueChange:i,formAutoComplete:a})}var Se=q.forwardRef(function(e,t){let{selected:n}=V();return e.keepMounted||n?(0,Z.jsx)(F,{...e,selected:n,ref:t}):null}),Ce=xe;function we({className:e,...t}){return(0,Z.jsxs)(Y,{"data-slot":`combobox-input-group`,className:E(`relative flex items-center`,e),children:[(0,Z.jsx)(H,{"data-slot":`combobox-input`,className:E(z,`placeholder:text-muted focus:border-accent`),...t}),(0,Z.jsx)(_e,{"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,Z.jsx)(x,{name:`chevron`,className:ie})})]})}function Te({className:e,...t}){return(0,Z.jsx)(Q,{children:(0,Z.jsx)($,{sideOffset:6,className:`z-40`,children:(0,Z.jsx)(be,{"data-slot":`combobox-content`,className:E(I,e),...t})})})}var Ee=ue;function De({className:e,...t}){return(0,Z.jsx)(ce,{"data-slot":`combobox-empty`,className:E(`px-2.5 py-1.5 text-sm text-muted empty:hidden`,e),...t})}function Oe({className:e,children:t,...n}){return(0,Z.jsxs)(ge,{"data-slot":`combobox-item`,className:E(R,e),...n,children:[(0,Z.jsx)(`span`,{className:`truncate`,children:t}),(0,Z.jsx)(Se,{className:re,children:(0,Z.jsx)(x,{name:`check`,className:`size-4`})})]})}export{Oe as a,we as i,Te as n,Ee as o,De as r,Ce as t};
@@ -1 +0,0 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-MZURdZre.js";import{$t as r,Ar as i,B as a,Cn as o,Dt as s,E as c,En as l,Er as u,G as d,J as f,K as p,Mr as m,Nr as h,P as ee,Pr as g,Qt as _,Sr as v,St as y,Tn as b,U as x,W as te,Xt as ne,Y as re,Zt as ie,_t as S,an as ae,ar as oe,bt as se,en as ce,er as le,fr as C,gr as w,gt as T,in as ue,ir as E,j as de,jn as fe,jr as pe,kn as me,kr as he,or as D,q as O,qn as k,sr as A,tn as ge,vt as _e,wn as ve,xr as j,xt as ye,yr as M,z as be,zn as xe}from"./button-C9SQW3kI.js";import{t as N}from"./cn-DC80MJV0.js";var P=e(t(),1),F=0;function Se(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:a}=t;cancelAnimationFrame(F);function o(){(!a||a())&&e?.focus({preventScroll:n})}if(r)return o(),i;let s=requestAnimationFrame(o);return F=s,()=>{F===s&&(cancelAnimationFrame(s),F=0)}}var I=`data-base-ui-inert`,L=new WeakMap,R=new WeakSet,z=new WeakMap,B=0;function V(e){return e?v(e)?e.host:V(e.parentNode):null}var Ce=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=V(t);return e.contains(n)?n:null}).filter(e=>e!=null),H=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},we=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{C(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function U(e,t,n,{mark:r=!0}){let i=Ce(t,e),a=r?we(t,H(i),new Set(i)):[],o=[],s=[];if(n){let e=Ce(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);we(t,H(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(L.get(e)||0)+1;L.set(e,r),o.push(e),r===1&&n&&R.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(z.get(e)||0)+1;z.set(e,t),s.push(e),t===1&&e.setAttribute(I,``)}),B+=1,()=>{o.forEach(e=>{let t=(L.get(e)||0)-1;L.set(e,t),t||(R.has(e)||e.removeAttribute(`aria-hidden`),R.delete(e))}),r&&s.forEach(e=>{let t=(z.get(e)||0)-1;z.set(e,t),t||e.removeAttribute(I)}),--B,B||(L=new WeakMap,R=new WeakSet,z=new WeakMap)}}function Te(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=E(e[0]).body;return U(e,i,n,{mark:r})}var W=n();function Ee(e,t){let n=w(l(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(ne(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var G=20,K=[];function De(){K=K.filter(e=>e.deref()?.isConnected)}function Oe(e){De(),e&&C(e)!==`body`&&(K.push(new WeakRef(e)),K.length>G&&(K=K.slice(-20)))}function ke(){return De(),K[K.length-1]?.deref()}function Ae(e){return e?ye(e)?e:y(e)[0]||e:null}function je(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 ye(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 q(e){let{context:t,children:n,disabled:i=!1,initialFocus:u=!0,returnFocus:f=!0,explicitReturnFocus:h,restoreFocus:g=!1,modal:v=!0,closeOnFocusOut:x=!0,openInteractionType:oe=``,nextFocusableElement:w,previousFocusableElement:T,beforeContentFocusGuardRef:fe,externalTree:pe,getInsideElements:he}=e,k=t.useState(`open`),j=t.useState(`domReferenceElement`),N=t.useState(`floatingElement`),{events:F,dataRef:I}=t.context,L=A(()=>I.current.floatingContext?.nodeId),R=u===!1,z=ue(j)&&R,B=d(u),V=d(f),Ce=d(h),H=d(oe),we=d(k),U=de(pe),G=ee(),K=P.useRef(!1),q=P.useRef(!1),Me=P.useRef(!1),Ne=P.useRef(null),Pe=P.useRef(``),J=P.useRef(``),Fe=P.useRef(null),Ie=P.useRef(null),Le=m(Fe,fe,G?.beforeInsideRef),Re=m(Ie,G?.afterInsideRef),ze=re(),Y=re(),Be=te(),Ve=G!=null,X=ge(N),Z=A((e=X)=>e?y(e):[]),Q=A(()=>he?.().filter(e=>e!=null)??[]);P.useEffect(()=>{if(i||!v)return;function e(e){e.key===`Tab`&&b(X,o(E(X)))&&Z().length===0&&!z&&_(e)}let t=E(X);return O(t,`keydown`,e)},[i,X,v,z,Z]),P.useEffect(()=>{if(i||!k)return;let e=E(X);function t(){Me.current=!1}function n(e){let t=l(e),n=Q(),r=b(N,t)||b(j,t)||b(G?.portalNode,t)||n.some(e=>e===t||b(e,t));Me.current=!r,J.current=e.pointerType||`keyboard`,ve(t,`[data-base-ui-click-trigger]`)&&(q.current=!0,Y.start(0,()=>{q.current=!1}))}function r(){J.current=`keyboard`}return p(O(e,`pointerdown`,n,!0),O(e,`pointerup`,t,!0),O(e,`pointercancel`,t,!0),O(e,`keydown`,r,!0),t)},[i,N,j,X,k,G,Y,Q]),P.useEffect(()=>{if(i||!x)return;let e=E(X);function n(){q.current=!0,Y.start(0,()=>{q.current=!1})}function a(e){let t=l(e);ye(t)&&(Ne.current=t)}function u(n){let i=n.relatedTarget,a=n.currentTarget,u=l(n);v&&i==null&&u!=null&&b(N,u)&&Oe(u),queueMicrotask(()=>{let l=L(),d=t.context.triggerElements,f=Q(),p=i?.hasAttribute(be(`focus-guard`))&&[Fe.current,Ie.current,G?.beforeInsideRef.current,G?.afterInsideRef.current,G?.beforeOutsideRef.current,G?.afterOutsideRef.current,c(T),c(w)].includes(i),m=!(b(j,i)||b(N,i)||b(i,N)||b(G?.portalNode,i)||f.some(e=>e===i||b(e,i))||d.hasMatchingElement(e=>b(e,i))||p||U&&(ce(U.nodesRef.current,l).find(e=>b(e.context?.elements.floating,i)||b(e.context?.elements.domReference,i))||r(U.nodesRef.current,l).find(e=>[e.context?.elements.floating,ge(e.context?.elements.floating)].includes(i)||e.context?.elements.domReference===i)));if(a===j&&X&&je(X),g&&a!==j&&!s(u)&&o(e)===e.body){if(M(X)&&(X.focus(),g===`popup`)){Be.request(()=>{X.focus()});return}let e=Z(),t=Ne.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||X;M(n)&&n.focus()}I.current.insideReactTree?I.current.insideReactTree=!1:(z||!v)&&i&&m&&!q.current&&(z||i!==ke())&&(K.current=!0,t.setOpen(!1,le(xe,n)))})}function d(){Me.current||(I.current.insideReactTree=!0,ze.start(0,()=>{I.current.insideReactTree=!1}))}let f=M(j)?j:null;if(N||f)return p(f&&O(f,`focusout`,u),f&&O(f,`pointerdown`,n),N&&O(N,`focusin`,a),N&&O(N,`focusout`,u),N&&G&&O(N,`focusout`,d,!0))},[i,j,N,X,v,U,G,t,x,g,Z,z,L,I,ze,Y,Be,w,T,Q]),P.useEffect(()=>{if(i||!N||!k)return;let e=Array.from(G?.portalNode?.querySelectorAll(`[${be(`portal`)}]`)||[]),t=(U?r(U.nodesRef.current,L()):[]).find(e=>ue(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Te([N,...e,Fe.current,Ie.current,G?.beforeOutsideRef.current,G?.afterOutsideRef.current,...Q(),t,c(T),c(w),z?j:null].filter(e=>e!=null),{ariaHidden:v||z,mark:!1}),a=Te([N,...e].filter(e=>e!=null));return()=>{a(),n()}},[k,i,j,N,v,G,z,U,L,w,T,Q]),D(()=>{if(!k||i||!M(X))return;Pe.current=``,J.current=``;let e=E(X),t=o(e);queueMicrotask(()=>{let n=B.current,r=typeof n==`function`?n(H.current||``):n;if(r===void 0||r===!1||b(X,t))return;let i=null,a=()=>(i??=Z(X),i[0]||X),s;s=r===!0||r===null?a():c(r),s||=a();let l=b(X,o(e)),u=I.current.openEvent,d=u?.type===`mousedown`&&ne(u);Se(s,{sync:d,preventScroll:s===X,shouldFocus(){if(!we.current)return!1;if(l)return!0;let t=o(e);return!(t!==s&&b(X,t))}})})},[i,k,X,Z,B,H,we,I]);let $=P.useRef(null);D(()=>{if(i||!X){$.current=null;return}$.current&&=($.current.cancelled=!0,null);let e=E(X),t=o(e),n=H.current==null;Oe(t);function r(e){if(e.open||(Pe.current=Ee(e.nativeEvent,J.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(be(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(K.current=!0),e.reason===`outside-press`){if(e.nested)K.current=!1;else if(ne(e.nativeEvent)||ie(e.nativeEvent))K.current=!1;else{let e=!1;E(X).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?K.current=!1:K.current=!0}}}F.on(`openchange`,r);function a(e){let r=V.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=j?.isConnected?j:null,o=t?.isConnected&&C(t)!==`body`?t:null,s=n?o||a:a||o;return s||=ke()||null,typeof i==`boolean`?s:c(i)||s||null}return()=>{F.off(`openchange`,r);let t=o(e),n=Q(),i=b(N,t)||n.some(e=>e===t||b(e,t))||U&&ce(U.nodesRef.current,L(),!1).some(e=>b(e.context?.elements.floating,t)),s=V.current,c=Pe.current,l=a(c),u={cancelled:!1};$.current=u,queueMicrotask(()=>{$.current===u&&($.current=null);let n=Ae(l),r=Ce.current??typeof s!=`boolean`;if(!u.cancelled&&s&&!K.current&&M(n)&&(r||n===t||t===e.body||i)){let e={preventScroll:!0};c===`keyboard`&&(e.focusVisible=!0),n.focus(e)}K.current=!1})}},[i,N,X,V,Ce,H,F,U,j,L,Q]),D(()=>{if(!me||k||!N)return;let e=o(E(N));M(e)&&ae(e)&&b(N,e)&&e.blur()},[k,N]),D(()=>{if(!i&&G)return G.setFocusManagerState({modal:v,closeOnFocusOut:x,open:k,onOpenChange:t.setOpen,domReference:j}),()=>{G.setFocusManagerState(null)}},[i,G,v,k,t,x,j]),D(()=>{if(!i&&X)return je(X),()=>{queueMicrotask(De)}},[i,X]);let He=!i&&(!v||!z)&&(Ve||v);return(0,W.jsxs)(P.Fragment,{children:[He&&(0,W.jsx)(a,{"data-type":`inside`,ref:Le,onFocus:e=>{if(v){let e=Z();Se(e[e.length-1])}else G?.portalNode&&(K.current=!1,se(e,G.portalNode)?S(j)?.focus():c(T??G.beforeOutsideRef)?.focus())}}),n,He&&(0,W.jsx)(a,{"data-type":`inside`,ref:Re,onFocus:e=>{v?Se(Z()[0]):G?.portalNode&&(x&&(K.current=!0),se(e,G.portalNode)?_e(j)?.focus():c(w??G.afterOutsideRef)?.focus())}})]})}function Me(e){return pe(19)?e:e?`true`:void 0}var Ne=`data-valid`,Pe=`data-invalid`,J={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?{[Ne]:``}:{[Pe]:``}}},Re={invalid:void 0,name:void 0,validityData:{state:J,errors:[],error:``,value:``,initialValue:null},setValidityData:i,disabled:void 0,setTouched:i,setDirty:i,setFilled:i,setFocused:i,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:Ie,registerFieldControl:i,validation:{getValidationProps:(e,t=he)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:i,getInputControl:()=>null,commit:async()=>{},change:i}},ze=P.createContext(Re);function Y(e=!0){let t=P.useContext(ze);if(t.setValidityData===i&&!e)throw Error(oe(28));return t}function Be(e,t,n,r,i=!0,a){let{registerFieldControl:o}=Y(),s=h(()=>Symbol());D(()=>{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]),D(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}var Ve=P.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:i,validationMode:`onSubmit`,submitCountRef:{current:0}});function X(){return P.useContext(Ve)}var Z=P.createContext({controlId:void 0,registerControlId:i,resetControlId:i,labelId:void 0,setLabelId:i,messageIds:[],setMessageIds:i,getDescriptionProps:e=>e});function Q(){return P.useContext(Z)}function $(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:a,resetControlId:o}=Q(),s=g(),c=h(()=>Symbol()),l=P.useRef(!1),u=P.useRef(!1),d=A(()=>{l.current&&a!==i&&(l.current=!1,a(c.current,void 0))});return D(()=>{if(!n||a===i){d();return}let e;if(t!==void 0)u.current=!0,e=t;else if(u.current)e=s;else{o();return}e===void 0?d():(l.current=!0,a(c.current,e))},[t,n,a,o,s,c,d]),D(()=>d,[d]),(n?r:void 0)??t??s}function He(e,t){let n=P.useRef(e),r=A(t);D(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function Ue(e,t,n){let{setFocused:r,focusOwnerRef:i}=Y(),a=A(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return D(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}var We=P.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,W.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 j(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=E(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=E(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=E(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=E(e),n=t.documentElement,r=t.body,i=w(n),a=0,o=0,s=!1,c=x.create();if(me&&(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`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),ee=parseFloat(c.marginTop)+parseFloat(c.marginBottom),g=parseFloat(c.marginLeft)+parseFloat(c.marginRight),_=Je(n,r);s=Ze(e),s?(n.style.scrollbarGutter=l,_.style.overflowY=`hidden`,_.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:ee||h?`calc(100dvh - ${ee+h}px)`:`100dvh`,width:g||m?`calc(100vw - ${g+m}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=O(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var et=new class{lockCount=0;restore=null;timeoutLock=f.create();timeoutUnlock=f.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=E(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=fe||!Xe(e);this.restore=a?Qe(e):$e(e)}};function tt(e=!0,t=null){D(()=>{if(e)return et.acquire(t)},[e,t])}var nt=P.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:d=!1,style:f,...p}=e,{state:m,name:h,disabled:ee,setTouched:g,setDirty:_,validityData:v,setFilled:y,validationMode:b,validation:x}=Y(),{clearErrors:te,elementRef:ne,submitCountRef:ie}=X(),S=ee||s,ae=h??a,oe={...m,disabled:S},{labelId:se}=Q(),ce=$({id:i}),C=o!==void 0,w=o==null?void 0:String(o),T=A(()=>x.inputRef.current?.value);Be(x.inputRef,ce,w,T,!S,a),D(()=>{let e=w??x.inputRef.current?.value;e!==void 0&&y(e!==``)},[w,l,x.inputRef,y]),He(w,()=>{w!==void 0&&(te(ae),_(w!==(v.initialValue??``)),x.change(w))});let ue=P.useRef(null),E=Ue(S,ue),de=re();return u(`input`,e,{ref:[t,ue],state:oe,props:[{id:ce,disabled:S,name:ae,ref:x.inputRef,"aria-labelledby":se,autoFocus:d,...C?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=le(k,e.nativeEvent);c?.(t,n),C||(_(t!==(v.initialValue??``)),y(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(te(ae),x.change(t)))},onFocus(){E(!0)},onBlur(e){if(g(!0),E(!1),b===`onBlur`){let t=e.currentTarget.value;x.commit(t),C&&queueMicrotask(()=>{let e=x.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&x.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===ne.current&&!e.defaultPrevented){let t=e.currentTarget,n=ie.current;de.start(0,()=>{ie.current===n&&x.commit(t.value)})}else x.commit(t)}}},p,e=>x.getValidationProps(S,e)],stateAttributesMapping:Le})}),rt=P.forwardRef(function(e,t){return(0,W.jsx)(nt,{ref:t,...e})}),it=P.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return u(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function at({className:e,...t}){return(0,W.jsx)(`kbd`,{"data-slot":`kbd`,className:N(`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,W.jsx)(rt,{"data-slot":`input`,className:N(ot,`h-9`,e),...t})}function ct({className:e,orientation:t=`horizontal`,...n}){return(0,W.jsx)(it,{"data-slot":`separator`,orientation:t,className:N(`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{Me 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,q as v,Se as y};
@@ -1 +0,0 @@
1
- import{_ as e,b as t,d as n,g as r,h as i,m as a,v as o,x as s,y as c}from"./index-zmRH87D4.js";import{z as l}from"./studio-queries-CkUSByy7.js";import{Lr as u,et as d,it as f,lt as p,nt as m,ot as h,r as g,rt as _,t as v,tt as y,ut as ee}from"./button-C9SQW3kI.js";import{g as b,h as te,m as ne,v as re}from"./studio-ndtFcS2Y.js";import{a as ie,n as ae,t as oe}from"./jsx-runtime-MZURdZre.js";import{a as se,c as ce,l as le,o as ue,s as de}from"./select-CYFCbHUd.js";import{t as x}from"./cn-DC80MJV0.js";import{a as fe,n as S}from"./search-DxidNK2M.js";import{t as pe}from"./fields-CEep8IFT.js";var C=`mate`;function me(e){return/^[\w:./+=-]+$/.test(e)?e:/["$`\\!%]/.test(e)?`'${e.replaceAll(`'`,`'\\''`)}'`:`"${e}"`}function he(e){return e.map(me).join(` `)}var w=ie(ae(),1),T=oe(),E={fixed:{label:`Fixed`,marker:`done`},reported:{label:`Reported`,marker:`review`},dismissed:{label:`Dismissed`,marker:`idle`}},ge={person:`by a person`,triage:`by triage`,studio:`in Studio`},D=(e,t)=>`${e} ${t}${e===1?``:`s`}`;function O({state:e}){if(!e)return null;let t=E[e.state];return e.reopened?(0,T.jsx)(p,{marker:`warn`,children:`Reopened`}):(0,T.jsx)(p,{marker:t.marker,children:t.label})}function _e({state:e,time:t}){let n=E[e.state];return(0,T.jsxs)(`p`,{className:`m-0 flex flex-wrap items-baseline gap-x-3 gap-y-1 text-xs text-muted`,children:[(0,T.jsx)(O,{state:e}),(0,T.jsxs)(`span`,{children:[e.reopened?`Fixed, then recorded again; marked `:`${n.label} `,ge[e.by],` `,t]}),e.state===`reported`&&e.eventsSince!==void 0?(0,T.jsxs)(`span`,{className:`tabular-nums`,children:[D(e.eventsSince,`event`),` since reported`]}):null,e.link?(0,T.jsx)(`a`,{href:e.link,target:`_blank`,rel:`noreferrer`,className:`text-text underline`,children:e.link}):null,e.note?(0,T.jsx)(`span`,{className:`text-text`,children:e.note}):null]})}var k={label:`Note (optional)`,key:`note`,type:`text`},A={fixed:{action:`Mark fixed`,field:k},reported:{action:`Mark reported`,field:{label:`Issue link (optional)`,key:`link`,type:`url`}},dismissed:{action:`Dismiss`,field:k}};function ve({name:e,handled:t,onMark:n}){let[r,i]=(0,w.useState)(null),[a,o]=(0,w.useState)(``),[s,c]=(0,w.useState)(!1),[l,u]=(0,w.useState)(null),d=(0,w.useId)(),f=(0,w.useRef)(null),p=(0,w.useRef)({}),m=(0,w.useRef)(null);(0,w.useEffect)(()=>{r?f.current?.focus():m.current&&p.current[m.current]?.focus(),m.current=null},[r]);let h=()=>{i(null),o(``),u(null)},g=()=>{s||(m.current=r,h())};async function _(e,t={}){c(!0),u(null);let r=await n(e,t);c(!1),r?u(r):h()}return(0,T.jsxs)(`div`,{className:`grid gap-1.5`,children:[r?(0,T.jsxs)(`form`,{"aria-label":`${A[r].action}: ${e}`,className:`flex flex-wrap items-end gap-2`,onSubmit:e=>{e.preventDefault(),_(r,{[A[r].field.key]:a})},onKeyDown:e=>{e.key===`Escape`&&g()},children:[(0,T.jsxs)(`label`,{htmlFor:d,className:`grid gap-1 text-xs text-muted`,children:[A[r].field.label,(0,T.jsx)(pe,{id:d,ref:f,type:A[r].field.type,value:a,onChange:e=>o(e.target.value),className:`h-8 w-72 max-w-full`})]}),(0,T.jsx)(v,{size:`sm`,variant:`primary`,type:`submit`,disabled:s,children:A[r].action}),(0,T.jsx)(v,{size:`sm`,onClick:g,disabled:s,children:`Cancel`})]}):(0,T.jsxs)(`div`,{role:`group`,"aria-label":`Mark ${e}`,className:`flex flex-wrap gap-2`,children:[te.map(e=>(0,T.jsx)(v,{ref:t=>{p.current[e]=t},size:`sm`,disabled:s,onClick:()=>i(e),children:A[e].action},e)),t?(0,T.jsx)(v,{size:`sm`,disabled:s,onClick:()=>void _(`open`),children:`Reopen`}):null]}),l?(0,T.jsx)(`p`,{className:`m-0 max-w-[70ch] text-xs text-bad`,role:`alert`,children:l}):null]})}var j={state:`open`,sort:`repeats`};function ye(e){return{state:e.frictionState??j.state,type:e.frictionType,kind:e.frictionKind,sort:e.frictionSort??j.sort}}function be(e){return{frictionState:e.state===j.state?void 0:e.state,frictionType:e.type,frictionKind:e.kind,frictionSort:e.sort===j.sort?void 0:e.sort}}function M(e,t){let n=ne(e,t);return t.sort===`recent`?{...n,groups:n.groups.toSorted((e,t)=>e.lastSeen<t.lastSeen?1:e.lastSeen>t.lastSeen?-1:0)}:n}var N=fe.map(e=>({value:String(e),label:`${e} days`})),xe=[{value:`open`,label:`Open`},{value:`handled`,label:`Handled`},{value:`all`,label:`All`}],P=`any`,Se=[{value:P,label:`All kinds`},...b.map(e=>({value:e,label:e}))],Ce=[{value:`repeats`,label:`Most repeated in one session`},{value:`recent`,label:`Most recent`}],F={id:`friction-recorded`,title:`Recorded friction`},I={id:`friction-agent-reports`,title:`Agent reports`},we=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function L({at:e}){let t=a();return(0,T.jsx)(`time`,{dateTime:e,children:t?we.format(Date.parse(e)):``})}var R=`m-0 grid grid-cols-[max-content_minmax(0,1fr)] items-baseline gap-x-3 gap-y-1 @md:grid-cols-[6rem_minmax(0,1fr)]`;function z({label:e,children:t}){return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`dt`,{className:`text-muted`,children:e}),(0,T.jsx)(`dd`,{className:`m-0 min-w-0`,children:t})]})}function B({label:e,counts:t}){let n=Object.entries(t);return n.length===0?null:(0,T.jsx)(z,{label:e,children:(0,T.jsx)(`span`,{className:`flex flex-wrap gap-x-3 gap-y-1`,children:n.map(([e,t])=>(0,T.jsxs)(`span`,{className:`font-mono tabular-nums`,children:[e,` `,(0,T.jsxs)(`span`,{className:`text-muted`,children:[`×`,t]})]},e))})})}function V({name:e,target:t,item:n,onMark:r}){return(0,T.jsxs)(`div`,{className:`mt-1 grid gap-1.5`,children:[n.state?(0,T.jsx)(_e,{state:n.state,time:(0,T.jsx)(L,{at:n.state.at})}):null,(0,T.jsx)(ve,{name:e,handled:!n.open,onMark:r}),(0,T.jsxs)(`div`,{role:`group`,"aria-label":`Triage ${e}`,className:`flex flex-wrap items-center gap-x-3 gap-y-2 text-xs`,children:[(0,T.jsx)(`p`,{className:`m-0 text-muted`,children:`To investigate this item, run in your own terminal, in a repository of its companion:`}),(0,T.jsx)(`div`,{className:`w-full max-w-xl min-w-0`,children:(0,T.jsx)(d,{text:he([C,`triage`,t]),label:`command`})})]})]})}function H({fields:e}){let t=e.filter(([,e])=>e);return t.length===0?null:(0,T.jsx)(`dl`,{className:x(R,`max-w-[70ch] text-sm`),children:t.map(([e,t])=>(0,T.jsx)(z,{label:e,children:t},e))})}function U({focusKey:e,line:t,summary:n,children:r}){return(0,T.jsx)(`li`,{className:`border-t border-rule-soft first:border-t-0`,"data-friction-item":e,children:(0,T.jsxs)(`details`,{className:`group/friction`,children:[(0,T.jsxs)(`summary`,{className:`grid cursor-pointer list-none grid-cols-[auto_minmax(0,1fr)] gap-x-2 px-4 py-2.5 hover:bg-surface focus-visible:-outline-offset-2 [&::-webkit-details-marker]:hidden`,children:[(0,T.jsx)(g,{name:`right`,className:`mt-1 size-3.5 text-muted transition-transform group-open/friction:rotate-90 motion-reduce:transition-none`}),(0,T.jsx)(`div`,{className:x(`flex min-w-0 flex-wrap items-baseline gap-x-4 gap-y-1`,t),children:n})]}),(0,T.jsx)(`div`,{className:`mr-4 mb-3 ml-9.5 grid gap-1.5 border-l border-rule-soft pl-3`,children:r})]})})}var W=`flex flex-wrap items-baseline gap-x-3 gap-y-0.5 font-mono text-xs whitespace-nowrap text-muted tabular-nums`,Te=`minmax(32ch,max-content)`,G=`minmax(22ch,max-content)`,K=`11ch`;function q({wide:e}){return(0,T.jsx)(`span`,{"aria-hidden":`true`,className:x(`hidden`,e)})}function J(e){return[`at most ${e.maxPerSession} in one session`,D(e.events,`event`),D(e.sessions,`session`),e.reports.length>0?D(e.reports.length,`report`):null]}function Ee(e,t){let n=e.map(J),r=e=>Math.max(...n.map(t=>t[e]?.length??0),0),i=[0,1,2].map(e=>`${r(e)}ch`);return t.reports&&i.push(`${r(3)}ch`),i.push(Te),t.state&&i.push(K),i.join(` `)}function De(e){return e?`${G} ${K}`:G}var Y=e=>({"--friction-facts":e});function X({state:e,column:t,wide:n}){return e?(0,T.jsx)(`span`,{className:`font-sans`,children:(0,T.jsx)(O,{state:e})}):t?(0,T.jsx)(q,{wide:n}):null}function Oe({group:e,columns:t,onMark:n}){let[r,i,a,o]=J(e);return(0,T.jsxs)(U,{focusKey:e.fingerprint,line:`@5xl:grid @5xl:grid-cols-[minmax(0,1fr)_auto]`,summary:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`h3`,{className:`m-0 min-w-0 flex-[1_1_16rem] text-base font-semibold`,children:e.title}),(0,T.jsxs)(`span`,{className:x(W,`@3xl:grid @3xl:grid-cols-(--friction-facts)`),children:[(0,T.jsx)(`span`,{children:r}),(0,T.jsx)(`span`,{children:i}),(0,T.jsx)(`span`,{children:a}),o?(0,T.jsx)(`span`,{children:o}):t.reports?(0,T.jsx)(q,{wide:`@3xl:block`}):null,(0,T.jsxs)(`span`,{children:[`last seen `,(0,T.jsx)(L,{at:e.lastSeen})]}),(0,T.jsx)(X,{state:e.state,column:t.state,wide:`@3xl:block`})]})]}),children:[(0,T.jsxs)(`dl`,{className:x(R,`text-xs`),children:[(0,T.jsx)(z,{label:`Fingerprint`,children:(0,T.jsx)(`code`,{className:`font-mono`,children:e.fingerprint})}),(0,T.jsx)(z,{label:`First seen`,children:(0,T.jsx)(L,{at:e.firstSeen})}),(0,T.jsx)(z,{label:`Last seen`,children:(0,T.jsx)(L,{at:e.lastSeen})}),(0,T.jsx)(B,{label:`Mate`,counts:e.versions}),(0,T.jsx)(B,{label:`Paths`,counts:e.paths}),(0,T.jsx)(B,{label:`Flags`,counts:e.flags})]}),e.reports.length>0?(0,T.jsxs)(`section`,{"aria-label":`Reports on ${e.title}`,className:`mt-1`,children:[(0,T.jsx)(`h4`,{className:`m-0 text-xs font-semibold text-muted`,children:D(e.reports.length,`report`)}),(0,T.jsx)(`ul`,{className:`m-0 list-none p-0`,children:e.reports.map(e=>(0,T.jsxs)(`li`,{className:`grid gap-1 border-t border-rule-soft py-2 first:border-t-0`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2 text-xs text-muted`,children:[(0,T.jsx)(`span`,{className:`font-semibold text-text`,children:e.kind}),e.cost?(0,T.jsx)(`span`,{children:e.cost}):null,(0,T.jsx)(L,{at:e.at})]}),(0,T.jsx)(H,{fields:[[`Expected`,e.expected],[`Evidence`,e.evidence],[`Workaround`,e.workaround]]})]},e.id))})]}):null,(0,T.jsx)(V,{name:e.title,target:e.fingerprint,item:e,onMark:n})]})}function Z({report:e,stateColumn:t,onMark:n}){return(0,T.jsxs)(U,{focusKey:e.id,line:`@3xl:grid @3xl:grid-cols-[minmax(0,1fr)_auto]`,summary:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1`,children:[(0,T.jsx)(`h3`,{className:`m-0 min-w-0 font-mono text-sm leading-[1.375rem] font-semibold`,children:e.subject}),(0,T.jsx)(`span`,{className:`rounded-full border border-rule bg-page px-2 font-mono text-[0.7rem] text-text`,children:e.kind})]}),(0,T.jsxs)(`span`,{className:x(W,`@3xl:grid @3xl:grid-cols-(--friction-facts)`),children:[(0,T.jsx)(L,{at:e.at}),(0,T.jsx)(X,{state:e.state,column:t,wide:`@3xl:block`})]})]}),children:[(0,T.jsx)(H,{fields:[[`Expected`,e.expected],[`Cost`,e.cost],[`Evidence`,e.evidence],[`Workaround`,e.workaround]]}),(0,T.jsx)(V,{name:e.subject,target:e.id,item:e,onMark:n})]})}function Q({hidden:e,onShowAll:t}){return(0,T.jsxs)(T.Fragment,{children:[e===1?`1 item is`:`${e} items are`,` hidden by the filters.`,(0,T.jsx)(v,{size:`sm`,onClick:t,"data-show-all":!0,"aria-label":`Show all, including ${D(e,`hidden item`)}`,children:`Show all`})]})}function ke({view:e,shown:t,empty:n,onShowAll:r}){let i=[[F,t.groups.length],[I,t.freeReports.length]];return(0,T.jsxs)(`section`,{"aria-label":`Overview`,className:`grid gap-2 text-sm`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-5 gap-y-1`,children:[(0,T.jsxs)(`p`,{className:`m-0`,children:[D(e.events,`event`),` in `,D(e.sessions,`session`),` in the last`,` `,e.days,` days for the selected companion.`]}),(0,T.jsx)(`nav`,{"aria-label":`Friction sections`,className:`flex flex-wrap gap-x-4 gap-y-1`,children:i.map(([{id:e,title:t},n])=>n>0?(0,T.jsxs)(`a`,{href:`#${e}`,className:`inline-flex items-center gap-1.5 rounded-control underline`,children:[t,(0,T.jsx)(y,{value:n})]},e):null)})]}),!n&&t.hidden>0?(0,T.jsx)(`p`,{className:`m-0 flex flex-wrap items-center gap-2 text-muted`,children:(0,T.jsx)(Q,{hidden:t.hidden,onShowAll:r})}):null,(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,T.jsx)(`p`,{className:`m-0 text-muted`,children:`To investigate, run this in your own terminal, inside the affected repository:`}),(0,T.jsx)(`div`,{className:`w-48 max-w-full`,children:(0,T.jsx)(d,{text:`${C} triage`,label:`command`})})]})]})}function Ae({recording:e,toggle:n,button:r}){return(0,T.jsxs)(`div`,{className:`grid gap-1`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,T.jsx)(t,{recording:e}),(0,T.jsx)(o,{ref:r,recording:e,toggle:n})]}),(0,T.jsx)(c,{}),n.error?(0,T.jsx)(`p`,{className:`m-0 text-sm text-bad`,role:`alert`,children:n.error}):null]})}function $({label:e,options:t,value:n,onChange:r,note:i,disabled:a}){let o=(0,w.useId)();return(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`label`,{htmlFor:o,className:`text-xs text-muted`,children:e}),(0,T.jsxs)(se,{items:t,value:n,disabled:a,onValueChange:e=>{e!==null&&r(e)},children:[(0,T.jsx)(ce,{id:o,"aria-describedby":i?`${o}-note`:void 0,className:`h-7 w-auto`,children:(0,T.jsx)(le,{})}),(0,T.jsx)(ue,{children:t.map(e=>(0,T.jsx)(de,{value:e.value,children:e.label},e.value))})]}),i?(0,T.jsx)(`span`,{id:`${o}-note`,className:`text-xs text-muted`,children:i}):null]})}function je({view:e,shown:t,filters:n,onFilters:r}){let i=[{value:P,label:`All types`},...t.types.map(e=>({value:e,label:e}))],a=M(e,{...n,kind:void 0}).freeReports.length===0;return(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-5 gap-y-2`,children:[(0,T.jsx)($,{label:`Type`,options:i,value:t.type??P,onChange:e=>r({...n,type:S(re,e)})}),(0,T.jsx)($,{label:`Kind`,options:Se,value:n.kind??P,onChange:e=>r({...n,kind:S(b,e)}),note:`Agent reports only`,disabled:a&&n.kind===void 0}),(0,T.jsx)($,{label:`Sort`,options:Ce,value:n.sort,onChange:e=>r({...n,sort:e})})]})}function Me({shown:e,empty:t,markItem:n,onShowAll:r}){if(t)return(0,T.jsxs)(m,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[`No item matches the filters. `,(0,T.jsx)(Q,{hidden:e.hidden,onShowAll:r})]});let i={reports:e.groups.some(e=>e.reports.length>0),state:e.groups.some(e=>e.state!==null)},a=e.freeReports.some(e=>e.state!==null);return(0,T.jsxs)(`div`,{className:`grid gap-4`,children:[e.groups.length>0?(0,T.jsx)(_,{...F,count:e.groups.length,className:`wrap-anywhere`,children:(0,T.jsx)(`ul`,{className:`@container m-0 list-none p-0`,style:Y(Ee(e.groups,i)),children:e.groups.map(e=>(0,T.jsx)(Oe,{group:e,columns:i,onMark:n(e.fingerprint,e.title)},e.fingerprint))})}):null,e.freeReports.length>0?(0,T.jsx)(_,{...I,count:e.freeReports.length,hint:`These reports are not attached to a recorded event.`,className:`wrap-anywhere`,children:(0,T.jsx)(`ul`,{className:`@container m-0 list-none p-0`,style:Y(De(a)),children:e.freeReports.map(e=>(0,T.jsx)(Z,{report:e,stateColumn:a,onMark:n(e.id,e.subject)},e.id))})}):null]})}function Ne({view:e,days:t,onDays:n,toggle:r,filters:i,onFilters:a,mark:o,recordingButton:s}){let c=e.events>0||e.freeReports.length>0,l=M(e,i),[u,d]=(0,w.useState)(null),p=(0,w.useRef)(null);(0,w.useEffect)(()=>{if(!u)return;let e=e=>e===null?null:p.current?.querySelector(`[data-friction-item="${CSS.escape(e)}"] summary`);(e(u.key)??e(u.next)??p.current?.querySelector(`[data-show-all]`))?.focus()},[u]);let g=(e,t)=>async(n,r)=>{let i=[...l.groups.map(e=>e.fingerprint),...l.freeReports.map(e=>e.id)],a=i.indexOf(e),s=i[a+1]??i[a-1]??null,c;try{c=await o({target:e,state:n,...r})}catch(e){return`The mark could not be saved: ${e instanceof Error?e.message:String(e)}`}return c.ok?(d(r=>({announcementKey:(r?.announcementKey??0)+1,key:e,next:s,message:`${t}: ${n===`open`?`reopened`:`marked ${n}`}.`})),null):c.reason},_=()=>{[...p.current?.querySelectorAll(`[aria-label="State"] button`)??[]].find(e=>e.textContent===`All`)?.focus(),a({state:`all`,sort:i.sort})},v=l.groups.length===0&&l.freeReports.length===0;return(0,T.jsxs)(`div`,{ref:p,className:x(f,`grid min-w-0 gap-4 pt-3 pb-6`),children:[(0,T.jsx)(Ae,{recording:e.recording,toggle:r,button:s}),(0,T.jsxs)(`div`,{className:`grid gap-2`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-5 gap-y-2`,children:[(0,T.jsx)(h,{label:`Period`,options:N,value:String(t),onChange:e=>n(Number(e))}),c?(0,T.jsx)(h,{label:`State`,options:xe,value:i.state,onChange:e=>a({...i,state:e})}):null]}),c?(0,T.jsx)(je,{view:e,shown:l,filters:i,onFilters:a}):null]}),(0,T.jsx)(`div`,{"aria-live":`polite`,className:`sr-only`,children:u?(0,T.jsx)(`p`,{children:u.message},u.announcementKey):null}),c?(0,T.jsxs)(T.Fragment,{children:[e.recording?null:(0,T.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Recording is off: nothing new is recorded. The records below were made while it was on.`}),(0,T.jsx)(ke,{view:e,shown:l,empty:v,onShowAll:_}),(0,T.jsx)(Me,{shown:l,empty:v,markItem:g,onShowAll:_})]}):(0,T.jsx)(m,{children:e.recording?`No friction was recorded in the last ${e.days} days.`:`Friction recording shows where Mate gets in an agent's way: its refusals and the ${C} commands that fail in agent sessions on this machine. Recording is off; turn it on to start.`})]})}function Pe({companion:t,days:n,onDays:o,filters:c,onFilters:d}){let p=u({...i(t,n),enabled:a(),placeholderData:l}),m=e(),h=r(),{button:g,retried:_}=s(p.isSuccess);if(!p.data&&!p.isError)return(0,T.jsx)(ee,{title:`Reading the Friction Log…`});let y=p.isError?(0,T.jsxs)(`div`,{className:x(f,`pt-3 text-sm`),role:`alert`,children:[(0,T.jsx)(`p`,{className:`m-0 text-bad`,children:`The Friction Log could not be read.`}),(0,T.jsx)(v,{className:`mt-3`,onClick:()=>{_(),p.refetch()},disabled:p.isFetching,children:`Retry`})]}):null;return p.data?(0,T.jsxs)(T.Fragment,{children:[y,(0,T.jsx)(Ne,{view:p.data,days:n,onDays:o,toggle:m,filters:c,onFilters:d,mark:h,recordingButton:g})]}):y}var Fe=function(){let e=n.useSearch(),t=n.useNavigate();return e.companion?(0,T.jsx)(Pe,{companion:e.companion,days:e.frictionDays??30,onDays:e=>void t({search:t=>({...t,frictionDays:e})}),filters:ye(e),onFilters:e=>void t({search:t=>({...t,...be(e)})})},e.companion):null};export{Fe as component};
@@ -1 +0,0 @@
1
- import{ut as e}from"./index-zmRH87D4.js";var t=e;export{t as component};
@@ -1 +0,0 @@
1
- import{t as e}from"./getting-started-BN4aTpsz.js";import{n as t}from"./index-zmRH87D4.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};
@@ -1 +0,0 @@
1
- import{t as e}from"./getting-started-BN4aTpsz.js";import{r as t}from"./index-zmRH87D4.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};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graph-canvas-Be5qgdDt.js","assets/studio-ndtFcS2Y.js","assets/jsx-runtime-MZURdZre.js"])))=>i.map(i=>d[i]);
2
- import{Lr as e,it as t,nt as n,r}from"./button-C9SQW3kI.js";import"./studio-ndtFcS2Y.js";import{a as i,i as a,n as o,t as s}from"./jsx-runtime-MZURdZre.js";import{t as c}from"./cn-DC80MJV0.js";import{it as l,o as u}from"./studio-queries-CkUSByy7.js";import{n as d,r as f,t as p}from"./panel-COgk0vP5.js";import{a as m,i as h,o as g,s as _,t as v}from"./specs-view-znqFPx9p.js";import{t as y}from"./preload-helper-BLdHbfdN.js";import{u as b}from"./index-zmRH87D4.js";var x=i(o(),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=s(),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)(l,{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:t}){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:c(`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:()=>t(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-Be5qgdDt.js`),__vite__mapDeps([0,1,2]))),ie={binds:`Areas`,in:`Repositories`,mentions:`Mentions`,"co-change":`Changed together`};function ae({search:r,node:i,onNodeChange:a}){let o=e({...u(r.companion??``),enabled:!!r.companion});return o.data?(0,R.jsx)(oe,{wire:o.data,search:r,node:i,onNodeChange:a}):o.isError?(0,R.jsx)(`section`,{className:c(t,`pb-10`),children:(0,R.jsxs)(n,{children:[`The spec graph could not be built: `,o.error.message]})}):(0,R.jsx)(`section`,{className:c(t,`pb-10`),children:(0,R.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Building the spec graph…`})})}function oe({wire:e,search:r,node:i,onNodeChange:a}){let o=(0,x.useMemo)(()=>ee(e),[e]),[s,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,_=i!==void 0&&o.byId.has(i)?i:null,v=p===null?_?{node:_}:null:{edge:p},y=e=>{d(null),a(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:c(t,`pb-10`),children:(0,R.jsx)(n,{children:`No specs in this companion.`})});let S=I(v);return(0,R.jsxs)(`section`,{className:c(t,`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:s,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:r.companion??``,filter:s,selected:_,focus:m,onSelectNode:y,onSelectEdge:t=>{a(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,o,v):`Graph`,children:v?(0,R.jsx)(ne,{selection:v,wire:e,index:o,search:r,onSelectNode:b}):null})]})}function se({wire:e,filter:t,onFilter:n,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 r=new Set(t.hidden);r.has(e)?r.delete(e):r.add(e),n({...t,hidden:r})};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)(r,{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=>n({...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=a({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};
@@ -1 +0,0 @@
1
- import{et as e,ut as t}from"./studio-queries-CkUSByy7.js";var n=e({method:`GET`}).handler(t(`b2e22d82aeef8a3802144ae67d3a53a4fff5860a1a0b957618e8dcc7c0ef36c8`));export{n as t};