@decocms/mesh 2.113.0 → 2.114.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-CooHa8Dx.js → AlertCircle-FL98lGLa.js} +1 -1
- package/dist/client/assets/{AlertOctagon-Dbg9uZyB.js → AlertOctagon-B33KdaLi.js} +1 -1
- package/dist/client/assets/{AlertTriangle-Ca8IB5bL.js → AlertTriangle-DteHmOG1.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DIF2VO2W.js → ArrowLeft-CMuGBwkE.js} +1 -1
- package/dist/client/assets/{ArrowUp-DgvOdNkG.js → ArrowUp-xougxkbC.js} +1 -1
- package/dist/client/assets/{Check-DGXJXTap.js → Check-BY-DCpO_.js} +1 -1
- package/dist/client/assets/{CheckCircle-DDajcDWB.js → CheckCircle-CpXx2avT.js} +1 -1
- package/dist/client/assets/{CheckDone01-CnxPjvi4.js → CheckDone01-DJLuFHxJ.js} +1 -1
- package/dist/client/assets/{CheckVerified02-Iy-LVhoI.js → CheckVerified02-Cqu-AawR.js} +1 -1
- package/dist/client/assets/{ChevronDown-Di42C1UO.js → ChevronDown-FdgQzkaa.js} +1 -1
- package/dist/client/assets/{ChevronRight-BNn59ko7.js → ChevronRight-DYxU3E_q.js} +1 -1
- package/dist/client/assets/{Clock-BLkZwDYw.js → Clock-Drw10Mc_.js} +1 -1
- package/dist/client/assets/{Code01-DooPA--K.js → Code01-CowHxp14.js} +1 -1
- package/dist/client/assets/{Container-C1CLnDNL.js → Container-B7qKC3EI.js} +1 -1
- package/dist/client/assets/{Copy01-rucQ3PSp.js → Copy01-B_7d0dwb.js} +1 -1
- package/dist/client/assets/{Dataflow03-DY9MPHye.js → Dataflow03-Cf4yDkKR.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-CxkCXGJv.js → DotsHorizontal-CqtaWGEh.js} +1 -1
- package/dist/client/assets/{DotsVertical-NXfqoXCN.js → DotsVertical-qEJ2g9HJ.js} +1 -1
- package/dist/client/assets/{Download01-f5vnFohs.js → Download01-IPqVm26W.js} +1 -1
- package/dist/client/assets/{Edit01-CxGjhFGJ.js → Edit01-CUcmwNxC.js} +1 -1
- package/dist/client/assets/{Eye-CmK33jvc.js → Eye-Rq15dwoo.js} +1 -1
- package/dist/client/assets/{File02-Bs24RCQ6.js → File02-DPSlzBxh.js} +1 -1
- package/dist/client/assets/{File06-XfbhoM8r.js → File06-xsY7vCFb.js} +1 -1
- package/dist/client/assets/{FilterLines-Gpro-d22.js → FilterLines-CJgE2bmA.js} +1 -1
- package/dist/client/assets/{Globe01-CspKYhQJ.js → Globe01-BuKzbzrx.js} +1 -1
- package/dist/client/assets/{Globe02-DcNEoN4R.js → Globe02-BIRPCTiD.js} +1 -1
- package/dist/client/assets/{Grid01-DkGxNKPL.js → Grid01-CcUd9dpu.js} +1 -1
- package/dist/client/assets/{Hash02-DFSzHnWN.js → Hash02-BAkYwsUS.js} +1 -1
- package/dist/client/assets/{Home02-CccWHOVS.js → Home02-CyX62jfB.js} +1 -1
- package/dist/client/assets/{Image01-F0dDnjWb.js → Image01-CiGMIZf1.js} +1 -1
- package/dist/client/assets/{Inbox01-rhXjoTLG.js → Inbox01-CxlDy_Yy.js} +1 -1
- package/dist/client/assets/{InfoCircle-DDMndy6f.js → InfoCircle-BBQwzN3e.js} +1 -1
- package/dist/client/assets/{Key01-BoEk45CQ.js → Key01-CcfhRF0P.js} +1 -1
- package/dist/client/assets/{LinkExternal01-6fiITYn6.js → LinkExternal01-CHfE9mil.js} +1 -1
- package/dist/client/assets/{List-DLWOvAOP.js → List-BkcTlONj.js} +1 -1
- package/dist/client/assets/{Loading01-BGpLDRYx.js → Loading01-CWwskqmx.js} +1 -1
- package/dist/client/assets/{Lock01-CkEZCQ8T.js → Lock01-C-e30A69.js} +1 -1
- package/dist/client/assets/{Pin01-CSZOSQvf.js → Pin01-DNrhTTs3.js} +1 -1
- package/dist/client/assets/{Play-Ck339o9D.js → Play-sMJsBLST.js} +1 -1
- package/dist/client/assets/{Plus-BB0XqcsP.js → Plus-7gpDbhJy.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-BlblCD0d.js → RefreshCcw01-BzY8N8T3.js} +1 -1
- package/dist/client/assets/{RefreshCw01-C2HUNviY.js → RefreshCw01-dI5kYugT.js} +1 -1
- package/dist/client/assets/{Save01-j7EMqYuR.js → Save01-C9jVAZgo.js} +1 -1
- package/dist/client/assets/{SearchMd-CguhhQVb.js → SearchMd-BMO4jqwv.js} +1 -1
- package/dist/client/assets/{Settings01-jz5w4e3w.js → Settings01-CRoxTuTO.js} +1 -1
- package/dist/client/assets/{Share07-DA5hMI-c.js → Share07-DFdDYoqj.js} +1 -1
- package/dist/client/assets/Shield01-DymehiLu.js +1 -0
- package/dist/client/assets/{Terminal-B6KzedA2.js → Terminal-zi42zfXM.js} +1 -1
- package/dist/client/assets/{Tool01-BPh57jnm.js → Tool01-lC4M_AmN.js} +1 -1
- package/dist/client/assets/{Trash01-DGjvH5rG.js → Trash01-BKhksYCP.js} +1 -1
- package/dist/client/assets/{Upload01-BWKtoN2l.js → Upload01-CorstXj2.js} +1 -1
- package/dist/client/assets/{Users03-DWNrz1Vr.js → Users03-B6oew679.js} +1 -1
- package/dist/client/assets/{XCircle-VzD2IKvZ.js → XCircle-WTPrrNWD.js} +1 -1
- package/dist/client/assets/{XClose-quksRQbf.js → XClose-DoKE29TG.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-DO3HZtWQ.js → agent-connections-preview-DybZ18X5.js} +1 -1
- package/dist/client/assets/agent-detail-DncXhd81.js +1 -0
- package/dist/client/assets/agents-D-4jcSt1.js +1 -0
- package/dist/client/assets/{alert-dialog-BobozgbA.js → alert-dialog-Dm7Md3Yk.js} +1 -1
- package/dist/client/assets/{auth-catchall-Bg2u42FQ.js → auth-catchall-DHQTu60x.js} +1 -1
- package/dist/client/assets/avatar-B-mPVtLH.js +1 -0
- package/dist/client/assets/{badge-Ba42zrft.js → badge-Bt6C7wEJ.js} +1 -1
- package/dist/client/assets/{binder-XSlHh33G.js → binder-BvXUsKRF.js} +1 -1
- package/dist/client/assets/breadcrumb-Cipoy1eR.js +1 -0
- package/dist/client/assets/button-Bl7hMmCe.js +1 -0
- package/dist/client/assets/card-BMQBEGUR.js +1 -0
- package/dist/client/assets/{checkbox-BgqFPCG8.js → checkbox-C-nrBu1T.js} +1 -1
- package/dist/client/assets/{circle-alert-D1V0DFvr.js → circle-alert-DYoRV5F7.js} +1 -1
- package/dist/client/assets/{collection-detail-tuOZUkEg.js → collection-detail-x0pDfnG2.js} +3 -3
- package/dist/client/assets/{collection-tab-DpQw4w-_.js → collection-tab-CMJJpUjs.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Dwsrv-is.js → collection-table-wrapper-DS44ibQ8.js} +1 -1
- package/dist/client/assets/{collection-tabs-BxPjmpup.js → collection-tabs-Dyc14WST.js} +1 -1
- package/dist/client/assets/{command-eII6FM4T.js → command-DGGP5Edh.js} +1 -1
- package/dist/client/assets/{connect-CjbgNw43.js → connect-BqPwKrDp.js} +1 -1
- package/dist/client/assets/{connection-card-B-vaA7In.js → connection-card-B_yTVrCB.js} +1 -1
- package/dist/client/assets/connection-detail-BHwcydrH.js +1 -0
- package/dist/client/assets/connections-C2FniOCy.js +1 -0
- package/dist/client/assets/constants-B9b2QjkO.js +1 -0
- package/dist/client/assets/{constants-DTZgxhQr.js → constants-DY_BU6PR.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-_ENRfzh2.js → create-organization-dialog-BmtVHISe.js} +1 -1
- package/dist/client/assets/{create-project-dialog-CkoSW_Yw.js → create-project-dialog-DFYOBIMM.js} +1 -1
- package/dist/client/assets/dialog-BTs7spED.js +1 -0
- package/dist/client/assets/{dropdown-menu-DwhvTSoj.js → dropdown-menu-Dk3PdiLq.js} +1 -1
- package/dist/client/assets/dynamic-plugin-layout-C8tDNw7E.js +1 -0
- package/dist/client/assets/empty-state-BrrA9jzc.js +1 -0
- package/dist/client/assets/{empty-state-CUSdR_G_.js → empty-state-yzpNvfA-.js} +1 -1
- package/dist/client/assets/{env-vars-editor-CX-fJfxt.js → env-vars-editor-CxFtbjNH.js} +1 -1
- package/dist/client/assets/{error-boundary-Di0tQXdv.js → error-boundary-GB3TovJQ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dd3BvcTW.js → extract-connection-data-Cjm6QMzJ.js} +1 -1
- package/dist/client/assets/{file-browser-CyYYn3HQ.js → file-browser-CeBgj9Bh.js} +2 -2
- package/dist/client/assets/{form-DIsigMsk.js → form-Dxe8J4dP.js} +1 -1
- package/dist/client/assets/{grid-view-BsAPFz5e.js → grid-view-qfkYjNIX.js} +1 -1
- package/dist/client/assets/{home-DoBwFvBu.js → home-C39nGjR7.js} +1 -1
- package/dist/client/assets/index-48TFsA2Q.css +1 -0
- package/dist/client/assets/{index-BVrm4rGn.js → index-B2KxLjHq.js} +1 -1
- package/dist/client/assets/{index-CMu5spRk.js → index-BOlMuTYA.js} +6 -6
- package/dist/client/assets/index-BrH9wXxf.js +1 -0
- package/dist/client/assets/{index-qSvnMMX3.js → index-BuPkfOh7.js} +1 -1
- package/dist/client/assets/{index-Cs0vYfu9.js → index-CLUeNS9F.js} +1 -1
- package/dist/client/assets/{index-DeBwK236.js → index-CSf23Q8F.js} +5 -5
- package/dist/client/assets/index-CzSiUwwv.js +218 -0
- package/dist/client/assets/{index-NEbz2HQu.js → index-DVHOzh7f.js} +1 -1
- package/dist/client/assets/{index-CDwFwb7Q.js → index-Dps5khDb.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DbZCUgr5.js → infiniteQueryObserver-Ctmp4byY.js} +1 -1
- package/dist/client/assets/{input-Cw77piS4.js → input-CAPxG1rh.js} +1 -1
- package/dist/client/assets/{integration-icon-D3fWRQzh.js → integration-icon-jbm4PmZt.js} +1 -1
- package/dist/client/assets/{label-CUy1x9Fc.js → label-A7ibpcPd.js} +1 -1
- package/dist/client/assets/{layout-BPYuOiPI.js → layout-DHncYg0M.js} +1 -1
- package/dist/client/assets/{localstorage-keys-DRPmjZks.js → localstorage-keys-Cc9e53sU.js} +1 -1
- package/dist/client/assets/{login-CUcM51_h.js → login-C4VFa6jD.js} +1 -1
- package/dist/client/assets/{markdown-BUX5ABnz.js → markdown-DTO-ngpn.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Da77-kcD.js → mcp-oauth-lMxJpMMH.js} +1 -1
- package/dist/client/assets/{mcp-server-card-DcZS4AhS.js → mcp-server-card-C-sPhXVX.js} +1 -1
- package/dist/client/assets/mcp-server-detail-BtO9BwQ6.js +2 -0
- package/dist/client/assets/members-Dh31vMll.js +3 -0
- package/dist/client/assets/{monitoring-DINJ4pYy.js → monitoring-D0DgTEcy.js} +1 -1
- package/dist/client/assets/monitoring-dashboard-edit-DCcFalwQ.js +1 -0
- package/dist/client/assets/{monitoring-dashboard-view-B53vWJlZ.js → monitoring-dashboard-view-CuFcYaD_.js} +1 -1
- package/dist/client/assets/{oauth-callback-Dsqe_oXS.js → oauth-callback-DKWROL5U.js} +1 -1
- package/dist/client/assets/{page-BKBuf2HE.js → page-BpCfHp43.js} +1 -1
- package/dist/client/assets/page-CoIEp87I.js +1 -0
- package/dist/client/assets/{plugin-empty-state-D_Z6xsRD.js → plugin-empty-state-DMdw5AKa.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-Cdi0lxlF.js → plugin-empty-state-DfPCNHNV.js} +1 -1
- package/dist/client/assets/{plugin-header-D_XJF06t.js → plugin-header-CVaBr8-j.js} +1 -1
- package/dist/client/assets/{plugin-header-DGLeYRv9.js → plugin-header-DqwJE7vc.js} +1 -1
- package/dist/client/assets/{popover-C8z2ljXJ.js → popover-Ca9Cyzf7.js} +1 -1
- package/dist/client/assets/{project-layout-gRYIrnzO.js → project-layout-F2YJOnzp.js} +1 -1
- package/dist/client/assets/project-settings-DwtLH_vq.js +1 -0
- package/dist/client/assets/projects-list-DPMlGsBe.js +1 -0
- package/dist/client/assets/{readme-viewer-DSTuLgLE.js → readme-viewer-D5RieYNW.js} +1 -1
- package/dist/client/assets/registry-layout-BrhYm9Dr.js +5 -0
- package/dist/client/assets/{registry-utils-D8FLO1oI.js → registry-utils--fif7P3x.js} +1 -1
- package/dist/client/assets/{reports-layout-NWBpDTNI.js → reports-layout-9yNTvI9o.js} +1 -1
- package/dist/client/assets/{reset-password-BEvAUHxp.js → reset-password-FRWYt8ap.js} +1 -1
- package/dist/client/assets/{resizable-Q_6VrAvM.js → resizable-DKtpdeB3.js} +1 -1
- package/dist/client/assets/{save-actions-DnatwzCI.js → save-actions-DH-J_-0b.js} +1 -1
- package/dist/client/assets/{scroll-area--Dl42eG7.js → scroll-area-BfJ2ZkbI.js} +1 -1
- package/dist/client/assets/{select-DmOdy-_2.js → select-CKDoCTJO.js} +1 -1
- package/dist/client/assets/shell-layout-DkuDKL8p.js +3 -0
- package/dist/client/assets/{spinner-BFe5KsON.js → spinner-B-FWJ8nx.js} +1 -1
- package/dist/client/assets/{store-invite-B6QzkY9D.js → store-invite-1HxdtnDC.js} +1 -1
- package/dist/client/assets/{switch-BTNdX6uT.js → switch-ySGmS6Zx.js} +1 -1
- package/dist/client/assets/{table-m7xKes0i.js → table-DGDNn7mH.js} +1 -1
- package/dist/client/assets/tasks-BuxJd7k9.js +1 -0
- package/dist/client/assets/{textarea-1ZAkAqPs.js → textarea-COGwSIgK.js} +1 -1
- package/dist/client/assets/{time-range-picker-S5DXdK6J.js → time-range-picker-hBuoR0m0.js} +1 -1
- package/dist/client/assets/{toggle-group-B4gd2g4g.js → toggle-group-RO8j2kDd.js} +1 -1
- package/dist/client/assets/{tools-list-BYJP7wdj.js → tools-list-CBpacE22.js} +1 -1
- package/dist/client/assets/tooltip-CLbmwjfd.js +1 -0
- package/dist/client/assets/topbar-portal-BHxVS8Tl.js +1 -0
- package/dist/client/assets/typewriter-title-C4OcGX3b.js +16 -0
- package/dist/client/assets/{use-binding-CAtjL1rr.js → use-binding-D36c91MK.js} +1 -1
- package/dist/client/assets/{use-connection-BRwTI0xk.js → use-connection-CdIwTzRh.js} +1 -1
- package/dist/client/assets/{use-copy-BnGNgGbL.js → use-copy-BZqI2HfR.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BIn6DTPa.js → use-create-virtual-mcp-DKrayFIg.js} +1 -1
- package/dist/client/assets/{use-deco-chat-open-CWPuucLF.js → use-deco-chat-open-BuMsTBnv.js} +3 -3
- package/dist/client/assets/{use-install-from-registry-GZkHb-J_.js → use-install-from-registry-kn39eg4d.js} +1 -1
- package/dist/client/assets/{use-list-state-CLqJqhda.js → use-list-state-CYucxtoX.js} +1 -1
- package/dist/client/assets/{use-llm-BToIG9lg.js → use-llm-CX9QGbjZ.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C28zFdyF.js → use-mcp-prompts-DMC1gnwj.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CnGq7c_h.js → use-mcp-tools-SZ1hgrkZ.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BVsgnOKP.js → use-organization-settings-1mU06z41.js} +1 -1
- package/dist/client/assets/{use-project-pPGjnPtH.js → use-project-CsuhSK50.js} +1 -1
- package/dist/client/assets/use-view-mode-CVN4cPaD.js +1 -0
- package/dist/client/assets/{use-virtual-mcp-C67SrK4s.js → use-virtual-mcp-CqdRLJoL.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bd_PpC7_.js +1 -0
- package/dist/client/assets/{useMutation-BLWSoXAi.js → useMutation-BYl8vvsl.js} +1 -1
- package/dist/client/assets/useQuery-CTct6gOY.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DJZPFUMY.js +1 -0
- package/dist/client/assets/workflow-CMJomw9A.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +3 -3
- package/dist/server/migrate.js +3 -3
- package/dist/server/server.js +3 -3
- package/package.json +1 -1
- package/dist/client/assets/Settings02-BEGJoXOf.js +0 -1
- package/dist/client/assets/X-hlRWRdLd.js +0 -1
- package/dist/client/assets/agent-detail-Dm90C1dq.js +0 -1
- package/dist/client/assets/agents-Dp1lzRWx.js +0 -1
- package/dist/client/assets/avatar-DzNBuwvQ.js +0 -1
- package/dist/client/assets/breadcrumb-DVboj9hZ.js +0 -1
- package/dist/client/assets/button-BvpGJmwj.js +0 -1
- package/dist/client/assets/card-DUyr2anf.js +0 -1
- package/dist/client/assets/connection-detail-1_ZQMYvG.js +0 -1
- package/dist/client/assets/connections-DSsqgW7V.js +0 -1
- package/dist/client/assets/constants-BXsR0e2f.js +0 -1
- package/dist/client/assets/dialog-Djb2_yQ3.js +0 -1
- package/dist/client/assets/dynamic-plugin-layout-gS11xmZg.js +0 -1
- package/dist/client/assets/empty-state-CfAcFJ3T.js +0 -1
- package/dist/client/assets/index-hmLeN6Cx.css +0 -1
- package/dist/client/assets/index-p5ek_T2U.js +0 -218
- package/dist/client/assets/index-r3RmHcg-.js +0 -1
- package/dist/client/assets/mcp-server-detail-BsuSFuH9.js +0 -2
- package/dist/client/assets/members-Dt-WMWXs.js +0 -3
- package/dist/client/assets/monitoring-dashboard-edit-ViuWKC7f.js +0 -1
- package/dist/client/assets/page-BLmopBsr.js +0 -1
- package/dist/client/assets/project-settings-iakvSAMp.js +0 -1
- package/dist/client/assets/projects-list-BTf0o0Dw.js +0 -1
- package/dist/client/assets/registry-layout-D0ZI3R-w.js +0 -5
- package/dist/client/assets/shell-layout-DaVrqTvl.js +0 -12
- package/dist/client/assets/tasks-B817iTsv.js +0 -1
- package/dist/client/assets/tooltip-w4nyO9EM.js +0 -1
- package/dist/client/assets/topbar-portal-DFijBXBE.js +0 -1
- package/dist/client/assets/typewriter-title-fwTbDCyQ.js +0 -16
- package/dist/client/assets/use-mobile-Dl83qL71.js +0 -1
- package/dist/client/assets/use-view-mode-BC3VVzlU.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CL1DQ1B_.js +0 -1
- package/dist/client/assets/useQuery-CoMTdc_B.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BEcP523_.js +0 -1
- package/dist/client/assets/workflow-D3d1tCTr.js +0 -1
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/file-browser-CeBgj9Bh.js","assets/topbar-portal-BHxVS8Tl.js","assets/useInfiniteQuery-Bd_PpC7_.js","assets/infiniteQueryObserver-Ctmp4byY.js","assets/button-Bl7hMmCe.js","assets/checkbox-C-nrBu1T.js","assets/Check-BY-DCpO_.js","assets/AlertCircle-FL98lGLa.js","assets/ChevronRight-DYxU3E_q.js","assets/Download01-IPqVm26W.js","assets/File02-DPSlzBxh.js","assets/Grid01-CcUd9dpu.js","assets/Home02-CyX62jfB.js","assets/List-BkcTlONj.js","assets/Loading01-CWwskqmx.js","assets/Trash01-BKhksYCP.js","assets/Upload01-CorstXj2.js","assets/useMutation-BYl8vvsl.js","assets/plugin-header-DqwJE7vc.js","assets/ChevronDown-FdgQzkaa.js","assets/registry-layout-BrhYm9Dr.js","assets/CheckCircle-CpXx2avT.js","assets/Container-B7qKC3EI.js","assets/Settings01-CRoxTuTO.js","assets/useQuery-CTct6gOY.js","assets/constants-DY_BU6PR.js","assets/badge-Bt6C7wEJ.js","assets/input-CAPxG1rh.js","assets/dropdown-menu-Dk3PdiLq.js","assets/table-DGDNn7mH.js","assets/toggle-group-RO8j2kDd.js","assets/use-view-mode-CVN4cPaD.js","assets/tooltip-CLbmwjfd.js","assets/index-Dps5khDb.js","assets/DotsVertical-qEJ2g9HJ.js","assets/FilterLines-CJgE2bmA.js","assets/Globe01-BuKzbzrx.js","assets/SearchMd-BMO4jqwv.js","assets/dialog-BTs7spED.js","assets/alert-dialog-Dm7Md3Yk.js","assets/card-BMQBEGUR.js","assets/label-A7ibpcPd.js","assets/select-CKDoCTJO.js","assets/switch-ySGmS6Zx.js","assets/textarea-COGwSIgK.js","assets/ArrowLeft-CMuGBwkE.js","assets/use-copy-BZqI2HfR.js","assets/RefreshCcw01-BzY8N8T3.js","assets/Eye-Rq15dwoo.js","assets/LinkExternal01-CHfE9mil.js","assets/XCircle-WTPrrNWD.js","assets/use-connection-CdIwTzRh.js","assets/popover-Ca9Cyzf7.js","assets/Copy01-B_7d0dwb.js","assets/Save01-C9jVAZgo.js","assets/Key01-CcfhRF0P.js","assets/Plus-7gpDbhJy.js","assets/mcp-oauth-lMxJpMMH.js","assets/Play-sMJsBLST.js","assets/reports-layout-9yNTvI9o.js","assets/binder-BvXUsKRF.js","assets/CheckDone01-DJLuFHxJ.js","assets/Clock-Drw10Mc_.js","assets/Inbox01-CxlDy_Yy.js","assets/InfoCircle-BBQwzN3e.js","assets/markdown-DTO-ngpn.js","assets/ArrowUp-xougxkbC.js","assets/CheckVerified02-Cqu-AawR.js","assets/Hash02-BAkYwsUS.js","assets/plugin-header-CVaBr8-j.js","assets/Dataflow03-Cf4yDkKR.js","assets/plugin-empty-state-DfPCNHNV.js","assets/login-C4VFa6jD.js","assets/reset-password-FRWYt8ap.js","assets/connect-BqPwKrDp.js","assets/circle-alert-DYoRV5F7.js","assets/oauth-callback-DKWROL5U.js","assets/shell-layout-DkuDKL8p.js","assets/index-CSf23Q8F.js","assets/use-deco-chat-open-BuMsTBnv.js","assets/use-virtual-mcp-CqdRLJoL.js","assets/use-llm-CX9QGbjZ.js","assets/use-binding-D36c91MK.js","assets/localstorage-keys-Cc9e53sU.js","assets/error-boundary-GB3TovJQ.js","assets/AlertTriangle-DteHmOG1.js","assets/File06-xsY7vCFb.js","assets/Image01-CiGMIZf1.js","assets/useSuspenseInfiniteQuery-DJZPFUMY.js","assets/spinner-B-FWJ8nx.js","assets/use-mcp-prompts-DMC1gnwj.js","assets/form-Dxe8J4dP.js","assets/integration-icon-jbm4PmZt.js","assets/usage-B8eRkRZY.js","assets/Edit01-CUcmwNxC.js","assets/Users03-B6oew679.js","assets/Code01-CowHxp14.js","assets/use-create-virtual-mcp-DKrayFIg.js","assets/marked.esm-BaswSlok.js","assets/tools-list-CBpacE22.js","assets/collection-table-wrapper-DS44ibQ8.js","assets/empty-state-yzpNvfA-.js","assets/Globe02-BIRPCTiD.js","assets/RefreshCw01-dI5kYugT.js","assets/layout-DHncYg0M.js","assets/index-BrH9wXxf.js","assets/generate-id-Dyweu44Y.js","assets/typewriter-title-C4OcGX3b.js","assets/create-project-dialog-DFYOBIMM.js","assets/use-project-CsuhSK50.js","assets/avatar-B-mPVtLH.js","assets/create-organization-dialog-BmtVHISe.js","assets/Shield01-DymehiLu.js","assets/XClose-DoKE29TG.js","assets/use-organization-settings-1mU06z41.js","assets/resizable-DKtpdeB3.js","assets/home-C39nGjR7.js","assets/project-layout-F2YJOnzp.js","assets/page-CoIEp87I.js","assets/Pin01-DNrhTTs3.js","assets/Share07-DFdDYoqj.js","assets/tasks-BuxJd7k9.js","assets/use-list-state-CYucxtoX.js","assets/format-time-CMKyl-GC.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/breadcrumb-Cipoy1eR.js","assets/AlertOctagon-B33KdaLi.js","assets/project-settings-DwtLH_vq.js","assets/use-install-from-registry-kn39eg4d.js","assets/extract-connection-data-Cjm6QMzJ.js","assets/constants-B9b2QjkO.js","assets/github-icon-Dp3wHhYE.js","assets/registry-utils--fif7P3x.js","assets/projects-list-DPMlGsBe.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/members-Dh31vMll.js","assets/command-DGGP5Edh.js","assets/index-DVHOzh7f.js","assets/DotsHorizontal-CqtaWGEh.js","assets/Lock01-C-e30A69.js","assets/connections-C2FniOCy.js","assets/connection-card-B_yTVrCB.js","assets/use-mcp-tools-SZ1hgrkZ.js","assets/Terminal-zi42zfXM.js","assets/env-vars-editor-CxFtbjNH.js","assets/connection-detail-BHwcydrH.js","assets/index-BuPkfOh7.js","assets/save-actions-DH-J_-0b.js","assets/index-BOlMuTYA.js","assets/index-B2KxLjHq.js","assets/collection-tabs-Dyc14WST.js","assets/collection-tab-CMJJpUjs.js","assets/empty-state-BrrA9jzc.js","assets/readme-viewer-D5RieYNW.js","assets/readme-viewer-DWnTz46N.css","assets/collection-detail-x0pDfnG2.js","assets/scroll-area-BfJ2ZkbI.js","assets/Tool01-lC4M_AmN.js","assets/monitoring-D0DgTEcy.js","assets/time-range-picker-hBuoR0m0.js","assets/monitoring-dashboard-view-CuFcYaD_.js","assets/monitoring-dashboard-edit-DCcFalwQ.js","assets/page-BpCfHp43.js","assets/slugify-CEUa2lfQ.js","assets/mcp-server-card-C-sPhXVX.js","assets/mcp-server-detail-BtO9BwQ6.js","assets/agents-D-4jcSt1.js","assets/agent-connections-preview-DybZ18X5.js","assets/agent-detail-DncXhd81.js","assets/workflow-CMJomw9A.js","assets/dynamic-plugin-layout-C8tDNw7E.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function O5(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 c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).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 C5="modulepreload",A5=function(e){return"/"+e},$R={},xt=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let c=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=c(n.map(f=>{if(f=A5(f),f in $R)return;$R[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":C5,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((y,w)=>{g.addEventListener("load",y),g.addEventListener("error",()=>w(Error(`Unable to preload CSS for ${f}`)))})}))}function i(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return a.then(c=>{for(const u of c||[])u.status==="rejected"&&i(u.reason);return t().catch(i)})};var Zre=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var my={exports:{}},fu={};var UR;function I5(){if(UR)return fu;UR=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var c=null;if(i!==void 0&&(c=""+i),a.key!==void 0&&(c=""+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:c,ref:a!==void 0?a:null,props:i}}return fu.Fragment=t,fu.jsx=n,fu.jsxs=n,fu}var zR;function N5(){return zR||(zR=1,my.exports=I5()),my.exports}var x=N5(),gy={exports:{}},hu={},vy={exports:{}},yy={};var VR;function k5(){return VR||(VR=1,(function(e){function t(F,X){var ae=F.length;F.push(X);e:for(;0<ae;){var fe=ae-1>>>1,K=F[fe];if(0<a(K,X))F[fe]=X,F[ae]=K,ae=fe;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var X=F[0],ae=F.pop();if(ae!==X){F[0]=ae;e:for(var fe=0,K=F.length,P=K>>>1;fe<P;){var B=2*(fe+1)-1,q=F[B],L=B+1,$=F[L];if(0>a(q,ae))L<K&&0>a($,q)?(F[fe]=$,F[L]=ae,fe=L):(F[fe]=q,F[B]=ae,fe=B);else if(L<K&&0>a($,ae))F[fe]=$,F[L]=ae,fe=L;else break e}}return X}function a(F,X){var ae=F.sortIndex-X.sortIndex;return ae!==0?ae:F.id-X.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 c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var d=[],f=[],m=1,p=null,g=3,y=!1,w=!1,S=!1,b=!1,R=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function C(F){for(var X=n(f);X!==null;){if(X.callback===null)r(f);else if(X.startTime<=F)r(f),X.sortIndex=X.expirationTime,t(d,X);else break;X=n(f)}}function O(F){if(S=!1,C(F),!w)if(n(d)!==null)w=!0,I||(I=!0,Z());else{var X=n(f);X!==null&&ie(O,X.startTime-F)}}var I=!1,k=-1,D=5,z=-1;function Y(){return b?!0:!(e.unstable_now()-z<D)}function V(){if(b=!1,I){var F=e.unstable_now();z=F;var X=!0;try{e:{w=!1,S&&(S=!1,E(k),k=-1),y=!0;var ae=g;try{t:{for(C(F),p=n(d);p!==null&&!(p.expirationTime>F&&Y());){var fe=p.callback;if(typeof fe=="function"){p.callback=null,g=p.priorityLevel;var K=fe(p.expirationTime<=F);if(F=e.unstable_now(),typeof K=="function"){p.callback=K,C(F),X=!0;break t}p===n(d)&&r(d),C(F)}else r(d);p=n(d)}if(p!==null)X=!0;else{var P=n(f);P!==null&&ie(O,P.startTime-F),X=!1}}break e}finally{p=null,g=ae,y=!1}X=void 0}}finally{X?Z():I=!1}}}var Z;if(typeof T=="function")Z=function(){T(V)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,J=U.port2;U.port1.onmessage=V,Z=function(){J.postMessage(null)}}else Z=function(){R(V,0)};function ie(F,X){k=R(function(){F(e.unstable_now())},X)}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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(F){switch(g){case 1:case 2:case 3:var X=3;break;default:X=g}var ae=g;g=X;try{return F()}finally{g=ae}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(F,X){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var ae=g;g=F;try{return X()}finally{g=ae}},e.unstable_scheduleCallback=function(F,X,ae){var fe=e.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?fe+ae:fe):ae=fe,F){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=ae+K,F={id:m++,callback:X,priorityLevel:F,startTime:ae,expirationTime:K,sortIndex:-1},ae>fe?(F.sortIndex=ae,t(f,F),n(d)===null&&F===n(f)&&(S?(E(k),k=-1):S=!0,ie(O,ae-fe))):(F.sortIndex=K,t(d,F),w||y||(w=!0,I||(I=!0,Z()))),F},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(F){var X=g;return function(){var ae=g;g=X;try{return F.apply(this,arguments)}finally{g=ae}}}})(yy)),yy}var FR;function M5(){return FR||(FR=1,vy.exports=k5()),vy.exports}var _y={exports:{}},Je={};var qR;function P5(){if(qR)return Je;qR=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"),c=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(P){return P===null||typeof P!="object"?null:(P=g&&P[g]||P["@@iterator"],typeof P=="function"?P:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function R(P,B,q){this.props=P,this.context=B,this.refs=b,this.updater=q||w}R.prototype.isReactComponent={},R.prototype.setState=function(P,B){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,B,"setState")},R.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function E(){}E.prototype=R.prototype;function T(P,B,q){this.props=P,this.context=B,this.refs=b,this.updater=q||w}var C=T.prototype=new E;C.constructor=T,S(C,R.prototype),C.isPureReactComponent=!0;var O=Array.isArray;function I(){}var k={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function z(P,B,q){var L=q.ref;return{$$typeof:e,type:P,key:B,ref:L!==void 0?L:null,props:q}}function Y(P,B){return z(P.type,B,P.props)}function V(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function Z(P){var B={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(q){return B[q]})}var U=/\/+/g;function J(P,B){return typeof P=="object"&&P!==null&&P.key!=null?Z(""+P.key):B.toString(36)}function ie(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(I,I):(P.status="pending",P.then(function(B){P.status==="pending"&&(P.status="fulfilled",P.value=B)},function(B){P.status==="pending"&&(P.status="rejected",P.reason=B)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function F(P,B,q,L,$){var Q=typeof P;(Q==="undefined"||Q==="boolean")&&(P=null);var me=!1;if(P===null)me=!0;else switch(Q){case"bigint":case"string":case"number":me=!0;break;case"object":switch(P.$$typeof){case e:case t:me=!0;break;case m:return me=P._init,F(me(P._payload),B,q,L,$)}}if(me)return $=$(P),me=L===""?"."+J(P,0):L,O($)?(q="",me!=null&&(q=me.replace(U,"$&/")+"/"),F($,B,q,"",function(Ne){return Ne})):$!=null&&(V($)&&($=Y($,q+($.key==null||P&&P.key===$.key?"":(""+$.key).replace(U,"$&/")+"/")+me)),B.push($)),1;me=0;var _e=L===""?".":L+":";if(O(P))for(var Ae=0;Ae<P.length;Ae++)L=P[Ae],Q=_e+J(L,Ae),me+=F(L,B,q,Q,$);else if(Ae=y(P),typeof Ae=="function")for(P=Ae.call(P),Ae=0;!(L=P.next()).done;)L=L.value,Q=_e+J(L,Ae++),me+=F(L,B,q,Q,$);else if(Q==="object"){if(typeof P.then=="function")return F(ie(P),B,q,L,$);throw B=String(P),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return me}function X(P,B,q){if(P==null)return P;var L=[],$=0;return F(P,L,"","",function(Q){return B.call(q,Q,$++)}),L}function ae(P){if(P._status===-1){var B=P._result;B=B(),B.then(function(q){(P._status===0||P._status===-1)&&(P._status=1,P._result=q)},function(q){(P._status===0||P._status===-1)&&(P._status=2,P._result=q)}),P._status===-1&&(P._status=0,P._result=B)}if(P._status===1)return P._result.default;throw P._result}var fe=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},K={map:X,forEach:function(P,B,q){X(P,function(){B.apply(this,arguments)},q)},count:function(P){var B=0;return X(P,function(){B++}),B},toArray:function(P){return X(P,function(B){return B})||[]},only:function(P){if(!V(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Je.Activity=p,Je.Children=K,Je.Component=R,Je.Fragment=n,Je.Profiler=a,Je.PureComponent=T,Je.StrictMode=r,Je.Suspense=d,Je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,Je.__COMPILER_RUNTIME={__proto__:null,c:function(P){return k.H.useMemoCache(P)}},Je.cache=function(P){return function(){return P.apply(null,arguments)}},Je.cacheSignal=function(){return null},Je.cloneElement=function(P,B,q){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var L=S({},P.props),$=P.key;if(B!=null)for(Q in B.key!==void 0&&($=""+B.key),B)!D.call(B,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&B.ref===void 0||(L[Q]=B[Q]);var Q=arguments.length-2;if(Q===1)L.children=q;else if(1<Q){for(var me=Array(Q),_e=0;_e<Q;_e++)me[_e]=arguments[_e+2];L.children=me}return z(P.type,$,L)},Je.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:i,_context:P},P},Je.createElement=function(P,B,q){var L,$={},Q=null;if(B!=null)for(L in B.key!==void 0&&(Q=""+B.key),B)D.call(B,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&($[L]=B[L]);var me=arguments.length-2;if(me===1)$.children=q;else if(1<me){for(var _e=Array(me),Ae=0;Ae<me;Ae++)_e[Ae]=arguments[Ae+2];$.children=_e}if(P&&P.defaultProps)for(L in me=P.defaultProps,me)$[L]===void 0&&($[L]=me[L]);return z(P,Q,$)},Je.createRef=function(){return{current:null}},Je.forwardRef=function(P){return{$$typeof:u,render:P}},Je.isValidElement=V,Je.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:ae}},Je.memo=function(P,B){return{$$typeof:f,type:P,compare:B===void 0?null:B}},Je.startTransition=function(P){var B=k.T,q={};k.T=q;try{var L=P(),$=k.S;$!==null&&$(q,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(I,fe)}catch(Q){fe(Q)}finally{B!==null&&q.types!==null&&(B.types=q.types),k.T=B}},Je.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},Je.use=function(P){return k.H.use(P)},Je.useActionState=function(P,B,q){return k.H.useActionState(P,B,q)},Je.useCallback=function(P,B){return k.H.useCallback(P,B)},Je.useContext=function(P){return k.H.useContext(P)},Je.useDebugValue=function(){},Je.useDeferredValue=function(P,B){return k.H.useDeferredValue(P,B)},Je.useEffect=function(P,B){return k.H.useEffect(P,B)},Je.useEffectEvent=function(P){return k.H.useEffectEvent(P)},Je.useId=function(){return k.H.useId()},Je.useImperativeHandle=function(P,B,q){return k.H.useImperativeHandle(P,B,q)},Je.useInsertionEffect=function(P,B){return k.H.useInsertionEffect(P,B)},Je.useLayoutEffect=function(P,B){return k.H.useLayoutEffect(P,B)},Je.useMemo=function(P,B){return k.H.useMemo(P,B)},Je.useOptimistic=function(P,B){return k.H.useOptimistic(P,B)},Je.useReducer=function(P,B,q){return k.H.useReducer(P,B,q)},Je.useRef=function(P){return k.H.useRef(P)},Je.useState=function(P){return k.H.useState(P)},Je.useSyncExternalStore=function(P,B,q){return k.H.useSyncExternalStore(P,B,q)},Je.useTransition=function(){return k.H.useTransition()},Je.version="19.2.4",Je}var BR;function Us(){return BR||(BR=1,_y.exports=P5()),_y.exports}var by={exports:{}},tr={};var HR;function D5(){if(HR)return tr;HR=1;var e=Us();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 c=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 tr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,tr.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)},tr.flushSync=function(d){var f=c.T,m=r.p;try{if(c.T=null,r.p=2,d)return d()}finally{c.T=f,r.p=m,r.d.f()}},tr.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))},tr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},tr.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})}},tr.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)},tr.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})}},tr.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)},tr.requestFormReset=function(d){r.d.r(d)},tr.unstable_batchedUpdates=function(d,f){return d(f)},tr.useFormState=function(d,f,m){return c.H.useFormState(d,f,m)},tr.useFormStatus=function(){return c.H.useHostTransitionStatus()},tr.version="19.2.4",tr}var GR;function MC(){if(GR)return by.exports;GR=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(),by.exports=D5(),by.exports}var ZR;function L5(){if(ZR)return hu;ZR=1;var e=M5(),t=Us(),n=MC();function r(o){var s="https://react.dev/errors/"+o;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l])}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,l=o;if(o.alternate)for(;s.return;)s=s.return;else{o=s;do s=o,(s.flags&4098)!==0&&(l=s.return),o=s.return;while(o)}return s.tag===3?l:null}function c(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 l=o,h=s;;){var v=l.return;if(v===null)break;var _=v.alternate;if(_===null){if(h=v.return,h!==null){l=h;continue}break}if(v.child===_.child){for(_=v.child;_;){if(_===l)return d(v),o;if(_===h)return d(v),s;_=_.sibling}throw Error(r(188))}if(l.return!==h.return)l=v,h=_;else{for(var N=!1,j=v.child;j;){if(j===l){N=!0,l=v,h=_;break}if(j===h){N=!0,h=v,l=_;break}j=j.sibling}if(!N){for(j=_.child;j;){if(j===l){N=!0,l=_,h=v;break}if(j===h){N=!0,h=_,l=v;break}j=j.sibling}if(!N)throw Error(r(189))}}if(l.alternate!==h)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?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"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),Y=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function Z(o){return o===null||typeof o!="object"?null:(o=V&&o[V]||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 b:return"StrictMode";case O:return"Suspense";case I:return"SuspenseList";case z:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case w:return"Portal";case T:return o.displayName||"Context";case E:return(o._context.displayName||"Context")+".Consumer";case C:var s=o.render;return o=o.displayName,o||(o=s.displayName||s.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case k:return s=o.displayName||null,s!==null?s:J(o.type)||"Memo";case D:s=o._payload,o=o._init;try{return J(o(s))}catch{}}return null}var ie=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},fe=[],K=-1;function P(o){return{current:o}}function B(o){0>K||(o.current=fe[K],fe[K]=null,K--)}function q(o,s){K++,fe[K]=o.current,o.current=s}var L=P(null),$=P(null),Q=P(null),me=P(null);function _e(o,s){switch(q(Q,s),q($,o),q(L,null),s.nodeType){case 9:case 11:o=(o=s.documentElement)&&(o=o.namespaceURI)?iR(o):0;break;default:if(o=s.tagName,s=s.namespaceURI)s=iR(s),o=cR(s,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}B(L),q(L,o)}function Ae(){B(L),B($),B(Q)}function Ne(o){o.memoizedState!==null&&q(me,o);var s=L.current,l=cR(s,o.type);s!==l&&(q($,o),q(L,l))}function H(o){$.current===o&&(B(L),B($)),me.current===o&&(B(me),cu._currentValue=ae)}var ne,be;function pe(o){if(ne===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);ne=s&&s[1]||"",be=-1<l.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+ne+o+be}var ce=!1;function Oe(o,s){if(!o||ce)return"";ce=!0;var l=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 he=ge}Reflect.construct(o,[],xe)}else{try{xe.call()}catch(ge){he=ge}o.call(xe.prototype)}}else{try{throw Error()}catch(ge){he=ge}(xe=o())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(ge){if(ge&&he&&typeof ge.stack=="string")return[ge.stack,he.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(),N=_[0],j=_[1];if(N&&j){var W=N.split(`
|
|
5
|
+
`),de=j.split(`
|
|
6
|
+
`);for(v=h=0;h<W.length&&!W[h].includes("DetermineComponentFrameRoot");)h++;for(;v<de.length&&!de[v].includes("DetermineComponentFrameRoot");)v++;if(h===W.length||v===de.length)for(h=W.length-1,v=de.length-1;1<=h&&0<=v&&W[h]!==de[v];)v--;for(;1<=h&&0<=v;h--,v--)if(W[h]!==de[v]){if(h!==1||v!==1)do if(h--,v--,0>v||W[h]!==de[v]){var we=`
|
|
7
|
+
`+W[h].replace(" at new "," at ");return o.displayName&&we.includes("<anonymous>")&&(we=we.replace("<anonymous>",o.displayName)),we}while(1<=h&&0<=v);break}}}finally{ce=!1,Error.prepareStackTrace=l}return(l=o?o.displayName||o.name:"")?pe(l):""}function $e(o,s){switch(o.tag){case 26:case 27:case 5:return pe(o.type);case 16:return pe("Lazy");case 13:return o.child!==s&&s!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return Oe(o.type,!1);case 11:return Oe(o.type.render,!1);case 1:return Oe(o.type,!0);case 31:return pe("Activity");default:return""}}function Ye(o){try{var s="",l=null;do s+=$e(o,l),l=o,o=o.return;while(o);return s}catch(h){return`
|
|
8
|
+
Error generating stack: `+h.message+`
|
|
9
|
+
`+h.stack}}var He=Object.prototype.hasOwnProperty,Xe=e.unstable_scheduleCallback,G=e.unstable_cancelCallback,te=e.unstable_shouldYield,oe=e.unstable_requestPaint,Se=e.unstable_now,Te=e.unstable_getCurrentPriorityLevel,Re=e.unstable_ImmediatePriority,ke=e.unstable_UserBlockingPriority,rt=e.unstable_NormalPriority,st=e.unstable_LowPriority,kt=e.unstable_IdlePriority,hr=e.log,Rn=e.unstable_setDisableYieldValue,$n=null,en=null;function Un(o){if(typeof hr=="function"&&Rn(o),en&&typeof en.setStrictMode=="function")try{en.setStrictMode($n,o)}catch{}}var In=Math.clz32?Math.clz32:Nr,zi=Math.log,Gs=Math.LN2;function Nr(o){return o>>>=0,o===0?32:31-(zi(o)/Gs|0)|0}var Vi=256,Fi=262144,Zs=4194304;function Fo(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,l){var h=o.pendingLanes;if(h===0)return 0;var v=0,_=o.suspendedLanes,N=o.pingedLanes;o=o.warmLanes;var j=h&134217727;return j!==0?(h=j&~_,h!==0?v=Fo(h):(N&=j,N!==0?v=Fo(N):l||(l=j&~o,l!==0&&(v=Fo(l))))):(j=h&~_,j!==0?v=Fo(j):N!==0?v=Fo(N):l||(l=h&~o,l!==0&&(v=Fo(l)))),v===0?0:s!==0&&s!==v&&(s&_)===0&&(_=v&-v,l=s&-s,_>=l||_===32&&(l&4194048)!==0)?s:v}function Wt(o,s){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&s)===0}function Nn(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 er(){var o=Zs;return Zs<<=1,(Zs&62914560)===0&&(Zs=4194304),o}function Fa(o){for(var s=[],l=0;31>l;l++)s.push(o);return s}function tn(o,s){o.pendingLanes|=s,s!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function pr(o,s,l,h,v,_){var N=o.pendingLanes;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=l,o.entangledLanes&=l,o.errorRecoveryDisabledLanes&=l,o.shellSuspendCounter=0;var j=o.entanglements,W=o.expirationTimes,de=o.hiddenUpdates;for(l=N&~l;0<l;){var we=31-In(l),xe=1<<we;j[we]=0,W[we]=-1;var he=de[we];if(he!==null)for(de[we]=null,we=0;we<he.length;we++){var ge=he[we];ge!==null&&(ge.lane&=-536870913)}l&=~xe}h!==0&&Ks(o,h,0),_!==0&&v===0&&o.tag!==0&&(o.suspendedLanes|=_&~(N&~s))}function Ks(o,s,l){o.pendingLanes|=s,o.suspendedLanes&=~s;var h=31-In(s);o.entangledLanes|=s,o.entanglements[h]=o.entanglements[h]|1073741824|l&261930}function mr(o,s){var l=o.entangledLanes|=s;for(o=o.entanglements;l;){var h=31-In(l),v=1<<h;v&s|o[h]&s&&(o[h]|=s),l&=~v}}function gr(o,s){var l=s&-s;return l=(l&42)!==0?1:qi(l),(l&(o.suspendedLanes|s))!==0?0:l}function qi(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 bo(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function ag(){var o=X.p;return o!==0?o:(o=window.event,o===void 0?32:NR(o.type))}function Z1(o,s){var l=X.p;try{return X.p=o,s()}finally{X.p=l}}var qa=Math.random().toString(36).slice(2),zn="__reactFiber$"+qa,vr="__reactProps$"+qa,Bi="__reactContainer$"+qa,sg="__reactEvents$"+qa,gP="__reactListeners$"+qa,vP="__reactHandles$"+qa,K1="__reactResources$"+qa,El="__reactMarker$"+qa;function ig(o){delete o[zn],delete o[vr],delete o[sg],delete o[gP],delete o[vP]}function Hi(o){var s=o[zn];if(s)return s;for(var l=o.parentNode;l;){if(s=l[Bi]||l[zn]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(o=mR(o);o!==null;){if(l=o[zn])return l;o=mR(o)}return s}o=l,l=o.parentNode}return null}function Gi(o){if(o=o[zn]||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 Rl(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o.stateNode;throw Error(r(33))}function Zi(o){var s=o[K1];return s||(s=o[K1]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function kn(o){o[El]=!0}var W1=new Set,Y1={};function Ws(o,s){Ki(o,s),Ki(o+"Capture",s)}function Ki(o,s){for(Y1[o]=s,o=0;o<s.length;o++)W1.add(s[o])}var yP=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]*$"),Q1={},X1={};function _P(o){return He.call(X1,o)?!0:He.call(Q1,o)?!1:yP.test(o)?X1[o]=!0:(Q1[o]=!0,!1)}function kd(o,s,l){if(_P(s))if(l===null)o.removeAttribute(s);else{switch(typeof l){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,""+l)}}function Md(o,s,l){if(l===null)o.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(s);return}o.setAttribute(s,""+l)}}function la(o,s,l,h){if(h===null)o.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttributeNS(s,l,""+h)}}function Qr(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function J1(o){var s=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function bP(o,s,l){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(N){l=""+N,_.call(this,N)}}),Object.defineProperty(o,s,{enumerable:h.enumerable}),{getValue:function(){return l},setValue:function(N){l=""+N},stopTracking:function(){o._valueTracker=null,delete o[s]}}}}function cg(o){if(!o._valueTracker){var s=J1(o)?"checked":"value";o._valueTracker=bP(o,s,""+o[s])}}function ew(o){if(!o)return!1;var s=o._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return o&&(h=J1(o)?o.checked?"true":"false":o.value),o=h,o!==l?(s.setValue(o),!0):!1}function Pd(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 wP=/[\n"\\]/g;function Xr(o){return o.replace(wP,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function lg(o,s,l,h,v,_,N,j){o.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?o.type=N:o.removeAttribute("type"),s!=null?N==="number"?(s===0&&o.value===""||o.value!=s)&&(o.value=""+Qr(s)):o.value!==""+Qr(s)&&(o.value=""+Qr(s)):N!=="submit"&&N!=="reset"||o.removeAttribute("value"),s!=null?ug(o,N,Qr(s)):l!=null?ug(o,N,Qr(l)):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=""+Qr(j):o.removeAttribute("name")}function tw(o,s,l,h,v,_,N,j){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(o.type=_),s!=null||l!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){cg(o);return}l=l!=null?""+Qr(l):"",s=s!=null?""+Qr(s):l,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,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(o.name=N),cg(o)}function ug(o,s,l){s==="number"&&Pd(o.ownerDocument)===o||o.defaultValue===""+l||(o.defaultValue=""+l)}function Wi(o,s,l,h){if(o=o.options,s){s={};for(var v=0;v<l.length;v++)s["$"+l[v]]=!0;for(l=0;l<o.length;l++)v=s.hasOwnProperty("$"+o[l].value),o[l].selected!==v&&(o[l].selected=v),v&&h&&(o[l].defaultSelected=!0)}else{for(l=""+Qr(l),s=null,v=0;v<o.length;v++){if(o[v].value===l){o[v].selected=!0,h&&(o[v].defaultSelected=!0);return}s!==null||o[v].disabled||(s=o[v])}s!==null&&(s.selected=!0)}}function nw(o,s,l){if(s!=null&&(s=""+Qr(s),s!==o.value&&(o.value=s),l==null)){o.defaultValue!==s&&(o.defaultValue=s);return}o.defaultValue=l!=null?""+Qr(l):""}function rw(o,s,l,h){if(s==null){if(h!=null){if(l!=null)throw Error(r(92));if(ie(h)){if(1<h.length)throw Error(r(93));h=h[0]}l=h}l==null&&(l=""),s=l}l=Qr(s),o.defaultValue=l,h=o.textContent,h===l&&h!==""&&h!==null&&(o.value=h),cg(o)}function Yi(o,s){if(s){var l=o.firstChild;if(l&&l===o.lastChild&&l.nodeType===3){l.nodeValue=s;return}}o.textContent=s}var SP=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 ow(o,s,l){var h=s.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?h?o.setProperty(s,""):s==="float"?o.cssFloat="":o[s]="":h?o.setProperty(s,l):typeof l!="number"||l===0||SP.has(s)?s==="float"?o.cssFloat=l:o[s]=(""+l).trim():o[s]=l+"px"}function aw(o,s,l){if(s!=null&&typeof s!="object")throw Error(r(62));if(o=o.style,l!=null){for(var h in l)!l.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)&&l[v]!==h&&ow(o,v,h)}else for(var _ in s)s.hasOwnProperty(_)&&ow(o,_,s[_])}function dg(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 EP=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"]]),RP=/^[\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 Dd(o){return RP.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function ua(){}var fg=null;function hg(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Qi=null,Xi=null;function sw(o){var s=Gi(o);if(s&&(o=s.stateNode)){var l=o[vr]||null;e:switch(o=s.stateNode,s.type){case"input":if(lg(o,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),s=l.name,l.type==="radio"&&s!=null){for(l=o;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Xr(""+s)+'"][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==o&&h.form===o.form){var v=h[vr]||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<l.length;s++)h=l[s],h.form===o.form&&ew(h)}break e;case"textarea":nw(o,l.value,l.defaultValue);break e;case"select":s=l.value,s!=null&&Wi(o,!!l.multiple,s,!1)}}}var pg=!1;function iw(o,s,l){if(pg)return o(s,l);pg=!0;try{var h=o(s);return h}finally{if(pg=!1,(Qi!==null||Xi!==null)&&(Ef(),Qi&&(s=Qi,o=Xi,Xi=Qi=null,sw(s),o)))for(s=0;s<o.length;s++)sw(o[s])}}function xl(o,s){var l=o.stateNode;if(l===null)return null;var h=l[vr]||null;if(h===null)return null;l=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(l&&typeof l!="function")throw Error(r(231,s,typeof l));return l}var da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mg=!1;if(da)try{var Tl={};Object.defineProperty(Tl,"passive",{get:function(){mg=!0}}),window.addEventListener("test",Tl,Tl),window.removeEventListener("test",Tl,Tl)}catch{mg=!1}var Ba=null,gg=null,Ld=null;function cw(){if(Ld)return Ld;var o,s=gg,l=s.length,h,v="value"in Ba?Ba.value:Ba.textContent,_=v.length;for(o=0;o<l&&s[o]===v[o];o++);var N=l-o;for(h=1;h<=N&&s[l-h]===v[_-h];h++);return Ld=v.slice(o,1<h?1-h:void 0)}function jd(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 $d(){return!0}function lw(){return!1}function yr(o){function s(l,h,v,_,N){this._reactName=l,this._targetInst=v,this.type=h,this.nativeEvent=_,this.target=N,this.currentTarget=null;for(var j in o)o.hasOwnProperty(j)&&(l=o[j],this[j]=l?l(_):_[j]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?$d:lw,this.isPropagationStopped=lw,this}return p(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=$d)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=$d)},persist:function(){},isPersistent:$d}),s}var Ys={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ud=yr(Ys),Ol=p({},Ys,{view:0,detail:0}),xP=yr(Ol),vg,yg,Cl,zd=p({},Ol,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bg,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!==Cl&&(Cl&&o.type==="mousemove"?(vg=o.screenX-Cl.screenX,yg=o.screenY-Cl.screenY):yg=vg=0,Cl=o),vg)},movementY:function(o){return"movementY"in o?o.movementY:yg}}),uw=yr(zd),TP=p({},zd,{dataTransfer:0}),OP=yr(TP),CP=p({},Ol,{relatedTarget:0}),_g=yr(CP),AP=p({},Ys,{animationName:0,elapsedTime:0,pseudoElement:0}),IP=yr(AP),NP=p({},Ys,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),kP=yr(NP),MP=p({},Ys,{data:0}),dw=yr(MP),PP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},DP={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"},LP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jP(o){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(o):(o=LP[o])?!!s[o]:!1}function bg(){return jP}var $P=p({},Ol,{key:function(o){if(o.key){var s=PP[o.key]||o.key;if(s!=="Unidentified")return s}return o.type==="keypress"?(o=jd(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?DP[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bg,charCode:function(o){return o.type==="keypress"?jd(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?jd(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),UP=yr($P),zP=p({},zd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fw=yr(zP),VP=p({},Ol,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bg}),FP=yr(VP),qP=p({},Ys,{propertyName:0,elapsedTime:0,pseudoElement:0}),BP=yr(qP),HP=p({},zd,{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}),GP=yr(HP),ZP=p({},Ys,{newState:0,oldState:0}),KP=yr(ZP),WP=[9,13,27,32],wg=da&&"CompositionEvent"in window,Al=null;da&&"documentMode"in document&&(Al=document.documentMode);var YP=da&&"TextEvent"in window&&!Al,hw=da&&(!wg||Al&&8<Al&&11>=Al),pw=" ",mw=!1;function gw(o,s){switch(o){case"keyup":return WP.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vw(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var Ji=!1;function QP(o,s){switch(o){case"compositionend":return vw(s);case"keypress":return s.which!==32?null:(mw=!0,pw);case"textInput":return o=s.data,o===pw&&mw?null:o;default:return null}}function XP(o,s){if(Ji)return o==="compositionend"||!wg&&gw(o,s)?(o=cw(),Ld=gg=Ba=null,Ji=!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 hw&&s.locale!=="ko"?null:s.data;default:return null}}var JP={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 yw(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s==="input"?!!JP[o.type]:s==="textarea"}function _w(o,s,l,h){Qi?Xi?Xi.push(h):Xi=[h]:Qi=h,s=If(s,"onChange"),0<s.length&&(l=new Ud("onChange","change",null,l,h),o.push({event:l,listeners:s}))}var Il=null,Nl=null;function e3(o){tR(o,0)}function Vd(o){var s=Rl(o);if(ew(s))return o}function bw(o,s){if(o==="change")return s}var ww=!1;if(da){var Sg;if(da){var Eg="oninput"in document;if(!Eg){var Sw=document.createElement("div");Sw.setAttribute("oninput","return;"),Eg=typeof Sw.oninput=="function"}Sg=Eg}else Sg=!1;ww=Sg&&(!document.documentMode||9<document.documentMode)}function Ew(){Il&&(Il.detachEvent("onpropertychange",Rw),Nl=Il=null)}function Rw(o){if(o.propertyName==="value"&&Vd(Nl)){var s=[];_w(s,Nl,o,hg(o)),iw(e3,s)}}function t3(o,s,l){o==="focusin"?(Ew(),Il=s,Nl=l,Il.attachEvent("onpropertychange",Rw)):o==="focusout"&&Ew()}function n3(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Vd(Nl)}function r3(o,s){if(o==="click")return Vd(s)}function o3(o,s){if(o==="input"||o==="change")return Vd(s)}function a3(o,s){return o===s&&(o!==0||1/o===1/s)||o!==o&&s!==s}var kr=typeof Object.is=="function"?Object.is:a3;function kl(o,s){if(kr(o,s))return!0;if(typeof o!="object"||o===null||typeof s!="object"||s===null)return!1;var l=Object.keys(o),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var v=l[h];if(!He.call(s,v)||!kr(o[v],s[v]))return!1}return!0}function xw(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Tw(o,s){var l=xw(o);o=0;for(var h;l;){if(l.nodeType===3){if(h=o+l.textContent.length,o<=s&&h>=s)return{node:l,offset:s-o};o=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=xw(l)}}function Ow(o,s){return o&&s?o===s?!0:o&&o.nodeType===3?!1:s&&s.nodeType===3?Ow(o,s.parentNode):"contains"in o?o.contains(s):o.compareDocumentPosition?!!(o.compareDocumentPosition(s)&16):!1:!1}function Cw(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var s=Pd(o.document);s instanceof o.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)o=s.contentWindow;else break;s=Pd(o.document)}return s}function Rg(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 s3=da&&"documentMode"in document&&11>=document.documentMode,ec=null,xg=null,Ml=null,Tg=!1;function Aw(o,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Tg||ec==null||ec!==Pd(h)||(h=ec,"selectionStart"in h&&Rg(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}),Ml&&kl(Ml,h)||(Ml=h,h=If(xg,"onSelect"),0<h.length&&(s=new Ud("onSelect","select",null,s,l),o.push({event:s,listeners:h}),s.target=ec)))}function Qs(o,s){var l={};return l[o.toLowerCase()]=s.toLowerCase(),l["Webkit"+o]="webkit"+s,l["Moz"+o]="moz"+s,l}var tc={animationend:Qs("Animation","AnimationEnd"),animationiteration:Qs("Animation","AnimationIteration"),animationstart:Qs("Animation","AnimationStart"),transitionrun:Qs("Transition","TransitionRun"),transitionstart:Qs("Transition","TransitionStart"),transitioncancel:Qs("Transition","TransitionCancel"),transitionend:Qs("Transition","TransitionEnd")},Og={},Iw={};da&&(Iw=document.createElement("div").style,"AnimationEvent"in window||(delete tc.animationend.animation,delete tc.animationiteration.animation,delete tc.animationstart.animation),"TransitionEvent"in window||delete tc.transitionend.transition);function Xs(o){if(Og[o])return Og[o];if(!tc[o])return o;var s=tc[o],l;for(l in s)if(s.hasOwnProperty(l)&&l in Iw)return Og[o]=s[l];return o}var Nw=Xs("animationend"),kw=Xs("animationiteration"),Mw=Xs("animationstart"),i3=Xs("transitionrun"),c3=Xs("transitionstart"),l3=Xs("transitioncancel"),Pw=Xs("transitionend"),Dw=new Map,Cg="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(" ");Cg.push("scrollEnd");function wo(o,s){Dw.set(o,s),Ws(s,[o])}var Fd=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)},Jr=[],nc=0,Ag=0;function qd(){for(var o=nc,s=Ag=nc=0;s<o;){var l=Jr[s];Jr[s++]=null;var h=Jr[s];Jr[s++]=null;var v=Jr[s];Jr[s++]=null;var _=Jr[s];if(Jr[s++]=null,h!==null&&v!==null){var N=h.pending;N===null?v.next=v:(v.next=N.next,N.next=v),h.pending=v}_!==0&&Lw(l,v,_)}}function Bd(o,s,l,h){Jr[nc++]=o,Jr[nc++]=s,Jr[nc++]=l,Jr[nc++]=h,Ag|=h,o.lanes|=h,o=o.alternate,o!==null&&(o.lanes|=h)}function Ig(o,s,l,h){return Bd(o,s,l,h),Hd(o)}function Js(o,s){return Bd(o,null,null,s),Hd(o)}function Lw(o,s,l){o.lanes|=l;var h=o.alternate;h!==null&&(h.lanes|=l);for(var v=!1,_=o.return;_!==null;)_.childLanes|=l,h=_.alternate,h!==null&&(h.childLanes|=l),_.tag===22&&(o=_.stateNode,o===null||o._visibility&1||(v=!0)),o=_,_=_.return;return o.tag===3?(_=o.stateNode,v&&s!==null&&(v=31-In(l),o=_.hiddenUpdates,h=o[v],h===null?o[v]=[s]:h.push(s),s.lane=l|536870912),_):null}function Hd(o){if(50<tu)throw tu=0,Uv=null,Error(r(185));for(var s=o.return;s!==null;)o=s,s=o.return;return o.tag===3?o.stateNode:null}var rc={};function u3(o,s,l,h){this.tag=o,this.key=l,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 Mr(o,s,l,h){return new u3(o,s,l,h)}function Ng(o){return o=o.prototype,!(!o||!o.isReactComponent)}function fa(o,s){var l=o.alternate;return l===null?(l=Mr(o.tag,s,o.key,o.mode),l.elementType=o.elementType,l.type=o.type,l.stateNode=o.stateNode,l.alternate=o,o.alternate=l):(l.pendingProps=s,l.type=o.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=o.flags&65011712,l.childLanes=o.childLanes,l.lanes=o.lanes,l.child=o.child,l.memoizedProps=o.memoizedProps,l.memoizedState=o.memoizedState,l.updateQueue=o.updateQueue,s=o.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=o.sibling,l.index=o.index,l.ref=o.ref,l.refCleanup=o.refCleanup,l}function jw(o,s){o.flags&=65011714;var l=o.alternate;return l===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=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,s=l.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),o}function Gd(o,s,l,h,v,_){var N=0;if(h=o,typeof o=="function")Ng(o)&&(N=1);else if(typeof o=="string")N=m5(o,l,L.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case z:return o=Mr(31,l,s,v),o.elementType=z,o.lanes=_,o;case S:return ei(l.children,v,_,s);case b:N=8,v|=24;break;case R:return o=Mr(12,l,s,v|2),o.elementType=R,o.lanes=_,o;case O:return o=Mr(13,l,s,v),o.elementType=O,o.lanes=_,o;case I:return o=Mr(19,l,s,v),o.elementType=I,o.lanes=_,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case T:N=10;break e;case E:N=9;break e;case C:N=11;break e;case k:N=14;break e;case D:N=16,h=null;break e}N=29,l=Error(r(130,o===null?"null":typeof o,"")),h=null}return s=Mr(N,l,s,v),s.elementType=o,s.type=h,s.lanes=_,s}function ei(o,s,l,h){return o=Mr(7,o,h,s),o.lanes=l,o}function kg(o,s,l){return o=Mr(6,o,null,s),o.lanes=l,o}function $w(o){var s=Mr(18,null,null,0);return s.stateNode=o,s}function Mg(o,s,l){return s=Mr(4,o.children!==null?o.children:[],o.key,s),s.lanes=l,s.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},s}var Uw=new WeakMap;function eo(o,s){if(typeof o=="object"&&o!==null){var l=Uw.get(o);return l!==void 0?l:(s={value:o,source:s,stack:Ye(s)},Uw.set(o,s),s)}return{value:o,source:s,stack:Ye(s)}}var oc=[],ac=0,Zd=null,Pl=0,to=[],no=0,Ha=null,qo=1,Bo="";function ha(o,s){oc[ac++]=Pl,oc[ac++]=Zd,Zd=o,Pl=s}function zw(o,s,l){to[no++]=qo,to[no++]=Bo,to[no++]=Ha,Ha=o;var h=qo;o=Bo;var v=32-In(h)-1;h&=~(1<<v),l+=1;var _=32-In(s)+v;if(30<_){var N=v-v%5;_=(h&(1<<N)-1).toString(32),h>>=N,v-=N,qo=1<<32-In(s)+v|l<<v|h,Bo=_+o}else qo=1<<_|l<<v|h,Bo=o}function Pg(o){o.return!==null&&(ha(o,1),zw(o,1,0))}function Dg(o){for(;o===Zd;)Zd=oc[--ac],oc[ac]=null,Pl=oc[--ac],oc[ac]=null;for(;o===Ha;)Ha=to[--no],to[no]=null,Bo=to[--no],to[no]=null,qo=to[--no],to[no]=null}function Vw(o,s){to[no++]=qo,to[no++]=Bo,to[no++]=Ha,qo=s.id,Bo=s.overflow,Ha=o}var Vn=null,Zt=null,wt=!1,Ga=null,ro=!1,Lg=Error(r(519));function Za(o){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Dl(eo(s,o)),Lg}function Fw(o){var s=o.stateNode,l=o.type,h=o.memoizedProps;switch(s[zn]=o,s[vr]=h,l){case"dialog":vt("cancel",s),vt("close",s);break;case"iframe":case"object":case"embed":vt("load",s);break;case"video":case"audio":for(l=0;l<ru.length;l++)vt(ru[l],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),tw(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),rw(s,h.value,h.defaultValue,h.children)}l=h.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||s.textContent===""+l||h.suppressHydrationWarning===!0||aR(s.textContent,l)?(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=ua),s=!0):s=!1,s||Za(o,!0)}function qw(o){for(Vn=o.return;Vn;)switch(Vn.tag){case 5:case 31:case 13:ro=!1;return;case 27:case 3:ro=!0;return;default:Vn=Vn.return}}function sc(o){if(o!==Vn)return!1;if(!wt)return qw(o),wt=!0,!1;var s=o.tag,l;if((l=s!==3&&s!==27)&&((l=s===5)&&(l=o.type,l=!(l!=="form"&&l!=="button")||ey(o.type,o.memoizedProps)),l=!l),l&&Zt&&Za(o),qw(o),s===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Zt=pR(o)}else if(s===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Zt=pR(o)}else s===27?(s=Zt,is(o.type)?(o=ay,ay=null,Zt=o):Zt=s):Zt=Vn?ao(o.stateNode.nextSibling):null;return!0}function ti(){Zt=Vn=null,wt=!1}function jg(){var o=Ga;return o!==null&&(Sr===null?Sr=o:Sr.push.apply(Sr,o),Ga=null),o}function Dl(o){Ga===null?Ga=[o]:Ga.push(o)}var $g=P(null),ni=null,pa=null;function Ka(o,s,l){q($g,s._currentValue),s._currentValue=l}function ma(o){o._currentValue=$g.current,B($g)}function Ug(o,s,l){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===l)break;o=o.return}}function zg(o,s,l,h){var v=o.child;for(v!==null&&(v.return=o);v!==null;){var _=v.dependencies;if(_!==null){var N=v.child;_=_.firstContext;e:for(;_!==null;){var j=_;_=v;for(var W=0;W<s.length;W++)if(j.context===s[W]){_.lanes|=l,j=_.alternate,j!==null&&(j.lanes|=l),Ug(_.return,l,o),h||(N=null);break e}_=j.next}}else if(v.tag===18){if(N=v.return,N===null)throw Error(r(341));N.lanes|=l,_=N.alternate,_!==null&&(_.lanes|=l),Ug(N,l,o),N=null}else N=v.child;if(N!==null)N.return=v;else for(N=v;N!==null;){if(N===o){N=null;break}if(v=N.sibling,v!==null){v.return=N.return,N=v;break}N=N.return}v=N}}function ic(o,s,l,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 N=v.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var j=v.type;kr(v.pendingProps.value,N.value)||(o!==null?o.push(j):o=[j])}}else if(v===me.current){if(N=v.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(o!==null?o.push(cu):o=[cu])}v=v.return}o!==null&&zg(s,o,l,h),s.flags|=262144}function Kd(o){for(o=o.firstContext;o!==null;){if(!kr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function ri(o){ni=o,pa=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Fn(o){return Bw(ni,o)}function Wd(o,s){return ni===null&&ri(o),Bw(o,s)}function Bw(o,s){var l=s._currentValue;if(s={context:s,memoizedValue:l,next:null},pa===null){if(o===null)throw Error(r(308));pa=s,o.dependencies={lanes:0,firstContext:s},o.flags|=524288}else pa=pa.next=s;return l}var d3=typeof AbortController<"u"?AbortController:function(){var o=[],s=this.signal={aborted:!1,addEventListener:function(l,h){o.push(h)}};this.abort=function(){s.aborted=!0,o.forEach(function(l){return l()})}},f3=e.unstable_scheduleCallback,h3=e.unstable_NormalPriority,pn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vg(){return{controller:new d3,data:new Map,refCount:0}}function Ll(o){o.refCount--,o.refCount===0&&f3(h3,function(){o.controller.abort()})}var jl=null,Fg=0,cc=0,lc=null;function p3(o,s){if(jl===null){var l=jl=[];Fg=0,cc=Hv(),lc={status:"pending",value:void 0,then:function(h){l.push(h)}}}return Fg++,s.then(Hw,Hw),s}function Hw(){if(--Fg===0&&jl!==null){lc!==null&&(lc.status="fulfilled");var o=jl;jl=null,cc=0,lc=null;for(var s=0;s<o.length;s++)(0,o[s])()}}function m3(o,s){var l=[],h={status:"pending",value:null,reason:null,then:function(v){l.push(v)}};return o.then(function(){h.status="fulfilled",h.value=s;for(var v=0;v<l.length;v++)(0,l[v])(s)},function(v){for(h.status="rejected",h.reason=v,v=0;v<l.length;v++)(0,l[v])(void 0)}),h}var Gw=F.S;F.S=function(o,s){AE=Se(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&p3(o,s),Gw!==null&&Gw(o,s)};var oi=P(null);function qg(){var o=oi.current;return o!==null?o:qt.pooledCache}function Yd(o,s){s===null?q(oi,oi.current):q(oi,s.pool)}function Zw(){var o=qg();return o===null?null:{parent:pn._currentValue,pool:o}}var uc=Error(r(460)),Bg=Error(r(474)),Qd=Error(r(542)),Xd={then:function(){}};function Kw(o){return o=o.status,o==="fulfilled"||o==="rejected"}function Ww(o,s,l){switch(l=o[l],l===void 0?o.push(s):l!==s&&(s.then(ua,ua),s=l),s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,Qw(o),o;default:if(typeof s.status=="string")s.then(ua,ua);else{if(o=qt,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,Qw(o),o}throw si=s,uc}}function ai(o){try{var s=o._init;return s(o._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(si=l,uc):l}}var si=null;function Yw(){if(si===null)throw Error(r(459));var o=si;return si=null,o}function Qw(o){if(o===uc||o===Qd)throw Error(r(483))}var dc=null,$l=0;function Jd(o){var s=$l;return $l+=1,dc===null&&(dc=[]),Ww(dc,o,s)}function Ul(o,s){s=s.props.ref,o.ref=s!==void 0?s:null}function ef(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 Xw(o){function s(se,ee){if(o){var ue=se.deletions;ue===null?(se.deletions=[ee],se.flags|=16):ue.push(ee)}}function l(se,ee){if(!o)return null;for(;ee!==null;)s(se,ee),ee=ee.sibling;return null}function h(se){for(var ee=new Map;se!==null;)se.key!==null?ee.set(se.key,se):ee.set(se.index,se),se=se.sibling;return ee}function v(se,ee){return se=fa(se,ee),se.index=0,se.sibling=null,se}function _(se,ee,ue){return se.index=ue,o?(ue=se.alternate,ue!==null?(ue=ue.index,ue<ee?(se.flags|=67108866,ee):ue):(se.flags|=67108866,ee)):(se.flags|=1048576,ee)}function N(se){return o&&se.alternate===null&&(se.flags|=67108866),se}function j(se,ee,ue,Ee){return ee===null||ee.tag!==6?(ee=kg(ue,se.mode,Ee),ee.return=se,ee):(ee=v(ee,ue),ee.return=se,ee)}function W(se,ee,ue,Ee){var Ge=ue.type;return Ge===S?we(se,ee,ue.props.children,Ee,ue.key):ee!==null&&(ee.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===D&&ai(Ge)===ee.type)?(ee=v(ee,ue.props),Ul(ee,ue),ee.return=se,ee):(ee=Gd(ue.type,ue.key,ue.props,null,se.mode,Ee),Ul(ee,ue),ee.return=se,ee)}function de(se,ee,ue,Ee){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==ue.containerInfo||ee.stateNode.implementation!==ue.implementation?(ee=Mg(ue,se.mode,Ee),ee.return=se,ee):(ee=v(ee,ue.children||[]),ee.return=se,ee)}function we(se,ee,ue,Ee,Ge){return ee===null||ee.tag!==7?(ee=ei(ue,se.mode,Ee,Ge),ee.return=se,ee):(ee=v(ee,ue),ee.return=se,ee)}function xe(se,ee,ue){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=kg(""+ee,se.mode,ue),ee.return=se,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case y:return ue=Gd(ee.type,ee.key,ee.props,null,se.mode,ue),Ul(ue,ee),ue.return=se,ue;case w:return ee=Mg(ee,se.mode,ue),ee.return=se,ee;case D:return ee=ai(ee),xe(se,ee,ue)}if(ie(ee)||Z(ee))return ee=ei(ee,se.mode,ue,null),ee.return=se,ee;if(typeof ee.then=="function")return xe(se,Jd(ee),ue);if(ee.$$typeof===T)return xe(se,Wd(se,ee),ue);ef(se,ee)}return null}function he(se,ee,ue,Ee){var Ge=ee!==null?ee.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Ge!==null?null:j(se,ee,""+ue,Ee);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:return ue.key===Ge?W(se,ee,ue,Ee):null;case w:return ue.key===Ge?de(se,ee,ue,Ee):null;case D:return ue=ai(ue),he(se,ee,ue,Ee)}if(ie(ue)||Z(ue))return Ge!==null?null:we(se,ee,ue,Ee,null);if(typeof ue.then=="function")return he(se,ee,Jd(ue),Ee);if(ue.$$typeof===T)return he(se,ee,Wd(se,ue),Ee);ef(se,ue)}return null}function ge(se,ee,ue,Ee,Ge){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return se=se.get(ue)||null,j(ee,se,""+Ee,Ge);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case y:return se=se.get(Ee.key===null?ue:Ee.key)||null,W(ee,se,Ee,Ge);case w:return se=se.get(Ee.key===null?ue:Ee.key)||null,de(ee,se,Ee,Ge);case D:return Ee=ai(Ee),ge(se,ee,ue,Ee,Ge)}if(ie(Ee)||Z(Ee))return se=se.get(ue)||null,we(ee,se,Ee,Ge,null);if(typeof Ee.then=="function")return ge(se,ee,ue,Jd(Ee),Ge);if(Ee.$$typeof===T)return ge(se,ee,ue,Wd(ee,Ee),Ge);ef(ee,Ee)}return null}function Ue(se,ee,ue,Ee){for(var Ge=null,Ot=null,qe=ee,it=ee=0,bt=null;qe!==null&&it<ue.length;it++){qe.index>it?(bt=qe,qe=null):bt=qe.sibling;var Ct=he(se,qe,ue[it],Ee);if(Ct===null){qe===null&&(qe=bt);break}o&&qe&&Ct.alternate===null&&s(se,qe),ee=_(Ct,ee,it),Ot===null?Ge=Ct:Ot.sibling=Ct,Ot=Ct,qe=bt}if(it===ue.length)return l(se,qe),wt&&ha(se,it),Ge;if(qe===null){for(;it<ue.length;it++)qe=xe(se,ue[it],Ee),qe!==null&&(ee=_(qe,ee,it),Ot===null?Ge=qe:Ot.sibling=qe,Ot=qe);return wt&&ha(se,it),Ge}for(qe=h(qe);it<ue.length;it++)bt=ge(qe,se,it,ue[it],Ee),bt!==null&&(o&&bt.alternate!==null&&qe.delete(bt.key===null?it:bt.key),ee=_(bt,ee,it),Ot===null?Ge=bt:Ot.sibling=bt,Ot=bt);return o&&qe.forEach(function(fs){return s(se,fs)}),wt&&ha(se,it),Ge}function Ze(se,ee,ue,Ee){if(ue==null)throw Error(r(151));for(var Ge=null,Ot=null,qe=ee,it=ee=0,bt=null,Ct=ue.next();qe!==null&&!Ct.done;it++,Ct=ue.next()){qe.index>it?(bt=qe,qe=null):bt=qe.sibling;var fs=he(se,qe,Ct.value,Ee);if(fs===null){qe===null&&(qe=bt);break}o&&qe&&fs.alternate===null&&s(se,qe),ee=_(fs,ee,it),Ot===null?Ge=fs:Ot.sibling=fs,Ot=fs,qe=bt}if(Ct.done)return l(se,qe),wt&&ha(se,it),Ge;if(qe===null){for(;!Ct.done;it++,Ct=ue.next())Ct=xe(se,Ct.value,Ee),Ct!==null&&(ee=_(Ct,ee,it),Ot===null?Ge=Ct:Ot.sibling=Ct,Ot=Ct);return wt&&ha(se,it),Ge}for(qe=h(qe);!Ct.done;it++,Ct=ue.next())Ct=ge(qe,se,it,Ct.value,Ee),Ct!==null&&(o&&Ct.alternate!==null&&qe.delete(Ct.key===null?it:Ct.key),ee=_(Ct,ee,it),Ot===null?Ge=Ct:Ot.sibling=Ct,Ot=Ct);return o&&qe.forEach(function(T5){return s(se,T5)}),wt&&ha(se,it),Ge}function Vt(se,ee,ue,Ee){if(typeof ue=="object"&&ue!==null&&ue.type===S&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case y:e:{for(var Ge=ue.key;ee!==null;){if(ee.key===Ge){if(Ge=ue.type,Ge===S){if(ee.tag===7){l(se,ee.sibling),Ee=v(ee,ue.props.children),Ee.return=se,se=Ee;break e}}else if(ee.elementType===Ge||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===D&&ai(Ge)===ee.type){l(se,ee.sibling),Ee=v(ee,ue.props),Ul(Ee,ue),Ee.return=se,se=Ee;break e}l(se,ee);break}else s(se,ee);ee=ee.sibling}ue.type===S?(Ee=ei(ue.props.children,se.mode,Ee,ue.key),Ee.return=se,se=Ee):(Ee=Gd(ue.type,ue.key,ue.props,null,se.mode,Ee),Ul(Ee,ue),Ee.return=se,se=Ee)}return N(se);case w:e:{for(Ge=ue.key;ee!==null;){if(ee.key===Ge)if(ee.tag===4&&ee.stateNode.containerInfo===ue.containerInfo&&ee.stateNode.implementation===ue.implementation){l(se,ee.sibling),Ee=v(ee,ue.children||[]),Ee.return=se,se=Ee;break e}else{l(se,ee);break}else s(se,ee);ee=ee.sibling}Ee=Mg(ue,se.mode,Ee),Ee.return=se,se=Ee}return N(se);case D:return ue=ai(ue),Vt(se,ee,ue,Ee)}if(ie(ue))return Ue(se,ee,ue,Ee);if(Z(ue)){if(Ge=Z(ue),typeof Ge!="function")throw Error(r(150));return ue=Ge.call(ue),Ze(se,ee,ue,Ee)}if(typeof ue.then=="function")return Vt(se,ee,Jd(ue),Ee);if(ue.$$typeof===T)return Vt(se,ee,Wd(se,ue),Ee);ef(se,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,ee!==null&&ee.tag===6?(l(se,ee.sibling),Ee=v(ee,ue),Ee.return=se,se=Ee):(l(se,ee),Ee=kg(ue,se.mode,Ee),Ee.return=se,se=Ee),N(se)):l(se,ee)}return function(se,ee,ue,Ee){try{$l=0;var Ge=Vt(se,ee,ue,Ee);return dc=null,Ge}catch(qe){if(qe===uc||qe===Qd)throw qe;var Ot=Mr(29,qe,null,se.mode);return Ot.lanes=Ee,Ot.return=se,Ot}}}var ii=Xw(!0),Jw=Xw(!1),Wa=!1;function Hg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gg(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 Ya(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Qa(o,s,l){var h=o.updateQueue;if(h===null)return null;if(h=h.shared,(It&2)!==0){var v=h.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),h.pending=s,s=Hd(o),Lw(o,null,l),s}return Bd(o,h,s,l),Hd(o)}function zl(o,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194048)!==0)){var h=s.lanes;h&=o.pendingLanes,l|=h,s.lanes=l,mr(o,l)}}function Zg(o,s){var l=o.updateQueue,h=o.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var v=null,_=null;if(l=l.firstBaseUpdate,l!==null){do{var N={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};_===null?v=_=N:_=_.next=N,l=l.next}while(l!==null);_===null?v=_=s:_=_.next=s}else v=_=s;l={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:_,shared:h.shared,callbacks:h.callbacks},o.updateQueue=l;return}o=l.lastBaseUpdate,o===null?l.firstBaseUpdate=s:o.next=s,l.lastBaseUpdate=s}var Kg=!1;function Vl(){if(Kg){var o=lc;if(o!==null)throw o}}function Fl(o,s,l,h){Kg=!1;var v=o.updateQueue;Wa=!1;var _=v.firstBaseUpdate,N=v.lastBaseUpdate,j=v.shared.pending;if(j!==null){v.shared.pending=null;var W=j,de=W.next;W.next=null,N===null?_=de:N.next=de,N=W;var we=o.alternate;we!==null&&(we=we.updateQueue,j=we.lastBaseUpdate,j!==N&&(j===null?we.firstBaseUpdate=de:j.next=de,we.lastBaseUpdate=W))}if(_!==null){var xe=v.baseState;N=0,we=de=W=null,j=_;do{var he=j.lane&-536870913,ge=he!==j.lane;if(ge?(_t&he)===he:(h&he)===he){he!==0&&he===cc&&(Kg=!0),we!==null&&(we=we.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var Ue=o,Ze=j;he=s;var Vt=l;switch(Ze.tag){case 1:if(Ue=Ze.payload,typeof Ue=="function"){xe=Ue.call(Vt,xe,he);break e}xe=Ue;break e;case 3:Ue.flags=Ue.flags&-65537|128;case 0:if(Ue=Ze.payload,he=typeof Ue=="function"?Ue.call(Vt,xe,he):Ue,he==null)break e;xe=p({},xe,he);break e;case 2:Wa=!0}}he=j.callback,he!==null&&(o.flags|=64,ge&&(o.flags|=8192),ge=v.callbacks,ge===null?v.callbacks=[he]:ge.push(he))}else ge={lane:he,tag:j.tag,payload:j.payload,callback:j.callback,next:null},we===null?(de=we=ge,W=xe):we=we.next=ge,N|=he;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);we===null&&(W=xe),v.baseState=W,v.firstBaseUpdate=de,v.lastBaseUpdate=we,_===null&&(v.shared.lanes=0),ns|=N,o.lanes=N,o.memoizedState=xe}}function eS(o,s){if(typeof o!="function")throw Error(r(191,o));o.call(s)}function tS(o,s){var l=o.callbacks;if(l!==null)for(o.callbacks=null,o=0;o<l.length;o++)eS(l[o],s)}var fc=P(null),tf=P(0);function nS(o,s){o=Ra,q(tf,o),q(fc,s),Ra=o|s.baseLanes}function Wg(){q(tf,Ra),q(fc,fc.current)}function Yg(){Ra=tf.current,B(fc),B(tf)}var Pr=P(null),oo=null;function Xa(o){var s=o.alternate;q(cn,cn.current&1),q(Pr,o),oo===null&&(s===null||fc.current!==null||s.memoizedState!==null)&&(oo=o)}function Qg(o){q(cn,cn.current),q(Pr,o),oo===null&&(oo=o)}function rS(o){o.tag===22?(q(cn,cn.current),q(Pr,o),oo===null&&(oo=o)):Ja()}function Ja(){q(cn,cn.current),q(Pr,Pr.current)}function Dr(o){B(Pr),oo===o&&(oo=null),B(cn)}var cn=P(0);function nf(o){for(var s=o;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ry(l)||oy(l)))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 ga=0,at=null,Ut=null,mn=null,rf=!1,hc=!1,ci=!1,of=0,ql=0,pc=null,g3=0;function on(){throw Error(r(321))}function Xg(o,s){if(s===null)return!1;for(var l=0;l<s.length&&l<o.length;l++)if(!kr(o[l],s[l]))return!1;return!0}function Jg(o,s,l,h,v,_){return ga=_,at=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,F.H=o===null||o.memoizedState===null?zS:pv,ci=!1,_=l(h,v),ci=!1,hc&&(_=aS(s,l,h,v)),oS(o),_}function oS(o){F.H=Gl;var s=Ut!==null&&Ut.next!==null;if(ga=0,mn=Ut=at=null,rf=!1,ql=0,pc=null,s)throw Error(r(300));o===null||gn||(o=o.dependencies,o!==null&&Kd(o)&&(gn=!0))}function aS(o,s,l,h){at=o;var v=0;do{if(hc&&(pc=null),ql=0,hc=!1,25<=v)throw Error(r(301));if(v+=1,mn=Ut=null,o.updateQueue!=null){var _=o.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}F.H=VS,_=s(l,h)}while(hc);return _}function v3(){var o=F.H,s=o.useState()[0];return s=typeof s.then=="function"?Bl(s):s,o=o.useState()[0],(Ut!==null?Ut.memoizedState:null)!==o&&(at.flags|=1024),s}function ev(){var o=of!==0;return of=0,o}function tv(o,s,l){s.updateQueue=o.updateQueue,s.flags&=-2053,o.lanes&=~l}function nv(o){if(rf){for(o=o.memoizedState;o!==null;){var s=o.queue;s!==null&&(s.pending=null),o=o.next}rf=!1}ga=0,mn=Ut=at=null,hc=!1,ql=of=0,pc=null}function ir(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mn===null?at.memoizedState=mn=o:mn=mn.next=o,mn}function ln(){if(Ut===null){var o=at.alternate;o=o!==null?o.memoizedState:null}else o=Ut.next;var s=mn===null?at.memoizedState:mn.next;if(s!==null)mn=s,Ut=o;else{if(o===null)throw at.alternate===null?Error(r(467)):Error(r(310));Ut=o,o={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},mn===null?at.memoizedState=mn=o:mn=mn.next=o}return mn}function af(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bl(o){var s=ql;return ql+=1,pc===null&&(pc=[]),o=Ww(pc,o,s),s=at,(mn===null?s.memoizedState:mn.next)===null&&(s=s.alternate,F.H=s===null||s.memoizedState===null?zS:pv),o}function sf(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Bl(o);if(o.$$typeof===T)return Fn(o)}throw Error(r(438,String(o)))}function rv(o){var s=null,l=at.updateQueue;if(l!==null&&(s=l.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}),l===null&&(l=af(),at.updateQueue=l),l.memoCache=s,l=s.data[s.index],l===void 0)for(l=s.data[s.index]=Array(o),h=0;h<o;h++)l[h]=Y;return s.index++,l}function va(o,s){return typeof s=="function"?s(o):s}function cf(o){var s=ln();return ov(s,Ut,o)}function ov(o,s,l){var h=o.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=l;var v=o.baseQueue,_=h.pending;if(_!==null){if(v!==null){var N=v.next;v.next=_.next,_.next=N}s.baseQueue=v=_,h.pending=null}if(_=o.baseState,v===null)o.memoizedState=_;else{s=v.next;var j=N=null,W=null,de=s,we=!1;do{var xe=de.lane&-536870913;if(xe!==de.lane?(_t&xe)===xe:(ga&xe)===xe){var he=de.revertLane;if(he===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),xe===cc&&(we=!0);else if((ga&he)===he){de=de.next,he===cc&&(we=!0);continue}else xe={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},W===null?(j=W=xe,N=_):W=W.next=xe,at.lanes|=he,ns|=he;xe=de.action,ci&&l(_,xe),_=de.hasEagerState?de.eagerState:l(_,xe)}else he={lane:xe,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},W===null?(j=W=he,N=_):W=W.next=he,at.lanes|=xe,ns|=xe;de=de.next}while(de!==null&&de!==s);if(W===null?N=_:W.next=j,!kr(_,o.memoizedState)&&(gn=!0,we&&(l=lc,l!==null)))throw l;o.memoizedState=_,o.baseState=N,o.baseQueue=W,h.lastRenderedState=_}return v===null&&(h.lanes=0),[o.memoizedState,h.dispatch]}function av(o){var s=ln(),l=s.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=o;var h=l.dispatch,v=l.pending,_=s.memoizedState;if(v!==null){l.pending=null;var N=v=v.next;do _=o(_,N.action),N=N.next;while(N!==v);kr(_,s.memoizedState)||(gn=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),l.lastRenderedState=_}return[_,h]}function sS(o,s,l){var h=at,v=ln(),_=wt;if(_){if(l===void 0)throw Error(r(407));l=l()}else l=s();var N=!kr((Ut||v).memoizedState,l);if(N&&(v.memoizedState=l,gn=!0),v=v.queue,cv(lS.bind(null,h,v,o),[o]),v.getSnapshot!==s||N||mn!==null&&mn.memoizedState.tag&1){if(h.flags|=2048,mc(9,{destroy:void 0},cS.bind(null,h,v,l,s),null),qt===null)throw Error(r(349));_||(ga&127)!==0||iS(h,s,l)}return l}function iS(o,s,l){o.flags|=16384,o={getSnapshot:s,value:l},s=at.updateQueue,s===null?(s=af(),at.updateQueue=s,s.stores=[o]):(l=s.stores,l===null?s.stores=[o]:l.push(o))}function cS(o,s,l,h){s.value=l,s.getSnapshot=h,uS(s)&&dS(o)}function lS(o,s,l){return l(function(){uS(s)&&dS(o)})}function uS(o){var s=o.getSnapshot;o=o.value;try{var l=s();return!kr(o,l)}catch{return!0}}function dS(o){var s=Js(o,2);s!==null&&Er(s,o,2)}function sv(o){var s=ir();if(typeof o=="function"){var l=o;if(o=l(),ci){Un(!0);try{l()}finally{Un(!1)}}}return s.memoizedState=s.baseState=o,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:o},s}function fS(o,s,l,h){return o.baseState=l,ov(o,Ut,typeof h=="function"?h:va)}function y3(o,s,l,h,v){if(df(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(N){_.listeners.push(N)}};F.T!==null?l(!0):_.isTransition=!1,h(_),l=s.pending,l===null?(_.next=s.pending=_,hS(s,_)):(_.next=l.next,s.pending=l.next=_)}}function hS(o,s){var l=s.action,h=s.payload,v=o.state;if(s.isTransition){var _=F.T,N={};F.T=N;try{var j=l(v,h),W=F.S;W!==null&&W(N,j),pS(o,s,j)}catch(de){iv(o,s,de)}finally{_!==null&&N.types!==null&&(_.types=N.types),F.T=_}}else try{_=l(v,h),pS(o,s,_)}catch(de){iv(o,s,de)}}function pS(o,s,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(h){mS(o,s,h)},function(h){return iv(o,s,h)}):mS(o,s,l)}function mS(o,s,l){s.status="fulfilled",s.value=l,gS(s),o.state=l,s=o.pending,s!==null&&(l=s.next,l===s?o.pending=null:(l=l.next,s.next=l,hS(o,l)))}function iv(o,s,l){var h=o.pending;if(o.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=l,gS(s),s=s.next;while(s!==h)}o.action=null}function gS(o){o=o.listeners;for(var s=0;s<o.length;s++)(0,o[s])()}function vS(o,s){return s}function yS(o,s){if(wt){var l=qt.formState;if(l!==null){e:{var h=at;if(wt){if(Zt){t:{for(var v=Zt,_=ro;v.nodeType!==8;){if(!_){v=null;break t}if(v=ao(v.nextSibling),v===null){v=null;break t}}_=v.data,v=_==="F!"||_==="F"?v:null}if(v){Zt=ao(v.nextSibling),h=v.data==="F!";break e}}Za(h)}h=!1}h&&(s=l[0])}}return l=ir(),l.memoizedState=l.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vS,lastRenderedState:s},l.queue=h,l=jS.bind(null,at,h),h.dispatch=l,h=sv(!1),_=hv.bind(null,at,!1,h.queue),h=ir(),v={state:s,dispatch:null,action:o,pending:null},h.queue=v,l=y3.bind(null,at,v,_,l),v.dispatch=l,h.memoizedState=o,[s,l,!1]}function _S(o){var s=ln();return bS(s,Ut,o)}function bS(o,s,l){if(s=ov(o,s,vS)[0],o=cf(va)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=Bl(s)}catch(N){throw N===uc?Qd:N}else h=s;s=ln();var v=s.queue,_=v.dispatch;return l!==s.memoizedState&&(at.flags|=2048,mc(9,{destroy:void 0},_3.bind(null,v,l),null)),[h,_,o]}function _3(o,s){o.action=s}function wS(o){var s=ln(),l=Ut;if(l!==null)return bS(s,l,o);ln(),s=s.memoizedState,l=ln();var h=l.queue.dispatch;return l.memoizedState=o,[s,h,!1]}function mc(o,s,l,h){return o={tag:o,create:l,deps:h,inst:s,next:null},s=at.updateQueue,s===null&&(s=af(),at.updateQueue=s),l=s.lastEffect,l===null?s.lastEffect=o.next=o:(h=l.next,l.next=o,o.next=h,s.lastEffect=o),o}function SS(){return ln().memoizedState}function lf(o,s,l,h){var v=ir();at.flags|=o,v.memoizedState=mc(1|s,{destroy:void 0},l,h===void 0?null:h)}function uf(o,s,l,h){var v=ln();h=h===void 0?null:h;var _=v.memoizedState.inst;Ut!==null&&h!==null&&Xg(h,Ut.memoizedState.deps)?v.memoizedState=mc(s,_,l,h):(at.flags|=o,v.memoizedState=mc(1|s,_,l,h))}function ES(o,s){lf(8390656,8,o,s)}function cv(o,s){uf(2048,8,o,s)}function b3(o){at.flags|=4;var s=at.updateQueue;if(s===null)s=af(),at.updateQueue=s,s.events=[o];else{var l=s.events;l===null?s.events=[o]:l.push(o)}}function RS(o){var s=ln().memoizedState;return b3({ref:s,nextImpl:o}),function(){if((It&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function xS(o,s){return uf(4,2,o,s)}function TS(o,s){return uf(4,4,o,s)}function OS(o,s){if(typeof s=="function"){o=o();var l=s(o);return function(){typeof l=="function"?l():s(null)}}if(s!=null)return o=o(),s.current=o,function(){s.current=null}}function CS(o,s,l){l=l!=null?l.concat([o]):null,uf(4,4,OS.bind(null,s,o),l)}function lv(){}function AS(o,s){var l=ln();s=s===void 0?null:s;var h=l.memoizedState;return s!==null&&Xg(s,h[1])?h[0]:(l.memoizedState=[o,s],o)}function IS(o,s){var l=ln();s=s===void 0?null:s;var h=l.memoizedState;if(s!==null&&Xg(s,h[1]))return h[0];if(h=o(),ci){Un(!0);try{o()}finally{Un(!1)}}return l.memoizedState=[h,s],h}function uv(o,s,l){return l===void 0||(ga&1073741824)!==0&&(_t&261930)===0?o.memoizedState=s:(o.memoizedState=l,o=NE(),at.lanes|=o,ns|=o,l)}function NS(o,s,l,h){return kr(l,s)?l:fc.current!==null?(o=uv(o,l,h),kr(o,s)||(gn=!0),o):(ga&42)===0||(ga&1073741824)!==0&&(_t&261930)===0?(gn=!0,o.memoizedState=l):(o=NE(),at.lanes|=o,ns|=o,s)}function kS(o,s,l,h,v){var _=X.p;X.p=_!==0&&8>_?_:8;var N=F.T,j={};F.T=j,hv(o,!1,s,l);try{var W=v(),de=F.S;if(de!==null&&de(j,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var we=m3(W,h);Hl(o,s,we,$r(o))}else Hl(o,s,h,$r(o))}catch(xe){Hl(o,s,{then:function(){},status:"rejected",reason:xe},$r())}finally{X.p=_,N!==null&&j.types!==null&&(N.types=j.types),F.T=N}}function w3(){}function dv(o,s,l,h){if(o.tag!==5)throw Error(r(476));var v=MS(o).queue;kS(o,v,s,ae,l===null?w3:function(){return PS(o),l(h)})}function MS(o){var s=o.memoizedState;if(s!==null)return s;s={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:ae},next:null};var l={};return s.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:l},next:null},o.memoizedState=s,o=o.alternate,o!==null&&(o.memoizedState=s),s}function PS(o){var s=MS(o);s.next===null&&(s=o.alternate.memoizedState),Hl(o,s.next.queue,{},$r())}function fv(){return Fn(cu)}function DS(){return ln().memoizedState}function LS(){return ln().memoizedState}function S3(o){for(var s=o.return;s!==null;){switch(s.tag){case 24:case 3:var l=$r();o=Ya(l);var h=Qa(s,o,l);h!==null&&(Er(h,s,l),zl(h,s,l)),s={cache:Vg()},o.payload=s;return}s=s.return}}function E3(o,s,l){var h=$r();l={lane:h,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},df(o)?$S(s,l):(l=Ig(o,s,l,h),l!==null&&(Er(l,o,h),US(l,s,h)))}function jS(o,s,l){var h=$r();Hl(o,s,l,h)}function Hl(o,s,l,h){var v={lane:h,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(df(o))$S(s,v);else{var _=o.alternate;if(o.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var N=s.lastRenderedState,j=_(N,l);if(v.hasEagerState=!0,v.eagerState=j,kr(j,N))return Bd(o,s,v,0),qt===null&&qd(),!1}catch{}if(l=Ig(o,s,v,h),l!==null)return Er(l,o,h),US(l,s,h),!0}return!1}function hv(o,s,l,h){if(h={lane:2,revertLane:Hv(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},df(o)){if(s)throw Error(r(479))}else s=Ig(o,l,h,2),s!==null&&Er(s,o,2)}function df(o){var s=o.alternate;return o===at||s!==null&&s===at}function $S(o,s){hc=rf=!0;var l=o.pending;l===null?s.next=s:(s.next=l.next,l.next=s),o.pending=s}function US(o,s,l){if((l&4194048)!==0){var h=s.lanes;h&=o.pendingLanes,l|=h,s.lanes=l,mr(o,l)}}var Gl={readContext:Fn,use:sf,useCallback:on,useContext:on,useEffect:on,useImperativeHandle:on,useLayoutEffect:on,useInsertionEffect:on,useMemo:on,useReducer:on,useRef:on,useState:on,useDebugValue:on,useDeferredValue:on,useTransition:on,useSyncExternalStore:on,useId:on,useHostTransitionStatus:on,useFormState:on,useActionState:on,useOptimistic:on,useMemoCache:on,useCacheRefresh:on};Gl.useEffectEvent=on;var zS={readContext:Fn,use:sf,useCallback:function(o,s){return ir().memoizedState=[o,s===void 0?null:s],o},useContext:Fn,useEffect:ES,useImperativeHandle:function(o,s,l){l=l!=null?l.concat([o]):null,lf(4194308,4,OS.bind(null,s,o),l)},useLayoutEffect:function(o,s){return lf(4194308,4,o,s)},useInsertionEffect:function(o,s){lf(4,2,o,s)},useMemo:function(o,s){var l=ir();s=s===void 0?null:s;var h=o();if(ci){Un(!0);try{o()}finally{Un(!1)}}return l.memoizedState=[h,s],h},useReducer:function(o,s,l){var h=ir();if(l!==void 0){var v=l(s);if(ci){Un(!0);try{l(s)}finally{Un(!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=E3.bind(null,at,o),[h.memoizedState,o]},useRef:function(o){var s=ir();return o={current:o},s.memoizedState=o},useState:function(o){o=sv(o);var s=o.queue,l=jS.bind(null,at,s);return s.dispatch=l,[o.memoizedState,l]},useDebugValue:lv,useDeferredValue:function(o,s){var l=ir();return uv(l,o,s)},useTransition:function(){var o=sv(!1);return o=kS.bind(null,at,o.queue,!0,!1),ir().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,s,l){var h=at,v=ir();if(wt){if(l===void 0)throw Error(r(407));l=l()}else{if(l=s(),qt===null)throw Error(r(349));(_t&127)!==0||iS(h,s,l)}v.memoizedState=l;var _={value:l,getSnapshot:s};return v.queue=_,ES(lS.bind(null,h,_,o),[o]),h.flags|=2048,mc(9,{destroy:void 0},cS.bind(null,h,_,l,s),null),l},useId:function(){var o=ir(),s=qt.identifierPrefix;if(wt){var l=Bo,h=qo;l=(h&~(1<<32-In(h)-1)).toString(32)+l,s="_"+s+"R_"+l,l=of++,0<l&&(s+="H"+l.toString(32)),s+="_"}else l=g3++,s="_"+s+"r_"+l.toString(32)+"_";return o.memoizedState=s},useHostTransitionStatus:fv,useFormState:yS,useActionState:yS,useOptimistic:function(o){var s=ir();s.memoizedState=s.baseState=o;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=l,s=hv.bind(null,at,!0,l),l.dispatch=s,[o,s]},useMemoCache:rv,useCacheRefresh:function(){return ir().memoizedState=S3.bind(null,at)},useEffectEvent:function(o){var s=ir(),l={impl:o};return s.memoizedState=l,function(){if((It&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},pv={readContext:Fn,use:sf,useCallback:AS,useContext:Fn,useEffect:cv,useImperativeHandle:CS,useInsertionEffect:xS,useLayoutEffect:TS,useMemo:IS,useReducer:cf,useRef:SS,useState:function(){return cf(va)},useDebugValue:lv,useDeferredValue:function(o,s){var l=ln();return NS(l,Ut.memoizedState,o,s)},useTransition:function(){var o=cf(va)[0],s=ln().memoizedState;return[typeof o=="boolean"?o:Bl(o),s]},useSyncExternalStore:sS,useId:DS,useHostTransitionStatus:fv,useFormState:_S,useActionState:_S,useOptimistic:function(o,s){var l=ln();return fS(l,Ut,o,s)},useMemoCache:rv,useCacheRefresh:LS};pv.useEffectEvent=RS;var VS={readContext:Fn,use:sf,useCallback:AS,useContext:Fn,useEffect:cv,useImperativeHandle:CS,useInsertionEffect:xS,useLayoutEffect:TS,useMemo:IS,useReducer:av,useRef:SS,useState:function(){return av(va)},useDebugValue:lv,useDeferredValue:function(o,s){var l=ln();return Ut===null?uv(l,o,s):NS(l,Ut.memoizedState,o,s)},useTransition:function(){var o=av(va)[0],s=ln().memoizedState;return[typeof o=="boolean"?o:Bl(o),s]},useSyncExternalStore:sS,useId:DS,useHostTransitionStatus:fv,useFormState:wS,useActionState:wS,useOptimistic:function(o,s){var l=ln();return Ut!==null?fS(l,Ut,o,s):(l.baseState=o,[o,l.queue.dispatch])},useMemoCache:rv,useCacheRefresh:LS};VS.useEffectEvent=RS;function mv(o,s,l,h){s=o.memoizedState,l=l(h,s),l=l==null?s:p({},s,l),o.memoizedState=l,o.lanes===0&&(o.updateQueue.baseState=l)}var gv={enqueueSetState:function(o,s,l){o=o._reactInternals;var h=$r(),v=Ya(h);v.payload=s,l!=null&&(v.callback=l),s=Qa(o,v,h),s!==null&&(Er(s,o,h),zl(s,o,h))},enqueueReplaceState:function(o,s,l){o=o._reactInternals;var h=$r(),v=Ya(h);v.tag=1,v.payload=s,l!=null&&(v.callback=l),s=Qa(o,v,h),s!==null&&(Er(s,o,h),zl(s,o,h))},enqueueForceUpdate:function(o,s){o=o._reactInternals;var l=$r(),h=Ya(l);h.tag=2,s!=null&&(h.callback=s),s=Qa(o,h,l),s!==null&&(Er(s,o,l),zl(s,o,l))}};function FS(o,s,l,h,v,_,N){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(h,_,N):s.prototype&&s.prototype.isPureReactComponent?!kl(l,h)||!kl(v,_):!0}function qS(o,s,l,h){o=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,h),s.state!==o&&gv.enqueueReplaceState(s,s.state,null)}function li(o,s){var l=s;if("ref"in s){l={};for(var h in s)h!=="ref"&&(l[h]=s[h])}if(o=o.defaultProps){l===s&&(l=p({},l));for(var v in o)l[v]===void 0&&(l[v]=o[v])}return l}function BS(o){Fd(o)}function HS(o){console.error(o)}function GS(o){Fd(o)}function ff(o,s){try{var l=o.onUncaughtError;l(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function ZS(o,s,l){try{var h=o.onCaughtError;h(l.value,{componentStack:l.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function vv(o,s,l){return l=Ya(l),l.tag=3,l.payload={element:null},l.callback=function(){ff(o,s)},l}function KS(o){return o=Ya(o),o.tag=3,o}function WS(o,s,l,h){var v=l.type.getDerivedStateFromError;if(typeof v=="function"){var _=h.value;o.payload=function(){return v(_)},o.callback=function(){ZS(s,l,h)}}var N=l.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(o.callback=function(){ZS(s,l,h),typeof v!="function"&&(rs===null?rs=new Set([this]):rs.add(this));var j=h.stack;this.componentDidCatch(h.value,{componentStack:j!==null?j:""})})}function R3(o,s,l,h,v){if(l.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=l.alternate,s!==null&&ic(s,l,v,!0),l=Pr.current,l!==null){switch(l.tag){case 31:case 13:return oo===null?Rf():l.alternate===null&&an===0&&(an=3),l.flags&=-257,l.flags|=65536,l.lanes=v,h===Xd?l.flags|=16384:(s=l.updateQueue,s===null?l.updateQueue=new Set([h]):s.add(h),Fv(o,h,v)),!1;case 22:return l.flags|=65536,h===Xd?l.flags|=16384:(s=l.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},l.updateQueue=s):(l=s.retryQueue,l===null?s.retryQueue=new Set([h]):l.add(h)),Fv(o,h,v)),!1}throw Error(r(435,l.tag))}return Fv(o,h,v),Rf(),!1}if(wt)return s=Pr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,h!==Lg&&(o=Error(r(422),{cause:h}),Dl(eo(o,l)))):(h!==Lg&&(s=Error(r(423),{cause:h}),Dl(eo(s,l))),o=o.current.alternate,o.flags|=65536,v&=-v,o.lanes|=v,h=eo(h,l),v=vv(o.stateNode,h,v),Zg(o,v),an!==4&&(an=2)),!1;var _=Error(r(520),{cause:h});if(_=eo(_,l),eu===null?eu=[_]:eu.push(_),an!==4&&(an=2),s===null)return!0;h=eo(h,l),l=s;do{switch(l.tag){case 3:return l.flags|=65536,o=v&-v,l.lanes|=o,o=vv(l.stateNode,h,o),Zg(l,o),!1;case 1:if(s=l.type,_=l.stateNode,(l.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(rs===null||!rs.has(_))))return l.flags|=65536,v&=-v,l.lanes|=v,v=KS(v),WS(v,o,l,h),Zg(l,v),!1}l=l.return}while(l!==null);return!1}var yv=Error(r(461)),gn=!1;function qn(o,s,l,h){s.child=o===null?Jw(s,null,l,h):ii(s,o.child,l,h)}function YS(o,s,l,h,v){l=l.render;var _=s.ref;if("ref"in h){var N={};for(var j in h)j!=="ref"&&(N[j]=h[j])}else N=h;return ri(s),h=Jg(o,s,l,N,_,v),j=ev(),o!==null&&!gn?(tv(o,s,v),ya(o,s,v)):(wt&&j&&Pg(s),s.flags|=1,qn(o,s,h,v),s.child)}function QS(o,s,l,h,v){if(o===null){var _=l.type;return typeof _=="function"&&!Ng(_)&&_.defaultProps===void 0&&l.compare===null?(s.tag=15,s.type=_,XS(o,s,_,h,v)):(o=Gd(l.type,null,h,s,s.mode,v),o.ref=s.ref,o.return=s,s.child=o)}if(_=o.child,!Tv(o,v)){var N=_.memoizedProps;if(l=l.compare,l=l!==null?l:kl,l(N,h)&&o.ref===s.ref)return ya(o,s,v)}return s.flags|=1,o=fa(_,h),o.ref=s.ref,o.return=s,s.child=o}function XS(o,s,l,h,v){if(o!==null){var _=o.memoizedProps;if(kl(_,h)&&o.ref===s.ref)if(gn=!1,s.pendingProps=h=_,Tv(o,v))(o.flags&131072)!==0&&(gn=!0);else return s.lanes=o.lanes,ya(o,s,v)}return _v(o,s,l,h,v)}function JS(o,s,l,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|l:l,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 eE(o,s,_,l,h)}if((l&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},o!==null&&Yd(s,_!==null?_.cachePool:null),_!==null?nS(s,_):Wg(),rS(s);else return h=s.lanes=536870912,eE(o,s,_!==null?_.baseLanes|l:l,l,h)}else _!==null?(Yd(s,_.cachePool),nS(s,_),Ja(),s.memoizedState=null):(o!==null&&Yd(s,null),Wg(),Ja());return qn(o,s,v,l),s.child}function Zl(o,s){return o!==null&&o.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function eE(o,s,l,h,v){var _=qg();return _=_===null?null:{parent:pn._currentValue,pool:_},s.memoizedState={baseLanes:l,cachePool:_},o!==null&&Yd(s,null),Wg(),rS(s),o!==null&&ic(o,s,h,!0),s.childLanes=v,null}function hf(o,s){return s=mf({mode:s.mode,children:s.children},o.mode),s.ref=o.ref,o.child=s,s.return=o,s}function tE(o,s,l){return ii(s,o.child,null,l),o=hf(s,s.pendingProps),o.flags|=2,Dr(s),s.memoizedState=null,o}function x3(o,s,l){var h=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,o===null){if(wt){if(h.mode==="hidden")return o=hf(s,h),s.lanes=536870912,Zl(null,o);if(Qg(s),(o=Zt)?(o=hR(o,ro),o=o!==null&&o.data==="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:Ha!==null?{id:qo,overflow:Bo}:null,retryLane:536870912,hydrationErrors:null},l=$w(o),l.return=s,s.child=l,Vn=s,Zt=null)):o=null,o===null)throw Za(s);return s.lanes=536870912,null}return hf(s,h)}var _=o.memoizedState;if(_!==null){var N=_.dehydrated;if(Qg(s),v)if(s.flags&256)s.flags&=-257,s=tE(o,s,l);else if(s.memoizedState!==null)s.child=o.child,s.flags|=128,s=null;else throw Error(r(558));else if(gn||ic(o,s,l,!1),v=(l&o.childLanes)!==0,gn||v){if(h=qt,h!==null&&(N=gr(h,l),N!==0&&N!==_.retryLane))throw _.retryLane=N,Js(o,N),Er(h,o,N),yv;Rf(),s=tE(o,s,l)}else o=_.treeContext,Zt=ao(N.nextSibling),Vn=s,wt=!0,Ga=null,ro=!1,o!==null&&Vw(s,o),s=hf(s,h),s.flags|=4096;return s}return o=fa(o.child,{mode:h.mode,children:h.children}),o.ref=s.ref,s.child=o,o.return=s,o}function pf(o,s){var l=s.ref;if(l===null)o!==null&&o.ref!==null&&(s.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(o===null||o.ref!==l)&&(s.flags|=4194816)}}function _v(o,s,l,h,v){return ri(s),l=Jg(o,s,l,h,void 0,v),h=ev(),o!==null&&!gn?(tv(o,s,v),ya(o,s,v)):(wt&&h&&Pg(s),s.flags|=1,qn(o,s,l,v),s.child)}function nE(o,s,l,h,v,_){return ri(s),s.updateQueue=null,l=aS(s,h,l,v),oS(o),h=ev(),o!==null&&!gn?(tv(o,s,_),ya(o,s,_)):(wt&&h&&Pg(s),s.flags|=1,qn(o,s,l,_),s.child)}function rE(o,s,l,h,v){if(ri(s),s.stateNode===null){var _=rc,N=l.contextType;typeof N=="object"&&N!==null&&(_=Fn(N)),_=new l(h,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=gv,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=h,_.state=s.memoizedState,_.refs={},Hg(s),N=l.contextType,_.context=typeof N=="object"&&N!==null?Fn(N):rc,_.state=s.memoizedState,N=l.getDerivedStateFromProps,typeof N=="function"&&(mv(s,l,N,h),_.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(N=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),N!==_.state&&gv.enqueueReplaceState(_,_.state,null),Fl(s,h,_,v),Vl(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(o===null){_=s.stateNode;var j=s.memoizedProps,W=li(l,j);_.props=W;var de=_.context,we=l.contextType;N=rc,typeof we=="object"&&we!==null&&(N=Fn(we));var xe=l.getDerivedStateFromProps;we=typeof xe=="function"||typeof _.getSnapshotBeforeUpdate=="function",j=s.pendingProps!==j,we||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(j||de!==N)&&qS(s,_,h,N),Wa=!1;var he=s.memoizedState;_.state=he,Fl(s,h,_,v),Vl(),de=s.memoizedState,j||he!==de||Wa?(typeof xe=="function"&&(mv(s,l,xe,h),de=s.memoizedState),(W=Wa||FS(s,l,W,h,he,de,N))?(we||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=de),_.props=h,_.state=de,_.context=N,h=W):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{_=s.stateNode,Gg(o,s),N=s.memoizedProps,we=li(l,N),_.props=we,xe=s.pendingProps,he=_.context,de=l.contextType,W=rc,typeof de=="object"&&de!==null&&(W=Fn(de)),j=l.getDerivedStateFromProps,(de=typeof j=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(N!==xe||he!==W)&&qS(s,_,h,W),Wa=!1,he=s.memoizedState,_.state=he,Fl(s,h,_,v),Vl();var ge=s.memoizedState;N!==xe||he!==ge||Wa||o!==null&&o.dependencies!==null&&Kd(o.dependencies)?(typeof j=="function"&&(mv(s,l,j,h),ge=s.memoizedState),(we=Wa||FS(s,l,we,h,he,ge,W)||o!==null&&o.dependencies!==null&&Kd(o.dependencies))?(de||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(h,ge,W),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(h,ge,W)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||N===o.memoizedProps&&he===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||N===o.memoizedProps&&he===o.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ge),_.props=h,_.state=ge,_.context=W,h=we):(typeof _.componentDidUpdate!="function"||N===o.memoizedProps&&he===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||N===o.memoizedProps&&he===o.memoizedState||(s.flags|=1024),h=!1)}return _=h,pf(o,s),h=(s.flags&128)!==0,_||h?(_=s.stateNode,l=h&&typeof l.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,o!==null&&h?(s.child=ii(s,o.child,null,v),s.child=ii(s,null,l,v)):qn(o,s,l,v),s.memoizedState=_.state,o=s.child):o=ya(o,s,v),o}function oE(o,s,l,h){return ti(),s.flags|=256,qn(o,s,l,h),s.child}var bv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wv(o){return{baseLanes:o,cachePool:Zw()}}function Sv(o,s,l){return o=o!==null?o.childLanes&~l:0,s&&(o|=jr),o}function aE(o,s,l){var h=s.pendingProps,v=!1,_=(s.flags&128)!==0,N;if((N=_)||(N=o!==null&&o.memoizedState===null?!1:(cn.current&2)!==0),N&&(v=!0,s.flags&=-129),N=(s.flags&32)!==0,s.flags&=-33,o===null){if(wt){if(v?Xa(s):Ja(),(o=Zt)?(o=hR(o,ro),o=o!==null&&o.data!=="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:Ha!==null?{id:qo,overflow:Bo}:null,retryLane:536870912,hydrationErrors:null},l=$w(o),l.return=s,s.child=l,Vn=s,Zt=null)):o=null,o===null)throw Za(s);return oy(o)?s.lanes=32:s.lanes=536870912,null}var j=h.children;return h=h.fallback,v?(Ja(),v=s.mode,j=mf({mode:"hidden",children:j},v),h=ei(h,v,l,null),j.return=s,h.return=s,j.sibling=h,s.child=j,h=s.child,h.memoizedState=wv(l),h.childLanes=Sv(o,N,l),s.memoizedState=bv,Zl(null,h)):(Xa(s),Ev(s,j))}var W=o.memoizedState;if(W!==null&&(j=W.dehydrated,j!==null)){if(_)s.flags&256?(Xa(s),s.flags&=-257,s=Rv(o,s,l)):s.memoizedState!==null?(Ja(),s.child=o.child,s.flags|=128,s=null):(Ja(),j=h.fallback,v=s.mode,h=mf({mode:"visible",children:h.children},v),j=ei(j,v,l,null),j.flags|=2,h.return=s,j.return=s,h.sibling=j,s.child=h,ii(s,o.child,null,l),h=s.child,h.memoizedState=wv(l),h.childLanes=Sv(o,N,l),s.memoizedState=bv,s=Zl(null,h));else if(Xa(s),oy(j)){if(N=j.nextSibling&&j.nextSibling.dataset,N)var de=N.dgst;N=de,h=Error(r(419)),h.stack="",h.digest=N,Dl({value:h,source:null,stack:null}),s=Rv(o,s,l)}else if(gn||ic(o,s,l,!1),N=(l&o.childLanes)!==0,gn||N){if(N=qt,N!==null&&(h=gr(N,l),h!==0&&h!==W.retryLane))throw W.retryLane=h,Js(o,h),Er(N,o,h),yv;ry(j)||Rf(),s=Rv(o,s,l)}else ry(j)?(s.flags|=192,s.child=o.child,s=null):(o=W.treeContext,Zt=ao(j.nextSibling),Vn=s,wt=!0,Ga=null,ro=!1,o!==null&&Vw(s,o),s=Ev(s,h.children),s.flags|=4096);return s}return v?(Ja(),j=h.fallback,v=s.mode,W=o.child,de=W.sibling,h=fa(W,{mode:"hidden",children:h.children}),h.subtreeFlags=W.subtreeFlags&65011712,de!==null?j=fa(de,j):(j=ei(j,v,l,null),j.flags|=2),j.return=s,h.return=s,h.sibling=j,s.child=h,Zl(null,h),h=s.child,j=o.child.memoizedState,j===null?j=wv(l):(v=j.cachePool,v!==null?(W=pn._currentValue,v=v.parent!==W?{parent:W,pool:W}:v):v=Zw(),j={baseLanes:j.baseLanes|l,cachePool:v}),h.memoizedState=j,h.childLanes=Sv(o,N,l),s.memoizedState=bv,Zl(o.child,h)):(Xa(s),l=o.child,o=l.sibling,l=fa(l,{mode:"visible",children:h.children}),l.return=s,l.sibling=null,o!==null&&(N=s.deletions,N===null?(s.deletions=[o],s.flags|=16):N.push(o)),s.child=l,s.memoizedState=null,l)}function Ev(o,s){return s=mf({mode:"visible",children:s},o.mode),s.return=o,o.child=s}function mf(o,s){return o=Mr(22,o,null,s),o.lanes=0,o}function Rv(o,s,l){return ii(s,o.child,null,l),o=Ev(s,s.pendingProps.children),o.flags|=2,s.memoizedState=null,o}function sE(o,s,l){o.lanes|=s;var h=o.alternate;h!==null&&(h.lanes|=s),Ug(o.return,s,l)}function xv(o,s,l,h,v,_){var N=o.memoizedState;N===null?o.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:v,treeForkCount:_}:(N.isBackwards=s,N.rendering=null,N.renderingStartTime=0,N.last=h,N.tail=l,N.tailMode=v,N.treeForkCount=_)}function iE(o,s,l){var h=s.pendingProps,v=h.revealOrder,_=h.tail;h=h.children;var N=cn.current,j=(N&2)!==0;if(j?(N=N&1|2,s.flags|=128):N&=1,q(cn,N),qn(o,s,h,l),h=wt?Pl:0,!j&&o!==null&&(o.flags&128)!==0)e:for(o=s.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&sE(o,l,s);else if(o.tag===19)sE(o,l,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(l=s.child,v=null;l!==null;)o=l.alternate,o!==null&&nf(o)===null&&(v=l),l=l.sibling;l=v,l===null?(v=s.child,s.child=null):(v=l.sibling,l.sibling=null),xv(s,!1,v,l,_,h);break;case"backwards":case"unstable_legacy-backwards":for(l=null,v=s.child,s.child=null;v!==null;){if(o=v.alternate,o!==null&&nf(o)===null){s.child=v;break}o=v.sibling,v.sibling=l,l=v,v=o}xv(s,!0,l,null,_,h);break;case"together":xv(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function ya(o,s,l){if(o!==null&&(s.dependencies=o.dependencies),ns|=s.lanes,(l&s.childLanes)===0)if(o!==null){if(ic(o,s,l,!1),(l&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,l=fa(o,o.pendingProps),s.child=l,l.return=s;o.sibling!==null;)o=o.sibling,l=l.sibling=fa(o,o.pendingProps),l.return=s;l.sibling=null}return s.child}function Tv(o,s){return(o.lanes&s)!==0?!0:(o=o.dependencies,!!(o!==null&&Kd(o)))}function T3(o,s,l){switch(s.tag){case 3:_e(s,s.stateNode.containerInfo),Ka(s,pn,o.memoizedState.cache),ti();break;case 27:case 5:Ne(s);break;case 4:_e(s,s.stateNode.containerInfo);break;case 10:Ka(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Qg(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(Xa(s),s.flags|=128,null):(l&s.child.childLanes)!==0?aE(o,s,l):(Xa(s),o=ya(o,s,l),o!==null?o.sibling:null);Xa(s);break;case 19:var v=(o.flags&128)!==0;if(h=(l&s.childLanes)!==0,h||(ic(o,s,l,!1),h=(l&s.childLanes)!==0),v){if(h)return iE(o,s,l);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),q(cn,cn.current),h)break;return null;case 22:return s.lanes=0,JS(o,s,l,s.pendingProps);case 24:Ka(s,pn,o.memoizedState.cache)}return ya(o,s,l)}function cE(o,s,l){if(o!==null)if(o.memoizedProps!==s.pendingProps)gn=!0;else{if(!Tv(o,l)&&(s.flags&128)===0)return gn=!1,T3(o,s,l);gn=(o.flags&131072)!==0}else gn=!1,wt&&(s.flags&1048576)!==0&&zw(s,Pl,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(o=ai(s.elementType),s.type=o,typeof o=="function")Ng(o)?(h=li(o,h),s.tag=1,s=rE(null,s,o,h,l)):(s.tag=0,s=_v(null,s,o,h,l));else{if(o!=null){var v=o.$$typeof;if(v===C){s.tag=11,s=YS(null,s,o,h,l);break e}else if(v===k){s.tag=14,s=QS(null,s,o,h,l);break e}}throw s=J(o)||o,Error(r(306,s,""))}}return s;case 0:return _v(o,s,s.type,s.pendingProps,l);case 1:return h=s.type,v=li(h,s.pendingProps),rE(o,s,h,v,l);case 3:e:{if(_e(s,s.stateNode.containerInfo),o===null)throw Error(r(387));h=s.pendingProps;var _=s.memoizedState;v=_.element,Gg(o,s),Fl(s,h,null,l);var N=s.memoizedState;if(h=N.cache,Ka(s,pn,h),h!==_.cache&&zg(s,[pn],l,!0),Vl(),h=N.element,_.isDehydrated)if(_={element:h,isDehydrated:!1,cache:N.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=oE(o,s,h,l);break e}else if(h!==v){v=eo(Error(r(424)),s),Dl(v),s=oE(o,s,h,l);break e}else for(o=s.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,Zt=ao(o.firstChild),Vn=s,wt=!0,Ga=null,ro=!0,l=Jw(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ti(),h===v){s=ya(o,s,l);break e}qn(o,s,h,l)}s=s.child}return s;case 26:return pf(o,s),o===null?(l=_R(s.type,null,s.pendingProps,null))?s.memoizedState=l:wt||(l=s.type,o=s.pendingProps,h=Nf(Q.current).createElement(l),h[zn]=s,h[vr]=o,Bn(h,l,o),kn(h),s.stateNode=h):s.memoizedState=_R(s.type,o.memoizedProps,s.pendingProps,o.memoizedState),null;case 27:return Ne(s),o===null&&wt&&(h=s.stateNode=gR(s.type,s.pendingProps,Q.current),Vn=s,ro=!0,v=Zt,is(s.type)?(ay=v,Zt=ao(h.firstChild)):Zt=v),qn(o,s,s.pendingProps.children,l),pf(o,s),o===null&&(s.flags|=4194304),s.child;case 5:return o===null&&wt&&((v=h=Zt)&&(h=n5(h,s.type,s.pendingProps,ro),h!==null?(s.stateNode=h,Vn=s,Zt=ao(h.firstChild),ro=!1,v=!0):v=!1),v||Za(s)),Ne(s),v=s.type,_=s.pendingProps,N=o!==null?o.memoizedProps:null,h=_.children,ey(v,_)?h=null:N!==null&&ey(v,N)&&(s.flags|=32),s.memoizedState!==null&&(v=Jg(o,s,v3,null,null,l),cu._currentValue=v),pf(o,s),qn(o,s,h,l),s.child;case 6:return o===null&&wt&&((o=l=Zt)&&(l=r5(l,s.pendingProps,ro),l!==null?(s.stateNode=l,Vn=s,Zt=null,o=!0):o=!1),o||Za(s)),null;case 13:return aE(o,s,l);case 4:return _e(s,s.stateNode.containerInfo),h=s.pendingProps,o===null?s.child=ii(s,null,h,l):qn(o,s,h,l),s.child;case 11:return YS(o,s,s.type,s.pendingProps,l);case 7:return qn(o,s,s.pendingProps,l),s.child;case 8:return qn(o,s,s.pendingProps.children,l),s.child;case 12:return qn(o,s,s.pendingProps.children,l),s.child;case 10:return h=s.pendingProps,Ka(s,s.type,h.value),qn(o,s,h.children,l),s.child;case 9:return v=s.type._context,h=s.pendingProps.children,ri(s),v=Fn(v),h=h(v),s.flags|=1,qn(o,s,h,l),s.child;case 14:return QS(o,s,s.type,s.pendingProps,l);case 15:return XS(o,s,s.type,s.pendingProps,l);case 19:return iE(o,s,l);case 31:return x3(o,s,l);case 22:return JS(o,s,l,s.pendingProps);case 24:return ri(s),h=Fn(pn),o===null?(v=qg(),v===null&&(v=qt,_=Vg(),v.pooledCache=_,_.refCount++,_!==null&&(v.pooledCacheLanes|=l),v=_),s.memoizedState={parent:h,cache:v},Hg(s),Ka(s,pn,v)):((o.lanes&l)!==0&&(Gg(o,s),Fl(s,null,null,l),Vl()),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),Ka(s,pn,h)):(h=_.cache,Ka(s,pn,h),h!==v.cache&&zg(s,[pn],l,!0))),qn(o,s,s.pendingProps.children,l),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function _a(o){o.flags|=4}function Ov(o,s,l,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(DE())o.flags|=8192;else throw si=Xd,Bg}else o.flags&=-16777217}function lE(o,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!RR(s))if(DE())o.flags|=8192;else throw si=Xd,Bg}function gf(o,s){s!==null&&(o.flags|=4),o.flags&16384&&(s=o.tag!==22?er():536870912,o.lanes|=s,_c|=s)}function Kl(o,s){if(!wt)switch(o.tailMode){case"hidden":s=o.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?o.tail=null:l.sibling=null;break;case"collapsed":l=o.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?s||o.tail===null?o.tail=null:o.tail.sibling=null:h.sibling=null}}function Kt(o){var s=o.alternate!==null&&o.alternate.child===o.child,l=0,h=0;if(s)for(var v=o.child;v!==null;)l|=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;)l|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=o,v=v.sibling;return o.subtreeFlags|=h,o.childLanes=l,s}function O3(o,s,l){var h=s.pendingProps;switch(Dg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kt(s),null;case 1:return Kt(s),null;case 3:return l=s.stateNode,h=null,o!==null&&(h=o.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),ma(pn),Ae(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(o===null||o.child===null)&&(sc(s)?_a(s):o===null||o.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,jg())),Kt(s),null;case 26:var v=s.type,_=s.memoizedState;return o===null?(_a(s),_!==null?(Kt(s),lE(s,_)):(Kt(s),Ov(s,v,null,h,l))):_?_!==o.memoizedState?(_a(s),Kt(s),lE(s,_)):(Kt(s),s.flags&=-16777217):(o=o.memoizedProps,o!==h&&_a(s),Kt(s),Ov(s,v,o,h,l)),null;case 27:if(H(s),l=Q.current,v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&_a(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return Kt(s),null}o=L.current,sc(s)?Fw(s):(o=gR(v,h,l),s.stateNode=o,_a(s))}return Kt(s),null;case 5:if(H(s),v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&_a(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return Kt(s),null}if(_=L.current,sc(s))Fw(s);else{var N=Nf(Q.current);switch(_){case 1:_=N.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:_=N.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":_=N.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":_=N.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":_=N.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof h.is=="string"?N.createElement("select",{is:h.is}):N.createElement("select"),h.multiple?_.multiple=!0:h.size&&(_.size=h.size);break;default:_=typeof h.is=="string"?N.createElement(v,{is:h.is}):N.createElement(v)}}_[zn]=s,_[vr]=h;e:for(N=s.child;N!==null;){if(N.tag===5||N.tag===6)_.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===s)break e;for(;N.sibling===null;){if(N.return===null||N.return===s)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}s.stateNode=_;e:switch(Bn(_,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&&_a(s)}}return Kt(s),Ov(s,s.type,o===null?null:o.memoizedProps,s.pendingProps,l),null;case 6:if(o&&s.stateNode!=null)o.memoizedProps!==h&&_a(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(o=Q.current,sc(s)){if(o=s.stateNode,l=s.memoizedProps,h=null,v=Vn,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}o[zn]=s,o=!!(o.nodeValue===l||h!==null&&h.suppressHydrationWarning===!0||aR(o.nodeValue,l)),o||Za(s,!0)}else o=Nf(o).createTextNode(h),o[zn]=s,s.stateNode=o}return Kt(s),null;case 31:if(l=s.memoizedState,o===null||o.memoizedState!==null){if(h=sc(s),l!==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[zn]=s}else ti(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Kt(s),o=!1}else l=jg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=l),o=!0;if(!o)return s.flags&256?(Dr(s),s):(Dr(s),null);if((s.flags&128)!==0)throw Error(r(558))}return Kt(s),null;case 13:if(h=s.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(v=sc(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[zn]=s}else ti(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Kt(s),v=!1}else v=jg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(Dr(s),s):(Dr(s),null)}return Dr(s),(s.flags&128)!==0?(s.lanes=l,s):(l=h!==null,o=o!==null&&o.memoizedState!==null,l&&(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)),l!==o&&l&&(s.child.flags|=8192),gf(s,s.updateQueue),Kt(s),null);case 4:return Ae(),o===null&&Wv(s.stateNode.containerInfo),Kt(s),null;case 10:return ma(s.type),Kt(s),null;case 19:if(B(cn),h=s.memoizedState,h===null)return Kt(s),null;if(v=(s.flags&128)!==0,_=h.rendering,_===null)if(v)Kl(h,!1);else{if(an!==0||o!==null&&(o.flags&128)!==0)for(o=s.child;o!==null;){if(_=nf(o),_!==null){for(s.flags|=128,Kl(h,!1),o=_.updateQueue,s.updateQueue=o,gf(s,o),s.subtreeFlags=0,o=l,l=s.child;l!==null;)jw(l,o),l=l.sibling;return q(cn,cn.current&1|2),wt&&ha(s,h.treeForkCount),s.child}o=o.sibling}h.tail!==null&&Se()>wf&&(s.flags|=128,v=!0,Kl(h,!1),s.lanes=4194304)}else{if(!v)if(o=nf(_),o!==null){if(s.flags|=128,v=!0,o=o.updateQueue,s.updateQueue=o,gf(s,o),Kl(h,!0),h.tail===null&&h.tailMode==="hidden"&&!_.alternate&&!wt)return Kt(s),null}else 2*Se()-h.renderingStartTime>wf&&l!==536870912&&(s.flags|=128,v=!0,Kl(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=Se(),o.sibling=null,l=cn.current,q(cn,v?l&1|2:l&1),wt&&ha(s,h.treeForkCount),o):(Kt(s),null);case 22:case 23:return Dr(s),Yg(),h=s.memoizedState!==null,o!==null?o.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(l&536870912)!==0&&(s.flags&128)===0&&(Kt(s),s.subtreeFlags&6&&(s.flags|=8192)):Kt(s),l=s.updateQueue,l!==null&&gf(s,l.retryQueue),l=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(l=o.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==l&&(s.flags|=2048),o!==null&&B(oi),null;case 24:return l=null,o!==null&&(l=o.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),ma(pn),Kt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function C3(o,s){switch(Dg(s),s.tag){case 1:return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 3:return ma(pn),Ae(),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(Dr(s),s.alternate===null)throw Error(r(340));ti()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 13:if(Dr(s),o=s.memoizedState,o!==null&&o.dehydrated!==null){if(s.alternate===null)throw Error(r(340));ti()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 19:return B(cn),null;case 4:return Ae(),null;case 10:return ma(s.type),null;case 22:case 23:return Dr(s),Yg(),o!==null&&B(oi),o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 24:return ma(pn),null;case 25:return null;default:return null}}function uE(o,s){switch(Dg(s),s.tag){case 3:ma(pn),Ae();break;case 26:case 27:case 5:H(s);break;case 4:Ae();break;case 31:s.memoizedState!==null&&Dr(s);break;case 13:Dr(s);break;case 19:B(cn);break;case 10:ma(s.type);break;case 22:case 23:Dr(s),Yg(),o!==null&&B(oi);break;case 24:ma(pn)}}function Wl(o,s){try{var l=s.updateQueue,h=l!==null?l.lastEffect:null;if(h!==null){var v=h.next;l=v;do{if((l.tag&o)===o){h=void 0;var _=l.create,N=l.inst;h=_(),N.destroy=h}l=l.next}while(l!==v)}}catch(j){Pt(s,s.return,j)}}function es(o,s,l){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 N=h.inst,j=N.destroy;if(j!==void 0){N.destroy=void 0,v=s;var W=l,de=j;try{de()}catch(we){Pt(v,W,we)}}}h=h.next}while(h!==_)}}catch(we){Pt(s,s.return,we)}}function dE(o){var s=o.updateQueue;if(s!==null){var l=o.stateNode;try{tS(s,l)}catch(h){Pt(o,o.return,h)}}}function fE(o,s,l){l.props=li(o.type,o.memoizedProps),l.state=o.memoizedState;try{l.componentWillUnmount()}catch(h){Pt(o,s,h)}}function Yl(o,s){try{var l=o.ref;if(l!==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 l=="function"?o.refCleanup=l(h):l.current=h}}catch(v){Pt(o,s,v)}}function Ho(o,s){var l=o.ref,h=o.refCleanup;if(l!==null)if(typeof h=="function")try{h()}catch(v){Pt(o,s,v)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(v){Pt(o,s,v)}else l.current=null}function hE(o){var s=o.type,l=o.memoizedProps,h=o.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":l.autoFocus&&h.focus();break e;case"img":l.src?h.src=l.src:l.srcSet&&(h.srcset=l.srcSet)}}catch(v){Pt(o,o.return,v)}}function Cv(o,s,l){try{var h=o.stateNode;Y3(h,o.type,l,s),h[vr]=s}catch(v){Pt(o,o.return,v)}}function pE(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&is(o.type)||o.tag===4}function Av(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||pE(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&&is(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 Iv(o,s,l){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(o,s):(s=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,s.appendChild(o),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=ua));else if(h!==4&&(h===27&&is(o.type)&&(l=o.stateNode,s=null),o=o.child,o!==null))for(Iv(o,s,l),o=o.sibling;o!==null;)Iv(o,s,l),o=o.sibling}function vf(o,s,l){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?l.insertBefore(o,s):l.appendChild(o);else if(h!==4&&(h===27&&is(o.type)&&(l=o.stateNode),o=o.child,o!==null))for(vf(o,s,l),o=o.sibling;o!==null;)vf(o,s,l),o=o.sibling}function mE(o){var s=o.stateNode,l=o.memoizedProps;try{for(var h=o.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);Bn(s,h,l),s[zn]=o,s[vr]=l}catch(_){Pt(o,o.return,_)}}var ba=!1,vn=!1,Nv=!1,gE=typeof WeakSet=="function"?WeakSet:Set,Mn=null;function A3(o,s){if(o=o.containerInfo,Xv=$f,o=Cw(o),Rg(o)){if("selectionStart"in o)var l={start:o.selectionStart,end:o.selectionEnd};else e:{l=(l=o.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var v=h.anchorOffset,_=h.focusNode;h=h.focusOffset;try{l.nodeType,_.nodeType}catch{l=null;break e}var N=0,j=-1,W=-1,de=0,we=0,xe=o,he=null;t:for(;;){for(var ge;xe!==l||v!==0&&xe.nodeType!==3||(j=N+v),xe!==_||h!==0&&xe.nodeType!==3||(W=N+h),xe.nodeType===3&&(N+=xe.nodeValue.length),(ge=xe.firstChild)!==null;)he=xe,xe=ge;for(;;){if(xe===o)break t;if(he===l&&++de===v&&(j=N),he===_&&++we===h&&(W=N),(ge=xe.nextSibling)!==null)break;xe=he,he=xe.parentNode}xe=ge}l=j===-1||W===-1?null:{start:j,end:W}}else l=null}l=l||{start:0,end:0}}else l=null;for(Jv={focusedElem:o,selectionRange:l},$f=!1,Mn=s;Mn!==null;)if(s=Mn,o=s.child,(s.subtreeFlags&1028)!==0&&o!==null)o.return=s,Mn=o;else for(;Mn!==null;){switch(s=Mn,_=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(l=0;l<o.length;l++)v=o[l],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&_!==null){o=void 0,l=s,v=_.memoizedProps,_=_.memoizedState,h=l.stateNode;try{var Ue=li(l.type,v);o=h.getSnapshotBeforeUpdate(Ue,_),h.__reactInternalSnapshotBeforeUpdate=o}catch(Ze){Pt(l,l.return,Ze)}}break;case 3:if((o&1024)!==0){if(o=s.stateNode.containerInfo,l=o.nodeType,l===9)ny(o);else if(l===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":ny(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,Mn=o;break}Mn=s.return}}function vE(o,s,l){var h=l.flags;switch(l.tag){case 0:case 11:case 15:Sa(o,l),h&4&&Wl(5,l);break;case 1:if(Sa(o,l),h&4)if(o=l.stateNode,s===null)try{o.componentDidMount()}catch(N){Pt(l,l.return,N)}else{var v=li(l.type,s.memoizedProps);s=s.memoizedState;try{o.componentDidUpdate(v,s,o.__reactInternalSnapshotBeforeUpdate)}catch(N){Pt(l,l.return,N)}}h&64&&dE(l),h&512&&Yl(l,l.return);break;case 3:if(Sa(o,l),h&64&&(o=l.updateQueue,o!==null)){if(s=null,l.child!==null)switch(l.child.tag){case 27:case 5:s=l.child.stateNode;break;case 1:s=l.child.stateNode}try{tS(o,s)}catch(N){Pt(l,l.return,N)}}break;case 27:s===null&&h&4&&mE(l);case 26:case 5:Sa(o,l),s===null&&h&4&&hE(l),h&512&&Yl(l,l.return);break;case 12:Sa(o,l);break;case 31:Sa(o,l),h&4&&bE(o,l);break;case 13:Sa(o,l),h&4&&wE(o,l),h&64&&(o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(l=$3.bind(null,l),o5(o,l))));break;case 22:if(h=l.memoizedState!==null||ba,!h){s=s!==null&&s.memoizedState!==null||vn,v=ba;var _=vn;ba=h,(vn=s)&&!_?Ea(o,l,(l.subtreeFlags&8772)!==0):Sa(o,l),ba=v,vn=_}break;case 30:break;default:Sa(o,l)}}function yE(o){var s=o.alternate;s!==null&&(o.alternate=null,yE(s)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(s=o.stateNode,s!==null&&ig(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 Yt=null,_r=!1;function wa(o,s,l){for(l=l.child;l!==null;)_E(o,s,l),l=l.sibling}function _E(o,s,l){if(en&&typeof en.onCommitFiberUnmount=="function")try{en.onCommitFiberUnmount($n,l)}catch{}switch(l.tag){case 26:vn||Ho(l,s),wa(o,s,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:vn||Ho(l,s);var h=Yt,v=_r;is(l.type)&&(Yt=l.stateNode,_r=!1),wa(o,s,l),au(l.stateNode),Yt=h,_r=v;break;case 5:vn||Ho(l,s);case 6:if(h=Yt,v=_r,Yt=null,wa(o,s,l),Yt=h,_r=v,Yt!==null)if(_r)try{(Yt.nodeType===9?Yt.body:Yt.nodeName==="HTML"?Yt.ownerDocument.body:Yt).removeChild(l.stateNode)}catch(_){Pt(l,s,_)}else try{Yt.removeChild(l.stateNode)}catch(_){Pt(l,s,_)}break;case 18:Yt!==null&&(_r?(o=Yt,dR(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,l.stateNode),Oc(o)):dR(Yt,l.stateNode));break;case 4:h=Yt,v=_r,Yt=l.stateNode.containerInfo,_r=!0,wa(o,s,l),Yt=h,_r=v;break;case 0:case 11:case 14:case 15:es(2,l,s),vn||es(4,l,s),wa(o,s,l);break;case 1:vn||(Ho(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"&&fE(l,s,h)),wa(o,s,l);break;case 21:wa(o,s,l);break;case 22:vn=(h=vn)||l.memoizedState!==null,wa(o,s,l),vn=h;break;default:wa(o,s,l)}}function bE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Oc(o)}catch(l){Pt(s,s.return,l)}}}function wE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Oc(o)}catch(l){Pt(s,s.return,l)}}function I3(o){switch(o.tag){case 31:case 13:case 19:var s=o.stateNode;return s===null&&(s=o.stateNode=new gE),s;case 22:return o=o.stateNode,s=o._retryCache,s===null&&(s=o._retryCache=new gE),s;default:throw Error(r(435,o.tag))}}function yf(o,s){var l=I3(o);s.forEach(function(h){if(!l.has(h)){l.add(h);var v=U3.bind(null,o,h);h.then(v,v)}})}function br(o,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var v=l[h],_=o,N=s,j=N;e:for(;j!==null;){switch(j.tag){case 27:if(is(j.type)){Yt=j.stateNode,_r=!1;break e}break;case 5:Yt=j.stateNode,_r=!1;break e;case 3:case 4:Yt=j.stateNode.containerInfo,_r=!0;break e}j=j.return}if(Yt===null)throw Error(r(160));_E(_,N,v),Yt=null,_r=!1,_=v.alternate,_!==null&&(_.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)SE(s,o),s=s.sibling}var So=null;function SE(o,s){var l=o.alternate,h=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:br(s,o),wr(o),h&4&&(es(3,o,o.return),Wl(3,o),es(5,o,o.return));break;case 1:br(s,o),wr(o),h&512&&(vn||l===null||Ho(l,l.return)),h&64&&ba&&(o=o.updateQueue,o!==null&&(h=o.callbacks,h!==null&&(l=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=l===null?h:l.concat(h))));break;case 26:var v=So;if(br(s,o),wr(o),h&512&&(vn||l===null||Ho(l,l.return)),h&4){var _=l!==null?l.memoizedState:null;if(h=o.memoizedState,l===null)if(h===null)if(o.stateNode===null){e:{h=o.type,l=o.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":_=v.getElementsByTagName("title")[0],(!_||_[El]||_[zn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=v.createElement(h),v.head.insertBefore(_,v.querySelector("head > title"))),Bn(_,h,l),_[zn]=o,kn(_),h=_;break e;case"link":var N=SR("link","href",v).get(h+(l.href||""));if(N){for(var j=0;j<N.length;j++)if(_=N[j],_.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&_.getAttribute("rel")===(l.rel==null?null:l.rel)&&_.getAttribute("title")===(l.title==null?null:l.title)&&_.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){N.splice(j,1);break t}}_=v.createElement(h),Bn(_,h,l),v.head.appendChild(_);break;case"meta":if(N=SR("meta","content",v).get(h+(l.content||""))){for(j=0;j<N.length;j++)if(_=N[j],_.getAttribute("content")===(l.content==null?null:""+l.content)&&_.getAttribute("name")===(l.name==null?null:l.name)&&_.getAttribute("property")===(l.property==null?null:l.property)&&_.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&_.getAttribute("charset")===(l.charSet==null?null:l.charSet)){N.splice(j,1);break t}}_=v.createElement(h),Bn(_,h,l),v.head.appendChild(_);break;default:throw Error(r(468,h))}_[zn]=o,kn(_),h=_}o.stateNode=h}else ER(v,o.type,o.stateNode);else o.stateNode=wR(v,h,o.memoizedProps);else _!==h?(_===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):_.count--,h===null?ER(v,o.type,o.stateNode):wR(v,h,o.memoizedProps)):h===null&&o.stateNode!==null&&Cv(o,o.memoizedProps,l.memoizedProps)}break;case 27:br(s,o),wr(o),h&512&&(vn||l===null||Ho(l,l.return)),l!==null&&h&4&&Cv(o,o.memoizedProps,l.memoizedProps);break;case 5:if(br(s,o),wr(o),h&512&&(vn||l===null||Ho(l,l.return)),o.flags&32){v=o.stateNode;try{Yi(v,"")}catch(Ue){Pt(o,o.return,Ue)}}h&4&&o.stateNode!=null&&(v=o.memoizedProps,Cv(o,v,l!==null?l.memoizedProps:v)),h&1024&&(Nv=!0);break;case 6:if(br(s,o),wr(o),h&4){if(o.stateNode===null)throw Error(r(162));h=o.memoizedProps,l=o.stateNode;try{l.nodeValue=h}catch(Ue){Pt(o,o.return,Ue)}}break;case 3:if(Pf=null,v=So,So=kf(s.containerInfo),br(s,o),So=v,wr(o),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Oc(s.containerInfo)}catch(Ue){Pt(o,o.return,Ue)}Nv&&(Nv=!1,EE(o));break;case 4:h=So,So=kf(o.stateNode.containerInfo),br(s,o),wr(o),So=h;break;case 12:br(s,o),wr(o);break;case 31:br(s,o),wr(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,yf(o,h)));break;case 13:br(s,o),wr(o),o.child.flags&8192&&o.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(bf=Se()),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,yf(o,h)));break;case 22:v=o.memoizedState!==null;var W=l!==null&&l.memoizedState!==null,de=ba,we=vn;if(ba=de||v,vn=we||W,br(s,o),vn=we,ba=de,wr(o),h&8192)e:for(s=o.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(l===null||W||ba||vn||ui(o)),l=null,s=o;;){if(s.tag===5||s.tag===26){if(l===null){W=l=s;try{if(_=W.stateNode,v)N=_.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{j=W.stateNode;var xe=W.memoizedProps.style,he=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;j.style.display=he==null||typeof he=="boolean"?"":(""+he).trim()}}catch(Ue){Pt(W,W.return,Ue)}}}else if(s.tag===6){if(l===null){W=s;try{W.stateNode.nodeValue=v?"":W.memoizedProps}catch(Ue){Pt(W,W.return,Ue)}}}else if(s.tag===18){if(l===null){W=s;try{var ge=W.stateNode;v?fR(ge,!0):fR(W.stateNode,!1)}catch(Ue){Pt(W,W.return,Ue)}}}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;l===s&&(l=null),s=s.return}l===s&&(l=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=o.updateQueue,h!==null&&(l=h.retryQueue,l!==null&&(h.retryQueue=null,yf(o,l))));break;case 19:br(s,o),wr(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,yf(o,h)));break;case 30:break;case 21:break;default:br(s,o),wr(o)}}function wr(o){var s=o.flags;if(s&2){try{for(var l,h=o.return;h!==null;){if(pE(h)){l=h;break}h=h.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var v=l.stateNode,_=Av(o);vf(o,_,v);break;case 5:var N=l.stateNode;l.flags&32&&(Yi(N,""),l.flags&=-33);var j=Av(o);vf(o,j,N);break;case 3:case 4:var W=l.stateNode.containerInfo,de=Av(o);Iv(o,de,W);break;default:throw Error(r(161))}}catch(we){Pt(o,o.return,we)}o.flags&=-3}s&4096&&(o.flags&=-4097)}function EE(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var s=o;EE(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),o=o.sibling}}function Sa(o,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)vE(o,s.alternate,s),s=s.sibling}function ui(o){for(o=o.child;o!==null;){var s=o;switch(s.tag){case 0:case 11:case 14:case 15:es(4,s,s.return),ui(s);break;case 1:Ho(s,s.return);var l=s.stateNode;typeof l.componentWillUnmount=="function"&&fE(s,s.return,l),ui(s);break;case 27:au(s.stateNode);case 26:case 5:Ho(s,s.return),ui(s);break;case 22:s.memoizedState===null&&ui(s);break;case 30:ui(s);break;default:ui(s)}o=o.sibling}}function Ea(o,s,l){for(l=l&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,v=o,_=s,N=_.flags;switch(_.tag){case 0:case 11:case 15:Ea(v,_,l),Wl(4,_);break;case 1:if(Ea(v,_,l),h=_,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(de){Pt(h,h.return,de)}if(h=_,v=h.updateQueue,v!==null){var j=h.stateNode;try{var W=v.shared.hiddenCallbacks;if(W!==null)for(v.shared.hiddenCallbacks=null,v=0;v<W.length;v++)eS(W[v],j)}catch(de){Pt(h,h.return,de)}}l&&N&64&&dE(_),Yl(_,_.return);break;case 27:mE(_);case 26:case 5:Ea(v,_,l),l&&h===null&&N&4&&hE(_),Yl(_,_.return);break;case 12:Ea(v,_,l);break;case 31:Ea(v,_,l),l&&N&4&&bE(v,_);break;case 13:Ea(v,_,l),l&&N&4&&wE(v,_);break;case 22:_.memoizedState===null&&Ea(v,_,l),Yl(_,_.return);break;case 30:break;default:Ea(v,_,l)}s=s.sibling}}function kv(o,s){var l=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(l=o.memoizedState.cachePool.pool),o=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(o=s.memoizedState.cachePool.pool),o!==l&&(o!=null&&o.refCount++,l!=null&&Ll(l))}function Mv(o,s){o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&Ll(o))}function Eo(o,s,l,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)RE(o,s,l,h),s=s.sibling}function RE(o,s,l,h){var v=s.flags;switch(s.tag){case 0:case 11:case 15:Eo(o,s,l,h),v&2048&&Wl(9,s);break;case 1:Eo(o,s,l,h);break;case 3:Eo(o,s,l,h),v&2048&&(o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&Ll(o)));break;case 12:if(v&2048){Eo(o,s,l,h),o=s.stateNode;try{var _=s.memoizedProps,N=_.id,j=_.onPostCommit;typeof j=="function"&&j(N,s.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(W){Pt(s,s.return,W)}}else Eo(o,s,l,h);break;case 31:Eo(o,s,l,h);break;case 13:Eo(o,s,l,h);break;case 23:break;case 22:_=s.stateNode,N=s.alternate,s.memoizedState!==null?_._visibility&2?Eo(o,s,l,h):Ql(o,s):_._visibility&2?Eo(o,s,l,h):(_._visibility|=2,gc(o,s,l,h,(s.subtreeFlags&10256)!==0||!1)),v&2048&&kv(N,s);break;case 24:Eo(o,s,l,h),v&2048&&Mv(s.alternate,s);break;default:Eo(o,s,l,h)}}function gc(o,s,l,h,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=o,N=s,j=l,W=h,de=N.flags;switch(N.tag){case 0:case 11:case 15:gc(_,N,j,W,v),Wl(8,N);break;case 23:break;case 22:var we=N.stateNode;N.memoizedState!==null?we._visibility&2?gc(_,N,j,W,v):Ql(_,N):(we._visibility|=2,gc(_,N,j,W,v)),v&&de&2048&&kv(N.alternate,N);break;case 24:gc(_,N,j,W,v),v&&de&2048&&Mv(N.alternate,N);break;default:gc(_,N,j,W,v)}s=s.sibling}}function Ql(o,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var l=o,h=s,v=h.flags;switch(h.tag){case 22:Ql(l,h),v&2048&&kv(h.alternate,h);break;case 24:Ql(l,h),v&2048&&Mv(h.alternate,h);break;default:Ql(l,h)}s=s.sibling}}var Xl=8192;function vc(o,s,l){if(o.subtreeFlags&Xl)for(o=o.child;o!==null;)xE(o,s,l),o=o.sibling}function xE(o,s,l){switch(o.tag){case 26:vc(o,s,l),o.flags&Xl&&o.memoizedState!==null&&g5(l,So,o.memoizedState,o.memoizedProps);break;case 5:vc(o,s,l);break;case 3:case 4:var h=So;So=kf(o.stateNode.containerInfo),vc(o,s,l),So=h;break;case 22:o.memoizedState===null&&(h=o.alternate,h!==null&&h.memoizedState!==null?(h=Xl,Xl=16777216,vc(o,s,l),Xl=h):vc(o,s,l));break;default:vc(o,s,l)}}function TE(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 Jl(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var h=s[l];Mn=h,CE(h,o)}TE(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)OE(o),o=o.sibling}function OE(o){switch(o.tag){case 0:case 11:case 15:Jl(o),o.flags&2048&&es(9,o,o.return);break;case 3:Jl(o);break;case 12:Jl(o);break;case 22:var s=o.stateNode;o.memoizedState!==null&&s._visibility&2&&(o.return===null||o.return.tag!==13)?(s._visibility&=-3,_f(o)):Jl(o);break;default:Jl(o)}}function _f(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var h=s[l];Mn=h,CE(h,o)}TE(o)}for(o=o.child;o!==null;){switch(s=o,s.tag){case 0:case 11:case 15:es(8,s,s.return),_f(s);break;case 22:l=s.stateNode,l._visibility&2&&(l._visibility&=-3,_f(s));break;default:_f(s)}o=o.sibling}}function CE(o,s){for(;Mn!==null;){var l=Mn;switch(l.tag){case 0:case 11:case 15:es(8,l,s);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var h=l.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Ll(l.memoizedState.cache)}if(h=l.child,h!==null)h.return=l,Mn=h;else e:for(l=o;Mn!==null;){h=Mn;var v=h.sibling,_=h.return;if(yE(h),h===l){Mn=null;break e}if(v!==null){v.return=_,Mn=v;break e}Mn=_}}}var N3={getCacheForType:function(o){var s=Fn(pn),l=s.data.get(o);return l===void 0&&(l=o(),s.data.set(o,l)),l},cacheSignal:function(){return Fn(pn).controller.signal}},k3=typeof WeakMap=="function"?WeakMap:Map,It=0,qt=null,gt=null,_t=0,Mt=0,Lr=null,ts=!1,yc=!1,Pv=!1,Ra=0,an=0,ns=0,di=0,Dv=0,jr=0,_c=0,eu=null,Sr=null,Lv=!1,bf=0,AE=0,wf=1/0,Sf=null,rs=null,xn=0,os=null,bc=null,xa=0,jv=0,$v=null,IE=null,tu=0,Uv=null;function $r(){return(It&2)!==0&&_t!==0?_t&-_t:F.T!==null?Hv():ag()}function NE(){if(jr===0)if((_t&536870912)===0||wt){var o=Fi;Fi<<=1,(Fi&3932160)===0&&(Fi=262144),jr=o}else jr=536870912;return o=Pr.current,o!==null&&(o.flags|=32),jr}function Er(o,s,l){(o===qt&&(Mt===2||Mt===9)||o.cancelPendingCommit!==null)&&(wc(o,0),as(o,_t,jr,!1)),tn(o,l),((It&2)===0||o!==qt)&&(o===qt&&((It&2)===0&&(di|=l),an===4&&as(o,_t,jr,!1)),Go(o))}function kE(o,s,l){if((It&6)!==0)throw Error(r(327));var h=!l&&(s&127)===0&&(s&o.expiredLanes)===0||Wt(o,s),v=h?D3(o,s):Vv(o,s,!0),_=h;do{if(v===0){yc&&!h&&as(o,s,0,!1);break}else{if(l=o.current.alternate,_&&!M3(l)){v=Vv(o,s,!1),_=!1;continue}if(v===2){if(_=s,o.errorRecoveryDisabledLanes&_)var N=0;else N=o.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){s=N;e:{var j=o;v=eu;var W=j.current.memoizedState.isDehydrated;if(W&&(wc(j,N).flags|=256),N=Vv(j,N,!1),N!==2){if(Pv&&!W){j.errorRecoveryDisabledLanes|=_,di|=_,v=4;break e}_=Sr,Sr=v,_!==null&&(Sr===null?Sr=_:Sr.push.apply(Sr,_))}v=N}if(_=!1,v!==2)continue}}if(v===1){wc(o,0),as(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:as(h,s,jr,!ts);break e;case 2:Sr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(v=bf+300-Se(),10<v)){if(as(h,s,jr,!ts),Qe(h,0,!0)!==0)break e;xa=s,h.timeoutHandle=lR(ME.bind(null,h,l,Sr,Sf,Lv,s,jr,di,_c,ts,_,"Throttled",-0,0),v);break e}ME(h,l,Sr,Sf,Lv,s,jr,di,_c,ts,_,null,-0,0)}}break}while(!0);Go(o)}function ME(o,s,l,h,v,_,N,j,W,de,we,xe,he,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:ua},xE(s,_,xe);var Ue=(_&62914560)===_?bf-Se():(_&4194048)===_?AE-Se():0;if(Ue=v5(xe,Ue),Ue!==null){xa=_,o.cancelPendingCommit=Ue(VE.bind(null,o,s,_,l,h,v,N,j,W,we,xe,null,he,ge)),as(o,_,N,!de);return}}VE(o,s,_,l,h,v,N,j,W)}function M3(o){for(var s=o;;){var l=s.tag;if((l===0||l===11||l===15)&&s.flags&16384&&(l=s.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var h=0;h<l.length;h++){var v=l[h],_=v.getSnapshot;v=v.value;try{if(!kr(_(),v))return!1}catch{return!1}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;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 as(o,s,l,h){s&=~Dv,s&=~di,o.suspendedLanes|=s,o.pingedLanes&=~s,h&&(o.warmLanes|=s),h=o.expirationTimes;for(var v=s;0<v;){var _=31-In(v),N=1<<_;h[_]=-1,v&=~N}l!==0&&Ks(o,l,s)}function Ef(){return(It&6)===0?(nu(0),!1):!0}function zv(){if(gt!==null){if(Mt===0)var o=gt.return;else o=gt,pa=ni=null,nv(o),dc=null,$l=0,o=gt;for(;o!==null;)uE(o.alternate,o),o=o.return;gt=null}}function wc(o,s){var l=o.timeoutHandle;l!==-1&&(o.timeoutHandle=-1,J3(l)),l=o.cancelPendingCommit,l!==null&&(o.cancelPendingCommit=null,l()),xa=0,zv(),qt=o,gt=l=fa(o.current,null),_t=s,Mt=0,Lr=null,ts=!1,yc=Wt(o,s),Pv=!1,_c=jr=Dv=di=ns=an=0,Sr=eu=null,Lv=!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-In(h),_=1<<v;s|=o[v],h&=~_}return Ra=s,qd(),l}function PE(o,s){at=null,F.H=Gl,s===uc||s===Qd?(s=Yw(),Mt=3):s===Bg?(s=Yw(),Mt=4):Mt=s===yv?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Lr=s,gt===null&&(an=1,ff(o,eo(s,o.current)))}function DE(){var o=Pr.current;return o===null?!0:(_t&4194048)===_t?oo===null:(_t&62914560)===_t||(_t&536870912)!==0?o===oo:!1}function LE(){var o=F.H;return F.H=Gl,o===null?Gl:o}function jE(){var o=F.A;return F.A=N3,o}function Rf(){an=4,ts||(_t&4194048)!==_t&&Pr.current!==null||(yc=!0),(ns&134217727)===0&&(di&134217727)===0||qt===null||as(qt,_t,jr,!1)}function Vv(o,s,l){var h=It;It|=2;var v=LE(),_=jE();(qt!==o||_t!==s)&&(Sf=null,wc(o,s)),s=!1;var N=an;e:do try{if(Mt!==0&>!==null){var j=gt,W=Lr;switch(Mt){case 8:zv(),N=6;break e;case 3:case 2:case 9:case 6:Pr.current===null&&(s=!0);var de=Mt;if(Mt=0,Lr=null,Sc(o,j,W,de),l&&yc){N=0;break e}break;default:de=Mt,Mt=0,Lr=null,Sc(o,j,W,de)}}P3(),N=an;break}catch(we){PE(o,we)}while(!0);return s&&o.shellSuspendCounter++,pa=ni=null,It=h,F.H=v,F.A=_,gt===null&&(qt=null,_t=0,qd()),N}function P3(){for(;gt!==null;)$E(gt)}function D3(o,s){var l=It;It|=2;var h=LE(),v=jE();qt!==o||_t!==s?(Sf=null,wf=Se()+500,wc(o,s)):yc=Wt(o,s);e:do try{if(Mt!==0&>!==null){s=gt;var _=Lr;t:switch(Mt){case 1:Mt=0,Lr=null,Sc(o,s,_,1);break;case 2:case 9:if(Kw(_)){Mt=0,Lr=null,UE(s);break}s=function(){Mt!==2&&Mt!==9||qt!==o||(Mt=7),Go(o)},_.then(s,s);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:Kw(_)?(Mt=0,Lr=null,UE(s)):(Mt=0,Lr=null,Sc(o,s,_,7));break;case 5:var N=null;switch(gt.tag){case 26:N=gt.memoizedState;case 5:case 27:var j=gt;if(N?RR(N):j.stateNode.complete){Mt=0,Lr=null;var W=j.sibling;if(W!==null)gt=W;else{var de=j.return;de!==null?(gt=de,xf(de)):gt=null}break t}}Mt=0,Lr=null,Sc(o,s,_,5);break;case 6:Mt=0,Lr=null,Sc(o,s,_,6);break;case 8:zv(),an=6;break e;default:throw Error(r(462))}}L3();break}catch(we){PE(o,we)}while(!0);return pa=ni=null,F.H=h,F.A=v,It=l,gt!==null?0:(qt=null,_t=0,qd(),an)}function L3(){for(;gt!==null&&!te();)$E(gt)}function $E(o){var s=cE(o.alternate,o,Ra);o.memoizedProps=o.pendingProps,s===null?xf(o):gt=s}function UE(o){var s=o,l=s.alternate;switch(s.tag){case 15:case 0:s=nE(l,s,s.pendingProps,s.type,void 0,_t);break;case 11:s=nE(l,s,s.pendingProps,s.type.render,s.ref,_t);break;case 5:nv(s);default:uE(l,s),s=gt=jw(s,Ra),s=cE(l,s,Ra)}o.memoizedProps=o.pendingProps,s===null?xf(o):gt=s}function Sc(o,s,l,h){pa=ni=null,nv(s),dc=null,$l=0;var v=s.return;try{if(R3(o,v,s,l,_t)){an=1,ff(o,eo(l,o.current)),gt=null;return}}catch(_){if(v!==null)throw gt=v,_;an=1,ff(o,eo(l,o.current)),gt=null;return}s.flags&32768?(wt||h===1?o=!0:yc||(_t&536870912)!==0?o=!1:(ts=o=!0,(h===2||h===9||h===3||h===6)&&(h=Pr.current,h!==null&&h.tag===13&&(h.flags|=16384))),zE(s,o)):xf(s)}function xf(o){var s=o;do{if((s.flags&32768)!==0){zE(s,ts);return}o=s.return;var l=O3(s.alternate,s,Ra);if(l!==null){gt=l;return}if(s=s.sibling,s!==null){gt=s;return}gt=s=o}while(s!==null);an===0&&(an=5)}function zE(o,s){do{var l=C3(o.alternate,o);if(l!==null){l.flags&=32767,gt=l;return}if(l=o.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!s&&(o=o.sibling,o!==null)){gt=o;return}gt=o=l}while(o!==null);an=6,gt=null}function VE(o,s,l,h,v,_,N,j,W){o.cancelPendingCommit=null;do Tf();while(xn!==0);if((It&6)!==0)throw Error(r(327));if(s!==null){if(s===o.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=Ag,pr(o,l,_,N,j,W),o===qt&&(gt=qt=null,_t=0),bc=s,os=o,xa=l,jv=_,$v=v,IE=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,z3(rt,function(){return GE(),null})):(o.callbackNode=null,o.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=F.T,F.T=null,v=X.p,X.p=2,N=It,It|=4;try{A3(o,s,l)}finally{It=N,X.p=v,F.T=h}}xn=1,FE(),qE(),BE()}}function FE(){if(xn===1){xn=0;var o=os,s=bc,l=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||l){l=F.T,F.T=null;var h=X.p;X.p=2;var v=It;It|=4;try{SE(s,o);var _=Jv,N=Cw(o.containerInfo),j=_.focusedElem,W=_.selectionRange;if(N!==j&&j&&j.ownerDocument&&Ow(j.ownerDocument.documentElement,j)){if(W!==null&&Rg(j)){var de=W.start,we=W.end;if(we===void 0&&(we=de),"selectionStart"in j)j.selectionStart=de,j.selectionEnd=Math.min(we,j.value.length);else{var xe=j.ownerDocument||document,he=xe&&xe.defaultView||window;if(he.getSelection){var ge=he.getSelection(),Ue=j.textContent.length,Ze=Math.min(W.start,Ue),Vt=W.end===void 0?Ze:Math.min(W.end,Ue);!ge.extend&&Ze>Vt&&(N=Vt,Vt=Ze,Ze=N);var se=Tw(j,Ze),ee=Tw(j,Vt);if(se&&ee&&(ge.rangeCount!==1||ge.anchorNode!==se.node||ge.anchorOffset!==se.offset||ge.focusNode!==ee.node||ge.focusOffset!==ee.offset)){var ue=xe.createRange();ue.setStart(se.node,se.offset),ge.removeAllRanges(),Ze>Vt?(ge.addRange(ue),ge.extend(ee.node,ee.offset)):(ue.setEnd(ee.node,ee.offset),ge.addRange(ue))}}}}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 Ee=xe[j];Ee.element.scrollLeft=Ee.left,Ee.element.scrollTop=Ee.top}}$f=!!Xv,Jv=Xv=null}finally{It=v,X.p=h,F.T=l}}o.current=s,xn=2}}function qE(){if(xn===2){xn=0;var o=os,s=bc,l=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||l){l=F.T,F.T=null;var h=X.p;X.p=2;var v=It;It|=4;try{vE(o,s.alternate,s)}finally{It=v,X.p=h,F.T=l}}xn=3}}function BE(){if(xn===4||xn===3){xn=0,oe();var o=os,s=bc,l=xa,h=IE;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?xn=5:(xn=0,bc=os=null,HE(o,o.pendingLanes));var v=o.pendingLanes;if(v===0&&(rs=null),bo(l),s=s.stateNode,en&&typeof en.onCommitFiberRoot=="function")try{en.onCommitFiberRoot($n,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=F.T,v=X.p,X.p=2,F.T=null;try{for(var _=o.onRecoverableError,N=0;N<h.length;N++){var j=h[N];_(j.value,{componentStack:j.stack})}}finally{F.T=s,X.p=v}}(xa&3)!==0&&Tf(),Go(o),v=o.pendingLanes,(l&261930)!==0&&(v&42)!==0?o===Uv?tu++:(tu=0,Uv=o):tu=0,nu(0)}}function HE(o,s){(o.pooledCacheLanes&=s)===0&&(s=o.pooledCache,s!=null&&(o.pooledCache=null,Ll(s)))}function Tf(){return FE(),qE(),BE(),GE()}function GE(){if(xn!==5)return!1;var o=os,s=jv;jv=0;var l=bo(xa),h=F.T,v=X.p;try{X.p=32>l?32:l,F.T=null,l=$v,$v=null;var _=os,N=xa;if(xn=0,bc=os=null,xa=0,(It&6)!==0)throw Error(r(331));var j=It;if(It|=4,OE(_.current),RE(_,_.current,N,l),It=j,nu(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot($n,_)}catch{}return!0}finally{X.p=v,F.T=h,HE(o,s)}}function ZE(o,s,l){s=eo(l,s),s=vv(o.stateNode,s,2),o=Qa(o,s,2),o!==null&&(tn(o,2),Go(o))}function Pt(o,s,l){if(o.tag===3)ZE(o,o,l);else for(;s!==null;){if(s.tag===3){ZE(s,o,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(rs===null||!rs.has(h))){o=eo(l,o),l=KS(2),h=Qa(s,l,2),h!==null&&(WS(l,h,s,o),tn(h,2),Go(h));break}}s=s.return}}function Fv(o,s,l){var h=o.pingCache;if(h===null){h=o.pingCache=new k3;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(l)||(Pv=!0,v.add(l),o=j3.bind(null,o,s,l),s.then(o,o))}function j3(o,s,l){var h=o.pingCache;h!==null&&h.delete(s),o.pingedLanes|=o.suspendedLanes&l,o.warmLanes&=~l,qt===o&&(_t&l)===l&&(an===4||an===3&&(_t&62914560)===_t&&300>Se()-bf?(It&2)===0&&wc(o,0):Dv|=l,_c===_t&&(_c=0)),Go(o)}function KE(o,s){s===0&&(s=er()),o=Js(o,s),o!==null&&(tn(o,s),Go(o))}function $3(o){var s=o.memoizedState,l=0;s!==null&&(l=s.retryLane),KE(o,l)}function U3(o,s){var l=0;switch(o.tag){case 31:case 13:var h=o.stateNode,v=o.memoizedState;v!==null&&(l=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),KE(o,l)}function z3(o,s){return Xe(o,s)}var Of=null,Ec=null,qv=!1,Cf=!1,Bv=!1,ss=0;function Go(o){o!==Ec&&o.next===null&&(Ec===null?Of=Ec=o:Ec=Ec.next=o),Cf=!0,qv||(qv=!0,F3())}function nu(o,s){if(!Bv&&Cf){Bv=!0;do for(var l=!1,h=Of;h!==null;){if(o!==0){var v=h.pendingLanes;if(v===0)var _=0;else{var N=h.suspendedLanes,j=h.pingedLanes;_=(1<<31-In(42|o)+1)-1,_&=v&~(N&~j),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(l=!0,XE(h,_))}else _=_t,_=Qe(h,h===qt?_:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(_&3)===0||Wt(h,_)||(l=!0,XE(h,_));h=h.next}while(l);Bv=!1}}function V3(){WE()}function WE(){Cf=qv=!1;var o=0;ss!==0&&X3()&&(o=ss);for(var s=Se(),l=null,h=Of;h!==null;){var v=h.next,_=YE(h,s);_===0?(h.next=null,l===null?Of=v:l.next=v,v===null&&(Ec=l)):(l=h,(o!==0||(_&3)!==0)&&(Cf=!0)),h=v}xn!==0&&xn!==5||nu(o),ss!==0&&(ss=0)}function YE(o,s){for(var l=o.suspendedLanes,h=o.pingedLanes,v=o.expirationTimes,_=o.pendingLanes&-62914561;0<_;){var N=31-In(_),j=1<<N,W=v[N];W===-1?((j&l)===0||(j&h)!==0)&&(v[N]=Nn(j,s)):W<=s&&(o.expiredLanes|=j),_&=~j}if(s=qt,l=_t,l=Qe(o,o===s?l:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h=o.callbackNode,l===0||o===s&&(Mt===2||Mt===9)||o.cancelPendingCommit!==null)return h!==null&&h!==null&&G(h),o.callbackNode=null,o.callbackPriority=0;if((l&3)===0||Wt(o,l)){if(s=l&-l,s===o.callbackPriority)return s;switch(h!==null&&G(h),bo(l)){case 2:case 8:l=ke;break;case 32:l=rt;break;case 268435456:l=kt;break;default:l=rt}return h=QE.bind(null,o),l=Xe(l,h),o.callbackPriority=s,o.callbackNode=l,s}return h!==null&&h!==null&&G(h),o.callbackPriority=2,o.callbackNode=null,2}function QE(o,s){if(xn!==0&&xn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var l=o.callbackNode;if(Tf()&&o.callbackNode!==l)return null;var h=_t;return h=Qe(o,o===qt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h===0?null:(kE(o,h,s),YE(o,Se()),o.callbackNode!=null&&o.callbackNode===l?QE.bind(null,o):null)}function XE(o,s){if(Tf())return null;kE(o,s,!0)}function F3(){e5(function(){(It&6)!==0?Xe(Re,V3):WE()})}function Hv(){if(ss===0){var o=cc;o===0&&(o=Vi,Vi<<=1,(Vi&261888)===0&&(Vi=256)),ss=o}return ss}function JE(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Dd(""+o)}function eR(o,s){var l=s.ownerDocument.createElement("input");return l.name=s.name,l.value=s.value,o.id&&l.setAttribute("form",o.id),s.parentNode.insertBefore(l,s),o=new FormData(o),l.parentNode.removeChild(l),o}function q3(o,s,l,h,v){if(s==="submit"&&l&&l.stateNode===v){var _=JE((v[vr]||null).action),N=h.submitter;N&&(s=(s=N[vr]||null)?JE(s.formAction):N.getAttribute("formAction"),s!==null&&(_=s,N=null));var j=new Ud("action","action",null,h,v);o.push({event:j,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ss!==0){var W=N?eR(v,N):new FormData(v);dv(l,{pending:!0,data:W,method:v.method,action:_},null,W)}}else typeof _=="function"&&(j.preventDefault(),W=N?eR(v,N):new FormData(v),dv(l,{pending:!0,data:W,method:v.method,action:_},_,W))},currentTarget:v}]})}}for(var Gv=0;Gv<Cg.length;Gv++){var Zv=Cg[Gv],B3=Zv.toLowerCase(),H3=Zv[0].toUpperCase()+Zv.slice(1);wo(B3,"on"+H3)}wo(Nw,"onAnimationEnd"),wo(kw,"onAnimationIteration"),wo(Mw,"onAnimationStart"),wo("dblclick","onDoubleClick"),wo("focusin","onFocus"),wo("focusout","onBlur"),wo(i3,"onTransitionRun"),wo(c3,"onTransitionStart"),wo(l3,"onTransitionCancel"),wo(Pw,"onTransitionEnd"),Ki("onMouseEnter",["mouseout","mouseover"]),Ki("onMouseLeave",["mouseout","mouseover"]),Ki("onPointerEnter",["pointerout","pointerover"]),Ki("onPointerLeave",["pointerout","pointerover"]),Ws("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ws("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ws("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ws("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ws("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ws("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ru="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(" "),G3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ru));function tR(o,s){s=(s&4)!==0;for(var l=0;l<o.length;l++){var h=o[l],v=h.event;h=h.listeners;e:{var _=void 0;if(s)for(var N=h.length-1;0<=N;N--){var j=h[N],W=j.instance,de=j.currentTarget;if(j=j.listener,W!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=de;try{_(v)}catch(we){Fd(we)}v.currentTarget=null,_=W}else for(N=0;N<h.length;N++){if(j=h[N],W=j.instance,de=j.currentTarget,j=j.listener,W!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=de;try{_(v)}catch(we){Fd(we)}v.currentTarget=null,_=W}}}}function vt(o,s){var l=s[sg];l===void 0&&(l=s[sg]=new Set);var h=o+"__bubble";l.has(h)||(nR(s,o,2,!1),l.add(h))}function Kv(o,s,l){var h=0;s&&(h|=4),nR(l,o,h,s)}var Af="_reactListening"+Math.random().toString(36).slice(2);function Wv(o){if(!o[Af]){o[Af]=!0,W1.forEach(function(l){l!=="selectionchange"&&(G3.has(l)||Kv(l,!1,o),Kv(l,!0,o))});var s=o.nodeType===9?o:o.ownerDocument;s===null||s[Af]||(s[Af]=!0,Kv("selectionchange",!1,s))}}function nR(o,s,l,h){switch(NR(s)){case 2:var v=b5;break;case 8:v=w5;break;default:v=uy}l=v.bind(null,s,l,o),v=void 0,!mg||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),h?v!==void 0?o.addEventListener(s,l,{capture:!0,passive:v}):o.addEventListener(s,l,!0):v!==void 0?o.addEventListener(s,l,{passive:v}):o.addEventListener(s,l,!1)}function Yv(o,s,l,h,v){var _=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var N=h.tag;if(N===3||N===4){var j=h.stateNode.containerInfo;if(j===v)break;if(N===4)for(N=h.return;N!==null;){var W=N.tag;if((W===3||W===4)&&N.stateNode.containerInfo===v)return;N=N.return}for(;j!==null;){if(N=Hi(j),N===null)return;if(W=N.tag,W===5||W===6||W===26||W===27){h=_=N;continue e}j=j.parentNode}}h=h.return}iw(function(){var de=_,we=hg(l),xe=[];e:{var he=Dw.get(o);if(he!==void 0){var ge=Ud,Ue=o;switch(o){case"keypress":if(jd(l)===0)break e;case"keydown":case"keyup":ge=UP;break;case"focusin":Ue="focus",ge=_g;break;case"focusout":Ue="blur",ge=_g;break;case"beforeblur":case"afterblur":ge=_g;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=uw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=OP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=FP;break;case Nw:case kw:case Mw:ge=IP;break;case Pw:ge=BP;break;case"scroll":case"scrollend":ge=xP;break;case"wheel":ge=GP;break;case"copy":case"cut":case"paste":ge=kP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=fw;break;case"toggle":case"beforetoggle":ge=KP}var Ze=(s&4)!==0,Vt=!Ze&&(o==="scroll"||o==="scrollend"),se=Ze?he!==null?he+"Capture":null:he;Ze=[];for(var ee=de,ue;ee!==null;){var Ee=ee;if(ue=Ee.stateNode,Ee=Ee.tag,Ee!==5&&Ee!==26&&Ee!==27||ue===null||se===null||(Ee=xl(ee,se),Ee!=null&&Ze.push(ou(ee,Ee,ue))),Vt)break;ee=ee.return}0<Ze.length&&(he=new ge(he,Ue,null,l,we),xe.push({event:he,listeners:Ze}))}}if((s&7)===0){e:{if(he=o==="mouseover"||o==="pointerover",ge=o==="mouseout"||o==="pointerout",he&&l!==fg&&(Ue=l.relatedTarget||l.fromElement)&&(Hi(Ue)||Ue[Bi]))break e;if((ge||he)&&(he=we.window===we?we:(he=we.ownerDocument)?he.defaultView||he.parentWindow:window,ge?(Ue=l.relatedTarget||l.toElement,ge=de,Ue=Ue?Hi(Ue):null,Ue!==null&&(Vt=i(Ue),Ze=Ue.tag,Ue!==Vt||Ze!==5&&Ze!==27&&Ze!==6)&&(Ue=null)):(ge=null,Ue=de),ge!==Ue)){if(Ze=uw,Ee="onMouseLeave",se="onMouseEnter",ee="mouse",(o==="pointerout"||o==="pointerover")&&(Ze=fw,Ee="onPointerLeave",se="onPointerEnter",ee="pointer"),Vt=ge==null?he:Rl(ge),ue=Ue==null?he:Rl(Ue),he=new Ze(Ee,ee+"leave",ge,l,we),he.target=Vt,he.relatedTarget=ue,Ee=null,Hi(we)===de&&(Ze=new Ze(se,ee+"enter",Ue,l,we),Ze.target=ue,Ze.relatedTarget=Vt,Ee=Ze),Vt=Ee,ge&&Ue)t:{for(Ze=Z3,se=ge,ee=Ue,ue=0,Ee=se;Ee;Ee=Ze(Ee))ue++;Ee=0;for(var Ge=ee;Ge;Ge=Ze(Ge))Ee++;for(;0<ue-Ee;)se=Ze(se),ue--;for(;0<Ee-ue;)ee=Ze(ee),Ee--;for(;ue--;){if(se===ee||ee!==null&&se===ee.alternate){Ze=se;break t}se=Ze(se),ee=Ze(ee)}Ze=null}else Ze=null;ge!==null&&rR(xe,he,ge,Ze,!1),Ue!==null&&Vt!==null&&rR(xe,Vt,Ue,Ze,!0)}}e:{if(he=de?Rl(de):window,ge=he.nodeName&&he.nodeName.toLowerCase(),ge==="select"||ge==="input"&&he.type==="file")var Ot=bw;else if(yw(he))if(ww)Ot=o3;else{Ot=n3;var qe=t3}else ge=he.nodeName,!ge||ge.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?de&&dg(de.elementType)&&(Ot=bw):Ot=r3;if(Ot&&(Ot=Ot(o,de))){_w(xe,Ot,l,we);break e}qe&&qe(o,he,de),o==="focusout"&&de&&he.type==="number"&&de.memoizedProps.value!=null&&ug(he,"number",he.value)}switch(qe=de?Rl(de):window,o){case"focusin":(yw(qe)||qe.contentEditable==="true")&&(ec=qe,xg=de,Ml=null);break;case"focusout":Ml=xg=ec=null;break;case"mousedown":Tg=!0;break;case"contextmenu":case"mouseup":case"dragend":Tg=!1,Aw(xe,l,we);break;case"selectionchange":if(s3)break;case"keydown":case"keyup":Aw(xe,l,we)}var it;if(wg)e:{switch(o){case"compositionstart":var bt="onCompositionStart";break e;case"compositionend":bt="onCompositionEnd";break e;case"compositionupdate":bt="onCompositionUpdate";break e}bt=void 0}else Ji?gw(o,l)&&(bt="onCompositionEnd"):o==="keydown"&&l.keyCode===229&&(bt="onCompositionStart");bt&&(hw&&l.locale!=="ko"&&(Ji||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&Ji&&(it=cw()):(Ba=we,gg="value"in Ba?Ba.value:Ba.textContent,Ji=!0)),qe=If(de,bt),0<qe.length&&(bt=new dw(bt,o,null,l,we),xe.push({event:bt,listeners:qe}),it?bt.data=it:(it=vw(l),it!==null&&(bt.data=it)))),(it=YP?QP(o,l):XP(o,l))&&(bt=If(de,"onBeforeInput"),0<bt.length&&(qe=new dw("onBeforeInput","beforeinput",null,l,we),xe.push({event:qe,listeners:bt}),qe.data=it)),q3(xe,o,de,l,we)}tR(xe,s)})}function ou(o,s,l){return{instance:o,listener:s,currentTarget:l}}function If(o,s){for(var l=s+"Capture",h=[];o!==null;){var v=o,_=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||_===null||(v=xl(o,l),v!=null&&h.unshift(ou(o,v,_)),v=xl(o,s),v!=null&&h.push(ou(o,v,_))),o.tag===3)return h;o=o.return}return[]}function Z3(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function rR(o,s,l,h,v){for(var _=s._reactName,N=[];l!==null&&l!==h;){var j=l,W=j.alternate,de=j.stateNode;if(j=j.tag,W!==null&&W===h)break;j!==5&&j!==26&&j!==27||de===null||(W=de,v?(de=xl(l,_),de!=null&&N.unshift(ou(l,de,W))):v||(de=xl(l,_),de!=null&&N.push(ou(l,de,W)))),l=l.return}N.length!==0&&o.push({event:s,listeners:N})}var K3=/\r\n?/g,W3=/\u0000|\uFFFD/g;function oR(o){return(typeof o=="string"?o:""+o).replace(K3,`
|
|
10
|
+
`).replace(W3,"")}function aR(o,s){return s=oR(s),oR(o)===s}function zt(o,s,l,h,v,_){switch(l){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":Md(o,"class",h);break;case"tabIndex":Md(o,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Md(o,l,h);break;case"style":aw(o,h,_);break;case"data":if(s!=="object"){Md(o,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||l!=="href")){o.removeAttribute(l);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(l);break}h=Dd(""+h),o.setAttribute(l,h);break;case"action":case"formAction":if(typeof h=="function"){o.setAttribute(l,"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"&&(l==="formAction"?(s!=="input"&&zt(o,s,"name",v.name,v,null),zt(o,s,"formEncType",v.formEncType,v,null),zt(o,s,"formMethod",v.formMethod,v,null),zt(o,s,"formTarget",v.formTarget,v,null)):(zt(o,s,"encType",v.encType,v,null),zt(o,s,"method",v.method,v,null),zt(o,s,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(l);break}h=Dd(""+h),o.setAttribute(l,h);break;case"onClick":h!=null&&(o.onclick=ua);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(l=h.__html,l!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=l}}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}l=Dd(""+h),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);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(l,""+h):o.removeAttribute(l);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(l,""):o.removeAttribute(l);break;case"capture":case"download":h===!0?o.setAttribute(l,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(l,h):o.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?o.setAttribute(l,h):o.removeAttribute(l);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?o.removeAttribute(l):o.setAttribute(l,h);break;case"popover":vt("beforetoggle",o),vt("toggle",o),kd(o,"popover",h);break;case"xlinkActuate":la(o,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":la(o,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":la(o,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":la(o,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":la(o,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":la(o,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":la(o,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":la(o,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":la(o,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":kd(o,"is",h);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=EP.get(l)||l,kd(o,l,h))}}function Qv(o,s,l,h,v,_){switch(l){case"style":aw(o,h,_);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(l=h.__html,l!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=l}}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=ua);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Y1.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(v=l.endsWith("Capture"),s=l.slice(2,v?l.length-7:void 0),_=o[vr]||null,_=_!=null?_[l]:null,typeof _=="function"&&o.removeEventListener(s,_,v),typeof h=="function")){typeof _!="function"&&_!==null&&(l in o?o[l]=null:o.hasAttribute(l)&&o.removeAttribute(l)),o.addEventListener(s,h,v);break e}l in o?o[l]=h:h===!0?o.setAttribute(l,""):kd(o,l,h)}}}function Bn(o,s,l){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 l)if(l.hasOwnProperty(_)){var N=l[_];if(N!=null)switch(_){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:zt(o,s,_,N,l,null)}}v&&zt(o,s,"srcSet",l.srcSet,l,null),h&&zt(o,s,"src",l.src,l,null);return;case"input":vt("invalid",o);var j=_=N=v=null,W=null,de=null;for(h in l)if(l.hasOwnProperty(h)){var we=l[h];if(we!=null)switch(h){case"name":v=we;break;case"type":N=we;break;case"checked":W=we;break;case"defaultChecked":de=we;break;case"value":_=we;break;case"defaultValue":j=we;break;case"children":case"dangerouslySetInnerHTML":if(we!=null)throw Error(r(137,s));break;default:zt(o,s,h,we,l,null)}}tw(o,_,j,W,de,N,v,!1);return;case"select":vt("invalid",o),h=N=_=null;for(v in l)if(l.hasOwnProperty(v)&&(j=l[v],j!=null))switch(v){case"value":_=j;break;case"defaultValue":N=j;break;case"multiple":h=j;default:zt(o,s,v,j,l,null)}s=_,l=N,o.multiple=!!h,s!=null?Wi(o,!!h,s,!1):l!=null&&Wi(o,!!h,l,!0);return;case"textarea":vt("invalid",o),_=v=h=null;for(N in l)if(l.hasOwnProperty(N)&&(j=l[N],j!=null))switch(N){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:zt(o,s,N,j,l,null)}rw(o,h,v,_);return;case"option":for(W in l)l.hasOwnProperty(W)&&(h=l[W],h!=null)&&(W==="selected"?o.selected=h&&typeof h!="function"&&typeof h!="symbol":zt(o,s,W,h,l,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<ru.length;h++)vt(ru[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(de in l)if(l.hasOwnProperty(de)&&(h=l[de],h!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:zt(o,s,de,h,l,null)}return;default:if(dg(s)){for(we in l)l.hasOwnProperty(we)&&(h=l[we],h!==void 0&&Qv(o,s,we,h,l,void 0));return}}for(j in l)l.hasOwnProperty(j)&&(h=l[j],h!=null&&zt(o,s,j,h,l,null))}function Y3(o,s,l,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,N=null,j=null,W=null,de=null,we=null;for(ge in l){var xe=l[ge];if(l.hasOwnProperty(ge)&&xe!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":W=xe;default:h.hasOwnProperty(ge)||zt(o,s,ge,null,h,xe)}}for(var he in h){var ge=h[he];if(xe=l[he],h.hasOwnProperty(he)&&(ge!=null||xe!=null))switch(he){case"type":_=ge;break;case"name":v=ge;break;case"checked":de=ge;break;case"defaultChecked":we=ge;break;case"value":N=ge;break;case"defaultValue":j=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,s));break;default:ge!==xe&&zt(o,s,he,ge,h,xe)}}lg(o,N,j,W,de,we,_,v);return;case"select":ge=N=j=he=null;for(_ in l)if(W=l[_],l.hasOwnProperty(_)&&W!=null)switch(_){case"value":break;case"multiple":ge=W;default:h.hasOwnProperty(_)||zt(o,s,_,null,h,W)}for(v in h)if(_=h[v],W=l[v],h.hasOwnProperty(v)&&(_!=null||W!=null))switch(v){case"value":he=_;break;case"defaultValue":j=_;break;case"multiple":N=_;default:_!==W&&zt(o,s,v,_,h,W)}s=j,l=N,h=ge,he!=null?Wi(o,!!l,he,!1):!!h!=!!l&&(s!=null?Wi(o,!!l,s,!0):Wi(o,!!l,l?[]:"",!1));return;case"textarea":ge=he=null;for(j in l)if(v=l[j],l.hasOwnProperty(j)&&v!=null&&!h.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:zt(o,s,j,null,h,v)}for(N in h)if(v=h[N],_=l[N],h.hasOwnProperty(N)&&(v!=null||_!=null))switch(N){case"value":he=v;break;case"defaultValue":ge=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==_&&zt(o,s,N,v,h,_)}nw(o,he,ge);return;case"option":for(var Ue in l)he=l[Ue],l.hasOwnProperty(Ue)&&he!=null&&!h.hasOwnProperty(Ue)&&(Ue==="selected"?o.selected=!1:zt(o,s,Ue,null,h,he));for(W in h)he=h[W],ge=l[W],h.hasOwnProperty(W)&&he!==ge&&(he!=null||ge!=null)&&(W==="selected"?o.selected=he&&typeof he!="function"&&typeof he!="symbol":zt(o,s,W,he,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 Ze in l)he=l[Ze],l.hasOwnProperty(Ze)&&he!=null&&!h.hasOwnProperty(Ze)&&zt(o,s,Ze,null,h,he);for(de in h)if(he=h[de],ge=l[de],h.hasOwnProperty(de)&&he!==ge&&(he!=null||ge!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,s));break;default:zt(o,s,de,he,h,ge)}return;default:if(dg(s)){for(var Vt in l)he=l[Vt],l.hasOwnProperty(Vt)&&he!==void 0&&!h.hasOwnProperty(Vt)&&Qv(o,s,Vt,void 0,h,he);for(we in h)he=h[we],ge=l[we],!h.hasOwnProperty(we)||he===ge||he===void 0&&ge===void 0||Qv(o,s,we,he,h,ge);return}}for(var se in l)he=l[se],l.hasOwnProperty(se)&&he!=null&&!h.hasOwnProperty(se)&&zt(o,s,se,null,h,he);for(xe in h)he=h[xe],ge=l[xe],!h.hasOwnProperty(xe)||he===ge||he==null&&ge==null||zt(o,s,xe,he,h,ge)}function sR(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Q3(){if(typeof performance.getEntriesByType=="function"){for(var o=0,s=0,l=performance.getEntriesByType("resource"),h=0;h<l.length;h++){var v=l[h],_=v.transferSize,N=v.initiatorType,j=v.duration;if(_&&j&&sR(N)){for(N=0,j=v.responseEnd,h+=1;h<l.length;h++){var W=l[h],de=W.startTime;if(de>j)break;var we=W.transferSize,xe=W.initiatorType;we&&sR(xe)&&(W=W.responseEnd,N+=we*(W<j?1:(j-de)/(W-de)))}if(--h,s+=8*(_+N)/(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 Xv=null,Jv=null;function Nf(o){return o.nodeType===9?o:o.ownerDocument}function iR(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 cR(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 ey(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 ty=null;function X3(){var o=window.event;return o&&o.type==="popstate"?o===ty?!1:(ty=o,!0):(ty=null,!1)}var lR=typeof setTimeout=="function"?setTimeout:void 0,J3=typeof clearTimeout=="function"?clearTimeout:void 0,uR=typeof Promise=="function"?Promise:void 0,e5=typeof queueMicrotask=="function"?queueMicrotask:typeof uR<"u"?function(o){return uR.resolve(null).then(o).catch(t5)}:lR;function t5(o){setTimeout(function(){throw o})}function is(o){return o==="head"}function dR(o,s){var l=s,h=0;do{var v=l.nextSibling;if(o.removeChild(l),v&&v.nodeType===8)if(l=v.data,l==="/$"||l==="/&"){if(h===0){o.removeChild(v),Oc(s);return}h--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")h++;else if(l==="html")au(o.ownerDocument.documentElement);else if(l==="head"){l=o.ownerDocument.head,au(l);for(var _=l.firstChild;_;){var N=_.nextSibling,j=_.nodeName;_[El]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&_.rel.toLowerCase()==="stylesheet"||l.removeChild(_),_=N}}else l==="body"&&au(o.ownerDocument.body);l=v}while(l);Oc(s)}function fR(o,s){var l=o;o=0;do{var h=l.nextSibling;if(l.nodeType===1?s?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(s?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),h&&h.nodeType===8)if(l=h.data,l==="/$"){if(o===0)break;o--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||o++;l=h}while(l)}function ny(o){var s=o.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var l=s;switch(s=s.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":ny(l),ig(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}o.removeChild(l)}}function n5(o,s,l,h){for(;o.nodeType===1;){var v=l;if(o.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(h){if(!o[El])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=ao(o.nextSibling),o===null)break}return null}function r5(o,s,l){if(s==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=ao(o.nextSibling),o===null))return null;return o}function hR(o,s){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!s||(o=ao(o.nextSibling),o===null))return null;return o}function ry(o){return o.data==="$?"||o.data==="$~"}function oy(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function o5(o,s){var l=o.ownerDocument;if(o.data==="$~")o._reactRetry=s;else if(o.data!=="$?"||l.readyState!=="loading")s();else{var h=function(){s(),l.removeEventListener("DOMContentLoaded",h)};l.addEventListener("DOMContentLoaded",h),o._reactRetry=h}}function ao(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 ay=null;function pR(o){o=o.nextSibling;for(var s=0;o;){if(o.nodeType===8){var l=o.data;if(l==="/$"||l==="/&"){if(s===0)return ao(o.nextSibling);s--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||s++}o=o.nextSibling}return null}function mR(o){o=o.previousSibling;for(var s=0;o;){if(o.nodeType===8){var l=o.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(s===0)return o;s--}else l!=="/$"&&l!=="/&"||s++}o=o.previousSibling}return null}function gR(o,s,l){switch(s=Nf(l),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 au(o){for(var s=o.attributes;s.length;)o.removeAttributeNode(s[0]);ig(o)}var so=new Map,vR=new Set;function kf(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Ta=X.d;X.d={f:a5,r:s5,D:i5,C:c5,L:l5,m:u5,X:f5,S:d5,M:h5};function a5(){var o=Ta.f(),s=Ef();return o||s}function s5(o){var s=Gi(o);s!==null&&s.tag===5&&s.type==="form"?PS(s):Ta.r(o)}var Rc=typeof document>"u"?null:document;function yR(o,s,l){var h=Rc;if(h&&typeof s=="string"&&s){var v=Xr(s);v='link[rel="'+o+'"][href="'+v+'"]',typeof l=="string"&&(v+='[crossorigin="'+l+'"]'),vR.has(v)||(vR.add(v),o={rel:o,crossOrigin:l,href:s},h.querySelector(v)===null&&(s=h.createElement("link"),Bn(s,"link",o),kn(s),h.head.appendChild(s)))}}function i5(o){Ta.D(o),yR("dns-prefetch",o,null)}function c5(o,s){Ta.C(o,s),yR("preconnect",o,s)}function l5(o,s,l){Ta.L(o,s,l);var h=Rc;if(h&&o&&s){var v='link[rel="preload"][as="'+Xr(s)+'"]';s==="image"&&l&&l.imageSrcSet?(v+='[imagesrcset="'+Xr(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(v+='[imagesizes="'+Xr(l.imageSizes)+'"]')):v+='[href="'+Xr(o)+'"]';var _=v;switch(s){case"style":_=xc(o);break;case"script":_=Tc(o)}so.has(_)||(o=p({rel:"preload",href:s==="image"&&l&&l.imageSrcSet?void 0:o,as:s},l),so.set(_,o),h.querySelector(v)!==null||s==="style"&&h.querySelector(su(_))||s==="script"&&h.querySelector(iu(_))||(s=h.createElement("link"),Bn(s,"link",o),kn(s),h.head.appendChild(s)))}}function u5(o,s){Ta.m(o,s);var l=Rc;if(l&&o){var h=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+Xr(h)+'"][href="'+Xr(o)+'"]',_=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Tc(o)}if(!so.has(_)&&(o=p({rel:"modulepreload",href:o},s),so.set(_,o),l.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(iu(_)))return}h=l.createElement("link"),Bn(h,"link",o),kn(h),l.head.appendChild(h)}}}function d5(o,s,l){Ta.S(o,s,l);var h=Rc;if(h&&o){var v=Zi(h).hoistableStyles,_=xc(o);s=s||"default";var N=v.get(_);if(!N){var j={loading:0,preload:null};if(N=h.querySelector(su(_)))j.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":s},l),(l=so.get(_))&&sy(o,l);var W=N=h.createElement("link");kn(W),Bn(W,"link",o),W._p=new Promise(function(de,we){W.onload=de,W.onerror=we}),W.addEventListener("load",function(){j.loading|=1}),W.addEventListener("error",function(){j.loading|=2}),j.loading|=4,Mf(N,s,h)}N={type:"stylesheet",instance:N,count:1,state:j},v.set(_,N)}}}function f5(o,s){Ta.X(o,s);var l=Rc;if(l&&o){var h=Zi(l).hoistableScripts,v=Tc(o),_=h.get(v);_||(_=l.querySelector(iu(v)),_||(o=p({src:o,async:!0},s),(s=so.get(v))&&iy(o,s),_=l.createElement("script"),kn(_),Bn(_,"link",o),l.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function h5(o,s){Ta.M(o,s);var l=Rc;if(l&&o){var h=Zi(l).hoistableScripts,v=Tc(o),_=h.get(v);_||(_=l.querySelector(iu(v)),_||(o=p({src:o,async:!0,type:"module"},s),(s=so.get(v))&&iy(o,s),_=l.createElement("script"),kn(_),Bn(_,"link",o),l.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function _R(o,s,l,h){var v=(v=Q.current)?kf(v):null;if(!v)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(s=xc(l.href),l=Zi(v).hoistableStyles,h=l.get(s),h||(h={type:"style",instance:null,count:0,state:null},l.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){o=xc(l.href);var _=Zi(v).hoistableStyles,N=_.get(o);if(N||(v=v.ownerDocument||v,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(o,N),(_=v.querySelector(su(o)))&&!_._p&&(N.instance=_,N.state.loading=5),so.has(o)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},so.set(o,l),_||p5(v,o,l,N.state))),s&&h===null)throw Error(r(528,""));return N}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=l.async,l=l.src,typeof l=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Tc(l),l=Zi(v).hoistableScripts,h=l.get(s),h||(h={type:"script",instance:null,count:0,state:null},l.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function xc(o){return'href="'+Xr(o)+'"'}function su(o){return'link[rel="stylesheet"]['+o+"]"}function bR(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function p5(o,s,l,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}),Bn(s,"link",l),kn(s),o.head.appendChild(s))}function Tc(o){return'[src="'+Xr(o)+'"]'}function iu(o){return"script[async]"+o}function wR(o,s,l){if(s.count++,s.instance===null)switch(s.type){case"style":var h=o.querySelector('style[data-href~="'+Xr(l.href)+'"]');if(h)return s.instance=h,kn(h),h;var v=p({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return h=(o.ownerDocument||o).createElement("style"),kn(h),Bn(h,"style",v),Mf(h,l.precedence,o),s.instance=h;case"stylesheet":v=xc(l.href);var _=o.querySelector(su(v));if(_)return s.state.loading|=4,s.instance=_,kn(_),_;h=bR(l),(v=so.get(v))&&sy(h,v),_=(o.ownerDocument||o).createElement("link"),kn(_);var N=_;return N._p=new Promise(function(j,W){N.onload=j,N.onerror=W}),Bn(_,"link",h),s.state.loading|=4,Mf(_,l.precedence,o),s.instance=_;case"script":return _=Tc(l.src),(v=o.querySelector(iu(_)))?(s.instance=v,kn(v),v):(h=l,(v=so.get(_))&&(h=p({},l),iy(h,v)),o=o.ownerDocument||o,v=o.createElement("script"),kn(v),Bn(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,Mf(h,l.precedence,o));return s.instance}function Mf(o,s,l){for(var h=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,_=v,N=0;N<h.length;N++){var j=h[N];if(j.dataset.precedence===s)_=j;else if(_!==v)break}_?_.parentNode.insertBefore(o,_.nextSibling):(s=l.nodeType===9?l.head:l,s.insertBefore(o,s.firstChild))}function sy(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.title==null&&(o.title=s.title)}function iy(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.integrity==null&&(o.integrity=s.integrity)}var Pf=null;function SR(o,s,l){if(Pf===null){var h=new Map,v=Pf=new Map;v.set(l,h)}else v=Pf,h=v.get(l),h||(h=new Map,v.set(l,h));if(h.has(o))return h;for(h.set(o,null),l=l.getElementsByTagName(o),v=0;v<l.length;v++){var _=l[v];if(!(_[El]||_[zn]||o==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var N=_.getAttribute(s)||"";N=o+N;var j=h.get(N);j?j.push(_):h.set(N,[_])}}return h}function ER(o,s,l){o=o.ownerDocument||o,o.head.insertBefore(l,s==="title"?o.querySelector("head > title"):null)}function m5(o,s,l){if(l===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 RR(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function g5(o,s,l,h){if(l.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var v=xc(h.href),_=s.querySelector(su(v));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(o.count++,o=Df.bind(o),s.then(o,o)),l.state.loading|=4,l.instance=_,kn(_);return}_=s.ownerDocument||s,h=bR(h),(v=so.get(v))&&sy(h,v),_=_.createElement("link"),kn(_);var N=_;N._p=new Promise(function(j,W){N.onload=j,N.onerror=W}),Bn(_,"link",h),l.instance=_}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(l,s),(s=l.state.preload)&&(l.state.loading&3)===0&&(o.count++,l=Df.bind(o),s.addEventListener("load",l),s.addEventListener("error",l))}}var cy=0;function v5(o,s){return o.stylesheets&&o.count===0&&jf(o,o.stylesheets),0<o.count||0<o.imgCount?function(l){var h=setTimeout(function(){if(o.stylesheets&&jf(o,o.stylesheets),o.unsuspend){var _=o.unsuspend;o.unsuspend=null,_()}},6e4+s);0<o.imgBytes&&cy===0&&(cy=62500*Q3());var v=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&jf(o,o.stylesheets),o.unsuspend)){var _=o.unsuspend;o.unsuspend=null,_()}},(o.imgBytes>cy?50:800)+s);return o.unsuspend=l,function(){o.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function Df(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jf(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var Lf=null;function jf(o,s){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Lf=new Map,s.forEach(y5,o),Lf=null,Df.call(o))}function y5(o,s){if(!(s.state.loading&4)){var l=Lf.get(o);if(l)var h=l.get(null);else{l=new Map,Lf.set(o,l);for(var v=o.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<v.length;_++){var N=v[_];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(l.set(N.dataset.precedence,N),h=N)}h&&l.set(null,h)}v=s.instance,N=v.getAttribute("data-precedence"),_=l.get(N)||h,_===h&&l.set(null,v),l.set(N,v),this.count++,h=Df.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 cu={$$typeof:T,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function _5(o,s,l,h,v,_,N,j,W){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=Fa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fa(0),this.hiddenUpdates=Fa(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=_,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function xR(o,s,l,h,v,_,N,j,W,de,we,xe){return o=new _5(o,s,l,N,W,de,we,xe,j),s=1,_===!0&&(s|=24),_=Mr(3,null,null,s),o.current=_,_.stateNode=o,s=Vg(),s.refCount++,o.pooledCache=s,s.refCount++,_.memoizedState={element:h,isDehydrated:l,cache:s},Hg(_),o}function TR(o){return o?(o=rc,o):rc}function OR(o,s,l,h,v,_){v=TR(v),h.context===null?h.context=v:h.pendingContext=v,h=Ya(s),h.payload={element:l},_=_===void 0?null:_,_!==null&&(h.callback=_),l=Qa(o,h,s),l!==null&&(Er(l,o,s),zl(l,o,s))}function CR(o,s){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var l=o.retryLane;o.retryLane=l!==0&&l<s?l:s}}function ly(o,s){CR(o,s),(o=o.alternate)&&CR(o,s)}function AR(o){if(o.tag===13||o.tag===31){var s=Js(o,67108864);s!==null&&Er(s,o,67108864),ly(o,67108864)}}function IR(o){if(o.tag===13||o.tag===31){var s=$r();s=qi(s);var l=Js(o,s);l!==null&&Er(l,o,s),ly(o,s)}}var $f=!0;function b5(o,s,l,h){var v=F.T;F.T=null;var _=X.p;try{X.p=2,uy(o,s,l,h)}finally{X.p=_,F.T=v}}function w5(o,s,l,h){var v=F.T;F.T=null;var _=X.p;try{X.p=8,uy(o,s,l,h)}finally{X.p=_,F.T=v}}function uy(o,s,l,h){if($f){var v=dy(h);if(v===null)Yv(o,s,h,Uf,l),kR(o,h);else if(E5(v,o,s,l,h))h.stopPropagation();else if(kR(o,h),s&4&&-1<S5.indexOf(o)){for(;v!==null;){var _=Gi(v);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var N=Fo(_.pendingLanes);if(N!==0){var j=_;for(j.pendingLanes|=2,j.entangledLanes|=2;N;){var W=1<<31-In(N);j.entanglements[1]|=W,N&=~W}Go(_),(It&6)===0&&(wf=Se()+500,nu(0))}}break;case 31:case 13:j=Js(_,2),j!==null&&Er(j,_,2),Ef(),ly(_,2)}if(_=dy(h),_===null&&Yv(o,s,h,Uf,l),_===v)break;v=_}v!==null&&h.stopPropagation()}else Yv(o,s,h,null,l)}}function dy(o){return o=hg(o),fy(o)}var Uf=null;function fy(o){if(Uf=null,o=Hi(o),o!==null){var s=i(o);if(s===null)o=null;else{var l=s.tag;if(l===13){if(o=c(s),o!==null)return o;o=null}else if(l===31){if(o=u(s),o!==null)return o;o=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;o=null}else s!==o&&(o=null)}}return Uf=o,null}function NR(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(Te()){case Re:return 2;case ke:return 8;case rt:case st:return 32;case kt:return 268435456;default:return 32}default:return 32}}var hy=!1,cs=null,ls=null,us=null,lu=new Map,uu=new Map,ds=[],S5="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 kR(o,s){switch(o){case"focusin":case"focusout":cs=null;break;case"dragenter":case"dragleave":ls=null;break;case"mouseover":case"mouseout":us=null;break;case"pointerover":case"pointerout":lu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":uu.delete(s.pointerId)}}function du(o,s,l,h,v,_){return o===null||o.nativeEvent!==_?(o={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:_,targetContainers:[v]},s!==null&&(s=Gi(s),s!==null&&AR(s)),o):(o.eventSystemFlags|=h,s=o.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),o)}function E5(o,s,l,h,v){switch(s){case"focusin":return cs=du(cs,o,s,l,h,v),!0;case"dragenter":return ls=du(ls,o,s,l,h,v),!0;case"mouseover":return us=du(us,o,s,l,h,v),!0;case"pointerover":var _=v.pointerId;return lu.set(_,du(lu.get(_)||null,o,s,l,h,v)),!0;case"gotpointercapture":return _=v.pointerId,uu.set(_,du(uu.get(_)||null,o,s,l,h,v)),!0}return!1}function MR(o){var s=Hi(o.target);if(s!==null){var l=i(s);if(l!==null){if(s=l.tag,s===13){if(s=c(l),s!==null){o.blockedOn=s,Z1(o.priority,function(){IR(l)});return}}else if(s===31){if(s=u(l),s!==null){o.blockedOn=s,Z1(o.priority,function(){IR(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){o.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}o.blockedOn=null}function zf(o){if(o.blockedOn!==null)return!1;for(var s=o.targetContainers;0<s.length;){var l=dy(o.nativeEvent);if(l===null){l=o.nativeEvent;var h=new l.constructor(l.type,l);fg=h,l.target.dispatchEvent(h),fg=null}else return s=Gi(l),s!==null&&AR(s),o.blockedOn=l,!1;s.shift()}return!0}function PR(o,s,l){zf(o)&&l.delete(s)}function R5(){hy=!1,cs!==null&&zf(cs)&&(cs=null),ls!==null&&zf(ls)&&(ls=null),us!==null&&zf(us)&&(us=null),lu.forEach(PR),uu.forEach(PR)}function Vf(o,s){o.blockedOn===s&&(o.blockedOn=null,hy||(hy=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,R5)))}var Ff=null;function DR(o){Ff!==o&&(Ff=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ff===o&&(Ff=null);for(var s=0;s<o.length;s+=3){var l=o[s],h=o[s+1],v=o[s+2];if(typeof h!="function"){if(fy(h||l)===null)continue;break}var _=Gi(l);_!==null&&(o.splice(s,3),s-=3,dv(_,{pending:!0,data:v,method:l.method,action:h},h,v))}}))}function Oc(o){function s(W){return Vf(W,o)}cs!==null&&Vf(cs,o),ls!==null&&Vf(ls,o),us!==null&&Vf(us,o),lu.forEach(s),uu.forEach(s);for(var l=0;l<ds.length;l++){var h=ds[l];h.blockedOn===o&&(h.blockedOn=null)}for(;0<ds.length&&(l=ds[0],l.blockedOn===null);)MR(l),l.blockedOn===null&&ds.shift();if(l=(o.ownerDocument||o).$$reactFormReplay,l!=null)for(h=0;h<l.length;h+=3){var v=l[h],_=l[h+1],N=v[vr]||null;if(typeof _=="function")N||DR(l);else if(N){var j=null;if(_&&_.hasAttribute("formAction")){if(v=_,N=_[vr]||null)j=N.formAction;else if(fy(v)!==null)continue}else j=N.action;typeof j=="function"?l[h+1]=j:(l.splice(h,3),h-=3),DR(l)}}}function LR(){function o(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(N){return v=N})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),h||setTimeout(l,20)}function l(){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(l,100),function(){h=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function py(o){this._internalRoot=o}qf.prototype.render=py.prototype.render=function(o){var s=this._internalRoot;if(s===null)throw Error(r(409));var l=s.current,h=$r();OR(l,h,o,s,null,null)},qf.prototype.unmount=py.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var s=o.containerInfo;OR(o.current,2,null,o,null,null),Ef(),s[Bi]=null}};function qf(o){this._internalRoot=o}qf.prototype.unstable_scheduleHydration=function(o){if(o){var s=ag();o={blockedOn:null,target:o,priority:s};for(var l=0;l<ds.length&&s!==0&&s<ds[l].priority;l++);ds.splice(l,0,o),l===0&&MR(o)}};var jR=t.version;if(jR!=="19.2.4")throw Error(r(527,jR,"19.2.4"));X.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 x5={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bf.isDisabled&&Bf.supportsFiber)try{$n=Bf.inject(x5),en=Bf}catch{}}return hu.createRoot=function(o,s){if(!a(o))throw Error(r(299));var l=!1,h="",v=BS,_=HS,N=GS;return s!=null&&(s.unstable_strictMode===!0&&(l=!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&&(N=s.onRecoverableError)),s=xR(o,1,!1,null,null,l,h,null,v,_,N,LR),o[Bi]=s.current,Wv(o),new py(s)},hu.hydrateRoot=function(o,s,l){if(!a(o))throw Error(r(299));var h=!1,v="",_=BS,N=HS,j=GS,W=null;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onUncaughtError!==void 0&&(_=l.onUncaughtError),l.onCaughtError!==void 0&&(N=l.onCaughtError),l.onRecoverableError!==void 0&&(j=l.onRecoverableError),l.formState!==void 0&&(W=l.formState)),s=xR(o,1,!0,s,l??null,h,v,W,_,N,j,LR),s.context=TR(null),l=s.current,h=$r(),h=qi(h),v=Ya(h),v.callback=null,Qa(l,v,h),l=h,s.current.lanes=l,tn(s,l),Go(s),o[Bi]=s.current,Wv(o),new qf(s)},hu.version="19.2.4",hu}var KR;function j5(){if(KR)return gy.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(),gy.exports=L5(),gy.exports}var $5=j5(),A=Us();const le=$a(A),ob=O5({__proto__:null,default:le},[A]);var wy={exports:{}},Sy={};var WR;function U5(){if(WR)return Sy;WR=1;var e=Us().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Sy.c=function(t){return e.H.useMemoCache(t)},Sy}var YR;function z5(){return YR||(YR=1,wy.exports=U5()),wy.exports}var gl=z5(),fd=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(){}},V5={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},F5=class{#e=V5;#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)}},wi=new F5;function q5(e){setTimeout(e,0)}var Ai=typeof window>"u"||"Deno"in globalThis;function Or(){}function B5(e,t){return typeof e=="function"?e(t):e}function V0(e){return typeof e=="number"&&e>=0&&e!==1/0}function PC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Os(e,t){return typeof e=="function"?e(t):e}function uo(e,t){return typeof e=="function"?e(t):e}function QR(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:c,stale:u}=e;if(c){if(r){if(t.queryHash!==ab(c,t.options))return!1}else if(!Ku(t.queryKey,c))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 XR(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 ab(e,t){return(t?.queryKeyHashFn||Zu)(e)}function Zu(e){return JSON.stringify(e,(t,n)=>q0(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 H5=Object.prototype.hasOwnProperty;function DC(e,t){if(e===t)return e;const n=JR(e)&&JR(t);if(!n&&!(q0(e)&&q0(t)))return t;const a=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),c=i.length,u=n?new Array(c):{};let d=0;for(let f=0;f<c;f++){const m=n?f:i[f],p=e[m],g=t[m];if(p===g){u[m]=p,(n?f<a:H5.call(e,m))&&d++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){u[m]=g;continue}const y=DC(p,g);u[m]=y,y===p&&d++}return a===c&&d===a?e:u}function F0(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 JR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function q0(e){if(!ex(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!ex(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ex(e){return Object.prototype.toString.call(e)==="[object Object]"}function G5(e){return new Promise(t=>{wi.setTimeout(t,e)})}function B0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?DC(e,t):t}function Kre(e){return e}function Z5(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function K5(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var sb=Symbol();function LC(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===sb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function W5(e,t){return typeof e=="function"?e(...t):!!e}var Y5=class extends fd{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Ai&&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"}},ib=new Y5;function H0(){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 Q5=q5;function X5(){let e=[],t=0,n=u=>{u()},r=u=>{u()},a=Q5;const i=u=>{t?e.push(u):a(()=>{n(u)})},c=()=>{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||c()}return d},batchCalls:u=>(...d)=>{i(()=>{u(...d)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{a=u}}}var Zn=X5(),J5=class extends fd{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Ai&&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}},_p=new J5;function eD(e){return Math.min(1e3*2**e,3e4)}function jC(e){return(e??"online")==="online"?_p.isOnline():!0}var G0=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function $C(e){let t=!1,n=0,r;const a=H0(),i=()=>a.status!=="pending",c=S=>{if(!i()){const b=new G0(S);g(b),e.onCancel?.(b)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>ib.isFocused()&&(e.networkMode==="always"||_p.isOnline())&&e.canRun(),m=()=>jC(e.networkMode)&&e.canRun(),p=S=>{i()||(r?.(),a.resolve(S))},g=S=>{i()||(r?.(),a.reject(S))},y=()=>new Promise(S=>{r=b=>{(i()||f())&&S(b)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),w=()=>{if(i())return;let S;const b=n===0?e.initialPromise:void 0;try{S=b??e.fn()}catch(R){S=Promise.reject(R)}Promise.resolve(S).then(p).catch(R=>{if(i())return;const E=e.retry??(Ai?0:3),T=e.retryDelay??eD,C=typeof T=="function"?T(n,R):T,O=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,R);if(t||!O){g(R);return}n++,e.onFail?.(n,R),G5(C).then(()=>f()?void 0:y()).then(()=>{t?g(R):w()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(r?.(),a),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?w():y().then(w),a)}}var UC=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),V0(this.gcTime)&&(this.#e=wi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ai?1/0:300*1e3))}clearGcTimeout(){this.#e&&(wi.clearTimeout(this.#e),this.#e=void 0)}},tD=class extends UC{#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=nx(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=nx(this.options);t.data!==void 0&&(this.setState(tx(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=B0(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(Or).catch(Or):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>uo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Os(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:!PC(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=LC(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)},c=(()=>{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(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=$C({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:u=>{u instanceof G0&&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:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.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 G0){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,...zC(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...tx(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"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Zn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function zC(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:jC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function tx(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function nx(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 nD=class extends fd{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#s=H0(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#s;#a;#m;#f;#h;#l;#u;#c;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),rx(this.#t,this.options)?this.#d():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Z0(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Z0(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 uo(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&&!F0(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&ox(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||uo(this.options.enabled,this.#t)!==uo(t.enabled,this.#t)||Os(this.options.staleTime,this.#t)!==Os(t.staleTime,this.#t))&&this.#g();const a=this.#v();r&&(this.#t!==n||uo(this.options.enabled,this.#t)!==uo(t.enabled,this.#t)||a!==this.#c)&&this.#y(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return oD(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(Or)),t}#g(){this.#b();const e=Os(this.options.staleTime,this.#t);if(Ai||this.#o.isStale||!V0(e))return;const n=PC(this.#o.dataUpdatedAt,e)+1;this.#l=wi.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.#c=e,!(Ai||uo(this.options.enabled,this.#t)===!1||!V0(this.#c)||this.#c===0)&&(this.#u=wi.setInterval(()=>{(this.options.refetchIntervalInBackground||ib.isFocused())&&this.#d()},this.#c))}#_(){this.#g(),this.#y(this.#v())}#b(){this.#l&&(wi.clearTimeout(this.#l),this.#l=void 0)}#w(){this.#u&&(wi.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,a=this.#o,i=this.#r,c=this.#i,d=e!==n?e.state:this.#n,{state:f}=e;let m={...f},p=!1,g;if(t._optimisticResults){const D=this.hasListeners(),z=!D&&rx(e,t),Y=D&&ox(e,n,t,r);(z||Y)&&(m={...m,...zC(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:w,status:S}=m;g=m.data;let b=!1;if(t.placeholderData!==void 0&&g===void 0&&S==="pending"){let D;a?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(D=a.data,b=!0):D=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,D!==void 0&&(S="success",g=B0(a?.data,D,t),p=!0)}if(t.select&&g!==void 0&&!b)if(a&&g===i?.data&&t.select===this.#m)g=this.#f;else try{this.#m=t.select,g=t.select(g),g=B0(a?.data,g,t),this.#f=g,this.#a=null}catch(D){this.#a=D}this.#a&&(y=this.#a,g=this.#f,w=Date.now(),S="error");const R=m.fetchStatus==="fetching",E=S==="pending",T=S==="error",C=E&&R,O=g!==void 0,k={status:S,fetchStatus:m.fetchStatus,isPending:E,isSuccess:S==="success",isError:T,isInitialLoading:C,isLoading:C,data:g,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:w,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&&!O,isPaused:m.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:T&&O,isStale:cb(e,t),refetch:this.refetch,promise:this.#s,isEnabled:uo(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const D=V=>{k.status==="error"?V.reject(k.error):k.data!==void 0&&V.resolve(k.data)},z=()=>{const V=this.#s=k.promise=H0();D(V)},Y=this.#s;switch(Y.status){case"pending":e.queryHash===n.queryHash&&D(Y);break;case"fulfilled":(k.status==="error"||k.data!==Y.value)&&z();break;case"rejected":(k.status!=="error"||k.error!==Y.reason)&&z();break}}return k}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),F0(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(c=>{const u=c;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){Zn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function rD(e,t){return uo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function rx(e,t){return rD(e,t)||e.state.data!==void 0&&Z0(e,t,t.refetchOnMount)}function Z0(e,t,n){if(uo(t.enabled,e)!==!1&&Os(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&cb(e,t)}return!1}function ox(e,t,n,r){return(e!==t||uo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&cb(e,n)}function cb(e,t){return uo(t.enabled,e)!==!1&&e.isStaleByTime(Os(t.staleTime,e))}function oD(e,t){return!F0(e.getCurrentResult(),t)}function ax(e){return{onFetch:(t,n)=>{const r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let m=!1;const p=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=LC(t.options,t.fetchOptions),y=async(w,S,b)=>{if(m)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const E=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:S,direction:b?"backward":"forward",meta:t.options.meta};return p(I),I})(),T=await g(E),{maxPages:C}=t.options,O=b?K5:Z5;return{pages:O(w.pages,T,C),pageParams:O(w.pageParams,S,C)}};if(a&&i.length){const w=a==="backward",S=w?VC:K0,b={pages:i,pageParams:c},R=S(r,b);u=await y(b,R,w)}else{const w=e??i.length;do{const S=d===0?c[0]??r.initialPageParam:K0(r,u);if(d>0&&S==null)break;u=await y(u,S),d++}while(d<w)}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 K0(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 VC(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Wre(e,t){return t?K0(e,t)!=null:!1}function Yre(e,t){return!t||!e.getPreviousPageParam?!1:VC(e,t)!=null}var aD=class extends UC{#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||sD(),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=$C({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,c)=>{this.#r({type:"failed",failureCount:i,error:c})},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 c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#r({type:"pending",context:c,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{throw await this.#n.config.onError?.(i,e,this.state.context,this,n),await this.options.onError?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,i,e,this.state.context,n),i}finally{this.#r({type:"error",error: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),Zn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function sD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var iD=class extends fd{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 aD({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=Hf(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=Hf(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=Hf(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=Hf(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Zn.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=>XR(t,n))}findAll(e={}){return this.getAll().filter(t=>XR(e,t))}notify(e){Zn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Zn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Or))))}};function Hf(e){return e.options.scope?.id}var cD=class extends fd{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,a=t.queryHash??ab(r,t);let i=this.get(a);return i||(i=new tD({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(){Zn.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=>QR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>QR(e,n)):t}notify(e){Zn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Zn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Zn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},lD=class{#e;#t;#n;#o;#r;#i;#s;#a;constructor(e={}){this.#e=e.queryCache||new cD,this.#t=e.mutationCache||new iD,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=ib.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=_p.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(Os(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,c=B5(t,i);if(c!==void 0)return this.#e.build(this,r).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return Zn.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;Zn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Zn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Zn.batch(()=>this.#e.findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Or).catch(Or)}invalidateQueries(e,t={}){return Zn.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=Zn.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(Or)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Or)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Os(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Or).catch(Or)}fetchInfiniteQuery(e){return e.behavior=ax(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Or).catch(Or)}ensureInfiniteQueryData(e){return e.behavior=ax(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _p.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=ab(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===sb&&(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()}},FC=A.createContext(void 0),uD=e=>{const t=A.useContext(FC);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},dD=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(FC.Provider,{value:e,children:t})),qC=A.createContext(!1),fD=()=>A.useContext(qC);qC.Provider;function hD(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var pD=A.createContext(hD()),mD=()=>A.useContext(pD),gD=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},vD=e=>{A.useEffect(()=>{e.clearReset()},[e])},yD=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||W5(n,[e.error,r])),_D=(e,t)=>t.state.data===void 0,bD=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))}},wD=(e,t)=>e.isLoading&&e.isFetching&&!t,SD=(e,t)=>e?.suspense&&t.isPending,sx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ED(e,t,n){const r=fD(),a=mD(),i=uD(n),c=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(c),c._optimisticResults=r?"isRestoring":"optimistic",bD(c),gD(c,a),vD(a);const u=!i.getQueryCache().get(c.queryHash),[d]=A.useState(()=>new t(i,c)),f=d.getOptimisticResult(c),m=!r&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(p=>{const g=m?d.subscribe(Zn.batchCalls(p)):Or;return d.updateResult(),g},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),A.useEffect(()=>{d.setOptions(c)},[c,d]),SD(c,f))throw sx(c,d,a);if(yD({result:f,errorResetBoundary:a,throwOnError:c.throwOnError,query:i.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw f.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(c,f),c.experimental_prefetchInRender&&!Ai&&wD(f,r)&&(u?sx(c,d,a):i.getQueryCache().get(c.queryHash)?.promise)?.catch(Or).finally(()=>{d.updateResult()}),c.notifyOnChangeProps?f:d.trackResult(f)}function BC(e,t){return ED({...e,enabled:!0,suspense:!0,throwOnError:_D,placeholderData:void 0},nD,t)}const HC={publicConfig:()=>["publicConfig"],authConfig:()=>["authConfig"],session:()=>["session"],threads:e=>["threads",e],taskThreads:e=>["task-threads",e],virtualMcpThreads:(e,t)=>["threads",e,"virtual-mcp",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],allowedModels:e=>[e,"allowed-models"],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,a)=>[e,t,n,"collection",r,a],collectionList:(e,t,n,r,a)=>[e,t,n,"collection",r,"list",a],collectionListInfinite:(e,t,n,r,a)=>[e,t,n,"collection",r,"list-infinite",a],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],monitoringDashboards:e=>["monitoring","dashboards",e],monitoringDashboardDetails:(e,t)=>["monitoring","dashboard",e,t],monitoringDashboardQuery:(e,t,n,r,a)=>["monitoringDashboardQuery",e,t,n,r,a??""],virtualMcpPrompts:(e,t)=>["virtual-mcp",t,e??"default","prompts"],virtualMcpResources:(e,t)=>["virtual-mcp",t,e??"default","resources"],suggestionItems:(e,t,n)=>[...e,t,n],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"],user:e=>["user",e],storeReadmeUrl:e=>["store-readme-url",e],remoteMcpTools:e=>["remote-mcp-tools",e],tags:e=>[e,"tags"],memberTags:(e,t)=>[e,"member-tags",t],projects:e=>["projects",e],project:(e,t)=>["project",e,t],projectById:e=>["project","byId",e],projectPluginConfigs:e=>["project-plugin-configs",e],projectPluginConfig:(e,t)=>["project-plugin-config",e,t]},GC=A.createContext(void 0);async function RD(){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 xD(e){const t=gl.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:HC.authConfig(),queryFn:RD,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=BC(r);let i;return t[1]!==a||t[2]!==n?(i=x.jsx(GC.Provider,{value:a,children:n}),t[1]=a,t[2]=n,t[3]=i):i=t[3],i}function Qre(){const e=A.useContext(GC);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const Wc=new WeakMap,ap=new WeakMap,bp={current:[]};let Ey=!1,Lu=0;const Tu=new Set,Gf=new Map;function ZC(e){const t=Array.from(e).sort((n,r)=>n instanceof Yc&&n.options.deps.includes(r)?1:r instanceof Yc&&r.options.deps.includes(n)?-1:0);for(const n of t){if(bp.current.includes(n))continue;bp.current.push(n),n.recompute();const r=ap.get(n);if(r)for(const a of r){const i=Wc.get(a);i&&ZC(i)}}}function TD(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function OD(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function KC(e){if(Lu>0&&!Gf.has(e)&&Gf.set(e,e.prevState),Tu.add(e),!(Lu>0)&&!Ey)try{for(Ey=!0;Tu.size>0;){const t=Array.from(Tu);Tu.clear();for(const n of t){const r=Gf.get(n)??n.prevState;n.prevState=r,TD(n)}for(const n of t){const r=Wc.get(n);r&&(bp.current.push(n),ZC(r))}for(const n of t){const r=Wc.get(n);if(r)for(const a of r)OD(a)}}}finally{Ey=!1,bp.current=[],Gf.clear()}}function ju(e){Lu++;try{e()}finally{if(Lu--,Lu===0){const t=Tu.values().next().value;t&&KC(t)}}}function CD(e){return typeof e=="function"}class W0{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var a,i;this.listeners.add(r);const c=(i=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:i.call(a,r,this);return()=>{this.listeners.delete(r),c?.()}},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):CD(t)?this.state=t(this.prevState):this.state=t,(a=(r=this.options)==null?void 0:r.onUpdate)==null||a.call(r),KC(this)}}class Yc{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,r=new Array(n),a=new Array(n);for(let i=0;i<n;i++){const c=this.options.deps[i];r[i]=c.prevState,a[i]=c.state}return this.lastSeenDepValues=a,{prevDepVals:r,currDepVals:a,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,r;this.prevState=this.state;const a=this.getDepVals();this.state=this.options.fn(a),(r=(n=this.options).onUpdate)==null||r.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const i of this.options.deps)i instanceof Yc&&i.checkIfRecalculationNeededDeeply();let n=!1;const r=this.lastSeenDepValues,{currDepVals:a}=this.getDepVals();for(let i=0;i<a.length;i++)if(a[i]!==r[i]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var r,a;this.listeners.add(n);const i=(a=(r=this.options).onSubscribe)==null?void 0:a.call(r,n,this);return()=>{this.listeners.delete(n),i?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof Yc)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof W0){let r=Wc.get(n);r||(r=new Set,Wc.set(n,r)),r.add(this);let a=ap.get(this);a||(a=new Set,ap.set(this,a)),a.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof Yc)this.unregisterFromGraph(n.options.deps);else if(n instanceof W0){const r=Wc.get(n);r&&r.delete(this);const a=ap.get(this);a&&a.delete(n)}}}const Cs="__TSR_index",ix="popstate",cx="beforeunload";function AD(e){let t=e.getLocation();const n=new Set,r=c=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:c}))},a=c=>{e.notifyOnIndexChange??!0?r(c):t=e.getLocation()},i=async({task:c,navigateOpts:u,...d})=>{if(u?.ignoreBlocker??!1){c();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=wp(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:y,action:d.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:c=>(n.add(c),()=>{n.delete(c)}),push:(c,u,d)=>{const f=t.state[Cs];u=lx(f+1,u),i({task:()=>{e.pushState(c,u),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:c,state:u})},replace:(c,u,d)=>{const f=t.state[Cs];u=lx(f,u),i({task:()=>{e.replaceState(c,u),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:c,state:u})},go:(c,u)=>{i({task:()=>{e.go(c),a({type:"GO",index:c})},navigateOpts:u,type:"GO"})},back:c=>{i({task:()=>{e.back(c?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{i({task:()=>{e.forward(c?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[Cs]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,c]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function lx(e,t){t||(t={});const n=lb();return{...t,key:n,__TSR_key:n,[Cs]:e}}function ID(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let a=[];const i=()=>a,c=D=>a=D,u=(D=>D),d=(()=>wp(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const D=lb();t.history.replaceState({[Cs]:0,key:D,__TSR_key:D},"")}let f=d(),m,p=!1,g=!1,y=!1,w=!1;const S=()=>f;let b,R;const E=()=>{b&&(k._ignoreSubscribers=!0,(b.isPush?t.history.pushState:t.history.replaceState)(b.state,"",b.href),k._ignoreSubscribers=!1,b=void 0,R=void 0,m=void 0)},T=(D,z,Y)=>{const V=u(z);R||(m=f),f=wp(z,Y),b={href:V,state:Y,isPush:b?.isPush||D==="push"},R||(R=Promise.resolve().then(()=>E()))},C=D=>{f=d(),k.notify({type:D})},O=async()=>{if(g){g=!1;return}const D=d(),z=D.state[Cs]-f.state[Cs],Y=z===1,V=z===-1,Z=!Y&&!V||p;p=!1;const U=Z?"GO":V?"BACK":"FORWARD",J=Z?{type:"GO",index:z}:{type:V?"BACK":"FORWARD"};if(y)y=!1;else{const ie=i();if(typeof document<"u"&&ie.length){for(const F of ie)if(await F.blockerFn({currentLocation:f,nextLocation:D,action:U})){g=!0,t.history.go(1),k.notify(J);return}}}f=d(),k.notify(J)},I=D=>{if(w){w=!1;return}let z=!1;const Y=i();if(typeof document<"u"&&Y.length)for(const V of Y){const Z=V.enableBeforeUnload??!0;if(Z===!0){z=!0;break}if(typeof Z=="function"&&Z()===!0){z=!0;break}}if(z)return D.preventDefault(),D.returnValue=""},k=AD({getLocation:S,getLength:()=>t.history.length,pushState:(D,z)=>T("push",D,z),replaceState:(D,z)=>T("replace",D,z),back:D=>(D&&(y=!0),w=!0,t.history.back()),forward:D=>{D&&(y=!0),w=!0,t.history.forward()},go:D=>{p=!0,t.history.go(D)},createHref:D=>u(D),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(cx,I,{capture:!0}),t.removeEventListener(ix,O)},onBlocked:()=>{m&&f!==m&&(f=m)},getBlockers:i,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(cx,I,{capture:!0}),t.addEventListener(ix,O),t.history.pushState=function(...D){const z=n.apply(t.history,D);return k._ignoreSubscribers||C("PUSH"),z},t.history.replaceState=function(...D){const z=r.apply(t.history,D);return k._ignoreSubscribers||C("REPLACE"),z},k}function wp(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),a=lb();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||{[Cs]:0,key:a,__TSR_key:a}}}function lb(){return(Math.random()+1).toString(36).substring(7)}function Sp(e){return e[e.length-1]}function ND(e){return typeof e=="function"}function xi(e,t){return ND(e)?e(t):e}const kD=Object.prototype.hasOwnProperty;function lo(e,t){if(e===t)return e;const n=t,r=fx(e)&&fx(n);if(!r&&!(Ep(e)&&Ep(n)))return n;const a=r?e:ux(e);if(!a)return n;const i=r?n:ux(n);if(!i)return n;const c=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<c:kD.call(e,p))&&f++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){d[p]=y;continue}const w=lo(g,y);d[p]=w,w===g&&f++}return c===u&&f===c?e:d}function ux(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 Ep(e){if(!dx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!dx(n)||!n.hasOwnProperty("isPrototypeOf"))}function dx(e){return Object.prototype.toString.call(e)==="[object Object]"}function fx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ti(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(!Ti(e[r],t[r],n))return!1;return!0}if(Ep(e)&&Ep(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const c in t)if((!r||t[c]!==void 0)&&!Ti(e[c],t[c],n))return!1;return!0}let a=0;if(!r)a=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&a++;let i=0;for(const c in t)if((!r||t[c]!==void 0)&&(i++,i>a||!Ti(e[c],t[c],n)))return!1;return a===i}return!1}function ol(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 MD(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 As(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function hx(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function px(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,a="",i;for(;(i=n.exec(e))!==null;)a+=hx(e.slice(r,i.index))+i[0],r=n.lastIndex;return a+hx(r?e.slice(r):e)}var PD="Invariant failed";function Pa(e,t){if(!e)throw new Error(PD)}function Rp(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 c=t.get(i);if(c)return a(c),c.value},set(i,c){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=c,a(u);else{const d={key:i,value:c,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 al=0,Ii=1,Ni=2,Wu=3,DD=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,LD=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,jD=/^([^{]*)\{\$\}([^}]*)$/;function ub(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]=al,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]=Ni,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(i.charCodeAt(0)===36)return n[0]=Ii,n[1]=t,n[2]=t+1,n[3]=a,n[4]=a,n[5]=a,n;const c=i.match(jD);if(c){const m=c[1].length;return n[0]=Ni,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(LD);if(u){const f=u[1],m=u[2],p=u[3],g=f.length;return n[0]=Wu,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(DD);if(d){const f=d[1],m=d[2],p=d[3],g=f.length;return n[0]=Ii,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]=al,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}function vm(e,t,n,r,a,i,c){c?.(n);let u=r;{const d=n.fullPath??n.from,f=d.length,m=n.options?.caseSensitive??e;for(;u<f;){const p=ub(d,u,t);let g;const y=u,w=p[5];switch(u=w+1,i++,p[0]){case al:{const b=d.substring(p[2],p[3]);if(m){const R=a.static?.get(b);if(R)g=R;else{a.static??=new Map;const E=Yu(n.fullPath??n.from);E.parent=a,E.depth=i,g=E,a.static.set(b,E)}}else{const R=b.toLowerCase(),E=a.staticInsensitive?.get(R);if(E)g=E;else{a.staticInsensitive??=new Map;const T=Yu(n.fullPath??n.from);T.parent=a,T.depth=i,g=T,a.staticInsensitive.set(R,T)}}break}case Ii:{const b=d.substring(y,p[1]),R=d.substring(p[4],w),E=m&&!!(b||R),T=b?E?b:b.toLowerCase():void 0,C=R?E?R:R.toLowerCase():void 0,O=a.dynamic?.find(I=>I.caseSensitive===E&&I.prefix===T&&I.suffix===C);if(O)g=O;else{const I=xy(Ii,n.fullPath??n.from,E,T,C);g=I,I.depth=i,I.parent=a,a.dynamic??=[],a.dynamic.push(I)}break}case Wu:{const b=d.substring(y,p[1]),R=d.substring(p[4],w),E=m&&!!(b||R),T=b?E?b:b.toLowerCase():void 0,C=R?E?R:R.toLowerCase():void 0,O=a.optional?.find(I=>I.caseSensitive===E&&I.prefix===T&&I.suffix===C);if(O)g=O;else{const I=xy(Wu,n.fullPath??n.from,E,T,C);g=I,I.parent=a,I.depth=i,a.optional??=[],a.optional.push(I)}break}case Ni:{const b=d.substring(y,p[1]),R=d.substring(p[4],w),E=m&&!!(b||R),T=b?E?b:b.toLowerCase():void 0,C=R?E?R:R.toLowerCase():void 0,O=xy(Ni,n.fullPath??n.from,E,T,C);g=O,O.parent=a,O.depth=i,a.wildcard??=[],a.wildcard.push(O)}}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)vm(e,t,d,u,a,i,c)}function Ry(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 _i(e){if(e.static)for(const t of e.static.values())_i(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())_i(t);if(e.dynamic?.length){e.dynamic.sort(Ry);for(const t of e.dynamic)_i(t)}if(e.optional?.length){e.optional.sort(Ry);for(const t of e.optional)_i(t)}if(e.wildcard?.length){e.wildcard.sort(Ry);for(const t of e.wildcard)_i(t)}}function Yu(e){return{kind:al,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function xy(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 $D(e,t){const n=Yu("/"),r=new Uint16Array(6);for(const a of e)vm(!1,r,a,1,n,0);_i(n),t.masksTree=n,t.flatCache=Rp(1e3)}function UD(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=db(e,t.masksTree);return t.flatCache.set(e,r),r}function zD(e,t,n,r,a){e||="/",r||="/";const i=t?`case\0${e}`:e;let c=a.singleCache.get(i);if(!c){c=Yu("/");const u=new Uint16Array(6);vm(t,u,{from:e},1,c,0),a.singleCache.set(i,c)}return db(r,c,n)}function VD(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=db(e,t.segmentTree,n);return i&&(i.branch=HD(i.route)),t.matchCache.set(r,i),i}function FD(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function qD(e,t=!1,n){const r=Yu(e.fullPath),a=new Uint16Array(6),i={},c={};let u=0;return vm(t,a,e,1,r,0,f=>{if(n?.(f,u),Pa(!(f.id in i),`Duplicate routes found with id: ${String(f.id)}`),i[f.id]=f,u!==0&&f.path){const m=FD(f.fullPath);(!c[m]||f.fullPath.endsWith("/"))&&(c[m]=f)}u++}),_i(r),{processedTree:{segmentTree:r,singleCache:Rp(1e3),matchCache:Rp(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:c}}function db(e,t,n=!1){const r=e.split("/"),a=ZD(e,r,t,n);if(!a)return null;const i=BD(e,r,a),c="**"in a;return c&&(i["**"]=a["**"]),{route:c?a.node.notFound??a.node.route:a.node.route,params:i}}function BD(e,t,n){const r=GD(n.node);let a=null;const i={};for(let c=0,u=0,d=0;u<r.length;c++,u++,d++){const f=r[u],m=t[c],p=d;if(m&&(d+=m.length),f.kind===Ii){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,b=g.substring(y+2,g.length-S-1),R=m.substring(y,m.length-S);i[b]=decodeURIComponent(R)}else{const S=g.substring(1);i[S]=decodeURIComponent(m)}}else if(f.kind===Wu){if(n.skipped&1<<u){c--;continue}a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0,w=f.suffix?.length??0,S=g.substring(y+3,g.length-w-1),b=f.suffix||f.prefix?m.substring(y,m.length-w):m;b&&(i[S]=decodeURIComponent(b))}else if(f.kind===Ni){const g=f,y=e.substring(p+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),w=decodeURIComponent(y);i["*"]=w,i._splat=w;break}}return i}function HD(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function GD(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function ZD(e,t,n,r){const a=!Sp(t),i=a&&e!=="/",c=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:w,depth:S,statics:b,dynamics:R,optionals:E}=p;r&&g.notFound&&Zf(f,p)&&(f=p);const T=y===c;if(T){if(g.route&&(!i||g.isIndex)&&(Zf(m,p)&&(m=p),b===c&&g.isIndex))return m;if(!g.optional&&!g.wildcard)continue}const C=T?void 0:t[y];let O;if(g.wildcard&&Zf(d,p))for(const I of g.wildcard){const{prefix:k,suffix:D}=I;if(!(k&&(T||!(I.caseSensitive?C:O??=C.toLowerCase()).startsWith(k)))){if(D){if(T)continue;const z=t.slice(y).join("/").slice(-D.length);if((I.caseSensitive?z:z.toLowerCase())!==D)continue}d={node:I,index:y,skipped:w,depth:S,statics:b,dynamics:R,optionals:E};break}}if(g.optional){const I=w|1<<S,k=S+1;for(let D=g.optional.length-1;D>=0;D--){const z=g.optional[D];u.push({node:z,index:y,skipped:I,depth:k,statics:b,dynamics:R,optionals:E})}if(!T)for(let D=g.optional.length-1;D>=0;D--){const z=g.optional[D],{prefix:Y,suffix:V}=z;if(Y||V){const Z=z.caseSensitive?C:O??=C.toLowerCase();if(Y&&!Z.startsWith(Y)||V&&!Z.endsWith(V))continue}u.push({node:z,index:y+1,skipped:w,depth:k,statics:b,dynamics:R,optionals:E+1})}}if(!T&&g.dynamic&&C)for(let I=g.dynamic.length-1;I>=0;I--){const k=g.dynamic[I],{prefix:D,suffix:z}=k;if(D||z){const Y=k.caseSensitive?C:O??=C.toLowerCase();if(D&&!Y.startsWith(D)||z&&!Y.endsWith(z))continue}u.push({node:k,index:y+1,skipped:w,depth:S+1,statics:b,dynamics:R+1,optionals:E})}if(!T&&g.staticInsensitive){const I=g.staticInsensitive.get(O??=C.toLowerCase());I&&u.push({node:I,index:y+1,skipped:w,depth:S+1,statics:b+1,dynamics:R,optionals:E})}if(!T&&g.static){const I=g.static.get(C);I&&u.push({node:I,index:y+1,skipped:w,depth:S+1,statics:b+1,dynamics:R,optionals:E})}}if(m&&d)return Zf(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 Zf(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 sp(e){return fb(e.filter(t=>t!==void 0).join("/"))}function fb(e){return e.replace(/\/{2,}/g,"/")}function WC(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Oi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function ip(e){return Oi(WC(e))}function xp(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function KD(e,t,n){return xp(e,n)===xp(t,n)}function WD({base:e,to:t,trailingSlash:n="never",cache:r}){const a=t.startsWith("/"),i=!a&&t===".";let c;if(r){c=a?t:i?e:e+"\0"+t;const p=r.get(c);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&&Sp(u)==="";)u.pop();const p=t.split("/");for(let g=0,y=p.length;g<y;g++){const w=p[g];w===""?g?g===y-1&&u.push(w):u=[w]:w===".."?u.pop():w==="."||u.push(w)}}u.length>1&&(Sp(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=ub(g,0,d);const y=d[0];if(y===al){f+=g;continue}const w=d[5],S=g.substring(0,d[1]),b=g.substring(d[4],w),R=g.substring(d[2],d[3]);y===Ii?f+=S||b?`${S}{$${R}}${b}`:`$${R}`:y===Ni?f+=S||b?`${S}{$}${b}`:"$":f+=`${S}{-$${R}}${b}`}f=fb(f);const m=f||"/";return c&&r&&r.set(c,m),m}function Ty(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):YD(r,n)}function Oy({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 c=0,u,d="";for(;c<i;){const m=c;u=ub(e,m,u);const p=u[5];if(c=p+1,m===p)continue;const g=u[0];if(g===al){d+="/"+e.substring(m,p);continue}if(g===Ni){const y=t._splat;a._splat=y,a["*"]=y;const w=e.substring(m,u[1]),S=e.substring(u[4],p);if(!y){r=!0,(w||S)&&(d+="/"+w+S);continue}const b=Ty("_splat",t,n);d+="/"+w+b+S;continue}if(g===Ii){const y=e.substring(u[2],u[3]);!r&&!(y in t)&&(r=!0),a[y]=t[y];const w=e.substring(m,u[1]),S=e.substring(u[4],p),b=Ty(y,t,n)??"undefined";d+="/"+w+b+S;continue}if(g===Wu){const y=e.substring(u[2],u[3]),w=t[y];if(w==null)continue;a[y]=w;const S=e.substring(m,u[1]),b=e.substring(u[4],p),R=Ty(y,t,n)??"";d+="/"+S+R+b;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:a,interpolatedPath:d||"/",isMissingParams:r}}function YD(e,t){let n=encodeURIComponent(e);if(t)for(const[r,a]of t)n=n.replaceAll(r,a);return n}function ho(e){return!!e?.isNotFound}function QD(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Tp="tsr-scroll-restoration-v1_3",XD=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function JD(){const e=QD();if(!e)return null;const t=e.getItem(Tp);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=xi(r,n)||n,e.setItem(Tp,JSON.stringify(n)))}}const Kf=JD(),Y0=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 Op=!1;function YC({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:a,location:i}){let c;try{c=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const u=t||window.history.state?.__TSR_key,d=c[u];Op=!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)}}Op=!1}function t6(e,t){if(!Kf&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Kf))return;e.isScrollRestorationSetup=!0,Op=!1;const r=e.options.getScrollRestorationKey||Y0;window.history.scrollRestoration="manual";const a=i=>{if(Op||!e.isScrollRestoring)return;let c="";if(i.target===document||i.target===window)c="window";else{const d=i.target.getAttribute("data-scroll-restoration-id");d?c=`[data-scroll-restoration-id="${d}"]`:c=e6(i.target)}const u=r(e.state.location);Kf.set(d=>{const f=d[u]||={},m=f[c]||={};if(c==="window")m.scrollX=window.scrollX||0,m.scrollY=window.scrollY||0;else if(c){const p=document.querySelector(c);p&&(m.scrollX=p.scrollLeft||0,m.scrollY=p.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",XD(a,100),!0),e.subscribe("onRendered",i=>{const c=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(YC({storageKey:Tp,key:c,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Kf.set(u=>(u[c]||={},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 Cy(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]=Cy(a):Array.isArray(i)?i.push(Cy(a)):n[r]=[i,Cy(a)]}return n}const a6=i6(JSON.parse),s6=c6(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 c6(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 Fr="__root__";function hb(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 Po(e){return e instanceof Response&&!!e.options}const cp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},ym=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),QC=(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),Pa(n.options.notFoundComponent);const r=e.matches.find(a=>a.routeId===n.id);Pa(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,QC(e,t))},xs=(e,t,n)=>{if(!(!Po(n)&&!ho(n))){if(Po(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=Po(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:r,isFetching:!1,error:n})),ho(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Po(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(QC(e,n),n)}},XC=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},pu=(e,t,n,r)=>{const{id:a,routeId:i}=e.matches[t],c=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,xs(e,e.router.getMatch(a),n);try{c.options.onError?.(n)}catch(u){n=u,xs(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}))},l6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=e.matches[n-1]?.id,c=i?e.router.getMatch(i):void 0;if(e.router.isShell()){a.ssr=r.id===Fr;return}if(c?.ssr===!1){a.ssr=!1;return}const u=y=>y===!0&&c?.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:Wf(f,a.searchError),params:Wf(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:Wf(y.search,y.searchError),params:Wf(y.params,y.paramsError),ssr:y.ssr}))},g=r.options.ssr(p);if(As(g))return g.then(y=>{a.ssr=u(y??d)});a.ssr=u(g??d)},JC=(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&&!ym(e,t)&&(n.options.loader||n.options.beforeLoad||nA(n))&&typeof a=="number"&&a!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const c=setTimeout(()=>{cp(e)},a);r._nonReactive.pendingTimeout=c}},u6=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;JC(e,t,n,r);const a=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&xs(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(a):a()},d6=(e,t,n,r)=>{const a=e.router.getMatch(t),i=a._nonReactive.loadPromise;a._nonReactive.loadPromise=ol(()=>{i?.resolve()});const{paramsError:c,searchError:u}=a;c&&pu(e,n,c,"PARSE_PARAMS"),u&&pu(e,n,u,"VALIDATE_SEARCH"),JC(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 w=()=>{y||(y=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:d,context:g})))},S=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,k=>({...k,isFetching:!1}))};if(!r.options.beforeLoad){ju(()=>{w(),S()});return}a._nonReactive.beforeLoadPromise=ol();const{search:b,params:R,cause:E}=a,T=ym(e,t),C={search:b,abortController:d,params:R,preload:T,context:g,location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:T?"preload":E,matches:e.matches,...e.router.options.additionalContext},O=k=>{if(k===void 0){ju(()=>{w(),S()});return}(Po(k)||ho(k))&&(w(),pu(e,n,k,"BEFORE_LOAD")),ju(()=>{w(),e.updateMatch(t,D=>({...D,__beforeLoadContext:k,context:{...D.context,...k}})),S()})};let I;try{if(I=r.options.beforeLoad(C),As(I))return w(),I.catch(k=>{pu(e,n,k,"BEFORE_LOAD")}).then(O)}catch(k){w(),pu(e,n,k,"BEFORE_LOAD")}O(I)},f6=(e,t)=>{const{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],i=()=>{if(e.router.isServer){const d=l6(e,n,t,a);if(As(d))return d.then(u)}return u()},c=()=>d6(e,n,t,a),u=()=>{if(XC(e,n))return;const d=u6(e,n,a);return As(d)?d.then(c):c()};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,c,u])=>{const d=i?.meta,f=i?.links,m=i?.scripts,p=i?.styles;return{meta:d,links:f,headScripts:m,headers:u,scripts:c,styles:p}})},eA=(e,t,n,r)=>{const a=e.matchPromises[n-1],{params:i,loaderDeps:c,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=ym(e,t);return{params:i,deps:c,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}},mx=async(e,t,n,r)=>{try{const a=e.router.getMatch(t);try{(!e.router.isServer||a.ssr===!0)&&tA(r);const i=r.options.loader?.(eA(e,t,n,r)),c=r.options.loader&&As(i);if((c||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=c?await i:i;xs(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 c=i;const u=a._nonReactive.minPendingPromise;u&&await u,ho(i)&&await r.options.notFoundComponent?.preload?.(),xs(e,e.router.getMatch(t),i);try{r.options.onError?.(i)}catch(m){c=m,xs(e,e.router.getMatch(t),m)}const d=$u(e,t,r),f=d?await d:void 0;e.updateMatch(t,m=>({...m,error:c,status:"error",isFetching:!1,...f}))}}catch(a){const i=e.router.getMatch(t);if(i){const c=$u(e,t,r);if(c){const u=await c;e.updateMatch(t,d=>({...d,...u}))}i._nonReactive.loaderPromise=void 0}xs(e,i,a)}},h6=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let a=!1,i=!1;const c=e.router.looseRoutesById[r];if(XC(e,n)){if(e.router.isServer){const f=$u(e,n,c);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&&xs(e,m,p)}else{const m=Date.now()-f.updatedAt,p=ym(e,n),g=p?c.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.router.options.defaultStaleTime??0,y=c.options.shouldReload,w=typeof y=="function"?y(eA(e,n,t,c)):y,S=!!p&&!e.router.state.matches.some(T=>T.id===n),b=e.router.getMatch(n);b._nonReactive.loaderPromise=ol(),S!==b.preload&&e.updateMatch(n,T=>({...T,preload:S}));const{status:R,invalid:E}=b;if(a=R==="success"&&(E||(w??m>g)),!(p&&c.options.preload===!1))if(a&&!e.sync)i=!0,(async()=>{try{await mx(e,n,t,c);const T=e.router.getMatch(n);T._nonReactive.loaderPromise?.resolve(),T._nonReactive.loadPromise?.resolve(),T._nonReactive.loaderPromise=void 0}catch(T){Po(T)&&await e.router.navigate(T.options)}})();else if(R!=="success"||a&&e.sync)await mx(e,n,t,c);else{const T=$u(e,n,c);if(T){const C=await T;e.updateMatch(n,O=>({...O,...C}))}}}}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 gx(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&cp(t);try{for(let a=0;a<t.matches.length;a++){const i=f6(t,a);As(i)&&await i}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(h6(t,a));await Promise.all(t.matchPromises);const r=cp(t);As(r)&&await r}catch(n){if(ho(n)&&!t.preload){const r=cp(t);throw As(r)&&await r,n}if(Po(n))throw n}return t.matches}async function tA(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 rA){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 Wf(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function nA(e){for(const t of rA)if(e.options[t]?.preload)return!0;return!1}const rA=["component","errorComponent","pendingComponent","notFoundComponent"];function p6(e){return{input:({url:t})=>{for(const n of e)t=oA(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=aA(e[n],t);return t}}}function m6(e){const t=ip(e.basepath),n=`/${t}`,r=`${n}/`,a=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:c})=>{const u=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return u===a?c.pathname="/":u.startsWith(i)&&(c.pathname=c.pathname.slice(n.length)),c},output:({url:c})=>(c.pathname=sp(["/",t,c.pathname]),c)}}function oA(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 aA(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 Ci(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 g6{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,c=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=ID())),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 W0(y6(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||c!==f){this.basepath=d;const g=[];ip(d)!==""&&g.push(m6({basepath:d})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:p6(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}=qD(this.routeTree,this.options.caseSensitive,(c,u)=>{c.init({originalIndex:u})});this.options.routeMasks&&$D(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=oA(this.rewrite,m),g=this.options.parseSearch(p.search),y=this.options.stringifySearch(g);p.search=y;const w=p.href.replace(p.origin,""),{pathname:S,hash:b}=p;return{href:w,publicHref:d,url:p.href,pathname:px(S),searchStr:y,search:lo(r?.search,g),hash:b.split("#").reverse()[0]??"",state:lo(r?.state,f)}},i=a(n),{__tempLocation:c,__tempKey:u}=i.state;if(c&&(!u||u===this.tempLocationKey)){const d=a(c);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=Rp(1e3),this.resolvePathWithBase=(n,r)=>WD({base:n,to:fb(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=>_6({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 c=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutes(c,{_buildLocation:!0}),d=Sp(u);i.from;const f=i.unsafeRelative==="path"?c.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,"."),w=i.params===!1||i.params===null?{}:(i.params??!0)===!0?g:Object.assign(g,xi(i.params,g)),S=Oy({path:y,params:w}).interpolatedPath,b=this.matchRoutes(S,void 0,{_buildLocation:!0}).map(Y=>this.looseRoutesById[Y.routeId]);if(Object.keys(w).length>0)for(const Y of b){const V=Y.options.params?.stringify??Y.options.stringifyParams;V&&Object.assign(w,V(w))}const R=n.leaveParams?y:px(Oy({path:y,params:w,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let E=p;if(n._includeValidateSearch&&this.options.search?.strict){const Y={};b.forEach(V=>{if(V.options.validateSearch)try{Object.assign(Y,Q0(V.options.validateSearch,{...Y,...E}))}catch{}}),E=Y}E=b6({search:E,dest:i,destRoutes:b,_includeValidateSearch:n._includeValidateSearch}),E=lo(p,E);const T=this.options.stringifySearch(E),C=i.hash===!0?c.hash:i.hash?xi(i.hash,c.hash):void 0,O=C?`#${C}`:"";let I=i.state===!0?c.state:i.state?xi(i.state,c.state):{};I=lo(c.state,I);const k=`${R}${T}${O}`,D=new URL(k,this.origin),z=aA(this.rewrite,D);return{publicHref:z.pathname+z.search+z.hash,href:k,url:z.href,pathname:R,search:E,searchStr:T,state:I,hash:C??"",unmaskOnReload:i.unmaskOnReload}},a=(i={},c)=>{const u=r(i);let d=c?r(c):void 0;if(!d){const f={};if(this.options.routeMasks){const m=UD(u.pathname,this.processedTree);if(m){Object.assign(f,m.params);const{from:p,...g}=m.route;c={from:n.from,...g,params:f},d=r(c)}}}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=Ti(a.state,this.latestLocation.state);return d.forEach(m=>{delete a.state[m]}),f},c=Oi(this.latestLocation.href)===Oi(a.href),u=this.commitLocationPromise;if(this.commitLocationPromise=ol(()=>{u?.resolve()}),c&&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:c,href:u,...d}={})=>{if(u){const p=this.history.location.state.__TSR_index,g=wp(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:c});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(ip(a(this.latestLocation.href))!==ip(a(r.href))){let i=r.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),hb({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",...Ci({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...Ci({resolvedLocation:f,location:d})}),await gx({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 w=y.matches,S=y.pendingMatches||y.matches;return m=w.filter(b=>!S.some(R=>R.id===b.id)),p=S.filter(b=>!w.some(R=>R.id===b.id)),g=S.filter(b=>w.some(R=>R.id===b.id)),{...y,isLoading:!1,loadedAt:Date.now(),matches:S,pendingMatches:void 0,cachedMatches:[...y.cachedMatches,...m.filter(b=>b.status!=="error"&&b.status!=="notFound")]}}),this.clearExpiredCache()}),[[m,"onLeave"],[p,"onEnter"],[g,"onStay"]].forEach(([y,w])=>{y.forEach(S=>{this.looseRoutesById[S.routeId].options[w]?.(S)})})})})}})}catch(d){Po(d)?(r=d,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):ho(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 c;this.hasNotFoundMatch()?c=404:this.__store.state.matches.some(u=>u.status==="error")&&(c=500),c!==void 0&&this.__store.setState(u=>({...u,statusCode:c}))},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,c=this.state.resolvedLocation,u=typeof r.types=="function"?r.types(Ci({resolvedLocation:c,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(c=>c.id===n?r(c):c)}))})},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=tA,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)),c=new Set([...i,...this.state.cachedMatches.map(u=>u.id)]);ju(()=>{a.forEach(u=>{c.has(u.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,u]}))})});try{return a=await gx({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(Po(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});ho(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=zD(i.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,u.pathname,this.processedTree);return!d||n.params&&!Ti(d.params,n.params,{partial:!0})?!1:r?.includeSearch??!0?Ti(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:c}=r,u=!1;(a?a.path!=="/"&&i["**"]:Oi(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:u=!0);const d=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let p=c.length-1;p>=0;p--){const g=c[p];if(g.children)return g.id}return Fr}})(),f=[],m=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return c.forEach((p,g)=>{const y=f[g-1],[w,S,b]=(()=>{const U=y?.search??t.search,J=y?._strictSearch??void 0;try{const ie=Q0(p.options.validateSearch,{...U})??void 0;return[{...U,...ie},{...J,...ie},void 0]}catch(ie){let F=ie;if(ie instanceof Cp||(F=new Cp(ie.message,{cause:ie})),n?.throwOnError)throw F;return[U,{},F]}})(),R=p.options.loaderDeps?.({search:w})??"",E=R?JSON.stringify(R):"",{interpolatedPath:T,usedParams:C}=Oy({path:p.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),O=p.id+T+E,I=this.getMatch(O),k=this.state.matches.find(U=>U.routeId===p.id),D=I?._strictParams??C;let z;if(!I){const U=p.options.params?.parse??p.options.parseParams;if(U)try{Object.assign(D,U(D))}catch(J){if(ho(J)||Po(J)?z=J:z=new v6(J.message,{cause:J}),n?.throwOnError)throw z}}Object.assign(i,D);const Y=k?"stay":"enter";let V;if(I)V={...I,cause:Y,params:k?lo(k.params,i):i,_strictParams:D,search:lo(k?k.search:I.search,w),_strictSearch:S};else{const U=p.options.loader||p.options.beforeLoad||p.lazyFn||nA(p)?"pending":"success";V={id:O,ssr:this.isServer?void 0:p.options.ssr,index:g,routeId:p.id,params:k?lo(k.params,i):i,_strictParams:D,pathname:T,updatedAt:Date.now(),search:k?lo(k.search,w):w,_strictSearch:S,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:z,__routeContext:void 0,_nonReactive:{loadPromise:ol()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:Y,loaderDeps:k?lo(k.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||(V.globalNotFound=d===p.id),V.searchError=b;const Z=m(y);V.context={...Z,...V.__routeContext,...V.__beforeLoadContext},f.push(V)}),f.forEach((p,g)=>{const y=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const S=f[g-1],b=m(S);if(y.options.context){const R={deps:p.loaderDeps,params:p.params,context:b??{},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={...b,...p.__routeContext,...p.__beforeLoadContext}}}),f}}class Cp extends Error{}class v6 extends Error{}function y6(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Q0(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Cp("Async validation not supported");if(n.issues)throw new Cp(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 _6({pathname:e,routesById:t,processedTree:n}){const r={},a=Oi(e);let i;const c=VD(a,n,!0);return c&&(i=c.route,Object.assign(r,c.params)),{matchedRoutes:c?.branch||[t[Fr]],routeParams:r,foundRoute:i}}function b6({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,b)=>b(S),p));const w=g(y);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((S,b)=>b(S),w):w};f.push(m)}if(r&&d.options.validateSearch){const m=({search:p,next:g})=>{const y=g(p);try{return{...y,...Q0(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:xi(t.search,u):{};a.push(i);const c=(u,d)=>{if(u>=a.length)return d;const f=a[u];return f({search:d,next:p=>c(u+1,p)})};return c(0,e)}const w6="Error preloading route! ☝️";class sA{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=Fr:this.parentRoute||Pa(!1);let i=a?Fr:r?.path;i&&i!=="/"&&(i=WC(i));const c=r?.id||i;let u=a?Fr:sp([this.parentRoute.id===Fr?"":this.parentRoute.id,c]);i===Fr&&(i="/"),u!==Fr&&(u=sp(["/",u]));const d=u===Fr?"/":sp([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 S6 extends sA{constructor(t){super(t)}}function pb(e){const t=e.errorComponent??_m;return x.jsx(E6,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?A.createElement(t,{error:n,reset:r}):e.children})}class E6 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 _m({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 R6({children:e,fallback:t=null}){return x6()?x.jsx(le.Fragment,{children:e}):x.jsx(le.Fragment,{children:t})}function x6(){return le.useSyncExternalStore(T6,()=>!0,()=>!1)}function T6(){return()=>{}}var Ay={exports:{}},Iy={},Ny={exports:{}},ky={};var vx;function O6(){if(vx)return ky;vx=1;var e=Us();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,c=e.useDebugValue;function u(p,g){var y=g(),w=r({inst:{value:y,getSnapshot:g}}),S=w[0].inst,b=w[1];return i(function(){S.value=y,S.getSnapshot=g,d(S)&&b({inst:S})},[p,y,g]),a(function(){return d(S)&&b({inst:S}),p(function(){d(S)&&b({inst:S})})},[p]),c(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 ky.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,ky}var yx;function iA(){return yx||(yx=1,Ny.exports=O6()),Ny.exports}var _x;function C6(){if(_x)return Iy;_x=1;var e=Us(),t=iA();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,c=e.useEffect,u=e.useMemo,d=e.useDebugValue;return Iy.useSyncExternalStoreWithSelector=function(f,m,p,g,y){var w=i(null);if(w.current===null){var S={hasValue:!1,value:null};w.current=S}else S=w.current;w=u(function(){function R(I){if(!E){if(E=!0,T=I,I=g(I),y!==void 0&&S.hasValue){var k=S.value;if(y(k,I))return C=k}return C=I}if(k=C,r(T,I))return k;var D=g(I);return y!==void 0&&y(k,D)?(T=I,k):(T=I,C=D)}var E=!1,T,C,O=p===void 0?null:p;return[function(){return R(m())},O===null?void 0:function(){return R(O())}]},[m,p,g,y]);var b=a(f,w[0],w[1]);return c(function(){S.hasValue=!0,S.value=b},[b]),d(b),b},Iy}var bx;function A6(){return bx||(bx=1,Ay.exports=C6()),Ay.exports}var cA=A6();const Xre=$a(cA);function I6(e,t=r=>r,n={}){const r=n.equal??N6;return cA.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function N6(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=wx(e);if(n.length!==wx(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 wx(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const My=A.createContext(null);function lA(){return typeof document>"u"?My:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=My,My)}function Ir(e){const t=A.useContext(lA());return e?.warn,t}function fr(e){const t=Ir({warn:e?.router===void 0}),n=e?.router||t,r=A.useRef(void 0);return I6(n.__store,a=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=lo(r.current,e.select(a));return r.current=i,i}return e.select(a)}return a})}const bm=A.createContext(void 0),k6=A.createContext(void 0);function na(e){const t=A.useContext(e.from?k6:bm);return fr({select:r=>{const a=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Pa(!((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 mb(e){return na({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function gb(e){const{select:t,...n}=e;return na({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Qc(e){return na({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 wm(e){return na({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Ou=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Py(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 M6(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 P6(e){const t=A.useRef(null);return A.useImperativeHandle(e,()=>t.current,[]),t}function vl(e){const t=Ir();return A.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Jre(e){const t=Ir(),n=vl(),r=A.useRef(null);return Ou(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var Sm=MC();const uA=$a(Sm);function D6(e,t){const n=Ir(),[r,a]=A.useState(!1),i=A.useRef(!1),c=P6(t),{activeProps:u,inactiveProps:d,activeOptions:f,to:m,preload:p,preloadDelay:g,hashScrollIntoView:y,replace:w,startTransition:S,resetScroll:b,viewTransition:R,children:E,target:T,disabled:C,style:O,className:I,onClick:k,onFocus:D,onMouseEnter:z,onMouseLeave:Y,onTouchStart:V,ignoreBlocker:Z,params:U,search:J,hash:ie,state:F,mask:X,reloadDocument:ae,unsafeRelative:fe,from:K,_fromLocation:P,...B}=e,q=fr({select:oe=>oe.location.search,structuralSharing:!0}),L=e.from,$=A.useMemo(()=>({...e,from:L}),[n,q,L,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Q=A.useMemo(()=>n.buildLocation({...$}),[n,$]),me=A.useMemo(()=>{if(C)return;let oe=Q.maskedLocation?Q.maskedLocation.url:Q.url,Se=!1;return n.origin&&(oe.startsWith(n.origin)?oe=n.history.createHref(oe.replace(n.origin,""))||"/":Se=!0),{href:oe,external:Se}},[C,Q.maskedLocation,Q.url,n.origin,n.history]),_e=A.useMemo(()=>{if(me?.external)return me.href;try{return new URL(m),m}catch{}},[m,me]),Ae=e.reloadDocument||_e?!1:p??n.options.defaultPreload,Ne=g??n.options.defaultPreloadDelay??0,H=fr({select:oe=>{if(_e)return!1;if(f?.exact){if(!KD(oe.location.pathname,Q.pathname,n.basepath))return!1}else{const Se=xp(oe.location.pathname,n.basepath),Te=xp(Q.pathname,n.basepath);if(!(Se.startsWith(Te)&&(Se.length===Te.length||Se[Te.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Ti(oe.location.search,Q.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?oe.location.hash===Q.hash:!0}}),ne=A.useCallback(()=>{n.preloadRoute({...$}).catch(oe=>{console.warn(oe),console.warn(w6)})},[n,$]),be=A.useCallback(oe=>{oe?.isIntersecting&&ne()},[ne]);M6(c,be,z6,{disabled:!!C||Ae!=="viewport"}),A.useEffect(()=>{i.current||!C&&Ae==="render"&&(ne(),i.current=!0)},[C,ne,Ae]);const pe=oe=>{const Se=oe.currentTarget.getAttribute("target"),Te=T!==void 0?T:Se;if(!C&&!V6(oe)&&!oe.defaultPrevented&&(!Te||Te==="_self")&&oe.button===0){oe.preventDefault(),Sm.flushSync(()=>{a(!0)});const Re=n.subscribe("onResolved",()=>{Re(),a(!1)});n.navigate({...$,replace:w,resetScroll:b,hashScrollIntoView:y,startTransition:S,viewTransition:R,ignoreBlocker:Z})}};if(_e)return{...B,ref:c,href:_e,...E&&{children:E},...T&&{target:T},...C&&{disabled:C},...O&&{style:O},...I&&{className:I},...k&&{onClick:k},...D&&{onFocus:D},...z&&{onMouseEnter:z},...Y&&{onMouseLeave:Y},...V&&{onTouchStart:V}};const ce=oe=>{C||Ae&&ne()},Oe=ce,$e=oe=>{if(!(C||!Ae))if(!Ne)ne();else{const Se=oe.target;if(mu.has(Se))return;const Te=setTimeout(()=>{mu.delete(Se),ne()},Ne);mu.set(Se,Te)}},Ye=oe=>{if(C||!Ae||!Ne)return;const Se=oe.target,Te=mu.get(Se);Te&&(clearTimeout(Te),mu.delete(Se))},He=H?xi(u,{})??L6:Dy,Xe=H?Dy:xi(d,{})??Dy,G=[I,He.className,Xe.className].filter(Boolean).join(" "),te=(O||He.style||Xe.style)&&{...O,...He.style,...Xe.style};return{...B,...He,...Xe,href:me?.href,ref:c,onClick:gu([k,pe]),onFocus:gu([D,ce]),onMouseEnter:gu([z,$e]),onMouseLeave:gu([Y,Ye]),onTouchStart:gu([V,Oe]),disabled:!!C,target:T,...te&&{style:te},...G&&{className:G},...C&&j6,...H&&$6,...r&&U6}}const Dy={},L6={className:"active"},j6={role:"link","aria-disabled":!0},$6={"data-status":"active","aria-current":"page"},U6={"data-transitioning":"transitioning"},mu=new WeakMap,z6={rootMargin:"100px"},gu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Em=A.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:a,ref:i,...c}=D6(r,t),u=typeof r.children=="function"?r.children({isActive:c["data-status"]==="active"}):r.children;return n===void 0&&delete c.disabled,A.createElement(n||"a",{...c,ref:i},u)});function V6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class F6 extends sA{constructor(t){super(t),this.useMatch=n=>na({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>na({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>wm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Qc({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>gb({...n,from:this.id}),this.useLoaderData=n=>mb({...n,from:this.id}),this.useNavigate=()=>vl({from:this.fullPath}),this.Link=le.forwardRef((n,r)=>x.jsx(Em,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function jt(e){return new F6(e)}class q6 extends S6{constructor(t){super(t),this.useMatch=n=>na({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>na({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>wm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Qc({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>gb({...n,from:this.id}),this.useLoaderData=n=>mb({...n,from:this.id}),this.useNavigate=()=>vl({from:this.fullPath}),this.Link=le.forwardRef((n,r)=>x.jsx(Em,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function B6(e){return new q6(e)}function Sx(e){return typeof e=="object"?new Ex(e,{silent:!0}).createRoute(e):new Ex(e,{silent:!0}).createRoute}class Ex{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const a=jt(r);return a.isRoot=!1,a},this.silent=n?.silent}}class Rx{constructor(t){this.useMatch=n=>na({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>na({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>wm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>Qc({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>gb({...n,from:this.options.id}),this.useLoaderData=n=>mb({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ir();return vl({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function xx(e){return typeof e=="object"?new Rx(e):t=>new Rx({id:e,...t})}function Bt(e,t){let n,r,a,i;const c=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(a=d,MD(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 c();return A.createElement(r,f)};return u.preload=c,u}function H6(){const e=Ir(),t=A.useRef({router:e,mounted:!1}),[n,r]=A.useState(!1),{hasPendingMatches:a,isLoading:i}=fr({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),c=Py(i),u=i||n||a,d=Py(u),f=i||a,m=Py(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 Oi(e.latestLocation.href)!==Oi(g.href)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),Ou(()=>{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]),Ou(()=>{c&&!i&&e.emit({type:"onLoad",...Ci(e.state)})},[c,e,i]),Ou(()=>{m&&!f&&e.emit({type:"onBeforeRouteMount",...Ci(e.state)})},[f,m,e]),Ou(()=>{if(d&&!u){const p=Ci(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 G6(e){const t=fr({select:n=>`not-found-${n.location.pathname}-${n.status}`});return x.jsx(pb,{getResetKey:()=>t,onCatch:(n,r)=>{if(ho(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(ho(n))return e.fallback?.(n);throw n},children:e.children})}function Z6(){return x.jsx("p",{children:"Not Found"})}function Uc(e){return x.jsx(x.Fragment,{children:e.children})}function dA(e,t,n){return t.options.notFoundComponent?x.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?x.jsx(e.options.defaultNotFoundComponent,{...n}):x.jsx(Z6,{})}function K6({children:e}){const t=Ir();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=Ir();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||Y0)(e.latestLocation),r=n!==Y0(e.latestLocation)?n:void 0,a={storageKey:Tp,shouldScrollRestoration:!0};return r&&(a.key=r),x.jsx(K6,{children:`(${YC.toString()})(${JSON.stringify(a)})`})}const fA=A.memo(function({matchId:t}){const n=Ir(),r=fr({select:R=>{const E=R.matches.find(T=>T.id===t);return Pa(E),{routeId:E.routeId,ssr:E.ssr,_displayPending:E._displayPending}},structuralSharing:!0}),a=n.routesById[r.routeId],i=a.options.pendingComponent??n.options.defaultPendingComponent,c=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:Uc,g=u?pb:Uc,y=f?G6:Uc,w=fr({select:R=>R.loadedAt}),S=fr({select:R=>{const E=R.matches.findIndex(T=>T.id===t);return R.matches[E-1]?.routeId}}),b=a.isRoot?a.options.shellComponent??Uc:Uc;return x.jsxs(b,{children:[x.jsx(bm.Provider,{value:t,children:x.jsx(p,{fallback:c,children:x.jsx(g,{getResetKey:()=>w,errorComponent:u||_m,onCatch:(R,E)=>{if(ho(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(R6,{fallback:c,children:x.jsx(Tx,{matchId:t})}):x.jsx(Tx,{matchId:t})})})})}),S===Fr&&n.options.scrollRestoration?x.jsxs(x.Fragment,{children:[x.jsx(Y6,{}),x.jsx(W6,{})]}):null]})});function Y6(){const e=Ir(),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",...Ci(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Tx=A.memo(function({matchId:t}){const n=Ir(),{match:r,key:a,routeId:i}=fr({select:d=>{const f=d.matches.find(w=>w.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}),c=n.routesById[i],u=A.useMemo(()=>{const d=c.options.component??n.options.defaultComponent;return d?x.jsx(d,{},a):x.jsx(hA,{})},[a,c.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=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const f=n.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!n.isServer){const m=ol();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 Pa(ho(r.error)),dA(n,c,r.error);if(r.status==="redirected")throw Pa(Po(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(c.options.errorComponent??n.options.defaultErrorComponent)||_m;return x.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return u}),hA=A.memo(function(){const t=Ir(),n=A.useContext(bm),r=fr({select:f=>f.matches.find(m=>m.id===n)?.routeId}),a=t.routesById[r],i=fr({select:f=>{const p=f.matches.find(g=>g.id===n);return Pa(p),p.globalNotFound}}),c=fr({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 dA(t,a,void 0);if(!c)return null;const d=x.jsx(fA,{matchId:c});return r===Fr?x.jsx(A.Suspense,{fallback:u,children:d}):d});function Q6(){const e=Ir(),n=e.routesById[Fr].options.pendingComponent??e.options.defaultPendingComponent,r=n?x.jsx(n,{}):null,a=e.isServer||typeof document<"u"&&e.ssr?Uc:A.Suspense,i=x.jsxs(a,{fallback:r,children:[!e.isServer&&x.jsx(H6,{}),x.jsx(X6,{})]});return e.options.InnerWrap?x.jsx(e.options.InnerWrap,{children:i}):i}function X6(){const e=Ir(),t=fr({select:a=>a.matches[0]?.id}),n=fr({select:a=>a.loadedAt}),r=t?x.jsx(fA,{matchId:t}):null;return x.jsx(bm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:x.jsx(pb,{getResetKey:()=>n,errorComponent:_m,onCatch:a=>{a.message||a.toString()},children:r})})}const J6=e=>new eL(e);class eL extends g6{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Sx,globalThis.createLazyFileRoute=xx):typeof window<"u"&&(window.createFileRoute=Sx,window.createLazyFileRoute=xx);function tL({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=lA(),a=x.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?x.jsx(e.options.Wrap,{children:a}):a}function nL({router:e,...t}){return x.jsx(tL,{router:e,...t,children:x.jsx(Q6,{})})}function rL(e){return fr({select:t=>t.location})}var oL={},Ox={};const lp=Object.create(null),vu=e=>oL||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?lp:globalThis),fo=new Proxy(lp,{get(e,t){return vu()[t]??lp[t]},has(e,t){return t in vu()||t in lp},set(e,t,n){const r=vu(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=vu(!0);return delete n[t],!0},ownKeys(){const e=vu(!0);return Object.keys(e)}});function yn(e,t){return typeof process<"u"&&Ox?Ox[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const yu=1,Dn=4,Yo=8,Br=24,Cx={eterm:Dn,cons25:Dn,console:Dn,cygwin:Dn,dtterm:Dn,gnome:Dn,hurd:Dn,jfbterm:Dn,konsole:Dn,kterm:Dn,mlterm:Dn,mosh:Br,putty:Dn,st:Dn,"rxvt-unicode-24bit":Br,terminator:Br,"xterm-kitty":Br},aL=new Map(Object.entries({APPVEYOR:Yo,BUILDKITE:Yo,CIRCLECI:Br,DRONE:Yo,GITEA_ACTIONS:Br,GITHUB_ACTIONS:Br,GITLAB_CI:Yo,TRAVIS:Yo})),sL=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function iL(){if(yn("FORCE_COLOR")!==void 0)switch(yn("FORCE_COLOR")){case"":case"1":case"true":return Dn;case"2":return Yo;case"3":return Br;default:return yu}if(yn("NODE_DISABLE_COLORS")!==void 0&&yn("NODE_DISABLE_COLORS")!==""||yn("NO_COLOR")!==void 0&&yn("NO_COLOR")!==""||yn("TERM")==="dumb")return yu;if(yn("TMUX"))return Br;if("TF_BUILD"in fo&&"AGENT_NAME"in fo)return Dn;if("CI"in fo){for(const{0:e,1:t}of aL)if(e in fo)return t;return yn("CI_NAME")==="codeship"?Yo:yu}if("TEAMCITY_VERSION"in fo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(yn("TEAMCITY_VERSION"))!==null?Dn:yu;switch(yn("TERM_PROGRAM")){case"iTerm.app":return!yn("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(yn("TERM_PROGRAM_VERSION"))!==null?Yo:Br;case"HyperTerm":case"MacTerm":return Br;case"Apple_Terminal":return Yo}if(yn("COLORTERM")==="truecolor"||yn("COLORTERM")==="24bit")return Br;if(yn("TERM")){if(/truecolor/.exec(yn("TERM"))!==null)return Br;if(/^xterm-256/.exec(yn("TERM"))!==null)return Yo;const e=yn("TERM").toLowerCase();if(Cx[e])return Cx[e];if(sL.some(t=>t.exec(e)!==null))return Dn}return yn("COLORTERM")?Dn:yu}const Qo={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"}},X0=["debug","info","success","warn","error"];function cL(e,t){return X0.indexOf(t)>=X0.indexOf(e)}const lL={info:Qo.fg.blue,success:Qo.fg.green,warn:Qo.fg.yellow,error:Qo.fg.red,debug:Qo.fg.magenta},uL=(e,t,n)=>{const r=new Date().toISOString();return n?`${Qo.dim}${r}${Qo.reset} ${lL[e]}${e.toUpperCase()}${Qo.reset} ${Qo.bright}[Better Auth]:${Qo.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},dL=e=>{const t="error",n=iL()!==1,r=(a,i,c=[])=>{if(!cL(t,a))return;const u=uL(a,i,n);{a==="error"?console.error(u,...c):a==="warn"?console.warn(u,...c):console.log(u,...c);return}};return{...Object.fromEntries(X0.map(a=>[a,(...[i,...c])=>r(a,i,c)])),get level(){return t}}};dL();var Uu=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function fL(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Uu(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function hL(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 Ly(e,t="/api/auth"){if(hL(e),fL(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function pL(e,t,n,r,a){if(e)return Ly(e,t);{const i=fo.BETTER_AUTH_URL||fo.NEXT_PUBLIC_BETTER_AUTH_URL||fo.PUBLIC_BETTER_AUTH_URL||fo.NUXT_PUBLIC_BETTER_AUTH_URL||fo.NUXT_PUBLIC_AUTH_URL||(fo.BASE_URL!=="/"?fo.BASE_URL:void 0);if(i)return Ly(i,t)}if(typeof window<"u"&&window.location)return Ly(window.location.origin,t)}const mL={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*:/},gL=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Ax={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},vL=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function yL(e){return e instanceof Date&&!isNaN(e.getTime())}function _L(e){const t=vL.exec(e);if(!t)return null;const[,n,r,a,i,c,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(c,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 yL(g)?g:null}function bL(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:a,parseDates:i=!0}=t;if(typeof e!="string")return e;const c=e.trim();if(c.length>0&&c[0]==='"'&&c.endsWith('"')&&!c.slice(1,-1).includes('"'))return c.slice(1,-1);const u=c.toLowerCase();if(u.length<=9&&u in Ax)return Ax[u];if(!gL.test(c)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(mL).some(([d,f])=>{const m=f.test(c);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(c,(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=_L(m);if(p)return p}return a?a(f,m):m})}catch(d){if(n)throw d;return e}}function wL(e,t={strict:!0}){return bL(e,t)}let Ro=[],hs=0;const Yf=4,Hc=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=hs+Yf;i<Ro.length;)Ro[i]===r?Ro.splice(i,Yf):i+=Yf;let a=t.indexOf(r);~a&&(t.splice(a,1),--n.lc||n.off())}},notify(r,a){let i=!Ro.length;for(let c of t)Ro.push(c,n.value,r,a);if(i){for(hs=0;hs<Ro.length;hs+=Yf)Ro[hs](Ro[hs+1],Ro[hs+2],Ro[hs+3]);Ro.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},SL=5,Qf=6,Xf=10;let EL=(e,t,n,r)=>(e.events=e.events||{},e.events[n+Xf]||(e.events[n+Xf]=r(a=>{e.events[n].reduceRight((i,c)=>(c(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+Xf](),delete e.events[n+Xf])}),RL=1e3,pA=(e,t)=>EL(e,r=>{let a=t(r);a&&e.events[Qf].push(a)},SL,r=>{let a=e.listen;e.listen=(...c)=>(!e.lc&&!e.active&&(e.active=!0,r()),a(...c));let i=e.off;return e.events[Qf]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let c of e.events[Qf])c();e.events[Qf]=[]}},RL)},()=>{e.listen=a,e.off=i}});function xL(e,t,n){let r=new Set(t).add(void 0);return e.listen((a,i,c)=>{r.has(c)&&n(a,i,c)})}var TL=Object.defineProperty,OL=Object.defineProperties,CL=Object.getOwnPropertyDescriptors,Ix=Object.getOwnPropertySymbols,AL=Object.prototype.hasOwnProperty,IL=Object.prototype.propertyIsEnumerable,Nx=(e,t,n)=>t in e?TL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ao=(e,t)=>{for(var n in t||(t={}))AL.call(t,n)&&Nx(e,n,t[n]);if(Ix)for(var n of Ix(t))IL.call(t,n)&&Nx(e,n,t[n]);return e},Wo=(e,t)=>OL(e,CL(t)),NL=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},kL=async(e,t)=>{var n,r,a,i,c,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((c=m.hooks)==null?void 0:c.onError),f.onRetry.push((u=m.hooks)==null?void 0:u.onRetry)}return{url:e,options:d,hooks:f}},kx=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}},ML=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 PL(e){if(typeof e=="number")return new kx({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new kx(e);case"exponential":return new ML(e);default:throw new Error("Invalid retry strategy")}}var DL=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},LL=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function jL(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 LL.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function $L(e){try{return JSON.parse(e),!0}catch{return!1}}function mA(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 Mx(e){try{return JSON.parse(e)}catch{return e}}function Px(e){return typeof e=="function"}function UL(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&Px(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&Px(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function zL(e){const t=new Headers(e?.headers),n=await DL(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 mA(e)?"application/json":null}function FL(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(mA(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 vA.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function BL(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var HL=class gA extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,gA.prototype)}};async function up(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new HL(n.issues);return n.value}var vA=["get","post","put","patch","delete"],GL=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,a,i,c;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))),(c=u.config)!=null&&c.baseURL&&d.startsWith(u.config.baseURL)&&(d=d.replace(u.config.baseURL,""));const f=u.schema[d];if(f){let m=Wo(Ao({},n),{method:f.method,output:f.output});return n?.disableValidation||(m=Wo(Ao({},m),{body:f.input?await up(f.input,n?.body):n?.body,params:f.params?await up(f.params,n?.params):n?.params,query:f.query?await up(f.query,n?.query):n?.query})),{url:t,options:m}}}return{url:t,options:n}}}),ZL=e=>{async function t(n,r){const a=Wo(Ao(Ao({},e),r),{plugins:[...e?.plugins||[],GL(e||{})]});if(e?.catchAllError)try{return await J0(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 J0(n,a)}return t};function KL(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];vA.includes(p)&&(e=e.replace(`@${p}/`,"/"))}i.endsWith("/")||(i+="/");let[c,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=c.split("/").filter(g=>g.startsWith(":"));for(const[g,y]of p.entries()){const w=r[g];c=c.replace(y,w)}}else for(const[p,g]of Object.entries(r))c=c.replace(`:${p}`,String(g));c=c.split("/").map(encodeURIComponent).join("/"),c.startsWith("/")&&(c=c.slice(1));let f=d.toString();return f=f.length>0?`?${f}`.replace(/\+/g,"%20"):"",i.startsWith("http")?new URL(`${c}${f}`,i):`${i}${c}${f}`}var J0=async(e,t)=>{var n,r,a,i,c,u,d,f;const{hooks:m,url:p,options:g}=await kL(e,t),y=UL(g),w=new AbortController,S=(n=g.signal)!=null?n:w.signal,b=KL(p,g),R=FL(g),E=await zL(g),T=qL(p,g);let C=Wo(Ao({},g),{url:b,headers:E,body:R,method:T,signal:S});for(const U of m.onRequest)if(U){const J=await U(C);J instanceof Object&&(C=J)}("pipeTo"in C&&typeof C.pipeTo=="function"||typeof((r=t?.body)==null?void 0:r.pipe)=="function")&&("duplex"in C||(C.duplex="half"));const{clearTimeout:O}=BL(g,w);let I=await y(C.url,C);O();const k={response:I,request:C};for(const U of m.onResponse)if(U){const J=await U(Wo(Ao({},k),{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(!(C.method!=="HEAD"))return{data:"",error:null};const J=jL(I),ie={data:"",response:I,request:C};if(J==="json"||J==="text"){const F=await I.text(),ae=await((i=C.jsonParser)!=null?i:Mx)(F);ie.data=ae}else ie.data=await I[J]();C?.output&&C.output&&!C.disableValidation&&(ie.data=await up(C.output,ie.data));for(const F of m.onSuccess)F&&await F(Wo(Ao({},ie),{response:(c=t?.hookOptions)!=null&&c.cloneResponse?I.clone():I}));return t?.throw?ie.data:{data:ie.data,error:null}}const D=(u=t?.jsonParser)!=null?u:Mx,z=await I.text(),Y=$L(z),V=Y?await D(z):null,Z={response:I,responseText:z,request:C,error:Wo(Ao({},V),{status:I.status,statusText:I.statusText})};for(const U of m.onError)U&&await U(Wo(Ao({},Z),{response:(d=t?.hookOptions)!=null&&d.cloneResponse?I.clone():I}));if(t?.retry){const U=PL(t.retry),J=(f=t.retryAttempt)!=null?f:0;if(await U.shouldAttemptRetry(J,I)){for(const F of m.onRetry)F&&await F(k);const ie=U.getDelay(J);return await new Promise(F=>setTimeout(F,ie)),await J0(e,Wo(Ao({},t),{retryAttempt:J+1}))}}if(t?.throw)throw new NL(I.status,I.statusText,Y?V:z);return{data:null,error:Wo(Ao({},V),{status:I.status,statusText:I.statusText})}};const jy=Symbol.for("better-auth:broadcast-channel"),WL=()=>Math.floor(Date.now()/1e3);var YL=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 $y(e="better-auth.message"){return globalThis[jy]||(globalThis[jy]=new YL(e)),globalThis[jy]}const Uy=Symbol.for("better-auth:focus-manager");var QL=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 Dx(){return globalThis[Uy]||(globalThis[Uy]=new QL),globalThis[Uy]}const zy=Symbol.for("better-auth:online-manager");var XL=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 Vy(){return globalThis[zy]||(globalThis[zy]=new XL),globalThis[zy]}const JL=()=>typeof window>"u",Cu=(e,t,n,r)=>{const a=Hc({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 c=!1;for(const u of e)u.subscribe(async()=>{JL()||(c?await i():pA(a,()=>{const d=setTimeout(async()=>{c||(await i(),c=!0)},0);return()=>{a.off(),u.off(),clearTimeout(d)}}))});return a},Cc=()=>Math.floor(Date.now()/1e3),ej=5;function tj(e){const{sessionAtom:t,sessionSignal:n,$fetch:r,options:a={}}=e,i=a.sessionOptions?.refetchInterval??0,c=a.sessionOptions?.refetchOnWindowFocus??!0,u=a.sessionOptions?.refetchWhenOffline??!1,d={lastSync:0,lastSessionRequest:0,cachedSession:void 0},f=()=>u||Vy().isOnline,m=E=>{if(!f())return;if(E?.event==="storage"){d.lastSync=Cc(),n.set(!n.get());return}const T=t.get();if(E?.event==="poll"){d.lastSessionRequest=Cc(),r("/get-session").then(C=>{t.set({...T,data:C.data,error:C.error||null}),d.lastSync=Cc(),n.set(!n.get())}).catch(()=>{});return}E?.event==="visibilitychange"&&Cc()-d.lastSessionRequest<ej&&T?.data!==null&&T?.data!==void 0||(T?.data===null||T?.data===void 0||E?.event==="visibilitychange")&&(E?.event==="visibilitychange"&&(d.lastSessionRequest=Cc()),d.lastSync=Cc(),n.set(!n.get()))},p=E=>{$y().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=$y().subscribe(()=>{m({event:"storage"})})},w=()=>{c&&(d.unsubscribeFocus=Dx().subscribe(()=>{m({event:"visibilitychange"})}))},S=()=>{d.unsubscribeOnline=Vy().subscribe(E=>{E&&m({event:"visibilitychange"})})};return{init:()=>{g(),y(),w(),S(),$y().setup(),Dx().setup(),Vy().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 nj={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 rj(e,t){const n=Hc(!1),r=Cu(n,"/get-session",e,{method:"GET"});return pA(r,()=>{const a=tj({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),()=>{a.cleanup()}}),{session:r,$sessionSignal:n}}const oj=(e,t)=>{const n="credentials"in Request.prototype,r=pL(e?.baseURL,e?.basePath)??"/api/auth",a=e?.plugins?.flatMap(C=>C.fetchPlugins).filter(C=>C!==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:c,onError:u,onRequest:d,onResponse:f,...m}=e?.fetchOptions||{},p=ZL({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(C){return C?wL(C,{strict:!1}):null},customFetchImpl:fetch,...m,plugins:[i,...m.plugins||[],...e?.disableDefaultFetchPlugins?[]:[nj],...a]}),{$sessionSignal:g,session:y}=rj(p,e),w=e?.plugins||[];let S={},b={$sessionSignal:g,session:y},R={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const E=[{signal:"$sessionSignal",matcher(C){return C==="/sign-out"||C==="/update-user"||C==="/sign-up/email"||C==="/sign-in/email"||C==="/delete-user"||C==="/verify-email"||C==="/revoke-sessions"||C==="/revoke-session"||C==="/change-email"}}];for(const C of w)C.getAtoms&&Object.assign(b,C.getAtoms?.(p)),C.pathMethods&&Object.assign(R,C.pathMethods),C.atomListeners&&E.push(...C.atomListeners);const T={notify:C=>{b[C].set(!b[C].get())},listen:(C,O)=>{b[C].subscribe(O)},atoms:b};for(const C of w)C.getActions&&Object.assign(S,C.getActions?.(p,T,e));return{get baseURL(){return r},pluginsActions:S,pluginsAtoms:b,pluginPathMethods:R,atomListeners:E,$fetch:p,$store:T}};function aj(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function sj(e,t,n){const r=t[e],{fetchOptions:a,query:i,...c}=n||{};return r||(a?.method?a.method:c&&Object.keys(c).length>0?"POST":"GET")}function ij(e,t,n,r,a){function i(c=[]){return new Proxy(function(){},{get(u,d){if(typeof d!="string"||d==="then"||d==="catch"||d==="finally")return;const f=[...c,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"||aj(m)?m:i(f)},apply:async(u,d,f)=>{const m="/"+c.map(E=>E.replace(/[A-Z]/g,T=>`-${T.toLowerCase()}`)).join("/"),p=f[0]||{},g=f[1]||{},{query:y,fetchOptions:w,...S}=p,b={...g,...w},R=sj(m,n,p);return await t(m,{...b,body:R==="GET"?void 0:{...S,...b?.body||{}},query:y||b?.query,method:R,async onSuccess(E){if(await b?.onSuccess?.(E),!a||b.disableSignal)return;const T=a.filter(C=>C.matcher(m));if(T.length)for(const C of T){const O=r[C.signal];if(!O)return;const I=O.get();setTimeout(()=>{O.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?xL(e,r,d):e.listen(d)},a),c=()=>n.current;return A.useSyncExternalStore(i,c,c)}function lj(e){return`use${uj(e)}`}function uj(e){return e.charAt(0).toUpperCase()+e.slice(1)}function dj(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:a,$store:i,atomListeners:c}=oj(e);let u={};for(const[d,f]of Object.entries(r))u[lj(d)]=()=>cj(f);return ij({...n,...u,$fetch:a,$store:i},a,t,r,c)}function fj(e){return{authorize(t,n="AND"){let r=!1;for(const[a,i]of Object.entries(t)){const c=e[a];if(!c)return{success:!1,error:`You are not allowed to access resource: ${a}`};if(Array.isArray(i))r=i.every(u=>c.includes(u));else if(typeof i=="object"){const u=i;u.connector==="OR"?r=u.actions.some(d=>c.includes(d)):r=u.actions.every(d=>c.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 yA(e){return{newRole(t){return fj(t)},statements:e}}const hj={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},_A=yA(hj),bA=_A.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),wA=_A.newRole({user:[],session:[]}),pj={admin:bA,user:wA},mj=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||pj;for(const r of t)if(n[r]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},gj={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},vb=yA(gj),SA=vb.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),EA=vb.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),RA=vb.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),vj={admin:SA,owner:EA,member:RA},yj=(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 c of n)if(t[c]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},_j=e=>{const t={admin:bA,user:wA,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>mj({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},bj=()=>({id:"magic-link",$InferServerPlugin:{}}),wj=e=>yj(e,e.options.roles||vj),Sj=e=>{const t=Hc(!1),n=Hc(!1),r=Hc(!1),a=Hc(!1),i={admin:SA,member:RA,owner:EA,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(c,u,d)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:f=>wj({role:f.role,options:{ac:e?.ac,roles:i},permissions:f.permissions??f.permission})}}),getAtoms:c=>{const u=Cu(t,"/organization/list",c,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:a,activeOrganization:Cu([n],"/organization/get-full-organization",c,()=>({method:"GET"})),listOrganizations:u,activeMember:Cu([r],"/organization/get-active-member",c,{method:"GET"}),activeMemberRole:Cu([a],"/organization/get-active-member-role",c,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(c){return c==="/organization/create"||c==="/organization/delete"||c==="/organization/update"},signal:"$listOrg"},{matcher(c){return c.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(c){return c.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},Ej=e=>({id:"sso-client",$InferServerPlugin:{}}),Rj=dj({plugins:[Sj({}),_j(),Ej(),bj()]});function xA(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=xA(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function TA(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=xA(e))&&(r&&(r+=" "),r+=t);return r}const xj=(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},Tj=(e,t)=>({classGroupId:e,validator:t}),OA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ap="-",Lx=[],Oj="arbitrary..",Cj=e=>{const t=Ij(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return Aj(c);const u=c.split(Ap),d=u[0]===""&&u.length>1?1:0;return CA(u,d,t)},getConflictingClassGroupIds:(c,u)=>{if(u){const d=r[c],f=n[c];return d?f?xj(f,d):d:f||Lx}return n[c]||Lx}}},CA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const f=CA(e,t+1,i);if(f)return f}const c=n.validators;if(c===null)return;const u=t===0?e.join(Ap):e.slice(t).join(Ap),d=c.length;for(let f=0;f<d;f++){const m=c[f];if(m.validator(u))return m.classGroupId}},Aj=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?Oj+r:void 0})(),Ij=e=>{const{theme:t,classGroups:n}=e;return Nj(n,t)},Nj=(e,t)=>{const n=OA();for(const r in e){const a=e[r];yb(a,n,r,t)}return n},yb=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const c=e[i];kj(c,t,n,r)}},kj=(e,t,n,r)=>{if(typeof e=="string"){Mj(e,t,n);return}if(typeof e=="function"){Pj(e,t,n,r);return}Dj(e,t,n,r)},Mj=(e,t,n)=>{const r=e===""?t:AA(t,e);r.classGroupId=n},Pj=(e,t,n,r)=>{if(Lj(e)){yb(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Tj(n,e))},Dj=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let c=0;c<i;c++){const[u,d]=a[c];yb(d,AA(t,u),n,r)}},AA=(e,t)=>{let n=e;const r=t.split(Ap),a=r.length;for(let i=0;i<a;i++){const c=r[i];let u=n.nextPart.get(c);u||(u=OA(),n.nextPart.set(c,u)),n=u}return n},Lj=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,jj=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,c)=>{n[i]=c,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let c=n[i];if(c!==void 0)return c;if((c=r[i])!==void 0)return a(i,c),c},set(i,c){i in n?n[i]=c:a(i,c)}}},e_="!",jx=":",$j=[],$x=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),Uj=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let c=0,u=0,d=0,f;const m=a.length;for(let S=0;S<m;S++){const b=a[S];if(c===0&&u===0){if(b===jx){i.push(a.slice(d,S)),d=S+1;continue}if(b==="/"){f=S;continue}}b==="["?c++:b==="]"?c--:b==="("?u++:b===")"&&u--}const p=i.length===0?a:a.slice(d);let g=p,y=!1;p.endsWith(e_)?(g=p.slice(0,-1),y=!0):p.startsWith(e_)&&(g=p.slice(1),y=!0);const w=f&&f>d?f-d:void 0;return $x(i,y,g,w)};if(t){const a=t+jx,i=r;r=c=>c.startsWith(a)?i(c.slice(a.length)):$x($j,!1,c,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},zj=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 c=n[i],u=c[0]==="[",d=t.has(c);u||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(c)):a.push(c)}return a.length>0&&(a.sort(),r.push(...a)),r}},Vj=e=>({cache:jj(e.cacheSize),parseClassName:Uj(e),sortModifiers:zj(e),...Cj(e)}),Fj=/\s+/,qj=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,c=[],u=e.trim().split(Fj);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:S}=n(m);if(p){d=m+(d.length>0?" "+d:d);continue}let b=!!S,R=r(b?w.substring(0,S):w);if(!R){if(!b){d=m+(d.length>0?" "+d:d);continue}if(R=r(w),!R){d=m+(d.length>0?" "+d:d);continue}b=!1}const E=g.length===0?"":g.length===1?g[0]:i(g).join(":"),T=y?E+e_:E,C=T+R;if(c.indexOf(C)>-1)continue;c.push(C);const O=a(R,b);for(let I=0;I<O.length;++I){const k=O[I];c.push(T+k)}d=m+(d.length>0?" "+d:d)}return d},Bj=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=IA(n))&&(a&&(a+=" "),a+=r);return a},IA=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=IA(e[r]))&&(n&&(n+=" "),n+=t);return n},Hj=(e,...t)=>{let n,r,a,i;const c=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=c,(...d)=>i(Bj(...d))},Gj=[],Tn=e=>{const t=n=>n[e]||Gj;return t.isThemeGetter=!0,t},NA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,kA=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Zj=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Kj=/^(\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$/,Yj=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qj=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xj=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ps=e=>Zj.test(e),dt=e=>!!e&&!Number.isNaN(Number(e)),ms=e=>!!e&&Number.isInteger(Number(e)),Fy=e=>e.endsWith("%")&&dt(e.slice(0,-1)),Oa=e=>Kj.test(e),MA=()=>!0,Jj=e=>Wj.test(e)&&!Yj.test(e),_b=()=>!1,e$=e=>Qj.test(e),t$=e=>Xj.test(e),n$=e=>!ze(e)&&!Ve(e),r$=e=>zs(e,LA,_b),ze=e=>NA.test(e),fi=e=>zs(e,jA,Jj),Ux=e=>zs(e,d$,dt),o$=e=>zs(e,UA,MA),a$=e=>zs(e,$A,_b),zx=e=>zs(e,PA,_b),s$=e=>zs(e,DA,t$),Jf=e=>zs(e,zA,e$),Ve=e=>kA.test(e),_u=e=>Di(e,jA),i$=e=>Di(e,$A),Vx=e=>Di(e,PA),c$=e=>Di(e,LA),l$=e=>Di(e,DA),eh=e=>Di(e,zA,!0),u$=e=>Di(e,UA,!0),zs=(e,t,n)=>{const r=NA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Di=(e,t,n=!1)=>{const r=kA.exec(e);return r?r[1]?t(r[1]):n:!1},PA=e=>e==="position"||e==="percentage",DA=e=>e==="image"||e==="url",LA=e=>e==="length"||e==="size"||e==="bg-size",jA=e=>e==="length",d$=e=>e==="number",$A=e=>e==="family-name",UA=e=>e==="number"||e==="weight",zA=e=>e==="shadow",f$=()=>{const e=Tn("color"),t=Tn("font"),n=Tn("text"),r=Tn("font-weight"),a=Tn("tracking"),i=Tn("leading"),c=Tn("breakpoint"),u=Tn("container"),d=Tn("spacing"),f=Tn("radius"),m=Tn("shadow"),p=Tn("inset-shadow"),g=Tn("text-shadow"),y=Tn("drop-shadow"),w=Tn("blur"),S=Tn("perspective"),b=Tn("aspect"),R=Tn("ease"),E=Tn("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...C(),Ve,ze],I=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],D=()=>[Ve,ze,d],z=()=>[ps,"full","auto",...D()],Y=()=>[ms,"none","subgrid",Ve,ze],V=()=>["auto",{span:["full",ms,Ve,ze]},ms,Ve,ze],Z=()=>[ms,"auto",Ve,ze],U=()=>["auto","min","max","fr",Ve,ze],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...D()],X=()=>[ps,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],ae=()=>[ps,"screen","full","dvw","lvw","svw","min","max","fit",...D()],fe=()=>[ps,"screen","full","lh","dvh","lvh","svh","min","max","fit",...D()],K=()=>[e,Ve,ze],P=()=>[...C(),Vx,zx,{position:[Ve,ze]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",c$,r$,{size:[Ve,ze]}],L=()=>[Fy,_u,fi],$=()=>["","none","full",f,Ve,ze],Q=()=>["",dt,_u,fi],me=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ae=()=>[dt,Fy,Vx,zx],Ne=()=>["","none",w,Ve,ze],H=()=>["none",dt,Ve,ze],ne=()=>["none",dt,Ve,ze],be=()=>[dt,Ve,ze],pe=()=>[ps,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Oa],breakpoint:[Oa],color:[MA],container:[Oa],"drop-shadow":[Oa],ease:["in","out","in-out"],font:[n$],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Oa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Oa],shadow:[Oa],spacing:["px",dt],text:[Oa],"text-shadow":[Oa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ps,ze,Ve,b]}],container:["container"],columns:[{columns:[dt,ze,Ve,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:O()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[ms,"auto",Ve,ze]}],basis:[{basis:[ps,"full","auto",u,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[dt,ps,"auto","initial","none",ze]}],grow:[{grow:["",dt,Ve,ze]}],shrink:[{shrink:["",dt,Ve,ze]}],order:[{order:[ms,"first","last","none",Ve,ze]}],"grid-cols":[{"grid-cols":Y()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":Y()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pbs:[{pbs:D()}],pbe:[{pbe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...ae()]}],"min-inline-size":[{"min-inline":["auto",...ae()]}],"max-inline-size":[{"max-inline":["none",...ae()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[u,"screen",...X()]}],"min-w":[{"min-w":[u,"screen","none",...X()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,_u,fi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,u$,o$]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Fy,ze]}],"font-family":[{font:[i$,a$,t]}],"font-features":[{"font-features":[ze]}],"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,Ve,ze]}],"line-clamp":[{"line-clamp":[dt,"none",Ve,Ux]}],leading:[{leading:[i,...D()]}],"list-image":[{"list-image":["none",Ve,ze]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ve,ze]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[dt,"from-font","auto",Ve,fi]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[dt,"auto",Ve,ze]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ve,ze]}],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",Ve,ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ms,Ve,ze],radial:["",Ve,ze],conic:[ms,Ve,ze]},l$,s$]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[dt,Ve,ze]}],"outline-w":[{outline:["",dt,_u,fi]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",m,eh,Jf]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",p,eh,Jf]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[dt,fi]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",g,eh,Jf]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[dt,Ve,ze]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"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":[dt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ae()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":Ae()}],"mask-image-t-to-pos":[{"mask-t-to":Ae()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":Ae()}],"mask-image-r-to-pos":[{"mask-r-to":Ae()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":Ae()}],"mask-image-b-to-pos":[{"mask-b-to":Ae()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":Ae()}],"mask-image-l-to-pos":[{"mask-l-to":Ae()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":Ae()}],"mask-image-x-to-pos":[{"mask-x-to":Ae()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":Ae()}],"mask-image-y-to-pos":[{"mask-y-to":Ae()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[Ve,ze]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ae()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[dt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ae()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ve,ze]}],filter:[{filter:["","none",Ve,ze]}],blur:[{blur:Ne()}],brightness:[{brightness:[dt,Ve,ze]}],contrast:[{contrast:[dt,Ve,ze]}],"drop-shadow":[{"drop-shadow":["","none",y,eh,Jf]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",dt,Ve,ze]}],"hue-rotate":[{"hue-rotate":[dt,Ve,ze]}],invert:[{invert:["",dt,Ve,ze]}],saturate:[{saturate:[dt,Ve,ze]}],sepia:[{sepia:["",dt,Ve,ze]}],"backdrop-filter":[{"backdrop-filter":["","none",Ve,ze]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[dt,Ve,ze]}],"backdrop-contrast":[{"backdrop-contrast":[dt,Ve,ze]}],"backdrop-grayscale":[{"backdrop-grayscale":["",dt,Ve,ze]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[dt,Ve,ze]}],"backdrop-invert":[{"backdrop-invert":["",dt,Ve,ze]}],"backdrop-opacity":[{"backdrop-opacity":[dt,Ve,ze]}],"backdrop-saturate":[{"backdrop-saturate":[dt,Ve,ze]}],"backdrop-sepia":[{"backdrop-sepia":["",dt,Ve,ze]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ve,ze]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[dt,"initial",Ve,ze]}],ease:[{ease:["linear","initial",R,Ve,ze]}],delay:[{delay:[dt,Ve,ze]}],animate:[{animate:["none",E,Ve,ze]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Ve,ze]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:H()}],"rotate-x":[{"rotate-x":H()}],"rotate-y":[{"rotate-y":H()}],"rotate-z":[{"rotate-z":H()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:be()}],"skew-x":[{"skew-x":be()}],"skew-y":[{"skew-y":be()}],transform:[{transform:[Ve,ze,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"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",Ve,ze]}],"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":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mbs":[{"scroll-mbs":D()}],"scroll-mbe":[{"scroll-mbe":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pbs":[{"scroll-pbs":D()}],"scroll-pbe":[{"scroll-pbe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",Ve,ze]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[dt,_u,fi,Ux]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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$=Hj(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:c,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=c.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 c(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(c,"init",{value:r}),Object.defineProperty(c,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class Xc 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 FA={};function Ms(e){return FA}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 t_(e,t){return typeof t=="bigint"?t.toString():t}function Rm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function hd(e){return e==null}function bb(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,c=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return c%u/10**i}const Fx=Symbol("evaluating");function St(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Fx)return r===void 0&&(r=Fx,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Li(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Vs(...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 BA="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Qu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const v$=Rm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function sl(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 HA(e){return sl(e)?{...e}:Array.isArray(e)?[...e]:e}const y$=new Set(["string","number","symbol"]);function il(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fs(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function je(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=Vs(e._zod.def,{get shape(){const c={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(c[u]=n.shape[u])}return Li(this,"shape",c),c},checks:[]});return Fs(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=Vs(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete c[u]}return Li(this,"shape",c),c},checks:[]});return Fs(e,i)}function E$(e,t){if(!sl(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 c in t)if(Object.getOwnPropertyDescriptor(i,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Vs(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Li(this,"shape",i),i}});return Fs(e,a)}function R$(e,t){if(!sl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Vs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Li(this,"shape",r),r}});return Fs(e,n)}function x$(e,t){const n=Vs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Li(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Fs(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 c=Vs(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 Li(this,"shape",d),d},checks:[]});return Fs(t,c)}function O$(e,t,n){const r=Vs(t._zod.def,{get shape(){const a=t._zod.def.shape,i={...a};if(n)for(const c in n){if(!(c in i))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(i[c]=new e({type:"nonoptional",innerType:a[c]}))}else for(const c in a)i[c]=new e({type:"nonoptional",innerType:a[c]});return Li(this,"shape",i),i}});return Fs(t,r)}function Gc(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 Si(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function th(e){return typeof e=="string"?e:e?.message}function Ps(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const a=th(e.inst?._zod.def?.error?.(e))??th(t?.error?.(e))??th(n.customError?.(e))??th(n.localeError?.(e))??"Invalid input";r.message=a}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function GA(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function wb(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 ZA=(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,t_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Sb=ye("$ZodError",ZA),xm=ye("$ZodError",ZA,{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(c=>r({issues:c}));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 c=n,u=0;for(;u<i.path.length;){const d=i.path[u];u===i.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(i))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}};return r(e),n}const Tm=e=>(t,n,r,a)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise)throw new Xc;if(c.issues.length){const u=new(a?.Err??e)(c.issues.map(d=>Ps(d,i,Ms())));throw BA(u,a?.callee),u}return c.value},I$=Tm(xm),Om=e=>async(t,n,r,a)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise&&(c=await c),c.issues.length){const u=new(a?.Err??e)(c.issues.map(d=>Ps(d,i,Ms())));throw BA(u,a?.callee),u}return c.value},N$=Om(xm),Cm=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 Xc;return i.issues.length?{success:!1,error:new(e??Sb)(i.issues.map(c=>Ps(c,a,Ms())))}:{success:!0,data:i.value}},KA=Cm(xm),Am=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(c=>Ps(c,a,Ms())))}:{success:!0,data:i.value}},k$=Am(xm),M$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Tm(e)(t,n,a)},P$=e=>(t,n,r)=>Tm(e)(t,n,r),D$=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Om(e)(t,n,a)},L$=e=>async(t,n,r)=>Om(e)(t,n,r),j$=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Cm(e)(t,n,a)},$$=e=>(t,n,r)=>Cm(e)(t,n,r),U$=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Am(e)(t,n,a)},z$=e=>async(t,n,r)=>Am(e)(t,n,r),V$=/^[cC][^\s-]{8,}$/,F$=/^[0-9a-z]+$/,q$=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,B$=/^[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})$/,Bx=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)$/,W$=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Y$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Q$(){return new RegExp(Y$,"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}$/,YA="(?:(?:\\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(`^${YA}$`);function QA(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(`^${QA(e)}$`)}function s8(e){const t=QA({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(`^${YA}T(?:${r})$`)}const i8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},c8=/^-?\d+$/,XA=/^-?\d+(?:\.\d+)?$/,l8=/^(?:true|false)$/i,u8=/^null$/i,d8=/^[^A-Z]*$/,f8=/^[^a-z]*$/,Yn=ye("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),JA={number:"number",bigint:"bigint",object:"date"},eI=ye("$ZodCheckLessThan",(e,t)=>{Yn.init(e,t);const n=JA[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})}}),tI=ye("$ZodCheckGreaterThan",(e,t)=>{Yn.init(e,t);const n=JA[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)=>{Yn.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)=>{Yn.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(c=>{const u=c._zod.bag;u.format=t.format,u.minimum=a,u.maximum=i,n&&(u.pattern=c8)}),e._zod.check=c=>{const u=c.value;if(n){if(!Number.isInteger(u)){c.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?c.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}):c.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&&c.issues.push({origin:"number",input:u,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),u>i&&c.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;Yn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!hd(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:GA(a),code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),g8=ye("$ZodCheckMinSize",(e,t)=>{var n;Yn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!hd(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:GA(a),code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),v8=ye("$ZodCheckMaxLength",(e,t)=>{var n;Yn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!hd(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 c=wb(a);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),y8=ye("$ZodCheckMinLength",(e,t)=>{var n;Yn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!hd(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 c=wb(a);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),_8=ye("$ZodCheckLengthEquals",(e,t)=>{var n;Yn.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!hd(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 c=wb(a),u=i>t.length;r.issues.push({origin:c,...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})}}),Im=ye("$ZodCheckStringFormat",(e,t)=>{var n,r;Yn.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)=>{Im.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),Im.init(e,t)}),S8=ye("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=f8),Im.init(e,t)}),E8=ye("$ZodCheckIncludes",(e,t)=>{Yn.init(e,t);const n=il(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)=>{Yn.init(e,t);const n=new RegExp(`^${il(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)=>{Yn.init(e,t);const n=new RegExp(`.*${il(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)=>{Yn.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)=>{Yn.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(c=>c),a=Math.min(...r.map(c=>c.length-c.trimStart().length)),i=r.map(c=>c.slice(a)).map(c=>" ".repeat(this.indent*2)+c);for(const c of i)this.content.push(c)}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:6},$t=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=(c,u,d)=>{let f=Gc(c),m;for(const p of u){if(p._zod.def.when){if(!p._zod.def.when(c))continue}else if(f)continue;const g=c.issues.length,y=p._zod.check(c);if(y instanceof Promise&&d?.async===!1)throw new Xc;if(m||y instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await y,c.issues.length!==g&&(f||(f=Gc(c,g)))});else{if(c.issues.length===g)continue;f||(f=Gc(c,g))}}return m?m.then(()=>c):c},i=(c,u,d)=>{if(Gc(c))return c.aborted=!0,c;const f=a(u,r,d);if(f instanceof Promise){if(d.async===!1)throw new Xc;return f.then(m=>e._zod.parse(m,d))}return e._zod.parse(f,d)};e._zod.run=(c,u)=>{if(u.skipChecks)return e._zod.parse(c,u);if(u.direction==="backward"){const f=e._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(m=>i(m,c,u)):i(f,c,u)}const d=e._zod.parse(c,u);if(d instanceof Promise){if(u.async===!1)throw new Xc;return d.then(f=>a(f,r,u))}return a(d,r,u)}}St(e,"~standard",()=>({validate:a=>{try{const i=KA(e,a);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return k$(e,a).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),Eb=ye("$ZodString",(e,t)=>{$t.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}}),Jt=ye("$ZodStringFormat",(e,t)=>{Im.init(e,t),Eb.init(e,t)}),I8=ye("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=K$),Jt.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=Bx(r))}else t.pattern??(t.pattern=Bx());Jt.init(e,t)}),k8=ye("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=W$),Jt.init(e,t)}),M8=ye("$ZodURL",(e,t)=>{Jt.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$()),Jt.init(e,t)}),D8=ye("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=G$),Jt.init(e,t)}),L8=ye("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=V$),Jt.init(e,t)}),j8=ye("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=F$),Jt.init(e,t)}),$8=ye("$ZodULID",(e,t)=>{t.pattern??(t.pattern=q$),Jt.init(e,t)}),U8=ye("$ZodXID",(e,t)=>{t.pattern??(t.pattern=B$),Jt.init(e,t)}),z8=ye("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=H$),Jt.init(e,t)}),V8=ye("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=s8(t)),Jt.init(e,t)}),F8=ye("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=o8),Jt.init(e,t)}),q8=ye("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=a8(t)),Jt.init(e,t)}),B8=ye("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Z$),Jt.init(e,t)}),H8=ye("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=X$),Jt.init(e,t),e._zod.bag.format="ipv4"}),G8=ye("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=J$),Jt.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),Jt.init(e,t)}),K8=ye("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=t8),Jt.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 c=Number(i);if(`${c}`!==i)throw new Error;if(c<0||c>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 nI(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const W8=ye("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=n8),Jt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{nI(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Y8(e){if(!WA.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return nI(n)}const Q8=ye("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=WA),Jt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Y8(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),Jt.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)=>{Jt.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})}}),rI=ye("$ZodNumber",(e,t)=>{$t.init(e,t),e._zod.pattern=e._zod.bag.pattern??XA,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),rI.init(e,t)}),n9=ye("$ZodBoolean",(e,t)=>{$t.init(e,t),e._zod.pattern=l8,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)=>{$t.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)=>{$t.init(e,t),e._zod.parse=n=>n}),a9=ye("$ZodUnknown",(e,t)=>{$t.init(e,t),e._zod.parse=n=>n}),s9=ye("$ZodNever",(e,t)=>{$t.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Hx(e,t,n){e.issues.length&&t.issues.push(...Si(n,e.issues)),t.value[n]=e.value}const i9=ye("$ZodArray",(e,t)=>{$t.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 c=0;c<a.length;c++){const u=a[c],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?i.push(d.then(f=>Hx(f,n,c))):Hx(d,n,c)}return i.length?Promise.all(i).then(()=>n):n}});function Ip(e,t,n,r,a){if(e.issues.length){if(a&&!(n in r))return;t.issues.push(...Si(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function oI(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 aI(e,t,n,r,a,i){const c=[],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"){c.push(p);continue}const g=d.run({value:t[p],issues:[]},r);g instanceof Promise?e.push(g.then(y=>Ip(y,n,p,t,m))):Ip(g,n,p,t,m)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const c9=ye("$ZodObject",(e,t)=>{if($t.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=Rm(()=>oI(t));St(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 c;e._zod.parse=(u,d)=>{c??(c=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=c.shape;for(const g of c.keys){const y=p[g],w=y._zod.optout==="optional",S=y._zod.run({value:f[g],issues:[]},d);S instanceof Promise?m.push(S.then(b=>Ip(b,u,g,f,w))):Ip(S,u,g,f,w)}return i?aI(m,f,u,d,r.value,e):m.length?Promise.all(m).then(()=>u):u}}),l9=ye("$ZodObjectJIT",(e,t)=>{c9.init(e,t);const n=e._zod.parse,r=Rm(()=>oI(t)),a=g=>{const y=new C8(["shape","payload","ctx"]),w=r.value,S=T=>{const C=qx(T);return`shape[${C}]._zod.run({ value: input[${C}], issues: [] }, ctx)`};y.write("const input = payload.value;");const b=Object.create(null);let R=0;for(const T of w.keys)b[T]=`key_${R++}`;y.write("const newResult = {};");for(const T of w.keys){const C=b[T],O=qx(T),k=g[T]?._zod?.optout==="optional";y.write(`const ${C} = ${S(T)};`),k?y.write(`
|
|
13
|
+
if (${C}.issues.length) {
|
|
14
|
+
if (${O} in input) {
|
|
15
|
+
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
16
|
+
...iss,
|
|
17
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
18
|
+
})));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (${C}.value === undefined) {
|
|
23
|
+
if (${O} in input) {
|
|
24
|
+
newResult[${O}] = undefined;
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
newResult[${O}] = ${C}.value;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
`):y.write(`
|
|
31
|
+
if (${C}.issues.length) {
|
|
32
|
+
payload.issues = payload.issues.concat(${C}.issues.map(iss => ({
|
|
33
|
+
...iss,
|
|
34
|
+
path: iss.path ? [${O}, ...iss.path] : [${O}]
|
|
35
|
+
})));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (${C}.value === undefined) {
|
|
39
|
+
if (${O} in input) {
|
|
40
|
+
newResult[${O}] = undefined;
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
newResult[${O}] = ${C}.value;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
`)}y.write("payload.value = newResult;"),y.write("return payload;");const E=y.compile();return(T,C)=>E(g,T,C)};let i;const c=Qu,u=!FA.jitless,f=u&&v$.value,m=t.catchall;let p;e._zod.parse=(g,y)=>{p??(p=r.value);const w=g.value;return c(w)?u&&f&&y?.async===!1&&y.jitless!==!0?(i||(i=a(t.shape)),g=i(g,y),m?aI([],w,g,y,p,e):g):n(g,y):(g.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),g)}});function Gx(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=>!Gc(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(c=>Ps(c,r,Ms())))}),t)}const sI=ye("$ZodUnion",(e,t)=>{$t.init(e,t),St(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),St(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),St(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),St(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=>bb(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 c=!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),c=!0;else{if(f.issues.length===0)return f;u.push(f)}}return c?Promise.all(u).then(d=>Gx(d,a,e,i)):Gx(u,a,e,i)}}),u9=ye("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,sI.init(e,t);const n=e._zod.parse;St(e._zod,"propValues",()=>{const a={};for(const i of t.options){const c=i._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[u,d]of Object.entries(c)){a[u]||(a[u]=new Set);for(const f of d)a[u].add(f)}}return a});const r=Rm(()=>{const a=t.options,i=new Map;for(const c of a){const u=c._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(const d of u){if(i.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);i.set(d,c)}}return i});e._zod.parse=(a,i)=>{const c=a.value;if(!Qu(c))return a.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),a;const u=r.value.get(c?.[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:c,path:[t.discriminator],inst:e}),a)}}),d9=ye("$ZodIntersection",(e,t)=>{$t.init(e,t),e._zod.parse=(n,r)=>{const a=n.value,i=t.left._zod.run({value:a,issues:[]},r),c=t.right._zod.run({value:a,issues:[]},r);return i instanceof Promise||c instanceof Promise?Promise.all([i,c]).then(([d,f])=>Zx(n,d,f)):Zx(n,i,c)}});function n_(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(sl(e)&&sl(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 c=n_(e[i],t[i]);if(!c.valid)return{valid:!1,mergeErrorPath:[i,...c.mergeErrorPath]};a[i]=c.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],c=n_(a,i);if(!c.valid)return{valid:!1,mergeErrorPath:[r,...c.mergeErrorPath]};n.push(c.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Zx(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}),Gc(e))return e;const c=n_(t.value,n.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const f9=ye("$ZodTuple",(e,t)=>{$t.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 c=[],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?c.push(p.then(g=>nh(g,r,f))):nh(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?c.push(g.then(y=>nh(y,r,f))):nh(g,r,f)}}return c.length?Promise.all(c).then(()=>r):r}});function nh(e,t,n){e.issues.length&&t.issues.push(...Si(n,e.issues)),t.value[n]=e.value}const h9=ye("$ZodRecord",(e,t)=>{$t.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!sl(a))return n.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),n;const i=[],c=t.keyType._zod.values;if(c){n.value={};const u=new Set;for(const f of c)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(...Si(f,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Si(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"&&XA.test(u)&&d.issues.length){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=>Ps(p,r,Ms())),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(...Si(u,p.issues)),n.value[d.value]=p.value})):(m.issues.length&&n.issues.push(...Si(u,m.issues)),n.value[d.value]=m.value)}}return i.length?Promise.all(i).then(()=>n):n}}),p9=ye("$ZodEnum",(e,t)=>{$t.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"?il(a):a.toString()).join("|")})$`),e._zod.parse=(a,i)=>{const c=a.value;return r.has(c)||a.issues.push({code:"invalid_value",values:n,input:c,inst:e}),a}}),m9=ye("$ZodLiteral",(e,t)=>{if($t.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"?il(r):r?il(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)=>{$t.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)=>{$t.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(c=>(n.value=c,n));if(a instanceof Promise)throw new Xc;return n.value=a,n}});function Kx(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const iI=ye("$ZodOptional",(e,t)=>{$t.init(e,t),e._zod.optin="optional",e._zod.optout="optional",St(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),St(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${bb(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=>Kx(i,n.value)):Kx(a,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),y9=ye("$ZodExactOptional",(e,t)=>{iI.init(e,t),St(e._zod,"values",()=>t.innerType._zod.values),St(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),_9=ye("$ZodNullable",(e,t)=>{$t.init(e,t),St(e._zod,"optin",()=>t.innerType._zod.optin),St(e._zod,"optout",()=>t.innerType._zod.optout),St(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${bb(n.source)}|null)$`):void 0}),St(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)=>{$t.init(e,t),e._zod.optin="optional",St(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)=>{$t.init(e,t),e._zod.optin="optional",St(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)=>{$t.init(e,t),St(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=>Yx(i,e)):Yx(a,e)}});function Yx(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)=>{$t.init(e,t),St(e._zod,"optin",()=>t.innerType._zod.optin),St(e._zod,"optout",()=>t.innerType._zod.optout),St(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(c=>Ps(c,r,Ms()))},input:n.value}),n.issues=[]),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(i=>Ps(i,r,Ms()))},input:n.value}),n.issues=[]),n)}}),R9=ye("$ZodPipe",(e,t)=>{$t.init(e,t),St(e._zod,"values",()=>t.in._zod.values),St(e._zod,"optin",()=>t.in._zod.optin),St(e._zod,"optout",()=>t.out._zod.optout),St(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(c=>rh(c,t.in,r)):rh(i,t.in,r)}const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(i=>rh(i,t.out,r)):rh(a,t.out,r)}});function rh(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)=>{$t.init(e,t),St(e._zod,"propValues",()=>t.innerType._zod.propValues),St(e._zod,"values",()=>t.innerType._zod.values),St(e._zod,"optin",()=>t.innerType?._zod?.optin),St(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(Qx):Qx(a)}});function Qx(e){return e.value=Object.freeze(e.value),e}const T9=ye("$ZodLazy",(e,t)=>{$t.init(e,t),St(e._zod,"innerType",()=>t.getter()),St(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),St(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),St(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),St(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)=>{Yn.init(e,t),$t.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=>Xx(i,n,r,e));Xx(a,n,r,e)}});function Xx(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 Jx;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}(Jx=globalThis).__zod_globalRegistry??(Jx.__zod_globalRegistry=A9());const Au=globalThis.__zod_globalRegistry;function I9(e,t){return new e({type:"string",...je(t)})}function N9(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...je(t)})}function eT(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...je(t)})}function k9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...je(t)})}function M9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...je(t)})}function P9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...je(t)})}function D9(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...je(t)})}function cI(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...je(t)})}function L9(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...je(t)})}function j9(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...je(t)})}function $9(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...je(t)})}function U9(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...je(t)})}function z9(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...je(t)})}function V9(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...je(t)})}function F9(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...je(t)})}function q9(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...je(t)})}function B9(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...je(t)})}function H9(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...je(t)})}function G9(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...je(t)})}function Z9(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...je(t)})}function K9(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...je(t)})}function W9(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...je(t)})}function Y9(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...je(t)})}function Q9(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...je(t)})}function X9(e,t){return new e({type:"string",format:"date",check:"string_format",...je(t)})}function J9(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...je(t)})}function e7(e,t){return new e({type:"string",format:"duration",check:"string_format",...je(t)})}function t7(e,t){return new e({type:"number",checks:[],...je(t)})}function n7(e,t){return new e({type:"number",coerce:!0,checks:[],...je(t)})}function r7(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...je(t)})}function o7(e,t){return new e({type:"boolean",...je(t)})}function a7(e,t){return new e({type:"boolean",coerce:!0,...je(t)})}function s7(e,t){return new e({type:"null",...je(t)})}function i7(e){return new e({type:"any"})}function c7(e){return new e({type:"unknown"})}function l7(e,t){return new e({type:"never",...je(t)})}function tT(e,t){return new eI({check:"less_than",...je(t),value:e,inclusive:!1})}function qy(e,t){return new eI({check:"less_than",...je(t),value:e,inclusive:!0})}function nT(e,t){return new tI({check:"greater_than",...je(t),value:e,inclusive:!1})}function By(e,t){return new tI({check:"greater_than",...je(t),value:e,inclusive:!0})}function rT(e,t){return new h8({check:"multiple_of",...je(t),value:e})}function u7(e,t){return new m8({check:"max_size",...je(t),maximum:e})}function d7(e,t){return new g8({check:"min_size",...je(t),minimum:e})}function lI(e,t){return new v8({check:"max_length",...je(t),maximum:e})}function Np(e,t){return new y8({check:"min_length",...je(t),minimum:e})}function uI(e,t){return new _8({check:"length_equals",...je(t),length:e})}function f7(e,t){return new b8({check:"string_format",format:"regex",...je(t),pattern:e})}function h7(e){return new w8({check:"string_format",format:"lowercase",...je(e)})}function p7(e){return new S8({check:"string_format",format:"uppercase",...je(e)})}function m7(e,t){return new E8({check:"string_format",format:"includes",...je(t),includes:e})}function g7(e,t){return new R8({check:"string_format",format:"starts_with",...je(t),prefix:e})}function v7(e,t){return new x8({check:"string_format",format:"ends_with",...je(t),suffix:e})}function y7(e,t){return new T8({check:"mime_type",mime:e,...je(t)})}function yl(e){return new O8({check:"overwrite",tx:e})}function _7(e){return yl(t=>t.normalize(e))}function b7(){return yl(e=>e.trim())}function w7(){return yl(e=>e.toLowerCase())}function S7(){return yl(e=>e.toUpperCase())}function E7(){return yl(e=>g$(e))}function R7(e,t,n){return new e({type:"array",element:t,...je(n)})}function x7(e,t){return new e({type:"file",...je(t)})}function T7(e,t,n){const r=je(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,...je(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 Yn({check:"custom",...je(t)});return n._zod.check=e,n}function kp(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??Au,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 Gt(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 c={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,c);const u=e._zod.toJSONSchema?.();if(u)c.schema=u;else{const m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,m);else{const g=c.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&&(c.ref||(c.ref=p),Gt(p,t,m),t.seen.get(p).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(c.schema,d),t.io==="input"&&lr(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&c.schema._prefault&&((r=c.schema).default??(r.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function Mp(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 c of e.seen.entries()){const u=e.metadataRegistry.get(c[0])?.id;if(u){const d=r.get(u);if(d&&d!==c[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,c[0])}}const a=c=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(c[0])?.id,g=e.external.uri??(w=>w);if(p)return{ref:g(p)};const y=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=y,{defId:y,ref:`${g("__shared")}#/${u}/${y}`}}if(c[1]===n)return{ref:"#"};const f=`#/${u}/`,m=c[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:f+m}},i=c=>{if(c[1].schema.$ref)return;const u=c[1],{ref:d,defId:f}=a(c);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 c of e.seen.entries()){const u=c[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 c of e.seen.entries()){const u=c[1];if(t===c[0]){i(c);continue}if(e.external){const f=e.external.registry.get(c[0])?.id;if(t!==c[0]&&f){i(c);continue}}if(e.metadataRegistry.get(c[0])?.id){i(c);continue}if(u.cycle){i(c);continue}if(u.count>1&&e.reused==="ref"){i(c);continue}}}function Pp(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=c=>{const u=e.seen.get(c);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),c._zod.parent===m)for(const S in d)S==="$ref"||S==="allOf"||S in f||delete d[S];if(y.$ref&&g.def)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=c._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:c,jsonSchema:d,path:u.path??[]})};for(const c of[...e.seen.entries()].reverse())r(c[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 c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(c)}Object.assign(a,n.def??n.schema);const i=e.external?.defs??{};for(const c of e.seen.entries()){const u=c[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 c=JSON.parse(JSON.stringify(a));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Dp(t,"input",e.processors),output:Dp(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function lr(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 lr(r.element,n);if(r.type==="set")return lr(r.valueType,n);if(r.type==="lazy")return lr(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 lr(r.innerType,n);if(r.type==="intersection")return lr(r.left,n)||lr(r.right,n);if(r.type==="record"||r.type==="map")return lr(r.keyType,n)||lr(r.valueType,n);if(r.type==="pipe")return lr(r.in,n)||lr(r.out,n);if(r.type==="object"){for(const a in r.shape)if(lr(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(lr(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(lr(a,n))return!0;return!!(r.rest&&lr(r.rest,n))}return!1}const I7=(e,t={})=>n=>{const r=kp({...n,processors:t});return Gt(e,r),Mp(r,e),Pp(r,e)},Dp=(e,t,n={})=>r=>{const{libraryOptions:a,target:i}=r??{},c=kp({...a??{},target:i,io:t,processors:n});return Gt(e,c),Mp(c,e),Pp(c,e)},N7={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},dI=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:i,maximum:c,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(a.minLength=i),typeof c=="number"&&(a.maxLength=c),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}))])}},fI=(e,t,n,r)=>{const a=n,{minimum:i,maximum:c,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 c=="number"&&(a.maximum=c,typeof f=="number"&&t.target!=="draft-04"&&(f<=c?delete a.maximum:delete a.exclusiveMaximum)),typeof d=="number"&&(a.multipleOf=d)},hI=(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")},pI=(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")},mI=(e,t,n,r)=>{n.not={}},gI=(e,t,n,r)=>{},vI=(e,t,n,r)=>{},L7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},yI=(e,t,n,r)=>{const a=e._zod.def,i=qA(a.entries);i.every(c=>typeof c=="number")&&(n.type="number"),i.every(c=>typeof c=="string")&&(n.type="string"),n.enum=i},_I=(e,t,n,r)=>{const a=e._zod.def,i=[];for(const c of a.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(c))}else i.push(c);if(i.length!==0)if(i.length===1){const c=i[0];n.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[c]:n.const=c}else i.every(c=>typeof c=="number")&&(n.type="number"),i.every(c=>typeof c=="string")&&(n.type="string"),i.every(c=>typeof c=="boolean")&&(n.type="boolean"),i.every(c=>c===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},bI=(e,t,n,r)=>{const a=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:c,maximum:u,mime:d}=e._zod.bag;c!==void 0&&(i.minLength=c),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"},wI=(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")},SI=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},V7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},F7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},EI=(e,t,n,r)=>{const a=n,i=e._zod.def,{minimum:c,maximum:u}=e._zod.bag;typeof c=="number"&&(a.minItems=c),typeof u=="number"&&(a.maxItems=u),a.type="array",a.items=Gt(i.element,t,{...r,path:[...r.path,"items"]})},RI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object",a.properties={};const c=i.shape;for(const f in c)a.properties[f]=Gt(c[f],t,{...r,path:[...r.path,"properties",f]});const u=new Set(Object.keys(c)),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=Gt(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},xI=(e,t,n,r)=>{const a=e._zod.def,i=a.inclusive===!1,c=a.options.map((u,d)=>Gt(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=c:n.anyOf=c},TI=(e,t,n,r)=>{const a=e._zod.def,i=Gt(a.left,t,{...r,path:[...r.path,"allOf",0]}),c=Gt(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(c)?c.allOf:[c]];n.allOf=d},OI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="array";const c=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)=>Gt(g,t,{...r,path:[...r.path,c,y]})),f=i.rest?Gt(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)},CI=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object";const c=i.keyType,d=c._zod.bag?.patterns;if(i.mode==="loose"&&d&&d.size>0){const m=Gt(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=Gt(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),a.additionalProperties=Gt(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=c._zod.values;if(f){const m=[...f].filter(p=>typeof p=="string"||typeof p=="number");m.length>0&&(a.required=m)}},AI=(e,t,n,r)=>{const a=e._zod.def,i=Gt(a.innerType,t,r),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=a.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},II=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},NI=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},kI=(e,t,n,r)=>{const a=e._zod.def;Gt(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)))},MI=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType;let c;try{c=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=c},PI=(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;Gt(i,t,r);const c=t.seen.get(e);c.ref=i},DI=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.readOnly=!0},q7=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},Rb=(e,t,n,r)=>{const a=e._zod.def;Gt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},LI=(e,t,n,r)=>{const a=e._zod.innerType;Gt(a,t,r);const i=t.seen.get(e);i.ref=a},oT={string:dI,number:fI,boolean:hI,bigint:k7,symbol:M7,null:pI,undefined:P7,void:D7,never:mI,any:gI,unknown:vI,date:L7,enum:yI,literal:_I,nan:j7,template_literal:$7,file:bI,success:U7,custom:wI,function:z7,transform:SI,map:V7,set:F7,array:EI,object:RI,union:xI,intersection:TI,tuple:OI,record:CI,nullable:AI,nonoptional:II,default:NI,prefault:kI,catch:MI,pipe:PI,readonly:DI,promise:q7,optional:Rb,lazy:LI};function eoe(e,t){if("_idmap"in e){const r=e,a=kp({...t,processors:oT}),i={};for(const d of r._idmap.entries()){const[f,m]=d;Gt(m,a)}const c={},u={registry:r,uri:t?.uri,defs:i};a.external=u;for(const d of r._idmap.entries()){const[f,m]=d;Mp(a,m),c[f]=Pp(a,m)}if(Object.keys(i).length>0){const d=a.target==="draft-2020-12"?"$defs":"definitions";c.__shared={[d]:i}}return{schemas:c}}const n=kp({...t,processors:oT});return Gt(e,n),Mp(n,e),Pp(n,e)}const B7=ye("ZodISODateTime",(e,t)=>{V8.init(e,t),nn.init(e,t)});function jI(e){return Q9(B7,e)}const H7=ye("ZodISODate",(e,t)=>{F8.init(e,t),nn.init(e,t)});function G7(e){return X9(H7,e)}const Z7=ye("ZodISOTime",(e,t)=>{q8.init(e,t),nn.init(e,t)});function K7(e){return J9(Z7,e)}const W7=ye("ZodISODuration",(e,t)=>{B8.init(e,t),nn.init(e,t)});function Y7(e){return e7(W7,e)}const Q7=(e,t)=>{Sb.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,t_,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,t_,2)}},isEmpty:{get(){return e.issues.length===0}}})},mo=ye("ZodError",Q7,{Parent:Error}),X7=Tm(mo),J7=Om(mo),eU=Cm(mo),tU=Am(mo),nU=M$(mo),rU=P$(mo),oU=D$(mo),aU=L$(mo),sU=j$(mo),iU=$$(mo),cU=U$(mo),lU=z$(mo),Ft=ye("ZodType",(e,t)=>($t.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Dp(e,"input"),output:Dp(e,"output")}}),e.toJSONSchema=I7(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Vs(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)=>Fs(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)=>cU(e,n,r),e.safeDecodeAsync=async(n,r)=>lU(e,n,r),e.refine=(n,r)=>e.check(JU(n,r)),e.superRefine=n=>e.check(ez(n)),e.overwrite=n=>e.check(yl(n)),e.optional=()=>sn(e),e.exactOptional=()=>zU(e),e.nullable=()=>cT(e),e.nullish=()=>sn(cT(e)),e.nonoptional=n=>GU(e,n),e.array=()=>ve(e),e.or=n=>mt([e,n]),e.and=n=>pd(e,n),e.transform=n=>o_(e,BI(n)),e.default=n=>qU(e,n),e.prefault=n=>HU(e,n),e.catch=n=>KU(e,n),e.pipe=n=>o_(e,n),e.readonly=()=>QU(e),e.describe=n=>{const r=e.clone();return Au.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Au.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Au.get(e);const r=e.clone();return Au.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),$I=ye("_ZodString",(e,t)=>{Eb.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,a,i)=>dI(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(Np(...r)),e.max=(...r)=>e.check(lI(...r)),e.length=(...r)=>e.check(uI(...r)),e.nonempty=(...r)=>e.check(Np(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())}),Nm=ye("ZodString",(e,t)=>{Eb.init(e,t),$I.init(e,t),e.email=n=>e.check(N9(uU,n)),e.url=n=>e.check(cI(UI,n)),e.jwt=n=>e.check(Y9(TU,n)),e.emoji=n=>e.check(L9(fU,n)),e.guid=n=>e.check(eT(aT,n)),e.uuid=n=>e.check(k9(oh,n)),e.uuidv4=n=>e.check(M9(oh,n)),e.uuidv6=n=>e.check(P9(oh,n)),e.uuidv7=n=>e.check(D9(oh,n)),e.nanoid=n=>e.check(j9(hU,n)),e.guid=n=>e.check(eT(aT,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(V9(vU,n)),e.ksuid=n=>e.check(F9(yU,n)),e.ipv4=n=>e.check(q9(_U,n)),e.ipv6=n=>e.check(B9(bU,n)),e.cidrv4=n=>e.check(H9(wU,n)),e.cidrv6=n=>e.check(G9(SU,n)),e.e164=n=>e.check(W9(xU,n)),e.datetime=n=>e.check(jI(n)),e.date=n=>e.check(G7(n)),e.time=n=>e.check(K7(n)),e.duration=n=>e.check(Y7(n))});function M(e){return I9(Nm,e)}const nn=ye("ZodStringFormat",(e,t)=>{Jt.init(e,t),$I.init(e,t)}),uU=ye("ZodEmail",(e,t)=>{k8.init(e,t),nn.init(e,t)}),aT=ye("ZodGUID",(e,t)=>{I8.init(e,t),nn.init(e,t)}),oh=ye("ZodUUID",(e,t)=>{N8.init(e,t),nn.init(e,t)}),UI=ye("ZodURL",(e,t)=>{M8.init(e,t),nn.init(e,t)});function dU(e){return cI(UI,e)}const fU=ye("ZodEmoji",(e,t)=>{P8.init(e,t),nn.init(e,t)}),hU=ye("ZodNanoID",(e,t)=>{D8.init(e,t),nn.init(e,t)}),pU=ye("ZodCUID",(e,t)=>{L8.init(e,t),nn.init(e,t)}),mU=ye("ZodCUID2",(e,t)=>{j8.init(e,t),nn.init(e,t)}),gU=ye("ZodULID",(e,t)=>{$8.init(e,t),nn.init(e,t)}),vU=ye("ZodXID",(e,t)=>{U8.init(e,t),nn.init(e,t)}),yU=ye("ZodKSUID",(e,t)=>{z8.init(e,t),nn.init(e,t)}),_U=ye("ZodIPv4",(e,t)=>{H8.init(e,t),nn.init(e,t)}),bU=ye("ZodIPv6",(e,t)=>{G8.init(e,t),nn.init(e,t)}),wU=ye("ZodCIDRv4",(e,t)=>{Z8.init(e,t),nn.init(e,t)}),SU=ye("ZodCIDRv6",(e,t)=>{K8.init(e,t),nn.init(e,t)}),EU=ye("ZodBase64",(e,t)=>{W8.init(e,t),nn.init(e,t)}),RU=ye("ZodBase64URL",(e,t)=>{Q8.init(e,t),nn.init(e,t)}),xU=ye("ZodE164",(e,t)=>{X8.init(e,t),nn.init(e,t)}),TU=ye("ZodJWT",(e,t)=>{e9.init(e,t),nn.init(e,t)}),Ua=ye("ZodNumber",(e,t)=>{rI.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,a,i)=>fI(e,r,a),e.gt=(r,a)=>e.check(nT(r,a)),e.gte=(r,a)=>e.check(By(r,a)),e.min=(r,a)=>e.check(By(r,a)),e.lt=(r,a)=>e.check(tT(r,a)),e.lte=(r,a)=>e.check(qy(r,a)),e.max=(r,a)=>e.check(qy(r,a)),e.int=r=>e.check(sT(r)),e.safe=r=>e.check(sT(r)),e.positive=r=>e.check(nT(0,r)),e.nonnegative=r=>e.check(By(0,r)),e.negative=r=>e.check(tT(0,r)),e.nonpositive=r=>e.check(qy(0,r)),e.multipleOf=(r,a)=>e.check(rT(r,a)),e.step=(r,a)=>e.check(rT(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 Pe(e){return t7(Ua,e)}const OU=ye("ZodNumberFormat",(e,t)=>{t9.init(e,t),Ua.init(e,t)});function sT(e){return r7(OU,e)}const zI=ye("ZodBoolean",(e,t)=>{n9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>hI(e,n,r)});function We(e){return o7(zI,e)}const CU=ye("ZodNull",(e,t)=>{r9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>pI(e,n,r)});function _l(e){return s7(CU,e)}const AU=ye("ZodAny",(e,t)=>{o9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>gI()});function Gr(){return i7(AU)}const IU=ye("ZodUnknown",(e,t)=>{a9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>vI()});function ot(){return c7(IU)}const NU=ye("ZodNever",(e,t)=>{s9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>mI(e,n,r)});function Lp(e){return l7(NU,e)}const VI=ye("ZodArray",(e,t)=>{i9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>EI(e,n,r,a),e.element=t.element,e.min=(n,r)=>e.check(Np(n,r)),e.nonempty=n=>e.check(Np(1,n)),e.max=(n,r)=>e.check(lI(n,r)),e.length=(n,r)=>e.check(uI(n,r)),e.unwrap=()=>e.element});function ve(e,t){return R7(VI,e,t)}const km=ye("ZodObject",(e,t)=>{l9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>RI(e,n,r,a),St(e,"shape",()=>t.shape),e.keyof=()=>Et(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ot()}),e.loose=()=>e.clone({...e._zod.def,catchall:ot()}),e.strict=()=>e.clone({...e._zod.def,catchall:Lp()}),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$(HI,e,n[0]),e.required=(...n)=>O$(GI,e,n[0])});function re(e,t){const n={type:"object",shape:e??{},...je(t)};return new km(n)}function toe(e,t){return new km({type:"object",shape:e,catchall:Lp(),...je(t)})}function Kn(e,t){return new km({type:"object",shape:e,catchall:ot(),...je(t)})}const FI=ye("ZodUnion",(e,t)=>{sI.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>xI(e,n,r,a),e.options=t.options});function mt(e,t){return new FI({type:"union",options:e,...je(t)})}const kU=ye("ZodDiscriminatedUnion",(e,t)=>{FI.init(e,t),u9.init(e,t)});function xb(e,t,n){return new kU({type:"union",options:t,discriminator:e,...je(n)})}const MU=ye("ZodIntersection",(e,t)=>{d9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>TI(e,n,r,a)});function pd(e,t){return new MU({type:"intersection",left:e,right:t})}const PU=ye("ZodTuple",(e,t)=>{f9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>OI(e,n,r,a),e.rest=n=>e.clone({...e._zod.def,rest:n})});function iT(e,t,n){const r=t instanceof $t,a=r?n:t,i=r?t:null;return new PU({type:"tuple",items:e,rest:i,...je(a)})}const qI=ye("ZodRecord",(e,t)=>{h9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>CI(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function lt(e,t,n){return new qI({type:"record",keyType:e,valueType:t,...je(n)})}const r_=ye("ZodEnum",(e,t)=>{p9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(r,a,i)=>yI(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 c of r)if(n.has(c))i[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new r_({...t,checks:[],...je(a),entries:i})},e.exclude=(r,a)=>{const i={...t.entries};for(const c of r)if(n.has(c))delete i[c];else throw new Error(`Key ${c} not found in enum`);return new r_({...t,checks:[],...je(a),entries:i})}});function Et(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new r_({type:"enum",entries:n,...je(t)})}const DU=ye("ZodLiteral",(e,t)=>{m9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>_I(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 De(e,t){return new DU({type:"literal",values:Array.isArray(e)?e:[e],...je(t)})}const LU=ye("ZodFile",(e,t)=>{g9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>bI(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),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>SI(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 c=i;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=n.value),c.inst??(c.inst=e),n.issues.push(Xu(c))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(i=>(n.value=i,n)):(n.value=a,n)}});function BI(e){return new $U({type:"transform",transform:e})}const HI=ye("ZodOptional",(e,t)=>{iI.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Rb(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function sn(e){return new HI({type:"optional",innerType:e})}const UU=ye("ZodExactOptional",(e,t)=>{y9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Rb(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function zU(e){return new UU({type:"optional",innerType:e})}const VU=ye("ZodNullable",(e,t)=>{_9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>AI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function cT(e){return new VU({type:"nullable",innerType:e})}const FU=ye("ZodDefault",(e,t)=>{b9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>NI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function qU(e,t){return new FU({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():HA(t)}})}const BU=ye("ZodPrefault",(e,t)=>{w9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>kI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function HU(e,t){return new BU({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():HA(t)}})}const GI=ye("ZodNonOptional",(e,t)=>{S9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>II(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function GU(e,t){return new GI({type:"nonoptional",innerType:e,...je(t)})}const ZU=ye("ZodCatch",(e,t)=>{E9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>MI(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 WU=ye("ZodPipe",(e,t)=>{R9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>PI(e,n,r,a),e.in=t.in,e.out=t.out});function o_(e,t){return new WU({type:"pipe",in:e,out:t})}const YU=ye("ZodReadonly",(e,t)=>{x9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>DI(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function QU(e){return new YU({type:"readonly",innerType:e})}const XU=ye("ZodLazy",(e,t)=>{T9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>LI(e,n,r,a),e.unwrap=()=>e._zod.def.getter()});function go(e){return new XU({type:"lazy",getter:e})}const Tb=ye("ZodCustom",(e,t)=>{O9.init(e,t),Ft.init(e,t),e._zod.processJSONSchema=(n,r,a)=>wI(e,n)});function ZI(e,t){return T7(Tb,e??(()=>!0),t)}function JU(e,t={}){return O7(Tb,e,t)}function ez(e){return C7(e)}function noe(e,t={}){const n=new Tb({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...je(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 Ob(e,t){return o_(BI(e),t)}const tz={custom:"custom"};function KI(e){return n7(Ua,e)}function lT(e){return a7(zI,e)}function Ce(...e){return h$(TA(e))}function nz(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function hn({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 ji(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function a_(e,t){for(const n in e)if(e[n]===t)return n}function Ju(e,t){let n=M().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"},cz={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},lz={...iz,...cz},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,...lz,...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"},uT={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},dT={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})=>le.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},le.createElement("div",{className:"sonner-spinner"},xz.map((n,r)=>le.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Oz=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},le.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=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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=le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},le.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=le.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"},le.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),le.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),kz=()=>{const[e,t]=le.useState(document.hidden);return le.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let s_=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:s_++,c=this.toasts.find(d=>d.id===i),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),c?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,c;const u=a.then(async f=>{if(c=["resolve",f],le.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,w=typeof p=="object"&&!le.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...w})}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,w=typeof p=="object"&&!le.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...w})}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,w=typeof p=="object"&&!le.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:g,...w})}}).catch(async f=>{if(c=["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"&&!le.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(()=>c[0]==="reject"?m(c[1]):f(c[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||s_++;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 Tr=new Mz,Pz=(e,t)=>{const n=t?.id||s_++;return Tr.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=()=>Tr.toasts,$z=()=>Tr.getActiveToasts(),fT=Object.assign(Lz,{success:Tr.success,info:Tr.info,warning:Tr.warning,error:Tr.error,custom:Tr.custom,message:Tr.message,promise:Tr.promise,dismiss:Tr.dismiss,loading:Tr.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 ah(e){return e.label!==void 0}const Uz=3,zz="24px",Vz="16px",hT=4e3,Fz=356,qz=14,Bz=45,Hz=200;function Zo(...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,c,u,d,f;const{invert:m,toast:p,unstyled:g,interacting:y,setHeights:w,visibleToasts:S,heights:b,index:R,toasts:E,expanded:T,removeToast:C,defaultRichColors:O,closeButton:I,style:k,cancelButtonStyle:D,actionButtonStyle:z,className:Y="",descriptionClassName:V="",duration:Z,position:U,gap:J,expandByDefault:ie,classNames:F,icons:X,closeButtonAriaLabel:ae="Close toast"}=e,[fe,K]=le.useState(null),[P,B]=le.useState(null),[q,L]=le.useState(!1),[$,Q]=le.useState(!1),[me,_e]=le.useState(!1),[Ae,Ne]=le.useState(!1),[H,ne]=le.useState(!1),[be,pe]=le.useState(0),[ce,Oe]=le.useState(0),$e=le.useRef(p.duration||Z||hT),Ye=le.useRef(null),He=le.useRef(null),Xe=R===0,G=R+1<=S,te=p.type,oe=p.dismissible!==!1,Se=p.className||"",Te=p.descriptionClassName||"",Re=le.useMemo(()=>b.findIndex(Qe=>Qe.toastId===p.id)||0,[b,p.id]),ke=le.useMemo(()=>{var Qe;return(Qe=p.closeButton)!=null?Qe:I},[p.closeButton,I]),rt=le.useMemo(()=>p.duration||Z||hT,[p.duration,Z]),st=le.useRef(0),kt=le.useRef(0),hr=le.useRef(0),Rn=le.useRef(null),[$n,en]=U.split("-"),Un=le.useMemo(()=>b.reduce((Qe,Wt,Nn)=>Nn>=Re?Qe:Qe+Wt.height,0),[b,Re]),In=kz(),zi=p.invert||m,Gs=te==="loading";kt.current=le.useMemo(()=>Re*J+Un,[Re,Un]),le.useEffect(()=>{$e.current=rt},[rt]),le.useEffect(()=>{L(!0)},[]),le.useEffect(()=>{const Qe=He.current;if(Qe){const Wt=Qe.getBoundingClientRect().height;return Oe(Wt),w(Nn=>[{toastId:p.id,height:Wt,position:p.position},...Nn]),()=>w(Nn=>Nn.filter(er=>er.toastId!==p.id))}},[w,p.id]),le.useLayoutEffect(()=>{if(!q)return;const Qe=He.current,Wt=Qe.style.height;Qe.style.height="auto";const Nn=Qe.getBoundingClientRect().height;Qe.style.height=Wt,Oe(Nn),w(er=>er.find(tn=>tn.toastId===p.id)?er.map(tn=>tn.toastId===p.id?{...tn,height:Nn}:tn):[{toastId:p.id,height:Nn,position:p.position},...er])},[q,p.title,p.description,w,p.id,p.jsx,p.action,p.cancel]);const Nr=le.useCallback(()=>{Q(!0),pe(kt.current),w(Qe=>Qe.filter(Wt=>Wt.toastId!==p.id)),setTimeout(()=>{C(p)},Hz)},[p,C,w,kt]);le.useEffect(()=>{if(p.promise&&te==="loading"||p.duration===1/0||p.type==="loading")return;let Qe;return T||y||In?(()=>{if(hr.current<st.current){const er=new Date().getTime()-st.current;$e.current=$e.current-er}hr.current=new Date().getTime()})():$e.current!==1/0&&(st.current=new Date().getTime(),Qe=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Nr()},$e.current)),()=>clearTimeout(Qe)},[T,y,p,te,In,Nr]),le.useEffect(()=>{p.delete&&(Nr(),p.onDismiss==null||p.onDismiss.call(p,p))},[Nr,p.delete]);function Vi(){var Qe;if(X?.loading){var Wt;return le.createElement("div",{className:Zo(F?.loader,p==null||(Wt=p.classNames)==null?void 0:Wt.loader,"sonner-loader"),"data-visible":te==="loading"},X.loading)}return le.createElement(Tz,{className:Zo(F?.loader,p==null||(Qe=p.classNames)==null?void 0:Qe.loader),visible:te==="loading"})}const Fi=p.icon||X?.[te]||Rz(te);var Zs,Fo;return le.createElement("li",{tabIndex:0,ref:He,className:Zo(Y,Se,F?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,F?.default,F?.[te],p==null||(n=p.classNames)==null?void 0:n[te]),"data-sonner-toast":"","data-rich-colors":(Zs=p.richColors)!=null?Zs:O,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":q,"data-promise":!!p.promise,"data-swiped":H,"data-removed":$,"data-visible":G,"data-y-position":$n,"data-x-position":en,"data-index":R,"data-front":Xe,"data-swiping":me,"data-dismissible":oe,"data-type":te,"data-invert":zi,"data-swipe-out":Ae,"data-swipe-direction":P,"data-expanded":!!(T||ie&&q),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":E.length-R,"--offset":`${$?be:kt.current}px`,"--initial-height":ie?"auto":`${ce}px`,...k,...p.style},onDragEnd:()=>{_e(!1),K(null),Rn.current=null},onPointerDown:Qe=>{Qe.button!==2&&(Gs||!oe||(Ye.current=new Date,pe(kt.current),Qe.target.setPointerCapture(Qe.pointerId),Qe.target.tagName!=="BUTTON"&&(_e(!0),Rn.current={x:Qe.clientX,y:Qe.clientY})))},onPointerUp:()=>{var Qe,Wt,Nn;if(Ae||!oe)return;Rn.current=null;const er=Number(((Qe=He.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Fa=Number(((Wt=He.current)==null?void 0:Wt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),tn=new Date().getTime()-((Nn=Ye.current)==null?void 0:Nn.getTime()),pr=fe==="x"?er:Fa,Ks=Math.abs(pr)/tn;if(Math.abs(pr)>=Bz||Ks>.11){pe(kt.current),p.onDismiss==null||p.onDismiss.call(p,p),B(fe==="x"?er>0?"right":"left":Fa>0?"down":"up"),Nr(),Ne(!0);return}else{var mr,gr;(mr=He.current)==null||mr.style.setProperty("--swipe-amount-x","0px"),(gr=He.current)==null||gr.style.setProperty("--swipe-amount-y","0px")}ne(!1),_e(!1),K(null)},onPointerMove:Qe=>{var Wt,Nn,er;if(!Rn.current||!oe||((Wt=window.getSelection())==null?void 0:Wt.toString().length)>0)return;const tn=Qe.clientY-Rn.current.y,pr=Qe.clientX-Rn.current.x;var Ks;const mr=(Ks=e.swipeDirections)!=null?Ks:Gz(U);!fe&&(Math.abs(pr)>1||Math.abs(tn)>1)&&K(Math.abs(pr)>Math.abs(tn)?"x":"y");let gr={x:0,y:0};const qi=bo=>1/(1.5+Math.abs(bo)/20);if(fe==="y"){if(mr.includes("top")||mr.includes("bottom"))if(mr.includes("top")&&tn<0||mr.includes("bottom")&&tn>0)gr.y=tn;else{const bo=tn*qi(tn);gr.y=Math.abs(bo)<Math.abs(tn)?bo:tn}}else if(fe==="x"&&(mr.includes("left")||mr.includes("right")))if(mr.includes("left")&&pr<0||mr.includes("right")&&pr>0)gr.x=pr;else{const bo=pr*qi(pr);gr.x=Math.abs(bo)<Math.abs(pr)?bo:pr}(Math.abs(gr.x)>0||Math.abs(gr.y)>0)&&ne(!0),(Nn=He.current)==null||Nn.style.setProperty("--swipe-amount-x",`${gr.x}px`),(er=He.current)==null||er.style.setProperty("--swipe-amount-y",`${gr.y}px`)}},ke&&!p.jsx&&te!=="loading"?le.createElement("button",{"aria-label":ae,"data-disabled":Gs,"data-close-button":!0,onClick:Gs||!oe?()=>{}:()=>{Nr(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Zo(F?.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(Fo=X?.close)!=null?Fo:Nz):null,(te||p.icon||p.promise)&&p.icon!==null&&(X?.[te]!==null||p.icon)?le.createElement("div",{"data-icon":"",className:Zo(F?.icon,p==null||(a=p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Vi():null,p.type!=="loading"?Fi:null):null,le.createElement("div",{"data-content":"",className:Zo(F?.content,p==null||(i=p.classNames)==null?void 0:i.content)},le.createElement("div",{"data-title":"",className:Zo(F?.title,p==null||(c=p.classNames)==null?void 0:c.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?le.createElement("div",{"data-description":"",className:Zo(V,Te,F?.description,p==null||(u=p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),le.isValidElement(p.cancel)?p.cancel:p.cancel&&ah(p.cancel)?le.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||D,onClick:Qe=>{ah(p.cancel)&&oe&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Qe),Nr())},className:Zo(F?.cancelButton,p==null||(d=p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,le.isValidElement(p.action)?p.action:p.action&&ah(p.action)?le.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||z,onClick:Qe=>{ah(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Qe),!Qe.defaultPrevented&&Nr())},className:Zo(F?.actionButton,p==null||(f=p.classNames)==null?void 0:f.actionButton)},p.action.label):null)};function pT(){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,c=i?"--mobile-offset":"--offset",u=i?Vz:zz;function d(f){["top","right","bottom","left"].forEach(m=>{n[`${c}-${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[`${c}-${f}`]=u:n[`${c}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),n}const Wz=le.forwardRef(function(t,n){const{id:r,invert:a,position:i="bottom-right",hotkey:c=["altKey","KeyT"],expand:u,closeButton:d,className:f,offset:m,mobileOffset:p,theme:g="light",richColors:y,duration:w,style:S,visibleToasts:b=Uz,toastOptions:R,dir:E=pT(),gap:T=qz,icons:C,containerAriaLabel:O="Notifications"}=t,[I,k]=le.useState([]),D=le.useMemo(()=>r?I.filter(q=>q.toasterId===r):I.filter(q=>!q.toasterId),[I,r]),z=le.useMemo(()=>Array.from(new Set([i].concat(D.filter(q=>q.position).map(q=>q.position)))),[D,i]),[Y,V]=le.useState([]),[Z,U]=le.useState(!1),[J,ie]=le.useState(!1),[F,X]=le.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ae=le.useRef(null),fe=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=le.useRef(null),P=le.useRef(!1),B=le.useCallback(q=>{k(L=>{var $;return($=L.find(Q=>Q.id===q.id))!=null&&$.delete||Tr.dismiss(q.id),L.filter(({id:Q})=>Q!==q.id)})},[]);return le.useEffect(()=>Tr.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{k(L=>L.map($=>$.id===q.id?{...$,delete:!0}:$))});return}setTimeout(()=>{uA.flushSync(()=>{k(L=>{const $=L.findIndex(Q=>Q.id===q.id);return $!==-1?[...L.slice(0,$),{...L[$],...q},...L.slice($+1)]:[q,...L]})})})}),[I]),le.useEffect(()=>{if(g!=="system"){X(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:L})=>{X(L?"dark":"light")})}catch{q.addListener(({matches:$})=>{try{X($?"dark":"light")}catch(Q){console.error(Q)}})}},[g]),le.useEffect(()=>{I.length<=1&&U(!1)},[I]),le.useEffect(()=>{const q=L=>{var $;if(c.every(_e=>L[_e]||L.code===_e)){var me;U(!0),(me=ae.current)==null||me.focus()}L.code==="Escape"&&(document.activeElement===ae.current||($=ae.current)!=null&&$.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[c]),le.useEffect(()=>{if(ae.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,P.current=!1)}},[ae.current]),le.createElement("section",{ref:n,"aria-label":`${O} ${fe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},z.map((q,L)=>{var $;const[Q,me]=q.split("-");return D.length?le.createElement("ol",{key:q,dir:E==="auto"?pT():E,tabIndex:-1,ref:ae,className:f,"data-sonner-toaster":!0,"data-sonner-theme":F,"data-y-position":Q,"data-x-position":me,style:{"--front-toast-height":`${(($=Y[0])==null?void 0:$.height)||0}px`,"--width":`${Fz}px`,"--gap":`${T}px`,...S,...Kz(m,p)},onBlur:_e=>{P.current&&!_e.currentTarget.contains(_e.relatedTarget)&&(P.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:_e=>{_e.target instanceof HTMLElement&&_e.target.dataset.dismissible==="false"||P.current||(P.current=!0,K.current=_e.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{J||U(!1)},onDragEnd:()=>U(!1),onPointerDown:_e=>{_e.target instanceof HTMLElement&&_e.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},D.filter(_e=>!_e.position&&L===0||_e.position===q).map((_e,Ae)=>{var Ne,H;return le.createElement(Zz,{key:_e.id,icons:C,index:Ae,toast:_e,defaultRichColors:y,duration:(Ne=R?.duration)!=null?Ne:w,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:a,visibleToasts:b,closeButton:(H=R?.closeButton)!=null?H:d,interacting:J,position:q,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:B,toasts:D.filter(ne=>ne.position==_e.position),heights:Y.filter(ne=>ne.position==_e.position),setHeights:V,expandByDefault:u,gap:T,expanded:Z,swipeDirections:t.swipeDirections})})):null}))}),WI=A.createContext({});function YI(){return A.useContext(WI)}var Hy,mT;function Yz(){if(mT)return Hy;mT=1;var e=function(){};return Hy=e,Hy}var Qz=Yz();const Xz=$a(Qz);function Jz({async:e,appendTo:t,defer:n,id:r,nonce:a,src:i}){const c=document.createElement("script");e!==void 0&&(c.async=e),n!==void 0&&(c.defer=n),r&&(c.id=r),a&&c.setAttribute("nonce",a),c.src=i,(t==="head"?document.head:document.body).appendChild(c)}var eV=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 jp=new Set,$p=new Set,tV=typeof window<"u",Jc="___grecaptcha_cfg",QI=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function nV(){if(!tV)return;function e(n){if(ed)n();else{window[Jc]||(window[Jc]={});const r=window[Jc];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 $p)n();$p.clear()}window[QI]=t}function rV({language:e,onLoadCallbackName:t,render:n,useEnterprise:r=!1,useRecaptchaNet:a=!1}){const i=a?"recaptcha.net":"google.com",c=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/${c}?${u.toString()}`}function oV({language:e,render:t,scriptProps:n,useEnterprise:r,useRecaptchaNet:a}){const i={id:"google-recaptcha-v3"},c=rV({language:e,onLoadCallbackName:QI,render:t,useEnterprise:r,useRecaptchaNet:a});if(zu){if(zu!==c)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}zu=c,Jz(Object.assign(Object.assign(Object.assign({},i),n),{src:c}))}function aV(e){if(!window[Jc])return;const t=window[Jc];t.clients&&delete t.clients[e]}function sV(e,t){var{onLoadCallback:n,onLoadCallbackName:r}=t,a=eV(t,["onLoadCallback","onLoadCallbackName"]);if(jp.size===0&&nV(),oV(a),jp.add(e),n&&(ed?n():$p.add(n)),r){let i=function(){if(!r)return;const c=window[r];typeof c=="function"&&c()};ed?i():$p.add(i)}}function iV(e){var t,n,r;jp.delete(e),jp.size===0&&(window.grecaptcha=void 0,window[Jc]=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 gT=!1;function cV({container:e,children:t,language:n,reCaptchaKey:r,scriptProps:a,useEnterprise:i,useRecaptchaNet:c}){var u,d,f,m,p,g,y;const w=A.useId(),[S,b]=A.useState(null),[R,E]=A.useState(null),T=A.useRef(!1);A.useEffect(()=>{function k(){var D;const z=i?(D=window.grecaptcha)===null||D===void 0?void 0:D.enterprise:window.grecaptcha;if(!z)throw new Error("reCAPTCHA not found");if(!z.ready)throw new Error("reCAPTCHA ready callback not found");z.ready(()=>{b(z)})}return sV(w,{language:n,onLoadCallback:k,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:c}),()=>{iV(w),b(null)}},[e?.element,w,n,r,a?.appendTo,a?.async,a?.defer,a?.id,a?.nonce,a?.onLoadCallbackName,i,c]),A.useEffect(()=>{var k,D,z;if(!e?.element||!S?.render)return;const Y={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((k=e.parameters)===null||k===void 0?void 0:k.badge)||"inline",callback:e.parameters.callback,sitekey:r,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},V=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!V)throw new Error("reCAPTCHA container element not found");const Z=S.render(V,Y);return!((D=e?.parameters)===null||D===void 0)&&D.hidden&&(gT||(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."),gT=!0),(z=V.querySelector(".grecaptcha-badge"))===null||z===void 0||z.style.setProperty("display","none")),E(Z),T.current=!0,()=>{E(null),T.current=!1,aV(Z),V.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 C=!!e?.element,O=C?R:r,I=A.useMemo(()=>O!==null&&S?.execute?k=>{if(O===null||!S?.execute)throw new Error("reCAPTCHA has not been loaded");return C&&!T.current?(console.warn("Client ID not mounted"),null):S.execute(O,{action:k})}:void 0,[O,S,C]);return x.jsx(WI.Provider,{value:{container:e?.element,executeRecaptcha:I,reCaptchaInstance:S},children:t})}var lV=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()}}},io=new lV;function uV(){return()=>{}}function za(){return A.useSyncExternalStore(uV,()=>!0,()=>!1)}function XI(){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 Cb(){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 dV({children:e}){const t=za(),{captcha:n}=A.useContext(ft);return n?.provider!=="google-recaptcha-v3"?e:x.jsxs(cV,{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(fV,{}),e]})}function fV(){const{executeRecaptcha:e}=YI(),{theme:t}=Cb(),{lang:n}=XI();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 hV({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:r}}=A.useContext(ft),{pathMode:a,slug:i}=t||{};let c,u,d,f;const{data:m,isPending:p,isRefetching:g}=r();if(a==="slug"){const y=e||i;c=m?.find(w=>w.slug===y),u=p,d=g}else{const{data:y,isPending:w,isRefetching:S,refetch:b}=n();f=b,c=y,u=w,d=S}return A.useMemo(()=>({data:c,isPending:u,isRefetching:d,refetch:f}),[c,u,d,f])}var pV=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:r,redirectTo:a}=A.useContext(ft),{slug:i,pathMode:c,personalPath:u}=n||{},{data:d}=t(),{data:f,isPending:m,isRefetching:p,refetch:g}=hV(),{refetch:y}=e(),{data:w}=e();return A.useEffect(()=>{d?.user.id&&(f||w)&&(g?.(),y?.())},[d?.user.id]),A.useEffect(()=>{p||m||i&&c==="slug"&&!f&&r(u||a)},[f,p,m,i,c,u,r,a]),null},mV=({href:e,className:t,children:n})=>x.jsx("a",{className:t,href:e,children:n}),gV=e=>{window.location.href=e},vV=e=>{window.location.replace(e)},yV=({variant:e="default",message:t})=>{e==="default"?fT(t):fT[e](t)},ft=A.createContext({}),_V=({children:e,authClient:t,account:n,avatar:r,deleteUser:a,social:i,genericOAuth:c,basePath:u="/auth",baseURL:d="",captcha:f,redirectTo:m="/",credentials:p,changeEmail:g=!0,freshAge:y=3600*24,hooks:w,mutators:S,localization:b,localizeErrors:R=!0,nameRequired:E=!0,organization:T,teams:C,signUp:O=!0,toast:I=yV,viewPaths:k,navigate:D,replace:z,Link:Y=mV,emailVerification:V,...Z})=>{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]),ie=A.useMemo(()=>{if(V)return V===!0?{otp:!1}:{otp:V.otp??!1}},[V]),F=A.useMemo(()=>{var H;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:uT}:{basePath:((H=n.basePath)!=null&&H.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...uT,...n.viewPaths}}},[n]),X=A.useMemo(()=>{if(a)return a===!0?{}:a},[a]),ae=A.useMemo(()=>{if(i)return i},[i]),fe=A.useMemo(()=>{if(c)return c},[c]),K=A.useMemo(()=>{if(p!==!1)return p===!0?{forgotPassword:!0,usernameRequired:!0}:{...p,forgotPassword:p?.forgotPassword??!0,usernameRequired:p?.usernameRequired??!0}},[p]),P=A.useMemo(()=>{if(O!==!1)return O===!0||O===void 0?{fields:["name"]}:{fields:O.fields||["name"]}},[O]),B=A.useMemo(()=>{var H;if(!T)return;if(T===!0)return{basePath:"/organization",viewPaths:dT,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 be=(H=T.basePath)!=null&&H.endsWith("/")?T.basePath.slice(0,-1):T.basePath;return{...T,logo:ne,basePath:be??"/organization",customRoles:T.customRoles||[],viewPaths:{...dT,...T.viewPaths}}},[T]),q=A.useMemo(()=>{var H,ne;if(!(!C||!B))return C===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:C.enabled??!0,customRoles:C.customRoles||[],colors:{count:((H=C.colors)==null?void 0:H.count)??5,prefix:((ne=C.colors)==null?void 0:ne.prefix)??"team"}}},[C,B]),L=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]),$=A.useMemo(()=>({useSession:U.useSession,useListAccounts:()=>Ur({queryFn:U.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:H=>Ur({queryFn:()=>U.accountInfo(H),cacheKey:`accountInfo:${JSON.stringify(H)}`}),useListDeviceSessions:()=>Ur({queryFn:U.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>Ur({queryFn:U.listSessions,cacheKey:"listSessions"}),useListPasskeys:U.useListPasskeys,useListApiKeys:()=>Ur({queryFn:U.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:U.useActiveOrganization,useListOrganizations:U.useListOrganizations,useHasPermission:H=>Ur({queryFn:()=>U.$fetch("/organization/has-permission",{method:"POST",body:H}),cacheKey:`hasPermission:${JSON.stringify(H)}`}),useInvitation:H=>Ur({queryFn:()=>U.organization.getInvitation(H),cacheKey:`invitation:${JSON.stringify(H)}`}),useListInvitations:H=>Ur({queryFn:()=>{var ne;return U.$fetch(`/organization/list-invitations?organizationId=${((ne=H?.query)==null?void 0:ne.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(H)}`}),useListUserInvitations:()=>Ur({queryFn:()=>U.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:H=>Ur({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=>Ur({queryFn:()=>U.$fetch(`/organization/list-teams?organizationId=${H?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(H)}`}),useListTeamMembers:H=>Ur({queryFn:()=>U.$fetch("/organization/list-team-members",{method:"POST",body:H?.teamId?{query:{teamId:H.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(H)}`}),useListUserTeams:()=>Ur({queryFn:()=>U.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[U]),Q=A.useMemo(()=>({...Sz,...k}),[k]),me=A.useMemo(()=>({...wz,...b}),[b]),_e=A.useMemo(()=>({...$,...w}),[$,w]),Ae=A.useMemo(()=>({...L,...S}),[L,S]);d=d.endsWith("/")?d.slice(0,-1):d,u=u.endsWith("/")?u.slice(0,-1):u;const{data:Ne}=_e.useSession();return x.jsxs(ft.Provider,{value:{authClient:U,avatar:J,basePath:u==="/"?"":u,baseURL:d,captcha:f,redirectTo:m,changeEmail:g,credentials:K,deleteUser:X,emailVerification:ie,freshAge:y,genericOAuth:fe,hooks:_e,mutators:Ae,localization:me,localizeErrors:R,nameRequired:E,organization:B,teams:q,account:F,signUp:P,social:ae,toast:I,navigate:D||gV,replace:z||D||vV,viewPaths:Q,Link:Y,...Z},children:[Ne&&B&&x.jsx(pV,{}),f?.provider==="google-recaptcha-v3"?x.jsx(dV,{children:e}):e]})};function Ur({queryFn:e,cacheKey:t,staleTime:n=1e4}){var r;const{hooks:{useSession:a},toast:i,localization:c,localizeErrors:u}=A.useContext(ft),{data:d,isPending:f}=a(),m=A.useRef(e);m.current=e;const p=t||e.toString(),g=A.useSyncExternalStore(A.useCallback(T=>io.subscribe(p,T),[p]),A.useCallback(()=>io.get(p),[p]),A.useCallback(()=>io.get(p),[p])),y=A.useRef(!1),w=A.useRef(void 0),[S,b]=A.useState(null),R=A.useCallback(async()=>{const T=io.getInFlightRequest(p);if(T){try{const O=await T;O.error?b(O.error):b(null)}catch(O){b(O)}return}g?.data!==void 0&&io.setRefetching(p,!0);const C=m.current();io.setInFlightRequest(p,C);try{const{data:O,error:I}=await C;I?(b(I),i({variant:"error",message:hn({error:I,localization:c,localizeErrors:u})})):b(null),io.set(p,O)}catch(O){const I=O;b(I),i({variant:"error",message:hn({error:I,localization:c,localizeErrors:u})})}finally{io.setRefetching(p,!1),io.removeInFlightRequest(p)}},[p,i,c,u,g]);A.useEffect(()=>{var T;const C=(T=d?.user)==null?void 0:T.id;if(!d){io.setRefetching(p,!1),io.clear(p),y.current=!1,w.current=void 0;return}const O=w.current!==void 0&&w.current!==C;O&&io.clear(p);const I=g?.data!==void 0,k=!g||Date.now()-g.timestamp>n;(!y.current||!I||O||I&&k)&&(!I||k)&&(y.current=!0,R()),w.current=C},[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 bV=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),JI=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var wV={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 SV=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:c,...u},d)=>A.createElement("svg",{ref:d,...wV,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:JI("lucide",a),...u},[...c.map(([f,m])=>A.createElement(f,m)),...Array.isArray(i)?i:[i]]));const ar=(e,t)=>{const n=A.forwardRef(({className:r,...a},i)=>A.createElement(SV,{ref:i,iconNode:t,className:JI(`lucide-${bV(e)}`,r),...a}));return n.displayName=`${e}`,n};const EV=ar("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const RV=ar("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 eN=ar("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const xV=ar("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 TV=ar("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 OV=ar("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 CV=ar("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 or=ar("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const tN=ar("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 nN=ar("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 AV=ar("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const IV=ar("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 vT=ar("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 NV=ar("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 kV=ar("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const MV=ar("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var md=e=>e.type==="checkbox",Ei=e=>e instanceof Date,Cr=e=>e==null;const rN=e=>typeof e=="object";var En=e=>!Cr(e)&&!Array.isArray(e)&&rN(e)&&!Ei(e),oN=e=>En(e)&&e.target?md(e.target)?e.target.checked:e.target.value:e,PV=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,aN=(e,t)=>e.has(PV(t)),DV=e=>{const t=e.constructor&&e.constructor.prototype;return En(t)&&t.hasOwnProperty("isPrototypeOf")},Ab=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function _n(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Ab&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(En(e)&&DV(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=_n(e[a]));return r}var Mm=e=>/^\w*$/.test(e),Xt=e=>e===void 0,Ib=e=>Array.isArray(e)?e.filter(Boolean):[],Nb=e=>Ib(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Me=(e,t,n)=>{if(!t||!En(e))return n;const r=(Mm(t)?[t]:Nb(t)).reduce((a,i)=>Cr(a)?a:a[i],e);return Xt(r)||r===e?Xt(e[t])?n:e[t]:r},qr=e=>typeof e=="boolean",dr=e=>typeof e=="function",Lt=(e,t,n)=>{let r=-1;const a=Mm(t)?[t]:Nb(t),i=a.length,c=i-1;for(;++r<i;){const u=a[r];let d=n;if(r!==c){const f=e[u];d=En(f)||Array.isArray(f)?f:isNaN(+a[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const Up={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},No={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ca={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},kb=le.createContext(null);kb.displayName="HookFormControlContext";const Mb=()=>le.useContext(kb);var sN=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const c=i;return t._proxyFormState[c]!==No.all&&(t._proxyFormState[c]=!r||No.all),n&&(n[c]=!0),e[c]}});return a};const Pb=typeof window<"u"?le.useLayoutEffect:le.useEffect;function iN(e){const t=Mb(),{control:n=t,disabled:r,name:a,exact:i}=e||{},[c,u]=le.useState(n._formState),d=le.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Pb(()=>n._subscribe({name:a,formState:d.current,exact:i,callback:f=>{!r&&u({...n._formState,...f})}}),[a,r,i]),le.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),le.useMemo(()=>sN(c,n,d.current,!1),[c,n])}var Zr=e=>typeof e=="string",i_=(e,t,n,r,a)=>Zr(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),c_=e=>Cr(e)||!rN(e);function ko(e,t,n=new WeakSet){if(c_(e)||c_(t))return Object.is(e,t);if(Ei(e)&&Ei(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 c=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const u=t[i];if(Ei(c)&&Ei(u)||En(c)&&En(u)||Array.isArray(c)&&Array.isArray(u)?!ko(c,u,n):!Object.is(c,u))return!1}}return!0}function LV(e){const t=Mb(),{control:n=t,name:r,defaultValue:a,disabled:i,exact:c,compute:u}=e||{},d=le.useRef(a),f=le.useRef(u),m=le.useRef(void 0),p=le.useRef(n),g=le.useRef(r);f.current=u;const[y,w]=le.useState(()=>{const C=n._getWatch(r,d.current);return f.current?f.current(C):C}),S=le.useCallback(C=>{const O=i_(r,n._names,C||n._formValues,!1,d.current);return f.current?f.current(O):O},[n._formValues,n._names,r]),b=le.useCallback(C=>{if(!i){const O=i_(r,n._names,C||n._formValues,!1,d.current);if(f.current){const I=f.current(O);ko(I,m.current)||(w(I),m.current=I)}else w(O)}},[n._formValues,n._names,i,r]);Pb(()=>((p.current!==n||!ko(g.current,r))&&(p.current=n,g.current=r,b()),n._subscribe({name:r,formState:{values:!0},exact:c,callback:C=>{b(C.values)}})),[n,c,r,b]),le.useEffect(()=>n._removeUnmounted());const R=p.current!==n,E=g.current,T=le.useMemo(()=>{if(i)return null;const C=!R&&!ko(E,r);return R||C?S():null},[i,R,r,E,S]);return T!==null?T:y}function jV(e){const t=Mb(),{name:n,disabled:r,control:a=t,shouldUnregister:i,defaultValue:c,exact:u=!0}=e,d=aN(a._names.array,n),f=le.useMemo(()=>Me(a._formValues,n,Me(a._defaultValues,n,c)),[a,n,c]),m=LV({control:a,name:n,defaultValue:f,exact:u}),p=iN({control:a,name:n,exact:u}),g=le.useRef(e),y=le.useRef(void 0),w=le.useRef(a.register(n,{...e.rules,value:m,...qr(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const S=le.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]),b=le.useCallback(C=>w.current.onChange({target:{value:oN(C),name:n},type:Up.CHANGE}),[n]),R=le.useCallback(()=>w.current.onBlur({target:{value:Me(a._formValues,n),name:n},type:Up.BLUR}),[n,a._formValues]),E=le.useCallback(C=>{const O=Me(a._fields,n);O&&O._f&&C&&(O._f.ref={focus:()=>dr(C.focus)&&C.focus(),select:()=>dr(C.select)&&C.select(),setCustomValidity:I=>dr(C.setCustomValidity)&&C.setCustomValidity(I),reportValidity:()=>dr(C.reportValidity)&&C.reportValidity()})},[a._fields,n]),T=le.useMemo(()=>({name:n,value:m,...qr(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:b,onBlur:R,ref:E}),[n,r,p.disabled,b,R,E,m]);return le.useEffect(()=>{const C=a._options.shouldUnregister||i,O=y.current;O&&O!==n&&!d&&a.unregister(O),a.register(n,{...g.current.rules,...qr(g.current.disabled)?{disabled:g.current.disabled}:{}});const I=(k,D)=>{const z=Me(a._fields,k);z&&z._f&&(z._f.mount=D)};if(I(n,!0),C){const k=_n(Me(a._options.defaultValues,n,g.current.defaultValue));Lt(a._defaultValues,n,k),Xt(Me(a._formValues,n))&&Lt(a._formValues,n,k)}return!d&&a.register(n),y.current=n,()=>{(d?C&&!a._state.action:C)?a.unregister(n):I(n,!1)}},[n,a,d,i]),le.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),le.useMemo(()=>({field:T,formState:p,fieldState:S}),[T,p,S])}const $V=e=>e.render(jV(e)),Db=le.createContext(null);Db.displayName="HookFormContext";const UV=()=>le.useContext(Db),zV=e=>{const{children:t,watch:n,getValues:r,getFieldState:a,setError:i,clearErrors:c,setValue:u,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:y,control:w,register:S,setFocus:b,subscribe:R}=e;return le.createElement(Db.Provider,{value:le.useMemo(()=>({watch:n,getValues:r,getFieldState:a,setError:i,clearErrors:c,setValue:u,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:y,control:w,register:S,setFocus:b,subscribe:R}),[c,w,f,a,r,g,S,p,m,i,b,u,R,d,y,n])},le.createElement(kb.Provider,{value:w},t))};var Lb=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},Vu=e=>Array.isArray(e)?e:[e],yT=()=>{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 cN(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const a=e[r],i=t[r];if(a&&En(a)&&i){const c=cN(a,i);En(c)&&(n[r]=c)}else e[r]&&(n[r]=i)}return n}var ur=e=>En(e)&&!Object.keys(e).length,jb=e=>e.type==="file",zp=e=>{if(!Ab)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},lN=e=>e.type==="select-multiple",$b=e=>e.type==="radio",VV=e=>$b(e)||md(e),Gy=e=>zp(e)&&e.isConnected;function FV(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Xt(e)?r++:e[t[r++]];return e}function qV(e){for(const t in e)if(e.hasOwnProperty(t)&&!Xt(e[t]))return!1;return!0}function bn(e,t){const n=Array.isArray(t)?t:Mm(t)?[t]:Nb(t),r=n.length===1?e:FV(e,n),a=n.length-1,i=n[a];return r&&delete r[i],a!==0&&(En(r)&&ur(r)||Array.isArray(r)&&qV(r))&&bn(e,n.slice(0,-1)),e}var BV=e=>{for(const t in e)if(dr(e[t]))return!0;return!1};function uN(e){return Array.isArray(e)||En(e)&&!BV(e)}function l_(e,t={}){for(const n in e){const r=e[n];uN(r)?(t[n]=Array.isArray(r)?[]:{},l_(r,t[n])):Xt(r)||(t[n]=!0)}return t}function zc(e,t,n){n||(n=l_(t));for(const r in e){const a=e[r];if(uN(a))Xt(t)||c_(n[r])?n[r]=l_(a,Array.isArray(a)?[]:{}):zc(a,Cr(t)?{}:t[r],n[r]);else{const i=t[r];n[r]=!ko(a,i)}}return n}const _T={value:!1,isValid:!1},bT={value:!0,isValid:!0};var dN=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&&!Xt(e[0].attributes.value)?Xt(e[0].value)||e[0].value===""?bT:{value:e[0].value,isValid:!0}:bT:_T}return _T},fN=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Xt(e)?e:t?e===""?NaN:e&&+e:n&&Zr(e)?new Date(e):r?r(e):e;const wT={isValid:!1,value:null};var hN=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,wT):wT;function ST(e){const t=e.ref;return jb(t)?t.files:$b(t)?hN(e.refs).value:lN(t)?[...t.selectedOptions].map(({value:n})=>n):md(t)?dN(e.refs).value:fN(Xt(t.value)?e.ref.value:t.value,e)}var HV=(e,t,n,r)=>{const a={};for(const i of e){const c=Me(t,i);c&&Lt(a,i,c._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},Vp=e=>e instanceof RegExp,bu=e=>Xt(e)?e:Vp(e)?e.source:En(e)?Vp(e.value)?e.value.source:e.value:e,ET=e=>({isOnSubmit:!e||e===No.onSubmit,isOnBlur:e===No.onBlur,isOnChange:e===No.onChange,isOnAll:e===No.all,isOnTouch:e===No.onTouched});const RT="AsyncFunction";var GV=e=>!!e&&!!e.validate&&!!(dr(e.validate)&&e.validate.constructor.name===RT||En(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===RT)),ZV=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),xT=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Fu=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const i=Me(e,a);if(i){const{_f:c,...u}=i;if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],a)&&!r)return!0;if(c.ref&&t(c.ref,c.name)&&!r)return!0;if(Fu(u,t))break}else if(En(u)&&Fu(u,t))break}}};function TT(e,t,n){const r=Me(e,n);if(r||Mm(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const i=a.join("."),c=Me(t,i),u=Me(e,i);if(c&&!Array.isArray(c)&&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 KV=(e,t,n,r)=>{n(e);const{name:a,...i}=e;return ur(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(c=>t[c]===(!r||No.all))},WV=(e,t,n)=>!e||!t||e===t||Vu(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),YV=(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,QV=(e,t)=>!Ib(Me(e,t)).length&&bn(e,t),XV=(e,t,n)=>{const r=Vu(Me(e,n));return Lt(r,"root",t[n]),Lt(e,n,r),e};function OT(e,t,n="validate"){if(Zr(e)||Array.isArray(e)&&e.every(Zr)||qr(e)&&!e)return{type:n,message:Zr(e)?e:"",ref:t}}var Ac=e=>En(e)&&!Vp(e)?e:{value:e,message:""},CT=async(e,t,n,r,a,i)=>{const{ref:c,refs:u,required:d,maxLength:f,minLength:m,min:p,max:g,pattern:y,validate:w,name:S,valueAsNumber:b,mount:R}=e._f,E=Me(n,S);if(!R||t.has(S))return{};const T=u?u[0]:c,C=Z=>{a&&T.reportValidity&&(T.setCustomValidity(qr(Z)?"":Z||""),T.reportValidity())},O={},I=$b(c),k=md(c),D=I||k,z=(b||jb(c))&&Xt(c.value)&&Xt(E)||zp(c)&&c.value===""||E===""||Array.isArray(E)&&!E.length,Y=Lb.bind(null,S,r,O),V=(Z,U,J,ie=Ca.maxLength,F=Ca.minLength)=>{const X=Z?U:J;O[S]={type:Z?ie:F,message:X,ref:c,...Y(Z?ie:F,X)}};if(i?!Array.isArray(E)||!E.length:d&&(!D&&(z||Cr(E))||qr(E)&&!E||k&&!dN(u).isValid||I&&!hN(u).isValid)){const{value:Z,message:U}=Zr(d)?{value:!!d,message:d}:Ac(d);if(Z&&(O[S]={type:Ca.required,message:U,ref:T,...Y(Ca.required,U)},!r))return C(U),O}if(!z&&(!Cr(p)||!Cr(g))){let Z,U;const J=Ac(g),ie=Ac(p);if(!Cr(E)&&!isNaN(E)){const F=c.valueAsNumber||E&&+E;Cr(J.value)||(Z=F>J.value),Cr(ie.value)||(U=F<ie.value)}else{const F=c.valueAsDate||new Date(E),X=K=>new Date(new Date().toDateString()+" "+K),ae=c.type=="time",fe=c.type=="week";Zr(J.value)&&E&&(Z=ae?X(E)>X(J.value):fe?E>J.value:F>new Date(J.value)),Zr(ie.value)&&E&&(U=ae?X(E)<X(ie.value):fe?E<ie.value:F<new Date(ie.value))}if((Z||U)&&(V(!!Z,J.message,ie.message,Ca.max,Ca.min),!r))return C(O[S].message),O}if((f||m)&&!z&&(Zr(E)||i&&Array.isArray(E))){const Z=Ac(f),U=Ac(m),J=!Cr(Z.value)&&E.length>+Z.value,ie=!Cr(U.value)&&E.length<+U.value;if((J||ie)&&(V(J,Z.message,U.message),!r))return C(O[S].message),O}if(y&&!z&&Zr(E)){const{value:Z,message:U}=Ac(y);if(Vp(Z)&&!E.match(Z)&&(O[S]={type:Ca.pattern,message:U,ref:c,...Y(Ca.pattern,U)},!r))return C(U),O}if(w){if(dr(w)){const Z=await w(E,n),U=OT(Z,T);if(U&&(O[S]={...U,...Y(Ca.validate,U.message)},!r))return C(U.message),O}else if(En(w)){let Z={};for(const U in w){if(!ur(Z)&&!r)break;const J=OT(await w[U](E,n),T,U);J&&(Z={...J,...Y(U,J.message)},C(J.message),r&&(O[S]=Z))}if(!ur(Z)&&(O[S]={ref:T,...Z},!r))return O}}return C(!0),O};const JV={mode:No.onSubmit,reValidateMode:No.onChange,shouldFocusError:!0};function eF(e={}){let t={...JV,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:dr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},a=En(t.defaultValues)||En(t.values)?_n(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:_n(a),c={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:yT(),state:yT()},w=t.criteriaMode===No.all,S=G=>te=>{clearTimeout(f),f=setTimeout(G,te)},b=async G=>{if(!c.keepIsValid&&!t.disabled&&(p.isValid||g.isValid||G)){let te;t.resolver?(te=ur((await D()).errors),R()):te=await Y(r,!0),te!==n.isValid&&y.state.next({isValid:te})}},R=(G,te)=>{!t.disabled&&(p.isValidating||p.validatingFields||g.isValidating||g.validatingFields)&&((G||Array.from(u.mount)).forEach(oe=>{oe&&(te?Lt(n.validatingFields,oe,te):bn(n.validatingFields,oe))}),y.state.next({validatingFields:n.validatingFields,isValidating:!ur(n.validatingFields)}))},E=(G,te=[],oe,Se,Te=!0,Re=!0)=>{if(Se&&oe&&!t.disabled){if(c.action=!0,Re&&Array.isArray(Me(r,G))){const ke=oe(Me(r,G),Se.argA,Se.argB);Te&&Lt(r,G,ke)}if(Re&&Array.isArray(Me(n.errors,G))){const ke=oe(Me(n.errors,G),Se.argA,Se.argB);Te&&Lt(n.errors,G,ke),QV(n.errors,G)}if((p.touchedFields||g.touchedFields)&&Re&&Array.isArray(Me(n.touchedFields,G))){const ke=oe(Me(n.touchedFields,G),Se.argA,Se.argB);Te&&Lt(n.touchedFields,G,ke)}(p.dirtyFields||g.dirtyFields)&&(n.dirtyFields=zc(a,i)),y.state.next({name:G,isDirty:Z(G,te),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Lt(i,G,te)},T=(G,te)=>{Lt(n.errors,G,te),y.state.next({errors:n.errors})},C=G=>{n.errors=G,y.state.next({errors:n.errors,isValid:!1})},O=(G,te,oe,Se)=>{const Te=Me(r,G);if(Te){const Re=Me(i,G,Xt(oe)?Me(a,G):oe);Xt(Re)||Se&&Se.defaultChecked||te?Lt(i,G,te?Re:ST(Te._f)):ie(G,Re),c.mount&&!c.action&&b()}},I=(G,te,oe,Se,Te)=>{let Re=!1,ke=!1;const rt={name:G};if(!t.disabled){if(!oe||Se){(p.isDirty||g.isDirty)&&(ke=n.isDirty,n.isDirty=rt.isDirty=Z(),Re=ke!==rt.isDirty);const st=ko(Me(a,G),te);ke=!!Me(n.dirtyFields,G),st?bn(n.dirtyFields,G):Lt(n.dirtyFields,G,!0),rt.dirtyFields=n.dirtyFields,Re=Re||(p.dirtyFields||g.dirtyFields)&&ke!==!st}if(oe){const st=Me(n.touchedFields,G);st||(Lt(n.touchedFields,G,oe),rt.touchedFields=n.touchedFields,Re=Re||(p.touchedFields||g.touchedFields)&&st!==oe)}Re&&Te&&y.state.next(rt)}return Re?rt:{}},k=(G,te,oe,Se)=>{const Te=Me(n.errors,G),Re=(p.isValid||g.isValid)&&qr(te)&&n.isValid!==te;if(t.delayError&&oe?(d=S(()=>T(G,oe)),d(t.delayError)):(clearTimeout(f),d=null,oe?Lt(n.errors,G,oe):bn(n.errors,G)),(oe?!ko(Te,oe):Te)||!ur(Se)||Re){const ke={...Se,...Re&&qr(te)?{isValid:te}:{},errors:n.errors,name:G};n={...n,...ke},y.state.next(ke)}},D=async G=>(R(G,!0),await t.resolver(i,t.context,HV(G||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),z=async G=>{const{errors:te}=await D(G);if(R(G),G)for(const oe of G){const Se=Me(te,oe);Se?Lt(n.errors,oe,Se):bn(n.errors,oe)}else n.errors=te;return te},Y=async(G,te,oe={valid:!0})=>{for(const Se in G){const Te=G[Se];if(Te){const{_f:Re,...ke}=Te;if(Re){const rt=u.array.has(Re.name),st=Te._f&&GV(Te._f);st&&p.validatingFields&&R([Re.name],!0);const kt=await CT(Te,u.disabled,i,w,t.shouldUseNativeValidation&&!te,rt);if(st&&p.validatingFields&&R([Re.name]),kt[Re.name]&&(oe.valid=!1,te||e.shouldUseNativeValidation))break;!te&&(Me(kt,Re.name)?rt?XV(n.errors,kt,Re.name):Lt(n.errors,Re.name,kt[Re.name]):bn(n.errors,Re.name))}!ur(ke)&&await Y(ke,te,oe)}}return oe.valid},V=()=>{for(const G of u.unMount){const te=Me(r,G);te&&(te._f.refs?te._f.refs.every(oe=>!Gy(oe)):!Gy(te._f.ref))&&_e(G)}u.unMount=new Set},Z=(G,te)=>!t.disabled&&(G&&te&&Lt(i,G,te),!ko(P(),a)),U=(G,te,oe)=>i_(G,u,{...c.mount?i:Xt(te)?a:Zr(G)?{[G]:te}:te},oe,te),J=G=>Ib(Me(c.mount?i:a,G,t.shouldUnregister?Me(a,G,[]):[])),ie=(G,te,oe={})=>{const Se=Me(r,G);let Te=te;if(Se){const Re=Se._f;Re&&(!Re.disabled&&Lt(i,G,fN(te,Re)),Te=zp(Re.ref)&&Cr(te)?"":te,lN(Re.ref)?[...Re.ref.options].forEach(ke=>ke.selected=Te.includes(ke.value)):Re.refs?md(Re.ref)?Re.refs.forEach(ke=>{(!ke.defaultChecked||!ke.disabled)&&(Array.isArray(Te)?ke.checked=!!Te.find(rt=>rt===ke.value):ke.checked=Te===ke.value||!!Te)}):Re.refs.forEach(ke=>ke.checked=ke.value===Te):jb(Re.ref)?Re.ref.value="":(Re.ref.value=Te,Re.ref.type||y.state.next({name:G,values:_n(i)})))}(oe.shouldDirty||oe.shouldTouch)&&I(G,Te,oe.shouldTouch,oe.shouldDirty,!0),oe.shouldValidate&&K(G)},F=(G,te,oe)=>{for(const Se in te){if(!te.hasOwnProperty(Se))return;const Te=te[Se],Re=G+"."+Se,ke=Me(r,Re);(u.array.has(G)||En(Te)||ke&&!ke._f)&&!Ei(Te)?F(Re,Te,oe):ie(Re,Te,oe)}},X=(G,te,oe={})=>{const Se=Me(r,G),Te=u.array.has(G),Re=_n(te);Lt(i,G,Re),Te?(y.array.next({name:G,values:_n(i)}),(p.isDirty||p.dirtyFields||g.isDirty||g.dirtyFields)&&oe.shouldDirty&&y.state.next({name:G,dirtyFields:zc(a,i),isDirty:Z(G,Re)})):Se&&!Se._f&&!Cr(Re)?F(G,Re,oe):ie(G,Re,oe),xT(G,u)?y.state.next({...n,name:G,values:_n(i)}):y.state.next({name:c.mount?G:void 0,values:_n(i)})},ae=async G=>{c.mount=!0;const te=G.target;let oe=te.name,Se=!0;const Te=Me(r,oe),Re=st=>{Se=Number.isNaN(st)||Ei(st)&&isNaN(st.getTime())||ko(st,Me(i,oe,st))},ke=ET(t.mode),rt=ET(t.reValidateMode);if(Te){let st,kt;const hr=te.type?ST(Te._f):oN(G),Rn=G.type===Up.BLUR||G.type===Up.FOCUS_OUT,$n=!ZV(Te._f)&&!t.resolver&&!Me(n.errors,oe)&&!Te._f.deps||YV(Rn,Me(n.touchedFields,oe),n.isSubmitted,rt,ke),en=xT(oe,u,Rn);Lt(i,oe,hr),Rn?(!te||!te.readOnly)&&(Te._f.onBlur&&Te._f.onBlur(G),d&&d(0)):Te._f.onChange&&Te._f.onChange(G);const Un=I(oe,hr,Rn),In=!ur(Un)||en;if(!Rn&&y.state.next({name:oe,type:G.type,values:_n(i)}),$n)return(p.isValid||g.isValid)&&(t.mode==="onBlur"?Rn&&b():Rn||b()),In&&y.state.next({name:oe,...en?{}:Un});if(!Rn&&en&&y.state.next({...n}),t.resolver){const{errors:zi}=await D([oe]);if(R([oe]),Re(hr),Se){const Gs=TT(n.errors,r,oe),Nr=TT(zi,r,Gs.name||oe);st=Nr.error,oe=Nr.name,kt=ur(zi)}}else R([oe],!0),st=(await CT(Te,u.disabled,i,w,t.shouldUseNativeValidation))[oe],R([oe]),Re(hr),Se&&(st?kt=!1:(p.isValid||g.isValid)&&(kt=await Y(r,!0)));Se&&(Te._f.deps&&(!Array.isArray(Te._f.deps)||Te._f.deps.length>0)&&K(Te._f.deps),k(oe,kt,st,Un))}},fe=(G,te)=>{if(Me(n.errors,te)&&G.focus)return G.focus(),1},K=async(G,te={})=>{let oe,Se;const Te=Vu(G);if(t.resolver){const Re=await z(Xt(G)?G:Te);oe=ur(Re),Se=G?!Te.some(ke=>Me(Re,ke)):oe}else G?(Se=(await Promise.all(Te.map(async Re=>{const ke=Me(r,Re);return await Y(ke&&ke._f?{[Re]:ke}:ke)}))).every(Boolean),!(!Se&&!n.isValid)&&b()):Se=oe=await Y(r);return y.state.next({...!Zr(G)||(p.isValid||g.isValid)&&oe!==n.isValid?{}:{name:G},...t.resolver||!G?{isValid:oe}:{},errors:n.errors}),te.shouldFocus&&!Se&&Fu(r,fe,G?Te:u.mount),Se},P=(G,te)=>{let oe={...c.mount?i:a};return te&&(oe=cN(te.dirtyFields?n.dirtyFields:n.touchedFields,oe)),Xt(G)?oe:Zr(G)?Me(oe,G):G.map(Se=>Me(oe,Se))},B=(G,te)=>({invalid:!!Me((te||n).errors,G),isDirty:!!Me((te||n).dirtyFields,G),error:Me((te||n).errors,G),isValidating:!!Me(n.validatingFields,G),isTouched:!!Me((te||n).touchedFields,G)}),q=G=>{const te=G?Vu(G):void 0;te?.forEach(oe=>bn(n.errors,oe)),te?te.forEach(oe=>{y.state.next({name:oe,errors:n.errors})}):y.state.next({errors:{}})},L=(G,te,oe)=>{const Se=(Me(r,G,{_f:{}})._f||{}).ref,Te=Me(n.errors,G)||{},{ref:Re,message:ke,type:rt,...st}=Te;Lt(n.errors,G,{...st,...te,ref:Se}),y.state.next({name:G,errors:n.errors,isValid:!1}),oe&&oe.shouldFocus&&Se&&Se.focus&&Se.focus()},$=(G,te)=>dr(G)?y.state.subscribe({next:oe=>"values"in oe&&G(U(void 0,te),oe)}):U(G,te,!0),Q=G=>y.state.subscribe({next:te=>{WV(G.name,te.name,G.exact)&&KV(te,G.formState||p,Ye,G.reRenderRoot)&&G.callback({values:{...i},...n,...te,defaultValues:a})}}).unsubscribe,me=G=>(c.mount=!0,g={...g,...G.formState},Q({...G,formState:{...m,...G.formState}})),_e=(G,te={})=>{for(const oe of G?Vu(G):u.mount)u.mount.delete(oe),u.array.delete(oe),te.keepValue||(bn(r,oe),bn(i,oe)),!te.keepError&&bn(n.errors,oe),!te.keepDirty&&bn(n.dirtyFields,oe),!te.keepTouched&&bn(n.touchedFields,oe),!te.keepIsValidating&&bn(n.validatingFields,oe),!t.shouldUnregister&&!te.keepDefaultValue&&bn(a,oe);y.state.next({values:_n(i)}),y.state.next({...n,...te.keepDirty?{isDirty:Z()}:{}}),!te.keepIsValid&&b()},Ae=({disabled:G,name:te})=>{if(qr(G)&&c.mount||G||u.disabled.has(te)){const Te=u.disabled.has(te)!==!!G;G?u.disabled.add(te):u.disabled.delete(te),Te&&c.mount&&!c.action&&b()}},Ne=(G,te={})=>{let oe=Me(r,G);const Se=qr(te.disabled)||qr(t.disabled);return Lt(r,G,{...oe||{},_f:{...oe&&oe._f?oe._f:{ref:{name:G}},name:G,mount:!0,...te}}),u.mount.add(G),oe?Ae({disabled:qr(te.disabled)?te.disabled:t.disabled,name:G}):O(G,!0,te.value),{...Se?{disabled:te.disabled||t.disabled}:{},...t.progressive?{required:!!te.required,min:bu(te.min),max:bu(te.max),minLength:bu(te.minLength),maxLength:bu(te.maxLength),pattern:bu(te.pattern)}:{},name:G,onChange:ae,onBlur:ae,ref:Te=>{if(Te){Ne(G,te),oe=Me(r,G);const Re=Xt(Te.value)&&Te.querySelectorAll&&Te.querySelectorAll("input,select,textarea")[0]||Te,ke=VV(Re),rt=oe._f.refs||[];if(ke?rt.find(st=>st===Re):Re===oe._f.ref)return;Lt(r,G,{_f:{...oe._f,...ke?{refs:[...rt.filter(Gy),Re,...Array.isArray(Me(a,G))?[{}]:[]],ref:{type:Re.type,name:G}}:{ref:Re}}}),O(G,!1,void 0,Re)}else oe=Me(r,G,{}),oe._f&&(oe._f.mount=!1),(t.shouldUnregister||te.shouldUnregister)&&!(aN(u.array,G)&&c.action)&&u.unMount.add(G)}}},H=()=>t.shouldFocusError&&Fu(r,fe,u.mount),ne=G=>{qr(G)&&(y.state.next({disabled:G}),Fu(r,(te,oe)=>{const Se=Me(r,oe);Se&&(te.disabled=Se._f.disabled||G,Array.isArray(Se._f.refs)&&Se._f.refs.forEach(Te=>{Te.disabled=Se._f.disabled||G}))},0,!1))},be=(G,te)=>async oe=>{let Se;oe&&(oe.preventDefault&&oe.preventDefault(),oe.persist&&oe.persist());let Te=_n(i);if(y.state.next({isSubmitting:!0}),t.resolver){const{errors:Re,values:ke}=await D();R(),n.errors=Re,Te=_n(ke)}else await Y(r);if(u.disabled.size)for(const Re of u.disabled)bn(Te,Re);if(bn(n.errors,"root"),ur(n.errors)){y.state.next({errors:{}});try{await G(Te,oe)}catch(Re){Se=Re}}else te&&await te({...n.errors},oe),H(),setTimeout(H);if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ur(n.errors)&&!Se,submitCount:n.submitCount+1,errors:n.errors}),Se)throw Se},pe=(G,te={})=>{Me(r,G)&&(Xt(te.defaultValue)?X(G,_n(Me(a,G))):(X(G,te.defaultValue),Lt(a,G,_n(te.defaultValue))),te.keepTouched||bn(n.touchedFields,G),te.keepDirty||(bn(n.dirtyFields,G),n.isDirty=te.defaultValue?Z(G,_n(Me(a,G))):Z()),te.keepError||(bn(n.errors,G),p.isValid&&b()),y.state.next({...n}))},ce=(G,te={})=>{const oe=G?_n(G):a,Se=_n(oe),Te=ur(G),Re=Te?a:Se;if(te.keepDefaultValues||(a=oe),!te.keepValues){if(te.keepDirtyValues){const ke=new Set([...u.mount,...Object.keys(zc(a,i))]);for(const rt of Array.from(ke)){const st=Me(n.dirtyFields,rt),kt=Me(i,rt),hr=Me(Re,rt);st&&!Xt(kt)?Lt(Re,rt,kt):!st&&!Xt(hr)&&X(rt,hr)}}else{if(Ab&&Xt(G))for(const ke of u.mount){const rt=Me(r,ke);if(rt&&rt._f){const st=Array.isArray(rt._f.refs)?rt._f.refs[0]:rt._f.ref;if(zp(st)){const kt=st.closest("form");if(kt){kt.reset();break}}}}if(te.keepFieldsRef)for(const ke of u.mount)X(ke,Me(Re,ke));else r={}}i=t.shouldUnregister?te.keepDefaultValues?_n(a):{}:_n(Re),y.array.next({values:{...Re}}),y.state.next({values:{...Re}})}u={mount:te.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!p.isValid||!!te.keepIsValid||!!te.keepDirtyValues||!t.shouldUnregister&&!ur(Re),c.watch=!!t.shouldUnregister,c.keepIsValid=!!te.keepIsValid,c.action=!1,te.keepErrors||(n.errors={}),y.state.next({submitCount:te.keepSubmitCount?n.submitCount:0,isDirty:Te?!1:te.keepDirty?n.isDirty:!!(te.keepDefaultValues&&!ko(G,a)),isSubmitted:te.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Te?{}:te.keepDirtyValues?te.keepDefaultValues&&i?zc(a,i):n.dirtyFields:te.keepDefaultValues&&G?zc(a,G):te.keepDirty?n.dirtyFields:{},touchedFields:te.keepTouched?n.touchedFields:{},errors:te.keepErrors?n.errors:{},isSubmitSuccessful:te.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Oe=(G,te)=>ce(dr(G)?G(i):G,{...t.resetOptions,...te}),$e=(G,te={})=>{const oe=Me(r,G),Se=oe&&oe._f;if(Se){const Te=Se.refs?Se.refs[0]:Se.ref;Te.focus&&setTimeout(()=>{Te.focus(),te.shouldSelect&&dr(Te.select)&&Te.select()})}},Ye=G=>{n={...n,...G}},Xe={control:{register:Ne,unregister:_e,getFieldState:B,handleSubmit:be,setError:L,_subscribe:Q,_runSchema:D,_updateIsValidating:R,_focusError:H,_getWatch:U,_getDirty:Z,_setValid:b,_setFieldArray:E,_setDisabledField:Ae,_setErrors:C,_getFieldArray:J,_reset:ce,_resetDefaultValues:()=>dr(t.defaultValues)&&t.defaultValues().then(G=>{Oe(G,t.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:V,_disableForm:ne,_subjects:y,_proxyFormState:p,get _fields(){return r},get _formValues(){return i},get _state(){return c},set _state(G){c=G},get _defaultValues(){return a},get _names(){return u},set _names(G){u=G},get _formState(){return n},get _options(){return t},set _options(G){t={...t,...G}}},subscribe:me,trigger:K,register:Ne,handleSubmit:be,watch:$,setValue:X,getValues:P,reset:Oe,resetField:pe,clearErrors:q,unregister:_e,setError:L,setFocus:$e,getFieldState:B};return{...Xe,formControl:Xe}}function oa(e={}){const t=le.useRef(void 0),n=le.useRef(void 0),[r,a]=le.useState({isDirty:!1,isValidating:!1,isLoading:dr(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:dr(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!dr(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:c,...u}=eF(e);t.current={...u,formState:r}}const i=t.current.control;return i._options=e,Pb(()=>{const c=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(u=>({...u,isReady:!0})),i._formState.isReady=!0,c},[i]),le.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),le.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),le.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),le.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),le.useEffect(()=>{if(i._proxyFormState.isDirty){const c=i._getDirty();c!==r.isDirty&&i._subjects.state.next({isDirty:c})}},[i,r.isDirty]),le.useEffect(()=>{var c;e.values&&!ko(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((c=i._options.resetOptions)===null||c===void 0)&&c.keepIsValid||i._setValid(),n.current=e.values,a(u=>({...u}))):i._resetDefaultValues()},[i,e.values]),le.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=le.useMemo(()=>sN(r,i),[i,r]),t.current}function AT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gd(...e){return t=>{let n=!1;const r=e.map(a=>{const i=AT(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():AT(e[a],null)}}}}function An(...e){return A.useCallback(gd(...e),e)}var tF=Symbol.for("react.lazy"),Fp=ob[" use ".trim().toString()];function nF(e){return typeof e=="object"&&e!==null&&"then"in e}function pN(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===tF&&"_payload"in e&&nF(e._payload)}function mN(e){const t=rF(e),n=A.forwardRef((r,a)=>{let{children:i,...c}=r;pN(i)&&typeof Fp=="function"&&(i=Fp(i._payload));const u=A.Children.toArray(i),d=u.find(aF);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,{...c,ref:a,children:A.isValidElement(f)?A.cloneElement(f,void 0,m):null})}return x.jsx(t,{...c,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var gN=mN("Slot");function rF(e){const t=A.forwardRef((n,r)=>{let{children:a,...i}=n;if(pN(a)&&typeof Fp=="function"&&(a=Fp(a._payload)),A.isValidElement(a)){const c=iF(a),u=sF(i,a.props);return a.type!==A.Fragment&&(u.ref=r?gd(r,c):c),A.cloneElement(a,u)}return A.Children.count(a)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var oF=Symbol("radix.slottable");function aF(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oF}function sF(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 iF(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 IT=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,NT=TA,cF=(e,t)=>n=>{var r;if(t?.variants==null)return NT(e,n?.class,n?.className);const{variants:a,defaultVariants:i}=t,c=Object.keys(a).map(f=>{const m=n?.[f],p=i?.[f];if(m===null)return null;const g=IT(m)||IT(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(w=>{let[S,b]=w;return Array.isArray(b)?b.includes({...i,...u}[S]):{...i,...u}[S]===b})?[...f,p,g]:f},[]);return NT(e,c,d,n?.class,n?.className)},kT=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Me(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},u_=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?kT(r.ref,n,e):r&&r.refs&&r.refs.forEach(a=>kT(a,n,e))}},MT=(e,t)=>{t.shouldUseNativeValidation&&u_(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(lF(t.names||Object.keys(e),r)){const c=Object.assign({},Me(n,r));Lt(c,"root",i),Lt(n,r,c)}else Lt(n,r,i)}return n},lF=(e,t)=>{const n=PT(t);return e.some(r=>PT(r).match(`^${n}\\.\\d+`))};function PT(e){return e.replace(/\]|\[/g,"")}function DT(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function uF(e,t){for(var n={};e.length;){var r=e[0],a=r.code,i=r.message,c=r.path.join(".");if(!n[c])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[c]={message:u.message,type:u.code}}else n[c]={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[c].types,f=d&&d[r.code];n[c]=Lb(c,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n}function dF(e,t){for(var n={};e.length;){var r=e[0],a=r.code,i=r.message,c=r.path.join(".");if(!n[c])if(r.code==="invalid_union"&&r.errors.length>0){var u=r.errors[0][0];n[c]={message:u.message,type:u.code}}else n[c]={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[c].types,f=d&&d[r.code];n[c]=Lb(c,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n}function aa(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(DT(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return i.shouldUseNativeValidation&&u_({},i),{errors:{},values:n.raw?Object.assign({},r):c}})},function(c){if((function(u){return Array.isArray(u?.issues)})(c))return{values:{},errors:MT(uF(c.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw c}))}catch(c){return Promise.reject(c)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,a,i){try{return Promise.resolve(DT(function(){return Promise.resolve((n.mode==="sync"?I$:N$)(e,r,t)).then(function(c){return i.shouldUseNativeValidation&&u_({},i),{errors:{},values:n.raw?Object.assign({},r):c}})},function(c){if((function(u){return u instanceof Sb})(c))return{values:{},errors:MT(dF(c.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw c}))}catch(c){return Promise.reject(c)}};throw new Error("Invalid input: not a Zod schema")}function ct(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function fF(e,t){const n=A.createContext(t),r=i=>{const{children:c,...u}=i,d=A.useMemo(()=>u,Object.values(u));return x.jsx(n.Provider,{value:d,children:c})};r.displayName=e+"Provider";function a(i){const c=A.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function $i(e,t=[]){let n=[];function r(i,c){const u=A.createContext(c),d=n.length;n=[...n,c];const f=p=>{const{scope:g,children:y,...w}=p,S=g?.[e]?.[d]||u,b=A.useMemo(()=>w,Object.values(w));return x.jsx(S.Provider,{value:b,children:y})};f.displayName=i+"Provider";function m(p,g){const y=g?.[e]?.[d]||u,w=A.useContext(y);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(c=>A.createContext(c));return function(u){const d=u?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,hF(a,...t)]}function hF(...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 c=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var Do=globalThis?.document?A.useLayoutEffect:()=>{},pF=ob[" useId ".trim().toString()]||(()=>{}),mF=0;function Is(e){const[t,n]=A.useState(pF());return Do(()=>{n(r=>r??String(mF++))},[e]),e||(t?`radix-${t}`:"")}var gF=ob[" useInsertionEffect ".trim().toString()]||Do;function vd({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,c]=vF({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=yF(m)?m(e):m;p!==e&&c.current?.(p)}else i(m)},[u,e,i,c]);return[d,f]}function vF({defaultProp:e,onChange:t}){const[n,r]=A.useState(e),a=A.useRef(n),i=A.useRef(t);return gF(()=>{i.current=t},[t]),A.useEffect(()=>{a.current!==n&&(i.current?.(n),a.current=n)},[n,a]),[n,r,i]}function yF(e){return typeof e=="function"}function td(e){const t=_F(e),n=A.forwardRef((r,a)=>{const{children:i,...c}=r,u=A.Children.toArray(i),d=u.find(bF);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,{...c,ref:a,children:A.isValidElement(f)?A.cloneElement(f,void 0,m):null})}return x.jsx(t,{...c,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function _F(e){const t=A.forwardRef((n,r)=>{const{children:a,...i}=n;if(A.isValidElement(a)){const c=SF(a),u=wF(i,a.props);return a.type!==A.Fragment&&(u.ref=r?gd(r,c):c),A.cloneElement(a,u)}return A.Children.count(a)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vN=Symbol("radix.slottable");function roe(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=vN,t}function bF(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vN}function wF(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 SF(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 EF=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rn=EF.reduce((e,t)=>{const n=td(`Primitive.${t}`),r=A.forwardRef((a,i)=>{const{asChild:c,...u}=a,d=c?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 yN(e,t){e&&Sm.flushSync(()=>e.dispatchEvent(t))}function Lo(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...n)=>t.current?.(...n),[])}function RF(e,t=globalThis?.document){const n=Lo(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 xF="DismissableLayer",d_="dismissableLayer.update",TF="dismissableLayer.pointerDownOutside",OF="dismissableLayer.focusOutside",LT,_N=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ub=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:c,onDismiss:u,...d}=e,f=A.useContext(_N),[m,p]=A.useState(null),g=m?.ownerDocument??globalThis?.document,[,y]=A.useState({}),w=An(t,k=>p(k)),S=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),R=S.indexOf(b),E=m?S.indexOf(m):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,C=E>=R,O=IF(k=>{const D=k.target,z=[...f.branches].some(Y=>Y.contains(D));!C||z||(a?.(k),c?.(k),k.defaultPrevented||u?.())},g),I=NF(k=>{const D=k.target;[...f.branches].some(Y=>Y.contains(D))||(i?.(k),c?.(k),k.defaultPrevented||u?.())},g);return RF(k=>{E===f.layers.size-1&&(r?.(k),!k.defaultPrevented&&u&&(k.preventDefault(),u()))},g),A.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(LT=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),jT(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=LT)}},[m,g,n,f]),A.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),jT())},[m,f]),A.useEffect(()=>{const k=()=>y({});return document.addEventListener(d_,k),()=>document.removeEventListener(d_,k)},[]),x.jsx(rn.div,{...d,ref:w,style:{pointerEvents:T?C?"auto":"none":void 0,...e.style},onFocusCapture:ct(e.onFocusCapture,I.onFocusCapture),onBlurCapture:ct(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:ct(e.onPointerDownCapture,O.onPointerDownCapture)})});Ub.displayName=xF;var CF="DismissableLayerBranch",AF=A.forwardRef((e,t)=>{const n=A.useContext(_N),r=A.useRef(null),a=An(t,r);return A.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(rn.div,{...e,ref:a})});AF.displayName=CF;function IF(e,t=globalThis?.document){const n=Lo(e),r=A.useRef(!1),a=A.useRef(()=>{});return A.useEffect(()=>{const i=u=>{if(u.target&&!r.current){let d=function(){bN(TF,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},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function NF(e,t=globalThis?.document){const n=Lo(e),r=A.useRef(!1);return A.useEffect(()=>{const a=i=>{i.target&&!r.current&&bN(OF,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 jT(){const e=new CustomEvent(d_);document.dispatchEvent(e)}function bN(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?yN(a,i):a.dispatchEvent(i)}var Zy="focusScope.autoFocusOnMount",Ky="focusScope.autoFocusOnUnmount",$T={bubbles:!1,cancelable:!0},kF="FocusScope",zb=A.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...c}=e,[u,d]=A.useState(null),f=Lo(a),m=Lo(i),p=A.useRef(null),g=An(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 C=T.target;u.contains(C)?p.current=C:_s(p.current,{select:!0})},b=function(T){if(y.paused||!u)return;const C=T.relatedTarget;C!==null&&(u.contains(C)||_s(p.current,{select:!0}))},R=function(T){if(document.activeElement===document.body)for(const O of T)O.removedNodes.length>0&&_s(u)};document.addEventListener("focusin",S),document.addEventListener("focusout",b);const E=new MutationObserver(R);return u&&E.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",b),E.disconnect()}}},[r,u,y.paused]),A.useEffect(()=>{if(u){zT.add(y);const S=document.activeElement;if(!u.contains(S)){const R=new CustomEvent(Zy,$T);u.addEventListener(Zy,f),u.dispatchEvent(R),R.defaultPrevented||(MF($F(wN(u)),{select:!0}),document.activeElement===S&&_s(u))}return()=>{u.removeEventListener(Zy,f),setTimeout(()=>{const R=new CustomEvent(Ky,$T);u.addEventListener(Ky,m),u.dispatchEvent(R),R.defaultPrevented||_s(S??document.body,{select:!0}),u.removeEventListener(Ky,m),zT.remove(y)},0)}}},[u,f,m,y]);const w=A.useCallback(S=>{if(!n&&!r||y.paused)return;const b=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,R=document.activeElement;if(b&&R){const E=S.currentTarget,[T,C]=PF(E);T&&C?!S.shiftKey&&R===C?(S.preventDefault(),n&&_s(T,{select:!0})):S.shiftKey&&R===T&&(S.preventDefault(),n&&_s(C,{select:!0})):R===E&&S.preventDefault()}},[n,r,y.paused]);return x.jsx(rn.div,{tabIndex:-1,...c,ref:g,onKeyDown:w})});zb.displayName=kF;function MF(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_s(r,{select:t}),document.activeElement!==n)return}function PF(e){const t=wN(e),n=UT(t,e),r=UT(t.reverse(),e);return[n,r]}function wN(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 UT(e,t){for(const n of e)if(!DF(n,{upTo:t}))return n}function DF(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 LF(e){return e instanceof HTMLInputElement&&"select"in e}function _s(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&LF(e)&&t&&e.select()}}var zT=jF();function jF(){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 $F(e){return e.filter(t=>t.tagName!=="A")}var UF="Portal",Vb=A.forwardRef((e,t)=>{const{container:n,...r}=e,[a,i]=A.useState(!1);Do(()=>i(!0),[]);const c=n||a&&globalThis?.document?.body;return c?uA.createPortal(x.jsx(rn.div,{...r,ref:t}),c):null});Vb.displayName=UF;function zF(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var Va=e=>{const{present:t,children:n}=e,r=VF(t),a=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),i=An(r.ref,FF(a));return typeof n=="function"||r.isPresent?A.cloneElement(a,{ref:i}):null};Va.displayName="Presence";function VF(e){const[t,n]=A.useState(),r=A.useRef(null),a=A.useRef(e),i=A.useRef("none"),c=e?"mounted":"unmounted",[u,d]=zF(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const f=sh(r.current);i.current=u==="mounted"?f:"none"},[u]),Do(()=>{const f=r.current,m=a.current;if(m!==e){const g=i.current,y=sh(f);e?d("MOUNT"):y==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&g!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),Do(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,p=y=>{const S=sh(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&S&&(d("ANIMATION_END"),!a.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},g=y=>{y.target===t&&(i.current=sh(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 sh(e){return e?.animationName||"none"}function FF(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 Wy=0;function SN(){A.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??FT()),document.body.insertAdjacentElement("beforeend",e[1]??FT()),Wy++,()=>{Wy===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Wy--}},[])}function FT(){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 Xo=function(){return Xo=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},Xo.apply(this,arguments)};function EN(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 qF(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 dp="right-scroll-bar-position",fp="width-before-scroll-bar",BF="with-scroll-bars-hidden",HF="--removed-body-scroll-bar-size";function Yy(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function GF(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 ZF=typeof window<"u"?A.useLayoutEffect:A.useEffect,qT=new WeakMap;function KF(e,t){var n=GF(null,function(r){return e.forEach(function(a){return Yy(a,r)})});return ZF(function(){var r=qT.get(n);if(r){var a=new Set(r),i=new Set(e),c=n.current;a.forEach(function(u){i.has(u)||Yy(u,null)}),i.forEach(function(u){a.has(u)||Yy(u,c)})}qT.set(n,e)},[e]),n}function WF(e){return e}function YF(e,t){t===void 0&&(t=WF);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 c=t(i,r);return n.push(c),function(){n=n.filter(function(u){return u!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(u){return i(u)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var u=n;n=[],u.forEach(i),c=n}var d=function(){var m=c;c=[],m.forEach(i)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){c.push(m),f()},filter:function(m){return c=c.filter(m),n}}}};return a}function QF(e){e===void 0&&(e={});var t=YF(null);return t.options=Xo({async:!0,ssr:!1},e),t}var RN=function(e){var t=e.sideCar,n=EN(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,Xo({},n))};RN.isSideCarExport=!0;function XF(e,t){return e.useMedium(t),RN}var xN=QF(),Qy=function(){},Pm=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],c=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,y=e.noRelative,w=e.noIsolation,S=e.inert,b=e.allowPinchZoom,R=e.as,E=R===void 0?"div":R,T=e.gapMode,C=EN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=g,I=KF([n,t]),k=Xo(Xo({},C),a);return A.createElement(A.Fragment,null,m&&A.createElement(O,{sideCar:xN,removeScrollBar:f,shards:p,noRelative:y,noIsolation:w,inert:S,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:T}),c?A.cloneElement(A.Children.only(u),Xo(Xo({},k),{ref:I})):A.createElement(E,Xo({},k,{className:d,ref:I}),u))});Pm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Pm.classNames={fullWidth:fp,zeroRight:dp};var JF=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eq(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=JF();return t&&e.setAttribute("nonce",t),e}function tq(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function nq(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var rq=function(){var e=0,t=null;return{add:function(n){e==0&&(t=eq())&&(tq(t,n),nq(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},oq=function(){var e=rq();return function(t,n){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},TN=function(){var e=oq(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},aq={left:0,top:0,right:0,gap:0},Xy=function(e){return parseInt(e||"",10)||0},sq=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)]},iq=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return aq;var t=sq(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])}},cq=TN(),el="data-scroll-locked",lq=function(e,t,n,r){var a=e.left,i=e.top,c=e.right,u=e.gap;return n===void 0&&(n="margin"),`
|
|
62
|
+
.`.concat(BF,` {
|
|
63
|
+
overflow: hidden `).concat(r,`;
|
|
64
|
+
padding-right: `).concat(u,"px ").concat(r,`;
|
|
65
|
+
}
|
|
66
|
+
body[`).concat(el,`] {
|
|
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(c,`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(dp,` {
|
|
80
|
+
right: `).concat(u,"px ").concat(r,`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.`).concat(fp,` {
|
|
84
|
+
margin-right: `).concat(u,"px ").concat(r,`;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.`).concat(dp," .").concat(dp,` {
|
|
88
|
+
right: 0 `).concat(r,`;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.`).concat(fp," .").concat(fp,` {
|
|
92
|
+
margin-right: 0 `).concat(r,`;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
body[`).concat(el,`] {
|
|
96
|
+
`).concat(HF,": ").concat(u,`px;
|
|
97
|
+
}
|
|
98
|
+
`)},BT=function(){var e=parseInt(document.body.getAttribute(el)||"0",10);return isFinite(e)?e:0},uq=function(){A.useEffect(function(){return document.body.setAttribute(el,(BT()+1).toString()),function(){var e=BT()-1;e<=0?document.body.removeAttribute(el):document.body.setAttribute(el,e.toString())}},[])},dq=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;uq();var i=A.useMemo(function(){return iq(a)},[a]);return A.createElement(cq,{styles:lq(i,!t,a,n?"":"!important")})},f_=!1;if(typeof window<"u")try{var ih=Object.defineProperty({},"passive",{get:function(){return f_=!0,!0}});window.addEventListener("test",ih,ih),window.removeEventListener("test",ih,ih)}catch{f_=!1}var Ic=f_?{passive:!1}:!1,fq=function(e){return e.tagName==="TEXTAREA"},ON=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!fq(e)&&n[t]==="visible")},hq=function(e){return ON(e,"overflowY")},pq=function(e){return ON(e,"overflowX")},HT=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=CN(e,r);if(a){var i=AN(e,r),c=i[1],u=i[2];if(c>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},mq=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},gq=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},CN=function(e,t){return e==="v"?hq(t):pq(t)},AN=function(e,t){return e==="v"?mq(t):gq(t)},vq=function(e,t){return e==="h"&&t==="rtl"?-1:1},yq=function(e,t,n,r,a){var i=vq(e,window.getComputedStyle(t).direction),c=i*r,u=n.target,d=t.contains(u),f=!1,m=c>0,p=0,g=0;do{if(!u)break;var y=AN(e,u),w=y[0],S=y[1],b=y[2],R=S-b-i*w;(w||R)&&CN(e,u)&&(p+=R,g+=w);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},ch=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},GT=function(e){return[e.deltaX,e.deltaY]},ZT=function(e){return e&&"current"in e?e.current:e},_q=function(e,t){return e[0]===t[0]&&e[1]===t[1]},bq=function(e){return`
|
|
99
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
100
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
101
|
+
`)},wq=0,Nc=[];function Sq(e){var t=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),a=A.useState(wq++)[0],i=A.useState(TN)[0],c=A.useRef(e);A.useEffect(function(){c.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var S=qF([e.lockRef.current],(e.shards||[]).map(ZT),!0).filter(Boolean);return S.forEach(function(b){return b.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),S.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=A.useCallback(function(S,b){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!c.current.allowPinchZoom;var R=ch(S),E=n.current,T="deltaX"in S?S.deltaX:E[0]-R[0],C="deltaY"in S?S.deltaY:E[1]-R[1],O,I=S.target,k=Math.abs(T)>Math.abs(C)?"h":"v";if("touches"in S&&k==="h"&&I.type==="range")return!1;var D=window.getSelection(),z=D&&D.anchorNode,Y=z?z===I||z.contains(I):!1;if(Y)return!1;var V=HT(k,I);if(!V)return!0;if(V?O=k:(O=k==="v"?"h":"v",V=HT(k,I)),!V)return!1;if(!r.current&&"changedTouches"in S&&(T||C)&&(r.current=O),!O)return!0;var Z=r.current||O;return yq(Z,b,S,Z==="h"?T:C)},[]),d=A.useCallback(function(S){var b=S;if(!(!Nc.length||Nc[Nc.length-1]!==i)){var R="deltaY"in b?GT(b):ch(b),E=t.current.filter(function(O){return O.name===b.type&&(O.target===b.target||b.target===O.shadowParent)&&_q(O.delta,R)})[0];if(E&&E.should){b.cancelable&&b.preventDefault();return}if(!E){var T=(c.current.shards||[]).map(ZT).filter(Boolean).filter(function(O){return O.contains(b.target)}),C=T.length>0?u(b,T[0]):!c.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),f=A.useCallback(function(S,b,R,E){var T={name:S,delta:b,target:R,should:E,shadowParent:Eq(R)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(C){return C!==T})},1)},[]),m=A.useCallback(function(S){n.current=ch(S),r.current=void 0},[]),p=A.useCallback(function(S){f(S.type,GT(S),S.target,u(S,e.lockRef.current))},[]),g=A.useCallback(function(S){f(S.type,ch(S),S.target,u(S,e.lockRef.current))},[]);A.useEffect(function(){return Nc.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Ic),document.addEventListener("touchmove",d,Ic),document.addEventListener("touchstart",m,Ic),function(){Nc=Nc.filter(function(S){return S!==i}),document.removeEventListener("wheel",d,Ic),document.removeEventListener("touchmove",d,Ic),document.removeEventListener("touchstart",m,Ic)}},[]);var y=e.removeScrollBar,w=e.inert;return A.createElement(A.Fragment,null,w?A.createElement(i,{styles:bq(a)}):null,y?A.createElement(dq,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Eq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Rq=XF(xN,Sq);var Fb=A.forwardRef(function(e,t){return A.createElement(Pm,Xo({},e,{ref:t,sideCar:Rq}))});Fb.classNames=Pm.classNames;var xq=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},kc=new WeakMap,lh=new WeakMap,uh={},Jy=0,IN=function(e){return e&&(e.host||IN(e.parentNode))},Tq=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=IN(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})},Oq=function(e,t,n,r){var a=Tq(t,Array.isArray(e)?e:[e]);uh[n]||(uh[n]=new WeakMap);var i=uh[n],c=[],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),w=y!==null&&y!=="false",S=(kc.get(g)||0)+1,b=(i.get(g)||0)+1;kc.set(g,S),i.set(g,b),c.push(g),S===1&&w&&lh.set(g,!0),b===1&&g.setAttribute(n,"true"),w||g.setAttribute(r,"true")}catch(R){console.error("aria-hidden: cannot operate on ",g,R)}})};return m(t),u.clear(),Jy++,function(){c.forEach(function(p){var g=kc.get(p)-1,y=i.get(p)-1;kc.set(p,g),i.set(p,y),g||(lh.has(p)||p.removeAttribute(r),lh.delete(p)),y||p.removeAttribute(n)}),Jy--,Jy||(kc=new WeakMap,kc=new WeakMap,lh=new WeakMap,uh={})}},NN=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=xq(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),Oq(r,a,n,"aria-hidden")):function(){return null}},Dm="Dialog",[kN,ooe]=$i(Dm),[Cq,Uo]=kN(Dm),MN=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,u=A.useRef(null),d=A.useRef(null),[f,m]=vd({prop:r,defaultProp:a??!1,onChange:i,caller:Dm});return x.jsx(Cq,{scope:t,triggerRef:u,contentRef:d,contentId:Is(),titleId:Is(),descriptionId:Is(),open:f,onOpenChange:m,onOpenToggle:A.useCallback(()=>m(p=>!p),[m]),modal:c,children:n})};MN.displayName=Dm;var PN="DialogTrigger",DN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uo(PN,n),i=An(t,a.triggerRef);return x.jsx(rn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Hb(a.open),...r,ref:i,onClick:ct(e.onClick,a.onOpenToggle)})});DN.displayName=PN;var qb="DialogPortal",[Aq,LN]=kN(qb,{forceMount:void 0}),jN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=Uo(qb,t);return x.jsx(Aq,{scope:t,forceMount:n,children:A.Children.map(r,c=>x.jsx(Va,{present:n||i.open,children:x.jsx(Vb,{asChild:!0,container:a,children:c})}))})};jN.displayName=qb;var qp="DialogOverlay",$N=A.forwardRef((e,t)=>{const n=LN(qp,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Uo(qp,e.__scopeDialog);return i.modal?x.jsx(Va,{present:r||i.open,children:x.jsx(Nq,{...a,ref:t})}):null});$N.displayName=qp;var Iq=td("DialogOverlay.RemoveScroll"),Nq=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uo(qp,n);return x.jsx(Fb,{as:Iq,allowPinchZoom:!0,shards:[a.contentRef],children:x.jsx(rn.div,{"data-state":Hb(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ki="DialogContent",UN=A.forwardRef((e,t)=>{const n=LN(ki,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Uo(ki,e.__scopeDialog);return x.jsx(Va,{present:r||i.open,children:i.modal?x.jsx(kq,{...a,ref:t}):x.jsx(Mq,{...a,ref:t})})});UN.displayName=ki;var kq=A.forwardRef((e,t)=>{const n=Uo(ki,e.__scopeDialog),r=A.useRef(null),a=An(t,n.contentRef,r);return A.useEffect(()=>{const i=r.current;if(i)return NN(i)},[]),x.jsx(zN,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ct(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ct(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&i.preventDefault()}),onFocusOutside:ct(e.onFocusOutside,i=>i.preventDefault())})}),Mq=A.forwardRef((e,t)=>{const n=Uo(ki,e.__scopeDialog),r=A.useRef(!1),a=A.useRef(!1);return x.jsx(zN,{...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 c=i.target;n.triggerRef.current?.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),zN=A.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...c}=e,u=Uo(ki,n),d=A.useRef(null),f=An(t,d);return SN(),x.jsxs(x.Fragment,{children:[x.jsx(zb,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:x.jsx(Ub,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":Hb(u.open),...c,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(Pq,{titleId:u.titleId}),x.jsx(Lq,{contentRef:d,descriptionId:u.descriptionId})]})]})}),Bb="DialogTitle",VN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uo(Bb,n);return x.jsx(rn.h2,{id:a.titleId,...r,ref:t})});VN.displayName=Bb;var FN="DialogDescription",qN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uo(FN,n);return x.jsx(rn.p,{id:a.descriptionId,...r,ref:t})});qN.displayName=FN;var BN="DialogClose",HN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uo(BN,n);return x.jsx(rn.button,{type:"button",...r,ref:t,onClick:ct(e.onClick,()=>a.onOpenChange(!1))})});HN.displayName=BN;function Hb(e){return e?"open":"closed"}var GN="DialogTitleWarning",[aoe,ZN]=fF(GN,{contentName:ki,titleName:Bb,docsSlug:"dialog"}),Pq=({titleId:e})=>{const t=ZN(GN),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},Dq="DialogDescriptionWarning",Lq=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ZN(Dq).contentName}}.`;return A.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},soe=MN,ioe=DN,coe=jN,jq=$N,$q=UN,loe=VN,uoe=qN,doe=HN;function KN(e){const t=e+"CollectionProvider",[n,r]=$i(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=S=>{const{scope:b,children:R}=S,E=le.useRef(null),T=le.useRef(new Map).current;return x.jsx(a,{scope:b,itemMap:T,collectionRef:E,children:R})};c.displayName=t;const u=e+"CollectionSlot",d=td(u),f=le.forwardRef((S,b)=>{const{scope:R,children:E}=S,T=i(u,R),C=An(b,T.collectionRef);return x.jsx(d,{ref:C,children:E})});f.displayName=u;const m=e+"CollectionItemSlot",p="data-radix-collection-item",g=td(m),y=le.forwardRef((S,b)=>{const{scope:R,children:E,...T}=S,C=le.useRef(null),O=An(b,C),I=i(m,R);return le.useEffect(()=>(I.itemMap.set(C,{ref:C,...T}),()=>{I.itemMap.delete(C)})),x.jsx(g,{[p]:"",ref:O,children:E})});y.displayName=m;function w(S){const b=i(e+"CollectionConsumer",S);return le.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const T=Array.from(E.querySelectorAll(`[${p}]`));return Array.from(b.itemMap.values()).sort((I,k)=>T.indexOf(I.ref.current)-T.indexOf(k.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:c,Slot:f,ItemSlot:y},w,r]}var Uq=A.createContext(void 0);function WN(e){const t=A.useContext(Uq);return e||t||"ltr"}const zq=["top","right","bottom","left"],Ds=Math.min,Hr=Math.max,Bp=Math.round,dh=Math.floor,ea=e=>({x:e,y:e}),Vq={left:"right",right:"left",bottom:"top",top:"bottom"},Fq={start:"end",end:"start"};function h_(e,t,n){return Hr(e,Ds(t,n))}function Da(e,t){return typeof e=="function"?e(t):e}function La(e){return e.split("-")[0]}function bl(e){return e.split("-")[1]}function Gb(e){return e==="x"?"y":"x"}function Zb(e){return e==="y"?"height":"width"}const qq=new Set(["top","bottom"]);function Jo(e){return qq.has(La(e))?"y":"x"}function Kb(e){return Gb(Jo(e))}function Bq(e,t,n){n===void 0&&(n=!1);const r=bl(e),a=Kb(e),i=Zb(a);let c=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(c=Hp(c)),[c,Hp(c)]}function Hq(e){const t=Hp(e);return[p_(e),t,p_(t)]}function p_(e){return e.replace(/start|end/g,t=>Fq[t])}const KT=["left","right"],WT=["right","left"],Gq=["top","bottom"],Zq=["bottom","top"];function Kq(e,t,n){switch(e){case"top":case"bottom":return n?t?WT:KT:t?KT:WT;case"left":case"right":return t?Gq:Zq;default:return[]}}function Wq(e,t,n,r){const a=bl(e);let i=Kq(La(e),n==="start",r);return a&&(i=i.map(c=>c+"-"+a),t&&(i=i.concat(i.map(p_)))),i}function Hp(e){return e.replace(/left|right|bottom|top/g,t=>Vq[t])}function Yq(e){return{top:0,right:0,bottom:0,left:0,...e}}function YN(e){return typeof e!="number"?Yq(e):{top:e,right:e,bottom:e,left:e}}function Gp(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 YT(e,t,n){let{reference:r,floating:a}=e;const i=Jo(t),c=Kb(t),u=Zb(c),d=La(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(bl(t)){case"start":y[c]-=g*(n&&f?-1:1);break;case"end":y[c]+=g*(n&&f?-1:1);break}return y}async function Qq(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:c,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=Da(t,e),w=YN(y),b=u[g?p==="floating"?"reference":"floating":p],R=Gp(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.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:c.floating.width,height:c.floating.height}:c.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),C=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},O=Gp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:E,offsetParent:T,strategy:d}):E);return{top:(R.top-O.top+w.top)/C.y,bottom:(O.bottom-R.bottom+w.bottom)/C.y,left:(R.left-O.left+w.left)/C.x,right:(O.right-R.right+w.right)/C.x}}const Xq=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:c}=n,u=i.filter(Boolean),d=await(c.isRTL==null?void 0:c.isRTL(t));let f=await c.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:p}=YT(f,r,d),g=r,y={},w=0;for(let b=0;b<u.length;b++){var S;const{name:R,fn:E}=u[b],{x:T,y:C,data:O,reset:I}=await E({x:m,y:p,initialPlacement:r,placement:g,strategy:a,middlewareData:y,rects:f,platform:{...c,detectOverflow:(S=c.detectOverflow)!=null?S:Qq},elements:{reference:e,floating:t}});m=T??m,p=C??p,y={...y,[R]:{...y[R],...O}},I&&w<=50&&(w++,typeof I=="object"&&(I.placement&&(g=I.placement),I.rects&&(f=I.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:a}):I.rects),{x:m,y:p}=YT(f,g,d)),b=-1)}return{x:m,y:p,placement:g,strategy:a,middlewareData:y}},Jq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:c,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=Da(e,t)||{};if(f==null)return{};const p=YN(m),g={x:n,y:r},y=Kb(a),w=Zb(y),S=await c.getDimensions(f),b=y==="y",R=b?"top":"left",E=b?"bottom":"right",T=b?"clientHeight":"clientWidth",C=i.reference[w]+i.reference[y]-g[y]-i.floating[w],O=g[y]-i.reference[y],I=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f));let k=I?I[T]:0;(!k||!await(c.isElement==null?void 0:c.isElement(I)))&&(k=u.floating[T]||i.floating[w]);const D=C/2-O/2,z=k/2-S[w]/2-1,Y=Ds(p[R],z),V=Ds(p[E],z),Z=Y,U=k-S[w]-V,J=k/2-S[w]/2+D,ie=h_(Z,J,U),F=!d.arrow&&bl(a)!=null&&J!==ie&&i.reference[w]/2-(J<Z?Y:V)-S[w]/2<0,X=F?J<Z?J-Z:J-U:0;return{[y]:g[y]+X,data:{[y]:ie,centerOffset:J-ie-X,...F&&{alignmentOffset:X}},reset:F}}}),eB=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:c,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...b}=Da(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const R=La(a),E=Jo(u),T=La(u)===u,C=await(d.isRTL==null?void 0:d.isRTL(f.floating)),O=g||(T||!S?[Hp(u)]:Hq(u)),I=w!=="none";!g&&I&&O.push(...Wq(u,S,w,C));const k=[u,...O],D=await d.detectOverflow(t,b),z=[];let Y=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&z.push(D[R]),p){const J=Bq(a,c,C);z.push(D[J[0]],D[J[1]])}if(Y=[...Y,{placement:a,overflows:z}],!z.every(J=>J<=0)){var V,Z;const J=(((V=i.flip)==null?void 0:V.index)||0)+1,ie=k[J];if(ie&&(!(p==="alignment"?E!==Jo(ie):!1)||Y.every(ae=>Jo(ae.placement)===E?ae.overflows[0]>0:!0)))return{data:{index:J,overflows:Y},reset:{placement:ie}};let F=(Z=Y.filter(X=>X.overflows[0]<=0).sort((X,ae)=>X.overflows[1]-ae.overflows[1])[0])==null?void 0:Z.placement;if(!F)switch(y){case"bestFit":{var U;const X=(U=Y.filter(ae=>{if(I){const fe=Jo(ae.placement);return fe===E||fe==="y"}return!0}).map(ae=>[ae.placement,ae.overflows.filter(fe=>fe>0).reduce((fe,K)=>fe+K,0)]).sort((ae,fe)=>ae[1]-fe[1])[0])==null?void 0:U[0];X&&(F=X);break}case"initialPlacement":F=u;break}if(a!==F)return{reset:{placement:F}}}return{}}}};function QT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function XT(e){return zq.some(t=>e[t]>=0)}const tB=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...i}=Da(e,t);switch(a){case"referenceHidden":{const c=await r.detectOverflow(t,{...i,elementContext:"reference"}),u=QT(c,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:XT(u)}}}case"escaped":{const c=await r.detectOverflow(t,{...i,altBoundary:!0}),u=QT(c,n.floating);return{data:{escapedOffsets:u,escaped:XT(u)}}}default:return{}}}}},QN=new Set(["left","top"]);async function nB(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),c=La(n),u=bl(n),d=Jo(n)==="y",f=QN.has(c)?-1:1,m=i&&d?-1:1,p=Da(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof w=="number"&&(y=u==="end"?w*-1:w),d?{x:y*m,y:g*f}:{x:g*f,y:y*m}}const rB=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:c,middlewareData:u}=t,d=await nB(t,e);return c===((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:c}}}}},oB=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:i}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:d={fn:R=>{let{x:E,y:T}=R;return{x:E,y:T}}},...f}=Da(e,t),m={x:n,y:r},p=await i.detectOverflow(t,f),g=Jo(La(a)),y=Gb(g);let w=m[y],S=m[g];if(c){const R=y==="y"?"top":"left",E=y==="y"?"bottom":"right",T=w+p[R],C=w-p[E];w=h_(T,w,C)}if(u){const R=g==="y"?"top":"left",E=g==="y"?"bottom":"right",T=S+p[R],C=S-p[E];S=h_(T,S,C)}const b=d.fn({...t,[y]:w,[g]:S});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[y]:c,[g]:u}}}}}},aB=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:c}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Da(e,t),m={x:n,y:r},p=Jo(a),g=Gb(p);let y=m[g],w=m[p];const S=Da(u,t),b=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const T=g==="y"?"height":"width",C=i.reference[g]-i.floating[T]+b.mainAxis,O=i.reference[g]+i.reference[T]-b.mainAxis;y<C?y=C:y>O&&(y=O)}if(f){var R,E;const T=g==="y"?"width":"height",C=QN.has(La(a)),O=i.reference[p]-i.floating[T]+(C&&((R=c.offset)==null?void 0:R[p])||0)+(C?0:b.crossAxis),I=i.reference[p]+i.reference[T]+(C?0:((E=c.offset)==null?void 0:E[p])||0)-(C?b.crossAxis:0);w<O?w=O:w>I&&(w=I)}return{[g]:y,[p]:w}}}},sB=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:c,elements:u}=t,{apply:d=()=>{},...f}=Da(e,t),m=await c.detectOverflow(t,f),p=La(a),g=bl(a),y=Jo(a)==="y",{width:w,height:S}=i.floating;let b,R;p==="top"||p==="bottom"?(b=p,R=g===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(R=p,b=g==="end"?"top":"bottom");const E=S-m.top-m.bottom,T=w-m.left-m.right,C=Ds(S-m[b],E),O=Ds(w-m[R],T),I=!t.middlewareData.shift;let k=C,D=O;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=E),I&&!g){const Y=Hr(m.left,0),V=Hr(m.right,0),Z=Hr(m.top,0),U=Hr(m.bottom,0);y?D=w-2*(Y!==0||V!==0?Y+V:Hr(m.left,m.right)):k=S-2*(Z!==0||U!==0?Z+U:Hr(m.top,m.bottom))}await d({...t,availableWidth:D,availableHeight:k});const z=await c.getDimensions(u.floating);return w!==z.width||S!==z.height?{reset:{rects:!0}}:{}}}};function Lm(){return typeof window<"u"}function wl(e){return XN(e)?(e.nodeName||"").toLowerCase():"#document"}function Kr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sa(e){var t;return(t=(XN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function XN(e){return Lm()?e instanceof Node||e instanceof Kr(e).Node:!1}function jo(e){return Lm()?e instanceof Element||e instanceof Kr(e).Element:!1}function ra(e){return Lm()?e instanceof HTMLElement||e instanceof Kr(e).HTMLElement:!1}function JT(e){return!Lm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Kr(e).ShadowRoot}const iB=new Set(["inline","contents"]);function yd(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=$o(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!iB.has(a)}const cB=new Set(["table","td","th"]);function lB(e){return cB.has(wl(e))}const uB=[":popover-open",":modal"];function jm(e){return uB.some(t=>{try{return e.matches(t)}catch{return!1}})}const dB=["transform","translate","scale","rotate","perspective"],fB=["transform","translate","scale","rotate","perspective","filter"],hB=["paint","layout","strict","content"];function Wb(e){const t=Yb(),n=jo(e)?$o(e):e;return dB.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)||fB.some(r=>(n.willChange||"").includes(r))||hB.some(r=>(n.contain||"").includes(r))}function pB(e){let t=Ls(e);for(;ra(t)&&!cl(t);){if(Wb(t))return t;if(jm(t))return null;t=Ls(t)}return null}function Yb(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const mB=new Set(["html","body","#document"]);function cl(e){return mB.has(wl(e))}function $o(e){return Kr(e).getComputedStyle(e)}function $m(e){return jo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ls(e){if(wl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||JT(e)&&e.host||sa(e);return JT(t)?t.host:t}function JN(e){const t=Ls(e);return cl(t)?e.ownerDocument?e.ownerDocument.body:e.body:ra(t)&&yd(t)?t:JN(t)}function nd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=JN(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),c=Kr(a);if(i){const u=m_(c);return t.concat(c,c.visualViewport||[],yd(a)?a:[],u&&n?nd(u):[])}return t.concat(a,nd(a,[],n))}function m_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ek(e){const t=$o(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=ra(e),i=a?e.offsetWidth:n,c=a?e.offsetHeight:r,u=Bp(n)!==i||Bp(r)!==c;return u&&(n=i,r=c),{width:n,height:r,$:u}}function Qb(e){return jo(e)?e:e.contextElement}function tl(e){const t=Qb(e);if(!ra(t))return ea(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=ek(t);let c=(i?Bp(n.width):n.width)/r,u=(i?Bp(n.height):n.height)/a;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const gB=ea(0);function tk(e){const t=Kr(e);return!Yb()||!t.visualViewport?gB:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vB(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Kr(e)?!1:t}function Mi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=Qb(e);let c=ea(1);t&&(r?jo(r)&&(c=tl(r)):c=tl(e));const u=vB(i,n,r)?tk(i):ea(0);let d=(a.left+u.x)/c.x,f=(a.top+u.y)/c.y,m=a.width/c.x,p=a.height/c.y;if(i){const g=Kr(i),y=r&&jo(r)?Kr(r):r;let w=g,S=m_(w);for(;S&&r&&y!==w;){const b=tl(S),R=S.getBoundingClientRect(),E=$o(S),T=R.left+(S.clientLeft+parseFloat(E.paddingLeft))*b.x,C=R.top+(S.clientTop+parseFloat(E.paddingTop))*b.y;d*=b.x,f*=b.y,m*=b.x,p*=b.y,d+=T,f+=C,w=Kr(S),S=m_(w)}}return Gp({width:m,height:p,x:d,y:f})}function Um(e,t){const n=$m(e).scrollLeft;return t?t.left+n:Mi(sa(e)).left+n}function nk(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Um(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function yB(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",c=sa(r),u=t?jm(t.floating):!1;if(r===c||u&&i)return n;let d={scrollLeft:0,scrollTop:0},f=ea(1);const m=ea(0),p=ra(r);if((p||!p&&!i)&&((wl(r)!=="body"||yd(c))&&(d=$m(r)),ra(r))){const y=Mi(r);f=tl(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const g=c&&!p&&!i?nk(c,d):ea(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 _B(e){return Array.from(e.getClientRects())}function bB(e){const t=sa(e),n=$m(e),r=e.ownerDocument.body,a=Hr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Hr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+Um(e);const u=-n.scrollTop;return $o(r).direction==="rtl"&&(c+=Hr(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:c,y:u}}const eO=25;function wB(e,t){const n=Kr(e),r=sa(e),a=n.visualViewport;let i=r.clientWidth,c=r.clientHeight,u=0,d=0;if(a){i=a.width,c=a.height;const m=Yb();(!m||m&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}const f=Um(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,w=Math.abs(r.clientWidth-p.clientWidth-y);w<=eO&&(i-=w)}else f<=eO&&(i+=f);return{width:i,height:c,x:u,y:d}}const SB=new Set(["absolute","fixed"]);function EB(e,t){const n=Mi(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=ra(e)?tl(e):ea(1),c=e.clientWidth*i.x,u=e.clientHeight*i.y,d=a*i.x,f=r*i.y;return{width:c,height:u,x:d,y:f}}function tO(e,t,n){let r;if(t==="viewport")r=wB(e,n);else if(t==="document")r=bB(sa(e));else if(jo(t))r=EB(t,n);else{const a=tk(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Gp(r)}function rk(e,t){const n=Ls(e);return n===t||!jo(n)||cl(n)?!1:$o(n).position==="fixed"||rk(n,t)}function RB(e,t){const n=t.get(e);if(n)return n;let r=nd(e,[],!1).filter(u=>jo(u)&&wl(u)!=="body"),a=null;const i=$o(e).position==="fixed";let c=i?Ls(e):e;for(;jo(c)&&!cl(c);){const u=$o(c),d=Wb(c);!d&&u.position==="fixed"&&(a=null),(i?!d&&!a:!d&&u.position==="static"&&!!a&&SB.has(a.position)||yd(c)&&!d&&rk(e,c))?r=r.filter(m=>m!==c):a=u,c=Ls(c)}return t.set(e,r),r}function xB(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const c=[...n==="clippingAncestors"?jm(t)?[]:RB(t,this._c):[].concat(n),r],u=c[0],d=c.reduce((f,m)=>{const p=tO(t,m,a);return f.top=Hr(p.top,f.top),f.right=Ds(p.right,f.right),f.bottom=Ds(p.bottom,f.bottom),f.left=Hr(p.left,f.left),f},tO(t,u,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function TB(e){const{width:t,height:n}=ek(e);return{width:t,height:n}}function OB(e,t,n){const r=ra(t),a=sa(t),i=n==="fixed",c=Mi(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const d=ea(0);function f(){d.x=Um(a)}if(r||!r&&!i)if((wl(t)!=="body"||yd(a))&&(u=$m(t)),r){const y=Mi(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?nk(a,u):ea(0),p=c.left+u.scrollLeft-d.x-m.x,g=c.top+u.scrollTop-d.y-m.y;return{x:p,y:g,width:c.width,height:c.height}}function e0(e){return $o(e).position==="static"}function nO(e,t){if(!ra(e)||$o(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return sa(e)===n&&(n=n.ownerDocument.body),n}function ok(e,t){const n=Kr(e);if(jm(e))return n;if(!ra(e)){let a=Ls(e);for(;a&&!cl(a);){if(jo(a)&&!e0(a))return a;a=Ls(a)}return n}let r=nO(e,t);for(;r&&lB(r)&&e0(r);)r=nO(r,t);return r&&cl(r)&&e0(r)&&!Wb(r)?n:r||pB(e)||n}const CB=async function(e){const t=this.getOffsetParent||ok,n=this.getDimensions,r=await n(e.floating);return{reference:OB(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function AB(e){return $o(e).direction==="rtl"}const IB={convertOffsetParentRelativeRectToViewportRelativeRect:yB,getDocumentElement:sa,getClippingRect:xB,getOffsetParent:ok,getElementRects:CB,getClientRects:_B,getDimensions:TB,getScale:tl,isElement:jo,isRTL:AB};function ak(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function NB(e,t){let n=null,r;const a=sa(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function c(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 w=dh(p),S=dh(a.clientWidth-(m+g)),b=dh(a.clientHeight-(p+y)),R=dh(m),T={rootMargin:-w+"px "+-S+"px "+-b+"px "+-R+"px",threshold:Hr(0,Ds(1,d))||1};let C=!0;function O(I){const k=I[0].intersectionRatio;if(k!==d){if(!C)return c();k?c(!1,k):r=setTimeout(()=>{c(!1,1e-7)},1e3)}k===1&&!ak(f,e.getBoundingClientRect())&&c(),C=!1}try{n=new IntersectionObserver(O,{...T,root:a.ownerDocument})}catch{n=new IntersectionObserver(O,T)}n.observe(e)}return c(!0),i}function kB(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Qb(e),m=a||i?[...f?nd(f):[],...nd(t)]:[];m.forEach(R=>{a&&R.addEventListener("scroll",n,{passive:!0}),i&&R.addEventListener("resize",n)});const p=f&&u?NB(f,n):null;let g=-1,y=null;c&&(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 w,S=d?Mi(e):null;d&&b();function b(){const R=Mi(e);S&&!ak(S,R)&&n(),S=R,w=requestAnimationFrame(b)}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(w)}}const MB=rB,PB=oB,DB=eB,LB=sB,jB=tB,rO=Jq,$B=aB,UB=(e,t,n)=>{const r=new Map,a={platform:IB,...n},i={...a.platform,_c:r};return Xq(e,t,{...a,platform:i})};var zB=typeof document<"u",VB=function(){},hp=zB?A.useLayoutEffect:VB;function Zp(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(!Zp(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)&&!Zp(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function sk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function oO(e,t){const n=sk(e);return Math.round(t*n)/n}function t0(e){const t=A.useRef(e);return hp(()=>{t.current=e}),t}function FB(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:c}={},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);Zp(g,r)||y(r);const[w,S]=A.useState(null),[b,R]=A.useState(null),E=A.useCallback(ae=>{ae!==I.current&&(I.current=ae,S(ae))},[]),T=A.useCallback(ae=>{ae!==k.current&&(k.current=ae,R(ae))},[]),C=i||w,O=c||b,I=A.useRef(null),k=A.useRef(null),D=A.useRef(m),z=d!=null,Y=t0(d),V=t0(a),Z=t0(f),U=A.useCallback(()=>{if(!I.current||!k.current)return;const ae={placement:t,strategy:n,middleware:g};V.current&&(ae.platform=V.current),UB(I.current,k.current,ae).then(fe=>{const K={...fe,isPositioned:Z.current!==!1};J.current&&!Zp(D.current,K)&&(D.current=K,Sm.flushSync(()=>{p(K)}))})},[g,t,n,V,Z]);hp(()=>{f===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(ae=>({...ae,isPositioned:!1})))},[f]);const J=A.useRef(!1);hp(()=>(J.current=!0,()=>{J.current=!1}),[]),hp(()=>{if(C&&(I.current=C),O&&(k.current=O),C&&O){if(Y.current)return Y.current(C,O,U);U()}},[C,O,U,Y,z]);const ie=A.useMemo(()=>({reference:I,floating:k,setReference:E,setFloating:T}),[E,T]),F=A.useMemo(()=>({reference:C,floating:O}),[C,O]),X=A.useMemo(()=>{const ae={position:n,left:0,top:0};if(!F.floating)return ae;const fe=oO(F.floating,m.x),K=oO(F.floating,m.y);return u?{...ae,transform:"translate("+fe+"px, "+K+"px)",...sk(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:fe,top:K}},[n,u,F.floating,m.x,m.y]);return A.useMemo(()=>({...m,update:U,refs:ie,elements:F,floatingStyles:X}),[m,U,ie,F,X])}const qB=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?rO({element:r.current,padding:a}).fn(n):{}:r?rO({element:r,padding:a}).fn(n):{}}}},BB=(e,t)=>({...MB(e),options:[e,t]}),HB=(e,t)=>({...PB(e),options:[e,t]}),GB=(e,t)=>({...$B(e),options:[e,t]}),ZB=(e,t)=>({...DB(e),options:[e,t]}),KB=(e,t)=>({...LB(e),options:[e,t]}),WB=(e,t)=>({...jB(e),options:[e,t]}),YB=(e,t)=>({...qB(e),options:[e,t]});var QB="Arrow",ik=A.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return x.jsx(rn.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"})})});ik.displayName=QB;var XB=ik;function ck(e){const[t,n]=A.useState(void 0);return Do(()=>{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 c,u;if("borderBoxSize"in i){const d=i.borderBoxSize,f=Array.isArray(d)?d[0]:d;c=f.inlineSize,u=f.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Xb="Popper",[lk,uk]=$i(Xb),[JB,dk]=lk(Xb),fk=e=>{const{__scopePopper:t,children:n}=e,[r,a]=A.useState(null);return x.jsx(JB,{scope:t,anchor:r,onAnchorChange:a,children:n})};fk.displayName=Xb;var hk="PopperAnchor",pk=A.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=dk(hk,n),c=A.useRef(null),u=An(t,c),d=A.useRef(null);return A.useEffect(()=>{const f=d.current;d.current=r?.current||c.current,f!==d.current&&i.onAnchorChange(d.current)}),r?null:x.jsx(rn.div,{...a,ref:u})});pk.displayName=hk;var Jb="PopperContent",[eH,tH]=lk(Jb),mk=A.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:w,...S}=e,b=dk(Jb,n),[R,E]=A.useState(null),T=An(t,me=>E(me)),[C,O]=A.useState(null),I=ck(C),k=I?.width??0,D=I?.height??0,z=r+(i!=="center"?"-"+i:""),Y=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},V=Array.isArray(f)?f:[f],Z=V.length>0,U={padding:Y,boundary:V.filter(rH),altBoundary:Z},{refs:J,floatingStyles:ie,placement:F,isPositioned:X,middlewareData:ae}=FB({strategy:"fixed",placement:z,whileElementsMounted:(...me)=>kB(...me,{animationFrame:y==="always"}),elements:{reference:b.anchor},middleware:[BB({mainAxis:a+D,alignmentAxis:c}),d&&HB({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?GB():void 0,...U}),d&&ZB({...U}),KB({...U,apply:({elements:me,rects:_e,availableWidth:Ae,availableHeight:Ne})=>{const{width:H,height:ne}=_e.reference,be=me.floating.style;be.setProperty("--radix-popper-available-width",`${Ae}px`),be.setProperty("--radix-popper-available-height",`${Ne}px`),be.setProperty("--radix-popper-anchor-width",`${H}px`),be.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),C&&YB({element:C,padding:u}),oH({arrowWidth:k,arrowHeight:D}),g&&WB({strategy:"referenceHidden",...U})]}),[fe,K]=yk(F),P=Lo(w);Do(()=>{X&&P?.()},[X,P]);const B=ae.arrow?.x,q=ae.arrow?.y,L=ae.arrow?.centerOffset!==0,[$,Q]=A.useState();return Do(()=>{R&&Q(window.getComputedStyle(R).zIndex)},[R]),x.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:X?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:$,"--radix-popper-transform-origin":[ae.transformOrigin?.x,ae.transformOrigin?.y].join(" "),...ae.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(eH,{scope:n,placedSide:fe,onArrowChange:O,arrowX:B,arrowY:q,shouldHideArrow:L,children:x.jsx(rn.div,{"data-side":fe,"data-align":K,...S,ref:T,style:{...S.style,animation:X?void 0:"none"}})})})});mk.displayName=Jb;var gk="PopperArrow",nH={top:"bottom",right:"left",bottom:"top",left:"right"},vk=A.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=tH(gk,r),c=nH[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[c]: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(XB,{...a,ref:n,style:{...a.style,display:"block"}})})});vk.displayName=gk;function rH(e){return e!==null}var oH=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,c=a.arrow?.centerOffset!==0,u=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[f,m]=yk(n),p={start:"0%",center:"50%",end:"100%"}[m],g=(a.arrow?.x??0)+u/2,y=(a.arrow?.y??0)+d/2;let w="",S="";return f==="bottom"?(w=c?p:`${g}px`,S=`${-d}px`):f==="top"?(w=c?p:`${g}px`,S=`${r.floating.height+d}px`):f==="right"?(w=`${-d}px`,S=c?p:`${y}px`):f==="left"&&(w=`${r.floating.width+d}px`,S=c?p:`${y}px`),{data:{x:w,y:S}}}});function yk(e){const[t,n="center"]=e.split("-");return[t,n]}var _k=fk,aH=pk,sH=mk,iH=vk,n0="rovingFocusGroup.onEntryFocus",cH={bubbles:!1,cancelable:!0},_d="RovingFocusGroup",[g_,bk,lH]=KN(_d),[uH,wk]=$i(_d,[lH]),[dH,fH]=uH(_d),Sk=A.forwardRef((e,t)=>x.jsx(g_.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(g_.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(hH,{...e,ref:t})})}));Sk.displayName=_d;var hH=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...p}=e,g=A.useRef(null),y=An(t,g),w=WN(i),[S,b]=vd({prop:c,defaultProp:u??null,onChange:d,caller:_d}),[R,E]=A.useState(!1),T=Lo(f),C=bk(n),O=A.useRef(!1),[I,k]=A.useState(0);return A.useEffect(()=>{const D=g.current;if(D)return D.addEventListener(n0,T),()=>D.removeEventListener(n0,T)},[T]),x.jsx(dH,{scope:n,orientation:r,dir:w,loop:a,currentTabStopId:S,onItemFocus:A.useCallback(D=>b(D),[b]),onItemShiftTab:A.useCallback(()=>E(!0),[]),onFocusableItemAdd:A.useCallback(()=>k(D=>D+1),[]),onFocusableItemRemove:A.useCallback(()=>k(D=>D-1),[]),children:x.jsx(rn.div,{tabIndex:R||I===0?-1:0,"data-orientation":r,...p,ref:y,style:{outline:"none",...e.style},onMouseDown:ct(e.onMouseDown,()=>{O.current=!0}),onFocus:ct(e.onFocus,D=>{const z=!O.current;if(D.target===D.currentTarget&&z&&!R){const Y=new CustomEvent(n0,cH);if(D.currentTarget.dispatchEvent(Y),!Y.defaultPrevented){const V=C().filter(F=>F.focusable),Z=V.find(F=>F.active),U=V.find(F=>F.id===S),ie=[Z,U,...V].filter(Boolean).map(F=>F.ref.current);xk(ie,m)}}O.current=!1}),onBlur:ct(e.onBlur,()=>E(!1))})})}),Ek="RovingFocusGroupItem",Rk=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:c,...u}=e,d=Is(),f=i||d,m=fH(Ek,n),p=m.currentTabStopId===f,g=bk(n),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:S}=m;return A.useEffect(()=>{if(r)return y(),()=>w()},[r,y,w]),x.jsx(g_.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:x.jsx(rn.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:ct(e.onMouseDown,b=>{r?m.onItemFocus(f):b.preventDefault()}),onFocus:ct(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:ct(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){m.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const R=gH(b,m.orientation,m.dir);if(R!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let T=g().filter(C=>C.focusable).map(C=>C.ref.current);if(R==="last")T.reverse();else if(R==="prev"||R==="next"){R==="prev"&&T.reverse();const C=T.indexOf(b.currentTarget);T=m.loop?vH(T,C+1):T.slice(C+1)}setTimeout(()=>xk(T))}}),children:typeof c=="function"?c({isCurrentTabStop:p,hasTabStop:S!=null}):c})})});Rk.displayName=Ek;var pH={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function mH(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function gH(e,t,n){const r=mH(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return pH[r]}function xk(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function vH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var yH=Sk,_H=Rk,v_=["Enter"," "],bH=["ArrowDown","PageUp","Home"],Tk=["ArrowUp","PageDown","End"],wH=[...bH,...Tk],SH={ltr:[...v_,"ArrowRight"],rtl:[...v_,"ArrowLeft"]},EH={ltr:["ArrowLeft"],rtl:["ArrowRight"]},bd="Menu",[rd,RH,xH]=KN(bd),[Ui,Ok]=$i(bd,[xH,uk,wk]),wd=uk(),Ck=wk(),[Ak,qs]=Ui(bd),[TH,Sd]=Ui(bd),Ik=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:c=!0}=e,u=wd(t),[d,f]=A.useState(null),m=A.useRef(!1),p=Lo(i),g=WN(a);return A.useEffect(()=>{const y=()=>{m.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>m.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),x.jsx(_k,{...u,children:x.jsx(Ak,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:x.jsx(TH,{scope:t,onClose:A.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:c,children:r})})})};Ik.displayName=bd;var OH="MenuAnchor",e1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=wd(n);return x.jsx(aH,{...a,...r,ref:t})});e1.displayName=OH;var t1="MenuPortal",[CH,Nk]=Ui(t1,{forceMount:void 0}),kk=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=qs(t1,t);return x.jsx(CH,{scope:t,forceMount:n,children:x.jsx(Va,{present:n||i.open,children:x.jsx(Vb,{asChild:!0,container:a,children:r})})})};kk.displayName=t1;var po="MenuContent",[AH,n1]=Ui(po),Mk=A.forwardRef((e,t)=>{const n=Nk(po,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=qs(po,e.__scopeMenu),c=Sd(po,e.__scopeMenu);return x.jsx(rd.Provider,{scope:e.__scopeMenu,children:x.jsx(Va,{present:r||i.open,children:x.jsx(rd.Slot,{scope:e.__scopeMenu,children:c.modal?x.jsx(IH,{...a,ref:t}):x.jsx(NH,{...a,ref:t})})})})}),IH=A.forwardRef((e,t)=>{const n=qs(po,e.__scopeMenu),r=A.useRef(null),a=An(t,r);return A.useEffect(()=>{const i=r.current;if(i)return NN(i)},[]),x.jsx(r1,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ct(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),NH=A.forwardRef((e,t)=>{const n=qs(po,e.__scopeMenu);return x.jsx(r1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),kH=td("MenuContent.ScrollLock"),r1=A.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,disableOutsideScroll:w,...S}=e,b=qs(po,n),R=Sd(po,n),E=wd(n),T=Ck(n),C=RH(n),[O,I]=A.useState(null),k=A.useRef(null),D=An(t,k,b.onContentChange),z=A.useRef(0),Y=A.useRef(""),V=A.useRef(0),Z=A.useRef(null),U=A.useRef("right"),J=A.useRef(0),ie=w?Fb:A.Fragment,F=w?{as:kH,allowPinchZoom:!0}:void 0,X=fe=>{const K=Y.current+fe,P=C().filter(me=>!me.disabled),B=document.activeElement,q=P.find(me=>me.ref.current===B)?.textValue,L=P.map(me=>me.textValue),$=BH(L,K,q),Q=P.find(me=>me.textValue===$)?.ref.current;(function me(_e){Y.current=_e,window.clearTimeout(z.current),_e!==""&&(z.current=window.setTimeout(()=>me(""),1e3))})(K),Q&&setTimeout(()=>Q.focus())};A.useEffect(()=>()=>window.clearTimeout(z.current),[]),SN();const ae=A.useCallback(fe=>U.current===Z.current?.side&&GH(fe,Z.current?.area),[]);return x.jsx(AH,{scope:n,searchRef:Y,onItemEnter:A.useCallback(fe=>{ae(fe)&&fe.preventDefault()},[ae]),onItemLeave:A.useCallback(fe=>{ae(fe)||(k.current?.focus(),I(null))},[ae]),onTriggerLeave:A.useCallback(fe=>{ae(fe)&&fe.preventDefault()},[ae]),pointerGraceTimerRef:V,onPointerGraceIntentChange:A.useCallback(fe=>{Z.current=fe},[]),children:x.jsx(ie,{...F,children:x.jsx(zb,{asChild:!0,trapped:a,onMountAutoFocus:ct(i,fe=>{fe.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:x.jsx(Ub,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,children:x.jsx(yH,{asChild:!0,...T,dir:R.dir,orientation:"vertical",loop:r,currentTabStopId:O,onCurrentTabStopIdChange:I,onEntryFocus:ct(d,fe=>{R.isUsingKeyboardRef.current||fe.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(sH,{role:"menu","aria-orientation":"vertical","data-state":Yk(b.open),"data-radix-menu-content":"",dir:R.dir,...E,...S,ref:D,style:{outline:"none",...S.style},onKeyDown:ct(S.onKeyDown,fe=>{const P=fe.target.closest("[data-radix-menu-content]")===fe.currentTarget,B=fe.ctrlKey||fe.altKey||fe.metaKey,q=fe.key.length===1;P&&(fe.key==="Tab"&&fe.preventDefault(),!B&&q&&X(fe.key));const L=k.current;if(fe.target!==L||!wH.includes(fe.key))return;fe.preventDefault();const Q=C().filter(me=>!me.disabled).map(me=>me.ref.current);Tk.includes(fe.key)&&Q.reverse(),FH(Q)}),onBlur:ct(e.onBlur,fe=>{fe.currentTarget.contains(fe.target)||(window.clearTimeout(z.current),Y.current="")}),onPointerMove:ct(e.onPointerMove,od(fe=>{const K=fe.target,P=J.current!==fe.clientX;if(fe.currentTarget.contains(K)&&P){const B=fe.clientX>J.current?"right":"left";U.current=B,J.current=fe.clientX}}))})})})})})})});Mk.displayName=po;var MH="MenuGroup",o1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(rn.div,{role:"group",...r,ref:t})});o1.displayName=MH;var PH="MenuLabel",Pk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(rn.div,{...r,ref:t})});Pk.displayName=PH;var Kp="MenuItem",aO="menu.itemSelect",zm=A.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=A.useRef(null),c=Sd(Kp,e.__scopeMenu),u=n1(Kp,e.__scopeMenu),d=An(t,i),f=A.useRef(!1),m=()=>{const p=i.current;if(!n&&p){const g=new CustomEvent(aO,{bubbles:!0,cancelable:!0});p.addEventListener(aO,y=>r?.(y),{once:!0}),yN(p,g),g.defaultPrevented?f.current=!1:c.onClose()}};return x.jsx(Dk,{...a,ref:d,disabled:n,onClick:ct(e.onClick,m),onPointerDown:p=>{e.onPointerDown?.(p),f.current=!0},onPointerUp:ct(e.onPointerUp,p=>{f.current||p.currentTarget?.click()}),onKeyDown:ct(e.onKeyDown,p=>{const g=u.searchRef.current!=="";n||g&&p.key===" "||v_.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});zm.displayName=Kp;var Dk=A.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,c=n1(Kp,n),u=Ck(n),d=A.useRef(null),f=An(t,d),[m,p]=A.useState(!1),[g,y]=A.useState("");return A.useEffect(()=>{const w=d.current;w&&y((w.textContent??"").trim())},[i.children]),x.jsx(rd.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:x.jsx(_H,{asChild:!0,...u,focusable:!r,children:x.jsx(rn.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:f,onPointerMove:ct(e.onPointerMove,od(w=>{r?c.onItemLeave(w):(c.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ct(e.onPointerLeave,od(w=>c.onItemLeave(w))),onFocus:ct(e.onFocus,()=>p(!0)),onBlur:ct(e.onBlur,()=>p(!1))})})})}),DH="MenuCheckboxItem",Lk=A.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return x.jsx(Vk,{scope:e.__scopeMenu,checked:n,children:x.jsx(zm,{role:"menuitemcheckbox","aria-checked":Wp(n)?"mixed":n,...a,ref:t,"data-state":i1(n),onSelect:ct(a.onSelect,()=>r?.(Wp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Lk.displayName=DH;var jk="MenuRadioGroup",[LH,jH]=Ui(jk,{value:void 0,onValueChange:()=>{}}),$k=A.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=Lo(r);return x.jsx(LH,{scope:e.__scopeMenu,value:n,onValueChange:i,children:x.jsx(o1,{...a,ref:t})})});$k.displayName=jk;var Uk="MenuRadioItem",zk=A.forwardRef((e,t)=>{const{value:n,...r}=e,a=jH(Uk,e.__scopeMenu),i=n===a.value;return x.jsx(Vk,{scope:e.__scopeMenu,checked:i,children:x.jsx(zm,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":i1(i),onSelect:ct(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});zk.displayName=Uk;var a1="MenuItemIndicator",[Vk,$H]=Ui(a1,{checked:!1}),Fk=A.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=$H(a1,n);return x.jsx(Va,{present:r||Wp(i.checked)||i.checked===!0,children:x.jsx(rn.span,{...a,ref:t,"data-state":i1(i.checked)})})});Fk.displayName=a1;var UH="MenuSeparator",qk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(rn.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});qk.displayName=UH;var zH="MenuArrow",Bk=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=wd(n);return x.jsx(iH,{...a,...r,ref:t})});Bk.displayName=zH;var s1="MenuSub",[VH,Hk]=Ui(s1),Gk=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:a}=e,i=qs(s1,t),c=wd(t),[u,d]=A.useState(null),[f,m]=A.useState(null),p=Lo(a);return A.useEffect(()=>(i.open===!1&&p(!1),()=>p(!1)),[i.open,p]),x.jsx(_k,{...c,children:x.jsx(Ak,{scope:t,open:r,onOpenChange:p,content:f,onContentChange:m,children:x.jsx(VH,{scope:t,contentId:Is(),triggerId:Is(),trigger:u,onTriggerChange:d,children:n})})})};Gk.displayName=s1;var Iu="MenuSubTrigger",Zk=A.forwardRef((e,t)=>{const n=qs(Iu,e.__scopeMenu),r=Sd(Iu,e.__scopeMenu),a=Hk(Iu,e.__scopeMenu),i=n1(Iu,e.__scopeMenu),c=A.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=i,f={__scopeMenu:e.__scopeMenu},m=A.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return A.useEffect(()=>m,[m]),A.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),d(null)}},[u,d]),x.jsx(e1,{asChild:!0,...f,children:x.jsx(Dk,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":Yk(n.open),...e,ref:gd(t,a.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ct(e.onPointerMove,od(p=>{i.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(i.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:ct(e.onPointerLeave,od(p=>{m();const g=n.content?.getBoundingClientRect();if(g){const y=n.content?.dataset.side,w=y==="right",S=w?-5:5,b=g[w?"left":"right"],R=g[w?"right":"left"];i.onPointerGraceIntentChange({area:[{x:p.clientX+S,y:p.clientY},{x:b,y:g.top},{x:R,y:g.top},{x:R,y:g.bottom},{x:b,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:ct(e.onKeyDown,p=>{const g=i.searchRef.current!=="";e.disabled||g&&p.key===" "||SH[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});Zk.displayName=Iu;var Kk="MenuSubContent",Wk=A.forwardRef((e,t)=>{const n=Nk(po,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=qs(po,e.__scopeMenu),c=Sd(po,e.__scopeMenu),u=Hk(Kk,e.__scopeMenu),d=A.useRef(null),f=An(t,d);return x.jsx(rd.Provider,{scope:e.__scopeMenu,children:x.jsx(Va,{present:r||i.open,children:x.jsx(rd.Slot,{scope:e.__scopeMenu,children:x.jsx(r1,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:f,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{c.isUsingKeyboardRef.current&&d.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:ct(e.onFocusOutside,m=>{m.target!==u.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ct(e.onEscapeKeyDown,m=>{c.onClose(),m.preventDefault()}),onKeyDown:ct(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),g=EH[c.dir].includes(m.key);p&&g&&(i.onOpenChange(!1),u.trigger?.focus(),m.preventDefault())})})})})})});Wk.displayName=Kk;function Yk(e){return e?"open":"closed"}function Wp(e){return e==="indeterminate"}function i1(e){return Wp(e)?"indeterminate":e?"checked":"unchecked"}function FH(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function BH(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 c=qH(e,Math.max(i,0));a.length===1&&(c=c.filter(f=>f!==n));const d=c.find(f=>f.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function HH(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,c=t.length-1;i<t.length;c=i++){const u=t[i],d=t[c],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 GH(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return HH(n,t)}function od(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ZH=Ik,KH=e1,WH=kk,YH=Mk,QH=o1,XH=Pk,JH=zm,eG=Lk,tG=$k,nG=zk,rG=Fk,oG=qk,aG=Bk,sG=Gk,iG=Zk,cG=Wk,Vm="DropdownMenu",[lG]=$i(Vm,[Ok]),sr=Ok(),[uG,Qk]=lG(Vm),Xk=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:c,modal:u=!0}=e,d=sr(t),f=A.useRef(null),[m,p]=vd({prop:a,defaultProp:i??!1,onChange:c,caller:Vm});return x.jsx(uG,{scope:t,triggerId:Is(),triggerRef:f,contentId:Is(),open:m,onOpenChange:p,onOpenToggle:A.useCallback(()=>p(g=>!g),[p]),modal:u,children:x.jsx(ZH,{...d,open:m,onOpenChange:p,dir:r,modal:u,children:n})})};Xk.displayName=Vm;var Jk="DropdownMenuTrigger",e4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=Qk(Jk,n),c=sr(n);return x.jsx(KH,{asChild:!0,...c,children:x.jsx(rn.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:gd(t,i.triggerRef),onPointerDown:ct(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:ct(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});e4.displayName=Jk;var dG="DropdownMenuPortal",t4=e=>{const{__scopeDropdownMenu:t,...n}=e,r=sr(t);return x.jsx(WH,{...r,...n})};t4.displayName=dG;var n4="DropdownMenuContent",r4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Qk(n4,n),i=sr(n),c=A.useRef(!1);return x.jsx(YH,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:ct(e.onCloseAutoFocus,u=>{c.current||a.triggerRef.current?.focus(),c.current=!1,u.preventDefault()}),onInteractOutside:ct(e.onInteractOutside,u=>{const d=u.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,m=d.button===2||f;(!a.modal||m)&&(c.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)"}})});r4.displayName=n4;var fG="DropdownMenuGroup",hG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return x.jsx(QH,{...a,...r,ref:t})});hG.displayName=fG;var pG="DropdownMenuLabel",o4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return x.jsx(XH,{...a,...r,ref:t})});o4.displayName=pG;var mG="DropdownMenuItem",a4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return x.jsx(JH,{...a,...r,ref:t})});a4.displayName=mG;var gG="DropdownMenuCheckboxItem",s4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return x.jsx(eG,{...a,...r,ref:t})});s4.displayName=gG;var vG="DropdownMenuRadioGroup",yG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return x.jsx(tG,{...a,...r,ref:t})});yG.displayName=vG;var _G="DropdownMenuRadioItem",bG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return x.jsx(nG,{...a,...r,ref:t})});bG.displayName=_G;var wG="DropdownMenuItemIndicator",i4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return x.jsx(rG,{...a,...r,ref:t})});i4.displayName=wG;var SG="DropdownMenuSeparator",c4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return x.jsx(oG,{...a,...r,ref:t})});c4.displayName=SG;var EG="DropdownMenuArrow",RG=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return x.jsx(aG,{...a,...r,ref:t})});RG.displayName=EG;var xG=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:a,defaultOpen:i}=e,c=sr(t),[u,d]=vd({prop:r,defaultProp:i??!1,onChange:a,caller:"DropdownMenuSub"});return x.jsx(sG,{...c,open:u,onOpenChange:d,children:n})},TG="DropdownMenuSubTrigger",l4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return x.jsx(iG,{...a,...r,ref:t})});l4.displayName=TG;var OG="DropdownMenuSubContent",u4=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=sr(n);return x.jsx(cG,{...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)"}})});u4.displayName=OG;var CG=Xk,AG=e4,IG=t4,NG=r4,foe=o4,kG=a4,hoe=s4,poe=i4,moe=c4,goe=xG,voe=l4,yoe=u4,MG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ed=MG.reduce((e,t)=>{const n=mN(`Primitive.${t}`),r=A.forwardRef((a,i)=>{const{asChild:c,...u}=a,d=c?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}},{}),PG="Label",d4=A.forwardRef((e,t)=>x.jsx(Ed.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));d4.displayName=PG;var DG=d4;function LG(e,t=[]){let n=[];function r(i,c){const u=A.createContext(c);u.displayName=i+"Context";const d=n.length;n=[...n,c];const f=p=>{const{scope:g,children:y,...w}=p,S=g?.[e]?.[d]||u,b=A.useMemo(()=>w,Object.values(w));return x.jsx(S.Provider,{value:b,children:y})};f.displayName=i+"Provider";function m(p,g){const y=g?.[e]?.[d]||u,w=A.useContext(y);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(c=>A.createContext(c));return function(u){const d=u?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,jG(a,...t)]}function jG(...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 c=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var $G=iA();function UG(){return $G.useSyncExternalStore(zG,()=>!0,()=>!1)}function zG(){return()=>{}}var c1="Avatar",[VG]=LG(c1),[FG,f4]=VG(c1),h4=A.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,i]=A.useState("idle");return x.jsx(FG,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:x.jsx(Ed.span,{...r,ref:t})})});h4.displayName=c1;var p4="AvatarImage",m4=A.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...i}=e,c=f4(p4,n),u=qG(r,i),d=Lo(f=>{a(f),c.onImageLoadingStatusChange(f)});return Do(()=>{u!=="idle"&&d(u)},[u,d]),u==="loaded"?x.jsx(Ed.img,{...i,ref:t,src:r}):null});m4.displayName=p4;var g4="AvatarFallback",v4=A.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,i=f4(g4,n),[c,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]),c&&i.imageLoadingStatus!=="loaded"?x.jsx(Ed.span,{...a,ref:t}):null});v4.displayName=g4;function sO(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function qG(e,{referrerPolicy:t,crossOrigin:n}){const r=UG(),a=A.useRef(null),i=r?(a.current||(a.current=new window.Image),a.current):null,[c,u]=A.useState(()=>sO(i,e));return Do(()=>{u(sO(i,e))},[i,e]),Do(()=>{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]),c}var BG=h4,HG=m4,GG=v4;function ZG(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function l1(e,t,n=""){const r=ZG(e),a=e?.length;if(!r||t!==void 0){const c=n&&`"${n}" `,u="",d=r?`length=${a}`:`type=${typeof e}`;throw new Error(c+"expected Uint8Array"+u+", got "+d)}return e}function iO(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 KG(e,t){l1(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 y_(...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 Ko(e,t){return e<<32-t|e>>>t}const WG=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",YG=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function QG(e){if(l1(e),WG)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=YG[e[n]];return t}function XG(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 JG=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function eZ(e,t,n){return e&t^~e&n}function tZ(e,t,n){return e&t^e&n^t&n}class nZ{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){iO(this),l1(t);const{view:n,buffer:r,blockLen:a}=this,i=t.length;for(let c=0;c<i;){const u=Math.min(a-this.pos,i-c);if(u===a){const d=r0(t);for(;a<=i-c;c+=a)this.process(d,c);continue}r.set(t.subarray(c,c+u),this.pos),this.pos+=u,c+=u,this.pos===a&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){iO(this),KG(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:a,isLE:i}=this;let{pos:c}=this;n[c++]=128,y_(this.buffer.subarray(c)),this.padOffset>a-c&&(this.process(r,0),c=0);for(let p=c;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:c,pos:u}=this;return t.destroyed=c,t.finished=i,t.length=a,t.pos=u,a%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const gs=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),rZ=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]),vs=new Uint32Array(64);class oZ extends nZ{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:r,D:a,E:i,F:c,G:u,H:d}=this;return[t,n,r,a,i,c,u,d]}set(t,n,r,a,i,c,u,d){this.A=t|0,this.B=n|0,this.C=r|0,this.D=a|0,this.E=i|0,this.F=c|0,this.G=u|0,this.H=d|0}process(t,n){for(let p=0;p<16;p++,n+=4)vs[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const g=vs[p-15],y=vs[p-2],w=Ko(g,7)^Ko(g,18)^g>>>3,S=Ko(y,17)^Ko(y,19)^y>>>10;vs[p]=S+vs[p-7]+w+vs[p-16]|0}let{A:r,B:a,C:i,D:c,E:u,F:d,G:f,H:m}=this;for(let p=0;p<64;p++){const g=Ko(u,6)^Ko(u,11)^Ko(u,25),y=m+g+eZ(u,d,f)+rZ[p]+vs[p]|0,S=(Ko(r,2)^Ko(r,13)^Ko(r,22))+tZ(r,a,i)|0;m=f,f=d,d=u,u=c+y|0,c=i,i=a,a=r,r=y+S|0}r=r+this.A|0,a=a+this.B|0,i=i+this.C|0,c=c+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,c,u,d,f,m)}roundClean(){y_(vs)}destroy(){this.set(0,0,0,0,0,0,0,0),y_(this.buffer)}}class aZ extends oZ{A=gs[0]|0;B=gs[1]|0;C=gs[2]|0;D=gs[3]|0;E=gs[4]|0;F=gs[5]|0;G=gs[6]|0;H=gs[7]|0;constructor(){super(32)}}const sZ=XG(()=>new aZ,JG(1));function iZ(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 Fm="Checkbox",[cZ]=$i(Fm),[lZ,u1]=cZ(Fm);function uZ(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:i,form:c,name:u,onCheckedChange:d,required:f,value:m="on",internal_do_not_use_render:p}=e,[g,y]=vd({prop:n,defaultProp:a??!1,onChange:d,caller:Fm}),[w,S]=A.useState(null),[b,R]=A.useState(null),E=A.useRef(!1),T=w?!!c||!!w.closest("form"):!0,C={checked:g,disabled:i,setChecked:y,control:w,setControl:S,name:u,form:c,value:m,hasConsumerStoppedPropagationRef:E,required:f,defaultChecked:Ns(a)?!1:a,isFormControl:T,bubbleInput:b,setBubbleInput:R};return x.jsx(lZ,{scope:t,...C,children:dZ(p)?p(C):r})}var y4="CheckboxTrigger",_4=A.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:i,value:c,disabled:u,checked:d,required:f,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:y,bubbleInput:w}=u1(y4,e),S=An(a,m),b=A.useRef(d);return A.useEffect(()=>{const R=i?.form;if(R){const E=()=>p(b.current);return R.addEventListener("reset",E),()=>R.removeEventListener("reset",E)}},[i,p]),x.jsx(rn.button,{type:"button",role:"checkbox","aria-checked":Ns(d)?"mixed":d,"aria-required":f,"data-state":x4(d),"data-disabled":u?"":void 0,disabled:u,value:c,...r,ref:S,onKeyDown:ct(t,R=>{R.key==="Enter"&&R.preventDefault()}),onClick:ct(n,R=>{p(E=>Ns(E)?!0:!E),w&&y&&(g.current=R.isPropagationStopped(),g.current||R.stopPropagation())})})});_4.displayName=y4;var b4=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:i,required:c,disabled:u,value:d,onCheckedChange:f,form:m,...p}=e;return x.jsx(uZ,{__scopeCheckbox:n,checked:a,defaultChecked:i,disabled:u,required:c,onCheckedChange:f,name:r,form:m,value:d,internal_do_not_use_render:({isFormControl:g})=>x.jsxs(x.Fragment,{children:[x.jsx(_4,{...p,ref:t,__scopeCheckbox:n}),g&&x.jsx(R4,{__scopeCheckbox:n})]})})});b4.displayName=Fm;var w4="CheckboxIndicator",S4=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,i=u1(w4,n);return x.jsx(Va,{present:r||Ns(i.checked)||i.checked===!0,children:x.jsx(rn.span,{"data-state":x4(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});S4.displayName=w4;var E4="CheckboxBubbleInput",R4=A.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:c,required:u,disabled:d,name:f,value:m,form:p,bubbleInput:g,setBubbleInput:y}=u1(E4,e),w=An(n,y),S=iZ(i),b=ck(r);A.useEffect(()=>{const E=g;if(!E)return;const T=window.HTMLInputElement.prototype,O=Object.getOwnPropertyDescriptor(T,"checked").set,I=!a.current;if(S!==i&&O){const k=new Event("click",{bubbles:I});E.indeterminate=Ns(i),O.call(E,Ns(i)?!1:i),E.dispatchEvent(k)}},[g,S,i,a]);const R=A.useRef(Ns(i)?!1:i);return x.jsx(rn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??R.current,required:u,disabled:d,name:f,value:m,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});R4.displayName=E4;function dZ(e){return typeof e=="function"}function Ns(e){return e==="indeterminate"}function x4(e){return Ns(e)?"indeterminate":e?"checked":"unchecked"}var T4={OBJECT:"object",UNDEFINED:"undefined"},fh="browser",cO="cpu",lO="device",o0="engine",hh="os",bs="name",Yp="type",__="vendor",Oo="version",b_="architecture",w_="major",S_="model",fZ="console",hZ="mobile",pZ="tablet",mZ="smarttv",gZ="wearable",vZ="embedded",yZ=typeof window!==T4.UNDEFINED,a0=yZ&&window.navigator?window.navigator:void 0;a0&&a0.userAgentData&&a0.userAgentData;var qm=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},ph=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==T4.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return ph.call(e.init,[[fh,[bs,Oo,w_,Yp]],[cO,[b_]],[lO,[Yp,S_,__]],[o0,[bs,Oo]],[hh,[bs,Oo]]]),ph.call(e.isIgnore,[[fh,[Oo,w_]],[o0,[Oo]],[hh,[Oo]]]),ph.call(e.isIgnoreRgx,[[fh,/ ?browser$/i],[hh,/ ?os$/i]]),ph.call(e.toString,[[fh,[bs,Oo]],[cO,[b_]],[lO,[__,S_]],[o0,[bs,Oo]],[hh,[bs,Oo]]]),e})();qm([bs,Oo,w_,Yp]);qm([b_]);qm([S_,__,Yp,fZ,hZ,mZ,pZ,gZ,vZ]);qm([bs,Oo]);function _Z(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 bZ=le.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}),Bm=()=>{const e=le.useContext(bZ);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};_Z(`[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 wZ(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function SZ(...e){return t=>e.forEach(n=>wZ(n,t))}function O4(...e){return A.useCallback(SZ(...e),e)}const uO=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function s0(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function EZ(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const i0={DURATION:.5,EASE:[.32,.72,0,1]},RZ=8,xZ=26,TZ=()=>()=>{};function OZ(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=Bm(),i=le.useRef(null),c=A.useMemo(()=>document.body.style.backgroundColor,[]);function u(){return(window.innerWidth-xZ)/window.innerWidth}le.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;EZ(r&&!a?s0(document.body,{background:"black"}):TZ,s0(d,{transformOrigin:uO(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${i0.DURATION}s`,transitionTimingFunction:`cubic-bezier(${i0.EASE.join(",")})`}));const f=s0(d,{borderRadius:`${RZ}px`,overflow:"hidden",...uO(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(()=>{c?document.body.style.background=c:document.body.style.removeProperty("background")},i0.DURATION*1e3)}}},[t,n,c])}const CZ=le.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:a,shouldFade:i,isOpen:c,modal:u,shouldAnimate:d}=Bm(),f=O4(t,n),m=r&&r.length>0;if(!u)return null;const p=le.useCallback(g=>a(g),[a]);return le.createElement(jq,{onMouseUp:p,ref:f,"data-vaul-overlay":"","data-vaul-snap-points":c&&m?"true":"false","data-vaul-snap-points-overlay":c&&i?"true":"false","data-vaul-animate":d?.current?"true":"false",...e})});CZ.displayName="Drawer.Overlay";const AZ=le.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},a){const{drawerRef:i,onPress:c,onRelease:u,onDrag:d,keyboardIsOpen:f,snapPointsOffset:m,activeSnapPointIndex:p,modal:g,isOpen:y,direction:w,snapPoints:S,container:b,handleOnly:R,shouldAnimate:E,autoFocus:T}=Bm(),[C,O]=le.useState(!1),I=O4(a,i),k=le.useRef(null),D=le.useRef(null),z=le.useRef(!1),Y=S&&S.length>0;OZ();const V=(U,J,ie=0)=>{if(z.current)return!0;const F=Math.abs(U.y),X=Math.abs(U.x),ae=X>F,fe=["bottom","right"].includes(J)?1:-1;if(J==="left"||J==="right"){if(!(U.x*fe<0)&&X>=0&&X<=ie)return ae}else if(!(U.y*fe<0)&&F>=0&&F<=ie)return!ae;return z.current=!0,!0};le.useEffect(()=>{Y&&window.requestAnimationFrame(()=>{O(!0)})},[]);function Z(U){k.current=null,z.current=!1,u(U)}return le.createElement($q,{"data-vaul-drawer-direction":w,"data-vaul-drawer":"","data-vaul-delayed-snap-points":C?"true":"false","data-vaul-snap-points":y&&Y?"true":"false","data-vaul-custom-container":b?"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),k.current={x:U.pageX,y:U.pageY},c(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(D.current=U,R||(r.onPointerMove==null||r.onPointerMove.call(r,U),!k.current))return;const J=U.pageY-k.current.y,ie=U.pageX-k.current.x,F=U.pointerType==="touch"?10:2;V({x:ie,y:J},w,F)?d(U):(Math.abs(ie)>F||Math.abs(J)>F)&&(k.current=null)},onPointerUp:U=>{r.onPointerUp==null||r.onPointerUp.call(r,U),k.current=null,z.current=!1,u(U)},onPointerOut:U=>{r.onPointerOut==null||r.onPointerOut.call(r,U),Z(D.current)},onContextMenu:U=>{r.onContextMenu==null||r.onContextMenu.call(r,U),D.current&&Z(D.current)}})});AZ.displayName="Drawer.Content";const IZ=250,NZ=120,kZ=le.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:a,isDragging:i,snapPoints:c,activeSnapPoint:u,setActiveSnapPoint:d,dismissible:f,handleOnly:m,isOpen:p,onPress:g,onDrag:y}=Bm(),w=le.useRef(null),S=le.useRef(!1);function b(){if(S.current){T();return}window.setTimeout(()=>{R()},NZ)}function R(){if(i||e||S.current){T();return}if(T(),!c||c.length===0){f||a();return}if(u===c[c.length-1]&&f){a();return}const O=c.findIndex(k=>k===u);if(O===-1)return;const I=c[O+1];d(I)}function E(){w.current=window.setTimeout(()=>{S.current=!0},IZ)}function T(){w.current&&window.clearTimeout(w.current),S.current=!1}return le.createElement("div",{onClick:b,onPointerCancel:T,onPointerDown:C=>{m&&g(C),E()},onPointerMove:C=>{m&&y(C)},ref:r,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},le.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});kZ.displayName="Drawer.Handle";var nl=(e,t,n)=>new Promise((r,a)=>{var i=d=>{try{u(n.next(d))}catch(f){a(f)}},c=d=>{try{u(n.throw(d))}catch(f){a(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,c);u((n=n.apply(e,t)).next())}),pp=class extends Error{},MZ=class extends Error{},PZ=e=>Math.exp(e)*150,DZ=(e,...t)=>nl(void 0,[e,...t],function*(n,{attempts:r=4}={}){var a;let i;for(let c=0;c<r;c++)try{return yield n()}catch(u){i=u,yield new Promise(d=>setTimeout(d,PZ(c)))}throw new pp((a=i?.message)!=null?a:"Exhausted all retries")}),wu,C4="captchaFoxOnLoad",dO=`https://cdn.captchafox.com/api.js?render=explicit&onload=${C4}`;function LZ(){return nl(this,arguments,function*({nonce:e}={}){return wu&&document.querySelector(`script[src="${dO}"]`)||(wu=new Promise((t,n)=>{window[C4]=t;const r=document.createElement("script");r.src=dO,r.async=!0,r.defer=!0,r.onerror=a=>{r.remove(),wu=void 0,n(a)},e&&(r.nonce=e),document.body.appendChild(r)})),wu})}function jZ(){return nl(this,arguments,function*(e={}){return DZ(()=>LZ(e))})}var Mc=()=>typeof window?.captchafox<"u",A4=A.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:r,theme:a,className:i,nonce:c,i18n:u,onError:d,onVerify:f,onLoad:m,onFail:p,onClose:g,onChallengeChange:y,onChallengeOpen:w},S)=>{const[b,R]=A.useState(),[E,T]=A.useState(),C=A.useRef(!1),O=A.useRef(),I=A.useRef(),k=A.useRef(),D=A.useRef(!1);A.useImperativeHandle(S,()=>({getResponse(){return!Mc()||!E?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(E)},reset(){if(!Mc()||!E){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(E)},remove(){if(!Mc()||!E){console.warn("[CaptchaFox] Widget has not been loaded");return}T(void 0),window.captchafox.remove(E)},execute:()=>nl(void 0,null,function*(){if(D.current)return Promise.reject(new pp);if(!Mc()||!E)return Y();try{return yield window.captchafox.execute(E)}catch(U){const J=V(U);return Promise.reject(J)}})}),[E]),A.useEffect(()=>{E&&m?.()},[E]),A.useEffect(()=>()=>{z()},[]),A.useEffect(()=>{b&&(C.current?Mc()&&Z():jZ({nonce:c}).then(()=>nl(void 0,null,function*(){Mc()&&(C.current=!0,yield Z())})).catch(U=>{var J;d?.(U),D.current=!0,(J=k.current)==null||J.call(k),console.error("[CaptchaFox] Could not load script:",U)}))},[b,t,n,r]);const z=()=>{clearTimeout(I.current)},Y=()=>new Promise((U,J)=>{k.current=()=>{z(),J(new pp)},I.current=setTimeout(()=>{J(new MZ("Execute timed out"))},e*1e3),O.current=ie=>{z(),window.captchafox.execute(ie).then(U).catch(F=>{const X=V(F);J(X)})}}),V=U=>U!=="challenge-aborted"&&U!=="rate-limited"?new pp:U,Z=()=>nl(void 0,null,function*(){var U,J,ie;if((U=window.captchafox)==null||U.remove(E),!b||((J=b?.children)==null?void 0:J.length)===1)return;const F=yield(ie=window.captchafox)==null?void 0:ie.render(b,{lang:n,sitekey:t,mode:r,theme:a,i18n:u,onError:d,onFail:p,onClose:g,onVerify:f,onChallengeChange:y,onChallengeOpen:w});F&&(T(F),O.current&&(O.current(F),O.current=void 0))});return le.createElement("div",{ref:R,id:E,className:i})});A4.displayName="CaptchaFox";function co(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E_(e,t){return E_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},E_(e,t)}function $Z(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,E_(e,t)}var UZ=Object.defineProperty,zZ=Object.defineProperties,VZ=Object.getOwnPropertyDescriptors,Qp=Object.getOwnPropertySymbols,I4=Object.prototype.hasOwnProperty,N4=Object.prototype.propertyIsEnumerable,R_=(e,t,n)=>t in e?UZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vr=(e,t)=>{for(var n in t||(t={}))I4.call(t,n)&&R_(e,n,t[n]);if(Qp)for(var n of Qp(t))N4.call(t,n)&&R_(e,n,t[n]);return e},k4=(e,t)=>zZ(e,VZ(t)),FZ=(e,t)=>{var n={};for(var r in e)I4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Qp)for(var r of Qp(e))t.indexOf(r)<0&&N4.call(e,r)&&(n[r]=e[r]);return n},Ln=(e,t,n)=>(R_(e,typeof t!="symbol"?t+"":t,n),n),ll=(e,t,n)=>new Promise((r,a)=>{var i=d=>{try{u(n.next(d))}catch(f){a(f)}},c=d=>{try{u(n.throw(d))}catch(f){a(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,c);u((n=n.apply(e,t)).next())}),qZ="hCaptcha-script",mp="hCaptchaOnLoad",fO="script-error",Es="@hCaptcha/loader";function BZ(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function M4(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function P4(e){return e||document.head}function HZ(e){var t;e.setTag("source",Es),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",Vr({},GZ())),e.setContext("device",k4(Vr({},KZ()),{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 GZ(){var e,t,n,r,a,i;let c=navigator.userAgent,u,d;return c.indexOf("Firefox")!==-1?(u="Firefox",d=(e=c.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):c.indexOf("Edg")!==-1?(u="Microsoft Edge",d=(t=c.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):c.indexOf("Chrome")!==-1&&c.indexOf("Safari")!==-1?(u="Chrome",d=(n=c.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):c.indexOf("Safari")!==-1&&c.indexOf("Chrome")===-1?(u="Safari",d=(r=c.match(/Version\/([\d.]+)/))==null?void 0:r[1]):c.indexOf("Opera")!==-1||c.indexOf("OPR")!==-1?(u="Opera",d=(a=c.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:a[2]):c.indexOf("MSIE")!==-1||c.indexOf("Trident")!==-1?(u="Internet Explorer",d=(i=c.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:i[2]):(u="Unknown",d="Unknown"),{name:u,version:d}}function ZZ(e){return new Promise(t=>setTimeout(t,e))}function KZ(){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 WZ=class D4{constructor(t){Ln(this,"_parent"),Ln(this,"breadcrumbs",[]),Ln(this,"context",{}),Ln(this,"extra",{}),Ln(this,"tags",{}),Ln(this,"request"),Ln(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new D4(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=Vr(Vr({},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=Vr(Vr({},r.extra),a.extra),r.contexts=Vr(Vr({},r.contexts),a.context),r.tags=Vr(Vr({},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}},YZ=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,QZ=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,XZ=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,JZ=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,mh="?",hO="An unknown error occurred",eK="0.0.4";function tK(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function nr(e){return(e+256).toString(16).substring(1)}function nK(){let e=tK(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,nr(e[0])+nr(e[1])+nr(e[2])+nr(e[3])+"-"+nr(e[4])+nr(e[5])+"-"+nr(e[6])+nr(e[7])+"-"+nr(e[8])+nr(e[9])+"-"+nr(e[10])+nr(e[11])+nr(e[12])+nr(e[13])+nr(e[14])+nr(e[15])}var rK=[[YZ,"chrome"],[XZ,"winjs"],[QZ,"gecko"]];function oK(e){var t,n,r,a;if(!e.stack)return null;let i=[],c=(r=(n=(t=e.stack).split)==null?void 0:n.call(t,`
|
|
108
|
+
`))!=null?r:[];for(let u=0;u<c.length;++u){let d=null,f=null,m=null;for(let[p,g]of rK)if(f=p.exec(c[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]||mh,lineno:f[3]?+f[3]:null,colno:f[4]?+f[4]:null};else if(m==="winjs")d={filename:f[2],function:f[1]||mh,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]||mh,lineno:f[4]?+f[4]:null,colno:f[5]?+f[5]:null};else continue;!d.function&&d.lineno&&(d.function=mh),i.push(d)}}return i.length?i.reverse():null}function aK(e){let t=oK(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function sK(e){let t=JZ.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 iK(e,t,n){var r,a;let i=Vr({event_id:nK().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:eK},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 c=[],u=e.error;for(let d=0;d<5&&u&&(c.push(aK(u)),!(!u.cause||!(u.cause instanceof Error)));d++)u=u.cause;i.exception={values:c.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=FZ(n,["message"]),i=new Error(typeof r=="string"?r:hO);return Object.assign(i,a)}let t=new Error(hO);return Object.assign(t,{cause:e})}function lK(e,t,n){return ll(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 c=yield fetch(e,k4(Vr({},t),{signal:i})),u=yield c.text();return{status:c.status,body:u}}return yield new Promise((i,c)=>{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=()=>c(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(),c(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 Rr,x_=(Rr=class{constructor(e){Ln(this,"apiURL"),Ln(this,"dsn"),Ln(this,"environment"),Ln(this,"release"),Ln(this,"sampleRate"),Ln(this,"debug"),Ln(this,"_scope"),Ln(this,"shouldBuffer",!1),Ln(this,"bufferlimit",20),Ln(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 WZ,this.apiURL=sK(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){Rr._instance||(Rr._instance=new Rr(e))}static get instance(){if(!Rr._instance)throw new Error("Sentry has not been initialized");return Rr._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return Rr.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){Rr.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:cK(e),scope:t??this._scope})}static captureException(e,t){Rr.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){Rr.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 ll(this,null,function*(){try{this.log("Sending sentry event",e);let n=iK(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),c=yield lK(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:i},t);this.log("Sentry response",c.status),c.status!==200&&(console.log(c.body),console.error("Failed to send event to Sentry",c))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return ll(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 Rr.instance.flush(e)}static reset(){Rr._instance=void 0}},Ln(Rr,"_instance"),Rr),uK="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",dK="2.3.0",fK="production";function hK(e=!0){if(!e)return pO();x_.init({dsn:uK,release:dK,environment:fK});let t=x_.scope;return HZ(t),pO(t)}function pO(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&x_.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:c=!1,scriptSource:u=""}={},d){let f=P4(e),m=M4(f);return new Promise((p,g)=>{let y=m.document.createElement("script");y.id=qZ,u?y.src=`${u}?onload=${mp}`:c?y.src=`${a}/1/secure-api.js?onload=${mp}`:y.src=`${a}/1/api.js?onload=${mp}`,y.crossOrigin=r,y.async=n;let w=(S,b)=>{try{!c&&i&&f.removeChild(y),b(S)}catch(R){g(R)}};y.onload=S=>w(S,p),y.onerror=S=>{d&&d(y.src),w(S,g)},y.src+=t!==""?`&${t}`:"",f.appendChild(y)})}var gh=[];function mK(e={cleanup:!1},t){try{t.addBreadcrumb({category:Es,message:"hCaptcha loader params",data:e});let n=P4(e.scriptLocation),r=M4(n),a=gh.find(({scope:c})=>c===r.window);if(a)return t.addBreadcrumb({category:Es,message:"hCaptcha already loaded"}),a.promise;let i=new Promise((c,u)=>ll(this,null,function*(){try{r.window[mp]=()=>{t.addBreadcrumb({category:Es,message:"hCaptcha script called onload function"}),c(r.window.hcaptcha)};let d=BZ({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(Vr({query:d},e),f=>{t.captureRequest({url:f,method:"GET"})}),t.addBreadcrumb({category:Es,message:"hCaptcha loaded",data:a})}catch{t.addBreadcrumb({category:Es,message:"hCaptcha failed to load"});let f=gh.findIndex(m=>m.scope===r.window);f!==-1&&gh.splice(f,1),u(new Error(fO))}}));return gh.push({promise:i,scope:r.window}),i}catch(n){return t.captureException(n),Promise.reject(new Error(fO))}}function L4(e,t,n=0){return ll(this,null,function*(){var r,a;let i=(r=e.maxRetries)!=null?r:2,c=(a=e.retryDelay)!=null?a:1e3,u=n<i?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield mK(e,t)}catch(d){return t.addBreadcrumb({category:Es,message:u}),n>=i?(t.captureException(d),Promise.reject(d)):(t.addBreadcrumb({category:Es,message:`Waiting ${c}ms before retry attempt ${n+1}`}),yield ZZ(c),n+=1,L4(e,t,n))}})}function gK(){return ll(this,arguments,function*(e={}){let t=hK(e.sentry);return yield L4(e,t)})}function mO(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function gO(e){return e||document.head}var vK=(function(e){$Z(t,e);function t(r){var a;return a=e.call(this,r)||this,a._hcaptcha=void 0,a.renderCaptcha=a.renderCaptcha.bind(co(a)),a.resetCaptcha=a.resetCaptcha.bind(co(a)),a.removeCaptcha=a.removeCaptcha.bind(co(a)),a.isReady=a.isReady.bind(co(a)),a._onReady=null,a.loadCaptcha=a.loadCaptcha.bind(co(a)),a.handleOnLoad=a.handleOnLoad.bind(co(a)),a.handleSubmit=a.handleSubmit.bind(co(a)),a.handleExpire=a.handleExpire.bind(co(a)),a.handleError=a.handleError.bind(co(a)),a.handleOpen=a.handleOpen.bind(co(a)),a.handleClose=a.handleClose.bind(co(a)),a.handleChallengeExpired=a.handleChallengeExpired.bind(co(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=gO(this.props.scriptLocation),c=mO(i);this._hcaptcha=c.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,c=["sitekey","size","theme","tabindex","languageOverride","endpoint"],u=c.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,c=a.assethost,u=a.endpoint,d=a.host,f=a.imghost,m=a.languageOverride,p=a.reCaptchaCompat,g=a.reportapi,y=a.sentry,w=a.custom,S=a.loadAsync,b=a.scriptLocation,R=a.scriptSource,E=a.secureApi,T=a.cleanup,C=T===void 0?!0:T,O=a.userJourneys,I={render:"explicit",apihost:i,assethost:c,endpoint:u,hl:m,host:d,imghost:f,recaptchacompat:p===!1?"off":null,reportapi:g,sentry:y,custom:w,loadAsync:S,scriptLocation:b,scriptSource:R,secureApi:E,cleanup:C,uj:O!==void 0?O:!1};gK(I).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(a){var i=this,c=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(),c&&c(),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,c=this._hcaptcha,u=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){i.captchaId="",c.remove(u),a&&a()})},n.handleOnLoad=function(){var a=this;this.setState({isApiReady:!0},function(){var i=gO(a.props.scriptLocation),c=mO(i);a._hcaptcha=c.window.hcaptcha,a.renderCaptcha(function(){var u=a.props.onLoad;u&&u()})})},n.handleSubmit=function(a){var i=this.props.onVerify,c=this.state.isRemoved,u=this._hcaptcha,d=this.captchaId;if(!(typeof u>"u"||c)){var f=u.getResponse(d),m=u.getRespKey(d);i&&i(f,m)}},n.handleExpire=function(){var a=this.props.onExpire,i=this._hcaptcha,c=this.captchaId;this.isReady()&&(i.reset(c),a&&a())},n.handleError=function(a){var i=this.props.onError,c=this._hcaptcha,u=this.captchaId;this.isReady()&&c.reset(u),i&&i(a)},n.isReady=function(){var a=this.state,i=a.isApiReady,c=a.isRemoved;return i&&!c},n._cancelPendingExecute=function(a){if(this._pendingExecute){var i=this._pendingExecute;this._pendingExecute=null;var c=new Error(a);i.reject(c)}},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 c=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=c.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){c.execute(f,a)},null);var d=c.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,c=this.captchaId;this.isReady()&&(a&&typeof a!="object"&&(a=null),i.setData(c,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),yK=({as:e="div",...t},n)=>x.jsx(e,{...t,ref:n}),_K=A.forwardRef(yK),bK="https://challenges.cloudflare.com/turnstile/v0/api.js",d1="cf-turnstile-script",wK="cf-turnstile",f1="onloadTurnstileCallback",j4=e=>!!document.getElementById(e),SK=({render:e="explicit",onLoadCallbackName:t=f1,scriptOptions:{nonce:n="",defer:r=!0,async:a=!0,id:i="",appendTo:c,onError:u,crossOrigin:d=""}={}})=>{let f=i||d1;if(j4(f))return;let m=document.createElement("script");m.id=f,m.src=`${bK}?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]),(c==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(m))},hi={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 EK(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function RK(e=d1){let[t,n]=A.useState(!1);return A.useEffect(()=>{let r=()=>{j4(e)&&n(!0)},a=new MutationObserver(r);return a.observe(document,{childList:!0,subtree:!0}),r(),()=>{a.disconnect()}},[e]),t}var qu="unloaded",$4,xK=new Promise((e,t)=>{$4={resolve:e,reject:t},qu==="ready"&&e(void 0)}),vO=(e=f1)=>(qu==="unloaded"&&(qu="loading",window[e]=()=>{$4.resolve(),qu="ready",delete window[e]}),xK),U4=A.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:a,onWidgetLoad:i,onSuccess:c,onExpire:u,onError:d,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g,onLoadScript:y,id:w,style:S,as:b="div",injectScript:R=!0,rerenderOnCallbackChange:E=!1,...T}=e,C=r.size,O=A.useCallback(()=>typeof C>"u"?{}:r.execution==="execute"?hi.invisible:r.appearance==="interaction-only"?hi.interactionOnly:hi[C],[r.execution,C,r.appearance]),[I,k]=A.useState(O()),D=A.useRef(null),[z,Y]=A.useState(!1),V=A.useRef(void 0),Z=A.useRef(!1),U=w||wK,J=A.useRef({onSuccess:c,onError:d,onExpire:u,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g});A.useEffect(()=>{E||(J.current={onSuccess:c,onError:d,onExpire:u,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g})});let ie=n?.id||d1,F=RK(ie),X=n?.onLoadCallbackName||f1,ae=r.appearance||"always",fe=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:EK(C),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:P=>{Z.current=!0,E?c?.(P):J.current.onSuccess?.(P)},"error-callback":E?d:(...P)=>J.current.onError?.(...P),"expired-callback":E?u:(...P)=>J.current.onExpire?.(...P),"before-interactive-callback":E?f:(...P)=>J.current.onBeforeInteractive?.(...P),"after-interactive-callback":E?m:(...P)=>J.current.onAfterInteractive?.(...P),"unsupported-callback":E?p:(...P)=>J.current.onUnsupported?.(...P),"timeout-callback":E?g:(...P)=>J.current.onTimeout?.(...P)}),[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,C,E,E?c:null,E?d:null,E?u:null,E?f:null,E?m:null,E?p:null,E?g:null]),K=A.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return A.useEffect(function(){R&&!z&&(vO(X),SK({onLoadCallbackName:X,scriptOptions:{...n,id:ie}}))},[R,z,n,ie,X]),A.useEffect(function(){qu!=="ready"&&vO(X).then(()=>Y(!0)).catch(console.error)},[X]),A.useEffect(function(){if(!D.current||!z)return;let P=!1;return(async()=>{if(P||!D.current)return;let B=window.turnstile.render(D.current,fe);V.current=B,V.current&&i?.(V.current)})(),()=>{P=!0,V.current&&(window.turnstile.remove(V.current),Z.current=!1)}},[U,z,fe]),A.useImperativeHandle(t,()=>{let{turnstile:P}=window;return{getResponse(){if(!P?.getResponse||!V.current||!K()){console.warn("Turnstile has not been loaded");return}return P.getResponse(V.current)},async getResponsePromise(B=3e4,q=100){return new Promise((L,$)=>{let Q,me=async()=>{if(Z.current&&window.turnstile&&V.current)try{let _e=window.turnstile.getResponse(V.current);return Q&&clearTimeout(Q),_e?L(_e):$(new Error("No response received"))}catch(_e){return Q&&clearTimeout(Q),console.warn("Failed to get response",_e),$(new Error("Failed to get response"))}Q||(Q=setTimeout(()=>{Q&&clearTimeout(Q),$(new Error("Timeout"))},B)),await new Promise(_e=>setTimeout(_e,q)),await me()};me()})},reset(){if(!P?.reset||!V.current||!K()){console.warn("Turnstile has not been loaded");return}r.execution==="execute"&&k(hi.invisible);try{Z.current=!1,P.reset(V.current)}catch(B){console.warn(`Failed to reset Turnstile widget ${V}`,B)}},remove(){if(!P?.remove||!V.current||!K()){console.warn("Turnstile has not been loaded");return}k(hi.invisible),Z.current=!1,P.remove(V.current),V.current=null},render(){if(!P?.render||!D.current||!K()||V.current){console.warn("Turnstile has not been loaded or container not found");return}let B=P.render(D.current,fe);return V.current=B,V.current&&i?.(V.current),r.execution!=="execute"&&k(C?hi[C]:{}),B},execute(){if(r.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!P?.execute||!D.current||!V.current||!K()){console.warn("Turnstile has not been loaded or container not found");return}P.execute(D.current,fe),k(C?hi[C]:{})},isExpired(){return!P?.isExpired||!V.current||!K()?(console.warn("Turnstile has not been loaded"),!1):P.isExpired(V.current)}}},[V,r.execution,C,fe,D,K,z,i]),A.useEffect(()=>{if(z||!F)return;if(window.turnstile){Y(!0);return}let P=setInterval(()=>{window.turnstile&&(Y(!0),clearInterval(P))},50);return()=>{clearInterval(P)}},[z,F]),A.useEffect(()=>{k(O())},[r.execution,C,ae]),A.useEffect(()=>{!F||typeof y!="function"||y()},[F]),x.jsx(_K,{ref:D,as:b,id:U,style:{...I,...S},...T})});U4.displayName="Turnstile";var c0={exports:{}},l0,yO;function TK(){if(yO)return l0;yO=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return l0=e,l0}var u0,_O;function OK(){if(_O)return u0;_O=1;var e=TK();function t(){}function n(){}return n.resetWarningCache=t,u0=function(){function r(c,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},u0}var bO;function h1(){return bO||(bO=1,c0.exports=OK()()),c0.exports}var CK=h1();const xr=$a(CK);var AK=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function T_(){return T_=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},T_.apply(this,arguments)}function IK(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 vh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,O_(e,t)}function O_(e,t){return O_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},O_(e,t)}var Hm=(function(e){NK(t,e);function t(){var r;return r=e.call(this)||this,r.handleExpired=r.handleExpired.bind(vh(r)),r.handleErrored=r.handleErrored.bind(vh(r)),r.handleChange=r.handleChange.bind(vh(r)),r.handleRecaptchaRef=r.handleRecaptchaRef.bind(vh(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,c){a.executionResolve=i,a.executionReject=c,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=IK(a,AK);return A.createElement("div",T_({},i,{ref:this.handleRecaptchaRef}))},t})(A.Component);Hm.displayName="ReCAPTCHA";Hm.propTypes={sitekey:xr.string.isRequired,onChange:xr.func,grecaptcha:xr.object,theme:xr.oneOf(["dark","light"]),type:xr.oneOf(["image","audio"]),tabindex:xr.number,onExpired:xr.func,onErrored:xr.func,size:xr.oneOf(["compact","normal","invisible"]),stoken:xr.string,hl:xr.string,badge:xr.oneOf(["bottomright","bottomleft","inline"]),isolated:xr.bool};Hm.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var d0={exports:{}},Nt={};var wO;function kK(){if(wO)return Nt;wO=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,c=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,w=e?Symbol.for("react.lazy"):60116,S=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function T(O){if(typeof O=="object"&&O!==null){var I=O.$$typeof;switch(I){case t:switch(O=O.type,O){case d:case f:case r:case i:case a:case p:return O;default:switch(O=O&&O.$$typeof,O){case u:case m:case w:case y:case c:return O;default:return I}}case n:return I}}}function C(O){return T(O)===f}return Nt.AsyncMode=d,Nt.ConcurrentMode=f,Nt.ContextConsumer=u,Nt.ContextProvider=c,Nt.Element=t,Nt.ForwardRef=m,Nt.Fragment=r,Nt.Lazy=w,Nt.Memo=y,Nt.Portal=n,Nt.Profiler=i,Nt.StrictMode=a,Nt.Suspense=p,Nt.isAsyncMode=function(O){return C(O)||T(O)===d},Nt.isConcurrentMode=C,Nt.isContextConsumer=function(O){return T(O)===u},Nt.isContextProvider=function(O){return T(O)===c},Nt.isElement=function(O){return typeof O=="object"&&O!==null&&O.$$typeof===t},Nt.isForwardRef=function(O){return T(O)===m},Nt.isFragment=function(O){return T(O)===r},Nt.isLazy=function(O){return T(O)===w},Nt.isMemo=function(O){return T(O)===y},Nt.isPortal=function(O){return T(O)===n},Nt.isProfiler=function(O){return T(O)===i},Nt.isStrictMode=function(O){return T(O)===a},Nt.isSuspense=function(O){return T(O)===p},Nt.isValidElementType=function(O){return typeof O=="string"||typeof O=="function"||O===r||O===f||O===i||O===a||O===p||O===g||typeof O=="object"&&O!==null&&(O.$$typeof===w||O.$$typeof===y||O.$$typeof===c||O.$$typeof===u||O.$$typeof===m||O.$$typeof===b||O.$$typeof===R||O.$$typeof===E||O.$$typeof===S)},Nt.typeOf=T,Nt}var SO;function MK(){return SO||(SO=1,d0.exports=kK()),d0.exports}var f0,EO;function PK(){if(EO)return f0;EO=1;var e=MK(),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 c(w){return e.isMemo(w)?a:i[w.$$typeof]||t}var u=Object.defineProperty,d=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;function y(w,S,b){if(typeof S!="string"){if(g){var R=p(S);R&&R!==g&&y(w,R,b)}var E=d(S);f&&(E=E.concat(f(S)));for(var T=c(w),C=c(S),O=0;O<E.length;++O){var I=E[O];if(!n[I]&&!(b&&b[I])&&!(C&&C[I])&&!(T&&T[I])){var k=m(S,I);try{u(w,I,k)}catch{}}}}return w}return f0=y,f0}var DK=PK();const LK=$a(DK);function C_(){return C_=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},C_.apply(this,arguments)}function jK(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 $K(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var xo={},UK=0;function zK(e,t){return t=t||{},function(r){var a=r.displayName||r.name||"Component",i=(function(u){$K(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-"+UK++),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=xo[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(),w=t,S=w.globalName,b=w.callbackName,R=w.scriptId;if(S&&typeof window[S]<"u"&&(xo[g]={loaded:!0,observers:{}}),xo[g]){var E=xo[g];if(E&&(E.loaded||E.errored)){this.asyncScriptLoaderHandleLoad(E);return}E.observers[y]=function(k){return p.asyncScriptLoaderHandleLoad(k)};return}var T={};T[y]=function(k){return p.asyncScriptLoaderHandleLoad(k)},xo[g]={loaded:!1,observers:T};var C=document.createElement("script");C.src=g,C.async=!0;for(var O in t.attributes)C.setAttribute(O,t.attributes[O]);R&&(C.id=R);var I=function(D){if(xo[g]){var z=xo[g],Y=z.observers;for(var V in Y)D(Y[V])&&delete Y[V]}};b&&typeof window<"u"&&(window[b]=function(){return p.asyncScriptLoaderTriggerOnScriptLoaded()}),C.onload=function(){var k=xo[g];k&&(k.loaded=!0,I(function(D){return b?!1:(D(k),!0)}))},C.onerror=function(){var k=xo[g];k&&(k.errored=!0,I(function(D){return D(k),!0}))},document.body.appendChild(C)},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 w=xo[p];w&&(delete w.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete xo[p])},f.render=function(){var p=t.globalName,g=this.props;g.asyncScriptOnLoad;var y=g.forwardedRef,w=jK(g,["asyncScriptOnLoad","forwardedRef"]);return p&&typeof window<"u"&&(w[p]=typeof window[p]<"u"?window[p]:void 0),w.ref=y,A.createElement(r,w)},d})(A.Component),c=A.forwardRef(function(u,d){return A.createElement(i,C_({},u,{forwardedRef:d}))});return c.displayName="AsyncScriptLoader("+a+")",c.propTypes={asyncScriptOnLoad:xr.func},LK(c,r)}}var A_="onloadcallback",VK="grecaptcha";function I_(){return typeof window<"u"&&window.recaptchaOptions||{}}function FK(){var e=I_(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+A_+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+A_+"&render=explicit"}const qK=zK(FK,{callbackName:A_,globalName:VK,attributes:I_().nonce?{nonce:I_().nonce}:{}})(Hm);var BK=Object.defineProperty,HK=Object.defineProperties,GK=Object.getOwnPropertyDescriptors,Xp=Object.getOwnPropertySymbols,z4=Object.prototype.hasOwnProperty,V4=Object.prototype.propertyIsEnumerable,RO=(e,t,n)=>t in e?BK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ZK=(e,t)=>{for(var n in t||(t={}))z4.call(t,n)&&RO(e,n,t[n]);if(Xp)for(var n of Xp(t))V4.call(t,n)&&RO(e,n,t[n]);return e},KK=(e,t)=>HK(e,GK(t)),WK=(e,t)=>{var n={};for(var r in e)z4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Xp)for(var r of Xp(e))t.indexOf(r)<0&&V4.call(e,r)&&(n[r]=e[r]);return n};function YK(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function QK(e){let t=A.useRef();return A.useEffect(()=>{t.current=e}),t.current}var XK=18,F4=40,JK=`${F4}px`,eW=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function tW({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[a,i]=A.useState(!1),[c,u]=A.useState(!1),[d,f]=A.useState(!1),m=A.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&a&&c,[a,c,n]),p=A.useCallback(()=>{let g=e.current,y=t.current;if(!g||!y||d||n==="none")return;let w=g,S=w.getBoundingClientRect().left+w.offsetWidth,b=w.getBoundingClientRect().top+w.offsetHeight/2,R=S-XK,E=b;document.querySelectorAll(eW).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>=F4)}y();let w=setInterval(y,1e3);return()=>{clearInterval(w)}},[e,n]),A.useEffect(()=>{let g=r||document.activeElement===t.current;if(n==="none"||!g)return;let y=setTimeout(p,0),w=setTimeout(p,2e3),S=setTimeout(p,5e3),b=setTimeout(()=>{f(!0)},6e3);return()=>{clearTimeout(y),clearTimeout(w),clearTimeout(S),clearTimeout(b)}},[t,r,n,p]),{hasPWMBadge:a,willPushPWMBadge:m,PWM_BADGE_SPACE_WIDTH:JK}}var q4=A.createContext({}),B4=A.forwardRef((e,t)=>{var n=e,{value:r,onChange:a,maxLength:i,textAlign:c="left",pattern:u,placeholder:d,inputMode:f="numeric",onComplete:m,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:g,containerClassName:y,noScriptCSSFallback:w=nW,render:S,children:b}=n,R=WK(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),E,T,C,O,I;let[k,D]=A.useState(typeof R.defaultValue=="string"?R.defaultValue:""),z=r??k,Y=QK(z),V=A.useCallback(pe=>{a?.(pe),D(pe)},[a]),Z=A.useMemo(()=>u?typeof u=="string"?new RegExp(u):u:null,[u]),U=A.useRef(null),J=A.useRef(null),ie=A.useRef({value:z,onChange:V,isIOS:typeof window<"u"&&((T=(E=window?.CSS)==null?void 0:E.supports)==null?void 0:T.call(E,"-webkit-touch-callout","none"))}),F=A.useRef({prev:[(C=U.current)==null?void 0:C.selectionStart,(O=U.current)==null?void 0:O.selectionEnd,(I=U.current)==null?void 0:I.selectionDirection]});A.useImperativeHandle(t,()=>U.current,[]),A.useEffect(()=>{let pe=U.current,ce=J.current;if(!pe||!ce)return;ie.current.value!==pe.value&&ie.current.onChange(pe.value),F.current.prev=[pe.selectionStart,pe.selectionEnd,pe.selectionDirection];function Oe(){if(document.activeElement!==pe){B(null),L(null);return}let He=pe.selectionStart,Xe=pe.selectionEnd,G=pe.selectionDirection,te=pe.maxLength,oe=pe.value,Se=F.current.prev,Te=-1,Re=-1,ke;if(oe.length!==0&&He!==null&&Xe!==null){let hr=He===Xe,Rn=He===oe.length&&oe.length<te;if(hr&&!Rn){let $n=He;if($n===0)Te=0,Re=1,ke="forward";else if($n===te)Te=$n-1,Re=$n,ke="backward";else if(te>1&&oe.length>1){let en=0;if(Se[0]!==null&&Se[1]!==null){ke=$n<Se[1]?"backward":"forward";let Un=Se[0]===Se[1]&&Se[0]<te;ke==="backward"&&!Un&&(en=-1)}Te=en+$n,Re=en+$n+1}}Te!==-1&&Re!==-1&&Te!==Re&&U.current.setSelectionRange(Te,Re,ke)}let rt=Te!==-1?Te:He,st=Re!==-1?Re:Xe,kt=ke??G;B(rt),L(st),F.current.prev=[rt,st,kt]}if(document.addEventListener("selectionchange",Oe,{capture:!0}),Oe(),document.activeElement===pe&&K(!0),!document.getElementById("input-otp-style")){let He=document.createElement("style");if(He.id="input-otp-style",document.head.appendChild(He),He.sheet){let Xe="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;";Su(He.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Su(He.sheet,`[data-input-otp]:autofill { ${Xe} }`),Su(He.sheet,`[data-input-otp]:-webkit-autofill { ${Xe} }`),Su(He.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; } }"),Su(He.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let $e=()=>{ce&&ce.style.setProperty("--root-height",`${pe.clientHeight}px`)};$e();let Ye=new ResizeObserver($e);return Ye.observe(pe),()=>{document.removeEventListener("selectionchange",Oe,{capture:!0}),Ye.disconnect()}},[]);let[X,ae]=A.useState(!1),[fe,K]=A.useState(!1),[P,B]=A.useState(null),[q,L]=A.useState(null);A.useEffect(()=>{YK(()=>{var pe,ce,Oe,$e;(pe=U.current)==null||pe.dispatchEvent(new Event("input"));let Ye=(ce=U.current)==null?void 0:ce.selectionStart,He=(Oe=U.current)==null?void 0:Oe.selectionEnd,Xe=($e=U.current)==null?void 0:$e.selectionDirection;Ye!==null&&He!==null&&(B(Ye),L(He),F.current.prev=[Ye,He,Xe])})},[z,fe]),A.useEffect(()=>{Y!==void 0&&z!==Y&&Y.length<i&&z.length===i&&m?.(z)},[i,m,Y,z]);let $=tW({containerRef:J,inputRef:U,pushPasswordManagerStrategy:p,isFocused:fe}),Q=A.useCallback(pe=>{let ce=pe.currentTarget.value.slice(0,i);if(ce.length>0&&Z&&!Z.test(ce)){pe.preventDefault();return}typeof Y=="string"&&ce.length<Y.length&&document.dispatchEvent(new Event("selectionchange")),V(ce)},[i,V,Y,Z]),me=A.useCallback(()=>{var pe;if(U.current){let ce=Math.min(U.current.value.length,i-1),Oe=U.current.value.length;(pe=U.current)==null||pe.setSelectionRange(ce,Oe),B(ce),L(Oe)}K(!0)},[i]),_e=A.useCallback(pe=>{var ce,Oe;let $e=U.current;if(!g&&(!ie.current.isIOS||!pe.clipboardData||!$e))return;let Ye=pe.clipboardData.getData("text/plain"),He=g?g(Ye):Ye;pe.preventDefault();let Xe=(ce=U.current)==null?void 0:ce.selectionStart,G=(Oe=U.current)==null?void 0:Oe.selectionEnd,te=(Xe!==G?z.slice(0,Xe)+He+z.slice(G):z.slice(0,Xe)+He+z.slice(Xe)).slice(0,i);if(te.length>0&&Z&&!Z.test(te))return;$e.value=te,V(te);let oe=Math.min(te.length,i-1),Se=te.length;$e.setSelectionRange(oe,Se),B(oe),L(Se)},[i,V,Z,z]),Ae=A.useMemo(()=>({position:"relative",cursor:R.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[R.disabled]),Ne=A.useMemo(()=>({position:"absolute",inset:0,width:$.willPushPWMBadge?`calc(100% + ${$.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:$.willPushPWMBadge?`inset(0 ${$.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:c,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"}),[$.PWM_BADGE_SPACE_WIDTH,$.willPushPWMBadge,c]),H=A.useMemo(()=>A.createElement("input",KK(ZK({autoComplete:R.autoComplete||"one-time-code"},R),{"data-input-otp":!0,"data-input-otp-placeholder-shown":z.length===0||void 0,"data-input-otp-mss":P,"data-input-otp-mse":q,inputMode:f,pattern:Z?.source,"aria-placeholder":d,style:Ne,maxLength:i,value:z,ref:U,onPaste:pe=>{var ce;_e(pe),(ce=R.onPaste)==null||ce.call(R,pe)},onChange:Q,onMouseOver:pe=>{var ce;ae(!0),(ce=R.onMouseOver)==null||ce.call(R,pe)},onMouseLeave:pe=>{var ce;ae(!1),(ce=R.onMouseLeave)==null||ce.call(R,pe)},onFocus:pe=>{var ce;me(),(ce=R.onFocus)==null||ce.call(R,pe)},onBlur:pe=>{var ce;K(!1),(ce=R.onBlur)==null||ce.call(R,pe)}})),[Q,me,_e,f,Ne,i,q,P,R,Z?.source,z]),ne=A.useMemo(()=>({slots:Array.from({length:i}).map((pe,ce)=>{var Oe;let $e=fe&&P!==null&&q!==null&&(P===q&&ce===P||ce>=P&&ce<q),Ye=z[ce]!==void 0?z[ce]:null,He=z[0]!==void 0?null:(Oe=d?.[ce])!=null?Oe:null;return{char:Ye,placeholderChar:He,isActive:$e,hasFakeCaret:$e&&Ye===null}}),isFocused:fe,isHovering:!R.disabled&&X}),[fe,X,i,q,P,R.disabled,z]),be=A.useMemo(()=>S?S(ne):A.createElement(q4.Provider,{value:ne},b),[b,ne,S]);return A.createElement(A.Fragment,null,w!==null&&A.createElement("noscript",null,A.createElement("style",null,w)),A.createElement("div",{ref:J,"data-input-otp-container":!0,style:Ae,className:y},be,A.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},H)))});B4.displayName="Input";function Su(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var nW=`
|
|
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
|
+
}`,Pc={},h0,xO;function H4(){return xO||(xO=1,h0={L:1,M:0,Q:3,H:2}),h0}var p0,TO;function G4(){return TO||(TO=1,p0={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),p0}var m0,OO;function rW(){if(OO)return m0;OO=1;var e=G4();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)}},m0=t,m0}var g0,CO;function oW(){if(CO)return g0;CO=1;var e=H4();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,c=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++)c.push(new t(f,m));return c},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}},g0=t,g0}var v0,AO;function aW(){if(AO)return v0;AO=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++}},v0=e,v0}var y0,IO;function Z4(){if(IO)return y0;IO=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 y0=e,y0}var _0,NO;function K4(){if(NO)return _0;NO=1;var e=Z4();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)}},_0=t,_0}var b0,kO;function sW(){if(kO)return b0;kO=1;var e=G4(),t=K4(),n=Z4(),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 c=i<<10;a.getBCHDigit(c)-a.getBCHDigit(a.G15)>=0;)c^=a.G15<<a.getBCHDigit(c)-a.getBCHDigit(a.G15);return(i<<10|c)^a.G15_MASK},getBCHTypeNumber:function(i){for(var c=i<<12;a.getBCHDigit(c)-a.getBCHDigit(a.G18)>=0;)c^=a.G18<<a.getBCHDigit(c)-a.getBCHDigit(a.G18);return i<<12|c},getBCHDigit:function(i){for(var c=0;i!=0;)c++,i>>>=1;return c},getPatternPosition:function(i){return a.PATTERN_POSITION_TABLE[i-1]},getMask:function(i,c,u){switch(i){case r.PATTERN000:return(c+u)%2==0;case r.PATTERN001:return c%2==0;case r.PATTERN010:return u%3==0;case r.PATTERN011:return(c+u)%3==0;case r.PATTERN100:return(Math.floor(c/2)+Math.floor(u/3))%2==0;case r.PATTERN101:return c*u%2+c*u%3==0;case r.PATTERN110:return(c*u%2+c*u%3)%2==0;case r.PATTERN111:return(c*u%3+(c+u)%2)%2==0;default:throw new Error("bad maskPattern:"+i)}},getErrorCorrectPolynomial:function(i){for(var c=new t([1],0),u=0;u<i;u++)c=c.multiply(new t([1,n.gexp(u)],0));return c},getLengthInBits:function(i,c){if(1<=c&&c<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(c<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(c<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:"+c)},getLostPoint:function(i){for(var c=i.getModuleCount(),u=0,d=0;d<c;d++)for(var f=0;f<c;f++){for(var m=0,p=i.isDark(d,f),g=-1;g<=1;g++)if(!(d+g<0||c<=d+g))for(var y=-1;y<=1;y++)f+y<0||c<=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<c-1;d++)for(var f=0;f<c-1;f++){var w=0;i.isDark(d,f)&&w++,i.isDark(d+1,f)&&w++,i.isDark(d,f+1)&&w++,i.isDark(d+1,f+1)&&w++,(w==0||w==4)&&(u+=3)}for(var d=0;d<c;d++)for(var f=0;f<c-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<c;f++)for(var d=0;d<c-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<c;f++)for(var d=0;d<c;d++)i.isDark(d,f)&&S++;var b=Math.abs(100*S/c/c-50)/5;return u+=b*10,u}};return b0=a,b0}var w0,MO;function iW(){if(MO)return w0;MO=1;var e=rW(),t=oW(),n=aW(),r=sW(),a=K4();function i(u,d){this.typeNumber=u,this.errorCorrectLevel=d,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=i.prototype;return c.addData=function(u){var d=new e(u);this.dataList.push(d),this.dataCache=null},c.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]},c.getModuleCount=function(){return this.moduleCount},c.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())},c.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)},c.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)},c.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},c.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,w=0;w<this.modules[g].length;w++){var S=w*p,b=this.modules[g][w];b&&(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},c.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)},c.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}},c.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}},c.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},c.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 w=0;w<2;w++)if(this.modules[m][y-w]==null){var S=!1;g<u.length&&(S=(u[g]>>>p&1)==1);var b=r.getMask(d,m,y-w);b&&(S=!S),this.modules[m][y-w]=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 w=0,g=0;g<m.length;g++)w+=m[g].dataCount;if(p.getLengthInBits()>w*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+w*8+")");for(p.getLengthInBits()+4<=w*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=w*8||(p.put(i.PAD0,8),p.getLengthInBits()>=w*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),w=0;w<d.length;w++){var S=d[w].dataCount,b=d[w].totalCount-S;m=Math.max(m,S),p=Math.max(p,b),g[w]=new Array(S);for(var R=0;R<g[w].length;R++)g[w][R]=255&u.buffer[R+f];f+=S;var E=r.getErrorCorrectPolynomial(b),T=new a(g[w],E.getLength()-1),C=T.mod(E);y[w]=new Array(E.getLength()-1);for(var R=0;R<y[w].length;R++){var O=R+C.getLength()-y[w].length;y[w][R]=O>=0?C.get(O):0}}for(var I=0,R=0;R<d.length;R++)I+=d[R].totalCount;for(var k=new Array(I),D=0,R=0;R<m;R++)for(var w=0;w<d.length;w++)R<g[w].length&&(k[D++]=g[w][R]);for(var R=0;R<p;R++)for(var w=0;w<d.length;w++)R<y[w].length&&(k[D++]=y[w][R]);return k},w0=i,w0}var yh={},PO;function cW(){if(PO)return yh;PO=1,Object.defineProperty(yh,"__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=h1(),n=i(t),r=Us(),a=i(r);function i(f){return f&&f.__esModule?f:{default:f}}function c(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,w=f.fgColor,S=f.size,b=f.title,R=f.viewBoxSize,E=f.xmlns,T=E===void 0?"http://www.w3.org/2000/svg":E,C=c(f,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return a.default.createElement("svg",e({},C,{height:S,ref:m,viewBox:"0 0 "+R+" "+R,width:S,xmlns:T}),b?a.default.createElement("title",null,b):null,a.default.createElement("path",{d:g,fill:p}),a.default.createElement("path",{d:y,fill:w}))});return d.displayName="QRCodeSvg",d.propTypes=u,yh.default=d,yh}var DO;function lW(){if(DO)return Pc;DO=1,Object.defineProperty(Pc,"__esModule",{value:!0}),Pc.QRCode=void 0;var e=Object.assign||function(S){for(var b=1;b<arguments.length;b++){var R=arguments[b];for(var E in R)Object.prototype.hasOwnProperty.call(R,E)&&(S[E]=R[E])}return S},t=h1(),n=p(t),r=H4(),a=p(r),i=iW(),c=p(i),u=Us(),d=p(u),f=cW(),m=p(f);function p(S){return S&&S.__esModule?S:{default:S}}function g(S,b){var R={};for(var E in S)b.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},w=(0,u.forwardRef)(function(S,b){var R=S.bgColor,E=R===void 0?"#FFFFFF":R,T=S.fgColor,C=T===void 0?"#000000":T,O=S.level,I=O===void 0?"L":O,k=S.size,D=k===void 0?256:k,z=S.value,Y=g(S,["bgColor","fgColor","level","size","value"]),V=new c.default(-1,a.default[I]);V.addData(z),V.make();var Z=V.modules;return d.default.createElement(m.default,e({},Y,{bgColor:E,bgD:Z.map(function(U,J){return U.map(function(ie,F){return ie?"":"M "+F+" "+J+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:C,fgD:Z.map(function(U,J){return U.map(function(ie,F){return ie?"M "+F+" "+J+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:b,size:D,viewBoxSize:Z.length}))});return Pc.QRCode=w,w.displayName="QRCode",w.propTypes=y,Pc.default=w,Pc}var uW=lW();const dW=$a(uW);var fW="Separator",LO="horizontal",hW=["horizontal","vertical"],W4=A.forwardRef((e,t)=>{const{decorative:n,orientation:r=LO,...a}=e,i=pW(r)?r:LO,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return x.jsx(Ed.div,{"data-orientation":i,...u,...a,ref:t})});W4.displayName=fW;function pW(e){return hW.includes(e)}var mW=W4;function gW(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:r},basePath:a,viewPaths:i,replace:c}=A.useContext(ft),{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;c(`${a}/${i[t]}?redirectTo=${encodeURIComponent(y)}`)},[d,p,a,i,c,t,n]),{data:p,user:p?.user,isPending:d,error:f,refetch:m}}function ad({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 p1({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 Y4({className:e,...t}){return x.jsx("div",{"data-slot":"card-title",className:Ce("leading-none font-semibold",e),...t})}function Q4({className:e,...t}){return x.jsx("div",{"data-slot":"card-description",className:Ce("text-muted-foreground text-sm",e),...t})}function m1({className:e,...t}){return x.jsx("div",{"data-slot":"card-content",className:Ce("px-6",e),...t})}function jO({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 Ma({className:e,...t}){return x.jsx("div",{"data-slot":"skeleton",className:Ce("bg-accent animate-pulse rounded-md",e),...t})}var vW=cF("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 Ht({className:e,variant:t,size:n,asChild:r=!1,...a}){const i=r?gN:"button";return x.jsx(i,{"data-slot":"button",className:Ce(vW({variant:t,size:n,className:e})),...a})}async function yW(e,t,n,r){const a=await _W(e),i=document.createElement("canvas");i.width=i.height=n;const c=i.getContext("2d"),u=Math.min(a.width,a.height),d=(a.width-u)/2,f=(a.height-u)/2,m=u,p=u;c?.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 _W(e){return new Promise((t,n)=>{const r=new Image,a=new FileReader;a.onload=i=>{var c;r.src=(c=i.target)==null?void 0:c.result},r.onload=()=>t(r),r.onerror=i=>n(i),a.readAsDataURL(e)})}async function bW(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>t(r.result),r.onerror=n,r.readAsDataURL(e)})}function wW({...e}){return x.jsx(CG,{"data-slot":"dropdown-menu",...e})}function SW({...e}){return x.jsx(AG,{"data-slot":"dropdown-menu-trigger",...e})}function EW({className:e,sideOffset:t=4,...n}){return x.jsx(IG,{children:x.jsx(NG,{"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 $O({className:e,inset:t,variant:n="default",...r}){return x.jsx(kG,{"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 X4({className:e,...t}){return x.jsx(DG,{"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 ia=zV,J4=A.createContext({}),un=({...e})=>x.jsx(J4.Provider,{value:{name:e.name},children:x.jsx($V,{...e})}),g1=()=>{const e=A.useContext(J4),t=A.useContext(eM),{getFieldState:n}=UV(),r=iN({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}},eM=A.createContext({});function dn({className:e,...t}){const n=A.useId();return x.jsx(eM.Provider,{value:{id:n},children:x.jsx("div",{"data-slot":"form-item",className:Ce("grid gap-2",e),...t})})}function fn({className:e,...t}){const{error:n,formItemId:r}=g1();return x.jsx(X4,{"data-slot":"form-label","data-error":!!n,className:Ce("data-[error=true]:text-destructive",e),htmlFor:r,...t})}function Sn({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:a}=g1();return x.jsx(gN,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${a}`:`${r}`,"aria-invalid":!!t,...e})}function Cn({className:e,...t}){const{error:n,formMessageId:r}=g1(),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 Mo({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 tM({className:e,...t}){return x.jsx(BG,{"data-slot":"avatar",className:Ce("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function nM({className:e,...t}){return x.jsx(HG,{"data-slot":"avatar-image",className:Ce("aspect-square size-full",e),...t})}function rM({className:e,...t}){return x.jsx(GG,{"data-slot":"avatar-fallback",className:Ce("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function RW({className:e,classNames:t,isPending:n,size:r,organization:a,localization:i,...c}){const{localization:u,avatar:d}=A.useContext(ft),f=A.useMemo(()=>({...u,...i}),[u,i]),m=a?.name,p=a?.logo;return n?x.jsx(Ma,{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(tM,{className:Ce("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...c,children:[d?.Image?x.jsx(d.Image,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||""}):x.jsx(nM,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||void 0}),x.jsx(rM,{className:Ce("text-foreground",t?.fallback),delayMs:p?600:void 0,children:x.jsx(RV,{className:Ce("size-[50%]",t?.fallbackIcon)})})]})}function oM({className:e,classNames:t,isPending:n,size:r,organization:a,localization:i}){const{localization:c}=A.useContext(ft),u={...c,...i};return x.jsxs("div",{className:Ce("flex items-center gap-2 truncate",e,t?.base),children:[x.jsx(RW,{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(Ma,{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(Ma,{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 xW(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),a=new TextEncoder().encode(n),i=QG(sZ(a)),c=t?.jpg?".jpg":"";let u=`https://gravatar.com/avatar/${i}${c}`;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 TW({className:e,classNames:t,isPending:n,size:r,user:a,localization:i,...c}){const{localization:u,gravatar:d,avatar:f}=A.useContext(ft),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?xW(a.email,d===!0?void 0:d):null,w=d?y:g;return n?x.jsx(Ma,{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(tM,{className:Ce("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...c,children:[f?.Image?x.jsx(f.Image,{alt:p||m?.USER,className:t?.image,src:w||""}):x.jsx(nM,{alt:p||m?.USER,className:t?.image,src:w||void 0}),x.jsx(rM,{className:Ce("text-foreground uppercase",t?.fallback),delayMs:w?600:void 0,children:OW(p)||x.jsx(kV,{className:Ce("size-[50%]",t?.fallbackIcon)})})]})}var OW=e=>e?.slice(0,2);function v1({className:e,...t}){return x.jsx(b4,{"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(S4,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:x.jsx(eN,{className:"size-3.5"})})})}function CW({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 AW=({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"})}),IW=({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"})}),NW=({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"})}),kW=({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"})]}),MW=({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"})}),PW=({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"})]}),DW=({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"})]}),LW=({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"})}),jW=({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"})}),$W=({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"})}),UW=({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"})]}),zW=({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"})]}),VW=({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"})}),FW=({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"})]}),qW=({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"})}),BW=({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"})}),HW=({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"})}),GW=({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"})]}),ZW=({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"})]})})]})]}),KW=({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"})}),WW=({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"})}),YW=({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"})}),QW=({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"})}),XW=[{provider:"apple",name:"Apple",icon:AW},{provider:"discord",name:"Discord",icon:IW},{provider:"dropbox",name:"Dropbox",icon:NW},{provider:"facebook",name:"Facebook",icon:kW},{provider:"github",name:"GitHub",icon:MW},{provider:"gitlab",name:"GitLab",icon:PW},{provider:"google",name:"Google",icon:DW},{provider:"huggingface",name:"Hugging Face",icon:LW},{provider:"kick",name:"Kick",icon:jW},{provider:"linear",name:"Linear",icon:$W},{provider:"linkedin",name:"LinkedIn",icon:UW},{provider:"microsoft",name:"Microsoft",icon:zW},{provider:"notion",name:"Notion",icon:VW},{provider:"reddit",name:"Reddit",icon:FW},{provider:"roblox",name:"Roblox",icon:qW},{provider:"slack",name:"Slack",icon:BW},{provider:"spotify",name:"Spotify",icon:HW},{provider:"tiktok",name:"TikTok",icon:GW},{provider:"twitch",name:"Twitch",icon:ZW},{provider:"vercel",name:"Vercel",icon:KW},{provider:"vk",name:"VK",icon:WW},{provider:"twitter",name:"X",icon:YW},{provider:"zoom",name:"Zoom",icon:QW}];function sd({className:e,enableToggle:t,onChange:n,...r}){const[a,i]=A.useState(!0),[c,u]=A.useState(!1);return x.jsxs("div",{className:"relative",children:[x.jsx(Mo,{className:Ce(t&&"pr-10",e),...r,type:c&&t?"text":"password",onChange:d=>{i(!d.target.value),n?.(d)}}),t&&x.jsxs(x.Fragment,{children:[x.jsx(Ht,{className:"!bg-transparent absolute top-0 right-0",disabled:a,size:"icon",type:"button",variant:"ghost",onClick:()=>u(!c),children:c?x.jsx(OV,{}):x.jsx(TV,{})}),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 ca({redirectTo:e}){const{redirectTo:t}=A.useContext(ft),n=A.useCallback(()=>e||ji("redirectTo")||t,[e,t]),[r,a]=A.useState(!1),{navigate:i,hooks:{useSession:c},onSessionChange:u}=A.useContext(ft),{refetch:d}=c();return{onSuccess:A.useCallback(async()=>{a(!0),await d?.(),u&&await u(),a(!1),i(n())},[d,u,i,n]),isPending:r}}function aM({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=A.useContext(ft),r=t?.(),a=A.useRef(!1),{onSuccess:i}=ca({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(or,{className:"animate-spin"})}var JW=["/sign-up/email","/sign-in/email","/forget-password"],eY=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 Rd({localization:e}){const{captcha:t,localization:n}=A.useContext(ft);e={...n,...e};const r=A.useRef(null),{executeRecaptcha:a}=YI(),i=async d=>{if(!t)throw new Error(e.MISSING_RESPONSE);let f;switch(t.provider){case"google-recaptcha-v3":{const m=eY(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||JW).includes(d))return{"x-captcha-response":await i(d)}},resetCaptcha:()=>{var d,f,m,p,g,y,w,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=(w=r.current)==null?void 0:w.reset)==null||S.call(w);break}}}}}function tY({className:e,localization:t}){const n=za(),{captcha:r,localization:a}=A.useContext(ft),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 nY({ref:e}){const{captcha:t}=A.useContext(ft),{theme:n}=Cb(),{lang:r}=XI();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(qK,{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 rY=["/sign-up/email","/sign-in/email","/forget-password"];function xd({ref:e,localization:t,action:n}){const{captcha:r}=A.useContext(ft);if(!r||n&&!(r.endpoints||rY).includes(n))return null;const{theme:a}=Cb(),i=r.provider==="google-recaptcha-v2-checkbox"||r.provider==="google-recaptcha-v2-invisible",c=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(nY,{ref:e}),c&&x.jsx(tY,{localization:t}),u&&x.jsx(U4,{className:"mx-auto",ref:e,siteKey:r.siteKey,options:{theme:a,size:"flexible"}}),d&&x.jsx("div",{className:"mx-auto",children:x.jsx(vK,{ref:e,sitekey:r.siteKey,theme:a})}),f&&x.jsx("div",{className:"mx-auto",children:x.jsx(A4,{ref:e,sitekey:r.siteKey,theme:a})})]})}function y1({className:e,containerClassName:t,...n}){return x.jsx(B4,{"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 Dc({className:e,...t}){return x.jsx("div",{"data-slot":"input-otp-group",className:Ce("flex items-center",e),...t})}function Pn({index:e,className:t,...n}){const r=A.useContext(q4),{char:a,hasFakeCaret:i,isActive:c}=r?.slots[e]??{};return x.jsxs("div",{"data-slot":"input-otp-slot","data-active":c,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 S0({...e}){return x.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:x.jsx(AV,{})})}function _1({otpSeparators:e=0}){return e===0?x.jsxs(Dc,{children:[x.jsx(Pn,{index:0}),x.jsx(Pn,{index:1}),x.jsx(Pn,{index:2}),x.jsx(Pn,{index:3}),x.jsx(Pn,{index:4}),x.jsx(Pn,{index:5})]}):e===1?x.jsxs(x.Fragment,{children:[x.jsxs(Dc,{children:[x.jsx(Pn,{index:0}),x.jsx(Pn,{index:1}),x.jsx(Pn,{index:2})]}),x.jsx(S0,{}),x.jsxs(Dc,{children:[x.jsx(Pn,{index:3}),x.jsx(Pn,{index:4}),x.jsx(Pn,{index:5})]})]}):x.jsxs(x.Fragment,{children:[x.jsxs(Dc,{children:[x.jsx(Pn,{index:0}),x.jsx(Pn,{index:1})]}),x.jsx(S0,{}),x.jsxs(Dc,{children:[x.jsx(Pn,{index:2}),x.jsx(Pn,{index:3})]}),x.jsx(S0,{}),x.jsxs(Dc,{children:[x.jsx(Pn,{index:4}),x.jsx(Pn,{index:5})]})]})}function UO(e){const[t,n]=A.useState();return t?x.jsx(aY,{...e,email:t}):x.jsx(oY,{...e,setEmail:n})}function oY({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:a,setEmail:i}){const c=za(),{captchaRef:u,getCaptchaHeaders:d}=Rd({localization:r}),{authClient:f,localization:m,toast:p,localizeErrors:g}=A.useContext(ft);r={...m,...r};const y=re({email:M().email({message:`${r.EMAIL} ${r.IS_INVALID}`})}),w=oa({resolver:aa(y),defaultValues:{email:""}});n=n||w.formState.isSubmitting,A.useEffect(()=>{a?.(w.formState.isSubmitting)},[w.formState.isSubmitting,a]);async function S({email:b}){const R={throw:!0,headers:await d("/email-otp/send-verification-otp")};try{await f.emailOtp.sendVerificationOtp({email:b,type:"sign-in",fetchOptions:R}),p({variant:"success",message:r.EMAIL_OTP_VERIFICATION_SENT}),i(b)}catch(E){p({variant:"error",message:hn({error:E,localization:r,localizeErrors:g})})}}return x.jsx(ia,{...w,children:x.jsxs("form",{onSubmit:w.handleSubmit(S),noValidate:c,className:Ce("grid w-full gap-6",e,t?.base),children:[x.jsx(un,{control:w.control,name:"email",render:({field:b})=>x.jsxs(dn,{children:[x.jsx(fn,{className:t?.label,children:r.EMAIL}),x.jsx(Sn,{children:x.jsx(Mo,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...b})}),x.jsx(Cn,{className:t?.error})]})}),x.jsx(xd,{ref:u,localization:r,action:"/email-otp/send-verification-otp"}),x.jsx(Ht,{type:"submit",disabled:n,className:Ce("w-full",t?.button,t?.primaryButton),children:n?x.jsx(or,{className:"animate-spin"}):r.EMAIL_OTP_SEND_ACTION})]})})}function aY({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:a=0,redirectTo:i,setIsSubmitting:c,email:u}){const{authClient:d,localization:f,toast:m,localizeErrors:p}=A.useContext(ft);r={...f,...r};const{onSuccess:g,isPending:y}=ca({redirectTo:i}),w=re({code:M().min(1,{message:`${r.EMAIL_OTP} ${r.IS_REQUIRED}`}).min(6,{message:`${r.EMAIL_OTP} ${r.IS_INVALID}`})}),S=oa({resolver:aa(w),defaultValues:{code:""}});n=n||S.formState.isSubmitting||y,A.useEffect(()=>{c?.(S.formState.isSubmitting||y)},[S.formState.isSubmitting,y,c]);async function b({code:R}){try{await d.signIn.emailOtp({email:u,otp:R,fetchOptions:{throw:!0}}),await g()}catch(E){m({variant:"error",message:hn({error:E,localization:r,localizeErrors:p})}),S.reset()}}return x.jsx(ia,{...S,children:x.jsxs("form",{onSubmit:S.handleSubmit(b),className:Ce("grid w-full gap-6",e,t?.base),children:[x.jsx(un,{control:S.control,name:"code",render:({field:R})=>x.jsxs(dn,{children:[x.jsx(fn,{className:t?.label,children:r.EMAIL_OTP}),x.jsx(Sn,{children:x.jsx(y1,{...R,maxLength:6,onChange:E=>{R.onChange(E),E.length===6&&S.handleSubmit(b)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:x.jsx(_1,{otpSeparators:a})})}),x.jsx(Cn,{className:t?.error})]})}),x.jsx("div",{className:"grid gap-4",children:x.jsxs(Ht,{type:"submit",disabled:n,className:Ce(t?.button,t?.primaryButton),children:[n&&x.jsx(or,{className:"animate-spin"}),r.EMAIL_OTP_VERIFY_ACTION]})})]})})}function sY({onCancel:e,localization:t,className:n,classNames:r,otpSeparators:a,callbackURL:i,isSubmitting:c,redirectTo:u,setIsSubmitting:d}){const[f,m]=A.useState(!0),[p,g]=A.useState(30),{authClient:y,localization:w,toast:S,localizeErrors:b,navigate:R,basePath:E,viewPaths:T}=A.useContext(ft);t={...w,...t};const C=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:O,isPending:I}=ca({redirectTo:u}),k=re({code:M().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),D=oa({resolver:aa(k),defaultValues:{code:""}}),z=c||D.formState.isSubmitting||I;A.useEffect(()=>{d?.(D.formState.isSubmitting||I)},[D.formState.isSubmitting,I,d]),A.useEffect(()=>{if(p>0){const Z=setTimeout(()=>g(p-1),1e3);return()=>clearTimeout(Z)}else m(!1)},[p]);async function Y({code:Z}){try{const U=await y.emailOtp.verifyEmail({email:C,otp:Z,fetchOptions:{throw:!0}});"token"in U&&U.token?await O():(R(`${E}/${T.SIGN_IN}${window.location.search}`),S({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(U){S({variant:"error",message:hn({error:U,localization:t,localizeErrors:b})}),D.reset()}}async function V(){if(!f){m(!0),g(30);try{await y.emailOtp.sendVerificationOtp({email:C,type:"email-verification",fetchOptions:{throw:!0}}),S({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(Z){S({variant:"error",message:hn({error:Z,localization:t,localizeErrors:b})}),m(!1),g(0)}}}return C?x.jsx(ia,{...D,children:x.jsxs("form",{onSubmit:D.handleSubmit(Y),className:Ce("grid w-full gap-6",n,r?.base),children:[x.jsx(un,{control:D.control,name:"code",render:({field:Z})=>x.jsxs(dn,{children:[x.jsx(fn,{className:r?.label,children:t.EMAIL_OTP}),x.jsx(Sn,{children:x.jsx(y1,{...Z,maxLength:6,onChange:U=>{Z.onChange(U),U.length===6&&D.handleSubmit(Y)()},containerClassName:r?.otpInputContainer,className:r?.otpInput,disabled:z,children:x.jsx(_1,{otpSeparators:a})})}),x.jsx(Cn,{className:r?.error})]})}),x.jsxs("div",{className:"grid gap-4",children:[x.jsxs(Ht,{type:"submit",disabled:z,className:Ce(r?.button,r?.primaryButton),children:[z&&x.jsx(or,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),x.jsx(Ht,{type:"button",variant:"outline",onClick:V,disabled:f||z,className:Ce("w-full",r?.button),children:f?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&x.jsx(Ht,{type:"button",variant:"ghost",onClick:e,disabled:z,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 iY({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:a}){const i=za(),{captchaRef:c,getCaptchaHeaders:u,resetCaptcha:d}=Rd({localization:r}),{authClient:f,basePath:m,baseURL:p,localization:g,navigate:y,toast:w,viewPaths:S,localizeErrors:b}=A.useContext(ft);r={...g,...r};const R=re({email:M().email({message:`${r.EMAIL} ${r.IS_INVALID}`}).min(1,{message:`${r.EMAIL} ${r.IS_REQUIRED}`})}),E=oa({resolver:aa(R),defaultValues:{email:""}});n=n||E.formState.isSubmitting,A.useEffect(()=>{a?.(E.formState.isSubmitting)},[E.formState.isSubmitting,a]);async function T({email:C}){try{const O={throw:!0,headers:await u("/forget-password")};await f.requestPasswordReset({email:C,redirectTo:`${p}${m}/${S.RESET_PASSWORD}`,fetchOptions:O}),w({variant:"success",message:r.FORGOT_PASSWORD_EMAIL}),y(`${m}/${S.SIGN_IN}${window.location.search}`)}catch(O){w({variant:"error",message:hn({error:O,localization:r,localizeErrors:b})}),d()}}return x.jsx(ia,{...E,children:x.jsxs("form",{onSubmit:E.handleSubmit(T),noValidate:i,className:Ce("grid w-full gap-6",e,t?.base),children:[x.jsx(un,{control:E.control,name:"email",render:({field:C})=>x.jsxs(dn,{children:[x.jsx(fn,{className:t?.label,children:r.EMAIL}),x.jsx(Sn,{children:x.jsx(Mo,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...C})}),x.jsx(Cn,{className:t?.error})]})}),x.jsx(xd,{ref:c,localization:r,action:"/forget-password"}),x.jsx(Ht,{type:"submit",disabled:n,className:Ce("w-full",t?.button,t?.primaryButton),children:n?x.jsx(or,{className:"animate-spin"}):r.FORGOT_PASSWORD_ACTION})]})})}function zO({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,redirectTo:i,setIsSubmitting:c}){const u=za(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:m}=Rd({localization:a}),{authClient:p,basePath:g,baseURL:y,persistClient:w,localization:S,redirectTo:b,viewPaths:R,toast:E,localizeErrors:T}=A.useContext(ft);a={...S,...a};const C=A.useCallback(()=>i||ji("redirectTo")||b,[i,b]),O=A.useCallback(()=>`${y}${n||(w?`${g}/${R.CALLBACK}?redirectTo=${encodeURIComponent(C())}`:C())}`,[n,w,g,R,y,C]),I=re({email:M().email({message:`${a.EMAIL} ${a.IS_INVALID}`})}),k=oa({resolver:aa(I),defaultValues:{email:""}});r=r||k.formState.isSubmitting,A.useEffect(()=>{c?.(k.formState.isSubmitting)},[k.formState.isSubmitting,c]);async function D({email:z}){try{const Y={throw:!0,headers:await f("/sign-in/magic-link")};await p.signIn.magicLink({email:z,callbackURL:O(),fetchOptions:Y}),E({variant:"success",message:a.MAGIC_LINK_EMAIL}),k.reset()}catch(Y){E({variant:"error",message:hn({error:Y,localization:a,localizeErrors:T})}),m()}}return x.jsx(ia,{...k,children:x.jsxs("form",{onSubmit:k.handleSubmit(D),noValidate:u,className:Ce("grid w-full gap-6",e,t?.base),children:[x.jsx(un,{control:k.control,name:"email",render:({field:z})=>x.jsxs(dn,{children:[x.jsx(fn,{className:t?.label,children:a.EMAIL}),x.jsx(Sn,{children:x.jsx(Mo,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:r,...z})}),x.jsx(Cn,{className:t?.error})]})}),x.jsx(xd,{ref:d,localization:a,action:"/sign-in/magic-link"}),x.jsx(Ht,{type:"submit",disabled:r,className:Ce("w-full",t?.button,t?.primaryButton),children:r?x.jsx(or,{className:"animate-spin"}):a.MAGIC_LINK_ACTION})]})})}function cY({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:a,setIsSubmitting:i}){const{authClient:c,localization:u,toast:d,localizeErrors:f}=A.useContext(ft);r={...u,...r};const{onSuccess:m,isPending:p}=ca({redirectTo:a}),g=re({code:M().min(1,{message:r.BACKUP_CODE_REQUIRED})}),y=oa({resolver:aa(g),defaultValues:{code:""}});n=n||y.formState.isSubmitting||p,A.useEffect(()=>{i?.(y.formState.isSubmitting||p)},[y.formState.isSubmitting,p,i]);async function w({code:S}){try{await c.twoFactor.verifyBackupCode({code:S,fetchOptions:{throw:!0}}),await m()}catch(b){d({variant:"error",message:hn({error:b,localization:r,localizeErrors:f})}),y.reset()}}return x.jsx(ia,{...y,children:x.jsxs("form",{onSubmit:y.handleSubmit(w),className:Ce("grid gap-6",e,t?.base),children:[x.jsx(un,{control:y.control,name:"code",render:({field:S})=>x.jsxs(dn,{children:[x.jsx(fn,{className:t?.label,children:r.BACKUP_CODE}),x.jsx(Sn,{children:x.jsx(Mo,{placeholder:r.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...S})}),x.jsx(Cn,{className:t?.error})]})}),x.jsx(Ht,{type:"submit",disabled:n,className:Ce(t?.button,t?.primaryButton),children:n?x.jsx(or,{className:"animate-spin"}):r.RECOVER_ACCOUNT_ACTION})]})})}function lY({className:e,classNames:t,localization:n,passwordValidation:r}){const a=A.useRef(!1),{authClient:i,basePath:c,credentials:u,localization:d,viewPaths:f,navigate:m,toast:p,localizeErrors:g}=A.useContext(ft),y=u?.confirmPassword,w=u?.passwordValidation;n={...d,...n},r={...w,...r};const S=re({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}):M().optional()}).refine(T=>!y||T.newPassword===T.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),b=oa({resolver:aa(S),defaultValues:{newPassword:"",confirmPassword:""}}),R=b.formState.isSubmitting;A.useEffect(()=>{if(a.current)return;a.current=!0;const C=new URLSearchParams(window.location.search).get("token");(!C||C==="INVALID_TOKEN")&&(m(`${c}/${f.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[c,m,p,f,n]);async function E({newPassword:T}){try{const O=new URLSearchParams(window.location.search).get("token");await i.resetPassword({newPassword:T,token:O,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),m(`${c}/${f.SIGN_IN}${window.location.search}`)}catch(C){p({variant:"error",message:hn({error:C,localization:n,localizeErrors:g})}),b.reset()}}return x.jsx(ia,{...b,children:x.jsxs("form",{onSubmit:b.handleSubmit(E),className:Ce("grid w-full gap-6",e,t?.base),children:[x.jsx(un,{control:b.control,name:"newPassword",render:({field:T})=>x.jsxs(dn,{children:[x.jsx(fn,{className:t?.label,children:n.NEW_PASSWORD}),x.jsx(Sn,{children:x.jsx(sd,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:R,...T})}),x.jsx(Cn,{className:t?.error})]})}),y&&x.jsx(un,{control:b.control,name:"confirmPassword",render:({field:T})=>x.jsxs(dn,{children:[x.jsx(fn,{className:t?.label,children:n.CONFIRM_PASSWORD}),x.jsx(Sn,{children:x.jsx(sd,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:R,...T})}),x.jsx(Cn,{className:t?.error})]})}),x.jsx(Ht,{type:"submit",disabled:R,className:Ce("w-full",t?.button,t?.primaryButton),children:R?x.jsx(or,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function uY({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:a,setIsSubmitting:i,passwordValidation:c}){const u=za(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:m}=Rd({localization:r}),{authClient:p,basePath:g,credentials:y,localization:w,viewPaths:S,navigate:b,toast:R,Link:E,localizeErrors:T,emailVerification:C}=A.useContext(ft),O=y?.rememberMe,I=y?.username,k=y?.passwordValidation;r={...w,...r},c={...k,...c};const{onSuccess:D,isPending:z}=ca({redirectTo:a}),Y=re({email:I?M().min(1,{message:`${r.USERNAME} ${r.IS_REQUIRED}`}):M().email({message:`${r.EMAIL} ${r.IS_INVALID}`}),password:Ju(c,r),rememberMe:We().optional()}),V=oa({resolver:aa(Y),defaultValues:{email:"",password:"",rememberMe:!O}});n=n||V.formState.isSubmitting||z,A.useEffect(()=>{i?.(V.formState.isSubmitting||z)},[V.formState.isSubmitting,z,i]);async function Z({email:U,password:J,rememberMe:ie}){var F;try{let X={};if(I&&!nz(U)){const ae={throw:!0,headers:await f("/sign-in/username")};X=await p.signIn.username({username:U,password:J,rememberMe:ie,fetchOptions:ae})}else{const ae={throw:!0,headers:await f("/sign-in/email")};X=await p.signIn.email({email:U,password:J,rememberMe:ie,fetchOptions:ae})}X.twoFactorRedirect?b(`${g}/${S.TWO_FACTOR}${window.location.search}`):await D()}catch(X){V.resetField("password"),m(),R({variant:"error",message:hn({error:X,localization:r,localizeErrors:T})}),C?.otp&&((F=X?.error)==null?void 0:F.code)==="EMAIL_NOT_VERIFIED"&&b(`${g}/${S.EMAIL_VERIFICATION}?email=${encodeURIComponent(U)}`)}}return x.jsx(ia,{...V,children:x.jsxs("form",{onSubmit:V.handleSubmit(Z),noValidate:u,className:Ce("grid w-full gap-6",e,t?.base),children:[x.jsx(un,{control:V.control,name:"email",render:({field:U})=>x.jsxs(dn,{children:[x.jsx(fn,{className:t?.label,children:I?r.USERNAME:r.EMAIL}),x.jsx(Sn,{children:x.jsx(Mo,{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(Cn,{className:t?.error})]})}),x.jsx(un,{control:V.control,name:"password",render:({field:U})=>x.jsxs(dn,{children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx(fn,{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(Sn,{children:x.jsx(sd,{autoComplete:"current-password",className:t?.input,placeholder:r.PASSWORD_PLACEHOLDER,disabled:n,...U})}),x.jsx(Cn,{className:t?.error})]})}),O&&x.jsx(un,{control:V.control,name:"rememberMe",render:({field:U})=>x.jsxs(dn,{className:"flex",children:[x.jsx(Sn,{children:x.jsx(v1,{checked:U.value,onCheckedChange:U.onChange,disabled:n})}),x.jsx(fn,{children:r.REMEMBER_ME})]})}),x.jsx(xd,{ref:d,localization:r,action:"/sign-in/email"}),x.jsx(Ht,{type:"submit",disabled:n,className:Ce("w-full",t?.button,t?.primaryButton),children:n?x.jsx(or,{className:"animate-spin"}):r.SIGN_IN_ACTION})]})})}function dY({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,redirectTo:i,setIsSubmitting:c,passwordValidation:u}){const d=za(),{captchaRef:f,getCaptchaHeaders:m,resetCaptcha:p}=Rd({localization:a}),{additionalFields:g,authClient:y,basePath:w,baseURL:S,credentials:b,localization:R,nameRequired:E,persistClient:T,redirectTo:C,signUp:O,viewPaths:I,navigate:k,toast:D,avatar:z,localizeErrors:Y,emailVerification:V}=A.useContext(ft),Z=b?.confirmPassword,U=b?.username,J=b?.usernameRequired??!0,ie=b?.passwordValidation,F=O?.fields;a={...R,...a},u={...ie,...u};const X=A.useRef(null),[ae,fe]=A.useState(null),[K,P]=A.useState(!1),B=A.useCallback(()=>i||ji("redirectTo")||C,[i,C]),q=A.useCallback(()=>`${S}${n||(T?`${w}/${I.CALLBACK}?redirectTo=${encodeURIComponent(B())}`:B())}`,[n,T,w,I,S,B]),{onSuccess:L,isPending:$}=ca({redirectTo:i}),Q={email:M().email({message:`${a.EMAIL} ${a.IS_INVALID}`}),password:Ju(u,a),name:F?.includes("name")&&E?M().min(1,{message:`${a.NAME} ${a.IS_REQUIRED}`}):M().optional(),image:M().optional(),username:U&&J?M().min(1,{message:`${a.USERNAME} ${a.IS_REQUIRED}`}):M().optional(),confirmPassword:Z?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}):M().optional()},me={};if(F)for(const ce of F){if(ce==="name"||ce==="image")continue;const Oe=g?.[ce];if(!Oe)continue;let $e;Oe.type==="number"?$e=Oe.required?Ob(Ye=>Ye?Number(Ye):void 0,Pe({message:`${Oe.label} ${a.IS_INVALID}`})):KI({message:`${Oe.label} ${a.IS_INVALID}`}).optional():Oe.type==="boolean"?$e=Oe.required?lT({message:`${Oe.label} ${a.IS_INVALID}`}).refine(Ye=>Ye===!0,{message:`${Oe.label} ${a.IS_REQUIRED}`}):lT({message:`${Oe.label} ${a.IS_INVALID}`}).optional():$e=Oe.required?M().min(1,`${Oe.label} ${a.IS_REQUIRED}`):M().optional(),me[ce]=$e}const _e=re(Q).extend(me).refine(ce=>Z?ce.password===ce.confirmPassword:!0,{message:a.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Ae={email:"",password:"",...Z&&{confirmPassword:""},...F?.includes("name")?{name:""}:{},...U?{username:""}:{},...F?.includes("image")&&z?{image:""}:{}};if(F)for(const ce of F){if(ce==="name"||ce==="image")continue;const Oe=g?.[ce];Oe&&(Ae[ce]=Oe.type==="boolean"?!1:"")}const Ne=oa({resolver:aa(_e),defaultValues:Ae});r=r||Ne.formState.isSubmitting||$,A.useEffect(()=>{c?.(Ne.formState.isSubmitting||$)},[Ne.formState.isSubmitting,$,c]);const H=async ce=>{if(z){P(!0);try{const Oe=await yW(ce,crypto.randomUUID(),z.size,z.extension);let $e;z.upload?$e=await z.upload(Oe):$e=await bW(Oe),$e?(fe($e),Ne.setValue("image",$e)):(fe(null),Ne.setValue("image",""))}catch(Oe){console.error(Oe),D({variant:"error",message:hn({error:Oe,localization:a,localizeErrors:Y})})}P(!1)}},ne=()=>{fe(null),Ne.setValue("image","")},be=()=>{var ce;return(ce=X.current)==null?void 0:ce.click()};async function pe({email:ce,password:Oe,name:$e,username:Ye,confirmPassword:He,image:Xe,...G}){try{for(const[Te,Re]of Object.entries(G)){const ke=g?.[Te];if(ke?.validate&&typeof Re=="string"&&!await ke.validate(Re)){Ne.setError(Te,{message:`${ke.label} ${a.IS_INVALID}`});return}}const te={throw:!0,headers:await m("/sign-up/email")},oe={};Ye!==void 0&&(!J&&(Ye===null||Ye===""||typeof Ye=="string"&&Ye.trim()==="")||(oe.username=Ye)),Xe!==void 0&&(oe.image=Xe);const Se=await y.signUp.email({email:ce,password:Oe,name:$e||"",...oe,...G,callbackURL:q(),fetchOptions:te});"token"in Se&&Se.token?await L():V?.otp?k(`${w}/${I.EMAIL_VERIFICATION}?email=${encodeURIComponent(ce)}`):(k(`${w}/${I.SIGN_IN}${window.location.search}`),D({variant:"success",message:a.SIGN_UP_EMAIL}))}catch(te){D({variant:"error",message:hn({error:te,localization:a,localizeErrors:Y})}),Ne.resetField("password"),Ne.resetField("confirmPassword"),p()}}return x.jsx(ia,{...Ne,children:x.jsxs("form",{onSubmit:Ne.handleSubmit(pe),noValidate:d,className:Ce("grid w-full gap-6",e,t?.base),children:[F?.includes("image")&&z&&x.jsxs(x.Fragment,{children:[x.jsx("input",{ref:X,accept:"image/*",disabled:K,hidden:!0,type:"file",onChange:ce=>{var Oe;const $e=(Oe=ce.target.files)==null?void 0:Oe.item(0);$e&&H($e),ce.target.value=""}}),x.jsx(un,{control:Ne.control,name:"image",render:()=>x.jsxs(dn,{children:[x.jsx(fn,{children:a.AVATAR}),x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsxs(wW,{children:[x.jsx(SW,{asChild:!0,children:x.jsx(Ht,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:x.jsx(TW,{isPending:K,className:"size-16",user:ae?{name:Ne.watch("name"),email:Ne.watch("email"),image:ae}:null,localization:a})})}),x.jsxs(EW,{align:"start",onCloseAutoFocus:ce=>ce.preventDefault(),children:[x.jsxs($O,{onClick:be,disabled:K,children:[x.jsx(xV,{}),a.UPLOAD_AVATAR]}),ae&&x.jsxs($O,{onClick:ne,disabled:K,variant:"destructive",children:[x.jsx(NV,{}),a.DELETE_AVATAR]})]})]}),x.jsxs(Ht,{type:"button",variant:"outline",onClick:be,disabled:K,children:[K&&x.jsx(or,{className:"animate-spin"}),a.UPLOAD]})]}),x.jsx(Cn,{})]})})]}),F?.includes("name")&&x.jsx(un,{control:Ne.control,name:"name",render:({field:ce})=>x.jsxs(dn,{children:[x.jsxs(fn,{className:t?.label,children:[a.NAME,!E&&x.jsx("span",{className:"ml-1 text-muted-foreground",children:a.OPTIONAL_BRACKETS})]}),x.jsx(Sn,{children:x.jsx(Mo,{autoComplete:"name",className:t?.input,placeholder:a.NAME_PLACEHOLDER,disabled:r,...ce,value:ce.value})}),x.jsx(Cn,{className:t?.error})]})}),U&&x.jsx(un,{control:Ne.control,name:"username",render:({field:ce})=>x.jsxs(dn,{children:[x.jsxs(fn,{className:t?.label,children:[a.USERNAME,!J&&x.jsx("span",{className:"ml-1 text-muted-foreground",children:a.OPTIONAL_BRACKETS})]}),x.jsx(Sn,{children:x.jsx(Mo,{autoComplete:"username",className:t?.input,placeholder:a.USERNAME_PLACEHOLDER,disabled:r,...ce,value:ce.value})}),x.jsx(Cn,{className:t?.error})]})}),x.jsx(un,{control:Ne.control,name:"email",render:({field:ce})=>x.jsxs(dn,{children:[x.jsx(fn,{className:t?.label,children:a.EMAIL}),x.jsx(Sn,{children:x.jsx(Mo,{autoComplete:"email",className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:r,...ce,value:ce.value})}),x.jsx(Cn,{className:t?.error})]})}),x.jsx(un,{control:Ne.control,name:"password",render:({field:ce})=>x.jsxs(dn,{children:[x.jsx(fn,{className:t?.label,children:a.PASSWORD}),x.jsx(Sn,{children:x.jsx(sd,{autoComplete:"new-password",className:t?.input,placeholder:a.PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...ce,value:ce.value})}),x.jsx(Cn,{className:t?.error})]})}),Z&&x.jsx(un,{control:Ne.control,name:"confirmPassword",render:({field:ce})=>x.jsxs(dn,{children:[x.jsx(fn,{className:t?.label,children:a.CONFIRM_PASSWORD}),x.jsx(Sn,{children:x.jsx(sd,{autoComplete:"new-password",className:t?.input,placeholder:a.CONFIRM_PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...ce,value:ce.value})}),x.jsx(Cn,{className:t?.error})]})}),F?.filter(ce=>ce!=="name"&&ce!=="image").map(ce=>{const Oe=g?.[ce];return Oe?Oe.type==="boolean"?x.jsx(un,{control:Ne.control,name:ce,render:({field:$e})=>x.jsxs(dn,{className:"flex",children:[x.jsx(Sn,{children:x.jsx(v1,{checked:$e.value,onCheckedChange:$e.onChange,disabled:r})}),x.jsx(fn,{className:t?.label,children:Oe.label}),x.jsx(Cn,{className:t?.error})]})},ce):x.jsx(un,{control:Ne.control,name:ce,render:({field:$e})=>x.jsxs(dn,{children:[x.jsx(fn,{className:t?.label,children:Oe.label}),x.jsx(Sn,{children:Oe.type==="number"?x.jsx(Mo,{className:t?.input,type:"number",placeholder:Oe.placeholder||(typeof Oe.label=="string"?Oe.label:""),disabled:r,...$e,value:$e.value}):Oe.multiline?x.jsx(CW,{className:t?.input,placeholder:Oe.placeholder||(typeof Oe.label=="string"?Oe.label:""),disabled:r,...$e,value:$e.value}):x.jsx(Mo,{className:t?.input,type:"text",placeholder:Oe.placeholder||(typeof Oe.label=="string"?Oe.label:""),disabled:r,...$e,value:$e.value})}),x.jsx(Cn,{className:t?.error})]})},ce):(console.error(`Additional field ${ce} not found`),null)}),x.jsx(xd,{ref:f,localization:a,action:"/sign-up/email"}),x.jsx(Ht,{type:"submit",disabled:r,className:Ce("w-full",t?.button,t?.primaryButton),children:r?x.jsx(or,{className:"animate-spin"}):a.SIGN_UP_ACTION})]})})}function fY({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:a=0,redirectTo:i,setIsSubmitting:c}){var u;const d=za(),f=d?ji("totpURI"):null,m=A.useRef(!1),{authClient:p,basePath:g,hooks:{useSession:y},localization:w,twoFactor:S,viewPaths:b,toast:R,Link:E,localizeErrors:T}=A.useContext(ft);r={...w,...r};const{onSuccess:C,isPending:O}=ca({redirectTo:i}),{data:I}=y(),k=(u=I?.user)==null?void 0:u.twoFactorEnabled,[D,z]=A.useState(S?.length===1?S[0]:null),[Y,V]=A.useState(!1),[Z,U]=A.useState(0),J=re({code:M().min(1,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_REQUIRED}`}).min(6,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_INVALID}`}),trustDevice:We().optional()}),ie=oa({resolver:aa(J),defaultValues:{code:""}});n=n||ie.formState.isSubmitting||O,A.useEffect(()=>{c?.(ie.formState.isSubmitting||O)},[ie.formState.isSubmitting,O,c]),A.useEffect(()=>{D==="otp"&&Z<=0&&!m.current&&(m.current=!0,F())},[D]),A.useEffect(()=>{if(Z<=0)return;const ae=setTimeout(()=>{U(fe=>fe-1)},1e3);return()=>clearTimeout(ae)},[Z]);const F=async()=>{if(!(Y||Z>0)){try{V(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),U(60)}catch(ae){R({variant:"error",message:hn({error:ae,localization:r,localizeErrors:T})}),ae.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}m.current=!1,V(!1)}};async function X({code:ae,trustDevice:fe}){try{await(D==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:ae,trustDevice:fe,fetchOptions:{throw:!0}}),await C(),I&&!k&&R({variant:"success",message:r?.TWO_FACTOR_ENABLED})}catch(K){R({variant:"error",message:hn({error:K,localization:r,localizeErrors:T})}),ie.reset()}}return x.jsx(ia,{...ie,children:x.jsxs("form",{onSubmit:ie.handleSubmit(X),className:Ce("grid w-full gap-6",e,t?.base),children:[S?.includes("totp")&&f&&D==="totp"&&x.jsxs("div",{className:"space-y-3",children:[x.jsx(X4,{className:t?.label,children:r.TWO_FACTOR_TOTP_LABEL}),x.jsx(dW,{className:Ce("border shadow-xs",t?.qrCode),value:f})]}),D!==null&&x.jsxs(x.Fragment,{children:[x.jsx(un,{control:ie.control,name:"code",render:({field:ae})=>x.jsxs(dn,{children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx(fn,{className:t?.label,children:r.ONE_TIME_PASSWORD}),x.jsx(E,{className:Ce("text-sm hover:underline",t?.forgotPasswordLink),href:`${g}/${b.RECOVER_ACCOUNT}${d?window.location.search:""}`,children:r.FORGOT_AUTHENTICATOR})]}),x.jsx(Sn,{children:x.jsx(y1,{...ae,maxLength:6,onChange:fe=>{ae.onChange(fe),fe.length===6&&ie.handleSubmit(X)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:x.jsx(_1,{otpSeparators:a})})}),x.jsx(Cn,{className:t?.error})]})}),x.jsx(un,{control:ie.control,name:"trustDevice",render:({field:ae})=>x.jsxs(dn,{className:"flex",children:[x.jsx(Sn,{children:x.jsx(v1,{checked:ae.value,onCheckedChange:ae.onChange,disabled:n,className:t?.checkbox})}),x.jsx(fn,{className:t?.label,children:r.TRUST_DEVICE})]})})]}),x.jsxs("div",{className:"grid gap-4",children:[D!==null&&x.jsxs(Ht,{type:"submit",disabled:n,className:Ce(t?.button,t?.primaryButton),children:[n&&x.jsx(or,{className:"animate-spin"}),r.TWO_FACTOR_ACTION]}),D==="otp"&&S?.includes("otp")&&x.jsxs(Ht,{type:"button",variant:"outline",onClick:F,disabled:Z>0||Y||n,className:Ce(t?.button,t?.outlineButton),children:[Y?x.jsx(or,{className:"animate-spin"}):x.jsx(vT,{className:t?.icon}),r.RESEND_CODE,Z>0&&` (${Z})`]}),D!=="otp"&&S?.includes("otp")&&x.jsxs(Ht,{type:"button",variant:"secondary",className:Ce(t?.button,t?.secondaryButton),onClick:()=>z("otp"),disabled:n,children:[x.jsx(vT,{className:t?.icon}),r.SEND_VERIFICATION_CODE]}),D!=="totp"&&S?.includes("totp")&&x.jsxs(Ht,{type:"button",variant:"secondary",className:Ce(t?.button,t?.secondaryButton),onClick:()=>z("totp"),disabled:n,children:[x.jsx(IV,{className:t?.icon}),r.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function sM({redirectTo:e}){const t=A.useRef(!1),{authClient:n,basePath:r,viewPaths:a}=A.useContext(ft),{onSuccess:i}=ca({redirectTo:e||`${r}/${a.SIGN_IN}`});return A.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(i))},[n,i]),x.jsx(or,{className:"animate-spin"})}function hY({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,pathname:i,redirectTo:c,view:u,otpSeparators:d=0,setIsSubmitting:f}){const{basePath:m,credentials:p,localization:g,magicLink:y,emailOTP:w,signUp:S,twoFactor:b,viewPaths:R,replace:E}=A.useContext(ft),T=!!S;if(a={...g,...a},A.useEffect(()=>{i&&!a_(R,i)&&(console.error(`Invalid auth view: ${i}`),E(`${m}/${R.SIGN_IN}${window.location.search}`))},[i,R,m,E]),u=u||a_(R,i)||"SIGN_IN",A.useEffect(()=>{let C=!1;u==="MAGIC_LINK"&&(!y||!p&&!w)&&(C=!0),u==="EMAIL_OTP"&&(!w||!p&&!y)&&(C=!0),u==="SIGN_UP"&&!T&&(C=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(u)&&(C=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(u)&&!b&&(C=!0),C&&E(`${m}/${R.SIGN_IN}${window.location.search}`)},[m,u,R,p,E,w,T,y,b]),u==="SIGN_OUT")return x.jsx(sM,{redirectTo:c});if(u==="CALLBACK")return x.jsx(aM,{redirectTo:c});if(u==="SIGN_IN")return p?x.jsx(uY,{className:e,classNames:t,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f}):y?x.jsx(zO,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f}):w?x.jsx(UO,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f}):null;if(u==="TWO_FACTOR")return x.jsx(fY,{className:e,classNames:t,localization:a,otpSeparators:d,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="RECOVER_ACCOUNT")return x.jsx(cY,{className:e,classNames:t,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="MAGIC_LINK")return x.jsx(zO,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="EMAIL_OTP")return x.jsx(UO,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="EMAIL_VERIFICATION")return x.jsx(sY,{className:e,classNames:t,callbackURL:n,localization:a,otpSeparators:d,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="FORGOT_PASSWORD")return x.jsx(iY,{className:e,classNames:t,localization:a,isSubmitting:r,setIsSubmitting:f});if(u==="RESET_PASSWORD")return x.jsx(lY,{className:e,classNames:t,localization:a});if(u==="SIGN_UP")return T&&x.jsx(dY,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f})}function pY({className:e,classNames:t,localization:n}){const{localization:r,redirectTo:a,replace:i,toast:c}=A.useContext(ft),u=A.useMemo(()=>({...r,...n}),[r,n]),{data:d}=gW(),[f,m]=A.useState(null);return A.useEffect(()=>{const p=ji("invitationId");if(!p){c({variant:"error",message:u.INVITATION_NOT_FOUND}),i(a);return}m(p)},[u.INVITATION_NOT_FOUND,c,i,a]),!d||!f?x.jsx(iM,{className:e,classNames:t}):x.jsx(mY,{className:e,classNames:t,localization:u,invitationId:f})}function mY({className:e,classNames:t,localization:n,invitationId:r}){var a;const{authClient:i,hooks:{useInvitation:c},localization:u,organization:d,redirectTo:f,replace:m,toast:p,localizeErrors:g}=A.useContext(ft),y=A.useMemo(()=>({...u,...n}),[u,n]),[w,S]=A.useState(!1),[b,R]=A.useState(!1),E=w||b,{data:T,isPending:C}=c({query:{id:r}}),O=A.useCallback(()=>ji("redirectTo")||f,[f]);A.useEffect(()=>{if(!(C||!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,C,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(O())}catch(V){p({variant:"error",message:hn({error:V,localization:y,localizeErrors:g})}),R(!1)}},k=async()=>{S(!0);try{await i.organization.rejectInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:y.INVITATION_REJECTED}),m(f)}catch(V){p({variant:"error",message:hn({error:V,localization:y,localizeErrors:g})}),S(!1)}},Y=((a=[...[{role:"owner",label:y.OWNER},{role:"admin",label:y.ADMIN},{role:"member",label:y.MEMBER}],...d?.customRoles||[]].find(V=>V.role===T?.role))==null?void 0:a.label)||T?.role;return T?x.jsxs(ad,{className:Ce("w-full max-w-sm",e,t?.base),children:[x.jsxs(p1,{className:Ce("justify-items-center text-center",t?.header),children:[x.jsx(Y4,{className:Ce("text-lg md:text-xl",t?.title),children:y.ACCEPT_INVITATION}),x.jsx(Q4,{className:Ce("text-xs md:text-sm",t?.description),children:y.ACCEPT_INVITATION_DESCRIPTION})]}),x.jsxs(m1,{className:Ce("flex flex-col gap-6 truncate",t?.content),children:[x.jsxs(ad,{className:Ce("flex-row items-center p-4"),children:[x.jsx(oM,{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:Y})]}),x.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[x.jsxs(Ht,{variant:"outline",className:Ce(t?.button,t?.outlineButton),onClick:k,disabled:E,children:[w?x.jsx(or,{className:"animate-spin"}):x.jsx(MV,{}),y.REJECT]}),x.jsxs(Ht,{className:Ce(t?.button,t?.primaryButton),onClick:I,disabled:E,children:[b?x.jsx(or,{className:"animate-spin"}):x.jsx(eN,{}),y.ACCEPT]})]})]})]}):x.jsx(iM,{className:e,classNames:t})}var iM=({className:e,classNames:t,localization:n})=>x.jsxs(ad,{className:Ce("w-full max-w-sm",e,t?.base),children:[x.jsxs(p1,{className:Ce("justify-items-center",t?.header),children:[x.jsx(Ma,{className:Ce("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),x.jsx(Ma,{className:Ce("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),x.jsxs(m1,{className:Ce("flex flex-col gap-6 truncate",t?.content),children:[x.jsxs(ad,{className:Ce("flex-row items-center p-4"),children:[x.jsx(oM,{isPending:!0,localization:n}),x.jsx(Ma,{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(Ma,{className:"h-9 w-full"}),x.jsx(Ma,{className:"h-9 w-full"})]})]})]});function VO({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return x.jsx(mW,{"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 gY({classNames:e,isSubmitting:t,localization:n,view:r}){var a,i,c,u;const{viewPaths:d,navigate:f,basePath:m}=A.useContext(ft);return x.jsxs(Ht,{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(tN,{className:(c=e?.form)==null?void 0:c.icon}):x.jsx(nN,{className:(u=e?.form)==null?void 0:u.icon}),n.SIGN_IN_WITH," ",r==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function vY({classNames:e,isSubmitting:t,localization:n,view:r}){var a,i,c,u;const{viewPaths:d,navigate:f,basePath:m,credentials:p}=A.useContext(ft);return x.jsxs(Ht,{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(tN,{className:(c=e?.form)==null?void 0:c.icon}):x.jsx(nN,{className:(u=e?.form)==null?void 0:u.icon}),n.SIGN_IN_WITH," ",r==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function yY({localization:e,redirectTo:t}){const{authClient:n,localization:r,toast:a,localizeErrors:i}=A.useContext(ft),c=A.useRef(!1);e=A.useMemo(()=>({...r,...e}),[r,e]);const{onSuccess:u}=ca({redirectTo:t});return A.useEffect(()=>{if(!c.current){c.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:u}})}catch(d){a({variant:"error",message:hn({error:d,localization:e,localizeErrors:i})})}}},[n,e,i,u,a]),null}function _Y({classNames:e,isSubmitting:t,localization:n,redirectTo:r,setIsSubmitting:a}){var i,c;const{authClient:u,localization:d,toast:f,localizeErrors:m}=A.useContext(ft);n={...d,...n};const{onSuccess:p}=ca({redirectTo:r}),g=async()=>{a?.(!0);try{const y=await u.signIn.passkey({fetchOptions:{throw:!0}});y?.error?(f({variant:"error",message:hn({error:y.error,localization:n,localizeErrors:m})}),a?.(!1)):p()}catch(y){f({variant:"error",message:hn({error:y,localization:n,localizeErrors:m})}),a?.(!1)}};return x.jsxs(Ht,{className:Ce("w-full",(i=e?.form)==null?void 0:i.button,(c=e?.form)==null?void 0:c.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:g,children:[x.jsx(CV,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function FO({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,other:i,provider:c,redirectTo:u,socialLayout:d,setIsSubmitting:f}){var m,p,g,y;const{authClient:w,basePath:S,baseURL:b,persistClient:R,redirectTo:E,viewPaths:T,social:C,genericOAuth:O,toast:I,localizeErrors:k}=A.useContext(ft),D=A.useCallback(()=>u||ji("redirectTo")||E,[u,E]),z=A.useCallback(()=>`${b}${n||(R?`${S}/${T.CALLBACK}?redirectTo=${encodeURIComponent(D())}`:D())}`,[n,R,S,T,b,D]),Y=async()=>{f(!0);try{if(i){const V={providerId:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(V),setTimeout(()=>{f(!1)},1e4)):await w.signIn.oauth2(V)}else{const V={provider:c.provider,callbackURL:z(),fetchOptions:{throw:!0}};C?.signIn?(await C.signIn(V),setTimeout(()=>{f(!1)},1e4)):await w.signIn.social(V)}}catch(V){I({variant:"error",message:hn({error:V,localization:a,localizeErrors:k})}),f(!1)}};return x.jsxs(Ht,{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:Y,children:[c.icon&&x.jsx(c.icon,{className:(y=t?.form)==null?void 0:y.icon}),d==="grid"&&c.name,d==="vertical"&&`${a.SIGN_IN_WITH} ${c.name}`]})}function _oe({className:e,classNames:t,callbackURL:n,cardHeader:r,cardFooter:a,localization:i,path:c,pathname:u,redirectTo:d,socialLayout:f="auto",view:m,otpSeparators:p=0}){var g,y,w,S,b,R;const E=za(),{basePath:T,credentials:C,localization:O,magicLink:I,emailOTP:k,oneTap:D,passkey:z,signUp:Y,social:V,genericOAuth:Z,viewPaths:U,Link:J}=A.useContext(ft);i={...O,...i};let ie=f;ie==="auto"&&(ie=C&&V?.providers&&V.providers.length>2?"horizontal":"vertical");const F=c??u?.split("/").pop(),X=m||a_(U,F)||"SIGN_IN",[ae,fe]=A.useState(!1);if(A.useEffect(()=>{const P=()=>fe(!1);return window.addEventListener("pagehide",P),()=>{fe(!1),window.removeEventListener("pagehide",P)}},[]),X==="CALLBACK")return x.jsx(aM,{redirectTo:d});if(X==="SIGN_OUT")return x.jsx(sM,{redirectTo:d});if(X==="ACCEPT_INVITATION")return x.jsx(pY,{className:e,classNames:t});const K=!C&&!I&&!k?i.DISABLED_CREDENTIALS_DESCRIPTION:i[`${X}_DESCRIPTION`];return x.jsxs(ad,{className:Ce("w-full max-w-sm",e,t?.base),children:[x.jsx(p1,{className:t?.header,children:r||x.jsxs(x.Fragment,{children:[x.jsx(Y4,{className:Ce("text-lg md:text-xl",t?.title),children:i[X]}),K&&x.jsx(Q4,{className:Ce("text-xs md:text-sm",t?.description),children:K})]})}),x.jsxs(m1,{className:Ce("grid gap-6",t?.content),children:[D&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(X)&&x.jsx(yY,{localization:i,redirectTo:d}),(C||I||k)&&x.jsxs("div",{className:"grid gap-4",children:[x.jsx(hY,{classNames:t?.form,callbackURL:n,isSubmitting:ae,localization:i,otpSeparators:p,view:X,redirectTo:d,setIsSubmitting:fe}),I&&(C&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(X)||k&&X==="EMAIL_OTP")&&x.jsx(vY,{classNames:t,localization:i,view:X,isSubmitting:ae}),k&&(C&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(X)||I&&["SIGN_IN","MAGIC_LINK"].includes(X))&&x.jsx(gY,{classNames:t,localization:i,view:X,isSubmitting:ae})]}),X!=="RESET_PASSWORD"&&X!=="EMAIL_VERIFICATION"&&(((g=V?.providers)==null?void 0:g.length)||((y=Z?.providers)==null?void 0:y.length)||X==="SIGN_IN"&&z)&&x.jsxs(x.Fragment,{children:[(C||I||k)&&x.jsxs("div",{className:Ce("flex items-center gap-2",t?.continueWith),children:[x.jsx(VO,{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(VO,{className:Ce("!w-auto grow",t?.separator)})]}),x.jsxs("div",{className:"grid gap-4",children:[(((w=V?.providers)==null?void 0:w.length)||((S=Z?.providers)==null?void 0:S.length))&&x.jsxs("div",{className:Ce("flex w-full items-center justify-between gap-4",ie==="horizontal"&&"flex-wrap",ie==="vertical"&&"flex-col",ie==="grid"&&"grid grid-cols-2"),children:[(b=V?.providers)==null?void 0:b.map(P=>{const B=XW.find(q=>q.provider===P);return B?x.jsx(FO,{classNames:t,callbackURL:n,isSubmitting:ae,localization:i,provider:B,redirectTo:d,setIsSubmitting:fe,socialLayout:ie},P):null}),(R=Z?.providers)==null?void 0:R.map(P=>x.jsx(FO,{classNames:t,callbackURL:n,isSubmitting:ae,localization:i,provider:P,redirectTo:d,setIsSubmitting:fe,socialLayout:ie,other:!0},P.provider))]}),z&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(X)&&x.jsx(_Y,{classNames:t,isSubmitting:ae,localization:i,redirectTo:d,setIsSubmitting:fe})]})]})]}),a&&x.jsx(jO,{className:t?.footer,children:a}),C&&Y&&x.jsxs(jO,{className:Ce("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[X==="SIGN_IN"||X==="MAGIC_LINK"||X==="EMAIL_OTP"?i.DONT_HAVE_AN_ACCOUNT:X==="SIGN_UP"?i.ALREADY_HAVE_AN_ACCOUNT:x.jsx(EV,{className:"size-3"}),X==="SIGN_IN"||X==="MAGIC_LINK"||X==="EMAIL_OTP"||X==="SIGN_UP"?x.jsx(J,{className:Ce("text-foreground underline",t?.footerLink),href:`${T}/${U[X==="SIGN_IN"||X==="MAGIC_LINK"||X==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${E?window.location.search:""}`,children:x.jsx(Ht,{variant:"link",size:"sm",className:Ce("px-0 text-foreground underline",t?.footerLink),children:X==="SIGN_IN"||X==="MAGIC_LINK"||X==="EMAIL_OTP"?i.SIGN_UP:i.SIGN_IN})}):x.jsx(Ht,{variant:"link",size:"sm",className:Ce("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:i.GO_BACK})]})]})}function boe({children:e}){const{hooks:{useSession:t}}=A.useContext(ft),{isPending:n}=t();return n?e:null}function woe({children:e}){const{hooks:{useSession:t}}=A.useContext(ft),{data:n}=t();return n?e:null}function Soe({children:e}){const{hooks:{useSession:t}}=A.useContext(ft),{data:n,isPending:r}=t();return!n&&!r?e:null}function bY(e){const t=gl.c(8),{children:n}=e,r=vl();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={basePath:"/",pathMode:"slug"},t[0]=a):a=t[0];let i,c;t[1]!==r?(i=d=>r({to:d}),c=d=>r({to:d,replace:!0}),t[1]=r,t[2]=i,t[3]=c):(i=t[2],c=t[3]);let u;return t[4]!==n||t[5]!==i||t[6]!==c?(u=x.jsx(_V,{authClient:Rj,redirectTo:"/",organization:a,navigate:i,replace:c,Link:wY,children:n}),t[4]=n,t[5]=i,t[6]=c,t[7]=u):u=t[7],u}function wY(e){const{href:t,className:n,children:r,...a}=e;return x.jsx(Em,{to:t,className:n,...a,children:r})}async function SY(){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 EY(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 RY(e){const t=gl.c(6),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:HC.publicConfig(),queryFn:SY,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=BC(r);let i,c;t[1]!==a.theme?(i=()=>{EY(a.theme)},c=[a.theme],t[1]=a.theme,t[2]=i,t[3]=c):(i=t[2],c=t[3]),A.useLayoutEffect(i,c);let u;return t[4]!==n?(u=x.jsx(x.Fragment,{children:n}),t[4]=n,t[5]=u):u=t[5],u}function cM(){const e=gl.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 xY=new lD({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function TY(e){const t=gl.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=x.jsx(Wz,{}),t[0]=r):r=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=x.jsx(cM,{}),t[1]=a):a=t[1];let i;return t[2]!==n?(i=x.jsxs(dD,{client:xY,children:[r,x.jsx(A.Suspense,{fallback:a,children:x.jsx(RY,{children:x.jsx(xD,{children:x.jsx(bY,{children:n})})})})]}),t[2]=n,t[3]=i):i=t[3],i}var OY=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||Pe();a instanceof Ua&&(e.number=a.int())}}},CY=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=De(n):typeof n=="number"?e.number=De(n):typeof n=="boolean"?e.boolean=De(n):n===null?e.null=_l():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},AY=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?_l():!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 De(e[0]);if(t==="string")return Et(e);if(t==="number"){const[n,r,...a]=e;return mt([De(n),De(r),...a.map(i=>De(i))])}return t==="boolean"?mt([De(!0),De(!1)]):!1}},IY=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}}},NY=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=M())}},kY=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||M();r instanceof Nm&&(e.string=r.refine(a=>Array.from(a).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},MY=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||M();r instanceof Nm&&(e.string=r.refine(a=>Array.from(a).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},PY=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||M();if(r instanceof Nm){const a=new RegExp(n.pattern);e.string=r.regex(a)}}}},DY=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||Pe();r instanceof Ua&&(e.number=r.min(n.minimum))}}},LY=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||Pe();r instanceof Ua&&(e.number=r.max(n.maximum))}}},jY=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||Pe();r instanceof Ua&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},$Y=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||Pe();r instanceof Ua&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},UY=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||Pe();r instanceof Ua&&(e.number=r.refine(a=>{if(n.multipleOf===0)return!1;const i=a/n.multipleOf,c=Math.round(i),u=Math.min(Math.abs(a)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(i-c)<=u/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},zY=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=ve(Gr()))}},VY=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||ve(Gr())).min(n.minItems))}},FY=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||ve(Gr())).max(n.maxItems))}},qY=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||ve(Gr());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=rr(n.items);let a=ve(r);if(e.array&&e.array instanceof VI){const i=e.array._def;i.checks&&i.checks.forEach(c=>{if(c._zod&&c._zod.def){const u=c._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||ve(Gr()):e.array=ve(Gr()).max(0):(typeof n.items=="boolean"&&n.items===!0||n.prefixItems)&&(e.array=e.array||ve(Gr()))}},BY=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=>rr(i));let a;r.length===0?a=iT([]):a=iT(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}},HY=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||re({}).passthrough())}},GY=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=re({}).passthrough())}},ZY=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||re({}).passthrough();e.object=r.refine(a=>Object.keys(a).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},KY=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||re({}).passthrough();e.object=r.refine(a=>Object.keys(a).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function id(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)=>id(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)&&id(e[a],t[a]))}return!1}function WY(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(a=>id(n,a))?!1:(t.push(n),!0))}}function Jp(e,t){return e.safeParse(t).success}var YY=class{apply(e,t){if(!t.not)return e;const n=rr(t.not);return e.refine(r=>!Jp(n,r),{message:"Value must not match the 'not' schema"})}},QY=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(WY(),{message:"Array items must be unique"})}},XY=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>rr(r)).reduce((r,a)=>pd(r,a),e)}},JY=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?rr(t.anyOf[0]):mt([rr(t.anyOf[0]),rr(t.anyOf[1]),...t.anyOf.slice(2).map(r=>rr(r))]);return pd(e,n)}},eQ=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>rr(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"})}},tQ=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const a=n.prefixItems.map(i=>rr(i));return e.refine(i=>{if(!Array.isArray(i))return!0;for(let c=0;c<Math.min(i.length,a.length);c++)if(!Jp(a[c],i[c]))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 c=rr(n.items);for(let u=a.length;u<i.length;u++)if(!Jp(c,i[u]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},nQ=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof km||e instanceof qI){const r={};if(n.properties)for(const[a,i]of Object.entries(n.properties))i!==void 0&&(r[a]=rr(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?re(r):re(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&&!rr(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=>id(r,a)),{message:"Value must match one of the enum values"})}},oQ=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=>id(r,n),{message:"Value must equal the const value"})}},aQ=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},sQ=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:Gr().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))}},iQ=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const a=rr(r.contains),i=(n=r.minContains)!=null?n:1,c=r.maxContains;return e.refine(u=>{if(!Array.isArray(u))return!0;let d=0;for(const f of u)Jp(a,f)&&d++;return!(d<i||c!==void 0&&d>c)},{message:"Array must contain required items matching the schema"})}},cQ=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},lQ=[new CY,new AY,new OY,new IY,new NY,new zY,new GY,new kY,new MY,new PY,new DY,new LY,new jY,new $Y,new UY,new BY,new VY,new FY,new qY,new ZY,new KY,new HY],uQ=[new sQ,new rQ,new oQ,new XY,new JY,new eQ,new tQ,new nQ,new iQ,new YY,new QY,new cQ,new aQ];function rr(e){if(typeof e=="boolean")return e?Gr():Lp();const t={};for(const a of lQ)a.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||M()),t.number!==!1&&n.push(t.number||Pe()),t.boolean!==!1&&n.push(t.boolean||We()),t.null!==!1&&n.push(t.null||_l()),t.array!==!1&&n.push(t.array||ve(Gr())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const a=ZI(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=Lp():n.length===1?r=n[0]:Object.keys(e).some(i=>i!=="$schema"&&i!=="title"&&i!=="description")?r=mt(n):r=Gr();for(const a of uQ)r=a.apply(r,e);return r}function Gm(e){return!!e._zod}function ws(e,t){return Gm(e)?KA(e,t):e.safeParse(t)}function lM(e){if(!e)return;let t;if(Gm(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function dQ(e){if(Gm(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 Zm="2025-11-25",fQ=[Zm,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],yi="io.modelcontextprotocol/related-task",Km="2.0",Wn=ZI(e=>e!==null&&(typeof e=="object"||typeof e=="function")),uM=mt([M(),Pe().int()]),dM=M();Kn({ttl:mt([Pe(),_l()]).optional(),pollInterval:Pe().optional()});const hQ=re({ttl:Pe().optional()}),pQ=re({taskId:M()}),b1=Kn({progressToken:uM.optional(),[yi]:pQ.optional()}),Yr=re({_meta:b1.optional()}),Td=Yr.extend({task:hQ.optional()}),mQ=e=>Td.safeParse(e).success,Qn=re({method:M(),params:Yr.loose().optional()}),vo=re({_meta:b1.optional()}),yo=re({method:M(),params:vo.loose().optional()}),Xn=Kn({_meta:b1.optional()}),Wm=mt([M(),Pe().int()]),fM=re({jsonrpc:De(Km),id:Wm,...Qn.shape}).strict(),N_=e=>fM.safeParse(e).success,hM=re({jsonrpc:De(Km),...yo.shape}).strict(),gQ=e=>hM.safeParse(e).success,w1=re({jsonrpc:De(Km),id:Wm,result:Xn}).strict(),Nu=e=>w1.safeParse(e).success;var et;(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"})(et||(et={}));const S1=re({jsonrpc:De(Km),id:Wm.optional(),error:re({code:Pe().int(),message:M(),data:ot().optional()})}).strict(),vQ=e=>S1.safeParse(e).success,Bu=mt([fM,hM,w1,S1]);mt([w1,S1]);const Zc=Xn.strict(),yQ=vo.extend({requestId:Wm.optional(),reason:M().optional()}),E1=yo.extend({method:De("notifications/cancelled"),params:yQ}),_Q=re({src:M(),mimeType:M().optional(),sizes:ve(M()).optional(),theme:Et(["light","dark"]).optional()}),Od=re({icons:ve(_Q).optional()}),ul=re({name:M(),title:M().optional()}),pM=ul.extend({...ul.shape,...Od.shape,version:M(),websiteUrl:M().optional(),description:M().optional()}),bQ=pd(re({applyDefaults:We().optional()}),lt(M(),ot())),wQ=Ob(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,pd(re({form:bQ.optional(),url:Wn.optional()}),lt(M(),ot()).optional())),SQ=Kn({list:Wn.optional(),cancel:Wn.optional(),requests:Kn({sampling:Kn({createMessage:Wn.optional()}).optional(),elicitation:Kn({create:Wn.optional()}).optional()}).optional()}),EQ=Kn({list:Wn.optional(),cancel:Wn.optional(),requests:Kn({tools:Kn({call:Wn.optional()}).optional()}).optional()}),RQ=re({experimental:lt(M(),Wn).optional(),sampling:re({context:Wn.optional(),tools:Wn.optional()}).optional(),elicitation:wQ.optional(),roots:re({listChanged:We().optional()}).optional(),tasks:SQ.optional()}),xQ=Yr.extend({protocolVersion:M(),capabilities:RQ,clientInfo:pM}),TQ=Qn.extend({method:De("initialize"),params:xQ}),OQ=re({experimental:lt(M(),Wn).optional(),logging:Wn.optional(),completions:Wn.optional(),prompts:re({listChanged:We().optional()}).optional(),resources:re({subscribe:We().optional(),listChanged:We().optional()}).optional(),tools:re({listChanged:We().optional()}).optional(),tasks:EQ.optional()}),mM=Xn.extend({protocolVersion:M(),capabilities:OQ,serverInfo:pM,instructions:M().optional()}),gM=yo.extend({method:De("notifications/initialized"),params:vo.optional()}),CQ=e=>gM.safeParse(e).success,R1=Qn.extend({method:De("ping"),params:Yr.optional()}),AQ=re({progress:Pe(),total:sn(Pe()),message:sn(M())}),IQ=re({...vo.shape,...AQ.shape,progressToken:uM}),x1=yo.extend({method:De("notifications/progress"),params:IQ}),NQ=Yr.extend({cursor:dM.optional()}),Cd=Qn.extend({params:NQ.optional()}),Ad=Xn.extend({nextCursor:dM.optional()}),kQ=Et(["working","input_required","completed","failed","cancelled"]),Id=re({taskId:M(),status:kQ,ttl:mt([Pe(),_l()]),createdAt:M(),lastUpdatedAt:M(),pollInterval:sn(Pe()),statusMessage:sn(M())}),cd=Xn.extend({task:Id}),MQ=vo.merge(Id),em=yo.extend({method:De("notifications/tasks/status"),params:MQ}),T1=Qn.extend({method:De("tasks/get"),params:Yr.extend({taskId:M()})}),O1=Xn.merge(Id),C1=Qn.extend({method:De("tasks/result"),params:Yr.extend({taskId:M()})});Xn.loose();const A1=Cd.extend({method:De("tasks/list")}),I1=Ad.extend({tasks:ve(Id)}),N1=Qn.extend({method:De("tasks/cancel"),params:Yr.extend({taskId:M()})}),PQ=Xn.merge(Id),vM=re({uri:M(),mimeType:sn(M()),_meta:lt(M(),ot()).optional()}),yM=vM.extend({text:M()}),k1=M().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),_M=vM.extend({blob:k1}),Nd=Et(["user","assistant"]),Sl=re({audience:ve(Nd).optional(),priority:Pe().min(0).max(1).optional(),lastModified:jI({offset:!0}).optional()}),bM=re({...ul.shape,...Od.shape,uri:M(),description:sn(M()),mimeType:sn(M()),annotations:Sl.optional(),_meta:sn(Kn({}))}),DQ=re({...ul.shape,...Od.shape,uriTemplate:M(),description:sn(M()),mimeType:sn(M()),annotations:Sl.optional(),_meta:sn(Kn({}))}),LQ=Cd.extend({method:De("resources/list")}),wM=Ad.extend({resources:ve(bM)}),jQ=Cd.extend({method:De("resources/templates/list")}),SM=Ad.extend({resourceTemplates:ve(DQ)}),M1=Yr.extend({uri:M()}),$Q=M1,UQ=Qn.extend({method:De("resources/read"),params:$Q}),EM=Xn.extend({contents:ve(mt([yM,_M]))}),RM=yo.extend({method:De("notifications/resources/list_changed"),params:vo.optional()}),zQ=M1,VQ=Qn.extend({method:De("resources/subscribe"),params:zQ}),FQ=M1,qQ=Qn.extend({method:De("resources/unsubscribe"),params:FQ}),BQ=vo.extend({uri:M()}),HQ=yo.extend({method:De("notifications/resources/updated"),params:BQ}),GQ=re({name:M(),description:sn(M()),required:sn(We())}),ZQ=re({...ul.shape,...Od.shape,description:sn(M()),arguments:sn(ve(GQ)),_meta:sn(Kn({}))}),KQ=Cd.extend({method:De("prompts/list")}),xM=Ad.extend({prompts:ve(ZQ)}),WQ=Yr.extend({name:M(),arguments:lt(M(),M()).optional()}),YQ=Qn.extend({method:De("prompts/get"),params:WQ}),P1=re({type:De("text"),text:M(),annotations:Sl.optional(),_meta:lt(M(),ot()).optional()}),D1=re({type:De("image"),data:k1,mimeType:M(),annotations:Sl.optional(),_meta:lt(M(),ot()).optional()}),L1=re({type:De("audio"),data:k1,mimeType:M(),annotations:Sl.optional(),_meta:lt(M(),ot()).optional()}),QQ=re({type:De("tool_use"),name:M(),id:M(),input:lt(M(),ot()),_meta:lt(M(),ot()).optional()}),XQ=re({type:De("resource"),resource:mt([yM,_M]),annotations:Sl.optional(),_meta:lt(M(),ot()).optional()}),JQ=bM.extend({type:De("resource_link")}),j1=mt([P1,D1,L1,JQ,XQ]),eX=re({role:Nd,content:j1}),TM=Xn.extend({description:M().optional(),messages:ve(eX)}),OM=yo.extend({method:De("notifications/prompts/list_changed"),params:vo.optional()}),tX=re({title:M().optional(),readOnlyHint:We().optional(),destructiveHint:We().optional(),idempotentHint:We().optional(),openWorldHint:We().optional()}),nX=re({taskSupport:Et(["required","optional","forbidden"]).optional()}),CM=re({...ul.shape,...Od.shape,description:M().optional(),inputSchema:re({type:De("object"),properties:lt(M(),Wn).optional(),required:ve(M()).optional()}).catchall(ot()),outputSchema:re({type:De("object"),properties:lt(M(),Wn).optional(),required:ve(M()).optional()}).catchall(ot()).optional(),annotations:tX.optional(),execution:nX.optional(),_meta:lt(M(),ot()).optional()}),rX=Cd.extend({method:De("tools/list")}),$1=Ad.extend({tools:ve(CM)}),Ym=Xn.extend({content:ve(j1).default([]),structuredContent:lt(M(),ot()).optional(),isError:We().optional()});Ym.or(Xn.extend({toolResult:ot()}));const oX=Td.extend({name:M(),arguments:lt(M(),ot()).optional()}),aX=Qn.extend({method:De("tools/call"),params:oX}),AM=yo.extend({method:De("notifications/tools/list_changed"),params:vo.optional()}),sX=re({autoRefresh:We().default(!0),debounceMs:Pe().int().nonnegative().default(300)}),IM=Et(["debug","info","notice","warning","error","critical","alert","emergency"]),iX=Yr.extend({level:IM}),cX=Qn.extend({method:De("logging/setLevel"),params:iX}),lX=vo.extend({level:IM,logger:M().optional(),data:ot()}),uX=yo.extend({method:De("notifications/message"),params:lX}),dX=re({name:M().optional()}),fX=re({hints:ve(dX).optional(),costPriority:Pe().min(0).max(1).optional(),speedPriority:Pe().min(0).max(1).optional(),intelligencePriority:Pe().min(0).max(1).optional()}),hX=re({mode:Et(["auto","required","none"]).optional()}),pX=re({type:De("tool_result"),toolUseId:M().describe("The unique identifier for the corresponding tool call."),content:ve(j1).default([]),structuredContent:re({}).loose().optional(),isError:We().optional(),_meta:lt(M(),ot()).optional()}),mX=xb("type",[P1,D1,L1]),tm=xb("type",[P1,D1,L1,QQ,pX]),gX=re({role:Nd,content:mt([tm,ve(tm)]),_meta:lt(M(),ot()).optional()}),vX=Td.extend({messages:ve(gX),modelPreferences:fX.optional(),systemPrompt:M().optional(),includeContext:Et(["none","thisServer","allServers"]).optional(),temperature:Pe().optional(),maxTokens:Pe().int(),stopSequences:ve(M()).optional(),metadata:Wn.optional(),tools:ve(CM).optional(),toolChoice:hX.optional()}),NM=Qn.extend({method:De("sampling/createMessage"),params:vX}),kM=Xn.extend({model:M(),stopReason:sn(Et(["endTurn","stopSequence","maxTokens"]).or(M())),role:Nd,content:mX}),MM=Xn.extend({model:M(),stopReason:sn(Et(["endTurn","stopSequence","maxTokens","toolUse"]).or(M())),role:Nd,content:mt([tm,ve(tm)])}),yX=re({type:De("boolean"),title:M().optional(),description:M().optional(),default:We().optional()}),_X=re({type:De("string"),title:M().optional(),description:M().optional(),minLength:Pe().optional(),maxLength:Pe().optional(),format:Et(["email","uri","date","date-time"]).optional(),default:M().optional()}),bX=re({type:Et(["number","integer"]),title:M().optional(),description:M().optional(),minimum:Pe().optional(),maximum:Pe().optional(),default:Pe().optional()}),wX=re({type:De("string"),title:M().optional(),description:M().optional(),enum:ve(M()),default:M().optional()}),SX=re({type:De("string"),title:M().optional(),description:M().optional(),oneOf:ve(re({const:M(),title:M()})),default:M().optional()}),EX=re({type:De("string"),title:M().optional(),description:M().optional(),enum:ve(M()),enumNames:ve(M()).optional(),default:M().optional()}),RX=mt([wX,SX]),xX=re({type:De("array"),title:M().optional(),description:M().optional(),minItems:Pe().optional(),maxItems:Pe().optional(),items:re({type:De("string"),enum:ve(M())}),default:ve(M()).optional()}),TX=re({type:De("array"),title:M().optional(),description:M().optional(),minItems:Pe().optional(),maxItems:Pe().optional(),items:re({anyOf:ve(re({const:M(),title:M()}))}),default:ve(M()).optional()}),OX=mt([xX,TX]),CX=mt([EX,RX,OX]),AX=mt([CX,yX,_X,bX]),IX=Td.extend({mode:De("form").optional(),message:M(),requestedSchema:re({type:De("object"),properties:lt(M(),AX),required:ve(M()).optional()})}),NX=Td.extend({mode:De("url"),message:M(),elicitationId:M(),url:M().url()}),kX=mt([IX,NX]),PM=Qn.extend({method:De("elicitation/create"),params:kX}),MX=vo.extend({elicitationId:M()}),PX=yo.extend({method:De("notifications/elicitation/complete"),params:MX}),DM=Xn.extend({action:Et(["accept","decline","cancel"]),content:Ob(e=>e===null?void 0:e,lt(M(),mt([M(),Pe(),We(),ve(M())])).optional())}),DX=re({type:De("ref/resource"),uri:M()}),LX=re({type:De("ref/prompt"),name:M()}),jX=Yr.extend({ref:mt([LX,DX]),argument:re({name:M(),value:M()}),context:re({arguments:lt(M(),M()).optional()}).optional()}),$X=Qn.extend({method:De("completion/complete"),params:jX}),LM=Xn.extend({completion:Kn({values:ve(M()).max(100),total:sn(Pe().int()),hasMore:sn(We())})}),UX=re({uri:M().startsWith("file://"),name:M().optional(),_meta:lt(M(),ot()).optional()}),zX=Qn.extend({method:De("roots/list"),params:Yr.optional()}),VX=Xn.extend({roots:ve(UX)}),FX=yo.extend({method:De("notifications/roots/list_changed"),params:vo.optional()});mt([R1,TQ,$X,cX,YQ,KQ,LQ,jQ,UQ,VQ,qQ,aX,rX,T1,C1,A1,N1]);mt([E1,x1,gM,FX,em]);mt([Zc,kM,MM,DM,VX,O1,I1,cd]);mt([R1,NM,PM,zX,T1,C1,A1,N1]);mt([E1,x1,uX,HQ,RM,AM,OM,em,PX]);mt([Zc,mM,LM,TM,xM,wM,SM,EM,Ym,$1,O1,I1,cd]);class Ke 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===et.UrlElicitationRequired&&r){const a=r;if(a.elicitations)return new qX(a.elicitations,n)}return new Ke(t,n,r)}}class qX extends Ke{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(et.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function pi(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function qO(e){const n=lM(e)?.method;if(!n)throw new Error("Schema is missing a method literal");const r=dQ(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function BO(e,t){const n=ws(e,t);if(!n.success)throw n.error;return n.data}const BX=6e4;class HX{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(E1,n=>{this._oncancel(n)}),this.setNotificationHandler(x1,n=>{this._onprogress(n)}),this.setRequestHandler(R1,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(T1,async(n,r)=>{const a=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!a)throw new Ke(et.InvalidParams,"Failed to retrieve task: Task not found");return{...a}}),this.setRequestHandler(C1,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 Ke(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 c=await this._taskStore.getTask(i,r.sessionId);if(!c)throw new Ke(et.InvalidParams,`Task not found: ${i}`);if(!pi(c.status))return await this._waitForTaskUpdate(i,r.signal),await a();if(pi(c.status)){const u=await this._taskStore.getTaskResult(i,r.sessionId);return this._clearTaskQueue(i),{...u,_meta:{...u._meta,[yi]:{taskId:i}}}}return await a()};return await a()}),this.setRequestHandler(A1,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 Ke(et.InvalidParams,`Failed to list tasks: ${a instanceof Error?a.message:String(a)}`)}}),this.setRequestHandler(N1,async(n,r)=>{try{const a=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!a)throw new Ke(et.InvalidParams,`Task not found: ${n.params.taskId}`);if(pi(a.status))throw new Ke(et.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 Ke(et.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(a){throw a instanceof Ke?a:new Ke(et.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),Ke.fromError(et.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){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");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,c)=>{a?.(i,c),Nu(i)||vQ(i)?this._onresponse(i):N_(i)?this._onrequest(i,c):gQ(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();for(const r of this._requestHandlerAbortControllers.values())r.abort();this._requestHandlerAbortControllers.clear();const n=Ke.fromError(et.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?.[yi]?.taskId;if(r===void 0){const m={jsonrpc:"2.0",id:t.id,error:{code:et.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 c=new AbortController;this._requestHandlerAbortControllers.set(t.id,c);const u=mQ(t.params)?t.params.task:void 0,d=this._taskStore?this.requestTaskStore(t,a?.sessionId):void 0,f={signal:c.signal,sessionId:a?.sessionId,_meta:t.params?._meta,sendNotification:async m=>{if(c.signal.aborted)return;const p={relatedRequestId:t.id};i&&(p.relatedTask={taskId:i}),await this.notification(m,p)},sendRequest:async(m,p,g)=>{if(c.signal.aborted)throw new Ke(et.ConnectionClosed,"Request was cancelled");const y={...g,relatedRequestId:t.id};i&&!y.relatedTask&&(y.relatedTask={taskId:i});const w=y.relatedTask?.taskId??i;return w&&d&&await d.updateTaskStatus(w,"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(c.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(c.signal.aborted)return;const p={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(m.code)?m.code:et.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 c=this._responseHandlers.get(a),u=this._timeoutInfo.get(a);if(u&&c&&u.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(d){this._responseHandlers.delete(a),this._progressHandlers.delete(a),this._cleanupTimeout(a),c(d);return}i(r)}_onresponse(t){const n=Number(t.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),Nu(t))r(t);else{const c=new Ke(t.error.code,t.error.message,t.error.data);r(c)}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(Nu(t)&&t.result&&typeof t.result=="object"){const c=t.result;if(c.task&&typeof c.task=="object"){const u=c.task;typeof u.taskId=="string"&&(i=!0,this._taskProgressTokens.set(u.taskId,n))}}if(i||this._progressHandlers.delete(n),Nu(t))a(t);else{const c=Ke.fromError(t.error.code,t.error.message,t.error.data);a(c)}}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(c){yield{type:"error",error:c instanceof Ke?c:new Ke(et.InternalError,String(c))}}return}let i;try{const c=await this.request(t,cd,r);if(c.task)i=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new Ke(et.InternalError,"Task creation did not return a task");for(;;){const u=await this.getTask({taskId:i},r);if(yield{type:"taskStatus",task:u},pi(u.status)){u.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)}:u.status==="failed"?yield{type:"error",error:new Ke(et.InternalError,`Task ${i} failed`)}:u.status==="cancelled"&&(yield{type:"error",error:new Ke(et.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(c){yield{type:"error",error:c instanceof Ke?c:new Ke(et.InternalError,String(c))}}}request(t,n,r){const{relatedRequestId:a,resumptionToken:i,onresumptiontoken:c,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||{},[yi]:d}});const w=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:c}).catch(C=>this._onerror(new Error(`Failed to send cancellation: ${C}`)));const T=E instanceof Ke?E:new Ke(et.RequestTimeout,String(E));m(T)};this._responseHandlers.set(g,E=>{if(!r?.signal?.aborted){if(E instanceof Error)return m(E);try{const T=ws(n,E.result);T.success?f(T.data):m(T.error)}catch(T){m(T)}}}),r?.signal?.addEventListener("abort",()=>{w(r?.signal?.reason)});const S=r?.timeout??BX,b=()=>w(Ke.fromError(et.RequestTimeout,"Request timed out",{timeout:S}));this._setupTimeout(g,S,r?.maxTotalTimeout,b,r?.resetTimeoutOnProgress??!1);const R=d?.taskId;if(R){const E=T=>{const C=this._responseHandlers.get(g);C?C(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:c}).catch(E=>{this._cleanupTimeout(g),m(E)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},O1,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},I1,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},PQ,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||{},[yi]: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||{},[yi]:n.relatedTask}}}),this._transport?.send(u,n).catch(d=>this._onerror(d))});return}let c={...t,jsonrpc:"2.0"};n?.relatedTask&&(c={...c,params:{...c.params,_meta:{...c.params?._meta||{},[yi]:n.relatedTask}}}),await this._transport.send(c,n)}setRequestHandler(t,n){const r=qO(t);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(a,i)=>{const c=BO(t,a);return Promise.resolve(n(c,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=qO(t);this._notificationHandlers.set(r,a=>{const i=BO(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"&&N_(a.message)){const i=a.message.id,c=this._requestResolvers.get(i);c?(c(new Ke(et.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 Ke(et.InvalidRequest,"Request cancelled"));return}const c=setTimeout(a,r);n.addEventListener("abort",()=>{clearTimeout(c),i(new Ke(et.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 Ke(et.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(a,i,c)=>{await r.storeTaskResult(a,i,c,n);const u=await r.getTask(a,n);if(u){const d=em.parse({method:"notifications/tasks/status",params:u});await this.notification(d),pi(u.status)&&this._cleanupTaskProgressHandler(a)}},getTaskResult:a=>r.getTaskResult(a,n),updateTaskStatus:async(a,i,c)=>{const u=await r.getTask(a,n);if(!u)throw new Ke(et.InvalidParams,`Task "${a}" not found - it may have been cleaned up`);if(pi(u.status))throw new Ke(et.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,c,n);const d=await r.getTask(a,n);if(d){const f=em.parse({method:"notifications/tasks/status",params:d});await this.notification(f),pi(d.status)&&this._cleanupTaskProgressHandler(a)}},listTasks:a=>r.listTasks(a,n)}}}function HO(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function GX(e,t){const n={...e};for(const r in t){const a=r,i=t[a];if(i===void 0)continue;const c=n[a];HO(c)&&HO(i)?n[a]={...c,...i}:n[a]=i}return n}var _h={exports:{}},E0={},Aa={},mi={},R0={},x0={},T0={},GO;function nm(){return GO||(GO=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,C)=>`${T}${C}`,"")}get names(){var E;return(E=this._names)!==null&&E!==void 0?E:this._names=this._items.reduce((T,C)=>(C instanceof n&&(T[C.str]=(T[C.str]||0)+1),T),{})}}e._Code=r,e.nil=new r("");function a(R,...E){const T=[R[0]];let C=0;for(;C<E.length;)u(T,E[C]),T.push(R[++C]);return new r(T)}e._=a;const i=new r("+");function c(R,...E){const T=[y(R[0])];let C=0;for(;C<E.length;)T.push(i),u(T,E[C]),T.push(i,y(R[++C]));return d(T),new r(T)}e.str=c;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:c`${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 w(R){return typeof R=="string"&&e.IDENTIFIER.test(R)?new r(`.${R}`):a`[${R}]`}e.getProperty=w;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 b(R){return new r(R.toString())}e.regexpCode=b})(T0)),T0}var O0={},ZO;function KO(){return ZO||(ZO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=nm();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 c=(0,t._)`\n`;class u extends a{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?c: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,w=(p=m.key)!==null&&p!==void 0?p:m.ref;let S=this._values[y];if(S){const E=S.get(w);if(E)return E}else S=this._values[y]=new Map;S.set(w,g);const b=this._scope[y]||(this._scope[y]=[]),R=b.length;return b[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 w in f){const S=f[w];if(!S)continue;const b=p[w]=p[w]||new Map;S.forEach(R=>{if(b.has(R))return;b.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);b.set(R,r.Completed)})}return y}}e.ValueScope=u})(O0)),O0}var WO;function ht(){return WO||(WO=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=nm(),n=KO();var r=nm();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=KO();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(L,$){return this}}class c extends i{constructor(L,$,Q){super(),this.varKind=L,this.name=$,this.rhs=Q}render({es5:L,_n:$}){const Q=L?n.varKinds.var:this.varKind,me=this.rhs===void 0?"":` = ${this.rhs}`;return`${Q} ${this.name}${me};`+$}optimizeNames(L,$){if(L[this.name.str])return this.rhs&&(this.rhs=J(this.rhs,L,$)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class u extends i{constructor(L,$,Q){super(),this.lhs=L,this.rhs=$,this.sideEffects=Q}render({_n:L}){return`${this.lhs} = ${this.rhs};`+L}optimizeNames(L,$){if(!(this.lhs instanceof t.Name&&!L[this.lhs.str]&&!this.sideEffects))return this.rhs=J(this.rhs,L,$),this}get names(){const L=this.lhs instanceof t.Name?{}:{...this.lhs.names};return U(L,this.rhs)}}class d extends u{constructor(L,$,Q,me){super(L,Q,me),this.op=$}render({_n:L}){return`${this.lhs} ${this.op}= ${this.rhs};`+L}}class f extends i{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`${this.label}:`+L}}class m extends i{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`break${this.label?` ${this.label}`:""};`+L}}class p extends i{constructor(L){super(),this.error=L}render({_n:L}){return`throw ${this.error};`+L}get names(){return this.error.names}}class g extends i{constructor(L){super(),this.code=L}render({_n:L}){return`${this.code};`+L}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(L,$){return this.code=J(this.code,L,$),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class y extends i{constructor(L=[]){super(),this.nodes=L}render(L){return this.nodes.reduce(($,Q)=>$+Q.render(L),"")}optimizeNodes(){const{nodes:L}=this;let $=L.length;for(;$--;){const Q=L[$].optimizeNodes();Array.isArray(Q)?L.splice($,1,...Q):Q?L[$]=Q:L.splice($,1)}return L.length>0?this:void 0}optimizeNames(L,$){const{nodes:Q}=this;let me=Q.length;for(;me--;){const _e=Q[me];_e.optimizeNames(L,$)||(ie(L,_e.names),Q.splice(me,1))}return Q.length>0?this:void 0}get names(){return this.nodes.reduce((L,$)=>Z(L,$.names),{})}}class w extends y{render(L){return"{"+L._n+super.render(L)+"}"+L._n}}class S extends y{}class b extends w{}b.kind="else";class R extends w{constructor(L,$){super($),this.condition=L}render(L){let $=`if(${this.condition})`+super.render(L);return this.else&&($+="else "+this.else.render(L)),$}optimizeNodes(){super.optimizeNodes();const L=this.condition;if(L===!0)return this.nodes;let $=this.else;if($){const Q=$.optimizeNodes();$=this.else=Array.isArray(Q)?new b(Q):Q}if($)return L===!1?$ instanceof R?$:$.nodes:this.nodes.length?this:new R(F(L),$ instanceof R?[$]:$.nodes);if(!(L===!1||!this.nodes.length))return this}optimizeNames(L,$){var Q;if(this.else=(Q=this.else)===null||Q===void 0?void 0:Q.optimizeNames(L,$),!!(super.optimizeNames(L,$)||this.else))return this.condition=J(this.condition,L,$),this}get names(){const L=super.names;return U(L,this.condition),this.else&&Z(L,this.else.names),L}}R.kind="if";class E extends w{}E.kind="for";class T extends E{constructor(L){super(),this.iteration=L}render(L){return`for(${this.iteration})`+super.render(L)}optimizeNames(L,$){if(super.optimizeNames(L,$))return this.iteration=J(this.iteration,L,$),this}get names(){return Z(super.names,this.iteration.names)}}class C extends E{constructor(L,$,Q,me){super(),this.varKind=L,this.name=$,this.from=Q,this.to=me}render(L){const $=L.es5?n.varKinds.var:this.varKind,{name:Q,from:me,to:_e}=this;return`for(${$} ${Q}=${me}; ${Q}<${_e}; ${Q}++)`+super.render(L)}get names(){const L=U(super.names,this.from);return U(L,this.to)}}class O extends E{constructor(L,$,Q,me){super(),this.loop=L,this.varKind=$,this.name=Q,this.iterable=me}render(L){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(L)}optimizeNames(L,$){if(super.optimizeNames(L,$))return this.iterable=J(this.iterable,L,$),this}get names(){return Z(super.names,this.iterable.names)}}class I extends w{constructor(L,$,Q){super(),this.name=L,this.args=$,this.async=Q}render(L){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(L)}}I.kind="func";class k extends y{render(L){return"return "+super.render(L)}}k.kind="return";class D extends w{render(L){let $="try"+super.render(L);return this.catch&&($+=this.catch.render(L)),this.finally&&($+=this.finally.render(L)),$}optimizeNodes(){var L,$;return super.optimizeNodes(),(L=this.catch)===null||L===void 0||L.optimizeNodes(),($=this.finally)===null||$===void 0||$.optimizeNodes(),this}optimizeNames(L,$){var Q,me;return super.optimizeNames(L,$),(Q=this.catch)===null||Q===void 0||Q.optimizeNames(L,$),(me=this.finally)===null||me===void 0||me.optimizeNames(L,$),this}get names(){const L=super.names;return this.catch&&Z(L,this.catch.names),this.finally&&Z(L,this.finally.names),L}}class z extends w{constructor(L){super(),this.error=L}render(L){return`catch(${this.error})`+super.render(L)}}z.kind="catch";class Y extends w{render(L){return"finally"+super.render(L)}}Y.kind="finally";class V{constructor(L,$={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...$,_n:$.lines?`
|
|
164
|
+
`:""},this._extScope=L,this._scope=new n.Scope({parent:L}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(L){return this._scope.name(L)}scopeName(L){return this._extScope.name(L)}scopeValue(L,$){const Q=this._extScope.value(L,$);return(this._values[Q.prefix]||(this._values[Q.prefix]=new Set)).add(Q),Q}getScopeValue(L,$){return this._extScope.getValue(L,$)}scopeRefs(L){return this._extScope.scopeRefs(L,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(L,$,Q,me){const _e=this._scope.toName($);return Q!==void 0&&me&&(this._constants[_e.str]=Q),this._leafNode(new c(L,_e,Q)),_e}const(L,$,Q){return this._def(n.varKinds.const,L,$,Q)}let(L,$,Q){return this._def(n.varKinds.let,L,$,Q)}var(L,$,Q){return this._def(n.varKinds.var,L,$,Q)}assign(L,$,Q){return this._leafNode(new u(L,$,Q))}add(L,$){return this._leafNode(new d(L,e.operators.ADD,$))}code(L){return typeof L=="function"?L():L!==t.nil&&this._leafNode(new g(L)),this}object(...L){const $=["{"];for(const[Q,me]of L)$.length>1&&$.push(","),$.push(Q),(Q!==me||this.opts.es5)&&($.push(":"),(0,t.addCodeArg)($,me));return $.push("}"),new t._Code($)}if(L,$,Q){if(this._blockNode(new R(L)),$&&Q)this.code($).else().code(Q).endIf();else if($)this.code($).endIf();else if(Q)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(L){return this._elseNode(new R(L))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(R,b)}_for(L,$){return this._blockNode(L),$&&this.code($).endFor(),this}for(L,$){return this._for(new T(L),$)}forRange(L,$,Q,me,_e=this.opts.es5?n.varKinds.var:n.varKinds.let){const Ae=this._scope.toName(L);return this._for(new C(_e,Ae,$,Q),()=>me(Ae))}forOf(L,$,Q,me=n.varKinds.const){const _e=this._scope.toName(L);if(this.opts.es5){const Ae=$ instanceof t.Name?$:this.var("_arr",$);return this.forRange("_i",0,(0,t._)`${Ae}.length`,Ne=>{this.var(_e,(0,t._)`${Ae}[${Ne}]`),Q(_e)})}return this._for(new O("of",me,_e,$),()=>Q(_e))}forIn(L,$,Q,me=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(L,(0,t._)`Object.keys(${$})`,Q);const _e=this._scope.toName(L);return this._for(new O("in",me,_e,$),()=>Q(_e))}endFor(){return this._endBlockNode(E)}label(L){return this._leafNode(new f(L))}break(L){return this._leafNode(new m(L))}return(L){const $=new k;if(this._blockNode($),this.code(L),$.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(L,$,Q){if(!$&&!Q)throw new Error('CodeGen: "try" without "catch" and "finally"');const me=new D;if(this._blockNode(me),this.code(L),$){const _e=this.name("e");this._currNode=me.catch=new z(_e),$(_e)}return Q&&(this._currNode=me.finally=new Y,this.code(Q)),this._endBlockNode(z,Y)}throw(L){return this._leafNode(new p(L))}block(L,$){return this._blockStarts.push(this._nodes.length),L&&this.code(L).endBlock($),this}endBlock(L){const $=this._blockStarts.pop();if($===void 0)throw new Error("CodeGen: not in self-balancing block");const Q=this._nodes.length-$;if(Q<0||L!==void 0&&Q!==L)throw new Error(`CodeGen: wrong number of nodes: ${Q} vs ${L} expected`);return this._nodes.length=$,this}func(L,$=t.nil,Q,me){return this._blockNode(new I(L,$,Q)),me&&this.code(me).endFunc(),this}endFunc(){return this._endBlockNode(I)}optimize(L=1){for(;L-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(L){return this._currNode.nodes.push(L),this}_blockNode(L){this._currNode.nodes.push(L),this._nodes.push(L)}_endBlockNode(L,$){const Q=this._currNode;if(Q instanceof L||$&&Q instanceof $)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${$?`${L.kind}/${$.kind}`:L.kind}"`)}_elseNode(L){const $=this._currNode;if(!($ instanceof R))throw new Error('CodeGen: "else" without "if"');return this._currNode=$.else=L,this}get _root(){return this._nodes[0]}get _currNode(){const L=this._nodes;return L[L.length-1]}set _currNode(L){const $=this._nodes;$[$.length-1]=L}}e.CodeGen=V;function Z(q,L){for(const $ in L)q[$]=(q[$]||0)+(L[$]||0);return q}function U(q,L){return L instanceof t._CodeOrName?Z(q,L.names):q}function J(q,L,$){if(q instanceof t.Name)return Q(q);if(!me(q))return q;return new t._Code(q._items.reduce((_e,Ae)=>(Ae instanceof t.Name&&(Ae=Q(Ae)),Ae instanceof t._Code?_e.push(...Ae._items):_e.push(Ae),_e),[]));function Q(_e){const Ae=$[_e.str];return Ae===void 0||L[_e.str]!==1?_e:(delete L[_e.str],Ae)}function me(_e){return _e instanceof t._Code&&_e._items.some(Ae=>Ae instanceof t.Name&&L[Ae.str]===1&&$[Ae.str]!==void 0)}}function ie(q,L){for(const $ in L)q[$]=(q[$]||0)-(L[$]||0)}function F(q){return typeof q=="boolean"||typeof q=="number"||q===null?!q:(0,t._)`!${B(q)}`}e.not=F;const X=P(e.operators.AND);function ae(...q){return q.reduce(X)}e.and=ae;const fe=P(e.operators.OR);function K(...q){return q.reduce(fe)}e.or=K;function P(q){return(L,$)=>L===t.nil?$:$===t.nil?L:(0,t._)`${B(L)} ${q} ${B($)}`}function B(q){return q instanceof t.Name?q:(0,t._)`(${q})`}})(x0)),x0}var ut={},YO;function Rt(){if(YO)return ut;YO=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.checkStrictMode=ut.getErrorPath=ut.Type=ut.useFunc=ut.setEvaluated=ut.evaluatedPropsToName=ut.mergeEvaluated=ut.eachItem=ut.unescapeJsonPointer=ut.escapeJsonPointer=ut.escapeFragment=ut.unescapeFragment=ut.schemaRefOrVal=ut.schemaHasRulesButRef=ut.schemaHasRules=ut.checkUnknownRules=ut.alwaysValidSchema=ut.toHash=void 0;const e=ht(),t=nm();function n(O){const I={};for(const k of O)I[k]=!0;return I}ut.toHash=n;function r(O,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(a(O,I),!i(I,O.self.RULES.all))}ut.alwaysValidSchema=r;function a(O,I=O.schema){const{opts:k,self:D}=O;if(!k.strictSchema||typeof I=="boolean")return;const z=D.RULES.keywords;for(const Y in I)z[Y]||C(O,`unknown keyword: "${Y}"`)}ut.checkUnknownRules=a;function i(O,I){if(typeof O=="boolean")return!O;for(const k in O)if(I[k])return!0;return!1}ut.schemaHasRules=i;function c(O,I){if(typeof O=="boolean")return!O;for(const k in O)if(k!=="$ref"&&I.all[k])return!0;return!1}ut.schemaHasRulesButRef=c;function u({topSchemaRef:O,schemaPath:I},k,D,z){if(!z){if(typeof k=="number"||typeof k=="boolean")return k;if(typeof k=="string")return(0,e._)`${k}`}return(0,e._)`${O}${I}${(0,e.getProperty)(D)}`}ut.schemaRefOrVal=u;function d(O){return p(decodeURIComponent(O))}ut.unescapeFragment=d;function f(O){return encodeURIComponent(m(O))}ut.escapeFragment=f;function m(O){return typeof O=="number"?`${O}`:O.replace(/~/g,"~0").replace(/\//g,"~1")}ut.escapeJsonPointer=m;function p(O){return O.replace(/~1/g,"/").replace(/~0/g,"~")}ut.unescapeJsonPointer=p;function g(O,I){if(Array.isArray(O))for(const k of O)I(k);else I(O)}ut.eachItem=g;function y({mergeNames:O,mergeToName:I,mergeValues:k,resultToName:D}){return(z,Y,V,Z)=>{const U=V===void 0?Y:V instanceof e.Name?(Y instanceof e.Name?O(z,Y,V):I(z,Y,V),V):Y instanceof e.Name?(I(z,V,Y),Y):k(Y,V);return Z===e.Name&&!(U instanceof e.Name)?D(z,U):U}}ut.mergeEvaluated={props:y({mergeNames:(O,I,k)=>O.if((0,e._)`${k} !== true && ${I} !== undefined`,()=>{O.if((0,e._)`${I} === true`,()=>O.assign(k,!0),()=>O.assign(k,(0,e._)`${k} || {}`).code((0,e._)`Object.assign(${k}, ${I})`))}),mergeToName:(O,I,k)=>O.if((0,e._)`${k} !== true`,()=>{I===!0?O.assign(k,!0):(O.assign(k,(0,e._)`${k} || {}`),S(O,k,I))}),mergeValues:(O,I)=>O===!0?!0:{...O,...I},resultToName:w}),items:y({mergeNames:(O,I,k)=>O.if((0,e._)`${k} !== true && ${I} !== undefined`,()=>O.assign(k,(0,e._)`${I} === true ? true : ${k} > ${I} ? ${k} : ${I}`)),mergeToName:(O,I,k)=>O.if((0,e._)`${k} !== true`,()=>O.assign(k,I===!0?!0:(0,e._)`${k} > ${I} ? ${k} : ${I}`)),mergeValues:(O,I)=>O===!0?!0:Math.max(O,I),resultToName:(O,I)=>O.var("items",I)})};function w(O,I){if(I===!0)return O.var("props",!0);const k=O.var("props",(0,e._)`{}`);return I!==void 0&&S(O,k,I),k}ut.evaluatedPropsToName=w;function S(O,I,k){Object.keys(k).forEach(D=>O.assign((0,e._)`${I}${(0,e.getProperty)(D)}`,!0))}ut.setEvaluated=S;const b={};function R(O,I){return O.scopeValue("func",{ref:I,code:b[I.code]||(b[I.code]=new t._Code(I.code))})}ut.useFunc=R;var E;(function(O){O[O.Num=0]="Num",O[O.Str=1]="Str"})(E||(ut.Type=E={}));function T(O,I,k){if(O instanceof e.Name){const D=I===E.Num;return k?D?(0,e._)`"[" + ${O} + "]"`:(0,e._)`"['" + ${O} + "']"`:D?(0,e._)`"/" + ${O}`:(0,e._)`"/" + ${O}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return k?(0,e.getProperty)(O).toString():"/"+m(O)}ut.getErrorPath=T;function C(O,I,k=O.opts.strictSchema){if(k){if(I=`strict mode: ${I}`,k===!0)throw new Error(I);O.self.logger.warn(I)}}return ut.checkStrictMode=C,ut}var bh={},QO;function Bs(){if(QO)return bh;QO=1,Object.defineProperty(bh,"__esModule",{value:!0});const e=ht(),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 bh.default=t,bh}var XO;function Qm(){return XO||(XO=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=ht(),n=Rt(),r=Bs();e.keywordError={message:({keyword:b})=>(0,t.str)`must pass "${b}" keyword validation`},e.keyword$DataError={message:({keyword:b,schemaType:R})=>R?(0,t.str)`"${b}" keyword must be ${R} ($data)`:(0,t.str)`"${b}" keyword is invalid ($data)`};function a(b,R=e.keywordError,E,T){const{it:C}=b,{gen:O,compositeRule:I,allErrors:k}=C,D=p(b,R,E);T??(I||k)?d(O,D):f(C,(0,t._)`[${D}]`)}e.reportError=a;function i(b,R=e.keywordError,E){const{it:T}=b,{gen:C,compositeRule:O,allErrors:I}=T,k=p(b,R,E);d(C,k),O||I||f(T,r.default.vErrors)}e.reportExtraError=i;function c(b,R){b.assign(r.default.errors,R),b.if((0,t._)`${r.default.vErrors} !== null`,()=>b.if(R,()=>b.assign((0,t._)`${r.default.vErrors}.length`,R),()=>b.assign(r.default.vErrors,null)))}e.resetErrorsCount=c;function u({gen:b,keyword:R,schemaValue:E,data:T,errsCount:C,it:O}){if(C===void 0)throw new Error("ajv implementation error");const I=b.name("err");b.forRange("i",C,r.default.errors,k=>{b.const(I,(0,t._)`${r.default.vErrors}[${k}]`),b.if((0,t._)`${I}.instancePath === undefined`,()=>b.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(r.default.instancePath,O.errorPath))),b.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${O.errSchemaPath}/${R}`),O.opts.verbose&&(b.assign((0,t._)`${I}.schema`,E),b.assign((0,t._)`${I}.data`,T))})}e.extendErrors=u;function d(b,R){const E=b.const("err",R);b.if((0,t._)`${r.default.vErrors} === null`,()=>b.assign(r.default.vErrors,(0,t._)`[${E}]`),(0,t._)`${r.default.vErrors}.push(${E})`),b.code((0,t._)`${r.default.errors}++`)}function f(b,R){const{gen:E,validateName:T,schemaEnv:C}=b;C.$async?E.throw((0,t._)`new ${b.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(b,R,E){const{createErrors:T}=b.it;return T===!1?(0,t._)`{}`:g(b,R,E)}function g(b,R,E={}){const{gen:T,it:C}=b,O=[y(C,E),w(b,E)];return S(b,R,O),T.object(...O)}function y({errorPath:b},{instancePath:R}){const E=R?(0,t.str)`${b}${(0,n.getErrorPath)(R,n.Type.Str)}`:b;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,E)]}function w({keyword:b,it:{errSchemaPath:R}},{schemaPath:E,parentSchema:T}){let C=T?R:(0,t.str)`${R}/${b}`;return E&&(C=(0,t.str)`${C}${(0,n.getErrorPath)(E,n.Type.Str)}`),[m.schemaPath,C]}function S(b,{params:R,message:E},T){const{keyword:C,data:O,schemaValue:I,it:k}=b,{opts:D,propertyName:z,topSchemaRef:Y,schemaPath:V}=k;T.push([m.keyword,C],[m.params,typeof R=="function"?R(b):R||(0,t._)`{}`]),D.messages&&T.push([m.message,typeof E=="function"?E(b):E]),D.verbose&&T.push([m.schema,I],[m.parentSchema,(0,t._)`${Y}${V}`],[r.default.data,O]),z&&T.push([m.propertyName,z])}})(R0)),R0}var JO;function ZX(){if(JO)return mi;JO=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.boolOrEmptySchema=mi.topBoolOrEmptySchema=void 0;const e=Qm(),t=ht(),n=Bs(),r={message:"boolean schema is false"};function a(u){const{gen:d,schema:f,validateName:m}=u;f===!1?c(u,!1):typeof f=="object"&&f.$async===!0?d.return(n.default.data):(d.assign((0,t._)`${m}.errors`,null),d.return(!0))}mi.topBoolOrEmptySchema=a;function i(u,d){const{gen:f,schema:m}=u;m===!1?(f.var(d,!1),c(u)):f.var(d,!0)}mi.boolOrEmptySchema=i;function c(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 mi}var Hn={},gi={},e2;function jM(){if(e2)return gi;e2=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.getRules=gi.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)}gi.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 gi.getRules=r,gi}var Ia={},t2;function $M(){if(t2)return Ia;t2=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.shouldUseRule=Ia.shouldUseGroup=Ia.schemaHasRulesForType=void 0;function e({schema:r,self:a},i){const c=a.RULES.types[i];return c&&c!==!0&&t(r,c)}Ia.schemaHasRulesForType=e;function t(r,a){return a.rules.some(i=>n(r,i))}Ia.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(c=>r[c]!==void 0))}return Ia.shouldUseRule=n,Ia}var n2;function rm(){if(n2)return Hn;n2=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.reportTypeError=Hn.checkDataTypes=Hn.checkDataType=Hn.coerceAndCheckDataType=Hn.getJSONTypes=Hn.getSchemaTypes=Hn.DataType=void 0;const e=jM(),t=$M(),n=Qm(),r=ht(),a=Rt();var i;(function(E){E[E.Correct=0]="Correct",E[E.Wrong=1]="Wrong"})(i||(Hn.DataType=i={}));function c(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}Hn.getSchemaTypes=c;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(","))}Hn.getJSONTypes=u;function d(E,T){const{gen:C,data:O,opts:I}=E,k=m(T,I.coerceTypes),D=T.length>0&&!(k.length===0&&T.length===1&&(0,t.schemaHasRulesForType)(E,T[0]));if(D){const z=w(T,O,I.strictNumbers,i.Wrong);C.if(z,()=>{k.length?p(E,T,k):b(E)})}return D}Hn.coerceAndCheckDataType=d;const f=new Set(["string","number","integer","boolean","null"]);function m(E,T){return T?E.filter(C=>f.has(C)||T==="array"&&C==="array"):[]}function p(E,T,C){const{gen:O,data:I,opts:k}=E,D=O.let("dataType",(0,r._)`typeof ${I}`),z=O.let("coerced",(0,r._)`undefined`);k.coerceTypes==="array"&&O.if((0,r._)`${D} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>O.assign(I,(0,r._)`${I}[0]`).assign(D,(0,r._)`typeof ${I}`).if(w(T,I,k.strictNumbers),()=>O.assign(z,I))),O.if((0,r._)`${z} !== undefined`);for(const V of C)(f.has(V)||V==="array"&&k.coerceTypes==="array")&&Y(V);O.else(),b(E),O.endIf(),O.if((0,r._)`${z} !== undefined`,()=>{O.assign(I,z),g(E,z)});function Y(V){switch(V){case"string":O.elseIf((0,r._)`${D} == "number" || ${D} == "boolean"`).assign(z,(0,r._)`"" + ${I}`).elseIf((0,r._)`${I} === null`).assign(z,(0,r._)`""`);return;case"number":O.elseIf((0,r._)`${D} == "boolean" || ${I} === null
|
|
165
|
+
|| (${D} == "string" && ${I} && ${I} == +${I})`).assign(z,(0,r._)`+${I}`);return;case"integer":O.elseIf((0,r._)`${D} === "boolean" || ${I} === null
|
|
166
|
+
|| (${D} === "string" && ${I} && ${I} == +${I} && !(${I} % 1))`).assign(z,(0,r._)`+${I}`);return;case"boolean":O.elseIf((0,r._)`${I} === "false" || ${I} === 0 || ${I} === null`).assign(z,!1).elseIf((0,r._)`${I} === "true" || ${I} === 1`).assign(z,!0);return;case"null":O.elseIf((0,r._)`${I} === "" || ${I} === 0 || ${I} === false`),O.assign(z,null);return;case"array":O.elseIf((0,r._)`${D} === "string" || ${D} === "number"
|
|
167
|
+
|| ${D} === "boolean" || ${I} === null`).assign(z,(0,r._)`[${I}]`)}}}function g({gen:E,parentData:T,parentDataProperty:C},O){E.if((0,r._)`${T} !== undefined`,()=>E.assign((0,r._)`${T}[${C}]`,O))}function y(E,T,C,O=i.Correct){const I=O===i.Correct?r.operators.EQ:r.operators.NEQ;let k;switch(E){case"null":return(0,r._)`${T} ${I} null`;case"array":k=(0,r._)`Array.isArray(${T})`;break;case"object":k=(0,r._)`${T} && typeof ${T} == "object" && !Array.isArray(${T})`;break;case"integer":k=D((0,r._)`!(${T} % 1) && !isNaN(${T})`);break;case"number":k=D();break;default:return(0,r._)`typeof ${T} ${I} ${E}`}return O===i.Correct?k:(0,r.not)(k);function D(z=r.nil){return(0,r.and)((0,r._)`typeof ${T} == "number"`,z,C?(0,r._)`isFinite(${T})`:r.nil)}}Hn.checkDataType=y;function w(E,T,C,O){if(E.length===1)return y(E[0],T,C,O);let I;const k=(0,a.toHash)(E);if(k.array&&k.object){const D=(0,r._)`typeof ${T} != "object"`;I=k.null?D:(0,r._)`!${T} || ${D}`,delete k.null,delete k.array,delete k.object}else I=r.nil;k.number&&delete k.integer;for(const D in k)I=(0,r.and)(I,y(D,T,C,O));return I}Hn.checkDataTypes=w;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 b(E){const T=R(E);(0,n.reportError)(T,S)}Hn.reportTypeError=b;function R(E){const{gen:T,data:C,schema:O}=E,I=(0,a.schemaRefOrVal)(E,O,"type");return{gen:T,keyword:"type",data:C,schema:O.type,schemaCode:I,schemaValue:I,parentSchema:O,params:{},it:E}}return Hn}var Eu={},r2;function KX(){if(r2)return Eu;r2=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.assignDefaults=void 0;const e=ht(),t=Rt();function n(a,i){const{properties:c,items:u}=a.schema;if(i==="object"&&c)for(const d in c)r(a,d,c[d].default);else i==="array"&&Array.isArray(u)&&u.forEach((d,f)=>r(a,f,d.default))}Eu.assignDefaults=n;function r(a,i,c){const{gen:u,compositeRule:d,data:f,opts:m}=a;if(c===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)(c)}`)}return Eu}var To={},Dt={},o2;function zo(){if(o2)return Dt;o2=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.validateUnion=Dt.validateArray=Dt.usePattern=Dt.callValidateCode=Dt.schemaProperties=Dt.allSchemaProperties=Dt.noPropertyInData=Dt.propertyInData=Dt.isOwnProperty=Dt.hasPropFunc=Dt.reportMissingProp=Dt.checkMissingProp=Dt.checkReportMissingProp=void 0;const e=ht(),t=Rt(),n=Bs(),r=Rt();function a(E,T){const{gen:C,data:O,it:I}=E;C.if(m(C,O,T,I.opts.ownProperties),()=>{E.setParams({missingProperty:(0,e._)`${T}`},!0),E.error()})}Dt.checkReportMissingProp=a;function i({gen:E,data:T,it:{opts:C}},O,I){return(0,e.or)(...O.map(k=>(0,e.and)(m(E,T,k,C.ownProperties),(0,e._)`${I} = ${k}`)))}Dt.checkMissingProp=i;function c(E,T){E.setParams({missingProperty:T},!0),E.error()}Dt.reportMissingProp=c;function u(E){return E.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Dt.hasPropFunc=u;function d(E,T,C){return(0,e._)`${u(E)}.call(${T}, ${C})`}Dt.isOwnProperty=d;function f(E,T,C,O){const I=(0,e._)`${T}${(0,e.getProperty)(C)} !== undefined`;return O?(0,e._)`${I} && ${d(E,T,C)}`:I}Dt.propertyInData=f;function m(E,T,C,O){const I=(0,e._)`${T}${(0,e.getProperty)(C)} === undefined`;return O?(0,e.or)(I,(0,e.not)(d(E,T,C))):I}Dt.noPropertyInData=m;function p(E){return E?Object.keys(E).filter(T=>T!=="__proto__"):[]}Dt.allSchemaProperties=p;function g(E,T){return p(T).filter(C=>!(0,t.alwaysValidSchema)(E,T[C]))}Dt.schemaProperties=g;function y({schemaCode:E,data:T,it:{gen:C,topSchemaRef:O,schemaPath:I,errorPath:k},it:D},z,Y,V){const Z=V?(0,e._)`${E}, ${T}, ${O}${I}`:T,U=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,k)],[n.default.parentData,D.parentData],[n.default.parentDataProperty,D.parentDataProperty],[n.default.rootData,n.default.rootData]];D.opts.dynamicRef&&U.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const J=(0,e._)`${Z}, ${C.object(...U)}`;return Y!==e.nil?(0,e._)`${z}.call(${Y}, ${J})`:(0,e._)`${z}(${J})`}Dt.callValidateCode=y;const w=(0,e._)`new RegExp`;function S({gen:E,it:{opts:T}},C){const O=T.unicodeRegExp?"u":"",{regExp:I}=T.code,k=I(C,O);return E.scopeValue("pattern",{key:k.toString(),ref:k,code:(0,e._)`${I.code==="new RegExp"?w:(0,r.useFunc)(E,I)}(${C}, ${O})`})}Dt.usePattern=S;function b(E){const{gen:T,data:C,keyword:O,it:I}=E,k=T.name("valid");if(I.allErrors){const z=T.let("valid",!0);return D(()=>T.assign(z,!1)),z}return T.var(k,!0),D(()=>T.break()),k;function D(z){const Y=T.const("len",(0,e._)`${C}.length`);T.forRange("i",0,Y,V=>{E.subschema({keyword:O,dataProp:V,dataPropType:t.Type.Num},k),T.if((0,e.not)(k),z)})}}Dt.validateArray=b;function R(E){const{gen:T,schema:C,keyword:O,it:I}=E;if(!Array.isArray(C))throw new Error("ajv implementation error");if(C.some(Y=>(0,t.alwaysValidSchema)(I,Y))&&!I.opts.unevaluated)return;const D=T.let("valid",!1),z=T.name("_valid");T.block(()=>C.forEach((Y,V)=>{const Z=E.subschema({keyword:O,schemaProp:V,compositeRule:!0},z);T.assign(D,(0,e._)`${D} || ${z}`),E.mergeValidEvaluated(Z,z)||T.if((0,e.not)(D))})),E.result(D,()=>E.reset(),()=>E.error(!0))}return Dt.validateUnion=R,Dt}var a2;function WX(){if(a2)return To;a2=1,Object.defineProperty(To,"__esModule",{value:!0}),To.validateKeywordUsage=To.validSchemaType=To.funcKeywordCode=To.macroKeywordCode=void 0;const e=ht(),t=Bs(),n=zo(),r=Qm();function a(g,y){const{gen:w,keyword:S,schema:b,parentSchema:R,it:E}=g,T=y.macro.call(E.self,b,R,E),C=f(w,S,T);E.opts.validateSchema!==!1&&E.self.validateSchema(T,!0);const O=w.name("valid");g.subschema({schema:T,schemaPath:e.nil,errSchemaPath:`${E.errSchemaPath}/${S}`,topSchemaRef:C,compositeRule:!0},O),g.pass(O,()=>g.error(!0))}To.macroKeywordCode=a;function i(g,y){var w;const{gen:S,keyword:b,schema:R,parentSchema:E,$data:T,it:C}=g;d(C,y);const O=!T&&y.compile?y.compile.call(C.self,R,E,C):y.validate,I=f(S,b,O),k=S.let("valid");g.block$data(k,D),g.ok((w=y.valid)!==null&&w!==void 0?w:k);function D(){if(y.errors===!1)V(),y.modifying&&c(g),Z(()=>g.error());else{const U=y.async?z():Y();y.modifying&&c(g),Z(()=>u(g,U))}}function z(){const U=S.let("ruleErrs",null);return S.try(()=>V((0,e._)`await `),J=>S.assign(k,!1).if((0,e._)`${J} instanceof ${C.ValidationError}`,()=>S.assign(U,(0,e._)`${J}.errors`),()=>S.throw(J))),U}function Y(){const U=(0,e._)`${I}.errors`;return S.assign(U,null),V(e.nil),U}function V(U=y.async?(0,e._)`await `:e.nil){const J=C.opts.passContext?t.default.this:t.default.self,ie=!("compile"in y&&!T||y.schema===!1);S.assign(k,(0,e._)`${U}${(0,n.callValidateCode)(g,I,J,ie)}`,y.modifying)}function Z(U){var J;S.if((0,e.not)((J=y.valid)!==null&&J!==void 0?J:k),U)}}To.funcKeywordCode=i;function c(g){const{gen:y,data:w,it:S}=g;y.if(S.parentData,()=>y.assign(w,(0,e._)`${S.parentData}[${S.parentDataProperty}]`))}function u(g,y){const{gen:w}=g;w.if((0,e._)`Array.isArray(${y})`,()=>{w.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,w){if(w===void 0)throw new Error(`keyword "${y}" failed to compile`);return g.scopeValue("keyword",typeof w=="function"?{ref:w}:{ref:w,code:(0,e.stringify)(w)})}function m(g,y,w=!1){return!y.length||y.some(S=>S==="array"?Array.isArray(g):S==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==S||w&&typeof g>"u")}To.validSchemaType=m;function p({schema:g,opts:y,self:w,errSchemaPath:S},b,R){if(Array.isArray(b.keyword)?!b.keyword.includes(R):b.keyword!==R)throw new Error("ajv implementation error");const E=b.dependencies;if(E?.some(T=>!Object.prototype.hasOwnProperty.call(g,T)))throw new Error(`parent schema must have dependencies of ${R}: ${E.join(",")}`);if(b.validateSchema&&!b.validateSchema(g[R])){const C=`keyword "${R}" value is invalid at path "${S}": `+w.errorsText(b.validateSchema.errors);if(y.validateSchema==="log")w.logger.error(C);else throw new Error(C)}}return To.validateKeywordUsage=p,To}var Na={},s2;function YX(){if(s2)return Na;s2=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.extendSubschemaMode=Na.extendSubschemaData=Na.getSubschema=void 0;const e=ht(),t=Rt();function n(i,{keyword:c,schemaProp:u,schema:d,schemaPath:f,errSchemaPath:m,topSchemaRef:p}){if(c!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(c!==void 0){const g=i.schema[c];return u===void 0?{schema:g,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(c)}`,errSchemaPath:`${i.errSchemaPath}/${c}`}:{schema:g[u],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(c)}${(0,e.getProperty)(u)}`,errSchemaPath:`${i.errSchemaPath}/${c}/${(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')}Na.getSubschema=n;function r(i,c,{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}=c;if(u!==void 0){const{errorPath:w,dataPathArr:S,opts:b}=c,R=g.let("data",(0,e._)`${c.data}${(0,e.getProperty)(u)}`,!0);y(R),i.errorPath=(0,e.str)`${w}${(0,t.getErrorPath)(u,d,b.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${u}`,i.dataPathArr=[...S,i.parentDataProperty]}if(f!==void 0){const w=f instanceof e.Name?f:g.let("data",f,!0);y(w),p!==void 0&&(i.propertyName=p)}m&&(i.dataTypes=m);function y(w){i.data=w,i.dataLevel=c.dataLevel+1,i.dataTypes=[],c.definedProperties=new Set,i.parentData=c.data,i.dataNames=[...c.dataNames,w]}}Na.extendSubschemaData=r;function a(i,{jtdDiscriminator:c,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=c,i.jtdMetadata=u}return Na.extendSubschemaMode=a,Na}var cr={},C0,i2;function UM(){return i2||(i2=1,C0=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 c=i[a];if(!e(t[c],n[c]))return!1}return!0}return t!==t&&n!==n}),C0}var A0={exports:{}},c2;function QX(){if(c2)return A0.exports;c2=1;var e=A0.exports=function(r,a,i){typeof a=="function"&&(i=a,a={}),i=a.cb||i;var c=typeof i=="function"?i:i.pre||function(){},u=i.post||function(){};t(a,c,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,c,u,d,f,m,p,g){if(c&&typeof c=="object"&&!Array.isArray(c)){a(c,u,d,f,m,p,g);for(var y in c){var w=c[y];if(Array.isArray(w)){if(y in e.arrayKeywords)for(var S=0;S<w.length;S++)t(r,a,i,w[S],u+"/"+y+"/"+S,d,u,y,c,S)}else if(y in e.propsKeywords){if(w&&typeof w=="object")for(var b in w)t(r,a,i,w[b],u+"/"+y+"/"+n(b),d,u,y,c,b)}else(y in e.keywords||r.allKeys&&!(y in e.skipKeywords))&&t(r,a,i,w,u+"/"+y,d,u,y,c)}i(c,u,d,f,m,p,g)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return A0.exports}var l2;function Xm(){if(l2)return cr;l2=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.getSchemaRefs=cr.resolveUrl=cr.normalizeId=cr._getFullPath=cr.getFullPath=cr.inlineRef=void 0;const e=Rt(),t=UM(),n=QX(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function a(S,b=!0){return typeof S=="boolean"?!0:b===!0?!c(S):b?u(S)<=b:!1}cr.inlineRef=a;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(S){for(const b in S){if(i.has(b))return!0;const R=S[b];if(Array.isArray(R)&&R.some(c)||typeof R=="object"&&c(R))return!0}return!1}function u(S){let b=0;for(const R in S){if(R==="$ref")return 1/0;if(b++,!r.has(R)&&(typeof S[R]=="object"&&(0,e.eachItem)(S[R],E=>b+=u(E)),b===1/0))return 1/0}return b}function d(S,b="",R){R!==!1&&(b=p(b));const E=S.parse(b);return f(S,E)}cr.getFullPath=d;function f(S,b){return S.serialize(b).split("#")[0]+"#"}cr._getFullPath=f;const m=/#\/?$/;function p(S){return S?S.replace(m,""):""}cr.normalizeId=p;function g(S,b,R){return R=p(R),S.resolve(b,R)}cr.resolveUrl=g;const y=/^[a-z_][-a-z0-9._]*$/i;function w(S,b){if(typeof S=="boolean")return{};const{schemaId:R,uriResolver:E}=this.opts,T=p(S[R]||b),C={"":T},O=d(E,T,!1),I={},k=new Set;return n(S,{allKeys:!0},(Y,V,Z,U)=>{if(U===void 0)return;const J=O+V;let ie=C[U];typeof Y[R]=="string"&&(ie=F.call(this,Y[R])),X.call(this,Y.$anchor),X.call(this,Y.$dynamicAnchor),C[V]=ie;function F(ae){const fe=this.opts.uriResolver.resolve;if(ae=p(ie?fe(ie,ae):ae),k.has(ae))throw z(ae);k.add(ae);let K=this.refs[ae];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?D(Y,K.schema,ae):ae!==p(J)&&(ae[0]==="#"?(D(Y,I[ae],ae),I[ae]=Y):this.refs[ae]=J),ae}function X(ae){if(typeof ae=="string"){if(!y.test(ae))throw new Error(`invalid anchor "${ae}"`);F.call(this,`#${ae}`)}}}),I;function D(Y,V,Z){if(V!==void 0&&!t(Y,V))throw z(Z)}function z(Y){return new Error(`reference "${Y}" resolves to more than one schema`)}}return cr.getSchemaRefs=w,cr}var u2;function Jm(){if(u2)return Aa;u2=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.getData=Aa.KeywordCxt=Aa.validateFunctionCode=void 0;const e=ZX(),t=rm(),n=$M(),r=rm(),a=KX(),i=WX(),c=YX(),u=ht(),d=Bs(),f=Xm(),m=Rt(),p=Qm();function g(H){if(O(H)&&(k(H),C(H))){b(H);return}y(H,()=>(0,e.topBoolOrEmptySchema)(H))}Aa.validateFunctionCode=g;function y({gen:H,validateName:ne,schema:be,schemaEnv:pe,opts:ce},Oe){ce.code.es5?H.func(ne,(0,u._)`${d.default.data}, ${d.default.valCxt}`,pe.$async,()=>{H.code((0,u._)`"use strict"; ${E(be,ce)}`),S(H,ce),H.code(Oe)}):H.func(ne,(0,u._)`${d.default.data}, ${w(ce)}`,pe.$async,()=>H.code(E(be,ce)).code(Oe))}function w(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 b(H){const{schema:ne,opts:be,gen:pe}=H;y(H,()=>{be.$comment&&ne.$comment&&U(H),Y(H),pe.let(d.default.vErrors,null),pe.let(d.default.errors,0),be.unevaluated&&R(H),D(H),J(H)})}function R(H){const{gen:ne,validateName:be}=H;H.evaluated=ne.const("evaluated",(0,u._)`${be}.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 be=typeof H=="object"&&H[ne.schemaId];return be&&(ne.code.source||ne.code.process)?(0,u._)`/*# sourceURL=${be} */`:u.nil}function T(H,ne){if(O(H)&&(k(H),C(H))){I(H,ne);return}(0,e.boolOrEmptySchema)(H,ne)}function C({schema:H,self:ne}){if(typeof H=="boolean")return!H;for(const be in H)if(ne.RULES.all[be])return!0;return!1}function O(H){return typeof H.schema!="boolean"}function I(H,ne){const{schema:be,gen:pe,opts:ce}=H;ce.$comment&&be.$comment&&U(H),V(H),Z(H);const Oe=pe.const("_errs",d.default.errors);D(H,Oe),pe.var(ne,(0,u._)`${Oe} === ${d.default.errors}`)}function k(H){(0,m.checkUnknownRules)(H),z(H)}function D(H,ne){if(H.opts.jtd)return F(H,[],!1,ne);const be=(0,t.getSchemaTypes)(H.schema),pe=(0,t.coerceAndCheckDataType)(H,be);F(H,be,!pe,ne)}function z(H){const{schema:ne,errSchemaPath:be,opts:pe,self:ce}=H;ne.$ref&&pe.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(ne,ce.RULES)&&ce.logger.warn(`$ref: keywords ignored in schema at path "${be}"`)}function Y(H){const{schema:ne,opts:be}=H;ne.default!==void 0&&be.useDefaults&&be.strictSchema&&(0,m.checkStrictMode)(H,"default is ignored in the schema root")}function V(H){const ne=H.schema[H.opts.schemaId];ne&&(H.baseId=(0,f.resolveUrl)(H.opts.uriResolver,H.baseId,ne))}function Z(H){if(H.schema.$async&&!H.schemaEnv.$async)throw new Error("async schema in sync schema")}function U({gen:H,schemaEnv:ne,schema:be,errSchemaPath:pe,opts:ce}){const Oe=be.$comment;if(ce.$comment===!0)H.code((0,u._)`${d.default.self}.logger.log(${Oe})`);else if(typeof ce.$comment=="function"){const $e=(0,u.str)`${pe}/$comment`,Ye=H.scopeValue("root",{ref:ne.root});H.code((0,u._)`${d.default.self}.opts.$comment(${Oe}, ${$e}, ${Ye}.schema)`)}}function J(H){const{gen:ne,schemaEnv:be,validateName:pe,ValidationError:ce,opts:Oe}=H;be.$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._)`${pe}.errors`,d.default.vErrors),Oe.unevaluated&&ie(H),ne.return((0,u._)`${d.default.errors} === 0`))}function ie({gen:H,evaluated:ne,props:be,items:pe}){be instanceof u.Name&&H.assign((0,u._)`${ne}.props`,be),pe instanceof u.Name&&H.assign((0,u._)`${ne}.items`,pe)}function F(H,ne,be,pe){const{gen:ce,schema:Oe,data:$e,allErrors:Ye,opts:He,self:Xe}=H,{RULES:G}=Xe;if(Oe.$ref&&(He.ignoreKeywordsWithRef||!(0,m.schemaHasRulesButRef)(Oe,G))){ce.block(()=>me(H,"$ref",G.all.$ref.definition));return}He.jtd||ae(H,ne),ce.block(()=>{for(const oe of G.rules)te(oe);te(G.post)});function te(oe){(0,n.shouldUseGroup)(Oe,oe)&&(oe.type?(ce.if((0,r.checkDataType)(oe.type,$e,He.strictNumbers)),X(H,oe),ne.length===1&&ne[0]===oe.type&&be&&(ce.else(),(0,r.reportTypeError)(H)),ce.endIf()):X(H,oe),Ye||ce.if((0,u._)`${d.default.errors} === ${pe||0}`))}}function X(H,ne){const{gen:be,schema:pe,opts:{useDefaults:ce}}=H;ce&&(0,a.assignDefaults)(H,ne.type),be.block(()=>{for(const Oe of ne.rules)(0,n.shouldUseRule)(pe,Oe)&&me(H,Oe.keyword,Oe.definition,ne.type)})}function ae(H,ne){H.schemaEnv.meta||!H.opts.strictTypes||(fe(H,ne),H.opts.allowUnionTypes||K(H,ne),P(H,H.dataTypes))}function fe(H,ne){if(ne.length){if(!H.dataTypes.length){H.dataTypes=ne;return}ne.forEach(be=>{q(H.dataTypes,be)||$(H,`type "${be}" not allowed by context "${H.dataTypes.join(",")}"`)}),L(H,ne)}}function K(H,ne){ne.length>1&&!(ne.length===2&&ne.includes("null"))&&$(H,"use allowUnionTypes to allow union type keyword")}function P(H,ne){const be=H.self.RULES.all;for(const pe in be){const ce=be[pe];if(typeof ce=="object"&&(0,n.shouldUseRule)(H.schema,ce)){const{type:Oe}=ce.definition;Oe.length&&!Oe.some($e=>B(ne,$e))&&$(H,`missing type "${Oe.join(",")}" for keyword "${pe}"`)}}}function B(H,ne){return H.includes(ne)||ne==="number"&&H.includes("integer")}function q(H,ne){return H.includes(ne)||ne==="integer"&&H.includes("number")}function L(H,ne){const be=[];for(const pe of H.dataTypes)q(ne,pe)?be.push(pe):ne.includes("integer")&&pe==="number"&&be.push("integer");H.dataTypes=be}function $(H,ne){const be=H.schemaEnv.baseId+H.errSchemaPath;ne+=` at "${be}" (strictTypes)`,(0,m.checkStrictMode)(H,ne,H.opts.strictTypes)}class Q{constructor(ne,be,pe){if((0,i.validateKeywordUsage)(ne,be,pe),this.gen=ne.gen,this.allErrors=ne.allErrors,this.keyword=pe,this.data=ne.data,this.schema=ne.schema[pe],this.$data=be.$data&&ne.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(ne,this.schema,pe,this.$data),this.schemaType=be.schemaType,this.parentSchema=ne.schema,this.params={},this.it=ne,this.def=be,this.$data)this.schemaCode=ne.gen.const("vSchema",Ne(this.$data,ne));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,be.schemaType,be.allowUndefined))throw new Error(`${pe} value must be ${JSON.stringify(be.schemaType)}`);("code"in be?be.trackErrors:be.errors!==!1)&&(this.errsCount=ne.gen.const("_errs",d.default.errors))}result(ne,be,pe){this.failResult((0,u.not)(ne),be,pe)}failResult(ne,be,pe){this.gen.if(ne),pe?pe():this.error(),be?(this.gen.else(),be(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ne,be){this.failResult((0,u.not)(ne),void 0,be)}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:be}=this;this.fail((0,u._)`${be} !== undefined && (${(0,u.or)(this.invalid$data(),ne)})`)}error(ne,be,pe){if(be){this.setParams(be),this._error(ne,pe),this.setParams({});return}this._error(ne,pe)}_error(ne,be){(ne?p.reportExtraError:p.reportError)(this,this.def.error,be)}$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,be){be?Object.assign(this.params,ne):this.params=ne}block$data(ne,be,pe=u.nil){this.gen.block(()=>{this.check$data(ne,pe),be()})}check$data(ne=u.nil,be=u.nil){if(!this.$data)return;const{gen:pe,schemaCode:ce,schemaType:Oe,def:$e}=this;pe.if((0,u.or)((0,u._)`${ce} === undefined`,be)),ne!==u.nil&&pe.assign(ne,!0),(Oe.length||$e.validateSchema)&&(pe.elseIf(this.invalid$data()),this.$dataError(),ne!==u.nil&&pe.assign(ne,!1)),pe.else()}invalid$data(){const{gen:ne,schemaCode:be,schemaType:pe,def:ce,it:Oe}=this;return(0,u.or)($e(),Ye());function $e(){if(pe.length){if(!(be instanceof u.Name))throw new Error("ajv implementation error");const He=Array.isArray(pe)?pe:[pe];return(0,u._)`${(0,r.checkDataTypes)(He,be,Oe.opts.strictNumbers,r.DataType.Wrong)}`}return u.nil}function Ye(){if(ce.validateSchema){const He=ne.scopeValue("validate$data",{ref:ce.validateSchema});return(0,u._)`!${He}(${be})`}return u.nil}}subschema(ne,be){const pe=(0,c.getSubschema)(this.it,ne);(0,c.extendSubschemaData)(pe,this.it,ne),(0,c.extendSubschemaMode)(pe,ne);const ce={...this.it,...pe,items:void 0,props:void 0};return T(ce,be),ce}mergeEvaluated(ne,be){const{it:pe,gen:ce}=this;pe.opts.unevaluated&&(pe.props!==!0&&ne.props!==void 0&&(pe.props=m.mergeEvaluated.props(ce,ne.props,pe.props,be)),pe.items!==!0&&ne.items!==void 0&&(pe.items=m.mergeEvaluated.items(ce,ne.items,pe.items,be)))}mergeValidEvaluated(ne,be){const{it:pe,gen:ce}=this;if(pe.opts.unevaluated&&(pe.props!==!0||pe.items!==!0))return ce.if(be,()=>this.mergeEvaluated(ne,u.Name)),!0}}Aa.KeywordCxt=Q;function me(H,ne,be,pe){const ce=new Q(H,be,ne);"code"in be?be.code(ce,pe):ce.$data&&be.validate?(0,i.funcKeywordCode)(ce,be):"macro"in be?(0,i.macroKeywordCode)(ce,be):(be.compile||be.validate)&&(0,i.funcKeywordCode)(ce,be)}const _e=/^\/(?:[^~]|~0|~1)*$/,Ae=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ne(H,{dataLevel:ne,dataNames:be,dataPathArr:pe}){let ce,Oe;if(H==="")return d.default.rootData;if(H[0]==="/"){if(!_e.test(H))throw new Error(`Invalid JSON-pointer: ${H}`);ce=H,Oe=d.default.rootData}else{const Xe=Ae.exec(H);if(!Xe)throw new Error(`Invalid JSON-pointer: ${H}`);const G=+Xe[1];if(ce=Xe[2],ce==="#"){if(G>=ne)throw new Error(He("property/index",G));return pe[ne-G]}if(G>ne)throw new Error(He("data",G));if(Oe=be[ne-G],!ce)return Oe}let $e=Oe;const Ye=ce.split("/");for(const Xe of Ye)Xe&&(Oe=(0,u._)`${Oe}${(0,u.getProperty)((0,m.unescapeJsonPointer)(Xe))}`,$e=(0,u._)`${$e} && ${Oe}`);return $e;function He(Xe,G){return`Cannot access ${Xe} ${G} levels up, current level is ${ne}`}}return Aa.getData=Ne,Aa}var wh={},d2;function U1(){if(d2)return wh;d2=1,Object.defineProperty(wh,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return wh.default=e,wh}var Sh={},f2;function eg(){if(f2)return Sh;f2=1,Object.defineProperty(Sh,"__esModule",{value:!0});const e=Xm();class t extends Error{constructor(r,a,i,c){super(c||`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 Sh.default=t,Sh}var zr={},h2;function z1(){if(h2)return zr;h2=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.resolveSchema=zr.getCompilingSchema=zr.resolveRef=zr.compileSchema=zr.SchemaEnv=void 0;const e=ht(),t=U1(),n=Bs(),r=Xm(),a=Rt(),i=Jm();class c{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={}}}zr.SchemaEnv=c;function u(b){const R=m.call(this,b);if(R)return R;const E=(0,r.getFullPath)(this.opts.uriResolver,b.root.baseId),{es5:T,lines:C}=this.opts.code,{ownProperties:O}=this.opts,I=new e.CodeGen(this.scope,{es5:T,lines:C,ownProperties:O});let k;b.$async&&(k=I.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const D=I.scopeName("validate");b.validateName=D;const z={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:b.schema,code:(0,e.stringify)(b.schema)}:{ref:b.schema}),validateName:D,ValidationError:k,schema:b.schema,schemaEnv:b,rootId:E,baseId:b.baseId||E,schemaPath:e.nil,errSchemaPath:b.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let Y;try{this._compilations.add(b),(0,i.validateFunctionCode)(z),I.optimize(this.opts.code.optimize);const V=I.toString();Y=`${I.scopeRefs(n.default.scope)}return ${V}`,this.opts.code.process&&(Y=this.opts.code.process(Y,b));const U=new Function(`${n.default.self}`,`${n.default.scope}`,Y)(this,this.scope.get());if(this.scope.value(D,{ref:U}),U.errors=null,U.schema=b.schema,U.schemaEnv=b,b.$async&&(U.$async=!0),this.opts.code.source===!0&&(U.source={validateName:D,validateCode:V,scopeValues:I._values}),this.opts.unevaluated){const{props:J,items:ie}=z;U.evaluated={props:J instanceof e.Name?void 0:J,items:ie instanceof e.Name?void 0:ie,dynamicProps:J instanceof e.Name,dynamicItems:ie instanceof e.Name},U.source&&(U.source.evaluated=(0,e.stringify)(U.evaluated))}return b.validate=U,b}catch(V){throw delete b.validate,delete b.validateName,Y&&this.logger.error("Error compiling schema, function code:",Y),V}finally{this._compilations.delete(b)}}zr.compileSchema=u;function d(b,R,E){var T;E=(0,r.resolveUrl)(this.opts.uriResolver,R,E);const C=b.refs[E];if(C)return C;let O=g.call(this,b,E);if(O===void 0){const I=(T=b.localRefs)===null||T===void 0?void 0:T[E],{schemaId:k}=this.opts;I&&(O=new c({schema:I,schemaId:k,root:b,baseId:R}))}if(O!==void 0)return b.refs[E]=f.call(this,O)}zr.resolveRef=d;function f(b){return(0,r.inlineRef)(b.schema,this.opts.inlineRefs)?b.schema:b.validate?b:u.call(this,b)}function m(b){for(const R of this._compilations)if(p(R,b))return R}zr.getCompilingSchema=m;function p(b,R){return b.schema===R.schema&&b.root===R.root&&b.baseId===R.baseId}function g(b,R){let E;for(;typeof(E=this.refs[R])=="string";)R=E;return E||this.schemas[R]||y.call(this,b,R)}function y(b,R){const E=this.opts.uriResolver.parse(R),T=(0,r._getFullPath)(this.opts.uriResolver,E);let C=(0,r.getFullPath)(this.opts.uriResolver,b.baseId,void 0);if(Object.keys(b.schema).length>0&&T===C)return S.call(this,E,b);const O=(0,r.normalizeId)(T),I=this.refs[O]||this.schemas[O];if(typeof I=="string"){const k=y.call(this,b,I);return typeof k?.schema!="object"?void 0:S.call(this,E,k)}if(typeof I?.schema=="object"){if(I.validate||u.call(this,I),O===(0,r.normalizeId)(R)){const{schema:k}=I,{schemaId:D}=this.opts,z=k[D];return z&&(C=(0,r.resolveUrl)(this.opts.uriResolver,C,z)),new c({schema:k,schemaId:D,root:b,baseId:C})}return S.call(this,E,I)}}zr.resolveSchema=y;const w=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(b,{baseId:R,schema:E,root:T}){var C;if(((C=b.fragment)===null||C===void 0?void 0:C[0])!=="/")return;for(const k of b.fragment.slice(1).split("/")){if(typeof E=="boolean")return;const D=E[(0,a.unescapeFragment)(k)];if(D===void 0)return;E=D;const z=typeof E=="object"&&E[this.opts.schemaId];!w.has(k)&&z&&(R=(0,r.resolveUrl)(this.opts.uriResolver,R,z))}let O;if(typeof E!="boolean"&&E.$ref&&!(0,a.schemaHasRulesButRef)(E,this.RULES)){const k=(0,r.resolveUrl)(this.opts.uriResolver,R,E.$ref);O=y.call(this,T,k)}const{schemaId:I}=this.opts;if(O=O||new c({schema:E,schemaId:I,root:T,baseId:R}),O.schema!==O.root.schema)return O}return zr}const XX="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",JX="Meta-schema for $data reference (JSON AnySchema extension proposal)",eJ="object",tJ=["$data"],nJ={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},rJ=!1,oJ={$id:XX,description:JX,type:eJ,required:tJ,properties:nJ,additionalProperties:rJ};var Eh={},Ru={exports:{}},I0,p2;function zM(){if(p2)return I0;p2=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="",w=0,S=0;for(S=0;S<g.length;S++)if(w=g[S].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";y+=g[S];break}for(S+=1;S<g.length;S++){if(w=g[S].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=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,w){if(g.length){const S=n(g);if(S!=="")y.push(S);else return w.error=!0,!1;g.length=0}return!0}function c(g){let y=0;const w={error:!1,address:"",zone:""},S=[],b=[];let R=!1,E=!1,T=i;for(let C=0;C<g.length;C++){const O=g[C];if(!(O==="["||O==="]"))if(O===":"){if(R===!0&&(E=!0),!T(b,S,w))break;if(++y>7){w.error=!0;break}C>0&&g[C-1]===":"&&(R=!0),S.push(":");continue}else if(O==="%"){if(!T(b,S,w))break;T=a}else{b.push(O);continue}}return b.length&&(T===a?w.zone=b.join(""):E?S.push(b.join("")):S.push(n(b))),w.address=S.join(""),w}function u(g){if(d(g,":")<2)return{host:g,isIPV6:!1};const y=c(g);if(y.error)return{host:g,isIPV6:!1};{let w=y.address,S=y.address;return y.zone&&(w+="%"+y.zone,S+="%25"+y.zone),{host:w,isIPV6:!0,escapedHost:S}}}function d(g,y){let w=0;for(let S=0;S<g.length;S++)g[S]===y&&w++;return w}function f(g){let y=g;const w=[];let S=-1,b=0;for(;b=y.length;){if(b===1){if(y===".")break;if(y==="/"){w.push("/");break}else{w.push(y);break}}else if(b===2){if(y[0]==="."){if(y[1]===".")break;if(y[1]==="/"){y=y.slice(2);continue}}else if(y[0]==="/"&&(y[1]==="."||y[1]==="/")){w.push("/");break}}else if(b===3&&y==="/.."){w.length!==0&&w.pop(),w.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),w.length!==0&&w.pop();continue}}if((S=y.indexOf("/",1))===-1){w.push(y);break}else w.push(y.slice(0,S)),y=y.slice(S)}return w.join("")}function m(g,y){const w=y!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=w(g.scheme)),g.userinfo!==void 0&&(g.userinfo=w(g.userinfo)),g.host!==void 0&&(g.host=w(g.host)),g.path!==void 0&&(g.path=w(g.path)),g.query!==void 0&&(g.query=w(g.query)),g.fragment!==void 0&&(g.fragment=w(g.fragment)),g}function p(g){const y=[];if(g.userinfo!==void 0&&(y.push(g.userinfo),y.push("@")),g.host!==void 0){let w=unescape(g.host);if(!t(w)){const S=u(w);S.isIPV6===!0?w=`[${S.escapedHost}]`:w=g.host}y.push(w)}return(typeof g.port=="number"||typeof g.port=="string")&&(y.push(":"),y.push(String(g.port))),y.length?y.join(""):void 0}return I0={nonSimpleDomain:r,recomposeAuthority:p,normalizeComponentEncoding:m,removeDotSegments:f,isIPv4:t,isUUID:e,normalizeIPv6:u,stringArrayToHexStripped:n},I0}var N0,m2;function aJ(){if(m2)return N0;m2=1;const{isUUID:e}=zM(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(O){return n.indexOf(O)!==-1}function a(O){return O.secure===!0?!0:O.secure===!1?!1:O.scheme?O.scheme.length===3&&(O.scheme[0]==="w"||O.scheme[0]==="W")&&(O.scheme[1]==="s"||O.scheme[1]==="S")&&(O.scheme[2]==="s"||O.scheme[2]==="S"):!1}function i(O){return O.host||(O.error=O.error||"HTTP URIs must have a host."),O}function c(O){const I=String(O.scheme).toLowerCase()==="https";return(O.port===(I?443:80)||O.port==="")&&(O.port=void 0),O.path||(O.path="/"),O}function u(O){return O.secure=a(O),O.resourceName=(O.path||"/")+(O.query?"?"+O.query:""),O.path=void 0,O.query=void 0,O}function d(O){if((O.port===(a(O)?443:80)||O.port==="")&&(O.port=void 0),typeof O.secure=="boolean"&&(O.scheme=O.secure?"wss":"ws",O.secure=void 0),O.resourceName){const[I,k]=O.resourceName.split("?");O.path=I&&I!=="/"?I:void 0,O.query=k,O.resourceName=void 0}return O.fragment=void 0,O}function f(O,I){if(!O.path)return O.error="URN can not be parsed",O;const k=O.path.match(t);if(k){const D=I.scheme||O.scheme||"urn";O.nid=k[1].toLowerCase(),O.nss=k[2];const z=`${D}:${I.nid||O.nid}`,Y=C(z);O.path=void 0,Y&&(O=Y.parse(O,I))}else O.error=O.error||"URN can not be parsed.";return O}function m(O,I){if(O.nid===void 0)throw new Error("URN without nid cannot be serialized");const k=I.scheme||O.scheme||"urn",D=O.nid.toLowerCase(),z=`${k}:${I.nid||D}`,Y=C(z);Y&&(O=Y.serialize(O,I));const V=O,Z=O.nss;return V.path=`${D||I.nid}:${Z}`,I.skipEscape=!0,V}function p(O,I){const k=O;return k.uuid=k.nss,k.nss=void 0,!I.tolerant&&(!k.uuid||!e(k.uuid))&&(k.error=k.error||"UUID is not valid."),k}function g(O){const I=O;return I.nss=(O.uuid||"").toLowerCase(),I}const y={scheme:"http",domainHost:!0,parse:i,serialize:c},w={scheme:"https",domainHost:y.domainHost,parse:i,serialize:c},S={scheme:"ws",domainHost:!0,parse:u,serialize:d},b={scheme:"wss",domainHost:S.domainHost,parse:S.parse,serialize:S.serialize},T={http:y,https:w,ws:S,wss:b,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 C(O){return O&&(T[O]||T[O.toLowerCase()])||void 0}return N0={wsIsSecure:a,SCHEMES:T,isValidSchemeName:r,getSchemeHandler:C},N0}var g2;function sJ(){if(g2)return Ru.exports;g2=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:a,nonSimpleDomain:i}=zM(),{SCHEMES:c,getSchemeHandler:u}=aJ();function d(b,R){return typeof b=="string"?b=g(w(b,R),R):typeof b=="object"&&(b=w(g(b,R),R)),b}function f(b,R,E){const T=E?Object.assign({scheme:"null"},E):{scheme:"null"},C=m(w(b,T),w(R,T),T,!0);return T.skipEscape=!0,g(C,T)}function m(b,R,E,T){const C={};return T||(b=w(g(b,E),E),R=w(g(R,E),E)),E=E||{},!E.tolerant&&R.scheme?(C.scheme=R.scheme,C.userinfo=R.userinfo,C.host=R.host,C.port=R.port,C.path=t(R.path||""),C.query=R.query):(R.userinfo!==void 0||R.host!==void 0||R.port!==void 0?(C.userinfo=R.userinfo,C.host=R.host,C.port=R.port,C.path=t(R.path||""),C.query=R.query):(R.path?(R.path[0]==="/"?C.path=t(R.path):((b.userinfo!==void 0||b.host!==void 0||b.port!==void 0)&&!b.path?C.path="/"+R.path:b.path?C.path=b.path.slice(0,b.path.lastIndexOf("/")+1)+R.path:C.path=R.path,C.path=t(C.path)),C.query=R.query):(C.path=b.path,R.query!==void 0?C.query=R.query:C.query=b.query),C.userinfo=b.userinfo,C.host=b.host,C.port=b.port),C.scheme=b.scheme),C.fragment=R.fragment,C}function p(b,R,E){return typeof b=="string"?(b=unescape(b),b=g(r(w(b,E),!0),{...E,skipEscape:!0})):typeof b=="object"&&(b=g(r(b,!0),{...E,skipEscape:!0})),typeof R=="string"?(R=unescape(R),R=g(r(w(R,E),!0),{...E,skipEscape:!0})):typeof R=="object"&&(R=g(r(R,!0),{...E,skipEscape:!0})),b.toLowerCase()===R.toLowerCase()}function g(b,R){const E={host:b.host,scheme:b.scheme,userinfo:b.userinfo,port:b.port,path:b.path,query:b.query,nid:b.nid,nss:b.nss,uuid:b.uuid,fragment:b.fragment,reference:b.reference,resourceName:b.resourceName,secure:b.secure,error:""},T=Object.assign({},R),C=[],O=u(T.scheme||E.scheme);O&&O.serialize&&O.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&&C.push(E.scheme,":");const I=n(E);if(I!==void 0&&(T.reference!=="suffix"&&C.push("//"),C.push(I),E.path&&E.path[0]!=="/"&&C.push("/")),E.path!==void 0){let k=E.path;!T.absolutePath&&(!O||!O.absolutePath)&&(k=t(k)),I===void 0&&k[0]==="/"&&k[1]==="/"&&(k="/%2F"+k.slice(2)),C.push(k)}return E.query!==void 0&&C.push("?",E.query),E.fragment!==void 0&&C.push("#",E.fragment),C.join("")}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function w(b,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 C=!1;E.reference==="suffix"&&(E.scheme?b=E.scheme+":"+b:b="//"+b);const O=b.match(y);if(O){if(T.scheme=O[1],T.userinfo=O[3],T.host=O[4],T.port=parseInt(O[5],10),T.path=O[6]||"",T.query=O[7],T.fragment=O[8],isNaN(T.port)&&(T.port=O[5]),T.host)if(a(T.host)===!1){const D=e(T.host);T.host=D.host.toLowerCase(),C=D.isIPV6}else C=!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)&&C===!1&&i(T.host))try{T.host=URL.domainToASCII(T.host.toLowerCase())}catch(k){T.error=T.error||"Host's domain name can not be converted to ASCII: "+k}(!I||I&&!I.skipNormalize)&&(b.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:c,normalize:d,resolve:f,resolveComponent:m,equal:p,serialize:g,parse:w};return Ru.exports=S,Ru.exports.default=S,Ru.exports.fastUri=S,Ru.exports}var v2;function iJ(){if(v2)return Eh;v2=1,Object.defineProperty(Eh,"__esModule",{value:!0});const e=sJ();return e.code='require("ajv/dist/runtime/uri").default',Eh.default=e,Eh}var y2;function cJ(){return y2||(y2=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=Jm();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=ht();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=U1(),a=eg(),i=jM(),c=z1(),u=ht(),d=Xm(),f=rm(),m=Rt(),p=oJ,g=iJ(),y=(K,P)=>new RegExp(K,P);y.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={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(K){var P,B,q,L,$,Q,me,_e,Ae,Ne,H,ne,be,pe,ce,Oe,$e,Ye,He,Xe,G,te,oe,Se,Te;const Re=K.strict,ke=(P=K.code)===null||P===void 0?void 0:P.optimize,rt=ke===!0||ke===void 0?1:ke||0,st=(q=(B=K.code)===null||B===void 0?void 0:B.regExp)!==null&&q!==void 0?q:y,kt=(L=K.uriResolver)!==null&&L!==void 0?L:g.default;return{strictSchema:(Q=($=K.strictSchema)!==null&&$!==void 0?$:Re)!==null&&Q!==void 0?Q:!0,strictNumbers:(_e=(me=K.strictNumbers)!==null&&me!==void 0?me:Re)!==null&&_e!==void 0?_e:!0,strictTypes:(Ne=(Ae=K.strictTypes)!==null&&Ae!==void 0?Ae:Re)!==null&&Ne!==void 0?Ne:"log",strictTuples:(ne=(H=K.strictTuples)!==null&&H!==void 0?H:Re)!==null&&ne!==void 0?ne:"log",strictRequired:(pe=(be=K.strictRequired)!==null&&be!==void 0?be:Re)!==null&&pe!==void 0?pe:!1,code:K.code?{...K.code,optimize:rt,regExp:st}:{optimize:rt,regExp:st},loopRequired:(ce=K.loopRequired)!==null&&ce!==void 0?ce:E,loopEnum:(Oe=K.loopEnum)!==null&&Oe!==void 0?Oe:E,meta:($e=K.meta)!==null&&$e!==void 0?$e:!0,messages:(Ye=K.messages)!==null&&Ye!==void 0?Ye:!0,inlineRefs:(He=K.inlineRefs)!==null&&He!==void 0?He:!0,schemaId:(Xe=K.schemaId)!==null&&Xe!==void 0?Xe:"$id",addUsedSchema:(G=K.addUsedSchema)!==null&&G!==void 0?G:!0,validateSchema:(te=K.validateSchema)!==null&&te!==void 0?te:!0,validateFormats:(oe=K.validateFormats)!==null&&oe!==void 0?oe:!0,unicodeRegExp:(Se=K.unicodeRegExp)!==null&&Se!==void 0?Se:!0,int32range:(Te=K.int32range)!==null&&Te!==void 0?Te:!0,uriResolver:kt}}class C{constructor(P={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,P=this.opts={...P,...T(P)};const{es5:B,lines:q}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:S,es5:B,lines:q}),this.logger=Z(P.logger);const L=P.validateFormats;P.validateFormats=!1,this.RULES=(0,i.getRules)(),O.call(this,b,P,"NOT SUPPORTED"),O.call(this,R,P,"DEPRECATED","warn"),this._metaOpts=Y.call(this),P.formats&&D.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),P.keywords&&z.call(this,P.keywords),typeof P.meta=="object"&&this.addMetaSchema(P.meta),k.call(this),P.validateFormats=L}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:P,meta:B,schemaId:q}=this.opts;let L=p;q==="id"&&(L={...p},L.id=L.$id,delete L.$id),B&&P&&this.addMetaSchema(L,L[q],!1)}defaultMeta(){const{meta:P,schemaId:B}=this.opts;return this.opts.defaultMeta=typeof P=="object"?P[B]||P:void 0}validate(P,B){let q;if(typeof P=="string"){if(q=this.getSchema(P),!q)throw new Error(`no schema with key or ref "${P}"`)}else q=this.compile(P);const L=q(B);return"$async"in q||(this.errors=q.errors),L}compile(P,B){const q=this._addSchema(P,B);return q.validate||this._compileSchemaEnv(q)}compileAsync(P,B){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:q}=this.opts;return L.call(this,P,B);async function L(Ne,H){await $.call(this,Ne.$schema);const ne=this._addSchema(Ne,H);return ne.validate||Q.call(this,ne)}async function $(Ne){Ne&&!this.getSchema(Ne)&&await L.call(this,{$ref:Ne},!0)}async function Q(Ne){try{return this._compileSchemaEnv(Ne)}catch(H){if(!(H instanceof a.default))throw H;return me.call(this,H),await _e.call(this,H.missingSchema),Q.call(this,Ne)}}function me({missingSchema:Ne,missingRef:H}){if(this.refs[Ne])throw new Error(`AnySchema ${Ne} is loaded but ${H} cannot be resolved`)}async function _e(Ne){const H=await Ae.call(this,Ne);this.refs[Ne]||await $.call(this,H.$schema),this.refs[Ne]||this.addSchema(H,Ne,B)}async function Ae(Ne){const H=this._loading[Ne];if(H)return H;try{return await(this._loading[Ne]=q(Ne))}finally{delete this._loading[Ne]}}}addSchema(P,B,q,L=this.opts.validateSchema){if(Array.isArray(P)){for(const Q of P)this.addSchema(Q,void 0,q,L);return this}let $;if(typeof P=="object"){const{schemaId:Q}=this.opts;if($=P[Q],$!==void 0&&typeof $!="string")throw new Error(`schema ${Q} must be string`)}return B=(0,d.normalizeId)(B||$),this._checkUnique(B),this.schemas[B]=this._addSchema(P,q,B,L,!0),this}addMetaSchema(P,B,q=this.opts.validateSchema){return this.addSchema(P,B,!0,q),this}validateSchema(P,B){if(typeof P=="boolean")return!0;let q;if(q=P.$schema,q!==void 0&&typeof q!="string")throw new Error("$schema must be a string");if(q=q||this.opts.defaultMeta||this.defaultMeta(),!q)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const L=this.validate(q,P);if(!L&&B){const $="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error($);else throw new Error($)}return L}getSchema(P){let B;for(;typeof(B=I.call(this,P))=="string";)P=B;if(B===void 0){const{schemaId:q}=this.opts,L=new c.SchemaEnv({schema:{},schemaId:q});if(B=c.resolveSchema.call(this,L,P),!B)return;this.refs[P]=B}return B.validate||this._compileSchemaEnv(B)}removeSchema(P){if(P instanceof RegExp)return this._removeAllSchemas(this.schemas,P),this._removeAllSchemas(this.refs,P),this;switch(typeof P){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const B=I.call(this,P);return typeof B=="object"&&this._cache.delete(B.schema),delete this.schemas[P],delete this.refs[P],this}case"object":{const B=P;this._cache.delete(B);let q=P[this.opts.schemaId];return q&&(q=(0,d.normalizeId)(q),delete this.schemas[q],delete this.refs[q]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(P){for(const B of P)this.addKeyword(B);return this}addKeyword(P,B){let q;if(typeof P=="string")q=P,typeof B=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),B.keyword=q);else if(typeof P=="object"&&B===void 0){if(B=P,q=B.keyword,Array.isArray(q)&&!q.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(J.call(this,q,B),!B)return(0,m.eachItem)(q,$=>ie.call(this,$)),this;X.call(this,B);const L={...B,type:(0,f.getJSONTypes)(B.type),schemaType:(0,f.getJSONTypes)(B.schemaType)};return(0,m.eachItem)(q,L.type.length===0?$=>ie.call(this,$,L):$=>L.type.forEach(Q=>ie.call(this,$,L,Q))),this}getKeyword(P){const B=this.RULES.all[P];return typeof B=="object"?B.definition:!!B}removeKeyword(P){const{RULES:B}=this;delete B.keywords[P],delete B.all[P];for(const q of B.rules){const L=q.rules.findIndex($=>$.keyword===P);L>=0&&q.rules.splice(L,1)}return this}addFormat(P,B){return typeof B=="string"&&(B=new RegExp(B)),this.formats[P]=B,this}errorsText(P=this.errors,{separator:B=", ",dataVar:q="data"}={}){return!P||P.length===0?"No errors":P.map(L=>`${q}${L.instancePath} ${L.message}`).reduce((L,$)=>L+B+$)}$dataMetaSchema(P,B){const q=this.RULES.all;P=JSON.parse(JSON.stringify(P));for(const L of B){const $=L.split("/").slice(1);let Q=P;for(const me of $)Q=Q[me];for(const me in q){const _e=q[me];if(typeof _e!="object")continue;const{$data:Ae}=_e.definition,Ne=Q[me];Ae&&Ne&&(Q[me]=fe(Ne))}}return P}_removeAllSchemas(P,B){for(const q in P){const L=P[q];(!B||B.test(q))&&(typeof L=="string"?delete P[q]:L&&!L.meta&&(this._cache.delete(L.schema),delete P[q]))}}_addSchema(P,B,q,L=this.opts.validateSchema,$=this.opts.addUsedSchema){let Q;const{schemaId:me}=this.opts;if(typeof P=="object")Q=P[me];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof P!="boolean")throw new Error("schema must be object or boolean")}let _e=this._cache.get(P);if(_e!==void 0)return _e;q=(0,d.normalizeId)(Q||q);const Ae=d.getSchemaRefs.call(this,P,q);return _e=new c.SchemaEnv({schema:P,schemaId:me,meta:B,baseId:q,localRefs:Ae}),this._cache.set(_e.schema,_e),$&&!q.startsWith("#")&&(q&&this._checkUnique(q),this.refs[q]=_e),L&&this.validateSchema(P,!0),_e}_checkUnique(P){if(this.schemas[P]||this.refs[P])throw new Error(`schema with key or id "${P}" already exists`)}_compileSchemaEnv(P){if(P.meta?this._compileMetaSchema(P):c.compileSchema.call(this,P),!P.validate)throw new Error("ajv implementation error");return P.validate}_compileMetaSchema(P){const B=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,P)}finally{this.opts=B}}}C.ValidationError=r.default,C.MissingRefError=a.default,e.default=C;function O(K,P,B,q="error"){for(const L in K){const $=L;$ in P&&this.logger[q](`${B}: option ${L}. ${K[$]}`)}}function I(K){return K=(0,d.normalizeId)(K),this.schemas[K]||this.refs[K]}function k(){const K=this.opts.schemas;if(K)if(Array.isArray(K))this.addSchema(K);else for(const P in K)this.addSchema(K[P],P)}function D(){for(const K in this.opts.formats){const P=this.opts.formats[K];P&&this.addFormat(K,P)}}function z(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const P in K){const B=K[P];B.keyword||(B.keyword=P),this.addKeyword(B)}}function Y(){const K={...this.opts};for(const P of w)delete K[P];return K}const V={log(){},warn(){},error(){}};function Z(K){if(K===!1)return V;if(K===void 0)return console;if(K.log&&K.warn&&K.error)return K;throw new Error("logger must implement log, warn and error methods")}const U=/^[a-z_$][a-z0-9_$:-]*$/i;function J(K,P){const{RULES:B}=this;if((0,m.eachItem)(K,q=>{if(B.keywords[q])throw new Error(`Keyword ${q} is already defined`);if(!U.test(q))throw new Error(`Keyword ${q} has invalid name`)}),!!P&&P.$data&&!("code"in P||"validate"in P))throw new Error('$data keyword must have "code" or "validate" function')}function ie(K,P,B){var q;const L=P?.post;if(B&&L)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:$}=this;let Q=L?$.post:$.rules.find(({type:_e})=>_e===B);if(Q||(Q={type:B,rules:[]},$.rules.push(Q)),$.keywords[K]=!0,!P)return;const me={keyword:K,definition:{...P,type:(0,f.getJSONTypes)(P.type),schemaType:(0,f.getJSONTypes)(P.schemaType)}};P.before?F.call(this,Q,me,P.before):Q.rules.push(me),$.all[K]=me,(q=P.implements)===null||q===void 0||q.forEach(_e=>this.addKeyword(_e))}function F(K,P,B){const q=K.rules.findIndex(L=>L.keyword===B);q>=0?K.rules.splice(q,0,P):(K.rules.push(P),this.logger.warn(`rule ${B} is not defined`))}function X(K){let{metaSchema:P}=K;P!==void 0&&(K.$data&&this.opts.$data&&(P=fe(P)),K.validateSchema=this.compile(P,!0))}const ae={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function fe(K){return{anyOf:[K,ae]}}})(E0)),E0}var Rh={},xh={},Th={},_2;function lJ(){if(_2)return Th;_2=1,Object.defineProperty(Th,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Th.default=e,Th}var ys={},b2;function uJ(){if(b2)return ys;b2=1,Object.defineProperty(ys,"__esModule",{value:!0}),ys.callRef=ys.getValidate=void 0;const e=eg(),t=zo(),n=ht(),r=Bs(),a=z1(),i=Rt(),c={keyword:"$ref",schemaType:"string",code(f){const{gen:m,schema:p,it:g}=f,{baseId:y,schemaEnv:w,validateName:S,opts:b,self:R}=g,{root:E}=w;if((p==="#"||p==="#/")&&y===E.baseId)return C();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 O(T);return I(T);function C(){if(w===E)return d(f,S,w,w.$async);const k=m.scopeValue("root",{ref:E});return d(f,(0,n._)`${k}.validate`,E,E.$async)}function O(k){const D=u(f,k);d(f,D,k,k.$async)}function I(k){const D=m.scopeValue("schema",b.code.source===!0?{ref:k,code:(0,n.stringify)(k)}:{ref:k}),z=m.name("valid"),Y=f.subschema({schema:k,dataTypes:[],schemaPath:n.nil,topSchemaRef:D,errSchemaPath:p},z);f.mergeEvaluated(Y),f.ok(z)}}};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`}ys.getValidate=u;function d(f,m,p,g){const{gen:y,it:w}=f,{allErrors:S,schemaEnv:b,opts:R}=w,E=R.passContext?r.default.this:n.nil;g?T():C();function T(){if(!b.$async)throw new Error("async schema referenced by sync schema");const k=y.let("valid");y.try(()=>{y.code((0,n._)`await ${(0,t.callValidateCode)(f,m,E)}`),I(m),S||y.assign(k,!0)},D=>{y.if((0,n._)`!(${D} instanceof ${w.ValidationError})`,()=>y.throw(D)),O(D),S||y.assign(k,!1)}),f.ok(k)}function C(){f.result((0,t.callValidateCode)(f,m,E),()=>I(m),()=>O(m))}function O(k){const D=(0,n._)`${k}.errors`;y.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${D} : ${r.default.vErrors}.concat(${D})`),y.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function I(k){var D;if(!w.opts.unevaluated)return;const z=(D=p?.validate)===null||D===void 0?void 0:D.evaluated;if(w.props!==!0)if(z&&!z.dynamicProps)z.props!==void 0&&(w.props=i.mergeEvaluated.props(y,z.props,w.props));else{const Y=y.var("props",(0,n._)`${k}.evaluated.props`);w.props=i.mergeEvaluated.props(y,Y,w.props,n.Name)}if(w.items!==!0)if(z&&!z.dynamicItems)z.items!==void 0&&(w.items=i.mergeEvaluated.items(y,z.items,w.items));else{const Y=y.var("items",(0,n._)`${k}.evaluated.items`);w.items=i.mergeEvaluated.items(y,Y,w.items,n.Name)}}}return ys.callRef=d,ys.default=c,ys}var w2;function dJ(){if(w2)return xh;w2=1,Object.defineProperty(xh,"__esModule",{value:!0});const e=lJ(),t=uJ(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return xh.default=n,xh}var Oh={},Ch={},S2;function fJ(){if(S2)return Ch;S2=1,Object.defineProperty(Ch,"__esModule",{value:!0});const e=ht(),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:c})=>(0,e.str)`must be ${n[i].okStr} ${c}`,params:({keyword:i,schemaCode:c})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${c}}`},a={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(i){const{keyword:c,data:u,schemaCode:d}=i;i.fail$data((0,e._)`${u} ${n[c].fail} ${d} || isNaN(${u})`)}};return Ch.default=a,Ch}var Ah={},E2;function hJ(){if(E2)return Ah;E2=1,Object.defineProperty(Ah,"__esModule",{value:!0});const e=ht(),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:c,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._)`(${c} === 0 || (${f} = ${i}/${c}, ${m}))`)}};return Ah.default=n,Ah}var Ih={},Nh={},R2;function pJ(){if(R2)return Nh;R2=1,Object.defineProperty(Nh,"__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 Nh.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Nh}var x2;function mJ(){if(x2)return Ih;x2=1,Object.defineProperty(Ih,"__esModule",{value:!0});const e=ht(),t=Rt(),n=pJ(),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:c}){const u=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${c} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:c,data:u,schemaCode:d,it:f}=i,m=c==="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 Ih.default=a,Ih}var kh={},T2;function gJ(){if(T2)return kh;T2=1,Object.defineProperty(kh,"__esModule",{value:!0});const e=zo(),t=Rt(),n=ht(),a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,n.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,n._)`{pattern: ${i}}`},code(i){const{gen:c,data:u,$data:d,schema:f,schemaCode:m,it:p}=i,g=p.opts.unicodeRegExp?"u":"";if(d){const{regExp:y}=p.opts.code,w=y.code==="new RegExp"?(0,n._)`new RegExp`:(0,t.useFunc)(c,y),S=c.let("valid");c.try(()=>c.assign(S,(0,n._)`${w}(${m}, ${g}).test(${u})`),()=>c.assign(S,!1)),i.fail$data((0,n._)`!${S}`)}else{const y=(0,e.usePattern)(i,f);i.fail$data((0,n._)`!${y}.test(${u})`)}}};return kh.default=a,kh}var Mh={},O2;function vJ(){if(O2)return Mh;O2=1,Object.defineProperty(Mh,"__esModule",{value:!0});const e=ht(),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:c}=r,u=a==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${i}).length ${u} ${c}`)}};return Mh.default=n,Mh}var Ph={},C2;function yJ(){if(C2)return Ph;C2=1,Object.defineProperty(Ph,"__esModule",{value:!0});const e=zo(),t=ht(),n=Rt(),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:c,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?w():S(),g.strictRequired){const E=i.parentSchema.properties,{definedProperties:T}=i.it;for(const C of u)if(E?.[C]===void 0&&!T.has(C)){const O=p.schemaEnv.baseId+p.errSchemaPath,I=`required property "${C}" is not defined at "${O}" (strictRequired)`;(0,n.checkStrictMode)(p,I,p.opts.strictRequired)}}function w(){if(y||m)i.block$data(t.nil,b);else for(const E of u)(0,e.checkReportMissingProp)(i,E)}function S(){const E=c.let("missing");if(y||m){const T=c.let("valid",!0);i.block$data(T,()=>R(E,T)),i.ok(T)}else c.if((0,e.checkMissingProp)(i,u,E)),(0,e.reportMissingProp)(i,E),c.else()}function b(){c.forOf("prop",d,E=>{i.setParams({missingProperty:E}),c.if((0,e.noPropertyInData)(c,f,E,g.ownProperties),()=>i.error())})}function R(E,T){i.setParams({missingProperty:E}),c.forOf(E,d,()=>{c.assign(T,(0,e.propertyInData)(c,f,E,g.ownProperties)),c.if((0,t.not)(T),()=>{i.error(),c.break()})},t.nil)}}};return Ph.default=a,Ph}var Dh={},A2;function _J(){if(A2)return Dh;A2=1,Object.defineProperty(Dh,"__esModule",{value:!0});const e=ht(),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:c}=r,u=a==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${i}.length ${u} ${c}`)}};return Dh.default=n,Dh}var Lh={},jh={},I2;function V1(){if(I2)return jh;I2=1,Object.defineProperty(jh,"__esModule",{value:!0});const e=UM();return e.code='require("ajv/dist/runtime/equal").default',jh.default=e,jh}var N2;function bJ(){if(N2)return Lh;N2=1,Object.defineProperty(Lh,"__esModule",{value:!0});const e=rm(),t=ht(),n=Rt(),r=V1(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:c,j:u}})=>(0,t.str)`must NOT have duplicate items (items ## ${u} and ${c} are identical)`,params:({params:{i:c,j:u}})=>(0,t._)`{i: ${c}, j: ${u}}`},code(c){const{gen:u,data:d,$data:f,schema:m,parentSchema:p,schemaCode:g,it:y}=c;if(!f&&!m)return;const w=u.let("valid"),S=p.items?(0,e.getSchemaTypes)(p.items):[];c.block$data(w,b,(0,t._)`${g} === false`),c.ok(w);function b(){const C=u.let("i",(0,t._)`${d}.length`),O=u.let("j");c.setParams({i:C,j:O}),u.assign(w,!0),u.if((0,t._)`${C} > 1`,()=>(R()?E:T)(C,O))}function R(){return S.length>0&&!S.some(C=>C==="object"||C==="array")}function E(C,O){const I=u.name("item"),k=(0,e.checkDataTypes)(S,I,y.opts.strictNumbers,e.DataType.Wrong),D=u.const("indices",(0,t._)`{}`);u.for((0,t._)`;${C}--;`,()=>{u.let(I,(0,t._)`${d}[${C}]`),u.if(k,(0,t._)`continue`),S.length>1&&u.if((0,t._)`typeof ${I} == "string"`,(0,t._)`${I} += "_"`),u.if((0,t._)`typeof ${D}[${I}] == "number"`,()=>{u.assign(O,(0,t._)`${D}[${I}]`),c.error(),u.assign(w,!1).break()}).code((0,t._)`${D}[${I}] = ${C}`)})}function T(C,O){const I=(0,n.useFunc)(u,r.default),k=u.name("outer");u.label(k).for((0,t._)`;${C}--;`,()=>u.for((0,t._)`${O} = ${C}; ${O}--;`,()=>u.if((0,t._)`${I}(${d}[${C}], ${d}[${O}])`,()=>{c.error(),u.assign(w,!1).break(k)})))}}};return Lh.default=i,Lh}var $h={},k2;function wJ(){if(k2)return $h;k2=1,Object.defineProperty($h,"__esModule",{value:!0});const e=ht(),t=Rt(),n=V1(),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},code(i){const{gen:c,data:u,$data:d,schemaCode:f,schema:m}=i;d||m&&typeof m=="object"?i.fail$data((0,e._)`!${(0,t.useFunc)(c,n.default)}(${u}, ${f})`):i.fail((0,e._)`${m} !== ${u}`)}};return $h.default=a,$h}var Uh={},M2;function SJ(){if(M2)return Uh;M2=1,Object.defineProperty(Uh,"__esModule",{value:!0});const e=ht(),t=Rt(),n=V1(),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:c,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 w=()=>y??(y=(0,t.useFunc)(c,n.default));let S;if(g||d)S=c.let("valid"),i.block$data(S,b);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const E=c.const("vSchema",m);S=(0,e.or)(...f.map((T,C)=>R(E,C)))}i.pass(S);function b(){c.assign(S,!1),c.forOf("v",m,E=>c.if((0,e._)`${w()}(${u}, ${E})`,()=>c.assign(S,!0).break()))}function R(E,T){const C=f[T];return typeof C=="object"&&C!==null?(0,e._)`${w()}(${u}, ${E}[${T}])`:(0,e._)`${u} === ${C}`}}};return Uh.default=a,Uh}var P2;function EJ(){if(P2)return Oh;P2=1,Object.defineProperty(Oh,"__esModule",{value:!0});const e=fJ(),t=hJ(),n=mJ(),r=gJ(),a=vJ(),i=yJ(),c=_J(),u=bJ(),d=wJ(),f=SJ(),m=[e.default,t.default,n.default,r.default,a.default,i.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,f.default];return Oh.default=m,Oh}var zh={},Lc={},D2;function VM(){if(D2)return Lc;D2=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.validateAdditionalItems=void 0;const e=ht(),t=Rt(),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:c,it:u}=i,{items:d}=c;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,c){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:c.length}),i.pass((0,e._)`${g} <= ${c.length}`);else if(typeof d=="object"&&!(0,t.alwaysValidSchema)(p,d)){const w=u.var("valid",(0,e._)`${g} <= ${c.length}`);u.if((0,e.not)(w),()=>y(w)),i.ok(w)}function y(w){u.forRange("i",c.length,g,S=>{i.subschema({keyword:m,dataProp:S,dataPropType:t.Type.Num},w),p.allErrors||u.if((0,e.not)(w),()=>u.break())})}}return Lc.validateAdditionalItems=a,Lc.default=r,Lc}var Vh={},jc={},L2;function FM(){if(L2)return jc;L2=1,Object.defineProperty(jc,"__esModule",{value:!0}),jc.validateTuple=void 0;const e=ht(),t=Rt(),n=zo(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:c,it:u}=i;if(Array.isArray(c))return a(i,"additionalItems",c);u.items=!0,!(0,t.alwaysValidSchema)(u,c)&&i.ok((0,n.validateArray)(i))}};function a(i,c,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"),w=d.const("len",(0,e._)`${m}.length`);u.forEach((b,R)=>{(0,t.alwaysValidSchema)(g,b)||(d.if((0,e._)`${w} > ${R}`,()=>i.subschema({keyword:p,schemaProp:R,dataProp:R},y)),i.ok(y))});function S(b){const{opts:R,errSchemaPath:E}=g,T=u.length,C=T===b.minItems&&(T===b.maxItems||b[c]===!1);if(R.strictTuples&&!C){const O=`"${p}" is ${T}-tuple, but minItems or maxItems/${c} are not specified or different at path "${E}"`;(0,t.checkStrictMode)(g,O,R.strictTuples)}}}return jc.validateTuple=a,jc.default=r,jc}var j2;function RJ(){if(j2)return Vh;j2=1,Object.defineProperty(Vh,"__esModule",{value:!0});const e=FM(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return Vh.default=t,Vh}var Fh={},$2;function xJ(){if($2)return Fh;$2=1,Object.defineProperty(Fh,"__esModule",{value:!0});const e=ht(),t=Rt(),n=zo(),r=VM(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:c}})=>(0,e.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,e._)`{limit: ${c}}`},code(c){const{schema:u,parentSchema:d,it:f}=c,{prefixItems:m}=d;f.items=!0,!(0,t.alwaysValidSchema)(f,u)&&(m?(0,r.validateAdditionalItems)(c,m):c.ok((0,n.validateArray)(c)))}};return Fh.default=i,Fh}var qh={},U2;function TJ(){if(U2)return qh;U2=1,Object.defineProperty(qh,"__esModule",{value:!0});const e=ht(),t=Rt(),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:c,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 w=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,c)){let T=(0,e._)`${w} >= ${m}`;p!==void 0&&(T=(0,e._)`${T} && ${w} <= ${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`,b)):(i.let(S,!1),b()),a.result(S,()=>a.reset());function b(){const T=i.name("_valid"),C=i.let("count",0);R(T,()=>i.if(T,()=>E(C)))}function R(T,C){i.forRange("i",0,w,O=>{a.subschema({keyword:"contains",dataProp:O,dataPropType:t.Type.Num,compositeRule:!0},T),C()})}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 qh.default=r,qh}var k0={},z2;function OJ(){return z2||(z2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ht(),n=Rt(),r=zo();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);c(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 c(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 w in f){const S=f[w];if(S.length===0)continue;const b=(0,r.propertyInData)(m,p,w,g.opts.ownProperties);d.setParams({property:w,depsCount:S.length,deps:S.join(", ")}),g.allErrors?m.if(b,()=>{for(const R of S)(0,r.checkReportMissingProp)(d,R)}):(m.if((0,t._)`${b} && (${(0,r.checkMissingProp)(d,S,y)})`),(0,r.reportMissingProp)(d,y),m.else())}}e.validatePropertyDeps=c;function u(d,f=d.schema){const{gen:m,data:p,keyword:g,it:y}=d,w=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 b=d.subschema({keyword:g,schemaProp:S},w);d.mergeValidEvaluated(b,w)},()=>m.var(w,!0)),d.ok(w))}e.validateSchemaDeps=u,e.default=a})(k0)),k0}var Bh={},V2;function CJ(){if(V2)return Bh;V2=1,Object.defineProperty(Bh,"__esModule",{value:!0});const e=ht(),t=Rt(),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:c,data:u,it:d}=a;if((0,t.alwaysValidSchema)(d,c))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 Bh.default=r,Bh}var Hh={},F2;function qM(){if(F2)return Hh;F2=1,Object.defineProperty(Hh,"__esModule",{value:!0});const e=zo(),t=ht(),n=Bs(),r=Rt(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:c})=>(0,t._)`{additionalProperty: ${c.additionalProperty}}`},code(c){const{gen:u,schema:d,parentSchema:f,data:m,errsCount:p,it:g}=c;if(!p)throw new Error("ajv implementation error");const{allErrors:y,opts:w}=g;if(g.props=!0,w.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(g,d))return;const S=(0,e.allSchemaProperties)(f.properties),b=(0,e.allSchemaProperties)(f.patternProperties);R(),c.ok((0,t._)`${p} === ${n.default.errors}`);function R(){u.forIn("key",m,I=>{!S.length&&!b.length?C(I):u.if(E(I),()=>C(I))})}function E(I){let k;if(S.length>8){const D=(0,r.schemaRefOrVal)(g,f.properties,"properties");k=(0,e.isOwnProperty)(u,D,I)}else S.length?k=(0,t.or)(...S.map(D=>(0,t._)`${I} === ${D}`)):k=t.nil;return b.length&&(k=(0,t.or)(k,...b.map(D=>(0,t._)`${(0,e.usePattern)(c,D)}.test(${I})`))),(0,t.not)(k)}function T(I){u.code((0,t._)`delete ${m}[${I}]`)}function C(I){if(w.removeAdditional==="all"||w.removeAdditional&&d===!1){T(I);return}if(d===!1){c.setParams({additionalProperty:I}),c.error(),y||u.break();return}if(typeof d=="object"&&!(0,r.alwaysValidSchema)(g,d)){const k=u.name("valid");w.removeAdditional==="failing"?(O(I,k,!1),u.if((0,t.not)(k),()=>{c.reset(),T(I)})):(O(I,k),y||u.if((0,t.not)(k),()=>u.break()))}}function O(I,k,D){const z={keyword:"additionalProperties",dataProp:I,dataPropType:r.Type.Str};D===!1&&Object.assign(z,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema(z,k)}}};return Hh.default=i,Hh}var Gh={},q2;function AJ(){if(q2)return Gh;q2=1,Object.defineProperty(Gh,"__esModule",{value:!0});const e=Jm(),t=zo(),n=Rt(),r=qM(),a={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:c,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 b of p)m.definedProperties.add(b);m.opts.unevaluated&&p.length&&m.props!==!0&&(m.props=n.mergeEvaluated.props(c,(0,n.toHash)(p),m.props));const g=p.filter(b=>!(0,n.alwaysValidSchema)(m,u[b]));if(g.length===0)return;const y=c.name("valid");for(const b of g)w(b)?S(b):(c.if((0,t.propertyInData)(c,f,b,m.opts.ownProperties)),S(b),m.allErrors||c.else().var(y,!0),c.endIf()),i.it.definedProperties.add(b),i.ok(y);function w(b){return m.opts.useDefaults&&!m.compositeRule&&u[b].default!==void 0}function S(b){i.subschema({keyword:"properties",schemaProp:b,dataProp:b},y)}}};return Gh.default=a,Gh}var Zh={},B2;function IJ(){if(B2)return Zh;B2=1,Object.defineProperty(Zh,"__esModule",{value:!0});const e=zo(),t=ht(),n=Rt(),r=Rt(),a={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:c,schema:u,data:d,parentSchema:f,it:m}=i,{opts:p}=m,g=(0,e.allSchemaProperties)(u),y=g.filter(C=>(0,n.alwaysValidSchema)(m,u[C]));if(g.length===0||y.length===g.length&&(!m.opts.unevaluated||m.props===!0))return;const w=p.strictSchema&&!p.allowMatchingProperties&&f.properties,S=c.name("valid");m.props!==!0&&!(m.props instanceof t.Name)&&(m.props=(0,r.evaluatedPropsToName)(c,m.props));const{props:b}=m;R();function R(){for(const C of g)w&&E(C),m.allErrors?T(C):(c.var(S,!0),T(C),c.if(S))}function E(C){for(const O in w)new RegExp(C).test(O)&&(0,n.checkStrictMode)(m,`property ${O} matches pattern ${C} (use allowMatchingProperties)`)}function T(C){c.forIn("key",d,O=>{c.if((0,t._)`${(0,e.usePattern)(i,C)}.test(${O})`,()=>{const I=y.includes(C);I||i.subschema({keyword:"patternProperties",schemaProp:C,dataProp:O,dataPropType:r.Type.Str},S),m.opts.unevaluated&&b!==!0?c.assign((0,t._)`${b}[${O}]`,!0):!I&&!m.allErrors&&c.if((0,t.not)(S),()=>c.break())})})}}};return Zh.default=a,Zh}var Kh={},H2;function NJ(){if(H2)return Kh;H2=1,Object.defineProperty(Kh,"__esModule",{value:!0});const e=Rt(),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 c=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),n.failResult(c,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return Kh.default=t,Kh}var Wh={},G2;function kJ(){if(G2)return Wh;G2=1,Object.defineProperty(Wh,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:zo().validateUnion,error:{message:"must match a schema in anyOf"}};return Wh.default=t,Wh}var Yh={},Z2;function MJ(){if(Z2)return Yh;Z2=1,Object.defineProperty(Yh,"__esModule",{value:!0});const e=ht(),t=Rt(),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:c,parentSchema:u,it:d}=a;if(!Array.isArray(c))throw new Error("ajv implementation error");if(d.opts.discriminator&&u.discriminator)return;const f=c,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((w,S)=>{let b;(0,t.alwaysValidSchema)(d,w)?i.var(g,!0):b=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),b&&a.mergeEvaluated(b,e.Name)})})}}};return Yh.default=r,Yh}var Qh={},K2;function PJ(){if(K2)return Qh;K2=1,Object.defineProperty(Qh,"__esModule",{value:!0});const e=Rt(),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 c=r.name("valid");a.forEach((u,d)=>{if((0,e.alwaysValidSchema)(i,u))return;const f=n.subschema({keyword:"allOf",schemaProp:d},c);n.ok(c),n.mergeEvaluated(f)})}};return Qh.default=t,Qh}var Xh={},W2;function DJ(){if(W2)return Xh;W2=1,Object.defineProperty(Xh,"__esModule",{value:!0});const e=ht(),t=Rt(),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:c,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=c.let("valid",!0),g=c.name("_valid");if(y(),i.reset(),f&&m){const S=c.let("ifClause");i.setParams({ifClause:S}),c.if(g,w("then",S),w("else",S))}else f?c.if(g,w("then")):c.if((0,e.not)(g),w("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 w(S,b){return()=>{const R=i.subschema({keyword:S},g);c.assign(p,g),i.mergeValidEvaluated(R,p),b?c.assign(b,(0,e._)`${S}`):i.setParams({ifClause:S})}}}};function a(i,c){const u=i.schema[c];return u!==void 0&&!(0,t.alwaysValidSchema)(i,u)}return Xh.default=r,Xh}var Jh={},Y2;function LJ(){if(Y2)return Jh;Y2=1,Object.defineProperty(Jh,"__esModule",{value:!0});const e=Rt(),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 Jh.default=t,Jh}var Q2;function jJ(){if(Q2)return zh;Q2=1,Object.defineProperty(zh,"__esModule",{value:!0});const e=VM(),t=RJ(),n=FM(),r=xJ(),a=TJ(),i=OJ(),c=CJ(),u=qM(),d=AJ(),f=IJ(),m=NJ(),p=kJ(),g=MJ(),y=PJ(),w=DJ(),S=LJ();function b(R=!1){const E=[m.default,p.default,g.default,y.default,w.default,S.default,c.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 zh.default=b,zh}var ep={},tp={},X2;function $J(){if(X2)return tp;X2=1,Object.defineProperty(tp,"__esModule",{value:!0});const e=ht(),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:c,$data:u,schema:d,schemaCode:f,it:m}=r,{opts:p,errSchemaPath:g,schemaEnv:y,self:w}=m;if(!p.validateFormats)return;u?S():b();function S(){const R=i.scopeValue("formats",{ref:w.formats,code:p.code.formats}),E=i.const("fDef",(0,e._)`${R}[${f}]`),T=i.let("fType"),C=i.let("format");i.if((0,e._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>i.assign(T,(0,e._)`${E}.type || "string"`).assign(C,(0,e._)`${E}.validate`),()=>i.assign(T,(0,e._)`"string"`).assign(C,E)),r.fail$data((0,e.or)(O(),I()));function O(){return p.strictSchema===!1?e.nil:(0,e._)`${f} && !${C}`}function I(){const k=y.$async?(0,e._)`(${E}.async ? await ${C}(${c}) : ${C}(${c}))`:(0,e._)`${C}(${c})`,D=(0,e._)`(typeof ${C} == "function" ? ${k} : ${C}.test(${c}))`;return(0,e._)`${C} && ${C} !== true && ${T} === ${a} && !${D}`}}function b(){const R=w.formats[d];if(!R){O();return}if(R===!0)return;const[E,T,C]=I(R);E===a&&r.pass(k());function O(){if(p.strictSchema===!1){w.logger.warn(D());return}throw new Error(D());function D(){return`unknown format "${d}" ignored in schema at path "${g}"`}}function I(D){const z=D instanceof RegExp?(0,e.regexpCode)(D):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(d)}`:void 0,Y=i.scopeValue("formats",{key:d,ref:D,code:z});return typeof D=="object"&&!(D instanceof RegExp)?[D.type||"string",D.validate,(0,e._)`${Y}.validate`]:["string",D,Y]}function k(){if(typeof R=="object"&&!(R instanceof RegExp)&&R.async){if(!y.$async)throw new Error("async format in sync schema");return(0,e._)`await ${C}(${c})`}return typeof T=="function"?(0,e._)`${C}(${c})`:(0,e._)`${C}.test(${c})`}}}};return tp.default=n,tp}var J2;function UJ(){if(J2)return ep;J2=1,Object.defineProperty(ep,"__esModule",{value:!0});const t=[$J().default];return ep.default=t,ep}var vi={},eC;function zJ(){return eC||(eC=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.contentVocabulary=vi.metadataVocabulary=void 0,vi.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],vi.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),vi}var tC;function VJ(){if(tC)return Rh;tC=1,Object.defineProperty(Rh,"__esModule",{value:!0});const e=dJ(),t=EJ(),n=jJ(),r=UJ(),a=zJ(),i=[e.default,t.default,(0,n.default)(),r.default,a.metadataVocabulary,a.contentVocabulary];return Rh.default=i,Rh}var np={},xu={},nC;function FJ(){if(nC)return xu;nC=1,Object.defineProperty(xu,"__esModule",{value:!0}),xu.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(xu.DiscrError=e={})),xu}var rC;function qJ(){if(rC)return np;rC=1,Object.defineProperty(np,"__esModule",{value:!0});const e=ht(),t=FJ(),n=z1(),r=eg(),a=Rt(),c={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 w=m.propertyName;if(typeof w!="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),b=d.const("tag",(0,e._)`${f}${(0,e.getProperty)(w)}`);d.if((0,e._)`typeof ${b} == "string"`,()=>R(),()=>u.error(!1,{discrError:t.DiscrError.Tag,tag:b,tagName:w})),u.ok(S);function R(){const C=T();d.if(!1);for(const O in C)d.elseIf((0,e._)`${b} === ${O}`),d.assign(S,E(C[O]));d.else(),u.error(!1,{discrError:t.DiscrError.Mapping,tag:b,tagName:w}),d.endIf()}function E(C){const O=d.name("valid"),I=u.subschema({keyword:"oneOf",schemaProp:C},O);return u.mergeEvaluated(I,e.Name),O}function T(){var C;const O={},I=D(p);let k=!0;for(let V=0;V<y.length;V++){let Z=y[V];if(Z?.$ref&&!(0,a.schemaHasRulesButRef)(Z,g.self.RULES)){const J=Z.$ref;if(Z=n.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,J),Z instanceof n.SchemaEnv&&(Z=Z.schema),Z===void 0)throw new r.default(g.opts.uriResolver,g.baseId,J)}const U=(C=Z?.properties)===null||C===void 0?void 0:C[w];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${w}"`);k=k&&(I||D(Z)),z(U,V)}if(!k)throw new Error(`discriminator: "${w}" must be required`);return O;function D({required:V}){return Array.isArray(V)&&V.includes(w)}function z(V,Z){if(V.const)Y(V.const,Z);else if(V.enum)for(const U of V.enum)Y(U,Z);else throw new Error(`discriminator: "properties/${w}" must have "const" or "enum"`)}function Y(V,Z){if(typeof V!="string"||V in O)throw new Error(`discriminator: "${w}" values must be unique strings`);O[V]=Z}}}};return np.default=c,np}const BJ="http://json-schema.org/draft-07/schema#",HJ="http://json-schema.org/draft-07/schema#",GJ="Core schema meta-schema",ZJ={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:[]}},KJ=["object","boolean"],WJ={$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:"#"}},YJ={$schema:BJ,$id:HJ,title:GJ,definitions:ZJ,type:KJ,properties:WJ,default:!0};var oC;function BM(){return oC||(oC=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=cJ(),r=VJ(),a=qJ(),i=YJ,c=["/properties"],u="http://json-schema.org/draft-07/schema";class d extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(i,c):i;this.addMetaSchema(w,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=Jm();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var m=ht();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=U1();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var g=eg();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(_h,_h.exports)),_h.exports}var QJ=BM();const XJ=$a(QJ);var rp={exports:{}},M0={},aC;function JJ(){return aC||(aC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(V,Z){return{validate:V,compare:Z}}e.fullFormats={date:t(i,c),time:t(d(!0),f),"date-time":t(g(!0),y),"iso-time":t(d(),m),"iso-date-time":t(g(),w),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:Y,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:k},float:{type:"number",validate:D},double:{type:"number",validate:D},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,c),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,w),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(V){return V%4===0&&(V%100!==0||V%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(V){const Z=r.exec(V);if(!Z)return!1;const U=+Z[1],J=+Z[2],ie=+Z[3];return J>=1&&J<=12&&ie>=1&&ie<=(J===2&&n(U)?29:a[J])}function c(V,Z){if(V&&Z)return V>Z?1:V<Z?-1:0}const u=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function d(V){return function(U){const J=u.exec(U);if(!J)return!1;const ie=+J[1],F=+J[2],X=+J[3],ae=J[4],fe=J[5]==="-"?-1:1,K=+(J[6]||0),P=+(J[7]||0);if(K>23||P>59||V&&!ae)return!1;if(ie<=23&&F<=59&&X<60)return!0;const B=F-P*fe,q=ie-K*fe-(B<0?1:0);return(q===23||q===-1)&&(B===59||B===-1)&&X<61}}function f(V,Z){if(!(V&&Z))return;const U=new Date("2020-01-01T"+V).valueOf(),J=new Date("2020-01-01T"+Z).valueOf();if(U&&J)return U-J}function m(V,Z){if(!(V&&Z))return;const U=u.exec(V),J=u.exec(Z);if(U&&J)return V=U[1]+U[2]+U[3],Z=J[1]+J[2]+J[3],V>Z?1:V<Z?-1:0}const p=/t|\s/i;function g(V){const Z=d(V);return function(J){const ie=J.split(p);return ie.length===2&&i(ie[0])&&Z(ie[1])}}function y(V,Z){if(!(V&&Z))return;const U=new Date(V).valueOf(),J=new Date(Z).valueOf();if(U&&J)return U-J}function w(V,Z){if(!(V&&Z))return;const[U,J]=V.split(p),[ie,F]=Z.split(p),X=c(U,ie);if(X!==void 0)return X||f(J,F)}const S=/\/|:/,b=/^(?:[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(V){return S.test(V)&&b.test(V)}const E=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function T(V){return E.lastIndex=0,E.test(V)}const C=-2147483648,O=2**31-1;function I(V){return Number.isInteger(V)&&V<=O&&V>=C}function k(V){return Number.isInteger(V)}function D(){return!0}const z=/[^\\]\\Z/;function Y(V){if(z.test(V))return!1;try{return new RegExp(V),!0}catch{return!1}}})(M0)),M0}var P0={},sC;function eee(){return sC||(sC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=BM(),n=ht(),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:w}=g;if(!y.validateFormats)return;const S=new t.KeywordCxt(g,w.RULES.all.format.definition,"format");S.$data?b():R();function b(){const T=d.scopeValue("formats",{ref:w.formats,code:y.code.formats}),C=d.const("fmt",(0,n._)`${T}[${S.schemaCode}]`);u.fail$data((0,n.or)((0,n._)`typeof ${C} != "object"`,(0,n._)`${C} instanceof RegExp`,(0,n._)`typeof ${C}.compare != "function"`,E(C)))}function R(){const T=S.schema,C=w.formats[T];if(!C||C===!0)return;if(typeof C!="object"||C instanceof RegExp||typeof C.compare!="function")throw new Error(`"${p}": format "${T}" does not define "compare" function`);const O=d.scopeValue("formats",{key:T,ref:C,code:y.code.formats?(0,n._)`${y.code.formats}${(0,n.getProperty)(T)}`:void 0});u.fail$data(E(O))}function E(T){return(0,n._)`${T}.compare(${f}, ${m}) ${a[p].fail} 0`}},dependencies:["format"]};const c=u=>(u.addKeyword(e.formatLimitDefinition),u);e.default=c})(P0)),P0}var iC;function tee(){return iC||(iC=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=JJ(),r=eee(),a=ht(),i=new a.Name("fullFormats"),c=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,c]:[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,w;(y=(w=f.opts.code).formats)!==null&&y!==void 0||(w.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})(rp,rp.exports)),rp.exports}var nee=tee();const ree=$a(nee);function oee(){const e=new XJ({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return ree(e),e}class aee{constructor(t){this._ajv=t??oee()}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 see{constructor(t){this._client=t}async*callToolStream(t,n=Ym,r){const a=this._client,i={...r,task:r?.task??(a.isToolTask(t.name)?{}:void 0)},c=a.requestStream({method:"tools/call",params:t},n,i),u=a.getToolOutputValidator(t.name);for await(const d of c){if(d.type==="result"&&u){const f=d.result;if(!f.structuredContent&&!f.isError){yield{type:"error",error:new Ke(et.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 Ke(et.InvalidParams,`Structured content does not match the tool's output schema: ${m.errorMessage}`)};return}}catch(m){if(m instanceof Ke){yield{type:"error",error:m};return}yield{type:"error",error:new Ke(et.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 iee(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 cee(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 gp(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&&gp(i,n[a])}}if(Array.isArray(e.anyOf))for(const n of e.anyOf)typeof n!="boolean"&&gp(n,t);if(Array.isArray(e.oneOf))for(const n of e.oneOf)typeof n!="boolean"&&gp(n,t)}}function HM(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 GM=class extends HX{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 aee,n?.listChanged&&(this._pendingListChangedConfig=n.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",AM,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",OM,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",RM,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new see(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=GX(this._capabilities,t)}setRequestHandler(t,n){const a=lM(t)?.method;if(!a)throw new Error("Schema is missing a method literal");let i;if(Gm(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 c=i;if(c==="elicitation/create"){const u=async(d,f)=>{const m=ws(PM,d);if(!m.success){const E=m.error instanceof Error?m.error.message:String(m.error);throw new Ke(et.InvalidParams,`Invalid elicitation request: ${E}`)}const{params:p}=m.data;p.mode=p.mode??"form";const{supportsFormMode:g,supportsUrlMode:y}=HM(this._capabilities.elicitation);if(p.mode==="form"&&!g)throw new Ke(et.InvalidParams,"Client does not support form-mode elicitation requests");if(p.mode==="url"&&!y)throw new Ke(et.InvalidParams,"Client does not support URL-mode elicitation requests");const w=await Promise.resolve(n(d,f));if(p.task){const E=ws(cd,w);if(!E.success){const T=E.error instanceof Error?E.error.message:String(E.error);throw new Ke(et.InvalidParams,`Invalid task creation result: ${T}`)}return E.data}const S=ws(DM,w);if(!S.success){const E=S.error instanceof Error?S.error.message:String(S.error);throw new Ke(et.InvalidParams,`Invalid elicitation result: ${E}`)}const b=S.data,R=p.mode==="form"?p.requestedSchema:void 0;if(p.mode==="form"&&b.action==="accept"&&b.content&&R&&this._capabilities.elicitation?.form?.applyDefaults)try{gp(R,b.content)}catch{}return b};return super.setRequestHandler(t,u)}if(c==="sampling/createMessage"){const u=async(d,f)=>{const m=ws(NM,d);if(!m.success){const b=m.error instanceof Error?m.error.message:String(m.error);throw new Ke(et.InvalidParams,`Invalid sampling request: ${b}`)}const{params:p}=m.data,g=await Promise.resolve(n(d,f));if(p.task){const b=ws(cd,g);if(!b.success){const R=b.error instanceof Error?b.error.message:String(b.error);throw new Ke(et.InvalidParams,`Invalid task creation result: ${R}`)}return b.data}const w=p.tools||p.toolChoice?MM:kM,S=ws(w,g);if(!S.success){const b=S.error instanceof Error?S.error.message:String(S.error);throw new Ke(et.InvalidParams,`Invalid sampling result: ${b}`)}return S.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:Zm,capabilities:this._capabilities,clientInfo:this._clientInfo}},mM,n);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!fQ.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){iee(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&cee(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},Zc,t)}async complete(t,n){return this.request({method:"completion/complete",params:t},LM,n)}async setLoggingLevel(t,n){return this.request({method:"logging/setLevel",params:{level:t}},Zc,n)}async getPrompt(t,n){return this.request({method:"prompts/get",params:t},TM,n)}async listPrompts(t,n){return this.request({method:"prompts/list",params:t},xM,n)}async listResources(t,n){return this.request({method:"resources/list",params:t},wM,n)}async listResourceTemplates(t,n){return this.request({method:"resources/templates/list",params:t},SM,n)}async readResource(t,n){return this.request({method:"resources/read",params:t},EM,n)}async subscribeResource(t,n){return this.request({method:"resources/subscribe",params:t},Zc,n)}async unsubscribeResource(t,n){return this.request({method:"resources/unsubscribe",params:t},Zc,n)}async callTool(t,n=Ym,r){if(this.isToolTaskRequired(t.name))throw new Ke(et.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 Ke(et.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(a.structuredContent)try{const c=i(a.structuredContent);if(!c.valid)throw new Ke(et.InvalidParams,`Structured content does not match the tool's output schema: ${c.errorMessage}`)}catch(c){throw c instanceof Ke?c:new Ke(et.InvalidParams,`Failed to validate structured content: ${c instanceof Error?c.message:String(c)}`)}}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},$1,n);return this.cacheToolMetadata(r.tools),r}_setupListChangedHandler(t,n,r,a){const i=sX.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:c,debounceMs:u}=i.data,{onChanged:d}=r,f=async()=>{if(!c){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"})}};const Roe=Object.freeze(Object.defineProperty({__proto__:null,Client:GM,getSupportedElicitationModes:HM},Symbol.toStringTag,{value:"Module"}));class cC 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 D0(e){}function ZM(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=D0,onError:n=D0,onRetry:r=D0,onComment:a}=e;let i="",c=!0,u,d="",f="";function m(S){const b=c?S.replace(/^\xEF\xBB\xBF/,""):S,[R,E]=lee(`${i}${b}`);for(const T of R)p(T);i=E,c=!1}function p(S){if(S===""){y();return}if(S.startsWith(":")){a&&a(S.slice(S.startsWith(": ")?2:1));return}const b=S.indexOf(":");if(b!==-1){const R=S.slice(0,b),E=S[b+1]===" "?2:1,T=S.slice(b+E);g(R,T,S);return}g(S,"",S)}function g(S,b,R){switch(S){case"event":f=b;break;case"data":d=`${d}${b}
|
|
171
|
+
`;break;case"id":u=b.includes("\0")?void 0:b;break;case"retry":/^\d+$/.test(b)?r(parseInt(b,10)):n(new cC(`Invalid \`retry\` value: "${b}"`,{type:"invalid-retry",value:b,line:R}));break;default:n(new cC(`Unknown field "${S.length>20?`${S.slice(0,20)}…`:S}"`,{type:"unknown-field",field:S,value:b,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 w(S={}){i&&S.consume&&p(i),c=!0,u=void 0,d="",f="",i=""}return{feed:m,reset:w}}function lee(e){const t=[];let n="",r=0;for(;r<e.length;){const a=e.indexOf("\r",r),i=e.indexOf(`
|
|
173
|
+
`,r);let c=-1;if(a!==-1&&i!==-1?c=Math.min(a,i):a!==-1?a===e.length-1?c=-1:c=a:i!==-1&&(c=i),c===-1){n=e.slice(r);break}else{const u=e.slice(r,c);t.push(u),r=c+1,e[r-1]==="\r"&&e[r]===`
|
|
174
|
+
`&&r++}}return[t,n]}class lC 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(uC(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(uC(this),n)}}function uee(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function k_(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(k_).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${k_(e.cause)}`:e.message:`${e}`}function uC(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var KM=e=>{throw TypeError(e)},F1=(e,t,n)=>t.has(e)||KM("Cannot "+n),yt=(e,t,n)=>(F1(e,t,"read from private field"),n?n.call(e):t.get(e)),On=(e,t,n)=>t.has(e)?KM("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Qt=(e,t,n,r)=>(F1(e,t,"write to private field"),t.set(e,n),n),ka=(e,t,n)=>(F1(e,t,"access private method"),n),Ar,bi,Vc,vp,om,Hu,Kc,Gu,Rs,Fc,rl,qc,ku,Co,M_,P_,D_,dC,L_,j_,Mu,$_,U_;class yp extends EventTarget{constructor(t,n){var r,a;super(),On(this,Co),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,On(this,Ar),On(this,bi),On(this,Vc),On(this,vp),On(this,om),On(this,Hu),On(this,Kc),On(this,Gu,null),On(this,Rs),On(this,Fc),On(this,rl,null),On(this,qc,null),On(this,ku,null),On(this,P_,async i=>{var c;yt(this,Fc).reset();const{body:u,redirected:d,status:f,headers:m}=i;if(f===204){ka(this,Co,Mu).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(d?Qt(this,Vc,new URL(i.url)):Qt(this,Vc,void 0),f!==200){ka(this,Co,Mu).call(this,`Non-200 status code (${f})`,f);return}if(!(m.get("content-type")||"").startsWith("text/event-stream")){ka(this,Co,Mu).call(this,'Invalid content type, expected "text/event-stream"',f);return}if(yt(this,Ar)===this.CLOSED)return;Qt(this,Ar,this.OPEN);const p=new Event("open");if((c=yt(this,ku))==null||c.call(this,p),this.dispatchEvent(p),typeof u!="object"||!u||!("getReader"in u)){ka(this,Co,Mu).call(this,"Invalid response body, expected a web ReadableStream",f),this.close();return}const g=new TextDecoder,y=u.getReader();let w=!0;do{const{done:S,value:b}=await y.read();b&&yt(this,Fc).feed(g.decode(b,{stream:!S})),S&&(w=!1,yt(this,Fc).reset(),ka(this,Co,$_).call(this))}while(w)}),On(this,D_,i=>{Qt(this,Rs,void 0),!(i.name==="AbortError"||i.type==="aborted")&&ka(this,Co,$_).call(this,k_(i))}),On(this,L_,i=>{typeof i.id=="string"&&Qt(this,Gu,i.id);const c=new MessageEvent(i.event||"message",{data:i.data,origin:yt(this,Vc)?yt(this,Vc).origin:yt(this,bi).origin,lastEventId:i.id||""});yt(this,qc)&&(!i.event||i.event==="message")&&yt(this,qc).call(this,c),this.dispatchEvent(c)}),On(this,j_,i=>{Qt(this,Hu,i)}),On(this,U_,()=>{Qt(this,Kc,void 0),yt(this,Ar)===this.CONNECTING&&ka(this,Co,M_).call(this)});try{if(t instanceof URL)Qt(this,bi,t);else if(typeof t=="string")Qt(this,bi,new URL(t,dee()));else throw new Error("Invalid URL")}catch{throw uee("An invalid or illegal string was specified")}Qt(this,Fc,ZM({onEvent:yt(this,L_),onRetry:yt(this,j_)})),Qt(this,Ar,this.CONNECTING),Qt(this,Hu,3e3),Qt(this,om,(r=n?.fetch)!=null?r:globalThis.fetch),Qt(this,vp,(a=n?.withCredentials)!=null?a:!1),ka(this,Co,M_).call(this)}get readyState(){return yt(this,Ar)}get url(){return yt(this,bi).href}get withCredentials(){return yt(this,vp)}get onerror(){return yt(this,rl)}set onerror(t){Qt(this,rl,t)}get onmessage(){return yt(this,qc)}set onmessage(t){Qt(this,qc,t)}get onopen(){return yt(this,ku)}set onopen(t){Qt(this,ku,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,Kc)&&clearTimeout(yt(this,Kc)),yt(this,Ar)!==this.CLOSED&&(yt(this,Rs)&&yt(this,Rs).abort(),Qt(this,Ar,this.CLOSED),Qt(this,Rs,void 0))}}Ar=new WeakMap,bi=new WeakMap,Vc=new WeakMap,vp=new WeakMap,om=new WeakMap,Hu=new WeakMap,Kc=new WeakMap,Gu=new WeakMap,Rs=new WeakMap,Fc=new WeakMap,rl=new WeakMap,qc=new WeakMap,ku=new WeakMap,Co=new WeakSet,M_=function(){Qt(this,Ar,this.CONNECTING),Qt(this,Rs,new AbortController),yt(this,om)(yt(this,bi),ka(this,Co,dC).call(this)).then(yt(this,P_)).catch(yt(this,D_))},P_=new WeakMap,D_=new WeakMap,dC=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,Rs))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},L_=new WeakMap,j_=new WeakMap,Mu=function(e,t){var n;yt(this,Ar)!==this.CLOSED&&Qt(this,Ar,this.CLOSED);const r=new lC("error",{code:t,message:e});(n=yt(this,rl))==null||n.call(this,r),this.dispatchEvent(r)},$_=function(e,t){var n;if(yt(this,Ar)===this.CLOSED)return;Qt(this,Ar,this.CONNECTING);const r=new lC("error",{code:t,message:e});(n=yt(this,rl))==null||n.call(this,r),this.dispatchEvent(r),Qt(this,Kc,setTimeout(yt(this,U_),yt(this,Hu)))},U_=new WeakMap,yp.CONNECTING=0,yp.OPEN=1,yp.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 am(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function WM(e=fetch,t){return t?async(n,r)=>{const a={...t,...r,headers:r?.headers?{...am(t.headers),...am(r.headers)}:t.headers};return e(n,a)}:e}let q1;q1=globalThis.crypto;async function fee(e){return(await q1).getRandomValues(new Uint8Array(e))}async function hee(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const a=await fee(e-r.length);for(const i of a)i<n&&(r+=t[i%t.length])}return r}async function pee(e){return await hee(e)}async function mee(e){const t=await(await q1).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function gee(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await pee(e),n=await mee(t);return{code_verifier:t,code_challenge:n}}const Gn=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"}),vee=Kn({resource:M().url(),authorization_servers:ve(Gn).optional(),jwks_uri:M().url().optional(),scopes_supported:ve(M()).optional(),bearer_methods_supported:ve(M()).optional(),resource_signing_alg_values_supported:ve(M()).optional(),resource_name:M().optional(),resource_documentation:M().optional(),resource_policy_uri:M().url().optional(),resource_tos_uri:M().url().optional(),tls_client_certificate_bound_access_tokens:We().optional(),authorization_details_types_supported:ve(M()).optional(),dpop_signing_alg_values_supported:ve(M()).optional(),dpop_bound_access_tokens_required:We().optional()}),YM=Kn({issuer:M(),authorization_endpoint:Gn,token_endpoint:Gn,registration_endpoint:Gn.optional(),scopes_supported:ve(M()).optional(),response_types_supported:ve(M()),response_modes_supported:ve(M()).optional(),grant_types_supported:ve(M()).optional(),token_endpoint_auth_methods_supported:ve(M()).optional(),token_endpoint_auth_signing_alg_values_supported:ve(M()).optional(),service_documentation:Gn.optional(),revocation_endpoint:Gn.optional(),revocation_endpoint_auth_methods_supported:ve(M()).optional(),revocation_endpoint_auth_signing_alg_values_supported:ve(M()).optional(),introspection_endpoint:M().optional(),introspection_endpoint_auth_methods_supported:ve(M()).optional(),introspection_endpoint_auth_signing_alg_values_supported:ve(M()).optional(),code_challenge_methods_supported:ve(M()).optional(),client_id_metadata_document_supported:We().optional()}),yee=Kn({issuer:M(),authorization_endpoint:Gn,token_endpoint:Gn,userinfo_endpoint:Gn.optional(),jwks_uri:Gn,registration_endpoint:Gn.optional(),scopes_supported:ve(M()).optional(),response_types_supported:ve(M()),response_modes_supported:ve(M()).optional(),grant_types_supported:ve(M()).optional(),acr_values_supported:ve(M()).optional(),subject_types_supported:ve(M()),id_token_signing_alg_values_supported:ve(M()),id_token_encryption_alg_values_supported:ve(M()).optional(),id_token_encryption_enc_values_supported:ve(M()).optional(),userinfo_signing_alg_values_supported:ve(M()).optional(),userinfo_encryption_alg_values_supported:ve(M()).optional(),userinfo_encryption_enc_values_supported:ve(M()).optional(),request_object_signing_alg_values_supported:ve(M()).optional(),request_object_encryption_alg_values_supported:ve(M()).optional(),request_object_encryption_enc_values_supported:ve(M()).optional(),token_endpoint_auth_methods_supported:ve(M()).optional(),token_endpoint_auth_signing_alg_values_supported:ve(M()).optional(),display_values_supported:ve(M()).optional(),claim_types_supported:ve(M()).optional(),claims_supported:ve(M()).optional(),service_documentation:M().optional(),claims_locales_supported:ve(M()).optional(),ui_locales_supported:ve(M()).optional(),claims_parameter_supported:We().optional(),request_parameter_supported:We().optional(),request_uri_parameter_supported:We().optional(),require_request_uri_registration:We().optional(),op_policy_uri:Gn.optional(),op_tos_uri:Gn.optional(),client_id_metadata_document_supported:We().optional()}),_ee=re({...yee.shape,...YM.pick({code_challenge_methods_supported:!0}).shape}),bee=re({access_token:M(),id_token:M().optional(),token_type:M(),expires_in:KI().optional(),scope:M().optional(),refresh_token:M().optional()}).strip(),wee=re({error:M(),error_description:M().optional(),error_uri:M().optional()}),fC=Gn.optional().or(De("").transform(()=>{})),See=re({redirect_uris:ve(Gn),token_endpoint_auth_method:M().optional(),grant_types:ve(M()).optional(),response_types:ve(M()).optional(),client_name:M().optional(),client_uri:Gn.optional(),logo_uri:fC,scope:M().optional(),contacts:ve(M()).optional(),tos_uri:fC,policy_uri:M().optional(),jwks_uri:Gn.optional(),jwks:Gr().optional(),software_id:M().optional(),software_version:M().optional(),software_statement:M().optional()}).strip(),Eee=re({client_id:M(),client_secret:M().optional(),client_id_issued_at:Pe().optional(),client_secret_expires_at:Pe().optional()}).strip(),Ree=See.merge(Eee);re({error:M(),error_description:M().optional()}).strip();re({token:M(),token_type_hint:M().optional()}).strip();function xee(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function Tee({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 jn 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 z_ extends jn{}z_.errorCode="invalid_request";class sm extends jn{}sm.errorCode="invalid_client";class im extends jn{}im.errorCode="invalid_grant";class cm extends jn{}cm.errorCode="unauthorized_client";class V_ extends jn{}V_.errorCode="unsupported_grant_type";class F_ extends jn{}F_.errorCode="invalid_scope";class q_ extends jn{}q_.errorCode="access_denied";class dl extends jn{}dl.errorCode="server_error";class B_ extends jn{}B_.errorCode="temporarily_unavailable";class H_ extends jn{}H_.errorCode="unsupported_response_type";class G_ extends jn{}G_.errorCode="unsupported_token_type";class Z_ extends jn{}Z_.errorCode="invalid_token";class K_ extends jn{}K_.errorCode="method_not_allowed";class W_ extends jn{}W_.errorCode="too_many_requests";class lm extends jn{}lm.errorCode="invalid_client_metadata";class Y_ extends jn{}Y_.errorCode="insufficient_scope";class Q_ extends jn{}Q_.errorCode="invalid_target";const Oee={[z_.errorCode]:z_,[sm.errorCode]:sm,[im.errorCode]:im,[cm.errorCode]:cm,[V_.errorCode]:V_,[F_.errorCode]:F_,[q_.errorCode]:q_,[dl.errorCode]:dl,[B_.errorCode]:B_,[H_.errorCode]:H_,[G_.errorCode]:G_,[Z_.errorCode]:Z_,[K_.errorCode]:K_,[W_.errorCode]:W_,[lm.errorCode]:lm,[Y_.errorCode]:Y_,[Q_.errorCode]:Q_};class Io extends Error{constructor(t){super(t??"Unauthorized")}}function Cee(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const L0="code",j0="S256";function Aee(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&&Cee(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 Iee(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":Nee(a,i,n);return;case"client_secret_post":kee(a,i,r);return;case"none":Mee(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function Nee(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 kee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function Mee(e,t){t.set("client_id",e)}async function QM(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=wee.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:c}=r,u=Oee[a]||dl;return new u(i||"",c)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new dl(a)}}async function Ri(e,t){try{return await $0(e,t)}catch(n){if(n instanceof sm||n instanceof cm)return await e.invalidateCredentials?.("all"),await $0(e,t);if(n instanceof im)return await e.invalidateCredentials?.("tokens"),await $0(e,t);throw n}}async function $0(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){let c,u;try{c=await Lee(t,{resourceMetadataUrl:a},i),c.authorization_servers&&c.authorization_servers.length>0&&(u=c.authorization_servers[0])}catch{}u||(u=new URL("/",t));const d=await Dee(t,e,c),f=await Vee(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 b=f?.client_id_metadata_document_supported===!0,R=e.clientMetadataUrl;if(R&&!Pee(R))throw new lm(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${R}`);if(b&&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 Hee(u,{metadata:f,clientMetadata:e.clientMetadata,fetchFn:i});await e.saveClientInformation(T),m=T}}const p=!e.redirectUrl;if(n!==void 0||p){const b=await Bee(e,u,{metadata:f,resource:d,authorizationCode:n,fetchFn:i});return await e.saveTokens(b),"AUTHORIZED"}const g=await e.tokens();if(g?.refresh_token)try{const b=await qee(u,{metadata:f,clientInformation:m,refreshToken:g.refresh_token,resource:d,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(b),"AUTHORIZED"}catch(b){if(!(!(b instanceof jn)||b instanceof dl))throw b}const y=e.state?await e.state():void 0,{authorizationUrl:w,codeVerifier:S}=await Fee(u,{metadata:f,clientInformation:m,state:y,redirectUrl:e.redirectUrl,scope:r||c?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:d});return await e.saveCodeVerifier(S),await e.redirectToAuthorization(w),"REDIRECT"}function Pee(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function Dee(e,t,n){const r=xee(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!Tee({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 um(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=U0(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const c=U0(e,"scope")||void 0,u=U0(e,"error")||void 0;return{resourceMetadataUrl:i,scope:c,error:u}}function U0(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 Lee(e,t,n=fetch){const r=await Uee(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 vee.parse(await r.json())}async function B1(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?B1(e,void 0,n):void 0;throw r}}function jee(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function hC(e,t,n=fetch){return await B1(e,{"MCP-Protocol-Version":t},n)}function $ee(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function Uee(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??Zm;let c;if(r?.metadataUrl)c=new URL(r.metadataUrl);else{const d=jee(t,a.pathname);c=new URL(d,r?.metadataServerUrl??a),c.search=a.search}let u=await hC(c,i,n);if(!r?.metadataUrl&&$ee(u,a.pathname)){const d=new URL(`/.well-known/${t}`,a);u=await hC(d,i,n)}return u}function zee(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 Vee(e,{fetchFn:t=fetch,protocolVersion:n=Zm}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=zee(e);for(const{url:i,type:c}of a){const u=await B1(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 ${c==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return c==="oauth"?YM.parse(await u.json()):_ee.parse(await u.json())}}}async function Fee(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:c}){let u;if(t){if(u=new URL(t.authorization_endpoint),!t.response_types_supported.includes(L0))throw new Error(`Incompatible auth server: does not support response type ${L0}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(j0))throw new Error(`Incompatible auth server: does not support code challenge method ${j0}`)}else u=new URL("/authorize",e);const d=await gee(),f=d.code_verifier,m=d.code_challenge;return u.searchParams.set("response_type",L0),u.searchParams.set("client_id",n.client_id),u.searchParams.set("code_challenge",m),u.searchParams.set("code_challenge_method",j0),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"),c&&u.searchParams.set("resource",c.href),{authorizationUrl:u,codeVerifier:f}}function XM(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function H1(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:c}){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=Aee(r,m);Iee(p,r,d,n)}const f=await(c??fetch)(u,{method:"POST",headers:d,body:n});if(!f.ok)throw await QM(f);return bee.parse(await f.json())}async function xoe(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:c,addClientAuthentication:u,fetchFn:d}){const f=XM(r,a,i);return H1(e,{metadata:t,tokenRequestParams:f,clientInformation:n,addClientAuthentication:u,resource:c,fetchFn:d})}async function qee(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:c}){const u=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),d=await H1(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:c});return{refresh_token:r,...d}}async function Bee(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const c=e.clientMetadata.scope;let u;if(e.prepareTokenRequest&&(u=await e.prepareTokenRequest(c)),!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=XM(a,f,e.redirectUrl)}const d=await e.clientInformation();return H1(t,{metadata:n,tokenRequestParams:u,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function Hee(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 QM(i);return Ree.parse(await i.json())}class Gee extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class Zee{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=WM(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new Io("No auth provider");let t;try{t=await Ri(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 Io;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=am(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 yp(this._url.href,{...this._eventSourceInit,fetch:async(a,i)=>{const c=await this._commonHeaders();c.set("Accept","text/event-stream");const u=await t(a,{...i,headers:c});if(u.status===401&&u.headers.has("www-authenticate")){const{resourceMetadataUrl:d,scope:f}=um(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 Gee(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(c){r(c),this.onerror?.(c),this.close();return}n()}),this._eventSource.onmessage=a=>{const i=a;let c;try{c=Bu.parse(JSON.parse(i.data))}catch(u){this.onerror?.(u);return}this.onmessage?.(c)}})}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 Io("No auth provider");if(await Ri(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Io("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:c,scope:u}=um(a);if(this._resourceMetadataUrl=c,this._scope=u,await Ri(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Io;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 Kee="mcp";class Wee{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,Kee),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=Bu.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 Yee extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let a;super({start(i){a=ZM({onEvent:c=>{i.enqueue(c)},onError(c){t==="terminate"?i.error(c):typeof t=="function"&&t(c)},onRetry:n,onComment:r})},transform(i){a.feed(i)}})}}const Qee={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class $c extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}let Xee=class{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=WM(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??Qee}async _authThenStart(){if(!this._authProvider)throw new Io("No auth provider");let t;try{t=await Ri(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 Io;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=am(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 $c(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 c,u=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new Yee({onRetry:y=>{this._serverRetryMs=y}})).getReader();for(;;){const{value:y,done:w}=await m.read();if(w)break;if(y.id&&(c=y.id,u=!0,a?.(y.id)),!!y.data&&(!y.event||y.event==="message"))try{const S=Bu.parse(JSON.parse(y.data));Nu(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:c,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:c,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 Io("No auth provider");if(await Ri(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Io("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:N_(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 c={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},u=await(this._fetch??fetch)(this._url,c),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 $c(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:y,scope:w}=um(u);if(this._resourceMetadataUrl=y,this._scope=w,await Ri(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new Io;return this._hasCompletedAuthFlow=!0,this.send(t)}if(u.status===403&&this._authProvider){const{resourceMetadataUrl:y,scope:w,error:S}=um(u);if(S==="insufficient_scope"){const b=u.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===b)throw new $c(403,"Server returned 403 after trying upscoping");if(w&&(this._scope=w),y&&(this._resourceMetadataUrl=y),this._lastUpscopingHeader=b??void 0,await Ri(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new Io;return this.send(t)}}throw new $c(u.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,u.status===202){await u.body?.cancel(),CQ(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(w=>Bu.parse(w)):[Bu.parse(g)];for(const w of y)this.onmessage?.(w)}else throw await u.body?.cancel(),new $c(-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 $c(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 Jee extends Xee{constructor(t,n){super(t,n)}send(t,n){const r=ete(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function ete(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 tte extends GM{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},$1,n)}}const nte=async(e,t,n)=>{const r=rte(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const a=new tte({name:e?.name??"MCP Client",version:"1.0.0"});return await a.connect(r),{client:a,callStreamableTool:(i,c,u)=>{if(e.connection.type!=="HTTP")throw new Error("HTTP connection required");const d=new Headers(n);d.has("Authorization")||d.set("Authorization",`Bearer ${e.connection.token}`);for(const[p,g]of Object.entries(e.connection.headers??{}))d.set(p,g);const f=new URL(e.connection.url),m=f.pathname.replace(/\/+$/,"")||"/";return f.pathname=`${m}/call-tool/${encodeURIComponent(i)}`,fetch(f.href,{method:"POST",redirect:"manual",body:JSON.stringify(c),headers:d,signal:u})}}},rte=(e,t,n)=>{if(e.type==="Websocket")return new Wee(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:(c,u)=>fetch(c,{...u,headers:{...a,Accept:"text/event-stream"},signal:t})}),new Zee(new URL(e.url),i)}return new Jee(new URL(e.url),{requestInit:{headers:a,signal:t,credentials:"include"}})},pC=e=>{try{return JSON.parse(e)}catch{return e}},op=new Map,mC=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?rr(e.inputSchema):void 0,outputSchema:e.outputSchema?rr(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function ote(e){const t=n=>"connection"in e?nte({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)]){if(!y)throw new Error(`Tool ${String(f)} requires streaming support but client doesn't provide callStreamableTool`);return await y(String(f),d)}const{structuredContent:w,isError:S,content:b}=await g.callTool({name:String(f),arguments:d});if(S){const E=b?.[0]?.text,T=typeof E=="string"?pC(E):null,C=T?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(T.code,T.message,T.traceId):null;throw C||new Error(`Tool ${String(f)} returned an error: ${JSON.stringify(w??b)}`)}if(w!==void 0)return w;const R=b?.[0]?.text;return typeof R=="string"?pC(R):void 0}async function i(){const{client:d}=await t(),{tools:f}=await d.listTools();return f}async function c(){if(!("connection"in e))return i();const d=e.connection,f=JSON.stringify(d);try{return op.has(f)||op.set(f,i()),await op.get(f)}catch(m){console.error("Failed to list tools",m),op.delete(f);return}}async function u(){return(await c()??[]).map(f=>mC(f,a))}return a.asTool=async()=>{const f=(await c()??[]).find(m=>m.name===r);if(!f)throw new Error(`Tool ${r} not found`);return mC(f,a)},a}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>ate({connection:n}):global[t]}});function ate(e){return ote(e)}const tg=re({id:M().describe("Unique identifier for the entity"),title:M().describe("Human-readable title for the entity"),description:M().nullish().describe("Description of the entity"),created_at:M().datetime(),updated_at:M().datetime(),created_by:M().optional(),updated_by:M().optional()}),ste=re({field:ve(M()),operator:Et(["eq","gt","gte","lt","lte","in","like","contains"]),value:ot()}),JM=go(()=>mt([ste,re({operator:Et(["and","or","not"]),conditions:ve(JM)})])),ite=re({field:ve(M()),direction:Et(["asc","desc"]),nulls:Et(["first","last"]).optional()}),cte=re({where:JM.optional().describe("Filter expression"),orderBy:ve(ite).optional().describe("Sort expressions"),limit:Pe().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:Pe().int().min(0).optional().describe("Number of items to skip")});function lte(e){return re({items:ve(e).describe("Array of collection items"),totalCount:Pe().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:We().optional().describe("Whether there are more items available")})}const ute=re({id:M().describe("ID of the entity to retrieve")});function dte(e){return re({item:e.nullable().describe("The retrieved item, or null if not found")})}function fte(e){return re({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function hte(e){return re({item:e.describe("The created entity with generated id")})}function pte(e){return re({id:M().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function mte(e){return re({item:e.describe("The updated entity")})}const gte=re({id:M().describe("ID of the entity to delete")});function vte(e){return re({item:e.describe("The deleted entity")})}function ng(e,t,n){const r=e.toUpperCase(),a=n?.readOnly??!1,i=[{name:`COLLECTION_${r}_LIST`,inputSchema:cte,outputSchema:lte(t)},{name:`COLLECTION_${r}_GET`,inputSchema:ute,outputSchema:dte(t)}];return a||i.push({name:`COLLECTION_${r}_CREATE`,inputSchema:fte(t),outputSchema:hte(t),opt:!0},{name:`COLLECTION_${r}_UPDATE`,inputSchema:pte(t),outputSchema:mte(t),opt:!0},{name:`COLLECTION_${r}_DELETE`,inputSchema:gte,outputSchema:vte(t),opt:!0}),i}const yte=re({id:M(),name:M(),description:M().optional(),inputSchema:lt(M(),ot()),outputSchema:lt(M(),ot()).optional()}),_te=tg.extend({_meta:re({"io.decocms":re({id:M(),verified:We(),scopeName:M(),appName:M(),friendlyName:M().nullable().optional(),metadata:lt(M(),ot()).nullable().optional(),publishedAt:M().datetime().optional(),updatedAt:M().datetime().optional(),tools:ve(yte).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:re({$schema:M().optional(),_meta:lt(M(),ot()).optional(),name:M().describe("The server name (scope/app)"),title:M().optional().describe("User-friendly title"),description:M().optional().describe("Server description"),icons:ve(re({src:M(),mimeType:M().optional(),sizes:ve(M()).optional(),theme:Et(["light","dark"]).optional()})).optional(),remotes:ve(re({type:Et(["http","stdio","sse"]),url:M().optional(),headers:ve(ot()).optional()})).optional(),packages:ve(ot()).optional(),repository:re({url:M(),source:M().optional(),subfolder:M().optional()}).optional(),version:M().optional(),websiteUrl:M().optional()})});ng("registry_app",_te,{readOnly:!0});const bte=re({specversion:De("1.0").describe("CloudEvents specification version"),id:M().describe("Unique identifier for this event (UUID recommended)"),source:M().describe("Connection ID of the event publisher"),type:M().describe("Event type (e.g., 'order.created', 'user.signup')"),time:M().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:M().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:M().optional().default("application/json").describe("Content type of the data attribute"),dataschema:M().url().optional().describe("URI to the schema for the data attribute"),data:ot().optional().describe("Event payload (any JSON value)")});re({events:ve(bte).min(1).describe("Batch of CloudEvents to process")});const wte=re({success:We().optional().describe("Whether this event was processed successfully"),error:M().optional().describe("Error message for this event"),retryAfter:Pe().int().positive().optional().describe("Re-deliver this event after this many ms")});re({success:We().optional().describe("Batch success - applies to events not in results"),error:M().optional().describe("Batch error message - applies to events not in results"),processedCount:Pe().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:Pe().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:lt(M(),wte).optional().describe("Per-event results keyed by event ID")});re({type:M().min(1).max(255).describe("Event type identifier"),subject:M().max(255).optional().describe("Subject/resource identifier (e.g., order ID)"),data:ot().optional().describe("Event payload"),deliverAt:M().datetime().optional().describe("Scheduled delivery time (ISO 8601). Omit for immediate delivery."),cron:M().max(100).optional().describe("Cron expression for recurring delivery. Use EVENT_CANCEL to stop.")});re({id:M().describe("Unique event ID"),type:M().describe("Event type"),source:M().describe("Source connection ID"),time:M().describe("Event timestamp")});re({eventType:M().min(1).max(255).describe("Event type to subscribe to"),publisher:M().optional().describe("Filter events by publisher connection ID"),filter:M().max(1e3).optional().describe("JSONPath filter expression on event data")});re({subscription:re({id:M().describe("Subscription ID"),connectionId:M().describe("Subscriber connection ID"),eventType:M().describe("Event type pattern"),publisher:M().nullable().describe("Publisher connection filter"),filter:M().nullable().describe("JSONPath filter expression"),enabled:We().describe("Whether subscription is enabled"),createdAt:M().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:M().datetime().describe("Updated timestamp (ISO 8601)")})});const Ste=re({eventType:M().min(1).max(255).describe("Event type to subscribe to"),publisher:M().optional().describe("Filter events by publisher connection ID"),filter:M().max(1e3).optional().describe("JSONPath filter expression on event data")}),Ete=re({id:M().describe("Subscription ID"),connectionId:M().describe("Subscriber connection ID"),eventType:M().describe("Event type pattern"),publisher:M().nullable().describe("Publisher connection filter"),filter:M().nullable().describe("JSONPath filter expression"),enabled:We().describe("Whether subscription is enabled"),createdAt:M().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:M().datetime().describe("Updated timestamp (ISO 8601)")});re({subscriptions:ve(Ste).describe("Desired subscriptions - system will create/update/delete to match")});re({created:Pe().int().min(0).describe("Number of subscriptions created"),updated:Pe().int().min(0).describe("Number of subscriptions with filter updated"),deleted:Pe().int().min(0).describe("Number of subscriptions removed"),unchanged:Pe().int().min(0).describe("Number of subscriptions unchanged"),subscriptions:ve(Ete).describe("Current subscriptions after sync")});re({subscriptionId:M().describe("Subscription ID to remove")});re({success:We().describe("Whether unsubscribe was successful"),subscriptionId:M().describe("Subscription ID that was removed")});re({eventId:M().describe("Event ID to cancel")});re({success:We().describe("Whether cancellation was successful"),eventId:M().describe("Event ID that was cancelled")});re({eventId:M().describe("Event ID to acknowledge")});re({success:We().describe("Whether ACK was successful"),eventId:M().describe("Event ID that was acknowledged")});const Rte=re({prefix:M().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:Pe().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:M().optional().describe("Token for pagination from previous response"),delimiter:M().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")}),xte=re({objects:ve(re({key:M().describe("Object key/path"),size:Pe().describe("Object size in bytes"),lastModified:M().describe("Last modified timestamp"),etag:M().describe("Entity tag for the object")})),nextContinuationToken:M().optional().describe("Token for fetching next page of results"),isTruncated:We().describe("Whether there are more results available"),commonPrefixes:ve(M()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")}),Tte=re({key:M().describe("Object key/path to get metadata for")}),Ote=re({contentType:M().optional().describe("MIME type of the object"),contentLength:Pe().describe("Size of the object in bytes"),lastModified:M().describe("Last modified timestamp"),etag:M().describe("Entity tag for the object"),metadata:lt(M(),M()).optional().describe("Custom metadata key-value pairs")}),Cte=re({key:M().describe("Object key/path to generate URL for"),expiresIn:Pe().optional().describe("URL expiration time in seconds (default: from state config or 3600)")}),Ate=re({url:M().describe("Presigned URL for downloading the object"),expiresIn:Pe().describe("Expiration time in seconds that was used")}),Ite=re({key:M().describe("Object key/path for the upload"),expiresIn:Pe().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:M().optional().describe("MIME type for the object being uploaded")}),Nte=re({url:M().describe("Presigned URL for uploading the object"),expiresIn:Pe().describe("Expiration time in seconds that was used")}),kte=re({key:M().describe("Object key/path to delete")}),Mte=re({success:We().describe("Whether the deletion was successful"),key:M().describe("The key that was deleted")}),Pte=re({keys:ve(M()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")}),Dte=re({deleted:ve(M()).describe("Array of successfully deleted keys"),errors:ve(re({key:M(),message:M()})).describe("Array of errors for failed deletions")}),Lte=[{name:"LIST_OBJECTS",inputSchema:Rte,outputSchema:xte},{name:"GET_OBJECT_METADATA",inputSchema:Tte,outputSchema:Ote},{name:"GET_PRESIGNED_URL",inputSchema:Cte,outputSchema:Ate},{name:"PUT_PRESIGNED_URL",inputSchema:Ite,outputSchema:Nte},{name:"DELETE_OBJECT",inputSchema:kte,outputSchema:Mte},{name:"DELETE_OBJECTS",inputSchema:Pte,outputSchema:Dte}],jte=re({toolName:M().describe("Name of the tool to invoke on that connection"),transformCode:M().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),$te=re({code:M().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
|
|
175
|
+
The input is the resolved value of the references in the input field. Example:
|
|
176
|
+
{
|
|
177
|
+
"input": {
|
|
178
|
+
"name": "@Step_1.name",
|
|
179
|
+
"age": "@Step_2.age"
|
|
180
|
+
},
|
|
181
|
+
"code": "export default function(input): Output { return { result: \`\${input.name} is \${input.age} years old.\` } }"
|
|
182
|
+
}
|
|
183
|
+
`)});re({signalName:M().describe("Signal name to wait for (e.g., 'approval'). Execution pauses until SEND_SIGNAL is called with this name.")});const Ute=mt([jte.describe("Call an external tool via MCP connection. "),$te.describe("Run pure TypeScript code for data transformation. Useful to merge data from multiple steps and transform it.")]),zte=re({maxAttempts:Pe().optional().describe("Max retry attempts on failure (default: 1, no retries)"),backoffMs:Pe().optional().describe("Initial delay between retries in ms (doubles each attempt)"),timeoutMs:Pe().optional().describe("Max execution time in ms before step fails (default: 30000)"),onError:Et(["fail","continue"]).optional().describe("What to do when this step fails: 'fail' aborts the workflow, 'continue' skips the error and proceeds")}),eP=go(()=>re({type:M().optional(),properties:lt(M(),ot()).optional(),required:ve(M()).optional(),description:M().optional(),additionalProperties:We().optional(),additionalItems:We().optional(),items:eP.optional()}).passthrough()),Vte=re({name:M().min(1).describe("Unique identifier for this step. Other steps reference its output as @name.field"),description:M().optional().describe("What this step does"),action:Ute,input:lt(M(),ot()).optional().describe("Data passed to the action. Use @ref for dynamic values: @input.field (workflow input), @stepName.field (previous step output), @item/@index (loop context). Example: { 'userId': '@input.user_id', 'data': '@fetch.result' }"),outputSchema:eP.optional().describe("Optional JSON Schema describing the expected output of the step."),config:zte.optional().describe("Retry and timeout settings"),forEach:re({ref:M().describe("@ ref to the step to iterate over"),concurrency:Pe().optional().default(1).describe("max parallel iterations. default is 1 (sequential)")}).optional()}),Fte=Et(["enqueued","running","success","error","failed","cancelled"]).default("enqueued"),tP=tg.extend({virtual_mcp_id:M().describe("ID of the virtual MCP (agent) that will be used to execute the workflow"),status:Fte.describe("Current status of the workflow execution"),input:lt(M(),ot()).optional().describe("Input data for the workflow execution"),output:ot().optional().describe("Output data for the workflow execution"),completed_at_epoch_ms:Pe().nullish().describe("Timestamp of when the workflow execution completed"),start_at_epoch_ms:Pe().nullish().describe("Timestamp of when the workflow execution started or will start"),timeout_ms:Pe().nullish().describe("Timeout in milliseconds for the workflow execution"),deadline_at_epoch_ms:Pe().nullish().describe("Deadline for the workflow execution - when the workflow execution will be cancelled if it is not completed. This is read-only and is set by the workflow engine when an execution is created."),error:ot().nullish().describe("Error that occurred during the workflow execution"),completed_steps:re({success:ve(re({name:M(),completed_at_epoch_ms:Pe()})).describe("Names of the steps that were completed successfully"),error:ve(M()).describe("Names of the steps that errored")}).optional().describe("Names of the steps that were completed and their status"),running_steps:ve(M()).optional().describe("Names of the steps that are currently running")}),qte=Et(["signal","timer","message","output","step_started","step_completed","workflow_started","workflow_completed"]);tg.extend({execution_id:M(),type:qte,name:M().nullish(),payload:ot().optional(),visible_at:Pe().nullish(),consumed_at:Pe().nullish(),source_execution_id:M().nullish()});const Bte=tg.extend({description:M().optional().describe("Human-readable summary of what this workflow does"),steps:ve(Vte).describe("Ordered list of steps. Execution order is auto-determined by @ref dependencies: steps with no @ref dependencies run in parallel; steps referencing @stepName wait for that step to complete.")}),Hte=ng("workflow",Bte),Gte={maxAttempts:1,timeoutMs:3e4},Ooe={name:"Initial Step",action:{code:`
|
|
184
|
+
interface Input {
|
|
185
|
+
example: string;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
interface Output {
|
|
189
|
+
result: unknown;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export default async function(input: Input): Promise<Output> {
|
|
193
|
+
return {
|
|
194
|
+
result: input.example
|
|
195
|
+
}
|
|
196
|
+
}`},config:Gte,outputSchema:{type:"object",properties:{result:{type:"string",description:"The result of the step"}},required:["result"],description:"The output of the step. This is a JSON Schema describing the expected output of the step."}},Zte=ng("workflow_execution",tP),Kte=[...Hte,...Zte],Coe=[...Kte],Aoe=ng("workflow_execution",tP),rg=Et(["passing","warning","failing","info"]),Wte=re({label:M().describe("Metric label (e.g. 'LCP', 'Performance')"),value:mt([Pe(),M()]).describe("Current metric value"),unit:M().optional().describe("Unit of measurement (e.g. 's', 'ms', 'score')"),previousValue:mt([Pe(),M()]).optional().describe("Previous value for delta comparison"),status:rg.optional().describe("Status of this individual metric")}),Yte=re({label:M().describe("Short name of the criterion"),description:M().optional().describe("Longer explanation"),status:rg.optional().describe("Status of this individual criterion (passing/warning/failing/info)")}),Qte=re({position:Pe().describe("Current rank position"),reference_position:Pe().optional().describe("Previous rank position before reordering. Used to compute delta automatically (delta = reference_position - position)."),delta:Pe().optional().describe("Explicit change in position. Ignored when reference_position is provided."),label:M().describe("Item name"),image:M().describe("URL of the item image"),values:ve(mt([M(),Pe()])).describe("Values matching columns"),note:mt([M(),lt(M(),mt([M(),Pe()]))]).optional().describe("Inline annotation or structured key-value metrics")}),Xte=xb("type",[re({type:De("markdown"),content:M().describe("Markdown content")}),re({type:De("metrics"),title:M().optional().describe("Section title"),items:ve(Wte).describe("Metric items")}),re({type:De("table"),title:M().optional().describe("Section title"),columns:ve(M()).describe("Column headers"),rows:ve(ve(mt([M(),Pe(),_l()]))).describe("Table rows")}),re({type:De("criteria"),title:M().optional().describe("Section title"),items:ve(Yte).describe("List of criteria items")}),re({type:De("note"),content:M().describe("The note text")}),re({type:De("ranked-list"),title:M().optional().describe("Section title"),rows:ve(Qte).describe("Ranked items")})]),nP=Et(["unread","read","dismissed"]),rP=re({id:M().describe("Unique report identifier"),title:M().describe("Report title"),category:M().describe("Report category (e.g. 'performance', 'security', 'accessibility')"),status:rg.describe("Overall report status"),summary:M().describe("One-line summary of findings"),updatedAt:M().describe("ISO 8601 timestamp of last update"),source:M().optional().describe("Agent or service that generated the report (e.g. 'security-auditor', 'performance-monitor')"),tags:ve(M()).optional().describe("Free-form tags for filtering (e.g. 'homepage', 'api', 'ci')"),lifecycleStatus:nP.optional().describe("Inbox lifecycle status of the report (default: unread)")}),Jte=rP.extend({sections:ve(Xte).describe("Ordered content sections")}),ene=re({category:M().optional().describe("Filter by category (e.g. 'performance', 'security')"),status:rg.optional().describe("Filter by report status")}),tne=re({reports:ve(rP).describe("List of report summaries")}),nne=re({id:M().describe("Report identifier")}),rne=Jte,one=re({reportId:M().describe("Report identifier"),lifecycleStatus:nP.describe("New lifecycle status for the report")}),ane=re({success:We().describe("Whether the operation succeeded"),message:M().optional().describe("Human-readable result message")}),sne=[{name:"REPORTS_LIST",inputSchema:ene,outputSchema:tne},{name:"REPORTS_GET",inputSchema:nne,outputSchema:rne},{name:"REPORTS_UPDATE_STATUS",inputSchema:one,outputSchema:ane,opt:!0}],oP=({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:"M20 12.5V6.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 2 16.88 2 15.2 2H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 4.28 4 5.12 4 6.8v10.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 22 7.12 22 8.8 22H12m2-11H8m2 4H8m8-8H8m6.5 12 2 2 4.5-4.5"}));oP.displayName="FileCheck02";const aP=({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"}));aP.displayName="Folder";const sP=({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:"M20.5 7.278 12 12m0 0L3.5 7.278M12 12v9.5m9-5.441V7.942c0-.343 0-.514-.05-.667a1 1 0 0 0-.215-.364c-.109-.119-.258-.202-.558-.368l-7.4-4.111c-.284-.158-.425-.237-.575-.267a1 1 0 0 0-.403 0c-.15.03-.292.11-.576.267l-7.4 4.11c-.3.167-.45.25-.558.369a1 1 0 0 0-.215.364C3 7.428 3 7.599 3 7.942v8.117c0 .342 0 .514.05.666a1 1 0 0 0 .215.364c.109.119.258.202.558.368l7.4 4.111c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l7.4-4.11c.3-.167.45-.25.558-.369a.999.999 0 0 0 .215-.364c.05-.152.05-.324.05-.666ZM16.5 9.5l-9-5"}));sP.displayName="Package";function gC(e,t,n,r){return e?e.startsWith("/")?`/${t}/${n}/${r}${e}`:e:`/${t}/${n}/${r}`}function ine(e){return{createRoutes:e,useParams:t=>Qc({strict:!1}),useSearch:t=>wm({strict:!1}),useNavigate:()=>{const t=vl(),{org:n,project:r,pluginId:a}=Qc({strict:!1});return i=>{const c=gC(i.to,n,r,a);return t({...i,to:c,params:{org:n,project:r,pluginId:a,...i.params}})}},useLocation:()=>rL(),Link:function(n){const{org:r,project:a,pluginId:i}=Qc({strict:!1}),c=gC(n.to,r,a,i);return x.jsx(Em,{...n,to:c,params:{org:r,project:a,pluginId:i,...n.params}})},_types:{routes:void 0,routeIds:void 0}}}var At;(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 c of a)i[c]=c;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),c={};for(const u of i)c[u]=a[u];return e.objectValues(c)},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 c in a)Object.prototype.hasOwnProperty.call(a,c)&&i.push(c);return i},e.find=(a,i)=>{for(const c of a)if(i(c))return c},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(c=>typeof c=="string"?`'${c}'`:c).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(At||(At={}));var vC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(vC||(vC={}));const Fe=At.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ss=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}},Ie=At.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 ja 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 c of i.issues)if(c.code==="invalid_union")c.unionErrors.map(a);else if(c.code==="invalid_return_type")a(c.returnTypeError);else if(c.code==="invalid_arguments")a(c.argumentsError);else if(c.path.length===0)r._errors.push(n(c));else{let u=r,d=0;for(;d<c.path.length;){const f=c.path[d];d===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(c))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(this),r}static assert(t){if(!(t instanceof ja))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,At.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()}}ja.create=e=>new ja(e);const X_=(e,t)=>{let n;switch(e.code){case Ie.invalid_type:e.received===Fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ie.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,At.jsonStringifyReplacer)}`;break;case Ie.unrecognized_keys:n=`Unrecognized key(s) in object: ${At.joinValues(e.keys,", ")}`;break;case Ie.invalid_union:n="Invalid input";break;case Ie.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${At.joinValues(e.options)}`;break;case Ie.invalid_enum_value:n=`Invalid enum value. Expected ${At.joinValues(e.options)}, received '${e.received}'`;break;case Ie.invalid_arguments:n="Invalid function arguments";break;case Ie.invalid_return_type:n="Invalid function return type";break;case Ie.invalid_date:n="Invalid date";break;case Ie.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}"`:At.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ie.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 Ie.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 Ie.custom:n="Invalid input";break;case Ie.invalid_intersection_types:n="Intersection results could not be merged";break;case Ie.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ie.not_finite:n="Number must be finite";break;default:n=t.defaultError,At.assertNever(e)}return{message:n}};let cne=X_;function lne(){return cne}const une=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],c={...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(c,{data:t,defaultError:u}).message;return{...a,path:i,message:u}};function Le(e,t){const n=lne(),r=une({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===X_?void 0:X_].filter(a=>!!a)});e.common.issues.push(r)}class Wr{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,c=await a.value;r.push({key:i,value:c})}return Wr.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:c}=a;if(i.status==="aborted"||c.status==="aborted")return tt;i.status==="dirty"&&t.dirty(),c.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof c.value<"u"||a.alwaysSet)&&(r[i.value]=c.value)}return{status:t.value,value:r}}}const tt=Object.freeze({status:"aborted"}),Pu=e=>({status:"dirty",value:e}),_o=e=>({status:"valid",value:e}),yC=e=>e.status==="aborted",_C=e=>e.status==="dirty",fl=e=>e.status==="valid",dm=e=>typeof Promise<"u"&&e instanceof Promise;var Be;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Be||(Be={}));class js{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 bC=(e,t)=>{if(fl(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 ja(e.common.issues);return this._error=n,this._error}}};function pt(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:(c,u)=>{const{message:d}=e;return c.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:a}}class Tt{get description(){return this._def.description}_getType(t){return Ss(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ss(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Wr,ctx:{common:t.parent.common,data:t.data,parsedType:Ss(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(dm(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:Ss(t)},a=this._parseSync({data:t,path:r.path,parent:r});return bC(r,a)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ss(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return fl(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=>fl(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:Ss(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(dm(a)?a:Promise.resolve(a));return bC(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 c=t(a),u=()=>i.addIssue({code:Ie.custom,...r(a)});return typeof Promise<"u"&&c instanceof Promise?c.then(d=>d?!0:(u(),!1)):c?!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 pl({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 ks.create(this,this._def)}nullable(){return ml.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ta.create(this)}promise(){return mm.create(this,this._def)}or(t){return hm.create([this,t],this._def)}and(t){return pm.create(this,t,this._def)}transform(t){return new pl({...pt(this._def),schema:this,typeName:nt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new tb({...pt(this._def),innerType:this,defaultValue:n,typeName:nt.ZodDefault})}brand(){return new Mne({typeName:nt.ZodBranded,type:this,...pt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new nb({...pt(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 G1.create(this,t)}readonly(){return rb.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const dne=/^c[^\s-]{8,}$/i,fne=/^[0-9a-z]+$/,hne=/^[0-9A-HJKMNP-TV-Z]{26}$/i,pne=/^[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,mne=/^[a-z0-9_-]{21}$/i,gne=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vne=/^[-+]?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)?)??$/,yne=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_ne="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let z0;const bne=/^(?:(?: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])$/,wne=/^(?:(?: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])$/,Sne=/^(([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]))$/,Ene=/^(([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])$/,Rne=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,xne=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,iP="((\\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])))",Tne=new RegExp(`^${iP}$`);function cP(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 One(e){return new RegExp(`^${cP(e)}$`)}function Cne(e){let t=`${iP}T${cP(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 Ane(e,t){return!!((t==="v4"||!t)&&bne.test(e)||(t==="v6"||!t)&&Sne.test(e))}function Ine(e,t){if(!gne.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 Nne(e,t){return!!((t==="v4"||!t)&&wne.test(e)||(t==="v6"||!t)&&Ene.test(e))}class Ts extends Tt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Fe.string){const i=this._getOrReturnCtx(t);return Le(i,{code:Ie.invalid_type,expected:Fe.string,received:i.parsedType}),tt}const r=new Wr;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),Le(a,{code:Ie.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),Le(a,{code:Ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const c=t.data.length>i.value,u=t.data.length<i.value;(c||u)&&(a=this._getOrReturnCtx(t,a),c?Le(a,{code:Ie.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&Le(a,{code:Ie.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")yne.test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"email",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")z0||(z0=new RegExp(_ne,"u")),z0.test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"emoji",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")pne.test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"uuid",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")mne.test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"nanoid",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")dne.test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"cuid",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")fne.test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"cuid2",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")hne.test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"ulid",code:Ie.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),Le(a,{validation:"url",code:Ie.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),Le(a,{validation:"regex",code:Ie.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),Le(a,{code:Ie.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),Le(a,{code:Ie.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),Le(a,{code:Ie.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Cne(i).test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{code:Ie.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Tne.test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{code:Ie.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?One(i).test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{code:Ie.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?vne.test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"duration",code:Ie.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Ane(t.data,i.version)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"ip",code:Ie.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Ine(t.data,i.alg)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"jwt",code:Ie.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Nne(t.data,i.version)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"cidr",code:Ie.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Rne.test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"base64",code:Ie.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?xne.test(t.data)||(a=this._getOrReturnCtx(t,a),Le(a,{validation:"base64url",code:Ie.invalid_string,message:i.message}),r.dirty()):At.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:Ie.invalid_string,...Be.errToObj(r)})}_addCheck(t){return new Ts({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Be.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Be.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Be.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Be.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Be.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Be.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Be.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Be.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Be.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Be.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Be.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Be.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Be.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,...Be.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,...Be.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Be.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Be.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Be.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Be.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Be.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Be.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Be.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Be.errToObj(n)})}nonempty(t){return this.min(1,Be.errToObj(t))}trim(){return new Ts({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ts({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ts({...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}}Ts.create=e=>new Ts({checks:[],typeName:nt.ZodString,coerce:e?.coerce??!1,...pt(e)});function kne(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(".","")),c=Number.parseInt(t.toFixed(a).replace(".",""));return i%c/10**a}class ld extends Tt{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 Le(i,{code:Ie.invalid_type,expected:Fe.number,received:i.parsedType}),tt}let r;const a=new Wr;for(const i of this._def.checks)i.kind==="int"?At.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Le(r,{code:Ie.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),Le(r,{code:Ie.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),Le(r,{code:Ie.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?kne(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),Le(r,{code:Ie.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Le(r,{code:Ie.not_finite,message:i.message}),a.dirty()):At.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Be.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Be.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Be.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Be.toString(n))}setLimit(t,n,r,a){return new ld({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Be.toString(a)}]})}_addCheck(t){return new ld({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Be.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Be.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Be.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Be.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Be.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Be.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Be.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Be.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Be.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"&&At.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)}}ld.create=e=>new ld({checks:[],typeName:nt.ZodNumber,coerce:e?.coerce||!1,...pt(e)});class ud extends Tt{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 Wr;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),Le(r,{code:Ie.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),Le(r,{code:Ie.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),Le(r,{code:Ie.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):At.assertNever(i);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Le(n,{code:Ie.invalid_type,expected:Fe.bigint,received:n.parsedType}),tt}gte(t,n){return this.setLimit("min",t,!0,Be.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Be.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Be.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Be.toString(n))}setLimit(t,n,r,a){return new ud({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Be.toString(a)}]})}_addCheck(t){return new ud({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Be.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Be.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Be.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Be.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Be.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}}ud.create=e=>new ud({checks:[],typeName:nt.ZodBigInt,coerce:e?.coerce??!1,...pt(e)});class J_ extends Tt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Fe.boolean){const r=this._getOrReturnCtx(t);return Le(r,{code:Ie.invalid_type,expected:Fe.boolean,received:r.parsedType}),tt}return _o(t.data)}}J_.create=e=>new J_({typeName:nt.ZodBoolean,coerce:e?.coerce||!1,...pt(e)});class fm extends Tt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Fe.date){const i=this._getOrReturnCtx(t);return Le(i,{code:Ie.invalid_type,expected:Fe.date,received:i.parsedType}),tt}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Le(i,{code:Ie.invalid_date}),tt}const r=new Wr;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),Le(a,{code:Ie.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),Le(a,{code:Ie.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):At.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new fm({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Be.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Be.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}}fm.create=e=>new fm({checks:[],coerce:e?.coerce||!1,typeName:nt.ZodDate,...pt(e)});class wC extends Tt{_parse(t){if(this._getType(t)!==Fe.symbol){const r=this._getOrReturnCtx(t);return Le(r,{code:Ie.invalid_type,expected:Fe.symbol,received:r.parsedType}),tt}return _o(t.data)}}wC.create=e=>new wC({typeName:nt.ZodSymbol,...pt(e)});class SC extends Tt{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return Le(r,{code:Ie.invalid_type,expected:Fe.undefined,received:r.parsedType}),tt}return _o(t.data)}}SC.create=e=>new SC({typeName:nt.ZodUndefined,...pt(e)});class EC extends Tt{_parse(t){if(this._getType(t)!==Fe.null){const r=this._getOrReturnCtx(t);return Le(r,{code:Ie.invalid_type,expected:Fe.null,received:r.parsedType}),tt}return _o(t.data)}}EC.create=e=>new EC({typeName:nt.ZodNull,...pt(e)});class RC extends Tt{constructor(){super(...arguments),this._any=!0}_parse(t){return _o(t.data)}}RC.create=e=>new RC({typeName:nt.ZodAny,...pt(e)});class xC extends Tt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return _o(t.data)}}xC.create=e=>new xC({typeName:nt.ZodUnknown,...pt(e)});class $s extends Tt{_parse(t){const n=this._getOrReturnCtx(t);return Le(n,{code:Ie.invalid_type,expected:Fe.never,received:n.parsedType}),tt}}$s.create=e=>new $s({typeName:nt.ZodNever,...pt(e)});class TC extends Tt{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return Le(r,{code:Ie.invalid_type,expected:Fe.void,received:r.parsedType}),tt}return _o(t.data)}}TC.create=e=>new TC({typeName:nt.ZodVoid,...pt(e)});class ta extends Tt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Fe.array)return Le(n,{code:Ie.invalid_type,expected:Fe.array,received:n.parsedType}),tt;if(a.exactLength!==null){const c=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(c||u)&&(Le(n,{code:c?Ie.too_big:Ie.too_small,minimum:u?a.exactLength.value:void 0,maximum:c?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&&(Le(n,{code:Ie.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&&(Le(n,{code:Ie.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((c,u)=>a.type._parseAsync(new js(n,c,n.path,u)))).then(c=>Wr.mergeArray(r,c));const i=[...n.data].map((c,u)=>a.type._parseSync(new js(n,c,n.path,u)));return Wr.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ta({...this._def,minLength:{value:t,message:Be.toString(n)}})}max(t,n){return new ta({...this._def,maxLength:{value:t,message:Be.toString(n)}})}length(t,n){return new ta({...this._def,exactLength:{value:t,message:Be.toString(n)}})}nonempty(t){return this.min(1,t)}}ta.create=(e,t)=>new ta({type:e,minLength:null,maxLength:null,exactLength:null,typeName:nt.ZodArray,...pt(t)});function Bc(e){if(e instanceof wn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ks.create(Bc(r))}return new wn({...e._def,shape:()=>t})}else return e instanceof ta?new ta({...e._def,type:Bc(e.element)}):e instanceof ks?ks.create(Bc(e.unwrap())):e instanceof ml?ml.create(Bc(e.unwrap())):e instanceof Pi?Pi.create(e.items.map(t=>Bc(t))):e}class wn extends Tt{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=At.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 Le(f,{code:Ie.invalid_type,expected:Fe.object,received:f.parsedType}),tt}const{status:r,ctx:a}=this._processInputParams(t),{shape:i,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof $s&&this._def.unknownKeys==="strip"))for(const f in a.data)c.includes(f)||u.push(f);const d=[];for(const f of c){const m=i[f],p=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new js(a,p,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof $s){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&&(Le(a,{code:Ie.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 js(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=>Wr.mergeObjectSync(r,f)):Wr.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Be.errToObj,new wn({...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:Be.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new wn({...this._def,unknownKeys:"strip"})}passthrough(){return new wn({...this._def,unknownKeys:"passthrough"})}extend(t){return new wn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new wn({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 wn({...this._def,catchall:t})}pick(t){const n={};for(const r of At.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new wn({...this._def,shape:()=>n})}omit(t){const n={};for(const r of At.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new wn({...this._def,shape:()=>n})}deepPartial(){return Bc(this)}partial(t){const n={};for(const r of At.objectKeys(this.shape)){const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}return new wn({...this._def,shape:()=>n})}required(t){const n={};for(const r of At.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof ks;)i=i._def.innerType;n[r]=i}return new wn({...this._def,shape:()=>n})}keyof(){return lP(At.objectKeys(this.shape))}}wn.create=(e,t)=>new wn({shape:()=>e,unknownKeys:"strip",catchall:$s.create(),typeName:nt.ZodObject,...pt(t)});wn.strictCreate=(e,t)=>new wn({shape:()=>e,unknownKeys:"strict",catchall:$s.create(),typeName:nt.ZodObject,...pt(t)});wn.lazycreate=(e,t)=>new wn({shape:e,unknownKeys:"strip",catchall:$s.create(),typeName:nt.ZodObject,...pt(t)});class hm extends Tt{_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 c=i.map(u=>new ja(u.ctx.common.issues));return Le(n,{code:Ie.invalid_union,unionErrors:c}),tt}if(n.common.async)return Promise.all(r.map(async i=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(a);{let i;const c=[];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&&c.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const u=c.map(d=>new ja(d));return Le(n,{code:Ie.invalid_union,unionErrors:u}),tt}}get options(){return this._def.options}}hm.create=(e,t)=>new hm({options:e,typeName:nt.ZodUnion,...pt(t)});function eb(e,t){const n=Ss(e),r=Ss(t);if(e===t)return{valid:!0,data:e};if(n===Fe.object&&r===Fe.object){const a=At.objectKeys(t),i=At.objectKeys(e).filter(u=>a.indexOf(u)!==-1),c={...e,...t};for(const u of i){const d=eb(e[u],t[u]);if(!d.valid)return{valid:!1};c[u]=d.data}return{valid:!0,data:c}}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 c=e[i],u=t[i],d=eb(c,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 pm extends Tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,c)=>{if(yC(i)||yC(c))return tt;const u=eb(i.value,c.value);return u.valid?((_C(i)||_C(c))&&n.dirty(),{status:n.value,value:u.data}):(Le(r,{code:Ie.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,c])=>a(i,c)):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}))}}pm.create=(e,t,n)=>new pm({left:e,right:t,typeName:nt.ZodIntersection,...pt(n)});class Pi extends Tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.array)return Le(r,{code:Ie.invalid_type,expected:Fe.array,received:r.parsedType}),tt;if(r.data.length<this._def.items.length)return Le(r,{code:Ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),tt;!this._def.rest&&r.data.length>this._def.items.length&&(Le(r,{code:Ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((c,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new js(r,c,r.path,u)):null}).filter(c=>!!c);return r.common.async?Promise.all(i).then(c=>Wr.mergeArray(n,c)):Wr.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Pi({...this._def,rest:t})}}Pi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Pi({items:e,typeName:nt.ZodTuple,rest:null,...pt(t)})};class OC extends Tt{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 Le(r,{code:Ie.invalid_type,expected:Fe.map,received:r.parsedType}),tt;const a=this._def.keyType,i=this._def.valueType,c=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new js(r,u,r.path,[f,"key"])),value:i._parse(new js(r,d,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of c){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 c){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}}}}OC.create=(e,t,n)=>new OC({valueType:t,keyType:e,typeName:nt.ZodMap,...pt(n)});class dd extends Tt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.set)return Le(r,{code:Ie.invalid_type,expected:Fe.set,received:r.parsedType}),tt;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(Le(r,{code:Ie.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&&(Le(r,{code:Ie.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function c(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 js(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>c(d)):c(u)}min(t,n){return new dd({...this._def,minSize:{value:t,message:Be.toString(n)}})}max(t,n){return new dd({...this._def,maxSize:{value:t,message:Be.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}dd.create=(e,t)=>new dd({valueType:e,minSize:null,maxSize:null,typeName:nt.ZodSet,...pt(t)});class CC extends Tt{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})}}CC.create=(e,t)=>new CC({getter:e,typeName:nt.ZodLazy,...pt(t)});class AC extends Tt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Le(n,{received:n.data,code:Ie.invalid_literal,expected:this._def.value}),tt}return{status:"valid",value:t.data}}get value(){return this._def.value}}AC.create=(e,t)=>new AC({value:e,typeName:nt.ZodLiteral,...pt(t)});function lP(e,t){return new hl({values:e,typeName:nt.ZodEnum,...pt(t)})}class hl extends Tt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Le(n,{expected:At.joinValues(r),received:n.parsedType,code:Ie.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 Le(n,{received:n.data,code:Ie.invalid_enum_value,options:r}),tt}return _o(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 hl.create(t,{...this._def,...n})}exclude(t,n=this._def){return hl.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}hl.create=lP;class IC extends Tt{_parse(t){const n=At.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Fe.string&&r.parsedType!==Fe.number){const a=At.objectValues(n);return Le(r,{expected:At.joinValues(a),received:r.parsedType,code:Ie.invalid_type}),tt}if(this._cache||(this._cache=new Set(At.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=At.objectValues(n);return Le(r,{received:r.data,code:Ie.invalid_enum_value,options:a}),tt}return _o(t.data)}get enum(){return this._def.values}}IC.create=(e,t)=>new IC({values:e,typeName:nt.ZodNativeEnum,...pt(t)});class mm extends Tt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Fe.promise&&n.common.async===!1)return Le(n,{code:Ie.invalid_type,expected:Fe.promise,received:n.parsedType}),tt;const r=n.parsedType===Fe.promise?n.data:Promise.resolve(n.data);return _o(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}mm.create=(e,t)=>new mm({type:e,typeName:nt.ZodPromise,...pt(t)});class pl extends Tt{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:c=>{Le(r,c),c.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const c=a.transform(r.data,i);if(r.common.async)return Promise.resolve(c).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"?Pu(d.value):d});{if(n.value==="aborted")return tt;const u=this._def.schema._parseSync({data:c,path:r.path,parent:r});return u.status==="aborted"?tt:u.status==="dirty"||n.value==="dirty"?Pu(u.value):u}}if(a.type==="refinement"){const c=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(),c(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(),c(u.value).then(()=>({status:n.value,value:u.value}))))}if(a.type==="transform")if(r.common.async===!1){const c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!fl(c))return tt;const u=a.transform(c.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(c=>fl(c)?Promise.resolve(a.transform(c.value,i)).then(u=>({status:n.value,value:u})):tt);At.assertNever(a)}}pl.create=(e,t,n)=>new pl({schema:e,typeName:nt.ZodEffects,effect:t,...pt(n)});pl.createWithPreprocess=(e,t,n)=>new pl({schema:t,effect:{type:"preprocess",transform:e},typeName:nt.ZodEffects,...pt(n)});class ks extends Tt{_parse(t){return this._getType(t)===Fe.undefined?_o(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ks.create=(e,t)=>new ks({innerType:e,typeName:nt.ZodOptional,...pt(t)});class ml extends Tt{_parse(t){return this._getType(t)===Fe.null?_o(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ml.create=(e,t)=>new ml({innerType:e,typeName:nt.ZodNullable,...pt(t)});class tb extends Tt{_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}}tb.create=(e,t)=>new tb({innerType:e,typeName:nt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...pt(t)});class nb extends Tt{_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 dm(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ja(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new ja(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}nb.create=(e,t)=>new nb({innerType:e,typeName:nt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...pt(t)});class NC extends Tt{_parse(t){if(this._getType(t)!==Fe.nan){const r=this._getOrReturnCtx(t);return Le(r,{code:Ie.invalid_type,expected:Fe.nan,received:r.parsedType}),tt}return{status:"valid",value:t.data}}}NC.create=e=>new NC({typeName:nt.ZodNaN,...pt(e)});class Mne extends Tt{_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 G1 extends Tt{_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(),Pu(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 G1({in:t,out:n,typeName:nt.ZodPipeline})}}class rb extends Tt{_parse(t){const n=this._def.innerType._parse(t),r=a=>(fl(a)&&(a.value=Object.freeze(a.value)),a);return dm(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}rb.create=(e,t)=>new rb({innerType:e,typeName:nt.ZodReadonly,...pt(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 Pne=Ts.create,Dne=J_.create;$s.create;ta.create;const Lne=wn.create;hm.create;pm.create;Pi.create;const jne=hl.create;mm.create;ks.create;ml.create;const $ne=Lne({path:Pne().optional().default(""),flat:Dne().optional().default(!1),view:jne(["table","grid"]).optional().default("grid")}),Une=ine(e=>{const{createRoute:t,lazyRouteComponent:n}=e.routing;return[t({getParentRoute:()=>e.parentRoute,path:"/",component:n(()=>xt(()=>import("./file-browser-CeBgj9Bh.js").then(a=>a.b),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]))),validateSearch:$ne})]}),zne=A.lazy(()=>xt(()=>import("./plugin-header-DqwJE7vc.js"),__vite__mapDeps([18,6,19]))),Vne=A.lazy(()=>xt(()=>import("./plugin-empty-state-DMdw5AKa.js"),[])),Fne={id:"object-storage",description:"Browse and manage files in S3-compatible object storage",binding:Lte,renderHeader:e=>x.jsx(zne,{...e}),renderEmptyState:()=>x.jsx(Vne,{}),setup:e=>{const{registerSidebarGroup:t,registerPluginRoutes:n}=e;t({id:"object-storage",label:"Object Storage",items:[{icon:x.jsx(aP,{size:16}),label:"File browser"}],defaultExpanded:!0});const r=Une.createRoutes(e);n(r)}},qne="private-registry",Bne="Organization private MCP registry with CRUD and Store integration",Ioe=`
|
|
197
|
+
You are an MCP tool tester running automated integration checks.
|
|
198
|
+
|
|
199
|
+
Goal:
|
|
200
|
+
- Validate that this MCP and its tools work end-to-end.
|
|
201
|
+
- Prefer realistic sequences where one tool output feeds the next tool input.
|
|
202
|
+
- Example chain: list -> pick id -> get/update/delete.
|
|
203
|
+
|
|
204
|
+
Rules:
|
|
205
|
+
- Try to execute as many tools as possible.
|
|
206
|
+
- If a tool requires context, first call discovery/list tools to obtain valid IDs.
|
|
207
|
+
- If you create test data, clean it up when possible.
|
|
208
|
+
- If one tool fails, continue testing the remaining tools.
|
|
209
|
+
- If a tool returns input validation errors, fix the arguments and retry that tool.
|
|
210
|
+
- For tools that require identifiers (fileId, folderId, etc), always get IDs from previous list/get calls.
|
|
211
|
+
- Keep calls focused and safe.
|
|
212
|
+
|
|
213
|
+
At the end, provide a concise summary of:
|
|
214
|
+
- What passed
|
|
215
|
+
- What failed
|
|
216
|
+
- What could not be tested and why
|
|
217
|
+
- If some tool needs user-specific context (email/account/tenant), explicitly output a "CONTEXT_REQUIRED" note with what is needed.
|
|
218
|
+
`.trim(),Hne=A.lazy(()=>xt(()=>import("./registry-layout-BrhYm9Dr.js"),__vite__mapDeps([20,4,21,22,23,24,17,25,2,3,26,27,28,6,8,29,30,31,32,33,34,35,36,14,37,38,7,9,16,39,40,15,41,42,19,43,44,45,46,47,5,48,49,50,51,52,53,54,55,56,57,58]))),Gne={id:qne,description:Bne,LayoutComponent:Hne,setup:e=>{e.registerSidebarGroup({id:"private-registry",label:"Private Registry",items:[{icon:x.jsx(sP,{size:16}),label:"Registry"}],defaultExpanded:!0})}},Zne=A.lazy(()=>xt(()=>import("./reports-layout-9yNTvI9o.js"),__vite__mapDeps([59,60,24,51,17,25,1,14,23,6,19,4,7,45,61,62,53,63,21,64,50,29,65,66,67,8,10,68,26,40,42,33]))),Kne={id:"reports",description:"View automated reports with actionable insights",binding:sne,LayoutComponent:Zne,setup:e=>{e.registerSidebarGroup({id:"observability",label:"Observability",items:[{icon:x.jsx(oP,{size:16}),label:"Reports"}]})}},Wne="user-sandbox",Yne="Create embeddable integration flows for platform end-users";var Qne=(e,t,n,r,a,i,c,u)=>{let d=document.documentElement,f=["light","dark"];function m(y){(Array.isArray(e)?e:[e]).forEach(w=>{let S=w==="class",b=S&&i?a.map(R=>i[R]||R):a;S?(d.classList.remove(...b),d.classList.add(i&&i[y]?i[y]:y)):d.setAttribute(w,y)}),p(y)}function p(y){u&&f.includes(y)&&(d.style.colorScheme=y)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let y=localStorage.getItem(t)||n,w=c&&y==="system"?g():y;m(w)}catch{}},Xne=A.createContext(void 0),Jne={setTheme:e=>{},themes:[]},Noe=()=>{var e;return(e=A.useContext(Xne))!=null?e:Jne};A.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:i,value:c,themes:u,nonce:d,scriptProps:f})=>{let m=JSON.stringify([n,t,i,e,u,c,r,a]).slice(1,-1);return A.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(${Qne.toString()})(${m})`}})});const gm="org-admin",ere={from({org:e,project:t}){if(e?.includes("/")||t.includes("/"))throw new Error("Org or project cannot contain slashes");return`${e}/${t}`},parse(e){e.startsWith("/")&&(e=e.slice(1));const[t,n]=e.split("/");if(!t||!n)throw new Error("Invalid locator");return{org:t,project:n}},isOrgAdminProject(e){return e.split("/")[1]===gm},adminProject(e){return`${e}/${gm}`}},uP=A.createContext(void 0),koe=()=>{const e=A.useContext(uP);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},Moe=e=>{const t=gl.c(10),{children:n,org:r,project:a}=e;let i;t[0]!==r.slug||t[1]!==a.slug?(i=ere.from({org:r.slug,project:a.slug}),t[0]=r.slug,t[1]=a.slug,t[2]=i):i=t[2];const c=i;let u;t[3]!==c||t[4]!==r||t[5]!==a?(u={org:r,project:a,locator:c},t[3]=c,t[4]=r,t[5]=a,t[6]=u):u=t[6];const d=u;let f;return t[7]!==n||t[8]!==d?(f=x.jsx(uP.Provider,{value:d,children:n}),t[7]=n,t[8]=d,t[9]=f):f=t[9],f},tre=re({authorizationEndpoint:M().url(),tokenEndpoint:M().url(),introspectionEndpoint:M().url().optional(),clientId:M(),clientSecret:M().optional(),scopes:ve(M()),grantType:Et(["authorization_code","client_credentials"])}),nre=re({title:M().optional(),readOnlyHint:We().optional(),destructiveHint:We().optional(),idempotentHint:We().optional(),openWorldHint:We().optional()}),rre=re({name:M(),description:M().optional(),inputSchema:lt(M(),ot()),outputSchema:lt(M(),ot()).optional(),annotations:nre.optional(),_meta:lt(M(),ot()).optional()}),ore=re({headers:lt(M(),M()).optional()}),are=re({command:M().describe("Command to run (e.g., 'npx', 'node')"),args:ve(M()).optional().describe("Command arguments"),cwd:M().optional().describe("Working directory"),envVars:lt(M(),M()).optional().describe("Environment variables (encrypted in storage)")}),dP=re({id:M().describe("Unique identifier for the connection"),title:M().describe("Human-readable name for the connection"),created_at:M().describe("When the connection was created"),updated_at:M().describe("When the connection was last updated"),created_by:M().describe("User ID who created the connection"),updated_by:M().optional().describe("User ID who last updated the connection"),organization_id:M().describe("Organization ID this connection belongs to"),description:M().nullable().describe("Description of the connection"),icon:M().nullable().describe("Icon URL for the connection"),app_name:M().nullable().describe("Associated app name"),app_id:M().nullable().describe("Associated app ID"),connection_type:Et(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:M().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:M().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:mt([are,ore]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:tre.nullable().describe("OAuth configuration"),configuration_state:lt(M(),ot()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:ve(M()).nullable().optional().describe("Configuration scopes"),metadata:lt(M(),ot()).nullable().describe("Additional metadata (includes repository info)"),tools:ve(rre).nullable().describe("Discovered tools from MCP"),bindings:ve(M()).nullable().describe("Detected bindings"),status:Et(["active","inactive","error"]).describe("Current status")});dP.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:M().nullish()});dP.partial();function Poe(e){return e!=null&&"command"in e}function Doe(e){return!e||!e.startsWith("virtual://")?null:e.replace("virtual://","")}const Du=re({connection_id:M().describe("Connection ID"),selected_tools:ve(M()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:ve(M()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:ve(M()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),fP=Du.extend({selected_tools:Du.shape.selected_tools.optional(),selected_resources:Du.shape.selected_resources.optional(),selected_prompts:Du.shape.selected_prompts.optional()}),Loe=re({id:M().describe("Unique identifier"),title:M().describe("Human-readable name"),description:M().nullable().describe("Description"),icon:M().nullable().describe("Icon URL"),created_at:M().describe("Creation timestamp"),updated_at:M().describe("Last update timestamp"),created_by:M().describe("User ID who created this item"),updated_by:M().optional().describe("User ID who last updated this item"),organization_id:M().describe("Organization ID this item belongs to"),status:Et(["active","inactive"]).describe("Current status"),metadata:re({instructions:M().nullable().describe("Instructions also used as system prompt")}).loose().describe("Metadata"),connections:ve(Du).describe("Connections with their selected tools, resources, and prompts")});re({title:M().min(1).max(255).describe("Name for the virtual MCP"),description:M().nullable().optional().describe("Optional description"),icon:M().nullish().describe("Optional icon URL"),status:Et(["active","inactive"]).optional().default("active").describe("Initial status"),metadata:re({instructions:M().nullable().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:ve(fP).describe("Connections to include/exclude (can be empty for exclusion mode)")});re({title:M().min(1).max(255).optional().describe("New name"),description:M().nullable().optional().describe("New description (null to clear)"),icon:M().nullish().describe("New icon URL"),status:Et(["active","inactive"]).optional().describe("New status"),metadata:re({instructions:M().nullable().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:ve(fP).optional().describe("New connections (replaces existing)")});var kC;(function(e){e.Completable="McpCompletable"})(kC||(kC={}));const sre=[],ire={id:Wne,description:Yne,binding:sre},cre="workflows",lre="Create workflows for platform end-users",ure=A.lazy(()=>xt(()=>import("./plugin-header-CVaBr8-j.js"),__vite__mapDeps([69,6,19,70]))),dre=A.lazy(()=>xt(()=>import("./plugin-empty-state-DfPCNHNV.js"),__vite__mapDeps([71,70]))),fre={id:cre,description:lre,binding:[],renderHeader:e=>x.jsx(ure,{...e}),renderEmptyState:()=>x.jsx(dre,{})},hre=[Fne,Kne,ire,Gne,fre],Hs=B6({component:()=>x.jsx(TY,{children:x.jsx(A.Suspense,{fallback:x.jsx(cM,{}),children:x.jsx(hA,{})})})}),pre=jt({getParentRoute:()=>Hs,path:"/login",component:Bt(()=>xt(()=>import("./login-C4VFa6jD.js"),__vite__mapDeps([72,17,4,27]))),validateSearch:go(()=>re({next:M().optional(),client_id:M().optional(),redirect_uri:M().optional(),response_type:M().optional(),state:M().optional(),scope:M().optional(),code_challenge:M().optional(),code_challenge_method:M().optional()}))}),mre=jt({getParentRoute:()=>Hs,path:"/reset-password",component:Bt(()=>xt(()=>import("./reset-password-FRWYt8ap.js"),__vite__mapDeps([73,17,4,27]))),validateSearch:go(()=>re({token:M().optional(),error:M().optional()}))}),gre=jt({getParentRoute:()=>Hs,path:"/auth/$pathname",component:Bt(()=>xt(()=>import("./auth-catchall-DHQTu60x.js"),[]))}),vre=jt({getParentRoute:()=>Hs,path:"/connect/$sessionId",component:Bt(()=>xt(()=>import("./connect-BqPwKrDp.js"),__vite__mapDeps([74,24,17,4,40,57,75])))}),yre=jt({getParentRoute:()=>Hs,path:"/store/$appName",component:Bt(()=>xt(()=>import("./store-invite-1HxdtnDC.js"),[])),validateSearch:go(()=>re({serverName:M().optional()}))}),_re=jt({getParentRoute:()=>Hs,path:"/oauth/callback",component:Bt(()=>xt(()=>import("./oauth-callback-DKWROL5U.js"),__vite__mapDeps([76,14,57])))}),og=jt({getParentRoute:()=>Hs,id:"shell",component:Bt(()=>xt(()=>import("./shell-layout-DkuDKL8p.js"),__vite__mapDeps([77,78,4,79,25,80,51,17,81,82,60,24,83,84,85,27,52,42,33,6,19,86,11,87,47,37,23,88,3,89,32,90,38,91,41,92,22,93,66,94,95,50,7,45,46,26,96,97,8,98,65,53,99,100,28,13,29,101,14,40,48,102,103,104,105,106,62,15,107,56,108,44,61,70,12,109,110,111,39,36,49,112,43,63,113,114,115])))}),bre=jt({getParentRoute:()=>og,path:"/",component:Bt(()=>xt(()=>import("./home-C39nGjR7.js"),__vite__mapDeps([116,40,4,110,7,6,56,37,113,27,111,39,91,41,89,17])))}),wre=jt({getParentRoute:()=>og,path:"/$org",beforeLoad:({params:e})=>{throw hb({to:"/$org/$project",params:{org:e.org,project:gm}})}}),Jn=jt({getParentRoute:()=>og,path:"/$org/$project",component:Bt(()=>xt(()=>import("./project-layout-F2YJOnzp.js"),__vite__mapDeps([117,109,24,25,4])))}),Sre=jt({getParentRoute:()=>Jn,path:"/",component:Bt(()=>xt(()=>import("./page-CoIEp87I.js"),__vite__mapDeps([118,78,4,79,25,80,51,17,81,82,60,24,83,84,85,27,52,42,33,6,19,86,11,87,47,37,23,88,3,89,32,90,38,91,41,92,22,93,66,94,95,50,7,45,46,26,96,97,8,98,65,53,99,100,28,13,29,101,14,40,48,102,103,104,105,106,62,15,107,119,56,120])))}),Ere=jt({getParentRoute:()=>Jn,path:"/tasks",component:Bt(()=>xt(()=>import("./tasks-BuxJd7k9.js"),__vite__mapDeps([121,78,4,79,25,80,51,17,81,82,60,24,83,84,85,27,52,42,33,6,19,86,11,87,47,37,23,88,3,89,32,90,38,91,41,92,22,93,66,94,95,50,7,45,46,26,96,97,8,98,65,53,99,100,28,13,29,101,14,40,48,102,103,104,105,106,62,15,122,110,31,123,124,125,126,61])))}),Rre=jt({getParentRoute:()=>Jn,path:"/settings",component:Bt(()=>xt(()=>import("./project-settings-DwtLH_vq.js"),__vite__mapDeps([127,105,32,33,4,125,8,17,25,27,44,91,41,24,43,51,82,60,128,129,130,131,132,106,14,56,42,6,19,16,39])))}),Vo=({params:e})=>{if(e.project!==gm)throw hb({to:"/$org/$project",params:{org:e.org,project:e.project}})},xre=jt({getParentRoute:()=>Jn,path:"/projects",beforeLoad:Vo,component:Bt(()=>xt(()=>import("./projects-list-DPMlGsBe.js"),__vite__mapDeps([133,109,24,25,105,32,33,4,101,14,37,27,110,134,124,108,17,38,91,41,44,6,125,8])))}),Tre=jt({getParentRoute:()=>Jn,path:"/members",beforeLoad:Vo,component:Bt(()=>xt(()=>import("./members-Dh31vMll.js"),__vite__mapDeps([135,100,4,28,6,8,66,11,13,32,33,29,101,14,37,27,105,125,92,22,5,45,51,17,25,136,137,24,81,82,60,110,26,39,38,138,139,56,15,43,84,85,91,41,42,19,44,40,34,55,112,113,52])))}),Ore=jt({getParentRoute:()=>Jn,path:"/mcps",beforeLoad:Vo,component:Bt(()=>xt(()=>import("./connections-C2FniOCy.js"),__vite__mapDeps([140,106,100,4,28,6,8,66,11,13,32,33,29,101,14,37,27,141,40,92,22,26,7,21,84,85,105,122,110,24,25,31,82,60,132,39,125,38,91,41,42,19,44,51,17,142,34,48,102,143,15,123,124,144,56]))),validateSearch:go(()=>re({action:Et(["create"]).optional()}))}),Cre=jt({getParentRoute:()=>Jn,path:"/mcps/$connectionId",beforeLoad:Vo,component:Bt(()=>xt(()=>import("./connection-detail-BHwcydrH.js"),__vite__mapDeps([145,101,14,37,27,4,84,85,144,56,15,146,32,33,119,114,17,25,147,54,82,60,148,57,142,24,86,55,51,130,132,129,131,106,128,42,6,19,149,75,137,78,79,80,81,83,52,11,87,47,23,88,3,89,90,38,91,41,92,22,93,66,94,95,50,7,45,46,26,96,97,8,98,65,53,99,100,28,13,29,40,48,102,103,104,105,62,125,150,151,34,152,63,122,110,31,39,21,143,113,134,124,153,154]))),validateSearch:go(()=>re({tab:M().optional()}))}),Are=jt({getParentRoute:()=>Jn,path:"/mcps/$connectionId/$collectionName/$itemId",beforeLoad:Vo,component:Bt(()=>xt(()=>import("./collection-detail-x0pDfnG2.js"),__vite__mapDeps([155,101,14,37,27,4,84,85,51,17,25,146,32,33,119,114,91,41,44,104,105,147,54,42,6,19,7,62,96,53,58,113,125,8,148,57,142,24,86,55,82,60,130,132,129,131,106,128,56,149,75,137,78,79,80,81,83,52,11,87,47,23,88,3,89,90,38,92,22,93,66,94,95,50,45,46,26,97,98,65,99,100,28,13,29,40,48,102,103,15,156,152,115,126,138,157]))),validateSearch:go(()=>re({replayId:M().optional()}))}),Ire=jt({getParentRoute:()=>Jn,path:"/monitoring",beforeLoad:Vo,component:Bt(()=>xt(()=>import("./monitoring-D0DgTEcy.js"),__vite__mapDeps([158,101,14,37,27,4,105,32,33,125,8,84,85,159,26,52,6,53,9,35,55,58,156,89,42,19,62,92,22,29,149,25,34,56,15,141,40,28,39,136,137,88,3,51,17,80,96,11,5,44,150,43,41,142,24,30,95]))),validateSearch:go(()=>re({tab:Et(["logs","analytics","dashboards"]).default("logs"),from:M().default("now-24h"),to:M().default("now"),connectionId:ve(M()).optional().default([]),virtualMcpId:ve(M()).optional().default([]),tool:M().default(""),status:Et(["all","success","errors"]).default("all"),search:M().default(""),page:Pe().optional(),streaming:We().default(!0),propertyFilters:M().default(""),hideSystem:We().default(!1)}))}),Nre=jt({getParentRoute:()=>Jn,path:"/monitoring/dashboards/$dashboardId",beforeLoad:Vo,component:Bt(()=>xt(()=>import("./monitoring-dashboard-view-CuFcYaD_.js"),__vite__mapDeps([160,25,4,159,26,52,32,33,6,53,9,35,55,58,156,89,42,19,62,8,27,103,84,85,104,105,125,44,96,11,56,15,113])))}),kre=jt({getParentRoute:()=>Jn,path:"/monitoring/dashboards/$dashboardId/edit",beforeLoad:Vo,component:Bt(()=>xt(()=>import("./monitoring-dashboard-edit-DCcFalwQ.js"),__vite__mapDeps([161,84,4,85,51,17,25,27,92,22,5,6,52,19,42,33,68,58,56,103,15,30,104,105,32,147,54,14,125,8])))}),hP=jt({getParentRoute:()=>Jn,path:"/store",beforeLoad:Vo,component:Bt(()=>xt(()=>import("./page-BpCfHp43.js"),__vite__mapDeps([162,105,32,33,4,125,8,85,35,63,14,103,37,24,2,3,132,25,51,17,163,101,27,164,67,102,139,56,143,40,92,22,131,52,6,19,113,82,60,83,84])))}),Mre=jt({getParentRoute:()=>hP,path:"/$appName",component:Bt(()=>xt(()=>import("./mcp-server-detail-BtO9BwQ6.js"),__vite__mapDeps([165,7,14,105,32,33,4,92,22,21,19,56,28,6,8,49,101,37,27,153,24,86,131,154,98,99,100,66,11,13,29,26,40,85,48,102,103,104,150,164,67,139,143,125,82,60,51,17,25,142,83,129,130,132,106,163,64]))),validateSearch:go(()=>re({registryId:M().optional(),serverName:M().optional(),itemId:M().optional()}))}),Pre=jt({getParentRoute:()=>Jn,path:"/agents",beforeLoad:Vo,component:Bt(()=>xt(()=>import("./agents-D-4jcSt1.js"),__vite__mapDeps([166,100,4,28,6,8,66,11,13,32,33,29,101,14,37,27,105,125,141,40,92,22,84,85,122,110,24,25,31,97,80,51,17,39,34,48,15,95,167,123,124]))),validateSearch:go(()=>re({action:Et(["create"]).optional()}))}),Dre=jt({getParentRoute:()=>Jn,path:"/agents/$agentId",beforeLoad:Vo,component:Bt(()=>xt(()=>import("./agent-detail-DncXhd81.js"),__vite__mapDeps([168,79,25,80,51,17,81,82,60,24,83,84,4,85,27,52,42,33,6,19,86,11,87,47,37,23,88,3,101,14,92,22,146,32,119,114,26,43,44,8,10,58,56,120,157,95,125,104,105,147,54,99,100,28,66,13,29,40,48,102,103,5,38,142,90,163,96,53,64,167]))),validateSearch:go(()=>re({tab:M().optional()}))}),Lre=jt({getParentRoute:()=>Jn,path:"/workflows",component:Bt(()=>xt(()=>import("./workflow-CMJomw9A.js"),__vite__mapDeps([169,25,151,106,100,4,28,6,8,66,11,13,32,33,29,101,14,37,27,40,92,22,53,34,94,48,15,152,63,122,110,24,31,130,39,51,17,56,104,105,84,85,125,82,60,47,70])))}),pP=jt({getParentRoute:()=>Jn,path:"/$pluginId",component:Bt(()=>xt(()=>import("./dynamic-plugin-layout-C8tDNw7E.js"),__vite__mapDeps([170,14,60,1,24,51,17,25,23,4,105,32,33])))}),jre=[],$re=[],mP=[];hre.forEach(e=>{if(!e.setup)return;const t={parentRoute:pP,routing:{createRoute:jt,lazyRouteComponent:Bt},registerRootSidebarItem:n=>jre.push({pluginId:e.id,...n}),registerSidebarGroup:n=>$re.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{mP.push(...n)}};e.setup(t)});const Ure=pP.addChildren(mP),zre=hP.addChildren([Mre]),Vre=[Sre,Ere,Rre,xre,Tre,Ore,Cre,Are,Ire,Nre,kre,zre,Pre,Dre,Lre,Ure],Fre=Jn.addChildren(Vre),qre=og.addChildren([bre,wre,Fre]),Bre=Hs.addChildren([qre,pre,mre,gre,_re,vre,yre]),Hre=J6({routeTree:Bre}),Gre=document.getElementById("root");$5.createRoot(Gre).render(x.jsx(A.StrictMode,{children:x.jsx(nL,{router:Hre})}));export{kG as $,boe as A,ED as B,dP as C,_D as D,eoe as E,zV as F,tg as G,Sm as H,aP as I,soe as J,HC as K,ere as L,$q as M,Jre as N,gm as O,Moe as P,uoe as Q,DG as R,cM as S,loe as T,coe as U,Loe as V,jq as W,doe as X,ioe as Y,AG as Z,hoe as _,wm as a,W5 as a$,CG as a0,IG as a1,NG as a2,foe as a3,moe as a4,poe as a5,goe as a6,voe as a7,yoe as a8,rn as a9,ck as aA,HG as aB,GG as aC,BG as aD,Em as aE,hre as aF,_k as aG,aH,Vb as aI,uk as aJ,NN as aK,Fb as aL,td as aM,SN as aN,zb as aO,Ub as aP,sH as aQ,iH as aR,aoe as aS,ooe as aT,roe as aU,fd as aV,F0 as aW,Zu as aX,sD as aY,Zn as aZ,Or as a_,nD as aa,Lee as ab,Vee as ac,xoe as ad,Ri as ae,ax as af,Yre as ag,Wre as ah,b4 as ai,S4 as aj,Qre as ak,ve as al,Et as am,Is as an,Ed as ao,gd as ap,WN as aq,vd as ar,yH as as,An as at,_H as au,ct as av,wk as aw,Va as ax,$i as ay,iZ as az,vl as b,Yb as b$,h$ as b0,TA as b1,Ke as b2,et as b3,ar as b4,ob as b5,ft as b6,ng as b7,lt as b8,Gr as b9,qne as bA,LV as bB,oP as bC,sne as bD,$re as bE,MW as bF,Ioe as bG,Yee as bH,tU as bI,noe as bJ,ZI as bK,xb as bL,toe as bM,Xre as bN,Ooe as bO,MV as bP,NV as bQ,OV as bR,eN as bS,Ir as bT,$G as bU,cA as bV,uA as bW,JT as bX,FB as bY,jo as bZ,nd as b_,jI as ba,Kn as bb,Pe as bc,mt as bd,We as be,De as bf,ot as bg,go as bh,_l as bi,Aoe as bj,Coe as bk,rr as bl,le as bm,Do as bn,KN as bo,Lo as bp,Xee as bq,GM as br,$a as bs,Une as bt,xt as bu,jre as bv,Noe as bw,Wz as bx,Kre as by,fr as bz,gl as c,cl as c0,Ls as c1,ra as c2,$o as c3,XN as c4,BB as c5,ZB as c6,HB as c7,kB as c8,Zre as c9,DC as ca,fD as cb,mD as cc,bD as cd,gD as ce,vD as cf,SD as cg,sx as ch,wD as ci,yD as cj,sJ as ck,ht as cl,BM as cm,XJ as cn,mW as co,Us as cp,Pa as cq,Roe as cr,Rj as d,Qc as e,woe as f,_oe as g,Soe as h,Poe as i,x as j,aa as k,oa as l,hA as m,BC as n,re as o,Doe as p,$V as q,A as r,M as s,fT as t,koe as u,gN as v,UV as w,iN as x,cF as y,uD as z};
|