sanoma 0.11.21 → 0.11.22

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 (417) hide show
  1. package/README.md +2 -0
  2. package/app/README.md +2 -2
  3. package/app/dist/api.d.ts +16 -2
  4. package/app/dist/api.js +1 -1
  5. package/app/dist/client/assets/ArrowDown.es-BOfBLlTP.js +1 -0
  6. package/app/dist/client/assets/CaretDown.es-D12mWb2j.js +1 -0
  7. package/app/dist/client/assets/CatchBoundary-Cb__yx-s.js +1 -0
  8. package/app/dist/client/assets/Copy.es-CvUujKw7.js +1 -0
  9. package/app/dist/client/assets/DialogTitle-Dz3loDe5.js +1 -0
  10. package/app/dist/client/assets/FloppyDisk.es-CDyDob8p.js +1 -0
  11. package/app/dist/client/assets/Globe.es-C1pgZCGM.js +1 -0
  12. package/app/dist/client/assets/MagnifyingGlass.es-CZ3i6pz0.js +1 -0
  13. package/app/dist/client/assets/Play.es-DGJ1CGhp.js +1 -0
  14. package/app/dist/client/assets/Plug.es-BPhGL8MK.js +1 -0
  15. package/app/dist/client/assets/Plus.es-i3Vaa2WW.js +1 -0
  16. package/app/dist/client/assets/Separator-Cu9cQDBN.js +1 -0
  17. package/app/dist/client/assets/X.es-B7rq0E_-.js +1 -0
  18. package/app/dist/client/assets/_id-C4bMZ73g.js +1 -0
  19. package/app/dist/client/assets/_id-CUaJYD_3.js +1 -0
  20. package/app/dist/client/assets/_id-DRetx-BJ.js +1 -0
  21. package/app/dist/client/assets/_id-mm7bTIIl.js +2 -0
  22. package/app/dist/client/assets/_id-tN6nFEpD.js +1 -0
  23. package/app/dist/client/assets/_name-BOi2qVWk.js +1 -0
  24. package/app/dist/client/assets/_name-CBI1waPs.js +4 -0
  25. package/app/dist/client/assets/_name-CrsiaFT6.js +1 -0
  26. package/app/dist/client/assets/_name-TzQfjXo8.js +1 -0
  27. package/app/dist/client/assets/_vendor-C3TGvx4w.js +1 -0
  28. package/app/dist/client/assets/_vendor-sHwAlFSF.js +1 -0
  29. package/app/dist/client/assets/app-chrome-_ahvxx73.js +5 -0
  30. package/app/dist/client/assets/app-scope-Bht7PIkQ.js +1 -0
  31. package/app/dist/client/assets/approval-BFFM_yEl.js +1 -0
  32. package/app/dist/client/assets/apps-CpdXjc1j.js +1 -0
  33. package/app/dist/client/assets/button-D5kdANef.js +1 -0
  34. package/app/dist/client/assets/change-glance-CdkbSGxZ.js +1 -0
  35. package/app/dist/client/assets/changes-C_K2tazO.js +1 -0
  36. package/app/dist/client/assets/changes-DFcdyDL_.js +1 -0
  37. package/app/dist/client/assets/chat-Djbdaxw8.js +14 -0
  38. package/app/dist/client/assets/chat-button-DNusaP5n.js +1 -0
  39. package/app/dist/client/assets/chat-prompt-z0XJPDtH.js +1 -0
  40. package/app/dist/client/assets/{code-BVYaiQEr.js → code-CT4-YDKq.js} +2 -2
  41. package/app/dist/client/assets/common-DHOhx6Zn.js +3 -0
  42. package/app/dist/client/assets/composite-9cNA7N0P.js +1 -0
  43. package/app/dist/client/assets/connect-DHUdrwwW.js +1 -0
  44. package/app/dist/client/assets/connections-fGNKJl3J.js +5 -0
  45. package/app/dist/client/assets/connectors-CuS1paNm.js +1 -0
  46. package/app/dist/client/assets/credentials-Cb7Lnfxk.js +1 -0
  47. package/app/dist/client/assets/css-BGIxQoYs.js +1 -0
  48. package/app/dist/client/assets/css-DgaLhXQH.js +1 -0
  49. package/app/dist/client/assets/data-DZ-ufRXn.js +1 -0
  50. package/app/dist/client/assets/decidable-OFQBEcco.js +1 -0
  51. package/app/dist/client/assets/declaration-form-D2ZMEVC6.js +1 -0
  52. package/app/dist/client/assets/dialog-B5pmfCdJ.js +1 -0
  53. package/app/dist/client/assets/diff-woXpYk--.js +1 -0
  54. package/app/dist/client/assets/engine-CBuzy-Ik.js +1 -0
  55. package/app/dist/client/assets/existing-BaPrTDs8.js +1 -0
  56. package/app/dist/client/assets/fence-CMhOJv7H.js +157 -0
  57. package/app/dist/client/assets/github-dark-C-LZuMrd.js +1 -0
  58. package/app/dist/client/assets/github-light-EUqPIrTm.js +1 -0
  59. package/app/dist/client/assets/graph-B5TYhcqD.js +7 -0
  60. package/app/dist/client/assets/grid-diff-wo26YSgM.js +1 -0
  61. package/app/dist/client/assets/held-card-HrJ6QpRY.js +1 -0
  62. package/app/dist/client/assets/highlighted-body-JLMTFACH-CjeaSnZq.js +1 -0
  63. package/app/dist/client/assets/hosting-Beoi95m6.js +1 -0
  64. package/app/dist/client/assets/html-BHZv6uqE.js +1 -0
  65. package/app/dist/client/assets/import-8WDFPfe6.js +1 -0
  66. package/app/dist/client/assets/inbox-B9hsZPsC.js +1 -0
  67. package/app/dist/client/assets/inbox-DM2npRZI.js +1 -0
  68. package/app/dist/client/assets/index-CHKfukjt.js +10 -0
  69. package/app/dist/client/assets/item-B4QRpXse.js +1 -0
  70. package/app/dist/client/assets/javascript-BzbQS41l.js +1 -0
  71. package/app/dist/client/assets/javascript-CpIGwZ_Y.js +1 -0
  72. package/app/dist/client/assets/json-qhed-kSA.js +1 -0
  73. package/app/dist/client/assets/jsx-Bz0zcwM4.js +1 -0
  74. package/app/dist/client/assets/kit-n8CE0xEs.js +1 -0
  75. package/app/dist/client/assets/lazyRouteComponent-DezoGNoN.js +1 -0
  76. package/app/dist/client/assets/markdown-BYOwaDjH.js +1 -0
  77. package/app/dist/client/assets/markdown-DS_nKu0s.js +164 -0
  78. package/app/dist/client/assets/mermaid-WFAXDIZX-DQBKIf0O.js +1 -0
  79. package/app/dist/client/assets/motion-D6e1hqz4.js +1 -0
  80. package/app/dist/client/assets/people-BiiQfYJ8.js +1 -0
  81. package/app/dist/client/assets/permissions-BmKxEfBi.js +2 -0
  82. package/app/dist/client/assets/permissions-grid-B755bq5J.js +1 -0
  83. package/app/dist/client/assets/preload-helper-BLdHbfdN.js +1 -0
  84. package/app/dist/client/assets/python-gzcpVVnB.js +1 -0
  85. package/app/dist/client/assets/queries-DGlVu9wp.js +57 -0
  86. package/app/dist/client/assets/react-dom-D6fTz1bt.js +1 -0
  87. package/app/dist/client/assets/route-BSe5L2p4.js +1 -0
  88. package/app/dist/client/assets/route-Ds87ixtB.js +1 -0
  89. package/app/dist/client/assets/runs-table-DMiD4HeY.js +1 -0
  90. package/app/dist/client/assets/scenario-DrgmfuFx.js +1 -0
  91. package/app/dist/client/assets/scenario-graph-Blv2e1PV.js +1 -0
  92. package/app/dist/client/assets/separator-Bdtc7rou.js +1 -0
  93. package/app/dist/client/assets/{sheet-BYL9XU5s.js → sheet-BKUFUA1l.js} +1 -1
  94. package/app/dist/client/assets/shellscript-CLZ0U2zV.js +1 -0
  95. package/app/dist/client/assets/site-icon-1Mcc1UIb.js +1 -0
  96. package/app/dist/client/assets/sites.index-K4mrFsLr.js +1 -0
  97. package/app/dist/client/assets/spinner-XaRXIj9W.js +1 -0
  98. package/app/dist/client/assets/sql-CEbI0hMM.js +1 -0
  99. package/app/dist/client/assets/start-form-CJ6VmNPY.js +1 -0
  100. package/app/dist/client/assets/store-BT988jIX.js +1 -0
  101. package/app/dist/client/assets/style-CTcG_5y0.css +2 -0
  102. package/app/dist/client/assets/table-B81tv0LG.js +1 -0
  103. package/app/dist/client/assets/textarea-CRpYU-qx.js +1 -0
  104. package/app/dist/client/assets/tsx-udAQXfEw.js +1 -0
  105. package/app/dist/client/assets/typescript-bsJCZSQ-.js +1 -0
  106. package/app/dist/client/assets/{useLoaderData-BQd5yMlA.js → useLoaderData-BsksXf-p.js} +1 -1
  107. package/app/dist/client/assets/useOpenInteractionType-UhakpAXY.js +1 -0
  108. package/app/dist/client/assets/useRegisterFieldControl-DIkKUJkh.js +1 -0
  109. package/app/dist/client/assets/useValueChanged-DBqn456b.js +1 -0
  110. package/app/dist/client/assets/utils-BRvE9-Fo.js +1 -0
  111. package/app/dist/client/assets/who-are-you-DUoVqvfP.js +1 -0
  112. package/app/dist/client/assets/workflow-lQtyyxKx.js +1 -0
  113. package/app/dist/client/assets/workflow-view-hk_RU9WF.js +1 -0
  114. package/app/dist/client/assets/workflows-DFB7lzzN.js +1 -0
  115. package/app/dist/client/assets/yaml-rwi0_p6S.js +1 -0
  116. package/app/dist/index.d.ts +4 -4
  117. package/app/dist/lib/chat.d.ts +64 -19
  118. package/app/dist/lib/chat.js +54 -18
  119. package/app/dist/lib/chat.js.map +1 -1
  120. package/app/dist/server/assets/{_id-wuJIq2ZZ.js → _id--MWJXj9R.js} +2 -2
  121. package/app/dist/server/assets/{_id-ce1EGp7Y.js → _id-BEGe86NW.js} +2 -2
  122. package/app/dist/server/assets/{_id-BViXAagq.js → _id-CbO7Ok0w.js} +12 -10
  123. package/app/dist/server/assets/{_id-Dt9tTylX.js → _id-DwdpIYKk.js} +2 -2
  124. package/app/dist/server/assets/{_id-wB8khGTz.js → _id-fK_nPFHK.js} +6 -6
  125. package/app/dist/server/assets/{_name-D_-MhjNf.js → _name-BzD9TxVC.js} +17 -17
  126. package/app/dist/server/assets/{_name-BqFwnyf7.js → _name-ClgMsl5m.js} +2 -2
  127. package/app/dist/server/assets/{_name-BGagGBjX.js → _name-DdFVsjcj.js} +7 -7
  128. package/app/dist/server/assets/{_name-DntbHE-b.js → _name-Dyh4G9Oy.js} +10 -11
  129. package/app/dist/server/assets/{_tanstack-start-manifest_v-BljuBM-G.js → _tanstack-start-manifest_v-DUtnBg7y.js} +101 -91
  130. package/app/dist/server/assets/{_vendor-CNB03LWX.js → _vendor-DyeUY8kH.js} +8 -8
  131. package/app/dist/server/assets/{_vendor-CcEviOki.js → _vendor-W3KKSusM.js} +2 -2
  132. package/app/dist/server/assets/{actor-D6iA0pDg.js → actor-BlaOwG6A.js} +1 -1
  133. package/app/dist/server/assets/app-chrome-BJlxsc9y.js +2116 -0
  134. package/app/dist/server/assets/{app-scope-CXIgOFmi.js → app-scope-ASuhE3xI.js} +2 -2
  135. package/app/dist/server/assets/{apply-plan-ybBda6vQ.js → apply-plan-Djw1tNPD.js} +8 -7
  136. package/app/dist/server/assets/{approval-Su315ikC.js → approval-BjTnfr1U.js} +15 -13
  137. package/app/dist/server/assets/{apps-xwQAehch.js → apps-C28F9Y5C.js} +7 -7
  138. package/app/dist/server/assets/button-Xwx3rpQ0.js +43 -0
  139. package/app/dist/server/assets/change-glance-Bc4htVPy.js +54 -0
  140. package/app/dist/server/assets/{change-glance-CpArIbGS.js → changes-B5P8BJSf.js} +2 -54
  141. package/app/dist/server/assets/{changes-Bc_OiDBD.js → changes-tbeMKxjY.js} +8 -7
  142. package/app/dist/server/assets/{chat-DMN_hoKm.js → chat-BNMeLc9V.js} +108 -30
  143. package/app/dist/server/assets/{chat-button-LtA80MoR.js → chat-button-SluTWK8R.js} +2 -2
  144. package/app/dist/server/assets/{code-COyt8L-n.js → code-hVpCkmAZ.js} +1 -1
  145. package/app/dist/server/assets/{common-CWHLj7KV.js → common-DpZcJvCy.js} +26 -24
  146. package/app/dist/server/assets/{connect-BpPiu5s6.js → connect-Cljunav2.js} +11 -10
  147. package/app/dist/server/assets/{connections-DBgb1bvX.js → connections-Cfz5LMy5.js} +12 -11
  148. package/app/dist/server/assets/{connectors-5a5_SlHO.js → connectors-tt9BF9L1.js} +8 -8
  149. package/app/dist/server/assets/{credentials-ud_Y68hx.js → credentials-CYUFAVU8.js} +10 -9
  150. package/app/dist/server/assets/{data-aEdhwcqy.js → data-D91ZZ5St.js} +7 -7
  151. package/app/dist/server/assets/{declaration-form-Dfg1yNuY.js → declaration-form-BzISD6gw.js} +7 -6
  152. package/app/dist/server/assets/{dialog-BGjiw3Dx.js → dialog-T0bzlKzs.js} +2 -2
  153. package/app/dist/server/assets/{dropdown-menu-DAC3LWas.js → dropdown-menu-RGvPORm4.js} +1 -1
  154. package/app/dist/server/assets/{existing-B4d4NrC8.js → existing-BZym0xE2.js} +8 -7
  155. package/app/dist/server/assets/fence-Br7MPP41.js +130 -0
  156. package/app/dist/server/assets/{field-C0Xx_90s.js → field-DFpkT1id.js} +1 -1
  157. package/app/dist/server/assets/{functions-BvFYzabD.js → functions-sf07C1qn.js} +2 -2
  158. package/app/dist/server/assets/{graph-qYOdoz2s.js → graph-C1Cl7owl.js} +5 -5
  159. package/app/dist/server/assets/{grid-diff-jTvp-8wS.js → grid-diff-D5bQDKl2.js} +1 -1
  160. package/app/dist/server/assets/held-card-CDewk4rs.js +75 -0
  161. package/app/dist/server/assets/{hosting-bbn9UvDc.js → hosting-O-l2L0ec.js} +16 -14
  162. package/app/dist/server/assets/{import-DIwvzHb6.js → import-qvpEIYFx.js} +8 -8
  163. package/app/dist/server/assets/{inbox-D6R6sWBB.js → inbox-BcJxCIPm.js} +8 -8
  164. package/app/dist/server/assets/{inbox-Dj-5FleF.js → inbox-BvpSeC3M.js} +2 -2
  165. package/app/dist/server/assets/{input-D63gF3G2.js → input-CF-vX8Xp.js} +1 -1
  166. package/app/dist/server/assets/{item-BDSXoEr_.js → item-LBDNja5f.js} +1 -1
  167. package/app/dist/server/assets/{kit-D6EulwBe.js → kit-DlT_THim.js} +2 -2
  168. package/app/dist/server/assets/markdown-BExKjghi.js +116 -0
  169. package/app/dist/server/assets/{middleware-B8JRLyxx.js → middleware-B6RPW0fH.js} +1 -1
  170. package/app/dist/server/assets/{people-CkU_AxrV.js → people-C8VXQrKg.js} +13 -12
  171. package/app/dist/server/assets/{permissions-BfMcQqQb.js → permissions-COAiOoCB.js} +9 -8
  172. package/app/dist/server/assets/{permissions-grid-DWP9FAAS.js → permissions-grid-CcYUiqhD.js} +4 -4
  173. package/app/dist/server/assets/{button-f9Lc8qLl.js → queries-DJcZ4mzA.js} +3 -45
  174. package/app/dist/server/assets/{route-BTT7nMJq.js → route-DOqitvxL.js} +2 -2
  175. package/app/dist/server/assets/{route-CF_8jQYY.js → route-aa9MThMA.js} +2 -2
  176. package/app/dist/server/assets/{router-BvYtxrVN.js → router-Co6gRNI1.js} +80 -46
  177. package/app/dist/server/assets/{runs-table-BBudn12Y.js → runs-table-BtGm2KOO.js} +6 -6
  178. package/app/dist/server/assets/{scenario-BXGTSTiP.js → scenario-DidUafqw.js} +5 -5
  179. package/app/dist/server/assets/{separator-8MZ7vR3f.js → separator-Cf98V8ie.js} +1 -1
  180. package/app/dist/server/assets/{sheet-5Cyp-4UW.js → sheet-DTOG7OHQ.js} +2 -2
  181. package/app/dist/server/assets/{sites.index-1l0BtgVf.js → sites.index-4TK8c0QC.js} +4 -4
  182. package/app/dist/server/assets/{spinner-C1ZW08lp.js → spinner-016IPVi-.js} +1 -1
  183. package/app/dist/server/assets/{start-CSU4irVK.js → start-VfVsXenI.js} +2 -2
  184. package/app/dist/server/assets/{start-form-DI60UOrc.js → start-form-CUeEdeP7.js} +10 -9
  185. package/app/dist/server/assets/{table-DtPk_h_5.js → table-y-dGlLx6.js} +1 -1
  186. package/app/dist/server/assets/{textarea-f0Ip5ed1.js → textarea-B02joDnr.js} +1 -1
  187. package/app/dist/server/assets/utils-CHesvfjo.js +138 -0
  188. package/app/dist/server/assets/{who-are-you-ZGyMnpVi.js → who-are-you-DW5qmIzp.js} +8 -7
  189. package/app/dist/server/assets/{workflow-Z99QWO42.js → workflow-BRu7ljgU.js} +5 -5
  190. package/app/dist/server/assets/{workflow-view-C8X8U11S.js → workflow-view-yF48p1lu.js} +14 -13
  191. package/app/dist/server/assets/{workflows-C0kJoGf1.js → workflows-DL-TJFLt.js} +13 -14
  192. package/app/dist/server/chat.d.ts +6 -1
  193. package/app/dist/server/chat.js +39 -20
  194. package/app/dist/server/chat.js.map +1 -1
  195. package/app/dist/server/server.js +48 -48
  196. package/app/dist/steps/agent/acp.d.ts +3 -97
  197. package/app/dist/steps/agent/acp.js +19 -49
  198. package/app/dist/steps/agent/acp.js.map +1 -1
  199. package/app/dist/steps/agent/checkout.d.ts +18 -1
  200. package/app/dist/steps/agent/checkout.js +17 -0
  201. package/app/dist/steps/agent/checkout.js.map +1 -1
  202. package/app/dist/steps/agent/harness.d.ts +2 -4
  203. package/app/dist/steps/agent/harness.js +45 -61
  204. package/app/dist/steps/agent/harness.js.map +1 -1
  205. package/app/dist/steps/agent/prompt.d.ts +1 -1
  206. package/app/dist/steps/agent/prompt.js +35 -14
  207. package/app/dist/steps/agent/prompt.js.map +1 -1
  208. package/app/dist/steps/agent/transcript.d.ts +10 -1
  209. package/app/dist/steps/agent/transcript.js +75 -2
  210. package/app/dist/steps/agent/transcript.js.map +1 -1
  211. package/app/dist/steps/agent/turn.d.ts +4 -6
  212. package/app/dist/steps/agent/turn.js +14 -16
  213. package/app/dist/steps/agent/turn.js.map +1 -1
  214. package/app/dist/stylesheet.json +1 -1
  215. package/app/src/api.ts +1 -1
  216. package/app/src/components/app-chrome.tsx +28 -13
  217. package/app/src/components/common.tsx +1 -24
  218. package/app/src/components/logo.tsx +25 -0
  219. package/app/src/components/shell/chat-parts.tsx +185 -126
  220. package/app/src/components/shell/chat-prompt.ts +6 -2
  221. package/app/src/components/shell/chat.tsx +154 -220
  222. package/app/src/components/shell/composer.tsx +140 -0
  223. package/app/src/components/shell/connect-agent.tsx +157 -0
  224. package/app/src/components/shell/engine-mark.tsx +9 -0
  225. package/app/src/components/shell/fence.tsx +25 -0
  226. package/app/src/components/shell/held-card.tsx +58 -0
  227. package/app/src/components/shell/markdown.tsx +152 -0
  228. package/app/src/components/shell/nav-user.tsx +11 -1
  229. package/app/src/components/shell/prefs.ts +9 -1
  230. package/app/src/components/shell/thread.tsx +174 -0
  231. package/app/src/components/ui/bubble.tsx +117 -0
  232. package/app/src/components/ui/code-block.tsx +235 -0
  233. package/app/src/components/ui/input-group.tsx +136 -0
  234. package/app/src/components/ui/marker.tsx +67 -0
  235. package/app/src/components/ui/message-scroller.tsx +117 -0
  236. package/app/src/components/ui/message.tsx +74 -0
  237. package/app/src/components/ui/trace.tsx +133 -0
  238. package/app/src/hooks/use-highlighted-code.ts +72 -0
  239. package/app/src/index.ts +4 -4
  240. package/app/src/lib/chat.ts +110 -22
  241. package/app/src/lib/cn-tables.ts +23 -23
  242. package/app/src/lib/highlighter.tsx +114 -0
  243. package/app/src/routes/__root.tsx +7 -4
  244. package/app/src/routes/connectors/index.tsx +1 -1
  245. package/app/src/routes/hosting/index.tsx +6 -9
  246. package/app/src/server/chat.ts +41 -19
  247. package/app/src/steps/agent/acp.ts +10 -80
  248. package/app/src/steps/agent/checkout.ts +30 -0
  249. package/app/src/steps/agent/harness.ts +53 -78
  250. package/app/src/steps/agent/prompt.ts +42 -14
  251. package/app/src/steps/agent/transcript.ts +90 -3
  252. package/app/src/steps/agent/turn.ts +18 -16
  253. package/app/src/worker/app.ts +6 -5
  254. package/dist/cli.js +18 -6
  255. package/dist/cli.js.map +1 -1
  256. package/dist/serve.js +1 -1
  257. package/dist/serve.js.map +1 -1
  258. package/dist/worker-port.d.ts +16 -2
  259. package/dist/worker-port.js +44 -5
  260. package/dist/worker-port.js.map +1 -1
  261. package/package.json +7 -3
  262. package/testing/README.md +3 -3
  263. package/testing/dist/build.d.ts +3 -3
  264. package/testing/dist/build.js +4 -4
  265. package/testing/dist/build.js.map +1 -1
  266. package/testing/dist/host.d.ts +34 -21
  267. package/testing/dist/host.js +135 -75
  268. package/testing/dist/host.js.map +1 -1
  269. package/workflows/CLOUD-IDENTITY.md +15 -20
  270. package/workflows/README.md +9 -7
  271. package/workflows/dist/client.d.ts +5 -3
  272. package/workflows/dist/client.js +4 -3
  273. package/workflows/dist/client.js.map +1 -1
  274. package/workflows/dist/cloud-identity.d.ts +5 -2
  275. package/workflows/dist/cloud-identity.js +7 -4
  276. package/workflows/dist/cloud-identity.js.map +1 -1
  277. package/workflows/dist/config.d.ts +7 -1
  278. package/workflows/dist/config.js +24 -1
  279. package/workflows/dist/config.js.map +1 -1
  280. package/workflows/dist/db/company.d.ts +1 -1
  281. package/workflows/dist/db/company.js +1 -1
  282. package/workflows/dist/db/identity.d.ts +2 -2
  283. package/workflows/dist/db/identity.js +2 -2
  284. package/workflows/dist/db/identity.js.map +1 -1
  285. package/workflows/dist/deadlines.d.ts +7 -2
  286. package/workflows/dist/deadlines.js +14 -5
  287. package/workflows/dist/deadlines.js.map +1 -1
  288. package/workflows/dist/describe.js +15 -3
  289. package/workflows/dist/describe.js.map +1 -1
  290. package/workflows/dist/description.d.ts +37 -2
  291. package/workflows/dist/description.js +22 -1
  292. package/workflows/dist/description.js.map +1 -1
  293. package/workflows/dist/host.d.ts +7 -6
  294. package/workflows/dist/host.js +1 -1
  295. package/workflows/dist/host.js.map +1 -1
  296. package/workflows/dist/identity-provisioning.d.ts +2 -5
  297. package/workflows/dist/identity-provisioning.js +16 -20
  298. package/workflows/dist/identity-provisioning.js.map +1 -1
  299. package/workflows/dist/index.d.ts +3 -3
  300. package/workflows/dist/index.js +1 -1
  301. package/workflows/dist/index.js.map +1 -1
  302. package/workflows/dist/op.d.ts +92 -1
  303. package/workflows/dist/op.js +19 -6
  304. package/workflows/dist/op.js.map +1 -1
  305. package/workflows/dist/renewal.d.ts +1 -1
  306. package/workflows/dist/renewal.js +1 -1
  307. package/workflows/dist/runtime-ops.d.ts +3 -4
  308. package/workflows/dist/runtime-ops.js +4 -4
  309. package/workflows/dist/runtime-ops.js.map +1 -1
  310. package/workflows/dist/schedules.d.ts +1 -1
  311. package/workflows/dist/schedules.js +1 -1
  312. package/workflows/dist/supervisor.d.ts +21 -18
  313. package/workflows/dist/supervisor.js +20 -22
  314. package/workflows/dist/supervisor.js.map +1 -1
  315. package/workflows/dist/vendor-info.d.ts +12 -3
  316. package/workflows/dist/vendor-info.js +20 -4
  317. package/workflows/dist/vendor-info.js.map +1 -1
  318. package/workflows/dist/worker.d.ts +11 -1
  319. package/workflows/dist/worker.js +9 -3
  320. package/workflows/dist/worker.js.map +1 -1
  321. package/workflows/src/client.ts +9 -6
  322. package/workflows/src/cloud-identity.ts +7 -4
  323. package/workflows/src/config.ts +36 -1
  324. package/workflows/src/db/company.ts +1 -1
  325. package/workflows/src/db/identity.ts +2 -2
  326. package/workflows/src/deadlines.ts +18 -8
  327. package/workflows/src/describe.ts +16 -3
  328. package/workflows/src/description.ts +25 -1
  329. package/workflows/src/host.ts +7 -6
  330. package/workflows/src/identity-provisioning.ts +19 -30
  331. package/workflows/src/index.ts +7 -1
  332. package/workflows/src/op.ts +104 -10
  333. package/workflows/src/renewal.ts +1 -1
  334. package/workflows/src/runtime-ops.ts +5 -5
  335. package/workflows/src/schedules.ts +1 -1
  336. package/workflows/src/supervisor.ts +40 -38
  337. package/workflows/src/vendor-info.ts +20 -5
  338. package/workflows/src/worker.ts +22 -5
  339. package/app/dist/client/assets/ArrowUp.es-DOgvoS0P.js +0 -1
  340. package/app/dist/client/assets/Copy.es-B0D5SwiQ.js +0 -1
  341. package/app/dist/client/assets/DialogTitle-BgjYK22C.js +0 -1
  342. package/app/dist/client/assets/FloppyDisk.es-DnuNe_a8.js +0 -1
  343. package/app/dist/client/assets/Globe.es-B6x2e4-a.js +0 -1
  344. package/app/dist/client/assets/MagnifyingGlass.es-DoNoHEhT.js +0 -1
  345. package/app/dist/client/assets/Play.es-BwXalGBh.js +0 -1
  346. package/app/dist/client/assets/Plug.es-CaZsN5P-.js +0 -1
  347. package/app/dist/client/assets/Plus.es-w9VPpTJB.js +0 -1
  348. package/app/dist/client/assets/Separator-BAhKFgSd.js +0 -1
  349. package/app/dist/client/assets/X.es-DKMYClf-.js +0 -1
  350. package/app/dist/client/assets/_id-BSRAaWtO.js +0 -1
  351. package/app/dist/client/assets/_id-BjDP-cPH.js +0 -1
  352. package/app/dist/client/assets/_id-BudM76zX.js +0 -1
  353. package/app/dist/client/assets/_id-C37U5bBa.js +0 -1
  354. package/app/dist/client/assets/_id-lmg24JVh.js +0 -2
  355. package/app/dist/client/assets/_name-CylqFo_t.js +0 -1
  356. package/app/dist/client/assets/_name-D8Gl8iwy.js +0 -4
  357. package/app/dist/client/assets/_name-DdPCU8pt.js +0 -1
  358. package/app/dist/client/assets/_name-TteWQXe0.js +0 -1
  359. package/app/dist/client/assets/_vendor-BLxW83yk.js +0 -1
  360. package/app/dist/client/assets/_vendor-Bq3uZU4-.js +0 -1
  361. package/app/dist/client/assets/app-chrome-H8uZ4dHI.js +0 -16
  362. package/app/dist/client/assets/app-scope-BeUW_8Qh.js +0 -1
  363. package/app/dist/client/assets/approval-DpgmTc63.js +0 -1
  364. package/app/dist/client/assets/apps-CoWzNm8M.js +0 -1
  365. package/app/dist/client/assets/change-glance-DbYcBT7H.js +0 -1
  366. package/app/dist/client/assets/changes-DIJvP7wQ.js +0 -1
  367. package/app/dist/client/assets/chat-button-BgpOfYh1.js +0 -1
  368. package/app/dist/client/assets/chat-prompt-hiawXcK0.js +0 -1
  369. package/app/dist/client/assets/common-Dw2i6XKZ.js +0 -3
  370. package/app/dist/client/assets/composite-D9GNDzFj.js +0 -1
  371. package/app/dist/client/assets/connect-CIq2KJTz.js +0 -1
  372. package/app/dist/client/assets/connections-iqd2XbWQ.js +0 -5
  373. package/app/dist/client/assets/connectors-rI8_D1n1.js +0 -1
  374. package/app/dist/client/assets/credentials-26vu6Fv5.js +0 -1
  375. package/app/dist/client/assets/data-sDMlKaLV.js +0 -1
  376. package/app/dist/client/assets/decidable-zcYI7bY8.js +0 -1
  377. package/app/dist/client/assets/declaration-form-BtSVvxhq.js +0 -1
  378. package/app/dist/client/assets/dialog-DskpUgkl.js +0 -1
  379. package/app/dist/client/assets/existing-BD3VgJ_8.js +0 -1
  380. package/app/dist/client/assets/graph-Prxl3c55.js +0 -7
  381. package/app/dist/client/assets/grid-diff-SMsvea6t.js +0 -1
  382. package/app/dist/client/assets/hosting-BBHUppH-.js +0 -1
  383. package/app/dist/client/assets/import-B92fd4Tl.js +0 -1
  384. package/app/dist/client/assets/inbox-57oGZtxE.js +0 -1
  385. package/app/dist/client/assets/inbox-B2AMNtk5.js +0 -1
  386. package/app/dist/client/assets/index-Bn3XeKy8.js +0 -10
  387. package/app/dist/client/assets/kit-BsK6VZTQ.js +0 -1
  388. package/app/dist/client/assets/lazyRouteComponent-Uri98HNq.js +0 -1
  389. package/app/dist/client/assets/motion-C8lNeYvK.js +0 -1
  390. package/app/dist/client/assets/people-ISOMYCTu.js +0 -1
  391. package/app/dist/client/assets/permissions-Cenat84K.js +0 -2
  392. package/app/dist/client/assets/permissions-grid-B2GtGwzv.js +0 -1
  393. package/app/dist/client/assets/route-BP1XwaTB.js +0 -1
  394. package/app/dist/client/assets/route-KVU6QgwJ.js +0 -1
  395. package/app/dist/client/assets/runs-table-35lNzKLn.js +0 -1
  396. package/app/dist/client/assets/scenario-DSwsavxS.js +0 -1
  397. package/app/dist/client/assets/scenario-graph-CAzWOtqV.js +0 -1
  398. package/app/dist/client/assets/separator-BlwkzEY0.js +0 -1
  399. package/app/dist/client/assets/site-icon-DZvOfBvU.js +0 -1
  400. package/app/dist/client/assets/sites.index-CcNo6N8u.js +0 -1
  401. package/app/dist/client/assets/spinner-BGy6LWIW.js +0 -1
  402. package/app/dist/client/assets/start-form-Bgo9I63s.js +0 -1
  403. package/app/dist/client/assets/store-BGu0d2Ld.js +0 -57
  404. package/app/dist/client/assets/style-CCDLLPgG.css +0 -2
  405. package/app/dist/client/assets/table-DjbI5VTn.js +0 -1
  406. package/app/dist/client/assets/textarea-DXO0eUdp.js +0 -1
  407. package/app/dist/client/assets/useOpenInteractionType-Bin8RjM5.js +0 -1
  408. package/app/dist/client/assets/useRegisterFieldControl-CQPTOU7Z.js +0 -1
  409. package/app/dist/client/assets/useValueChanged-DMkuvFZG.js +0 -1
  410. package/app/dist/client/assets/utils-CMsCvwYQ.js +0 -1
  411. package/app/dist/client/assets/who-are-you-Bt1WI3Cz.js +0 -1
  412. package/app/dist/client/assets/workflow-BJpO61A-.js +0 -1
  413. package/app/dist/client/assets/workflow-view-DP-UlRiH.js +0 -1
  414. package/app/dist/client/assets/workflows-BLCBgxbx.js +0 -1
  415. package/app/dist/server/assets/app-chrome-BYS81Vnx.js +0 -1410
  416. package/app/dist/server/assets/native-select-DLa-He0n.js +0 -37
  417. package/app/dist/server/assets/utils-wksS9pYh.js +0 -138
@@ -0,0 +1 @@
1
+ import{a as e,i as t}from"./engine-CBuzy-Ik.js";var n=e((e=>{var n=t();function r(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function i(){}var a={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`),s=Symbol.for(`react.recoverable`),c=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:r===c?c:``+r,children:e,containerInfo:t,implementation:n}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.browser=function(e){return{$$typeof:s,_reason:e}},e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(r(299));return l(e,t,null,n)},e.flushSync=function(e){var t=u.T,n=a.p;try{if(u.T=null,a.p=2,e)return e()}finally{u.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??a.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else a.d.m(e)}},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.0`})),r=e(((e,t)=>{function r(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),t.exports=n()}));export{r as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./engine-CBuzy-Ik.js";import{s as t}from"./kit-n8CE0xEs.js";import{a as n}from"./index-CHKfukjt.js";var r=e(),i=()=>(0,r.jsxs)(t,{variant:`destructive`,children:[`No workflow `,n.useParams().name,`.`]});export{i as notFoundComponent};
@@ -0,0 +1 @@
1
+ import{r as e}from"./engine-CBuzy-Ik.js";import{s as t}from"./kit-n8CE0xEs.js";import{P as n}from"./index-CHKfukjt.js";var r=e(),i=()=>(0,r.jsxs)(t,{variant:`destructive`,children:[`No collection `,n.useParams().name,`.`]});export{i as notFoundComponent};
@@ -0,0 +1 @@
1
+ import{r as e}from"./engine-CBuzy-Ik.js";import{Mn as t,Nn as n,Pn as r,ct as i,ii as a,ri as o}from"./queries-DGlVu9wp.js";import{M as s,W as c}from"./common-DHOhx6Zn.js";import{R as l,f as u,m as d}from"./kit-n8CE0xEs.js";import{n as f}from"./utils-BRvE9-Fo.js";import{a as p,i as m,n as h,o as g,r as _,t as v}from"./table-B81tv0LG.js";var y=e();function b({link:e,selected:t,children:n}){let r=a();return(0,y.jsx)(g,{className:`cursor-pointer`,"data-state":t?`selected`:void 0,onClick:()=>void r(e),children:n})}function x({runs:e,className:a,link:x,selected:S}){return(0,y.jsxs)(v,{className:a,children:[(0,y.jsx)(p,{children:(0,y.jsxs)(g,{children:[(0,y.jsx)(m,{children:x?`Run`:`Workflow`}),(0,y.jsx)(m,{children:`Status`}),(0,y.jsx)(m,{children:`Started by`}),(0,y.jsx)(m,{children:`When`}),(0,y.jsx)(m,{children:`Waiting on`}),(0,y.jsx)(m,{children:`Error`})]})}),(0,y.jsx)(h,{children:e.map(e=>{let a=t(e).length,p=x?x(e):i(e);return(0,y.jsxs)(b,{link:p,selected:e.runId===S,children:[(0,y.jsx)(_,{className:`font-medium`,children:(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(u,{tip:(0,y.jsx)(`code`,{children:e.runId}),children:(0,y.jsx)(o,{...p,onClick:e=>e.stopPropagation(),children:x?n(e.runId):e.workflow})}),e.sandbox!==void 0&&(0,y.jsx)(s,{name:e.sandbox})]})}),(0,y.jsx)(_,{children:(0,y.jsx)(d,{dot:!0,tone:l[e.status],children:e.status})}),(0,y.jsx)(_,{children:r(e)}),(0,y.jsx)(_,{className:`text-muted-foreground`,children:(0,y.jsx)(c,{at:e.createdAt})}),(0,y.jsx)(_,{children:a>0?(0,y.jsx)(d,{tone:`waiting`,children:f(a,`approval`)}):(0,y.jsx)(`span`,{className:`text-muted-foreground`,children:`-`})}),(0,y.jsx)(_,{children:e.status===`failed`&&e.error&&(0,y.jsx)(`span`,{className:`block max-w-xs truncate text-destructive`,title:e.error,children:e.error})})]},e.runId)})})]})}export{x as n,b as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./engine-CBuzy-Ik.js";import{ri as t}from"./queries-DGlVu9wp.js";import{g as n,p as r}from"./common-DHOhx6Zn.js";import{G as i,H as a,U as o,V as s,W as c,a as l,n as u,s as d,t as f}from"./kit-n8CE0xEs.js";import{n as p,t as m}from"./utils-BRvE9-Fo.js";import{a as h,i as g,n as _,o as v,r as y,t as b}from"./table-B81tv0LG.js";import{t as x}from"./X.es-B7rq0E_-.js";import{t as S}from"./runs-table-DMiD4HeY.js";import{r as C}from"./scenario-graph-Blv2e1PV.js";var w=e();function T({errors:e}){return e.map(e=>(0,w.jsx)(d,{variant:`destructive`,children:(0,w.jsxs)(`span`,{className:`whitespace-pre-wrap`,children:[`Could not read a scenario: `,e.message]})},`${e.file}:${e.message}`))}function E({scenarios:e,open:r}){return(0,w.jsx)(n,{float:r&&(0,w.jsx)(D,{scenario:r}),children:(0,w.jsxs)(b,{children:[(0,w.jsx)(h,{children:(0,w.jsxs)(v,{children:[(0,w.jsx)(g,{children:`Scenario`}),(0,w.jsx)(g,{children:`File`}),(0,w.jsx)(g,{children:`Steps`})]})}),(0,w.jsx)(_,{children:e.map(e=>{let n={to:`.`,search:t=>({...t,scenario:e.name})};return(0,w.jsxs)(S,{link:n,selected:e.name===r?.name,children:[(0,w.jsx)(y,{className:`font-medium`,children:(0,w.jsx)(t,{...n,onClick:e=>e.stopPropagation(),children:e.name})}),(0,w.jsx)(y,{className:`text-muted-foreground`,children:(0,w.jsx)(`code`,{children:e.file})}),(0,w.jsx)(y,{className:`text-muted-foreground tabular-nums`,children:e.steps.length})]},e.name)})})]})})}function D({scenario:e}){return(0,w.jsxs)(l,{role:`region`,"aria-label":e.name,className:m(r,`order-first gap-0 py-0`),children:[(0,w.jsxs)(i,{className:`border-b py-3`,children:[(0,w.jsx)(u,{children:e.name}),(0,w.jsxs)(o,{children:[(0,w.jsx)(`code`,{children:e.file}),` · `,p(e.steps.length,`step`)]}),(0,w.jsx)(s,{children:(0,w.jsx)(f,{variant:`ghost`,size:`icon-sm`,children:(0,w.jsxs)(t,{to:`.`,search:e=>({...e,scenario:void 0}),children:[(0,w.jsx)(x,{"aria-hidden":`true`}),(0,w.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})})]}),(0,w.jsx)(a,{className:`min-h-0 flex-1 overflow-y-auto py-(--card-spacing)`,children:(0,w.jsx)(`pre`,{className:`overflow-x-auto rounded-md bg-muted p-3 font-mono text-xs`,children:e.text})}),(0,w.jsxs)(c,{className:`flex-wrap gap-2 border-t py-3`,children:[(0,w.jsx)(f,{size:`sm`,children:(0,w.jsxs)(t,{to:`.`,search:e=>({...e,view:void 0,new:!0}),children:[(0,w.jsx)(C,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Sandbox run`]})}),(0,w.jsx)(f,{variant:`outline`,size:`sm`,children:(0,w.jsx)(t,{to:`.`,search:e=>({...e,view:void 0}),children:`Show on the graph`})})]})]})}export{E as n,T as t};
@@ -0,0 +1 @@
1
+ import{i as e,s as t}from"./engine-CBuzy-Ik.js";import{Tr as n}from"./queries-DGlVu9wp.js";import{V as r}from"./button-D5kdANef.js";var i=t(e(),1),a=new Map([[`bold`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M225.15,197.71,164,95.81V44h4a12,12,0,0,0,0-24H88a12,12,0,0,0,0,24h4V95.81L30.85,197.71A20,20,0,0,0,48,228H208a20,20,0,0,0,17.15-30.29ZM140,44V99.14a12,12,0,0,0,1.71,6.17l35.13,58.54c-10.79.86-25.15-1.31-43.42-10.56-14-7.08-27.46-11.33-40.27-12.76l21.14-35.22A12,12,0,0,0,116,99.14V44ZM55.06,204,79,164.19c13-1.11,27.62,2.42,43.62,10.52,19.61,9.92,36.25,13.31,49.85,13.31A75.44,75.44,0,0,0,190.11,186l10.83,18Z`}))],[`duotone`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M208,216H48a8,8,0,0,1-6.86-12.12l30.48-50.8h0c13.23-2.48,32-1.41,56.37,10.92,32.25,16.33,54.75,12.91,67.5,7.65h0l19.34,32.23A8,8,0,0,1,208,216Z`,opacity:`0.2`}),i.createElement(`path`,{d:`M221.69,199.77,160,96.92V40h8a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16h8V96.92L34.31,199.77A16,16,0,0,0,48,224H208a16,16,0,0,0,13.72-24.23ZM110.86,103.25A7.93,7.93,0,0,0,112,99.14V40h32V99.14a7.93,7.93,0,0,0,1.14,4.11L183.36,167c-12,2.37-29.07,1.37-51.75-10.11-15.91-8.05-31.05-12.32-45.22-12.81ZM48,208l28.54-47.58c14.25-1.73,30.31,1.85,47.82,10.72,19,9.61,35,12.88,48,12.88a69.89,69.89,0,0,0,19.55-2.7L208,208Z`}))],[`fill`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M221.69,199.77,160,96.92V40h8a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16h8V96.92L34.31,199.77A16,16,0,0,0,48,224H208a16,16,0,0,0,13.72-24.23Zm-90.08-42.91c-15.91-8.05-31.05-12.32-45.22-12.81l24.47-40.8A7.93,7.93,0,0,0,112,99.14V40h32V99.14a7.93,7.93,0,0,0,1.14,4.11L183.36,167C171.4,169.34,154.29,168.34,131.61,156.86Z`}))],[`light`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M220,200.8,158,97.48V38h10a6,6,0,0,0,0-12H88a6,6,0,0,0,0,12H98V97.48L36,200.8A14,14,0,0,0,48,222H208a14,14,0,0,0,12-21.2ZM109.15,102.23a6,6,0,0,0,.85-3.09V38h36V99.14a6,6,0,0,0,.85,3.09l39.65,66.08c-12.41,3.16-30.86,3-55.79-9.66-16.94-8.58-33-12.8-47.83-12.64ZM209.72,209a2,2,0,0,1-1.74,1H48a2,2,0,0,1-1.71-3l29-48.41c14.89-2.08,31.68,1.55,49.94,10.79C144,178.8,159.67,182,172.42,182A67.89,67.89,0,0,0,192.89,179l16.8,28A2,2,0,0,1,209.72,209Z`}))],[`regular`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M221.69,199.77,160,96.92V40h8a8,8,0,0,0,0-16H88a8,8,0,0,0,0,16h8V96.92L34.31,199.77A16,16,0,0,0,48,224H208a16,16,0,0,0,13.72-24.23ZM110.86,103.25A7.93,7.93,0,0,0,112,99.14V40h32V99.14a7.93,7.93,0,0,0,1.14,4.11L183.36,167c-12,2.37-29.07,1.37-51.75-10.11-15.91-8.05-31.05-12.32-45.22-12.81ZM48,208l28.54-47.58c14.25-1.74,30.31,1.85,47.82,10.72,19,9.61,35,12.88,48,12.88a69.89,69.89,0,0,0,19.55-2.7L208,208Z`}))],[`thin`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M218.27,201.83,156,98V36h12a4,4,0,0,0,0-8H88a4,4,0,0,0,0,8h12V98L37.73,201.83A12,12,0,0,0,48,220H208a12,12,0,0,0,10.29-18.17ZM107.43,101.2a4.07,4.07,0,0,0,.57-2.06V36h40V99.14a4.07,4.07,0,0,0,.57,2.06l41,68.33c-12.76,3.94-32.54,4.68-59.75-9.1-18-9.14-35-13.24-50.54-12.29ZM211.46,210a3.94,3.94,0,0,1-3.48,2H48a4,4,0,0,1-3.43-6.06l29.53-49.21c15.54-2.43,33.05,1.21,52.07,10.84C144.54,176.86,160,180,172.42,180a65,65,0,0,0,21.36-3.46l17.63,29.38A3.92,3.92,0,0,1,211.46,210Z`}))]]),o=i.forwardRef((e,t)=>i.createElement(r,{ref:t,...e,weights:a}));o.displayName=`FlaskIcon`;function s(e,t){let n={};for(let r of e){if(!t(r))continue;let{kind:e,called:i,decision:a,fault:o}=r;e===`given`?n[o?`fails`:`seeded`]=!0:a?n[a]=!0:i===!1?n.forbidden=!0:n.expected=!0}return n}function c(e,{steps:t}){if(!t.some(e=>e.op!==void 0||e.name!==void 0))return e;let r=e.nodes.map(e=>{if(e.kind!==`op`)return e;let r=s(t,({op:t,name:r})=>r===void 0?t!==void 0&&n(e.label,t):r===(e.name??e.label));return Object.keys(r).length===0?e:{...e,state:{...e.state,scenario:r}}});return{...e,nodes:r}}export{s as n,o as r,c as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./engine-CBuzy-Ik.js";import{t}from"./utils-BRvE9-Fo.js";import{t as n}from"./Separator-Cu9cQDBN.js";var r=e();function i({className:e,orientation:i=`horizontal`,...a}){return(0,r.jsx)(n,{"data-slot":`separator`,orientation:i,className:t(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...a})}export{i as t};
@@ -1 +1 @@
1
- import{a as e,c as t,i as n,t as r}from"./utils-CMsCvwYQ.js";import{O as i,R as a,Ti as o,bi as s,ci as c,cr as l,g as u,pi as d,ui as f}from"./store-BGu0d2Ld.js";import{T as p}from"./kit-BsK6VZTQ.js";import{c as m,i as h,l as g,n as _,o as v,s as y,t as b,u as x}from"./DialogTitle-BgjYK22C.js";import{n as S,r as C}from"./useOpenInteractionType-Bin8RjM5.js";import{t as w}from"./X.es-DKMYClf-.js";var T=t(e(),1),E=a(function(e,t){let{render:n,className:r,style:a,disabled:f=!1,nativeButton:m=!0,id:h,payload:g,handle:_,...v}=e,y=x(!0),b=p(_)??y;if(!b)throw Error(o(79));let w=c(h),E=b.useState(`floatingRootContext`),D=b.useState(`isOpenedByTrigger`,w),O=b.useState(`triggerPopupId`,w),k=T.useRef(null),{registerTrigger:A,isMountedByThisTrigger:j}=u(w,k,b,{payload:g}),{getButtonProps:M,buttonRef:N}=s({disabled:f,native:m}),P=C(E),F=S(()=>b.select(`open`),e=>{b.set(`openMethod`,e)}),I={disabled:f,open:D},L=b.useState(`triggerProps`,j);return d(`button`,e,{state:I,ref:[N,t,A,k],props:[P.reference,L,F,{[i]:``,id:w,"aria-haspopup":`dialog`,"aria-expanded":D,"aria-controls":O},v,M],stateAttributesMapping:l})}),D=n();function O({...e}){return(0,D.jsx)(_,{"data-slot":`sheet`,...e})}function k({...e}){return(0,D.jsx)(E,{"data-slot":`sheet-trigger`,...e})}function A({...e}){return(0,D.jsx)(h,{"data-slot":`sheet-portal`,...e})}function j({className:e,...t}){return(0,D.jsx)(g,{"data-slot":`sheet-overlay`,className:r(`fixed inset-0 z-50 bg-overlay transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,e),...t})}function M({className:e,children:t,side:n=`right`,showCloseButton:i=!0,...a}){return(0,D.jsxs)(A,{children:[(0,D.jsx)(j,{}),(0,D.jsxs)(v,{"data-slot":`sheet-content`,"data-side":n,className:r(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,e),...a,children:[t,i&&(0,D.jsxs)(m,{"data-slot":`sheet-close`,render:(0,D.jsx)(f,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`}),children:[(0,D.jsx)(w,{"aria-hidden":`true`}),(0,D.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function N({className:e,...t}){return(0,D.jsx)(`div`,{"data-slot":`sheet-header`,className:r(`flex flex-col gap-0.5 p-4`,e),...t})}function P({className:e,...t}){return(0,D.jsx)(b,{"data-slot":`sheet-title`,className:r(`font-heading text-base font-medium text-foreground`,e),...t})}function F({className:e,...t}){return(0,D.jsx)(y,{"data-slot":`sheet-description`,className:r(`text-sm text-muted-foreground`,e),...t})}export{P as a,N as i,M as n,k as o,F as r,O as t};
1
+ import{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{T as r}from"./kit-n8CE0xEs.js";import{O as i,R as a,g as o,hn as s,ht as c}from"./store-BT988jIX.js";import{d as l,h as u,i as d,t as f}from"./button-D5kdANef.js";import{t as p}from"./utils-BRvE9-Fo.js";import{c as m,i as h,l as g,n as _,o as v,s as y,t as b,u as x}from"./DialogTitle-Dz3loDe5.js";import{n as S,r as C}from"./useOpenInteractionType-UhakpAXY.js";import{t as w}from"./X.es-B7rq0E_-.js";var T=n(e(),1),E=a(function(e,t){let{render:n,className:a,style:f,disabled:p=!1,nativeButton:m=!0,id:h,payload:g,handle:_,...v}=e,y=x(!0),b=r(_)??y;if(!b)throw Error(u(79));let w=s(h),E=b.useState(`floatingRootContext`),D=b.useState(`isOpenedByTrigger`,w),O=b.useState(`triggerPopupId`,w),k=T.useRef(null),{registerTrigger:A,isMountedByThisTrigger:j}=o(w,k,b,{payload:g}),{getButtonProps:M,buttonRef:N}=l({disabled:p,native:m}),P=C(E),F=S(()=>b.select(`open`),e=>{b.set(`openMethod`,e)}),I={disabled:p,open:D},L=b.useState(`triggerProps`,j);return d(`button`,e,{state:I,ref:[N,t,A,k],props:[P.reference,L,F,{[i]:``,id:w,"aria-haspopup":`dialog`,"aria-expanded":D,"aria-controls":O},v,M],stateAttributesMapping:c})}),D=t();function O({...e}){return(0,D.jsx)(_,{"data-slot":`sheet`,...e})}function k({...e}){return(0,D.jsx)(E,{"data-slot":`sheet-trigger`,...e})}function A({...e}){return(0,D.jsx)(h,{"data-slot":`sheet-portal`,...e})}function j({className:e,...t}){return(0,D.jsx)(g,{"data-slot":`sheet-overlay`,className:p(`fixed inset-0 z-50 bg-overlay transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,e),...t})}function M({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,D.jsxs)(A,{children:[(0,D.jsx)(j,{}),(0,D.jsxs)(v,{"data-slot":`sheet-content`,"data-side":n,className:p(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,e),...i,children:[t,r&&(0,D.jsxs)(m,{"data-slot":`sheet-close`,render:(0,D.jsx)(f,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`}),children:[(0,D.jsx)(w,{"aria-hidden":`true`}),(0,D.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function N({className:e,...t}){return(0,D.jsx)(`div`,{"data-slot":`sheet-header`,className:p(`flex flex-col gap-0.5 p-4`,e),...t})}function P({className:e,...t}){return(0,D.jsx)(b,{"data-slot":`sheet-title`,className:p(`font-heading text-base font-medium text-foreground`,e),...t})}function F({className:e,...t}){return(0,D.jsx)(y,{"data-slot":`sheet-description`,className:p(`text-sm text-muted-foreground`,e),...t})}export{P as a,N as i,M as n,k as o,F as r,O as t};
@@ -0,0 +1 @@
1
+ var e=[Object.freeze(JSON.parse(`{"displayName":"Shell","name":"shellscript","patterns":[{"include":"#initial_context"}],"repository":{"alias_statement":{"begin":"[\\\\t ]*+(alias)[\\\\t ]*+((?:((?<!\\\\w)-\\\\w+)\\\\b[\\\\t ]*+)*)[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"storage.type.alias.shell"},"2":{"patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"}]},"3":{"name":"string.unquoted.argument.shell constant.other.option.shell"},"4":{"name":"variable.other.assignment.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"variable.other.assignment.shell"},"7":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"8":{"name":"punctuation.definition.array.access.shell"},"9":{"name":"keyword.operator.assignment.shell"},"10":{"name":"keyword.operator.assignment.compound.shell"},"11":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\t ]|$)|(?:(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&))","endCaptures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"name":"meta.expression.assignment.alias.shell","patterns":[{"include":"#normal_context"}]},"argument":{"begin":"[\\\\t ]++(?![\\\\n#\\\\&(\\\\[|]|$|;)","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)\`])","endCaptures":{},"name":"meta.argument.shell","patterns":[{"include":"#argument_context"},{"include":"#line_continuation"}]},"argument_context":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell","patterns":[{"match":"\\\\*","name":"variable.language.special.wildcard.shell"},{"include":"#variable"},{"include":"#numeric_literal"},{"captures":{"1":{"name":"constant.language.$1.shell"}},"match":"(?<!\\\\w)\\\\b(true|false)\\\\b(?!\\\\w)"}]}},"match":"[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\\`|]+(?!>))"},{"include":"#normal_context"}]},"arithmetic_double":{"patterns":[{"begin":"\\\\(\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"end":"\\\\)\\\\s*\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.double.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"arithmetic_no_dollar":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arithmetic.single.shell"}},"name":"meta.arithmetic.shell","patterns":[{"include":"#math"},{"include":"#string"}]}]},"array_access_inline":{"captures":{"1":{"name":"punctuation.section.array.shell"},"2":{"patterns":[{"include":"#special_expansion"},{"include":"#string"},{"include":"#variable"}]},"3":{"name":"punctuation.section.array.shell"}},"match":"(\\\\[)([^]\\\\[]+)(])"},"array_value":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))[\\\\t ]*+(\\\\()","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"punctuation.definition.array.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.array.shell"}},"patterns":[{"include":"#comment"},{"captures":{"1":{"name":"variable.other.assignment.array.shell entity.other.attribute-name.shell"},"2":{"name":"keyword.operator.assignment.shell punctuation.definition.assignment.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(=)"},{"captures":{"1":{"name":"punctuation.definition.bracket.named-array.shell"},"2":{"name":"string.unquoted.shell entity.other.attribute-name.bracket.shell"},"3":{"name":"punctuation.definition.bracket.named-array.shell"},"4":{"name":"punctuation.definition.assignment.shell"}},"match":"(\\\\[)(.+?)(])(=)"},{"include":"#normal_context"},{"include":"#simple_unquoted"}]},"assignment_statement":{"patterns":[{"include":"#array_value"},{"include":"#modified_assignment_statement"},{"include":"#normal_assignment_statement"}]},"basic_command_name":{"captures":{"1":{"name":"storage.modifier.$1.shell"},"2":{"name":"entity.name.function.call.shell entity.name.command.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"support.function.builtin.shell"},{"include":"#variable"}]}},"match":"(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?:((?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$))|((?![\\"']|\\\\\\\\\\\\n?$)[^\\\\t\\\\n\\\\r !\\"'<>]+?))(?:(?=[\\\\t ])|(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\))","name":"meta.statement.command.name.basic.shell"},"block_comment":{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.shell"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.shell"}},"name":"comment.block.shell"},"boolean":{"match":"\\\\b(?:true|false)\\\\b","name":"constant.language.$0.shell"},"case_statement":{"begin":"\\\\b(case)\\\\b[\\\\t ]*+(.+?)[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.case.shell"},"2":{"patterns":[{"include":"#initial_context"}]},"3":{"name":"keyword.control.in.shell"}},"end":"\\\\besac\\\\b","endCaptures":{"0":{"name":"keyword.control.esac.shell"}},"name":"meta.case.shell","patterns":[{"include":"#comment"},{"captures":{"1":{"name":"keyword.operator.pattern.case.default.shell"}},"match":"[\\\\t ]*+(\\\\* *\\\\))"},{"begin":"(?<!\\\\))(?![\\\\t ]*+(?:esac\\\\b|$))","beginCaptures":{},"end":"(?=\\\\besac\\\\b)|(\\\\))","endCaptures":{"1":{"name":"keyword.operator.pattern.case.shell"}},"name":"meta.case.entry.pattern.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"(?<=\\\\))","beginCaptures":{},"end":"(;;)|(?=\\\\besac\\\\b)","endCaptures":{"1":{"name":"punctuation.terminator.statement.case.shell"}},"name":"meta.case.entry.body.shell","patterns":[{"include":"#typical_statements"},{"include":"#initial_context"}]}]},"case_statement_context":{"patterns":[{"match":"\\\\*","name":"variable.language.special.quantifier.star.shell keyword.operator.quantifier.star.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\+","name":"variable.language.special.quantifier.plus.shell keyword.operator.quantifier.plus.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"\\\\?","name":"variable.language.special.quantifier.question.shell keyword.operator.quantifier.question.shell punctuation.definition.arbitrary-repetition.shell punctuation.definition.regex.arbitrary-repetition.shell"},{"match":"@","name":"variable.language.special.at.shell keyword.operator.at.shell punctuation.definition.regex.at.shell"},{"match":"\\\\|","name":"keyword.operator.orvariable.language.special.or.shell keyword.operator.alternation.ruby.shell punctuation.definition.regex.alternation.shell punctuation.separator.regex.alternation.shell"},{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"match":"(?<=\\\\tin| in|[\\\\t ]|;;)\\\\(","name":"keyword.operator.pattern.case.shell"},{"begin":"(?<=\\\\S)(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.definition.regex.group.shell"}},"name":"meta.parenthese.shell","patterns":[{"include":"#case_statement_context"}]},{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.character-class.shell"}},"name":"string.regexp.character-class.shell","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"}]},{"include":"#string"},{"match":"[^\\\\t\\\\n )*?@\\\\[|]","name":"string.unquoted.pattern.shell string.regexp.unquoted.shell"}]},"command_name_range":{"begin":"\\\\G","beginCaptures":{},"end":"(?=[\\\\t \\\\&;|]|$|[\\\\n)\`])|(?=<)","endCaptures":{},"name":"meta.statement.command.name.shell","patterns":[{"match":"(?<!\\\\w)(?:continue|return|break)(?!\\\\w)","name":"entity.name.function.call.shell entity.name.command.shell keyword.control.$0.shell"},{"match":"(?<!\\\\w)(?:unfunction|continue|autoload|unsetopt|bindkey|builtin|getopts|command|declare|unalias|history|unlimit|typeset|suspend|source|printf|unhash|disown|ulimit|return|which|alias|break|false|print|shift|times|umask|unset|read|type|exec|eval|wait|echo|dirs|jobs|kill|hash|stat|exit|test|trap|true|let|set|pwd|cd|fg|bg|fc|[.:])(?!/)(?!\\\\w)(?!-)","name":"entity.name.function.call.shell entity.name.command.shell support.function.builtin.shell"},{"include":"#variable"},{"captures":{"1":{"name":"entity.name.function.call.shell entity.name.command.shell"}},"match":"(?<!\\\\w)(?<=\\\\G|[\\"')}])([^\\\\t\\\\n\\\\r \\"\\\\&');->\`{|]+)"},{"begin":"(?:\\\\G|(?<![\\\\t\\\\n #\\\\&;{|]))(\\\\$?)((\\")|('))","beginCaptures":{"1":{"name":"meta.statement.command.name.quoted.shell punctuation.definition.string.shell entity.name.function.call.shell entity.name.command.shell"},"2":{},"3":{"name":"meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"},"4":{"name":"meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell"}},"end":"(?<!\\\\G)(?<=\\\\2)","endCaptures":{},"patterns":[{"include":"#continuation_of_single_quoted_command_name"},{"include":"#continuation_of_double_quoted_command_name"}]},{"include":"#line_continuation"},{"include":"#simple_unquoted"}]},"command_statement":{"begin":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"},{"include":"#heredoc"}]},"comment":{"captures":{"1":{"name":"comment.line.number-sign.shell meta.shebang.shell"},"2":{"name":"punctuation.definition.comment.shebang.shell"},"3":{"name":"comment.line.number-sign.shell"},"4":{"name":"punctuation.definition.comment.shell"}},"match":"(?:^|[\\\\t ]++)(?:((#!).*)|((#).*))"},"comments":{"patterns":[{"include":"#block_comment"},{"include":"#line_comment"}]},"compound-command":{"patterns":[{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical-expression"},{"include":"#initial_context"}]},{"begin":"(?<=\\\\s|^)\\\\{(?=\\\\s|$)","beginCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"end":"(?<=^|;)\\\\s*(})","endCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"continuation_of_double_quoted_command_name":{"begin":"\\\\G(?<=\\")","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.double entity.name.function.call entity.name.command","end":"\\"","endCaptures":{"0":{"name":"string.quoted.double.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}},"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"continuation_of_single_quoted_command_name":{"begin":"\\\\G(?<=')","beginCaptures":{},"contentName":"meta.statement.command.name.continuation string.quoted.single entity.name.function.call entity.name.command","end":"'","endCaptures":{"0":{"name":"string.quoted.single.shell punctuation.definition.string.end.shell entity.name.function.call.shell entity.name.command.shell"}}},"custom_command_names":{"patterns":[]},"custom_commands":{"patterns":[]},"double_quote_context":{"patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},"double_quote_escape_char":{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},"floating_keyword":{"patterns":[{"match":"(?<=^|[\\\\t \\\\&;])(?:then|elif|else|done|end|do|if|fi)(?=[\\\\t \\\\&;]|$)","name":"keyword.control.$0.shell"}]},"for_statement":{"patterns":[{"begin":"\\\\b(for)\\\\b[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))[\\\\t ]*+\\\\b(in)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"},"2":{"name":"variable.other.for.shell"},"3":{"name":"keyword.control.in.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.in.shell","patterns":[{"include":"#string"},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},{"begin":"\\\\b(for)\\\\b","beginCaptures":{"1":{"name":"keyword.control.for.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.for.shell","patterns":[{"include":"#arithmetic_double"},{"include":"#normal_context"}]}]},"function_definition":{"applyEndPatternLast":1,"begin":"[\\\\t ]*+(?:\\\\b(function)\\\\b[\\\\t ]*+([^\\\\t\\\\n\\\\r \\"'()=]+)(?:(\\\\()[\\\\t ]*+(\\\\)))?|([^\\\\t\\\\n\\\\r \\"'()=]+)[\\\\t ]*+(\\\\()[\\\\t ]*+(\\\\)))","beginCaptures":{"1":{"name":"storage.type.function.shell"},"2":{"name":"entity.name.function.shell"},"3":{"name":"punctuation.definition.arguments.shell"},"4":{"name":"punctuation.definition.arguments.shell"},"5":{"name":"entity.name.function.shell"},"6":{"name":"punctuation.definition.arguments.shell"},"7":{"name":"punctuation.definition.arguments.shell"}},"end":"(?<=[)}])","endCaptures":{},"name":"meta.function.shell","patterns":[{"match":"\\\\G[\\\\t\\\\n ]"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.group.shell punctuation.section.function.definition.shell"}},"name":"meta.function.body.shell","patterns":[{"include":"#initial_context"}]},{"include":"#initial_context"}]},"heredoc":{"patterns":[{"begin":"((?<!<)<<-)[\\\\t ]*+([\\"'])[\\\\t ]*+([^\\"']+?)(?=[\\"\\\\&';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.indent.$3","end":"^\\\\t*\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.$0.shell"}},"patterns":[]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([\\"'])[\\\\t ]*+([^\\"']+?)(?=[\\"\\\\&';<\\\\s])(\\\\2)(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.quote.shell"},"3":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"4":{"name":"punctuation.definition.string.heredoc.quote.shell"},"5":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.quoted.heredoc.no-indent.$3","end":"^\\\\3(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[]},{"begin":"((?<!<)<<-)[\\\\t ]*+([^\\\\t \\"']+)(?=[\\"\\\\&';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.indent.$2","end":"^\\\\t*\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"((?<!<)<<(?!<))[\\\\t ]*+([^\\\\t \\"']+)(?=[\\"\\\\&';<\\\\s])(.*)","beginCaptures":{"1":{"name":"keyword.operator.heredoc.shell"},"2":{"name":"punctuation.definition.string.heredoc.delimiter.shell"},"3":{"patterns":[{"include":"#redirect_fix"},{"include":"#typical_statements"}]}},"contentName":"string.unquoted.heredoc.no-indent.$2","end":"^\\\\2(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"punctuation.definition.string.heredoc.delimiter.shell"}},"patterns":[{"include":"#double_quote_escape_char"},{"include":"#variable"},{"include":"#interpolation"}]}]},"herestring":{"patterns":[{"begin":"(<<<)\\\\s*(('))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.single.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.single.shell","end":"(')","endCaptures":{"0":{"name":"string.quoted.single.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell"},{"begin":"(<<<)\\\\s*((\\"))","beginCaptures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.quoted.double.shell"},"3":{"name":"punctuation.definition.string.begin.shell"}},"contentName":"string.quoted.double.shell","end":"(\\")","endCaptures":{"0":{"name":"string.quoted.double.shell"},"1":{"name":"punctuation.definition.string.end.shell"}},"name":"meta.herestring.shell","patterns":[{"include":"#double_quote_context"}]},{"captures":{"1":{"name":"keyword.operator.herestring.shell"},"2":{"name":"string.unquoted.herestring.shell","patterns":[{"include":"#initial_context"}]}},"match":"(<<<)\\\\s*(([^)\\\\\\\\\\\\s]|\\\\\\\\.)+)","name":"meta.herestring.shell"}]},"initial_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#logical_expression_double"},{"include":"#logical_expression_single"},{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#loop"},{"include":"#function_definition"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#misc_ranges"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#alias_statement"},{"include":"#normal_statement"},{"include":"#string"},{"include":"#support"}]},"inline_comment":{"captures":{"1":{"name":"comment.block.shell punctuation.definition.comment.begin.shell"},"2":{"name":"comment.block.shell"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.shell punctuation.definition.comment.end.shell"},{"match":"\\\\*","name":"comment.block.shell"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"},"interpolation":{"patterns":[{"include":"#arithmetic_dollar"},{"include":"#subshell_dollar"},{"begin":"\`","beginCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"end":"\`","endCaptures":{"0":{"name":"punctuation.definition.evaluation.backticks.shell"}},"name":"string.interpolated.backtick.shell","patterns":[{"match":"\\\\\\\\[$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"begin":"(?<=\\\\W)(?=#)(?!#\\\\{)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.shell"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.shell"}},"end":"(?=\`)","name":"comment.line.number-sign.shell"}]},{"include":"#initial_context"}]}]},"keyword":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(then|else|elif|fi|for|in|do|done|select|continue|esac|while|until|return)(?=[\\\\&;\\\\s]|$)","name":"keyword.control.shell"},{"match":"(?<=^|[\\\\&;\\\\s])(?:export|declare|typeset|local|readonly)(?=[\\\\&;\\\\s]|$)","name":"storage.modifier.shell"}]},"line_comment":{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.shell"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.shell","patterns":[{"include":"#line_continuation_character"}]},"line_continuation":{"match":"\\\\\\\\(?=\\\\n)","name":"constant.character.escape.line-continuation.shell"},"logical-expression":{"patterns":[{"include":"#arithmetic_no_dollar"},{"match":"=[=~]?|!=?|[<>]|&&|\\\\|\\\\|","name":"keyword.operator.logical.shell"},{"match":"(?<!\\\\S)-(nt|ot|ef|eq|ne|l[et]|g[et]|[GLNOSa-hknopr-uwxz])\\\\b","name":"keyword.operator.logical.shell"}]},"logical_expression_context":{"patterns":[{"include":"#regex_comparison"},{"include":"#arithmetic_no_dollar"},{"include":"#logical-expression"},{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#comment"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"logical_expression_double":{"begin":"\\\\[\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"logical_expression_single":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.logical-expression.shell"}},"name":"meta.scope.logical-expression.shell","patterns":[{"include":"#logical_expression_context"}]},"loop":{"patterns":[{"begin":"(?<=^|[\\\\&;\\\\s])(for)\\\\s+(.+?)\\\\s+(in)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell","patterns":[{"include":"#string"}]},"3":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.for-in-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(while|until)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"}},"end":"(?<=^|[\\\\&;\\\\s])done(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"0":{"name":"keyword.control.shell"}},"name":"meta.scope.while-loop.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])(select)\\\\s+((?:[^\\\\\\\\\\\\s]|\\\\\\\\.)+)(?=[\\\\&;\\\\s]|$)","beginCaptures":{"1":{"name":"keyword.control.shell"},"2":{"name":"variable.other.loop.shell"}},"end":"(?<=^|[\\\\&;\\\\s])(done)(?=[\\\\&;\\\\s]|$|\\\\))","endCaptures":{"1":{"name":"keyword.control.shell"}},"name":"meta.scope.select-block.shell","patterns":[{"include":"#initial_context"}]},{"begin":"(?<=^|[\\\\&;\\\\s])if(?=[\\\\&;\\\\s]|$)","beginCaptures":{"0":{"name":"keyword.control.if.shell"}},"end":"(?<=^|[\\\\&;\\\\s])fi(?=[\\\\&;\\\\s]|$)","endCaptures":{"0":{"name":"keyword.control.fi.shell"}},"name":"meta.scope.if-block.shell","patterns":[{"include":"#initial_context"}]}]},"math":{"patterns":[{"include":"#variable"},{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":";","name":"punctuation.separator.semicolon.range"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"},{"match":"(?<!\\\\w)[0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"}]},"math_operators":{"patterns":[{"match":"\\\\+{1,2}|-{1,2}|[!~]|\\\\*{1,2}|[%/]|<[<=]?|>[=>]?|==|!=|^|\\\\|{1,2}|&{1,2}|[,:=?]|[-%\\\\&*+/^|]=|<<=|>>=","name":"keyword.operator.arithmetic.shell"},{"match":"0[Xx]\\\\h+","name":"constant.numeric.hex.shell"},{"match":"0\\\\d+","name":"constant.numeric.octal.shell"},{"match":"\\\\d{1,2}#[0-9@-Z_a-z]+","name":"constant.numeric.other.shell"},{"match":"\\\\d+","name":"constant.numeric.integer.shell"}]},"misc_ranges":{"patterns":[{"include":"#logical_expression_single"},{"include":"#logical_expression_double"},{"include":"#subshell_dollar"},{"begin":"(?<![^\\\\t ])(\\\\{)(?![$\\\\w])","beginCaptures":{"1":{"name":"punctuation.definition.group.shell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.group.shell"}},"name":"meta.scope.group.shell","patterns":[{"include":"#initial_context"}]}]},"modified_assignment_statement":{"begin":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","beginCaptures":{"0":{"name":"storage.modifier.$0.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell meta.expression.assignment.modified.shell","patterns":[{"match":"(?<!\\\\w)-\\\\w+\\\\b","name":"string.unquoted.argument.shell constant.other.option.shell"},{"include":"#array_value"},{"captures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"},"9":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"10":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"11":{"name":"constant.numeric.shell constant.numeric.other.shell"},"12":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"13":{"name":"constant.numeric.shell constant.numeric.version.shell"},"14":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))?(?:(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}]))?"},{"include":"#normal_context"}]},"modifiers":{"match":"(?<=^|[\\\\t \\\\&;])(?:readonly|declare|typeset|export|local)(?=[\\\\t \\\\&;]|$)","name":"storage.modifier.$0.shell"},"normal_assignment_statement":{"begin":"[\\\\t ]*+((?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w))(?:(\\\\[)((?:(?:\\\\$?(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)|@)|\\\\*)|(-?\\\\d+))(]))?(?:(?:(=)|(\\\\+=))|(-=))","beginCaptures":{"1":{"name":"variable.other.assignment.shell"},"2":{"name":"punctuation.definition.array.access.shell"},"3":{"name":"variable.other.assignment.shell"},"4":{"name":"constant.numeric.shell constant.numeric.integer.shell"},"5":{"name":"punctuation.definition.array.access.shell"},"6":{"name":"keyword.operator.assignment.shell"},"7":{"name":"keyword.operator.assignment.compound.shell"},"8":{"name":"keyword.operator.assignment.compound.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.expression.assignment.shell","patterns":[{"include":"#comment"},{"include":"#string"},{"include":"#normal_assignment_statement"},{"begin":"(?<=[\\\\t ])(?![\\\\t ]|\\\\w+=)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.command.env.shell","patterns":[{"include":"#command_name_range"},{"include":"#line_continuation"},{"include":"#option"},{"include":"#argument"},{"include":"#string"}]},{"include":"#simple_unquoted"},{"include":"#normal_context"}]},"normal_context":{"patterns":[{"include":"#comment"},{"include":"#pipeline"},{"include":"#normal_statement_seperator"},{"include":"#misc_ranges"},{"include":"#boolean"},{"include":"#redirect_number"},{"include":"#numeric_literal"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"},{"include":"#parenthese"}]},"normal_statement":{"begin":"(?!^[\\\\t ]*+$)(?:(?<=(?:^until| until|\\\\tuntil|^while| while|\\\\twhile|^elif| elif|\\\\telif|^else| else|\\\\telse|^then| then|\\\\tthen|^do| do|\\\\tdo|^if| if|\\\\tif) )|(?<=^|[!\\\\&(;\`{|]))[\\\\t ]*+(?!nocorrect\\\\W|nocorrect\\\\$|function\\\\W|function\\\\$|foreach\\\\W|foreach\\\\$|repeat\\\\W|repeat\\\\$|logout\\\\W|logout\\\\$|coproc\\\\W|coproc\\\\$|select\\\\W|select\\\\$|while\\\\W|while\\\\$|pushd\\\\W|pushd\\\\$|until\\\\W|until\\\\$|case\\\\W|case\\\\$|done\\\\W|done\\\\$|elif\\\\W|elif\\\\$|else\\\\W|else\\\\$|esac\\\\W|esac\\\\$|popd\\\\W|popd\\\\$|then\\\\W|then\\\\$|time\\\\W|time\\\\$|for\\\\W|for\\\\$|end\\\\W|end\\\\$|fi\\\\W|fi\\\\$|do\\\\W|do\\\\$|in\\\\W|in\\\\$|if\\\\W|if\\\\$)","beginCaptures":{},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.statement.shell","patterns":[{"include":"#typical_statements"}]},"normal_statement_seperator":{"captures":{"1":{"name":"punctuation.terminator.statement.semicolon.shell"},"2":{"name":"punctuation.separator.statement.and.shell"},"3":{"name":"punctuation.separator.statement.or.shell"},"4":{"name":"punctuation.separator.statement.background.shell"}},"match":"(?:(?:(;)|(&&))|(\\\\|\\\\|))|(&)"},"numeric_literal":{"captures":{"1":{"name":"constant.numeric.shell constant.numeric.hex.shell"},"2":{"name":"constant.numeric.shell constant.numeric.octal.shell"},"3":{"name":"constant.numeric.shell constant.numeric.other.shell"},"4":{"name":"constant.numeric.shell constant.numeric.decimal.shell"},"5":{"name":"constant.numeric.shell constant.numeric.version.shell"},"6":{"name":"constant.numeric.shell constant.numeric.integer.shell"}},"match":"(?<=[\\\\t =]|^|[(\\\\[{])(?:(?:(?:(?:(?:(0[Xx]\\\\h+)|(0\\\\d+))|(\\\\d{1,2}#[0-9@-Z_a-z]+))|(-?\\\\d+\\\\.\\\\d+))|(-?\\\\d+(?:\\\\.\\\\d+)+))|(-?\\\\d+))(?=[\\\\t ]|$|[);}])"},"option":{"begin":"[\\\\t ]++(-)((?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;]))","beginCaptures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"contentName":"string.unquoted.argument constant.other.option","end":"(?=[\\\\t ])|(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"patterns":[{"include":"#option_context"}]},"option_context":{"patterns":[{"include":"#misc_ranges"},{"include":"#string"},{"include":"#variable"},{"include":"#interpolation"},{"include":"#heredoc"},{"include":"#herestring"},{"include":"#redirection"},{"include":"#pathname"},{"include":"#floating_keyword"},{"include":"#support"}]},"parenthese":{"patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parenthese.shell"}},"name":"meta.parenthese.group.shell","patterns":[{"include":"#initial_context"}]}]},"pathname":{"patterns":[{"match":"(?<=[:=\\\\s]|^)~","name":"keyword.operator.tilde.shell"},{"match":"[*?]","name":"keyword.operator.glob.shell"},{"begin":"([!*+?@])(\\\\()","beginCaptures":{"1":{"name":"keyword.operator.extglob.shell"},"2":{"name":"punctuation.definition.extglob.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.extglob.shell"}},"name":"meta.structure.extglob.shell","patterns":[{"include":"#initial_context"}]}]},"pipeline":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])(time)(?=[\\\\&;\\\\s]|$)","name":"keyword.other.shell"},{"match":"[!|]","name":"keyword.operator.pipe.shell"}]},"redirect_fix":{"captures":{"1":{"name":"keyword.operator.redirect.shell"},"2":{"name":"string.unquoted.argument.shell"}},"match":"(>>?)[\\\\t ]*+([^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\\`|]+)"},"redirect_number":{"captures":{"1":{"name":"keyword.operator.redirect.stdout.shell"},"2":{"name":"keyword.operator.redirect.stderr.shell"},"3":{"name":"keyword.operator.redirect.$3.shell"}},"match":"(?<=[\\\\t ])(?:(1)|(2)|(\\\\d+))(?=>)"},"redirection":{"patterns":[{"begin":"[<>]\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.interpolated.process-substitution.shell","patterns":[{"include":"#initial_context"}]},{"match":"(?<![<>])(&>|\\\\d*>&\\\\d*|\\\\d*(>>|[<>])|\\\\d*<&|\\\\d*<>)(?![<>])","name":"keyword.operator.redirect.shell"}]},"regex_comparison":{"match":"=~","name":"keyword.operator.logical.regex.shell"},"regexp":{"patterns":[{"match":".+"}]},"simple_options":{"captures":{"0":{"patterns":[{"captures":{"1":{"name":"string.unquoted.argument.shell constant.other.option.dash.shell"},"2":{"name":"string.unquoted.argument.shell constant.other.option.shell"}},"match":"[\\\\t ]++(-)(\\\\w+)"}]}},"match":"(?:[\\\\t ]++-\\\\w+)*"},"simple_unquoted":{"match":"[^\\\\t\\\\n \\"$\\\\&-);<>\\\\\\\\\`|]","name":"string.unquoted.shell"},"special_expansion":{"match":"!|:[-=?]?|[*@]|##?|%%|[%/]","name":"keyword.operator.expansion.shell"},"start_of_command":{"match":"[\\\\t ]*+(?![\\\\n!#\\\\&()<>\\\\[{|]|$|[\\\\t ;])(?!nocorrect |nocorrect\\\\t|nocorrect$|readonly |readonly\\\\t|readonly$|function |function\\\\t|function$|foreach |foreach\\\\t|foreach$|coproc |coproc\\\\t|coproc$|logout |logout\\\\t|logout$|export |export\\\\t|export$|select |select\\\\t|select$|repeat |repeat\\\\t|repeat$|pushd |pushd\\\\t|pushd$|until |until\\\\t|until$|while |while\\\\t|while$|local |local\\\\t|local$|case |case\\\\t|case$|done |done\\\\t|done$|elif |elif\\\\t|elif$|else |else\\\\t|else$|esac |esac\\\\t|esac$|popd |popd\\\\t|popd$|then |then\\\\t|then$|time |time\\\\t|time$|for |for\\\\t|for$|end |end\\\\t|end$|fi |fi\\\\t|fi$|do |do\\\\t|do$|in |in\\\\t|in$|if |if\\\\t|if$)(?!\\\\\\\\\\\\n?$)"},"string":{"patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.shell"},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.shell"},{"begin":"\\\\$?\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.double.shell","patterns":[{"match":"\\\\\\\\[\\\\n\\"$\\\\\\\\\`]","name":"constant.character.escape.shell"},{"include":"#variable"},{"include":"#interpolation"}]},{"begin":"\\\\$'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.shell"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.shell"}},"name":"string.quoted.single.dollar.shell","patterns":[{"match":"\\\\\\\\['\\\\\\\\abefnrtv]","name":"constant.character.escape.ansi-c.shell"},{"match":"\\\\\\\\[0-9]{3}\\"","name":"constant.character.escape.octal.shell"},{"match":"\\\\\\\\x\\\\h{2}\\"","name":"constant.character.escape.hex.shell"},{"match":"\\\\\\\\c.\\"","name":"constant.character.escape.control-char.shell"}]}]},"subshell_dollar":{"patterns":[{"begin":"\\\\$\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.subshell.single.shell"}},"name":"meta.scope.subshell","patterns":[{"include":"#parenthese"},{"include":"#initial_context"}]}]},"support":{"patterns":[{"match":"(?<=^|[\\\\&;\\\\s])[.:](?=[\\\\&;\\\\s]|$)","name":"support.function.builtin.shell"}]},"typical_statements":{"patterns":[{"include":"#assignment_statement"},{"include":"#case_statement"},{"include":"#for_statement"},{"include":"#while_statement"},{"include":"#function_definition"},{"include":"#command_statement"},{"include":"#line_continuation"},{"include":"#arithmetic_double"},{"include":"#normal_context"}]},"variable":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.all.shell"},"2":{"name":"variable.parameter.positional.all.shell"}},"match":"(\\\\$)(@(?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"variable.parameter.positional.shell"}},"match":"(\\\\$)([0-9](?!\\\\w))"},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.language.special.shell"},"2":{"name":"variable.language.special.shell"}},"match":"(\\\\$)([-!#$*0?_](?!\\\\w))"},{"begin":"(\\\\$)(\\\\{)[\\\\t ]*+(?=\\\\d)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell variable.parameter.positional.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"[0-9]+","name":"variable.parameter.positional.shell"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"begin":"(\\\\$)(\\\\{)","beginCaptures":{"1":{"name":"punctuation.definition.variable.shell"},"2":{"name":"punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell"}},"contentName":"meta.parameter-expansion","end":"}","endCaptures":{"0":{"name":"punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell"}},"patterns":[{"include":"#special_expansion"},{"include":"#array_access_inline"},{"match":"(?<!\\\\w)[-0-9A-Z_a-z]+(?!\\\\w)","name":"variable.other.normal.shell"},{"include":"#variable"},{"include":"#string"}]},{"captures":{"1":{"name":"punctuation.definition.variable.shell variable.other.normal.shell"},"2":{"name":"variable.other.normal.shell"}},"match":"(\\\\$)(\\\\w+(?!\\\\w))"}]},"while_statement":{"patterns":[{"begin":"\\\\b(while)\\\\b","beginCaptures":{"1":{"name":"keyword.control.while.shell"}},"end":"(?=[\\\\n\\\\&);\`{|}]|[\\\\t ]*#|])(?<!\\\\\\\\)","endCaptures":{},"name":"meta.while.shell","patterns":[{"include":"#line_continuation"},{"include":"#math_operators"},{"include":"#option"},{"include":"#simple_unquoted"},{"include":"#normal_context"},{"include":"#string"}]}]}},"scopeName":"source.shell","aliases":["bash","sh","shell","zsh"]}`))];export{e as default};
@@ -0,0 +1 @@
1
+ import{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{V as r}from"./button-D5kdANef.js";import{t as i}from"./Globe.es-C1pgZCGM.js";var a=n(e(),1),o=new Map([[`bold`,a.createElement(a.Fragment,null,a.createElement(`path`,{d:`M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36Zm-4,24V84H44V60ZM44,196V108H212v88Z`}))],[`duotone`,a.createElement(a.Fragment,null,a.createElement(`path`,{d:`M224,56V96H32V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z`,opacity:`0.2`}),a.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V88H40V56Zm0,144H40V104H216v96Z`}))],[`fill`,a.createElement(a.Fragment,null,a.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V88H40V56Z`}))],[`light`,a.createElement(a.Fragment,null,a.createElement(`path`,{d:`M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V90H38V56A2,2,0,0,1,40,54ZM216,202H40a2,2,0,0,1-2-2V102H218v98A2,2,0,0,1,216,202Z`}))],[`regular`,a.createElement(a.Fragment,null,a.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V88H40V56Zm0,144H40V104H216v96Z`}))],[`thin`,a.createElement(a.Fragment,null,a.createElement(`path`,{d:`M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4V92H36V56A4,4,0,0,1,40,52ZM216,204H40a4,4,0,0,1-4-4V100H220V200A4,4,0,0,1,216,204Z`}))]]),s=a.forwardRef((e,t)=>a.createElement(r,{ref:t,...e,weights:o}));s.displayName=`BrowserIcon`;var c=new Map,l=t();function u({icon:e,public:t}){let n=e===void 0?void 0:c.get(e);return n?(0,l.jsx)(n,{strokeWidth:1.5,"aria-hidden":`true`}):t?(0,l.jsx)(i,{"aria-hidden":`true`}):(0,l.jsx)(s,{"aria-hidden":`true`})}export{u as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./engine-CBuzy-Ik.js";import{A as t,Fr as n,Zt as r,ri as i}from"./queries-DGlVu9wp.js";import{$ as a,Tt as o,et as s,s as c}from"./common-DHOhx6Zn.js";import{B as l,K as u,o as d}from"./kit-n8CE0xEs.js";import{a as f,i as p,n as m,o as h,r as g,t as _}from"./table-B81tv0LG.js";import{t as v}from"./site-icon-1Mcc1UIb.js";var y=e(),b=e=>new Map(e.sites.filter(e=>e.public).map(e=>[e.name,e]));function x(){let e=s(),{data:a}=r({...t(),select:b});return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(c,{count:e.length}),(0,y.jsx)(l,{className:`gap-0 py-0`,children:e.length===0?(0,y.jsxs)(d,{className:`border-0`,title:`This repo has no sites`,children:[`A site is a folder of pages, `,(0,y.jsx)(`code`,{children:`sites/<name>/routes/`}),`, beside the config.`]}):(0,y.jsxs)(_,{children:[(0,y.jsx)(f,{children:(0,y.jsxs)(h,{children:[(0,y.jsx)(p,{children:`Site`}),(0,y.jsx)(p,{children:`Pages`}),(0,y.jsx)(p,{children:`Public at`}),(0,y.jsx)(p,{children:`Languages`})]})}),(0,y.jsx)(m,{children:e.map(({name:e,app:t,title:r,icon:o,pages:s})=>(0,y.jsxs)(h,{children:[(0,y.jsx)(g,{className:`align-top font-medium`,children:(0,y.jsxs)(`div`,{className:`flex items-center gap-2 [&_svg]:size-4`,children:[(0,y.jsx)(v,{icon:o,public:a.has(e)}),s[0]?(0,y.jsx)(i,{to:s[0].to,children:r}):r,t&&(0,y.jsx)(u,{variant:`secondary`,children:t}),(0,y.jsx)(`code`,{className:`text-xs font-normal text-muted-foreground`,children:n(e)})]})}),(0,y.jsx)(g,{className:`align-top whitespace-normal`,children:(0,y.jsx)(`ul`,{"aria-label":`${r}'s pages`,className:`flex flex-wrap gap-x-3 gap-y-1`,children:s.map(({to:e,label:t})=>(0,y.jsx)(`li`,{children:(0,y.jsx)(i,{to:e,children:t})},e))})}),(0,y.jsx)(g,{className:`align-top`,children:a.has(e)?(0,y.jsx)(S,{site:a.get(e)}):(0,y.jsx)(`span`,{className:`text-muted-foreground`,children:`In the app only`})}),(0,y.jsx)(g,{className:`align-top`,children:(0,y.jsx)(C,{locales:a.get(e)?.locales})})]},e))})]})})]})}function S({site:e}){let t=a(e);return t?(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,y.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[new URL(t).host,(0,y.jsx)(o,{"aria-hidden":`true`,className:`size-3.5`})]}),(0,y.jsx)(`a`,{href:new URL(`sitemap.xml`,t).href,target:`_blank`,rel:`noreferrer`,className:`text-muted-foreground`,children:`Sitemap`})]}):(0,y.jsx)(`span`,{className:`text-muted-foreground`,children:`Public`})}function C({locales:e}){return e?(0,y.jsx)(`ul`,{"aria-label":`Languages`,className:`flex flex-wrap gap-x-3 gap-y-1`,children:e.map((e,t)=>(0,y.jsxs)(`li`,{children:[(0,y.jsx)(`code`,{children:e}),t===0&&(0,y.jsx)(`span`,{className:`text-muted-foreground`,children:` default`})]},e))}):(0,y.jsx)(`span`,{className:`text-muted-foreground`,children:`One`})}export{x as component};
@@ -0,0 +1 @@
1
+ import{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{V as r}from"./button-D5kdANef.js";import{t as i}from"./utils-BRvE9-Fo.js";var a=n(e(),1),o=new Map([[`bold`,a.createElement(a.Fragment,null,a.createElement(`path`,{d:`M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z`}))],[`duotone`,a.createElement(a.Fragment,null,a.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),a.createElement(`path`,{d:`M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z`}))],[`fill`,a.createElement(a.Fragment,null,a.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,176A72,72,0,0,1,92,65.64a8,8,0,0,1,8,13.85,56,56,0,1,0,56,0,8,8,0,0,1,8-13.85A72,72,0,0,1,128,200Z`}))],[`light`,a.createElement(a.Fragment,null,a.createElement(`path`,{d:`M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z`}))],[`regular`,a.createElement(a.Fragment,null,a.createElement(`path`,{d:`M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z`}))],[`thin`,a.createElement(a.Fragment,null,a.createElement(`path`,{d:`M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z`}))]]),s=a.forwardRef((e,t)=>a.createElement(r,{ref:t,...e,weights:o}));s.displayName=`CircleNotchIcon`;var c=t();function l({className:e,...t}){return(0,c.jsx)(s,{"aria-hidden":`false`,"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:i(`size-4 animate-spin`,e),...t})}export{s as n,l as t};
@@ -0,0 +1 @@
1
+ var e=[Object.freeze(JSON.parse(`{"displayName":"SQL","name":"sql","patterns":[{"match":"((?<!@)@)\\\\b(\\\\w+)\\\\b","name":"text.variable"},{"applyEndPatternLast":1,"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.bracket.begin.sql"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.bracket.end.sql"}},"name":"text.bracketed","patterns":[{"match":"\\\\[|]]","name":"constant.character.bracket.sql"}]},{"include":"#comments"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.sql"},"5":{"name":"entity.name.function.sql"}},"match":"(?i:^\\\\s*(create(?:\\\\s+or\\\\s+replace)?)\\\\s+(aggregate|conversion|database|domain|function|group|(unique\\\\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\\\s+)([\\"'\`]?)(\\\\w+)\\\\4","name":"meta.create.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.sql"}},"match":"(?i:^\\\\s*(drop)\\\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))","name":"meta.drop.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.table.sql"},"3":{"name":"entity.name.function.sql"},"4":{"name":"keyword.other.cascade.sql"}},"match":"(?i:\\\\s*(drop)\\\\s+(table)\\\\s+(\\\\w+)(\\\\s+cascade)?\\\\b)","name":"meta.drop.sql"},{"captures":{"1":{"name":"keyword.other.create.sql"},"2":{"name":"keyword.other.table.sql"}},"match":"(?i:^\\\\s*(alter)\\\\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|proc(edure)?|rule|schema|sequence|table|tablespace|trigger|type|user|view)\\\\s+)","name":"meta.alter.sql"},{"captures":{"1":{"name":"storage.type.sql"},"2":{"name":"storage.type.sql"},"3":{"name":"constant.numeric.sql"},"4":{"name":"storage.type.sql"},"5":{"name":"constant.numeric.sql"},"6":{"name":"storage.type.sql"},"7":{"name":"constant.numeric.sql"},"8":{"name":"constant.numeric.sql"},"9":{"name":"storage.type.sql"},"10":{"name":"constant.numeric.sql"},"11":{"name":"storage.type.sql"},"12":{"name":"storage.type.sql"},"13":{"name":"storage.type.sql"},"14":{"name":"constant.numeric.sql"},"15":{"name":"storage.type.sql"}},"match":"(?i)\\\\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\\\\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\\\\b|\\\\b(bit\\\\svarying|character\\\\s(?:varying)?|tinyint|var\\\\schar|float|interval)\\\\((\\\\d+)\\\\)|\\\\b(char|number|varchar\\\\d?)\\\\b(?:\\\\((\\\\d+)\\\\))?|\\\\b(numeric|decimal)\\\\b(?:\\\\((\\\\d+),(\\\\d+)\\\\))?|\\\\b(times?)\\\\b(?:\\\\((\\\\d+)\\\\))?(\\\\swith(?:out)?\\\\stime\\\\szone\\\\b)?|\\\\b(timestamp)(s|tz)?\\\\b(?:\\\\((\\\\d+)\\\\))?(\\\\s(with(?:|out))\\\\stime\\\\szone\\\\b)?"},{"match":"(?i:\\\\b((?:primary|foreign)\\\\s+key|references|on\\\\s+(delete|update)(\\\\s+cascade)?|nocheck|check|constraint|collate|default)\\\\b)","name":"storage.modifier.sql"},{"match":"\\\\b\\\\d+\\\\b","name":"constant.numeric.sql"},{"match":"(?i:\\\\b(select(\\\\s+(all|distinct))?|insert\\\\s+(ignore\\\\s+)?into|update|delete|from|set|where|group\\\\s+by|or|like|and|union(\\\\s+all)?|having|order\\\\s+by|limit|cross\\\\s+join|join|straight_join|(inner|(left|right|full)(\\\\s+outer)?)\\\\s+join|natural(\\\\s+(inner|(left|right|full)(\\\\s+outer)?))?\\\\s+join)\\\\b)","name":"keyword.other.DML.sql"},{"match":"(?i:\\\\b(on|off|((is\\\\s+)?not\\\\s+)?null)\\\\b)","name":"keyword.other.DDL.create.II.sql"},{"match":"(?i:\\\\bvalues\\\\b)","name":"keyword.other.DML.II.sql"},{"match":"(?i:\\\\b(begin(\\\\s+work)?|start\\\\s+transaction|commit(\\\\s+work)?|rollback(\\\\s+work)?)\\\\b)","name":"keyword.other.LUW.sql"},{"match":"(?i:\\\\b(grant(\\\\swith\\\\sgrant\\\\soption)?|revoke)\\\\b)","name":"keyword.other.authorization.sql"},{"match":"(?i:\\\\bin\\\\b)","name":"keyword.other.data-integrity.sql"},{"match":"(?i:^\\\\s*(comment\\\\s+on\\\\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\\\\s+)","name":"keyword.other.object-comments.sql"},{"match":"(?i)\\\\bAS\\\\b","name":"keyword.other.alias.sql"},{"match":"(?i)\\\\b(DESC|ASC)\\\\b","name":"keyword.other.order.sql"},{"match":"\\\\*","name":"keyword.operator.star.sql"},{"match":"[!<>]?=|<>|[<>]","name":"keyword.operator.comparison.sql"},{"match":"[-+/]","name":"keyword.operator.math.sql"},{"match":"\\\\|\\\\|","name":"keyword.operator.concatenator.sql"},{"captures":{"1":{"name":"support.function.aggregate.sql"}},"match":"(?i)\\\\b(approx_count_distinct|approx_percentile_cont|approx_percentile_disc|avg|checksum_agg|count|count_big|group|grouping|grouping_id|max|min|sum|stdevp??|varp??)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.analytic.sql"}},"match":"(?i)\\\\b(cume_dist|first_value|lag|last_value|lead|percent_rank|percentile_cont|percentile_disc)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.bitmanipulation.sql"}},"match":"(?i)\\\\b((?:bit_coun|get_bi|left_shif|right_shif|set_bi)t)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.conversion.sql"}},"match":"(?i)\\\\b(cast|convert|parse|try_cast|try_convert|try_parse)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.collation.sql"}},"match":"(?i)\\\\b(collationproperty|tertiary_weights)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cryptographic.sql"}},"match":"(?i)\\\\b(asymkey_id|asymkeyproperty|certproperty|cert_id|crypt_gen_random|decryptbyasymkey|decryptbycert|decryptbykey|decryptbykeyautoasymkey|decryptbykeyautocert|decryptbypassphrase|encryptbyasymkey|encryptbycert|encryptbykey|encryptbypassphrase|hashbytes|is_objectsigned|key_guid|key_id|key_name|signbyasymkey|signbycert|symkeyproperty|verifysignedbycert|verifysignedbyasymkey)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.cursor.sql"}},"match":"(?i)\\\\b(cursor_status)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datetime.sql"}},"match":"(?i)\\\\b(sysdatetime|sysdatetimeoffset|sysutcdatetime|current_time(stamp)?|getdate|getutcdate|datename|datepart|day|month|year|datefromparts|datetime2fromparts|datetimefromparts|datetimeoffsetfromparts|smalldatetimefromparts|timefromparts|datediff|dateadd|datetrunc|eomonth|switchoffset|todatetimeoffset|isdate|date_bucket)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.datatype.sql"}},"match":"(?i)\\\\b(datalength|ident_current|ident_incr|ident_seed|identity|sql_variant_property)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.expression.sql"}},"match":"(?i)\\\\b(coalesce|nullif)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.globalvar.sql"}},"match":"(?<!@)@@(?i)\\\\b(cursor_rows|connections|cpu_busy|datefirst|dbts|error|fetch_status|identity|idle|io_busy|langid|language|lock_timeout|max_connections|max_precision|nestlevel|options|packet_errors|pack_received|pack_sent|procid|remserver|rowcount|servername|servicename|spid|textsize|timeticks|total_errors|total_read|total_write|trancount|version)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.json.sql"}},"match":"(?i)\\\\b(json|isjson|json_object|json_array|json_value|json_query|json_modify|json_path_exists)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.logical.sql"}},"match":"(?i)\\\\b(choose|iif|greatest|least)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.mathematical.sql"}},"match":"(?i)\\\\b(abs|acos|asin|atan|atn2|ceiling|cos|cot|degrees|exp|floor|log|log10|pi|power|radians|rand|round|sign|sin|sqrt|square|tan)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.metadata.sql"}},"match":"(?i)\\\\b(app_name|applock_mode|applock_test|assemblyproperty|col_length|col_name|columnproperty|database_principal_id|databasepropertyex|db_id|db_name|file_id|file_idex|file_name|filegroup_id|filegroup_name|filegroupproperty|fileproperty|fulltextcatalogproperty|fulltextserviceproperty|index_col|indexkey_property|indexproperty|object_definition|object_id|object_name|object_schema_name|objectproperty|objectpropertyex|original_db_name|parsename|schema_id|schema_name|scope_identity|serverproperty|stats_date|type_id|type_name|typeproperty)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.ranking.sql"}},"match":"(?i)\\\\b(rank|dense_rank|ntile|row_number)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.rowset.sql"}},"match":"(?i)\\\\b(generate_series|opendatasource|openjson|openrowset|openquery|openxml|predict|string_split)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.security.sql"}},"match":"(?i)\\\\b(certencoded|certprivatekey|current_user|database_principal_id|has_perms_by_name|is_member|is_rolemember|is_srvrolemember|original_login|permissions|pwdcompare|pwdencrypt|schema_id|schema_name|session_user|suser_id|suser_sid|suser_sname|system_user|suser_name|user_id|user_name)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.string.sql"}},"match":"(?i)\\\\b(ascii|char|charindex|concat|difference|format|left|len|lower|ltrim|nchar|nodes|patindex|quotename|replace|replicate|reverse|right|rtrim|soundex|space|str|string_agg|string_escape|string_split|stuff|substring|translate|trim|unicode|upper)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.system.sql"}},"match":"(?i)\\\\b(binary_checksum|checksum|compress|connectionproperty|context_info|current_request_id|current_transaction_id|decompress|error_line|error_message|error_number|error_procedure|error_severity|error_state|formatmessage|get_filestream_transaction_context|getansinull|host_id|host_name|isnull|isnumeric|min_active_rowversion|newid|newsequentialid|rowcount_big|session_context|session_id|xact_state)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.textimage.sql"}},"match":"(?i)\\\\b(patindex|textptr|textvalid)\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"support.function.vector.sql"}},"match":"(?i)\\\\b(vector_(?:distance|norm|normalize))\\\\b\\\\s*\\\\("},{"captures":{"1":{"name":"constant.other.database-name.sql"},"2":{"name":"constant.other.table-name.sql"}},"match":"(\\\\w+?)\\\\.(\\\\w+)"},{"include":"#strings"},{"include":"#regexps"},{"match":"\\\\b(?i)(abort|abort_after_wait|absent|absolute|accent_sensitivity|acceptable_cursopt|acp|action|activation|add|address|admin|aes_128|aes_192|aes_256|affinity|after|aggregate|algorithm|all_constraints|all_errormsgs|all_indexes|all_levels|all_results|allow_connections|allow_dup_row|allow_encrypted_value_modifications|allow_page_locks|allow_row_locks|allow_snapshot_isolation|alter|altercolumn|always|anonymous|ansi_defaults|ansi_null_default|ansi_null_dflt_off|ansi_null_dflt_on|ansi_nulls|ansi_padding|ansi_warnings|appdomain|append|application|apply|arithabort|arithignore|array|assembly|asymmetric|asynchronous_commit|at|atan2|atomic|attach|attach_force_rebuild_log|attach_rebuild_log|audit|auth_realm|authentication|auto|auto_cleanup|auto_close|auto_create_statistics|auto_drop|auto_shrink|auto_update_statistics|auto_update_statistics_async|automated_backup_preference|automatic|autopilot|availability|availability_mode|backup|backup_priority|base64|basic|batches|batchsize|before|between|bigint|binary|binding|bit|block|blockers|blocksize|bmk|both|break|broker|broker_instance|bucket_count|buffer|buffercount|bulk_logged|by|call|caller|card|case|catalog|catch|cert|certificate|change_retention|change_tracking|change_tracking_context|changes|char|character|character_set|check_expiration|check_policy|checkconstraints|checkindex|checkpoint|checksum|cleanup_policy|clear|clear_port|close|clustered|codepage|collection|column_encryption_key|column_master_key|columnstore|columnstore_archive|colv_80_to_100|colv_100_to_80|commit_differential_base|committed|compatibility_level|compress_all_row_groups|compression|compression_delay|concat_null_yields_null|concatenate|configuration|connect|connection|containment|continue|continue_after_error|contract|contract_name|control|conversation|conversation_group_id|conversation_handle|copy|copy_only|count_rows|counter|create(\\\\\\\\s+or\\\\\\\\s+alter)?|credential|cross|cryptographic|cryptographic_provider|cube|cursor|cursor_close_on_commit|cursor_default|data|data_compression|data_flush_interval_seconds|data_mirroring|data_purity|data_source|database|database_name|database_snapshot|datafiletype|date_correlation_optimization|date|datefirst|dateformat|date_format|datetime2??|datetimeoffset|day(s)?|db_chaining|dbid|dbidexec|dbo_only|deadlock_priority|deallocate|dec|decimal|declare|decrypt|decrypt_a|decryption|default_database|default_fulltext_language|default_language|default_logon_domain|default_schema|definition|delay|delayed_durability|delimitedtext|density_vector|dependent|des|description|desired_state|desx|differential|digest|disable|disable_broker|disable_def_cnst_chk|disabled|disk|distinct|distributed|distribution|drop|drop_existing|dts_buffers|dump|durability|dynamic|edition|elements|else|emergency|empty|enable|enable_broker|enabled|encoding|encrypted|encrypted_value|encryption|encryption_type|end|endpoint|endpoint_url|enhancedintegrity|entry|error_broker_conversations|errorfile|estimateonly|event|except|exec|executable|execute|exists|expand|expiredate|expiry_date|explicit|external|external_access|failover|failover_mode|failure_condition_level|fast|fast_forward|fastfirstrow|federated_service_account|fetch|field_terminator|fieldterminator|file|filelistonly|filegroup|filegrowth|filename|filestream|filestream_log|filestream_on|filetable|file_format|filter|first_row|fips_flagger|fire_triggers|first|firstrow|float|flush_interval_seconds|fmtonly|following|for|force|force_failover_allow_data_loss|force_service_allow_data_loss|forced|forceplan|formatfile|format_options|format_type|formsof|forward_only|free_cursors|free_exec_context|fullscan|fulltext|fulltextall|fulltextkey|function|generated|get|geography|geometry|global|go|goto|governor|guid|hadoop|hardening|hash|hashed|header_limit|headeronly|health_check_timeout|hidden|hierarchyid|histogram|histogram_steps|hits_cursors|hits_exec_context|hour(s)?|http|identity|identity_value|if|ifnull|ignore|ignore_constraints|ignore_dup_key|ignore_dup_row|ignore_triggers|image|immediate|implicit_transactions|include|include_null_values|incremental|index|inflectional|init|initiator|insensitive|insert|instead|int|integer|integrated|intersect|intermediate|interval_length_minutes|into|inuse_cursors|inuse_exec_context|io|is|isabout|iso_week|isolation|job_tracker_location|json|keep|keep_nulls|keep_replication|keepdefaults|keepfixed|keepidentity|keepnulls|kerberos|key|key_path|key_source|key_store_provider_name|keyset|kill|kilobytes_per_batch|labelonly|langid|language|last|lastrow|leading|legacy_cardinality_estimation|length|level|lifetime|lineage_80_to_100|lineage_100_to_80|listener_ip|listener_port|load|loadhistory|lob_compaction|local|local_service_name|locate|location|lock_escalation|lock_timeout|lockres|log|login|login_type|loop|manual|mark_in_use_for_removal|masked|master|match|matched|max_queue_readers|max_duration|max_outstanding_io_per_volume|maxdop|maxerrors|maxlength|maxtransfersize|max_plans_per_query|max_storage_size_mb|mediadescription|medianame|mediapassword|memogroup|memory_optimized|merge|message|message_forward_size|message_forwarding|microsecond|millisecond|minute(s)?|mirror_address|misses_cursors|misses_exec_context|mixed|modify|money|month|move|multi_user|must_change|name|namespace|nanosecond|native|native_compilation|nchar|ncharacter|nested_triggers|never|new_account|new_broker|newname|next|no|no_browsetable|no_checksum|no_compression|no_infomsgs|no_triggers|no_truncate|nocount|noexec|noexpand|noformat|noinit|nolock|nonatomic|nonclustered|nondurable|none|norecompute|norecovery|noreset|norewind|noskip|not|notification|nounload|now|nowait|ntext|ntlm|nulls|numeric|numeric_roundabort|nvarchar|object|objid|oem|offline|old_account|online|operation_mode|open|openjson|optimistic|option|orc|out|outer|output|over|override|owner|ownership|pad_index|page|page_checksum|page_verify|pagecount|paglock|param|parameter_sniffing|parameter_type_expansion|parameterization|parquet|parseonly|partial|partition|partner|password|path|pause|percentage|permission_set|persisted|period|physical_only|plan_forcing_mode|policy|pool|population|ports|preceding|precision|predicate|presume_abort|primary|primary_role|print|prior|priority |priority_level|private|proc(edure)?|procedure_name|profile|provider|quarter|query_capture_mode|query_governor_cost_limit|query_optimizer_hotfixes|query_store|queue|quoted_identifier|raiserror|range|raw|rcfile|rc2|rc4|rc4_128|rdbms|read_committed_snapshot|read|read_only|read_write|readcommitted|readcommittedlock|readonly|readpast|readuncommitted|readwrite|real|rebuild|receive|recmodel_70backcomp|recompile|reconfigure|recovery|recursive|recursive_triggers|redo_queue|reject_sample_value|reject_type|reject_value|relative|remote|remote_data_archive|remote_proc_transactions|remote_service_name|remove|removed_cursors|removed_exec_context|reorganize|repeat|repeatable|repeatableread|replace|replica|replicated|replnick_100_to_80|replnickarray_80_to_100|replnickarray_100_to_80|required|required_cursopt|resample|reset|resource|resource_manager_location|respect|restart|restore|restricted_user|resume|retaindays|retention|return|revert|rewind|rewindonly|returns|robust|role|rollup|root|round_robin|route|row|rowdump|rowguidcol|rowlock|row_terminator|rows|rows_per_batch|rowsets_only|rowterminator|rowversion|rsa_1024|rsa_2048|rsa_3072|rsa_4096|rsa_512|safe|safety|sample|save|scalar|schema|schemabinding|scoped|scroll|scroll_locks|sddl|second|secexpr|seconds|secondary|secondary_only|secondary_role|secret|security|securityaudit|selective|self|send|sent|sequence|serde_method|serializable|server|service|service_broker|service_name|service_objective|session_timeout|sessions??|seterror|setopts|sets|shard_map_manager|shard_map_name|sharded|shared_memory|shortest_path|show_statistics|showplan_all|showplan_text|showplan_xml|showplan_xml_with_recompile|shrinkdb|shutdown|sid|signature|simple|single_blob|single_clob|single_nclob|single_user|singleton|site|size|size_based_cleanup_mode|skip|smalldatetime|smallint|smallmoney|snapshot|snapshot_import|snapshotrestorephase|soap|softnuma|sort_in_tempdb|sorted_data|sorted_data_reorg|spatial|sql|sql_bigint|sql_binary|sql_bit|sql_char|sql_date|sql_decimal|sql_double|sql_float|sql_guid|sql_handle|sql_longvarbinary|sql_longvarchar|sql_numeric|sql_real|sql_smallint|sql_time|sql_timestamp|sql_tinyint|sql_tsi_day|sql_tsi_frac_second|sql_tsi_hour|sql_tsi_minute|sql_tsi_month|sql_tsi_quarter|sql_tsi_second|sql_tsi_week|sql_tsi_year|sql_type_date|sql_type_time|sql_type_timestamp|sql_varbinary|sql_varchar|sql_variant|sql_wchar|sql_wlongvarchar|ssl|ssl_port|standard|standby|start|start_date|started|stat_header|state|statement|static|statistics|statistics_incremental|statistics_norecompute|statistics_only|statman|stats|stats_stream|status|stop|stop_on_error|stopat|stopatmark|stopbeforemark|stoplist|stopped|string_delimiter|subject|supplemental_logging|supported|suspend|symmetric|synchronous_commit|synonym|sysname|system|system_time|system_versioning|table|tableresults|tablockx??|take|tape|target|target_index|target_partition|target_recovery_time|tcp|temporal_history_retention|text|textimage_on|then|thesaurus|throw|time|timeout|timestamp|tinyint|top??|torn_page_detection|track_columns_updated|trailing|tran|transaction|transfer|transform_noise_words|triple_des|triple_des_3key|truncate|trustworthy|try|tsql|two_digit_year_cutoff|type|type_desc|type_warning|tzoffset|uid|unbounded|uncommitted|unique|uniqueidentifier|unlimited|unload|unlock|unsafe|updlock|url|use|useplan|useroptions|use_type_default|using|utcdatetime|valid_xml|validation|values??|varbinary|varchar|vector|verbose|verifyonly|version|view_metadata|virtual_device|visiblity|wait_at_low_priority|waitfor|webmethod|week|weekday|weight|well_formed_xml|when|while|widechar|widechar_ansi|widenative|windows??|with|within|within group|witness|without|without_array_wrapper|workload|wsdl|xact_abort|xlock|xml|xmlschema|xquery|xsinil|year|zone)\\\\b","name":"keyword.other.sql"},{"captures":{"1":{"name":"punctuation.section.scope.begin.sql"},"2":{"name":"punctuation.section.scope.end.sql"}},"match":"(\\\\()(\\\\))","name":"meta.block.sql"}],"repository":{"comment-block":{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.sql"}},"end":"\\\\*/","name":"comment.block","patterns":[{"include":"#comment-block"}]},"comments":{"patterns":[{"begin":"(^[\\\\t ]+)?(?=--)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.sql"}},"end":"(?!\\\\G)","patterns":[{"begin":"--","beginCaptures":{"0":{"name":"punctuation.definition.comment.sql"}},"end":"\\\\n","name":"comment.line.double-dash.sql"}]},{"begin":"(^[\\\\t ]+)?(?=#)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.sql"}},"end":"(?!\\\\G)","patterns":[]},{"include":"#comment-block"}]},"regexps":{"patterns":[{"begin":"/(?=\\\\S.*/)","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"/","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.regexp.sql","patterns":[{"include":"#string_interpolation"},{"match":"\\\\\\\\/","name":"constant.character.escape.slash.sql"}]},{"begin":"%r\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.regexp.modr.sql","patterns":[{"include":"#string_interpolation"}]}]},"string_escape":{"match":"\\\\\\\\.","name":"constant.character.escape.sql"},"string_interpolation":{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"3":{"name":"punctuation.definition.string.end.sql"}},"match":"(#\\\\{)([^}]*)(})","name":"string.interpolated.sql"},"strings":{"patterns":[{"captures":{"2":{"name":"punctuation.definition.string.begin.sql"},"3":{"name":"punctuation.definition.string.end.sql"}},"match":"(?:(?<![0-9A-Z_a-z])(N))?(')[^']*(')","name":"string.quoted.single.sql"},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.single.sql","patterns":[{"include":"#string_escape"}]},{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"2":{"name":"punctuation.definition.string.end.sql"}},"match":"(\`)[^\\\\\\\\\`]*(\`)","name":"string.quoted.other.backtick.sql"},{"begin":"\`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"\`","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.other.backtick.sql","patterns":[{"include":"#string_escape"}]},{"captures":{"1":{"name":"punctuation.definition.string.begin.sql"},"2":{"name":"punctuation.definition.string.end.sql"}},"match":"(\\")[^\\"#]*(\\")","name":"string.quoted.double.sql"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.quoted.double.sql","patterns":[{"include":"#string_interpolation"}]},{"begin":"%\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.sql"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.string.end.sql"}},"name":"string.other.quoted.brackets.sql","patterns":[{"include":"#string_interpolation"}]}]}},"scopeName":"source.sql"}`))];export{e as default};
@@ -0,0 +1 @@
1
+ import{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{An as r,Cr as i,ai as a,li as o,xt as s}from"./queries-DGlVu9wp.js";import{Ct as c}from"./common-DHOhx6Zn.js";import{p as l,s as u}from"./kit-n8CE0xEs.js";import{i as d,n as f,r as p,t as m}from"./Play.es-DGJ1CGhp.js";import{F as h,Ht as g,Mt as _,P as v,an as y,hn as b,pn as x,zt as S}from"./store-BT988jIX.js";import{V as ee,_ as te,d as ne,f as re,g as ie,h as C,i as ae,k as oe,s as se,t as w,u as ce}from"./button-D5kdANef.js";import{t as le}from"./utils-BRvE9-Fo.js";import{a as ue,i as de,n as fe,o as pe,r as me,s as he,t as ge}from"./useRegisterFieldControl-DIkKUJkh.js";import{t as _e}from"./useValueChanged-DBqn456b.js";import{t as ve}from"./spinner-XaRXIj9W.js";import{C as ye,D as be,E as xe,S as T,T as Se,_ as Ce,b as E,k as we,v as Te,w as Ee,x as De,y as Oe}from"./index-CHKfukjt.js";import{t as ke}from"./Plus.es-i3Vaa2WW.js";import{t as D}from"./textarea-CRpYU-qx.js";import{a as O,c as Ae,i as k,l as A,n as j,o as je,r as Me,s as Ne,t as Pe}from"./schema-BpqanhX0.js";var Fe=class{constructor(e,t){this.atom=p(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(d(e))}},Ie=class{constructor(e){this.atom=p(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(d(e))}};function M(e,t){return typeof e==`function`?new Ie(e):t?new Fe(e,t):new Fe(e)}var N=n(e(),1);function Le(e,t,n,r=!0,i,a){let[o,s]=N.useState(),c=b(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return te(()=>{let i=e||t||l||!r?void 0:Re(n.current,c);o!==i&&s(i)}),u}function Re(e,t){let n=ze(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function ze(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}var Be=N.createContext({disabled:!1});function Ve(){return N.useContext(Be)}function He(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var P=`data-checked`,Ue=`data-unchecked`;function We(e){return{checked(t){return e.indeterminate?{}:t?{[P]:``}:{[Ue]:``}},...he}}var Ge=N.createContext(void 0);function Ke(){return N.useContext(Ge)}var qe=N.createContext(void 0);function Je(){let e=N.useContext(qe);if(e===void 0)throw Error(C(14));return e}var F=t(),Ye=`data-parent`,I=N.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:l,indeterminate:u=!1,inputRef:d,name:f,onCheckedChange:p,parent:m=!1,readOnly:g=!1,render:_,required:S=!1,uncheckedValue:ee,value:C,nativeButton:w=!1,style:le,...he}=e,{clearErrors:ve}=ue(),{disabled:ye,name:be,setDirty:xe,setFilled:T,setTouched:Se,state:Ce,validationMode:E,validityData:we,validation:Te}=pe(),Ee=Ve(),{labelId:De,registerControlId:Oe,getDescriptionProps:ke}=de(),D=Ke(),O=D?.allValues===void 0?void 0:D.parent,Ae=O!==void 0,k=ye||Ee.disabled||D?.disabled||o,A=be??f,j=C??A,je=b(),Me=D?.registerControlId!==Oe,Ne=me({id:l||void 0,enabled:Me}),Pe=w?Ne:je,Fe={};Ae&&(m?Fe=O.getParentProps():j!==void 0&&(Fe=O.getChildProps(j)));let{checked:Ie=n,indeterminate:M=u,onCheckedChange:Re,...ze}=Fe,Be=D?.value,P=N.useRef(null),Ue=fe(k,P),{getButtonProps:Ge,buttonRef:Je}=ne({disabled:k,native:w}),I=D?.validation??Te,[L,Xe]=c({controlled:j!==void 0&&Be!==void 0&&!m?Be.includes(j):Ie,default:i,name:`Checkbox`,state:`checked`}),Ze=Ae?!!Ie:L,R=Ae&&M||u;ge(P,je,L,void 0,!D&&!k,f);let Qe=O?.registerChildId,z=N.useRef(null),$e=I.registerInput,B=D?j:void 0,V=N.useCallback(e=>$e(e,{controlRef:P,value:B}),[$e,B]),H=ce(d,z,m?void 0:V),U=Le(a,De,z,!w,Ne,he[`aria-label`]);te(()=>{z.current&&(z.current.indeterminate=R),D||T(L)},[L,R,D,T]),_e(L,()=>{D||(ve(A),xe(L!==we.initialValue),I.change(L))});let et=ie({checked:L,disabled:k,form:s,name:m?void 0:A,id:w?void 0:Ne,required:S,ref:H,style:A?h:v,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(g){e.preventDefault();return}let t=e.currentTarget.checked,n=x(y,e.nativeEvent);if(p?.(t,n),!n.isCanceled&&(Re?.(t,n),!n.isCanceled&&(Xe(t),j!==void 0&&D!==void 0&&!m&&!Ae))){let e=t?[...D.value,j]:D.value.filter(e=>e!==j);D.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){P.current?.focus()}},C===void 0?se:{value:(D?L&&C:C)||``},ke,e=>I.getValidationProps(k,e));N.useEffect(()=>{if(!O||j===void 0)return;let e=O.disabledStatesRef.current;return e.set(j,k),()=>{e.delete(j)}},[O,k,j]);let tt=N.useMemo(()=>({...Ce,checked:Ze,disabled:k,readOnly:g,required:S,indeterminate:R}),[Ce,Ze,k,g,S,R]),nt=We(tt),W=ae(`span`,e,{state:tt,ref:[Je,P,t],props:[{id:Pe,role:`checkbox`,"aria-checked":R?`mixed`:Ze,"aria-readonly":g||void 0,"aria-required":S||void 0,"aria-labelledby":U,[Ye]:m?``:void 0,onFocus(){Ue(!0)},onBlur(){let e=z.current;e&&(Se(!0),Ue(!1),E===`onBlur`&&I.commit(D?Be:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=z.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),oe(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||He(t)?.click()})},onClick(e){if(g||k)return;e.preventDefault();let t=z.current;t&&re(t,e)}},he,ze,Ge,ke,e=>I.getValidationProps(k,e)],stateAttributesMapping:nt}),rt=W.props.id;return te(()=>{if(Qe&&!m&&j!==void 0&&rt!==void 0)return Qe(j,rt)},[Qe,m,j,rt]),(0,F.jsxs)(qe.Provider,{value:tt,children:[W,!L&&!D&&A&&!m&&ee!==void 0&&(0,F.jsx)(`input`,{type:`hidden`,form:s,name:A,value:ee,disabled:k}),(0,F.jsx)(`input`,{...et,suppressHydrationWarning:!0})]})}),L=N.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Je(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=g(c),f=N.useRef(null),p={...s,transitionStatus:u};_({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...We(s),...S},h=a||l,v=ae(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?v:null});function Xe({className:e,...t}){return(0,F.jsx)(I,{"data-slot":`checkbox`,className:le(`peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary`,e),...t,children:(0,F.jsx)(L,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none [&>svg]:size-3.5`,children:(0,F.jsx)(we,{"aria-hidden":`true`})})})}var Ze=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),R=N.forwardRef((e,t)=>N.createElement(ee,{ref:t,...e,weights:Ze}));R.displayName=`TrashIcon`;var Qe=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...e)=>{let t=Date.now()-this.lastExecutionTime;if(this.options.leading&&t>=this.options.wait)this.execute(...e);else if(this.lastArgs=e,!this.timeoutId&&this.options.trailing){let e=this.options.wait-t;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},e)}},this.execute=(...e)=>{this.fn(...e),this.options.onExecute?.(e,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&=(clearTimeout(this.timeoutId),void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}};function z(e,t){return new Qe(e,t).maybeExecute}var $e=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{this.#c<this.#l?(this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{})):(this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop())};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e)this.debugLog(`Event bus client is disabled, not emitting event`,e,t);else if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d)this.debugLog(`Previously failed to connect, not emitting to bus`);else if(!this.#a)this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());else return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}},B=new class extends $e{constructor(){super({pluginId:`form-devtools`,reconnectEveryMs:1e3})}};function V(e,t){return typeof e==`function`?e(t):e}function H(e,t){return at(t).reduce((e,t)=>{if(e===null)return null;if(e!==void 0)return e[t]},e)}function U(e,t,n){let r=at(t);function i(e){if(!r.length)return V(n,e);let t=r.shift();if(typeof t==`string`||typeof t==`number`&&!Array.isArray(e))return typeof e==`object`?(e===null&&(e={}),{...e,[t]:i(e[t])}):{[t]:i()};if(Array.isArray(e)&&typeof t==`number`){let n=e.slice(0,t);return[...n.length?n:Array(t),i(e[t]),...e.slice(t+1)]}return[...Array(t),i()]}return i(e)}function et(e,t){let n=at(t);function r(e){if(!e)return;if(n.length===1){let t=n[0];if(Array.isArray(e)&&typeof t==`number`)return e.filter((e,n)=>n!==t);let{[t]:r,...i}=e;return i}let t=n.shift();if((typeof t==`string`||typeof t==`number`&&!Array.isArray(e))&&typeof e==`object`)return{...e,[t]:r(e[t])};if(typeof t==`number`&&Array.isArray(e)){if(t>=e.length)return e;let n=e.slice(0,t);return[...n.length?n:Array(t),r(e[t]),...e.slice(t+1)]}throw Error(`It seems we have created an infinite loop in deleteBy. `)}return r(e)}var tt=46,nt=91,W=93,rt=48,it=57;function at(e){if(Array.isArray(e))return[...e];if(typeof e!=`string`)throw Error(`Path must be a string.`);let t=e.length,n=[],r=+(t>0&&e.charCodeAt(0)===nt),i=!0,a=-1;for(let o=r;o<=t;o++){let s=o<t?e.charCodeAt(o):-1;if(o===t||s===tt||s===nt||s===W){let t=o-r;if(t>0){let a=i&&(t===1||e.charCodeAt(r)!==rt),s=e.slice(r,o);if(a){let e=parseInt(s,10);t<=15||String(e)===s?n.push(e):n.push(s)}else n.push(s)}else a!==W&&(a!==-1||s!==W)&&(a!==s||s!==tt&&s!==nt)&&n.push(``);r=o+1,i=!0}else(s<rt||s>it)&&(i=!1);a=s}return n.length||n.push(``),n}function ot(e){return!(Array.isArray(e)&&e.length===0)}function st(e,t){return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function ct(e,t){let{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:r,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},o=n??0;return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let n=t?.cause||e,s=o;switch(n){case`change`:s=i??o;break;case`blur`:s=r??o;break;case`dynamic`:s=a??o;break;case`submit`:s=0}return e===`submit`&&(s=0),{cause:n,validate:t.fn,debounceMs:s}})})}var lt=e=>!!e&&typeof e==`object`&&`fields`in e;function G(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||n.length===0&&!Array.isArray(e)&&!Array.isArray(t)&&(Object.getPrototypeOf(e)!==Object.prototype||Object.getPrototypeOf(t)!==Object.prototype))return!1;for(let i of n)if(!r.includes(i)||!G(e[i],t[i]))return!1;return!0}var ut=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:`form`}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:`field`}:{newErrorValue:void 0,newSource:void 0},dt=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:`field`}:e?{newErrorValue:e,newSource:`form`}:{newErrorValue:void 0,newSource:void 0};function K(e,t){return e==null?t:{...e,...t}}for(var q=256,ft=[],pt;q--;)ft[q]=(q+256).toString(16).substring(1);function mt(){let e=0,t,n=``;if(!pt||q+16>256){for(pt=Array(256),e=256;e--;)pt[e]=256*Math.random()|0;e=0,q=0}for(;e<16;e++)t=pt[q+e],n+=e===6?ft[t&15|64]:e===8?ft[t&63|128]:ft[t],e&1&&e>1&&e<11&&(n+=`-`);return q++,n}var ht=z(e=>B.emit(`form-state`,{id:e.formId,state:e.store.state}),{wait:300});function gt(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++)t[n]=gt(e[n]);return t}if(e instanceof Map){let t=new Map;return e.forEach((e,n)=>{t.set(n,gt(e))}),t}if(e instanceof Set){let t=new Set;return e.forEach(e=>{t.add(gt(e))}),t}let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=gt(e[n]));return t}function J(e,t){return t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`)}var Y=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:`mount`},r={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:`change`},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:`blur`},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:`submit`},o=t?void 0:{fn:()=>void 0,cause:`server`};switch(e.event.type){case`mount`:return e.runValidation({validators:[n],form:e.form});case`submit`:return e.runValidation({validators:[r,i,a,o],form:e.form});case`server`:return e.runValidation({validators:[],form:e.form});case`blur`:return e.runValidation({validators:[i,o],form:e.form});case`change`:return e.runValidation({validators:[r,o],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}};function _t(e,t){let n=new Map;for(let r of e){let e=r.path??[],i=t,a=``;for(let t=0;t<e.length;t++){let n=e[t];if(n===void 0)continue;let r=typeof n==`object`?n.key:n,o=Number(r);a+=Array.isArray(i)&&!Number.isNaN(o)?`[${o}]`:(t>0?`.`:``)+String(r),i=typeof i==`object`&&i?i[r]:void 0}n.set(a,(n.get(a)??[]).concat(r))}return Object.fromEntries(n)}var vt=(e,t)=>{let n=_t(e,t);return{form:n,fields:n}},X={validate({value:e,validationSource:t},n){let r=n[`~standard`].validate(e);if(r instanceof Promise)throw Error(`async function passed to sync validator`);if(r.issues)return t===`field`?r.issues:vt(r.issues,e)},async validateAsync({value:e,validationSource:t},n){let r=await n[`~standard`].validate(e);if(r.issues)return t===`field`?r.issues:vt(r.issues,e)}},yt=e=>!!e&&`~standard`in e,Z={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{},_arrayVersion:0,_pendingValidationsCount:0};function Q(e){function t(t){let n=e.getFieldMeta(t)??Z;e.setFieldMeta(t,{...n,_arrayVersion:(n._arrayVersion||0)+1})}function n(n,r,i){t(n);let a=s(n,r,`move`,i),c=Math.min(r,i),u=Math.max(r,i);for(let e=c;e<=u;e++)a.push(o(n,e));let d=Object.keys(e.fieldInfo).reduce((t,i)=>(i.startsWith(o(n,r))&&t.set(i,e.getFieldMeta(i)),t),new Map);l(a,r<i?`up`:`down`),Object.keys(e.fieldInfo).filter(e=>e.startsWith(o(n,i))).forEach(t=>{let a=t.replace(o(n,i),o(n,r)),s=d.get(a);s&&e.setFieldMeta(t,s)})}function r(e,n){t(e),l(s(e,n,`remove`),`up`)}function i(n,r,i){t(n),s(n,r,`swap`,i).forEach(t=>{if(!t.toString().startsWith(o(n,r)))return;let a=t.toString().replace(o(n,r),o(n,i)),[s,c]=[e.getFieldMeta(t),e.getFieldMeta(a)];s&&e.setFieldMeta(a,s),c&&e.setFieldMeta(t,c)})}function a(n,r){t(n);let i=s(n,r,`insert`);l(i,`down`),i.forEach(t=>{t.toString().startsWith(o(n,r))&&e.setFieldMeta(t,u())})}function o(e,t){return`${e}[${t}]`}function s(t,n,r,i){let a=[o(t,n)];switch(r){case`swap`:a.push(o(t,i));break;case`move`:{let[e,r]=[Math.min(n,i),Math.max(n,i)];for(let n=e;n<=r;n++)a.push(o(t,n));break}default:{let r=e.getFieldValue(t),i=Array.isArray(r)?r.length:0;for(let e=n+1;e<i;e++)a.push(o(t,e));break}}return Object.keys(e.fieldInfo).filter(e=>a.some(t=>e.startsWith(t)))}function c(e,t){return e.replace(/\[(\d+)\]/,(e,n)=>{let r=parseInt(n,10);return`[${t===`up`?r+1:Math.max(0,r-1)}]`})}function l(t,n){(n===`up`?t:[...t].reverse()).forEach(t=>{let r=c(t.toString(),n),i=e.getFieldMeta(r);i?e.setFieldMeta(t,i):e.setFieldMeta(t,u())})}let u=()=>Z;return{bumpArrayVersion:t,handleArrayMove:n,handleArrayRemove:r,handleArraySwap:i,handleArrayInsert:a}}function bt(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},formGroupStateBase:e.formGroupStateBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}var xt=class{constructor(e){this.options={},this.fieldInfo={},this.formGroupApis=new Set,this.mount=()=>{let e=this.store.subscribe(()=>{ht(this)}),t=B.on(`request-form-state`,e=>{e.payload.id===this._formId&&B.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}),n=B.on(`request-form-reset`,e=>{e.payload.id===this._formId&&this.reset()}),r=B.on(`request-form-force-submit`,e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),i=()=>{r(),n(),t(),e.unsubscribe(),B.emit(`form-unmounted`,{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:a}=this.options.validators||{};return B.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync(`mount`),i},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let n=e.defaultValues&&!G(e.defaultValues,t.defaultValues)&&!this.state.isTouched,r=!G(e.defaultState,t.defaultState)&&!this.state.isTouched;if(n||r){if(f(()=>{this.baseStore.setState(()=>bt(Object.assign({},this.state,r?e.defaultState:{},n?{values:e.defaultValues}:{})))}),n){let e=Q(this);for(let t of Object.keys(this.fieldInfo))Array.isArray(this.getFieldValue(t))&&e.bumpArrayVersion(t)}B.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}},this.reset=(e,t)=>{let{fieldMeta:n}=this.state,r=this.resetFieldMeta(n);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>{let t=e??this.options.defaultValues??this.options.defaultState?.values;return e||Object.values(this.fieldInfo).forEach(e=>{e.instance&&e.instance.options.defaultValue!==void 0&&(t=U(t,e.instance.name,e.instance.options.defaultValue))}),bt({...this.options.defaultState,values:t,fieldMetaBase:r})})},this.validateAllFields=async e=>{let t=[];return f(()=>{Object.values(this.fieldInfo).forEach(n=>{if(!n.instance)return;let r=n.instance;t.push(Promise.resolve().then(()=>r.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.instance.store.state.meta.isTouched||n.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null,a=[`${e}[${t}]`];for(let n=t+1;n<=(i??0);n++)a.push(`${e}[${n}]`);let o=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),s=[];return f(()=>{o.forEach(e=>{s.push(Promise.resolve().then(()=>this.validateField(e,n)))})}),(await Promise.all(s)).flat()},this.validateField=(e,t)=>{let n=this.fieldInfo[e]?.instance;if(!n){let{hasErrored:n}=this.validateSync(t);return n&&!this.options.asyncAlways?this.getFieldMeta(e)?.errors??[]:this.validateAsync(t).then(()=>this.getFieldMeta(e)?.errors??[])}return n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0})),n.validate(t)},this.validateSync=(e,t)=>{let n=st(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||Y}),r=!1,i={};return f(()=>{for(let e of n){if(!e.validate)continue;let{formError:n,fieldErrors:a}=St(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`},type:`validate`})),o=Ct(e.cause),s=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(a||{})]);t?.filterFieldNames&&(s=new Set([...s].filter(t.filterFieldNames)));for(let e of s){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!a?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??Z,r=a?.[e],{newErrorValue:s,newSource:c}=ut({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[o]===`form`,previousErrorValue:t?.[o]});c===`form`&&(i[e]={...i[e],[o]:r}),t?.[o]!==s&&this.setFieldMeta(e,(e=Z)=>({...e,errorMap:{...e.errorMap,[o]:s},errorSourceMap:{...e.errorSourceMap,[o]:c}}))}t?.dontUpdateFormErrorMap||this.state.errorMap?.[o]!==n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:n}})),(n||a)&&(r=!0)}if(t?.dontUpdateFormErrorMap)return;let a=Ct(`submit`);this.state.errorMap?.[a]&&e!==`submit`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}));let o=Ct(`server`);this.state.errorMap?.[o]&&e!==`server`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:void 0}}))}),{hasErrored:r,fieldsErrorMap:i}},this.validateAsync=async(e,t)=>{let n=ct(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||Y});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let r=[],i;for(let e of n){if(!e.validate)continue;let n=Ct(e.cause);this.state.validationMetaMap[n]?.lastAbortController.abort();let a=new AbortController;this.state.validationMetaMap[n]={lastAbortController:a},r.push(new Promise(async n=>{let r;try{r=await new Promise((t,n)=>{setTimeout(async()=>{if(a.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`,signal:a.signal},type:`validateAsync`}))}catch(e){n(e)}},e.debounceMs)})}catch(e){r=e}let{formError:o,fieldErrors:s}=St(r);s&&(i=i?{...i,...s}:s);let c=Ct(e.cause),l=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(i||{})]),u=Array.from(l);t?.filterFieldNames&&(u=u.filter(t.filterFieldNames));for(let e of u){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!i?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??Z,r=i?.[e],{newErrorValue:a,newSource:o}=ut({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[c]===`form`,previousErrorValue:t?.[c]});t?.[c]!==a&&this.setFieldMeta(e,(e=Z)=>({...e,errorMap:{...e.errorMap,[c]:a},errorSourceMap:{...e.errorSourceMap,[c]:o}}))}t?.dontUpdateFormErrorMap||this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[c]:o}})),n(i?{fieldErrors:i,errorMapKey:c}:void 0)}))}let a=[],o={};if(r.length){a=await Promise.all(r);for(let e of a)if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[n,r]of Object.entries(e.fieldErrors))o[n]={...o[n]||{},[t]:r}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),o},this.validate=(e,t)=>{let{hasErrored:n,fieldsErrorMap:r}=this.validateSync(e,t);return n&&!this.options.asyncAlways?r:this.validateAsync(e,t)},this._handleSubmit=async e=>{this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),f(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.store.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride&&this.baseStore.state.submissionAttempts<=1){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});return}this.baseStore.setState(e=>({...e,isSubmitting:!0}));let n=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.state.isFieldsValid)n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),B.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validateAllFields`,errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});else if(await this.validate(`submit`),!this.state.isValid)n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),B.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validate`,errors:this.state.errors});else{f(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.triggerOnSubmitListener()})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),f(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),B.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),B.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`inflight`,onError:e}),n(),e}}},this.getFieldValue=e=>H(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFormGroupMeta=e=>this.formGroupMetaDerived.state[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[e]:V(t,n.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>{let n=t;return e[n]=Z,e},{}),this.setFieldValue=(e,t,n)=>{let r=n?.dontUpdateMeta??!1,i=n?.dontRunListeners??!1,a=n?.dontValidate??!1;f(()=>{r||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(n=>({...n,values:U(n.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,`change`)},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let n=e.toString();return t.startsWith(`${n}.`)||t.startsWith(`${n}[`)}),e];this.baseStore.setState(e=>{let n={...e};return t.forEach(e=>{n.values=et(n.values,e),delete this.fieldInfo[e],delete n.fieldMetaBase[e]}),n})},this.pushFieldValue=(e,t,n)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],n),Q(this).bumpArrayVersion(e)},this.insertFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>[...e.slice(0,t),n,...e.slice(t)],K(r,{dontValidate:!0}));let i=r?.dontValidate??!1;i||await this.validateField(e,`change`),Q(this).handleArrayInsert(e,t),i||await this.validateArrayFieldsStartingFrom(e,t,`change`)},this.replaceFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>e.map((e,r)=>r===t?n:e),K(r,{dontValidate:!0})),Q(this).bumpArrayVersion(e),(r?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.removeFieldValue=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,n)=>n!==t),K(n,{dontValidate:!0})),Q(this).handleArrayRemove(e,t),i!==null){let t=`${e}[${i}]`;this.deleteField(t)}(n?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.swapFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=e[t],i=e[n];return U(U(e,`${t}`,i),`${n}`,r)},K(r,{dontValidate:!0})),Q(this).handleArraySwap(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.moveFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=[...e];return r.splice(n,0,r.splice(t,1)[0]),r},K(r,{dontValidate:!0})),Q(this).handleArrayMove(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.clearFieldValues=(e,t)=>{let n=this.getFieldValue(e),r=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,[],K(t,{dontValidate:!0})),Q(this).bumpArrayVersion(e),r!==null)for(let t=0;t<=r;t++){let n=`${e}[${t}]`;this.deleteField(n)}(t?.dontValidate??!1)||this.validateField(e,`change`)},this.resetField=e=>{this.baseStore.setState(t=>{let n=this.getFieldInfo(e).instance?.options.defaultValue,r=H(this.options.defaultValues,e),i=n??r;return{...t,fieldMetaBase:{...t.fieldMetaBase,[e]:Z},values:i===void 0?t.values:U(t.values,e,i)}})},this.setErrorMap=e=>{f(()=>{Object.entries(e).forEach(([e,t])=>{let n=e;if(lt(t)){let{formError:e,fieldErrors:r}=St(t);for(let e of Object.keys(this.fieldInfo))this.getFieldMeta(e)&&this.setFieldMeta(e,t=>({...t,errorMap:{...t.errorMap,[n]:r?.[e]},errorSourceMap:{...t.errorSourceMap,[n]:`form`}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[n]:e}}))}else this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[n]:t}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,n])=>(Object.keys(n).length&&n.errors.length&&(e[t]={errors:n.errors,errorMap:n.errorMap}),e),{})}),this.parseValuesWithSchema=e=>X.validate({value:this.state.values,validationSource:`form`},e),this.parseValuesWithSchemaAsync=e=>X.validateAsync({value:this.state.values,validationSource:`form`},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??mt(),this._devtoolsSubmissionOverride=!1;let t=bt({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values});if(e?.transform){t=e.transform({state:t}).state;for(let e of Object.keys(t.errorMap)){let n=t.errorMap[e];if(n!==void 0&&lt(n))for(let r of Object.keys(n.fields)){let i=n.fields[r];if(i===void 0)continue;let a=t.fieldMetaBase[r];t.fieldMetaBase[r]={isTouched:!1,isValidating:!1,isBlurred:!1,isDirty:!1,_arrayVersion:0,_pendingValidationsCount:0,...a??{},errorSourceMap:{...a?.errorSourceMap??{},onChange:`form`},errorMap:{...a?.errorMap??{},[e]:i}}}}}this.baseStore=M(t);let n;this.fieldMetaDerived=M(e=>{let t=this.baseStore.get(),r=0,i={};for(let a of Object.keys(t.fieldMetaBase)){let o=t.fieldMetaBase[a],s=n?.fieldMetaBase[a],c=e?.[a],l=H(t.values,a),u=c?.errors;if(!s||o.errorMap!==s.errorMap){u=Object.values(o.errorMap??{}).filter(e=>e!==void 0);let e=this.getFieldInfo(a)?.instance;e&&e.options.disableErrorFlat||(u=u.flat(1))}let d=!ot(u),f=!o.isDirty,p=G(l,this.getFieldInfo(a)?.instance?.options.defaultValue??H(this.options.defaultValues,a));c&&c.isPristine===f&&c.isValid===d&&c.isDefaultValue===p&&c.errors===u&&o===s?(i[a]=c,r++):i[a]={...o,errors:u??[],isPristine:f,isValid:d,isDefaultValue:p}}return Object.keys(t.fieldMetaBase).length?e&&r===Object.keys(t.fieldMetaBase).length?e:(n=this.baseStore.get(),i):i}),this.formGroupMetaDerived=M(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),r={};for(let i of this.formGroupApis){let a=i.name,o=t.formGroupStateBase[a]??{isSubmitted:!1,isSubmitting:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1},s=n[a],c=!1,l=!0,u=!1,d=!1,f=!0,p=!1;for(let e in n){if(e===a||!J(a,e))continue;let t=n[e];t&&(t.isValidating&&(c=!0),t.isValid||(l=!1),t.isTouched&&(u=!0),t.isBlurred&&(d=!0),t.isDefaultValue||(f=!1),t.isDirty&&(p=!0))}let m=!p,h=!!c||o.isValidating,g=s?.errorMap??{},_=s?.errorSourceMap??{},v=!!(g.onMount||Object.entries(n).some(([e,t])=>t&&e!==a&&J(a,e)&&t.errorMap.onMount)),y=e?.[a],b=y?.errors??[];y&&y.__srcErrorMap===g||(b=Object.values(g).reduce((e,t)=>{if(t===void 0)return e;if(t&&typeof t==`object`&&`fields`in t){let n=t.group;return n!==void 0&&e.push(n),e}return e.push(t),e},[]));let x=b.length===0,S=l&&x,ee=i.options.canSubmitWhenInvalid??!1,te=o.submissionAttempts===0&&!u&&!v||!h&&!o.isSubmitting&&S||ee;if(y&&y.errorMap===g&&y.errorSourceMap===_&&y.errors===b&&y.isFieldsValidating===c&&y.isFieldsValid===l&&y.isGroupValid===x&&y.isValid===S&&y.canSubmit===te&&y.isTouched===u&&y.isBlurred===d&&y.isPristine===m&&y.isDefaultValue===f&&y.isDirty===p&&y.isValidating===h&&y.isSubmitting===o.isSubmitting&&y.isSubmitted===o.isSubmitted&&y.submissionAttempts===o.submissionAttempts&&y.isSubmitSuccessful===o.isSubmitSuccessful){r[a]=y;continue}let ne={...o,errorMap:g,errorSourceMap:_,_arrayVersion:s?._arrayVersion??0,isTouched:u,isBlurred:d,isDirty:p,isPristine:m,isDefaultValue:f,isValid:S,errors:b,isValidating:h,isFieldsValidating:c,isFieldsValid:l,isGroupValid:x,canSubmit:te};Object.defineProperty(ne,"__srcErrorMap",{value:g,enumerable:!1,configurable:!0}),r[a]=ne}return r});let r;this.store=M(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),i=Object.values(n).filter(Boolean),a=i.some(e=>e.isValidating),o=i.every(e=>e.isValid),s=i.some(e=>e.isTouched),c=i.some(e=>e.isBlurred),l=i.every(e=>e.isDefaultValue),u=s&&t.errorMap?.onMount,d=i.some(e=>e.isDirty),f=!d,p=!!(t.errorMap?.onMount||i.some(e=>e?.errorMap?.onMount)),m=!!a,h=e?.errors??[];r&&t.errorMap===r.errorMap||(h=Object.values(t.errorMap).reduce((e,t)=>t===void 0?e:t&&lt(t)?(e.push(t.form),e):(e.push(t),e),[]));let g=h.length===0,_=o&&g,v=this.options.canSubmitWhenInvalid??!1,y=t.submissionAttempts===0&&!s&&!p||!m&&!t.isSubmitting&&_||v,b=t.errorMap;if(u&&(h=h.filter(e=>e!==t.errorMap.onMount),b=Object.assign(b,{onMount:void 0})),e&&r&&e.errorMap===b&&e.fieldMeta===this.fieldMetaDerived.state&&e.errors===h&&e.isFieldsValidating===a&&e.isFieldsValid===o&&e.isFormValid===g&&e.isValid===_&&e.canSubmit===y&&e.isTouched===s&&e.isBlurred===c&&e.isPristine===f&&e.isDefaultValue===l&&e.isDirty===d&&G(r,t))return e;let x={...t,errorMap:b,fieldMeta:this.fieldMetaDerived.state,errors:h,isFieldsValidating:a,isFieldsValid:o,isFormValid:g,isValid:_,canSubmit:y,isTouched:s,isBlurred:c,isPristine:f,isDefaultValue:l,isDirty:d};return r=this.baseStore.get(),x}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return yt(e.validate)?X[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function St(e){return e?lt(e)?{formError:St(e.form).formError,fieldErrors:e.fields}:{formError:e}:{formError:void 0}}function Ct(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var wt=class e{constructor(t){this.options={},this.mount=()=>{this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});let e=this.getInfo();e.instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:`field`},type:`validate`});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:`field`}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);let e=this.form.fieldInfo[this.name];if(e&&e.instance===this){for(let[t,n]of Object.entries(e.validationMetaMap))n?.lastAbortController.abort(),e.validationMetaMap[t]=void 0;this.form.baseStore.setState(e=>({...e,fieldMetaBase:{...e.fieldMetaBase,[this.name]:{...Z,isTouched:e.fieldMetaBase[this.name]?.isTouched??Z.isTouched,isBlurred:e.fieldMetaBase[this.name]?.isBlurred??Z.isBlurred,isDirty:e.fieldMetaBase[this.name]?.isDirty??Z.isDirty}}})),e.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,fieldApi:this}),this.form.options.listeners?.onFieldUnmount?.({formApi:this.form,fieldApi:this})}}},this.update=e=>{this.options=e,this.name=e.name,this.state.meta.isTouched||this.options.defaultValue===void 0||G(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0}),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,K(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,K(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,n)=>{this.form.insertFieldValue(this.name,e,t,K(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,n)=>{this.form.replaceFieldValue(this.name,e,t,K(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,K(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,n)=>{this.form.swapFieldValues(this.name,e,t,K(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,n)=>{this.form.moveFieldValues(this.name,e,t,K(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,K(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=t=>{let n=Object.values(this.form.fieldInfo),r=[];for(let i of n){if(!i.instance||!(i.instance instanceof e))continue;let{onChangeListenTo:n,onBlurListenTo:a}=i.instance.options.validators||{};t===`change`&&n?.includes(this.name)&&r.push(i.instance),t===`blur`&&a?.includes(this.name)&&r.push(i.instance)}return r},this.validateSync=(e,t)=>{let n=st(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||Y}),r=this.getLinkedFields(e).reduce((t,n)=>{let r=st(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||Y});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),i=!1;f(()=>{let e=(e,n)=>{let r=Et(n.cause),a=n.validate?Tt(e.runValidator({validate:n.validate,value:{value:e.store.state.value,validationSource:`field`,fieldApi:e},type:`validate`})):void 0,o=t[r],{newErrorValue:s,newSource:c}=dt({formLevelError:o,fieldLevelError:a});e.state.meta.errorMap?.[r]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[r]:s},errorSourceMap:{...e.errorSourceMap,[r]:c}})),s&&(i=!0)};for(let t of n)e(this,t);for(let t of r)t.validate&&e(t.field,t)});let a=Et(`submit`);return this.state.meta.errorMap?.[a]&&e!==`submit`&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let n=ct(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||Y}),r=await t,i=this.getLinkedFields(e).reduce((t,n)=>{let r=ct(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||Y});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),a=[],o=[],s=n.some(e=>e.validate),c=Array.from(new Set(i.filter(e=>e.validate).map(e=>e.field)));f(()=>{s&&this.startValidation();for(let e of c)e.startValidation()});let l=(e,t,n)=>{let i=Et(t.cause),a=e.getInfo();a.validationMetaMap[i]?.lastAbortController.abort();let o=new AbortController;a.validationMetaMap[i]={lastAbortController:o},n.push(new Promise(async n=>{let a;try{a=await new Promise((n,r)=>{e.timeoutIds.validations[t.cause]&&(clearTimeout(e.timeoutIds.validations[t.cause]),e.endValidation()),e.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(o.signal.aborted)return n(void 0);try{n(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:o.signal,validationSource:`field`},type:`validateAsync`}))}catch(e){r(e)}},t.debounceMs)})}catch(e){a=e}if(o.signal.aborted)return n(void 0);let s=Tt(a),c=r[e.name]?.[i],{newErrorValue:l,newSource:u}=dt({formLevelError:c,fieldLevelError:s});if(e.getInfo().instance!==e)return n(void 0);e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),n(l)}))};for(let e of n)e.validate&&l(this,e,a);for(let e of i)e.validate&&l(e.field,e,o);let u=[];return(a.length||o.length)&&(u=await Promise.all(a),await Promise.all(o)),f(()=>{s&&this.endValidation();for(let e of c)e.endValidation()}),u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let n=t?.skipGroupValidation?[]:Array.from(this.form.formGroupApis).filter(e=>this.name.startsWith(e.name)),r=(t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e)).fieldsErrorMap[this.name]??{};if(!t?.skipFormValidation)for(let t of n){if(t.state.meta.submissionAttempts===0)continue;let{fieldsErrorMap:n}=this.form.validateSync(e,{group:t,dontUpdateFormErrorMap:!0,filterFieldNames:e=>J(t.name,e)});r={...r,...n[this.name]??{}}}let{hasErrored:i}=this.validateSync(e,r),a=new WeakMap;for(let t of n){let{hasErrored:n}=t.validateSync(e,{},{skipRelatedFieldValidation:!0});a.set(t,n)}if(i&&!this.options.asyncAlways){this.getInfo().validationMetaMap[Et(e)]?.lastAbortController.abort();let t=[];for(let r of n)r.getInfo().validationMetaMap[Et(e)]?.lastAbortController.abort(),t.push(r.state.meta.errors);return[...this.state.meta.errors,...t.flat()]}let o=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e),s=this.validateAsync(e,o),c=[];for(let t of n)(!a.get(t)||t.options.asyncAlways)&&c.push(t.validateAsync(e,o,{skipRelatedFieldValidation:!0}));return c.length===0?s:Promise.all([s,...c]).then(e=>e.flat())},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate(`blur`),this.triggerOnBlurListener()},this.setErrorMap=e=>{this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))},this.parseValueWithSchema=e=>X.validate({value:this.state.value,validationSource:`field`},e),this.parseValueWithSchemaAsync=e=>X.validateAsync({value:this.state.value,validationSource:`field`},e),this.triggerOnBlurListener=()=>{let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this});for(let e of this.form.formGroupApis)J(e.name,this.name)&&e.triggerOnChangeListener()},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,fieldApi:this})},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=M(e=>{this.form.store.get();let n=this.form.getFieldMeta(this.name)??{...Z,...t.defaultMeta},r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!G(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}})}get state(){return this.store.state}runValidator(e){return yt(e.validate)?X[e.type](e.value,e.validate):e.validate(e.value)}startValidation(){this.setMeta(e=>{let t=e._pendingValidationsCount+1;return{...e,_pendingValidationsCount:t,isValidating:t>0&&!e.isValidating||e.isValidating}})}endValidation(){this.setMeta(e=>{let t=Math.max(0,e._pendingValidationsCount-1);return{...e,_pendingValidationsCount:t,isValidating:t===0&&e.isValidating?!1:e.isValidating}})}};function Tt(e){if(e)return e}function Et(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function Dt(e){return{isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1}}function Ot(e){return{...Z,...e,errors:[],isPristine:!0,isValid:!0,isDefaultValue:!0,isFieldsValidating:!1,isFieldsValid:!0,isGroupValid:!0,canSubmit:!0,isSubmitting:!1,isSubmitted:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1}}var kt=class e{constructor(t){this.options={},this.setFormGroupState=e=>{this.form.baseStore.setState(t=>{let n=t.formGroupStateBase[this.name]??Dt({});return{...t,formGroupStateBase:{...t.formGroupStateBase,[this.name]:e(n)}}})},this._lastDistributedFieldNames={},this.update=e=>{this.options=e,this.name=e.name,this.state.meta.isTouched||this.options.defaultValue===void 0||G(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0}),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,{...Z,...this.options.defaultMeta})},this.mount=()=>{this.update(this.options),this.form.formGroupApis.add(this),this.fieldInfo.instance=this,this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:e.formGroupStateBase[this.name]??Dt({...this.options.defaultState})}}));let{onMount:e}=this.options.validators||{};if(e){let t=this.runValidator({validate:e,value:{value:this.state.value,groupApi:this,validationSource:`form`},type:`validate`}),n=t,r;jt(t)&&(n=t.group,r=t.fields);let i=At(n);i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,onMount:i},errorSourceMap:{...e.errorSourceMap,onMount:`field`}})),this.distributeFieldErrors(`onMount`,r)}return this.options.listeners?.onMount?.({value:this.state.value,groupApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);if(this.fieldInfo.instance===this){for(let[e,t]of Object.entries(this.fieldInfo.validationMetaMap))t?.lastAbortController.abort(),this.fieldInfo.validationMetaMap[e]=void 0;this.form.formGroupApis.delete(this),this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:Dt({})}})),this.fieldInfo.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,groupApi:this})}}},this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,K(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.fieldInfo,this.getRelatedFields=()=>{let e=Object.values(this.form.fieldInfo),t=[];for(let n of e)n.instance&&n.instance instanceof wt&&n.instance.name.startsWith(this.name)&&t.push(n.instance);return t},this.getRelatedFieldMetasDerived=()=>{let e=Object.entries(this.form.fieldMetaDerived.state),t=[];for(let[n,r]of e)n!==this.name&&J(this.name,n)&&t.push({...r,name:n});return t},this.buildChildFieldName=e=>e===``?this.name:e.startsWith(`[`)?`${this.name}${e}`:`${this.name}.${e}`,this.distributeFieldErrors=(e,t)=>{let n=this._lastDistributedFieldNames[e]??new Set,r=new Set;if(t)for(let[e,n]of Object.entries(t))n!=null&&n!==!1&&r.add(this.buildChildFieldName(e));let i=new Set([...n,...r]),a=!1;for(let n of i){let r=n.startsWith(this.name+`[`)?n.slice(this.name.length):n.slice(this.name.length+1),i=t?.[r],o=this.form.getFieldMeta(n);if(!o&&!i)continue;let s=o?.errorMap[e],{newErrorValue:c,newSource:l}=ut({newFormValidatorError:i,isPreviousErrorFromFormValidator:o?.errorSourceMap[e]===`form`,previousErrorValue:s});c&&(a=!0),(s!==c||o?.errorSourceMap[e]!==l)&&this.form.setFieldMeta(n,(t=Z)=>({...t,errorMap:{...t.errorMap,[e]:c},errorSourceMap:{...t.errorSourceMap,[e]:l}}))}return this._lastDistributedFieldNames[e]=r,a},this.validateSync=(t,n,r={})=>{let i=st(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||Y}),a=(r.skipRelatedFieldValidation?[]:this.getRelatedFields()).reduce((e,n)=>{let r=st(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||Y});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),o=!1;f(()=>{let t=(t,r)=>{let i=Nt(r.cause),a=t===this,s;r.validate&&(s=t.runValidator({validate:r.validate,value:{value:t.store.state.value,validationSource:a?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validate`}));let c=s,l;a&&jt(s)&&(c=s.group,l=s.fields);let u=At(c),d=n[i],{newErrorValue:f,newSource:p}=dt({formLevelError:d,fieldLevelError:u});t.state.meta.errorMap?.[i]!==f&&t.setMeta(e=>({...e,errorMap:{...e.errorMap,[i]:f},errorSourceMap:{...e.errorSourceMap,[i]:p}})),f&&(o=!0),a&&this.distributeFieldErrors(i,l)&&(o=!0)};for(let e of i)t(this,e);for(let e of a)e.validate&&t(e.field,e)});let s=Nt(`submit`);return this.state.meta.errorMap?.[s]&&t!==`submit`&&!o&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[s]:void 0},errorSourceMap:{...e.errorSourceMap,[s]:void 0}})),{hasErrored:o}},this.validateAsync=async(t,n,r={})=>{let i=ct(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||Y}),a=await n,o=r.skipRelatedFieldValidation?[]:this.getRelatedFields(),s=o.reduce((e,n)=>{let r=ct(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||Y});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),c=[],l=[],u=i.some(e=>e.validate)||s.some(e=>e.validate);if(u){this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0}));for(let e of o)e.setMeta(e=>({...e,isValidating:!0}))}let d=(t,n,r)=>{let i=Nt(n.cause),o=t.getInfo();o.validationMetaMap[i]?.lastAbortController.abort();let s=new AbortController;o.validationMetaMap[i]={lastAbortController:s};let c=t===this;r.push(new Promise(async r=>{let o;try{o=await new Promise((r,i)=>{t.timeoutIds.validations[n.cause]&&clearTimeout(t.timeoutIds.validations[n.cause]),t.timeoutIds.validations[n.cause]=setTimeout(async()=>{if(s.signal.aborted)return r(void 0);try{r(await this.runValidator({validate:n.validate,value:{value:t.store.state.value,signal:s.signal,validationSource:c?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validateAsync`}))}catch(e){i(e)}},n.debounceMs)})}catch(e){o=e}if(s.signal.aborted)return r(void 0);let l=o,u;c&&jt(o)&&(l=o.group,u=o.fields);let d=At(l),f=a[t.name]?.[i],{newErrorValue:p,newSource:m}=dt({formLevelError:f,fieldLevelError:d});if(t.getInfo().instance!==t)return r(void 0);t.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:p},errorSourceMap:{...e.errorSourceMap,[i]:m}})),c&&this.distributeFieldErrors(i,u),r(p)}))};for(let e of i)e.validate&&d(this,e,c);for(let e of s)e.validate&&d(e.field,e,l);let f=[];if((c.length||l.length)&&(f=await Promise.all(c),await Promise.all(l)),u){this.setMeta(e=>({...e,isValidating:!1}));for(let e of o)e.setMeta(e=>({...e,isValidating:!1}))}return f.filter(Boolean)},this.validateAllFields=async e=>{let t=[];return f(()=>{Object.values(this.getRelatedFields()).forEach(n=>{t.push(Promise.resolve().then(()=>n.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=(e,t,n)=>this.form.validateArrayFieldsStartingFrom(e,t,n),this.validateField=(e,t)=>this.form.validateField(e,t),this.getFieldValue=e=>this.form.getFieldValue(e),this.getFieldMeta=e=>this.form.getFieldMeta(e),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(e,t),this.setFieldValue=(e,t)=>this.form.setFieldValue(e,t),this.deleteField=e=>this.form.deleteField(e),this.pushFieldValue=(e,t)=>this.form.pushFieldValue(e,t),this.insertFieldValue=(e,t,n)=>this.form.insertFieldValue(e,t,n),this.replaceFieldValue=(e,t,n)=>this.form.replaceFieldValue(e,t,n),this.swapFieldValues=(e,t,n)=>this.form.swapFieldValues(e,t,n),this.moveFieldValues=(e,t,n)=>this.form.moveFieldValues(e,t,n),this.clearFieldValues=e=>this.form.clearFieldValues(e),this.resetField=e=>this.form.resetField(e),this.removeFieldValue=(e,t)=>this.form.removeFieldValue(e,t),this.areRelatedFieldsValid=()=>Object.values(this.getRelatedFields()).every(e=>e.state.meta.isValid),this.validate=(e,t)=>{let{fieldsErrorMap:n}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>J(this.name,e)}),{hasErrored:r}=this.validateSync(e,n[this.name]??{},{skipRelatedFieldValidation:t?.skipRelatedFieldValidation});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[Nt(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>J(this.name,e)});return this.validateAsync(e,i,{skipRelatedFieldValidation:t?.skipRelatedFieldValidation})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeGroupDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this})},e)):this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,groupApi:this})},this._handleSubmit=async e=>{this.setFormGroupState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),f(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.state.meta.isTouched||e.setMeta(e=>({...e,isTouched:!0}))})});let t=e??this.options.onSubmitMeta;this.setFormGroupState(e=>({...e,isSubmitting:!0}));let n=()=>{this.setFormGroupState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.areRelatedFieldsValid())n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});else if(await this.validate(`submit`,{skipRelatedFieldValidation:!0}),!this.areRelatedFieldsValid()||!this.state.meta.isValid)n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});else{f(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.options.listeners?.onGroupSubmit?.({value:e.state.value,fieldApi:e})})}),this.options.listeners?.onSubmit?.({groupApi:this,value:this.state.value});try{await this.options.onGroupSubmit?.({value:this.state.value,groupApi:this,meta:t}),f(()=>{this.setFormGroupState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),n()})}catch(e){throw this.setFormGroupState(e=>({...e,isSubmitSuccessful:!1})),n(),e}}},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.fieldInfo={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.store=M(e=>{this.form.formGroupMetaDerived.get(),this.form.baseStore.get();let n=this.form.getFormGroupMeta(this.name)??Ot(t.defaultMeta),r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!G(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}}),this.handleSubmit=this.handleSubmit.bind(this)}get state(){return this.store.state}runValidator(e){if(yt(e.validate)){let t=X[e.type](e.value,e.validate);return e.type===`validate`?Mt(t):t.then(Mt)}return e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function At(e){if(e)return e}function jt(e){return!!e&&typeof e==`object`&&`fields`in e}function Mt(e){if(!e||typeof e!=`object`||!(`form`in e)&&!(`fields`in e))return e;let{form:t,fields:n,...r}=e;return{...r,group:t,fields:n}}function Nt(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function Pt(e,t){if(!t)return;let n=Object.assign({},e,{state:gt(e.state)});t(n),n.fieldInfo!==e.fieldInfo&&(e.fieldInfo=n.fieldInfo),n.options!==e.options&&(e.options=n.options);let r=Object.keys({values:null,validationMetaMap:null,fieldMetaBase:null,formGroupStateBase:null,isSubmitting:null,isSubmitted:null,isValidating:null,submissionAttempts:null,isSubmitSuccessful:null,_force_re_eval:null}).reduce((t,r)=>(e.state[r]!==n.state[r]&&(t[r]=n.state[r]),t),{});return f(()=>{Object.keys(r).length&&e.baseStore.setState(e=>({...e,...r})),n.state.errorMap!==e.state.errorMap&&e.setErrorMap(n.state.errorMap)}),n}var $=typeof window<`u`?N.useLayoutEffect:N.useEffect;function Ft(e){let[t,n]=(0,N.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,N.useState)(()=>new wt({...e})),o=r;(t.form!==e.form||t.name!==e.name)&&(o=new wt({...e}),i(o),n({form:e.form,name:e.name}));let s=a(o.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),c=a(o.store,e=>e.meta.isTouched),l=a(o.store,e=>e.meta.isBlurred),u=a(o.store,e=>e.meta.isDirty),d=a(o.store,e=>e.meta.errorMap),f=a(o.store,e=>e.meta.errorSourceMap),p=a(o.store,e=>e.meta.isValidating),m=(0,N.useMemo)(()=>({...o,get state(){return{value:e.mode===`array`?o.state.value:s,get meta(){return{...o.state.meta,isTouched:c,isBlurred:l,isDirty:u,errorMap:d,errorSourceMap:f,isValidating:p}}}}}),[o,e.mode,s,c,l,u,d,f,p]);return $(o.mount,[o]),$(()=>{o.update(e)}),m}var It=(({children:e,...t})=>{let n=Ft(t),r=(0,N.useMemo)(()=>V(e,n),[e,n]);return(0,F.jsx)(F.Fragment,{children:r})});function Lt(){return(0,N.useState)(()=>mt())[0]}var Rt=N,zt=`19.3.0`.split(`.`)[0]===`17`?Lt:Rt.useId;function Bt(e){let[t,n]=(0,N.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,N.useState)(()=>new kt({...e}));(t.form!==e.form||t.name!==e.name)&&(i(new kt({...e})),n({form:e.form,name:e.name}));let o=a(r.store,e=>e.value),s=a(r.store,e=>e.meta.isTouched),c=a(r.store,e=>e.meta.isBlurred),l=a(r.store,e=>e.meta.isDirty),u=a(r.store,e=>e.meta.errorMap),d=a(r.store,e=>e.meta.errorSourceMap),f=a(r.store,e=>e.meta.isValidating),p=a(r.store,e=>e.meta.isSubmitting),m=a(r.store,e=>e.meta.isSubmitted),h=a(r.store,e=>e.meta.submissionAttempts),g=a(r.store,e=>e.meta.isSubmitSuccessful),_=a(r.store,e=>e.meta.canSubmit),v=a(r.store,e=>e.meta.isValid),y=a(r.store,e=>e.meta.isFieldsValid),b=a(r.store,e=>e.meta.isFieldsValidating),x=a(r.store,e=>e.meta.isGroupValid),S=(0,N.useMemo)(()=>({...r,handleSubmit:((...e)=>r._handleSubmit(...e)),get state(){return{...r.state,value:o,get meta(){return{...r.state.meta,isTouched:s,isBlurred:c,isDirty:l,errorMap:u,errorSourceMap:d,isValidating:f,isSubmitting:p,isSubmitted:m,submissionAttempts:h,isSubmitSuccessful:g,canSubmit:_,isValid:v,isFieldsValid:y,isFieldsValidating:b,isGroupValid:x}}}}}),[r,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x]);return $(r.mount,[r]),$(()=>{r.update(e)}),S}var Vt=(({children:e,...t})=>{let n=Bt(t),r=(0,N.useMemo)(()=>V(e,n),[e,n]);return(0,F.jsx)(F.Fragment,{children:r})});function Ht({form:e,selector:t=e=>e,children:n}){let r=a(e.store,t);return(0,F.jsx)(F.Fragment,{children:V(n,r)})}function Ut(e){let t=zt(),[n,r]=(0,N.useState)(e?.formId),[i,a]=(0,N.useState)(()=>new xt({...e,formId:e?.formId??t}));if(n!==e?.formId){let n=e?.formId??t;a(new xt({...e,formId:n})),r(n)}let o=(0,N.useMemo)(()=>{let e={...i,handleSubmit:((...e)=>i._handleSubmit(...e)),get formId(){return i._formId},get state(){return i.store.state}};return e.Field=function(e){return(0,F.jsx)(It,{...e,form:i})},e.FormGroup=function(e){return(0,F.jsx)(Vt,{...e,form:i})},e.Subscribe=function(e){return(0,F.jsx)(Ht,{form:i,selector:e.selector,children:e.children})},e},[i]);$(i.mount,[]),$(()=>{i.update(e)});let s=(0,N.useRef)(!1);return $(()=>{s.current&&e?.transform&&Pt(i,e.transform)},[i,e?.transform]),$(()=>{s.current=!0}),o}var Wt=`input`;function Gt({workflow:e,scenario:t,onStarted:n}){let{fields:r,whole:i}=(0,N.useMemo)(()=>{let t=j(e.input);return{fields:t??[{key:Wt,label:`Input (JSON)`,kind:`json`,required:!0,default:{}}],whole:!t}},[e.input]),a=Yt(e.name,r,i,t,n);return(0,F.jsx)(`form`,{noValidate:!0,onSubmit:e=>{e.preventDefault(),a.handleSubmit()},children:(0,F.jsxs)(Ee,{children:[(0,F.jsx)(`fieldset`,{disabled:t!==void 0,className:`group/ro contents`,children:r.map(e=>(0,F.jsx)(Xt,{form:a,field:e,path:[e.key]},e.key))}),(0,F.jsx)(Jt,{form:a,children:e=>(0,F.jsxs)(w,{type:`submit`,disabled:e,children:[e?(0,F.jsx)(ve,{"data-icon":`inline-start`}):(0,F.jsx)(m,{"aria-hidden":`true`,"data-icon":`inline-start`}),e?`Starting…`:t?`Start sandbox run`:`Start run`]})})]})})}function Kt(e,t){return Ut({defaultValues:e,validators:{onSubmitAsync:({value:e})=>t(e)}})}function qt(e,t,{at:n=e=>e,mismatch:a,failed:o}){let s=r(e);if(!s?.issues?.length)return s||console.error(`sanoma app: ${o}:`,e),{form:i(e).trim()||`${o}, and no reason was given`,fields:{}};let c={},l=[];for(let e of s.issues){let r=je(t,n(e.path),e.message);r?c[r.name]??=r.message:l.push(Ne(e))}let u=Object.keys(c).length>0;return{form:l.length?l.join(`; `):u?void 0:a,fields:c}}function Jt({form:e,children:t}){return(0,F.jsx)(e.Subscribe,{selector:e=>[e.errorMap.onSubmit,e.isSubmitting],children:([e,n])=>(0,F.jsxs)(F.Fragment,{children:[typeof e==`string`&&e&&(0,F.jsx)(u,{variant:`destructive`,children:e}),(0,F.jsx)(E,{orientation:`horizontal`,children:t(n)})]})})}function Yt(e,t,n,r,i){let a=s({navigate:!i}),o=(0,N.useMemo)(()=>{let e=r&&(n?{[Wt]:r.input}:r.input);return O(t,e)},[t,n,r]),c=async e=>{let r;try{r=await a.mutateAsync(e)}catch(e){return qt(e,t,{at:e=>n?[Wt,...e]:e,mismatch:`The input does not match the workflow's schema`,failed:`Could not start the run`})}i?.(r)};return Kt(o,async i=>{if(r)return c({scenario:r.name});let a=Pe(t,i);return Object.keys(a.errors).length?{fields:a.errors}:c({workflow:e,input:n?a.input[Wt]:a.input})})}function Xt({form:e,field:t,path:n}){let r=Ae(n);if(t.kind===`object`)return(0,F.jsxs)(be,{children:[(0,F.jsx)(xe,{children:(0,F.jsx)(tn,{field:t})}),t.description&&(0,F.jsx)(T,{children:t.description}),(0,F.jsx)(Ee,{children:t.fields.map(t=>(0,F.jsx)(Xt,{form:e,field:t,path:[...n,t.key]},t.key))})]});if(t.kind===`array`){let i=t.item;return(0,F.jsx)(e.Field,{name:r,mode:`array`,children:r=>(0,F.jsxs)(be,{"data-invalid":r.state.meta.errors.length?!0:void 0,children:[(0,F.jsx)(xe,{children:(0,F.jsx)(tn,{field:t})}),t.description&&(0,F.jsx)(T,{children:t.description}),(0,F.jsxs)(Ee,{children:[r.state.value.map((a,o)=>{let s=`${t.label} ${o+1}`,c=`Remove ${s}`;return(0,F.jsxs)(E,{orientation:`horizontal`,className:`items-start`,children:[(0,F.jsx)(De,{children:(0,F.jsx)(Xt,{form:e,field:{...i,label:s},path:[...n,o]})}),(0,F.jsx)(l,{tip:c,type:`button`,className:`group-disabled/ro:hidden`,onClick:()=>r.removeValue(o),children:(0,F.jsx)(R,{"aria-hidden":`true`})})]},o)}),(0,F.jsx)(E,{orientation:`horizontal`,className:`group-disabled/ro:hidden`,children:(0,F.jsxs)(w,{type:`button`,variant:`outline`,onClick:()=>r.pushValue(k(i,i.default)),children:[(0,F.jsx)(ke,{"aria-hidden":`true`,"data-icon":`inline-start`}),`Add `,i.kind===`object`?`an item`:`a value`]})})]}),(0,F.jsx)(nn,{errors:r.state.meta.errors})]})})}return(0,F.jsx)($t,{form:e,field:t,name:r})}var Zt={string:{type:`text`},person:{type:`text`,autoComplete:`off`},number:{type:`number`,step:`any`},integer:{type:`number`,step:1}},Qt=/^\d{4}-\d{2}-\d{2}$/;function $t({form:e,field:t,name:n}){let r=`field-${n}`;return(0,F.jsx)(e.Field,{name:n,children:e=>{let i=e.state.value,a=typeof i==`string`?i:``,o=e.state.meta.errors.length?!0:void 0,s=t=>e.handleChange(t.target.value),c={id:r,"aria-invalid":o,onBlur:e.handleBlur},l=(0,F.jsxs)(F.Fragment,{children:[t.description&&(0,F.jsx)(T,{children:t.description}),t.kind===`json`&&(0,F.jsx)(T,{children:`Entered as JSON.`})]});if(t.kind===`boolean`)return(0,F.jsxs)(E,{orientation:`horizontal`,"data-invalid":o,children:[(0,F.jsx)(Xe,{id:r,"aria-invalid":o,checked:i===!0,onCheckedChange:t=>e.handleChange(t===!0)}),(0,F.jsxs)(De,{children:[(0,F.jsx)(Se,{htmlFor:r,children:(0,F.jsx)(tn,{field:t})}),l,(0,F.jsx)(nn,{errors:e.state.meta.errors})]})]});let u;switch(t.kind){case`string`:case`person`:case`number`:case`integer`:u=(0,F.jsx)(Oe,{...c,...Zt[t.kind],value:a,onChange:s});break;case`date`:u=a===``||Qt.test(a)?(0,F.jsx)(Oe,{...c,type:`date`,value:a,onChange:s}):(0,F.jsx)(en,{...c,value:a,onChange:e.handleChange});break;case`datetime`:u=(0,F.jsx)(en,{...c,value:a,onChange:e.handleChange});break;case`enum`:u=(0,F.jsxs)(Ce,{...c,name:n,className:`w-full`,value:a,onChange:s,children:[(0,F.jsx)(Te,{value:``,disabled:t.required,children:t.required?`Choose…`:`(leave out)`}),(t.options??[]).map((e,t)=>(0,F.jsx)(Te,{value:String(t),children:String(e)},String(e)))]});break;case`json`:u=(0,F.jsx)(D,{...c,className:`font-mono`,rows:4,placeholder:`JSON`,value:a,onChange:s})}return(0,F.jsxs)(E,{"data-invalid":o,children:[(0,F.jsx)(Se,{htmlFor:r,children:(0,F.jsx)(tn,{field:t})}),u,l,(0,F.jsx)(nn,{errors:e.state.meta.errors})]})}})}function en({value:e,onChange:t,...n}){return o()?(0,F.jsx)(Oe,{...n,type:`datetime-local`,value:A(e),onChange:e=>t(Me(e.target.value)??``)}):(0,F.jsx)(Oe,{...n,type:`text`,value:e,readOnly:!0})}function tn({field:e}){return(0,F.jsxs)(F.Fragment,{children:[e.label,e.required?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{"aria-hidden":!0,className:`text-destructive`,children:`*`}),(0,F.jsx)(`span`,{className:`sr-only`,children:`(required)`})]}):(0,F.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:`(optional)`})]})}function nn({errors:e}){return(0,F.jsx)(ye,{errors:e.filter(Boolean).map(e=>({message:String(e)}))})}export{Kt as a,qt as i,Jt as n,R as o,Gt as r,Xe as s,Xt as t};
@@ -0,0 +1 @@
1
+ import{a as e,i as t,r as n,s as r}from"./engine-CBuzy-Ik.js";import{t as i}from"./react-dom-D6fTz1bt.js";import{I as a,M as o,N as s,O as c,P as l,T as u,_ as d,b as f,c as p,i as m,j as h,l as g,o as _,s as v,v as y,x as b,y as x}from"./button-D5kdANef.js";var S=e((e=>{var n=t();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),C=e(((e,t)=>{t.exports=S()})),ee=e((e=>{var n=t(),r=C();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=n.useRef,c=n.useEffect,l=n.useMemo,u=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),w=e(((e,t)=>{t.exports=ee()})),T=r(t(),1),E=r(i(),1),D=n();function O(e){return e?.ownerDocument||document}function k(){let[,e]=T.useState({});return T.useCallback(()=>{e({})},[])}var A=0;function j(e,t=`mui`){let n=T.useRef(void 0),r=k(),i=e??n.current;return T.useEffect(()=>{n.current??(A+=1,n.current=`${t}-${A}`,e??r())},[e,t,r]),i}var M=f.useId;function N(e,t){if(M!==void 0){let n=M();return e??(t?`${t}-${n}`:n)}return j(e,t)}function P(e){return N(e,`base-ui`)}function F(e,t,n,r){let i=!1,a=!1,o=r??v;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function I(e,t,n){let r=n??v;return{reason:e,event:t??new Event(`base-ui`),...r}}var L=`none`,te=`trigger-press`,ne=`trigger-hover`,R=`trigger-focus`,re=`outside-press`,ie=`item-press`,z=`close-press`,B=`track-press`,V=`input-change`,H=`focus-out`,ae=`escape-key`,U=`list-navigation`,W=`keyboard`,G=`pointer`,oe=`drag`,se=`cancel-open`,ce=`sibling-open`,le=`disabled`,ue=`missing`,de=`initial`,fe=`imperative-action`;function pe(e){T.useEffect(e,_)}var me=null;globalThis.requestAnimationFrame;var he=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},K=class e{static create(){return new e}static request(e){return he.request(e)}static cancel(e){return he.cancel(e)}currentId=me;request(e){this.cancel(),this.currentId=he.request(()=>{this.currentId=me,e()})}cancel=()=>{this.currentId!==me&&(he.cancel(this.currentId),this.currentId=me)};disposeEffect=()=>this.cancel};function ge(){let e=x(K.create).current;return pe(e.disposeEffect),e}function _e(e,t=!1,n=!1,r=!1){let[i,a]=T.useState(e&&t?`idle`:void 0),[o,s]=T.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),d(()=>{if(!e&&o&&i!==`ending`&&n){let e=K.request(()=>{a(`ending`)});return()=>{K.cancel(e)}}},[e,o,i,n]),d(()=>{if(!e||t||i===void 0)return;let n=K.request(()=>{a(void 0)});return()=>{K.cancel(n)}},[t,e,i]),d(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=K.request(()=>{a(`idle`)});return()=>{K.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}var ve=`data-starting-style`,ye=`data-ending-style`,be={[ve]:``},xe={[ye]:``},Se={transitionStatus(e){return e===`starting`?be:e===`ending`?xe:null}};function q(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}var J=0,Ce=class e{static create(){return new e}currentId=J;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=J,t()},e)}isStarted(){return this.currentId!==J}clear=()=>{this.currentId!==J&&(clearTimeout(this.currentId),this.currentId=J)};disposeEffect=()=>this.clear};function we(){let e=x(Ce.create).current;return pe(e.disposeEffect),e}function Te(e){let t=x(Ee,e).current;return t.next=e,d(t.effect),t}function Ee(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function De(e){return e==null?e:`current`in e?e.current:e}function Oe(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var ke=null;function Ae(e){if(!ke){let e=[];ke=e,queueMicrotask(()=>{ke=null,E.flushSync(()=>{for(let t of e)t()})})}ke.push(e)}function je(e,t=!1,n=!1){let r=ge();return y((i,a=null)=>{r.cancel();let o=De(e);if(o==null)return;let s=o,c=()=>{n?Ae(()=>{a?.aborted||i()}):E.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(Oe(s).map(e=>e.finished.then(p))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(Oe(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=ve;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function Me(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=y(a),s=je(r,n,i);T.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function Ne(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Pe,platform:Fe,maxTouchPoints:Ie}=Ne(),Le=Pe.toLowerCase(),Y=Fe.toLowerCase(),Re=/^i(os$|p)/.test(Y)||Y===`macintel`&&Ie>1,ze=`android`,Be=Y===ze||Le.includes(ze),Ve=!Re&&Y.startsWith(`mac`);Y.startsWith(`win`),!Be&&/^(linux|chrome os)/.test(Y);var He=Ve||Re,X=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!X&&Le.includes(`firefox`),!X&&Le.includes(`chrom`);var Ue=He,We=/jsdom|happydom/.test(Le);function Ge(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Z(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&a(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ke(e,t){let n=e;for(;n;){if(h(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(a(n)?n.host:null)}return null}function qe(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var Je=`data-base-ui-focusable`,Ye=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Xe=`ArrowLeft`,Ze=`ArrowRight`,Qe=`ArrowUp`,$e=`ArrowDown`,et=`data-open`,tt=`data-closed`,nt=ve,rt=ye,it=`data-anchor-hidden`,at=`data-popup-open`,ot=`data-pressed`,st={[at]:``},ct={[at]:``,[ot]:``},lt={[et]:``},ut={[tt]:``},dt={[it]:``},ft={open(e){return e?st:null}},pt={open(e){return e?ct:null}},mt={open(e){return e?lt:ut},anchorHidden(e){return e?dt:null}},ht={...mt,...Se},gt=`data-trigger-disabled`;function _t(e,t){if(!h(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(gt);for(let[,e]of t.entries())if(Z(e,n))return!e.hasAttribute(gt);return!1}function vt(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function yt(e){return e.matches(`html,body`)}function bt(e){return o(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function xt(e){return Ke(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ye}`)!=null}function St(e){return e?e.getAttribute(`role`)===`combobox`&&bt(e):!1}function Ct(e){if(!e||We)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function wt(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Tt(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Tt(e,t.id,n)])}function Et(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Dt(e){e.preventDefault(),e.stopPropagation()}function Ot(e){return`nativeEvent`in e}function kt(e){return e.pointerType===``&&e.isTrusted?!0:Be&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function At(e){return We?!1:!Be&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(Be||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function jt(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Mt(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Nt(e,t){return t<0||t>=e.length}function Pt(e,t){return Lt(e.current,{disabledIndices:t})}function Ft(e,t){return Lt(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function It(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>Lt(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:Nt(e,u)?-1:u,wrapped:d}}function Lt(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Rt(e,a,r));return a}function Rt(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!Bt(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function zt(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Bt(e,t=e?b(e):null){return!e||!e.isConnected||!t||zt(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var Vt=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Ht(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return a(n)?n.host:null}function Ut(e){for(let t of Array.from(e.children))if(u(t)===`summary`)return t;return null}function Wt(e,t){let n=Ut(t);return!!n&&(e===n||Z(n,e))}function Gt(e){let t=e?u(e):``;return e!=null&&e.matches(Vt)&&(t!==`summary`||e.parentElement!=null&&u(e.parentElement)===`details`&&Ut(e.parentElement)===e)&&(t!==`details`||Ut(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Kt(e){if(!Gt(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Ht(t)){let n=t!==e,r=u(t)===`slot`;if(t.hasAttribute(`inert`)||n&&u(t)===`details`&&!t.open&&!Wt(e,t)||t.hasAttribute(`hidden`)||!r&&!qt(t,n))return!1}return!0}function qt(e,t){let n=b(e);return t?n.display!==`none`:Bt(e,n)}function Jt(e){let t=e.tabIndex;if(t<0){let t=u(e);if(t===`details`||t===`audio`||t===`video`||o(e)&&e.isContentEditable)return 0}return t}function Yt(e){if(u(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Xt(e,t){let n=Yt(e);if(!n)return!0;let r=t.find(e=>{let t=Yt(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Yt(e);return t?.name===n.name&&t.form===n.form})===n}function Zt(e){if(o(e)&&u(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return o(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Qt(e,t){Zt(e).forEach(e=>{Gt(e)&&t.push(e),Qt(e,t)})}function $t(e,t,n){Zt(e).forEach(e=>{o(e)&&e.matches(t)&&n.push(e),$t(e,t,n)})}function en(e){return Kt(e)&&Jt(e)>=0}function tn(e){let t=[];return Qt(e,t),t.filter(Kt)}function nn(e){let t=tn(e);return t.filter(e=>Jt(e)>=0&&Xt(e,t))}function rn(e,t){let n=nn(e),r=n.length;if(r===0)return;let i=Ge(O(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function an(e){return rn(O(e).body,1)||e}function on(e){return rn(O(e).body,-1)||e}function sn(e,t,n){if(!e)return null;let r=[];Qt(O(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(Kt);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!Z(n,o)&&en(o)&&Xt(o,a))return o}return r[i]}function cn(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Z(n,r)}function ln(e){nn(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function un(e){let t=[];$t(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var dn=C(),fn=r(w(),1),pn=[],mn=void 0;function hn(){return mn}function gn(e){pn.push(e)}function _n(e){let t=(t,n)=>{let r=x(yn).current,i;try{mn=r;for(let e of pn)e.before(r);i=e(t,n);for(let e of pn)e.after(r);r.didInitialize=!0}finally{mn=void 0}return i};return t.displayName=e.displayName||e.name,t}function vn(e){return T.forwardRef(_n(e))}function yn(){return{didInitialize:!1}}function Q(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var bn={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},xn={...bn,position:`fixed`,margin:0,top:0,left:0},Sn={...bn,position:`absolute`},Cn=T.forwardRef(function(e,t){let[n,r]=T.useState();d(()=>{Ue&&X&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,D.jsx)(`span`,{...e,ref:t,style:xn,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function wn(e){return`data-base-ui-${e}`}var Tn={style:{transition:`none`}},En=`data-base-ui-click-trigger`,Dn={fallbackAxisSide:`none`},On={fallbackAxisSide:`end`},kn={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},An=T.createContext(null),jn=()=>T.useContext(An),Mn=wn(`portal`);function Nn(e={}){let{ref:t,container:n,componentProps:r=v,elementProps:i}=e,a=N(),o=jn()?.portalNode,[s,c]=T.useState(null),[u,f]=T.useState(null),p=y(e=>{e!==null&&f(e)}),h=T.useRef(null);d(()=>{if(n===null){h.current&&(h.current=null,f(null),c(null));return}let e=(n&&(l(n)?n:n.current))??o??document.body;e==null?h.current&&(h.current=null,f(null),c(null)):h.current!==e&&(h.current=e,f(null),c(e))},[n,o]);let g=m(`div`,r,{ref:[t,p],props:[{id:a,[Mn]:``},i]}),_=s&&g?E.createPortal(g,s):null;return{node:u,nodeId:T.isValidElement(g)?g.props.id:void 0,subtree:_}}var Pn=T.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:f}=Nn({container:o,ref:t,componentProps:e,elementProps:c}),p=T.useRef(null),m=T.useRef(null),h=T.useRef(null),g=T.useRef(null),[_,v]=T.useState(null),y=T.useRef(!1),b=_?.modal,x=_?.open,S=!!_&&!_.modal&&_.open&&!!l;T.useEffect(()=>{if(!l||b)return;function e(e){l&&e.relatedTarget&&cn(e)&&(e.type===`focusin`?y.current&&=(un(l),!1):(ln(l),y.current=!0))}return Q(q(l,`focusin`,e,!0),q(l,`focusout`,e,!0))},[l,b]),d(()=>{l&&x===!0&&y.current&&(un(l),y.current=!1)},[x,l]);let C=T.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:m,beforeInsideRef:h,afterInsideRef:g,portalNode:l,setFocusManagerState:v}),[l]);return(0,D.jsxs)(T.Fragment,{children:[f,(0,D.jsxs)(An.Provider,{value:C,children:[S&&l&&(0,D.jsx)(Cn,{"data-type":`outside`,ref:p,onFocus:e=>{cn(e,l)?h.current?.focus():on(_?_.domReference:null)?.focus()}}),S&&l&&(0,D.jsx)(`span`,{role:s,"aria-owns":u,style:kn}),l&&E.createPortal(a,l),S&&l&&(0,D.jsx)(Cn,{"data-type":`outside`,ref:m,onFocus:e=>{cn(e,l)?g.current?.focus():(an(_?_.domReference:null)?.focus(),_?.closeOnFocusOut&&_?.onOpenChange(!1,F(`focus-out`,e.nativeEvent)))}})]})]})});function Fn(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var In=class{nodesRef={current:[]};events=Fn();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},Ln=T.createContext(null),Rn=T.createContext(null),zn=()=>T.useContext(Ln)?.id||null,Bn=e=>{let t=T.useContext(Rn);return e??t};function Vn(e){let t=N(),n=Bn(e),r=zn();return d(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Hn(e){let{children:t,id:n}=e,r=zn();return(0,D.jsx)(Ln.Provider,{value:T.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Un(e){let{children:t,externalTree:n}=e,r=x(()=>n??new In).current;return(0,D.jsx)(Rn.Provider,{value:r,children:t})}function Wn(){return!1}function Gn(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Kn(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:l=`sloppy`,referencePress:u=Wn,bubbles:d,externalTree:f}=t,p=e.useState(`open`),m=e.useState(`floatingElement`),{dataRef:g,events:_}=e.context,v=Bn(f),x=y(typeof i==`function`?i:()=>!1),S=typeof i==`function`?x:i,C=S!==!1,ee=y(()=>l),{escapeKey:w,outsidePress:E}=Gn(d),D=T.useRef(!1),k=T.useRef(!1),A=T.useRef(!1),j=T.useRef(!1),M=T.useRef(!1),N=T.useRef(``),P=T.useRef(null),I=we(),L=we(),ne=we(),R=y(()=>{L.clear(),g.current.insideReactTree=!1}),ie=y(e=>{let t=g.current.floatingContext?.nodeId;return(v?Tt(v.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),z=y(t=>vt(t,e.select(`floatingElement`))||vt(t,e.select(`domReferenceElement`))),B=y(t=>{u()&&e.setOpen(!1,F(te,t.nativeEvent))}),V=y(t=>{if(!p||!n||!r||t.key!==`Escape`)return;let i=Ot(t)?t.nativeEvent:t;if(M.current||i.isComposing||!w&&ie(`__escapeKeyBubbles`))return;let a=F(ae,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!w&&!a.isPropagationAllowed&&t.stopPropagation()}),H=y(()=>{g.current.insideReactTree=!0,L.start(0,R)}),U=y(t=>{if(!p||!n||t.button!==0)return;let r=qe(t.nativeEvent);Z(e.select(`floatingElement`),r)&&(D.current||(D.current=!0,k.current=!1))}),W=y(e=>{p&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&D.current&&(k.current=!0)});T.useEffect(()=>{function e(e){e.open||(j.current=!1)}return _.on(`openchange`,e),()=>{_.off(`openchange`,e)}},[_]),T.useEffect(()=>R,[R]),T.useEffect(()=>{if(!p||!n)return p||(j.current=!1,M.current=!1,N.current=``,P.current=null),R;g.current.__escapeKeyBubbles=w,g.current.__outsidePressBubbles=E;let t=new Ce,i=O(m);function l(){ne.clear(),M.current=!0}function u(){M.current=!0,ne.start(X?5:0,()=>{M.current=!1})}function d(){A.current=!0,t.start(0,()=>{A.current=!1})}function f(){D.current=!1,k.current=!1}function _(){let e=N.current,t=e===`pen`||!e?`mouse`:e,n=ee(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function y(e){let t=_();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function x(e){let t=g.current.floatingContext?.nodeId,n=v&&Tt(v.nodesRef.current,t).some(t=>vt(e,t.context?.elements.floating));return z(e)||n}function T(n){if(y(n)){n.type!==`click`&&!z(n)&&(t.clear(),A.current=!1),R();return}if(g.current.insideReactTree){R();return}let r=qe(n),i=`[${wn(`inert`)}]`,l=h(r)?r.getRootNode():null,u=Array.from((a(l)?l:O(e.select(`floatingElement`))).querySelectorAll(i)),d=e.context.triggerElements;if(r&&(d.hasElement(r)||d.hasMatchingElement(e=>Z(e,r))))return;let f=h(r)?r:null;for(;f&&!s(f);){let e=c(f);if(s(e)||!h(e))break;f=e}if(!(u.length&&h(r)&&!yt(r)&&!Z(r,e.select(`floatingElement`))&&u.every(e=>!Z(f,e)))){if(o(r)&&!(`touches`in n)){let e=s(r),t=b(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),c=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,l=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,u=t.direction===`rtl`,d=l&&(u?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),f=c&&n.offsetY>r.clientHeight;if(d||f)return}if(!x(n)){if(_()===`intentional`){if(n.detail!==0&&!kt(n)&&!j.current)return;if(A.current){t.clear(),A.current=!1;return}}typeof S==`function`&&!S(n)||ie(`__outsidePressBubbles`)||(e.setOpen(!1,F(re,n)),R())}}}function L(t){_()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!z(t)&&T(t)}function te(t){if(_()!==`sloppy`||!e.select(`open`)||!n||z(t))return;let r=t.touches[0];r&&(P.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},I.start(1e3,()=>{P.current&&(P.current.dismissOnTouchEnd=!1,P.current.dismissOnMouseDown=!1)}))}function B(e,t){let n=qe(e);if(!n)return;let r=q(n,e.type,()=>{t(e),r()})}function H(e){N.current=`touch`,B(e,te)}function ae(e){I.clear(),e.type===`pointerdown`&&(e.button===0&&(j.current=!0),N.current=e.pointerType),(e.type!==`mousedown`||!P.current||P.current.dismissOnMouseDown)&&B(e,e=>{e.type===`pointerdown`?L(e):T(e)})}function U(e){if(e.type===`pointercancel`&&(j.current=!1),!D.current)return;let n=k.current;f(),_()===`intentional`&&(e.type===`pointercancel`?n&&d():x(e)||(n?d():(typeof S!=`function`||S(e))&&(t.clear(),A.current=!0,R())))}function W(e){if(_()!==`sloppy`||!P.current||z(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-P.current.startX),r=Math.abs(t.clientY-P.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(P.current.dismissOnTouchEnd=!0),i>10&&(T(e),I.clear(),P.current=null)}function G(e){B(e,W)}function oe(e){_()===`sloppy`&&P.current&&!z(e)&&(P.current.dismissOnTouchEnd&&T(e),I.clear(),P.current=null)}function se(e){B(e,oe)}let ce=Q(r&&Q(q(i,`keydown`,V),q(i,`compositionstart`,l),q(i,`compositionend`,u)),C&&Q(q(i,`click`,ae,!0),q(i,`pointerdown`,ae,!0),q(i,`pointerup`,U,!0),q(i,`pointercancel`,U,!0),q(i,`mousedown`,ae,!0),q(i,`mouseup`,U,!0),q(i,`touchstart`,H,{capture:!0,passive:!0}),q(i,`touchmove`,G,{capture:!0,passive:!0}),q(i,`touchend`,se,{capture:!0,passive:!0})));return()=>{ce(),t.clear(),f(),A.current=!1}},[g,m,r,C,S,p,n,w,E,V,R,ee,ie,z,v,e,I,ne]);let G=T.useMemo(()=>({onKeyDown:V,onPointerDown:B,onClick:B}),[V,B]),oe=T.useMemo(()=>({onKeyDown:V,onPointerDown:W,onMouseDown:W,onClickCapture:H,onMouseDownCapture(e){H(),U(e)},onPointerDownCapture(e){H(),U(e)},onMouseUpCapture:H,onTouchEndCapture:H,onTouchMoveCapture:H}),[V,H,U,W]);return T.useMemo(()=>n?{reference:G,floating:oe,trigger:G}:{},[n,G,oe])}function qn(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),d(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};h(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function Jn(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=y(i),{mounted:c,setMounted:l,transitionStatus:u}=_e(t,!1,!1,o),f=!t&&r;d(()=>{t&&s(!1)},[t,s]);let p=T.useRef(c),m=T.useRef(!1),h=k(),g=()=>{p.current=!1,l(!1),a()};d(()=>{p.current=c,m.current&&(m.current=!1,!t&&c&&g())});let _=y(()=>{p.current&&(t?(m.current=!0,h()):g())});return Me({enabled:c&&!t&&!f,open:t,ref:n,onComplete(){t||_()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:f,forceUnmount:_}}var Yn={tabIndex:-1,[Je]:``};function Xn(e){return t=>t!==`touch`||e.current}function Zn(e,t=!1){let n=N(),r=zn()!=null,i=x(()=>e(n,r)).current;return qn({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function Qn({handle:e,store:t}){return d(()=>e.attachStore(t),[e,t]),null}function $n(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function er(e,t){let n=T.useRef(null);return y(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),$n(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),$n(t))})}function tr(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function nr(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function rr(e,t,n,r={}){let i=n.reason,a=i===ne,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=nr(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=tr(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?E.flushSync(l):l()}function ir(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=er(e,n),o=y(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=y(e=>{a(e),e&&o(e)});return d(()=>(s(t.current),()=>s(null)),[s,t,n,e]),d(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function ar(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=T.useRef(null),i=e.useState(`open`),a=e.useState(`triggerCount`),o=e.useState(`activeTriggerId`),s=e.useState(`activeTriggerElement`);d(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=F(L);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,a,o,s,n])}function or(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=Jn({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return x(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function sr(e,t){e.useSyncedValues(t),d(()=>()=>{e.update({activeTriggerProps:v,inactiveTriggerProps:v,popupProps:v})},[e])}function cr(e,t){d(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),d(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var lr=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},ur=g(19)?pr:mr;function dr(e,t,n,r,i){return ur(e,t,n,r,i)}function fr(e,t,n,r,i){let a=T.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,dn.useSyncExternalStore)(e.subscribe,a,a)}gn({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,dn.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function pr(e,t,n,r,i){let a=hn();if(!a)return fr(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],s.store===e&&s.selector===t&&Object.is(s.a1,n)&&Object.is(s.a2,r)&&Object.is(s.a3,i)||(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function mr(e,t,n,r,i){return(0,fn.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var hr=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return dr(this,e,t,n,r)}},gr=class extends hr{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){T.useDebugValue(e);let n=this;d(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;d(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);d(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){T.useDebugValue(e);let n=this,r=t!==void 0;d(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return T.useDebugValue(e),dr(this,this.selectors[e],t,n,r)}useContextCallback(e,t){T.useDebugValue(e);let n=y(t??p);this.context[e]=n}useStateSetter(e){let t=T.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},_r={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},vr=class extends gr{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Fn(),nested:n,triggerElements:i},_r),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Mt(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function yr(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new vr({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:v,inactiveTriggerProps:v,popupProps:v}}var $=e=>e.triggerIdProp??e.activeTriggerId,br=e=>e.openProp??e.open,xr=e=>(e.popupElement?.id??e.floatingId)||void 0;function Sr(e,t){return t!==void 0&&br(e)&&$(e)===t}function Cr(e,t){return Sr(e,t)?!0:t!==void 0&&br(e)&&$(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var wr={open:br,mounted:e=>e.mounted,transitionStatus:e=>br(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:$,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:xr,isTriggerActive:(e,t)=>t!==void 0&&$(e)===t,isOpenedByTrigger:(e,t)=>Sr(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&$(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Cr(e,t)?xr(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};export{jt as $,de as $t,Dn as A,Re as At,an as B,ye as Bt,Bn as C,Qe as Ct,jn as D,qe as Dt,Nn as E,Z as Et,Sn as F,Te as Ft,nn as G,pe as Gt,sn as H,_e as Ht,Q as I,Ce as It,Pt as J,le as Jt,Lt as K,se as Kt,_n as L,we as Lt,wn as M,Me as Mt,Cn as N,je as Nt,En as O,We as Ot,xn as P,De as Pt,Rt as Q,fe as Qt,vn as R,q as Rt,zn as S,Ze as St,Pn as T,Ke as Tt,cn as U,K as Ut,on as V,ve as Vt,en as W,ge as Wt,Bt as X,ae as Xt,It as Y,oe as Yt,Nt as Z,H as Zt,qn as _,w as _n,rt as _t,Yn as a,L as an,wt as at,Un as b,$e as bt,nr as c,ce as cn,St as ct,ar as d,ne as dn,gt as dt,V as en,kt as et,or as f,te as fn,mt as ft,ir as g,O as gn,tt as gt,cr as h,P as hn,ft as ht,lr as i,ue as in,Tt as it,On as j,Ve as jt,Tn as k,X as kt,Xn as l,B as ln,bt as lt,Zn as m,I as mn,pt as mt,wr as n,W as nn,Dt as nt,Qn as o,re as on,xt as ot,sr as p,F as pn,ht as pt,Ft as q,z as qt,gr as r,U as rn,Et as rt,rr as s,G as sn,_t as st,yr as t,ie as tn,At as tt,tr as u,R as un,Ct as ut,Kn as v,C as vn,et as vt,In as w,Ge as wt,Vn as x,Xe as xt,Hn as y,nt as yt,tn as z,Se as zt};