@powerhousedao/ph-clint-app 0.1.0-dev.70 → 0.1.0-dev.72
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/browser/connect-DWTABaUr.js.map +1 -1
- package/dist/browser/document-models/index.js +1 -1
- package/dist/browser/document-models/ph-clint-project/index.js +3 -3
- package/dist/browser/{editor-DXdZh-Jg.js → editor-DL0W2XOS.js} +15 -7
- package/dist/browser/{editor-DXdZh-Jg.js.map → editor-DL0W2XOS.js.map} +1 -1
- package/dist/browser/editors/ph-clint-project-editor/module.js +1 -1
- package/dist/browser/factory-BorJujF7.js.map +1 -1
- package/dist/browser/index.js +6 -5
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/{module-Os61MtkV.js → module-DoAlHsjp.js} +1668 -1593
- package/dist/browser/{module-Os61MtkV.js.map → module-DoAlHsjp.js.map} +1 -1
- package/dist/browser/{ph-clint-project-ii15OQEN.js → ph-clint-project-D634z5c5.js} +22 -17
- package/dist/browser/ph-clint-project-D634z5c5.js.map +1 -0
- package/dist/browser/switchboard-vSM1SpS5.js.map +1 -1
- package/dist/connect/assets/connect-q2RMY-je.js.map +1 -1
- package/dist/connect/assets/editor-DgkuaKuV.js +2 -0
- package/dist/connect/assets/editor-DgkuaKuV.js.map +1 -0
- package/dist/connect/assets/index-BSq-9kCR.css +2 -0
- package/dist/connect/assets/{index-CLaxnBSy.js → index-BXAErAWR.js} +20 -20
- package/dist/connect/assets/index-BXAErAWR.js.map +1 -0
- package/dist/connect/assets/{ph-clint-project-YyH0u8I2.js → ph-clint-project-BRYYVNTj.js} +9 -3
- package/dist/connect/assets/ph-clint-project-BRYYVNTj.js.map +1 -0
- package/dist/connect/assets/switchboard-BCPp_tNt.js.map +1 -1
- package/dist/connect/index.html +3 -3
- package/dist/connect/ph-packages.json +1 -1
- package/dist/document-models/document-models.d.ts +5 -1
- package/dist/document-models/document-models.d.ts.map +1 -1
- package/dist/document-models/index.d.ts +1 -1
- package/dist/document-models/ph-clint-project/index.d.ts +2 -2
- package/dist/document-models/ph-clint-project/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/upgrades/index.d.ts +2 -2
- package/dist/document-models/ph-clint-project/upgrades/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/upgrades/upgrade-manifest.d.ts +6 -2
- package/dist/document-models/ph-clint-project/upgrades/upgrade-manifest.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/actions.d.ts +1 -0
- package/dist/document-models/ph-clint-project/v1/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/actions.d.ts +22 -18
- package/dist/document-models/ph-clint-project/v1/gen/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/controller.d.ts +6 -2
- package/dist/document-models/ph-clint-project/v1/gen/controller.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/creators.d.ts +22 -18
- package/dist/document-models/ph-clint-project/v1/gen/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/actions.d.ts +10 -2
- package/dist/document-models/ph-clint-project/v1/gen/deployment/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/creators.d.ts +3 -2
- package/dist/document-models/ph-clint-project/v1/gen/deployment/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/deployment/operations.d.ts +10 -5
- package/dist/document-models/ph-clint-project/v1/gen/deployment/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/document-schema.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/document-type.d.ts +4 -0
- package/dist/document-models/ph-clint-project/v1/gen/document-type.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/actions.d.ts +10 -6
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/operations.d.ts +11 -7
- package/dist/document-models/ph-clint-project/v1/gen/external-skills/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/actions.d.ts +5 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/operations.d.ts +21 -17
- package/dist/document-models/ph-clint-project/v1/gen/features-mastra/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/actions.d.ts +7 -3
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/operations.d.ts +8 -4
- package/dist/document-models/ph-clint-project/v1/gen/features-powerhouse/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/actions.d.ts +8 -4
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/operations.d.ts +9 -5
- package/dist/document-models/ph-clint-project/v1/gen/features-routine/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/actions.d.ts +9 -5
- package/dist/document-models/ph-clint-project/v1/gen/identity/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/identity/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/identity/operations.d.ts +10 -6
- package/dist/document-models/ph-clint-project/v1/gen/identity/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/index.d.ts +24 -20
- package/dist/document-models/ph-clint-project/v1/gen/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/actions.d.ts +7 -3
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/operations.d.ts +8 -4
- package/dist/document-models/ph-clint-project/v1/gen/lifecycle/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/ph-factories.d.ts +3 -1
- package/dist/document-models/ph-clint-project/v1/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/actions.d.ts +11 -7
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/error.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/operations.d.ts +12 -8
- package/dist/document-models/ph-clint-project/v1/gen/powerhouse-packages/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/actions.d.ts +11 -7
- package/dist/document-models/ph-clint-project/v1/gen/publishing/actions.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/creators.d.ts +2 -2
- package/dist/document-models/ph-clint-project/v1/gen/publishing/creators.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/error.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/publishing/operations.d.ts +12 -8
- package/dist/document-models/ph-clint-project/v1/gen/publishing/operations.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/schema/index.d.ts +6 -2
- package/dist/document-models/ph-clint-project/v1/gen/schema/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/schema/types.d.ts +5 -0
- package/dist/document-models/ph-clint-project/v1/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/schema/zod.d.ts +2 -1
- package/dist/document-models/ph-clint-project/v1/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/types.d.ts +9 -5
- package/dist/document-models/ph-clint-project/v1/gen/types.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/gen/utils.d.ts +4 -0
- package/dist/document-models/ph-clint-project/v1/gen/utils.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/hooks.d.ts +7 -6
- package/dist/document-models/ph-clint-project/v1/hooks.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/index.d.ts +10 -5
- package/dist/document-models/ph-clint-project/v1/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/module.d.ts +59 -3
- package/dist/document-models/ph-clint-project/v1/module.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/index.d.ts +5 -1
- package/dist/document-models/ph-clint-project/v1/src/index.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/deployment.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/external-skills.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/external-skills.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-mastra.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-powerhouse.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-powerhouse.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-routine.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/features-routine.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/identity.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/identity.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/lifecycle.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/powerhouse-packages.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/powerhouse-packages.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/publishing.d.ts +1 -1
- package/dist/document-models/ph-clint-project/v1/src/reducers/publishing.d.ts.map +1 -1
- package/dist/document-models/ph-clint-project/v1/utils.d.ts +6 -2
- package/dist/document-models/ph-clint-project/v1/utils.d.ts.map +1 -1
- package/dist/document-models/upgrade-manifests.d.ts +5 -1
- package/dist/document-models/upgrade-manifests.d.ts.map +1 -1
- package/dist/editors/index.d.ts +1 -1
- package/dist/editors/ph-clint-project-editor/editor.d.ts.map +1 -1
- package/dist/node/connect-D6zH68QP.mjs.map +1 -1
- package/dist/node/document-models/index.mjs +1 -1
- package/dist/node/document-models/ph-clint-project/index.mjs +3 -3
- package/dist/node/{editor-DBx3eRfn.mjs → editor-mM5FSNXc.mjs} +15 -7
- package/dist/node/{editor-DBx3eRfn.mjs.map → editor-mM5FSNXc.mjs.map} +1 -1
- package/dist/node/editors/ph-clint-project-editor/module.mjs +1 -1
- package/dist/node/factory-Dp2uZuax.mjs.map +1 -1
- package/dist/node/index.mjs +6 -5
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/{module-B8cTCphJ.mjs → module-DayL4J7r.mjs} +1668 -1593
- package/dist/node/{module-B8cTCphJ.mjs.map → module-DayL4J7r.mjs.map} +1 -1
- package/dist/node/{ph-clint-project-B70Z4AOx.mjs → ph-clint-project-Btx_kiiQ.mjs} +22 -17
- package/dist/node/ph-clint-project-Btx_kiiQ.mjs.map +1 -0
- package/dist/node/switchboard-DwDjMPBV.mjs.map +1 -1
- package/dist/powerhouse.manifest.json +26 -25
- package/dist/processors/connect.d.ts +1 -1
- package/dist/processors/factory.d.ts +2 -2
- package/dist/processors/factory.d.ts.map +1 -1
- package/dist/processors/index.d.ts +1 -1
- package/dist/processors/switchboard.d.ts +1 -1
- package/dist/style.css +7 -0
- package/package.json +1 -1
- package/dist/browser/ph-clint-project-ii15OQEN.js.map +0 -1
- package/dist/connect/assets/editor-Cmx2y5dq.js +0 -2
- package/dist/connect/assets/editor-Cmx2y5dq.js.map +0 -1
- package/dist/connect/assets/index-C7FM_INJ.css +0 -2
- package/dist/connect/assets/index-CLaxnBSy.js.map +0 -1
- package/dist/connect/assets/ph-clint-project-YyH0u8I2.js.map +0 -1
- package/dist/node/ph-clint-project-B70Z4AOx.mjs.map +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/esm-C3z6RsQv.js","assets/chunk-zsgVPwQN.js","assets/dist-ClzcOFHf.js","assets/preload-helper-rov5CBGT.js","assets/chunk-A7RFOIQ7-C_cZRzYs.js","assets/chunk-BTBUZ646-C-2npWfI.js","assets/chunk-EADU5A67-qrFIrs_P.js","assets/chunk-WGR4JCLS-9irtnUWa.js","assets/pg_dump-DpLFvU0N.js","assets/AddDriveModal-CBbXwG8S-CMtP_pYy.js","assets/connect-ClPSMjSP-B0m_vica.js","assets/clsx-BlWIxpLU.js","assets/src-8xf1ueaA-CW18mrFQ.js","assets/lz-string-CSbzFwDi.js","assets/esm-CIp61Ze4.js","assets/document-timeline-FWiQhfIq-ChabRuF_.js","assets/parseISO-D3w8UCNY.js","assets/dist-BzAXfaNf.js","assets/lodash.debounce-D2fhi-X6.js","assets/toast-DnODOv28-5sntLsMI.js","assets/i18next-LuHNh6Du.js","assets/ClearStorageModal-DwiCY6Lt-BX6HLKHK.js","assets/reactor-D1P2nU-G-Bgmic385.js","assets/connect.config-Cuh0hj_Q-DAwYt7T8.js","assets/module-Cfsr5pFp.js","assets/document-drive-CN2AY1E7-sMeVBFRc.js","assets/chunk-YKewjYmz-CpPGRMX8.js","assets/dist-CTgmb7N2-BAAYPyHP.js","assets/schemas-D47w5Bks-Cdf2Lkh9.js","assets/app-module-BbhoykB5-CCW5jONk.js","assets/dist-CYlqqmy32.js","assets/chunk-pbuEa-1d-BpCY5LR9.js","assets/document-editor-CHM7Pu4m-BkiwcAMk.js","assets/processor-module-CkuQiq7B-CKCqkgup.js","assets/subgraph-module-CU_-umq2-3iAEhINV.js","assets/vetra-package-VqptqKzx-BVTTpgDv.js","assets/dist-DWkgwOBk.js","assets/useTranslation-RtmqWZon.js","assets/CookiesPolicyModal-CTXUu4-8-CDv9A_Ye.js","assets/Trans-Blcalk6X.js","assets/CreateDocumentModal-CAld-5pv-CgcRndoo.js","assets/DebugSettingsModal-DeZ-x8H3-kFKY1yIP.js","assets/registerServiceWorker-1maoTQNT-C9dXFNd2.js","assets/DeleteDriveModal-B7T2CVIX-Ij3dGsPx.js","assets/DeleteItemModal-DJv71YQG-CVtPVgc9.js","assets/DisclaimerModal-Co13N7HH-DNe510Y-.js","assets/DriveSettingsModal-DmsUU0g3-CAC1UDo_.js","assets/ExportDocumentWithErrorsModal-DOV_UVlM-CuR2gzWI.js","assets/SettingsModal-BzvCwJLZ-YPWkTKes.js","assets/package-DwOpqBSI-CR11T_4r.js","assets/useRegistryPackages-BOX4NMAb-DQjVPJ3Z.js","assets/UpgradeDriveModal-BH4ecdCU-Ds9YPtnh.js","assets/InspectorModal-NoO3f3U7-CJAiPdEE.js","assets/pglite-seed-VlhY0n-A-h3YR9-PV.js","assets/MissingPackageModal-Df154H9n-CBAwY4mw.js","assets/load-C0mYtbHx-C7vYfEJ_.js","assets/editor-
|
|
2
|
-
import{r as e}from"./chunk-zsgVPwQN.js";import{c as t,d as n,f as r,k as i,l as a,m as o,mt as s,p as c,q as l,u,vt as d}from"./lz-string-CSbzFwDi.js";import{E as f,H as p,I as m,M as h,Mt as g,N as _,Ot as v,R as y,St as b,T as x,Tt as S,U as C,W as w,X as T,Y as E,Z as D,_t as ee,at as O,bt as k,ct as te,d as ne,dt as re,ft as A,g as ie,gt as ae,j as oe,mt as j,nt as se,o as ce,ot as M,ut as le,vt as N,wt as P}from"./dist-BzAXfaNf.js";import{t as F}from"./preload-helper-rov5CBGT.js";import{n as ue,r as de,t as I}from"./connect.config-Cuh0hj_Q-DAwYt7T8.js";import{a as fe,l as pe}from"./src-8xf1ueaA-CW18mrFQ.js";import{n as me,t as he}from"./toast-DnODOv28-5sntLsMI.js";import{t as ge}from"./i18next-LuHNh6Du.js";import{t as _e}from"./Trans-Blcalk6X.js";import{r as ve,t as ye}from"./useTranslation-RtmqWZon.js";import{c as be,f as xe,h as Se,i as
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/esm-C3z6RsQv.js","assets/chunk-zsgVPwQN.js","assets/dist-ClzcOFHf.js","assets/preload-helper-rov5CBGT.js","assets/chunk-A7RFOIQ7-C_cZRzYs.js","assets/chunk-BTBUZ646-C-2npWfI.js","assets/chunk-EADU5A67-qrFIrs_P.js","assets/chunk-WGR4JCLS-9irtnUWa.js","assets/pg_dump-DpLFvU0N.js","assets/AddDriveModal-CBbXwG8S-CMtP_pYy.js","assets/connect-ClPSMjSP-B0m_vica.js","assets/clsx-BlWIxpLU.js","assets/src-8xf1ueaA-CW18mrFQ.js","assets/lz-string-CSbzFwDi.js","assets/esm-CIp61Ze4.js","assets/document-timeline-FWiQhfIq-ChabRuF_.js","assets/parseISO-D3w8UCNY.js","assets/dist-BzAXfaNf.js","assets/lodash.debounce-D2fhi-X6.js","assets/toast-DnODOv28-5sntLsMI.js","assets/i18next-LuHNh6Du.js","assets/ClearStorageModal-DwiCY6Lt-BX6HLKHK.js","assets/reactor-D1P2nU-G-Bgmic385.js","assets/connect.config-Cuh0hj_Q-DAwYt7T8.js","assets/module-Cfsr5pFp.js","assets/document-drive-CN2AY1E7-sMeVBFRc.js","assets/chunk-YKewjYmz-CpPGRMX8.js","assets/dist-CTgmb7N2-BAAYPyHP.js","assets/schemas-D47w5Bks-Cdf2Lkh9.js","assets/app-module-BbhoykB5-CCW5jONk.js","assets/dist-CYlqqmy32.js","assets/chunk-pbuEa-1d-BpCY5LR9.js","assets/document-editor-CHM7Pu4m-BkiwcAMk.js","assets/processor-module-CkuQiq7B-CKCqkgup.js","assets/subgraph-module-CU_-umq2-3iAEhINV.js","assets/vetra-package-VqptqKzx-BVTTpgDv.js","assets/dist-DWkgwOBk.js","assets/useTranslation-RtmqWZon.js","assets/CookiesPolicyModal-CTXUu4-8-CDv9A_Ye.js","assets/Trans-Blcalk6X.js","assets/CreateDocumentModal-CAld-5pv-CgcRndoo.js","assets/DebugSettingsModal-DeZ-x8H3-kFKY1yIP.js","assets/registerServiceWorker-1maoTQNT-C9dXFNd2.js","assets/DeleteDriveModal-B7T2CVIX-Ij3dGsPx.js","assets/DeleteItemModal-DJv71YQG-CVtPVgc9.js","assets/DisclaimerModal-Co13N7HH-DNe510Y-.js","assets/DriveSettingsModal-DmsUU0g3-CAC1UDo_.js","assets/ExportDocumentWithErrorsModal-DOV_UVlM-CuR2gzWI.js","assets/SettingsModal-BzvCwJLZ-YPWkTKes.js","assets/package-DwOpqBSI-CR11T_4r.js","assets/useRegistryPackages-BOX4NMAb-DQjVPJ3Z.js","assets/UpgradeDriveModal-BH4ecdCU-Ds9YPtnh.js","assets/InspectorModal-NoO3f3U7-CJAiPdEE.js","assets/pglite-seed-VlhY0n-A-h3YR9-PV.js","assets/MissingPackageModal-Df154H9n-CBAwY4mw.js","assets/load-C0mYtbHx-C7vYfEJ_.js","assets/editor-DgkuaKuV.js","assets/ph-clint-project-BRYYVNTj.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./chunk-zsgVPwQN.js";import{c as t,d as n,f as r,k as i,l as a,m as o,mt as s,p as c,q as l,u,vt as d}from"./lz-string-CSbzFwDi.js";import{E as f,H as p,I as m,M as h,Mt as g,N as _,Ot as v,R as y,St as b,T as x,Tt as S,U as C,W as w,X as T,Y as E,Z as D,_t as ee,at as O,bt as k,ct as te,d as ne,dt as re,ft as A,g as ie,gt as ae,j as oe,mt as j,nt as se,o as ce,ot as M,ut as le,vt as N,wt as P}from"./dist-BzAXfaNf.js";import{t as F}from"./preload-helper-rov5CBGT.js";import{n as ue,r as de,t as I}from"./connect.config-Cuh0hj_Q-DAwYt7T8.js";import{a as fe,l as pe}from"./src-8xf1ueaA-CW18mrFQ.js";import{n as me,t as he}from"./toast-DnODOv28-5sntLsMI.js";import{t as ge}from"./i18next-LuHNh6Du.js";import{t as _e}from"./Trans-Blcalk6X.js";import{r as ve,t as ye}from"./useTranslation-RtmqWZon.js";import{c as be,f as xe,h as Se,i as Ce,n as L,p as we,r as Te,s as Ee,t as R}from"./module-Cfsr5pFp.js";import{t as De}from"./registerServiceWorker-1maoTQNT-C9dXFNd2.js";import{n as Oe}from"./document-timeline-FWiQhfIq-ChabRuF_.js";import{A as ke,C as Ae,E as je,O as Me,_ as Ne,b as Pe,c as Fe,k as Ie,m as Le,r as Re,u as ze,x as Be,y as Ve}from"./connect-ClPSMjSP-B0m_vica.js";import{t as He}from"./dist-DyIElqdF.js";import{$ as Ue,$t as We,A as Ge,At as Ke,B as qe,Bt as Je,C as Ye,Cn as Xe,Ct as Ze,D as Qe,Dn as $e,Dt as et,E as tt,En as nt,Et as rt,F as it,Ft as at,G as ot,Gt as st,H as ct,Ht as lt,I as ut,It as dt,J as ft,Jt as pt,K as mt,Kt as ht,L as gt,Lt as _t,M as vt,Mt as yt,N as bt,Nt as xt,O as St,On as Ct,Ot as wt,P as Tt,Pt as Et,Q as Dt,Qt as Ot,R as kt,Rt as At,S as jt,Sn as Mt,St as Nt,T as Pt,Tn as Ft,Tt as It,U as Lt,Ut as Rt,V as zt,Vt as Bt,W as Vt,Wt as Ht,X as Ut,Xt as Wt,Y as Gt,Yt as Kt,Z as qt,Zt as Jt,_ as Yt,_n as Xt,_t as Zt,a as Qt,an as $t,at as en,b as tn,bn as nn,bt as rn,c as an,cn as on,ct as sn,d as cn,dn as ln,dt as un,en as dn,et as fn,f as pn,fn as mn,ft as hn,g as gn,gn as _n,gt as vn,h as yn,hn as bn,ht as xn,i as Sn,in as Cn,it as wn,j as Tn,jt as En,k as Dn,kn as On,kt as kn,l as An,ln as jn,lt as Mn,m as Nn,mn as Pn,mt as Fn,n as In,nn as Ln,nt as Rn,o as zn,on as Bn,ot as Vn,p as Hn,pn as Un,pt as Wn,q as Gn,qt as Kn,r as qn,rn as Jn,rt as Yn,s as Xn,sn as Zn,st as Qn,t as $n,tn as er,tt as tr,u as nr,un as rr,ut as ir,v as ar,vn as or,vt as sr,w as cr,wn as lr,wt as ur,x as dr,xn as fr,xt as pr,y as mr,yn as hr,yt as gr,z as _r,zt as vr}from"./ph-clint-project-BRYYVNTj.js";import*as z from"react";import yr,{Component as br,StrictMode as xr,Suspense as Sr,createContext as Cr,createElement as wr,lazy as B,useCallback as Tr,useContext as Er,useEffect as V,useLayoutEffect as Dr,useMemo as Or,useRef as kr,useState as Ar,useSyncExternalStore as jr}from"react";import{Fragment as Mr,jsx as H,jsxs as U}from"react/jsx-runtime";import*as Nr from"react-dom";import{createRoot as Pr}from"react-dom/client";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Fr=class e extends Error{response;request;constructor(t,n){let r=`${e.extractMessage(t)}: ${JSON.stringify({response:t,request:n})}`;super(r),Object.setPrototypeOf(this,e.prototype),this.response=t,this.request=n,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e)}static extractMessage(e){return e.errors?.[0]?.message??`GraphQL Error (Code: ${String(e.status)})`}},Ir=e=>e.toUpperCase(),Lr=e=>typeof e==`function`?e():e,Rr=(e,t)=>e.map((e,n)=>[e,t[n]]),zr=e=>{let t={};return e instanceof Headers?t=Br(e):Array.isArray(e)?e.forEach(([e,n])=>{e&&n!==void 0&&(t[e]=n)}):e&&(t=e),t},Br=e=>{let t={};return e.forEach((e,n)=>{t[n]=e}),t},Vr=e=>{try{let t=e();return Ur(t)?t.catch(e=>Hr(e)):t}catch(e){return Hr(e)}},Hr=e=>e instanceof Error?e:Error(String(e)),Ur=e=>typeof e==`object`&&!!e&&`then`in e&&typeof e.then==`function`&&`catch`in e&&typeof e.catch==`function`&&`finally`in e&&typeof e.finally==`function`,Wr=e=>{throw Error(`Unhandled case: ${String(e)}`)},Gr=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Kr=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},qr=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0};function Jr(e){return`"${e.replace(Yr,Xr)}"`}var Yr=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function Xr(e){return Zr[e.charCodeAt(0)]}var Zr=`\\u0000.\\u0001.\\u0002.\\u0003.\\u0004.\\u0005.\\u0006.\\u0007.\\b.\\t.\\n.\\u000B.\\f.\\r.\\u000E.\\u000F.\\u0010.\\u0011.\\u0012.\\u0013.\\u0014.\\u0015.\\u0016.\\u0017.\\u0018.\\u0019.\\u001A.\\u001B.\\u001C.\\u001D.\\u001E.\\u001F...\\"..........................................................\\\\...................................\\u007F.\\u0080.\\u0081.\\u0082.\\u0083.\\u0084.\\u0085.\\u0086.\\u0087.\\u0088.\\u0089.\\u008A.\\u008B.\\u008C.\\u008D.\\u008E.\\u008F.\\u0090.\\u0091.\\u0092.\\u0093.\\u0094.\\u0095.\\u0096.\\u0097.\\u0098.\\u0099.\\u009A.\\u009B.\\u009C.\\u009D.\\u009E.\\u009F`.split(`.`),Qr=Object.freeze({});function $r(e,t,i=r){let s=new Map;for(let e of Object.values(n))s.set(e,ei(t,e));let l,u=Array.isArray(e),d=[e],f=-1,p=[],m=e,h,g,_=[],v=[];do{f++;let e=f===d.length,n=e&&p.length!==0;if(e){if(h=v.length===0?void 0:_[_.length-1],m=g,g=v.pop(),n)if(u){m=m.slice();let e=0;for(let[t,n]of p){let r=t-e;n===null?(m.splice(r,1),e++):m[r]=n}}else{m={...m};for(let[e,t]of p)m[e]=t}f=l.index,d=l.keys,p=l.edits,u=l.inArray,l=l.prev}else if(g){if(h=u?f:d[f],m=g[h],m==null)continue;_.push(h)}let r;if(!Array.isArray(m)){if(c(m)||o(!1,`Invalid AST Node: ${a(m)}.`),r=(e?s.get(m.kind)?.leave:s.get(m.kind)?.enter)?.call(t,m,h,g,_,v),r===Qr)break;if(r===!1){if(!e){_.pop();continue}}else if(r!==void 0&&(p.push([h,r]),!e))if(c(r))m=r;else{_.pop();continue}}r===void 0&&n&&p.push([h,m]),e?_.pop():(l={inArray:u,index:f,keys:d,edits:p,prev:l},u=Array.isArray(m),d=u?m:i[m.kind]??[],f=-1,p=[],g&&v.push(g),g=m)}while(l!==void 0);return p.length===0?e:p[p.length-1][1]}function ei(e,t){let n=e[t];return typeof n==`object`?n:typeof n==`function`?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function ti(e){return $r(e,ri)}var ni=80,ri={Name:{leave:e=>e.value},Variable:{leave:e=>`$`+e.name},Document:{leave:e=>W(e.definitions,`
|
|
3
3
|
|
|
4
|
-
`)},OperationDefinition:{leave(e){let t=
|
|
4
|
+
`)},OperationDefinition:{leave(e){let t=ai(e.variableDefinitions)?K(`(
|
|
5
5
|
`,W(e.variableDefinitions,`
|
|
6
6
|
`),`
|
|
7
7
|
)`):K(`(`,W(e.variableDefinitions,`, `),`)`),n=K(``,e.description,`
|
|
8
8
|
`)+W([e.operation,W([e.name,t]),W(e.directives,` `)],` `);return(n===`query`?``:n+` `)+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r,description:i})=>K(``,i,`
|
|
9
|
-
`)+e+`: `+t+K(` = `,n)+K(` `,W(r,` `))},SelectionSet:{leave:({selections:e})=>G(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=K(``,e,`: `)+t,o=a+K(`(`,W(n,`, `),`)`);return o.length>
|
|
10
|
-
`,
|
|
9
|
+
`)+e+`: `+t+K(` = `,n)+K(` `,W(r,` `))},SelectionSet:{leave:({selections:e})=>G(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){let a=K(``,e,`: `)+t,o=a+K(`(`,W(n,`, `),`)`);return o.length>ni&&(o=a+K(`(
|
|
10
|
+
`,ii(W(n,`
|
|
11
11
|
`)),`
|
|
12
12
|
)`)),W([o,W(r,` `),i],` `)}},Argument:{leave:({name:e,value:t})=>e+`: `+t},FragmentSpread:{leave:({name:e,directives:t})=>`...`+e+K(` `,W(t,` `))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>W([`...`,K(`on `,e),W(t,` `),n],` `)},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i,description:a})=>K(``,a,`
|
|
13
|
-
`)+`fragment ${e}${K(`(`,W(n,`, `),`)`)} on ${t} ${K(``,W(r,` `),` `)}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?u(e):
|
|
13
|
+
`)+`fragment ${e}${K(`(`,W(n,`, `),`)`)} on ${t} ${K(``,W(r,` `),` `)}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?u(e):Jr(e)},BooleanValue:{leave:({value:e})=>e?`true`:`false`},NullValue:{leave:()=>`null`},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>`[`+W(e,`, `)+`]`},ObjectValue:{leave:({fields:e})=>`{`+W(e,`, `)+`}`},ObjectField:{leave:({name:e,value:t})=>e+`: `+t},Directive:{leave:({name:e,arguments:t})=>`@`+e+K(`(`,W(t,`, `),`)`)},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>`[`+e+`]`},NonNullType:{leave:({type:e})=>e+`!`},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>K(``,e,`
|
|
14
14
|
`)+W([`schema`,W(t,` `),G(n)],` `)},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+`: `+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>K(``,e,`
|
|
15
15
|
`)+W([`scalar`,t,W(n,` `)],` `)},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>K(``,e,`
|
|
16
16
|
`)+W([`type`,t,K(`implements `,W(n,` & `)),W(r,` `),G(i)],` `)},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>K(``,e,`
|
|
17
|
-
`)+t+(
|
|
18
|
-
`,
|
|
17
|
+
`)+t+(ai(n)?K(`(
|
|
18
|
+
`,ii(W(n,`
|
|
19
19
|
`)),`
|
|
20
20
|
)`):K(`(`,W(n,`, `),`)`))+`: `+r+K(` `,W(i,` `))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>K(``,e,`
|
|
21
21
|
`)+W([t+`: `+n,K(`= `,r),W(i,` `)],` `)},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>K(``,e,`
|
|
@@ -24,29 +24,29 @@ import{r as e}from"./chunk-zsgVPwQN.js";import{c as t,d as n,f as r,k as i,l as
|
|
|
24
24
|
`)+W([`enum`,t,W(n,` `),G(r)],` `)},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>K(``,e,`
|
|
25
25
|
`)+W([t,W(n,` `)],` `)},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>K(``,e,`
|
|
26
26
|
`)+W([`input`,t,W(n,` `),G(r)],` `)},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>K(``,e,`
|
|
27
|
-
`)+`directive @`+t+(
|
|
28
|
-
`,
|
|
27
|
+
`)+`directive @`+t+(ai(n)?K(`(
|
|
28
|
+
`,ii(W(n,`
|
|
29
29
|
`)),`
|
|
30
30
|
)`):K(`(`,W(n,`, `),`)`))+(r?` repeatable`:``)+` on `+W(i,` | `)},SchemaExtension:{leave:({directives:e,operationTypes:t})=>W([`extend schema`,W(e,` `),G(t)],` `)},ScalarTypeExtension:{leave:({name:e,directives:t})=>W([`extend scalar`,e,W(t,` `)],` `)},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>W([`extend type`,e,K(`implements `,W(t,` & `)),W(n,` `),G(r)],` `)},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>W([`extend interface`,e,K(`implements `,W(t,` & `)),W(n,` `),G(r)],` `)},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>W([`extend union`,e,W(t,` `),K(`= `,W(n,` | `))],` `)},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>W([`extend enum`,e,W(t,` `),G(n)],` `)},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>W([`extend input`,e,W(t,` `),G(n)],` `)},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>W([e,K(`.`,t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>W([e,K(`.`,t),K(`(`,n,`:)`)])},DirectiveCoordinate:{leave:({name:e})=>W([`@`,e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>W([`@`,e,K(`(`,t,`:)`)])}};function W(e,t=``){return e?.filter(e=>e).join(t)??``}function G(e){return K(`{
|
|
31
|
-
`,
|
|
31
|
+
`,ii(W(e,`
|
|
32
32
|
`)),`
|
|
33
|
-
}`)}function K(e,t,n=``){return t!=null&&t!==``?e+t+n:``}function
|
|
34
|
-
`))}function
|
|
35
|
-
`))??!1}var ii=`Accept`,ai=`Content-Type`,oi=`application/json`,si=`application/graphql-response+json`,ci=e=>e.replace(/([\s,]|#[^\n\r]+)+/g,` `).trim(),li=e=>{let t=e.toLowerCase();return t.includes(si)||t.includes(oi)},ui=e=>{try{if(Array.isArray(e))return{_tag:`Batch`,executionResults:e.map(di)};if(Ur(e))return{_tag:`Single`,executionResult:di(e)};throw Error(`Invalid execution result: result is not object or array. \nGot:\n${String(e)}`)}catch(e){return e}},di=e=>{if(typeof e!=`object`||!e)throw Error(`Invalid execution result: result is not object`);let t,n,r;if(`errors`in e){if(!Ur(e.errors)&&!Array.isArray(e.errors))throw Error(`Invalid execution result: errors is not plain object OR array`);t=e.errors}if(`data`in e){if(!Ur(e.data)&&e.data!==null)throw Error(`Invalid execution result: data is not plain object`);n=e.data}if(`extensions`in e){if(!Ur(e.extensions))throw Error(`Invalid execution result: extensions is not plain object`);r=e.extensions}return{data:n,errors:t,extensions:r}},fi=e=>e._tag===`Batch`?e.executionResults.some(pi):pi(e.executionResult),pi=e=>Array.isArray(e.errors)?e.errors.length>0:!!e.errors,mi=e=>typeof e==`object`&&!!e&&`kind`in e&&e.kind===n.OPERATION_DEFINITION,hi=e=>{let t,n=e.definitions.filter(mi);return n.length===1&&(t=n[0].name?.value),t},gi=e=>{let t=!1,n=e.definitions.filter(mi);return n.length===1&&(t=n[0].operation===`mutation`),t},_i=(e,n)=>{let r=typeof e==`string`||`kind`in e?e:String(e),i=typeof r==`string`?r:$r(r),a=!1,o;if(n)return{expression:i,isMutation:a,operationName:o};let s=zr(()=>typeof r==`string`?t(r):r);return s instanceof Error?{expression:i,isMutation:a,operationName:o}:(o=hi(s),a=gi(s),{expression:i,operationName:o,isMutation:a})},vi=JSON,yi=async e=>{let t={...e,method:e.request._tag===`Single`?e.request.document.isMutation?`POST`:Pr(e.method??`post`):e.request.hasMutations?`POST`:Pr(e.method??`post`),fetchOptions:{...e.fetchOptions,errorPolicy:e.fetchOptions.errorPolicy??`none`}},n=await Si(t.method)(t),r=await n.text(),i;try{i=xi(r,n.headers.get(ai),e.fetchOptions.jsonSerializer??vi)}catch(e){i=e}let a={status:n.status,headers:n.headers,body:r};if(!n.ok)return i instanceof Error?new Nr({...a},{query:e.request._tag===`Single`?e.request.document.expression:e.request.query,variables:e.request.variables}):new Nr(i._tag===`Batch`?{...i.executionResults,...a}:{...i.executionResult,...a},{query:e.request._tag===`Single`?e.request.document.expression:e.request.query,variables:e.request.variables});if(i instanceof Error)throw i;if(fi(i)&&t.fetchOptions.errorPolicy===`none`)return new Nr(i._tag===`Batch`?{...i.executionResults,...a}:{...i.executionResult,...a},{query:e.request._tag===`Single`?e.request.document.expression:e.request.query,variables:e.request.variables});switch(i._tag){case`Single`:return{...a,...bi(t)(i.executionResult)};case`Batch`:return{...a,data:i.executionResults.map(bi(t))};default:Hr(i)}},bi=e=>t=>({extensions:t.extensions,data:t.data,errors:e.fetchOptions.errorPolicy===`all`?t.errors:void 0}),xi=(e,t,n)=>t&&li(t)?ui(n.parse(e)):ui(e),Si=e=>async t=>{let n=new Headers(t.headers),r=null,i;n.has(ii)||n.set(ii,[si,oi].join(`, `)),e===`POST`?(i=(t.fetchOptions.jsonSerializer??vi).stringify(Ci(t)),typeof i==`string`&&!n.has(ai)&&n.set(ai,oi)):r=wi(t);let a={method:e,headers:n,body:i,...t.fetchOptions},o=new URL(t.url),s=a;if(t.middleware){let{url:e,...n}=await Promise.resolve(t.middleware({...a,url:t.url,operationName:t.request._tag===`Single`?t.request.document.operationName:void 0,variables:t.request.variables}));o=new URL(e),s=n}return r&&r.forEach((e,t)=>{o.searchParams.append(t,e)}),await(t.fetch??fetch)(o,s)},Ci=e=>{switch(e.request._tag){case`Single`:return{query:e.request.document.expression,variables:e.request.variables,operationName:e.request.document.operationName};case`Batch`:return Ir(e.request.query,e.request.variables??[]).map(([e,t])=>({query:e,variables:t}));default:throw Hr(e.request)}},wi=e=>{let t=e.fetchOptions.jsonSerializer??vi,n=new URLSearchParams;switch(e.request._tag){case`Single`:return n.append(`query`,ci(e.request.document.expression)),e.request.variables&&n.append(`variables`,t.stringify(e.request.variables)),e.request.document.operationName&&n.append(`operationName`,e.request.document.operationName),n;case`Batch`:{let r=e.request.variables?.map(e=>t.stringify(e))??[],i=Ir(e.request.query.map(ci),r).map(([e,t])=>({query:e,variables:t}));return n.append(`query`,t.stringify(i)),n}default:throw Hr(e.request)}},Ti=class{url;requestConfig;constructor(e,t={}){this.url=e,this.requestConfig=t}rawRequest=async(...e)=>{let[t,n,r]=e,i=Gr(t,n,r),{headers:a,fetch:o=globalThis.fetch,method:s=`POST`,requestMiddleware:c,responseMiddleware:l,excludeOperationName:u,...d}=this.requestConfig,{url:f}=this;i.signal!==void 0&&(d.signal=i.signal);let p=_i(i.query,u),m=await yi({url:f,request:{_tag:`Single`,document:p,variables:i.variables},headers:{...Lr(Fr(a)),...Lr(i.requestHeaders)},fetch:o,method:s,fetchOptions:d,middleware:c});if(l&&await l(m,{operationName:p.operationName,variables:n,url:this.url}),m instanceof Error)throw m;return m};async request(e,...t){let[n,r]=t,i=Di(e,n,r),{headers:a,fetch:o=globalThis.fetch,method:s=`POST`,requestMiddleware:c,responseMiddleware:l,excludeOperationName:u,...d}=this.requestConfig,{url:f}=this;i.signal!==void 0&&(d.signal=i.signal);let p=_i(i.document,u),m=await yi({url:f,request:{_tag:`Single`,document:p,variables:i.variables},headers:{...Lr(Fr(a)),...Lr(i.requestHeaders)},fetch:o,method:s,fetchOptions:d,middleware:c});if(l&&await l(m,{operationName:p.operationName,variables:i.variables,url:this.url}),m instanceof Error)throw m;return m.data}async batchRequests(e,t){let n=Wr(e,t),{headers:r,excludeOperationName:i,...a}=this.requestConfig;n.signal!==void 0&&(a.signal=n.signal);let o=n.documents.map(({document:e})=>_i(e,i)),s=o.map(({expression:e})=>e),c=o.some(({isMutation:e})=>e),l=n.documents.map(({variables:e})=>e),u=await yi({url:this.url,request:{_tag:`Batch`,operationName:void 0,query:s,hasMutations:c,variables:l},headers:{...Lr(Fr(r)),...Lr(n.requestHeaders)},fetch:this.requestConfig.fetch??globalThis.fetch,method:this.requestConfig.method||`POST`,fetchOptions:a,middleware:this.requestConfig.requestMiddleware});if(this.requestConfig.responseMiddleware&&await this.requestConfig.responseMiddleware(u,{operationName:void 0,variables:l,url:this.url}),u instanceof Error)throw u;return u.data}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,t){let{headers:n}=this.requestConfig;return n?n[e]=t:this.requestConfig.headers={[e]:t},this}setEndpoint(e){return this.url=e,this}};async function Ei(e,t,...n){let r=Oi(e,t,...n);return new Ti(r.url).request({...r})}var Di=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},Oi=(e,t,...n)=>{let[r,i]=n;return typeof e==`string`?{url:e,document:t,variables:r,requestHeaders:i,signal:void 0}:e},ki=(e,...t)=>e.reduce((e,n,r)=>`${e}${n}${r in t?String(t[r]):``}`,``);ge.use(ve).init({resources:{en:{code:`en`,name:`English`,translation:{common:{cancel:`Cancel`,delete:`Delete`,continue:`Continue`,empty:`Empty`,create:`Create`,save:`Save`,export:`Export`,reload:`Reload`,reloadConnect:`Click here to reload Connect`},searchbar:{placeholder:`Search Powerhouse`,filterLabel:`File type`},folderView:{sections:{folders:{title:`Folders`,empty:`No folders 🗂️`},documents:{title:`Documents and files`,empty:`No documents or files 📄`}}},files:{options:{switchboardLink:`Switchboard Link`}},modals:{deleteItem:{folder:{header:`Delete “{{item}}” folder?`,body:`Are you sure you want to delete this folder? All files and subfolders within it will be removed.`},file:{header:`Delete “{{item}}” file?`,body:`Are you sure you want to delete this file?`}},deleteDrive:{title:`Delete "{{label}}" drive?`,body:`Are you sure you want to delete this drive? All files and subfolders within it will be removed. Do you want to proceed?`,inputPlaceholder:`Enter drive name...`},upgradeDrive:{header:`Upgrade to cloud drive`,body:`You are moving files from a private to a shared drive. These files will become accessible to others in the shared drive.Do you want to proceed?`},createDocument:{header:`Create a new document`,placeholder:`Document name`},connectSettings:{title:`Settings`,body:`These settings will apply to all drives.`,clearStorage:{button:`Clear Storage`,description:`Delete previous session data`,confirmation:{title:`Clear Storage`,body:`Are you sure you want to clear the storage? This will remove all previous session data.`,clearButton:`Clear Storage`}},enabledDocumentTypes:{title:`Document Models`,description:`Documents enabled`,allSelected:`All documents are selected`}},exportDocumentWithErrors:{title:`Your document contains errors`,body:`Your document contains structure errors. Do you want to export it anyway?`},disclaimer:{title:`Disclaimer`,body:`All content provided herein our website, hyperlinked sites, associated applications, forums, blogs, social media accounts and other platforms (“Site”) is for your general information only, procured from third party sources. We make no warranties of any kind in relation to our content, including but not limited to accuracy and updatedness. No part of the content that we provide constitutes financial advice, legal advice or any other form of advice meant for your specific reliance for any purpose. Any use or reliance on our content is solely at your own risk and discretion. You should conduct your own research, review, analyse and verify our content before relying on them. Trading is a highly risky activity that can lead to major losses, please therefore consult your financial advisor before making any decision. No content on our Site is meant to be a solicitation or offer.`},cookiesPolicy:{title:`Cookies Policy`,body:`<subtitle>Use of Cookies and Similar Technologies</subtitle><p>The Site is using cookies. Cookies are small text files that are placed on your computer by websites that you visit. They are widely used in order to make websites work, or work more efficiently, as well as to provide information to the owners of the site. Cookies are typically stored on your computer´s hard drive.Information collected from cookies is used by us to evaluate the effectiveness of our Site and analyze trends. The information collected from cookies allows us to determine such things as which parts of the Site are most visited and difficulties our visitors may experience in accessing the SIte. With this knowledge, we can improve the quality of your experience on the Site by recognizing and delivering more of the most desired features and information, as well as by resolving access difficulties.</p><p>We use third party service providers, to assist us in better understanding the use of our Site. Our service providers will place cookies on the hard drive of your computer (or use similar technologies) and will receive information that we select that will educate us on such things as how visitors navigate around our Site. This information is aggregated to provide statistical data about our users browsing actions and patterns, and does not personally identify individuals. This information may include:</p><p>Computer or mobile device information, Website usage information, such as:<list></p><bullet>Page views,</bullet><bullet>Button clicks,</bullet><bullet>Input form changes (without the values being entered),</bullet><bullet>Errors.</bullet></list><p>Our service providers analyses this information and provides us with aggregate reports. The information and analysis provided by our service providers will be used to assist us in better understanding our visitors interests in our Site and how to better serve those interests. If you want to avoid using cookies altogether, you can disable cookies in your browser. However, disabling cookies might make it impossible for you to use certain features of the Site. Your use of the Site with a browser that is configured to accept cookies constitutes an acceptance of our and third-party cookies.</p>`}},notifications:{deleteDriveSuccess:`Drive successfully deleted`,deleteFolderSuccess:`Folder deleted`,fileDeleteSuccess:`File deleted`,addDriveSuccess:`New drive successfully added`,driveSyncSuccess:`Drive synced successfully`,driveSyncError:`Error synchronizing drive {{drive}}`,driveSyncConflict:`Conflict error detected in {{drive}}`,reloadApp:`It seems like you're running an outdated version of the app. Please reload Connect to get the latest version.`},footer:{cookiePolicy:`Cookie Policy`,termsOfUse:`Terms of Use`,disclaimer:`Disclaimer`,builtWith:`Built with <icon /> Powerhouse`},cookieBanner:{message:`This website uses cookies for analytic purposes only. Cookies are anonymous and do not link to user data. We collect information to improve the user experience and validate UI changes. You can still use the page without cookies. For more information, please read our <a>cookies policy.</a>`,accept:`Accept configured cookies`,reject:`Reject all cookies`,cookies:{functional:`Functional cookies`,analytics:`Analytics cookies`}}}}},fallbackLng:`en`,debug:!1,interpolation:{escapeValue:!1}}).catch(e=>{console.error(e)});function q(){return q=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},q.apply(this,arguments)}var J;(function(e){e.Pop=`POP`,e.Push=`PUSH`,e.Replace=`REPLACE`})(J||={});var Ai=`popstate`;function ji(e){e===void 0&&(e={});function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return Fi(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:Ii(t)}return Ri(t,n,null,e)}function Y(e,t){if(e===!1||e==null)throw Error(t)}function Mi(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Ni(){return Math.random().toString(36).substr(2,8)}function Pi(e,t){return{usr:e.state,key:e.key,idx:t}}function Fi(e,t,n,r){return n===void 0&&(n=null),q({pathname:typeof e==`string`?e:e.pathname,search:``,hash:``},typeof t==`string`?Li(t):t,{state:n,key:t&&t.key||r||Ni()})}function Ii(e){let{pathname:t=`/`,search:n=``,hash:r=``}=e;return n&&n!==`?`&&(t+=n.charAt(0)===`?`?n:`?`+n),r&&r!==`#`&&(t+=r.charAt(0)===`#`?r:`#`+r),t}function Li(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Ri(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=J.Pop,c=null,l=u();l??(l=0,o.replaceState(q({},o.state,{idx:l}),``));function u(){return(o.state||{idx:null}).idx}function d(){s=J.Pop;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=J.Push;let r=Fi(h.location,e,t);n&&n(r,e),l=u()+1;let d=Pi(r,l),f=h.createHref(r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=J.Replace;let r=Fi(h.location,e,t);n&&n(r,e),l=u();let i=Pi(r,l),d=h.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){let t=i.location.origin===`null`?i.location.href:i.location.origin,n=typeof e==`string`?e:Ii(e);return n=n.replace(/ $/,`%20`),Y(t,`No window.location.(origin|href) available to create URL for href: `+n),new URL(n,t)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Ai,d),c=e,()=>{i.removeEventListener(Ai,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}var X;(function(e){e.data=`data`,e.deferred=`deferred`,e.redirect=`redirect`,e.error=`error`})(X||={});var zi=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function Bi(e){return e.index===!0}function Vi(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((e,i)=>{let a=[...n,String(i)],o=typeof e.id==`string`?e.id:a.join(`-`);if(Y(e.index!==!0||!e.children,`Cannot specify children on an index route`),Y(!r[o],`Found a route id collision on id "`+o+`". Route id's must be globally unique within Data Router usages`),Bi(e)){let n=q({},e,t(e),{id:o});return r[o]=n,n}else{let n=q({},e,t(e),{id:o,children:void 0});return r[o]=n,e.children&&(n.children=Vi(e.children,t,a,r)),n}})}function Hi(e,t,n){return n===void 0&&(n=`/`),Ui(e,t,n,!1)}function Ui(e,t,n,r){let i=sa((typeof t==`string`?Li(t):t).pathname||`/`,n);if(i==null)return null;let a=Gi(e);qi(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=oa(i);o=ra(a[e],t,r)}return o}function Wi(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function Gi(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r=``);let i=(e,i,a)=>{let o={relativePath:a===void 0?e.path||``:a,caseSensitive:e.caseSensitive===!0,childrenIndex:i,route:e};o.relativePath.startsWith(`/`)&&(Y(o.relativePath.startsWith(r),`Absolute route path "`+o.relativePath+`" nested under path `+(`"`+r+`" is not valid. An absolute child route path `)+`must start with the combined path of all its parent routes.`),o.relativePath=o.relativePath.slice(r.length));let s=ga([r,o.relativePath]),c=n.concat(o);e.children&&e.children.length>0&&(Y(e.index!==!0,`Index routes must not have child routes. Please remove `+(`all child routes from route path "`+s+`".`)),Gi(e.children,t,c,s)),!(e.path==null&&!e.index)&&t.push({path:s,score:ta(s,e.index),routesMeta:c})};return e.forEach((e,t)=>{var n;if(e.path===``||!((n=e.path)!=null&&n.includes(`?`)))i(e,t);else for(let n of Ki(e.path))i(e,t,n)}),t}function Ki(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Ki(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function qi(e){e.sort((e,t)=>e.score===t.score?na(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Ji=/^:[\w-]+$/,Yi=3,Xi=2,Zi=1,Qi=10,$i=-2,ea=e=>e===`*`;function ta(e,t){let n=e.split(`/`),r=n.length;return n.some(ea)&&(r+=$i),t&&(r+=Xi),n.filter(e=>!ea(e)).reduce((e,t)=>e+(Ji.test(t)?Yi:t===``?Zi:Qi),r)}function na(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ra(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=ia({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=ia({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:ga([a,u.pathname]),pathnameBase:_a(ga([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=ga([a,u.pathnameBase]))}return o}function ia(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=aa(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,t,n)=>{let{paramName:r,isOptional:i}=t;if(r===`*`){let e=s[n]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let c=s[n];return i&&!c?e[r]=void 0:e[r]=(c||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function aa(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Mi(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "`+e+`" will be treated as if it were `+(`"`+e.replace(/\*$/,`/*`)+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+(`please change the route path to "`+e.replace(/\*$/,`/*`)+`".`));let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`));return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function oa(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Mi(!1,`The URL path "`+e+`" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent `+(`encoding (`+t+`).`)),e}}function sa(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var ca=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,la=e=>ca.test(e);function ua(e,t){t===void 0&&(t=`/`);let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Li(e):e,a;if(n)if(la(n))a=n;else{if(n.includes(`//`)){let e=n;n=n.replace(/\/\/+/g,`/`),Mi(!1,`Pathnames cannot have embedded double slashes - normalizing `+(e+` -> `+n))}a=n.startsWith(`/`)?da(n.substring(1),`/`):da(n,t)}else a=t;return{pathname:a,search:va(r),hash:ya(i)}}function da(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function fa(e,t,n,r){return`Cannot include a '`+e+`' character in a manually specified `+("`to."+t+"` field ["+JSON.stringify(r)+`]. Please separate it out to the `)+("`to."+n+"` field. Alternatively you may provide the full path as ")+`a string in <Link to="..."> and the router will parse it for you.`}function pa(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ma(e,t){let n=pa(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function ha(e,t,n,r){r===void 0&&(r=!1);let i;typeof e==`string`?i=Li(e):(i=q({},e),Y(!i.pathname||!i.pathname.includes(`?`),fa(`?`,`pathname`,`search`,i)),Y(!i.pathname||!i.pathname.includes(`#`),fa(`#`,`pathname`,`hash`,i)),Y(!i.search||!i.search.includes(`#`),fa(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=ua(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var ga=e=>e.join(`/`).replace(/\/\/+/g,`/`),_a=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),va=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ya=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,ba=class{constructor(e,t,n,r){r===void 0&&(r=!1),this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function xa(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}var Sa=[`post`,`put`,`patch`,`delete`],Ca=new Set(Sa),wa=[`get`,...Sa],Ta=new Set(wa),Ea=new Set([301,302,303,307,308]),Da=new Set([307,308]),Oa={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ka={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Aa={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},ja=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ma=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Na=`remix-router-transitions`;function Pa(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0,r=!n;Y(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;i=e=>({hasErrorBoundary:t(e)})}else i=Ma;let a={},o=Vi(e.routes,i,void 0,a),s,c=e.basename||`/`,l=e.dataStrategy||qa,u=e.patchRoutesOnNavigation,d=q({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),f=null,p=new Set,m=null,h=null,g=null,_=e.hydrationData!=null,v=Hi(o,e.history.location,c),y=!1,b=null;if(v==null&&!u){let t=Z(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=so(o);v=n,b={[r.id]:t}}v&&!e.hydrationData&&We(v,o,e.history.location.pathname).active&&(v=null);let x;if(!v){if(x=!1,v=[],d.v7_partialHydration){let t=We(null,o,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}}else if(v.some(e=>e.route.lazy))x=!1;else if(!v.some(e=>e.route.loader))x=!0;else if(d.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);x=v.slice(0,e+1).every(e=>!Ba(e.route,t,n))}else x=v.every(e=>!Ba(e.route,t,n))}else x=e.hydrationData!=null;let S,C={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,navigation:Oa,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},w=J.Pop,T=!1,E,D=!1,ee=new Map,O=null,k=!1,te=!1,ne=[],re=new Set,A=new Map,ie=0,ae=-1,oe=new Map,j=new Set,se=new Map,ce=new Map,M=new Set,le=new Map,N=new Map,P;function F(){if(f=e.history.listen(t=>{let{action:n,location:r,delta:i}=t;if(P){P(),P=void 0;return}Mi(N.size===0||i!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let a=Le({currentLocation:C.location,nextLocation:r,historyAction:n});if(a&&i!=null){let t=new Promise(e=>{P=e});e.history.go(i*-1),Ie(a,{state:`blocked`,location:r,proceed(){Ie(a,{state:`proceeding`,proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(i))},reset(){let e=new Map(C.blockers);e.set(a,Aa),I({blockers:e})}});return}return he(n,r)}),n){Ao(t,ee);let e=()=>jo(t,ee);t.addEventListener(`pagehide`,e),O=()=>t.removeEventListener(`pagehide`,e)}return C.initialized||he(J.Pop,C.location,{initialHydration:!0}),S}function ue(){f&&f(),O&&O(),p.clear(),E&&E.abort(),C.fetchers.forEach((e,t)=>Oe(t)),C.blockers.forEach((e,t)=>Fe(t))}function de(e){return p.add(e),()=>p.delete(e)}function I(e,t){t===void 0&&(t={}),C=q({},C,e);let n=[],r=[];d.v7_fetcherPersist&&C.fetchers.forEach((e,t)=>{e.state===`idle`&&(M.has(t)?r.push(t):n.push(t))}),M.forEach(e=>{!C.fetchers.has(e)&&!A.has(e)&&r.push(e)}),[...p].forEach(e=>e(C,{deletedFetchers:r,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),d.v7_fetcherPersist?(n.forEach(e=>C.fetchers.delete(e)),r.forEach(e=>Oe(e))):r.forEach(e=>M.delete(e))}function fe(t,n,r){let{flushSync:i}=r===void 0?{}:r,a=C.actionData!=null&&C.navigation.formMethod!=null&&$(C.navigation.formMethod)&&C.navigation.state===`loading`&&t.state?._isRedirect!==!0,c;c=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:a?C.actionData:null;let l=n.loaderData?io(C.loaderData,n.loaderData,n.matches||[],n.errors):C.loaderData,u=C.blockers;u.size>0&&(u=new Map(u),u.forEach((e,t)=>u.set(t,Aa)));let d=T===!0||C.navigation.formMethod!=null&&$(C.navigation.formMethod)&&t.state?._isRedirect!==!0;s&&=(o=s,void 0),k||w===J.Pop||(w===J.Push?e.history.push(t,t.state):w===J.Replace&&e.history.replace(t,t.state));let f;if(w===J.Pop){let e=ee.get(C.location.pathname);e&&e.has(t.pathname)?f={currentLocation:C.location,nextLocation:t}:ee.has(t.pathname)&&(f={currentLocation:t,nextLocation:C.location})}else if(D){let e=ee.get(C.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),ee.set(C.location.pathname,e)),f={currentLocation:C.location,nextLocation:t}}I(q({},n,{actionData:c,loaderData:l,historyAction:w,location:t,initialized:!0,navigation:Oa,revalidation:`idle`,restoreScrollPosition:Ue(t,n.matches||C.matches),preventScrollReset:d,blockers:u}),{viewTransitionOpts:f,flushSync:i===!0}),w=J.Pop,T=!1,D=!1,k=!1,te=!1,ne=[]}async function pe(t,n){if(typeof t==`number`){e.history.go(t);return}let r=Ia(C.location,C.matches,c,d.v7_prependBasename,t,d.v7_relativeSplatPath,n?.fromRouteId,n?.relative),{path:i,submission:a,error:o}=La(d.v7_normalizeFormMethod,!1,r,n),s=C.location,l=Fi(C.location,i,n&&n.state);l=q({},l,e.history.encodeLocation(l));let u=n&&n.replace!=null?n.replace:void 0,f=J.Push;u===!0?f=J.Replace:u===!1||a!=null&&$(a.formMethod)&&a.formAction===C.location.pathname+C.location.search&&(f=J.Replace);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=Le({currentLocation:s,nextLocation:l,historyAction:f});if(h){Ie(h,{state:`blocked`,location:l,proceed(){Ie(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),pe(t,n)},reset(){let e=new Map(C.blockers);e.set(h,Aa),I({blockers:e})}});return}return await he(f,l,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m})}function me(){if(we(),I({revalidation:`loading`}),C.navigation.state!==`submitting`){if(C.navigation.state===`idle`){he(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}he(w||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:D===!0})}}async function he(t,n,r){E&&E.abort(),E=null,w=t,k=(r&&r.startUninterruptedRevalidation)===!0,He(C.location,C.matches),T=(r&&r.preventScrollReset)===!0,D=(r&&r.enableViewTransition)===!0;let i=s||o,a=r&&r.overrideNavigation,l=r!=null&&r.initialHydration&&C.matches&&C.matches.length>0&&!y?C.matches:Hi(i,n,c),u=(r&&r.flushSync)===!0;if(l&&C.initialized&&!te&&uo(C.location,n)&&!(r&&r.submission&&$(r.submission.formMethod))){fe(n,{matches:l},{flushSync:u});return}let d=We(l,i,n.pathname);if(d.active&&d.matches&&(l=d.matches),!l){let{error:e,notFoundMatches:t,route:r}=Re(n.pathname);fe(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:u});return}E=new AbortController;let f=$a(e.history,n,E.signal,r&&r.submission),p;if(r&&r.pendingError)p=[oo(l).route.id,{type:X.error,error:r.pendingError}];else if(r&&r.submission&&$(r.submission.formMethod)){let t=await ge(f,n,r.submission,l,d.active,{replace:r.replace,flushSync:u});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(Q(r)&&xa(r.error)&&r.error.status===404){E=null,fe(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}l=t.matches||l,p=t.pendingActionResult,a=To(n,r.submission),u=!1,d.active=!1,f=$a(e.history,f.url,f.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_}=await _e(f,n,l,d.active,a,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,u,p);m||(E=null,fe(n,q({matches:h||l},ao(p),{loaderData:g,errors:_})))}async function ge(t,n,r,i,a,o){if(o===void 0&&(o={}),we(),I({navigation:Eo(n,r)},{flushSync:o.flushSync===!0}),a){let e=await Ge(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){let t=oo(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:X.error,error:e.error}]}}else if(e.matches)i=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Re(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:X.error,error:t}]}}}let s,l=Co(i,n);if(!l.route.action&&!l.route.lazy)s={type:X.error,error:Z(405,{method:t.method,pathname:n.pathname,routeId:l.route.id})};else if(s=(await R(`action`,C,t,[l],i,null))[l.route.id],t.signal.aborted)return{shortCircuited:!0};if(mo(s)){let n;return n=o&&o.replace!=null?o.replace:Qa(s.response.headers.get(`Location`),new URL(t.url),c,e.history)===C.location.pathname+C.location.search,await L(t,s,!0,{submission:r,replace:n}),{shortCircuited:!0}}if(po(s))throw Z(400,{type:`defer-action`});if(Q(s)){let e=oo(i,l.route.id);return(o&&o.replace)!==!0&&(w=J.Push),{matches:i,pendingActionResult:[e.route.id,s]}}return{matches:i,pendingActionResult:[l.route.id,s]}}async function _e(t,n,r,i,a,l,u,f,p,m,h){let g=a||To(n,l),_=l||u||wo(g),v=!k&&(!d.v7_partialHydration||!p);if(i){if(v){let e=ve(h);I(q({navigation:g},e===void 0?{}:{actionData:e}),{flushSync:m})}let e=await Ge(r,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){let t=oo(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)r=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Re(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let y=s||o,[b,x]=za(e.history,C,r,_,n,d.v7_partialHydration&&p===!0,d.v7_skipActionErrorRevalidation,te,ne,re,M,se,j,y,c,h);if(ze(e=>!(r&&r.some(t=>t.route.id===e))||b&&b.some(t=>t.route.id===e)),ae=++ie,b.length===0&&x.length===0){let e=Me();return fe(n,q({matches:r,loaderData:{},errors:h&&Q(h[1])?{[h[0]]:h[1].error}:null},ao(h),e?{fetchers:new Map(C.fetchers)}:{}),{flushSync:m}),{shortCircuited:!0}}if(v){let e={};if(!i){e.navigation=g;let t=ve(h);t!==void 0&&(e.actionData=t)}x.length>0&&(e.fetchers=ye(x)),I(e,{flushSync:m})}x.forEach(e=>{Ae(e.key),e.controller&&A.set(e.key,e.controller)});let S=()=>x.forEach(e=>Ae(e.key));E&&E.signal.addEventListener(`abort`,S);let{loaderResults:w,fetcherResults:T}=await Ce(C,r,b,x,t);if(t.signal.aborted)return{shortCircuited:!0};E&&E.signal.removeEventListener(`abort`,S),x.forEach(e=>A.delete(e.key));let D=co(w);if(D)return await L(t,D.result,!0,{replace:f}),{shortCircuited:!0};if(D=co(T),D)return j.add(D.key),await L(t,D.result,!0,{replace:f}),{shortCircuited:!0};let{loaderData:ee,errors:O}=ro(C,r,w,h,x,T,le);le.forEach((e,t)=>{e.subscribe(n=>{(n||e.done)&&le.delete(t)})}),d.v7_partialHydration&&p&&C.errors&&(O=q({},C.errors,O));let oe=Me(),ce=Ne(ae),N=oe||ce||x.length>0;return q({matches:r,loaderData:ee,errors:O},N?{fetchers:new Map(C.fetchers)}:{})}function ve(e){if(e&&!Q(e[1]))return{[e[0]]:e[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function ye(e){return e.forEach(e=>{let t=C.fetchers.get(e.key),n=Do(void 0,t?t.data:void 0);C.fetchers.set(e.key,n)}),new Map(C.fetchers)}function be(e,t,n,i){if(r)throw Error(`router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.`);Ae(e);let a=(i&&i.flushSync)===!0,l=s||o,u=Ia(C.location,C.matches,c,d.v7_prependBasename,n,d.v7_relativeSplatPath,t,i?.relative),f=Hi(l,u,c),p=We(f,l,u);if(p.active&&p.matches&&(f=p.matches),!f){Ee(e,t,Z(404,{pathname:u}),{flushSync:a});return}let{path:m,submission:h,error:g}=La(d.v7_normalizeFormMethod,!0,u,i);if(g){Ee(e,t,g,{flushSync:a});return}let _=Co(f,m),v=(i&&i.preventScrollReset)===!0;if(h&&$(h.formMethod)){xe(e,t,m,_,f,p.active,a,v,h);return}se.set(e,{routeId:t,path:m}),Se(e,t,m,_,f,p.active,a,v,h)}async function xe(t,n,r,i,a,l,u,f,p){we(),se.delete(t);function m(e){return!e.route.action&&!e.route.lazy?(Ee(t,n,Z(405,{method:p.formMethod,pathname:r,routeId:n}),{flushSync:u}),!0):!1}if(!l&&m(i))return;Te(t,Oo(p,C.fetchers.get(t)),{flushSync:u});let h=new AbortController,g=$a(e.history,r,h.signal,p);if(l){let e=await Ge(a,new URL(g.url).pathname,g.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Ee(t,n,e.error,{flushSync:u});return}else if(!e.matches){Ee(t,n,Z(404,{pathname:r}),{flushSync:u});return}else if(a=e.matches,i=Co(a,r),m(i))return}A.set(t,h);let _=ie,v=(await R(`action`,C,g,[i],a,t))[i.route.id];if(g.signal.aborted){A.get(t)===h&&A.delete(t);return}if(d.v7_fetcherPersist&&M.has(t)){if(mo(v)||Q(v)){Te(t,ko(void 0));return}}else{if(mo(v))if(A.delete(t),ae>_){Te(t,ko(void 0));return}else return j.add(t),Te(t,Do(p)),L(g,v,!1,{fetcherSubmission:p,preventScrollReset:f});if(Q(v)){Ee(t,n,v.error);return}}if(po(v))throw Z(400,{type:`defer-action`});let y=C.navigation.location||C.location,b=$a(e.history,y,h.signal),x=s||o,S=C.navigation.state===`idle`?C.matches:Hi(x,C.navigation.location,c);Y(S,`Didn't find any matches after fetcher action`);let T=++ie;oe.set(t,T);let D=Do(p,v.data);C.fetchers.set(t,D);let[ee,O]=za(e.history,C,S,p,y,!1,d.v7_skipActionErrorRevalidation,te,ne,re,M,se,j,x,c,[i.route.id,v]);O.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=C.fetchers.get(t),r=Do(void 0,n?n.data:void 0);C.fetchers.set(t,r),Ae(t),e.controller&&A.set(t,e.controller)}),I({fetchers:new Map(C.fetchers)});let k=()=>O.forEach(e=>Ae(e.key));h.signal.addEventListener(`abort`,k);let{loaderResults:ce,fetcherResults:N}=await Ce(C,S,ee,O,b);if(h.signal.aborted)return;h.signal.removeEventListener(`abort`,k),oe.delete(t),A.delete(t),O.forEach(e=>A.delete(e.key));let P=co(ce);if(P)return L(b,P.result,!1,{preventScrollReset:f});if(P=co(N),P)return j.add(P.key),L(b,P.result,!1,{preventScrollReset:f});let{loaderData:F,errors:ue}=ro(C,S,ce,void 0,O,N,le);if(C.fetchers.has(t)){let e=ko(v.data);C.fetchers.set(t,e)}Ne(T),C.navigation.state===`loading`&&T>ae?(Y(w,`Expected pending action`),E&&E.abort(),fe(C.navigation.location,{matches:S,loaderData:F,errors:ue,fetchers:new Map(C.fetchers)})):(I({errors:ue,loaderData:io(C.loaderData,F,S,ue),fetchers:new Map(C.fetchers)}),te=!1)}async function Se(t,n,r,i,a,o,s,c,l){let u=C.fetchers.get(t);Te(t,Do(l,u?u.data:void 0),{flushSync:s});let d=new AbortController,f=$a(e.history,r,d.signal);if(o){let e=await Ge(a,new URL(f.url).pathname,f.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Ee(t,n,e.error,{flushSync:s});return}else if(e.matches)a=e.matches,i=Co(a,r);else{Ee(t,n,Z(404,{pathname:r}),{flushSync:s});return}}A.set(t,d);let p=ie,m=(await R(`loader`,C,f,[i],a,t))[i.route.id];if(po(m)&&(m=await xo(m,f.signal,!0)||m),A.get(t)===d&&A.delete(t),!f.signal.aborted){if(M.has(t)){Te(t,ko(void 0));return}if(mo(m))if(ae>p){Te(t,ko(void 0));return}else{j.add(t),await L(f,m,!1,{preventScrollReset:c});return}if(Q(m)){Ee(t,n,m.error);return}Y(!po(m),`Unhandled fetcher deferred data`),Te(t,ko(m.data))}}async function L(r,i,a,o){let{submission:s,fetcherSubmission:l,preventScrollReset:u,replace:d}=o===void 0?{}:o;i.response.headers.has(`X-Remix-Revalidate`)&&(te=!0);let f=i.response.headers.get(`Location`);Y(f,`Expected a Location header on the redirect Response`),f=Qa(f,new URL(r.url),c,e.history);let p=Fi(C.location,f,{_isRedirect:!0});if(n){let n=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))n=!0;else if(ja.test(f)){let r=e.history.createURL(f);n=r.origin!==t.location.origin||sa(r.pathname,c)==null}if(n){d?t.location.replace(f):t.location.assign(f);return}}E=null;let m=d===!0||i.response.headers.has(`X-Remix-Replace`)?J.Replace:J.Push,{formMethod:h,formAction:g,formEncType:_}=C.navigation;!s&&!l&&h&&g&&_&&(s=wo(C.navigation));let v=s||l;Da.has(i.response.status)&&v&&$(v.formMethod)?await he(m,p,{submission:q({},v,{formAction:f}),preventScrollReset:u||T,enableViewTransition:a?D:void 0}):await he(m,p,{overrideNavigation:To(p,s),fetcherSubmission:l,preventScrollReset:u||T,enableViewTransition:a?D:void 0})}async function R(e,t,n,r,o,s){let u,f={};try{u=await Ja(l,e,t,n,r,o,s,a,i)}catch(e){return r.forEach(t=>{f[t.route.id]={type:X.error,error:e}}),f}for(let[e,t]of Object.entries(u))if(fo(t)){let r=t.result;f[e]={type:X.redirect,response:Za(r,n,e,o,c,d.v7_relativeSplatPath)}}else f[e]=await Xa(t);return f}async function Ce(t,n,r,i,a){let o=t.matches,s=R(`loader`,t,a,r,n,null),c=Promise.all(i.map(async n=>{if(n.matches&&n.match&&n.controller){let r=(await R(`loader`,t,$a(e.history,n.path,n.controller.signal),[n.match],n.matches,n.key))[n.match.route.id];return{[n.key]:r}}else return Promise.resolve({[n.key]:{type:X.error,error:Z(404,{pathname:n.path})}})})),l=await s,u=(await c).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([yo(n,l,a.signal,o,t.loaderData),bo(n,u,i)]),{loaderResults:l,fetcherResults:u}}function we(){te=!0,ne.push(...ze()),se.forEach((e,t)=>{A.has(t)&&re.add(t),Ae(t)})}function Te(e,t,n){n===void 0&&(n={}),C.fetchers.set(e,t),I({fetchers:new Map(C.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function Ee(e,t,n,r){r===void 0&&(r={});let i=oo(C.matches,t);Oe(e),I({errors:{[i.route.id]:n},fetchers:new Map(C.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function De(e){return ce.set(e,(ce.get(e)||0)+1),M.has(e)&&M.delete(e),C.fetchers.get(e)||ka}function Oe(e){let t=C.fetchers.get(e);A.has(e)&&!(t&&t.state===`loading`&&oe.has(e))&&Ae(e),se.delete(e),oe.delete(e),j.delete(e),d.v7_fetcherPersist&&M.delete(e),re.delete(e),C.fetchers.delete(e)}function ke(e){let t=(ce.get(e)||0)-1;t<=0?(ce.delete(e),M.add(e),d.v7_fetcherPersist||Oe(e)):ce.set(e,t),I({fetchers:new Map(C.fetchers)})}function Ae(e){let t=A.get(e);t&&(t.abort(),A.delete(e))}function je(e){for(let t of e){let e=ko(De(t).data);C.fetchers.set(t,e)}}function Me(){let e=[],t=!1;for(let n of j){let r=C.fetchers.get(n);Y(r,`Expected fetcher: `+n),r.state===`loading`&&(j.delete(n),e.push(n),t=!0)}return je(e),t}function Ne(e){let t=[];for(let[n,r]of oe)if(r<e){let e=C.fetchers.get(n);Y(e,`Expected fetcher: `+n),e.state===`loading`&&(Ae(n),oe.delete(n),t.push(n))}return je(t),t.length>0}function Pe(e,t){let n=C.blockers.get(e)||Aa;return N.get(e)!==t&&N.set(e,t),n}function Fe(e){C.blockers.delete(e),N.delete(e)}function Ie(e,t){let n=C.blockers.get(e)||Aa;Y(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: `+n.state+` -> `+t.state);let r=new Map(C.blockers);r.set(e,t),I({blockers:r})}function Le(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(N.size===0)return;N.size>1&&Mi(!1,`A router only supports one blocker at a time`);let i=Array.from(N.entries()),[a,o]=i[i.length-1],s=C.blockers.get(a);if(!(s&&s.state===`proceeding`)&&o({currentLocation:t,nextLocation:n,historyAction:r}))return a}function Re(e){let t=Z(404,{pathname:e}),{matches:n,route:r}=so(s||o);return ze(),{notFoundMatches:n,route:r,error:t}}function ze(e){let t=[];return le.forEach((n,r)=>{(!e||e(r))&&(n.cancel(),t.push(r),le.delete(r))}),t}function Be(e,t,n){if(m=e,g=t,h=n||null,!_&&C.navigation===Oa){_=!0;let e=Ue(C.location,C.matches);e!=null&&I({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function Ve(e,t){return h&&h(e,t.map(e=>Wi(e,C.loaderData)))||e.key}function He(e,t){if(m&&g){let n=Ve(e,t);m[n]=g()}}function Ue(e,t){if(m){let n=Ve(e,t),r=m[n];if(typeof r==`number`)return r}return null}function We(e,t,n){if(u){if(!e)return{active:!0,matches:Ui(t,n,c,!0)||[]};if(Object.keys(e[0].params).length>0)return{active:!0,matches:Ui(t,n,c,!0)}}return{active:!1,matches:null}}async function Ge(e,t,n,r){if(!u)return{type:`success`,matches:e};let l=e;for(;;){let e=s==null,d=s||o,f=a;try{await u({signal:n,path:t,matches:l,fetcherKey:r,patch:(e,t)=>{n.aborted||Wa(e,t,d,f,i)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}finally{e&&!n.aborted&&(o=[...o])}if(n.aborted)return{type:`aborted`};let p=Hi(d,t,c);if(p)return{type:`success`,matches:p};let m=Ui(d,t,c,!0);if(!m||l.length===m.length&&l.every((e,t)=>e.route.id===m[t].route.id))return{type:`success`,matches:null};l=m}}function Ke(e){a={},s=Vi(e,i,void 0,a)}function qe(e,t){let n=s==null;Wa(e,t,s||o,a,i),n&&(o=[...o],I({}))}return S={get basename(){return c},get future(){return d},get state(){return C},get routes(){return o},get window(){return t},initialize:F,subscribe:de,enableScrollRestoration:Be,navigate:pe,fetch:be,revalidate:me,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:De,deleteFetcher:ke,dispose:ue,getBlocker:Pe,deleteBlocker:Fe,patchRoutes:qe,_internalFetchControllers:A,_internalActiveDeferreds:le,_internalSetRoutes:Ke},S}function Fa(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Ia(e,t,n,r,i,a,o,s){let c,l;if(o){c=[];for(let e of t)if(c.push(e),e.route.id===o){l=e;break}}else c=t,l=t[t.length-1];let u=ha(i||`.`,ma(c,a),sa(e.pathname,n)||e.pathname,s===`path`);if(i??(u.search=e.search,u.hash=e.hash),(i==null||i===``||i===`.`)&&l){let e=So(u.search);if(l.route.index&&!e)u.search=u.search?u.search.replace(/^\?/,`?index&`):`?index`;else if(!l.route.index&&e){let e=new URLSearchParams(u.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();u.search=n?`?`+n:``}}return r&&n!==`/`&&(u.pathname=u.pathname===`/`?n:ga([n,u.pathname])),Ii(u)}function La(e,t,n,r){if(!r||!Fa(r))return{path:n};if(r.formMethod&&!vo(r.formMethod))return{path:n,error:Z(405,{method:r.formMethod})};let i=()=>({path:n,error:Z(400,{type:`invalid-body`})}),a=r.formMethod||`get`,o=e?a.toUpperCase():a.toLowerCase(),s=lo(n);if(r.body!==void 0){if(r.formEncType===`text/plain`){if(!$(o))return i();let e=typeof r.body==`string`?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,t)=>{let[n,r]=t;return``+e+n+`=`+r+`
|
|
36
|
-
`},``):String(r.body);return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}else if(r.formEncType===`application/json`){if(!$(o))return i();try{let e=typeof r.body==`string`?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch{return i()}}}Y(typeof FormData==`function`,`FormData is not available in this environment`);let c,l;if(r.formData)c=eo(r.formData),l=r.formData;else if(r.body instanceof FormData)c=eo(r.body),l=r.body;else if(r.body instanceof URLSearchParams)c=r.body,l=to(c);else if(r.body==null)c=new URLSearchParams,l=new FormData;else try{c=new URLSearchParams(r.body),l=to(c)}catch{return i()}let u={formMethod:o,formAction:s,formEncType:r&&r.formEncType||`application/x-www-form-urlencoded`,formData:l,json:void 0,text:void 0};if($(u.formMethod))return{path:n,submission:u};let d=Li(n);return t&&d.search&&So(d.search)&&c.append(`index`,``),d.search=`?`+c,{path:Ii(d),submission:u}}function Ra(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(e=>e.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function za(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){let g=h?Q(h[1])?h[1].error:h[1].data:void 0,_=e.createURL(t.location),v=e.createURL(i),y=n;a&&t.errors?y=Ra(n,Object.keys(t.errors)[0],!0):h&&Q(h[1])&&(y=Ra(n,h[0]));let b=h?h[1].statusCode:void 0,x=o&&b&&b>=400,S=y.filter((e,n)=>{let{route:i}=e;if(i.lazy)return!0;if(i.loader==null)return!1;if(a)return Ba(i,t.loaderData,t.errors);if(Va(t.loaderData,t.matches[n],e)||c.some(t=>t===e.route.id))return!0;let o=t.matches[n],l=e;return Ua(e,q({currentUrl:_,currentParams:o.params,nextUrl:v,nextParams:l.params},r,{actionResult:g,actionStatus:b,defaultShouldRevalidate:x?!1:s||_.pathname+_.search===v.pathname+v.search||_.search!==v.search||Ha(o,l)}))}),C=[];return d.forEach((e,i)=>{if(a||!n.some(t=>t.route.id===e.routeId)||u.has(i))return;let o=Hi(p,e.path,m);if(!o){C.push({key:i,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}let c=t.fetchers.get(i),d=Co(o,e.path),h=!1;f.has(i)?h=!1:l.has(i)?(l.delete(i),h=!0):h=c&&c.state!==`idle`&&c.data===void 0?s:Ua(d,q({currentUrl:_,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:g,actionStatus:b,defaultShouldRevalidate:x?!1:s})),h&&C.push({key:i,routeId:e.routeId,path:e.path,matches:o,match:d,controller:new AbortController})}),[S,C]}function Ba(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader==`function`&&e.loader.hydrate===!0?!0:!r&&!i}function Va(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function Ha(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Ua(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Wa(e,t,n,r,i){let a;if(e){let t=r[e];Y(t,`No route found to patch children into: routeId = `+e),t.children||=[],a=t.children}else a=n;let o=Vi(t.filter(e=>!a.some(t=>Ga(e,t))),i,[e||`_`,`patch`,String(a?.length||`0`)],r);a.push(...o)}function Ga(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((e,n)=>t.children?.some(t=>Ga(e,t))):!1}async function Ka(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Y(i,`No route found in manifest`);let a={};for(let e in r){let t=i[e]!==void 0&&e!==`hasErrorBoundary`;Mi(!t,`Route "`+i.id+`" has a static property "`+e+`" defined but its lazy function is also returning a value for this property. `+(`The lazy route property "`+e+`" will be ignored.`)),!t&&!zi.has(e)&&(a[e]=r[e])}Object.assign(i,a),Object.assign(i,q({},t(i),{lazy:void 0}))}async function qa(e){let{matches:t}=e,n=t.filter(e=>e.shouldLoad);return(await Promise.all(n.map(e=>e.resolve()))).reduce((e,t,r)=>Object.assign(e,{[n[r].route.id]:t}),{})}async function Ja(e,t,n,r,i,a,o,s,c,l){let u=a.map(e=>e.route.lazy?Ka(e.route,c,s):void 0),d=await e({matches:a.map((e,n)=>{let a=u[n],o=i.some(t=>t.route.id===e.route.id);return q({},e,{shouldLoad:o,resolve:async n=>(n&&r.method===`GET`&&(e.route.lazy||e.route.loader)&&(o=!0),o?Ya(t,r,e,a,n,l):Promise.resolve({type:X.data,result:void 0}))})}),request:r,params:a[0].params,fetcherKey:o,context:l});try{await Promise.all(u)}catch{}return d}async function Ya(e,t,n,r,i,a){let o,s,c=r=>{let o,c=new Promise((e,t)=>o=t);s=()=>o(),t.signal.addEventListener(`abort`,s);let l=i=>typeof r==`function`?r({request:t,params:n.params,context:a},...i===void 0?[]:[i]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean `+(`"`+e+`" [routeId: `+n.route.id+`]`))),u=(async()=>{try{return{type:`data`,result:await(i?i(e=>l(e)):l())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([u,c])};try{let i=n.route[e];if(r)if(i){let e,[t]=await Promise.all([c(i).catch(t=>{e=t}),r]);if(e!==void 0)throw e;o=t}else if(await r,i=n.route[e],i)o=await c(i);else if(e===`action`){let e=new URL(t.url),r=e.pathname+e.search;throw Z(405,{method:t.method,pathname:r,routeId:n.route.id})}else return{type:X.data,result:void 0};else if(i)o=await c(i);else{let e=new URL(t.url);throw Z(404,{pathname:e.pathname+e.search})}Y(o.result!==void 0,`You defined `+(e===`action`?`an action`:`a loader`)+` for route `+(`"`+n.route.id+`" but didn't return anything from your \``+e+"` ")+"function. Please return a value or `null`.")}catch(e){return{type:X.error,result:e}}finally{s&&t.signal.removeEventListener(`abort`,s)}return o}async function Xa(e){let{result:t,type:n}=e;if(_o(t)){let e;try{let n=t.headers.get(`Content-Type`);e=n&&/\bapplication\/json\b/.test(n)?t.body==null?null:await t.json():await t.text()}catch(e){return{type:X.error,error:e}}return n===X.error?{type:X.error,error:new ba(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:X.data,data:e,statusCode:t.status,headers:t.headers}}if(n===X.error){if(ho(t)){var r;if(t.data instanceof Error){var i;return{type:X.error,error:t.data,statusCode:t.init?.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:X.error,error:new ba(t.init?.status||500,void 0,t.data),statusCode:xa(t)?t.status:void 0,headers:(r=t.init)!=null&&r.headers?new Headers(t.init.headers):void 0}}return{type:X.error,error:t,statusCode:xa(t)?t.status:void 0}}if(go(t))return{type:X.deferred,deferredData:t,statusCode:t.init?.status,headers:t.init?.headers&&new Headers(t.init.headers)};if(ho(t)){var a;return{type:X.data,data:t.data,statusCode:t.init?.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:X.data,data:t}}function Za(e,t,n,r,i,a){let o=e.headers.get(`Location`);if(Y(o,`Redirects returned/thrown from loaders/actions must have a Location header`),!ja.test(o)){let s=r.slice(0,r.findIndex(e=>e.route.id===n)+1);o=Ia(new URL(t.url),s,i,!0,o,a),e.headers.set(`Location`,o)}return e}function Qa(e,t,n,r){let i=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];if(ja.test(e)){let r=e,a=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(i.includes(a.protocol))throw Error(`Invalid redirect location`);let o=sa(a.pathname,n)!=null;if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}try{let t=r.createURL(e);if(i.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}function $a(e,t,n,r){let i=e.createURL(lo(t)).toString(),a={signal:n};if(r&&$(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=eo(r.formData):a.body=r.formData}return new Request(i,a)}function eo(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function to(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function no(e,t,n,r,i){let a={},o=null,s,c=!1,l={},u=n&&Q(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(Y(!mo(f),`Cannot handle redirect results in processLoaderData`),Q(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=oo(e,d);o[n.route.id]??(o[n.route.id]=t)}a[d]=void 0,c||(c=!0,s=xa(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else po(f)?(r.set(d,f.deferredData),a[d]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)):(a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers))}),u!==void 0&&n&&(o={[n[0]]:u},a[n[0]]=void 0),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function ro(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=no(t,n,r,o,!1);return i.forEach(t=>{let{key:n,match:r,controller:i}=t,o=a[n];if(Y(o,`Did not find corresponding fetcher result`),!(i&&i.signal.aborted))if(Q(o)){let t=oo(e.matches,r?.route.id);c&&c[t.route.id]||(c=q({},c,{[t.route.id]:o.error})),e.fetchers.delete(n)}else if(mo(o))Y(!1,`Unhandled fetcher revalidation redirect`);else if(po(o))Y(!1,`Unhandled fetcher deferred data`);else{let t=ko(o.data);e.fetchers.set(n,t)}}),{loaderData:s,errors:c}}function io(e,t,n,r){let i=q({},t);for(let a of n){let n=a.route.id;if(t.hasOwnProperty(n)?t[n]!==void 0&&(i[n]=t[n]):e[n]!==void 0&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function ao(e){return e?Q(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function oo(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function so(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function Z(e,t){let{pathname:n,routeId:r,method:i,type:a,message:o}=t===void 0?{}:t,s=`Unknown Server Error`,c=`Unknown @remix-run/router error`;return e===400?(s=`Bad Request`,i&&n&&r?c=`You made a `+i+` request to "`+n+`" but `+('did not provide a `loader` for route "'+r+`", `)+`so there is no way to handle the request.`:a===`defer-action`?c=`defer() is not supported in actions`:a===`invalid-body`&&(c=`Unable to encode submission body`)):e===403?(s=`Forbidden`,c=`Route "`+r+`" does not match URL "`+n+`"`):e===404?(s=`Not Found`,c=`No route matches URL "`+n+`"`):e===405&&(s=`Method Not Allowed`,i&&n&&r?c=`You made a `+i.toUpperCase()+` request to "`+n+`" but `+('did not provide an `action` for route "'+r+`", `)+`so there is no way to handle the request.`:i&&(c=`Invalid request method "`+i.toUpperCase()+`"`)),new ba(e||500,s,Error(c),!0)}function co(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(mo(r))return{key:n,result:r}}}function lo(e){let t=typeof e==`string`?Li(e):e;return Ii(q({},t,{hash:``}))}function uo(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function fo(e){return _o(e.result)&&Ea.has(e.result.status)}function po(e){return e.type===X.deferred}function Q(e){return e.type===X.error}function mo(e){return(e&&e.type)===X.redirect}function ho(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function go(e){let t=e;return t&&typeof t==`object`&&typeof t.data==`object`&&typeof t.subscribe==`function`&&typeof t.cancel==`function`&&typeof t.resolveData==`function`}function _o(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function vo(e){return Ta.has(e.toLowerCase())}function $(e){return Ca.has(e.toLowerCase())}async function yo(e,t,n,r,i){let a=Object.entries(t);for(let o=0;o<a.length;o++){let[s,c]=a[o],l=e.find(e=>e?.route.id===s);if(!l)continue;let u=r.find(e=>e.route.id===l.route.id),d=u!=null&&!Ha(u,l)&&(i&&i[l.route.id])!==void 0;po(c)&&d&&await xo(c,n,!1).then(e=>{e&&(t[s]=e)})}}async function bo(e,t,n){for(let r=0;r<n.length;r++){let{key:i,routeId:a,controller:o}=n[r],s=t[i];e.find(e=>e?.route.id===a)&&po(s)&&(Y(o,`Expected an AbortController for revalidating fetcher deferred result`),await xo(s,o.signal,!0).then(e=>{e&&(t[i]=e)}))}}async function xo(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:X.data,data:e.deferredData.unwrappedData}}catch(e){return{type:X.error,error:e}}return{type:X.data,data:e.deferredData.data}}}function So(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Co(e,t){let n=typeof t==`string`?Li(t).search:t.search;if(e[e.length-1].route.index&&So(n||``))return e[e.length-1];let r=pa(e);return r[r.length-1]}function wo(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function To(e,t){return t?{state:`loading`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:`loading`,location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Eo(e,t){return{state:`submitting`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Do(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Oo(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ko(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Ao(e,t){try{let n=e.sessionStorage.getItem(Na);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function jo(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Na,JSON.stringify(n))}catch(e){Mi(!1,`Failed to save applied view transitions in sessionStorage (`+e+`).`)}}}function Mo(){return Mo=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},Mo.apply(this,arguments)}var No=z.createContext(null),Po=z.createContext(null),Fo=z.createContext(null),Io=z.createContext(null),Lo=z.createContext({outlet:null,matches:[],isDataRoute:!1}),Ro=z.createContext(null);function zo(){return z.useContext(Io)!=null}function Bo(){return!zo()&&Y(!1),z.useContext(Io).location}function Vo(){return z.useContext(Io).navigationType}function Ho(e){z.useContext(Fo).static||z.useLayoutEffect(e)}function Uo(){let{isDataRoute:e}=z.useContext(Lo);return e?ss():Wo()}function Wo(){!zo()&&Y(!1);let e=z.useContext(No),{basename:t,future:n,navigator:r}=z.useContext(Fo),{matches:i}=z.useContext(Lo),{pathname:a}=Bo(),o=JSON.stringify(ma(i,n.v7_relativeSplatPath)),s=z.useRef(!1);return Ho(()=>{s.current=!0}),z.useCallback(function(n,i){if(i===void 0&&(i={}),!s.current)return;if(typeof n==`number`){r.go(n);return}let c=ha(n,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:ga([t,c.pathname])),(i.replace?r.replace:r.push)(c,i.state,i)},[t,r,o,a,e])}var Go=z.createContext(null);function Ko(e){let t=z.useContext(Lo).outlet;return t&&z.createElement(Go.Provider,{value:e},t)}function qo(){let{matches:e}=z.useContext(Lo),t=e[e.length-1];return t?t.params:{}}function Jo(e,t,n,r){!zo()&&Y(!1);let{navigator:i}=z.useContext(Fo),{matches:a}=z.useContext(Lo),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:`/`;o&&o.route;let l=Bo(),u;if(t){let e=typeof t==`string`?Li(t):t;!(c===`/`||e.pathname?.startsWith(c))&&Y(!1),u=e}else u=l;let d=u.pathname||`/`,f=d;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);f=`/`+d.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let p=Hi(e,{pathname:f}),m=$o(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:ga([c,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:ga([c,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),a,n,r);return t&&m?z.createElement(Io.Provider,{value:{location:Mo({pathname:`/`,search:``,hash:``,state:null,key:`default`},u),navigationType:J.Pop}},m):m}function Yo(){let e=os(),t=xa(e)?e.status+` `+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return z.createElement(z.Fragment,null,z.createElement(`h2`,null,`Unexpected Application Error!`),z.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?z.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Xo=z.createElement(Yo,null),Zo=class extends z.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error(`React Router caught the following error during render`,e,t)}render(){return this.state.error===void 0?this.props.children:z.createElement(Lo.Provider,{value:this.props.routeContext},z.createElement(Ro.Provider,{value:this.state.error,children:this.props.component}))}};function Qo(e){let{routeContext:t,match:n,children:r}=e,i=z.useContext(No);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),z.createElement(Lo.Provider,{value:t},r)}function $o(e,t,n,r){if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);!(e>=0)&&Y(!1),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&e[t.route.id]===void 0&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){s=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}return a.reduceRight((e,r,i)=>{let l,u=!1,d=null,f=null;n&&(l=o&&r.route.id?o[r.route.id]:void 0,d=r.route.errorElement||Xo,s&&(c<0&&i===0?(ls(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,f=null):c===i&&(u=!0,f=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,i+1)),m=()=>{let t;return t=l?d:u?f:r.route.Component?z.createElement(r.route.Component,null):r.route.element?r.route.element:e,z.createElement(Qo,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?z.createElement(Zo,{location:n.location,revalidation:n.revalidation,component:d,error:l,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var es=function(e){return e.UseBlocker=`useBlocker`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e}(es||{}),ts=function(e){return e.UseBlocker=`useBlocker`,e.UseLoaderData=`useLoaderData`,e.UseActionData=`useActionData`,e.UseRouteError=`useRouteError`,e.UseNavigation=`useNavigation`,e.UseRouteLoaderData=`useRouteLoaderData`,e.UseMatches=`useMatches`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e.UseRouteId=`useRouteId`,e}(ts||{});function ns(e){let t=z.useContext(No);return!t&&Y(!1),t}function rs(e){let t=z.useContext(Po);return!t&&Y(!1),t}function is(e){let t=z.useContext(Lo);return!t&&Y(!1),t}function as(e){let t=is(e),n=t.matches[t.matches.length-1];return!n.route.id&&Y(!1),n.route.id}function os(){let e=z.useContext(Ro),t=rs(ts.UseRouteError),n=as(ts.UseRouteError);return e===void 0?t.errors?.[n]:e}function ss(){let{router:e}=ns(es.UseNavigateStable),t=as(ts.UseNavigateStable),n=z.useRef(!1);return Ho(()=>{n.current=!0}),z.useCallback(function(r,i){i===void 0&&(i={}),n.current&&(typeof r==`number`?e.navigate(r):e.navigate(r,Mo({fromRouteId:t},i)))},[e,t])}var cs={};function ls(e,t,n){!t&&!cs[e]&&(cs[e]=!0)}var us=(e,t,n)=>(``+t+("You can use the `"+e+"` future flag to opt-in early. ")+(`For more information, see `+n+`.`),void 0);function ds(e,t){e?.v7_startTransition===void 0&&us(`v7_startTransition`,"React Router will begin wrapping state updates in `React.startTransition` in v7",`https://reactrouter.com/v6/upgrading/future#v7_starttransition`),e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath===void 0)&&us(`v7_relativeSplatPath`,`Relative route resolution within Splat routes is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath`),t&&(t.v7_fetcherPersist===void 0&&us(`v7_fetcherPersist`,`The persistence behavior of fetchers is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist`),t.v7_normalizeFormMethod===void 0&&us(`v7_normalizeFormMethod`,"Casing of `formMethod` fields is being normalized to uppercase in v7",`https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod`),t.v7_partialHydration===void 0&&us(`v7_partialHydration`,"`RouterProvider` hydration behavior is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_partialhydration`),t.v7_skipActionErrorRevalidation===void 0&&us(`v7_skipActionErrorRevalidation`,"The revalidation behavior after 4xx/5xx `action` responses is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation`))}z.startTransition;function fs(e){return Ko(e.context)}function ps(e){Y(!1)}function ms(e){let{basename:t=`/`,children:n=null,location:r,navigationType:i=J.Pop,navigator:a,static:o=!1,future:s}=e;zo()&&Y(!1);let c=t.replace(/^\/*/,`/`),l=z.useMemo(()=>({basename:c,navigator:a,static:o,future:Mo({v7_relativeSplatPath:!1},s)}),[c,s,a,o]);typeof r==`string`&&(r=Li(r));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`}=r,h=z.useMemo(()=>{let e=sa(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m},navigationType:i}},[c,u,d,f,p,m,i]);return h==null?null:z.createElement(Fo.Provider,{value:l},z.createElement(Io.Provider,{children:n,value:h}))}var hs=function(e){return e[e.pending=0]=`pending`,e[e.success=1]=`success`,e[e.error=2]=`error`,e}(hs||{});new Promise(()=>{}),z.Component;function gs(e,t){t===void 0&&(t=[]);let n=[];return z.Children.forEach(e,(e,r)=>{if(!z.isValidElement(e))return;let i=[...t,r];if(e.type===z.Fragment){n.push.apply(n,gs(e.props.children,i));return}e.type!==ps&&Y(!1),!(!e.props.index||!e.props.children)&&Y(!1);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=gs(e.props.children,i)),n.push(a)}),n}function _s(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:z.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:z.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:z.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function vs(){return vs=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},vs.apply(this,arguments)}var ys=`6`;try{window.__reactRouterVersion=ys}catch{}function bs(e,t){return Pa({basename:t?.basename,future:vs({},t?.future,{v7_prependBasename:!0}),history:ji({window:t?.window}),hydrationData:t?.hydrationData||xs(),routes:e,mapRouteProperties:_s,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function xs(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e=vs({},e,{errors:Ss(e.errors)})),e}function Ss(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new ba(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(r.__subType){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var Cs=z.createContext({isTransitioning:!1}),ws=z.createContext(new Map),Ts=z.startTransition,Es=jr.flushSync;z.useId;function Ds(e){Ts?Ts(e):e()}function Os(e){Es?Es(e):e()}var ks=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function As(e){let{fallbackElement:t,router:n,future:r}=e,[i,a]=z.useState(n.state),[o,s]=z.useState(),[c,l]=z.useState({isTransitioning:!1}),[u,d]=z.useState(),[f,p]=z.useState(),[m,h]=z.useState(),g=z.useRef(new Map),{v7_startTransition:_}=r||{},v=z.useCallback(e=>{_?Ds(e):e()},[_]),y=z.useCallback((e,t)=>{let{deletedFetchers:r,flushSync:i,viewTransitionOpts:o}=t;e.fetchers.forEach((e,t)=>{e.data!==void 0&&g.current.set(t,e.data)}),r.forEach(e=>g.current.delete(e));let c=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!=`function`;if(!o||c){i?Os(()=>a(e)):v(()=>a(e));return}if(i){Os(()=>{f&&(u&&u.resolve(),f.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:o.currentLocation,nextLocation:o.nextLocation})});let t=n.window.document.startViewTransition(()=>{Os(()=>a(e))});t.finished.finally(()=>{Os(()=>{d(void 0),p(void 0),s(void 0),l({isTransitioning:!1})})}),Os(()=>p(t));return}f?(u&&u.resolve(),f.skipTransition(),h({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})):(s(e),l({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}))},[n.window,f,u,g,v]);z.useLayoutEffect(()=>n.subscribe(y),[n,y]),z.useEffect(()=>{c.isTransitioning&&!c.flushSync&&d(new ks)},[c]),z.useEffect(()=>{if(u&&o&&n.window){let e=o,t=u.promise,r=n.window.document.startViewTransition(async()=>{v(()=>a(e)),await t});r.finished.finally(()=>{d(void 0),p(void 0),s(void 0),l({isTransitioning:!1})}),p(r)}},[v,o,u,n.window]),z.useEffect(()=>{u&&o&&i.location.key===o.location.key&&u.resolve()},[u,f,i.location,o]),z.useEffect(()=>{!c.isTransitioning&&m&&(s(m.state),l({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),h(void 0))},[c.isTransitioning,m]),z.useEffect(()=>{},[]);let b=z.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:r?.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:r?.preventScrollReset})}),[n]),x=n.basename||`/`,S=z.useMemo(()=>({router:n,navigator:b,static:!1,basename:x}),[n,b,x]),C=z.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return z.useEffect(()=>ds(r,n.future),[r,n.future]),z.createElement(z.Fragment,null,z.createElement(No.Provider,{value:S},z.createElement(Po.Provider,{value:i},z.createElement(ws.Provider,{value:g.current},z.createElement(Cs.Provider,{value:c},z.createElement(ms,{basename:x,location:i.location,navigationType:i.historyAction,navigator:b,future:C},i.initialized||n.future.v7_partialHydration?z.createElement(js,{routes:n.routes,future:n.future,state:i}):t))))),null)}var js=z.memo(Ms);function Ms(e){let{routes:t,future:n,state:r}=e;return Jo(t,void 0,r,n)}typeof window<`u`&&window.document!==void 0&&window.document.createElement;var Ns;(function(e){e.UseScrollRestoration=`useScrollRestoration`,e.UseSubmit=`useSubmit`,e.UseSubmitFetcher=`useSubmitFetcher`,e.UseFetcher=`useFetcher`,e.useViewTransitionState=`useViewTransitionState`})(Ns||={});var Ps;(function(e){e.UseFetcher=`useFetcher`,e.UseFetchers=`useFetchers`,e.UseScrollRestoration=`useScrollRestoration`})(Ps||={});function Fs(){return Fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fs.apply(null,arguments)}var Is=[`shift`,`alt`,`meta`,`mod`,`ctrl`],Ls={esc:`escape`,return:`enter`,".":`period`,",":`comma`,"-":`slash`," ":`space`,"`":`backquote`,"#":`backslash`,"+":`bracketright`,ShiftLeft:`shift`,ShiftRight:`shift`,AltLeft:`alt`,AltRight:`alt`,MetaLeft:`meta`,MetaRight:`meta`,OSLeft:`meta`,OSRight:`meta`,ControlLeft:`ctrl`,ControlRight:`ctrl`};function Rs(e){return(e&&Ls[e]||e||``).trim().toLowerCase().replace(/key|digit|numpad|arrow/,``)}function zs(e){return Is.includes(e)}function Bs(e,t){return t===void 0&&(t=`,`),e.split(t)}function Vs(e,t,n){t===void 0&&(t=`+`);var r=e.toLocaleLowerCase().split(t).map(function(e){return Rs(e)}),i={alt:r.includes(`alt`),ctrl:r.includes(`ctrl`)||r.includes(`control`),shift:r.includes(`shift`),meta:r.includes(`meta`),mod:r.includes(`mod`)},a=r.filter(function(e){return!Is.includes(e)});return Fs({},i,{keys:a,description:n,hotkey:e})}(function(){typeof document<`u`&&(document.addEventListener(`keydown`,function(e){e.key!==void 0&&Gs([Rs(e.key),Rs(e.code)])}),document.addEventListener(`keyup`,function(e){e.key!==void 0&&Ks([Rs(e.key),Rs(e.code)])})),typeof window<`u`&&window.addEventListener(`blur`,function(){Hs.clear()})})();var Hs=new Set;function Us(e){return Array.isArray(e)}function Ws(e,t){return t===void 0&&(t=`,`),(Us(e)?e:e.split(t)).every(function(e){return Hs.has(e.trim().toLowerCase())})}function Gs(e){var t=Array.isArray(e)?e:[e];Hs.has(`meta`)&&Hs.forEach(function(e){return!zs(e)&&Hs.delete(e.toLowerCase())}),t.forEach(function(e){return Hs.add(e.toLowerCase())})}function Ks(e){e===`meta`?Hs.clear():(Array.isArray(e)?e:[e]).forEach(function(e){return Hs.delete(e.toLowerCase())})}function qs(e,t,n){(typeof n==`function`&&n(e,t)||n===!0)&&e.preventDefault()}function Js(e,t,n){return typeof n==`function`?n(e,t):n===!0||n===void 0}function Ys(e){return Xs(e,[`input`,`textarea`,`select`])}function Xs(e,t){t===void 0&&(t=!1);var n=e.target,r=e.composed,i=null;return i=Zs(n)&&r?e.composedPath()[0]&&e.composedPath()[0].tagName:n&&n.tagName,Us(t)?!!(i&&t&&t.some(function(e){return e.toLowerCase()===i?.toLowerCase()})):!!(i&&t&&t)}function Zs(e){return!!e.tagName&&!e.tagName.startsWith(`-`)&&e.tagName.includes(`-`)}function Qs(e,t){return e.length===0&&t?(console.warn(`A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>`),!0):t?e.some(function(e){return t.includes(e)})||e.includes(`*`):!0}var $s=function(e,t,n){n===void 0&&(n=!1);var r=t.alt,i=t.meta,a=t.mod,o=t.shift,s=t.ctrl,c=t.keys,l=e.key,u=e.code,d=e.ctrlKey,f=e.metaKey,p=e.shiftKey,m=e.altKey,h=Rs(u),g=l.toLowerCase();if(!(c!=null&&c.includes(h))&&!(c!=null&&c.includes(g))&&![`ctrl`,`control`,`unknown`,`meta`,`alt`,`shift`,`os`].includes(h))return!1;if(!n){if(r===!m&&g!==`alt`||o===!p&&g!==`shift`)return!1;if(a){if(!f&&!d)return!1}else if(i===!f&&g!==`meta`&&g!==`os`||s===!d&&g!==`ctrl`&&g!==`control`)return!1}return c&&c.length===1&&(c.includes(g)||c.includes(h))?!0:c?Ws(c):!c},ec=xr(void 0),tc=function(){return wr(ec)};function nc(e,t){return e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,r){return n&&nc(e[r],t[r])},!0):e===t}var rc=xr({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),ic=function(){return wr(rc)};function ac(e){var t=Dr(void 0);return nc(t.current,e)||(t.current=e),t.current}var oc=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},sc=typeof window<`u`?Tr:V;function cc(e,t,n,r){var i=Or(null),a=i[0],o=i[1],s=Dr(!1),c=n instanceof Array?r instanceof Array?void 0:r:n,l=Us(e)?e.join(c?.splitKey):e,u=n instanceof Array?n:r instanceof Array?r:void 0,d=Cr(t,u??[]),f=Dr(d);u?f.current=d:f.current=t;var p=ac(c),m=ic().enabledScopes,h=tc();return sc(function(){if(!(p?.enabled===!1||!Qs(m,p?.scopes))){var e=function(e,t){var n;if(t===void 0&&(t=!1),!(Ys(e)&&!Xs(e,p?.enableOnFormTags))){if(a!==null){var r=a.getRootNode();if((r instanceof Document||r instanceof ShadowRoot)&&r.activeElement!==a&&!a.contains(r.activeElement)){oc(e);return}}(n=e.target)!=null&&n.isContentEditable&&!(p!=null&&p.enableOnContentEditable)||Bs(l,p?.splitKey).forEach(function(n){var r,i=Vs(n,p?.combinationKey);if($s(e,i,p?.ignoreModifiers)||(r=i.keys)!=null&&r.includes(`*`)){if(p!=null&&p.ignoreEventWhen!=null&&p.ignoreEventWhen(e)||t&&s.current)return;if(qs(e,i,p?.preventDefault),!Js(e,i,p?.enabled)){oc(e);return}f.current(e,i),t||(s.current=!0)}})}},t=function(t){t.key!==void 0&&(Gs(Rs(t.code)),(p?.keydown===void 0&&p?.keyup!==!0||p!=null&&p.keydown)&&e(t))},n=function(t){t.key!==void 0&&(Ks(Rs(t.code)),s.current=!1,p!=null&&p.keyup&&e(t,!0))},r=a||c?.document||document;return r.addEventListener(`keyup`,n,c?.eventListenerOptions),r.addEventListener(`keydown`,t,c?.eventListenerOptions),h&&Bs(l,p?.splitKey).forEach(function(e){return h.addHotkey(Vs(e,p?.combinationKey,p?.description))}),function(){r.removeEventListener(`keyup`,n,c?.eventListenerOptions),r.removeEventListener(`keydown`,t,c?.eventListenerOptions),h&&Bs(l,p?.splitKey).forEach(function(e){return h.removeHotkey(Vs(e,p?.combinationKey,p?.description))})}}},[a,l,p,m]),o}var lc=xr(null),uc={didCatch:!1,error:null},dc=class extends vr{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=uc}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(e!==null){var t,n,r=[...arguments];(t=(n=this.props).onReset)==null||t.call(n,{args:r,reason:`imperative-api`}),this.setState(uc)}}componentDidCatch(e,t){var n,r;(n=(r=this.props).onError)==null||n.call(r,e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;if(n&&t.error!==null&&fc(e.resetKeys,r)){var i,a;(i=(a=this.props).onReset)==null||i.call(a,{next:r,prev:e.resetKeys,reason:`keys`}),this.setState(uc)}}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=Sr(n,e);else if(r!==void 0)o=r;else throw a}return Sr(lc.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function fc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}var pc=`${I.routerBasename}:acceptedCookies`,mc=new Set,hc=gc();function gc(){try{let e=localStorage.getItem(pc);return e?JSON.parse(e):{analytics:!1,marketing:!1,functional:!1}}catch{return{analytics:!1,marketing:!1,functional:!1}}}function _c(){return hc}function vc(e){hc=e(hc),localStorage.setItem(pc,JSON.stringify(hc)),mc.forEach(e=>e())}function yc(e){return mc.add(e),()=>mc.delete(e)}var bc=()=>[kr(yc,_c,_c),vc],xc=[];function Sc(){let e=M();return kr(t=>e?.subscribePending(t)??(()=>{}),()=>e?.getPendingInstallations()??xc)}var Cc=`${I.routerBasename}:display-cookie-banner`,wc=new Set,Tc=Ec();function Ec(){try{return localStorage.getItem(Cc)!==`false`}catch(e){return console.error(e),!0}}function Dc(){return Tc}function Oc(e){Tc=e,localStorage.setItem(Cc,JSON.stringify(e))}function kc(e){return wc.add(e),()=>wc.delete(e)}var Ac=()=>[kr(kc,Dc,Dc),Oc],jc=l([`sentry`]),Mc=!1;async function Nc(){return await F(()=>import(`./esm-C3z6RsQv.js`),__vite__mapDeps([0,1]))}async function Pc(){I.sentry;let e=await Nc(),t=[e.httpClientIntegration(),e.extraErrorDataIntegration({depth:5}),e.replayIntegration(),e.captureConsoleIntegration({levels:[`error`]})];I.sentry.tracing&&t.push(e.reactRouterV6BrowserTracingIntegration({useEffect:_r.useEffect,useLocation:Bo,useNavigationType:Vo,createRoutesFromChildren:gs,matchRoutes:Hi})),e.init({release:I.sentry.release,dsn:I.sentry.dsn,environment:I.sentry.env,integrations:t,ignoreErrors:[`User is not allowed to create files`,`User is not allowed to move documents`,`The user aborted a request.`],sendDefaultPii:!0,tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,beforeSend(e,t){let n=t.originalException;return n instanceof TypeError&&n.message.includes(`Failed to fetch`)&&!navigator.onLine?null:e}}),Mc=!0}async function Fc(){if(Mc)return(await Nc()).getClient()?.close()}function Ic(){let[e]=bc(),{analytics:t}=e;V(()=>{if(!t){Fc().catch(e=>jc.error(`@error`,e));return}Mc||!I.sentry.dsn||I.sentry.dsn===``||Pc().catch(e=>jc.error(`@error`,e))},[t])}var Lc=e=>{let{undo:t,redo:n,canRedo:r,canUndo:i}=e,a=window.navigator.userAgent.includes(`Mac`),o=`ctrl+z`,s=`ctrl+y`;a&&(o=`mod+z`,s=`mod+shift+z`),cc(o,e=>{e.preventDefault(),i&&t()},{},[i,t]),cc(s,e=>{e.preventDefault(),r&&n()},{},[r,n])};function Rc(...e){window.dataLayer?.push(...e)}var zc=()=>{let e=I.gaTrackingId,[{analytics:t}]=bc(),n=e&&t;return V(()=>{if(n){let t=document.createElement(`script`);return t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,t.async=!0,document.head.appendChild(t),window.dataLayer=window.dataLayer||[],Rc(`js`,new Date),Rc(`config`,e),()=>{document.head.removeChild(t)}}},[n,e]),null};function Bc(){let[e]=re(),t=se(e.header.id),n=Cr(()=>{b(e).length?m({type:`exportDocumentWithErrors`,documentId:e.header.id}):ne(e).catch(e=>{console.error(e),me(`Failed to export document: ${e instanceof Error?e.message:JSON.stringify(e,null,1)}`)})},[e]),r=Er(()=>async()=>{},[]),i=Cr(()=>{_(t)},[t,_]);return H(`div`,{id:`document-editor-container`,className:`flex-1`,"data-document-type":e.header.documentType,children:H(tu,{document:e,onClose:i,onExport:n,onOpenSwitchboardLink:r})})}function Vc(e){let[t,n]=Or(!1);if(V(()=>{setTimeout(()=>{n(!0)},e.loadingTimeout??200)},[e]),!t)return null;let{customEditorLoader:r,...i}=e;return r?H(Ar,{children:r}):H(Le,{...i})}var Hc=l([`Connect`]);function Uc(e){return`fallbackRender`in e}function Wc(){return null}function Gc({message:e=`Something went wrong`}){return H(`div`,{className:`text-center`,children:e})}function Kc({error:e,resetErrorBoundary:t}){let n=e instanceof Error?e.message:String(e),r=e instanceof Error?e.stack??String(e.cause):JSON.stringify(e,null,2);return H(`div`,{className:`z-10 mx-auto flex max-w-[80%] flex-1 items-center justify-center p-6`,children:U(`div`,{className:`w-full max-w-lg rounded-lg border border-gray-500 bg-white p-6 shadow-sm`,children:[U(`div`,{className:`mb-3 flex items-center gap-2`,children:[H(fe,{name:`Error`,className:`size-5 shrink-0`}),H(`h1`,{className:`text-lg font-semibold`,children:`Something went wrong`})]}),H(`p`,{className:`mb-4 text-sm text-gray-700`,children:n}),r!==`{}`&&U(`details`,{className:`group`,children:[H(`summary`,{className:`cursor-pointer select-none text-sm font-medium text-gray-700 underline hover:text-gray-700`,children:`Show details`}),H(`pre`,{className:`mt-2 max-h-48 overflow-auto rounded bg-gray-100 p-3 text-xs`,children:r})]}),H(pe,{type:`button`,onClick:t,className:`text-md mt-4 px-3 py-1.5 font-medium`,children:`Try again`})]})})}function qc({error:e}){return H(`div`,{className:`flex size-full items-center justify-center`,children:H(`h3`,{className:`text-lg font-semibold`,children:e instanceof Error?e.message:String(e)})})}function Jc(e,t){switch(e){case`silent`:return Wc;case`text`:return()=>H(Gc,{message:t});case`detailed`:return Kc;default:return qc}}function Yc(e){let{children:t,onError:n,resetKeys:r,loggerContext:i}=e;return H(dc,{fallbackRender:Uc(e)?e.fallbackRender:Jc(e.variant,e.fallbackMessage),onError:(e,t)=>{if(e.message.includes(`Failed to fetch dynamically imported module`)&&e.message.includes(`node_modules/.vite`)){console.error(e),console.log(`Outdated chunk detected, reloading page...`),window.location.reload();return}(i?l(i):Hc).error(`@error @info`,e,t),n?.(e,t)},resetKeys:r,children:t})}function Xc(){let[e]=j(),t=A(),n=y(e.header.meta?.preferredEditor),r=p(),i=n?.Component??r?.Component??Ee.Component;if(!i)throw Error(`No app component found`);return H(Yc,{variant:`detailed`,resetKeys:[e.header.id],loggerContext:[`Connect`,`App`],children:H(br,{fallback:H(Vc,{}),children:H(Ne,{className:`flex h-full flex-col overflow-auto`,children:H(i,{children:t?H(Bc,{}):null})})})})}function Zc(){return typeof document>`u`?`/`:document.querySelector(`base`)?.getAttribute(`href`)||`/`}var Qc=null,$c=new Set;function el(e){Qc=e;for(let e of $c)e()}function tl(){return Qc}function nl(e){return $c.add(e),()=>{$c.delete(e)}}var rl=`ph-pglite-backup::`,il=`ph:pglite-backups`,al=720*60*60*1e3,ol={16:async()=>{let[{PGlite:e},{pgDump:t}]=await Promise.all([F(()=>import(`./dist-ClzcOFHf.js`),__vite__mapDeps([2,1,3,4,5,6,7])),F(()=>import(`./pg_dump-DpLFvU0N.js`),__vite__mapDeps([8,1,3]))]);return async n=>{let r=new e(`idb://${n.replace(/^\/pglite\//,``)}`);try{return await r.waitReady,await(await t({pg:r})).text()}finally{await r.close()}}}};function sl(e,t=15e3){return new Promise((n,r)=>{let i=indexedDB.deleteDatabase(e),a=!1,o=e=>{a||(a=!0,e())},s=setTimeout(()=>o(()=>r(Error(`IDB delete timed out for ${e} after ${t}ms`))),t);i.onsuccess=()=>o(()=>{clearTimeout(s),n()}),i.onerror=()=>o(()=>{clearTimeout(s),r(be(i,`IDB delete failed for ${e}`))})})}async function cl(e){let t=await xe(e,21,L);try{await new Promise((n,r)=>{let i=t.transaction(R,`readwrite`);i.oncomplete=()=>n(),i.onerror=()=>r(be(i,`FILE_DATA clear failed for ${e}`)),i.onabort=()=>r(be(i,`FILE_DATA clear aborted for ${e}`)),i.objectStore(R).clear()})}finally{t.close()}}async function ll(e,t){let n=await xe(e,21,L);try{let r=await xe(t,21,L);try{let i=n.transaction(R,`readonly`).objectStore(R),a=await new Promise((t,n)=>{let r=[],a=i.openCursor();a.onerror=()=>n(be(a,`FILE_DATA read cursor failed for ${e}`)),a.onsuccess=()=>{let e=a.result;if(!e)return t(r);r.push({key:e.key,value:e.value}),e.continue()}});await new Promise((e,n)=>{let i=r.transaction(R,`readwrite`);i.oncomplete=()=>e(),i.onerror=()=>n(be(i,`FILE_DATA write failed for ${t}`)),i.onabort=()=>n(be(i,`FILE_DATA write aborted for ${t}`));let o=i.objectStore(R);o.clear();for(let{key:e,value:t}of a)o.put(t,e)})}finally{r.close()}}finally{n.close()}}function ul(){try{let e=localStorage.getItem(il);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function dl(e){try{localStorage.setItem(il,JSON.stringify(e))}catch{}}function fl(e){dl([...ul(),e])}function pl(e){dl(ul().filter(t=>t.name!==e))}async function ml(){let e=Date.now()-al,t=[];for(let n of ul()){if(n.createdAt>=e){t.push(n);continue}try{await sl(n.name)}catch(e){console.warn(`Failed to delete expired pglite backup ${n.name}`,e),t.push(n)}}dl(t)}function hl(e,t){el({idbName:e,phase:t})}async function gl(e){let t=await Ce(e);if(t===null||t===17)return;let n=ol[t];if(!n)throw Error(`Unsupported legacy PGlite data dir: PG_VERSION=${t} for ${e}`);let r=`${rl}${e}::${new Date().toISOString()}`,i={name:r,idbName:e,createdAt:Date.now()};hl(e,`clone`),await ll(e,r),fl(i);let a;try{hl(e,`dump`),a=await(await n())(e)}catch(e){throw await sl(r).catch(()=>{}),pl(r),e}try{await cl(e),hl(e,`restore`);let t=new He(`idb://${e.replace(/^\/pglite\//,``)}`,{relaxedDurability:!1});try{await t.waitReady,console.info(`[pglite-migration] Dump preamble (first 500 chars):\n${a.slice(0,500)}`);try{await t.exec(`SET standard_conforming_strings = off;`)}catch(e){console.warn(`[pglite-migration] Could not force standard_conforming_strings=off`,e)}try{await t.exec(a)}catch(t){throw _l(e,a,t),t}}finally{await t.close()}}catch(t){throw await vl(e,r,t),t}}function _l(e,t,n){let r=n,i=typeof r.position==`string`?parseInt(r.position,10):typeof r.position==`number`?r.position:NaN;if(console.error(`[pglite-migration] Restore failed for ${e}`,{message:r.message,code:r.code,severity:r.severity,detail:r.detail,where:r.where,position:r.position,sqlLength:t.length}),Number.isFinite(i)&&i>0){let e=i-1,n=Math.max(0,e-200),r=Math.min(t.length,e+200),a=t.slice(n,e),o=t.slice(e,e+1),s=t.slice(e+1,r);console.error(`[pglite-migration] SQL context around position ${i}:\n${a}»${o}«${s}`);let c=t.lastIndexOf(`
|
|
33
|
+
}`)}function K(e,t,n=``){return t!=null&&t!==``?e+t+n:``}function ii(e){return K(` `,e.replace(/\n/g,`
|
|
34
|
+
`))}function ai(e){return e?.some(e=>e.includes(`
|
|
35
|
+
`))??!1}var oi=`Accept`,si=`Content-Type`,ci=`application/json`,li=`application/graphql-response+json`,ui=e=>e.replace(/([\s,]|#[^\n\r]+)+/g,` `).trim(),di=e=>{let t=e.toLowerCase();return t.includes(li)||t.includes(ci)},fi=e=>{try{if(Array.isArray(e))return{_tag:`Batch`,executionResults:e.map(pi)};if(Gr(e))return{_tag:`Single`,executionResult:pi(e)};throw Error(`Invalid execution result: result is not object or array. \nGot:\n${String(e)}`)}catch(e){return e}},pi=e=>{if(typeof e!=`object`||!e)throw Error(`Invalid execution result: result is not object`);let t,n,r;if(`errors`in e){if(!Gr(e.errors)&&!Array.isArray(e.errors))throw Error(`Invalid execution result: errors is not plain object OR array`);t=e.errors}if(`data`in e){if(!Gr(e.data)&&e.data!==null)throw Error(`Invalid execution result: data is not plain object`);n=e.data}if(`extensions`in e){if(!Gr(e.extensions))throw Error(`Invalid execution result: extensions is not plain object`);r=e.extensions}return{data:n,errors:t,extensions:r}},mi=e=>e._tag===`Batch`?e.executionResults.some(hi):hi(e.executionResult),hi=e=>Array.isArray(e.errors)?e.errors.length>0:!!e.errors,gi=e=>typeof e==`object`&&!!e&&`kind`in e&&e.kind===n.OPERATION_DEFINITION,_i=e=>{let t,n=e.definitions.filter(gi);return n.length===1&&(t=n[0].name?.value),t},vi=e=>{let t=!1,n=e.definitions.filter(gi);return n.length===1&&(t=n[0].operation===`mutation`),t},yi=(e,n)=>{let r=typeof e==`string`||`kind`in e?e:String(e),i=typeof r==`string`?r:ti(r),a=!1,o;if(n)return{expression:i,isMutation:a,operationName:o};let s=Vr(()=>typeof r==`string`?t(r):r);return s instanceof Error?{expression:i,isMutation:a,operationName:o}:(o=_i(s),a=vi(s),{expression:i,operationName:o,isMutation:a})},bi=JSON,xi=async e=>{let t={...e,method:e.request._tag===`Single`?e.request.document.isMutation?`POST`:Ir(e.method??`post`):e.request.hasMutations?`POST`:Ir(e.method??`post`),fetchOptions:{...e.fetchOptions,errorPolicy:e.fetchOptions.errorPolicy??`none`}},n=await wi(t.method)(t),r=await n.text(),i;try{i=Ci(r,n.headers.get(si),e.fetchOptions.jsonSerializer??bi)}catch(e){i=e}let a={status:n.status,headers:n.headers,body:r};if(!n.ok)return i instanceof Error?new Fr({...a},{query:e.request._tag===`Single`?e.request.document.expression:e.request.query,variables:e.request.variables}):new Fr(i._tag===`Batch`?{...i.executionResults,...a}:{...i.executionResult,...a},{query:e.request._tag===`Single`?e.request.document.expression:e.request.query,variables:e.request.variables});if(i instanceof Error)throw i;if(mi(i)&&t.fetchOptions.errorPolicy===`none`)return new Fr(i._tag===`Batch`?{...i.executionResults,...a}:{...i.executionResult,...a},{query:e.request._tag===`Single`?e.request.document.expression:e.request.query,variables:e.request.variables});switch(i._tag){case`Single`:return{...a,...Si(t)(i.executionResult)};case`Batch`:return{...a,data:i.executionResults.map(Si(t))};default:Wr(i)}},Si=e=>t=>({extensions:t.extensions,data:t.data,errors:e.fetchOptions.errorPolicy===`all`?t.errors:void 0}),Ci=(e,t,n)=>t&&di(t)?fi(n.parse(e)):fi(e),wi=e=>async t=>{let n=new Headers(t.headers),r=null,i;n.has(oi)||n.set(oi,[li,ci].join(`, `)),e===`POST`?(i=(t.fetchOptions.jsonSerializer??bi).stringify(Ti(t)),typeof i==`string`&&!n.has(si)&&n.set(si,ci)):r=Ei(t);let a={method:e,headers:n,body:i,...t.fetchOptions},o=new URL(t.url),s=a;if(t.middleware){let{url:e,...n}=await Promise.resolve(t.middleware({...a,url:t.url,operationName:t.request._tag===`Single`?t.request.document.operationName:void 0,variables:t.request.variables}));o=new URL(e),s=n}return r&&r.forEach((e,t)=>{o.searchParams.append(t,e)}),await(t.fetch??fetch)(o,s)},Ti=e=>{switch(e.request._tag){case`Single`:return{query:e.request.document.expression,variables:e.request.variables,operationName:e.request.document.operationName};case`Batch`:return Rr(e.request.query,e.request.variables??[]).map(([e,t])=>({query:e,variables:t}));default:throw Wr(e.request)}},Ei=e=>{let t=e.fetchOptions.jsonSerializer??bi,n=new URLSearchParams;switch(e.request._tag){case`Single`:return n.append(`query`,ui(e.request.document.expression)),e.request.variables&&n.append(`variables`,t.stringify(e.request.variables)),e.request.document.operationName&&n.append(`operationName`,e.request.document.operationName),n;case`Batch`:{let r=e.request.variables?.map(e=>t.stringify(e))??[],i=Rr(e.request.query.map(ui),r).map(([e,t])=>({query:e,variables:t}));return n.append(`query`,t.stringify(i)),n}default:throw Wr(e.request)}},Di=class{url;requestConfig;constructor(e,t={}){this.url=e,this.requestConfig=t}rawRequest=async(...e)=>{let[t,n,r]=e,i=qr(t,n,r),{headers:a,fetch:o=globalThis.fetch,method:s=`POST`,requestMiddleware:c,responseMiddleware:l,excludeOperationName:u,...d}=this.requestConfig,{url:f}=this;i.signal!==void 0&&(d.signal=i.signal);let p=yi(i.query,u),m=await xi({url:f,request:{_tag:`Single`,document:p,variables:i.variables},headers:{...zr(Lr(a)),...zr(i.requestHeaders)},fetch:o,method:s,fetchOptions:d,middleware:c});if(l&&await l(m,{operationName:p.operationName,variables:n,url:this.url}),m instanceof Error)throw m;return m};async request(e,...t){let[n,r]=t,i=ki(e,n,r),{headers:a,fetch:o=globalThis.fetch,method:s=`POST`,requestMiddleware:c,responseMiddleware:l,excludeOperationName:u,...d}=this.requestConfig,{url:f}=this;i.signal!==void 0&&(d.signal=i.signal);let p=yi(i.document,u),m=await xi({url:f,request:{_tag:`Single`,document:p,variables:i.variables},headers:{...zr(Lr(a)),...zr(i.requestHeaders)},fetch:o,method:s,fetchOptions:d,middleware:c});if(l&&await l(m,{operationName:p.operationName,variables:i.variables,url:this.url}),m instanceof Error)throw m;return m.data}async batchRequests(e,t){let n=Kr(e,t),{headers:r,excludeOperationName:i,...a}=this.requestConfig;n.signal!==void 0&&(a.signal=n.signal);let o=n.documents.map(({document:e})=>yi(e,i)),s=o.map(({expression:e})=>e),c=o.some(({isMutation:e})=>e),l=n.documents.map(({variables:e})=>e),u=await xi({url:this.url,request:{_tag:`Batch`,operationName:void 0,query:s,hasMutations:c,variables:l},headers:{...zr(Lr(r)),...zr(n.requestHeaders)},fetch:this.requestConfig.fetch??globalThis.fetch,method:this.requestConfig.method||`POST`,fetchOptions:a,middleware:this.requestConfig.requestMiddleware});if(this.requestConfig.responseMiddleware&&await this.requestConfig.responseMiddleware(u,{operationName:void 0,variables:l,url:this.url}),u instanceof Error)throw u;return u.data}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,t){let{headers:n}=this.requestConfig;return n?n[e]=t:this.requestConfig.headers={[e]:t},this}setEndpoint(e){return this.url=e,this}};async function Oi(e,t,...n){let r=Ai(e,t,...n);return new Di(r.url).request({...r})}var ki=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},Ai=(e,t,...n)=>{let[r,i]=n;return typeof e==`string`?{url:e,document:t,variables:r,requestHeaders:i,signal:void 0}:e},ji=(e,...t)=>e.reduce((e,n,r)=>`${e}${n}${r in t?String(t[r]):``}`,``);ge.use(ve).init({resources:{en:{code:`en`,name:`English`,translation:{common:{cancel:`Cancel`,delete:`Delete`,continue:`Continue`,empty:`Empty`,create:`Create`,save:`Save`,export:`Export`,reload:`Reload`,reloadConnect:`Click here to reload Connect`},searchbar:{placeholder:`Search Powerhouse`,filterLabel:`File type`},folderView:{sections:{folders:{title:`Folders`,empty:`No folders 🗂️`},documents:{title:`Documents and files`,empty:`No documents or files 📄`}}},files:{options:{switchboardLink:`Switchboard Link`}},modals:{deleteItem:{folder:{header:`Delete “{{item}}” folder?`,body:`Are you sure you want to delete this folder? All files and subfolders within it will be removed.`},file:{header:`Delete “{{item}}” file?`,body:`Are you sure you want to delete this file?`}},deleteDrive:{title:`Delete "{{label}}" drive?`,body:`Are you sure you want to delete this drive? All files and subfolders within it will be removed. Do you want to proceed?`,inputPlaceholder:`Enter drive name...`},upgradeDrive:{header:`Upgrade to cloud drive`,body:`You are moving files from a private to a shared drive. These files will become accessible to others in the shared drive.Do you want to proceed?`},createDocument:{header:`Create a new document`,placeholder:`Document name`},connectSettings:{title:`Settings`,body:`These settings will apply to all drives.`,clearStorage:{button:`Clear Storage`,description:`Delete previous session data`,confirmation:{title:`Clear Storage`,body:`Are you sure you want to clear the storage? This will remove all previous session data.`,clearButton:`Clear Storage`}},enabledDocumentTypes:{title:`Document Models`,description:`Documents enabled`,allSelected:`All documents are selected`}},exportDocumentWithErrors:{title:`Your document contains errors`,body:`Your document contains structure errors. Do you want to export it anyway?`},disclaimer:{title:`Disclaimer`,body:`All content provided herein our website, hyperlinked sites, associated applications, forums, blogs, social media accounts and other platforms (“Site”) is for your general information only, procured from third party sources. We make no warranties of any kind in relation to our content, including but not limited to accuracy and updatedness. No part of the content that we provide constitutes financial advice, legal advice or any other form of advice meant for your specific reliance for any purpose. Any use or reliance on our content is solely at your own risk and discretion. You should conduct your own research, review, analyse and verify our content before relying on them. Trading is a highly risky activity that can lead to major losses, please therefore consult your financial advisor before making any decision. No content on our Site is meant to be a solicitation or offer.`},cookiesPolicy:{title:`Cookies Policy`,body:`<subtitle>Use of Cookies and Similar Technologies</subtitle><p>The Site is using cookies. Cookies are small text files that are placed on your computer by websites that you visit. They are widely used in order to make websites work, or work more efficiently, as well as to provide information to the owners of the site. Cookies are typically stored on your computer´s hard drive.Information collected from cookies is used by us to evaluate the effectiveness of our Site and analyze trends. The information collected from cookies allows us to determine such things as which parts of the Site are most visited and difficulties our visitors may experience in accessing the SIte. With this knowledge, we can improve the quality of your experience on the Site by recognizing and delivering more of the most desired features and information, as well as by resolving access difficulties.</p><p>We use third party service providers, to assist us in better understanding the use of our Site. Our service providers will place cookies on the hard drive of your computer (or use similar technologies) and will receive information that we select that will educate us on such things as how visitors navigate around our Site. This information is aggregated to provide statistical data about our users browsing actions and patterns, and does not personally identify individuals. This information may include:</p><p>Computer or mobile device information, Website usage information, such as:<list></p><bullet>Page views,</bullet><bullet>Button clicks,</bullet><bullet>Input form changes (without the values being entered),</bullet><bullet>Errors.</bullet></list><p>Our service providers analyses this information and provides us with aggregate reports. The information and analysis provided by our service providers will be used to assist us in better understanding our visitors interests in our Site and how to better serve those interests. If you want to avoid using cookies altogether, you can disable cookies in your browser. However, disabling cookies might make it impossible for you to use certain features of the Site. Your use of the Site with a browser that is configured to accept cookies constitutes an acceptance of our and third-party cookies.</p>`}},notifications:{deleteDriveSuccess:`Drive successfully deleted`,deleteFolderSuccess:`Folder deleted`,fileDeleteSuccess:`File deleted`,addDriveSuccess:`New drive successfully added`,driveSyncSuccess:`Drive synced successfully`,driveSyncError:`Error synchronizing drive {{drive}}`,driveSyncConflict:`Conflict error detected in {{drive}}`,reloadApp:`It seems like you're running an outdated version of the app. Please reload Connect to get the latest version.`},footer:{cookiePolicy:`Cookie Policy`,termsOfUse:`Terms of Use`,disclaimer:`Disclaimer`,builtWith:`Built with <icon /> Powerhouse`},cookieBanner:{message:`This website uses cookies for analytic purposes only. Cookies are anonymous and do not link to user data. We collect information to improve the user experience and validate UI changes. You can still use the page without cookies. For more information, please read our <a>cookies policy.</a>`,accept:`Accept configured cookies`,reject:`Reject all cookies`,cookies:{functional:`Functional cookies`,analytics:`Analytics cookies`}}}}},fallbackLng:`en`,debug:!1,interpolation:{escapeValue:!1}}).catch(e=>{console.error(e)});function q(){return q=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},q.apply(this,arguments)}var J;(function(e){e.Pop=`POP`,e.Push=`PUSH`,e.Replace=`REPLACE`})(J||={});var Mi=`popstate`;function Ni(e){e===void 0&&(e={});function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return Li(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:Ri(t)}return Bi(t,n,null,e)}function Y(e,t){if(e===!1||e==null)throw Error(t)}function Pi(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Fi(){return Math.random().toString(36).substr(2,8)}function Ii(e,t){return{usr:e.state,key:e.key,idx:t}}function Li(e,t,n,r){return n===void 0&&(n=null),q({pathname:typeof e==`string`?e:e.pathname,search:``,hash:``},typeof t==`string`?zi(t):t,{state:n,key:t&&t.key||r||Fi()})}function Ri(e){let{pathname:t=`/`,search:n=``,hash:r=``}=e;return n&&n!==`?`&&(t+=n.charAt(0)===`?`?n:`?`+n),r&&r!==`#`&&(t+=r.charAt(0)===`#`?r:`#`+r),t}function zi(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Bi(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=J.Pop,c=null,l=u();l??(l=0,o.replaceState(q({},o.state,{idx:l}),``));function u(){return(o.state||{idx:null}).idx}function d(){s=J.Pop;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=J.Push;let r=Li(h.location,e,t);n&&n(r,e),l=u()+1;let d=Ii(r,l),f=h.createHref(r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=J.Replace;let r=Li(h.location,e,t);n&&n(r,e),l=u();let i=Ii(r,l),d=h.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){let t=i.location.origin===`null`?i.location.href:i.location.origin,n=typeof e==`string`?e:Ri(e);return n=n.replace(/ $/,`%20`),Y(t,`No window.location.(origin|href) available to create URL for href: `+n),new URL(n,t)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Mi,d),c=e,()=>{i.removeEventListener(Mi,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}var X;(function(e){e.data=`data`,e.deferred=`deferred`,e.redirect=`redirect`,e.error=`error`})(X||={});var Vi=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function Hi(e){return e.index===!0}function Ui(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((e,i)=>{let a=[...n,String(i)],o=typeof e.id==`string`?e.id:a.join(`-`);if(Y(e.index!==!0||!e.children,`Cannot specify children on an index route`),Y(!r[o],`Found a route id collision on id "`+o+`". Route id's must be globally unique within Data Router usages`),Hi(e)){let n=q({},e,t(e),{id:o});return r[o]=n,n}else{let n=q({},e,t(e),{id:o,children:void 0});return r[o]=n,e.children&&(n.children=Ui(e.children,t,a,r)),n}})}function Wi(e,t,n){return n===void 0&&(n=`/`),Gi(e,t,n,!1)}function Gi(e,t,n,r){let i=la((typeof t==`string`?zi(t):t).pathname||`/`,n);if(i==null)return null;let a=qi(e);Yi(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=ca(i);o=aa(a[e],t,r)}return o}function Ki(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function qi(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r=``);let i=(e,i,a)=>{let o={relativePath:a===void 0?e.path||``:a,caseSensitive:e.caseSensitive===!0,childrenIndex:i,route:e};o.relativePath.startsWith(`/`)&&(Y(o.relativePath.startsWith(r),`Absolute route path "`+o.relativePath+`" nested under path `+(`"`+r+`" is not valid. An absolute child route path `)+`must start with the combined path of all its parent routes.`),o.relativePath=o.relativePath.slice(r.length));let s=va([r,o.relativePath]),c=n.concat(o);e.children&&e.children.length>0&&(Y(e.index!==!0,`Index routes must not have child routes. Please remove `+(`all child routes from route path "`+s+`".`)),qi(e.children,t,c,s)),!(e.path==null&&!e.index)&&t.push({path:s,score:ra(s,e.index),routesMeta:c})};return e.forEach((e,t)=>{var n;if(e.path===``||!((n=e.path)!=null&&n.includes(`?`)))i(e,t);else for(let n of Ji(e.path))i(e,t,n)}),t}function Ji(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Ji(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Yi(e){e.sort((e,t)=>e.score===t.score?ia(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Xi=/^:[\w-]+$/,Zi=3,Qi=2,$i=1,ea=10,ta=-2,na=e=>e===`*`;function ra(e,t){let n=e.split(`/`),r=n.length;return n.some(na)&&(r+=ta),t&&(r+=Qi),n.filter(e=>!na(e)).reduce((e,t)=>e+(Xi.test(t)?Zi:t===``?$i:ea),r)}function ia(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function aa(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=oa({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=oa({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:va([a,u.pathname]),pathnameBase:ya(va([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=va([a,u.pathnameBase]))}return o}function oa(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=sa(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,t,n)=>{let{paramName:r,isOptional:i}=t;if(r===`*`){let e=s[n]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let c=s[n];return i&&!c?e[r]=void 0:e[r]=(c||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function sa(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Pi(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "`+e+`" will be treated as if it were `+(`"`+e.replace(/\*$/,`/*`)+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+(`please change the route path to "`+e.replace(/\*$/,`/*`)+`".`));let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`));return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ca(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Pi(!1,`The URL path "`+e+`" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent `+(`encoding (`+t+`).`)),e}}function la(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var ua=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,da=e=>ua.test(e);function fa(e,t){t===void 0&&(t=`/`);let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?zi(e):e,a;if(n)if(da(n))a=n;else{if(n.includes(`//`)){let e=n;n=n.replace(/\/\/+/g,`/`),Pi(!1,`Pathnames cannot have embedded double slashes - normalizing `+(e+` -> `+n))}a=n.startsWith(`/`)?pa(n.substring(1),`/`):pa(n,t)}else a=t;return{pathname:a,search:ba(r),hash:xa(i)}}function pa(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ma(e,t,n,r){return`Cannot include a '`+e+`' character in a manually specified `+("`to."+t+"` field ["+JSON.stringify(r)+`]. Please separate it out to the `)+("`to."+n+"` field. Alternatively you may provide the full path as ")+`a string in <Link to="..."> and the router will parse it for you.`}function ha(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ga(e,t){let n=ha(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function _a(e,t,n,r){r===void 0&&(r=!1);let i;typeof e==`string`?i=zi(e):(i=q({},e),Y(!i.pathname||!i.pathname.includes(`?`),ma(`?`,`pathname`,`search`,i)),Y(!i.pathname||!i.pathname.includes(`#`),ma(`#`,`pathname`,`hash`,i)),Y(!i.search||!i.search.includes(`#`),ma(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=fa(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var va=e=>e.join(`/`).replace(/\/\/+/g,`/`),ya=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),ba=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,xa=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Sa=class{constructor(e,t,n,r){r===void 0&&(r=!1),this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ca(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}var wa=[`post`,`put`,`patch`,`delete`],Ta=new Set(wa),Ea=[`get`,...wa],Da=new Set(Ea),Oa=new Set([301,302,303,307,308]),ka=new Set([307,308]),Aa={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ja={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ma={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Na=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pa=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Fa=`remix-router-transitions`;function Ia(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0,r=!n;Y(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;i=e=>({hasErrorBoundary:t(e)})}else i=Pa;let a={},o=Ui(e.routes,i,void 0,a),s,c=e.basename||`/`,l=e.dataStrategy||Ya,u=e.patchRoutesOnNavigation,d=q({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),f=null,p=new Set,m=null,h=null,g=null,_=e.hydrationData!=null,v=Wi(o,e.history.location,c),y=!1,b=null;if(v==null&&!u){let t=Z(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=lo(o);v=n,b={[r.id]:t}}v&&!e.hydrationData&&We(v,o,e.history.location.pathname).active&&(v=null);let x;if(!v){if(x=!1,v=[],d.v7_partialHydration){let t=We(null,o,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}}else if(v.some(e=>e.route.lazy))x=!1;else if(!v.some(e=>e.route.loader))x=!0;else if(d.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);x=v.slice(0,e+1).every(e=>!Ha(e.route,t,n))}else x=v.every(e=>!Ha(e.route,t,n))}else x=e.hydrationData!=null;let S,C={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,navigation:Aa,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},w=J.Pop,T=!1,E,D=!1,ee=new Map,O=null,k=!1,te=!1,ne=[],re=new Set,A=new Map,ie=0,ae=-1,oe=new Map,j=new Set,se=new Map,ce=new Map,M=new Set,le=new Map,N=new Map,P;function F(){if(f=e.history.listen(t=>{let{action:n,location:r,delta:i}=t;if(P){P(),P=void 0;return}Pi(N.size===0||i!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let a=Le({currentLocation:C.location,nextLocation:r,historyAction:n});if(a&&i!=null){let t=new Promise(e=>{P=e});e.history.go(i*-1),Ie(a,{state:`blocked`,location:r,proceed(){Ie(a,{state:`proceeding`,proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(i))},reset(){let e=new Map(C.blockers);e.set(a,Ma),I({blockers:e})}});return}return he(n,r)}),n){Mo(t,ee);let e=()=>No(t,ee);t.addEventListener(`pagehide`,e),O=()=>t.removeEventListener(`pagehide`,e)}return C.initialized||he(J.Pop,C.location,{initialHydration:!0}),S}function ue(){f&&f(),O&&O(),p.clear(),E&&E.abort(),C.fetchers.forEach((e,t)=>Oe(t)),C.blockers.forEach((e,t)=>Fe(t))}function de(e){return p.add(e),()=>p.delete(e)}function I(e,t){t===void 0&&(t={}),C=q({},C,e);let n=[],r=[];d.v7_fetcherPersist&&C.fetchers.forEach((e,t)=>{e.state===`idle`&&(M.has(t)?r.push(t):n.push(t))}),M.forEach(e=>{!C.fetchers.has(e)&&!A.has(e)&&r.push(e)}),[...p].forEach(e=>e(C,{deletedFetchers:r,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),d.v7_fetcherPersist?(n.forEach(e=>C.fetchers.delete(e)),r.forEach(e=>Oe(e))):r.forEach(e=>M.delete(e))}function fe(t,n,r){let{flushSync:i}=r===void 0?{}:r,a=C.actionData!=null&&C.navigation.formMethod!=null&&$(C.navigation.formMethod)&&C.navigation.state===`loading`&&t.state?._isRedirect!==!0,c;c=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:a?C.actionData:null;let l=n.loaderData?oo(C.loaderData,n.loaderData,n.matches||[],n.errors):C.loaderData,u=C.blockers;u.size>0&&(u=new Map(u),u.forEach((e,t)=>u.set(t,Ma)));let d=T===!0||C.navigation.formMethod!=null&&$(C.navigation.formMethod)&&t.state?._isRedirect!==!0;s&&=(o=s,void 0),k||w===J.Pop||(w===J.Push?e.history.push(t,t.state):w===J.Replace&&e.history.replace(t,t.state));let f;if(w===J.Pop){let e=ee.get(C.location.pathname);e&&e.has(t.pathname)?f={currentLocation:C.location,nextLocation:t}:ee.has(t.pathname)&&(f={currentLocation:t,nextLocation:C.location})}else if(D){let e=ee.get(C.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),ee.set(C.location.pathname,e)),f={currentLocation:C.location,nextLocation:t}}I(q({},n,{actionData:c,loaderData:l,historyAction:w,location:t,initialized:!0,navigation:Aa,revalidation:`idle`,restoreScrollPosition:Ue(t,n.matches||C.matches),preventScrollReset:d,blockers:u}),{viewTransitionOpts:f,flushSync:i===!0}),w=J.Pop,T=!1,D=!1,k=!1,te=!1,ne=[]}async function pe(t,n){if(typeof t==`number`){e.history.go(t);return}let r=Ra(C.location,C.matches,c,d.v7_prependBasename,t,d.v7_relativeSplatPath,n?.fromRouteId,n?.relative),{path:i,submission:a,error:o}=za(d.v7_normalizeFormMethod,!1,r,n),s=C.location,l=Li(C.location,i,n&&n.state);l=q({},l,e.history.encodeLocation(l));let u=n&&n.replace!=null?n.replace:void 0,f=J.Push;u===!0?f=J.Replace:u===!1||a!=null&&$(a.formMethod)&&a.formAction===C.location.pathname+C.location.search&&(f=J.Replace);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=Le({currentLocation:s,nextLocation:l,historyAction:f});if(h){Ie(h,{state:`blocked`,location:l,proceed(){Ie(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),pe(t,n)},reset(){let e=new Map(C.blockers);e.set(h,Ma),I({blockers:e})}});return}return await he(f,l,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m})}function me(){if(Te(),I({revalidation:`loading`}),C.navigation.state!==`submitting`){if(C.navigation.state===`idle`){he(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}he(w||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:D===!0})}}async function he(t,n,r){E&&E.abort(),E=null,w=t,k=(r&&r.startUninterruptedRevalidation)===!0,He(C.location,C.matches),T=(r&&r.preventScrollReset)===!0,D=(r&&r.enableViewTransition)===!0;let i=s||o,a=r&&r.overrideNavigation,l=r!=null&&r.initialHydration&&C.matches&&C.matches.length>0&&!y?C.matches:Wi(i,n,c),u=(r&&r.flushSync)===!0;if(l&&C.initialized&&!te&&po(C.location,n)&&!(r&&r.submission&&$(r.submission.formMethod))){fe(n,{matches:l},{flushSync:u});return}let d=We(l,i,n.pathname);if(d.active&&d.matches&&(l=d.matches),!l){let{error:e,notFoundMatches:t,route:r}=Re(n.pathname);fe(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:u});return}E=new AbortController;let f=to(e.history,n,E.signal,r&&r.submission),p;if(r&&r.pendingError)p=[co(l).route.id,{type:X.error,error:r.pendingError}];else if(r&&r.submission&&$(r.submission.formMethod)){let t=await ge(f,n,r.submission,l,d.active,{replace:r.replace,flushSync:u});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(Q(r)&&Ca(r.error)&&r.error.status===404){E=null,fe(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}l=t.matches||l,p=t.pendingActionResult,a=Do(n,r.submission),u=!1,d.active=!1,f=to(e.history,f.url,f.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_}=await _e(f,n,l,d.active,a,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,u,p);m||(E=null,fe(n,q({matches:h||l},so(p),{loaderData:g,errors:_})))}async function ge(t,n,r,i,a,o){if(o===void 0&&(o={}),Te(),I({navigation:Oo(n,r)},{flushSync:o.flushSync===!0}),a){let e=await Ge(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){let t=co(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:X.error,error:e.error}]}}else if(e.matches)i=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Re(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:X.error,error:t}]}}}let s,l=To(i,n);if(!l.route.action&&!l.route.lazy)s={type:X.error,error:Z(405,{method:t.method,pathname:n.pathname,routeId:l.route.id})};else if(s=(await L(`action`,C,t,[l],i,null))[l.route.id],t.signal.aborted)return{shortCircuited:!0};if(go(s)){let n;return n=o&&o.replace!=null?o.replace:eo(s.response.headers.get(`Location`),new URL(t.url),c,e.history)===C.location.pathname+C.location.search,await Ce(t,s,!0,{submission:r,replace:n}),{shortCircuited:!0}}if(ho(s))throw Z(400,{type:`defer-action`});if(Q(s)){let e=co(i,l.route.id);return(o&&o.replace)!==!0&&(w=J.Push),{matches:i,pendingActionResult:[e.route.id,s]}}return{matches:i,pendingActionResult:[l.route.id,s]}}async function _e(t,n,r,i,a,l,u,f,p,m,h){let g=a||Do(n,l),_=l||u||Eo(g),v=!k&&(!d.v7_partialHydration||!p);if(i){if(v){let e=ve(h);I(q({navigation:g},e===void 0?{}:{actionData:e}),{flushSync:m})}let e=await Ge(r,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){let t=co(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)r=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Re(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let y=s||o,[b,x]=Va(e.history,C,r,_,n,d.v7_partialHydration&&p===!0,d.v7_skipActionErrorRevalidation,te,ne,re,M,se,j,y,c,h);if(ze(e=>!(r&&r.some(t=>t.route.id===e))||b&&b.some(t=>t.route.id===e)),ae=++ie,b.length===0&&x.length===0){let e=Me();return fe(n,q({matches:r,loaderData:{},errors:h&&Q(h[1])?{[h[0]]:h[1].error}:null},so(h),e?{fetchers:new Map(C.fetchers)}:{}),{flushSync:m}),{shortCircuited:!0}}if(v){let e={};if(!i){e.navigation=g;let t=ve(h);t!==void 0&&(e.actionData=t)}x.length>0&&(e.fetchers=ye(x)),I(e,{flushSync:m})}x.forEach(e=>{Ae(e.key),e.controller&&A.set(e.key,e.controller)});let S=()=>x.forEach(e=>Ae(e.key));E&&E.signal.addEventListener(`abort`,S);let{loaderResults:w,fetcherResults:T}=await we(C,r,b,x,t);if(t.signal.aborted)return{shortCircuited:!0};E&&E.signal.removeEventListener(`abort`,S),x.forEach(e=>A.delete(e.key));let D=uo(w);if(D)return await Ce(t,D.result,!0,{replace:f}),{shortCircuited:!0};if(D=uo(T),D)return j.add(D.key),await Ce(t,D.result,!0,{replace:f}),{shortCircuited:!0};let{loaderData:ee,errors:O}=ao(C,r,w,h,x,T,le);le.forEach((e,t)=>{e.subscribe(n=>{(n||e.done)&&le.delete(t)})}),d.v7_partialHydration&&p&&C.errors&&(O=q({},C.errors,O));let oe=Me(),ce=Ne(ae),N=oe||ce||x.length>0;return q({matches:r,loaderData:ee,errors:O},N?{fetchers:new Map(C.fetchers)}:{})}function ve(e){if(e&&!Q(e[1]))return{[e[0]]:e[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function ye(e){return e.forEach(e=>{let t=C.fetchers.get(e.key),n=ko(void 0,t?t.data:void 0);C.fetchers.set(e.key,n)}),new Map(C.fetchers)}function be(e,t,n,i){if(r)throw Error(`router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.`);Ae(e);let a=(i&&i.flushSync)===!0,l=s||o,u=Ra(C.location,C.matches,c,d.v7_prependBasename,n,d.v7_relativeSplatPath,t,i?.relative),f=Wi(l,u,c),p=We(f,l,u);if(p.active&&p.matches&&(f=p.matches),!f){R(e,t,Z(404,{pathname:u}),{flushSync:a});return}let{path:m,submission:h,error:g}=za(d.v7_normalizeFormMethod,!0,u,i);if(g){R(e,t,g,{flushSync:a});return}let _=To(f,m),v=(i&&i.preventScrollReset)===!0;if(h&&$(h.formMethod)){xe(e,t,m,_,f,p.active,a,v,h);return}se.set(e,{routeId:t,path:m}),Se(e,t,m,_,f,p.active,a,v,h)}async function xe(t,n,r,i,a,l,u,f,p){Te(),se.delete(t);function m(e){return!e.route.action&&!e.route.lazy?(R(t,n,Z(405,{method:p.formMethod,pathname:r,routeId:n}),{flushSync:u}),!0):!1}if(!l&&m(i))return;Ee(t,Ao(p,C.fetchers.get(t)),{flushSync:u});let h=new AbortController,g=to(e.history,r,h.signal,p);if(l){let e=await Ge(a,new URL(g.url).pathname,g.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){R(t,n,e.error,{flushSync:u});return}else if(!e.matches){R(t,n,Z(404,{pathname:r}),{flushSync:u});return}else if(a=e.matches,i=To(a,r),m(i))return}A.set(t,h);let _=ie,v=(await L(`action`,C,g,[i],a,t))[i.route.id];if(g.signal.aborted){A.get(t)===h&&A.delete(t);return}if(d.v7_fetcherPersist&&M.has(t)){if(go(v)||Q(v)){Ee(t,jo(void 0));return}}else{if(go(v))if(A.delete(t),ae>_){Ee(t,jo(void 0));return}else return j.add(t),Ee(t,ko(p)),Ce(g,v,!1,{fetcherSubmission:p,preventScrollReset:f});if(Q(v)){R(t,n,v.error);return}}if(ho(v))throw Z(400,{type:`defer-action`});let y=C.navigation.location||C.location,b=to(e.history,y,h.signal),x=s||o,S=C.navigation.state===`idle`?C.matches:Wi(x,C.navigation.location,c);Y(S,`Didn't find any matches after fetcher action`);let T=++ie;oe.set(t,T);let D=ko(p,v.data);C.fetchers.set(t,D);let[ee,O]=Va(e.history,C,S,p,y,!1,d.v7_skipActionErrorRevalidation,te,ne,re,M,se,j,x,c,[i.route.id,v]);O.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=C.fetchers.get(t),r=ko(void 0,n?n.data:void 0);C.fetchers.set(t,r),Ae(t),e.controller&&A.set(t,e.controller)}),I({fetchers:new Map(C.fetchers)});let k=()=>O.forEach(e=>Ae(e.key));h.signal.addEventListener(`abort`,k);let{loaderResults:ce,fetcherResults:N}=await we(C,S,ee,O,b);if(h.signal.aborted)return;h.signal.removeEventListener(`abort`,k),oe.delete(t),A.delete(t),O.forEach(e=>A.delete(e.key));let P=uo(ce);if(P)return Ce(b,P.result,!1,{preventScrollReset:f});if(P=uo(N),P)return j.add(P.key),Ce(b,P.result,!1,{preventScrollReset:f});let{loaderData:F,errors:ue}=ao(C,S,ce,void 0,O,N,le);if(C.fetchers.has(t)){let e=jo(v.data);C.fetchers.set(t,e)}Ne(T),C.navigation.state===`loading`&&T>ae?(Y(w,`Expected pending action`),E&&E.abort(),fe(C.navigation.location,{matches:S,loaderData:F,errors:ue,fetchers:new Map(C.fetchers)})):(I({errors:ue,loaderData:oo(C.loaderData,F,S,ue),fetchers:new Map(C.fetchers)}),te=!1)}async function Se(t,n,r,i,a,o,s,c,l){let u=C.fetchers.get(t);Ee(t,ko(l,u?u.data:void 0),{flushSync:s});let d=new AbortController,f=to(e.history,r,d.signal);if(o){let e=await Ge(a,new URL(f.url).pathname,f.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){R(t,n,e.error,{flushSync:s});return}else if(e.matches)a=e.matches,i=To(a,r);else{R(t,n,Z(404,{pathname:r}),{flushSync:s});return}}A.set(t,d);let p=ie,m=(await L(`loader`,C,f,[i],a,t))[i.route.id];if(ho(m)&&(m=await Co(m,f.signal,!0)||m),A.get(t)===d&&A.delete(t),!f.signal.aborted){if(M.has(t)){Ee(t,jo(void 0));return}if(go(m))if(ae>p){Ee(t,jo(void 0));return}else{j.add(t),await Ce(f,m,!1,{preventScrollReset:c});return}if(Q(m)){R(t,n,m.error);return}Y(!ho(m),`Unhandled fetcher deferred data`),Ee(t,jo(m.data))}}async function Ce(r,i,a,o){let{submission:s,fetcherSubmission:l,preventScrollReset:u,replace:d}=o===void 0?{}:o;i.response.headers.has(`X-Remix-Revalidate`)&&(te=!0);let f=i.response.headers.get(`Location`);Y(f,`Expected a Location header on the redirect Response`),f=eo(f,new URL(r.url),c,e.history);let p=Li(C.location,f,{_isRedirect:!0});if(n){let n=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))n=!0;else if(Na.test(f)){let r=e.history.createURL(f);n=r.origin!==t.location.origin||la(r.pathname,c)==null}if(n){d?t.location.replace(f):t.location.assign(f);return}}E=null;let m=d===!0||i.response.headers.has(`X-Remix-Replace`)?J.Replace:J.Push,{formMethod:h,formAction:g,formEncType:_}=C.navigation;!s&&!l&&h&&g&&_&&(s=Eo(C.navigation));let v=s||l;ka.has(i.response.status)&&v&&$(v.formMethod)?await he(m,p,{submission:q({},v,{formAction:f}),preventScrollReset:u||T,enableViewTransition:a?D:void 0}):await he(m,p,{overrideNavigation:Do(p,s),fetcherSubmission:l,preventScrollReset:u||T,enableViewTransition:a?D:void 0})}async function L(e,t,n,r,o,s){let u,f={};try{u=await Xa(l,e,t,n,r,o,s,a,i)}catch(e){return r.forEach(t=>{f[t.route.id]={type:X.error,error:e}}),f}for(let[e,t]of Object.entries(u))if(mo(t)){let r=t.result;f[e]={type:X.redirect,response:$a(r,n,e,o,c,d.v7_relativeSplatPath)}}else f[e]=await Qa(t);return f}async function we(t,n,r,i,a){let o=t.matches,s=L(`loader`,t,a,r,n,null),c=Promise.all(i.map(async n=>{if(n.matches&&n.match&&n.controller){let r=(await L(`loader`,t,to(e.history,n.path,n.controller.signal),[n.match],n.matches,n.key))[n.match.route.id];return{[n.key]:r}}else return Promise.resolve({[n.key]:{type:X.error,error:Z(404,{pathname:n.path})}})})),l=await s,u=(await c).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([xo(n,l,a.signal,o,t.loaderData),So(n,u,i)]),{loaderResults:l,fetcherResults:u}}function Te(){te=!0,ne.push(...ze()),se.forEach((e,t)=>{A.has(t)&&re.add(t),Ae(t)})}function Ee(e,t,n){n===void 0&&(n={}),C.fetchers.set(e,t),I({fetchers:new Map(C.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function R(e,t,n,r){r===void 0&&(r={});let i=co(C.matches,t);Oe(e),I({errors:{[i.route.id]:n},fetchers:new Map(C.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function De(e){return ce.set(e,(ce.get(e)||0)+1),M.has(e)&&M.delete(e),C.fetchers.get(e)||ja}function Oe(e){let t=C.fetchers.get(e);A.has(e)&&!(t&&t.state===`loading`&&oe.has(e))&&Ae(e),se.delete(e),oe.delete(e),j.delete(e),d.v7_fetcherPersist&&M.delete(e),re.delete(e),C.fetchers.delete(e)}function ke(e){let t=(ce.get(e)||0)-1;t<=0?(ce.delete(e),M.add(e),d.v7_fetcherPersist||Oe(e)):ce.set(e,t),I({fetchers:new Map(C.fetchers)})}function Ae(e){let t=A.get(e);t&&(t.abort(),A.delete(e))}function je(e){for(let t of e){let e=jo(De(t).data);C.fetchers.set(t,e)}}function Me(){let e=[],t=!1;for(let n of j){let r=C.fetchers.get(n);Y(r,`Expected fetcher: `+n),r.state===`loading`&&(j.delete(n),e.push(n),t=!0)}return je(e),t}function Ne(e){let t=[];for(let[n,r]of oe)if(r<e){let e=C.fetchers.get(n);Y(e,`Expected fetcher: `+n),e.state===`loading`&&(Ae(n),oe.delete(n),t.push(n))}return je(t),t.length>0}function Pe(e,t){let n=C.blockers.get(e)||Ma;return N.get(e)!==t&&N.set(e,t),n}function Fe(e){C.blockers.delete(e),N.delete(e)}function Ie(e,t){let n=C.blockers.get(e)||Ma;Y(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: `+n.state+` -> `+t.state);let r=new Map(C.blockers);r.set(e,t),I({blockers:r})}function Le(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(N.size===0)return;N.size>1&&Pi(!1,`A router only supports one blocker at a time`);let i=Array.from(N.entries()),[a,o]=i[i.length-1],s=C.blockers.get(a);if(!(s&&s.state===`proceeding`)&&o({currentLocation:t,nextLocation:n,historyAction:r}))return a}function Re(e){let t=Z(404,{pathname:e}),{matches:n,route:r}=lo(s||o);return ze(),{notFoundMatches:n,route:r,error:t}}function ze(e){let t=[];return le.forEach((n,r)=>{(!e||e(r))&&(n.cancel(),t.push(r),le.delete(r))}),t}function Be(e,t,n){if(m=e,g=t,h=n||null,!_&&C.navigation===Aa){_=!0;let e=Ue(C.location,C.matches);e!=null&&I({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function Ve(e,t){return h&&h(e,t.map(e=>Ki(e,C.loaderData)))||e.key}function He(e,t){if(m&&g){let n=Ve(e,t);m[n]=g()}}function Ue(e,t){if(m){let n=Ve(e,t),r=m[n];if(typeof r==`number`)return r}return null}function We(e,t,n){if(u){if(!e)return{active:!0,matches:Gi(t,n,c,!0)||[]};if(Object.keys(e[0].params).length>0)return{active:!0,matches:Gi(t,n,c,!0)}}return{active:!1,matches:null}}async function Ge(e,t,n,r){if(!u)return{type:`success`,matches:e};let l=e;for(;;){let e=s==null,d=s||o,f=a;try{await u({signal:n,path:t,matches:l,fetcherKey:r,patch:(e,t)=>{n.aborted||Ka(e,t,d,f,i)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}finally{e&&!n.aborted&&(o=[...o])}if(n.aborted)return{type:`aborted`};let p=Wi(d,t,c);if(p)return{type:`success`,matches:p};let m=Gi(d,t,c,!0);if(!m||l.length===m.length&&l.every((e,t)=>e.route.id===m[t].route.id))return{type:`success`,matches:null};l=m}}function Ke(e){a={},s=Ui(e,i,void 0,a)}function qe(e,t){let n=s==null;Ka(e,t,s||o,a,i),n&&(o=[...o],I({}))}return S={get basename(){return c},get future(){return d},get state(){return C},get routes(){return o},get window(){return t},initialize:F,subscribe:de,enableScrollRestoration:Be,navigate:pe,fetch:be,revalidate:me,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:De,deleteFetcher:ke,dispose:ue,getBlocker:Pe,deleteBlocker:Fe,patchRoutes:qe,_internalFetchControllers:A,_internalActiveDeferreds:le,_internalSetRoutes:Ke},S}function La(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Ra(e,t,n,r,i,a,o,s){let c,l;if(o){c=[];for(let e of t)if(c.push(e),e.route.id===o){l=e;break}}else c=t,l=t[t.length-1];let u=_a(i||`.`,ga(c,a),la(e.pathname,n)||e.pathname,s===`path`);if(i??(u.search=e.search,u.hash=e.hash),(i==null||i===``||i===`.`)&&l){let e=wo(u.search);if(l.route.index&&!e)u.search=u.search?u.search.replace(/^\?/,`?index&`):`?index`;else if(!l.route.index&&e){let e=new URLSearchParams(u.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();u.search=n?`?`+n:``}}return r&&n!==`/`&&(u.pathname=u.pathname===`/`?n:va([n,u.pathname])),Ri(u)}function za(e,t,n,r){if(!r||!La(r))return{path:n};if(r.formMethod&&!bo(r.formMethod))return{path:n,error:Z(405,{method:r.formMethod})};let i=()=>({path:n,error:Z(400,{type:`invalid-body`})}),a=r.formMethod||`get`,o=e?a.toUpperCase():a.toLowerCase(),s=fo(n);if(r.body!==void 0){if(r.formEncType===`text/plain`){if(!$(o))return i();let e=typeof r.body==`string`?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,t)=>{let[n,r]=t;return``+e+n+`=`+r+`
|
|
36
|
+
`},``):String(r.body);return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}else if(r.formEncType===`application/json`){if(!$(o))return i();try{let e=typeof r.body==`string`?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch{return i()}}}Y(typeof FormData==`function`,`FormData is not available in this environment`);let c,l;if(r.formData)c=no(r.formData),l=r.formData;else if(r.body instanceof FormData)c=no(r.body),l=r.body;else if(r.body instanceof URLSearchParams)c=r.body,l=ro(c);else if(r.body==null)c=new URLSearchParams,l=new FormData;else try{c=new URLSearchParams(r.body),l=ro(c)}catch{return i()}let u={formMethod:o,formAction:s,formEncType:r&&r.formEncType||`application/x-www-form-urlencoded`,formData:l,json:void 0,text:void 0};if($(u.formMethod))return{path:n,submission:u};let d=zi(n);return t&&d.search&&wo(d.search)&&c.append(`index`,``),d.search=`?`+c,{path:Ri(d),submission:u}}function Ba(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(e=>e.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function Va(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){let g=h?Q(h[1])?h[1].error:h[1].data:void 0,_=e.createURL(t.location),v=e.createURL(i),y=n;a&&t.errors?y=Ba(n,Object.keys(t.errors)[0],!0):h&&Q(h[1])&&(y=Ba(n,h[0]));let b=h?h[1].statusCode:void 0,x=o&&b&&b>=400,S=y.filter((e,n)=>{let{route:i}=e;if(i.lazy)return!0;if(i.loader==null)return!1;if(a)return Ha(i,t.loaderData,t.errors);if(Ua(t.loaderData,t.matches[n],e)||c.some(t=>t===e.route.id))return!0;let o=t.matches[n],l=e;return Ga(e,q({currentUrl:_,currentParams:o.params,nextUrl:v,nextParams:l.params},r,{actionResult:g,actionStatus:b,defaultShouldRevalidate:x?!1:s||_.pathname+_.search===v.pathname+v.search||_.search!==v.search||Wa(o,l)}))}),C=[];return d.forEach((e,i)=>{if(a||!n.some(t=>t.route.id===e.routeId)||u.has(i))return;let o=Wi(p,e.path,m);if(!o){C.push({key:i,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}let c=t.fetchers.get(i),d=To(o,e.path),h=!1;f.has(i)?h=!1:l.has(i)?(l.delete(i),h=!0):h=c&&c.state!==`idle`&&c.data===void 0?s:Ga(d,q({currentUrl:_,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:g,actionStatus:b,defaultShouldRevalidate:x?!1:s})),h&&C.push({key:i,routeId:e.routeId,path:e.path,matches:o,match:d,controller:new AbortController})}),[S,C]}function Ha(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader==`function`&&e.loader.hydrate===!0?!0:!r&&!i}function Ua(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function Wa(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Ga(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Ka(e,t,n,r,i){let a;if(e){let t=r[e];Y(t,`No route found to patch children into: routeId = `+e),t.children||=[],a=t.children}else a=n;let o=Ui(t.filter(e=>!a.some(t=>qa(e,t))),i,[e||`_`,`patch`,String(a?.length||`0`)],r);a.push(...o)}function qa(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((e,n)=>t.children?.some(t=>qa(e,t))):!1}async function Ja(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Y(i,`No route found in manifest`);let a={};for(let e in r){let t=i[e]!==void 0&&e!==`hasErrorBoundary`;Pi(!t,`Route "`+i.id+`" has a static property "`+e+`" defined but its lazy function is also returning a value for this property. `+(`The lazy route property "`+e+`" will be ignored.`)),!t&&!Vi.has(e)&&(a[e]=r[e])}Object.assign(i,a),Object.assign(i,q({},t(i),{lazy:void 0}))}async function Ya(e){let{matches:t}=e,n=t.filter(e=>e.shouldLoad);return(await Promise.all(n.map(e=>e.resolve()))).reduce((e,t,r)=>Object.assign(e,{[n[r].route.id]:t}),{})}async function Xa(e,t,n,r,i,a,o,s,c,l){let u=a.map(e=>e.route.lazy?Ja(e.route,c,s):void 0),d=await e({matches:a.map((e,n)=>{let a=u[n],o=i.some(t=>t.route.id===e.route.id);return q({},e,{shouldLoad:o,resolve:async n=>(n&&r.method===`GET`&&(e.route.lazy||e.route.loader)&&(o=!0),o?Za(t,r,e,a,n,l):Promise.resolve({type:X.data,result:void 0}))})}),request:r,params:a[0].params,fetcherKey:o,context:l});try{await Promise.all(u)}catch{}return d}async function Za(e,t,n,r,i,a){let o,s,c=r=>{let o,c=new Promise((e,t)=>o=t);s=()=>o(),t.signal.addEventListener(`abort`,s);let l=i=>typeof r==`function`?r({request:t,params:n.params,context:a},...i===void 0?[]:[i]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean `+(`"`+e+`" [routeId: `+n.route.id+`]`))),u=(async()=>{try{return{type:`data`,result:await(i?i(e=>l(e)):l())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([u,c])};try{let i=n.route[e];if(r)if(i){let e,[t]=await Promise.all([c(i).catch(t=>{e=t}),r]);if(e!==void 0)throw e;o=t}else if(await r,i=n.route[e],i)o=await c(i);else if(e===`action`){let e=new URL(t.url),r=e.pathname+e.search;throw Z(405,{method:t.method,pathname:r,routeId:n.route.id})}else return{type:X.data,result:void 0};else if(i)o=await c(i);else{let e=new URL(t.url);throw Z(404,{pathname:e.pathname+e.search})}Y(o.result!==void 0,`You defined `+(e===`action`?`an action`:`a loader`)+` for route `+(`"`+n.route.id+`" but didn't return anything from your \``+e+"` ")+"function. Please return a value or `null`.")}catch(e){return{type:X.error,result:e}}finally{s&&t.signal.removeEventListener(`abort`,s)}return o}async function Qa(e){let{result:t,type:n}=e;if(yo(t)){let e;try{let n=t.headers.get(`Content-Type`);e=n&&/\bapplication\/json\b/.test(n)?t.body==null?null:await t.json():await t.text()}catch(e){return{type:X.error,error:e}}return n===X.error?{type:X.error,error:new Sa(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:X.data,data:e,statusCode:t.status,headers:t.headers}}if(n===X.error){if(_o(t)){var r;if(t.data instanceof Error){var i;return{type:X.error,error:t.data,statusCode:t.init?.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:X.error,error:new Sa(t.init?.status||500,void 0,t.data),statusCode:Ca(t)?t.status:void 0,headers:(r=t.init)!=null&&r.headers?new Headers(t.init.headers):void 0}}return{type:X.error,error:t,statusCode:Ca(t)?t.status:void 0}}if(vo(t))return{type:X.deferred,deferredData:t,statusCode:t.init?.status,headers:t.init?.headers&&new Headers(t.init.headers)};if(_o(t)){var a;return{type:X.data,data:t.data,statusCode:t.init?.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:X.data,data:t}}function $a(e,t,n,r,i,a){let o=e.headers.get(`Location`);if(Y(o,`Redirects returned/thrown from loaders/actions must have a Location header`),!Na.test(o)){let s=r.slice(0,r.findIndex(e=>e.route.id===n)+1);o=Ra(new URL(t.url),s,i,!0,o,a),e.headers.set(`Location`,o)}return e}function eo(e,t,n,r){let i=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];if(Na.test(e)){let r=e,a=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(i.includes(a.protocol))throw Error(`Invalid redirect location`);let o=la(a.pathname,n)!=null;if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}try{let t=r.createURL(e);if(i.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}function to(e,t,n,r){let i=e.createURL(fo(t)).toString(),a={signal:n};if(r&&$(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=no(r.formData):a.body=r.formData}return new Request(i,a)}function no(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function ro(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function io(e,t,n,r,i){let a={},o=null,s,c=!1,l={},u=n&&Q(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(Y(!go(f),`Cannot handle redirect results in processLoaderData`),Q(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=co(e,d);o[n.route.id]??(o[n.route.id]=t)}a[d]=void 0,c||(c=!0,s=Ca(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else ho(f)?(r.set(d,f.deferredData),a[d]=f.deferredData.data,f.statusCode!=null&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)):(a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers))}),u!==void 0&&n&&(o={[n[0]]:u},a[n[0]]=void 0),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function ao(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=io(t,n,r,o,!1);return i.forEach(t=>{let{key:n,match:r,controller:i}=t,o=a[n];if(Y(o,`Did not find corresponding fetcher result`),!(i&&i.signal.aborted))if(Q(o)){let t=co(e.matches,r?.route.id);c&&c[t.route.id]||(c=q({},c,{[t.route.id]:o.error})),e.fetchers.delete(n)}else if(go(o))Y(!1,`Unhandled fetcher revalidation redirect`);else if(ho(o))Y(!1,`Unhandled fetcher deferred data`);else{let t=jo(o.data);e.fetchers.set(n,t)}}),{loaderData:s,errors:c}}function oo(e,t,n,r){let i=q({},t);for(let a of n){let n=a.route.id;if(t.hasOwnProperty(n)?t[n]!==void 0&&(i[n]=t[n]):e[n]!==void 0&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function so(e){return e?Q(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function co(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function lo(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function Z(e,t){let{pathname:n,routeId:r,method:i,type:a,message:o}=t===void 0?{}:t,s=`Unknown Server Error`,c=`Unknown @remix-run/router error`;return e===400?(s=`Bad Request`,i&&n&&r?c=`You made a `+i+` request to "`+n+`" but `+('did not provide a `loader` for route "'+r+`", `)+`so there is no way to handle the request.`:a===`defer-action`?c=`defer() is not supported in actions`:a===`invalid-body`&&(c=`Unable to encode submission body`)):e===403?(s=`Forbidden`,c=`Route "`+r+`" does not match URL "`+n+`"`):e===404?(s=`Not Found`,c=`No route matches URL "`+n+`"`):e===405&&(s=`Method Not Allowed`,i&&n&&r?c=`You made a `+i.toUpperCase()+` request to "`+n+`" but `+('did not provide an `action` for route "'+r+`", `)+`so there is no way to handle the request.`:i&&(c=`Invalid request method "`+i.toUpperCase()+`"`)),new Sa(e||500,s,Error(c),!0)}function uo(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(go(r))return{key:n,result:r}}}function fo(e){let t=typeof e==`string`?zi(e):e;return Ri(q({},t,{hash:``}))}function po(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function mo(e){return yo(e.result)&&Oa.has(e.result.status)}function ho(e){return e.type===X.deferred}function Q(e){return e.type===X.error}function go(e){return(e&&e.type)===X.redirect}function _o(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function vo(e){let t=e;return t&&typeof t==`object`&&typeof t.data==`object`&&typeof t.subscribe==`function`&&typeof t.cancel==`function`&&typeof t.resolveData==`function`}function yo(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function bo(e){return Da.has(e.toLowerCase())}function $(e){return Ta.has(e.toLowerCase())}async function xo(e,t,n,r,i){let a=Object.entries(t);for(let o=0;o<a.length;o++){let[s,c]=a[o],l=e.find(e=>e?.route.id===s);if(!l)continue;let u=r.find(e=>e.route.id===l.route.id),d=u!=null&&!Wa(u,l)&&(i&&i[l.route.id])!==void 0;ho(c)&&d&&await Co(c,n,!1).then(e=>{e&&(t[s]=e)})}}async function So(e,t,n){for(let r=0;r<n.length;r++){let{key:i,routeId:a,controller:o}=n[r],s=t[i];e.find(e=>e?.route.id===a)&&ho(s)&&(Y(o,`Expected an AbortController for revalidating fetcher deferred result`),await Co(s,o.signal,!0).then(e=>{e&&(t[i]=e)}))}}async function Co(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:X.data,data:e.deferredData.unwrappedData}}catch(e){return{type:X.error,error:e}}return{type:X.data,data:e.deferredData.data}}}function wo(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function To(e,t){let n=typeof t==`string`?zi(t).search:t.search;if(e[e.length-1].route.index&&wo(n||``))return e[e.length-1];let r=ha(e);return r[r.length-1]}function Eo(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Do(e,t){return t?{state:`loading`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:`loading`,location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Oo(e,t){return{state:`submitting`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ko(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ao(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function jo(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Mo(e,t){try{let n=e.sessionStorage.getItem(Fa);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function No(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Fa,JSON.stringify(n))}catch(e){Pi(!1,`Failed to save applied view transitions in sessionStorage (`+e+`).`)}}}function Po(){return Po=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},Po.apply(this,arguments)}var Fo=z.createContext(null),Io=z.createContext(null),Lo=z.createContext(null),Ro=z.createContext(null),zo=z.createContext({outlet:null,matches:[],isDataRoute:!1}),Bo=z.createContext(null);function Vo(){return z.useContext(Ro)!=null}function Ho(){return!Vo()&&Y(!1),z.useContext(Ro).location}function Uo(){return z.useContext(Ro).navigationType}function Wo(e){z.useContext(Lo).static||z.useLayoutEffect(e)}function Go(){let{isDataRoute:e}=z.useContext(zo);return e?ls():Ko()}function Ko(){!Vo()&&Y(!1);let e=z.useContext(Fo),{basename:t,future:n,navigator:r}=z.useContext(Lo),{matches:i}=z.useContext(zo),{pathname:a}=Ho(),o=JSON.stringify(ga(i,n.v7_relativeSplatPath)),s=z.useRef(!1);return Wo(()=>{s.current=!0}),z.useCallback(function(n,i){if(i===void 0&&(i={}),!s.current)return;if(typeof n==`number`){r.go(n);return}let c=_a(n,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:va([t,c.pathname])),(i.replace?r.replace:r.push)(c,i.state,i)},[t,r,o,a,e])}var qo=z.createContext(null);function Jo(e){let t=z.useContext(zo).outlet;return t&&z.createElement(qo.Provider,{value:e},t)}function Yo(){let{matches:e}=z.useContext(zo),t=e[e.length-1];return t?t.params:{}}function Xo(e,t,n,r){!Vo()&&Y(!1);let{navigator:i}=z.useContext(Lo),{matches:a}=z.useContext(zo),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:`/`;o&&o.route;let l=Ho(),u;if(t){let e=typeof t==`string`?zi(t):t;!(c===`/`||e.pathname?.startsWith(c))&&Y(!1),u=e}else u=l;let d=u.pathname||`/`,f=d;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);f=`/`+d.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let p=Wi(e,{pathname:f}),m=ts(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:va([c,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:va([c,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),a,n,r);return t&&m?z.createElement(Ro.Provider,{value:{location:Po({pathname:`/`,search:``,hash:``,state:null,key:`default`},u),navigationType:J.Pop}},m):m}function Zo(){let e=cs(),t=Ca(e)?e.status+` `+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return z.createElement(z.Fragment,null,z.createElement(`h2`,null,`Unexpected Application Error!`),z.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?z.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Qo=z.createElement(Zo,null),$o=class extends z.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error(`React Router caught the following error during render`,e,t)}render(){return this.state.error===void 0?this.props.children:z.createElement(zo.Provider,{value:this.props.routeContext},z.createElement(Bo.Provider,{value:this.state.error,children:this.props.component}))}};function es(e){let{routeContext:t,match:n,children:r}=e,i=z.useContext(Fo);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),z.createElement(zo.Provider,{value:t},r)}function ts(e,t,n,r){if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);!(e>=0)&&Y(!1),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&e[t.route.id]===void 0&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){s=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}return a.reduceRight((e,r,i)=>{let l,u=!1,d=null,f=null;n&&(l=o&&r.route.id?o[r.route.id]:void 0,d=r.route.errorElement||Qo,s&&(c<0&&i===0?(ds(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,f=null):c===i&&(u=!0,f=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,i+1)),m=()=>{let t;return t=l?d:u?f:r.route.Component?z.createElement(r.route.Component,null):r.route.element?r.route.element:e,z.createElement(es,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?z.createElement($o,{location:n.location,revalidation:n.revalidation,component:d,error:l,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var ns=function(e){return e.UseBlocker=`useBlocker`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e}(ns||{}),rs=function(e){return e.UseBlocker=`useBlocker`,e.UseLoaderData=`useLoaderData`,e.UseActionData=`useActionData`,e.UseRouteError=`useRouteError`,e.UseNavigation=`useNavigation`,e.UseRouteLoaderData=`useRouteLoaderData`,e.UseMatches=`useMatches`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e.UseRouteId=`useRouteId`,e}(rs||{});function is(e){let t=z.useContext(Fo);return!t&&Y(!1),t}function as(e){let t=z.useContext(Io);return!t&&Y(!1),t}function os(e){let t=z.useContext(zo);return!t&&Y(!1),t}function ss(e){let t=os(e),n=t.matches[t.matches.length-1];return!n.route.id&&Y(!1),n.route.id}function cs(){let e=z.useContext(Bo),t=as(rs.UseRouteError),n=ss(rs.UseRouteError);return e===void 0?t.errors?.[n]:e}function ls(){let{router:e}=is(ns.UseNavigateStable),t=ss(rs.UseNavigateStable),n=z.useRef(!1);return Wo(()=>{n.current=!0}),z.useCallback(function(r,i){i===void 0&&(i={}),n.current&&(typeof r==`number`?e.navigate(r):e.navigate(r,Po({fromRouteId:t},i)))},[e,t])}var us={};function ds(e,t,n){!t&&!us[e]&&(us[e]=!0)}var fs=(e,t,n)=>(``+t+("You can use the `"+e+"` future flag to opt-in early. ")+(`For more information, see `+n+`.`),void 0);function ps(e,t){e?.v7_startTransition===void 0&&fs(`v7_startTransition`,"React Router will begin wrapping state updates in `React.startTransition` in v7",`https://reactrouter.com/v6/upgrading/future#v7_starttransition`),e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath===void 0)&&fs(`v7_relativeSplatPath`,`Relative route resolution within Splat routes is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath`),t&&(t.v7_fetcherPersist===void 0&&fs(`v7_fetcherPersist`,`The persistence behavior of fetchers is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist`),t.v7_normalizeFormMethod===void 0&&fs(`v7_normalizeFormMethod`,"Casing of `formMethod` fields is being normalized to uppercase in v7",`https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod`),t.v7_partialHydration===void 0&&fs(`v7_partialHydration`,"`RouterProvider` hydration behavior is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_partialhydration`),t.v7_skipActionErrorRevalidation===void 0&&fs(`v7_skipActionErrorRevalidation`,"The revalidation behavior after 4xx/5xx `action` responses is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation`))}z.startTransition;function ms(e){return Jo(e.context)}function hs(e){Y(!1)}function gs(e){let{basename:t=`/`,children:n=null,location:r,navigationType:i=J.Pop,navigator:a,static:o=!1,future:s}=e;Vo()&&Y(!1);let c=t.replace(/^\/*/,`/`),l=z.useMemo(()=>({basename:c,navigator:a,static:o,future:Po({v7_relativeSplatPath:!1},s)}),[c,s,a,o]);typeof r==`string`&&(r=zi(r));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`}=r,h=z.useMemo(()=>{let e=la(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m},navigationType:i}},[c,u,d,f,p,m,i]);return h==null?null:z.createElement(Lo.Provider,{value:l},z.createElement(Ro.Provider,{children:n,value:h}))}var _s=function(e){return e[e.pending=0]=`pending`,e[e.success=1]=`success`,e[e.error=2]=`error`,e}(_s||{});new Promise(()=>{}),z.Component;function vs(e,t){t===void 0&&(t=[]);let n=[];return z.Children.forEach(e,(e,r)=>{if(!z.isValidElement(e))return;let i=[...t,r];if(e.type===z.Fragment){n.push.apply(n,vs(e.props.children,i));return}e.type!==hs&&Y(!1),!(!e.props.index||!e.props.children)&&Y(!1);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=vs(e.props.children,i)),n.push(a)}),n}function ys(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:z.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:z.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:z.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function bs(){return bs=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},bs.apply(this,arguments)}var xs=`6`;try{window.__reactRouterVersion=xs}catch{}function Ss(e,t){return Ia({basename:t?.basename,future:bs({},t?.future,{v7_prependBasename:!0}),history:Ni({window:t?.window}),hydrationData:t?.hydrationData||Cs(),routes:e,mapRouteProperties:ys,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window}).initialize()}function Cs(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e=bs({},e,{errors:ws(e.errors)})),e}function ws(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new Sa(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(r.__subType){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var Ts=z.createContext({isTransitioning:!1}),Es=z.createContext(new Map),Ds=z.startTransition,Os=Nr.flushSync;z.useId;function ks(e){Ds?Ds(e):e()}function As(e){Os?Os(e):e()}var js=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function Ms(e){let{fallbackElement:t,router:n,future:r}=e,[i,a]=z.useState(n.state),[o,s]=z.useState(),[c,l]=z.useState({isTransitioning:!1}),[u,d]=z.useState(),[f,p]=z.useState(),[m,h]=z.useState(),g=z.useRef(new Map),{v7_startTransition:_}=r||{},v=z.useCallback(e=>{_?ks(e):e()},[_]),y=z.useCallback((e,t)=>{let{deletedFetchers:r,flushSync:i,viewTransitionOpts:o}=t;e.fetchers.forEach((e,t)=>{e.data!==void 0&&g.current.set(t,e.data)}),r.forEach(e=>g.current.delete(e));let c=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!=`function`;if(!o||c){i?As(()=>a(e)):v(()=>a(e));return}if(i){As(()=>{f&&(u&&u.resolve(),f.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:o.currentLocation,nextLocation:o.nextLocation})});let t=n.window.document.startViewTransition(()=>{As(()=>a(e))});t.finished.finally(()=>{As(()=>{d(void 0),p(void 0),s(void 0),l({isTransitioning:!1})})}),As(()=>p(t));return}f?(u&&u.resolve(),f.skipTransition(),h({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})):(s(e),l({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}))},[n.window,f,u,g,v]);z.useLayoutEffect(()=>n.subscribe(y),[n,y]),z.useEffect(()=>{c.isTransitioning&&!c.flushSync&&d(new js)},[c]),z.useEffect(()=>{if(u&&o&&n.window){let e=o,t=u.promise,r=n.window.document.startViewTransition(async()=>{v(()=>a(e)),await t});r.finished.finally(()=>{d(void 0),p(void 0),s(void 0),l({isTransitioning:!1})}),p(r)}},[v,o,u,n.window]),z.useEffect(()=>{u&&o&&i.location.key===o.location.key&&u.resolve()},[u,f,i.location,o]),z.useEffect(()=>{!c.isTransitioning&&m&&(s(m.state),l({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),h(void 0))},[c.isTransitioning,m]),z.useEffect(()=>{},[]);let b=z.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:r?.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:r?.preventScrollReset})}),[n]),x=n.basename||`/`,S=z.useMemo(()=>({router:n,navigator:b,static:!1,basename:x}),[n,b,x]),C=z.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return z.useEffect(()=>ps(r,n.future),[r,n.future]),z.createElement(z.Fragment,null,z.createElement(Fo.Provider,{value:S},z.createElement(Io.Provider,{value:i},z.createElement(Es.Provider,{value:g.current},z.createElement(Ts.Provider,{value:c},z.createElement(gs,{basename:x,location:i.location,navigationType:i.historyAction,navigator:b,future:C},i.initialized||n.future.v7_partialHydration?z.createElement(Ns,{routes:n.routes,future:n.future,state:i}):t))))),null)}var Ns=z.memo(Ps);function Ps(e){let{routes:t,future:n,state:r}=e;return Xo(t,void 0,r,n)}typeof window<`u`&&window.document!==void 0&&window.document.createElement;var Fs;(function(e){e.UseScrollRestoration=`useScrollRestoration`,e.UseSubmit=`useSubmit`,e.UseSubmitFetcher=`useSubmitFetcher`,e.UseFetcher=`useFetcher`,e.useViewTransitionState=`useViewTransitionState`})(Fs||={});var Is;(function(e){e.UseFetcher=`useFetcher`,e.UseFetchers=`useFetchers`,e.UseScrollRestoration=`useScrollRestoration`})(Is||={});function Ls(){return Ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ls.apply(null,arguments)}var Rs=[`shift`,`alt`,`meta`,`mod`,`ctrl`],zs={esc:`escape`,return:`enter`,".":`period`,",":`comma`,"-":`slash`," ":`space`,"`":`backquote`,"#":`backslash`,"+":`bracketright`,ShiftLeft:`shift`,ShiftRight:`shift`,AltLeft:`alt`,AltRight:`alt`,MetaLeft:`meta`,MetaRight:`meta`,OSLeft:`meta`,OSRight:`meta`,ControlLeft:`ctrl`,ControlRight:`ctrl`};function Bs(e){return(e&&zs[e]||e||``).trim().toLowerCase().replace(/key|digit|numpad|arrow/,``)}function Vs(e){return Rs.includes(e)}function Hs(e,t){return t===void 0&&(t=`,`),e.split(t)}function Us(e,t,n){t===void 0&&(t=`+`);var r=e.toLocaleLowerCase().split(t).map(function(e){return Bs(e)}),i={alt:r.includes(`alt`),ctrl:r.includes(`ctrl`)||r.includes(`control`),shift:r.includes(`shift`),meta:r.includes(`meta`),mod:r.includes(`mod`)},a=r.filter(function(e){return!Rs.includes(e)});return Ls({},i,{keys:a,description:n,hotkey:e})}(function(){typeof document<`u`&&(document.addEventListener(`keydown`,function(e){e.key!==void 0&&qs([Bs(e.key),Bs(e.code)])}),document.addEventListener(`keyup`,function(e){e.key!==void 0&&Js([Bs(e.key),Bs(e.code)])})),typeof window<`u`&&window.addEventListener(`blur`,function(){Ws.clear()})})();var Ws=new Set;function Gs(e){return Array.isArray(e)}function Ks(e,t){return t===void 0&&(t=`,`),(Gs(e)?e:e.split(t)).every(function(e){return Ws.has(e.trim().toLowerCase())})}function qs(e){var t=Array.isArray(e)?e:[e];Ws.has(`meta`)&&Ws.forEach(function(e){return!Vs(e)&&Ws.delete(e.toLowerCase())}),t.forEach(function(e){return Ws.add(e.toLowerCase())})}function Js(e){e===`meta`?Ws.clear():(Array.isArray(e)?e:[e]).forEach(function(e){return Ws.delete(e.toLowerCase())})}function Ys(e,t,n){(typeof n==`function`&&n(e,t)||n===!0)&&e.preventDefault()}function Xs(e,t,n){return typeof n==`function`?n(e,t):n===!0||n===void 0}function Zs(e){return Qs(e,[`input`,`textarea`,`select`])}function Qs(e,t){t===void 0&&(t=!1);var n=e.target,r=e.composed,i=null;return i=$s(n)&&r?e.composedPath()[0]&&e.composedPath()[0].tagName:n&&n.tagName,Gs(t)?!!(i&&t&&t.some(function(e){return e.toLowerCase()===i?.toLowerCase()})):!!(i&&t&&t)}function $s(e){return!!e.tagName&&!e.tagName.startsWith(`-`)&&e.tagName.includes(`-`)}function ec(e,t){return e.length===0&&t?(console.warn(`A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>`),!0):t?e.some(function(e){return t.includes(e)})||e.includes(`*`):!0}var tc=function(e,t,n){n===void 0&&(n=!1);var r=t.alt,i=t.meta,a=t.mod,o=t.shift,s=t.ctrl,c=t.keys,l=e.key,u=e.code,d=e.ctrlKey,f=e.metaKey,p=e.shiftKey,m=e.altKey,h=Bs(u),g=l.toLowerCase();if(!(c!=null&&c.includes(h))&&!(c!=null&&c.includes(g))&&![`ctrl`,`control`,`unknown`,`meta`,`alt`,`shift`,`os`].includes(h))return!1;if(!n){if(r===!m&&g!==`alt`||o===!p&&g!==`shift`)return!1;if(a){if(!f&&!d)return!1}else if(i===!f&&g!==`meta`&&g!==`os`||s===!d&&g!==`ctrl`&&g!==`control`)return!1}return c&&c.length===1&&(c.includes(g)||c.includes(h))?!0:c?Ks(c):!c},nc=Cr(void 0),rc=function(){return Er(nc)};function ic(e,t){return e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,r){return n&&ic(e[r],t[r])},!0):e===t}var ac=Cr({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),oc=function(){return Er(ac)};function sc(e){var t=kr(void 0);return ic(t.current,e)||(t.current=e),t.current}var cc=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},lc=typeof window<`u`?Dr:V;function uc(e,t,n,r){var i=Ar(null),a=i[0],o=i[1],s=kr(!1),c=n instanceof Array?r instanceof Array?void 0:r:n,l=Gs(e)?e.join(c?.splitKey):e,u=n instanceof Array?n:r instanceof Array?r:void 0,d=Tr(t,u??[]),f=kr(d);u?f.current=d:f.current=t;var p=sc(c),m=oc().enabledScopes,h=rc();return lc(function(){if(!(p?.enabled===!1||!ec(m,p?.scopes))){var e=function(e,t){var n;if(t===void 0&&(t=!1),!(Zs(e)&&!Qs(e,p?.enableOnFormTags))){if(a!==null){var r=a.getRootNode();if((r instanceof Document||r instanceof ShadowRoot)&&r.activeElement!==a&&!a.contains(r.activeElement)){cc(e);return}}(n=e.target)!=null&&n.isContentEditable&&!(p!=null&&p.enableOnContentEditable)||Hs(l,p?.splitKey).forEach(function(n){var r,i=Us(n,p?.combinationKey);if(tc(e,i,p?.ignoreModifiers)||(r=i.keys)!=null&&r.includes(`*`)){if(p!=null&&p.ignoreEventWhen!=null&&p.ignoreEventWhen(e)||t&&s.current)return;if(Ys(e,i,p?.preventDefault),!Xs(e,i,p?.enabled)){cc(e);return}f.current(e,i),t||(s.current=!0)}})}},t=function(t){t.key!==void 0&&(qs(Bs(t.code)),(p?.keydown===void 0&&p?.keyup!==!0||p!=null&&p.keydown)&&e(t))},n=function(t){t.key!==void 0&&(Js(Bs(t.code)),s.current=!1,p!=null&&p.keyup&&e(t,!0))},r=a||c?.document||document;return r.addEventListener(`keyup`,n,c?.eventListenerOptions),r.addEventListener(`keydown`,t,c?.eventListenerOptions),h&&Hs(l,p?.splitKey).forEach(function(e){return h.addHotkey(Us(e,p?.combinationKey,p?.description))}),function(){r.removeEventListener(`keyup`,n,c?.eventListenerOptions),r.removeEventListener(`keydown`,t,c?.eventListenerOptions),h&&Hs(l,p?.splitKey).forEach(function(e){return h.removeHotkey(Us(e,p?.combinationKey,p?.description))})}}},[a,l,p,m]),o}var dc=Cr(null),fc={didCatch:!1,error:null},pc=class extends br{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=fc}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){let{error:e}=this.state;if(e!==null){var t,n,r=[...arguments];(t=(n=this.props).onReset)==null||t.call(n,{args:r,reason:`imperative-api`}),this.setState(fc)}}componentDidCatch(e,t){var n,r;(n=(r=this.props).onError)==null||n.call(r,e,t)}componentDidUpdate(e,t){let{didCatch:n}=this.state,{resetKeys:r}=this.props;if(n&&t.error!==null&&mc(e.resetKeys,r)){var i,a;(i=(a=this.props).onReset)==null||i.call(a,{next:r,prev:e.resetKeys,reason:`keys`}),this.setState(fc)}}render(){let{children:e,fallbackRender:t,FallbackComponent:n,fallback:r}=this.props,{didCatch:i,error:a}=this.state,o=e;if(i){let e={error:a,resetErrorBoundary:this.resetErrorBoundary};if(typeof t==`function`)o=t(e);else if(n)o=wr(n,e);else if(r!==void 0)o=r;else throw a}return wr(dc.Provider,{value:{didCatch:i,error:a,resetErrorBoundary:this.resetErrorBoundary}},o)}};function mc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}var hc=`${I.routerBasename}:acceptedCookies`,gc=new Set,_c=vc();function vc(){try{let e=localStorage.getItem(hc);return e?JSON.parse(e):{analytics:!1,marketing:!1,functional:!1}}catch{return{analytics:!1,marketing:!1,functional:!1}}}function yc(){return _c}function bc(e){_c=e(_c),localStorage.setItem(hc,JSON.stringify(_c)),gc.forEach(e=>e())}function xc(e){return gc.add(e),()=>gc.delete(e)}var Sc=()=>[jr(xc,yc,yc),bc],Cc=[];function wc(){let e=M();return jr(t=>e?.subscribePending(t)??(()=>{}),()=>e?.getPendingInstallations()??Cc)}var Tc=`${I.routerBasename}:display-cookie-banner`,Ec=new Set,Dc=Oc();function Oc(){try{return localStorage.getItem(Tc)!==`false`}catch(e){return console.error(e),!0}}function kc(){return Dc}function Ac(e){Dc=e,localStorage.setItem(Tc,JSON.stringify(e))}function jc(e){return Ec.add(e),()=>Ec.delete(e)}var Mc=()=>[jr(jc,kc,kc),Ac],Nc=l([`sentry`]),Pc=!1;async function Fc(){return await F(()=>import(`./esm-C3z6RsQv.js`),__vite__mapDeps([0,1]))}async function Ic(){I.sentry;let e=await Fc(),t=[e.httpClientIntegration(),e.extraErrorDataIntegration({depth:5}),e.replayIntegration(),e.captureConsoleIntegration({levels:[`error`]})];I.sentry.tracing&&t.push(e.reactRouterV6BrowserTracingIntegration({useEffect:yr.useEffect,useLocation:Ho,useNavigationType:Uo,createRoutesFromChildren:vs,matchRoutes:Wi})),e.init({release:I.sentry.release,dsn:I.sentry.dsn,environment:I.sentry.env,integrations:t,ignoreErrors:[`User is not allowed to create files`,`User is not allowed to move documents`,`The user aborted a request.`],sendDefaultPii:!0,tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,beforeSend(e,t){let n=t.originalException;return n instanceof TypeError&&n.message.includes(`Failed to fetch`)&&!navigator.onLine?null:e}}),Pc=!0}async function Lc(){if(Pc)return(await Fc()).getClient()?.close()}function Rc(){let[e]=Sc(),{analytics:t}=e;V(()=>{if(!t){Lc().catch(e=>Nc.error(`@error`,e));return}Pc||!I.sentry.dsn||I.sentry.dsn===``||Ic().catch(e=>Nc.error(`@error`,e))},[t])}var zc=e=>{let{undo:t,redo:n,canRedo:r,canUndo:i}=e,a=window.navigator.userAgent.includes(`Mac`),o=`ctrl+z`,s=`ctrl+y`;a&&(o=`mod+z`,s=`mod+shift+z`),uc(o,e=>{e.preventDefault(),i&&t()},{},[i,t]),uc(s,e=>{e.preventDefault(),r&&n()},{},[r,n])};function Bc(...e){window.dataLayer?.push(...e)}var Vc=()=>{let e=I.gaTrackingId,[{analytics:t}]=Sc(),n=e&&t;return V(()=>{if(n){let t=document.createElement(`script`);return t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,t.async=!0,document.head.appendChild(t),window.dataLayer=window.dataLayer||[],Bc(`js`,new Date),Bc(`config`,e),()=>{document.head.removeChild(t)}}},[n,e]),null};function Hc(){let[e]=re(),t=se(e.header.id),n=Tr(()=>{b(e).length?m({type:`exportDocumentWithErrors`,documentId:e.header.id}):ne(e).catch(e=>{console.error(e),me(`Failed to export document: ${e instanceof Error?e.message:JSON.stringify(e,null,1)}`)})},[e]),r=Or(()=>async()=>{},[]),i=Tr(()=>{_(t)},[t,_]);return H(`div`,{id:`document-editor-container`,className:`flex-1`,"data-document-type":e.header.documentType,children:H(ru,{document:e,onClose:i,onExport:n,onOpenSwitchboardLink:r})})}function Uc(e){let[t,n]=Ar(!1);if(V(()=>{setTimeout(()=>{n(!0)},e.loadingTimeout??200)},[e]),!t)return null;let{customEditorLoader:r,...i}=e;return r?H(Mr,{children:r}):H(Le,{...i})}var Wc=l([`Connect`]);function Gc(e){return`fallbackRender`in e}function Kc(){return null}function qc({message:e=`Something went wrong`}){return H(`div`,{className:`text-center`,children:e})}function Jc({error:e,resetErrorBoundary:t}){let n=e instanceof Error?e.message:String(e),r=e instanceof Error?e.stack??String(e.cause):JSON.stringify(e,null,2);return H(`div`,{className:`z-10 mx-auto flex max-w-[80%] flex-1 items-center justify-center p-6`,children:U(`div`,{className:`w-full max-w-lg rounded-lg border border-gray-500 bg-white p-6 shadow-sm`,children:[U(`div`,{className:`mb-3 flex items-center gap-2`,children:[H(fe,{name:`Error`,className:`size-5 shrink-0`}),H(`h1`,{className:`text-lg font-semibold`,children:`Something went wrong`})]}),H(`p`,{className:`mb-4 text-sm text-gray-700`,children:n}),r!==`{}`&&U(`details`,{className:`group`,children:[H(`summary`,{className:`cursor-pointer select-none text-sm font-medium text-gray-700 underline hover:text-gray-700`,children:`Show details`}),H(`pre`,{className:`mt-2 max-h-48 overflow-auto rounded bg-gray-100 p-3 text-xs`,children:r})]}),H(pe,{type:`button`,onClick:t,className:`text-md mt-4 px-3 py-1.5 font-medium`,children:`Try again`})]})})}function Yc({error:e}){return H(`div`,{className:`flex size-full items-center justify-center`,children:H(`h3`,{className:`text-lg font-semibold`,children:e instanceof Error?e.message:String(e)})})}function Xc(e,t){switch(e){case`silent`:return Kc;case`text`:return()=>H(qc,{message:t});case`detailed`:return Jc;default:return Yc}}function Zc(e){let{children:t,onError:n,resetKeys:r,loggerContext:i}=e;return H(pc,{fallbackRender:Gc(e)?e.fallbackRender:Xc(e.variant,e.fallbackMessage),onError:(e,t)=>{if(e.message.includes(`Failed to fetch dynamically imported module`)&&e.message.includes(`node_modules/.vite`)){console.error(e),console.log(`Outdated chunk detected, reloading page...`),window.location.reload();return}(i?l(i):Wc).error(`@error @info`,e,t),n?.(e,t)},resetKeys:r,children:t})}function Qc(){let[e]=j(),t=A(),n=y(e.header.meta?.preferredEditor),r=p(),i=n?.Component??r?.Component??R.Component;if(!i)throw Error(`No app component found`);return H(Zc,{variant:`detailed`,resetKeys:[e.header.id],loggerContext:[`Connect`,`App`],children:H(Sr,{fallback:H(Uc,{}),children:H(Ne,{className:`flex h-full flex-col overflow-auto`,children:H(i,{children:t?H(Hc,{}):null})})})})}function $c(){return typeof document>`u`?`/`:document.querySelector(`base`)?.getAttribute(`href`)||`/`}var el=null,tl=new Set;function nl(e){el=e;for(let e of tl)e()}function rl(){return el}function il(e){return tl.add(e),()=>{tl.delete(e)}}var al=`ph-pglite-backup::`,ol=`ph:pglite-backups`,sl=720*60*60*1e3,cl={16:async()=>{let[{PGlite:e},{pgDump:t}]=await Promise.all([F(()=>import(`./dist-ClzcOFHf.js`),__vite__mapDeps([2,1,3,4,5,6,7])),F(()=>import(`./pg_dump-DpLFvU0N.js`),__vite__mapDeps([8,1,3]))]);return async n=>{let r=new e(`idb://${n.replace(/^\/pglite\//,``)}`);try{return await r.waitReady,await(await t({pg:r})).text()}finally{await r.close()}}}};function ll(e,t=15e3){return new Promise((n,r)=>{let i=indexedDB.deleteDatabase(e),a=!1,o=e=>{a||(a=!0,e())},s=setTimeout(()=>o(()=>r(Error(`IDB delete timed out for ${e} after ${t}ms`))),t);i.onsuccess=()=>o(()=>{clearTimeout(s),n()}),i.onerror=()=>o(()=>{clearTimeout(s),r(be(i,`IDB delete failed for ${e}`))})})}async function ul(e){let t=await xe(e,21,Ce);try{await new Promise((n,r)=>{let i=t.transaction(L,`readwrite`);i.oncomplete=()=>n(),i.onerror=()=>r(be(i,`FILE_DATA clear failed for ${e}`)),i.onabort=()=>r(be(i,`FILE_DATA clear aborted for ${e}`)),i.objectStore(L).clear()})}finally{t.close()}}async function dl(e,t){let n=await xe(e,21,Ce);try{let r=await xe(t,21,Ce);try{let i=n.transaction(L,`readonly`).objectStore(L),a=await new Promise((t,n)=>{let r=[],a=i.openCursor();a.onerror=()=>n(be(a,`FILE_DATA read cursor failed for ${e}`)),a.onsuccess=()=>{let e=a.result;if(!e)return t(r);r.push({key:e.key,value:e.value}),e.continue()}});await new Promise((e,n)=>{let i=r.transaction(L,`readwrite`);i.oncomplete=()=>e(),i.onerror=()=>n(be(i,`FILE_DATA write failed for ${t}`)),i.onabort=()=>n(be(i,`FILE_DATA write aborted for ${t}`));let o=i.objectStore(L);o.clear();for(let{key:e,value:t}of a)o.put(t,e)})}finally{r.close()}}finally{n.close()}}function fl(){try{let e=localStorage.getItem(ol);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function pl(e){try{localStorage.setItem(ol,JSON.stringify(e))}catch{}}function ml(e){pl([...fl(),e])}function hl(e){pl(fl().filter(t=>t.name!==e))}async function gl(){let e=Date.now()-sl,t=[];for(let n of fl()){if(n.createdAt>=e){t.push(n);continue}try{await ll(n.name)}catch(e){console.warn(`Failed to delete expired pglite backup ${n.name}`,e),t.push(n)}}pl(t)}function _l(e,t){nl({idbName:e,phase:t})}async function vl(e){let t=await we(e);if(t===null||t===17)return;let n=cl[t];if(!n)throw Error(`Unsupported legacy PGlite data dir: PG_VERSION=${t} for ${e}`);let r=`${al}${e}::${new Date().toISOString()}`,i={name:r,idbName:e,createdAt:Date.now()};_l(e,`clone`),await dl(e,r),ml(i);let a;try{_l(e,`dump`),a=await(await n())(e)}catch(e){throw await ll(r).catch(()=>{}),hl(r),e}try{await ul(e),_l(e,`restore`);let t=new He(`idb://${e.replace(/^\/pglite\//,``)}`,{relaxedDurability:!1});try{await t.waitReady,console.info(`[pglite-migration] Dump preamble (first 500 chars):\n${a.slice(0,500)}`);try{await t.exec(`SET standard_conforming_strings = off;`)}catch(e){console.warn(`[pglite-migration] Could not force standard_conforming_strings=off`,e)}try{await t.exec(a)}catch(t){throw yl(e,a,t),t}}finally{await t.close()}}catch(t){throw await bl(e,r,t),t}}function yl(e,t,n){let r=n,i=typeof r.position==`string`?parseInt(r.position,10):typeof r.position==`number`?r.position:NaN;if(console.error(`[pglite-migration] Restore failed for ${e}`,{message:r.message,code:r.code,severity:r.severity,detail:r.detail,where:r.where,position:r.position,sqlLength:t.length}),Number.isFinite(i)&&i>0){let e=i-1,n=Math.max(0,e-200),r=Math.min(t.length,e+200),a=t.slice(n,e),o=t.slice(e,e+1),s=t.slice(e+1,r);console.error(`[pglite-migration] SQL context around position ${i}:\n${a}»${o}«${s}`);let c=t.lastIndexOf(`
|
|
37
37
|
`,e)+1,l=t.indexOf(`
|
|
38
|
-
`,e),u=t.slice(c,l===-1?t.length:l);console.error(`[pglite-migration] Failing line (truncated to 500 chars):\n${u.slice(0,500)}`)}else console.error(`[pglite-migration] No position info. First 2000 chars of dump:\n${t.slice(0,2e3)}`)}async function
|
|
38
|
+
`,e),u=t.slice(c,l===-1?t.length:l);console.error(`[pglite-migration] Failing line (truncated to 500 chars):\n${u.slice(0,500)}`)}else console.error(`[pglite-migration] No position info. First 2000 chars of dump:\n${t.slice(0,2e3)}`)}async function bl(e,t,n){try{await ul(e).catch(()=>{}),await dl(t,e)}catch(t){console.error(`PGlite migration failed AND rollback failed for ${e}. Primary error:`,n,`Rollback error:`,t);return}await ll(t).catch(()=>{}),hl(t)}async function xl(){for(let e of Te)await vl(e);nl(null)}async function Sl(){if(gl().catch(e=>console.warn(`PGlite backup janitor failed`,e)),!(typeof navigator<`u`&&`locks`in navigator&&typeof navigator.locks.request==`function`)){await xl();return}await navigator.locks.request(`ph-pglite-migration`,{mode:`exclusive`},async()=>{await xl()})}var Cl=250,wl={clone:`Backing up local database…`,dump:`Exporting data from previous version…`,restore:`Restoring data into the new database…`},Tl=()=>{let e=jr(il,rl,()=>null);return e?H(`div`,{className:`absolute inset-0 z-20 flex items-center justify-center`,children:U(`div`,{className:`rounded-lg bg-white/90 px-6 py-4 text-sm text-gray-900 shadow-lg`,children:[H(`div`,{className:`font-medium`,children:`Upgrading local database…`}),H(`div`,{className:`text-gray-600`,children:wl[e.phase]})]})}):null},El=({delay:e=Cl})=>{let t=typeof window>`u`,n=typeof document<`u`&&document.body.getAttribute(`data-show-loader`)===`true`,[r,i]=Ar(!e||n);return V(()=>{let t=setTimeout(()=>{i(!0)},e);return()=>clearTimeout(t)},[]),U(`div`,{className:`skeleton-loader absolute inset-0 z-10 flex items-center justify-center ${r?``:`hidden`}`,children:[H(`div`,{className:`animate-pulse overflow-hidden rounded-full shadow-lg`,children:H(Re,{})}),t?H(`script`,{dangerouslySetInnerHTML:{__html:`setTimeout(() => {
|
|
39
39
|
document.querySelector('.skeleton-loader')?.classList.remove('hidden');
|
|
40
40
|
document.body.setAttribute('data-show-loader', 'true');
|
|
41
|
-
}, ${e})`}}):null]})},
|
|
41
|
+
}, ${e})`}}):null]})},Dl=e=>{let t=typeof window>`u`,n=!t&&window.location.pathname===$c();return U(`div`,{className:`flex h-screen overflow-hidden`,children:[H(Fe,{className:`animate-pulse`,onLogin:void 0,onDisconnect:void 0,onClickSettings:void 0,address:void 0}),H(Ve,{containerClassName:t||!n?`hidden home-screen`:void 0,children:e.children??null}),t?H(`script`,{dangerouslySetInnerHTML:{__html:`
|
|
42
42
|
const baseEl = document.querySelector('base');
|
|
43
43
|
const href = baseEl?.getAttribute('href');
|
|
44
44
|
const basePath = href || '/';
|
|
45
45
|
if (window.location.pathname === basePath) {
|
|
46
46
|
document.querySelector('.home-screen')?.classList.remove('hidden')
|
|
47
|
-
}`}}):null,e.children?null:H(wl,{}),H(Cl,{})]})},El=!1,Dl=new Set;function Ol(){for(let e of Dl)e()}function kl(){El=!0,Ol()}function Al(e){return Dl.add(e),()=>{Dl.delete(e)}}function jl(){return El}var Ml=()=>{let e=kr(Al,jl,()=>!1),t=kr(Se,Te,()=>void 0),[n,r]=Or(!1),[i,a]=Or(null);return t==null||t===17||e?null:H(`div`,{className:`absolute inset-x-0 top-0 z-30 flex justify-center p-3`,children:U(`div`,{className:`flex max-w-3xl items-center gap-3 rounded-lg border border-yellow-500 bg-yellow-400 px-4 py-3 text-sm text-gray-900 shadow-lg`,children:[U(`div`,{className:`flex-1`,children:[U(`div`,{className:`font-semibold`,children:[`Your local database uses Postgres `,t,`.`]}),U(`div`,{className:`text-gray-800`,children:[`Migrate to Postgres `,17,` to pick up the latest features. Your data will be backed up first.`]}),i&&U(`div`,{className:`mt-2 font-medium text-red-900`,children:[`Migration failed: `,i]})]}),H(`button`,{type:`button`,disabled:n,onClick:()=>{a(null),r(!0),bl().then(()=>{window.location.reload()}).catch(e=>{a(e instanceof Error?e.message:String(e)),r(!1)})},className:`rounded bg-gray-900 px-3 py-1 text-sm font-medium text-white hover:bg-gray-800 disabled:opacity-50`,children:n?`Migrating…`:`Migrate now`}),H(`button`,{type:`button`,disabled:n,onClick:kl,className:`rounded border border-gray-900 bg-transparent px-3 py-1 text-sm font-medium text-gray-900 hover:bg-gray-900/10 disabled:opacity-50`,children:`Dismiss`})]})})},Nl=B(()=>F(()=>import(`./AddDriveModal-CBbXwG8S-CMtP_pYy.js`).then(e=>({default:e.AddDriveModal})),__vite__mapDeps([9,10,1,3,11,12,13,14,15,16,17,18,19,20]))),Pl=B(()=>F(()=>import(`./ClearStorageModal-DwiCY6Lt-BX6HLKHK.js`).then(e=>({default:e.ClearStorageModal})),__vite__mapDeps([21,10,1,3,11,12,13,14,15,16,17,18,22,23,24,19,25,26,27,28,29,30,31,32,33,34,35,36,37]))),Fl=B(()=>F(()=>import(`./CookiesPolicyModal-CTXUu4-8-CDv9A_Ye.js`).then(e=>({default:e.CookiesPolicyModal})),__vite__mapDeps([38,10,1,3,11,12,13,14,15,16,17,18,39,20,37]))),Il=B(()=>F(()=>import(`./CreateDocumentModal-CAld-5pv-CgcRndoo.js`).then(e=>({default:e.CreateDocumentModal})),__vite__mapDeps([40,10,1,3,11,12,13,14,15,16,17,18]))),Ll=B(()=>F(()=>import(`./DebugSettingsModal-DeZ-x8H3-kFKY1yIP.js`).then(e=>({default:e.DebugSettingsModal})),__vite__mapDeps([41,10,1,3,11,12,13,14,15,16,17,18,23,42]))),Rl=B(()=>F(()=>import(`./DeleteDriveModal-B7T2CVIX-Ij3dGsPx.js`).then(e=>({default:e.DeleteDriveModal})),__vite__mapDeps([43,10,1,3,11,12,13,14,15,16,17,18,19,37]))),zl=B(()=>F(()=>import(`./DeleteItemModal-DJv71YQG-CVtPVgc9.js`).then(e=>({default:e.DeleteItemModal})),__vite__mapDeps([44,10,1,3,11,12,13,14,15,16,17,18,19,37]))),Bl=B(()=>F(()=>import(`./DisclaimerModal-Co13N7HH-DNe510Y-.js`).then(e=>({default:e.DisclaimerModal})),__vite__mapDeps([45,10,1,3,11,12,13,14,15,16,17,18,37]))),Vl=B(()=>F(()=>import(`./DriveSettingsModal-DmsUU0g3-CAC1UDo_.js`).then(e=>({default:e.DriveSettingsModal})),__vite__mapDeps([46,10,1,3,11,12,13,14,15,16,17,18]))),Hl=B(()=>F(()=>import(`./ExportDocumentWithErrorsModal-DOV_UVlM-CuR2gzWI.js`).then(e=>({default:e.ExportDocumentWithErrorsModal})),__vite__mapDeps([47,10,1,3,11,12,13,14,15,16,17,18,37]))),Ul=B(()=>F(()=>import(`./SettingsModal-BzvCwJLZ-YPWkTKes.js`).then(e=>({default:e.SettingsModal})),__vite__mapDeps([48,10,1,3,11,12,13,14,15,16,17,18,23,49,19,50,20]))),Wl=B(()=>F(()=>import(`./UpgradeDriveModal-BH4ecdCU-Ds9YPtnh.js`).then(e=>({default:e.UpgradeDriveModal})),__vite__mapDeps([51,10,1,3,11,12,13,14,15,16,17,18,37]))),Gl={addDrive:Nl,clearStorage:Pl,cookiesPolicy:Fl,createDocument:Il,debugSettings:Ll,deleteDrive:Rl,deleteItem:zl,disclaimer:Bl,driveSettings:Vl,exportDocumentWithErrors:Hl,inspector:B(()=>F(()=>import(`./InspectorModal-NoO3f3U7-CJAiPdEE.js`).then(e=>({default:e.InspectorModal})),__vite__mapDeps([52,10,1,3,11,12,13,14,15,16,17,18,22,23,24,19,25,26,27,28,29,30,31,32,33,34,35,36,53]))),settings:Ul,upgradeDrive:Wl,missingPackage:B(()=>F(()=>import(`./MissingPackageModal-Df154H9n-CBAwY4mw.js`).then(e=>({default:e.ConnectMissingPackageModal})),__vite__mapDeps([54,10,1,3,11,12,13,14,15,16,17,18,50])))},Kl=B(async()=>({default:()=>{let e=O();if(!e?.type)return null;let t=Gl[e.type];return t?H(Yc,{variant:`silent`,loggerContext:[`Connect`,`Modals`],children:H(br,{fallback:null,children:H(t,{})})}):null}})),ql=e=>{let t=B(()=>F(()=>import(`./load-C0mYtbHx-C7vYfEJ_.js`).then(t=>t.loadComponent(e.localPackage)),__vite__mapDeps([55,13,1,3,11,14,22,23,17,24,19,12,25,26,27,28,29,30,31,32,33,34,35,36,49,53,0,37])));return H(yr,{children:U(Yc,{fallbackRender:e=>H(Tl,{children:H(Kc,{...e})}),resetKeys:[e.localPackage],loggerContext:[`Connect`],children:[H(br,{fallback:H(Tl,{}),name:`AppLoader`,children:H(t,{...e,children:H(Xl,{})})}),H(br,{name:`CookieBanner`,children:H(Ql,{})}),H(br,{name:`ModalsContainer`,children:H(Kl,{})}),H(Ml,{})]})})},Jl=({children:e})=>(Ic(),e);function Yl(){let e=Sc(),t=M();return!t||e.length===0?null:H(Ae,{pendingInstallations:e.flatMap(e=>e.packageNames.map(t=>({documentType:e.documentType,packageName:t}))),onInstall:e=>t.approveInstallation(e),onDismiss:e=>t.dismissInstallation(e)})}var Xl=()=>(V(()=>{let e=e=>{let t=e.payload,n=(t instanceof Error?t.message:String(t??``)).match(/https?:\/\/[^\s"']+/)?.[0];if(n&&!n.startsWith(window.location.origin)){console.debug(`[Connect] Skipping reload — vite:preloadError for off-origin URL: ${n}`);return}console.log(`Outdated chunks detected, reloading page...`),window.location.reload()};return window.addEventListener(`vite:preloadError`,e),()=>{window.removeEventListener(`vite:preloadError`,e)}},[]),V(()=>{De.registerServiceWorker(!1)},[]),U(Jl,{children:[H(he,{position:`bottom-right`}),H(hu,{}),H(Yl,{}),H(zc,{})]})),Zl=(e,t)=>e.some(e=>e.id===t&&e.value),Ql=()=>{let{t:e}=ye(void 0,{useSuspense:!0,i18n:ge}),[t,n]=Ac(),[,r]=bc(),i=[{id:`analytics-cookie`,label:e(`cookieBanner.cookies.analytics`),value:!0}];return t?U(`div`,{className:`absolute inset-0 z-[10000] backdrop-blur-sm`,children:[H(`div`,{className:`absolute inset-0 bg-black opacity-15`}),H(`div`,{className:`absolute inset-x-0 bottom-0 flex justify-center bg-white px-10 pb-16 pt-10 shadow-lg`,children:H(ze,{className:`max-w-[1024px]`,cookies:i,onSubmit:e=>{n(!1),Zl(e,`analytics-cookie`)&&r(e=>({...e,analytics:!0}))},onReject:()=>{n(!1),r(()=>({analytics:!1,functional:!1,marketing:!1}))},submitLabel:e(`cookieBanner.accept`),rejectLabel:e(`cookieBanner.reject`),children:H(`p`,{className:`font-semibold text-gray-500`,children:H(_e,{i18nKey:`cookieBanner.message`,components:{a:H(`a`,{onClick:()=>m({type:`cookiesPolicy`}),className:`cursor-pointer text-gray-900 hover:underline`},`cookieBanner.message-link`)}},`cookieBanner.message`)})})})]}):null};function $l({drive:e}){let t=k(),n=Er(()=>e?t.some(t=>t.collectionId===i(`main`,e.header.id)):!1,[t,e]),r=e?.state.global.icon;return r?H(`img`,{src:r,alt:e.header.name,height:32,width:32}):n?H(fe,{name:`Server`,size:32}):H(fe,{name:`Hdd`,size:32})}function eu({message:e}){return H(`div`,{className:`flex size-full items-center justify-center`,children:H(`h3`,{className:`text-lg font-semibold`,children:e})})}var tu=e=>{let{document:t,onClose:n,onExport:r,onOpenSwitchboardLink:i}=e,a=N(),o=le(),[c,l]=g(t.header.id),u=c?.header.id??void 0,f=c?.header.name??void 0,p=c?.header.documentType??void 0,h=c?.header.meta?.preferredEditor??void 0,{globalOperations:_,localOperations:v,isLoading:y,refetch:b}=w(u);V(()=>{o&&b()},[o,b]);let x=c?.header.revision.global??0,S=c?.header.revision.local??0,E=C(p),ee=T(h),O=D(p),k=ee??O,te=!c,ne=k&&p&&!k.documentTypes.includes(p)&&!k.documentTypes.includes(`*`);Lc({undo:()=>l(d()),redo:()=>l(s()),canUndo:x>0||S>0,canRedo:!!c?.clipboard.length}),V(()=>()=>{window.documentEditorDebugTools?.clear()},[]);let[re,A]=Or(void 0);V(()=>{re&&re.documentId!==u&&A(void 0)},[re,u]);let ae=(e,t)=>{A({error:e,documentId:u,info:t})};if(ne)return H(Vc,{message:`Loading editor`});if(te)return H(Vc,{message:`Loading document`});if(!E)return H(eu,{message:U(`div`,{className:`text-center leading-10`,children:[U(`p`,{children:[`Unable to open the document because the document model "`,p,`" is not supported.`]}),U(`p`,{children:[`Go to the`,` `,H(`button`,{type:`button`,className:`cursor-pointer underline`,onClick:()=>{m({type:`settings`})},children:`package manager`}),` `,`to install this document model`]})]})});if(!k)return H(eu,{message:U(`div`,{className:`text-center leading-10`,children:[H(`p`,{children:`Unable to open the document because no editor has been found`}),U(`p`,{children:[`Go to the`,` `,H(`button`,{type:`button`,className:`cursor-pointer underline`,onClick:()=>{m({type:`settings`})},children:`package manager`}),` `,`an editor for the "$`,p,`" document type`]})]})});let j=k.Component;return H(`div`,{className:`relative h-full`,id:`document-editor-context`,"data-editor":k.config.id,"data-document-type":p,children:o?y?H(Vc,{message:`Loading operations`}):H(je,{documentTitle:f??``,documentId:u??``,globalOperations:_,localOperations:v,onClose:()=>oe(!1),documentState:c.state,onCopyState:()=>{me(`Copied document state to clipboard`,{type:`success`})},onCopyDocId:()=>{me(`Copied document ID to clipboard`,{type:`success`})}},u):H(br,{fallback:H(Vc,{message:`Loading editor`}),name:`EditorLoader`,children:H(Yc,{fallbackRender:qc,resetKeys:[u],onError:ae,loggerContext:[`Connect`,`DocumentEditor`],children:!re?.error&&H(j,{context:{readMode:!!a,selectedTimelineRevision:ie(a?.startDate,a?.endDate,_)},documentId:c.header.id},u)})})})};function nu(){return H(`div`,{className:`h-screen`,children:H(`div`,{className:`flex h-screen items-stretch overflow-auto`,role:`presentation`,tabIndex:0,children:U(br,{name:`Root`,children:[H(gu,{}),H(`div`,{className:`relative flex-1 overflow-auto`,children:H(fs,{})})]})})})}function ru(){let[e]=ae(),t=ee(),n=A();return V(()=>{n||f(de)},[n]),V(()=>{e||x(ue)},[e]),H(iu,{children:H(!n&&!e&&!t?ou:Xc,{})})}function iu({children:e}){return H(`div`,{className:`flex h-full flex-col overflow-auto`,id:`content-view`,children:e})}function au({drive:e}){let t=y(e.header.meta?.preferredEditor)?.config.name||`Drive Explorer App`;return H(Be,{title:e.state.global.name||e.header.name,description:t,icon:H($l,{drive:e}),onClick:()=>h(e)},e.header.id)}function ou(){let e=E(),t=I;return U(Ve,{children:[e?.map(e=>H(au,{drive:e},e.header.id)),t.drives.addDriveEnabled&&H(Pe,{})]})}var su=`https://apps.powerhouse.io/sky-atlas/staging/switchboard`,cu=2e3;function lu(){let{search:e}=Bo();return Er(()=>{let t=new URLSearchParams(e).get(`reactorUrl`)??su;return t.endsWith(`/`)?t:`${t}/`},[e])}async function uu(e,t){let n=ki`
|
|
47
|
+
}`}}):null,e.children?null:H(El,{}),H(Tl,{})]})},Ol=!1,kl=new Set;function Al(){for(let e of kl)e()}function jl(){Ol=!0,Al()}function Ml(e){return kl.add(e),()=>{kl.delete(e)}}function Nl(){return Ol}var Pl=()=>{let e=jr(Ml,Nl,()=>!1),t=jr(Se,Ee,()=>void 0),[n,r]=Ar(!1),[i,a]=Ar(null);return t==null||t===17||e?null:H(`div`,{className:`absolute inset-x-0 top-0 z-30 flex justify-center p-3`,children:U(`div`,{className:`flex max-w-3xl items-center gap-3 rounded-lg border border-yellow-500 bg-yellow-400 px-4 py-3 text-sm text-gray-900 shadow-lg`,children:[U(`div`,{className:`flex-1`,children:[U(`div`,{className:`font-semibold`,children:[`Your local database uses Postgres `,t,`.`]}),U(`div`,{className:`text-gray-800`,children:[`Migrate to Postgres `,17,` to pick up the latest features. Your data will be backed up first.`]}),i&&U(`div`,{className:`mt-2 font-medium text-red-900`,children:[`Migration failed: `,i]})]}),H(`button`,{type:`button`,disabled:n,onClick:()=>{a(null),r(!0),Sl().then(()=>{window.location.reload()}).catch(e=>{a(e instanceof Error?e.message:String(e)),r(!1)})},className:`rounded bg-gray-900 px-3 py-1 text-sm font-medium text-white hover:bg-gray-800 disabled:opacity-50`,children:n?`Migrating…`:`Migrate now`}),H(`button`,{type:`button`,disabled:n,onClick:jl,className:`rounded border border-gray-900 bg-transparent px-3 py-1 text-sm font-medium text-gray-900 hover:bg-gray-900/10 disabled:opacity-50`,children:`Dismiss`})]})})},Fl=B(()=>F(()=>import(`./AddDriveModal-CBbXwG8S-CMtP_pYy.js`).then(e=>({default:e.AddDriveModal})),__vite__mapDeps([9,10,1,3,11,12,13,14,15,16,17,18,19,20]))),Il=B(()=>F(()=>import(`./ClearStorageModal-DwiCY6Lt-BX6HLKHK.js`).then(e=>({default:e.ClearStorageModal})),__vite__mapDeps([21,10,1,3,11,12,13,14,15,16,17,18,22,23,24,19,25,26,27,28,29,30,31,32,33,34,35,36,37]))),Ll=B(()=>F(()=>import(`./CookiesPolicyModal-CTXUu4-8-CDv9A_Ye.js`).then(e=>({default:e.CookiesPolicyModal})),__vite__mapDeps([38,10,1,3,11,12,13,14,15,16,17,18,39,20,37]))),Rl=B(()=>F(()=>import(`./CreateDocumentModal-CAld-5pv-CgcRndoo.js`).then(e=>({default:e.CreateDocumentModal})),__vite__mapDeps([40,10,1,3,11,12,13,14,15,16,17,18]))),zl=B(()=>F(()=>import(`./DebugSettingsModal-DeZ-x8H3-kFKY1yIP.js`).then(e=>({default:e.DebugSettingsModal})),__vite__mapDeps([41,10,1,3,11,12,13,14,15,16,17,18,23,42]))),Bl=B(()=>F(()=>import(`./DeleteDriveModal-B7T2CVIX-Ij3dGsPx.js`).then(e=>({default:e.DeleteDriveModal})),__vite__mapDeps([43,10,1,3,11,12,13,14,15,16,17,18,19,37]))),Vl=B(()=>F(()=>import(`./DeleteItemModal-DJv71YQG-CVtPVgc9.js`).then(e=>({default:e.DeleteItemModal})),__vite__mapDeps([44,10,1,3,11,12,13,14,15,16,17,18,19,37]))),Hl=B(()=>F(()=>import(`./DisclaimerModal-Co13N7HH-DNe510Y-.js`).then(e=>({default:e.DisclaimerModal})),__vite__mapDeps([45,10,1,3,11,12,13,14,15,16,17,18,37]))),Ul=B(()=>F(()=>import(`./DriveSettingsModal-DmsUU0g3-CAC1UDo_.js`).then(e=>({default:e.DriveSettingsModal})),__vite__mapDeps([46,10,1,3,11,12,13,14,15,16,17,18]))),Wl=B(()=>F(()=>import(`./ExportDocumentWithErrorsModal-DOV_UVlM-CuR2gzWI.js`).then(e=>({default:e.ExportDocumentWithErrorsModal})),__vite__mapDeps([47,10,1,3,11,12,13,14,15,16,17,18,37]))),Gl=B(()=>F(()=>import(`./SettingsModal-BzvCwJLZ-YPWkTKes.js`).then(e=>({default:e.SettingsModal})),__vite__mapDeps([48,10,1,3,11,12,13,14,15,16,17,18,23,49,19,50,20]))),Kl=B(()=>F(()=>import(`./UpgradeDriveModal-BH4ecdCU-Ds9YPtnh.js`).then(e=>({default:e.UpgradeDriveModal})),__vite__mapDeps([51,10,1,3,11,12,13,14,15,16,17,18,37]))),ql={addDrive:Fl,clearStorage:Il,cookiesPolicy:Ll,createDocument:Rl,debugSettings:zl,deleteDrive:Bl,deleteItem:Vl,disclaimer:Hl,driveSettings:Ul,exportDocumentWithErrors:Wl,inspector:B(()=>F(()=>import(`./InspectorModal-NoO3f3U7-CJAiPdEE.js`).then(e=>({default:e.InspectorModal})),__vite__mapDeps([52,10,1,3,11,12,13,14,15,16,17,18,22,23,24,19,25,26,27,28,29,30,31,32,33,34,35,36,53]))),settings:Gl,upgradeDrive:Kl,missingPackage:B(()=>F(()=>import(`./MissingPackageModal-Df154H9n-CBAwY4mw.js`).then(e=>({default:e.ConnectMissingPackageModal})),__vite__mapDeps([54,10,1,3,11,12,13,14,15,16,17,18,50])))},Jl=B(async()=>({default:()=>{let e=O();if(!e?.type)return null;let t=ql[e.type];return t?H(Zc,{variant:`silent`,loggerContext:[`Connect`,`Modals`],children:H(Sr,{fallback:null,children:H(t,{})})}):null}})),Yl=e=>{let t=B(()=>F(()=>import(`./load-C0mYtbHx-C7vYfEJ_.js`).then(t=>t.loadComponent(e.localPackage)),__vite__mapDeps([55,13,1,3,11,14,22,23,17,24,19,12,25,26,27,28,29,30,31,32,33,34,35,36,49,53,0,37])));return H(xr,{children:U(Zc,{fallbackRender:e=>H(Dl,{children:H(Jc,{...e})}),resetKeys:[e.localPackage],loggerContext:[`Connect`],children:[H(Sr,{fallback:H(Dl,{}),name:`AppLoader`,children:H(t,{...e,children:H(Ql,{})})}),H(Sr,{name:`CookieBanner`,children:H(eu,{})}),H(Sr,{name:`ModalsContainer`,children:H(Jl,{})}),H(Pl,{})]})})},Xl=({children:e})=>(Rc(),e);function Zl(){let e=wc(),t=M();return!t||e.length===0?null:H(Ae,{pendingInstallations:e.flatMap(e=>e.packageNames.map(t=>({documentType:e.documentType,packageName:t}))),onInstall:e=>t.approveInstallation(e),onDismiss:e=>t.dismissInstallation(e)})}var Ql=()=>(V(()=>{let e=e=>{let t=e.payload,n=(t instanceof Error?t.message:String(t??``)).match(/https?:\/\/[^\s"']+/)?.[0];if(n&&!n.startsWith(window.location.origin)){console.debug(`[Connect] Skipping reload — vite:preloadError for off-origin URL: ${n}`);return}console.log(`Outdated chunks detected, reloading page...`),window.location.reload()};return window.addEventListener(`vite:preloadError`,e),()=>{window.removeEventListener(`vite:preloadError`,e)}},[]),V(()=>{De.registerServiceWorker(!1)},[]),U(Xl,{children:[H(he,{position:`bottom-right`}),H(_u,{}),H(Zl,{}),H(Vc,{})]})),$l=(e,t)=>e.some(e=>e.id===t&&e.value),eu=()=>{let{t:e}=ye(void 0,{useSuspense:!0,i18n:ge}),[t,n]=Mc(),[,r]=Sc(),i=[{id:`analytics-cookie`,label:e(`cookieBanner.cookies.analytics`),value:!0}];return t?U(`div`,{className:`absolute inset-0 z-[10000] backdrop-blur-sm`,children:[H(`div`,{className:`absolute inset-0 bg-black opacity-15`}),H(`div`,{className:`absolute inset-x-0 bottom-0 flex justify-center bg-white px-10 pb-16 pt-10 shadow-lg`,children:H(ze,{className:`max-w-[1024px]`,cookies:i,onSubmit:e=>{n(!1),$l(e,`analytics-cookie`)&&r(e=>({...e,analytics:!0}))},onReject:()=>{n(!1),r(()=>({analytics:!1,functional:!1,marketing:!1}))},submitLabel:e(`cookieBanner.accept`),rejectLabel:e(`cookieBanner.reject`),children:H(`p`,{className:`font-semibold text-gray-500`,children:H(_e,{i18nKey:`cookieBanner.message`,components:{a:H(`a`,{onClick:()=>m({type:`cookiesPolicy`}),className:`cursor-pointer text-gray-900 hover:underline`},`cookieBanner.message-link`)}},`cookieBanner.message`)})})})]}):null};function tu({drive:e}){let t=k(),n=Or(()=>e?t.some(t=>t.collectionId===i(`main`,e.header.id)):!1,[t,e]),r=e?.state.global.icon;return r?H(`img`,{src:r,alt:e.header.name,height:32,width:32}):n?H(fe,{name:`Server`,size:32}):H(fe,{name:`Hdd`,size:32})}function nu({message:e}){return H(`div`,{className:`flex size-full items-center justify-center`,children:H(`h3`,{className:`text-lg font-semibold`,children:e})})}var ru=e=>{let{document:t,onClose:n,onExport:r,onOpenSwitchboardLink:i}=e,a=N(),o=le(),[c,l]=g(t.header.id),u=c?.header.id??void 0,f=c?.header.name??void 0,p=c?.header.documentType??void 0,h=c?.header.meta?.preferredEditor??void 0,{globalOperations:_,localOperations:v,isLoading:y,refetch:b}=w(u);V(()=>{o&&b()},[o,b]);let x=c?.header.revision.global??0,S=c?.header.revision.local??0,E=C(p),ee=T(h),O=D(p),k=ee??O,te=!c,ne=k&&p&&!k.documentTypes.includes(p)&&!k.documentTypes.includes(`*`);zc({undo:()=>l(d()),redo:()=>l(s()),canUndo:x>0||S>0,canRedo:!!c?.clipboard.length}),V(()=>()=>{window.documentEditorDebugTools?.clear()},[]);let[re,A]=Ar(void 0);V(()=>{re&&re.documentId!==u&&A(void 0)},[re,u]);let ae=(e,t)=>{A({error:e,documentId:u,info:t})};if(ne)return H(Uc,{message:`Loading editor`});if(te)return H(Uc,{message:`Loading document`});if(!E)return H(nu,{message:U(`div`,{className:`text-center leading-10`,children:[U(`p`,{children:[`Unable to open the document because the document model "`,p,`" is not supported.`]}),U(`p`,{children:[`Go to the`,` `,H(`button`,{type:`button`,className:`cursor-pointer underline`,onClick:()=>{m({type:`settings`})},children:`package manager`}),` `,`to install this document model`]})]})});if(!k)return H(nu,{message:U(`div`,{className:`text-center leading-10`,children:[H(`p`,{children:`Unable to open the document because no editor has been found`}),U(`p`,{children:[`Go to the`,` `,H(`button`,{type:`button`,className:`cursor-pointer underline`,onClick:()=>{m({type:`settings`})},children:`package manager`}),` `,`an editor for the "$`,p,`" document type`]})]})});let j=k.Component;return H(`div`,{className:`relative h-full`,id:`document-editor-context`,"data-editor":k.config.id,"data-document-type":p,children:o?y?H(Uc,{message:`Loading operations`}):H(je,{documentTitle:f??``,documentId:u??``,globalOperations:_,localOperations:v,onClose:()=>oe(!1),documentState:c.state,onCopyState:()=>{me(`Copied document state to clipboard`,{type:`success`})},onCopyDocId:()=>{me(`Copied document ID to clipboard`,{type:`success`})}},u):H(Sr,{fallback:H(Uc,{message:`Loading editor`}),name:`EditorLoader`,children:H(Zc,{fallbackRender:Yc,resetKeys:[u],onError:ae,loggerContext:[`Connect`,`DocumentEditor`],children:!re?.error&&H(j,{context:{readMode:!!a,selectedTimelineRevision:ie(a?.startDate,a?.endDate,_)},documentId:c.header.id},u)})})})};function iu(){return H(`div`,{className:`h-screen`,children:H(`div`,{className:`flex h-screen items-stretch overflow-auto`,role:`presentation`,tabIndex:0,children:U(Sr,{name:`Root`,children:[H(vu,{}),H(`div`,{className:`relative flex-1 overflow-auto`,children:H(ms,{})})]})})})}function au(){let[e]=ae(),t=ee(),n=A();return V(()=>{n||f(de)},[n]),V(()=>{e||x(ue)},[e]),H(ou,{children:H(!n&&!e&&!t?cu:Qc,{})})}function ou({children:e}){return H(`div`,{className:`flex h-full flex-col overflow-auto`,id:`content-view`,children:e})}function su({drive:e}){let t=y(e.header.meta?.preferredEditor)?.config.name||`Drive Explorer App`;return H(Be,{title:e.state.global.name||e.header.name,description:t,icon:H(tu,{drive:e}),onClick:()=>h(e)},e.header.id)}function cu(){let e=E(),t=I;return U(Ve,{children:[e?.map(e=>H(su,{drive:e},e.header.id)),t.drives.addDriveEnabled&&H(Pe,{})]})}var lu=`https://apps.powerhouse.io/sky-atlas/staging/switchboard`,uu=2e3;function du(){let{search:e}=Ho();return Or(()=>{let t=new URLSearchParams(e).get(`reactorUrl`)??lu;return t.endsWith(`/`)?t:`${t}/`},[e])}async function fu(e,t){let n=ji`
|
|
48
48
|
mutation ForkAtlas($docId: PHID) {
|
|
49
49
|
ForkAtlas(docId: $docId)
|
|
50
50
|
}
|
|
51
|
-
`;return await Ei(`${t}graphql`,n,{docId:e})}function du(){let e=Dr(`initial`),t=te(),{documentId:n}=qo(),r=lu(),i=Uo(),[a,o]=Or(void 0),[s,c]=Or(void 0),[l,u]=Or(!0),d=e.current===`error`;V(()=>{s&&(console.error(`Error forking Atlas:`,s),me(`Error forking Atlas`,{type:`error`}))},[s]);async function f(t){let n=(await uu(t,r)).ForkAtlas;e.current=`forked`,o(n)}let p=Cr(()=>{a&&!l&&i(`/d/${a}`,{replace:!0})},[a,i,l]),m=Cr(async t=>{console.log(`Adding remote drive:`,t);let n=`${r}d/${t}`;try{let t=await ce(n);e.current=`done`,console.log(`Added remote drive:`,t),setTimeout(()=>{u(!1)},cu)}catch(t){e.current=`error`,u(!1),c(t)}},[ce,i,r]);return V(()=>{!n||e.current!==`initial`||(e.current=`forking`,f(n).catch(t=>{e.current=`error`,c(t)}))},[n,e]),V(()=>{!a||!t||e.current!==`forked`||(e.current=`addingDrive`,new Promise(e=>{setTimeout(e,500)}).then(()=>m(a)).catch(t=>{e.current=`error`,c(t)}))},[a,t,e]),H(`div`,{className:`flex size-full justify-center gap-x-4 bg-gray-50`,children:U(`div`,{className:`w-full max-w-[850px] rounded-2xl bg-white p-6 drop-shadow-sm`,children:[H(`h1`,{className:`text-lg font-medium text-gray-900`,children:`Welcome to the Atlas Explorer`}),H(`div`,{className:`mt-4 rounded-xl border border-gray-200 bg-gray-50 p-6`,children:U(`div`,{className:`flex min-h-80 flex-col items-center justify-center rounded-2xl bg-slate-50`,children:[H(`div`,{children:U(`svg`,{width:`28`,height:`32`,viewBox:`0 0 28 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[H(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M0.05092 23.7286L0.000163347 23.9993L0 23.9995L0.207853 24.067L27.6823 24.067L27.9995 23.9995L27.9161 23.6913L14.2182 0.209032L13.9998 0L13.749 0.246353L0.05092 23.7286ZM20.9994 11.9999L7.0003 11.9999L13.9998 23.999L20.9994 11.9999Z`,fill:`url(#paint0_radial_319_20865)`}),H(`path`,{d:`M14 0L0 23.9998V7.99993L14 0Z`,fill:`url(#paint1_linear_319_20865)`}),H(`path`,{d:`M28 24L7.82013e-05 24L14 31.9999L28 24Z`,fill:`url(#paint2_linear_319_20865)`}),H(`path`,{d:`M14 0L28 23.9998V7.99993L14 0Z`,fill:`url(#paint3_linear_319_20865)`}),U(`defs`,{children:[U(`radialGradient`,{id:`paint0_radial_319_20865`,cx:`0`,cy:`0`,r:`1`,gradientUnits:`userSpaceOnUse`,gradientTransform:`translate(13.9994 16.0344) rotate(-89.9988) scale(16.0344 16.201)`,children:[H(`stop`,{offset:`0.181008`,stopColor:`#FFCD6B`}),H(`stop`,{offset:`1`,stopColor:`#EB5EDF`})]}),U(`linearGradient`,{id:`paint1_linear_319_20865`,x1:`-0.031454`,y1:`24.041`,x2:`13.801`,y2:`-0.142908`,gradientUnits:`userSpaceOnUse`,children:[H(`stop`,{stopColor:`#4331E9`}),H(`stop`,{offset:`1`,stopColor:`#A273FF`})]}),U(`linearGradient`,{id:`paint2_linear_319_20865`,x1:`-0.0310093`,y1:`24`,x2:`28.0444`,y2:`24`,gradientUnits:`userSpaceOnUse`,children:[H(`stop`,{stopColor:`#A273FF`}),H(`stop`,{offset:`1`,stopColor:`#4331E9`})]}),U(`linearGradient`,{id:`paint3_linear_319_20865`,x1:`28.0315`,y1:`24.041`,x2:`14.199`,y2:`-0.142908`,gradientUnits:`userSpaceOnUse`,children:[H(`stop`,{stopColor:`#A273FF`}),H(`stop`,{offset:`1`,stopColor:`#4331E9`})]})]})]})}),d?H(`div`,{className:`mt-3 text-sm text-gray-800`,children:`Error forking Atlas scope. Please try again.`}):H(`div`,{className:`mt-3 text-sm text-gray-500`,children:`Forking Atlas scope...`}),H(pe,{onClick:d?window.location.reload.bind(window.location):p,size:`small`,color:`light`,className:`mt-4 h-9 border border-gray-200 bg-white px-3 text-gray-600`,children:d?`Retry`:l?U(Ar,{children:[U(`svg`,{className:`animate-spin`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[H(`path`,{d:`M15.6867 8.03333C15.4933 7.83999 15.1733 7.83999 14.98 8.03333L14.6733 8.34001V8C14.6733 4.32 11.68 1.32666 7.99999 1.32666C5.96666 1.32666 4.06666 2.23999 2.79333 3.82666C2.61999 4.03999 2.65332 4.35999 2.87332 4.52665C3.08666 4.69999 3.40666 4.66666 3.57332 4.44666C4.65999 3.09332 6.27332 2.31999 7.99999 2.31999C11.1267 2.31999 13.6733 4.86666 13.6733 7.99333V8.32666L13.3667 8.02002C13.1733 7.82669 12.8533 7.82669 12.66 8.02002C12.4667 8.21335 12.4667 8.53335 12.66 8.72668L13.82 9.88668C13.8667 9.93334 13.92 9.96666 13.98 9.99333C14.04 10.02 14.1067 10.0333 14.1733 10.0333C14.24 10.0333 14.3 10.02 14.3667 9.99333C14.4267 9.96666 14.48 9.93334 14.5267 9.88668L15.6867 8.72668C15.88 8.54668 15.88 8.22666 15.6867 8.03333Z`,fill:`#6C7275`}),H(`path`,{d:`M13.1267 11.4666C12.9133 11.2933 12.5933 11.3266 12.4267 11.5466C11.34 12.9 9.72665 13.6733 7.99998 13.6733C4.87332 13.6733 2.32665 11.1266 2.32665 7.99996V7.66663L2.63332 7.97331C2.73332 8.07331 2.85999 8.11996 2.98665 8.11996C3.11332 8.11996 3.23999 8.07331 3.33999 7.97331C3.53332 7.77998 3.53332 7.45998 3.33999 7.26664L2.17998 6.10661C2.13332 6.05994 2.07998 6.02663 2.01998 5.99996C1.89998 5.94663 1.75998 5.94663 1.63998 5.99996C1.57998 6.02663 1.52665 6.05994 1.47999 6.10661L0.319988 7.26664C0.126654 7.45998 0.126654 7.77998 0.319988 7.97331C0.513321 8.16664 0.833319 8.16664 1.02665 7.97331L1.33332 7.66663V7.99996C1.33332 11.68 4.32665 14.6733 8.00665 14.6733C10.04 14.6733 11.94 13.76 13.2133 12.1733C13.38 11.96 13.3467 11.64 13.1267 11.4666Z`,fill:`#6C7275`})]}),`Loading`]}):`Continue`})]})})]})})}function fu(e){let t=I.routerBasename;return bs(e,{basename:t,future:{v7_fetcherPersist:!0,v7_relativeSplatPath:!0}})}function pu(){return[{element:H(br,{name:`RouteRoot`,children:H(nu,{})}),children:[{index:!0,path:`d?/:driveId?/*?`,element:H(br,{name:`Drive`,children:H(ru,{})})},{path:`import/:documentId`,element:H(br,{name:`AtlasImport`,children:H(du,{})})}]}]}var mu=fu(pu()),hu=()=>H(As,{router:mu});function gu(){let e=v(),t=E(),[n]=ae(),r=localStorage.getItem(`CONNECT_DEBUG`)===`true`,i=e?.ens?.name||e?.profile?.username||void 0,a=e?.ens?.avatarUrl||e?.profile?.userImage||void 0,o=ke(a?void 0:e?.address),s=()=>{m({type:`settings`})},c=()=>{m({type:`addDrive`})},l=e?.address?`https://etherscan.io/address/${e.address}`:``;return H(Oe,{children:H(Fe,{id:`sidebar`,onClick:()=>h(void 0),onClickSettings:s,address:e?.address,onLogin:S,onDisconnect:P,ensName:i||o.data?.ens,avatarUrl:a||o.data?.avatar_small||o.data?.avatar_url||void 0,etherscanUrl:l,showDebug:r,onDebugClick:()=>m({type:`debugSettings`}),children:U(Yc,{variant:`text`,fallbackMessage:`There was an error loading drives`,loggerContext:[`Connect`,`Sidebar`],children:[t?.map((e,t)=>H(Ie,{title:e.header.name,onClick:()=>h(e),active:n?.header.id===e.header.id,icon:H($l,{drive:e})},t)),I.drives.addDriveEnabled&&H(Me,{onClick:c})]})})})}function _u(e){window.ph?.vetraPackageManager?.updateLocalPackage(e)}function vu(e){return window.ph||(window.ph={}),Mr(document.getElementById(`root`)).render(H(ql,{localPackage:e})),{updateLocalPackage:_u}}var yu={name:`ph-clint-app`,description:``,category:``,publisher:{name:``,url:``},documentModels:[{id:`powerhouse/ph-clint-project`,name:`PhClintProject`}],editors:[{id:`ph-clint-project-editor`,name:`PhClintProjectEditor`,documentTypes:[`powerhouse/ph-clint-project`]}],apps:[],subgraphs:[],importScripts:[]},bu=[jn],xu=[sn],Su=[{Component:B(()=>F(()=>import(`./editor-Cmx2y5dq.js`),__vite__mapDeps([56,10,1,3,11,12,13,14,15,16,17,18,57]))),documentTypes:[`powerhouse/ph-clint-project`],config:{id:`ph-clint-project-editor`,name:`PhClintProjectEditor`}}],Cu=async e=>{let{processorFactoryBuilders:t}=e.processorApp===`connect`?await F(()=>import(`./connect-q2RMY-je.js`),[]):await F(()=>import(`./switchboard-BCPp_tNt.js`),[]),n=await Promise.all(t.map(async t=>await t(e)));return async t=>{let r=[];for(let i of n){let n=await i(t,e.processorApp);r.push(...n)}return r}},wu=e({AddExternalSkillInputSchema:()=>Mt,AddModelInputSchema:()=>Ze,AddPackageDocumentTypeInputSchema:()=>cr,AddPowerhousePackageInputSchema:()=>Ft,AddProfileInputSchema:()=>rt,AddSupportedResourceInputSchema:()=>et,BumpVersionInputSchema:()=>Ct,ClearAgentImageInputSchema:()=>Dn,DisableMastraInputSchema:()=>Ke,DisableRoutineInputSchema:()=>Tn,EnableMastraInputSchema:()=>yt,EnableRoutineInputSchema:()=>xt,ExternalSkillSchema:()=>Tt,ImportModelInputSchema:()=>at,ImportPackageInputSchema:()=>dt,ImportProfileInputSchema:()=>_t,ImportSkillInputSchema:()=>kt,ImportSpecInputSchema:()=>gr,PhClintAgentModelSchema:()=>Je,PhClintAgentProfileSchema:()=>zt,PhClintDeploymentSchema:()=>lt,PhClintFeaturesSchema:()=>Lt,PhClintMastraCommonSchema:()=>Vt,PhClintMastraFeatureSchema:()=>st,PhClintProject:()=>jn,PhClintProjectController:()=>Zt,PhClintProjectDocumentHeaderSchema:()=>rr,PhClintProjectDocumentSchema:()=>fr,PhClintProjectPHStateSchema:()=>en,PhClintProjectStateSchema:()=>ht,PhClintRoutineFeatureSchema:()=>Wn,PowerhouseLevelSchema:()=>pt,PowerhousePackageSchema:()=>Gt,PublishDevInputSchema:()=>Ut,PublishProductionInputSchema:()=>qt,PublishRecordSchema:()=>Dt,PublishStagingInputSchema:()=>We,PublishStatusSchema:()=>un,PublishTagSchema:()=>Qn,RemoveExternalSkillInputSchema:()=>Fn,RemoveModelInputSchema:()=>Kn,RemovePackageDocumentTypeInputSchema:()=>Sn,RemovePowerhousePackageInputSchema:()=>Qt,RemoveProfileInputSchema:()=>Rn,RemoveSupportedResourceInputSchema:()=>Yn,ReorderProfilesInputSchema:()=>an,SetAgentDescriptionInputSchema:()=>kn,SetAgentIdInputSchema:()=>tr,SetAgentImageInputSchema:()=>cn,SetAgentNameInputSchema:()=>pn,SetDefaultModelInputSchema:()=>Vn,SetDescriptionInputSchema:()=>Mn,SetEnableChatInputSchema:()=>yn,SetExternalSkillGithubUrlInputSchema:()=>gn,SetExternalSkillNameInputSchema:()=>Yt,SetPackageIdentifierInputSchema:()=>ir,SetPackageVersionInputSchema:()=>pr,SetPowerhouseLevelInputSchema:()=>tn,SetProxyEnabledInputSchema:()=>ur,SetPublishStatusInputSchema:()=>jt,SetVersionInputSchema:()=>Xe,UpdateProfileInputSchema:()=>sr,actions:()=>tt,addExternalSkill:()=>hr,addModel:()=>Ue,addPackageDocumentType:()=>Bt,addPowerhousePackage:()=>ot,addProfile:()=>dn,addSupportedResource:()=>Qe,assertIsPhClintProjectDocument:()=>lr,assertIsPhClintProjectState:()=>At,bumpVersion:()=>bt,clearAgentImage:()=>$n,createPhClintProjectDocument:()=>Ln,createState:()=>Jn,defaultGlobalState:()=>rn,defaultLocalState:()=>On,defaultPHState:()=>er,definedNonNullAnySchema:()=>Pt,disableMastra:()=>qn,disableRoutine:()=>Kt,documentModel:()=>$e,documentModels:()=>bu,editors:()=>Su,enableMastra:()=>Cn,enableRoutine:()=>Et,importSpec:()=>vt,initialGlobalState:()=>hn,initialLocalState:()=>Jt,isDefinedNonNullAny:()=>nt,isPhClintProjectDocument:()=>Ye,isPhClintProjectState:()=>or,latestVersion:()=>fn,manifest:()=>Tu,phClintProjectDeploymentActions:()=>St,phClintProjectDocumentType:()=>Nt,phClintProjectExternalSkillsActions:()=>qe,phClintProjectFeaturesMastraActions:()=>In,phClintProjectFeaturesPowerhouseActions:()=>bn,phClintProjectFeaturesRoutineActions:()=>Ht,phClintProjectIdentityActions:()=>Xt,phClintProjectLifecycleActions:()=>wn,phClintProjectPowerhousePackagesActions:()=>mt,phClintProjectPublishingActions:()=>wt,phClintProjectUpgradeManifest:()=>sn,processorFactory:()=>Cu,publishDev:()=>it,publishProduction:()=>ut,publishStaging:()=>gt,reducer:()=>dr,removeExternalSkill:()=>Rt,removeModel:()=>$t,removePackageDocumentType:()=>Un,removePowerhousePackage:()=>ft,removeProfile:()=>zn,removeSupportedResource:()=>En,reorderProfiles:()=>Xn,setAgentDescription:()=>on,setAgentId:()=>An,setAgentImage:()=>nr,setAgentName:()=>ln,setDefaultModel:()=>mn,setDescription:()=>ar,setEnableChat:()=>Hn,setExternalSkillGithubUrl:()=>ct,setExternalSkillName:()=>It,setPackageIdentifier:()=>mr,setPackageVersion:()=>Wt,setPowerhouseLevel:()=>_n,setProxyEnabled:()=>Ge,setPublishStatus:()=>Ot,setVersion:()=>nn,supportedVersions:()=>Bn,updateProfile:()=>Nn,upgradeManifests:()=>xu,usePhClintProjectDocumentById:()=>Zn,usePhClintProjectDocumentsInSelectedDrive:()=>Pn,usePhClintProjectDocumentsInSelectedFolder:()=>Gn,useSelectedPhClintProjectDocument:()=>xn,utils:()=>vn}),Tu=yu,{updateLocalPackage:Eu}=vu(wu);
|
|
52
|
-
//# sourceMappingURL=index-
|
|
51
|
+
`;return await Oi(`${t}graphql`,n,{docId:e})}function pu(){let e=kr(`initial`),t=te(),{documentId:n}=Yo(),r=du(),i=Go(),[a,o]=Ar(void 0),[s,c]=Ar(void 0),[l,u]=Ar(!0),d=e.current===`error`;V(()=>{s&&(console.error(`Error forking Atlas:`,s),me(`Error forking Atlas`,{type:`error`}))},[s]);async function f(t){let n=(await fu(t,r)).ForkAtlas;e.current=`forked`,o(n)}let p=Tr(()=>{a&&!l&&i(`/d/${a}`,{replace:!0})},[a,i,l]),m=Tr(async t=>{console.log(`Adding remote drive:`,t);let n=`${r}d/${t}`;try{let t=await ce(n);e.current=`done`,console.log(`Added remote drive:`,t),setTimeout(()=>{u(!1)},uu)}catch(t){e.current=`error`,u(!1),c(t)}},[ce,i,r]);return V(()=>{!n||e.current!==`initial`||(e.current=`forking`,f(n).catch(t=>{e.current=`error`,c(t)}))},[n,e]),V(()=>{!a||!t||e.current!==`forked`||(e.current=`addingDrive`,new Promise(e=>{setTimeout(e,500)}).then(()=>m(a)).catch(t=>{e.current=`error`,c(t)}))},[a,t,e]),H(`div`,{className:`flex size-full justify-center gap-x-4 bg-gray-50`,children:U(`div`,{className:`w-full max-w-[850px] rounded-2xl bg-white p-6 drop-shadow-sm`,children:[H(`h1`,{className:`text-lg font-medium text-gray-900`,children:`Welcome to the Atlas Explorer`}),H(`div`,{className:`mt-4 rounded-xl border border-gray-200 bg-gray-50 p-6`,children:U(`div`,{className:`flex min-h-80 flex-col items-center justify-center rounded-2xl bg-slate-50`,children:[H(`div`,{children:U(`svg`,{width:`28`,height:`32`,viewBox:`0 0 28 32`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[H(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M0.05092 23.7286L0.000163347 23.9993L0 23.9995L0.207853 24.067L27.6823 24.067L27.9995 23.9995L27.9161 23.6913L14.2182 0.209032L13.9998 0L13.749 0.246353L0.05092 23.7286ZM20.9994 11.9999L7.0003 11.9999L13.9998 23.999L20.9994 11.9999Z`,fill:`url(#paint0_radial_319_20865)`}),H(`path`,{d:`M14 0L0 23.9998V7.99993L14 0Z`,fill:`url(#paint1_linear_319_20865)`}),H(`path`,{d:`M28 24L7.82013e-05 24L14 31.9999L28 24Z`,fill:`url(#paint2_linear_319_20865)`}),H(`path`,{d:`M14 0L28 23.9998V7.99993L14 0Z`,fill:`url(#paint3_linear_319_20865)`}),U(`defs`,{children:[U(`radialGradient`,{id:`paint0_radial_319_20865`,cx:`0`,cy:`0`,r:`1`,gradientUnits:`userSpaceOnUse`,gradientTransform:`translate(13.9994 16.0344) rotate(-89.9988) scale(16.0344 16.201)`,children:[H(`stop`,{offset:`0.181008`,stopColor:`#FFCD6B`}),H(`stop`,{offset:`1`,stopColor:`#EB5EDF`})]}),U(`linearGradient`,{id:`paint1_linear_319_20865`,x1:`-0.031454`,y1:`24.041`,x2:`13.801`,y2:`-0.142908`,gradientUnits:`userSpaceOnUse`,children:[H(`stop`,{stopColor:`#4331E9`}),H(`stop`,{offset:`1`,stopColor:`#A273FF`})]}),U(`linearGradient`,{id:`paint2_linear_319_20865`,x1:`-0.0310093`,y1:`24`,x2:`28.0444`,y2:`24`,gradientUnits:`userSpaceOnUse`,children:[H(`stop`,{stopColor:`#A273FF`}),H(`stop`,{offset:`1`,stopColor:`#4331E9`})]}),U(`linearGradient`,{id:`paint3_linear_319_20865`,x1:`28.0315`,y1:`24.041`,x2:`14.199`,y2:`-0.142908`,gradientUnits:`userSpaceOnUse`,children:[H(`stop`,{stopColor:`#A273FF`}),H(`stop`,{offset:`1`,stopColor:`#4331E9`})]})]})]})}),d?H(`div`,{className:`mt-3 text-sm text-gray-800`,children:`Error forking Atlas scope. Please try again.`}):H(`div`,{className:`mt-3 text-sm text-gray-500`,children:`Forking Atlas scope...`}),H(pe,{onClick:d?window.location.reload.bind(window.location):p,size:`small`,color:`light`,className:`mt-4 h-9 border border-gray-200 bg-white px-3 text-gray-600`,children:d?`Retry`:l?U(Mr,{children:[U(`svg`,{className:`animate-spin`,width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[H(`path`,{d:`M15.6867 8.03333C15.4933 7.83999 15.1733 7.83999 14.98 8.03333L14.6733 8.34001V8C14.6733 4.32 11.68 1.32666 7.99999 1.32666C5.96666 1.32666 4.06666 2.23999 2.79333 3.82666C2.61999 4.03999 2.65332 4.35999 2.87332 4.52665C3.08666 4.69999 3.40666 4.66666 3.57332 4.44666C4.65999 3.09332 6.27332 2.31999 7.99999 2.31999C11.1267 2.31999 13.6733 4.86666 13.6733 7.99333V8.32666L13.3667 8.02002C13.1733 7.82669 12.8533 7.82669 12.66 8.02002C12.4667 8.21335 12.4667 8.53335 12.66 8.72668L13.82 9.88668C13.8667 9.93334 13.92 9.96666 13.98 9.99333C14.04 10.02 14.1067 10.0333 14.1733 10.0333C14.24 10.0333 14.3 10.02 14.3667 9.99333C14.4267 9.96666 14.48 9.93334 14.5267 9.88668L15.6867 8.72668C15.88 8.54668 15.88 8.22666 15.6867 8.03333Z`,fill:`#6C7275`}),H(`path`,{d:`M13.1267 11.4666C12.9133 11.2933 12.5933 11.3266 12.4267 11.5466C11.34 12.9 9.72665 13.6733 7.99998 13.6733C4.87332 13.6733 2.32665 11.1266 2.32665 7.99996V7.66663L2.63332 7.97331C2.73332 8.07331 2.85999 8.11996 2.98665 8.11996C3.11332 8.11996 3.23999 8.07331 3.33999 7.97331C3.53332 7.77998 3.53332 7.45998 3.33999 7.26664L2.17998 6.10661C2.13332 6.05994 2.07998 6.02663 2.01998 5.99996C1.89998 5.94663 1.75998 5.94663 1.63998 5.99996C1.57998 6.02663 1.52665 6.05994 1.47999 6.10661L0.319988 7.26664C0.126654 7.45998 0.126654 7.77998 0.319988 7.97331C0.513321 8.16664 0.833319 8.16664 1.02665 7.97331L1.33332 7.66663V7.99996C1.33332 11.68 4.32665 14.6733 8.00665 14.6733C10.04 14.6733 11.94 13.76 13.2133 12.1733C13.38 11.96 13.3467 11.64 13.1267 11.4666Z`,fill:`#6C7275`})]}),`Loading`]}):`Continue`})]})})]})})}function mu(e){let t=I.routerBasename;return Ss(e,{basename:t,future:{v7_fetcherPersist:!0,v7_relativeSplatPath:!0}})}function hu(){return[{element:H(Sr,{name:`RouteRoot`,children:H(iu,{})}),children:[{index:!0,path:`d?/:driveId?/*?`,element:H(Sr,{name:`Drive`,children:H(au,{})})},{path:`import/:documentId`,element:H(Sr,{name:`AtlasImport`,children:H(pu,{})})}]}]}var gu=mu(hu()),_u=()=>H(Ms,{router:gu});function vu(){let e=v(),t=E(),[n]=ae(),r=localStorage.getItem(`CONNECT_DEBUG`)===`true`,i=e?.ens?.name||e?.profile?.username||void 0,a=e?.ens?.avatarUrl||e?.profile?.userImage||void 0,o=ke(a?void 0:e?.address),s=()=>{m({type:`settings`})},c=()=>{m({type:`addDrive`})},l=e?.address?`https://etherscan.io/address/${e.address}`:``;return H(Oe,{children:H(Fe,{id:`sidebar`,onClick:()=>h(void 0),onClickSettings:s,address:e?.address,onLogin:S,onDisconnect:P,ensName:i||o.data?.ens,avatarUrl:a||o.data?.avatar_small||o.data?.avatar_url||void 0,etherscanUrl:l,showDebug:r,onDebugClick:()=>m({type:`debugSettings`}),children:U(Zc,{variant:`text`,fallbackMessage:`There was an error loading drives`,loggerContext:[`Connect`,`Sidebar`],children:[t?.map((e,t)=>H(Ie,{title:e.header.name,onClick:()=>h(e),active:n?.header.id===e.header.id,icon:H(tu,{drive:e})},t)),I.drives.addDriveEnabled&&H(Me,{onClick:c})]})})})}function yu(e){window.ph?.vetraPackageManager?.updateLocalPackage(e)}function bu(e){return window.ph||(window.ph={}),Pr(document.getElementById(`root`)).render(H(Yl,{localPackage:e})),{updateLocalPackage:yu}}var xu={name:`ph-clint-app`,description:``,category:``,publisher:{name:``,url:``},documentModels:[{id:`powerhouse/ph-clint-project`,name:`PhClintProject`}],apps:[],editors:[{id:`ph-clint-project-editor`,name:`PhClintProjectEditor`,documentTypes:[`powerhouse/ph-clint-project`]}],processors:[],subgraphs:[],config:[]},Su=[Nn],Cu=[$n],wu=[{Component:B(()=>F(()=>import(`./editor-DgkuaKuV.js`),__vite__mapDeps([56,10,1,3,11,12,13,14,15,16,17,18,57]))),documentTypes:[`powerhouse/ph-clint-project`],config:{id:`ph-clint-project-editor`,name:`PhClintProjectEditor`}}],Tu=async e=>{let{processorFactoryBuilders:t}=e.processorApp===`connect`?await F(()=>import(`./connect-q2RMY-je.js`),[]):await F(()=>import(`./switchboard-BCPp_tNt.js`),[]),n=await Promise.all(t.map(async t=>await t(e)));return async t=>{let r=[];for(let i of n){let n=await i(t,e.processorApp);r.push(...n)}return r}},Eu=e({AddExternalSkillInputSchema:()=>ur,AddModelInputSchema:()=>It,AddPackageDocumentTypeInputSchema:()=>rt,AddPowerhousePackageInputSchema:()=>et,AddProfileInputSchema:()=>wt,AddSupportedResourceInputSchema:()=>kn,BumpVersionInputSchema:()=>Ke,ClearAgentImageInputSchema:()=>En,DisableMastraInputSchema:()=>yt,DisableRoutineInputSchema:()=>xt,EnableMastraInputSchema:()=>Et,EnableRoutineInputSchema:()=>at,ExternalSkillSchema:()=>dt,ImportModelInputSchema:()=>_t,ImportPackageInputSchema:()=>At,ImportProfileInputSchema:()=>vr,ImportSkillInputSchema:()=>Je,ImportSpecInputSchema:()=>Bt,PhClintAgentModelSchema:()=>lt,PhClintAgentProfileSchema:()=>Rt,PhClintDeploymentSchema:()=>Ht,PhClintFeaturesSchema:()=>st,PhClintMastraCommonSchema:()=>ht,PhClintMastraFeatureSchema:()=>Kn,PhClintProject:()=>Nn,PhClintProjectController:()=>Hn,PhClintProjectDocumentHeaderSchema:()=>ar,PhClintProjectDocumentSchema:()=>mr,PhClintProjectPHStateSchema:()=>tn,PhClintProjectStateSchema:()=>pt,PhClintRoutineFeatureSchema:()=>Kt,PowerhouseLevelSchema:()=>Wt,PowerhousePackageSchema:()=>Jt,PublishDevInputSchema:()=>Ot,PublishProductionInputSchema:()=>We,PublishRecordSchema:()=>dn,PublishStagingInputSchema:()=>er,PublishStatusSchema:()=>Ln,PublishTagSchema:()=>Jn,RemoveExternalSkillInputSchema:()=>Cn,RemoveModelInputSchema:()=>$t,RemovePackageDocumentTypeInputSchema:()=>Bn,RemovePowerhousePackageInputSchema:()=>Zn,RemoveProfileInputSchema:()=>on,RemoveSupportedResourceInputSchema:()=>jn,ReorderProfilesInputSchema:()=>rr,SetAgentDescriptionInputSchema:()=>ln,SetAgentIdInputSchema:()=>mn,SetAgentImageInputSchema:()=>Un,SetAgentNameInputSchema:()=>Pn,SetDefaultModelInputSchema:()=>bn,SetDescriptionInputSchema:()=>_n,SetEnableChatInputSchema:()=>Xt,SetExternalSkillGithubUrlInputSchema:()=>or,SetExternalSkillNameInputSchema:()=>hr,SetObservabilityEnabledInputSchema:()=>nn,SetPackageIdentifierInputSchema:()=>fr,SetPackageVersionInputSchema:()=>Mt,SetPowerhouseLevelInputSchema:()=>Xe,SetProxyEnabledInputSchema:()=>lr,SetPublishStatusInputSchema:()=>Ft,SetVersionInputSchema:()=>nt,UpdateProfileInputSchema:()=>$e,actions:()=>St,addExternalSkill:()=>Fn,addModel:()=>Dt,addPackageDocumentType:()=>it,addPowerhousePackage:()=>ut,addProfile:()=>Ue,addSupportedResource:()=>gr,assertIsPhClintProjectDocument:()=>dr,assertIsPhClintProjectState:()=>jt,bumpVersion:()=>Dn,clearAgentImage:()=>fn,createPhClintProjectDocument:()=>an,createState:()=>An,defaultGlobalState:()=>nr,defaultLocalState:()=>cn,defaultPHState:()=>pn,definedNonNullAnySchema:()=>Ct,disableMastra:()=>Rn,disableRoutine:()=>ft,documentModel:()=>Qe,documentModels:()=>Su,editors:()=>wu,enableMastra:()=>Yn,enableRoutine:()=>Gt,importSpec:()=>ct,initialGlobalState:()=>gn,initialLocalState:()=>Yt,isDefinedNonNullAny:()=>On,isPhClintProjectDocument:()=>Ye,isPhClintProjectState:()=>cr,latestVersion:()=>In,manifest:()=>Du,phClintProjectDeploymentActions:()=>rn,phClintProjectDocumentType:()=>Pt,phClintProjectExternalSkillsActions:()=>xn,phClintProjectFeaturesMastraActions:()=>tr,phClintProjectFeaturesPowerhouseActions:()=>Ut,phClintProjectFeaturesRoutineActions:()=>Gn,phClintProjectIdentityActions:()=>Lt,phClintProjectLifecycleActions:()=>zt,phClintProjectPowerhousePackagesActions:()=>gt,phClintProjectPublishingActions:()=>Ge,phClintProjectUpgradeManifest:()=>$n,processorFactory:()=>Tu,publishDev:()=>Tn,publishProduction:()=>vt,publishStaging:()=>bt,reducer:()=>tt,removeExternalSkill:()=>vn,removeModel:()=>wn,removePackageDocumentType:()=>kt,removePowerhousePackage:()=>_r,removeProfile:()=>en,removeSupportedResource:()=>pr,reorderProfiles:()=>Vn,setAgentDescription:()=>Qn,setAgentId:()=>sn,setAgentImage:()=>Mn,setAgentName:()=>ir,setDefaultModel:()=>un,setDescription:()=>Vt,setEnableChat:()=>hn,setExternalSkillGithubUrl:()=>Zt,setExternalSkillName:()=>sr,setObservabilityEnabled:()=>Nt,setPackageIdentifier:()=>ot,setPackageVersion:()=>qe,setPowerhouseLevel:()=>qt,setProxyEnabled:()=>Ze,setPublishStatus:()=>Tt,setVersion:()=>mt,supportedVersions:()=>qn,updateProfile:()=>Wn,upgradeManifests:()=>Cu,usePhClintProjectDocumentById:()=>Sn,usePhClintProjectDocumentsInSelectedDrive:()=>Qt,usePhClintProjectDocumentsInSelectedFolder:()=>zn,useSelectedPhClintProjectDocument:()=>Xn,utils:()=>yn}),Du=xu,{updateLocalPackage:Ou}=bu(Eu);
|
|
52
|
+
//# sourceMappingURL=index-BXAErAWR.js.map
|