decocms 3.86.0 → 3.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/dist/client/assets/{AlertCircle-qY5ngKLr.js → AlertCircle-DCaILIxy.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-C7uYzZ0Z.js → ArrowUpRight-X5amVRyC.js} +1 -1
  3. package/dist/client/assets/{CheckCircle-CNYYpNQm.js → CheckCircle-CbsNhQn0.js} +1 -1
  4. package/dist/client/assets/{ChevronDown-BVJUps1_.js → ChevronDown-CVjUKz-z.js} +1 -1
  5. package/dist/client/assets/{ChevronLeft-CCp89cqe.js → ChevronLeft-D1-Kt_O_.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-MnjJHQHy.js → ChevronRight-B5vIIazE.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-CKICjFfX.js → ChevronUp-BVstlWuJ.js} +1 -1
  8. package/dist/client/assets/{DotsVertical-Bl5GcKp2.js → DotsVertical-jXbP9E3i.js} +1 -1
  9. package/dist/client/assets/{Eye-C6daRddp.js → Eye-CZMmu7ZU.js} +1 -1
  10. package/dist/client/assets/{FilterLines-B_0u5HAa.js → FilterLines-PGGfujeb.js} +1 -1
  11. package/dist/client/assets/Form-otBZ0aYe.js +26 -0
  12. package/dist/client/assets/{Globe01-CgHdNpOL.js → Globe01-Dkk22t5V.js} +1 -1
  13. package/dist/client/assets/{Globe04-DEangwXD.js → Globe04-DqCAznfy.js} +1 -1
  14. package/dist/client/assets/{HardDrive-V1dbAXdv.js → HardDrive-Dm-8T9iU.js} +1 -1
  15. package/dist/client/assets/{Key01-B0h1bFlR.js → Key01-BNThvF9O.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-BsVzrTOG.js → LayoutLeft-IEoSRkSV.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-B9RsD2Us.js → LinkExternal01-AFpRcUMN.js} +1 -1
  18. package/dist/client/assets/{Monitor01-DAM-u2R2.js → Monitor01-ge-8I-dx.js} +1 -1
  19. package/dist/client/assets/{Palette-DT8p7ZEl.js → Palette-DOfcM3Kq.js} +1 -1
  20. package/dist/client/assets/{Play-Blum-MoR.js → Play-BpkgKRX8.js} +1 -1
  21. package/dist/client/assets/{Plus-DfIcHYEj.js → Plus-BAnxALLT.js} +1 -1
  22. package/dist/client/assets/{SearchMd-B6GaXN7Q.js → SearchMd-D72ymOya.js} +1 -1
  23. package/dist/client/assets/{Settings02-Dd9sO-oW.js → Settings02-BYzbH49L.js} +1 -1
  24. package/dist/client/assets/{Shield01-DLANpVD0.js → Shield01-DzzrgcSm.js} +1 -1
  25. package/dist/client/assets/{Star01-Be_MjtDZ.js → Star01-CfUlqnJc.js} +1 -1
  26. package/dist/client/assets/{Stars01-D3ha2IeY.js → Stars01-DOOJ-cpD.js} +1 -1
  27. package/dist/client/assets/{Stars02-DHcW8N80.js → Stars02-BcDfq8PM.js} +1 -1
  28. package/dist/client/assets/{Sun-DO_Gt4P2.js → Sun-r3rOsIIR.js} +1 -1
  29. package/dist/client/assets/{SwitchHorizontal01-CrHLIeRP.js → SwitchHorizontal01-D3QmyK-N.js} +1 -1
  30. package/dist/client/assets/{Tool01-hxrY31T7.js → Tool01-Bahn8UbK.js} +1 -1
  31. package/dist/client/assets/{Trash01-DGJ-LjB-.js → Trash01-BNbAqaqW.js} +1 -1
  32. package/dist/client/assets/{Upload01-CzOJ3UuD.js → Upload01-4k3hmRFX.js} +1 -1
  33. package/dist/client/assets/{User01-DR_UC5XH.js → User01-_ttgUTw7.js} +1 -1
  34. package/dist/client/assets/{Users01-cxH39exM.js → Users01-BwX0Mh9G.js} +1 -1
  35. package/dist/client/assets/{Users03-BZYHqQGQ.js → Users03-Bp6iF_8k.js} +1 -1
  36. package/dist/client/assets/{X-CXRx6PGX.js → X-D-dT8MOl.js} +1 -1
  37. package/dist/client/assets/{XCircle-BLfqcVud.js → XCircle-BGPqJ1Ro.js} +1 -1
  38. package/dist/client/assets/{XClose-4ak3u3qT.js → XClose-CNxbnD3N.js} +1 -1
  39. package/dist/client/assets/{Zap-DVtX-UPi.js → Zap-CxIlaYID.js} +1 -1
  40. package/dist/client/assets/{ZapSquare-iu6ldaYZ.js → ZapSquare-BDFHxBEC.js} +1 -1
  41. package/dist/client/assets/{ZoomOut-6aWLXLSs.js → ZoomOut-Bw1ZSU5L.js} +1 -1
  42. package/dist/client/assets/{access-gate-B_rz72ZQ.js → access-gate-CCJp4m8K.js} +1 -1
  43. package/dist/client/assets/{add-section-modal-ExcCDC5z.js → add-section-modal-BgrC9Ld1.js} +1 -1
  44. package/dist/client/assets/{agent-icon-CKGTD-zQ.js → agent-icon-DLeN3d18.js} +1 -1
  45. package/dist/client/assets/{agents-list-DKD78ho4.js → agents-list-Q3tDYSwW.js} +1 -1
  46. package/dist/client/assets/ai-providers-BqFV0dkm.js +1 -0
  47. package/dist/client/assets/{alert-DIaLGkVq.js → alert-Dry1jh9V.js} +1 -1
  48. package/dist/client/assets/{alert-dialog-D5KOx-3H.js → alert-dialog-BRxMo-sj.js} +1 -1
  49. package/dist/client/assets/app-editor-CmSP6n2r.js +1 -0
  50. package/dist/client/assets/{auth-B4fF5n_6.js → auth-BmpBXuc6.js} +1 -1
  51. package/dist/client/assets/{auth-catchall-DS1LbQ8-.js → auth-catchall-C2f_hrTA.js} +1 -1
  52. package/dist/client/assets/{auth-entry-BVyaHjaQ.js → auth-entry-Dc0ISy_Q.js} +1 -1
  53. package/dist/client/assets/auth-split-layout-vIU-YxKv.js +1 -0
  54. package/dist/client/assets/{authenticate-and-persist-oauth-D2tM_mGL.js → authenticate-and-persist-oauth-Ch8j6yff.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-BKx-xx1i.js → automation-list-row-DuiEBMt2.js} +1 -1
  56. package/dist/client/assets/{automation-runs-_FCeac3K.js → automation-runs-Cdam9_64.js} +1 -1
  57. package/dist/client/assets/{automations-BQ894D8d.js → automations-CdkAIVKM.js} +1 -1
  58. package/dist/client/assets/{avatar-3b85MUU5.js → avatar-ByeXDTC_.js} +1 -1
  59. package/dist/client/assets/{badge-CBy4Rm2Q.js → badge-DUd6QA6I.js} +1 -1
  60. package/dist/client/assets/{block-document-BFMWdkuR.js → block-document-CC_dKbbH.js} +1 -1
  61. package/dist/client/assets/{brand-context-DQ3HUqVS.js → brand-context-EyJOR9fi.js} +1 -1
  62. package/dist/client/assets/buckets-Du6WAmVO.js +1 -0
  63. package/dist/client/assets/{capability-load-error-DmenvLwh.js → capability-load-error-hf3qlFQ9.js} +1 -1
  64. package/dist/client/assets/{card-D0ElZuSJ.js → card-BL8IT_Xq.js} +1 -1
  65. package/dist/client/assets/category-editor-BkcL4gtt.js +1 -0
  66. package/dist/client/assets/{chat-context-SWJ_FDEf.js → chat-context-8aInoVVs.js} +1 -1
  67. package/dist/client/assets/{checkbox-UCOb4UyX.js → checkbox-BvC4eja3.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-DYcgRZGE.js → cli-auth-success-BzKwknZh.js} +1 -1
  69. package/dist/client/assets/collection-detail-DGACG0zf.js +1 -0
  70. package/dist/client/assets/{collection-display-button-DY7UIm0_.js → collection-display-button-CWZcD7VW.js} +1 -1
  71. package/dist/client/assets/{collection-search-B-ZTg2tB.js → collection-search-xJgITIyC.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-7m5XLASC.js → collection-tabs-rwQ7O1FC.js} +1 -1
  73. package/dist/client/assets/{command-CKe7nBfr.js → command-DrqBy6cr.js} +1 -1
  74. package/dist/client/assets/commerce-onboarding-PAEJK5wr.js +1 -0
  75. package/dist/client/assets/{connect-desktop-dialog-JUjDMHMz.js → connect-desktop-dialog-CN-nGv3X.js} +1 -1
  76. package/dist/client/assets/{connection-card-By0LggNB.js → connection-card-_vJp-QnB.js} +1 -1
  77. package/dist/client/assets/connection-detail-ja-xrIwZ.js +1 -0
  78. package/dist/client/assets/{connection-form-helpers-DeSC5iva.js → connection-form-helpers-I0PYYuLM.js} +1 -1
  79. package/dist/client/assets/connections-B1jNaws1.js +1 -0
  80. package/dist/client/assets/{context-menu-BXRYPu2v.js → context-menu-HarJm6y_.js} +1 -1
  81. package/dist/client/assets/{decopilot-DBiOjpCq.js → decopilot-DlerL3TD.js} +1 -1
  82. package/dist/client/assets/{decopilot-sse-pool-Cd7s5cwH.js → decopilot-sse-pool-D0qyyVP7.js} +1 -1
  83. package/dist/client/assets/{dialog-CwfeALzq.js → dialog-BuyMoIGd.js} +1 -1
  84. package/dist/client/assets/{domain-settings-DYoOK4LM.js → domain-settings-DKI84wPN.js} +1 -1
  85. package/dist/client/assets/{drawer-_RQmWfAo.js → drawer-R83GIfSJ.js} +1 -1
  86. package/dist/client/assets/{dropdown-menu-CppAWsT_.js → dropdown-menu-6KXvVkGj.js} +1 -1
  87. package/dist/client/assets/{empty-state-CfAeMInj.js → empty-state-8wIqOHhT.js} +1 -1
  88. package/dist/client/assets/{extract-connection-data-qW230rJb.js → extract-connection-data-BlAuqFCc.js} +1 -1
  89. package/dist/client/assets/file-explorer-Xu0RpKKj.js +2 -0
  90. package/dist/client/assets/{file-type-icon-CdZyaTKH.js → file-type-icon-CvUBwDjL.js} +1 -1
  91. package/dist/client/assets/{files-BagYqqvX.js → files-aEPuOJ77.js} +1 -1
  92. package/dist/client/assets/{form-xYXw--Kt.js → form-DrdYYSH7.js} +1 -1
  93. package/dist/client/assets/general-ItE-Caya.js +1 -0
  94. package/dist/client/assets/{github-repo-picker-B1nNLNvt.js → github-repo-picker-B9itq1xr.js} +1 -1
  95. package/dist/client/assets/{hooks-CLt3SUb8.js → hooks-B2hm8dgB.js} +1 -1
  96. package/dist/client/assets/{import-from-deco-dialog-DhVDGeAO.js → import-from-deco-dialog-LpeKak-8.js} +1 -1
  97. package/dist/client/assets/{index-Benu0NlA.js → index-01iYleW9.js} +1 -1
  98. package/dist/client/assets/index-8j69uwRU.js +1 -0
  99. package/dist/client/assets/{index-DkOvgjMe.js → index-B0KuFfZg.js} +2 -2
  100. package/dist/client/assets/index-B6DoI6qf.css +1 -0
  101. package/dist/client/assets/{index-uKLTzwtC.js → index-BD-GJSKU.js} +1 -1
  102. package/dist/client/assets/index-BP-ioQEj.js +1 -0
  103. package/dist/client/assets/index-BdQq_4o_.js +1 -0
  104. package/dist/client/assets/{index-CLz5uOtD.js → index-BneU-diW.js} +1 -1
  105. package/dist/client/assets/index-BpzEWYcj.js +1 -0
  106. package/dist/client/assets/{index-D7pI5IpD.js → index-C4Pfm5Oe.js} +1 -1
  107. package/dist/client/assets/{index-CCbaPbk-.js → index-C5jRpoWd.js} +1 -1
  108. package/dist/client/assets/index-CDSjl7Ui.js +1 -0
  109. package/dist/client/assets/{index-B7l76Ktp.js → index-CZObCZGR.js} +1 -1
  110. package/dist/client/assets/{index-Yqaph2kh.js → index-CdH9ADyr.js} +10 -10
  111. package/dist/client/assets/{index-DILk6pqr.js → index-DP_mpTaG.js} +4 -4
  112. package/dist/client/assets/{index-U2AV4b0H.js → index-oY9SWynr.js} +1 -1
  113. package/dist/client/assets/{index-redirect-Bmnv-CEe.js → index-redirect-CLJSuvD8.js} +1 -1
  114. package/dist/client/assets/{input-DntqEqec.js → input-BIu7fT2w.js} +1 -1
  115. package/dist/client/assets/{integration-icon-CxxjWIPp.js → integration-icon-DM5W4vtE.js} +1 -1
  116. package/dist/client/assets/{label-NJtv9Xrj.js → label-DPhUzMw-.js} +1 -1
  117. package/dist/client/assets/{login-_rldC1vQ.js → login-c1Klklse.js} +1 -1
  118. package/dist/client/assets/{mcp-oauth-BTUV7ht5.js → mcp-oauth-CzalxeD0.js} +1 -1
  119. package/dist/client/assets/{members-DNPmSt7U.js → members-B3SDcfGH.js} +2 -2
  120. package/dist/client/assets/{monaco-editor-BS1tOSHv.js → monaco-editor-OzwRuboT.js} +1 -1
  121. package/dist/client/assets/{monitoring-stats-row-Bly7CEZA.js → monitoring-stats-row-CZFGN_Ar.js} +1 -1
  122. package/dist/client/assets/{oauth-callback-ai-provider-DX668UtX.js → oauth-callback-ai-provider-Zibshrw4.js} +1 -1
  123. package/dist/client/assets/{oauth-callback-Brn-4X2e.js → oauth-callback-rILtKGBx.js} +1 -1
  124. package/dist/client/assets/{onboarding-h3gvqE97.js → onboarding-Ba1_LMfh.js} +1 -1
  125. package/dist/client/assets/{org-install-devOK14U.js → org-install-B3ClN2KG.js} +1 -1
  126. package/dist/client/assets/{org-layout-C6RX2zdp.js → org-layout-BIcSmhzR.js} +1 -1
  127. package/dist/client/assets/{organization-choice-DFUlgHk4.js → organization-choice-Djr2j4p7.js} +1 -1
  128. package/dist/client/assets/{page-seo-form-DIlFQufm.js → page-seo-form-Cygtl0_G.js} +1 -1
  129. package/dist/client/assets/page-seo-sheet-Ca_ed5x4.js +1 -0
  130. package/dist/client/assets/{popover-DmLzbFpk.js → popover-CoSr2FBy.js} +1 -1
  131. package/dist/client/assets/post-editor-DlBTWEb0.js +1 -0
  132. package/dist/client/assets/{preview-dialog-XKGBZobL.js → preview-dialog-Ew97vZX-.js} +1 -1
  133. package/dist/client/assets/{primitives-pW0ukQfP.js → primitives-Y5zOyEze.js} +1 -1
  134. package/dist/client/assets/profile-Bv93_4sd.js +1 -0
  135. package/dist/client/assets/project-app-view-B-FRjb71.js +1 -0
  136. package/dist/client/assets/record-editor-CnrRrpeQ.js +1 -0
  137. package/dist/client/assets/registry-DXqXIJ3q.js +2 -0
  138. package/dist/client/assets/{registry-layout-CQVApMRy.js → registry-layout-DJX2uyJL.js} +2 -2
  139. package/dist/client/assets/{require-capability-BlqPTqxe.js → require-capability-CaEtxlmL.js} +1 -1
  140. package/dist/client/assets/{required-auth-layout-DdFOKjMd.js → required-auth-layout-DaTmuUAT.js} +1 -1
  141. package/dist/client/assets/{reset-password-C7ldICgc.js → reset-password-DOCud_M1.js} +1 -1
  142. package/dist/client/assets/{roles-DqqpBRsM.js → roles-CxxJGu2W.js} +1 -1
  143. package/dist/client/assets/{save-status-DIZcxleS.js → save-status-CzIIhKYY.js} +1 -1
  144. package/dist/client/assets/{scroll-area-CN3_YfBC.js → scroll-area-DqRON9QZ.js} +1 -1
  145. package/dist/client/assets/{search-input-SieA9wsp.js → search-input-CBG595Ow.js} +1 -1
  146. package/dist/client/assets/secrets-CI45M6t4.js +1 -0
  147. package/dist/client/assets/{sections-editor-B8F8gKNp.js → sections-editor-DGK7CeFk.js} +2 -2
  148. package/dist/client/assets/select-Cr3vICrM.js +1 -0
  149. package/dist/client/assets/{select-model-DmLcnpxY.js → select-model-Bg44O4qj.js} +1 -1
  150. package/dist/client/assets/seo-editor-BnPhYxBs.js +1 -0
  151. package/dist/client/assets/{settings-layout-DStO9uhp.js → settings-layout-B3cOf57A.js} +1 -1
  152. package/dist/client/assets/{settings-section-BXkrjyua.js → settings-section-C9C9TZId.js} +1 -1
  153. package/dist/client/assets/{sheet-CgvO6KT7.js → sheet-CTaEFOuN.js} +1 -1
  154. package/dist/client/assets/{shell-controls-BlCSLJCZ.js → shell-controls-DTok3_fO.js} +1 -1
  155. package/dist/client/assets/{shell-layout-DAyf8ZZZ.js → shell-layout-BAiMOktM.js} +1 -1
  156. package/dist/client/assets/{shell-route-loading-44H3A_LH.js → shell-route-loading-s4EoOI9P.js} +1 -1
  157. package/dist/client/assets/{sidebar-D5TdEONj.js → sidebar-BSjkOAEq.js} +1 -1
  158. package/dist/client/assets/{skeleton-DUdp3Kvb.js → skeleton-DBbnbGFm.js} +1 -1
  159. package/dist/client/assets/{sortable.esm-DdDX2lbe.js → sortable.esm-DW_CXYvf.js} +1 -1
  160. package/dist/client/assets/sso-B0FMpGZK.js +1 -0
  161. package/dist/client/assets/{store-CrUgJduQ.js → store-DmCUraJs.js} +1 -1
  162. package/dist/client/assets/store-registry-DWQAV-zh.js +2 -0
  163. package/dist/client/assets/{studio-tools-DWzikkvB.js → studio-tools-D3_SJ0_N.js} +1 -1
  164. package/dist/client/assets/{switch-ZSF60LRT.js → switch-BSnmwd67.js} +1 -1
  165. package/dist/client/assets/{table-CAdy-hg6.js → table-B4QqlN52.js} +1 -1
  166. package/dist/client/assets/{tabs-CVnN0f33.js → tabs-B7KtNlAY.js} +1 -1
  167. package/dist/client/assets/{task-status-CtOjrZ5U.js → task-status-CN8kElP5.js} +1 -1
  168. package/dist/client/assets/{textarea-Fs50NfWG.js → textarea-B5r3kbSQ.js} +1 -1
  169. package/dist/client/assets/{toggle-group-C7SpEcqz.js → toggle-group-BoZF2OOS.js} +1 -1
  170. package/dist/client/assets/{toolbar-Dp05iiiH.js → toolbar-D_dUXYk3.js} +1 -1
  171. package/dist/client/assets/tools-list-Bw8CpHV0.js +1 -0
  172. package/dist/client/assets/{tooltip-DNJ6cRlV.js → tooltip-CYe5fPCQ.js} +1 -1
  173. package/dist/client/assets/{types-CsHe6BgD.js → types-CJgIJauG.js} +1 -1
  174. package/dist/client/assets/{use-ai-providers-CVKwKs8r.js → use-ai-providers-BQTrck2T.js} +1 -1
  175. package/dist/client/assets/{use-automations-Ca6VluJ_.js → use-automations-aeYDYpbz.js} +1 -1
  176. package/dist/client/assets/{use-capability-OLvFRh1U.js → use-capability-DhoZz-If.js} +1 -1
  177. package/dist/client/assets/{use-clock-tick-CWHp6nCX.js → use-clock-tick-BlJ7-hRX.js} +1 -1
  178. package/dist/client/assets/{use-collections-D0HN84Lz.js → use-collections-CSCQtjHx.js} +1 -1
  179. package/dist/client/assets/{use-connection-Bj1m8ynL.js → use-connection-CCWvfaxs.js} +1 -1
  180. package/dist/client/assets/{use-copy-CuQAt0Vj.js → use-copy-DJR4tQ3-.js} +1 -1
  181. package/dist/client/assets/{use-create-virtual-mcp-Cxqyw0Tn.js → use-create-virtual-mcp-CCvXLRxb.js} +1 -1
  182. package/dist/client/assets/{use-debounced-autosave-OpSLLz7d.js → use-debounced-autosave-C4Qmf5qO.js} +1 -1
  183. package/dist/client/assets/{use-delete-connection-ARKHDNqJ.js → use-delete-connection-gqYfcWeD.js} +1 -1
  184. package/dist/client/assets/{use-file-configs-aDA6u1U_.js → use-file-configs-B7ZdH4sp.js} +1 -1
  185. package/dist/client/assets/{use-infinite-scroll-CCIuAqs7.js → use-infinite-scroll-CU-J9rqm.js} +1 -1
  186. package/dist/client/assets/{use-join-requests-CyAP3Yln.js → use-join-requests-DrugHR3B.js} +1 -1
  187. package/dist/client/assets/{use-mcp-client-BdmHrvF5.js → use-mcp-client-B_wvxVvi.js} +1 -1
  188. package/dist/client/assets/{use-mcp-prompts-BwQLmLZi.js → use-mcp-prompts-B5ITx1M8.js} +1 -1
  189. package/dist/client/assets/{use-mcp-tools-ChlFTYss.js → use-mcp-tools--Zcng6MU.js} +1 -1
  190. package/dist/client/assets/{use-members-9pMsaLP9.js → use-members-DRYUtb_4.js} +1 -1
  191. package/dist/client/assets/{use-navigate-to-agent-Qyyx-mm9.js → use-navigate-to-agent-VYoT0How.js} +1 -1
  192. package/dist/client/assets/{use-org-auth-client-CtaccGLo.js → use-org-auth-client-p32QdZVr.js} +1 -1
  193. package/dist/client/assets/{use-org-sso-DvlbibgX.js → use-org-sso-DuGGcbA7.js} +1 -1
  194. package/dist/client/assets/{use-organization-roles-CYiD53yX.js → use-organization-roles-DshdakDm.js} +1 -1
  195. package/dist/client/assets/{use-organization-settings-a8PuTrsa.js → use-organization-settings-DNzEj3SY.js} +1 -1
  196. package/dist/client/assets/{use-registry-connections-DZ1G13oh.js → use-registry-connections-t5X0dgE2.js} +1 -1
  197. package/dist/client/assets/{use-secrets-GRgGPWUb.js → use-secrets-CdtjD3HA.js} +1 -1
  198. package/dist/client/assets/{use-status-sounds-DMne2oqE.js → use-status-sounds-SmT5_iKp.js} +1 -1
  199. package/dist/client/assets/{use-view-mode-CslUtkLV.js → use-view-mode-BCaeLPRd.js} +1 -1
  200. package/dist/client/assets/{use-virtual-mcp-OPb4DVO0.js → use-virtual-mcp-DTNF-w70.js} +1 -1
  201. package/dist/client/assets/useInfiniteQuery-Bziqv5Nz.js +1 -0
  202. package/dist/client/assets/{useQueries-BD3bwl6B.js → useQueries-B88iFaFv.js} +1 -1
  203. package/dist/client/assets/useSuspenseInfiniteQuery-Dx7jl2bl.js +1 -0
  204. package/dist/client/assets/variant-calendar-zBAnpIIP.js +1 -0
  205. package/dist/client/assets/{view-mode-toggle-k-q_tsqg.js → view-mode-toggle-dKl9f2N6.js} +1 -1
  206. package/dist/client/index.html +2 -2
  207. package/dist/server/cli.js +253 -206
  208. package/package.json +1 -1
  209. package/dist/client/assets/ai-providers-shPNJ0G8.js +0 -1
  210. package/dist/client/assets/app-editor-CASRPS-o.js +0 -1
  211. package/dist/client/assets/auth-split-layout-BO9g4lYZ.js +0 -1
  212. package/dist/client/assets/buckets-BJOevXCK.js +0 -1
  213. package/dist/client/assets/category-editor-Ci2DnrkV.js +0 -1
  214. package/dist/client/assets/collection-detail-BLwVko_9.js +0 -1
  215. package/dist/client/assets/commerce-onboarding-DpB8M1dk.js +0 -1
  216. package/dist/client/assets/connection-detail-BEiO-h95.js +0 -1
  217. package/dist/client/assets/connections-DJCB8L8S.js +0 -1
  218. package/dist/client/assets/file-explorer-DZMbkqJ0.js +0 -2
  219. package/dist/client/assets/general-C27Cwywq.js +0 -1
  220. package/dist/client/assets/index-BSzVFCV6.js +0 -26
  221. package/dist/client/assets/index-C6ZVo7HH.js +0 -1
  222. package/dist/client/assets/index-Cey8outX.js +0 -1
  223. package/dist/client/assets/index-D9MBRSbh.js +0 -1
  224. package/dist/client/assets/index-fHHzFvHF.css +0 -1
  225. package/dist/client/assets/page-seo-sheet-BsYTh7m4.js +0 -1
  226. package/dist/client/assets/post-editor-msU8kMVE.js +0 -1
  227. package/dist/client/assets/profile-Cq_Bww2z.js +0 -1
  228. package/dist/client/assets/project-app-view-DjSLRXjX.js +0 -1
  229. package/dist/client/assets/record-editor-SpOTRD39.js +0 -1
  230. package/dist/client/assets/registry-BYRguUOn.js +0 -2
  231. package/dist/client/assets/secrets-B2XOt0uB.js +0 -1
  232. package/dist/client/assets/select-DeFnLWdd.js +0 -1
  233. package/dist/client/assets/seo-editor-nfDAcvV7.js +0 -1
  234. package/dist/client/assets/sso-DFI00-8p.js +0 -1
  235. package/dist/client/assets/store-registry-DOL4KgkC.js +0 -2
  236. package/dist/client/assets/useInfiniteQuery-D-pnegbi.js +0 -1
  237. package/dist/client/assets/useSuspenseInfiniteQuery-_rNdlYkE.js +0 -1
  238. package/dist/client/assets/variant-calendar-DAwCBXUq.js +0 -1
@@ -1,26 +0,0 @@
1
- import{bg as lu,bh as De,bi as Gs,C as P,ak as ve,aF as ct,bj as Yi,aC as oe,bk as qn,bl as Be,aD as $t,bm as hn,z as U,bn as Ji,bo as Ys,bp as cu,bq as uu,br as Na,bs as du,bt as fu,bu as mu,bv as Fa,bw as hu,b6 as st,bx as pu,aE as at,by as gu,c as Oe,r as N,l as Fr,j as f,aP as Pa,w as Zi,a as yu,t as gr,bz as Xi,bA as bu,bB as $a,bC as xu,bD as vu,bE as Su,bf as Da,bF as Qi,R as wu,bG as ju,bH as Ou,bI as Eu,a2 as Cu,V as Xt,U as Qn,Z as pn,ah as Au,ai as _u,bJ as Tu,X as Iu,bK as Nu,B as Pr,i as es,b as Fu,E as Pu,aa as $u}from"./index-DILk6pqr.js";import{P as En}from"./index-D7pI5IpD.js";import{E as ka}from"./empty-state-CfAeMInj.js";import{A as Ra,f as Du,h as ku,n as Ru,j as Mu,k as Uu,i as Lu,u as Bu}from"./use-mcp-client-BdmHrvF5.js";import{c as Vu}from"./use-mcp-tools-ChlFTYss.js";import{b as Wu}from"./ZoomOut-6aWLXLSs.js";import{i as qu}from"./Key01-B0h1bFlR.js";import{b as zu,u as Ku,a as Hu}from"./use-connection-Bj1m8ynL.js";import{U as Cn,a as Jr,e as Js}from"./auth-B4fF5n_6.js";import{i as Gu,c as Yu,d as Ju,e as Zu}from"./extract-connection-data-qW230rJb.js";import{u as Xu}from"./use-registry-connections-DZ1G13oh.js";import{b as Qu}from"./use-organization-settings-a8PuTrsa.js";import{s as ed}from"./Plus-DfIcHYEj.js";import{e as Ma,d as td,b as nd,c as rd,S as id,a as sd}from"./select-DeFnLWdd.js";import{R as Zs}from"./index-CLz5uOtD.js";import{R as od,I as ad,a as ld}from"./index-C6ZVo7HH.js";import{_ as Ut}from"./index-Benu0NlA.js";import{A as Ua}from"./agent-icon-CKGTD-zQ.js";import{I as cd}from"./input-DntqEqec.js";import{a as ud,b as dd,P as fd}from"./popover-DmLzbFpk.js";import{u as md,a as hd,T as pd,c as gd,b as yd}from"./tooltip-DNJ6cRlV.js";import{u as bd}from"./use-virtual-mcp-OPb4DVO0.js";import{i as xd}from"./ChevronUp-CKICjFfX.js";import{i as vd}from"./SearchMd-B6GaXN7Q.js";import{a as Sd}from"./Users03-BZYHqQGQ.js";import{u as wd}from"./use-create-virtual-mcp-Cxqyw0Tn.js";function jd(){const t=new Ra({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0,code:{optimize:!1}});return lu(t),t}class Od{#e=jd();#t=new Map;#n=new WeakMap;getValidator(e){const n=this.#n.get(e);if(n)return n;let r;const i=s=>{if(!r){const o=Ed(e);let a=this.#t.get(o);a||(a=this.#e.compile(e),this.#t.set(o,a)),r=a}return r(s)?{valid:!0,data:s,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this.#e.errorsText(r.errors)}};return this.#n.set(e,i),i}}function Ed(t){return JSON.stringify(t,(e,n)=>n&&typeof n=="object"&&!Array.isArray(n)?Object.fromEntries(Object.keys(n).sort().map(r=>[r,n[r]])):n)}const Cd=new Od;var Ad=class{apply(t,e){if(!e.type)return;const n=Array.isArray(e.type)?e.type:[e.type],r=new Set(n);if(r.has("string")||(t.string=!1),!r.has("number")&&!r.has("integer")&&(t.number=!1),r.has("boolean")||(t.boolean=!1),r.has("null")||(t.null=!1),r.has("array")||(t.array=!1),r.has("object")||(t.object=!1),r.has("integer")&&t.number!==!1){const i=t.number||ve();i instanceof hn&&(t.number=i.int())}}},_d=class{apply(t,e){if(e.const===void 0)return;const n=e.const;t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1,typeof n=="string"?t.string=Be(n):typeof n=="number"?t.number=Be(n):typeof n=="boolean"?t.boolean=Be(n):n===null?t.null=Yi():Array.isArray(n)?t.array=void 0:typeof n=="object"&&(t.object=void 0)}},Td=class{apply(t,e){if(!e.enum)return;if(e.enum.length===0){e.type||(t.string=!1,t.number=!1,t.boolean=!1,t.null=!1,t.array=!1,t.object=!1);return}const n={string:e.enum.filter(r=>typeof r=="string"),number:e.enum.filter(r=>typeof r=="number"),boolean:e.enum.filter(r=>typeof r=="boolean"),null:e.enum.filter(r=>r===null),array:e.enum.filter(r=>Array.isArray(r)),object:e.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};t.string=this.createTypeSchema(n.string,"string"),t.number=this.createTypeSchema(n.number,"number"),t.boolean=this.createTypeSchema(n.boolean,"boolean"),t.null=n.null.length>0?Yi():!1,t.array=n.array.length>0?void 0:!1,t.object=n.object.length>0?void 0:!1}createTypeSchema(t,e){if(t.length===0)return!1;if(t.length===1)return Be(t[0]);if(e==="string")return $t(t);if(e==="number"){const[n,r,...i]=t;return qn([Be(n),Be(r),...i.map(s=>Be(s))])}return e==="boolean"?qn([Be(!0),Be(!1)]):!1}},Id=class{apply(t,e){const n=e;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=mu();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),t.file=r,t.string=!1}}},Nd=class{apply(t,e){const n=e;e.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&t.string===void 0&&(t.string=P())}},Fd=class{apply(t,e){const n=e;if(n.minLength!==void 0&&t.string!==!1){const r=t.string||P();r instanceof Ji&&(t.string=r.refine(i=>Array.from(i).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Pd=class{apply(t,e){const n=e;if(n.maxLength!==void 0&&t.string!==!1){const r=t.string||P();r instanceof Ji&&(t.string=r.refine(i=>Array.from(i).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},$d=class{apply(t,e){const n=e;if(n.pattern&&t.string!==!1){const r=t.string||P();if(r instanceof Ji){const i=new RegExp(n.pattern);t.string=r.regex(i)}}}},Dd=class{apply(t,e){const n=e;if(n.minimum!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof hn&&(t.number=r.min(n.minimum))}}},kd=class{apply(t,e){const n=e;if(n.maximum!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof hn&&(t.number=r.max(n.maximum))}}},Rd=class{apply(t,e){const n=e;if(n.exclusiveMinimum!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof hn&&(typeof n.exclusiveMinimum=="number"?t.number=r.gt(n.exclusiveMinimum):t.number=!1)}}},Md=class{apply(t,e){const n=e;if(n.exclusiveMaximum!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof hn&&(typeof n.exclusiveMaximum=="number"?t.number=r.lt(n.exclusiveMaximum):t.number=!1)}}},Ud=class{apply(t,e){const n=e;if(n.multipleOf!==void 0&&t.number!==!1){const r=t.number||ve();r instanceof hn&&(t.number=r.refine(i=>{if(n.multipleOf===0)return!1;const s=i/n.multipleOf,o=Math.round(s),a=Math.min(Math.abs(i)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(s-o)<=a/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Ld=class{apply(t,e){const n=e;e.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&t.array===void 0&&(t.array=oe(De()))}},Bd=class{apply(t,e){const n=e;n.minItems!==void 0&&t.array!==!1&&(t.array=(t.array||oe(De())).min(n.minItems))}},Vd=class{apply(t,e){const n=e;n.maxItems!==void 0&&t.array!==!1&&(t.array=(t.array||oe(De())).max(n.maxItems))}},Wd=class{apply(t,e){const n=e;if(t.array!==!1)if(Array.isArray(n.items))t.array=t.array||oe(De());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=Te(n.items);let i=oe(r);if(t.array&&t.array instanceof cu){const s=t.array._def;s.checks&&s.checks.forEach(o=>{if(o._zod&&o._zod.def){const a=o._zod.def;a.check==="min_length"&&a.minimum!==void 0?i=i.min(a.minimum):a.check==="max_length"&&a.maximum!==void 0&&(i=i.max(a.maximum))}})}t.array=i}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?t.array=t.array||oe(De()):t.array=oe(De()).max(0):typeof n.items=="boolean"&&n.items===!0?t.array=t.array||oe(De()):n.prefixItems&&(t.array=t.array||oe(De()))}},qd=class{apply(t,e){if(e.type!=="array")return;const n=e;if(!Array.isArray(n.items)||t.array===!1)return;const r=n.items.map(s=>Te(s));let i;r.length===0?i=Ys([]):i=Ys(r),n.minItems!==void 0&&n.minItems>r.length&&(i=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(i=!1),t.tuple=i,t.array=!1}},zd=class{apply(t,e){const n=e;t.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(t.object=t.object||U({}).passthrough())}},Kd=class{apply(t,e){const n=e;e.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&t.object===void 0&&(t.object=U({}).passthrough())}},Hd=class{apply(t,e){const n=e;if(n.maxProperties!==void 0&&t.object!==!1){const r=t.object||U({}).passthrough();t.object=r.refine(i=>Object.keys(i).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Gd=class{apply(t,e){const n=e;if(n.minProperties!==void 0&&t.object!==!1){const r=t.object||U({}).passthrough();t.object=r.refine(i=>Object.keys(i).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function zn(t,e){if(t===e)return!0;if(t==null||e==null)return t===e;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length!==e.length?!1:t.every((n,r)=>zn(n,e[r]));if(typeof t=="object"&&typeof e=="object"){const n=Object.keys(t),r=Object.keys(e);return n.length!==r.length?!1:n.every(i=>r.includes(i)&&zn(t[i],e[i]))}return!1}function Yd(){return t=>{if(!Array.isArray(t))return!0;const e=[];return t.every(n=>e.some(i=>zn(n,i))?!1:(e.push(n),!0))}}function Cr(t,e){return t.safeParse(e).success}var Jd=class{apply(t,e){if(!e.not)return t;const n=Te(e.not);return t.refine(r=>!Cr(n,r),{message:"Value must not match the 'not' schema"})}},Zd=class{apply(t,e){return e.uniqueItems!==!0?t:t.refine(Yd(),{message:"Array items must be unique"})}},Xd=class{apply(t,e){return!e.allOf||e.allOf.length===0?t:e.allOf.map(r=>Te(r)).reduce((r,i)=>Na(r,i),t)}},Qd=class{apply(t,e){if(!e.anyOf||e.anyOf.length===0)return t;const n=e.anyOf.length===1?Te(e.anyOf[0]):qn([Te(e.anyOf[0]),Te(e.anyOf[1]),...e.anyOf.slice(2).map(r=>Te(r))]);return Na(t,n)}},ef=class{apply(t,e){if(!e.oneOf||e.oneOf.length===0)return t;const n=e.oneOf.map(r=>Te(r));return t.refine(r=>{let i=0;for(const s of n)if(s.safeParse(r).success&&(i++,i>1))return!1;return i===1},{message:"Value must match exactly one of the oneOf schemas"})}},tf=class{apply(t,e){const n=e;if(n.prefixItems&&Array.isArray(n.prefixItems)){const i=n.prefixItems.map(s=>Te(s));return t.refine(s=>{if(!Array.isArray(s))return!0;for(let o=0;o<Math.min(s.length,i.length);o++)if(!Cr(i[o],s[o]))return!1;if(s.length>i.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const o=Te(n.items);for(let a=i.length;a<s.length;a++)if(!Cr(o,s[a]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return t}},nf=class{apply(t,e){const n=e;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return t;if(t instanceof du||t instanceof fu){const r={};if(n.properties)for(const[i,s]of Object.entries(n.properties))s!==void 0&&(r[i]=Te(s));if(n.required&&Array.isArray(n.required)){const i=new Set(n.required);for(const s of Object.keys(r))i.has(s)||(r[s]=r[s].optional())}else for(const i of Object.keys(r))r[i]=r[i].optional();return n.additionalProperties===!1?U(r):U(r).passthrough()}return t.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[i,s]of Object.entries(n.properties))if(s!==void 0&&Object.getOwnPropertyDescriptor(r,i)!==void 0&&!Te(s).safeParse(r[i]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const i of n.required)if(!(Object.getOwnPropertyDescriptor(r,i)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const i=new Set(Object.keys(n.properties));for(const s in r)if(!i.has(s))return!1}return!0},{message:"Object constraints validation failed"})}},rf=class{apply(t,e){if(!e.enum||e.enum.length===0)return t;const n=e.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?t:t.refine(r=>typeof r!="object"||r===null?!0:n.some(i=>zn(r,i)),{message:"Value must match one of the enum values"})}},sf=class{apply(t,e){if(e.const===void 0)return t;const n=e.const;return typeof n!="object"||n===null?t:t.refine(r=>zn(r,n),{message:"Value must equal the const value"})}},of=class{apply(t,e){return e.description&&(t=t.describe(e.description)),t}},af=class{apply(t,e){var n;const r=e;return!((n=r.required)!=null&&n.includes("__proto__"))||e.type!==void 0?t:De().refine(i=>this.validateRequired(i,r.required),{message:"Missing required properties"})}validateRequired(t,e){return typeof t!="object"||t===null||Array.isArray(t)?!0:e.every(n=>Object.prototype.hasOwnProperty.call(t,n))}},lf=class{apply(t,e){var n;const r=e;if(r.contains===void 0)return t;const i=Te(r.contains),s=(n=r.minContains)!=null?n:1,o=r.maxContains;return t.refine(a=>{if(!Array.isArray(a))return!0;let l=0;for(const u of a)Cr(i,u)&&l++;return!(l<s||o!==void 0&&l>o)},{message:"Array must contain required items matching the schema"})}},cf=class{apply(t,e){const{default:n}=e;return n===void 0||!t.safeParse(n).success?t:t.default(n)}},uf=[new _d,new Td,new Ad,new Id,new Nd,new Ld,new Kd,new Fd,new Pd,new $d,new Dd,new kd,new Rd,new Md,new Ud,new qd,new Bd,new Vd,new Wd,new Hd,new Gd,new zd],df=[new af,new rf,new sf,new Xd,new Qd,new ef,new tf,new nf,new lf,new Jd,new Zd,new cf,new of];function Te(t){if(typeof t=="boolean")return t?De():Gs();const e={};for(const i of uf)i.apply(e,t);const n=[];if(e.string!==!1&&n.push(e.string||P()),e.number!==!1&&n.push(e.number||ve()),e.boolean!==!1&&n.push(e.boolean||ct()),e.null!==!1&&n.push(e.null||Yi()),e.array!==!1&&n.push(e.array||oe(De())),e.tuple!==!1&&e.tuple!==void 0&&n.push(e.tuple),e.object!==!1)if(e.object)n.push(e.object);else{const i=uu(s=>typeof s=="object"&&s!==null&&!Array.isArray(s),"Must be an object, not an array");n.push(i)}e.file!==!1&&e.file!==void 0&&n.push(e.file);let r;n.length===0?r=Gs():n.length===1?r=n[0]:Object.keys(t).some(s=>s!=="$schema"&&s!=="title"&&s!=="description")?r=qn(n):r=De();for(const i of df)r=i.apply(r,t);return r}class Xs extends Event{constructor(e,n){var r,i;super(e),this.code=(r=n?.code)!=null?r:void 0,this.message=(i=n?.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](e,n,r){return r(Qs(this),n)}[Symbol.for("Deno.customInspect")](e,n){return e(Qs(this),n)}}function ff(t){const e=globalThis.DOMException;return typeof e=="function"?new e(t,"SyntaxError"):new SyntaxError(t)}function wi(t){return t instanceof Error?"errors"in t&&Array.isArray(t.errors)?t.errors.map(wi).join(", "):"cause"in t&&t.cause instanceof Error?`${t}: ${wi(t.cause)}`:t.message:`${t}`}function Qs(t){return{type:t.type,message:t.message,code:t.code,defaultPrevented:t.defaultPrevented,cancelable:t.cancelable,timeStamp:t.timeStamp}}var La=t=>{throw TypeError(t)},ts=(t,e,n)=>e.has(t)||La("Cannot "+n),X=(t,e,n)=>(ts(t,e,"read from private field"),n?n.call(t):e.get(t)),we=(t,e,n)=>e.has(t)?La("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ge=(t,e,n,r)=>(ts(t,e,"write to private field"),e.set(t,n),n),it=(t,e,n)=>(ts(t,e,"access private method"),n),Ne,Ft,Gt,yr,Ar,kn,Qt,Rn,bt,Yt,rn,Jt,In,Le,ji,Oi,Ei,eo,Ci,Ai,Nn,_i,Ti;class br extends EventTarget{constructor(e,n){var r,i;super(),we(this,Le),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,we(this,Ne),we(this,Ft),we(this,Gt),we(this,yr),we(this,Ar),we(this,kn),we(this,Qt),we(this,Rn,null),we(this,bt),we(this,Yt),we(this,rn,null),we(this,Jt,null),we(this,In,null),we(this,Oi,async s=>{var o;X(this,Yt).reset();const{body:a,redirected:l,status:u,headers:d}=s;if(u===204){it(this,Le,Nn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?ge(this,Gt,new URL(s.url)):ge(this,Gt,void 0),u!==200){it(this,Le,Nn).call(this,`Non-200 status code (${u})`,u);return}if(!(d.get("content-type")||"").startsWith("text/event-stream")){it(this,Le,Nn).call(this,'Invalid content type, expected "text/event-stream"',u);return}if(X(this,Ne)===this.CLOSED)return;ge(this,Ne,this.OPEN);const c=new Event("open");if((o=X(this,In))==null||o.call(this,c),this.dispatchEvent(c),typeof a!="object"||!a||!("getReader"in a)){it(this,Le,Nn).call(this,"Invalid response body, expected a web ReadableStream",u),this.close();return}const h=new TextDecoder,g=a.getReader();let m=!0;do{const{done:p,value:y}=await g.read();y&&X(this,Yt).feed(h.decode(y,{stream:!p})),p&&(m=!1,X(this,Yt).reset(),it(this,Le,_i).call(this))}while(m)}),we(this,Ei,s=>{ge(this,bt,void 0),!(s.name==="AbortError"||s.type==="aborted")&&it(this,Le,_i).call(this,wi(s))}),we(this,Ci,s=>{typeof s.id=="string"&&ge(this,Rn,s.id);const o=new MessageEvent(s.event||"message",{data:s.data,origin:X(this,Gt)?X(this,Gt).origin:X(this,Ft).origin,lastEventId:s.id||""});X(this,Jt)&&(!s.event||s.event==="message")&&X(this,Jt).call(this,o),this.dispatchEvent(o)}),we(this,Ai,s=>{ge(this,kn,s)}),we(this,Ti,()=>{ge(this,Qt,void 0),X(this,Ne)===this.CONNECTING&&it(this,Le,ji).call(this)});try{if(e instanceof URL)ge(this,Ft,e);else if(typeof e=="string")ge(this,Ft,new URL(e,mf()));else throw new Error("Invalid URL")}catch{throw ff("An invalid or illegal string was specified")}ge(this,Yt,Du({onEvent:X(this,Ci),onRetry:X(this,Ai)})),ge(this,Ne,this.CONNECTING),ge(this,kn,3e3),ge(this,Ar,(r=n?.fetch)!=null?r:globalThis.fetch),ge(this,yr,(i=n?.withCredentials)!=null?i:!1),it(this,Le,ji).call(this)}get readyState(){return X(this,Ne)}get url(){return X(this,Ft).href}get withCredentials(){return X(this,yr)}get onerror(){return X(this,rn)}set onerror(e){ge(this,rn,e)}get onmessage(){return X(this,Jt)}set onmessage(e){ge(this,Jt,e)}get onopen(){return X(this,In)}set onopen(e){ge(this,In,e)}addEventListener(e,n,r){const i=n;super.addEventListener(e,i,r)}removeEventListener(e,n,r){const i=n;super.removeEventListener(e,i,r)}close(){X(this,Qt)&&clearTimeout(X(this,Qt)),X(this,Ne)!==this.CLOSED&&(X(this,bt)&&X(this,bt).abort(),ge(this,Ne,this.CLOSED),ge(this,bt,void 0))}}Ne=new WeakMap,Ft=new WeakMap,Gt=new WeakMap,yr=new WeakMap,Ar=new WeakMap,kn=new WeakMap,Qt=new WeakMap,Rn=new WeakMap,bt=new WeakMap,Yt=new WeakMap,rn=new WeakMap,Jt=new WeakMap,In=new WeakMap,Le=new WeakSet,ji=function(){ge(this,Ne,this.CONNECTING),ge(this,bt,new AbortController),X(this,Ar)(X(this,Ft),it(this,Le,eo).call(this)).then(X(this,Oi)).catch(X(this,Ei))},Oi=new WeakMap,Ei=new WeakMap,eo=function(){var t;const e={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...X(this,Rn)?{"Last-Event-ID":X(this,Rn)}:void 0},cache:"no-store",signal:(t=X(this,bt))==null?void 0:t.signal};return"window"in globalThis&&(e.credentials=this.withCredentials?"include":"same-origin"),e},Ci=new WeakMap,Ai=new WeakMap,Nn=function(t,e){var n;X(this,Ne)!==this.CLOSED&&ge(this,Ne,this.CLOSED);const r=new Xs("error",{code:e,message:t});(n=X(this,rn))==null||n.call(this,r),this.dispatchEvent(r)},_i=function(t,e){var n;if(X(this,Ne)===this.CLOSED)return;ge(this,Ne,this.CONNECTING);const r=new Xs("error",{code:e,message:t});(n=X(this,rn))==null||n.call(this,r),this.dispatchEvent(r),ge(this,Qt,setTimeout(X(this,Ti),X(this,kn)))},Ti=new WeakMap,br.CONNECTING=0,br.OPEN=1,br.CLOSED=2;function mf(){const t="document"in globalThis?globalThis.document:void 0;return t&&typeof t=="object"&&"baseURI"in t&&typeof t.baseURI=="string"?t.baseURI:void 0}class hf extends Error{constructor(e,n,r){super(`SSE error: ${n}`),this.code=e,this.event=r}}class pf{constructor(e,n){this._url=e,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=ku(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new Cn("No auth provider");let e;try{e=await Jr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(e!=="AUTHORIZED")throw new Cn;return await this._startOrAuth()}async _commonHeaders(){const e={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(e.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(e["mcp-protocol-version"]=this._protocolVersion);const n=Ru(this._requestInit?.headers);return new Headers({...e,...n})}_startOrAuth(){const e=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new br(this._url.href,{...this._eventSourceInit,fetch:async(i,s)=>{const o=await this._commonHeaders();o.set("Accept","text/event-stream");const a=await e(i,{...s,headers:o});if(a.status===401&&a.headers.has("www-authenticate")){const{resourceMetadataUrl:l,scope:u}=Js(a);this._resourceMetadataUrl=l,this._scope=u}return a}}),this._abortController=new AbortController,this._eventSource.onerror=i=>{if(i.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const s=new hf(i.code,i.message,i);r(s),this.onerror?.(s)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",i=>{const s=i;try{if(this._endpoint=new URL(s.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(o){r(o),this.onerror?.(o),this.close();return}n()}),this._eventSource.onmessage=i=>{const s=i;let o;try{o=Fa.parse(JSON.parse(s.data))}catch(a){this.onerror?.(a);return}this.onmessage?.(o)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(e){if(!this._authProvider)throw new Cn("No auth provider");if(await Jr(this._authProvider,{serverUrl:this._url,authorizationCode:e,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Cn("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(e){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(e),signal:this._abortController?.signal},i=await(this._fetch??fetch)(this._endpoint,r);if(!i.ok){const s=await i.text().catch(()=>null);if(i.status===401&&this._authProvider){const{resourceMetadataUrl:o,scope:a}=Js(i);if(this._resourceMetadataUrl=o,this._scope=a,await Jr(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Cn;return this.send(e)}throw new Error(`Error POSTing to endpoint (HTTP ${i.status}): ${s}`)}await i.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(e){this._protocolVersion=e}}const gf="mcp";class yf{constructor(e){this._url=e}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((e,n)=>{this._socket=new WebSocket(this._url,gf),this._socket.onerror=r=>{const i="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(i),this.onerror?.(i)},this._socket.onopen=()=>{e()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let i;try{i=Fa.parse(JSON.parse(r.data))}catch(s){this.onerror?.(s);return}this.onmessage?.(i)}})}async close(){this._socket?.close()}send(e){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(e)),n()})}}class bf extends Mu{constructor(e,n){super(e,n)}send(e,n){const r=xf(e);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(e,n)}}function xf(t){const e=t;if(!e||typeof e!="object"||!("method"in e))return null;switch(e.method){case"initialize":{const n=e?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:e.jsonrpc??"2.0",id:e.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class vf extends Uu{constructor(e,n){super(e,{jsonSchemaValidator:Cd,...n})}async listTools(e,n){return await this.request({method:"tools/list",params:e},hu,n)}}const Sf=async(t,e,n)=>{const r=wf(t.connection,e,n);if(!r)throw new Error("Unknown MCP connection type");const i=new vf({name:t?.name??"MCP Client",version:"1.0.0"});return await i.connect(r),{client:i}},wf=(t,e,n)=>{if(t.type==="Websocket")return new yf(new URL(t.url));if(t.type!=="SSE"&&t.type!=="HTTP")return null;const i={...t.token?{authorization:`Bearer ${t.token}`}:{},...n??{},..."headers"in t?t.headers||{}:{}};if(t.type==="SSE"){const s={requestInit:{headers:i,signal:e}};return t.token&&(s.eventSourceInit={fetch:(o,a)=>fetch(o,{...a,headers:{...i,Accept:"text/event-stream"},signal:e})}),new pf(new URL(t.url),s)}return new bf(new URL(t.url),{requestInit:{headers:i,signal:e,credentials:"include"}})},to=t=>{try{return JSON.parse(t)}catch{return t}},dr=new Map,no=(t,e)=>({...t,id:t.name,inputSchema:t.inputSchema?Te(t.inputSchema):void 0,outputSchema:t.outputSchema?Te(t.outputSchema):void 0,execute:n=>e(n.context,t.name)});function jf(t){const e=n=>"connection"in t?Sf({connection:t.connection},void 0,n):t.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return a;async function i(l,u=r){const d=t?.debugId?.(),c=d?{"x-trace-debug-id":d}:void 0,{client:h}=await e(c),{structuredContent:g,isError:m,content:p}=await h.callTool({name:String(u),arguments:l});if(m){const x=p?.[0]?.text,b=typeof x=="string"?to(x):null,O=b?.code&&typeof t?.getErrorByStatusCode=="function"?t.getErrorByStatusCode(b.code,b.message,b.traceId):null;throw O||new Error(`Tool ${String(u)} returned an error: ${JSON.stringify(g??p)}`)}if(g!==void 0)return g;const y=p?.[0]?.text;return typeof y=="string"?to(y):void 0}async function s(){const{client:l}=await e(),{tools:u}=await l.listTools();return u}async function o(){if(!("connection"in t))return s();const l=t.connection,u=JSON.stringify(l);try{return dr.has(u)||dr.set(u,s()),await dr.get(u)}catch(d){console.error("Failed to list tools",d),dr.delete(u);return}}async function a(){return(await o()??[]).map(u=>no(u,i))}return i.asTool=async()=>{const u=(await o()??[]).find(d=>d.name===r);if(!u)throw new Error(`Tool ${r} not found`);return no(u,i)},i}})}new Proxy({},{get(t,e){return e==="toJSON"?null:e==="forConnection"?n=>Of({connection:n}):global[e]}});function Of(t){return jf(t)}function Ef(t){return{isImplementedBy:e=>{for(const n of t){const r=typeof n.name=="string"?new RegExp(`^${n.name}$`):n.name,i=e.find(s=>r.test(s.name));if(!(!i&&n.opt)&&!i)return!1}return!0}}}const Cf=U({id:P().describe("Unique identifier for the entity"),title:P().describe("Human-readable title for the entity"),description:P().nullish().describe("Description of the entity"),created_at:P().datetime(),updated_at:P().datetime(),created_by:P().optional(),updated_by:P().optional()}),Af=U({field:oe(P()),operator:$t(["eq","gt","gte","lt","lte","in","like","contains"]),value:st()}),Ba=pu(()=>qn([Af,U({operator:$t(["and","or","not"]),conditions:oe(Ba)})])),_f=U({field:oe(P()),direction:$t(["asc","desc"]),nulls:$t(["first","last"]).optional()}),Tf=U({where:Ba.optional().describe("Filter expression"),orderBy:oe(_f).optional().describe("Sort expressions"),limit:ve().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:ve().int().min(0).optional().describe("Number of items to skip")});function If(t){return U({items:oe(t).describe("Array of collection items"),totalCount:ve().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:ct().optional().describe("Whether there are more items available")})}const Nf=U({id:P().describe("ID of the entity to retrieve")});function Ff(t){return U({item:t.nullable().describe("The retrieved item, or null if not found")})}U({id:P().describe("ID of the entity to delete")});function Pf(t,e,n){const r=t.toUpperCase();return[{name:`COLLECTION_${r}_LIST`,inputSchema:Tf,outputSchema:If(e)},{name:`COLLECTION_${r}_GET`,inputSchema:Nf,outputSchema:Ff(e)}]}const $f=U({id:P(),name:P(),description:P().optional(),inputSchema:at(P(),st()),outputSchema:at(P(),st()).optional()}),Df=Cf.extend({_meta:U({"io.decocms":U({id:P(),verified:ct(),scopeName:P(),appName:P(),friendlyName:P().nullable().optional(),metadata:at(P(),st()).nullable().optional(),publishedAt:P().datetime().optional(),updatedAt:P().datetime().optional(),tools:oe($f).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:U({$schema:P().optional(),_meta:at(P(),st()).optional(),name:P().describe("The server name (scope/app)"),title:P().optional().describe("User-friendly title"),description:P().optional().describe("Server description"),icons:oe(U({src:P(),mimeType:P().optional(),sizes:oe(P()).optional(),theme:$t(["light","dark"]).optional()})).optional(),remotes:oe(U({type:$t(["http","stdio","sse"]),url:P().optional(),headers:oe(st()).optional()})).optional(),packages:oe(st()).optional(),repository:U({url:P(),source:P().optional(),subfolder:P().optional()}).optional(),version:P().optional(),websiteUrl:P().optional()})});Pf("registry_app",Df);const kf=U({specversion:Be("1.0").describe("CloudEvents specification version"),id:P().describe("Unique identifier for this event (UUID recommended)"),source:P().describe("Connection ID of the event publisher"),type:P().describe("Event type (e.g., 'order.created', 'user.signup')"),time:P().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:P().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:P().optional().default("application/json").describe("Content type of the data attribute"),dataschema:P().url().optional().describe("URI to the schema for the data attribute"),data:st().optional().describe("Event payload (any JSON value)")});U({events:oe(kf).min(1).describe("Batch of CloudEvents to process")});const Rf=U({success:ct().optional().describe("Whether this event was processed successfully"),error:P().optional().describe("Error message for this event"),retryAfter:ve().int().positive().optional().describe("Re-deliver this event after this many ms")});U({success:ct().optional().describe("Batch success - applies to events not in results"),error:P().optional().describe("Batch error message - applies to events not in results"),processedCount:ve().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:ve().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:at(P(),Rf).optional().describe("Per-event results keyed by event ID")});const Mf=U({type:Be("string"),enum:oe(P()).optional(),description:P().optional()}),Uf=U({type:P(),description:P(),paramsSchema:at(P(),Mf)});U({});U({triggers:oe(Uf)});U({type:P(),params:at(P(),P()),enabled:ct(),callbackUrl:gu().optional(),callbackToken:P().min(1).optional()});U({success:ct()});U({prefix:P().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:ve().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:P().optional().describe("Token for pagination from previous response"),delimiter:P().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});U({objects:oe(U({key:P().describe("Object key/path"),size:ve().describe("Object size in bytes"),lastModified:P().describe("Last modified timestamp"),etag:P().describe("Entity tag for the object")})),nextContinuationToken:P().optional().describe("Token for fetching next page of results"),isTruncated:ct().describe("Whether there are more results available"),commonPrefixes:oe(P()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});U({key:P().describe("Object key/path to get metadata for")});U({contentType:P().optional().describe("MIME type of the object"),contentLength:ve().describe("Size of the object in bytes"),lastModified:P().describe("Last modified timestamp"),etag:P().describe("Entity tag for the object"),metadata:at(P(),P()).optional().describe("Custom metadata key-value pairs")});U({key:P().describe("Object key/path to generate URL for"),expiresIn:ve().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});U({url:P().describe("Presigned URL for downloading the object"),expiresIn:ve().describe("Expiration time in seconds that was used")});U({key:P().describe("Object key/path for the upload"),expiresIn:ve().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:P().optional().describe("MIME type for the object being uploaded")});U({url:P().describe("Presigned URL for uploading the object"),expiresIn:ve().describe("Expiration time in seconds that was used")});U({key:P().describe("Object key/path to delete")});U({success:ct().describe("Whether the deletion was successful"),key:P().describe("The key that was deleted")});U({keys:oe(P()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});U({deleted:oe(P()).describe("Array of successfully deleted keys"),errors:oe(U({key:P(),message:P()})).describe("Array of errors for failed deletions")});const Lf=U({primary:P().optional().describe("Primary brand color (hex)"),secondary:P().optional().describe("Secondary brand color (hex)"),accent:P().optional().describe("Accent / highlight color (hex)"),background:P().optional().describe("Background color (hex)"),foreground:P().optional().describe("Foreground / text color (hex)")}),Bf=U({heading:P().optional().describe("Font family for headings"),body:P().optional().describe("Font family for body text"),code:P().optional().describe("Font family for code / monospace")}),Vf=U({logo:P().optional().describe("Logo URL"),favicon:P().optional().describe("Favicon URL"),ogImage:P().optional().describe("Open Graph image URL")}),Wf=U({id:P(),name:P().describe("Brand / company name"),domain:P().optional().describe("Company domain (e.g. example.com)"),colors:Lf.optional().describe("Semantic color palette"),fonts:Bf.optional().describe("Font families by role"),assets:Vf.optional().describe("Visual identity assets"),overview:P().optional().describe("Company overview / description"),tagline:P().optional().describe("Brand tagline"),tone:P().optional().describe("Tone of voice description"),metadata:at(P(),st()).optional().describe("Extra design tokens and metadata")});U({id:P().optional().describe("Brand ID. Omit to get the default brand.")});U({});U({items:oe(Wf)});const qf={"@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function zf(t){if(t)return qf[t]}function Jj(t,e){const n=t.tools;if(!n||n.length===0)return!1;const r=n.map(o=>({name:o.name,inputSchema:o.inputSchema})),i=e.map(o=>({name:o.name,inputSchema:o.inputSchema,opt:o.opt}));return Ef(i).isImplementedBy(r)}const ns=N.createContext(null);function Zj(t){const e=Oe.c(3),{children:n}=t,r=N.useContext(ns);if(!r?.tabsEl)return null;let i;return e[0]!==n||e[1]!==r.tabsEl?(i=Pa.createPortal(n,r.tabsEl),e[0]=n,e[1]=r.tabsEl,e[2]=i):i=e[2],i}function Kf(t){const e=Oe.c(3),{children:n}=t,r=N.useContext(ns);if(!r?.actionsEl)return null;let i;return e[0]!==n||e[1]!==r.actionsEl?(i=Pa.createPortal(n,r.actionsEl),e[0]=n,e[1]=r.actionsEl,e[2]=i):i=e[2],i}const Xj=Kf;function Qj(t){const e=Oe.c(21),{children:n,breadcrumb:r,hideHeader:i}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={leftEl:null,tabsEl:null,actionsEl:null},e[0]=s):s=e[0];const[o,a]=N.useState(s),l=N.useRef(null),u=N.useRef(null),d=N.useRef(null);let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=C=>{l.current=C,C&&a(T=>T.leftEl===C?T:{...T,leftEl:C})},e[1]=c):c=e[1];const h=c;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=C=>{u.current=C,C&&a(T=>T.tabsEl===C?T:{...T,tabsEl:C})},e[2]=g):g=e[2];const m=g;let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p=C=>{d.current=C,C&&a(T=>T.actionsEl===C?T:{...T,actionsEl:C})},e[3]=p):p=e[3];const y=p,x=i&&"hidden";let b;e[4]!==x?(b=Fr(x),e[4]=x,e[5]=b):b=e[5];let O;e[6]===Symbol.for("react.memo_cache_sentinel")?(O=f.jsx("div",{ref:h,className:"flex items-center gap-2 min-w-0"}),e[6]=O):O=e[6];let S;e[7]!==r?(S=f.jsxs(En.Header.Left,{children:[r,O]}),e[7]=r,e[8]=S):S=e[8];let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=f.jsxs(En.Header.Right,{children:[f.jsx("div",{ref:m,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),f.jsx("div",{ref:y,className:"flex items-center gap-2 shrink-0"})]}),e[9]=v):v=e[9];let w;e[10]!==b||e[11]!==S?(w=f.jsxs(En.Header,{className:b,children:[S,v]}),e[10]=b,e[11]=S,e[12]=w):w=e[12];let j;e[13]!==n?(j=f.jsx(En.Content,{children:n}),e[13]=n,e[14]=j):j=e[14];let E;e[15]!==w||e[16]!==j?(E=f.jsxs(En,{children:[w,j]}),e[15]=w,e[16]=j,e[17]=E):E=e[17];let A;return e[18]!==o||e[19]!==E?(A=f.jsx(ns,{value:o,children:E}),e[18]=o,e[19]=E,e[20]=A):A=e[20],A}function Hf(t){return t.startsWith("@")?t:`@${t}`}function Gf(){const{org:t}=Zi(),{data:e}=yu.useSession(),n=zu(),r=Xu(),i=Qu(),s=r.filter(a=>i(a.id));return{installByBinding:async a=>{if(!t||!e?.user?.id){gr.error("Not authenticated");return}const l=Hf(a),d=(await Promise.all(s.map(async p=>{const y=Gu(p.id,t.id);try{const x=await Yu(p.id,t.id,t.slug,y,{where:{appName:l}});return Ju(x??[])[0]??null}catch{return null}}))).find(p=>p!==null);if(!d){gr.error(`MCP Server not found in registry: ${a}`);return}const c=Zu(d,t.id,e.user.id),h=c.connection_type==="STDIO",g=!!c.connection_url,m=h&&c.connection_headers&&typeof c.connection_headers=="object"&&"command"in c.connection_headers;if(!g&&!m){gr.error("This MCP Server cannot be connected: no connection method available");return}return await n.create.mutateAsync(c),{id:c.id,connection:c}},isInstalling:n.create.isPending}}function K(t){return typeof t!="object"||t===null||typeof t.lastModified=="number"&&typeof File<"u"&&t instanceof File||typeof t.getMonth=="function"&&typeof Date<"u"&&t instanceof Date?!1:!Array.isArray(t)}function Yf(t){return t.additionalItems===!0&&console.warn("additionalItems=true is currently not supported"),K(t.additionalItems)}function ro(t){if(t==="")return;if(t===null)return null;if(/\.$/.test(t)||/\.0$/.test(t)||/\.\d*0$/.test(t))return t;const e=Number(t);return typeof e=="number"&&!Number.isNaN(e)?e:t}const ot="__additional_property",en="additionalProperties",Ot="allOf",ee="anyOf",ke="const",$r="default",rs="dependencies",Jf="enum",_e="__errors",de="$id",is="if",an="items",Zf="_$junk_option_schema_id$_",xr="$name",z="oneOf",Ii="patternProperties",ie="properties",Zr="readonly",Va="required",_r="submitButtonOptions",ue="$ref",Mn="__rjsf_ref",Fn="$schema",Wa="root",qa="_",Xf=["discriminator","propertyName"],io="formContext",Qf="layoutGridLookupMap",ss="__rjsf_additionalProperties",za="__rjsf_rootSchema",em="ui:field",os="ui:widget",vt="ui:options",Ni="ui:globalOptions",tm="ui:definitions",nm="https://json-schema.org/draft/2019-09/schema",vr="https://json-schema.org/draft/2020-12/schema";function L(t={},e={}){return t?Object.keys(t).filter(n=>n.indexOf("ui:")===0).reduce((n,r)=>{const i=t[r];return r===os&&K(i)?(console.error("Setting options via ui:widget object is no longer supported, use ui:options instead"),n):r===vt&&K(i)?{...n,...i}:{...n,[r.substring(3)]:i}},{...e}):{...e}}function Ka(t,e={},n){if(!(t.additionalProperties||t.patternProperties))return!1;const{expandable:r=!0}=L(e);return r===!1?r:t.maxProperties!==void 0&&n?Object.keys(n).length<t.maxProperties:!0}var Ha=typeof global=="object"&&global&&global.Object===Object&&global,rm=typeof self=="object"&&self&&self.Object===Object&&self,tt=Ha||rm||Function("return this")(),Re=tt.Symbol,Ga=Object.prototype,im=Ga.hasOwnProperty,sm=Ga.toString,An=Re?Re.toStringTag:void 0;function om(t){var e=im.call(t,An),n=t[An];try{t[An]=void 0;var r=!0}catch{}var i=sm.call(t);return r&&(e?t[An]=n:delete t[An]),i}var am=Object.prototype,lm=am.toString;function cm(t){return lm.call(t)}var um="[object Null]",dm="[object Undefined]",so=Re?Re.toStringTag:void 0;function ut(t){return t==null?t===void 0?dm:um:so&&so in Object(t)?om(t):cm(t)}function Ya(t,e){return function(n){return t(e(n))}}var Dr=Ya(Object.getPrototypeOf,Object);function Me(t){return t!=null&&typeof t=="object"}var fm="[object Object]",mm=Function.prototype,hm=Object.prototype,Ja=mm.toString,pm=hm.hasOwnProperty,gm=Ja.call(Object);function Et(t){if(!Me(t)||ut(t)!=fm)return!1;var e=Dr(t);if(e===null)return!0;var n=pm.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Ja.call(n)==gm}function Fi(t){const e={[_e]:[],addError(n){this[_e].push(n)}};if(Array.isArray(t))return t.reduce((n,r,i)=>({...n,[i]:Fi(r)}),e);if(Et(t)){const n=t;return Object.keys(n).reduce((r,i)=>({...r,[i]:Fi(n[i])}),e)}return e}function ym(){this.__data__=[],this.size=0}function er(t,e){return t===e||t!==t&&e!==e}function kr(t,e){for(var n=t.length;n--;)if(er(t[n][0],e))return n;return-1}var bm=Array.prototype,xm=bm.splice;function vm(t){var e=this.__data__,n=kr(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():xm.call(e,n,1),--this.size,!0}function Sm(t){var e=this.__data__,n=kr(e,t);return n<0?void 0:e[n][1]}function wm(t){return kr(this.__data__,t)>-1}function jm(t,e){var n=this.__data__,r=kr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function dt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}dt.prototype.clear=ym;dt.prototype.delete=vm;dt.prototype.get=Sm;dt.prototype.has=wm;dt.prototype.set=jm;function Om(){this.__data__=new dt,this.size=0}function Em(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Cm(t){return this.__data__.get(t)}function Am(t){return this.__data__.has(t)}function ne(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var _m="[object AsyncFunction]",Tm="[object Function]",Im="[object GeneratorFunction]",Nm="[object Proxy]";function tr(t){if(!ne(t))return!1;var e=ut(t);return e==Tm||e==Im||e==_m||e==Nm}var Xr=tt["__core-js_shared__"],oo=(function(){var t=/[^.]+$/.exec(Xr&&Xr.keys&&Xr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Fm(t){return!!oo&&oo in t}var Pm=Function.prototype,$m=Pm.toString;function Lt(t){if(t!=null){try{return $m.call(t)}catch{}try{return t+""}catch{}}return""}var Dm=/[\\^$.*+?()[\]{}|]/g,km=/^\[object .+?Constructor\]$/,Rm=Function.prototype,Mm=Object.prototype,Um=Rm.toString,Lm=Mm.hasOwnProperty,Bm=RegExp("^"+Um.call(Lm).replace(Dm,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vm(t){if(!ne(t)||Fm(t))return!1;var e=tr(t)?Bm:km;return e.test(Lt(t))}function Wm(t,e){return t?.[e]}function Bt(t,e){var n=Wm(t,e);return Vm(n)?n:void 0}var Kn=Bt(tt,"Map"),Hn=Bt(Object,"create");function qm(){this.__data__=Hn?Hn(null):{},this.size=0}function zm(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Km="__lodash_hash_undefined__",Hm=Object.prototype,Gm=Hm.hasOwnProperty;function Ym(t){var e=this.__data__;if(Hn){var n=e[t];return n===Km?void 0:n}return Gm.call(e,t)?e[t]:void 0}var Jm=Object.prototype,Zm=Jm.hasOwnProperty;function Xm(t){var e=this.__data__;return Hn?e[t]!==void 0:Zm.call(e,t)}var Qm="__lodash_hash_undefined__";function eh(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Hn&&e===void 0?Qm:e,this}function Dt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Dt.prototype.clear=qm;Dt.prototype.delete=zm;Dt.prototype.get=Ym;Dt.prototype.has=Xm;Dt.prototype.set=eh;function th(){this.size=0,this.__data__={hash:new Dt,map:new(Kn||dt),string:new Dt}}function nh(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Rr(t,e){var n=t.__data__;return nh(e)?n[typeof e=="string"?"string":"hash"]:n.map}function rh(t){var e=Rr(this,t).delete(t);return this.size-=e?1:0,e}function ih(t){return Rr(this,t).get(t)}function sh(t){return Rr(this,t).has(t)}function oh(t,e){var n=Rr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function ft(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}ft.prototype.clear=th;ft.prototype.delete=rh;ft.prototype.get=ih;ft.prototype.has=sh;ft.prototype.set=oh;var ah=200;function lh(t,e){var n=this.__data__;if(n instanceof dt){var r=n.__data__;if(!Kn||r.length<ah-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ft(r)}return n.set(t,e),this.size=n.size,this}function We(t){var e=this.__data__=new dt(t);this.size=e.size}We.prototype.clear=Om;We.prototype.delete=Em;We.prototype.get=Cm;We.prototype.has=Am;We.prototype.set=lh;var ch="__lodash_hash_undefined__";function uh(t){return this.__data__.set(t,ch),this}function dh(t){return this.__data__.has(t)}function kt(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new ft;++e<n;)this.add(t[e])}kt.prototype.add=kt.prototype.push=uh;kt.prototype.has=dh;function fh(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Gn(t,e){return t.has(e)}var mh=1,hh=2;function Za(t,e,n,r,i,s){var o=n&mh,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var u=s.get(t),d=s.get(e);if(u&&d)return u==e&&d==t;var c=-1,h=!0,g=n&hh?new kt:void 0;for(s.set(t,e),s.set(e,t);++c<a;){var m=t[c],p=e[c];if(r)var y=o?r(p,m,c,e,t,s):r(m,p,c,t,e,s);if(y!==void 0){if(y)continue;h=!1;break}if(g){if(!fh(e,function(x,b){if(!Gn(g,b)&&(m===x||i(m,x,n,r,s)))return g.push(b)})){h=!1;break}}else if(!(m===p||i(m,p,n,r,s))){h=!1;break}}return s.delete(t),s.delete(e),h}var Tr=tt.Uint8Array;function ph(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function as(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var gh=1,yh=2,bh="[object Boolean]",xh="[object Date]",vh="[object Error]",Sh="[object Map]",wh="[object Number]",jh="[object RegExp]",Oh="[object Set]",Eh="[object String]",Ch="[object Symbol]",Ah="[object ArrayBuffer]",_h="[object DataView]",ao=Re?Re.prototype:void 0,Qr=ao?ao.valueOf:void 0;function Th(t,e,n,r,i,s,o){switch(n){case _h:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Ah:return!(t.byteLength!=e.byteLength||!s(new Tr(t),new Tr(e)));case bh:case xh:case wh:return er(+t,+e);case vh:return t.name==e.name&&t.message==e.message;case jh:case Eh:return t==e+"";case Sh:var a=ph;case Oh:var l=r&gh;if(a||(a=as),t.size!=e.size&&!l)return!1;var u=o.get(t);if(u)return u==e;r|=yh,o.set(t,e);var d=Za(a(t),a(e),r,i,s,o);return o.delete(t),d;case Ch:if(Qr)return Qr.call(t)==Qr.call(e)}return!1}function ls(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var je=Array.isArray;function Xa(t,e,n){var r=e(t);return je(t)?r:ls(r,n(t))}function Ih(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var o=t[n];e(o,n,t)&&(s[i++]=o)}return s}function Qa(){return[]}var Nh=Object.prototype,Fh=Nh.propertyIsEnumerable,lo=Object.getOwnPropertySymbols,cs=lo?function(t){return t==null?[]:(t=Object(t),Ih(lo(t),function(e){return Fh.call(t,e)}))}:Qa;function el(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var Ph="[object Arguments]";function co(t){return Me(t)&&ut(t)==Ph}var tl=Object.prototype,$h=tl.hasOwnProperty,Dh=tl.propertyIsEnumerable,ln=co((function(){return arguments})())?co:function(t){return Me(t)&&$h.call(t,"callee")&&!Dh.call(t,"callee")};function kh(){return!1}var nl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,uo=nl&&typeof module=="object"&&module&&!module.nodeType&&module,Rh=uo&&uo.exports===nl,fo=Rh?tt.Buffer:void 0,Mh=fo?fo.isBuffer:void 0,Rt=Mh||kh,Uh=9007199254740991,Lh=/^(?:0|[1-9]\d*)$/;function Mr(t,e){var n=typeof t;return e=e??Uh,!!e&&(n=="number"||n!="symbol"&&Lh.test(t))&&t>-1&&t%1==0&&t<e}var Bh=9007199254740991;function us(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Bh}var Vh="[object Arguments]",Wh="[object Array]",qh="[object Boolean]",zh="[object Date]",Kh="[object Error]",Hh="[object Function]",Gh="[object Map]",Yh="[object Number]",Jh="[object Object]",Zh="[object RegExp]",Xh="[object Set]",Qh="[object String]",ep="[object WeakMap]",tp="[object ArrayBuffer]",np="[object DataView]",rp="[object Float32Array]",ip="[object Float64Array]",sp="[object Int8Array]",op="[object Int16Array]",ap="[object Int32Array]",lp="[object Uint8Array]",cp="[object Uint8ClampedArray]",up="[object Uint16Array]",dp="[object Uint32Array]",pe={};pe[rp]=pe[ip]=pe[sp]=pe[op]=pe[ap]=pe[lp]=pe[cp]=pe[up]=pe[dp]=!0;pe[Vh]=pe[Wh]=pe[tp]=pe[qh]=pe[np]=pe[zh]=pe[Kh]=pe[Hh]=pe[Gh]=pe[Yh]=pe[Jh]=pe[Zh]=pe[Xh]=pe[Qh]=pe[ep]=!1;function fp(t){return Me(t)&&us(t.length)&&!!pe[ut(t)]}function ds(t){return function(e){return t(e)}}var rl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Un=rl&&typeof module=="object"&&module&&!module.nodeType&&module,mp=Un&&Un.exports===rl,ei=mp&&Ha.process,cn=(function(){try{var t=Un&&Un.require&&Un.require("util").types;return t||ei&&ei.binding&&ei.binding("util")}catch{}})(),mo=cn&&cn.isTypedArray,nr=mo?ds(mo):fp,hp=Object.prototype,pp=hp.hasOwnProperty;function il(t,e){var n=je(t),r=!n&&ln(t),i=!n&&!r&&Rt(t),s=!n&&!r&&!i&&nr(t),o=n||r||i||s,a=o?el(t.length,String):[],l=a.length;for(var u in t)(e||pp.call(t,u))&&!(o&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Mr(u,l)))&&a.push(u);return a}var gp=Object.prototype;function Ur(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||gp;return t===n}var yp=Ya(Object.keys,Object),bp=Object.prototype,xp=bp.hasOwnProperty;function sl(t){if(!Ur(t))return yp(t);var e=[];for(var n in Object(t))xp.call(t,n)&&n!="constructor"&&e.push(n);return e}function Vt(t){return t!=null&&us(t.length)&&!tr(t)}function Ve(t){return Vt(t)?il(t):sl(t)}function Pi(t){return Xa(t,Ve,cs)}var vp=1,Sp=Object.prototype,wp=Sp.hasOwnProperty;function jp(t,e,n,r,i,s){var o=n&vp,a=Pi(t),l=a.length,u=Pi(e),d=u.length;if(l!=d&&!o)return!1;for(var c=l;c--;){var h=a[c];if(!(o?h in e:wp.call(e,h)))return!1}var g=s.get(t),m=s.get(e);if(g&&m)return g==e&&m==t;var p=!0;s.set(t,e),s.set(e,t);for(var y=o;++c<l;){h=a[c];var x=t[h],b=e[h];if(r)var O=o?r(b,x,h,e,t,s):r(x,b,h,t,e,s);if(!(O===void 0?x===b||i(x,b,n,r,s):O)){p=!1;break}y||(y=h=="constructor")}if(p&&!y){var S=t.constructor,v=e.constructor;S!=v&&"constructor"in t&&"constructor"in e&&!(typeof S=="function"&&S instanceof S&&typeof v=="function"&&v instanceof v)&&(p=!1)}return s.delete(t),s.delete(e),p}var $i=Bt(tt,"DataView"),Di=Bt(tt,"Promise"),sn=Bt(tt,"Set"),ki=Bt(tt,"WeakMap"),ho="[object Map]",Op="[object Object]",po="[object Promise]",go="[object Set]",yo="[object WeakMap]",bo="[object DataView]",Ep=Lt($i),Cp=Lt(Kn),Ap=Lt(Di),_p=Lt(sn),Tp=Lt(ki),$e=ut;($i&&$e(new $i(new ArrayBuffer(1)))!=bo||Kn&&$e(new Kn)!=ho||Di&&$e(Di.resolve())!=po||sn&&$e(new sn)!=go||ki&&$e(new ki)!=yo)&&($e=function(t){var e=ut(t),n=e==Op?t.constructor:void 0,r=n?Lt(n):"";if(r)switch(r){case Ep:return bo;case Cp:return ho;case Ap:return po;case _p:return go;case Tp:return yo}return e});var Ip=1,xo="[object Arguments]",vo="[object Array]",fr="[object Object]",Np=Object.prototype,So=Np.hasOwnProperty;function Fp(t,e,n,r,i,s){var o=je(t),a=je(e),l=o?vo:$e(t),u=a?vo:$e(e);l=l==xo?fr:l,u=u==xo?fr:u;var d=l==fr,c=u==fr,h=l==u;if(h&&Rt(t)){if(!Rt(e))return!1;o=!0,d=!1}if(h&&!d)return s||(s=new We),o||nr(t)?Za(t,e,n,r,i,s):Th(t,e,l,n,r,i,s);if(!(n&Ip)){var g=d&&So.call(t,"__wrapped__"),m=c&&So.call(e,"__wrapped__");if(g||m){var p=g?t.value():t,y=m?e.value():e;return s||(s=new We),i(p,y,n,r,s)}}return h?(s||(s=new We),jp(t,e,n,r,i,s)):!1}function rr(t,e,n,r,i){return t===e?!0:t==null||e==null||!Me(t)&&!Me(e)?t!==t&&e!==e:Fp(t,e,n,r,rr,i)}function Pp(t,e,n){n=typeof n=="function"?n:void 0;var r=n?n(t,e):void 0;return r===void 0?rr(t,e,void 0,n):!!r}function he(t,e){return Pp(t,e,(n,r)=>{if(typeof n=="function"&&typeof r=="function")return!0})}var $p="[object Symbol]";function ir(t){return typeof t=="symbol"||Me(t)&&ut(t)==$p}var Dp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kp=/^\w*$/;function fs(t,e){if(je(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||ir(t)?!0:kp.test(t)||!Dp.test(t)||e!=null&&t in Object(e)}var Rp="Expected a function";function ms(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Rp);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var o=t.apply(this,r);return n.cache=s.set(i,o)||s,o};return n.cache=new(ms.Cache||ft),n}ms.Cache=ft;var Mp=500;function Up(t){var e=ms(t,function(r){return n.size===Mp&&n.clear(),r}),n=e.cache;return e}var Lp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Bp=/\\(\\)?/g,ol=Up(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Lp,function(n,r,i,s){e.push(i?s.replace(Bp,"$1"):r||n)}),e});function gn(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var wo=Re?Re.prototype:void 0,jo=wo?wo.toString:void 0;function al(t){if(typeof t=="string")return t;if(je(t))return gn(t,al)+"";if(ir(t))return jo?jo.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function hs(t){return t==null?"":al(t)}function yn(t,e){return je(t)?t:fs(t,e)?[t]:ol(hs(t))}function Ct(t){if(typeof t=="string"||ir(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Lr(t,e){e=yn(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Ct(e[n++])];return n&&n==r?t:void 0}function $(t,e,n){var r=t==null?void 0:Lr(t,e);return r===void 0?n:r}var Vp=Object.prototype,Wp=Vp.hasOwnProperty;function qp(t,e){return t!=null&&Wp.call(t,e)}function ll(t,e,n){e=yn(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var o=Ct(e[r]);if(!(s=t!=null&&n(t,o)))break;t=t[o]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&us(i)&&Mr(o,i)&&(je(t)||ln(t)))}function Q(t,e){return t!=null&&ll(t,e,qp)}function St(t,e){return rr(t,e)}var Ir=(function(){try{var t=Bt(Object,"defineProperty");return t({},"",{}),t}catch{}})();function ps(t,e,n){e=="__proto__"&&Ir?Ir(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var zp=Object.prototype,Kp=zp.hasOwnProperty;function gs(t,e,n){var r=t[e];(!(Kp.call(t,e)&&er(r,n))||n===void 0&&!(e in t))&&ps(t,e,n)}function ys(t,e,n,r){if(!ne(t))return t;e=yn(e,t);for(var i=-1,s=e.length,o=s-1,a=t;a!=null&&++i<s;){var l=Ct(e[i]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=o){var d=a[l];u=r?r(d,l,a):void 0,u===void 0&&(u=ne(d)?d:Mr(e[i+1])?[]:{})}gs(a,l,u),a=a[l]}return t}function ce(t,e,n){return t==null?t:ys(t,e,n)}function Br(t){return t}function cl(t){return typeof t=="function"?t:Br}var Hp=/\s/;function Gp(t){for(var e=t.length;e--&&Hp.test(t.charAt(e)););return e}var Yp=/^\s+/;function Jp(t){return t&&t.slice(0,Gp(t)+1).replace(Yp,"")}var Oo=NaN,Zp=/^[-+]0x[0-9a-f]+$/i,Xp=/^0b[01]+$/i,Qp=/^0o[0-7]+$/i,eg=parseInt;function tg(t){if(typeof t=="number")return t;if(ir(t))return Oo;if(ne(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ne(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Jp(t);var n=Xp.test(t);return n||Qp.test(t)?eg(t.slice(2),n?2:8):Zp.test(t)?Oo:+t}var Eo=1/0,ng=17976931348623157e292;function rg(t){if(!t)return t===0?t:0;if(t=tg(t),t===Eo||t===-Eo){var e=t<0?-1:1;return e*ng}return t===t?t:0}function ul(t){var e=rg(t),n=e%1;return e===e?n?e-n:e:0}var ig=9007199254740991,ti=4294967295,sg=Math.min;function dl(t,e){if(t=ul(t),t<1||t>ig)return[];var n=ti,r=sg(t,ti);e=cl(e),t-=ti;for(var i=el(r,e);++n<t;)e(n);return i}function bs(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var Co=Object.create,fl=(function(){function t(){}return function(e){if(!ne(e))return{};if(Co)return Co(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function og(t){return function(e,n,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return e}}var ml=og();function hl(t,e){return t&&ml(t,e,Ve)}var ag=1,lg=2;function cg(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<s;){o=n[i];var a=o[0],l=t[a],u=o[1];if(o[2]){if(l===void 0&&!(a in t))return!1}else{var d=new We,c;if(!(c===void 0?rr(u,l,ag|lg,r,d):c))return!1}}return!0}function pl(t){return t===t&&!ne(t)}function ug(t){for(var e=Ve(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,pl(i)]}return e}function gl(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function dg(t){var e=ug(t);return e.length==1&&e[0][2]?gl(e[0][0],e[0][1]):function(n){return n===t||cg(n,t,e)}}function fg(t,e){return t!=null&&e in Object(t)}function yl(t,e){return t!=null&&ll(t,e,fg)}var mg=1,hg=2;function pg(t,e){return fs(t)&&pl(e)?gl(Ct(t),e):function(n){var r=$(n,t);return r===void 0&&r===e?yl(n,t):rr(e,r,mg|hg)}}function gg(t){return function(e){return e?.[t]}}function yg(t){return function(e){return Lr(e,t)}}function bg(t){return fs(t)?gg(Ct(t)):yg(t)}function xs(t){return typeof t=="function"?t:t==null?Br:typeof t=="object"?je(t)?pg(t[0],t[1]):dg(t):bg(t)}function xg(t,e,n){var r=je(t),i=r||Rt(t)||nr(t);if(e=xs(e),n==null){var s=t&&t.constructor;i?n=r?new s:[]:ne(t)?n=tr(s)?fl(Dr(t)):{}:n={}}return(i?bs:hl)(t,function(o,a,l){return e(n,o,a,l)}),n}function Ri(t,e,n){(n!==void 0&&!er(t[e],n)||n===void 0&&!(e in t))&&ps(t,e,n)}var bl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ao=bl&&typeof module=="object"&&module&&!module.nodeType&&module,vg=Ao&&Ao.exports===bl,_o=vg?tt.Buffer:void 0,To=_o?_o.allocUnsafe:void 0;function xl(t,e){if(e)return t.slice();var n=t.length,r=To?To(n):new t.constructor(n);return t.copy(r),r}function vs(t){var e=new t.constructor(t.byteLength);return new Tr(e).set(new Tr(t)),e}function vl(t,e){var n=e?vs(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ss(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function Sl(t){return typeof t.constructor=="function"&&!Ur(t)?fl(Dr(t)):{}}function Yn(t){return Me(t)&&Vt(t)}function Mi(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function bn(t,e,n,r){var i=!n;n||(n={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=void 0;l===void 0&&(l=t[a]),i?ps(n,a,l):gs(n,a,l)}return n}function Sg(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var wg=Object.prototype,jg=wg.hasOwnProperty;function Og(t){if(!ne(t))return Sg(t);var e=Ur(t),n=[];for(var r in t)r=="constructor"&&(e||!jg.call(t,r))||n.push(r);return n}function sr(t){return Vt(t)?il(t,!0):Og(t)}function Eg(t){return bn(t,sr(t))}function Cg(t,e,n,r,i,s,o){var a=Mi(t,n),l=Mi(e,n),u=o.get(l);if(u){Ri(t,n,u);return}var d=s?s(a,l,n+"",t,e,o):void 0,c=d===void 0;if(c){var h=je(l),g=!h&&Rt(l),m=!h&&!g&&nr(l);d=l,h||g||m?je(a)?d=a:Yn(a)?d=Ss(a):g?(c=!1,d=xl(l,!0)):m?(c=!1,d=vl(l,!0)):d=[]:Et(l)||ln(l)?(d=a,ln(a)?d=Eg(a):(!ne(a)||tr(a))&&(d=Sl(l))):c=!1}c&&(o.set(l,d),i(d,l,r,s,o),o.delete(l)),Ri(t,n,d)}function wl(t,e,n,r,i){t!==e&&ml(e,function(s,o){if(i||(i=new We),ne(s))Cg(t,e,o,n,wl,r,i);else{var a=r?r(Mi(t,o),s,o+"",t,e,i):void 0;a===void 0&&(a=s),Ri(t,o,a)}},sr)}function Ag(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var Io=Math.max;function jl(t,e,n){return e=Io(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=Io(r.length-e,0),o=Array(s);++i<s;)o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(o),Ag(t,this,a)}}function _g(t){return function(){return t}}var Tg=Ir?function(t,e){return Ir(t,"toString",{configurable:!0,enumerable:!1,value:_g(e),writable:!0})}:Br,Ig=800,Ng=16,Fg=Date.now;function Pg(t){var e=0,n=0;return function(){var r=Fg(),i=Ng-(r-n);if(n=r,i>0){if(++e>=Ig)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Ol=Pg(Tg);function Vr(t,e){return Ol(jl(t,e,Br),t+"")}function $g(t,e,n){if(!ne(n))return!1;var r=typeof e;return(r=="number"?Vt(n)&&Mr(e,n.length):r=="string"&&e in n)?er(n[e],t):!1}function Dg(t){return Vr(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,o&&$g(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,s)}return e})}var kg=Dg(function(t,e,n){wl(t,e,n)}),No=Re?Re.isConcatSpreadable:void 0;function Rg(t){return je(t)||ln(t)||!!(No&&t&&t[No])}function or(t,e,n,r,i){var s=-1,o=t.length;for(n||(n=Rg),i||(i=[]);++s<o;){var a=t[s];e>0&&n(a)?e>1?or(a,e-1,n,r,i):ls(i,a):r||(i[i.length]=a)}return i}var Mg=1/0;function Ug(t){var e=t==null?0:t.length;return e?or(t,Mg):[]}function Lg(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function Bg(t){return t!==t}function Vg(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function El(t,e,n){return e===e?Vg(t,e,n):Lg(t,Bg,n)}function ws(t,e){var n=t==null?0:t.length;return!!n&&El(t,e,0)>-1}function Sr(){}var Wg=1/0,qg=sn&&1/as(new sn([,-0]))[1]==Wg?function(t){return new sn(t)}:Sr,zg=200;function Cl(t,e,n){var r=-1,i=ws,s=t.length,o=!0,a=[],l=a;if(s>=zg){var u=qg(t);if(u)return as(u);o=!1,i=Gn,l=new kt}else l=a;e:for(;++r<s;){var d=t[r],c=d;if(d=d!==0?d:0,o&&c===c){for(var h=l.length;h--;)if(l[h]===c)continue e;a.push(d)}else i(l,c,n)||(l!==a&&l.push(c),a.push(d))}return a}function Al(t){return t&&t.length?Cl(t):[]}var Kg="[object Map]",Hg="[object Set]",Gg=Object.prototype,Yg=Gg.hasOwnProperty;function ye(t){if(t==null)return!0;if(Vt(t)&&(je(t)||typeof t=="string"||typeof t.splice=="function"||Rt(t)||nr(t)||ln(t)))return!t.length;var e=$e(t);if(e==Kg||e==Hg)return!t.size;if(Ur(t))return!sl(t).length;for(var n in t)if(Yg.call(t,n))return!1;return!0}const Jg=Object.prototype;function Pn(t){for(const e in t)if(Jg.hasOwnProperty.call(t,e))return!1;return!0}const Zg=["array","boolean","integer","null","number","object","string"];new Set(Zg);const Xg=["$defs","definitions","properties","patternProperties","dependencies"];new Set(Xg);const Qg=["items","allOf","oneOf","anyOf"];new Set(Qg);const ey=["items","additionalItems","additionalProperties","propertyNames","contains","if","then","else","not"];new Set(ey);function wr(t){return typeof t=="object"}function He(t){return wr(t)?Pn(t):t===!0}function tn(t,e){return t<e?-1:t>e?1:0}function ni(t,e){const n=t.length;if(n===0)return e;let r=e.length;if(r===0)return t;if(n<r){const s=t;t=e,e=s,r=n}const i=new Set(t);for(let s=0;s<r;s++)i.add(e[s]);return Array.from(i)}function ty(t,e){const n=[];if(t.length===0||e.length===0)return n;if(t.length>e.length){const i=t;t=e,e=i}const r=new Set(e);for(let i=0;i<t.length&&r.size>0;i++){const s=t[i];r.delete(s)&&n.push(s)}return n}function Fo(t){return t.length===0}function ri(t){return(e,n)=>{const r=e.length-n.length;if(r!==0)return r;for(let i=0;i<e.length;i++)if(e[i]!==n[i]){const s=t(e[i],n[i]);if(s!==0)return s}return 0}}function _l(t,{threshold:e=12}={}){return n=>{const r=n.length;if(r===0)return n;if(r<=e){const o=[];let a=0;e:for(let l=0;l<r;l++){const u=n[l];for(let d=0;d<a;d++)if(t(u,o[d])===0)continue e;a=o.push(u)}return o}const i=n.slice().sort(t);let s=0;for(let o=1;o<r;o++)t(i[s],i[o])!==0&&++s!==o&&(i[s]=i[o]);return i.length=s+1,i}}function ny(t){return(e,n)=>{const r=[];let i=e.length,s=n.length;if(i===0||s===0)return r;if(i>s){const d=e;e=n,n=d;const c=i;i=s,s=c}const o=[...e].sort(t),a=[...n].sort(t);let l=0,u=0;for(;l<i&&u<s;){const d=t(o[l],a[u]);d===0?((r.length===0||t(r[r.length-1],o[l])!==0)&&r.push(o[l]),l++,u++):d<0?l++:u++}return r}}function ry(t,e){return n=>{if(t.has(n))return t.get(n);const r=e(n);return t.set(n,r),r}}const Po=ry,Tl=()=>0,iy=t=>t===void 0,sy=t=>typeof t!="object",$o={boolean:0,number:1,string:2};function oy(t,e){const n=typeof t,r=typeof e;return n===r?tn(t,e):$o[n]-$o[r]}function ay(t,e){const n=t.length;if(n===0)return e;const r=e.length;if(r===0)return t;if(r>n){const o=t;t=e,e=o}const i=new Set(t),s=e.length;for(let o=0;o<s;o++){const a=e[o];i.has(a)||t.push(a)}return t}function Wr(t,e,n=Tl){return(r,i)=>t(r)?t(i)?n(r,i):-1:t(i)?1:e(r,i)}function Zt(t){return Wr(iy,t)}function pt(t,e){return Wr(n=>n===void 0||t(n),e)}function ii(t,e){return Wr(Array.isArray,t,e)}const xe=Zt(tn),si=pt(t=>t===0,(t,e)=>t-e);function ly({deduplicationCache:t=new WeakMap,sortedKeysCache:e=new WeakMap}={}){const n=Po(e,p=>Object.keys(p).sort());function r(p){return(y,x)=>{const b=n(y),O=n(x),S=Math.min(b.length,O.length);for(let v=0;v<S;v++){const w=tn(b[v],O[v]);if(w!==0)return w}if(b.length!==O.length)return b.length-O.length;for(let v=0;v<S;v++){const w=b[v],j=p(y[w],x[w]);if(j!==0)return j}return 0}}function i(p){const y=ri(p),x=Po(t,_l(p,{threshold:0}));return(b,O)=>y(x(b),x(O))}const s=i(tn);function o(p,y){if(wr(p)){if(wr(y)){const x=Object.keys(p),b=Object.keys(y),O=ay(x,b),S=O.length;for(let v=0;v<S;v++){const w=O[v];if(p[w]===y[w])continue;const E=(m[w]??a)(p[w],y[w]);if(E!==0)return E}return 0}return y===!0&&Pn(p)?0:1}return wr(y)?p===!0&&Pn(y)?0:-1:tn(p,y)}const a=Zt(u),l=Wr(sy,ii(r(a),ri(u)),oy);function u(p,y){return p===null?-1:y===null?1:l(p,y)}const d=Zt(o),c=pt(Pn,r(d)),h=Zt(i(o)),g=pt(He,o),m={$id:xe,$comment:xe,$defs:c,$ref:xe,$schema:xe,const:a,contains:d,contentEncoding:xe,contentMediaType:xe,default:a,definitions:c,description:xe,else:d,examples:a,exclusiveMaximum:xe,exclusiveMinimum:xe,format:xe,if:d,maximum:xe,maxItems:xe,maxLength:xe,maxProperties:xe,minimum:xe,multipleOf:xe,not:d,pattern:xe,propertyNames:d,readOnly:xe,then:d,title:xe,writeOnly:xe,uniqueItems:pt(p=>p===!1,Tl),minLength:si,minItems:si,minProperties:si,required:pt(Fo,s),enum:pt(Fo,i(u)),type:Zt((p,y)=>{const x=Array.isArray(p),b=Array.isArray(y);return!x&&!b?tn(p,y):s(x?p:[p],b?y:[y])}),items:pt(p=>!Array.isArray(p)&&He(p),ii(o,ri(o))),anyOf:h,allOf:h,oneOf:h,properties:c,patternProperties:c,additionalProperties:g,additionalItems:g,dependencies:pt(Pn,r(Zt(ii(o,s))))};return{compareSchemaValues:u,compareSchemaDefinitions:o}}function Do(t){return t}const Il=(t,e)=>t?Il(e%t,t):e,cy=(t,e)=>Math.abs(t*e)/Il(t,e);function uy(t,e){return t===e?t:`^(?=.*(?:${t}))(?=.*(?:${e})).*$`}function oi(t,e,n){const r=t.length,i=e.length;if(r>0&&i>0)for(let s=0;s<r;s++){const o=t[s];for(let a=0;a<i;a++)n(o,e[a])}}function ai(t,e){return t||e}function ko(t){return(e,n)=>{const r={...e},i=Object.keys(n),s=i.length;for(let o=0;o<s;o++){const a=i[o];r[a]=e[a]===void 0?n[a]:t(e[a],n[a])}return r}}function dy(t){const e=new Map;for(const n of t)for(const r of n[0])e.set(r,n[1]);return e}function It(t,e,n){n===void 0||He(n)?delete t[e]:t[e]=n}const fy=["properties","patternProperties","additionalProperties"];function Ro(t){const e=Object.keys(t),n=e.length,r=[];for(let i=0;i<n;i++){const s=e[i];r.push({regExp:new RegExp(s),schema:t[s]})}return[r,e]}const Mo=[[],[]];function Uo(t,e,n){const r=n.length;for(let i=0;i<r;i++){const s=n[i];if(!s.regExp.test(e))continue;const o=s.schema;if(o===!1)return!0;t.push(o)}return!1}const my=["items","additionalItems"],hy=["if","then","else"];function Lo(t,e){return e.if!==void 0&&(t.if=e.if),e.then!==void 0&&(t.then=e.then),e.else!==void 0&&(t.else=e.else),t}function li(t,e){if(t===e)return t;switch(t){case"number":if(e==="integer")return"integer";case"integer":if(e==="number")return"integer";default:return}}function Nt(t,e,n){return[t,e,n]}function py(t){const e=new Map;for(const[n,r,i]of t){const s=o=>{if(!i(o))throw new Error(`Schema keys '${n}' and '${r}' are conflicting (${n}: ${JSON.stringify(o[n])}, ${r}: ${JSON.stringify(o[r])})`)};for(const o of[[n,r],[r,n]]){let a=e.get(o[0]);a===void 0&&(a=[],e.set(o[0],a)),a.push({oppositeKey:o[1],check:s})}}return e}const gy=[Nt("minimum","maximum",t=>t.maximum>=t.minimum),Nt("exclusiveMinimum","maximum",t=>t.maximum>t.exclusiveMinimum),Nt("minimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.minimum),Nt("exclusiveMinimum","exclusiveMaximum",t=>t.exclusiveMaximum>t.exclusiveMinimum),Nt("minLength","maxLength",t=>t.maxLength>=t.minLength),Nt("minItems","maxItems",t=>t.maxItems>=t.minItems),Nt("minProperties","maxProperties",t=>t.maxProperties>=t.minProperties)];function yy({mergePatterns:t=uy,isSubRegExp:e=Object.is,intersectJson:n=ty,deduplicateJsonSchemaDef:r=Do,defaultMerger:i=Do,assigners:s=[],checks:o=gy,mergers:a}={}){function l(S){const v=S.length;let w=S[0];for(let j=1;j<v;j++){const E=x(w,S[j]);if(E===!1)return!1;He(E)||(w=E)}return w}function u(S,v,w,j,E,A,C){if(S.length=0,w===!1)return!1;if(S.push(w),E!==void 0){if(E===!1)return!1;S.push(E)}if(Uo(S,v,A))return!1;const _=S.length<2;if(C===!1){if(_)return;if(Uo(S,v,j))return!1}else _&&C!==void 0&&S.push(C);return S.length===1?S[0]:l(S)}function d(S,v,w,j,E,A){const C=w.length;if(C>0&&E!==!1)if(A)Object.assign(S,v);else for(let T=0;T<C;T++){const _=w[T];j.has(_)||(S[_]=x(v[_],E))}return S}const c=(S,{properties:v={},patternProperties:w,additionalProperties:j=!0},{properties:E={},patternProperties:A,additionalProperties:C=!0})=>{const T=He(j),_=He(C);if(T&&_)return It(S,"properties",b(v,E)),It(S,"patternProperties",w&&A?b(w,A):w??A),delete S.additionalProperties,S;const I=x(j,C);It(S,"additionalProperties",I);const k={},F=Object.keys(v),D=F.length,[R,B]=w?Ro(w):Mo,[V,Z]=A?Ro(A):Mo,ae=[],fe=new Set,be=_?void 0:C;for(let q=0;q<D;q++){const re=F[q];fe.add(re);const se=u(ae,re,v[re],R,E[re],V,be);se!==void 0&&(k[re]=se)}const M=Object.keys(E),le=M.length,te=T?void 0:j;for(let q=0;q<le;q++){const re=M[q];if(fe.has(re))continue;const se=u(ae,re,E[re],V,void 0,R,te);se!==void 0&&(k[re]=se)}It(S,"properties",k);let H={};const G=new Set;return B.length>0&&Z.length>0&&oi(B,Z,(q,re)=>{e(q,re)&&G.add(q),e(re,q)&&G.add(re),H[t(q,re)]=x(w[q],A[re])}),H=d(H,w,B,G,C,_),H=d(H,A,Z,G,j,T),It(S,"patternProperties",H),S},h=(S,{items:v=[],additionalItems:w},{items:j=[],additionalItems:E})=>{const A=Array.isArray(v),C=Array.isArray(j),T=[];if(S.items=T,A&&C){const[_,I,k]=v.length<j.length?[v.length,w,j]:[j.length,E,v];let F=0;for(;F<_;F++)T.push(x(v[F],j[F]));if(I===!1)S.additionalItems=!1;else{const D=I===void 0||He(I);for(;F<k.length;F++)T.push(D?k[F]:x(k[F],I));It(S,"additionalItems",w!==void 0&&E!==void 0?x(w,E):w??E)}}else if(A||C){const[_,I,k]=A?[v,j,w]:[j,v,E];It(S,"additionalItems",k&&x(k,I));for(let F=0;F<_.length;F++)T.push(x(_[F],I))}else delete S.additionalItems,S.items=x(v,j);return S},g=(S,v,w)=>{Lo(S,v);const j=Lo({},w);return S.allOf===void 0?S.allOf=[j]:S.allOf=S.allOf.concat(j),S};function m(S,v){const w=[];if(oi(S,v,(j,E)=>{try{w.push(x(j,E))}catch{}}),w.length===0)throw new Error(`No valid schema combinations could be produced for "${JSON.stringify(S)}" and "${JSON.stringify(v)}"; the merged result is empty`);return r(w)}const p=dy([[fy,c],[my,h],[hy,g],...s]),y=py(o);function x(S,v){if(S===!1||v===!1)return!1;if(He(S))return He(v)?!0:v;if(He(v))return S;let w={...S};const j=new Set,E=new Set,A=Object.keys(v),C=A.length;for(let T=0;T<C;T++){const _=A[T],I=v[_];if(I===void 0)continue;const k=y.get(_);if(k!==void 0){const B=k.length;for(let V=0;V<B;V++){const Z=k[V];S[Z.oppositeKey]!==void 0&&E.add(Z.check)}}const F=S[_];if(F===void 0){w[_]=I;continue}const D=p.get(_);if(D){j.add(D);continue}const R=O[_]??i;w[_]=R(F,I)}for(const T of j)w=T(w,S,v);for(const T of E)T(w);return w}const b=ko(x),O={$id:i,$ref:i,$schema:i,$comment:i,$defs:b,definitions:b,type:(S,v)=>{if(S===v)return S;const w=Array.isArray(S),j=Array.isArray(v);if(!w&&!j){const E=li(S,v);if(E!==void 0)return E}else if(w||j){const E=new Set;if(w&&j)oi(S,v,(C,T)=>{const _=li(C,T);_!==void 0&&E.add(_)});else{const C=w?S:v,T=w?v:S,_=C.length;for(let I=0;I<_;I++){const k=li(T,C[I]);k!==void 0&&E.add(k)}}const A=E.size;if(A===1)return E.values().next().value;if(A>1)return Array.from(E)}throw new Error(`It is not possible to create an intersection of the following incompatible types: ${S.toString()}, ${v.toString()}`)},default:i,description:i,title:i,const:i,format:i,contentEncoding:i,contentMediaType:i,not:(S,v)=>{const w=r([S,v]);return w.length===1?w[0]:{anyOf:w}},pattern:t,readOnly:ai,writeOnly:ai,enum:(S,v)=>{const w=n(S,v);if(w.length===0)throw new Error(`Intersection of the following enums is empty: "${JSON.stringify(S)}", "${JSON.stringify(v)}"`);return w},anyOf:m,oneOf:m,allOf:(S,v)=>r(S.concat(v)),propertyNames:x,contains:x,dependencies:ko((S,v)=>Array.isArray(S)?Array.isArray(v)?ni(S,v):x(v,{required:S}):Array.isArray(v)?x(S,{required:v}):x(S,v)),examples:(S,v)=>{if(!Array.isArray(S)||!Array.isArray(v))throw new Error(`Value of the 'examples' field should be an array, but got "${JSON.stringify(S)}" and "${JSON.stringify(v)}"`);return ni(S,v)},multipleOf:(S,v)=>{let w=1;for(;!Number.isInteger(S)||!Number.isInteger(v);)w*=10,S*=10,v*=10;return cy(S,v)/w},exclusiveMaximum:Math.min,maximum:Math.min,maxItems:Math.min,maxLength:Math.min,maxProperties:Math.min,exclusiveMinimum:Math.max,minimum:Math.max,minItems:Math.max,minLength:Math.max,minProperties:Math.max,uniqueItems:ai,required:ni,...a};return{mergeSchemaDefinitions:x,mergeArrayOfSchemaDefinitions:l}}function by(t){const e=[],n=[t];for(;n.length>0;){const r=n.pop();if(typeof r=="boolean"||r.allOf===void 0){e.push(r);continue}const{allOf:i,...s}=r;e.push(s);for(let o=i.length-1;o>=0;o--)n.push(i[o])}return e}function xy(t){return e=>t(by(e))}var _n={},Bo;function vy(){if(Bo)return _n;Bo=1;var t=/~/,e=/~[01]/g;function n(u){switch(u){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+u)}function r(u){return t.test(u)?u.replace(e,n):u}function i(u,d,c){for(var h,g,m=1,p=d.length;m<p;){if(d[m]==="constructor"||d[m]==="prototype"||d[m]==="__proto__")return u;if(h=r(d[m++]),g=p>m,typeof u[h]>"u"&&(Array.isArray(u)&&h==="-"&&(h=u.length),g&&(d[m]!==""&&d[m]<1/0||d[m]==="-"?u[h]=[]:u[h]={})),!g)break;u=u[h]}var y=u[h];return c===void 0?delete u[h]:u[h]=c,y}function s(u){if(typeof u=="string"){if(u=u.split("/"),u[0]==="")return u;throw new Error("Invalid JSON pointer.")}else if(Array.isArray(u)){for(const d of u)if(typeof d!="string"&&typeof d!="number")throw new Error("Invalid JSON pointer. Must be of type string or number.");return u}throw new Error("Invalid JSON pointer.")}function o(u,d){if(typeof u!="object")throw new Error("Invalid input object.");d=s(d);var c=d.length;if(c===1)return u;for(var h=1;h<c;){if(u=u[r(d[h++])],c===h)return u;if(typeof u!="object"||u===null)return}}function a(u,d,c){if(typeof u!="object")throw new Error("Invalid input object.");if(d=s(d),d.length===0)throw new Error("Invalid JSON pointer for set.");return i(u,d,c)}function l(u){var d=s(u);return{get:function(c){return o(c,d)},set:function(c,h){return a(c,d,h)}}}return _n.get=o,_n.set=a,_n.compile=l,_n}var Sy=vy();const ci=Xi(Sy);function wy(t,e){return t&&bn(e,Ve(e),t)}function jy(t,e){return t&&bn(e,sr(e),t)}function Oy(t,e){return bn(t,cs(t),e)}var Ey=Object.getOwnPropertySymbols,Nl=Ey?function(t){for(var e=[];t;)ls(e,cs(t)),t=Dr(t);return e}:Qa;function Cy(t,e){return bn(t,Nl(t),e)}function js(t){return Xa(t,sr,Nl)}var Ay=Object.prototype,_y=Ay.hasOwnProperty;function Ty(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&_y.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function Iy(t,e){var n=e?vs(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var Ny=/\w*$/;function Fy(t){var e=new t.constructor(t.source,Ny.exec(t));return e.lastIndex=t.lastIndex,e}var Vo=Re?Re.prototype:void 0,Wo=Vo?Vo.valueOf:void 0;function Py(t){return Wo?Object(Wo.call(t)):{}}var $y="[object Boolean]",Dy="[object Date]",ky="[object Map]",Ry="[object Number]",My="[object RegExp]",Uy="[object Set]",Ly="[object String]",By="[object Symbol]",Vy="[object ArrayBuffer]",Wy="[object DataView]",qy="[object Float32Array]",zy="[object Float64Array]",Ky="[object Int8Array]",Hy="[object Int16Array]",Gy="[object Int32Array]",Yy="[object Uint8Array]",Jy="[object Uint8ClampedArray]",Zy="[object Uint16Array]",Xy="[object Uint32Array]";function Qy(t,e,n){var r=t.constructor;switch(e){case Vy:return vs(t);case $y:case Dy:return new r(+t);case Wy:return Iy(t,n);case qy:case zy:case Ky:case Hy:case Gy:case Yy:case Jy:case Zy:case Xy:return vl(t,n);case ky:return new r;case Ry:case Ly:return new r(t);case My:return Fy(t);case Uy:return new r;case By:return Py(t)}}var eb="[object Map]";function tb(t){return Me(t)&&$e(t)==eb}var qo=cn&&cn.isMap,nb=qo?ds(qo):tb,rb="[object Set]";function ib(t){return Me(t)&&$e(t)==rb}var zo=cn&&cn.isSet,sb=zo?ds(zo):ib,ob=1,ab=2,lb=4,Fl="[object Arguments]",cb="[object Array]",ub="[object Boolean]",db="[object Date]",fb="[object Error]",Pl="[object Function]",mb="[object GeneratorFunction]",hb="[object Map]",pb="[object Number]",$l="[object Object]",gb="[object RegExp]",yb="[object Set]",bb="[object String]",xb="[object Symbol]",vb="[object WeakMap]",Sb="[object ArrayBuffer]",wb="[object DataView]",jb="[object Float32Array]",Ob="[object Float64Array]",Eb="[object Int8Array]",Cb="[object Int16Array]",Ab="[object Int32Array]",_b="[object Uint8Array]",Tb="[object Uint8ClampedArray]",Ib="[object Uint16Array]",Nb="[object Uint32Array]",me={};me[Fl]=me[cb]=me[Sb]=me[wb]=me[ub]=me[db]=me[jb]=me[Ob]=me[Eb]=me[Cb]=me[Ab]=me[hb]=me[pb]=me[$l]=me[gb]=me[yb]=me[bb]=me[xb]=me[_b]=me[Tb]=me[Ib]=me[Nb]=!0;me[fb]=me[Pl]=me[vb]=!1;function Ln(t,e,n,r,i,s){var o,a=e&ob,l=e&ab,u=e&lb;if(n&&(o=i?n(t,r,i,s):n(t)),o!==void 0)return o;if(!ne(t))return t;var d=je(t);if(d){if(o=Ty(t),!a)return Ss(t,o)}else{var c=$e(t),h=c==Pl||c==mb;if(Rt(t))return xl(t,a);if(c==$l||c==Fl||h&&!i){if(o=l||h?{}:Sl(t),!a)return l?Cy(t,jy(o,t)):Oy(t,wy(o,t))}else{if(!me[c])return i?t:{};o=Qy(t,c,a)}}s||(s=new We);var g=s.get(t);if(g)return g;s.set(t,o),sb(t)?t.forEach(function(y){o.add(Ln(y,e,n,y,t,s))}):nb(t)&&t.forEach(function(y,x){o.set(x,Ln(y,e,n,x,t,s))});var m=u?l?js:Pi:l?sr:Ve,p=d?void 0:m(t);return bs(p||t,function(y,x){p&&(x=y,y=t[x]),gs(o,x,Ln(y,e,n,x,t,s))}),o}function Dl(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Fb(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=t[r+e];return s}function Pb(t,e){return e.length<2?t:Lr(t,Fb(e,0,-1))}var $b=Object.prototype,Db=$b.hasOwnProperty;function kl(t,e){e=yn(e,t);var n=-1,r=e.length;if(!r)return!0;for(;++n<r;){var i=Ct(e[n]);if(i==="__proto__"&&!Db.call(t,"__proto__")||(i==="constructor"||i==="prototype")&&n<r-1)return!1}var s=Pb(t,e);return s==null||delete s[Ct(Dl(e))]}function kb(t){return Et(t)?void 0:t}function Ui(t){var e=t==null?0:t.length;return e?or(t,1):[]}function Rl(t){return Ol(jl(t,void 0,Ui),t+"")}var Rb=1,Mb=2,Ub=4,un=Rl(function(t,e){var n={};if(t==null)return n;var r=!1;e=gn(e,function(s){return s=yn(s,t),r||(r=s.length>1),s}),bn(t,js(t),n),r&&(n=Ln(n,Rb|Mb|Ub,kb));for(var i=e.length;i--;)kl(n,e[i]);return n}),Lb=bu();const Os=Xi(Lb);function Nr(t,e){if(de in t&&Os.equal(t[de],e))return t;for(const n of Object.values(t))if(Array.isArray(n)){for(const r of n)if(ne(r)){const i=Nr(r,e);if(i!==void 0)return i}}else if(ne(n)){const r=Nr(n,e);if(r!==void 0)return r}}function Li(t,e){const n=$(t,de,e);ue in t&&(t={...t,[ue]:Os.resolve(n,t[ue])});for(const[r,i]of Object.entries(t))Array.isArray(i)?t={...t,[r]:i.map(s=>ne(s)?Li(s,n):s)}:ne(i)&&(t={...t,[r]:Li(i,n)});return t}function Es(t,e){const n=e[t];return[un(e,[t]),n]}function Ml(t,e={},n=[],r=$(e,[de])){const i=t||"";let s;if(i.startsWith("#")){const a=decodeURIComponent(i.substring(1));r===void 0||de in e&&e[de]===r?s=ci.get(e,a):e[Fn]===vr&&(s=Nr(e,r.replace(/\/$/,"")),s!==void 0&&(s=ci.get(s,a)))}else if(e[Fn]===vr){const a=r?Os.resolve(r,i):i,[l,...u]=a.replace(/#\/?$/,"").split("#");s=Nr(e,l.replace(/\/$/,"")),s!==void 0&&(r=s[de],ye(u)||(s=ci.get(s,decodeURIComponent(u.join("#")))))}if(s===void 0)throw new Error(`Could not find a definition for ${t}.`);const o=s[ue];if(o){if(n.includes(o)){if(n.length===1)throw new Error(`Definition for ${t} is a circular reference`);const[d,...c]=n,h=[...c,i,d].join(" -> ");throw new Error(`Definition for ${d} contains a circular reference through ${h}`)}const[a,l]=Es(ue,s),u=Ml(l,e,[...n,i],r);return Object.keys(a).length>0?e[Fn]===nm||e[Fn]===vr?{[Ot]:[a,u]}:{...a,...u}:u}return s}function Cs(t,e={},n=$(e,[de])){return Ml(t,e,[],n)}var Bb="[object String]";function At(t){return typeof t=="string"||!je(t)&&Me(t)&&ut(t)==Bb}function Qe(t){let e;const n=$(t,Xf);return At(n)?e=n:n!==void 0&&console.warn(`Expecting discriminator to be a string, got "${typeof n}" instead`),e}function Jn(t){return Array.isArray(t)?"array":typeof t=="string"?"string":t==null?"null":typeof t=="boolean"?"boolean":isNaN(t)?typeof t=="object"?"object":"string":"number"}var Vb=Vr(function(t){return Cl(or(t,1,Yn,!0))});function qe(t){let{type:e}=t;return!e&&t.const?Jn(t.const):!e&&t.enum?"string":!e&&(t.properties||t.additionalProperties||t.patternProperties)?"object":(Array.isArray(e)&&(e.length===2&&e.includes("null")?e=e.find(n=>n!=="null"):e=e[0]),e)}function lt(t,e){const n=Object.assign({},t);return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];return t&&i in t&&K(o)?r[i]=lt(s,o):t&&e&&(qe(t)==="object"||qe(e)==="object")&&i===Va&&Array.isArray(s)&&Array.isArray(o)?r[i]=Vb(s,o):r[i]=o,r},n)}var Wb="[object Number]";function Ul(t){return typeof t=="number"||Me(t)&&ut(t)==Wb}function Ll(t,e,n){var r;if(t&&n){const i=$(t,n);if(i===void 0)return;for(let s=0;s<e.length;s++){const o=e[s],a=$(o,[ie,n],{});if(!(a.type==="object"||a.type==="array")&&(a.const===i||!((r=a.enum)===null||r===void 0)&&r.includes(i)))return s}}}function As(t,e,n,r,i){if(e===void 0)return 0;const s=Ll(e,n,i);if(Ul(s))return s;for(let o=0;o<n.length;o++){const a=n[o];if(i&&Q(a,[ie,i])){const l=$(e,i),u=$(a,[ie,i],{});if(t.isValid(u,l,r))return o}else if(a[ie]){const l={anyOf:Object.keys(a[ie]).map(d=>({required:[d]}))};let u;if(a.anyOf){const{...d}=a;d.allOf?d.allOf=d.allOf.slice():d.allOf=[],d.allOf.push(l),u=d}else u=Object.assign({},a,l);if(delete u.required,t.isValid(u,e,r))return o}else if(t.isValid(a,e,r))return o}return 0}function Ee(t,e,n={},r,i,s=!1){return Ye(t,e,n,r,void 0,void 0,i,s)[0]}function qb(t,e,n,r,i,s,o){const{if:a,then:l,else:u,...d}=e,c=t.isValid(a,s||{},n);let h=[d],g=[];if(r)l&&typeof l!="boolean"&&(g=g.concat(Ye(t,l,n,s,r,i,o))),u&&typeof u!="boolean"&&(g=g.concat(Ye(t,u,n,s,r,i,o)));else{const m=c?l:u;m&&typeof m!="boolean"&&(g=g.concat(Ye(t,m,n,s,r,i,o)))}return g.length&&(h=g.map(m=>lt(d,m))),h.flatMap(m=>Ye(t,m,n,s,r,i,o))}function Bl(t){return t.reduce((n,r)=>r.length>1?r.flatMap(i=>dl(n.length,s=>[...n[s]].concat(i))):(n.forEach(i=>i.push(r[0])),n),[[]])}function Vl(t,e){return Object.keys(t.patternProperties).filter(n=>RegExp(n).test(e)).reduce((n,r)=>(ce(n,[r],t.patternProperties[r]),n),{})}function zb(t,e,n,r,i,s,o,a){const l=Wl(t,e,n,r,i,s,o,a);if(l.length>1||l[0]!==e)return l;if(rs in e)return ql(t,e,n,r,i,s,o).flatMap(d=>Ye(t,d,n,s,r,i,o));if(Ot in e&&Array.isArray(e[Ot])){const u=e.allOf.map(c=>Ye(t,c,n,s,r,i,o));return Bl(u).map(c=>({...e,allOf:c}))}return[e]}function Wl(t,e,n,r,i,s,o,a){const l=on(e,n,i,void 0,a);return l!==e?Ye(t,l,n,s,r,i,o,a):[e]}function on(t,e,n,r,i){if(!K(t))return t;let s=t;if(ue in s){const{$ref:o,...a}=s;if(n.includes(o))return s;n.push(o),s={...Cs(o,e,r),...a,[Mn]:o},de in s&&(r=s[de])}if(ie in s){const o=[],a=xg(s[ie],(l,u,d)=>{const c=[...n];l[d]=on(u,e,c,r,i),o.push(c)},{});kg(n,Al(Ug(o))),s={...s,[ie]:a}}if(an in s&&!Array.isArray(s.items)&&typeof s.items!="boolean"&&(s={...s,items:on(s.items,e,n,r,i)}),i){let o,a;ee in t&&Array.isArray(t[ee])?(o=ee,a=s[ee]):z in t&&Array.isArray(t[z])&&(o=z,a=s[z]),o&&a&&(s={...s,[o]:a.map(l=>on(l,e,n,r,i))})}return he(t,s)?t:s}function Kb(t,e,n,r,i){const s={...e,properties:{...e.properties}},o=r&&K(r)?r:{};return Object.keys(o).forEach(a=>{if(!(a in s.properties)){if(Ii in s){const l=Vl(s,a);if(!ye(l)){s.properties[a]=Ee(t,{[Ot]:Object.values(l)},n,$(o,[a]),i),ce(s.properties,[a,ot],!0);return}}if(en in s&&s.additionalProperties!==!1){let l;typeof s.additionalProperties!="boolean"?ue in s.additionalProperties?l=Ee(t,{[ue]:$(s.additionalProperties,[ue])},n,o,i):"type"in s.additionalProperties?l={...s.additionalProperties}:ee in s.additionalProperties||z in s.additionalProperties?l={type:"object",...s.additionalProperties}:l={type:Jn($(o,[a]))}:l={type:Jn($(o,[a]))},s.properties[a]=l,ce(s.properties,[a,ot],!0)}else s.properties[a]={type:"null"},ce(s.properties,[a,ot],!0)}}),s}const{compareSchemaDefinitions:Hb,compareSchemaValues:Gb}=ly(),{mergeArrayOfSchemaDefinitions:Yb}=yy({intersectJson:ny(Gb),deduplicateJsonSchemaDef:_l(Hb)}),Jb=xy(Yb);function Zb(t){return Jb(t)}function Ye(t,e,n,r,i=!1,s=[],o,a){return K(e)?zb(t,e,n,i,s,r,o,a).flatMap(u=>{var d;let c=u;if(is in c)return qb(t,c,n,i,s,r,o);if(Ot in c){if(i){const{allOf:g,...m}=c;return[...g,m]}try{const g=[],m=[];(d=c.allOf)===null||d===void 0||d.forEach(p=>{typeof p=="object"&&p.contains?g.push(p):m.push(p)}),g.length&&(c={...c,allOf:m}),c=o?o(c):Zb(c),g.length&&(c.allOf=g)}catch(g){console.warn(`could not merge subschemas in allOf:
2
- `,g);const{allOf:m,...p}=c;return p}}return ie in c&&Ii in c&&(c=Object.keys(c.properties).reduce((g,m)=>{const p=Vl(g,m);return ye(p)||(g.properties[m]=Ee(t,{allOf:[g.properties[m],...Object.values(p)]},n,$(r,[m]),o)),g},{...c,properties:{...c.properties}})),Ii in c||en in c&&c.additionalProperties!==!1?Kb(t,c,n,r,o):c}):[{}]}function Xb(t,e,n,r,i){let s;const{oneOf:o,anyOf:a,...l}=e;if(Array.isArray(o)?s=o:Array.isArray(a)&&(s=a),s){const u=i===void 0&&r?{}:i,d=Qe(e);s=s.map(h=>on(h,n,[]));const c=As(t,u,s,n,d);if(r)return s.map(h=>lt(l,h));e=lt(l,s[c])}return[e]}function ql(t,e,n,r,i,s,o){const{dependencies:a,...l}=e;return Xb(t,l,n,r,s).flatMap(d=>zl(t,a,d,n,r,i,s,o))}function zl(t,e,n,r,i,s,o,a){let l=[n];for(const u in e){if(!i&&$(o,[u])===void 0||n.properties&&!(u in n.properties))continue;const[d,c]=Es(u,e);return Array.isArray(c)?l[0]=Qb(n,c):K(c)&&(l=e0(t,n,r,u,c,i,s,o,a)),l.flatMap(h=>zl(t,d,h,r,i,s,o,a))}return l}function Qb(t,e){if(!e)return t;const n=Array.isArray(t.required)?Array.from(new Set([...t.required,...e])):e;return{...t,required:n}}function e0(t,e,n,r,i,s,o,a,l){return Ye(t,i,n,a,s,o,l).flatMap(d=>{const{oneOf:c,...h}=d;if(e=lt(e,h),c===void 0)return e;const g=c.map(p=>typeof p=="boolean"||!(ue in p)?[p]:Wl(t,p,n,s,o,a));return Bl(g).flatMap(p=>t0(t,e,n,r,p,s,o,a,l))})}function t0(t,e,n,r,i,s,o,a,l){const u=i.filter(d=>{if(typeof d=="boolean"||!d||!d.properties)return!1;const{[r]:c}=d.properties;if(c){const h={type:"object",properties:{[r]:c}};return t.isValid(h,a,n)||s}return!1});return!s&&u.length!==1?(console.warn("ignoring oneOf in dependencies because there isn't exactly one subschema that is valid"),[e]):u.flatMap(d=>{const c=d,[h]=Es(r,c.properties),g={...c,properties:h};return Ye(t,g,n,a,s,o,l).map(p=>lt(e,p))})}function $n(t,e,n,r,i,s={},o){if(Array.isArray(n[i])){const l=Qe(n)||r,u=n[i].map(c=>Ee(t,c,e,s,o)),d=$(s,l);if(d!==void 0)return u.find(c=>St($(c,[ie,l,$r],$(c,[ie,l,ke])),d))}}function Kl(t,e,n,r,i){let s=n;if(Q(n,ue)&&(s=Ee(t,n,e,void 0,i)),ye(r))return s;const o=Array.isArray(r)?r:r.split("."),[a,...l]=o;if(a&&Q(s,a))return s=$(s,a),Kl(t,e,s,l,i)}function jr(t,e,n,r,i,s){const o=Kl(t,e,n,r,s);return o===void 0?i:o}const Ko={title:"!@#$_UNKNOWN_$#@!"};function n0(t,e,n,r,i={},s){const o=Array.isArray(r)?[...r]:r.split(".");let a=n;const l=o.pop();o.length&&o.forEach(h=>{a=jr(t,e,a,[ie,h],{},s),Q(a,z)?a=$n(t,e,a,l,z,$(i,h),s):Q(a,ee)&&(a=$n(t,e,a,l,ee,$(i,h),s))}),Q(a,z)?a=$n(t,e,a,l,z,i,s):Q(a,ee)&&(a=$n(t,e,a,l,ee,i,s));let u=jr(t,e,a,[ie,l],Ko,s);u===Ko&&(u=void 0);const d=jr(t,e,a,Va,[],s);let c;return u&&Array.isArray(d)&&(c=d.includes(l)),{field:u,isRequired:c}}function r0(t,e,n,r){var i=-1,s=t==null?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function i0(t,e){return function(n,r){if(n==null)return n;if(!Vt(n))return t(n,r);for(var i=n.length,s=-1,o=Object(n);++s<i&&r(o[s],s,o)!==!1;);return n}}var Hl=i0(hl);function s0(t,e,n,r,i){return i(t,function(s,o,a){n=r?(r=!1,s):e(n,s,o,a)}),n}function o0(t,e,n){var r=je(t)?r0:s0,i=arguments.length<3;return r(t,xs(e),n,i,Hl)}const a0={type:"object",$id:Zf,properties:{__not_really_there__:{type:"number"}}};function Bi(t,e,n,r,i){let s=0;return n&&(ne(n.properties)?s+=o0(n.properties,(o,a,l)=>{const u=$(r,l);if(typeof a=="boolean")return o;if(Q(a,ue)){const d=Ee(t,a,e,u,i);return o+Bi(t,e,d,u||{},i)}if((Q(a,z)||Q(a,ee))&&u){const d=Q(a,z)?z:ee,c=Qe(a);return o+Zn(t,e,u,$(a,d),-1,c,i)}if(a.type==="object")return ne(u)&&(o+=1),o+Bi(t,e,a,u,i);if(a.type===Jn(u)){let d=o+1;return a.default?d+=u===a.default?1:-1:a.const&&(d+=u===a.const?1:-1),d}return o},0):At(n.type)&&n.type===Jn(r)&&(s+=1)),s}function Zn(t,e,n,r,i=-1,s,o){const a=r.map(h=>on(h,e,[])),l=Ll(n,r,s);if(Ul(l))return l;const u=a.reduce((h,g,m)=>(As(t,n,[a0,g],e,s)===1&&h.push(m),h),[]);if(u.length===1)return u[0];u.length||dl(a.length,h=>u.push(h));const d=new Set,{bestIndex:c}=u.reduce((h,g)=>{const{bestScore:m}=h,p=a[g],y=Bi(t,e,p,n,o);return d.add(y),y>m?{bestIndex:g,bestScore:y}:h},{bestIndex:i,bestScore:0});return d.size===1&&i>=0?i:c}function _s(t){return Array.isArray(t.items)&&t.items.length>0&&t.items.every(e=>K(e))}function dn(t){return t==null}function Xn(t,e,n=!1,r=!1,i=!1){if(Array.isArray(e)){const s=Array.isArray(t)?t:[],o=i?s:e,a=i?e:s,l=o.map((u,d)=>a[d]!==void 0?Xn(s[d],e[d],n,r,i):u);return(n||i)&&l.length<a.length&&l.push(...a.slice(l.length)),l}if(K(e)){const s=Object.assign({},t);return Object.keys(e).reduce((o,a)=>{var l;const u=$(e,a),d=K(t)&&a in t,c=a in e,h=(l=$(t,a))!==null&&l!==void 0?l:{},g=d&&Object.entries(h).some(([,y])=>K(y)),m=d&&K($(t,a)),p=c&&K(u);return m&&p&&!g?(o[a]={...$(t,a),...u},o):(o[a]=Xn($(t,a),u,n,r,i&&(d||!c)),o)},s)}return r&&(t!==void 0&&dn(e)||typeof e=="number"&&isNaN(e))||i&&!dn(e)?t:e}function Mt(t,e,n=!1){return Object.keys(e).reduce((r,i)=>{const s=t?t[i]:{},o=e[i];if(t&&i in t&&K(o))r[i]=Mt(s,o,n);else if(n&&Array.isArray(s)&&Array.isArray(o)){let a=o;n==="preventDuplicates"&&(a=o.reduce((l,u)=>(s.includes(u)||l.push(u),l),[])),r[i]=s.concat(a)}else r[i]=o;return r},Object.assign({},t))}function Gl(t){return Array.isArray(t.enum)&&t.enum.length===1||ke in t}function Ts(t,e,n={},r){const i=Ee(t,e,n,void 0,r),s=i.oneOf||i.anyOf;return Array.isArray(i.enum)?!0:Array.isArray(s)?s.every(o=>typeof o!="boolean"&&Gl(o)):!1}function Is(t,e,n,r){return!e.uniqueItems||!e.items||typeof e.items=="boolean"?!1:Ts(t,e.items,n,r)}function Yl(t){const e=t[ke],n=qe(t);return K(e)&&At(e?.$data)&&n!=="object"&&n!=="array"}function l0(t){if(Jf in t&&Array.isArray(t.enum)&&t.enum.length===1)return t.enum[0];if(ke in t)return t.const;throw new Error("schema cannot be inferred as a constant")}function c0(t,e){const n=new Map(t.map(s=>[String(s.value),s])),r=new Set(e.filter(s=>s!=="*").map(String)),i=t.filter(s=>!r.has(String(s.value)));return e.flatMap(s=>{if(s==="*")return i;const o=n.get(String(s));return o?[o]:[]})}function fn(t,e){if(t.enum){let s,o;if(e){const{enumNames:l,enumOrder:u}=L(e);s=l,o=u}let a=t.enum.map((l,u)=>({label:Array.isArray(s)?s[u]||String(l):s?.[String(l)]||String(l),value:l}));return o&&(a=c0(a,o)),a}let n,r;t.anyOf?(n=t.anyOf,r=e?.anyOf):t.oneOf&&(n=t.oneOf,r=e?.oneOf);let i=Qe(t);if(e){const{optionsSchemaSelector:s=i}=L(e);i=s}return n&&n.map((s,o)=>{const{title:a}=L(r?.[o]),l=s;let u,d=a;if(i){const c=$(l,[ie,i],{});u=$(c,$r,$(c,ke)),d=d||c?.title||l.title||String(u)}else u=l0(l),d=d||l.title||String(u);return{schema:l,label:d,value:u}})}const u0=["string","number","integer","boolean","null"];var mn;(function(t){t[t.Ignore=0]="Ignore",t[t.Invert=1]="Invert",t[t.Fallback=2]="Fallback"})(mn||(mn={}));function ui(t,e=mn.Ignore,n=-1){if(n>=0){if(Array.isArray(t.items)&&n<t.items.length){const r=t.items[n];if(typeof r!="boolean")return r}}else if(t.items&&!Array.isArray(t.items)&&typeof t.items!="boolean")return t.items;return e!==mn.Ignore&&K(t.additionalItems)?t.additionalItems:{}}function Jl(t,e){const{default:n,type:r}=t;return Array.isArray(r)&&r.includes("null")&&ye(e)&&n===null?null:e}function Ho(t,e,n,r,i,s=[],o={},a=!1,l=!1){const{emptyObjectFields:u="populateAllDefaults"}=o;if(r===!0||a)t[e]=n;else if(r==="excludeObjectChildren")(l&&n!==void 0||!K(n)||!ye(n))&&(t[e]=n);else if(u!=="skipDefaults"){const d=i===void 0?s.includes(e):i;K(n)?u==="skipEmptyDefaults"?ye(n)||(t[e]=n):(!ye(n)||s.includes(e))&&(d||u!=="populateRequiredDefaults")&&(t[e]=n):n!==void 0&&(u==="populateAllDefaults"||u==="skipEmptyDefaults"||d&&s.includes(e))&&(t[e]=n)}}function wt(t,e,n={}){const{parentDefaults:r,rawFormData:i,rootSchema:s={},includeUndefinedValues:o=!1,_recurseList:a=[],experimental_defaultFormStateBehavior:l=void 0,experimental_customMergeAllOf:u=void 0,required:d,shouldMergeDefaultsIntoFormData:c=!1,initialDefaultsGenerated:h}=n;let g=K(i)?i:{};const m=K(e)?e:{};let p=r,y=null,x=l,b=a;if(m[ke]!==void 0&&l?.constAsDefaults!=="never"&&!Yl(m))p=m[ke];else if(K(p)&&K(m.default)&&!m[ee]&&!m[z]&&!m[ue])p=Mt(p,m.default);else if($r in m&&!m[ee]&&!m[z]&&!m[ue])p=m.default;else if(ue in m){const v=m[ue];a.includes(v)||(b=a.concat(v),y=Cs(v,s));const w=i===void 0||K(i)&&ye(i);y&&!p&&w&&(p=m.default),c&&y&&!K(i)&&(g=i)}else if(rs in m){const v={...Go(t,m,n,p),...g};y=ql(t,m,s,!1,[],v,u)[0]}else if(_s(m))p=m.items.map((v,w)=>wt(t,v,{rootSchema:s,includeUndefinedValues:o,_recurseList:a,experimental_defaultFormStateBehavior:l,experimental_customMergeAllOf:u,parentDefaults:Array.isArray(r)?r[w]:void 0,rawFormData:g,required:d,shouldMergeDefaultsIntoFormData:c}));else if(z in m){const{oneOf:v,...w}=m;if(v.length===0)return;const j=Qe(m),{type:E="null"}=w;!Array.isArray(E)&&u0.includes(E)&&x?.constAsDefaults==="skipOneOf"&&(x={...x,constAsDefaults:"never"}),y=v[Zn(t,s,i??m.default,v,0,j,u)],y=lt(w,y)}else if(ee in m){const{anyOf:v,...w}=m;if(v.length===0)return;const j=Qe(m);y=v[Zn(t,s,i??m.default,v,0,j,u)],y=lt(w,y)}if(y)return wt(t,y,{rootSchema:s,includeUndefinedValues:o,_recurseList:b,experimental_defaultFormStateBehavior:x,experimental_customMergeAllOf:u,parentDefaults:p,rawFormData:i??g,required:d,shouldMergeDefaultsIntoFormData:c,initialDefaultsGenerated:h});p===void 0&&(p=m.default);const O=Go(t,m,n,p);let S=O??p;if(c){const{arrayMinItems:v={}}=l||{},{mergeExtraDefaults:w}=v,j=d0(t,m,s,i,l,u);(!K(i)||Ot in m)&&(S=Xn(S,j,w,!0))}return S}function d0(t,e,n,r,i,s){const o=!Gl(e)&&Ts(t,e,n,s);let a=r;if(o){const u=fn(e);a=u?.some(c=>he(c.value,r))?r:void 0}return e[ke]&&i?.constAsDefaults==="always"&&(a=e.const),a}function f0(t,e,{rawFormData:n,rootSchema:r={},includeUndefinedValues:i=!1,_recurseList:s=[],experimental_defaultFormStateBehavior:o=void 0,experimental_customMergeAllOf:a=void 0,required:l,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:d}={},c){{const h=K(n)?n:{},g=e,p=o?.allOf==="populateDefaults"&&Ot in g||o?.emptyObjectFields!=="skipEmptyDefaults"&&is in g?Ee(t,g,r,h,a):g,y=p[ke],x=Object.keys(p.properties||{}).reduce((b,O)=>{var S;const v=$(p,[ie,O],{}),w=K(y)&&y[O]!==void 0,j=(K(v)&&ke in v||w)&&o?.constAsDefaults!=="never"&&!Yl(v),E=wt(t,v,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:$(c,[O]),rawFormData:$(h,[O]),required:(S=p.required)===null||S===void 0?void 0:S.includes(O),shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:d});return Ho(b,O,E,i,l,p.required,o,j,v?.type==="null"),b},{});if(p.additionalProperties&&!d){const b=K(p.additionalProperties)?p.additionalProperties:{},O=new Set;K(c)&&Object.keys(c).filter(v=>!p.properties||!p.properties[v]).forEach(v=>O.add(v));const S=[];Object.keys(h).filter(v=>!p.properties||!p.properties[v]).forEach(v=>{O.add(v),S.push(v)}),O.forEach(v=>{var w;const j=wt(t,b,{rootSchema:r,_recurseList:s,experimental_defaultFormStateBehavior:o,experimental_customMergeAllOf:a,includeUndefinedValues:i===!0,parentDefaults:$(c,[v]),rawFormData:$(h,[v]),required:(w=p.required)===null||w===void 0?void 0:w.includes(v),shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:d});Ho(x,v,j,i,l,S)})}return Jl(e,x)}}function m0(t,e,{rawFormData:n,rootSchema:r={},_recurseList:i=[],experimental_defaultFormStateBehavior:s=void 0,experimental_customMergeAllOf:o=void 0,required:a,requiredAsRoot:l=!1,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:d}={},c){var h,g;const m=e,p=(h=s?.arrayMinItems)!==null&&h!==void 0?h:{},{populate:y,mergeExtraDefaults:x}=p,b=y==="never",O=y==="requiredOnly",S=y==="all"||!b&&!O,v=(g=p?.computeSkipPopulate)!==null&&g!==void 0?g:(()=>!1),j=s?.emptyObjectFields==="skipEmptyDefaults"?void 0:[];if(Array.isArray(c)&&(c=c.map((T,_)=>{const I=ui(m,mn.Fallback,_),k=Array.isArray(n)?n[_]:void 0;return wt(t,I,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,parentDefaults:T,rawFormData:k,required:a,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:d})})),Array.isArray(n)){const T=ui(m);if(b)c=n;else{const _=n.map((k,F)=>wt(t,T,{rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:k,parentDefaults:$(c,[F]),required:a,shouldMergeDefaultsIntoFormData:u,initialDefaultsGenerated:d}));c=Xn(c,_,(O&&a||S)&&x)}}if((K(m)&&ke in m&&s?.constAsDefaults!=="never")===!1){if(b)return c??j;if(O&&!a)return c||void 0}let A;const C=Array.isArray(c)?c.length:0;if(!m.minItems||Is(t,m,r,o)||v(t,m,r)||m.minItems<=C)A=c||!a&&!l?c:j;else{const T=c||[],_=ui(m,mn.Invert),I=_.default,k=Array.from({length:m.minItems-C},()=>wt(t,_,{parentDefaults:I,rootSchema:r,_recurseList:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,required:a,shouldMergeDefaultsIntoFormData:u}));A=T.concat(k)}return Jl(e,A)}function Go(t,e,n={},r){switch(qe(e)){case"object":return f0(t,e,n,r);case"array":return m0(t,e,n,r)}}function Zl(t,e,n,r,i=!1,s,o,a){if(!K(e))throw new Error("Invalid schema: "+e);const l=Ee(t,e,r,n,o),u=wt(t,l,{rootSchema:r,includeUndefinedValues:i,experimental_defaultFormStateBehavior:s,experimental_customMergeAllOf:o,rawFormData:n,shouldMergeDefaultsIntoFormData:!0,initialDefaultsGenerated:a,requiredAsRoot:!0});if(l.type!=="object"&&K(l.default))return{...u,...n};if(K(n)||Array.isArray(n)){const{mergeDefaultsIntoFormData:d}=s||{};return Xn(u,n,!0,d==="useDefaultIfFormDataUndefined",!0)}return u}function Xl(t={}){return"widget"in L(t)&&L(t).widget!=="hidden"}function Ql(t,e,n={},r,i){if(n[os]==="files")return!0;if(e.items){const s=Ee(t,e.items,r,void 0,i);return s.type==="string"&&s.format==="data-url"}return!1}function h0(t,e,n={},r,i,s){const o=L(n,i),{label:a=!0}=o;let l=!!a;if(l){const u=qe(e),d=$(e,ot,!1);u==="array"&&(l=d||Is(t,e,r,s)||Ql(t,e,n,r,s)||Xl(n)),u==="object"&&(l=d),u==="boolean"&&n&&!n[os]&&(l=!1),n&&n[em]&&(l=!1)}return l}function ec(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var o=e[r],a=Lr(t,o);n(a,o)&&ys(s,yn(o,t),a)}return s}function p0(t,e){return ec(t,e,function(n,r){return yl(t,r)})}var Ns=Rl(function(t,e){return t==null?{}:p0(t,e)});function gt(t,e,n,r,i,s=[],o){if(ue in e||rs in e||Ot in e||is in e){const l=Ee(t,e,r,i,o);if(s.findIndex(d=>he(d,l))===-1)return gt(t,l,n,r,i,s.concat(l),o)}let a={[xr]:n.replace(/^\./,"")};if(z in e||ee in e){const l=z in e?e.oneOf:e.anyOf,u=Qe(e),d=Zn(t,r,i,l,0,u,o),c=l[d];a={...a,...gt(t,c,n,r,i,s,o)}}if(en in e&&e[en]!==!1){ce(a,ss,!0);const l=ne(e[en])?e[en]:{},u=$(e,ie,{});for(const d of Object.keys(i??{}))d in u||(a[d]=gt(t,l,`${n}.${d}`,r,$(i,[d]),s,o))}if(an in e&&Array.isArray(i)){const{items:l,additionalItems:u}=e;Array.isArray(l)?i.forEach((d,c)=>{l[c]?a[c]=gt(t,l[c],`${n}.${c}`,r,d,s,o):u?a[c]=gt(t,u,`${n}.${c}`,r,d,s,o):console.warn(`Unable to generate path schema for "${n}.${c}". No schema defined for it`)}):i.forEach((d,c)=>{a[c]=gt(t,l,`${n}.${c}`,r,d,s,o)})}else if(ie in e)for(const l in e.properties){const u=$(e,[ie,l],{});a[l]=gt(t,u,`${n}.${l}`,r,$(i,[l]),s,o)}return a}function tc(t,e,n="",r,i,s){return gt(t,e,n,r,i,void 0,s)}function nc(t,e){if(e.length===0&&typeof t!="object")return t;const n=Ns(t,e);return Array.isArray(t)?Object.keys(n).map(r=>n[r]):n}function rc(t,e){const n=(i,s)=>typeof i!="object"||ye(i)||s&&!ye(i),r=(i,s=[],o=[[]])=>{const a=Object.keys(i);return a.forEach(l=>{const u=i[l];if(typeof u=="object"){const d=o.map(c=>[...c,l]);u[ss]&&u[xr]!==""?s.push(u[xr]):r(u,s,d)}else l===xr&&u!==""&&o.forEach(d=>{const c=$(e,d),h=a.length===1;(n(c,h)||Array.isArray(c)&&c.every(g=>n(g,h)))&&s.push(d)})}),s};return r(t)}function g0(t,e,n={},r){const i=Ee(t,e,n,r),s=tc(t,i,"",n,r),a=rc(s,r).map(l=>Array.isArray(l)?l.join("."):l);return nc(r,a)}const Kt=Symbol("no Value");function Vi(t,e,n,r,i={},s){let o;if(Q(n,ie)){const a={};if(Q(r,ie)){const d=$(r,ie,{});Object.keys(d).forEach(c=>{Q(i,c)&&(a[c]=void 0)})}const l=Object.keys($(n,ie,{})),u={};l.forEach(d=>{const c=$(i,d);let h=$(r,[ie,d],{}),g=$(n,[ie,d],{});Q(h,ue)&&(h=Ee(t,h,e,c,s)),Q(g,ue)&&(g=Ee(t,g,e,c,s));const m=$(h,"type"),p=$(g,"type");if(!m||m===p)if(Q(a,d)&&delete a[d],p==="object"||p==="array"&&Array.isArray(c)){const y=Vi(t,e,g,h,c,s);(y!==void 0||p==="array")&&(u[d]=y)}else{const y=$(g,"default",Kt),x=$(h,"default",Kt);y!==Kt&&y!==c&&(x===c?a[d]=y:$(g,"readOnly")===!0&&(a[d]=void 0));const b=$(g,"const",Kt),O=$(h,"const",Kt);b!==Kt&&b!==c&&(a[d]=O===c?b:void 0)}}),o={...typeof i=="string"||Array.isArray(i)?void 0:i,...a,...u}}else if($(r,"type")==="array"&&$(n,"type")==="array"&&Array.isArray(i)){let a=$(r,"items"),l=$(n,"items");if(typeof a=="object"&&typeof l=="object"&&!Array.isArray(a)&&!Array.isArray(l)){Q(a,ue)&&(a=Ee(t,a,e,i,s)),Q(l,ue)&&(l=Ee(t,l,e,i,s));const u=$(a,"type"),d=$(l,"type");if(!u||u===d){const c=$(n,"maxItems",-1);d==="object"?o=i.reduce((h,g)=>{const m=Vi(t,e,l,a,g,s);return m!==void 0&&(c<0||h.length<c)&&h.push(m),h},[]):o=c>0&&i.length>c?i.slice(0,c):i}}else typeof a=="boolean"&&typeof l=="boolean"&&a===l&&(o=i)}return o}class y0{constructor(e,n,r,i){n&&n[Fn]===vr?this.rootSchema=Li(n,$(n,de,"#")):this.rootSchema=n,this.validator=e,this.experimental_defaultFormStateBehavior=r,this.experimental_customMergeAllOf=i}getRootSchema(){return this.rootSchema}getValidator(){return this.validator}doesSchemaUtilsDiffer(e,n,r={},i){return!e||!n?!1:this.validator!==e||!he(this.rootSchema,n)||!he(this.experimental_defaultFormStateBehavior,r)||this.experimental_customMergeAllOf!==i}findFieldInSchema(e,n,r){return n0(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}findSelectedOptionInXxxOf(e,n,r,i){return $n(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getDefaultFormState(e,n,r=!1,i){return Zl(this.validator,e,n,this.rootSchema,r,this.experimental_defaultFormStateBehavior,this.experimental_customMergeAllOf,i)}getDisplayLabel(e,n,r){return h0(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}getClosestMatchingOption(e,n,r,i){return Zn(this.validator,this.rootSchema,e,n,r,i,this.experimental_customMergeAllOf)}getFirstMatchingOption(e,n,r){return As(this.validator,e,n,this.rootSchema,r)}getFromSchema(e,n,r){return jr(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}isFilesArray(e,n){return Ql(this.validator,e,n,this.rootSchema,this.experimental_customMergeAllOf)}isMultiSelect(e){return Is(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}isSelect(e){return Ts(this.validator,e,this.rootSchema,this.experimental_customMergeAllOf)}omitExtraData(e,n){return g0(this.validator,e,this.rootSchema,n)}retrieveSchema(e,n,r){return Ee(this.validator,e,this.rootSchema,n,this.experimental_customMergeAllOf,r)}sanitizeDataForNewSchema(e,n,r){return Vi(this.validator,this.rootSchema,e,n,r,this.experimental_customMergeAllOf)}toPathSchema(e,n,r){return tc(this.validator,e,n,this.rootSchema,r,this.experimental_customMergeAllOf)}}function b0(t,e,n={},r){return new y0(t,e,n,r)}function x0(t){var e;if(t.indexOf("data:")===-1)throw new Error("File is invalid: URI must be a dataURI");const r=t.slice(5).split(";base64,");if(r.length!==2)throw new Error("File is invalid: dataURI must be base64");const[i,s]=r,[o,...a]=i.split(";"),l=o||"",u=decodeURI(((e=a.map(d=>d.split("=")).find(([d])=>d==="name"))===null||e===void 0?void 0:e[1])||"unknown");try{const d=atob(s),c=new Array(d.length);for(let g=0;g<d.length;g++)c[g]=d.charCodeAt(g);return{blob:new window.Blob([new Uint8Array(c)],{type:l}),name:u}}catch(d){throw new Error("File is invalid: "+d.message)}}function yt(t,e){let n=String(t);for(;n.length<e;)n="0"+n;return n}function ic(t,e){if(t<=0&&e<=0)t=new Date().getFullYear()+t,e=new Date().getFullYear()+e;else if(t<0||e<0)throw new Error(`Both start (${t}) and stop (${e}) must both be <= 0 or > 0, got one of each`);if(t>e)return ic(e,t).reverse();const n=[];for(let r=t;r<=e;r++)n.push({value:r,label:yt(r,2)});return n}function Yo(t,e){if(Object.is(t,e))return!0;if(t==null||e==null||typeof t!="object"||typeof e!="object")return!1;const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const s=n[i];if(!Object.prototype.hasOwnProperty.call(e,s)||!Object.is(t[s],e[s]))return!1}return!0}function v0(t,e){let n=t;if(Array.isArray(e)){const r=n.split(/(%\d)/);e.forEach((i,s)=>{const o=r.findIndex(a=>a===`%${s+1}`);o>=0&&(r[o]=i)}),n=r.join("")}return n}function S0(t,e){return v0(t,e)}function ar(t,e){return Array.isArray(e)?e.some(n=>he(n,t)):he(e,t)}function w0(t,e=[],n=!1){const r=e.map((i,s)=>ar(i.value,t)?String(s):void 0).filter(i=>typeof i<"u");return n?r:r[0]}function sc(t,e,n,r="indexed",i){if(typeof t>"u"||n&&Array.isArray(t)&&t.length<1||!n&&t===i)return i;if(r==="realValue")return n?t.map(String):String(t);const o=w0(t,e,n);return typeof o>"u"?i:o}function qr(t,e=[],n){if(Array.isArray(t))return t.map(s=>qr(s,e)).filter(s=>s!==n);const r=t===""||t===null?-1:Number(t),i=e[r];return i?i.value:n}function Jo(t,e,n){if(t===""||!Array.isArray(e))return n;const r=e.find(s=>String(s.value)===t);if(r)return r.value;const i=Number(t);return!isNaN(i)&&i>=0&&i<e.length?e[i].value:n}function Ie(t,e,n="indexed",r){return n!=="realValue"?qr(t,e,r):Array.isArray(t)?t.map(i=>Jo(i,e,r)):Jo(t,e,r)}function lr(t,e,n="indexed"){return n!=="realValue"?String(e):dn(t)?"":String(typeof t=="object"?e:t)}function oc(t,e,n=[]){const r=qr(t,n);return Array.isArray(e)?e.filter(i=>!he(i,r)):he(r,e)?void 0:e}function ac(t,e,n=[]){const r=qr(t,n);if(!dn(r)){const i=n.findIndex(a=>r===a.value),s=n.map(({value:a})=>a);return e.slice(0,i).concat(r,e.slice(i)).sort((a,l)=>+(s.indexOf(a)>s.indexOf(l)))}return e}var j0=1,O0=4;function Fs(t){return Ln(t,j0|O0)}function E0(t,e,n,r){return r=typeof r=="function"?r:void 0,t==null?t:ys(t,e,n,r)}class lc{constructor(e){this.errorSchema={},this.resetAllErrors(e)}get ErrorSchema(){return this.errorSchema}getOrCreateErrorBlock(e){let r=Array.isArray(e)&&e.length>0||typeof e=="string"?$(this.errorSchema,e):this.errorSchema;return!r&&e&&(r={},E0(this.errorSchema,e,r,Object)),r}resetAllErrors(e){return this.errorSchema=e?Fs(e):{},this}addErrors(e,n){const r=this.getOrCreateErrorBlock(n);let i=$(r,_e);return Array.isArray(i)||(i=[],r[_e]=i),Array.isArray(e)?ce(r,_e,[...new Set([...i,...e])]):ce(r,_e,[...new Set([...i,e])]),this}setErrors(e,n){const r=this.getOrCreateErrorBlock(n),i=Array.isArray(e)?[...new Set([...e])]:[e];return ce(r,_e,i),this}clearErrors(e){const n=this.getOrCreateErrorBlock(e);return ce(n,_e,[]),this}}function C0(t,e){if(t==null)return{};var n=gn(js(t),function(r){return[r]});return e=xs(e),ec(t,n,function(r,i){return e(r,i[0])})}var A0=200;function _0(t,e,n,r){var i=-1,s=ws,o=!0,a=t.length,l=[],u=e.length;if(!a)return l;e.length>=A0&&(s=Gn,o=!1,e=new kt(e));e:for(;++i<a;){var d=t[i],c=d;if(d=d!==0?d:0,o&&c===c){for(var h=u;h--;)if(e[h]===c)continue e;l.push(d)}else s(e,c,r)||l.push(d)}return l}var T0=Vr(function(t,e){return Yn(t)?_0(t,or(e,1,Yn,!0)):[]});function Zo(t,e){const n=Et(t),r=Et(e);if(t===e||!n&&!r)return[];if(n&&!r)return Ve(t);if(!n&&r)return Ve(e);{const i=Ve(C0(t,(o,a)=>!he(o,$(e,a)))),s=T0(Ve(e),Ve(t));return[...i,...s]}}function I0(t,e,n=[1900,new Date().getFullYear()+2],r="YMD"){const{day:i,month:s,year:o,hour:a,minute:l,second:u}=t,d={type:"day",range:[1,31],value:i},c={type:"month",range:[1,12],value:s},h={type:"year",range:n,value:o},g=[];switch(r){case"MDY":g.push(c,d,h);break;case"DMY":g.push(d,c,h);break;default:g.push(h,c,d)}return e&&g.push({type:"hour",range:[0,23],value:a},{type:"minute",range:[0,59],value:l},{type:"second",range:[0,59],value:u}),g}function cc(t){const e={};return t.multipleOf&&(e.step=t.multipleOf),(t.minimum||t.minimum===0)&&(e.min=t.minimum),(t.maximum||t.maximum===0)&&(e.max=t.maximum),e}function uc(t,e,n={},r=!0){const i={type:e||"text",...cc(t)};return n.inputType?i.type=n.inputType:e||(t.type==="number"?(i.type="number",r&&i.step===void 0&&(i.step="any")):t.type==="integer"&&(i.type="number",i.step===void 0&&(i.step=1))),["date","datetime-local","time","week","month"].includes(i.type)&&(t.formatMinimum!==void 0&&(i.min=t.formatMinimum),t.formatMaximum!==void 0&&(i.max=t.formatMaximum)),n.autocomplete&&(i.autoComplete=n.autocomplete),n.accept&&(i.accept=n.accept),i}function xn(t){var e;return(e=t?.optionValueFormat)!==null&&e!==void 0?e:"indexed"}const Xo={props:{disabled:!1},submitText:"Submit",norender:!1};function dc(t={}){const e=L(t);if(e&&e[_r]){const n=e[_r];return{...Xo,...n}}return Xo}function W(t,e,n={}){const{templates:r}=e;if(t==="ButtonTemplates")return r[t];if(Object.hasOwn(n,t)&&typeof n[t]=="string"&&Object.hasOwn(r,n[t])){const i=n[t];return r[i]}return n[t]||r[t]}var N0=0;function fc(t){var e=++N0;return hs(t)+e}function Ps(){if(typeof process>"u"||$(process,"env.NODE_ENV")!=="test")return{};const t=new Map;return new Proxy({},{get(e,n){return t.has(n)||t.set(n,fc("test-id-")),t.get(n)}})}const di={boolean:{checkbox:"CheckboxWidget",radio:"RadioWidget",select:"SelectWidget",hidden:"HiddenWidget"},string:{text:"TextWidget",password:"PasswordWidget",email:"EmailWidget",hostname:"TextWidget",ipv4:"TextWidget",ipv6:"TextWidget",uri:"URLWidget","data-url":"FileWidget",radio:"RadioWidget",select:"SelectWidget",textarea:"TextareaWidget",hidden:"HiddenWidget",date:"DateWidget",datetime:"DateTimeWidget","date-time":"DateTimeWidget","alt-date":"AltDateWidget","alt-datetime":"AltDateTimeWidget",time:"TimeWidget",color:"ColorWidget",file:"FileWidget"},number:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},integer:{text:"TextWidget",select:"SelectWidget",updown:"UpDownWidget",range:"RangeWidget",radio:"RadioWidget",hidden:"HiddenWidget"},array:{select:"SelectWidget",checkboxes:"CheckboxesWidget",files:"FileWidget",hidden:"HiddenWidget"}};function F0(t){let e=$(t,"MergedWidget");if(!e){const n=t.defaultProps&&t.defaultProps.options||{};e=({options:r,...i})=>f.jsx(t,{options:{...n,...r},...i}),ce(t,"MergedWidget",e)}return e}function et(t,e,n={}){const r=qe(t);if(typeof e=="function"||e&&Zs.isForwardRef(N.createElement(e))||Zs.isMemo(e))return F0(e);if(typeof e!="string")throw new Error(`Unsupported widget definition: ${typeof e} in schema: ${JSON.stringify(t)}`);if(e in n){const i=n[e];return et(t,i,n)}if(typeof r=="string"){if(!(r in di))throw new Error(`No widget for type '${r}' in schema: ${JSON.stringify(t)}`);if(e in di[r]){const i=n[di[r][e]];return et(t,i,n)}}throw new Error(`No widget '${e}' for type '${r}' in schema: ${JSON.stringify(t)}`)}function P0(t){let e=0;for(let n=0;n<t.length;n+=1){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return e.toString(16)}function $0(t){const e=new Set;return JSON.stringify(t,(n,r)=>(e.add(n),r)),JSON.stringify(t,Array.from(e).sort())}function Je(t){return P0($0(t))}function D0(t){return Je(t)}function k0(t,e,n={}){try{return et(t,e,n),!0}catch(r){const i=r;if(i.message&&(i.message.startsWith("No widget")||i.message.startsWith("Unsupported widget")))return!1;throw r}}function Wt(t,e){return`${At(t)?t:t[de]}__${e}`}function qt(t){return Wt(t,"description")}function $s(t){return Wt(t,"error")}function zr(t){return Wt(t,"examples")}function Ds(t){return Wt(t,"help")}function Kr(t){return Wt(t,"title")}function Fe(t,e=!1){const n=e?` ${zr(t)}`:"";return`${$s(t)} ${qt(t)} ${Ds(t)}${n}`}function Pt(t,e){return`${t}-${e}`}function Ze(t,e){return Wt(t,e)}function fi(t,e){return Wt(t,`optional${e}`)}function vn(t){return!dn(t)&&(!ne(t)||Array.isArray(t)||!ye(t))}function R0(t,e){const{rootSchema:n,schemaUtils:r}=t;if(St(e,n))return!0;if(ue in n){const i=r.retrieveSchema(n);return St(e,un(i,Mn))}return!1}function mc(t,e,n){return e?n:t}function M0(t){return t?new Date(t).toJSON():void 0}function ks(t,e,n){const r=[Qf];return Q(t,io)&&r.unshift(io),$(t,[...r,e],n)}function Or(t){if(dn(t)||t==="")return!0;if(Array.isArray(t))return t.length===0;if(K(t)){const e=t;return Object.keys(e).every(r=>Or(e[r]))}return!1}function nn(t,e,n,r){if(!K(e))return r;const i=Ee(t,e,n,r);if(Array.isArray(r)){const d=i.items;if(!d)return r;let c=!1;const h=r.map((g,m)=>{let p=d;Array.isArray(d)&&(p=d[m]||i.additionalItems||{});const y=nn(t,p,n,g);return y!==g&&(c=!0),y===void 0?{}:y});return c?h:r}const{properties:s,required:o=[]}=i;if(!K(r)||!s)return r;const a={},l=r;let u=!1;for(const d of Object.keys(l)){const c=l[d],h=s[d]||{},g=o.includes(d),m=K(c),p=Array.isArray(c);if((m||p)&&s[d]){const y=nn(t,h,n,c);if(!g&&Or(y))continue;a[d]=y,u=!0}else{if(!g&&Or(c)&&s[d])continue;a[d]=c,Or(c)||(u=!0)}}if(!(!u&&Object.keys(a).length===0))return a}function U0(t,e){if(!Array.isArray(e))return t;const n=d=>d.reduce((c,h)=>(c[h]=!0,c),{}),r=d=>d.length>1?`properties '${d.join("', '")}'`:`property '${d[0]}'`,i=n(t),s=e.filter(d=>d==="*"||i[d]),o=n(s),a=t.filter(d=>!o[d]),l=s.indexOf("*");if(l===-1){if(a.length)throw new Error(`uiSchema order list does not contain ${r(a)}`);return s}if(l!==s.lastIndexOf("*"))throw new Error("uiSchema order list contains more than one wildcard item");const u=[...s];return u.splice(l,1,...a),u}function mi(t,e=!0){if(!t)return{year:-1,month:-1,day:-1,hour:e?-1:0,minute:e?-1:0,second:e?-1:0};const n=new Date(t);if(Number.isNaN(n.getTime()))throw new Error("Unable to parse date "+t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:e?n.getUTCHours():0,minute:e?n.getUTCMinutes():0,second:e?n.getUTCSeconds():0}}function L0(t,e,n){var r,i;const s=(r=t[Mn])!==null&&r!==void 0?r:t[ue],o=n.uiSchemaDefinitions,a=s&&o?o[s]:void 0;let l;if(a?!e||ye(e)?l={...a}:l=Mt(a,e):l=e||{},o){let u=t;if(s&&t[ue]&&!t[Mn])try{u=Cs(s,n.rootSchema)}catch(d){return console.warn(`could not resolve $ref in resolveUiSchema:
3
- `,d),l}for(const d of[z,ee]){const c=u[d];if(!Array.isArray(c)||c.length===0)continue;const h=l[d],g=Array.isArray(h)?[...h]:[];let m=!1;for(let p=0;p<c.length;p++){const y=c[p],x=(i=y?.[Mn])!==null&&i!==void 0?i:y?.[ue];if(x&&x in o){const b=g[p]||{};g[p]=Mt(o[x],b),m=!0}}m&&(l[d]=g)}}return l}function Bn(t){if(t.const||t.enum&&t.enum.length===1&&t.enum[0]===!0)return!0;if(t.anyOf&&t.anyOf.length===1)return Bn(t.anyOf[0]);if(t.oneOf&&t.oneOf.length===1)return Bn(t.oneOf[0]);if(t.allOf){const e=n=>Bn(n);return t.allOf.some(e)}return!1}function hc(t,e,n,r="customDeep"){if(r==="always")return!0;if(r==="shallow"){const{props:o,state:a}=t;return!Yo(o,e)||!Yo(a,n)}const{props:i,state:s}=t;return!he(i,e)||!he(s,n)}function Qo(t){const e=Al(t.map(n=>ne(n)?qe(n):void 0).flat().filter(n=>n!==void 0));return e.length===1?e[0]:e}function cr(t,e,n,r){const{enableOptionalDataFieldForType:i=[]}=L(r,t.globalUiOptions);let s;return ee in e&&Array.isArray(e[ee])?s=Qo(e[ee]):z in e&&Array.isArray(e[z])?s=Qo(e[z]):s=qe(e),!R0(t,e)&&!n&&!!s&&!Array.isArray(s)&&!!i.find(o=>o===s)}function ea(t,e=!0){const{year:n,month:r,day:i,hour:s=0,minute:o=0,second:a=0}=t,l=Date.UTC(n,r-1,i,s,o,a),u=new Date(l).toJSON();return e?u:u.slice(0,10)}function Rs(t,e=[]){if(!t)return[];let n=[];return _e in t&&(n=n.concat(t[_e].map(r=>{const i=`.${e.join(".")}`;return{property:i,message:r,stack:`${i} ${r}`}}))),Object.keys(t).reduce((r,i)=>{if(i!==_e){const s=t[i];Et(s)&&(r=r.concat(Rs(s,[...e,i])))}return r},n)}function pc(t){return je(t)?gn(t,Ct):ir(t)?[t]:Ss(ol(hs(t)))}function B0(t){const e=new lc;return t.length&&t.forEach(n=>{const{property:r,message:i}=n,s=r==="."?[]:pc(r);s.length>0&&s[0]===""&&s.splice(0,1),i&&e.addErrors(i,s)}),e.ErrorSchema}function Ue(t,e,n,r){const i=Array.isArray(n)?n:n?.path,s=t===""?[]:[t],o=i?i.concat(...s):s,a=[e.idPrefix,...o].join(e.idSeparator);let l;return e.nameGenerator&&o.length>0&&(l=e.nameGenerator(o,e.idPrefix,r)),{path:o,[de]:a,...l!==void 0&&{name:l}}}function gc(t){return Object.keys(t).reduce((e,n)=>{if(n==="addError")return e;{const r=t[n];return Et(r)?{...e,[n]:gc(r)}:{...e,[n]:r}}},{})}function V0(t){return Object.values(t).every(e=>e!==-1)}function W0(t){const{className:e="form-control",type:n,range:r,value:i,select:s,rootId:o,name:a,disabled:l,readonly:u,autofocus:d,registry:c,onBlur:h,onFocus:g}=t,m=`${o}_${n}`,{SelectWidget:p}=c.widgets,y=N.useCallback(x=>s(n,x),[s,n]);return f.jsx(p,{schema:{type:"integer"},id:m,name:a,className:e,options:{enumOptions:ic(r[0],r[1])},placeholder:n,value:i,disabled:l,readonly:u,autofocus:d,onChange:y,onBlur:h,onFocus:g,registry:c,label:"","aria-describedby":Fe(o)})}function q0(t){const{time:e=!1,disabled:n=!1,readonly:r=!1,options:i,onChange:s,value:o}=t,[a,l]=N.useState(mi(o,e));N.useEffect(()=>{l(mi(o,e))},[e,o]);const u=N.useCallback((g,m)=>{const p={...a,[g]:typeof m>"u"?-1:m};V0(p)?s(ea(p,e)):l(p)},[a,s,e]),d=N.useCallback(g=>{g.preventDefault(),!(n||r)&&s(void 0)},[n,r,s]),c=N.useCallback(g=>{if(g.preventDefault(),n||r)return;const m=mi(new Date().toJSON(),e);s(ea(m,e))},[n,r,e,s]);return{elements:N.useMemo(()=>I0(a,e,i.yearsRange,i.format),[a,e,i.yearsRange,i.format]),handleChange:u,handleClear:d,handleSetNow:c}}function zt(t){const e=N.useRef(t);return St(t,e.current)||(e.current=t),e.current}function z0(t,e){return t.replace(";base64",`;name=${encodeURIComponent(e)};base64`)}function K0(t){const{name:e,size:n,type:r}=t;return new Promise((i,s)=>{const o=new window.FileReader;o.onerror=s,o.onload=a=>{var l;typeof((l=a.target)===null||l===void 0?void 0:l.result)=="string"?i({dataURL:z0(a.target.result,e),name:e,size:n,type:r}):i({dataURL:null,name:e,size:n,type:r})},o.readAsDataURL(t)})}function H0(t){return Promise.all(Array.from(t).map(K0))}function ta(t){return t.reduce((e,n)=>{if(!n)return e;try{const{blob:r,name:i}=x0(n);return[...e,{dataURL:n,name:i,size:r.size,type:r.type}]}catch{return e}},[])}function G0(t,e,n=!1){const r=N.useMemo(()=>n&&t?Array.isArray(t)?t:[t]:[],[t,n]),i=N.useMemo(()=>Array.isArray(t)?ta(t):ta([t||""]),[t]),s=N.useCallback(a=>{H0(a).then(l=>{const u=l.map(d=>d.dataURL||null);e(n?r.concat(...u):u[0])})},[r,n,e]),o=N.useCallback(a=>{if(n){const l=r.filter((u,d)=>d!==a);e(l)}else e(void 0)},[r,n,e]);return{filesInfo:i,handleChange:s,handleRemove:o}}function Y0(t){if(!t)return"";const e=new Date(t),n=yt(e.getFullYear(),4),r=yt(e.getMonth()+1,2),i=yt(e.getDate(),2),s=yt(e.getHours(),2),o=yt(e.getMinutes(),2),a=yt(e.getSeconds(),2),l=yt(e.getMilliseconds(),3);return`${n}-${r}-${i}T${s}:${o}:${a}.${l}`}function Dn(t,e,n=!1){if(!e)return t;const{errors:r,errorSchema:i}=t;let s=Rs(e),o=e;return ye(i)||(o=Mt(i,e,n?"preventDuplicates":!0),s=[...r].concat(s)),{errorSchema:o,errors:s}}function J0(t){for(const e in t){const n=t,r=n[e];e===ue&&typeof r=="string"&&r.startsWith("#")?n[e]=za+r:n[e]=Ms(r)}return t}function Z0(t){for(let e=0;e<t.length;e++)t[e]=Ms(t[e]);return t}function Ms(t){return Array.isArray(t)?Z0([...t]):ne(t)?J0({...t}):t}var Y;(function(t){t.ArrayItemTitle="Item",t.MissingItems="Missing items definition",t.EmptyArray="No items yet. Use the button below to add some.",t.YesLabel="Yes",t.NoLabel="No",t.CloseLabel="Close",t.ErrorsLabel="Errors",t.NewStringDefault="New Value",t.AddButton="Add",t.AddItemButton="Add Item",t.CopyButton="Copy",t.MoveDownButton="Move down",t.MoveUpButton="Move up",t.RemoveButton="Remove",t.NowLabel="Now",t.ClearLabel="Clear",t.AriaDateLabel="Select a date",t.PreviewLabel="Preview",t.DecrementAriaLabel="Decrease value by 1",t.IncrementAriaLabel="Increase value by 1",t.OptionalObjectAdd="Add data for optional field",t.OptionalObjectRemove="Remove data for optional field",t.OptionalObjectEmptyMsg="No data for optional field",t.Type="Type",t.Value="Value",t.ClearButton="clear input",t.UnknownFieldType="Unknown field type %1",t.OptionPrefix="Option %1",t.TitleOptionPrefix="%1 option %2",t.KeyLabel="%1 Key",t.InvalidObjectField='Invalid "%1" object field configuration: _%2_.',t.UnsupportedField="Unsupported field schema.",t.UnsupportedFieldWithId="Unsupported field schema for field `%1`.",t.UnsupportedFieldWithReason="Unsupported field schema: _%1_.",t.UnsupportedFieldWithIdAndReason="Unsupported field schema for field `%1`: _%2_.",t.FilesInfo="**%1** (%2, %3 bytes)"})(Y||(Y={}));function X0(t,e){var n=je(t)?bs:Hl;return n(t,cl(e))}function Q0(t,e){return t==null?!0:kl(t,e)}function Wi(){return fc("rjsf-array-item-")}function na(t){return Array.isArray(t)?t.map(e=>({key:Wi(),item:e})):[]}function yc(t){return Array.isArray(t)?t.map(e=>e.item):[]}function ex(t){return Array.isArray(t.type)?!t.type.includes("null"):t.type!=="null"}function bc(t,e,n,r){let{addable:i}=L(r,t.globalUiOptions);return i!==!1&&(e.maxItems!==void 0?i=n.length<e.maxItems:i=!0),i}function xc(t,e,n,r){if(typeof t.items=="function")try{return t.items(e,n,r)}catch(i){console.error(`Error executing dynamic uiSchema.items function for item at index ${n}:`,i);return}else return t.items}function tx(t,e){const{schemaUtils:n,globalFormOptions:r}=t;let i=e.items;return r.useFallbackUiForUnsupportedType&&!i?i={}:_s(e)&&Yf(e)&&(i=e.additionalItems),n.getDefaultFormState(i)}function nx(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i=[],disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,placeholder:u,onBlur:d,onFocus:c,registry:h,rawErrors:g,name:m,onSelectChange:p}=t,{widgets:y,schemaUtils:x,globalFormOptions:b,globalUiOptions:O}=h,S=x.retrieveSchema(e.items,i),v=r?.items??r,w=fn(S,v),{widget:j="select",title:E,...A}=L(r,O),C=et(e,j,y),T=E??e.title??m,_=x.getDisplayLabel(e,r,O),I=zt(Ue("",b,n,!0));return f.jsx(C,{id:I[de],name:m,multiple:!0,onChange:p,onBlur:d,onFocus:c,options:{...A,enumOptions:w},schema:e,uiSchema:r,registry:h,value:i,disabled:s,readonly:o,required:l,label:T,hideLabel:!_,placeholder:u,autofocus:a,rawErrors:g,htmlName:I.name})}function rx(t){const{schema:e,fieldPathId:n,uiSchema:r,disabled:i=!1,readonly:s=!1,autofocus:o=!1,required:a=!1,hideError:l,placeholder:u,onBlur:d,onFocus:c,formData:h=[],registry:g,rawErrors:m,name:p,onSelectChange:y}=t,{widgets:x,schemaUtils:b,globalFormOptions:O,globalUiOptions:S}=g,{widget:v,title:w,...j}=L(r,S),E=et(e,v,x),A=w??e.title??p,C=b.getDisplayLabel(e,r,S),T=zt(Ue("",O,n,!0));return f.jsx(E,{id:T[de],name:p,multiple:!0,onChange:y,onBlur:d,onFocus:c,options:j,schema:e,uiSchema:r,registry:g,value:h,disabled:i,readonly:s,hideError:l,required:a,label:A,hideLabel:!C,placeholder:u,autofocus:o,rawErrors:m,htmlName:T.name})}function ix(t){const{schema:e,uiSchema:n,fieldPathId:r,name:i,disabled:s=!1,readonly:o=!1,autofocus:a=!1,required:l=!1,onBlur:u,onFocus:d,registry:c,formData:h=[],rawErrors:g,onSelectChange:m}=t,{widgets:p,schemaUtils:y,globalFormOptions:x,globalUiOptions:b}=c,{widget:O="files",title:S,...v}=L(n,b),w=et(e,O,p),j=S??e.title??i,E=y.getDisplayLabel(e,n,b),A=zt(Ue("",x,r,!0));return f.jsx(w,{options:v,id:A[de],name:i,multiple:!0,onChange:m,onBlur:u,onFocus:d,schema:e,uiSchema:n,value:h,disabled:s,readonly:o,required:l,registry:c,autofocus:a,rawErrors:g,label:j,hideLabel:!E,htmlName:A.name})}function vc(t){const{itemKey:e,index:n,name:r,disabled:i,hideError:s,readonly:o,registry:a,uiOptions:l,parentUiSchema:u,canAdd:d,canRemove:c=!0,canMoveUp:h,canMoveDown:g,itemSchema:m,itemData:p,itemUiSchema:y,itemFieldPathId:x,itemErrorSchema:b,autofocus:O,onBlur:S,onFocus:v,onChange:w,rawErrors:j,totalItems:E,title:A,handleAddItem:C,handleCopyItem:T,handleRemoveItem:_,handleReorderItems:I}=t,{schemaUtils:k,fields:{ArraySchemaField:F,SchemaField:D},globalUiOptions:R}=a,B=zt(x),V=F||D,Z=W("ArrayFieldItemTemplate",a,l),ae=k.getDisplayLabel(m,y,R),{description:fe}=L(y),be=!!fe||!!m.description,{orderable:M=!0,removable:le=!0,copyable:te=!1}=l,H={moveUp:M&&h,moveDown:M&&g,copy:te&&d,remove:le&&c,toolbar:!1};H.toolbar=Object.keys(H).some(Se=>H[Se]);const G=N.useCallback(Se=>{C(Se,n+1)},[C,n]),q=N.useCallback(Se=>{T(Se,n)},[T,n]),re=N.useCallback(Se=>{_(Se,n)},[_,n]),se=N.useCallback(Se=>{I(Se,n,n-1)},[I,n]),Ce=N.useCallback(Se=>{I(Se,n,n+1)},[I,n]),Ae={children:f.jsx(V,{name:r,title:A,index:n,schema:m,uiSchema:y,formData:p,errorSchema:b,fieldPathId:B,required:ex(m),onChange:w,onBlur:S,onFocus:v,registry:a,disabled:i,readonly:o,hideError:s,autofocus:O,rawErrors:j}),buttonsProps:{fieldPathId:B,disabled:i,readonly:o,canAdd:d,hasCopy:H.copy,hasMoveUp:H.moveUp,hasMoveDown:H.moveDown,hasRemove:H.remove,index:n,totalItems:E,onAddItem:G,onCopyItem:q,onRemoveItem:re,onMoveUpItem:se,onMoveDownItem:Ce,registry:a,schema:m,uiSchema:y},itemKey:e,className:"rjsf-array-item",disabled:i,hasToolbar:H.toolbar,index:n,totalItems:E,readonly:o,registry:a,schema:m,uiSchema:y,parentUiSchema:u,displayLabel:ae,hasDescription:be};return f.jsx(Z,{...Ae})}function sx(t){const{schema:e,uiSchema:n={},errorSchema:r,fieldPathId:i,formData:s,name:o,title:a,disabled:l=!1,readonly:u=!1,autofocus:d=!1,required:c=!1,hideError:h=!1,registry:g,onBlur:m,onFocus:p,rawErrors:y,onChange:x,keyedFormData:b,handleAddItem:O,handleCopyItem:S,handleRemoveItem:v,handleReorderItems:w}=t,j=e.title||a||o,{schemaUtils:E,fields:A,formContext:C,globalFormOptions:T,globalUiOptions:_}=g,{OptionalDataControlsField:I}=A,k=L(n,_),F=ne(e.items)?e.items:{},D=E.retrieveSchema(F),R=yc(b),B=cr(g,e,c,n),V=vn(s),Z=bc(g,e,R,n)&&(!B||V),ae=V?b:[],fe=B?" rjsf-optional-array-field":"",be=t.childFieldPathId??i,M=B?f.jsx(I,{...t,fieldPathId:be}):void 0,le={canAdd:Z,items:ae.map((H,G)=>{const{key:q,item:re}=H,se=re,Ce=E.retrieveSchema(F,se),Ae=r?r[G]:void 0,Se=Ue(G,T,be),Pe=xc(n,re,G,C),mt={itemKey:q,index:G,name:o&&`${o}-${G}`,registry:g,uiOptions:k,parentUiSchema:n,hideError:h,readonly:u,disabled:l,required:c,title:j?`${j}-${G+1}`:void 0,canAdd:Z,canMoveUp:G>0,canMoveDown:G<R.length-1,itemSchema:Ce,itemFieldPathId:Se,itemErrorSchema:Ae,itemData:se,itemUiSchema:Pe,autofocus:d&&G===0,onBlur:m,onFocus:p,rawErrors:y,totalItems:b.length,handleAddItem:O,handleCopyItem:S,handleRemoveItem:v,handleReorderItems:w,onChange:x};return f.jsx(vc,{...mt},q)}),className:`rjsf-field rjsf-field-array rjsf-field-array-of-${D.type}${fe}`,disabled:l,fieldPathId:i,uiSchema:n,onAddClick:O,readonly:u,required:c,schema:e,title:j,formData:R,rawErrors:y,registry:g,optionalDataControl:M},te=W("ArrayFieldTemplate",g,k);return f.jsx(te,{...le})}function ox(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,title:a,disabled:l=!1,readonly:u=!1,autofocus:d=!1,required:c=!1,hideError:h=!1,registry:g,onBlur:m,onFocus:p,rawErrors:y,keyedFormData:x,onChange:b,handleAddItem:O,handleCopyItem:S,handleRemoveItem:v,handleReorderItems:w}=t;let{formData:j=[]}=t;const E=e.title||a||o,{schemaUtils:A,fields:C,formContext:T,globalFormOptions:_,globalUiOptions:I}=g,k=L(n,I),{OptionalDataControlsField:F}=C,D=cr(g,e,c,n),R=vn(r),V=(ne(e.items)?e.items:[]).map((G,q)=>A.retrieveSchema(G,j[q])),Z=ne(e.additionalItems)?A.retrieveSchema(e.additionalItems,r):null,ae=t.childFieldPathId??s;j.length<V.length&&(j=j.concat(new Array(V.length-j.length)));const fe=R?x:[],be=D?" rjsf-optional-array-field":"",M=D?f.jsx(F,{...t,fieldPathId:ae}):void 0,le=bc(g,e,j,n)&&!!Z&&(!D||R),te={canAdd:le,className:`rjsf-field rjsf-field-array rjsf-field-array-fixed-items${be}`,disabled:l,fieldPathId:s,formData:r,items:fe.map((G,q)=>{const{key:re,item:se}=G,Ce=se,Ae=q>=V.length,Se=(Ae&&ne(e.additionalItems)?A.retrieveSchema(e.additionalItems,Ce):V[q])||{},Pe=Ue(q,_,ae);let mt;Ae?mt=n.additionalItems:Array.isArray(n.items)?mt=n.items[q]:mt=xc(n,se,q,T);const jn=i?i[q]:void 0,On={index:q,itemKey:re,name:o&&`${o}-${q}`,registry:g,uiOptions:k,parentUiSchema:n,hideError:h,readonly:u,disabled:l,required:c,title:E?`${E}-${q+1}`:void 0,canAdd:le,canRemove:Ae,canMoveUp:q>=V.length+1,canMoveDown:Ae&&q<j.length-1,itemSchema:Se,itemData:Ce,itemUiSchema:mt,itemFieldPathId:Pe,itemErrorSchema:jn,autofocus:d&&q===0,onBlur:m,onFocus:p,rawErrors:y,totalItems:x.length,onChange:b,handleAddItem:O,handleCopyItem:S,handleRemoveItem:v,handleReorderItems:w};return f.jsx(vc,{...On},re)}),onAddClick:O,readonly:u,required:c,registry:g,schema:e,uiSchema:n,title:E,errorSchema:i,rawErrors:y,optionalDataControl:M},H=W("ArrayFieldTemplate",g,k);return f.jsx(H,{...te})}function ax(t=[]){const e=N.useMemo(()=>Je(t),[t]),[n,r]=N.useState(()=>({formDataHash:e,keyedFormData:na(t)}));let{keyedFormData:i,formDataHash:s}=n;if(e!==s){const a=Array.isArray(t)?t:[],l=i||[];i=a.length===l.length?l.map((u,d)=>({key:u.key,item:a[d]})):na(a),s=e,r({formDataHash:s,keyedFormData:i})}const o=N.useCallback(a=>{const l=yc(a),u=Je(l);return r({formDataHash:u,keyedFormData:a}),l},[]);return{keyedFormData:i,updateKeyedFormData:o}}function lx(t){const{schema:e,uiSchema:n,errorSchema:r,fieldPathId:i,registry:s,formData:o,onChange:a}=t,{globalFormOptions:l,schemaUtils:u,translateString:d}=s,{keyedFormData:c,updateKeyedFormData:h}=ax(o),g=t.childFieldPathId??i,m=N.useCallback((w,j)=>{w&&w.preventDefault();let E;if(r){E={};for(const T in r){const _=parseInt(T);j===void 0||_<j?ce(E,[_],r[T]):_>=j&&ce(E,[_+1],r[T])}}const A={key:Wi(),item:tx(s,e)},C=[...c];j!==void 0?C.splice(j,0,A):C.push(A),a(h(C),g.path,E)},[c,s,e,a,h,r,g]),p=N.useCallback((w,j)=>{w&&w.preventDefault();let E;if(r){E={};for(const T in r){const _=parseInt(T);_<=j?ce(E,[_],r[T]):_>j&&ce(E,[_+1],r[T])}}const A={key:Wi(),item:Fs(c[j].item)},C=[...c];j!==void 0?C.splice(j+1,0,A):C.push(A),a(h(C),g.path,E)},[c,a,h,r,g]),y=N.useCallback((w,j)=>{w&&w.preventDefault();let E;if(r){E={};for(const C in r){const T=parseInt(C);T<j?ce(E,[T],r[C]):T>j&&ce(E,[T-1],r[C])}}const A=c.filter((C,T)=>T!==j);a(h(A),g.path,E)},[c,a,h,r,g]),x=N.useCallback((w,j,E)=>{w&&(w.preventDefault(),w.currentTarget.blur());let A;if(r){A={};for(const _ in r){const I=parseInt(_);I==j?ce(A,[E],r[j]):I==E?ce(A,[j],r[E]):ce(A,[_],r[I])}}function C(){const _=c.slice();return _.splice(j,1),_.splice(E,0,c[j]),_}const T=C();a(h(T),g.path,A)},[c,a,h,r,g]),b=N.useCallback((w,j,E,A)=>{a(w===void 0?null:w,j,E,A)},[a]),O=N.useCallback(w=>{a(w,g.path,void 0,g?.[de])},[a,g]),S={...t,formData:o,fieldPathId:g,onSelectChange:O},v={...t,handleAddItem:m,handleCopyItem:p,handleRemoveItem:y,handleReorderItems:x,keyedFormData:c,onChange:b};if(!(an in e)){if(!l.useFallbackUiForUnsupportedType){const j=L(n),E=W("UnsupportedFieldTemplate",s,j);return f.jsx(E,{schema:e,fieldPathId:i,reason:d(Y.MissingItems),registry:s})}const w={...e,[an]:{type:void 0}};S.schema=w,v.schema=w}return u.isMultiSelect(S.schema)?f.jsx(nx,{...S}):Xl(n)?f.jsx(rx,{...S}):_s(S.schema)?f.jsx(ox,{...v}):u.isFilesArray(S.schema,n)?f.jsx(ix,{...S}):f.jsx(sx,{...v})}function cx(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,registry:o,required:a,disabled:l,readonly:u,hideError:d,autofocus:c,title:h,onChange:g,onFocus:m,onBlur:p,rawErrors:y}=t,{title:x}=e,{widgets:b,translateString:O,globalUiOptions:S}=o,{widget:v="checkbox",title:w,label:j=!0,enumNames:E,...A}=L(r,S),C=et(e,v,b),T=O(Y.YesLabel),_=O(Y.NoLabel);let I;const k=w??x??h??n;if(Array.isArray(e.oneOf))I=fn({oneOf:e.oneOf.map(D=>{if(ne(D))return{...D,title:D.title||(D.const===!0?T:_)}}).filter(D=>D)},r);else{const D=e.enum??[!0,!1];!E&&D.length===2&&D.every(R=>typeof R=="boolean")?I=[{value:D[0],label:D[0]?T:_},{value:D[1],label:D[1]?T:_}]:I=fn({enum:D},r)}const F=N.useCallback((D,R,B)=>g(D,i.path,R,B),[g,i]);return f.jsx(C,{options:{...A,enumOptions:I},schema:e,uiSchema:r,id:i.$id,name:n,onChange:F,onFocus:m,onBlur:p,label:k,hideLabel:!j,value:s,required:a,disabled:l,readonly:u,hideError:d,registry:o,autofocus:c,rawErrors:y,htmlName:i.name})}function ux(t){return{type:"string",enum:["string","number","boolean","object","array"],default:"string",title:t}}function dx(t){const e=typeof t;return e==="string"||e==="number"||e==="boolean"?e:e==="object"?Array.isArray(t)?"array":"object":"string"}function fx(t,e){switch(e){case"string":return String(t);case"number":{const n=Number(t);return isNaN(n)?0:n}case"boolean":return!!t;default:return t}}function mx(t){const{id:e,formData:n,displayLabel:r=!0,schema:i,name:s,uiSchema:o,required:a,disabled:l=!1,readonly:u=!1,onBlur:d,onFocus:c,registry:h,fieldPathId:g,onChange:m,errorSchema:p}=t,{translateString:y,fields:x,globalFormOptions:b}=h,[O,S]=N.useState(dx(n)),v=L(o),w=zt(Ue("__internal_type_selector",b,g)),j=y(Y.Type),E=N.useMemo(()=>ux(j),[j]),A=_=>{_!=null&&(S(_),m(fx(n,_),g.path,p,e))};if(!b.useFallbackUiForUnsupportedType){const{reason:_=y(Y.UnknownFieldType,[String(i.type)])}=t,I=W("UnsupportedFieldTemplate",h,v);return f.jsx(I,{schema:i,fieldPathId:g,reason:_,registry:h})}const C=W("FallbackFieldTemplate",h,v),{SchemaField:T}=x;return f.jsx(C,{schema:i,registry:h,typeSelector:f.jsx(T,{fieldPathId:w,name:`${s}__fallback_type`,schema:E,formData:O,onChange:A,onBlur:d,onFocus:c,registry:h,hideLabel:!r,disabled:l,readonly:u,required:a},n?Je(n):"__empty__"),schemaField:f.jsx(T,{...t,schema:{type:O,title:y(Y.Value),...O==="object"&&{additionalProperties:!0}}})})}function hx(t,e){return gn(e,function(n){return t[n]})}function px(t){return t==null?[]:hx(t,Ve(t))}var gx=Math.max;function yx(t,e,n,r){t=Vt(t)?t:px(t),n=n?ul(n):0;var i=t.length;return n<0&&(n=gx(i+n,0)),At(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&El(t,e,n)>-1}var bx=Math.min;function xx(t,e,n){for(var r=ws,i=t[0].length,s=t.length,o=s,a=Array(s),l=1/0,u=[];o--;){var d=t[o];l=bx(d.length,l),a[o]=i>=120&&d.length>=120?new kt(o&&d):void 0}d=t[0];var c=-1,h=a[0];e:for(;++c<i&&u.length<l;){var g=d[c],m=g;if(g=g!==0?g:0,!(h?Gn(h,m):r(u,m))){for(o=s;--o;){var p=a[o];if(!(p?Gn(p,m):r(t[o],m)))continue e}h&&h.push(m),u.push(g)}}return u}function vx(t){return Yn(t)?t:[]}var ra=Vr(function(t){var e=gn(t,vx);return e.length&&e[0]===t[0]?xx(e):[]});function Sc(t){return t===void 0}var Xe;(function(t){t.ROW="ui:row",t.COLUMN="ui:col",t.COLUMNS="ui:columns",t.CONDITION="ui:condition"})(Xe||(Xe={}));var Vn;(function(t){t.ALL="all",t.SOME="some",t.NONE="none"})(Vn||(Vn={}));const Sx=/^\$lookup=(.+)/,hi="layoutGrid";function ia(t,e){return t??e}function wx(t){return/^\d+?$/.test(t)}const jt=Ps();function jx(t,e,n,r,i){const s=$(n,[Ni],{}),o=$(n,t),a={...$(o,[vt],{}),...e,...s},l={...o};ye(a)||ce(l,[vt],a),ye(s)||ce(l,[Ni],s);let{readonly:u}=L(l);return(i===!0||Sc(u)&&r===!0)&&(u=!0,Q(a,Zr)?ce(l,[vt,Zr],!0):ce(l,`ui:${Zr}`,!0)),{fieldUiSchema:l,uiReadonly:u}}function Ox(t,e,n="$0m3tH1nG Un3xP3cT3d"){const r=Ui([e]).sort(),i=Ui([n]).sort();switch(t){case Vn.ALL:return St(r,i);case Vn.SOME:return ra(r,i).length>0;case Vn.NONE:return ra(r,i).length===0;default:return!1}}function Hr(t,e,n){let r={},i=t[e];if(Et(i)){const{children:s,className:o,...a}=i;if(i=s,o){const u=o.split(" ").map(d=>ks(n,d,d)).join(" ");r={...a,className:u}}else r=a}if(!Array.isArray(i))throw new TypeError(`Expected array for "${e}" in ${JSON.stringify(t)}`);return{children:i,gridProps:r}}function sa(t,e,n){let r;if(wx(n)&&t&&t?.type==="array"&&Q(t,an)){const i=Number(n),s=t[an];Array.isArray(s)?i>s.length?r=Dl(s):r=s[i]:r=s,e={[de]:e[de],path:[...e.path.slice(0,e.path.length-1),i]}}return{rawSchema:r,fieldPathId:e}}function Ex(t,e,n,r,i){const{schemaUtils:s,globalFormOptions:o}=t;let a=n,l=i;const u=e.split("."),d=u.pop();let c=s.retrieveSchema(a,r),h=r,g=c.readOnly;u.forEach(y=>{if(l=Ue(y,o,l),Q(c,ie))a=$(c,[ie,y],{});else if(c&&(Q(c,z)||Q(c,ee))){const x=Q(c,z)?z:ee,b=s.findSelectedOptionInXxxOf(c,y,x,h);a=$(b,[ie,y],{})}else{const x=sa(c,l,y);a=x.rawSchema??{},l=x.fieldPathId}h=$(h,y,{}),c=s.retrieveSchema(a,h),g=ia(c.readOnly,g)});let m,p=!1;if(ye(c)&&(c=void 0),c&&d){if(c&&(Q(c,z)||Q(c,ee))){const x=Q(c,z)?z:ee;c=s.findSelectedOptionInXxxOf(c,d,x,h)}l=Ue(d,o,l),p=c!==void 0&&Array.isArray(c.required)&&yx(c.required,d);const y=sa(c,l,d);if(y.rawSchema?(c=y.rawSchema,l=y.fieldPathId):(c=$(c,[ie,d]),c=c&&s.retrieveSchema(c)),g=ia(c?.readOnly,g),c&&(Q(c,z)||Q(c,ee))){const x=Q(c,z)?z:ee,b=Qe(c);m={options:c[x],hasDiscriminator:!!b}}}return{schema:c,isRequired:p,isReadonly:g,optionsInfo:m,fieldPathId:l}}function Cx(t,e){let n=t;return At(n)&&(n=ks(e,n)),tr(n)?n:null}function Ax(t,e){let n,r=null,i={},s;if(At(e)||Sc(e))n=e??"";else{const{name:o="",render:a,...l}=e;n=o,i=l,ye(i)||X0(i,(u,d)=>{if(At(u)){const c=Sx.exec(u);if(Array.isArray(c)&&c.length>1){const h=c[1];i[d]=ks(t,h,h)}}}),r=Cx(a,t),!o&&r&&(s=f.jsx(r,{...l,"data-testid":jt.uiComponent}))}return{name:n,UIComponent:r,uiProps:i,rendered:s}}function Gr(t){const{childrenLayoutGridSchemaId:e,...n}=t,{registry:r,schema:i,formData:s}=n,{schemaUtils:o}=r,a=o.retrieveSchema(i,s);return e.map(l=>N.createElement(Us,{...n,key:`layoutGrid-${Je(l)}`,schema:a,layoutGridSchema:l}))}function _x(t){const{layoutGridSchema:e,...n}=t,{formData:r,registry:i}=n,{children:s,gridProps:o}=Hr(e,Xe.CONDITION,i),{operator:a,field:l="",value:u}=o,d=$(r,l,null);return Ox(a,d,u)?f.jsx(Gr,{...n,childrenLayoutGridSchemaId:s}):null}function Tx(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Hr(e,Xe.COLUMN,r),a=L(i),l=W("GridTemplate",r,a);return f.jsx(l,{column:!0,"data-testid":jt.col,...o,children:f.jsx(Gr,{...n,childrenLayoutGridSchemaId:s})})}function Ix(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Hr(e,Xe.COLUMNS,r),a=L(i),l=W("GridTemplate",r,a);return s.map(u=>f.jsx(l,{column:!0,"data-testid":jt.col,...o,children:f.jsx(Gr,{...n,childrenLayoutGridSchemaId:[u]})},`column-${Je(u)}`))}function Nx(t){const{layoutGridSchema:e,...n}=t,{registry:r,uiSchema:i}=n,{children:s,gridProps:o}=Hr(e,Xe.ROW,r),a=L(i),l=W("GridTemplate",r,a);return f.jsx(l,{...o,"data-testid":jt.row,children:f.jsx(Gr,{...n,childrenLayoutGridSchemaId:s})})}function Fx(t){const{gridSchema:e,schema:n,uiSchema:r,errorSchema:i,fieldPathId:s,onBlur:o,onFocus:a,formData:l,readonly:u,registry:d,layoutGridSchema:c,...h}=t,{onChange:g}=h,{fields:m}=d,{SchemaField:p,LayoutMultiSchemaField:y}=m,x=Ax(d,e),{name:b,UIComponent:O,uiProps:S}=x,{schema:v,isRequired:w,isReadonly:j,optionsInfo:E,fieldPathId:A}=Ex(d,b,n,l,s),C=zt(A);if(x.rendered)return x.rendered;if(v){const T=E?.hasDiscriminator?y:p,{fieldUiSchema:_,uiReadonly:I}=jx(b,S,r,j,u);return f.jsx(T,{"data-testid":E?.hasDiscriminator?jt.layoutMultiSchemaField:jt.field,...h,name:b,required:w,readonly:I,schema:v,uiSchema:_,errorSchema:$(i,b),fieldPathId:C,formData:$(l,b),onChange:g,onBlur:o,onFocus:a,options:E?.options,registry:d})}return O?f.jsx(O,{"data-testid":jt.uiComponent,...h,name:b,required:w,formData:l,readOnly:!!j||u,errorSchema:i,uiSchema:r,schema:n,fieldPathId:s,onBlur:o,onFocus:a,registry:d,...S}):null}function Us(t){const{uiSchema:e}=t;let{layoutGridSchema:n}=t;const r=L(e);if(!n&&hi in r&&ne(r[hi])&&(n=r[hi]),ne(n)){if(Xe.ROW in n)return f.jsx(Nx,{...t,layoutGridSchema:n});if(Xe.COLUMN in n)return f.jsx(Tx,{...t,layoutGridSchema:n});if(Xe.COLUMNS in n)return f.jsx(Ix,{...t,layoutGridSchema:n});if(Xe.CONDITION in n)return f.jsx(_x,{...t,layoutGridSchema:n})}return f.jsx(Fx,{...t,gridSchema:n})}Us.TEST_IDS=jt;function Px(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,name:a}=t,l=L(i,o.globalUiOptions),{title:u}=l,{title:d}=r,c=u||n||d||a;if(!c)return null;const h=W("TitleFieldTemplate",o,l);return f.jsx(h,{id:Kr(e),title:c,required:s,schema:r,uiSchema:i,registry:o})}function pi(t,e,n){const r="!@#!@$@#$!@$#";return t.map(({schema:s})=>s).find(s=>{const o=$(s,[ie,e]);return $(o,$r,$(o,ke,r))===n})}function oa(t,e,n,r,i){const s=e.map(l=>n.retrieveSchema(l,i));let o=t;Q(t,z)?o={...t,[z]:s}:Q(t,ee)&&(o={...t,[ee]:s});const a=fn(o,r);if(!a)throw new Error(`No enumOptions were computed from the schema ${JSON.stringify(o)}`);return a}function $x(t){const{name:e,baseType:n,disabled:r=!1,formData:i,fieldPathId:s,onBlur:o,onChange:a,options:l,onFocus:u,registry:d,uiSchema:c,schema:h,autofocus:g,readonly:m,required:p,errorSchema:y,hideError:x=!1}=t,{widgets:b,schemaUtils:O,globalUiOptions:S}=d,[v,w]=N.useState(oa(h,l,O,c,i)),j=$(s,de),E=Qe(h),A=W("FieldErrorTemplate",d,l),C=W("FieldTemplate",d,l),T=Je(h),_=Je(l),I=c?Je(c):"",k=i?Je(i):"";N.useEffect(()=>{w(oa(h,l,O,c,i))},[T,_,O,I,k]);const{widget:F=E?"radio":"select",title:D="",placeholder:R="",optionsSchemaSelector:B=E,hideError:V,...Z}=L(c);if(!B)throw new Error("No selector field provided for the LayoutMultiSchemaField");const ae=$(i,B);let fe=$(v[0]?.schema,[ie,B],{});const be=pi(v,B,ae);fe=fe?.type?fe:{...fe,type:be?.type||n};const M=et(fe,F,b),le=V===void 0?x:!!V,te=$(y,[_e],[]),H=un(y,[_e]),G=O.getDisplayLabel(h,c,S),q=Ce=>{const Ae=pi(v,B,Ce),Se=pi(v,B,ae);let Pe=O.sanitizeDataForNewSchema(Ae,Se,i);Pe&&Ae&&(Pe=O.getDefaultFormState(Ae,Pe,"excludeObjectChildren")),Pe&&ce(Pe,B,Ce),a(Pe,s.path,void 0,j)},re={enumOptions:v,...Z},se=!le&&te.length>0?f.jsx(A,{fieldPathId:s,schema:h,errors:te,registry:d}):void 0;return f.jsx(C,{fieldPathId:s,id:j,schema:h,label:(D||h.title)??"",disabled:r||Array.isArray(v)&&ye(v),uiSchema:c,required:p,readonly:!!m,registry:d,displayLabel:G,errors:se,onChange:a,onKeyRename:Sr,onKeyRenameBlur:Sr,onRemoveProperty:Sr,children:f.jsx(M,{id:j,name:e,schema:h,label:(D||h.title)??"",disabled:r||Array.isArray(v)&&ye(v),uiSchema:c,autofocus:g,readonly:m,required:p,registry:d,multiple:!1,rawErrors:te,hideError:le,hideLabel:!G,errorSchema:H,placeholder:R,onChange:q,onBlur:o,onFocus:u,value:ae,options:re,htmlName:s.name})})}class aa extends N.Component{constructor(e){super(e);const{formData:n,options:r,registry:{schemaUtils:i}}=this.props,s=r.map(o=>i.retrieveSchema(o,n));this.state={retrievedOptions:s,selectedOption:this.getMatchingOption(0,n,s)}}componentDidUpdate(e,n){const{formData:r,options:i,fieldPathId:s}=this.props,{selectedOption:o}=this.state;let a=this.state;if(!he(e.options,i)){const{registry:{schemaUtils:l}}=this.props,u=i.map(d=>l.retrieveSchema(d,r));a={selectedOption:o,retrievedOptions:u}}if(!he(r,e.formData)&&s.$id===e.fieldPathId.$id){const{retrievedOptions:l}=a,u=this.getMatchingOption(o,r,l);n&&u!==o&&(a={selectedOption:u,retrievedOptions:l})}a!==this.state&&this.setState(a)}getMatchingOption(e,n,r){const{schema:i,registry:{schemaUtils:s}}=this.props,o=Qe(i);return s.getClosestMatchingOption(n,r,e,o)}onOptionChange=e=>{const{selectedOption:n,retrievedOptions:r}=this.state,{formData:i,onChange:s,registry:o,fieldPathId:a}=this.props,{schemaUtils:l}=o,u=e!==void 0?parseInt(e,10):-1;if(u===n)return;const d=u>=0?r[u]:void 0,c=n>=0?r[n]:void 0;let h=l.sanitizeDataForNewSchema(d,c,i);d&&(h=l.getDefaultFormState(d,h,"excludeObjectChildren")),this.setState({selectedOption:u},()=>{s(h,a.path,void 0,this.getFieldId())})};getFieldId(){const{fieldPathId:e,schema:n}=this.props;return`${e.$id}${n.oneOf?"__oneof_select":"__anyof_select"}`}render(){const{name:e,disabled:n=!1,errorSchema:r={},formData:i,onBlur:s,onFocus:o,readonly:a,required:l=!1,registry:u,schema:d,uiSchema:c}=this.props,{widgets:h,fields:g,translateString:m,globalUiOptions:p,schemaUtils:y}=u,{SchemaField:x}=g,b=W("MultiSchemaFieldTemplate",u,p),O=cr(u,d,l,c),S=vn(i),{selectedOption:v,retrievedOptions:w}=this.state,{widget:j="select",placeholder:E,autofocus:A,autocomplete:C,title:T=d.title,..._}=L(c,p),I=et({type:"number"},j,h),k=$(r,_e,[]),F=un(r,[_e]),D=y.getDisplayLabel(d,c,p),R=v>=0&&w[v]||null;let B;if(R){const{required:te}=d;B=te?lt({required:te},R):R}let V=[];z in d&&c&&z in c?Array.isArray(c[z])?V=c[z]:console.warn(`uiSchema.oneOf is not an array for "${T||e}"`):ee in d&&c&&ee in c&&(Array.isArray(c[ee])?V=c[ee]:console.warn(`uiSchema.anyOf is not an array for "${T||e}"`));let Z=c;v>=0&&V.length>v&&(Z=V[v]);const ae=T?Y.TitleOptionPrefix:Y.OptionPrefix,fe=T?[T]:[],be=w.map((te,H)=>{const{title:G=te.title}=L(V[H]);return{label:G||m(ae,fe.concat(String(H+1))),value:H}}),M=!O||S?f.jsx(I,{id:this.getFieldId(),name:`${e}${d.oneOf?"__oneof_select":"__anyof_select"}`,schema:{type:"number",default:0},onChange:this.onOptionChange,onBlur:s,onFocus:o,disabled:n||ye(be),multiple:!1,rawErrors:k,errorSchema:F,value:v>=0?v:void 0,options:{enumOptions:be,..._},registry:u,placeholder:E,autocomplete:C,autofocus:A,label:T??e,hideLabel:!D,readonly:a}):void 0,le=B&&B.type!=="null"&&f.jsx(x,{...this.props,schema:B,uiSchema:Z})||null;return f.jsx(b,{schema:d,registry:u,uiSchema:c,selector:M,optionSchemaField:le})}}const Dx=/\.([0-9]*0)*$/,kx=/[0.]0*$/;function Rx(t){const{registry:e,onChange:n,formData:r,value:i}=t,[s,o]=N.useState(i),{StringField:a}=e.fields;let l=r;const u=N.useCallback((d,c,h,g)=>{o(d),`${d}`.charAt(0)==="."&&(d=`0${d}`);const m=typeof d=="string"&&d.match(Dx)?ro(d.replace(kx,"")):ro(d);n(m,c,h,g)},[n]);if(typeof s=="string"&&typeof l=="number"){const d=new RegExp(`^(${String(l).replace(".","\\.")})?\\.?0*$`);s.match(d)&&(l=s)}return f.jsx(a,{...t,formData:l,onChange:u})}function Ge(){return Ge=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ge.apply(null,arguments)}const mr=["strong","em","del","mark"],la=[["**",mr[0]],["__",mr[0]],["~~",mr[2]],["==",mr[3]],["*","em"],["_","em"]];function Mx(t,e){for(var n=1,r=e+1;r<t.length&&n>0;)t[r]!=="\\"?(t[r]==="["&&n++,t[r]==="]"&&n--,r++):r+=2;if(n===0&&r<t.length&&(t[r]==="("||t[r]==="[")){var i=t[r]==="("?")":"]",s=1;for(r++;r<t.length&&s>0;)t[r]!=="\\"?(t[r]==="("&&i===")"&&s++,t[r]===i&&s--,r++):r+=2;if(s===0)return r}return-1}function Ux(t,e){if(!e||!e.inline&&!e.simple)return null;var n=t[0];if(n!=="*"&&n!=="_"&&n!=="~"&&n!=="=")return null;for(var r="",i=0,s="",o=0;o<6;o++){var a=la[o][0];if(t.startsWith(a)&&t.length>=2*a.length){r=a,i=a.length,s=la[o][1];break}}if(!r)return null;for(var l=i,u=!1,d=!1,c="",h=0,g="",m=!1,p="";l<t.length;){var y=t[l];if(m)g+=y,m=!1,p=y,l++;else if(y!=="\\")if(y!=="`"||h!==0){if(y==="["&&!u&&h===0){var x=Mx(t,l);if(x!==-1){g+=t.slice(l,x),l=x,p=t[x-1];continue}}if(d)g+=y,c?y===c&&(c=""):y==='"'||y==="'"?c=y:y===">"&&(d=!1),p=y,l++;else if(y!=="<"||u){if(y===`
4
- `&&p===`
5
- `&&!u&&h===0)return null;if(!u&&h===0){for(var b=0;l+b<t.length&&t[l+b]===r[0];)b++;if(b>=i&&(i!==1||r!=="*"&&r!=="_"||t[l-1]!==r&&t[l+1]!==r)){var O=[t.slice(0,l+b),s,g+t.slice(l+i,l+b)];return O.index=0,O.input=t,O}}g+=y,p=y,l++}else{var S=t[l+1],v=t.indexOf(">",l);if(v!==-1){var w=t.slice(l,v+1).endsWith("/>");S==="/"?h=Math.max(0,h-1):w||h++}d=!0,g+=y,p=y,l++}}else u=!u,g+=y,p=y,l++;else g+=y,m=!0,p=y,l++}return null}const Lx=["children","options"],ca=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((t,e)=>(t[e.toLowerCase()]=e,t),{class:"className",for:"htmlFor"}),ua={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},Bx=["style","script","pre"],Vx=["src","href","data","formAction","srcDoc","action"],Wx=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,qx=/\n{2,}$/,da=/^(\s*>[\s\S]*?)(?=\n\n|$)/,zx=/^ *> ?/gm,Kx=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,Hx=/^ {2,}\n/,Gx=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,fa=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,ma=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,Yx=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,Jx=/^(?:\n *)*\n/,Zx=/\r\n?/g,Xx=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,Qx=/^\[\^([^\]]+)]/,ev=/\f/g,tv=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,nv=/^\[(x|\s)\]/,ha=/^(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,pa=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,ga=/^([^\n]+)\n *(=|-)\2{2,} *\n/,Ls=/^<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>/i;function rv(t){const e=Ls.exec(t);if(!e)return null;const n=e[1],r=n.toLowerCase(),i=r.length+1;let s=e[0].length;t[s]===`
6
- `&&s++;const o=s;let a=s,l=1;const u=t.length;for(;l>0;){const c=t.indexOf("<",s);if(c===-1)return null;let h=-1,g=-1;if(t[c+1]==="/")g=c;else if(t[c+1]===r[0]||t[c+1]===n[0]){let m=!0;for(let p=0;p<r.length;p++){const y=t[c+1+p];if(y!==r[p]&&y!==n[p]){m=!1;break}}!m||t[c+i]!==" "&&t[c+i]!==">"||(h=c)}if(h!==-1||g!==-1)if(h!==-1&&(g===-1||h<g))s=h+i+1,l++;else{let m=g+2;for(;m<u;){const y=t[m];if(y!==" "&&y!==" "&&y!==`
7
- `&&y!=="\r")break;m++}if(m+r.length>u)return null;let p=!0;for(let y=0;y<r.length;y++){const x=t[m+y];if(x!==r[y]&&x!==n[y]){p=!1;break}}if(!p){s=m;continue}for(m+=r.length;m<u;){const y=t[m];if(y!==" "&&y!==" "&&y!==`
8
- `&&y!=="\r")break;m++}if(m>=u||t[m]!==">"){s=m;continue}a=g,s=m+1,l--}else s=c+1}let d=0;for(;s+d<u&&t[s+d]===`
9
- `;)d++;return[t.slice(0,s+d),n,e[2],t.slice(o,a)]}const iv=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,ya=/^<!--[\s\S]*?(?:-->)/,sv=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,qi=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,ov=/^\{.*\}$/,av=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,lv=/^<([^ >]+[:@\/][^ >]+)>/,cv=/-([a-z])?/gi,ba=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,uv=/^[^\n]+(?: \n|\n{2,})/,dv=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,fv=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,mv=/^\[([^\]]*)\] ?\[([^\]]*)\]/,hv=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,pv=/\t/g,gv=/(^ *\||\| *$)/g,yv=/^ *:-+: *$/,bv=/^ *:-+ *$/,xv=/^ *-+: *$/,vv=/^(:[a-zA-Z0-9-_]+:)/,Sv=/^\\([^0-9A-Za-z\s])/,wv=/\\([^0-9A-Za-z\s])/g,jv=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,Ov=/^\n+/,Ev=/^([ \t]*)/,Cv=/(?:^|\n)( *)$/,Bs="(?:\\d+\\.)",Vs="(?:[*+-])";function wc(t){return"( *)("+(t===1?Bs:Vs)+") +"}const jc=wc(1),Oc=wc(2);function Ec(t){return RegExp("^"+(t===1?jc:Oc))}const Av=Ec(1),_v=Ec(2);function Cc(t){return RegExp("^"+(t===1?jc:Oc)+"[^\\n]*(?:\\n(?!\\1"+(t===1?Bs:Vs)+" )[^\\n]*)*(\\n|$)","gm")}const Tv=Cc(1),Iv=Cc(2);function Ac(t){const e=t===1?Bs:Vs;return RegExp("^( *)("+e+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+e+" (?!"+e+" ))\\n*|\\s*\\n*$)")}const _c=Ac(1),Tc=Ac(2);function xa(t,e){const n=e===1,r=n?_c:Tc,i=n?Tv:Iv,s=n?Av:_v;return{t:o=>s.test(o),o:xt(function(o,a){const l=Cv.exec(a.prevCapture);return l&&(a.list||!a.inline&&!a.simple)?r.exec(o=l[1]+o):null}),u:1,i(o,a,l){const u=n?+o[2]:void 0,d=o[0].replace(qx,`
10
- `).match(i),c=s.exec(d[0]),h=RegExp("^ {1,"+(c?c[0].length:0)+"}","gm");let g=!1;return{items:d.map(function(m,p){const y=m.replace(h,"").replace(s,""),x=p===d.length-1,b=ze(y,`
11
-
12
- `)||x&&g;g=b;const O=l.inline,S=l.list;let v;l.list=!0,b?(l.inline=!1,v=Wn(y)+`
13
-
14
- `):(l.inline=!0,v=Wn(y));const w=a(v,l);return l.inline=O,l.list=S,w}),ordered:n,start:u}}}}const Nv=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),Fv=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function va(t){return typeof t=="string"}function Wn(t){let e=t.length;for(;e>0&&t[e-1]<=" ";)e--;return t.slice(0,e)}function zi(t,e){return t.startsWith(e)}function ze(t,e){return t.indexOf(e)!==-1}function Pv(t,e,n){if(Array.isArray(n)){for(let r=0;r<n.length;r++)if(zi(t,n[r]))return!0;return!1}return n(t,e)}function Tn(t){return t.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function $v(t){return xv.test(t)?"right":yv.test(t)?"center":bv.test(t)?"left":null}function Sa(t,e,n,r){const i=n.inTable;n.inTable=!0;let s=[[]],o="";function a(){if(!o)return;const l=s[s.length-1];l.push.apply(l,e(o,n)),o=""}return t.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((l,u,d)=>{l.trim()==="|"&&(a(),r)?u!==0&&u!==d.length-1&&s.push([]):o+=l}),a(),n.inTable=i,s}function Dv(t,e,n){n.inline=!0;const r=t[2]?t[2].replace(gv,"").split("|").map($v):[],i=t[3]?(function(o,a,l){return o.trim().split(`
15
- `).map(function(u){return Sa(u,a,l,!0)})})(t[3],e,n):[],s=Sa(t[1],e,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:s,type:"25"}:{children:s,type:"21"}}function wa(t,e){return t.align[e]==null?{}:{textAlign:t.align[e]}}function xt(t){return t.inline=1,t}function ht(t){return xt(function(e,n){return n.inline?t.exec(e):null})}function hr(t){return xt(function(e,n){return n.inline||n.simple?t.exec(e):null})}function rt(t){return function(e,n){return n.inline||n.simple?null:t.exec(e)}}function ja(t){return xt(function(e){return t.exec(e)})}const kv=/(javascript|vbscript|data(?!:image)):/i;function Rv(t){try{const e=decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,"");if(kv.test(e))return null}catch{return null}return t}function Ke(t){return t&&t.replace(wv,"$1")}function Er(t,e,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const s=t(e,n);return n.inline=r,n.simple=i,s}function Mv(t,e,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const s=t(e,n);return n.inline=r,n.simple=i,s}function Uv(t,e,n){const r=n.inline||!1;n.inline=!1;const i=t(e,n);return n.inline=r,i}const Lv=(t,e,n)=>({children:Er(e,t[2],n)});function gi(){return{}}function Bv(...t){return t.filter(Boolean).join(" ")}function yi(t,e,n){let r=t;const i=e.split(".");for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r||n}function bi(t,e,n,r){if(!e||!e.trim())return null;const i=e.match(Wx);return i?i.reduce(function(s,o){const a=o.indexOf("=");if(a!==-1){const l=(function(c){return c.indexOf("-")!==-1&&c.match(sv)===null&&(c=c.replace(cv,function(h,g){return g.toUpperCase()})),c})(o.slice(0,a)).trim(),u=ca[l]||l;if(u==="ref")return s;const d=s[u]=(function(c,h,g,m){return h==="style"?(function(p){const y=[];if(!p)return y;let x="",b=0,O="";for(let v=0;v<p.length;v++){const w=p[v];if(w==='"'||w==="'")O?w===O&&(O="",b--):(O=w,b++);else if(w==="("&&x.endsWith("url"))b++;else if(w===")"&&b>0)b--;else if(w===";"&&b===0){const j=x.indexOf(":");j>0&&y.push([x.slice(0,j).trim(),x.slice(j+1).trim()]),x="";continue}x+=w}const S=x.indexOf(":");return S>0&&y.push([x.slice(0,S).trim(),x.slice(S+1).trim()]),y})(g).reduce(function(p,[y,x]){return p[y.replace(/(-[a-z])/g,b=>b[1].toUpperCase())]=m(x,c,y),p},{}):Vx.indexOf(h)!==-1?m(Ke(g),c,h):(g.match(ov)&&(g=Ke(g.slice(1,g.length-1))),g==="true"||g!=="false"&&g)})(t,l,(function(c){const h=c[0];return(h==='"'||h==="'")&&c.length>=2&&c[c.length-1]===h?c.slice(1,-1):c})(o.slice(a+1).trim()),n);typeof d=="string"&&(Ls.test(d)||qi.test(d))&&(s[u]=r(d.trim()))}else o!=="style"&&(s[ca[o]||o]=!0);return s},{}):null}function Oa(t,e){for(let n=0;n<t.length;n++)if(t[n].test(e))return!0;return!1}function Vv(t="",e={}){e.overrides=e.overrides||{},e.namedCodesToUnicode=e.namedCodesToUnicode?Ge({},ua,e.namedCodesToUnicode):ua;const n=e.slugify||Tn,r=e.sanitizer||Rv,i=e.createElement||N.createElement,s=[da,fa,ma,e.enforceAtxHeadings?pa:ha,ga,ba,_c,Tc],o=[...s,uv,Ls,ya,qi];function a(m,p,...y){const x=yi(e.overrides,m+".props",{});return i((function(b,O){const S=yi(O,b);return S?typeof S=="function"||typeof S=="object"&&"render"in S?S:yi(O,b+".component",b):b})(m,e.overrides),Ge({},p,x,{className:Bv(p?.className,x.className)||void 0}),...y)}function l(m){m=m.replace(tv,"");let p=!1;e.forceInline?p=!0:e.forceBlock||(p=hv.test(m)===!1);const y=h(p?m:Wn(m).replace(Ov,"")+`
16
-
17
- `,{inline:p});if(e.ast)return y;const x=g(y);for(;va(x[x.length-1])&&!x[x.length-1].trim();)x.pop();if(u.length&&x.push(a("footer",{key:"footer"},u.map(function(S){return a("div",{id:n(S.identifier,Tn),key:S.identifier},S.identifier,g(h(S.footnote,{inline:!0})))}))),e.wrapper===null)return x;const b=e.wrapper||(p?"span":"div");let O;if(x.length>1||e.forceWrapper)O=x;else{if(x.length===1)return O=x[0],typeof O=="string"?a("span",{key:"outer"},O):O;O=null}return i(b,Ge({key:"outer"},e.wrapperProps),O)}const u=[],d={},c={0:{t:[">"],o:rt(da),u:1,i(m,p,y){const[,x,b]=m[0].replace(zx,"").match(Kx);return{alert:x,children:p(b,y)}}},1:{t:[" "],o:ht(Hx),u:1,i:gi},2:{t:function(m,p){if(p.inline||p.simple)return!1;var y=m[0];return y==="-"||y==="*"||y==="_"},o:rt(Gx),u:1,i:gi},3:{t:[" "],o:rt(ma),u:0,i:m=>({lang:void 0,text:Ke(Wn(m[0].replace(/^ {4}/gm,"")))})},4:{t:["```","~~~"],o:rt(fa),u:0,i:m=>({attrs:bi("code",m[3]||"",r,l),lang:m[2]||void 0,text:m[4],type:"3"})},5:{t:["`"],o:hr(Yx),u:3,i:m=>({text:Ke(m[2])})},6:{t:["[^"],o:rt(Xx),u:0,i:m=>(u.push({footnote:m[2],identifier:m[1]}),{})},7:{t:["[^"],o:ht(Qx),u:1,i:m=>({target:"#"+n(m[1],Tn),text:m[1]})},8:{t:["[ ]","[x]"],o:ht(nv),u:1,i:m=>({completed:m[1].toLowerCase()==="x"})},9:{t:["#"],o:rt(e.enforceAtxHeadings?pa:ha),u:1,i:(m,p,y)=>({children:Er(p,m[2],y),id:n(m[2],Tn),level:m[1].length})},10:{t:m=>{const p=m.indexOf(`
18
- `);return p>0&&p<m.length-1&&(m[p+1]==="="||m[p+1]==="-")},o:rt(ga),u:1,i:(m,p,y)=>({children:Er(p,m[1],y),level:m[2]==="="?1:2,type:"9"})},11:{t:["<"],o:xt(rv),u:1,i(m,p,y){const[,x]=m[3].match(Ev),b=RegExp("^"+x,"gm"),O=m[3].replace(b,""),S=Oa(o,O)?Uv:Er,v=m[1].toLowerCase(),w=Bx.indexOf(v)!==-1,j=(w?v:m[1]).trim(),E={attrs:bi(j,m[2],r,l),noInnerParse:w,tag:j};if(y.inAnchor=y.inAnchor||v==="a",w)E.text=m[3];else{const A=y.inHTML;y.inHTML=!0,E.children=S(p,O,y),y.inHTML=A}return y.inAnchor=!1,E}},13:{t:["<"],o:ja(qi),u:1,i(m){const p=m[1].trim();return{attrs:bi(p,m[2]||"",r,l),tag:p}}},12:{t:["<!--"],o:ja(ya),u:1,i:()=>({})},14:{t:["!["],o:hr(Fv),u:1,i:m=>({alt:Ke(m[1]),target:Ke(m[2]),title:Ke(m[3])})},15:{t:["["],o:ht(Nv),u:3,i:(m,p,y)=>({children:Mv(p,m[1],y),target:Ke(m[2]),title:Ke(m[3])})},16:{t:function(m,p){return!(!p.inline||p.inAnchor)&&m[0]==="<"&&(ze(m,":")||ze(m,"@")||ze(m,"/"))},o:ht(lv),u:0,i(m){let p=m[1],y=!1;return ze(p,"@")&&!ze(p,"//")&&(y=!0,p=p.replace("mailto:","")),{children:[{text:p,type:"27"}],target:y?"mailto:"+p:p,type:"15"}}},17:{t:(m,p)=>!p.inAnchor&&!e.disableAutoLink&&zi(m,"http"),o:ht(av),u:0,i:m=>({children:[{text:m[1],type:"27"}],target:m[1],title:void 0,type:"15"})},20:xa(0,1),30:xa(0,2),19:{t:[`
19
- `],o:rt(Jx),u:3,i:gi},21:{t:function(m,p){return!p.inline&&!p.simple},o:xt(function(m,p){if(p.inline||p.simple||p.inHTML&&!ze(m,`
20
-
21
- `)&&!ze(p.prevCapture,`
22
-
23
- `))return null;let y="",x=0;for(;;){const O=m.indexOf(`
24
- `,x),S=m.slice(x,O===-1?void 0:O+1),v=m[x];if((v===">"||v==="#"||v==="|"||v==="`"||v==="~"||v==="*"||v==="-"||v==="_"||v===" ")&&Oa(s,S)||(y+=S,O===-1||!S.trim()))break;x=O+1}const b=Wn(y);return b===""?null:[y,,b]}),u:3,i:Lv},22:{t:["["],o:ht(dv),u:0,i:m=>(d[m[1]]={target:m[2],title:m[4]},{})},23:{t:["!["],o:hr(fv),u:0,i:m=>({alt:m[1]?Ke(m[1]):void 0,ref:m[2]})},24:{t:m=>m[0]==="["&&!ze(m,"]("),o:ht(mv),u:0,i:(m,p,y)=>({children:p(m[1],y),fallbackChildren:m[0],ref:m[2]})},25:{t:["|"],o:rt(ba),u:1,i:Dv},27:{o:xt(function(m,p){let y;return zi(m,":")&&(y=vv.exec(m)),y||jv.exec(m)}),u:4,i(m){const p=m[0];return{text:ze(p,"&")?p.replace(iv,(y,x)=>e.namedCodesToUnicode[x]||y):p}}},34:{t:["*","_","~","="],o:xt(Ux),u:2,i:(m,p,y)=>({children:p(m[2],y),tag:m[1]})},28:{t:["\\"],o:hr(Sv),u:1,i:m=>({text:m[1],type:"27"})}};e.disableParsingRawHTML===!0&&(delete c[11],delete c[13]);const h=(function(m){var p=Object.keys(m);function y(x,b){var O=[];if(b.prevCapture=b.prevCapture||"",x.trim())for(;x;)for(var S=0;S<p.length;){var v=p[S],w=m[v];if(!w.t||Pv(x,b,w.t)){var j=w.o(x,b);if(j&&j[0]){x=x.substring(j[0].length);var E=w.i(j,y,b);b.prevCapture+=j[0],E.type||(E.type=v),O.push(E);break}S++}else S++}return b.prevCapture="",O}return p.sort(function(x,b){return m[x].u-m[b].u||(x<b?-1:1)}),function(x,b){return y((function(O){return O.replace(Zx,`
25
- `).replace(ev,"").replace(pv," ")})(x),b)}})(c),g=(function(m,p,y,x,b){function O(S){return Array.isArray(S)?S.map(v=>"text"in v?v.text:""):"text"in S?S.text:""}return function S(v,w={}){const j=(w.renderDepth||0)+1;if(j>2500)return O(v);w.renderDepth=j;try{if(Array.isArray(v)){const A=w.key,C=[];let T=!1;for(let _=0;_<v.length;_++){w.key=_;const I=S(v[_],w),k=va(I);k&&T?C[C.length-1]+=I:I!==null&&C.push(I),T=k}return w.key=A,w.renderDepth=j-1,C}const E=(function(A,C,T){const _=()=>(function(I,k,F,D,R,B,V){switch(I.type){case"0":{const Z={key:F.key};return I.alert&&(Z.className="markdown-alert-"+B(I.alert.toLowerCase(),Tn),I.children.unshift({attrs:{},children:[{type:"27",text:I.alert}],noInnerParse:!0,type:"11",tag:"header"})),D("blockquote",Z,k(I.children,F))}case"1":return D("br",{key:F.key});case"2":return D("hr",{key:F.key});case"3":return D("pre",{key:F.key},D("code",Ge({},I.attrs,{className:I.lang?"lang-"+I.lang:""}),I.text));case"5":return D("code",{key:F.key},I.text);case"7":return D("a",{key:F.key,href:R(I.target,"a","href")},D("sup",{key:F.key},I.text));case"8":return D("input",{checked:I.completed,key:F.key,readOnly:!0,type:"checkbox"});case"9":return D("h"+I.level,{id:I.id,key:F.key},k(I.children,F));case"11":return D(I.tag,Ge({key:F.key},I.attrs),I.text||(I.children?k(I.children,F):""));case"13":return D(I.tag,Ge({},I.attrs,{key:F.key}));case"14":return D("img",{key:F.key,alt:I.alt||void 0,title:I.title||void 0,src:R(I.target,"img","src")});case"15":return D("a",{key:F.key,href:R(I.target,"a","href"),title:I.title},k(I.children,F));case"23":return V[I.ref]?D("img",{key:F.key,alt:I.alt,src:R(V[I.ref].target,"img","src"),title:V[I.ref].title}):null;case"24":return V[I.ref]?D("a",{key:F.key,href:R(V[I.ref].target,"a","href"),title:V[I.ref].title},k(I.children,F)):D("span",{key:F.key},I.fallbackChildren);case"25":{const Z=I;return D("table",{key:F.key},D("thead",null,D("tr",null,Z.header.map(function(ae,fe){return D("th",{key:fe,style:wa(Z,fe)},k(ae,F))}))),D("tbody",null,Z.cells.map(function(ae,fe){return D("tr",{key:fe},ae.map(function(be,M){return D("td",{key:M,style:wa(Z,M)},k(be,F))}))})))}case"27":return I.text;case"34":return D(I.tag,{key:F.key},k(I.children,F));case"20":case"30":return D(I.ordered?"ol":"ul",{key:F.key,start:I.type==="20"?I.start:void 0},I.items.map(function(Z,ae){return D("li",{key:ae},k(Z,F))}));case"19":return`
26
- `;case"21":return D("p",{key:F.key},k(I.children,F));default:return null}})(A,C,T,p,y,x,b);return m?m(_,A,C,T):_()})(v,S,w);return w.renderDepth=j-1,E}catch(E){if(E instanceof RangeError&&E.message.includes("Maximum call stack"))return O(v);throw E}}})(e.renderRule,a,r,n,d);return l(t)}const ur=t=>{let{children:e,options:n}=t,r=(function(i,s){if(i==null)return{};var o={};for(var a in i)if({}.hasOwnProperty.call(i,a)){if(s.indexOf(a)!==-1)continue;o[a]=i[a]}return o})(t,Lx);return Vv(e??"",Ge({},n,{wrapperProps:Ge({},n?.wrapperProps,r)}))},Ic=Symbol("remove-this-key"),Ea=Symbol("reset");function Wv(t,e){return Array.isArray(t.required)&&t.required.indexOf(e)!==-1}function qv(t,e){switch(e){case"array":return[];case"boolean":return!1;case"null":return null;case"number":return 0;case"object":return{};default:return t(Y.NewStringDefault)}}function zv(t){const{fieldPathId:e,schema:n,registry:r,uiSchema:i,errorSchema:s,formData:o,onChange:a,onBlur:l,onFocus:u,disabled:d,readonly:c,required:h,hideError:g,propertyName:m,handleKeyRename:p,handleRemoveProperty:y,addedByAdditionalProperties:x}=t,[b,O]=N.useState(!1),{globalFormOptions:S,fields:v}=r,{SchemaField:w}=v,j=zt(Ue(m,S,e.path)),E=N.useCallback((_,I,k,F)=>{_===void 0&&x&&(_=""),a(_,I,k,F)},[a,x]),A=N.useCallback(_=>{m!==_&&O(!0),p(m,_)},[m,p]),C=N.useCallback(_=>{const{target:{value:I}}=_;A(I)},[A]),T=N.useCallback(()=>{y(m)},[m,y]);return f.jsx(w,{name:m,required:h,schema:n,uiSchema:i,errorSchema:s,fieldPathId:j,formData:o,wasPropertyKeyModified:b,onKeyRename:A,onKeyRenameBlur:C,onRemoveProperty:T,onChange:E,onBlur:l,onFocus:u,registry:r,disabled:d,readonly:c,hideError:g})}function Kv(t){const{schema:e,uiSchema:n={},formData:r,errorSchema:i,fieldPathId:s,name:o,required:a=!1,disabled:l,readonly:u,hideError:d,onBlur:c,onFocus:h,onChange:g,registry:m,title:p}=t,{fields:y,schemaUtils:x,translateString:b,globalUiOptions:O}=m,{OptionalDataControlsField:S}=y,v=N.useRef(r);v.current=r;const w=x.retrieveSchema(e,r,!0),j=L(n,O),{properties:E={}}=w,A=t.childFieldPathId??s,C=N.useRef({previousKey:"",currentKey:void 0}),T=j.title??w.title??p??o,_=j.description??w.description,I=cr(m,w,a,n),k=vn(r);let F=[];const D=N.useCallback((M,le)=>{const{duplicateKeySuffixSeparator:te="-"}=L(n,O);let H=0,G=M;for(;Q(le,G);)G=`${M}${te}${++H}`;return G},[n,O]),R=N.useCallback(()=>{if(!(w.additionalProperties||w.patternProperties))return;const{translateString:M}=m,le={...r},te=D("newKey",le);if(w.patternProperties)ce(le,te,null);else{let H,G,q;if(ne(w.additionalProperties)){H=w.additionalProperties.type,G=w.additionalProperties.const,q=w.additionalProperties.default;let se=w.additionalProperties;if(ue in se){const{schemaUtils:Ce}=m;se=Ce.retrieveSchema({[ue]:se[ue]},r),H=se.type,G=se.const,q=se.default}!H&&(ee in se||z in se)&&(H="object")}const re=G??q??qv(M,H);ce(le,te,re)}C.current.previousKey===te&&(C.current.currentKey=te,C.current.previousKey=D(te,le)),g(le,A.path)},[r,g,m,A,D,w]),B=N.useCallback((M,le)=>{if(M!==le){const te=v.current,H=D(le,te),G={...te},q={[M]:H},re=Object.keys(G).map(Ce=>({[q[Ce]||Ce]:G[Ce]})),se=Object.assign({},...re);v.current=se,M!==C.current.currentKey&&(C.current.previousKey=M),C.current.currentKey=H,g(se,A.path)}},[g,A,D]),V=N.useCallback(M=>{g(Ic,[...A.path,M])},[g,A]),Z=N.useCallback(M=>C.current.currentKey===M?C.current.previousKey:M,[]);if(!I||k)try{const M=Object.keys(E);F=U0(M,j.order)}catch(M){return f.jsxs("div",{children:[f.jsx("p",{className:"rjsf-config-error",style:{color:"red"},children:f.jsx(ur,{options:{disableParsingRawHTML:!0},children:b(Y.InvalidObjectField,[o||"root",M.message])})}),f.jsx("pre",{children:JSON.stringify(w)})]})}const ae=W("ObjectFieldTemplate",m,j),fe=I?f.jsx(S,{...t,fieldPathId:A,schema:w}):void 0,be={title:j.label===!1?"":T,description:j.label===!1?void 0:_,properties:F.map(M=>{const le=Q(w,[ie,M,ot]),te=le?n.additionalProperties:n[M],H=L(te).widget==="hidden";return{content:f.jsx(zv,{propertyName:M,required:Wv(w,M),schema:$(w,[ie,M],{}),uiSchema:te,errorSchema:$(i,[M]),fieldPathId:A,formData:$(r,[M]),handleKeyRename:B,handleRemoveProperty:V,addedByAdditionalProperties:le,onChange:g,onBlur:c,onFocus:h,registry:m,disabled:l,readonly:u,hideError:d},Z(M)),name:M,readonly:u,disabled:l,required:a,hidden:H}}),readonly:u,disabled:l,required:a,fieldPathId:s,uiSchema:n,errorSchema:i,schema:w,formData:r,registry:m,optionalDataControl:fe,className:I?"rjsf-optional-object-field":void 0};return f.jsx(ae,{...be,onAddProperty:R})}function Hv(t){const{schema:e,uiSchema:n={},formData:r,disabled:i=!1,readonly:s=!1,onChange:o,errorSchema:a,fieldPathId:l,registry:u}=t,{globalUiOptions:d={},schemaUtils:c,translateString:h}=u,g=L(n,d),m=W("OptionalDataControlsTemplate",u,g),p=vn(r);let y,x,b,O;if(i||s)y=fi(l,"Msg"),x=p?void 0:h(Y.OptionalObjectEmptyMsg);else{const S=p?Y.OptionalObjectRemove:Y.OptionalObjectAdd;x=h(S),p?(y=fi(l,"Remove"),O=()=>o(void 0,l.path,a)):(y=fi(l,"Add"),b=()=>{let v=c.getDefaultFormState(e,r,"excludeObjectChildren");v===void 0&&(v=qe(e)==="array"?[]:{}),o(v,l.path,a)})}return x&&f.jsx(m,{id:y,registry:u,schema:e,uiSchema:n,label:x,onAddClick:b,onRemoveClick:O})}const Gv={array:"ArrayField",boolean:"BooleanField",integer:"NumberField",number:"NumberField",object:"ObjectField",string:"StringField",null:"NullField"};function Yv(t,e,n){const r=e.field,{fields:i}=n;if(typeof r=="function")return r;if(typeof r=="string"&&r in i)return i[r];const s=qe(t),o=Array.isArray(s)?s[0]:s||"",a=t.$id;let l=Gv[o];return a&&a in i&&(l=a),!l&&(t.anyOf||t.oneOf)?()=>null:l in i?i[l]:i.FallbackField}function Jv(t){const{schema:e,fieldPathId:n,uiSchema:r,formData:i,errorSchema:s,name:o,onChange:a,onKeyRename:l,onKeyRenameBlur:u,onRemoveProperty:d,required:c=!1,registry:h,wasPropertyKeyModified:g=!1}=t,{schemaUtils:m,globalFormOptions:p,globalUiOptions:y,fields:x}=h,{AnyOfField:b,OneOfField:O}=x,S=L0(e,r,h),v=L(S,y),w=W("FieldTemplate",h,v),j=W("DescriptionFieldTemplate",h,v),E=W("FieldHelpTemplate",h,v),A=W("FieldErrorTemplate",h,v),C=m.retrieveSchema(e,i),T=n[de],_=N.useCallback((jn,On,Tt,au)=>a(jn,On,Tt,au||T),[T,a]),I=Yv(C,v,h),k=!!(v.disabled??t.disabled),F=!!(v.readonly??(t.readonly||t.schema.readOnly||C.readOnly)),D=v.hideError,R=D===void 0?t.hideError:!!D,B=!!(v.autofocus??t.autofocus);if(Object.keys(C).length===0)return null;let V=m.getDisplayLabel(C,S,y);const Z=v.field&&v.fieldReplacesAnyOrOneOf===!0;let ae,fe,be={fieldPathId:n};if((ee in C||z in C)&&!Z&&!m.isSelect(C)){C[ee]?(ae=b,fe=C[ee].map(Tt=>m.retrieveSchema(ne(Tt)?Tt:{},i))):C[z]&&(ae=O,fe=C[z].map(Tt=>m.retrieveSchema(ne(Tt)?Tt:{},i)));const jn=cr(h,C,c,S),On=vn(i);V=V&&(!jn||On),be={childFieldPathId:n,fieldPathId:Ue("XxxOf",p,n)}}const{__errors:M,...le}=s||{},te=un(S,["ui:classNames","classNames","ui:style"]);vt in te&&(te[vt]=un(te[vt],["classNames","style"]));const H=f.jsx(I,{...t,onChange:_,...be,schema:C,uiSchema:te,disabled:k,readonly:F,hideError:R,autofocus:B,errorSchema:le,rawErrors:M}),G=n[de];let q;g?q=o:q=ot in C?o:v.title||t.schema.title||C.title||t.title||o;const re=v.description||t.schema.description||C.description||"",se=v.help,Ce=v.widget==="hidden",Ae=["rjsf-field",`rjsf-field-${qe(C)}`];!R&&M&&M.length>0&&Ae.push("rjsf-field-error"),v.classNames&&Ae.push(v.classNames);const Se=f.jsx(E,{help:se,fieldPathId:n,schema:C,uiSchema:S,hasErrors:!R&&M&&M.length>0,registry:h}),Pe=R||ae&&!m.isSelect(C)?void 0:f.jsx(A,{errors:M,errorSchema:s,fieldPathId:n,schema:C,uiSchema:S,registry:h}),mt={description:f.jsx(j,{id:qt(G),description:re,schema:C,uiSchema:S,registry:h}),rawDescription:re,help:Se,rawHelp:typeof se=="string"?se:void 0,errors:Pe,rawErrors:R?void 0:M,fieldPathId:n,id:G,label:q,hidden:Ce,onChange:a,onKeyRename:l,onKeyRenameBlur:u,onRemoveProperty:d,required:c,disabled:k,readonly:F,hideError:R,displayLabel:V,classNames:Ae.join(" ").trim(),style:v.style,formData:i,schema:C,uiSchema:S,registry:h};return f.jsx(w,{...mt,children:f.jsxs(f.Fragment,{children:[H,ae&&f.jsx(ae,{name:o,disabled:k,readonly:F,hideError:R,errorSchema:s,formData:i,fieldPathId:n,onBlur:t.onBlur,onChange:t.onChange,onFocus:t.onFocus,options:fe,registry:h,required:c,schema:C,uiSchema:S})]})})}class Zv extends N.Component{shouldComponentUpdate(e){const{registry:{globalFormOptions:n}}=this.props,{experimental_componentUpdateStrategy:r="customDeep"}=n;return hc(this,e,this.state,r)}render(){return f.jsx(Jv,{...this.props})}}function Xv(t){const{schema:e,name:n,uiSchema:r,fieldPathId:i,formData:s,required:o,disabled:a=!1,readonly:l=!1,autofocus:u=!1,onChange:d,onBlur:c,onFocus:h,registry:g,rawErrors:m,hideError:p,title:y}=t,{title:x,format:b}=e,{widgets:O,schemaUtils:S,globalUiOptions:v}=g,w=S.isSelect(e)?fn(e,r):void 0;let j=w?"select":"text";b&&k0(e,b,O)&&(j=b);const{widget:E=j,placeholder:A="",title:C,...T}=L(r),_=S.getDisplayLabel(e,r,v),I=C??y??x??n,k=et(e,E,O),F=N.useCallback((D,R,B)=>d(D,i.path,R,B),[d,i]);return f.jsx(k,{options:{...T,enumOptions:w},schema:e,uiSchema:r,id:i.$id,name:n,label:I,hideLabel:!_,hideError:p,value:s,onChange:F,onBlur:c,onFocus:h,required:o,disabled:a,readonly:l,autofocus:u,registry:g,placeholder:A,rawErrors:m,htmlName:i.name})}function Qv(t){const{formData:e,onChange:n,fieldPathId:r}=t;return N.useEffect(()=>{e===void 0&&n(null,r.path)},[r,e,n]),null}function e1(){return{AnyOfField:aa,ArrayField:lx,BooleanField:cx,FallbackField:mx,LayoutGridField:Us,LayoutHeaderField:Px,LayoutMultiSchemaField:$x,NumberField:Rx,ObjectField:Kv,OneOfField:aa,OptionalDataControlsField:Hv,SchemaField:Zv,StringField:Xv,NullField:Qv}}function t1(t){const{fieldPathId:e,description:n,registry:r,schema:i,uiSchema:s}=t,o=L(s,r.globalUiOptions),{label:a=!0}=o;if(!n||!a)return null;const l=W("DescriptionFieldTemplate",r,o);return f.jsx(l,{id:qt(e),description:n,schema:i,uiSchema:s,registry:r})}function n1(t){const{children:e,className:n,buttonsProps:r,displayLabel:i,hasDescription:s,hasToolbar:o,registry:a,uiSchema:l}=t,u=L(l),d=W("ArrayFieldItemButtonsTemplate",a,u),c={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"},h=s?31:9,g={display:"flex",alignItems:i?"center":"baseline"},m={display:"flex",justifyContent:"flex-end",marginTop:i?`${h}px`:0};return f.jsxs("div",{className:n,style:g,children:[f.jsx("div",{className:o?"col-xs-9 col-md-10 col-xl-11":"col-xs-12",children:e}),o&&f.jsx("div",{className:"col-xs-3 col-md-2 col-xl-1 array-item-toolbox",children:f.jsx("div",{className:"btn-group",style:m,children:f.jsx(d,{...r,style:c})})})]})}function r1(t){const{disabled:e,hasCopy:n,hasMoveDown:r,hasMoveUp:i,hasRemove:s,fieldPathId:o,onCopyItem:a,onRemoveItem:l,onMoveDownItem:u,onMoveUpItem:d,readonly:c,registry:h,uiSchema:g}=t,{CopyButton:m,MoveDownButton:p,MoveUpButton:y,RemoveButton:x}=h.templates.ButtonTemplates;return f.jsxs(f.Fragment,{children:[(i||r)&&f.jsx(y,{id:Ze(o,"moveUp"),className:"rjsf-array-item-move-up",disabled:e||c||!i,onClick:d,uiSchema:g,registry:h}),(i||r)&&f.jsx(p,{id:Ze(o,"moveDown"),className:"rjsf-array-item-move-down",disabled:e||c||!r,onClick:u,uiSchema:g,registry:h}),n&&f.jsx(m,{id:Ze(o,"copy"),className:"rjsf-array-item-copy",disabled:e||c,onClick:a,uiSchema:g,registry:h}),s&&f.jsx(x,{id:Ze(o,"remove"),className:"rjsf-array-item-remove",disabled:e||c,onClick:l,uiSchema:g,registry:h})]})}function i1(t){const{canAdd:e,className:n,disabled:r,fieldPathId:i,uiSchema:s,items:o,optionalDataControl:a,onAddClick:l,readonly:u,registry:d,required:c,schema:h,title:g}=t,m=L(s),p=W("ArrayFieldDescriptionTemplate",d,m),y=W("ArrayFieldTitleTemplate",d,m),x=!u&&!r,{ButtonTemplates:{AddButton:b}}=d.templates;return f.jsxs("fieldset",{className:n,id:i.$id,children:[f.jsx(y,{fieldPathId:i,title:m.title||g,required:c,schema:h,uiSchema:s,registry:d,optionalDataControl:x?a:void 0}),f.jsx(p,{fieldPathId:i,description:m.description||h.description,schema:h,uiSchema:s,registry:d}),x?void 0:a,f.jsx("div",{className:"row array-item-list",children:o}),e&&f.jsx(b,{id:Ze(i,"add"),className:"rjsf-array-item-add",onClick:l,disabled:r||u,uiSchema:s,registry:d})]})}function s1(t){const{fieldPathId:e,title:n,schema:r,uiSchema:i,required:s,registry:o,optionalDataControl:a}=t,l=L(i,o.globalUiOptions),{label:u=!0}=l;if(!n||!u)return null;const d=W("TitleFieldTemplate",o,l);return f.jsx(d,{id:Kr(e),title:n,required:s,schema:r,uiSchema:i,registry:o,optionalDataControl:a})}function Nc(t){const{id:e,schema:n}=t,{examples:r,default:i}=n;return Array.isArray(r)?f.jsx("datalist",{id:zr(e),children:r.concat(i!==void 0&&!r.map(String).includes(String(i))?[i]:[]).map(s=>f.jsx("option",{value:s},String(s)))},`datalist_${e}`):null}function o1(t){const{id:e,name:n,htmlName:r,value:i,readonly:s,disabled:o,autofocus:a,onBlur:l,onFocus:u,onChange:d,onChangeOverride:c,options:h,schema:g,uiSchema:m,registry:p,rawErrors:y,type:x,hideLabel:b,hideError:O,...S}=t,{ClearButton:v}=p.templates.ButtonTemplates;if(!e)throw console.log("No id for",t),new Error(`no id for props ${JSON.stringify(t)}`);const w={...S,...uc(g,x,h)};let j;w.type==="number"||w.type==="integer"?j=i||i===0?i:"":j=i??"";const E=N.useCallback(({target:{value:_}})=>d(_===""?h.emptyValue:_),[d,h]),A=N.useCallback(({target:_})=>l(e,_&&_.value),[l,e]),C=N.useCallback(({target:_})=>u(e,_&&_.value),[u,e]),T=N.useCallback(_=>{_.preventDefault(),_.stopPropagation(),d(h.emptyValue??"")},[d,h.emptyValue]);return f.jsxs(f.Fragment,{children:[f.jsx("input",{id:e,name:r||e,className:"form-control",readOnly:s,disabled:o,autoFocus:a,value:j,...w,list:g.examples?zr(e):void 0,onChange:c||E,onBlur:A,onFocus:C,"aria-describedby":Fe(e,!!g.examples)}),h.allowClearTextInputs&&!s&&!o&&j&&f.jsx(v,{registry:p,onClick:T}),f.jsx(Nc,{id:e,schema:g})]})}function a1({uiSchema:t}){const{submitText:e,norender:n,props:r={}}=dc(t);return n?null:f.jsx("div",{children:f.jsx("button",{type:"submit",...r,className:`btn btn-info ${r.className||""}`,children:e})})}function _t(t){const{iconType:e="default",icon:n,className:r,uiSchema:i,registry:s,...o}=t;return f.jsx("button",{type:"button",className:`btn btn-${e} ${r}`,...o,children:f.jsx("i",{className:`glyphicon glyphicon-${n}`})})}function l1(t){const{registry:{translateString:e}}=t;return f.jsx(_t,{title:e(Y.CopyButton),...t,icon:"copy"})}function c1(t){const{registry:{translateString:e}}=t;return f.jsx(_t,{title:e(Y.MoveDownButton),...t,icon:"arrow-down"})}function u1(t){const{registry:{translateString:e}}=t;return f.jsx(_t,{title:e(Y.MoveUpButton),...t,icon:"arrow-up"})}function d1(t){const{registry:{translateString:e}}=t;return f.jsx(_t,{title:e(Y.RemoveButton),...t,iconType:"danger",icon:"remove"})}function f1({id:t,className:e,onClick:n,disabled:r,registry:i,...s}){const{translateString:o}=i;return f.jsx(_t,{id:t,iconType:"default",icon:"remove",className:"btn-clear col-xs-12",title:o(Y.ClearButton),onClick:n,disabled:r,registry:i,...s})}function m1({id:t,className:e,onClick:n,disabled:r,registry:i}){const{translateString:s}=i;return f.jsx("div",{className:"row",children:f.jsx("p",{className:`col-xs-4 col-sm-2 col-lg-1 col-xs-offset-8 col-sm-offset-10 col-lg-offset-11 text-right ${e}`,children:f.jsx(_t,{id:t,iconType:"info",icon:"plus",className:"btn-add col-xs-12",title:s(Y.AddButton),onClick:n,disabled:r,registry:i})})})}function h1(){return{SubmitButton:a1,AddButton:m1,CopyButton:l1,MoveDownButton:c1,MoveUpButton:u1,RemoveButton:d1,ClearButton:f1}}const Fc=Ps();function Ws({description:t,registry:e,uiSchema:n={}}){const{globalUiOptions:r}=e;return L(n,r).enableMarkdownInDescription&&typeof t=="string"?f.jsx(ur,{options:{disableParsingRawHTML:!0},"data-testid":Fc.markdown,children:t}):t}Ws.TEST_IDS=Fc;function p1(t){const{id:e,description:n,registry:r,uiSchema:i}=t;return n?f.jsx("div",{id:e,className:"field-description",children:f.jsx(Ws,{description:n,registry:r,uiSchema:i})}):null}function g1({errors:t,registry:e}){const{translateString:n}=e;return f.jsxs("div",{className:"panel panel-danger errors",children:[f.jsx("div",{className:"panel-heading",children:f.jsx("h3",{className:"panel-title",children:n(Y.ErrorsLabel)})}),f.jsx("ul",{className:"list-group",children:t.map((r,i)=>f.jsx("li",{className:"list-group-item text-danger",children:r.stack},i))})]})}function y1(t){const{schema:e,registry:n,typeSelector:r,schemaField:i}=t,s=W("MultiSchemaFieldTemplate",n);return f.jsx(s,{selector:r,optionSchemaField:i,schema:e,registry:n})}const b1="*";function Pc(t){const{label:e,required:n,id:r}=t;return e?f.jsxs("label",{className:"control-label",htmlFor:r,children:[e,n&&f.jsx("span",{className:"required",children:b1})]}):null}function x1(t){const{id:e,label:n,children:r,errors:i,help:s,description:o,hidden:a,required:l,displayLabel:u,registry:d,uiSchema:c}=t,h=L(c),g=W("WrapIfAdditionalTemplate",d,h);if(a)return f.jsx("div",{className:"hidden",children:r});const m=h.widget==="checkbox";return f.jsxs(g,{...t,children:[u&&!m&&f.jsx(Pc,{label:n,required:l,id:e}),u&&o?o:null,r,i,s]})}function v1(t){const{errors:e=[],fieldPathId:n}=t;if(e.length===0)return null;const r=$s(n);return f.jsx("div",{children:f.jsx("ul",{id:r,className:"error-detail bs-callout bs-callout-info",children:e.filter(i=>!!i).map((i,s)=>f.jsx("li",{className:"text-danger",children:i},s))})})}const $c=Ps();function qs({help:t,registry:e,uiSchema:n={}}){const{globalUiOptions:r}=e;return L(n,r).enableMarkdownInHelp&&typeof t=="string"?f.jsx(ur,{options:{disableParsingRawHTML:!0},"data-testid":$c.markdown,children:t}):t}qs.TEST_IDS=$c;function S1(t){const{fieldPathId:e,help:n,uiSchema:r,registry:i}=t;return n?f.jsx("div",{id:Ds(e),className:"help-block",children:f.jsx(qs,{help:n,registry:i,uiSchema:r})}):null}function w1(t){const{children:e,column:n,className:r,...i}=t;return f.jsx("div",{className:r,...i,children:e})}function j1(t){const{selector:e,optionSchemaField:n}=t;return f.jsxs("div",{className:"panel panel-default panel-body",children:[f.jsx("div",{className:"form-group",children:e}),n]})}function O1(t){const{className:e,description:n,disabled:r,formData:i,fieldPathId:s,onAddProperty:o,optionalDataControl:a,properties:l,readonly:u,registry:d,required:c,schema:h,title:g,uiSchema:m}=t,p=L(m),y=W("TitleFieldTemplate",d,p),x=W("DescriptionFieldTemplate",d,p);if((h.oneOf||h.anyOf)&&!h.properties&&l.length===0)return null;const O=!u&&!r,{ButtonTemplates:{AddButton:S}}=d.templates;return f.jsxs("fieldset",{className:e,id:s.$id,children:[g&&f.jsx(y,{id:Kr(s),title:g,required:c,schema:h,uiSchema:m,registry:d,optionalDataControl:O?a:void 0}),n&&f.jsx(x,{id:qt(s),description:n,schema:h,uiSchema:m,registry:d}),O?void 0:a,l.map(v=>v.content),Ka(h,m,i)&&f.jsx(S,{id:Ze(s,"add"),className:"rjsf-object-property-expand",onClick:o,disabled:r||u,uiSchema:m,registry:d})]})}function E1(t){const{id:e,registry:n,label:r,onAddClick:i,onRemoveClick:s}=t;return i?f.jsx(_t,{id:e,registry:n,icon:"plus",className:"rjsf-add-optional-data btn-sm",onClick:i,title:r}):s?f.jsx(_t,{id:e,registry:n,icon:"remove",className:"rjsf-remove-optional-data btn-sm",onClick:s,title:r}):f.jsx("em",{id:e,children:r})}const C1="*";function A1(t){const{id:e,title:n,required:r,optionalDataControl:i}=t;return f.jsxs("legend",{id:e,children:[n,r&&f.jsx("span",{className:"required",children:C1}),i&&f.jsx("span",{className:"pull-right",style:{marginBottom:"2px"},children:i})]})}function _1(t){const{schema:e,fieldPathId:n,reason:r,registry:i}=t,{translateString:s}=i;let o=Y.UnsupportedField;const a=[];return n&&n.$id&&(o=Y.UnsupportedFieldWithId,a.push(n.$id)),r&&(o=o===Y.UnsupportedField?Y.UnsupportedFieldWithReason:Y.UnsupportedFieldWithIdAndReason,a.push(r)),f.jsxs("div",{className:"unsupported-field",children:[f.jsx("p",{children:f.jsx(ur,{options:{disableParsingRawHTML:!0},children:s(o,a)})}),e&&f.jsx("pre",{children:JSON.stringify(e,null,2)})]})}function T1(t){const{id:e,classNames:n,style:r,disabled:i,displayLabel:s,label:o,onKeyRenameBlur:a,onRemoveProperty:l,rawDescription:u,readonly:d,required:c,schema:h,hideError:g,rawErrors:m,children:p,uiSchema:y,registry:x}=t,{templates:b,translateString:O}=x,{RemoveButton:S}=b.ButtonTemplates,v=O(Y.KeyLabel,[o]),w=ot in h,j=!!u,E=["form-group",n];!g&&m&&m.length>0&&E.push("has-error has-danger");const A=E.join(" ").trim();if(!w)return f.jsx("div",{className:A,style:r,children:p});const C=j?46:26;return f.jsx("div",{className:A,style:r,children:f.jsxs("div",{className:"row",children:[f.jsx("div",{className:"col-xs-5 form-additional",children:f.jsxs("div",{className:"form-group",children:[s&&f.jsx(Pc,{label:v,required:c,id:`${e}-key`}),s&&u&&f.jsx("div",{children:" "}),f.jsx("input",{className:"form-control",type:"text",id:`${e}-key`,onBlur:a,defaultValue:o},o)]})}),f.jsx("div",{className:"form-additional form-group col-xs-5",children:p}),f.jsx("div",{className:"col-xs-2",style:{marginTop:s?`${C}px`:void 0},children:f.jsx(S,{id:Ze(e,"remove"),className:"rjsf-object-property-remove btn-block",style:{border:"0"},disabled:i||d,onClick:l,uiSchema:y,registry:x})})]})})}function I1(){return{ArrayFieldDescriptionTemplate:t1,ArrayFieldItemTemplate:n1,ArrayFieldItemButtonsTemplate:r1,ArrayFieldTemplate:i1,ArrayFieldTitleTemplate:s1,ButtonTemplates:h1(),BaseInputTemplate:o1,DescriptionFieldTemplate:p1,ErrorListTemplate:g1,FallbackFieldTemplate:y1,FieldTemplate:x1,FieldErrorTemplate:v1,FieldHelpTemplate:S1,GridTemplate:w1,MultiSchemaFieldTemplate:j1,ObjectFieldTemplate:O1,OptionalDataControlsTemplate:E1,TitleFieldTemplate:A1,UnsupportedFieldTemplate:_1,WrapIfAdditionalTemplate:T1}}function N1(t){const{disabled:e=!1,readonly:n=!1,autofocus:r=!1,options:i,id:s,name:o,registry:a,onBlur:l,onFocus:u}=t,{translateString:d}=a,{elements:c,handleChange:h,handleClear:g,handleSetNow:m}=q0(t);return f.jsxs("ul",{className:"list-inline",children:[c.map((p,y)=>f.jsx("li",{className:"list-inline-item",children:f.jsx(W0,{rootId:s,name:o,select:h,...p,disabled:e,readonly:n,registry:a,onBlur:l,onFocus:u,autofocus:r&&y===0})},y)),(i.hideNowButton!=="undefined"?!i.hideNowButton:!0)&&f.jsx("li",{className:"list-inline-item",children:f.jsx("a",{href:"#",className:"btn btn-info btn-now",onClick:m,children:d(Y.NowLabel)})}),(i.hideClearButton!=="undefined"?!i.hideClearButton:!0)&&f.jsx("li",{className:"list-inline-item",children:f.jsx("a",{href:"#",className:"btn btn-warning btn-clear",onClick:g,children:d(Y.ClearLabel)})})]})}function F1({time:t=!0,...e}){const{AltDateWidget:n}=e.registry.widgets;return f.jsx(n,{time:t,...e})}function P1({schema:t,uiSchema:e,options:n,id:r,value:i,disabled:s,readonly:o,label:a,hideLabel:l,autofocus:u=!1,onBlur:d,onFocus:c,onChange:h,registry:g,htmlName:m}){const p=W("DescriptionFieldTemplate",g,n),y=Bn(t),x=N.useCallback(j=>h(j.target.checked),[h]),b=N.useCallback(j=>d(r,j.target.checked),[d,r]),O=N.useCallback(j=>c(r,j.target.checked),[c,r]),w=L(e).widget==="checkbox"?void 0:n.description??t.description;return f.jsxs("div",{className:`checkbox ${s||o?"disabled":""}`,children:[!l&&w&&f.jsx(p,{id:qt(r),description:w,schema:t,uiSchema:e,registry:g}),f.jsxs("label",{children:[f.jsx("input",{type:"checkbox",id:r,name:m||r,checked:typeof i>"u"?!1:i,required:y,disabled:s||o,autoFocus:u,onChange:x,onBlur:b,onFocus:O,"aria-describedby":Fe(r)}),mc(f.jsx("span",{children:a}),l)]})]})}function $1({id:t,disabled:e,options:n,value:r,autofocus:i=!1,readonly:s,onChange:o,onBlur:a,onFocus:l,htmlName:u}){const{inline:d=!1,enumOptions:c,enumDisabled:h,emptyValue:g}=n,m=xn(n),p=Array.isArray(r)?r:[r],y=N.useCallback(({target:b})=>a(t,Ie(b&&b.value,c,m,g)),[a,t,c,g,m]),x=N.useCallback(({target:b})=>l(t,Ie(b&&b.value,c,m,g)),[l,t,c,g,m]);return f.jsx("div",{className:"checkboxes",id:t,children:Array.isArray(c)&&c.map((b,O)=>{const S=ar(b.value,p),v=Array.isArray(h)&&h.indexOf(b.value)!==-1,w=e||v||s?"disabled":"",j=A=>{A.target.checked?o(ac(O,p,c)):o(oc(O,p,c))},E=f.jsxs("span",{children:[f.jsx("input",{type:"checkbox",id:Pt(t,O),name:u||t,checked:S,value:lr(b.value,O,m),disabled:e||v||s,autoFocus:i&&O===0,onChange:j,onBlur:y,onFocus:x,"aria-describedby":Fe(t)}),f.jsx("span",{children:b.label})]});return d?f.jsx("label",{className:`checkbox-inline ${w}`,children:E},O):f.jsx("div",{className:`checkbox ${w}`,children:f.jsx("label",{children:E})},O)})})}function D1(t){const{disabled:e,readonly:n,options:r,registry:i}=t,s=W("BaseInputTemplate",i,r);return f.jsx(s,{type:"color",...t,disabled:e||n})}function k1(t){const{onChange:e,options:n,registry:r}=t,i=W("BaseInputTemplate",r,n),s=N.useCallback(o=>e(o||void 0),[e]);return f.jsx(i,{type:"date",...t,onChange:s})}function R1(t){const{onChange:e,value:n,options:r,registry:i}=t,s=W("BaseInputTemplate",i,r);return f.jsx(s,{type:"datetime-local",...t,value:Y0(n),onChange:o=>e(M0(o))})}function M1(t){const{options:e,registry:n}=t,r=W("BaseInputTemplate",n,e);return f.jsx(r,{type:"email",...t})}function U1({fileInfo:t,registry:e}){const{translateString:n}=e,{dataURL:r,type:i,name:s}=t;return r?["image/jpeg","image/png"].includes(i)?f.jsx("img",{src:r,style:{maxWidth:"100%"},className:"file-preview"}):f.jsxs(f.Fragment,{children:[" ",f.jsx("a",{download:`preview-${s}`,href:r,className:"file-download",children:n(Y.PreviewLabel)})]}):null}function L1({filesInfo:t,registry:e,preview:n,onRemove:r,options:i}){if(t.length===0)return null;const{translateString:s}=e,{RemoveButton:o}=W("ButtonTemplates",e,i);return f.jsx("ul",{className:"file-info",children:t.map((a,l)=>{const{name:u,size:d,type:c}=a,h=()=>r(l);return f.jsxs("li",{children:[f.jsx(ur,{children:s(Y.FilesInfo,[u,c,String(d)])}),n&&f.jsx(U1,{fileInfo:a,registry:e}),f.jsx(o,{onClick:h,registry:e})]},l)})})}function B1(t){const{disabled:e,readonly:n,required:r,multiple:i,onChange:s,value:o,options:a,registry:l}=t,{filesInfo:u,handleChange:d,handleRemove:c}=G0(o,s,i),h=W("BaseInputTemplate",l,a),g=m=>{m.target.files&&d(m.target.files)};return f.jsxs("div",{children:[f.jsx(h,{...t,disabled:e||n,type:"file",required:o?!1:r,onChangeOverride:g,value:"",accept:a.accept?String(a.accept):void 0}),f.jsx(L1,{filesInfo:u,onRemove:c,registry:l,preview:a.filePreview,options:a})]})}function V1({id:t,value:e,htmlName:n}){return f.jsx("input",{type:"hidden",id:t,name:n||t,value:typeof e>"u"?"":e})}function W1(t){const{options:e,registry:n}=t,r=W("BaseInputTemplate",n,e);return f.jsx(r,{type:"password",...t})}function q1({options:t,value:e,required:n,disabled:r,readonly:i,autofocus:s=!1,onBlur:o,onFocus:a,onChange:l,id:u,htmlName:d}){const{enumOptions:c,enumDisabled:h,inline:g,emptyValue:m}=t,p=xn(t),y=N.useCallback(({target:b})=>o(u,Ie(b&&b.value,c,p,m)),[o,c,m,u,p]),x=N.useCallback(({target:b})=>a(u,Ie(b&&b.value,c,p,m)),[a,c,m,u,p]);return f.jsx("div",{className:"field-radio-group",id:u,role:"radiogroup",children:Array.isArray(c)&&c.map((b,O)=>{const S=ar(b.value,e),v=Array.isArray(h)&&h.indexOf(b.value)!==-1,w=r||v||i?"disabled":"",j=()=>l(b.value),E=f.jsxs("span",{children:[f.jsx("input",{type:"radio",id:Pt(u,O),checked:S,name:d||u,required:n,value:lr(b.value,O,p),disabled:r||v||i,autoFocus:s&&O===0,onChange:j,onBlur:y,onFocus:x,"aria-describedby":Fe(u)}),f.jsx("span",{children:b.label})]});return g?f.jsx("label",{className:`radio-inline ${w}`,children:E},O):f.jsx("div",{className:`radio ${w}`,children:f.jsx("label",{children:E})},O)})})}function z1(t){const{value:e,registry:{templates:{BaseInputTemplate:n}}}=t;return f.jsxs("div",{className:"field-range-wrapper",children:[f.jsx(n,{type:"range",...t}),f.jsx("span",{className:"range-view",children:e})]})}function K1({id:t,value:e,required:n,disabled:r,readonly:i,autofocus:s,onChange:o,onFocus:a,onBlur:l,schema:u,options:d,htmlName:c}){const{stars:h=5,shape:g="star"}=d,m=u.maximum?Math.min(u.maximum,5):Math.min(Math.max(h,1),5),p=u.minimum||0,y=N.useCallback(S=>{!r&&!i&&o(S)},[o,r,i]),x=N.useCallback(S=>{if(a){const v=Number(S.target.dataset.value);a(t,v)}},[a,t]),b=N.useCallback(S=>{if(l){const v=Number(S.target.dataset.value);l(t,v)}},[l,t]),O=S=>g==="heart"?S?"♥":"♡":S?"★":"☆";return f.jsx(f.Fragment,{children:f.jsxs("div",{className:"rating-widget",style:{display:"inline-flex",fontSize:"1.5rem",cursor:r||i?"default":"pointer"},children:[[...Array(m)].map((S,v)=>{const w=p+v,j=w<=e;return f.jsx("span",{onClick:()=>y(w),onFocus:x,onBlur:b,"data-value":w,tabIndex:r||i?-1:0,role:"radio","aria-checked":w===e,"aria-label":`${w} ${g==="heart"?"heart":"star"}${w===1?"":"s"}`,style:{color:j?"#FFD700":"#ccc",padding:"0 0.2rem",transition:"color 0.2s",userSelect:"none"},children:O(j)},v)}),f.jsx("input",{type:"hidden",id:t,name:c||t,value:e||"",required:n,disabled:r||i,"aria-hidden":"true"})]})})}function xi(t,e){return e?Array.from(t.target.options).slice().filter(n=>n.selected).map(n=>n.value):t.target.value}function H1({schema:t,id:e,options:n,value:r,required:i,disabled:s,readonly:o,multiple:a=!1,autofocus:l=!1,onChange:u,onBlur:d,onFocus:c,placeholder:h,htmlName:g}){const{enumOptions:m,enumDisabled:p,emptyValue:y}=n,x=a?[]:"",b=xn(n),O=N.useCallback(E=>{const A=xi(E,a);return c(e,Ie(A,m,b,y))},[c,e,a,m,y,b]),S=N.useCallback(E=>{const A=xi(E,a);return d(e,Ie(A,m,b,y))},[d,e,a,m,y,b]),v=N.useCallback(E=>{const A=xi(E,a);return u(Ie(A,m,b,y))},[u,a,m,y,b]),w=sc(r,m,a,b,x),j=!a&&t.default===void 0;return f.jsxs("select",{id:e,name:g||e,multiple:a,role:"combobox",className:"form-control",value:w,required:i,disabled:s||o,autoFocus:l,onBlur:S,onFocus:O,onChange:v,"aria-describedby":Fe(e),children:[j&&f.jsx("option",{value:"",children:h}),Array.isArray(m)&&m.map(({value:E,label:A},C)=>{const T=p&&p.indexOf(E)!==-1;return f.jsx("option",{value:lr(E,C,b),disabled:T,children:A},C)})]})}function G1({id:t,options:e={},placeholder:n,value:r,required:i,disabled:s,readonly:o,autofocus:a=!1,onChange:l,onBlur:u,onFocus:d,htmlName:c}){const h=N.useCallback(({target:{value:p}})=>l(p===""?e.emptyValue:p),[l,e.emptyValue]),g=N.useCallback(({target:p})=>u(t,p&&p.value),[u,t]),m=N.useCallback(({target:p})=>d(t,p&&p.value),[t,d]);return f.jsx("textarea",{id:t,name:c||t,className:"form-control",value:r||"",placeholder:n,required:i,disabled:s,readOnly:o,autoFocus:a,rows:e.rows,onBlur:g,onFocus:m,onChange:h,"aria-describedby":Fe(t)})}function Y1(t){const{options:e,registry:n}=t,r=W("BaseInputTemplate",n,e);return f.jsx(r,{...t})}function J1(t){const{onChange:e,options:n,registry:r}=t,i=W("BaseInputTemplate",r,n),s=N.useCallback(o=>e(o?`${o}:00`:void 0),[e]);return f.jsx(i,{type:"time",...t,onChange:s})}function Z1(t){const{options:e,registry:n}=t,r=W("BaseInputTemplate",n,e);return f.jsx(r,{type:"url",...t})}function X1(t){const{options:e,registry:n}=t,r=W("BaseInputTemplate",n,e);return f.jsx(r,{type:"number",...t})}function Q1(){return{AltDateWidget:N1,AltDateTimeWidget:F1,CheckboxWidget:P1,CheckboxesWidget:$1,ColorWidget:D1,DateWidget:k1,DateTimeWidget:R1,EmailWidget:M1,FileWidget:B1,HiddenWidget:V1,PasswordWidget:W1,RadioWidget:q1,RangeWidget:z1,RatingWidget:K1,SelectWidget:H1,TextWidget:Y1,TextareaWidget:G1,TimeWidget:J1,UpDownWidget:X1,URLWidget:Z1}}function eS(){return{fields:e1(),templates:I1(),widgets:Q1(),rootSchema:{},formContext:{},translateString:S0,globalFormOptions:{idPrefix:Wa,idSeparator:qa,useFallbackUiForUnsupportedType:!1}}}function Ht(t,e){return{...Ns(t,["schema","uiSchema","fieldPathId","schemaUtils","formData","edit","errors","errorSchema"]),...e!==void 0&&{status:e}}}let tS=class extends N.Component{formElement;pendingChanges=[];_isProcessingUserChange=!1;static getDerivedStateFromProps(e,n){if(e.extraErrors!==n._prevExtraErrors){const r={errors:n.schemaValidationErrors||[],errorSchema:n.schemaValidationErrorSchema||{}};let{errors:i,errorSchema:s}=r;return e.extraErrors&&({errors:i,errorSchema:s}=Dn(r,e.extraErrors)),n.customErrors&&({errors:i,errorSchema:s}=Dn({errors:i,errorSchema:s},n.customErrors.ErrorSchema,!0)),{_prevExtraErrors:e.extraErrors,errors:i,errorSchema:s}}return null}constructor(e){if(super(e),!e.validator)throw new Error("A validator is required for Form functionality to work");const{formData:n,initialFormData:r,onChange:i}=e,s=n??r;this.state={...this.getStateFromProps(e,s,void 0,void 0,void 0,!0),_prevExtraErrors:e.extraErrors},i&&!he(this.state.formData,s)&&i(Ht(this.state)),this.formElement=N.createRef()}getSnapshotBeforeUpdate(e,n){if(!he(this.props,e)){const r=Zo(this.props.formData,e.formData),i=Zo(this.props.formData,this.state.formData),s=!he(e.schema,this.props.schema),o=r.length>0||!he(e.formData,this.props.formData),a=i.length>0||!he(this.state.formData,this.props.formData),l=this.getStateFromProps(this.props,this.props.formData,s||o?void 0:this.state.retrievedSchema,s,r,!a),u=!he(l,n);return{nextState:l,shouldUpdate:u}}return{shouldUpdate:!1}}componentDidUpdate(e,n,r){if(r.shouldUpdate){const{nextState:i}=r,s=!he(i.formData,this.props.formData),o=this._isProcessingUserChange;if(this._isProcessingUserChange=!1,o&&s)return;s&&!he(i.formData,n.formData)&&this.props.onChange&&this.props.onChange(Ht(i)),this.setState(i)}}getStateFromProps(e,n,r,i=!1,s=[],o=!1){const a=this.state||{},l="schema"in e?e.schema:this.props.schema,u="validator"in e?e.validator:this.props.validator,d=("uiSchema"in e?e.uiSchema:this.props.uiSchema)||{},c=e.formData===void 0&&this.props.formData===void 0,h=typeof n<"u",g="liveValidate"in e?e.liveValidate:this.props.liveValidate,m=h&&!e.noValidate&&g,p="experimental_defaultFormStateBehavior"in e?e.experimental_defaultFormStateBehavior:this.props.experimental_defaultFormStateBehavior,y="experimental_customMergeAllOf"in e?e.experimental_customMergeAllOf:this.props.experimental_customMergeAllOf;let x=a.schemaUtils;(!x||x.doesSchemaUtilsDiffer(u,l,p,y))&&(x=b0(u,l,p,y));const b=x.getRootSchema();let O=n;n===Ea?O=void 0:n===void 0&&c&&(O=a.formData);const S=x.getDefaultFormState(b,O,!1,a.initialDefaultsGenerated),v=this.updateRetrievedSchema(r??x.retrieveSchema(b,S)),w=()=>e.noValidate||i?{errors:[],errorSchema:{}}:e.liveValidate?{errors:a.errors||[],errorSchema:a.errorSchema||{}}:{errors:a.schemaValidationErrors||[],errorSchema:a.schemaValidationErrorSchema||{}};let j,E,A=a.schemaValidationErrors,C=a.schemaValidationErrorSchema;if(m&&!o){const F=this.liveValidate(b,x,a.errorSchema,S,void 0,a.customErrors,r,r!==void 0);j=F.errors,E=F.errorSchema,A=F.schemaValidationErrors,C=F.schemaValidationErrorSchema}else{const F=w();if(j=F.errors,E=F.errorSchema,s.length>0&&!m){const R=s.reduce((B,V)=>(B[V]=void 0,B),{});E=C=Mt(F.errorSchema,R,"preventDuplicates")}const D=this.mergeErrors({errorSchema:E,errors:j},e.extraErrors,a.customErrors);j=D.errors,E=D.errorSchema}const T=this.getRegistry(e,b,x),_=he(a.registry,T)?a.registry:T,I=a.fieldPathId&&a.fieldPathId?.[de]===_.globalFormOptions.idPrefix?a.fieldPathId:Ue("",_.globalFormOptions);return{schemaUtils:x,schema:b,uiSchema:d,fieldPathId:I,formData:S,edit:h,errors:j,errorSchema:E,schemaValidationErrors:A,schemaValidationErrorSchema:C,retrievedSchema:v,initialDefaultsGenerated:!0,registry:_}}shouldComponentUpdate(e,n){const{experimental_componentUpdateStrategy:r="customDeep"}=this.props;return hc(this,e,n,r)}validate(e,n=this.state.schema,r,i){const s=r||this.state.schemaUtils,{customValidate:o,transformErrors:a,uiSchema:l}=this.props,u=i??s.retrieveSchema(n,e);return s.getValidator().validateFormData(e,u,o,a,l)}renderErrors(e){const{errors:n,errorSchema:r,schema:i,uiSchema:s}=this.state,o=L(s),a=W("ErrorListTemplate",e,o);return n&&n.length?f.jsx(a,{errors:n,errorSchema:r||{},schema:i,uiSchema:s,registry:e}):null}mergeErrors(e,n,r){let i=e.errorSchema,s=e.errors;if(n){const o=Dn(e,n);i=o.errorSchema,s=o.errors}if(r){const o=Dn({errors:s,errorSchema:i},r.ErrorSchema,!0);i=o.errorSchema,s=o.errors}return{errors:s,errorSchema:i}}liveValidate(e,n,r,i,s,o,a,l=!1){const u=this.validate(i,e,n,a),d=u.errors;let c=u.errorSchema;l&&(c=Mt(r,u.errorSchema,"preventDuplicates"));const h=d,g=c;return{...this.mergeErrors({errorSchema:c,errors:d},s,o),schemaValidationErrors:h,schemaValidationErrorSchema:g}}getUsedFormData=(e,n)=>nc(e,n);getFieldNames=(e,n)=>rc(e,n);omitExtraData=e=>{const{schema:n,schemaUtils:r}=this.state;return r.omitExtraData(n,e)};setFieldValue=(e,n)=>{const{registry:r}=this.state,i=Array.isArray(e)?e:e.split("."),s=Ue("",r.globalFormOptions,i);this.onChange(n,i,void 0,s[de])};onChange=(e,n,r,i)=>{this.pendingChanges.push({newValue:e,path:n,newErrorSchema:r,id:i}),this.pendingChanges.length===1&&this.processPendingChange()};processPendingChange(){if(this.pendingChanges.length===0)return;this._isProcessingUserChange=!0;const{newValue:e,path:n,id:r}=this.pendingChanges[0],{newErrorSchema:i}=this.pendingChanges[0],{extraErrors:s,omitExtraData:o,liveOmit:a,noValidate:l,liveValidate:u,onChange:d,removeEmptyOptionalObjects:c}=this.props,{formData:h,schemaUtils:g,schema:m,fieldPathId:p,schemaValidationErrorSchema:y,errors:x}=this.state;let{customErrors:b,errorSchema:O}=this.state;const S=p.path[0]||"",v=!n||n.length===0||n.length===1&&n[0]===S;let w=this.state.retrievedSchema,j=v?e:Fs(h);const E=K(j)&&Object.keys(j).length>0&&Object.values(j).every(k=>k===void 0),A=h==null,C=E&&A?void 0:j;if(K(j)||Array.isArray(j)){e===Ic?Q0(j,n):v||ce(j,n,e);const k=this.getStateFromProps(this.props,C,void 0,void 0,void 0,!0);j=k.formData,w=k.retrievedSchema}const T=!l&&(u===!0||u==="onChange");let _={formData:j,schema:m},I=j;if(o===!0&&(a===!0||a==="onChange")&&(I=this.omitExtraData(j),_={formData:I}),c&&(I=nn(g.getValidator(),m,g.getRootSchema(),I),_={..._,formData:I}),i){const k=v?y:$(y,n);if(!ye(k))v?O=i:ce(O,n,i);else if(b||(b=new lc),v){const F=$(i,_e);F&&b.setErrors(F)}else ce(b.ErrorSchema,n,i)}else b&&$(b.ErrorSchema,[...n,_e])&&b.clearErrors(n);if(T&&this.pendingChanges.length===1){const k=this.liveValidate(m,g,O,I,s,b,w);_={formData:I,...k,customErrors:b}}else if(!l&&i){const k=this.mergeErrors({errorSchema:O,errors:x},s,b);_={formData:I,...k,customErrors:b}}this.setState(_,()=>{d&&d(Ht({...this.state,..._}),r),this.pendingChanges.shift(),this.processPendingChange()})}updateRetrievedSchema(e){return he(e,this.state?.retrievedSchema)?this.state.retrievedSchema:e}reset=()=>{const{formData:e,initialFormData:n=Ea,onChange:r}=this.props,o={formData:this.getStateFromProps(this.props,e??n,void 0,void 0,void 0,!0).formData,errorSchema:{},errors:[],schemaValidationErrors:[],schemaValidationErrorSchema:{},initialDefaultsGenerated:!1,customErrors:void 0};this.setState(o,()=>r&&r(Ht({...this.state,...o})))};onBlur=(e,n)=>{const{onBlur:r,omitExtraData:i,liveOmit:s,liveValidate:o,removeEmptyOptionalObjects:a}=this.props;if(r&&r(e,n),i===!0&&s==="onBlur"||o==="onBlur"){const{onChange:l,extraErrors:u}=this.props,{formData:d,schemaUtils:c,schema:h}=this.state;let g=d,m={formData:g};if(i===!0&&s==="onBlur"&&(g=this.omitExtraData(d),m={formData:g}),a&&(g=nn(c.getValidator(),h,c.getRootSchema(),g),m={...m,formData:g}),o==="onBlur"){const{schema:y,schemaUtils:x,errorSchema:b,customErrors:O,retrievedSchema:S}=this.state,v=this.liveValidate(y,x,b,g,u,O,S);m={formData:g,...v,customErrors:O}}const p=Object.keys(m).filter(y=>!y.startsWith("schemaValidation")).some(y=>{const x=$(this.state,y),b=$(m,y);return!he(x,b)});this.setState(m,()=>{l&&p&&l(Ht({...this.state,...m}),e)})}};onFocus=(e,n)=>{const{onFocus:r}=this.props;r&&r(e,n)};onSubmit=e=>{if(e.preventDefault(),e.target!==e.currentTarget)return;e.persist();const{omitExtraData:n,extraErrors:r,noValidate:i,onSubmit:s,removeEmptyOptionalObjects:o}=this.props;let{formData:a}=this.state;if(n===!0&&(a=this.omitExtraData(a)),o){const{schemaUtils:l,schema:u}=this.state;a=nn(l.getValidator(),u,l.getRootSchema(),a)}if(i||this.validateFormWithFormData(a)){const l=r||{},u=r?Rs(r):[];this.setState({formData:a,errors:u,errorSchema:l,schemaValidationErrors:[],schemaValidationErrorSchema:{}},()=>{s&&s(Ht({...this.state,formData:a},"submitted"),e)})}};getGlobalFormOptions(e){const{uiSchema:n={},experimental_componentUpdateStrategy:r,idSeparator:i=qa,idPrefix:s=Wa,nameGenerator:o,useFallbackUiForUnsupportedType:a=!1}=e;return{idPrefix:n["ui:rootFieldId"]||s,idSeparator:i,useFallbackUiForUnsupportedType:a,...r!==void 0&&{experimental_componentUpdateStrategy:r},...o!==void 0&&{nameGenerator:o}}}getRegistry(e,n,r){const{translateString:i,uiSchema:s={}}=e,{fields:o,templates:a,widgets:l,formContext:u,translateString:d}=eS();return{fields:{...o,...e.fields},templates:{...a,...e.templates,ButtonTemplates:{...a.ButtonTemplates,...e.templates?.ButtonTemplates}},widgets:{...l,...e.widgets},rootSchema:n,formContext:e.formContext||u,schemaUtils:r,translateString:i||d,globalUiOptions:s[Ni],globalFormOptions:this.getGlobalFormOptions(e),uiSchemaDefinitions:s[tm]??{}}}submit=()=>{if(this.formElement.current){const e=new CustomEvent("submit",{cancelable:!0});e.preventDefault(),this.formElement.current.dispatchEvent(e),this.formElement.current.requestSubmit()}};focusOnError(e){const{idPrefix:n="root",idSeparator:r="_"}=this.props,{property:i}=e,s=pc(i);s[0]===""?s[0]=n:s.unshift(n);const o=s.join(r);let a=this.formElement.current.elements[o];a||(a=this.formElement.current.querySelector(`input[id^="${o}"], button[id^="${o}"]`)),a&&a.length&&(a=a[0]),a&&a.focus()}validateFormWithFormData=e=>{const{extraErrors:n,extraErrorsBlockSubmit:r,focusOnFirstError:i,onError:s}=this.props,{errors:o}=this.state,a=this.validate(e),{errors:l,errorSchema:u}=n?this.mergeErrors(a,n):a,d=a.errors.length>0||n&&r;return d?(i&&(typeof i=="function"?i(l[0]):this.focusOnError(l[0])),this.setState({errors:l,errorSchema:u,schemaValidationErrors:a.errors,schemaValidationErrorSchema:a.errorSchema},()=>{s?s(l):console.error("Form validation failed",l)})):l.length>0?this.setState({errors:l,errorSchema:u,schemaValidationErrors:[],schemaValidationErrorSchema:{}}):o.length>0&&this.setState({errors:[],errorSchema:{},schemaValidationErrors:[],schemaValidationErrorSchema:{}}),!d};validateForm(){const{omitExtraData:e,removeEmptyOptionalObjects:n}=this.props;let{formData:r}=this.state;if(e===!0&&(r=this.omitExtraData(r)),n){const{schemaUtils:i,schema:s}=this.state;r=nn(i.getValidator(),s,i.getRootSchema(),r)}return this.validateFormWithFormData(r)}render(){const{children:e,id:n,className:r="",tagName:i,name:s,method:o,target:a,action:l,autoComplete:u,enctype:d,acceptCharset:c,noHtml5Validate:h=!1,disabled:g,readonly:m,showErrorList:p="top",_internalFormWrapper:y}=this.props,{schema:x,uiSchema:b,formData:O,errorSchema:S,fieldPathId:v,registry:w}=this.state,{SchemaField:j}=w.fields,{SubmitButton:E}=w.templates.ButtonTemplates,A=y?i:void 0,C=y||i||"form";let{[_r]:T={}}=L(b);g&&(T={...T,props:{...T.props,disabled:!0}});const _={[vt]:{[_r]:T}};return f.jsxs(C,{className:r||"rjsf",id:n,name:s,method:o,target:a,action:l,autoComplete:u,encType:d,acceptCharset:c,noValidate:h,onSubmit:this.onSubmit,as:A,ref:this.formElement,children:[p==="top"&&this.renderErrors(w),f.jsx(j,{name:"",schema:x,uiSchema:b,errorSchema:S,fieldPathId:v,formData:O,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,registry:w,disabled:g,readonly:m}),e||f.jsx(E,{uiSchema:_,registry:w}),p==="bottom"&&this.renderErrors(w)]})}};function nS(t){return N.forwardRef(({fields:e,widgets:n,templates:r,...i},s)=>(e={...t?.fields,...e},n={...t?.widgets,...n},r={...t?.templates,...r,ButtonTemplates:{...t?.templates?.ButtonTemplates,...r?.ButtonTemplates}},f.jsx(tS,{...t,...i,fields:e,widgets:n,templates:r,ref:s})))}var pr={exports:{}},vi={},Ca;function rS(){return Ca||(Ca=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(A,C){return{validate:A,compare:C}}t.fullFormats={date:e(s,o),time:e(l,u),"date-time":e(c,h),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:p,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:E,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:x,int32:{type:"number",validate:S},int64:{type:"number",validate:v},float:{type:"number",validate:w},double:{type:"number",validate:w},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,o),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,h),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function n(A){return A%4===0&&(A%100!==0||A%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function s(A){const C=r.exec(A);if(!C)return!1;const T=+C[1],_=+C[2],I=+C[3];return _>=1&&_<=12&&I>=1&&I<=(_===2&&n(T)?29:i[_])}function o(A,C){if(A&&C)return A>C?1:A<C?-1:0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function l(A,C){const T=a.exec(A);if(!T)return!1;const _=+T[1],I=+T[2],k=+T[3],F=T[5];return(_<=23&&I<=59&&k<=59||_===23&&I===59&&k===60)&&(!C||F!=="")}function u(A,C){if(!(A&&C))return;const T=a.exec(A),_=a.exec(C);if(T&&_)return A=T[1]+T[2]+T[3]+(T[4]||""),C=_[1]+_[2]+_[3]+(_[4]||""),A>C?1:A<C?-1:0}const d=/t|\s/i;function c(A){const C=A.split(d);return C.length===2&&s(C[0])&&l(C[1],!0)}function h(A,C){if(!(A&&C))return;const[T,_]=A.split(d),[I,k]=C.split(d),F=o(T,I);if(F!==void 0)return F||u(_,k)}const g=/\/|:/,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function p(A){return g.test(A)&&m.test(A)}const y=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function x(A){return y.lastIndex=0,y.test(A)}const b=-2147483648,O=2**31-1;function S(A){return Number.isInteger(A)&&A<=O&&A>=b}function v(A){return Number.isInteger(A)}function w(){return!0}const j=/[^\\]\\Z/;function E(A){if(j.test(A))return!1;try{return new RegExp(A),!0}catch{return!1}}})(vi)),vi}var Si={},Aa;function iS(){return Aa||(Aa=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const e=xu(),n=$a(),r=n.operators,i={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:a,schemaCode:l})=>n.str`should be ${i[a].okStr} ${l}`,params:({keyword:a,schemaCode:l})=>n._`{comparison: ${i[a].okStr}, limit: ${l}}`};t.formatLimitDefinition={keyword:Object.keys(i),type:"string",schemaType:"string",$data:!0,error:s,code(a){const{gen:l,data:u,schemaCode:d,keyword:c,it:h}=a,{opts:g,self:m}=h;if(!g.validateFormats)return;const p=new e.KeywordCxt(h,m.RULES.all.format.definition,"format");p.$data?y():x();function y(){const O=l.scopeValue("formats",{ref:m.formats,code:g.code.formats}),S=l.const("fmt",n._`${O}[${p.schemaCode}]`);a.fail$data(n.or(n._`typeof ${S} != "object"`,n._`${S} instanceof RegExp`,n._`typeof ${S}.compare != "function"`,b(S)))}function x(){const O=p.schema,S=m.formats[O];if(!S||S===!0)return;if(typeof S!="object"||S instanceof RegExp||typeof S.compare!="function")throw new Error(`"${c}": format "${O}" does not define "compare" function`);const v=l.scopeValue("formats",{key:O,ref:S,code:g.code.formats?n._`${g.code.formats}${n.getProperty(O)}`:void 0});a.fail$data(b(v))}function b(O){return n._`${O}.compare(${u}, ${d}) ${i[c].fail} 0`}},dependencies:["format"]};const o=a=>(a.addKeyword(t.formatLimitDefinition),a);t.default=o})(Si)),Si}var _a;function sS(){return _a||(_a=1,(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const n=rS(),r=iS(),i=$a(),s=new i.Name("fullFormats"),o=new i.Name("fastFormats"),a=(u,d={keywords:!0})=>{if(Array.isArray(d))return l(u,d,n.fullFormats,s),u;const[c,h]=d.mode==="fast"?[n.fastFormats,o]:[n.fullFormats,s],g=d.formats||n.formatNames;return l(u,g,c,h),d.keywords&&r.default(u),u};a.get=(u,d="full")=>{const h=(d==="fast"?n.fastFormats:n.fullFormats)[u];if(!h)throw new Error(`Unknown format "${u}"`);return h};function l(u,d,c,h){var g,m;(g=(m=u.opts.code).formats)!==null&&g!==void 0||(m.formats=i._`require("ajv-formats/dist/formats").${h}`);for(const p of d)u.addFormat(p,c[p])}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a})(pr,pr.exports)),pr.exports}var oS=sS();const Ta=Xi(oS),aS={allErrors:!0,multipleOfPrecision:8,strict:!1,verbose:!0,discriminator:!1},lS=/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,cS=/^data:([a-z]+\/[a-z0-9-+.]+)?;(?:name=(.*);)?base64,(.*)$/;function uS(t,e,n={},r,i=Ra,s){let o=new i({...aS,...n});return r?Ta(o,r):r!==!1&&Ta(o),o.addFormat("data-url",cS),o.addFormat("color",lS),o.addKeyword(ot),o.addKeyword(ss),Array.isArray(t)&&o.addMetaSchema(t),ne(e)&&Object.keys(e).forEach(a=>{o.addFormat(a,e[a])}),s&&(o=s(o)),o}function dS(t,e="none"){return e==="all"?t:t.reduce((n,r)=>{const{message:i,schemaPath:s}=r,o=e!=="anyOf"?s?.indexOf(`/${ee}/`):void 0,a=e!=="oneOf"?s?.indexOf(`/${z}/`):void 0;let l;return o&&o>=0?l=s?.substring(0,o):a&&a>=0&&(l=s?.substring(0,a)),l&&n.find(d=>{var c;return d.message===i&&((c=d.schemaPath)===null||c===void 0?void 0:c.startsWith(l))})||n.push(r),n},[])}function fS(t=[],e,n){const r=t.map(i=>{var s;const{instancePath:o,keyword:a,params:l,schemaPath:u,parentSchema:d,...c}=i;let{message:h=""}=c,g=o.replace(/\//g,"."),m=`${g} ${h}`.trim(),p="";const y=[...((s=l.deps)===null||s===void 0?void 0:s.split(", "))||[],l.missingProperty,l.property].filter(x=>x);if(y.length>0)y.forEach(x=>{const b=g?`${g}.${x}`:x;let O=L($(e,`${b.replace(/^\./,"")}`)).title;if(O===void 0){const S=u.replace(/\/properties\//g,"/").split("/").slice(1,-1).concat([x]);O=L($(e,S)).title}if(O)h=h.replace(`'${x}'`,`'${O}'`),p=O;else{const S=$(d,[ie,x,"title"]);S&&(h=h.replace(`'${x}'`,`'${S}'`),p=S)}}),m=h;else{const x=L($(e,`${g.replace(/^\./,"")}`)).title;if(x)m=`'${x}' ${h}`.trim(),p=x;else{const b=d?.title;b&&(m=`'${b}' ${h}`.trim(),p=b)}}return"missingProperty"in l&&(g=g?`${g}.${l.missingProperty}`:l.missingProperty),{name:a,property:g,message:h,params:l,stack:m,schemaPath:u,title:p}});return dS(r,n)}function mS(t,e,n,r,i,s,o,a){const{validationError:l}=e;let u=fS(e.errors,o,a);l&&(u=[...u,{stack:l.message}]),typeof s=="function"&&(u=s(u,o));let d=B0(u);if(l&&(d={...d,$schema:{__errors:[l.message]}}),typeof i!="function")return{errors:u,errorSchema:d};const c=Zl(t,r,n,r,!0),h=i(c,Fi(c),o,d),g=gc(h);return Dn({errors:u,errorSchema:d},g)}class hS{constructor(e,n){const{additionalMetaSchemas:r,customFormats:i,ajvOptionsOverrides:s,ajvFormatOptions:o,AjvClass:a,extenderFn:l,suppressDuplicateFiltering:u}=e;this.ajv=uS(r,i,s,o,a,l),this.localizer=n,this.suppressDuplicateFiltering=u}reset(){this.ajv.removeSchema()}rawValidation(e,n){var r,i;let s,o;try{e[de]&&(o=this.ajv.getSchema(e[de])),o===void 0&&(o=this.ajv.compile(e)),o(n)}catch(l){s=l}let a;return o&&(typeof this.localizer=="function"&&(((r=o.errors)!==null&&r!==void 0?r:[]).forEach(l=>{var u;["missingProperty","property"].forEach(d=>{var c;!((c=l.params)===null||c===void 0)&&c[d]&&(l.params[d]=`'${l.params[d]}'`)}),!((u=l.params)===null||u===void 0)&&u.deps&&(l.params.deps=l.params.deps.split(", ").map(d=>`'${d}'`).join(", "))}),this.localizer(o.errors),((i=o.errors)!==null&&i!==void 0?i:[]).forEach(l=>{var u;["missingProperty","property"].forEach(d=>{var c;!((c=l.params)===null||c===void 0)&&c[d]&&(l.params[d]=l.params[d].slice(1,-1))}),!((u=l.params)===null||u===void 0)&&u.deps&&(l.params.deps=l.params.deps.split(", ").map(d=>d.slice(1,-1)).join(", "))})),a=o.errors||void 0,o.errors=null),{errors:a,validationError:s}}validateFormData(e,n,r,i,s){const o=this.rawValidation(n,e);return mS(this,o,e,n,r,i,s,this.suppressDuplicateFiltering)}handleSchemaUpdate(e){var n,r;const i=(n=e[de])!==null&&n!==void 0?n:za;this.ajv.getSchema(i)===void 0?this.ajv.addSchema(e,i):he(e,(r=this.ajv.getSchema(i))===null||r===void 0?void 0:r.schema)||(this.ajv.removeSchema(i),this.ajv.addSchema(e,i))}isValid(e,n,r){var i;try{this.handleSchemaUpdate(r);const s=Ms(e),o=(i=s[de])!==null&&i!==void 0?i:D0(s);let a;return a=this.ajv.getSchema(o),a===void 0&&(a=this.ajv.addSchema(s,o).getSchema(o)||this.ajv.compile(s)),a(n)}catch(s){return console.warn("Error encountered compiling schema:",s),!1}}}function pS(t={},e){return new hS(t,e)}const gS=pS();const yS=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bS=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),Ia=t=>{const e=bS(t);return e.charAt(0).toUpperCase()+e.slice(1)},Dc=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),xS=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var vS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const SS=N.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>N.createElement("svg",{ref:l,...vS,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Dc("lucide",i),...!s&&!xS(a)&&{"aria-hidden":"true"},...a},[...o.map(([u,d])=>N.createElement(u,d)),...Array.isArray(s)?s:[s]]));const nt=(t,e)=>{const n=N.forwardRef(({className:r,...i},s)=>N.createElement(SS,{ref:s,iconNode:e,className:Dc(`lucide-${yS(Ia(t))}`,`lucide-${t}`,r),...i}));return n.displayName=Ia(t),n};const wS=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],jS=nt("check",wS);const OS=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],kc=nt("chevron-down",OS);const ES=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],CS=nt("chevron-up",ES);const AS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],_S=nt("circle-alert",AS);const TS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Rc=nt("circle-plus",TS);const IS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],NS=nt("circle",IS);const FS=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],PS=nt("copy",FS);const $S=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],DS=nt("search",$S);const kS=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],RS=nt("trash-2",kS);const MS=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Mc=nt("x",MS);function J(...t){return vu(Su(t))}const US=Qi("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function zs({className:t,variant:e,size:n,asChild:r=!1,...i}){const s=r?Da:"button";return f.jsx(s,{"data-slot":"button",className:J(US({variant:e,size:n,className:t})),...i})}function LS({uiSchema:t,registry:e,className:n,...r}){const{translateString:i}=e;return f.jsx("div",{className:"p-0 m-0",children:f.jsxs(zs,{...r,className:J("w-fit gap-2",n),variant:"outline",type:"button",children:[f.jsx(Rc,{size:16})," ",i(Y.AddItemButton)]})})}function BS(t){const{children:e,buttonsProps:n,displayLabel:r,hasDescription:i,hasToolbar:s,uiSchema:o,registry:a}=t,l=L(o),u=W("ArrayFieldItemButtonsTemplate",a,l),d=i?-6:22;return f.jsx("div",{children:f.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[f.jsx("div",{className:"grow shrink",children:e}),f.jsx("div",{className:"flex items-end justify-end p-0.5",children:s&&f.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${d}px`:void 0},children:f.jsx(u,{...n})})})]})})}function VS(t){const{canAdd:e,disabled:n,fieldPathId:r,uiSchema:i,items:s,optionalDataControl:o,onAddClick:a,readonly:l,registry:u,required:d,schema:c,title:h}=t,g=L(i),m=W("ArrayFieldDescriptionTemplate",u,g),p=W("ArrayFieldTitleTemplate",u,g),y=!l&&!n,{ButtonTemplates:{AddButton:x}}=u.templates;return f.jsx("div",{children:f.jsx("div",{className:"m-0 flex p-0",children:f.jsxs("div",{className:"m-0 w-full p-0",children:[f.jsx(p,{fieldPathId:r,title:g.title||h,schema:c,uiSchema:i,required:d,registry:u,optionalDataControl:y?o:void 0}),f.jsx(m,{fieldPathId:r,description:g.description||c.description,schema:c,uiSchema:i,registry:u}),f.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[y?void 0:o,s,e&&f.jsx("div",{className:"mt-2 flex justify-end",children:f.jsx(x,{id:Ze(r,"add"),className:"rjsf-array-item-add",onClick:a,disabled:n||l,uiSchema:i,registry:u})})]},`array-item-list-${r.$id}`)]})})})}function Uc({className:t,type:e,...n}){return f.jsx("input",{type:e,"data-slot":"input",className:J("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n})}function WS({id:t,htmlName:e,placeholder:n,required:r,readonly:i,disabled:s,type:o,value:a,onChange:l,onChangeOverride:u,onBlur:d,onFocus:c,autofocus:h,options:g,schema:m,rawErrors:p=[],children:y,extraProps:x,className:b,registry:O}){const{ClearButton:S}=O.templates.ButtonTemplates,v={...x,...uc(m,o,g)},w=({target:{value:C}})=>l(C===""?g.emptyValue:C),j=({target:C})=>d(t,C&&C.value),E=({target:C})=>c(t,C&&C.value),A=N.useCallback(C=>{var T;C.preventDefault(),C.stopPropagation(),l((T=g.emptyValue)!==null&&T!==void 0?T:"")},[l,g.emptyValue]);return f.jsxs("div",{className:"p-0.5",children:[f.jsx(Uc,{id:t,name:e||t,type:o,placeholder:n,autoFocus:h,required:r,disabled:s,readOnly:i,className:J({"border-destructive focus-visible:ring-0":p.length>0},b),list:m.examples?zr(t):void 0,...v,value:a||a===0?a:"",onChange:u||w,onBlur:j,onFocus:E,"aria-describedby":Fe(t,!!m.examples)}),g.allowClearTextInputs&&!i&&!s&&a&&f.jsx(S,{onClick:A,registry:O}),y,f.jsx(Nc,{id:t,schema:m})]})}function qS({id:t,description:e,registry:n,uiSchema:r}){return e?f.jsx("div",{children:f.jsx("div",{id:t,className:"text-sm text-muted-foreground",children:f.jsx(Ws,{description:e,registry:n,uiSchema:r})})}):null}const zS=Qi("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function KS({className:t,variant:e,...n}){return f.jsx("div",{"data-slot":"alert",role:"alert",className:J(zS({variant:e}),t),...n})}function HS({className:t,...e}){return f.jsx("div",{"data-slot":"alert-title",className:J("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...e})}function GS({className:t,...e}){return f.jsx("div",{"data-slot":"alert-description",className:J("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...e})}function YS({errors:t,registry:e}){const{translateString:n}=e;return f.jsxs(KS,{variant:"destructive",className:"mb-2",children:[f.jsx(_S,{className:"h-4 w-4"}),f.jsx(HS,{children:n(Y.ErrorsLabel)}),f.jsx(GS,{className:"flex flex-col gap-1",children:t.map((r,i)=>f.jsxs("span",{children:["• ",r.stack]},i))})]})}function JS(t){const{errors:e=[],fieldPathId:n}=t;if(e.length===0)return null;const r=$s(n);return f.jsx("div",{className:"flex flex-col gap-1",id:r,children:e.map((i,s)=>f.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:i},s))})}function ZS(t){const{fieldPathId:e,help:n,uiSchema:r,registry:i,hasErrors:s}=t;return n?f.jsx("span",{className:J("text-xs font-medium text-muted-foreground",{"text-destructive":s}),id:Ds(e),children:f.jsx(qs,{help:n,registry:i,uiSchema:r})}):null}function XS({id:t,children:e,displayLabel:n,rawErrors:r=[],errors:i,help:s,description:o,rawDescription:a,classNames:l,style:u,disabled:d,label:c,hidden:h,onKeyRename:g,onKeyRenameBlur:m,onRemoveProperty:p,readonly:y,required:x,schema:b,uiSchema:O,registry:S}){const v=L(O),w=W("WrapIfAdditionalTemplate",S,v);if(h)return f.jsx("div",{className:"hidden",children:e});const j=v.widget==="checkbox";return f.jsx(w,{classNames:l,style:u,disabled:d,id:t,label:c,displayLabel:n,onKeyRename:g,onKeyRenameBlur:m,onRemoveProperty:p,rawDescription:a,readonly:y,required:x,schema:b,uiSchema:O,registry:S,children:f.jsxs("div",{className:"flex flex-col gap-2",children:[n&&!j&&f.jsxs("label",{className:J("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":r.length>0}),htmlFor:t,children:[c,x?"*":null]}),e,n&&a&&!j&&f.jsx("span",{className:J("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:o}),i,s]})})}function QS(t){const{children:e,column:n,className:r,...i}=t;return f.jsx("div",{className:J("grid gap-2",r),...i,children:e})}function Sn(t){const{icon:e,iconType:n,className:r,uiSchema:i,registry:s,...o}=t;return f.jsx(zs,{size:"icon",variant:"outline",className:r,...o,type:"button",children:e})}function ew(t){const{registry:{translateString:e}}=t;return f.jsx(Sn,{title:e(Y.CopyButton),...t,icon:f.jsx(PS,{className:"h-4 w-4"})})}function tw(t){const{registry:{translateString:e}}=t;return f.jsx(Sn,{title:e(Y.MoveDownButton),...t,icon:f.jsx(kc,{className:"h-4 w-4"})})}function nw(t){const{registry:{translateString:e}}=t;return f.jsx(Sn,{title:e(Y.MoveUpButton),...t,icon:f.jsx(CS,{className:"h-4 w-4"})})}function Lc(t){const{registry:{translateString:e}}=t;return f.jsx(Sn,{title:e(Y.RemoveButton),...t,className:"border-destructive",icon:f.jsx(RS,{className:"h-4 w-4 stroke-destructive"})})}function rw(t){const{registry:{translateString:e}}=t;return f.jsx(Sn,{title:e(Y.ClearButton),...t,icon:f.jsx(Mc,{})})}function iw({selector:t,optionSchemaField:e}){return f.jsxs("div",{className:J("p-4 border rounded-md bg-background shadow-sm"),children:[f.jsx("div",{className:J("mb-4"),children:t}),e]})}function sw({description:t,title:e,properties:n,required:r,uiSchema:i,fieldPathId:s,schema:o,formData:a,optionalDataControl:l,onAddProperty:u,disabled:d,readonly:c,registry:h}){const g=L(i),m=W("TitleFieldTemplate",h,g),p=W("DescriptionFieldTemplate",h,g),y=!c&&!d,{ButtonTemplates:{AddButton:x}}=h.templates;return f.jsxs(f.Fragment,{children:[e&&f.jsx(m,{id:Kr(s),title:e,required:r,schema:o,uiSchema:i,registry:h,optionalDataControl:y?l:void 0}),t&&f.jsx(p,{id:qt(s),description:t,schema:o,uiSchema:i,registry:h}),f.jsxs("div",{className:"flex flex-col gap-2",children:[y?void 0:l,n.map((b,O)=>f.jsx("div",{className:`${b.hidden?"hidden":""} flex`,children:f.jsx("div",{className:"w-full",children:b.content})},O)),Ka(o,i,a)?f.jsx("div",{className:"mt-2 flex justify-end",children:f.jsx(x,{id:Ze(s,"add"),onClick:u,disabled:d||c,className:"rjsf-object-property-expand",uiSchema:i,registry:h})}):null]})]})}function ow(t){const{id:e,registry:n,label:r,onAddClick:i,onRemoveClick:s}=t;return i?f.jsx(Sn,{id:e,registry:n,className:"rjsf-add-optional-data",onClick:i,title:r,icon:f.jsx(Rc,{}),size:"xs"}):s?f.jsx(Lc,{id:e,registry:n,className:"rjsf-remove-optional-data",onClick:s,title:r,size:"xs"}):f.jsx("em",{id:e,children:r})}function aw(t){const{submitText:e,norender:n,props:r}=dc(t.uiSchema);return n?null:f.jsx("div",{children:f.jsx(zs,{type:"submit",...r,className:J("my-2",r?.className),children:e})})}function Bc({className:t,orientation:e="horizontal",decorative:n=!0,...r}){return f.jsx(wu,{"data-slot":"separator",decorative:n,orientation:e,className:J("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...r})}function lw({id:t,title:e,uiSchema:n,optionalDataControl:r}){const i=L(n);let s=f.jsx("h5",{children:i.title||e});return r&&(s=f.jsxs("div",{className:"flex flex-row",children:[f.jsx("div",{className:"flex-grow",children:s}),f.jsx("div",{className:"flex",children:r})]})),f.jsxs("div",{id:t,className:"my-1 flex flex-col gap-0.5",children:[s,f.jsx(Bc,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function cw({classNames:t,style:e,children:n,disabled:r,id:i,label:s,displayLabel:o,onRemoveProperty:a,onKeyRenameBlur:l,rawDescription:u,readonly:d,required:c,schema:h,uiSchema:g,registry:m}){const{templates:p,translateString:y}=m,{RemoveButton:x}=p.ButtonTemplates,b=y(Y.KeyLabel,[s]);if(!(ot in h))return f.jsx("div",{className:t,style:e,children:n});const v=o?22+(u?-28:0):0,w=`${i}-key`;return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${t}`,style:e,children:[f.jsx("div",{className:"grid gap-2 col-span-5",children:f.jsxs("div",{className:"flex flex-col gap-2",children:[o&&f.jsx("label",{htmlFor:w,className:"text-sm font-medium text-muted-foreground leading-none",children:b}),f.jsx("div",{className:"pl-0.5",children:f.jsx(Uc,{required:c,defaultValue:s,disabled:r||d,id:w,name:w,onBlur:d?void 0:l,type:"text",className:"w-full border shadow-sm"},s)}),!!u&&f.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:f.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),f.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:n}),f.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${v}px`},children:f.jsx(x,{id:Ze(i,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||d,onClick:a,uiSchema:g,registry:m})})]}),f.jsx(Bc,{dir:"horizontal",className:"mt-2"})]})}function uw(){return{ArrayFieldItemTemplate:BS,ArrayFieldTemplate:VS,BaseInputTemplate:WS,ButtonTemplates:{AddButton:LS,CopyButton:ew,MoveDownButton:tw,MoveUpButton:nw,RemoveButton:Lc,SubmitButton:aw,ClearButton:rw},DescriptionFieldTemplate:qS,ErrorListTemplate:YS,FieldErrorTemplate:JS,FieldHelpTemplate:ZS,FieldTemplate:XS,GridTemplate:QS,MultiSchemaFieldTemplate:iw,ObjectFieldTemplate:sw,OptionalDataControlsTemplate:ow,TitleFieldTemplate:lw,WrapIfAdditionalTemplate:cw}}function dw(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}var fw=["color"],mw=N.forwardRef(function(t,e){var n=t.color,r=n===void 0?"currentColor":n,i=dw(t,fw);return N.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:e}),N.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function Vc({className:t,...e}){return f.jsx(ju,{"data-slot":"checkbox",className:J("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:f.jsx(Ou,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:f.jsx(mw,{className:"size-3.5"})})})}function Ks({className:t,...e}){return f.jsx(Eu,{"data-slot":"label",className:J("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}function hw(t){const{id:e,htmlName:n,value:r,disabled:i,readonly:s,label:o,hideLabel:a,schema:l,autofocus:u,options:d,onChange:c,onBlur:h,onFocus:g,registry:m,uiSchema:p,className:y}=t,x=Bn(l),b=W("DescriptionFieldTemplate",m,d),O=j=>c(j),S=()=>h(e,r),v=()=>g(e,r),w=d.description||l.description;return f.jsxs("div",{className:`relative ${i||s?"cursor-not-allowed opacity-50":""}`,"aria-describedby":Fe(e),children:[!a&&w&&f.jsx(b,{id:qt(e),description:w,schema:l,uiSchema:p,registry:m}),f.jsxs("div",{className:"flex items-center gap-2 my-2",children:[f.jsx(Vc,{id:e,name:n||e,checked:typeof r>"u"?!1:!!r,required:x,disabled:i||s,autoFocus:u,onCheckedChange:O,onBlur:S,onFocus:v,className:y}),f.jsx(Ks,{className:"leading-tight",htmlFor:e,children:mc(o,a||!o)})]})]})}function pw({id:t,htmlName:e,disabled:n,options:r,value:i,autofocus:s,readonly:o,required:a,onChange:l,onBlur:u,onFocus:d,className:c}){const{enumOptions:h,enumDisabled:g,inline:m,emptyValue:p}=r,y=xn(r),x=Array.isArray(i)?i:[i],b=({target:S})=>u(t,Ie(S&&S.value,h,y,p)),O=({target:S})=>d(t,Ie(S&&S.value,h,y,p));return f.jsx("div",{className:J({"flex flex-col gap-2":!m,"flex flex-row gap-4 flex-wrap":m}),children:Array.isArray(h)&&h.map((S,v)=>{const w=ar(S.value,x),j=Array.isArray(g)&&g.indexOf(S.value)!==-1,E=Pt(t,v);return f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Vc,{id:E,name:e||t,required:a,disabled:n||j||o,onCheckedChange:A=>{l(A?ac(v,x,h):oc(v,x,h))},className:c,checked:w,autoFocus:s&&v===0,onBlur:b,onFocus:O,"aria-describedby":Fe(t)}),f.jsx(Ks,{className:"leading-tight",htmlFor:Pt(t,v),children:S.label})]},E)})})}function gw({className:t,...e}){return f.jsx(od,{"data-slot":"radio-group",className:J("grid gap-3",t),...e})}function yw({className:t,...e}){return f.jsx(ad,{"data-slot":"radio-group-item",className:J("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:f.jsx(ld,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:f.jsx(NS,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function bw({id:t,options:e,value:n,required:r,disabled:i,readonly:s,onChange:o,onBlur:a,onFocus:l,className:u}){const{enumOptions:d,enumDisabled:c,emptyValue:h}=e,g=xn(e),m=b=>o(Ie(b,d,g,h)),p=({target:b})=>a(t,Ie(b&&b.value,d,g,h)),y=({target:b})=>l(t,Ie(b&&b.value,d,g,h)),x=!!(e&&e.inline);return f.jsx("div",{className:"mb-0",children:f.jsx(gw,{defaultValue:n?.toString(),required:r,disabled:i||s,onValueChange:b=>{m(b)},onBlur:p,onFocus:y,"aria-describedby":Fe(t),orientation:x?"horizontal":"vertical",className:J("flex flex-wrap",{"flex-col":!x},u),children:Array.isArray(d)&&d.map((b,O)=>{const S=Array.isArray(c)&&c.indexOf(b.value)!==-1,v=ar(b.value,n);return f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(yw,{checked:v,value:lr(b.value,O,g),id:Pt(t,O),disabled:S}),f.jsx(Ks,{className:"leading-tight",htmlFor:Pt(t,O),children:b.label})]},Pt(t,O))})})})}var Wc=["PageUp","PageDown"],qc=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],zc={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},wn="Slider",[Ki,xw,vw]=Au(wn),[Kc]=Iu(wn,[vw]),[Sw,Yr]=Kc(wn),Hc=N.forwardRef((t,e)=>{const{name:n,min:r=0,max:i=100,step:s=1,orientation:o="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:u=[r],value:d,onValueChange:c=()=>{},onValueCommit:h=()=>{},inverted:g=!1,form:m,...p}=t,y=N.useRef(new Set),x=N.useRef(0),O=o==="horizontal"?ww:jw,[S=[],v]=Cu({prop:d,defaultProp:u,onChange:T=>{[...y.current][x.current]?.focus(),c(T)}}),w=N.useRef(S);function j(T){const _=_w(S,T);C(T,_)}function E(T){C(T,x.current)}function A(){const T=w.current[x.current];S[x.current]!==T&&h(S)}function C(T,_,{commit:I}={commit:!1}){const k=Fw(s),F=Pw(Math.round((T-r)/s)*s+r,k),D=Ma(F,[r,i]);v((R=[])=>{const B=Cw(R,D,_);if(Nw(B,l*s)){x.current=B.indexOf(D);const V=String(B)!==String(R);return V&&I&&h(B),V?B:R}else return R})}return f.jsx(Sw,{scope:t.__scopeSlider,name:n,disabled:a,min:r,max:i,valueIndexToChangeRef:x,thumbs:y.current,values:S,orientation:o,form:m,children:f.jsx(Ki.Provider,{scope:t.__scopeSlider,children:f.jsx(Ki.Slot,{scope:t.__scopeSlider,children:f.jsx(O,{"aria-disabled":a,"data-disabled":a?"":void 0,...p,ref:e,onPointerDown:Xt(p.onPointerDown,()=>{a||(w.current=S)}),min:r,max:i,inverted:g,onSlideStart:a?void 0:j,onSlideMove:a?void 0:E,onSlideEnd:a?void 0:A,onHomeKeyDown:()=>!a&&C(r,0,{commit:!0}),onEndKeyDown:()=>!a&&C(i,S.length-1,{commit:!0}),onStepKeyDown:({event:T,direction:_})=>{if(!a){const F=Wc.includes(T.key)||T.shiftKey&&qc.includes(T.key)?10:1,D=x.current,R=S[D],B=s*F*_;C(R+B,D,{commit:!0})}}})})})})});Hc.displayName=wn;var[Gc,Yc]=Kc(wn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ww=N.forwardRef((t,e)=>{const{min:n,max:r,dir:i,inverted:s,onSlideStart:o,onSlideMove:a,onSlideEnd:l,onStepKeyDown:u,...d}=t,[c,h]=N.useState(null),g=pn(e,O=>h(O)),m=N.useRef(void 0),p=_u(i),y=p==="ltr",x=y&&!s||!y&&s;function b(O){const S=m.current||c.getBoundingClientRect(),v=[0,S.width],j=Hs(v,x?[n,r]:[r,n]);return m.current=S,j(O-S.left)}return f.jsx(Gc,{scope:t.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:f.jsx(Jc,{dir:p,"data-orientation":"horizontal",...d,ref:g,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:O=>{const S=b(O.clientX);o?.(S)},onSlideMove:O=>{const S=b(O.clientX);a?.(S)},onSlideEnd:()=>{m.current=void 0,l?.()},onStepKeyDown:O=>{const v=zc[x?"from-left":"from-right"].includes(O.key);u?.({event:O,direction:v?-1:1})}})})}),jw=N.forwardRef((t,e)=>{const{min:n,max:r,inverted:i,onSlideStart:s,onSlideMove:o,onSlideEnd:a,onStepKeyDown:l,...u}=t,d=N.useRef(null),c=pn(e,d),h=N.useRef(void 0),g=!i;function m(p){const y=h.current||d.current.getBoundingClientRect(),x=[0,y.height],O=Hs(x,g?[r,n]:[n,r]);return h.current=y,O(p-y.top)}return f.jsx(Gc,{scope:t.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:f.jsx(Jc,{"data-orientation":"vertical",...u,ref:c,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:p=>{const y=m(p.clientY);s?.(y)},onSlideMove:p=>{const y=m(p.clientY);o?.(y)},onSlideEnd:()=>{h.current=void 0,a?.()},onStepKeyDown:p=>{const x=zc[g?"from-bottom":"from-top"].includes(p.key);l?.({event:p,direction:x?-1:1})}})})}),Jc=N.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:i,onSlideEnd:s,onHomeKeyDown:o,onEndKeyDown:a,onStepKeyDown:l,...u}=t,d=Yr(wn,n);return f.jsx(Qn.span,{...u,ref:e,onKeyDown:Xt(t.onKeyDown,c=>{c.key==="Home"?(o(c),c.preventDefault()):c.key==="End"?(a(c),c.preventDefault()):Wc.concat(qc).includes(c.key)&&(l(c),c.preventDefault())}),onPointerDown:Xt(t.onPointerDown,c=>{const h=c.target;h.setPointerCapture(c.pointerId),c.preventDefault(),d.thumbs.has(h)?h.focus():r(c)}),onPointerMove:Xt(t.onPointerMove,c=>{c.target.hasPointerCapture(c.pointerId)&&i(c)}),onPointerUp:Xt(t.onPointerUp,c=>{const h=c.target;h.hasPointerCapture(c.pointerId)&&(h.releasePointerCapture(c.pointerId),s(c))})})}),Zc="SliderTrack",Xc=N.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,i=Yr(Zc,n);return f.jsx(Qn.span,{"data-disabled":i.disabled?"":void 0,"data-orientation":i.orientation,...r,ref:e})});Xc.displayName=Zc;var Hi="SliderRange",Qc=N.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,i=Yr(Hi,n),s=Yc(Hi,n),o=N.useRef(null),a=pn(e,o),l=i.values.length,u=i.values.map(h=>nu(h,i.min,i.max)),d=l>1?Math.min(...u):0,c=100-Math.max(...u);return f.jsx(Qn.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...r,ref:a,style:{...t.style,[s.startEdge]:d+"%",[s.endEdge]:c+"%"}})});Qc.displayName=Hi;var Gi="SliderThumb",eu=N.forwardRef((t,e)=>{const n=xw(t.__scopeSlider),[r,i]=N.useState(null),s=pn(e,a=>i(a)),o=N.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return f.jsx(Ow,{...t,ref:s,index:o})}),Ow=N.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:i,...s}=t,o=Yr(Gi,n),a=Yc(Gi,n),[l,u]=N.useState(null),d=pn(e,b=>u(b)),c=l?o.form||!!l.closest("form"):!0,h=Tu(l),g=o.values[r],m=g===void 0?0:nu(g,o.min,o.max),p=Aw(r,o.values.length),y=h?.[a.size],x=y?Tw(y,m,a.direction):0;return N.useEffect(()=>{if(l)return o.thumbs.add(l),()=>{o.thumbs.delete(l)}},[l,o.thumbs]),f.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${m}% + ${x}px)`},children:[f.jsx(Ki.ItemSlot,{scope:t.__scopeSlider,children:f.jsx(Qn.span,{role:"slider","aria-label":t["aria-label"]||p,"aria-valuemin":o.min,"aria-valuenow":g,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...s,ref:d,style:g===void 0?{display:"none"}:t.style,onFocus:Xt(t.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),c&&f.jsx(tu,{name:i??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:g},r)]})});eu.displayName=Gi;var Ew="RadioBubbleInput",tu=N.forwardRef(({__scopeSlider:t,value:e,...n},r)=>{const i=N.useRef(null),s=pn(i,r),o=Nu(e);return N.useEffect(()=>{const a=i.current;if(!a)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&d){const c=new Event("input",{bubbles:!0});d.call(a,e),a.dispatchEvent(c)}},[o,e]),f.jsx(Qn.input,{style:{display:"none"},...n,ref:s,defaultValue:e})});tu.displayName=Ew;function Cw(t=[],e,n){const r=[...t];return r[n]=e,r.sort((i,s)=>i-s)}function nu(t,e,n){const s=100/(n-e)*(t-e);return Ma(s,[0,100])}function Aw(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function _w(t,e){if(t.length===1)return 0;const n=t.map(i=>Math.abs(i-e)),r=Math.min(...n);return n.indexOf(r)}function Tw(t,e,n){const r=t/2,s=Hs([0,50],[0,r]);return(r-s(e)*n)*n}function Iw(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function Nw(t,e){if(e>0){const n=Iw(t);return Math.min(...n)>=e}return!0}function Hs(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function Fw(t){return(String(t).split(".")[1]||"").length}function Pw(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var $w=Hc,Dw=Xc,kw=Qc,Rw=eu;function Mw({className:t,defaultValue:e,value:n,min:r=0,max:i=100,...s}){const o=N.useMemo(()=>Array.isArray(n)?n:Array.isArray(e)?e:[r,i],[n,e,r,i]);return f.jsxs($w,{"data-slot":"slider",defaultValue:e,value:n,min:r,max:i,className:J("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",t),...s,children:[f.jsx(Dw,{"data-slot":"slider-track",className:J("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:f.jsx(kw,{"data-slot":"slider-range",className:J("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:o.length},(a,l)=>f.jsx(Rw,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},l))]})}const Uw=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function Lw({value:t,readonly:e,disabled:n,options:r,schema:i,onChange:s,label:o,id:a}){const l=c=>s(c[0]),u={...cc(i)},d={id:a,...Ns(r.props||{},Uw)};return f.jsxs(f.Fragment,{children:[f.jsx(Mw,{disabled:n||e,min:u.min,max:u.max,step:u.step,value:[t],onValueChange:l,...d,"aria-describedby":Fe(a)}),t]})}const Bw=Qi("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Vw({className:t,variant:e,asChild:n=!1,...r}){const i=n?Da:"span";return f.jsx(i,{"data-slot":"badge",className:J(Bw({variant:e}),t),...r})}const ru=N.forwardRef(({className:t,...e},n)=>f.jsx(Ut,{ref:n,"data-slot":"command",className:J("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...e})),Ww=N.forwardRef(({className:t,...e},n)=>f.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[f.jsx(DS,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),f.jsx(Ut.Input,{ref:n,className:J("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));Ww.displayName=Ut.Input.displayName;function iu({className:t,...e}){return f.jsx(Ut.List,{"data-slot":"command-list",className:J("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function su({className:t,...e}){return f.jsx(Ut.Group,{"data-slot":"command-group",className:J("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...e})}function ou({className:t,...e}){return f.jsx(Ut.Item,{"data-slot":"command-item",className:J("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...e})}function qw({multiple:t,items:e=[],selected:n,onValueChange:r,autoFocus:i=!1,disabled:s=!1,ariaDescribedby:o,ariaPlaceholder:a,onFocus:l,onBlur:u,className:d,id:c}){const h=N.useRef(null),[g,m]=N.useState(!1),[p,y]=N.useState(""),x=N.useMemo(()=>e.filter(j=>n.some(E=>St(j.value,E))),[e,n]),b=N.useMemo(()=>e.filter(j=>!x.some(E=>St(E.value,j.value))),[e,x]),O=N.useCallback(j=>{if(s)return;const E=x.filter(A=>!St(A.value,j.value));r?.(E.map(A=>A.index))},[x,r,s]),S=N.useCallback(j=>{if(!(s||!h.current||h.current.value!==""))if(j.key==="Delete"||j.key==="Backspace"){const E=x.slice(0,-1);r?.(E.map(A=>A.index))}else j.key==="Escape"&&h.current.blur()},[x,r,s]),v=N.useCallback(j=>{if(s)return;y("");const E=t?[...x,j]:[j];r?.(E.map(A=>A.index))},[t,x,r,s]),w=N.useCallback(j=>{s||m(!0),l?.(j)},[s,l]);return f.jsxs(ru,{onKeyDown:S,className:J("overflow-visible bg-transparent",d),autoFocus:i,"aria-disabled":s,onBlur:u,onFocus:w,"aria-describedby":o,"aria-placeholder":a,children:[f.jsx("div",{className:J("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",s&&"opacity-50 cursor-not-allowed"),children:f.jsxs("div",{className:"flex gap-1 flex-wrap",children:[x.map(j=>f.jsxs(Vw,{variant:"secondary",children:[j.label,f.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:E=>E.key==="Enter"&&!s&&O(j),onMouseDown:E=>{E.preventDefault(),E.stopPropagation()},onClick:()=>O(j),disabled:s,children:f.jsx(Mc,{className:J("h-3 w-3 text-muted-foreground hover:text-foreground",s&&"pointer-events-none")})})]},j.value)),f.jsx(Ut.Input,{ref:h,value:p,onValueChange:y,onBlur:()=>m(!1),onFocus:()=>!s&&m(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:s,"aria-controls":`command-item-input-${c}`,"aria-labelledby":`command-item-input-${c}`,id:`command-item-input-${c}`})]})}),g&&!s&&b.length>0&&f.jsx("div",{className:"relative mt-2",children:f.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:f.jsx(su,{className:"h-full overflow-auto",children:f.jsx(iu,{children:b.map(j=>f.jsx(ou,{disabled:j.disabled,onMouseDown:E=>{E.preventDefault(),E.stopPropagation()},"aria-controls":`${j.value}-command-item`,"aria-labelledby":`${j.value}-command-item`,id:`${j.value}-command-item`,onSelect:()=>v(j),className:"cursor-pointer",children:j.label},`${j.value}-command-item`))})})})})]})}function zw({items:t,selected:e,onValueChange:n,autoFocus:r=!1,disabled:i=!1,required:s=!1,placeholder:o="Select...",ariaDescribedby:a,ariaPlaceholder:l,onFocus:u,onBlur:d,className:c}){const[h,g]=N.useState(!1),m=t?.find(b=>b.value===e),p=N.useRef(null),y=N.useRef(null);N.useEffect(()=>{h&&p.current&&requestAnimationFrame(()=>{var b;(b=p.current)===null||b===void 0||b.scrollIntoView({block:"nearest"})})},[h]);const x=b=>{y.current&&!y.current.contains(b.relatedTarget)&&g(!1),d?.(b)};return f.jsxs(ru,{ref:y,className:J("overflow-visible bg-transparent",c),autoFocus:r,"aria-disabled":i,onBlur:x,onFocus:u,"aria-describedby":a,"aria-placeholder":l,children:[f.jsxs("div",{onClick:()=>!i&&g(!h),className:J("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",!m&&s&&"border-red-500",i&&"opacity-50 cursor-not-allowed",c),children:[f.jsx("span",{className:J("flex-1 line-clamp-1",!m&&"text-muted-foreground"),children:m?.label||o}),f.jsx(kc,{className:"h-4 w-4 opacity-50"})]}),f.jsx("div",{className:"relative",children:h&&t&&t.length>0?f.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:f.jsx(su,{className:"h-full overflow-auto",children:f.jsx(iu,{children:t.map(b=>f.jsxs(ou,{ref:b.value===e?p:void 0,onMouseDown:O=>{O.preventDefault(),O.stopPropagation()},onSelect:()=>{b.disabled||(n?.(b.value),g(!1))},className:J("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",b.value===e&&"font-semibold",b.disabled&&"opacity-50 cursor-not-allowed"),children:[f.jsx("span",{children:b.label}),f.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:b.value===e&&f.jsx(jS,{className:"h-4 w-4"})})]},b.value))})})}):null})]})}function Kw({id:t,options:e,required:n,disabled:r,readonly:i,value:s,multiple:o,autofocus:a,onChange:l,onBlur:u,onFocus:d,placeholder:c,rawErrors:h=[],className:g}){const{enumOptions:m,enumDisabled:p,emptyValue:y}=e,x=xn(e),b=()=>{d(t,Ie(s,m,x,y))},O=()=>{u(t,Ie(s,m,x,y))},S=m?.map(({value:w,label:j},E)=>({value:o?w:lr(w,E,x),label:j,index:E,disabled:Array.isArray(p)&&p.includes(w)})),v=J({"border-destructive":h.length>0},g);return f.jsx("div",{className:"p-0.5",children:o?f.jsx(qw,{id:t,autoFocus:a,disabled:r||i,multiple:!0,className:v,items:S,selected:s,onValueChange:w=>{l(Ie(w.map(String),m,x,y))},onFocus:b,onBlur:O}):f.jsx(zw,{items:S,selected:sc(s,m,!1,x,""),onValueChange:w=>{l(Ie(w,m,x,y))},autoFocus:a,disabled:r||i,required:n,placeholder:c,className:v,onFocus:b,onBlur:O,ariaDescribedby:Fe(t)})})}function Hw({className:t,...e}){return f.jsx("textarea",{"data-slot":"textarea",className:J("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...e})}function Gw({id:t,htmlName:e,placeholder:n,value:r,required:i,disabled:s,autofocus:o,readonly:a,onBlur:l,onFocus:u,onChange:d,options:c,className:h}){const g=({target:{value:y}})=>d(y===""?c.emptyValue:y),m=({target:y})=>l(t,y&&y.value),p=({target:y})=>u(t,y&&y.value);return f.jsx("div",{className:"flex p-0.5",children:f.jsx(Hw,{id:t,name:e||t,placeholder:n,disabled:s,readOnly:a,value:r??"",required:i,autoFocus:o,rows:c.rows||5,onChange:g,onBlur:m,onFocus:p,"aria-describedby":Fe(t),className:h})})}function Yw(){return{CheckboxWidget:hw,CheckboxesWidget:pw,RadioWidget:bw,RangeWidget:Lw,SelectWidget:Kw,TextareaWidget:Gw}}function Jw(){return{templates:uw(),widgets:Yw()}}function Zw(){return nS(Jw())}const Xw=Zw();function Qw(t){const e=Oe.c(21),{virtualMcp:n,isSelected:r}=t,i=r&&"bg-accent";let s;e[0]!==i?(s=Fr("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-xl transition-colors",i),e[0]=i,e[1]=s):s=e[1];let o;e[2]!==n.icon||e[3]!==n.title?(o=f.jsx(Ua,{icon:n.icon,name:n.title,size:"sm"}),e[2]=n.icon,e[3]=n.title,e[4]=o):o=e[4];let a;e[5]!==n.title?(a=f.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[5]=n.title,e[6]=a):a=e[6];let l;e[7]!==r?(l=r&&f.jsx(xd,{size:16,className:"text-foreground shrink-0"}),e[7]=r,e[8]=l):l=e[8];let u;e[9]!==a||e[10]!==l?(u=f.jsxs("div",{className:"flex items-center justify-between",children:[a,l]}),e[9]=a,e[10]=l,e[11]=u):u=e[11];let d;e[12]!==n.description?(d=n.description&&f.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:n.description}),e[12]=n.description,e[13]=d):d=e[13];let c;e[14]!==u||e[15]!==d?(c=f.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[u,d]}),e[14]=u,e[15]=d,e[16]=c):c=e[16];let h;return e[17]!==s||e[18]!==o||e[19]!==c?(h=f.jsxs("div",{className:s,children:[o,c]}),e[17]=s,e[18]=o,e[19]=c,e[20]=h):h=e[20],h}function ej(){const t=Oe.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsx(es,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}function tj(t){const e=Oe.c(33),{selectedVirtualMcpId:n,onVirtualMcpChange:r,searchInputRef:i}=t,s=bd(),[o,a]=N.useState(""),l=N.useRef(null),u=i??l;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={navigateOnCreate:!0},e[0]=d):d=e[0];const{createVirtualMCP:c,isCreating:h}=wd(d);let g,m,p,y;if(e[1]!==c||e[2]!==u||e[3]!==h||e[4]!==r||e[5]!==o||e[6]!==n||e[7]!==s){let O;e:{const _=s.filter(nj);if(!o.trim()){O=_;break e}const I=o.toLowerCase();O=_.filter(k=>k.title.toLowerCase().includes(I)||k.description?.toLowerCase().includes(I))}const S=O;let v;e[12]!==r?(v=_=>{r(_),a("")},e[12]=r,e[13]=v):v=e[13];const w=v;p="flex flex-col max-h-[min(400px,60dvh)]";let j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=f.jsx(vd,{size:16,className:"text-muted-foreground pointer-events-none shrink-0"}),e[14]=j):j=e[14];let E;e[15]===Symbol.for("react.memo_cache_sentinel")?(E=_=>a(_.target.value),e[15]=E):E=e[15];let A;e[16]!==u||e[17]!==o?(A=f.jsx(cd,{ref:u,type:"text",placeholder:"Search for an agent...",value:o,onChange:E,className:"flex-1 h-8 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none p-0"}),e[16]=u,e[17]=o,e[18]=A):A=e[18];const C=h?"Creating...":"Create Agent";let T;e[19]!==c||e[20]!==h||e[21]!==C?(T=f.jsx(Pr,{onClick:c,variant:"outline",size:"sm",className:"h-8 px-3 rounded-lg text-sm font-medium shrink-0",disabled:h,children:C}),e[19]=c,e[20]=h,e[21]=C,e[22]=T):T=e[22],e[23]!==A||e[24]!==T?(y=f.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:f.jsxs("div",{className:"relative flex items-center gap-2",children:[j,A,T]})}),e[23]=A,e[24]=T,e[25]=y):y=e[25],g="overflow-y-auto p-1.5 flex-1 min-h-0 [touch-action:pan-y]",m=S.length>0?f.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-0.5",children:S.map(_=>f.jsx("div",{role:"button",tabIndex:0,onClick:()=>w(_.id),onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),w(_.id))},className:"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-xl",children:f.jsx(Qw,{virtualMcp:_,isSelected:_.id===n})},_.id))}):f.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No agents found"}),e[1]=c,e[2]=u,e[3]=h,e[4]=r,e[5]=o,e[6]=n,e[7]=s,e[8]=g,e[9]=m,e[10]=p,e[11]=y}else g=e[8],m=e[9],p=e[10],y=e[11];let x;e[26]!==g||e[27]!==m?(x=f.jsx("div",{className:g,children:m}),e[26]=g,e[27]=m,e[28]=x):x=e[28];let b;return e[29]!==p||e[30]!==y||e[31]!==x?(b=f.jsxs("div",{className:p,children:[y,x]}),e[29]=p,e[30]=y,e[31]=x,e[32]=b):b=e[32],b}function nj(t){return!t.id||!Lu(t.id)}function rj(t){const e=Oe.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=f.jsx(ej,{}),e[0]=n):n=e[0];let r;return e[1]!==t?(r=f.jsx(N.Suspense,{fallback:n,children:f.jsx(tj,{...t})}),e[1]=t,e[2]=r):r=e[2],r}function ij(t){const e=Oe.c(32),{selectedVirtualMcpId:n,selectedVirtualMcp:r,onVirtualMcpChange:i,className:s,placeholder:o,showTooltip:a,disabled:l}=t,u=o===void 0?"Select Agent":o,d=a===void 0?!0:a,c=l===void 0?!1:l,[h,g]=N.useState(!1),m=N.useRef(null);let p;e[0]!==i?(p=D=>{i(D),g(!1)},e[0]=i,e[1]=p):p=e[1];const y=p,x=md();let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=D=>{g(D)},e[2]=b):b=e[2];const O=b;let S,v;e[3]!==x||e[4]!==h?(S=()=>{h&&!x&&setTimeout(()=>{m.current?.focus()},0)},v=[h,x],e[3]=x,e[4]=h,e[5]=S,e[6]=v):(S=e[5],v=e[6]),N.useEffect(S,v);const w=c?!1:h,j=c?void 0:O,E=c?"cursor-not-allowed opacity-50":"cursor-pointer hover:text-muted-foreground";let A;e[7]!==s||e[8]!==E?(A=Fr("relative flex items-center justify-center size-8 rounded-lg text-muted-foreground/75 transition-colors shrink-0",E,s),e[7]=s,e[8]=E,e[9]=A):A=e[9];let C;e[10]!==r?(C=r?f.jsx(Ua,{icon:r.icon,name:r.title,size:"sm",className:"absolute inset-0 size-full"}):f.jsxs(f.Fragment,{children:[f.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[f.jsx("defs",{children:f.jsxs("linearGradient",{id:"agent-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[f.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),f.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),f.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),f.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"7.5",stroke:"url(#agent-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),f.jsx(Sd,{size:16})]}),e[10]=r,e[11]=C):C=e[11];let T;e[12]!==c||e[13]!==u||e[14]!==A||e[15]!==C?(T=f.jsx(pd,{asChild:!0,children:f.jsx(ud,{asChild:!0,children:f.jsx("button",{type:"button",disabled:c,className:A,"aria-label":u,children:C})})}),e[12]=c,e[13]=u,e[14]=A,e[15]=C,e[16]=T):T=e[16];let _;e[17]!==h||e[18]!==r?.title||e[19]!==d?(_=d&&!h&&f.jsx(hd,{side:"top",className:"text-xs",children:r?.title??"Choose an agent to chat with"}),e[17]=h,e[18]=r?.title,e[19]=d,e[20]=_):_=e[20];let I;e[21]!==T||e[22]!==_?(I=f.jsx(gd,{children:f.jsxs(yd,{children:[T,_]})}),e[21]=T,e[22]=_,e[23]=I):I=e[23];let k;e[24]!==y||e[25]!==n?(k=f.jsx(dd,{className:"w-[min(550px,calc(100vw-2rem))] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,collisionPadding:16,children:f.jsx(rj,{selectedVirtualMcpId:n,onVirtualMcpChange:y,searchInputRef:m})}),e[24]=y,e[25]=n,e[26]=k):k=e[26];let F;return e[27]!==I||e[28]!==k||e[29]!==w||e[30]!==j?(F=f.jsxs(fd,{open:w,onOpenChange:j,children:[I,k]}),e[27]=I,e[28]=k,e[29]=w,e[30]=j,e[31]=F):F=e[31],F}function sj(t){const e=t.properties;if(!e)return!1;const n=e.__type,r=e.__binding;return!!(n?.const||r?.const)}function oj(t){const e=t.properties;if(!e)return{};const n=e.__type,r=e.__binding;return{bindingType:n?.const,bindingSchema:r?.const}}function aj(t){const e=Oe.c(10),{bindingSchema:n,bindingType:r,currentValue:i,onValueChange:s,placeholder:o,onAddNew:a,className:l}=t;let u;e[0]!==r?(u=zf(r),e[0]=r,e[1]=u):u=e[1];const c=u??(typeof n=="string"?n:n??void 0);let h;return e[2]!==r||e[3]!==l||e[4]!==i||e[5]!==a||e[6]!==s||e[7]!==o||e[8]!==c?(h=f.jsx(lj,{value:i,onValueChange:s,placeholder:o,binding:c,bindingType:r,onAddNew:a,className:l}),e[2]=r,e[3]=l,e[4]=i,e[5]=a,e[6]=s,e[7]=o,e[8]=c,e[9]=h):h=e[9],h}function lj({value:t,onValueChange:e,placeholder:n="Select a connection...",binding:r,bindingType:i,onAddNew:s,className:o}){const[a,l]=N.useState(!1),{installByBinding:u,isInstalling:d}=Gf(),c=a||d,h=r?void 0:i||void 0,g=Ku(r?{binding:r}:h?{filters:[{column:"app_name",value:h}]}:{}),m=Hu(t&&!g.some(b=>b.id===t)?t:void 0),p=m?[m,...g]:g,y=i?.startsWith("@"),x=async()=>{if(y&&i){l(!0);try{const b=await u(i);b&&e(b.id)}catch(b){const O=b instanceof Error?b.message:String(b);gr.error(`Failed to connect MCP: ${O}`)}finally{l(!1)}return}s?.()};return f.jsxs(td,{value:t,onValueChange:e,children:[f.jsx(nd,{size:"sm",className:Fr("w-[200px]",o),children:f.jsx(rd,{placeholder:n})}),f.jsxs(id,{children:[p.length===0?f.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No connections found"}):p.map(b=>f.jsx(sd,{value:b.id,children:f.jsxs("div",{className:"flex items-center gap-2",children:[b.icon?f.jsx("img",{src:b.icon,alt:b.title,className:"w-4 h-4 rounded"}):f.jsx("div",{className:"w-4 h-4 rounded bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:b.title.slice(0,1).toUpperCase()}),f.jsx("span",{children:b.title})]})},b.id)),(s||y)&&f.jsx("div",{className:"border-t border-border",children:f.jsx(Pr,{onClick:b=>{b.preventDefault(),b.stopPropagation(),x()},disabled:c,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:c?f.jsxs(f.Fragment,{children:[f.jsx(es,{size:16,className:"animate-spin"}),f.jsx("span",{children:"Connecting..."})]}):f.jsxs(f.Fragment,{children:[f.jsx(ed,{size:16}),f.jsx("span",{children:"Custom Connection"})]})})})]})]})}function cj(t){const e=Oe.c(49),{schema:n,formData:r,title:i,description:s,registry:o}=t,a=o.formContext,l=i||"",u=i||"";if(sj(n)){const h=n;let g;e[0]!==h?(g=oj(h),e[0]=h,e[1]=g):g=e[1];const{bindingType:m,bindingSchema:p}=g,x=(a?.formData?.[l]?.value??r?.value)||"";let b;e[2]!==m||e[3]!==l||e[4]!==a||e[5]!==r?(b=F=>{const D={...r,value:F??"",...m&&{__type:m}};a?.onFieldChange(l,D)},e[2]=m,e[3]=l,e[4]=a,e[5]=r,e[6]=b):b=e[6];const O=b,S=dj;let v;e[7]!==u||e[8]!==l||e[9]!==i?(v=S(i||u||l),e[7]=u,e[8]=l,e[9]=i,e[10]=v):v=e[10];const w=v;if(m==="@deco/agent"){let F;e[11]!==w?(F=f.jsx("label",{className:"text-sm font-medium truncate block",children:w}),e[11]=w,e[12]=F):F=e[12];let D;e[13]!==s?(D=s&&f.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s}),e[13]=s,e[14]=D):D=e[14];let R;e[15]!==F||e[16]!==D?(R=f.jsxs("div",{className:"flex-1 min-w-0",children:[F,D]}),e[15]=F,e[16]=D,e[17]=R):R=e[17];const B=x||void 0;let V;e[18]!==O||e[19]!==B?(V=f.jsx(ij,{selectedVirtualMcpId:B,onVirtualMcpChange:O,variant:"bordered",placeholder:"Select Agent",className:"w-[200px] shrink-0"}),e[18]=O,e[19]=B,e[20]=V):V=e[20];let Z;return e[21]!==R||e[22]!==V?(Z=f.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[R,V]}),e[21]=R,e[22]=V,e[23]=Z):Z=e[23],Z}let j;e[24]!==w?(j=f.jsx("label",{className:"text-sm font-medium truncate block",children:w}),e[24]=w,e[25]=j):j=e[25];let E;e[26]!==s?(E=s&&f.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s}),e[26]=s,e[27]=E):E=e[27];let A;e[28]!==j||e[29]!==E?(A=f.jsxs("div",{className:"flex-1 min-w-0",children:[j,E]}),e[28]=j,e[29]=E,e[30]=A):A=e[30];let C;e[31]!==w?(C=w.toLowerCase(),e[31]=w,e[32]=C):C=e[32];const T=`Select ${C}...`;let _;e[33]!==a?(_=()=>a?.onAddNew(),e[33]=a,e[34]=_):_=e[34];let I;e[35]!==p||e[36]!==m||e[37]!==x||e[38]!==O||e[39]!==T||e[40]!==_?(I=f.jsx(aj,{bindingSchema:p,bindingType:m,currentValue:x,onValueChange:O,placeholder:T,onAddNew:_,className:"w-[200px] shrink-0"}),e[35]=p,e[36]=m,e[37]=x,e[38]=O,e[39]=T,e[40]=_,e[41]=I):I=e[41];let k;return e[42]!==I||e[43]!==A?(k=f.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[A,I]}),e[42]=I,e[43]=A,e[44]=k):k=e[44],k}let d;e[45]!==t.properties?(d=t.properties.map(uj),e[45]=t.properties,e[46]=d):d=e[46];let c;return e[47]!==d?(c=f.jsx("div",{className:"flex flex-col gap-4",children:d}),e[47]=d,e[48]=c):c=e[48],c}function uj(t){return t.content}function dj(t){return t.toLowerCase().replace(/_/g," ").replace(/\b\w/g,fj)}function fj(t){return t.toUpperCase()}function mj(t){const e=Oe.c(13),{label:n,children:r,description:i,id:s,schema:o}=t;if(s.includes("__type")||s.includes("__binding"))return null;if(o.type==="object")return r;let a;e[0]!==s||e[1]!==n?(a=n&&f.jsx("label",{className:"text-sm font-medium truncate block",htmlFor:s,children:n}),e[0]=s,e[1]=n,e[2]=a):a=e[2];let l;e[3]!==i?(l=i&&f.jsx("div",{className:"text-xs text-muted-foreground truncate",children:i}),e[3]=i,e[4]=l):l=e[4];let u;e[5]!==a||e[6]!==l?(u=f.jsxs("div",{className:"flex-1 min-w-0",children:[a,l]}),e[5]=a,e[6]=l,e[7]=u):u=e[7];let d;e[8]!==r?(d=f.jsx("div",{className:"w-[200px] shrink-0",children:r}),e[8]=r,e[9]=d):d=e[9];let c;return e[10]!==u||e[11]!==d?(c=f.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[u,d]}),e[10]=u,e[11]=d,e[12]=c):c=e[12],c}const hj={ObjectFieldTemplate:cj,FieldTemplate:mj};function pj(t){const e=Oe.c(19),{formKey:n,formState:r,onFormStateChange:i,stateSchema:s}=t,{org:o}=Zi(),a=Fu();let l;e[0]!==i?(l=b=>{b.formData&&i(b.formData)},e[0]=i,e[1]=l):l=e[1];const u=l;let d;e[2]!==r||e[3]!==i?(d=(b,O)=>{const S={...r,[b]:O};i(S)},e[2]=r,e[3]=i,e[4]=d):d=e[4];const c=d;let h;e[5]!==a||e[6]!==o?(h=()=>{a({to:"/$org/settings/connections",params:{org:o.slug},search:{action:"create"}})},e[5]=a,e[6]=o,e[7]=h):h=e[7];const g=h;let m;e[8]!==r||e[9]!==g||e[10]!==c?(m={onFieldChange:c,formData:r,onAddNew:g},e[8]=r,e[9]=g,e[10]=c,e[11]=m):m=e[11];const p=m;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=f.jsx(f.Fragment,{}),e[12]=y):y=e[12];let x;return e[13]!==p||e[14]!==n||e[15]!==r||e[16]!==u||e[17]!==s?(x=f.jsx("div",{className:"flex flex-col h-full overflow-auto",children:f.jsx(Xw,{schema:s,validator:gS,formData:r,onChange:u,formContext:p,liveValidate:!1,showErrorList:!1,templates:hj,children:y},n)}),e[13]=p,e[14]=n,e[15]=r,e[16]=u,e[17]=s,e[18]=x):x=e[18],x}function gj(t){const e=Oe.c(14),{org:n}=Zi();let r;e[0]!==t||e[1]!==n.id||e[2]!==n.slug?(r={connectionId:t,orgId:n.id,orgSlug:n.slug},e[0]=t,e[1]=n.id,e[2]=n.slug,e[3]=r):r=e[3];const i=Bu(r);let s;e[4]===Symbol.for("react.memo_cache_sentinel")?(s={},e[4]=s):s=e[4];let o;e[5]!==i?(o={client:i,toolName:"MCP_CONFIGURATION",toolArguments:s,select:yj},e[5]=i,e[6]=o):o=e[6];const{data:a}=Vu(o);let l;e[7]!==a.stateSchema?(l=a.stateSchema??{type:"object",properties:{}},e[7]=a.stateSchema,e[8]=l):l=e[8];const u=l;let d;e[9]!==a.scopes?(d=a.scopes??[],e[9]=a.scopes,e[10]=d):d=e[10];const c=d;let h;return e[11]!==c||e[12]!==u?(h={stateSchema:u,scopes:c},e[11]=c,e[12]=u,e[13]=h):h=e[13],h}function yj(t){return t.structuredContent??t}function bj(t){const e=Oe.c(4),{onAuthenticate:n,buttonText:r}=t,i=r===void 0?"Authenticate":r;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("h3",{className:"text-sm font-semibold",children:"Authentication Required"}),f.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:"This connection requires OAuth authentication to access resources."})]}),e[0]=s):s=e[0];let o;return e[1]!==i||e[2]!==n?(o=f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[s,f.jsx(Pr,{onClick:n,size:"default",children:i})]})}),e[1]=i,e[2]=n,e[3]=o):o=e[3],o}function xj(t){const e=Oe.c(7),{hasReadme:n,onViewReadme:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=f.jsx(qu,{size:36,className:"text-muted-foreground"}),e[0]=i):i=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("h3",{className:"text-sm font-semibold",children:"Manual Authentication Required"}),f.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:"This server requires an API key or token that must be configured manually. Check the server's documentation for instructions on obtaining credentials."})]}),e[1]=s):s=e[1];let o;e[2]!==n||e[3]!==r?(o=n&&r&&f.jsxs(Pr,{onClick:r,variant:"outline",size:"lg",children:[f.jsx(Wu,{size:18,className:"mr-2"}),"View README"]}),e[2]=n,e[3]=r,e[4]=o):o=e[4];let a;return e[5]!==o?(a=f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[i,s,o]})}),e[5]=o,e[6]=a):a=e[6],a}function vj(){const t=Oe.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=f.jsx("img",{src:"/empty-state-error.svg",alt:"",width:160,height:160,"aria-hidden":"true"}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[e,f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("h3",{className:"text-lg font-semibold",children:"Server Error"}),f.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-center",children:"The MCP server is currently experiencing issues. Please try again later or check the server's status."})]})]})}),t[1]=n):n=t[1],n}function Sj(t){const e=Oe.c(12),{connection:n,form:r}=t,{stateSchema:i}=gj(n.id);let s;e[0]!==r.control?(s={control:r.control,name:"configuration_state"},e[0]=r.control,e[1]=s):s=e[1];const o=$u(s);let a;e[2]!==r?(a=h=>{r.setValue("configuration_state",h,{shouldDirty:!0})},e[2]=r,e[3]=a):a=e[3];const l=a;if(!(i&&i.properties&&typeof i.properties=="object"&&Object.keys(i.properties).length>0)){let h;return e[4]===Symbol.for("react.memo_cache_sentinel")?(h=f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsx(ka,{image:f.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),title:"This server is all set!",description:"No additional configuration is needed. Everything is ready to go."})}),e[4]=h):h=e[4],h}let d;e[5]!==o?(d=o??{},e[5]=o,e[6]=d):d=e[6];let c;return e[7]!==n.id||e[8]!==l||e[9]!==i||e[10]!==d?(c=f.jsx("div",{className:"flex-1 overflow-auto",children:f.jsx(pj,{formKey:n.id,stateSchema:i,formState:d,onFormStateChange:l})}),e[7]=n.id,e[8]=l,e[9]=i,e[10]=d,e[11]=c):c=e[11],c}function wj(t){const e=Oe.c(11),{connection:n,form:r,hasMcpBinding:i,isMCPAuthenticated:s,supportsOAuth:o,isServerError:a,onAuthenticate:l,onViewReadme:u}=t,c=!!n?.metadata?.repository?.url;if(!s){if(a){let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=f.jsx(vj,{}),e[0]=p):p=e[0],p}if(o){let p;return e[1]!==l?(p=f.jsx(bj,{onAuthenticate:l}),e[1]=l,e[2]=p):p=e[2],p}let m;return e[3]!==c||e[4]!==u?(m=f.jsx(xj,{hasReadme:c,onViewReadme:u}),e[3]=c,e[4]=u,e[5]=m):m=e[5],m}if(!i){let m;return e[6]===Symbol.for("react.memo_cache_sentinel")?(m=f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsx(ka,{image:f.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),title:"This server is all set!",description:"No additional configuration is needed. Everything is ready to go."})}),e[6]=m):m=e[6],m}let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=f.jsx("div",{className:"flex-1 flex items-center justify-center",children:f.jsx(es,{size:32,className:"animate-spin text-muted-foreground"})}),e[7]=h):h=e[7];let g;return e[8]!==n||e[9]!==r?(g=f.jsx(Pu,{children:f.jsx(N.Suspense,{fallback:h,children:f.jsx(Sj,{connection:n,form:r})})}),e[8]=n,e[9]=r,e[10]=g):g=e[10],g}function tO(t){const e=Oe.c(2);let n;return e[0]!==t?(n=f.jsx("div",{className:"flex-1 flex h-full",children:f.jsx(wj,{...t})}),e[0]=t,e[1]=n):n=e[1],n}export{xj as M,bj as O,tO as S,Qj as V,Xj as a,Zj as b,Jj as c};