@decocms/mesh 2.13.0 → 2.14.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.
- package/dist/client/assets/{AlertCircle-CtP28Oyz.js → AlertCircle-DeHvJZzp.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Bps-R0_t.js → ArrowLeft-Dan_IIKP.js} +1 -1
- package/dist/client/assets/ArrowUp-B2eKsIZo.js +1 -0
- package/dist/client/assets/{Check-Bkw0Gz-n.js → Check-VfxUlV5P.js} +1 -1
- package/dist/client/assets/{ChevronDown-mvTJP4-S.js → ChevronDown-OK90XtVB.js} +1 -1
- package/dist/client/assets/{Clock-DiHiAbv6.js → Clock-CRgmR_1n.js} +1 -1
- package/dist/client/assets/{Code01-CTUZx8UP.js → Code01-B9DNMb5j.js} +1 -1
- package/dist/client/assets/{Copy01-BctGx-5E.js → Copy01-dbjgqDL6.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-MMZ1EZhB.js → DotsHorizontal-BpvBcoMa.js} +1 -1
- package/dist/client/assets/{DotsVertical-CzCtj25W.js → DotsVertical-XnGZcIeo.js} +1 -1
- package/dist/client/assets/Download01-C8jw9jFZ.js +1 -0
- package/dist/client/assets/{Edit01-BD5iJRQz.js → Edit01-Ddbn6DsS.js} +1 -1
- package/dist/client/assets/{File06-nV81V8TD.js → File06-DCHrHfbn.js} +1 -1
- package/dist/client/assets/FilterLines-BzWlfPby.js +1 -0
- package/dist/client/assets/{FlipBackward-CpWoOBPz.js → FlipBackward-Bum_Ktlp.js} +1 -1
- package/dist/client/assets/{GitBranch01-DWYSSAGj.js → GitBranch01-CVAiK8ZD.js} +1 -1
- package/dist/client/assets/Grid01-AMlhaaWH.js +1 -0
- package/dist/client/assets/Home02-CnvrJTir.js +1 -0
- package/dist/client/assets/Image01-Bch9iOev.js +1 -0
- package/dist/client/assets/{Inbox01-DkMyh-FB.js → Inbox01-y9RgqkXP.js} +1 -1
- package/dist/client/assets/{InfoCircle-BXctEVkS.js → InfoCircle-HrYndWCZ.js} +1 -1
- package/dist/client/assets/{Key01-ChIWeKNh.js → Key01-DS2WWoiQ.js} +1 -1
- package/dist/client/assets/{LinkExternal01-By7zx70s.js → LinkExternal01-DzBB4jwo.js} +1 -1
- package/dist/client/assets/List-BDW462gC.js +1 -0
- package/dist/client/assets/{Loading01-CdaWSExX.js → Loading01-OB_JRXd5.js} +1 -1
- package/dist/client/assets/{Lock01-txD_UwBx.js → Lock01-B_KYH87b.js} +1 -1
- package/dist/client/assets/{Play-CjVz5-Yt.js → Play-VfPQ9yON.js} +1 -1
- package/dist/client/assets/{Plus-CovnOzP9.js → Plus-CgcZFggs.js} +1 -1
- package/dist/client/assets/{SearchMd-YxKkBPG0.js → SearchMd-DRJ07Awx.js} +1 -1
- package/dist/client/assets/{Terminal-DYwA22tz.js → Terminal-FTJQx4pc.js} +1 -1
- package/dist/client/assets/{Trash01-DopdNXEu.js → Trash01-BDWyzvD2.js} +1 -1
- package/dist/client/assets/Upload01-CB1SFmVO.js +1 -0
- package/dist/client/assets/{X-DcqsnRSe.js → X-CVhiWYv-.js} +1 -1
- package/dist/client/assets/{XClose-D0utLGU3.js → XClose-C895iFVX.js} +1 -1
- package/dist/client/assets/{alert-dialog-B2ogXLEp.js → alert-dialog-D9k51qgG.js} +2 -2
- package/dist/client/assets/{auth-catchall-BG5YjEP_.js → auth-catchall-BDKZr3VK.js} +1 -1
- package/dist/client/assets/avatar-BLmwViC3.js +1 -0
- package/dist/client/assets/badge-CMZTNGZo.js +1 -0
- package/dist/client/assets/binder-Bcr51BHa.js +1 -0
- package/dist/client/assets/button-2azNqzUx.js +1 -0
- package/dist/client/assets/card-WAuUk8Uz.js +1 -0
- package/dist/client/assets/checkbox-E6g3eWVz.js +1 -0
- package/dist/client/assets/{collection-detail-BJvqsPlx.js → collection-detail-DiFfTEhG.js} +2 -2
- package/dist/client/assets/collection-display-button-B3beugJ4.js +1 -0
- package/dist/client/assets/collection-header-MCgfYSgE.js +1 -0
- package/dist/client/assets/{collection-page-C8c74lBQ.js → collection-page-CB_Az4GO.js} +1 -1
- package/dist/client/assets/collection-search-DL-7oL5d.js +1 -0
- package/dist/client/assets/collection-tab-C_pl92IS.js +1 -0
- package/dist/client/assets/collection-table-wrapper-CAH6fKB1.js +1 -0
- package/dist/client/assets/connection-CXC8d3Ae.js +2 -0
- package/dist/client/assets/connection-card-BTOP5EHD.js +1 -0
- package/dist/client/assets/connection-detail-BHduC6at.js +1 -0
- package/dist/client/assets/connections-Cm-7oBJu.js +1 -0
- package/dist/client/assets/constants-B-ATh8ff.js +1 -0
- package/dist/client/assets/create-organization-dialog-MS4oQ7Sl.js +1 -0
- package/dist/client/assets/dialog-DSU0GEtE.js +1 -0
- package/dist/client/assets/dropdown-menu-DRkETp4T.js +1 -0
- package/dist/client/assets/dynamic-plugin-layout-CXggkl7m.js +1 -0
- package/dist/client/assets/empty-state-C3NzxCFI.js +1 -0
- package/dist/client/assets/empty-state-DKa1iDdq.js +1 -0
- package/dist/client/assets/env-vars-editor-D54i65KN.js +1 -0
- package/dist/client/assets/error-boundary-DU6_J5et.js +1 -0
- package/dist/client/assets/{extract-connection-data-DMhfaAiL.js → extract-connection-data-Hjw19oaR.js} +1 -1
- package/dist/client/assets/file-browser-B8xb3wGm.js +2 -0
- package/dist/client/assets/form-DM9msJYn.js +1 -0
- package/dist/client/assets/gateway-detail-6QzPV4MT.js +1 -0
- package/dist/client/assets/gateways-DcbIYmOg.js +1 -0
- package/dist/client/assets/grid-view-DjeV3XAc.js +1 -0
- package/dist/client/assets/home-BkFYrMbJ.js +1 -0
- package/dist/client/assets/{index-Cw3bkeXO.js → index-BQiKVu3k.js} +1 -1
- package/dist/client/assets/{index-BuPukvJG.js → index-C5xxIZ3a.js} +17 -17
- package/dist/client/assets/{index-o28bnKR9.js → index-CYR9-1-4.js} +1 -1
- package/dist/client/assets/{index-K2EwRRk6.js → index-DUfEAj2z.js} +2 -2
- package/dist/client/assets/index-Dk3lubBQ.js +174 -0
- package/dist/client/assets/index-fFpUC2Bx.css +1 -0
- package/dist/client/assets/infiniteQueryObserver-CUXkVkPG.js +1 -0
- package/dist/client/assets/input-CBrhxHNe.js +1 -0
- package/dist/client/assets/layout-MOaKucBL.js +1 -0
- package/dist/client/assets/{lazy-highlighter-C5pGkBnk.js → lazy-highlighter-C2ClCxhY.js} +1 -1
- package/dist/client/assets/localstorage-keys-BJk6gyyN.js +1 -0
- package/dist/client/assets/login-RFCnTbJl.js +1 -0
- package/dist/client/assets/mcp-oauth-CuMRVoyP.js +1 -0
- package/dist/client/assets/mcp-server-card-DYesFUUw.js +1 -0
- package/dist/client/assets/mcp-server-detail-CBjpnL21.js +1 -0
- package/dist/client/assets/members-wdr88rOm.js +3 -0
- package/dist/client/assets/{monaco-editor-BmVBfnK5.js → monaco-editor-B2ZJ-0S4.js} +3 -3
- package/dist/client/assets/{monitoring-7ik3wQUY.js → monitoring-Cr82twHN.js} +10 -10
- package/dist/client/assets/oauth-callback-BddKzzFQ.js +1 -0
- package/dist/client/assets/page-D_NhUEfH.js +1 -0
- package/dist/client/assets/{page-yu9K5Vtj.js → page-DhI0Qooi.js} +2 -2
- package/dist/client/assets/pin-to-sidebar-button-CVN6Bdsp.js +1 -0
- package/dist/client/assets/plugin-empty-state-srmGKRQU.js +1 -0
- package/dist/client/assets/plugin-header-Dg9-cQAj.js +1 -0
- package/dist/client/assets/plugins-Dawnh_sQ.js +1 -0
- package/dist/client/assets/popover-HE15ABOl.js +1 -0
- package/dist/client/assets/project-context-provider-B1gr9e2f.js +1 -0
- package/dist/client/assets/{registry-utils-BIzwINzW.js → registry-utils-COqteFH4.js} +1 -1
- package/dist/client/assets/resizable-B8j7Xubf.js +1 -0
- package/dist/client/assets/resource-tabs-B1oXSRkv.js +1 -0
- package/dist/client/assets/select-DkAjMxeq.js +1 -0
- package/dist/client/assets/settings-Clme5cH0.js +1 -0
- package/dist/client/assets/shell-layout-BuirxVot.js +3 -0
- package/dist/client/assets/spinner-Dwr2EFZD.js +1 -0
- package/dist/client/assets/switch-C9XtHYD0.js +1 -0
- package/dist/client/assets/textarea-CyM57U4B.js +1 -0
- package/dist/client/assets/{thread-history-popover-BKo2wskT.js → thread-history-popover-DlGwptvV.js} +4 -4
- package/dist/client/assets/tool-set-selector-B9-4X5pd.js +1 -0
- package/dist/client/assets/tools-list-DJqzZm19.js +1 -0
- package/dist/client/assets/tooltip-DHS6wGWv.js +1 -0
- package/dist/client/assets/use-binding-Cn24Ren1.js +23 -0
- package/dist/client/assets/use-collections-CbsNEj5T.js +1 -0
- package/dist/client/assets/use-connection-BhdfednN.js +1 -0
- package/dist/client/assets/{use-connection-resources-C8cAy7Nl.js → use-connection-resources-D6kK3b1i.js} +1 -1
- package/dist/client/assets/{use-create-gateway-D8vNiD2K.js → use-create-gateway-dtd5LmVR.js} +1 -1
- package/dist/client/assets/use-gateway-Ck94EUZ3.js +1 -0
- package/dist/client/assets/{use-gateway-system-prompt-uetw6YB3.js → use-gateway-system-prompt-C9-1moLN.js} +1 -1
- package/dist/client/assets/{use-list-state-CAv4RNZg.js → use-list-state-CQtVDn-T.js} +1 -1
- package/dist/client/assets/use-mcp-C1X3fEnH.js +1 -0
- package/dist/client/assets/{use-members-9nvpFN_1.js → use-members-Bh37cZiw.js} +1 -1
- package/dist/client/assets/{use-mobile-sd5ko6M_.js → use-mobile-CuBmA9jm.js} +1 -1
- package/dist/client/assets/use-organization-settings-BNK4p5TK.js +1 -0
- package/dist/client/assets/{use-tool-call-BLplGau6.js → use-tool-call-DzBMga46.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-B7UO0aOm.js +1 -0
- package/dist/client/assets/useMutation-BEX5R6ly.js +1 -0
- package/dist/client/assets/useQuery-BbeI5BfO.js +1 -0
- package/dist/client/assets/value-UH6V0tmj.js +1 -0
- package/dist/client/assets/view-mode-toggle-kdDPGpPT.js +1 -0
- package/dist/client/assets/workflow-DgZwuETF.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +193 -193
- package/dist/server/migrate.js +128 -128
- package/dist/server/server.js +191 -191
- package/package.json +4 -4
- package/dist/client/assets/FilterLines-CBfbdjv3.js +0 -1
- package/dist/client/assets/Grid01-BEpepbVy.js +0 -1
- package/dist/client/assets/auth-CNkA6dk2.js +0 -1
- package/dist/client/assets/avatar-KT16fAYd.js +0 -1
- package/dist/client/assets/badge-8BCP2QJ_.js +0 -1
- package/dist/client/assets/card-XgDm8_H9.js +0 -1
- package/dist/client/assets/checkbox-B9Ss6ffk.js +0 -1
- package/dist/client/assets/collection-display-button-DroTLKfu.js +0 -1
- package/dist/client/assets/collection-header-CUphFaJM.js +0 -1
- package/dist/client/assets/collection-search-DIEJ7x7R.js +0 -1
- package/dist/client/assets/collection-tab-BQr3sv8I.js +0 -1
- package/dist/client/assets/collection-table-wrapper-x8zydyA0.js +0 -1
- package/dist/client/assets/connection-card-CTMXB5Zh.js +0 -1
- package/dist/client/assets/connection-detail-BU82m59Z.js +0 -1
- package/dist/client/assets/connections-B-zsqKwM.js +0 -1
- package/dist/client/assets/constants-8DEiLmV-.js +0 -1
- package/dist/client/assets/create-organization-dialog-CHS4cOdy.js +0 -1
- package/dist/client/assets/dialog-D9LHhl79.js +0 -1
- package/dist/client/assets/dropdown-menu-DjFWyTtD.js +0 -1
- package/dist/client/assets/empty-state-DSGxvcRL.js +0 -1
- package/dist/client/assets/empty-state-DgOO5bI1.js +0 -2
- package/dist/client/assets/env-vars-editor-mM2KyO-W.js +0 -1
- package/dist/client/assets/error-boundary-uBvOVTCE.js +0 -1
- package/dist/client/assets/form-orY-xngM.js +0 -1
- package/dist/client/assets/gateway-detail-Bnl2H9_J.js +0 -1
- package/dist/client/assets/gateways-RS5E135D.js +0 -1
- package/dist/client/assets/home-HRdtfNlr.js +0 -1
- package/dist/client/assets/index-9MwexYU6.css +0 -1
- package/dist/client/assets/index-Bz1LU39D.js +0 -163
- package/dist/client/assets/input-CtiQUsvV.js +0 -1
- package/dist/client/assets/layout-C8G6tSLB.js +0 -1
- package/dist/client/assets/localstorage-keys-5oG1CfEQ.js +0 -1
- package/dist/client/assets/login-BvQHpiOu.js +0 -1
- package/dist/client/assets/mcp-oauth-BzcB2WNx.js +0 -1
- package/dist/client/assets/mcp-server-card-BawKO-ZK.js +0 -1
- package/dist/client/assets/mcp-server-detail-CxrhH1J8.js +0 -1
- package/dist/client/assets/members-C0iWKqGR.js +0 -3
- package/dist/client/assets/oauth-callback-Coasa0XK.js +0 -1
- package/dist/client/assets/page-DsAOPS13.js +0 -1
- package/dist/client/assets/pin-to-sidebar-button-C-akIZzz.js +0 -1
- package/dist/client/assets/popover-QWczrvYc.js +0 -1
- package/dist/client/assets/project-context-provider-_aLYBfO9.js +0 -1
- package/dist/client/assets/resizable-djk090hC.js +0 -1
- package/dist/client/assets/resource-tabs-GXDudjH9.js +0 -1
- package/dist/client/assets/select-Bxj6_TSM.js +0 -1
- package/dist/client/assets/settings-0nIjjKRi.js +0 -1
- package/dist/client/assets/shell-layout-BFIjeoYr.js +0 -3
- package/dist/client/assets/spinner-C7HX4n17.js +0 -1
- package/dist/client/assets/switch-zovYrKoi.js +0 -1
- package/dist/client/assets/textarea-D76YOeHc.js +0 -1
- package/dist/client/assets/tool-set-selector-Dfdgsx2h.js +0 -1
- package/dist/client/assets/tools-list-C2S7XIkI.js +0 -1
- package/dist/client/assets/use-binding-UNVemCFv.js +0 -34
- package/dist/client/assets/use-connection-BXdeHsm0.js +0 -1
- package/dist/client/assets/use-gateway-BhC1hXIm.js +0 -1
- package/dist/client/assets/use-mcp-kCjFuvFP.js +0 -1
- package/dist/client/assets/use-organization-settings-DBRSoBd0.js +0 -1
- package/dist/client/assets/value-DxHsXzsm.js +0 -1
- package/dist/client/assets/view-mode-toggle-CVcyaB_S.js +0 -1
- package/dist/client/assets/workflow-BUV3CQv_.js +0 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/file-browser-B8xb3wGm.js","assets/useInfiniteQuery-B7UO0aOm.js","assets/infiniteQueryObserver-CUXkVkPG.js","assets/button-2azNqzUx.js","assets/checkbox-E6g3eWVz.js","assets/Check-VfxUlV5P.js","assets/AlertCircle-DeHvJZzp.js","assets/Grid01-AMlhaaWH.js","assets/Download01-C8jw9jFZ.js","assets/Home02-CnvrJTir.js","assets/List-BDW462gC.js","assets/Loading01-OB_JRXd5.js","assets/Trash01-BDWyzvD2.js","assets/Upload01-CB1SFmVO.js","assets/useMutation-BEX5R6ly.js","assets/plugin-header-Dg9-cQAj.js","assets/ChevronDown-OK90XtVB.js","assets/login-RFCnTbJl.js","assets/input-CBrhxHNe.js","assets/shell-layout-BuirxVot.js","assets/error-boundary-DU6_J5et.js","assets/popover-HE15ABOl.js","assets/badge-CMZTNGZo.js","assets/Inbox01-y9RgqkXP.js","assets/XClose-C895iFVX.js","assets/File06-DCHrHfbn.js","assets/X-CVhiWYv-.js","assets/use-mobile-CuBmA9jm.js","assets/tooltip-DHS6wGWv.js","assets/thread-history-popover-DlGwptvV.js","assets/project-context-provider-B1gr9e2f.js","assets/index-C5xxIZ3a.js","assets/empty-state-C3NzxCFI.js","assets/use-gateway-Ck94EUZ3.js","assets/connection-CXC8d3Ae.js","assets/use-collections-CbsNEj5T.js","assets/SearchMd-DRJ07Awx.js","assets/use-create-gateway-dtd5LmVR.js","assets/ArrowUp-B2eKsIZo.js","assets/textarea-CyM57U4B.js","assets/localstorage-keys-BJk6gyyN.js","assets/useQuery-BbeI5BfO.js","assets/Copy01-dbjgqDL6.js","assets/Terminal-FTJQx4pc.js","assets/monaco-editor-B2ZJ-0S4.js","assets/spinner-Dwr2EFZD.js","assets/alert-dialog-D9k51qgG.js","assets/select-DkAjMxeq.js","assets/Image01-Bch9iOev.js","assets/InfoCircle-HrYndWCZ.js","assets/use-connection-BhdfednN.js","assets/use-binding-Cn24Ren1.js","assets/binder-Bcr51BHa.js","assets/use-gateway-system-prompt-C9-1moLN.js","assets/Edit01-Ddbn6DsS.js","assets/well-known-mcp-D13f-8h2.js","assets/generate-id-Dyweu44Y.js","assets/Clock-CRgmR_1n.js","assets/use-organization-settings-BNK4p5TK.js","assets/create-organization-dialog-MS4oQ7Sl.js","assets/form-DM9msJYn.js","assets/avatar-BLmwViC3.js","assets/dropdown-menu-DRkETp4T.js","assets/LinkExternal01-DzBB4jwo.js","assets/dialog-DSU0GEtE.js","assets/switch-C9XtHYD0.js","assets/Code01-B9DNMb5j.js","assets/resizable-B8j7Xubf.js","assets/Plus-CgcZFggs.js","assets/home-BkFYrMbJ.js","assets/card-WAuUk8Uz.js","assets/page-DhI0Qooi.js","assets/view-mode-toggle-kdDPGpPT.js","assets/GitBranch01-CVAiK8ZD.js","assets/use-tool-call-DzBMga46.js","assets/value-UH6V0tmj.js","assets/page-BZV40eAE.css","assets/members-wdr88rOm.js","assets/collection-header-MCgfYSgE.js","assets/collection-display-button-B3beugJ4.js","assets/collection-page-CB_Az4GO.js","assets/collection-search-DL-7oL5d.js","assets/collection-table-wrapper-CAH6fKB1.js","assets/tool-set-selector-B9-4X5pd.js","assets/ArrowLeft-Dan_IIKP.js","assets/use-members-Bh37cZiw.js","assets/DotsHorizontal-BpvBcoMa.js","assets/Lock01-B_KYH87b.js","assets/DotsVertical-XnGZcIeo.js","assets/Key01-DS2WWoiQ.js","assets/connections-Cm-7oBJu.js","assets/connection-card-BTOP5EHD.js","assets/use-list-state-CQtVDn-T.js","assets/registry-utils-COqteFH4.js","assets/env-vars-editor-D54i65KN.js","assets/settings-Clme5cH0.js","assets/plugins-Dawnh_sQ.js","assets/monitoring-Cr82twHN.js","assets/FilterLines-BzWlfPby.js","assets/Play-VfPQ9yON.js","assets/index-BQiKVu3k.js","assets/resource-tabs-B1oXSRkv.js","assets/page-D_NhUEfH.js","assets/slugify-CEUa2lfQ.js","assets/mcp-server-card-DYesFUUw.js","assets/github-icon-Dp3wHhYE.js","assets/mcp-server-detail-CBjpnL21.js","assets/tools-list-DJqzZm19.js","assets/layout-MOaKucBL.js","assets/tools-list-CSRUKxnt.css","assets/use-mcp-C1X3fEnH.js","assets/extract-connection-data-Hjw19oaR.js","assets/constants-B-ATh8ff.js","assets/connection-detail-BHduC6at.js","assets/index-DUfEAj2z.js","assets/mcp-oauth-CuMRVoyP.js","assets/pin-to-sidebar-button-CVN6Bdsp.js","assets/index-CYR9-1-4.js","assets/use-connection-resources-D6kK3b1i.js","assets/collection-tab-C_pl92IS.js","assets/empty-state-DKa1iDdq.js","assets/collection-detail-DiFfTEhG.js","assets/FlipBackward-Bum_Ktlp.js","assets/gateways-DcbIYmOg.js","assets/gateway-detail-6QzPV4MT.js","assets/workflow-DgZwuETF.js","assets/dynamic-plugin-layout-CXggkl7m.js","assets/oauth-callback-BddKzzFQ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function xD(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();const TD="modulepreload",OD=function(e){return"/"+e},zR={},mn=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");a=l(n.map(f=>{if(f=OD(f),f in zR)return;zR[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":TD,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((y,b)=>{g.addEventListener("load",y),g.addEventListener("error",()=>b(Error(`Unable to preload CSS for ${f}`)))})}))}function i(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return a.then(l=>{for(const u of l||[])u.status==="rejected"&&i(u.reason);return t().catch(i)})};var gre=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ha(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var py={exports:{}},du={};var FR;function CD(){if(FR)return du;FR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var l=null;if(i!==void 0&&(l=""+i),a.key!==void 0&&(l=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:i}}return du.Fragment=t,du.jsx=n,du.jsxs=n,du}var VR;function AD(){return VR||(VR=1,py.exports=CD()),py.exports}var x=AD(),my={exports:{}},fu={},gy={exports:{}},vy={};var BR;function ID(){return BR||(BR=1,(function(e){function t(B,Y){var W=B.length;B.push(Y);e:for(;0<W;){var he=W-1>>>1,ae=B[he];if(0<a(ae,Y))B[he]=Y,B[W]=ae,W=he;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var Y=B[0],W=B.pop();if(W!==Y){B[0]=W;e:for(var he=0,ae=B.length,M=ae>>>1;he<M;){var q=2*(he+1)-1,V=B[q],D=q+1,z=B[D];if(0>a(V,W))D<ae&&0>a(z,V)?(B[he]=z,B[D]=W,he=D):(B[he]=V,B[q]=W,he=q);else if(D<ae&&0>a(z,W))B[he]=z,B[D]=W,he=D;else break e}}return Y}function a(B,Y){var W=B.sortIndex-Y.sortIndex;return W!==0?W:B.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var d=[],f=[],m=1,p=null,g=3,y=!1,b=!1,S=!1,w=!1,R=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function O(B){for(var Y=n(f);Y!==null;){if(Y.callback===null)r(f);else if(Y.startTime<=B)r(f),Y.sortIndex=Y.expirationTime,t(d,Y);else break;Y=n(f)}}function C(B){if(S=!1,O(B),!b)if(n(d)!==null)b=!0,I||(I=!0,G());else{var Y=n(f);Y!==null&&le(C,Y.startTime-B)}}var I=!1,N=-1,P=5,$=-1;function K(){return w?!0:!(e.unstable_now()-$<P)}function F(){if(w=!1,I){var B=e.unstable_now();$=B;var Y=!0;try{e:{b=!1,S&&(S=!1,E(N),N=-1),y=!0;var W=g;try{t:{for(O(B),p=n(d);p!==null&&!(p.expirationTime>B&&K());){var he=p.callback;if(typeof he=="function"){p.callback=null,g=p.priorityLevel;var ae=he(p.expirationTime<=B);if(B=e.unstable_now(),typeof ae=="function"){p.callback=ae,O(B),Y=!0;break t}p===n(d)&&r(d),O(B)}else r(d);p=n(d)}if(p!==null)Y=!0;else{var M=n(f);M!==null&&le(C,M.startTime-B),Y=!1}}break e}finally{p=null,g=W,y=!1}Y=void 0}}finally{Y?G():I=!1}}}var G;if(typeof T=="function")G=function(){T(F)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,J=U.port2;U.port1.onmessage=F,G=function(){J.postMessage(null)}}else G=function(){R(F,0)};function le(B,Y){N=R(function(){B(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(B){switch(g){case 1:case 2:case 3:var Y=3;break;default:Y=g}var W=g;g=Y;try{return B()}finally{g=W}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(B,Y){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var W=g;g=B;try{return Y()}finally{g=W}},e.unstable_scheduleCallback=function(B,Y,W){var he=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?he+W:he):W=he,B){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=W+ae,B={id:m++,callback:Y,priorityLevel:B,startTime:W,expirationTime:ae,sortIndex:-1},W>he?(B.sortIndex=W,t(f,B),n(d)===null&&B===n(f)&&(S?(E(N),N=-1):S=!0,le(C,W-he))):(B.sortIndex=ae,t(d,B),b||y||(b=!0,I||(I=!0,G()))),B},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(B){var Y=g;return function(){var W=g;g=Y;try{return B.apply(this,arguments)}finally{g=W}}}})(vy)),vy}var qR;function ND(){return qR||(qR=1,gy.exports=ID()),gy.exports}var yy={exports:{}},et={};var HR;function kD(){if(HR)return et;HR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function y(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,w={};function R(M,q,V){this.props=M,this.context=q,this.refs=w,this.updater=V||b}R.prototype.isReactComponent={},R.prototype.setState=function(M,q){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,q,"setState")},R.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function E(){}E.prototype=R.prototype;function T(M,q,V){this.props=M,this.context=q,this.refs=w,this.updater=V||b}var O=T.prototype=new E;O.constructor=T,S(O,R.prototype),O.isPureReactComponent=!0;var C=Array.isArray;function I(){}var N={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function $(M,q,V){var D=V.ref;return{$$typeof:e,type:M,key:q,ref:D!==void 0?D:null,props:V}}function K(M,q){return $(M.type,q,M.props)}function F(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function G(M){var q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(V){return q[V]})}var U=/\/+/g;function J(M,q){return typeof M=="object"&&M!==null&&M.key!=null?G(""+M.key):q.toString(36)}function le(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(I,I):(M.status="pending",M.then(function(q){M.status==="pending"&&(M.status="fulfilled",M.value=q)},function(q){M.status==="pending"&&(M.status="rejected",M.reason=q)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function B(M,q,V,D,z){var X=typeof M;(X==="undefined"||X==="boolean")&&(M=null);var ue=!1;if(M===null)ue=!0;else switch(X){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(M.$$typeof){case e:case t:ue=!0;break;case m:return ue=M._init,B(ue(M._payload),q,V,D,z)}}if(ue)return z=z(M),ue=D===""?"."+J(M,0):D,C(z)?(V="",ue!=null&&(V=ue.replace(U,"$&/")+"/"),B(z,q,V,"",function(Ae){return Ae})):z!=null&&(F(z)&&(z=K(z,V+(z.key==null||M&&M.key===z.key?"":(""+z.key).replace(U,"$&/")+"/")+ue)),q.push(z)),1;ue=0;var ve=D===""?".":D+":";if(C(M))for(var Ie=0;Ie<M.length;Ie++)D=M[Ie],X=ve+J(D,Ie),ue+=B(D,q,V,X,z);else if(Ie=y(M),typeof Ie=="function")for(M=Ie.call(M),Ie=0;!(D=M.next()).done;)D=D.value,X=ve+J(D,Ie++),ue+=B(D,q,V,X,z);else if(X==="object"){if(typeof M.then=="function")return B(le(M),q,V,D,z);throw q=String(M),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ue}function Y(M,q,V){if(M==null)return M;var D=[],z=0;return B(M,D,"","",function(X){return q.call(V,X,z++)}),D}function W(M){if(M._status===-1){var q=M._result;q=q(),q.then(function(V){(M._status===0||M._status===-1)&&(M._status=1,M._result=V)},function(V){(M._status===0||M._status===-1)&&(M._status=2,M._result=V)}),M._status===-1&&(M._status=0,M._result=q)}if(M._status===1)return M._result.default;throw M._result}var he=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},ae={map:Y,forEach:function(M,q,V){Y(M,function(){q.apply(this,arguments)},V)},count:function(M){var q=0;return Y(M,function(){q++}),q},toArray:function(M){return Y(M,function(q){return q})||[]},only:function(M){if(!F(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return et.Activity=p,et.Children=ae,et.Component=R,et.Fragment=n,et.Profiler=a,et.PureComponent=T,et.StrictMode=r,et.Suspense=d,et.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,et.__COMPILER_RUNTIME={__proto__:null,c:function(M){return N.H.useMemoCache(M)}},et.cache=function(M){return function(){return M.apply(null,arguments)}},et.cacheSignal=function(){return null},et.cloneElement=function(M,q,V){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var D=S({},M.props),z=M.key;if(q!=null)for(X in q.key!==void 0&&(z=""+q.key),q)!P.call(q,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&q.ref===void 0||(D[X]=q[X]);var X=arguments.length-2;if(X===1)D.children=V;else if(1<X){for(var ue=Array(X),ve=0;ve<X;ve++)ue[ve]=arguments[ve+2];D.children=ue}return $(M.type,z,D)},et.createContext=function(M){return M={$$typeof:l,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:i,_context:M},M},et.createElement=function(M,q,V){var D,z={},X=null;if(q!=null)for(D in q.key!==void 0&&(X=""+q.key),q)P.call(q,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(z[D]=q[D]);var ue=arguments.length-2;if(ue===1)z.children=V;else if(1<ue){for(var ve=Array(ue),Ie=0;Ie<ue;Ie++)ve[Ie]=arguments[Ie+2];z.children=ve}if(M&&M.defaultProps)for(D in ue=M.defaultProps,ue)z[D]===void 0&&(z[D]=ue[D]);return $(M,X,z)},et.createRef=function(){return{current:null}},et.forwardRef=function(M){return{$$typeof:u,render:M}},et.isValidElement=F,et.lazy=function(M){return{$$typeof:m,_payload:{_status:-1,_result:M},_init:W}},et.memo=function(M,q){return{$$typeof:f,type:M,compare:q===void 0?null:q}},et.startTransition=function(M){var q=N.T,V={};N.T=V;try{var D=M(),z=N.S;z!==null&&z(V,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(I,he)}catch(X){he(X)}finally{q!==null&&V.types!==null&&(q.types=V.types),N.T=q}},et.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},et.use=function(M){return N.H.use(M)},et.useActionState=function(M,q,V){return N.H.useActionState(M,q,V)},et.useCallback=function(M,q){return N.H.useCallback(M,q)},et.useContext=function(M){return N.H.useContext(M)},et.useDebugValue=function(){},et.useDeferredValue=function(M,q){return N.H.useDeferredValue(M,q)},et.useEffect=function(M,q){return N.H.useEffect(M,q)},et.useEffectEvent=function(M){return N.H.useEffectEvent(M)},et.useId=function(){return N.H.useId()},et.useImperativeHandle=function(M,q,V){return N.H.useImperativeHandle(M,q,V)},et.useInsertionEffect=function(M,q){return N.H.useInsertionEffect(M,q)},et.useLayoutEffect=function(M,q){return N.H.useLayoutEffect(M,q)},et.useMemo=function(M,q){return N.H.useMemo(M,q)},et.useOptimistic=function(M,q){return N.H.useOptimistic(M,q)},et.useReducer=function(M,q,V){return N.H.useReducer(M,q,V)},et.useRef=function(M){return N.H.useRef(M)},et.useState=function(M){return N.H.useState(M)},et.useSyncExternalStore=function(M,q,V){return N.H.useSyncExternalStore(M,q,V)},et.useTransition=function(){return N.H.useTransition()},et.version="19.2.3",et}var GR;function Gs(){return GR||(GR=1,yy.exports=kD()),yy.exports}var _y={exports:{}},fr={};var ZR;function MD(){if(ZR)return fr;ZR=1;var e=Gs();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return fr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,fr.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return i(d,f,null,m)},fr.flushSync=function(d){var f=l.T,m=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=m,r.d.f()}},fr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},fr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},fr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:y}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},fr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},fr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},fr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},fr.requestFormReset=function(d){r.d.r(d)},fr.unstable_batchedUpdates=function(d,f){return d(f)},fr.useFormState=function(d,f,m){return l.H.useFormState(d,f,m)},fr.useFormStatus=function(){return l.H.useHostTransitionStatus()},fr.version="19.2.3",fr}var KR;function DC(){if(KR)return _y.exports;KR=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_y.exports=MD(),_y.exports}var YR;function PD(){if(YR)return fu;YR=1;var e=ND(),t=Gs(),n=DC();function r(o){var s="https://react.dev/errors/"+o;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+o+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function i(o){var s=o,c=o;if(o.alternate)for(;s.return;)s=s.return;else{o=s;do s=o,(s.flags&4098)!==0&&(c=s.return),o=s.return;while(o)}return s.tag===3?c:null}function l(o){if(o.tag===13){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function u(o){if(o.tag===31){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function d(o){if(i(o)!==o)throw Error(r(188))}function f(o){var s=o.alternate;if(!s){if(s=i(o),s===null)throw Error(r(188));return s!==o?null:o}for(var c=o,h=s;;){var v=c.return;if(v===null)break;var _=v.alternate;if(_===null){if(h=v.return,h!==null){c=h;continue}break}if(v.child===_.child){for(_=v.child;_;){if(_===c)return d(v),o;if(_===h)return d(v),s;_=_.sibling}throw Error(r(188))}if(c.return!==h.return)c=v,h=_;else{for(var k=!1,j=v.child;j;){if(j===c){k=!0,c=v,h=_;break}if(j===h){k=!0,h=v,c=_;break}j=j.sibling}if(!k){for(j=_.child;j;){if(j===c){k=!0,c=_,h=v;break}if(j===h){k=!0,h=_,c=v;break}j=j.sibling}if(!k)throw Error(r(189))}}if(c.alternate!==h)throw Error(r(190))}if(c.tag!==3)throw Error(r(188));return c.stateNode.current===c?o:s}function m(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o;for(o=o.child;o!==null;){if(s=m(o),s!==null)return s;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function G(o){return o===null||typeof o!="object"?null:(o=F&&o[F]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function J(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===U?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case S:return"Fragment";case R:return"Profiler";case w:return"StrictMode";case C:return"Suspense";case I:return"SuspenseList";case $:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case b:return"Portal";case T:return o.displayName||"Context";case E:return(o._context.displayName||"Context")+".Consumer";case O:var s=o.render;return o=o.displayName,o||(o=s.displayName||s.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case N:return s=o.displayName||null,s!==null?s:J(o.type)||"Memo";case P:s=o._payload,o=o._init;try{return J(o(s))}catch{}}return null}var le=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},he=[],ae=-1;function M(o){return{current:o}}function q(o){0>ae||(o.current=he[ae],he[ae]=null,ae--)}function V(o,s){ae++,he[ae]=o.current,o.current=s}var D=M(null),z=M(null),X=M(null),ue=M(null);function ve(o,s){switch(V(X,s),V(z,o),V(D,null),s.nodeType){case 9:case 11:o=(o=s.documentElement)&&(o=o.namespaceURI)?cR(o):0;break;default:if(o=s.tagName,s=s.namespaceURI)s=cR(s),o=uR(s,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}q(D),V(D,o)}function Ie(){q(D),q(z),q(X)}function Ae(o){o.memoizedState!==null&&V(ue,o);var s=D.current,c=uR(s,o.type);s!==c&&(V(z,o),V(D,c))}function H(o){z.current===o&&(q(D),q(z)),ue.current===o&&(q(ue),iu._currentValue=W)}var ne,_e;function se(o){if(ne===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);ne=s&&s[1]||"",_e=-1<c.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+ne+o+_e}var ce=!1;function Te(o,s){if(!o||ce)return"";ce=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(ge){var me=ge}Reflect.construct(o,[],xe)}else{try{xe.call()}catch(ge){me=ge}o.call(xe.prototype)}}else{try{throw Error()}catch(ge){me=ge}(xe=o())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(ge){if(ge&&me&&typeof ge.stack=="string")return[ge.stack,me.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=h.DetermineComponentFrameRoot(),k=_[0],j=_[1];if(k&&j){var Q=k.split(`
|
|
5
|
+
`),fe=j.split(`
|
|
6
|
+
`);for(v=h=0;h<Q.length&&!Q[h].includes("DetermineComponentFrameRoot");)h++;for(;v<fe.length&&!fe[v].includes("DetermineComponentFrameRoot");)v++;if(h===Q.length||v===fe.length)for(h=Q.length-1,v=fe.length-1;1<=h&&0<=v&&Q[h]!==fe[v];)v--;for(;1<=h&&0<=v;h--,v--)if(Q[h]!==fe[v]){if(h!==1||v!==1)do if(h--,v--,0>v||Q[h]!==fe[v]){var be=`
|
|
7
|
+
`+Q[h].replace(" at new "," at ");return o.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",o.displayName)),be}while(1<=h&&0<=v);break}}}finally{ce=!1,Error.prepareStackTrace=c}return(c=o?o.displayName||o.name:"")?se(c):""}function Pe(o,s){switch(o.tag){case 26:case 27:case 5:return se(o.type);case 16:return se("Lazy");case 13:return o.child!==s&&s!==null?se("Suspense Fallback"):se("Suspense");case 19:return se("SuspenseList");case 0:case 15:return Te(o.type,!1);case 11:return Te(o.type.render,!1);case 1:return Te(o.type,!0);case 31:return se("Activity");default:return""}}function Xe(o){try{var s="",c=null;do s+=Pe(o,c),c=o,o=o.return;while(o);return s}catch(h){return`
|
|
8
|
+
Error generating stack: `+h.message+`
|
|
9
|
+
`+h.stack}}var Ve=Object.prototype.hasOwnProperty,Ye=e.unstable_scheduleCallback,Z=e.unstable_cancelCallback,re=e.unstable_shouldYield,oe=e.unstable_requestPaint,we=e.unstable_now,Re=e.unstable_getCurrentPriorityLevel,Ee=e.unstable_ImmediatePriority,ke=e.unstable_UserBlockingPriority,Je=e.unstable_NormalPriority,rt=e.unstable_LowPriority,Tt=e.unstable_IdlePriority,ur=e.log,Xt=e.unstable_setDisableYieldValue,En=null,Jt=null;function jn(o){if(typeof ur=="function"&&Xt(o),Jt&&typeof Jt.setStrictMode=="function")try{Jt.setStrictMode(En,o)}catch{}}var Rn=Math.clz32?Math.clz32:Be,Wa=Math.log,ma=Math.LN2;function Be(o){return o>>>=0,o===0?32:31-(Wa(o)/ma|0)|0}var _t=256,Rt=262144,lt=4194304;function Ot(o){var s=o&42;if(s!==0)return s;switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function qe(o,s,c){var h=o.pendingLanes;if(h===0)return 0;var v=0,_=o.suspendedLanes,k=o.pingedLanes;o=o.warmLanes;var j=h&134217727;return j!==0?(h=j&~_,h!==0?v=Ot(h):(k&=j,k!==0?v=Ot(k):c||(c=j&~o,c!==0&&(v=Ot(c))))):(j=h&~_,j!==0?v=Ot(j):k!==0?v=Ot(k):c||(c=h&~o,c!==0&&(v=Ot(c)))),v===0?0:s!==0&&s!==v&&(s&_)===0&&(_=v&-v,c=s&-s,_>=c||_===32&&(c&4194048)!==0)?s:v}function ct(o,s){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&s)===0}function Kt(o,s){switch(o){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bt(){var o=lt;return lt<<=1,(lt&62914560)===0&&(lt=4194304),o}function dr(o){for(var s=[],c=0;31>c;c++)s.push(o);return s}function Ct(o,s){o.pendingLanes|=s,s!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function en(o,s,c,h,v,_){var k=o.pendingLanes;o.pendingLanes=c,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=c,o.entangledLanes&=c,o.errorRecoveryDisabledLanes&=c,o.shellSuspendCounter=0;var j=o.entanglements,Q=o.expirationTimes,fe=o.hiddenUpdates;for(c=k&~c;0<c;){var be=31-Rn(c),xe=1<<be;j[be]=0,Q[be]=-1;var me=fe[be];if(me!==null)for(fe[be]=null,be=0;be<me.length;be++){var ge=me[be];ge!==null&&(ge.lane&=-536870913)}c&=~xe}h!==0&&ao(o,h,0),_!==0&&v===0&&o.tag!==0&&(o.suspendedLanes|=_&~(k&~s))}function ao(o,s,c){o.pendingLanes|=s,o.suspendedLanes&=~s;var h=31-Rn(s);o.entangledLanes|=s,o.entanglements[h]=o.entanglements[h]|1073741824|c&261930}function Wn(o,s){var c=o.entangledLanes|=s;for(o=o.entanglements;c;){var h=31-Rn(c),v=1<<h;v&s|o[h]&s&&(o[h]|=s),c&=~v}}function xr(o,s){var c=s&-s;return c=(c&42)!==0?1:Vi(c),(c&(o.suspendedLanes|s))!==0?0:c}function Vi(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Co(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function og(){var o=Y.p;return o!==0?o:(o=window.event,o===void 0?32:MR(o.type))}function Y1(o,s){var c=Y.p;try{return Y.p=o,s()}finally{Y.p=c}}var Qa=Math.random().toString(36).slice(2),Qn="__reactFiber$"+Qa,Tr="__reactProps$"+Qa,Bi="__reactContainer$"+Qa,ag="__reactEvents$"+Qa,p3="__reactListeners$"+Qa,m3="__reactHandles$"+Qa,W1="__reactResources$"+Qa,Sc="__reactMarker$"+Qa;function sg(o){delete o[Qn],delete o[Tr],delete o[ag],delete o[p3],delete o[m3]}function qi(o){var s=o[Qn];if(s)return s;for(var c=o.parentNode;c;){if(s=c[Bi]||c[Qn]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(o=vR(o);o!==null;){if(c=o[Qn])return c;o=vR(o)}return s}o=c,c=o.parentNode}return null}function Hi(o){if(o=o[Qn]||o[Bi]){var s=o.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return o}return null}function Ec(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o.stateNode;throw Error(r(33))}function Gi(o){var s=o[W1];return s||(s=o[W1]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function qn(o){o[Sc]=!0}var Q1=new Set,X1={};function Qs(o,s){Zi(o,s),Zi(o+"Capture",s)}function Zi(o,s){for(X1[o]=s,o=0;o<s.length;o++)Q1.add(s[o])}var g3=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),J1={},ew={};function v3(o){return Ve.call(ew,o)?!0:Ve.call(J1,o)?!1:g3.test(o)?ew[o]=!0:(J1[o]=!0,!1)}function Ld(o,s,c){if(v3(s))if(c===null)o.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":o.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){o.removeAttribute(s);return}}o.setAttribute(s,""+c)}}function jd(o,s,c){if(c===null)o.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(s);return}o.setAttribute(s,""+c)}}function ga(o,s,c,h){if(h===null)o.removeAttribute(c);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(c);return}o.setAttributeNS(s,c,""+h)}}function so(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function tw(o){var s=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function y3(o,s,c){var h=Object.getOwnPropertyDescriptor(o.constructor.prototype,s);if(!o.hasOwnProperty(s)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var v=h.get,_=h.set;return Object.defineProperty(o,s,{configurable:!0,get:function(){return v.call(this)},set:function(k){c=""+k,_.call(this,k)}}),Object.defineProperty(o,s,{enumerable:h.enumerable}),{getValue:function(){return c},setValue:function(k){c=""+k},stopTracking:function(){o._valueTracker=null,delete o[s]}}}}function ig(o){if(!o._valueTracker){var s=tw(o)?"checked":"value";o._valueTracker=y3(o,s,""+o[s])}}function nw(o){if(!o)return!1;var s=o._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return o&&(h=tw(o)?o.checked?"true":"false":o.value),o=h,o!==c?(s.setValue(o),!0):!1}function $d(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var _3=/[\n"\\]/g;function io(o){return o.replace(_3,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function lg(o,s,c,h,v,_,k,j){o.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?o.type=k:o.removeAttribute("type"),s!=null?k==="number"?(s===0&&o.value===""||o.value!=s)&&(o.value=""+so(s)):o.value!==""+so(s)&&(o.value=""+so(s)):k!=="submit"&&k!=="reset"||o.removeAttribute("value"),s!=null?cg(o,k,so(s)):c!=null?cg(o,k,so(c)):h!=null&&o.removeAttribute("value"),v==null&&_!=null&&(o.defaultChecked=!!_),v!=null&&(o.checked=v&&typeof v!="function"&&typeof v!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?o.name=""+so(j):o.removeAttribute("name")}function rw(o,s,c,h,v,_,k,j){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(o.type=_),s!=null||c!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){ig(o);return}c=c!=null?""+so(c):"",s=s!=null?""+so(s):c,j||s===o.value||(o.value=s),o.defaultValue=s}h=h??v,h=typeof h!="function"&&typeof h!="symbol"&&!!h,o.checked=j?o.checked:!!h,o.defaultChecked=!!h,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(o.name=k),ig(o)}function cg(o,s,c){s==="number"&&$d(o.ownerDocument)===o||o.defaultValue===""+c||(o.defaultValue=""+c)}function Ki(o,s,c,h){if(o=o.options,s){s={};for(var v=0;v<c.length;v++)s["$"+c[v]]=!0;for(c=0;c<o.length;c++)v=s.hasOwnProperty("$"+o[c].value),o[c].selected!==v&&(o[c].selected=v),v&&h&&(o[c].defaultSelected=!0)}else{for(c=""+so(c),s=null,v=0;v<o.length;v++){if(o[v].value===c){o[v].selected=!0,h&&(o[v].defaultSelected=!0);return}s!==null||o[v].disabled||(s=o[v])}s!==null&&(s.selected=!0)}}function ow(o,s,c){if(s!=null&&(s=""+so(s),s!==o.value&&(o.value=s),c==null)){o.defaultValue!==s&&(o.defaultValue=s);return}o.defaultValue=c!=null?""+so(c):""}function aw(o,s,c,h){if(s==null){if(h!=null){if(c!=null)throw Error(r(92));if(le(h)){if(1<h.length)throw Error(r(93));h=h[0]}c=h}c==null&&(c=""),s=c}c=so(s),o.defaultValue=c,h=o.textContent,h===c&&h!==""&&h!==null&&(o.value=h),ig(o)}function Yi(o,s){if(s){var c=o.firstChild;if(c&&c===o.lastChild&&c.nodeType===3){c.nodeValue=s;return}}o.textContent=s}var b3=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function sw(o,s,c){var h=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?h?o.setProperty(s,""):s==="float"?o.cssFloat="":o[s]="":h?o.setProperty(s,c):typeof c!="number"||c===0||b3.has(s)?s==="float"?o.cssFloat=c:o[s]=(""+c).trim():o[s]=c+"px"}function iw(o,s,c){if(s!=null&&typeof s!="object")throw Error(r(62));if(o=o.style,c!=null){for(var h in c)!c.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?o.setProperty(h,""):h==="float"?o.cssFloat="":o[h]="");for(var v in s)h=s[v],s.hasOwnProperty(v)&&c[v]!==h&&sw(o,v,h)}else for(var _ in s)s.hasOwnProperty(_)&&sw(o,_,s[_])}function ug(o){if(o.indexOf("-")===-1)return!1;switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var w3=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),S3=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ud(o){return S3.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function va(){}var dg=null;function fg(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Wi=null,Qi=null;function lw(o){var s=Hi(o);if(s&&(o=s.stateNode)){var c=o[Tr]||null;e:switch(o=s.stateNode,s.type){case"input":if(lg(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=o;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+io(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==o&&h.form===o.form){var v=h[Tr]||null;if(!v)throw Error(r(90));lg(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<c.length;s++)h=c[s],h.form===o.form&&nw(h)}break e;case"textarea":ow(o,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Ki(o,!!c.multiple,s,!1)}}}var hg=!1;function cw(o,s,c){if(hg)return o(s,c);hg=!0;try{var h=o(s);return h}finally{if(hg=!1,(Wi!==null||Qi!==null)&&(Of(),Wi&&(s=Wi,o=Qi,Qi=Wi=null,lw(s),o)))for(s=0;s<o.length;s++)lw(o[s])}}function Rc(o,s){var c=o.stateNode;if(c===null)return null;var h=c[Tr]||null;if(h===null)return null;c=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(o=o.type,h=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!h;break e;default:o=!1}if(o)return null;if(c&&typeof c!="function")throw Error(r(231,s,typeof c));return c}var ya=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pg=!1;if(ya)try{var xc={};Object.defineProperty(xc,"passive",{get:function(){pg=!0}}),window.addEventListener("test",xc,xc),window.removeEventListener("test",xc,xc)}catch{pg=!1}var Xa=null,mg=null,zd=null;function uw(){if(zd)return zd;var o,s=mg,c=s.length,h,v="value"in Xa?Xa.value:Xa.textContent,_=v.length;for(o=0;o<c&&s[o]===v[o];o++);var k=c-o;for(h=1;h<=k&&s[c-h]===v[_-h];h++);return zd=v.slice(o,1<h?1-h:void 0)}function Fd(o){var s=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&s===13&&(o=13)):o=s,o===10&&(o=13),32<=o||o===13?o:0}function Vd(){return!0}function dw(){return!1}function Or(o){function s(c,h,v,_,k){this._reactName=c,this._targetInst=v,this.type=h,this.nativeEvent=_,this.target=k,this.currentTarget=null;for(var j in o)o.hasOwnProperty(j)&&(c=o[j],this[j]=c?c(_):_[j]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Vd:dw,this.isPropagationStopped=dw,this}return p(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Vd)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Vd)},persist:function(){},isPersistent:Vd}),s}var Xs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bd=Or(Xs),Tc=p({},Xs,{view:0,detail:0}),E3=Or(Tc),gg,vg,Oc,qd=p({},Tc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_g,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Oc&&(Oc&&o.type==="mousemove"?(gg=o.screenX-Oc.screenX,vg=o.screenY-Oc.screenY):vg=gg=0,Oc=o),gg)},movementY:function(o){return"movementY"in o?o.movementY:vg}}),fw=Or(qd),R3=p({},qd,{dataTransfer:0}),x3=Or(R3),T3=p({},Tc,{relatedTarget:0}),yg=Or(T3),O3=p({},Xs,{animationName:0,elapsedTime:0,pseudoElement:0}),C3=Or(O3),A3=p({},Xs,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),I3=Or(A3),N3=p({},Xs,{data:0}),hw=Or(N3),k3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},M3={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},P3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function D3(o){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(o):(o=P3[o])?!!s[o]:!1}function _g(){return D3}var L3=p({},Tc,{key:function(o){if(o.key){var s=k3[o.key]||o.key;if(s!=="Unidentified")return s}return o.type==="keypress"?(o=Fd(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?M3[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_g,charCode:function(o){return o.type==="keypress"?Fd(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Fd(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),j3=Or(L3),$3=p({},qd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pw=Or($3),U3=p({},Tc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_g}),z3=Or(U3),F3=p({},Xs,{propertyName:0,elapsedTime:0,pseudoElement:0}),V3=Or(F3),B3=p({},qd,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),q3=Or(B3),H3=p({},Xs,{newState:0,oldState:0}),G3=Or(H3),Z3=[9,13,27,32],bg=ya&&"CompositionEvent"in window,Cc=null;ya&&"documentMode"in document&&(Cc=document.documentMode);var K3=ya&&"TextEvent"in window&&!Cc,mw=ya&&(!bg||Cc&&8<Cc&&11>=Cc),gw=" ",vw=!1;function yw(o,s){switch(o){case"keyup":return Z3.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _w(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Xi=!1;function Y3(o,s){switch(o){case"compositionend":return _w(s);case"keypress":return s.which!==32?null:(vw=!0,gw);case"textInput":return o=s.data,o===gw&&vw?null:o;default:return null}}function W3(o,s){if(Xi)return o==="compositionend"||!bg&&yw(o,s)?(o=uw(),zd=mg=Xa=null,Xi=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return mw&&s.locale!=="ko"?null:s.data;default:return null}}var Q3={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function bw(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s==="input"?!!Q3[o.type]:s==="textarea"}function ww(o,s,c,h){Wi?Qi?Qi.push(h):Qi=[h]:Wi=h,s=Pf(s,"onChange"),0<s.length&&(c=new Bd("onChange","change",null,c,h),o.push({event:c,listeners:s}))}var Ac=null,Ic=null;function X3(o){rR(o,0)}function Hd(o){var s=Ec(o);if(nw(s))return o}function Sw(o,s){if(o==="change")return s}var Ew=!1;if(ya){var wg;if(ya){var Sg="oninput"in document;if(!Sg){var Rw=document.createElement("div");Rw.setAttribute("oninput","return;"),Sg=typeof Rw.oninput=="function"}wg=Sg}else wg=!1;Ew=wg&&(!document.documentMode||9<document.documentMode)}function xw(){Ac&&(Ac.detachEvent("onpropertychange",Tw),Ic=Ac=null)}function Tw(o){if(o.propertyName==="value"&&Hd(Ic)){var s=[];ww(s,Ic,o,fg(o)),cw(X3,s)}}function J3(o,s,c){o==="focusin"?(xw(),Ac=s,Ic=c,Ac.attachEvent("onpropertychange",Tw)):o==="focusout"&&xw()}function eP(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Hd(Ic)}function tP(o,s){if(o==="click")return Hd(s)}function nP(o,s){if(o==="input"||o==="change")return Hd(s)}function rP(o,s){return o===s&&(o!==0||1/o===1/s)||o!==o&&s!==s}var zr=typeof Object.is=="function"?Object.is:rP;function Nc(o,s){if(zr(o,s))return!0;if(typeof o!="object"||o===null||typeof s!="object"||s===null)return!1;var c=Object.keys(o),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var v=c[h];if(!Ve.call(s,v)||!zr(o[v],s[v]))return!1}return!0}function Ow(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Cw(o,s){var c=Ow(o);o=0;for(var h;c;){if(c.nodeType===3){if(h=o+c.textContent.length,o<=s&&h>=s)return{node:c,offset:s-o};o=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Ow(c)}}function Aw(o,s){return o&&s?o===s?!0:o&&o.nodeType===3?!1:s&&s.nodeType===3?Aw(o,s.parentNode):"contains"in o?o.contains(s):o.compareDocumentPosition?!!(o.compareDocumentPosition(s)&16):!1:!1}function Iw(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var s=$d(o.document);s instanceof o.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)o=s.contentWindow;else break;s=$d(o.document)}return s}function Eg(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s&&(s==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||s==="textarea"||o.contentEditable==="true")}var oP=ya&&"documentMode"in document&&11>=document.documentMode,Ji=null,Rg=null,kc=null,xg=!1;function Nw(o,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;xg||Ji==null||Ji!==$d(h)||(h=Ji,"selectionStart"in h&&Eg(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),kc&&Nc(kc,h)||(kc=h,h=Pf(Rg,"onSelect"),0<h.length&&(s=new Bd("onSelect","select",null,s,c),o.push({event:s,listeners:h}),s.target=Ji)))}function Js(o,s){var c={};return c[o.toLowerCase()]=s.toLowerCase(),c["Webkit"+o]="webkit"+s,c["Moz"+o]="moz"+s,c}var el={animationend:Js("Animation","AnimationEnd"),animationiteration:Js("Animation","AnimationIteration"),animationstart:Js("Animation","AnimationStart"),transitionrun:Js("Transition","TransitionRun"),transitionstart:Js("Transition","TransitionStart"),transitioncancel:Js("Transition","TransitionCancel"),transitionend:Js("Transition","TransitionEnd")},Tg={},kw={};ya&&(kw=document.createElement("div").style,"AnimationEvent"in window||(delete el.animationend.animation,delete el.animationiteration.animation,delete el.animationstart.animation),"TransitionEvent"in window||delete el.transitionend.transition);function ei(o){if(Tg[o])return Tg[o];if(!el[o])return o;var s=el[o],c;for(c in s)if(s.hasOwnProperty(c)&&c in kw)return Tg[o]=s[c];return o}var Mw=ei("animationend"),Pw=ei("animationiteration"),Dw=ei("animationstart"),aP=ei("transitionrun"),sP=ei("transitionstart"),iP=ei("transitioncancel"),Lw=ei("transitionend"),jw=new Map,Og="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Og.push("scrollEnd");function Ao(o,s){jw.set(o,s),Qs(s,[o])}var Gd=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},lo=[],tl=0,Cg=0;function Zd(){for(var o=tl,s=Cg=tl=0;s<o;){var c=lo[s];lo[s++]=null;var h=lo[s];lo[s++]=null;var v=lo[s];lo[s++]=null;var _=lo[s];if(lo[s++]=null,h!==null&&v!==null){var k=h.pending;k===null?v.next=v:(v.next=k.next,k.next=v),h.pending=v}_!==0&&$w(c,v,_)}}function Kd(o,s,c,h){lo[tl++]=o,lo[tl++]=s,lo[tl++]=c,lo[tl++]=h,Cg|=h,o.lanes|=h,o=o.alternate,o!==null&&(o.lanes|=h)}function Ag(o,s,c,h){return Kd(o,s,c,h),Yd(o)}function ti(o,s){return Kd(o,null,null,s),Yd(o)}function $w(o,s,c){o.lanes|=c;var h=o.alternate;h!==null&&(h.lanes|=c);for(var v=!1,_=o.return;_!==null;)_.childLanes|=c,h=_.alternate,h!==null&&(h.childLanes|=c),_.tag===22&&(o=_.stateNode,o===null||o._visibility&1||(v=!0)),o=_,_=_.return;return o.tag===3?(_=o.stateNode,v&&s!==null&&(v=31-Rn(c),o=_.hiddenUpdates,h=o[v],h===null?o[v]=[s]:h.push(s),s.lane=c|536870912),_):null}function Yd(o){if(50<eu)throw eu=0,$v=null,Error(r(185));for(var s=o.return;s!==null;)o=s,s=o.return;return o.tag===3?o.stateNode:null}var nl={};function lP(o,s,c,h){this.tag=o,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fr(o,s,c,h){return new lP(o,s,c,h)}function Ig(o){return o=o.prototype,!(!o||!o.isReactComponent)}function _a(o,s){var c=o.alternate;return c===null?(c=Fr(o.tag,s,o.key,o.mode),c.elementType=o.elementType,c.type=o.type,c.stateNode=o.stateNode,c.alternate=o,o.alternate=c):(c.pendingProps=s,c.type=o.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=o.flags&65011712,c.childLanes=o.childLanes,c.lanes=o.lanes,c.child=o.child,c.memoizedProps=o.memoizedProps,c.memoizedState=o.memoizedState,c.updateQueue=o.updateQueue,s=o.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=o.sibling,c.index=o.index,c.ref=o.ref,c.refCleanup=o.refCleanup,c}function Uw(o,s){o.flags&=65011714;var c=o.alternate;return c===null?(o.childLanes=0,o.lanes=s,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=c.childLanes,o.lanes=c.lanes,o.child=c.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=c.memoizedProps,o.memoizedState=c.memoizedState,o.updateQueue=c.updateQueue,o.type=c.type,s=c.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),o}function Wd(o,s,c,h,v,_){var k=0;if(h=o,typeof o=="function")Ig(o)&&(k=1);else if(typeof o=="string")k=hD(o,c,D.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case $:return o=Fr(31,c,s,v),o.elementType=$,o.lanes=_,o;case S:return ni(c.children,v,_,s);case w:k=8,v|=24;break;case R:return o=Fr(12,c,s,v|2),o.elementType=R,o.lanes=_,o;case C:return o=Fr(13,c,s,v),o.elementType=C,o.lanes=_,o;case I:return o=Fr(19,c,s,v),o.elementType=I,o.lanes=_,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case T:k=10;break e;case E:k=9;break e;case O:k=11;break e;case N:k=14;break e;case P:k=16,h=null;break e}k=29,c=Error(r(130,o===null?"null":typeof o,"")),h=null}return s=Fr(k,c,s,v),s.elementType=o,s.type=h,s.lanes=_,s}function ni(o,s,c,h){return o=Fr(7,o,h,s),o.lanes=c,o}function Ng(o,s,c){return o=Fr(6,o,null,s),o.lanes=c,o}function zw(o){var s=Fr(18,null,null,0);return s.stateNode=o,s}function kg(o,s,c){return s=Fr(4,o.children!==null?o.children:[],o.key,s),s.lanes=c,s.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},s}var Fw=new WeakMap;function co(o,s){if(typeof o=="object"&&o!==null){var c=Fw.get(o);return c!==void 0?c:(s={value:o,source:s,stack:Xe(s)},Fw.set(o,s),s)}return{value:o,source:s,stack:Xe(s)}}var rl=[],ol=0,Qd=null,Mc=0,uo=[],fo=0,Ja=null,Yo=1,Wo="";function ba(o,s){rl[ol++]=Mc,rl[ol++]=Qd,Qd=o,Mc=s}function Vw(o,s,c){uo[fo++]=Yo,uo[fo++]=Wo,uo[fo++]=Ja,Ja=o;var h=Yo;o=Wo;var v=32-Rn(h)-1;h&=~(1<<v),c+=1;var _=32-Rn(s)+v;if(30<_){var k=v-v%5;_=(h&(1<<k)-1).toString(32),h>>=k,v-=k,Yo=1<<32-Rn(s)+v|c<<v|h,Wo=_+o}else Yo=1<<_|c<<v|h,Wo=o}function Mg(o){o.return!==null&&(ba(o,1),Vw(o,1,0))}function Pg(o){for(;o===Qd;)Qd=rl[--ol],rl[ol]=null,Mc=rl[--ol],rl[ol]=null;for(;o===Ja;)Ja=uo[--fo],uo[fo]=null,Wo=uo[--fo],uo[fo]=null,Yo=uo[--fo],uo[fo]=null}function Bw(o,s){uo[fo++]=Yo,uo[fo++]=Wo,uo[fo++]=Ja,Yo=s.id,Wo=s.overflow,Ja=o}var Xn=null,tn=null,St=!1,es=null,ho=!1,Dg=Error(r(519));function ts(o){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Pc(co(s,o)),Dg}function qw(o){var s=o.stateNode,c=o.type,h=o.memoizedProps;switch(s[Qn]=o,s[Tr]=h,c){case"dialog":vt("cancel",s),vt("close",s);break;case"iframe":case"object":case"embed":vt("load",s);break;case"video":case"audio":for(c=0;c<nu.length;c++)vt(nu[c],s);break;case"source":vt("error",s);break;case"img":case"image":case"link":vt("error",s),vt("load",s);break;case"details":vt("toggle",s);break;case"input":vt("invalid",s),rw(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":vt("invalid",s);break;case"textarea":vt("invalid",s),aw(s,h.value,h.defaultValue,h.children)}c=h.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||h.suppressHydrationWarning===!0||iR(s.textContent,c)?(h.popover!=null&&(vt("beforetoggle",s),vt("toggle",s)),h.onScroll!=null&&vt("scroll",s),h.onScrollEnd!=null&&vt("scrollend",s),h.onClick!=null&&(s.onclick=va),s=!0):s=!1,s||ts(o,!0)}function Hw(o){for(Xn=o.return;Xn;)switch(Xn.tag){case 5:case 31:case 13:ho=!1;return;case 27:case 3:ho=!0;return;default:Xn=Xn.return}}function al(o){if(o!==Xn)return!1;if(!St)return Hw(o),St=!0,!1;var s=o.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=o.type,c=!(c!=="form"&&c!=="button")||Jv(o.type,o.memoizedProps)),c=!c),c&&tn&&ts(o),Hw(o),s===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));tn=gR(o)}else if(s===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));tn=gR(o)}else s===27?(s=tn,ms(o.type)?(o=oy,oy=null,tn=o):tn=s):tn=Xn?mo(o.stateNode.nextSibling):null;return!0}function ri(){tn=Xn=null,St=!1}function Lg(){var o=es;return o!==null&&(Nr===null?Nr=o:Nr.push.apply(Nr,o),es=null),o}function Pc(o){es===null?es=[o]:es.push(o)}var jg=M(null),oi=null,wa=null;function ns(o,s,c){V(jg,s._currentValue),s._currentValue=c}function Sa(o){o._currentValue=jg.current,q(jg)}function $g(o,s,c){for(;o!==null;){var h=o.alternate;if((o.childLanes&s)!==s?(o.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),o===c)break;o=o.return}}function Ug(o,s,c,h){var v=o.child;for(v!==null&&(v.return=o);v!==null;){var _=v.dependencies;if(_!==null){var k=v.child;_=_.firstContext;e:for(;_!==null;){var j=_;_=v;for(var Q=0;Q<s.length;Q++)if(j.context===s[Q]){_.lanes|=c,j=_.alternate,j!==null&&(j.lanes|=c),$g(_.return,c,o),h||(k=null);break e}_=j.next}}else if(v.tag===18){if(k=v.return,k===null)throw Error(r(341));k.lanes|=c,_=k.alternate,_!==null&&(_.lanes|=c),$g(k,c,o),k=null}else k=v.child;if(k!==null)k.return=v;else for(k=v;k!==null;){if(k===o){k=null;break}if(v=k.sibling,v!==null){v.return=k.return,k=v;break}k=k.return}v=k}}function sl(o,s,c,h){o=null;for(var v=s,_=!1;v!==null;){if(!_){if((v.flags&524288)!==0)_=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var k=v.alternate;if(k===null)throw Error(r(387));if(k=k.memoizedProps,k!==null){var j=v.type;zr(v.pendingProps.value,k.value)||(o!==null?o.push(j):o=[j])}}else if(v===ue.current){if(k=v.alternate,k===null)throw Error(r(387));k.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(o!==null?o.push(iu):o=[iu])}v=v.return}o!==null&&Ug(s,o,c,h),s.flags|=262144}function Xd(o){for(o=o.firstContext;o!==null;){if(!zr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function ai(o){oi=o,wa=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Jn(o){return Gw(oi,o)}function Jd(o,s){return oi===null&&ai(o),Gw(o,s)}function Gw(o,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},wa===null){if(o===null)throw Error(r(308));wa=s,o.dependencies={lanes:0,firstContext:s},o.flags|=524288}else wa=wa.next=s;return c}var cP=typeof AbortController<"u"?AbortController:function(){var o=[],s=this.signal={aborted:!1,addEventListener:function(c,h){o.push(h)}};this.abort=function(){s.aborted=!0,o.forEach(function(c){return c()})}},uP=e.unstable_scheduleCallback,dP=e.unstable_NormalPriority,xn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zg(){return{controller:new cP,data:new Map,refCount:0}}function Dc(o){o.refCount--,o.refCount===0&&uP(dP,function(){o.controller.abort()})}var Lc=null,Fg=0,il=0,ll=null;function fP(o,s){if(Lc===null){var c=Lc=[];Fg=0,il=qv(),ll={status:"pending",value:void 0,then:function(h){c.push(h)}}}return Fg++,s.then(Zw,Zw),s}function Zw(){if(--Fg===0&&Lc!==null){ll!==null&&(ll.status="fulfilled");var o=Lc;Lc=null,il=0,ll=null;for(var s=0;s<o.length;s++)(0,o[s])()}}function hP(o,s){var c=[],h={status:"pending",value:null,reason:null,then:function(v){c.push(v)}};return o.then(function(){h.status="fulfilled",h.value=s;for(var v=0;v<c.length;v++)(0,c[v])(s)},function(v){for(h.status="rejected",h.reason=v,v=0;v<c.length;v++)(0,c[v])(void 0)}),h}var Kw=B.S;B.S=function(o,s){NE=we(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&fP(o,s),Kw!==null&&Kw(o,s)};var si=M(null);function Vg(){var o=si.current;return o!==null?o:Yt.pooledCache}function ef(o,s){s===null?V(si,si.current):V(si,s.pool)}function Yw(){var o=Vg();return o===null?null:{parent:xn._currentValue,pool:o}}var cl=Error(r(460)),Bg=Error(r(474)),tf=Error(r(542)),nf={then:function(){}};function Ww(o){return o=o.status,o==="fulfilled"||o==="rejected"}function Qw(o,s,c){switch(c=o[c],c===void 0?o.push(s):c!==s&&(s.then(va,va),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,Jw(o),o;default:if(typeof s.status=="string")s.then(va,va);else{if(o=Yt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=s,o.status="pending",o.then(function(h){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=h}},function(h){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,Jw(o),o}throw li=s,cl}}function ii(o){try{var s=o._init;return s(o._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(li=c,cl):c}}var li=null;function Xw(){if(li===null)throw Error(r(459));var o=li;return li=null,o}function Jw(o){if(o===cl||o===tf)throw Error(r(483))}var ul=null,jc=0;function rf(o){var s=jc;return jc+=1,ul===null&&(ul=[]),Qw(ul,o,s)}function $c(o,s){s=s.props.ref,o.ref=s!==void 0?s:null}function of(o,s){throw s.$$typeof===g?Error(r(525)):(o=Object.prototype.toString.call(s),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":o)))}function eS(o){function s(ie,te){if(o){var de=ie.deletions;de===null?(ie.deletions=[te],ie.flags|=16):de.push(te)}}function c(ie,te){if(!o)return null;for(;te!==null;)s(ie,te),te=te.sibling;return null}function h(ie){for(var te=new Map;ie!==null;)ie.key!==null?te.set(ie.key,ie):te.set(ie.index,ie),ie=ie.sibling;return te}function v(ie,te){return ie=_a(ie,te),ie.index=0,ie.sibling=null,ie}function _(ie,te,de){return ie.index=de,o?(de=ie.alternate,de!==null?(de=de.index,de<te?(ie.flags|=67108866,te):de):(ie.flags|=67108866,te)):(ie.flags|=1048576,te)}function k(ie){return o&&ie.alternate===null&&(ie.flags|=67108866),ie}function j(ie,te,de,Se){return te===null||te.tag!==6?(te=Ng(de,ie.mode,Se),te.return=ie,te):(te=v(te,de),te.return=ie,te)}function Q(ie,te,de,Se){var Ke=de.type;return Ke===S?be(ie,te,de.props.children,Se,de.key):te!==null&&(te.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===P&&ii(Ke)===te.type)?(te=v(te,de.props),$c(te,de),te.return=ie,te):(te=Wd(de.type,de.key,de.props,null,ie.mode,Se),$c(te,de),te.return=ie,te)}function fe(ie,te,de,Se){return te===null||te.tag!==4||te.stateNode.containerInfo!==de.containerInfo||te.stateNode.implementation!==de.implementation?(te=kg(de,ie.mode,Se),te.return=ie,te):(te=v(te,de.children||[]),te.return=ie,te)}function be(ie,te,de,Se,Ke){return te===null||te.tag!==7?(te=ni(de,ie.mode,Se,Ke),te.return=ie,te):(te=v(te,de),te.return=ie,te)}function xe(ie,te,de){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Ng(""+te,ie.mode,de),te.return=ie,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case y:return de=Wd(te.type,te.key,te.props,null,ie.mode,de),$c(de,te),de.return=ie,de;case b:return te=kg(te,ie.mode,de),te.return=ie,te;case P:return te=ii(te),xe(ie,te,de)}if(le(te)||G(te))return te=ni(te,ie.mode,de,null),te.return=ie,te;if(typeof te.then=="function")return xe(ie,rf(te),de);if(te.$$typeof===T)return xe(ie,Jd(ie,te),de);of(ie,te)}return null}function me(ie,te,de,Se){var Ke=te!==null?te.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return Ke!==null?null:j(ie,te,""+de,Se);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case y:return de.key===Ke?Q(ie,te,de,Se):null;case b:return de.key===Ke?fe(ie,te,de,Se):null;case P:return de=ii(de),me(ie,te,de,Se)}if(le(de)||G(de))return Ke!==null?null:be(ie,te,de,Se,null);if(typeof de.then=="function")return me(ie,te,rf(de),Se);if(de.$$typeof===T)return me(ie,te,Jd(ie,de),Se);of(ie,de)}return null}function ge(ie,te,de,Se,Ke){if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return ie=ie.get(de)||null,j(te,ie,""+Se,Ke);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case y:return ie=ie.get(Se.key===null?de:Se.key)||null,Q(te,ie,Se,Ke);case b:return ie=ie.get(Se.key===null?de:Se.key)||null,fe(te,ie,Se,Ke);case P:return Se=ii(Se),ge(ie,te,de,Se,Ke)}if(le(Se)||G(Se))return ie=ie.get(de)||null,be(te,ie,Se,Ke,null);if(typeof Se.then=="function")return ge(ie,te,de,rf(Se),Ke);if(Se.$$typeof===T)return ge(ie,te,de,Jd(te,Se),Ke);of(te,Se)}return null}function $e(ie,te,de,Se){for(var Ke=null,At=null,He=te,st=te=0,wt=null;He!==null&&st<de.length;st++){He.index>st?(wt=He,He=null):wt=He.sibling;var It=me(ie,He,de[st],Se);if(It===null){He===null&&(He=wt);break}o&&He&&It.alternate===null&&s(ie,He),te=_(It,te,st),At===null?Ke=It:At.sibling=It,At=It,He=wt}if(st===de.length)return c(ie,He),St&&ba(ie,st),Ke;if(He===null){for(;st<de.length;st++)He=xe(ie,de[st],Se),He!==null&&(te=_(He,te,st),At===null?Ke=He:At.sibling=He,At=He);return St&&ba(ie,st),Ke}for(He=h(He);st<de.length;st++)wt=ge(He,ie,st,de[st],Se),wt!==null&&(o&&wt.alternate!==null&&He.delete(wt.key===null?st:wt.key),te=_(wt,te,st),At===null?Ke=wt:At.sibling=wt,At=wt);return o&&He.forEach(function(bs){return s(ie,bs)}),St&&ba(ie,st),Ke}function We(ie,te,de,Se){if(de==null)throw Error(r(151));for(var Ke=null,At=null,He=te,st=te=0,wt=null,It=de.next();He!==null&&!It.done;st++,It=de.next()){He.index>st?(wt=He,He=null):wt=He.sibling;var bs=me(ie,He,It.value,Se);if(bs===null){He===null&&(He=wt);break}o&&He&&bs.alternate===null&&s(ie,He),te=_(bs,te,st),At===null?Ke=bs:At.sibling=bs,At=bs,He=wt}if(It.done)return c(ie,He),St&&ba(ie,st),Ke;if(He===null){for(;!It.done;st++,It=de.next())It=xe(ie,It.value,Se),It!==null&&(te=_(It,te,st),At===null?Ke=It:At.sibling=It,At=It);return St&&ba(ie,st),Ke}for(He=h(He);!It.done;st++,It=de.next())It=ge(He,ie,st,It.value,Se),It!==null&&(o&&It.alternate!==null&&He.delete(It.key===null?st:It.key),te=_(It,te,st),At===null?Ke=It:At.sibling=It,At=It);return o&&He.forEach(function(RD){return s(ie,RD)}),St&&ba(ie,st),Ke}function Gt(ie,te,de,Se){if(typeof de=="object"&&de!==null&&de.type===S&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case y:e:{for(var Ke=de.key;te!==null;){if(te.key===Ke){if(Ke=de.type,Ke===S){if(te.tag===7){c(ie,te.sibling),Se=v(te,de.props.children),Se.return=ie,ie=Se;break e}}else if(te.elementType===Ke||typeof Ke=="object"&&Ke!==null&&Ke.$$typeof===P&&ii(Ke)===te.type){c(ie,te.sibling),Se=v(te,de.props),$c(Se,de),Se.return=ie,ie=Se;break e}c(ie,te);break}else s(ie,te);te=te.sibling}de.type===S?(Se=ni(de.props.children,ie.mode,Se,de.key),Se.return=ie,ie=Se):(Se=Wd(de.type,de.key,de.props,null,ie.mode,Se),$c(Se,de),Se.return=ie,ie=Se)}return k(ie);case b:e:{for(Ke=de.key;te!==null;){if(te.key===Ke)if(te.tag===4&&te.stateNode.containerInfo===de.containerInfo&&te.stateNode.implementation===de.implementation){c(ie,te.sibling),Se=v(te,de.children||[]),Se.return=ie,ie=Se;break e}else{c(ie,te);break}else s(ie,te);te=te.sibling}Se=kg(de,ie.mode,Se),Se.return=ie,ie=Se}return k(ie);case P:return de=ii(de),Gt(ie,te,de,Se)}if(le(de))return $e(ie,te,de,Se);if(G(de)){if(Ke=G(de),typeof Ke!="function")throw Error(r(150));return de=Ke.call(de),We(ie,te,de,Se)}if(typeof de.then=="function")return Gt(ie,te,rf(de),Se);if(de.$$typeof===T)return Gt(ie,te,Jd(ie,de),Se);of(ie,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,te!==null&&te.tag===6?(c(ie,te.sibling),Se=v(te,de),Se.return=ie,ie=Se):(c(ie,te),Se=Ng(de,ie.mode,Se),Se.return=ie,ie=Se),k(ie)):c(ie,te)}return function(ie,te,de,Se){try{jc=0;var Ke=Gt(ie,te,de,Se);return ul=null,Ke}catch(He){if(He===cl||He===tf)throw He;var At=Fr(29,He,null,ie.mode);return At.lanes=Se,At.return=ie,At}}}var ci=eS(!0),tS=eS(!1),rs=!1;function qg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hg(o,s){o=o.updateQueue,s.updateQueue===o&&(s.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function os(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function as(o,s,c){var h=o.updateQueue;if(h===null)return null;if(h=h.shared,(Pt&2)!==0){var v=h.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),h.pending=s,s=Yd(o),$w(o,null,c),s}return Kd(o,h,s,c),Yd(o)}function Uc(o,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var h=s.lanes;h&=o.pendingLanes,c|=h,s.lanes=c,Wn(o,c)}}function Gg(o,s){var c=o.updateQueue,h=o.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var v=null,_=null;if(c=c.firstBaseUpdate,c!==null){do{var k={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};_===null?v=_=k:_=_.next=k,c=c.next}while(c!==null);_===null?v=_=s:_=_.next=s}else v=_=s;c={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:_,shared:h.shared,callbacks:h.callbacks},o.updateQueue=c;return}o=c.lastBaseUpdate,o===null?c.firstBaseUpdate=s:o.next=s,c.lastBaseUpdate=s}var Zg=!1;function zc(){if(Zg){var o=ll;if(o!==null)throw o}}function Fc(o,s,c,h){Zg=!1;var v=o.updateQueue;rs=!1;var _=v.firstBaseUpdate,k=v.lastBaseUpdate,j=v.shared.pending;if(j!==null){v.shared.pending=null;var Q=j,fe=Q.next;Q.next=null,k===null?_=fe:k.next=fe,k=Q;var be=o.alternate;be!==null&&(be=be.updateQueue,j=be.lastBaseUpdate,j!==k&&(j===null?be.firstBaseUpdate=fe:j.next=fe,be.lastBaseUpdate=Q))}if(_!==null){var xe=v.baseState;k=0,be=fe=Q=null,j=_;do{var me=j.lane&-536870913,ge=me!==j.lane;if(ge?(bt&me)===me:(h&me)===me){me!==0&&me===il&&(Zg=!0),be!==null&&(be=be.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var $e=o,We=j;me=s;var Gt=c;switch(We.tag){case 1:if($e=We.payload,typeof $e=="function"){xe=$e.call(Gt,xe,me);break e}xe=$e;break e;case 3:$e.flags=$e.flags&-65537|128;case 0:if($e=We.payload,me=typeof $e=="function"?$e.call(Gt,xe,me):$e,me==null)break e;xe=p({},xe,me);break e;case 2:rs=!0}}me=j.callback,me!==null&&(o.flags|=64,ge&&(o.flags|=8192),ge=v.callbacks,ge===null?v.callbacks=[me]:ge.push(me))}else ge={lane:me,tag:j.tag,payload:j.payload,callback:j.callback,next:null},be===null?(fe=be=ge,Q=xe):be=be.next=ge,k|=me;if(j=j.next,j===null){if(j=v.shared.pending,j===null)break;ge=j,j=ge.next,ge.next=null,v.lastBaseUpdate=ge,v.shared.pending=null}}while(!0);be===null&&(Q=xe),v.baseState=Q,v.firstBaseUpdate=fe,v.lastBaseUpdate=be,_===null&&(v.shared.lanes=0),us|=k,o.lanes=k,o.memoizedState=xe}}function nS(o,s){if(typeof o!="function")throw Error(r(191,o));o.call(s)}function rS(o,s){var c=o.callbacks;if(c!==null)for(o.callbacks=null,o=0;o<c.length;o++)nS(c[o],s)}var dl=M(null),af=M(0);function oS(o,s){o=Na,V(af,o),V(dl,s),Na=o|s.baseLanes}function Kg(){V(af,Na),V(dl,dl.current)}function Yg(){Na=af.current,q(dl),q(af)}var Vr=M(null),po=null;function ss(o){var s=o.alternate;V(gn,gn.current&1),V(Vr,o),po===null&&(s===null||dl.current!==null||s.memoizedState!==null)&&(po=o)}function Wg(o){V(gn,gn.current),V(Vr,o),po===null&&(po=o)}function aS(o){o.tag===22?(V(gn,gn.current),V(Vr,o),po===null&&(po=o)):is()}function is(){V(gn,gn.current),V(Vr,Vr.current)}function Br(o){q(Vr),po===o&&(po=null),q(gn)}var gn=M(0);function sf(o){for(var s=o;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||ny(c)||ry(c)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Ea=0,at=null,qt=null,Tn=null,lf=!1,fl=!1,ui=!1,cf=0,Vc=0,hl=null,pP=0;function fn(){throw Error(r(321))}function Qg(o,s){if(s===null)return!1;for(var c=0;c<s.length&&c<o.length;c++)if(!zr(o[c],s[c]))return!1;return!0}function Xg(o,s,c,h,v,_){return Ea=_,at=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=o===null||o.memoizedState===null?VS:hv,ui=!1,_=c(h,v),ui=!1,fl&&(_=iS(s,c,h,v)),sS(o),_}function sS(o){B.H=Hc;var s=qt!==null&&qt.next!==null;if(Ea=0,Tn=qt=at=null,lf=!1,Vc=0,hl=null,s)throw Error(r(300));o===null||On||(o=o.dependencies,o!==null&&Xd(o)&&(On=!0))}function iS(o,s,c,h){at=o;var v=0;do{if(fl&&(hl=null),Vc=0,fl=!1,25<=v)throw Error(r(301));if(v+=1,Tn=qt=null,o.updateQueue!=null){var _=o.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}B.H=BS,_=s(c,h)}while(fl);return _}function mP(){var o=B.H,s=o.useState()[0];return s=typeof s.then=="function"?Bc(s):s,o=o.useState()[0],(qt!==null?qt.memoizedState:null)!==o&&(at.flags|=1024),s}function Jg(){var o=cf!==0;return cf=0,o}function ev(o,s,c){s.updateQueue=o.updateQueue,s.flags&=-2053,o.lanes&=~c}function tv(o){if(lf){for(o=o.memoizedState;o!==null;){var s=o.queue;s!==null&&(s.pending=null),o=o.next}lf=!1}Ea=0,Tn=qt=at=null,fl=!1,Vc=cf=0,hl=null}function yr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tn===null?at.memoizedState=Tn=o:Tn=Tn.next=o,Tn}function vn(){if(qt===null){var o=at.alternate;o=o!==null?o.memoizedState:null}else o=qt.next;var s=Tn===null?at.memoizedState:Tn.next;if(s!==null)Tn=s,qt=o;else{if(o===null)throw at.alternate===null?Error(r(467)):Error(r(310));qt=o,o={memoizedState:qt.memoizedState,baseState:qt.baseState,baseQueue:qt.baseQueue,queue:qt.queue,next:null},Tn===null?at.memoizedState=Tn=o:Tn=Tn.next=o}return Tn}function uf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bc(o){var s=Vc;return Vc+=1,hl===null&&(hl=[]),o=Qw(hl,o,s),s=at,(Tn===null?s.memoizedState:Tn.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?VS:hv),o}function df(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Bc(o);if(o.$$typeof===T)return Jn(o)}throw Error(r(438,String(o)))}function nv(o){var s=null,c=at.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var h=at.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=uf(),at.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(o),h=0;h<o;h++)c[h]=K;return s.index++,c}function Ra(o,s){return typeof s=="function"?s(o):s}function ff(o){var s=vn();return rv(s,qt,o)}function rv(o,s,c){var h=o.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=c;var v=o.baseQueue,_=h.pending;if(_!==null){if(v!==null){var k=v.next;v.next=_.next,_.next=k}s.baseQueue=v=_,h.pending=null}if(_=o.baseState,v===null)o.memoizedState=_;else{s=v.next;var j=k=null,Q=null,fe=s,be=!1;do{var xe=fe.lane&-536870913;if(xe!==fe.lane?(bt&xe)===xe:(Ea&xe)===xe){var me=fe.revertLane;if(me===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),xe===il&&(be=!0);else if((Ea&me)===me){fe=fe.next,me===il&&(be=!0);continue}else xe={lane:0,revertLane:fe.revertLane,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},Q===null?(j=Q=xe,k=_):Q=Q.next=xe,at.lanes|=me,us|=me;xe=fe.action,ui&&c(_,xe),_=fe.hasEagerState?fe.eagerState:c(_,xe)}else me={lane:xe,revertLane:fe.revertLane,gesture:fe.gesture,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},Q===null?(j=Q=me,k=_):Q=Q.next=me,at.lanes|=xe,us|=xe;fe=fe.next}while(fe!==null&&fe!==s);if(Q===null?k=_:Q.next=j,!zr(_,o.memoizedState)&&(On=!0,be&&(c=ll,c!==null)))throw c;o.memoizedState=_,o.baseState=k,o.baseQueue=Q,h.lastRenderedState=_}return v===null&&(h.lanes=0),[o.memoizedState,h.dispatch]}function ov(o){var s=vn(),c=s.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=o;var h=c.dispatch,v=c.pending,_=s.memoizedState;if(v!==null){c.pending=null;var k=v=v.next;do _=o(_,k.action),k=k.next;while(k!==v);zr(_,s.memoizedState)||(On=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),c.lastRenderedState=_}return[_,h]}function lS(o,s,c){var h=at,v=vn(),_=St;if(_){if(c===void 0)throw Error(r(407));c=c()}else c=s();var k=!zr((qt||v).memoizedState,c);if(k&&(v.memoizedState=c,On=!0),v=v.queue,iv(dS.bind(null,h,v,o),[o]),v.getSnapshot!==s||k||Tn!==null&&Tn.memoizedState.tag&1){if(h.flags|=2048,pl(9,{destroy:void 0},uS.bind(null,h,v,c,s),null),Yt===null)throw Error(r(349));_||(Ea&127)!==0||cS(h,s,c)}return c}function cS(o,s,c){o.flags|=16384,o={getSnapshot:s,value:c},s=at.updateQueue,s===null?(s=uf(),at.updateQueue=s,s.stores=[o]):(c=s.stores,c===null?s.stores=[o]:c.push(o))}function uS(o,s,c,h){s.value=c,s.getSnapshot=h,fS(s)&&hS(o)}function dS(o,s,c){return c(function(){fS(s)&&hS(o)})}function fS(o){var s=o.getSnapshot;o=o.value;try{var c=s();return!zr(o,c)}catch{return!0}}function hS(o){var s=ti(o,2);s!==null&&kr(s,o,2)}function av(o){var s=yr();if(typeof o=="function"){var c=o;if(o=c(),ui){jn(!0);try{c()}finally{jn(!1)}}}return s.memoizedState=s.baseState=o,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:o},s}function pS(o,s,c,h){return o.baseState=c,rv(o,qt,typeof h=="function"?h:Ra)}function gP(o,s,c,h,v){if(mf(o))throw Error(r(485));if(o=s.action,o!==null){var _={payload:v,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){_.listeners.push(k)}};B.T!==null?c(!0):_.isTransition=!1,h(_),c=s.pending,c===null?(_.next=s.pending=_,mS(s,_)):(_.next=c.next,s.pending=c.next=_)}}function mS(o,s){var c=s.action,h=s.payload,v=o.state;if(s.isTransition){var _=B.T,k={};B.T=k;try{var j=c(v,h),Q=B.S;Q!==null&&Q(k,j),gS(o,s,j)}catch(fe){sv(o,s,fe)}finally{_!==null&&k.types!==null&&(_.types=k.types),B.T=_}}else try{_=c(v,h),gS(o,s,_)}catch(fe){sv(o,s,fe)}}function gS(o,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(h){vS(o,s,h)},function(h){return sv(o,s,h)}):vS(o,s,c)}function vS(o,s,c){s.status="fulfilled",s.value=c,yS(s),o.state=c,s=o.pending,s!==null&&(c=s.next,c===s?o.pending=null:(c=c.next,s.next=c,mS(o,c)))}function sv(o,s,c){var h=o.pending;if(o.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=c,yS(s),s=s.next;while(s!==h)}o.action=null}function yS(o){o=o.listeners;for(var s=0;s<o.length;s++)(0,o[s])()}function _S(o,s){return s}function bS(o,s){if(St){var c=Yt.formState;if(c!==null){e:{var h=at;if(St){if(tn){t:{for(var v=tn,_=ho;v.nodeType!==8;){if(!_){v=null;break t}if(v=mo(v.nextSibling),v===null){v=null;break t}}_=v.data,v=_==="F!"||_==="F"?v:null}if(v){tn=mo(v.nextSibling),h=v.data==="F!";break e}}ts(h)}h=!1}h&&(s=c[0])}}return c=yr(),c.memoizedState=c.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_S,lastRenderedState:s},c.queue=h,c=US.bind(null,at,h),h.dispatch=c,h=av(!1),_=fv.bind(null,at,!1,h.queue),h=yr(),v={state:s,dispatch:null,action:o,pending:null},h.queue=v,c=gP.bind(null,at,v,_,c),v.dispatch=c,h.memoizedState=o,[s,c,!1]}function wS(o){var s=vn();return SS(s,qt,o)}function SS(o,s,c){if(s=rv(o,s,_S)[0],o=ff(Ra)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=Bc(s)}catch(k){throw k===cl?tf:k}else h=s;s=vn();var v=s.queue,_=v.dispatch;return c!==s.memoizedState&&(at.flags|=2048,pl(9,{destroy:void 0},vP.bind(null,v,c),null)),[h,_,o]}function vP(o,s){o.action=s}function ES(o){var s=vn(),c=qt;if(c!==null)return SS(s,c,o);vn(),s=s.memoizedState,c=vn();var h=c.queue.dispatch;return c.memoizedState=o,[s,h,!1]}function pl(o,s,c,h){return o={tag:o,create:c,deps:h,inst:s,next:null},s=at.updateQueue,s===null&&(s=uf(),at.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=o.next=o:(h=c.next,c.next=o,o.next=h,s.lastEffect=o),o}function RS(){return vn().memoizedState}function hf(o,s,c,h){var v=yr();at.flags|=o,v.memoizedState=pl(1|s,{destroy:void 0},c,h===void 0?null:h)}function pf(o,s,c,h){var v=vn();h=h===void 0?null:h;var _=v.memoizedState.inst;qt!==null&&h!==null&&Qg(h,qt.memoizedState.deps)?v.memoizedState=pl(s,_,c,h):(at.flags|=o,v.memoizedState=pl(1|s,_,c,h))}function xS(o,s){hf(8390656,8,o,s)}function iv(o,s){pf(2048,8,o,s)}function yP(o){at.flags|=4;var s=at.updateQueue;if(s===null)s=uf(),at.updateQueue=s,s.events=[o];else{var c=s.events;c===null?s.events=[o]:c.push(o)}}function TS(o){var s=vn().memoizedState;return yP({ref:s,nextImpl:o}),function(){if((Pt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function OS(o,s){return pf(4,2,o,s)}function CS(o,s){return pf(4,4,o,s)}function AS(o,s){if(typeof s=="function"){o=o();var c=s(o);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return o=o(),s.current=o,function(){s.current=null}}function IS(o,s,c){c=c!=null?c.concat([o]):null,pf(4,4,AS.bind(null,s,o),c)}function lv(){}function NS(o,s){var c=vn();s=s===void 0?null:s;var h=c.memoizedState;return s!==null&&Qg(s,h[1])?h[0]:(c.memoizedState=[o,s],o)}function kS(o,s){var c=vn();s=s===void 0?null:s;var h=c.memoizedState;if(s!==null&&Qg(s,h[1]))return h[0];if(h=o(),ui){jn(!0);try{o()}finally{jn(!1)}}return c.memoizedState=[h,s],h}function cv(o,s,c){return c===void 0||(Ea&1073741824)!==0&&(bt&261930)===0?o.memoizedState=s:(o.memoizedState=c,o=ME(),at.lanes|=o,us|=o,c)}function MS(o,s,c,h){return zr(c,s)?c:dl.current!==null?(o=cv(o,c,h),zr(o,s)||(On=!0),o):(Ea&42)===0||(Ea&1073741824)!==0&&(bt&261930)===0?(On=!0,o.memoizedState=c):(o=ME(),at.lanes|=o,us|=o,s)}function PS(o,s,c,h,v){var _=Y.p;Y.p=_!==0&&8>_?_:8;var k=B.T,j={};B.T=j,fv(o,!1,s,c);try{var Q=v(),fe=B.S;if(fe!==null&&fe(j,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var be=hP(Q,h);qc(o,s,be,Gr(o))}else qc(o,s,h,Gr(o))}catch(xe){qc(o,s,{then:function(){},status:"rejected",reason:xe},Gr())}finally{Y.p=_,k!==null&&j.types!==null&&(k.types=j.types),B.T=k}}function _P(){}function uv(o,s,c,h){if(o.tag!==5)throw Error(r(476));var v=DS(o).queue;PS(o,v,s,W,c===null?_P:function(){return LS(o),c(h)})}function DS(o){var s=o.memoizedState;if(s!==null)return s;s={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:W},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:c},next:null},o.memoizedState=s,o=o.alternate,o!==null&&(o.memoizedState=s),s}function LS(o){var s=DS(o);s.next===null&&(s=o.alternate.memoizedState),qc(o,s.next.queue,{},Gr())}function dv(){return Jn(iu)}function jS(){return vn().memoizedState}function $S(){return vn().memoizedState}function bP(o){for(var s=o.return;s!==null;){switch(s.tag){case 24:case 3:var c=Gr();o=os(c);var h=as(s,o,c);h!==null&&(kr(h,s,c),Uc(h,s,c)),s={cache:zg()},o.payload=s;return}s=s.return}}function wP(o,s,c){var h=Gr();c={lane:h,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},mf(o)?zS(s,c):(c=Ag(o,s,c,h),c!==null&&(kr(c,o,h),FS(c,s,h)))}function US(o,s,c){var h=Gr();qc(o,s,c,h)}function qc(o,s,c,h){var v={lane:h,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(mf(o))zS(s,v);else{var _=o.alternate;if(o.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var k=s.lastRenderedState,j=_(k,c);if(v.hasEagerState=!0,v.eagerState=j,zr(j,k))return Kd(o,s,v,0),Yt===null&&Zd(),!1}catch{}if(c=Ag(o,s,v,h),c!==null)return kr(c,o,h),FS(c,s,h),!0}return!1}function fv(o,s,c,h){if(h={lane:2,revertLane:qv(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},mf(o)){if(s)throw Error(r(479))}else s=Ag(o,c,h,2),s!==null&&kr(s,o,2)}function mf(o){var s=o.alternate;return o===at||s!==null&&s===at}function zS(o,s){fl=lf=!0;var c=o.pending;c===null?s.next=s:(s.next=c.next,c.next=s),o.pending=s}function FS(o,s,c){if((c&4194048)!==0){var h=s.lanes;h&=o.pendingLanes,c|=h,s.lanes=c,Wn(o,c)}}var Hc={readContext:Jn,use:df,useCallback:fn,useContext:fn,useEffect:fn,useImperativeHandle:fn,useLayoutEffect:fn,useInsertionEffect:fn,useMemo:fn,useReducer:fn,useRef:fn,useState:fn,useDebugValue:fn,useDeferredValue:fn,useTransition:fn,useSyncExternalStore:fn,useId:fn,useHostTransitionStatus:fn,useFormState:fn,useActionState:fn,useOptimistic:fn,useMemoCache:fn,useCacheRefresh:fn};Hc.useEffectEvent=fn;var VS={readContext:Jn,use:df,useCallback:function(o,s){return yr().memoizedState=[o,s===void 0?null:s],o},useContext:Jn,useEffect:xS,useImperativeHandle:function(o,s,c){c=c!=null?c.concat([o]):null,hf(4194308,4,AS.bind(null,s,o),c)},useLayoutEffect:function(o,s){return hf(4194308,4,o,s)},useInsertionEffect:function(o,s){hf(4,2,o,s)},useMemo:function(o,s){var c=yr();s=s===void 0?null:s;var h=o();if(ui){jn(!0);try{o()}finally{jn(!1)}}return c.memoizedState=[h,s],h},useReducer:function(o,s,c){var h=yr();if(c!==void 0){var v=c(s);if(ui){jn(!0);try{c(s)}finally{jn(!1)}}}else v=s;return h.memoizedState=h.baseState=v,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:v},h.queue=o,o=o.dispatch=wP.bind(null,at,o),[h.memoizedState,o]},useRef:function(o){var s=yr();return o={current:o},s.memoizedState=o},useState:function(o){o=av(o);var s=o.queue,c=US.bind(null,at,s);return s.dispatch=c,[o.memoizedState,c]},useDebugValue:lv,useDeferredValue:function(o,s){var c=yr();return cv(c,o,s)},useTransition:function(){var o=av(!1);return o=PS.bind(null,at,o.queue,!0,!1),yr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,s,c){var h=at,v=yr();if(St){if(c===void 0)throw Error(r(407));c=c()}else{if(c=s(),Yt===null)throw Error(r(349));(bt&127)!==0||cS(h,s,c)}v.memoizedState=c;var _={value:c,getSnapshot:s};return v.queue=_,xS(dS.bind(null,h,_,o),[o]),h.flags|=2048,pl(9,{destroy:void 0},uS.bind(null,h,_,c,s),null),c},useId:function(){var o=yr(),s=Yt.identifierPrefix;if(St){var c=Wo,h=Yo;c=(h&~(1<<32-Rn(h)-1)).toString(32)+c,s="_"+s+"R_"+c,c=cf++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=pP++,s="_"+s+"r_"+c.toString(32)+"_";return o.memoizedState=s},useHostTransitionStatus:dv,useFormState:bS,useActionState:bS,useOptimistic:function(o){var s=yr();s.memoizedState=s.baseState=o;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=fv.bind(null,at,!0,c),c.dispatch=s,[o,s]},useMemoCache:nv,useCacheRefresh:function(){return yr().memoizedState=bP.bind(null,at)},useEffectEvent:function(o){var s=yr(),c={impl:o};return s.memoizedState=c,function(){if((Pt&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}},hv={readContext:Jn,use:df,useCallback:NS,useContext:Jn,useEffect:iv,useImperativeHandle:IS,useInsertionEffect:OS,useLayoutEffect:CS,useMemo:kS,useReducer:ff,useRef:RS,useState:function(){return ff(Ra)},useDebugValue:lv,useDeferredValue:function(o,s){var c=vn();return MS(c,qt.memoizedState,o,s)},useTransition:function(){var o=ff(Ra)[0],s=vn().memoizedState;return[typeof o=="boolean"?o:Bc(o),s]},useSyncExternalStore:lS,useId:jS,useHostTransitionStatus:dv,useFormState:wS,useActionState:wS,useOptimistic:function(o,s){var c=vn();return pS(c,qt,o,s)},useMemoCache:nv,useCacheRefresh:$S};hv.useEffectEvent=TS;var BS={readContext:Jn,use:df,useCallback:NS,useContext:Jn,useEffect:iv,useImperativeHandle:IS,useInsertionEffect:OS,useLayoutEffect:CS,useMemo:kS,useReducer:ov,useRef:RS,useState:function(){return ov(Ra)},useDebugValue:lv,useDeferredValue:function(o,s){var c=vn();return qt===null?cv(c,o,s):MS(c,qt.memoizedState,o,s)},useTransition:function(){var o=ov(Ra)[0],s=vn().memoizedState;return[typeof o=="boolean"?o:Bc(o),s]},useSyncExternalStore:lS,useId:jS,useHostTransitionStatus:dv,useFormState:ES,useActionState:ES,useOptimistic:function(o,s){var c=vn();return qt!==null?pS(c,qt,o,s):(c.baseState=o,[o,c.queue.dispatch])},useMemoCache:nv,useCacheRefresh:$S};BS.useEffectEvent=TS;function pv(o,s,c,h){s=o.memoizedState,c=c(h,s),c=c==null?s:p({},s,c),o.memoizedState=c,o.lanes===0&&(o.updateQueue.baseState=c)}var mv={enqueueSetState:function(o,s,c){o=o._reactInternals;var h=Gr(),v=os(h);v.payload=s,c!=null&&(v.callback=c),s=as(o,v,h),s!==null&&(kr(s,o,h),Uc(s,o,h))},enqueueReplaceState:function(o,s,c){o=o._reactInternals;var h=Gr(),v=os(h);v.tag=1,v.payload=s,c!=null&&(v.callback=c),s=as(o,v,h),s!==null&&(kr(s,o,h),Uc(s,o,h))},enqueueForceUpdate:function(o,s){o=o._reactInternals;var c=Gr(),h=os(c);h.tag=2,s!=null&&(h.callback=s),s=as(o,h,c),s!==null&&(kr(s,o,c),Uc(s,o,c))}};function qS(o,s,c,h,v,_,k){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(h,_,k):s.prototype&&s.prototype.isPureReactComponent?!Nc(c,h)||!Nc(v,_):!0}function HS(o,s,c,h){o=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==o&&mv.enqueueReplaceState(s,s.state,null)}function di(o,s){var c=s;if("ref"in s){c={};for(var h in s)h!=="ref"&&(c[h]=s[h])}if(o=o.defaultProps){c===s&&(c=p({},c));for(var v in o)c[v]===void 0&&(c[v]=o[v])}return c}function GS(o){Gd(o)}function ZS(o){console.error(o)}function KS(o){Gd(o)}function gf(o,s){try{var c=o.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function YS(o,s,c){try{var h=o.onCaughtError;h(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function gv(o,s,c){return c=os(c),c.tag=3,c.payload={element:null},c.callback=function(){gf(o,s)},c}function WS(o){return o=os(o),o.tag=3,o}function QS(o,s,c,h){var v=c.type.getDerivedStateFromError;if(typeof v=="function"){var _=h.value;o.payload=function(){return v(_)},o.callback=function(){YS(s,c,h)}}var k=c.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(o.callback=function(){YS(s,c,h),typeof v!="function"&&(ds===null?ds=new Set([this]):ds.add(this));var j=h.stack;this.componentDidCatch(h.value,{componentStack:j!==null?j:""})})}function SP(o,s,c,h,v){if(c.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=c.alternate,s!==null&&sl(s,c,v,!0),c=Vr.current,c!==null){switch(c.tag){case 31:case 13:return po===null?Cf():c.alternate===null&&hn===0&&(hn=3),c.flags&=-257,c.flags|=65536,c.lanes=v,h===nf?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([h]):s.add(h),Fv(o,h,v)),!1;case 22:return c.flags|=65536,h===nf?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([h]):c.add(h)),Fv(o,h,v)),!1}throw Error(r(435,c.tag))}return Fv(o,h,v),Cf(),!1}if(St)return s=Vr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,h!==Dg&&(o=Error(r(422),{cause:h}),Pc(co(o,c)))):(h!==Dg&&(s=Error(r(423),{cause:h}),Pc(co(s,c))),o=o.current.alternate,o.flags|=65536,v&=-v,o.lanes|=v,h=co(h,c),v=gv(o.stateNode,h,v),Gg(o,v),hn!==4&&(hn=2)),!1;var _=Error(r(520),{cause:h});if(_=co(_,c),Jc===null?Jc=[_]:Jc.push(_),hn!==4&&(hn=2),s===null)return!0;h=co(h,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,o=v&-v,c.lanes|=o,o=gv(c.stateNode,h,o),Gg(c,o),!1;case 1:if(s=c.type,_=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(ds===null||!ds.has(_))))return c.flags|=65536,v&=-v,c.lanes|=v,v=WS(v),QS(v,o,c,h),Gg(c,v),!1}c=c.return}while(c!==null);return!1}var vv=Error(r(461)),On=!1;function er(o,s,c,h){s.child=o===null?tS(s,null,c,h):ci(s,o.child,c,h)}function XS(o,s,c,h,v){c=c.render;var _=s.ref;if("ref"in h){var k={};for(var j in h)j!=="ref"&&(k[j]=h[j])}else k=h;return ai(s),h=Xg(o,s,c,k,_,v),j=Jg(),o!==null&&!On?(ev(o,s,v),xa(o,s,v)):(St&&j&&Mg(s),s.flags|=1,er(o,s,h,v),s.child)}function JS(o,s,c,h,v){if(o===null){var _=c.type;return typeof _=="function"&&!Ig(_)&&_.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=_,eE(o,s,_,h,v)):(o=Wd(c.type,null,h,s,s.mode,v),o.ref=s.ref,o.return=s,s.child=o)}if(_=o.child,!xv(o,v)){var k=_.memoizedProps;if(c=c.compare,c=c!==null?c:Nc,c(k,h)&&o.ref===s.ref)return xa(o,s,v)}return s.flags|=1,o=_a(_,h),o.ref=s.ref,o.return=s,s.child=o}function eE(o,s,c,h,v){if(o!==null){var _=o.memoizedProps;if(Nc(_,h)&&o.ref===s.ref)if(On=!1,s.pendingProps=h=_,xv(o,v))(o.flags&131072)!==0&&(On=!0);else return s.lanes=o.lanes,xa(o,s,v)}return yv(o,s,c,h,v)}function tE(o,s,c,h){var v=h.children,_=o!==null?o.memoizedState:null;if(o===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((s.flags&128)!==0){if(_=_!==null?_.baseLanes|c:c,o!==null){for(h=s.child=o.child,v=0;h!==null;)v=v|h.lanes|h.childLanes,h=h.sibling;h=v&~_}else h=0,s.child=null;return nE(o,s,_,c,h)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},o!==null&&ef(s,_!==null?_.cachePool:null),_!==null?oS(s,_):Kg(),aS(s);else return h=s.lanes=536870912,nE(o,s,_!==null?_.baseLanes|c:c,c,h)}else _!==null?(ef(s,_.cachePool),oS(s,_),is(),s.memoizedState=null):(o!==null&&ef(s,null),Kg(),is());return er(o,s,v,c),s.child}function Gc(o,s){return o!==null&&o.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function nE(o,s,c,h,v){var _=Vg();return _=_===null?null:{parent:xn._currentValue,pool:_},s.memoizedState={baseLanes:c,cachePool:_},o!==null&&ef(s,null),Kg(),aS(s),o!==null&&sl(o,s,h,!0),s.childLanes=v,null}function vf(o,s){return s=_f({mode:s.mode,children:s.children},o.mode),s.ref=o.ref,o.child=s,s.return=o,s}function rE(o,s,c){return ci(s,o.child,null,c),o=vf(s,s.pendingProps),o.flags|=2,Br(s),s.memoizedState=null,o}function EP(o,s,c){var h=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,o===null){if(St){if(h.mode==="hidden")return o=vf(s,h),s.lanes=536870912,Gc(null,o);if(Wg(s),(o=tn)?(o=mR(o,ho),o=o!==null&&o.data==="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:Ja!==null?{id:Yo,overflow:Wo}:null,retryLane:536870912,hydrationErrors:null},c=zw(o),c.return=s,s.child=c,Xn=s,tn=null)):o=null,o===null)throw ts(s);return s.lanes=536870912,null}return vf(s,h)}var _=o.memoizedState;if(_!==null){var k=_.dehydrated;if(Wg(s),v)if(s.flags&256)s.flags&=-257,s=rE(o,s,c);else if(s.memoizedState!==null)s.child=o.child,s.flags|=128,s=null;else throw Error(r(558));else if(On||sl(o,s,c,!1),v=(c&o.childLanes)!==0,On||v){if(h=Yt,h!==null&&(k=xr(h,c),k!==0&&k!==_.retryLane))throw _.retryLane=k,ti(o,k),kr(h,o,k),vv;Cf(),s=rE(o,s,c)}else o=_.treeContext,tn=mo(k.nextSibling),Xn=s,St=!0,es=null,ho=!1,o!==null&&Bw(s,o),s=vf(s,h),s.flags|=4096;return s}return o=_a(o.child,{mode:h.mode,children:h.children}),o.ref=s.ref,s.child=o,o.return=s,o}function yf(o,s){var c=s.ref;if(c===null)o!==null&&o.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(r(284));(o===null||o.ref!==c)&&(s.flags|=4194816)}}function yv(o,s,c,h,v){return ai(s),c=Xg(o,s,c,h,void 0,v),h=Jg(),o!==null&&!On?(ev(o,s,v),xa(o,s,v)):(St&&h&&Mg(s),s.flags|=1,er(o,s,c,v),s.child)}function oE(o,s,c,h,v,_){return ai(s),s.updateQueue=null,c=iS(s,h,c,v),sS(o),h=Jg(),o!==null&&!On?(ev(o,s,_),xa(o,s,_)):(St&&h&&Mg(s),s.flags|=1,er(o,s,c,_),s.child)}function aE(o,s,c,h,v){if(ai(s),s.stateNode===null){var _=nl,k=c.contextType;typeof k=="object"&&k!==null&&(_=Jn(k)),_=new c(h,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=mv,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=h,_.state=s.memoizedState,_.refs={},qg(s),k=c.contextType,_.context=typeof k=="object"&&k!==null?Jn(k):nl,_.state=s.memoizedState,k=c.getDerivedStateFromProps,typeof k=="function"&&(pv(s,c,k,h),_.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(k=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),k!==_.state&&mv.enqueueReplaceState(_,_.state,null),Fc(s,h,_,v),zc(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(o===null){_=s.stateNode;var j=s.memoizedProps,Q=di(c,j);_.props=Q;var fe=_.context,be=c.contextType;k=nl,typeof be=="object"&&be!==null&&(k=Jn(be));var xe=c.getDerivedStateFromProps;be=typeof xe=="function"||typeof _.getSnapshotBeforeUpdate=="function",j=s.pendingProps!==j,be||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(j||fe!==k)&&HS(s,_,h,k),rs=!1;var me=s.memoizedState;_.state=me,Fc(s,h,_,v),zc(),fe=s.memoizedState,j||me!==fe||rs?(typeof xe=="function"&&(pv(s,c,xe,h),fe=s.memoizedState),(Q=rs||qS(s,c,Q,h,me,fe,k))?(be||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=fe),_.props=h,_.state=fe,_.context=k,h=Q):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{_=s.stateNode,Hg(o,s),k=s.memoizedProps,be=di(c,k),_.props=be,xe=s.pendingProps,me=_.context,fe=c.contextType,Q=nl,typeof fe=="object"&&fe!==null&&(Q=Jn(fe)),j=c.getDerivedStateFromProps,(fe=typeof j=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(k!==xe||me!==Q)&&HS(s,_,h,Q),rs=!1,me=s.memoizedState,_.state=me,Fc(s,h,_,v),zc();var ge=s.memoizedState;k!==xe||me!==ge||rs||o!==null&&o.dependencies!==null&&Xd(o.dependencies)?(typeof j=="function"&&(pv(s,c,j,h),ge=s.memoizedState),(be=rs||qS(s,c,be,h,me,ge,Q)||o!==null&&o.dependencies!==null&&Xd(o.dependencies))?(fe||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(h,ge,Q),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(h,ge,Q)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ge),_.props=h,_.state=ge,_.context=Q,h=be):(typeof _.componentDidUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||k===o.memoizedProps&&me===o.memoizedState||(s.flags|=1024),h=!1)}return _=h,yf(o,s),h=(s.flags&128)!==0,_||h?(_=s.stateNode,c=h&&typeof c.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,o!==null&&h?(s.child=ci(s,o.child,null,v),s.child=ci(s,null,c,v)):er(o,s,c,v),s.memoizedState=_.state,o=s.child):o=xa(o,s,v),o}function sE(o,s,c,h){return ri(),s.flags|=256,er(o,s,c,h),s.child}var _v={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bv(o){return{baseLanes:o,cachePool:Yw()}}function wv(o,s,c){return o=o!==null?o.childLanes&~c:0,s&&(o|=Hr),o}function iE(o,s,c){var h=s.pendingProps,v=!1,_=(s.flags&128)!==0,k;if((k=_)||(k=o!==null&&o.memoizedState===null?!1:(gn.current&2)!==0),k&&(v=!0,s.flags&=-129),k=(s.flags&32)!==0,s.flags&=-33,o===null){if(St){if(v?ss(s):is(),(o=tn)?(o=mR(o,ho),o=o!==null&&o.data!=="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:Ja!==null?{id:Yo,overflow:Wo}:null,retryLane:536870912,hydrationErrors:null},c=zw(o),c.return=s,s.child=c,Xn=s,tn=null)):o=null,o===null)throw ts(s);return ry(o)?s.lanes=32:s.lanes=536870912,null}var j=h.children;return h=h.fallback,v?(is(),v=s.mode,j=_f({mode:"hidden",children:j},v),h=ni(h,v,c,null),j.return=s,h.return=s,j.sibling=h,s.child=j,h=s.child,h.memoizedState=bv(c),h.childLanes=wv(o,k,c),s.memoizedState=_v,Gc(null,h)):(ss(s),Sv(s,j))}var Q=o.memoizedState;if(Q!==null&&(j=Q.dehydrated,j!==null)){if(_)s.flags&256?(ss(s),s.flags&=-257,s=Ev(o,s,c)):s.memoizedState!==null?(is(),s.child=o.child,s.flags|=128,s=null):(is(),j=h.fallback,v=s.mode,h=_f({mode:"visible",children:h.children},v),j=ni(j,v,c,null),j.flags|=2,h.return=s,j.return=s,h.sibling=j,s.child=h,ci(s,o.child,null,c),h=s.child,h.memoizedState=bv(c),h.childLanes=wv(o,k,c),s.memoizedState=_v,s=Gc(null,h));else if(ss(s),ry(j)){if(k=j.nextSibling&&j.nextSibling.dataset,k)var fe=k.dgst;k=fe,h=Error(r(419)),h.stack="",h.digest=k,Pc({value:h,source:null,stack:null}),s=Ev(o,s,c)}else if(On||sl(o,s,c,!1),k=(c&o.childLanes)!==0,On||k){if(k=Yt,k!==null&&(h=xr(k,c),h!==0&&h!==Q.retryLane))throw Q.retryLane=h,ti(o,h),kr(k,o,h),vv;ny(j)||Cf(),s=Ev(o,s,c)}else ny(j)?(s.flags|=192,s.child=o.child,s=null):(o=Q.treeContext,tn=mo(j.nextSibling),Xn=s,St=!0,es=null,ho=!1,o!==null&&Bw(s,o),s=Sv(s,h.children),s.flags|=4096);return s}return v?(is(),j=h.fallback,v=s.mode,Q=o.child,fe=Q.sibling,h=_a(Q,{mode:"hidden",children:h.children}),h.subtreeFlags=Q.subtreeFlags&65011712,fe!==null?j=_a(fe,j):(j=ni(j,v,c,null),j.flags|=2),j.return=s,h.return=s,h.sibling=j,s.child=h,Gc(null,h),h=s.child,j=o.child.memoizedState,j===null?j=bv(c):(v=j.cachePool,v!==null?(Q=xn._currentValue,v=v.parent!==Q?{parent:Q,pool:Q}:v):v=Yw(),j={baseLanes:j.baseLanes|c,cachePool:v}),h.memoizedState=j,h.childLanes=wv(o,k,c),s.memoizedState=_v,Gc(o.child,h)):(ss(s),c=o.child,o=c.sibling,c=_a(c,{mode:"visible",children:h.children}),c.return=s,c.sibling=null,o!==null&&(k=s.deletions,k===null?(s.deletions=[o],s.flags|=16):k.push(o)),s.child=c,s.memoizedState=null,c)}function Sv(o,s){return s=_f({mode:"visible",children:s},o.mode),s.return=o,o.child=s}function _f(o,s){return o=Fr(22,o,null,s),o.lanes=0,o}function Ev(o,s,c){return ci(s,o.child,null,c),o=Sv(s,s.pendingProps.children),o.flags|=2,s.memoizedState=null,o}function lE(o,s,c){o.lanes|=s;var h=o.alternate;h!==null&&(h.lanes|=s),$g(o.return,s,c)}function Rv(o,s,c,h,v,_){var k=o.memoizedState;k===null?o.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:v,treeForkCount:_}:(k.isBackwards=s,k.rendering=null,k.renderingStartTime=0,k.last=h,k.tail=c,k.tailMode=v,k.treeForkCount=_)}function cE(o,s,c){var h=s.pendingProps,v=h.revealOrder,_=h.tail;h=h.children;var k=gn.current,j=(k&2)!==0;if(j?(k=k&1|2,s.flags|=128):k&=1,V(gn,k),er(o,s,h,c),h=St?Mc:0,!j&&o!==null&&(o.flags&128)!==0)e:for(o=s.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&lE(o,c,s);else if(o.tag===19)lE(o,c,s);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break e;for(;o.sibling===null;){if(o.return===null||o.return===s)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(v){case"forwards":for(c=s.child,v=null;c!==null;)o=c.alternate,o!==null&&sf(o)===null&&(v=c),c=c.sibling;c=v,c===null?(v=s.child,s.child=null):(v=c.sibling,c.sibling=null),Rv(s,!1,v,c,_,h);break;case"backwards":case"unstable_legacy-backwards":for(c=null,v=s.child,s.child=null;v!==null;){if(o=v.alternate,o!==null&&sf(o)===null){s.child=v;break}o=v.sibling,v.sibling=c,c=v,v=o}Rv(s,!0,c,null,_,h);break;case"together":Rv(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function xa(o,s,c){if(o!==null&&(s.dependencies=o.dependencies),us|=s.lanes,(c&s.childLanes)===0)if(o!==null){if(sl(o,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(o!==null&&s.child!==o.child)throw Error(r(153));if(s.child!==null){for(o=s.child,c=_a(o,o.pendingProps),s.child=c,c.return=s;o.sibling!==null;)o=o.sibling,c=c.sibling=_a(o,o.pendingProps),c.return=s;c.sibling=null}return s.child}function xv(o,s){return(o.lanes&s)!==0?!0:(o=o.dependencies,!!(o!==null&&Xd(o)))}function RP(o,s,c){switch(s.tag){case 3:ve(s,s.stateNode.containerInfo),ns(s,xn,o.memoizedState.cache),ri();break;case 27:case 5:Ae(s);break;case 4:ve(s,s.stateNode.containerInfo);break;case 10:ns(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Wg(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(ss(s),s.flags|=128,null):(c&s.child.childLanes)!==0?iE(o,s,c):(ss(s),o=xa(o,s,c),o!==null?o.sibling:null);ss(s);break;case 19:var v=(o.flags&128)!==0;if(h=(c&s.childLanes)!==0,h||(sl(o,s,c,!1),h=(c&s.childLanes)!==0),v){if(h)return cE(o,s,c);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),V(gn,gn.current),h)break;return null;case 22:return s.lanes=0,tE(o,s,c,s.pendingProps);case 24:ns(s,xn,o.memoizedState.cache)}return xa(o,s,c)}function uE(o,s,c){if(o!==null)if(o.memoizedProps!==s.pendingProps)On=!0;else{if(!xv(o,c)&&(s.flags&128)===0)return On=!1,RP(o,s,c);On=(o.flags&131072)!==0}else On=!1,St&&(s.flags&1048576)!==0&&Vw(s,Mc,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(o=ii(s.elementType),s.type=o,typeof o=="function")Ig(o)?(h=di(o,h),s.tag=1,s=aE(null,s,o,h,c)):(s.tag=0,s=yv(null,s,o,h,c));else{if(o!=null){var v=o.$$typeof;if(v===O){s.tag=11,s=XS(null,s,o,h,c);break e}else if(v===N){s.tag=14,s=JS(null,s,o,h,c);break e}}throw s=J(o)||o,Error(r(306,s,""))}}return s;case 0:return yv(o,s,s.type,s.pendingProps,c);case 1:return h=s.type,v=di(h,s.pendingProps),aE(o,s,h,v,c);case 3:e:{if(ve(s,s.stateNode.containerInfo),o===null)throw Error(r(387));h=s.pendingProps;var _=s.memoizedState;v=_.element,Hg(o,s),Fc(s,h,null,c);var k=s.memoizedState;if(h=k.cache,ns(s,xn,h),h!==_.cache&&Ug(s,[xn],c,!0),zc(),h=k.element,_.isDehydrated)if(_={element:h,isDehydrated:!1,cache:k.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=sE(o,s,h,c);break e}else if(h!==v){v=co(Error(r(424)),s),Pc(v),s=sE(o,s,h,c);break e}else for(o=s.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,tn=mo(o.firstChild),Xn=s,St=!0,es=null,ho=!0,c=tS(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(ri(),h===v){s=xa(o,s,c);break e}er(o,s,h,c)}s=s.child}return s;case 26:return yf(o,s),o===null?(c=wR(s.type,null,s.pendingProps,null))?s.memoizedState=c:St||(c=s.type,o=s.pendingProps,h=Df(X.current).createElement(c),h[Qn]=s,h[Tr]=o,tr(h,c,o),qn(h),s.stateNode=h):s.memoizedState=wR(s.type,o.memoizedProps,s.pendingProps,o.memoizedState),null;case 27:return Ae(s),o===null&&St&&(h=s.stateNode=yR(s.type,s.pendingProps,X.current),Xn=s,ho=!0,v=tn,ms(s.type)?(oy=v,tn=mo(h.firstChild)):tn=v),er(o,s,s.pendingProps.children,c),yf(o,s),o===null&&(s.flags|=4194304),s.child;case 5:return o===null&&St&&((v=h=tn)&&(h=eD(h,s.type,s.pendingProps,ho),h!==null?(s.stateNode=h,Xn=s,tn=mo(h.firstChild),ho=!1,v=!0):v=!1),v||ts(s)),Ae(s),v=s.type,_=s.pendingProps,k=o!==null?o.memoizedProps:null,h=_.children,Jv(v,_)?h=null:k!==null&&Jv(v,k)&&(s.flags|=32),s.memoizedState!==null&&(v=Xg(o,s,mP,null,null,c),iu._currentValue=v),yf(o,s),er(o,s,h,c),s.child;case 6:return o===null&&St&&((o=c=tn)&&(c=tD(c,s.pendingProps,ho),c!==null?(s.stateNode=c,Xn=s,tn=null,o=!0):o=!1),o||ts(s)),null;case 13:return iE(o,s,c);case 4:return ve(s,s.stateNode.containerInfo),h=s.pendingProps,o===null?s.child=ci(s,null,h,c):er(o,s,h,c),s.child;case 11:return XS(o,s,s.type,s.pendingProps,c);case 7:return er(o,s,s.pendingProps,c),s.child;case 8:return er(o,s,s.pendingProps.children,c),s.child;case 12:return er(o,s,s.pendingProps.children,c),s.child;case 10:return h=s.pendingProps,ns(s,s.type,h.value),er(o,s,h.children,c),s.child;case 9:return v=s.type._context,h=s.pendingProps.children,ai(s),v=Jn(v),h=h(v),s.flags|=1,er(o,s,h,c),s.child;case 14:return JS(o,s,s.type,s.pendingProps,c);case 15:return eE(o,s,s.type,s.pendingProps,c);case 19:return cE(o,s,c);case 31:return EP(o,s,c);case 22:return tE(o,s,c,s.pendingProps);case 24:return ai(s),h=Jn(xn),o===null?(v=Vg(),v===null&&(v=Yt,_=zg(),v.pooledCache=_,_.refCount++,_!==null&&(v.pooledCacheLanes|=c),v=_),s.memoizedState={parent:h,cache:v},qg(s),ns(s,xn,v)):((o.lanes&c)!==0&&(Hg(o,s),Fc(s,null,null,c),zc()),v=o.memoizedState,_=s.memoizedState,v.parent!==h?(v={parent:h,cache:h},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),ns(s,xn,h)):(h=_.cache,ns(s,xn,h),h!==v.cache&&Ug(s,[xn],c,!0))),er(o,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Ta(o){o.flags|=4}function Tv(o,s,c,h,v){if((s=(o.mode&32)!==0)&&(s=!1),s){if(o.flags|=16777216,(v&335544128)===v)if(o.stateNode.complete)o.flags|=8192;else if(jE())o.flags|=8192;else throw li=nf,Bg}else o.flags&=-16777217}function dE(o,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!TR(s))if(jE())o.flags|=8192;else throw li=nf,Bg}function bf(o,s){s!==null&&(o.flags|=4),o.flags&16384&&(s=o.tag!==22?Bt():536870912,o.lanes|=s,yl|=s)}function Zc(o,s){if(!St)switch(o.tailMode){case"hidden":s=o.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?o.tail=null:c.sibling=null;break;case"collapsed":c=o.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||o.tail===null?o.tail=null:o.tail.sibling=null:h.sibling=null}}function nn(o){var s=o.alternate!==null&&o.alternate.child===o.child,c=0,h=0;if(s)for(var v=o.child;v!==null;)c|=v.lanes|v.childLanes,h|=v.subtreeFlags&65011712,h|=v.flags&65011712,v.return=o,v=v.sibling;else for(v=o.child;v!==null;)c|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=o,v=v.sibling;return o.subtreeFlags|=h,o.childLanes=c,s}function xP(o,s,c){var h=s.pendingProps;switch(Pg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nn(s),null;case 1:return nn(s),null;case 3:return c=s.stateNode,h=null,o!==null&&(h=o.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),Sa(xn),Ie(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(o===null||o.child===null)&&(al(s)?Ta(s):o===null||o.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Lg())),nn(s),null;case 26:var v=s.type,_=s.memoizedState;return o===null?(Ta(s),_!==null?(nn(s),dE(s,_)):(nn(s),Tv(s,v,null,h,c))):_?_!==o.memoizedState?(Ta(s),nn(s),dE(s,_)):(nn(s),s.flags&=-16777217):(o=o.memoizedProps,o!==h&&Ta(s),nn(s),Tv(s,v,o,h,c)),null;case 27:if(H(s),c=X.current,v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&Ta(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return nn(s),null}o=D.current,al(s)?qw(s):(o=yR(v,h,c),s.stateNode=o,Ta(s))}return nn(s),null;case 5:if(H(s),v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&Ta(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return nn(s),null}if(_=D.current,al(s))qw(s);else{var k=Df(X.current);switch(_){case 1:_=k.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:_=k.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":_=k.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":_=k.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":_=k.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof h.is=="string"?k.createElement("select",{is:h.is}):k.createElement("select"),h.multiple?_.multiple=!0:h.size&&(_.size=h.size);break;default:_=typeof h.is=="string"?k.createElement(v,{is:h.is}):k.createElement(v)}}_[Qn]=s,_[Tr]=h;e:for(k=s.child;k!==null;){if(k.tag===5||k.tag===6)_.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===s)break e;for(;k.sibling===null;){if(k.return===null||k.return===s)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}s.stateNode=_;e:switch(tr(_,v,h),v){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&Ta(s)}}return nn(s),Tv(s,s.type,o===null?null:o.memoizedProps,s.pendingProps,c),null;case 6:if(o&&s.stateNode!=null)o.memoizedProps!==h&&Ta(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(o=X.current,al(s)){if(o=s.stateNode,c=s.memoizedProps,h=null,v=Xn,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}o[Qn]=s,o=!!(o.nodeValue===c||h!==null&&h.suppressHydrationWarning===!0||iR(o.nodeValue,c)),o||ts(s,!0)}else o=Df(o).createTextNode(h),o[Qn]=s,s.stateNode=o}return nn(s),null;case 31:if(c=s.memoizedState,o===null||o.memoizedState!==null){if(h=al(s),c!==null){if(o===null){if(!h)throw Error(r(318));if(o=s.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[Qn]=s}else ri(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;nn(s),o=!1}else c=Lg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=c),o=!0;if(!o)return s.flags&256?(Br(s),s):(Br(s),null);if((s.flags&128)!==0)throw Error(r(558))}return nn(s),null;case 13:if(h=s.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(v=al(s),h!==null&&h.dehydrated!==null){if(o===null){if(!v)throw Error(r(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[Qn]=s}else ri(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;nn(s),v=!1}else v=Lg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(Br(s),s):(Br(s),null)}return Br(s),(s.flags&128)!==0?(s.lanes=c,s):(c=h!==null,o=o!==null&&o.memoizedState!==null,c&&(h=s.child,v=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(v=h.alternate.memoizedState.cachePool.pool),_=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(_=h.memoizedState.cachePool.pool),_!==v&&(h.flags|=2048)),c!==o&&c&&(s.child.flags|=8192),bf(s,s.updateQueue),nn(s),null);case 4:return Ie(),o===null&&Kv(s.stateNode.containerInfo),nn(s),null;case 10:return Sa(s.type),nn(s),null;case 19:if(q(gn),h=s.memoizedState,h===null)return nn(s),null;if(v=(s.flags&128)!==0,_=h.rendering,_===null)if(v)Zc(h,!1);else{if(hn!==0||o!==null&&(o.flags&128)!==0)for(o=s.child;o!==null;){if(_=sf(o),_!==null){for(s.flags|=128,Zc(h,!1),o=_.updateQueue,s.updateQueue=o,bf(s,o),s.subtreeFlags=0,o=c,c=s.child;c!==null;)Uw(c,o),c=c.sibling;return V(gn,gn.current&1|2),St&&ba(s,h.treeForkCount),s.child}o=o.sibling}h.tail!==null&&we()>xf&&(s.flags|=128,v=!0,Zc(h,!1),s.lanes=4194304)}else{if(!v)if(o=sf(_),o!==null){if(s.flags|=128,v=!0,o=o.updateQueue,s.updateQueue=o,bf(s,o),Zc(h,!0),h.tail===null&&h.tailMode==="hidden"&&!_.alternate&&!St)return nn(s),null}else 2*we()-h.renderingStartTime>xf&&c!==536870912&&(s.flags|=128,v=!0,Zc(h,!1),s.lanes=4194304);h.isBackwards?(_.sibling=s.child,s.child=_):(o=h.last,o!==null?o.sibling=_:s.child=_,h.last=_)}return h.tail!==null?(o=h.tail,h.rendering=o,h.tail=o.sibling,h.renderingStartTime=we(),o.sibling=null,c=gn.current,V(gn,v?c&1|2:c&1),St&&ba(s,h.treeForkCount),o):(nn(s),null);case 22:case 23:return Br(s),Yg(),h=s.memoizedState!==null,o!==null?o.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(c&536870912)!==0&&(s.flags&128)===0&&(nn(s),s.subtreeFlags&6&&(s.flags|=8192)):nn(s),c=s.updateQueue,c!==null&&bf(s,c.retryQueue),c=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==c&&(s.flags|=2048),o!==null&&q(si),null;case 24:return c=null,o!==null&&(c=o.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),Sa(xn),nn(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function TP(o,s){switch(Pg(s),s.tag){case 1:return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 3:return Sa(xn),Ie(),o=s.flags,(o&65536)!==0&&(o&128)===0?(s.flags=o&-65537|128,s):null;case 26:case 27:case 5:return H(s),null;case 31:if(s.memoizedState!==null){if(Br(s),s.alternate===null)throw Error(r(340));ri()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 13:if(Br(s),o=s.memoizedState,o!==null&&o.dehydrated!==null){if(s.alternate===null)throw Error(r(340));ri()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 19:return q(gn),null;case 4:return Ie(),null;case 10:return Sa(s.type),null;case 22:case 23:return Br(s),Yg(),o!==null&&q(si),o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 24:return Sa(xn),null;case 25:return null;default:return null}}function fE(o,s){switch(Pg(s),s.tag){case 3:Sa(xn),Ie();break;case 26:case 27:case 5:H(s);break;case 4:Ie();break;case 31:s.memoizedState!==null&&Br(s);break;case 13:Br(s);break;case 19:q(gn);break;case 10:Sa(s.type);break;case 22:case 23:Br(s),Yg(),o!==null&&q(si);break;case 24:Sa(xn)}}function Kc(o,s){try{var c=s.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var v=h.next;c=v;do{if((c.tag&o)===o){h=void 0;var _=c.create,k=c.inst;h=_(),k.destroy=h}c=c.next}while(c!==v)}}catch(j){$t(s,s.return,j)}}function ls(o,s,c){try{var h=s.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var _=v.next;h=_;do{if((h.tag&o)===o){var k=h.inst,j=k.destroy;if(j!==void 0){k.destroy=void 0,v=s;var Q=c,fe=j;try{fe()}catch(be){$t(v,Q,be)}}}h=h.next}while(h!==_)}}catch(be){$t(s,s.return,be)}}function hE(o){var s=o.updateQueue;if(s!==null){var c=o.stateNode;try{rS(s,c)}catch(h){$t(o,o.return,h)}}}function pE(o,s,c){c.props=di(o.type,o.memoizedProps),c.state=o.memoizedState;try{c.componentWillUnmount()}catch(h){$t(o,s,h)}}function Yc(o,s){try{var c=o.ref;if(c!==null){switch(o.tag){case 26:case 27:case 5:var h=o.stateNode;break;case 30:h=o.stateNode;break;default:h=o.stateNode}typeof c=="function"?o.refCleanup=c(h):c.current=h}}catch(v){$t(o,s,v)}}function Qo(o,s){var c=o.ref,h=o.refCleanup;if(c!==null)if(typeof h=="function")try{h()}catch(v){$t(o,s,v)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(v){$t(o,s,v)}else c.current=null}function mE(o){var s=o.type,c=o.memoizedProps,h=o.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&h.focus();break e;case"img":c.src?h.src=c.src:c.srcSet&&(h.srcset=c.srcSet)}}catch(v){$t(o,o.return,v)}}function Ov(o,s,c){try{var h=o.stateNode;KP(h,o.type,c,s),h[Tr]=s}catch(v){$t(o,o.return,v)}}function gE(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&ms(o.type)||o.tag===4}function Cv(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||gE(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&ms(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Av(o,s,c){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(o,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(o),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=va));else if(h!==4&&(h===27&&ms(o.type)&&(c=o.stateNode,s=null),o=o.child,o!==null))for(Av(o,s,c),o=o.sibling;o!==null;)Av(o,s,c),o=o.sibling}function wf(o,s,c){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?c.insertBefore(o,s):c.appendChild(o);else if(h!==4&&(h===27&&ms(o.type)&&(c=o.stateNode),o=o.child,o!==null))for(wf(o,s,c),o=o.sibling;o!==null;)wf(o,s,c),o=o.sibling}function vE(o){var s=o.stateNode,c=o.memoizedProps;try{for(var h=o.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);tr(s,h,c),s[Qn]=o,s[Tr]=c}catch(_){$t(o,o.return,_)}}var Oa=!1,Cn=!1,Iv=!1,yE=typeof WeakSet=="function"?WeakSet:Set,Hn=null;function OP(o,s){if(o=o.containerInfo,Qv=Vf,o=Iw(o),Eg(o)){if("selectionStart"in o)var c={start:o.selectionStart,end:o.selectionEnd};else e:{c=(c=o.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var v=h.anchorOffset,_=h.focusNode;h=h.focusOffset;try{c.nodeType,_.nodeType}catch{c=null;break e}var k=0,j=-1,Q=-1,fe=0,be=0,xe=o,me=null;t:for(;;){for(var ge;xe!==c||v!==0&&xe.nodeType!==3||(j=k+v),xe!==_||h!==0&&xe.nodeType!==3||(Q=k+h),xe.nodeType===3&&(k+=xe.nodeValue.length),(ge=xe.firstChild)!==null;)me=xe,xe=ge;for(;;){if(xe===o)break t;if(me===c&&++fe===v&&(j=k),me===_&&++be===h&&(Q=k),(ge=xe.nextSibling)!==null)break;xe=me,me=xe.parentNode}xe=ge}c=j===-1||Q===-1?null:{start:j,end:Q}}else c=null}c=c||{start:0,end:0}}else c=null;for(Xv={focusedElem:o,selectionRange:c},Vf=!1,Hn=s;Hn!==null;)if(s=Hn,o=s.child,(s.subtreeFlags&1028)!==0&&o!==null)o.return=s,Hn=o;else for(;Hn!==null;){switch(s=Hn,_=s.alternate,o=s.flags,s.tag){case 0:if((o&4)!==0&&(o=s.updateQueue,o=o!==null?o.events:null,o!==null))for(c=0;c<o.length;c++)v=o[c],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&_!==null){o=void 0,c=s,v=_.memoizedProps,_=_.memoizedState,h=c.stateNode;try{var $e=di(c.type,v);o=h.getSnapshotBeforeUpdate($e,_),h.__reactInternalSnapshotBeforeUpdate=o}catch(We){$t(c,c.return,We)}}break;case 3:if((o&1024)!==0){if(o=s.stateNode.containerInfo,c=o.nodeType,c===9)ty(o);else if(c===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":ty(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=s.sibling,o!==null){o.return=s.return,Hn=o;break}Hn=s.return}}function _E(o,s,c){var h=c.flags;switch(c.tag){case 0:case 11:case 15:Aa(o,c),h&4&&Kc(5,c);break;case 1:if(Aa(o,c),h&4)if(o=c.stateNode,s===null)try{o.componentDidMount()}catch(k){$t(c,c.return,k)}else{var v=di(c.type,s.memoizedProps);s=s.memoizedState;try{o.componentDidUpdate(v,s,o.__reactInternalSnapshotBeforeUpdate)}catch(k){$t(c,c.return,k)}}h&64&&hE(c),h&512&&Yc(c,c.return);break;case 3:if(Aa(o,c),h&64&&(o=c.updateQueue,o!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{rS(o,s)}catch(k){$t(c,c.return,k)}}break;case 27:s===null&&h&4&&vE(c);case 26:case 5:Aa(o,c),s===null&&h&4&&mE(c),h&512&&Yc(c,c.return);break;case 12:Aa(o,c);break;case 31:Aa(o,c),h&4&&SE(o,c);break;case 13:Aa(o,c),h&4&&EE(o,c),h&64&&(o=c.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(c=LP.bind(null,c),nD(o,c))));break;case 22:if(h=c.memoizedState!==null||Oa,!h){s=s!==null&&s.memoizedState!==null||Cn,v=Oa;var _=Cn;Oa=h,(Cn=s)&&!_?Ia(o,c,(c.subtreeFlags&8772)!==0):Aa(o,c),Oa=v,Cn=_}break;case 30:break;default:Aa(o,c)}}function bE(o){var s=o.alternate;s!==null&&(o.alternate=null,bE(s)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(s=o.stateNode,s!==null&&sg(s)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var rn=null,Cr=!1;function Ca(o,s,c){for(c=c.child;c!==null;)wE(o,s,c),c=c.sibling}function wE(o,s,c){if(Jt&&typeof Jt.onCommitFiberUnmount=="function")try{Jt.onCommitFiberUnmount(En,c)}catch{}switch(c.tag){case 26:Cn||Qo(c,s),Ca(o,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Cn||Qo(c,s);var h=rn,v=Cr;ms(c.type)&&(rn=c.stateNode,Cr=!1),Ca(o,s,c),ou(c.stateNode),rn=h,Cr=v;break;case 5:Cn||Qo(c,s);case 6:if(h=rn,v=Cr,rn=null,Ca(o,s,c),rn=h,Cr=v,rn!==null)if(Cr)try{(rn.nodeType===9?rn.body:rn.nodeName==="HTML"?rn.ownerDocument.body:rn).removeChild(c.stateNode)}catch(_){$t(c,s,_)}else try{rn.removeChild(c.stateNode)}catch(_){$t(c,s,_)}break;case 18:rn!==null&&(Cr?(o=rn,hR(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,c.stateNode),Tl(o)):hR(rn,c.stateNode));break;case 4:h=rn,v=Cr,rn=c.stateNode.containerInfo,Cr=!0,Ca(o,s,c),rn=h,Cr=v;break;case 0:case 11:case 14:case 15:ls(2,c,s),Cn||ls(4,c,s),Ca(o,s,c);break;case 1:Cn||(Qo(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"&&pE(c,s,h)),Ca(o,s,c);break;case 21:Ca(o,s,c);break;case 22:Cn=(h=Cn)||c.memoizedState!==null,Ca(o,s,c),Cn=h;break;default:Ca(o,s,c)}}function SE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Tl(o)}catch(c){$t(s,s.return,c)}}}function EE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Tl(o)}catch(c){$t(s,s.return,c)}}function CP(o){switch(o.tag){case 31:case 13:case 19:var s=o.stateNode;return s===null&&(s=o.stateNode=new yE),s;case 22:return o=o.stateNode,s=o._retryCache,s===null&&(s=o._retryCache=new yE),s;default:throw Error(r(435,o.tag))}}function Sf(o,s){var c=CP(o);s.forEach(function(h){if(!c.has(h)){c.add(h);var v=jP.bind(null,o,h);h.then(v,v)}})}function Ar(o,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var v=c[h],_=o,k=s,j=k;e:for(;j!==null;){switch(j.tag){case 27:if(ms(j.type)){rn=j.stateNode,Cr=!1;break e}break;case 5:rn=j.stateNode,Cr=!1;break e;case 3:case 4:rn=j.stateNode.containerInfo,Cr=!0;break e}j=j.return}if(rn===null)throw Error(r(160));wE(_,k,v),rn=null,Cr=!1,_=v.alternate,_!==null&&(_.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)RE(s,o),s=s.sibling}var Io=null;function RE(o,s){var c=o.alternate,h=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Ar(s,o),Ir(o),h&4&&(ls(3,o,o.return),Kc(3,o),ls(5,o,o.return));break;case 1:Ar(s,o),Ir(o),h&512&&(Cn||c===null||Qo(c,c.return)),h&64&&Oa&&(o=o.updateQueue,o!==null&&(h=o.callbacks,h!==null&&(c=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=c===null?h:c.concat(h))));break;case 26:var v=Io;if(Ar(s,o),Ir(o),h&512&&(Cn||c===null||Qo(c,c.return)),h&4){var _=c!==null?c.memoizedState:null;if(h=o.memoizedState,c===null)if(h===null)if(o.stateNode===null){e:{h=o.type,c=o.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":_=v.getElementsByTagName("title")[0],(!_||_[Sc]||_[Qn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=v.createElement(h),v.head.insertBefore(_,v.querySelector("head > title"))),tr(_,h,c),_[Qn]=o,qn(_),h=_;break e;case"link":var k=RR("link","href",v).get(h+(c.href||""));if(k){for(var j=0;j<k.length;j++)if(_=k[j],_.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&_.getAttribute("rel")===(c.rel==null?null:c.rel)&&_.getAttribute("title")===(c.title==null?null:c.title)&&_.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){k.splice(j,1);break t}}_=v.createElement(h),tr(_,h,c),v.head.appendChild(_);break;case"meta":if(k=RR("meta","content",v).get(h+(c.content||""))){for(j=0;j<k.length;j++)if(_=k[j],_.getAttribute("content")===(c.content==null?null:""+c.content)&&_.getAttribute("name")===(c.name==null?null:c.name)&&_.getAttribute("property")===(c.property==null?null:c.property)&&_.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&_.getAttribute("charset")===(c.charSet==null?null:c.charSet)){k.splice(j,1);break t}}_=v.createElement(h),tr(_,h,c),v.head.appendChild(_);break;default:throw Error(r(468,h))}_[Qn]=o,qn(_),h=_}o.stateNode=h}else xR(v,o.type,o.stateNode);else o.stateNode=ER(v,h,o.memoizedProps);else _!==h?(_===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):_.count--,h===null?xR(v,o.type,o.stateNode):ER(v,h,o.memoizedProps)):h===null&&o.stateNode!==null&&Ov(o,o.memoizedProps,c.memoizedProps)}break;case 27:Ar(s,o),Ir(o),h&512&&(Cn||c===null||Qo(c,c.return)),c!==null&&h&4&&Ov(o,o.memoizedProps,c.memoizedProps);break;case 5:if(Ar(s,o),Ir(o),h&512&&(Cn||c===null||Qo(c,c.return)),o.flags&32){v=o.stateNode;try{Yi(v,"")}catch($e){$t(o,o.return,$e)}}h&4&&o.stateNode!=null&&(v=o.memoizedProps,Ov(o,v,c!==null?c.memoizedProps:v)),h&1024&&(Iv=!0);break;case 6:if(Ar(s,o),Ir(o),h&4){if(o.stateNode===null)throw Error(r(162));h=o.memoizedProps,c=o.stateNode;try{c.nodeValue=h}catch($e){$t(o,o.return,$e)}}break;case 3:if($f=null,v=Io,Io=Lf(s.containerInfo),Ar(s,o),Io=v,Ir(o),h&4&&c!==null&&c.memoizedState.isDehydrated)try{Tl(s.containerInfo)}catch($e){$t(o,o.return,$e)}Iv&&(Iv=!1,xE(o));break;case 4:h=Io,Io=Lf(o.stateNode.containerInfo),Ar(s,o),Ir(o),Io=h;break;case 12:Ar(s,o),Ir(o);break;case 31:Ar(s,o),Ir(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Sf(o,h)));break;case 13:Ar(s,o),Ir(o),o.child.flags&8192&&o.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Rf=we()),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Sf(o,h)));break;case 22:v=o.memoizedState!==null;var Q=c!==null&&c.memoizedState!==null,fe=Oa,be=Cn;if(Oa=fe||v,Cn=be||Q,Ar(s,o),Cn=be,Oa=fe,Ir(o),h&8192)e:for(s=o.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(c===null||Q||Oa||Cn||fi(o)),c=null,s=o;;){if(s.tag===5||s.tag===26){if(c===null){Q=c=s;try{if(_=Q.stateNode,v)k=_.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{j=Q.stateNode;var xe=Q.memoizedProps.style,me=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;j.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch($e){$t(Q,Q.return,$e)}}}else if(s.tag===6){if(c===null){Q=s;try{Q.stateNode.nodeValue=v?"":Q.memoizedProps}catch($e){$t(Q,Q.return,$e)}}}else if(s.tag===18){if(c===null){Q=s;try{var ge=Q.stateNode;v?pR(ge,!0):pR(Q.stateNode,!1)}catch($e){$t(Q,Q.return,$e)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===o)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=o.updateQueue,h!==null&&(c=h.retryQueue,c!==null&&(h.retryQueue=null,Sf(o,c))));break;case 19:Ar(s,o),Ir(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Sf(o,h)));break;case 30:break;case 21:break;default:Ar(s,o),Ir(o)}}function Ir(o){var s=o.flags;if(s&2){try{for(var c,h=o.return;h!==null;){if(gE(h)){c=h;break}h=h.return}if(c==null)throw Error(r(160));switch(c.tag){case 27:var v=c.stateNode,_=Cv(o);wf(o,_,v);break;case 5:var k=c.stateNode;c.flags&32&&(Yi(k,""),c.flags&=-33);var j=Cv(o);wf(o,j,k);break;case 3:case 4:var Q=c.stateNode.containerInfo,fe=Cv(o);Av(o,fe,Q);break;default:throw Error(r(161))}}catch(be){$t(o,o.return,be)}o.flags&=-3}s&4096&&(o.flags&=-4097)}function xE(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var s=o;xE(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),o=o.sibling}}function Aa(o,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)_E(o,s.alternate,s),s=s.sibling}function fi(o){for(o=o.child;o!==null;){var s=o;switch(s.tag){case 0:case 11:case 14:case 15:ls(4,s,s.return),fi(s);break;case 1:Qo(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&pE(s,s.return,c),fi(s);break;case 27:ou(s.stateNode);case 26:case 5:Qo(s,s.return),fi(s);break;case 22:s.memoizedState===null&&fi(s);break;case 30:fi(s);break;default:fi(s)}o=o.sibling}}function Ia(o,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,v=o,_=s,k=_.flags;switch(_.tag){case 0:case 11:case 15:Ia(v,_,c),Kc(4,_);break;case 1:if(Ia(v,_,c),h=_,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(fe){$t(h,h.return,fe)}if(h=_,v=h.updateQueue,v!==null){var j=h.stateNode;try{var Q=v.shared.hiddenCallbacks;if(Q!==null)for(v.shared.hiddenCallbacks=null,v=0;v<Q.length;v++)nS(Q[v],j)}catch(fe){$t(h,h.return,fe)}}c&&k&64&&hE(_),Yc(_,_.return);break;case 27:vE(_);case 26:case 5:Ia(v,_,c),c&&h===null&&k&4&&mE(_),Yc(_,_.return);break;case 12:Ia(v,_,c);break;case 31:Ia(v,_,c),c&&k&4&&SE(v,_);break;case 13:Ia(v,_,c),c&&k&4&&EE(v,_);break;case 22:_.memoizedState===null&&Ia(v,_,c),Yc(_,_.return);break;case 30:break;default:Ia(v,_,c)}s=s.sibling}}function Nv(o,s){var c=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),o=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(o=s.memoizedState.cachePool.pool),o!==c&&(o!=null&&o.refCount++,c!=null&&Dc(c))}function kv(o,s){o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&Dc(o))}function No(o,s,c,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)TE(o,s,c,h),s=s.sibling}function TE(o,s,c,h){var v=s.flags;switch(s.tag){case 0:case 11:case 15:No(o,s,c,h),v&2048&&Kc(9,s);break;case 1:No(o,s,c,h);break;case 3:No(o,s,c,h),v&2048&&(o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&Dc(o)));break;case 12:if(v&2048){No(o,s,c,h),o=s.stateNode;try{var _=s.memoizedProps,k=_.id,j=_.onPostCommit;typeof j=="function"&&j(k,s.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(Q){$t(s,s.return,Q)}}else No(o,s,c,h);break;case 31:No(o,s,c,h);break;case 13:No(o,s,c,h);break;case 23:break;case 22:_=s.stateNode,k=s.alternate,s.memoizedState!==null?_._visibility&2?No(o,s,c,h):Wc(o,s):_._visibility&2?No(o,s,c,h):(_._visibility|=2,ml(o,s,c,h,(s.subtreeFlags&10256)!==0||!1)),v&2048&&Nv(k,s);break;case 24:No(o,s,c,h),v&2048&&kv(s.alternate,s);break;default:No(o,s,c,h)}}function ml(o,s,c,h,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=o,k=s,j=c,Q=h,fe=k.flags;switch(k.tag){case 0:case 11:case 15:ml(_,k,j,Q,v),Kc(8,k);break;case 23:break;case 22:var be=k.stateNode;k.memoizedState!==null?be._visibility&2?ml(_,k,j,Q,v):Wc(_,k):(be._visibility|=2,ml(_,k,j,Q,v)),v&&fe&2048&&Nv(k.alternate,k);break;case 24:ml(_,k,j,Q,v),v&&fe&2048&&kv(k.alternate,k);break;default:ml(_,k,j,Q,v)}s=s.sibling}}function Wc(o,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=o,h=s,v=h.flags;switch(h.tag){case 22:Wc(c,h),v&2048&&Nv(h.alternate,h);break;case 24:Wc(c,h),v&2048&&kv(h.alternate,h);break;default:Wc(c,h)}s=s.sibling}}var Qc=8192;function gl(o,s,c){if(o.subtreeFlags&Qc)for(o=o.child;o!==null;)OE(o,s,c),o=o.sibling}function OE(o,s,c){switch(o.tag){case 26:gl(o,s,c),o.flags&Qc&&o.memoizedState!==null&&pD(c,Io,o.memoizedState,o.memoizedProps);break;case 5:gl(o,s,c);break;case 3:case 4:var h=Io;Io=Lf(o.stateNode.containerInfo),gl(o,s,c),Io=h;break;case 22:o.memoizedState===null&&(h=o.alternate,h!==null&&h.memoizedState!==null?(h=Qc,Qc=16777216,gl(o,s,c),Qc=h):gl(o,s,c));break;default:gl(o,s,c)}}function CE(o){var s=o.alternate;if(s!==null&&(o=s.child,o!==null)){s.child=null;do s=o.sibling,o.sibling=null,o=s;while(o!==null)}}function Xc(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Hn=h,IE(h,o)}CE(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)AE(o),o=o.sibling}function AE(o){switch(o.tag){case 0:case 11:case 15:Xc(o),o.flags&2048&&ls(9,o,o.return);break;case 3:Xc(o);break;case 12:Xc(o);break;case 22:var s=o.stateNode;o.memoizedState!==null&&s._visibility&2&&(o.return===null||o.return.tag!==13)?(s._visibility&=-3,Ef(o)):Xc(o);break;default:Xc(o)}}function Ef(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var h=s[c];Hn=h,IE(h,o)}CE(o)}for(o=o.child;o!==null;){switch(s=o,s.tag){case 0:case 11:case 15:ls(8,s,s.return),Ef(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,Ef(s));break;default:Ef(s)}o=o.sibling}}function IE(o,s){for(;Hn!==null;){var c=Hn;switch(c.tag){case 0:case 11:case 15:ls(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var h=c.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Dc(c.memoizedState.cache)}if(h=c.child,h!==null)h.return=c,Hn=h;else e:for(c=o;Hn!==null;){h=Hn;var v=h.sibling,_=h.return;if(bE(h),h===c){Hn=null;break e}if(v!==null){v.return=_,Hn=v;break e}Hn=_}}}var AP={getCacheForType:function(o){var s=Jn(xn),c=s.data.get(o);return c===void 0&&(c=o(),s.data.set(o,c)),c},cacheSignal:function(){return Jn(xn).controller.signal}},IP=typeof WeakMap=="function"?WeakMap:Map,Pt=0,Yt=null,gt=null,bt=0,jt=0,qr=null,cs=!1,vl=!1,Mv=!1,Na=0,hn=0,us=0,hi=0,Pv=0,Hr=0,yl=0,Jc=null,Nr=null,Dv=!1,Rf=0,NE=0,xf=1/0,Tf=null,ds=null,$n=0,fs=null,_l=null,ka=0,Lv=0,jv=null,kE=null,eu=0,$v=null;function Gr(){return(Pt&2)!==0&&bt!==0?bt&-bt:B.T!==null?qv():og()}function ME(){if(Hr===0)if((bt&536870912)===0||St){var o=Rt;Rt<<=1,(Rt&3932160)===0&&(Rt=262144),Hr=o}else Hr=536870912;return o=Vr.current,o!==null&&(o.flags|=32),Hr}function kr(o,s,c){(o===Yt&&(jt===2||jt===9)||o.cancelPendingCommit!==null)&&(bl(o,0),hs(o,bt,Hr,!1)),Ct(o,c),((Pt&2)===0||o!==Yt)&&(o===Yt&&((Pt&2)===0&&(hi|=c),hn===4&&hs(o,bt,Hr,!1)),Xo(o))}function PE(o,s,c){if((Pt&6)!==0)throw Error(r(327));var h=!c&&(s&127)===0&&(s&o.expiredLanes)===0||ct(o,s),v=h?MP(o,s):zv(o,s,!0),_=h;do{if(v===0){vl&&!h&&hs(o,s,0,!1);break}else{if(c=o.current.alternate,_&&!NP(c)){v=zv(o,s,!1),_=!1;continue}if(v===2){if(_=s,o.errorRecoveryDisabledLanes&_)var k=0;else k=o.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){s=k;e:{var j=o;v=Jc;var Q=j.current.memoizedState.isDehydrated;if(Q&&(bl(j,k).flags|=256),k=zv(j,k,!1),k!==2){if(Mv&&!Q){j.errorRecoveryDisabledLanes|=_,hi|=_,v=4;break e}_=Nr,Nr=v,_!==null&&(Nr===null?Nr=_:Nr.push.apply(Nr,_))}v=k}if(_=!1,v!==2)continue}}if(v===1){bl(o,0),hs(o,s,0,!0);break}e:{switch(h=o,_=v,_){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:hs(h,s,Hr,!cs);break e;case 2:Nr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(v=Rf+300-we(),10<v)){if(hs(h,s,Hr,!cs),qe(h,0,!0)!==0)break e;ka=s,h.timeoutHandle=dR(DE.bind(null,h,c,Nr,Tf,Dv,s,Hr,hi,yl,cs,_,"Throttled",-0,0),v);break e}DE(h,c,Nr,Tf,Dv,s,Hr,hi,yl,cs,_,null,-0,0)}}break}while(!0);Xo(o)}function DE(o,s,c,h,v,_,k,j,Q,fe,be,xe,me,ge){if(o.timeoutHandle=-1,xe=s.subtreeFlags,xe&8192||(xe&16785408)===16785408){xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:va},OE(s,_,xe);var $e=(_&62914560)===_?Rf-we():(_&4194048)===_?NE-we():0;if($e=mD(xe,$e),$e!==null){ka=_,o.cancelPendingCommit=$e(BE.bind(null,o,s,_,c,h,v,k,j,Q,be,xe,null,me,ge)),hs(o,_,k,!fe);return}}BE(o,s,_,c,h,v,k,j,Q)}function NP(o){for(var s=o;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var h=0;h<c.length;h++){var v=c[h],_=v.getSnapshot;v=v.value;try{if(!zr(_(),v))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function hs(o,s,c,h){s&=~Pv,s&=~hi,o.suspendedLanes|=s,o.pingedLanes&=~s,h&&(o.warmLanes|=s),h=o.expirationTimes;for(var v=s;0<v;){var _=31-Rn(v),k=1<<_;h[_]=-1,v&=~k}c!==0&&ao(o,c,s)}function Of(){return(Pt&6)===0?(tu(0),!1):!0}function Uv(){if(gt!==null){if(jt===0)var o=gt.return;else o=gt,wa=oi=null,tv(o),ul=null,jc=0,o=gt;for(;o!==null;)fE(o.alternate,o),o=o.return;gt=null}}function bl(o,s){var c=o.timeoutHandle;c!==-1&&(o.timeoutHandle=-1,QP(c)),c=o.cancelPendingCommit,c!==null&&(o.cancelPendingCommit=null,c()),ka=0,Uv(),Yt=o,gt=c=_a(o.current,null),bt=s,jt=0,qr=null,cs=!1,vl=ct(o,s),Mv=!1,yl=Hr=Pv=hi=us=hn=0,Nr=Jc=null,Dv=!1,(s&8)!==0&&(s|=s&32);var h=o.entangledLanes;if(h!==0)for(o=o.entanglements,h&=s;0<h;){var v=31-Rn(h),_=1<<v;s|=o[v],h&=~_}return Na=s,Zd(),c}function LE(o,s){at=null,B.H=Hc,s===cl||s===tf?(s=Xw(),jt=3):s===Bg?(s=Xw(),jt=4):jt=s===vv?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,qr=s,gt===null&&(hn=1,gf(o,co(s,o.current)))}function jE(){var o=Vr.current;return o===null?!0:(bt&4194048)===bt?po===null:(bt&62914560)===bt||(bt&536870912)!==0?o===po:!1}function $E(){var o=B.H;return B.H=Hc,o===null?Hc:o}function UE(){var o=B.A;return B.A=AP,o}function Cf(){hn=4,cs||(bt&4194048)!==bt&&Vr.current!==null||(vl=!0),(us&134217727)===0&&(hi&134217727)===0||Yt===null||hs(Yt,bt,Hr,!1)}function zv(o,s,c){var h=Pt;Pt|=2;var v=$E(),_=UE();(Yt!==o||bt!==s)&&(Tf=null,bl(o,s)),s=!1;var k=hn;e:do try{if(jt!==0&>!==null){var j=gt,Q=qr;switch(jt){case 8:Uv(),k=6;break e;case 3:case 2:case 9:case 6:Vr.current===null&&(s=!0);var fe=jt;if(jt=0,qr=null,wl(o,j,Q,fe),c&&vl){k=0;break e}break;default:fe=jt,jt=0,qr=null,wl(o,j,Q,fe)}}kP(),k=hn;break}catch(be){LE(o,be)}while(!0);return s&&o.shellSuspendCounter++,wa=oi=null,Pt=h,B.H=v,B.A=_,gt===null&&(Yt=null,bt=0,Zd()),k}function kP(){for(;gt!==null;)zE(gt)}function MP(o,s){var c=Pt;Pt|=2;var h=$E(),v=UE();Yt!==o||bt!==s?(Tf=null,xf=we()+500,bl(o,s)):vl=ct(o,s);e:do try{if(jt!==0&>!==null){s=gt;var _=qr;t:switch(jt){case 1:jt=0,qr=null,wl(o,s,_,1);break;case 2:case 9:if(Ww(_)){jt=0,qr=null,FE(s);break}s=function(){jt!==2&&jt!==9||Yt!==o||(jt=7),Xo(o)},_.then(s,s);break e;case 3:jt=7;break e;case 4:jt=5;break e;case 7:Ww(_)?(jt=0,qr=null,FE(s)):(jt=0,qr=null,wl(o,s,_,7));break;case 5:var k=null;switch(gt.tag){case 26:k=gt.memoizedState;case 5:case 27:var j=gt;if(k?TR(k):j.stateNode.complete){jt=0,qr=null;var Q=j.sibling;if(Q!==null)gt=Q;else{var fe=j.return;fe!==null?(gt=fe,Af(fe)):gt=null}break t}}jt=0,qr=null,wl(o,s,_,5);break;case 6:jt=0,qr=null,wl(o,s,_,6);break;case 8:Uv(),hn=6;break e;default:throw Error(r(462))}}PP();break}catch(be){LE(o,be)}while(!0);return wa=oi=null,B.H=h,B.A=v,Pt=c,gt!==null?0:(Yt=null,bt=0,Zd(),hn)}function PP(){for(;gt!==null&&!re();)zE(gt)}function zE(o){var s=uE(o.alternate,o,Na);o.memoizedProps=o.pendingProps,s===null?Af(o):gt=s}function FE(o){var s=o,c=s.alternate;switch(s.tag){case 15:case 0:s=oE(c,s,s.pendingProps,s.type,void 0,bt);break;case 11:s=oE(c,s,s.pendingProps,s.type.render,s.ref,bt);break;case 5:tv(s);default:fE(c,s),s=gt=Uw(s,Na),s=uE(c,s,Na)}o.memoizedProps=o.pendingProps,s===null?Af(o):gt=s}function wl(o,s,c,h){wa=oi=null,tv(s),ul=null,jc=0;var v=s.return;try{if(SP(o,v,s,c,bt)){hn=1,gf(o,co(c,o.current)),gt=null;return}}catch(_){if(v!==null)throw gt=v,_;hn=1,gf(o,co(c,o.current)),gt=null;return}s.flags&32768?(St||h===1?o=!0:vl||(bt&536870912)!==0?o=!1:(cs=o=!0,(h===2||h===9||h===3||h===6)&&(h=Vr.current,h!==null&&h.tag===13&&(h.flags|=16384))),VE(s,o)):Af(s)}function Af(o){var s=o;do{if((s.flags&32768)!==0){VE(s,cs);return}o=s.return;var c=xP(s.alternate,s,Na);if(c!==null){gt=c;return}if(s=s.sibling,s!==null){gt=s;return}gt=s=o}while(s!==null);hn===0&&(hn=5)}function VE(o,s){do{var c=TP(o.alternate,o);if(c!==null){c.flags&=32767,gt=c;return}if(c=o.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(o=o.sibling,o!==null)){gt=o;return}gt=o=c}while(o!==null);hn=6,gt=null}function BE(o,s,c,h,v,_,k,j,Q){o.cancelPendingCommit=null;do If();while($n!==0);if((Pt&6)!==0)throw Error(r(327));if(s!==null){if(s===o.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=Cg,en(o,c,_,k,j,Q),o===Yt&&(gt=Yt=null,bt=0),_l=s,fs=o,ka=c,Lv=_,jv=v,kE=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,$P(Je,function(){return KE(),null})):(o.callbackNode=null,o.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=B.T,B.T=null,v=Y.p,Y.p=2,k=Pt,Pt|=4;try{OP(o,s,c)}finally{Pt=k,Y.p=v,B.T=h}}$n=1,qE(),HE(),GE()}}function qE(){if($n===1){$n=0;var o=fs,s=_l,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=B.T,B.T=null;var h=Y.p;Y.p=2;var v=Pt;Pt|=4;try{RE(s,o);var _=Xv,k=Iw(o.containerInfo),j=_.focusedElem,Q=_.selectionRange;if(k!==j&&j&&j.ownerDocument&&Aw(j.ownerDocument.documentElement,j)){if(Q!==null&&Eg(j)){var fe=Q.start,be=Q.end;if(be===void 0&&(be=fe),"selectionStart"in j)j.selectionStart=fe,j.selectionEnd=Math.min(be,j.value.length);else{var xe=j.ownerDocument||document,me=xe&&xe.defaultView||window;if(me.getSelection){var ge=me.getSelection(),$e=j.textContent.length,We=Math.min(Q.start,$e),Gt=Q.end===void 0?We:Math.min(Q.end,$e);!ge.extend&&We>Gt&&(k=Gt,Gt=We,We=k);var ie=Cw(j,We),te=Cw(j,Gt);if(ie&&te&&(ge.rangeCount!==1||ge.anchorNode!==ie.node||ge.anchorOffset!==ie.offset||ge.focusNode!==te.node||ge.focusOffset!==te.offset)){var de=xe.createRange();de.setStart(ie.node,ie.offset),ge.removeAllRanges(),We>Gt?(ge.addRange(de),ge.extend(te.node,te.offset)):(de.setEnd(te.node,te.offset),ge.addRange(de))}}}}for(xe=[],ge=j;ge=ge.parentNode;)ge.nodeType===1&&xe.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<xe.length;j++){var Se=xe[j];Se.element.scrollLeft=Se.left,Se.element.scrollTop=Se.top}}Vf=!!Qv,Xv=Qv=null}finally{Pt=v,Y.p=h,B.T=c}}o.current=s,$n=2}}function HE(){if($n===2){$n=0;var o=fs,s=_l,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=B.T,B.T=null;var h=Y.p;Y.p=2;var v=Pt;Pt|=4;try{_E(o,s.alternate,s)}finally{Pt=v,Y.p=h,B.T=c}}$n=3}}function GE(){if($n===4||$n===3){$n=0,oe();var o=fs,s=_l,c=ka,h=kE;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?$n=5:($n=0,_l=fs=null,ZE(o,o.pendingLanes));var v=o.pendingLanes;if(v===0&&(ds=null),Co(c),s=s.stateNode,Jt&&typeof Jt.onCommitFiberRoot=="function")try{Jt.onCommitFiberRoot(En,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=B.T,v=Y.p,Y.p=2,B.T=null;try{for(var _=o.onRecoverableError,k=0;k<h.length;k++){var j=h[k];_(j.value,{componentStack:j.stack})}}finally{B.T=s,Y.p=v}}(ka&3)!==0&&If(),Xo(o),v=o.pendingLanes,(c&261930)!==0&&(v&42)!==0?o===$v?eu++:(eu=0,$v=o):eu=0,tu(0)}}function ZE(o,s){(o.pooledCacheLanes&=s)===0&&(s=o.pooledCache,s!=null&&(o.pooledCache=null,Dc(s)))}function If(){return qE(),HE(),GE(),KE()}function KE(){if($n!==5)return!1;var o=fs,s=Lv;Lv=0;var c=Co(ka),h=B.T,v=Y.p;try{Y.p=32>c?32:c,B.T=null,c=jv,jv=null;var _=fs,k=ka;if($n=0,_l=fs=null,ka=0,(Pt&6)!==0)throw Error(r(331));var j=Pt;if(Pt|=4,AE(_.current),TE(_,_.current,k,c),Pt=j,tu(0,!1),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(En,_)}catch{}return!0}finally{Y.p=v,B.T=h,ZE(o,s)}}function YE(o,s,c){s=co(c,s),s=gv(o.stateNode,s,2),o=as(o,s,2),o!==null&&(Ct(o,2),Xo(o))}function $t(o,s,c){if(o.tag===3)YE(o,o,c);else for(;s!==null;){if(s.tag===3){YE(s,o,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ds===null||!ds.has(h))){o=co(c,o),c=WS(2),h=as(s,c,2),h!==null&&(QS(c,h,s,o),Ct(h,2),Xo(h));break}}s=s.return}}function Fv(o,s,c){var h=o.pingCache;if(h===null){h=o.pingCache=new IP;var v=new Set;h.set(s,v)}else v=h.get(s),v===void 0&&(v=new Set,h.set(s,v));v.has(c)||(Mv=!0,v.add(c),o=DP.bind(null,o,s,c),s.then(o,o))}function DP(o,s,c){var h=o.pingCache;h!==null&&h.delete(s),o.pingedLanes|=o.suspendedLanes&c,o.warmLanes&=~c,Yt===o&&(bt&c)===c&&(hn===4||hn===3&&(bt&62914560)===bt&&300>we()-Rf?(Pt&2)===0&&bl(o,0):Pv|=c,yl===bt&&(yl=0)),Xo(o)}function WE(o,s){s===0&&(s=Bt()),o=ti(o,s),o!==null&&(Ct(o,s),Xo(o))}function LP(o){var s=o.memoizedState,c=0;s!==null&&(c=s.retryLane),WE(o,c)}function jP(o,s){var c=0;switch(o.tag){case 31:case 13:var h=o.stateNode,v=o.memoizedState;v!==null&&(c=v.retryLane);break;case 19:h=o.stateNode;break;case 22:h=o.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),WE(o,c)}function $P(o,s){return Ye(o,s)}var Nf=null,Sl=null,Vv=!1,kf=!1,Bv=!1,ps=0;function Xo(o){o!==Sl&&o.next===null&&(Sl===null?Nf=Sl=o:Sl=Sl.next=o),kf=!0,Vv||(Vv=!0,zP())}function tu(o,s){if(!Bv&&kf){Bv=!0;do for(var c=!1,h=Nf;h!==null;){if(o!==0){var v=h.pendingLanes;if(v===0)var _=0;else{var k=h.suspendedLanes,j=h.pingedLanes;_=(1<<31-Rn(42|o)+1)-1,_&=v&~(k&~j),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(c=!0,eR(h,_))}else _=bt,_=qe(h,h===Yt?_:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(_&3)===0||ct(h,_)||(c=!0,eR(h,_));h=h.next}while(c);Bv=!1}}function UP(){QE()}function QE(){kf=Vv=!1;var o=0;ps!==0&&WP()&&(o=ps);for(var s=we(),c=null,h=Nf;h!==null;){var v=h.next,_=XE(h,s);_===0?(h.next=null,c===null?Nf=v:c.next=v,v===null&&(Sl=c)):(c=h,(o!==0||(_&3)!==0)&&(kf=!0)),h=v}$n!==0&&$n!==5||tu(o),ps!==0&&(ps=0)}function XE(o,s){for(var c=o.suspendedLanes,h=o.pingedLanes,v=o.expirationTimes,_=o.pendingLanes&-62914561;0<_;){var k=31-Rn(_),j=1<<k,Q=v[k];Q===-1?((j&c)===0||(j&h)!==0)&&(v[k]=Kt(j,s)):Q<=s&&(o.expiredLanes|=j),_&=~j}if(s=Yt,c=bt,c=qe(o,o===s?c:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h=o.callbackNode,c===0||o===s&&(jt===2||jt===9)||o.cancelPendingCommit!==null)return h!==null&&h!==null&&Z(h),o.callbackNode=null,o.callbackPriority=0;if((c&3)===0||ct(o,c)){if(s=c&-c,s===o.callbackPriority)return s;switch(h!==null&&Z(h),Co(c)){case 2:case 8:c=ke;break;case 32:c=Je;break;case 268435456:c=Tt;break;default:c=Je}return h=JE.bind(null,o),c=Ye(c,h),o.callbackPriority=s,o.callbackNode=c,s}return h!==null&&h!==null&&Z(h),o.callbackPriority=2,o.callbackNode=null,2}function JE(o,s){if($n!==0&&$n!==5)return o.callbackNode=null,o.callbackPriority=0,null;var c=o.callbackNode;if(If()&&o.callbackNode!==c)return null;var h=bt;return h=qe(o,o===Yt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h===0?null:(PE(o,h,s),XE(o,we()),o.callbackNode!=null&&o.callbackNode===c?JE.bind(null,o):null)}function eR(o,s){if(If())return null;PE(o,s,!0)}function zP(){XP(function(){(Pt&6)!==0?Ye(Ee,UP):QE()})}function qv(){if(ps===0){var o=il;o===0&&(o=_t,_t<<=1,(_t&261888)===0&&(_t=256)),ps=o}return ps}function tR(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Ud(""+o)}function nR(o,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,o.id&&c.setAttribute("form",o.id),s.parentNode.insertBefore(c,s),o=new FormData(o),c.parentNode.removeChild(c),o}function FP(o,s,c,h,v){if(s==="submit"&&c&&c.stateNode===v){var _=tR((v[Tr]||null).action),k=h.submitter;k&&(s=(s=k[Tr]||null)?tR(s.formAction):k.getAttribute("formAction"),s!==null&&(_=s,k=null));var j=new Bd("action","action",null,h,v);o.push({event:j,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ps!==0){var Q=k?nR(v,k):new FormData(v);uv(c,{pending:!0,data:Q,method:v.method,action:_},null,Q)}}else typeof _=="function"&&(j.preventDefault(),Q=k?nR(v,k):new FormData(v),uv(c,{pending:!0,data:Q,method:v.method,action:_},_,Q))},currentTarget:v}]})}}for(var Hv=0;Hv<Og.length;Hv++){var Gv=Og[Hv],VP=Gv.toLowerCase(),BP=Gv[0].toUpperCase()+Gv.slice(1);Ao(VP,"on"+BP)}Ao(Mw,"onAnimationEnd"),Ao(Pw,"onAnimationIteration"),Ao(Dw,"onAnimationStart"),Ao("dblclick","onDoubleClick"),Ao("focusin","onFocus"),Ao("focusout","onBlur"),Ao(aP,"onTransitionRun"),Ao(sP,"onTransitionStart"),Ao(iP,"onTransitionCancel"),Ao(Lw,"onTransitionEnd"),Zi("onMouseEnter",["mouseout","mouseover"]),Zi("onMouseLeave",["mouseout","mouseover"]),Zi("onPointerEnter",["pointerout","pointerover"]),Zi("onPointerLeave",["pointerout","pointerover"]),Qs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qs("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var nu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),qP=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(nu));function rR(o,s){s=(s&4)!==0;for(var c=0;c<o.length;c++){var h=o[c],v=h.event;h=h.listeners;e:{var _=void 0;if(s)for(var k=h.length-1;0<=k;k--){var j=h[k],Q=j.instance,fe=j.currentTarget;if(j=j.listener,Q!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=fe;try{_(v)}catch(be){Gd(be)}v.currentTarget=null,_=Q}else for(k=0;k<h.length;k++){if(j=h[k],Q=j.instance,fe=j.currentTarget,j=j.listener,Q!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=fe;try{_(v)}catch(be){Gd(be)}v.currentTarget=null,_=Q}}}}function vt(o,s){var c=s[ag];c===void 0&&(c=s[ag]=new Set);var h=o+"__bubble";c.has(h)||(oR(s,o,2,!1),c.add(h))}function Zv(o,s,c){var h=0;s&&(h|=4),oR(c,o,h,s)}var Mf="_reactListening"+Math.random().toString(36).slice(2);function Kv(o){if(!o[Mf]){o[Mf]=!0,Q1.forEach(function(c){c!=="selectionchange"&&(qP.has(c)||Zv(c,!1,o),Zv(c,!0,o))});var s=o.nodeType===9?o:o.ownerDocument;s===null||s[Mf]||(s[Mf]=!0,Zv("selectionchange",!1,s))}}function oR(o,s,c,h){switch(MR(s)){case 2:var v=yD;break;case 8:v=_D;break;default:v=cy}c=v.bind(null,s,c,o),v=void 0,!pg||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),h?v!==void 0?o.addEventListener(s,c,{capture:!0,passive:v}):o.addEventListener(s,c,!0):v!==void 0?o.addEventListener(s,c,{passive:v}):o.addEventListener(s,c,!1)}function Yv(o,s,c,h,v){var _=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var k=h.tag;if(k===3||k===4){var j=h.stateNode.containerInfo;if(j===v)break;if(k===4)for(k=h.return;k!==null;){var Q=k.tag;if((Q===3||Q===4)&&k.stateNode.containerInfo===v)return;k=k.return}for(;j!==null;){if(k=qi(j),k===null)return;if(Q=k.tag,Q===5||Q===6||Q===26||Q===27){h=_=k;continue e}j=j.parentNode}}h=h.return}cw(function(){var fe=_,be=fg(c),xe=[];e:{var me=jw.get(o);if(me!==void 0){var ge=Bd,$e=o;switch(o){case"keypress":if(Fd(c)===0)break e;case"keydown":case"keyup":ge=j3;break;case"focusin":$e="focus",ge=yg;break;case"focusout":$e="blur",ge=yg;break;case"beforeblur":case"afterblur":ge=yg;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=fw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=x3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=z3;break;case Mw:case Pw:case Dw:ge=C3;break;case Lw:ge=V3;break;case"scroll":case"scrollend":ge=E3;break;case"wheel":ge=q3;break;case"copy":case"cut":case"paste":ge=I3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=pw;break;case"toggle":case"beforetoggle":ge=G3}var We=(s&4)!==0,Gt=!We&&(o==="scroll"||o==="scrollend"),ie=We?me!==null?me+"Capture":null:me;We=[];for(var te=fe,de;te!==null;){var Se=te;if(de=Se.stateNode,Se=Se.tag,Se!==5&&Se!==26&&Se!==27||de===null||ie===null||(Se=Rc(te,ie),Se!=null&&We.push(ru(te,Se,de))),Gt)break;te=te.return}0<We.length&&(me=new ge(me,$e,null,c,be),xe.push({event:me,listeners:We}))}}if((s&7)===0){e:{if(me=o==="mouseover"||o==="pointerover",ge=o==="mouseout"||o==="pointerout",me&&c!==dg&&($e=c.relatedTarget||c.fromElement)&&(qi($e)||$e[Bi]))break e;if((ge||me)&&(me=be.window===be?be:(me=be.ownerDocument)?me.defaultView||me.parentWindow:window,ge?($e=c.relatedTarget||c.toElement,ge=fe,$e=$e?qi($e):null,$e!==null&&(Gt=i($e),We=$e.tag,$e!==Gt||We!==5&&We!==27&&We!==6)&&($e=null)):(ge=null,$e=fe),ge!==$e)){if(We=fw,Se="onMouseLeave",ie="onMouseEnter",te="mouse",(o==="pointerout"||o==="pointerover")&&(We=pw,Se="onPointerLeave",ie="onPointerEnter",te="pointer"),Gt=ge==null?me:Ec(ge),de=$e==null?me:Ec($e),me=new We(Se,te+"leave",ge,c,be),me.target=Gt,me.relatedTarget=de,Se=null,qi(be)===fe&&(We=new We(ie,te+"enter",$e,c,be),We.target=de,We.relatedTarget=Gt,Se=We),Gt=Se,ge&&$e)t:{for(We=HP,ie=ge,te=$e,de=0,Se=ie;Se;Se=We(Se))de++;Se=0;for(var Ke=te;Ke;Ke=We(Ke))Se++;for(;0<de-Se;)ie=We(ie),de--;for(;0<Se-de;)te=We(te),Se--;for(;de--;){if(ie===te||te!==null&&ie===te.alternate){We=ie;break t}ie=We(ie),te=We(te)}We=null}else We=null;ge!==null&&aR(xe,me,ge,We,!1),$e!==null&&Gt!==null&&aR(xe,Gt,$e,We,!0)}}e:{if(me=fe?Ec(fe):window,ge=me.nodeName&&me.nodeName.toLowerCase(),ge==="select"||ge==="input"&&me.type==="file")var At=Sw;else if(bw(me))if(Ew)At=nP;else{At=eP;var He=J3}else ge=me.nodeName,!ge||ge.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?fe&&ug(fe.elementType)&&(At=Sw):At=tP;if(At&&(At=At(o,fe))){ww(xe,At,c,be);break e}He&&He(o,me,fe),o==="focusout"&&fe&&me.type==="number"&&fe.memoizedProps.value!=null&&cg(me,"number",me.value)}switch(He=fe?Ec(fe):window,o){case"focusin":(bw(He)||He.contentEditable==="true")&&(Ji=He,Rg=fe,kc=null);break;case"focusout":kc=Rg=Ji=null;break;case"mousedown":xg=!0;break;case"contextmenu":case"mouseup":case"dragend":xg=!1,Nw(xe,c,be);break;case"selectionchange":if(oP)break;case"keydown":case"keyup":Nw(xe,c,be)}var st;if(bg)e:{switch(o){case"compositionstart":var wt="onCompositionStart";break e;case"compositionend":wt="onCompositionEnd";break e;case"compositionupdate":wt="onCompositionUpdate";break e}wt=void 0}else Xi?yw(o,c)&&(wt="onCompositionEnd"):o==="keydown"&&c.keyCode===229&&(wt="onCompositionStart");wt&&(mw&&c.locale!=="ko"&&(Xi||wt!=="onCompositionStart"?wt==="onCompositionEnd"&&Xi&&(st=uw()):(Xa=be,mg="value"in Xa?Xa.value:Xa.textContent,Xi=!0)),He=Pf(fe,wt),0<He.length&&(wt=new hw(wt,o,null,c,be),xe.push({event:wt,listeners:He}),st?wt.data=st:(st=_w(c),st!==null&&(wt.data=st)))),(st=K3?Y3(o,c):W3(o,c))&&(wt=Pf(fe,"onBeforeInput"),0<wt.length&&(He=new hw("onBeforeInput","beforeinput",null,c,be),xe.push({event:He,listeners:wt}),He.data=st)),FP(xe,o,fe,c,be)}rR(xe,s)})}function ru(o,s,c){return{instance:o,listener:s,currentTarget:c}}function Pf(o,s){for(var c=s+"Capture",h=[];o!==null;){var v=o,_=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||_===null||(v=Rc(o,c),v!=null&&h.unshift(ru(o,v,_)),v=Rc(o,s),v!=null&&h.push(ru(o,v,_))),o.tag===3)return h;o=o.return}return[]}function HP(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function aR(o,s,c,h,v){for(var _=s._reactName,k=[];c!==null&&c!==h;){var j=c,Q=j.alternate,fe=j.stateNode;if(j=j.tag,Q!==null&&Q===h)break;j!==5&&j!==26&&j!==27||fe===null||(Q=fe,v?(fe=Rc(c,_),fe!=null&&k.unshift(ru(c,fe,Q))):v||(fe=Rc(c,_),fe!=null&&k.push(ru(c,fe,Q)))),c=c.return}k.length!==0&&o.push({event:s,listeners:k})}var GP=/\r\n?/g,ZP=/\u0000|\uFFFD/g;function sR(o){return(typeof o=="string"?o:""+o).replace(GP,`
|
|
10
|
+
`).replace(ZP,"")}function iR(o,s){return s=sR(s),sR(o)===s}function Ht(o,s,c,h,v,_){switch(c){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||Yi(o,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&Yi(o,""+h);break;case"className":jd(o,"class",h);break;case"tabIndex":jd(o,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":jd(o,c,h);break;case"style":iw(o,h,_);break;case"data":if(s!=="object"){jd(o,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||c!=="href")){o.removeAttribute(c);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(c);break}h=Ud(""+h),o.setAttribute(c,h);break;case"action":case"formAction":if(typeof h=="function"){o.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof _=="function"&&(c==="formAction"?(s!=="input"&&Ht(o,s,"name",v.name,v,null),Ht(o,s,"formEncType",v.formEncType,v,null),Ht(o,s,"formMethod",v.formMethod,v,null),Ht(o,s,"formTarget",v.formTarget,v,null)):(Ht(o,s,"encType",v.encType,v,null),Ht(o,s,"method",v.method,v,null),Ht(o,s,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(c);break}h=Ud(""+h),o.setAttribute(c,h);break;case"onClick":h!=null&&(o.onclick=va);break;case"onScroll":h!=null&&vt("scroll",o);break;case"onScrollEnd":h!=null&&vt("scrollend",o);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=c}}break;case"multiple":o.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":o.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){o.removeAttribute("xlink:href");break}c=Ud(""+h),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(c,""+h):o.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(c,""):o.removeAttribute(c);break;case"capture":case"download":h===!0?o.setAttribute(c,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(c,h):o.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?o.setAttribute(c,h):o.removeAttribute(c);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?o.removeAttribute(c):o.setAttribute(c,h);break;case"popover":vt("beforetoggle",o),vt("toggle",o),Ld(o,"popover",h);break;case"xlinkActuate":ga(o,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ga(o,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ga(o,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ga(o,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ga(o,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ga(o,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ga(o,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ga(o,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ga(o,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Ld(o,"is",h);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=w3.get(c)||c,Ld(o,c,h))}}function Wv(o,s,c,h,v,_){switch(c){case"style":iw(o,h,_);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(c=h.__html,c!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=c}}break;case"children":typeof h=="string"?Yi(o,h):(typeof h=="number"||typeof h=="bigint")&&Yi(o,""+h);break;case"onScroll":h!=null&&vt("scroll",o);break;case"onScrollEnd":h!=null&&vt("scrollend",o);break;case"onClick":h!=null&&(o.onclick=va);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!X1.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(v=c.endsWith("Capture"),s=c.slice(2,v?c.length-7:void 0),_=o[Tr]||null,_=_!=null?_[c]:null,typeof _=="function"&&o.removeEventListener(s,_,v),typeof h=="function")){typeof _!="function"&&_!==null&&(c in o?o[c]=null:o.hasAttribute(c)&&o.removeAttribute(c)),o.addEventListener(s,h,v);break e}c in o?o[c]=h:h===!0?o.setAttribute(c,""):Ld(o,c,h)}}}function tr(o,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":vt("error",o),vt("load",o);var h=!1,v=!1,_;for(_ in c)if(c.hasOwnProperty(_)){var k=c[_];if(k!=null)switch(_){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Ht(o,s,_,k,c,null)}}v&&Ht(o,s,"srcSet",c.srcSet,c,null),h&&Ht(o,s,"src",c.src,c,null);return;case"input":vt("invalid",o);var j=_=k=v=null,Q=null,fe=null;for(h in c)if(c.hasOwnProperty(h)){var be=c[h];if(be!=null)switch(h){case"name":v=be;break;case"type":k=be;break;case"checked":Q=be;break;case"defaultChecked":fe=be;break;case"value":_=be;break;case"defaultValue":j=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,s));break;default:Ht(o,s,h,be,c,null)}}rw(o,_,j,Q,fe,k,v,!1);return;case"select":vt("invalid",o),h=k=_=null;for(v in c)if(c.hasOwnProperty(v)&&(j=c[v],j!=null))switch(v){case"value":_=j;break;case"defaultValue":k=j;break;case"multiple":h=j;default:Ht(o,s,v,j,c,null)}s=_,c=k,o.multiple=!!h,s!=null?Ki(o,!!h,s,!1):c!=null&&Ki(o,!!h,c,!0);return;case"textarea":vt("invalid",o),_=v=h=null;for(k in c)if(c.hasOwnProperty(k)&&(j=c[k],j!=null))switch(k){case"value":h=j;break;case"defaultValue":v=j;break;case"children":_=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(91));break;default:Ht(o,s,k,j,c,null)}aw(o,h,v,_);return;case"option":for(Q in c)c.hasOwnProperty(Q)&&(h=c[Q],h!=null)&&(Q==="selected"?o.selected=h&&typeof h!="function"&&typeof h!="symbol":Ht(o,s,Q,h,c,null));return;case"dialog":vt("beforetoggle",o),vt("toggle",o),vt("cancel",o),vt("close",o);break;case"iframe":case"object":vt("load",o);break;case"video":case"audio":for(h=0;h<nu.length;h++)vt(nu[h],o);break;case"image":vt("error",o),vt("load",o);break;case"details":vt("toggle",o);break;case"embed":case"source":case"link":vt("error",o),vt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(fe in c)if(c.hasOwnProperty(fe)&&(h=c[fe],h!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Ht(o,s,fe,h,c,null)}return;default:if(ug(s)){for(be in c)c.hasOwnProperty(be)&&(h=c[be],h!==void 0&&Wv(o,s,be,h,c,void 0));return}}for(j in c)c.hasOwnProperty(j)&&(h=c[j],h!=null&&Ht(o,s,j,h,c,null))}function KP(o,s,c,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,_=null,k=null,j=null,Q=null,fe=null,be=null;for(ge in c){var xe=c[ge];if(c.hasOwnProperty(ge)&&xe!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":Q=xe;default:h.hasOwnProperty(ge)||Ht(o,s,ge,null,h,xe)}}for(var me in h){var ge=h[me];if(xe=c[me],h.hasOwnProperty(me)&&(ge!=null||xe!=null))switch(me){case"type":_=ge;break;case"name":v=ge;break;case"checked":fe=ge;break;case"defaultChecked":be=ge;break;case"value":k=ge;break;case"defaultValue":j=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,s));break;default:ge!==xe&&Ht(o,s,me,ge,h,xe)}}lg(o,k,j,Q,fe,be,_,v);return;case"select":ge=k=j=me=null;for(_ in c)if(Q=c[_],c.hasOwnProperty(_)&&Q!=null)switch(_){case"value":break;case"multiple":ge=Q;default:h.hasOwnProperty(_)||Ht(o,s,_,null,h,Q)}for(v in h)if(_=h[v],Q=c[v],h.hasOwnProperty(v)&&(_!=null||Q!=null))switch(v){case"value":me=_;break;case"defaultValue":j=_;break;case"multiple":k=_;default:_!==Q&&Ht(o,s,v,_,h,Q)}s=j,c=k,h=ge,me!=null?Ki(o,!!c,me,!1):!!h!=!!c&&(s!=null?Ki(o,!!c,s,!0):Ki(o,!!c,c?[]:"",!1));return;case"textarea":ge=me=null;for(j in c)if(v=c[j],c.hasOwnProperty(j)&&v!=null&&!h.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Ht(o,s,j,null,h,v)}for(k in h)if(v=h[k],_=c[k],h.hasOwnProperty(k)&&(v!=null||_!=null))switch(k){case"value":me=v;break;case"defaultValue":ge=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==_&&Ht(o,s,k,v,h,_)}ow(o,me,ge);return;case"option":for(var $e in c)me=c[$e],c.hasOwnProperty($e)&&me!=null&&!h.hasOwnProperty($e)&&($e==="selected"?o.selected=!1:Ht(o,s,$e,null,h,me));for(Q in h)me=h[Q],ge=c[Q],h.hasOwnProperty(Q)&&me!==ge&&(me!=null||ge!=null)&&(Q==="selected"?o.selected=me&&typeof me!="function"&&typeof me!="symbol":Ht(o,s,Q,me,h,ge));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var We in c)me=c[We],c.hasOwnProperty(We)&&me!=null&&!h.hasOwnProperty(We)&&Ht(o,s,We,null,h,me);for(fe in h)if(me=h[fe],ge=c[fe],h.hasOwnProperty(fe)&&me!==ge&&(me!=null||ge!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(r(137,s));break;default:Ht(o,s,fe,me,h,ge)}return;default:if(ug(s)){for(var Gt in c)me=c[Gt],c.hasOwnProperty(Gt)&&me!==void 0&&!h.hasOwnProperty(Gt)&&Wv(o,s,Gt,void 0,h,me);for(be in h)me=h[be],ge=c[be],!h.hasOwnProperty(be)||me===ge||me===void 0&&ge===void 0||Wv(o,s,be,me,h,ge);return}}for(var ie in c)me=c[ie],c.hasOwnProperty(ie)&&me!=null&&!h.hasOwnProperty(ie)&&Ht(o,s,ie,null,h,me);for(xe in h)me=h[xe],ge=c[xe],!h.hasOwnProperty(xe)||me===ge||me==null&&ge==null||Ht(o,s,xe,me,h,ge)}function lR(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function YP(){if(typeof performance.getEntriesByType=="function"){for(var o=0,s=0,c=performance.getEntriesByType("resource"),h=0;h<c.length;h++){var v=c[h],_=v.transferSize,k=v.initiatorType,j=v.duration;if(_&&j&&lR(k)){for(k=0,j=v.responseEnd,h+=1;h<c.length;h++){var Q=c[h],fe=Q.startTime;if(fe>j)break;var be=Q.transferSize,xe=Q.initiatorType;be&&lR(xe)&&(Q=Q.responseEnd,k+=be*(Q<j?1:(j-fe)/(Q-fe)))}if(--h,s+=8*(_+k)/(v.duration/1e3),o++,10<o)break}}if(0<o)return s/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var Qv=null,Xv=null;function Df(o){return o.nodeType===9?o:o.ownerDocument}function cR(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function uR(o,s){if(o===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&s==="foreignObject"?0:o}function Jv(o,s){return o==="textarea"||o==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var ey=null;function WP(){var o=window.event;return o&&o.type==="popstate"?o===ey?!1:(ey=o,!0):(ey=null,!1)}var dR=typeof setTimeout=="function"?setTimeout:void 0,QP=typeof clearTimeout=="function"?clearTimeout:void 0,fR=typeof Promise=="function"?Promise:void 0,XP=typeof queueMicrotask=="function"?queueMicrotask:typeof fR<"u"?function(o){return fR.resolve(null).then(o).catch(JP)}:dR;function JP(o){setTimeout(function(){throw o})}function ms(o){return o==="head"}function hR(o,s){var c=s,h=0;do{var v=c.nextSibling;if(o.removeChild(c),v&&v.nodeType===8)if(c=v.data,c==="/$"||c==="/&"){if(h===0){o.removeChild(v),Tl(s);return}h--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")h++;else if(c==="html")ou(o.ownerDocument.documentElement);else if(c==="head"){c=o.ownerDocument.head,ou(c);for(var _=c.firstChild;_;){var k=_.nextSibling,j=_.nodeName;_[Sc]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&_.rel.toLowerCase()==="stylesheet"||c.removeChild(_),_=k}}else c==="body"&&ou(o.ownerDocument.body);c=v}while(c);Tl(s)}function pR(o,s){var c=o;o=0;do{var h=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),h&&h.nodeType===8)if(c=h.data,c==="/$"){if(o===0)break;o--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||o++;c=h}while(c)}function ty(o){var s=o.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":ty(c),sg(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}o.removeChild(c)}}function eD(o,s,c,h){for(;o.nodeType===1;){var v=c;if(o.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(h){if(!o[Sc])switch(s){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(_=o.getAttribute("rel"),_==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(_!==v.rel||o.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||o.getAttribute("title")!==(v.title==null?null:v.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(_=o.getAttribute("src"),(_!==(v.src==null?null:v.src)||o.getAttribute("type")!==(v.type==null?null:v.type)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&_&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(s==="input"&&o.type==="hidden"){var _=v.name==null?null:""+v.name;if(v.type==="hidden"&&o.getAttribute("name")===_)return o}else return o;if(o=mo(o.nextSibling),o===null)break}return null}function tD(o,s,c){if(s==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!c||(o=mo(o.nextSibling),o===null))return null;return o}function mR(o,s){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!s||(o=mo(o.nextSibling),o===null))return null;return o}function ny(o){return o.data==="$?"||o.data==="$~"}function ry(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function nD(o,s){var c=o.ownerDocument;if(o.data==="$~")o._reactRetry=s;else if(o.data!=="$?"||c.readyState!=="loading")s();else{var h=function(){s(),c.removeEventListener("DOMContentLoaded",h)};c.addEventListener("DOMContentLoaded",h),o._reactRetry=h}}function mo(o){for(;o!=null;o=o.nextSibling){var s=o.nodeType;if(s===1||s===3)break;if(s===8){if(s=o.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return o}var oy=null;function gR(o){o=o.nextSibling;for(var s=0;o;){if(o.nodeType===8){var c=o.data;if(c==="/$"||c==="/&"){if(s===0)return mo(o.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}o=o.nextSibling}return null}function vR(o){o=o.previousSibling;for(var s=0;o;){if(o.nodeType===8){var c=o.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return o;s--}else c!=="/$"&&c!=="/&"||s++}o=o.previousSibling}return null}function yR(o,s,c){switch(s=Df(c),o){case"html":if(o=s.documentElement,!o)throw Error(r(452));return o;case"head":if(o=s.head,!o)throw Error(r(453));return o;case"body":if(o=s.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function ou(o){for(var s=o.attributes;s.length;)o.removeAttributeNode(s[0]);sg(o)}var go=new Map,_R=new Set;function Lf(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Ma=Y.d;Y.d={f:rD,r:oD,D:aD,C:sD,L:iD,m:lD,X:uD,S:cD,M:dD};function rD(){var o=Ma.f(),s=Of();return o||s}function oD(o){var s=Hi(o);s!==null&&s.tag===5&&s.type==="form"?LS(s):Ma.r(o)}var El=typeof document>"u"?null:document;function bR(o,s,c){var h=El;if(h&&typeof s=="string"&&s){var v=io(s);v='link[rel="'+o+'"][href="'+v+'"]',typeof c=="string"&&(v+='[crossorigin="'+c+'"]'),_R.has(v)||(_R.add(v),o={rel:o,crossOrigin:c,href:s},h.querySelector(v)===null&&(s=h.createElement("link"),tr(s,"link",o),qn(s),h.head.appendChild(s)))}}function aD(o){Ma.D(o),bR("dns-prefetch",o,null)}function sD(o,s){Ma.C(o,s),bR("preconnect",o,s)}function iD(o,s,c){Ma.L(o,s,c);var h=El;if(h&&o&&s){var v='link[rel="preload"][as="'+io(s)+'"]';s==="image"&&c&&c.imageSrcSet?(v+='[imagesrcset="'+io(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(v+='[imagesizes="'+io(c.imageSizes)+'"]')):v+='[href="'+io(o)+'"]';var _=v;switch(s){case"style":_=Rl(o);break;case"script":_=xl(o)}go.has(_)||(o=p({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:o,as:s},c),go.set(_,o),h.querySelector(v)!==null||s==="style"&&h.querySelector(au(_))||s==="script"&&h.querySelector(su(_))||(s=h.createElement("link"),tr(s,"link",o),qn(s),h.head.appendChild(s)))}}function lD(o,s){Ma.m(o,s);var c=El;if(c&&o){var h=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+io(h)+'"][href="'+io(o)+'"]',_=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=xl(o)}if(!go.has(_)&&(o=p({rel:"modulepreload",href:o},s),go.set(_,o),c.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(su(_)))return}h=c.createElement("link"),tr(h,"link",o),qn(h),c.head.appendChild(h)}}}function cD(o,s,c){Ma.S(o,s,c);var h=El;if(h&&o){var v=Gi(h).hoistableStyles,_=Rl(o);s=s||"default";var k=v.get(_);if(!k){var j={loading:0,preload:null};if(k=h.querySelector(au(_)))j.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":s},c),(c=go.get(_))&&ay(o,c);var Q=k=h.createElement("link");qn(Q),tr(Q,"link",o),Q._p=new Promise(function(fe,be){Q.onload=fe,Q.onerror=be}),Q.addEventListener("load",function(){j.loading|=1}),Q.addEventListener("error",function(){j.loading|=2}),j.loading|=4,jf(k,s,h)}k={type:"stylesheet",instance:k,count:1,state:j},v.set(_,k)}}}function uD(o,s){Ma.X(o,s);var c=El;if(c&&o){var h=Gi(c).hoistableScripts,v=xl(o),_=h.get(v);_||(_=c.querySelector(su(v)),_||(o=p({src:o,async:!0},s),(s=go.get(v))&&sy(o,s),_=c.createElement("script"),qn(_),tr(_,"link",o),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function dD(o,s){Ma.M(o,s);var c=El;if(c&&o){var h=Gi(c).hoistableScripts,v=xl(o),_=h.get(v);_||(_=c.querySelector(su(v)),_||(o=p({src:o,async:!0,type:"module"},s),(s=go.get(v))&&sy(o,s),_=c.createElement("script"),qn(_),tr(_,"link",o),c.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function wR(o,s,c,h){var v=(v=X.current)?Lf(v):null;if(!v)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=Rl(c.href),c=Gi(v).hoistableStyles,h=c.get(s),h||(h={type:"style",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){o=Rl(c.href);var _=Gi(v).hoistableStyles,k=_.get(o);if(k||(v=v.ownerDocument||v,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(o,k),(_=v.querySelector(au(o)))&&!_._p&&(k.instance=_,k.state.loading=5),go.has(o)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},go.set(o,c),_||fD(v,o,c,k.state))),s&&h===null)throw Error(r(528,""));return k}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=xl(c),c=Gi(v).hoistableScripts,h=c.get(s),h||(h={type:"script",instance:null,count:0,state:null},c.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Rl(o){return'href="'+io(o)+'"'}function au(o){return'link[rel="stylesheet"]['+o+"]"}function SR(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function fD(o,s,c,h){o.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=o.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),tr(s,"link",c),qn(s),o.head.appendChild(s))}function xl(o){return'[src="'+io(o)+'"]'}function su(o){return"script[async]"+o}function ER(o,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var h=o.querySelector('style[data-href~="'+io(c.href)+'"]');if(h)return s.instance=h,qn(h),h;var v=p({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return h=(o.ownerDocument||o).createElement("style"),qn(h),tr(h,"style",v),jf(h,c.precedence,o),s.instance=h;case"stylesheet":v=Rl(c.href);var _=o.querySelector(au(v));if(_)return s.state.loading|=4,s.instance=_,qn(_),_;h=SR(c),(v=go.get(v))&&ay(h,v),_=(o.ownerDocument||o).createElement("link"),qn(_);var k=_;return k._p=new Promise(function(j,Q){k.onload=j,k.onerror=Q}),tr(_,"link",h),s.state.loading|=4,jf(_,c.precedence,o),s.instance=_;case"script":return _=xl(c.src),(v=o.querySelector(su(_)))?(s.instance=v,qn(v),v):(h=c,(v=go.get(_))&&(h=p({},c),sy(h,v)),o=o.ownerDocument||o,v=o.createElement("script"),qn(v),tr(v,"link",h),o.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,jf(h,c.precedence,o));return s.instance}function jf(o,s,c){for(var h=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,_=v,k=0;k<h.length;k++){var j=h[k];if(j.dataset.precedence===s)_=j;else if(_!==v)break}_?_.parentNode.insertBefore(o,_.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(o,s.firstChild))}function ay(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.title==null&&(o.title=s.title)}function sy(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.integrity==null&&(o.integrity=s.integrity)}var $f=null;function RR(o,s,c){if($f===null){var h=new Map,v=$f=new Map;v.set(c,h)}else v=$f,h=v.get(c),h||(h=new Map,v.set(c,h));if(h.has(o))return h;for(h.set(o,null),c=c.getElementsByTagName(o),v=0;v<c.length;v++){var _=c[v];if(!(_[Sc]||_[Qn]||o==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var k=_.getAttribute(s)||"";k=o+k;var j=h.get(k);j?j.push(_):h.set(k,[_])}}return h}function xR(o,s,c){o=o.ownerDocument||o,o.head.insertBefore(c,s==="title"?o.querySelector("head > title"):null)}function hD(o,s,c){if(c===1||s.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(o=s.disabled,typeof s.precedence=="string"&&o==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function TR(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function pD(o,s,c,h){if(c.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var v=Rl(h.href),_=s.querySelector(au(v));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(o.count++,o=Uf.bind(o),s.then(o,o)),c.state.loading|=4,c.instance=_,qn(_);return}_=s.ownerDocument||s,h=SR(h),(v=go.get(v))&&ay(h,v),_=_.createElement("link"),qn(_);var k=_;k._p=new Promise(function(j,Q){k.onload=j,k.onerror=Q}),tr(_,"link",h),c.instance=_}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(o.count++,c=Uf.bind(o),s.addEventListener("load",c),s.addEventListener("error",c))}}var iy=0;function mD(o,s){return o.stylesheets&&o.count===0&&Ff(o,o.stylesheets),0<o.count||0<o.imgCount?function(c){var h=setTimeout(function(){if(o.stylesheets&&Ff(o,o.stylesheets),o.unsuspend){var _=o.unsuspend;o.unsuspend=null,_()}},6e4+s);0<o.imgBytes&&iy===0&&(iy=62500*YP());var v=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&Ff(o,o.stylesheets),o.unsuspend)){var _=o.unsuspend;o.unsuspend=null,_()}},(o.imgBytes>iy?50:800)+s);return o.unsuspend=c,function(){o.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function Uf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ff(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var zf=null;function Ff(o,s){o.stylesheets=null,o.unsuspend!==null&&(o.count++,zf=new Map,s.forEach(gD,o),zf=null,Uf.call(o))}function gD(o,s){if(!(s.state.loading&4)){var c=zf.get(o);if(c)var h=c.get(null);else{c=new Map,zf.set(o,c);for(var v=o.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<v.length;_++){var k=v[_];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(c.set(k.dataset.precedence,k),h=k)}h&&c.set(null,h)}v=s.instance,k=v.getAttribute("data-precedence"),_=c.get(k)||h,_===h&&c.set(null,v),c.set(k,v),this.count++,h=Uf.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),_?_.parentNode.insertBefore(v,_.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(v,o.firstChild)),s.state.loading|=4}}var iu={$$typeof:T,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function vD(o,s,c,h,v,_,k,j,Q){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=dr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dr(0),this.hiddenUpdates=dr(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=_,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function OR(o,s,c,h,v,_,k,j,Q,fe,be,xe){return o=new vD(o,s,c,k,Q,fe,be,xe,j),s=1,_===!0&&(s|=24),_=Fr(3,null,null,s),o.current=_,_.stateNode=o,s=zg(),s.refCount++,o.pooledCache=s,s.refCount++,_.memoizedState={element:h,isDehydrated:c,cache:s},qg(_),o}function CR(o){return o?(o=nl,o):nl}function AR(o,s,c,h,v,_){v=CR(v),h.context===null?h.context=v:h.pendingContext=v,h=os(s),h.payload={element:c},_=_===void 0?null:_,_!==null&&(h.callback=_),c=as(o,h,s),c!==null&&(kr(c,o,s),Uc(c,o,s))}function IR(o,s){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var c=o.retryLane;o.retryLane=c!==0&&c<s?c:s}}function ly(o,s){IR(o,s),(o=o.alternate)&&IR(o,s)}function NR(o){if(o.tag===13||o.tag===31){var s=ti(o,67108864);s!==null&&kr(s,o,67108864),ly(o,67108864)}}function kR(o){if(o.tag===13||o.tag===31){var s=Gr();s=Vi(s);var c=ti(o,s);c!==null&&kr(c,o,s),ly(o,s)}}var Vf=!0;function yD(o,s,c,h){var v=B.T;B.T=null;var _=Y.p;try{Y.p=2,cy(o,s,c,h)}finally{Y.p=_,B.T=v}}function _D(o,s,c,h){var v=B.T;B.T=null;var _=Y.p;try{Y.p=8,cy(o,s,c,h)}finally{Y.p=_,B.T=v}}function cy(o,s,c,h){if(Vf){var v=uy(h);if(v===null)Yv(o,s,h,Bf,c),PR(o,h);else if(wD(v,o,s,c,h))h.stopPropagation();else if(PR(o,h),s&4&&-1<bD.indexOf(o)){for(;v!==null;){var _=Hi(v);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var k=Ot(_.pendingLanes);if(k!==0){var j=_;for(j.pendingLanes|=2,j.entangledLanes|=2;k;){var Q=1<<31-Rn(k);j.entanglements[1]|=Q,k&=~Q}Xo(_),(Pt&6)===0&&(xf=we()+500,tu(0))}}break;case 31:case 13:j=ti(_,2),j!==null&&kr(j,_,2),Of(),ly(_,2)}if(_=uy(h),_===null&&Yv(o,s,h,Bf,c),_===v)break;v=_}v!==null&&h.stopPropagation()}else Yv(o,s,h,null,c)}}function uy(o){return o=fg(o),dy(o)}var Bf=null;function dy(o){if(Bf=null,o=qi(o),o!==null){var s=i(o);if(s===null)o=null;else{var c=s.tag;if(c===13){if(o=l(s),o!==null)return o;o=null}else if(c===31){if(o=u(s),o!==null)return o;o=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;o=null}else s!==o&&(o=null)}}return Bf=o,null}function MR(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Re()){case Ee:return 2;case ke:return 8;case Je:case rt:return 32;case Tt:return 268435456;default:return 32}default:return 32}}var fy=!1,gs=null,vs=null,ys=null,lu=new Map,cu=new Map,_s=[],bD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function PR(o,s){switch(o){case"focusin":case"focusout":gs=null;break;case"dragenter":case"dragleave":vs=null;break;case"mouseover":case"mouseout":ys=null;break;case"pointerover":case"pointerout":lu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":cu.delete(s.pointerId)}}function uu(o,s,c,h,v,_){return o===null||o.nativeEvent!==_?(o={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:_,targetContainers:[v]},s!==null&&(s=Hi(s),s!==null&&NR(s)),o):(o.eventSystemFlags|=h,s=o.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),o)}function wD(o,s,c,h,v){switch(s){case"focusin":return gs=uu(gs,o,s,c,h,v),!0;case"dragenter":return vs=uu(vs,o,s,c,h,v),!0;case"mouseover":return ys=uu(ys,o,s,c,h,v),!0;case"pointerover":var _=v.pointerId;return lu.set(_,uu(lu.get(_)||null,o,s,c,h,v)),!0;case"gotpointercapture":return _=v.pointerId,cu.set(_,uu(cu.get(_)||null,o,s,c,h,v)),!0}return!1}function DR(o){var s=qi(o.target);if(s!==null){var c=i(s);if(c!==null){if(s=c.tag,s===13){if(s=l(c),s!==null){o.blockedOn=s,Y1(o.priority,function(){kR(c)});return}}else if(s===31){if(s=u(c),s!==null){o.blockedOn=s,Y1(o.priority,function(){kR(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){o.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}o.blockedOn=null}function qf(o){if(o.blockedOn!==null)return!1;for(var s=o.targetContainers;0<s.length;){var c=uy(o.nativeEvent);if(c===null){c=o.nativeEvent;var h=new c.constructor(c.type,c);dg=h,c.target.dispatchEvent(h),dg=null}else return s=Hi(c),s!==null&&NR(s),o.blockedOn=c,!1;s.shift()}return!0}function LR(o,s,c){qf(o)&&c.delete(s)}function SD(){fy=!1,gs!==null&&qf(gs)&&(gs=null),vs!==null&&qf(vs)&&(vs=null),ys!==null&&qf(ys)&&(ys=null),lu.forEach(LR),cu.forEach(LR)}function Hf(o,s){o.blockedOn===s&&(o.blockedOn=null,fy||(fy=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,SD)))}var Gf=null;function jR(o){Gf!==o&&(Gf=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Gf===o&&(Gf=null);for(var s=0;s<o.length;s+=3){var c=o[s],h=o[s+1],v=o[s+2];if(typeof h!="function"){if(dy(h||c)===null)continue;break}var _=Hi(c);_!==null&&(o.splice(s,3),s-=3,uv(_,{pending:!0,data:v,method:c.method,action:h},h,v))}}))}function Tl(o){function s(Q){return Hf(Q,o)}gs!==null&&Hf(gs,o),vs!==null&&Hf(vs,o),ys!==null&&Hf(ys,o),lu.forEach(s),cu.forEach(s);for(var c=0;c<_s.length;c++){var h=_s[c];h.blockedOn===o&&(h.blockedOn=null)}for(;0<_s.length&&(c=_s[0],c.blockedOn===null);)DR(c),c.blockedOn===null&&_s.shift();if(c=(o.ownerDocument||o).$$reactFormReplay,c!=null)for(h=0;h<c.length;h+=3){var v=c[h],_=c[h+1],k=v[Tr]||null;if(typeof _=="function")k||jR(c);else if(k){var j=null;if(_&&_.hasAttribute("formAction")){if(v=_,k=_[Tr]||null)j=k.formAction;else if(dy(v)!==null)continue}else j=k.action;typeof j=="function"?c[h+1]=j:(c.splice(h,3),h-=3),jR(c)}}}function $R(){function o(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(k){return v=k})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),h||setTimeout(c,20)}function c(){if(!h&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,v=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){h=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function hy(o){this._internalRoot=o}Zf.prototype.render=hy.prototype.render=function(o){var s=this._internalRoot;if(s===null)throw Error(r(409));var c=s.current,h=Gr();AR(c,h,o,s,null,null)},Zf.prototype.unmount=hy.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var s=o.containerInfo;AR(o.current,2,null,o,null,null),Of(),s[Bi]=null}};function Zf(o){this._internalRoot=o}Zf.prototype.unstable_scheduleHydration=function(o){if(o){var s=og();o={blockedOn:null,target:o,priority:s};for(var c=0;c<_s.length&&s!==0&&s<_s[c].priority;c++);_s.splice(c,0,o),c===0&&DR(o)}};var UR=t.version;if(UR!=="19.2.3")throw Error(r(527,UR,"19.2.3"));Y.findDOMNode=function(o){var s=o._reactInternals;if(s===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=f(s),o=o!==null?m(o):null,o=o===null?null:o.stateNode,o};var ED={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Kf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kf.isDisabled&&Kf.supportsFiber)try{En=Kf.inject(ED),Jt=Kf}catch{}}return fu.createRoot=function(o,s){if(!a(o))throw Error(r(299));var c=!1,h="",v=GS,_=ZS,k=KS;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(k=s.onRecoverableError)),s=OR(o,1,!1,null,null,c,h,null,v,_,k,$R),o[Bi]=s.current,Kv(o),new hy(s)},fu.hydrateRoot=function(o,s,c){if(!a(o))throw Error(r(299));var h=!1,v="",_=GS,k=ZS,j=KS,Q=null;return c!=null&&(c.unstable_strictMode===!0&&(h=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(_=c.onUncaughtError),c.onCaughtError!==void 0&&(k=c.onCaughtError),c.onRecoverableError!==void 0&&(j=c.onRecoverableError),c.formState!==void 0&&(Q=c.formState)),s=OR(o,1,!0,s,c??null,h,v,Q,_,k,j,$R),s.context=CR(null),c=s.current,h=Gr(),h=Vi(h),v=os(h),v.callback=null,as(c,v,h),c=h,s.current.lanes=c,Ct(s,c),Xo(s),o[Bi]=s.current,Kv(o),new Zf(s)},fu.version="19.2.3",fu}var WR;function DD(){if(WR)return my.exports;WR=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),my.exports=PD(),my.exports}var LD=DD(),A=Gs();const ee=Ha(A),lb=xD({__proto__:null,default:ee},[A]);var by={exports:{}},wy={};var QR;function jD(){if(QR)return wy;QR=1;var e=Gs().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return wy.c=function(t){return e.H.useMemoCache(t)},wy}var XR;function $D(){return XR||(XR=1,by.exports=jD()),by.exports}var pc=$D(),hd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},UD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},zD=class{#e=UD;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Ri=new zD;function FD(e){setTimeout(e,0)}var ki=typeof window>"u"||"Deno"in globalThis;function Lr(){}function VD(e,t){return typeof e=="function"?e(t):e}function B0(e){return typeof e=="number"&&e>=0&&e!==1/0}function LC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ps(e,t){return typeof e=="function"?e(t):e}function bo(e,t){return typeof e=="function"?e(t):e}function JR(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:l,stale:u}=e;if(l){if(r){if(t.queryHash!==cb(l,t.options))return!1}else if(!Ku(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||a&&a!==t.state.fetchStatus||i&&!i(t))}function ex(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Zu(t.options.mutationKey)!==Zu(i))return!1}else if(!Ku(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function cb(e,t){return(t?.queryKeyHashFn||Zu)(e)}function Zu(e){return JSON.stringify(e,(t,n)=>H0(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Ku(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ku(e[n],t[n])):!1}var BD=Object.prototype.hasOwnProperty;function jC(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=tx(e)&&tx(t);if(!r&&!(H0(e)&&H0(t)))return t;const i=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),u=l.length,d=r?new Array(u):{};let f=0;for(let m=0;m<u;m++){const p=r?m:l[m],g=e[p],y=t[p];if(g===y){d[p]=g,(r?m<i:BD.call(e,p))&&f++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){d[p]=y;continue}const b=jC(g,y,n+1);d[p]=b,b===g&&f++}return i===u&&f===i?e:d}function q0(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function tx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function H0(e){if(!nx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!nx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function nx(e){return Object.prototype.toString.call(e)==="[object Object]"}function qD(e){return new Promise(t=>{Ri.setTimeout(t,e)})}function G0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?jC(e,t):t}function vre(e){return e}function HD(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function GD(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ub=Symbol();function $C(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ub?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function UC(e,t){return typeof e=="function"?e(...t):!!e}function ZD(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??=t(),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var KD=class extends hd{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!ki&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},db=new KD;function Z0(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var YD=FD;function WD(){let e=[],t=0,n=u=>{u()},r=u=>{u()},a=YD;const i=u=>{t?e.push(u):a(()=>{n(u)})},l=()=>{const u=e;e=[],u.length&&a(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||l()}return d},batchCalls:u=>(...d)=>{i(()=>{u(...d)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{a=u}}}var or=WD(),QD=class extends hd{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!ki&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Rp=new QD;function XD(e){return Math.min(1e3*2**e,3e4)}function zC(e){return(e??"online")==="online"?Rp.isOnline():!0}var K0=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function FC(e){let t=!1,n=0,r;const a=Z0(),i=()=>a.status!=="pending",l=S=>{if(!i()){const w=new K0(S);g(w),e.onCancel?.(w)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>db.isFocused()&&(e.networkMode==="always"||Rp.isOnline())&&e.canRun(),m=()=>zC(e.networkMode)&&e.canRun(),p=S=>{i()||(r?.(),a.resolve(S))},g=S=>{i()||(r?.(),a.reject(S))},y=()=>new Promise(S=>{r=w=>{(i()||f())&&S(w)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),b=()=>{if(i())return;let S;const w=n===0?e.initialPromise:void 0;try{S=w??e.fn()}catch(R){S=Promise.reject(R)}Promise.resolve(S).then(p).catch(R=>{if(i())return;const E=e.retry??(ki?0:3),T=e.retryDelay??XD,O=typeof T=="function"?T(n,R):T,C=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,R);if(t||!C){g(R);return}n++,e.onFail?.(n,R),qD(O).then(()=>f()?void 0:y()).then(()=>{t?g(R):b()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r?.(),a),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?b():y().then(b),a)}}var VC=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),B0(this.gcTime)&&(this.#e=Ri.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ki?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ri.clearTimeout(this.#e),this.#e=void 0)}},JD=class extends VC{#e;#t;#n;#o;#r;#i;#s;constructor(e){super(),this.#s=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=ox(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=ox(this.options);t.data!==void 0&&(this.setState(rx(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=G0(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Lr).catch(Lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>bo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ub||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ps(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!LC(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},a=()=>{const u=$C(this.options,t),f=(()=>{const m={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#s=!1,this.options.persister?this.options.persister(u,f,this):u(f)},l=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:a};return r(u),u})();this.options.behavior?.onFetch(l,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#a({type:"fetch",meta:l.fetchOptions?.meta}),this.#r=FC({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:u=>{u instanceof K0&&u.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(u,d)=>{this.#a({type:"failed",failureCount:u,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const u=await this.#r.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#n.config.onSuccess?.(u,this),this.#n.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof K0){if(u.silent)return this.#r.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#a({type:"error",error:u}),this.#n.config.onError?.(u,this),this.#n.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...BC(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...rx(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const a=e.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),or.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function BC(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:zC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function rx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ox(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var e5=class extends hd{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#s=Z0(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#s;#a;#m;#f;#h;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ax(this.#t,this.options)?this.#d():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Y0(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Y0(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof bo(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!q0(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&sx(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||bo(this.options.enabled,this.#t)!==bo(t.enabled,this.#t)||Ps(this.options.staleTime,this.#t)!==Ps(t.staleTime,this.#t))&&this.#g();const a=this.#v();r&&(this.#t!==n||bo(this.options.enabled,this.#t)!==bo(t.enabled,this.#t)||a!==this.#l)&&this.#y(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return n5(this,n)&&(this.#o=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Lr)),t}#g(){this.#b();const e=Ps(this.options.staleTime,this.#t);if(ki||this.#o.isStale||!B0(e))return;const n=LC(this.#o.dataUpdatedAt,e)+1;this.#c=Ri.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#l=e,!(ki||bo(this.options.enabled,this.#t)===!1||!B0(this.#l)||this.#l===0)&&(this.#u=Ri.setInterval(()=>{(this.options.refetchIntervalInBackground||db.isFocused())&&this.#d()},this.#l))}#_(){this.#g(),this.#y(this.#v())}#b(){this.#c&&(Ri.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Ri.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,a=this.#o,i=this.#r,l=this.#i,d=e!==n?e.state:this.#n,{state:f}=e;let m={...f},p=!1,g;if(t._optimisticResults){const P=this.hasListeners(),$=!P&&ax(e,t),K=P&&sx(e,n,t,r);($||K)&&(m={...m,...BC(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:b,status:S}=m;g=m.data;let w=!1;if(t.placeholderData!==void 0&&g===void 0&&S==="pending"){let P;a?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(P=a.data,w=!0):P=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,P!==void 0&&(S="success",g=G0(a?.data,P,t),p=!0)}if(t.select&&g!==void 0&&!w)if(a&&g===i?.data&&t.select===this.#m)g=this.#f;else try{this.#m=t.select,g=t.select(g),g=G0(a?.data,g,t),this.#f=g,this.#a=null}catch(P){this.#a=P}this.#a&&(y=this.#a,g=this.#f,b=Date.now(),S="error");const R=m.fetchStatus==="fetching",E=S==="pending",T=S==="error",O=E&&R,C=g!==void 0,N={status:S,fetchStatus:m.fetchStatus,isPending:E,isSuccess:S==="success",isError:T,isInitialLoading:O,isLoading:O,data:g,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:R,isRefetching:R&&!E,isLoadingError:T&&!C,isPaused:m.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:T&&C,isStale:fb(e,t),refetch:this.refetch,promise:this.#s,isEnabled:bo(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const P=F=>{N.status==="error"?F.reject(N.error):N.data!==void 0&&F.resolve(N.data)},$=()=>{const F=this.#s=N.promise=Z0();P(F)},K=this.#s;switch(K.status){case"pending":e.queryHash===n.queryHash&&P(K);break;case"fulfilled":(N.status==="error"||N.data!==K.value)&&$();break;case"rejected":(N.status!=="error"||N.error!==K.reason)&&$();break}}return N}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#h=this.#t),q0(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,a=typeof r=="function"?r():r;if(a==="all"||!a&&!this.#p.size)return!0;const i=new Set(a??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#o).some(l=>{const u=l;return this.#o[u]!==e[u]&&i.has(u)})};this.#E({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#_()}#E(e){or.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function t5(e,t){return bo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ax(e,t){return t5(e,t)||e.state.data!==void 0&&Y0(e,t,t.refetchOnMount)}function Y0(e,t,n){if(bo(t.enabled,e)!==!1&&Ps(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&fb(e,t)}return!1}function sx(e,t,n,r){return(e!==t||bo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&fb(e,n)}function fb(e,t){return bo(t.enabled,e)!==!1&&e.isStaleByTime(Ps(t.staleTime,e))}function n5(e,t){return!q0(e.getCurrentResult(),t)}function ix(e){return{onFetch:(t,n)=>{const r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let m=!1;const p=b=>{ZD(b,()=>t.signal,()=>m=!0)},g=$C(t.options,t.fetchOptions),y=async(b,S,w)=>{if(m)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const E=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:S,direction:w?"backward":"forward",meta:t.options.meta};return p(I),I})(),T=await g(E),{maxPages:O}=t.options,C=w?GD:HD;return{pages:C(b.pages,T,O),pageParams:C(b.pageParams,S,O)}};if(a&&i.length){const b=a==="backward",S=b?qC:W0,w={pages:i,pageParams:l},R=S(r,w);u=await y(w,R,b)}else{const b=e??i.length;do{const S=d===0?l[0]??r.initialPageParam:W0(r,u);if(d>0&&S==null)break;u=await y(u,S),d++}while(d<b)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function W0(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function qC(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function yre(e,t){return t?W0(e,t)!=null:!1}function _re(e,t){return!t||!e.getPreviousPageParam?!1:qC(e,t)!=null}var r5=class extends VC{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||o5(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=FC({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,l)=>{this.#r({type:"failed",failureCount:i,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",a=!this.#o.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:a}),await this.#n.config.onMutate?.(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:a})}const i=await this.#o.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#r({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(i,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#r({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),or.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function o5(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var a5=class extends hd{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new r5({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Yf(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Yf(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Yf(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(a=>a.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Yf(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){or.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>ex(t,n))}findAll(e={}){return this.getAll().filter(t=>ex(e,t))}notify(e){or.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return or.batch(()=>Promise.all(e.map(t=>t.continue().catch(Lr))))}};function Yf(e){return e.options.scope?.id}var s5=class extends hd{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,a=t.queryHash??cb(r,t);let i=this.get(a);return i||(i=new JD({client:e,queryKey:r,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){or.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>JR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>JR(e,n)):t}notify(e){or.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){or.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){or.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},i5=class{#e;#t;#n;#o;#r;#i;#s;#a;constructor(e={}){this.#e=e.queryCache||new s5,this.#t=e.mutationCache||new a5,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=db.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Rp.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ps(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,l=VD(t,i);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return or.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;or.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return or.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=or.batch(()=>this.#e.findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Lr).catch(Lr)}invalidateQueries(e,t={}){return or.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=or.batch(()=>this.#e.findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(Lr)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Lr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Ps(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Lr).catch(Lr)}fetchInfiniteQuery(e){return e.behavior=ix(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Lr).catch(Lr)}ensureInfiniteQueryData(e){return e.behavior=ix(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Rp.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(Zu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{Ku(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Zu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Ku(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=cb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ub&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},HC=A.createContext(void 0),l5=e=>{const t=A.useContext(HC);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},c5=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(HC.Provider,{value:e,children:t})),GC=A.createContext(!1),u5=()=>A.useContext(GC);GC.Provider;function d5(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var f5=A.createContext(d5()),h5=()=>A.useContext(f5),p5=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?UC(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},m5=e=>{A.useEffect(()=>{e.clearReset()},[e])},g5=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||UC(n,[e.error,r])),v5=(e,t)=>t.state.data===void 0,y5=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},_5=(e,t)=>e.isLoading&&e.isFetching&&!t,b5=(e,t)=>e?.suspense&&t.isPending,lx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function w5(e,t,n){const r=u5(),a=h5(),i=l5(n),l=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const u=i.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",y5(l),p5(l,a,u),m5(a);const d=!i.getQueryCache().get(l.queryHash),[f]=A.useState(()=>new t(i,l)),m=f.getOptimisticResult(l),p=!r&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(g=>{const y=p?f.subscribe(or.batchCalls(g)):Lr;return f.updateResult(),y},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),A.useEffect(()=>{f.setOptions(l)},[l,f]),b5(l,m))throw lx(l,f,a);if(g5({result:m,errorResetBoundary:a,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw m.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(l,m),l.experimental_prefetchInRender&&!ki&&_5(m,r)&&(d?lx(l,f,a):u?.promise)?.catch(Lr).finally(()=>{f.updateResult()}),l.notifyOnChangeProps?m:f.trackResult(m)}function ZC(e,t){return w5({...e,enabled:!0,suspense:!0,throwOnError:v5,placeholderData:void 0},e5,t)}const KC={publicConfig:()=>["publicConfig"],authConfig:()=>["authConfig"],session:()=>["session"],threads:e=>["threads",e],gatewayThreads:(e,t)=>["threads",e,"gateway",t],thread:(e,t)=>["thread",e,t],threadMessages:(e,t)=>["thread-messages",e,t],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],connections:e=>[e,"connections"],connectionsByBinding:(e,t)=>[e,"connections",`binding:${t}`],connection:(e,t)=>[e,"connection",t],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],modelsList:e=>["models-list",e],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collection:(e,t,n)=>[e,t,"collection",n],collectionItem:(e,t,n,r)=>[e,t,"collection",n,r],collectionList:(e,t,n,r)=>[e,t,"collection",n,"list",r],collectionListInfinite:(e,t,n,r)=>[e,t,"collection",n,"list-infinite",r],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],gatewayPrompts:e=>["gateway",e,"prompts"],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"],user:e=>["user",e]},YC=A.createContext(void 0);async function S5(){const e=await fetch("/api/auth/custom/config");if(!e.ok)throw new Error("Failed to load auth configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load auth configuration");return t.config}function E5(e){const t=pc.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:KC.authConfig(),queryFn:S5,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=ZC(r);let i;return t[1]!==a||t[2]!==n?(i=x.jsx(YC.Provider,{value:a,children:n}),t[1]=a,t[2]=n,t[3]=i):i=t[3],i}function bre(){const e=A.useContext(YC);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const Q0=new WeakMap,R5=new WeakMap,xp={current:[]};let Sy=!1,Lu=0;const Ou=new Set,Wf=new Map;function WC(e){for(const t of e){if(xp.current.includes(t))continue;xp.current.push(t),t.recompute();const n=R5.get(t);if(n)for(const r of n){const a=Q0.get(r);a?.length&&WC(a)}}}function x5(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function T5(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function QC(e){if(Lu>0&&!Wf.has(e)&&Wf.set(e,e.prevState),Ou.add(e),!(Lu>0)&&!Sy)try{for(Sy=!0;Ou.size>0;){const t=Array.from(Ou);Ou.clear();for(const n of t){const r=Wf.get(n)??n.prevState;n.prevState=r,x5(n)}for(const n of t){const r=Q0.get(n);r&&(xp.current.push(n),WC(r))}for(const n of t){const r=Q0.get(n);if(r)for(const a of r)T5(a)}}}finally{Sy=!1,xp.current=[],Wf.clear()}}function ju(e){Lu++;try{e()}finally{if(Lu--,Lu===0){const t=Ou.values().next().value;t&&QC(t)}}}function O5(e){return typeof e=="function"}class C5{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var a,i;this.listeners.add(r);const l=(i=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:i.call(a,r,this);return()=>{this.listeners.delete(r),l?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,a;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):O5(t)?this.state=t(this.prevState):this.state=t,(a=(r=this.options)==null?void 0:r.onUpdate)==null||a.call(r),QC(this)}}const Ds="__TSR_index",cx="popstate",ux="beforeunload";function A5(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:l}))},a=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},i=async({task:l,navigateOpts:u,...d})=>{if(u?.ignoreBlocker??!1){l();return}const m=e.getBlockers?.()??[],p=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&m.length&&p)for(const g of m){const y=Tp(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:y,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,u,d)=>{const f=t.state[Ds];u=dx(f+1,u),i({task:()=>{e.pushState(l,u),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:u})},replace:(l,u,d)=>{const f=t.state[Ds];u=dx(f,u),i({task:()=>{e.replaceState(l,u),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:u})},go:(l,u)=>{i({task:()=>{e.go(l),a({type:"GO",index:l})},navigateOpts:u,type:"GO"})},back:l=>{i({task:()=>{e.back(l?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{i({task:()=>{e.forward(l?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Ds]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function dx(e,t){t||(t={});const n=hb();return{...t,key:n,__TSR_key:n,[Ds]:e}}function I5(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let a=[];const i=()=>a,l=P=>a=P,u=(P=>P),d=(()=>Tp(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const P=hb();t.history.replaceState({[Ds]:0,key:P,__TSR_key:P},"")}let f=d(),m,p=!1,g=!1,y=!1,b=!1;const S=()=>f;let w,R;const E=()=>{w&&(N._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),N._ignoreSubscribers=!1,w=void 0,R=void 0,m=void 0)},T=(P,$,K)=>{const F=u($);R||(m=f),f=Tp($,K),w={href:F,state:K,isPush:w?.isPush||P==="push"},R||(R=Promise.resolve().then(()=>E()))},O=P=>{f=d(),N.notify({type:P})},C=async()=>{if(g){g=!1;return}const P=d(),$=P.state[Ds]-f.state[Ds],K=$===1,F=$===-1,G=!K&&!F||p;p=!1;const U=G?"GO":F?"BACK":"FORWARD",J=G?{type:"GO",index:$}:{type:F?"BACK":"FORWARD"};if(y)y=!1;else{const le=i();if(typeof document<"u"&&le.length){for(const B of le)if(await B.blockerFn({currentLocation:f,nextLocation:P,action:U})){g=!0,t.history.go(1),N.notify(J);return}}}f=d(),N.notify(J)},I=P=>{if(b){b=!1;return}let $=!1;const K=i();if(typeof document<"u"&&K.length)for(const F of K){const G=F.enableBeforeUnload??!0;if(G===!0){$=!0;break}if(typeof G=="function"&&G()===!0){$=!0;break}}if($)return P.preventDefault(),P.returnValue=""},N=A5({getLocation:S,getLength:()=>t.history.length,pushState:(P,$)=>T("push",P,$),replaceState:(P,$)=>T("replace",P,$),back:P=>(P&&(y=!0),b=!0,t.history.back()),forward:P=>{P&&(y=!0),b=!0,t.history.forward()},go:P=>{p=!0,t.history.go(P)},createHref:P=>u(P),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(ux,I,{capture:!0}),t.removeEventListener(cx,C)},onBlocked:()=>{m&&f!==m&&(f=m)},getBlockers:i,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(ux,I,{capture:!0}),t.addEventListener(cx,C),t.history.pushState=function(...P){const $=n.apply(t.history,P);return N._ignoreSubscribers||O("PUSH"),$},t.history.replaceState=function(...P){const $=r.apply(t.history,P);return N._ignoreSubscribers||O("REPLACE"),$},N}function Tp(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),a=hb();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[Ds]:0,key:a,__TSR_key:a}}}function hb(){return(Math.random()+1).toString(36).substring(7)}function Op(e){return e[e.length-1]}function N5(e){return typeof e=="function"}function Ci(e,t){return N5(e)?e(t):e}const k5=Object.prototype.hasOwnProperty;function _o(e,t){if(e===t)return e;const n=t,r=px(e)&&px(n);if(!r&&!(Cp(e)&&Cp(n)))return n;const a=r?e:fx(e);if(!a)return n;const i=r?n:fx(n);if(!i)return n;const l=a.length,u=i.length,d=r?new Array(u):{};let f=0;for(let m=0;m<u;m++){const p=r?m:i[m],g=e[p],y=n[p];if(g===y){d[p]=g,(r?m<l:k5.call(e,p))&&f++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){d[p]=y;continue}const b=_o(g,y);d[p]=b,b===g&&f++}return l===u&&f===l?e:d}function fx(e){const t=[],n=Object.getOwnPropertyNames(e);for(const a of n){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}const r=Object.getOwnPropertySymbols(e);for(const a of r){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}return t}function Cp(e){if(!hx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!hx(n)||!n.hasOwnProperty("isPrototypeOf"))}function hx(e){return Object.prototype.toString.call(e)==="[object Object]"}function px(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ai(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,a=e.length;r<a;r++)if(!Ai(e[r],t[r],n))return!1;return!0}if(Cp(e)&&Cp(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!Ai(e[l],t[l],n))return!1;return!0}let a=0;if(!r)a=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&a++;let i=0;for(const l in t)if((!r||t[l]!==void 0)&&(i++,i>a||!Ai(e[l],t[l],n)))return!1;return a===i}return!1}function nc(e){let t,n;const r=new Promise((a,i)=>{t=a,n=i});return r.status="pending",r.resolve=a=>{r.status="resolved",r.value=a,t(a),e?.(a)},r.reject=a=>{r.status="rejected",n(a)},r}function M5(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Ls(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function mx(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function gx(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,a="",i;for(;(i=n.exec(e))!==null;)a+=mx(e.slice(r,i.index))+i[0],r=n.lastIndex;return a+mx(r?e.slice(r):e)}var P5="Invariant failed";function Fa(e,t){if(!e)throw new Error(P5)}function Ap(e){const t=new Map;let n,r;const a=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,n=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const l=t.get(i);if(l)return a(l),l.value},set(i,l){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const u=t.get(i);if(u)u.value=l,a(u);else{const d={key:i,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(i,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const rc=0,Mi=1,Pi=2,Yu=3,D5=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,L5=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,j5=/^([^{]*)\{\$\}([^}]*)$/;function pb(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),a=r===-1?e.length:r,i=e.substring(t,a);if(!i||!i.includes("$"))return n[0]=rc,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n;if(i==="$"){const f=e.length;return n[0]=Pi,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(i.charCodeAt(0)===36)return n[0]=Mi,n[1]=t,n[2]=t+1,n[3]=a,n[4]=a,n[5]=a,n;const l=i.match(j5);if(l){const m=l[1].length;return n[0]=Pi,n[1]=t+m,n[2]=t+m+1,n[3]=t+m+2,n[4]=t+m+3,n[5]=e.length,n}const u=i.match(L5);if(u){const f=u[1],m=u[2],p=u[3],g=f.length;return n[0]=Yu,n[1]=t+g,n[2]=t+g+3,n[3]=t+g+3+m.length,n[4]=a-p.length,n[5]=a,n}const d=i.match(D5);if(d){const f=d[1],m=d[2],p=d[3],g=f.length;return n[0]=Mi,n[1]=t+g,n[2]=t+g+2,n[3]=t+g+2+m.length,n[4]=a-p.length,n[5]=a,n}return n[0]=rc,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}function wm(e,t,n,r,a,i,l){l?.(n);let u=r;{const d=n.fullPath??n.from,f=d.length,m=n.options?.caseSensitive??e;for(;u<f;){const p=pb(d,u,t);let g;const y=u,b=p[5];switch(u=b+1,i++,p[0]){case rc:{const w=d.substring(p[2],p[3]);if(m){const R=a.static?.get(w);if(R)g=R;else{a.static??=new Map;const E=Wu(n.fullPath??n.from);E.parent=a,E.depth=i,g=E,a.static.set(w,E)}}else{const R=w.toLowerCase(),E=a.staticInsensitive?.get(R);if(E)g=E;else{a.staticInsensitive??=new Map;const T=Wu(n.fullPath??n.from);T.parent=a,T.depth=i,g=T,a.staticInsensitive.set(R,T)}}break}case Mi:{const w=d.substring(y,p[1]),R=d.substring(p[4],b),E=m&&!!(w||R),T=w?E?w:w.toLowerCase():void 0,O=R?E?R:R.toLowerCase():void 0,C=a.dynamic?.find(I=>I.caseSensitive===E&&I.prefix===T&&I.suffix===O);if(C)g=C;else{const I=Ry(Mi,n.fullPath??n.from,E,T,O);g=I,I.depth=i,I.parent=a,a.dynamic??=[],a.dynamic.push(I)}break}case Yu:{const w=d.substring(y,p[1]),R=d.substring(p[4],b),E=m&&!!(w||R),T=w?E?w:w.toLowerCase():void 0,O=R?E?R:R.toLowerCase():void 0,C=a.optional?.find(I=>I.caseSensitive===E&&I.prefix===T&&I.suffix===O);if(C)g=C;else{const I=Ry(Yu,n.fullPath??n.from,E,T,O);g=I,I.parent=a,I.depth=i,a.optional??=[],a.optional.push(I)}break}case Pi:{const w=d.substring(y,p[1]),R=d.substring(p[4],b),E=m&&!!(w||R),T=w?E?w:w.toLowerCase():void 0,O=R?E?R:R.toLowerCase():void 0,C=Ry(Pi,n.fullPath??n.from,E,T,O);g=C,C.parent=a,C.depth=i,a.wildcard??=[],a.wildcard.push(C)}}a=g}if((n.path||!n.children)&&!n.isRoot){const p=d.endsWith("/");p||(a.notFound=n),(!a.route||!a.isIndex&&p)&&(a.route=n),a.isIndex||=p}}if(n.children)for(const d of n.children)wm(e,t,d,u,a,i,l)}function Ey(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Si(e){if(e.static)for(const t of e.static.values())Si(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Si(t);if(e.dynamic?.length){e.dynamic.sort(Ey);for(const t of e.dynamic)Si(t)}if(e.optional?.length){e.optional.sort(Ey);for(const t of e.optional)Si(t)}if(e.wildcard?.length){e.wildcard.sort(Ey);for(const t of e.wildcard)Si(t)}}function Wu(e){return{kind:rc,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function Ry(e,t,n,r,a){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:r,suffix:a}}function $5(e,t){const n=Wu("/"),r=new Uint16Array(6);for(const a of e)wm(!1,r,a,1,n,0);Si(n),t.masksTree=n,t.flatCache=Ap(1e3)}function U5(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=mb(e,t.masksTree);return t.flatCache.set(e,r),r}function z5(e,t,n,r,a){e||="/",r||="/";const i=t?`case\0${e}`:e;let l=a.singleCache.get(i);if(!l){l=Wu("/");const u=new Uint16Array(6);wm(t,u,{from:e},1,l,0),a.singleCache.set(i,l)}return mb(r,l,n)}function F5(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,a=t.matchCache.get(r);if(a!==void 0)return a;e||="/";const i=mb(e,t.segmentTree,n);return i&&(i.branch=H5(i.route)),t.matchCache.set(r,i),i}function V5(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function B5(e,t=!1,n){const r=Wu(e.fullPath),a=new Uint16Array(6),i={},l={};let u=0;return wm(t,a,e,1,r,0,f=>{if(n?.(f,u),Fa(!(f.id in i),`Duplicate routes found with id: ${String(f.id)}`),i[f.id]=f,u!==0&&f.path){const m=V5(f.fullPath);(!l[m]||f.fullPath.endsWith("/"))&&(l[m]=f)}u++}),Si(r),{processedTree:{segmentTree:r,singleCache:Ap(1e3),matchCache:Ap(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:l}}function mb(e,t,n=!1){const r=e.split("/"),a=Z5(e,r,t,n);if(!a)return null;const i=q5(e,r,a),l="**"in a;return l&&(i["**"]=a["**"]),{route:l?a.node.notFound??a.node.route:a.node.route,params:i}}function q5(e,t,n){const r=G5(n.node);let a=null;const i={};for(let l=0,u=0,d=0;u<r.length;l++,u++,d++){const f=r[u],m=t[l],p=d;if(m&&(d+=m.length),f.kind===Mi){a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0;if(g.charCodeAt(y)===123){const S=f.suffix?.length??0,w=g.substring(y+2,g.length-S-1),R=m.substring(y,m.length-S);i[w]=decodeURIComponent(R)}else{const S=g.substring(1);i[S]=decodeURIComponent(m)}}else if(f.kind===Yu){if(n.skipped&1<<u){l--;continue}a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0,b=f.suffix?.length??0,S=g.substring(y+3,g.length-b-1),w=f.suffix||f.prefix?m.substring(y,m.length-b):m;w&&(i[S]=decodeURIComponent(w))}else if(f.kind===Pi){const g=f,y=e.substring(p+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),b=decodeURIComponent(y);i["*"]=b,i._splat=b;break}}return i}function H5(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function G5(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Z5(e,t,n,r){const a=!Op(t),i=a&&e!=="/",l=t.length-(a?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let d=null,f=null,m=null;for(;u.length;){const p=u.pop();let{node:g,index:y,skipped:b,depth:S,statics:w,dynamics:R,optionals:E}=p;r&&g.notFound&&Qf(f,p)&&(f=p);const T=y===l;if(T){if(g.route&&(!i||g.isIndex)&&(Qf(m,p)&&(m=p),w===l&&g.isIndex))return m;if(!g.optional&&!g.wildcard)continue}const O=T?void 0:t[y];let C;if(g.wildcard&&Qf(d,p))for(const I of g.wildcard){const{prefix:N,suffix:P}=I;if(!(N&&(T||!(I.caseSensitive?O:C??=O.toLowerCase()).startsWith(N)))){if(P){if(T)continue;const $=t.slice(y).join("/").slice(-P.length);if((I.caseSensitive?$:$.toLowerCase())!==P)continue}d={node:I,index:y,skipped:b,depth:S,statics:w,dynamics:R,optionals:E};break}}if(g.optional){const I=b|1<<S,N=S+1;for(let P=g.optional.length-1;P>=0;P--){const $=g.optional[P];u.push({node:$,index:y,skipped:I,depth:N,statics:w,dynamics:R,optionals:E})}if(!T)for(let P=g.optional.length-1;P>=0;P--){const $=g.optional[P],{prefix:K,suffix:F}=$;if(K||F){const G=$.caseSensitive?O:C??=O.toLowerCase();if(K&&!G.startsWith(K)||F&&!G.endsWith(F))continue}u.push({node:$,index:y+1,skipped:b,depth:N,statics:w,dynamics:R,optionals:E+1})}}if(!T&&g.dynamic&&O)for(let I=g.dynamic.length-1;I>=0;I--){const N=g.dynamic[I],{prefix:P,suffix:$}=N;if(P||$){const K=N.caseSensitive?O:C??=O.toLowerCase();if(P&&!K.startsWith(P)||$&&!K.endsWith($))continue}u.push({node:N,index:y+1,skipped:b,depth:S+1,statics:w,dynamics:R+1,optionals:E})}if(!T&&g.staticInsensitive){const I=g.staticInsensitive.get(C??=O.toLowerCase());I&&u.push({node:I,index:y+1,skipped:b,depth:S+1,statics:w+1,dynamics:R,optionals:E})}if(!T&&g.static){const I=g.static.get(O);I&&u.push({node:I,index:y+1,skipped:b,depth:S+1,statics:w+1,dynamics:R,optionals:E})}}if(m&&d)return Qf(d,m)?m:d;if(m)return m;if(d)return d;if(r&&f){let p=f.index;for(let y=0;y<f.index;y++)p+=t[y].length;const g=p===e.length?"/":e.slice(p);return{node:f.node,skipped:f.skipped,"**":decodeURIComponent(g)}}return null}function Qf(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&(t.node.isIndex>e.node.isIndex||t.node.isIndex===e.node.isIndex&&t.depth>e.depth))):!0}function dp(e){return gb(e.filter(t=>t!==void 0).join("/"))}function gb(e){return e.replace(/\/{2,}/g,"/")}function XC(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ii(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function fp(e){return Ii(XC(e))}function Ip(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function K5(e,t,n){return Ip(e,n)===Ip(t,n)}function Y5({base:e,to:t,trailingSlash:n="never",cache:r}){const a=t.startsWith("/"),i=!a&&t===".";let l;if(r){l=a?t:i?e:e+"\0"+t;const p=r.get(l);if(p)return p}let u;if(i)u=e.split("/");else if(a)u=t.split("/");else{for(u=e.split("/");u.length>1&&Op(u)==="";)u.pop();const p=t.split("/");for(let g=0,y=p.length;g<y;g++){const b=p[g];b===""?g?g===y-1&&u.push(b):u=[b]:b===".."?u.pop():b==="."||u.push(b)}}u.length>1&&(Op(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));let d,f="";for(let p=0;p<u.length;p++){p>0&&(f+="/");const g=u[p];if(!g)continue;d=pb(g,0,d);const y=d[0];if(y===rc){f+=g;continue}const b=d[5],S=g.substring(0,d[1]),w=g.substring(d[4],b),R=g.substring(d[2],d[3]);y===Mi?f+=S||w?`${S}{$${R}}${w}`:`$${R}`:y===Pi?f+=S||w?`${S}{$}${w}`:"$":f+=`${S}{-$${R}}${w}`}f=gb(f);const m=f||"/";return l&&r&&r.set(l,m),m}function xy(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):W5(r,n)}function Ty({path:e,params:t,decodeCharMap:n}){let r=!1;const a={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:a,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:a,isMissingParams:r};const i=e.length;let l=0,u,d="";for(;l<i;){const m=l;u=pb(e,m,u);const p=u[5];if(l=p+1,m===p)continue;const g=u[0];if(g===rc){d+="/"+e.substring(m,p);continue}if(g===Pi){const y=t._splat;a._splat=y,a["*"]=y;const b=e.substring(m,u[1]),S=e.substring(u[4],p);if(!y){r=!0,(b||S)&&(d+="/"+b+S);continue}const w=xy("_splat",t,n);d+="/"+b+w+S;continue}if(g===Mi){const y=e.substring(u[2],u[3]);!r&&!(y in t)&&(r=!0),a[y]=t[y];const b=e.substring(m,u[1]),S=e.substring(u[4],p),w=xy(y,t,n)??"undefined";d+="/"+b+w+S;continue}if(g===Yu){const y=e.substring(u[2],u[3]),b=t[y];if(b==null)continue;a[y]=b;const S=e.substring(m,u[1]),w=e.substring(u[4],p),R=xy(y,t,n)??"";d+="/"+S+R+w;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:a,interpolatedPath:d||"/",isMissingParams:r}}function W5(e,t){let n=encodeURIComponent(e);if(t)for(const[r,a]of t)n=n.replaceAll(r,a);return n}function So(e){return!!e?.isNotFound}function Q5(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Np="tsr-scroll-restoration-v1_3",X5=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function J5(){const e=Q5();if(!e)return null;const t=e.getItem(Np);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Ci(r,n)||n,e.setItem(Np,JSON.stringify(n)))}}const Xf=J5(),X0=e=>e.state.__TSR_key||e.href;function e6(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let kp=!1;function JC({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:a,location:i}){let l;try{l=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const u=t||window.history.state?.__TSR_key,d=l[u];kp=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const p in d){const g=d[p];if(p==="window")window.scrollTo({top:g.scrollY,left:g.scrollX,behavior:n});else if(p){const y=document.querySelector(p);y&&(y.scrollLeft=g.scrollX,y.scrollTop=g.scrollY)}}break e}const f=(i??window.location).hash.split("#",2)[1];if(f){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const g=document.getElementById(f);g&&g.scrollIntoView(p)}break e}const m={top:0,left:0,behavior:n};if(window.scrollTo(m),a)for(const p of a){if(p==="window")continue;const g=typeof p=="function"?p():document.querySelector(p);g&&g.scrollTo(m)}}kp=!1}function t6(e,t){if(!Xf&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Xf))return;e.isScrollRestorationSetup=!0,kp=!1;const r=e.options.getScrollRestorationKey||X0;window.history.scrollRestoration="manual";const a=i=>{if(kp||!e.isScrollRestoring)return;let l="";if(i.target===document||i.target===window)l="window";else{const d=i.target.getAttribute("data-scroll-restoration-id");d?l=`[data-scroll-restoration-id="${d}"]`:l=e6(i.target)}const u=r(e.state.location);Xf.set(d=>{const f=d[u]||={},m=f[l]||={};if(l==="window")m.scrollX=window.scrollX||0,m.scrollY=window.scrollY||0;else if(l){const p=document.querySelector(l);p&&(m.scrollX=p.scrollLeft||0,m.scrollY=p.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",X5(a,100),!0),e.subscribe("onRendered",i=>{const l=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(JC({storageKey:Np,key:l,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Xf.set(u=>(u[l]||={},u)))})}function n6(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function r6(e,t=String){const n=new URLSearchParams;for(const r in e){const a=e[r];a!==void 0&&n.set(r,t(a))}return n.toString()}function Oy(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function o6(e){const t=new URLSearchParams(e),n={};for(const[r,a]of t.entries()){const i=n[r];i==null?n[r]=Oy(a):Array.isArray(i)?i.push(Oy(a)):n[r]=[i,Oy(a)]}return n}const a6=i6(JSON.parse),s6=l6(JSON.stringify,JSON.parse);function i6(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=o6(t);for(const r in n){const a=n[r];if(typeof a=="string")try{n[r]=e(a)}catch{}}return n}}function l6(e,t){const n=typeof t=="function";function r(a){if(typeof a=="object"&&a!==null)try{return e(a)}catch{}else if(n&&typeof a=="string")try{return t(a),e(a)}catch{}return a}return a=>{const i=r6(a,r);return i?`?${i}`:""}}const Wr="__root__";function c6(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Vo(e){return e instanceof Response&&!!e.options}const hp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Sm=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),eA=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Fa(n.options.notFoundComponent);const r=e.matches.find(a=>a.routeId===n.id);Fa(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,a=>({...a,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,eA(e,t))},ks=(e,t,n)=>{if(!(!Vo(n)&&!So(n))){if(Vo(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=Vo(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:r,isFetching:!1,error:n})),So(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Vo(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(eA(e,n),n)}},tA=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},hu=(e,t,n,r)=>{const{id:a,routeId:i}=e.matches[t],l=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,ks(e,e.router.getMatch(a),n);try{l.options.onError?.(n)}catch(u){n=u,ks(e,e.router.getMatch(a),n)}e.updateMatch(a,u=>(u._nonReactive.beforeLoadPromise?.resolve(),u._nonReactive.beforeLoadPromise=void 0,u._nonReactive.loadPromise?.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},u6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=e.matches[n-1]?.id,l=i?e.router.getMatch(i):void 0;if(e.router.isShell()){a.ssr=r.id===Wr;return}if(l?.ssr===!1){a.ssr=!1;return}const u=y=>y===!0&&l?.ssr==="data-only"?"data-only":y,d=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){a.ssr=u(d);return}if(typeof r.options.ssr!="function"){a.ssr=u(r.options.ssr);return}const{search:f,params:m}=a,p={search:Jf(f,a.searchError),params:Jf(m,a.paramsError),location:e.location,matches:e.matches.map(y=>({index:y.index,pathname:y.pathname,fullPath:y.fullPath,staticData:y.staticData,id:y.id,routeId:y.routeId,search:Jf(y.search,y.searchError),params:Jf(y.params,y.paramsError),ssr:y.ssr}))},g=r.options.ssr(p);if(Ls(g))return g.then(y=>{a.ssr=u(y??d)});a.ssr=u(g??d)},nA=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const a=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Sm(e,t)&&(n.options.loader||n.options.beforeLoad||aA(n))&&typeof a=="number"&&a!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const l=setTimeout(()=>{hp(e)},a);r._nonReactive.pendingTimeout=l}},d6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;nA(e,t,n,r);const a=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&ks(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(a):a()},f6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=a._nonReactive.loadPromise;a._nonReactive.loadPromise=nc(()=>{i?.resolve()});const{paramsError:l,searchError:u}=a;l&&hu(e,n,l,"PARSE_PARAMS"),u&&hu(e,n,u,"VALIDATE_SEARCH"),nA(e,t,r,a);const d=new AbortController,f=e.matches[n-1]?.id,g={...(f?e.router.getMatch(f):void 0)?.context??e.router.options.context??void 0,...a.__routeContext};let y=!1;const b=()=>{y||(y=!0,e.updateMatch(t,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:d,context:g})))},S=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,N=>({...N,isFetching:!1}))};if(!r.options.beforeLoad){ju(()=>{b(),S()});return}a._nonReactive.beforeLoadPromise=nc();const{search:w,params:R,cause:E}=a,T=Sm(e,t),O={search:w,abortController:d,params:R,preload:T,context:g,location:e.location,navigate:N=>e.router.navigate({...N,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:T?"preload":E,matches:e.matches,...e.router.options.additionalContext},C=N=>{if(N===void 0){ju(()=>{b(),S()});return}(Vo(N)||So(N))&&(b(),hu(e,n,N,"BEFORE_LOAD")),ju(()=>{b(),e.updateMatch(t,P=>({...P,__beforeLoadContext:N,context:{...P.context,...N}})),S()})};let I;try{if(I=r.options.beforeLoad(O),Ls(I))return b(),I.catch(N=>{hu(e,n,N,"BEFORE_LOAD")}).then(C)}catch(N){b(),hu(e,n,N,"BEFORE_LOAD")}C(I)},h6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],i=()=>{if(e.router.isServer){const d=u6(e,n,t,a);if(Ls(d))return d.then(u)}return u()},l=()=>f6(e,n,t,a),u=()=>{if(tA(e,n))return;const d=d6(e,n,a);return Ls(d)?d.then(l):l()};return i()},$u=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const a={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(a),n.options.scripts?.(a),n.options.headers?.(a)]).then(([i,l,u])=>{const d=i?.meta,f=i?.links,m=i?.scripts,p=i?.styles;return{meta:d,links:f,headScripts:m,headers:u,scripts:l,styles:p}})},rA=(e,t,n,r)=>{const a=e.matchPromises[n-1],{params:i,loaderDeps:l,abortController:u,cause:d}=e.router.getMatch(t);let f=e.router.options.context??{};for(let p=0;p<=n;p++){const g=e.matches[p];if(!g)continue;const y=e.router.getMatch(g.id);y&&(f={...f,...y.__routeContext??{},...y.__beforeLoadContext??{}})}const m=Sm(e,t);return{params:i,deps:l,preload:!!m,parentMatchPromise:a,abortController:u,context:f,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:m?"preload":d,route:r,...e.router.options.additionalContext}},vx=async(e,t,n,r)=>{try{const a=e.router.getMatch(t);try{(!e.router.isServer||a.ssr===!0)&&oA(r);const i=r.options.loader?.(rA(e,t,n,r)),l=r.options.loader&&Ls(i);if((l||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(t,p=>({...p,isFetching:"loader"})),r.options.loader){const p=l?await i:i;ks(e,e.router.getMatch(t),p),p!==void 0&&e.updateMatch(t,g=>({...g,loaderData:p}))}r._lazyPromise&&await r._lazyPromise;const d=$u(e,t,r),f=d?await d:void 0,m=a._nonReactive.minPendingPromise;m&&await m,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,p=>({...p,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(i){let l=i;const u=a._nonReactive.minPendingPromise;u&&await u,So(i)&&await r.options.notFoundComponent?.preload?.(),ks(e,e.router.getMatch(t),i);try{r.options.onError?.(i)}catch(m){l=m,ks(e,e.router.getMatch(t),m)}const d=$u(e,t,r),f=d?await d:void 0;e.updateMatch(t,m=>({...m,error:l,status:"error",isFetching:!1,...f}))}}catch(a){const i=e.router.getMatch(t);if(i){const l=$u(e,t,r);if(l){const u=await l;e.updateMatch(t,d=>({...d,...u}))}i._nonReactive.loaderPromise=void 0}ks(e,i,a)}},p6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let a=!1,i=!1;const l=e.router.looseRoutesById[r];if(tA(e,n)){if(e.router.isServer){const f=$u(e,n,l);if(f){const m=await f;e.updateMatch(n,p=>({...p,...m}))}return e.router.getMatch(n)}}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(n),p=m._nonReactive.error||m.error;p&&ks(e,m,p)}else{const m=Date.now()-f.updatedAt,p=Sm(e,n),g=p?l.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:l.options.staleTime??e.router.options.defaultStaleTime??0,y=l.options.shouldReload,b=typeof y=="function"?y(rA(e,n,t,l)):y,S=!!p&&!e.router.state.matches.some(T=>T.id===n),w=e.router.getMatch(n);w._nonReactive.loaderPromise=nc(),S!==w.preload&&e.updateMatch(n,T=>({...T,preload:S}));const{status:R,invalid:E}=w;if(a=R==="success"&&(E||(b??m>g)),!(p&&l.options.preload===!1))if(a&&!e.sync)i=!0,(async()=>{try{await vx(e,n,t,l);const T=e.router.getMatch(n);T._nonReactive.loaderPromise?.resolve(),T._nonReactive.loadPromise?.resolve(),T._nonReactive.loaderPromise=void 0}catch(T){Vo(T)&&await e.router.navigate(T.options)}})();else if(R!=="success"||a&&e.sync)await vx(e,n,t,l);else{const T=$u(e,n,l);if(T){const O=await T;e.updateMatch(n,C=>({...C,...O}))}}}}const u=e.router.getMatch(n);i||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve()),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,i||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;const d=i?u.isFetching:!1;return d!==u.isFetching||u.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:d,invalid:!1})),e.router.getMatch(n)):u};async function yx(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&hp(t);try{for(let a=0;a<t.matches.length;a++){const i=h6(t,a);Ls(i)&&await i}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(p6(t,a));await Promise.all(t.matchPromises);const r=hp(t);Ls(r)&&await r}catch(n){if(So(n)&&!t.preload){const r=hp(t);throw Ls(r)&&await r,n}if(Vo(n))throw n}return t.matches}async function oA(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of sA){const a=e.options[r]?.preload;a&&n.push(a())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Jf(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function aA(e){for(const t of sA)if(e.options[t]?.preload)return!0;return!1}const sA=["component","errorComponent","pendingComponent","notFoundComponent"];function m6(e){return{input:({url:t})=>{for(const n of e)t=iA(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=lA(e[n],t);return t}}}function g6(e){const t=fp(e.basepath),n=`/${t}`,r=`${n}/`,a=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const u=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return u===a?l.pathname="/":u.startsWith(i)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=dp(["/",t,l.pathname]),l)}}function iA(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function lA(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Ni(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,a=t?.href!==n.href,i=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:a,hashChanged:i}}class v6{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,a=this.basepath??r?.basepath??"/",i=this.basepath===void 0,l=r?.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(g=>[encodeURIComponent(g),g])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=I5())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new C5(_6(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),t6(this));let u=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(i||a!==d||l!==f){this.basepath=d;const g=[];fp(d)!==""&&g.push(g6({basepath:d})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:m6(g),this.history&&this.updateLatestLocation(),u=!0}u&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,processedTree:a}=B5(this.routeTree,this.options.caseSensitive,(l,u)=>{l.init({originalIndex:u})});this.options.routeMasks&&$5(this.options.routeMasks,a),this.routesById=n,this.routesByPath=r,this.processedTree=a;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)},this.subscribe=(n,r)=>{const a={eventType:n,fn:r};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const a=({href:d,state:f})=>{const m=new URL(d,this.origin),p=iA(this.rewrite,m),g=this.options.parseSearch(p.search),y=this.options.stringifySearch(g);p.search=y;const b=p.href.replace(p.origin,""),{pathname:S,hash:w}=p;return{href:b,publicHref:d,url:p.href,pathname:gx(S),searchStr:y,search:_o(r?.search,g),hash:w.split("#").reverse()[0]??"",state:_o(r?.state,f)}},i=a(n),{__tempLocation:l,__tempKey:u}=i.state;if(l&&(!u||u===this.tempLocationKey)){const d=a(l);return d.state.key=i.state.key,d.state.__TSR_key=i.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:i}}return i},this.resolvePathCache=Ap(1e3),this.resolvePathWithBase=(n,r)=>Y5({base:n,to:gb(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,a)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},a):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>b6({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(i=>i.status==="pending"),r=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=n=>{const r=(i={})=>{const l=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutes(l,{_buildLocation:!0}),d=Op(u);i.from;const f=i.unsafeRelative==="path"?l.pathname:i.from??d.fullPath,m=this.resolvePathWithBase(f,"."),p=d.search,g={...d.params},y=i.to?this.resolvePathWithBase(m,`${i.to}`):this.resolvePathWithBase(m,"."),b=i.params===!1||i.params===null?{}:(i.params??!0)===!0?g:Object.assign(g,Ci(i.params,g)),S=Ty({path:y,params:b}).interpolatedPath,w=this.matchRoutes(S,void 0,{_buildLocation:!0}).map(K=>this.looseRoutesById[K.routeId]);if(Object.keys(b).length>0)for(const K of w){const F=K.options.params?.stringify??K.options.stringifyParams;F&&Object.assign(b,F(b))}const R=n.leaveParams?y:gx(Ty({path:y,params:b,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let E=p;if(n._includeValidateSearch&&this.options.search?.strict){const K={};w.forEach(F=>{if(F.options.validateSearch)try{Object.assign(K,J0(F.options.validateSearch,{...K,...E}))}catch{}}),E=K}E=w6({search:E,dest:i,destRoutes:w,_includeValidateSearch:n._includeValidateSearch}),E=_o(p,E);const T=this.options.stringifySearch(E),O=i.hash===!0?l.hash:i.hash?Ci(i.hash,l.hash):void 0,C=O?`#${O}`:"";let I=i.state===!0?l.state:i.state?Ci(i.state,l.state):{};I=_o(l.state,I);const N=`${R}${T}${C}`,P=new URL(N,this.origin),$=lA(this.rewrite,P);return{publicHref:$.pathname+$.search+$.hash,href:N,url:$.href,pathname:R,search:E,searchStr:T,state:I,hash:O??"",unmaskOnReload:i.unmaskOnReload}},a=(i={},l)=>{const u=r(i);let d=l?r(l):void 0;if(!d){const f={};if(this.options.routeMasks){const m=U5(u.pathname,this.processedTree);if(m){Object.assign(f,m.params);const{from:p,...g}=m.route;l={from:n.from,...g,params:f},d=r(l)}}}return d&&(u.maskedLocation=d),u};return n.mask?a(n,{from:n.from,...n.mask}):a(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...a})=>{const i=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(m=>{a.state[m]=this.latestLocation.state[m]});const f=Ai(a.state,this.latestLocation.state);return d.forEach(m=>{delete a.state[m]}),f},l=Ii(this.latestLocation.href)===Ii(a.href),u=this.commitLocationPromise;if(this.commitLocationPromise=nc(()=>{u?.resolve()}),l&&i())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...m}=a;d&&(m={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[a.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this.resetNextScroll=a.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:a,viewTransition:i,ignoreBlocker:l,href:u,...d}={})=>{if(u){const p=this.history.location.state.__TSR_index,g=Tp(u,{__TSR_index:n?p:p+1});d.to=g.pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const f=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const m=this.commitLocation({...f,viewTransition:i,replace:n,resetScroll:r,hashScrollIntoView:a,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=async({to:n,reloadDocument:r,href:a,...i})=>{if(!r&&a)try{new URL(`${a}`),r=!0}catch{}if(r){if(a||(a=this.buildLocation({to:n,...i}).url),!i.ignoreBlocker){const u=this.history.getBlockers?.()??[];for(const d of u)if(d?.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(a):window.location.href=a,Promise.resolve()}return this.buildAndCommitLocation({...i,href:a,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),a=i=>{try{return encodeURI(decodeURI(i))}catch{return i}};if(fp(a(this.latestLocation.href))!==fp(a(r.href))){let i=r.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),c6({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(a=>!n.some(i=>i.id===a.id))}))},this.load=async n=>{let r,a,i;for(i=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,f=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Ni({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...Ni({resolvedLocation:f,location:d})}),await yx({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=[],p=[],g=[];ju(()=>{this.__store.setState(y=>{const b=y.matches,S=y.pendingMatches||y.matches;return m=b.filter(w=>!S.some(R=>R.id===w.id)),p=S.filter(w=>!b.some(R=>R.id===w.id)),g=S.filter(w=>b.some(R=>R.id===w.id)),{...y,isLoading:!1,loadedAt:Date.now(),matches:S,pendingMatches:void 0,cachedMatches:[...y.cachedMatches,...m.filter(w=>w.status!=="error"&&w.status!=="notFound")]}}),this.clearExpiredCache()}),[[m,"onLeave"],[p,"onEnter"],[g,"onStay"]].forEach(([y,b])=>{y.forEach(S=>{this.looseRoutesById[S.routeId].options[b]?.(S)})})})})}})}catch(d){Vo(d)?(r=d,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):So(d)&&(a=d),this.__store.setState(f=>({...f,statusCode:r?r.status:a?404:f.matches.some(m=>m.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.__store.state.matches.some(u=>u.status==="error")&&(l=500),l!==void 0&&this.__store.setState(u=>({...u,statusCode:l}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,l=this.state.resolvedLocation,u=typeof r.types=="function"?r.types(Ni({resolvedLocation:l,location:i})):r.types;if(u===!1){n();return}a={update:n,types:u}}else a=n;document.startViewTransition(a)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const a=this.state.pendingMatches?.some(i=>i.id===n)?"pendingMatches":this.state.matches.some(i=>i.id===n)?"matches":this.state.cachedMatches.some(i=>i.id===n)?"cachedMatches":"";a&&this.__store.setState(i=>({...i,[a]:i[a]?.map(l=>l.id===n?r(l):l)}))})},this.getMatch=n=>{const r=a=>a.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=a=>n?.filter?.(a)??!0?{...a,invalid:!0,...n?.forcePending||a.status==="error"||a.status==="notFound"?{status:"pending",error:void 0}:void 0}:a;return this.__store.setState(a=>({...a,matches:a.matches.map(r),cachedMatches:a.cachedMatches.map(r),pendingMatches:a.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options);let a=r.url;this.origin&&a.startsWith(this.origin)&&(a=a.replace(this.origin,"")||"/"),n.options.href=r.href,n.headers.set("Location",a)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(a=>({...a,cachedMatches:a.cachedMatches.filter(i=>!r(i))})):this.__store.setState(a=>({...a,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const a=this.looseRoutesById[r.routeId];if(!a.options.loader)return!0;const i=(r.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=oA,this.preloadRoute=async n=>{const r=this.buildLocation(n);let a=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(u=>u.id)),l=new Set([...i,...this.state.cachedMatches.map(u=>u.id)]);ju(()=>{a.forEach(u=>{l.has(u.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,u]}))})});try{return a=await yx({router:this,matches:a,location:r,preload:!0,updateMatch:(u,d)=>{i.has(u)?a=a.map(f=>f.id===u?d(f):f):this.updateMatch(u,d)}}),a}catch(u){if(Vo(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});So(u)||console.error(u);return}},this.matchRoute=(n,r)=>{const a={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(a);if(r?.pending&&this.state.status!=="pending")return!1;const u=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=z5(i.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,u.pathname,this.processedTree);return!d||n.params&&!Ai(d.params,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ai(u.search,i.search,{partial:!0})?d.params:!1:d.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??s6,parseSearch:t.parseSearch??a6}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:a,routeParams:i}=r;let{matchedRoutes:l}=r,u=!1;(a?a.path!=="/"&&i["**"]:Ii(t.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:u=!0);const d=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let p=l.length-1;p>=0;p--){const g=l[p];if(g.children)return g.id}return Wr}})(),f=[],m=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return l.forEach((p,g)=>{const y=f[g-1],[b,S,w]=(()=>{const U=y?.search??t.search,J=y?._strictSearch??void 0;try{const le=J0(p.options.validateSearch,{...U})??void 0;return[{...U,...le},{...J,...le},void 0]}catch(le){let B=le;if(le instanceof Mp||(B=new Mp(le.message,{cause:le})),n?.throwOnError)throw B;return[U,{},B]}})(),R=p.options.loaderDeps?.({search:b})??"",E=R?JSON.stringify(R):"",{interpolatedPath:T,usedParams:O}=Ty({path:p.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),C=p.id+T+E,I=this.getMatch(C),N=this.state.matches.find(U=>U.routeId===p.id),P=I?._strictParams??O;let $;if(!I){const U=p.options.params?.parse??p.options.parseParams;if(U)try{Object.assign(P,U(P))}catch(J){if(So(J)||Vo(J)?$=J:$=new y6(J.message,{cause:J}),n?.throwOnError)throw $}}Object.assign(i,P);const K=N?"stay":"enter";let F;if(I)F={...I,cause:K,params:N?_o(N.params,i):i,_strictParams:P,search:_o(N?N.search:I.search,b),_strictSearch:S};else{const U=p.options.loader||p.options.beforeLoad||p.lazyFn||aA(p)?"pending":"success";F={id:C,ssr:this.isServer?void 0:p.options.ssr,index:g,routeId:p.id,params:N?_o(N.params,i):i,_strictParams:P,pathname:T,updatedAt:Date.now(),search:N?_o(N.search,b):b,_strictSearch:S,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:nc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:K,loaderDeps:N?_o(N.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n?.preload||(F.globalNotFound=d===p.id),F.searchError=w;const G=m(y);F.context={...G,...F.__routeContext,...F.__beforeLoadContext},f.push(F)}),f.forEach((p,g)=>{const y=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const S=f[g-1],w=m(S);if(y.options.context){const R={deps:p.loaderDeps,params:p.params,context:w??{},location:t,navigate:E=>this.navigate({...E,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:f};p.__routeContext=y.options.context(R)??void 0}p.context={...w,...p.__routeContext,...p.__beforeLoadContext}}}),f}}class Mp extends Error{}class y6 extends Error{}function _6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function J0(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Mp("Async validation not supported");if(n.issues)throw new Mp(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function b6({pathname:e,routesById:t,processedTree:n}){const r={},a=Ii(e);let i;const l=F5(a,n,!0);return l&&(i=l.route,Object.assign(r,l.params)),{matchedRoutes:l?.branch||[t[Wr]],routeParams:r,foundRoute:i}}function w6({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const a=n.reduce((u,d)=>{const f=[];if("search"in d.options)d.options.search?.middlewares&&f.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const m=({search:p,next:g})=>{let y=p;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(y=d.options.preSearchFilters.reduce((S,w)=>w(S),p));const b=g(y);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((S,w)=>w(S),b):b};f.push(m)}if(r&&d.options.validateSearch){const m=({search:p,next:g})=>{const y=g(p);try{return{...y,...J0(d.options.validateSearch,y)??void 0}}catch{return y}};f.push(m)}return u.concat(f)},[])??[],i=({search:u})=>t.search?t.search===!0?u:Ci(t.search,u):{};a.push(i);const l=(u,d)=>{if(u>=a.length)return d;const f=a[u];return f({search:d,next:p=>l(u+1,p)})};return l(0,e)}const S6="Error preloading route! ☝️";class cA{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Wr:this.parentRoute||Fa(!1);let i=a?Wr:r?.path;i&&i!=="/"&&(i=XC(i));const l=r?.id||i;let u=a?Wr:dp([this.parentRoute.id===Wr?"":this.parentRoute.id,l]);i===Wr&&(i="/"),u!==Wr&&(u=dp(["/",u]));const d=u===Wr?"/":dp([this.parentRoute.fullPath,i]);this._path=i,this._id=u,this._fullPath=d,this._to=d},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class E6 extends cA{constructor(t){super(t)}}function vb(e){const t=e.errorComponent??Em;return x.jsx(R6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?A.createElement(t,{error:n,reset:r}):e.children})}class R6 extends A.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Em({error:e}){const[t,n]=A.useState(!1);return x.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[x.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[x.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),x.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),x.jsx("div",{style:{height:".25rem"}}),t?x.jsx("div",{children:x.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?x.jsx("code",{children:e.message}):null})}):null]})}function x6({children:e,fallback:t=null}){return T6()?x.jsx(ee.Fragment,{children:e}):x.jsx(ee.Fragment,{children:t})}function T6(){return ee.useSyncExternalStore(O6,()=>!0,()=>!1)}function O6(){return()=>{}}var Cy={exports:{}},Ay={},Iy={exports:{}},Ny={};var _x;function C6(){if(_x)return Ny;_x=1;var e=Gs();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function u(p,g){var y=g(),b=r({inst:{value:y,getSnapshot:g}}),S=b[0].inst,w=b[1];return i(function(){S.value=y,S.getSnapshot=g,d(S)&&w({inst:S})},[p,y,g]),a(function(){return d(S)&&w({inst:S}),p(function(){d(S)&&w({inst:S})})},[p]),l(y),y}function d(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!n(p,y)}catch{return!0}}function f(p,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Ny.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Ny}var bx;function uA(){return bx||(bx=1,Iy.exports=C6()),Iy.exports}var wx;function A6(){if(wx)return Ay;wx=1;var e=Gs(),t=uA();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,i=e.useRef,l=e.useEffect,u=e.useMemo,d=e.useDebugValue;return Ay.useSyncExternalStoreWithSelector=function(f,m,p,g,y){var b=i(null);if(b.current===null){var S={hasValue:!1,value:null};b.current=S}else S=b.current;b=u(function(){function R(I){if(!E){if(E=!0,T=I,I=g(I),y!==void 0&&S.hasValue){var N=S.value;if(y(N,I))return O=N}return O=I}if(N=O,r(T,I))return N;var P=g(I);return y!==void 0&&y(N,P)?(T=I,N):(T=I,O=P)}var E=!1,T,O,C=p===void 0?null:p;return[function(){return R(m())},C===null?void 0:function(){return R(C())}]},[m,p,g,y]);var w=a(f,b[0],b[1]);return l(function(){S.hasValue=!0,S.value=w},[w]),d(w),w},Ay}var Sx;function I6(){return Sx||(Sx=1,Cy.exports=A6()),Cy.exports}var dA=I6();const wre=Ha(dA);function N6(e,t=r=>r,n={}){const r=n.equal??k6;return dA.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function k6(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!t.has(r)||!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Ex(e);if(n.length!==Ex(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function Ex(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const ky=A.createContext(null);function fA(){return typeof document>"u"?ky:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=ky,ky)}function Ur(e){const t=A.useContext(fA());return e?.warn,t}function Er(e){const t=Ur({warn:e?.router===void 0}),n=e?.router||t,r=A.useRef(void 0);return N6(n.__store,a=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=_o(r.current,e.select(a));return r.current=i,i}return e.select(a)}return a})}const Rm=A.createContext(void 0),M6=A.createContext(void 0);function la(e){const t=A.useContext(e.from?M6:Rm);return Er({select:r=>{const a=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Fa(!((e.shouldThrow??!0)&&!a),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),a!==void 0)return e.select?e.select(a):a},structuralSharing:e.structuralSharing})}function yb(e){return la({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function _b(e){const{select:t,...n}=e;return la({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Yl(e){return la({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function xm(e){return la({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Cu=typeof window<"u"?A.useLayoutEffect:A.useEffect;function My(e){const t=A.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function P6(e,t,n={},r={}){A.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const a=new IntersectionObserver(([i])=>{t(i)},n);return a.observe(e.current),()=>{a.disconnect()}},[t,n,r.disabled,e])}function D6(e){const t=A.useRef(null);return A.useImperativeHandle(e,()=>t.current,[]),t}function mc(e){const t=Ur();return A.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Sre(e){const t=Ur(),n=mc(),r=A.useRef(null);return Cu(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var Tm=DC();const hA=Ha(Tm);function L6(e,t){const n=Ur(),[r,a]=A.useState(!1),i=A.useRef(!1),l=D6(t),{activeProps:u,inactiveProps:d,activeOptions:f,to:m,preload:p,preloadDelay:g,hashScrollIntoView:y,replace:b,startTransition:S,resetScroll:w,viewTransition:R,children:E,target:T,disabled:O,style:C,className:I,onClick:N,onFocus:P,onMouseEnter:$,onMouseLeave:K,onTouchStart:F,ignoreBlocker:G,params:U,search:J,hash:le,state:B,mask:Y,reloadDocument:W,unsafeRelative:he,from:ae,_fromLocation:M,...q}=e,V=Er({select:oe=>oe.location.search,structuralSharing:!0}),D=e.from,z=A.useMemo(()=>({...e,from:D}),[n,V,D,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),X=A.useMemo(()=>n.buildLocation({...z}),[n,z]),ue=A.useMemo(()=>{if(O)return;let oe=X.maskedLocation?X.maskedLocation.url:X.url,we=!1;return n.origin&&(oe.startsWith(n.origin)?oe=n.history.createHref(oe.replace(n.origin,""))||"/":we=!0),{href:oe,external:we}},[O,X.maskedLocation,X.url,n.origin,n.history]),ve=A.useMemo(()=>{if(ue?.external)return ue.href;try{return new URL(m),m}catch{}},[m,ue]),Ie=e.reloadDocument||ve?!1:p??n.options.defaultPreload,Ae=g??n.options.defaultPreloadDelay??0,H=Er({select:oe=>{if(ve)return!1;if(f?.exact){if(!K5(oe.location.pathname,X.pathname,n.basepath))return!1}else{const we=Ip(oe.location.pathname,n.basepath),Re=Ip(X.pathname,n.basepath);if(!(we.startsWith(Re)&&(we.length===Re.length||we[Re.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Ai(oe.location.search,X.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?oe.location.hash===X.hash:!0}}),ne=A.useCallback(()=>{n.preloadRoute({...z}).catch(oe=>{console.warn(oe),console.warn(S6)})},[n,z]),_e=A.useCallback(oe=>{oe?.isIntersecting&&ne()},[ne]);P6(l,_e,F6,{disabled:!!O||Ie!=="viewport"}),A.useEffect(()=>{i.current||!O&&Ie==="render"&&(ne(),i.current=!0)},[O,ne,Ie]);const se=oe=>{const we=oe.currentTarget.getAttribute("target"),Re=T!==void 0?T:we;if(!O&&!V6(oe)&&!oe.defaultPrevented&&(!Re||Re==="_self")&&oe.button===0){oe.preventDefault(),Tm.flushSync(()=>{a(!0)});const Ee=n.subscribe("onResolved",()=>{Ee(),a(!1)});n.navigate({...z,replace:b,resetScroll:w,hashScrollIntoView:y,startTransition:S,viewTransition:R,ignoreBlocker:G})}};if(ve)return{...q,ref:l,href:ve,...E&&{children:E},...T&&{target:T},...O&&{disabled:O},...C&&{style:C},...I&&{className:I},...N&&{onClick:N},...P&&{onFocus:P},...$&&{onMouseEnter:$},...K&&{onMouseLeave:K},...F&&{onTouchStart:F}};const ce=oe=>{O||Ie&&ne()},Te=ce,Pe=oe=>{if(!(O||!Ie))if(!Ae)ne();else{const we=oe.target;if(pu.has(we))return;const Re=setTimeout(()=>{pu.delete(we),ne()},Ae);pu.set(we,Re)}},Xe=oe=>{if(O||!Ie||!Ae)return;const we=oe.target,Re=pu.get(we);Re&&(clearTimeout(Re),pu.delete(we))},Ve=H?Ci(u,{})??j6:Py,Ye=H?Py:Ci(d,{})??Py,Z=[I,Ve.className,Ye.className].filter(Boolean).join(" "),re=(C||Ve.style||Ye.style)&&{...C,...Ve.style,...Ye.style};return{...q,...Ve,...Ye,href:ue?.href,ref:l,onClick:mu([N,se]),onFocus:mu([P,ce]),onMouseEnter:mu([$,Pe]),onMouseLeave:mu([K,Xe]),onTouchStart:mu([F,Te]),disabled:!!O,target:T,...re&&{style:re},...Z&&{className:Z},...O&&$6,...H&&U6,...r&&z6}}const Py={},j6={className:"active"},$6={role:"link","aria-disabled":!0},U6={"data-status":"active","aria-current":"page"},z6={"data-transitioning":"transitioning"},pu=new WeakMap,F6={rootMargin:"100px"},mu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Om=A.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:a,ref:i,...l}=L6(r,t),u=typeof r.children=="function"?r.children({isActive:l["data-status"]==="active"}):r.children;return n===void 0&&delete l.disabled,A.createElement(n||"a",{...l,ref:i},u)});function V6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class B6 extends cA{constructor(t){super(t),this.useMatch=n=>la({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>xm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Yl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>_b({...n,from:this.id}),this.useLoaderData=n=>yb({...n,from:this.id}),this.useNavigate=()=>mc({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(Om,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function Sn(e){return new B6(e)}class q6 extends E6{constructor(t){super(t),this.useMatch=n=>la({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>xm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Yl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>_b({...n,from:this.id}),this.useLoaderData=n=>yb({...n,from:this.id}),this.useNavigate=()=>mc({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(Om,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function H6(e){return new q6(e)}function Rx(e){return typeof e=="object"?new xx(e,{silent:!0}).createRoute(e):new xx(e,{silent:!0}).createRoute}class xx{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const a=Sn(r);return a.isRoot=!1,a},this.silent=n?.silent}}class Tx{constructor(t){this.useMatch=n=>la({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>la({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>xm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>Yl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>_b({...n,from:this.options.id}),this.useLoaderData=n=>yb({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ur();return mc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Ox(e){return typeof e=="object"?new Tx(e):t=>new Tx({id:e,...t})}function Ln(e,t){let n,r,a,i;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(a=d,M5(a)&&a instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),i=!0)}})),n),u=function(f){if(i)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!r)throw l();return A.createElement(r,f)};return u.preload=l,u}function G6(){const e=Ur(),t=A.useRef({router:e,mounted:!1}),[n,r]=A.useState(!1),{hasPendingMatches:a,isLoading:i}=Er({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),l=My(i),u=i||n||a,d=My(u),f=i||a,m=My(f);return e.startTransition=p=>{r(!0),A.startTransition(()=>{p(),r(!1)})},A.useEffect(()=>{const p=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ii(e.latestLocation.href)!==Ii(g.href)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),Cu(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),Cu(()=>{l&&!i&&e.emit({type:"onLoad",...Ni(e.state)})},[l,e,i]),Cu(()=>{m&&!f&&e.emit({type:"onBeforeRouteMount",...Ni(e.state)})},[f,m,e]),Cu(()=>{if(d&&!u){const p=Ni(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),p.hrefChanged&&n6(e)}},[u,d,e]),null}function Z6(e){const t=Er({select:n=>`not-found-${n.location.pathname}-${n.status}`});return x.jsx(vb,{getResetKey:()=>t,onCatch:(n,r)=>{if(So(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(So(n))return e.fallback?.(n);throw n},children:e.children})}function K6(){return x.jsx("p",{children:"Not Found"})}function Ul(e){return x.jsx(x.Fragment,{children:e.children})}function pA(e,t,n){return t.options.notFoundComponent?x.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?x.jsx(e.options.defaultNotFoundComponent,{...n}):x.jsx(K6,{})}function Y6({children:e}){const t=Ur();return t.isServer?x.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:e+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function W6(){const e=Ur();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||X0)(e.latestLocation),r=n!==X0(e.latestLocation)?n:void 0,a={storageKey:Np,shouldScrollRestoration:!0};return r&&(a.key=r),x.jsx(Y6,{children:`(${JC.toString()})(${JSON.stringify(a)})`})}const mA=A.memo(function({matchId:t}){const n=Ur(),r=Er({select:R=>{const E=R.matches.find(T=>T.id===t);return Fa(E),{routeId:E.routeId,ssr:E.ssr,_displayPending:E._displayPending}},structuralSharing:!0}),a=n.routesById[r.routeId],i=a.options.pendingComponent??n.options.defaultPendingComponent,l=i?x.jsx(i,{}):null,u=a.options.errorComponent??n.options.defaultErrorComponent,d=a.options.onCatch??n.options.defaultOnCatch,f=a.isRoot?a.options.notFoundComponent??n.options.notFoundRoute?.options.component:a.options.notFoundComponent,m=r.ssr===!1||r.ssr==="data-only",p=(!a.isRoot||a.options.wrapInSuspense||m)&&(a.options.wrapInSuspense??i??(a.options.errorComponent?.preload||m))?A.Suspense:Ul,g=u?vb:Ul,y=f?Z6:Ul,b=Er({select:R=>R.loadedAt}),S=Er({select:R=>{const E=R.matches.findIndex(T=>T.id===t);return R.matches[E-1]?.routeId}}),w=a.isRoot?a.options.shellComponent??Ul:Ul;return x.jsxs(w,{children:[x.jsx(Rm.Provider,{value:t,children:x.jsx(p,{fallback:l,children:x.jsx(g,{getResetKey:()=>b,errorComponent:u||Em,onCatch:(R,E)=>{if(So(R))throw R;d?.(R,E)},children:x.jsx(y,{fallback:R=>{if(!f||R.routeId&&R.routeId!==r.routeId||!R.routeId&&!a.isRoot)throw R;return A.createElement(f,R)},children:m||r._displayPending?x.jsx(x6,{fallback:l,children:x.jsx(Cx,{matchId:t})}):x.jsx(Cx,{matchId:t})})})})}),S===Wr&&n.options.scrollRestoration?x.jsxs(x.Fragment,{children:[x.jsx(Q6,{}),x.jsx(W6,{})]}):null]})});function Q6(){const e=Ur(),t=A.useRef(void 0);return x.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Ni(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Cx=A.memo(function({matchId:t}){const n=Ur(),{match:r,key:a,routeId:i}=Er({select:d=>{const f=d.matches.find(b=>b.id===t),m=f.routeId,g=(n.routesById[m].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:m,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return{key:g?JSON.stringify(g):void 0,routeId:m,match:{id:f.id,status:f.status,error:f.error,_forcePending:f._forcePending,_displayPending:f._displayPending}}},structuralSharing:!0}),l=n.routesById[i],u=A.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?x.jsx(d,{},a):x.jsx(gA,{})},[a,l.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const f=n.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!n.isServer){const m=nc();f._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),f._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return Fa(So(r.error)),pA(n,l,r.error);if(r.status==="redirected")throw Fa(Vo(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(l.options.errorComponent??n.options.defaultErrorComponent)||Em;return x.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return u}),gA=A.memo(function(){const t=Ur(),n=A.useContext(Rm),r=Er({select:f=>f.matches.find(m=>m.id===n)?.routeId}),a=t.routesById[r],i=Er({select:f=>{const p=f.matches.find(g=>g.id===n);return Fa(p),p.globalNotFound}}),l=Er({select:f=>{const m=f.matches,p=m.findIndex(g=>g.id===n);return m[p+1]?.id}}),u=t.options.defaultPendingComponent?x.jsx(t.options.defaultPendingComponent,{}):null;if(i)return pA(t,a,void 0);if(!l)return null;const d=x.jsx(mA,{matchId:l});return r===Wr?x.jsx(A.Suspense,{fallback:u,children:d}):d});function X6(){const e=Ur(),n=e.routesById[Wr].options.pendingComponent??e.options.defaultPendingComponent,r=n?x.jsx(n,{}):null,a=e.isServer||typeof document<"u"&&e.ssr?Ul:A.Suspense,i=x.jsxs(a,{fallback:r,children:[!e.isServer&&x.jsx(G6,{}),x.jsx(J6,{})]});return e.options.InnerWrap?x.jsx(e.options.InnerWrap,{children:i}):i}function J6(){const e=Ur(),t=Er({select:a=>a.matches[0]?.id}),n=Er({select:a=>a.loadedAt}),r=t?x.jsx(mA,{matchId:t}):null;return x.jsx(Rm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:x.jsx(vb,{getResetKey:()=>n,errorComponent:Em,onCatch:a=>{a.message||a.toString()},children:r})})}const eL=e=>new tL(e);class tL extends v6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Rx,globalThis.createLazyFileRoute=Ox):typeof window<"u"&&(window.createFileRoute=Rx,window.createLazyFileRoute=Ox);function nL({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=fA(),a=x.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?x.jsx(e.options.Wrap,{children:a}):a}function rL({router:e,...t}){return x.jsx(nL,{router:e,...t,children:x.jsx(X6,{})})}function oL(e){return Er({select:t=>t.location})}var aL={},Ax={};const pp=Object.create(null),gu=e=>aL||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?pp:globalThis),wo=new Proxy(pp,{get(e,t){return gu()[t]??pp[t]},has(e,t){return t in gu()||t in pp},set(e,t,n){const r=gu(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=gu(!0);return delete n[t],!0},ownKeys(){const e=gu(!0);return Object.keys(e)}});function An(e,t){return typeof process<"u"&&Ax?Ax[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const vu=1,Zn=4,na=8,Xr=24,Ix={eterm:Zn,cons25:Zn,console:Zn,cygwin:Zn,dtterm:Zn,gnome:Zn,hurd:Zn,jfbterm:Zn,konsole:Zn,kterm:Zn,mlterm:Zn,mosh:Xr,putty:Zn,st:Zn,"rxvt-unicode-24bit":Xr,terminator:Xr,"xterm-kitty":Xr},sL=new Map(Object.entries({APPVEYOR:na,BUILDKITE:na,CIRCLECI:Xr,DRONE:na,GITEA_ACTIONS:Xr,GITHUB_ACTIONS:Xr,GITLAB_CI:na,TRAVIS:na})),iL=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function lL(){if(An("FORCE_COLOR")!==void 0)switch(An("FORCE_COLOR")){case"":case"1":case"true":return Zn;case"2":return na;case"3":return Xr;default:return vu}if(An("NODE_DISABLE_COLORS")!==void 0&&An("NODE_DISABLE_COLORS")!==""||An("NO_COLOR")!==void 0&&An("NO_COLOR")!==""||An("TERM")==="dumb")return vu;if(An("TMUX"))return Xr;if("TF_BUILD"in wo&&"AGENT_NAME"in wo)return Zn;if("CI"in wo){for(const{0:e,1:t}of sL)if(e in wo)return t;return An("CI_NAME")==="codeship"?na:vu}if("TEAMCITY_VERSION"in wo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(An("TEAMCITY_VERSION"))!==null?Zn:vu;switch(An("TERM_PROGRAM")){case"iTerm.app":return!An("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(An("TERM_PROGRAM_VERSION"))!==null?na:Xr;case"HyperTerm":case"MacTerm":return Xr;case"Apple_Terminal":return na}if(An("COLORTERM")==="truecolor"||An("COLORTERM")==="24bit")return Xr;if(An("TERM")){if(/truecolor/.exec(An("TERM"))!==null)return Xr;if(/^xterm-256/.exec(An("TERM"))!==null)return na;const e=An("TERM").toLowerCase();if(Ix[e])return Ix[e];if(iL.some(t=>t.exec(e)!==null))return Zn}return An("COLORTERM")?Zn:vu}const ra={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},e_=["debug","info","success","warn","error"];function cL(e,t){return e_.indexOf(t)>=e_.indexOf(e)}const uL={info:ra.fg.blue,success:ra.fg.green,warn:ra.fg.yellow,error:ra.fg.red,debug:ra.fg.magenta},dL=(e,t,n)=>{const r=new Date().toISOString();return n?`${ra.dim}${r}${ra.reset} ${uL[e]}${e.toUpperCase()}${ra.reset} ${ra.bright}[Better Auth]:${ra.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},fL=e=>{const t="error",n=lL()!==1,r=(a,i,l=[])=>{if(!cL(t,a))return;const u=dL(a,i,n);{a==="error"?console.error(u,...l):a==="warn"?console.warn(u,...l):console.log(u,...l);return}};return{...Object.fromEntries(e_.map(a=>[a,(...[i,...l])=>r(a,i,l)])),get level(){return t}}};fL();var Uu=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function hL(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Uu(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function pL(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Uu(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Uu?t:new Uu(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function Dy(e,t="/api/auth"){if(pL(e),hL(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function mL(e,t,n,r,a){if(e)return Dy(e,t);{const i=wo.BETTER_AUTH_URL||wo.NEXT_PUBLIC_BETTER_AUTH_URL||wo.PUBLIC_BETTER_AUTH_URL||wo.NUXT_PUBLIC_BETTER_AUTH_URL||wo.NUXT_PUBLIC_AUTH_URL||(wo.BASE_URL!=="/"?wo.BASE_URL:void 0);if(i)return Dy(i,t)}if(typeof window<"u"&&window.location)return Dy(window.location.origin,t)}const gL={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},vL=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Nx={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},yL=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function _L(e){return e instanceof Date&&!isNaN(e.getTime())}function bL(e){const t=yL.exec(e);if(!t)return null;const[,n,r,a,i,l,u,d,f,m,p]=t;let g=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(a,10),parseInt(i,10),parseInt(l,10),parseInt(u,10),d?parseInt(d.padEnd(3,"0"),10):0));if(f){const y=(parseInt(m,10)*60+parseInt(p,10))*(f==="+"?-1:1);g.setUTCMinutes(g.getUTCMinutes()+y)}return _L(g)?g:null}function wL(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:a,parseDates:i=!0}=t;if(typeof e!="string")return e;const l=e.trim();if(l.length>0&&l[0]==='"'&&l.endsWith('"')&&!l.slice(1,-1).includes('"'))return l.slice(1,-1);const u=l.toLowerCase();if(u.length<=9&&u in Nx)return Nx[u];if(!vL.test(l)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(gL).some(([d,f])=>{const m=f.test(l);return m&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${d} pattern`),m})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(l,(f,m)=>{if(f==="__proto__"||f==="constructor"&&m&&typeof m=="object"&&"prototype"in m){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(i&&typeof m=="string"){const p=bL(m);if(p)return p}return a?a(f,m):m})}catch(d){if(n)throw d;return e}}function SL(e,t={strict:!0}){return wL(e,t)}let ko=[],ws=0;const eh=4,Hl=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(r){return n.lc=t.push(r),()=>{for(let i=ws+eh;i<ko.length;)ko[i]===r?ko.splice(i,eh):i+=eh;let a=t.indexOf(r);~a&&(t.splice(a,1),--n.lc||n.off())}},notify(r,a){let i=!ko.length;for(let l of t)ko.push(l,n.value,r,a);if(i){for(ws=0;ws<ko.length;ws+=eh)ko[ws](ko[ws+1],ko[ws+2],ko[ws+3]);ko.length=0}},off(){},set(r){let a=n.value;a!==r&&(n.value=r,n.notify(a))},subscribe(r){let a=n.listen(r);return r(n.value),a},value:e};return n},EL=5,th=6,nh=10;let RL=(e,t,n,r)=>(e.events=e.events||{},e.events[n+nh]||(e.events[n+nh]=r(a=>{e.events[n].reduceRight((i,l)=>(l(i),i),{shared:{},...a})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let a=e.events[n],i=a.indexOf(t);a.splice(i,1),a.length||(delete e.events[n],e.events[n+nh](),delete e.events[n+nh])}),xL=1e3,vA=(e,t)=>RL(e,r=>{let a=t(r);a&&e.events[th].push(a)},EL,r=>{let a=e.listen;e.listen=(...l)=>(!e.lc&&!e.active&&(e.active=!0,r()),a(...l));let i=e.off;return e.events[th]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let l of e.events[th])l();e.events[th]=[]}},xL)},()=>{e.listen=a,e.off=i}});function TL(e,t,n){let r=new Set(t).add(void 0);return e.listen((a,i,l)=>{r.has(l)&&n(a,i,l)})}var OL=Object.defineProperty,CL=Object.defineProperties,AL=Object.getOwnPropertyDescriptors,kx=Object.getOwnPropertySymbols,IL=Object.prototype.hasOwnProperty,NL=Object.prototype.propertyIsEnumerable,Mx=(e,t,n)=>t in e?OL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jo=(e,t)=>{for(var n in t||(t={}))IL.call(t,n)&&Mx(e,n,t[n]);if(kx)for(var n of kx(t))NL.call(t,n)&&Mx(e,n,t[n]);return e},ta=(e,t)=>CL(e,AL(t)),kL=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},ML=async(e,t)=>{var n,r,a,i,l,u;let d=t||{};const f={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:d,hooks:f};for(const m of t?.plugins||[]){if(m.init){const p=await((n=m.init)==null?void 0:n.call(m,e.toString(),t));d=p.options||d,e=p.url}f.onRequest.push((r=m.hooks)==null?void 0:r.onRequest),f.onResponse.push((a=m.hooks)==null?void 0:a.onResponse),f.onSuccess.push((i=m.hooks)==null?void 0:i.onSuccess),f.onError.push((l=m.hooks)==null?void 0:l.onError),f.onRetry.push((u=m.hooks)==null?void 0:u.onRetry)}return{url:e,options:d,hooks:f}},Px=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},PL=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function DL(e){if(typeof e=="number")return new Px({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new Px(e);case"exponential":return new PL(e);default:throw new Error("Invalid retry strategy")}}var LL=async e=>{const t={},n=async r=>typeof r=="function"?await r():r;if(e?.auth){if(e.auth.type==="Bearer"){const r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type==="Basic"){const r=n(e.auth.username),a=n(e.auth.password);if(!r||!a)return t;t.authorization=`Basic ${btoa(`${r}:${a}`)}`}else if(e.auth.type==="Custom"){const r=n(e.auth.value);if(!r)return t;t.authorization=`${n(e.auth.prefix)} ${r}`}}return t},jL=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function $L(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const r=t.split(";").shift()||"";return jL.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function UL(e){try{return JSON.parse(e),!0}catch{return!1}}function yA(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function Dx(e){try{return JSON.parse(e)}catch{return e}}function Lx(e){return typeof e=="function"}function zL(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&Lx(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&Lx(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function FL(e){const t=new Headers(e?.headers),n=await LL(e);for(const[r,a]of Object.entries(n||{}))t.set(r,a);if(!t.has("content-type")){const r=VL(e?.body);r&&t.set("content-type",r)}return t}function VL(e){return yA(e)?"application/json":null}function BL(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(yA(e.body)&&!t.has("content-type")){for(const[n,r]of Object.entries(e?.body))r instanceof Date&&(e.body[n]=r.toISOString());return JSON.stringify(e.body)}return e.body}function qL(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const r=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return bA.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function HL(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var GL=class _A extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,_A.prototype)}};async function mp(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new GL(n.issues);return n.value}var bA=["get","post","put","patch","delete"],ZL=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,a,i,l;const u=((a=(r=e.plugins)==null?void 0:r.find(d=>{var f;return(f=d.schema)!=null&&f.config?t.startsWith(d.schema.config.baseURL||"")||t.startsWith(d.schema.config.prefix||""):!1}))==null?void 0:a.schema)||e.schema;if(u){let d=t;(i=u.config)!=null&&i.prefix&&d.startsWith(u.config.prefix)&&(d=d.replace(u.config.prefix,""),u.config.baseURL&&(t=t.replace(u.config.prefix,u.config.baseURL))),(l=u.config)!=null&&l.baseURL&&d.startsWith(u.config.baseURL)&&(d=d.replace(u.config.baseURL,""));const f=u.schema[d];if(f){let m=ta(jo({},n),{method:f.method,output:f.output});return n?.disableValidation||(m=ta(jo({},m),{body:f.input?await mp(f.input,n?.body):n?.body,params:f.params?await mp(f.params,n?.params):n?.params,query:f.query?await mp(f.query,n?.query):n?.query})),{url:t,options:m}}}return{url:t,options:n}}}),KL=e=>{async function t(n,r){const a=ta(jo(jo({},e),r),{plugins:[...e?.plugins||[],ZL(e||{})]});if(e?.catchAllError)try{return await t_(n,a)}catch(i){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:i}}}return await t_(n,a)}return t};function YL(e,t){let{baseURL:n,params:r,query:a}=t||{query:{},params:{},baseURL:""},i=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const p=e.toString().split("@")[1].split("/")[0];bA.includes(p)&&(e=e.replace(`@${p}/`,"/"))}i.endsWith("/")||(i+="/");let[l,u]=e.replace(i,"").split("?");const d=new URLSearchParams(u);for(const[p,g]of Object.entries(a||{}))g!=null&&d.set(p,String(g));if(r)if(Array.isArray(r)){const p=l.split("/").filter(g=>g.startsWith(":"));for(const[g,y]of p.entries()){const b=r[g];l=l.replace(y,b)}}else for(const[p,g]of Object.entries(r))l=l.replace(`:${p}`,String(g));l=l.split("/").map(encodeURIComponent).join("/"),l.startsWith("/")&&(l=l.slice(1));let f=d.toString();return f=f.length>0?`?${f}`.replace(/\+/g,"%20"):"",i.startsWith("http")?new URL(`${l}${f}`,i):`${i}${l}${f}`}var t_=async(e,t)=>{var n,r,a,i,l,u,d,f;const{hooks:m,url:p,options:g}=await ML(e,t),y=zL(g),b=new AbortController,S=(n=g.signal)!=null?n:b.signal,w=YL(p,g),R=BL(g),E=await FL(g),T=qL(p,g);let O=ta(jo({},g),{url:w,headers:E,body:R,method:T,signal:S});for(const U of m.onRequest)if(U){const J=await U(O);J instanceof Object&&(O=J)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((r=t?.body)==null?void 0:r.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:C}=HL(g,b);let I=await y(O.url,O);C();const N={response:I,request:O};for(const U of m.onResponse)if(U){const J=await U(ta(jo({},N),{response:(a=t?.hookOptions)!=null&&a.cloneResponse?I.clone():I}));J instanceof Response?I=J:J instanceof Object&&(I=J.response)}if(I.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const J=$L(I),le={data:"",response:I,request:O};if(J==="json"||J==="text"){const B=await I.text(),W=await((i=O.jsonParser)!=null?i:Dx)(B);le.data=W}else le.data=await I[J]();O?.output&&O.output&&!O.disableValidation&&(le.data=await mp(O.output,le.data));for(const B of m.onSuccess)B&&await B(ta(jo({},le),{response:(l=t?.hookOptions)!=null&&l.cloneResponse?I.clone():I}));return t?.throw?le.data:{data:le.data,error:null}}const P=(u=t?.jsonParser)!=null?u:Dx,$=await I.text(),K=UL($),F=K?await P($):null,G={response:I,responseText:$,request:O,error:ta(jo({},F),{status:I.status,statusText:I.statusText})};for(const U of m.onError)U&&await U(ta(jo({},G),{response:(d=t?.hookOptions)!=null&&d.cloneResponse?I.clone():I}));if(t?.retry){const U=DL(t.retry),J=(f=t.retryAttempt)!=null?f:0;if(await U.shouldAttemptRetry(J,I)){for(const B of m.onRetry)B&&await B(N);const le=U.getDelay(J);return await new Promise(B=>setTimeout(B,le)),await t_(e,ta(jo({},t),{retryAttempt:J+1}))}}if(t?.throw)throw new kL(I.status,I.statusText,K?F:$);return{data:null,error:ta(jo({},F),{status:I.status,statusText:I.statusText})}};const Ly=Symbol.for("better-auth:broadcast-channel"),WL=()=>Math.floor(Date.now()/1e3);var QL=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:WL()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function jy(e="better-auth.message"){return globalThis[Ly]||(globalThis[Ly]=new QL(e)),globalThis[Ly]}const $y=Symbol.for("better-auth:focus-manager");var XL=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function jx(){return globalThis[$y]||(globalThis[$y]=new XL),globalThis[$y]}const Uy=Symbol.for("better-auth:online-manager");var JL=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function zy(){return globalThis[Uy]||(globalThis[Uy]=new JL),globalThis[Uy]}const ej=()=>typeof window>"u",Au=(e,t,n,r)=>{const a=Hl({data:null,error:null,isPending:!0,isRefetching:!1,refetch:u=>i(u)}),i=async u=>new Promise(d=>{const f=typeof r=="function"?r({data:a.get().data,error:a.get().error,isPending:a.get().isPending}):r;n(t,{...f,query:{...f?.query,...u?.query},async onSuccess(m){a.set({data:m.data,error:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch}),await f?.onSuccess?.(m)},async onError(m){const{request:p}=m,g=typeof p.retry=="number"?p.retry:p.retry?.attempts,y=p.retryAttempt||0;g&&y<g||(a.set({error:m.error,data:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch}),await f?.onError?.(m))},async onRequest(m){const p=a.get();a.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:a.value.refetch}),await f?.onRequest?.(m)}}).catch(m=>{a.set({error:m,data:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch})}).finally(()=>{d(void 0)})});e=Array.isArray(e)?e:[e];let l=!1;for(const u of e)u.subscribe(async()=>{ej()||(l?await i():vA(a,()=>{const d=setTimeout(async()=>{l||(await i(),l=!0)},0);return()=>{a.off(),u.off(),clearTimeout(d)}}))});return a},Ol=()=>Math.floor(Date.now()/1e3),tj=5;function nj(e){const{sessionAtom:t,sessionSignal:n,$fetch:r,options:a={}}=e,i=a.sessionOptions?.refetchInterval??0,l=a.sessionOptions?.refetchOnWindowFocus??!0,u=a.sessionOptions?.refetchWhenOffline??!1,d={lastSync:0,lastSessionRequest:0,cachedSession:void 0},f=()=>u||zy().isOnline,m=E=>{if(!f())return;if(E?.event==="storage"){d.lastSync=Ol(),n.set(!n.get());return}const T=t.get();if(E?.event==="poll"){d.lastSessionRequest=Ol(),r("/get-session").then(O=>{t.set({...T,data:O.data,error:O.error||null}),d.lastSync=Ol(),n.set(!n.get())}).catch(()=>{});return}E?.event==="visibilitychange"&&Ol()-d.lastSessionRequest<tj&&T?.data!==null&&T?.data!==void 0||(T?.data===null||T?.data===void 0||E?.event==="visibilitychange")&&(E?.event==="visibilitychange"&&(d.lastSessionRequest=Ol()),d.lastSync=Ol(),n.set(!n.get()))},p=E=>{jy().post({event:"session",data:{trigger:E},clientId:Math.random().toString(36).substring(7)})},g=()=>{i&&i>0&&(d.pollInterval=setInterval(()=>{t.get()?.data&&m({event:"poll"})},i*1e3))},y=()=>{d.unsubscribeBroadcast=jy().subscribe(()=>{m({event:"storage"})})},b=()=>{l&&(d.unsubscribeFocus=jx().subscribe(()=>{m({event:"visibilitychange"})}))},S=()=>{d.unsubscribeOnline=zy().subscribe(E=>{E&&m({event:"visibilitychange"})})};return{init:()=>{g(),y(),b(),S(),jy().setup(),jx().setup(),zy().setup()},cleanup:()=>{d.pollInterval&&(clearInterval(d.pollInterval),d.pollInterval=void 0),d.unsubscribeBroadcast&&(d.unsubscribeBroadcast(),d.unsubscribeBroadcast=void 0),d.unsubscribeFocus&&(d.unsubscribeFocus(),d.unsubscribeFocus=void 0),d.unsubscribeOnline&&(d.unsubscribeOnline(),d.unsubscribeOnline=void 0),d.lastSync=0,d.lastSessionRequest=0,d.cachedSession=void 0},triggerRefetch:m,broadcastSessionUpdate:p}}const rj={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function oj(e,t){const n=Hl(!1),r=Au(n,"/get-session",e,{method:"GET"});return vA(r,()=>{const a=nj({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),()=>{a.cleanup()}}),{session:r,$sessionSignal:n}}const aj=(e,t)=>{const n="credentials"in Request.prototype,r=mL(e?.baseURL,e?.basePath)??"/api/auth",a=e?.plugins?.flatMap(O=>O.fetchPlugins).filter(O=>O!==void 0)||[],i={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:l,onError:u,onRequest:d,onResponse:f,...m}=e?.fetchOptions||{},p=KL({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?SL(O,{strict:!1}):null},customFetchImpl:fetch,...m,plugins:[i,...m.plugins||[],...e?.disableDefaultFetchPlugins?[]:[rj],...a]}),{$sessionSignal:g,session:y}=oj(p,e),b=e?.plugins||[];let S={},w={$sessionSignal:g,session:y},R={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const E=[{signal:"$sessionSignal",matcher(O){return O==="/sign-out"||O==="/update-user"||O==="/sign-up/email"||O==="/sign-in/email"||O==="/delete-user"||O==="/verify-email"||O==="/revoke-sessions"||O==="/revoke-session"||O==="/change-email"}}];for(const O of b)O.getAtoms&&Object.assign(w,O.getAtoms?.(p)),O.pathMethods&&Object.assign(R,O.pathMethods),O.atomListeners&&E.push(...O.atomListeners);const T={notify:O=>{w[O].set(!w[O].get())},listen:(O,C)=>{w[O].subscribe(C)},atoms:w};for(const O of b)O.getActions&&Object.assign(S,O.getActions?.(p,T,e));return{get baseURL(){return r},pluginsActions:S,pluginsAtoms:w,pluginPathMethods:R,atomListeners:E,$fetch:p,$store:T}};function sj(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function ij(e,t,n){const r=t[e],{fetchOptions:a,query:i,...l}=n||{};return r||(a?.method?a.method:l&&Object.keys(l).length>0?"POST":"GET")}function lj(e,t,n,r,a){function i(l=[]){return new Proxy(function(){},{get(u,d){if(typeof d!="string"||d==="then"||d==="catch"||d==="finally")return;const f=[...l,d];let m=e;for(const p of f)if(m&&typeof m=="object"&&p in m)m=m[p];else{m=void 0;break}return typeof m=="function"||sj(m)?m:i(f)},apply:async(u,d,f)=>{const m="/"+l.map(E=>E.replace(/[A-Z]/g,T=>`-${T.toLowerCase()}`)).join("/"),p=f[0]||{},g=f[1]||{},{query:y,fetchOptions:b,...S}=p,w={...g,...b},R=ij(m,n,p);return await t(m,{...w,body:R==="GET"?void 0:{...S,...w?.body||{}},query:y||w?.query,method:R,async onSuccess(E){if(await w?.onSuccess?.(E),!a||w.disableSignal)return;const T=a.filter(O=>O.matcher(m));if(T.length)for(const O of T){const C=r[O.signal];if(!C)return;const I=C.get();setTimeout(()=>{C.set(!I)},10)}}})}})}return i()}function cj(e,t={}){let n=A.useRef(e.get());const{keys:r,deps:a=[e,r]}=t;let i=A.useCallback(u=>{const d=f=>{n.current!==f&&(n.current=f,u())};return d(e.value),r?.length?TL(e,r,d):e.listen(d)},a),l=()=>n.current;return A.useSyncExternalStore(i,l,l)}function uj(e){return`use${dj(e)}`}function dj(e){return e.charAt(0).toUpperCase()+e.slice(1)}function fj(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:a,$store:i,atomListeners:l}=aj(e);let u={};for(const[d,f]of Object.entries(r))u[uj(d)]=()=>cj(f);return lj({...n,...u,$fetch:a,$store:i},a,t,r,l)}function hj(e){return{authorize(t,n="AND"){let r=!1;for(const[a,i]of Object.entries(t)){const l=e[a];if(!l)return{success:!1,error:`You are not allowed to access resource: ${a}`};if(Array.isArray(i))r=i.every(u=>l.includes(u));else if(typeof i=="object"){const u=i;u.connector==="OR"?r=u.actions.some(d=>l.includes(d)):r=u.actions.every(d=>l.includes(d))}else throw new Uu("Invalid access control request");if(r&&n==="OR")return{success:r};if(!r&&n==="AND")return{success:!1,error:`unauthorized to access resource "${a}"`}}return r?{success:r}:{success:!1,error:"Not authorized"}},statements:e}}function wA(e){return{newRole(t){return hj(t)},statements:e}}const pj={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},SA=wA(pj),EA=SA.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),RA=SA.newRole({user:[],session:[]}),mj={admin:EA,user:RA},gj=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),n=e.options?.roles||mj;for(const r of t)if(n[r]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},vj={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},bb=wA(vj),xA=bb.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),TA=bb.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),OA=bb.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),yj={admin:xA,owner:TA,member:OA},_j=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),r=e.options.creatorRole||"owner",a=n.includes(r),i=e.allowCreatorAllPermissions||!1;if(a&&i)return!0;for(const l of n)if(t[l]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},bj=e=>{const t={admin:EA,user:RA,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>gj({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},wj=()=>({id:"magic-link",$InferServerPlugin:{}}),Sj=e=>_j(e,e.options.roles||yj),Ej=e=>{const t=Hl(!1),n=Hl(!1),r=Hl(!1),a=Hl(!1),i={admin:xA,member:OA,owner:TA,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(l,u,d)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:f=>Sj({role:f.role,options:{ac:e?.ac,roles:i},permissions:f.permissions??f.permission})}}),getAtoms:l=>{const u=Au(t,"/organization/list",l,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:a,activeOrganization:Au([n],"/organization/get-full-organization",l,()=>({method:"GET"})),listOrganizations:u,activeMember:Au([r],"/organization/get-active-member",l,{method:"GET"}),activeMemberRole:Au([a],"/organization/get-active-member-role",l,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(l){return l==="/organization/create"||l==="/organization/delete"||l==="/organization/update"},signal:"$listOrg"},{matcher(l){return l.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(l){return l.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},Rj=e=>({id:"sso-client",$InferServerPlugin:{}}),xj=fj({plugins:[Ej({}),bj(),Rj(),wj()]});function CA(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=CA(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function AA(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=CA(e))&&(r&&(r+=" "),r+=t);return r}const Tj=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Oj=(e,t)=>({classGroupId:e,validator:t}),IA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Pp="-",$x=[],Cj="arbitrary..",Aj=e=>{const t=Nj(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Ij(l);const u=l.split(Pp),d=u[0]===""&&u.length>1?1:0;return NA(u,d,t)},getConflictingClassGroupIds:(l,u)=>{if(u){const d=r[l],f=n[l];return d?f?Tj(f,d):d:f||$x}return n[l]||$x}}},NA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const f=NA(e,t+1,i);if(f)return f}const l=n.validators;if(l===null)return;const u=t===0?e.join(Pp):e.slice(t).join(Pp),d=l.length;for(let f=0;f<d;f++){const m=l[f];if(m.validator(u))return m.classGroupId}},Ij=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Cj+r:void 0})(),Nj=e=>{const{theme:t,classGroups:n}=e;return kj(n,t)},kj=(e,t)=>{const n=IA();for(const r in e){const a=e[r];wb(a,n,r,t)}return n},wb=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const l=e[i];Mj(l,t,n,r)}},Mj=(e,t,n,r)=>{if(typeof e=="string"){Pj(e,t,n);return}if(typeof e=="function"){Dj(e,t,n,r);return}Lj(e,t,n,r)},Pj=(e,t,n)=>{const r=e===""?t:kA(t,e);r.classGroupId=n},Dj=(e,t,n,r)=>{if(jj(e)){wb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Oj(n,e))},Lj=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let l=0;l<i;l++){const[u,d]=a[l];wb(d,kA(t,u),n,r)}},kA=(e,t)=>{let n=e;const r=t.split(Pp),a=r.length;for(let i=0;i<a;i++){const l=r[i];let u=n.nextPart.get(l);u||(u=IA(),n.nextPart.set(l,u)),n=u}return n},jj=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,$j=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,l)=>{n[i]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return a(i,l),l},set(i,l){i in n?n[i]=l:a(i,l)}}},n_="!",Ux=":",Uj=[],zx=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),zj=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let l=0,u=0,d=0,f;const m=a.length;for(let S=0;S<m;S++){const w=a[S];if(l===0&&u===0){if(w===Ux){i.push(a.slice(d,S)),d=S+1;continue}if(w==="/"){f=S;continue}}w==="["?l++:w==="]"?l--:w==="("?u++:w===")"&&u--}const p=i.length===0?a:a.slice(d);let g=p,y=!1;p.endsWith(n_)?(g=p.slice(0,-1),y=!0):p.startsWith(n_)&&(g=p.slice(1),y=!0);const b=f&&f>d?f-d:void 0;return zx(i,y,g,b)};if(t){const a=t+Ux,i=r;r=l=>l.startsWith(a)?i(l.slice(a.length)):zx(Uj,!1,l,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},Fj=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let i=0;i<n.length;i++){const l=n[i],u=l[0]==="[",d=t.has(l);u||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(l)):a.push(l)}return a.length>0&&(a.sort(),r.push(...a)),r}},Vj=e=>({cache:$j(e.cacheSize),parseClassName:zj(e),sortModifiers:Fj(e),...Aj(e)}),Bj=/\s+/,qj=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,l=[],u=e.trim().split(Bj);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:S}=n(m);if(p){d=m+(d.length>0?" "+d:d);continue}let w=!!S,R=r(w?b.substring(0,S):b);if(!R){if(!w){d=m+(d.length>0?" "+d:d);continue}if(R=r(b),!R){d=m+(d.length>0?" "+d:d);continue}w=!1}const E=g.length===0?"":g.length===1?g[0]:i(g).join(":"),T=y?E+n_:E,O=T+R;if(l.indexOf(O)>-1)continue;l.push(O);const C=a(R,w);for(let I=0;I<C.length;++I){const N=C[I];l.push(T+N)}d=m+(d.length>0?" "+d:d)}return d},Hj=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=MA(n))&&(a&&(a+=" "),a+=r);return a},MA=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=MA(e[r]))&&(n&&(n+=" "),n+=t);return n},Gj=(e,...t)=>{let n,r,a,i;const l=d=>{const f=t.reduce((m,p)=>p(m),e());return n=Vj(f),r=n.cache.get,a=n.cache.set,i=u,u(d)},u=d=>{const f=r(d);if(f)return f;const m=qj(d,n);return a(d,m),m};return i=l,(...d)=>i(Hj(...d))},Zj=[],Un=e=>{const t=n=>n[e]||Zj;return t.isThemeGetter=!0,t},PA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,DA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Kj=/^\d+\/\d+$/,Yj=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Wj=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Qj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Cl=e=>Kj.test(e),ft=e=>!!e&&!Number.isNaN(Number(e)),Ss=e=>!!e&&Number.isInteger(Number(e)),Fy=e=>e.endsWith("%")&&ft(e.slice(0,-1)),Pa=e=>Yj.test(e),e$=()=>!0,t$=e=>Wj.test(e)&&!Qj.test(e),LA=()=>!1,n$=e=>Xj.test(e),r$=e=>Jj.test(e),o$=e=>!Ue(e)&&!ze(e),a$=e=>gc(e,UA,LA),Ue=e=>PA.test(e),pi=e=>gc(e,zA,t$),Vy=e=>gc(e,u$,ft),Fx=e=>gc(e,jA,LA),s$=e=>gc(e,$A,r$),rh=e=>gc(e,FA,n$),ze=e=>DA.test(e),yu=e=>vc(e,zA),i$=e=>vc(e,d$),Vx=e=>vc(e,jA),l$=e=>vc(e,UA),c$=e=>vc(e,$A),oh=e=>vc(e,FA,!0),gc=(e,t,n)=>{const r=PA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},vc=(e,t,n=!1)=>{const r=DA.exec(e);return r?r[1]?t(r[1]):n:!1},jA=e=>e==="position"||e==="percentage",$A=e=>e==="image"||e==="url",UA=e=>e==="length"||e==="size"||e==="bg-size",zA=e=>e==="length",u$=e=>e==="number",d$=e=>e==="family-name",FA=e=>e==="shadow",f$=()=>{const e=Un("color"),t=Un("font"),n=Un("text"),r=Un("font-weight"),a=Un("tracking"),i=Un("leading"),l=Un("breakpoint"),u=Un("container"),d=Un("spacing"),f=Un("radius"),m=Un("shadow"),p=Un("inset-shadow"),g=Un("text-shadow"),y=Un("drop-shadow"),b=Un("blur"),S=Un("perspective"),w=Un("aspect"),R=Un("ease"),E=Un("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...O(),ze,Ue],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],P=()=>[ze,Ue,d],$=()=>[Cl,"full","auto",...P()],K=()=>[Ss,"none","subgrid",ze,Ue],F=()=>["auto",{span:["full",Ss,ze,Ue]},Ss,ze,Ue],G=()=>[Ss,"auto",ze,Ue],U=()=>["auto","min","max","fr",ze,Ue],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...P()],Y=()=>[Cl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],W=()=>[e,ze,Ue],he=()=>[...O(),Vx,Fx,{position:[ze,Ue]}],ae=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",l$,a$,{size:[ze,Ue]}],q=()=>[Fy,yu,pi],V=()=>["","none","full",f,ze,Ue],D=()=>["",ft,yu,pi],z=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[ft,Fy,Vx,Fx],ve=()=>["","none",b,ze,Ue],Ie=()=>["none",ft,ze,Ue],Ae=()=>["none",ft,ze,Ue],H=()=>[ft,ze,Ue],ne=()=>[Cl,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pa],breakpoint:[Pa],color:[e$],container:[Pa],"drop-shadow":[Pa],ease:["in","out","in-out"],font:[o$],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pa],shadow:[Pa],spacing:["px",ft],text:[Pa],"text-shadow":[Pa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Cl,Ue,ze,w]}],container:["container"],columns:[{columns:[ft,Ue,ze,u]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Ss,"auto",ze,Ue]}],basis:[{basis:[Cl,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ft,Cl,"auto","initial","none",Ue]}],grow:[{grow:["",ft,ze,Ue]}],shrink:[{shrink:["",ft,ze,Ue]}],order:[{order:[Ss,"first","last","none",ze,Ue]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],w:[{w:[u,"screen",...Y()]}],"min-w":[{"min-w":[u,"screen","none",...Y()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[l]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,yu,pi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ze,Vy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fy,Ue]}],"font-family":[{font:[i$,Ue,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ze,Ue]}],"line-clamp":[{"line-clamp":[ft,"none",ze,Vy]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",ze,Ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ze,Ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:W()}],"text-color":[{text:W()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:[ft,"from-font","auto",ze,pi]}],"text-decoration-color":[{decoration:W()}],"underline-offset":[{"underline-offset":[ft,"auto",ze,Ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ze,Ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ze,Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:he()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ss,ze,Ue],radial:["",ze,Ue],conic:[Ss,ze,Ue]},c$,s$]}],"bg-color":[{bg:W()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:W()}],"gradient-via":[{via:W()}],"gradient-to":[{to:W()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...z(),"hidden","none"]}],"divide-style":[{divide:[...z(),"hidden","none"]}],"border-color":[{border:W()}],"border-color-x":[{"border-x":W()}],"border-color-y":[{"border-y":W()}],"border-color-s":[{"border-s":W()}],"border-color-e":[{"border-e":W()}],"border-color-t":[{"border-t":W()}],"border-color-r":[{"border-r":W()}],"border-color-b":[{"border-b":W()}],"border-color-l":[{"border-l":W()}],"divide-color":[{divide:W()}],"outline-style":[{outline:[...z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ft,ze,Ue]}],"outline-w":[{outline:["",ft,yu,pi]}],"outline-color":[{outline:W()}],shadow:[{shadow:["","none",m,oh,rh]}],"shadow-color":[{shadow:W()}],"inset-shadow":[{"inset-shadow":["none",p,oh,rh]}],"inset-shadow-color":[{"inset-shadow":W()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:W()}],"ring-offset-w":[{"ring-offset":[ft,pi]}],"ring-offset-color":[{"ring-offset":W()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":W()}],"text-shadow":[{"text-shadow":["none",g,oh,rh]}],"text-shadow-color":[{"text-shadow":W()}],opacity:[{opacity:[ft,ze,Ue]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ft]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":W()}],"mask-image-linear-to-color":[{"mask-linear-to":W()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":W()}],"mask-image-t-to-color":[{"mask-t-to":W()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":W()}],"mask-image-r-to-color":[{"mask-r-to":W()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":W()}],"mask-image-b-to-color":[{"mask-b-to":W()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":W()}],"mask-image-l-to-color":[{"mask-l-to":W()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":W()}],"mask-image-x-to-color":[{"mask-x-to":W()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":W()}],"mask-image-y-to-color":[{"mask-y-to":W()}],"mask-image-radial":[{"mask-radial":[ze,Ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":W()}],"mask-image-radial-to-color":[{"mask-radial-to":W()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[ft]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":W()}],"mask-image-conic-to-color":[{"mask-conic-to":W()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:he()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ze,Ue]}],filter:[{filter:["","none",ze,Ue]}],blur:[{blur:ve()}],brightness:[{brightness:[ft,ze,Ue]}],contrast:[{contrast:[ft,ze,Ue]}],"drop-shadow":[{"drop-shadow":["","none",y,oh,rh]}],"drop-shadow-color":[{"drop-shadow":W()}],grayscale:[{grayscale:["",ft,ze,Ue]}],"hue-rotate":[{"hue-rotate":[ft,ze,Ue]}],invert:[{invert:["",ft,ze,Ue]}],saturate:[{saturate:[ft,ze,Ue]}],sepia:[{sepia:["",ft,ze,Ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ze,Ue]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[ft,ze,Ue]}],"backdrop-contrast":[{"backdrop-contrast":[ft,ze,Ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ft,ze,Ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ft,ze,Ue]}],"backdrop-invert":[{"backdrop-invert":["",ft,ze,Ue]}],"backdrop-opacity":[{"backdrop-opacity":[ft,ze,Ue]}],"backdrop-saturate":[{"backdrop-saturate":[ft,ze,Ue]}],"backdrop-sepia":[{"backdrop-sepia":["",ft,ze,Ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ze,Ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ft,"initial",ze,Ue]}],ease:[{ease:["linear","initial",R,ze,Ue]}],delay:[{delay:[ft,ze,Ue]}],animate:[{animate:["none",E,ze,Ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,ze,Ue]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:H()}],"skew-x":[{"skew-x":H()}],"skew-y":[{"skew-y":H()}],transform:[{transform:[ze,Ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:W()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:W()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ze,Ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ze,Ue]}],fill:[{fill:["none",...W()]}],"stroke-w":[{stroke:[ft,yu,pi,Vy]}],stroke:[{stroke:["none",...W()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},h$=Gj(f$),p$=Object.freeze({status:"aborted"});function ye(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=l.prototype,m=Object.keys(f);for(let p=0;p<m.length;p++){const g=m[p];g in u||(u[g]=f[g].bind(u))}}const a=n?.Parent??Object;class i extends a{}Object.defineProperty(i,"name",{value:e});function l(u){var d;const f=n?.Parent?new i:this;r(f,u),(d=f._zod).deferred??(d.deferred=[]);for(const m of f._zod.deferred)m();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Wl extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class VA extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const BA={};function zs(e){return BA}function qA(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function r_(e,t){return typeof t=="bigint"?t.toString():t}function Cm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function pd(e){return e==null}function Sb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function m$(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let a=(r.split(".")[1]||"").length;if(a===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(a=Number.parseInt(d[1]))}const i=n>a?n:a,l=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return l%u/10**i}const Bx=Symbol("evaluating");function Et(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Bx)return r===void 0&&(r=Bx,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function $i(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Zs(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function qx(e){return JSON.stringify(e)}function g$(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const HA="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Qu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const v$=Cm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function oc(e){if(Qu(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Qu(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function GA(e){return oc(e)?{...e}:Array.isArray(e)?[...e]:e}const y$=new Set(["string","number","symbol"]);function ac(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ks(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Le(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function _$(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const b$={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function w$(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Zs(e._zod.def,{get shape(){const l={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(l[u]=n.shape[u])}return $i(this,"shape",l),l},checks:[]});return Ks(e,i)}function S$(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Zs(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete l[u]}return $i(this,"shape",l),l},checks:[]});return Ks(e,i)}function E$(e,t){if(!oc(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Zs(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return $i(this,"shape",i),i}});return Ks(e,a)}function R$(e,t){if(!oc(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Zs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return $i(this,"shape",r),r}});return Ks(e,n)}function x$(e,t){const n=Zs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return $i(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Ks(e,n)}function T$(e,t,n){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Zs(t._zod.def,{get shape(){const u=t._zod.def.shape,d={...u};if(n)for(const f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(const f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return $i(this,"shape",d),d},checks:[]});return Ks(t,l)}function O$(e,t,n){const r=Zs(t._zod.def,{get shape(){const a=t._zod.def.shape,i={...a};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(i[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l in a)i[l]=new e({type:"nonoptional",innerType:a[l]});return $i(this,"shape",i),i}});return Ks(t,r)}function Gl(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function xi(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function ah(e){return typeof e=="string"?e:e?.message}function Fs(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const a=ah(e.inst?._zod.def?.error?.(e))??ah(t?.error?.(e))??ah(n.customError?.(e))??ah(n.localeError?.(e))??"Invalid input";r.message=a}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function ZA(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Eb(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Xu(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const KA=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,r_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Rb=ye("$ZodError",KA),Am=ye("$ZodError",KA,{Parent:Error});function C$(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function A$(e,t=n=>n.message){const n={_errors:[]},r=a=>{for(const i of a.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(l=>r({issues:l}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let l=n,u=0;for(;u<i.path.length;){const d=i.path[u];u===i.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(i))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}};return r(e),n}const Im=e=>(t,n,r,a)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new Wl;if(l.issues.length){const u=new(a?.Err??e)(l.issues.map(d=>Fs(d,i,zs())));throw HA(u,a?.callee),u}return l.value},I$=Im(Am),Nm=e=>async(t,n,r,a)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const u=new(a?.Err??e)(l.issues.map(d=>Fs(d,i,zs())));throw HA(u,a?.callee),u}return l.value},N$=Nm(Am),km=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new Wl;return i.issues.length?{success:!1,error:new(e??Rb)(i.issues.map(l=>Fs(l,a,zs())))}:{success:!0,data:i.value}},YA=km(Am),Mm=e=>async(t,n,r)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(l=>Fs(l,a,zs())))}:{success:!0,data:i.value}},k$=Mm(Am),M$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Im(e)(t,n,a)},P$=e=>(t,n,r)=>Im(e)(t,n,r),D$=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Nm(e)(t,n,a)},L$=e=>async(t,n,r)=>Nm(e)(t,n,r),j$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return km(e)(t,n,a)},$$=e=>(t,n,r)=>km(e)(t,n,r),U$=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Mm(e)(t,n,a)},z$=e=>async(t,n,r)=>Mm(e)(t,n,r),F$=/^[cC][^\s-]{8,}$/,V$=/^[0-9a-z]+$/,B$=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,q$=/^[0-9a-vA-V]{20}$/,H$=/^[A-Za-z0-9]{27}$/,G$=/^[a-zA-Z0-9_-]{21}$/,Z$=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,K$=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Hx=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Y$=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,W$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Q$(){return new RegExp(W$,"u")}const X$=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,J$=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,e8=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,t8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,n8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,WA=/^[A-Za-z0-9_-]*$/,r8=/^\+[1-9]\d{6,14}$/,QA="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",o8=new RegExp(`^${QA}$`);function XA(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function a8(e){return new RegExp(`^${XA(e)}$`)}function s8(e){const t=XA({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${QA}T(?:${r})$`)}const i8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},l8=/^-?\d+$/,JA=/^-?\d+(?:\.\d+)?$/,c8=/^(?:true|false)$/i,u8=/^null$/i,d8=/^[^A-Z]*$/,f8=/^[^a-z]*$/,ir=ye("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),eI={number:"number",bigint:"bigint",object:"date"},tI=ye("$ZodCheckLessThan",(e,t)=>{ir.init(e,t);const n=eI[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?a.maximum=t.value:a.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nI=ye("$ZodCheckGreaterThan",(e,t)=>{ir.init(e,t);const n=eI[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),h8=ye("$ZodCheckMultipleOf",(e,t)=>{ir.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):m$(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),p8=ye("$ZodCheckNumberFormat",(e,t)=>{ir.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[a,i]=b$[t.format];e._zod.onattach.push(l=>{const u=l._zod.bag;u.format=t.format,u.minimum=a,u.maximum=i,n&&(u.pattern=l8)}),e._zod.check=l=>{const u=l.value;if(n){if(!Number.isInteger(u)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?l.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):l.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}u<a&&l.issues.push({origin:"number",input:u,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),u>i&&l.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),m8=ye("$ZodCheckMaxSize",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!pd(a)&&a.size!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;a.size<=t.maximum||r.issues.push({origin:ZA(a),code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),g8=ye("$ZodCheckMinSize",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!pd(a)&&a.size!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;a.size>=t.minimum||r.issues.push({origin:ZA(a),code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),v8=ye("$ZodCheckMaxLength",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!pd(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;if(a.length<=t.maximum)return;const l=Eb(a);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),y8=ye("$ZodCheckMinLength",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!pd(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;if(a.length>=t.minimum)return;const l=Eb(a);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),_8=ye("$ZodCheckLengthEquals",(e,t)=>{var n;ir.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!pd(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=r=>{const a=r.value,i=a.length;if(i===t.length)return;const l=Eb(a),u=i>t.length;r.issues.push({origin:l,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Pm=ye("$ZodCheckStringFormat",(e,t)=>{var n,r;ir.init(e,t),e._zod.onattach.push(a=>{const i=a._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),b8=ye("$ZodCheckRegex",(e,t)=>{Pm.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),w8=ye("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=d8),Pm.init(e,t)}),S8=ye("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=f8),Pm.init(e,t)}),E8=ye("$ZodCheckIncludes",(e,t)=>{ir.init(e,t);const n=ac(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),R8=ye("$ZodCheckStartsWith",(e,t)=>{ir.init(e,t);const n=new RegExp(`^${ac(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),x8=ye("$ZodCheckEndsWith",(e,t)=>{ir.init(e,t);const n=new RegExp(`.*${ac(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),T8=ye("$ZodCheckMimeType",(e,t)=>{ir.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),O8=ye("$ZodCheckOverwrite",(e,t)=>{ir.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class C8{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
11
|
+
`).filter(l=>l),a=Math.min(...r.map(l=>l.length-l.trimStart().length)),i=r.map(l=>l.slice(a)).map(l=>" ".repeat(this.indent*2)+l);for(const l of i)this.content.push(l)}compile(){const t=Function,n=this?.args,a=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,a.join(`
|
|
12
|
+
`))}}const A8={major:4,minor:3,patch:5},Vt=ye("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=A8;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const a of r)for(const i of a._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const a=(l,u,d)=>{let f=Gl(l),m;for(const p of u){if(p._zod.def.when){if(!p._zod.def.when(l))continue}else if(f)continue;const g=l.issues.length,y=p._zod.check(l);if(y instanceof Promise&&d?.async===!1)throw new Wl;if(m||y instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await y,l.issues.length!==g&&(f||(f=Gl(l,g)))});else{if(l.issues.length===g)continue;f||(f=Gl(l,g))}}return m?m.then(()=>l):l},i=(l,u,d)=>{if(Gl(l))return l.aborted=!0,l;const f=a(u,r,d);if(f instanceof Promise){if(d.async===!1)throw new Wl;return f.then(m=>e._zod.parse(m,d))}return e._zod.parse(f,d)};e._zod.run=(l,u)=>{if(u.skipChecks)return e._zod.parse(l,u);if(u.direction==="backward"){const f=e._zod.parse({value:l.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(m=>i(m,l,u)):i(f,l,u)}const d=e._zod.parse(l,u);if(d instanceof Promise){if(u.async===!1)throw new Wl;return d.then(f=>a(f,r,u))}return a(d,r,u)}}Et(e,"~standard",()=>({validate:a=>{try{const i=YA(e,a);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return k$(e,a).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),xb=ye("$ZodString",(e,t)=>{Vt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??i8(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ln=ye("$ZodStringFormat",(e,t)=>{Pm.init(e,t),xb.init(e,t)}),I8=ye("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=K$),ln.init(e,t)}),N8=ye("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Hx(r))}else t.pattern??(t.pattern=Hx());ln.init(e,t)}),k8=ye("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Y$),ln.init(e,t)}),M8=ye("$ZodURL",(e,t)=>{ln.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),a=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=a.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),P8=ye("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Q$()),ln.init(e,t)}),D8=ye("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=G$),ln.init(e,t)}),L8=ye("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=F$),ln.init(e,t)}),j8=ye("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=V$),ln.init(e,t)}),$8=ye("$ZodULID",(e,t)=>{t.pattern??(t.pattern=B$),ln.init(e,t)}),U8=ye("$ZodXID",(e,t)=>{t.pattern??(t.pattern=q$),ln.init(e,t)}),z8=ye("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=H$),ln.init(e,t)}),F8=ye("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=s8(t)),ln.init(e,t)}),V8=ye("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=o8),ln.init(e,t)}),B8=ye("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=a8(t)),ln.init(e,t)}),q8=ye("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Z$),ln.init(e,t)}),H8=ye("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=X$),ln.init(e,t),e._zod.bag.format="ipv4"}),G8=ye("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=J$),ln.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Z8=ye("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=e8),ln.init(e,t)}),K8=ye("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=t8),ln.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[a,i]=r;if(!i)throw new Error;const l=Number(i);if(`${l}`!==i)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${a}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function rI(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Y8=ye("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=n8),ln.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{rI(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function W8(e){if(!WA.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return rI(n)}const Q8=ye("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=WA),ln.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{W8(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),X8=ye("$ZodE164",(e,t)=>{t.pattern??(t.pattern=r8),ln.init(e,t)});function J8(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const a=JSON.parse(atob(r));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const e9=ye("$ZodJWT",(e,t)=>{ln.init(e,t),e._zod.check=n=>{J8(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),oI=ye("$ZodNumber",(e,t)=>{Vt.init(e,t),e._zod.pattern=e._zod.bag.pattern??JA,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const a=n.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return n;const i=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...i?{received:i}:{}}),n}}),t9=ye("$ZodNumberFormat",(e,t)=>{p8.init(e,t),oI.init(e,t)}),n9=ye("$ZodBoolean",(e,t)=>{Vt.init(e,t),e._zod.pattern=c8,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const a=n.value;return typeof a=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}}),r9=ye("$ZodNull",(e,t)=>{Vt.init(e,t),e._zod.pattern=u8,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const a=n.value;return a===null||n.issues.push({expected:"null",code:"invalid_type",input:a,inst:e}),n}}),o9=ye("$ZodAny",(e,t)=>{Vt.init(e,t),e._zod.parse=n=>n}),a9=ye("$ZodUnknown",(e,t)=>{Vt.init(e,t),e._zod.parse=n=>n}),s9=ye("$ZodNever",(e,t)=>{Vt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Gx(e,t,n){e.issues.length&&t.issues.push(...xi(n,e.issues)),t.value[n]=e.value}const i9=ye("$ZodArray",(e,t)=>{Vt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const i=[];for(let l=0;l<a.length;l++){const u=a[l],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?i.push(d.then(f=>Gx(f,n,l))):Gx(d,n,l)}return i.length?Promise.all(i).then(()=>n):n}});function Dp(e,t,n,r,a){if(e.issues.length){if(a&&!(n in r))return;t.issues.push(...xi(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function aI(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=_$(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function sI(e,t,n,r,a,i){const l=[],u=a.keySet,d=a.catchall._zod,f=d.def.type,m=d.optout==="optional";for(const p in t){if(u.has(p))continue;if(f==="never"){l.push(p);continue}const g=d.run({value:t[p],issues:[]},r);g instanceof Promise?e.push(g.then(y=>Dp(y,n,p,t,m))):Dp(g,n,p,t,m)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const l9=ye("$ZodObject",(e,t)=>{if(Vt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...u};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=Cm(()=>aI(t));Et(e._zod,"propValues",()=>{const u=t.shape,d={};for(const f in u){const m=u[f]._zod;if(m.values){d[f]??(d[f]=new Set);for(const p of m.values)d[f].add(p)}}return d});const a=Qu,i=t.catchall;let l;e._zod.parse=(u,d)=>{l??(l=r.value);const f=u.value;if(!a(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value={};const m=[],p=l.shape;for(const g of l.keys){const y=p[g],b=y._zod.optout==="optional",S=y._zod.run({value:f[g],issues:[]},d);S instanceof Promise?m.push(S.then(w=>Dp(w,u,g,f,b))):Dp(S,u,g,f,b)}return i?sI(m,f,u,d,r.value,e):m.length?Promise.all(m).then(()=>u):u}}),c9=ye("$ZodObjectJIT",(e,t)=>{l9.init(e,t);const n=e._zod.parse,r=Cm(()=>aI(t)),a=g=>{const y=new C8(["shape","payload","ctx"]),b=r.value,S=T=>{const O=qx(T);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};y.write("const input = payload.value;");const w=Object.create(null);let R=0;for(const T of b.keys)w[T]=`key_${R++}`;y.write("const newResult = {};");for(const T of b.keys){const O=w[T],C=qx(T),N=g[T]?._zod?.optout==="optional";y.write(`const ${O} = ${S(T)};`),N?y.write(`
|
|
13
|
+
if (${O}.issues.length) {
|
|
14
|
+
if (${C} in input) {
|
|
15
|
+
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
16
|
+
...iss,
|
|
17
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
18
|
+
})));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (${O}.value === undefined) {
|
|
23
|
+
if (${C} in input) {
|
|
24
|
+
newResult[${C}] = undefined;
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
newResult[${C}] = ${O}.value;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
`):y.write(`
|
|
31
|
+
if (${O}.issues.length) {
|
|
32
|
+
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
33
|
+
...iss,
|
|
34
|
+
path: iss.path ? [${C}, ...iss.path] : [${C}]
|
|
35
|
+
})));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (${O}.value === undefined) {
|
|
39
|
+
if (${C} in input) {
|
|
40
|
+
newResult[${C}] = undefined;
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
newResult[${C}] = ${O}.value;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
`)}y.write("payload.value = newResult;"),y.write("return payload;");const E=y.compile();return(T,O)=>E(g,T,O)};let i;const l=Qu,u=!BA.jitless,f=u&&v$.value,m=t.catchall;let p;e._zod.parse=(g,y)=>{p??(p=r.value);const b=g.value;return l(b)?u&&f&&y?.async===!1&&y.jitless!==!0?(i||(i=a(t.shape)),g=i(g,y),m?sI([],b,g,y,p,e):g):n(g,y):(g.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),g)}});function Zx(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const a=e.filter(i=>!Gl(i));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(l=>Fs(l,r,zs())))}),t)}const iI=ye("$ZodUnion",(e,t)=>{Vt.init(e,t),Et(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),Et(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),Et(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),Et(e._zod,"pattern",()=>{if(t.options.every(a=>a._zod.pattern)){const a=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${a.map(i=>Sb(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(a,i)=>{if(n)return r(a,i);let l=!1;const u=[];for(const d of t.options){const f=d._zod.run({value:a.value,issues:[]},i);if(f instanceof Promise)u.push(f),l=!0;else{if(f.issues.length===0)return f;u.push(f)}}return l?Promise.all(u).then(d=>Zx(d,a,e,i)):Zx(u,a,e,i)}}),u9=ye("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,iI.init(e,t);const n=e._zod.parse;Et(e._zod,"propValues",()=>{const a={};for(const i of t.options){const l=i._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[u,d]of Object.entries(l)){a[u]||(a[u]=new Set);for(const f of d)a[u].add(f)}}return a});const r=Cm(()=>{const a=t.options,i=new Map;for(const l of a){const u=l._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const d of u){if(i.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);i.set(d,l)}}return i});e._zod.parse=(a,i)=>{const l=a.value;if(!Qu(l))return a.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),a;const u=r.value.get(l?.[t.discriminator]);return u?u._zod.run(a,i):t.unionFallback?n(a,i):(a.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),a)}}),d9=ye("$ZodIntersection",(e,t)=>{Vt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value,i=t.left._zod.run({value:a,issues:[]},r),l=t.right._zod.run({value:a,issues:[]},r);return i instanceof Promise||l instanceof Promise?Promise.all([i,l]).then(([d,f])=>Kx(n,d,f)):Kx(n,i,l)}});function o_(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(oc(e)&&oc(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),a={...e,...t};for(const i of r){const l=o_(e[i],t[i]);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};a[i]=l.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const a=e[r],i=t[r],l=o_(a,i);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Kx(e,t,n){const r=new Map;let a;for(const u of t.issues)if(u.code==="unrecognized_keys"){a??(a=u);for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(u);const i=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(i.length&&a&&e.issues.push({...a,keys:i}),Gl(e))return e;const l=o_(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const f9=ye("$ZodTuple",(e,t)=>{Vt.init(e,t);const n=t.items;e._zod.parse=(r,a)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const l=[],u=[...n].reverse().findIndex(m=>m._zod.optin!=="optional"),d=u===-1?0:n.length-u;if(!t.rest){const m=i.length>n.length,p=i.length<d-1;if(m||p)return r.issues.push({...m?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),r}let f=-1;for(const m of n){if(f++,f>=i.length&&f>=d)continue;const p=m._zod.run({value:i[f],issues:[]},a);p instanceof Promise?l.push(p.then(g=>sh(g,r,f))):sh(p,r,f)}if(t.rest){const m=i.slice(n.length);for(const p of m){f++;const g=t.rest._zod.run({value:p,issues:[]},a);g instanceof Promise?l.push(g.then(y=>sh(y,r,f))):sh(g,r,f)}}return l.length?Promise.all(l).then(()=>r):r}});function sh(e,t,n){e.issues.length&&t.issues.push(...xi(n,e.issues)),t.value[n]=e.value}const h9=ye("$ZodRecord",(e,t)=>{Vt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!oc(a))return n.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),n;const i=[],l=t.keyType._zod.values;if(l){n.value={};const u=new Set;for(const f of l)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){u.add(typeof f=="number"?f.toString():f);const m=t.valueType._zod.run({value:a[f],issues:[]},r);m instanceof Promise?i.push(m.then(p=>{p.issues.length&&n.issues.push(...xi(f,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...xi(f,m.issues)),n.value[f]=m.value)}let d;for(const f in a)u.has(f)||(d=d??[],d.push(f));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:d})}else{n.value={};for(const u of Reflect.ownKeys(a)){if(u==="__proto__")continue;let d=t.keyType._zod.run({value:u,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&JA.test(u)&&d.issues.length&&d.issues.some(p=>p.code==="invalid_type"&&p.expected==="number")){const p=t.keyType._zod.run({value:Number(u),issues:[]},r);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(d=p)}if(d.issues.length){t.mode==="loose"?n.value[u]=a[u]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>Fs(p,r,zs())),input:u,path:[u],inst:e});continue}const m=t.valueType._zod.run({value:a[u],issues:[]},r);m instanceof Promise?i.push(m.then(p=>{p.issues.length&&n.issues.push(...xi(u,p.issues)),n.value[d.value]=p.value})):(m.issues.length&&n.issues.push(...xi(u,m.issues)),n.value[d.value]=m.value)}}return i.length?Promise.all(i).then(()=>n):n}}),p9=ye("$ZodEnum",(e,t)=>{Vt.init(e,t);const n=qA(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(a=>y$.has(typeof a)).map(a=>typeof a=="string"?ac(a):a.toString()).join("|")})$`),e._zod.parse=(a,i)=>{const l=a.value;return r.has(l)||a.issues.push({code:"invalid_value",values:n,input:l,inst:e}),a}}),m9=ye("$ZodLiteral",(e,t)=>{if(Vt.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?ac(r):r?ac(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,a)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),g9=ye("$ZodFile",(e,t)=>{Vt.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;return a instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:a,inst:e}),n}}),v9=ye("$ZodTransform",(e,t)=>{Vt.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new VA(e.constructor.name);const a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(l=>(n.value=l,n));if(a instanceof Promise)throw new Wl;return n.value=a,n}});function Yx(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const lI=ye("$ZodOptional",(e,t)=>{Vt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Et(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Et(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Sb(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>Yx(i,n.value)):Yx(a,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),y9=ye("$ZodExactOptional",(e,t)=>{lI.init(e,t),Et(e._zod,"values",()=>t.innerType._zod.values),Et(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),_9=ye("$ZodNullable",(e,t)=>{Vt.init(e,t),Et(e._zod,"optin",()=>t.innerType._zod.optin),Et(e._zod,"optout",()=>t.innerType._zod.optout),Et(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${Sb(n.source)}|null)$`):void 0}),Et(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),b9=ye("$ZodDefault",(e,t)=>{Vt.init(e,t),e._zod.optin="optional",Et(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>Wx(i,t)):Wx(a,t)}});function Wx(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const w9=ye("$ZodPrefault",(e,t)=>{Vt.init(e,t),e._zod.optin="optional",Et(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),S9=ye("$ZodNonOptional",(e,t)=>{Vt.init(e,t),Et(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>Qx(i,e)):Qx(a,e)}});function Qx(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const E9=ye("$ZodCatch",(e,t)=>{Vt.init(e,t),Et(e._zod,"optin",()=>t.innerType._zod.optin),Et(e._zod,"optout",()=>t.innerType._zod.optout),Et(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(l=>Fs(l,r,zs()))},input:n.value}),n.issues=[]),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(i=>Fs(i,r,zs()))},input:n.value}),n.issues=[]),n)}}),R9=ye("$ZodPipe",(e,t)=>{Vt.init(e,t),Et(e._zod,"values",()=>t.in._zod.values),Et(e._zod,"optin",()=>t.in._zod.optin),Et(e._zod,"optout",()=>t.out._zod.optout),Et(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(l=>ih(l,t.in,r)):ih(i,t.in,r)}const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(i=>ih(i,t.out,r)):ih(a,t.out,r)}});function ih(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const x9=ye("$ZodReadonly",(e,t)=>{Vt.init(e,t),Et(e._zod,"propValues",()=>t.innerType._zod.propValues),Et(e._zod,"values",()=>t.innerType._zod.values),Et(e._zod,"optin",()=>t.innerType?._zod?.optin),Et(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(Xx):Xx(a)}});function Xx(e){return e.value=Object.freeze(e.value),e}const T9=ye("$ZodLazy",(e,t)=>{Vt.init(e,t),Et(e._zod,"innerType",()=>t.getter()),Et(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Et(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Et(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Et(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),O9=ye("$ZodCustom",(e,t)=>{ir.init(e,t),Vt.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then(i=>Jx(i,n,r,e));Jx(a,n,r,e)}});function Jx(e,t,n,r){if(!e){const a={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(Xu(a))}}var eT;class C9{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const a={...r,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function A9(){return new C9}(eT=globalThis).__zod_globalRegistry??(eT.__zod_globalRegistry=A9());const Iu=globalThis.__zod_globalRegistry;function I9(e,t){return new e({type:"string",...Le(t)})}function N9(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Le(t)})}function tT(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Le(t)})}function k9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Le(t)})}function M9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Le(t)})}function P9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Le(t)})}function D9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Le(t)})}function cI(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Le(t)})}function L9(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Le(t)})}function j9(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Le(t)})}function $9(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Le(t)})}function U9(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Le(t)})}function z9(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Le(t)})}function F9(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Le(t)})}function V9(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Le(t)})}function B9(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Le(t)})}function q9(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Le(t)})}function H9(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Le(t)})}function G9(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Le(t)})}function Z9(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Le(t)})}function K9(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Le(t)})}function Y9(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Le(t)})}function W9(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Le(t)})}function Q9(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Le(t)})}function X9(e,t){return new e({type:"string",format:"date",check:"string_format",...Le(t)})}function J9(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Le(t)})}function e7(e,t){return new e({type:"string",format:"duration",check:"string_format",...Le(t)})}function t7(e,t){return new e({type:"number",checks:[],...Le(t)})}function n7(e,t){return new e({type:"number",coerce:!0,checks:[],...Le(t)})}function r7(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Le(t)})}function o7(e,t){return new e({type:"boolean",...Le(t)})}function a7(e,t){return new e({type:"boolean",coerce:!0,...Le(t)})}function s7(e,t){return new e({type:"null",...Le(t)})}function i7(e){return new e({type:"any"})}function l7(e){return new e({type:"unknown"})}function c7(e,t){return new e({type:"never",...Le(t)})}function nT(e,t){return new tI({check:"less_than",...Le(t),value:e,inclusive:!1})}function By(e,t){return new tI({check:"less_than",...Le(t),value:e,inclusive:!0})}function rT(e,t){return new nI({check:"greater_than",...Le(t),value:e,inclusive:!1})}function qy(e,t){return new nI({check:"greater_than",...Le(t),value:e,inclusive:!0})}function oT(e,t){return new h8({check:"multiple_of",...Le(t),value:e})}function u7(e,t){return new m8({check:"max_size",...Le(t),maximum:e})}function d7(e,t){return new g8({check:"min_size",...Le(t),minimum:e})}function uI(e,t){return new v8({check:"max_length",...Le(t),maximum:e})}function Lp(e,t){return new y8({check:"min_length",...Le(t),minimum:e})}function dI(e,t){return new _8({check:"length_equals",...Le(t),length:e})}function f7(e,t){return new b8({check:"string_format",format:"regex",...Le(t),pattern:e})}function h7(e){return new w8({check:"string_format",format:"lowercase",...Le(e)})}function p7(e){return new S8({check:"string_format",format:"uppercase",...Le(e)})}function m7(e,t){return new E8({check:"string_format",format:"includes",...Le(t),includes:e})}function g7(e,t){return new R8({check:"string_format",format:"starts_with",...Le(t),prefix:e})}function v7(e,t){return new x8({check:"string_format",format:"ends_with",...Le(t),suffix:e})}function y7(e,t){return new T8({check:"mime_type",mime:e,...Le(t)})}function yc(e){return new O8({check:"overwrite",tx:e})}function _7(e){return yc(t=>t.normalize(e))}function b7(){return yc(e=>e.trim())}function w7(){return yc(e=>e.toLowerCase())}function S7(){return yc(e=>e.toUpperCase())}function E7(){return yc(e=>g$(e))}function R7(e,t,n){return new e({type:"array",element:t,...Le(n)})}function x7(e,t){return new e({type:"file",...Le(t)})}function T7(e,t,n){const r=Le(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function O7(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Le(n)})}function C7(e){const t=A7(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Xu(r,n.value,t._zod.def));else{const a=r;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=t),a.continue??(a.continue=!t._zod.def.abort),n.issues.push(Xu(a))}},e(n.value,n)));return t}function A7(e,t){const n=new ir({check:"custom",...Le(t)});return n._zod.check=e,n}function jp(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Iu,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Qt(e,t,n={path:[],schemaPath:[]}){var r;const a=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const u=e._zod.toJSONSchema?.();if(u)l.schema=u;else{const m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,m);else{const g=l.schema,y=t.processors[a.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);y(e,t,g,m)}const p=e._zod.parent;p&&(l.ref||(l.ref=p),Qt(p,t,m),t.seen.get(p).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(l.schema,d),t.io==="input"&&br(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function $p(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const l of e.seen.entries()){const u=e.metadataRegistry.get(l[0])?.id;if(u){const d=r.get(u);if(d&&d!==l[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(u,l[0])}}const a=l=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(l[0])?.id,g=e.external.uri??(b=>b);if(p)return{ref:g(p)};const y=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=y,{defId:y,ref:`${g("__shared")}#/${u}/${y}`}}if(l[1]===n)return{ref:"#"};const f=`#/${u}/`,m=l[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:f+m}},i=l=>{if(l[1].schema.$ref)return;const u=l[1],{ref:d,defId:f}=a(l);u.def={...u.schema},f&&(u.defId=f);const m=u.schema;for(const p in m)delete m[p];m.$ref=d};if(e.cycles==="throw")for(const l of e.seen.entries()){const u=l[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
|
|
47
|
+
|
|
48
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const u=l[1];if(t===l[0]){i(l);continue}if(e.external){const f=e.external.registry.get(l[0])?.id;if(t!==l[0]&&f){i(l);continue}}if(e.metadataRegistry.get(l[0])?.id){i(l);continue}if(u.cycle){i(l);continue}if(u.count>1&&e.reused==="ref"){i(l);continue}}}function Up(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const u=e.seen.get(l);if(u.ref===null)return;const d=u.def??u.schema,f={...d},m=u.ref;if(u.ref=null,m){r(m);const g=e.seen.get(m),y=g.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(y)):Object.assign(d,y),Object.assign(d,f),l._zod.parent===m)for(const S in d)S==="$ref"||S==="allOf"||S in f||delete d[S];if(y.$ref)for(const S in d)S==="$ref"||S==="allOf"||S in g.def&&JSON.stringify(d[S])===JSON.stringify(g.def[S])&&delete d[S]}const p=l._zod.parent;if(p&&p!==m){r(p);const g=e.seen.get(p);if(g?.schema.$ref&&(d.$ref=g.schema.$ref,g.def))for(const y in d)y==="$ref"||y==="allOf"||y in g.def&&JSON.stringify(d[y])===JSON.stringify(g.def[y])&&delete d[y]}e.override({zodSchema:l,jsonSchema:d,path:u.path??[]})};for(const l of[...e.seen.entries()].reverse())r(l[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(l)}Object.assign(a,n.def??n.schema);const i=e.external?.defs??{};for(const l of e.seen.entries()){const u=l[1];u.def&&u.defId&&(i[u.defId]=u.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?a.$defs=i:a.definitions=i);try{const l=JSON.parse(JSON.stringify(a));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:zp(t,"input",e.processors),output:zp(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function br(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return br(r.element,n);if(r.type==="set")return br(r.valueType,n);if(r.type==="lazy")return br(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return br(r.innerType,n);if(r.type==="intersection")return br(r.left,n)||br(r.right,n);if(r.type==="record"||r.type==="map")return br(r.keyType,n)||br(r.valueType,n);if(r.type==="pipe")return br(r.in,n)||br(r.out,n);if(r.type==="object"){for(const a in r.shape)if(br(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(br(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(br(a,n))return!0;return!!(r.rest&&br(r.rest,n))}return!1}const I7=(e,t={})=>n=>{const r=jp({...n,processors:t});return Qt(e,r),$p(r,e),Up(r,e)},zp=(e,t,n={})=>r=>{const{libraryOptions:a,target:i}=r??{},l=jp({...a??{},target:i,io:t,processors:n});return Qt(e,l),$p(l,e),Up(l,e)},N7={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},fI=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:i,maximum:l,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(a.minLength=i),typeof l=="number"&&(a.maxLength=l),u&&(a.format=N7[u]??u,a.format===""&&delete a.format,u==="time"&&delete a.format),f&&(a.contentEncoding=f),d&&d.size>0){const m=[...d];m.length===1?a.pattern=m[0].source:m.length>1&&(a.allOf=[...m.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},hI=(e,t,n,r)=>{const a=n,{minimum:i,maximum:l,format:u,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:m}=e._zod.bag;typeof u=="string"&&u.includes("int")?a.type="integer":a.type="number",typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.minimum=m,a.exclusiveMinimum=!0):a.exclusiveMinimum=m),typeof i=="number"&&(a.minimum=i,typeof m=="number"&&t.target!=="draft-04"&&(m>=i?delete a.minimum:delete a.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.maximum=f,a.exclusiveMaximum=!0):a.exclusiveMaximum=f),typeof l=="number"&&(a.maximum=l,typeof f=="number"&&t.target!=="draft-04"&&(f<=l?delete a.maximum:delete a.exclusiveMaximum)),typeof d=="number"&&(a.multipleOf=d)},pI=(e,t,n,r)=>{n.type="boolean"},k7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},M7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},mI=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},P7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},D7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},gI=(e,t,n,r)=>{n.not={}},vI=(e,t,n,r)=>{},yI=(e,t,n,r)=>{},L7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},_I=(e,t,n,r)=>{const a=e._zod.def,i=qA(a.entries);i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),n.enum=i},bI=(e,t,n,r)=>{const a=e._zod.def,i=[];for(const l of a.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(l))}else i.push(l);if(i.length!==0)if(i.length===1){const l=i[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),i.every(l=>typeof l=="boolean")&&(n.type="boolean"),i.every(l=>l===null)&&(n.type="null"),n.enum=i},j7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},$7=(e,t,n,r)=>{const a=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");a.type="string",a.pattern=i.source},wI=(e,t,n,r)=>{const a=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:l,maximum:u,mime:d}=e._zod.bag;l!==void 0&&(i.minLength=l),u!==void 0&&(i.maxLength=u),d?d.length===1?(i.contentMediaType=d[0],Object.assign(a,i)):(Object.assign(a,i),a.anyOf=d.map(f=>({contentMediaType:f}))):Object.assign(a,i)},U7=(e,t,n,r)=>{n.type="boolean"},SI=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},z7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},EI=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},F7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},V7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},RI=(e,t,n,r)=>{const a=n,i=e._zod.def,{minimum:l,maximum:u}=e._zod.bag;typeof l=="number"&&(a.minItems=l),typeof u=="number"&&(a.maxItems=u),a.type="array",a.items=Qt(i.element,t,{...r,path:[...r.path,"items"]})},xI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object",a.properties={};const l=i.shape;for(const f in l)a.properties[f]=Qt(l[f],t,{...r,path:[...r.path,"properties",f]});const u=new Set(Object.keys(l)),d=new Set([...u].filter(f=>{const m=i.shape[f]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));d.size>0&&(a.required=Array.from(d)),i.catchall?._zod.def.type==="never"?a.additionalProperties=!1:i.catchall?i.catchall&&(a.additionalProperties=Qt(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},TI=(e,t,n,r)=>{const a=e._zod.def,i=a.inclusive===!1,l=a.options.map((u,d)=>Qt(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=l:n.anyOf=l},OI=(e,t,n,r)=>{const a=e._zod.def,i=Qt(a.left,t,{...r,path:[...r.path,"allOf",0]}),l=Qt(a.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,d=[...u(i)?i.allOf:[i],...u(l)?l.allOf:[l]];n.allOf=d},CI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="array";const l=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=i.items.map((g,y)=>Qt(g,t,{...r,path:[...r.path,l,y]})),f=i.rest?Qt(i.rest,t,{...r,path:[...r.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(a.prefixItems=d,f&&(a.items=f)):t.target==="openapi-3.0"?(a.items={anyOf:d},f&&a.items.anyOf.push(f),a.minItems=d.length,f||(a.maxItems=d.length)):(a.items=d,f&&(a.additionalItems=f));const{minimum:m,maximum:p}=e._zod.bag;typeof m=="number"&&(a.minItems=m),typeof p=="number"&&(a.maxItems=p)},AI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object";const l=i.keyType,d=l._zod.bag?.patterns;if(i.mode==="loose"&&d&&d.size>0){const m=Qt(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});a.patternProperties={};for(const p of d)a.patternProperties[p.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(a.propertyNames=Qt(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),a.additionalProperties=Qt(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=l._zod.values;if(f){const m=[...f].filter(p=>typeof p=="string"||typeof p=="number");m.length>0&&(a.required=m)}},II=(e,t,n,r)=>{const a=e._zod.def,i=Qt(a.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=a.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},NI=(e,t,n,r)=>{const a=e._zod.def;Qt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},kI=(e,t,n,r)=>{const a=e._zod.def;Qt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},MI=(e,t,n,r)=>{const a=e._zod.def;Qt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},PI=(e,t,n,r)=>{const a=e._zod.def;Qt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType;let l;try{l=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},DI=(e,t,n,r)=>{const a=e._zod.def,i=t.io==="input"?a.in._zod.def.type==="transform"?a.out:a.in:a.out;Qt(i,t,r);const l=t.seen.get(e);l.ref=i},LI=(e,t,n,r)=>{const a=e._zod.def;Qt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.readOnly=!0},B7=(e,t,n,r)=>{const a=e._zod.def;Qt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},Tb=(e,t,n,r)=>{const a=e._zod.def;Qt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},jI=(e,t,n,r)=>{const a=e._zod.innerType;Qt(a,t,r);const i=t.seen.get(e);i.ref=a},aT={string:fI,number:hI,boolean:pI,bigint:k7,symbol:M7,null:mI,undefined:P7,void:D7,never:gI,any:vI,unknown:yI,date:L7,enum:_I,literal:bI,nan:j7,template_literal:$7,file:wI,success:U7,custom:SI,function:z7,transform:EI,map:F7,set:V7,array:RI,object:xI,union:TI,intersection:OI,tuple:CI,record:AI,nullable:II,nonoptional:NI,default:kI,prefault:MI,catch:PI,pipe:DI,readonly:LI,promise:B7,optional:Tb,lazy:jI};function Ere(e,t){if("_idmap"in e){const r=e,a=jp({...t,processors:aT}),i={};for(const d of r._idmap.entries()){const[f,m]=d;Qt(m,a)}const l={},u={registry:r,uri:t?.uri,defs:i};a.external=u;for(const d of r._idmap.entries()){const[f,m]=d;$p(a,m),l[f]=Up(a,m)}if(Object.keys(i).length>0){const d=a.target==="draft-2020-12"?"$defs":"definitions";l.__shared={[d]:i}}return{schemas:l}}const n=jp({...t,processors:aT});return Qt(e,n),$p(n,e),Up(n,e)}const q7=ye("ZodISODateTime",(e,t)=>{F8.init(e,t),un.init(e,t)});function $I(e){return Q9(q7,e)}const H7=ye("ZodISODate",(e,t)=>{V8.init(e,t),un.init(e,t)});function G7(e){return X9(H7,e)}const Z7=ye("ZodISOTime",(e,t)=>{B8.init(e,t),un.init(e,t)});function K7(e){return J9(Z7,e)}const Y7=ye("ZodISODuration",(e,t)=>{q8.init(e,t),un.init(e,t)});function W7(e){return e7(Y7,e)}const Q7=(e,t)=>{Rb.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>A$(e,n)},flatten:{value:n=>C$(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,r_,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,r_,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ro=ye("ZodError",Q7,{Parent:Error}),X7=Im(Ro),J7=Nm(Ro),eU=km(Ro),tU=Mm(Ro),nU=M$(Ro),rU=P$(Ro),oU=D$(Ro),aU=L$(Ro),sU=j$(Ro),iU=$$(Ro),lU=U$(Ro),cU=z$(Ro),Zt=ye("ZodType",(e,t)=>(Vt.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:zp(e,"input"),output:zp(e,"output")}}),e.toJSONSchema=I7(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Zs(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Ks(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>X7(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>eU(e,n,r),e.parseAsync=async(n,r)=>J7(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>tU(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>nU(e,n,r),e.decode=(n,r)=>rU(e,n,r),e.encodeAsync=async(n,r)=>oU(e,n,r),e.decodeAsync=async(n,r)=>aU(e,n,r),e.safeEncode=(n,r)=>sU(e,n,r),e.safeDecode=(n,r)=>iU(e,n,r),e.safeEncodeAsync=async(n,r)=>lU(e,n,r),e.safeDecodeAsync=async(n,r)=>cU(e,n,r),e.refine=(n,r)=>e.check(JU(n,r)),e.superRefine=n=>e.check(ez(n)),e.overwrite=n=>e.check(yc(n)),e.optional=()=>pn(e),e.exactOptional=()=>zU(e),e.nullable=()=>cT(e),e.nullish=()=>pn(cT(e)),e.nonoptional=n=>GU(e,n),e.array=()=>Oe(e),e.or=n=>Lt([e,n]),e.and=n=>gd(e,n),e.transform=n=>s_(e,GI(n)),e.default=n=>BU(e,n),e.prefault=n=>HU(e,n),e.catch=n=>KU(e,n),e.pipe=n=>s_(e,n),e.readonly=()=>QU(e),e.describe=n=>{const r=e.clone();return Iu.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Iu.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Iu.get(e);const r=e.clone();return Iu.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),UI=ye("_ZodString",(e,t)=>{xb.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>fI(e,r,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(f7(...r)),e.includes=(...r)=>e.check(m7(...r)),e.startsWith=(...r)=>e.check(g7(...r)),e.endsWith=(...r)=>e.check(v7(...r)),e.min=(...r)=>e.check(Lp(...r)),e.max=(...r)=>e.check(uI(...r)),e.length=(...r)=>e.check(dI(...r)),e.nonempty=(...r)=>e.check(Lp(1,...r)),e.lowercase=r=>e.check(h7(r)),e.uppercase=r=>e.check(p7(r)),e.trim=()=>e.check(b7()),e.normalize=(...r)=>e.check(_7(...r)),e.toLowerCase=()=>e.check(w7()),e.toUpperCase=()=>e.check(S7()),e.slugify=()=>e.check(E7())}),Dm=ye("ZodString",(e,t)=>{xb.init(e,t),UI.init(e,t),e.email=n=>e.check(N9(uU,n)),e.url=n=>e.check(cI(zI,n)),e.jwt=n=>e.check(W9(TU,n)),e.emoji=n=>e.check(L9(fU,n)),e.guid=n=>e.check(tT(sT,n)),e.uuid=n=>e.check(k9(lh,n)),e.uuidv4=n=>e.check(M9(lh,n)),e.uuidv6=n=>e.check(P9(lh,n)),e.uuidv7=n=>e.check(D9(lh,n)),e.nanoid=n=>e.check(j9(hU,n)),e.guid=n=>e.check(tT(sT,n)),e.cuid=n=>e.check($9(pU,n)),e.cuid2=n=>e.check(U9(mU,n)),e.ulid=n=>e.check(z9(gU,n)),e.base64=n=>e.check(Z9(EU,n)),e.base64url=n=>e.check(K9(RU,n)),e.xid=n=>e.check(F9(vU,n)),e.ksuid=n=>e.check(V9(yU,n)),e.ipv4=n=>e.check(B9(_U,n)),e.ipv6=n=>e.check(q9(bU,n)),e.cidrv4=n=>e.check(H9(wU,n)),e.cidrv6=n=>e.check(G9(SU,n)),e.e164=n=>e.check(Y9(xU,n)),e.datetime=n=>e.check($I(n)),e.date=n=>e.check(G7(n)),e.time=n=>e.check(K7(n)),e.duration=n=>e.check(W7(n))});function L(e){return I9(Dm,e)}const un=ye("ZodStringFormat",(e,t)=>{ln.init(e,t),UI.init(e,t)}),uU=ye("ZodEmail",(e,t)=>{k8.init(e,t),un.init(e,t)}),sT=ye("ZodGUID",(e,t)=>{I8.init(e,t),un.init(e,t)}),lh=ye("ZodUUID",(e,t)=>{N8.init(e,t),un.init(e,t)}),zI=ye("ZodURL",(e,t)=>{M8.init(e,t),un.init(e,t)});function dU(e){return cI(zI,e)}const fU=ye("ZodEmoji",(e,t)=>{P8.init(e,t),un.init(e,t)}),hU=ye("ZodNanoID",(e,t)=>{D8.init(e,t),un.init(e,t)}),pU=ye("ZodCUID",(e,t)=>{L8.init(e,t),un.init(e,t)}),mU=ye("ZodCUID2",(e,t)=>{j8.init(e,t),un.init(e,t)}),gU=ye("ZodULID",(e,t)=>{$8.init(e,t),un.init(e,t)}),vU=ye("ZodXID",(e,t)=>{U8.init(e,t),un.init(e,t)}),yU=ye("ZodKSUID",(e,t)=>{z8.init(e,t),un.init(e,t)}),_U=ye("ZodIPv4",(e,t)=>{H8.init(e,t),un.init(e,t)}),bU=ye("ZodIPv6",(e,t)=>{G8.init(e,t),un.init(e,t)}),wU=ye("ZodCIDRv4",(e,t)=>{Z8.init(e,t),un.init(e,t)}),SU=ye("ZodCIDRv6",(e,t)=>{K8.init(e,t),un.init(e,t)}),EU=ye("ZodBase64",(e,t)=>{Y8.init(e,t),un.init(e,t)}),RU=ye("ZodBase64URL",(e,t)=>{Q8.init(e,t),un.init(e,t)}),xU=ye("ZodE164",(e,t)=>{X8.init(e,t),un.init(e,t)}),TU=ye("ZodJWT",(e,t)=>{e9.init(e,t),un.init(e,t)}),Ga=ye("ZodNumber",(e,t)=>{oI.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>hI(e,r,a),e.gt=(r,a)=>e.check(rT(r,a)),e.gte=(r,a)=>e.check(qy(r,a)),e.min=(r,a)=>e.check(qy(r,a)),e.lt=(r,a)=>e.check(nT(r,a)),e.lte=(r,a)=>e.check(By(r,a)),e.max=(r,a)=>e.check(By(r,a)),e.int=r=>e.check(iT(r)),e.safe=r=>e.check(iT(r)),e.positive=r=>e.check(rT(0,r)),e.nonnegative=r=>e.check(qy(0,r)),e.negative=r=>e.check(nT(0,r)),e.nonpositive=r=>e.check(By(0,r)),e.multipleOf=(r,a)=>e.check(oT(r,a)),e.step=(r,a)=>e.check(oT(r,a)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Ze(e){return t7(Ga,e)}const OU=ye("ZodNumberFormat",(e,t)=>{t9.init(e,t),Ga.init(e,t)});function iT(e){return r7(OU,e)}const FI=ye("ZodBoolean",(e,t)=>{n9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>pI(e,n,r)});function ut(e){return o7(FI,e)}const CU=ye("ZodNull",(e,t)=>{r9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>mI(e,n,r)});function md(e){return s7(CU,e)}const AU=ye("ZodAny",(e,t)=>{o9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>vI()});function eo(){return i7(AU)}const IU=ye("ZodUnknown",(e,t)=>{a9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>yI()});function kt(){return l7(IU)}const NU=ye("ZodNever",(e,t)=>{s9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>gI(e,n,r)});function Fp(e){return c7(NU,e)}const VI=ye("ZodArray",(e,t)=>{i9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>RI(e,n,r,a),e.element=t.element,e.min=(n,r)=>e.check(Lp(n,r)),e.nonempty=n=>e.check(Lp(1,n)),e.max=(n,r)=>e.check(uI(n,r)),e.length=(n,r)=>e.check(dI(n,r)),e.unwrap=()=>e.element});function Oe(e,t){return R7(VI,e,t)}const Lm=ye("ZodObject",(e,t)=>{c9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>xI(e,n,r,a),Et(e,"shape",()=>t.shape),e.keyof=()=>sn(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:kt()}),e.loose=()=>e.clone({...e._zod.def,catchall:kt()}),e.strict=()=>e.clone({...e._zod.def,catchall:Fp()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>E$(e,n),e.safeExtend=n=>R$(e,n),e.merge=n=>x$(e,n),e.pick=n=>w$(e,n),e.omit=n=>S$(e,n),e.partial=(...n)=>T$(ZI,e,n[0]),e.required=(...n)=>O$(KI,e,n[0])});function pe(e,t){const n={type:"object",shape:e??{},...Le(t)};return new Lm(n)}function Rre(e,t){return new Lm({type:"object",shape:e,catchall:Fp(),...Le(t)})}function ar(e,t){return new Lm({type:"object",shape:e,catchall:kt(),...Le(t)})}const BI=ye("ZodUnion",(e,t)=>{iI.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>TI(e,n,r,a),e.options=t.options});function Lt(e,t){return new BI({type:"union",options:e,...Le(t)})}const kU=ye("ZodDiscriminatedUnion",(e,t)=>{BI.init(e,t),u9.init(e,t)});function qI(e,t,n){return new kU({type:"union",options:t,discriminator:e,...Le(n)})}const MU=ye("ZodIntersection",(e,t)=>{d9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>OI(e,n,r,a)});function gd(e,t){return new MU({type:"intersection",left:e,right:t})}const PU=ye("ZodTuple",(e,t)=>{f9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>CI(e,n,r,a),e.rest=n=>e.clone({...e._zod.def,rest:n})});function lT(e,t,n){const r=t instanceof Vt,a=r?n:t,i=r?t:null;return new PU({type:"tuple",items:e,rest:i,...Le(a)})}const HI=ye("ZodRecord",(e,t)=>{h9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>AI(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function Ft(e,t,n){return new HI({type:"record",keyType:e,valueType:t,...Le(n)})}const a_=ye("ZodEnum",(e,t)=>{p9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>_I(e,r,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{const i={};for(const l of r)if(n.has(l))i[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new a_({...t,checks:[],...Le(a),entries:i})},e.exclude=(r,a)=>{const i={...t.entries};for(const l of r)if(n.has(l))delete i[l];else throw new Error(`Key ${l} not found in enum`);return new a_({...t,checks:[],...Le(a),entries:i})}});function sn(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new a_({type:"enum",entries:n,...Le(t)})}const DU=ye("ZodLiteral",(e,t)=>{m9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>bI(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function je(e,t){return new DU({type:"literal",values:Array.isArray(e)?e:[e],...Le(t)})}const LU=ye("ZodFile",(e,t)=>{g9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>wI(e,n,r),e.min=(n,r)=>e.check(d7(n,r)),e.max=(n,r)=>e.check(u7(n,r)),e.mime=(n,r)=>e.check(y7(Array.isArray(n)?n:[n],r))});function jU(e){return x7(LU,e)}const $U=ye("ZodTransform",(e,t)=>{v9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>EI(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new VA(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Xu(i,n.value,t));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(Xu(l))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(i=>(n.value=i,n)):(n.value=a,n)}});function GI(e){return new $U({type:"transform",transform:e})}const ZI=ye("ZodOptional",(e,t)=>{lI.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Tb(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function pn(e){return new ZI({type:"optional",innerType:e})}const UU=ye("ZodExactOptional",(e,t)=>{y9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Tb(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function zU(e){return new UU({type:"optional",innerType:e})}const FU=ye("ZodNullable",(e,t)=>{_9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>II(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function cT(e){return new FU({type:"nullable",innerType:e})}const VU=ye("ZodDefault",(e,t)=>{b9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>kI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function BU(e,t){return new VU({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():GA(t)}})}const qU=ye("ZodPrefault",(e,t)=>{w9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>MI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function HU(e,t){return new qU({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():GA(t)}})}const KI=ye("ZodNonOptional",(e,t)=>{S9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>NI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function GU(e,t){return new KI({type:"nonoptional",innerType:e,...Le(t)})}const ZU=ye("ZodCatch",(e,t)=>{E9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>PI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function KU(e,t){return new ZU({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const YU=ye("ZodPipe",(e,t)=>{R9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>DI(e,n,r,a),e.in=t.in,e.out=t.out});function s_(e,t){return new YU({type:"pipe",in:e,out:t})}const WU=ye("ZodReadonly",(e,t)=>{x9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>LI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function QU(e){return new WU({type:"readonly",innerType:e})}const XU=ye("ZodLazy",(e,t)=>{T9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>jI(e,n,r,a),e.unwrap=()=>e._zod.def.getter()});function Za(e){return new XU({type:"lazy",getter:e})}const Ob=ye("ZodCustom",(e,t)=>{O9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>SI(e,n)});function YI(e,t){return T7(Ob,e??(()=>!0),t)}function JU(e,t={}){return O7(Ob,e,t)}function ez(e){return C7(e)}function xre(e,t={}){const n=new Ob({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Le(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function Cb(e,t){return s_(GI(e),t)}const tz={custom:"custom"};function WI(e){return n7(Ga,e)}function uT(e){return a7(FI,e)}function Ce(...e){return h$(AA(e))}function nz(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function wn({error:e,localization:t,localizeErrors:n=!0}){var r;const a="Request failed";if(!n)return e?.message?e.message:(r=e?.error)!=null&&r.message?e.error.message:a;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const i=e.error.code;if(t?.[i])return t[i]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||a}function Ui(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function i_(e,t){for(const n in e)if(e[n]===t)return n}function Ju(e,t){let n=L().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(n=n.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(n=n.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(n=n.regex(e.regex,{message:t?.INVALID_PASSWORD})),n}var rz={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},oz={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},az={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},sz={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},iz={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},lz={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},cz={...iz,...lz},uz={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},dz={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},fz={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},hz={INVALID_SESSION_TOKEN:"Invalid session token"},pz={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},mz={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},gz={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},vz={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},yz={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},_z={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},bz={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},wz={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAMS:"Update Teams",SELECT_TEAMS:"Select teams",ADD:"Add",REMOVE:"Remove",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",UPDATE_TEAMS_DESCRIPTION:"Add or remove teams for this member",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...sz,...rz,...oz,...az,...cz,...uz,...dz,...fz,...hz,...pz,...mz,...gz,...vz,...yz,..._z,...bz},Sz={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},dT={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},fT={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function Ez(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Rz=e=>{switch(e){case"success":return Oz;case"info":return Az;case"warning":return Cz;case"error":return Iz;default:return null}},xz=Array(12).fill(0),Tz=({visible:e,className:t})=>ee.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ee.createElement("div",{className:"sonner-spinner"},xz.map((n,r)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Oz=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Cz=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Az=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Iz=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Nz=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),kz=()=>{const[e,t]=ee.useState(document.hidden);return ee.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let l_=1;class Mz{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...a}=t,i=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:l_++,l=this.toasts.find(d=>d.id===i),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),l?this.toasts=this.toasts.map(d=>d.id===i?(this.publish({...d,...t,id:i,title:r}),{...d,...t,id:i,dismissible:u,title:r}):d):this.addToast({title:r,...a,dismissible:u,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let i=r!==void 0,l;const u=a.then(async f=>{if(l=["resolve",f],ee.isValidElement(f))i=!1,this.create({id:r,type:"default",message:f});else if(Dz(f)&&!f.ok){i=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,g=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,b=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...b})}else if(f instanceof Error){i=!1;const p=typeof n.error=="function"?await n.error(f):n.error,g=typeof n.description=="function"?await n.description(f):n.description,b=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...b})}else if(n.success!==void 0){i=!1;const p=typeof n.success=="function"?await n.success(f):n.success,g=typeof n.description=="function"?await n.description(f):n.description,b=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:g,...b})}}).catch(async f=>{if(l=["reject",f],n.error!==void 0){i=!1;const m=typeof n.error=="function"?await n.error(f):n.error,p=typeof n.description=="function"?await n.description(f):n.description,y=typeof m=="object"&&!ee.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:p,...y})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((f,m)=>u.then(()=>l[0]==="reject"?m(l[1]):f(l[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=n?.id||l_++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Dr=new Mz,Pz=(e,t)=>{const n=t?.id||l_++;return Dr.addToast({title:e,...t,id:n}),n},Dz=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Lz=Pz,jz=()=>Dr.toasts,$z=()=>Dr.getActiveToasts(),hT=Object.assign(Lz,{success:Dr.success,info:Dr.info,warning:Dr.warning,error:Dr.error,custom:Dr.custom,message:Dr.message,promise:Dr.promise,dismiss:Dr.dismiss,loading:Dr.loading},{getHistory:jz,getToasts:$z});Ez("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ch(e){return e.label!==void 0}const Uz=3,zz="24px",Fz="16px",pT=4e3,Vz=356,Bz=14,qz=45,Hz=200;function Jo(...e){return e.filter(Boolean).join(" ")}function Gz(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Zz=e=>{var t,n,r,a,i,l,u,d,f;const{invert:m,toast:p,unstyled:g,interacting:y,setHeights:b,visibleToasts:S,heights:w,index:R,toasts:E,expanded:T,removeToast:O,defaultRichColors:C,closeButton:I,style:N,cancelButtonStyle:P,actionButtonStyle:$,className:K="",descriptionClassName:F="",duration:G,position:U,gap:J,expandByDefault:le,classNames:B,icons:Y,closeButtonAriaLabel:W="Close toast"}=e,[he,ae]=ee.useState(null),[M,q]=ee.useState(null),[V,D]=ee.useState(!1),[z,X]=ee.useState(!1),[ue,ve]=ee.useState(!1),[Ie,Ae]=ee.useState(!1),[H,ne]=ee.useState(!1),[_e,se]=ee.useState(0),[ce,Te]=ee.useState(0),Pe=ee.useRef(p.duration||G||pT),Xe=ee.useRef(null),Ve=ee.useRef(null),Ye=R===0,Z=R+1<=S,re=p.type,oe=p.dismissible!==!1,we=p.className||"",Re=p.descriptionClassName||"",Ee=ee.useMemo(()=>w.findIndex(qe=>qe.toastId===p.id)||0,[w,p.id]),ke=ee.useMemo(()=>{var qe;return(qe=p.closeButton)!=null?qe:I},[p.closeButton,I]),Je=ee.useMemo(()=>p.duration||G||pT,[p.duration,G]),rt=ee.useRef(0),Tt=ee.useRef(0),ur=ee.useRef(0),Xt=ee.useRef(null),[En,Jt]=U.split("-"),jn=ee.useMemo(()=>w.reduce((qe,ct,Kt)=>Kt>=Ee?qe:qe+ct.height,0),[w,Ee]),Rn=kz(),Wa=p.invert||m,ma=re==="loading";Tt.current=ee.useMemo(()=>Ee*J+jn,[Ee,jn]),ee.useEffect(()=>{Pe.current=Je},[Je]),ee.useEffect(()=>{D(!0)},[]),ee.useEffect(()=>{const qe=Ve.current;if(qe){const ct=qe.getBoundingClientRect().height;return Te(ct),b(Kt=>[{toastId:p.id,height:ct,position:p.position},...Kt]),()=>b(Kt=>Kt.filter(Bt=>Bt.toastId!==p.id))}},[b,p.id]),ee.useLayoutEffect(()=>{if(!V)return;const qe=Ve.current,ct=qe.style.height;qe.style.height="auto";const Kt=qe.getBoundingClientRect().height;qe.style.height=ct,Te(Kt),b(Bt=>Bt.find(Ct=>Ct.toastId===p.id)?Bt.map(Ct=>Ct.toastId===p.id?{...Ct,height:Kt}:Ct):[{toastId:p.id,height:Kt,position:p.position},...Bt])},[V,p.title,p.description,b,p.id,p.jsx,p.action,p.cancel]);const Be=ee.useCallback(()=>{X(!0),se(Tt.current),b(qe=>qe.filter(ct=>ct.toastId!==p.id)),setTimeout(()=>{O(p)},Hz)},[p,O,b,Tt]);ee.useEffect(()=>{if(p.promise&&re==="loading"||p.duration===1/0||p.type==="loading")return;let qe;return T||y||Rn?(()=>{if(ur.current<rt.current){const Bt=new Date().getTime()-rt.current;Pe.current=Pe.current-Bt}ur.current=new Date().getTime()})():Pe.current!==1/0&&(rt.current=new Date().getTime(),qe=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Be()},Pe.current)),()=>clearTimeout(qe)},[T,y,p,re,Rn,Be]),ee.useEffect(()=>{p.delete&&(Be(),p.onDismiss==null||p.onDismiss.call(p,p))},[Be,p.delete]);function _t(){var qe;if(Y?.loading){var ct;return ee.createElement("div",{className:Jo(B?.loader,p==null||(ct=p.classNames)==null?void 0:ct.loader,"sonner-loader"),"data-visible":re==="loading"},Y.loading)}return ee.createElement(Tz,{className:Jo(B?.loader,p==null||(qe=p.classNames)==null?void 0:qe.loader),visible:re==="loading"})}const Rt=p.icon||Y?.[re]||Rz(re);var lt,Ot;return ee.createElement("li",{tabIndex:0,ref:Ve,className:Jo(K,we,B?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,B?.default,B?.[re],p==null||(n=p.classNames)==null?void 0:n[re]),"data-sonner-toast":"","data-rich-colors":(lt=p.richColors)!=null?lt:C,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":V,"data-promise":!!p.promise,"data-swiped":H,"data-removed":z,"data-visible":Z,"data-y-position":En,"data-x-position":Jt,"data-index":R,"data-front":Ye,"data-swiping":ue,"data-dismissible":oe,"data-type":re,"data-invert":Wa,"data-swipe-out":Ie,"data-swipe-direction":M,"data-expanded":!!(T||le&&V),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":E.length-R,"--offset":`${z?_e:Tt.current}px`,"--initial-height":le?"auto":`${ce}px`,...N,...p.style},onDragEnd:()=>{ve(!1),ae(null),Xt.current=null},onPointerDown:qe=>{qe.button!==2&&(ma||!oe||(Xe.current=new Date,se(Tt.current),qe.target.setPointerCapture(qe.pointerId),qe.target.tagName!=="BUTTON"&&(ve(!0),Xt.current={x:qe.clientX,y:qe.clientY})))},onPointerUp:()=>{var qe,ct,Kt;if(Ie||!oe)return;Xt.current=null;const Bt=Number(((qe=Ve.current)==null?void 0:qe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),dr=Number(((ct=Ve.current)==null?void 0:ct.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ct=new Date().getTime()-((Kt=Xe.current)==null?void 0:Kt.getTime()),en=he==="x"?Bt:dr,ao=Math.abs(en)/Ct;if(Math.abs(en)>=qz||ao>.11){se(Tt.current),p.onDismiss==null||p.onDismiss.call(p,p),q(he==="x"?Bt>0?"right":"left":dr>0?"down":"up"),Be(),Ae(!0);return}else{var Wn,xr;(Wn=Ve.current)==null||Wn.style.setProperty("--swipe-amount-x","0px"),(xr=Ve.current)==null||xr.style.setProperty("--swipe-amount-y","0px")}ne(!1),ve(!1),ae(null)},onPointerMove:qe=>{var ct,Kt,Bt;if(!Xt.current||!oe||((ct=window.getSelection())==null?void 0:ct.toString().length)>0)return;const Ct=qe.clientY-Xt.current.y,en=qe.clientX-Xt.current.x;var ao;const Wn=(ao=e.swipeDirections)!=null?ao:Gz(U);!he&&(Math.abs(en)>1||Math.abs(Ct)>1)&&ae(Math.abs(en)>Math.abs(Ct)?"x":"y");let xr={x:0,y:0};const Vi=Co=>1/(1.5+Math.abs(Co)/20);if(he==="y"){if(Wn.includes("top")||Wn.includes("bottom"))if(Wn.includes("top")&&Ct<0||Wn.includes("bottom")&&Ct>0)xr.y=Ct;else{const Co=Ct*Vi(Ct);xr.y=Math.abs(Co)<Math.abs(Ct)?Co:Ct}}else if(he==="x"&&(Wn.includes("left")||Wn.includes("right")))if(Wn.includes("left")&&en<0||Wn.includes("right")&&en>0)xr.x=en;else{const Co=en*Vi(en);xr.x=Math.abs(Co)<Math.abs(en)?Co:en}(Math.abs(xr.x)>0||Math.abs(xr.y)>0)&&ne(!0),(Kt=Ve.current)==null||Kt.style.setProperty("--swipe-amount-x",`${xr.x}px`),(Bt=Ve.current)==null||Bt.style.setProperty("--swipe-amount-y",`${xr.y}px`)}},ke&&!p.jsx&&re!=="loading"?ee.createElement("button",{"aria-label":W,"data-disabled":ma,"data-close-button":!0,onClick:ma||!oe?()=>{}:()=>{Be(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Jo(B?.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(Ot=Y?.close)!=null?Ot:Nz):null,(re||p.icon||p.promise)&&p.icon!==null&&(Y?.[re]!==null||p.icon)?ee.createElement("div",{"data-icon":"",className:Jo(B?.icon,p==null||(a=p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||_t():null,p.type!=="loading"?Rt:null):null,ee.createElement("div",{"data-content":"",className:Jo(B?.content,p==null||(i=p.classNames)==null?void 0:i.content)},ee.createElement("div",{"data-title":"",className:Jo(B?.title,p==null||(l=p.classNames)==null?void 0:l.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ee.createElement("div",{"data-description":"",className:Jo(F,Re,B?.description,p==null||(u=p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),ee.isValidElement(p.cancel)?p.cancel:p.cancel&&ch(p.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||P,onClick:qe=>{ch(p.cancel)&&oe&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,qe),Be())},className:Jo(B?.cancelButton,p==null||(d=p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,ee.isValidElement(p.action)?p.action:p.action&&ch(p.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||$,onClick:qe=>{ch(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,qe),!qe.defaultPrevented&&Be())},className:Jo(B?.actionButton,p==null||(f=p.classNames)==null?void 0:f.actionButton)},p.action.label):null)};function mT(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Kz(e,t){const n={};return[e,t].forEach((r,a)=>{const i=a===1,l=i?"--mobile-offset":"--offset",u=i?Fz:zz;function d(f){["top","right","bottom","left"].forEach(m=>{n[`${l}-${m}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${l}-${f}`]=u:n[`${l}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),n}const Yz=ee.forwardRef(function(t,n){const{id:r,invert:a,position:i="bottom-right",hotkey:l=["altKey","KeyT"],expand:u,closeButton:d,className:f,offset:m,mobileOffset:p,theme:g="light",richColors:y,duration:b,style:S,visibleToasts:w=Uz,toastOptions:R,dir:E=mT(),gap:T=Bz,icons:O,containerAriaLabel:C="Notifications"}=t,[I,N]=ee.useState([]),P=ee.useMemo(()=>r?I.filter(V=>V.toasterId===r):I.filter(V=>!V.toasterId),[I,r]),$=ee.useMemo(()=>Array.from(new Set([i].concat(P.filter(V=>V.position).map(V=>V.position)))),[P,i]),[K,F]=ee.useState([]),[G,U]=ee.useState(!1),[J,le]=ee.useState(!1),[B,Y]=ee.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=ee.useRef(null),he=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),ae=ee.useRef(null),M=ee.useRef(!1),q=ee.useCallback(V=>{N(D=>{var z;return(z=D.find(X=>X.id===V.id))!=null&&z.delete||Dr.dismiss(V.id),D.filter(({id:X})=>X!==V.id)})},[]);return ee.useEffect(()=>Dr.subscribe(V=>{if(V.dismiss){requestAnimationFrame(()=>{N(D=>D.map(z=>z.id===V.id?{...z,delete:!0}:z))});return}setTimeout(()=>{hA.flushSync(()=>{N(D=>{const z=D.findIndex(X=>X.id===V.id);return z!==-1?[...D.slice(0,z),{...D[z],...V},...D.slice(z+1)]:[V,...D]})})})}),[I]),ee.useEffect(()=>{if(g!=="system"){Y(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:D})=>{Y(D?"dark":"light")})}catch{V.addListener(({matches:z})=>{try{Y(z?"dark":"light")}catch(X){console.error(X)}})}},[g]),ee.useEffect(()=>{I.length<=1&&U(!1)},[I]),ee.useEffect(()=>{const V=D=>{var z;if(l.every(ve=>D[ve]||D.code===ve)){var ue;U(!0),(ue=W.current)==null||ue.focus()}D.code==="Escape"&&(document.activeElement===W.current||(z=W.current)!=null&&z.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[l]),ee.useEffect(()=>{if(W.current)return()=>{ae.current&&(ae.current.focus({preventScroll:!0}),ae.current=null,M.current=!1)}},[W.current]),ee.createElement("section",{ref:n,"aria-label":`${C} ${he}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},$.map((V,D)=>{var z;const[X,ue]=V.split("-");return P.length?ee.createElement("ol",{key:V,dir:E==="auto"?mT():E,tabIndex:-1,ref:W,className:f,"data-sonner-toaster":!0,"data-sonner-theme":B,"data-y-position":X,"data-x-position":ue,style:{"--front-toast-height":`${((z=K[0])==null?void 0:z.height)||0}px`,"--width":`${Vz}px`,"--gap":`${T}px`,...S,...Kz(m,p)},onBlur:ve=>{M.current&&!ve.currentTarget.contains(ve.relatedTarget)&&(M.current=!1,ae.current&&(ae.current.focus({preventScroll:!0}),ae.current=null))},onFocus:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||M.current||(M.current=!0,ae.current=ve.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{J||U(!1)},onDragEnd:()=>U(!1),onPointerDown:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||le(!0)},onPointerUp:()=>le(!1)},P.filter(ve=>!ve.position&&D===0||ve.position===V).map((ve,Ie)=>{var Ae,H;return ee.createElement(Zz,{key:ve.id,icons:O,index:Ie,toast:ve,defaultRichColors:y,duration:(Ae=R?.duration)!=null?Ae:b,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:a,visibleToasts:w,closeButton:(H=R?.closeButton)!=null?H:d,interacting:J,position:V,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:q,toasts:P.filter(ne=>ne.position==ve.position),heights:K.filter(ne=>ne.position==ve.position),setHeights:F,expandByDefault:u,gap:T,expanded:G,swipeDirections:t.swipeDirections})})):null}))}),QI=A.createContext({});function XI(){return A.useContext(QI)}var Hy,gT;function Wz(){if(gT)return Hy;gT=1;var e=function(){};return Hy=e,Hy}var Qz=Wz();const Xz=Ha(Qz);function Jz({async:e,appendTo:t,defer:n,id:r,nonce:a,src:i}){const l=document.createElement("script");e!==void 0&&(l.async=e),n!==void 0&&(l.defer=n),r&&(l.id=r),a&&l.setAttribute("nonce",a),l.src=i,(t==="head"?document.head:document.body).appendChild(l)}var eF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};let zu=null,ed=!1;const Vp=new Set,Bp=new Set,tF=typeof window<"u",Ql="___grecaptcha_cfg",JI=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function nF(){if(!tF)return;function e(n){if(ed)n();else{window[Ql]||(window[Ql]={});const r=window[Ql];r.fns||(r.fns=[]),r.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){ed=!0;for(const n of Bp)n();Bp.clear()}window[JI]=t}function rF({language:e,onLoadCallbackName:t,render:n,useEnterprise:r=!1,useRecaptchaNet:a=!1}){const i=a?"recaptcha.net":"google.com",l=r?"enterprise.js":"api.js",u=new URLSearchParams({render:n});return t&&u.set("onload",t),e&&u.set("hl",e),`https://www.${i}/recaptcha/${l}?${u.toString()}`}function oF({language:e,render:t,scriptProps:n,useEnterprise:r,useRecaptchaNet:a}){const i={id:"google-recaptcha-v3"},l=rF({language:e,onLoadCallbackName:JI,render:t,useEnterprise:r,useRecaptchaNet:a});if(zu){if(zu!==l)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}zu=l,Jz(Object.assign(Object.assign(Object.assign({},i),n),{src:l}))}function aF(e){if(!window[Ql])return;const t=window[Ql];t.clients&&delete t.clients[e]}function sF(e,t){var{onLoadCallback:n,onLoadCallbackName:r}=t,a=eF(t,["onLoadCallback","onLoadCallbackName"]);if(Vp.size===0&&nF(),oF(a),Vp.add(e),n&&(ed?n():Bp.add(n)),r){let i=function(){if(!r)return;const l=window[r];typeof l=="function"&&l()};ed?i():Bp.add(i)}}function iF(e){var t,n,r;Vp.delete(e),Vp.size===0&&(window.grecaptcha=void 0,window[Ql]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${zu}"]`))===null||n===void 0||n.remove(),(r=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||r===void 0||r.remove(),zu=null,ed=!1)}let vT=!1;function lF({container:e,children:t,language:n,reCaptchaKey:r,scriptProps:a,useEnterprise:i,useRecaptchaNet:l}){var u,d,f,m,p,g,y;const b=A.useId(),[S,w]=A.useState(null),[R,E]=A.useState(null),T=A.useRef(!1);A.useEffect(()=>{function N(){var P;const $=i?(P=window.grecaptcha)===null||P===void 0?void 0:P.enterprise:window.grecaptcha;if(!$)throw new Error("reCAPTCHA not found");if(!$.ready)throw new Error("reCAPTCHA ready callback not found");$.ready(()=>{w($)})}return sF(b,{language:n,onLoadCallback:N,onLoadCallbackName:a?.onLoadCallbackName,render:e?.element?"explicit":r,scriptProps:{appendTo:a?.appendTo,async:a?.async,defer:a?.defer,id:a?.id,nonce:a?.nonce},useEnterprise:i,useRecaptchaNet:l}),()=>{iF(b),w(null)}},[e?.element,b,n,r,a?.appendTo,a?.async,a?.defer,a?.id,a?.nonce,a?.onLoadCallbackName,i,l]),A.useEffect(()=>{var N,P,$;if(!e?.element||!S?.render)return;const K={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((N=e.parameters)===null||N===void 0?void 0:N.badge)||"inline",callback:e.parameters.callback,sitekey:r,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},F=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!F)throw new Error("reCAPTCHA container element not found");const G=S.render(F,K);return!((P=e?.parameters)===null||P===void 0)&&P.hidden&&(vT||(Xz(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),vT=!0),($=F.querySelector(".grecaptcha-badge"))===null||$===void 0||$.style.setProperty("display","none")),E(G),T.current=!0,()=>{E(null),T.current=!1,aF(G),F.innerHTML=""}},[e?.element,(u=e?.parameters)===null||u===void 0?void 0:u.badge,(d=e?.parameters)===null||d===void 0?void 0:d.hidden,(f=e?.parameters)===null||f===void 0?void 0:f.callback,(m=e?.parameters)===null||m===void 0?void 0:m.errorCallback,(p=e?.parameters)===null||p===void 0?void 0:p.expiredCallback,(g=e?.parameters)===null||g===void 0?void 0:g.tabindex,(y=e?.parameters)===null||y===void 0?void 0:y.theme,S,r]);const O=!!e?.element,C=O?R:r,I=A.useMemo(()=>C!==null&&S?.execute?N=>{if(C===null||!S?.execute)throw new Error("reCAPTCHA has not been loaded");return O&&!T.current?(console.warn("Client ID not mounted"),null):S.execute(C,{action:N})}:void 0,[C,S,O]);return x.jsx(QI.Provider,{value:{container:e?.element,executeRecaptcha:I,reCaptchaInstance:S},children:t})}var cF=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const n={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,n),this.notify(e)}setRefetching(e,t){const n=this.cache.get(e);n&&(n.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const n of t)this.notify(n)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const n=Array.from(t);for(const r of n)r()}}},vo=new cF;function uF(){return()=>{}}function Ka(){return A.useSyncExternalStore(uF,()=>!0,()=>!1)}function eN(){const[e,t]=A.useState();return A.useEffect(()=>{const n=()=>{const a=document.documentElement.getAttribute("lang");t(a??void 0)};n();const r=new MutationObserver(a=>{for(const i of a)i.attributeName==="lang"&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{lang:e}}function Ab(){const[e,t]=A.useState("light");return A.useEffect(()=>{const n=()=>{var a;const i=document.documentElement.classList.contains("dark")||((a=document.documentElement.getAttribute("style"))==null?void 0:a.includes("color-scheme: dark"));t(i?"dark":"light")};n();const r=new MutationObserver(a=>{for(const i of a)(i.attributeName==="style"||i.attributeName==="class")&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{theme:e}}function dF({children:e}){const t=Ka(),{captcha:n}=A.useContext(ht);return n?.provider!=="google-recaptcha-v3"?e:x.jsxs(lF,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&x.jsx("style",{children:`
|
|
49
|
+
.grecaptcha-badge {
|
|
50
|
+
visibility: hidden;
|
|
51
|
+
border-radius: var(--radius) !important;
|
|
52
|
+
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
|
|
53
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
|
|
54
|
+
border-style: var(--tw-border-style) !important;
|
|
55
|
+
border-width: 1px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.dark .grecaptcha-badge {
|
|
59
|
+
border-color: var(--input) !important;
|
|
60
|
+
}
|
|
61
|
+
`}),x.jsx(fF,{}),e]})}function fF(){const{executeRecaptcha:e}=XI(),{theme:t}=Ab(),{lang:n}=eN();return A.useEffect(()=>{if(!e)return;(async()=>{const a=document.querySelector("iframe[title='reCAPTCHA']");if(a){const i=new URL(a.src);i.searchParams.set("theme",t),n&&i.searchParams.set("hl",n),a.src=i.toString()}})()},[e,t,n]),null}function hF({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:r}}=A.useContext(ht),{pathMode:a,slug:i}=t||{};let l,u,d,f;const{data:m,isPending:p,isRefetching:g}=r();if(a==="slug"){const y=e||i;l=m?.find(b=>b.slug===y),u=p,d=g}else{const{data:y,isPending:b,isRefetching:S,refetch:w}=n();f=w,l=y,u=b,d=S}return A.useMemo(()=>({data:l,isPending:u,isRefetching:d,refetch:f}),[l,u,d,f])}var pF=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:r,redirectTo:a}=A.useContext(ht),{slug:i,pathMode:l,personalPath:u}=n||{},{data:d}=t(),{data:f,isPending:m,isRefetching:p,refetch:g}=hF(),{refetch:y}=e(),{data:b}=e();return A.useEffect(()=>{d?.user.id&&(f||b)&&(g?.(),y?.())},[d?.user.id]),A.useEffect(()=>{p||m||i&&l==="slug"&&!f&&r(u||a)},[f,p,m,i,l,u,r,a]),null},mF=({href:e,className:t,children:n})=>x.jsx("a",{className:t,href:e,children:n}),gF=e=>{window.location.href=e},vF=e=>{window.location.replace(e)},yF=({variant:e="default",message:t})=>{e==="default"?hT(t):hT[e](t)},ht=A.createContext({}),_F=({children:e,authClient:t,account:n,avatar:r,deleteUser:a,social:i,genericOAuth:l,basePath:u="/auth",baseURL:d="",captcha:f,redirectTo:m="/",credentials:p,changeEmail:g=!0,freshAge:y=3600*24,hooks:b,mutators:S,localization:w,localizeErrors:R=!0,nameRequired:E=!0,organization:T,teams:O,signUp:C=!0,toast:I=yF,viewPaths:N,navigate:P,replace:$,Link:K=mF,emailVerification:F,...G})=>{const U=t,J=A.useMemo(()=>{if(r)return r===!0?{extension:"png",size:128}:{upload:r.upload,delete:r.delete,extension:r.extension||"png",size:r.size||(r.upload?256:128),Image:r.Image}},[r]),le=A.useMemo(()=>{if(F)return F===!0?{otp:!1}:{otp:F.otp??!1}},[F]),B=A.useMemo(()=>{var H;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:dT}:{basePath:((H=n.basePath)!=null&&H.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...dT,...n.viewPaths}}},[n]),Y=A.useMemo(()=>{if(a)return a===!0?{}:a},[a]),W=A.useMemo(()=>{if(i)return i},[i]),he=A.useMemo(()=>{if(l)return l},[l]),ae=A.useMemo(()=>{if(p!==!1)return p===!0?{forgotPassword:!0,usernameRequired:!0}:{...p,forgotPassword:p?.forgotPassword??!0,usernameRequired:p?.usernameRequired??!0}},[p]),M=A.useMemo(()=>{if(C!==!1)return C===!0||C===void 0?{fields:["name"]}:{fields:C.fields||["name"]}},[C]),q=A.useMemo(()=>{var H;if(!T)return;if(T===!0)return{basePath:"/organization",viewPaths:fT,customRoles:[]};let ne;T.logo===!0?ne={extension:"png",size:128}:T.logo&&(ne={upload:T.logo.upload,delete:T.logo.delete,extension:T.logo.extension||"png",size:T.logo.size||(T.logo.upload?256:128)});const _e=(H=T.basePath)!=null&&H.endsWith("/")?T.basePath.slice(0,-1):T.basePath;return{...T,logo:ne,basePath:_e??"/organization",customRoles:T.customRoles||[],viewPaths:{...fT,...T.viewPaths}}},[T]),V=A.useMemo(()=>{var H,ne;if(!(!O||!q))return O===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:O.enabled??!0,customRoles:O.customRoles||[],colors:{count:((H=O.colors)==null?void 0:H.count)??5,prefix:((ne=O.colors)==null?void 0:ne.prefix)??"team"}}},[O,q]),D=A.useMemo(()=>({deleteApiKey:H=>U.apiKey.delete({...H,fetchOptions:{throw:!0}}),deletePasskey:H=>U.passkey.deletePasskey({...H,fetchOptions:{throw:!0}}),revokeDeviceSession:H=>U.multiSession.revoke({...H,fetchOptions:{throw:!0}}),revokeSession:H=>U.revokeSession({...H,fetchOptions:{throw:!0}}),setActiveSession:H=>U.multiSession.setActive({...H,fetchOptions:{throw:!0}}),updateOrganization:H=>U.organization.update({...H,fetchOptions:{throw:!0}}),updateTeam:H=>U.$fetch("/organization/update-team",{method:"POST",body:H,throw:!0}),updateUser:H=>U.updateUser({...H,fetchOptions:{throw:!0}}),unlinkAccount:H=>U.unlinkAccount({...H,fetchOptions:{throw:!0}})}),[U]),z=A.useMemo(()=>({useSession:U.useSession,useListAccounts:()=>Zr({queryFn:U.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:H=>Zr({queryFn:()=>U.accountInfo(H),cacheKey:`accountInfo:${JSON.stringify(H)}`}),useListDeviceSessions:()=>Zr({queryFn:U.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>Zr({queryFn:U.listSessions,cacheKey:"listSessions"}),useListPasskeys:U.useListPasskeys,useListApiKeys:()=>Zr({queryFn:U.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:U.useActiveOrganization,useListOrganizations:U.useListOrganizations,useHasPermission:H=>Zr({queryFn:()=>U.$fetch("/organization/has-permission",{method:"POST",body:H}),cacheKey:`hasPermission:${JSON.stringify(H)}`}),useInvitation:H=>Zr({queryFn:()=>U.organization.getInvitation(H),cacheKey:`invitation:${JSON.stringify(H)}`}),useListInvitations:H=>Zr({queryFn:()=>{var ne;return U.$fetch(`/organization/list-invitations?organizationId=${((ne=H?.query)==null?void 0:ne.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(H)}`}),useListUserInvitations:()=>Zr({queryFn:()=>U.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:H=>Zr({queryFn:()=>{var ne;return U.$fetch(`/organization/list-members?organizationId=${((ne=H?.query)==null?void 0:ne.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(H)}`}),useListTeams:H=>Zr({queryFn:()=>U.$fetch(`/organization/list-teams?organizationId=${H?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(H)}`}),useListTeamMembers:H=>Zr({queryFn:()=>U.$fetch("/organization/list-team-members",{method:"POST",body:H?.teamId?{query:{teamId:H.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(H)}`}),useListUserTeams:()=>Zr({queryFn:()=>U.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[U]),X=A.useMemo(()=>({...Sz,...N}),[N]),ue=A.useMemo(()=>({...wz,...w}),[w]),ve=A.useMemo(()=>({...z,...b}),[z,b]),Ie=A.useMemo(()=>({...D,...S}),[D,S]);d=d.endsWith("/")?d.slice(0,-1):d,u=u.endsWith("/")?u.slice(0,-1):u;const{data:Ae}=ve.useSession();return x.jsxs(ht.Provider,{value:{authClient:U,avatar:J,basePath:u==="/"?"":u,baseURL:d,captcha:f,redirectTo:m,changeEmail:g,credentials:ae,deleteUser:Y,emailVerification:le,freshAge:y,genericOAuth:he,hooks:ve,mutators:Ie,localization:ue,localizeErrors:R,nameRequired:E,organization:q,teams:V,account:B,signUp:M,social:W,toast:I,navigate:P||gF,replace:$||P||vF,viewPaths:X,Link:K,...G},children:[Ae&&q&&x.jsx(pF,{}),f?.provider==="google-recaptcha-v3"?x.jsx(dF,{children:e}):e]})};function Zr({queryFn:e,cacheKey:t,staleTime:n=1e4}){var r;const{hooks:{useSession:a},toast:i,localization:l,localizeErrors:u}=A.useContext(ht),{data:d,isPending:f}=a(),m=A.useRef(e);m.current=e;const p=t||e.toString(),g=A.useSyncExternalStore(A.useCallback(T=>vo.subscribe(p,T),[p]),A.useCallback(()=>vo.get(p),[p]),A.useCallback(()=>vo.get(p),[p])),y=A.useRef(!1),b=A.useRef(void 0),[S,w]=A.useState(null),R=A.useCallback(async()=>{const T=vo.getInFlightRequest(p);if(T){try{const C=await T;C.error?w(C.error):w(null)}catch(C){w(C)}return}g?.data!==void 0&&vo.setRefetching(p,!0);const O=m.current();vo.setInFlightRequest(p,O);try{const{data:C,error:I}=await O;I?(w(I),i({variant:"error",message:wn({error:I,localization:l,localizeErrors:u})})):w(null),vo.set(p,C)}catch(C){const I=C;w(I),i({variant:"error",message:wn({error:I,localization:l,localizeErrors:u})})}finally{vo.setRefetching(p,!1),vo.removeInFlightRequest(p)}},[p,i,l,u,g]);A.useEffect(()=>{var T;const O=(T=d?.user)==null?void 0:T.id;if(!d){vo.setRefetching(p,!1),vo.clear(p),y.current=!1,b.current=void 0;return}const C=b.current!==void 0&&b.current!==O;C&&vo.clear(p);const I=g?.data!==void 0,N=!g||Date.now()-g.timestamp>n;(!y.current||!I||C||I&&N)&&(!I||N)&&(y.current=!0,R()),b.current=O},[d,(r=d?.user)==null?void 0:r.id,p,R,g,n]);const E=f||g?.data===void 0&&!S;return{data:g?.data??null,isPending:E,isRefetching:g?.isRefetching??!1,error:S,refetch:R}}const bF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tN=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var wF={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 SF=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:l,...u},d)=>A.createElement("svg",{ref:d,...wF,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:tN("lucide",a),...u},[...l.map(([f,m])=>A.createElement(f,m)),...Array.isArray(i)?i:[i]]));const gr=(e,t)=>{const n=A.forwardRef(({className:r,...a},i)=>A.createElement(SF,{ref:i,iconNode:t,className:tN(`lucide-${bF(e)}`,r),...a}));return n.displayName=`${e}`,n};const EF=gr("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const RF=gr("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);const nN=gr("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const xF=gr("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const TF=gr("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const OF=gr("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const CF=gr("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);const mr=gr("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const rN=gr("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const oN=gr("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const AF=gr("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const IF=gr("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);const yT=gr("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const NF=gr("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const kF=gr("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const MF=gr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var vd=e=>e.type==="checkbox",Ti=e=>e instanceof Date,jr=e=>e==null;const aN=e=>typeof e=="object";var Dn=e=>!jr(e)&&!Array.isArray(e)&&aN(e)&&!Ti(e),sN=e=>Dn(e)&&e.target?vd(e.target)?e.target.checked:e.target.value:e,PF=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,iN=(e,t)=>e.has(PF(t)),DF=e=>{const t=e.constructor&&e.constructor.prototype;return Dn(t)&&t.hasOwnProperty("isPrototypeOf")},Ib=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function In(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Ib&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Dn(e)&&DF(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=In(e[a]));return r}var jm=e=>/^\w*$/.test(e),an=e=>e===void 0,Nb=e=>Array.isArray(e)?e.filter(Boolean):[],kb=e=>Nb(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Me=(e,t,n)=>{if(!t||!Dn(e))return n;const r=(jm(t)?[t]:kb(t)).reduce((a,i)=>jr(a)?a:a[i],e);return an(r)||r===e?an(e[t])?n:e[t]:r},Qr=e=>typeof e=="boolean",Sr=e=>typeof e=="function",zt=(e,t,n)=>{let r=-1;const a=jm(t)?[t]:kb(t),i=a.length,l=i-1;for(;++r<i;){const u=a[r];let d=n;if(r!==l){const f=e[u];d=Dn(f)||Array.isArray(f)?f:isNaN(+a[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const qp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Uo={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Da={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Mb=ee.createContext(null);Mb.displayName="HookFormControlContext";const Pb=()=>ee.useContext(Mb);var lN=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const l=i;return t._proxyFormState[l]!==Uo.all&&(t._proxyFormState[l]=!r||Uo.all),n&&(n[l]=!0),e[l]}});return a};const Db=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;function cN(e){const t=Pb(),{control:n=t,disabled:r,name:a,exact:i}=e||{},[l,u]=ee.useState(n._formState),d=ee.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Db(()=>n._subscribe({name:a,formState:d.current,exact:i,callback:f=>{!r&&u({...n._formState,...f})}}),[a,r,i]),ee.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),ee.useMemo(()=>lN(l,n,d.current,!1),[l,n])}var to=e=>typeof e=="string",c_=(e,t,n,r,a)=>to(e)?(r&&t.watch.add(e),Me(n,e,a)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),Me(n,i))):(r&&(t.watchAll=!0),n),u_=e=>jr(e)||!aN(e);function zo(e,t,n=new WeakSet){if(u_(e)||u_(t))return Object.is(e,t);if(Ti(e)&&Ti(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const l=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const u=t[i];if(Ti(l)&&Ti(u)||Dn(l)&&Dn(u)||Array.isArray(l)&&Array.isArray(u)?!zo(l,u,n):!Object.is(l,u))return!1}}return!0}function LF(e){const t=Pb(),{control:n=t,name:r,defaultValue:a,disabled:i,exact:l,compute:u}=e||{},d=ee.useRef(a),f=ee.useRef(u),m=ee.useRef(void 0),p=ee.useRef(n),g=ee.useRef(r);f.current=u;const[y,b]=ee.useState(()=>{const O=n._getWatch(r,d.current);return f.current?f.current(O):O}),S=ee.useCallback(O=>{const C=c_(r,n._names,O||n._formValues,!1,d.current);return f.current?f.current(C):C},[n._formValues,n._names,r]),w=ee.useCallback(O=>{if(!i){const C=c_(r,n._names,O||n._formValues,!1,d.current);if(f.current){const I=f.current(C);zo(I,m.current)||(b(I),m.current=I)}else b(C)}},[n._formValues,n._names,i,r]);Db(()=>((p.current!==n||!zo(g.current,r))&&(p.current=n,g.current=r,w()),n._subscribe({name:r,formState:{values:!0},exact:l,callback:O=>{w(O.values)}})),[n,l,r,w]),ee.useEffect(()=>n._removeUnmounted());const R=p.current!==n,E=g.current,T=ee.useMemo(()=>{if(i)return null;const O=!R&&!zo(E,r);return R||O?S():null},[i,R,r,E,S]);return T!==null?T:y}function jF(e){const t=Pb(),{name:n,disabled:r,control:a=t,shouldUnregister:i,defaultValue:l,exact:u=!0}=e,d=iN(a._names.array,n),f=ee.useMemo(()=>Me(a._formValues,n,Me(a._defaultValues,n,l)),[a,n,l]),m=LF({control:a,name:n,defaultValue:f,exact:u}),p=cN({control:a,name:n,exact:u}),g=ee.useRef(e),y=ee.useRef(void 0),b=ee.useRef(a.register(n,{...e.rules,value:m,...Qr(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const S=ee.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Me(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!Me(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Me(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Me(p.validatingFields,n)},error:{enumerable:!0,get:()=>Me(p.errors,n)}}),[p,n]),w=ee.useCallback(O=>b.current.onChange({target:{value:sN(O),name:n},type:qp.CHANGE}),[n]),R=ee.useCallback(()=>b.current.onBlur({target:{value:Me(a._formValues,n),name:n},type:qp.BLUR}),[n,a._formValues]),E=ee.useCallback(O=>{const C=Me(a._fields,n);C&&C._f&&O&&(C._f.ref={focus:()=>Sr(O.focus)&&O.focus(),select:()=>Sr(O.select)&&O.select(),setCustomValidity:I=>Sr(O.setCustomValidity)&&O.setCustomValidity(I),reportValidity:()=>Sr(O.reportValidity)&&O.reportValidity()})},[a._fields,n]),T=ee.useMemo(()=>({name:n,value:m,...Qr(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:w,onBlur:R,ref:E}),[n,r,p.disabled,w,R,E,m]);return ee.useEffect(()=>{const O=a._options.shouldUnregister||i,C=y.current;C&&C!==n&&!d&&a.unregister(C),a.register(n,{...g.current.rules,...Qr(g.current.disabled)?{disabled:g.current.disabled}:{}});const I=(N,P)=>{const $=Me(a._fields,N);$&&$._f&&($._f.mount=P)};if(I(n,!0),O){const N=In(Me(a._options.defaultValues,n,g.current.defaultValue));zt(a._defaultValues,n,N),an(Me(a._formValues,n))&&zt(a._formValues,n,N)}return!d&&a.register(n),y.current=n,()=>{(d?O&&!a._state.action:O)?a.unregister(n):I(n,!1)}},[n,a,d,i]),ee.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),ee.useMemo(()=>({field:T,formState:p,fieldState:S}),[T,p,S])}const $F=e=>e.render(jF(e)),Lb=ee.createContext(null);Lb.displayName="HookFormContext";const UF=()=>ee.useContext(Lb),zF=e=>{const{children:t,watch:n,getValues:r,getFieldState:a,setError:i,clearErrors:l,setValue:u,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:y,control:b,register:S,setFocus:w,subscribe:R}=e;return ee.createElement(Lb.Provider,{value:ee.useMemo(()=>({watch:n,getValues:r,getFieldState:a,setError:i,clearErrors:l,setValue:u,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:y,control:b,register:S,setFocus:w,subscribe:R}),[l,b,f,a,r,g,S,p,m,i,w,u,R,d,y,n])},ee.createElement(Mb.Provider,{value:b},t))};var jb=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},Fu=e=>Array.isArray(e)?e:[e],_T=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}};function uN(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const a=e[r],i=t[r];if(a&&Dn(a)&&i){const l=uN(a,i);Dn(l)&&(n[r]=l)}else e[r]&&(n[r]=i)}return n}var wr=e=>Dn(e)&&!Object.keys(e).length,$b=e=>e.type==="file",Hp=e=>{if(!Ib)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},dN=e=>e.type==="select-multiple",Ub=e=>e.type==="radio",FF=e=>Ub(e)||vd(e),Gy=e=>Hp(e)&&e.isConnected;function VF(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=an(e)?r++:e[t[r++]];return e}function BF(e){for(const t in e)if(e.hasOwnProperty(t)&&!an(e[t]))return!1;return!0}function Nn(e,t){const n=Array.isArray(t)?t:jm(t)?[t]:kb(t),r=n.length===1?e:VF(e,n),a=n.length-1,i=n[a];return r&&delete r[i],a!==0&&(Dn(r)&&wr(r)||Array.isArray(r)&&BF(r))&&Nn(e,n.slice(0,-1)),e}var qF=e=>{for(const t in e)if(Sr(e[t]))return!0;return!1};function fN(e){return Array.isArray(e)||Dn(e)&&!qF(e)}function d_(e,t={}){for(const n in e){const r=e[n];fN(r)?(t[n]=Array.isArray(r)?[]:{},d_(r,t[n])):an(r)||(t[n]=!0)}return t}function zl(e,t,n){n||(n=d_(t));for(const r in e){const a=e[r];if(fN(a))an(t)||u_(n[r])?n[r]=d_(a,Array.isArray(a)?[]:{}):zl(a,jr(t)?{}:t[r],n[r]);else{const i=t[r];n[r]=!zo(a,i)}}return n}const bT={value:!1,isValid:!1},wT={value:!0,isValid:!0};var hN=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!an(e[0].attributes.value)?an(e[0].value)||e[0].value===""?wT:{value:e[0].value,isValid:!0}:wT:bT}return bT},pN=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>an(e)?e:t?e===""?NaN:e&&+e:n&&to(e)?new Date(e):r?r(e):e;const ST={isValid:!1,value:null};var mN=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,ST):ST;function ET(e){const t=e.ref;return $b(t)?t.files:Ub(t)?mN(e.refs).value:dN(t)?[...t.selectedOptions].map(({value:n})=>n):vd(t)?hN(e.refs).value:pN(an(t.value)?e.ref.value:t.value,e)}var HF=(e,t,n,r)=>{const a={};for(const i of e){const l=Me(t,i);l&&zt(a,i,l._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},Gp=e=>e instanceof RegExp,_u=e=>an(e)?e:Gp(e)?e.source:Dn(e)?Gp(e.value)?e.value.source:e.value:e,RT=e=>({isOnSubmit:!e||e===Uo.onSubmit,isOnBlur:e===Uo.onBlur,isOnChange:e===Uo.onChange,isOnAll:e===Uo.all,isOnTouch:e===Uo.onTouched});const xT="AsyncFunction";var GF=e=>!!e&&!!e.validate&&!!(Sr(e.validate)&&e.validate.constructor.name===xT||Dn(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===xT)),ZF=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),TT=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Vu=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const i=Me(e,a);if(i){const{_f:l,...u}=i;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],a)&&!r)return!0;if(l.ref&&t(l.ref,l.name)&&!r)return!0;if(Vu(u,t))break}else if(Dn(u)&&Vu(u,t))break}}};function OT(e,t,n){const r=Me(e,n);if(r||jm(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const i=a.join("."),l=Me(t,i),u=Me(e,i);if(l&&!Array.isArray(l)&&n!==i)return{name:n};if(u&&u.type)return{name:i,error:u};if(u&&u.root&&u.root.type)return{name:`${i}.root`,error:u.root};a.pop()}return{name:n}}var KF=(e,t,n,r)=>{n(e);const{name:a,...i}=e;return wr(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(l=>t[l]===(!r||Uo.all))},YF=(e,t,n)=>!e||!t||e===t||Fu(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),WF=(e,t,n,r,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:(n?r.isOnChange:a.isOnChange)?e:!0,QF=(e,t)=>!Nb(Me(e,t)).length&&Nn(e,t),XF=(e,t,n)=>{const r=Fu(Me(e,n));return zt(r,"root",t[n]),zt(e,n,r),e};function CT(e,t,n="validate"){if(to(e)||Array.isArray(e)&&e.every(to)||Qr(e)&&!e)return{type:n,message:to(e)?e:"",ref:t}}var Al=e=>Dn(e)&&!Gp(e)?e:{value:e,message:""},AT=async(e,t,n,r,a,i)=>{const{ref:l,refs:u,required:d,maxLength:f,minLength:m,min:p,max:g,pattern:y,validate:b,name:S,valueAsNumber:w,mount:R}=e._f,E=Me(n,S);if(!R||t.has(S))return{};const T=u?u[0]:l,O=G=>{a&&T.reportValidity&&(T.setCustomValidity(Qr(G)?"":G||""),T.reportValidity())},C={},I=Ub(l),N=vd(l),P=I||N,$=(w||$b(l))&&an(l.value)&&an(E)||Hp(l)&&l.value===""||E===""||Array.isArray(E)&&!E.length,K=jb.bind(null,S,r,C),F=(G,U,J,le=Da.maxLength,B=Da.minLength)=>{const Y=G?U:J;C[S]={type:G?le:B,message:Y,ref:l,...K(G?le:B,Y)}};if(i?!Array.isArray(E)||!E.length:d&&(!P&&($||jr(E))||Qr(E)&&!E||N&&!hN(u).isValid||I&&!mN(u).isValid)){const{value:G,message:U}=to(d)?{value:!!d,message:d}:Al(d);if(G&&(C[S]={type:Da.required,message:U,ref:T,...K(Da.required,U)},!r))return O(U),C}if(!$&&(!jr(p)||!jr(g))){let G,U;const J=Al(g),le=Al(p);if(!jr(E)&&!isNaN(E)){const B=l.valueAsNumber||E&&+E;jr(J.value)||(G=B>J.value),jr(le.value)||(U=B<le.value)}else{const B=l.valueAsDate||new Date(E),Y=ae=>new Date(new Date().toDateString()+" "+ae),W=l.type=="time",he=l.type=="week";to(J.value)&&E&&(G=W?Y(E)>Y(J.value):he?E>J.value:B>new Date(J.value)),to(le.value)&&E&&(U=W?Y(E)<Y(le.value):he?E<le.value:B<new Date(le.value))}if((G||U)&&(F(!!G,J.message,le.message,Da.max,Da.min),!r))return O(C[S].message),C}if((f||m)&&!$&&(to(E)||i&&Array.isArray(E))){const G=Al(f),U=Al(m),J=!jr(G.value)&&E.length>+G.value,le=!jr(U.value)&&E.length<+U.value;if((J||le)&&(F(J,G.message,U.message),!r))return O(C[S].message),C}if(y&&!$&&to(E)){const{value:G,message:U}=Al(y);if(Gp(G)&&!E.match(G)&&(C[S]={type:Da.pattern,message:U,ref:l,...K(Da.pattern,U)},!r))return O(U),C}if(b){if(Sr(b)){const G=await b(E,n),U=CT(G,T);if(U&&(C[S]={...U,...K(Da.validate,U.message)},!r))return O(U.message),C}else if(Dn(b)){let G={};for(const U in b){if(!wr(G)&&!r)break;const J=CT(await b[U](E,n),T,U);J&&(G={...J,...K(U,J.message)},O(J.message),r&&(C[S]=G))}if(!wr(G)&&(C[S]={ref:T,...G},!r))return C}}return O(!0),C};const JF={mode:Uo.onSubmit,reValidateMode:Uo.onChange,shouldFocusError:!0};function eV(e={}){let t={...JF,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Sr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},a=Dn(t.defaultValues)||Dn(t.values)?In(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:In(a),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...m};let g={...p};const y={array:_T(),state:_T()},b=t.criteriaMode===Uo.all,S=Z=>re=>{clearTimeout(f),f=setTimeout(Z,re)},w=async Z=>{if(!l.keepIsValid&&!t.disabled&&(p.isValid||g.isValid||Z)){let re;t.resolver?(re=wr((await P()).errors),R()):re=await K(r,!0),re!==n.isValid&&y.state.next({isValid:re})}},R=(Z,re)=>{!t.disabled&&(p.isValidating||p.validatingFields||g.isValidating||g.validatingFields)&&((Z||Array.from(u.mount)).forEach(oe=>{oe&&(re?zt(n.validatingFields,oe,re):Nn(n.validatingFields,oe))}),y.state.next({validatingFields:n.validatingFields,isValidating:!wr(n.validatingFields)}))},E=(Z,re=[],oe,we,Re=!0,Ee=!0)=>{if(we&&oe&&!t.disabled){if(l.action=!0,Ee&&Array.isArray(Me(r,Z))){const ke=oe(Me(r,Z),we.argA,we.argB);Re&&zt(r,Z,ke)}if(Ee&&Array.isArray(Me(n.errors,Z))){const ke=oe(Me(n.errors,Z),we.argA,we.argB);Re&&zt(n.errors,Z,ke),QF(n.errors,Z)}if((p.touchedFields||g.touchedFields)&&Ee&&Array.isArray(Me(n.touchedFields,Z))){const ke=oe(Me(n.touchedFields,Z),we.argA,we.argB);Re&&zt(n.touchedFields,Z,ke)}(p.dirtyFields||g.dirtyFields)&&(n.dirtyFields=zl(a,i)),y.state.next({name:Z,isDirty:G(Z,re),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else zt(i,Z,re)},T=(Z,re)=>{zt(n.errors,Z,re),y.state.next({errors:n.errors})},O=Z=>{n.errors=Z,y.state.next({errors:n.errors,isValid:!1})},C=(Z,re,oe,we)=>{const Re=Me(r,Z);if(Re){const Ee=Me(i,Z,an(oe)?Me(a,Z):oe);an(Ee)||we&&we.defaultChecked||re?zt(i,Z,re?Ee:ET(Re._f)):le(Z,Ee),l.mount&&!l.action&&w()}},I=(Z,re,oe,we,Re)=>{let Ee=!1,ke=!1;const Je={name:Z};if(!t.disabled){if(!oe||we){(p.isDirty||g.isDirty)&&(ke=n.isDirty,n.isDirty=Je.isDirty=G(),Ee=ke!==Je.isDirty);const rt=zo(Me(a,Z),re);ke=!!Me(n.dirtyFields,Z),rt?Nn(n.dirtyFields,Z):zt(n.dirtyFields,Z,!0),Je.dirtyFields=n.dirtyFields,Ee=Ee||(p.dirtyFields||g.dirtyFields)&&ke!==!rt}if(oe){const rt=Me(n.touchedFields,Z);rt||(zt(n.touchedFields,Z,oe),Je.touchedFields=n.touchedFields,Ee=Ee||(p.touchedFields||g.touchedFields)&&rt!==oe)}Ee&&Re&&y.state.next(Je)}return Ee?Je:{}},N=(Z,re,oe,we)=>{const Re=Me(n.errors,Z),Ee=(p.isValid||g.isValid)&&Qr(re)&&n.isValid!==re;if(t.delayError&&oe?(d=S(()=>T(Z,oe)),d(t.delayError)):(clearTimeout(f),d=null,oe?zt(n.errors,Z,oe):Nn(n.errors,Z)),(oe?!zo(Re,oe):Re)||!wr(we)||Ee){const ke={...we,...Ee&&Qr(re)?{isValid:re}:{},errors:n.errors,name:Z};n={...n,...ke},y.state.next(ke)}},P=async Z=>(R(Z,!0),await t.resolver(i,t.context,HF(Z||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),$=async Z=>{const{errors:re}=await P(Z);if(R(Z),Z)for(const oe of Z){const we=Me(re,oe);we?zt(n.errors,oe,we):Nn(n.errors,oe)}else n.errors=re;return re},K=async(Z,re,oe={valid:!0})=>{for(const we in Z){const Re=Z[we];if(Re){const{_f:Ee,...ke}=Re;if(Ee){const Je=u.array.has(Ee.name),rt=Re._f&&GF(Re._f);rt&&p.validatingFields&&R([Ee.name],!0);const Tt=await AT(Re,u.disabled,i,b,t.shouldUseNativeValidation&&!re,Je);if(rt&&p.validatingFields&&R([Ee.name]),Tt[Ee.name]&&(oe.valid=!1,re||e.shouldUseNativeValidation))break;!re&&(Me(Tt,Ee.name)?Je?XF(n.errors,Tt,Ee.name):zt(n.errors,Ee.name,Tt[Ee.name]):Nn(n.errors,Ee.name))}!wr(ke)&&await K(ke,re,oe)}}return oe.valid},F=()=>{for(const Z of u.unMount){const re=Me(r,Z);re&&(re._f.refs?re._f.refs.every(oe=>!Gy(oe)):!Gy(re._f.ref))&&ve(Z)}u.unMount=new Set},G=(Z,re)=>!t.disabled&&(Z&&re&&zt(i,Z,re),!zo(M(),a)),U=(Z,re,oe)=>c_(Z,u,{...l.mount?i:an(re)?a:to(Z)?{[Z]:re}:re},oe,re),J=Z=>Nb(Me(l.mount?i:a,Z,t.shouldUnregister?Me(a,Z,[]):[])),le=(Z,re,oe={})=>{const we=Me(r,Z);let Re=re;if(we){const Ee=we._f;Ee&&(!Ee.disabled&&zt(i,Z,pN(re,Ee)),Re=Hp(Ee.ref)&&jr(re)?"":re,dN(Ee.ref)?[...Ee.ref.options].forEach(ke=>ke.selected=Re.includes(ke.value)):Ee.refs?vd(Ee.ref)?Ee.refs.forEach(ke=>{(!ke.defaultChecked||!ke.disabled)&&(Array.isArray(Re)?ke.checked=!!Re.find(Je=>Je===ke.value):ke.checked=Re===ke.value||!!Re)}):Ee.refs.forEach(ke=>ke.checked=ke.value===Re):$b(Ee.ref)?Ee.ref.value="":(Ee.ref.value=Re,Ee.ref.type||y.state.next({name:Z,values:In(i)})))}(oe.shouldDirty||oe.shouldTouch)&&I(Z,Re,oe.shouldTouch,oe.shouldDirty,!0),oe.shouldValidate&&ae(Z)},B=(Z,re,oe)=>{for(const we in re){if(!re.hasOwnProperty(we))return;const Re=re[we],Ee=Z+"."+we,ke=Me(r,Ee);(u.array.has(Z)||Dn(Re)||ke&&!ke._f)&&!Ti(Re)?B(Ee,Re,oe):le(Ee,Re,oe)}},Y=(Z,re,oe={})=>{const we=Me(r,Z),Re=u.array.has(Z),Ee=In(re);zt(i,Z,Ee),Re?(y.array.next({name:Z,values:In(i)}),(p.isDirty||p.dirtyFields||g.isDirty||g.dirtyFields)&&oe.shouldDirty&&y.state.next({name:Z,dirtyFields:zl(a,i),isDirty:G(Z,Ee)})):we&&!we._f&&!jr(Ee)?B(Z,Ee,oe):le(Z,Ee,oe),TT(Z,u)?y.state.next({...n,name:Z,values:In(i)}):y.state.next({name:l.mount?Z:void 0,values:In(i)})},W=async Z=>{l.mount=!0;const re=Z.target;let oe=re.name,we=!0;const Re=Me(r,oe),Ee=rt=>{we=Number.isNaN(rt)||Ti(rt)&&isNaN(rt.getTime())||zo(rt,Me(i,oe,rt))},ke=RT(t.mode),Je=RT(t.reValidateMode);if(Re){let rt,Tt;const ur=re.type?ET(Re._f):sN(Z),Xt=Z.type===qp.BLUR||Z.type===qp.FOCUS_OUT,En=!ZF(Re._f)&&!t.resolver&&!Me(n.errors,oe)&&!Re._f.deps||WF(Xt,Me(n.touchedFields,oe),n.isSubmitted,Je,ke),Jt=TT(oe,u,Xt);zt(i,oe,ur),Xt?(!re||!re.readOnly)&&(Re._f.onBlur&&Re._f.onBlur(Z),d&&d(0)):Re._f.onChange&&Re._f.onChange(Z);const jn=I(oe,ur,Xt),Rn=!wr(jn)||Jt;if(!Xt&&y.state.next({name:oe,type:Z.type,values:In(i)}),En)return(p.isValid||g.isValid)&&(t.mode==="onBlur"?Xt&&w():Xt||w()),Rn&&y.state.next({name:oe,...Jt?{}:jn});if(!Xt&&Jt&&y.state.next({...n}),t.resolver){const{errors:Wa}=await P([oe]);if(R([oe]),Ee(ur),we){const ma=OT(n.errors,r,oe),Be=OT(Wa,r,ma.name||oe);rt=Be.error,oe=Be.name,Tt=wr(Wa)}}else R([oe],!0),rt=(await AT(Re,u.disabled,i,b,t.shouldUseNativeValidation))[oe],R([oe]),Ee(ur),we&&(rt?Tt=!1:(p.isValid||g.isValid)&&(Tt=await K(r,!0)));we&&(Re._f.deps&&(!Array.isArray(Re._f.deps)||Re._f.deps.length>0)&&ae(Re._f.deps),N(oe,Tt,rt,jn))}},he=(Z,re)=>{if(Me(n.errors,re)&&Z.focus)return Z.focus(),1},ae=async(Z,re={})=>{let oe,we;const Re=Fu(Z);if(t.resolver){const Ee=await $(an(Z)?Z:Re);oe=wr(Ee),we=Z?!Re.some(ke=>Me(Ee,ke)):oe}else Z?(we=(await Promise.all(Re.map(async Ee=>{const ke=Me(r,Ee);return await K(ke&&ke._f?{[Ee]:ke}:ke)}))).every(Boolean),!(!we&&!n.isValid)&&w()):we=oe=await K(r);return y.state.next({...!to(Z)||(p.isValid||g.isValid)&&oe!==n.isValid?{}:{name:Z},...t.resolver||!Z?{isValid:oe}:{},errors:n.errors}),re.shouldFocus&&!we&&Vu(r,he,Z?Re:u.mount),we},M=(Z,re)=>{let oe={...l.mount?i:a};return re&&(oe=uN(re.dirtyFields?n.dirtyFields:n.touchedFields,oe)),an(Z)?oe:to(Z)?Me(oe,Z):Z.map(we=>Me(oe,we))},q=(Z,re)=>({invalid:!!Me((re||n).errors,Z),isDirty:!!Me((re||n).dirtyFields,Z),error:Me((re||n).errors,Z),isValidating:!!Me(n.validatingFields,Z),isTouched:!!Me((re||n).touchedFields,Z)}),V=Z=>{Z&&Fu(Z).forEach(re=>Nn(n.errors,re)),y.state.next({errors:Z?n.errors:{}})},D=(Z,re,oe)=>{const we=(Me(r,Z,{_f:{}})._f||{}).ref,Re=Me(n.errors,Z)||{},{ref:Ee,message:ke,type:Je,...rt}=Re;zt(n.errors,Z,{...rt,...re,ref:we}),y.state.next({name:Z,errors:n.errors,isValid:!1}),oe&&oe.shouldFocus&&we&&we.focus&&we.focus()},z=(Z,re)=>Sr(Z)?y.state.subscribe({next:oe=>"values"in oe&&Z(U(void 0,re),oe)}):U(Z,re,!0),X=Z=>y.state.subscribe({next:re=>{YF(Z.name,re.name,Z.exact)&&KF(re,Z.formState||p,Xe,Z.reRenderRoot)&&Z.callback({values:{...i},...n,...re,defaultValues:a})}}).unsubscribe,ue=Z=>(l.mount=!0,g={...g,...Z.formState},X({...Z,formState:{...m,...Z.formState}})),ve=(Z,re={})=>{for(const oe of Z?Fu(Z):u.mount)u.mount.delete(oe),u.array.delete(oe),re.keepValue||(Nn(r,oe),Nn(i,oe)),!re.keepError&&Nn(n.errors,oe),!re.keepDirty&&Nn(n.dirtyFields,oe),!re.keepTouched&&Nn(n.touchedFields,oe),!re.keepIsValidating&&Nn(n.validatingFields,oe),!t.shouldUnregister&&!re.keepDefaultValue&&Nn(a,oe);y.state.next({values:In(i)}),y.state.next({...n,...re.keepDirty?{isDirty:G()}:{}}),!re.keepIsValid&&w()},Ie=({disabled:Z,name:re})=>{if(Qr(Z)&&l.mount||Z||u.disabled.has(re)){const Re=u.disabled.has(re)!==!!Z;Z?u.disabled.add(re):u.disabled.delete(re),Re&&l.mount&&!l.action&&w()}},Ae=(Z,re={})=>{let oe=Me(r,Z);const we=Qr(re.disabled)||Qr(t.disabled);return zt(r,Z,{...oe||{},_f:{...oe&&oe._f?oe._f:{ref:{name:Z}},name:Z,mount:!0,...re}}),u.mount.add(Z),oe?Ie({disabled:Qr(re.disabled)?re.disabled:t.disabled,name:Z}):C(Z,!0,re.value),{...we?{disabled:re.disabled||t.disabled}:{},...t.progressive?{required:!!re.required,min:_u(re.min),max:_u(re.max),minLength:_u(re.minLength),maxLength:_u(re.maxLength),pattern:_u(re.pattern)}:{},name:Z,onChange:W,onBlur:W,ref:Re=>{if(Re){Ae(Z,re),oe=Me(r,Z);const Ee=an(Re.value)&&Re.querySelectorAll&&Re.querySelectorAll("input,select,textarea")[0]||Re,ke=FF(Ee),Je=oe._f.refs||[];if(ke?Je.find(rt=>rt===Ee):Ee===oe._f.ref)return;zt(r,Z,{_f:{...oe._f,...ke?{refs:[...Je.filter(Gy),Ee,...Array.isArray(Me(a,Z))?[{}]:[]],ref:{type:Ee.type,name:Z}}:{ref:Ee}}}),C(Z,!1,void 0,Ee)}else oe=Me(r,Z,{}),oe._f&&(oe._f.mount=!1),(t.shouldUnregister||re.shouldUnregister)&&!(iN(u.array,Z)&&l.action)&&u.unMount.add(Z)}}},H=()=>t.shouldFocusError&&Vu(r,he,u.mount),ne=Z=>{Qr(Z)&&(y.state.next({disabled:Z}),Vu(r,(re,oe)=>{const we=Me(r,oe);we&&(re.disabled=we._f.disabled||Z,Array.isArray(we._f.refs)&&we._f.refs.forEach(Re=>{Re.disabled=we._f.disabled||Z}))},0,!1))},_e=(Z,re)=>async oe=>{let we;oe&&(oe.preventDefault&&oe.preventDefault(),oe.persist&&oe.persist());let Re=In(i);if(y.state.next({isSubmitting:!0}),t.resolver){const{errors:Ee,values:ke}=await P();R(),n.errors=Ee,Re=In(ke)}else await K(r);if(u.disabled.size)for(const Ee of u.disabled)Nn(Re,Ee);if(Nn(n.errors,"root"),wr(n.errors)){y.state.next({errors:{}});try{await Z(Re,oe)}catch(Ee){we=Ee}}else re&&await re({...n.errors},oe),H(),setTimeout(H);if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:wr(n.errors)&&!we,submitCount:n.submitCount+1,errors:n.errors}),we)throw we},se=(Z,re={})=>{Me(r,Z)&&(an(re.defaultValue)?Y(Z,In(Me(a,Z))):(Y(Z,re.defaultValue),zt(a,Z,In(re.defaultValue))),re.keepTouched||Nn(n.touchedFields,Z),re.keepDirty||(Nn(n.dirtyFields,Z),n.isDirty=re.defaultValue?G(Z,In(Me(a,Z))):G()),re.keepError||(Nn(n.errors,Z),p.isValid&&w()),y.state.next({...n}))},ce=(Z,re={})=>{const oe=Z?In(Z):a,we=In(oe),Re=wr(Z),Ee=Re?a:we;if(re.keepDefaultValues||(a=oe),!re.keepValues){if(re.keepDirtyValues){const ke=new Set([...u.mount,...Object.keys(zl(a,i))]);for(const Je of Array.from(ke)){const rt=Me(n.dirtyFields,Je),Tt=Me(i,Je),ur=Me(Ee,Je);rt&&!an(Tt)?zt(Ee,Je,Tt):!rt&&!an(ur)&&Y(Je,ur)}}else{if(Ib&&an(Z))for(const ke of u.mount){const Je=Me(r,ke);if(Je&&Je._f){const rt=Array.isArray(Je._f.refs)?Je._f.refs[0]:Je._f.ref;if(Hp(rt)){const Tt=rt.closest("form");if(Tt){Tt.reset();break}}}}if(re.keepFieldsRef)for(const ke of u.mount)Y(ke,Me(Ee,ke));else r={}}i=t.shouldUnregister?re.keepDefaultValues?In(a):{}:In(Ee),y.array.next({values:{...Ee}}),y.state.next({values:{...Ee}})}u={mount:re.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!p.isValid||!!re.keepIsValid||!!re.keepDirtyValues||!t.shouldUnregister&&!wr(Ee),l.watch=!!t.shouldUnregister,l.keepIsValid=!!re.keepIsValid,l.action=!1,re.keepErrors||(n.errors={}),y.state.next({submitCount:re.keepSubmitCount?n.submitCount:0,isDirty:Re?!1:re.keepDirty?n.isDirty:!!(re.keepDefaultValues&&!zo(Z,a)),isSubmitted:re.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Re?{}:re.keepDirtyValues?re.keepDefaultValues&&i?zl(a,i):n.dirtyFields:re.keepDefaultValues&&Z?zl(a,Z):re.keepDirty?n.dirtyFields:{},touchedFields:re.keepTouched?n.touchedFields:{},errors:re.keepErrors?n.errors:{},isSubmitSuccessful:re.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Te=(Z,re)=>ce(Sr(Z)?Z(i):Z,{...t.resetOptions,...re}),Pe=(Z,re={})=>{const oe=Me(r,Z),we=oe&&oe._f;if(we){const Re=we.refs?we.refs[0]:we.ref;Re.focus&&setTimeout(()=>{Re.focus(),re.shouldSelect&&Sr(Re.select)&&Re.select()})}},Xe=Z=>{n={...n,...Z}},Ye={control:{register:Ae,unregister:ve,getFieldState:q,handleSubmit:_e,setError:D,_subscribe:X,_runSchema:P,_updateIsValidating:R,_focusError:H,_getWatch:U,_getDirty:G,_setValid:w,_setFieldArray:E,_setDisabledField:Ie,_setErrors:O,_getFieldArray:J,_reset:ce,_resetDefaultValues:()=>Sr(t.defaultValues)&&t.defaultValues().then(Z=>{Te(Z,t.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:F,_disableForm:ne,_subjects:y,_proxyFormState:p,get _fields(){return r},get _formValues(){return i},get _state(){return l},set _state(Z){l=Z},get _defaultValues(){return a},get _names(){return u},set _names(Z){u=Z},get _formState(){return n},get _options(){return t},set _options(Z){t={...t,...Z}}},subscribe:ue,trigger:ae,register:Ae,handleSubmit:_e,watch:z,setValue:Y,getValues:M,reset:Te,resetField:se,clearErrors:V,unregister:ve,setError:D,setFocus:Pe,getFieldState:q};return{...Ye,formControl:Ye}}function ua(e={}){const t=ee.useRef(void 0),n=ee.useRef(void 0),[r,a]=ee.useState({isDirty:!1,isValidating:!1,isLoading:Sr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Sr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Sr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...u}=eV(e);t.current={...u,formState:r}}const i=t.current.control;return i._options=e,Db(()=>{const l=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(u=>({...u,isReady:!0})),i._formState.isReady=!0,l},[i]),ee.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),ee.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),ee.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),ee.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),ee.useEffect(()=>{if(i._proxyFormState.isDirty){const l=i._getDirty();l!==r.isDirty&&i._subjects.state.next({isDirty:l})}},[i,r.isDirty]),ee.useEffect(()=>{var l;e.values&&!zo(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((l=i._options.resetOptions)===null||l===void 0)&&l.keepIsValid||i._setValid(),n.current=e.values,a(u=>({...u}))):i._resetDefaultValues()},[i,e.values]),ee.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=ee.useMemo(()=>lN(r,i),[i,r]),t.current}function IT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yd(...e){return t=>{let n=!1;const r=e.map(a=>{const i=IT(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():IT(e[a],null)}}}}function Bn(...e){return A.useCallback(yd(...e),e)}var tV=Symbol.for("react.lazy"),Zp=lb[" use ".trim().toString()];function nV(e){return typeof e=="object"&&e!==null&&"then"in e}function gN(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===tV&&"_payload"in e&&nV(e._payload)}function vN(e){const t=rV(e),n=A.forwardRef((r,a)=>{let{children:i,...l}=r;gN(i)&&typeof Zp=="function"&&(i=Zp(i._payload));const u=A.Children.toArray(i),d=u.find(aV);if(d){const f=d.props.children,m=u.map(p=>p===d?A.Children.count(f)>1?A.Children.only(null):A.isValidElement(f)?f.props.children:null:p);return x.jsx(t,{...l,ref:a,children:A.isValidElement(f)?A.cloneElement(f,void 0,m):null})}return x.jsx(t,{...l,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var yN=vN("Slot");function rV(e){const t=A.forwardRef((n,r)=>{let{children:a,...i}=n;if(gN(a)&&typeof Zp=="function"&&(a=Zp(a._payload)),A.isValidElement(a)){const l=iV(a),u=sV(i,a.props);return a.type!==A.Fragment&&(u.ref=r?yd(r,l):l),A.cloneElement(a,u)}return A.Children.count(a)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var oV=Symbol("radix.slottable");function aV(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oV}function sV(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function iV(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const NT=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,kT=AA,lV=(e,t)=>n=>{var r;if(t?.variants==null)return kT(e,n?.class,n?.className);const{variants:a,defaultVariants:i}=t,l=Object.keys(a).map(f=>{const m=n?.[f],p=i?.[f];if(m===null)return null;const g=NT(m)||NT(p);return a[f][g]}),u=n&&Object.entries(n).reduce((f,m)=>{let[p,g]=m;return g===void 0||(f[p]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:p,className:g,...y}=m;return Object.entries(y).every(b=>{let[S,w]=b;return Array.isArray(w)?w.includes({...i,...u}[S]):{...i,...u}[S]===w})?[...f,p,g]:f},[]);return kT(e,l,d,n?.class,n?.className)},MT=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Me(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},f_=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?MT(r.ref,n,e):r&&r.refs&&r.refs.forEach(a=>MT(a,n,e))}},PT=(e,t)=>{t.shouldUseNativeValidation&&f_(e,t);const n={};for(const r in e){const a=Me(t.fields,r),i=Object.assign(e[r]||{},{ref:a&&a.ref});if(cV(t.names||Object.keys(e),r)){const l=Object.assign({},Me(n,r));zt(l,"root",i),zt(n,r,l)}else zt(n,r,i)}return n},cV=(e,t)=>{const n=DT(t);return e.some(r=>DT(r).match(`^${n}\\.\\d+`))};function DT(e){return e.replace(/\]|\[/g,"")}function LT(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function uV(e,t){for(var n={};e.length;){var r=e[0],a=r.code,i=r.message,l=r.path.join(".");if(!n[l])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[l]={message:u.message,type:u.code}}else n[l]={message:i,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(p){return e.push(p)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=jb(l,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n}function dV(e,t){for(var n={};e.length;){var r=e[0],a=r.code,i=r.message,l=r.path.join(".");if(!n[l])if(r.code==="invalid_union"&&r.errors.length>0){var u=r.errors[0][0];n[l]={message:u.message,type:u.code}}else n[l]={message:i,type:a};if(r.code==="invalid_union"&&r.errors.forEach(function(m){return m.forEach(function(p){return e.push(p)})}),t){var d=n[l].types,f=d&&d[r.code];n[l]=jb(l,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n}function da(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,a,i){try{return Promise.resolve(LT(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return i.shouldUseNativeValidation&&f_({},i),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(u){return Array.isArray(u?.issues)})(l))return{values:{},errors:PT(uV(l.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw l}))}catch(l){return Promise.reject(l)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,a,i){try{return Promise.resolve(LT(function(){return Promise.resolve((n.mode==="sync"?I$:N$)(e,r,t)).then(function(l){return i.shouldUseNativeValidation&&f_({},i),{errors:{},values:n.raw?Object.assign({},r):l}})},function(l){if((function(u){return u instanceof Rb})(l))return{values:{},errors:PT(dV(l.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}function it(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function fV(e,t){const n=A.createContext(t),r=i=>{const{children:l,...u}=i,d=A.useMemo(()=>u,Object.values(u));return x.jsx(n.Provider,{value:d,children:l})};r.displayName=e+"Provider";function a(i){const l=A.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function zi(e,t=[]){let n=[];function r(i,l){const u=A.createContext(l),d=n.length;n=[...n,l];const f=p=>{const{scope:g,children:y,...b}=p,S=g?.[e]?.[d]||u,w=A.useMemo(()=>b,Object.values(b));return x.jsx(S.Provider,{value:w,children:y})};f.displayName=i+"Provider";function m(p,g){const y=g?.[e]?.[d]||u,b=A.useContext(y);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(l=>A.createContext(l));return function(u){const d=u?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,hV(a,...t)]}function hV(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var Bo=globalThis?.document?A.useLayoutEffect:()=>{},pV=lb[" useId ".trim().toString()]||(()=>{}),mV=0;function js(e){const[t,n]=A.useState(pV());return Bo(()=>{n(r=>r??String(mV++))},[e]),e||(t?`radix-${t}`:"")}var gV=lb[" useInsertionEffect ".trim().toString()]||Bo;function _d({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,l]=vV({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:a;{const m=A.useRef(e!==void 0);A.useEffect(()=>{const p=m.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,r])}const f=A.useCallback(m=>{if(u){const p=yV(m)?m(e):m;p!==e&&l.current?.(p)}else i(m)},[u,e,i,l]);return[d,f]}function vV({defaultProp:e,onChange:t}){const[n,r]=A.useState(e),a=A.useRef(n),i=A.useRef(t);return gV(()=>{i.current=t},[t]),A.useEffect(()=>{a.current!==n&&(i.current?.(n),a.current=n)},[n,a]),[n,r,i]}function yV(e){return typeof e=="function"}function td(e){const t=_V(e),n=A.forwardRef((r,a)=>{const{children:i,...l}=r,u=A.Children.toArray(i),d=u.find(bV);if(d){const f=d.props.children,m=u.map(p=>p===d?A.Children.count(f)>1?A.Children.only(null):A.isValidElement(f)?f.props.children:null:p);return x.jsx(t,{...l,ref:a,children:A.isValidElement(f)?A.cloneElement(f,void 0,m):null})}return x.jsx(t,{...l,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function _V(e){const t=A.forwardRef((n,r)=>{const{children:a,...i}=n;if(A.isValidElement(a)){const l=SV(a),u=wV(i,a.props);return a.type!==A.Fragment&&(u.ref=r?yd(r,l):l),A.cloneElement(a,u)}return A.Children.count(a)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _N=Symbol("radix.slottable");function Tre(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=_N,t}function bV(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_N}function wV(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function SV(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var EV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dn=EV.reduce((e,t)=>{const n=td(`Primitive.${t}`),r=A.forwardRef((a,i)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function bN(e,t){e&&Tm.flushSync(()=>e.dispatchEvent(t))}function qo(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...n)=>t.current?.(...n),[])}function RV(e,t=globalThis?.document){const n=qo(e);A.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var xV="DismissableLayer",h_="dismissableLayer.update",TV="dismissableLayer.pointerDownOutside",OV="dismissableLayer.focusOutside",jT,wN=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zb=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:u,...d}=e,f=A.useContext(wN),[m,p]=A.useState(null),g=m?.ownerDocument??globalThis?.document,[,y]=A.useState({}),b=Bn(t,N=>p(N)),S=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),R=S.indexOf(w),E=m?S.indexOf(m):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,O=E>=R,C=IV(N=>{const P=N.target,$=[...f.branches].some(K=>K.contains(P));!O||$||(a?.(N),l?.(N),N.defaultPrevented||u?.())},g),I=NV(N=>{const P=N.target;[...f.branches].some(K=>K.contains(P))||(i?.(N),l?.(N),N.defaultPrevented||u?.())},g);return RV(N=>{E===f.layers.size-1&&(r?.(N),!N.defaultPrevented&&u&&(N.preventDefault(),u()))},g),A.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(jT=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),$T(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=jT)}},[m,g,n,f]),A.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),$T())},[m,f]),A.useEffect(()=>{const N=()=>y({});return document.addEventListener(h_,N),()=>document.removeEventListener(h_,N)},[]),x.jsx(dn.div,{...d,ref:b,style:{pointerEvents:T?O?"auto":"none":void 0,...e.style},onFocusCapture:it(e.onFocusCapture,I.onFocusCapture),onBlurCapture:it(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:it(e.onPointerDownCapture,C.onPointerDownCapture)})});zb.displayName=xV;var CV="DismissableLayerBranch",AV=A.forwardRef((e,t)=>{const n=A.useContext(wN),r=A.useRef(null),a=Bn(t,r);return A.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(dn.div,{...e,ref:a})});AV.displayName=CV;function IV(e,t=globalThis?.document){const n=qo(e),r=A.useRef(!1),a=A.useRef(()=>{});return A.useEffect(()=>{const i=u=>{if(u.target&&!r.current){let d=function(){SN(TV,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function NV(e,t=globalThis?.document){const n=qo(e),r=A.useRef(!1);return A.useEffect(()=>{const a=i=>{i.target&&!r.current&&SN(OV,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $T(){const e=new CustomEvent(h_);document.dispatchEvent(e)}function SN(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?bN(a,i):a.dispatchEvent(i)}var Zy="focusScope.autoFocusOnMount",Ky="focusScope.autoFocusOnUnmount",UT={bubbles:!1,cancelable:!0},kV="FocusScope",Fb=A.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...l}=e,[u,d]=A.useState(null),f=qo(a),m=qo(i),p=A.useRef(null),g=Bn(t,S=>d(S)),y=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(r){let S=function(T){if(y.paused||!u)return;const O=T.target;u.contains(O)?p.current=O:Ts(p.current,{select:!0})},w=function(T){if(y.paused||!u)return;const O=T.relatedTarget;O!==null&&(u.contains(O)||Ts(p.current,{select:!0}))},R=function(T){if(document.activeElement===document.body)for(const C of T)C.removedNodes.length>0&&Ts(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",w);const E=new MutationObserver(R);return u&&E.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",w),E.disconnect()}}},[r,u,y.paused]),A.useEffect(()=>{if(u){FT.add(y);const S=document.activeElement;if(!u.contains(S)){const R=new CustomEvent(Zy,UT);u.addEventListener(Zy,f),u.dispatchEvent(R),R.defaultPrevented||(MV($V(EN(u)),{select:!0}),document.activeElement===S&&Ts(u))}return()=>{u.removeEventListener(Zy,f),setTimeout(()=>{const R=new CustomEvent(Ky,UT);u.addEventListener(Ky,m),u.dispatchEvent(R),R.defaultPrevented||Ts(S??document.body,{select:!0}),u.removeEventListener(Ky,m),FT.remove(y)},0)}}},[u,f,m,y]);const b=A.useCallback(S=>{if(!n&&!r||y.paused)return;const w=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,R=document.activeElement;if(w&&R){const E=S.currentTarget,[T,O]=PV(E);T&&O?!S.shiftKey&&R===O?(S.preventDefault(),n&&Ts(T,{select:!0})):S.shiftKey&&R===T&&(S.preventDefault(),n&&Ts(O,{select:!0})):R===E&&S.preventDefault()}},[n,r,y.paused]);return x.jsx(dn.div,{tabIndex:-1,...l,ref:g,onKeyDown:b})});Fb.displayName=kV;function MV(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ts(r,{select:t}),document.activeElement!==n)return}function PV(e){const t=EN(e),n=zT(t,e),r=zT(t.reverse(),e);return[n,r]}function EN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zT(e,t){for(const n of e)if(!DV(n,{upTo:t}))return n}function DV(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function LV(e){return e instanceof HTMLInputElement&&"select"in e}function Ts(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&LV(e)&&t&&e.select()}}var FT=jV();function jV(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=VT(e,t),e.unshift(t)},remove(t){e=VT(e,t),e[0]?.resume()}}}function VT(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function $V(e){return e.filter(t=>t.tagName!=="A")}var UV="Portal",Vb=A.forwardRef((e,t)=>{const{container:n,...r}=e,[a,i]=A.useState(!1);Bo(()=>i(!0),[]);const l=n||a&&globalThis?.document?.body;return l?hA.createPortal(x.jsx(dn.div,{...r,ref:t}),l):null});Vb.displayName=UV;function zV(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var Ya=e=>{const{present:t,children:n}=e,r=FV(t),a=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),i=Bn(r.ref,VV(a));return typeof n=="function"||r.isPresent?A.cloneElement(a,{ref:i}):null};Ya.displayName="Presence";function FV(e){const[t,n]=A.useState(),r=A.useRef(null),a=A.useRef(e),i=A.useRef("none"),l=e?"mounted":"unmounted",[u,d]=zV(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const f=uh(r.current);i.current=u==="mounted"?f:"none"},[u]),Bo(()=>{const f=r.current,m=a.current;if(m!==e){const g=i.current,y=uh(f);e?d("MOUNT"):y==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&g!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),Bo(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,p=y=>{const S=uh(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&S&&(d("ANIMATION_END"),!a.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},g=y=>{y.target===t&&(i.current=uh(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:A.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function uh(e){return e?.animationName||"none"}function VV(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Yy=0;function RN(){A.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??BT()),document.body.insertAdjacentElement("beforeend",e[1]??BT()),Yy++,()=>{Yy===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Yy--}},[])}function BT(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var oa=function(){return oa=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},oa.apply(this,arguments)};function xN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function BV(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var gp="right-scroll-bar-position",vp="width-before-scroll-bar",qV="with-scroll-bars-hidden",HV="--removed-body-scroll-bar-size";function Wy(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function GV(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var ZV=typeof window<"u"?A.useLayoutEffect:A.useEffect,qT=new WeakMap;function KV(e,t){var n=GV(null,function(r){return e.forEach(function(a){return Wy(a,r)})});return ZV(function(){var r=qT.get(n);if(r){var a=new Set(r),i=new Set(e),l=n.current;a.forEach(function(u){i.has(u)||Wy(u,null)}),i.forEach(function(u){a.has(u)||Wy(u,l)})}qT.set(n,e)},[e]),n}function YV(e){return e}function WV(e,t){t===void 0&&(t=YV);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(u){return u!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(u){return i(u)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var u=n;n=[],u.forEach(i),l=n}var d=function(){var m=l;l=[],m.forEach(i)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),n}}}};return a}function QV(e){e===void 0&&(e={});var t=WV(null);return t.options=oa({async:!0,ssr:!1},e),t}var TN=function(e){var t=e.sideCar,n=xN(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return A.createElement(r,oa({},n))};TN.isSideCarExport=!0;function XV(e,t){return e.useMedium(t),TN}var ON=QV(),Qy=function(){},$m=A.forwardRef(function(e,t){var n=A.useRef(null),r=A.useState({onScrollCapture:Qy,onWheelCapture:Qy,onTouchMoveCapture:Qy}),a=r[0],i=r[1],l=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,y=e.noRelative,b=e.noIsolation,S=e.inert,w=e.allowPinchZoom,R=e.as,E=R===void 0?"div":R,T=e.gapMode,O=xN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=g,I=KV([n,t]),N=oa(oa({},O),a);return A.createElement(A.Fragment,null,m&&A.createElement(C,{sideCar:ON,removeScrollBar:f,shards:p,noRelative:y,noIsolation:b,inert:S,setCallbacks:i,allowPinchZoom:!!w,lockRef:n,gapMode:T}),l?A.cloneElement(A.Children.only(u),oa(oa({},N),{ref:I})):A.createElement(E,oa({},N,{className:d,ref:I}),u))});$m.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};$m.classNames={fullWidth:vp,zeroRight:gp};var JV=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eB(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=JV();return t&&e.setAttribute("nonce",t),e}function tB(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nB(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rB=function(){var e=0,t=null;return{add:function(n){e==0&&(t=eB())&&(tB(t,n),nB(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},oB=function(){var e=rB();return function(t,n){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},CN=function(){var e=oB(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},aB={left:0,top:0,right:0,gap:0},Xy=function(e){return parseInt(e||"",10)||0},sB=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Xy(n),Xy(r),Xy(a)]},iB=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return aB;var t=sB(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},lB=CN(),Xl="data-scroll-locked",cB=function(e,t,n,r){var a=e.left,i=e.top,l=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
62
|
+
.`.concat(qV,` {
|
|
63
|
+
overflow: hidden `).concat(r,`;
|
|
64
|
+
padding-right: `).concat(u,"px ").concat(r,`;
|
|
65
|
+
}
|
|
66
|
+
body[`).concat(Xl,`] {
|
|
67
|
+
overflow: hidden `).concat(r,`;
|
|
68
|
+
overscroll-behavior: contain;
|
|
69
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
70
|
+
padding-left: `.concat(a,`px;
|
|
71
|
+
padding-top: `).concat(i,`px;
|
|
72
|
+
padding-right: `).concat(l,`px;
|
|
73
|
+
margin-left:0;
|
|
74
|
+
margin-top:0;
|
|
75
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
76
|
+
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.`).concat(gp,` {
|
|
80
|
+
right: `).concat(u,"px ").concat(r,`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.`).concat(vp,` {
|
|
84
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.`).concat(gp," .").concat(gp,` {
|
|
88
|
+
right: 0 `).concat(r,`;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.`).concat(vp," .").concat(vp,` {
|
|
92
|
+
margin-right: 0 `).concat(r,`;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
body[`).concat(Xl,`] {
|
|
96
|
+
`).concat(HV,": ").concat(u,`px;
|
|
97
|
+
}
|
|
98
|
+
`)},HT=function(){var e=parseInt(document.body.getAttribute(Xl)||"0",10);return isFinite(e)?e:0},uB=function(){A.useEffect(function(){return document.body.setAttribute(Xl,(HT()+1).toString()),function(){var e=HT()-1;e<=0?document.body.removeAttribute(Xl):document.body.setAttribute(Xl,e.toString())}},[])},dB=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;uB();var i=A.useMemo(function(){return iB(a)},[a]);return A.createElement(lB,{styles:cB(i,!t,a,n?"":"!important")})},p_=!1;if(typeof window<"u")try{var dh=Object.defineProperty({},"passive",{get:function(){return p_=!0,!0}});window.addEventListener("test",dh,dh),window.removeEventListener("test",dh,dh)}catch{p_=!1}var Il=p_?{passive:!1}:!1,fB=function(e){return e.tagName==="TEXTAREA"},AN=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!fB(e)&&n[t]==="visible")},hB=function(e){return AN(e,"overflowY")},pB=function(e){return AN(e,"overflowX")},GT=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=IN(e,r);if(a){var i=NN(e,r),l=i[1],u=i[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},mB=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},gB=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},IN=function(e,t){return e==="v"?hB(t):pB(t)},NN=function(e,t){return e==="v"?mB(t):gB(t)},vB=function(e,t){return e==="h"&&t==="rtl"?-1:1},yB=function(e,t,n,r,a){var i=vB(e,window.getComputedStyle(t).direction),l=i*r,u=n.target,d=t.contains(u),f=!1,m=l>0,p=0,g=0;do{if(!u)break;var y=NN(e,u),b=y[0],S=y[1],w=y[2],R=S-w-i*b;(b||R)&&IN(e,u)&&(p+=R,g+=b);var E=u.parentNode;u=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(p)<1||!m&&Math.abs(g)<1)&&(f=!0),f},fh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ZT=function(e){return[e.deltaX,e.deltaY]},KT=function(e){return e&&"current"in e?e.current:e},_B=function(e,t){return e[0]===t[0]&&e[1]===t[1]},bB=function(e){return`
|
|
99
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
100
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
101
|
+
`)},wB=0,Nl=[];function SB(e){var t=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),a=A.useState(wB++)[0],i=A.useState(CN)[0],l=A.useRef(e);A.useEffect(function(){l.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var S=BV([e.lockRef.current],(e.shards||[]).map(KT),!0).filter(Boolean);return S.forEach(function(w){return w.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),S.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=A.useCallback(function(S,w){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var R=fh(S),E=n.current,T="deltaX"in S?S.deltaX:E[0]-R[0],O="deltaY"in S?S.deltaY:E[1]-R[1],C,I=S.target,N=Math.abs(T)>Math.abs(O)?"h":"v";if("touches"in S&&N==="h"&&I.type==="range")return!1;var P=window.getSelection(),$=P&&P.anchorNode,K=$?$===I||$.contains(I):!1;if(K)return!1;var F=GT(N,I);if(!F)return!0;if(F?C=N:(C=N==="v"?"h":"v",F=GT(N,I)),!F)return!1;if(!r.current&&"changedTouches"in S&&(T||O)&&(r.current=C),!C)return!0;var G=r.current||C;return yB(G,w,S,G==="h"?T:O)},[]),d=A.useCallback(function(S){var w=S;if(!(!Nl.length||Nl[Nl.length-1]!==i)){var R="deltaY"in w?ZT(w):fh(w),E=t.current.filter(function(C){return C.name===w.type&&(C.target===w.target||w.target===C.shadowParent)&&_B(C.delta,R)})[0];if(E&&E.should){w.cancelable&&w.preventDefault();return}if(!E){var T=(l.current.shards||[]).map(KT).filter(Boolean).filter(function(C){return C.contains(w.target)}),O=T.length>0?u(w,T[0]):!l.current.noIsolation;O&&w.cancelable&&w.preventDefault()}}},[]),f=A.useCallback(function(S,w,R,E){var T={name:S,delta:w,target:R,should:E,shadowParent:EB(R)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(O){return O!==T})},1)},[]),m=A.useCallback(function(S){n.current=fh(S),r.current=void 0},[]),p=A.useCallback(function(S){f(S.type,ZT(S),S.target,u(S,e.lockRef.current))},[]),g=A.useCallback(function(S){f(S.type,fh(S),S.target,u(S,e.lockRef.current))},[]);A.useEffect(function(){return Nl.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Il),document.addEventListener("touchmove",d,Il),document.addEventListener("touchstart",m,Il),function(){Nl=Nl.filter(function(S){return S!==i}),document.removeEventListener("wheel",d,Il),document.removeEventListener("touchmove",d,Il),document.removeEventListener("touchstart",m,Il)}},[]);var y=e.removeScrollBar,b=e.inert;return A.createElement(A.Fragment,null,b?A.createElement(i,{styles:bB(a)}):null,y?A.createElement(dB,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function EB(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const RB=XV(ON,SB);var Bb=A.forwardRef(function(e,t){return A.createElement($m,oa({},e,{ref:t,sideCar:RB}))});Bb.classNames=$m.classNames;var xB=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kl=new WeakMap,hh=new WeakMap,ph={},Jy=0,kN=function(e){return e&&(e.host||kN(e.parentNode))},TB=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=kN(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},OB=function(e,t,n,r){var a=TB(t,Array.isArray(e)?e:[e]);ph[n]||(ph[n]=new WeakMap);var i=ph[n],l=[],u=new Set,d=new Set(a),f=function(p){!p||u.has(p)||(u.add(p),f(p.parentNode))};a.forEach(f);var m=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(u.has(g))m(g);else try{var y=g.getAttribute(r),b=y!==null&&y!=="false",S=(kl.get(g)||0)+1,w=(i.get(g)||0)+1;kl.set(g,S),i.set(g,w),l.push(g),S===1&&b&&hh.set(g,!0),w===1&&g.setAttribute(n,"true"),b||g.setAttribute(r,"true")}catch(R){console.error("aria-hidden: cannot operate on ",g,R)}})};return m(t),u.clear(),Jy++,function(){l.forEach(function(p){var g=kl.get(p)-1,y=i.get(p)-1;kl.set(p,g),i.set(p,y),g||(hh.has(p)||p.removeAttribute(r),hh.delete(p)),y||p.removeAttribute(n)}),Jy--,Jy||(kl=new WeakMap,kl=new WeakMap,hh=new WeakMap,ph={})}},MN=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=xB(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),OB(r,a,n,"aria-hidden")):function(){return null}},Um="Dialog",[PN,Ore]=zi(Um),[CB,Zo]=PN(Um),DN=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,u=A.useRef(null),d=A.useRef(null),[f,m]=_d({prop:r,defaultProp:a??!1,onChange:i,caller:Um});return x.jsx(CB,{scope:t,triggerRef:u,contentRef:d,contentId:js(),titleId:js(),descriptionId:js(),open:f,onOpenChange:m,onOpenToggle:A.useCallback(()=>m(p=>!p),[m]),modal:l,children:n})};DN.displayName=Um;var LN="DialogTrigger",jN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Zo(LN,n),i=Bn(t,a.triggerRef);return x.jsx(dn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Gb(a.open),...r,ref:i,onClick:it(e.onClick,a.onOpenToggle)})});jN.displayName=LN;var qb="DialogPortal",[AB,$N]=PN(qb,{forceMount:void 0}),UN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=Zo(qb,t);return x.jsx(AB,{scope:t,forceMount:n,children:A.Children.map(r,l=>x.jsx(Ya,{present:n||i.open,children:x.jsx(Vb,{asChild:!0,container:a,children:l})}))})};UN.displayName=qb;var Kp="DialogOverlay",zN=A.forwardRef((e,t)=>{const n=$N(Kp,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Zo(Kp,e.__scopeDialog);return i.modal?x.jsx(Ya,{present:r||i.open,children:x.jsx(NB,{...a,ref:t})}):null});zN.displayName=Kp;var IB=td("DialogOverlay.RemoveScroll"),NB=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Zo(Kp,n);return x.jsx(Bb,{as:IB,allowPinchZoom:!0,shards:[a.contentRef],children:x.jsx(dn.div,{"data-state":Gb(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Di="DialogContent",FN=A.forwardRef((e,t)=>{const n=$N(Di,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Zo(Di,e.__scopeDialog);return x.jsx(Ya,{present:r||i.open,children:i.modal?x.jsx(kB,{...a,ref:t}):x.jsx(MB,{...a,ref:t})})});FN.displayName=Di;var kB=A.forwardRef((e,t)=>{const n=Zo(Di,e.__scopeDialog),r=A.useRef(null),a=Bn(t,n.contentRef,r);return A.useEffect(()=>{const i=r.current;if(i)return MN(i)},[]),x.jsx(VN,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:it(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:it(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0;(l.button===2||u)&&i.preventDefault()}),onFocusOutside:it(e.onFocusOutside,i=>i.preventDefault())})}),MB=A.forwardRef((e,t)=>{const n=Zo(Di,e.__scopeDialog),r=A.useRef(!1),a=A.useRef(!1);return x.jsx(VN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=i.target;n.triggerRef.current?.contains(l)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),VN=A.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...l}=e,u=Zo(Di,n),d=A.useRef(null),f=Bn(t,d);return RN(),x.jsxs(x.Fragment,{children:[x.jsx(Fb,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:x.jsx(zb,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Gb(u.open),...l,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(PB,{titleId:u.titleId}),x.jsx(LB,{contentRef:d,descriptionId:u.descriptionId})]})]})}),Hb="DialogTitle",BN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Zo(Hb,n);return x.jsx(dn.h2,{id:a.titleId,...r,ref:t})});BN.displayName=Hb;var qN="DialogDescription",HN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Zo(qN,n);return x.jsx(dn.p,{id:a.descriptionId,...r,ref:t})});HN.displayName=qN;var GN="DialogClose",ZN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Zo(GN,n);return x.jsx(dn.button,{type:"button",...r,ref:t,onClick:it(e.onClick,()=>a.onOpenChange(!1))})});ZN.displayName=GN;function Gb(e){return e?"open":"closed"}var KN="DialogTitleWarning",[Cre,YN]=fV(KN,{contentName:Di,titleName:Hb,docsSlug:"dialog"}),PB=({titleId:e})=>{const t=YN(KN),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
102
|
+
|
|
103
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
104
|
+
|
|
105
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return A.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},DB="DialogDescriptionWarning",LB=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${YN(DB).contentName}}.`;return A.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},jB=DN,$B=jN,UB=UN,zB=zN,FB=FN,VB=BN,Are=HN,Ire=ZN;function WN(e){const t=e+"CollectionProvider",[n,r]=zi(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:w,children:R}=S,E=ee.useRef(null),T=ee.useRef(new Map).current;return x.jsx(a,{scope:w,itemMap:T,collectionRef:E,children:R})};l.displayName=t;const u=e+"CollectionSlot",d=td(u),f=ee.forwardRef((S,w)=>{const{scope:R,children:E}=S,T=i(u,R),O=Bn(w,T.collectionRef);return x.jsx(d,{ref:O,children:E})});f.displayName=u;const m=e+"CollectionItemSlot",p="data-radix-collection-item",g=td(m),y=ee.forwardRef((S,w)=>{const{scope:R,children:E,...T}=S,O=ee.useRef(null),C=Bn(w,O),I=i(m,R);return ee.useEffect(()=>(I.itemMap.set(O,{ref:O,...T}),()=>{I.itemMap.delete(O)})),x.jsx(g,{[p]:"",ref:C,children:E})});y.displayName=m;function b(S){const w=i(e+"CollectionConsumer",S);return ee.useCallback(()=>{const E=w.collectionRef.current;if(!E)return[];const T=Array.from(E.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((I,N)=>T.indexOf(I.ref.current)-T.indexOf(N.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:l,Slot:f,ItemSlot:y},b,r]}var BB=A.createContext(void 0);function QN(e){const t=A.useContext(BB);return e||t||"ltr"}const qB=["top","right","bottom","left"],Vs=Math.min,Jr=Math.max,Yp=Math.round,mh=Math.floor,sa=e=>({x:e,y:e}),HB={left:"right",right:"left",bottom:"top",top:"bottom"},GB={start:"end",end:"start"};function m_(e,t,n){return Jr(e,Vs(t,n))}function Va(e,t){return typeof e=="function"?e(t):e}function Ba(e){return e.split("-")[0]}function _c(e){return e.split("-")[1]}function Zb(e){return e==="x"?"y":"x"}function Kb(e){return e==="y"?"height":"width"}const ZB=new Set(["top","bottom"]);function aa(e){return ZB.has(Ba(e))?"y":"x"}function Yb(e){return Zb(aa(e))}function KB(e,t,n){n===void 0&&(n=!1);const r=_c(e),a=Yb(e),i=Kb(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Wp(l)),[l,Wp(l)]}function YB(e){const t=Wp(e);return[g_(e),t,g_(t)]}function g_(e){return e.replace(/start|end/g,t=>GB[t])}const YT=["left","right"],WT=["right","left"],WB=["top","bottom"],QB=["bottom","top"];function XB(e,t,n){switch(e){case"top":case"bottom":return n?t?WT:YT:t?YT:WT;case"left":case"right":return t?WB:QB;default:return[]}}function JB(e,t,n,r){const a=_c(e);let i=XB(Ba(e),n==="start",r);return a&&(i=i.map(l=>l+"-"+a),t&&(i=i.concat(i.map(g_)))),i}function Wp(e){return e.replace(/left|right|bottom|top/g,t=>HB[t])}function eq(e){return{top:0,right:0,bottom:0,left:0,...e}}function XN(e){return typeof e!="number"?eq(e):{top:e,right:e,bottom:e,left:e}}function Qp(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function QT(e,t,n){let{reference:r,floating:a}=e;const i=aa(t),l=Yb(t),u=Kb(l),d=Ba(t),f=i==="y",m=r.x+r.width/2-a.width/2,p=r.y+r.height/2-a.height/2,g=r[u]/2-a[u]/2;let y;switch(d){case"top":y={x:m,y:r.y-a.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-a.width,y:p};break;default:y={x:r.x,y:r.y}}switch(_c(t)){case"start":y[l]-=g*(n&&f?-1:1);break;case"end":y[l]+=g*(n&&f?-1:1);break}return y}const tq=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:p}=QT(f,r,d),g=r,y={},b=0;for(let S=0;S<u.length;S++){const{name:w,fn:R}=u[S],{x:E,y:T,data:O,reset:C}=await R({x:m,y:p,initialPlacement:r,placement:g,strategy:a,middlewareData:y,rects:f,platform:l,elements:{reference:e,floating:t}});m=E??m,p=T??p,y={...y,[w]:{...y[w],...O}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(f=C.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):C.rects),{x:m,y:p}=QT(f,g,d)),S=-1)}return{x:m,y:p,placement:g,strategy:a,middlewareData:y}};async function nd(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=Va(t,e),b=XN(y),w=u[g?p==="floating"?"reference":"floating":p],R=Qp(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),E=p==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),O=await(i.isElement==null?void 0:i.isElement(T))?await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1}:{x:1,y:1},C=Qp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:E,offsetParent:T,strategy:d}):E);return{top:(R.top-C.top+b.top)/O.y,bottom:(C.bottom-R.bottom+b.bottom)/O.y,left:(R.left-C.left+b.left)/O.x,right:(C.right-R.right+b.right)/O.x}}const nq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=Va(e,t)||{};if(f==null)return{};const p=XN(m),g={x:n,y:r},y=Yb(a),b=Kb(y),S=await l.getDimensions(f),w=y==="y",R=w?"top":"left",E=w?"bottom":"right",T=w?"clientHeight":"clientWidth",O=i.reference[b]+i.reference[y]-g[y]-i.floating[b],C=g[y]-i.reference[y],I=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let N=I?I[T]:0;(!N||!await(l.isElement==null?void 0:l.isElement(I)))&&(N=u.floating[T]||i.floating[b]);const P=O/2-C/2,$=N/2-S[b]/2-1,K=Vs(p[R],$),F=Vs(p[E],$),G=K,U=N-S[b]-F,J=N/2-S[b]/2+P,le=m_(G,J,U),B=!d.arrow&&_c(a)!=null&&J!==le&&i.reference[b]/2-(J<G?K:F)-S[b]/2<0,Y=B?J<G?J-G:J-U:0;return{[y]:g[y]+Y,data:{[y]:le,centerOffset:J-le-Y,...B&&{alignmentOffset:Y}},reset:B}}}),rq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:l,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:S=!0,...w}=Va(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const R=Ba(a),E=aa(u),T=Ba(u)===u,O=await(d.isRTL==null?void 0:d.isRTL(f.floating)),C=g||(T||!S?[Wp(u)]:YB(u)),I=b!=="none";!g&&I&&C.push(...JB(u,S,b,O));const N=[u,...C],P=await nd(t,w),$=[];let K=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&$.push(P[R]),p){const J=KB(a,l,O);$.push(P[J[0]],P[J[1]])}if(K=[...K,{placement:a,overflows:$}],!$.every(J=>J<=0)){var F,G;const J=(((F=i.flip)==null?void 0:F.index)||0)+1,le=N[J];if(le&&(!(p==="alignment"?E!==aa(le):!1)||K.every(W=>aa(W.placement)===E?W.overflows[0]>0:!0)))return{data:{index:J,overflows:K},reset:{placement:le}};let B=(G=K.filter(Y=>Y.overflows[0]<=0).sort((Y,W)=>Y.overflows[1]-W.overflows[1])[0])==null?void 0:G.placement;if(!B)switch(y){case"bestFit":{var U;const Y=(U=K.filter(W=>{if(I){const he=aa(W.placement);return he===E||he==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(he=>he>0).reduce((he,ae)=>he+ae,0)]).sort((W,he)=>W[1]-he[1])[0])==null?void 0:U[0];Y&&(B=Y);break}case"initialPlacement":B=u;break}if(a!==B)return{reset:{placement:B}}}return{}}}};function XT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JT(e){return qB.some(t=>e[t]>=0)}const oq=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=Va(e,t);switch(r){case"referenceHidden":{const i=await nd(t,{...a,elementContext:"reference"}),l=XT(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:JT(l)}}}case"escaped":{const i=await nd(t,{...a,altBoundary:!0}),l=XT(i,n.floating);return{data:{escapedOffsets:l,escaped:JT(l)}}}default:return{}}}}},JN=new Set(["left","top"]);async function aq(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),l=Ba(n),u=_c(n),d=aa(n)==="y",f=JN.has(l)?-1:1,m=i&&d?-1:1,p=Va(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof b=="number"&&(y=u==="end"?b*-1:b),d?{x:y*m,y:g*f}:{x:g*f,y:y*m}}const sq=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:l,middlewareData:u}=t,d=await aq(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+d.x,y:i+d.y,data:{...d,placement:l}}}}},iq=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:u={fn:w=>{let{x:R,y:E}=w;return{x:R,y:E}}},...d}=Va(e,t),f={x:n,y:r},m=await nd(t,d),p=aa(Ba(a)),g=Zb(p);let y=f[g],b=f[p];if(i){const w=g==="y"?"top":"left",R=g==="y"?"bottom":"right",E=y+m[w],T=y-m[R];y=m_(E,y,T)}if(l){const w=p==="y"?"top":"left",R=p==="y"?"bottom":"right",E=b+m[w],T=b-m[R];b=m_(E,b,T)}const S=u.fn({...t,[g]:y,[p]:b});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[g]:i,[p]:l}}}}}},lq=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Va(e,t),m={x:n,y:r},p=aa(a),g=Zb(p);let y=m[g],b=m[p];const S=Va(u,t),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const T=g==="y"?"height":"width",O=i.reference[g]-i.floating[T]+w.mainAxis,C=i.reference[g]+i.reference[T]-w.mainAxis;y<O?y=O:y>C&&(y=C)}if(f){var R,E;const T=g==="y"?"width":"height",O=JN.has(Ba(a)),C=i.reference[p]-i.floating[T]+(O&&((R=l.offset)==null?void 0:R[p])||0)+(O?0:w.crossAxis),I=i.reference[p]+i.reference[T]+(O?0:((E=l.offset)==null?void 0:E[p])||0)-(O?w.crossAxis:0);b<C?b=C:b>I&&(b=I)}return{[g]:y,[p]:b}}}},cq=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:l,elements:u}=t,{apply:d=()=>{},...f}=Va(e,t),m=await nd(t,f),p=Ba(a),g=_c(a),y=aa(a)==="y",{width:b,height:S}=i.floating;let w,R;p==="top"||p==="bottom"?(w=p,R=g===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(R=p,w=g==="end"?"top":"bottom");const E=S-m.top-m.bottom,T=b-m.left-m.right,O=Vs(S-m[w],E),C=Vs(b-m[R],T),I=!t.middlewareData.shift;let N=O,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=E),I&&!g){const K=Jr(m.left,0),F=Jr(m.right,0),G=Jr(m.top,0),U=Jr(m.bottom,0);y?P=b-2*(K!==0||F!==0?K+F:Jr(m.left,m.right)):N=S-2*(G!==0||U!==0?G+U:Jr(m.top,m.bottom))}await d({...t,availableWidth:P,availableHeight:N});const $=await l.getDimensions(u.floating);return b!==$.width||S!==$.height?{reset:{rects:!0}}:{}}}};function zm(){return typeof window<"u"}function bc(e){return ek(e)?(e.nodeName||"").toLowerCase():"#document"}function no(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fa(e){var t;return(t=(ek(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ek(e){return zm()?e instanceof Node||e instanceof no(e).Node:!1}function Ho(e){return zm()?e instanceof Element||e instanceof no(e).Element:!1}function ca(e){return zm()?e instanceof HTMLElement||e instanceof no(e).HTMLElement:!1}function eO(e){return!zm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof no(e).ShadowRoot}const uq=new Set(["inline","contents"]);function bd(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Go(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!uq.has(a)}const dq=new Set(["table","td","th"]);function fq(e){return dq.has(bc(e))}const hq=[":popover-open",":modal"];function Fm(e){return hq.some(t=>{try{return e.matches(t)}catch{return!1}})}const pq=["transform","translate","scale","rotate","perspective"],mq=["transform","translate","scale","rotate","perspective","filter"],gq=["paint","layout","strict","content"];function Wb(e){const t=Qb(),n=Ho(e)?Go(e):e;return pq.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||mq.some(r=>(n.willChange||"").includes(r))||gq.some(r=>(n.contain||"").includes(r))}function vq(e){let t=Bs(e);for(;ca(t)&&!sc(t);){if(Wb(t))return t;if(Fm(t))return null;t=Bs(t)}return null}function Qb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yq=new Set(["html","body","#document"]);function sc(e){return yq.has(bc(e))}function Go(e){return no(e).getComputedStyle(e)}function Vm(e){return Ho(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bs(e){if(bc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||eO(e)&&e.host||fa(e);return eO(t)?t.host:t}function tk(e){const t=Bs(e);return sc(t)?e.ownerDocument?e.ownerDocument.body:e.body:ca(t)&&bd(t)?t:tk(t)}function rd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=tk(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),l=no(a);if(i){const u=v_(l);return t.concat(l,l.visualViewport||[],bd(a)?a:[],u&&n?rd(u):[])}return t.concat(a,rd(a,[],n))}function v_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nk(e){const t=Go(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=ca(e),i=a?e.offsetWidth:n,l=a?e.offsetHeight:r,u=Yp(n)!==i||Yp(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function Xb(e){return Ho(e)?e:e.contextElement}function Jl(e){const t=Xb(e);if(!ca(t))return sa(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=nk(t);let l=(i?Yp(n.width):n.width)/r,u=(i?Yp(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const _q=sa(0);function rk(e){const t=no(e);return!Qb()||!t.visualViewport?_q:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bq(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==no(e)?!1:t}function Li(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=Xb(e);let l=sa(1);t&&(r?Ho(r)&&(l=Jl(r)):l=Jl(e));const u=bq(i,n,r)?rk(i):sa(0);let d=(a.left+u.x)/l.x,f=(a.top+u.y)/l.y,m=a.width/l.x,p=a.height/l.y;if(i){const g=no(i),y=r&&Ho(r)?no(r):r;let b=g,S=v_(b);for(;S&&r&&y!==b;){const w=Jl(S),R=S.getBoundingClientRect(),E=Go(S),T=R.left+(S.clientLeft+parseFloat(E.paddingLeft))*w.x,O=R.top+(S.clientTop+parseFloat(E.paddingTop))*w.y;d*=w.x,f*=w.y,m*=w.x,p*=w.y,d+=T,f+=O,b=no(S),S=v_(b)}}return Qp({width:m,height:p,x:d,y:f})}function Bm(e,t){const n=Vm(e).scrollLeft;return t?t.left+n:Li(fa(e)).left+n}function ok(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Bm(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function wq(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",l=fa(r),u=t?Fm(t.floating):!1;if(r===l||u&&i)return n;let d={scrollLeft:0,scrollTop:0},f=sa(1);const m=sa(0),p=ca(r);if((p||!p&&!i)&&((bc(r)!=="body"||bd(l))&&(d=Vm(r)),ca(r))){const y=Li(r);f=Jl(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const g=l&&!p&&!i?ok(l,d):sa(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+g.x,y:n.y*f.y-d.scrollTop*f.y+m.y+g.y}}function Sq(e){return Array.from(e.getClientRects())}function Eq(e){const t=fa(e),n=Vm(e),r=e.ownerDocument.body,a=Jr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Jr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+Bm(e);const u=-n.scrollTop;return Go(r).direction==="rtl"&&(l+=Jr(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:l,y:u}}const tO=25;function Rq(e,t){const n=no(e),r=fa(e),a=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,u=0,d=0;if(a){i=a.width,l=a.height;const m=Qb();(!m||m&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}const f=Bm(r);if(f<=0){const m=r.ownerDocument,p=m.body,g=getComputedStyle(p),y=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-y);b<=tO&&(i-=b)}else f<=tO&&(i+=f);return{width:i,height:l,x:u,y:d}}const xq=new Set(["absolute","fixed"]);function Tq(e,t){const n=Li(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=ca(e)?Jl(e):sa(1),l=e.clientWidth*i.x,u=e.clientHeight*i.y,d=a*i.x,f=r*i.y;return{width:l,height:u,x:d,y:f}}function nO(e,t,n){let r;if(t==="viewport")r=Rq(e,n);else if(t==="document")r=Eq(fa(e));else if(Ho(t))r=Tq(t,n);else{const a=rk(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Qp(r)}function ak(e,t){const n=Bs(e);return n===t||!Ho(n)||sc(n)?!1:Go(n).position==="fixed"||ak(n,t)}function Oq(e,t){const n=t.get(e);if(n)return n;let r=rd(e,[],!1).filter(u=>Ho(u)&&bc(u)!=="body"),a=null;const i=Go(e).position==="fixed";let l=i?Bs(e):e;for(;Ho(l)&&!sc(l);){const u=Go(l),d=Wb(l);!d&&u.position==="fixed"&&(a=null),(i?!d&&!a:!d&&u.position==="static"&&!!a&&xq.has(a.position)||bd(l)&&!d&&ak(e,l))?r=r.filter(m=>m!==l):a=u,l=Bs(l)}return t.set(e,r),r}function Cq(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const l=[...n==="clippingAncestors"?Fm(t)?[]:Oq(t,this._c):[].concat(n),r],u=l[0],d=l.reduce((f,m)=>{const p=nO(t,m,a);return f.top=Jr(p.top,f.top),f.right=Vs(p.right,f.right),f.bottom=Vs(p.bottom,f.bottom),f.left=Jr(p.left,f.left),f},nO(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function Aq(e){const{width:t,height:n}=nk(e);return{width:t,height:n}}function Iq(e,t,n){const r=ca(t),a=fa(t),i=n==="fixed",l=Li(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const d=sa(0);function f(){d.x=Bm(a)}if(r||!r&&!i)if((bc(t)!=="body"||bd(a))&&(u=Vm(t)),r){const y=Li(t,!0,i,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else a&&f();i&&!r&&a&&f();const m=a&&!r&&!i?ok(a,u):sa(0),p=l.left+u.scrollLeft-d.x-m.x,g=l.top+u.scrollTop-d.y-m.y;return{x:p,y:g,width:l.width,height:l.height}}function e0(e){return Go(e).position==="static"}function rO(e,t){if(!ca(e)||Go(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return fa(e)===n&&(n=n.ownerDocument.body),n}function sk(e,t){const n=no(e);if(Fm(e))return n;if(!ca(e)){let a=Bs(e);for(;a&&!sc(a);){if(Ho(a)&&!e0(a))return a;a=Bs(a)}return n}let r=rO(e,t);for(;r&&fq(r)&&e0(r);)r=rO(r,t);return r&&sc(r)&&e0(r)&&!Wb(r)?n:r||vq(e)||n}const Nq=async function(e){const t=this.getOffsetParent||sk,n=this.getDimensions,r=await n(e.floating);return{reference:Iq(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kq(e){return Go(e).direction==="rtl"}const Mq={convertOffsetParentRelativeRectToViewportRelativeRect:wq,getDocumentElement:fa,getClippingRect:Cq,getOffsetParent:sk,getElementRects:Nq,getClientRects:Sq,getDimensions:Aq,getScale:Jl,isElement:Ho,isRTL:kq};function ik(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Pq(e,t){let n=null,r;const a=fa(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),i();const f=e.getBoundingClientRect(),{left:m,top:p,width:g,height:y}=f;if(u||t(),!g||!y)return;const b=mh(p),S=mh(a.clientWidth-(m+g)),w=mh(a.clientHeight-(p+y)),R=mh(m),T={rootMargin:-b+"px "+-S+"px "+-w+"px "+-R+"px",threshold:Jr(0,Vs(1,d))||1};let O=!0;function C(I){const N=I[0].intersectionRatio;if(N!==d){if(!O)return l();N?l(!1,N):r=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!ik(f,e.getBoundingClientRect())&&l(),O=!1}try{n=new IntersectionObserver(C,{...T,root:a.ownerDocument})}catch{n=new IntersectionObserver(C,T)}n.observe(e)}return l(!0),i}function Dq(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Xb(e),m=a||i?[...f?rd(f):[],...rd(t)]:[];m.forEach(R=>{a&&R.addEventListener("scroll",n,{passive:!0}),i&&R.addEventListener("resize",n)});const p=f&&u?Pq(f,n):null;let g=-1,y=null;l&&(y=new ResizeObserver(R=>{let[E]=R;E&&E.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=y)==null||T.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let b,S=d?Li(e):null;d&&w();function w(){const R=Li(e);S&&!ik(S,R)&&n(),S=R,b=requestAnimationFrame(w)}return n(),()=>{var R;m.forEach(E=>{a&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),p?.(),(R=y)==null||R.disconnect(),y=null,d&&cancelAnimationFrame(b)}}const Lq=sq,jq=iq,$q=rq,Uq=cq,zq=oq,oO=nq,Fq=lq,Vq=(e,t,n)=>{const r=new Map,a={platform:Mq,...n},i={...a.platform,_c:r};return tq(e,t,{...a,platform:i})};var Bq=typeof document<"u",qq=function(){},yp=Bq?A.useLayoutEffect:qq;function Xp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Xp(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const i=a[r];if(!(i==="_owner"&&e.$$typeof)&&!Xp(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function lk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function aO(e,t){const n=lk(e);return Math.round(t*n)/n}function t0(e){const t=A.useRef(e);return yp(()=>{t.current=e}),t}function Hq(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:l}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[m,p]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=A.useState(r);Xp(g,r)||y(r);const[b,S]=A.useState(null),[w,R]=A.useState(null),E=A.useCallback(W=>{W!==I.current&&(I.current=W,S(W))},[]),T=A.useCallback(W=>{W!==N.current&&(N.current=W,R(W))},[]),O=i||b,C=l||w,I=A.useRef(null),N=A.useRef(null),P=A.useRef(m),$=d!=null,K=t0(d),F=t0(a),G=t0(f),U=A.useCallback(()=>{if(!I.current||!N.current)return;const W={placement:t,strategy:n,middleware:g};F.current&&(W.platform=F.current),Vq(I.current,N.current,W).then(he=>{const ae={...he,isPositioned:G.current!==!1};J.current&&!Xp(P.current,ae)&&(P.current=ae,Tm.flushSync(()=>{p(ae)}))})},[g,t,n,F,G]);yp(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(W=>({...W,isPositioned:!1})))},[f]);const J=A.useRef(!1);yp(()=>(J.current=!0,()=>{J.current=!1}),[]),yp(()=>{if(O&&(I.current=O),C&&(N.current=C),O&&C){if(K.current)return K.current(O,C,U);U()}},[O,C,U,K,$]);const le=A.useMemo(()=>({reference:I,floating:N,setReference:E,setFloating:T}),[E,T]),B=A.useMemo(()=>({reference:O,floating:C}),[O,C]),Y=A.useMemo(()=>{const W={position:n,left:0,top:0};if(!B.floating)return W;const he=aO(B.floating,m.x),ae=aO(B.floating,m.y);return u?{...W,transform:"translate("+he+"px, "+ae+"px)",...lk(B.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:he,top:ae}},[n,u,B.floating,m.x,m.y]);return A.useMemo(()=>({...m,update:U,refs:le,elements:B,floatingStyles:Y}),[m,U,le,B,Y])}const Gq=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?oO({element:r.current,padding:a}).fn(n):{}:r?oO({element:r,padding:a}).fn(n):{}}}},Zq=(e,t)=>({...Lq(e),options:[e,t]}),Kq=(e,t)=>({...jq(e),options:[e,t]}),Yq=(e,t)=>({...Fq(e),options:[e,t]}),Wq=(e,t)=>({...$q(e),options:[e,t]}),Qq=(e,t)=>({...Uq(e),options:[e,t]}),Xq=(e,t)=>({...zq(e),options:[e,t]}),Jq=(e,t)=>({...Gq(e),options:[e,t]});var eH="Arrow",ck=A.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return x.jsx(dn.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});ck.displayName=eH;var tH=ck;function uk(e){const[t,n]=A.useState(void 0);return Bo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let l,u;if("borderBoxSize"in i){const d=i.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,u=f.blockSize}else l=e.offsetWidth,u=e.offsetHeight;n({width:l,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Jb="Popper",[dk,fk]=zi(Jb),[nH,hk]=dk(Jb),pk=e=>{const{__scopePopper:t,children:n}=e,[r,a]=A.useState(null);return x.jsx(nH,{scope:t,anchor:r,onAnchorChange:a,children:n})};pk.displayName=Jb;var mk="PopperAnchor",gk=A.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=hk(mk,n),l=A.useRef(null),u=Bn(t,l),d=A.useRef(null);return A.useEffect(()=>{const f=d.current;d.current=r?.current||l.current,f!==d.current&&i.onAnchorChange(d.current)}),r?null:x.jsx(dn.div,{...a,ref:u})});gk.displayName=mk;var e1="PopperContent",[rH,oH]=dk(e1),vk=A.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:l=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:b,...S}=e,w=hk(e1,n),[R,E]=A.useState(null),T=Bn(t,ue=>E(ue)),[O,C]=A.useState(null),I=uk(O),N=I?.width??0,P=I?.height??0,$=r+(i!=="center"?"-"+i:""),K=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},F=Array.isArray(f)?f:[f],G=F.length>0,U={padding:K,boundary:F.filter(sH),altBoundary:G},{refs:J,floatingStyles:le,placement:B,isPositioned:Y,middlewareData:W}=Hq({strategy:"fixed",placement:$,whileElementsMounted:(...ue)=>Dq(...ue,{animationFrame:y==="always"}),elements:{reference:w.anchor},middleware:[Zq({mainAxis:a+P,alignmentAxis:l}),d&&Kq({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Yq():void 0,...U}),d&&Wq({...U}),Qq({...U,apply:({elements:ue,rects:ve,availableWidth:Ie,availableHeight:Ae})=>{const{width:H,height:ne}=ve.reference,_e=ue.floating.style;_e.setProperty("--radix-popper-available-width",`${Ie}px`),_e.setProperty("--radix-popper-available-height",`${Ae}px`),_e.setProperty("--radix-popper-anchor-width",`${H}px`),_e.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),O&&Jq({element:O,padding:u}),iH({arrowWidth:N,arrowHeight:P}),g&&Xq({strategy:"referenceHidden",...U})]}),[he,ae]=bk(B),M=qo(b);Bo(()=>{Y&&M?.()},[Y,M]);const q=W.arrow?.x,V=W.arrow?.y,D=W.arrow?.centerOffset!==0,[z,X]=A.useState();return Bo(()=>{R&&X(window.getComputedStyle(R).zIndex)},[R]),x.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...le,transform:Y?le.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[W.transformOrigin?.x,W.transformOrigin?.y].join(" "),...W.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(rH,{scope:n,placedSide:he,onArrowChange:C,arrowX:q,arrowY:V,shouldHideArrow:D,children:x.jsx(dn.div,{"data-side":he,"data-align":ae,...S,ref:T,style:{...S.style,animation:Y?void 0:"none"}})})})});vk.displayName=e1;var yk="PopperArrow",aH={top:"bottom",right:"left",bottom:"top",left:"right"},_k=A.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=oH(yk,r),l=aH[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:x.jsx(tH,{...a,ref:n,style:{...a.style,display:"block"}})})});_k.displayName=yk;function sH(e){return e!==null}var iH=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,l=a.arrow?.centerOffset!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,m]=bk(n),p={start:"0%",center:"50%",end:"100%"}[m],g=(a.arrow?.x??0)+u/2,y=(a.arrow?.y??0)+d/2;let b="",S="";return f==="bottom"?(b=l?p:`${g}px`,S=`${-d}px`):f==="top"?(b=l?p:`${g}px`,S=`${r.floating.height+d}px`):f==="right"?(b=`${-d}px`,S=l?p:`${y}px`):f==="left"&&(b=`${r.floating.width+d}px`,S=l?p:`${y}px`),{data:{x:b,y:S}}}});function bk(e){const[t,n="center"]=e.split("-");return[t,n]}var wk=pk,lH=gk,cH=vk,uH=_k,n0="rovingFocusGroup.onEntryFocus",dH={bubbles:!1,cancelable:!0},wd="RovingFocusGroup",[y_,Sk,fH]=WN(wd),[hH,Ek]=zi(wd,[fH]),[pH,mH]=hH(wd),Rk=A.forwardRef((e,t)=>x.jsx(y_.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(y_.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(gH,{...e,ref:t})})}));Rk.displayName=wd;var gH=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...p}=e,g=A.useRef(null),y=Bn(t,g),b=QN(i),[S,w]=_d({prop:l,defaultProp:u??null,onChange:d,caller:wd}),[R,E]=A.useState(!1),T=qo(f),O=Sk(n),C=A.useRef(!1),[I,N]=A.useState(0);return A.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(n0,T),()=>P.removeEventListener(n0,T)},[T]),x.jsx(pH,{scope:n,orientation:r,dir:b,loop:a,currentTabStopId:S,onItemFocus:A.useCallback(P=>w(P),[w]),onItemShiftTab:A.useCallback(()=>E(!0),[]),onFocusableItemAdd:A.useCallback(()=>N(P=>P+1),[]),onFocusableItemRemove:A.useCallback(()=>N(P=>P-1),[]),children:x.jsx(dn.div,{tabIndex:R||I===0?-1:0,"data-orientation":r,...p,ref:y,style:{outline:"none",...e.style},onMouseDown:it(e.onMouseDown,()=>{C.current=!0}),onFocus:it(e.onFocus,P=>{const $=!C.current;if(P.target===P.currentTarget&&$&&!R){const K=new CustomEvent(n0,dH);if(P.currentTarget.dispatchEvent(K),!K.defaultPrevented){const F=O().filter(B=>B.focusable),G=F.find(B=>B.active),U=F.find(B=>B.id===S),le=[G,U,...F].filter(Boolean).map(B=>B.ref.current);Ok(le,m)}}C.current=!1}),onBlur:it(e.onBlur,()=>E(!1))})})}),xk="RovingFocusGroupItem",Tk=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:l,...u}=e,d=js(),f=i||d,m=mH(xk,n),p=m.currentTabStopId===f,g=Sk(n),{onFocusableItemAdd:y,onFocusableItemRemove:b,currentTabStopId:S}=m;return A.useEffect(()=>{if(r)return y(),()=>b()},[r,y,b]),x.jsx(y_.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:x.jsx(dn.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:it(e.onMouseDown,w=>{r?m.onItemFocus(f):w.preventDefault()}),onFocus:it(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:it(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){m.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const R=_H(w,m.orientation,m.dir);if(R!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let T=g().filter(O=>O.focusable).map(O=>O.ref.current);if(R==="last")T.reverse();else if(R==="prev"||R==="next"){R==="prev"&&T.reverse();const O=T.indexOf(w.currentTarget);T=m.loop?bH(T,O+1):T.slice(O+1)}setTimeout(()=>Ok(T))}}),children:typeof l=="function"?l({isCurrentTabStop:p,hasTabStop:S!=null}):l})})});Tk.displayName=xk;var vH={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yH(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _H(e,t,n){const r=yH(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return vH[r]}function Ok(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function bH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wH=Rk,SH=Tk,__=["Enter"," "],EH=["ArrowDown","PageUp","Home"],Ck=["ArrowUp","PageDown","End"],RH=[...EH,...Ck],xH={ltr:[...__,"ArrowRight"],rtl:[...__,"ArrowLeft"]},TH={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Sd="Menu",[od,OH,CH]=WN(Sd),[Fi,Ak]=zi(Sd,[CH,fk,Ek]),Ed=fk(),Ik=Ek(),[Nk,Ys]=Fi(Sd),[AH,Rd]=Fi(Sd),kk=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:l=!0}=e,u=Ed(t),[d,f]=A.useState(null),m=A.useRef(!1),p=qo(i),g=QN(a);return A.useEffect(()=>{const y=()=>{m.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>m.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),x.jsx(wk,{...u,children:x.jsx(Nk,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:x.jsx(AH,{scope:t,onClose:A.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:l,children:r})})})};kk.displayName=Sd;var IH="MenuAnchor",t1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Ed(n);return x.jsx(lH,{...a,...r,ref:t})});t1.displayName=IH;var n1="MenuPortal",[NH,Mk]=Fi(n1,{forceMount:void 0}),Pk=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=Ys(n1,t);return x.jsx(NH,{scope:t,forceMount:n,children:x.jsx(Ya,{present:n||i.open,children:x.jsx(Vb,{asChild:!0,container:a,children:r})})})};Pk.displayName=n1;var Eo="MenuContent",[kH,r1]=Fi(Eo),Dk=A.forwardRef((e,t)=>{const n=Mk(Eo,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Ys(Eo,e.__scopeMenu),l=Rd(Eo,e.__scopeMenu);return x.jsx(od.Provider,{scope:e.__scopeMenu,children:x.jsx(Ya,{present:r||i.open,children:x.jsx(od.Slot,{scope:e.__scopeMenu,children:l.modal?x.jsx(MH,{...a,ref:t}):x.jsx(PH,{...a,ref:t})})})})}),MH=A.forwardRef((e,t)=>{const n=Ys(Eo,e.__scopeMenu),r=A.useRef(null),a=Bn(t,r);return A.useEffect(()=>{const i=r.current;if(i)return MN(i)},[]),x.jsx(o1,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:it(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),PH=A.forwardRef((e,t)=>{const n=Ys(Eo,e.__scopeMenu);return x.jsx(o1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),DH=td("MenuContent.ScrollLock"),o1=A.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:l,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,disableOutsideScroll:b,...S}=e,w=Ys(Eo,n),R=Rd(Eo,n),E=Ed(n),T=Ik(n),O=OH(n),[C,I]=A.useState(null),N=A.useRef(null),P=Bn(t,N,w.onContentChange),$=A.useRef(0),K=A.useRef(""),F=A.useRef(0),G=A.useRef(null),U=A.useRef("right"),J=A.useRef(0),le=b?Bb:A.Fragment,B=b?{as:DH,allowPinchZoom:!0}:void 0,Y=he=>{const ae=K.current+he,M=O().filter(ue=>!ue.disabled),q=document.activeElement,V=M.find(ue=>ue.ref.current===q)?.textValue,D=M.map(ue=>ue.textValue),z=ZH(D,ae,V),X=M.find(ue=>ue.textValue===z)?.ref.current;(function ue(ve){K.current=ve,window.clearTimeout($.current),ve!==""&&($.current=window.setTimeout(()=>ue(""),1e3))})(ae),X&&setTimeout(()=>X.focus())};A.useEffect(()=>()=>window.clearTimeout($.current),[]),RN();const W=A.useCallback(he=>U.current===G.current?.side&&YH(he,G.current?.area),[]);return x.jsx(kH,{scope:n,searchRef:K,onItemEnter:A.useCallback(he=>{W(he)&&he.preventDefault()},[W]),onItemLeave:A.useCallback(he=>{W(he)||(N.current?.focus(),I(null))},[W]),onTriggerLeave:A.useCallback(he=>{W(he)&&he.preventDefault()},[W]),pointerGraceTimerRef:F,onPointerGraceIntentChange:A.useCallback(he=>{G.current=he},[]),children:x.jsx(le,{...B,children:x.jsx(Fb,{asChild:!0,trapped:a,onMountAutoFocus:it(i,he=>{he.preventDefault(),N.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:x.jsx(zb,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,children:x.jsx(wH,{asChild:!0,...T,dir:R.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:I,onEntryFocus:it(d,he=>{R.isUsingKeyboardRef.current||he.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(cH,{role:"menu","aria-orientation":"vertical","data-state":Xk(w.open),"data-radix-menu-content":"",dir:R.dir,...E,...S,ref:P,style:{outline:"none",...S.style},onKeyDown:it(S.onKeyDown,he=>{const M=he.target.closest("[data-radix-menu-content]")===he.currentTarget,q=he.ctrlKey||he.altKey||he.metaKey,V=he.key.length===1;M&&(he.key==="Tab"&&he.preventDefault(),!q&&V&&Y(he.key));const D=N.current;if(he.target!==D||!RH.includes(he.key))return;he.preventDefault();const X=O().filter(ue=>!ue.disabled).map(ue=>ue.ref.current);Ck.includes(he.key)&&X.reverse(),HH(X)}),onBlur:it(e.onBlur,he=>{he.currentTarget.contains(he.target)||(window.clearTimeout($.current),K.current="")}),onPointerMove:it(e.onPointerMove,ad(he=>{const ae=he.target,M=J.current!==he.clientX;if(he.currentTarget.contains(ae)&&M){const q=he.clientX>J.current?"right":"left";U.current=q,J.current=he.clientX}}))})})})})})})});Dk.displayName=Eo;var LH="MenuGroup",a1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(dn.div,{role:"group",...r,ref:t})});a1.displayName=LH;var jH="MenuLabel",Lk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(dn.div,{...r,ref:t})});Lk.displayName=jH;var Jp="MenuItem",sO="menu.itemSelect",qm=A.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=A.useRef(null),l=Rd(Jp,e.__scopeMenu),u=r1(Jp,e.__scopeMenu),d=Bn(t,i),f=A.useRef(!1),m=()=>{const p=i.current;if(!n&&p){const g=new CustomEvent(sO,{bubbles:!0,cancelable:!0});p.addEventListener(sO,y=>r?.(y),{once:!0}),bN(p,g),g.defaultPrevented?f.current=!1:l.onClose()}};return x.jsx(jk,{...a,ref:d,disabled:n,onClick:it(e.onClick,m),onPointerDown:p=>{e.onPointerDown?.(p),f.current=!0},onPointerUp:it(e.onPointerUp,p=>{f.current||p.currentTarget?.click()}),onKeyDown:it(e.onKeyDown,p=>{const g=u.searchRef.current!=="";n||g&&p.key===" "||__.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});qm.displayName=Jp;var jk=A.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,l=r1(Jp,n),u=Ik(n),d=A.useRef(null),f=Bn(t,d),[m,p]=A.useState(!1),[g,y]=A.useState("");return A.useEffect(()=>{const b=d.current;b&&y((b.textContent??"").trim())},[i.children]),x.jsx(od.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:x.jsx(SH,{asChild:!0,...u,focusable:!r,children:x.jsx(dn.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:f,onPointerMove:it(e.onPointerMove,ad(b=>{r?l.onItemLeave(b):(l.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:it(e.onPointerLeave,ad(b=>l.onItemLeave(b))),onFocus:it(e.onFocus,()=>p(!0)),onBlur:it(e.onBlur,()=>p(!1))})})})}),$H="MenuCheckboxItem",$k=A.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return x.jsx(Bk,{scope:e.__scopeMenu,checked:n,children:x.jsx(qm,{role:"menuitemcheckbox","aria-checked":em(n)?"mixed":n,...a,ref:t,"data-state":l1(n),onSelect:it(a.onSelect,()=>r?.(em(n)?!0:!n),{checkForDefaultPrevented:!1})})})});$k.displayName=$H;var Uk="MenuRadioGroup",[UH,zH]=Fi(Uk,{value:void 0,onValueChange:()=>{}}),zk=A.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=qo(r);return x.jsx(UH,{scope:e.__scopeMenu,value:n,onValueChange:i,children:x.jsx(a1,{...a,ref:t})})});zk.displayName=Uk;var Fk="MenuRadioItem",Vk=A.forwardRef((e,t)=>{const{value:n,...r}=e,a=zH(Fk,e.__scopeMenu),i=n===a.value;return x.jsx(Bk,{scope:e.__scopeMenu,checked:i,children:x.jsx(qm,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":l1(i),onSelect:it(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Vk.displayName=Fk;var s1="MenuItemIndicator",[Bk,FH]=Fi(s1,{checked:!1}),qk=A.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=FH(s1,n);return x.jsx(Ya,{present:r||em(i.checked)||i.checked===!0,children:x.jsx(dn.span,{...a,ref:t,"data-state":l1(i.checked)})})});qk.displayName=s1;var VH="MenuSeparator",Hk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(dn.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Hk.displayName=VH;var BH="MenuArrow",Gk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=Ed(n);return x.jsx(uH,{...a,...r,ref:t})});Gk.displayName=BH;var i1="MenuSub",[qH,Zk]=Fi(i1),Kk=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:a}=e,i=Ys(i1,t),l=Ed(t),[u,d]=A.useState(null),[f,m]=A.useState(null),p=qo(a);return A.useEffect(()=>(i.open===!1&&p(!1),()=>p(!1)),[i.open,p]),x.jsx(wk,{...l,children:x.jsx(Nk,{scope:t,open:r,onOpenChange:p,content:f,onContentChange:m,children:x.jsx(qH,{scope:t,contentId:js(),triggerId:js(),trigger:u,onTriggerChange:d,children:n})})})};Kk.displayName=i1;var Nu="MenuSubTrigger",Yk=A.forwardRef((e,t)=>{const n=Ys(Nu,e.__scopeMenu),r=Rd(Nu,e.__scopeMenu),a=Zk(Nu,e.__scopeMenu),i=r1(Nu,e.__scopeMenu),l=A.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=i,f={__scopeMenu:e.__scopeMenu},m=A.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return A.useEffect(()=>m,[m]),A.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),d(null)}},[u,d]),x.jsx(t1,{asChild:!0,...f,children:x.jsx(jk,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":Xk(n.open),...e,ref:yd(t,a.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:it(e.onPointerMove,ad(p=>{i.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(i.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:it(e.onPointerLeave,ad(p=>{m();const g=n.content?.getBoundingClientRect();if(g){const y=n.content?.dataset.side,b=y==="right",S=b?-5:5,w=g[b?"left":"right"],R=g[b?"right":"left"];i.onPointerGraceIntentChange({area:[{x:p.clientX+S,y:p.clientY},{x:w,y:g.top},{x:R,y:g.top},{x:R,y:g.bottom},{x:w,y:g.bottom}],side:y}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(p),p.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:it(e.onKeyDown,p=>{const g=i.searchRef.current!=="";e.disabled||g&&p.key===" "||xH[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});Yk.displayName=Nu;var Wk="MenuSubContent",Qk=A.forwardRef((e,t)=>{const n=Mk(Eo,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Ys(Eo,e.__scopeMenu),l=Rd(Eo,e.__scopeMenu),u=Zk(Wk,e.__scopeMenu),d=A.useRef(null),f=Bn(t,d);return x.jsx(od.Provider,{scope:e.__scopeMenu,children:x.jsx(Ya,{present:r||i.open,children:x.jsx(od.Slot,{scope:e.__scopeMenu,children:x.jsx(o1,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:f,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{l.isUsingKeyboardRef.current&&d.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:it(e.onFocusOutside,m=>{m.target!==u.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:it(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:it(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),g=TH[l.dir].includes(m.key);p&&g&&(i.onOpenChange(!1),u.trigger?.focus(),m.preventDefault())})})})})})});Qk.displayName=Wk;function Xk(e){return e?"open":"closed"}function em(e){return e==="indeterminate"}function l1(e){return em(e)?"indeterminate":e?"checked":"unchecked"}function HH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function GH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ZH(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=GH(e,Math.max(i,0));a.length===1&&(l=l.filter(f=>f!==n));const d=l.find(f=>f.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function KH(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const u=t[i],d=t[l],f=u.x,m=u.y,p=d.x,g=d.y;m>r!=g>r&&n<(p-f)*(r-m)/(g-m)+f&&(a=!a)}return a}function YH(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return KH(n,t)}function ad(e){return t=>t.pointerType==="mouse"?e(t):void 0}var WH=kk,QH=t1,XH=Pk,JH=Dk,eG=a1,tG=Lk,nG=qm,rG=$k,oG=zk,aG=Vk,sG=qk,iG=Hk,lG=Gk,cG=Kk,uG=Yk,dG=Qk,Hm="DropdownMenu",[fG]=zi(Hm,[Ak]),vr=Ak(),[hG,Jk]=fG(Hm),e4=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:l,modal:u=!0}=e,d=vr(t),f=A.useRef(null),[m,p]=_d({prop:a,defaultProp:i??!1,onChange:l,caller:Hm});return x.jsx(hG,{scope:t,triggerId:js(),triggerRef:f,contentId:js(),open:m,onOpenChange:p,onOpenToggle:A.useCallback(()=>p(g=>!g),[p]),modal:u,children:x.jsx(WH,{...d,open:m,onOpenChange:p,dir:r,modal:u,children:n})})};e4.displayName=Hm;var t4="DropdownMenuTrigger",n4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=Jk(t4,n),l=vr(n);return x.jsx(QH,{asChild:!0,...l,children:x.jsx(dn.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:yd(t,i.triggerRef),onPointerDown:it(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:it(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});n4.displayName=t4;var pG="DropdownMenuPortal",r4=e=>{const{__scopeDropdownMenu:t,...n}=e,r=vr(t);return x.jsx(XH,{...r,...n})};r4.displayName=pG;var o4="DropdownMenuContent",a4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jk(o4,n),i=vr(n),l=A.useRef(!1);return x.jsx(JH,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:it(e.onCloseAutoFocus,u=>{l.current||a.triggerRef.current?.focus(),l.current=!1,u.preventDefault()}),onInteractOutside:it(e.onInteractOutside,u=>{const d=u.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,m=d.button===2||f;(!a.modal||m)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});a4.displayName=o4;var mG="DropdownMenuGroup",gG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(eG,{...a,...r,ref:t})});gG.displayName=mG;var vG="DropdownMenuLabel",yG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(tG,{...a,...r,ref:t})});yG.displayName=vG;var _G="DropdownMenuItem",s4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(nG,{...a,...r,ref:t})});s4.displayName=_G;var bG="DropdownMenuCheckboxItem",wG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(rG,{...a,...r,ref:t})});wG.displayName=bG;var SG="DropdownMenuRadioGroup",EG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(oG,{...a,...r,ref:t})});EG.displayName=SG;var RG="DropdownMenuRadioItem",xG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(aG,{...a,...r,ref:t})});xG.displayName=RG;var TG="DropdownMenuItemIndicator",OG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(sG,{...a,...r,ref:t})});OG.displayName=TG;var CG="DropdownMenuSeparator",i4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(iG,{...a,...r,ref:t})});i4.displayName=CG;var AG="DropdownMenuArrow",IG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(lG,{...a,...r,ref:t})});IG.displayName=AG;var NG=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:a,defaultOpen:i}=e,l=vr(t),[u,d]=_d({prop:r,defaultProp:i??!1,onChange:a,caller:"DropdownMenuSub"});return x.jsx(cG,{...l,open:u,onOpenChange:d,children:n})},kG="DropdownMenuSubTrigger",l4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(uG,{...a,...r,ref:t})});l4.displayName=kG;var MG="DropdownMenuSubContent",c4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=vr(n);return x.jsx(dG,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});c4.displayName=MG;var PG=e4,DG=n4,LG=r4,jG=a4,$G=s4,Nre=i4,kre=NG,Mre=l4,Pre=c4,UG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xd=UG.reduce((e,t)=>{const n=vN(`Primitive.${t}`),r=A.forwardRef((a,i)=>{const{asChild:l,...u}=a,d=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),zG="Label",u4=A.forwardRef((e,t)=>x.jsx(xd.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));u4.displayName=zG;var FG=u4;function VG(e,t=[]){let n=[];function r(i,l){const u=A.createContext(l);u.displayName=i+"Context";const d=n.length;n=[...n,l];const f=p=>{const{scope:g,children:y,...b}=p,S=g?.[e]?.[d]||u,w=A.useMemo(()=>b,Object.values(b));return x.jsx(S.Provider,{value:w,children:y})};f.displayName=i+"Provider";function m(p,g){const y=g?.[e]?.[d]||u,b=A.useContext(y);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(l=>A.createContext(l));return function(u){const d=u?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,BG(a,...t)]}function BG(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const l=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var qG=uA();function HG(){return qG.useSyncExternalStore(GG,()=>!0,()=>!1)}function GG(){return()=>{}}var c1="Avatar",[ZG]=VG(c1),[KG,d4]=ZG(c1),f4=A.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,i]=A.useState("idle");return x.jsx(KG,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:x.jsx(xd.span,{...r,ref:t})})});f4.displayName=c1;var h4="AvatarImage",p4=A.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...i}=e,l=d4(h4,n),u=YG(r,i),d=qo(f=>{a(f),l.onImageLoadingStatusChange(f)});return Bo(()=>{u!=="idle"&&d(u)},[u,d]),u==="loaded"?x.jsx(xd.img,{...i,ref:t,src:r}):null});p4.displayName=h4;var m4="AvatarFallback",g4=A.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,i=d4(m4,n),[l,u]=A.useState(r===void 0);return A.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(d)}},[r]),l&&i.imageLoadingStatus!=="loaded"?x.jsx(xd.span,{...a,ref:t}):null});g4.displayName=m4;function iO(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function YG(e,{referrerPolicy:t,crossOrigin:n}){const r=HG(),a=A.useRef(null),i=r?(a.current||(a.current=new window.Image),a.current):null,[l,u]=A.useState(()=>iO(i,e));return Bo(()=>{u(iO(i,e))},[i,e]),Bo(()=>{const d=p=>()=>{u(p)};if(!i)return;const f=d("loaded"),m=d("error");return i.addEventListener("load",f),i.addEventListener("error",m),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",f),i.removeEventListener("error",m)}},[i,n,t]),l}var WG=f4,QG=p4,XG=g4;function JG(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function u1(e,t,n=""){const r=JG(e),a=e?.length;if(!r||t!==void 0){const l=n&&`"${n}" `,u="",d=r?`length=${a}`:`type=${typeof e}`;throw new Error(l+"expected Uint8Array"+u+", got "+d)}return e}function lO(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function eZ(e,t){u1(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function b_(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function r0(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function ea(e,t){return e<<32-t|e>>>t}const tZ=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",nZ=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function rZ(e){if(u1(e),tZ)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=nZ[e[n]];return t}function oZ(e,t={}){const n=(a,i)=>e(i).update(a).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=a=>e(a),Object.assign(n,t),Object.freeze(n)}const aZ=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function sZ(e,t,n){return e&t^~e&n}function iZ(e,t,n){return e&t^e&n^t&n}class lZ{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,r,a){this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=a,this.buffer=new Uint8Array(t),this.view=r0(this.buffer)}update(t){lO(this),u1(t);const{view:n,buffer:r,blockLen:a}=this,i=t.length;for(let l=0;l<i;){const u=Math.min(a-this.pos,i-l);if(u===a){const d=r0(t);for(;a<=i-l;l+=a)this.process(d,l);continue}r.set(t.subarray(l,l+u),this.pos),this.pos+=u,l+=u,this.pos===a&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){lO(this),eZ(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:a,isLE:i}=this;let{pos:l}=this;n[l++]=128,b_(this.buffer.subarray(l)),this.padOffset>a-l&&(this.process(r,0),l=0);for(let p=l;p<a;p++)n[p]=0;r.setBigUint64(a-8,BigInt(this.length*8),i),this.process(r,0);const u=r0(t),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const f=d/4,m=this.get();if(f>m.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<f;p++)u.setUint32(4*p,m[p],i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||=new this.constructor,t.set(...this.get());const{blockLen:n,buffer:r,length:a,finished:i,destroyed:l,pos:u}=this;return t.destroyed=l,t.finished=i,t.length=a,t.pos=u,a%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const Es=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),cZ=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Rs=new Uint32Array(64);class uZ extends lZ{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:r,D:a,E:i,F:l,G:u,H:d}=this;return[t,n,r,a,i,l,u,d]}set(t,n,r,a,i,l,u,d){this.A=t|0,this.B=n|0,this.C=r|0,this.D=a|0,this.E=i|0,this.F=l|0,this.G=u|0,this.H=d|0}process(t,n){for(let p=0;p<16;p++,n+=4)Rs[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const g=Rs[p-15],y=Rs[p-2],b=ea(g,7)^ea(g,18)^g>>>3,S=ea(y,17)^ea(y,19)^y>>>10;Rs[p]=S+Rs[p-7]+b+Rs[p-16]|0}let{A:r,B:a,C:i,D:l,E:u,F:d,G:f,H:m}=this;for(let p=0;p<64;p++){const g=ea(u,6)^ea(u,11)^ea(u,25),y=m+g+sZ(u,d,f)+cZ[p]+Rs[p]|0,S=(ea(r,2)^ea(r,13)^ea(r,22))+iZ(r,a,i)|0;m=f,f=d,d=u,u=l+y|0,l=i,i=a,a=r,r=y+S|0}r=r+this.A|0,a=a+this.B|0,i=i+this.C|0,l=l+this.D|0,u=u+this.E|0,d=d+this.F|0,f=f+this.G|0,m=m+this.H|0,this.set(r,a,i,l,u,d,f,m)}roundClean(){b_(Rs)}destroy(){this.set(0,0,0,0,0,0,0,0),b_(this.buffer)}}class dZ extends uZ{A=Es[0]|0;B=Es[1]|0;C=Es[2]|0;D=Es[3]|0;E=Es[4]|0;F=Es[5]|0;G=Es[6]|0;H=Es[7]|0;constructor(){super(32)}}const fZ=oZ(()=>new dZ,aZ(1));function hZ(e){const t=A.useRef({value:e,previous:e});return A.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Gm="Checkbox",[pZ]=zi(Gm),[mZ,d1]=pZ(Gm);function gZ(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:i,form:l,name:u,onCheckedChange:d,required:f,value:m="on",internal_do_not_use_render:p}=e,[g,y]=_d({prop:n,defaultProp:a??!1,onChange:d,caller:Gm}),[b,S]=A.useState(null),[w,R]=A.useState(null),E=A.useRef(!1),T=b?!!l||!!b.closest("form"):!0,O={checked:g,disabled:i,setChecked:y,control:b,setControl:S,name:u,form:l,value:m,hasConsumerStoppedPropagationRef:E,required:f,defaultChecked:$s(a)?!1:a,isFormControl:T,bubbleInput:w,setBubbleInput:R};return x.jsx(mZ,{scope:t,...O,children:vZ(p)?p(O):r})}var v4="CheckboxTrigger",y4=A.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:i,value:l,disabled:u,checked:d,required:f,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:y,bubbleInput:b}=d1(v4,e),S=Bn(a,m),w=A.useRef(d);return A.useEffect(()=>{const R=i?.form;if(R){const E=()=>p(w.current);return R.addEventListener("reset",E),()=>R.removeEventListener("reset",E)}},[i,p]),x.jsx(dn.button,{type:"button",role:"checkbox","aria-checked":$s(d)?"mixed":d,"aria-required":f,"data-state":R4(d),"data-disabled":u?"":void 0,disabled:u,value:l,...r,ref:S,onKeyDown:it(t,R=>{R.key==="Enter"&&R.preventDefault()}),onClick:it(n,R=>{p(E=>$s(E)?!0:!E),b&&y&&(g.current=R.isPropagationStopped(),g.current||R.stopPropagation())})})});y4.displayName=v4;var _4=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:i,required:l,disabled:u,value:d,onCheckedChange:f,form:m,...p}=e;return x.jsx(gZ,{__scopeCheckbox:n,checked:a,defaultChecked:i,disabled:u,required:l,onCheckedChange:f,name:r,form:m,value:d,internal_do_not_use_render:({isFormControl:g})=>x.jsxs(x.Fragment,{children:[x.jsx(y4,{...p,ref:t,__scopeCheckbox:n}),g&&x.jsx(E4,{__scopeCheckbox:n})]})})});_4.displayName=Gm;var b4="CheckboxIndicator",w4=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,i=d1(b4,n);return x.jsx(Ya,{present:r||$s(i.checked)||i.checked===!0,children:x.jsx(dn.span,{"data-state":R4(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});w4.displayName=b4;var S4="CheckboxBubbleInput",E4=A.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:l,required:u,disabled:d,name:f,value:m,form:p,bubbleInput:g,setBubbleInput:y}=d1(S4,e),b=Bn(n,y),S=hZ(i),w=uk(r);A.useEffect(()=>{const E=g;if(!E)return;const T=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(T,"checked").set,I=!a.current;if(S!==i&&C){const N=new Event("click",{bubbles:I});E.indeterminate=$s(i),C.call(E,$s(i)?!1:i),E.dispatchEvent(N)}},[g,S,i,a]);const R=A.useRef($s(i)?!1:i);return x.jsx(dn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??R.current,required:u,disabled:d,name:f,value:m,form:p,...t,tabIndex:-1,ref:b,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});E4.displayName=S4;function vZ(e){return typeof e=="function"}function $s(e){return e==="indeterminate"}function R4(e){return $s(e)?"indeterminate":e?"checked":"unchecked"}var x4={OBJECT:"object",UNDEFINED:"undefined"},gh="browser",cO="cpu",uO="device",o0="engine",vh="os",Os="name",tm="type",w_="vendor",Do="version",S_="architecture",E_="major",R_="model",yZ="console",_Z="mobile",bZ="tablet",wZ="smarttv",SZ="wearable",EZ="embedded",RZ=typeof window!==x4.UNDEFINED,a0=RZ&&window.navigator?window.navigator:void 0;a0&&a0.userAgentData&&a0.userAgentData;var Zm=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},yh=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==x4.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return yh.call(e.init,[[gh,[Os,Do,E_,tm]],[cO,[S_]],[uO,[tm,R_,w_]],[o0,[Os,Do]],[vh,[Os,Do]]]),yh.call(e.isIgnore,[[gh,[Do,E_]],[o0,[Do]],[vh,[Do]]]),yh.call(e.isIgnoreRgx,[[gh,/ ?browser$/i],[vh,/ ?os$/i]]),yh.call(e.toString,[[gh,[Os,Do]],[cO,[S_]],[uO,[w_,R_]],[o0,[Os,Do]],[vh,[Os,Do]]]),e})();Zm([Os,Do,E_,tm]);Zm([S_]);Zm([R_,w_,tm,yZ,_Z,wZ,bZ,SZ,EZ]);Zm([Os,Do]);function xZ(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const T4=ee.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Td=()=>{const e=ee.useContext(T4);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};xZ(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
106
|
+
[data-state=closed]
|
|
107
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function TZ(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function OZ(){return f1(/^Mac/)}function CZ(){return f1(/^iPhone/)}function dO(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function AZ(){return f1(/^iPad/)||OZ()&&navigator.maxTouchPoints>1}function O4(){return CZ()||AZ()}function f1(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const IZ=24,NZ=typeof window<"u"?A.useLayoutEffect:A.useEffect;function fO(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const s0=typeof document<"u"&&window.visualViewport;function hO(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function C4(e){for(hO(e)&&(e=e.parentElement);e&&!hO(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const kZ=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let _h=0,i0;function MZ(e={}){let{isDisabled:t}=e;NZ(()=>{if(!t)return _h++,_h===1&&O4()&&(i0=PZ()),()=>{_h--,_h===0&&i0?.()}},[t])}function PZ(){let e,t=0,n=p=>{e=C4(p.target),!(e===document.documentElement&&e===document.body)&&(t=p.changedTouches[0].pageY)},r=p=>{if(!e||e===document.documentElement||e===document.body){p.preventDefault();return}let g=p.changedTouches[0].pageY,y=e.scrollTop,b=e.scrollHeight-e.clientHeight;b!==0&&((y<=0&&g>t||y>=b&&g<t)&&p.preventDefault(),t=g)},a=p=>{let g=p.target;x_(g)&&g!==document.activeElement&&(p.preventDefault(),g.style.transform="translateY(-2000px)",g.focus(),requestAnimationFrame(()=>{g.style.transform=""}))},i=p=>{let g=p.target;x_(g)&&(g.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{g.style.transform="",s0&&(s0.height<window.innerHeight?requestAnimationFrame(()=>{pO(g)}):s0.addEventListener("resize",()=>pO(g),{once:!0}))}))},l=()=>{window.scrollTo(0,0)},u=window.pageXOffset,d=window.pageYOffset,f=fO(DZ(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=fO(bu(document,"touchstart",n,{passive:!1,capture:!0}),bu(document,"touchmove",r,{passive:!1,capture:!0}),bu(document,"touchend",a,{passive:!1,capture:!0}),bu(document,"focus",i,!0),bu(window,"scroll",l));return()=>{f(),m(),window.scrollTo(u,d)}}function DZ(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function bu(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function pO(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=C4(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,a=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;const l=n.getBoundingClientRect().bottom+IZ;i>l&&(n.scrollTop+=a-r)}e=n.parentElement}}function x_(e){return e instanceof HTMLInputElement&&!kZ.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function LZ(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function jZ(...e){return t=>e.forEach(n=>LZ(n,t))}function A4(...e){return A.useCallback(jZ(...e),e)}const I4=new WeakMap;function Fn(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([a,i])=>{if(a.startsWith("--")){e.style.setProperty(a,i);return}r[a]=e.style[a],e.style[a]=i}),!n&&I4.set(e,r)}function $Z(e,t){if(!e||!(e instanceof HTMLElement))return;let n=I4.get(e);n&&(e.style[t]=n[t])}const kn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function bh(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let a=r.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[kn(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[kn(t)?5:4]):null)}function UZ(e){return 8*(Math.log(e+1)-2)}function l0(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function zZ(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const cn={DURATION:.5,EASE:[.32,.72,0,1]},N4=.4,FZ=.25,VZ=100,k4=8,mi=16,T_=26,c0="vaul-dragging";function M4(e){const t=ee.useRef(e);return ee.useEffect(()=>{t.current=e}),ee.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function BZ({defaultProp:e,onChange:t}){const n=ee.useState(e),[r]=n,a=ee.useRef(r),i=M4(t);return ee.useEffect(()=>{a.current!==r&&(i(r),a.current=r)},[r,a,i]),n}function P4({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=BZ({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,u=M4(n),d=ee.useCallback(f=>{if(i){const p=typeof f=="function"?f(e):f;p!==e&&u(p)}else a(f)},[i,e,a,u]);return[l,d]}function qZ({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:i,onSnapPointChange:l,direction:u="bottom",container:d,snapToSequentialPoint:f}){const[m,p]=P4({prop:e,defaultProp:n?.[0],onChange:t}),[g,y]=ee.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);ee.useEffect(()=>{function N(){y({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)},[]);const b=ee.useMemo(()=>m===n?.[n.length-1]||null,[n,m]),S=ee.useMemo(()=>{var N;return(N=n?.findIndex(P=>P===m))!=null?N:null},[n,m]),w=n&&n.length>0&&(i||i===0)&&!Number.isNaN(i)&&n[i]===m||!n,R=ee.useMemo(()=>{const N=d?{width:d.getBoundingClientRect().width,height:d.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var P;return(P=n?.map($=>{const K=typeof $=="string";let F=0;if(K&&(F=parseInt($,10)),kn(u)){const U=K?F:g?$*N.height:0;return g?u==="bottom"?N.height-U:-N.height+U:U}const G=K?F:g?$*N.width:0;return g?u==="right"?N.width-G:-N.width+G:G}))!=null?P:[]},[n,g,d]),E=ee.useMemo(()=>S!==null?R?.[S]:null,[R,S]),T=ee.useCallback(N=>{var P;const $=(P=R?.findIndex(K=>K===N))!=null?P:null;l($),Fn(r.current,{transition:`transform ${cn.DURATION}s cubic-bezier(${cn.EASE.join(",")})`,transform:kn(u)?`translate3d(0, ${N}px, 0)`:`translate3d(${N}px, 0, 0)`}),R&&$!==R.length-1&&i!==void 0&&$!==i&&$<i?Fn(a.current,{transition:`opacity ${cn.DURATION}s cubic-bezier(${cn.EASE.join(",")})`,opacity:"0"}):Fn(a.current,{transition:`opacity ${cn.DURATION}s cubic-bezier(${cn.EASE.join(",")})`,opacity:"1"}),p(n?.[Math.max($,0)])},[r.current,n,R,i,a,p]);ee.useEffect(()=>{if(m||e){var N;const P=(N=n?.findIndex($=>$===e||$===m))!=null?N:-1;R&&P!==-1&&typeof R[P]=="number"&&T(R[P])}},[m,e,n,R,T]);function O({draggedDistance:N,closeDrawer:P,velocity:$,dismissible:K}){if(i===void 0)return;const F=u==="bottom"||u==="right"?(E??0)-N:(E??0)+N,G=S===i-1,U=S===0,J=N>0;if(G&&Fn(a.current,{transition:`opacity ${cn.DURATION}s cubic-bezier(${cn.EASE.join(",")})`}),!f&&$>2&&!J){K?P():T(R[0]);return}if(!f&&$>2&&J&&R&&n){T(R[n.length-1]);return}const le=R?.reduce((Y,W)=>typeof Y!="number"||typeof W!="number"?Y:Math.abs(W-F)<Math.abs(Y-F)?W:Y),B=kn(u)?window.innerHeight:window.innerWidth;if($>N4&&Math.abs(N)<B*.4){const Y=J?1:-1;if(Y>0&&b&&n){T(R[n.length-1]);return}if(U&&Y<0&&K&&P(),S===null)return;T(R[S+Y]);return}T(le)}function C({draggedDistance:N}){if(E===null)return;const P=u==="bottom"||u==="right"?E-N:E+N;(u==="bottom"||u==="right")&&P<R[R.length-1]||(u==="top"||u==="left")&&P>R[R.length-1]||Fn(r.current,{transform:kn(u)?`translate3d(0, ${P}px, 0)`:`translate3d(${P}px, 0, 0)`})}function I(N,P){if(!n||typeof S!="number"||!R||i===void 0)return null;const $=S===i-1;if(S>=i&&P)return 0;if($&&!P)return 1;if(!w&&!$)return null;const F=$?S+1:S-1,G=$?R[F]-R[F-1]:R[F+1]-R[F],U=N/Math.abs(G);return $?1-U:U}return{isLastSnapPoint:b,activeSnapPoint:m,shouldFade:w,getPercentageDragged:I,setActiveSnapPoint:p,activeSnapPointIndex:S,onRelease:O,onDrag:C,snapPointsOffset:R}}const HZ=()=>()=>{};function GZ(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=Td(),i=ee.useRef(null),l=A.useMemo(()=>document.body.style.backgroundColor,[]);function u(){return(window.innerWidth-T_)/window.innerWidth}ee.useEffect(()=>{if(t&&n){i.current&&clearTimeout(i.current);const d=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!d)return;zZ(r&&!a?l0(document.body,{background:"black"}):HZ,l0(d,{transformOrigin:kn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${cn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${cn.EASE.join(",")})`}));const f=l0(d,{borderRadius:`${k4}px`,overflow:"hidden",...kn(e)?{transform:`scale(${u()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${u()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{f(),i.current=window.setTimeout(()=>{l?document.body.style.background=l:document.body.style.removeProperty("background")},cn.DURATION*1e3)}}},[t,n,l])}let wu=null;function ZZ({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a,noBodyStyles:i}){const[l,u]=ee.useState(()=>typeof window<"u"?window.location.href:""),d=ee.useRef(0),f=ee.useCallback(()=>{if(dO()&&wu===null&&e&&!i){wu={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:p,innerHeight:g}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-d.current}px`,left:`${-p}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const y=g-window.innerHeight;y&&d.current>=g&&(document.body.style.top=`${-(d.current+y)}px`)}),300)}},[e]),m=ee.useCallback(()=>{if(dO()&&wu!==null&&!i){const p=-parseInt(document.body.style.top,10),g=-parseInt(document.body.style.left,10);Object.assign(document.body.style,wu),window.requestAnimationFrame(()=>{if(a&&l!==window.location.href){u(window.location.href);return}window.scrollTo(g,p)}),wu=null}},[l]);return ee.useEffect(()=>{function p(){d.current=window.scrollY}return p(),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}},[]),ee.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),ee.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&f(),t||window.setTimeout(()=>{m()},500)):m())},[e,r,l,t,n,f,m]),{restorePositionSetting:m}}function KZ({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:a,snapPoints:i,shouldScaleBackground:l=!1,setBackgroundColorOnScale:u=!0,closeThreshold:d=FZ,scrollLockTimeout:f=VZ,dismissible:m=!0,handleOnly:p=!1,fadeFromIndex:g=i&&i.length-1,activeSnapPoint:y,setActiveSnapPoint:b,fixed:S,modal:w=!0,onClose:R,nested:E,noBodyStyles:T=!1,direction:O="bottom",defaultOpen:C=!1,disablePreventScroll:I=!0,snapToSequentialPoint:N=!1,preventScrollRestoration:P=!1,repositionInputs:$=!0,onAnimationEnd:K,container:F,autoFocus:G=!1}){var U,J;const[le=!1,B]=P4({defaultProp:C,prop:e,onChange:Be=>{t?.(Be),!Be&&!E&&ke(),setTimeout(()=>{K?.(Be)},cn.DURATION*1e3),Be&&!w&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Be||(document.body.style.pointerEvents="auto")}}),[Y,W]=ee.useState(!1),[he,ae]=ee.useState(!1),[M,q]=ee.useState(!1),V=ee.useRef(null),D=ee.useRef(null),z=ee.useRef(null),X=ee.useRef(null),ue=ee.useRef(null),ve=ee.useRef(!1),Ie=ee.useRef(null),Ae=ee.useRef(0),H=ee.useRef(!1),ne=ee.useRef(!C),_e=ee.useRef(0),se=ee.useRef(null),ce=ee.useRef(((U=se.current)==null?void 0:U.getBoundingClientRect().height)||0),Te=ee.useRef(((J=se.current)==null?void 0:J.getBoundingClientRect().width)||0),Pe=ee.useRef(0),Xe=ee.useCallback(Be=>{i&&Be===oe.length-1&&(D.current=new Date)},[]),{activeSnapPoint:Ve,activeSnapPointIndex:Ye,setActiveSnapPoint:Z,onRelease:re,snapPointsOffset:oe,onDrag:we,shouldFade:Re,getPercentageDragged:Ee}=qZ({snapPoints:i,activeSnapPointProp:y,setActiveSnapPointProp:b,drawerRef:se,fadeFromIndex:g,overlayRef:V,onSnapPointChange:Xe,direction:O,container:F,snapToSequentialPoint:N});MZ({isDisabled:!le||he||!w||M||!Y||!$||!I});const{restorePositionSetting:ke}=ZZ({isOpen:le,modal:w,nested:E??!1,hasBeenOpened:Y,preventScrollRestoration:P,noBodyStyles:T});function Je(){return(window.innerWidth-T_)/window.innerWidth}function rt(Be){var _t,Rt;!m&&!i||se.current&&!se.current.contains(Be.target)||(ce.current=((_t=se.current)==null?void 0:_t.getBoundingClientRect().height)||0,Te.current=((Rt=se.current)==null?void 0:Rt.getBoundingClientRect().width)||0,ae(!0),z.current=new Date,O4()&&window.addEventListener("touchend",()=>ve.current=!1,{once:!0}),Be.target.setPointerCapture(Be.pointerId),Ae.current=kn(O)?Be.pageY:Be.pageX)}function Tt(Be,_t){var Rt;let lt=Be;const Ot=(Rt=window.getSelection())==null?void 0:Rt.toString(),qe=se.current?bh(se.current,O):null,ct=new Date;if(lt.tagName==="SELECT"||lt.hasAttribute("data-vaul-no-drag")||lt.closest("[data-vaul-no-drag]"))return!1;if(O==="right"||O==="left")return!0;if(D.current&&ct.getTime()-D.current.getTime()<500)return!1;if(qe!==null&&(O==="bottom"?qe>0:qe<0))return!0;if(Ot&&Ot.length>0)return!1;if(ue.current&&ct.getTime()-ue.current.getTime()<f&&qe===0||_t)return ue.current=ct,!1;for(;lt;){if(lt.scrollHeight>lt.clientHeight){if(lt.scrollTop!==0)return ue.current=new Date,!1;if(lt.getAttribute("role")==="dialog")return!0}lt=lt.parentNode}return!0}function ur(Be){if(se.current&&he){const _t=O==="bottom"||O==="right"?1:-1,Rt=(Ae.current-(kn(O)?Be.pageY:Be.pageX))*_t,lt=Rt>0,Ot=i&&!m&&!lt;if(Ot&&Ye===0)return;const qe=Math.abs(Rt),ct=document.querySelector("[data-vaul-drawer-wrapper]"),Kt=O==="bottom"||O==="top"?ce.current:Te.current;let Bt=qe/Kt;const dr=Ee(qe,lt);if(dr!==null&&(Bt=dr),Ot&&Bt>=1||!ve.current&&!Tt(Be.target,lt))return;if(se.current.classList.add(c0),ve.current=!0,Fn(se.current,{transition:"none"}),Fn(V.current,{transition:"none"}),i&&we({draggedDistance:Rt}),lt&&!i){const en=UZ(Rt),ao=Math.min(en*-1,0)*_t;Fn(se.current,{transform:kn(O)?`translate3d(0, ${ao}px, 0)`:`translate3d(${ao}px, 0, 0)`});return}const Ct=1-Bt;if((Re||g&&Ye===g-1)&&(r?.(Be,Bt),Fn(V.current,{opacity:`${Ct}`,transition:"none"},!0)),ct&&V.current&&l){const en=Math.min(Je()+Bt*(1-Je()),1),ao=8-Bt*8,Wn=Math.max(0,14-Bt*14);Fn(ct,{borderRadius:`${ao}px`,transform:kn(O)?`scale(${en}) translate3d(0, ${Wn}px, 0)`:`scale(${en}) translate3d(${Wn}px, 0, 0)`,transition:"none"},!0)}if(!i){const en=qe*_t;Fn(se.current,{transform:kn(O)?`translate3d(0, ${en}px, 0)`:`translate3d(${en}px, 0, 0)`})}}}ee.useEffect(()=>{window.requestAnimationFrame(()=>{ne.current=!0})},[]),ee.useEffect(()=>{var Be;function _t(){if(!se.current||!$)return;const Rt=document.activeElement;if(x_(Rt)||H.current){var lt;const Ot=((lt=window.visualViewport)==null?void 0:lt.height)||0,qe=window.innerHeight;let ct=qe-Ot;const Kt=se.current.getBoundingClientRect().height||0,Bt=Kt>qe*.8;Pe.current||(Pe.current=Kt);const dr=se.current.getBoundingClientRect().top;if(Math.abs(_e.current-ct)>60&&(H.current=!H.current),i&&i.length>0&&oe&&Ye){const Ct=oe[Ye]||0;ct+=Ct}if(_e.current=ct,Kt>Ot||H.current){const Ct=se.current.getBoundingClientRect().height;let en=Ct;Ct>Ot&&(en=Ot-(Bt?dr:T_)),S?se.current.style.height=`${Ct-Math.max(ct,0)}px`:se.current.style.height=`${Math.max(en,Ot-dr)}px`}else TZ()||(se.current.style.height=`${Pe.current}px`);i&&i.length>0&&!H.current?se.current.style.bottom="0px":se.current.style.bottom=`${Math.max(ct,0)}px`}}return(Be=window.visualViewport)==null||Be.addEventListener("resize",_t),()=>{var Rt;return(Rt=window.visualViewport)==null?void 0:Rt.removeEventListener("resize",_t)}},[Ye,i,oe]);function Xt(Be){Jt(),R?.(),Be||B(!1),setTimeout(()=>{i&&Z(i[0])},cn.DURATION*1e3)}function En(){if(!se.current)return;const Be=document.querySelector("[data-vaul-drawer-wrapper]"),_t=bh(se.current,O);Fn(se.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${cn.DURATION}s cubic-bezier(${cn.EASE.join(",")})`}),Fn(V.current,{transition:`opacity ${cn.DURATION}s cubic-bezier(${cn.EASE.join(",")})`,opacity:"1"}),l&&_t&&_t>0&&le&&Fn(Be,{borderRadius:`${k4}px`,overflow:"hidden",...kn(O)?{transform:`scale(${Je()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Je()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${cn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${cn.EASE.join(",")})`},!0)}function Jt(){!he||!se.current||(se.current.classList.remove(c0),ve.current=!1,ae(!1),X.current=new Date)}function jn(Be){if(!he||!se.current)return;se.current.classList.remove(c0),ve.current=!1,ae(!1),X.current=new Date;const _t=bh(se.current,O);if(!Be||!Tt(Be.target,!1)||!_t||Number.isNaN(_t)||z.current===null)return;const Rt=X.current.getTime()-z.current.getTime(),lt=Ae.current-(kn(O)?Be.pageY:Be.pageX),Ot=Math.abs(lt)/Rt;if(Ot>.05&&(q(!0),setTimeout(()=>{q(!1)},200)),i){re({draggedDistance:lt*(O==="bottom"||O==="right"?1:-1),closeDrawer:Xt,velocity:Ot,dismissible:m}),a?.(Be,!0);return}if(O==="bottom"||O==="right"?lt>0:lt<0){En(),a?.(Be,!0);return}if(Ot>N4){Xt(),a?.(Be,!1);return}var qe;const ct=Math.min((qe=se.current.getBoundingClientRect().height)!=null?qe:0,window.innerHeight);var Kt;const Bt=Math.min((Kt=se.current.getBoundingClientRect().width)!=null?Kt:0,window.innerWidth),dr=O==="left"||O==="right";if(Math.abs(_t)>=(dr?Bt:ct)*d){Xt(),a?.(Be,!1);return}a?.(Be,!0),En()}ee.useEffect(()=>(le&&(Fn(document.documentElement,{scrollBehavior:"auto"}),D.current=new Date),()=>{$Z(document.documentElement,"scrollBehavior")}),[le]);function Rn(Be){const _t=Be?(window.innerWidth-mi)/window.innerWidth:1,Rt=Be?-mi:0;Ie.current&&window.clearTimeout(Ie.current),Fn(se.current,{transition:`transform ${cn.DURATION}s cubic-bezier(${cn.EASE.join(",")})`,transform:kn(O)?`scale(${_t}) translate3d(0, ${Rt}px, 0)`:`scale(${_t}) translate3d(${Rt}px, 0, 0)`}),!Be&&se.current&&(Ie.current=setTimeout(()=>{const lt=bh(se.current,O);Fn(se.current,{transition:"none",transform:kn(O)?`translate3d(0, ${lt}px, 0)`:`translate3d(${lt}px, 0, 0)`})},500))}function Wa(Be,_t){if(_t<0)return;const Rt=(window.innerWidth-mi)/window.innerWidth,lt=Rt+_t*(1-Rt),Ot=-mi+_t*mi;Fn(se.current,{transform:kn(O)?`scale(${lt}) translate3d(0, ${Ot}px, 0)`:`scale(${lt}) translate3d(${Ot}px, 0, 0)`,transition:"none"})}function ma(Be,_t){const Rt=kn(O)?window.innerHeight:window.innerWidth,lt=_t?(Rt-mi)/Rt:1,Ot=_t?-mi:0;_t&&Fn(se.current,{transition:`transform ${cn.DURATION}s cubic-bezier(${cn.EASE.join(",")})`,transform:kn(O)?`scale(${lt}) translate3d(0, ${Ot}px, 0)`:`scale(${lt}) translate3d(${Ot}px, 0, 0)`})}return ee.useEffect(()=>{w||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[w]),ee.createElement(jB,{defaultOpen:C,onOpenChange:Be=>{!m&&!Be||(Be?W(!0):Xt(!0),B(Be))},open:le},ee.createElement(T4.Provider,{value:{activeSnapPoint:Ve,snapPoints:i,setActiveSnapPoint:Z,drawerRef:se,overlayRef:V,onOpenChange:t,onPress:rt,onRelease:jn,onDrag:ur,dismissible:m,shouldAnimate:ne,handleOnly:p,isOpen:le,isDragging:he,shouldFade:Re,closeDrawer:Xt,onNestedDrag:Wa,onNestedOpenChange:Rn,onNestedRelease:ma,keyboardIsOpen:H,modal:w,snapPointsOffset:oe,activeSnapPointIndex:Ye,direction:O,shouldScaleBackground:l,setBackgroundColorOnScale:u,noBodyStyles:T,container:F,autoFocus:G}},n))}const D4=ee.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:a,shouldFade:i,isOpen:l,modal:u,shouldAnimate:d}=Td(),f=A4(t,n),m=r&&r.length>0;if(!u)return null;const p=ee.useCallback(g=>a(g),[a]);return ee.createElement(zB,{onMouseUp:p,ref:f,"data-vaul-overlay":"","data-vaul-snap-points":l&&m?"true":"false","data-vaul-snap-points-overlay":l&&i?"true":"false","data-vaul-animate":d?.current?"true":"false",...e})});D4.displayName="Drawer.Overlay";const L4=ee.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},a){const{drawerRef:i,onPress:l,onRelease:u,onDrag:d,keyboardIsOpen:f,snapPointsOffset:m,activeSnapPointIndex:p,modal:g,isOpen:y,direction:b,snapPoints:S,container:w,handleOnly:R,shouldAnimate:E,autoFocus:T}=Td(),[O,C]=ee.useState(!1),I=A4(a,i),N=ee.useRef(null),P=ee.useRef(null),$=ee.useRef(!1),K=S&&S.length>0;GZ();const F=(U,J,le=0)=>{if($.current)return!0;const B=Math.abs(U.y),Y=Math.abs(U.x),W=Y>B,he=["bottom","right"].includes(J)?1:-1;if(J==="left"||J==="right"){if(!(U.x*he<0)&&Y>=0&&Y<=le)return W}else if(!(U.y*he<0)&&B>=0&&B<=le)return!W;return $.current=!0,!0};ee.useEffect(()=>{K&&window.requestAnimationFrame(()=>{C(!0)})},[]);function G(U){N.current=null,$.current=!1,u(U)}return ee.createElement(FB,{"data-vaul-drawer-direction":b,"data-vaul-drawer":"","data-vaul-delayed-snap-points":O?"true":"false","data-vaul-snap-points":y&&K?"true":"false","data-vaul-custom-container":w?"true":"false","data-vaul-animate":E?.current?"true":"false",...r,ref:I,style:m&&m.length>0?{"--snap-point-height":`${m[p??0]}px`,...t}:t,onPointerDown:U=>{R||(r.onPointerDown==null||r.onPointerDown.call(r,U),N.current={x:U.pageX,y:U.pageY},l(U))},onOpenAutoFocus:U=>{n?.(U),T||U.preventDefault()},onPointerDownOutside:U=>{if(e?.(U),!g||U.defaultPrevented){U.preventDefault();return}f.current&&(f.current=!1)},onFocusOutside:U=>{if(!g){U.preventDefault();return}},onPointerMove:U=>{if(P.current=U,R||(r.onPointerMove==null||r.onPointerMove.call(r,U),!N.current))return;const J=U.pageY-N.current.y,le=U.pageX-N.current.x,B=U.pointerType==="touch"?10:2;F({x:le,y:J},b,B)?d(U):(Math.abs(le)>B||Math.abs(J)>B)&&(N.current=null)},onPointerUp:U=>{r.onPointerUp==null||r.onPointerUp.call(r,U),N.current=null,$.current=!1,u(U)},onPointerOut:U=>{r.onPointerOut==null||r.onPointerOut.call(r,U),G(P.current)},onContextMenu:U=>{r.onContextMenu==null||r.onContextMenu.call(r,U),P.current&&G(P.current)}})});L4.displayName="Drawer.Content";const YZ=250,WZ=120,QZ=ee.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:a,isDragging:i,snapPoints:l,activeSnapPoint:u,setActiveSnapPoint:d,dismissible:f,handleOnly:m,isOpen:p,onPress:g,onDrag:y}=Td(),b=ee.useRef(null),S=ee.useRef(!1);function w(){if(S.current){T();return}window.setTimeout(()=>{R()},WZ)}function R(){if(i||e||S.current){T();return}if(T(),!l||l.length===0){f||a();return}if(u===l[l.length-1]&&f){a();return}const C=l.findIndex(N=>N===u);if(C===-1)return;const I=l[C+1];d(I)}function E(){b.current=window.setTimeout(()=>{S.current=!0},YZ)}function T(){b.current&&window.clearTimeout(b.current),S.current=!1}return ee.createElement("div",{onClick:w,onPointerCancel:T,onPointerDown:O=>{m&&g(O),E()},onPointerMove:O=>{m&&y(O)},ref:r,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},ee.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});QZ.displayName="Drawer.Handle";function XZ(e){const t=Td(),{container:n=t.container,...r}=e;return ee.createElement(UB,{container:n,...r})}const Dre={Root:KZ,Content:L4,Overlay:D4,Trigger:$B,Portal:XZ,Title:VB};var ec=(e,t,n)=>new Promise((r,a)=>{var i=d=>{try{u(n.next(d))}catch(f){a(f)}},l=d=>{try{u(n.throw(d))}catch(f){a(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,l);u((n=n.apply(e,t)).next())}),_p=class extends Error{},JZ=class extends Error{},eK=e=>Math.exp(e)*150,tK=(e,...t)=>ec(void 0,[e,...t],function*(n,{attempts:r=4}={}){var a;let i;for(let l=0;l<r;l++)try{return yield n()}catch(u){i=u,yield new Promise(d=>setTimeout(d,eK(l)))}throw new _p((a=i?.message)!=null?a:"Exhausted all retries")}),Su,j4="captchaFoxOnLoad",mO=`https://cdn.captchafox.com/api.js?render=explicit&onload=${j4}`;function nK(){return ec(this,arguments,function*({nonce:e}={}){return Su&&document.querySelector(`script[src="${mO}"]`)||(Su=new Promise((t,n)=>{window[j4]=t;const r=document.createElement("script");r.src=mO,r.async=!0,r.defer=!0,r.onerror=a=>{r.remove(),Su=void 0,n(a)},e&&(r.nonce=e),document.body.appendChild(r)})),Su})}function rK(){return ec(this,arguments,function*(e={}){return tK(()=>nK(e))})}var Ml=()=>typeof window?.captchafox<"u",$4=A.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:r,theme:a,className:i,nonce:l,i18n:u,onError:d,onVerify:f,onLoad:m,onFail:p,onClose:g,onChallengeChange:y,onChallengeOpen:b},S)=>{const[w,R]=A.useState(),[E,T]=A.useState(),O=A.useRef(!1),C=A.useRef(),I=A.useRef(),N=A.useRef(),P=A.useRef(!1);A.useImperativeHandle(S,()=>({getResponse(){return!Ml()||!E?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(E)},reset(){if(!Ml()||!E){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(E)},remove(){if(!Ml()||!E){console.warn("[CaptchaFox] Widget has not been loaded");return}T(void 0),window.captchafox.remove(E)},execute:()=>ec(void 0,null,function*(){if(P.current)return Promise.reject(new _p);if(!Ml()||!E)return K();try{return yield window.captchafox.execute(E)}catch(U){const J=F(U);return Promise.reject(J)}})}),[E]),A.useEffect(()=>{E&&m?.()},[E]),A.useEffect(()=>()=>{$()},[]),A.useEffect(()=>{w&&(O.current?Ml()&&G():rK({nonce:l}).then(()=>ec(void 0,null,function*(){Ml()&&(O.current=!0,yield G())})).catch(U=>{var J;d?.(U),P.current=!0,(J=N.current)==null||J.call(N),console.error("[CaptchaFox] Could not load script:",U)}))},[w,t,n,r]);const $=()=>{clearTimeout(I.current)},K=()=>new Promise((U,J)=>{N.current=()=>{$(),J(new _p)},I.current=setTimeout(()=>{J(new JZ("Execute timed out"))},e*1e3),C.current=le=>{$(),window.captchafox.execute(le).then(U).catch(B=>{const Y=F(B);J(Y)})}}),F=U=>U!=="challenge-aborted"&&U!=="rate-limited"?new _p:U,G=()=>ec(void 0,null,function*(){var U,J,le;if((U=window.captchafox)==null||U.remove(E),!w||((J=w?.children)==null?void 0:J.length)===1)return;const B=yield(le=window.captchafox)==null?void 0:le.render(w,{lang:n,sitekey:t,mode:r,theme:a,i18n:u,onError:d,onFail:p,onClose:g,onVerify:f,onChallengeChange:y,onChallengeOpen:b});B&&(T(B),C.current&&(C.current(B),C.current=void 0))});return ee.createElement("div",{ref:R,id:E,className:i})});$4.displayName="CaptchaFox";function yo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O_(e,t){return O_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},O_(e,t)}function oK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,O_(e,t)}var aK=Object.defineProperty,sK=Object.defineProperties,iK=Object.getOwnPropertyDescriptors,nm=Object.getOwnPropertySymbols,U4=Object.prototype.hasOwnProperty,z4=Object.prototype.propertyIsEnumerable,C_=(e,t,n)=>t in e?aK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yr=(e,t)=>{for(var n in t||(t={}))U4.call(t,n)&&C_(e,n,t[n]);if(nm)for(var n of nm(t))z4.call(t,n)&&C_(e,n,t[n]);return e},F4=(e,t)=>sK(e,iK(t)),lK=(e,t)=>{var n={};for(var r in e)U4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&nm)for(var r of nm(e))t.indexOf(r)<0&&z4.call(e,r)&&(n[r]=e[r]);return n},Kn=(e,t,n)=>(C_(e,typeof t!="symbol"?t+"":t,n),n),ic=(e,t,n)=>new Promise((r,a)=>{var i=d=>{try{u(n.next(d))}catch(f){a(f)}},l=d=>{try{u(n.throw(d))}catch(f){a(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,l);u((n=n.apply(e,t)).next())}),cK="hCaptcha-script",bp="hCaptchaOnLoad",gO="script-error",Is="@hCaptcha/loader";function uK(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function V4(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function B4(e){return e||document.head}function dK(e){var t;e.setTag("source",Is),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",Yr({},fK())),e.setContext("device",F4(Yr({},pK()),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:((t=screen.orientation)==null?void 0:t.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))}function fK(){var e,t,n,r,a,i;let l=navigator.userAgent,u,d;return l.indexOf("Firefox")!==-1?(u="Firefox",d=(e=l.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):l.indexOf("Edg")!==-1?(u="Microsoft Edge",d=(t=l.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):l.indexOf("Chrome")!==-1&&l.indexOf("Safari")!==-1?(u="Chrome",d=(n=l.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):l.indexOf("Safari")!==-1&&l.indexOf("Chrome")===-1?(u="Safari",d=(r=l.match(/Version\/([\d.]+)/))==null?void 0:r[1]):l.indexOf("Opera")!==-1||l.indexOf("OPR")!==-1?(u="Opera",d=(a=l.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:a[2]):l.indexOf("MSIE")!==-1||l.indexOf("Trident")!==-1?(u="Internet Explorer",d=(i=l.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:i[2]):(u="Unknown",d="Unknown"),{name:u,version:d}}function hK(e){return new Promise(t=>setTimeout(t,e))}function pK(){let e=navigator.userAgent,t;e.indexOf("Win")!==-1?t="Windows":e.indexOf("Mac")!==-1?t="Mac":e.indexOf("Linux")!==-1?t="Linux":e.indexOf("Android")!==-1?t="Android":e.indexOf("like Mac")!==-1||e.indexOf("iPhone")!==-1||e.indexOf("iPad")!==-1?t="iOS":t="Unknown";let n;return/Mobile|iPhone|iPod|Android/i.test(e)?n="Mobile":/Tablet|iPad/i.test(e)?n="Tablet":n="Desktop",{model:t,family:t,device:n}}var mK=class q4{constructor(t){Kn(this,"_parent"),Kn(this,"breadcrumbs",[]),Kn(this,"context",{}),Kn(this,"extra",{}),Kn(this,"tags",{}),Kn(this,"request"),Kn(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new q4(this)}setRequest(t){return this.request=t,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(t){return typeof t.timestamp>"u"&&(t.timestamp=new Date().toISOString()),this.breadcrumbs.push(t),this}setExtra(t,n){return this.extra[t]=n,this}removeExtra(t){return delete this.extra[t],this}setContext(t,n){return typeof n.type>"u"&&(n.type=t),this.context[t]=n,this}removeContext(t){return delete this.context[t],this}setTags(t){return this.tags=Yr(Yr({},this.tags),t),this}setTag(t,n){return this.tags[t]=n,this}removeTag(t){return delete this.tags[t],this}setUser(t){return this.user=t,this}removeUser(){return this.user=void 0,this}toBody(){let t=[],n=this;for(;n;)t.push(n),n=n.parent;return t.reverse().reduce((r,a)=>{var i;return r.breadcrumbs=[...(i=r.breadcrumbs)!=null?i:[],...a.breadcrumbs],r.extra=Yr(Yr({},r.extra),a.extra),r.contexts=Yr(Yr({},r.contexts),a.context),r.tags=Yr(Yr({},r.tags),a.tags),a.user&&(r.user=a.user),a.request&&(r.request=a.request),r},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},gK=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vK=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,yK=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,_K=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,wh="?",vO="An unknown error occurred",bK="0.0.4";function wK(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function hr(e){return(e+256).toString(16).substring(1)}function SK(){let e=wK(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,hr(e[0])+hr(e[1])+hr(e[2])+hr(e[3])+"-"+hr(e[4])+hr(e[5])+"-"+hr(e[6])+hr(e[7])+"-"+hr(e[8])+hr(e[9])+"-"+hr(e[10])+hr(e[11])+hr(e[12])+hr(e[13])+hr(e[14])+hr(e[15])}var EK=[[gK,"chrome"],[yK,"winjs"],[vK,"gecko"]];function RK(e){var t,n,r,a;if(!e.stack)return null;let i=[],l=(r=(n=(t=e.stack).split)==null?void 0:n.call(t,`
|
|
108
|
+
`))!=null?r:[];for(let u=0;u<l.length;++u){let d=null,f=null,m=null;for(let[p,g]of EK)if(f=p.exec(l[u]),f){m=g;break}if(!(!f||!m)){if(m==="chrome")d={filename:(a=f[2])!=null&&a.startsWith("address at ")?f[2].substring(11):f[2],function:f[1]||wh,lineno:f[3]?+f[3]:null,colno:f[4]?+f[4]:null};else if(m==="winjs")d={filename:f[2],function:f[1]||wh,lineno:+f[3],colno:f[4]?+f[4]:null};else if(m==="gecko")u===0&&!f[5]&&e.columnNumber!==void 0&&i.length>0&&(i[0].column=e.columnNumber+1),d={filename:f[3],function:f[1]||wh,lineno:f[4]?+f[4]:null,colno:f[5]?+f[5]:null};else continue;!d.function&&d.lineno&&(d.function=wh),i.push(d)}}return i.length?i.reverse():null}function xK(e){let t=RK(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function TK(e){let t=_K.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw new Error("Invalid DSN");let r=n[5].split("/"),a=r.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}function OK(e,t,n){var r,a;let i=Yr({event_id:SK().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:bK},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type==="exception"){i.message=(a=(r=e.error)==null?void 0:r.message)!=null?a:"Unknown error",i.fingerprint=[i.message];let l=[],u=e.error;for(let d=0;d<5&&u&&(l.push(xK(u)),!(!u.cause||!(u.cause instanceof Error)));d++)u=u.cause;i.exception={values:l.reverse()}}return e.type==="message"&&(i.message=e.message,i.level=e.level),i}function CK(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let n=e,{message:r}=n,a=lK(n,["message"]),i=new Error(typeof r=="string"?r:vO);return Object.assign(i,a)}let t=new Error(vO);return Object.assign(t,{cause:e})}function AK(e,t,n){return ic(this,null,function*(){var r,a;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let i;if(n){let d=new AbortController;i=d.signal,setTimeout(()=>d.abort(),n)}let l=yield fetch(e,F4(Yr({},t),{signal:i})),u=yield l.text();return{status:l.status,body:u}}return yield new Promise((i,l)=>{var u,d;let f=new XMLHttpRequest;if(f.open((u=t?.method)!=null?u:"GET",e),f.onload=()=>i({status:f.status,body:f.responseText}),f.onerror=()=>l(new Error("XHR Network Error")),t?.headers)for(let[m,p]of Object.entries(t.headers))f.setRequestHeader(m,p);if(n){let m=setTimeout(()=>{f.abort(),l(new Error("Request timed out"))},n);f.onloadend=()=>{clearTimeout(m)}}f.send((d=t?.body)==null?void 0:d.toString())})}catch(i){return{status:0,body:(a=(r=i?.toString)==null?void 0:r.call(i))!=null?a:"Unknown error"}}})}var Mr,A_=(Mr=class{constructor(e){Kn(this,"apiURL"),Kn(this,"dsn"),Kn(this,"environment"),Kn(this,"release"),Kn(this,"sampleRate"),Kn(this,"debug"),Kn(this,"_scope"),Kn(this,"shouldBuffer",!1),Kn(this,"bufferlimit",20),Kn(this,"buffer",[]);var t,n,r,a,i;this.environment=e.environment,this.release=e.release,this.sampleRate=(t=e.sampleRate)!=null?t:1,this.debug=(n=e.debug)!=null?n:!1,this._scope=(r=e.scope)!=null?r:new mK,this.apiURL=TK(e.dsn),this.dsn=e.dsn,this.shouldBuffer=(a=e.buffer)!=null?a:!1,this.bufferlimit=(i=e.bufferLimit)!=null?i:20}static init(e){Mr._instance||(Mr._instance=new Mr(e))}static get instance(){if(!Mr._instance)throw new Error("Sentry has not been initialized");return Mr._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return Mr.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){Mr.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:CK(e),scope:t??this._scope})}static captureException(e,t){Mr.instance.captureException(e,t)}captureMessage(e,t="info",n){this.captureEvent({type:"message",level:t,message:e,scope:n??this._scope})}static captureMessage(e,t="info",n){Mr.instance.captureMessage(e,t,n)}captureEvent(e){if(Math.random()>=this.sampleRate){this.log("Dropped event due to sample rate");return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return ic(this,null,function*(){try{this.log("Sending sentry event",e);let n=OK(e,this.environment,this.release),r={event_id:n.event_id,dsn:this.dsn},a={type:"event"},i=JSON.stringify(r)+`
|
|
109
|
+
`+JSON.stringify(a)+`
|
|
110
|
+
`+JSON.stringify(n),l=yield AK(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:i},t);this.log("Sentry response",l.status),l.status!==200&&(console.log(l.body),console.error("Failed to send event to Sentry",l))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return ic(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(n=>this.sendEvent(n,e));yield Promise.all(t),this.log("Flushed all events")}catch(t){console.error("Failed to flush events",t)}})}static flush(e=5e3){return Mr.instance.flush(e)}static reset(){Mr._instance=void 0}},Kn(Mr,"_instance"),Mr),IK="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",NK="2.3.0",kK="production";function MK(e=!0){if(!e)return yO();A_.init({dsn:IK,release:NK,environment:kK});let t=A_.scope;return dK(t),yO(t)}function yO(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&A_.captureException(t,e)}}}function PK({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:r="anonymous",apihost:a="https://js.hcaptcha.com",cleanup:i=!1,secureApi:l=!1,scriptSource:u=""}={},d){let f=B4(e),m=V4(f);return new Promise((p,g)=>{let y=m.document.createElement("script");y.id=cK,u?y.src=`${u}?onload=${bp}`:l?y.src=`${a}/1/secure-api.js?onload=${bp}`:y.src=`${a}/1/api.js?onload=${bp}`,y.crossOrigin=r,y.async=n;let b=(S,w)=>{try{!l&&i&&f.removeChild(y),w(S)}catch(R){g(R)}};y.onload=S=>b(S,p),y.onerror=S=>{d&&d(y.src),b(S,g)},y.src+=t!==""?`&${t}`:"",f.appendChild(y)})}var Sh=[];function DK(e={cleanup:!1},t){try{t.addBreadcrumb({category:Is,message:"hCaptcha loader params",data:e});let n=B4(e.scriptLocation),r=V4(n),a=Sh.find(({scope:l})=>l===r.window);if(a)return t.addBreadcrumb({category:Is,message:"hCaptcha already loaded"}),a.promise;let i=new Promise((l,u)=>ic(this,null,function*(){try{r.window[bp]=()=>{t.addBreadcrumb({category:Is,message:"hCaptcha script called onload function"}),l(r.window.hcaptcha)};let d=uK({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl,uj:e.uj});yield PK(Yr({query:d},e),f=>{t.captureRequest({url:f,method:"GET"})}),t.addBreadcrumb({category:Is,message:"hCaptcha loaded",data:a})}catch{t.addBreadcrumb({category:Is,message:"hCaptcha failed to load"});let f=Sh.findIndex(m=>m.scope===r.window);f!==-1&&Sh.splice(f,1),u(new Error(gO))}}));return Sh.push({promise:i,scope:r.window}),i}catch(n){return t.captureException(n),Promise.reject(new Error(gO))}}function H4(e,t,n=0){return ic(this,null,function*(){var r,a;let i=(r=e.maxRetries)!=null?r:2,l=(a=e.retryDelay)!=null?a:1e3,u=n<i?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield DK(e,t)}catch(d){return t.addBreadcrumb({category:Is,message:u}),n>=i?(t.captureException(d),Promise.reject(d)):(t.addBreadcrumb({category:Is,message:`Waiting ${l}ms before retry attempt ${n+1}`}),yield hK(l),n+=1,H4(e,t,n))}})}function LK(){return ic(this,arguments,function*(e={}){let t=MK(e.sentry);return yield H4(e,t)})}function _O(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function bO(e){return e||document.head}var jK=(function(e){oK(t,e);function t(r){var a;return a=e.call(this,r)||this,a._hcaptcha=void 0,a.renderCaptcha=a.renderCaptcha.bind(yo(a)),a.resetCaptcha=a.resetCaptcha.bind(yo(a)),a.removeCaptcha=a.removeCaptcha.bind(yo(a)),a.isReady=a.isReady.bind(yo(a)),a._onReady=null,a.loadCaptcha=a.loadCaptcha.bind(yo(a)),a.handleOnLoad=a.handleOnLoad.bind(yo(a)),a.handleSubmit=a.handleSubmit.bind(yo(a)),a.handleExpire=a.handleExpire.bind(yo(a)),a.handleError=a.handleError.bind(yo(a)),a.handleOpen=a.handleOpen.bind(yo(a)),a.handleClose=a.handleClose.bind(yo(a)),a.handleChallengeExpired=a.handleChallengeExpired.bind(yo(a)),a.ref=A.createRef(),a.apiScriptRequested=!1,a.sentryHub=null,a.captchaId="",a._pendingExecute=null,a.state={isApiReady:!1,isRemoved:!1,elementId:r.id},a}var n=t.prototype;return n.componentDidMount=function(){var a=this,i=bO(this.props.scriptLocation),l=_O(i);this._hcaptcha=l.window.hcaptcha||void 0;var u=typeof this._hcaptcha<"u";if(u){this.setState({isApiReady:!0},function(){a.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var a=this._hcaptcha,i=this.captchaId;this._cancelPendingExecute("react-component-unmounted"),this.isReady()&&(a.reset(i),a.remove(i))},n.shouldComponentUpdate=function(a,i){return!(this.state.isApiReady!==i.isApiReady||this.state.isRemoved!==i.isRemoved)},n.componentDidUpdate=function(a){var i=this,l=["sitekey","size","theme","tabindex","languageOverride","endpoint"],u=l.every(function(d){return a[d]===i.props[d]});u||this.removeCaptcha(function(){i.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var a=this.props,i=a.apihost,l=a.assethost,u=a.endpoint,d=a.host,f=a.imghost,m=a.languageOverride,p=a.reCaptchaCompat,g=a.reportapi,y=a.sentry,b=a.custom,S=a.loadAsync,w=a.scriptLocation,R=a.scriptSource,E=a.secureApi,T=a.cleanup,O=T===void 0?!0:T,C=a.userJourneys,I={render:"explicit",apihost:i,assethost:l,endpoint:u,hl:m,host:d,imghost:f,recaptchacompat:p===!1?"off":null,reportapi:g,sentry:y,custom:b,loadAsync:S,scriptLocation:w,scriptSource:R,secureApi:E,cleanup:O,uj:C!==void 0?C:!1};LK(I).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(a){var i=this,l=this.props.onReady,u=this.state.isApiReady,d=this.captchaId;if(!(!u||d)){var f=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),m=this._hcaptcha,p=m.render(this.ref.current,f);this.captchaId=p,this.setState({isRemoved:!1},function(){a&&a(),l&&l(),i._onReady&&i._onReady(p)})}},n.resetCaptcha=function(){var a=this._hcaptcha,i=this.captchaId;this.isReady()&&(a.reset(i),this._cancelPendingExecute("hcaptcha-reset"))},n.removeCaptcha=function(a){var i=this,l=this._hcaptcha,u=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){i.captchaId="",l.remove(u),a&&a()})},n.handleOnLoad=function(){var a=this;this.setState({isApiReady:!0},function(){var i=bO(a.props.scriptLocation),l=_O(i);a._hcaptcha=l.window.hcaptcha,a.renderCaptcha(function(){var u=a.props.onLoad;u&&u()})})},n.handleSubmit=function(a){var i=this.props.onVerify,l=this.state.isRemoved,u=this._hcaptcha,d=this.captchaId;if(!(typeof u>"u"||l)){var f=u.getResponse(d),m=u.getRespKey(d);i&&i(f,m)}},n.handleExpire=function(){var a=this.props.onExpire,i=this._hcaptcha,l=this.captchaId;this.isReady()&&(i.reset(l),a&&a())},n.handleError=function(a){var i=this.props.onError,l=this._hcaptcha,u=this.captchaId;this.isReady()&&l.reset(u),i&&i(a)},n.isReady=function(){var a=this.state,i=a.isApiReady,l=a.isRemoved;return i&&!l},n._cancelPendingExecute=function(a){if(this._pendingExecute){var i=this._pendingExecute;this._pendingExecute=null;var l=new Error(a);i.reject(l)}},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(a){var i=this;a===void 0&&(a=null),a=typeof a=="object"?a:null;try{var l=this._hcaptcha,u=this.captchaId;if(a&&a.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return a&&a.async?new Promise(function(f,m){i._pendingExecute={resolve:f,reject:m},i._onReady=function(p){if(i._pendingExecute)try{var g=l.execute(p,a);g&&typeof g.then=="function"?g.then(function(y){i._pendingExecute=null,f(y)}).catch(function(y){i._pendingExecute=null,m(y)}):(i._pendingExecute=null,m(new Error("hcaptcha-execute-no-promise")))}catch(y){i._pendingExecute=null,m(y)}}}):(this._onReady=function(f){l.execute(f,a)},null);var d=l.execute(u,a);return a&&a.async&&d&&typeof d.then=="function"?new Promise(function(f,m){i._pendingExecute={resolve:f,reject:m},d.then(function(p){i._pendingExecute=null,f(p)}).catch(function(p){i._pendingExecute=null,m(p)})}):d}catch(f){return a&&a.async?Promise.reject(f):null}},n.close=function(){var a=this._hcaptcha,i=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return a.close(i)},n.setData=function(a){var i=this._hcaptcha,l=this.captchaId;this.isReady()&&(a&&typeof a!="object"&&(a=null),i.setData(l,a))},n.getResponse=function(){var a=this._hcaptcha;return a.getResponse(this.captchaId)},n.getRespKey=function(){var a=this._hcaptcha;return a.getRespKey(this.captchaId)},n.render=function(){var a=this.state.elementId;return A.createElement("div",{ref:this.ref,id:a})},t})(A.Component),$K=({as:e="div",...t},n)=>x.jsx(e,{...t,ref:n}),UK=A.forwardRef($K),zK="https://challenges.cloudflare.com/turnstile/v0/api.js",h1="cf-turnstile-script",FK="cf-turnstile",p1="onloadTurnstileCallback",G4=e=>!!document.getElementById(e),VK=({render:e="explicit",onLoadCallbackName:t=p1,scriptOptions:{nonce:n="",defer:r=!0,async:a=!0,id:i="",appendTo:l,onError:u,crossOrigin:d=""}={}})=>{let f=i||h1;if(G4(f))return;let m=document.createElement("script");m.id=f,m.src=`${zK}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${m.src}"]`)&&(m.defer=!!r,m.async=!!a,n&&(m.nonce=n),d&&(m.crossOrigin=d),u&&(m.onerror=u,delete window[t]),(l==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(m))},gi={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function BK(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function qK(e=h1){let[t,n]=A.useState(!1);return A.useEffect(()=>{let r=()=>{G4(e)&&n(!0)},a=new MutationObserver(r);return a.observe(document,{childList:!0,subtree:!0}),r(),()=>{a.disconnect()}},[e]),t}var Bu="unloaded",Z4,HK=new Promise((e,t)=>{Z4={resolve:e,reject:t},Bu==="ready"&&e(void 0)}),wO=(e=p1)=>(Bu==="unloaded"&&(Bu="loading",window[e]=()=>{Z4.resolve(),Bu="ready",delete window[e]}),HK),K4=A.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:a,onWidgetLoad:i,onSuccess:l,onExpire:u,onError:d,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g,onLoadScript:y,id:b,style:S,as:w="div",injectScript:R=!0,rerenderOnCallbackChange:E=!1,...T}=e,O=r.size,C=A.useCallback(()=>typeof O>"u"?{}:r.execution==="execute"?gi.invisible:r.appearance==="interaction-only"?gi.interactionOnly:gi[O],[r.execution,O,r.appearance]),[I,N]=A.useState(C()),P=A.useRef(null),[$,K]=A.useState(!1),F=A.useRef(void 0),G=A.useRef(!1),U=b||FK,J=A.useRef({onSuccess:l,onError:d,onExpire:u,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g});A.useEffect(()=>{E||(J.current={onSuccess:l,onError:d,onExpire:u,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g})});let le=n?.id||h1,B=qK(le),Y=n?.onLoadCallbackName||p1,W=r.appearance||"always",he=A.useMemo(()=>({sitekey:a,action:r.action,cData:r.cData,theme:r.theme||"auto",language:r.language||"auto",tabindex:r.tabIndex,"response-field":r.responseField,"response-field-name":r.responseFieldName,size:BK(O),retry:r.retry||"auto","retry-interval":r.retryInterval||8e3,"refresh-expired":r.refreshExpired||"auto","refresh-timeout":r.refreshTimeout||"auto",execution:r.execution||"render",appearance:r.appearance||"always","feedback-enabled":r.feedbackEnabled||!0,callback:M=>{G.current=!0,E?l?.(M):J.current.onSuccess?.(M)},"error-callback":E?d:(...M)=>J.current.onError?.(...M),"expired-callback":E?u:(...M)=>J.current.onExpire?.(...M),"before-interactive-callback":E?f:(...M)=>J.current.onBeforeInteractive?.(...M),"after-interactive-callback":E?m:(...M)=>J.current.onAfterInteractive?.(...M),"unsupported-callback":E?p:(...M)=>J.current.onUnsupported?.(...M),"timeout-callback":E?g:(...M)=>J.current.onTimeout?.(...M)}),[r.action,r.appearance,r.cData,r.execution,r.language,r.refreshExpired,r.responseField,r.responseFieldName,r.retry,r.retryInterval,r.tabIndex,r.theme,r.feedbackEnabled,r.refreshTimeout,a,O,E,E?l:null,E?d:null,E?u:null,E?f:null,E?m:null,E?p:null,E?g:null]),ae=A.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return A.useEffect(function(){R&&!$&&(wO(Y),VK({onLoadCallbackName:Y,scriptOptions:{...n,id:le}}))},[R,$,n,le,Y]),A.useEffect(function(){Bu!=="ready"&&wO(Y).then(()=>K(!0)).catch(console.error)},[Y]),A.useEffect(function(){if(!P.current||!$)return;let M=!1;return(async()=>{if(M||!P.current)return;let q=window.turnstile.render(P.current,he);F.current=q,F.current&&i?.(F.current)})(),()=>{M=!0,F.current&&(window.turnstile.remove(F.current),G.current=!1)}},[U,$,he]),A.useImperativeHandle(t,()=>{let{turnstile:M}=window;return{getResponse(){if(!M?.getResponse||!F.current||!ae()){console.warn("Turnstile has not been loaded");return}return M.getResponse(F.current)},async getResponsePromise(q=3e4,V=100){return new Promise((D,z)=>{let X,ue=async()=>{if(G.current&&window.turnstile&&F.current)try{let ve=window.turnstile.getResponse(F.current);return X&&clearTimeout(X),ve?D(ve):z(new Error("No response received"))}catch(ve){return X&&clearTimeout(X),console.warn("Failed to get response",ve),z(new Error("Failed to get response"))}X||(X=setTimeout(()=>{X&&clearTimeout(X),z(new Error("Timeout"))},q)),await new Promise(ve=>setTimeout(ve,V)),await ue()};ue()})},reset(){if(!M?.reset||!F.current||!ae()){console.warn("Turnstile has not been loaded");return}r.execution==="execute"&&N(gi.invisible);try{G.current=!1,M.reset(F.current)}catch(q){console.warn(`Failed to reset Turnstile widget ${F}`,q)}},remove(){if(!M?.remove||!F.current||!ae()){console.warn("Turnstile has not been loaded");return}N(gi.invisible),G.current=!1,M.remove(F.current),F.current=null},render(){if(!M?.render||!P.current||!ae()||F.current){console.warn("Turnstile has not been loaded or container not found");return}let q=M.render(P.current,he);return F.current=q,F.current&&i?.(F.current),r.execution!=="execute"&&N(O?gi[O]:{}),q},execute(){if(r.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!M?.execute||!P.current||!F.current||!ae()){console.warn("Turnstile has not been loaded or container not found");return}M.execute(P.current,he),N(O?gi[O]:{})},isExpired(){return!M?.isExpired||!F.current||!ae()?(console.warn("Turnstile has not been loaded"),!1):M.isExpired(F.current)}}},[F,r.execution,O,he,P,ae,$,i]),A.useEffect(()=>{if($||!B)return;if(window.turnstile){K(!0);return}let M=setInterval(()=>{window.turnstile&&(K(!0),clearInterval(M))},50);return()=>{clearInterval(M)}},[$,B]),A.useEffect(()=>{N(C())},[r.execution,O,W]),A.useEffect(()=>{!B||typeof y!="function"||y()},[B]),x.jsx(UK,{ref:P,as:w,id:U,style:{...I,...S},...T})});K4.displayName="Turnstile";var u0={exports:{}},d0,SO;function GK(){if(SO)return d0;SO=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return d0=e,d0}var f0,EO;function ZK(){if(EO)return f0;EO=1;var e=GK();function t(){}function n(){}return n.resetWarningCache=t,f0=function(){function r(l,u,d,f,m,p){if(p!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},f0}var RO;function m1(){return RO||(RO=1,u0.exports=ZK()()),u0.exports}var KK=m1();const Pr=Ha(KK);var YK=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function I_(){return I_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I_.apply(this,arguments)}function WK(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Eh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,N_(e,t)}function N_(e,t){return N_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},N_(e,t)}var Km=(function(e){QK(t,e);function t(){var r;return r=e.call(this)||this,r.handleExpired=r.handleExpired.bind(Eh(r)),r.handleErrored=r.handleErrored.bind(Eh(r)),r.handleChange=r.handleChange.bind(Eh(r)),r.handleRecaptchaRef=r.handleRecaptchaRef.bind(Eh(r)),r}var n=t.prototype;return n.getCaptchaFunction=function(a){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[a]:this.props.grecaptcha[a]:null},n.getValue=function(){var a=this.getCaptchaFunction("getResponse");return a&&this._widgetId!==void 0?a(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var a=this.getCaptchaFunction("execute");if(a&&this._widgetId!==void 0)return a(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var a=this;return new Promise(function(i,l){a.executionResolve=i,a.executionReject=l,a.execute()})},n.reset=function(){var a=this.getCaptchaFunction("reset");a&&this._widgetId!==void 0&&a(this._widgetId)},n.forceReset=function(){var a=this.getCaptchaFunction("reset");a&&a()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(a){this.props.onChange&&this.props.onChange(a),this.executionResolve&&(this.executionResolve(a),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var a=this.getCaptchaFunction("render");if(a&&this._widgetId===void 0){var i=document.createElement("div");this._widgetId=a(i,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(i)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(a){this.captcha=a},n.render=function(){var a=this.props;a.sitekey,a.onChange,a.theme,a.type,a.tabindex,a.onExpired,a.onErrored,a.size,a.stoken,a.grecaptcha,a.badge,a.hl,a.isolated;var i=WK(a,YK);return A.createElement("div",I_({},i,{ref:this.handleRecaptchaRef}))},t})(A.Component);Km.displayName="ReCAPTCHA";Km.propTypes={sitekey:Pr.string.isRequired,onChange:Pr.func,grecaptcha:Pr.object,theme:Pr.oneOf(["dark","light"]),type:Pr.oneOf(["image","audio"]),tabindex:Pr.number,onExpired:Pr.func,onErrored:Pr.func,size:Pr.oneOf(["compact","normal","invisible"]),stoken:Pr.string,hl:Pr.string,badge:Pr.oneOf(["bottomright","bottomleft","inline"]),isolated:Pr.bool};Km.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var h0={exports:{}},Dt={};var xO;function XK(){if(xO)return Dt;xO=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,S=e?Symbol.for("react.block"):60121,w=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function T(C){if(typeof C=="object"&&C!==null){var I=C.$$typeof;switch(I){case t:switch(C=C.type,C){case d:case f:case r:case i:case a:case p:return C;default:switch(C=C&&C.$$typeof,C){case u:case m:case b:case y:case l:return C;default:return I}}case n:return I}}}function O(C){return T(C)===f}return Dt.AsyncMode=d,Dt.ConcurrentMode=f,Dt.ContextConsumer=u,Dt.ContextProvider=l,Dt.Element=t,Dt.ForwardRef=m,Dt.Fragment=r,Dt.Lazy=b,Dt.Memo=y,Dt.Portal=n,Dt.Profiler=i,Dt.StrictMode=a,Dt.Suspense=p,Dt.isAsyncMode=function(C){return O(C)||T(C)===d},Dt.isConcurrentMode=O,Dt.isContextConsumer=function(C){return T(C)===u},Dt.isContextProvider=function(C){return T(C)===l},Dt.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},Dt.isForwardRef=function(C){return T(C)===m},Dt.isFragment=function(C){return T(C)===r},Dt.isLazy=function(C){return T(C)===b},Dt.isMemo=function(C){return T(C)===y},Dt.isPortal=function(C){return T(C)===n},Dt.isProfiler=function(C){return T(C)===i},Dt.isStrictMode=function(C){return T(C)===a},Dt.isSuspense=function(C){return T(C)===p},Dt.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===r||C===f||C===i||C===a||C===p||C===g||typeof C=="object"&&C!==null&&(C.$$typeof===b||C.$$typeof===y||C.$$typeof===l||C.$$typeof===u||C.$$typeof===m||C.$$typeof===w||C.$$typeof===R||C.$$typeof===E||C.$$typeof===S)},Dt.typeOf=T,Dt}var TO;function JK(){return TO||(TO=1,h0.exports=XK()),h0.exports}var p0,OO;function eY(){if(OO)return p0;OO=1;var e=JK(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=r,i[e.Memo]=a;function l(b){return e.isMemo(b)?a:i[b.$$typeof]||t}var u=Object.defineProperty,d=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;function y(b,S,w){if(typeof S!="string"){if(g){var R=p(S);R&&R!==g&&y(b,R,w)}var E=d(S);f&&(E=E.concat(f(S)));for(var T=l(b),O=l(S),C=0;C<E.length;++C){var I=E[C];if(!n[I]&&!(w&&w[I])&&!(O&&O[I])&&!(T&&T[I])){var N=m(S,I);try{u(b,I,N)}catch{}}}}return b}return p0=y,p0}var tY=eY();const nY=Ha(tY);function k_(){return k_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k_.apply(this,arguments)}function rY(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function oY(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Mo={},aY=0;function sY(e,t){return t=t||{},function(r){var a=r.displayName||r.name||"Component",i=(function(u){oY(d,u);function d(m,p){var g;return g=u.call(this,m,p)||this,g.state={},g.__scriptURL="",g}var f=d.prototype;return f.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+aY++),this.__scriptLoaderID},f.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},f.asyncScriptLoaderHandleLoad=function(p){var g=this;this.setState(p,function(){return g.props.asyncScriptOnLoad&&g.props.asyncScriptOnLoad(g.state)})},f.asyncScriptLoaderTriggerOnScriptLoaded=function(){var p=Mo[this.__scriptURL];if(!p||!p.loaded)throw new Error("Script is not loaded.");for(var g in p.observers)p.observers[g](p);delete window[t.callbackName]},f.componentDidMount=function(){var p=this,g=this.setupScriptURL(),y=this.asyncScriptLoaderGetScriptLoaderID(),b=t,S=b.globalName,w=b.callbackName,R=b.scriptId;if(S&&typeof window[S]<"u"&&(Mo[g]={loaded:!0,observers:{}}),Mo[g]){var E=Mo[g];if(E&&(E.loaded||E.errored)){this.asyncScriptLoaderHandleLoad(E);return}E.observers[y]=function(N){return p.asyncScriptLoaderHandleLoad(N)};return}var T={};T[y]=function(N){return p.asyncScriptLoaderHandleLoad(N)},Mo[g]={loaded:!1,observers:T};var O=document.createElement("script");O.src=g,O.async=!0;for(var C in t.attributes)O.setAttribute(C,t.attributes[C]);R&&(O.id=R);var I=function(P){if(Mo[g]){var $=Mo[g],K=$.observers;for(var F in K)P(K[F])&&delete K[F]}};w&&typeof window<"u"&&(window[w]=function(){return p.asyncScriptLoaderTriggerOnScriptLoaded()}),O.onload=function(){var N=Mo[g];N&&(N.loaded=!0,I(function(P){return w?!1:(P(N),!0)}))},O.onerror=function(){var N=Mo[g];N&&(N.errored=!0,I(function(P){return P(N),!0}))},document.body.appendChild(O)},f.componentWillUnmount=function(){var p=this.__scriptURL;if(t.removeOnUnmount===!0)for(var g=document.getElementsByTagName("script"),y=0;y<g.length;y+=1)g[y].src.indexOf(p)>-1&&g[y].parentNode&&g[y].parentNode.removeChild(g[y]);var b=Mo[p];b&&(delete b.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete Mo[p])},f.render=function(){var p=t.globalName,g=this.props;g.asyncScriptOnLoad;var y=g.forwardedRef,b=rY(g,["asyncScriptOnLoad","forwardedRef"]);return p&&typeof window<"u"&&(b[p]=typeof window[p]<"u"?window[p]:void 0),b.ref=y,A.createElement(r,b)},d})(A.Component),l=A.forwardRef(function(u,d){return A.createElement(i,k_({},u,{forwardedRef:d}))});return l.displayName="AsyncScriptLoader("+a+")",l.propTypes={asyncScriptOnLoad:Pr.func},nY(l,r)}}var M_="onloadcallback",iY="grecaptcha";function P_(){return typeof window<"u"&&window.recaptchaOptions||{}}function lY(){var e=P_(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+M_+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+M_+"&render=explicit"}const cY=sY(lY,{callbackName:M_,globalName:iY,attributes:P_().nonce?{nonce:P_().nonce}:{}})(Km);var uY=Object.defineProperty,dY=Object.defineProperties,fY=Object.getOwnPropertyDescriptors,rm=Object.getOwnPropertySymbols,Y4=Object.prototype.hasOwnProperty,W4=Object.prototype.propertyIsEnumerable,CO=(e,t,n)=>t in e?uY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hY=(e,t)=>{for(var n in t||(t={}))Y4.call(t,n)&&CO(e,n,t[n]);if(rm)for(var n of rm(t))W4.call(t,n)&&CO(e,n,t[n]);return e},pY=(e,t)=>dY(e,fY(t)),mY=(e,t)=>{var n={};for(var r in e)Y4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&rm)for(var r of rm(e))t.indexOf(r)<0&&W4.call(e,r)&&(n[r]=e[r]);return n};function gY(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function vY(e){let t=A.useRef();return A.useEffect(()=>{t.current=e}),t.current}var yY=18,Q4=40,_Y=`${Q4}px`,bY=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function wY({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[a,i]=A.useState(!1),[l,u]=A.useState(!1),[d,f]=A.useState(!1),m=A.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&a&&l,[a,l,n]),p=A.useCallback(()=>{let g=e.current,y=t.current;if(!g||!y||d||n==="none")return;let b=g,S=b.getBoundingClientRect().left+b.offsetWidth,w=b.getBoundingClientRect().top+b.offsetHeight/2,R=S-yY,E=w;document.querySelectorAll(bY).length===0&&document.elementFromPoint(R,E)===g||(i(!0),f(!0))},[e,t,d,n]);return A.useEffect(()=>{let g=e.current;if(!g||n==="none")return;function y(){let S=window.innerWidth-g.getBoundingClientRect().right;u(S>=Q4)}y();let b=setInterval(y,1e3);return()=>{clearInterval(b)}},[e,n]),A.useEffect(()=>{let g=r||document.activeElement===t.current;if(n==="none"||!g)return;let y=setTimeout(p,0),b=setTimeout(p,2e3),S=setTimeout(p,5e3),w=setTimeout(()=>{f(!0)},6e3);return()=>{clearTimeout(y),clearTimeout(b),clearTimeout(S),clearTimeout(w)}},[t,r,n,p]),{hasPWMBadge:a,willPushPWMBadge:m,PWM_BADGE_SPACE_WIDTH:_Y}}var X4=A.createContext({}),J4=A.forwardRef((e,t)=>{var n=e,{value:r,onChange:a,maxLength:i,textAlign:l="left",pattern:u,placeholder:d,inputMode:f="numeric",onComplete:m,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:g,containerClassName:y,noScriptCSSFallback:b=SY,render:S,children:w}=n,R=mY(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),E,T,O,C,I;let[N,P]=A.useState(typeof R.defaultValue=="string"?R.defaultValue:""),$=r??N,K=vY($),F=A.useCallback(se=>{a?.(se),P(se)},[a]),G=A.useMemo(()=>u?typeof u=="string"?new RegExp(u):u:null,[u]),U=A.useRef(null),J=A.useRef(null),le=A.useRef({value:$,onChange:F,isIOS:typeof window<"u"&&((T=(E=window?.CSS)==null?void 0:E.supports)==null?void 0:T.call(E,"-webkit-touch-callout","none"))}),B=A.useRef({prev:[(O=U.current)==null?void 0:O.selectionStart,(C=U.current)==null?void 0:C.selectionEnd,(I=U.current)==null?void 0:I.selectionDirection]});A.useImperativeHandle(t,()=>U.current,[]),A.useEffect(()=>{let se=U.current,ce=J.current;if(!se||!ce)return;le.current.value!==se.value&&le.current.onChange(se.value),B.current.prev=[se.selectionStart,se.selectionEnd,se.selectionDirection];function Te(){if(document.activeElement!==se){q(null),D(null);return}let Ve=se.selectionStart,Ye=se.selectionEnd,Z=se.selectionDirection,re=se.maxLength,oe=se.value,we=B.current.prev,Re=-1,Ee=-1,ke;if(oe.length!==0&&Ve!==null&&Ye!==null){let ur=Ve===Ye,Xt=Ve===oe.length&&oe.length<re;if(ur&&!Xt){let En=Ve;if(En===0)Re=0,Ee=1,ke="forward";else if(En===re)Re=En-1,Ee=En,ke="backward";else if(re>1&&oe.length>1){let Jt=0;if(we[0]!==null&&we[1]!==null){ke=En<we[1]?"backward":"forward";let jn=we[0]===we[1]&&we[0]<re;ke==="backward"&&!jn&&(Jt=-1)}Re=Jt+En,Ee=Jt+En+1}}Re!==-1&&Ee!==-1&&Re!==Ee&&U.current.setSelectionRange(Re,Ee,ke)}let Je=Re!==-1?Re:Ve,rt=Ee!==-1?Ee:Ye,Tt=ke??Z;q(Je),D(rt),B.current.prev=[Je,rt,Tt]}if(document.addEventListener("selectionchange",Te,{capture:!0}),Te(),document.activeElement===se&&ae(!0),!document.getElementById("input-otp-style")){let Ve=document.createElement("style");if(Ve.id="input-otp-style",document.head.appendChild(Ve),Ve.sheet){let Ye="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Eu(Ve.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Eu(Ve.sheet,`[data-input-otp]:autofill { ${Ye} }`),Eu(Ve.sheet,`[data-input-otp]:-webkit-autofill { ${Ye} }`),Eu(Ve.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Eu(Ve.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Pe=()=>{ce&&ce.style.setProperty("--root-height",`${se.clientHeight}px`)};Pe();let Xe=new ResizeObserver(Pe);return Xe.observe(se),()=>{document.removeEventListener("selectionchange",Te,{capture:!0}),Xe.disconnect()}},[]);let[Y,W]=A.useState(!1),[he,ae]=A.useState(!1),[M,q]=A.useState(null),[V,D]=A.useState(null);A.useEffect(()=>{gY(()=>{var se,ce,Te,Pe;(se=U.current)==null||se.dispatchEvent(new Event("input"));let Xe=(ce=U.current)==null?void 0:ce.selectionStart,Ve=(Te=U.current)==null?void 0:Te.selectionEnd,Ye=(Pe=U.current)==null?void 0:Pe.selectionDirection;Xe!==null&&Ve!==null&&(q(Xe),D(Ve),B.current.prev=[Xe,Ve,Ye])})},[$,he]),A.useEffect(()=>{K!==void 0&&$!==K&&K.length<i&&$.length===i&&m?.($)},[i,m,K,$]);let z=wY({containerRef:J,inputRef:U,pushPasswordManagerStrategy:p,isFocused:he}),X=A.useCallback(se=>{let ce=se.currentTarget.value.slice(0,i);if(ce.length>0&&G&&!G.test(ce)){se.preventDefault();return}typeof K=="string"&&ce.length<K.length&&document.dispatchEvent(new Event("selectionchange")),F(ce)},[i,F,K,G]),ue=A.useCallback(()=>{var se;if(U.current){let ce=Math.min(U.current.value.length,i-1),Te=U.current.value.length;(se=U.current)==null||se.setSelectionRange(ce,Te),q(ce),D(Te)}ae(!0)},[i]),ve=A.useCallback(se=>{var ce,Te;let Pe=U.current;if(!g&&(!le.current.isIOS||!se.clipboardData||!Pe))return;let Xe=se.clipboardData.getData("text/plain"),Ve=g?g(Xe):Xe;se.preventDefault();let Ye=(ce=U.current)==null?void 0:ce.selectionStart,Z=(Te=U.current)==null?void 0:Te.selectionEnd,re=(Ye!==Z?$.slice(0,Ye)+Ve+$.slice(Z):$.slice(0,Ye)+Ve+$.slice(Ye)).slice(0,i);if(re.length>0&&G&&!G.test(re))return;Pe.value=re,F(re);let oe=Math.min(re.length,i-1),we=re.length;Pe.setSelectionRange(oe,we),q(oe),D(we)},[i,F,G,$]),Ie=A.useMemo(()=>({position:"relative",cursor:R.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[R.disabled]),Ae=A.useMemo(()=>({position:"absolute",inset:0,width:z.willPushPWMBadge?`calc(100% + ${z.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:z.willPushPWMBadge?`inset(0 ${z.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:l,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[z.PWM_BADGE_SPACE_WIDTH,z.willPushPWMBadge,l]),H=A.useMemo(()=>A.createElement("input",pY(hY({autoComplete:R.autoComplete||"one-time-code"},R),{"data-input-otp":!0,"data-input-otp-placeholder-shown":$.length===0||void 0,"data-input-otp-mss":M,"data-input-otp-mse":V,inputMode:f,pattern:G?.source,"aria-placeholder":d,style:Ae,maxLength:i,value:$,ref:U,onPaste:se=>{var ce;ve(se),(ce=R.onPaste)==null||ce.call(R,se)},onChange:X,onMouseOver:se=>{var ce;W(!0),(ce=R.onMouseOver)==null||ce.call(R,se)},onMouseLeave:se=>{var ce;W(!1),(ce=R.onMouseLeave)==null||ce.call(R,se)},onFocus:se=>{var ce;ue(),(ce=R.onFocus)==null||ce.call(R,se)},onBlur:se=>{var ce;ae(!1),(ce=R.onBlur)==null||ce.call(R,se)}})),[X,ue,ve,f,Ae,i,V,M,R,G?.source,$]),ne=A.useMemo(()=>({slots:Array.from({length:i}).map((se,ce)=>{var Te;let Pe=he&&M!==null&&V!==null&&(M===V&&ce===M||ce>=M&&ce<V),Xe=$[ce]!==void 0?$[ce]:null,Ve=$[0]!==void 0?null:(Te=d?.[ce])!=null?Te:null;return{char:Xe,placeholderChar:Ve,isActive:Pe,hasFakeCaret:Pe&&Xe===null}}),isFocused:he,isHovering:!R.disabled&&Y}),[he,Y,i,V,M,R.disabled,$]),_e=A.useMemo(()=>S?S(ne):A.createElement(X4.Provider,{value:ne},w),[w,ne,S]);return A.createElement(A.Fragment,null,b!==null&&A.createElement("noscript",null,A.createElement("style",null,b)),A.createElement("div",{ref:J,"data-input-otp-container":!0,style:Ie,className:y},_e,A.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},H)))});J4.displayName="Input";function Eu(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var SY=`
|
|
111
|
+
[data-input-otp] {
|
|
112
|
+
--nojs-bg: white !important;
|
|
113
|
+
--nojs-fg: black !important;
|
|
114
|
+
|
|
115
|
+
background-color: var(--nojs-bg) !important;
|
|
116
|
+
color: var(--nojs-fg) !important;
|
|
117
|
+
caret-color: var(--nojs-fg) !important;
|
|
118
|
+
letter-spacing: .25em !important;
|
|
119
|
+
text-align: center !important;
|
|
120
|
+
border: 1px solid var(--nojs-fg) !important;
|
|
121
|
+
border-radius: 4px !important;
|
|
122
|
+
width: 100% !important;
|
|
123
|
+
}
|
|
124
|
+
@media (prefers-color-scheme: dark) {
|
|
125
|
+
[data-input-otp] {
|
|
126
|
+
--nojs-bg: black !important;
|
|
127
|
+
--nojs-fg: white !important;
|
|
128
|
+
}
|
|
129
|
+
}`,Pl={},m0,AO;function eM(){return AO||(AO=1,m0={L:1,M:0,Q:3,H:2}),m0}var g0,IO;function tM(){return IO||(IO=1,g0={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),g0}var v0,NO;function EY(){if(NO)return v0;NO=1;var e=tM();function t(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return t.prototype={getLength:function(n){return this.data.length},write:function(n){for(var r=0;r<this.data.length;r++)n.put(this.data.charCodeAt(r),8)}},v0=t,v0}var y0,kO;function RY(){if(kO)return y0;kO=1;var e=eM();function t(n,r){this.totalCount=n,this.dataCount=r}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(n,r){var a=t.getRsBlockTable(n,r);if(a==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+r);for(var i=a.length/3,l=new Array,u=0;u<i;u++)for(var d=a[u*3+0],f=a[u*3+1],m=a[u*3+2],p=0;p<d;p++)l.push(new t(f,m));return l},t.getRsBlockTable=function(n,r){switch(r){case e.L:return t.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return t.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return t.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return t.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},y0=t,y0}var _0,MO;function xY(){if(MO)return _0;MO=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(t){var n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)==1},put:function(t,n){for(var r=0;r<n;r++)this.putBit((t>>>n-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},_0=e,_0}var b0,PO;function nM(){if(PO)return b0;PO=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)e.EXP_TABLE[t]=1<<t;for(var t=8;t<256;t++)e.EXP_TABLE[t]=e.EXP_TABLE[t-4]^e.EXP_TABLE[t-5]^e.EXP_TABLE[t-6]^e.EXP_TABLE[t-8];for(var t=0;t<255;t++)e.LOG_TABLE[e.EXP_TABLE[t]]=t;return b0=e,b0}var w0,DO;function rM(){if(DO)return w0;DO=1;var e=nM();function t(n,r){if(n.length==null)throw new Error(n.length+"/"+r);for(var a=0;a<n.length&&n[a]==0;)a++;this.num=new Array(n.length-a+r);for(var i=0;i<n.length-a;i++)this.num[i]=n[i+a]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var r=new Array(this.getLength()+n.getLength()-1),a=0;a<this.getLength();a++)for(var i=0;i<n.getLength();i++)r[a+i]^=e.gexp(e.glog(this.get(a))+e.glog(n.get(i)));return new t(r,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var r=e.glog(this.get(0))-e.glog(n.get(0)),a=new Array(this.getLength()),i=0;i<this.getLength();i++)a[i]=this.get(i);for(var i=0;i<n.getLength();i++)a[i]^=e.gexp(e.glog(n.get(i))+r);return new t(a,0).mod(n)}},w0=t,w0}var S0,LO;function TY(){if(LO)return S0;LO=1;var e=tM(),t=rM(),n=nM(),r={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},a={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(i){for(var l=i<<10;a.getBCHDigit(l)-a.getBCHDigit(a.G15)>=0;)l^=a.G15<<a.getBCHDigit(l)-a.getBCHDigit(a.G15);return(i<<10|l)^a.G15_MASK},getBCHTypeNumber:function(i){for(var l=i<<12;a.getBCHDigit(l)-a.getBCHDigit(a.G18)>=0;)l^=a.G18<<a.getBCHDigit(l)-a.getBCHDigit(a.G18);return i<<12|l},getBCHDigit:function(i){for(var l=0;i!=0;)l++,i>>>=1;return l},getPatternPosition:function(i){return a.PATTERN_POSITION_TABLE[i-1]},getMask:function(i,l,u){switch(i){case r.PATTERN000:return(l+u)%2==0;case r.PATTERN001:return l%2==0;case r.PATTERN010:return u%3==0;case r.PATTERN011:return(l+u)%3==0;case r.PATTERN100:return(Math.floor(l/2)+Math.floor(u/3))%2==0;case r.PATTERN101:return l*u%2+l*u%3==0;case r.PATTERN110:return(l*u%2+l*u%3)%2==0;case r.PATTERN111:return(l*u%3+(l+u)%2)%2==0;default:throw new Error("bad maskPattern:"+i)}},getErrorCorrectPolynomial:function(i){for(var l=new t([1],0),u=0;u<i;u++)l=l.multiply(new t([1,n.gexp(u)],0));return l},getLengthInBits:function(i,l){if(1<=l&&l<10)switch(i){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+i)}else if(l<27)switch(i){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+i)}else if(l<41)switch(i){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+i)}else throw new Error("type:"+l)},getLostPoint:function(i){for(var l=i.getModuleCount(),u=0,d=0;d<l;d++)for(var f=0;f<l;f++){for(var m=0,p=i.isDark(d,f),g=-1;g<=1;g++)if(!(d+g<0||l<=d+g))for(var y=-1;y<=1;y++)f+y<0||l<=f+y||g==0&&y==0||p==i.isDark(d+g,f+y)&&m++;m>5&&(u+=3+m-5)}for(var d=0;d<l-1;d++)for(var f=0;f<l-1;f++){var b=0;i.isDark(d,f)&&b++,i.isDark(d+1,f)&&b++,i.isDark(d,f+1)&&b++,i.isDark(d+1,f+1)&&b++,(b==0||b==4)&&(u+=3)}for(var d=0;d<l;d++)for(var f=0;f<l-6;f++)i.isDark(d,f)&&!i.isDark(d,f+1)&&i.isDark(d,f+2)&&i.isDark(d,f+3)&&i.isDark(d,f+4)&&!i.isDark(d,f+5)&&i.isDark(d,f+6)&&(u+=40);for(var f=0;f<l;f++)for(var d=0;d<l-6;d++)i.isDark(d,f)&&!i.isDark(d+1,f)&&i.isDark(d+2,f)&&i.isDark(d+3,f)&&i.isDark(d+4,f)&&!i.isDark(d+5,f)&&i.isDark(d+6,f)&&(u+=40);for(var S=0,f=0;f<l;f++)for(var d=0;d<l;d++)i.isDark(d,f)&&S++;var w=Math.abs(100*S/l/l-50)/5;return u+=w*10,u}};return S0=a,S0}var E0,jO;function OY(){if(jO)return E0;jO=1;var e=EY(),t=RY(),n=xY(),r=TY(),a=rM();function i(u,d){this.typeNumber=u,this.errorCorrectLevel=d,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var l=i.prototype;return l.addData=function(u){var d=new e(u);this.dataList.push(d),this.dataCache=null},l.isDark=function(u,d){if(u<0||this.moduleCount<=u||d<0||this.moduleCount<=d)throw new Error(u+","+d);return this.modules[u][d]},l.getModuleCount=function(){return this.moduleCount},l.make=function(){if(this.typeNumber<1){var u=1;for(u=1;u<40;u++){for(var d=t.getRSBlocks(u,this.errorCorrectLevel),f=new n,m=0,p=0;p<d.length;p++)m+=d[p].dataCount;for(var p=0;p<this.dataList.length;p++){var g=this.dataList[p];f.put(g.mode,4),f.put(g.getLength(),r.getLengthInBits(g.mode,u)),g.write(f)}if(f.getLengthInBits()<=m*8)break}this.typeNumber=u}this.makeImpl(!1,this.getBestMaskPattern())},l.makeImpl=function(u,d){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++){this.modules[f]=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++)this.modules[f][m]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(u,d),this.typeNumber>=7&&this.setupTypeNumber(u),this.dataCache==null&&(this.dataCache=i.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,d)},l.setupPositionProbePattern=function(u,d){for(var f=-1;f<=7;f++)if(!(u+f<=-1||this.moduleCount<=u+f))for(var m=-1;m<=7;m++)d+m<=-1||this.moduleCount<=d+m||(0<=f&&f<=6&&(m==0||m==6)||0<=m&&m<=6&&(f==0||f==6)||2<=f&&f<=4&&2<=m&&m<=4?this.modules[u+f][d+m]=!0:this.modules[u+f][d+m]=!1)},l.getBestMaskPattern=function(){for(var u=0,d=0,f=0;f<8;f++){this.makeImpl(!0,f);var m=r.getLostPoint(this);(f==0||u>m)&&(u=m,d=f)}return d},l.createMovieClip=function(u,d,f){var m=u.createEmptyMovieClip(d,f),p=1;this.make();for(var g=0;g<this.modules.length;g++)for(var y=g*p,b=0;b<this.modules[g].length;b++){var S=b*p,w=this.modules[g][b];w&&(m.beginFill(0,100),m.moveTo(S,y),m.lineTo(S+p,y),m.lineTo(S+p,y+p),m.lineTo(S,y+p),m.endFill())}return m},l.setupTimingPattern=function(){for(var u=8;u<this.moduleCount-8;u++)this.modules[u][6]==null&&(this.modules[u][6]=u%2==0);for(var d=8;d<this.moduleCount-8;d++)this.modules[6][d]==null&&(this.modules[6][d]=d%2==0)},l.setupPositionAdjustPattern=function(){for(var u=r.getPatternPosition(this.typeNumber),d=0;d<u.length;d++)for(var f=0;f<u.length;f++){var m=u[d],p=u[f];if(this.modules[m][p]==null)for(var g=-2;g<=2;g++)for(var y=-2;y<=2;y++)g==-2||g==2||y==-2||y==2||g==0&&y==0?this.modules[m+g][p+y]=!0:this.modules[m+g][p+y]=!1}},l.setupTypeNumber=function(u){for(var d=r.getBCHTypeNumber(this.typeNumber),f=0;f<18;f++){var m=!u&&(d>>f&1)==1;this.modules[Math.floor(f/3)][f%3+this.moduleCount-8-3]=m}for(var f=0;f<18;f++){var m=!u&&(d>>f&1)==1;this.modules[f%3+this.moduleCount-8-3][Math.floor(f/3)]=m}},l.setupTypeInfo=function(u,d){for(var f=this.errorCorrectLevel<<3|d,m=r.getBCHTypeInfo(f),p=0;p<15;p++){var g=!u&&(m>>p&1)==1;p<6?this.modules[p][8]=g:p<8?this.modules[p+1][8]=g:this.modules[this.moduleCount-15+p][8]=g}for(var p=0;p<15;p++){var g=!u&&(m>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=g:p<9?this.modules[8][15-p-1+1]=g:this.modules[8][15-p-1]=g}this.modules[this.moduleCount-8][8]=!u},l.mapData=function(u,d){for(var f=-1,m=this.moduleCount-1,p=7,g=0,y=this.moduleCount-1;y>0;y-=2)for(y==6&&y--;;){for(var b=0;b<2;b++)if(this.modules[m][y-b]==null){var S=!1;g<u.length&&(S=(u[g]>>>p&1)==1);var w=r.getMask(d,m,y-b);w&&(S=!S),this.modules[m][y-b]=S,p--,p==-1&&(g++,p=7)}if(m+=f,m<0||this.moduleCount<=m){m-=f,f=-f;break}}},i.PAD0=236,i.PAD1=17,i.createData=function(u,d,f){for(var m=t.getRSBlocks(u,d),p=new n,g=0;g<f.length;g++){var y=f[g];p.put(y.mode,4),p.put(y.getLength(),r.getLengthInBits(y.mode,u)),y.write(p)}for(var b=0,g=0;g<m.length;g++)b+=m[g].dataCount;if(p.getLengthInBits()>b*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+b*8+")");for(p.getLengthInBits()+4<=b*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=b*8||(p.put(i.PAD0,8),p.getLengthInBits()>=b*8));)p.put(i.PAD1,8);return i.createBytes(p,m)},i.createBytes=function(u,d){for(var f=0,m=0,p=0,g=new Array(d.length),y=new Array(d.length),b=0;b<d.length;b++){var S=d[b].dataCount,w=d[b].totalCount-S;m=Math.max(m,S),p=Math.max(p,w),g[b]=new Array(S);for(var R=0;R<g[b].length;R++)g[b][R]=255&u.buffer[R+f];f+=S;var E=r.getErrorCorrectPolynomial(w),T=new a(g[b],E.getLength()-1),O=T.mod(E);y[b]=new Array(E.getLength()-1);for(var R=0;R<y[b].length;R++){var C=R+O.getLength()-y[b].length;y[b][R]=C>=0?O.get(C):0}}for(var I=0,R=0;R<d.length;R++)I+=d[R].totalCount;for(var N=new Array(I),P=0,R=0;R<m;R++)for(var b=0;b<d.length;b++)R<g[b].length&&(N[P++]=g[b][R]);for(var R=0;R<p;R++)for(var b=0;b<d.length;b++)R<y[b].length&&(N[P++]=y[b][R]);return N},E0=i,E0}var Rh={},$O;function CY(){if($O)return Rh;$O=1,Object.defineProperty(Rh,"__esModule",{value:!0});var e=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])}return f},t=m1(),n=i(t),r=Gs(),a=i(r);function i(f){return f&&f.__esModule?f:{default:f}}function l(f,m){var p={};for(var g in f)m.indexOf(g)>=0||Object.prototype.hasOwnProperty.call(f,g)&&(p[g]=f[g]);return p}var u={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},d=(0,r.forwardRef)(function(f,m){var p=f.bgColor,g=f.bgD,y=f.fgD,b=f.fgColor,S=f.size,w=f.title,R=f.viewBoxSize,E=f.xmlns,T=E===void 0?"http://www.w3.org/2000/svg":E,O=l(f,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return a.default.createElement("svg",e({},O,{height:S,ref:m,viewBox:"0 0 "+R+" "+R,width:S,xmlns:T}),w?a.default.createElement("title",null,w):null,a.default.createElement("path",{d:g,fill:p}),a.default.createElement("path",{d:y,fill:b}))});return d.displayName="QRCodeSvg",d.propTypes=u,Rh.default=d,Rh}var UO;function AY(){if(UO)return Pl;UO=1,Object.defineProperty(Pl,"__esModule",{value:!0}),Pl.QRCode=void 0;var e=Object.assign||function(S){for(var w=1;w<arguments.length;w++){var R=arguments[w];for(var E in R)Object.prototype.hasOwnProperty.call(R,E)&&(S[E]=R[E])}return S},t=m1(),n=p(t),r=eM(),a=p(r),i=OY(),l=p(i),u=Gs(),d=p(u),f=CY(),m=p(f);function p(S){return S&&S.__esModule?S:{default:S}}function g(S,w){var R={};for(var E in S)w.indexOf(E)>=0||Object.prototype.hasOwnProperty.call(S,E)&&(R[E]=S[E]);return R}var y={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},b=(0,u.forwardRef)(function(S,w){var R=S.bgColor,E=R===void 0?"#FFFFFF":R,T=S.fgColor,O=T===void 0?"#000000":T,C=S.level,I=C===void 0?"L":C,N=S.size,P=N===void 0?256:N,$=S.value,K=g(S,["bgColor","fgColor","level","size","value"]),F=new l.default(-1,a.default[I]);F.addData($),F.make();var G=F.modules;return d.default.createElement(m.default,e({},K,{bgColor:E,bgD:G.map(function(U,J){return U.map(function(le,B){return le?"":"M "+B+" "+J+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:O,fgD:G.map(function(U,J){return U.map(function(le,B){return le?"M "+B+" "+J+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:w,size:P,viewBoxSize:G.length}))});return Pl.QRCode=b,b.displayName="QRCode",b.propTypes=y,Pl.default=b,Pl}var IY=AY();const NY=Ha(IY);var kY="Separator",zO="horizontal",MY=["horizontal","vertical"],oM=A.forwardRef((e,t)=>{const{decorative:n,orientation:r=zO,...a}=e,i=PY(r)?r:zO,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return x.jsx(xd.div,{"data-orientation":i,...u,...a,ref:t})});oM.displayName=kY;function PY(e){return MY.includes(e)}var DY=oM;function LY(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:r},basePath:a,viewPaths:i,replace:l}=A.useContext(ht),{data:u,isPending:d,error:f,refetch:m}=r(),p=u;return A.useEffect(()=>{if(!n||d||p)return;const y=new URLSearchParams(window.location.search).get("redirectTo")||window.location.pathname+window.location.search;l(`${a}/${i[t]}?redirectTo=${encodeURIComponent(y)}`)},[d,p,a,i,l,t,n]),{data:p,user:p?.user,isPending:d,error:f,refetch:m}}function sd({className:e,...t}){return x.jsx("div",{"data-slot":"card",className:Ce("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function g1({className:e,...t}){return x.jsx("div",{"data-slot":"card-header",className:Ce("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function aM({className:e,...t}){return x.jsx("div",{"data-slot":"card-title",className:Ce("leading-none font-semibold",e),...t})}function sM({className:e,...t}){return x.jsx("div",{"data-slot":"card-description",className:Ce("text-muted-foreground text-sm",e),...t})}function v1({className:e,...t}){return x.jsx("div",{"data-slot":"card-content",className:Ce("px-6",e),...t})}function FO({className:e,...t}){return x.jsx("div",{"data-slot":"card-footer",className:Ce("flex items-center px-6 [.border-t]:pt-6",e),...t})}function za({className:e,...t}){return x.jsx("div",{"data-slot":"skeleton",className:Ce("bg-accent animate-pulse rounded-md",e),...t})}var jY=lV("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",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Wt({className:e,variant:t,size:n,asChild:r=!1,...a}){const i=r?yN:"button";return x.jsx(i,{"data-slot":"button",className:Ce(jY({variant:t,size:n,className:e})),...a})}async function $Y(e,t,n,r){const a=await UY(e),i=document.createElement("canvas");i.width=i.height=n;const l=i.getContext("2d"),u=Math.min(a.width,a.height),d=(a.width-u)/2,f=(a.height-u)/2,m=u,p=u;l?.drawImage(a,d,f,m,p,0,0,n,n);const g=await new Promise(y=>i.toBlob(y,`image/${r}`));return new File([g],`${t}.${r}`,{type:`image/${r}`})}async function UY(e){return new Promise((t,n)=>{const r=new Image,a=new FileReader;a.onload=i=>{var l;r.src=(l=i.target)==null?void 0:l.result},r.onload=()=>t(r),r.onerror=i=>n(i),a.readAsDataURL(e)})}async function zY(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>t(r.result),r.onerror=n,r.readAsDataURL(e)})}function FY({...e}){return x.jsx(PG,{"data-slot":"dropdown-menu",...e})}function VY({...e}){return x.jsx(DG,{"data-slot":"dropdown-menu-trigger",...e})}function BY({className:e,sideOffset:t=4,...n}){return x.jsx(LG,{children:x.jsx(jG,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Ce("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function VO({className:e,inset:t,variant:n="default",...r}){return x.jsx($G,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Ce("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_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]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function iM({className:e,...t}){return x.jsx(FG,{"data-slot":"label",className:Ce("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",e),...t})}var ha=zF,lM=A.createContext({}),yn=({...e})=>x.jsx(lM.Provider,{value:{name:e.name},children:x.jsx($F,{...e})}),y1=()=>{const e=A.useContext(lM),t=A.useContext(cM),{getFieldState:n}=UF(),r=cN({name:e.name}),a=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},cM=A.createContext({});function _n({className:e,...t}){const n=A.useId();return x.jsx(cM.Provider,{value:{id:n},children:x.jsx("div",{"data-slot":"form-item",className:Ce("grid gap-2",e),...t})})}function bn({className:e,...t}){const{error:n,formItemId:r}=y1();return x.jsx(iM,{"data-slot":"form-label","data-error":!!n,className:Ce("data-[error=true]:text-destructive",e),htmlFor:r,...t})}function Pn({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:a}=y1();return x.jsx(yN,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${a}`:`${r}`,"aria-invalid":!!t,...e})}function Vn({className:e,...t}){const{error:n,formMessageId:r}=y1(),a=n?String(n?.message??""):t.children;return a?x.jsx("p",{"data-slot":"form-message",id:r,className:Ce("text-destructive text-sm",e),...t,children:a}):null}function Fo({className:e,type:t,...n}){return x.jsx("input",{type:t,"data-slot":"input",className:Ce("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",e),...n})}function uM({className:e,...t}){return x.jsx(WG,{"data-slot":"avatar",className:Ce("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function dM({className:e,...t}){return x.jsx(QG,{"data-slot":"avatar-image",className:Ce("aspect-square size-full",e),...t})}function fM({className:e,...t}){return x.jsx(XG,{"data-slot":"avatar-fallback",className:Ce("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function qY({className:e,classNames:t,isPending:n,size:r,organization:a,localization:i,...l}){const{localization:u,avatar:d}=A.useContext(ht),f=A.useMemo(()=>({...u,...i}),[u,i]),m=a?.name,p=a?.logo;return n?x.jsx(za,{className:Ce("shrink-0 rounded-full",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):x.jsxs(uM,{className:Ce("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...l,children:[d?.Image?x.jsx(d.Image,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||""}):x.jsx(dM,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||void 0}),x.jsx(fM,{className:Ce("text-foreground",t?.fallback),delayMs:p?600:void 0,children:x.jsx(RF,{className:Ce("size-[50%]",t?.fallbackIcon)})})]})}function hM({className:e,classNames:t,isPending:n,size:r,organization:a,localization:i}){const{localization:l}=A.useContext(ht),u={...l,...i};return x.jsxs("div",{className:Ce("flex items-center gap-2 truncate",e,t?.base),children:[x.jsx(qY,{className:Ce(r!=="sm"&&"my-0.5"),classNames:t?.avatar,isPending:n,localization:u,organization:a,size:r}),x.jsx("div",{className:Ce("flex flex-col truncate text-left leading-tight",t?.content),children:n?x.jsxs(x.Fragment,{children:[x.jsx(za,{className:Ce("max-w-full",r==="lg"?"h-4.5 w-32":"h-3.5 w-24",t?.title,t?.skeleton)}),r!=="sm"&&x.jsx(za,{className:Ce("mt-1.5 max-w-full",r==="lg"?"h-3.5 w-24":"h-3 w-16",t?.subtitle,t?.skeleton)})]}):x.jsxs(x.Fragment,{children:[x.jsx("span",{className:Ce("truncate font-semibold",r==="lg"?"text-base":"text-sm",t?.title),children:a?.name||u?.ORGANIZATION}),r!=="sm"&&a?.slug&&x.jsx("span",{className:Ce("truncate opacity-70",r==="lg"?"text-sm":"text-xs",t?.subtitle),children:a.slug})]})})]})}function HY(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),a=new TextEncoder().encode(n),i=rZ(fZ(a)),l=t?.jpg?".jpg":"";let u=`https://gravatar.com/avatar/${i}${l}`;const d=new URLSearchParams;t?.size&&d.append("s",Math.min(Math.max(t.size,1),2048).toString()),t?.d&&d.append("d",t.d),t?.forceDefault&&d.append("f","y");const f=d.toString();return f&&(u+=`?${f}`),u}catch(n){return console.error("Error generating Gravatar URL:",n),null}}function GY({className:e,classNames:t,isPending:n,size:r,user:a,localization:i,...l}){const{localization:u,gravatar:d,avatar:f}=A.useContext(ht),m={...u,...i},p=a?.displayName||a?.name||a?.fullName||a?.firstName||a?.displayUsername||a?.username||a?.email,g=a?.image||a?.avatar||a?.avatarUrl,y=d&&a?.email?HY(a.email,d===!0?void 0:d):null,b=d?y:g;return n?x.jsx(za,{className:Ce("shrink-0 rounded-full",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):x.jsxs(uM,{className:Ce("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...l,children:[f?.Image?x.jsx(f.Image,{alt:p||m?.USER,className:t?.image,src:b||""}):x.jsx(dM,{alt:p||m?.USER,className:t?.image,src:b||void 0}),x.jsx(fM,{className:Ce("text-foreground uppercase",t?.fallback),delayMs:b?600:void 0,children:ZY(p)||x.jsx(kF,{className:Ce("size-[50%]",t?.fallbackIcon)})})]})}var ZY=e=>e?.slice(0,2);function _1({className:e,...t}){return x.jsx(_4,{"data-slot":"checkbox",className:Ce("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",e),...t,children:x.jsx(w4,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:x.jsx(nN,{className:"size-3.5"})})})}function KY({className:e,...t}){return x.jsx("textarea",{"data-slot":"textarea",className:Ce("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 field-sizing-content 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",e),...t})}var YY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M9.438 31.401a7 7 0 0 1-1.656-1.536a20 20 0 0 1-1.422-1.938a18.9 18.9 0 0 1-2.375-4.849c-.667-2-.99-3.917-.99-5.792c0-2.094.453-3.922 1.339-5.458a7.7 7.7 0 0 1 2.797-2.906a7.45 7.45 0 0 1 3.786-1.12q.705.002 1.51.198c.385.109.854.281 1.427.495c.729.281 1.13.453 1.266.495c.427.156.786.224 1.068.224c.214 0 .516-.068.859-.172c.193-.068.557-.188 1.078-.411c.516-.188.922-.349 1.245-.469c.495-.146.974-.281 1.401-.349a6.7 6.7 0 0 1 1.531-.063a9 9 0 0 1 2.589.557c1.359.547 2.458 1.401 3.276 2.615a6.4 6.4 0 0 0-.969.734a8.2 8.2 0 0 0-1.641 2.005a6.8 6.8 0 0 0-.859 3.359c.021 1.443.391 2.714 1.12 3.813a7.2 7.2 0 0 0 2.047 2.047c.417.281.776.474 1.12.604c-.161.5-.333.984-.536 1.464a19 19 0 0 1-1.667 3.083c-.578.839-1.031 1.464-1.375 1.88c-.536.635-1.052 1.12-1.573 1.458c-.573.38-1.25.583-1.938.583a4.4 4.4 0 0 1-1.38-.167c-.385-.13-.766-.271-1.141-.432a9 9 0 0 0-1.203-.453a6.3 6.3 0 0 0-3.099-.005c-.417.12-.818.26-1.214.432c-.557.234-.927.391-1.141.458c-.427.125-.87.203-1.318.229c-.693 0-1.339-.198-1.979-.599zm9.14-24.615c-.906.453-1.771.646-2.63.583c-.135-.865 0-1.75.359-2.719a7.3 7.3 0 0 1 1.333-2.24A7.1 7.1 0 0 1 19.812.733q1.319-.68 2.521-.734c.104.906 0 1.797-.333 2.76a8 8 0 0 1-1.333 2.344a6.8 6.8 0 0 1-2.115 1.682z",fill:"currentColor"})}),WY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 256 199",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18",fill:"#5865f2"})}),QY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 256 218",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M63.995 0L0 40.771l63.995 40.772L128 40.771zM192 0l-64 40.775l64 40.775l64.001-40.775zM0 122.321l63.995 40.772L128 122.321L63.995 81.55zM192 81.55l-64 40.775l64 40.774l64-40.774zM64 176.771l64.005 40.772L192 176.771L128.005 136z",fill:"#0061ff"})}),XY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445",fill:"#1877f2"}),x.jsx("path",{d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z",fill:"#fff"})]}),JY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",fill:"currentColor"})}),eW=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 236",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"m128.075 236.075l47.104-144.97H80.97z",fill:"#e24329"}),x.jsx("path",{d:"M128.075 236.074L80.97 91.104H14.956z",fill:"#fc6d26"}),x.jsx("path",{d:"M14.956 91.104L.642 135.16a9.75 9.75 0 0 0 3.542 10.903l123.891 90.012z",fill:"#fca326"}),x.jsx("path",{d:"M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0z",fill:"#e24329"}),x.jsx("path",{d:"m128.075 236.074l47.104-144.97h66.015z",fill:"#fc6d26"}),x.jsx("path",{d:"m241.194 91.104l14.314 44.056a9.75 9.75 0 0 1-3.543 10.903l-123.89 90.012z",fill:"#fca326"}),x.jsx("path",{d:"M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0z",fill:"#e24329"})]}),tW=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285f4"}),x.jsx("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34a853"}),x.jsx("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z",fill:"#fbbc05"}),x.jsx("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#eb4335"})]}),nW=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378c0 1.112.178 2.181.503 3.185c.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284c.278.173.48.408.71.694c.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542c.01.026.653 1.552 1.657 2.54c.616.605 1.01 1.223 1.082 1.912c.055.537-.096 1.059-.38 1.572c.637.121 1.294.187 1.967.187c.657 0 1.298-.063 1.921-.178c-.287-.517-.44-1.041-.384-1.581c.07-.69.465-1.307 1.081-1.913c1.004-.987 1.647-2.513 1.657-2.539c.021-.074.083-.285.233-.542c.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952c.23-.286.432-.52.71-.694c.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174a1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094c-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71c-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013a1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921a.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92a.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164c1.607-.007 2.984-1.155 3.572-1.164c.196-.003.305.12.305.454c0 .886-.424 2.328-1.563 3.202c-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026l-.01.008l-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116a1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243a1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444c-.034-.016-.104-.008-.2.022q-.094.03-.216.087q-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096a3 3 0 0 0-.26.219a2 2 0 0 0-.12.121a2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203c0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194c-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858s-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64c-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647s2.822 2.813 2.562 3.244s-1.176-.506-1.176-.506s-2.866-2.567-3.49-1.898s.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405c-.238.839-2.71-1.587-3.216-.642c-.506.946 3.49 2.056 3.522 2.064c1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194c1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858s.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64c.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647s-2.822 2.813-2.562 3.244s1.176-.506 1.176-.506s2.866-2.567 3.49-1.898s-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405c.238.839 2.71-1.587 3.216-.642c.506.946-3.49 2.056-3.522 2.064c-1.29.33-4.568 1.028-5.713-.624"})}),rW=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M1.333 0h8v5.333H12V2.667h2.667V0h8v8H20v2.667h-2.667v2.666H20V16h2.667v8h-8v-2.667H12v-2.666H9.333V24h-8Z"})}),oW=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M2.886 4.18A11.98 11.98 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556q-.787.496-1.65.866L.951 7.277q.371-.863.866-1.65ZM.322 9.163l14.515 14.515q-1.066.26-2.195.322L0 11.358a12 12 0 0 1 .322-2.195m-.17 4.862l9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"})}),aW=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 128 128",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M116 3H12a8.91 8.91 0 0 0-9 8.8v104.42a8.91 8.91 0 0 0 9 8.78h104a8.93 8.93 0 0 0 9-8.81V11.77A8.93 8.93 0 0 0 116 3",fill:"#0076b2"}),x.jsx("path",{d:"M21.06 48.73h18.11V107H21.06zm9.06-29a10.5 10.5 0 1 1-10.5 10.49a10.5 10.5 0 0 1 10.5-10.49m20.41 29h17.36v8h.24c2.42-4.58 8.32-9.41 17.13-9.41C103.6 47.28 107 59.35 107 75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87 7.36-10.87 15V107H50.53z",fill:"#fff"})]}),sW=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M121.666 121.666H0V0h121.666z",fill:"#f1511b"}),x.jsx("path",{d:"M256 121.666H134.335V0H256z",fill:"#80cc28"}),x.jsx("path",{d:"M121.663 256.002H0V134.336h121.663z",fill:"#00adef"}),x.jsx("path",{d:"M256 256.002H134.335V134.336H256z",fill:"#fbbc09"})]}),iW=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514c-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233l4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632"})}),lW=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("circle",{cx:"128",cy:"128",fill:"#ff4500",r:"128"}),x.jsx("path",{d:"M213.15 129.22c0-10.376-8.391-18.617-18.617-18.617a18.74 18.74 0 0 0-12.97 5.189c-12.818-9.157-30.368-15.107-49.9-15.87l8.544-39.981l27.773 5.95c.307 7.02 6.104 12.667 13.278 12.667c7.324 0 13.275-5.95 13.275-13.278c0-7.324-5.95-13.275-13.275-13.275c-5.188 0-9.768 3.052-11.904 7.478l-30.976-6.562c-.916-.154-1.832 0-2.443.458c-.763.458-1.22 1.22-1.371 2.136l-9.464 44.558c-19.837.612-37.692 6.562-50.662 15.872a18.74 18.74 0 0 0-12.971-5.188c-10.377 0-18.617 8.391-18.617 18.617c0 7.629 4.577 14.037 10.988 16.939a33.6 33.6 0 0 0-.458 5.646c0 28.686 33.42 52.036 74.621 52.036c41.202 0 74.622-23.196 74.622-52.036a35 35 0 0 0-.458-5.646c6.408-2.902 10.985-9.464 10.985-17.093M85.272 142.495c0-7.324 5.95-13.275 13.278-13.275c7.324 0 13.275 5.95 13.275 13.275s-5.95 13.278-13.275 13.278c-7.327.15-13.278-5.953-13.278-13.278m74.317 35.251c-9.156 9.157-26.553 9.768-31.588 9.768c-5.188 0-22.584-.765-31.59-9.768c-1.371-1.373-1.371-3.51 0-4.883c1.374-1.371 3.51-1.371 4.884 0c5.8 5.8 18.008 7.782 26.706 7.782s21.058-1.983 26.704-7.782c1.374-1.371 3.51-1.371 4.884 0c1.22 1.373 1.22 3.51 0 4.883m-2.443-21.822c-7.325 0-13.275-5.95-13.275-13.275s5.95-13.275 13.275-13.275c7.327 0 13.277 5.95 13.277 13.275c0 7.17-5.95 13.275-13.277 13.275",fill:"#fff"})]}),cW=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M18.926 23.998L0 18.892L5.075.002L24 5.108ZM15.348 10.09l-5.282-1.453l-1.414 5.273l5.282 1.453z",fill:"currentColor"})}),uW=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M6 15a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2h2zm1 0a2 2 0 0 1 2-2a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2a2 2 0 0 1-2-2zm2-8a2 2 0 0 1-2-2a2 2 0 0 1 2-2a2 2 0 0 1 2 2v2zm0 1a2 2 0 0 1 2 2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2a2 2 0 0 1 2-2zm8 2a2 2 0 0 1 2-2a2 2 0 0 1 2 2a2 2 0 0 1-2 2h-2zm-1 0a2 2 0 0 1-2 2a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2a2 2 0 0 1 2 2zm-2 8a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2v-2zm0-1a2 2 0 0 1-2-2a2 2 0 0 1 2-2h5a2 2 0 0 1 2 2a2 2 0 0 1-2 2z"})}),dW=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M128 0C57.308 0 0 57.309 0 128c0 70.696 57.309 128 128 128c70.697 0 128-57.304 128-128C256 57.314 198.697.007 127.998.007zm58.699 184.614c-2.293 3.76-7.215 4.952-10.975 2.644c-30.053-18.357-67.885-22.515-112.44-12.335a7.98 7.98 0 0 1-9.552-6.007a7.97 7.97 0 0 1 6-9.553c48.76-11.14 90.583-6.344 124.323 14.276c3.76 2.308 4.952 7.215 2.644 10.975m15.667-34.853c-2.89 4.695-9.034 6.178-13.726 3.289c-34.406-21.148-86.853-27.273-127.548-14.92c-5.278 1.594-10.852-1.38-12.454-6.649c-1.59-5.278 1.386-10.842 6.655-12.446c46.485-14.106 104.275-7.273 143.787 17.007c4.692 2.89 6.175 9.034 3.286 13.72zm1.345-36.293C162.457 88.964 94.394 86.71 55.007 98.666c-6.325 1.918-13.014-1.653-14.93-7.978c-1.917-6.328 1.65-13.012 7.98-14.935C93.27 62.027 168.434 64.68 215.929 92.876c5.702 3.376 7.566 10.724 4.188 16.405c-3.362 5.69-10.73 7.565-16.4 4.187z",fill:"#1ed760"})}),fW=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 290",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M189.72 104.421c18.678 13.345 41.56 21.197 66.273 21.197v-47.53a67 67 0 0 1-13.918-1.456v37.413c-24.711 0-47.59-7.851-66.272-21.195v96.996c0 48.523-39.356 87.855-87.9 87.855c-18.113 0-34.949-5.473-48.934-14.86c15.962 16.313 38.222 26.432 62.848 26.432c48.548 0 87.905-39.332 87.905-87.857v-96.995zm17.17-47.952c-9.546-10.423-15.814-23.893-17.17-38.785v-6.113h-13.189c3.32 18.927 14.644 35.097 30.358 44.898M69.673 225.607a40 40 0 0 1-8.203-24.33c0-22.192 18.001-40.186 40.21-40.186a40.3 40.3 0 0 1 12.197 1.883v-48.593c-4.61-.631-9.262-.9-13.912-.801v37.822a40.3 40.3 0 0 0-12.203-1.882c-22.208 0-40.208 17.992-40.208 40.187c0 15.694 8.997 29.281 22.119 35.9",fill:"#ff004f"}),x.jsx("path",{d:"M175.803 92.849c18.683 13.344 41.56 21.195 66.272 21.195V76.631c-13.794-2.937-26.005-10.141-35.186-20.162c-15.715-9.802-27.038-25.972-30.358-44.898h-34.643v189.843c-.079 22.132-18.049 40.052-40.21 40.052c-13.058 0-24.66-6.221-32.007-15.86c-13.12-6.618-22.118-20.206-22.118-35.898c0-22.193 18-40.187 40.208-40.187c4.255 0 8.356.662 12.203 1.882v-37.822c-47.692.985-86.047 39.933-86.047 87.834c0 23.912 9.551 45.589 25.053 61.428c13.985 9.385 30.82 14.86 48.934 14.86c48.545 0 87.9-39.335 87.9-87.857z"}),x.jsx("path",{d:"M242.075 76.63V66.516a66.3 66.3 0 0 1-35.186-10.047a66.47 66.47 0 0 0 35.186 20.163M176.53 11.57a68 68 0 0 1-.728-5.457V0h-47.834v189.845c-.076 22.13-18.046 40.05-40.208 40.05a40.06 40.06 0 0 1-18.09-4.287c7.347 9.637 18.949 15.857 32.007 15.857c22.16 0 40.132-17.918 40.21-40.05V11.571zM99.966 113.58v-10.769a89 89 0 0 0-12.061-.818C39.355 101.993 0 141.327 0 189.845c0 30.419 15.467 57.227 38.971 72.996c-15.502-15.838-25.053-37.516-25.053-61.427c0-47.9 38.354-86.848 86.048-87.833",fill:"#00f2ea"})]}),hW=({className:e})=>x.jsxs("svg",{className:e,version:"1.1",viewBox:"0 0 2400 2800",x:"0px",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",y:"0px",children:[x.jsx("style",{type:"text/css",children:`
|
|
130
|
+
.st0{fill:#FFFFFF}
|
|
131
|
+
.st1{fill:#9146FF}
|
|
132
|
+
`}),x.jsx("title",{children:"Asset 2"}),x.jsxs("g",{children:[x.jsx("polygon",{className:"st0",points:"2200,1300 1800,1700 1400,1700 1050,2050 1050,1700 600,1700 600,200 2200,200"}),x.jsx("g",{children:x.jsxs("g",{children:[x.jsx("path",{className:"st1",d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600V1300z"}),x.jsx("rect",{className:"st1",height:"600",width:"200",x:"1700",y:"550"}),x.jsx("rect",{className:"st1",height:"600",width:"200",x:"1150",y:"550"})]})})]})]}),pW=({className:e})=>x.jsx("svg",{"data-testid":"geist-icon",height:"16","stroke-linejoin":"round",viewBox:"0 0 16 16",width:"16",className:e,style:{color:"currentcolor"},children:x.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1L16 15H0L8 1Z",fill:"currentColor"})}),mW=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 576 512",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M545 117.7c3.7-12.5 0-21.7-17.8-21.7h-58.9c-15 0-21.9 7.9-25.6 16.7c0 0-30 73.1-72.4 120.5c-13.7 13.7-20 18.1-27.5 18.1c-3.7 0-9.4-4.4-9.4-16.9V117.7c0-15-4.2-21.7-16.6-21.7h-92.6c-9.4 0-15 7-15 13.5c0 14.2 21.2 17.5 23.4 57.5v86.8c0 19-3.4 22.5-10.9 22.5c-20 0-68.6-73.4-97.4-157.4c-5.8-16.3-11.5-22.9-26.6-22.9H38.8c-16.8 0-20.2 7.9-20.2 16.7c0 15.6 20 93.1 93.1 195.5C160.4 378.1 229 416 291.4 416c37.5 0 42.1-8.4 42.1-22.9c0-66.8-3.4-73.1 15.4-73.1c8.7 0 23.7 4.4 58.7 38.1c40 40 46.6 57.9 69 57.9h58.9c16.8 0 25.3-8.4 20.4-25c-11.2-34.9-86.9-106.7-90.3-111.5c-8.7-11.2-6.2-16.2 0-26.2c.1-.1 72-101.3 79.4-135.6",fill:"currentColor"})}),gW=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M389.2 48h70.6L305.6 224.2L487 464H345L233.7 318.6L106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9zm-24.8 373.8h39.1L151.1 88h-42z",fill:"currentColor"})}),vW=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:512,height:117,viewBox:"0 0 512 117",children:x.jsx("path",{fill:"#0b5cff",d:"M107.472 114.706H16.348c-5.968 0-11.791-3.203-14.557-8.589C-1.41 99.858-.247 92.434 4.702 87.63L68.17 24.164H22.607C10.088 24.164.044 13.974.044 1.6h83.992c5.968 0 11.79 3.203 14.556 8.589c3.203 6.259 2.038 13.683-2.911 18.486L32.214 92.143h52.55c12.518 0 22.708 10.19 22.708 22.563M468.183 0c-13.1 0-24.746 5.677-32.898 14.702C427.134 5.677 415.488 0 402.388 0c-24.164 0-43.961 20.67-43.961 44.834v69.872c12.518 0 22.562-10.19 22.562-22.563V44.689c0-11.646 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.315 22.272 21.397v48.037c0 12.519 10.19 22.563 22.563 22.563V44.543c0-11.645 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.316 22.272 21.398v48.036c0 12.52 10.19 22.563 22.563 22.563V44.69C512.144 20.67 492.347 0 468.183 0M221.595 58.226c0 32.17-26.056 58.226-58.226 58.226s-58.226-26.056-58.226-58.226S131.199 0 163.369 0s58.226 26.056 58.226 58.226m-22.563 0c0-19.651-16.012-35.663-35.663-35.663s-35.664 16.012-35.664 35.663c0 19.652 16.013 35.664 35.664 35.664s35.663-16.012 35.663-35.664m148.04 0c0 32.17-26.056 58.226-58.226 58.226S230.62 90.396 230.62 58.226S256.676 0 288.846 0s58.227 26.056 58.227 58.226m-22.562 0c0-19.651-16.012-35.663-35.664-35.663c-19.65 0-35.663 16.012-35.663 35.663c0 19.652 16.012 35.664 35.663 35.664c19.652 0 35.664-16.012 35.664-35.664"})}),yW=[{provider:"apple",name:"Apple",icon:YY},{provider:"discord",name:"Discord",icon:WY},{provider:"dropbox",name:"Dropbox",icon:QY},{provider:"facebook",name:"Facebook",icon:XY},{provider:"github",name:"GitHub",icon:JY},{provider:"gitlab",name:"GitLab",icon:eW},{provider:"google",name:"Google",icon:tW},{provider:"huggingface",name:"Hugging Face",icon:nW},{provider:"kick",name:"Kick",icon:rW},{provider:"linear",name:"Linear",icon:oW},{provider:"linkedin",name:"LinkedIn",icon:aW},{provider:"microsoft",name:"Microsoft",icon:sW},{provider:"notion",name:"Notion",icon:iW},{provider:"reddit",name:"Reddit",icon:lW},{provider:"roblox",name:"Roblox",icon:cW},{provider:"slack",name:"Slack",icon:uW},{provider:"spotify",name:"Spotify",icon:dW},{provider:"tiktok",name:"TikTok",icon:fW},{provider:"twitch",name:"Twitch",icon:hW},{provider:"vercel",name:"Vercel",icon:pW},{provider:"vk",name:"VK",icon:mW},{provider:"twitter",name:"X",icon:gW},{provider:"zoom",name:"Zoom",icon:vW}];function id({className:e,enableToggle:t,onChange:n,...r}){const[a,i]=A.useState(!0),[l,u]=A.useState(!1);return x.jsxs("div",{className:"relative",children:[x.jsx(Fo,{className:Ce(t&&"pr-10",e),...r,type:l&&t?"text":"password",onChange:d=>{i(!d.target.value),n?.(d)}}),t&&x.jsxs(x.Fragment,{children:[x.jsx(Wt,{className:"!bg-transparent absolute top-0 right-0",disabled:a,size:"icon",type:"button",variant:"ghost",onClick:()=>u(!l),children:l?x.jsx(OF,{}):x.jsx(TF,{})}),x.jsx("style",{children:`
|
|
133
|
+
.hide-password-toggle::-ms-reveal,
|
|
134
|
+
.hide-password-toggle::-ms-clear {
|
|
135
|
+
visibility: hidden;
|
|
136
|
+
pointer-events: none;
|
|
137
|
+
display: none;
|
|
138
|
+
}
|
|
139
|
+
`})]})]})}function pa({redirectTo:e}){const{redirectTo:t}=A.useContext(ht),n=A.useCallback(()=>e||Ui("redirectTo")||t,[e,t]),[r,a]=A.useState(!1),{navigate:i,hooks:{useSession:l},onSessionChange:u}=A.useContext(ht),{refetch:d}=l();return{onSuccess:A.useCallback(async()=>{a(!0),await d?.(),u&&await u(),a(!1),i(n())},[d,u,i,n]),isPending:r}}function pM({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=A.useContext(ht),r=t?.(),a=A.useRef(!1),{onSuccess:i}=pa({redirectTo:e});return A.useEffect(()=>{if(!a.current){if(!n){a.current=!0,i();return}r||(a.current=!0,i())}},[r,n,i]),x.jsx(mr,{className:"animate-spin"})}var _W=["/sign-up/email","/sign-in/email","/forget-password"],bW=e=>{let t=e.startsWith("/")?e.substring(1):e;return t=t.replace(/-([a-z])/g,(n,r)=>r.toUpperCase()).replace(/\/([a-z])/g,(n,r)=>r.toUpperCase()).replace(/\//g,"").replace(/[^A-Za-z0-9_]/g,""),t};function Od({localization:e}){const{captcha:t,localization:n}=A.useContext(ht);e={...n,...e};const r=A.useRef(null),{executeRecaptcha:a}=XI(),i=async d=>{if(!t)throw new Error(e.MISSING_RESPONSE);let f;switch(t.provider){case"google-recaptcha-v3":{const m=bW(d);f=await a?.(m);break}case"google-recaptcha-v2-checkbox":{f=r.current.getValue();break}case"google-recaptcha-v2-invisible":{f=await r.current.executeAsync();break}case"cloudflare-turnstile":{f=r.current.getResponse();break}case"hcaptcha":{f=r.current.getResponse();break}case"captchafox":{f=r.current.getResponse();break}}if(!f)throw new Error(e.MISSING_RESPONSE);return f};return{captchaRef:r,getCaptchaHeaders:async d=>{if(!t)return;if((t.endpoints||_W).includes(d))return{"x-captcha-response":await i(d)}},resetCaptcha:()=>{var d,f,m,p,g,y,b,S;if(t)switch(t.provider){case"google-recaptcha-v3":break;case"google-recaptcha-v2-checkbox":case"google-recaptcha-v2-invisible":{(f=(d=r.current)==null?void 0:d.reset)==null||f.call(d);break}case"cloudflare-turnstile":{(p=(m=r.current)==null?void 0:m.reset)==null||p.call(m);break}case"hcaptcha":{(y=(g=r.current)==null?void 0:g.resetCaptcha)==null||y.call(g);break}case"captchafox":{(S=(b=r.current)==null?void 0:b.reset)==null||S.call(b);break}}}}}function wW({className:e,localization:t}){const n=Ka(),{captcha:r,localization:a}=A.useContext(ht),i={...a,...t};return r?r.hideBadge?x.jsxs(x.Fragment,{children:[x.jsx("style",{children:`
|
|
140
|
+
.grecaptcha-badge { visibility: hidden; }
|
|
141
|
+
`}),x.jsxs("p",{className:Ce("text-muted-foreground text-xs",e),children:[i.PROTECTED_BY_RECAPTCHA," ",i.BY_CONTINUING_YOU_AGREE," Google"," ",x.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:i.PRIVACY_POLICY})," ","&"," ",x.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:i.TERMS_OF_SERVICE}),"."]})]}):n?x.jsx("style",{children:`
|
|
142
|
+
.grecaptcha-badge { visibility: visible !important; }
|
|
143
|
+
`}):null:null}function SW({ref:e}){const{captcha:t}=A.useContext(ht),{theme:n}=Ab(),{lang:r}=eN();return A.useEffect(()=>{window.recaptchaOptions={useRecaptchaNet:t?.recaptchaNet,enterprise:t?.enterprise}},[t]),t?x.jsxs(x.Fragment,{children:[x.jsx("style",{children:`
|
|
144
|
+
.grecaptcha-badge {
|
|
145
|
+
border-radius: var(--radius) !important;
|
|
146
|
+
--tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
|
|
147
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
|
|
148
|
+
border-style: var(--tw-border-style) !important;
|
|
149
|
+
border-width: 1px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.dark .grecaptcha-badge {
|
|
153
|
+
border-color: var(--input) !important;
|
|
154
|
+
}
|
|
155
|
+
`}),x.jsx(cY,{ref:e,sitekey:t.siteKey,theme:n,hl:r,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:Ce(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${r}-${t.provider}`)]}):null}var EW=["/sign-up/email","/sign-in/email","/forget-password"];function Cd({ref:e,localization:t,action:n}){const{captcha:r}=A.useContext(ht);if(!r||n&&!(r.endpoints||EW).includes(n))return null;const{theme:a}=Ab(),i=r.provider==="google-recaptcha-v2-checkbox"||r.provider==="google-recaptcha-v2-invisible",l=r.provider==="google-recaptcha-v3"||r.provider==="google-recaptcha-v2-invisible",u=r.provider==="cloudflare-turnstile",d=r.provider==="hcaptcha",f=r.provider==="captchafox";return x.jsxs(x.Fragment,{children:[i&&x.jsx(SW,{ref:e}),l&&x.jsx(wW,{localization:t}),u&&x.jsx(K4,{className:"mx-auto",ref:e,siteKey:r.siteKey,options:{theme:a,size:"flexible"}}),d&&x.jsx("div",{className:"mx-auto",children:x.jsx(jK,{ref:e,sitekey:r.siteKey,theme:a})}),f&&x.jsx("div",{className:"mx-auto",children:x.jsx($4,{ref:e,sitekey:r.siteKey,theme:a})})]})}function b1({className:e,containerClassName:t,...n}){return x.jsx(J4,{"data-slot":"input-otp",containerClassName:Ce("flex items-center gap-2 has-disabled:opacity-50",t),className:Ce("disabled:cursor-not-allowed",e),...n})}function Dl({className:e,...t}){return x.jsx("div",{"data-slot":"input-otp-group",className:Ce("flex items-center",e),...t})}function Gn({index:e,className:t,...n}){const r=A.useContext(X4),{char:a,hasFakeCaret:i,isActive:l}=r?.slots[e]??{};return x.jsxs("div",{"data-slot":"input-otp-slot","data-active":l,className:Ce("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[a,i&&x.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:x.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function R0({...e}){return x.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:x.jsx(AF,{})})}function w1({otpSeparators:e=0}){return e===0?x.jsxs(Dl,{children:[x.jsx(Gn,{index:0}),x.jsx(Gn,{index:1}),x.jsx(Gn,{index:2}),x.jsx(Gn,{index:3}),x.jsx(Gn,{index:4}),x.jsx(Gn,{index:5})]}):e===1?x.jsxs(x.Fragment,{children:[x.jsxs(Dl,{children:[x.jsx(Gn,{index:0}),x.jsx(Gn,{index:1}),x.jsx(Gn,{index:2})]}),x.jsx(R0,{}),x.jsxs(Dl,{children:[x.jsx(Gn,{index:3}),x.jsx(Gn,{index:4}),x.jsx(Gn,{index:5})]})]}):x.jsxs(x.Fragment,{children:[x.jsxs(Dl,{children:[x.jsx(Gn,{index:0}),x.jsx(Gn,{index:1})]}),x.jsx(R0,{}),x.jsxs(Dl,{children:[x.jsx(Gn,{index:2}),x.jsx(Gn,{index:3})]}),x.jsx(R0,{}),x.jsxs(Dl,{children:[x.jsx(Gn,{index:4}),x.jsx(Gn,{index:5})]})]})}function BO(e){const[t,n]=A.useState();return t?x.jsx(xW,{...e,email:t}):x.jsx(RW,{...e,setEmail:n})}function RW({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:a,setEmail:i}){const l=Ka(),{captchaRef:u,getCaptchaHeaders:d}=Od({localization:r}),{authClient:f,localization:m,toast:p,localizeErrors:g}=A.useContext(ht);r={...m,...r};const y=pe({email:L().email({message:`${r.EMAIL} ${r.IS_INVALID}`})}),b=ua({resolver:da(y),defaultValues:{email:""}});n=n||b.formState.isSubmitting,A.useEffect(()=>{a?.(b.formState.isSubmitting)},[b.formState.isSubmitting,a]);async function S({email:w}){const R={throw:!0,headers:await d("/email-otp/send-verification-otp")};try{await f.emailOtp.sendVerificationOtp({email:w,type:"sign-in",fetchOptions:R}),p({variant:"success",message:r.EMAIL_OTP_VERIFICATION_SENT}),i(w)}catch(E){p({variant:"error",message:wn({error:E,localization:r,localizeErrors:g})})}}return x.jsx(ha,{...b,children:x.jsxs("form",{onSubmit:b.handleSubmit(S),noValidate:l,className:Ce("grid w-full gap-6",e,t?.base),children:[x.jsx(yn,{control:b.control,name:"email",render:({field:w})=>x.jsxs(_n,{children:[x.jsx(bn,{className:t?.label,children:r.EMAIL}),x.jsx(Pn,{children:x.jsx(Fo,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...w})}),x.jsx(Vn,{className:t?.error})]})}),x.jsx(Cd,{ref:u,localization:r,action:"/email-otp/send-verification-otp"}),x.jsx(Wt,{type:"submit",disabled:n,className:Ce("w-full",t?.button,t?.primaryButton),children:n?x.jsx(mr,{className:"animate-spin"}):r.EMAIL_OTP_SEND_ACTION})]})})}function xW({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:a=0,redirectTo:i,setIsSubmitting:l,email:u}){const{authClient:d,localization:f,toast:m,localizeErrors:p}=A.useContext(ht);r={...f,...r};const{onSuccess:g,isPending:y}=pa({redirectTo:i}),b=pe({code:L().min(1,{message:`${r.EMAIL_OTP} ${r.IS_REQUIRED}`}).min(6,{message:`${r.EMAIL_OTP} ${r.IS_INVALID}`})}),S=ua({resolver:da(b),defaultValues:{code:""}});n=n||S.formState.isSubmitting||y,A.useEffect(()=>{l?.(S.formState.isSubmitting||y)},[S.formState.isSubmitting,y,l]);async function w({code:R}){try{await d.signIn.emailOtp({email:u,otp:R,fetchOptions:{throw:!0}}),await g()}catch(E){m({variant:"error",message:wn({error:E,localization:r,localizeErrors:p})}),S.reset()}}return x.jsx(ha,{...S,children:x.jsxs("form",{onSubmit:S.handleSubmit(w),className:Ce("grid w-full gap-6",e,t?.base),children:[x.jsx(yn,{control:S.control,name:"code",render:({field:R})=>x.jsxs(_n,{children:[x.jsx(bn,{className:t?.label,children:r.EMAIL_OTP}),x.jsx(Pn,{children:x.jsx(b1,{...R,maxLength:6,onChange:E=>{R.onChange(E),E.length===6&&S.handleSubmit(w)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:x.jsx(w1,{otpSeparators:a})})}),x.jsx(Vn,{className:t?.error})]})}),x.jsx("div",{className:"grid gap-4",children:x.jsxs(Wt,{type:"submit",disabled:n,className:Ce(t?.button,t?.primaryButton),children:[n&&x.jsx(mr,{className:"animate-spin"}),r.EMAIL_OTP_VERIFY_ACTION]})})]})})}function TW({onCancel:e,localization:t,className:n,classNames:r,otpSeparators:a,callbackURL:i,isSubmitting:l,redirectTo:u,setIsSubmitting:d}){const[f,m]=A.useState(!0),[p,g]=A.useState(30),{authClient:y,localization:b,toast:S,localizeErrors:w,navigate:R,basePath:E,viewPaths:T}=A.useContext(ht);t={...b,...t};const O=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:C,isPending:I}=pa({redirectTo:u}),N=pe({code:L().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),P=ua({resolver:da(N),defaultValues:{code:""}}),$=l||P.formState.isSubmitting||I;A.useEffect(()=>{d?.(P.formState.isSubmitting||I)},[P.formState.isSubmitting,I,d]),A.useEffect(()=>{if(p>0){const G=setTimeout(()=>g(p-1),1e3);return()=>clearTimeout(G)}else m(!1)},[p]);async function K({code:G}){try{const U=await y.emailOtp.verifyEmail({email:O,otp:G,fetchOptions:{throw:!0}});"token"in U&&U.token?await C():(R(`${E}/${T.SIGN_IN}${window.location.search}`),S({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(U){S({variant:"error",message:wn({error:U,localization:t,localizeErrors:w})}),P.reset()}}async function F(){if(!f){m(!0),g(30);try{await y.emailOtp.sendVerificationOtp({email:O,type:"email-verification",fetchOptions:{throw:!0}}),S({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(G){S({variant:"error",message:wn({error:G,localization:t,localizeErrors:w})}),m(!1),g(0)}}}return O?x.jsx(ha,{...P,children:x.jsxs("form",{onSubmit:P.handleSubmit(K),className:Ce("grid w-full gap-6",n,r?.base),children:[x.jsx(yn,{control:P.control,name:"code",render:({field:G})=>x.jsxs(_n,{children:[x.jsx(bn,{className:r?.label,children:t.EMAIL_OTP}),x.jsx(Pn,{children:x.jsx(b1,{...G,maxLength:6,onChange:U=>{G.onChange(U),U.length===6&&P.handleSubmit(K)()},containerClassName:r?.otpInputContainer,className:r?.otpInput,disabled:$,children:x.jsx(w1,{otpSeparators:a})})}),x.jsx(Vn,{className:r?.error})]})}),x.jsxs("div",{className:"grid gap-4",children:[x.jsxs(Wt,{type:"submit",disabled:$,className:Ce(r?.button,r?.primaryButton),children:[$&&x.jsx(mr,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),x.jsx(Wt,{type:"button",variant:"outline",onClick:F,disabled:f||$,className:Ce("w-full",r?.button),children:f?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&x.jsx(Wt,{type:"button",variant:"ghost",onClick:e,disabled:$,className:"w-full",children:t.CANCEL})]})]})}):x.jsx("div",{className:Ce("grid w-full gap-6",n),children:x.jsxs("div",{className:"text-center",children:[x.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),x.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function OW({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:a}){const i=Ka(),{captchaRef:l,getCaptchaHeaders:u,resetCaptcha:d}=Od({localization:r}),{authClient:f,basePath:m,baseURL:p,localization:g,navigate:y,toast:b,viewPaths:S,localizeErrors:w}=A.useContext(ht);r={...g,...r};const R=pe({email:L().email({message:`${r.EMAIL} ${r.IS_INVALID}`}).min(1,{message:`${r.EMAIL} ${r.IS_REQUIRED}`})}),E=ua({resolver:da(R),defaultValues:{email:""}});n=n||E.formState.isSubmitting,A.useEffect(()=>{a?.(E.formState.isSubmitting)},[E.formState.isSubmitting,a]);async function T({email:O}){try{const C={throw:!0,headers:await u("/forget-password")};await f.requestPasswordReset({email:O,redirectTo:`${p}${m}/${S.RESET_PASSWORD}`,fetchOptions:C}),b({variant:"success",message:r.FORGOT_PASSWORD_EMAIL}),y(`${m}/${S.SIGN_IN}${window.location.search}`)}catch(C){b({variant:"error",message:wn({error:C,localization:r,localizeErrors:w})}),d()}}return x.jsx(ha,{...E,children:x.jsxs("form",{onSubmit:E.handleSubmit(T),noValidate:i,className:Ce("grid w-full gap-6",e,t?.base),children:[x.jsx(yn,{control:E.control,name:"email",render:({field:O})=>x.jsxs(_n,{children:[x.jsx(bn,{className:t?.label,children:r.EMAIL}),x.jsx(Pn,{children:x.jsx(Fo,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...O})}),x.jsx(Vn,{className:t?.error})]})}),x.jsx(Cd,{ref:l,localization:r,action:"/forget-password"}),x.jsx(Wt,{type:"submit",disabled:n,className:Ce("w-full",t?.button,t?.primaryButton),children:n?x.jsx(mr,{className:"animate-spin"}):r.FORGOT_PASSWORD_ACTION})]})})}function qO({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,redirectTo:i,setIsSubmitting:l}){const u=Ka(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:m}=Od({localization:a}),{authClient:p,basePath:g,baseURL:y,persistClient:b,localization:S,redirectTo:w,viewPaths:R,toast:E,localizeErrors:T}=A.useContext(ht);a={...S,...a};const O=A.useCallback(()=>i||Ui("redirectTo")||w,[i,w]),C=A.useCallback(()=>`${y}${n||(b?`${g}/${R.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,b,g,R,y,O]),I=pe({email:L().email({message:`${a.EMAIL} ${a.IS_INVALID}`})}),N=ua({resolver:da(I),defaultValues:{email:""}});r=r||N.formState.isSubmitting,A.useEffect(()=>{l?.(N.formState.isSubmitting)},[N.formState.isSubmitting,l]);async function P({email:$}){try{const K={throw:!0,headers:await f("/sign-in/magic-link")};await p.signIn.magicLink({email:$,callbackURL:C(),fetchOptions:K}),E({variant:"success",message:a.MAGIC_LINK_EMAIL}),N.reset()}catch(K){E({variant:"error",message:wn({error:K,localization:a,localizeErrors:T})}),m()}}return x.jsx(ha,{...N,children:x.jsxs("form",{onSubmit:N.handleSubmit(P),noValidate:u,className:Ce("grid w-full gap-6",e,t?.base),children:[x.jsx(yn,{control:N.control,name:"email",render:({field:$})=>x.jsxs(_n,{children:[x.jsx(bn,{className:t?.label,children:a.EMAIL}),x.jsx(Pn,{children:x.jsx(Fo,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:r,...$})}),x.jsx(Vn,{className:t?.error})]})}),x.jsx(Cd,{ref:d,localization:a,action:"/sign-in/magic-link"}),x.jsx(Wt,{type:"submit",disabled:r,className:Ce("w-full",t?.button,t?.primaryButton),children:r?x.jsx(mr,{className:"animate-spin"}):a.MAGIC_LINK_ACTION})]})})}function CW({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:a,setIsSubmitting:i}){const{authClient:l,localization:u,toast:d,localizeErrors:f}=A.useContext(ht);r={...u,...r};const{onSuccess:m,isPending:p}=pa({redirectTo:a}),g=pe({code:L().min(1,{message:r.BACKUP_CODE_REQUIRED})}),y=ua({resolver:da(g),defaultValues:{code:""}});n=n||y.formState.isSubmitting||p,A.useEffect(()=>{i?.(y.formState.isSubmitting||p)},[y.formState.isSubmitting,p,i]);async function b({code:S}){try{await l.twoFactor.verifyBackupCode({code:S,fetchOptions:{throw:!0}}),await m()}catch(w){d({variant:"error",message:wn({error:w,localization:r,localizeErrors:f})}),y.reset()}}return x.jsx(ha,{...y,children:x.jsxs("form",{onSubmit:y.handleSubmit(b),className:Ce("grid gap-6",e,t?.base),children:[x.jsx(yn,{control:y.control,name:"code",render:({field:S})=>x.jsxs(_n,{children:[x.jsx(bn,{className:t?.label,children:r.BACKUP_CODE}),x.jsx(Pn,{children:x.jsx(Fo,{placeholder:r.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...S})}),x.jsx(Vn,{className:t?.error})]})}),x.jsx(Wt,{type:"submit",disabled:n,className:Ce(t?.button,t?.primaryButton),children:n?x.jsx(mr,{className:"animate-spin"}):r.RECOVER_ACCOUNT_ACTION})]})})}function AW({className:e,classNames:t,localization:n,passwordValidation:r}){const a=A.useRef(!1),{authClient:i,basePath:l,credentials:u,localization:d,viewPaths:f,navigate:m,toast:p,localizeErrors:g}=A.useContext(ht),y=u?.confirmPassword,b=u?.passwordValidation;n={...d,...n},r={...b,...r};const S=pe({newPassword:Ju(r,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:y?Ju(r,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):L().optional()}).refine(T=>!y||T.newPassword===T.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),w=ua({resolver:da(S),defaultValues:{newPassword:"",confirmPassword:""}}),R=w.formState.isSubmitting;A.useEffect(()=>{if(a.current)return;a.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="INVALID_TOKEN")&&(m(`${l}/${f.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[l,m,p,f,n]);async function E({newPassword:T}){try{const C=new URLSearchParams(window.location.search).get("token");await i.resetPassword({newPassword:T,token:C,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),m(`${l}/${f.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:wn({error:O,localization:n,localizeErrors:g})}),w.reset()}}return x.jsx(ha,{...w,children:x.jsxs("form",{onSubmit:w.handleSubmit(E),className:Ce("grid w-full gap-6",e,t?.base),children:[x.jsx(yn,{control:w.control,name:"newPassword",render:({field:T})=>x.jsxs(_n,{children:[x.jsx(bn,{className:t?.label,children:n.NEW_PASSWORD}),x.jsx(Pn,{children:x.jsx(id,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:R,...T})}),x.jsx(Vn,{className:t?.error})]})}),y&&x.jsx(yn,{control:w.control,name:"confirmPassword",render:({field:T})=>x.jsxs(_n,{children:[x.jsx(bn,{className:t?.label,children:n.CONFIRM_PASSWORD}),x.jsx(Pn,{children:x.jsx(id,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:R,...T})}),x.jsx(Vn,{className:t?.error})]})}),x.jsx(Wt,{type:"submit",disabled:R,className:Ce("w-full",t?.button,t?.primaryButton),children:R?x.jsx(mr,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function IW({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:a,setIsSubmitting:i,passwordValidation:l}){const u=Ka(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:m}=Od({localization:r}),{authClient:p,basePath:g,credentials:y,localization:b,viewPaths:S,navigate:w,toast:R,Link:E,localizeErrors:T,emailVerification:O}=A.useContext(ht),C=y?.rememberMe,I=y?.username,N=y?.passwordValidation;r={...b,...r},l={...N,...l};const{onSuccess:P,isPending:$}=pa({redirectTo:a}),K=pe({email:I?L().min(1,{message:`${r.USERNAME} ${r.IS_REQUIRED}`}):L().email({message:`${r.EMAIL} ${r.IS_INVALID}`}),password:Ju(l,r),rememberMe:ut().optional()}),F=ua({resolver:da(K),defaultValues:{email:"",password:"",rememberMe:!C}});n=n||F.formState.isSubmitting||$,A.useEffect(()=>{i?.(F.formState.isSubmitting||$)},[F.formState.isSubmitting,$,i]);async function G({email:U,password:J,rememberMe:le}){var B;try{let Y={};if(I&&!nz(U)){const W={throw:!0,headers:await f("/sign-in/username")};Y=await p.signIn.username({username:U,password:J,rememberMe:le,fetchOptions:W})}else{const W={throw:!0,headers:await f("/sign-in/email")};Y=await p.signIn.email({email:U,password:J,rememberMe:le,fetchOptions:W})}Y.twoFactorRedirect?w(`${g}/${S.TWO_FACTOR}${window.location.search}`):await P()}catch(Y){F.resetField("password"),m(),R({variant:"error",message:wn({error:Y,localization:r,localizeErrors:T})}),O?.otp&&((B=Y?.error)==null?void 0:B.code)==="EMAIL_NOT_VERIFIED"&&w(`${g}/${S.EMAIL_VERIFICATION}?email=${encodeURIComponent(U)}`)}}return x.jsx(ha,{...F,children:x.jsxs("form",{onSubmit:F.handleSubmit(G),noValidate:u,className:Ce("grid w-full gap-6",e,t?.base),children:[x.jsx(yn,{control:F.control,name:"email",render:({field:U})=>x.jsxs(_n,{children:[x.jsx(bn,{className:t?.label,children:I?r.USERNAME:r.EMAIL}),x.jsx(Pn,{children:x.jsx(Fo,{autoComplete:I?"username":"email",className:t?.input,type:I?"text":"email",placeholder:I?r.SIGN_IN_USERNAME_PLACEHOLDER:r.EMAIL_PLACEHOLDER,disabled:n,...U})}),x.jsx(Vn,{className:t?.error})]})}),x.jsx(yn,{control:F.control,name:"password",render:({field:U})=>x.jsxs(_n,{children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx(bn,{className:t?.label,children:r.PASSWORD}),y?.forgotPassword&&x.jsx(E,{className:Ce("text-sm hover:underline",t?.forgotPasswordLink),href:`${g}/${S.FORGOT_PASSWORD}${u?window.location.search:""}`,children:r.FORGOT_PASSWORD_LINK})]}),x.jsx(Pn,{children:x.jsx(id,{autoComplete:"current-password",className:t?.input,placeholder:r.PASSWORD_PLACEHOLDER,disabled:n,...U})}),x.jsx(Vn,{className:t?.error})]})}),C&&x.jsx(yn,{control:F.control,name:"rememberMe",render:({field:U})=>x.jsxs(_n,{className:"flex",children:[x.jsx(Pn,{children:x.jsx(_1,{checked:U.value,onCheckedChange:U.onChange,disabled:n})}),x.jsx(bn,{children:r.REMEMBER_ME})]})}),x.jsx(Cd,{ref:d,localization:r,action:"/sign-in/email"}),x.jsx(Wt,{type:"submit",disabled:n,className:Ce("w-full",t?.button,t?.primaryButton),children:n?x.jsx(mr,{className:"animate-spin"}):r.SIGN_IN_ACTION})]})})}function NW({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,redirectTo:i,setIsSubmitting:l,passwordValidation:u}){const d=Ka(),{captchaRef:f,getCaptchaHeaders:m,resetCaptcha:p}=Od({localization:a}),{additionalFields:g,authClient:y,basePath:b,baseURL:S,credentials:w,localization:R,nameRequired:E,persistClient:T,redirectTo:O,signUp:C,viewPaths:I,navigate:N,toast:P,avatar:$,localizeErrors:K,emailVerification:F}=A.useContext(ht),G=w?.confirmPassword,U=w?.username,J=w?.usernameRequired??!0,le=w?.passwordValidation,B=C?.fields;a={...R,...a},u={...le,...u};const Y=A.useRef(null),[W,he]=A.useState(null),[ae,M]=A.useState(!1),q=A.useCallback(()=>i||Ui("redirectTo")||O,[i,O]),V=A.useCallback(()=>`${S}${n||(T?`${b}/${I.CALLBACK}?redirectTo=${encodeURIComponent(q())}`:q())}`,[n,T,b,I,S,q]),{onSuccess:D,isPending:z}=pa({redirectTo:i}),X={email:L().email({message:`${a.EMAIL} ${a.IS_INVALID}`}),password:Ju(u,a),name:B?.includes("name")&&E?L().min(1,{message:`${a.NAME} ${a.IS_REQUIRED}`}):L().optional(),image:L().optional(),username:U&&J?L().min(1,{message:`${a.USERNAME} ${a.IS_REQUIRED}`}):L().optional(),confirmPassword:G?Ju(u,{PASSWORD_REQUIRED:a.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:a.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:a.PASSWORD_TOO_LONG,INVALID_PASSWORD:a.INVALID_PASSWORD}):L().optional()},ue={};if(B)for(const ce of B){if(ce==="name"||ce==="image")continue;const Te=g?.[ce];if(!Te)continue;let Pe;Te.type==="number"?Pe=Te.required?Cb(Xe=>Xe?Number(Xe):void 0,Ze({message:`${Te.label} ${a.IS_INVALID}`})):WI({message:`${Te.label} ${a.IS_INVALID}`}).optional():Te.type==="boolean"?Pe=Te.required?uT({message:`${Te.label} ${a.IS_INVALID}`}).refine(Xe=>Xe===!0,{message:`${Te.label} ${a.IS_REQUIRED}`}):uT({message:`${Te.label} ${a.IS_INVALID}`}).optional():Pe=Te.required?L().min(1,`${Te.label} ${a.IS_REQUIRED}`):L().optional(),ue[ce]=Pe}const ve=pe(X).extend(ue).refine(ce=>G?ce.password===ce.confirmPassword:!0,{message:a.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Ie={email:"",password:"",...G&&{confirmPassword:""},...B?.includes("name")?{name:""}:{},...U?{username:""}:{},...B?.includes("image")&&$?{image:""}:{}};if(B)for(const ce of B){if(ce==="name"||ce==="image")continue;const Te=g?.[ce];Te&&(Ie[ce]=Te.type==="boolean"?!1:"")}const Ae=ua({resolver:da(ve),defaultValues:Ie});r=r||Ae.formState.isSubmitting||z,A.useEffect(()=>{l?.(Ae.formState.isSubmitting||z)},[Ae.formState.isSubmitting,z,l]);const H=async ce=>{if($){M(!0);try{const Te=await $Y(ce,crypto.randomUUID(),$.size,$.extension);let Pe;$.upload?Pe=await $.upload(Te):Pe=await zY(Te),Pe?(he(Pe),Ae.setValue("image",Pe)):(he(null),Ae.setValue("image",""))}catch(Te){console.error(Te),P({variant:"error",message:wn({error:Te,localization:a,localizeErrors:K})})}M(!1)}},ne=()=>{he(null),Ae.setValue("image","")},_e=()=>{var ce;return(ce=Y.current)==null?void 0:ce.click()};async function se({email:ce,password:Te,name:Pe,username:Xe,confirmPassword:Ve,image:Ye,...Z}){try{for(const[Re,Ee]of Object.entries(Z)){const ke=g?.[Re];if(ke?.validate&&typeof Ee=="string"&&!await ke.validate(Ee)){Ae.setError(Re,{message:`${ke.label} ${a.IS_INVALID}`});return}}const re={throw:!0,headers:await m("/sign-up/email")},oe={};Xe!==void 0&&(!J&&(Xe===null||Xe===""||typeof Xe=="string"&&Xe.trim()==="")||(oe.username=Xe)),Ye!==void 0&&(oe.image=Ye);const we=await y.signUp.email({email:ce,password:Te,name:Pe||"",...oe,...Z,callbackURL:V(),fetchOptions:re});"token"in we&&we.token?await D():F?.otp?N(`${b}/${I.EMAIL_VERIFICATION}?email=${encodeURIComponent(ce)}`):(N(`${b}/${I.SIGN_IN}${window.location.search}`),P({variant:"success",message:a.SIGN_UP_EMAIL}))}catch(re){P({variant:"error",message:wn({error:re,localization:a,localizeErrors:K})}),Ae.resetField("password"),Ae.resetField("confirmPassword"),p()}}return x.jsx(ha,{...Ae,children:x.jsxs("form",{onSubmit:Ae.handleSubmit(se),noValidate:d,className:Ce("grid w-full gap-6",e,t?.base),children:[B?.includes("image")&&$&&x.jsxs(x.Fragment,{children:[x.jsx("input",{ref:Y,accept:"image/*",disabled:ae,hidden:!0,type:"file",onChange:ce=>{var Te;const Pe=(Te=ce.target.files)==null?void 0:Te.item(0);Pe&&H(Pe),ce.target.value=""}}),x.jsx(yn,{control:Ae.control,name:"image",render:()=>x.jsxs(_n,{children:[x.jsx(bn,{children:a.AVATAR}),x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsxs(FY,{children:[x.jsx(VY,{asChild:!0,children:x.jsx(Wt,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:x.jsx(GY,{isPending:ae,className:"size-16",user:W?{name:Ae.watch("name"),email:Ae.watch("email"),image:W}:null,localization:a})})}),x.jsxs(BY,{align:"start",onCloseAutoFocus:ce=>ce.preventDefault(),children:[x.jsxs(VO,{onClick:_e,disabled:ae,children:[x.jsx(xF,{}),a.UPLOAD_AVATAR]}),W&&x.jsxs(VO,{onClick:ne,disabled:ae,variant:"destructive",children:[x.jsx(NF,{}),a.DELETE_AVATAR]})]})]}),x.jsxs(Wt,{type:"button",variant:"outline",onClick:_e,disabled:ae,children:[ae&&x.jsx(mr,{className:"animate-spin"}),a.UPLOAD]})]}),x.jsx(Vn,{})]})})]}),B?.includes("name")&&x.jsx(yn,{control:Ae.control,name:"name",render:({field:ce})=>x.jsxs(_n,{children:[x.jsxs(bn,{className:t?.label,children:[a.NAME,!E&&x.jsx("span",{className:"ml-1 text-muted-foreground",children:a.OPTIONAL_BRACKETS})]}),x.jsx(Pn,{children:x.jsx(Fo,{autoComplete:"name",className:t?.input,placeholder:a.NAME_PLACEHOLDER,disabled:r,...ce,value:ce.value})}),x.jsx(Vn,{className:t?.error})]})}),U&&x.jsx(yn,{control:Ae.control,name:"username",render:({field:ce})=>x.jsxs(_n,{children:[x.jsxs(bn,{className:t?.label,children:[a.USERNAME,!J&&x.jsx("span",{className:"ml-1 text-muted-foreground",children:a.OPTIONAL_BRACKETS})]}),x.jsx(Pn,{children:x.jsx(Fo,{autoComplete:"username",className:t?.input,placeholder:a.USERNAME_PLACEHOLDER,disabled:r,...ce,value:ce.value})}),x.jsx(Vn,{className:t?.error})]})}),x.jsx(yn,{control:Ae.control,name:"email",render:({field:ce})=>x.jsxs(_n,{children:[x.jsx(bn,{className:t?.label,children:a.EMAIL}),x.jsx(Pn,{children:x.jsx(Fo,{autoComplete:"email",className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:r,...ce,value:ce.value})}),x.jsx(Vn,{className:t?.error})]})}),x.jsx(yn,{control:Ae.control,name:"password",render:({field:ce})=>x.jsxs(_n,{children:[x.jsx(bn,{className:t?.label,children:a.PASSWORD}),x.jsx(Pn,{children:x.jsx(id,{autoComplete:"new-password",className:t?.input,placeholder:a.PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...ce,value:ce.value})}),x.jsx(Vn,{className:t?.error})]})}),G&&x.jsx(yn,{control:Ae.control,name:"confirmPassword",render:({field:ce})=>x.jsxs(_n,{children:[x.jsx(bn,{className:t?.label,children:a.CONFIRM_PASSWORD}),x.jsx(Pn,{children:x.jsx(id,{autoComplete:"new-password",className:t?.input,placeholder:a.CONFIRM_PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...ce,value:ce.value})}),x.jsx(Vn,{className:t?.error})]})}),B?.filter(ce=>ce!=="name"&&ce!=="image").map(ce=>{const Te=g?.[ce];return Te?Te.type==="boolean"?x.jsx(yn,{control:Ae.control,name:ce,render:({field:Pe})=>x.jsxs(_n,{className:"flex",children:[x.jsx(Pn,{children:x.jsx(_1,{checked:Pe.value,onCheckedChange:Pe.onChange,disabled:r})}),x.jsx(bn,{className:t?.label,children:Te.label}),x.jsx(Vn,{className:t?.error})]})},ce):x.jsx(yn,{control:Ae.control,name:ce,render:({field:Pe})=>x.jsxs(_n,{children:[x.jsx(bn,{className:t?.label,children:Te.label}),x.jsx(Pn,{children:Te.type==="number"?x.jsx(Fo,{className:t?.input,type:"number",placeholder:Te.placeholder||(typeof Te.label=="string"?Te.label:""),disabled:r,...Pe,value:Pe.value}):Te.multiline?x.jsx(KY,{className:t?.input,placeholder:Te.placeholder||(typeof Te.label=="string"?Te.label:""),disabled:r,...Pe,value:Pe.value}):x.jsx(Fo,{className:t?.input,type:"text",placeholder:Te.placeholder||(typeof Te.label=="string"?Te.label:""),disabled:r,...Pe,value:Pe.value})}),x.jsx(Vn,{className:t?.error})]})},ce):(console.error(`Additional field ${ce} not found`),null)}),x.jsx(Cd,{ref:f,localization:a,action:"/sign-up/email"}),x.jsx(Wt,{type:"submit",disabled:r,className:Ce("w-full",t?.button,t?.primaryButton),children:r?x.jsx(mr,{className:"animate-spin"}):a.SIGN_UP_ACTION})]})})}function kW({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:a=0,redirectTo:i,setIsSubmitting:l}){var u;const d=Ka(),f=d?Ui("totpURI"):null,m=A.useRef(!1),{authClient:p,basePath:g,hooks:{useSession:y},localization:b,twoFactor:S,viewPaths:w,toast:R,Link:E,localizeErrors:T}=A.useContext(ht);r={...b,...r};const{onSuccess:O,isPending:C}=pa({redirectTo:i}),{data:I}=y(),N=(u=I?.user)==null?void 0:u.twoFactorEnabled,[P,$]=A.useState(S?.length===1?S[0]:null),[K,F]=A.useState(!1),[G,U]=A.useState(0),J=pe({code:L().min(1,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_REQUIRED}`}).min(6,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_INVALID}`}),trustDevice:ut().optional()}),le=ua({resolver:da(J),defaultValues:{code:""}});n=n||le.formState.isSubmitting||C,A.useEffect(()=>{l?.(le.formState.isSubmitting||C)},[le.formState.isSubmitting,C,l]),A.useEffect(()=>{P==="otp"&&G<=0&&!m.current&&(m.current=!0,B())},[P]),A.useEffect(()=>{if(G<=0)return;const W=setTimeout(()=>{U(he=>he-1)},1e3);return()=>clearTimeout(W)},[G]);const B=async()=>{if(!(K||G>0)){try{F(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),U(60)}catch(W){R({variant:"error",message:wn({error:W,localization:r,localizeErrors:T})}),W.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}m.current=!1,F(!1)}};async function Y({code:W,trustDevice:he}){try{await(P==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:W,trustDevice:he,fetchOptions:{throw:!0}}),await O(),I&&!N&&R({variant:"success",message:r?.TWO_FACTOR_ENABLED})}catch(ae){R({variant:"error",message:wn({error:ae,localization:r,localizeErrors:T})}),le.reset()}}return x.jsx(ha,{...le,children:x.jsxs("form",{onSubmit:le.handleSubmit(Y),className:Ce("grid w-full gap-6",e,t?.base),children:[S?.includes("totp")&&f&&P==="totp"&&x.jsxs("div",{className:"space-y-3",children:[x.jsx(iM,{className:t?.label,children:r.TWO_FACTOR_TOTP_LABEL}),x.jsx(NY,{className:Ce("border shadow-xs",t?.qrCode),value:f})]}),P!==null&&x.jsxs(x.Fragment,{children:[x.jsx(yn,{control:le.control,name:"code",render:({field:W})=>x.jsxs(_n,{children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx(bn,{className:t?.label,children:r.ONE_TIME_PASSWORD}),x.jsx(E,{className:Ce("text-sm hover:underline",t?.forgotPasswordLink),href:`${g}/${w.RECOVER_ACCOUNT}${d?window.location.search:""}`,children:r.FORGOT_AUTHENTICATOR})]}),x.jsx(Pn,{children:x.jsx(b1,{...W,maxLength:6,onChange:he=>{W.onChange(he),he.length===6&&le.handleSubmit(Y)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:x.jsx(w1,{otpSeparators:a})})}),x.jsx(Vn,{className:t?.error})]})}),x.jsx(yn,{control:le.control,name:"trustDevice",render:({field:W})=>x.jsxs(_n,{className:"flex",children:[x.jsx(Pn,{children:x.jsx(_1,{checked:W.value,onCheckedChange:W.onChange,disabled:n,className:t?.checkbox})}),x.jsx(bn,{className:t?.label,children:r.TRUST_DEVICE})]})})]}),x.jsxs("div",{className:"grid gap-4",children:[P!==null&&x.jsxs(Wt,{type:"submit",disabled:n,className:Ce(t?.button,t?.primaryButton),children:[n&&x.jsx(mr,{className:"animate-spin"}),r.TWO_FACTOR_ACTION]}),P==="otp"&&S?.includes("otp")&&x.jsxs(Wt,{type:"button",variant:"outline",onClick:B,disabled:G>0||K||n,className:Ce(t?.button,t?.outlineButton),children:[K?x.jsx(mr,{className:"animate-spin"}):x.jsx(yT,{className:t?.icon}),r.RESEND_CODE,G>0&&` (${G})`]}),P!=="otp"&&S?.includes("otp")&&x.jsxs(Wt,{type:"button",variant:"secondary",className:Ce(t?.button,t?.secondaryButton),onClick:()=>$("otp"),disabled:n,children:[x.jsx(yT,{className:t?.icon}),r.SEND_VERIFICATION_CODE]}),P!=="totp"&&S?.includes("totp")&&x.jsxs(Wt,{type:"button",variant:"secondary",className:Ce(t?.button,t?.secondaryButton),onClick:()=>$("totp"),disabled:n,children:[x.jsx(IF,{className:t?.icon}),r.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function mM({redirectTo:e}){const t=A.useRef(!1),{authClient:n,basePath:r,viewPaths:a}=A.useContext(ht),{onSuccess:i}=pa({redirectTo:e||`${r}/${a.SIGN_IN}`});return A.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(i))},[n,i]),x.jsx(mr,{className:"animate-spin"})}function MW({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,pathname:i,redirectTo:l,view:u,otpSeparators:d=0,setIsSubmitting:f}){const{basePath:m,credentials:p,localization:g,magicLink:y,emailOTP:b,signUp:S,twoFactor:w,viewPaths:R,replace:E}=A.useContext(ht),T=!!S;if(a={...g,...a},A.useEffect(()=>{i&&!i_(R,i)&&(console.error(`Invalid auth view: ${i}`),E(`${m}/${R.SIGN_IN}${window.location.search}`))},[i,R,m,E]),u=u||i_(R,i)||"SIGN_IN",A.useEffect(()=>{let O=!1;u==="MAGIC_LINK"&&(!y||!p&&!b)&&(O=!0),u==="EMAIL_OTP"&&(!b||!p&&!y)&&(O=!0),u==="SIGN_UP"&&!T&&(O=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(u)&&(O=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(u)&&!w&&(O=!0),O&&E(`${m}/${R.SIGN_IN}${window.location.search}`)},[m,u,R,p,E,b,T,y,w]),u==="SIGN_OUT")return x.jsx(mM,{redirectTo:l});if(u==="CALLBACK")return x.jsx(pM,{redirectTo:l});if(u==="SIGN_IN")return p?x.jsx(IW,{className:e,classNames:t,localization:a,redirectTo:l,isSubmitting:r,setIsSubmitting:f}):y?x.jsx(qO,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:l,isSubmitting:r,setIsSubmitting:f}):b?x.jsx(BO,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:l,isSubmitting:r,setIsSubmitting:f}):null;if(u==="TWO_FACTOR")return x.jsx(kW,{className:e,classNames:t,localization:a,otpSeparators:d,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(u==="RECOVER_ACCOUNT")return x.jsx(CW,{className:e,classNames:t,localization:a,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(u==="MAGIC_LINK")return x.jsx(qO,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(u==="EMAIL_OTP")return x.jsx(BO,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(u==="EMAIL_VERIFICATION")return x.jsx(TW,{className:e,classNames:t,callbackURL:n,localization:a,otpSeparators:d,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(u==="FORGOT_PASSWORD")return x.jsx(OW,{className:e,classNames:t,localization:a,isSubmitting:r,setIsSubmitting:f});if(u==="RESET_PASSWORD")return x.jsx(AW,{className:e,classNames:t,localization:a});if(u==="SIGN_UP")return T&&x.jsx(NW,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:l,isSubmitting:r,setIsSubmitting:f})}function PW({className:e,classNames:t,localization:n}){const{localization:r,redirectTo:a,replace:i,toast:l}=A.useContext(ht),u=A.useMemo(()=>({...r,...n}),[r,n]),{data:d}=LY(),[f,m]=A.useState(null);return A.useEffect(()=>{const p=Ui("invitationId");if(!p){l({variant:"error",message:u.INVITATION_NOT_FOUND}),i(a);return}m(p)},[u.INVITATION_NOT_FOUND,l,i,a]),!d||!f?x.jsx(gM,{className:e,classNames:t}):x.jsx(DW,{className:e,classNames:t,localization:u,invitationId:f})}function DW({className:e,classNames:t,localization:n,invitationId:r}){var a;const{authClient:i,hooks:{useInvitation:l},localization:u,organization:d,redirectTo:f,replace:m,toast:p,localizeErrors:g}=A.useContext(ht),y=A.useMemo(()=>({...u,...n}),[u,n]),[b,S]=A.useState(!1),[w,R]=A.useState(!1),E=b||w,{data:T,isPending:O}=l({query:{id:r}}),C=A.useCallback(()=>Ui("redirectTo")||f,[f]);A.useEffect(()=>{if(!(O||!r)){if(!T){p({variant:"error",message:y.INVITATION_NOT_FOUND}),m(f);return}(T.status!=="pending"||new Date(T.expiresAt)<new Date)&&(p({variant:"error",message:new Date(T.expiresAt)<new Date?y.INVITATION_EXPIRED:y.INVITATION_NOT_FOUND}),m(f))}},[T,O,r,y,p,m,f]);const I=async()=>{R(!0);try{await i.organization.acceptInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:y.INVITATION_ACCEPTED||"Invitation accepted"}),m(C())}catch(F){p({variant:"error",message:wn({error:F,localization:y,localizeErrors:g})}),R(!1)}},N=async()=>{S(!0);try{await i.organization.rejectInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:y.INVITATION_REJECTED}),m(f)}catch(F){p({variant:"error",message:wn({error:F,localization:y,localizeErrors:g})}),S(!1)}},K=((a=[...[{role:"owner",label:y.OWNER},{role:"admin",label:y.ADMIN},{role:"member",label:y.MEMBER}],...d?.customRoles||[]].find(F=>F.role===T?.role))==null?void 0:a.label)||T?.role;return T?x.jsxs(sd,{className:Ce("w-full max-w-sm",e,t?.base),children:[x.jsxs(g1,{className:Ce("justify-items-center text-center",t?.header),children:[x.jsx(aM,{className:Ce("text-lg md:text-xl",t?.title),children:y.ACCEPT_INVITATION}),x.jsx(sM,{className:Ce("text-xs md:text-sm",t?.description),children:y.ACCEPT_INVITATION_DESCRIPTION})]}),x.jsxs(v1,{className:Ce("flex flex-col gap-6 truncate",t?.content),children:[x.jsxs(sd,{className:Ce("flex-row items-center p-4"),children:[x.jsx(hM,{organization:{id:T.organizationId,name:T.organizationName,slug:T.organizationSlug,logo:T.organizationLogo,createdAt:new Date},localization:y}),x.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:K})]}),x.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[x.jsxs(Wt,{variant:"outline",className:Ce(t?.button,t?.outlineButton),onClick:N,disabled:E,children:[b?x.jsx(mr,{className:"animate-spin"}):x.jsx(MF,{}),y.REJECT]}),x.jsxs(Wt,{className:Ce(t?.button,t?.primaryButton),onClick:I,disabled:E,children:[w?x.jsx(mr,{className:"animate-spin"}):x.jsx(nN,{}),y.ACCEPT]})]})]})]}):x.jsx(gM,{className:e,classNames:t})}var gM=({className:e,classNames:t,localization:n})=>x.jsxs(sd,{className:Ce("w-full max-w-sm",e,t?.base),children:[x.jsxs(g1,{className:Ce("justify-items-center",t?.header),children:[x.jsx(za,{className:Ce("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),x.jsx(za,{className:Ce("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),x.jsxs(v1,{className:Ce("flex flex-col gap-6 truncate",t?.content),children:[x.jsxs(sd,{className:Ce("flex-row items-center p-4"),children:[x.jsx(hM,{isPending:!0,localization:n}),x.jsx(za,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),x.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[x.jsx(za,{className:"h-9 w-full"}),x.jsx(za,{className:"h-9 w-full"})]})]})]});function HO({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return x.jsx(DY,{"data-slot":"separator",decorative:n,orientation:t,className:Ce("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function LW({classNames:e,isSubmitting:t,localization:n,view:r}){var a,i,l,u;const{viewPaths:d,navigate:f,basePath:m}=A.useContext(ht);return x.jsxs(Wt,{className:Ce("w-full",(a=e?.form)==null?void 0:a.button,(i=e?.form)==null?void 0:i.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${m}/${r==="EMAIL_OTP"?d.SIGN_IN:d.EMAIL_OTP}${window.location.search}`),children:[r==="EMAIL_OTP"?x.jsx(rN,{className:(l=e?.form)==null?void 0:l.icon}):x.jsx(oN,{className:(u=e?.form)==null?void 0:u.icon}),n.SIGN_IN_WITH," ",r==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function jW({classNames:e,isSubmitting:t,localization:n,view:r}){var a,i,l,u;const{viewPaths:d,navigate:f,basePath:m,credentials:p}=A.useContext(ht);return x.jsxs(Wt,{className:Ce("w-full",(a=e?.form)==null?void 0:a.button,(i=e?.form)==null?void 0:i.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${m}/${r==="MAGIC_LINK"||!p?d.SIGN_IN:d.MAGIC_LINK}${window.location.search}`),children:[r==="MAGIC_LINK"?x.jsx(rN,{className:(l=e?.form)==null?void 0:l.icon}):x.jsx(oN,{className:(u=e?.form)==null?void 0:u.icon}),n.SIGN_IN_WITH," ",r==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function $W({localization:e,redirectTo:t}){const{authClient:n,localization:r,toast:a,localizeErrors:i}=A.useContext(ht),l=A.useRef(!1);e=A.useMemo(()=>({...r,...e}),[r,e]);const{onSuccess:u}=pa({redirectTo:t});return A.useEffect(()=>{if(!l.current){l.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:u}})}catch(d){a({variant:"error",message:wn({error:d,localization:e,localizeErrors:i})})}}},[n,e,i,u,a]),null}function UW({classNames:e,isSubmitting:t,localization:n,redirectTo:r,setIsSubmitting:a}){var i,l;const{authClient:u,localization:d,toast:f,localizeErrors:m}=A.useContext(ht);n={...d,...n};const{onSuccess:p}=pa({redirectTo:r}),g=async()=>{a?.(!0);try{const y=await u.signIn.passkey({fetchOptions:{throw:!0}});y?.error?(f({variant:"error",message:wn({error:y.error,localization:n,localizeErrors:m})}),a?.(!1)):p()}catch(y){f({variant:"error",message:wn({error:y,localization:n,localizeErrors:m})}),a?.(!1)}};return x.jsxs(Wt,{className:Ce("w-full",(i=e?.form)==null?void 0:i.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:g,children:[x.jsx(CF,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function GO({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,other:i,provider:l,redirectTo:u,socialLayout:d,setIsSubmitting:f}){var m,p,g,y;const{authClient:b,basePath:S,baseURL:w,persistClient:R,redirectTo:E,viewPaths:T,social:O,genericOAuth:C,toast:I,localizeErrors:N}=A.useContext(ht),P=A.useCallback(()=>u||Ui("redirectTo")||E,[u,E]),$=A.useCallback(()=>`${w}${n||(R?`${S}/${T.CALLBACK}?redirectTo=${encodeURIComponent(P())}`:P())}`,[n,R,S,T,w,P]),K=async()=>{f(!0);try{if(i){const F={providerId:l.provider,callbackURL:$(),fetchOptions:{throw:!0}};C?.signIn?(await C.signIn(F),setTimeout(()=>{f(!1)},1e4)):await b.signIn.oauth2(F)}else{const F={provider:l.provider,callbackURL:$(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(F),setTimeout(()=>{f(!1)},1e4)):await b.signIn.social(F)}}catch(F){I({variant:"error",message:wn({error:F,localization:a,localizeErrors:N})}),f(!1)}};return x.jsxs(Wt,{className:Ce(d==="vertical"?"w-full":"grow",e,(m=t?.form)==null?void 0:m.button,(p=t?.form)==null?void 0:p.outlineButton,(g=t?.form)==null?void 0:g.providerButton),disabled:r,variant:"outline",onClick:K,children:[l.icon&&x.jsx(l.icon,{className:(y=t?.form)==null?void 0:y.icon}),d==="grid"&&l.name,d==="vertical"&&`${a.SIGN_IN_WITH} ${l.name}`]})}function Lre({className:e,classNames:t,callbackURL:n,cardHeader:r,cardFooter:a,localization:i,path:l,pathname:u,redirectTo:d,socialLayout:f="auto",view:m,otpSeparators:p=0}){var g,y,b,S,w,R;const E=Ka(),{basePath:T,credentials:O,localization:C,magicLink:I,emailOTP:N,oneTap:P,passkey:$,signUp:K,social:F,genericOAuth:G,viewPaths:U,Link:J}=A.useContext(ht);i={...C,...i};let le=f;le==="auto"&&(le=O&&F?.providers&&F.providers.length>2?"horizontal":"vertical");const B=l??u?.split("/").pop(),Y=m||i_(U,B)||"SIGN_IN",[W,he]=A.useState(!1);if(A.useEffect(()=>{const M=()=>he(!1);return window.addEventListener("pagehide",M),()=>{he(!1),window.removeEventListener("pagehide",M)}},[]),Y==="CALLBACK")return x.jsx(pM,{redirectTo:d});if(Y==="SIGN_OUT")return x.jsx(mM,{redirectTo:d});if(Y==="ACCEPT_INVITATION")return x.jsx(PW,{className:e,classNames:t});const ae=!O&&!I&&!N?i.DISABLED_CREDENTIALS_DESCRIPTION:i[`${Y}_DESCRIPTION`];return x.jsxs(sd,{className:Ce("w-full max-w-sm",e,t?.base),children:[x.jsx(g1,{className:t?.header,children:r||x.jsxs(x.Fragment,{children:[x.jsx(aM,{className:Ce("text-lg md:text-xl",t?.title),children:i[Y]}),ae&&x.jsx(sM,{className:Ce("text-xs md:text-sm",t?.description),children:ae})]})}),x.jsxs(v1,{className:Ce("grid gap-6",t?.content),children:[P&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(Y)&&x.jsx($W,{localization:i,redirectTo:d}),(O||I||N)&&x.jsxs("div",{className:"grid gap-4",children:[x.jsx(MW,{classNames:t?.form,callbackURL:n,isSubmitting:W,localization:i,otpSeparators:p,view:Y,redirectTo:d,setIsSubmitting:he}),I&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(Y)||N&&Y==="EMAIL_OTP")&&x.jsx(jW,{classNames:t,localization:i,view:Y,isSubmitting:W}),N&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(Y)||I&&["SIGN_IN","MAGIC_LINK"].includes(Y))&&x.jsx(LW,{classNames:t,localization:i,view:Y,isSubmitting:W})]}),Y!=="RESET_PASSWORD"&&Y!=="EMAIL_VERIFICATION"&&(((g=F?.providers)==null?void 0:g.length)||((y=G?.providers)==null?void 0:y.length)||Y==="SIGN_IN"&&$)&&x.jsxs(x.Fragment,{children:[(O||I||N)&&x.jsxs("div",{className:Ce("flex items-center gap-2",t?.continueWith),children:[x.jsx(HO,{className:Ce("!w-auto grow",t?.separator)}),x.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:i.OR_CONTINUE_WITH}),x.jsx(HO,{className:Ce("!w-auto grow",t?.separator)})]}),x.jsxs("div",{className:"grid gap-4",children:[(((b=F?.providers)==null?void 0:b.length)||((S=G?.providers)==null?void 0:S.length))&&x.jsxs("div",{className:Ce("flex w-full items-center justify-between gap-4",le==="horizontal"&&"flex-wrap",le==="vertical"&&"flex-col",le==="grid"&&"grid grid-cols-2"),children:[(w=F?.providers)==null?void 0:w.map(M=>{const q=yW.find(V=>V.provider===M);return q?x.jsx(GO,{classNames:t,callbackURL:n,isSubmitting:W,localization:i,provider:q,redirectTo:d,setIsSubmitting:he,socialLayout:le},M):null}),(R=G?.providers)==null?void 0:R.map(M=>x.jsx(GO,{classNames:t,callbackURL:n,isSubmitting:W,localization:i,provider:M,redirectTo:d,setIsSubmitting:he,socialLayout:le,other:!0},M.provider))]}),$&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(Y)&&x.jsx(UW,{classNames:t,isSubmitting:W,localization:i,redirectTo:d,setIsSubmitting:he})]})]})]}),a&&x.jsx(FO,{className:t?.footer,children:a}),O&&K&&x.jsxs(FO,{className:Ce("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[Y==="SIGN_IN"||Y==="MAGIC_LINK"||Y==="EMAIL_OTP"?i.DONT_HAVE_AN_ACCOUNT:Y==="SIGN_UP"?i.ALREADY_HAVE_AN_ACCOUNT:x.jsx(EF,{className:"size-3"}),Y==="SIGN_IN"||Y==="MAGIC_LINK"||Y==="EMAIL_OTP"||Y==="SIGN_UP"?x.jsx(J,{className:Ce("text-foreground underline",t?.footerLink),href:`${T}/${U[Y==="SIGN_IN"||Y==="MAGIC_LINK"||Y==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${E?window.location.search:""}`,children:x.jsx(Wt,{variant:"link",size:"sm",className:Ce("px-0 text-foreground underline",t?.footerLink),children:Y==="SIGN_IN"||Y==="MAGIC_LINK"||Y==="EMAIL_OTP"?i.SIGN_UP:i.SIGN_IN})}):x.jsx(Wt,{variant:"link",size:"sm",className:Ce("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:i.GO_BACK})]})]})}function jre({children:e}){const{hooks:{useSession:t}}=A.useContext(ht),{isPending:n}=t();return n?e:null}function $re({children:e}){const{hooks:{useSession:t}}=A.useContext(ht),{data:n}=t();return n?e:null}function Ure({children:e}){const{hooks:{useSession:t}}=A.useContext(ht),{data:n,isPending:r}=t();return!n&&!r?e:null}function zW(e){const t=pc.c(8),{children:n}=e,r=mc();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={basePath:"/",pathMode:"slug"},t[0]=a):a=t[0];let i,l;t[1]!==r?(i=d=>r({to:d}),l=d=>r({to:d,replace:!0}),t[1]=r,t[2]=i,t[3]=l):(i=t[2],l=t[3]);let u;return t[4]!==n||t[5]!==i||t[6]!==l?(u=x.jsx(_F,{authClient:xj,organization:a,navigate:i,replace:l,Link:FW,children:n}),t[4]=n,t[5]=i,t[6]=l,t[7]=u):u=t[7],u}function FW(e){const{href:t,className:n,children:r,...a}=e;return x.jsx(Om,{to:t,className:n,...a,children:r})}async function VW(){const e=await fetch("/api/config");if(!e.ok)throw new Error("Failed to load public configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load public configuration");return t.config}function BW(e){if(!e)return;const t=document.getElementById("mesh-theme-overrides");t&&t.remove();const n=[];if(e.light&&Object.keys(e.light).length>0){const r=Object.entries(e.light).map(([a,i])=>` ${a}: ${i};`).join(`
|
|
156
|
+
`);n.push(`:root {
|
|
157
|
+
${r}
|
|
158
|
+
}`)}if(e.dark&&Object.keys(e.dark).length>0){const r=Object.entries(e.dark).map(([a,i])=>` ${a}: ${i};`).join(`
|
|
159
|
+
`);n.push(`.dark {
|
|
160
|
+
${r}
|
|
161
|
+
}`)}if(n.length>0){const r=document.createElement("style");r.id="mesh-theme-overrides",r.textContent=n.join(`
|
|
162
|
+
|
|
163
|
+
`),document.head.appendChild(r)}}function qW(e){const t=pc.c(6),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:KC.publicConfig(),queryFn:VW,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=ZC(r);let i,l;t[1]!==a.theme?(i=()=>{BW(a.theme)},l=[a.theme],t[1]=a.theme,t[2]=i,t[3]=l):(i=t[2],l=t[3]),A.useLayoutEffect(i,l);let u;return t[4]!==n?(u=x.jsx(x.Fragment,{children:n}),t[4]=n,t[5]=u):u=t[5],u}function vM(){const e=pc.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=x.jsx("div",{className:"flex items-center justify-center min-h-screen",children:x.jsx("div",{className:"text-gray-500",children:"Loading..."})}),e[0]=t):t=e[0],t}const HW=new i5;function GW(e){const t=pc.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=x.jsx(Yz,{}),t[0]=r):r=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=x.jsx(vM,{}),t[1]=a):a=t[1];let i;return t[2]!==n?(i=x.jsxs(c5,{client:HW,children:[r,x.jsx(A.Suspense,{fallback:a,children:x.jsx(qW,{children:x.jsx(E5,{children:x.jsx(zW,{children:n})})})})]}),t[2]=n,t[3]=i):i=t[3],i}const ZW=function(){return null};var KW=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const a=e.number||Ze();a instanceof Ga&&(e.number=a.int())}}},YW=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=je(n):typeof n=="number"?e.number=je(n):typeof n=="boolean"?e.boolean=je(n):n===null?e.null=md():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},WW=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?md():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return je(e[0]);if(t==="string")return sn(e);if(t==="number"){const[n,r,...a]=e;return Lt([je(n),je(r),...a.map(i=>je(i))])}return t==="boolean"?Lt([je(!0),je(!1)]):!1}},QW=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=jU();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)),e.file=r,e.string=!1}}},XW=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=L())}},JW=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||L();r instanceof Dm&&(e.string=r.refine(a=>Array.from(a).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},eQ=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||L();r instanceof Dm&&(e.string=r.refine(a=>Array.from(a).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},tQ=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||L();if(r instanceof Dm){const a=new RegExp(n.pattern);e.string=r.regex(a)}}}},nQ=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||Ze();r instanceof Ga&&(e.number=r.min(n.minimum))}}},rQ=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||Ze();r instanceof Ga&&(e.number=r.max(n.maximum))}}},oQ=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||Ze();r instanceof Ga&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},aQ=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||Ze();r instanceof Ga&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},sQ=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||Ze();r instanceof Ga&&(e.number=r.refine(a=>{if(n.multipleOf===0)return!1;const i=a/n.multipleOf,l=Math.round(i),u=Math.min(Math.abs(a)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(i-l)<=u/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},iQ=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=Oe(eo()))}},lQ=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||Oe(eo())).min(n.minItems))}},cQ=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||Oe(eo())).max(n.maxItems))}},uQ=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||Oe(eo());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=pr(n.items);let a=Oe(r);if(e.array&&e.array instanceof VI){const i=e.array._def;i.checks&&i.checks.forEach(l=>{if(l._zod&&l._zod.def){const u=l._zod.def;u.check==="min_length"&&u.minimum!==void 0?a=a.min(u.minimum):u.check==="max_length"&&u.maximum!==void 0&&(a=a.max(u.maximum))}})}e.array=a}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||Oe(eo()):e.array=Oe(eo()).max(0):(typeof n.items=="boolean"&&n.items===!0||n.prefixItems)&&(e.array=e.array||Oe(eo()))}},dQ=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(i=>pr(i));let a;r.length===0?a=lT([]):a=lT(r),n.minItems!==void 0&&n.minItems>r.length&&(a=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(a=!1),e.tuple=a,e.array=!1}},fQ=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||pe({}).passthrough())}},hQ=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=pe({}).passthrough())}},pQ=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||pe({}).passthrough();e.object=r.refine(a=>Object.keys(a).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},mQ=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||pe({}).passthrough();e.object=r.refine(a=>Object.keys(a).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function ld(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>ld(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(a=>r.includes(a)&&ld(e[a],t[a]))}return!1}function gQ(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(a=>ld(n,a))?!1:(t.push(n),!0))}}function om(e,t){return e.safeParse(t).success}var vQ=class{apply(e,t){if(!t.not)return e;const n=pr(t.not);return e.refine(r=>!om(n,r),{message:"Value must not match the 'not' schema"})}},yQ=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(gQ(),{message:"Array items must be unique"})}},_Q=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>pr(r)).reduce((r,a)=>gd(r,a),e)}},bQ=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?pr(t.anyOf[0]):Lt([pr(t.anyOf[0]),pr(t.anyOf[1]),...t.anyOf.slice(2).map(r=>pr(r))]);return gd(e,n)}},wQ=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>pr(r));return e.refine(r=>{let a=0;for(const i of n)if(i.safeParse(r).success&&(a++,a>1))return!1;return a===1},{message:"Value must match exactly one of the oneOf schemas"})}},SQ=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const a=n.prefixItems.map(i=>pr(i));return e.refine(i=>{if(!Array.isArray(i))return!0;for(let l=0;l<Math.min(i.length,a.length);l++)if(!om(a[l],i[l]))return!1;if(i.length>a.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const l=pr(n.items);for(let u=a.length;u<i.length;u++)if(!om(l,i[u]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},EQ=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof Lm||e instanceof HI){const r={};if(n.properties)for(const[a,i]of Object.entries(n.properties))i!==void 0&&(r[a]=pr(i));if(n.required&&Array.isArray(n.required)){const a=new Set(n.required);for(const i of Object.keys(r))a.has(i)||(r[i]=r[i].optional())}else for(const a of Object.keys(r))r[a]=r[a].optional();return n.additionalProperties===!1?pe(r):pe(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[a,i]of Object.entries(n.properties))if(i!==void 0&&Object.getOwnPropertyDescriptor(r,a)!==void 0&&!pr(i).safeParse(r[a]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const a of n.required)if(!(Object.getOwnPropertyDescriptor(r,a)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const a=new Set(Object.keys(n.properties));for(const i in r)if(!a.has(i))return!1}return!0},{message:"Object constraints validation failed"})}},RQ=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(a=>ld(r,a)),{message:"Value must match one of the enum values"})}},xQ=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>ld(r,n),{message:"Value must equal the const value"})}},TQ=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},OQ=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:eo().refine(a=>this.validateRequired(a,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},CQ=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const a=pr(r.contains),i=(n=r.minContains)!=null?n:1,l=r.maxContains;return e.refine(u=>{if(!Array.isArray(u))return!0;let d=0;for(const f of u)om(a,f)&&d++;return!(d<i||l!==void 0&&d>l)},{message:"Array must contain required items matching the schema"})}},AQ=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},IQ=[new YW,new WW,new KW,new QW,new XW,new iQ,new hQ,new JW,new eQ,new tQ,new nQ,new rQ,new oQ,new aQ,new sQ,new dQ,new lQ,new cQ,new uQ,new pQ,new mQ,new fQ],NQ=[new OQ,new RQ,new xQ,new _Q,new bQ,new wQ,new SQ,new EQ,new CQ,new vQ,new yQ,new AQ,new TQ];function pr(e){if(typeof e=="boolean")return e?eo():Fp();const t={};for(const a of IQ)a.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||L()),t.number!==!1&&n.push(t.number||Ze()),t.boolean!==!1&&n.push(t.boolean||ut()),t.null!==!1&&n.push(t.null||md()),t.array!==!1&&n.push(t.array||Oe(eo())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const a=YI(i=>typeof i=="object"&&i!==null&&!Array.isArray(i),"Must be an object, not an array");n.push(a)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Fp():n.length===1?r=n[0]:Object.keys(e).some(i=>i!=="$schema"&&i!=="title"&&i!=="description")?r=Lt(n):r=eo();for(const a of NQ)r=a.apply(r,e);return r}function Ym(e){return!!e._zod}function Cs(e,t){return Ym(e)?YA(e,t):e.safeParse(t)}function yM(e){if(!e)return;let t;if(Ym(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function kQ(e){if(Ym(e)){const i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}const n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}const r=e.value;if(r!==void 0)return r}const Wm="2025-11-25",MQ=[Wm,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],wi="io.modelcontextprotocol/related-task",Qm="2.0",sr=YI(e=>e!==null&&(typeof e=="object"||typeof e=="function")),_M=Lt([L(),Ze().int()]),bM=L();ar({ttl:Lt([Ze(),md()]).optional(),pollInterval:Ze().optional()});const PQ=pe({ttl:Ze().optional()}),DQ=pe({taskId:L()}),S1=ar({progressToken:_M.optional(),[wi]:DQ.optional()}),oo=pe({_meta:S1.optional()}),Ad=oo.extend({task:PQ.optional()}),LQ=e=>Ad.safeParse(e).success,lr=pe({method:L(),params:oo.loose().optional()}),xo=pe({_meta:S1.optional()}),To=pe({method:L(),params:xo.loose().optional()}),cr=ar({_meta:S1.optional()}),Xm=Lt([L(),Ze().int()]),wM=pe({jsonrpc:je(Qm),id:Xm,...lr.shape}).strict(),D_=e=>wM.safeParse(e).success,SM=pe({jsonrpc:je(Qm),...To.shape}).strict(),jQ=e=>SM.safeParse(e).success,E1=pe({jsonrpc:je(Qm),id:Xm,result:cr}).strict(),ku=e=>E1.safeParse(e).success;var ot;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(ot||(ot={}));const R1=pe({jsonrpc:je(Qm),id:Xm.optional(),error:pe({code:Ze().int(),message:L(),data:kt().optional()})}).strict(),$Q=e=>R1.safeParse(e).success,qu=Lt([wM,SM,E1,R1]);Lt([E1,R1]);const Zl=cr.strict(),UQ=xo.extend({requestId:Xm.optional(),reason:L().optional()}),x1=To.extend({method:je("notifications/cancelled"),params:UQ}),zQ=pe({src:L(),mimeType:L().optional(),sizes:Oe(L()).optional(),theme:sn(["light","dark"]).optional()}),Id=pe({icons:Oe(zQ).optional()}),lc=pe({name:L(),title:L().optional()}),EM=lc.extend({...lc.shape,...Id.shape,version:L(),websiteUrl:L().optional(),description:L().optional()}),FQ=gd(pe({applyDefaults:ut().optional()}),Ft(L(),kt())),VQ=Cb(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,gd(pe({form:FQ.optional(),url:sr.optional()}),Ft(L(),kt()).optional())),BQ=ar({list:sr.optional(),cancel:sr.optional(),requests:ar({sampling:ar({createMessage:sr.optional()}).optional(),elicitation:ar({create:sr.optional()}).optional()}).optional()}),qQ=ar({list:sr.optional(),cancel:sr.optional(),requests:ar({tools:ar({call:sr.optional()}).optional()}).optional()}),HQ=pe({experimental:Ft(L(),sr).optional(),sampling:pe({context:sr.optional(),tools:sr.optional()}).optional(),elicitation:VQ.optional(),roots:pe({listChanged:ut().optional()}).optional(),tasks:BQ.optional()}),GQ=oo.extend({protocolVersion:L(),capabilities:HQ,clientInfo:EM}),ZQ=lr.extend({method:je("initialize"),params:GQ}),KQ=pe({experimental:Ft(L(),sr).optional(),logging:sr.optional(),completions:sr.optional(),prompts:pe({listChanged:ut().optional()}).optional(),resources:pe({subscribe:ut().optional(),listChanged:ut().optional()}).optional(),tools:pe({listChanged:ut().optional()}).optional(),tasks:qQ.optional()}),RM=cr.extend({protocolVersion:L(),capabilities:KQ,serverInfo:EM,instructions:L().optional()}),xM=To.extend({method:je("notifications/initialized"),params:xo.optional()}),YQ=e=>xM.safeParse(e).success,T1=lr.extend({method:je("ping"),params:oo.optional()}),WQ=pe({progress:Ze(),total:pn(Ze()),message:pn(L())}),QQ=pe({...xo.shape,...WQ.shape,progressToken:_M}),O1=To.extend({method:je("notifications/progress"),params:QQ}),XQ=oo.extend({cursor:bM.optional()}),Nd=lr.extend({params:XQ.optional()}),kd=cr.extend({nextCursor:bM.optional()}),JQ=sn(["working","input_required","completed","failed","cancelled"]),Md=pe({taskId:L(),status:JQ,ttl:Lt([Ze(),md()]),createdAt:L(),lastUpdatedAt:L(),pollInterval:pn(Ze()),statusMessage:pn(L())}),cd=cr.extend({task:Md}),eX=xo.merge(Md),am=To.extend({method:je("notifications/tasks/status"),params:eX}),C1=lr.extend({method:je("tasks/get"),params:oo.extend({taskId:L()})}),A1=cr.merge(Md),I1=lr.extend({method:je("tasks/result"),params:oo.extend({taskId:L()})});cr.loose();const N1=Nd.extend({method:je("tasks/list")}),k1=kd.extend({tasks:Oe(Md)}),M1=lr.extend({method:je("tasks/cancel"),params:oo.extend({taskId:L()})}),tX=cr.merge(Md),TM=pe({uri:L(),mimeType:pn(L()),_meta:Ft(L(),kt()).optional()}),OM=TM.extend({text:L()}),P1=L().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),CM=TM.extend({blob:P1}),Pd=sn(["user","assistant"]),wc=pe({audience:Oe(Pd).optional(),priority:Ze().min(0).max(1).optional(),lastModified:$I({offset:!0}).optional()}),AM=pe({...lc.shape,...Id.shape,uri:L(),description:pn(L()),mimeType:pn(L()),annotations:wc.optional(),_meta:pn(ar({}))}),nX=pe({...lc.shape,...Id.shape,uriTemplate:L(),description:pn(L()),mimeType:pn(L()),annotations:wc.optional(),_meta:pn(ar({}))}),rX=Nd.extend({method:je("resources/list")}),IM=kd.extend({resources:Oe(AM)}),oX=Nd.extend({method:je("resources/templates/list")}),NM=kd.extend({resourceTemplates:Oe(nX)}),D1=oo.extend({uri:L()}),aX=D1,sX=lr.extend({method:je("resources/read"),params:aX}),kM=cr.extend({contents:Oe(Lt([OM,CM]))}),MM=To.extend({method:je("notifications/resources/list_changed"),params:xo.optional()}),iX=D1,lX=lr.extend({method:je("resources/subscribe"),params:iX}),cX=D1,uX=lr.extend({method:je("resources/unsubscribe"),params:cX}),dX=xo.extend({uri:L()}),fX=To.extend({method:je("notifications/resources/updated"),params:dX}),hX=pe({name:L(),description:pn(L()),required:pn(ut())}),pX=pe({...lc.shape,...Id.shape,description:pn(L()),arguments:pn(Oe(hX)),_meta:pn(ar({}))}),mX=Nd.extend({method:je("prompts/list")}),PM=kd.extend({prompts:Oe(pX)}),gX=oo.extend({name:L(),arguments:Ft(L(),L()).optional()}),vX=lr.extend({method:je("prompts/get"),params:gX}),L1=pe({type:je("text"),text:L(),annotations:wc.optional(),_meta:Ft(L(),kt()).optional()}),j1=pe({type:je("image"),data:P1,mimeType:L(),annotations:wc.optional(),_meta:Ft(L(),kt()).optional()}),$1=pe({type:je("audio"),data:P1,mimeType:L(),annotations:wc.optional(),_meta:Ft(L(),kt()).optional()}),yX=pe({type:je("tool_use"),name:L(),id:L(),input:Ft(L(),kt()),_meta:Ft(L(),kt()).optional()}),_X=pe({type:je("resource"),resource:Lt([OM,CM]),annotations:wc.optional(),_meta:Ft(L(),kt()).optional()}),bX=AM.extend({type:je("resource_link")}),U1=Lt([L1,j1,$1,bX,_X]),wX=pe({role:Pd,content:U1}),DM=cr.extend({description:L().optional(),messages:Oe(wX)}),LM=To.extend({method:je("notifications/prompts/list_changed"),params:xo.optional()}),SX=pe({title:L().optional(),readOnlyHint:ut().optional(),destructiveHint:ut().optional(),idempotentHint:ut().optional(),openWorldHint:ut().optional()}),EX=pe({taskSupport:sn(["required","optional","forbidden"]).optional()}),jM=pe({...lc.shape,...Id.shape,description:L().optional(),inputSchema:pe({type:je("object"),properties:Ft(L(),sr).optional(),required:Oe(L()).optional()}).catchall(kt()),outputSchema:pe({type:je("object"),properties:Ft(L(),sr).optional(),required:Oe(L()).optional()}).catchall(kt()).optional(),annotations:SX.optional(),execution:EX.optional(),_meta:Ft(L(),kt()).optional()}),RX=Nd.extend({method:je("tools/list")}),z1=kd.extend({tools:Oe(jM)}),Jm=cr.extend({content:Oe(U1).default([]),structuredContent:Ft(L(),kt()).optional(),isError:ut().optional()});Jm.or(cr.extend({toolResult:kt()}));const xX=Ad.extend({name:L(),arguments:Ft(L(),kt()).optional()}),TX=lr.extend({method:je("tools/call"),params:xX}),$M=To.extend({method:je("notifications/tools/list_changed"),params:xo.optional()}),OX=pe({autoRefresh:ut().default(!0),debounceMs:Ze().int().nonnegative().default(300)}),UM=sn(["debug","info","notice","warning","error","critical","alert","emergency"]),CX=oo.extend({level:UM}),AX=lr.extend({method:je("logging/setLevel"),params:CX}),IX=xo.extend({level:UM,logger:L().optional(),data:kt()}),NX=To.extend({method:je("notifications/message"),params:IX}),kX=pe({name:L().optional()}),MX=pe({hints:Oe(kX).optional(),costPriority:Ze().min(0).max(1).optional(),speedPriority:Ze().min(0).max(1).optional(),intelligencePriority:Ze().min(0).max(1).optional()}),PX=pe({mode:sn(["auto","required","none"]).optional()}),DX=pe({type:je("tool_result"),toolUseId:L().describe("The unique identifier for the corresponding tool call."),content:Oe(U1).default([]),structuredContent:pe({}).loose().optional(),isError:ut().optional(),_meta:Ft(L(),kt()).optional()}),LX=qI("type",[L1,j1,$1]),sm=qI("type",[L1,j1,$1,yX,DX]),jX=pe({role:Pd,content:Lt([sm,Oe(sm)]),_meta:Ft(L(),kt()).optional()}),$X=Ad.extend({messages:Oe(jX),modelPreferences:MX.optional(),systemPrompt:L().optional(),includeContext:sn(["none","thisServer","allServers"]).optional(),temperature:Ze().optional(),maxTokens:Ze().int(),stopSequences:Oe(L()).optional(),metadata:sr.optional(),tools:Oe(jM).optional(),toolChoice:PX.optional()}),zM=lr.extend({method:je("sampling/createMessage"),params:$X}),FM=cr.extend({model:L(),stopReason:pn(sn(["endTurn","stopSequence","maxTokens"]).or(L())),role:Pd,content:LX}),UX=cr.extend({model:L(),stopReason:pn(sn(["endTurn","stopSequence","maxTokens","toolUse"]).or(L())),role:Pd,content:Lt([sm,Oe(sm)])}),zX=pe({type:je("boolean"),title:L().optional(),description:L().optional(),default:ut().optional()}),FX=pe({type:je("string"),title:L().optional(),description:L().optional(),minLength:Ze().optional(),maxLength:Ze().optional(),format:sn(["email","uri","date","date-time"]).optional(),default:L().optional()}),VX=pe({type:sn(["number","integer"]),title:L().optional(),description:L().optional(),minimum:Ze().optional(),maximum:Ze().optional(),default:Ze().optional()}),BX=pe({type:je("string"),title:L().optional(),description:L().optional(),enum:Oe(L()),default:L().optional()}),qX=pe({type:je("string"),title:L().optional(),description:L().optional(),oneOf:Oe(pe({const:L(),title:L()})),default:L().optional()}),HX=pe({type:je("string"),title:L().optional(),description:L().optional(),enum:Oe(L()),enumNames:Oe(L()).optional(),default:L().optional()}),GX=Lt([BX,qX]),ZX=pe({type:je("array"),title:L().optional(),description:L().optional(),minItems:Ze().optional(),maxItems:Ze().optional(),items:pe({type:je("string"),enum:Oe(L())}),default:Oe(L()).optional()}),KX=pe({type:je("array"),title:L().optional(),description:L().optional(),minItems:Ze().optional(),maxItems:Ze().optional(),items:pe({anyOf:Oe(pe({const:L(),title:L()}))}),default:Oe(L()).optional()}),YX=Lt([ZX,KX]),WX=Lt([HX,GX,YX]),QX=Lt([WX,zX,FX,VX]),XX=Ad.extend({mode:je("form").optional(),message:L(),requestedSchema:pe({type:je("object"),properties:Ft(L(),QX),required:Oe(L()).optional()})}),JX=Ad.extend({mode:je("url"),message:L(),elicitationId:L(),url:L().url()}),eJ=Lt([XX,JX]),VM=lr.extend({method:je("elicitation/create"),params:eJ}),tJ=xo.extend({elicitationId:L()}),nJ=To.extend({method:je("notifications/elicitation/complete"),params:tJ}),BM=cr.extend({action:sn(["accept","decline","cancel"]),content:Cb(e=>e===null?void 0:e,Ft(L(),Lt([L(),Ze(),ut(),Oe(L())])).optional())}),rJ=pe({type:je("ref/resource"),uri:L()}),oJ=pe({type:je("ref/prompt"),name:L()}),aJ=oo.extend({ref:Lt([oJ,rJ]),argument:pe({name:L(),value:L()}),context:pe({arguments:Ft(L(),L()).optional()}).optional()}),sJ=lr.extend({method:je("completion/complete"),params:aJ}),qM=cr.extend({completion:ar({values:Oe(L()).max(100),total:pn(Ze().int()),hasMore:pn(ut())})}),iJ=pe({uri:L().startsWith("file://"),name:L().optional(),_meta:Ft(L(),kt()).optional()}),lJ=lr.extend({method:je("roots/list"),params:oo.optional()}),cJ=cr.extend({roots:Oe(iJ)}),uJ=To.extend({method:je("notifications/roots/list_changed"),params:xo.optional()});Lt([T1,ZQ,sJ,AX,vX,mX,rX,oX,sX,lX,uX,TX,RX,C1,I1,N1,M1]);Lt([x1,O1,xM,uJ,am]);Lt([Zl,FM,UX,BM,cJ,A1,k1,cd]);Lt([T1,zM,VM,lJ,C1,I1,N1,M1]);Lt([x1,O1,NX,fX,MM,$M,LM,am,nJ]);Lt([Zl,RM,qM,DM,PM,IM,NM,kM,Jm,z1,A1,k1,cd]);class Qe extends Error{constructor(t,n,r){super(`MCP error ${t}: ${n}`),this.code=t,this.data=r,this.name="McpError"}static fromError(t,n,r){if(t===ot.UrlElicitationRequired&&r){const a=r;if(a.elicitations)return new dJ(a.elicitations,n)}return new Qe(t,n,r)}}class dJ extends Qe{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(ot.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function vi(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function ZO(e){const n=yM(e)?.method;if(!n)throw new Error("Schema is missing a method literal");const r=kQ(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function KO(e,t){const n=Cs(e,t);if(!n.success)throw n.error;return n.data}const fJ=6e4;class hJ{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(x1,n=>{this._oncancel(n)}),this.setNotificationHandler(O1,n=>{this._onprogress(n)}),this.setRequestHandler(T1,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(C1,async(n,r)=>{const a=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!a)throw new Qe(ot.InvalidParams,"Failed to retrieve task: Task not found");return{...a}}),this.setRequestHandler(I1,async(n,r)=>{const a=async()=>{const i=n.params.taskId;if(this._taskMessageQueue){let u;for(;u=await this._taskMessageQueue.dequeue(i,r.sessionId);){if(u.type==="response"||u.type==="error"){const d=u.message,f=d.id,m=this._requestResolvers.get(f);if(m)if(this._requestResolvers.delete(f),u.type==="response")m(d);else{const p=d,g=new Qe(p.error.code,p.error.message,p.error.data);m(g)}else{const p=u.type==="response"?"Response":"Error";this._onerror(new Error(`${p} handler missing for request ${f}`))}continue}await this._transport?.send(u.message,{relatedRequestId:r.requestId})}}const l=await this._taskStore.getTask(i,r.sessionId);if(!l)throw new Qe(ot.InvalidParams,`Task not found: ${i}`);if(!vi(l.status))return await this._waitForTaskUpdate(i,r.signal),await a();if(vi(l.status)){const u=await this._taskStore.getTaskResult(i,r.sessionId);return this._clearTaskQueue(i),{...u,_meta:{...u._meta,[wi]:{taskId:i}}}}return await a()};return await a()}),this.setRequestHandler(N1,async(n,r)=>{try{const{tasks:a,nextCursor:i}=await this._taskStore.listTasks(n.params?.cursor,r.sessionId);return{tasks:a,nextCursor:i,_meta:{}}}catch(a){throw new Qe(ot.InvalidParams,`Failed to list tasks: ${a instanceof Error?a.message:String(a)}`)}}),this.setRequestHandler(M1,async(n,r)=>{try{const a=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!a)throw new Qe(ot.InvalidParams,`Task not found: ${n.params.taskId}`);if(vi(a.status))throw new Qe(ot.InvalidParams,`Cannot cancel task in terminal status: ${a.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(n.params.taskId);const i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new Qe(ot.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(a){throw a instanceof Qe?a:new Qe(ot.InvalidRequest,`Failed to cancel task: ${a instanceof Error?a.message:String(a)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,r,a,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(a,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:i,onTimeout:a})}_resetTimeout(t){const n=this._timeoutInfo.get(t);if(!n)return!1;const r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),Qe.fromError(ot.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){const n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){this._transport=t;const n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};const r=this.transport?.onerror;this._transport.onerror=i=>{r?.(i),this._onerror(i)};const a=this._transport?.onmessage;this._transport.onmessage=(i,l)=>{a?.(i,l),ku(i)||$Q(i)?this._onresponse(i):D_(i)?this._onrequest(i,l):jQ(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();const n=Qe.fromError(ot.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const r of t.values())r(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){const n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(r=>this._onerror(new Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(t,n){const r=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,a=this._transport,i=t.params?._meta?.[wi]?.taskId;if(r===void 0){const m={jsonrpc:"2.0",id:t.id,error:{code:ot.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:m,timestamp:Date.now()},a?.sessionId).catch(p=>this._onerror(new Error(`Failed to enqueue error response: ${p}`))):a?.send(m).catch(p=>this._onerror(new Error(`Failed to send an error response: ${p}`)));return}const l=new AbortController;this._requestHandlerAbortControllers.set(t.id,l);const u=LQ(t.params)?t.params.task:void 0,d=this._taskStore?this.requestTaskStore(t,a?.sessionId):void 0,f={signal:l.signal,sessionId:a?.sessionId,_meta:t.params?._meta,sendNotification:async m=>{const p={relatedRequestId:t.id};i&&(p.relatedTask={taskId:i}),await this.notification(m,p)},sendRequest:async(m,p,g)=>{const y={...g,relatedRequestId:t.id};i&&!y.relatedTask&&(y.relatedTask={taskId:i});const b=y.relatedTask?.taskId??i;return b&&d&&await d.updateTaskStatus(b,"input_required"),await this.request(m,p,y)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:i,taskStore:d,taskRequestedTtl:u?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{u&&this.assertTaskHandlerCapability(t.method)}).then(()=>r(t,f)).then(async m=>{if(l.signal.aborted)return;const p={result:m,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:p,timestamp:Date.now()},a?.sessionId):await a?.send(p)},async m=>{if(l.signal.aborted)return;const p={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(m.code)?m.code:ot.InternalError,message:m.message??"Internal error",...m.data!==void 0&&{data:m.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:p,timestamp:Date.now()},a?.sessionId):await a?.send(p)}).catch(m=>this._onerror(new Error(`Failed to send response: ${m}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:n,...r}=t.params,a=Number(n),i=this._progressHandlers.get(a);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const l=this._responseHandlers.get(a),u=this._timeoutInfo.get(a);if(u&&l&&u.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(d){this._responseHandlers.delete(a),this._progressHandlers.delete(a),this._cleanupTimeout(a),l(d);return}i(r)}_onresponse(t){const n=Number(t.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),ku(t))r(t);else{const l=new Qe(t.error.code,t.error.message,t.error.data);r(l)}return}const a=this._responseHandlers.get(n);if(a===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let i=!1;if(ku(t)&&t.result&&typeof t.result=="object"){const l=t.result;if(l.task&&typeof l.task=="object"){const u=l.task;typeof u.taskId=="string"&&(i=!0,this._taskProgressTokens.set(u.taskId,n))}}if(i||this._progressHandlers.delete(n),ku(t))a(t);else{const l=Qe.fromError(t.error.code,t.error.message,t.error.data);a(l)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,r){const{task:a}=r??{};if(!a){try{yield{type:"result",result:await this.request(t,n,r)}}catch(l){yield{type:"error",error:l instanceof Qe?l:new Qe(ot.InternalError,String(l))}}return}let i;try{const l=await this.request(t,cd,r);if(l.task)i=l.task.taskId,yield{type:"taskCreated",task:l.task};else throw new Qe(ot.InternalError,"Task creation did not return a task");for(;;){const u=await this.getTask({taskId:i},r);if(yield{type:"taskStatus",task:u},vi(u.status)){u.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)}:u.status==="failed"?yield{type:"error",error:new Qe(ot.InternalError,`Task ${i} failed`)}:u.status==="cancelled"&&(yield{type:"error",error:new Qe(ot.InternalError,`Task ${i} was cancelled`)});return}if(u.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)};return}const d=u.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(f=>setTimeout(f,d)),r?.signal?.throwIfAborted()}}catch(l){yield{type:"error",error:l instanceof Qe?l:new Qe(ot.InternalError,String(l))}}}request(t,n,r){const{relatedRequestId:a,resumptionToken:i,onresumptiontoken:l,task:u,relatedTask:d}=r??{};return new Promise((f,m)=>{const p=E=>{m(E)};if(!this._transport){p(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),u&&this.assertTaskCapability(t.method)}catch(E){p(E);return}r?.signal?.throwIfAborted();const g=this._requestMessageId++,y={...t,jsonrpc:"2.0",id:g};r?.onprogress&&(this._progressHandlers.set(g,r.onprogress),y.params={...t.params,_meta:{...t.params?._meta||{},progressToken:g}}),u&&(y.params={...y.params,task:u}),d&&(y.params={...y.params,_meta:{...y.params?._meta||{},[wi]:d}});const b=E=>{this._responseHandlers.delete(g),this._progressHandlers.delete(g),this._cleanupTimeout(g),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(E)}},{relatedRequestId:a,resumptionToken:i,onresumptiontoken:l}).catch(O=>this._onerror(new Error(`Failed to send cancellation: ${O}`)));const T=E instanceof Qe?E:new Qe(ot.RequestTimeout,String(E));m(T)};this._responseHandlers.set(g,E=>{if(!r?.signal?.aborted){if(E instanceof Error)return m(E);try{const T=Cs(n,E.result);T.success?f(T.data):m(T.error)}catch(T){m(T)}}}),r?.signal?.addEventListener("abort",()=>{b(r?.signal?.reason)});const S=r?.timeout??fJ,w=()=>b(Qe.fromError(ot.RequestTimeout,"Request timed out",{timeout:S}));this._setupTimeout(g,S,r?.maxTotalTimeout,w,r?.resetTimeoutOnProgress??!1);const R=d?.taskId;if(R){const E=T=>{const O=this._responseHandlers.get(g);O?O(T):this._onerror(new Error(`Response handler missing for side-channeled request ${g}`))};this._requestResolvers.set(g,E),this._enqueueTaskMessage(R,{type:"request",message:y,timestamp:Date.now()}).catch(T=>{this._cleanupTimeout(g),m(T)})}else this._transport.send(y,{relatedRequestId:a,resumptionToken:i,onresumptiontoken:l}).catch(E=>{this._cleanupTimeout(g),m(E)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},A1,n)}async getTaskResult(t,n,r){return this.request({method:"tasks/result",params:t},n,r)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},k1,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},tX,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const r=n?.relatedTask?.taskId;if(r){const u={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[wi]:n.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:u,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let u={...t,jsonrpc:"2.0"};n?.relatedTask&&(u={...u,params:{...u.params,_meta:{...u.params?._meta||{},[wi]:n.relatedTask}}}),this._transport?.send(u,n).catch(d=>this._onerror(d))});return}let l={...t,jsonrpc:"2.0"};n?.relatedTask&&(l={...l,params:{...l.params,_meta:{...l.params?._meta||{},[wi]:n.relatedTask}}}),await this._transport.send(l,n)}setRequestHandler(t,n){const r=ZO(t);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(a,i)=>{const l=KO(t,a);return Promise.resolve(n(l,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,n){const r=ZO(t);this._notificationHandlers.set(r,a=>{const i=KO(t,a);return Promise.resolve(n(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,r){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const a=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,r,a)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){const r=await this._taskMessageQueue.dequeueAll(t,n);for(const a of r)if(a.type==="request"&&D_(a.message)){const i=a.message.id,l=this._requestResolvers.get(i);l?(l(new Qe(ot.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){let r=this._options?.defaultTaskPollInterval??1e3;try{const a=await this._taskStore?.getTask(t);a?.pollInterval&&(r=a.pollInterval)}catch{}return new Promise((a,i)=>{if(n.aborted){i(new Qe(ot.InvalidRequest,"Request cancelled"));return}const l=setTimeout(a,r);n.addEventListener("abort",()=>{clearTimeout(l),i(new Qe(ot.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){const r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async a=>{if(!t)throw new Error("No request provided");return await r.createTask(a,t.id,{method:t.method,params:t.params},n)},getTask:async a=>{const i=await r.getTask(a,n);if(!i)throw new Qe(ot.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(a,i,l)=>{await r.storeTaskResult(a,i,l,n);const u=await r.getTask(a,n);if(u){const d=am.parse({method:"notifications/tasks/status",params:u});await this.notification(d),vi(u.status)&&this._cleanupTaskProgressHandler(a)}},getTaskResult:a=>r.getTaskResult(a,n),updateTaskStatus:async(a,i,l)=>{const u=await r.getTask(a,n);if(!u)throw new Qe(ot.InvalidParams,`Task "${a}" not found - it may have been cleaned up`);if(vi(u.status))throw new Qe(ot.InvalidParams,`Cannot update task "${a}" from terminal status "${u.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(a,i,l,n);const d=await r.getTask(a,n);if(d){const f=am.parse({method:"notifications/tasks/status",params:d});await this.notification(f),vi(d.status)&&this._cleanupTaskProgressHandler(a)}},listTasks:a=>r.listTasks(a,n)}}}function YO(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function pJ(e,t){const n={...e};for(const r in t){const a=r,i=t[a];if(i===void 0)continue;const l=n[a];YO(l)&&YO(i)?n[a]={...l,...i}:n[a]=i}return n}var xh={exports:{}},x0={},La={},yi={},T0={},O0={},C0={},WO;function im(){return WO||(WO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(E){if(super(),!e.IDENTIFIER.test(E))throw new Error("CodeGen: name must be a valid identifier");this.str=E}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(E){super(),this._items=typeof E=="string"?[E]:E}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const E=this._items[0];return E===""||E==='""'}get str(){var E;return(E=this._str)!==null&&E!==void 0?E:this._str=this._items.reduce((T,O)=>`${T}${O}`,"")}get names(){var E;return(E=this._names)!==null&&E!==void 0?E:this._names=this._items.reduce((T,O)=>(O instanceof n&&(T[O.str]=(T[O.str]||0)+1),T),{})}}e._Code=r,e.nil=new r("");function a(R,...E){const T=[R[0]];let O=0;for(;O<E.length;)u(T,E[O]),T.push(R[++O]);return new r(T)}e._=a;const i=new r("+");function l(R,...E){const T=[y(R[0])];let O=0;for(;O<E.length;)T.push(i),u(T,E[O]),T.push(i,y(R[++O]));return d(T),new r(T)}e.str=l;function u(R,E){E instanceof r?R.push(...E._items):E instanceof n?R.push(E):R.push(p(E))}e.addCodeArg=u;function d(R){let E=1;for(;E<R.length-1;){if(R[E]===i){const T=f(R[E-1],R[E+1]);if(T!==void 0){R.splice(E-1,3,T);continue}R[E++]="+"}E++}}function f(R,E){if(E==='""')return R;if(R==='""')return E;if(typeof R=="string")return E instanceof n||R[R.length-1]!=='"'?void 0:typeof E!="string"?`${R.slice(0,-1)}${E}"`:E[0]==='"'?R.slice(0,-1)+E.slice(1):void 0;if(typeof E=="string"&&E[0]==='"'&&!(R instanceof n))return`"${R}${E.slice(1)}`}function m(R,E){return E.emptyStr()?R:R.emptyStr()?E:l`${R}${E}`}e.strConcat=m;function p(R){return typeof R=="number"||typeof R=="boolean"||R===null?R:y(Array.isArray(R)?R.join(","):R)}function g(R){return new r(y(R))}e.stringify=g;function y(R){return JSON.stringify(R).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=y;function b(R){return typeof R=="string"&&e.IDENTIFIER.test(R)?new r(`.${R}`):a`[${R}]`}e.getProperty=b;function S(R){if(typeof R=="string"&&e.IDENTIFIER.test(R))return new r(`${R}`);throw new Error(`CodeGen: invalid export name: ${R}, use explicit $id name mapping`)}e.getEsmExportName=S;function w(R){return new r(R.toString())}e.regexpCode=w})(C0)),C0}var A0={},QO;function XO(){return QO||(QO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=im();class n extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var r;(function(d){d[d.Started=0]="Started",d[d.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class a{constructor({prefixes:f,parent:m}={}){this._names={},this._prefixes=f,this._parent=m}toName(f){return f instanceof t.Name?f:this.name(f)}name(f){return new t.Name(this._newName(f))}_newName(f){const m=this._names[f]||this._nameGroup(f);return`${f}${m.index++}`}_nameGroup(f){var m,p;if(!((p=(m=this._parent)===null||m===void 0?void 0:m._prefixes)===null||p===void 0)&&p.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}e.Scope=a;class i extends t.Name{constructor(f,m){super(m),this.prefix=f}setValue(f,{property:m,itemIndex:p}){this.value=f,this.scopePath=(0,t._)`.${new t.Name(m)}[${p}]`}}e.ValueScopeName=i;const l=(0,t._)`\n`;class u extends a{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?l:t.nil}}get(){return this._scope}name(f){return new i(f,this._newName(f))}value(f,m){var p;if(m.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(f),{prefix:y}=g,b=(p=m.key)!==null&&p!==void 0?p:m.ref;let S=this._values[y];if(S){const E=S.get(b);if(E)return E}else S=this._values[y]=new Map;S.set(b,g);const w=this._scope[y]||(this._scope[y]=[]),R=w.length;return w[R]=m.ref,g.setValue(m,{property:y,itemIndex:R}),g}getValue(f,m){const p=this._values[f];if(p)return p.get(m)}scopeRefs(f,m=this._values){return this._reduceValues(m,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${f}${p.scopePath}`})}scopeCode(f=this._values,m,p){return this._reduceValues(f,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},m,p)}_reduceValues(f,m,p={},g){let y=t.nil;for(const b in f){const S=f[b];if(!S)continue;const w=p[b]=p[b]||new Map;S.forEach(R=>{if(w.has(R))return;w.set(R,r.Started);let E=m(R);if(E){const T=this.opts.es5?e.varKinds.var:e.varKinds.const;y=(0,t._)`${y}${T} ${R} = ${E};${this.opts._n}`}else if(E=g?.(R))y=(0,t._)`${y}${E}${this.opts._n}`;else throw new n(R);w.set(R,r.Completed)})}return y}}e.ValueScope=u})(A0)),A0}var JO;function pt(){return JO||(JO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=im(),n=XO();var r=im();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var a=XO();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(D,z){return this}}class l extends i{constructor(D,z,X){super(),this.varKind=D,this.name=z,this.rhs=X}render({es5:D,_n:z}){const X=D?n.varKinds.var:this.varKind,ue=this.rhs===void 0?"":` = ${this.rhs}`;return`${X} ${this.name}${ue};`+z}optimizeNames(D,z){if(D[this.name.str])return this.rhs&&(this.rhs=J(this.rhs,D,z)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class u extends i{constructor(D,z,X){super(),this.lhs=D,this.rhs=z,this.sideEffects=X}render({_n:D}){return`${this.lhs} = ${this.rhs};`+D}optimizeNames(D,z){if(!(this.lhs instanceof t.Name&&!D[this.lhs.str]&&!this.sideEffects))return this.rhs=J(this.rhs,D,z),this}get names(){const D=this.lhs instanceof t.Name?{}:{...this.lhs.names};return U(D,this.rhs)}}class d extends u{constructor(D,z,X,ue){super(D,X,ue),this.op=z}render({_n:D}){return`${this.lhs} ${this.op}= ${this.rhs};`+D}}class f extends i{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`${this.label}:`+D}}class m extends i{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`break${this.label?` ${this.label}`:""};`+D}}class p extends i{constructor(D){super(),this.error=D}render({_n:D}){return`throw ${this.error};`+D}get names(){return this.error.names}}class g extends i{constructor(D){super(),this.code=D}render({_n:D}){return`${this.code};`+D}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(D,z){return this.code=J(this.code,D,z),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class y extends i{constructor(D=[]){super(),this.nodes=D}render(D){return this.nodes.reduce((z,X)=>z+X.render(D),"")}optimizeNodes(){const{nodes:D}=this;let z=D.length;for(;z--;){const X=D[z].optimizeNodes();Array.isArray(X)?D.splice(z,1,...X):X?D[z]=X:D.splice(z,1)}return D.length>0?this:void 0}optimizeNames(D,z){const{nodes:X}=this;let ue=X.length;for(;ue--;){const ve=X[ue];ve.optimizeNames(D,z)||(le(D,ve.names),X.splice(ue,1))}return X.length>0?this:void 0}get names(){return this.nodes.reduce((D,z)=>G(D,z.names),{})}}class b extends y{render(D){return"{"+D._n+super.render(D)+"}"+D._n}}class S extends y{}class w extends b{}w.kind="else";class R extends b{constructor(D,z){super(z),this.condition=D}render(D){let z=`if(${this.condition})`+super.render(D);return this.else&&(z+="else "+this.else.render(D)),z}optimizeNodes(){super.optimizeNodes();const D=this.condition;if(D===!0)return this.nodes;let z=this.else;if(z){const X=z.optimizeNodes();z=this.else=Array.isArray(X)?new w(X):X}if(z)return D===!1?z instanceof R?z:z.nodes:this.nodes.length?this:new R(B(D),z instanceof R?[z]:z.nodes);if(!(D===!1||!this.nodes.length))return this}optimizeNames(D,z){var X;if(this.else=(X=this.else)===null||X===void 0?void 0:X.optimizeNames(D,z),!!(super.optimizeNames(D,z)||this.else))return this.condition=J(this.condition,D,z),this}get names(){const D=super.names;return U(D,this.condition),this.else&&G(D,this.else.names),D}}R.kind="if";class E extends b{}E.kind="for";class T extends E{constructor(D){super(),this.iteration=D}render(D){return`for(${this.iteration})`+super.render(D)}optimizeNames(D,z){if(super.optimizeNames(D,z))return this.iteration=J(this.iteration,D,z),this}get names(){return G(super.names,this.iteration.names)}}class O extends E{constructor(D,z,X,ue){super(),this.varKind=D,this.name=z,this.from=X,this.to=ue}render(D){const z=D.es5?n.varKinds.var:this.varKind,{name:X,from:ue,to:ve}=this;return`for(${z} ${X}=${ue}; ${X}<${ve}; ${X}++)`+super.render(D)}get names(){const D=U(super.names,this.from);return U(D,this.to)}}class C extends E{constructor(D,z,X,ue){super(),this.loop=D,this.varKind=z,this.name=X,this.iterable=ue}render(D){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(D)}optimizeNames(D,z){if(super.optimizeNames(D,z))return this.iterable=J(this.iterable,D,z),this}get names(){return G(super.names,this.iterable.names)}}class I extends b{constructor(D,z,X){super(),this.name=D,this.args=z,this.async=X}render(D){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(D)}}I.kind="func";class N extends y{render(D){return"return "+super.render(D)}}N.kind="return";class P extends b{render(D){let z="try"+super.render(D);return this.catch&&(z+=this.catch.render(D)),this.finally&&(z+=this.finally.render(D)),z}optimizeNodes(){var D,z;return super.optimizeNodes(),(D=this.catch)===null||D===void 0||D.optimizeNodes(),(z=this.finally)===null||z===void 0||z.optimizeNodes(),this}optimizeNames(D,z){var X,ue;return super.optimizeNames(D,z),(X=this.catch)===null||X===void 0||X.optimizeNames(D,z),(ue=this.finally)===null||ue===void 0||ue.optimizeNames(D,z),this}get names(){const D=super.names;return this.catch&&G(D,this.catch.names),this.finally&&G(D,this.finally.names),D}}class $ extends b{constructor(D){super(),this.error=D}render(D){return`catch(${this.error})`+super.render(D)}}$.kind="catch";class K extends b{render(D){return"finally"+super.render(D)}}K.kind="finally";class F{constructor(D,z={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...z,_n:z.lines?`
|
|
164
|
+
`:""},this._extScope=D,this._scope=new n.Scope({parent:D}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(D){return this._scope.name(D)}scopeName(D){return this._extScope.name(D)}scopeValue(D,z){const X=this._extScope.value(D,z);return(this._values[X.prefix]||(this._values[X.prefix]=new Set)).add(X),X}getScopeValue(D,z){return this._extScope.getValue(D,z)}scopeRefs(D){return this._extScope.scopeRefs(D,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(D,z,X,ue){const ve=this._scope.toName(z);return X!==void 0&&ue&&(this._constants[ve.str]=X),this._leafNode(new l(D,ve,X)),ve}const(D,z,X){return this._def(n.varKinds.const,D,z,X)}let(D,z,X){return this._def(n.varKinds.let,D,z,X)}var(D,z,X){return this._def(n.varKinds.var,D,z,X)}assign(D,z,X){return this._leafNode(new u(D,z,X))}add(D,z){return this._leafNode(new d(D,e.operators.ADD,z))}code(D){return typeof D=="function"?D():D!==t.nil&&this._leafNode(new g(D)),this}object(...D){const z=["{"];for(const[X,ue]of D)z.length>1&&z.push(","),z.push(X),(X!==ue||this.opts.es5)&&(z.push(":"),(0,t.addCodeArg)(z,ue));return z.push("}"),new t._Code(z)}if(D,z,X){if(this._blockNode(new R(D)),z&&X)this.code(z).else().code(X).endIf();else if(z)this.code(z).endIf();else if(X)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(D){return this._elseNode(new R(D))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(R,w)}_for(D,z){return this._blockNode(D),z&&this.code(z).endFor(),this}for(D,z){return this._for(new T(D),z)}forRange(D,z,X,ue,ve=this.opts.es5?n.varKinds.var:n.varKinds.let){const Ie=this._scope.toName(D);return this._for(new O(ve,Ie,z,X),()=>ue(Ie))}forOf(D,z,X,ue=n.varKinds.const){const ve=this._scope.toName(D);if(this.opts.es5){const Ie=z instanceof t.Name?z:this.var("_arr",z);return this.forRange("_i",0,(0,t._)`${Ie}.length`,Ae=>{this.var(ve,(0,t._)`${Ie}[${Ae}]`),X(ve)})}return this._for(new C("of",ue,ve,z),()=>X(ve))}forIn(D,z,X,ue=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(D,(0,t._)`Object.keys(${z})`,X);const ve=this._scope.toName(D);return this._for(new C("in",ue,ve,z),()=>X(ve))}endFor(){return this._endBlockNode(E)}label(D){return this._leafNode(new f(D))}break(D){return this._leafNode(new m(D))}return(D){const z=new N;if(this._blockNode(z),this.code(D),z.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(N)}try(D,z,X){if(!z&&!X)throw new Error('CodeGen: "try" without "catch" and "finally"');const ue=new P;if(this._blockNode(ue),this.code(D),z){const ve=this.name("e");this._currNode=ue.catch=new $(ve),z(ve)}return X&&(this._currNode=ue.finally=new K,this.code(X)),this._endBlockNode($,K)}throw(D){return this._leafNode(new p(D))}block(D,z){return this._blockStarts.push(this._nodes.length),D&&this.code(D).endBlock(z),this}endBlock(D){const z=this._blockStarts.pop();if(z===void 0)throw new Error("CodeGen: not in self-balancing block");const X=this._nodes.length-z;if(X<0||D!==void 0&&X!==D)throw new Error(`CodeGen: wrong number of nodes: ${X} vs ${D} expected`);return this._nodes.length=z,this}func(D,z=t.nil,X,ue){return this._blockNode(new I(D,z,X)),ue&&this.code(ue).endFunc(),this}endFunc(){return this._endBlockNode(I)}optimize(D=1){for(;D-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(D){return this._currNode.nodes.push(D),this}_blockNode(D){this._currNode.nodes.push(D),this._nodes.push(D)}_endBlockNode(D,z){const X=this._currNode;if(X instanceof D||z&&X instanceof z)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${z?`${D.kind}/${z.kind}`:D.kind}"`)}_elseNode(D){const z=this._currNode;if(!(z instanceof R))throw new Error('CodeGen: "else" without "if"');return this._currNode=z.else=D,this}get _root(){return this._nodes[0]}get _currNode(){const D=this._nodes;return D[D.length-1]}set _currNode(D){const z=this._nodes;z[z.length-1]=D}}e.CodeGen=F;function G(V,D){for(const z in D)V[z]=(V[z]||0)+(D[z]||0);return V}function U(V,D){return D instanceof t._CodeOrName?G(V,D.names):V}function J(V,D,z){if(V instanceof t.Name)return X(V);if(!ue(V))return V;return new t._Code(V._items.reduce((ve,Ie)=>(Ie instanceof t.Name&&(Ie=X(Ie)),Ie instanceof t._Code?ve.push(...Ie._items):ve.push(Ie),ve),[]));function X(ve){const Ie=z[ve.str];return Ie===void 0||D[ve.str]!==1?ve:(delete D[ve.str],Ie)}function ue(ve){return ve instanceof t._Code&&ve._items.some(Ie=>Ie instanceof t.Name&&D[Ie.str]===1&&z[Ie.str]!==void 0)}}function le(V,D){for(const z in D)V[z]=(V[z]||0)-(D[z]||0)}function B(V){return typeof V=="boolean"||typeof V=="number"||V===null?!V:(0,t._)`!${q(V)}`}e.not=B;const Y=M(e.operators.AND);function W(...V){return V.reduce(Y)}e.and=W;const he=M(e.operators.OR);function ae(...V){return V.reduce(he)}e.or=ae;function M(V){return(D,z)=>D===t.nil?z:z===t.nil?D:(0,t._)`${q(D)} ${V} ${q(z)}`}function q(V){return V instanceof t.Name?V:(0,t._)`(${V})`}})(O0)),O0}var dt={},e2;function Mt(){if(e2)return dt;e2=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.checkStrictMode=dt.getErrorPath=dt.Type=dt.useFunc=dt.setEvaluated=dt.evaluatedPropsToName=dt.mergeEvaluated=dt.eachItem=dt.unescapeJsonPointer=dt.escapeJsonPointer=dt.escapeFragment=dt.unescapeFragment=dt.schemaRefOrVal=dt.schemaHasRulesButRef=dt.schemaHasRules=dt.checkUnknownRules=dt.alwaysValidSchema=dt.toHash=void 0;const e=pt(),t=im();function n(C){const I={};for(const N of C)I[N]=!0;return I}dt.toHash=n;function r(C,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(a(C,I),!i(I,C.self.RULES.all))}dt.alwaysValidSchema=r;function a(C,I=C.schema){const{opts:N,self:P}=C;if(!N.strictSchema||typeof I=="boolean")return;const $=P.RULES.keywords;for(const K in I)$[K]||O(C,`unknown keyword: "${K}"`)}dt.checkUnknownRules=a;function i(C,I){if(typeof C=="boolean")return!C;for(const N in C)if(I[N])return!0;return!1}dt.schemaHasRules=i;function l(C,I){if(typeof C=="boolean")return!C;for(const N in C)if(N!=="$ref"&&I.all[N])return!0;return!1}dt.schemaHasRulesButRef=l;function u({topSchemaRef:C,schemaPath:I},N,P,$){if(!$){if(typeof N=="number"||typeof N=="boolean")return N;if(typeof N=="string")return(0,e._)`${N}`}return(0,e._)`${C}${I}${(0,e.getProperty)(P)}`}dt.schemaRefOrVal=u;function d(C){return p(decodeURIComponent(C))}dt.unescapeFragment=d;function f(C){return encodeURIComponent(m(C))}dt.escapeFragment=f;function m(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}dt.escapeJsonPointer=m;function p(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}dt.unescapeJsonPointer=p;function g(C,I){if(Array.isArray(C))for(const N of C)I(N);else I(C)}dt.eachItem=g;function y({mergeNames:C,mergeToName:I,mergeValues:N,resultToName:P}){return($,K,F,G)=>{const U=F===void 0?K:F instanceof e.Name?(K instanceof e.Name?C($,K,F):I($,K,F),F):K instanceof e.Name?(I($,F,K),K):N(K,F);return G===e.Name&&!(U instanceof e.Name)?P($,U):U}}dt.mergeEvaluated={props:y({mergeNames:(C,I,N)=>C.if((0,e._)`${N} !== true && ${I} !== undefined`,()=>{C.if((0,e._)`${I} === true`,()=>C.assign(N,!0),()=>C.assign(N,(0,e._)`${N} || {}`).code((0,e._)`Object.assign(${N}, ${I})`))}),mergeToName:(C,I,N)=>C.if((0,e._)`${N} !== true`,()=>{I===!0?C.assign(N,!0):(C.assign(N,(0,e._)`${N} || {}`),S(C,N,I))}),mergeValues:(C,I)=>C===!0?!0:{...C,...I},resultToName:b}),items:y({mergeNames:(C,I,N)=>C.if((0,e._)`${N} !== true && ${I} !== undefined`,()=>C.assign(N,(0,e._)`${I} === true ? true : ${N} > ${I} ? ${N} : ${I}`)),mergeToName:(C,I,N)=>C.if((0,e._)`${N} !== true`,()=>C.assign(N,I===!0?!0:(0,e._)`${N} > ${I} ? ${N} : ${I}`)),mergeValues:(C,I)=>C===!0?!0:Math.max(C,I),resultToName:(C,I)=>C.var("items",I)})};function b(C,I){if(I===!0)return C.var("props",!0);const N=C.var("props",(0,e._)`{}`);return I!==void 0&&S(C,N,I),N}dt.evaluatedPropsToName=b;function S(C,I,N){Object.keys(N).forEach(P=>C.assign((0,e._)`${I}${(0,e.getProperty)(P)}`,!0))}dt.setEvaluated=S;const w={};function R(C,I){return C.scopeValue("func",{ref:I,code:w[I.code]||(w[I.code]=new t._Code(I.code))})}dt.useFunc=R;var E;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(E||(dt.Type=E={}));function T(C,I,N){if(C instanceof e.Name){const P=I===E.Num;return N?P?(0,e._)`"[" + ${C} + "]"`:(0,e._)`"['" + ${C} + "']"`:P?(0,e._)`"/" + ${C}`:(0,e._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return N?(0,e.getProperty)(C).toString():"/"+m(C)}dt.getErrorPath=T;function O(C,I,N=C.opts.strictSchema){if(N){if(I=`strict mode: ${I}`,N===!0)throw new Error(I);C.self.logger.warn(I)}}return dt.checkStrictMode=O,dt}var Th={},t2;function Ws(){if(t2)return Th;t2=1,Object.defineProperty(Th,"__esModule",{value:!0});const e=pt(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Th.default=t,Th}var n2;function eg(){return n2||(n2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=pt(),n=Mt(),r=Ws();e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:R})=>R?(0,t.str)`"${w}" keyword must be ${R} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function a(w,R=e.keywordError,E,T){const{it:O}=w,{gen:C,compositeRule:I,allErrors:N}=O,P=p(w,R,E);T??(I||N)?d(C,P):f(O,(0,t._)`[${P}]`)}e.reportError=a;function i(w,R=e.keywordError,E){const{it:T}=w,{gen:O,compositeRule:C,allErrors:I}=T,N=p(w,R,E);d(O,N),C||I||f(T,r.default.vErrors)}e.reportExtraError=i;function l(w,R){w.assign(r.default.errors,R),w.if((0,t._)`${r.default.vErrors} !== null`,()=>w.if(R,()=>w.assign((0,t._)`${r.default.vErrors}.length`,R),()=>w.assign(r.default.vErrors,null)))}e.resetErrorsCount=l;function u({gen:w,keyword:R,schemaValue:E,data:T,errsCount:O,it:C}){if(O===void 0)throw new Error("ajv implementation error");const I=w.name("err");w.forRange("i",O,r.default.errors,N=>{w.const(I,(0,t._)`${r.default.vErrors}[${N}]`),w.if((0,t._)`${I}.instancePath === undefined`,()=>w.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(r.default.instancePath,C.errorPath))),w.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${C.errSchemaPath}/${R}`),C.opts.verbose&&(w.assign((0,t._)`${I}.schema`,E),w.assign((0,t._)`${I}.data`,T))})}e.extendErrors=u;function d(w,R){const E=w.const("err",R);w.if((0,t._)`${r.default.vErrors} === null`,()=>w.assign(r.default.vErrors,(0,t._)`[${E}]`),(0,t._)`${r.default.vErrors}.push(${E})`),w.code((0,t._)`${r.default.errors}++`)}function f(w,R){const{gen:E,validateName:T,schemaEnv:O}=w;O.$async?E.throw((0,t._)`new ${w.ValidationError}(${R})`):(E.assign((0,t._)`${T}.errors`,R),E.return(!1))}const m={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(w,R,E){const{createErrors:T}=w.it;return T===!1?(0,t._)`{}`:g(w,R,E)}function g(w,R,E={}){const{gen:T,it:O}=w,C=[y(O,E),b(w,E)];return S(w,R,C),T.object(...C)}function y({errorPath:w},{instancePath:R}){const E=R?(0,t.str)`${w}${(0,n.getErrorPath)(R,n.Type.Str)}`:w;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,E)]}function b({keyword:w,it:{errSchemaPath:R}},{schemaPath:E,parentSchema:T}){let O=T?R:(0,t.str)`${R}/${w}`;return E&&(O=(0,t.str)`${O}${(0,n.getErrorPath)(E,n.Type.Str)}`),[m.schemaPath,O]}function S(w,{params:R,message:E},T){const{keyword:O,data:C,schemaValue:I,it:N}=w,{opts:P,propertyName:$,topSchemaRef:K,schemaPath:F}=N;T.push([m.keyword,O],[m.params,typeof R=="function"?R(w):R||(0,t._)`{}`]),P.messages&&T.push([m.message,typeof E=="function"?E(w):E]),P.verbose&&T.push([m.schema,I],[m.parentSchema,(0,t._)`${K}${F}`],[r.default.data,C]),$&&T.push([m.propertyName,$])}})(T0)),T0}var r2;function mJ(){if(r2)return yi;r2=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.boolOrEmptySchema=yi.topBoolOrEmptySchema=void 0;const e=eg(),t=pt(),n=Ws(),r={message:"boolean schema is false"};function a(u){const{gen:d,schema:f,validateName:m}=u;f===!1?l(u,!1):typeof f=="object"&&f.$async===!0?d.return(n.default.data):(d.assign((0,t._)`${m}.errors`,null),d.return(!0))}yi.topBoolOrEmptySchema=a;function i(u,d){const{gen:f,schema:m}=u;m===!1?(f.var(d,!1),l(u)):f.var(d,!0)}yi.boolOrEmptySchema=i;function l(u,d){const{gen:f,data:m}=u,p={gen:f,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:u};(0,e.reportError)(p,r,void 0,d)}return yi}var nr={},_i={},o2;function HM(){if(o2)return _i;o2=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.getRules=_i.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(a){return typeof a=="string"&&t.has(a)}_i.isJSONType=n;function r(){const a={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...a,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},a.number,a.string,a.array,a.object],post:{rules:[]},all:{},keywords:{}}}return _i.getRules=r,_i}var ja={},a2;function GM(){if(a2)return ja;a2=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.shouldUseRule=ja.shouldUseGroup=ja.schemaHasRulesForType=void 0;function e({schema:r,self:a},i){const l=a.RULES.types[i];return l&&l!==!0&&t(r,l)}ja.schemaHasRulesForType=e;function t(r,a){return a.rules.some(i=>n(r,i))}ja.shouldUseGroup=t;function n(r,a){var i;return r[a.keyword]!==void 0||((i=a.definition.implements)===null||i===void 0?void 0:i.some(l=>r[l]!==void 0))}return ja.shouldUseRule=n,ja}var s2;function lm(){if(s2)return nr;s2=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.reportTypeError=nr.checkDataTypes=nr.checkDataType=nr.coerceAndCheckDataType=nr.getJSONTypes=nr.getSchemaTypes=nr.DataType=void 0;const e=HM(),t=GM(),n=eg(),r=pt(),a=Mt();var i;(function(E){E[E.Correct=0]="Correct",E[E.Wrong=1]="Wrong"})(i||(nr.DataType=i={}));function l(E){const T=u(E.type);if(T.includes("null")){if(E.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!T.length&&E.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');E.nullable===!0&&T.push("null")}return T}nr.getSchemaTypes=l;function u(E){const T=Array.isArray(E)?E:E?[E]:[];if(T.every(e.isJSONType))return T;throw new Error("type must be JSONType or JSONType[]: "+T.join(","))}nr.getJSONTypes=u;function d(E,T){const{gen:O,data:C,opts:I}=E,N=m(T,I.coerceTypes),P=T.length>0&&!(N.length===0&&T.length===1&&(0,t.schemaHasRulesForType)(E,T[0]));if(P){const $=b(T,C,I.strictNumbers,i.Wrong);O.if($,()=>{N.length?p(E,T,N):w(E)})}return P}nr.coerceAndCheckDataType=d;const f=new Set(["string","number","integer","boolean","null"]);function m(E,T){return T?E.filter(O=>f.has(O)||T==="array"&&O==="array"):[]}function p(E,T,O){const{gen:C,data:I,opts:N}=E,P=C.let("dataType",(0,r._)`typeof ${I}`),$=C.let("coerced",(0,r._)`undefined`);N.coerceTypes==="array"&&C.if((0,r._)`${P} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>C.assign(I,(0,r._)`${I}[0]`).assign(P,(0,r._)`typeof ${I}`).if(b(T,I,N.strictNumbers),()=>C.assign($,I))),C.if((0,r._)`${$} !== undefined`);for(const F of O)(f.has(F)||F==="array"&&N.coerceTypes==="array")&&K(F);C.else(),w(E),C.endIf(),C.if((0,r._)`${$} !== undefined`,()=>{C.assign(I,$),g(E,$)});function K(F){switch(F){case"string":C.elseIf((0,r._)`${P} == "number" || ${P} == "boolean"`).assign($,(0,r._)`"" + ${I}`).elseIf((0,r._)`${I} === null`).assign($,(0,r._)`""`);return;case"number":C.elseIf((0,r._)`${P} == "boolean" || ${I} === null
|
|
165
|
+
|| (${P} == "string" && ${I} && ${I} == +${I})`).assign($,(0,r._)`+${I}`);return;case"integer":C.elseIf((0,r._)`${P} === "boolean" || ${I} === null
|
|
166
|
+
|| (${P} === "string" && ${I} && ${I} == +${I} && !(${I} % 1))`).assign($,(0,r._)`+${I}`);return;case"boolean":C.elseIf((0,r._)`${I} === "false" || ${I} === 0 || ${I} === null`).assign($,!1).elseIf((0,r._)`${I} === "true" || ${I} === 1`).assign($,!0);return;case"null":C.elseIf((0,r._)`${I} === "" || ${I} === 0 || ${I} === false`),C.assign($,null);return;case"array":C.elseIf((0,r._)`${P} === "string" || ${P} === "number"
|
|
167
|
+
|| ${P} === "boolean" || ${I} === null`).assign($,(0,r._)`[${I}]`)}}}function g({gen:E,parentData:T,parentDataProperty:O},C){E.if((0,r._)`${T} !== undefined`,()=>E.assign((0,r._)`${T}[${O}]`,C))}function y(E,T,O,C=i.Correct){const I=C===i.Correct?r.operators.EQ:r.operators.NEQ;let N;switch(E){case"null":return(0,r._)`${T} ${I} null`;case"array":N=(0,r._)`Array.isArray(${T})`;break;case"object":N=(0,r._)`${T} && typeof ${T} == "object" && !Array.isArray(${T})`;break;case"integer":N=P((0,r._)`!(${T} % 1) && !isNaN(${T})`);break;case"number":N=P();break;default:return(0,r._)`typeof ${T} ${I} ${E}`}return C===i.Correct?N:(0,r.not)(N);function P($=r.nil){return(0,r.and)((0,r._)`typeof ${T} == "number"`,$,O?(0,r._)`isFinite(${T})`:r.nil)}}nr.checkDataType=y;function b(E,T,O,C){if(E.length===1)return y(E[0],T,O,C);let I;const N=(0,a.toHash)(E);if(N.array&&N.object){const P=(0,r._)`typeof ${T} != "object"`;I=N.null?P:(0,r._)`!${T} || ${P}`,delete N.null,delete N.array,delete N.object}else I=r.nil;N.number&&delete N.integer;for(const P in N)I=(0,r.and)(I,y(P,T,O,C));return I}nr.checkDataTypes=b;const S={message:({schema:E})=>`must be ${E}`,params:({schema:E,schemaValue:T})=>typeof E=="string"?(0,r._)`{type: ${E}}`:(0,r._)`{type: ${T}}`};function w(E){const T=R(E);(0,n.reportError)(T,S)}nr.reportTypeError=w;function R(E){const{gen:T,data:O,schema:C}=E,I=(0,a.schemaRefOrVal)(E,C,"type");return{gen:T,keyword:"type",data:O,schema:C.type,schemaCode:I,schemaValue:I,parentSchema:C,params:{},it:E}}return nr}var Ru={},i2;function gJ(){if(i2)return Ru;i2=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.assignDefaults=void 0;const e=pt(),t=Mt();function n(a,i){const{properties:l,items:u}=a.schema;if(i==="object"&&l)for(const d in l)r(a,d,l[d].default);else i==="array"&&Array.isArray(u)&&u.forEach((d,f)=>r(a,f,d.default))}Ru.assignDefaults=n;function r(a,i,l){const{gen:u,compositeRule:d,data:f,opts:m}=a;if(l===void 0)return;const p=(0,e._)`${f}${(0,e.getProperty)(i)}`;if(d){(0,t.checkStrictMode)(a,`default is ignored for: ${p}`);return}let g=(0,e._)`${p} === undefined`;m.useDefaults==="empty"&&(g=(0,e._)`${g} || ${p} === null || ${p} === ""`),u.if(g,(0,e._)`${p} = ${(0,e.stringify)(l)}`)}return Ru}var Po={},Ut={},l2;function Ko(){if(l2)return Ut;l2=1,Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.validateUnion=Ut.validateArray=Ut.usePattern=Ut.callValidateCode=Ut.schemaProperties=Ut.allSchemaProperties=Ut.noPropertyInData=Ut.propertyInData=Ut.isOwnProperty=Ut.hasPropFunc=Ut.reportMissingProp=Ut.checkMissingProp=Ut.checkReportMissingProp=void 0;const e=pt(),t=Mt(),n=Ws(),r=Mt();function a(E,T){const{gen:O,data:C,it:I}=E;O.if(m(O,C,T,I.opts.ownProperties),()=>{E.setParams({missingProperty:(0,e._)`${T}`},!0),E.error()})}Ut.checkReportMissingProp=a;function i({gen:E,data:T,it:{opts:O}},C,I){return(0,e.or)(...C.map(N=>(0,e.and)(m(E,T,N,O.ownProperties),(0,e._)`${I} = ${N}`)))}Ut.checkMissingProp=i;function l(E,T){E.setParams({missingProperty:T},!0),E.error()}Ut.reportMissingProp=l;function u(E){return E.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Ut.hasPropFunc=u;function d(E,T,O){return(0,e._)`${u(E)}.call(${T}, ${O})`}Ut.isOwnProperty=d;function f(E,T,O,C){const I=(0,e._)`${T}${(0,e.getProperty)(O)} !== undefined`;return C?(0,e._)`${I} && ${d(E,T,O)}`:I}Ut.propertyInData=f;function m(E,T,O,C){const I=(0,e._)`${T}${(0,e.getProperty)(O)} === undefined`;return C?(0,e.or)(I,(0,e.not)(d(E,T,O))):I}Ut.noPropertyInData=m;function p(E){return E?Object.keys(E).filter(T=>T!=="__proto__"):[]}Ut.allSchemaProperties=p;function g(E,T){return p(T).filter(O=>!(0,t.alwaysValidSchema)(E,T[O]))}Ut.schemaProperties=g;function y({schemaCode:E,data:T,it:{gen:O,topSchemaRef:C,schemaPath:I,errorPath:N},it:P},$,K,F){const G=F?(0,e._)`${E}, ${T}, ${C}${I}`:T,U=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,N)],[n.default.parentData,P.parentData],[n.default.parentDataProperty,P.parentDataProperty],[n.default.rootData,n.default.rootData]];P.opts.dynamicRef&&U.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const J=(0,e._)`${G}, ${O.object(...U)}`;return K!==e.nil?(0,e._)`${$}.call(${K}, ${J})`:(0,e._)`${$}(${J})`}Ut.callValidateCode=y;const b=(0,e._)`new RegExp`;function S({gen:E,it:{opts:T}},O){const C=T.unicodeRegExp?"u":"",{regExp:I}=T.code,N=I(O,C);return E.scopeValue("pattern",{key:N.toString(),ref:N,code:(0,e._)`${I.code==="new RegExp"?b:(0,r.useFunc)(E,I)}(${O}, ${C})`})}Ut.usePattern=S;function w(E){const{gen:T,data:O,keyword:C,it:I}=E,N=T.name("valid");if(I.allErrors){const $=T.let("valid",!0);return P(()=>T.assign($,!1)),$}return T.var(N,!0),P(()=>T.break()),N;function P($){const K=T.const("len",(0,e._)`${O}.length`);T.forRange("i",0,K,F=>{E.subschema({keyword:C,dataProp:F,dataPropType:t.Type.Num},N),T.if((0,e.not)(N),$)})}}Ut.validateArray=w;function R(E){const{gen:T,schema:O,keyword:C,it:I}=E;if(!Array.isArray(O))throw new Error("ajv implementation error");if(O.some(K=>(0,t.alwaysValidSchema)(I,K))&&!I.opts.unevaluated)return;const P=T.let("valid",!1),$=T.name("_valid");T.block(()=>O.forEach((K,F)=>{const G=E.subschema({keyword:C,schemaProp:F,compositeRule:!0},$);T.assign(P,(0,e._)`${P} || ${$}`),E.mergeValidEvaluated(G,$)||T.if((0,e.not)(P))})),E.result(P,()=>E.reset(),()=>E.error(!0))}return Ut.validateUnion=R,Ut}var c2;function vJ(){if(c2)return Po;c2=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.validateKeywordUsage=Po.validSchemaType=Po.funcKeywordCode=Po.macroKeywordCode=void 0;const e=pt(),t=Ws(),n=Ko(),r=eg();function a(g,y){const{gen:b,keyword:S,schema:w,parentSchema:R,it:E}=g,T=y.macro.call(E.self,w,R,E),O=f(b,S,T);E.opts.validateSchema!==!1&&E.self.validateSchema(T,!0);const C=b.name("valid");g.subschema({schema:T,schemaPath:e.nil,errSchemaPath:`${E.errSchemaPath}/${S}`,topSchemaRef:O,compositeRule:!0},C),g.pass(C,()=>g.error(!0))}Po.macroKeywordCode=a;function i(g,y){var b;const{gen:S,keyword:w,schema:R,parentSchema:E,$data:T,it:O}=g;d(O,y);const C=!T&&y.compile?y.compile.call(O.self,R,E,O):y.validate,I=f(S,w,C),N=S.let("valid");g.block$data(N,P),g.ok((b=y.valid)!==null&&b!==void 0?b:N);function P(){if(y.errors===!1)F(),y.modifying&&l(g),G(()=>g.error());else{const U=y.async?$():K();y.modifying&&l(g),G(()=>u(g,U))}}function $(){const U=S.let("ruleErrs",null);return S.try(()=>F((0,e._)`await `),J=>S.assign(N,!1).if((0,e._)`${J} instanceof ${O.ValidationError}`,()=>S.assign(U,(0,e._)`${J}.errors`),()=>S.throw(J))),U}function K(){const U=(0,e._)`${I}.errors`;return S.assign(U,null),F(e.nil),U}function F(U=y.async?(0,e._)`await `:e.nil){const J=O.opts.passContext?t.default.this:t.default.self,le=!("compile"in y&&!T||y.schema===!1);S.assign(N,(0,e._)`${U}${(0,n.callValidateCode)(g,I,J,le)}`,y.modifying)}function G(U){var J;S.if((0,e.not)((J=y.valid)!==null&&J!==void 0?J:N),U)}}Po.funcKeywordCode=i;function l(g){const{gen:y,data:b,it:S}=g;y.if(S.parentData,()=>y.assign(b,(0,e._)`${S.parentData}[${S.parentDataProperty}]`))}function u(g,y){const{gen:b}=g;b.if((0,e._)`Array.isArray(${y})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${y} : ${t.default.vErrors}.concat(${y})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(g)},()=>g.error())}function d({schemaEnv:g},y){if(y.async&&!g.$async)throw new Error("async keyword in sync schema")}function f(g,y,b){if(b===void 0)throw new Error(`keyword "${y}" failed to compile`);return g.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function m(g,y,b=!1){return!y.length||y.some(S=>S==="array"?Array.isArray(g):S==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==S||b&&typeof g>"u")}Po.validSchemaType=m;function p({schema:g,opts:y,self:b,errSchemaPath:S},w,R){if(Array.isArray(w.keyword)?!w.keyword.includes(R):w.keyword!==R)throw new Error("ajv implementation error");const E=w.dependencies;if(E?.some(T=>!Object.prototype.hasOwnProperty.call(g,T)))throw new Error(`parent schema must have dependencies of ${R}: ${E.join(",")}`);if(w.validateSchema&&!w.validateSchema(g[R])){const O=`keyword "${R}" value is invalid at path "${S}": `+b.errorsText(w.validateSchema.errors);if(y.validateSchema==="log")b.logger.error(O);else throw new Error(O)}}return Po.validateKeywordUsage=p,Po}var $a={},u2;function yJ(){if(u2)return $a;u2=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.extendSubschemaMode=$a.extendSubschemaData=$a.getSubschema=void 0;const e=pt(),t=Mt();function n(i,{keyword:l,schemaProp:u,schema:d,schemaPath:f,errSchemaPath:m,topSchemaRef:p}){if(l!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(l!==void 0){const g=i.schema[l];return u===void 0?{schema:g,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(l)}`,errSchemaPath:`${i.errSchemaPath}/${l}`}:{schema:g[u],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(l)}${(0,e.getProperty)(u)}`,errSchemaPath:`${i.errSchemaPath}/${l}/${(0,t.escapeFragment)(u)}`}}if(d!==void 0){if(f===void 0||m===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:f,topSchemaRef:p,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')}$a.getSubschema=n;function r(i,l,{dataProp:u,dataPropType:d,data:f,dataTypes:m,propertyName:p}){if(f!==void 0&&u!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=l;if(u!==void 0){const{errorPath:b,dataPathArr:S,opts:w}=l,R=g.let("data",(0,e._)`${l.data}${(0,e.getProperty)(u)}`,!0);y(R),i.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(u,d,w.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${u}`,i.dataPathArr=[...S,i.parentDataProperty]}if(f!==void 0){const b=f instanceof e.Name?f:g.let("data",f,!0);y(b),p!==void 0&&(i.propertyName=p)}m&&(i.dataTypes=m);function y(b){i.data=b,i.dataLevel=l.dataLevel+1,i.dataTypes=[],l.definedProperties=new Set,i.parentData=l.data,i.dataNames=[...l.dataNames,b]}}$a.extendSubschemaData=r;function a(i,{jtdDiscriminator:l,jtdMetadata:u,compositeRule:d,createErrors:f,allErrors:m}){d!==void 0&&(i.compositeRule=d),f!==void 0&&(i.createErrors=f),m!==void 0&&(i.allErrors=m),i.jtdDiscriminator=l,i.jtdMetadata=u}return $a.extendSubschemaMode=a,$a}var _r={},I0,d2;function ZM(){return d2||(d2=1,I0=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,a,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(a=r;a--!==0;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[a]))return!1;for(a=r;a--!==0;){var l=i[a];if(!e(t[l],n[l]))return!1}return!0}return t!==t&&n!==n}),I0}var N0={exports:{}},f2;function _J(){if(f2)return N0.exports;f2=1;var e=N0.exports=function(r,a,i){typeof a=="function"&&(i=a,a={}),i=a.cb||i;var l=typeof i=="function"?i:i.pre||function(){},u=i.post||function(){};t(a,l,u,r,"",r)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(r,a,i,l,u,d,f,m,p,g){if(l&&typeof l=="object"&&!Array.isArray(l)){a(l,u,d,f,m,p,g);for(var y in l){var b=l[y];if(Array.isArray(b)){if(y in e.arrayKeywords)for(var S=0;S<b.length;S++)t(r,a,i,b[S],u+"/"+y+"/"+S,d,u,y,l,S)}else if(y in e.propsKeywords){if(b&&typeof b=="object")for(var w in b)t(r,a,i,b[w],u+"/"+y+"/"+n(w),d,u,y,l,w)}else(y in e.keywords||r.allKeys&&!(y in e.skipKeywords))&&t(r,a,i,b,u+"/"+y,d,u,y,l)}i(l,u,d,f,m,p,g)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return N0.exports}var h2;function tg(){if(h2)return _r;h2=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.getSchemaRefs=_r.resolveUrl=_r.normalizeId=_r._getFullPath=_r.getFullPath=_r.inlineRef=void 0;const e=Mt(),t=ZM(),n=_J(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function a(S,w=!0){return typeof S=="boolean"?!0:w===!0?!l(S):w?u(S)<=w:!1}_r.inlineRef=a;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(S){for(const w in S){if(i.has(w))return!0;const R=S[w];if(Array.isArray(R)&&R.some(l)||typeof R=="object"&&l(R))return!0}return!1}function u(S){let w=0;for(const R in S){if(R==="$ref")return 1/0;if(w++,!r.has(R)&&(typeof S[R]=="object"&&(0,e.eachItem)(S[R],E=>w+=u(E)),w===1/0))return 1/0}return w}function d(S,w="",R){R!==!1&&(w=p(w));const E=S.parse(w);return f(S,E)}_r.getFullPath=d;function f(S,w){return S.serialize(w).split("#")[0]+"#"}_r._getFullPath=f;const m=/#\/?$/;function p(S){return S?S.replace(m,""):""}_r.normalizeId=p;function g(S,w,R){return R=p(R),S.resolve(w,R)}_r.resolveUrl=g;const y=/^[a-z_][-a-z0-9._]*$/i;function b(S,w){if(typeof S=="boolean")return{};const{schemaId:R,uriResolver:E}=this.opts,T=p(S[R]||w),O={"":T},C=d(E,T,!1),I={},N=new Set;return n(S,{allKeys:!0},(K,F,G,U)=>{if(U===void 0)return;const J=C+F;let le=O[U];typeof K[R]=="string"&&(le=B.call(this,K[R])),Y.call(this,K.$anchor),Y.call(this,K.$dynamicAnchor),O[F]=le;function B(W){const he=this.opts.uriResolver.resolve;if(W=p(le?he(le,W):W),N.has(W))throw $(W);N.add(W);let ae=this.refs[W];return typeof ae=="string"&&(ae=this.refs[ae]),typeof ae=="object"?P(K,ae.schema,W):W!==p(J)&&(W[0]==="#"?(P(K,I[W],W),I[W]=K):this.refs[W]=J),W}function Y(W){if(typeof W=="string"){if(!y.test(W))throw new Error(`invalid anchor "${W}"`);B.call(this,`#${W}`)}}}),I;function P(K,F,G){if(F!==void 0&&!t(K,F))throw $(G)}function $(K){return new Error(`reference "${K}" resolves to more than one schema`)}}return _r.getSchemaRefs=b,_r}var p2;function ng(){if(p2)return La;p2=1,Object.defineProperty(La,"__esModule",{value:!0}),La.getData=La.KeywordCxt=La.validateFunctionCode=void 0;const e=mJ(),t=lm(),n=GM(),r=lm(),a=gJ(),i=vJ(),l=yJ(),u=pt(),d=Ws(),f=tg(),m=Mt(),p=eg();function g(H){if(C(H)&&(N(H),O(H))){w(H);return}y(H,()=>(0,e.topBoolOrEmptySchema)(H))}La.validateFunctionCode=g;function y({gen:H,validateName:ne,schema:_e,schemaEnv:se,opts:ce},Te){ce.code.es5?H.func(ne,(0,u._)`${d.default.data}, ${d.default.valCxt}`,se.$async,()=>{H.code((0,u._)`"use strict"; ${E(_e,ce)}`),S(H,ce),H.code(Te)}):H.func(ne,(0,u._)`${d.default.data}, ${b(ce)}`,se.$async,()=>H.code(E(_e,ce)).code(Te))}function b(H){return(0,u._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${H.dynamicRef?(0,u._)`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}function S(H,ne){H.if(d.default.valCxt,()=>{H.var(d.default.instancePath,(0,u._)`${d.default.valCxt}.${d.default.instancePath}`),H.var(d.default.parentData,(0,u._)`${d.default.valCxt}.${d.default.parentData}`),H.var(d.default.parentDataProperty,(0,u._)`${d.default.valCxt}.${d.default.parentDataProperty}`),H.var(d.default.rootData,(0,u._)`${d.default.valCxt}.${d.default.rootData}`),ne.dynamicRef&&H.var(d.default.dynamicAnchors,(0,u._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{H.var(d.default.instancePath,(0,u._)`""`),H.var(d.default.parentData,(0,u._)`undefined`),H.var(d.default.parentDataProperty,(0,u._)`undefined`),H.var(d.default.rootData,d.default.data),ne.dynamicRef&&H.var(d.default.dynamicAnchors,(0,u._)`{}`)})}function w(H){const{schema:ne,opts:_e,gen:se}=H;y(H,()=>{_e.$comment&&ne.$comment&&U(H),K(H),se.let(d.default.vErrors,null),se.let(d.default.errors,0),_e.unevaluated&&R(H),P(H),J(H)})}function R(H){const{gen:ne,validateName:_e}=H;H.evaluated=ne.const("evaluated",(0,u._)`${_e}.evaluated`),ne.if((0,u._)`${H.evaluated}.dynamicProps`,()=>ne.assign((0,u._)`${H.evaluated}.props`,(0,u._)`undefined`)),ne.if((0,u._)`${H.evaluated}.dynamicItems`,()=>ne.assign((0,u._)`${H.evaluated}.items`,(0,u._)`undefined`))}function E(H,ne){const _e=typeof H=="object"&&H[ne.schemaId];return _e&&(ne.code.source||ne.code.process)?(0,u._)`/*# sourceURL=${_e} */`:u.nil}function T(H,ne){if(C(H)&&(N(H),O(H))){I(H,ne);return}(0,e.boolOrEmptySchema)(H,ne)}function O({schema:H,self:ne}){if(typeof H=="boolean")return!H;for(const _e in H)if(ne.RULES.all[_e])return!0;return!1}function C(H){return typeof H.schema!="boolean"}function I(H,ne){const{schema:_e,gen:se,opts:ce}=H;ce.$comment&&_e.$comment&&U(H),F(H),G(H);const Te=se.const("_errs",d.default.errors);P(H,Te),se.var(ne,(0,u._)`${Te} === ${d.default.errors}`)}function N(H){(0,m.checkUnknownRules)(H),$(H)}function P(H,ne){if(H.opts.jtd)return B(H,[],!1,ne);const _e=(0,t.getSchemaTypes)(H.schema),se=(0,t.coerceAndCheckDataType)(H,_e);B(H,_e,!se,ne)}function $(H){const{schema:ne,errSchemaPath:_e,opts:se,self:ce}=H;ne.$ref&&se.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(ne,ce.RULES)&&ce.logger.warn(`$ref: keywords ignored in schema at path "${_e}"`)}function K(H){const{schema:ne,opts:_e}=H;ne.default!==void 0&&_e.useDefaults&&_e.strictSchema&&(0,m.checkStrictMode)(H,"default is ignored in the schema root")}function F(H){const ne=H.schema[H.opts.schemaId];ne&&(H.baseId=(0,f.resolveUrl)(H.opts.uriResolver,H.baseId,ne))}function G(H){if(H.schema.$async&&!H.schemaEnv.$async)throw new Error("async schema in sync schema")}function U({gen:H,schemaEnv:ne,schema:_e,errSchemaPath:se,opts:ce}){const Te=_e.$comment;if(ce.$comment===!0)H.code((0,u._)`${d.default.self}.logger.log(${Te})`);else if(typeof ce.$comment=="function"){const Pe=(0,u.str)`${se}/$comment`,Xe=H.scopeValue("root",{ref:ne.root});H.code((0,u._)`${d.default.self}.opts.$comment(${Te}, ${Pe}, ${Xe}.schema)`)}}function J(H){const{gen:ne,schemaEnv:_e,validateName:se,ValidationError:ce,opts:Te}=H;_e.$async?ne.if((0,u._)`${d.default.errors} === 0`,()=>ne.return(d.default.data),()=>ne.throw((0,u._)`new ${ce}(${d.default.vErrors})`)):(ne.assign((0,u._)`${se}.errors`,d.default.vErrors),Te.unevaluated&&le(H),ne.return((0,u._)`${d.default.errors} === 0`))}function le({gen:H,evaluated:ne,props:_e,items:se}){_e instanceof u.Name&&H.assign((0,u._)`${ne}.props`,_e),se instanceof u.Name&&H.assign((0,u._)`${ne}.items`,se)}function B(H,ne,_e,se){const{gen:ce,schema:Te,data:Pe,allErrors:Xe,opts:Ve,self:Ye}=H,{RULES:Z}=Ye;if(Te.$ref&&(Ve.ignoreKeywordsWithRef||!(0,m.schemaHasRulesButRef)(Te,Z))){ce.block(()=>ue(H,"$ref",Z.all.$ref.definition));return}Ve.jtd||W(H,ne),ce.block(()=>{for(const oe of Z.rules)re(oe);re(Z.post)});function re(oe){(0,n.shouldUseGroup)(Te,oe)&&(oe.type?(ce.if((0,r.checkDataType)(oe.type,Pe,Ve.strictNumbers)),Y(H,oe),ne.length===1&&ne[0]===oe.type&&_e&&(ce.else(),(0,r.reportTypeError)(H)),ce.endIf()):Y(H,oe),Xe||ce.if((0,u._)`${d.default.errors} === ${se||0}`))}}function Y(H,ne){const{gen:_e,schema:se,opts:{useDefaults:ce}}=H;ce&&(0,a.assignDefaults)(H,ne.type),_e.block(()=>{for(const Te of ne.rules)(0,n.shouldUseRule)(se,Te)&&ue(H,Te.keyword,Te.definition,ne.type)})}function W(H,ne){H.schemaEnv.meta||!H.opts.strictTypes||(he(H,ne),H.opts.allowUnionTypes||ae(H,ne),M(H,H.dataTypes))}function he(H,ne){if(ne.length){if(!H.dataTypes.length){H.dataTypes=ne;return}ne.forEach(_e=>{V(H.dataTypes,_e)||z(H,`type "${_e}" not allowed by context "${H.dataTypes.join(",")}"`)}),D(H,ne)}}function ae(H,ne){ne.length>1&&!(ne.length===2&&ne.includes("null"))&&z(H,"use allowUnionTypes to allow union type keyword")}function M(H,ne){const _e=H.self.RULES.all;for(const se in _e){const ce=_e[se];if(typeof ce=="object"&&(0,n.shouldUseRule)(H.schema,ce)){const{type:Te}=ce.definition;Te.length&&!Te.some(Pe=>q(ne,Pe))&&z(H,`missing type "${Te.join(",")}" for keyword "${se}"`)}}}function q(H,ne){return H.includes(ne)||ne==="number"&&H.includes("integer")}function V(H,ne){return H.includes(ne)||ne==="integer"&&H.includes("number")}function D(H,ne){const _e=[];for(const se of H.dataTypes)V(ne,se)?_e.push(se):ne.includes("integer")&&se==="number"&&_e.push("integer");H.dataTypes=_e}function z(H,ne){const _e=H.schemaEnv.baseId+H.errSchemaPath;ne+=` at "${_e}" (strictTypes)`,(0,m.checkStrictMode)(H,ne,H.opts.strictTypes)}class X{constructor(ne,_e,se){if((0,i.validateKeywordUsage)(ne,_e,se),this.gen=ne.gen,this.allErrors=ne.allErrors,this.keyword=se,this.data=ne.data,this.schema=ne.schema[se],this.$data=_e.$data&&ne.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(ne,this.schema,se,this.$data),this.schemaType=_e.schemaType,this.parentSchema=ne.schema,this.params={},this.it=ne,this.def=_e,this.$data)this.schemaCode=ne.gen.const("vSchema",Ae(this.$data,ne));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,_e.schemaType,_e.allowUndefined))throw new Error(`${se} value must be ${JSON.stringify(_e.schemaType)}`);("code"in _e?_e.trackErrors:_e.errors!==!1)&&(this.errsCount=ne.gen.const("_errs",d.default.errors))}result(ne,_e,se){this.failResult((0,u.not)(ne),_e,se)}failResult(ne,_e,se){this.gen.if(ne),se?se():this.error(),_e?(this.gen.else(),_e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ne,_e){this.failResult((0,u.not)(ne),void 0,_e)}fail(ne){if(ne===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(ne),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(ne){if(!this.$data)return this.fail(ne);const{schemaCode:_e}=this;this.fail((0,u._)`${_e} !== undefined && (${(0,u.or)(this.invalid$data(),ne)})`)}error(ne,_e,se){if(_e){this.setParams(_e),this._error(ne,se),this.setParams({});return}this._error(ne,se)}_error(ne,_e){(ne?p.reportExtraError:p.reportError)(this,this.def.error,_e)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(ne){this.allErrors||this.gen.if(ne)}setParams(ne,_e){_e?Object.assign(this.params,ne):this.params=ne}block$data(ne,_e,se=u.nil){this.gen.block(()=>{this.check$data(ne,se),_e()})}check$data(ne=u.nil,_e=u.nil){if(!this.$data)return;const{gen:se,schemaCode:ce,schemaType:Te,def:Pe}=this;se.if((0,u.or)((0,u._)`${ce} === undefined`,_e)),ne!==u.nil&&se.assign(ne,!0),(Te.length||Pe.validateSchema)&&(se.elseIf(this.invalid$data()),this.$dataError(),ne!==u.nil&&se.assign(ne,!1)),se.else()}invalid$data(){const{gen:ne,schemaCode:_e,schemaType:se,def:ce,it:Te}=this;return(0,u.or)(Pe(),Xe());function Pe(){if(se.length){if(!(_e instanceof u.Name))throw new Error("ajv implementation error");const Ve=Array.isArray(se)?se:[se];return(0,u._)`${(0,r.checkDataTypes)(Ve,_e,Te.opts.strictNumbers,r.DataType.Wrong)}`}return u.nil}function Xe(){if(ce.validateSchema){const Ve=ne.scopeValue("validate$data",{ref:ce.validateSchema});return(0,u._)`!${Ve}(${_e})`}return u.nil}}subschema(ne,_e){const se=(0,l.getSubschema)(this.it,ne);(0,l.extendSubschemaData)(se,this.it,ne),(0,l.extendSubschemaMode)(se,ne);const ce={...this.it,...se,items:void 0,props:void 0};return T(ce,_e),ce}mergeEvaluated(ne,_e){const{it:se,gen:ce}=this;se.opts.unevaluated&&(se.props!==!0&&ne.props!==void 0&&(se.props=m.mergeEvaluated.props(ce,ne.props,se.props,_e)),se.items!==!0&&ne.items!==void 0&&(se.items=m.mergeEvaluated.items(ce,ne.items,se.items,_e)))}mergeValidEvaluated(ne,_e){const{it:se,gen:ce}=this;if(se.opts.unevaluated&&(se.props!==!0||se.items!==!0))return ce.if(_e,()=>this.mergeEvaluated(ne,u.Name)),!0}}La.KeywordCxt=X;function ue(H,ne,_e,se){const ce=new X(H,_e,ne);"code"in _e?_e.code(ce,se):ce.$data&&_e.validate?(0,i.funcKeywordCode)(ce,_e):"macro"in _e?(0,i.macroKeywordCode)(ce,_e):(_e.compile||_e.validate)&&(0,i.funcKeywordCode)(ce,_e)}const ve=/^\/(?:[^~]|~0|~1)*$/,Ie=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ae(H,{dataLevel:ne,dataNames:_e,dataPathArr:se}){let ce,Te;if(H==="")return d.default.rootData;if(H[0]==="/"){if(!ve.test(H))throw new Error(`Invalid JSON-pointer: ${H}`);ce=H,Te=d.default.rootData}else{const Ye=Ie.exec(H);if(!Ye)throw new Error(`Invalid JSON-pointer: ${H}`);const Z=+Ye[1];if(ce=Ye[2],ce==="#"){if(Z>=ne)throw new Error(Ve("property/index",Z));return se[ne-Z]}if(Z>ne)throw new Error(Ve("data",Z));if(Te=_e[ne-Z],!ce)return Te}let Pe=Te;const Xe=ce.split("/");for(const Ye of Xe)Ye&&(Te=(0,u._)`${Te}${(0,u.getProperty)((0,m.unescapeJsonPointer)(Ye))}`,Pe=(0,u._)`${Pe} && ${Te}`);return Pe;function Ve(Ye,Z){return`Cannot access ${Ye} ${Z} levels up, current level is ${ne}`}}return La.getData=Ae,La}var Oh={},m2;function F1(){if(m2)return Oh;m2=1,Object.defineProperty(Oh,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return Oh.default=e,Oh}var Ch={},g2;function rg(){if(g2)return Ch;g2=1,Object.defineProperty(Ch,"__esModule",{value:!0});const e=tg();class t extends Error{constructor(r,a,i,l){super(l||`can't resolve reference ${i} from id ${a}`),this.missingRef=(0,e.resolveUrl)(r,a,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return Ch.default=t,Ch}var Kr={},v2;function V1(){if(v2)return Kr;v2=1,Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.resolveSchema=Kr.getCompilingSchema=Kr.resolveRef=Kr.compileSchema=Kr.SchemaEnv=void 0;const e=pt(),t=F1(),n=Ws(),r=tg(),a=Mt(),i=ng();class l{constructor(R){var E;this.refs={},this.dynamicAnchors={};let T;typeof R.schema=="object"&&(T=R.schema),this.schema=R.schema,this.schemaId=R.schemaId,this.root=R.root||this,this.baseId=(E=R.baseId)!==null&&E!==void 0?E:(0,r.normalizeId)(T?.[R.schemaId||"$id"]),this.schemaPath=R.schemaPath,this.localRefs=R.localRefs,this.meta=R.meta,this.$async=T?.$async,this.refs={}}}Kr.SchemaEnv=l;function u(w){const R=m.call(this,w);if(R)return R;const E=(0,r.getFullPath)(this.opts.uriResolver,w.root.baseId),{es5:T,lines:O}=this.opts.code,{ownProperties:C}=this.opts,I=new e.CodeGen(this.scope,{es5:T,lines:O,ownProperties:C});let N;w.$async&&(N=I.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const P=I.scopeName("validate");w.validateName=P;const $={gen:I,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:I.scopeValue("schema",this.opts.code.source===!0?{ref:w.schema,code:(0,e.stringify)(w.schema)}:{ref:w.schema}),validateName:P,ValidationError:N,schema:w.schema,schemaEnv:w,rootId:E,baseId:w.baseId||E,schemaPath:e.nil,errSchemaPath:w.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let K;try{this._compilations.add(w),(0,i.validateFunctionCode)($),I.optimize(this.opts.code.optimize);const F=I.toString();K=`${I.scopeRefs(n.default.scope)}return ${F}`,this.opts.code.process&&(K=this.opts.code.process(K,w));const U=new Function(`${n.default.self}`,`${n.default.scope}`,K)(this,this.scope.get());if(this.scope.value(P,{ref:U}),U.errors=null,U.schema=w.schema,U.schemaEnv=w,w.$async&&(U.$async=!0),this.opts.code.source===!0&&(U.source={validateName:P,validateCode:F,scopeValues:I._values}),this.opts.unevaluated){const{props:J,items:le}=$;U.evaluated={props:J instanceof e.Name?void 0:J,items:le instanceof e.Name?void 0:le,dynamicProps:J instanceof e.Name,dynamicItems:le instanceof e.Name},U.source&&(U.source.evaluated=(0,e.stringify)(U.evaluated))}return w.validate=U,w}catch(F){throw delete w.validate,delete w.validateName,K&&this.logger.error("Error compiling schema, function code:",K),F}finally{this._compilations.delete(w)}}Kr.compileSchema=u;function d(w,R,E){var T;E=(0,r.resolveUrl)(this.opts.uriResolver,R,E);const O=w.refs[E];if(O)return O;let C=g.call(this,w,E);if(C===void 0){const I=(T=w.localRefs)===null||T===void 0?void 0:T[E],{schemaId:N}=this.opts;I&&(C=new l({schema:I,schemaId:N,root:w,baseId:R}))}if(C!==void 0)return w.refs[E]=f.call(this,C)}Kr.resolveRef=d;function f(w){return(0,r.inlineRef)(w.schema,this.opts.inlineRefs)?w.schema:w.validate?w:u.call(this,w)}function m(w){for(const R of this._compilations)if(p(R,w))return R}Kr.getCompilingSchema=m;function p(w,R){return w.schema===R.schema&&w.root===R.root&&w.baseId===R.baseId}function g(w,R){let E;for(;typeof(E=this.refs[R])=="string";)R=E;return E||this.schemas[R]||y.call(this,w,R)}function y(w,R){const E=this.opts.uriResolver.parse(R),T=(0,r._getFullPath)(this.opts.uriResolver,E);let O=(0,r.getFullPath)(this.opts.uriResolver,w.baseId,void 0);if(Object.keys(w.schema).length>0&&T===O)return S.call(this,E,w);const C=(0,r.normalizeId)(T),I=this.refs[C]||this.schemas[C];if(typeof I=="string"){const N=y.call(this,w,I);return typeof N?.schema!="object"?void 0:S.call(this,E,N)}if(typeof I?.schema=="object"){if(I.validate||u.call(this,I),C===(0,r.normalizeId)(R)){const{schema:N}=I,{schemaId:P}=this.opts,$=N[P];return $&&(O=(0,r.resolveUrl)(this.opts.uriResolver,O,$)),new l({schema:N,schemaId:P,root:w,baseId:O})}return S.call(this,E,I)}}Kr.resolveSchema=y;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(w,{baseId:R,schema:E,root:T}){var O;if(((O=w.fragment)===null||O===void 0?void 0:O[0])!=="/")return;for(const N of w.fragment.slice(1).split("/")){if(typeof E=="boolean")return;const P=E[(0,a.unescapeFragment)(N)];if(P===void 0)return;E=P;const $=typeof E=="object"&&E[this.opts.schemaId];!b.has(N)&&$&&(R=(0,r.resolveUrl)(this.opts.uriResolver,R,$))}let C;if(typeof E!="boolean"&&E.$ref&&!(0,a.schemaHasRulesButRef)(E,this.RULES)){const N=(0,r.resolveUrl)(this.opts.uriResolver,R,E.$ref);C=y.call(this,T,N)}const{schemaId:I}=this.opts;if(C=C||new l({schema:E,schemaId:I,root:T,baseId:R}),C.schema!==C.root.schema)return C}return Kr}const bJ="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",wJ="Meta-schema for $data reference (JSON AnySchema extension proposal)",SJ="object",EJ=["$data"],RJ={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},xJ=!1,TJ={$id:bJ,description:wJ,type:SJ,required:EJ,properties:RJ,additionalProperties:xJ};var Ah={},xu={exports:{}},k0,y2;function KM(){if(y2)return k0;y2=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function n(g){let y="",b=0,S=0;for(S=0;S<g.length;S++)if(b=g[S].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";y+=g[S];break}for(S+=1;S<g.length;S++){if(b=g[S].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";y+=g[S]}return y}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(g){return g.length=0,!0}function i(g,y,b){if(g.length){const S=n(g);if(S!=="")y.push(S);else return b.error=!0,!1;g.length=0}return!0}function l(g){let y=0;const b={error:!1,address:"",zone:""},S=[],w=[];let R=!1,E=!1,T=i;for(let O=0;O<g.length;O++){const C=g[O];if(!(C==="["||C==="]"))if(C===":"){if(R===!0&&(E=!0),!T(w,S,b))break;if(++y>7){b.error=!0;break}O>0&&g[O-1]===":"&&(R=!0),S.push(":");continue}else if(C==="%"){if(!T(w,S,b))break;T=a}else{w.push(C);continue}}return w.length&&(T===a?b.zone=w.join(""):E?S.push(w.join("")):S.push(n(w))),b.address=S.join(""),b}function u(g){if(d(g,":")<2)return{host:g,isIPV6:!1};const y=l(g);if(y.error)return{host:g,isIPV6:!1};{let b=y.address,S=y.address;return y.zone&&(b+="%"+y.zone,S+="%25"+y.zone),{host:b,isIPV6:!0,escapedHost:S}}}function d(g,y){let b=0;for(let S=0;S<g.length;S++)g[S]===y&&b++;return b}function f(g){let y=g;const b=[];let S=-1,w=0;for(;w=y.length;){if(w===1){if(y===".")break;if(y==="/"){b.push("/");break}else{b.push(y);break}}else if(w===2){if(y[0]==="."){if(y[1]===".")break;if(y[1]==="/"){y=y.slice(2);continue}}else if(y[0]==="/"&&(y[1]==="."||y[1]==="/")){b.push("/");break}}else if(w===3&&y==="/.."){b.length!==0&&b.pop(),b.push("/");break}if(y[0]==="."){if(y[1]==="."){if(y[2]==="/"){y=y.slice(3);continue}}else if(y[1]==="/"){y=y.slice(2);continue}}else if(y[0]==="/"&&y[1]==="."){if(y[2]==="/"){y=y.slice(2);continue}else if(y[2]==="."&&y[3]==="/"){y=y.slice(3),b.length!==0&&b.pop();continue}}if((S=y.indexOf("/",1))===-1){b.push(y);break}else b.push(y.slice(0,S)),y=y.slice(S)}return b.join("")}function m(g,y){const b=y!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=b(g.scheme)),g.userinfo!==void 0&&(g.userinfo=b(g.userinfo)),g.host!==void 0&&(g.host=b(g.host)),g.path!==void 0&&(g.path=b(g.path)),g.query!==void 0&&(g.query=b(g.query)),g.fragment!==void 0&&(g.fragment=b(g.fragment)),g}function p(g){const y=[];if(g.userinfo!==void 0&&(y.push(g.userinfo),y.push("@")),g.host!==void 0){let b=unescape(g.host);if(!t(b)){const S=u(b);S.isIPV6===!0?b=`[${S.escapedHost}]`:b=g.host}y.push(b)}return(typeof g.port=="number"||typeof g.port=="string")&&(y.push(":"),y.push(String(g.port))),y.length?y.join(""):void 0}return k0={nonSimpleDomain:r,recomposeAuthority:p,normalizeComponentEncoding:m,removeDotSegments:f,isIPv4:t,isUUID:e,normalizeIPv6:u,stringArrayToHexStripped:n},k0}var M0,_2;function OJ(){if(_2)return M0;_2=1;const{isUUID:e}=KM(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(C){return n.indexOf(C)!==-1}function a(C){return C.secure===!0?!0:C.secure===!1?!1:C.scheme?C.scheme.length===3&&(C.scheme[0]==="w"||C.scheme[0]==="W")&&(C.scheme[1]==="s"||C.scheme[1]==="S")&&(C.scheme[2]==="s"||C.scheme[2]==="S"):!1}function i(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function l(C){const I=String(C.scheme).toLowerCase()==="https";return(C.port===(I?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function u(C){return C.secure=a(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function d(C){if((C.port===(a(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){const[I,N]=C.resourceName.split("?");C.path=I&&I!=="/"?I:void 0,C.query=N,C.resourceName=void 0}return C.fragment=void 0,C}function f(C,I){if(!C.path)return C.error="URN can not be parsed",C;const N=C.path.match(t);if(N){const P=I.scheme||C.scheme||"urn";C.nid=N[1].toLowerCase(),C.nss=N[2];const $=`${P}:${I.nid||C.nid}`,K=O($);C.path=void 0,K&&(C=K.parse(C,I))}else C.error=C.error||"URN can not be parsed.";return C}function m(C,I){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const N=I.scheme||C.scheme||"urn",P=C.nid.toLowerCase(),$=`${N}:${I.nid||P}`,K=O($);K&&(C=K.serialize(C,I));const F=C,G=C.nss;return F.path=`${P||I.nid}:${G}`,I.skipEscape=!0,F}function p(C,I){const N=C;return N.uuid=N.nss,N.nss=void 0,!I.tolerant&&(!N.uuid||!e(N.uuid))&&(N.error=N.error||"UUID is not valid."),N}function g(C){const I=C;return I.nss=(C.uuid||"").toLowerCase(),I}const y={scheme:"http",domainHost:!0,parse:i,serialize:l},b={scheme:"https",domainHost:y.domainHost,parse:i,serialize:l},S={scheme:"ws",domainHost:!0,parse:u,serialize:d},w={scheme:"wss",domainHost:S.domainHost,parse:S.parse,serialize:S.serialize},T={http:y,https:b,ws:S,wss:w,urn:{scheme:"urn",parse:f,serialize:m,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(T,null);function O(C){return C&&(T[C]||T[C.toLowerCase()])||void 0}return M0={wsIsSecure:a,SCHEMES:T,isValidSchemeName:r,getSchemeHandler:O},M0}var b2;function CJ(){if(b2)return xu.exports;b2=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:a,nonSimpleDomain:i}=KM(),{SCHEMES:l,getSchemeHandler:u}=OJ();function d(w,R){return typeof w=="string"?w=g(b(w,R),R):typeof w=="object"&&(w=b(g(w,R),R)),w}function f(w,R,E){const T=E?Object.assign({scheme:"null"},E):{scheme:"null"},O=m(b(w,T),b(R,T),T,!0);return T.skipEscape=!0,g(O,T)}function m(w,R,E,T){const O={};return T||(w=b(g(w,E),E),R=b(g(R,E),E)),E=E||{},!E.tolerant&&R.scheme?(O.scheme=R.scheme,O.userinfo=R.userinfo,O.host=R.host,O.port=R.port,O.path=t(R.path||""),O.query=R.query):(R.userinfo!==void 0||R.host!==void 0||R.port!==void 0?(O.userinfo=R.userinfo,O.host=R.host,O.port=R.port,O.path=t(R.path||""),O.query=R.query):(R.path?(R.path[0]==="/"?O.path=t(R.path):((w.userinfo!==void 0||w.host!==void 0||w.port!==void 0)&&!w.path?O.path="/"+R.path:w.path?O.path=w.path.slice(0,w.path.lastIndexOf("/")+1)+R.path:O.path=R.path,O.path=t(O.path)),O.query=R.query):(O.path=w.path,R.query!==void 0?O.query=R.query:O.query=w.query),O.userinfo=w.userinfo,O.host=w.host,O.port=w.port),O.scheme=w.scheme),O.fragment=R.fragment,O}function p(w,R,E){return typeof w=="string"?(w=unescape(w),w=g(r(b(w,E),!0),{...E,skipEscape:!0})):typeof w=="object"&&(w=g(r(w,!0),{...E,skipEscape:!0})),typeof R=="string"?(R=unescape(R),R=g(r(b(R,E),!0),{...E,skipEscape:!0})):typeof R=="object"&&(R=g(r(R,!0),{...E,skipEscape:!0})),w.toLowerCase()===R.toLowerCase()}function g(w,R){const E={host:w.host,scheme:w.scheme,userinfo:w.userinfo,port:w.port,path:w.path,query:w.query,nid:w.nid,nss:w.nss,uuid:w.uuid,fragment:w.fragment,reference:w.reference,resourceName:w.resourceName,secure:w.secure,error:""},T=Object.assign({},R),O=[],C=u(T.scheme||E.scheme);C&&C.serialize&&C.serialize(E,T),E.path!==void 0&&(T.skipEscape?E.path=unescape(E.path):(E.path=escape(E.path),E.scheme!==void 0&&(E.path=E.path.split("%3A").join(":")))),T.reference!=="suffix"&&E.scheme&&O.push(E.scheme,":");const I=n(E);if(I!==void 0&&(T.reference!=="suffix"&&O.push("//"),O.push(I),E.path&&E.path[0]!=="/"&&O.push("/")),E.path!==void 0){let N=E.path;!T.absolutePath&&(!C||!C.absolutePath)&&(N=t(N)),I===void 0&&N[0]==="/"&&N[1]==="/"&&(N="/%2F"+N.slice(2)),O.push(N)}return E.query!==void 0&&O.push("?",E.query),E.fragment!==void 0&&O.push("#",E.fragment),O.join("")}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(w,R){const E=Object.assign({},R),T={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let O=!1;E.reference==="suffix"&&(E.scheme?w=E.scheme+":"+w:w="//"+w);const C=w.match(y);if(C){if(T.scheme=C[1],T.userinfo=C[3],T.host=C[4],T.port=parseInt(C[5],10),T.path=C[6]||"",T.query=C[7],T.fragment=C[8],isNaN(T.port)&&(T.port=C[5]),T.host)if(a(T.host)===!1){const P=e(T.host);T.host=P.host.toLowerCase(),O=P.isIPV6}else O=!0;T.scheme===void 0&&T.userinfo===void 0&&T.host===void 0&&T.port===void 0&&T.query===void 0&&!T.path?T.reference="same-document":T.scheme===void 0?T.reference="relative":T.fragment===void 0?T.reference="absolute":T.reference="uri",E.reference&&E.reference!=="suffix"&&E.reference!==T.reference&&(T.error=T.error||"URI is not a "+E.reference+" reference.");const I=u(E.scheme||T.scheme);if(!E.unicodeSupport&&(!I||!I.unicodeSupport)&&T.host&&(E.domainHost||I&&I.domainHost)&&O===!1&&i(T.host))try{T.host=URL.domainToASCII(T.host.toLowerCase())}catch(N){T.error=T.error||"Host's domain name can not be converted to ASCII: "+N}(!I||I&&!I.skipNormalize)&&(w.indexOf("%")!==-1&&(T.scheme!==void 0&&(T.scheme=unescape(T.scheme)),T.host!==void 0&&(T.host=unescape(T.host))),T.path&&(T.path=escape(unescape(T.path))),T.fragment&&(T.fragment=encodeURI(decodeURIComponent(T.fragment)))),I&&I.parse&&I.parse(T,E)}else T.error=T.error||"URI can not be parsed.";return T}const S={SCHEMES:l,normalize:d,resolve:f,resolveComponent:m,equal:p,serialize:g,parse:b};return xu.exports=S,xu.exports.default=S,xu.exports.fastUri=S,xu.exports}var w2;function AJ(){if(w2)return Ah;w2=1,Object.defineProperty(Ah,"__esModule",{value:!0});const e=CJ();return e.code='require("ajv/dist/runtime/uri").default',Ah.default=e,Ah}var S2;function IJ(){return S2||(S2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=ng();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=pt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=F1(),a=rg(),i=HM(),l=V1(),u=pt(),d=tg(),f=lm(),m=Mt(),p=TJ,g=AJ(),y=(ae,M)=>new RegExp(ae,M);y.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},R={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},E=200;function T(ae){var M,q,V,D,z,X,ue,ve,Ie,Ae,H,ne,_e,se,ce,Te,Pe,Xe,Ve,Ye,Z,re,oe,we,Re;const Ee=ae.strict,ke=(M=ae.code)===null||M===void 0?void 0:M.optimize,Je=ke===!0||ke===void 0?1:ke||0,rt=(V=(q=ae.code)===null||q===void 0?void 0:q.regExp)!==null&&V!==void 0?V:y,Tt=(D=ae.uriResolver)!==null&&D!==void 0?D:g.default;return{strictSchema:(X=(z=ae.strictSchema)!==null&&z!==void 0?z:Ee)!==null&&X!==void 0?X:!0,strictNumbers:(ve=(ue=ae.strictNumbers)!==null&&ue!==void 0?ue:Ee)!==null&&ve!==void 0?ve:!0,strictTypes:(Ae=(Ie=ae.strictTypes)!==null&&Ie!==void 0?Ie:Ee)!==null&&Ae!==void 0?Ae:"log",strictTuples:(ne=(H=ae.strictTuples)!==null&&H!==void 0?H:Ee)!==null&&ne!==void 0?ne:"log",strictRequired:(se=(_e=ae.strictRequired)!==null&&_e!==void 0?_e:Ee)!==null&&se!==void 0?se:!1,code:ae.code?{...ae.code,optimize:Je,regExp:rt}:{optimize:Je,regExp:rt},loopRequired:(ce=ae.loopRequired)!==null&&ce!==void 0?ce:E,loopEnum:(Te=ae.loopEnum)!==null&&Te!==void 0?Te:E,meta:(Pe=ae.meta)!==null&&Pe!==void 0?Pe:!0,messages:(Xe=ae.messages)!==null&&Xe!==void 0?Xe:!0,inlineRefs:(Ve=ae.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Ye=ae.schemaId)!==null&&Ye!==void 0?Ye:"$id",addUsedSchema:(Z=ae.addUsedSchema)!==null&&Z!==void 0?Z:!0,validateSchema:(re=ae.validateSchema)!==null&&re!==void 0?re:!0,validateFormats:(oe=ae.validateFormats)!==null&&oe!==void 0?oe:!0,unicodeRegExp:(we=ae.unicodeRegExp)!==null&&we!==void 0?we:!0,int32range:(Re=ae.int32range)!==null&&Re!==void 0?Re:!0,uriResolver:Tt}}class O{constructor(M={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,M=this.opts={...M,...T(M)};const{es5:q,lines:V}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:S,es5:q,lines:V}),this.logger=G(M.logger);const D=M.validateFormats;M.validateFormats=!1,this.RULES=(0,i.getRules)(),C.call(this,w,M,"NOT SUPPORTED"),C.call(this,R,M,"DEPRECATED","warn"),this._metaOpts=K.call(this),M.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),M.keywords&&$.call(this,M.keywords),typeof M.meta=="object"&&this.addMetaSchema(M.meta),N.call(this),M.validateFormats=D}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:M,meta:q,schemaId:V}=this.opts;let D=p;V==="id"&&(D={...p},D.id=D.$id,delete D.$id),q&&M&&this.addMetaSchema(D,D[V],!1)}defaultMeta(){const{meta:M,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof M=="object"?M[q]||M:void 0}validate(M,q){let V;if(typeof M=="string"){if(V=this.getSchema(M),!V)throw new Error(`no schema with key or ref "${M}"`)}else V=this.compile(M);const D=V(q);return"$async"in V||(this.errors=V.errors),D}compile(M,q){const V=this._addSchema(M,q);return V.validate||this._compileSchemaEnv(V)}compileAsync(M,q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:V}=this.opts;return D.call(this,M,q);async function D(Ae,H){await z.call(this,Ae.$schema);const ne=this._addSchema(Ae,H);return ne.validate||X.call(this,ne)}async function z(Ae){Ae&&!this.getSchema(Ae)&&await D.call(this,{$ref:Ae},!0)}async function X(Ae){try{return this._compileSchemaEnv(Ae)}catch(H){if(!(H instanceof a.default))throw H;return ue.call(this,H),await ve.call(this,H.missingSchema),X.call(this,Ae)}}function ue({missingSchema:Ae,missingRef:H}){if(this.refs[Ae])throw new Error(`AnySchema ${Ae} is loaded but ${H} cannot be resolved`)}async function ve(Ae){const H=await Ie.call(this,Ae);this.refs[Ae]||await z.call(this,H.$schema),this.refs[Ae]||this.addSchema(H,Ae,q)}async function Ie(Ae){const H=this._loading[Ae];if(H)return H;try{return await(this._loading[Ae]=V(Ae))}finally{delete this._loading[Ae]}}}addSchema(M,q,V,D=this.opts.validateSchema){if(Array.isArray(M)){for(const X of M)this.addSchema(X,void 0,V,D);return this}let z;if(typeof M=="object"){const{schemaId:X}=this.opts;if(z=M[X],z!==void 0&&typeof z!="string")throw new Error(`schema ${X} must be string`)}return q=(0,d.normalizeId)(q||z),this._checkUnique(q),this.schemas[q]=this._addSchema(M,V,q,D,!0),this}addMetaSchema(M,q,V=this.opts.validateSchema){return this.addSchema(M,q,!0,V),this}validateSchema(M,q){if(typeof M=="boolean")return!0;let V;if(V=M.$schema,V!==void 0&&typeof V!="string")throw new Error("$schema must be a string");if(V=V||this.opts.defaultMeta||this.defaultMeta(),!V)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const D=this.validate(V,M);if(!D&&q){const z="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(z);else throw new Error(z)}return D}getSchema(M){let q;for(;typeof(q=I.call(this,M))=="string";)M=q;if(q===void 0){const{schemaId:V}=this.opts,D=new l.SchemaEnv({schema:{},schemaId:V});if(q=l.resolveSchema.call(this,D,M),!q)return;this.refs[M]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(M){if(M instanceof RegExp)return this._removeAllSchemas(this.schemas,M),this._removeAllSchemas(this.refs,M),this;switch(typeof M){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const q=I.call(this,M);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[M],delete this.refs[M],this}case"object":{const q=M;this._cache.delete(q);let V=M[this.opts.schemaId];return V&&(V=(0,d.normalizeId)(V),delete this.schemas[V],delete this.refs[V]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(M){for(const q of M)this.addKeyword(q);return this}addKeyword(M,q){let V;if(typeof M=="string")V=M,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=V);else if(typeof M=="object"&&q===void 0){if(q=M,V=q.keyword,Array.isArray(V)&&!V.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(J.call(this,V,q),!q)return(0,m.eachItem)(V,z=>le.call(this,z)),this;Y.call(this,q);const D={...q,type:(0,f.getJSONTypes)(q.type),schemaType:(0,f.getJSONTypes)(q.schemaType)};return(0,m.eachItem)(V,D.type.length===0?z=>le.call(this,z,D):z=>D.type.forEach(X=>le.call(this,z,D,X))),this}getKeyword(M){const q=this.RULES.all[M];return typeof q=="object"?q.definition:!!q}removeKeyword(M){const{RULES:q}=this;delete q.keywords[M],delete q.all[M];for(const V of q.rules){const D=V.rules.findIndex(z=>z.keyword===M);D>=0&&V.rules.splice(D,1)}return this}addFormat(M,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[M]=q,this}errorsText(M=this.errors,{separator:q=", ",dataVar:V="data"}={}){return!M||M.length===0?"No errors":M.map(D=>`${V}${D.instancePath} ${D.message}`).reduce((D,z)=>D+q+z)}$dataMetaSchema(M,q){const V=this.RULES.all;M=JSON.parse(JSON.stringify(M));for(const D of q){const z=D.split("/").slice(1);let X=M;for(const ue of z)X=X[ue];for(const ue in V){const ve=V[ue];if(typeof ve!="object")continue;const{$data:Ie}=ve.definition,Ae=X[ue];Ie&&Ae&&(X[ue]=he(Ae))}}return M}_removeAllSchemas(M,q){for(const V in M){const D=M[V];(!q||q.test(V))&&(typeof D=="string"?delete M[V]:D&&!D.meta&&(this._cache.delete(D.schema),delete M[V]))}}_addSchema(M,q,V,D=this.opts.validateSchema,z=this.opts.addUsedSchema){let X;const{schemaId:ue}=this.opts;if(typeof M=="object")X=M[ue];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof M!="boolean")throw new Error("schema must be object or boolean")}let ve=this._cache.get(M);if(ve!==void 0)return ve;V=(0,d.normalizeId)(X||V);const Ie=d.getSchemaRefs.call(this,M,V);return ve=new l.SchemaEnv({schema:M,schemaId:ue,meta:q,baseId:V,localRefs:Ie}),this._cache.set(ve.schema,ve),z&&!V.startsWith("#")&&(V&&this._checkUnique(V),this.refs[V]=ve),D&&this.validateSchema(M,!0),ve}_checkUnique(M){if(this.schemas[M]||this.refs[M])throw new Error(`schema with key or id "${M}" already exists`)}_compileSchemaEnv(M){if(M.meta?this._compileMetaSchema(M):l.compileSchema.call(this,M),!M.validate)throw new Error("ajv implementation error");return M.validate}_compileMetaSchema(M){const q=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,M)}finally{this.opts=q}}}O.ValidationError=r.default,O.MissingRefError=a.default,e.default=O;function C(ae,M,q,V="error"){for(const D in ae){const z=D;z in M&&this.logger[V](`${q}: option ${D}. ${ae[z]}`)}}function I(ae){return ae=(0,d.normalizeId)(ae),this.schemas[ae]||this.refs[ae]}function N(){const ae=this.opts.schemas;if(ae)if(Array.isArray(ae))this.addSchema(ae);else for(const M in ae)this.addSchema(ae[M],M)}function P(){for(const ae in this.opts.formats){const M=this.opts.formats[ae];M&&this.addFormat(ae,M)}}function $(ae){if(Array.isArray(ae)){this.addVocabulary(ae);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const M in ae){const q=ae[M];q.keyword||(q.keyword=M),this.addKeyword(q)}}function K(){const ae={...this.opts};for(const M of b)delete ae[M];return ae}const F={log(){},warn(){},error(){}};function G(ae){if(ae===!1)return F;if(ae===void 0)return console;if(ae.log&&ae.warn&&ae.error)return ae;throw new Error("logger must implement log, warn and error methods")}const U=/^[a-z_$][a-z0-9_$:-]*$/i;function J(ae,M){const{RULES:q}=this;if((0,m.eachItem)(ae,V=>{if(q.keywords[V])throw new Error(`Keyword ${V} is already defined`);if(!U.test(V))throw new Error(`Keyword ${V} has invalid name`)}),!!M&&M.$data&&!("code"in M||"validate"in M))throw new Error('$data keyword must have "code" or "validate" function')}function le(ae,M,q){var V;const D=M?.post;if(q&&D)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:z}=this;let X=D?z.post:z.rules.find(({type:ve})=>ve===q);if(X||(X={type:q,rules:[]},z.rules.push(X)),z.keywords[ae]=!0,!M)return;const ue={keyword:ae,definition:{...M,type:(0,f.getJSONTypes)(M.type),schemaType:(0,f.getJSONTypes)(M.schemaType)}};M.before?B.call(this,X,ue,M.before):X.rules.push(ue),z.all[ae]=ue,(V=M.implements)===null||V===void 0||V.forEach(ve=>this.addKeyword(ve))}function B(ae,M,q){const V=ae.rules.findIndex(D=>D.keyword===q);V>=0?ae.rules.splice(V,0,M):(ae.rules.push(M),this.logger.warn(`rule ${q} is not defined`))}function Y(ae){let{metaSchema:M}=ae;M!==void 0&&(ae.$data&&this.opts.$data&&(M=he(M)),ae.validateSchema=this.compile(M,!0))}const W={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function he(ae){return{anyOf:[ae,W]}}})(x0)),x0}var Ih={},Nh={},kh={},E2;function NJ(){if(E2)return kh;E2=1,Object.defineProperty(kh,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return kh.default=e,kh}var xs={},R2;function kJ(){if(R2)return xs;R2=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.callRef=xs.getValidate=void 0;const e=rg(),t=Ko(),n=pt(),r=Ws(),a=V1(),i=Mt(),l={keyword:"$ref",schemaType:"string",code(f){const{gen:m,schema:p,it:g}=f,{baseId:y,schemaEnv:b,validateName:S,opts:w,self:R}=g,{root:E}=b;if((p==="#"||p==="#/")&&y===E.baseId)return O();const T=a.resolveRef.call(R,E,y,p);if(T===void 0)throw new e.default(g.opts.uriResolver,y,p);if(T instanceof a.SchemaEnv)return C(T);return I(T);function O(){if(b===E)return d(f,S,b,b.$async);const N=m.scopeValue("root",{ref:E});return d(f,(0,n._)`${N}.validate`,E,E.$async)}function C(N){const P=u(f,N);d(f,P,N,N.$async)}function I(N){const P=m.scopeValue("schema",w.code.source===!0?{ref:N,code:(0,n.stringify)(N)}:{ref:N}),$=m.name("valid"),K=f.subschema({schema:N,dataTypes:[],schemaPath:n.nil,topSchemaRef:P,errSchemaPath:p},$);f.mergeEvaluated(K),f.ok($)}}};function u(f,m){const{gen:p}=f;return m.validate?p.scopeValue("validate",{ref:m.validate}):(0,n._)`${p.scopeValue("wrapper",{ref:m})}.validate`}xs.getValidate=u;function d(f,m,p,g){const{gen:y,it:b}=f,{allErrors:S,schemaEnv:w,opts:R}=b,E=R.passContext?r.default.this:n.nil;g?T():O();function T(){if(!w.$async)throw new Error("async schema referenced by sync schema");const N=y.let("valid");y.try(()=>{y.code((0,n._)`await ${(0,t.callValidateCode)(f,m,E)}`),I(m),S||y.assign(N,!0)},P=>{y.if((0,n._)`!(${P} instanceof ${b.ValidationError})`,()=>y.throw(P)),C(P),S||y.assign(N,!1)}),f.ok(N)}function O(){f.result((0,t.callValidateCode)(f,m,E),()=>I(m),()=>C(m))}function C(N){const P=(0,n._)`${N}.errors`;y.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${P} : ${r.default.vErrors}.concat(${P})`),y.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function I(N){var P;if(!b.opts.unevaluated)return;const $=(P=p?.validate)===null||P===void 0?void 0:P.evaluated;if(b.props!==!0)if($&&!$.dynamicProps)$.props!==void 0&&(b.props=i.mergeEvaluated.props(y,$.props,b.props));else{const K=y.var("props",(0,n._)`${N}.evaluated.props`);b.props=i.mergeEvaluated.props(y,K,b.props,n.Name)}if(b.items!==!0)if($&&!$.dynamicItems)$.items!==void 0&&(b.items=i.mergeEvaluated.items(y,$.items,b.items));else{const K=y.var("items",(0,n._)`${N}.evaluated.items`);b.items=i.mergeEvaluated.items(y,K,b.items,n.Name)}}}return xs.callRef=d,xs.default=l,xs}var x2;function MJ(){if(x2)return Nh;x2=1,Object.defineProperty(Nh,"__esModule",{value:!0});const e=NJ(),t=kJ(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Nh.default=n,Nh}var Mh={},Ph={},T2;function PJ(){if(T2)return Ph;T2=1,Object.defineProperty(Ph,"__esModule",{value:!0});const e=pt(),t=e.operators,n={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},r={message:({keyword:i,schemaCode:l})=>(0,e.str)`must be ${n[i].okStr} ${l}`,params:({keyword:i,schemaCode:l})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${l}}`},a={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(i){const{keyword:l,data:u,schemaCode:d}=i;i.fail$data((0,e._)`${u} ${n[l].fail} ${d} || isNaN(${u})`)}};return Ph.default=a,Ph}var Dh={},O2;function DJ(){if(O2)return Dh;O2=1,Object.defineProperty(Dh,"__esModule",{value:!0});const e=pt(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:a,data:i,schemaCode:l,it:u}=r,d=u.opts.multipleOfPrecision,f=a.let("res"),m=d?(0,e._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${d}`:(0,e._)`${f} !== parseInt(${f})`;r.fail$data((0,e._)`(${l} === 0 || (${f} = ${i}/${l}, ${m}))`)}};return Dh.default=n,Dh}var Lh={},jh={},C2;function LJ(){if(C2)return jh;C2=1,Object.defineProperty(jh,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,a=0,i;for(;a<n;)r++,i=t.charCodeAt(a++),i>=55296&&i<=56319&&a<n&&(i=t.charCodeAt(a),(i&64512)===56320&&a++);return r}return jh.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',jh}var A2;function jJ(){if(A2)return Lh;A2=1,Object.defineProperty(Lh,"__esModule",{value:!0});const e=pt(),t=Mt(),n=LJ(),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:l}){const u=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${l} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:l,data:u,schemaCode:d,it:f}=i,m=l==="maxLength"?e.operators.GT:e.operators.LT,p=f.opts.unicode===!1?(0,e._)`${u}.length`:(0,e._)`${(0,t.useFunc)(i.gen,n.default)}(${u})`;i.fail$data((0,e._)`${p} ${m} ${d}`)}};return Lh.default=a,Lh}var $h={},I2;function $J(){if(I2)return $h;I2=1,Object.defineProperty($h,"__esModule",{value:!0});const e=Ko(),t=pt(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:a})=>(0,t.str)`must match pattern "${a}"`,params:({schemaCode:a})=>(0,t._)`{pattern: ${a}}`},code(a){const{data:i,$data:l,schema:u,schemaCode:d,it:f}=a,m=f.opts.unicodeRegExp?"u":"",p=l?(0,t._)`(new RegExp(${d}, ${m}))`:(0,e.usePattern)(a,u);a.fail$data((0,t._)`!${p}.test(${i})`)}};return $h.default=r,$h}var Uh={},N2;function UJ(){if(N2)return Uh;N2=1,Object.defineProperty(Uh,"__esModule",{value:!0});const e=pt(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:a}){const i=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:a,data:i,schemaCode:l}=r,u=a==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${i}).length ${u} ${l}`)}};return Uh.default=n,Uh}var zh={},k2;function zJ(){if(k2)return zh;k2=1,Object.defineProperty(zh,"__esModule",{value:!0});const e=Ko(),t=pt(),n=Mt(),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,t.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,t._)`{missingProperty: ${i}}`},code(i){const{gen:l,schema:u,schemaCode:d,data:f,$data:m,it:p}=i,{opts:g}=p;if(!m&&u.length===0)return;const y=u.length>=g.loopRequired;if(p.allErrors?b():S(),g.strictRequired){const E=i.parentSchema.properties,{definedProperties:T}=i.it;for(const O of u)if(E?.[O]===void 0&&!T.has(O)){const C=p.schemaEnv.baseId+p.errSchemaPath,I=`required property "${O}" is not defined at "${C}" (strictRequired)`;(0,n.checkStrictMode)(p,I,p.opts.strictRequired)}}function b(){if(y||m)i.block$data(t.nil,w);else for(const E of u)(0,e.checkReportMissingProp)(i,E)}function S(){const E=l.let("missing");if(y||m){const T=l.let("valid",!0);i.block$data(T,()=>R(E,T)),i.ok(T)}else l.if((0,e.checkMissingProp)(i,u,E)),(0,e.reportMissingProp)(i,E),l.else()}function w(){l.forOf("prop",d,E=>{i.setParams({missingProperty:E}),l.if((0,e.noPropertyInData)(l,f,E,g.ownProperties),()=>i.error())})}function R(E,T){i.setParams({missingProperty:E}),l.forOf(E,d,()=>{l.assign(T,(0,e.propertyInData)(l,f,E,g.ownProperties)),l.if((0,t.not)(T),()=>{i.error(),l.break()})},t.nil)}}};return zh.default=a,zh}var Fh={},M2;function FJ(){if(M2)return Fh;M2=1,Object.defineProperty(Fh,"__esModule",{value:!0});const e=pt(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:a}){const i=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:a,data:i,schemaCode:l}=r,u=a==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${i}.length ${u} ${l}`)}};return Fh.default=n,Fh}var Vh={},Bh={},P2;function B1(){if(P2)return Bh;P2=1,Object.defineProperty(Bh,"__esModule",{value:!0});const e=ZM();return e.code='require("ajv/dist/runtime/equal").default',Bh.default=e,Bh}var D2;function VJ(){if(D2)return Vh;D2=1,Object.defineProperty(Vh,"__esModule",{value:!0});const e=lm(),t=pt(),n=Mt(),r=B1(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:l,j:u}})=>(0,t.str)`must NOT have duplicate items (items ## ${u} and ${l} are identical)`,params:({params:{i:l,j:u}})=>(0,t._)`{i: ${l}, j: ${u}}`},code(l){const{gen:u,data:d,$data:f,schema:m,parentSchema:p,schemaCode:g,it:y}=l;if(!f&&!m)return;const b=u.let("valid"),S=p.items?(0,e.getSchemaTypes)(p.items):[];l.block$data(b,w,(0,t._)`${g} === false`),l.ok(b);function w(){const O=u.let("i",(0,t._)`${d}.length`),C=u.let("j");l.setParams({i:O,j:C}),u.assign(b,!0),u.if((0,t._)`${O} > 1`,()=>(R()?E:T)(O,C))}function R(){return S.length>0&&!S.some(O=>O==="object"||O==="array")}function E(O,C){const I=u.name("item"),N=(0,e.checkDataTypes)(S,I,y.opts.strictNumbers,e.DataType.Wrong),P=u.const("indices",(0,t._)`{}`);u.for((0,t._)`;${O}--;`,()=>{u.let(I,(0,t._)`${d}[${O}]`),u.if(N,(0,t._)`continue`),S.length>1&&u.if((0,t._)`typeof ${I} == "string"`,(0,t._)`${I} += "_"`),u.if((0,t._)`typeof ${P}[${I}] == "number"`,()=>{u.assign(C,(0,t._)`${P}[${I}]`),l.error(),u.assign(b,!1).break()}).code((0,t._)`${P}[${I}] = ${O}`)})}function T(O,C){const I=(0,n.useFunc)(u,r.default),N=u.name("outer");u.label(N).for((0,t._)`;${O}--;`,()=>u.for((0,t._)`${C} = ${O}; ${C}--;`,()=>u.if((0,t._)`${I}(${d}[${O}], ${d}[${C}])`,()=>{l.error(),u.assign(b,!1).break(N)})))}}};return Vh.default=i,Vh}var qh={},L2;function BJ(){if(L2)return qh;L2=1,Object.defineProperty(qh,"__esModule",{value:!0});const e=pt(),t=Mt(),n=B1(),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},code(i){const{gen:l,data:u,$data:d,schemaCode:f,schema:m}=i;d||m&&typeof m=="object"?i.fail$data((0,e._)`!${(0,t.useFunc)(l,n.default)}(${u}, ${f})`):i.fail((0,e._)`${m} !== ${u}`)}};return qh.default=a,qh}var Hh={},j2;function qJ(){if(j2)return Hh;j2=1,Object.defineProperty(Hh,"__esModule",{value:!0});const e=pt(),t=Mt(),n=B1(),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},code(i){const{gen:l,data:u,$data:d,schema:f,schemaCode:m,it:p}=i;if(!d&&f.length===0)throw new Error("enum must have non-empty array");const g=f.length>=p.opts.loopEnum;let y;const b=()=>y??(y=(0,t.useFunc)(l,n.default));let S;if(g||d)S=l.let("valid"),i.block$data(S,w);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const E=l.const("vSchema",m);S=(0,e.or)(...f.map((T,O)=>R(E,O)))}i.pass(S);function w(){l.assign(S,!1),l.forOf("v",m,E=>l.if((0,e._)`${b()}(${u}, ${E})`,()=>l.assign(S,!0).break()))}function R(E,T){const O=f[T];return typeof O=="object"&&O!==null?(0,e._)`${b()}(${u}, ${E}[${T}])`:(0,e._)`${u} === ${O}`}}};return Hh.default=a,Hh}var $2;function HJ(){if($2)return Mh;$2=1,Object.defineProperty(Mh,"__esModule",{value:!0});const e=PJ(),t=DJ(),n=jJ(),r=$J(),a=UJ(),i=zJ(),l=FJ(),u=VJ(),d=BJ(),f=qJ(),m=[e.default,t.default,n.default,r.default,a.default,i.default,l.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,f.default];return Mh.default=m,Mh}var Gh={},Ll={},U2;function YM(){if(U2)return Ll;U2=1,Object.defineProperty(Ll,"__esModule",{value:!0}),Ll.validateAdditionalItems=void 0;const e=pt(),t=Mt(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{parentSchema:l,it:u}=i,{items:d}=l;if(!Array.isArray(d)){(0,t.checkStrictMode)(u,'"additionalItems" is ignored when "items" is not an array of schemas');return}a(i,d)}};function a(i,l){const{gen:u,schema:d,data:f,keyword:m,it:p}=i;p.items=!0;const g=u.const("len",(0,e._)`${f}.length`);if(d===!1)i.setParams({len:l.length}),i.pass((0,e._)`${g} <= ${l.length}`);else if(typeof d=="object"&&!(0,t.alwaysValidSchema)(p,d)){const b=u.var("valid",(0,e._)`${g} <= ${l.length}`);u.if((0,e.not)(b),()=>y(b)),i.ok(b)}function y(b){u.forRange("i",l.length,g,S=>{i.subschema({keyword:m,dataProp:S,dataPropType:t.Type.Num},b),p.allErrors||u.if((0,e.not)(b),()=>u.break())})}}return Ll.validateAdditionalItems=a,Ll.default=r,Ll}var Zh={},jl={},z2;function WM(){if(z2)return jl;z2=1,Object.defineProperty(jl,"__esModule",{value:!0}),jl.validateTuple=void 0;const e=pt(),t=Mt(),n=Ko(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:l,it:u}=i;if(Array.isArray(l))return a(i,"additionalItems",l);u.items=!0,!(0,t.alwaysValidSchema)(u,l)&&i.ok((0,n.validateArray)(i))}};function a(i,l,u=i.schema){const{gen:d,parentSchema:f,data:m,keyword:p,it:g}=i;S(f),g.opts.unevaluated&&u.length&&g.items!==!0&&(g.items=t.mergeEvaluated.items(d,u.length,g.items));const y=d.name("valid"),b=d.const("len",(0,e._)`${m}.length`);u.forEach((w,R)=>{(0,t.alwaysValidSchema)(g,w)||(d.if((0,e._)`${b} > ${R}`,()=>i.subschema({keyword:p,schemaProp:R,dataProp:R},y)),i.ok(y))});function S(w){const{opts:R,errSchemaPath:E}=g,T=u.length,O=T===w.minItems&&(T===w.maxItems||w[l]===!1);if(R.strictTuples&&!O){const C=`"${p}" is ${T}-tuple, but minItems or maxItems/${l} are not specified or different at path "${E}"`;(0,t.checkStrictMode)(g,C,R.strictTuples)}}}return jl.validateTuple=a,jl.default=r,jl}var F2;function GJ(){if(F2)return Zh;F2=1,Object.defineProperty(Zh,"__esModule",{value:!0});const e=WM(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return Zh.default=t,Zh}var Kh={},V2;function ZJ(){if(V2)return Kh;V2=1,Object.defineProperty(Kh,"__esModule",{value:!0});const e=pt(),t=Mt(),n=Ko(),r=YM(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},code(l){const{schema:u,parentSchema:d,it:f}=l,{prefixItems:m}=d;f.items=!0,!(0,t.alwaysValidSchema)(f,u)&&(m?(0,r.validateAdditionalItems)(l,m):l.ok((0,n.validateArray)(l)))}};return Kh.default=i,Kh}var Yh={},B2;function KJ(){if(B2)return Yh;B2=1,Object.defineProperty(Yh,"__esModule",{value:!0});const e=pt(),t=Mt(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:a,max:i}})=>i===void 0?(0,e.str)`must contain at least ${a} valid item(s)`:(0,e.str)`must contain at least ${a} and no more than ${i} valid item(s)`,params:({params:{min:a,max:i}})=>i===void 0?(0,e._)`{minContains: ${a}}`:(0,e._)`{minContains: ${a}, maxContains: ${i}}`},code(a){const{gen:i,schema:l,parentSchema:u,data:d,it:f}=a;let m,p;const{minContains:g,maxContains:y}=u;f.opts.next?(m=g===void 0?1:g,p=y):m=1;const b=i.const("len",(0,e._)`${d}.length`);if(a.setParams({min:m,max:p}),p===void 0&&m===0){(0,t.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&m>p){(0,t.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),a.fail();return}if((0,t.alwaysValidSchema)(f,l)){let T=(0,e._)`${b} >= ${m}`;p!==void 0&&(T=(0,e._)`${T} && ${b} <= ${p}`),a.pass(T);return}f.items=!0;const S=i.name("valid");p===void 0&&m===1?R(S,()=>i.if(S,()=>i.break())):m===0?(i.let(S,!0),p!==void 0&&i.if((0,e._)`${d}.length > 0`,w)):(i.let(S,!1),w()),a.result(S,()=>a.reset());function w(){const T=i.name("_valid"),O=i.let("count",0);R(T,()=>i.if(T,()=>E(O)))}function R(T,O){i.forRange("i",0,b,C=>{a.subschema({keyword:"contains",dataProp:C,dataPropType:t.Type.Num,compositeRule:!0},T),O()})}function E(T){i.code((0,e._)`${T}++`),p===void 0?i.if((0,e._)`${T} >= ${m}`,()=>i.assign(S,!0).break()):(i.if((0,e._)`${T} > ${p}`,()=>i.assign(S,!1).break()),m===1?i.assign(S,!0):i.if((0,e._)`${T} >= ${m}`,()=>i.assign(S,!0)))}}};return Yh.default=r,Yh}var P0={},q2;function YJ(){return q2||(q2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=pt(),n=Mt(),r=Ko();e.error={message:({params:{property:d,depsCount:f,deps:m}})=>{const p=f===1?"property":"properties";return(0,t.str)`must have ${p} ${m} when property ${d} is present`},params:({params:{property:d,depsCount:f,deps:m,missingProperty:p}})=>(0,t._)`{property: ${d},
|
|
168
|
+
missingProperty: ${p},
|
|
169
|
+
depsCount: ${f},
|
|
170
|
+
deps: ${m}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(d){const[f,m]=i(d);l(d,f),u(d,m)}};function i({schema:d}){const f={},m={};for(const p in d){if(p==="__proto__")continue;const g=Array.isArray(d[p])?f:m;g[p]=d[p]}return[f,m]}function l(d,f=d.schema){const{gen:m,data:p,it:g}=d;if(Object.keys(f).length===0)return;const y=m.let("missing");for(const b in f){const S=f[b];if(S.length===0)continue;const w=(0,r.propertyInData)(m,p,b,g.opts.ownProperties);d.setParams({property:b,depsCount:S.length,deps:S.join(", ")}),g.allErrors?m.if(w,()=>{for(const R of S)(0,r.checkReportMissingProp)(d,R)}):(m.if((0,t._)`${w} && (${(0,r.checkMissingProp)(d,S,y)})`),(0,r.reportMissingProp)(d,y),m.else())}}e.validatePropertyDeps=l;function u(d,f=d.schema){const{gen:m,data:p,keyword:g,it:y}=d,b=m.name("valid");for(const S in f)(0,n.alwaysValidSchema)(y,f[S])||(m.if((0,r.propertyInData)(m,p,S,y.opts.ownProperties),()=>{const w=d.subschema({keyword:g,schemaProp:S},b);d.mergeValidEvaluated(w,b)},()=>m.var(b,!0)),d.ok(b))}e.validateSchemaDeps=u,e.default=a})(P0)),P0}var Wh={},H2;function WJ(){if(H2)return Wh;H2=1,Object.defineProperty(Wh,"__esModule",{value:!0});const e=pt(),t=Mt(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:a})=>(0,e._)`{propertyName: ${a.propertyName}}`},code(a){const{gen:i,schema:l,data:u,it:d}=a;if((0,t.alwaysValidSchema)(d,l))return;const f=i.name("valid");i.forIn("key",u,m=>{a.setParams({propertyName:m}),a.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},f),i.if((0,e.not)(f),()=>{a.error(!0),d.allErrors||i.break()})}),a.ok(f)}};return Wh.default=r,Wh}var Qh={},G2;function QM(){if(G2)return Qh;G2=1,Object.defineProperty(Qh,"__esModule",{value:!0});const e=Ko(),t=pt(),n=Ws(),r=Mt(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:l})=>(0,t._)`{additionalProperty: ${l.additionalProperty}}`},code(l){const{gen:u,schema:d,parentSchema:f,data:m,errsCount:p,it:g}=l;if(!p)throw new Error("ajv implementation error");const{allErrors:y,opts:b}=g;if(g.props=!0,b.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(g,d))return;const S=(0,e.allSchemaProperties)(f.properties),w=(0,e.allSchemaProperties)(f.patternProperties);R(),l.ok((0,t._)`${p} === ${n.default.errors}`);function R(){u.forIn("key",m,I=>{!S.length&&!w.length?O(I):u.if(E(I),()=>O(I))})}function E(I){let N;if(S.length>8){const P=(0,r.schemaRefOrVal)(g,f.properties,"properties");N=(0,e.isOwnProperty)(u,P,I)}else S.length?N=(0,t.or)(...S.map(P=>(0,t._)`${I} === ${P}`)):N=t.nil;return w.length&&(N=(0,t.or)(N,...w.map(P=>(0,t._)`${(0,e.usePattern)(l,P)}.test(${I})`))),(0,t.not)(N)}function T(I){u.code((0,t._)`delete ${m}[${I}]`)}function O(I){if(b.removeAdditional==="all"||b.removeAdditional&&d===!1){T(I);return}if(d===!1){l.setParams({additionalProperty:I}),l.error(),y||u.break();return}if(typeof d=="object"&&!(0,r.alwaysValidSchema)(g,d)){const N=u.name("valid");b.removeAdditional==="failing"?(C(I,N,!1),u.if((0,t.not)(N),()=>{l.reset(),T(I)})):(C(I,N),y||u.if((0,t.not)(N),()=>u.break()))}}function C(I,N,P){const $={keyword:"additionalProperties",dataProp:I,dataPropType:r.Type.Str};P===!1&&Object.assign($,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema($,N)}}};return Qh.default=i,Qh}var Xh={},Z2;function QJ(){if(Z2)return Xh;Z2=1,Object.defineProperty(Xh,"__esModule",{value:!0});const e=ng(),t=Ko(),n=Mt(),r=QM(),a={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:l,schema:u,parentSchema:d,data:f,it:m}=i;m.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(m,r.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(u);for(const w of p)m.definedProperties.add(w);m.opts.unevaluated&&p.length&&m.props!==!0&&(m.props=n.mergeEvaluated.props(l,(0,n.toHash)(p),m.props));const g=p.filter(w=>!(0,n.alwaysValidSchema)(m,u[w]));if(g.length===0)return;const y=l.name("valid");for(const w of g)b(w)?S(w):(l.if((0,t.propertyInData)(l,f,w,m.opts.ownProperties)),S(w),m.allErrors||l.else().var(y,!0),l.endIf()),i.it.definedProperties.add(w),i.ok(y);function b(w){return m.opts.useDefaults&&!m.compositeRule&&u[w].default!==void 0}function S(w){i.subschema({keyword:"properties",schemaProp:w,dataProp:w},y)}}};return Xh.default=a,Xh}var Jh={},K2;function XJ(){if(K2)return Jh;K2=1,Object.defineProperty(Jh,"__esModule",{value:!0});const e=Ko(),t=pt(),n=Mt(),r=Mt(),a={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:l,schema:u,data:d,parentSchema:f,it:m}=i,{opts:p}=m,g=(0,e.allSchemaProperties)(u),y=g.filter(O=>(0,n.alwaysValidSchema)(m,u[O]));if(g.length===0||y.length===g.length&&(!m.opts.unevaluated||m.props===!0))return;const b=p.strictSchema&&!p.allowMatchingProperties&&f.properties,S=l.name("valid");m.props!==!0&&!(m.props instanceof t.Name)&&(m.props=(0,r.evaluatedPropsToName)(l,m.props));const{props:w}=m;R();function R(){for(const O of g)b&&E(O),m.allErrors?T(O):(l.var(S,!0),T(O),l.if(S))}function E(O){for(const C in b)new RegExp(O).test(C)&&(0,n.checkStrictMode)(m,`property ${C} matches pattern ${O} (use allowMatchingProperties)`)}function T(O){l.forIn("key",d,C=>{l.if((0,t._)`${(0,e.usePattern)(i,O)}.test(${C})`,()=>{const I=y.includes(O);I||i.subschema({keyword:"patternProperties",schemaProp:O,dataProp:C,dataPropType:r.Type.Str},S),m.opts.unevaluated&&w!==!0?l.assign((0,t._)`${w}[${C}]`,!0):!I&&!m.allErrors&&l.if((0,t.not)(S),()=>l.break())})})}}};return Jh.default=a,Jh}var ep={},Y2;function JJ(){if(Y2)return ep;Y2=1,Object.defineProperty(ep,"__esModule",{value:!0});const e=Mt(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:a,it:i}=n;if((0,e.alwaysValidSchema)(i,a)){n.fail();return}const l=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),n.failResult(l,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return ep.default=t,ep}var tp={},W2;function eee(){if(W2)return tp;W2=1,Object.defineProperty(tp,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ko().validateUnion,error:{message:"must match a schema in anyOf"}};return tp.default=t,tp}var np={},Q2;function tee(){if(Q2)return np;Q2=1,Object.defineProperty(np,"__esModule",{value:!0});const e=pt(),t=Mt(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:a})=>(0,e._)`{passingSchemas: ${a.passing}}`},code(a){const{gen:i,schema:l,parentSchema:u,it:d}=a;if(!Array.isArray(l))throw new Error("ajv implementation error");if(d.opts.discriminator&&u.discriminator)return;const f=l,m=i.let("valid",!1),p=i.let("passing",null),g=i.name("_valid");a.setParams({passing:p}),i.block(y),a.result(m,()=>a.reset(),()=>a.error(!0));function y(){f.forEach((b,S)=>{let w;(0,t.alwaysValidSchema)(d,b)?i.var(g,!0):w=a.subschema({keyword:"oneOf",schemaProp:S,compositeRule:!0},g),S>0&&i.if((0,e._)`${g} && ${m}`).assign(m,!1).assign(p,(0,e._)`[${p}, ${S}]`).else(),i.if(g,()=>{i.assign(m,!0),i.assign(p,S),w&&a.mergeEvaluated(w,e.Name)})})}}};return np.default=r,np}var rp={},X2;function nee(){if(X2)return rp;X2=1,Object.defineProperty(rp,"__esModule",{value:!0});const e=Mt(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:a,it:i}=n;if(!Array.isArray(a))throw new Error("ajv implementation error");const l=r.name("valid");a.forEach((u,d)=>{if((0,e.alwaysValidSchema)(i,u))return;const f=n.subschema({keyword:"allOf",schemaProp:d},l);n.ok(l),n.mergeEvaluated(f)})}};return rp.default=t,rp}var op={},J2;function ree(){if(J2)return op;J2=1,Object.defineProperty(op,"__esModule",{value:!0});const e=pt(),t=Mt(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:l,parentSchema:u,it:d}=i;u.then===void 0&&u.else===void 0&&(0,t.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const f=a(d,"then"),m=a(d,"else");if(!f&&!m)return;const p=l.let("valid",!0),g=l.name("_valid");if(y(),i.reset(),f&&m){const S=l.let("ifClause");i.setParams({ifClause:S}),l.if(g,b("then",S),b("else",S))}else f?l.if(g,b("then")):l.if((0,e.not)(g),b("else"));i.pass(p,()=>i.error(!0));function y(){const S=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);i.mergeEvaluated(S)}function b(S,w){return()=>{const R=i.subschema({keyword:S},g);l.assign(p,g),i.mergeValidEvaluated(R,p),w?l.assign(w,(0,e._)`${S}`):i.setParams({ifClause:S})}}}};function a(i,l){const u=i.schema[l];return u!==void 0&&!(0,t.alwaysValidSchema)(i,u)}return op.default=r,op}var ap={},eC;function oee(){if(eC)return ap;eC=1,Object.defineProperty(ap,"__esModule",{value:!0});const e=Mt(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:a}){r.if===void 0&&(0,e.checkStrictMode)(a,`"${n}" without "if" is ignored`)}};return ap.default=t,ap}var tC;function aee(){if(tC)return Gh;tC=1,Object.defineProperty(Gh,"__esModule",{value:!0});const e=YM(),t=GJ(),n=WM(),r=ZJ(),a=KJ(),i=YJ(),l=WJ(),u=QM(),d=QJ(),f=XJ(),m=JJ(),p=eee(),g=tee(),y=nee(),b=ree(),S=oee();function w(R=!1){const E=[m.default,p.default,g.default,y.default,b.default,S.default,l.default,u.default,i.default,d.default,f.default];return R?E.push(t.default,r.default):E.push(e.default,n.default),E.push(a.default),E}return Gh.default=w,Gh}var sp={},ip={},nC;function see(){if(nC)return ip;nC=1,Object.defineProperty(ip,"__esModule",{value:!0});const e=pt(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,a){const{gen:i,data:l,$data:u,schema:d,schemaCode:f,it:m}=r,{opts:p,errSchemaPath:g,schemaEnv:y,self:b}=m;if(!p.validateFormats)return;u?S():w();function S(){const R=i.scopeValue("formats",{ref:b.formats,code:p.code.formats}),E=i.const("fDef",(0,e._)`${R}[${f}]`),T=i.let("fType"),O=i.let("format");i.if((0,e._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>i.assign(T,(0,e._)`${E}.type || "string"`).assign(O,(0,e._)`${E}.validate`),()=>i.assign(T,(0,e._)`"string"`).assign(O,E)),r.fail$data((0,e.or)(C(),I()));function C(){return p.strictSchema===!1?e.nil:(0,e._)`${f} && !${O}`}function I(){const N=y.$async?(0,e._)`(${E}.async ? await ${O}(${l}) : ${O}(${l}))`:(0,e._)`${O}(${l})`,P=(0,e._)`(typeof ${O} == "function" ? ${N} : ${O}.test(${l}))`;return(0,e._)`${O} && ${O} !== true && ${T} === ${a} && !${P}`}}function w(){const R=b.formats[d];if(!R){C();return}if(R===!0)return;const[E,T,O]=I(R);E===a&&r.pass(N());function C(){if(p.strictSchema===!1){b.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${d}" ignored in schema at path "${g}"`}}function I(P){const $=P instanceof RegExp?(0,e.regexpCode)(P):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(d)}`:void 0,K=i.scopeValue("formats",{key:d,ref:P,code:$});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,e._)`${K}.validate`]:["string",P,K]}function N(){if(typeof R=="object"&&!(R instanceof RegExp)&&R.async){if(!y.$async)throw new Error("async format in sync schema");return(0,e._)`await ${O}(${l})`}return typeof T=="function"?(0,e._)`${O}(${l})`:(0,e._)`${O}.test(${l})`}}}};return ip.default=n,ip}var rC;function iee(){if(rC)return sp;rC=1,Object.defineProperty(sp,"__esModule",{value:!0});const t=[see().default];return sp.default=t,sp}var bi={},oC;function lee(){return oC||(oC=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.contentVocabulary=bi.metadataVocabulary=void 0,bi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],bi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),bi}var aC;function cee(){if(aC)return Ih;aC=1,Object.defineProperty(Ih,"__esModule",{value:!0});const e=MJ(),t=HJ(),n=aee(),r=iee(),a=lee(),i=[e.default,t.default,(0,n.default)(),r.default,a.metadataVocabulary,a.contentVocabulary];return Ih.default=i,Ih}var lp={},Tu={},sC;function uee(){if(sC)return Tu;sC=1,Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Tu.DiscrError=e={})),Tu}var iC;function dee(){if(iC)return lp;iC=1,Object.defineProperty(lp,"__esModule",{value:!0});const e=pt(),t=uee(),n=V1(),r=rg(),a=Mt(),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:u,tagName:d}})=>u===t.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:u,tag:d,tagName:f}})=>(0,e._)`{error: ${u}, tag: ${f}, tagValue: ${d}}`},code(u){const{gen:d,data:f,schema:m,parentSchema:p,it:g}=u,{oneOf:y}=p;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=m.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(m.mapping)throw new Error("discriminator: mapping is not supported");if(!y)throw new Error("discriminator: requires oneOf keyword");const S=d.let("valid",!1),w=d.const("tag",(0,e._)`${f}${(0,e.getProperty)(b)}`);d.if((0,e._)`typeof ${w} == "string"`,()=>R(),()=>u.error(!1,{discrError:t.DiscrError.Tag,tag:w,tagName:b})),u.ok(S);function R(){const O=T();d.if(!1);for(const C in O)d.elseIf((0,e._)`${w} === ${C}`),d.assign(S,E(O[C]));d.else(),u.error(!1,{discrError:t.DiscrError.Mapping,tag:w,tagName:b}),d.endIf()}function E(O){const C=d.name("valid"),I=u.subschema({keyword:"oneOf",schemaProp:O},C);return u.mergeEvaluated(I,e.Name),C}function T(){var O;const C={},I=P(p);let N=!0;for(let F=0;F<y.length;F++){let G=y[F];if(G?.$ref&&!(0,a.schemaHasRulesButRef)(G,g.self.RULES)){const J=G.$ref;if(G=n.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,J),G instanceof n.SchemaEnv&&(G=G.schema),G===void 0)throw new r.default(g.opts.uriResolver,g.baseId,J)}const U=(O=G?.properties)===null||O===void 0?void 0:O[b];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);N=N&&(I||P(G)),$(U,F)}if(!N)throw new Error(`discriminator: "${b}" must be required`);return C;function P({required:F}){return Array.isArray(F)&&F.includes(b)}function $(F,G){if(F.const)K(F.const,G);else if(F.enum)for(const U of F.enum)K(U,G);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function K(F,G){if(typeof F!="string"||F in C)throw new Error(`discriminator: "${b}" values must be unique strings`);C[F]=G}}}};return lp.default=l,lp}const fee="http://json-schema.org/draft-07/schema#",hee="http://json-schema.org/draft-07/schema#",pee="Core schema meta-schema",mee={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},gee=["object","boolean"],vee={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},yee={$schema:fee,$id:hee,title:pee,definitions:mee,type:gee,properties:vee,default:!0};var lC;function XM(){return lC||(lC=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=IJ(),r=cee(),a=dee(),i=yee,l=["/properties"],u="http://json-schema.org/draft-07/schema";class d extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(i,l):i;this.addMetaSchema(b,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}t.Ajv=d,e.exports=t=d,e.exports.Ajv=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var f=ng();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var m=pt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return m.CodeGen}});var p=F1();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var g=rg();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(xh,xh.exports)),xh.exports}var _ee=XM();const bee=Ha(_ee);var cp={exports:{}},D0={},cC;function wee(){return cC||(cC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(F,G){return{validate:F,compare:G}}e.fullFormats={date:t(i,l),time:t(d(!0),f),"date-time":t(g(!0),y),"iso-time":t(d(),m),"iso-date-time":t(g(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:R,"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|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\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:K,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:T,int32:{type:"number",validate:I},int64:{type:"number",validate:N},float:{type:"number",validate:P},double:{type:"number",validate:P},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,y),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),"iso-date-time":t(/^\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,b),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},e.formatNames=Object.keys(e.fullFormats);function n(F){return F%4===0&&(F%100!==0||F%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,a=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(F){const G=r.exec(F);if(!G)return!1;const U=+G[1],J=+G[2],le=+G[3];return J>=1&&J<=12&&le>=1&&le<=(J===2&&n(U)?29:a[J])}function l(F,G){if(F&&G)return F>G?1:F<G?-1:0}const u=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function d(F){return function(U){const J=u.exec(U);if(!J)return!1;const le=+J[1],B=+J[2],Y=+J[3],W=J[4],he=J[5]==="-"?-1:1,ae=+(J[6]||0),M=+(J[7]||0);if(ae>23||M>59||F&&!W)return!1;if(le<=23&&B<=59&&Y<60)return!0;const q=B-M*he,V=le-ae*he-(q<0?1:0);return(V===23||V===-1)&&(q===59||q===-1)&&Y<61}}function f(F,G){if(!(F&&G))return;const U=new Date("2020-01-01T"+F).valueOf(),J=new Date("2020-01-01T"+G).valueOf();if(U&&J)return U-J}function m(F,G){if(!(F&&G))return;const U=u.exec(F),J=u.exec(G);if(U&&J)return F=U[1]+U[2]+U[3],G=J[1]+J[2]+J[3],F>G?1:F<G?-1:0}const p=/t|\s/i;function g(F){const G=d(F);return function(J){const le=J.split(p);return le.length===2&&i(le[0])&&G(le[1])}}function y(F,G){if(!(F&&G))return;const U=new Date(F).valueOf(),J=new Date(G).valueOf();if(U&&J)return U-J}function b(F,G){if(!(F&&G))return;const[U,J]=F.split(p),[le,B]=G.split(p),Y=l(U,le);if(Y!==void 0)return Y||f(J,B)}const S=/\/|:/,w=/^(?:[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 R(F){return S.test(F)&&w.test(F)}const E=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function T(F){return E.lastIndex=0,E.test(F)}const O=-2147483648,C=2**31-1;function I(F){return Number.isInteger(F)&&F<=C&&F>=O}function N(F){return Number.isInteger(F)}function P(){return!0}const $=/[^\\]\\Z/;function K(F){if($.test(F))return!1;try{return new RegExp(F),!0}catch{return!1}}})(D0)),D0}var L0={},uC;function See(){return uC||(uC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=XM(),n=pt(),r=n.operators,a={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}},i={message:({keyword:u,schemaCode:d})=>(0,n.str)`should be ${a[u].okStr} ${d}`,params:({keyword:u,schemaCode:d})=>(0,n._)`{comparison: ${a[u].okStr}, limit: ${d}}`};e.formatLimitDefinition={keyword:Object.keys(a),type:"string",schemaType:"string",$data:!0,error:i,code(u){const{gen:d,data:f,schemaCode:m,keyword:p,it:g}=u,{opts:y,self:b}=g;if(!y.validateFormats)return;const S=new t.KeywordCxt(g,b.RULES.all.format.definition,"format");S.$data?w():R();function w(){const T=d.scopeValue("formats",{ref:b.formats,code:y.code.formats}),O=d.const("fmt",(0,n._)`${T}[${S.schemaCode}]`);u.fail$data((0,n.or)((0,n._)`typeof ${O} != "object"`,(0,n._)`${O} instanceof RegExp`,(0,n._)`typeof ${O}.compare != "function"`,E(O)))}function R(){const T=S.schema,O=b.formats[T];if(!O||O===!0)return;if(typeof O!="object"||O instanceof RegExp||typeof O.compare!="function")throw new Error(`"${p}": format "${T}" does not define "compare" function`);const C=d.scopeValue("formats",{key:T,ref:O,code:y.code.formats?(0,n._)`${y.code.formats}${(0,n.getProperty)(T)}`:void 0});u.fail$data(E(C))}function E(T){return(0,n._)`${T}.compare(${f}, ${m}) ${a[p].fail} 0`}},dependencies:["format"]};const l=u=>(u.addKeyword(e.formatLimitDefinition),u);e.default=l})(L0)),L0}var dC;function Eee(){return dC||(dC=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=wee(),r=See(),a=pt(),i=new a.Name("fullFormats"),l=new a.Name("fastFormats"),u=(f,m={keywords:!0})=>{if(Array.isArray(m))return d(f,m,n.fullFormats,i),f;const[p,g]=m.mode==="fast"?[n.fastFormats,l]:[n.fullFormats,i],y=m.formats||n.formatNames;return d(f,y,p,g),m.keywords&&(0,r.default)(f),f};u.get=(f,m="full")=>{const g=(m==="fast"?n.fastFormats:n.fullFormats)[f];if(!g)throw new Error(`Unknown format "${f}"`);return g};function d(f,m,p,g){var y,b;(y=(b=f.opts.code).formats)!==null&&y!==void 0||(b.formats=(0,a._)`require("ajv-formats/dist/formats").${g}`);for(const S of m)f.addFormat(S,p[S])}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u})(cp,cp.exports)),cp.exports}var Ree=Eee();const xee=Ha(Ree);function Tee(){const e=new bee({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return xee(e),e}class Oee{constructor(t){this._ajv=t??Tee()}getValidator(t){const n="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return r=>n(r)?{valid:!0,data:r,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}}class Cee{constructor(t){this._client=t}async*callToolStream(t,n=Jm,r){const a=this._client,i={...r,task:r?.task??(a.isToolTask(t.name)?{}:void 0)},l=a.requestStream({method:"tools/call",params:t},n,i),u=a.getToolOutputValidator(t.name);for await(const d of l){if(d.type==="result"&&u){const f=d.result;if(!f.structuredContent&&!f.isError){yield{type:"error",error:new Qe(ot.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`)};return}if(f.structuredContent)try{const m=u(f.structuredContent);if(!m.valid){yield{type:"error",error:new Qe(ot.InvalidParams,`Structured content does not match the tool's output schema: ${m.errorMessage}`)};return}}catch(m){if(m instanceof Qe){yield{type:"error",error:m};return}yield{type:"error",error:new Qe(ot.InvalidParams,`Failed to validate structured content: ${m instanceof Error?m.message:String(m)}`)};return}}yield d}}async getTask(t,n){return this._client.getTask({taskId:t},n)}async getTaskResult(t,n,r){return this._client.getTaskResult({taskId:t},n,r)}async listTasks(t,n){return this._client.listTasks(t?{cursor:t}:void 0,n)}async cancelTask(t,n){return this._client.cancelTask({taskId:t},n)}requestStream(t,n,r){return this._client.requestStream(t,n,r)}}function Aee(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${n} does not support task creation for tools/call (required for ${t})`);break}}function Iee(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break}}function wp(e,t){if(!(!e||t===null||typeof t!="object")){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){const n=t,r=e.properties;for(const a of Object.keys(r)){const i=r[a];n[a]===void 0&&Object.prototype.hasOwnProperty.call(i,"default")&&(n[a]=i.default),n[a]!==void 0&&wp(i,n[a])}}if(Array.isArray(e.anyOf))for(const n of e.anyOf)typeof n!="boolean"&&wp(n,t);if(Array.isArray(e.oneOf))for(const n of e.oneOf)typeof n!="boolean"&&wp(n,t)}}function Nee(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};const t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}let kee=class extends hJ{constructor(t,n){super(n),this._clientInfo=t,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=n?.capabilities??{},this._jsonSchemaValidator=n?.jsonSchemaValidator??new Oee,n?.listChanged&&(this._pendingListChangedConfig=n.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",$M,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",LM,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",MM,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new Cee(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=pJ(this._capabilities,t)}setRequestHandler(t,n){const a=yM(t)?.method;if(!a)throw new Error("Schema is missing a method literal");let i;if(Ym(a)){const u=a;i=u._zod?.def?.value??u.value}else{const u=a;i=u._def?.value??u.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");const l=i;if(l==="elicitation/create"){const u=async(d,f)=>{const m=Cs(VM,d);if(!m.success){const E=m.error instanceof Error?m.error.message:String(m.error);throw new Qe(ot.InvalidParams,`Invalid elicitation request: ${E}`)}const{params:p}=m.data;p.mode=p.mode??"form";const{supportsFormMode:g,supportsUrlMode:y}=Nee(this._capabilities.elicitation);if(p.mode==="form"&&!g)throw new Qe(ot.InvalidParams,"Client does not support form-mode elicitation requests");if(p.mode==="url"&&!y)throw new Qe(ot.InvalidParams,"Client does not support URL-mode elicitation requests");const b=await Promise.resolve(n(d,f));if(p.task){const E=Cs(cd,b);if(!E.success){const T=E.error instanceof Error?E.error.message:String(E.error);throw new Qe(ot.InvalidParams,`Invalid task creation result: ${T}`)}return E.data}const S=Cs(BM,b);if(!S.success){const E=S.error instanceof Error?S.error.message:String(S.error);throw new Qe(ot.InvalidParams,`Invalid elicitation result: ${E}`)}const w=S.data,R=p.mode==="form"?p.requestedSchema:void 0;if(p.mode==="form"&&w.action==="accept"&&w.content&&R&&this._capabilities.elicitation?.form?.applyDefaults)try{wp(R,w.content)}catch{}return w};return super.setRequestHandler(t,u)}if(l==="sampling/createMessage"){const u=async(d,f)=>{const m=Cs(zM,d);if(!m.success){const b=m.error instanceof Error?m.error.message:String(m.error);throw new Qe(ot.InvalidParams,`Invalid sampling request: ${b}`)}const{params:p}=m.data,g=await Promise.resolve(n(d,f));if(p.task){const b=Cs(cd,g);if(!b.success){const S=b.error instanceof Error?b.error.message:String(b.error);throw new Qe(ot.InvalidParams,`Invalid task creation result: ${S}`)}return b.data}const y=Cs(FM,g);if(!y.success){const b=y.error instanceof Error?y.error.message:String(y.error);throw new Qe(ot.InvalidParams,`Invalid sampling result: ${b}`)}return y.data};return super.setRequestHandler(t,u)}return super.setRequestHandler(t,n)}assertCapability(t,n){if(!this._serverCapabilities?.[t])throw new Error(`Server does not support ${t} (required for ${n})`)}async connect(t,n){if(await super.connect(t),t.sessionId===void 0)try{const r=await this.request({method:"initialize",params:{protocolVersion:Wm,capabilities:this._capabilities,clientInfo:this._clientInfo}},RM,n);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!MQ.includes(r.protocolVersion))throw new Error(`Server's protocol version is not supported: ${r.protocolVersion}`);this._serverCapabilities=r.capabilities,this._serverVersion=r.serverInfo,t.setProtocolVersion&&t.setProtocolVersion(r.protocolVersion),this._instructions=r.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(r){throw this.close(),r}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(t){switch(t){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${t})`);break}}assertNotificationCapability(t){switch(t){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${t})`);break}}assertTaskCapability(t){Aee(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&Iee(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},Zl,t)}async complete(t,n){return this.request({method:"completion/complete",params:t},qM,n)}async setLoggingLevel(t,n){return this.request({method:"logging/setLevel",params:{level:t}},Zl,n)}async getPrompt(t,n){return this.request({method:"prompts/get",params:t},DM,n)}async listPrompts(t,n){return this.request({method:"prompts/list",params:t},PM,n)}async listResources(t,n){return this.request({method:"resources/list",params:t},IM,n)}async listResourceTemplates(t,n){return this.request({method:"resources/templates/list",params:t},NM,n)}async readResource(t,n){return this.request({method:"resources/read",params:t},kM,n)}async subscribeResource(t,n){return this.request({method:"resources/subscribe",params:t},Zl,n)}async unsubscribeResource(t,n){return this.request({method:"resources/unsubscribe",params:t},Zl,n)}async callTool(t,n=Jm,r){if(this.isToolTaskRequired(t.name))throw new Qe(ot.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const a=await this.request({method:"tools/call",params:t},n,r),i=this.getToolOutputValidator(t.name);if(i){if(!a.structuredContent&&!a.isError)throw new Qe(ot.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(a.structuredContent)try{const l=i(a.structuredContent);if(!l.valid)throw new Qe(ot.InvalidParams,`Structured content does not match the tool's output schema: ${l.errorMessage}`)}catch(l){throw l instanceof Qe?l:new Qe(ot.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)}}return a}isToolTask(t){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(t):!1}isToolTaskRequired(t){return this._cachedRequiredTaskTools.has(t)}cacheToolMetadata(t){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const n of t){if(n.outputSchema){const a=this._jsonSchemaValidator.getValidator(n.outputSchema);this._cachedToolOutputValidators.set(n.name,a)}const r=n.execution?.taskSupport;(r==="required"||r==="optional")&&this._cachedKnownTaskTools.add(n.name),r==="required"&&this._cachedRequiredTaskTools.add(n.name)}}getToolOutputValidator(t){return this._cachedToolOutputValidators.get(t)}async listTools(t,n){const r=await this.request({method:"tools/list",params:t},z1,n);return this.cacheToolMetadata(r.tools),r}_setupListChangedHandler(t,n,r,a){const i=OX.safeParse(r);if(!i.success)throw new Error(`Invalid ${t} listChanged options: ${i.error.message}`);if(typeof r.onChanged!="function")throw new Error(`Invalid ${t} listChanged options: onChanged must be a function`);const{autoRefresh:l,debounceMs:u}=i.data,{onChanged:d}=r,f=async()=>{if(!l){d(null,null);return}try{const p=await a();d(null,p)}catch(p){const g=p instanceof Error?p:new Error(String(p));d(g,null)}},m=()=>{if(u){const p=this._listChangedDebounceTimers.get(t);p&&clearTimeout(p);const g=setTimeout(f,u);this._listChangedDebounceTimers.set(t,g)}else f()};this.setNotificationHandler(n,m)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};class fC extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}function j0(e){}function JM(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=j0,onError:n=j0,onRetry:r=j0,onComment:a}=e;let i="",l=!0,u,d="",f="";function m(S){const w=l?S.replace(/^\xEF\xBB\xBF/,""):S,[R,E]=Mee(`${i}${w}`);for(const T of R)p(T);i=E,l=!1}function p(S){if(S===""){y();return}if(S.startsWith(":")){a&&a(S.slice(S.startsWith(": ")?2:1));return}const w=S.indexOf(":");if(w!==-1){const R=S.slice(0,w),E=S[w+1]===" "?2:1,T=S.slice(w+E);g(R,T,S);return}g(S,"",S)}function g(S,w,R){switch(S){case"event":f=w;break;case"data":d=`${d}${w}
|
|
171
|
+
`;break;case"id":u=w.includes("\0")?void 0:w;break;case"retry":/^\d+$/.test(w)?r(parseInt(w,10)):n(new fC(`Invalid \`retry\` value: "${w}"`,{type:"invalid-retry",value:w,line:R}));break;default:n(new fC(`Unknown field "${S.length>20?`${S.slice(0,20)}…`:S}"`,{type:"unknown-field",field:S,value:w,line:R}));break}}function y(){d.length>0&&t({id:u,event:f||void 0,data:d.endsWith(`
|
|
172
|
+
`)?d.slice(0,-1):d}),u=void 0,d="",f=""}function b(S={}){i&&S.consume&&p(i),l=!0,u=void 0,d="",f="",i=""}return{feed:m,reset:b}}function Mee(e){const t=[];let n="",r=0;for(;r<e.length;){const a=e.indexOf("\r",r),i=e.indexOf(`
|
|
173
|
+
`,r);let l=-1;if(a!==-1&&i!==-1?l=Math.min(a,i):a!==-1?a===e.length-1?l=-1:l=a:i!==-1&&(l=i),l===-1){n=e.slice(r);break}else{const u=e.slice(r,l);t.push(u),r=l+1,e[r-1]==="\r"&&e[r]===`
|
|
174
|
+
`&&r++}}return[t,n]}class hC extends Event{constructor(t,n){var r,a;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(a=n?.message)!=null?a:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(pC(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(pC(this),n)}}function Pee(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function L_(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(L_).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${L_(e.cause)}`:e.message:`${e}`}function pC(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var e3=e=>{throw TypeError(e)},q1=(e,t,n)=>t.has(e)||e3("Cannot "+n),yt=(e,t,n)=>(q1(e,t,"read from private field"),n?n.call(e):t.get(e)),zn=(e,t,n)=>t.has(e)?e3("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),on=(e,t,n,r)=>(q1(e,t,"write to private field"),t.set(e,n),n),Ua=(e,t,n)=>(q1(e,t,"access private method"),n),$r,Ei,Fl,Sp,cm,Hu,Kl,Gu,Ns,Vl,tc,Bl,Mu,Lo,j_,$_,U_,mC,z_,F_,Pu,V_,B_;class Ep extends EventTarget{constructor(t,n){var r,a;super(),zn(this,Lo),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,zn(this,$r),zn(this,Ei),zn(this,Fl),zn(this,Sp),zn(this,cm),zn(this,Hu),zn(this,Kl),zn(this,Gu,null),zn(this,Ns),zn(this,Vl),zn(this,tc,null),zn(this,Bl,null),zn(this,Mu,null),zn(this,$_,async i=>{var l;yt(this,Vl).reset();const{body:u,redirected:d,status:f,headers:m}=i;if(f===204){Ua(this,Lo,Pu).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(d?on(this,Fl,new URL(i.url)):on(this,Fl,void 0),f!==200){Ua(this,Lo,Pu).call(this,`Non-200 status code (${f})`,f);return}if(!(m.get("content-type")||"").startsWith("text/event-stream")){Ua(this,Lo,Pu).call(this,'Invalid content type, expected "text/event-stream"',f);return}if(yt(this,$r)===this.CLOSED)return;on(this,$r,this.OPEN);const p=new Event("open");if((l=yt(this,Mu))==null||l.call(this,p),this.dispatchEvent(p),typeof u!="object"||!u||!("getReader"in u)){Ua(this,Lo,Pu).call(this,"Invalid response body, expected a web ReadableStream",f),this.close();return}const g=new TextDecoder,y=u.getReader();let b=!0;do{const{done:S,value:w}=await y.read();w&&yt(this,Vl).feed(g.decode(w,{stream:!S})),S&&(b=!1,yt(this,Vl).reset(),Ua(this,Lo,V_).call(this))}while(b)}),zn(this,U_,i=>{on(this,Ns,void 0),!(i.name==="AbortError"||i.type==="aborted")&&Ua(this,Lo,V_).call(this,L_(i))}),zn(this,z_,i=>{typeof i.id=="string"&&on(this,Gu,i.id);const l=new MessageEvent(i.event||"message",{data:i.data,origin:yt(this,Fl)?yt(this,Fl).origin:yt(this,Ei).origin,lastEventId:i.id||""});yt(this,Bl)&&(!i.event||i.event==="message")&&yt(this,Bl).call(this,l),this.dispatchEvent(l)}),zn(this,F_,i=>{on(this,Hu,i)}),zn(this,B_,()=>{on(this,Kl,void 0),yt(this,$r)===this.CONNECTING&&Ua(this,Lo,j_).call(this)});try{if(t instanceof URL)on(this,Ei,t);else if(typeof t=="string")on(this,Ei,new URL(t,Dee()));else throw new Error("Invalid URL")}catch{throw Pee("An invalid or illegal string was specified")}on(this,Vl,JM({onEvent:yt(this,z_),onRetry:yt(this,F_)})),on(this,$r,this.CONNECTING),on(this,Hu,3e3),on(this,cm,(r=n?.fetch)!=null?r:globalThis.fetch),on(this,Sp,(a=n?.withCredentials)!=null?a:!1),Ua(this,Lo,j_).call(this)}get readyState(){return yt(this,$r)}get url(){return yt(this,Ei).href}get withCredentials(){return yt(this,Sp)}get onerror(){return yt(this,tc)}set onerror(t){on(this,tc,t)}get onmessage(){return yt(this,Bl)}set onmessage(t){on(this,Bl,t)}get onopen(){return yt(this,Mu)}set onopen(t){on(this,Mu,t)}addEventListener(t,n,r){const a=n;super.addEventListener(t,a,r)}removeEventListener(t,n,r){const a=n;super.removeEventListener(t,a,r)}close(){yt(this,Kl)&&clearTimeout(yt(this,Kl)),yt(this,$r)!==this.CLOSED&&(yt(this,Ns)&&yt(this,Ns).abort(),on(this,$r,this.CLOSED),on(this,Ns,void 0))}}$r=new WeakMap,Ei=new WeakMap,Fl=new WeakMap,Sp=new WeakMap,cm=new WeakMap,Hu=new WeakMap,Kl=new WeakMap,Gu=new WeakMap,Ns=new WeakMap,Vl=new WeakMap,tc=new WeakMap,Bl=new WeakMap,Mu=new WeakMap,Lo=new WeakSet,j_=function(){on(this,$r,this.CONNECTING),on(this,Ns,new AbortController),yt(this,cm)(yt(this,Ei),Ua(this,Lo,mC).call(this)).then(yt(this,$_)).catch(yt(this,U_))},$_=new WeakMap,U_=new WeakMap,mC=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...yt(this,Gu)?{"Last-Event-ID":yt(this,Gu)}:void 0},cache:"no-store",signal:(e=yt(this,Ns))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},z_=new WeakMap,F_=new WeakMap,Pu=function(e,t){var n;yt(this,$r)!==this.CLOSED&&on(this,$r,this.CLOSED);const r=new hC("error",{code:t,message:e});(n=yt(this,tc))==null||n.call(this,r),this.dispatchEvent(r)},V_=function(e,t){var n;if(yt(this,$r)===this.CLOSED)return;on(this,$r,this.CONNECTING);const r=new hC("error",{code:t,message:e});(n=yt(this,tc))==null||n.call(this,r),this.dispatchEvent(r),on(this,Kl,setTimeout(yt(this,B_),yt(this,Hu)))},B_=new WeakMap,Ep.CONNECTING=0,Ep.OPEN=1,Ep.CLOSED=2;function Dee(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}function um(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function t3(e=fetch,t){return t?async(n,r)=>{const a={...t,...r,headers:r?.headers?{...um(t.headers),...um(r.headers)}:t.headers};return e(n,a)}:e}let H1;H1=globalThis.crypto;async function Lee(e){return(await H1).getRandomValues(new Uint8Array(e))}async function jee(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const a=await Lee(e-r.length);for(const i of a)i<n&&(r+=t[i%t.length])}return r}async function $ee(e){return await jee(e)}async function Uee(e){const t=await(await H1).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function zee(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await $ee(e),n=await Uee(t);return{code_verifier:t,code_challenge:n}}const rr=dU().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:tz.custom,message:"URL must be parseable",fatal:!0}),p$}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Fee=ar({resource:L().url(),authorization_servers:Oe(rr).optional(),jwks_uri:L().url().optional(),scopes_supported:Oe(L()).optional(),bearer_methods_supported:Oe(L()).optional(),resource_signing_alg_values_supported:Oe(L()).optional(),resource_name:L().optional(),resource_documentation:L().optional(),resource_policy_uri:L().url().optional(),resource_tos_uri:L().url().optional(),tls_client_certificate_bound_access_tokens:ut().optional(),authorization_details_types_supported:Oe(L()).optional(),dpop_signing_alg_values_supported:Oe(L()).optional(),dpop_bound_access_tokens_required:ut().optional()}),n3=ar({issuer:L(),authorization_endpoint:rr,token_endpoint:rr,registration_endpoint:rr.optional(),scopes_supported:Oe(L()).optional(),response_types_supported:Oe(L()),response_modes_supported:Oe(L()).optional(),grant_types_supported:Oe(L()).optional(),token_endpoint_auth_methods_supported:Oe(L()).optional(),token_endpoint_auth_signing_alg_values_supported:Oe(L()).optional(),service_documentation:rr.optional(),revocation_endpoint:rr.optional(),revocation_endpoint_auth_methods_supported:Oe(L()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Oe(L()).optional(),introspection_endpoint:L().optional(),introspection_endpoint_auth_methods_supported:Oe(L()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Oe(L()).optional(),code_challenge_methods_supported:Oe(L()).optional(),client_id_metadata_document_supported:ut().optional()}),Vee=ar({issuer:L(),authorization_endpoint:rr,token_endpoint:rr,userinfo_endpoint:rr.optional(),jwks_uri:rr,registration_endpoint:rr.optional(),scopes_supported:Oe(L()).optional(),response_types_supported:Oe(L()),response_modes_supported:Oe(L()).optional(),grant_types_supported:Oe(L()).optional(),acr_values_supported:Oe(L()).optional(),subject_types_supported:Oe(L()),id_token_signing_alg_values_supported:Oe(L()),id_token_encryption_alg_values_supported:Oe(L()).optional(),id_token_encryption_enc_values_supported:Oe(L()).optional(),userinfo_signing_alg_values_supported:Oe(L()).optional(),userinfo_encryption_alg_values_supported:Oe(L()).optional(),userinfo_encryption_enc_values_supported:Oe(L()).optional(),request_object_signing_alg_values_supported:Oe(L()).optional(),request_object_encryption_alg_values_supported:Oe(L()).optional(),request_object_encryption_enc_values_supported:Oe(L()).optional(),token_endpoint_auth_methods_supported:Oe(L()).optional(),token_endpoint_auth_signing_alg_values_supported:Oe(L()).optional(),display_values_supported:Oe(L()).optional(),claim_types_supported:Oe(L()).optional(),claims_supported:Oe(L()).optional(),service_documentation:L().optional(),claims_locales_supported:Oe(L()).optional(),ui_locales_supported:Oe(L()).optional(),claims_parameter_supported:ut().optional(),request_parameter_supported:ut().optional(),request_uri_parameter_supported:ut().optional(),require_request_uri_registration:ut().optional(),op_policy_uri:rr.optional(),op_tos_uri:rr.optional(),client_id_metadata_document_supported:ut().optional()}),Bee=pe({...Vee.shape,...n3.pick({code_challenge_methods_supported:!0}).shape}),qee=pe({access_token:L(),id_token:L().optional(),token_type:L(),expires_in:WI().optional(),scope:L().optional(),refresh_token:L().optional()}).strip(),Hee=pe({error:L(),error_description:L().optional(),error_uri:L().optional()}),gC=rr.optional().or(je("").transform(()=>{})),Gee=pe({redirect_uris:Oe(rr),token_endpoint_auth_method:L().optional(),grant_types:Oe(L()).optional(),response_types:Oe(L()).optional(),client_name:L().optional(),client_uri:rr.optional(),logo_uri:gC,scope:L().optional(),contacts:Oe(L()).optional(),tos_uri:gC,policy_uri:L().optional(),jwks_uri:rr.optional(),jwks:eo().optional(),software_id:L().optional(),software_version:L().optional(),software_statement:L().optional()}).strip(),Zee=pe({client_id:L(),client_secret:L().optional(),client_id_issued_at:Ze().optional(),client_secret_expires_at:Ze().optional()}).strip(),Kee=Gee.merge(Zee);pe({error:L(),error_description:L().optional()}).strip();pe({token:L(),token_type_hint:L().optional()}).strip();function Yee(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function Wee({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class Yn extends Error{constructor(t,n){super(t),this.errorUri=n,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class q_ extends Yn{}q_.errorCode="invalid_request";class dm extends Yn{}dm.errorCode="invalid_client";class fm extends Yn{}fm.errorCode="invalid_grant";class hm extends Yn{}hm.errorCode="unauthorized_client";class H_ extends Yn{}H_.errorCode="unsupported_grant_type";class G_ extends Yn{}G_.errorCode="invalid_scope";class Z_ extends Yn{}Z_.errorCode="access_denied";class cc extends Yn{}cc.errorCode="server_error";class K_ extends Yn{}K_.errorCode="temporarily_unavailable";class Y_ extends Yn{}Y_.errorCode="unsupported_response_type";class W_ extends Yn{}W_.errorCode="unsupported_token_type";class Q_ extends Yn{}Q_.errorCode="invalid_token";class X_ extends Yn{}X_.errorCode="method_not_allowed";class J_ extends Yn{}J_.errorCode="too_many_requests";class pm extends Yn{}pm.errorCode="invalid_client_metadata";class eb extends Yn{}eb.errorCode="insufficient_scope";class tb extends Yn{}tb.errorCode="invalid_target";const Qee={[q_.errorCode]:q_,[dm.errorCode]:dm,[fm.errorCode]:fm,[hm.errorCode]:hm,[H_.errorCode]:H_,[G_.errorCode]:G_,[Z_.errorCode]:Z_,[cc.errorCode]:cc,[K_.errorCode]:K_,[Y_.errorCode]:Y_,[W_.errorCode]:W_,[Q_.errorCode]:Q_,[X_.errorCode]:X_,[J_.errorCode]:J_,[pm.errorCode]:pm,[eb.errorCode]:eb,[tb.errorCode]:tb};class $o extends Error{constructor(t){super(t??"Unauthorized")}}function Xee(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const $0="code",U0="S256";function Jee(e,t){const n=e.client_secret!==void 0;return t.length===0?n?"client_secret_post":"none":"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Xee(e.token_endpoint_auth_method)&&t.includes(e.token_endpoint_auth_method)?e.token_endpoint_auth_method:n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function ete(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":tte(a,i,n);return;case"client_secret_post":nte(a,i,r);return;case"none":rte(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function tte(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function nte(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function rte(e,t){t.set("client_id",e)}async function r3(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=Hee.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:l}=r,u=Qee[a]||cc;return new u(i||"",l)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new cc(a)}}async function Oi(e,t){try{return await z0(e,t)}catch(n){if(n instanceof dm||n instanceof hm)return await e.invalidateCredentials?.("all"),await z0(e,t);if(n instanceof fm)return await e.invalidateCredentials?.("tokens"),await z0(e,t);throw n}}async function z0(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){let l,u;try{l=await ste(t,{resourceMetadataUrl:a},i),l.authorization_servers&&l.authorization_servers.length>0&&(u=l.authorization_servers[0])}catch{}u||(u=new URL("/",t));const d=await ate(t,e,l),f=await dte(u,{fetchFn:i});let m=await Promise.resolve(e.clientInformation());if(!m){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const w=f?.client_id_metadata_document_supported===!0,R=e.clientMetadataUrl;if(R&&!ote(R))throw new pm(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${R}`);if(w&&R)m={client_id:R},await e.saveClientInformation?.(m);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const T=await mte(u,{metadata:f,clientMetadata:e.clientMetadata,fetchFn:i});await e.saveClientInformation(T),m=T}}const p=!e.redirectUrl;if(n!==void 0||p){const w=await pte(e,u,{metadata:f,resource:d,authorizationCode:n,fetchFn:i});return await e.saveTokens(w),"AUTHORIZED"}const g=await e.tokens();if(g?.refresh_token)try{const w=await hte(u,{metadata:f,clientInformation:m,refreshToken:g.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(w),"AUTHORIZED"}catch(w){if(!(!(w instanceof Yn)||w instanceof cc))throw w}const y=e.state?await e.state():void 0,{authorizationUrl:b,codeVerifier:S}=await fte(u,{metadata:f,clientInformation:m,state:y,redirectUrl:e.redirectUrl,scope:r||l?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:d});return await e.saveCodeVerifier(S),await e.redirectToAuthorization(b),"REDIRECT"}function ote(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function ate(e,t,n){const r=Yee(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!Wee({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function mm(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=F0(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const l=F0(e,"scope")||void 0,u=F0(e,"error")||void 0;return{resourceMetadataUrl:i,scope:l,error:u}}function F0(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function ste(e,t,n=fetch){const r=await cte(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return Fee.parse(await r.json())}async function G1(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?G1(e,void 0,n):void 0;throw r}}function ite(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function vC(e,t,n=fetch){return await G1(e,{"MCP-Protocol-Version":t},n)}function lte(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function cte(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??Wm;let l;if(r?.metadataUrl)l=new URL(r.metadataUrl);else{const d=ite(t,a.pathname);l=new URL(d,r?.metadataServerUrl??a),l.search=a.search}let u=await vC(l,i,n);if(!r?.metadataUrl&<e(u,a.pathname)){const d=new URL(`/.well-known/${t}`,a);u=await vC(d,i,n)}return u}function ute(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function dte(e,{fetchFn:t=fetch,protocolVersion:n=Wm}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=ute(e);for(const{url:i,type:l}of a){const u=await G1(i,r,t);if(u){if(!u.ok){if(await u.body?.cancel(),u.status>=400&&u.status<500)continue;throw new Error(`HTTP ${u.status} trying to load ${l==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return l==="oauth"?n3.parse(await u.json()):Bee.parse(await u.json())}}}async function fte(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:l}){let u;if(t){if(u=new URL(t.authorization_endpoint),!t.response_types_supported.includes($0))throw new Error(`Incompatible auth server: does not support response type ${$0}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(U0))throw new Error(`Incompatible auth server: does not support code challenge method ${U0}`)}else u=new URL("/authorize",e);const d=await zee(),f=d.code_verifier,m=d.code_challenge;return u.searchParams.set("response_type",$0),u.searchParams.set("client_id",n.client_id),u.searchParams.set("code_challenge",m),u.searchParams.set("code_challenge_method",U0),u.searchParams.set("redirect_uri",String(r)),i&&u.searchParams.set("state",i),a&&u.searchParams.set("scope",a),a?.includes("offline_access")&&u.searchParams.append("prompt","consent"),l&&u.searchParams.set("resource",l.href),{authorizationUrl:u,codeVerifier:f}}function o3(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function Z1(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:l}){const u=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(d,n,u,t);else if(r){const m=t?.token_endpoint_auth_methods_supported??[],p=Jee(r,m);ete(p,r,d,n)}const f=await(l??fetch)(u,{method:"POST",headers:d,body:n});if(!f.ok)throw await r3(f);return qee.parse(await f.json())}async function Fre(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:l,addClientAuthentication:u,fetchFn:d}){const f=o3(r,a,i);return Z1(e,{metadata:t,tokenRequestParams:f,clientInformation:n,addClientAuthentication:u,resource:l,fetchFn:d})}async function hte(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:l}){const u=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),d=await Z1(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:l});return{refresh_token:r,...d}}async function pte(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const l=e.clientMetadata.scope;let u;if(e.prepareTokenRequest&&(u=await e.prepareTokenRequest(l)),!u){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const f=await e.codeVerifier();u=o3(a,f,e.redirectUrl)}const d=await e.clientInformation();return Z1(t,{metadata:n,tokenRequestParams:u,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function mte(e,{metadata:t,clientMetadata:n,fetchFn:r}){let a;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");a=new URL(t.registration_endpoint)}else a=new URL("/register",e);const i=await(r??fetch)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw await r3(i);return Kee.parse(await i.json())}class gte extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class vte{constructor(t,n){this._url=t,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=t3(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new $o("No auth provider");let t;try{t=await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new $o;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=um(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new Ep(this._url.href,{...this._eventSourceInit,fetch:async(a,i)=>{const l=await this._commonHeaders();l.set("Accept","text/event-stream");const u=await t(a,{...i,headers:l});if(u.status===401&&u.headers.has("www-authenticate")){const{resourceMetadataUrl:d,scope:f}=mm(u);this._resourceMetadataUrl=d,this._scope=f}return u}}),this._abortController=new AbortController,this._eventSource.onerror=a=>{if(a.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const i=new gte(a.code,a.message,a);r(i),this.onerror?.(i)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",a=>{const i=a;try{if(this._endpoint=new URL(i.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(l){r(l),this.onerror?.(l),this.close();return}n()}),this._eventSource.onmessage=a=>{const i=a;let l;try{l=qu.parse(JSON.parse(i.data))}catch(u){this.onerror?.(u);return}this.onmessage?.(l)}})}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(t){if(!this._authProvider)throw new $o("No auth provider");if(await Oi(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){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(t),signal:this._abortController?.signal},a=await(this._fetch??fetch)(this._endpoint,r);if(!a.ok){const i=await a.text().catch(()=>null);if(a.status===401&&this._authProvider){const{resourceMetadataUrl:l,scope:u}=mm(a);if(this._resourceMetadataUrl=l,this._scope=u,await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${a.status}): ${i}`)}await a.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const yte="mcp";class _te{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,yte),this._socket.onerror=r=>{const a="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(a),this.onerror?.(a)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let a;try{a=qu.parse(JSON.parse(r.data))}catch(i){this.onerror?.(i);return}this.onmessage?.(a)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class bte extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let a;super({start(i){a=JM({onEvent:l=>{i.enqueue(l)},onError(l){t==="terminate"?i.error(l):typeof t=="function"&&t(l)},onRetry:n,onComment:r})},transform(i){a.feed(i)}})}}const wte={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class $l extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}class Ste{constructor(t,n){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=t3(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??wte}async _authThenStart(){if(!this._authProvider)throw new $o("No auth provider");let t;try{t=await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new $o;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=um(this._requestInit?.headers);return new Headers({...t,...n})}async _startOrAuthSse(t){const{resumptionToken:n}=t;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),n&&r.set("last-event-id",n);const a=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,signal:this._abortController?.signal});if(!a.ok){if(await a.body?.cancel(),a.status===401&&this._authProvider)return await this._authThenStart();if(a.status===405)return;throw new $l(a.status,`Failed to open SSE stream: ${a.statusText}`)}this._handleSseStream(a.body,t,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,a=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),a)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const a=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(i=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${i instanceof Error?i.message:String(i)}`)),this._scheduleReconnection(t,n+1)})},a)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:a,replayMessageId:i}=n;let l,u=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new bte({onRetry:y=>{this._serverRetryMs=y}})).getReader();for(;;){const{value:y,done:b}=await m.read();if(b)break;if(y.id&&(l=y.id,u=!0,a?.(y.id)),!!y.data&&(!y.event||y.event==="message"))try{const S=qu.parse(JSON.parse(y.data));ku(S)&&(d=!0,i!==void 0&&(S.id=i)),this.onmessage?.(S)}catch(S){this.onerror?.(S)}}(r||u)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:l,onresumptiontoken:a,replayMessageId:i},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(r||u)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:l,onresumptiontoken:a,replayMessageId:i},0)}catch(y){this.onerror?.(new Error(`Failed to reconnect: ${y instanceof Error?y.message:String(y)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new $o("No auth provider");if(await Oi(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,n){try{const{resumptionToken:r,onresumptiontoken:a}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:D_(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const i=await this._commonHeaders();i.set("content-type","application/json"),i.set("accept","application/json, text/event-stream");const l={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},u=await(this._fetch??fetch)(this._url,l),d=u.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!u.ok){const g=await u.text().catch(()=>null);if(u.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new $l(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:y,scope:b}=mm(u);if(this._resourceMetadataUrl=y,this._scope=b,await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new $o;return this._hasCompletedAuthFlow=!0,this.send(t)}if(u.status===403&&this._authProvider){const{resourceMetadataUrl:y,scope:b,error:S}=mm(u);if(S==="insufficient_scope"){const w=u.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===w)throw new $l(403,"Server returned 403 after trying upscoping");if(b&&(this._scope=b),y&&(this._resourceMetadataUrl=y),this._lastUpscopingHeader=w??void 0,await Oi(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new $o;return this.send(t)}}throw new $l(u.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,u.status===202){await u.body?.cancel(),YQ(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(g=>this.onerror?.(g));return}const m=(Array.isArray(t)?t:[t]).filter(g=>"method"in g&&"id"in g&&g.id!==void 0).length>0,p=u.headers.get("content-type");if(m)if(p?.includes("text/event-stream"))this._handleSseStream(u.body,{onresumptiontoken:a},!1);else if(p?.includes("application/json")){const g=await u.json(),y=Array.isArray(g)?g.map(b=>qu.parse(b)):[qu.parse(g)];for(const b of y)this.onmessage?.(b)}else throw await u.body?.cancel(),new $l(-1,`Unexpected content type: ${p}`);else await u.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),n={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,n);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new $l(r.status,`Failed to terminate session: ${r.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}}class Ete extends Ste{constructor(t,n){super(t,n)}send(t,n){const r=Rte(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function Rte(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class xte extends kee{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},z1,n)}}const Tte=async(e,t,n)=>{const r=Ote(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const a=new xte({name:e?.name??"MCP Client",version:"1.0.0"});return await a.connect(r),{client:a,callStreamableTool:(i,l)=>{if(e.connection.type!=="HTTP")throw new Error("HTTP connection required");const u=new Headers(n);u.has("Authorization")||u.set("Authorization",`Bearer ${e.connection.token}`);for(const[m,p]of Object.entries(e.connection.headers??{}))u.set(m,p);const d=new URL(e.connection.url),f=d.pathname.replace(/\/+$/,"")||"/";return d.pathname=`${f}/call-tool/${encodeURIComponent(i)}`,fetch(d.href,{method:"POST",redirect:"manual",body:JSON.stringify(l),headers:u})}}},Ote=(e,t,n)=>{if(e.type==="Websocket")return new _te(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const a={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const i={requestInit:{headers:a,signal:t}};return e.token&&(i.eventSourceInit={fetch:(l,u)=>fetch(l,{...u,headers:{...a,Accept:"text/event-stream"},signal:t})}),new vte(new URL(e.url),i)}return new Ete(new URL(e.url),{requestInit:{headers:a,signal:t,credentials:"include"}})},Cte=e=>{try{return JSON.parse(e)}catch{return e}},up=new Map,yC=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?pr(e.inputSchema):void 0,outputSchema:e.outputSchema?pr(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function Ate(e){const t=n=>"connection"in e?Tte({connection:e.connection},void 0,n):e.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 u;async function a(d,f=r){const m=e?.debugId?.(),p=m?{"x-trace-debug-id":m}:void 0,{client:g,callStreamableTool:y}=await t(p);if(e?.streamable?.[String(f)])return y(String(f),d);const{structuredContent:b,isError:S,content:w}=await g.callTool({name:String(f),arguments:d});if(S){const R=w?.[0]?.text,E=typeof R=="string"?Cte(R):null,T=E?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(E.code,E.message,E.traceId):null;throw T||new Error(`Tool ${String(f)} returned an error: ${JSON.stringify(b??w)}`)}return b}async function i(){const{client:d}=await t(),{tools:f}=await d.listTools();return f}async function l(){if(!("connection"in e))return i();const d=e.connection,f=JSON.stringify(d);try{return up.has(f)||up.set(f,i()),await up.get(f)}catch(m){console.error("Failed to list tools",m),up.delete(f);return}}async function u(){return(await l()??[]).map(f=>yC(f,a))}return a.asTool=async()=>{const f=(await l()??[]).find(m=>m.name===r);if(!f)throw new Error(`Tool ${r} not found`);return yC(f,a)},a}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>Ite({connection:n}):global[t]}});function Ite(e){return Ate(e)}const a3=A.createContext(null);function Vre(e){const t=pc.c(3),{value:n,children:r}=e,a=n;let i;return t[0]!==r||t[1]!==a?(i=x.jsx(a3.Provider,{value:a,children:r}),t[0]=r,t[1]=a,t[2]=i):i=t[2],i}function Bre(e){const t=A.useContext(a3);if(!t)throw new Error("usePluginContext must be used within a PluginContextProvider");if(!t.connectionId||!t.connection||!t.toolCaller)throw new Error("usePluginContext requires a valid connection. Use { partial: true } in empty state components.");return t}const Nte=pe({id:L().describe("Unique identifier for the entity"),title:L().describe("Human-readable title for the entity"),description:L().nullish().describe("Description of the entity"),created_at:L().datetime(),updated_at:L().datetime(),created_by:L().optional(),updated_by:L().optional()}),kte=pe({field:Oe(L()),operator:sn(["eq","gt","gte","lt","lte","in","like","contains"]),value:kt()}),s3=Za(()=>Lt([kte,pe({operator:sn(["and","or","not"]),conditions:Oe(s3)})])),Mte=pe({field:Oe(L()),direction:sn(["asc","desc"]),nulls:sn(["first","last"]).optional()}),Pte=pe({where:s3.optional().describe("Filter expression"),orderBy:Oe(Mte).optional().describe("Sort expressions"),limit:Ze().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:Ze().int().min(0).optional().describe("Number of items to skip")});function Dte(e){return pe({items:Oe(e).describe("Array of collection items"),totalCount:Ze().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:ut().optional().describe("Whether there are more items available")})}const Lte=pe({id:L().describe("ID of the entity to retrieve")});function jte(e){return pe({item:e.nullable().describe("The retrieved item, or null if not found")})}function $te(e){return pe({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function Ute(e){return pe({item:e.describe("The created entity with generated id")})}function zte(e){return pe({id:L().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function Fte(e){return pe({item:e.describe("The updated entity")})}const Vte=pe({id:L().describe("ID of the entity to delete")});function Bte(e){return pe({item:e.describe("The deleted entity")})}function qte(e,t,n){const r=e.toUpperCase(),a=n?.readOnly??!1,i=[{name:`COLLECTION_${r}_LIST`,inputSchema:Pte,outputSchema:Dte(t)},{name:`COLLECTION_${r}_GET`,inputSchema:Lte,outputSchema:jte(t)}];return a||i.push({name:`COLLECTION_${r}_CREATE`,inputSchema:$te(t),outputSchema:Ute(t),opt:!0},{name:`COLLECTION_${r}_UPDATE`,inputSchema:zte(t),outputSchema:Fte(t),opt:!0},{name:`COLLECTION_${r}_DELETE`,inputSchema:Vte,outputSchema:Bte(t),opt:!0}),i}const Hte=pe({id:L(),name:L(),description:L().optional(),inputSchema:Ft(L(),kt()),outputSchema:Ft(L(),kt()).optional()}),Gte=Nte.extend({_meta:pe({"io.decocms":pe({id:L(),verified:ut(),scopeName:L(),appName:L(),friendlyName:L().nullable().optional(),metadata:Ft(L(),kt()).nullable().optional(),publishedAt:L().datetime().optional(),updatedAt:L().datetime().optional(),tools:Oe(Hte).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:pe({$schema:L().optional(),_meta:Ft(L(),kt()).optional(),name:L().describe("The server name (scope/app)"),title:L().optional().describe("User-friendly title"),description:L().optional().describe("Server description"),icons:Oe(pe({src:L(),mimeType:L().optional(),sizes:Oe(L()).optional(),theme:sn(["light","dark"]).optional()})).optional(),remotes:Oe(pe({type:sn(["http","stdio","sse"]),url:L().optional(),headers:Oe(kt()).optional()})).optional(),packages:Oe(kt()).optional(),repository:pe({url:L(),source:L().optional(),subfolder:L().optional()}).optional(),version:L().optional(),websiteUrl:L().optional()})});qte("registry_app",Gte,{readOnly:!0});const Zte=pe({specversion:je("1.0").describe("CloudEvents specification version"),id:L().describe("Unique identifier for this event (UUID recommended)"),source:L().describe("Connection ID of the event publisher"),type:L().describe("Event type (e.g., 'order.created', 'user.signup')"),time:L().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:L().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:L().optional().default("application/json").describe("Content type of the data attribute"),dataschema:L().url().optional().describe("URI to the schema for the data attribute"),data:kt().optional().describe("Event payload (any JSON value)")});pe({events:Oe(Zte).min(1).describe("Batch of CloudEvents to process")});const Kte=pe({success:ut().optional().describe("Whether this event was processed successfully"),error:L().optional().describe("Error message for this event"),retryAfter:Ze().int().positive().optional().describe("Re-deliver this event after this many ms")});pe({success:ut().optional().describe("Batch success - applies to events not in results"),error:L().optional().describe("Batch error message - applies to events not in results"),processedCount:Ze().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:Ze().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:Ft(L(),Kte).optional().describe("Per-event results keyed by event ID")});pe({type:L().min(1).max(255).describe("Event type identifier"),subject:L().max(255).optional().describe("Subject/resource identifier (e.g., order ID)"),data:kt().optional().describe("Event payload"),deliverAt:L().datetime().optional().describe("Scheduled delivery time (ISO 8601). Omit for immediate delivery."),cron:L().max(100).optional().describe("Cron expression for recurring delivery. Use EVENT_CANCEL to stop.")});pe({id:L().describe("Unique event ID"),type:L().describe("Event type"),source:L().describe("Source connection ID"),time:L().describe("Event timestamp")});pe({eventType:L().min(1).max(255).describe("Event type to subscribe to"),publisher:L().optional().describe("Filter events by publisher connection ID"),filter:L().max(1e3).optional().describe("JSONPath filter expression on event data")});pe({subscription:pe({id:L().describe("Subscription ID"),connectionId:L().describe("Subscriber connection ID"),eventType:L().describe("Event type pattern"),publisher:L().nullable().describe("Publisher connection filter"),filter:L().nullable().describe("JSONPath filter expression"),enabled:ut().describe("Whether subscription is enabled"),createdAt:L().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:L().datetime().describe("Updated timestamp (ISO 8601)")})});const Yte=pe({eventType:L().min(1).max(255).describe("Event type to subscribe to"),publisher:L().optional().describe("Filter events by publisher connection ID"),filter:L().max(1e3).optional().describe("JSONPath filter expression on event data")}),Wte=pe({id:L().describe("Subscription ID"),connectionId:L().describe("Subscriber connection ID"),eventType:L().describe("Event type pattern"),publisher:L().nullable().describe("Publisher connection filter"),filter:L().nullable().describe("JSONPath filter expression"),enabled:ut().describe("Whether subscription is enabled"),createdAt:L().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:L().datetime().describe("Updated timestamp (ISO 8601)")});pe({subscriptions:Oe(Yte).describe("Desired subscriptions - system will create/update/delete to match")});pe({created:Ze().int().min(0).describe("Number of subscriptions created"),updated:Ze().int().min(0).describe("Number of subscriptions with filter updated"),deleted:Ze().int().min(0).describe("Number of subscriptions removed"),unchanged:Ze().int().min(0).describe("Number of subscriptions unchanged"),subscriptions:Oe(Wte).describe("Current subscriptions after sync")});pe({subscriptionId:L().describe("Subscription ID to remove")});pe({success:ut().describe("Whether unsubscribe was successful"),subscriptionId:L().describe("Subscription ID that was removed")});pe({eventId:L().describe("Event ID to cancel")});pe({success:ut().describe("Whether cancellation was successful"),eventId:L().describe("Event ID that was cancelled")});pe({eventId:L().describe("Event ID to acknowledge")});pe({success:ut().describe("Whether ACK was successful"),eventId:L().describe("Event ID that was acknowledged")});const Qte=pe({prefix:L().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:Ze().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:L().optional().describe("Token for pagination from previous response"),delimiter:L().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")}),Xte=pe({objects:Oe(pe({key:L().describe("Object key/path"),size:Ze().describe("Object size in bytes"),lastModified:L().describe("Last modified timestamp"),etag:L().describe("Entity tag for the object")})),nextContinuationToken:L().optional().describe("Token for fetching next page of results"),isTruncated:ut().describe("Whether there are more results available"),commonPrefixes:Oe(L()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")}),Jte=pe({key:L().describe("Object key/path to get metadata for")}),ene=pe({contentType:L().optional().describe("MIME type of the object"),contentLength:Ze().describe("Size of the object in bytes"),lastModified:L().describe("Last modified timestamp"),etag:L().describe("Entity tag for the object"),metadata:Ft(L(),L()).optional().describe("Custom metadata key-value pairs")}),tne=pe({key:L().describe("Object key/path to generate URL for"),expiresIn:Ze().optional().describe("URL expiration time in seconds (default: from state config or 3600)")}),nne=pe({url:L().describe("Presigned URL for downloading the object"),expiresIn:Ze().describe("Expiration time in seconds that was used")}),rne=pe({key:L().describe("Object key/path for the upload"),expiresIn:Ze().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:L().optional().describe("MIME type for the object being uploaded")}),one=pe({url:L().describe("Presigned URL for uploading the object"),expiresIn:Ze().describe("Expiration time in seconds that was used")}),ane=pe({key:L().describe("Object key/path to delete")}),sne=pe({success:ut().describe("Whether the deletion was successful"),key:L().describe("The key that was deleted")}),ine=pe({keys:Oe(L()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")}),lne=pe({deleted:Oe(L()).describe("Array of successfully deleted keys"),errors:Oe(pe({key:L(),message:L()})).describe("Array of errors for failed deletions")}),cne=[{name:"LIST_OBJECTS",inputSchema:Qte,outputSchema:Xte},{name:"GET_OBJECT_METADATA",inputSchema:Jte,outputSchema:ene},{name:"GET_PRESIGNED_URL",inputSchema:tne,outputSchema:nne},{name:"PUT_PRESIGNED_URL",inputSchema:rne,outputSchema:one},{name:"DELETE_OBJECT",inputSchema:ane,outputSchema:sne},{name:"DELETE_OBJECTS",inputSchema:ine,outputSchema:lne}],i3=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Z"}));i3.displayName="Folder";function _C(e,t,n){return e?e.startsWith("/")?`/${t}/${n}${e}`:e:`/${t}/${n}`}function une(e){return{createRoutes:e,useParams:t=>Yl({strict:!1}),useSearch:t=>xm({strict:!1}),useNavigate:()=>{const t=mc(),{org:n,pluginId:r}=Yl({strict:!1});return a=>{const i=_C(a.to,n,r);return t({...a,to:i,params:{org:n,pluginId:r,...a.params}})}},useLocation:()=>oL(),Link:function(n){const{org:r,pluginId:a}=Yl({strict:!1}),i=_C(n.to,r,a);return x.jsx(Om,{...n,to:i,params:{org:r,pluginId:a,...n.params}})},_types:{routes:void 0,routeIds:void 0}}}var Nt;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const i={};for(const l of a)i[l]=l;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),l={};for(const u of i)l[u]=a[u];return e.objectValues(l)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const l in a)Object.prototype.hasOwnProperty.call(a,l)&&i.push(l);return i},e.find=(a,i)=>{for(const l of a)if(i(l))return l},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(l=>typeof l=="string"?`'${l}'`:l).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Nt||(Nt={}));var bC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(bC||(bC={}));const Fe=Nt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),As=e=>{switch(typeof e){case"undefined":return Fe.undefined;case"string":return Fe.string;case"number":return Number.isNaN(e)?Fe.nan:Fe.number;case"boolean":return Fe.boolean;case"function":return Fe.function;case"bigint":return Fe.bigint;case"symbol":return Fe.symbol;case"object":return Array.isArray(e)?Fe.array:e===null?Fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Fe.promise:typeof Map<"u"&&e instanceof Map?Fe.map:typeof Set<"u"&&e instanceof Set?Fe.set:typeof Date<"u"&&e instanceof Date?Fe.date:Fe.object;default:return Fe.unknown}},Ne=Nt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class qa extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},a=i=>{for(const l of i.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let u=r,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(l))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(this),r}static assert(t){if(!(t instanceof qa))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Nt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];n[i]=n[i]||[],n[i].push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}qa.create=e=>new qa(e);const nb=(e,t)=>{let n;switch(e.code){case Ne.invalid_type:e.received===Fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ne.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Nt.jsonStringifyReplacer)}`;break;case Ne.unrecognized_keys:n=`Unrecognized key(s) in object: ${Nt.joinValues(e.keys,", ")}`;break;case Ne.invalid_union:n="Invalid input";break;case Ne.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Nt.joinValues(e.options)}`;break;case Ne.invalid_enum_value:n=`Invalid enum value. Expected ${Nt.joinValues(e.options)}, received '${e.received}'`;break;case Ne.invalid_arguments:n="Invalid function arguments";break;case Ne.invalid_return_type:n="Invalid function return type";break;case Ne.invalid_date:n="Invalid date";break;case Ne.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Nt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ne.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ne.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ne.custom:n="Invalid input";break;case Ne.invalid_intersection_types:n="Intersection results could not be merged";break;case Ne.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ne.not_finite:n="Number must be finite";break;default:n=t.defaultError,Nt.assertNever(e)}return{message:n}};let dne=nb;function fne(){return dne}const hne=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],l={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let u="";const d=r.filter(f=>!!f).slice().reverse();for(const f of d)u=f(l,{data:t,defaultError:u}).message;return{...a,path:i,message:u}};function De(e,t){const n=fne(),r=hne({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===nb?void 0:nb].filter(a=>!!a)});e.common.issues.push(r)}class ro{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return tt;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const i=await a.key,l=await a.value;r.push({key:i,value:l})}return ro.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:l}=a;if(i.status==="aborted"||l.status==="aborted")return tt;i.status==="dirty"&&t.dirty(),l.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(r[i.value]=l.value)}return{status:t.value,value:r}}}const tt=Object.freeze({status:"aborted"}),Du=e=>({status:"dirty",value:e}),Oo=e=>({status:"valid",value:e}),wC=e=>e.status==="aborted",SC=e=>e.status==="dirty",uc=e=>e.status==="valid",gm=e=>typeof Promise<"u"&&e instanceof Promise;var Ge;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ge||(Ge={}));class qs{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const EC=(e,t)=>{if(uc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new qa(e.common.issues);return this._error=n,this._error}}};function mt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(l,u)=>{const{message:d}=e;return l.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:l.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:a}}class xt{get description(){return this._def.description}_getType(t){return As(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:As(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ro,ctx:{common:t.parent.common,data:t.data,parsedType:As(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(gm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:As(t)},a=this._parseSync({data:t,path:r.path,parent:r});return EC(r,a)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:As(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return uc(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>uc(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:As(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(gm(a)?a:Promise.resolve(a));return EC(r,i)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,i)=>{const l=t(a),u=()=>i.addIssue({code:Ne.custom,...r(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(u(),!1)):l?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new fc({schema:this,typeName:nt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Us.create(this,this._def)}nullable(){return hc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ia.create(this)}promise(){return bm.create(this,this._def)}or(t){return ym.create([this,t],this._def)}and(t){return _m.create(this,t,this._def)}transform(t){return new fc({...mt(this._def),schema:this,typeName:nt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ab({...mt(this._def),innerType:this,defaultValue:n,typeName:nt.ZodDefault})}brand(){return new Lne({typeName:nt.ZodBranded,type:this,...mt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new sb({...mt(this._def),innerType:this,catchValue:n,typeName:nt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return K1.create(this,t)}readonly(){return ib.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const pne=/^c[^\s-]{8,}$/i,mne=/^[0-9a-z]+$/,gne=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vne=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,yne=/^[a-z0-9_-]{21}$/i,_ne=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,bne=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,wne=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Sne="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let V0;const Ene=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Rne=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,xne=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Tne=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,One=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Cne=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,l3="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ane=new RegExp(`^${l3}$`);function c3(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Ine(e){return new RegExp(`^${c3(e)}$`)}function Nne(e){let t=`${l3}T${c3(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function kne(e,t){return!!((t==="v4"||!t)&&Ene.test(e)||(t==="v6"||!t)&&xne.test(e))}function Mne(e,t){if(!_ne.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function Pne(e,t){return!!((t==="v4"||!t)&&Rne.test(e)||(t==="v6"||!t)&&Tne.test(e))}class Ms extends xt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Fe.string){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Fe.string,received:i.parsedType}),tt}const r=new ro;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const l=t.data.length>i.value,u=t.data.length<i.value;(l||u)&&(a=this._getOrReturnCtx(t,a),l?De(a,{code:Ne.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&De(a,{code:Ne.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")wne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"email",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")V0||(V0=new RegExp(Sne,"u")),V0.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"emoji",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")vne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"uuid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")yne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"nanoid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")pne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cuid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")mne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cuid2",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")gne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"ulid",code:Ne.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),De(a,{validation:"url",code:Ne.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"regex",code:Ne.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Nne(i).test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Ane.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Ine(i).test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?bne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"duration",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?kne(t.data,i.version)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"ip",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Mne(t.data,i.alg)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"jwt",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Pne(t.data,i.version)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cidr",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?One.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"base64",code:Ne.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Cne.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"base64url",code:Ne.invalid_string,message:i.message}),r.dirty()):Nt.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:Ne.invalid_string,...Ge.errToObj(r)})}_addCheck(t){return new Ms({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ge.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ge.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ge.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ge.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ge.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ge.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ge.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ge.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ge.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ge.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ge.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ge.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ge.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ge.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ge.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ge.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ge.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ge.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ge.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ge.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ge.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ge.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ge.errToObj(n)})}nonempty(t){return this.min(1,Ge.errToObj(t))}trim(){return new Ms({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ms({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ms({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ms.create=e=>new Ms({checks:[],typeName:nt.ZodString,coerce:e?.coerce??!1,...mt(e)});function Dne(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,i=Number.parseInt(e.toFixed(a).replace(".","")),l=Number.parseInt(t.toFixed(a).replace(".",""));return i%l/10**a}class ud extends xt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Fe.number){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Fe.number,received:i.parsedType}),tt}let r;const a=new ro;for(const i of this._def.checks)i.kind==="int"?Nt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?Dne(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.not_finite,message:i.message}),a.dirty()):Nt.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ge.toString(n))}setLimit(t,n,r,a){return new ud({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ge.toString(a)}]})}_addCheck(t){return new ud({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ge.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ge.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ge.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ge.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ge.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Nt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ud.create=e=>new ud({checks:[],typeName:nt.ZodNumber,coerce:e?.coerce||!1,...mt(e)});class dd extends xt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Fe.bigint)return this._getInvalidInput(t);let r;const a=new ro;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),De(r,{code:Ne.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):Nt.assertNever(i);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return De(n,{code:Ne.invalid_type,expected:Fe.bigint,received:n.parsedType}),tt}gte(t,n){return this.setLimit("min",t,!0,Ge.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ge.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ge.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ge.toString(n))}setLimit(t,n,r,a){return new dd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ge.toString(a)}]})}_addCheck(t){return new dd({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ge.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ge.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ge.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ge.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ge.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}dd.create=e=>new dd({checks:[],typeName:nt.ZodBigInt,coerce:e?.coerce??!1,...mt(e)});class rb extends xt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Fe.boolean){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Fe.boolean,received:r.parsedType}),tt}return Oo(t.data)}}rb.create=e=>new rb({typeName:nt.ZodBoolean,coerce:e?.coerce||!1,...mt(e)});class vm extends xt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Fe.date){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_type,expected:Fe.date,received:i.parsedType}),tt}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return De(i,{code:Ne.invalid_date}),tt}const r=new ro;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:Ne.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Nt.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new vm({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ge.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ge.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}vm.create=e=>new vm({checks:[],coerce:e?.coerce||!1,typeName:nt.ZodDate,...mt(e)});class RC extends xt{_parse(t){if(this._getType(t)!==Fe.symbol){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Fe.symbol,received:r.parsedType}),tt}return Oo(t.data)}}RC.create=e=>new RC({typeName:nt.ZodSymbol,...mt(e)});class xC extends xt{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Fe.undefined,received:r.parsedType}),tt}return Oo(t.data)}}xC.create=e=>new xC({typeName:nt.ZodUndefined,...mt(e)});class TC extends xt{_parse(t){if(this._getType(t)!==Fe.null){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Fe.null,received:r.parsedType}),tt}return Oo(t.data)}}TC.create=e=>new TC({typeName:nt.ZodNull,...mt(e)});class OC extends xt{constructor(){super(...arguments),this._any=!0}_parse(t){return Oo(t.data)}}OC.create=e=>new OC({typeName:nt.ZodAny,...mt(e)});class CC extends xt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Oo(t.data)}}CC.create=e=>new CC({typeName:nt.ZodUnknown,...mt(e)});class Hs extends xt{_parse(t){const n=this._getOrReturnCtx(t);return De(n,{code:Ne.invalid_type,expected:Fe.never,received:n.parsedType}),tt}}Hs.create=e=>new Hs({typeName:nt.ZodNever,...mt(e)});class AC extends xt{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Fe.void,received:r.parsedType}),tt}return Oo(t.data)}}AC.create=e=>new AC({typeName:nt.ZodVoid,...mt(e)});class ia extends xt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Fe.array)return De(n,{code:Ne.invalid_type,expected:Fe.array,received:n.parsedType}),tt;if(a.exactLength!==null){const l=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(l||u)&&(De(n,{code:l?Ne.too_big:Ne.too_small,minimum:u?a.exactLength.value:void 0,maximum:l?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(De(n,{code:Ne.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(De(n,{code:Ne.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,u)=>a.type._parseAsync(new qs(n,l,n.path,u)))).then(l=>ro.mergeArray(r,l));const i=[...n.data].map((l,u)=>a.type._parseSync(new qs(n,l,n.path,u)));return ro.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ia({...this._def,minLength:{value:t,message:Ge.toString(n)}})}max(t,n){return new ia({...this._def,maxLength:{value:t,message:Ge.toString(n)}})}length(t,n){return new ia({...this._def,exactLength:{value:t,message:Ge.toString(n)}})}nonempty(t){return this.min(1,t)}}ia.create=(e,t)=>new ia({type:e,minLength:null,maxLength:null,exactLength:null,typeName:nt.ZodArray,...mt(t)});function ql(e){if(e instanceof Mn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Us.create(ql(r))}return new Mn({...e._def,shape:()=>t})}else return e instanceof ia?new ia({...e._def,type:ql(e.element)}):e instanceof Us?Us.create(ql(e.unwrap())):e instanceof hc?hc.create(ql(e.unwrap())):e instanceof ji?ji.create(e.items.map(t=>ql(t))):e}class Mn extends xt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Nt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Fe.object){const f=this._getOrReturnCtx(t);return De(f,{code:Ne.invalid_type,expected:Fe.object,received:f.parsedType}),tt}const{status:r,ctx:a}=this._processInputParams(t),{shape:i,keys:l}=this._getCached(),u=[];if(!(this._def.catchall instanceof Hs&&this._def.unknownKeys==="strip"))for(const f in a.data)l.includes(f)||u.push(f);const d=[];for(const f of l){const m=i[f],p=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new qs(a,p,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof Hs){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")u.length>0&&(De(a,{code:Ne.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const p=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new qs(a,p,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const p=await m.key,g=await m.value;f.push({key:p,value:g,alwaysSet:m.alwaysSet})}return f}).then(f=>ro.mergeObjectSync(r,f)):ro.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Ge.errToObj,new Mn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const a=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Ge.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new Mn({...this._def,unknownKeys:"strip"})}passthrough(){return new Mn({...this._def,unknownKeys:"passthrough"})}extend(t){return new Mn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Mn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:nt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Mn({...this._def,catchall:t})}pick(t){const n={};for(const r of Nt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Mn({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Nt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Mn({...this._def,shape:()=>n})}deepPartial(){return ql(this)}partial(t){const n={};for(const r of Nt.objectKeys(this.shape)){const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}return new Mn({...this._def,shape:()=>n})}required(t){const n={};for(const r of Nt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Us;)i=i._def.innerType;n[r]=i}return new Mn({...this._def,shape:()=>n})}keyof(){return u3(Nt.objectKeys(this.shape))}}Mn.create=(e,t)=>new Mn({shape:()=>e,unknownKeys:"strip",catchall:Hs.create(),typeName:nt.ZodObject,...mt(t)});Mn.strictCreate=(e,t)=>new Mn({shape:()=>e,unknownKeys:"strict",catchall:Hs.create(),typeName:nt.ZodObject,...mt(t)});Mn.lazycreate=(e,t)=>new Mn({shape:e,unknownKeys:"strip",catchall:Hs.create(),typeName:nt.ZodObject,...mt(t)});class ym extends xt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(i){for(const u of i)if(u.result.status==="valid")return u.result;for(const u of i)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const l=i.map(u=>new qa(u.ctx.common.issues));return De(n,{code:Ne.invalid_union,unionErrors:l}),tt}if(n.common.async)return Promise.all(r.map(async i=>{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(a);{let i;const l=[];for(const d of r){const f={...n,common:{...n.common,issues:[]},parent:null},m=d._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:f}),f.common.issues.length&&l.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const u=l.map(d=>new qa(d));return De(n,{code:Ne.invalid_union,unionErrors:u}),tt}}get options(){return this._def.options}}ym.create=(e,t)=>new ym({options:e,typeName:nt.ZodUnion,...mt(t)});function ob(e,t){const n=As(e),r=As(t);if(e===t)return{valid:!0,data:e};if(n===Fe.object&&r===Fe.object){const a=Nt.objectKeys(t),i=Nt.objectKeys(e).filter(u=>a.indexOf(u)!==-1),l={...e,...t};for(const u of i){const d=ob(e[u],t[u]);if(!d.valid)return{valid:!1};l[u]=d.data}return{valid:!0,data:l}}else if(n===Fe.array&&r===Fe.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const l=e[i],u=t[i],d=ob(l,u);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===Fe.date&&r===Fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class _m extends xt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,l)=>{if(wC(i)||wC(l))return tt;const u=ob(i.value,l.value);return u.valid?((SC(i)||SC(l))&&n.dirty(),{status:n.value,value:u.data}):(De(r,{code:Ne.invalid_intersection_types}),tt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,l])=>a(i,l)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}_m.create=(e,t,n)=>new _m({left:e,right:t,typeName:nt.ZodIntersection,...mt(n)});class ji extends xt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.array)return De(r,{code:Ne.invalid_type,expected:Fe.array,received:r.parsedType}),tt;if(r.data.length<this._def.items.length)return De(r,{code:Ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),tt;!this._def.rest&&r.data.length>this._def.items.length&&(De(r,{code:Ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((l,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new qs(r,l,r.path,u)):null}).filter(l=>!!l);return r.common.async?Promise.all(i).then(l=>ro.mergeArray(n,l)):ro.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new ji({...this._def,rest:t})}}ji.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ji({items:e,typeName:nt.ZodTuple,rest:null,...mt(t)})};class IC extends xt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.map)return De(r,{code:Ne.invalid_type,expected:Fe.map,received:r.parsedType}),tt;const a=this._def.keyType,i=this._def.valueType,l=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new qs(r,u,r.path,[f,"key"])),value:i._parse(new qs(r,d,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of l){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return tt;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const d of l){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return tt;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}IC.create=(e,t,n)=>new IC({valueType:t,keyType:e,typeName:nt.ZodMap,...mt(n)});class fd extends xt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.set)return De(r,{code:Ne.invalid_type,expected:Fe.set,received:r.parsedType}),tt;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(De(r,{code:Ne.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(De(r,{code:Ne.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function l(d){const f=new Set;for(const m of d){if(m.status==="aborted")return tt;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((d,f)=>i._parse(new qs(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>l(d)):l(u)}min(t,n){return new fd({...this._def,minSize:{value:t,message:Ge.toString(n)}})}max(t,n){return new fd({...this._def,maxSize:{value:t,message:Ge.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}fd.create=(e,t)=>new fd({valueType:e,minSize:null,maxSize:null,typeName:nt.ZodSet,...mt(t)});class NC extends xt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}NC.create=(e,t)=>new NC({getter:e,typeName:nt.ZodLazy,...mt(t)});class kC extends xt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return De(n,{received:n.data,code:Ne.invalid_literal,expected:this._def.value}),tt}return{status:"valid",value:t.data}}get value(){return this._def.value}}kC.create=(e,t)=>new kC({value:e,typeName:nt.ZodLiteral,...mt(t)});function u3(e,t){return new dc({values:e,typeName:nt.ZodEnum,...mt(t)})}class dc extends xt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return De(n,{expected:Nt.joinValues(r),received:n.parsedType,code:Ne.invalid_type}),tt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return De(n,{received:n.data,code:Ne.invalid_enum_value,options:r}),tt}return Oo(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return dc.create(t,{...this._def,...n})}exclude(t,n=this._def){return dc.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}dc.create=u3;class MC extends xt{_parse(t){const n=Nt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Fe.string&&r.parsedType!==Fe.number){const a=Nt.objectValues(n);return De(r,{expected:Nt.joinValues(a),received:r.parsedType,code:Ne.invalid_type}),tt}if(this._cache||(this._cache=new Set(Nt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=Nt.objectValues(n);return De(r,{received:r.data,code:Ne.invalid_enum_value,options:a}),tt}return Oo(t.data)}get enum(){return this._def.values}}MC.create=(e,t)=>new MC({values:e,typeName:nt.ZodNativeEnum,...mt(t)});class bm extends xt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Fe.promise&&n.common.async===!1)return De(n,{code:Ne.invalid_type,expected:Fe.promise,received:n.parsedType}),tt;const r=n.parsedType===Fe.promise?n.data:Promise.resolve(n.data);return Oo(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}bm.create=(e,t)=>new bm({type:e,typeName:nt.ZodPromise,...mt(t)});class fc extends xt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:l=>{De(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const l=a.transform(r.data,i);if(r.common.async)return Promise.resolve(l).then(async u=>{if(n.value==="aborted")return tt;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?tt:d.status==="dirty"||n.value==="dirty"?Du(d.value):d});{if(n.value==="aborted")return tt;const u=this._def.schema._parseSync({data:l,path:r.path,parent:r});return u.status==="aborted"?tt:u.status==="dirty"||n.value==="dirty"?Du(u.value):u}}if(a.type==="refinement"){const l=u=>{const d=a.refinement(u,i);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?tt:(u.status==="dirty"&&n.dirty(),l(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?tt:(u.status==="dirty"&&n.dirty(),l(u.value).then(()=>({status:n.value,value:u.value}))))}if(a.type==="transform")if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!uc(l))return tt;const u=a.transform(l.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>uc(l)?Promise.resolve(a.transform(l.value,i)).then(u=>({status:n.value,value:u})):tt);Nt.assertNever(a)}}fc.create=(e,t,n)=>new fc({schema:e,typeName:nt.ZodEffects,effect:t,...mt(n)});fc.createWithPreprocess=(e,t,n)=>new fc({schema:t,effect:{type:"preprocess",transform:e},typeName:nt.ZodEffects,...mt(n)});class Us extends xt{_parse(t){return this._getType(t)===Fe.undefined?Oo(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Us.create=(e,t)=>new Us({innerType:e,typeName:nt.ZodOptional,...mt(t)});class hc extends xt{_parse(t){return this._getType(t)===Fe.null?Oo(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}hc.create=(e,t)=>new hc({innerType:e,typeName:nt.ZodNullable,...mt(t)});class ab extends xt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ab.create=(e,t)=>new ab({innerType:e,typeName:nt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...mt(t)});class sb extends xt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return gm(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new qa(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new qa(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}sb.create=(e,t)=>new sb({innerType:e,typeName:nt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...mt(t)});class PC extends xt{_parse(t){if(this._getType(t)!==Fe.nan){const r=this._getOrReturnCtx(t);return De(r,{code:Ne.invalid_type,expected:Fe.nan,received:r.parsedType}),tt}return{status:"valid",value:t.data}}}PC.create=e=>new PC({typeName:nt.ZodNaN,...mt(e)});class Lne extends xt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class K1 extends xt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?tt:i.status==="dirty"?(n.dirty(),Du(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?tt:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new K1({in:t,out:n,typeName:nt.ZodPipeline})}}class ib extends xt{_parse(t){const n=this._def.innerType._parse(t),r=a=>(uc(a)&&(a.value=Object.freeze(a.value)),a);return gm(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}ib.create=(e,t)=>new ib({innerType:e,typeName:nt.ZodReadonly,...mt(t)});var nt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(nt||(nt={}));const jne=Ms.create,$ne=rb.create;Hs.create;ia.create;const Une=Mn.create;ym.create;_m.create;ji.create;const zne=dc.create;bm.create;Us.create;hc.create;const Fne=Une({path:jne().optional().default(""),flat:$ne().optional().default(!1),view:zne(["table","grid"]).optional().default("grid")}),Vne=une(e=>{const{createRoute:t,lazyRouteComponent:n}=e.routing;return[t({getParentRoute:()=>e.parentRoute,path:"/",component:n(()=>mn(()=>import("./file-browser-B8xb3wGm.js").then(a=>a.b),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),validateSearch:Fne})]}),Bne=A.lazy(()=>mn(()=>import("./plugin-header-Dg9-cQAj.js"),__vite__mapDeps([15,5,16]))),qne=A.lazy(()=>mn(()=>import("./plugin-empty-state-srmGKRQU.js"),[])),Hne={id:"object-storage",description:"Browse and manage files in S3-compatible object storage",binding:cne,renderHeader:e=>x.jsx(Bne,{...e}),renderEmptyState:()=>x.jsx(qne,{}),setup:e=>{const{registerRootSidebarItem:t,registerPluginRoutes:n}=e;t({icon:x.jsx(i3,{size:20}),label:"Files"});const r=Vne.createRoutes(e);n(r)}},Gne=[Hne],Dd=H6({component:()=>x.jsxs(GW,{children:[x.jsx(A.Suspense,{fallback:x.jsx(vM,{}),children:x.jsx(gA,{})}),x.jsx(ZW,{})]})}),Zne=Sn({getParentRoute:()=>Dd,path:"/login",component:Ln(()=>mn(()=>import("./login-RFCnTbJl.js"),__vite__mapDeps([17,14,3,18]))),validateSearch:Za(()=>pe({next:L().optional(),client_id:L().optional(),redirect_uri:L().optional(),response_type:L().optional(),state:L().optional(),scope:L().optional(),code_challenge:L().optional(),code_challenge_method:L().optional()}))}),Kne=Sn({getParentRoute:()=>Dd,path:"/auth/$pathname",component:Ln(()=>mn(()=>import("./auth-catchall-BDKZr3VK.js"),[]))}),Rr=Sn({getParentRoute:()=>Dd,id:"shell",component:Ln(()=>mn(()=>import("./shell-layout-BuirxVot.js"),__vite__mapDeps([19,20,3,21,22,5,23,24,25,26,27,28,29,30,31,32,18,33,34,35,14,36,37,6,38,39,40,41,7,42,43,44,45,46,47,16,48,49,50,51,52,53,54,55,56,57,12,58,9,59,60,61,62,63,64,65,66,67,68])))}),Yne=Sn({getParentRoute:()=>Rr,path:"/",component:Ln(()=>mn(()=>import("./home-BkFYrMbJ.js"),__vite__mapDeps([69,70,3,61,6,5,68,36,24,18,59,46,60,45,14])))}),Wne=Sn({getParentRoute:()=>Rr,path:"/$org",component:Ln(()=>mn(()=>import("./page-DhI0Qooi.js"),__vite__mapDeps([71,31,32,3,18,21,28,5,33,34,30,35,14,36,37,6,20,26,38,39,40,41,7,42,43,44,45,46,47,16,27,25,48,49,50,51,52,29,53,54,55,56,57,12,72,73,68,74,75,76])))}),Qne=Sn({getParentRoute:()=>Rr,path:"/$org/members",component:Ln(()=>mn(()=>import("./members-wdr88rOm.js"),__vite__mapDeps([77,78,79,3,62,7,38,5,10,28,72,80,81,11,36,18,82,83,32,4,84,50,34,30,35,14,85,55,41,61,22,46,64,26,86,87,68,12,65,20,60,47,16,39,70,88,89,24])))}),Xne=Sn({getParentRoute:()=>Rr,path:"/$org/mcps",component:Ln(()=>mn(()=>import("./connections-Cm-7oBJu.js"),__vite__mapDeps([90,78,79,3,62,7,38,5,10,28,72,80,81,11,36,18,82,91,70,32,20,50,34,30,35,14,51,52,92,27,46,22,64,26,60,88,93,43,12,47,16,39,56,74,41,94,68]))),validateSearch:Za(()=>pe({action:sn(["create"]).optional()}))}),Jne=Sn({getParentRoute:()=>Rr,path:"/$org/settings",component:Ln(()=>mn(()=>import("./settings-Clme5cH0.js"),__vite__mapDeps([95,78,79,3,62,7,38,5,10,28,72,80,30,60,18,14,13,26])))}),ere=Sn({getParentRoute:()=>Rr,path:"/$org/settings/plugins",component:Ln(()=>mn(()=>import("./plugins-Dawnh_sQ.js"),__vite__mapDeps([96,78,79,3,62,7,38,5,10,28,72,80,58,14,34,30,65,84])))}),tre=Sn({getParentRoute:()=>Rr,path:"/$org/monitoring",component:Ln(()=>mn(()=>import("./monitoring-Cr82twHN.js"),__vite__mapDeps([97,34,78,79,3,62,7,38,5,10,28,72,80,81,11,36,18,32,20,22,16,30,21,42,8,98,89,99,44,45,100,75,50,35,14,33,85,66,68,12,4,47,57,2,39,101,74,41]))),validateSearch:Za(()=>pe({tab:sn(["logs","analytics"]).default("logs"),from:L().default("now-24h"),to:L().default("now"),connectionId:Oe(L()).optional().default([]),gatewayId:Oe(L()).optional().default([]),tool:L().default(""),status:sn(["all","success","errors"]).default("all"),search:L().default(""),page:Ze().optional(),streaming:ut().default(!0),propertyFilters:L().default("")}))}),d3=Sn({getParentRoute:()=>Rr,path:"/$org/store",component:Ln(()=>mn(()=>import("./page-D_NhUEfH.js"),__vite__mapDeps([102,55,78,79,3,62,7,38,5,10,28,72,98,23,11,36,50,34,30,35,14,1,2,93,103,81,18,104,87,68,43,70,32,105,21,16,24,47,51,52,40,41])))}),nre=Sn({getParentRoute:()=>d3,path:"/$appName",component:Ln(()=>mn(()=>import("./mcp-server-detail-CBjpnL21.js"),__vite__mapDeps([106,6,11,3,84,32,16,68,62,7,63,107,41,25,105,79,38,5,10,28,72,81,36,18,82,70,108,109,101,22,93,104,87,43,50,34,30,35,14,51,52,74,110,40,111,112,56,103,49]))),validateSearch:Za(()=>pe({registryId:L().optional(),serverName:L().optional(),itemId:L().optional()}))}),rre=Sn({getParentRoute:()=>Rr,path:"/$org/mcps/$connectionId",component:Ln(()=>mn(()=>import("./connection-detail-BHduC6at.js"),__vite__mapDeps([113,32,3,20,50,34,30,35,14,51,52,114,115,94,18,68,12,74,41,116,28,58,25,89,11,108,84,60,47,5,16,93,43,33,7,117,112,111,105,56,100,31,21,36,37,6,26,38,39,40,42,44,45,46,27,48,49,118,101,22,119,79,62,10,72,81,70,88,54,92,82,120,23,61,107,109]))),validateSearch:Za(()=>pe({tab:L().optional()}))}),ore=Sn({getParentRoute:()=>Rr,path:"/$org/mcps/$connectionId/$collectionName/$itemId",component:Ln(()=>mn(()=>import("./collection-detail-DiFfTEhG.js"),__vite__mapDeps([121,34,32,3,20,35,14,30,116,28,58,60,18,39,122,108,84,50,6,57,66,42,11,99,24,114,115,94,68,12,51,52,74,41,25,89,47,5,16,93,43,33,7,117,112,111,105,56,100,31,21,36,37,26,38,40,44,45,46,27,48,49,110,120,67,72,73,64,86,62,22]))),validateSearch:Za(()=>pe({replayId:L().optional()}))}),are=Sn({getParentRoute:()=>Rr,path:"/$org/gateways",component:Ln(()=>mn(()=>import("./gateways-DcbIYmOg.js"),__vite__mapDeps([123,78,79,3,62,7,38,5,10,28,72,80,81,11,36,18,82,91,70,32,20,33,34,30,35,14,92,27,37,46,22,88,12]))),validateSearch:Za(()=>pe({action:sn(["create"]).optional()}))}),sre=Sn({getParentRoute:()=>Rr,path:"/$org/gateways/$gatewayId",component:Ln(()=>mn(()=>import("./gateway-detail-6QzPV4MT.js"),__vite__mapDeps([124,32,3,20,4,5,84,50,34,30,35,14,81,11,36,18,68,26,116,28,58,83,33,118,117,53,40,41,103,22,64,60,101,47,16,65,39,66,42,122,49,108]))),validateSearch:Za(()=>pe({tab:L().optional()}))}),ire=Sn({getParentRoute:()=>Rr,path:"/$org/workflows",component:Ln(()=>mn(()=>import("./workflow-DgZwuETF.js"),__vite__mapDeps([125,55,119,56,34,79,3,62,7,38,5,10,28,72,81,11,36,18,70,32,42,88,54,92,27,12,82,120,23,61,41,116,58,14,30,50,35,112,46,68,108,84,78,51,52])))}),f3=Sn({getParentRoute:()=>Rr,path:"/$org/$pluginId",component:Ln(()=>mn(()=>import("./dynamic-plugin-layout-CXggkl7m.js"),__vite__mapDeps([126,11,52,50,34,30,35,14,40,41])))}),lre=[],h3=[];Gne.forEach(e=>{const t={parentRoute:f3,routing:{createRoute:Sn,lazyRouteComponent:Ln},registerRootSidebarItem:n=>lre.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{h3.push(...n)}};e.setup(t)});const cre=f3.addChildren(h3),ure=Sn({getParentRoute:()=>Dd,path:"/oauth/callback",component:Ln(()=>mn(()=>import("./oauth-callback-BddKzzFQ.js"),__vite__mapDeps([127,11,115])))}),dre=d3.addChildren([nre]),fre=Rr.addChildren([Yne,Wne,Qne,Xne,are,sre,tre,dre,Jne,ere,ire,rre,ore,cre]),hre=Dd.addChildren([fre,Zne,Kne,ure]),pre=eL({routeTree:hre}),mre=document.getElementById("root");LD.createRoot(mre).render(x.jsx(A.StrictMode,{children:x.jsx(rL,{router:pre})}));export{qI as $,Lre as A,wre as B,FB as C,Are as D,ee as E,bte as F,JY as G,tU as H,Ere as I,Lt as J,KC as K,YI as L,Za as M,Sre as N,zB as O,UB as P,md as Q,jB as R,vM as S,VB as T,Ze as U,ut as V,Ft as W,Oe as X,je as Y,kt as Z,xre as _,xj as a,$B as a$,Rre as a0,sn as a1,Ha as a2,Om as a3,Gne as a4,w5 as a5,v5 as a6,gre as a7,AA as a8,dA as a9,cH as aA,uH as aB,MF as aC,NF as aD,js as aE,WN as aF,OF as aG,LF as aH,CJ as aI,XM as aJ,pt as aK,bee as aL,h$ as aM,_4 as aN,w4 as aO,FG as aP,uk as aQ,hZ as aR,Dre as aS,mn as aT,xd as aU,yd as aV,MN as aW,Bb as aX,td as aY,RN as aZ,Fb as a_,Tm as aa,lb as ab,Gs as ac,Fa as ad,Bn as ae,QN as af,zi as ag,dn as ah,Ya as ai,it as aj,qo as ak,Bo as al,_d as am,Ek as an,SH as ao,wH as ap,vre as aq,Ur as ar,gr as as,qG as at,hA as au,fk as av,lH as aw,Vb as ax,wk as ay,zb as az,xm as b,hd as b0,or as b1,q0 as b2,jC as b3,e5 as b4,u5 as b5,h5 as b6,y5 as b7,p5 as b8,m5 as b9,kre as bA,Mre as bB,Pre as bC,Nre as bD,Vre as bE,ste as bF,dte as bG,Fre as bH,Oi as bI,i3 as bJ,Bre as bK,Vne as bL,ix as bM,_re as bN,yre as bO,Zu as bP,o5 as bQ,UC as bR,Lr as ba,b5 as bb,lx as bc,_5 as bd,g5 as be,zF as bf,$F as bg,UF as bh,cN as bi,QG as bj,XG as bk,WG as bl,Nte as bm,qte as bn,eo as bo,ar as bp,$I as bq,pr as br,Ore as bs,Cre as bt,Tre as bu,PG as bv,DG as bw,LG as bx,jG as by,$G as bz,pc as c,Yl as d,ht as e,mc as f,Ire as g,lV as h,yN as i,x as j,Er as k,DY as l,jre as m,$re as n,Ure as o,lre as p,ZC as q,A as r,gA as s,hT as t,bre as u,l5 as v,pe as w,L as x,da as y,ua as z};
|