sanoma 0.11.21 → 0.11.23

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 (728) hide show
  1. package/README.md +55 -14
  2. package/app/README.md +12 -8
  3. package/app/dist/api.d.ts +191 -5
  4. package/app/dist/api.js +125 -4
  5. package/app/dist/api.js.map +1 -1
  6. package/app/dist/build.d.ts +28 -3
  7. package/app/dist/build.js +154 -15
  8. package/app/dist/build.js.map +1 -1
  9. package/app/dist/bundle-build.d.ts +32 -0
  10. package/app/dist/bundle-build.js +127 -67
  11. package/app/dist/bundle-build.js.map +1 -1
  12. package/app/dist/client/assets/ArrowDown.es-BVRf--PS.js +1 -0
  13. package/app/dist/client/assets/CaretDown.es-D12mWb2j.js +1 -0
  14. package/app/dist/client/assets/CatchBoundary-Cb__yx-s.js +1 -0
  15. package/app/dist/client/assets/Check.es-b7BdqO2s.js +1 -0
  16. package/app/dist/client/assets/CheckCircle.es-DKXiWmAT.js +1 -0
  17. package/app/dist/client/assets/Copy.es-CvUujKw7.js +1 -0
  18. package/app/dist/client/assets/DialogTitle-5oboyLiq.js +1 -0
  19. package/app/dist/client/assets/FloppyDisk.es-CDyDob8p.js +1 -0
  20. package/app/dist/client/assets/Globe.es-C1pgZCGM.js +1 -0
  21. package/app/dist/client/assets/MagnifyingGlass.es-CZ3i6pz0.js +1 -0
  22. package/app/dist/client/assets/Play.es-DGJ1CGhp.js +1 -0
  23. package/app/dist/client/assets/Plug.es-BPhGL8MK.js +1 -0
  24. package/app/dist/client/assets/Plus.es-i3Vaa2WW.js +1 -0
  25. package/app/dist/client/assets/Separator-Cu9cQDBN.js +1 -0
  26. package/app/dist/client/assets/X.es-B7rq0E_-.js +1 -0
  27. package/app/dist/client/assets/_id-0_Y-lz6G.js +1 -0
  28. package/app/dist/client/assets/_id-3tGIwJ5T.js +1 -0
  29. package/app/dist/client/assets/_id-CgPVeQe8.js +1 -0
  30. package/app/dist/client/assets/_id-DFlFuBDE.js +1 -0
  31. package/app/dist/client/assets/_id-QNnNLGx_.js +1 -0
  32. package/app/dist/client/assets/_name-6k1yqjX8.js +1 -0
  33. package/app/dist/client/assets/_name-B4Qba2-o.js +4 -0
  34. package/app/dist/client/assets/_name-BfPXcP49.js +1 -0
  35. package/app/dist/client/assets/_name-CqBzHz7c.js +1 -0
  36. package/app/dist/client/assets/_vendor-CfHRJBG8.js +1 -0
  37. package/app/dist/client/assets/_vendor-Dj7KCZ74.js +1 -0
  38. package/app/dist/client/assets/app-chrome-CFH47gLL.js +5 -0
  39. package/app/dist/client/assets/app-scope-Z_2GE9oz.js +1 -0
  40. package/app/dist/client/assets/approval-CgksyU5L.js +1 -0
  41. package/app/dist/client/assets/apps-BDsPVmMY.js +1 -0
  42. package/app/dist/client/assets/button-D5kdANef.js +1 -0
  43. package/app/dist/client/assets/change-glance-D6N6Xaqu.js +1 -0
  44. package/app/dist/client/assets/changes-B6xxBiC0.js +1 -0
  45. package/app/dist/client/assets/changes-BS7eJI5T.js +1 -0
  46. package/app/dist/client/assets/chat-Bw3WhRE9.js +14 -0
  47. package/app/dist/client/assets/chat-button-DNusaP5n.js +1 -0
  48. package/app/dist/client/assets/chat-prompt-z0XJPDtH.js +1 -0
  49. package/app/dist/client/assets/{code-BVYaiQEr.js → code-CT4-YDKq.js} +2 -2
  50. package/app/dist/client/assets/common-DZLdx_jS.js +3 -0
  51. package/app/dist/client/assets/composite-CoGyvQjv.js +1 -0
  52. package/app/dist/client/assets/connect-BMk-KP-f.js +1 -0
  53. package/app/dist/client/assets/connections-TbS_jeiy.js +5 -0
  54. package/app/dist/client/assets/connectors-CgRpyRdd.js +1 -0
  55. package/app/dist/client/assets/credentials-Dxpl8sUw.js +1 -0
  56. package/app/dist/client/assets/css-BGIxQoYs.js +1 -0
  57. package/app/dist/client/assets/css-DgaLhXQH.js +1 -0
  58. package/app/dist/client/assets/data-lKkklNeo.js +1 -0
  59. package/app/dist/client/assets/decidable-w2VGgZwN.js +1 -0
  60. package/app/dist/client/assets/declaration-form-CAwox7F1.js +1 -0
  61. package/app/dist/client/assets/dialog-DDAfDsGh.js +1 -0
  62. package/app/dist/client/assets/diff-woXpYk--.js +1 -0
  63. package/app/dist/client/assets/engine-CBuzy-Ik.js +1 -0
  64. package/app/dist/client/assets/existing-2kDivy4p.js +1 -0
  65. package/app/dist/client/assets/fence-BdtS5gi0.js +157 -0
  66. package/app/dist/client/assets/github-dark-C-LZuMrd.js +1 -0
  67. package/app/dist/client/assets/github-light-EUqPIrTm.js +1 -0
  68. package/app/dist/client/assets/graph-BqVQ68hK.js +7 -0
  69. package/app/dist/client/assets/grid-diff-Jj1nTy52.js +1 -0
  70. package/app/dist/client/assets/held-card-DjBO8PTe.js +1 -0
  71. package/app/dist/client/assets/highlighted-body-JLMTFACH-Co7ss_Ht.js +1 -0
  72. package/app/dist/client/assets/hosting-DC7Pftfb.js +1 -0
  73. package/app/dist/client/assets/html-BHZv6uqE.js +1 -0
  74. package/app/dist/client/assets/import-DhVQArmJ.js +1 -0
  75. package/app/dist/client/assets/inbox-5h39e_tI.js +1 -0
  76. package/app/dist/client/assets/inbox-CUNaP4uz.js +1 -0
  77. package/app/dist/client/assets/index-CA_5CFb4.js +10 -0
  78. package/app/dist/client/assets/item-vV00RYfb.js +1 -0
  79. package/app/dist/client/assets/javascript-BzbQS41l.js +1 -0
  80. package/app/dist/client/assets/javascript-CpIGwZ_Y.js +1 -0
  81. package/app/dist/client/assets/json-qhed-kSA.js +1 -0
  82. package/app/dist/client/assets/jsx-Bz0zcwM4.js +1 -0
  83. package/app/dist/client/assets/kit-BZcdh1Xm.js +1 -0
  84. package/app/dist/client/assets/lazyRouteComponent-C2a8bGcK.js +1 -0
  85. package/app/dist/client/assets/markdown-BYOwaDjH.js +1 -0
  86. package/app/dist/client/assets/markdown-bsqylRZb.js +164 -0
  87. package/app/dist/client/assets/mermaid-WFAXDIZX-CYMnek4e.js +1 -0
  88. package/app/dist/client/assets/motion-D6e1hqz4.js +1 -0
  89. package/app/dist/client/assets/people-Bn8GAJ3z.js +1 -0
  90. package/app/dist/client/assets/permissions-Csf87P7b.js +2 -0
  91. package/app/dist/client/assets/permissions-grid-CzK64E29.js +1 -0
  92. package/app/dist/client/assets/preload-helper-BLdHbfdN.js +1 -0
  93. package/app/dist/client/assets/python-gzcpVVnB.js +1 -0
  94. package/app/dist/client/assets/queries-XJ-fmuYb.js +57 -0
  95. package/app/dist/client/assets/react-dom-D6fTz1bt.js +1 -0
  96. package/app/dist/client/assets/review-BjpH-tT4.js +1 -0
  97. package/app/dist/client/assets/route-CD2oErox.js +1 -0
  98. package/app/dist/client/assets/route-CRwDZE-c.js +1 -0
  99. package/app/dist/client/assets/routes-gbZbqIhO.js +1 -0
  100. package/app/dist/client/assets/runs-table-nkQLXJxG.js +1 -0
  101. package/app/dist/client/assets/scenario-CZ7tmap7.js +1 -0
  102. package/app/dist/client/assets/scenario-graph-W2XcWuur.js +1 -0
  103. package/app/dist/client/assets/separator-Bdtc7rou.js +1 -0
  104. package/app/dist/client/assets/{sheet-BYL9XU5s.js → sheet-P-hJsTeq.js} +1 -1
  105. package/app/dist/client/assets/shellscript-CLZ0U2zV.js +1 -0
  106. package/app/dist/client/assets/site-icon-1Mcc1UIb.js +1 -0
  107. package/app/dist/client/assets/sites.index-CXcRF_R0.js +1 -0
  108. package/app/dist/client/assets/spinner-XaRXIj9W.js +1 -0
  109. package/app/dist/client/assets/sql-CEbI0hMM.js +1 -0
  110. package/app/dist/client/assets/start-form-6whPfUoW.js +1 -0
  111. package/app/dist/client/assets/store-BT988jIX.js +1 -0
  112. package/app/dist/client/assets/style-DaqPHcI1.css +2 -0
  113. package/app/dist/client/assets/table-B81tv0LG.js +1 -0
  114. package/app/dist/client/assets/textarea-CRpYU-qx.js +1 -0
  115. package/app/dist/client/assets/tsx-udAQXfEw.js +1 -0
  116. package/app/dist/client/assets/typescript-bsJCZSQ-.js +1 -0
  117. package/app/dist/client/assets/useLoaderData-BIegJC9y.js +1 -0
  118. package/app/dist/client/assets/useOpenInteractionType-UhakpAXY.js +1 -0
  119. package/app/dist/client/assets/useRegisterFieldControl-CT8iqvDE.js +1 -0
  120. package/app/dist/client/assets/useValueChanged-DBqn456b.js +1 -0
  121. package/app/dist/client/assets/utils-BRvE9-Fo.js +1 -0
  122. package/app/dist/client/assets/who-are-you-_7OehU_o.js +1 -0
  123. package/app/dist/client/assets/workflow-DSNK0oFo.js +1 -0
  124. package/app/dist/client/assets/workflow-view-VFD3onJL.js +1 -0
  125. package/app/dist/client/assets/workflows-CT9wqMl2.js +1 -0
  126. package/app/dist/client/assets/yaml-rwi0_p6S.js +1 -0
  127. package/app/dist/components/grid/plan.d.ts +46 -262
  128. package/app/dist/components/grid/plan.js +134 -138
  129. package/app/dist/components/grid/plan.js.map +1 -1
  130. package/app/dist/demo-build.d.ts +58 -0
  131. package/app/dist/demo-build.js +440 -0
  132. package/app/dist/demo-build.js.map +1 -0
  133. package/app/dist/handler.d.ts +9 -7
  134. package/app/dist/handler.js +10 -10
  135. package/app/dist/handler.js.map +1 -1
  136. package/app/dist/index.d.ts +4 -4
  137. package/app/dist/index.js +52 -35
  138. package/app/dist/index.js.map +1 -1
  139. package/app/dist/lib/chat.d.ts +67 -20
  140. package/app/dist/lib/chat.js +54 -18
  141. package/app/dist/lib/chat.js.map +1 -1
  142. package/app/dist/lib/names.d.ts +7 -0
  143. package/app/dist/lib/names.js +6 -2
  144. package/app/dist/lib/names.js.map +1 -1
  145. package/app/dist/login/page.d.ts +1 -10
  146. package/app/dist/login/page.js +0 -14
  147. package/app/dist/login/page.js.map +1 -1
  148. package/app/dist/login/staff.js +3 -3
  149. package/app/dist/login/staff.js.map +1 -1
  150. package/app/dist/server/assets/{_id-wuJIq2ZZ.js → _id-B6iAc90c.js} +2 -2
  151. package/app/dist/server/assets/{_id-Dt9tTylX.js → _id-BlceO2iK.js} +3 -3
  152. package/app/dist/server/assets/{_id-wB8khGTz.js → _id-Cc0uBuJb.js} +12 -7
  153. package/app/dist/server/assets/{_id-ce1EGp7Y.js → _id-DYfvgveB.js} +2 -2
  154. package/app/dist/server/assets/{_id-BViXAagq.js → _id-Dvn0wB-1.js} +15 -330
  155. package/app/dist/server/assets/{_name-BGagGBjX.js → _name-3AGcE6tj.js} +7 -7
  156. package/app/dist/server/assets/{_name-DntbHE-b.js → _name-BIcmcEwj.js} +11 -11
  157. package/app/dist/server/assets/{_name-BqFwnyf7.js → _name-CfoydEzk.js} +2 -2
  158. package/app/dist/server/assets/{_name-D_-MhjNf.js → _name-VpcPszKf.js} +210 -63
  159. package/app/dist/server/assets/{_tanstack-start-manifest_v-BljuBM-G.js → _tanstack-start-manifest_v-DUL7FcJk.js} +119 -91
  160. package/app/dist/server/assets/{_vendor-CcEviOki.js → _vendor-Bwis2sPx.js} +2 -2
  161. package/app/dist/server/assets/{_vendor-CNB03LWX.js → _vendor-DUtH-Z9W.js} +8 -8
  162. package/app/dist/server/assets/{actor-D6iA0pDg.js → actor-DAOPjcdj.js} +1 -1
  163. package/app/dist/server/assets/app-chrome-B8oA4uXZ.js +2298 -0
  164. package/app/dist/server/assets/{app-scope-CXIgOFmi.js → app-scope-BxuIu0xV.js} +2 -2
  165. package/app/dist/server/assets/{apply-plan-ybBda6vQ.js → apply-plan-CHJ_Hr71.js} +8 -7
  166. package/app/dist/server/assets/{approval-Su315ikC.js → approval-DR_9mBcx.js} +17 -14
  167. package/app/dist/server/assets/{apps-xwQAehch.js → apps-CtPev5RI.js} +7 -7
  168. package/app/dist/server/assets/button-Xwx3rpQ0.js +43 -0
  169. package/app/dist/server/assets/change-glance-DGqh7Pxb.js +54 -0
  170. package/app/dist/server/assets/{change-glance-CpArIbGS.js → changes-C3qjEBZP.js} +2 -54
  171. package/app/dist/server/assets/{changes-Bc_OiDBD.js → changes-DfOnO87K.js} +8 -7
  172. package/app/dist/server/assets/{chat-DMN_hoKm.js → chat-B19X0_8f.js} +133 -34
  173. package/app/dist/server/assets/{chat-button-LtA80MoR.js → chat-button-SluTWK8R.js} +2 -2
  174. package/app/dist/server/assets/{code-COyt8L-n.js → code-hVpCkmAZ.js} +1 -1
  175. package/app/dist/server/assets/{common-CWHLj7KV.js → common-JUUJLp4v.js} +30 -82
  176. package/app/dist/server/assets/{connect-BpPiu5s6.js → connect-DKu1UgY-.js} +11 -10
  177. package/app/dist/server/assets/{connections-DBgb1bvX.js → connections-Dyedl4qi.js} +12 -11
  178. package/app/dist/server/assets/{connectors-5a5_SlHO.js → connectors-yojQH7WS.js} +8 -8
  179. package/app/dist/server/assets/{credentials-ud_Y68hx.js → credentials-2Z6EHitQ.js} +10 -9
  180. package/app/dist/server/assets/{data-aEdhwcqy.js → data-1padc_i_.js} +7 -7
  181. package/app/dist/server/assets/{declaration-form-Dfg1yNuY.js → declaration-form-MAnn_M8g.js} +7 -6
  182. package/app/dist/server/assets/{dialog-BGjiw3Dx.js → dialog-T0bzlKzs.js} +2 -2
  183. package/app/dist/server/assets/{dropdown-menu-DAC3LWas.js → dropdown-menu-RGvPORm4.js} +1 -1
  184. package/app/dist/server/assets/{existing-B4d4NrC8.js → existing-BZjX_7Aa.js} +8 -7
  185. package/app/dist/server/assets/fence-BvNu3YNO.js +130 -0
  186. package/app/dist/server/assets/{field-C0Xx_90s.js → field-DFpkT1id.js} +1 -1
  187. package/app/dist/server/assets/{functions-BvFYzabD.js → functions-wlvFaDkF.js} +246 -44
  188. package/app/dist/server/assets/{graph-qYOdoz2s.js → graph-DjANDk1P.js} +5 -5
  189. package/app/dist/server/assets/{grid-diff-jTvp-8wS.js → grid-diff-D5bQDKl2.js} +1 -1
  190. package/app/dist/server/assets/held-card-CCEypEau.js +75 -0
  191. package/app/dist/server/assets/{hosting-bbn9UvDc.js → hosting-Csr6AVC7.js} +321 -42
  192. package/app/dist/server/assets/{import-DIwvzHb6.js → import-CtPlwdIl.js} +12 -10
  193. package/app/dist/server/assets/{inbox-Dj-5FleF.js → inbox-9-WMgjdU.js} +2 -2
  194. package/app/dist/server/assets/{inbox-D6R6sWBB.js → inbox-BYKHV9Yh.js} +8 -8
  195. package/app/dist/server/assets/{input-D63gF3G2.js → input-CF-vX8Xp.js} +1 -1
  196. package/app/dist/server/assets/{item-BDSXoEr_.js → item-LBDNja5f.js} +1 -1
  197. package/app/dist/server/assets/{kit-D6EulwBe.js → kit-D5moAfcg.js} +57 -4
  198. package/app/dist/server/assets/markdown-B9odAiMy.js +116 -0
  199. package/app/dist/server/assets/{middleware-B8JRLyxx.js → middleware-C4Wn6uHO.js} +325 -285
  200. package/app/dist/server/assets/{native-select-DLa-He0n.js → native-select-etaMvR-i.js} +2 -9
  201. package/app/dist/server/assets/{people-CkU_AxrV.js → people-LpcYXtEq.js} +13 -12
  202. package/app/dist/server/assets/{permissions-BfMcQqQb.js → permissions-M0kzvVVm.js} +9 -8
  203. package/app/dist/server/assets/{permissions-grid-DWP9FAAS.js → permissions-grid-CwWWdcQA.js} +4 -4
  204. package/app/dist/server/assets/{button-f9Lc8qLl.js → queries-BDuQsTdU.js} +141 -59
  205. package/app/dist/server/assets/review-BFZCPdVZ.js +355 -0
  206. package/app/dist/server/assets/{route-CF_8jQYY.js → route-BJLQf4ik.js} +2 -2
  207. package/app/dist/server/assets/{route-BTT7nMJq.js → route-C3uFABee.js} +2 -2
  208. package/app/dist/server/assets/{router-BvYtxrVN.js → router-Dx7Gu0CN.js} +175 -147
  209. package/app/dist/server/assets/routes-iVrnGFaR.js +227 -0
  210. package/app/dist/server/assets/{runs-table-BBudn12Y.js → runs-table-g3QYggO3.js} +6 -6
  211. package/app/dist/server/assets/{scenario-BXGTSTiP.js → scenario-B5dGlEGF.js} +5 -5
  212. package/app/dist/server/assets/{separator-8MZ7vR3f.js → separator-Cf98V8ie.js} +1 -1
  213. package/app/dist/server/assets/{sheet-5Cyp-4UW.js → sheet-DTOG7OHQ.js} +2 -2
  214. package/app/dist/server/assets/sites.index-BNeYUQnQ.js +165 -0
  215. package/app/dist/server/assets/{spinner-C1ZW08lp.js → spinner-016IPVi-.js} +1 -1
  216. package/app/dist/server/assets/{start-CSU4irVK.js → start-CIKqNkKp.js} +2 -2
  217. package/app/dist/server/assets/{start-form-DI60UOrc.js → start-form-BXAi2lVm.js} +10 -9
  218. package/app/dist/server/assets/{table-DtPk_h_5.js → table-y-dGlLx6.js} +1 -1
  219. package/app/dist/server/assets/{textarea-f0Ip5ed1.js → textarea-B02joDnr.js} +1 -1
  220. package/app/dist/server/assets/utils-CHesvfjo.js +138 -0
  221. package/app/dist/server/assets/{who-are-you-ZGyMnpVi.js → who-are-you-CavnVMGe.js} +16 -10
  222. package/app/dist/server/assets/{workflow-Z99QWO42.js → workflow-BXhqp6S1.js} +5 -5
  223. package/app/dist/server/assets/{workflow-view-C8X8U11S.js → workflow-view-go1rbTSF.js} +14 -13
  224. package/app/dist/server/assets/{workflows-C0kJoGf1.js → workflows-BCcXZtN-.js} +14 -14
  225. package/app/dist/server/chat.d.ts +6 -1
  226. package/app/dist/server/chat.js +39 -20
  227. package/app/dist/server/chat.js.map +1 -1
  228. package/app/dist/server/core.d.ts +24 -9
  229. package/app/dist/server/core.js +58 -119
  230. package/app/dist/server/core.js.map +1 -1
  231. package/app/dist/server/go-live.d.ts +11 -2
  232. package/app/dist/server/go-live.js +27 -27
  233. package/app/dist/server/go-live.js.map +1 -1
  234. package/app/dist/server/server.js +68 -48
  235. package/app/dist/server/setup.js +1 -1
  236. package/app/dist/server/setup.js.map +1 -1
  237. package/app/dist/server/token-redeem.d.ts +8 -0
  238. package/app/dist/server/token-redeem.js +45 -0
  239. package/app/dist/server/token-redeem.js.map +1 -0
  240. package/app/dist/site-path.d.ts +15 -0
  241. package/app/dist/site-path.js +26 -0
  242. package/app/dist/site-path.js.map +1 -1
  243. package/app/dist/snapshot-build.js +1 -0
  244. package/app/dist/snapshot-build.js.map +1 -1
  245. package/app/dist/steps/agent/acp.d.ts +3 -97
  246. package/app/dist/steps/agent/acp.js +19 -49
  247. package/app/dist/steps/agent/acp.js.map +1 -1
  248. package/app/dist/steps/agent/checkout.d.ts +18 -1
  249. package/app/dist/steps/agent/checkout.js +17 -0
  250. package/app/dist/steps/agent/checkout.js.map +1 -1
  251. package/app/dist/steps/agent/harness.d.ts +2 -4
  252. package/app/dist/steps/agent/harness.js +45 -61
  253. package/app/dist/steps/agent/harness.js.map +1 -1
  254. package/app/dist/steps/agent/prompt.d.ts +1 -1
  255. package/app/dist/steps/agent/prompt.js +37 -16
  256. package/app/dist/steps/agent/prompt.js.map +1 -1
  257. package/app/dist/steps/agent/transcript.d.ts +10 -1
  258. package/app/dist/steps/agent/transcript.js +75 -2
  259. package/app/dist/steps/agent/transcript.js.map +1 -1
  260. package/app/dist/steps/agent/turn.d.ts +4 -6
  261. package/app/dist/steps/agent/turn.js +14 -16
  262. package/app/dist/steps/agent/turn.js.map +1 -1
  263. package/app/dist/steps/index.js +2 -2
  264. package/app/dist/steps/index.js.map +1 -1
  265. package/app/dist/steps/writes.d.ts +21 -7
  266. package/app/dist/steps/writes.js +100 -23
  267. package/app/dist/steps/writes.js.map +1 -1
  268. package/app/dist/stylesheet.json +1 -1
  269. package/app/src/api.ts +188 -4
  270. package/app/src/build.ts +177 -14
  271. package/app/src/bundle-build.ts +132 -63
  272. package/app/src/components/app-chrome.tsx +28 -13
  273. package/app/src/components/approval.tsx +1 -1
  274. package/app/src/components/common.tsx +18 -88
  275. package/app/src/components/data-grid.tsx +2 -1
  276. package/app/src/components/go-live-cloud.tsx +44 -0
  277. package/app/src/components/go-live.tsx +51 -13
  278. package/app/src/components/grid/columns.tsx +175 -53
  279. package/app/src/components/grid/grid.tsx +4 -2
  280. package/app/src/components/grid/plan.ts +153 -164
  281. package/app/src/components/grid/review.tsx +108 -118
  282. package/app/src/components/home.tsx +199 -0
  283. package/app/src/components/import/match.tsx +2 -1
  284. package/app/src/components/import/sheet.ts +2 -1
  285. package/app/src/components/kit.tsx +55 -1
  286. package/app/src/components/logo.tsx +25 -0
  287. package/app/src/components/record-form.tsx +12 -5
  288. package/app/src/components/shell/bar.tsx +35 -26
  289. package/app/src/components/shell/chat-parts.tsx +185 -126
  290. package/app/src/components/shell/chat-prompt.ts +6 -2
  291. package/app/src/components/shell/chat.tsx +154 -220
  292. package/app/src/components/shell/composer.tsx +140 -0
  293. package/app/src/components/shell/connect-agent.tsx +157 -0
  294. package/app/src/components/shell/draft-card.tsx +192 -45
  295. package/app/src/components/shell/engine-mark.tsx +9 -0
  296. package/app/src/components/shell/fence.tsx +25 -0
  297. package/app/src/components/shell/held-card.tsx +58 -0
  298. package/app/src/components/shell/markdown.tsx +152 -0
  299. package/app/src/components/shell/nav-user.tsx +11 -1
  300. package/app/src/components/shell/prefs.ts +12 -1
  301. package/app/src/components/shell/thread.tsx +174 -0
  302. package/app/src/components/store-move.tsx +2 -1
  303. package/app/src/components/ui/bubble.tsx +117 -0
  304. package/app/src/components/ui/code-block.tsx +235 -0
  305. package/app/src/components/ui/input-group.tsx +136 -0
  306. package/app/src/components/ui/marker.tsx +67 -0
  307. package/app/src/components/ui/message-scroller.tsx +117 -0
  308. package/app/src/components/ui/message.tsx +74 -0
  309. package/app/src/components/ui/radio-group.tsx +26 -0
  310. package/app/src/components/ui/trace.tsx +133 -0
  311. package/app/src/components/who-are-you.tsx +8 -3
  312. package/app/src/demo/api.ts +42 -0
  313. package/app/src/demo/client-rpc.ts +16 -0
  314. package/app/src/demo/demo.css +31 -0
  315. package/app/src/demo/mount.tsx +97 -0
  316. package/app/src/demo/root.tsx +31 -0
  317. package/app/src/demo/tailwind.css +4 -0
  318. package/app/src/demo-build.ts +525 -0
  319. package/app/src/env.d.ts +12 -0
  320. package/app/src/functions.ts +50 -7
  321. package/app/src/handler.ts +20 -14
  322. package/app/src/hooks/use-highlighted-code.ts +72 -0
  323. package/app/src/index.ts +55 -36
  324. package/app/src/lib/chat.ts +113 -23
  325. package/app/src/lib/cn-tables.ts +23 -23
  326. package/app/src/lib/company-state.ts +73 -0
  327. package/app/src/lib/highlighter.tsx +114 -0
  328. package/app/src/lib/names.ts +13 -2
  329. package/app/src/login/page.ts +1 -21
  330. package/app/src/login/staff.ts +3 -3
  331. package/app/src/queries.ts +121 -18
  332. package/app/src/routes/__root.tsx +24 -7
  333. package/app/src/routes/changes/$id.tsx +4 -3
  334. package/app/src/routes/connectors/index.tsx +1 -1
  335. package/app/src/routes/data/$name/import.tsx +2 -1
  336. package/app/src/routes/data/$name/index.tsx +1 -2
  337. package/app/src/routes/hosting/index.tsx +277 -60
  338. package/app/src/routes/index.tsx +15 -4
  339. package/app/src/routes/sites.index.tsx +41 -3
  340. package/app/src/routes/workflows/$name/runs/$id.tsx +3 -1
  341. package/app/src/server/chat.ts +41 -19
  342. package/app/src/server/columns.ts +44 -18
  343. package/app/src/server/company-state.ts +76 -0
  344. package/app/src/server/core.ts +72 -116
  345. package/app/src/server/go-live.ts +35 -27
  346. package/app/src/server/setup-progress.ts +28 -0
  347. package/app/src/server/setup.ts +1 -1
  348. package/app/src/server/token-redeem.ts +49 -0
  349. package/app/src/site-api.ts +10 -0
  350. package/app/src/site-path.ts +29 -0
  351. package/app/src/site.ts +1 -1
  352. package/app/src/snapshot-build.ts +1 -0
  353. package/app/src/steps/agent/acp.ts +10 -80
  354. package/app/src/steps/agent/checkout.ts +30 -0
  355. package/app/src/steps/agent/harness.ts +53 -78
  356. package/app/src/steps/agent/prompt.ts +45 -17
  357. package/app/src/steps/agent/transcript.ts +90 -3
  358. package/app/src/steps/agent/turn.ts +18 -16
  359. package/app/src/steps/index.ts +2 -2
  360. package/app/src/steps/writes.ts +121 -31
  361. package/app/src/worker/app.ts +17 -14
  362. package/dist/check.js +2 -2
  363. package/dist/check.js.map +1 -1
  364. package/dist/cli.js +81 -22
  365. package/dist/cli.js.map +1 -1
  366. package/dist/config.d.ts +8 -1
  367. package/dist/config.js +49 -8
  368. package/dist/config.js.map +1 -1
  369. package/dist/events.d.ts +15 -1
  370. package/dist/events.js +7 -0
  371. package/dist/events.js.map +1 -1
  372. package/dist/init.d.ts +27 -14
  373. package/dist/init.js +87 -39
  374. package/dist/init.js.map +1 -1
  375. package/dist/serve.d.ts +6 -2
  376. package/dist/serve.js +71 -9
  377. package/dist/serve.js.map +1 -1
  378. package/dist/source.d.ts +5 -0
  379. package/dist/source.js +113 -23
  380. package/dist/source.js.map +1 -1
  381. package/dist/worker-port.d.ts +16 -2
  382. package/dist/worker-port.js +44 -5
  383. package/dist/worker-port.js.map +1 -1
  384. package/invoices/README.md +66 -0
  385. package/invoices/dist/calculate.d.ts +37 -0
  386. package/invoices/dist/calculate.js +97 -0
  387. package/invoices/dist/calculate.js.map +1 -0
  388. package/invoices/dist/index.d.ts +4 -0
  389. package/invoices/dist/index.js +5 -0
  390. package/invoices/dist/index.js.map +1 -0
  391. package/invoices/dist/logo.d.ts +2 -0
  392. package/invoices/dist/logo.js +89 -0
  393. package/invoices/dist/logo.js.map +1 -0
  394. package/invoices/dist/pdf.d.ts +33 -0
  395. package/invoices/dist/pdf.js +215 -0
  396. package/invoices/dist/pdf.js.map +1 -0
  397. package/invoices/dist/schema.d.ts +156 -0
  398. package/invoices/dist/schema.js +88 -0
  399. package/invoices/dist/schema.js.map +1 -0
  400. package/oxlint.json +18 -0
  401. package/package.json +42 -7
  402. package/template/.env.example +15 -4
  403. package/template/AGENTS.md +10 -6
  404. package/template/package.json +6 -1
  405. package/template/policies/policy.cedar +5 -5
  406. package/template/resources/people.ts +5 -13
  407. package/template/resources/sanoma/infra.ts +8 -0
  408. package/template/sanoma.config.ts +18 -11
  409. package/template/scenarios/record-lead/record.feature +14 -0
  410. package/template/secrets.ts +13 -0
  411. package/template/tsconfig.json +1 -0
  412. package/template/workflows/record-lead.ts +30 -0
  413. package/testing/README.md +4 -4
  414. package/testing/dist/build.d.ts +3 -3
  415. package/testing/dist/build.js +4 -4
  416. package/testing/dist/build.js.map +1 -1
  417. package/testing/dist/host.d.ts +38 -21
  418. package/testing/dist/host.js +159 -77
  419. package/testing/dist/host.js.map +1 -1
  420. package/testing/dist/scenarios.d.ts +2 -1
  421. package/testing/dist/scenarios.js +14 -4
  422. package/testing/dist/scenarios.js.map +1 -1
  423. package/workflows/CLOUD-IDENTITY.md +15 -20
  424. package/workflows/README.md +54 -19
  425. package/workflows/dist/app-steps.js +8 -0
  426. package/workflows/dist/app-steps.js.map +1 -1
  427. package/workflows/dist/app-workflows.d.ts +172 -6
  428. package/workflows/dist/app-workflows.js +57 -9
  429. package/workflows/dist/app-workflows.js.map +1 -1
  430. package/workflows/dist/approvals.d.ts +3 -1
  431. package/workflows/dist/approvals.js +3 -1
  432. package/workflows/dist/approvals.js.map +1 -1
  433. package/workflows/dist/call.d.ts +8 -40
  434. package/workflows/dist/call.js +24 -135
  435. package/workflows/dist/call.js.map +1 -1
  436. package/workflows/dist/change-steps.d.ts +7 -0
  437. package/workflows/dist/change-steps.js +37 -13
  438. package/workflows/dist/change-steps.js.map +1 -1
  439. package/workflows/dist/change-workflow.d.ts +22 -10
  440. package/workflows/dist/change-workflow.js +30 -12
  441. package/workflows/dist/change-workflow.js.map +1 -1
  442. package/workflows/dist/change.d.ts +233 -7
  443. package/workflows/dist/change.js +27 -9
  444. package/workflows/dist/change.js.map +1 -1
  445. package/workflows/dist/client.d.ts +32 -5
  446. package/workflows/dist/client.js +94 -35
  447. package/workflows/dist/client.js.map +1 -1
  448. package/workflows/dist/cloud-identity.d.ts +5 -2
  449. package/workflows/dist/cloud-identity.js +7 -4
  450. package/workflows/dist/cloud-identity.js.map +1 -1
  451. package/workflows/dist/collection-driver.d.ts +20 -0
  452. package/workflows/dist/collection-driver.js +201 -0
  453. package/workflows/dist/collection-driver.js.map +1 -0
  454. package/workflows/dist/collection.d.ts +126 -14
  455. package/workflows/dist/collection.js +45 -168
  456. package/workflows/dist/collection.js.map +1 -1
  457. package/workflows/dist/company-file.d.ts +22 -0
  458. package/workflows/dist/company-file.js +82 -0
  459. package/workflows/dist/company-file.js.map +1 -0
  460. package/workflows/dist/config.d.ts +34 -6
  461. package/workflows/dist/config.js +58 -45
  462. package/workflows/dist/config.js.map +1 -1
  463. package/workflows/dist/ctx.d.ts +101 -0
  464. package/workflows/dist/ctx.js +171 -0
  465. package/workflows/dist/ctx.js.map +1 -0
  466. package/workflows/dist/db/company.d.ts +115 -1
  467. package/workflows/dist/db/company.js +14 -1
  468. package/workflows/dist/db/company.js.map +1 -1
  469. package/workflows/dist/db/dbos.d.ts +17 -0
  470. package/workflows/dist/db/dbos.js +2 -0
  471. package/workflows/dist/db/dbos.js.map +1 -1
  472. package/workflows/dist/db/identity.d.ts +2 -2
  473. package/workflows/dist/db/identity.js +2 -2
  474. package/workflows/dist/db/identity.js.map +1 -1
  475. package/workflows/dist/db.d.ts +1 -1
  476. package/workflows/dist/db.js +10 -6
  477. package/workflows/dist/db.js.map +1 -1
  478. package/workflows/dist/deadlines.d.ts +14 -8
  479. package/workflows/dist/deadlines.js +22 -11
  480. package/workflows/dist/deadlines.js.map +1 -1
  481. package/workflows/dist/define.d.ts +0 -8
  482. package/workflows/dist/define.js +1 -24
  483. package/workflows/dist/define.js.map +1 -1
  484. package/workflows/dist/describe.d.ts +1 -1
  485. package/workflows/dist/describe.js +18 -5
  486. package/workflows/dist/describe.js.map +1 -1
  487. package/workflows/dist/description.d.ts +408 -2
  488. package/workflows/dist/description.js +130 -5
  489. package/workflows/dist/description.js.map +1 -1
  490. package/workflows/dist/drift.d.ts +5 -2
  491. package/workflows/dist/drift.js +5 -3
  492. package/workflows/dist/drift.js.map +1 -1
  493. package/workflows/dist/errors.d.ts +11 -11
  494. package/workflows/dist/errors.js +17 -36
  495. package/workflows/dist/errors.js.map +1 -1
  496. package/workflows/dist/fake.d.ts +0 -26
  497. package/workflows/dist/fake.js +0 -123
  498. package/workflows/dist/fake.js.map +1 -1
  499. package/workflows/dist/fakes.d.ts +2 -0
  500. package/workflows/dist/fakes.js +5 -0
  501. package/workflows/dist/fakes.js.map +1 -0
  502. package/workflows/dist/givens.d.ts +51 -0
  503. package/workflows/dist/givens.js +89 -0
  504. package/workflows/dist/givens.js.map +1 -0
  505. package/workflows/dist/host.d.ts +8 -7
  506. package/workflows/dist/host.js +1 -1
  507. package/workflows/dist/host.js.map +1 -1
  508. package/workflows/dist/identity-provisioning.d.ts +2 -5
  509. package/workflows/dist/identity-provisioning.js +16 -20
  510. package/workflows/dist/identity-provisioning.js.map +1 -1
  511. package/workflows/dist/import.d.ts +2 -0
  512. package/workflows/dist/import.js +7 -6
  513. package/workflows/dist/import.js.map +1 -1
  514. package/workflows/dist/index.d.ts +8 -7
  515. package/workflows/dist/index.js +4 -3
  516. package/workflows/dist/index.js.map +1 -1
  517. package/workflows/dist/ledger.js +8 -17
  518. package/workflows/dist/ledger.js.map +1 -1
  519. package/workflows/dist/lint.d.ts +2 -2
  520. package/workflows/dist/lint.js +8 -4
  521. package/workflows/dist/lint.js.map +1 -1
  522. package/workflows/dist/load.js +1 -1
  523. package/workflows/dist/load.js.map +1 -1
  524. package/workflows/dist/log.d.ts +0 -2
  525. package/workflows/dist/log.js +0 -11
  526. package/workflows/dist/log.js.map +1 -1
  527. package/workflows/dist/op.d.ts +103 -3
  528. package/workflows/dist/op.js +56 -6
  529. package/workflows/dist/op.js.map +1 -1
  530. package/workflows/dist/page-run.d.ts +40 -0
  531. package/workflows/dist/page-run.js +317 -0
  532. package/workflows/dist/page-run.js.map +1 -0
  533. package/workflows/dist/paths.d.ts +0 -13
  534. package/workflows/dist/paths.js +2 -46
  535. package/workflows/dist/paths.js.map +1 -1
  536. package/workflows/dist/renewal.d.ts +1 -1
  537. package/workflows/dist/renewal.js +1 -1
  538. package/workflows/dist/run.d.ts +4 -1
  539. package/workflows/dist/run.js.map +1 -1
  540. package/workflows/dist/runtime-ops.d.ts +19 -4
  541. package/workflows/dist/runtime-ops.js +34 -5
  542. package/workflows/dist/runtime-ops.js.map +1 -1
  543. package/workflows/dist/sandbox-runner.cjs +4 -4
  544. package/workflows/dist/sandbox.d.ts +0 -20
  545. package/workflows/dist/sandbox.js +23 -85
  546. package/workflows/dist/sandbox.js.map +1 -1
  547. package/workflows/dist/scenario.d.ts +19 -1
  548. package/workflows/dist/scenario.js +82 -21
  549. package/workflows/dist/scenario.js.map +1 -1
  550. package/workflows/dist/schedules.d.ts +1 -1
  551. package/workflows/dist/schedules.js +1 -1
  552. package/workflows/dist/secret.d.ts +4 -5
  553. package/workflows/dist/secret.js +7 -6
  554. package/workflows/dist/secret.js.map +1 -1
  555. package/workflows/dist/shared.d.ts +84 -7
  556. package/workflows/dist/shared.js +255 -8
  557. package/workflows/dist/shared.js.map +1 -1
  558. package/workflows/dist/sites.d.ts +5 -0
  559. package/workflows/dist/sites.js +7 -0
  560. package/workflows/dist/sites.js.map +1 -1
  561. package/workflows/dist/source.d.ts +40 -1
  562. package/workflows/dist/source.js +3 -3
  563. package/workflows/dist/source.js.map +1 -1
  564. package/workflows/dist/supervisor.d.ts +21 -18
  565. package/workflows/dist/supervisor.js +20 -22
  566. package/workflows/dist/supervisor.js.map +1 -1
  567. package/workflows/dist/tokens.d.ts +34 -0
  568. package/workflows/dist/tokens.js +70 -9
  569. package/workflows/dist/tokens.js.map +1 -1
  570. package/workflows/dist/vendor-info.d.ts +12 -3
  571. package/workflows/dist/vendor-info.js +21 -5
  572. package/workflows/dist/vendor-info.js.map +1 -1
  573. package/workflows/dist/version.js +1 -1
  574. package/workflows/dist/version.js.map +1 -1
  575. package/workflows/dist/wakeup-driver.js +1 -1
  576. package/workflows/dist/wakeup-driver.js.map +1 -1
  577. package/workflows/dist/wakeup-fake.d.ts +27 -0
  578. package/workflows/dist/wakeup-fake.js +125 -0
  579. package/workflows/dist/wakeup-fake.js.map +1 -0
  580. package/workflows/dist/wakeup-service.js +8 -24
  581. package/workflows/dist/wakeup-service.js.map +1 -1
  582. package/workflows/dist/wakeup-type.js +1 -1
  583. package/workflows/dist/wakeup-type.js.map +1 -1
  584. package/workflows/dist/worker.d.ts +19 -1
  585. package/workflows/dist/worker.js +67 -49
  586. package/workflows/dist/worker.js.map +1 -1
  587. package/workflows/drizzle/company/0007_token_handoffs.sql +8 -0
  588. package/workflows/drizzle/company/meta/0007_snapshot.json +1281 -0
  589. package/workflows/drizzle/company/meta/_journal.json +7 -0
  590. package/workflows/src/app-steps.ts +11 -0
  591. package/workflows/src/app-workflows.ts +100 -10
  592. package/workflows/src/approvals.ts +4 -2
  593. package/workflows/src/call.ts +37 -186
  594. package/workflows/src/change-steps.ts +43 -14
  595. package/workflows/src/change-workflow.ts +45 -16
  596. package/workflows/src/change.ts +39 -10
  597. package/workflows/src/client.ts +137 -62
  598. package/workflows/src/cloud-identity.ts +7 -4
  599. package/workflows/src/collection-driver.ts +230 -0
  600. package/workflows/src/collection.ts +62 -186
  601. package/workflows/src/company-file.ts +82 -0
  602. package/workflows/src/config.ts +97 -56
  603. package/workflows/src/ctx.ts +266 -0
  604. package/workflows/src/db/company.ts +15 -1
  605. package/workflows/src/db/dbos.ts +2 -0
  606. package/workflows/src/db/identity.ts +2 -2
  607. package/workflows/src/db.ts +10 -6
  608. package/workflows/src/deadlines.ts +31 -17
  609. package/workflows/src/define.ts +1 -24
  610. package/workflows/src/describe.ts +27 -5
  611. package/workflows/src/description.ts +152 -5
  612. package/workflows/src/drift.ts +8 -4
  613. package/workflows/src/errors.ts +19 -45
  614. package/workflows/src/fake.ts +4 -139
  615. package/workflows/src/fakes.ts +4 -0
  616. package/workflows/src/givens.ts +141 -0
  617. package/workflows/src/host.ts +8 -7
  618. package/workflows/src/identity-provisioning.ts +19 -30
  619. package/workflows/src/import.ts +8 -6
  620. package/workflows/src/index.ts +13 -2
  621. package/workflows/src/ledger.ts +8 -16
  622. package/workflows/src/lint.ts +12 -6
  623. package/workflows/src/load.ts +1 -1
  624. package/workflows/src/log.ts +0 -11
  625. package/workflows/src/op.ts +147 -12
  626. package/workflows/src/page-run.ts +437 -0
  627. package/workflows/src/paths.ts +2 -46
  628. package/workflows/src/renewal.ts +1 -1
  629. package/workflows/src/run.ts +4 -1
  630. package/workflows/src/runtime-ops.ts +36 -6
  631. package/workflows/src/sandbox.ts +31 -109
  632. package/workflows/src/scenario.ts +102 -19
  633. package/workflows/src/schedules.ts +1 -1
  634. package/workflows/src/secret.ts +8 -7
  635. package/workflows/src/shared.ts +304 -10
  636. package/workflows/src/sites.ts +8 -0
  637. package/workflows/src/source.ts +31 -5
  638. package/workflows/src/supervisor.ts +40 -38
  639. package/workflows/src/tokens.ts +100 -9
  640. package/workflows/src/vendor-info.ts +21 -6
  641. package/workflows/src/version.ts +1 -1
  642. package/workflows/src/wakeup-driver.ts +1 -1
  643. package/workflows/src/wakeup-fake.ts +138 -0
  644. package/workflows/src/wakeup-service.ts +8 -24
  645. package/workflows/src/wakeup-type.ts +1 -1
  646. package/workflows/src/worker.ts +121 -58
  647. package/app/dist/client/assets/ArrowUp.es-DOgvoS0P.js +0 -1
  648. package/app/dist/client/assets/Copy.es-B0D5SwiQ.js +0 -1
  649. package/app/dist/client/assets/DialogTitle-BgjYK22C.js +0 -1
  650. package/app/dist/client/assets/FloppyDisk.es-DnuNe_a8.js +0 -1
  651. package/app/dist/client/assets/Globe.es-B6x2e4-a.js +0 -1
  652. package/app/dist/client/assets/MagnifyingGlass.es-DoNoHEhT.js +0 -1
  653. package/app/dist/client/assets/Play.es-BwXalGBh.js +0 -1
  654. package/app/dist/client/assets/Plug.es-CaZsN5P-.js +0 -1
  655. package/app/dist/client/assets/Plus.es-w9VPpTJB.js +0 -1
  656. package/app/dist/client/assets/Separator-BAhKFgSd.js +0 -1
  657. package/app/dist/client/assets/X.es-DKMYClf-.js +0 -1
  658. package/app/dist/client/assets/_id-BSRAaWtO.js +0 -1
  659. package/app/dist/client/assets/_id-BjDP-cPH.js +0 -1
  660. package/app/dist/client/assets/_id-BudM76zX.js +0 -1
  661. package/app/dist/client/assets/_id-C37U5bBa.js +0 -1
  662. package/app/dist/client/assets/_id-lmg24JVh.js +0 -2
  663. package/app/dist/client/assets/_name-CylqFo_t.js +0 -1
  664. package/app/dist/client/assets/_name-D8Gl8iwy.js +0 -4
  665. package/app/dist/client/assets/_name-DdPCU8pt.js +0 -1
  666. package/app/dist/client/assets/_name-TteWQXe0.js +0 -1
  667. package/app/dist/client/assets/_vendor-BLxW83yk.js +0 -1
  668. package/app/dist/client/assets/_vendor-Bq3uZU4-.js +0 -1
  669. package/app/dist/client/assets/app-chrome-H8uZ4dHI.js +0 -16
  670. package/app/dist/client/assets/app-scope-BeUW_8Qh.js +0 -1
  671. package/app/dist/client/assets/approval-DpgmTc63.js +0 -1
  672. package/app/dist/client/assets/apps-CoWzNm8M.js +0 -1
  673. package/app/dist/client/assets/change-glance-DbYcBT7H.js +0 -1
  674. package/app/dist/client/assets/changes-DIJvP7wQ.js +0 -1
  675. package/app/dist/client/assets/chat-button-BgpOfYh1.js +0 -1
  676. package/app/dist/client/assets/chat-prompt-hiawXcK0.js +0 -1
  677. package/app/dist/client/assets/common-Dw2i6XKZ.js +0 -3
  678. package/app/dist/client/assets/composite-D9GNDzFj.js +0 -1
  679. package/app/dist/client/assets/connect-CIq2KJTz.js +0 -1
  680. package/app/dist/client/assets/connections-iqd2XbWQ.js +0 -5
  681. package/app/dist/client/assets/connectors-rI8_D1n1.js +0 -1
  682. package/app/dist/client/assets/credentials-26vu6Fv5.js +0 -1
  683. package/app/dist/client/assets/data-sDMlKaLV.js +0 -1
  684. package/app/dist/client/assets/decidable-zcYI7bY8.js +0 -1
  685. package/app/dist/client/assets/declaration-form-BtSVvxhq.js +0 -1
  686. package/app/dist/client/assets/dialog-DskpUgkl.js +0 -1
  687. package/app/dist/client/assets/existing-BD3VgJ_8.js +0 -1
  688. package/app/dist/client/assets/graph-Prxl3c55.js +0 -7
  689. package/app/dist/client/assets/grid-diff-SMsvea6t.js +0 -1
  690. package/app/dist/client/assets/hosting-BBHUppH-.js +0 -1
  691. package/app/dist/client/assets/import-B92fd4Tl.js +0 -1
  692. package/app/dist/client/assets/inbox-57oGZtxE.js +0 -1
  693. package/app/dist/client/assets/inbox-B2AMNtk5.js +0 -1
  694. package/app/dist/client/assets/index-Bn3XeKy8.js +0 -10
  695. package/app/dist/client/assets/kit-BsK6VZTQ.js +0 -1
  696. package/app/dist/client/assets/lazyRouteComponent-Uri98HNq.js +0 -1
  697. package/app/dist/client/assets/motion-C8lNeYvK.js +0 -1
  698. package/app/dist/client/assets/people-ISOMYCTu.js +0 -1
  699. package/app/dist/client/assets/permissions-Cenat84K.js +0 -2
  700. package/app/dist/client/assets/permissions-grid-B2GtGwzv.js +0 -1
  701. package/app/dist/client/assets/route-BP1XwaTB.js +0 -1
  702. package/app/dist/client/assets/route-KVU6QgwJ.js +0 -1
  703. package/app/dist/client/assets/runs-table-35lNzKLn.js +0 -1
  704. package/app/dist/client/assets/scenario-DSwsavxS.js +0 -1
  705. package/app/dist/client/assets/scenario-graph-CAzWOtqV.js +0 -1
  706. package/app/dist/client/assets/separator-BlwkzEY0.js +0 -1
  707. package/app/dist/client/assets/site-icon-DZvOfBvU.js +0 -1
  708. package/app/dist/client/assets/sites.index-CcNo6N8u.js +0 -1
  709. package/app/dist/client/assets/spinner-BGy6LWIW.js +0 -1
  710. package/app/dist/client/assets/start-form-Bgo9I63s.js +0 -1
  711. package/app/dist/client/assets/store-BGu0d2Ld.js +0 -57
  712. package/app/dist/client/assets/style-CCDLLPgG.css +0 -2
  713. package/app/dist/client/assets/table-DjbI5VTn.js +0 -1
  714. package/app/dist/client/assets/textarea-DXO0eUdp.js +0 -1
  715. package/app/dist/client/assets/useLoaderData-BQd5yMlA.js +0 -1
  716. package/app/dist/client/assets/useOpenInteractionType-Bin8RjM5.js +0 -1
  717. package/app/dist/client/assets/useRegisterFieldControl-CQPTOU7Z.js +0 -1
  718. package/app/dist/client/assets/useValueChanged-DMkuvFZG.js +0 -1
  719. package/app/dist/client/assets/utils-CMsCvwYQ.js +0 -1
  720. package/app/dist/client/assets/who-are-you-Bt1WI3Cz.js +0 -1
  721. package/app/dist/client/assets/workflow-BJpO61A-.js +0 -1
  722. package/app/dist/client/assets/workflow-view-DP-UlRiH.js +0 -1
  723. package/app/dist/client/assets/workflows-BLCBgxbx.js +0 -1
  724. package/app/dist/server/assets/app-chrome-BYS81Vnx.js +0 -1410
  725. package/app/dist/server/assets/sites.index-1l0BtgVf.js +0 -138
  726. package/app/dist/server/assets/utils-wksS9pYh.js +0 -138
  727. package/template/scenarios/publish-post/publish.feature +0 -28
  728. package/template/workflows/publish-post.ts +0 -20
@@ -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{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{$n as r,Kn as i,Un as a,Wn as o,Zn as s,fi as c,ir as l,qn as u}from"./queries-XJ-fmuYb.js";import{St as d,bt as f,xt as p}from"./common-DZLdx_jS.js";import{H as m,W as h,m as g,n as _,q as v}from"./kit-BZcdh1Xm.js";import{t as y}from"./button-D5kdANef.js";import{n as b,t as x}from"./utils-BRvE9-Fo.js";var S=n(e(),1),C=t(),w={approve:`Approve and apply`,reject:`Send back`};function T({title:e,detail:t,tone:n,said:r,children:i}){return(0,C.jsxs)(m,{size:`sm`,"aria-label":e,role:`region`,className:x(n===`waiting`&&`ring-tone-waiting-foreground/40`),children:[(0,C.jsxs)(v,{className:`flex flex-wrap items-center gap-x-2.5`,children:[(0,C.jsx)(_,{children:e}),t&&(0,C.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:t}),(0,C.jsx)(`span`,{className:`ml-auto`,children:(0,C.jsx)(g,{tone:n,children:r})})]}),(0,C.jsx)(h,{className:`flex flex-col gap-3 text-sm`,children:i})]})}function E({keyField:e,field:t,wontConvert:{count:n,sample:r}}){return(0,C.jsxs)(`div`,{className:`overflow-auto rounded-lg border`,children:[(0,C.jsxs)(`table`,{"aria-label":`Records that can't convert`,className:`w-full text-sm`,children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,C.jsx)(`th`,{scope:`col`,className:`px-3 py-1.5 font-medium`,children:e}),(0,C.jsxs)(`th`,{scope:`col`,className:`px-3 py-1.5 font-medium`,children:[t,` now`]})]})}),(0,C.jsx)(`tbody`,{children:r.map(({key:e,value:t})=>(0,C.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,C.jsx)(`td`,{className:`px-3 py-1.5 font-medium`,children:e}),(0,C.jsx)(`td`,{className:`px-3 py-1.5`,children:typeof t==`string`?t:JSON.stringify(t)})]},e))})]}),n>r.length&&(0,C.jsxs)(`p`,{className:`border-t px-3 py-1.5 text-xs text-muted-foreground`,children:[`and `,b(n-r.length,`record`),` more`]})]})}function D({change:e,plan:t,keyField:n}){let s=i(t);switch(e.kind){case`add`:{let t=e.required&&e.empty>0;return(0,C.jsx)(T,{title:`Add ${e.field}`,detail:l(e.type),tone:t?`waiting`:`ok`,said:t?`Needs values`:`Safe`,children:(0,C.jsxs)(`p`,{children:[s,` show it empty.`,t&&` It is required: each needs a value before it saves again.`]})})}case`rename`:return(0,C.jsx)(T,{title:`Rename ${e.from} to ${e.to}`,tone:`ok`,said:`Safe`,children:(0,C.jsx)(`p`,{children:r(t)})});case`retype`:case`convert`:{let r=e.kind===`retype`?e.to:e.type,i=e.kind===`retype`?`Change ${e.field} from ${l(e.from)} to ${l(r)}`:`Make ${e.key} of ${e.field} a column, ${l(r)}`,s=e.wontConvert.count;if(s===0)return(0,C.jsx)(T,{title:i,tone:`ok`,said:`Safe`,children:(0,C.jsx)(`p`,{children:`Every value converts.`})});let c=e.decision??`keep`;return(0,C.jsxs)(T,{title:i,tone:c===`clear`?`waiting`:`idle`,said:c===`clear`?`Clears ${b(s,`value`)}`:`Keeps ${s} for fixing`,children:[(0,C.jsxs)(`p`,{children:[b(t.rows-s,`record`),` convert. `,s,` can't, because what's in them isn't `,l(r),`.`]}),(0,C.jsx)(E,{keyField:n,field:e.kind===`retype`?e.field:e.key,wontConvert:e.wontConvert}),(0,C.jsxs)(`p`,{children:[(0,C.jsxs)(`span`,{className:`font-medium`,children:[`Chosen: `,a[c](s).toLowerCase(),`.`]}),` `,o[c]]}),(0,C.jsx)(`p`,{className:`text-muted-foreground`,children:`To choose the other way, send the change back.`})]})}case`require`:return(0,C.jsx)(T,{title:`Make ${e.field} required`,tone:e.empty?`waiting`:`ok`,said:e.empty?`Needs values`:`Safe`,children:(0,C.jsx)(`p`,{children:e.empty?`${b(e.empty,`record`)} have it empty: each needs a value before it saves again.`:`Every record has it.`})});case`hide`:return(0,C.jsx)(T,{title:`Remove ${e.field}`,tone:`ok`,said:`Keeps the data`,children:(0,C.jsxs)(`p`,{children:[`It leaves the grid and the forms.`,` `,e.filled===0?`No record has a value in it.`:`The values in ${b(e.filled,`record`)} are kept.`]})});case`link`:return(0,C.jsx)(T,{title:`Link ${e.field} to ${e.to}`,tone:e.unmatched?`waiting`:`ok`,said:e.unmatched?`Needs a decision`:`Safe`,children:(0,C.jsx)(`p`,{children:e.unmatched?`${b(e.unmatched,`record`)} to match against ${e.to}'s records.`:`${s} match.`})})}}function O({runId:e,plan:t,reshaped:n}){return`error`in n?(0,C.jsxs)(m,{size:`sm`,role:`status`,"aria-label":`The records`,className:`ring-tone-bad-foreground/40`,children:[(0,C.jsxs)(v,{className:`flex flex-wrap items-center gap-x-2.5`,children:[(0,C.jsx)(_,{children:`The records weren't updated`}),(0,C.jsx)(g,{tone:`bad`,children:`Published without them`})]}),(0,C.jsxs)(h,{className:`text-sm`,children:[`The change is published, but its records weren't brought along: `,n.error,`. They hold what they held before.`,` `,(0,C.jsx)(c,{to:`/runs/$id`,params:{id:e},className:`underline underline-offset-4`,children:`See the run`})]})]}):(0,C.jsxs)(m,{size:`sm`,role:`status`,"aria-label":`The records`,children:[(0,C.jsxs)(v,{className:`flex flex-wrap items-center gap-x-2.5`,children:[(0,C.jsx)(_,{children:`The records`}),(0,C.jsx)(g,{tone:`ok`,children:`Updated`})]}),(0,C.jsx)(h,{className:`text-sm`,children:s(t,n)})]})}function k({change:e,plan:t,collection:n}){let[r,i]=(0,S.useState)(!1),a=n?.key??`key`,o=t.changes.length>1,s=e.state.merged?.reshaped;return(0,C.jsxs)(`section`,{"aria-label":`The table change`,className:`flex flex-col gap-3`,children:[s&&(0,C.jsx)(O,{runId:e.runId,plan:t,reshaped:s}),e.status===`failed`&&!e.state.merged&&(0,C.jsxs)(m,{size:`sm`,role:`status`,"aria-label":`Couldn't apply this change`,className:`ring-tone-bad-foreground/40`,children:[(0,C.jsxs)(v,{className:`flex flex-wrap items-center gap-x-2.5`,children:[(0,C.jsx)(_,{children:`Couldn't apply this change`}),(0,C.jsx)(g,{tone:`waiting`,children:`Nothing changed`})]}),(0,C.jsxs)(h,{className:`text-sm`,children:[`Your records and columns are exactly as they were.`,` `,(0,C.jsx)(c,{to:`/runs/$id`,params:{id:e.runId},className:`underline underline-offset-4`,children:`See what went wrong`})]})]}),(0,C.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[b(t.changes.length,`change`),` to `,t.collection,` · `,b(t.rows,`record`),o&&`. They apply together: either every one lands, or none does.`]}),t.changes.map((e,n)=>(0,C.jsx)(D,{change:e,plan:t,keyField:a},n)),(0,C.jsxs)(m,{size:`sm`,role:`region`,"aria-label":`Try it first`,children:[(0,C.jsx)(v,{children:(0,C.jsx)(_,{children:`Try it first`})}),(0,C.jsxs)(h,{className:`flex flex-col items-start gap-2.5 text-sm`,children:[(0,C.jsxs)(`p`,{children:[`Open a copy of `,t.collection,` with this change applied. Your real records aren't touched.`]}),(0,C.jsx)(y,{variant:`outline`,disabled:!0,title:`Copies arrive with previews`,children:`Try on a copy`})]})]}),(0,C.jsxs)(f,{open:r,onOpenChange:i,render:(0,C.jsx)(m,{size:`sm`,role:`region`,"aria-label":`The details`}),children:[(0,C.jsxs)(v,{className:`flex flex-wrap items-center gap-x-2.5`,children:[(0,C.jsx)(_,{children:`The details`}),(0,C.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Only if you want them`}),(0,C.jsx)(d,{render:(0,C.jsx)(y,{variant:`ghost`,size:`sm`,className:`ml-auto`}),children:r?`Hide`:`Show`})]}),(0,C.jsx)(p,{render:(0,C.jsx)(h,{}),children:n&&(0,C.jsx)(`div`,{className:`flex flex-col gap-3`,children:(0,C.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,C.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`The company's file · `,(0,C.jsx)(`code`,{children:n.declared?.file??`resources/data.ts`})]}),(0,C.jsx)(`pre`,{className:`overflow-auto rounded-lg border bg-muted/40 px-3 py-2 text-xs leading-relaxed`,children:u(n.fields,t.changes).map((e,t)=>(0,C.jsx)(`span`,{className:x(`block`,e.sign===`+`?`bg-tone-ok/15`:`bg-tone-bad/15`),children:`${e.sign} ${e.text}`},t))})]})})})]})]})}export{k as n,E as r,w as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./engine-CBuzy-Ik.js";import{s as t}from"./kit-BZcdh1Xm.js";import{a as n}from"./index-CA_5CFb4.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-BZcdh1Xm.js";import{L as n}from"./index-CA_5CFb4.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{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{Fn as r,It as i,Vn as a,at as o,fi as s,fr as c,j as l,rn as u,y as d,yt as f}from"./queries-XJ-fmuYb.js";import{Dt as p,S as m,wt as h}from"./common-DZLdx_jS.js";import{G as g,H as _,U as v,W as y,c as b,h as x,l as S,n as C,o as w,q as T,t as E}from"./kit-BZcdh1Xm.js";import{t as D}from"./useLoaderData-BIegJC9y.js";import{V as O,t as k}from"./button-D5kdANef.js";import{a as A,i as j,n as M,r as N,s as P}from"./item-vV00RYfb.js";import{$ as F,et as I}from"./index-CA_5CFb4.js";import{t as L}from"./CheckCircle.es-DKXiWmAT.js";import{n as R}from"./chat-prompt-z0XJPDtH.js";import{n as z}from"./runs-table-nkQLXJxG.js";import{i as B}from"./inbox-CUNaP4uz.js";var V=n(e(),1),H=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M232,128A104,104,0,1,1,128,24,104.13,104.13,0,0,1,232,128Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Z`}))]]),U=V.forwardRef((e,t)=>V.createElement(O,{ref:t,...e,weights:H}));U.displayName=`CircleIcon`;var W=t(),G=10,K={start:{title:`Start the company`,about:`Its files, its people and its database, on this computer.`},agent:{title:`Connect your agent`,about:`The agent drafts the company's changes with you, in the chat.`},try:{title:`Try the sample workflow`,about:`Run a workflow of the company's own and see what it did.`},teammate:{title:`Add a teammate`,about:`Declare someone else, so they can sign in and decide.`},online:{title:`Put it online`,about:`Go live, so it runs without this computer.`}};function q(){let{data:e}=u({...l(),select:e=>e.name});return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(b,{title:e}),(0,W.jsx)(J,{}),(0,W.jsx)(Y,{}),(0,W.jsx)(X,{})]})}function J(){let{data:e}=p(f()),t=D({from:`__root__`,select:e=>e?.setupHidden??!1}),[n,i]=(0,V.useState)(t),a=u({...l(),select:e=>e.workflows.find(e=>!e.builtin)?.name}).data,o=R();if(!e||n)return null;let c=r.filter(t=>e[t]).length;if(c===r.length)return null;let d={start:null,agent:(0,W.jsx)(k,{variant:`outline`,size:`sm`,onClick:()=>o.chooseAgent(),children:`Connect`}),try:(0,W.jsx)(E,{variant:`outline`,size:`sm`,children:a?(0,W.jsx)(s,{to:`/workflows/$name`,params:{name:a},search:{new:!0},children:`Try it`}):(0,W.jsx)(s,{to:`/workflows`,children:`Try it`})}),teammate:(0,W.jsx)(E,{variant:`outline`,size:`sm`,children:(0,W.jsx)(s,{to:`/people`,children:`Add`})}),online:(0,W.jsx)(E,{variant:`outline`,size:`sm`,children:(0,W.jsx)(s,{to:`/hosting`,children:`Go live`})})};return(0,W.jsxs)(_,{role:`region`,"aria-labelledby":`setup-title`,children:[(0,W.jsxs)(T,{children:[(0,W.jsx)(C,{children:(0,W.jsx)(`span`,{id:`setup-title`,children:`Set up your company`})}),(0,W.jsxs)(g,{children:[c,` of `,r.length,` done`]}),(0,W.jsx)(v,{children:(0,W.jsx)(k,{variant:`ghost`,size:`sm`,onClick:()=>{I(F,`hidden`),i(!0)},children:`Hide`})})]}),(0,W.jsx)(y,{children:(0,W.jsx)(`ol`,{className:`flex flex-col gap-3`,children:r.map(t=>(0,W.jsxs)(`li`,{className:`flex items-start gap-3`,children:[e[t]?(0,W.jsx)(L,{"aria-label":`Done`,weight:`fill`,className:`mt-0.5 size-4 shrink-0 text-tone-ok-foreground`}):(0,W.jsx)(U,{"aria-label":`To do`,className:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),(0,W.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,W.jsx)(`span`,{className:e[t]?`text-muted-foreground`:`font-medium`,children:K[t].title}),!e[t]&&(0,W.jsx)(`span`,{className:`text-muted-foreground`,children:K[t].about})]}),!e[t]&&d[t]]},t))})})]})}function Y(){let{mine:e}=B(),{data:t}=u({...l(),select:i});return e.length===0?null:(0,W.jsx)(S,{title:`Waiting on you`,children:(0,W.jsx)(A,{children:e.map(e=>(0,W.jsx)(m,{variant:`outline`,size:`sm`,children:(0,W.jsxs)(s,{to:`/inbox`,search:{show:`mine`,approval:d(e)},children:[(0,W.jsxs)(N,{children:[(0,W.jsx)(P,{children:e.approval.title}),(0,W.jsxs)(j,{children:[t[e.run.workflow]??e.run.workflow,` · from `,a(e.run),` ·`,` `,(0,W.jsx)(x,{at:e.approval.requestedAt})]})]}),(0,W.jsx)(M,{children:(0,W.jsx)(h,{"aria-hidden":`true`})})]})},d(e)))})})}function X(){let{data:e}=u({...o(),select:e=>e.filter(e=>!c.has(e.workflow)).slice(0,G)});return(0,W.jsx)(S,{title:`Recent runs`,children:(0,W.jsxs)(_,{className:`gap-0 py-0`,children:[e.length===0?(0,W.jsx)(w,{className:`border-0`,title:`No runs yet`,children:`A workflow's runs show here once it runs.`}):(0,W.jsx)(z,{runs:e}),(0,W.jsx)(`div`,{className:`border-t px-4 py-2`,children:(0,W.jsx)(s,{to:`/workflows`,search:{view:`runs`},className:`text-xs text-muted-foreground hover:text-foreground`,children:`All runs`})})]})})}var Z=q;export{Z as component};
@@ -0,0 +1 @@
1
+ import{r as e}from"./engine-CBuzy-Ik.js";import{Bn as t,Vn as n,fi as r,pi as i,ut as a,zn as o}from"./queries-XJ-fmuYb.js";import{M as s}from"./common-DZLdx_jS.js";import{f as c,h as l,m as u,z as d}from"./kit-BZcdh1Xm.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=i();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:i,link:x,selected:S}){return(0,y.jsxs)(v,{className:i,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 i=o(e).length,p=x?x(e):a(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)(c,{tip:(0,y.jsx)(`code`,{children:e.runId}),children:(0,y.jsx)(r,{...p,onClick:e=>e.stopPropagation(),children:x?t(e.runId):e.workflow})}),e.sandbox!==void 0&&(0,y.jsx)(s,{name:e.sandbox})]})}),(0,y.jsx)(_,{children:(0,y.jsx)(u,{dot:!0,tone:d[e.status],children:e.status})}),(0,y.jsx)(_,{children:n(e)}),(0,y.jsx)(_,{className:`text-muted-foreground`,children:(0,y.jsx)(l,{at:e.createdAt})}),(0,y.jsx)(_,{children:i>0?(0,y.jsx)(u,{tone:`waiting`,children:f(i,`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{fi as t}from"./queries-XJ-fmuYb.js";import{g as n,p as r}from"./common-DZLdx_jS.js";import{G as i,K as a,U as o,W as s,a as c,n as l,q as u,s as d,t as f}from"./kit-BZcdh1Xm.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-nkQLXJxG.js";import{r as C}from"./scenario-graph-W2XcWuur.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)(c,{role:`region`,"aria-label":e.name,className:m(r,`order-first gap-0 py-0`),children:[(0,w.jsxs)(u,{className:`border-b py-3`,children:[(0,w.jsx)(l,{children:e.name}),(0,w.jsxs)(i,{children:[(0,w.jsx)(`code`,{children:e.file}),` · `,p(e.steps.length,`step`)]}),(0,w.jsx)(o,{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)(s,{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)(a,{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{Pr as n}from"./queries-XJ-fmuYb.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{E as r}from"./kit-BZcdh1Xm.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-5oboyLiq.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{Ur as t,_t as n,fi as r,j as i,rn as a}from"./queries-XJ-fmuYb.js";import{Dt as o,Q as s,Tt as c,Z as l,s as u}from"./common-DZLdx_jS.js";import{G as d,H as f,J as p,W as m,n as h,o as g,q as _}from"./kit-BZcdh1Xm.js";import{a as v,i as y,n as b,o as x,r as S,t as C}from"./table-B81tv0LG.js";import{t as w}from"./site-icon-1Mcc1UIb.js";var T=e(),E=e=>new Map(e.sites.filter(e=>e.public).map(e=>[e.name,e]));function D(){let e=s(),{data:n}=a({...i(),select:E});return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(u,{count:e.length}),(0,T.jsx)(f,{className:`gap-0 py-0`,children:e.length===0?(0,T.jsxs)(g,{className:`border-0`,title:`This repo has no sites`,children:[`A site is a folder of pages, `,(0,T.jsx)(`code`,{children:`sites/<name>/routes/`}),`, beside the config.`]}):(0,T.jsxs)(C,{children:[(0,T.jsx)(v,{children:(0,T.jsxs)(x,{children:[(0,T.jsx)(y,{children:`Site`}),(0,T.jsx)(y,{children:`Pages`}),(0,T.jsx)(y,{children:`Public at`}),(0,T.jsx)(y,{children:`Languages`})]})}),(0,T.jsx)(b,{children:e.map(({name:e,app:i,title:a,icon:o,pages:s})=>(0,T.jsxs)(x,{children:[(0,T.jsx)(S,{className:`align-top font-medium`,children:(0,T.jsxs)(`div`,{className:`flex items-center gap-2 [&_svg]:size-4`,children:[(0,T.jsx)(w,{icon:o,public:n.has(e)}),s[0]?(0,T.jsx)(r,{to:s[0].to,children:a}):a,i&&(0,T.jsx)(p,{variant:`secondary`,children:i}),(0,T.jsx)(`code`,{className:`text-xs font-normal text-muted-foreground`,children:t(e)})]})}),(0,T.jsx)(S,{className:`align-top whitespace-normal`,children:(0,T.jsx)(`ul`,{"aria-label":`${a}'s pages`,className:`flex flex-wrap gap-x-3 gap-y-1`,children:s.map(({to:e,label:t})=>(0,T.jsx)(`li`,{children:(0,T.jsx)(r,{to:e,children:t})},e))})}),(0,T.jsx)(S,{className:`align-top`,children:n.has(e)?(0,T.jsx)(k,{site:n.get(e)}):(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:`In the app only`})}),(0,T.jsx)(S,{className:`align-top`,children:(0,T.jsx)(A,{locales:n.get(e)?.locales})})]},e))})]})}),e.length>0&&(0,T.jsx)(O,{})]})}function O(){let{data:e}=o({...n(),refetchInterval:!1,select:e=>e.world??null});return e===void 0?null:(0,T.jsxs)(f,{children:[(0,T.jsxs)(_,{children:[(0,T.jsx)(h,{children:e?`The demo's world: ${e.name}`:`The demo's world`}),(0,T.jsxs)(d,{children:[(0,T.jsx)(`code`,{children:`sanoma demo`}),` builds these sites to run in any page, on the connectors' fakes, seeded from`,` `,(0,T.jsx)(`code`,{children:`scenarios/world.feature`}),e?`:`:`: one Scenario of Givens, which this repo has not written yet.`]})]}),e&&(0,T.jsx)(m,{children:(0,T.jsx)(`ul`,{"aria-label":`The world's Givens`,className:`flex flex-col gap-1 font-mono text-xs`,children:e.steps.map((e,t)=>(0,T.jsx)(`li`,{children:e},t))})})]})}function k({site:e}){let t=l(e);return t?(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,T.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1`,children:[new URL(t).host,(0,T.jsx)(c,{"aria-hidden":`true`,className:`size-3.5`})]}),(0,T.jsx)(`a`,{href:new URL(`sitemap.xml`,t).href,target:`_blank`,rel:`noreferrer`,className:`text-muted-foreground`,children:`Sitemap`})]}):(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:`Public`})}function A({locales:e}){return e?(0,T.jsx)(`ul`,{"aria-label":`Languages`,className:`flex flex-wrap gap-x-3 gap-y-1`,children:e.map((e,t)=>(0,T.jsxs)(`li`,{children:[(0,T.jsx)(`code`,{children:e}),t===0&&(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:` default`})]},e))}):(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:`One`})}export{D 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{Et as r,Ln as i,Mr as a,mi as o,vi as s}from"./queries-XJ-fmuYb.js";import{Ct as c}from"./common-DZLdx_jS.js";import{p as l,s as u}from"./kit-BZcdh1Xm.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 C,d as te,f as ne,g as re,h as ie,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{t as ue}from"./Check.es-b7BdqO2s.js";import{a as de,c as fe,i as pe,n as me,o as he,r as ge,t as _e}from"./useRegisterFieldControl-CT8iqvDE.js";import{t as ve}from"./useValueChanged-DBqn456b.js";import{t as ye}from"./spinner-XaRXIj9W.js";import{A as be,C as xe,D as Se,E as Ce,O as we,S as Te,T as Ee,j as De,k as Oe,w as T,x as ke}from"./index-CA_5CFb4.js";import{t as Ae}from"./Plus.es-i3Vaa2WW.js";import{t as E}from"./textarea-CRpYU-qx.js";import{a as D,c as je,i as O,l as k,n as A,o as Me,r as Ne,s as Pe,t as Fe}from"./schema-BpqanhX0.js";var j=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 j(e,t):new j(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 C(()=>{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]:``}},...fe}}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(ie(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:ie,nativeButton:w=!1,style:le,...ue}=e,{clearErrors:fe}=de(),{disabled:ye,name:be,setDirty:xe,setFilled:Se,setTouched:Ce,state:we,validationMode:Te,validityData:Ee,validation:De}=he(),Oe=Ve(),{labelId:T,registerControlId:ke,getDescriptionProps:Ae}=pe(),E=Ke(),D=E?.allValues===void 0?void 0:E.parent,je=D!==void 0,O=ye||Oe.disabled||E?.disabled||o,k=be??f,A=ie??k,Me=b(),Ne=E?.registerControlId!==ke,Pe=ge({id:l||void 0,enabled:Ne}),Fe=w?Pe:Me,j={};je&&(m?j=D.getParentProps():A!==void 0&&(j=D.getChildProps(A)));let{checked:Ie=n,indeterminate:M=u,onCheckedChange:Re,...ze}=j,Be=E?.value,P=N.useRef(null),Ue=me(O,P),{getButtonProps:Ge,buttonRef:Je}=te({disabled:O,native:w}),I=E?.validation??De,[L,Xe]=c({controlled:A!==void 0&&Be!==void 0&&!m?Be.includes(A):Ie,default:i,name:`Checkbox`,state:`checked`}),Ze=je?!!Ie:L,R=je&&M||u;_e(P,Me,L,void 0,!E&&!O,f);let Qe=D?.registerChildId,z=N.useRef(null),$e=I.registerInput,B=E?A: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,T,z,!w,Pe,ue[`aria-label`]);C(()=>{z.current&&(z.current.indeterminate=R),E||Se(L)},[L,R,E,Se]),ve(L,()=>{E||(fe(k),xe(L!==Ee.initialValue),I.change(L))});let et=re({checked:L,disabled:O,form:s,name:m?void 0:k,id:w?void 0:Pe,required:S,ref:H,style:k?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),A!==void 0&&E!==void 0&&!m&&!je))){let e=t?[...E.value,A]:E.value.filter(e=>e!==A);E.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){P.current?.focus()}},ie===void 0?se:{value:(E?L&&ie:ie)||``},Ae,e=>I.getValidationProps(O,e));N.useEffect(()=>{if(!D||A===void 0)return;let e=D.disabledStatesRef.current;return e.set(A,O),()=>{e.delete(A)}},[D,O,A]);let tt=N.useMemo(()=>({...we,checked:Ze,disabled:O,readOnly:g,required:S,indeterminate:R}),[we,Ze,O,g,S,R]),nt=We(tt),W=ae(`span`,e,{state:tt,ref:[Je,P,t],props:[{id:Fe,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&&(Ce(!0),Ue(!1),Te===`onBlur`&&I.commit(E?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||O)return;e.preventDefault();let t=z.current;t&&ne(t,e)}},ue,ze,Ge,Ae,e=>I.getValidationProps(O,e)],stateAttributesMapping:nt}),rt=W.props.id;return C(()=>{if(Qe&&!m&&A!==void 0&&rt!==void 0)return Qe(A,rt)},[Qe,m,A,rt]),(0,F.jsxs)(qe.Provider,{value:tt,children:[W,!L&&!E&&k&&!m&&ee!==void 0&&(0,F.jsx)(`input`,{type:`hidden`,form:s,name:k,value:ee,disabled:O}),(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)(ue,{"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,C=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===C&&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 te={...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:C};Object.defineProperty(te,"__srcErrorMap",{value:g,enumerable:!1,configurable:!0}),r[a]=te}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})),a=r;(t.form!==e.form||t.name!==e.name)&&(a=new wt({...e}),i(a),n({form:e.form,name:e.name}));let s=o(a.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),c=o(a.store,e=>e.meta.isTouched),l=o(a.store,e=>e.meta.isBlurred),u=o(a.store,e=>e.meta.isDirty),d=o(a.store,e=>e.meta.errorMap),f=o(a.store,e=>e.meta.errorSourceMap),p=o(a.store,e=>e.meta.isValidating),m=(0,N.useMemo)(()=>({...a,get state(){return{value:e.mode===`array`?a.state.value:s,get meta(){return{...a.state.meta,isTouched:c,isBlurred:l,isDirty:u,errorMap:d,errorSourceMap:f,isValidating:p}}}}}),[a,e.mode,s,c,l,u,d,f,p]);return $(a.mount,[a]),$(()=>{a.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 a=o(r.store,e=>e.value),s=o(r.store,e=>e.meta.isTouched),c=o(r.store,e=>e.meta.isBlurred),l=o(r.store,e=>e.meta.isDirty),u=o(r.store,e=>e.meta.errorMap),d=o(r.store,e=>e.meta.errorSourceMap),f=o(r.store,e=>e.meta.isValidating),p=o(r.store,e=>e.meta.isSubmitting),m=o(r.store,e=>e.meta.isSubmitted),h=o(r.store,e=>e.meta.submissionAttempts),g=o(r.store,e=>e.meta.isSubmitSuccessful),_=o(r.store,e=>e.meta.canSubmit),v=o(r.store,e=>e.meta.isValid),y=o(r.store,e=>e.meta.isFieldsValid),b=o(r.store,e=>e.meta.isFieldsValidating),x=o(r.store,e=>e.meta.isGroupValid),S=(0,N.useMemo)(()=>({...r,handleSubmit:((...e)=>r._handleSubmit(...e)),get state(){return{...r.state,value:a,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,a,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=o(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=A(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)(we,{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)(ye,{"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:r,failed:o}){let s=i(e);if(!s?.issues?.length)return s||console.error(`sanoma app: ${o}:`,e),{form:a(e).trim()||`${o}, and no reason was given`,fields:{}};let c={},l=[];for(let e of s.issues){let r=Me(t,n(e.path),e.message);r?c[r.name]??=r.message:l.push(Pe(e))}let u=Object.keys(c).length>0;return{form:l.length?l.join(`; `):u?void 0:r,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)(T,{orientation:`horizontal`,children:t(n)})]})})}function Yt(e,t,n,i,a){let o=r({navigate:!a}),s=(0,N.useMemo)(()=>{let e=i&&(n?{[Wt]:i.input}:i.input);return D(t,e)},[t,n,i]),c=async e=>{let r;try{r=await o.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`})}a?.(r)};return Kt(s,async r=>{if(i)return c({scenario:i.name});let a=Fe(t,r);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=je(n);if(t.kind===`object`)return(0,F.jsxs)(De,{children:[(0,F.jsx)(be,{children:(0,F.jsx)(tn,{field:t})}),t.description&&(0,F.jsx)(Ce,{children:t.description}),(0,F.jsx)(we,{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)(De,{"data-invalid":r.state.meta.errors.length?!0:void 0,children:[(0,F.jsx)(be,{children:(0,F.jsx)(tn,{field:t})}),t.description&&(0,F.jsx)(Ce,{children:t.description}),(0,F.jsxs)(we,{children:[r.state.value.map((a,o)=>{let s=`${t.label} ${o+1}`,c=`Remove ${s}`;return(0,F.jsxs)(T,{orientation:`horizontal`,className:`items-start`,children:[(0,F.jsx)(Ee,{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)(T,{orientation:`horizontal`,className:`group-disabled/ro:hidden`,children:(0,F.jsxs)(w,{type:`button`,variant:`outline`,onClick:()=>r.pushValue(O(i,i.default)),children:[(0,F.jsx)(Ae,{"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)(Ce,{children:t.description}),t.kind===`json`&&(0,F.jsx)(Ce,{children:`Entered as JSON.`})]});if(t.kind===`boolean`)return(0,F.jsxs)(T,{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)(Ee,{children:[(0,F.jsx)(Oe,{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)(xe,{...c,...Zt[t.kind],value:a,onChange:s});break;case`date`:u=a===``||Qt.test(a)?(0,F.jsx)(xe,{...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)(ke,{...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)(E,{...c,className:`font-mono`,rows:4,placeholder:`JSON`,value:a,onChange:s})}return(0,F.jsxs)(T,{"data-invalid":o,children:[(0,F.jsx)(Oe,{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 s()?(0,F.jsx)(xe,{...n,type:`datetime-local`,value:k(e),onChange:e=>t(Ne(e.target.value)??``)}):(0,F.jsx)(xe,{...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)(Se,{errors:e.filter(Boolean).map(e=>({message:String(e)}))})}export{Kt as a,Ve as c,qt as i,Le as l,Jt as n,R as o,Gt as r,Xe as s,Xt as t};