convex-cms 0.0.7 → 0.0.9-alpha.1
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/README.md +16 -6
- package/admin/src/components/BulkActionBar.tsx +6 -5
- package/admin/src/components/ContentEntryEditor.tsx +10 -9
- package/admin/src/components/ContentTypeFormModal.tsx +4 -3
- package/admin/src/components/Sidebar.tsx +3 -2
- package/admin/src/components/TaxonomyEditor.tsx +4 -3
- package/admin/src/components/TermTree.tsx +8 -6
- package/admin/src/components/VersionCompare.tsx +3 -2
- package/admin/src/components/VersionHistory.tsx +4 -3
- package/admin/src/components/fields/CategoryField.tsx +3 -2
- package/admin/src/components/fields/MediaField.tsx +6 -5
- package/admin/src/components/fields/ReferenceField.tsx +6 -5
- package/admin/src/components/fields/TagField.tsx +5 -4
- package/admin/src/components/filters/TaxonomyFilter.tsx +4 -3
- package/admin/src/components/media/MediaAssetEditDialog.tsx +4 -3
- package/admin/src/components/media/MediaFolderEditDialog.tsx +3 -2
- package/admin/src/components/media/MediaMoveModal.tsx +4 -3
- package/admin/src/components/media/MediaTaxonomyPicker.tsx +6 -5
- package/admin/src/contexts/SettingsConfigContext.tsx +19 -5
- package/admin/src/embed/contexts/ApiContext.tsx +6 -2
- package/admin/src/routes/__root.tsx +7 -3
- package/admin-dist/nitro.json +1 -1
- package/admin-dist/public/assets/{CmsEmptyState-6-PLaXtD.js → CmsEmptyState-BM4e6N83.js} +1 -1
- package/admin-dist/public/assets/{CmsPageHeader-SoF4Epu9.js → CmsPageHeader-uor3DPIk.js} +1 -1
- package/admin-dist/public/assets/{CmsStatusBadge-D7kYaohx.js → CmsStatusBadge-D8N18LJx.js} +1 -1
- package/admin-dist/public/assets/{CmsSurface-BvksBm6W.js → CmsSurface-BEcY-WpI.js} +1 -1
- package/admin-dist/public/assets/{CmsToolbar-DlZPMe2B.js → CmsToolbar-DE-bu3W8.js} +1 -1
- package/admin-dist/public/assets/ContentEntryEditor-BdkIMCUk.js +4 -0
- package/admin-dist/public/assets/TaxonomyFilter-a1-O9DPs.js +1 -0
- package/admin-dist/public/assets/{_contentTypeId-DTv8UoTp.js → _contentTypeId-XIkYOLyY.js} +1 -1
- package/admin-dist/public/assets/{_entryId-D3lr5Dvy.js → _entryId-DyP15QpI.js} +1 -1
- package/admin-dist/public/assets/{alert-BAHTL6ao.js → alert-DHBQuuib.js} +1 -1
- package/admin-dist/public/assets/{badge-oJv4Eai8.js → badge-BOhWFWzb.js} +1 -1
- package/admin-dist/public/assets/{circle-check-big-3OHxNDhO.js → circle-check-big-DjTNapen.js} +1 -1
- package/admin-dist/public/assets/{command-DwgQs69u.js → command-BIc5_8gL.js} +1 -1
- package/admin-dist/public/assets/content-C3N8Ugra.js +1 -0
- package/admin-dist/public/assets/content-types-D0wh1eUF.js +1 -0
- package/admin-dist/public/assets/{index-DOkgTSx0.js → index-B-g3F_ri.js} +1 -1
- package/admin-dist/public/assets/main-BapBJgQD.js +102 -0
- package/admin-dist/public/assets/media-8uh1MwDi.js +1 -0
- package/admin-dist/public/assets/{new._contentTypeId-VF63rpic.js → new._contentTypeId-S96rFbgY.js} +1 -1
- package/admin-dist/public/assets/{pencil-CX1CiTDD.js → pencil-DgaZav4e.js} +1 -1
- package/admin-dist/public/assets/{refresh-cw-Cm-YOeFI.js → refresh-cw-BBut4hAU.js} +1 -1
- package/admin-dist/public/assets/{rotate-ccw-B45JsL5f.js → rotate-ccw-DVCkojZZ.js} +1 -1
- package/admin-dist/public/assets/{scroll-area-b3A1HHR7.js → scroll-area-DPC4uXzf.js} +1 -1
- package/admin-dist/public/assets/{search-DKKh_DdH.js → search-CSyHHglh.js} +1 -1
- package/admin-dist/public/assets/{settings-CGVDEV1r.js → settings-cEqPsoJ0.js} +1 -1
- package/admin-dist/public/assets/{switch-BTMY8Qnk.js → switch-O2BviO8Q.js} +1 -1
- package/admin-dist/public/assets/{tabs-DUQwUoIb.js → tabs-p1MWhOqY.js} +1 -1
- package/admin-dist/public/assets/{tanstack-adapter-f7AHmQ5L.js → tanstack-adapter-CDrxoPZD.js} +1 -1
- package/admin-dist/public/assets/taxonomies-DJ9UbjXW.js +1 -0
- package/admin-dist/public/assets/{trash-D7e0uKd9.js → trash-RnpP6lXF.js} +1 -1
- package/admin-dist/public/assets/{useBreadcrumbLabel-CF2KYwsw.js → useBreadcrumbLabel-zbIWXlkc.js} +1 -1
- package/admin-dist/public/assets/{usePermissions-DWBImEOW.js → usePermissions-4CTlK-vU.js} +1 -1
- package/admin-dist/server/_chunks/_libs/@floating-ui/core.mjs +71 -65
- package/admin-dist/server/_chunks/_libs/@floating-ui/dom.mjs +1 -1
- package/admin-dist/server/_chunks/_libs/@floating-ui/utils.mjs +8 -8
- package/admin-dist/server/_chunks/_libs/@tanstack/react-router.mjs +12 -30
- package/admin-dist/server/_chunks/_libs/@tanstack/react-store.mjs +1 -56
- package/admin-dist/server/_chunks/_libs/@tanstack/router-core.mjs +130 -114
- package/admin-dist/server/_chunks/_libs/@tanstack/store.mjs +1 -134
- package/admin-dist/server/_chunks/_libs/react-dom.mjs +5 -5
- package/admin-dist/server/_chunks/_libs/react.mjs +1 -1
- package/admin-dist/server/_libs/isbot.mjs +1 -1
- package/admin-dist/server/_libs/use-sync-external-store.mjs +1 -76
- package/admin-dist/server/_ssr/{CmsEmptyState-BM8DghTl.mjs → CmsEmptyState-BA0Lc5xs.mjs} +1 -1
- package/admin-dist/server/_ssr/{CmsPageHeader-BHUmrIWD.mjs → CmsPageHeader-PMyecILZ.mjs} +1 -1
- package/admin-dist/server/_ssr/{CmsStatusBadge-D0Zb0oRl.mjs → CmsStatusBadge-CInuN2bZ.mjs} +2 -2
- package/admin-dist/server/_ssr/{CmsSurface-B2eBr-47.mjs → CmsSurface-CH1PIfcS.mjs} +1 -1
- package/admin-dist/server/_ssr/{CmsToolbar-BCrwg7OL.mjs → CmsToolbar-IuhSA7gR.mjs} +1 -1
- package/admin-dist/server/_ssr/{ContentEntryEditor-Cjfm0uhr.mjs → ContentEntryEditor-Bzhir4fQ.mjs} +38 -31
- package/admin-dist/server/_ssr/{TaxonomyFilter-C4pD0kfM.mjs → TaxonomyFilter-r4izSMBh.mjs} +6 -5
- package/admin-dist/server/_ssr/{_contentTypeId-CiDiX-p7.mjs → _contentTypeId-BWEbjqxY.mjs} +11 -13
- package/admin-dist/server/_ssr/{_entryId-9GxatOkL.mjs → _entryId-B5xoXoJf.mjs} +12 -14
- package/admin-dist/server/_ssr/_tanstack-start-manifest_v-CBTan6ii.mjs +4 -0
- package/admin-dist/server/_ssr/{badge-EI998zba.mjs → badge-DXrjBRqZ.mjs} +1 -1
- package/admin-dist/server/_ssr/{command-BLAWQhUw.mjs → command-Cj90OdCX.mjs} +1 -1
- package/admin-dist/server/_ssr/config.server-BOr7Jxr4.mjs +0 -3
- package/admin-dist/server/_ssr/{content-BHX39L4D.mjs → content-DKRI-YqL.mjs} +14 -15
- package/admin-dist/server/_ssr/{content-types-DCzrBhTH.mjs → content-types-BzgRcS8K.mjs} +7 -9
- package/admin-dist/server/_ssr/{index-DwM_5VNP.mjs → index-BPf6_agY.mjs} +4 -6
- package/admin-dist/server/_ssr/index.mjs +11 -10
- package/admin-dist/server/_ssr/{media-CbzgTRRQ.mjs → media-MpjxOZL8.mjs} +23 -21
- package/admin-dist/server/_ssr/{new._contentTypeId-6Ph-Gtlw.mjs → new._contentTypeId-DSb4qR9j.mjs} +11 -13
- package/admin-dist/server/_ssr/{router-vd1nySeP.mjs → router-Dk9ikPNc.mjs} +61 -47
- package/admin-dist/server/_ssr/{scroll-area--B9snFTJ.mjs → scroll-area-JwVD_6MZ.mjs} +1 -1
- package/admin-dist/server/_ssr/{settings-DlTO2JSj.mjs → settings-KVJNe0GM.mjs} +8 -10
- package/admin-dist/server/_ssr/{switch-C05NgNW0.mjs → switch-DvREvRv4.mjs} +1 -1
- package/admin-dist/server/_ssr/{tabs-DAk2J5xy.mjs → tabs-B0h57pFf.mjs} +1 -1
- package/admin-dist/server/_ssr/{tanstack-adapter-DWbaPByn.mjs → tanstack-adapter-gmM64LnW.mjs} +1 -1
- package/admin-dist/server/_ssr/{taxonomies-B8nqce6u.mjs → taxonomies-BbBNx260.mjs} +17 -16
- package/admin-dist/server/_ssr/{trash-zdlZgpTo.mjs → trash-JAzYGh7A.mjs} +8 -10
- package/admin-dist/server/_ssr/{useBreadcrumbLabel-DpEKyG1h.mjs → useBreadcrumbLabel-BWIujj97.mjs} +1 -1
- package/admin-dist/server/_ssr/{usePermissions-olYRd9S9.mjs → usePermissions-CcLDCSwa.mjs} +1 -1
- package/admin-dist/server/index.mjs +162 -162
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +18 -29
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/templates/admin.d.ts +4 -3
- package/dist/cli/templates/admin.d.ts.map +1 -1
- package/dist/cli/templates/admin.js +152 -195
- package/dist/cli/templates/admin.js.map +1 -1
- package/dist/cli/templates/cmsClient.d.ts +2 -2
- package/dist/cli/templates/cmsClient.d.ts.map +1 -1
- package/dist/cli/templates/cmsClient.js +58 -27
- package/dist/cli/templates/cmsClient.js.map +1 -1
- package/dist/cli/templates/content.d.ts +10 -0
- package/dist/cli/templates/content.d.ts.map +1 -0
- package/dist/cli/templates/content.js +257 -0
- package/dist/cli/templates/content.js.map +1 -0
- package/dist/cli/templates/index.d.ts +3 -2
- package/dist/cli/templates/index.d.ts.map +1 -1
- package/dist/cli/templates/index.js +3 -2
- package/dist/cli/templates/index.js.map +1 -1
- package/dist/cli/templates/schemas/blog.d.ts +4 -3
- package/dist/cli/templates/schemas/blog.d.ts.map +1 -1
- package/dist/cli/templates/schemas/blog.js +44 -13
- package/dist/cli/templates/schemas/blog.js.map +1 -1
- package/dist/cli/templates/schemas/docs.d.ts +4 -3
- package/dist/cli/templates/schemas/docs.d.ts.map +1 -1
- package/dist/cli/templates/schemas/docs.js +43 -12
- package/dist/cli/templates/schemas/docs.js.map +1 -1
- package/dist/cli/templates/schemas/index.d.ts +6 -4
- package/dist/cli/templates/schemas/index.d.ts.map +1 -1
- package/dist/cli/templates/schemas/index.js +6 -4
- package/dist/cli/templates/schemas/index.js.map +1 -1
- package/dist/cli/templates/schemas/landing.d.ts +4 -3
- package/dist/cli/templates/schemas/landing.d.ts.map +1 -1
- package/dist/cli/templates/schemas/landing.js +62 -15
- package/dist/cli/templates/schemas/landing.js.map +1 -1
- package/dist/cli/utils/fileUtils.d.ts.map +1 -1
- package/dist/cli/utils/fileUtils.js +6 -5
- package/dist/cli/utils/fileUtils.js.map +1 -1
- package/dist/client/admin/index.d.ts +2 -1
- package/dist/client/admin/index.d.ts.map +1 -1
- package/dist/client/admin/index.js.map +1 -1
- package/dist/client/admin/types.d.ts +14 -1
- package/dist/client/admin/types.d.ts.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/react/index.d.ts +176 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +162 -0
- package/dist/react/index.js.map +1 -1
- package/package.json +2 -2
- package/admin-dist/public/assets/ContentEntryEditor-C6n9xLS9.js +0 -4
- package/admin-dist/public/assets/TaxonomyFilter-CFX1_g8s.js +0 -1
- package/admin-dist/public/assets/content-CKQ4QwW2.js +0 -1
- package/admin-dist/public/assets/content-types-BrttaLpc.js +0 -1
- package/admin-dist/public/assets/main-DV6oxWnU.js +0 -102
- package/admin-dist/public/assets/media-B2i-mCbx.js +0 -1
- package/admin-dist/public/assets/taxonomies-DvMppdiD.js +0 -1
- package/admin-dist/server/_ssr/_tanstack-start-manifest_v-CC7UrHKE.mjs +0 -4
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/trash-D7e0uKd9.js","assets/CmsPageHeader-SoF4Epu9.js","assets/CmsToolbar-DlZPMe2B.js","assets/search-DKKh_DdH.js","assets/CmsEmptyState-6-PLaXtD.js","assets/CmsSurface-BvksBm6W.js","assets/badge-oJv4Eai8.js","assets/alert-BAHTL6ao.js","assets/rotate-ccw-B45JsL5f.js","assets/tanstack-adapter-f7AHmQ5L.js","assets/taxonomies-DvMppdiD.js","assets/pencil-CX1CiTDD.js","assets/scroll-area-b3A1HHR7.js","assets/settings-CGVDEV1r.js","assets/usePermissions-DWBImEOW.js","assets/switch-BTMY8Qnk.js","assets/media-B2i-mCbx.js","assets/tabs-DUQwUoIb.js","assets/refresh-cw-Cm-YOeFI.js","assets/TaxonomyFilter-CFX1_g8s.js","assets/command-DwgQs69u.js","assets/content-types-BrttaLpc.js","assets/content-CKQ4QwW2.js","assets/circle-check-big-3OHxNDhO.js","assets/CmsStatusBadge-D7kYaohx.js","assets/index-DOkgTSx0.js","assets/_entryId-D3lr5Dvy.js","assets/ContentEntryEditor-C6n9xLS9.js","assets/useBreadcrumbLabel-CF2KYwsw.js","assets/_contentTypeId-DTv8UoTp.js","assets/new._contentTypeId-VF63rpic.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
function QT(e,t){for(var r=0;r<t.length;r++){const s=t[r];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in e)){const c=Object.getOwnPropertyDescriptor(s,i);c&&Object.defineProperty(e,i,c.get?c:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function tx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fh={exports:{}},Ui={};var E0;function GT(){if(E0)return Ui;E0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,i,c){var u=null;if(c!==void 0&&(u=""+c),i.key!==void 0&&(u=""+i.key),"key"in i){c={};for(var f in i)f!=="key"&&(c[f]=i[f])}else c=i;return i=c.ref,{$$typeof:e,type:s,key:u,ref:i!==void 0?i:null,props:c}}return Ui.Fragment=t,Ui.jsx=r,Ui.jsxs=r,Ui}var R0;function YT(){return R0||(R0=1,Fh.exports=GT()),Fh.exports}var g=YT(),Vh={exports:{}},Te={};var T0;function KT(){if(T0)return Te;T0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),b=Symbol.iterator;function _(z){return z===null||typeof z!="object"?null:(z=b&&z[b]||z["@@iterator"],typeof z=="function"?z:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,C={};function O(z,Q,ne){this.props=z,this.context=Q,this.refs=C,this.updater=ne||E}O.prototype.isReactComponent={},O.prototype.setState=function(z,Q){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,Q,"setState")},O.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function M(){}M.prototype=O.prototype;function k(z,Q,ne){this.props=z,this.context=Q,this.refs=C,this.updater=ne||E}var D=k.prototype=new M;D.constructor=k,x(D,O.prototype),D.isPureReactComponent=!0;var U=Array.isArray;function H(){}var L={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function G(z,Q,ne){var oe=ne.ref;return{$$typeof:e,type:z,key:Q,ref:oe!==void 0?oe:null,props:ne}}function ie(z,Q){return G(z.type,Q,z.props)}function ae(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function te(z){var Q={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(ne){return Q[ne]})}var ce=/\/+/g;function le(z,Q){return typeof z=="object"&&z!==null&&z.key!=null?te(""+z.key):Q.toString(36)}function me(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(H,H):(z.status="pending",z.then(function(Q){z.status==="pending"&&(z.status="fulfilled",z.value=Q)},function(Q){z.status==="pending"&&(z.status="rejected",z.reason=Q)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function I(z,Q,ne,oe,pe){var ye=typeof z;(ye==="undefined"||ye==="boolean")&&(z=null);var X=!1;if(z===null)X=!0;else switch(ye){case"bigint":case"string":case"number":X=!0;break;case"object":switch(z.$$typeof){case e:case t:X=!0;break;case y:return X=z._init,I(X(z._payload),Q,ne,oe,pe)}}if(X)return pe=pe(z),X=oe===""?"."+le(z,0):oe,U(pe)?(ne="",X!=null&&(ne=X.replace(ce,"$&/")+"/"),I(pe,Q,ne,"",function(Re){return Re})):pe!=null&&(ae(pe)&&(pe=ie(pe,ne+(pe.key==null||z&&z.key===pe.key?"":(""+pe.key).replace(ce,"$&/")+"/")+X)),Q.push(pe)),1;X=0;var _e=oe===""?".":oe+":";if(U(z))for(var xe=0;xe<z.length;xe++)oe=z[xe],ye=_e+le(oe,xe),X+=I(oe,Q,ne,ye,pe);else if(xe=_(z),typeof xe=="function")for(z=xe.call(z),xe=0;!(oe=z.next()).done;)oe=oe.value,ye=_e+le(oe,xe++),X+=I(oe,Q,ne,ye,pe);else if(ye==="object"){if(typeof z.then=="function")return I(me(z),Q,ne,oe,pe);throw Q=String(z),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return X}function K(z,Q,ne){if(z==null)return z;var oe=[],pe=0;return I(z,oe,"","",function(ye){return Q.call(ne,ye,pe++)}),oe}function V(z){if(z._status===-1){var Q=z._result;Q=Q(),Q.then(function(ne){(z._status===0||z._status===-1)&&(z._status=1,z._result=ne)},function(ne){(z._status===0||z._status===-1)&&(z._status=2,z._result=ne)}),z._status===-1&&(z._status=0,z._result=Q)}if(z._status===1)return z._result.default;throw z._result}var re=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},ve={map:K,forEach:function(z,Q,ne){K(z,function(){Q.apply(this,arguments)},ne)},count:function(z){var Q=0;return K(z,function(){Q++}),Q},toArray:function(z){return K(z,function(Q){return Q})||[]},only:function(z){if(!ae(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Te.Activity=v,Te.Children=ve,Te.Component=O,Te.Fragment=r,Te.Profiler=i,Te.PureComponent=k,Te.StrictMode=s,Te.Suspense=h,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Te.__COMPILER_RUNTIME={__proto__:null,c:function(z){return L.H.useMemoCache(z)}},Te.cache=function(z){return function(){return z.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(z,Q,ne){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var oe=x({},z.props),pe=z.key;if(Q!=null)for(ye in Q.key!==void 0&&(pe=""+Q.key),Q)!j.call(Q,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&Q.ref===void 0||(oe[ye]=Q[ye]);var ye=arguments.length-2;if(ye===1)oe.children=ne;else if(1<ye){for(var X=Array(ye),_e=0;_e<ye;_e++)X[_e]=arguments[_e+2];oe.children=X}return G(z.type,pe,oe)},Te.createContext=function(z){return z={$$typeof:u,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:c,_context:z},z},Te.createElement=function(z,Q,ne){var oe,pe={},ye=null;if(Q!=null)for(oe in Q.key!==void 0&&(ye=""+Q.key),Q)j.call(Q,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(pe[oe]=Q[oe]);var X=arguments.length-2;if(X===1)pe.children=ne;else if(1<X){for(var _e=Array(X),xe=0;xe<X;xe++)_e[xe]=arguments[xe+2];pe.children=_e}if(z&&z.defaultProps)for(oe in X=z.defaultProps,X)pe[oe]===void 0&&(pe[oe]=X[oe]);return G(z,ye,pe)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(z){return{$$typeof:f,render:z}},Te.isValidElement=ae,Te.lazy=function(z){return{$$typeof:y,_payload:{_status:-1,_result:z},_init:V}},Te.memo=function(z,Q){return{$$typeof:p,type:z,compare:Q===void 0?null:Q}},Te.startTransition=function(z){var Q=L.T,ne={};L.T=ne;try{var oe=z(),pe=L.S;pe!==null&&pe(ne,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(H,re)}catch(ye){re(ye)}finally{Q!==null&&ne.types!==null&&(Q.types=ne.types),L.T=Q}},Te.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},Te.use=function(z){return L.H.use(z)},Te.useActionState=function(z,Q,ne){return L.H.useActionState(z,Q,ne)},Te.useCallback=function(z,Q){return L.H.useCallback(z,Q)},Te.useContext=function(z){return L.H.useContext(z)},Te.useDebugValue=function(){},Te.useDeferredValue=function(z,Q){return L.H.useDeferredValue(z,Q)},Te.useEffect=function(z,Q){return L.H.useEffect(z,Q)},Te.useEffectEvent=function(z){return L.H.useEffectEvent(z)},Te.useId=function(){return L.H.useId()},Te.useImperativeHandle=function(z,Q,ne){return L.H.useImperativeHandle(z,Q,ne)},Te.useInsertionEffect=function(z,Q){return L.H.useInsertionEffect(z,Q)},Te.useLayoutEffect=function(z,Q){return L.H.useLayoutEffect(z,Q)},Te.useMemo=function(z,Q){return L.H.useMemo(z,Q)},Te.useOptimistic=function(z,Q){return L.H.useOptimistic(z,Q)},Te.useReducer=function(z,Q,ne){return L.H.useReducer(z,Q,ne)},Te.useRef=function(z){return L.H.useRef(z)},Te.useState=function(z){return L.H.useState(z)},Te.useSyncExternalStore=function(z,Q,ne){return L.H.useSyncExternalStore(z,Q,ne)},Te.useTransition=function(){return L.H.useTransition()},Te.version="19.2.3",Te}var A0;function vc(){return A0||(A0=1,Vh.exports=KT()),Vh.exports}var w=vc();const qt=tx(w),Yu=QT({__proto__:null,default:qt},[w]);var Hh={exports:{}},Bi={},Zh={exports:{}},Qh={};var O0;function XT(){return O0||(O0=1,(function(e){function t(I,K){var V=I.length;I.push(K);e:for(;0<V;){var re=V-1>>>1,ve=I[re];if(0<i(ve,K))I[re]=K,I[V]=ve,V=re;else break e}}function r(I){return I.length===0?null:I[0]}function s(I){if(I.length===0)return null;var K=I[0],V=I.pop();if(V!==K){I[0]=V;e:for(var re=0,ve=I.length,z=ve>>>1;re<z;){var Q=2*(re+1)-1,ne=I[Q],oe=Q+1,pe=I[oe];if(0>i(ne,V))oe<ve&&0>i(pe,ne)?(I[re]=pe,I[oe]=V,re=oe):(I[re]=ne,I[Q]=V,re=Q);else if(oe<ve&&0>i(pe,V))I[re]=pe,I[oe]=V,re=oe;else break e}}return K}function i(I,K){var V=I.sortIndex-K.sortIndex;return V!==0?V:I.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var h=[],p=[],y=1,v=null,b=3,_=!1,E=!1,x=!1,C=!1,O=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function D(I){for(var K=r(p);K!==null;){if(K.callback===null)s(p);else if(K.startTime<=I)s(p),K.sortIndex=K.expirationTime,t(h,K);else break;K=r(p)}}function U(I){if(x=!1,D(I),!E)if(r(h)!==null)E=!0,H||(H=!0,te());else{var K=r(p);K!==null&&me(U,K.startTime-I)}}var H=!1,L=-1,j=5,G=-1;function ie(){return C?!0:!(e.unstable_now()-G<j)}function ae(){if(C=!1,H){var I=e.unstable_now();G=I;var K=!0;try{e:{E=!1,x&&(x=!1,M(L),L=-1),_=!0;var V=b;try{t:{for(D(I),v=r(h);v!==null&&!(v.expirationTime>I&&ie());){var re=v.callback;if(typeof re=="function"){v.callback=null,b=v.priorityLevel;var ve=re(v.expirationTime<=I);if(I=e.unstable_now(),typeof ve=="function"){v.callback=ve,D(I),K=!0;break t}v===r(h)&&s(h),D(I)}else s(h);v=r(h)}if(v!==null)K=!0;else{var z=r(p);z!==null&&me(U,z.startTime-I),K=!1}}break e}finally{v=null,b=V,_=!1}K=void 0}}finally{K?te():H=!1}}}var te;if(typeof k=="function")te=function(){k(ae)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,le=ce.port2;ce.port1.onmessage=ae,te=function(){le.postMessage(null)}}else te=function(){O(ae,0)};function me(I,K){L=O(function(){I(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(I){switch(b){case 1:case 2:case 3:var K=3;break;default:K=b}var V=b;b=K;try{return I()}finally{b=V}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(I,K){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var V=b;b=I;try{return K()}finally{b=V}},e.unstable_scheduleCallback=function(I,K,V){var re=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?re+V:re):V=re,I){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=V+ve,I={id:y++,callback:K,priorityLevel:I,startTime:V,expirationTime:ve,sortIndex:-1},V>re?(I.sortIndex=V,t(p,I),r(h)===null&&I===r(p)&&(x?(M(L),L=-1):x=!0,me(U,V-re))):(I.sortIndex=ve,t(h,I),E||_||(E=!0,H||(H=!0,te()))),I},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(I){var K=b;return function(){var V=b;b=K;try{return I.apply(this,arguments)}finally{b=V}}}})(Qh)),Qh}var k0;function JT(){return k0||(k0=1,Zh.exports=XT()),Zh.exports}var Gh={exports:{}},Bt={};var M0;function WT(){if(M0)return Bt;M0=1;var e=vc();function t(h){var p="https://react.dev/errors/"+h;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+h+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var s={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function c(h,p,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:v==null?null:""+v,children:h,containerInfo:p,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,p){if(h==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Bt.createPortal=function(h,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return c(h,p,null,y)},Bt.flushSync=function(h){var p=u.T,y=s.p;try{if(u.T=null,s.p=2,h)return h()}finally{u.T=p,s.p=y,s.d.f()}},Bt.preconnect=function(h,p){typeof h=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(h,p))},Bt.prefetchDNS=function(h){typeof h=="string"&&s.d.D(h)},Bt.preinit=function(h,p){if(typeof h=="string"&&p&&typeof p.as=="string"){var y=p.as,v=f(y,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,_=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?s.d.S(h,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:b,fetchPriority:_}):y==="script"&&s.d.X(h,{crossOrigin:v,integrity:b,fetchPriority:_,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Bt.preinitModule=function(h,p){if(typeof h=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=f(p.as,p.crossOrigin);s.d.M(h,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(h)},Bt.preload=function(h,p){if(typeof h=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,v=f(y,p.crossOrigin);s.d.L(h,y,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Bt.preloadModule=function(h,p){if(typeof h=="string")if(p){var y=f(p.as,p.crossOrigin);s.d.m(h,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(h)},Bt.requestFormReset=function(h){s.d.r(h)},Bt.unstable_batchedUpdates=function(h,p){return h(p)},Bt.useFormState=function(h,p,y){return u.H.useFormState(h,p,y)},Bt.useFormStatus=function(){return u.H.useHostTransitionStatus()},Bt.version="19.2.3",Bt}var N0;function nx(){if(N0)return Gh.exports;N0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Gh.exports=WT(),Gh.exports}var j0;function eA(){if(j0)return Bi;j0=1;var e=JT(),t=vc(),r=nx();function s(n){var o="https://react.dev/errors/"+n;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)o+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+n+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var o=n,a=n;if(n.alternate)for(;o.return;)o=o.return;else{n=o;do o=n,(o.flags&4098)!==0&&(a=o.return),n=o.return;while(n)}return o.tag===3?a:null}function u(n){if(n.tag===13){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function f(n){if(n.tag===31){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function h(n){if(c(n)!==n)throw Error(s(188))}function p(n){var o=n.alternate;if(!o){if(o=c(n),o===null)throw Error(s(188));return o!==n?null:n}for(var a=n,l=o;;){var d=a.return;if(d===null)break;var m=d.alternate;if(m===null){if(l=d.return,l!==null){a=l;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===a)return h(d),n;if(m===l)return h(d),o;m=m.sibling}throw Error(s(188))}if(a.return!==l.return)a=d,l=m;else{for(var S=!1,R=d.child;R;){if(R===a){S=!0,a=d,l=m;break}if(R===l){S=!0,l=d,a=m;break}R=R.sibling}if(!S){for(R=m.child;R;){if(R===a){S=!0,a=m,l=d;break}if(R===l){S=!0,l=m,a=d;break}R=R.sibling}if(!S)throw Error(s(189))}}if(a.alternate!==l)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?n:o}function y(n){var o=n.tag;if(o===5||o===26||o===27||o===6)return n;for(n=n.child;n!==null;){if(o=y(n),o!==null)return o;n=n.sibling}return null}var v=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),k=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function te(n){return n===null||typeof n!="object"?null:(n=ae&&n[ae]||n["@@iterator"],typeof n=="function"?n:null)}var ce=Symbol.for("react.client.reference");function le(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ce?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case x:return"Fragment";case O:return"Profiler";case C:return"StrictMode";case U:return"Suspense";case H:return"SuspenseList";case G:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case E:return"Portal";case k:return n.displayName||"Context";case M:return(n._context.displayName||"Context")+".Consumer";case D:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case L:return o=n.displayName||null,o!==null?o:le(n.type)||"Memo";case j:o=n._payload,n=n._init;try{return le(n(o))}catch{}}return null}var me=Array.isArray,I=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},re=[],ve=-1;function z(n){return{current:n}}function Q(n){0>ve||(n.current=re[ve],re[ve]=null,ve--)}function ne(n,o){ve++,re[ve]=n.current,n.current=o}var oe=z(null),pe=z(null),ye=z(null),X=z(null);function _e(n,o){switch(ne(ye,o),ne(pe,n),ne(oe,null),o.nodeType){case 9:case 11:n=(n=o.documentElement)&&(n=n.namespaceURI)?Gb(n):0;break;default:if(n=o.tagName,o=o.namespaceURI)o=Gb(o),n=Yb(o,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Q(oe),ne(oe,n)}function xe(){Q(oe),Q(pe),Q(ye)}function Re(n){n.memoizedState!==null&&ne(X,n);var o=oe.current,a=Yb(o,n.type);o!==a&&(ne(pe,n),ne(oe,a))}function Ae(n){pe.current===n&&(Q(oe),Q(pe)),X.current===n&&(Q(X),Pi._currentValue=V)}var Le,yt;function vt(n){if(Le===void 0)try{throw Error()}catch(a){var o=a.stack.trim().match(/\n( *(at )?)/);Le=o&&o[1]||"",yt=-1<a.stack.indexOf(`
|
|
3
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+Le+n+yt}var Sn=!1;function Yt(n,o){if(!n||Sn)return"";Sn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(o){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch(Z){var F=Z}Reflect.construct(n,[],ee)}else{try{ee.call()}catch(Z){F=Z}n.call(ee.prototype)}}else{try{throw Error()}catch(Z){F=Z}(ee=n())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch(Z){if(Z&&F&&typeof Z.stack=="string")return[Z.stack,F.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=l.DetermineComponentFrameRoot(),S=m[0],R=m[1];if(S&&R){var N=S.split(`
|
|
5
|
-
`),q=R.split(`
|
|
6
|
-
`);for(d=l=0;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;for(;d<q.length&&!q[d].includes("DetermineComponentFrameRoot");)d++;if(l===N.length||d===q.length)for(l=N.length-1,d=q.length-1;1<=l&&0<=d&&N[l]!==q[d];)d--;for(;1<=l&&0<=d;l--,d--)if(N[l]!==q[d]){if(l!==1||d!==1)do if(l--,d--,0>d||N[l]!==q[d]){var Y=`
|
|
7
|
-
`+N[l].replace(" at new "," at ");return n.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",n.displayName)),Y}while(1<=l&&0<=d);break}}}finally{Sn=!1,Error.prepareStackTrace=a}return(a=n?n.displayName||n.name:"")?vt(a):""}function nt(n,o){switch(n.tag){case 26:case 27:case 5:return vt(n.type);case 16:return vt("Lazy");case 13:return n.child!==o&&o!==null?vt("Suspense Fallback"):vt("Suspense");case 19:return vt("SuspenseList");case 0:case 15:return Yt(n.type,!1);case 11:return Yt(n.type.render,!1);case 1:return Yt(n.type,!0);case 31:return vt("Activity");default:return""}}function se(n){try{var o="",a=null;do o+=nt(n,a),a=n,n=n.return;while(n);return o}catch(l){return`
|
|
8
|
-
Error generating stack: `+l.message+`
|
|
9
|
-
`+l.stack}}var Ee=Object.prototype.hasOwnProperty,Ue=e.unstable_scheduleCallback,ze=e.unstable_cancelCallback,Mt=e.unstable_shouldYield,Of=e.unstable_requestPaint,Vt=e.unstable_now,kf=e.unstable_getCurrentPriorityLevel,rt=e.unstable_ImmediatePriority,zt=e.unstable_UserBlockingPriority,Ut=e.unstable_NormalPriority,kc=e.unstable_LowPriority,Ag=e.unstable_IdlePriority,OR=e.log,kR=e.unstable_setDisableYieldValue,Ga=null,cn=null;function Hr(n){if(typeof OR=="function"&&kR(n),cn&&typeof cn.setStrictMode=="function")try{cn.setStrictMode(Ga,n)}catch{}}var ln=Math.clz32?Math.clz32:jR,MR=Math.log,NR=Math.LN2;function jR(n){return n>>>=0,n===0?32:31-(MR(n)/NR|0)|0}var Mc=256,Nc=262144,jc=4194304;function Io(n){var o=n&42;if(o!==0)return o;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function zc(n,o,a){var l=n.pendingLanes;if(l===0)return 0;var d=0,m=n.suspendedLanes,S=n.pingedLanes;n=n.warmLanes;var R=l&134217727;return R!==0?(l=R&~m,l!==0?d=Io(l):(S&=R,S!==0?d=Io(S):a||(a=R&~n,a!==0&&(d=Io(a))))):(R=l&~m,R!==0?d=Io(R):S!==0?d=Io(S):a||(a=l&~n,a!==0&&(d=Io(a)))),d===0?0:o!==0&&o!==d&&(o&m)===0&&(m=d&-d,a=o&-o,m>=a||m===32&&(a&4194048)!==0)?o:d}function Ya(n,o){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&o)===0}function zR(n,o){switch(n){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Og(){var n=jc;return jc<<=1,(jc&62914560)===0&&(jc=4194304),n}function Mf(n){for(var o=[],a=0;31>a;a++)o.push(n);return o}function Ka(n,o){n.pendingLanes|=o,o!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function DR(n,o,a,l,d,m){var S=n.pendingLanes;n.pendingLanes=a,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=a,n.entangledLanes&=a,n.errorRecoveryDisabledLanes&=a,n.shellSuspendCounter=0;var R=n.entanglements,N=n.expirationTimes,q=n.hiddenUpdates;for(a=S&~a;0<a;){var Y=31-ln(a),ee=1<<Y;R[Y]=0,N[Y]=-1;var F=q[Y];if(F!==null)for(q[Y]=null,Y=0;Y<F.length;Y++){var Z=F[Y];Z!==null&&(Z.lane&=-536870913)}a&=~ee}l!==0&&kg(n,l,0),m!==0&&d===0&&n.tag!==0&&(n.suspendedLanes|=m&~(S&~o))}function kg(n,o,a){n.pendingLanes|=o,n.suspendedLanes&=~o;var l=31-ln(o);n.entangledLanes|=o,n.entanglements[l]=n.entanglements[l]|1073741824|a&261930}function Mg(n,o){var a=n.entangledLanes|=o;for(n=n.entanglements;a;){var l=31-ln(a),d=1<<l;d&o|n[l]&o&&(n[l]|=o),a&=~d}}function Ng(n,o){var a=o&-o;return a=(a&42)!==0?1:Nf(a),(a&(n.suspendedLanes|o))!==0?0:a}function Nf(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function jf(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function jg(){var n=K.p;return n!==0?n:(n=window.event,n===void 0?32:v0(n.type))}function zg(n,o){var a=K.p;try{return K.p=n,o()}finally{K.p=a}}var Zr=Math.random().toString(36).slice(2),Dt="__reactFiber$"+Zr,Kt="__reactProps$"+Zr,Ts="__reactContainer$"+Zr,zf="__reactEvents$"+Zr,PR="__reactListeners$"+Zr,LR="__reactHandles$"+Zr,Dg="__reactResources$"+Zr,Xa="__reactMarker$"+Zr;function Df(n){delete n[Dt],delete n[Kt],delete n[zf],delete n[PR],delete n[LR]}function As(n){var o=n[Dt];if(o)return o;for(var a=n.parentNode;a;){if(o=a[Ts]||a[Dt]){if(a=o.alternate,o.child!==null||a!==null&&a.child!==null)for(n=n0(n);n!==null;){if(a=n[Dt])return a;n=n0(n)}return o}n=a,a=n.parentNode}return null}function Os(n){if(n=n[Dt]||n[Ts]){var o=n.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return n}return null}function Ja(n){var o=n.tag;if(o===5||o===26||o===27||o===6)return n.stateNode;throw Error(s(33))}function ks(n){var o=n[Dg];return o||(o=n[Dg]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Nt(n){n[Xa]=!0}var Pg=new Set,Lg={};function $o(n,o){Ms(n,o),Ms(n+"Capture",o)}function Ms(n,o){for(Lg[n]=o,n=0;n<o.length;n++)Pg.add(o[n])}var IR=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ig={},$g={};function $R(n){return Ee.call($g,n)?!0:Ee.call(Ig,n)?!1:IR.test(n)?$g[n]=!0:(Ig[n]=!0,!1)}function Dc(n,o,a){if($R(o))if(a===null)n.removeAttribute(o);else{switch(typeof a){case"undefined":case"function":case"symbol":n.removeAttribute(o);return;case"boolean":var l=o.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(o);return}}n.setAttribute(o,""+a)}}function Pc(n,o,a){if(a===null)n.removeAttribute(o);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttribute(o,""+a)}}function gr(n,o,a,l){if(l===null)n.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttributeNS(o,a,""+l)}}function xn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Ug(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function UR(n,o,a){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,o);if(!n.hasOwnProperty(o)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,m=l.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return d.call(this)},set:function(S){a=""+S,m.call(this,S)}}),Object.defineProperty(n,o,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(S){a=""+S},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function Pf(n){if(!n._valueTracker){var o=Ug(n)?"checked":"value";n._valueTracker=UR(n,o,""+n[o])}}function Bg(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var a=o.getValue(),l="";return n&&(l=Ug(n)?n.checked?"true":"false":n.value),n=l,n!==a?(o.setValue(n),!0):!1}function Lc(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var BR=/[\n"\\]/g;function _n(n){return n.replace(BR,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Lf(n,o,a,l,d,m,S,R){n.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.type=S:n.removeAttribute("type"),o!=null?S==="number"?(o===0&&n.value===""||n.value!=o)&&(n.value=""+xn(o)):n.value!==""+xn(o)&&(n.value=""+xn(o)):S!=="submit"&&S!=="reset"||n.removeAttribute("value"),o!=null?If(n,S,xn(o)):a!=null?If(n,S,xn(a)):l!=null&&n.removeAttribute("value"),d==null&&m!=null&&(n.defaultChecked=!!m),d!=null&&(n.checked=d&&typeof d!="function"&&typeof d!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?n.name=""+xn(R):n.removeAttribute("name")}function qg(n,o,a,l,d,m,S,R){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(n.type=m),o!=null||a!=null){if(!(m!=="submit"&&m!=="reset"||o!=null)){Pf(n);return}a=a!=null?""+xn(a):"",o=o!=null?""+xn(o):a,R||o===n.value||(n.value=o),n.defaultValue=o}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=R?n.checked:!!l,n.defaultChecked=!!l,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(n.name=S),Pf(n)}function If(n,o,a){o==="number"&&Lc(n.ownerDocument)===n||n.defaultValue===""+a||(n.defaultValue=""+a)}function Ns(n,o,a,l){if(n=n.options,o){o={};for(var d=0;d<a.length;d++)o["$"+a[d]]=!0;for(a=0;a<n.length;a++)d=o.hasOwnProperty("$"+n[a].value),n[a].selected!==d&&(n[a].selected=d),d&&l&&(n[a].defaultSelected=!0)}else{for(a=""+xn(a),o=null,d=0;d<n.length;d++){if(n[d].value===a){n[d].selected=!0,l&&(n[d].defaultSelected=!0);return}o!==null||n[d].disabled||(o=n[d])}o!==null&&(o.selected=!0)}}function Fg(n,o,a){if(o!=null&&(o=""+xn(o),o!==n.value&&(n.value=o),a==null)){n.defaultValue!==o&&(n.defaultValue=o);return}n.defaultValue=a!=null?""+xn(a):""}function Vg(n,o,a,l){if(o==null){if(l!=null){if(a!=null)throw Error(s(92));if(me(l)){if(1<l.length)throw Error(s(93));l=l[0]}a=l}a==null&&(a=""),o=a}a=xn(o),n.defaultValue=a,l=n.textContent,l===a&&l!==""&&l!==null&&(n.value=l),Pf(n)}function js(n,o){if(o){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=o;return}}n.textContent=o}var qR=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Hg(n,o,a){var l=o.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?n.setProperty(o,""):o==="float"?n.cssFloat="":n[o]="":l?n.setProperty(o,a):typeof a!="number"||a===0||qR.has(o)?o==="float"?n.cssFloat=a:n[o]=(""+a).trim():n[o]=a+"px"}function Zg(n,o,a){if(o!=null&&typeof o!="object")throw Error(s(62));if(n=n.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||o!=null&&o.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var d in o)l=o[d],o.hasOwnProperty(d)&&a[d]!==l&&Hg(n,d,l)}else for(var m in o)o.hasOwnProperty(m)&&Hg(n,m,o[m])}function $f(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var FR=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),VR=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ic(n){return VR.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function yr(){}var Uf=null;function Bf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var zs=null,Ds=null;function Qg(n){var o=Os(n);if(o&&(n=o.stateNode)){var a=n[Kt]||null;e:switch(n=o.stateNode,o.type){case"input":if(Lf(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),o=a.name,a.type==="radio"&&o!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+_n(""+o)+'"][type="radio"]'),o=0;o<a.length;o++){var l=a[o];if(l!==n&&l.form===n.form){var d=l[Kt]||null;if(!d)throw Error(s(90));Lf(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(o=0;o<a.length;o++)l=a[o],l.form===n.form&&Bg(l)}break e;case"textarea":Fg(n,a.value,a.defaultValue);break e;case"select":o=a.value,o!=null&&Ns(n,!!a.multiple,o,!1)}}}var qf=!1;function Gg(n,o,a){if(qf)return n(o,a);qf=!0;try{var l=n(o);return l}finally{if(qf=!1,(zs!==null||Ds!==null)&&(El(),zs&&(o=zs,n=Ds,Ds=zs=null,Qg(o),n)))for(o=0;o<n.length;o++)Qg(n[o])}}function Wa(n,o){var a=n.stateNode;if(a===null)return null;var l=a[Kt]||null;if(l===null)return null;a=l[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(s(231,o,typeof a));return a}var vr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ff=!1;if(vr)try{var ei={};Object.defineProperty(ei,"passive",{get:function(){Ff=!0}}),window.addEventListener("test",ei,ei),window.removeEventListener("test",ei,ei)}catch{Ff=!1}var Qr=null,Vf=null,$c=null;function Yg(){if($c)return $c;var n,o=Vf,a=o.length,l,d="value"in Qr?Qr.value:Qr.textContent,m=d.length;for(n=0;n<a&&o[n]===d[n];n++);var S=a-n;for(l=1;l<=S&&o[a-l]===d[m-l];l++);return $c=d.slice(n,1<l?1-l:void 0)}function Uc(n){var o=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&o===13&&(n=13)):n=o,n===10&&(n=13),32<=n||n===13?n:0}function Bc(){return!0}function Kg(){return!1}function Xt(n){function o(a,l,d,m,S){this._reactName=a,this._targetInst=d,this.type=l,this.nativeEvent=m,this.target=S,this.currentTarget=null;for(var R in n)n.hasOwnProperty(R)&&(a=n[R],this[R]=a?a(m):m[R]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Bc:Kg,this.isPropagationStopped=Kg,this}return v(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Bc)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Bc)},persist:function(){},isPersistent:Bc}),o}var Uo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qc=Xt(Uo),ti=v({},Uo,{view:0,detail:0}),HR=Xt(ti),Hf,Zf,ni,Fc=v({},ti,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==ni&&(ni&&n.type==="mousemove"?(Hf=n.screenX-ni.screenX,Zf=n.screenY-ni.screenY):Zf=Hf=0,ni=n),Hf)},movementY:function(n){return"movementY"in n?n.movementY:Zf}}),Xg=Xt(Fc),ZR=v({},Fc,{dataTransfer:0}),QR=Xt(ZR),GR=v({},ti,{relatedTarget:0}),Qf=Xt(GR),YR=v({},Uo,{animationName:0,elapsedTime:0,pseudoElement:0}),KR=Xt(YR),XR=v({},Uo,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),JR=Xt(XR),WR=v({},Uo,{data:0}),Jg=Xt(WR),e2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t2={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},n2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function r2(n){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(n):(n=n2[n])?!!o[n]:!1}function Gf(){return r2}var o2=v({},ti,{key:function(n){if(n.key){var o=e2[n.key]||n.key;if(o!=="Unidentified")return o}return n.type==="keypress"?(n=Uc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?t2[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gf,charCode:function(n){return n.type==="keypress"?Uc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Uc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),s2=Xt(o2),a2=v({},Fc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wg=Xt(a2),i2=v({},ti,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gf}),c2=Xt(i2),l2=v({},Uo,{propertyName:0,elapsedTime:0,pseudoElement:0}),u2=Xt(l2),f2=v({},Fc,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),d2=Xt(f2),h2=v({},Uo,{newState:0,oldState:0}),p2=Xt(h2),m2=[9,13,27,32],Yf=vr&&"CompositionEvent"in window,ri=null;vr&&"documentMode"in document&&(ri=document.documentMode);var g2=vr&&"TextEvent"in window&&!ri,ey=vr&&(!Yf||ri&&8<ri&&11>=ri),ty=" ",ny=!1;function ry(n,o){switch(n){case"keyup":return m2.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oy(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ps=!1;function y2(n,o){switch(n){case"compositionend":return oy(o);case"keypress":return o.which!==32?null:(ny=!0,ty);case"textInput":return n=o.data,n===ty&&ny?null:n;default:return null}}function v2(n,o){if(Ps)return n==="compositionend"||!Yf&&ry(n,o)?(n=Yg(),$c=Vf=Qr=null,Ps=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return ey&&o.locale!=="ko"?null:o.data;default:return null}}var b2={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function sy(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o==="input"?!!b2[n.type]:o==="textarea"}function ay(n,o,a,l){zs?Ds?Ds.push(l):Ds=[l]:zs=l,o=Nl(o,"onChange"),0<o.length&&(a=new qc("onChange","change",null,a,l),n.push({event:a,listeners:o}))}var oi=null,si=null;function w2(n){qb(n,0)}function Vc(n){var o=Ja(n);if(Bg(o))return n}function iy(n,o){if(n==="change")return o}var cy=!1;if(vr){var Kf;if(vr){var Xf="oninput"in document;if(!Xf){var ly=document.createElement("div");ly.setAttribute("oninput","return;"),Xf=typeof ly.oninput=="function"}Kf=Xf}else Kf=!1;cy=Kf&&(!document.documentMode||9<document.documentMode)}function uy(){oi&&(oi.detachEvent("onpropertychange",fy),si=oi=null)}function fy(n){if(n.propertyName==="value"&&Vc(si)){var o=[];ay(o,si,n,Bf(n)),Gg(w2,o)}}function S2(n,o,a){n==="focusin"?(uy(),oi=o,si=a,oi.attachEvent("onpropertychange",fy)):n==="focusout"&&uy()}function x2(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Vc(si)}function _2(n,o){if(n==="click")return Vc(o)}function C2(n,o){if(n==="input"||n==="change")return Vc(o)}function E2(n,o){return n===o&&(n!==0||1/n===1/o)||n!==n&&o!==o}var un=typeof Object.is=="function"?Object.is:E2;function ai(n,o){if(un(n,o))return!0;if(typeof n!="object"||n===null||typeof o!="object"||o===null)return!1;var a=Object.keys(n),l=Object.keys(o);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var d=a[l];if(!Ee.call(o,d)||!un(n[d],o[d]))return!1}return!0}function dy(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function hy(n,o){var a=dy(n);n=0;for(var l;a;){if(a.nodeType===3){if(l=n+a.textContent.length,n<=o&&l>=o)return{node:a,offset:o-n};n=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=dy(a)}}function py(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?py(n,o.parentNode):"contains"in n?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function my(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var o=Lc(n.document);o instanceof n.HTMLIFrameElement;){try{var a=typeof o.contentWindow.location.href=="string"}catch{a=!1}if(a)n=o.contentWindow;else break;o=Lc(n.document)}return o}function Jf(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}var R2=vr&&"documentMode"in document&&11>=document.documentMode,Ls=null,Wf=null,ii=null,ed=!1;function gy(n,o,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ed||Ls==null||Ls!==Lc(l)||(l=Ls,"selectionStart"in l&&Jf(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ii&&ai(ii,l)||(ii=l,l=Nl(Wf,"onSelect"),0<l.length&&(o=new qc("onSelect","select",null,o,a),n.push({event:o,listeners:l}),o.target=Ls)))}function Bo(n,o){var a={};return a[n.toLowerCase()]=o.toLowerCase(),a["Webkit"+n]="webkit"+o,a["Moz"+n]="moz"+o,a}var Is={animationend:Bo("Animation","AnimationEnd"),animationiteration:Bo("Animation","AnimationIteration"),animationstart:Bo("Animation","AnimationStart"),transitionrun:Bo("Transition","TransitionRun"),transitionstart:Bo("Transition","TransitionStart"),transitioncancel:Bo("Transition","TransitionCancel"),transitionend:Bo("Transition","TransitionEnd")},td={},yy={};vr&&(yy=document.createElement("div").style,"AnimationEvent"in window||(delete Is.animationend.animation,delete Is.animationiteration.animation,delete Is.animationstart.animation),"TransitionEvent"in window||delete Is.transitionend.transition);function qo(n){if(td[n])return td[n];if(!Is[n])return n;var o=Is[n],a;for(a in o)if(o.hasOwnProperty(a)&&a in yy)return td[n]=o[a];return n}var vy=qo("animationend"),by=qo("animationiteration"),wy=qo("animationstart"),T2=qo("transitionrun"),A2=qo("transitionstart"),O2=qo("transitioncancel"),Sy=qo("transitionend"),xy=new Map,nd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");nd.push("scrollEnd");function qn(n,o){xy.set(n,o),$o(o,[n])}var Hc=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Cn=[],$s=0,rd=0;function Zc(){for(var n=$s,o=rd=$s=0;o<n;){var a=Cn[o];Cn[o++]=null;var l=Cn[o];Cn[o++]=null;var d=Cn[o];Cn[o++]=null;var m=Cn[o];if(Cn[o++]=null,l!==null&&d!==null){var S=l.pending;S===null?d.next=d:(d.next=S.next,S.next=d),l.pending=d}m!==0&&_y(a,d,m)}}function Qc(n,o,a,l){Cn[$s++]=n,Cn[$s++]=o,Cn[$s++]=a,Cn[$s++]=l,rd|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function od(n,o,a,l){return Qc(n,o,a,l),Gc(n)}function Fo(n,o){return Qc(n,null,null,o),Gc(n)}function _y(n,o,a){n.lanes|=a;var l=n.alternate;l!==null&&(l.lanes|=a);for(var d=!1,m=n.return;m!==null;)m.childLanes|=a,l=m.alternate,l!==null&&(l.childLanes|=a),m.tag===22&&(n=m.stateNode,n===null||n._visibility&1||(d=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,d&&o!==null&&(d=31-ln(a),n=m.hiddenUpdates,l=n[d],l===null?n[d]=[o]:l.push(o),o.lane=a|536870912),m):null}function Gc(n){if(50<Oi)throw Oi=0,hh=null,Error(s(185));for(var o=n.return;o!==null;)n=o,o=n.return;return n.tag===3?n.stateNode:null}var Us={};function k2(n,o,a,l){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fn(n,o,a,l){return new k2(n,o,a,l)}function sd(n){return n=n.prototype,!(!n||!n.isReactComponent)}function br(n,o){var a=n.alternate;return a===null?(a=fn(n.tag,o,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=o,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&65011712,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,o=n.dependencies,a.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a.refCleanup=n.refCleanup,a}function Cy(n,o){n.flags&=65011714;var a=n.alternate;return a===null?(n.childLanes=0,n.lanes=o,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,o=a.dependencies,n.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),n}function Yc(n,o,a,l,d,m){var S=0;if(l=n,typeof n=="function")sd(n)&&(S=1);else if(typeof n=="string")S=DT(n,a,oe.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case G:return n=fn(31,a,o,d),n.elementType=G,n.lanes=m,n;case x:return Vo(a.children,d,m,o);case C:S=8,d|=24;break;case O:return n=fn(12,a,o,d|2),n.elementType=O,n.lanes=m,n;case U:return n=fn(13,a,o,d),n.elementType=U,n.lanes=m,n;case H:return n=fn(19,a,o,d),n.elementType=H,n.lanes=m,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case k:S=10;break e;case M:S=9;break e;case D:S=11;break e;case L:S=14;break e;case j:S=16,l=null;break e}S=29,a=Error(s(130,n===null?"null":typeof n,"")),l=null}return o=fn(S,a,o,d),o.elementType=n,o.type=l,o.lanes=m,o}function Vo(n,o,a,l){return n=fn(7,n,l,o),n.lanes=a,n}function ad(n,o,a){return n=fn(6,n,null,o),n.lanes=a,n}function Ey(n){var o=fn(18,null,null,0);return o.stateNode=n,o}function id(n,o,a){return o=fn(4,n.children!==null?n.children:[],n.key,o),o.lanes=a,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}var Ry=new WeakMap;function En(n,o){if(typeof n=="object"&&n!==null){var a=Ry.get(n);return a!==void 0?a:(o={value:n,source:o,stack:se(o)},Ry.set(n,o),o)}return{value:n,source:o,stack:se(o)}}var Bs=[],qs=0,Kc=null,ci=0,Rn=[],Tn=0,Gr=null,Wn=1,er="";function wr(n,o){Bs[qs++]=ci,Bs[qs++]=Kc,Kc=n,ci=o}function Ty(n,o,a){Rn[Tn++]=Wn,Rn[Tn++]=er,Rn[Tn++]=Gr,Gr=n;var l=Wn;n=er;var d=32-ln(l)-1;l&=~(1<<d),a+=1;var m=32-ln(o)+d;if(30<m){var S=d-d%5;m=(l&(1<<S)-1).toString(32),l>>=S,d-=S,Wn=1<<32-ln(o)+d|a<<d|l,er=m+n}else Wn=1<<m|a<<d|l,er=n}function cd(n){n.return!==null&&(wr(n,1),Ty(n,1,0))}function ld(n){for(;n===Kc;)Kc=Bs[--qs],Bs[qs]=null,ci=Bs[--qs],Bs[qs]=null;for(;n===Gr;)Gr=Rn[--Tn],Rn[Tn]=null,er=Rn[--Tn],Rn[Tn]=null,Wn=Rn[--Tn],Rn[Tn]=null}function Ay(n,o){Rn[Tn++]=Wn,Rn[Tn++]=er,Rn[Tn++]=Gr,Wn=o.id,er=o.overflow,Gr=n}var Pt=null,ot=null,Be=!1,Yr=null,An=!1,ud=Error(s(519));function Kr(n){var o=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw li(En(o,n)),ud}function Oy(n){var o=n.stateNode,a=n.type,l=n.memoizedProps;switch(o[Dt]=n,o[Kt]=l,a){case"dialog":Pe("cancel",o),Pe("close",o);break;case"iframe":case"object":case"embed":Pe("load",o);break;case"video":case"audio":for(a=0;a<Mi.length;a++)Pe(Mi[a],o);break;case"source":Pe("error",o);break;case"img":case"image":case"link":Pe("error",o),Pe("load",o);break;case"details":Pe("toggle",o);break;case"input":Pe("invalid",o),qg(o,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Pe("invalid",o);break;case"textarea":Pe("invalid",o),Vg(o,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||o.textContent===""+a||l.suppressHydrationWarning===!0||Zb(o.textContent,a)?(l.popover!=null&&(Pe("beforetoggle",o),Pe("toggle",o)),l.onScroll!=null&&Pe("scroll",o),l.onScrollEnd!=null&&Pe("scrollend",o),l.onClick!=null&&(o.onclick=yr),o=!0):o=!1,o||Kr(n,!0)}function ky(n){for(Pt=n.return;Pt;)switch(Pt.tag){case 5:case 31:case 13:An=!1;return;case 27:case 3:An=!0;return;default:Pt=Pt.return}}function Fs(n){if(n!==Pt)return!1;if(!Be)return ky(n),Be=!0,!1;var o=n.tag,a;if((a=o!==3&&o!==27)&&((a=o===5)&&(a=n.type,a=!(a!=="form"&&a!=="button")||Ah(n.type,n.memoizedProps)),a=!a),a&&ot&&Kr(n),ky(n),o===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));ot=t0(n)}else if(o===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));ot=t0(n)}else o===27?(o=ot,uo(n.type)?(n=jh,jh=null,ot=n):ot=o):ot=Pt?kn(n.stateNode.nextSibling):null;return!0}function Ho(){ot=Pt=null,Be=!1}function fd(){var n=Yr;return n!==null&&(tn===null?tn=n:tn.push.apply(tn,n),Yr=null),n}function li(n){Yr===null?Yr=[n]:Yr.push(n)}var dd=z(null),Zo=null,Sr=null;function Xr(n,o,a){ne(dd,o._currentValue),o._currentValue=a}function xr(n){n._currentValue=dd.current,Q(dd)}function hd(n,o,a){for(;n!==null;){var l=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,l!==null&&(l.childLanes|=o)):l!==null&&(l.childLanes&o)!==o&&(l.childLanes|=o),n===a)break;n=n.return}}function pd(n,o,a,l){var d=n.child;for(d!==null&&(d.return=n);d!==null;){var m=d.dependencies;if(m!==null){var S=d.child;m=m.firstContext;e:for(;m!==null;){var R=m;m=d;for(var N=0;N<o.length;N++)if(R.context===o[N]){m.lanes|=a,R=m.alternate,R!==null&&(R.lanes|=a),hd(m.return,a,n),l||(S=null);break e}m=R.next}}else if(d.tag===18){if(S=d.return,S===null)throw Error(s(341));S.lanes|=a,m=S.alternate,m!==null&&(m.lanes|=a),hd(S,a,n),S=null}else S=d.child;if(S!==null)S.return=d;else for(S=d;S!==null;){if(S===n){S=null;break}if(d=S.sibling,d!==null){d.return=S.return,S=d;break}S=S.return}d=S}}function Vs(n,o,a,l){n=null;for(var d=o,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var S=d.alternate;if(S===null)throw Error(s(387));if(S=S.memoizedProps,S!==null){var R=d.type;un(d.pendingProps.value,S.value)||(n!==null?n.push(R):n=[R])}}else if(d===X.current){if(S=d.alternate,S===null)throw Error(s(387));S.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(n!==null?n.push(Pi):n=[Pi])}d=d.return}n!==null&&pd(o,n,a,l),o.flags|=262144}function Xc(n){for(n=n.firstContext;n!==null;){if(!un(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function Qo(n){Zo=n,Sr=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function Lt(n){return My(Zo,n)}function Jc(n,o){return Zo===null&&Qo(n),My(n,o)}function My(n,o){var a=o._currentValue;if(o={context:o,memoizedValue:a,next:null},Sr===null){if(n===null)throw Error(s(308));Sr=o,n.dependencies={lanes:0,firstContext:o},n.flags|=524288}else Sr=Sr.next=o;return a}var M2=typeof AbortController<"u"?AbortController:function(){var n=[],o=this.signal={aborted:!1,addEventListener:function(a,l){n.push(l)}};this.abort=function(){o.aborted=!0,n.forEach(function(a){return a()})}},N2=e.unstable_scheduleCallback,j2=e.unstable_NormalPriority,bt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function md(){return{controller:new M2,data:new Map,refCount:0}}function ui(n){n.refCount--,n.refCount===0&&N2(j2,function(){n.controller.abort()})}var fi=null,gd=0,Hs=0,Zs=null;function z2(n,o){if(fi===null){var a=fi=[];gd=0,Hs=bh(),Zs={status:"pending",value:void 0,then:function(l){a.push(l)}}}return gd++,o.then(Ny,Ny),o}function Ny(){if(--gd===0&&fi!==null){Zs!==null&&(Zs.status="fulfilled");var n=fi;fi=null,Hs=0,Zs=null;for(var o=0;o<n.length;o++)(0,n[o])()}}function D2(n,o){var a=[],l={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return n.then(function(){l.status="fulfilled",l.value=o;for(var d=0;d<a.length;d++)(0,a[d])(o)},function(d){for(l.status="rejected",l.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),l}var jy=I.S;I.S=function(n,o){gb=Vt(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&z2(n,o),jy!==null&&jy(n,o)};var Go=z(null);function yd(){var n=Go.current;return n!==null?n:We.pooledCache}function Wc(n,o){o===null?ne(Go,Go.current):ne(Go,o.pool)}function zy(){var n=yd();return n===null?null:{parent:bt._currentValue,pool:n}}var Qs=Error(s(460)),vd=Error(s(474)),el=Error(s(542)),tl={then:function(){}};function Dy(n){return n=n.status,n==="fulfilled"||n==="rejected"}function Py(n,o,a){switch(a=n[a],a===void 0?n.push(o):a!==o&&(o.then(yr,yr),o=a),o.status){case"fulfilled":return o.value;case"rejected":throw n=o.reason,Iy(n),n;default:if(typeof o.status=="string")o.then(yr,yr);else{if(n=We,n!==null&&100<n.shellSuspendCounter)throw Error(s(482));n=o,n.status="pending",n.then(function(l){if(o.status==="pending"){var d=o;d.status="fulfilled",d.value=l}},function(l){if(o.status==="pending"){var d=o;d.status="rejected",d.reason=l}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw n=o.reason,Iy(n),n}throw Ko=o,Qs}}function Yo(n){try{var o=n._init;return o(n._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ko=a,Qs):a}}var Ko=null;function Ly(){if(Ko===null)throw Error(s(459));var n=Ko;return Ko=null,n}function Iy(n){if(n===Qs||n===el)throw Error(s(483))}var Gs=null,di=0;function nl(n){var o=di;return di+=1,Gs===null&&(Gs=[]),Py(Gs,n,o)}function hi(n,o){o=o.props.ref,n.ref=o!==void 0?o:null}function rl(n,o){throw o.$$typeof===b?Error(s(525)):(n=Object.prototype.toString.call(o),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":n)))}function $y(n){function o($,P){if(n){var B=$.deletions;B===null?($.deletions=[P],$.flags|=16):B.push(P)}}function a($,P){if(!n)return null;for(;P!==null;)o($,P),P=P.sibling;return null}function l($){for(var P=new Map;$!==null;)$.key!==null?P.set($.key,$):P.set($.index,$),$=$.sibling;return P}function d($,P){return $=br($,P),$.index=0,$.sibling=null,$}function m($,P,B){return $.index=B,n?(B=$.alternate,B!==null?(B=B.index,B<P?($.flags|=67108866,P):B):($.flags|=67108866,P)):($.flags|=1048576,P)}function S($){return n&&$.alternate===null&&($.flags|=67108866),$}function R($,P,B,J){return P===null||P.tag!==6?(P=ad(B,$.mode,J),P.return=$,P):(P=d(P,B),P.return=$,P)}function N($,P,B,J){var be=B.type;return be===x?Y($,P,B.props.children,J,B.key):P!==null&&(P.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===j&&Yo(be)===P.type)?(P=d(P,B.props),hi(P,B),P.return=$,P):(P=Yc(B.type,B.key,B.props,null,$.mode,J),hi(P,B),P.return=$,P)}function q($,P,B,J){return P===null||P.tag!==4||P.stateNode.containerInfo!==B.containerInfo||P.stateNode.implementation!==B.implementation?(P=id(B,$.mode,J),P.return=$,P):(P=d(P,B.children||[]),P.return=$,P)}function Y($,P,B,J,be){return P===null||P.tag!==7?(P=Vo(B,$.mode,J,be),P.return=$,P):(P=d(P,B),P.return=$,P)}function ee($,P,B){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=ad(""+P,$.mode,B),P.return=$,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case _:return B=Yc(P.type,P.key,P.props,null,$.mode,B),hi(B,P),B.return=$,B;case E:return P=id(P,$.mode,B),P.return=$,P;case j:return P=Yo(P),ee($,P,B)}if(me(P)||te(P))return P=Vo(P,$.mode,B,null),P.return=$,P;if(typeof P.then=="function")return ee($,nl(P),B);if(P.$$typeof===k)return ee($,Jc($,P),B);rl($,P)}return null}function F($,P,B,J){var be=P!==null?P.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return be!==null?null:R($,P,""+B,J);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case _:return B.key===be?N($,P,B,J):null;case E:return B.key===be?q($,P,B,J):null;case j:return B=Yo(B),F($,P,B,J)}if(me(B)||te(B))return be!==null?null:Y($,P,B,J,null);if(typeof B.then=="function")return F($,P,nl(B),J);if(B.$$typeof===k)return F($,P,Jc($,B),J);rl($,B)}return null}function Z($,P,B,J,be){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return $=$.get(B)||null,R(P,$,""+J,be);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case _:return $=$.get(J.key===null?B:J.key)||null,N(P,$,J,be);case E:return $=$.get(J.key===null?B:J.key)||null,q(P,$,J,be);case j:return J=Yo(J),Z($,P,B,J,be)}if(me(J)||te(J))return $=$.get(B)||null,Y(P,$,J,be,null);if(typeof J.then=="function")return Z($,P,B,nl(J),be);if(J.$$typeof===k)return Z($,P,B,Jc(P,J),be);rl(P,J)}return null}function ue($,P,B,J){for(var be=null,qe=null,ge=P,Me=P=0,$e=null;ge!==null&&Me<B.length;Me++){ge.index>Me?($e=ge,ge=null):$e=ge.sibling;var Fe=F($,ge,B[Me],J);if(Fe===null){ge===null&&(ge=$e);break}n&&ge&&Fe.alternate===null&&o($,ge),P=m(Fe,P,Me),qe===null?be=Fe:qe.sibling=Fe,qe=Fe,ge=$e}if(Me===B.length)return a($,ge),Be&&wr($,Me),be;if(ge===null){for(;Me<B.length;Me++)ge=ee($,B[Me],J),ge!==null&&(P=m(ge,P,Me),qe===null?be=ge:qe.sibling=ge,qe=ge);return Be&&wr($,Me),be}for(ge=l(ge);Me<B.length;Me++)$e=Z(ge,$,Me,B[Me],J),$e!==null&&(n&&$e.alternate!==null&&ge.delete($e.key===null?Me:$e.key),P=m($e,P,Me),qe===null?be=$e:qe.sibling=$e,qe=$e);return n&&ge.forEach(function(go){return o($,go)}),Be&&wr($,Me),be}function Ce($,P,B,J){if(B==null)throw Error(s(151));for(var be=null,qe=null,ge=P,Me=P=0,$e=null,Fe=B.next();ge!==null&&!Fe.done;Me++,Fe=B.next()){ge.index>Me?($e=ge,ge=null):$e=ge.sibling;var go=F($,ge,Fe.value,J);if(go===null){ge===null&&(ge=$e);break}n&&ge&&go.alternate===null&&o($,ge),P=m(go,P,Me),qe===null?be=go:qe.sibling=go,qe=go,ge=$e}if(Fe.done)return a($,ge),Be&&wr($,Me),be;if(ge===null){for(;!Fe.done;Me++,Fe=B.next())Fe=ee($,Fe.value,J),Fe!==null&&(P=m(Fe,P,Me),qe===null?be=Fe:qe.sibling=Fe,qe=Fe);return Be&&wr($,Me),be}for(ge=l(ge);!Fe.done;Me++,Fe=B.next())Fe=Z(ge,$,Me,Fe.value,J),Fe!==null&&(n&&Fe.alternate!==null&&ge.delete(Fe.key===null?Me:Fe.key),P=m(Fe,P,Me),qe===null?be=Fe:qe.sibling=Fe,qe=Fe);return n&&ge.forEach(function(ZT){return o($,ZT)}),Be&&wr($,Me),be}function Je($,P,B,J){if(typeof B=="object"&&B!==null&&B.type===x&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case _:e:{for(var be=B.key;P!==null;){if(P.key===be){if(be=B.type,be===x){if(P.tag===7){a($,P.sibling),J=d(P,B.props.children),J.return=$,$=J;break e}}else if(P.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===j&&Yo(be)===P.type){a($,P.sibling),J=d(P,B.props),hi(J,B),J.return=$,$=J;break e}a($,P);break}else o($,P);P=P.sibling}B.type===x?(J=Vo(B.props.children,$.mode,J,B.key),J.return=$,$=J):(J=Yc(B.type,B.key,B.props,null,$.mode,J),hi(J,B),J.return=$,$=J)}return S($);case E:e:{for(be=B.key;P!==null;){if(P.key===be)if(P.tag===4&&P.stateNode.containerInfo===B.containerInfo&&P.stateNode.implementation===B.implementation){a($,P.sibling),J=d(P,B.children||[]),J.return=$,$=J;break e}else{a($,P);break}else o($,P);P=P.sibling}J=id(B,$.mode,J),J.return=$,$=J}return S($);case j:return B=Yo(B),Je($,P,B,J)}if(me(B))return ue($,P,B,J);if(te(B)){if(be=te(B),typeof be!="function")throw Error(s(150));return B=be.call(B),Ce($,P,B,J)}if(typeof B.then=="function")return Je($,P,nl(B),J);if(B.$$typeof===k)return Je($,P,Jc($,B),J);rl($,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,P!==null&&P.tag===6?(a($,P.sibling),J=d(P,B),J.return=$,$=J):(a($,P),J=ad(B,$.mode,J),J.return=$,$=J),S($)):a($,P)}return function($,P,B,J){try{di=0;var be=Je($,P,B,J);return Gs=null,be}catch(ge){if(ge===Qs||ge===el)throw ge;var qe=fn(29,ge,null,$.mode);return qe.lanes=J,qe.return=$,qe}}}var Xo=$y(!0),Uy=$y(!1),Jr=!1;function bd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wd(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Wr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function eo(n,o,a){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Ze&2)!==0){var d=l.pending;return d===null?o.next=o:(o.next=d.next,d.next=o),l.pending=o,o=Gc(n),_y(n,null,a),o}return Qc(n,l,o,a),Gc(n)}function pi(n,o,a){if(o=o.updateQueue,o!==null&&(o=o.shared,(a&4194048)!==0)){var l=o.lanes;l&=n.pendingLanes,a|=l,o.lanes=a,Mg(n,a)}}function Sd(n,o){var a=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var d=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};m===null?d=m=S:m=m.next=S,a=a.next}while(a!==null);m===null?d=m=o:m=m.next=o}else d=m=o;a={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:l.shared,callbacks:l.callbacks},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=o:n.next=o,a.lastBaseUpdate=o}var xd=!1;function mi(){if(xd){var n=Zs;if(n!==null)throw n}}function gi(n,o,a,l){xd=!1;var d=n.updateQueue;Jr=!1;var m=d.firstBaseUpdate,S=d.lastBaseUpdate,R=d.shared.pending;if(R!==null){d.shared.pending=null;var N=R,q=N.next;N.next=null,S===null?m=q:S.next=q,S=N;var Y=n.alternate;Y!==null&&(Y=Y.updateQueue,R=Y.lastBaseUpdate,R!==S&&(R===null?Y.firstBaseUpdate=q:R.next=q,Y.lastBaseUpdate=N))}if(m!==null){var ee=d.baseState;S=0,Y=q=N=null,R=m;do{var F=R.lane&-536870913,Z=F!==R.lane;if(Z?(Ie&F)===F:(l&F)===F){F!==0&&F===Hs&&(xd=!0),Y!==null&&(Y=Y.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var ue=n,Ce=R;F=o;var Je=a;switch(Ce.tag){case 1:if(ue=Ce.payload,typeof ue=="function"){ee=ue.call(Je,ee,F);break e}ee=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=Ce.payload,F=typeof ue=="function"?ue.call(Je,ee,F):ue,F==null)break e;ee=v({},ee,F);break e;case 2:Jr=!0}}F=R.callback,F!==null&&(n.flags|=64,Z&&(n.flags|=8192),Z=d.callbacks,Z===null?d.callbacks=[F]:Z.push(F))}else Z={lane:F,tag:R.tag,payload:R.payload,callback:R.callback,next:null},Y===null?(q=Y=Z,N=ee):Y=Y.next=Z,S|=F;if(R=R.next,R===null){if(R=d.shared.pending,R===null)break;Z=R,R=Z.next,Z.next=null,d.lastBaseUpdate=Z,d.shared.pending=null}}while(!0);Y===null&&(N=ee),d.baseState=N,d.firstBaseUpdate=q,d.lastBaseUpdate=Y,m===null&&(d.shared.lanes=0),so|=S,n.lanes=S,n.memoizedState=ee}}function By(n,o){if(typeof n!="function")throw Error(s(191,n));n.call(o)}function qy(n,o){var a=n.callbacks;if(a!==null)for(n.callbacks=null,n=0;n<a.length;n++)By(a[n],o)}var Ys=z(null),ol=z(0);function Fy(n,o){n=Mr,ne(ol,n),ne(Ys,o),Mr=n|o.baseLanes}function _d(){ne(ol,Mr),ne(Ys,Ys.current)}function Cd(){Mr=ol.current,Q(Ys),Q(ol)}var dn=z(null),On=null;function to(n){var o=n.alternate;ne(mt,mt.current&1),ne(dn,n),On===null&&(o===null||Ys.current!==null||o.memoizedState!==null)&&(On=n)}function Ed(n){ne(mt,mt.current),ne(dn,n),On===null&&(On=n)}function Vy(n){n.tag===22?(ne(mt,mt.current),ne(dn,n),On===null&&(On=n)):no()}function no(){ne(mt,mt.current),ne(dn,dn.current)}function hn(n){Q(dn),On===n&&(On=null),Q(mt)}var mt=z(0);function sl(n){for(var o=n;o!==null;){if(o.tag===13){var a=o.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Mh(a)||Nh(a)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var _r=0,Oe=null,Ke=null,wt=null,al=!1,Ks=!1,Jo=!1,il=0,yi=0,Xs=null,P2=0;function ft(){throw Error(s(321))}function Rd(n,o){if(o===null)return!1;for(var a=0;a<o.length&&a<n.length;a++)if(!un(n[a],o[a]))return!1;return!0}function Td(n,o,a,l,d,m){return _r=m,Oe=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,I.H=n===null||n.memoizedState===null?Tv:qd,Jo=!1,m=a(l,d),Jo=!1,Ks&&(m=Zy(o,a,l,d)),Hy(n),m}function Hy(n){I.H=wi;var o=Ke!==null&&Ke.next!==null;if(_r=0,wt=Ke=Oe=null,al=!1,yi=0,Xs=null,o)throw Error(s(300));n===null||St||(n=n.dependencies,n!==null&&Xc(n)&&(St=!0))}function Zy(n,o,a,l){Oe=n;var d=0;do{if(Ks&&(Xs=null),yi=0,Ks=!1,25<=d)throw Error(s(301));if(d+=1,wt=Ke=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}I.H=Av,m=o(a,l)}while(Ks);return m}function L2(){var n=I.H,o=n.useState()[0];return o=typeof o.then=="function"?vi(o):o,n=n.useState()[0],(Ke!==null?Ke.memoizedState:null)!==n&&(Oe.flags|=1024),o}function Ad(){var n=il!==0;return il=0,n}function Od(n,o,a){o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~a}function kd(n){if(al){for(n=n.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}al=!1}_r=0,wt=Ke=Oe=null,Ks=!1,yi=il=0,Xs=null}function Ht(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Oe.memoizedState=wt=n:wt=wt.next=n,wt}function gt(){if(Ke===null){var n=Oe.alternate;n=n!==null?n.memoizedState:null}else n=Ke.next;var o=wt===null?Oe.memoizedState:wt.next;if(o!==null)wt=o,Ke=n;else{if(n===null)throw Oe.alternate===null?Error(s(467)):Error(s(310));Ke=n,n={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},wt===null?Oe.memoizedState=wt=n:wt=wt.next=n}return wt}function cl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vi(n){var o=yi;return yi+=1,Xs===null&&(Xs=[]),n=Py(Xs,n,o),o=Oe,(wt===null?o.memoizedState:wt.next)===null&&(o=o.alternate,I.H=o===null||o.memoizedState===null?Tv:qd),n}function ll(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return vi(n);if(n.$$typeof===k)return Lt(n)}throw Error(s(438,String(n)))}function Md(n){var o=null,a=Oe.updateQueue;if(a!==null&&(o=a.memoCache),o==null){var l=Oe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(o={data:l.data.map(function(d){return d.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),a===null&&(a=cl(),Oe.updateQueue=a),a.memoCache=o,a=o.data[o.index],a===void 0)for(a=o.data[o.index]=Array(n),l=0;l<n;l++)a[l]=ie;return o.index++,a}function Cr(n,o){return typeof o=="function"?o(n):o}function ul(n){var o=gt();return Nd(o,Ke,n)}function Nd(n,o,a){var l=n.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=a;var d=n.baseQueue,m=l.pending;if(m!==null){if(d!==null){var S=d.next;d.next=m.next,m.next=S}o.baseQueue=d=m,l.pending=null}if(m=n.baseState,d===null)n.memoizedState=m;else{o=d.next;var R=S=null,N=null,q=o,Y=!1;do{var ee=q.lane&-536870913;if(ee!==q.lane?(Ie&ee)===ee:(_r&ee)===ee){var F=q.revertLane;if(F===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),ee===Hs&&(Y=!0);else if((_r&F)===F){q=q.next,F===Hs&&(Y=!0);continue}else ee={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},N===null?(R=N=ee,S=m):N=N.next=ee,Oe.lanes|=F,so|=F;ee=q.action,Jo&&a(m,ee),m=q.hasEagerState?q.eagerState:a(m,ee)}else F={lane:ee,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},N===null?(R=N=F,S=m):N=N.next=F,Oe.lanes|=ee,so|=ee;q=q.next}while(q!==null&&q!==o);if(N===null?S=m:N.next=R,!un(m,n.memoizedState)&&(St=!0,Y&&(a=Zs,a!==null)))throw a;n.memoizedState=m,n.baseState=S,n.baseQueue=N,l.lastRenderedState=m}return d===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function jd(n){var o=gt(),a=o.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var l=a.dispatch,d=a.pending,m=o.memoizedState;if(d!==null){a.pending=null;var S=d=d.next;do m=n(m,S.action),S=S.next;while(S!==d);un(m,o.memoizedState)||(St=!0),o.memoizedState=m,o.baseQueue===null&&(o.baseState=m),a.lastRenderedState=m}return[m,l]}function Qy(n,o,a){var l=Oe,d=gt(),m=Be;if(m){if(a===void 0)throw Error(s(407));a=a()}else a=o();var S=!un((Ke||d).memoizedState,a);if(S&&(d.memoizedState=a,St=!0),d=d.queue,Pd(Ky.bind(null,l,d,n),[n]),d.getSnapshot!==o||S||wt!==null&&wt.memoizedState.tag&1){if(l.flags|=2048,Js(9,{destroy:void 0},Yy.bind(null,l,d,a,o),null),We===null)throw Error(s(349));m||(_r&127)!==0||Gy(l,o,a)}return a}function Gy(n,o,a){n.flags|=16384,n={getSnapshot:o,value:a},o=Oe.updateQueue,o===null?(o=cl(),Oe.updateQueue=o,o.stores=[n]):(a=o.stores,a===null?o.stores=[n]:a.push(n))}function Yy(n,o,a,l){o.value=a,o.getSnapshot=l,Xy(o)&&Jy(n)}function Ky(n,o,a){return a(function(){Xy(o)&&Jy(n)})}function Xy(n){var o=n.getSnapshot;n=n.value;try{var a=o();return!un(n,a)}catch{return!0}}function Jy(n){var o=Fo(n,2);o!==null&&nn(o,n,2)}function zd(n){var o=Ht();if(typeof n=="function"){var a=n;if(n=a(),Jo){Hr(!0);try{a()}finally{Hr(!1)}}}return o.memoizedState=o.baseState=n,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cr,lastRenderedState:n},o}function Wy(n,o,a,l){return n.baseState=a,Nd(n,Ke,typeof l=="function"?l:Cr)}function I2(n,o,a,l,d){if(hl(n))throw Error(s(485));if(n=o.action,n!==null){var m={payload:d,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){m.listeners.push(S)}};I.T!==null?a(!0):m.isTransition=!1,l(m),a=o.pending,a===null?(m.next=o.pending=m,ev(o,m)):(m.next=a.next,o.pending=a.next=m)}}function ev(n,o){var a=o.action,l=o.payload,d=n.state;if(o.isTransition){var m=I.T,S={};I.T=S;try{var R=a(d,l),N=I.S;N!==null&&N(S,R),tv(n,o,R)}catch(q){Dd(n,o,q)}finally{m!==null&&S.types!==null&&(m.types=S.types),I.T=m}}else try{m=a(d,l),tv(n,o,m)}catch(q){Dd(n,o,q)}}function tv(n,o,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){nv(n,o,l)},function(l){return Dd(n,o,l)}):nv(n,o,a)}function nv(n,o,a){o.status="fulfilled",o.value=a,rv(o),n.state=a,o=n.pending,o!==null&&(a=o.next,a===o?n.pending=null:(a=a.next,o.next=a,ev(n,a)))}function Dd(n,o,a){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do o.status="rejected",o.reason=a,rv(o),o=o.next;while(o!==l)}n.action=null}function rv(n){n=n.listeners;for(var o=0;o<n.length;o++)(0,n[o])()}function ov(n,o){return o}function sv(n,o){if(Be){var a=We.formState;if(a!==null){e:{var l=Oe;if(Be){if(ot){t:{for(var d=ot,m=An;d.nodeType!==8;){if(!m){d=null;break t}if(d=kn(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){ot=kn(d.nextSibling),l=d.data==="F!";break e}}Kr(l)}l=!1}l&&(o=a[0])}}return a=Ht(),a.memoizedState=a.baseState=o,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ov,lastRenderedState:o},a.queue=l,a=Cv.bind(null,Oe,l),l.dispatch=a,l=zd(!1),m=Bd.bind(null,Oe,!1,l.queue),l=Ht(),d={state:o,dispatch:null,action:n,pending:null},l.queue=d,a=I2.bind(null,Oe,d,m,a),d.dispatch=a,l.memoizedState=n,[o,a,!1]}function av(n){var o=gt();return iv(o,Ke,n)}function iv(n,o,a){if(o=Nd(n,o,ov)[0],n=ul(Cr)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var l=vi(o)}catch(S){throw S===Qs?el:S}else l=o;o=gt();var d=o.queue,m=d.dispatch;return a!==o.memoizedState&&(Oe.flags|=2048,Js(9,{destroy:void 0},$2.bind(null,d,a),null)),[l,m,n]}function $2(n,o){n.action=o}function cv(n){var o=gt(),a=Ke;if(a!==null)return iv(o,a,n);gt(),o=o.memoizedState,a=gt();var l=a.queue.dispatch;return a.memoizedState=n,[o,l,!1]}function Js(n,o,a,l){return n={tag:n,create:a,deps:l,inst:o,next:null},o=Oe.updateQueue,o===null&&(o=cl(),Oe.updateQueue=o),a=o.lastEffect,a===null?o.lastEffect=n.next=n:(l=a.next,a.next=n,n.next=l,o.lastEffect=n),n}function lv(){return gt().memoizedState}function fl(n,o,a,l){var d=Ht();Oe.flags|=n,d.memoizedState=Js(1|o,{destroy:void 0},a,l===void 0?null:l)}function dl(n,o,a,l){var d=gt();l=l===void 0?null:l;var m=d.memoizedState.inst;Ke!==null&&l!==null&&Rd(l,Ke.memoizedState.deps)?d.memoizedState=Js(o,m,a,l):(Oe.flags|=n,d.memoizedState=Js(1|o,m,a,l))}function uv(n,o){fl(8390656,8,n,o)}function Pd(n,o){dl(2048,8,n,o)}function U2(n){Oe.flags|=4;var o=Oe.updateQueue;if(o===null)o=cl(),Oe.updateQueue=o,o.events=[n];else{var a=o.events;a===null?o.events=[n]:a.push(n)}}function fv(n){var o=gt().memoizedState;return U2({ref:o,nextImpl:n}),function(){if((Ze&2)!==0)throw Error(s(440));return o.impl.apply(void 0,arguments)}}function dv(n,o){return dl(4,2,n,o)}function hv(n,o){return dl(4,4,n,o)}function pv(n,o){if(typeof o=="function"){n=n();var a=o(n);return function(){typeof a=="function"?a():o(null)}}if(o!=null)return n=n(),o.current=n,function(){o.current=null}}function mv(n,o,a){a=a!=null?a.concat([n]):null,dl(4,4,pv.bind(null,o,n),a)}function Ld(){}function gv(n,o){var a=gt();o=o===void 0?null:o;var l=a.memoizedState;return o!==null&&Rd(o,l[1])?l[0]:(a.memoizedState=[n,o],n)}function yv(n,o){var a=gt();o=o===void 0?null:o;var l=a.memoizedState;if(o!==null&&Rd(o,l[1]))return l[0];if(l=n(),Jo){Hr(!0);try{n()}finally{Hr(!1)}}return a.memoizedState=[l,o],l}function Id(n,o,a){return a===void 0||(_r&1073741824)!==0&&(Ie&261930)===0?n.memoizedState=o:(n.memoizedState=a,n=vb(),Oe.lanes|=n,so|=n,a)}function vv(n,o,a,l){return un(a,o)?a:Ys.current!==null?(n=Id(n,a,l),un(n,o)||(St=!0),n):(_r&42)===0||(_r&1073741824)!==0&&(Ie&261930)===0?(St=!0,n.memoizedState=a):(n=vb(),Oe.lanes|=n,so|=n,o)}function bv(n,o,a,l,d){var m=K.p;K.p=m!==0&&8>m?m:8;var S=I.T,R={};I.T=R,Bd(n,!1,o,a);try{var N=d(),q=I.S;if(q!==null&&q(R,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var Y=D2(N,l);bi(n,o,Y,gn(n))}else bi(n,o,l,gn(n))}catch(ee){bi(n,o,{then:function(){},status:"rejected",reason:ee},gn())}finally{K.p=m,S!==null&&R.types!==null&&(S.types=R.types),I.T=S}}function B2(){}function $d(n,o,a,l){if(n.tag!==5)throw Error(s(476));var d=wv(n).queue;bv(n,d,o,V,a===null?B2:function(){return Sv(n),a(l)})}function wv(n){var o=n.memoizedState;if(o!==null)return o;o={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cr,lastRenderedState:V},next:null};var a={};return o.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cr,lastRenderedState:a},next:null},n.memoizedState=o,n=n.alternate,n!==null&&(n.memoizedState=o),o}function Sv(n){var o=wv(n);o.next===null&&(o=n.alternate.memoizedState),bi(n,o.next.queue,{},gn())}function Ud(){return Lt(Pi)}function xv(){return gt().memoizedState}function _v(){return gt().memoizedState}function q2(n){for(var o=n.return;o!==null;){switch(o.tag){case 24:case 3:var a=gn();n=Wr(a);var l=eo(o,n,a);l!==null&&(nn(l,o,a),pi(l,o,a)),o={cache:md()},n.payload=o;return}o=o.return}}function F2(n,o,a){var l=gn();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},hl(n)?Ev(o,a):(a=od(n,o,a,l),a!==null&&(nn(a,n,l),Rv(a,o,l)))}function Cv(n,o,a){var l=gn();bi(n,o,a,l)}function bi(n,o,a,l){var d={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(hl(n))Ev(o,d);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=o.lastRenderedReducer,m!==null))try{var S=o.lastRenderedState,R=m(S,a);if(d.hasEagerState=!0,d.eagerState=R,un(R,S))return Qc(n,o,d,0),We===null&&Zc(),!1}catch{}if(a=od(n,o,d,l),a!==null)return nn(a,n,l),Rv(a,o,l),!0}return!1}function Bd(n,o,a,l){if(l={lane:2,revertLane:bh(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},hl(n)){if(o)throw Error(s(479))}else o=od(n,a,l,2),o!==null&&nn(o,n,2)}function hl(n){var o=n.alternate;return n===Oe||o!==null&&o===Oe}function Ev(n,o){Ks=al=!0;var a=n.pending;a===null?o.next=o:(o.next=a.next,a.next=o),n.pending=o}function Rv(n,o,a){if((a&4194048)!==0){var l=o.lanes;l&=n.pendingLanes,a|=l,o.lanes=a,Mg(n,a)}}var wi={readContext:Lt,use:ll,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};wi.useEffectEvent=ft;var Tv={readContext:Lt,use:ll,useCallback:function(n,o){return Ht().memoizedState=[n,o===void 0?null:o],n},useContext:Lt,useEffect:uv,useImperativeHandle:function(n,o,a){a=a!=null?a.concat([n]):null,fl(4194308,4,pv.bind(null,o,n),a)},useLayoutEffect:function(n,o){return fl(4194308,4,n,o)},useInsertionEffect:function(n,o){fl(4,2,n,o)},useMemo:function(n,o){var a=Ht();o=o===void 0?null:o;var l=n();if(Jo){Hr(!0);try{n()}finally{Hr(!1)}}return a.memoizedState=[l,o],l},useReducer:function(n,o,a){var l=Ht();if(a!==void 0){var d=a(o);if(Jo){Hr(!0);try{a(o)}finally{Hr(!1)}}}else d=o;return l.memoizedState=l.baseState=d,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:d},l.queue=n,n=n.dispatch=F2.bind(null,Oe,n),[l.memoizedState,n]},useRef:function(n){var o=Ht();return n={current:n},o.memoizedState=n},useState:function(n){n=zd(n);var o=n.queue,a=Cv.bind(null,Oe,o);return o.dispatch=a,[n.memoizedState,a]},useDebugValue:Ld,useDeferredValue:function(n,o){var a=Ht();return Id(a,n,o)},useTransition:function(){var n=zd(!1);return n=bv.bind(null,Oe,n.queue,!0,!1),Ht().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,o,a){var l=Oe,d=Ht();if(Be){if(a===void 0)throw Error(s(407));a=a()}else{if(a=o(),We===null)throw Error(s(349));(Ie&127)!==0||Gy(l,o,a)}d.memoizedState=a;var m={value:a,getSnapshot:o};return d.queue=m,uv(Ky.bind(null,l,m,n),[n]),l.flags|=2048,Js(9,{destroy:void 0},Yy.bind(null,l,m,a,o),null),a},useId:function(){var n=Ht(),o=We.identifierPrefix;if(Be){var a=er,l=Wn;a=(l&~(1<<32-ln(l)-1)).toString(32)+a,o="_"+o+"R_"+a,a=il++,0<a&&(o+="H"+a.toString(32)),o+="_"}else a=P2++,o="_"+o+"r_"+a.toString(32)+"_";return n.memoizedState=o},useHostTransitionStatus:Ud,useFormState:sv,useActionState:sv,useOptimistic:function(n){var o=Ht();o.memoizedState=o.baseState=n;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=a,o=Bd.bind(null,Oe,!0,a),a.dispatch=o,[n,o]},useMemoCache:Md,useCacheRefresh:function(){return Ht().memoizedState=q2.bind(null,Oe)},useEffectEvent:function(n){var o=Ht(),a={impl:n};return o.memoizedState=a,function(){if((Ze&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},qd={readContext:Lt,use:ll,useCallback:gv,useContext:Lt,useEffect:Pd,useImperativeHandle:mv,useInsertionEffect:dv,useLayoutEffect:hv,useMemo:yv,useReducer:ul,useRef:lv,useState:function(){return ul(Cr)},useDebugValue:Ld,useDeferredValue:function(n,o){var a=gt();return vv(a,Ke.memoizedState,n,o)},useTransition:function(){var n=ul(Cr)[0],o=gt().memoizedState;return[typeof n=="boolean"?n:vi(n),o]},useSyncExternalStore:Qy,useId:xv,useHostTransitionStatus:Ud,useFormState:av,useActionState:av,useOptimistic:function(n,o){var a=gt();return Wy(a,Ke,n,o)},useMemoCache:Md,useCacheRefresh:_v};qd.useEffectEvent=fv;var Av={readContext:Lt,use:ll,useCallback:gv,useContext:Lt,useEffect:Pd,useImperativeHandle:mv,useInsertionEffect:dv,useLayoutEffect:hv,useMemo:yv,useReducer:jd,useRef:lv,useState:function(){return jd(Cr)},useDebugValue:Ld,useDeferredValue:function(n,o){var a=gt();return Ke===null?Id(a,n,o):vv(a,Ke.memoizedState,n,o)},useTransition:function(){var n=jd(Cr)[0],o=gt().memoizedState;return[typeof n=="boolean"?n:vi(n),o]},useSyncExternalStore:Qy,useId:xv,useHostTransitionStatus:Ud,useFormState:cv,useActionState:cv,useOptimistic:function(n,o){var a=gt();return Ke!==null?Wy(a,Ke,n,o):(a.baseState=n,[n,a.queue.dispatch])},useMemoCache:Md,useCacheRefresh:_v};Av.useEffectEvent=fv;function Fd(n,o,a,l){o=n.memoizedState,a=a(l,o),a=a==null?o:v({},o,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var Vd={enqueueSetState:function(n,o,a){n=n._reactInternals;var l=gn(),d=Wr(l);d.payload=o,a!=null&&(d.callback=a),o=eo(n,d,l),o!==null&&(nn(o,n,l),pi(o,n,l))},enqueueReplaceState:function(n,o,a){n=n._reactInternals;var l=gn(),d=Wr(l);d.tag=1,d.payload=o,a!=null&&(d.callback=a),o=eo(n,d,l),o!==null&&(nn(o,n,l),pi(o,n,l))},enqueueForceUpdate:function(n,o){n=n._reactInternals;var a=gn(),l=Wr(a);l.tag=2,o!=null&&(l.callback=o),o=eo(n,l,a),o!==null&&(nn(o,n,a),pi(o,n,a))}};function Ov(n,o,a,l,d,m,S){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,m,S):o.prototype&&o.prototype.isPureReactComponent?!ai(a,l)||!ai(d,m):!0}function kv(n,o,a,l){n=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(a,l),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(a,l),o.state!==n&&Vd.enqueueReplaceState(o,o.state,null)}function Wo(n,o){var a=o;if("ref"in o){a={};for(var l in o)l!=="ref"&&(a[l]=o[l])}if(n=n.defaultProps){a===o&&(a=v({},a));for(var d in n)a[d]===void 0&&(a[d]=n[d])}return a}function Mv(n){Hc(n)}function Nv(n){console.error(n)}function jv(n){Hc(n)}function pl(n,o){try{var a=n.onUncaughtError;a(o.value,{componentStack:o.stack})}catch(l){setTimeout(function(){throw l})}}function zv(n,o,a){try{var l=n.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Hd(n,o,a){return a=Wr(a),a.tag=3,a.payload={element:null},a.callback=function(){pl(n,o)},a}function Dv(n){return n=Wr(n),n.tag=3,n}function Pv(n,o,a,l){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var m=l.value;n.payload=function(){return d(m)},n.callback=function(){zv(o,a,l)}}var S=a.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(n.callback=function(){zv(o,a,l),typeof d!="function"&&(ao===null?ao=new Set([this]):ao.add(this));var R=l.stack;this.componentDidCatch(l.value,{componentStack:R!==null?R:""})})}function V2(n,o,a,l,d){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(o=a.alternate,o!==null&&Vs(o,a,d,!0),a=dn.current,a!==null){switch(a.tag){case 31:case 13:return On===null?Rl():a.alternate===null&&dt===0&&(dt=3),a.flags&=-257,a.flags|=65536,a.lanes=d,l===tl?a.flags|=16384:(o=a.updateQueue,o===null?a.updateQueue=new Set([l]):o.add(l),gh(n,l,d)),!1;case 22:return a.flags|=65536,l===tl?a.flags|=16384:(o=a.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=o):(a=o.retryQueue,a===null?o.retryQueue=new Set([l]):a.add(l)),gh(n,l,d)),!1}throw Error(s(435,a.tag))}return gh(n,l,d),Rl(),!1}if(Be)return o=dn.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=d,l!==ud&&(n=Error(s(422),{cause:l}),li(En(n,a)))):(l!==ud&&(o=Error(s(423),{cause:l}),li(En(o,a))),n=n.current.alternate,n.flags|=65536,d&=-d,n.lanes|=d,l=En(l,a),d=Hd(n.stateNode,l,d),Sd(n,d),dt!==4&&(dt=2)),!1;var m=Error(s(520),{cause:l});if(m=En(m,a),Ai===null?Ai=[m]:Ai.push(m),dt!==4&&(dt=2),o===null)return!0;l=En(l,a),a=o;do{switch(a.tag){case 3:return a.flags|=65536,n=d&-d,a.lanes|=n,n=Hd(a.stateNode,l,n),Sd(a,n),!1;case 1:if(o=a.type,m=a.stateNode,(a.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(ao===null||!ao.has(m))))return a.flags|=65536,d&=-d,a.lanes|=d,d=Dv(d),Pv(d,n,a,l),Sd(a,d),!1}a=a.return}while(a!==null);return!1}var Zd=Error(s(461)),St=!1;function It(n,o,a,l){o.child=n===null?Uy(o,null,a,l):Xo(o,n.child,a,l)}function Lv(n,o,a,l,d){a=a.render;var m=o.ref;if("ref"in l){var S={};for(var R in l)R!=="ref"&&(S[R]=l[R])}else S=l;return Qo(o),l=Td(n,o,a,S,m,d),R=Ad(),n!==null&&!St?(Od(n,o,d),Er(n,o,d)):(Be&&R&&cd(o),o.flags|=1,It(n,o,l,d),o.child)}function Iv(n,o,a,l,d){if(n===null){var m=a.type;return typeof m=="function"&&!sd(m)&&m.defaultProps===void 0&&a.compare===null?(o.tag=15,o.type=m,$v(n,o,m,l,d)):(n=Yc(a.type,null,l,o,o.mode,d),n.ref=o.ref,n.return=o,o.child=n)}if(m=n.child,!eh(n,d)){var S=m.memoizedProps;if(a=a.compare,a=a!==null?a:ai,a(S,l)&&n.ref===o.ref)return Er(n,o,d)}return o.flags|=1,n=br(m,l),n.ref=o.ref,n.return=o,o.child=n}function $v(n,o,a,l,d){if(n!==null){var m=n.memoizedProps;if(ai(m,l)&&n.ref===o.ref)if(St=!1,o.pendingProps=l=m,eh(n,d))(n.flags&131072)!==0&&(St=!0);else return o.lanes=n.lanes,Er(n,o,d)}return Qd(n,o,a,l,d)}function Uv(n,o,a,l){var d=l.children,m=n!==null?n.memoizedState:null;if(n===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((o.flags&128)!==0){if(m=m!==null?m.baseLanes|a:a,n!==null){for(l=o.child=n.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~m}else l=0,o.child=null;return Bv(n,o,m,a,l)}if((a&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},n!==null&&Wc(o,m!==null?m.cachePool:null),m!==null?Fy(o,m):_d(),Vy(o);else return l=o.lanes=536870912,Bv(n,o,m!==null?m.baseLanes|a:a,a,l)}else m!==null?(Wc(o,m.cachePool),Fy(o,m),no(),o.memoizedState=null):(n!==null&&Wc(o,null),_d(),no());return It(n,o,d,a),o.child}function Si(n,o){return n!==null&&n.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function Bv(n,o,a,l,d){var m=yd();return m=m===null?null:{parent:bt._currentValue,pool:m},o.memoizedState={baseLanes:a,cachePool:m},n!==null&&Wc(o,null),_d(),Vy(o),n!==null&&Vs(n,o,l,!0),o.childLanes=d,null}function ml(n,o){return o=yl({mode:o.mode,children:o.children},n.mode),o.ref=n.ref,n.child=o,o.return=n,o}function qv(n,o,a){return Xo(o,n.child,null,a),n=ml(o,o.pendingProps),n.flags|=2,hn(o),o.memoizedState=null,n}function H2(n,o,a){var l=o.pendingProps,d=(o.flags&128)!==0;if(o.flags&=-129,n===null){if(Be){if(l.mode==="hidden")return n=ml(o,l),o.lanes=536870912,Si(null,n);if(Ed(o),(n=ot)?(n=e0(n,An),n=n!==null&&n.data==="&"?n:null,n!==null&&(o.memoizedState={dehydrated:n,treeContext:Gr!==null?{id:Wn,overflow:er}:null,retryLane:536870912,hydrationErrors:null},a=Ey(n),a.return=o,o.child=a,Pt=o,ot=null)):n=null,n===null)throw Kr(o);return o.lanes=536870912,null}return ml(o,l)}var m=n.memoizedState;if(m!==null){var S=m.dehydrated;if(Ed(o),d)if(o.flags&256)o.flags&=-257,o=qv(n,o,a);else if(o.memoizedState!==null)o.child=n.child,o.flags|=128,o=null;else throw Error(s(558));else if(St||Vs(n,o,a,!1),d=(a&n.childLanes)!==0,St||d){if(l=We,l!==null&&(S=Ng(l,a),S!==0&&S!==m.retryLane))throw m.retryLane=S,Fo(n,S),nn(l,n,S),Zd;Rl(),o=qv(n,o,a)}else n=m.treeContext,ot=kn(S.nextSibling),Pt=o,Be=!0,Yr=null,An=!1,n!==null&&Ay(o,n),o=ml(o,l),o.flags|=4096;return o}return n=br(n.child,{mode:l.mode,children:l.children}),n.ref=o.ref,o.child=n,n.return=o,n}function gl(n,o){var a=o.ref;if(a===null)n!==null&&n.ref!==null&&(o.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(n===null||n.ref!==a)&&(o.flags|=4194816)}}function Qd(n,o,a,l,d){return Qo(o),a=Td(n,o,a,l,void 0,d),l=Ad(),n!==null&&!St?(Od(n,o,d),Er(n,o,d)):(Be&&l&&cd(o),o.flags|=1,It(n,o,a,d),o.child)}function Fv(n,o,a,l,d,m){return Qo(o),o.updateQueue=null,a=Zy(o,l,a,d),Hy(n),l=Ad(),n!==null&&!St?(Od(n,o,m),Er(n,o,m)):(Be&&l&&cd(o),o.flags|=1,It(n,o,a,m),o.child)}function Vv(n,o,a,l,d){if(Qo(o),o.stateNode===null){var m=Us,S=a.contextType;typeof S=="object"&&S!==null&&(m=Lt(S)),m=new a(l,m),o.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Vd,o.stateNode=m,m._reactInternals=o,m=o.stateNode,m.props=l,m.state=o.memoizedState,m.refs={},bd(o),S=a.contextType,m.context=typeof S=="object"&&S!==null?Lt(S):Us,m.state=o.memoizedState,S=a.getDerivedStateFromProps,typeof S=="function"&&(Fd(o,a,S,l),m.state=o.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(S=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),S!==m.state&&Vd.enqueueReplaceState(m,m.state,null),gi(o,l,m,d),mi(),m.state=o.memoizedState),typeof m.componentDidMount=="function"&&(o.flags|=4194308),l=!0}else if(n===null){m=o.stateNode;var R=o.memoizedProps,N=Wo(a,R);m.props=N;var q=m.context,Y=a.contextType;S=Us,typeof Y=="object"&&Y!==null&&(S=Lt(Y));var ee=a.getDerivedStateFromProps;Y=typeof ee=="function"||typeof m.getSnapshotBeforeUpdate=="function",R=o.pendingProps!==R,Y||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(R||q!==S)&&kv(o,m,l,S),Jr=!1;var F=o.memoizedState;m.state=F,gi(o,l,m,d),mi(),q=o.memoizedState,R||F!==q||Jr?(typeof ee=="function"&&(Fd(o,a,ee,l),q=o.memoizedState),(N=Jr||Ov(o,a,N,l,F,q,S))?(Y||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(o.flags|=4194308)):(typeof m.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=l,o.memoizedState=q),m.props=l,m.state=q,m.context=S,l=N):(typeof m.componentDidMount=="function"&&(o.flags|=4194308),l=!1)}else{m=o.stateNode,wd(n,o),S=o.memoizedProps,Y=Wo(a,S),m.props=Y,ee=o.pendingProps,F=m.context,q=a.contextType,N=Us,typeof q=="object"&&q!==null&&(N=Lt(q)),R=a.getDerivedStateFromProps,(q=typeof R=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S!==ee||F!==N)&&kv(o,m,l,N),Jr=!1,F=o.memoizedState,m.state=F,gi(o,l,m,d),mi();var Z=o.memoizedState;S!==ee||F!==Z||Jr||n!==null&&n.dependencies!==null&&Xc(n.dependencies)?(typeof R=="function"&&(Fd(o,a,R,l),Z=o.memoizedState),(Y=Jr||Ov(o,a,Y,l,F,Z,N)||n!==null&&n.dependencies!==null&&Xc(n.dependencies))?(q||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(l,Z,N),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(l,Z,N)),typeof m.componentDidUpdate=="function"&&(o.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof m.componentDidUpdate!="function"||S===n.memoizedProps&&F===n.memoizedState||(o.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===n.memoizedProps&&F===n.memoizedState||(o.flags|=1024),o.memoizedProps=l,o.memoizedState=Z),m.props=l,m.state=Z,m.context=N,l=Y):(typeof m.componentDidUpdate!="function"||S===n.memoizedProps&&F===n.memoizedState||(o.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===n.memoizedProps&&F===n.memoizedState||(o.flags|=1024),l=!1)}return m=l,gl(n,o),l=(o.flags&128)!==0,m||l?(m=o.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:m.render(),o.flags|=1,n!==null&&l?(o.child=Xo(o,n.child,null,d),o.child=Xo(o,null,a,d)):It(n,o,a,d),o.memoizedState=m.state,n=o.child):n=Er(n,o,d),n}function Hv(n,o,a,l){return Ho(),o.flags|=256,It(n,o,a,l),o.child}var Gd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yd(n){return{baseLanes:n,cachePool:zy()}}function Kd(n,o,a){return n=n!==null?n.childLanes&~a:0,o&&(n|=mn),n}function Zv(n,o,a){var l=o.pendingProps,d=!1,m=(o.flags&128)!==0,S;if((S=m)||(S=n!==null&&n.memoizedState===null?!1:(mt.current&2)!==0),S&&(d=!0,o.flags&=-129),S=(o.flags&32)!==0,o.flags&=-33,n===null){if(Be){if(d?to(o):no(),(n=ot)?(n=e0(n,An),n=n!==null&&n.data!=="&"?n:null,n!==null&&(o.memoizedState={dehydrated:n,treeContext:Gr!==null?{id:Wn,overflow:er}:null,retryLane:536870912,hydrationErrors:null},a=Ey(n),a.return=o,o.child=a,Pt=o,ot=null)):n=null,n===null)throw Kr(o);return Nh(n)?o.lanes=32:o.lanes=536870912,null}var R=l.children;return l=l.fallback,d?(no(),d=o.mode,R=yl({mode:"hidden",children:R},d),l=Vo(l,d,a,null),R.return=o,l.return=o,R.sibling=l,o.child=R,l=o.child,l.memoizedState=Yd(a),l.childLanes=Kd(n,S,a),o.memoizedState=Gd,Si(null,l)):(to(o),Xd(o,R))}var N=n.memoizedState;if(N!==null&&(R=N.dehydrated,R!==null)){if(m)o.flags&256?(to(o),o.flags&=-257,o=Jd(n,o,a)):o.memoizedState!==null?(no(),o.child=n.child,o.flags|=128,o=null):(no(),R=l.fallback,d=o.mode,l=yl({mode:"visible",children:l.children},d),R=Vo(R,d,a,null),R.flags|=2,l.return=o,R.return=o,l.sibling=R,o.child=l,Xo(o,n.child,null,a),l=o.child,l.memoizedState=Yd(a),l.childLanes=Kd(n,S,a),o.memoizedState=Gd,o=Si(null,l));else if(to(o),Nh(R)){if(S=R.nextSibling&&R.nextSibling.dataset,S)var q=S.dgst;S=q,l=Error(s(419)),l.stack="",l.digest=S,li({value:l,source:null,stack:null}),o=Jd(n,o,a)}else if(St||Vs(n,o,a,!1),S=(a&n.childLanes)!==0,St||S){if(S=We,S!==null&&(l=Ng(S,a),l!==0&&l!==N.retryLane))throw N.retryLane=l,Fo(n,l),nn(S,n,l),Zd;Mh(R)||Rl(),o=Jd(n,o,a)}else Mh(R)?(o.flags|=192,o.child=n.child,o=null):(n=N.treeContext,ot=kn(R.nextSibling),Pt=o,Be=!0,Yr=null,An=!1,n!==null&&Ay(o,n),o=Xd(o,l.children),o.flags|=4096);return o}return d?(no(),R=l.fallback,d=o.mode,N=n.child,q=N.sibling,l=br(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&65011712,q!==null?R=br(q,R):(R=Vo(R,d,a,null),R.flags|=2),R.return=o,l.return=o,l.sibling=R,o.child=l,Si(null,l),l=o.child,R=n.child.memoizedState,R===null?R=Yd(a):(d=R.cachePool,d!==null?(N=bt._currentValue,d=d.parent!==N?{parent:N,pool:N}:d):d=zy(),R={baseLanes:R.baseLanes|a,cachePool:d}),l.memoizedState=R,l.childLanes=Kd(n,S,a),o.memoizedState=Gd,Si(n.child,l)):(to(o),a=n.child,n=a.sibling,a=br(a,{mode:"visible",children:l.children}),a.return=o,a.sibling=null,n!==null&&(S=o.deletions,S===null?(o.deletions=[n],o.flags|=16):S.push(n)),o.child=a,o.memoizedState=null,a)}function Xd(n,o){return o=yl({mode:"visible",children:o},n.mode),o.return=n,n.child=o}function yl(n,o){return n=fn(22,n,null,o),n.lanes=0,n}function Jd(n,o,a){return Xo(o,n.child,null,a),n=Xd(o,o.pendingProps.children),n.flags|=2,o.memoizedState=null,n}function Qv(n,o,a){n.lanes|=o;var l=n.alternate;l!==null&&(l.lanes|=o),hd(n.return,o,a)}function Wd(n,o,a,l,d,m){var S=n.memoizedState;S===null?n.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:d,treeForkCount:m}:(S.isBackwards=o,S.rendering=null,S.renderingStartTime=0,S.last=l,S.tail=a,S.tailMode=d,S.treeForkCount=m)}function Gv(n,o,a){var l=o.pendingProps,d=l.revealOrder,m=l.tail;l=l.children;var S=mt.current,R=(S&2)!==0;if(R?(S=S&1|2,o.flags|=128):S&=1,ne(mt,S),It(n,o,l,a),l=Be?ci:0,!R&&n!==null&&(n.flags&128)!==0)e:for(n=o.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Qv(n,a,o);else if(n.tag===19)Qv(n,a,o);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===o)break e;for(;n.sibling===null;){if(n.return===null||n.return===o)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(d){case"forwards":for(a=o.child,d=null;a!==null;)n=a.alternate,n!==null&&sl(n)===null&&(d=a),a=a.sibling;a=d,a===null?(d=o.child,o.child=null):(d=a.sibling,a.sibling=null),Wd(o,!1,d,a,m,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,d=o.child,o.child=null;d!==null;){if(n=d.alternate,n!==null&&sl(n)===null){o.child=d;break}n=d.sibling,d.sibling=a,a=d,d=n}Wd(o,!0,a,null,m,l);break;case"together":Wd(o,!1,null,null,void 0,l);break;default:o.memoizedState=null}return o.child}function Er(n,o,a){if(n!==null&&(o.dependencies=n.dependencies),so|=o.lanes,(a&o.childLanes)===0)if(n!==null){if(Vs(n,o,a,!1),(a&o.childLanes)===0)return null}else return null;if(n!==null&&o.child!==n.child)throw Error(s(153));if(o.child!==null){for(n=o.child,a=br(n,n.pendingProps),o.child=a,a.return=o;n.sibling!==null;)n=n.sibling,a=a.sibling=br(n,n.pendingProps),a.return=o;a.sibling=null}return o.child}function eh(n,o){return(n.lanes&o)!==0?!0:(n=n.dependencies,!!(n!==null&&Xc(n)))}function Z2(n,o,a){switch(o.tag){case 3:_e(o,o.stateNode.containerInfo),Xr(o,bt,n.memoizedState.cache),Ho();break;case 27:case 5:Re(o);break;case 4:_e(o,o.stateNode.containerInfo);break;case 10:Xr(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Ed(o),null;break;case 13:var l=o.memoizedState;if(l!==null)return l.dehydrated!==null?(to(o),o.flags|=128,null):(a&o.child.childLanes)!==0?Zv(n,o,a):(to(o),n=Er(n,o,a),n!==null?n.sibling:null);to(o);break;case 19:var d=(n.flags&128)!==0;if(l=(a&o.childLanes)!==0,l||(Vs(n,o,a,!1),l=(a&o.childLanes)!==0),d){if(l)return Gv(n,o,a);o.flags|=128}if(d=o.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),ne(mt,mt.current),l)break;return null;case 22:return o.lanes=0,Uv(n,o,a,o.pendingProps);case 24:Xr(o,bt,n.memoizedState.cache)}return Er(n,o,a)}function Yv(n,o,a){if(n!==null)if(n.memoizedProps!==o.pendingProps)St=!0;else{if(!eh(n,a)&&(o.flags&128)===0)return St=!1,Z2(n,o,a);St=(n.flags&131072)!==0}else St=!1,Be&&(o.flags&1048576)!==0&&Ty(o,ci,o.index);switch(o.lanes=0,o.tag){case 16:e:{var l=o.pendingProps;if(n=Yo(o.elementType),o.type=n,typeof n=="function")sd(n)?(l=Wo(n,l),o.tag=1,o=Vv(null,o,n,l,a)):(o.tag=0,o=Qd(null,o,n,l,a));else{if(n!=null){var d=n.$$typeof;if(d===D){o.tag=11,o=Lv(null,o,n,l,a);break e}else if(d===L){o.tag=14,o=Iv(null,o,n,l,a);break e}}throw o=le(n)||n,Error(s(306,o,""))}}return o;case 0:return Qd(n,o,o.type,o.pendingProps,a);case 1:return l=o.type,d=Wo(l,o.pendingProps),Vv(n,o,l,d,a);case 3:e:{if(_e(o,o.stateNode.containerInfo),n===null)throw Error(s(387));l=o.pendingProps;var m=o.memoizedState;d=m.element,wd(n,o),gi(o,l,null,a);var S=o.memoizedState;if(l=S.cache,Xr(o,bt,l),l!==m.cache&&pd(o,[bt],a,!0),mi(),l=S.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:S.cache},o.updateQueue.baseState=m,o.memoizedState=m,o.flags&256){o=Hv(n,o,l,a);break e}else if(l!==d){d=En(Error(s(424)),o),li(d),o=Hv(n,o,l,a);break e}else for(n=o.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,ot=kn(n.firstChild),Pt=o,Be=!0,Yr=null,An=!0,a=Uy(o,null,l,a),o.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Ho(),l===d){o=Er(n,o,a);break e}It(n,o,l,a)}o=o.child}return o;case 26:return gl(n,o),n===null?(a=a0(o.type,null,o.pendingProps,null))?o.memoizedState=a:Be||(a=o.type,n=o.pendingProps,l=jl(ye.current).createElement(a),l[Dt]=o,l[Kt]=n,$t(l,a,n),Nt(l),o.stateNode=l):o.memoizedState=a0(o.type,n.memoizedProps,o.pendingProps,n.memoizedState),null;case 27:return Re(o),n===null&&Be&&(l=o.stateNode=r0(o.type,o.pendingProps,ye.current),Pt=o,An=!0,d=ot,uo(o.type)?(jh=d,ot=kn(l.firstChild)):ot=d),It(n,o,o.pendingProps.children,a),gl(n,o),n===null&&(o.flags|=4194304),o.child;case 5:return n===null&&Be&&((d=l=ot)&&(l=xT(l,o.type,o.pendingProps,An),l!==null?(o.stateNode=l,Pt=o,ot=kn(l.firstChild),An=!1,d=!0):d=!1),d||Kr(o)),Re(o),d=o.type,m=o.pendingProps,S=n!==null?n.memoizedProps:null,l=m.children,Ah(d,m)?l=null:S!==null&&Ah(d,S)&&(o.flags|=32),o.memoizedState!==null&&(d=Td(n,o,L2,null,null,a),Pi._currentValue=d),gl(n,o),It(n,o,l,a),o.child;case 6:return n===null&&Be&&((n=a=ot)&&(a=_T(a,o.pendingProps,An),a!==null?(o.stateNode=a,Pt=o,ot=null,n=!0):n=!1),n||Kr(o)),null;case 13:return Zv(n,o,a);case 4:return _e(o,o.stateNode.containerInfo),l=o.pendingProps,n===null?o.child=Xo(o,null,l,a):It(n,o,l,a),o.child;case 11:return Lv(n,o,o.type,o.pendingProps,a);case 7:return It(n,o,o.pendingProps,a),o.child;case 8:return It(n,o,o.pendingProps.children,a),o.child;case 12:return It(n,o,o.pendingProps.children,a),o.child;case 10:return l=o.pendingProps,Xr(o,o.type,l.value),It(n,o,l.children,a),o.child;case 9:return d=o.type._context,l=o.pendingProps.children,Qo(o),d=Lt(d),l=l(d),o.flags|=1,It(n,o,l,a),o.child;case 14:return Iv(n,o,o.type,o.pendingProps,a);case 15:return $v(n,o,o.type,o.pendingProps,a);case 19:return Gv(n,o,a);case 31:return H2(n,o,a);case 22:return Uv(n,o,a,o.pendingProps);case 24:return Qo(o),l=Lt(bt),n===null?(d=yd(),d===null&&(d=We,m=md(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=a),d=m),o.memoizedState={parent:l,cache:d},bd(o),Xr(o,bt,d)):((n.lanes&a)!==0&&(wd(n,o),gi(o,null,null,a),mi()),d=n.memoizedState,m=o.memoizedState,d.parent!==l?(d={parent:l,cache:l},o.memoizedState=d,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=d),Xr(o,bt,l)):(l=m.cache,Xr(o,bt,l),l!==d.cache&&pd(o,[bt],a,!0))),It(n,o,o.pendingProps.children,a),o.child;case 29:throw o.pendingProps}throw Error(s(156,o.tag))}function Rr(n){n.flags|=4}function th(n,o,a,l,d){if((o=(n.mode&32)!==0)&&(o=!1),o){if(n.flags|=16777216,(d&335544128)===d)if(n.stateNode.complete)n.flags|=8192;else if(xb())n.flags|=8192;else throw Ko=tl,vd}else n.flags&=-16777217}function Kv(n,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!f0(o))if(xb())n.flags|=8192;else throw Ko=tl,vd}function vl(n,o){o!==null&&(n.flags|=4),n.flags&16384&&(o=n.tag!==22?Og():536870912,n.lanes|=o,na|=o)}function xi(n,o){if(!Be)switch(n.tailMode){case"hidden":o=n.tail;for(var a=null;o!==null;)o.alternate!==null&&(a=o),o=o.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?o||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function st(n){var o=n.alternate!==null&&n.alternate.child===n.child,a=0,l=0;if(o)for(var d=n.child;d!==null;)a|=d.lanes|d.childLanes,l|=d.subtreeFlags&65011712,l|=d.flags&65011712,d.return=n,d=d.sibling;else for(d=n.child;d!==null;)a|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=n,d=d.sibling;return n.subtreeFlags|=l,n.childLanes=a,o}function Q2(n,o,a){var l=o.pendingProps;switch(ld(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(o),null;case 1:return st(o),null;case 3:return a=o.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),o.memoizedState.cache!==l&&(o.flags|=2048),xr(bt),xe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(n===null||n.child===null)&&(Fs(o)?Rr(o):n===null||n.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,fd())),st(o),null;case 26:var d=o.type,m=o.memoizedState;return n===null?(Rr(o),m!==null?(st(o),Kv(o,m)):(st(o),th(o,d,null,l,a))):m?m!==n.memoizedState?(Rr(o),st(o),Kv(o,m)):(st(o),o.flags&=-16777217):(n=n.memoizedProps,n!==l&&Rr(o),st(o),th(o,d,n,l,a)),null;case 27:if(Ae(o),a=ye.current,d=o.type,n!==null&&o.stateNode!=null)n.memoizedProps!==l&&Rr(o);else{if(!l){if(o.stateNode===null)throw Error(s(166));return st(o),null}n=oe.current,Fs(o)?Oy(o):(n=r0(d,l,a),o.stateNode=n,Rr(o))}return st(o),null;case 5:if(Ae(o),d=o.type,n!==null&&o.stateNode!=null)n.memoizedProps!==l&&Rr(o);else{if(!l){if(o.stateNode===null)throw Error(s(166));return st(o),null}if(m=oe.current,Fs(o))Oy(o);else{var S=jl(ye.current);switch(m){case 1:m=S.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=S.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=S.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=S.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=S.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof l.is=="string"?S.createElement("select",{is:l.is}):S.createElement("select"),l.multiple?m.multiple=!0:l.size&&(m.size=l.size);break;default:m=typeof l.is=="string"?S.createElement(d,{is:l.is}):S.createElement(d)}}m[Dt]=o,m[Kt]=l;e:for(S=o.child;S!==null;){if(S.tag===5||S.tag===6)m.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===o)break e;for(;S.sibling===null;){if(S.return===null||S.return===o)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}o.stateNode=m;e:switch($t(m,d,l),d){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Rr(o)}}return st(o),th(o,o.type,n===null?null:n.memoizedProps,o.pendingProps,a),null;case 6:if(n&&o.stateNode!=null)n.memoizedProps!==l&&Rr(o);else{if(typeof l!="string"&&o.stateNode===null)throw Error(s(166));if(n=ye.current,Fs(o)){if(n=o.stateNode,a=o.memoizedProps,l=null,d=Pt,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}n[Dt]=o,n=!!(n.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Zb(n.nodeValue,a)),n||Kr(o,!0)}else n=jl(n).createTextNode(l),n[Dt]=o,o.stateNode=n}return st(o),null;case 31:if(a=o.memoizedState,n===null||n.memoizedState!==null){if(l=Fs(o),a!==null){if(n===null){if(!l)throw Error(s(318));if(n=o.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(557));n[Dt]=o}else Ho(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;st(o),n=!1}else a=fd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=a),n=!0;if(!n)return o.flags&256?(hn(o),o):(hn(o),null);if((o.flags&128)!==0)throw Error(s(558))}return st(o),null;case 13:if(l=o.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(d=Fs(o),l!==null&&l.dehydrated!==null){if(n===null){if(!d)throw Error(s(318));if(d=o.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(s(317));d[Dt]=o}else Ho(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;st(o),d=!1}else d=fd(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=d),d=!0;if(!d)return o.flags&256?(hn(o),o):(hn(o),null)}return hn(o),(o.flags&128)!==0?(o.lanes=a,o):(a=l!==null,n=n!==null&&n.memoizedState!==null,a&&(l=o.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),m=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(m=l.memoizedState.cachePool.pool),m!==d&&(l.flags|=2048)),a!==n&&a&&(o.child.flags|=8192),vl(o,o.updateQueue),st(o),null);case 4:return xe(),n===null&&_h(o.stateNode.containerInfo),st(o),null;case 10:return xr(o.type),st(o),null;case 19:if(Q(mt),l=o.memoizedState,l===null)return st(o),null;if(d=(o.flags&128)!==0,m=l.rendering,m===null)if(d)xi(l,!1);else{if(dt!==0||n!==null&&(n.flags&128)!==0)for(n=o.child;n!==null;){if(m=sl(n),m!==null){for(o.flags|=128,xi(l,!1),n=m.updateQueue,o.updateQueue=n,vl(o,n),o.subtreeFlags=0,n=a,a=o.child;a!==null;)Cy(a,n),a=a.sibling;return ne(mt,mt.current&1|2),Be&&wr(o,l.treeForkCount),o.child}n=n.sibling}l.tail!==null&&Vt()>_l&&(o.flags|=128,d=!0,xi(l,!1),o.lanes=4194304)}else{if(!d)if(n=sl(m),n!==null){if(o.flags|=128,d=!0,n=n.updateQueue,o.updateQueue=n,vl(o,n),xi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!m.alternate&&!Be)return st(o),null}else 2*Vt()-l.renderingStartTime>_l&&a!==536870912&&(o.flags|=128,d=!0,xi(l,!1),o.lanes=4194304);l.isBackwards?(m.sibling=o.child,o.child=m):(n=l.last,n!==null?n.sibling=m:o.child=m,l.last=m)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=Vt(),n.sibling=null,a=mt.current,ne(mt,d?a&1|2:a&1),Be&&wr(o,l.treeForkCount),n):(st(o),null);case 22:case 23:return hn(o),Cd(),l=o.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(o.flags|=8192):l&&(o.flags|=8192),l?(a&536870912)!==0&&(o.flags&128)===0&&(st(o),o.subtreeFlags&6&&(o.flags|=8192)):st(o),a=o.updateQueue,a!==null&&vl(o,a.retryQueue),a=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),l=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(l=o.memoizedState.cachePool.pool),l!==a&&(o.flags|=2048),n!==null&&Q(Go),null;case 24:return a=null,n!==null&&(a=n.memoizedState.cache),o.memoizedState.cache!==a&&(o.flags|=2048),xr(bt),st(o),null;case 25:return null;case 30:return null}throw Error(s(156,o.tag))}function G2(n,o){switch(ld(o),o.tag){case 1:return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 3:return xr(bt),xe(),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 26:case 27:case 5:return Ae(o),null;case 31:if(o.memoizedState!==null){if(hn(o),o.alternate===null)throw Error(s(340));Ho()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 13:if(hn(o),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error(s(340));Ho()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 19:return Q(mt),null;case 4:return xe(),null;case 10:return xr(o.type),null;case 22:case 23:return hn(o),Cd(),n!==null&&Q(Go),n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 24:return xr(bt),null;case 25:return null;default:return null}}function Xv(n,o){switch(ld(o),o.tag){case 3:xr(bt),xe();break;case 26:case 27:case 5:Ae(o);break;case 4:xe();break;case 31:o.memoizedState!==null&&hn(o);break;case 13:hn(o);break;case 19:Q(mt);break;case 10:xr(o.type);break;case 22:case 23:hn(o),Cd(),n!==null&&Q(Go);break;case 24:xr(bt)}}function _i(n,o){try{var a=o.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var d=l.next;a=d;do{if((a.tag&n)===n){l=void 0;var m=a.create,S=a.inst;l=m(),S.destroy=l}a=a.next}while(a!==d)}}catch(R){Ge(o,o.return,R)}}function ro(n,o,a){try{var l=o.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var m=d.next;l=m;do{if((l.tag&n)===n){var S=l.inst,R=S.destroy;if(R!==void 0){S.destroy=void 0,d=o;var N=a,q=R;try{q()}catch(Y){Ge(d,N,Y)}}}l=l.next}while(l!==m)}}catch(Y){Ge(o,o.return,Y)}}function Jv(n){var o=n.updateQueue;if(o!==null){var a=n.stateNode;try{qy(o,a)}catch(l){Ge(n,n.return,l)}}}function Wv(n,o,a){a.props=Wo(n.type,n.memoizedProps),a.state=n.memoizedState;try{a.componentWillUnmount()}catch(l){Ge(n,o,l)}}function Ci(n,o){try{var a=n.ref;if(a!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof a=="function"?n.refCleanup=a(l):a.current=l}}catch(d){Ge(n,o,d)}}function tr(n,o){var a=n.ref,l=n.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(d){Ge(n,o,d)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){Ge(n,o,d)}else a.current=null}function eb(n){var o=n.type,a=n.memoizedProps,l=n.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(d){Ge(n,n.return,d)}}function nh(n,o,a){try{var l=n.stateNode;gT(l,n.type,a,o),l[Kt]=o}catch(d){Ge(n,n.return,d)}}function tb(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&uo(n.type)||n.tag===4}function rh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||tb(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&uo(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function oh(n,o,a){var l=n.tag;if(l===5||l===6)n=n.stateNode,o?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(n,o):(o=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,o.appendChild(n),a=a._reactRootContainer,a!=null||o.onclick!==null||(o.onclick=yr));else if(l!==4&&(l===27&&uo(n.type)&&(a=n.stateNode,o=null),n=n.child,n!==null))for(oh(n,o,a),n=n.sibling;n!==null;)oh(n,o,a),n=n.sibling}function bl(n,o,a){var l=n.tag;if(l===5||l===6)n=n.stateNode,o?a.insertBefore(n,o):a.appendChild(n);else if(l!==4&&(l===27&&uo(n.type)&&(a=n.stateNode),n=n.child,n!==null))for(bl(n,o,a),n=n.sibling;n!==null;)bl(n,o,a),n=n.sibling}function nb(n){var o=n.stateNode,a=n.memoizedProps;try{for(var l=n.type,d=o.attributes;d.length;)o.removeAttributeNode(d[0]);$t(o,l,a),o[Dt]=n,o[Kt]=a}catch(m){Ge(n,n.return,m)}}var Tr=!1,xt=!1,sh=!1,rb=typeof WeakSet=="function"?WeakSet:Set,jt=null;function Y2(n,o){if(n=n.containerInfo,Rh=Ul,n=my(n),Jf(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var d=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var S=0,R=-1,N=-1,q=0,Y=0,ee=n,F=null;t:for(;;){for(var Z;ee!==a||d!==0&&ee.nodeType!==3||(R=S+d),ee!==m||l!==0&&ee.nodeType!==3||(N=S+l),ee.nodeType===3&&(S+=ee.nodeValue.length),(Z=ee.firstChild)!==null;)F=ee,ee=Z;for(;;){if(ee===n)break t;if(F===a&&++q===d&&(R=S),F===m&&++Y===l&&(N=S),(Z=ee.nextSibling)!==null)break;ee=F,F=ee.parentNode}ee=Z}a=R===-1||N===-1?null:{start:R,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(Th={focusedElem:n,selectionRange:a},Ul=!1,jt=o;jt!==null;)if(o=jt,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,jt=n;else for(;jt!==null;){switch(o=jt,m=o.alternate,n=o.flags,o.tag){case 0:if((n&4)!==0&&(n=o.updateQueue,n=n!==null?n.events:null,n!==null))for(a=0;a<n.length;a++)d=n[a],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&m!==null){n=void 0,a=o,d=m.memoizedProps,m=m.memoizedState,l=a.stateNode;try{var ue=Wo(a.type,d);n=l.getSnapshotBeforeUpdate(ue,m),l.__reactInternalSnapshotBeforeUpdate=n}catch(Ce){Ge(a,a.return,Ce)}}break;case 3:if((n&1024)!==0){if(n=o.stateNode.containerInfo,a=n.nodeType,a===9)kh(n);else if(a===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":kh(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(s(163))}if(n=o.sibling,n!==null){n.return=o.return,jt=n;break}jt=o.return}}function ob(n,o,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Or(n,a),l&4&&_i(5,a);break;case 1:if(Or(n,a),l&4)if(n=a.stateNode,o===null)try{n.componentDidMount()}catch(S){Ge(a,a.return,S)}else{var d=Wo(a.type,o.memoizedProps);o=o.memoizedState;try{n.componentDidUpdate(d,o,n.__reactInternalSnapshotBeforeUpdate)}catch(S){Ge(a,a.return,S)}}l&64&&Jv(a),l&512&&Ci(a,a.return);break;case 3:if(Or(n,a),l&64&&(n=a.updateQueue,n!==null)){if(o=null,a.child!==null)switch(a.child.tag){case 27:case 5:o=a.child.stateNode;break;case 1:o=a.child.stateNode}try{qy(n,o)}catch(S){Ge(a,a.return,S)}}break;case 27:o===null&&l&4&&nb(a);case 26:case 5:Or(n,a),o===null&&l&4&&eb(a),l&512&&Ci(a,a.return);break;case 12:Or(n,a);break;case 31:Or(n,a),l&4&&ib(n,a);break;case 13:Or(n,a),l&4&&cb(n,a),l&64&&(n=a.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(a=oT.bind(null,a),CT(n,a))));break;case 22:if(l=a.memoizedState!==null||Tr,!l){o=o!==null&&o.memoizedState!==null||xt,d=Tr;var m=xt;Tr=l,(xt=o)&&!m?kr(n,a,(a.subtreeFlags&8772)!==0):Or(n,a),Tr=d,xt=m}break;case 30:break;default:Or(n,a)}}function sb(n){var o=n.alternate;o!==null&&(n.alternate=null,sb(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&Df(o)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var at=null,Jt=!1;function Ar(n,o,a){for(a=a.child;a!==null;)ab(n,o,a),a=a.sibling}function ab(n,o,a){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(Ga,a)}catch{}switch(a.tag){case 26:xt||tr(a,o),Ar(n,o,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:xt||tr(a,o);var l=at,d=Jt;uo(a.type)&&(at=a.stateNode,Jt=!1),Ar(n,o,a),ji(a.stateNode),at=l,Jt=d;break;case 5:xt||tr(a,o);case 6:if(l=at,d=Jt,at=null,Ar(n,o,a),at=l,Jt=d,at!==null)if(Jt)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(a.stateNode)}catch(m){Ge(a,o,m)}else try{at.removeChild(a.stateNode)}catch(m){Ge(a,o,m)}break;case 18:at!==null&&(Jt?(n=at,Jb(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,a.stateNode),ua(n)):Jb(at,a.stateNode));break;case 4:l=at,d=Jt,at=a.stateNode.containerInfo,Jt=!0,Ar(n,o,a),at=l,Jt=d;break;case 0:case 11:case 14:case 15:ro(2,a,o),xt||ro(4,a,o),Ar(n,o,a);break;case 1:xt||(tr(a,o),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Wv(a,o,l)),Ar(n,o,a);break;case 21:Ar(n,o,a);break;case 22:xt=(l=xt)||a.memoizedState!==null,Ar(n,o,a),xt=l;break;default:Ar(n,o,a)}}function ib(n,o){if(o.memoizedState===null&&(n=o.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{ua(n)}catch(a){Ge(o,o.return,a)}}}function cb(n,o){if(o.memoizedState===null&&(n=o.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{ua(n)}catch(a){Ge(o,o.return,a)}}function K2(n){switch(n.tag){case 31:case 13:case 19:var o=n.stateNode;return o===null&&(o=n.stateNode=new rb),o;case 22:return n=n.stateNode,o=n._retryCache,o===null&&(o=n._retryCache=new rb),o;default:throw Error(s(435,n.tag))}}function wl(n,o){var a=K2(n);o.forEach(function(l){if(!a.has(l)){a.add(l);var d=sT.bind(null,n,l);l.then(d,d)}})}function Wt(n,o){var a=o.deletions;if(a!==null)for(var l=0;l<a.length;l++){var d=a[l],m=n,S=o,R=S;e:for(;R!==null;){switch(R.tag){case 27:if(uo(R.type)){at=R.stateNode,Jt=!1;break e}break;case 5:at=R.stateNode,Jt=!1;break e;case 3:case 4:at=R.stateNode.containerInfo,Jt=!0;break e}R=R.return}if(at===null)throw Error(s(160));ab(m,S,d),at=null,Jt=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)lb(o,n),o=o.sibling}var Fn=null;function lb(n,o){var a=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Wt(o,n),en(n),l&4&&(ro(3,n,n.return),_i(3,n),ro(5,n,n.return));break;case 1:Wt(o,n),en(n),l&512&&(xt||a===null||tr(a,a.return)),l&64&&Tr&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(a=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var d=Fn;if(Wt(o,n),en(n),l&512&&(xt||a===null||tr(a,a.return)),l&4){var m=a!==null?a.memoizedState:null;if(l=n.memoizedState,a===null)if(l===null)if(n.stateNode===null){e:{l=n.type,a=n.memoizedProps,d=d.ownerDocument||d;t:switch(l){case"title":m=d.getElementsByTagName("title")[0],(!m||m[Xa]||m[Dt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(l),d.head.insertBefore(m,d.querySelector("head > title"))),$t(m,l,a),m[Dt]=n,Nt(m),l=m;break e;case"link":var S=l0("link","href",d).get(l+(a.href||""));if(S){for(var R=0;R<S.length;R++)if(m=S[R],m.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&m.getAttribute("rel")===(a.rel==null?null:a.rel)&&m.getAttribute("title")===(a.title==null?null:a.title)&&m.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){S.splice(R,1);break t}}m=d.createElement(l),$t(m,l,a),d.head.appendChild(m);break;case"meta":if(S=l0("meta","content",d).get(l+(a.content||""))){for(R=0;R<S.length;R++)if(m=S[R],m.getAttribute("content")===(a.content==null?null:""+a.content)&&m.getAttribute("name")===(a.name==null?null:a.name)&&m.getAttribute("property")===(a.property==null?null:a.property)&&m.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&m.getAttribute("charset")===(a.charSet==null?null:a.charSet)){S.splice(R,1);break t}}m=d.createElement(l),$t(m,l,a),d.head.appendChild(m);break;default:throw Error(s(468,l))}m[Dt]=n,Nt(m),l=m}n.stateNode=l}else u0(d,n.type,n.stateNode);else n.stateNode=c0(d,l,n.memoizedProps);else m!==l?(m===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):m.count--,l===null?u0(d,n.type,n.stateNode):c0(d,l,n.memoizedProps)):l===null&&n.stateNode!==null&&nh(n,n.memoizedProps,a.memoizedProps)}break;case 27:Wt(o,n),en(n),l&512&&(xt||a===null||tr(a,a.return)),a!==null&&l&4&&nh(n,n.memoizedProps,a.memoizedProps);break;case 5:if(Wt(o,n),en(n),l&512&&(xt||a===null||tr(a,a.return)),n.flags&32){d=n.stateNode;try{js(d,"")}catch(ue){Ge(n,n.return,ue)}}l&4&&n.stateNode!=null&&(d=n.memoizedProps,nh(n,d,a!==null?a.memoizedProps:d)),l&1024&&(sh=!0);break;case 6:if(Wt(o,n),en(n),l&4){if(n.stateNode===null)throw Error(s(162));l=n.memoizedProps,a=n.stateNode;try{a.nodeValue=l}catch(ue){Ge(n,n.return,ue)}}break;case 3:if(Pl=null,d=Fn,Fn=zl(o.containerInfo),Wt(o,n),Fn=d,en(n),l&4&&a!==null&&a.memoizedState.isDehydrated)try{ua(o.containerInfo)}catch(ue){Ge(n,n.return,ue)}sh&&(sh=!1,ub(n));break;case 4:l=Fn,Fn=zl(n.stateNode.containerInfo),Wt(o,n),en(n),Fn=l;break;case 12:Wt(o,n),en(n);break;case 31:Wt(o,n),en(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,wl(n,l)));break;case 13:Wt(o,n),en(n),n.child.flags&8192&&n.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(xl=Vt()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,wl(n,l)));break;case 22:d=n.memoizedState!==null;var N=a!==null&&a.memoizedState!==null,q=Tr,Y=xt;if(Tr=q||d,xt=Y||N,Wt(o,n),xt=Y,Tr=q,en(n),l&8192)e:for(o=n.stateNode,o._visibility=d?o._visibility&-2:o._visibility|1,d&&(a===null||N||Tr||xt||es(n)),a=null,o=n;;){if(o.tag===5||o.tag===26){if(a===null){N=a=o;try{if(m=N.stateNode,d)S=m.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{R=N.stateNode;var ee=N.memoizedProps.style,F=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;R.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(ue){Ge(N,N.return,ue)}}}else if(o.tag===6){if(a===null){N=o;try{N.stateNode.nodeValue=d?"":N.memoizedProps}catch(ue){Ge(N,N.return,ue)}}}else if(o.tag===18){if(a===null){N=o;try{var Z=N.stateNode;d?Wb(Z,!0):Wb(N.stateNode,!1)}catch(ue){Ge(N,N.return,ue)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===n)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break e;for(;o.sibling===null;){if(o.return===null||o.return===n)break e;a===o&&(a=null),o=o.return}a===o&&(a=null),o.sibling.return=o.return,o=o.sibling}l&4&&(l=n.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,wl(n,a))));break;case 19:Wt(o,n),en(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,wl(n,l)));break;case 30:break;case 21:break;default:Wt(o,n),en(n)}}function en(n){var o=n.flags;if(o&2){try{for(var a,l=n.return;l!==null;){if(tb(l)){a=l;break}l=l.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var d=a.stateNode,m=rh(n);bl(n,m,d);break;case 5:var S=a.stateNode;a.flags&32&&(js(S,""),a.flags&=-33);var R=rh(n);bl(n,R,S);break;case 3:case 4:var N=a.stateNode.containerInfo,q=rh(n);oh(n,q,N);break;default:throw Error(s(161))}}catch(Y){Ge(n,n.return,Y)}n.flags&=-3}o&4096&&(n.flags&=-4097)}function ub(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var o=n;ub(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),n=n.sibling}}function Or(n,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)ob(n,o.alternate,o),o=o.sibling}function es(n){for(n=n.child;n!==null;){var o=n;switch(o.tag){case 0:case 11:case 14:case 15:ro(4,o,o.return),es(o);break;case 1:tr(o,o.return);var a=o.stateNode;typeof a.componentWillUnmount=="function"&&Wv(o,o.return,a),es(o);break;case 27:ji(o.stateNode);case 26:case 5:tr(o,o.return),es(o);break;case 22:o.memoizedState===null&&es(o);break;case 30:es(o);break;default:es(o)}n=n.sibling}}function kr(n,o,a){for(a=a&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var l=o.alternate,d=n,m=o,S=m.flags;switch(m.tag){case 0:case 11:case 15:kr(d,m,a),_i(4,m);break;case 1:if(kr(d,m,a),l=m,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(q){Ge(l,l.return,q)}if(l=m,d=l.updateQueue,d!==null){var R=l.stateNode;try{var N=d.shared.hiddenCallbacks;if(N!==null)for(d.shared.hiddenCallbacks=null,d=0;d<N.length;d++)By(N[d],R)}catch(q){Ge(l,l.return,q)}}a&&S&64&&Jv(m),Ci(m,m.return);break;case 27:nb(m);case 26:case 5:kr(d,m,a),a&&l===null&&S&4&&eb(m),Ci(m,m.return);break;case 12:kr(d,m,a);break;case 31:kr(d,m,a),a&&S&4&&ib(d,m);break;case 13:kr(d,m,a),a&&S&4&&cb(d,m);break;case 22:m.memoizedState===null&&kr(d,m,a),Ci(m,m.return);break;case 30:break;default:kr(d,m,a)}o=o.sibling}}function ah(n,o){var a=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),n=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(n=o.memoizedState.cachePool.pool),n!==a&&(n!=null&&n.refCount++,a!=null&&ui(a))}function ih(n,o){n=null,o.alternate!==null&&(n=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==n&&(o.refCount++,n!=null&&ui(n))}function Vn(n,o,a,l){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)fb(n,o,a,l),o=o.sibling}function fb(n,o,a,l){var d=o.flags;switch(o.tag){case 0:case 11:case 15:Vn(n,o,a,l),d&2048&&_i(9,o);break;case 1:Vn(n,o,a,l);break;case 3:Vn(n,o,a,l),d&2048&&(n=null,o.alternate!==null&&(n=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==n&&(o.refCount++,n!=null&&ui(n)));break;case 12:if(d&2048){Vn(n,o,a,l),n=o.stateNode;try{var m=o.memoizedProps,S=m.id,R=m.onPostCommit;typeof R=="function"&&R(S,o.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(N){Ge(o,o.return,N)}}else Vn(n,o,a,l);break;case 31:Vn(n,o,a,l);break;case 13:Vn(n,o,a,l);break;case 23:break;case 22:m=o.stateNode,S=o.alternate,o.memoizedState!==null?m._visibility&2?Vn(n,o,a,l):Ei(n,o):m._visibility&2?Vn(n,o,a,l):(m._visibility|=2,Ws(n,o,a,l,(o.subtreeFlags&10256)!==0||!1)),d&2048&&ah(S,o);break;case 24:Vn(n,o,a,l),d&2048&&ih(o.alternate,o);break;default:Vn(n,o,a,l)}}function Ws(n,o,a,l,d){for(d=d&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var m=n,S=o,R=a,N=l,q=S.flags;switch(S.tag){case 0:case 11:case 15:Ws(m,S,R,N,d),_i(8,S);break;case 23:break;case 22:var Y=S.stateNode;S.memoizedState!==null?Y._visibility&2?Ws(m,S,R,N,d):Ei(m,S):(Y._visibility|=2,Ws(m,S,R,N,d)),d&&q&2048&&ah(S.alternate,S);break;case 24:Ws(m,S,R,N,d),d&&q&2048&&ih(S.alternate,S);break;default:Ws(m,S,R,N,d)}o=o.sibling}}function Ei(n,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var a=n,l=o,d=l.flags;switch(l.tag){case 22:Ei(a,l),d&2048&&ah(l.alternate,l);break;case 24:Ei(a,l),d&2048&&ih(l.alternate,l);break;default:Ei(a,l)}o=o.sibling}}var Ri=8192;function ea(n,o,a){if(n.subtreeFlags&Ri)for(n=n.child;n!==null;)db(n,o,a),n=n.sibling}function db(n,o,a){switch(n.tag){case 26:ea(n,o,a),n.flags&Ri&&n.memoizedState!==null&&PT(a,Fn,n.memoizedState,n.memoizedProps);break;case 5:ea(n,o,a);break;case 3:case 4:var l=Fn;Fn=zl(n.stateNode.containerInfo),ea(n,o,a),Fn=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=Ri,Ri=16777216,ea(n,o,a),Ri=l):ea(n,o,a));break;default:ea(n,o,a)}}function hb(n){var o=n.alternate;if(o!==null&&(n=o.child,n!==null)){o.child=null;do o=n.sibling,n.sibling=null,n=o;while(n!==null)}}function Ti(n){var o=n.deletions;if((n.flags&16)!==0){if(o!==null)for(var a=0;a<o.length;a++){var l=o[a];jt=l,mb(l,n)}hb(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)pb(n),n=n.sibling}function pb(n){switch(n.tag){case 0:case 11:case 15:Ti(n),n.flags&2048&&ro(9,n,n.return);break;case 3:Ti(n);break;case 12:Ti(n);break;case 22:var o=n.stateNode;n.memoizedState!==null&&o._visibility&2&&(n.return===null||n.return.tag!==13)?(o._visibility&=-3,Sl(n)):Ti(n);break;default:Ti(n)}}function Sl(n){var o=n.deletions;if((n.flags&16)!==0){if(o!==null)for(var a=0;a<o.length;a++){var l=o[a];jt=l,mb(l,n)}hb(n)}for(n=n.child;n!==null;){switch(o=n,o.tag){case 0:case 11:case 15:ro(8,o,o.return),Sl(o);break;case 22:a=o.stateNode,a._visibility&2&&(a._visibility&=-3,Sl(o));break;default:Sl(o)}n=n.sibling}}function mb(n,o){for(;jt!==null;){var a=jt;switch(a.tag){case 0:case 11:case 15:ro(8,a,o);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ui(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,jt=l;else e:for(a=n;jt!==null;){l=jt;var d=l.sibling,m=l.return;if(sb(l),l===a){jt=null;break e}if(d!==null){d.return=m,jt=d;break e}jt=m}}}var X2={getCacheForType:function(n){var o=Lt(bt),a=o.data.get(n);return a===void 0&&(a=n(),o.data.set(n,a)),a},cacheSignal:function(){return Lt(bt).controller.signal}},J2=typeof WeakMap=="function"?WeakMap:Map,Ze=0,We=null,De=null,Ie=0,Qe=0,pn=null,oo=!1,ta=!1,ch=!1,Mr=0,dt=0,so=0,ts=0,lh=0,mn=0,na=0,Ai=null,tn=null,uh=!1,xl=0,gb=0,_l=1/0,Cl=null,ao=null,Tt=0,io=null,ra=null,Nr=0,fh=0,dh=null,yb=null,Oi=0,hh=null;function gn(){return(Ze&2)!==0&&Ie!==0?Ie&-Ie:I.T!==null?bh():jg()}function vb(){if(mn===0)if((Ie&536870912)===0||Be){var n=Nc;Nc<<=1,(Nc&3932160)===0&&(Nc=262144),mn=n}else mn=536870912;return n=dn.current,n!==null&&(n.flags|=32),mn}function nn(n,o,a){(n===We&&(Qe===2||Qe===9)||n.cancelPendingCommit!==null)&&(oa(n,0),co(n,Ie,mn,!1)),Ka(n,a),((Ze&2)===0||n!==We)&&(n===We&&((Ze&2)===0&&(ts|=a),dt===4&&co(n,Ie,mn,!1)),nr(n))}function bb(n,o,a){if((Ze&6)!==0)throw Error(s(327));var l=!a&&(o&127)===0&&(o&n.expiredLanes)===0||Ya(n,o),d=l?tT(n,o):mh(n,o,!0),m=l;do{if(d===0){ta&&!l&&co(n,o,0,!1);break}else{if(a=n.current.alternate,m&&!W2(a)){d=mh(n,o,!1),m=!1;continue}if(d===2){if(m=o,n.errorRecoveryDisabledLanes&m)var S=0;else S=n.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){o=S;e:{var R=n;d=Ai;var N=R.current.memoizedState.isDehydrated;if(N&&(oa(R,S).flags|=256),S=mh(R,S,!1),S!==2){if(ch&&!N){R.errorRecoveryDisabledLanes|=m,ts|=m,d=4;break e}m=tn,tn=d,m!==null&&(tn===null?tn=m:tn.push.apply(tn,m))}d=S}if(m=!1,d!==2)continue}}if(d===1){oa(n,0),co(n,o,0,!0);break}e:{switch(l=n,m=d,m){case 0:case 1:throw Error(s(345));case 4:if((o&4194048)!==o)break;case 6:co(l,o,mn,!oo);break e;case 2:tn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((o&62914560)===o&&(d=xl+300-Vt(),10<d)){if(co(l,o,mn,!oo),zc(l,0,!0)!==0)break e;Nr=o,l.timeoutHandle=Kb(wb.bind(null,l,a,tn,Cl,uh,o,mn,ts,na,oo,m,"Throttled",-0,0),d);break e}wb(l,a,tn,Cl,uh,o,mn,ts,na,oo,m,null,-0,0)}}break}while(!0);nr(n)}function wb(n,o,a,l,d,m,S,R,N,q,Y,ee,F,Z){if(n.timeoutHandle=-1,ee=o.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yr},db(o,m,ee);var ue=(m&62914560)===m?xl-Vt():(m&4194048)===m?gb-Vt():0;if(ue=LT(ee,ue),ue!==null){Nr=m,n.cancelPendingCommit=ue(Ab.bind(null,n,o,m,a,l,d,S,R,N,Y,ee,null,F,Z)),co(n,m,S,!q);return}}Ab(n,o,m,a,l,d,S,R,N)}function W2(n){for(var o=n;;){var a=o.tag;if((a===0||a===11||a===15)&&o.flags&16384&&(a=o.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var d=a[l],m=d.getSnapshot;d=d.value;try{if(!un(m(),d))return!1}catch{return!1}}if(a=o.child,o.subtreeFlags&16384&&a!==null)a.return=o,o=a;else{if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function co(n,o,a,l){o&=~lh,o&=~ts,n.suspendedLanes|=o,n.pingedLanes&=~o,l&&(n.warmLanes|=o),l=n.expirationTimes;for(var d=o;0<d;){var m=31-ln(d),S=1<<m;l[m]=-1,d&=~S}a!==0&&kg(n,a,o)}function El(){return(Ze&6)===0?(ki(0),!1):!0}function ph(){if(De!==null){if(Qe===0)var n=De.return;else n=De,Sr=Zo=null,kd(n),Gs=null,di=0,n=De;for(;n!==null;)Xv(n.alternate,n),n=n.return;De=null}}function oa(n,o){var a=n.timeoutHandle;a!==-1&&(n.timeoutHandle=-1,bT(a)),a=n.cancelPendingCommit,a!==null&&(n.cancelPendingCommit=null,a()),Nr=0,ph(),We=n,De=a=br(n.current,null),Ie=o,Qe=0,pn=null,oo=!1,ta=Ya(n,o),ch=!1,na=mn=lh=ts=so=dt=0,tn=Ai=null,uh=!1,(o&8)!==0&&(o|=o&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=o;0<l;){var d=31-ln(l),m=1<<d;o|=n[d],l&=~m}return Mr=o,Zc(),a}function Sb(n,o){Oe=null,I.H=wi,o===Qs||o===el?(o=Ly(),Qe=3):o===vd?(o=Ly(),Qe=4):Qe=o===Zd?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,pn=o,De===null&&(dt=1,pl(n,En(o,n.current)))}function xb(){var n=dn.current;return n===null?!0:(Ie&4194048)===Ie?On===null:(Ie&62914560)===Ie||(Ie&536870912)!==0?n===On:!1}function _b(){var n=I.H;return I.H=wi,n===null?wi:n}function Cb(){var n=I.A;return I.A=X2,n}function Rl(){dt=4,oo||(Ie&4194048)!==Ie&&dn.current!==null||(ta=!0),(so&134217727)===0&&(ts&134217727)===0||We===null||co(We,Ie,mn,!1)}function mh(n,o,a){var l=Ze;Ze|=2;var d=_b(),m=Cb();(We!==n||Ie!==o)&&(Cl=null,oa(n,o)),o=!1;var S=dt;e:do try{if(Qe!==0&&De!==null){var R=De,N=pn;switch(Qe){case 8:ph(),S=6;break e;case 3:case 2:case 9:case 6:dn.current===null&&(o=!0);var q=Qe;if(Qe=0,pn=null,sa(n,R,N,q),a&&ta){S=0;break e}break;default:q=Qe,Qe=0,pn=null,sa(n,R,N,q)}}eT(),S=dt;break}catch(Y){Sb(n,Y)}while(!0);return o&&n.shellSuspendCounter++,Sr=Zo=null,Ze=l,I.H=d,I.A=m,De===null&&(We=null,Ie=0,Zc()),S}function eT(){for(;De!==null;)Eb(De)}function tT(n,o){var a=Ze;Ze|=2;var l=_b(),d=Cb();We!==n||Ie!==o?(Cl=null,_l=Vt()+500,oa(n,o)):ta=Ya(n,o);e:do try{if(Qe!==0&&De!==null){o=De;var m=pn;t:switch(Qe){case 1:Qe=0,pn=null,sa(n,o,m,1);break;case 2:case 9:if(Dy(m)){Qe=0,pn=null,Rb(o);break}o=function(){Qe!==2&&Qe!==9||We!==n||(Qe=7),nr(n)},m.then(o,o);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:Dy(m)?(Qe=0,pn=null,Rb(o)):(Qe=0,pn=null,sa(n,o,m,7));break;case 5:var S=null;switch(De.tag){case 26:S=De.memoizedState;case 5:case 27:var R=De;if(S?f0(S):R.stateNode.complete){Qe=0,pn=null;var N=R.sibling;if(N!==null)De=N;else{var q=R.return;q!==null?(De=q,Tl(q)):De=null}break t}}Qe=0,pn=null,sa(n,o,m,5);break;case 6:Qe=0,pn=null,sa(n,o,m,6);break;case 8:ph(),dt=6;break e;default:throw Error(s(462))}}nT();break}catch(Y){Sb(n,Y)}while(!0);return Sr=Zo=null,I.H=l,I.A=d,Ze=a,De!==null?0:(We=null,Ie=0,Zc(),dt)}function nT(){for(;De!==null&&!Mt();)Eb(De)}function Eb(n){var o=Yv(n.alternate,n,Mr);n.memoizedProps=n.pendingProps,o===null?Tl(n):De=o}function Rb(n){var o=n,a=o.alternate;switch(o.tag){case 15:case 0:o=Fv(a,o,o.pendingProps,o.type,void 0,Ie);break;case 11:o=Fv(a,o,o.pendingProps,o.type.render,o.ref,Ie);break;case 5:kd(o);default:Xv(a,o),o=De=Cy(o,Mr),o=Yv(a,o,Mr)}n.memoizedProps=n.pendingProps,o===null?Tl(n):De=o}function sa(n,o,a,l){Sr=Zo=null,kd(o),Gs=null,di=0;var d=o.return;try{if(V2(n,d,o,a,Ie)){dt=1,pl(n,En(a,n.current)),De=null;return}}catch(m){if(d!==null)throw De=d,m;dt=1,pl(n,En(a,n.current)),De=null;return}o.flags&32768?(Be||l===1?n=!0:ta||(Ie&536870912)!==0?n=!1:(oo=n=!0,(l===2||l===9||l===3||l===6)&&(l=dn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Tb(o,n)):Tl(o)}function Tl(n){var o=n;do{if((o.flags&32768)!==0){Tb(o,oo);return}n=o.return;var a=Q2(o.alternate,o,Mr);if(a!==null){De=a;return}if(o=o.sibling,o!==null){De=o;return}De=o=n}while(o!==null);dt===0&&(dt=5)}function Tb(n,o){do{var a=G2(n.alternate,n);if(a!==null){a.flags&=32767,De=a;return}if(a=n.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!o&&(n=n.sibling,n!==null)){De=n;return}De=n=a}while(n!==null);dt=6,De=null}function Ab(n,o,a,l,d,m,S,R,N){n.cancelPendingCommit=null;do Al();while(Tt!==0);if((Ze&6)!==0)throw Error(s(327));if(o!==null){if(o===n.current)throw Error(s(177));if(m=o.lanes|o.childLanes,m|=rd,DR(n,a,m,S,R,N),n===We&&(De=We=null,Ie=0),ra=o,io=n,Nr=a,fh=m,dh=d,yb=l,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,aT(Ut,function(){return jb(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||l){l=I.T,I.T=null,d=K.p,K.p=2,S=Ze,Ze|=4;try{Y2(n,o,a)}finally{Ze=S,K.p=d,I.T=l}}Tt=1,Ob(),kb(),Mb()}}function Ob(){if(Tt===1){Tt=0;var n=io,o=ra,a=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||a){a=I.T,I.T=null;var l=K.p;K.p=2;var d=Ze;Ze|=4;try{lb(o,n);var m=Th,S=my(n.containerInfo),R=m.focusedElem,N=m.selectionRange;if(S!==R&&R&&R.ownerDocument&&py(R.ownerDocument.documentElement,R)){if(N!==null&&Jf(R)){var q=N.start,Y=N.end;if(Y===void 0&&(Y=q),"selectionStart"in R)R.selectionStart=q,R.selectionEnd=Math.min(Y,R.value.length);else{var ee=R.ownerDocument||document,F=ee&&ee.defaultView||window;if(F.getSelection){var Z=F.getSelection(),ue=R.textContent.length,Ce=Math.min(N.start,ue),Je=N.end===void 0?Ce:Math.min(N.end,ue);!Z.extend&&Ce>Je&&(S=Je,Je=Ce,Ce=S);var $=hy(R,Ce),P=hy(R,Je);if($&&P&&(Z.rangeCount!==1||Z.anchorNode!==$.node||Z.anchorOffset!==$.offset||Z.focusNode!==P.node||Z.focusOffset!==P.offset)){var B=ee.createRange();B.setStart($.node,$.offset),Z.removeAllRanges(),Ce>Je?(Z.addRange(B),Z.extend(P.node,P.offset)):(B.setEnd(P.node,P.offset),Z.addRange(B))}}}}for(ee=[],Z=R;Z=Z.parentNode;)Z.nodeType===1&&ee.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<ee.length;R++){var J=ee[R];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}Ul=!!Rh,Th=Rh=null}finally{Ze=d,K.p=l,I.T=a}}n.current=o,Tt=2}}function kb(){if(Tt===2){Tt=0;var n=io,o=ra,a=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||a){a=I.T,I.T=null;var l=K.p;K.p=2;var d=Ze;Ze|=4;try{ob(n,o.alternate,o)}finally{Ze=d,K.p=l,I.T=a}}Tt=3}}function Mb(){if(Tt===4||Tt===3){Tt=0,Of();var n=io,o=ra,a=Nr,l=yb;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Tt=5:(Tt=0,ra=io=null,Nb(n,n.pendingLanes));var d=n.pendingLanes;if(d===0&&(ao=null),jf(a),o=o.stateNode,cn&&typeof cn.onCommitFiberRoot=="function")try{cn.onCommitFiberRoot(Ga,o,void 0,(o.current.flags&128)===128)}catch{}if(l!==null){o=I.T,d=K.p,K.p=2,I.T=null;try{for(var m=n.onRecoverableError,S=0;S<l.length;S++){var R=l[S];m(R.value,{componentStack:R.stack})}}finally{I.T=o,K.p=d}}(Nr&3)!==0&&Al(),nr(n),d=n.pendingLanes,(a&261930)!==0&&(d&42)!==0?n===hh?Oi++:(Oi=0,hh=n):Oi=0,ki(0)}}function Nb(n,o){(n.pooledCacheLanes&=o)===0&&(o=n.pooledCache,o!=null&&(n.pooledCache=null,ui(o)))}function Al(){return Ob(),kb(),Mb(),jb()}function jb(){if(Tt!==5)return!1;var n=io,o=fh;fh=0;var a=jf(Nr),l=I.T,d=K.p;try{K.p=32>a?32:a,I.T=null,a=dh,dh=null;var m=io,S=Nr;if(Tt=0,ra=io=null,Nr=0,(Ze&6)!==0)throw Error(s(331));var R=Ze;if(Ze|=4,pb(m.current),fb(m,m.current,S,a),Ze=R,ki(0,!1),cn&&typeof cn.onPostCommitFiberRoot=="function")try{cn.onPostCommitFiberRoot(Ga,m)}catch{}return!0}finally{K.p=d,I.T=l,Nb(n,o)}}function zb(n,o,a){o=En(a,o),o=Hd(n.stateNode,o,2),n=eo(n,o,2),n!==null&&(Ka(n,2),nr(n))}function Ge(n,o,a){if(n.tag===3)zb(n,n,a);else for(;o!==null;){if(o.tag===3){zb(o,n,a);break}else if(o.tag===1){var l=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ao===null||!ao.has(l))){n=En(a,n),a=Dv(2),l=eo(o,a,2),l!==null&&(Pv(a,l,o,n),Ka(l,2),nr(l));break}}o=o.return}}function gh(n,o,a){var l=n.pingCache;if(l===null){l=n.pingCache=new J2;var d=new Set;l.set(o,d)}else d=l.get(o),d===void 0&&(d=new Set,l.set(o,d));d.has(a)||(ch=!0,d.add(a),n=rT.bind(null,n,o,a),o.then(n,n))}function rT(n,o,a){var l=n.pingCache;l!==null&&l.delete(o),n.pingedLanes|=n.suspendedLanes&a,n.warmLanes&=~a,We===n&&(Ie&a)===a&&(dt===4||dt===3&&(Ie&62914560)===Ie&&300>Vt()-xl?(Ze&2)===0&&oa(n,0):lh|=a,na===Ie&&(na=0)),nr(n)}function Db(n,o){o===0&&(o=Og()),n=Fo(n,o),n!==null&&(Ka(n,o),nr(n))}function oT(n){var o=n.memoizedState,a=0;o!==null&&(a=o.retryLane),Db(n,a)}function sT(n,o){var a=0;switch(n.tag){case 31:case 13:var l=n.stateNode,d=n.memoizedState;d!==null&&(a=d.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(s(314))}l!==null&&l.delete(o),Db(n,a)}function aT(n,o){return Ue(n,o)}var Ol=null,aa=null,yh=!1,kl=!1,vh=!1,lo=0;function nr(n){n!==aa&&n.next===null&&(aa===null?Ol=aa=n:aa=aa.next=n),kl=!0,yh||(yh=!0,cT())}function ki(n,o){if(!vh&&kl){vh=!0;do for(var a=!1,l=Ol;l!==null;){if(n!==0){var d=l.pendingLanes;if(d===0)var m=0;else{var S=l.suspendedLanes,R=l.pingedLanes;m=(1<<31-ln(42|n)+1)-1,m&=d&~(S&~R),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(a=!0,$b(l,m))}else m=Ie,m=zc(l,l===We?m:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(m&3)===0||Ya(l,m)||(a=!0,$b(l,m));l=l.next}while(a);vh=!1}}function iT(){Pb()}function Pb(){kl=yh=!1;var n=0;lo!==0&&vT()&&(n=lo);for(var o=Vt(),a=null,l=Ol;l!==null;){var d=l.next,m=Lb(l,o);m===0?(l.next=null,a===null?Ol=d:a.next=d,d===null&&(aa=a)):(a=l,(n!==0||(m&3)!==0)&&(kl=!0)),l=d}Tt!==0&&Tt!==5||ki(n),lo!==0&&(lo=0)}function Lb(n,o){for(var a=n.suspendedLanes,l=n.pingedLanes,d=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var S=31-ln(m),R=1<<S,N=d[S];N===-1?((R&a)===0||(R&l)!==0)&&(d[S]=zR(R,o)):N<=o&&(n.expiredLanes|=R),m&=~R}if(o=We,a=Ie,a=zc(n,n===o?a:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,a===0||n===o&&(Qe===2||Qe===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&ze(l),n.callbackNode=null,n.callbackPriority=0;if((a&3)===0||Ya(n,a)){if(o=a&-a,o===n.callbackPriority)return o;switch(l!==null&&ze(l),jf(a)){case 2:case 8:a=zt;break;case 32:a=Ut;break;case 268435456:a=Ag;break;default:a=Ut}return l=Ib.bind(null,n),a=Ue(a,l),n.callbackPriority=o,n.callbackNode=a,o}return l!==null&&l!==null&&ze(l),n.callbackPriority=2,n.callbackNode=null,2}function Ib(n,o){if(Tt!==0&&Tt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var a=n.callbackNode;if(Al()&&n.callbackNode!==a)return null;var l=Ie;return l=zc(n,n===We?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(bb(n,l,o),Lb(n,Vt()),n.callbackNode!=null&&n.callbackNode===a?Ib.bind(null,n):null)}function $b(n,o){if(Al())return null;bb(n,o,!0)}function cT(){wT(function(){(Ze&6)!==0?Ue(rt,iT):Pb()})}function bh(){if(lo===0){var n=Hs;n===0&&(n=Mc,Mc<<=1,(Mc&261888)===0&&(Mc=256)),lo=n}return lo}function Ub(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Ic(""+n)}function Bb(n,o){var a=o.ownerDocument.createElement("input");return a.name=o.name,a.value=o.value,n.id&&a.setAttribute("form",n.id),o.parentNode.insertBefore(a,o),n=new FormData(n),a.parentNode.removeChild(a),n}function lT(n,o,a,l,d){if(o==="submit"&&a&&a.stateNode===d){var m=Ub((d[Kt]||null).action),S=l.submitter;S&&(o=(o=S[Kt]||null)?Ub(o.formAction):S.getAttribute("formAction"),o!==null&&(m=o,S=null));var R=new qc("action","action",null,l,d);n.push({event:R,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(lo!==0){var N=S?Bb(d,S):new FormData(d);$d(a,{pending:!0,data:N,method:d.method,action:m},null,N)}}else typeof m=="function"&&(R.preventDefault(),N=S?Bb(d,S):new FormData(d),$d(a,{pending:!0,data:N,method:d.method,action:m},m,N))},currentTarget:d}]})}}for(var wh=0;wh<nd.length;wh++){var Sh=nd[wh],uT=Sh.toLowerCase(),fT=Sh[0].toUpperCase()+Sh.slice(1);qn(uT,"on"+fT)}qn(vy,"onAnimationEnd"),qn(by,"onAnimationIteration"),qn(wy,"onAnimationStart"),qn("dblclick","onDoubleClick"),qn("focusin","onFocus"),qn("focusout","onBlur"),qn(T2,"onTransitionRun"),qn(A2,"onTransitionStart"),qn(O2,"onTransitionCancel"),qn(Sy,"onTransitionEnd"),Ms("onMouseEnter",["mouseout","mouseover"]),Ms("onMouseLeave",["mouseout","mouseover"]),Ms("onPointerEnter",["pointerout","pointerover"]),Ms("onPointerLeave",["pointerout","pointerover"]),$o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$o("onBeforeInput",["compositionend","keypress","textInput","paste"]),$o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),dT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Mi));function qb(n,o){o=(o&4)!==0;for(var a=0;a<n.length;a++){var l=n[a],d=l.event;l=l.listeners;e:{var m=void 0;if(o)for(var S=l.length-1;0<=S;S--){var R=l[S],N=R.instance,q=R.currentTarget;if(R=R.listener,N!==m&&d.isPropagationStopped())break e;m=R,d.currentTarget=q;try{m(d)}catch(Y){Hc(Y)}d.currentTarget=null,m=N}else for(S=0;S<l.length;S++){if(R=l[S],N=R.instance,q=R.currentTarget,R=R.listener,N!==m&&d.isPropagationStopped())break e;m=R,d.currentTarget=q;try{m(d)}catch(Y){Hc(Y)}d.currentTarget=null,m=N}}}}function Pe(n,o){var a=o[zf];a===void 0&&(a=o[zf]=new Set);var l=n+"__bubble";a.has(l)||(Fb(o,n,2,!1),a.add(l))}function xh(n,o,a){var l=0;o&&(l|=4),Fb(a,n,l,o)}var Ml="_reactListening"+Math.random().toString(36).slice(2);function _h(n){if(!n[Ml]){n[Ml]=!0,Pg.forEach(function(a){a!=="selectionchange"&&(dT.has(a)||xh(a,!1,n),xh(a,!0,n))});var o=n.nodeType===9?n:n.ownerDocument;o===null||o[Ml]||(o[Ml]=!0,xh("selectionchange",!1,o))}}function Fb(n,o,a,l){switch(v0(o)){case 2:var d=UT;break;case 8:d=BT;break;default:d=Ih}a=d.bind(null,o,a,n),d=void 0,!Ff||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(d=!0),l?d!==void 0?n.addEventListener(o,a,{capture:!0,passive:d}):n.addEventListener(o,a,!0):d!==void 0?n.addEventListener(o,a,{passive:d}):n.addEventListener(o,a,!1)}function Ch(n,o,a,l,d){var m=l;if((o&1)===0&&(o&2)===0&&l!==null)e:for(;;){if(l===null)return;var S=l.tag;if(S===3||S===4){var R=l.stateNode.containerInfo;if(R===d)break;if(S===4)for(S=l.return;S!==null;){var N=S.tag;if((N===3||N===4)&&S.stateNode.containerInfo===d)return;S=S.return}for(;R!==null;){if(S=As(R),S===null)return;if(N=S.tag,N===5||N===6||N===26||N===27){l=m=S;continue e}R=R.parentNode}}l=l.return}Gg(function(){var q=m,Y=Bf(a),ee=[];e:{var F=xy.get(n);if(F!==void 0){var Z=qc,ue=n;switch(n){case"keypress":if(Uc(a)===0)break e;case"keydown":case"keyup":Z=s2;break;case"focusin":ue="focus",Z=Qf;break;case"focusout":ue="blur",Z=Qf;break;case"beforeblur":case"afterblur":Z=Qf;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=Xg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=QR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=c2;break;case vy:case by:case wy:Z=KR;break;case Sy:Z=u2;break;case"scroll":case"scrollend":Z=HR;break;case"wheel":Z=d2;break;case"copy":case"cut":case"paste":Z=JR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=Wg;break;case"toggle":case"beforetoggle":Z=p2}var Ce=(o&4)!==0,Je=!Ce&&(n==="scroll"||n==="scrollend"),$=Ce?F!==null?F+"Capture":null:F;Ce=[];for(var P=q,B;P!==null;){var J=P;if(B=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||B===null||$===null||(J=Wa(P,$),J!=null&&Ce.push(Ni(P,J,B))),Je)break;P=P.return}0<Ce.length&&(F=new Z(F,ue,null,a,Y),ee.push({event:F,listeners:Ce}))}}if((o&7)===0){e:{if(F=n==="mouseover"||n==="pointerover",Z=n==="mouseout"||n==="pointerout",F&&a!==Uf&&(ue=a.relatedTarget||a.fromElement)&&(As(ue)||ue[Ts]))break e;if((Z||F)&&(F=Y.window===Y?Y:(F=Y.ownerDocument)?F.defaultView||F.parentWindow:window,Z?(ue=a.relatedTarget||a.toElement,Z=q,ue=ue?As(ue):null,ue!==null&&(Je=c(ue),Ce=ue.tag,ue!==Je||Ce!==5&&Ce!==27&&Ce!==6)&&(ue=null)):(Z=null,ue=q),Z!==ue)){if(Ce=Xg,J="onMouseLeave",$="onMouseEnter",P="mouse",(n==="pointerout"||n==="pointerover")&&(Ce=Wg,J="onPointerLeave",$="onPointerEnter",P="pointer"),Je=Z==null?F:Ja(Z),B=ue==null?F:Ja(ue),F=new Ce(J,P+"leave",Z,a,Y),F.target=Je,F.relatedTarget=B,J=null,As(Y)===q&&(Ce=new Ce($,P+"enter",ue,a,Y),Ce.target=B,Ce.relatedTarget=Je,J=Ce),Je=J,Z&&ue)t:{for(Ce=hT,$=Z,P=ue,B=0,J=$;J;J=Ce(J))B++;J=0;for(var be=P;be;be=Ce(be))J++;for(;0<B-J;)$=Ce($),B--;for(;0<J-B;)P=Ce(P),J--;for(;B--;){if($===P||P!==null&&$===P.alternate){Ce=$;break t}$=Ce($),P=Ce(P)}Ce=null}else Ce=null;Z!==null&&Vb(ee,F,Z,Ce,!1),ue!==null&&Je!==null&&Vb(ee,Je,ue,Ce,!0)}}e:{if(F=q?Ja(q):window,Z=F.nodeName&&F.nodeName.toLowerCase(),Z==="select"||Z==="input"&&F.type==="file")var qe=iy;else if(sy(F))if(cy)qe=C2;else{qe=x2;var ge=S2}else Z=F.nodeName,!Z||Z.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?q&&$f(q.elementType)&&(qe=iy):qe=_2;if(qe&&(qe=qe(n,q))){ay(ee,qe,a,Y);break e}ge&&ge(n,F,q),n==="focusout"&&q&&F.type==="number"&&q.memoizedProps.value!=null&&If(F,"number",F.value)}switch(ge=q?Ja(q):window,n){case"focusin":(sy(ge)||ge.contentEditable==="true")&&(Ls=ge,Wf=q,ii=null);break;case"focusout":ii=Wf=Ls=null;break;case"mousedown":ed=!0;break;case"contextmenu":case"mouseup":case"dragend":ed=!1,gy(ee,a,Y);break;case"selectionchange":if(R2)break;case"keydown":case"keyup":gy(ee,a,Y)}var Me;if(Yf)e:{switch(n){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else Ps?ry(n,a)&&($e="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&($e="onCompositionStart");$e&&(ey&&a.locale!=="ko"&&(Ps||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&Ps&&(Me=Yg()):(Qr=Y,Vf="value"in Qr?Qr.value:Qr.textContent,Ps=!0)),ge=Nl(q,$e),0<ge.length&&($e=new Jg($e,n,null,a,Y),ee.push({event:$e,listeners:ge}),Me?$e.data=Me:(Me=oy(a),Me!==null&&($e.data=Me)))),(Me=g2?y2(n,a):v2(n,a))&&($e=Nl(q,"onBeforeInput"),0<$e.length&&(ge=new Jg("onBeforeInput","beforeinput",null,a,Y),ee.push({event:ge,listeners:$e}),ge.data=Me)),lT(ee,n,q,a,Y)}qb(ee,o)})}function Ni(n,o,a){return{instance:n,listener:o,currentTarget:a}}function Nl(n,o){for(var a=o+"Capture",l=[];n!==null;){var d=n,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Wa(n,a),d!=null&&l.unshift(Ni(n,d,m)),d=Wa(n,o),d!=null&&l.push(Ni(n,d,m))),n.tag===3)return l;n=n.return}return[]}function hT(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function Vb(n,o,a,l,d){for(var m=o._reactName,S=[];a!==null&&a!==l;){var R=a,N=R.alternate,q=R.stateNode;if(R=R.tag,N!==null&&N===l)break;R!==5&&R!==26&&R!==27||q===null||(N=q,d?(q=Wa(a,m),q!=null&&S.unshift(Ni(a,q,N))):d||(q=Wa(a,m),q!=null&&S.push(Ni(a,q,N)))),a=a.return}S.length!==0&&n.push({event:o,listeners:S})}var pT=/\r\n?/g,mT=/\u0000|\uFFFD/g;function Hb(n){return(typeof n=="string"?n:""+n).replace(pT,`
|
|
10
|
-
`).replace(mT,"")}function Zb(n,o){return o=Hb(o),Hb(n)===o}function Xe(n,o,a,l,d,m){switch(a){case"children":typeof l=="string"?o==="body"||o==="textarea"&&l===""||js(n,l):(typeof l=="number"||typeof l=="bigint")&&o!=="body"&&js(n,""+l);break;case"className":Pc(n,"class",l);break;case"tabIndex":Pc(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Pc(n,a,l);break;case"style":Zg(n,l,m);break;case"data":if(o!=="object"){Pc(n,"data",l);break}case"src":case"href":if(l===""&&(o!=="a"||a!=="href")){n.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(a);break}l=Ic(""+l),n.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(a==="formAction"?(o!=="input"&&Xe(n,o,"name",d.name,d,null),Xe(n,o,"formEncType",d.formEncType,d,null),Xe(n,o,"formMethod",d.formMethod,d,null),Xe(n,o,"formTarget",d.formTarget,d,null)):(Xe(n,o,"encType",d.encType,d,null),Xe(n,o,"method",d.method,d,null),Xe(n,o,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(a);break}l=Ic(""+l),n.setAttribute(a,l);break;case"onClick":l!=null&&(n.onclick=yr);break;case"onScroll":l!=null&&Pe("scroll",n);break;case"onScrollEnd":l!=null&&Pe("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(d.children!=null)throw Error(s(60));n.innerHTML=a}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}a=Ic(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,""+l):n.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,""):n.removeAttribute(a);break;case"capture":case"download":l===!0?n.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(a,l):n.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(a,l):n.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(a):n.setAttribute(a,l);break;case"popover":Pe("beforetoggle",n),Pe("toggle",n),Dc(n,"popover",l);break;case"xlinkActuate":gr(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":gr(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":gr(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":gr(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":gr(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":gr(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":gr(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":gr(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":gr(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Dc(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=FR.get(a)||a,Dc(n,a,l))}}function Eh(n,o,a,l,d,m){switch(a){case"style":Zg(n,l,m);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(s(61));if(a=l.__html,a!=null){if(d.children!=null)throw Error(s(60));n.innerHTML=a}}break;case"children":typeof l=="string"?js(n,l):(typeof l=="number"||typeof l=="bigint")&&js(n,""+l);break;case"onScroll":l!=null&&Pe("scroll",n);break;case"onScrollEnd":l!=null&&Pe("scrollend",n);break;case"onClick":l!=null&&(n.onclick=yr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Lg.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),o=a.slice(2,d?a.length-7:void 0),m=n[Kt]||null,m=m!=null?m[a]:null,typeof m=="function"&&n.removeEventListener(o,m,d),typeof l=="function")){typeof m!="function"&&m!==null&&(a in n?n[a]=null:n.hasAttribute(a)&&n.removeAttribute(a)),n.addEventListener(o,l,d);break e}a in n?n[a]=l:l===!0?n.setAttribute(a,""):Dc(n,a,l)}}}function $t(n,o,a){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pe("error",n),Pe("load",n);var l=!1,d=!1,m;for(m in a)if(a.hasOwnProperty(m)){var S=a[m];if(S!=null)switch(m){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,o));default:Xe(n,o,m,S,a,null)}}d&&Xe(n,o,"srcSet",a.srcSet,a,null),l&&Xe(n,o,"src",a.src,a,null);return;case"input":Pe("invalid",n);var R=m=S=d=null,N=null,q=null;for(l in a)if(a.hasOwnProperty(l)){var Y=a[l];if(Y!=null)switch(l){case"name":d=Y;break;case"type":S=Y;break;case"checked":N=Y;break;case"defaultChecked":q=Y;break;case"value":m=Y;break;case"defaultValue":R=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(s(137,o));break;default:Xe(n,o,l,Y,a,null)}}qg(n,m,R,N,q,S,d,!1);return;case"select":Pe("invalid",n),l=S=m=null;for(d in a)if(a.hasOwnProperty(d)&&(R=a[d],R!=null))switch(d){case"value":m=R;break;case"defaultValue":S=R;break;case"multiple":l=R;default:Xe(n,o,d,R,a,null)}o=m,a=S,n.multiple=!!l,o!=null?Ns(n,!!l,o,!1):a!=null&&Ns(n,!!l,a,!0);return;case"textarea":Pe("invalid",n),m=d=l=null;for(S in a)if(a.hasOwnProperty(S)&&(R=a[S],R!=null))switch(S){case"value":l=R;break;case"defaultValue":d=R;break;case"children":m=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(s(91));break;default:Xe(n,o,S,R,a,null)}Vg(n,l,d,m);return;case"option":for(N in a)a.hasOwnProperty(N)&&(l=a[N],l!=null)&&(N==="selected"?n.selected=l&&typeof l!="function"&&typeof l!="symbol":Xe(n,o,N,l,a,null));return;case"dialog":Pe("beforetoggle",n),Pe("toggle",n),Pe("cancel",n),Pe("close",n);break;case"iframe":case"object":Pe("load",n);break;case"video":case"audio":for(l=0;l<Mi.length;l++)Pe(Mi[l],n);break;case"image":Pe("error",n),Pe("load",n);break;case"details":Pe("toggle",n);break;case"embed":case"source":case"link":Pe("error",n),Pe("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(q in a)if(a.hasOwnProperty(q)&&(l=a[q],l!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,o));default:Xe(n,o,q,l,a,null)}return;default:if($f(o)){for(Y in a)a.hasOwnProperty(Y)&&(l=a[Y],l!==void 0&&Eh(n,o,Y,l,a,void 0));return}}for(R in a)a.hasOwnProperty(R)&&(l=a[R],l!=null&&Xe(n,o,R,l,a,null))}function gT(n,o,a,l){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,S=null,R=null,N=null,q=null,Y=null;for(Z in a){var ee=a[Z];if(a.hasOwnProperty(Z)&&ee!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":N=ee;default:l.hasOwnProperty(Z)||Xe(n,o,Z,null,l,ee)}}for(var F in l){var Z=l[F];if(ee=a[F],l.hasOwnProperty(F)&&(Z!=null||ee!=null))switch(F){case"type":m=Z;break;case"name":d=Z;break;case"checked":q=Z;break;case"defaultChecked":Y=Z;break;case"value":S=Z;break;case"defaultValue":R=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(s(137,o));break;default:Z!==ee&&Xe(n,o,F,Z,l,ee)}}Lf(n,S,R,N,q,Y,m,d);return;case"select":Z=S=R=F=null;for(m in a)if(N=a[m],a.hasOwnProperty(m)&&N!=null)switch(m){case"value":break;case"multiple":Z=N;default:l.hasOwnProperty(m)||Xe(n,o,m,null,l,N)}for(d in l)if(m=l[d],N=a[d],l.hasOwnProperty(d)&&(m!=null||N!=null))switch(d){case"value":F=m;break;case"defaultValue":R=m;break;case"multiple":S=m;default:m!==N&&Xe(n,o,d,m,l,N)}o=R,a=S,l=Z,F!=null?Ns(n,!!a,F,!1):!!l!=!!a&&(o!=null?Ns(n,!!a,o,!0):Ns(n,!!a,a?[]:"",!1));return;case"textarea":Z=F=null;for(R in a)if(d=a[R],a.hasOwnProperty(R)&&d!=null&&!l.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:Xe(n,o,R,null,l,d)}for(S in l)if(d=l[S],m=a[S],l.hasOwnProperty(S)&&(d!=null||m!=null))switch(S){case"value":F=d;break;case"defaultValue":Z=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(s(91));break;default:d!==m&&Xe(n,o,S,d,l,m)}Fg(n,F,Z);return;case"option":for(var ue in a)F=a[ue],a.hasOwnProperty(ue)&&F!=null&&!l.hasOwnProperty(ue)&&(ue==="selected"?n.selected=!1:Xe(n,o,ue,null,l,F));for(N in l)F=l[N],Z=a[N],l.hasOwnProperty(N)&&F!==Z&&(F!=null||Z!=null)&&(N==="selected"?n.selected=F&&typeof F!="function"&&typeof F!="symbol":Xe(n,o,N,F,l,Z));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ce in a)F=a[Ce],a.hasOwnProperty(Ce)&&F!=null&&!l.hasOwnProperty(Ce)&&Xe(n,o,Ce,null,l,F);for(q in l)if(F=l[q],Z=a[q],l.hasOwnProperty(q)&&F!==Z&&(F!=null||Z!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(s(137,o));break;default:Xe(n,o,q,F,l,Z)}return;default:if($f(o)){for(var Je in a)F=a[Je],a.hasOwnProperty(Je)&&F!==void 0&&!l.hasOwnProperty(Je)&&Eh(n,o,Je,void 0,l,F);for(Y in l)F=l[Y],Z=a[Y],!l.hasOwnProperty(Y)||F===Z||F===void 0&&Z===void 0||Eh(n,o,Y,F,l,Z);return}}for(var $ in a)F=a[$],a.hasOwnProperty($)&&F!=null&&!l.hasOwnProperty($)&&Xe(n,o,$,null,l,F);for(ee in l)F=l[ee],Z=a[ee],!l.hasOwnProperty(ee)||F===Z||F==null&&Z==null||Xe(n,o,ee,F,l,Z)}function Qb(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yT(){if(typeof performance.getEntriesByType=="function"){for(var n=0,o=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var d=a[l],m=d.transferSize,S=d.initiatorType,R=d.duration;if(m&&R&&Qb(S)){for(S=0,R=d.responseEnd,l+=1;l<a.length;l++){var N=a[l],q=N.startTime;if(q>R)break;var Y=N.transferSize,ee=N.initiatorType;Y&&Qb(ee)&&(N=N.responseEnd,S+=Y*(N<R?1:(R-q)/(N-q)))}if(--l,o+=8*(m+S)/(d.duration/1e3),n++,10<n)break}}if(0<n)return o/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var Rh=null,Th=null;function jl(n){return n.nodeType===9?n:n.ownerDocument}function Gb(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Yb(n,o){if(n===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&o==="foreignObject"?0:n}function Ah(n,o){return n==="textarea"||n==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Oh=null;function vT(){var n=window.event;return n&&n.type==="popstate"?n===Oh?!1:(Oh=n,!0):(Oh=null,!1)}var Kb=typeof setTimeout=="function"?setTimeout:void 0,bT=typeof clearTimeout=="function"?clearTimeout:void 0,Xb=typeof Promise=="function"?Promise:void 0,wT=typeof queueMicrotask=="function"?queueMicrotask:typeof Xb<"u"?function(n){return Xb.resolve(null).then(n).catch(ST)}:Kb;function ST(n){setTimeout(function(){throw n})}function uo(n){return n==="head"}function Jb(n,o){var a=o,l=0;do{var d=a.nextSibling;if(n.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(l===0){n.removeChild(d),ua(o);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")ji(n.ownerDocument.documentElement);else if(a==="head"){a=n.ownerDocument.head,ji(a);for(var m=a.firstChild;m;){var S=m.nextSibling,R=m.nodeName;m[Xa]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&m.rel.toLowerCase()==="stylesheet"||a.removeChild(m),m=S}}else a==="body"&&ji(n.ownerDocument.body);a=d}while(a);ua(o)}function Wb(n,o){var a=n;n=0;do{var l=a.nextSibling;if(a.nodeType===1?o?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(o?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(n===0)break;n--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||n++;a=l}while(a)}function kh(n){var o=n.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var a=o;switch(o=o.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":kh(a),Df(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}n.removeChild(a)}}function xT(n,o,a,l){for(;n.nodeType===1;){var d=a;if(n.nodeName.toLowerCase()!==o.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[Xa])switch(o){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(m=n.getAttribute("rel"),m==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(m!==d.rel||n.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||n.getAttribute("title")!==(d.title==null?null:d.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(d.src==null?null:d.src)||n.getAttribute("type")!==(d.type==null?null:d.type)||n.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(o==="input"&&n.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=kn(n.nextSibling),n===null)break}return null}function _T(n,o,a){if(o==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=kn(n.nextSibling),n===null))return null;return n}function e0(n,o){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=kn(n.nextSibling),n===null))return null;return n}function Mh(n){return n.data==="$?"||n.data==="$~"}function Nh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function CT(n,o){var a=n.ownerDocument;if(n.data==="$~")n._reactRetry=o;else if(n.data!=="$?"||a.readyState!=="loading")o();else{var l=function(){o(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function kn(n){for(;n!=null;n=n.nextSibling){var o=n.nodeType;if(o===1||o===3)break;if(o===8){if(o=n.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return n}var jh=null;function t0(n){n=n.nextSibling;for(var o=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"||a==="/&"){if(o===0)return kn(n.nextSibling);o--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||o++}n=n.nextSibling}return null}function n0(n){n=n.previousSibling;for(var o=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(o===0)return n;o--}else a!=="/$"&&a!=="/&"||o++}n=n.previousSibling}return null}function r0(n,o,a){switch(o=jl(a),n){case"html":if(n=o.documentElement,!n)throw Error(s(452));return n;case"head":if(n=o.head,!n)throw Error(s(453));return n;case"body":if(n=o.body,!n)throw Error(s(454));return n;default:throw Error(s(451))}}function ji(n){for(var o=n.attributes;o.length;)n.removeAttributeNode(o[0]);Df(n)}var Mn=new Map,o0=new Set;function zl(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var jr=K.d;K.d={f:ET,r:RT,D:TT,C:AT,L:OT,m:kT,X:NT,S:MT,M:jT};function ET(){var n=jr.f(),o=El();return n||o}function RT(n){var o=Os(n);o!==null&&o.tag===5&&o.type==="form"?Sv(o):jr.r(n)}var ia=typeof document>"u"?null:document;function s0(n,o,a){var l=ia;if(l&&typeof o=="string"&&o){var d=_n(o);d='link[rel="'+n+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),o0.has(d)||(o0.add(d),n={rel:n,crossOrigin:a,href:o},l.querySelector(d)===null&&(o=l.createElement("link"),$t(o,"link",n),Nt(o),l.head.appendChild(o)))}}function TT(n){jr.D(n),s0("dns-prefetch",n,null)}function AT(n,o){jr.C(n,o),s0("preconnect",n,o)}function OT(n,o,a){jr.L(n,o,a);var l=ia;if(l&&n&&o){var d='link[rel="preload"][as="'+_n(o)+'"]';o==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+_n(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+_n(a.imageSizes)+'"]')):d+='[href="'+_n(n)+'"]';var m=d;switch(o){case"style":m=ca(n);break;case"script":m=la(n)}Mn.has(m)||(n=v({rel:"preload",href:o==="image"&&a&&a.imageSrcSet?void 0:n,as:o},a),Mn.set(m,n),l.querySelector(d)!==null||o==="style"&&l.querySelector(zi(m))||o==="script"&&l.querySelector(Di(m))||(o=l.createElement("link"),$t(o,"link",n),Nt(o),l.head.appendChild(o)))}}function kT(n,o){jr.m(n,o);var a=ia;if(a&&n){var l=o&&typeof o.as=="string"?o.as:"script",d='link[rel="modulepreload"][as="'+_n(l)+'"][href="'+_n(n)+'"]',m=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=la(n)}if(!Mn.has(m)&&(n=v({rel:"modulepreload",href:n},o),Mn.set(m,n),a.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Di(m)))return}l=a.createElement("link"),$t(l,"link",n),Nt(l),a.head.appendChild(l)}}}function MT(n,o,a){jr.S(n,o,a);var l=ia;if(l&&n){var d=ks(l).hoistableStyles,m=ca(n);o=o||"default";var S=d.get(m);if(!S){var R={loading:0,preload:null};if(S=l.querySelector(zi(m)))R.loading=5;else{n=v({rel:"stylesheet",href:n,"data-precedence":o},a),(a=Mn.get(m))&&zh(n,a);var N=S=l.createElement("link");Nt(N),$t(N,"link",n),N._p=new Promise(function(q,Y){N.onload=q,N.onerror=Y}),N.addEventListener("load",function(){R.loading|=1}),N.addEventListener("error",function(){R.loading|=2}),R.loading|=4,Dl(S,o,l)}S={type:"stylesheet",instance:S,count:1,state:R},d.set(m,S)}}}function NT(n,o){jr.X(n,o);var a=ia;if(a&&n){var l=ks(a).hoistableScripts,d=la(n),m=l.get(d);m||(m=a.querySelector(Di(d)),m||(n=v({src:n,async:!0},o),(o=Mn.get(d))&&Dh(n,o),m=a.createElement("script"),Nt(m),$t(m,"link",n),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(d,m))}}function jT(n,o){jr.M(n,o);var a=ia;if(a&&n){var l=ks(a).hoistableScripts,d=la(n),m=l.get(d);m||(m=a.querySelector(Di(d)),m||(n=v({src:n,async:!0,type:"module"},o),(o=Mn.get(d))&&Dh(n,o),m=a.createElement("script"),Nt(m),$t(m,"link",n),a.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},l.set(d,m))}}function a0(n,o,a,l){var d=(d=ye.current)?zl(d):null;if(!d)throw Error(s(446));switch(n){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(o=ca(a.href),a=ks(d).hoistableStyles,l=a.get(o),l||(l={type:"style",instance:null,count:0,state:null},a.set(o,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){n=ca(a.href);var m=ks(d).hoistableStyles,S=m.get(n);if(S||(d=d.ownerDocument||d,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,S),(m=d.querySelector(zi(n)))&&!m._p&&(S.instance=m,S.state.loading=5),Mn.has(n)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Mn.set(n,a),m||zT(d,n,a,S.state))),o&&l===null)throw Error(s(528,""));return S}if(o&&l!==null)throw Error(s(529,""));return null;case"script":return o=a.async,a=a.src,typeof a=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=la(a),a=ks(d).hoistableScripts,l=a.get(o),l||(l={type:"script",instance:null,count:0,state:null},a.set(o,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,n))}}function ca(n){return'href="'+_n(n)+'"'}function zi(n){return'link[rel="stylesheet"]['+n+"]"}function i0(n){return v({},n,{"data-precedence":n.precedence,precedence:null})}function zT(n,o,a,l){n.querySelector('link[rel="preload"][as="style"]['+o+"]")?l.loading=1:(o=n.createElement("link"),l.preload=o,o.addEventListener("load",function(){return l.loading|=1}),o.addEventListener("error",function(){return l.loading|=2}),$t(o,"link",a),Nt(o),n.head.appendChild(o))}function la(n){return'[src="'+_n(n)+'"]'}function Di(n){return"script[async]"+n}function c0(n,o,a){if(o.count++,o.instance===null)switch(o.type){case"style":var l=n.querySelector('style[data-href~="'+_n(a.href)+'"]');if(l)return o.instance=l,Nt(l),l;var d=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),Nt(l),$t(l,"style",d),Dl(l,a.precedence,n),o.instance=l;case"stylesheet":d=ca(a.href);var m=n.querySelector(zi(d));if(m)return o.state.loading|=4,o.instance=m,Nt(m),m;l=i0(a),(d=Mn.get(d))&&zh(l,d),m=(n.ownerDocument||n).createElement("link"),Nt(m);var S=m;return S._p=new Promise(function(R,N){S.onload=R,S.onerror=N}),$t(m,"link",l),o.state.loading|=4,Dl(m,a.precedence,n),o.instance=m;case"script":return m=la(a.src),(d=n.querySelector(Di(m)))?(o.instance=d,Nt(d),d):(l=a,(d=Mn.get(m))&&(l=v({},a),Dh(l,d)),n=n.ownerDocument||n,d=n.createElement("script"),Nt(d),$t(d,"link",l),n.head.appendChild(d),o.instance=d);case"void":return null;default:throw Error(s(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(l=o.instance,o.state.loading|=4,Dl(l,a.precedence,n));return o.instance}function Dl(n,o,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,m=d,S=0;S<l.length;S++){var R=l[S];if(R.dataset.precedence===o)m=R;else if(m!==d)break}m?m.parentNode.insertBefore(n,m.nextSibling):(o=a.nodeType===9?a.head:a,o.insertBefore(n,o.firstChild))}function zh(n,o){n.crossOrigin==null&&(n.crossOrigin=o.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=o.referrerPolicy),n.title==null&&(n.title=o.title)}function Dh(n,o){n.crossOrigin==null&&(n.crossOrigin=o.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=o.referrerPolicy),n.integrity==null&&(n.integrity=o.integrity)}var Pl=null;function l0(n,o,a){if(Pl===null){var l=new Map,d=Pl=new Map;d.set(a,l)}else d=Pl,l=d.get(a),l||(l=new Map,d.set(a,l));if(l.has(n))return l;for(l.set(n,null),a=a.getElementsByTagName(n),d=0;d<a.length;d++){var m=a[d];if(!(m[Xa]||m[Dt]||n==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var S=m.getAttribute(o)||"";S=n+S;var R=l.get(S);R?R.push(m):l.set(S,[m])}}return l}function u0(n,o,a){n=n.ownerDocument||n,n.head.insertBefore(a,o==="title"?n.querySelector("head > title"):null)}function DT(n,o,a){if(a===1||o.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(n=o.disabled,typeof o.precedence=="string"&&n==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function f0(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function PT(n,o,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=ca(l.href),m=o.querySelector(zi(d));if(m){o=m._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(n.count++,n=Ll.bind(n),o.then(n,n)),a.state.loading|=4,a.instance=m,Nt(m);return}m=o.ownerDocument||o,l=i0(l),(d=Mn.get(d))&&zh(l,d),m=m.createElement("link"),Nt(m);var S=m;S._p=new Promise(function(R,N){S.onload=R,S.onerror=N}),$t(m,"link",l),a.instance=m}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(a,o),(o=a.state.preload)&&(a.state.loading&3)===0&&(n.count++,a=Ll.bind(n),o.addEventListener("load",a),o.addEventListener("error",a))}}var Ph=0;function LT(n,o){return n.stylesheets&&n.count===0&&$l(n,n.stylesheets),0<n.count||0<n.imgCount?function(a){var l=setTimeout(function(){if(n.stylesheets&&$l(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+o);0<n.imgBytes&&Ph===0&&(Ph=62500*yT());var d=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&$l(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>Ph?50:800)+o);return n.unsuspend=a,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function Ll(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$l(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Il=null;function $l(n,o){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Il=new Map,o.forEach(IT,n),Il=null,Ll.call(n))}function IT(n,o){if(!(o.state.loading&4)){var a=Il.get(n);if(a)var l=a.get(null);else{a=new Map,Il.set(n,a);for(var d=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var S=d[m];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(a.set(S.dataset.precedence,S),l=S)}l&&a.set(null,l)}d=o.instance,S=d.getAttribute("data-precedence"),m=a.get(S)||l,m===l&&a.set(null,d),a.set(S,d),this.count++,l=Ll.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),m?m.parentNode.insertBefore(d,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(d,n.firstChild)),o.state.loading|=4}}var Pi={$$typeof:k,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function $T(n,o,a,l,d,m,S,R,N){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Mf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mf(0),this.hiddenUpdates=Mf(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function d0(n,o,a,l,d,m,S,R,N,q,Y,ee){return n=new $T(n,o,a,S,N,q,Y,ee,R),o=1,m===!0&&(o|=24),m=fn(3,null,null,o),n.current=m,m.stateNode=n,o=md(),o.refCount++,n.pooledCache=o,o.refCount++,m.memoizedState={element:l,isDehydrated:a,cache:o},bd(m),n}function h0(n){return n?(n=Us,n):Us}function p0(n,o,a,l,d,m){d=h0(d),l.context===null?l.context=d:l.pendingContext=d,l=Wr(o),l.payload={element:a},m=m===void 0?null:m,m!==null&&(l.callback=m),a=eo(n,l,o),a!==null&&(nn(a,n,o),pi(a,n,o))}function m0(n,o){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<o?a:o}}function Lh(n,o){m0(n,o),(n=n.alternate)&&m0(n,o)}function g0(n){if(n.tag===13||n.tag===31){var o=Fo(n,67108864);o!==null&&nn(o,n,67108864),Lh(n,67108864)}}function y0(n){if(n.tag===13||n.tag===31){var o=gn();o=Nf(o);var a=Fo(n,o);a!==null&&nn(a,n,o),Lh(n,o)}}var Ul=!0;function UT(n,o,a,l){var d=I.T;I.T=null;var m=K.p;try{K.p=2,Ih(n,o,a,l)}finally{K.p=m,I.T=d}}function BT(n,o,a,l){var d=I.T;I.T=null;var m=K.p;try{K.p=8,Ih(n,o,a,l)}finally{K.p=m,I.T=d}}function Ih(n,o,a,l){if(Ul){var d=$h(l);if(d===null)Ch(n,o,l,Bl,a),b0(n,l);else if(FT(d,n,o,a,l))l.stopPropagation();else if(b0(n,l),o&4&&-1<qT.indexOf(n)){for(;d!==null;){var m=Os(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var S=Io(m.pendingLanes);if(S!==0){var R=m;for(R.pendingLanes|=2,R.entangledLanes|=2;S;){var N=1<<31-ln(S);R.entanglements[1]|=N,S&=~N}nr(m),(Ze&6)===0&&(_l=Vt()+500,ki(0))}}break;case 31:case 13:R=Fo(m,2),R!==null&&nn(R,m,2),El(),Lh(m,2)}if(m=$h(l),m===null&&Ch(n,o,l,Bl,a),m===d)break;d=m}d!==null&&l.stopPropagation()}else Ch(n,o,l,null,a)}}function $h(n){return n=Bf(n),Uh(n)}var Bl=null;function Uh(n){if(Bl=null,n=As(n),n!==null){var o=c(n);if(o===null)n=null;else{var a=o.tag;if(a===13){if(n=u(o),n!==null)return n;n=null}else if(a===31){if(n=f(o),n!==null)return n;n=null}else if(a===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}return Bl=n,null}function v0(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(kf()){case rt:return 2;case zt:return 8;case Ut:case kc:return 32;case Ag:return 268435456;default:return 32}default:return 32}}var Bh=!1,fo=null,ho=null,po=null,Li=new Map,Ii=new Map,mo=[],qT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function b0(n,o){switch(n){case"focusin":case"focusout":fo=null;break;case"dragenter":case"dragleave":ho=null;break;case"mouseover":case"mouseout":po=null;break;case"pointerover":case"pointerout":Li.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ii.delete(o.pointerId)}}function $i(n,o,a,l,d,m){return n===null||n.nativeEvent!==m?(n={blockedOn:o,domEventName:a,eventSystemFlags:l,nativeEvent:m,targetContainers:[d]},o!==null&&(o=Os(o),o!==null&&g0(o)),n):(n.eventSystemFlags|=l,o=n.targetContainers,d!==null&&o.indexOf(d)===-1&&o.push(d),n)}function FT(n,o,a,l,d){switch(o){case"focusin":return fo=$i(fo,n,o,a,l,d),!0;case"dragenter":return ho=$i(ho,n,o,a,l,d),!0;case"mouseover":return po=$i(po,n,o,a,l,d),!0;case"pointerover":var m=d.pointerId;return Li.set(m,$i(Li.get(m)||null,n,o,a,l,d)),!0;case"gotpointercapture":return m=d.pointerId,Ii.set(m,$i(Ii.get(m)||null,n,o,a,l,d)),!0}return!1}function w0(n){var o=As(n.target);if(o!==null){var a=c(o);if(a!==null){if(o=a.tag,o===13){if(o=u(a),o!==null){n.blockedOn=o,zg(n.priority,function(){y0(a)});return}}else if(o===31){if(o=f(a),o!==null){n.blockedOn=o,zg(n.priority,function(){y0(a)});return}}else if(o===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function ql(n){if(n.blockedOn!==null)return!1;for(var o=n.targetContainers;0<o.length;){var a=$h(n.nativeEvent);if(a===null){a=n.nativeEvent;var l=new a.constructor(a.type,a);Uf=l,a.target.dispatchEvent(l),Uf=null}else return o=Os(a),o!==null&&g0(o),n.blockedOn=a,!1;o.shift()}return!0}function S0(n,o,a){ql(n)&&a.delete(o)}function VT(){Bh=!1,fo!==null&&ql(fo)&&(fo=null),ho!==null&&ql(ho)&&(ho=null),po!==null&&ql(po)&&(po=null),Li.forEach(S0),Ii.forEach(S0)}function Fl(n,o){n.blockedOn===o&&(n.blockedOn=null,Bh||(Bh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,VT)))}var Vl=null;function x0(n){Vl!==n&&(Vl=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Vl===n&&(Vl=null);for(var o=0;o<n.length;o+=3){var a=n[o],l=n[o+1],d=n[o+2];if(typeof l!="function"){if(Uh(l||a)===null)continue;break}var m=Os(a);m!==null&&(n.splice(o,3),o-=3,$d(m,{pending:!0,data:d,method:a.method,action:l},l,d))}}))}function ua(n){function o(N){return Fl(N,n)}fo!==null&&Fl(fo,n),ho!==null&&Fl(ho,n),po!==null&&Fl(po,n),Li.forEach(o),Ii.forEach(o);for(var a=0;a<mo.length;a++){var l=mo[a];l.blockedOn===n&&(l.blockedOn=null)}for(;0<mo.length&&(a=mo[0],a.blockedOn===null);)w0(a),a.blockedOn===null&&mo.shift();if(a=(n.ownerDocument||n).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var d=a[l],m=a[l+1],S=d[Kt]||null;if(typeof m=="function")S||x0(a);else if(S){var R=null;if(m&&m.hasAttribute("formAction")){if(d=m,S=m[Kt]||null)R=S.formAction;else if(Uh(d)!==null)continue}else R=S.action;typeof R=="function"?a[l+1]=R:(a.splice(l,3),l-=3),x0(a)}}}function _0(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(S){return d=S})},focusReset:"manual",scroll:"manual"})}function o(){d!==null&&(d(),d=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),d!==null&&(d(),d=null)}}}function qh(n){this._internalRoot=n}Hl.prototype.render=qh.prototype.render=function(n){var o=this._internalRoot;if(o===null)throw Error(s(409));var a=o.current,l=gn();p0(a,l,n,o,null,null)},Hl.prototype.unmount=qh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var o=n.containerInfo;p0(n.current,2,null,n,null,null),El(),o[Ts]=null}};function Hl(n){this._internalRoot=n}Hl.prototype.unstable_scheduleHydration=function(n){if(n){var o=jg();n={blockedOn:null,target:n,priority:o};for(var a=0;a<mo.length&&o!==0&&o<mo[a].priority;a++);mo.splice(a,0,n),a===0&&w0(n)}};var C0=t.version;if(C0!=="19.2.3")throw Error(s(527,C0,"19.2.3"));K.findDOMNode=function(n){var o=n._reactInternals;if(o===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=p(o),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var HT={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zl.isDisabled&&Zl.supportsFiber)try{Ga=Zl.inject(HT),cn=Zl}catch{}}return Bi.createRoot=function(n,o){if(!i(n))throw Error(s(299));var a=!1,l="",d=Mv,m=Nv,S=jv;return o!=null&&(o.unstable_strictMode===!0&&(a=!0),o.identifierPrefix!==void 0&&(l=o.identifierPrefix),o.onUncaughtError!==void 0&&(d=o.onUncaughtError),o.onCaughtError!==void 0&&(m=o.onCaughtError),o.onRecoverableError!==void 0&&(S=o.onRecoverableError)),o=d0(n,1,!1,null,null,a,l,null,d,m,S,_0),n[Ts]=o.current,_h(n),new qh(o)},Bi.hydrateRoot=function(n,o,a){if(!i(n))throw Error(s(299));var l=!1,d="",m=Mv,S=Nv,R=jv,N=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(S=a.onCaughtError),a.onRecoverableError!==void 0&&(R=a.onRecoverableError),a.formState!==void 0&&(N=a.formState)),o=d0(n,1,!0,o,a??null,l,d,N,m,S,R,_0),o.context=h0(null),a=o.current,l=gn(),l=Nf(l),d=Wr(l),d.callback=null,eo(a,d,l),a=l,o.current.lanes=a,Ka(o,a),nr(o),n[Ts]=o.current,_h(n),new Hl(o)},Bi.version="19.2.3",Bi}var z0;function tA(){if(z0)return Hh.exports;z0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Hh.exports=eA(),Hh.exports}var nA=tA();const Up=new WeakMap,rA=new WeakMap,bu={current:[]};let Yh=!1,Wi=0;const Gi=new Set,Ql=new Map;function rx(e){for(const t of e){if(bu.current.includes(t))continue;bu.current.push(t),t.recompute();const r=rA.get(t);if(r)for(const s of r){const i=Up.get(s);i?.length&&rx(i)}}}function oA(e){const t={prevVal:e.prevState,currentVal:e.state};for(const r of e.listeners)r(t)}function sA(e){const t={prevVal:e.prevState,currentVal:e.state};for(const r of e.listeners)r(t)}function ox(e){if(Wi>0&&!Ql.has(e)&&Ql.set(e,e.prevState),Gi.add(e),!(Wi>0)&&!Yh)try{for(Yh=!0;Gi.size>0;){const t=Array.from(Gi);Gi.clear();for(const r of t){const s=Ql.get(r)??r.prevState;r.prevState=s,oA(r)}for(const r of t){const s=Up.get(r);s&&(bu.current.push(r),rx(s))}for(const r of t){const s=Up.get(r);if(s)for(const i of s)sA(i)}}}finally{Yh=!1,bu.current=[],Ql.clear()}}function _a(e){Wi++;try{e()}finally{if(Wi--,Wi===0){const t=Gi.values().next().value;t&&ox(t)}}}function aA(e){return typeof e=="function"}class iA{constructor(t,r){this.listeners=new Set,this.subscribe=s=>{var i,c;this.listeners.add(s);const u=(c=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:c.call(i,s,this);return()=>{this.listeners.delete(s),u?.()}},this.prevState=t,this.state=t,this.options=r}setState(t){var r,s,i;this.prevState=this.state,(r=this.options)!=null&&r.updateFn?this.state=this.options.updateFn(this.prevState)(t):aA(t)?this.state=t(this.prevState):this.state=t,(i=(s=this.options)==null?void 0:s.onUpdate)==null||i.call(s),ox(this)}}const _o="__TSR_index",D0="popstate",P0="beforeunload";function cA(e){let t=e.getLocation();const r=new Set,s=u=>{t=e.getLocation(),r.forEach(f=>f({location:t,action:u}))},i=u=>{e.notifyOnIndexChange??!0?s(u):t=e.getLocation()},c=async({task:u,navigateOpts:f,...h})=>{if(f?.ignoreBlocker??!1){u();return}const y=e.getBlockers?.()??[],v=h.type==="PUSH"||h.type==="REPLACE";if(typeof document<"u"&&y.length&&v)for(const b of y){const _=wu(h.path,h.state);if(await b.blockerFn({currentLocation:t,nextLocation:_,action:h.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:u=>(r.add(u),()=>{r.delete(u)}),push:(u,f,h)=>{const p=t.state[_o];f=L0(p+1,f),c({task:()=>{e.pushState(u,f),s({type:"PUSH"})},navigateOpts:h,type:"PUSH",path:u,state:f})},replace:(u,f,h)=>{const p=t.state[_o];f=L0(p,f),c({task:()=>{e.replaceState(u,f),s({type:"REPLACE"})},navigateOpts:h,type:"REPLACE",path:u,state:f})},go:(u,f)=>{c({task:()=>{e.go(u),i({type:"GO",index:u})},navigateOpts:f,type:"GO"})},back:u=>{c({task:()=>{e.back(u?.ignoreBlocker??!1),i({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{c({task:()=>{e.forward(u?.ignoreBlocker??!1),i({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[_o]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const f=e.getBlockers?.()??[];return e.setBlockers([...f,u]),()=>{const h=e.getBlockers?.()??[];e.setBlockers?.(h.filter(p=>p!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:s}}function L0(e,t){t||(t={});const r=pm();return{...t,key:r,__TSR_key:r,[_o]:e}}function lA(e){const t=typeof document<"u"?window:void 0,r=t.history.pushState,s=t.history.replaceState;let i=[];const c=()=>i,u=j=>i=j,f=(j=>j),h=(()=>wu(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const j=pm();t.history.replaceState({[_o]:0,key:j,__TSR_key:j},"")}let p=h(),y,v=!1,b=!1,_=!1,E=!1;const x=()=>p;let C,O;const M=()=>{C&&(L._ignoreSubscribers=!0,(C.isPush?t.history.pushState:t.history.replaceState)(C.state,"",C.href),L._ignoreSubscribers=!1,C=void 0,O=void 0,y=void 0)},k=(j,G,ie)=>{const ae=f(G);O||(y=p),p=wu(G,ie),C={href:ae,state:ie,isPush:C?.isPush||j==="push"},O||(O=Promise.resolve().then(()=>M()))},D=j=>{p=h(),L.notify({type:j})},U=async()=>{if(b){b=!1;return}const j=h(),G=j.state[_o]-p.state[_o],ie=G===1,ae=G===-1,te=!ie&&!ae||v;v=!1;const ce=te?"GO":ae?"BACK":"FORWARD",le=te?{type:"GO",index:G}:{type:ae?"BACK":"FORWARD"};if(_)_=!1;else{const me=c();if(typeof document<"u"&&me.length){for(const I of me)if(await I.blockerFn({currentLocation:p,nextLocation:j,action:ce})){b=!0,t.history.go(1),L.notify(le);return}}}p=h(),L.notify(le)},H=j=>{if(E){E=!1;return}let G=!1;const ie=c();if(typeof document<"u"&&ie.length)for(const ae of ie){const te=ae.enableBeforeUnload??!0;if(te===!0){G=!0;break}if(typeof te=="function"&&te()===!0){G=!0;break}}if(G)return j.preventDefault(),j.returnValue=""},L=cA({getLocation:x,getLength:()=>t.history.length,pushState:(j,G)=>k("push",j,G),replaceState:(j,G)=>k("replace",j,G),back:j=>(j&&(_=!0),E=!0,t.history.back()),forward:j=>{j&&(_=!0),E=!0,t.history.forward()},go:j=>{v=!0,t.history.go(j)},createHref:j=>f(j),flush:M,destroy:()=>{t.history.pushState=r,t.history.replaceState=s,t.removeEventListener(P0,H,{capture:!0}),t.removeEventListener(D0,U)},onBlocked:()=>{y&&p!==y&&(p=y)},getBlockers:c,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(P0,H,{capture:!0}),t.addEventListener(D0,U),t.history.pushState=function(...j){const G=r.apply(t.history,j);return L._ignoreSubscribers||D("PUSH"),G},t.history.replaceState=function(...j){const G=s.apply(t.history,j);return L._ignoreSubscribers||D("REPLACE"),G},L}function uA(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function wu(e,t){const r=uA(e),s=r.indexOf("#"),i=r.indexOf("?"),c=pm();return{href:r,pathname:r.substring(0,s>0?i>0?Math.min(s,i):s:i>0?i:r.length),hash:s>-1?r.substring(s):"",search:i>-1?r.slice(i,s===-1?void 0:s):"",state:t||{[_o]:0,key:c,__TSR_key:c}}}function pm(){return(Math.random()+1).toString(36).substring(7)}const fA=!1;function ac(e){return e[e.length-1]}function dA(e){return typeof e=="function"}function So(e,t){return dA(e)?e(t):e}const hA=Object.prototype.hasOwnProperty,I0=Object.prototype.propertyIsEnumerable;function zn(e,t,r=0){if(e===t)return e;if(r>500)return t;const s=t,i=B0(e)&&B0(s);if(!i&&!(Su(e)&&Su(s)))return s;const c=i?e:$0(e);if(!c)return s;const u=i?s:$0(s);if(!u)return s;const f=c.length,h=u.length,p=i?new Array(h):{};let y=0;for(let v=0;v<h;v++){const b=i?v:u[v],_=e[b],E=s[b];if(_===E){p[b]=_,(i?v<f:hA.call(e,b))&&y++;continue}if(_===null||E===null||typeof _!="object"||typeof E!="object"){p[b]=E;continue}const x=zn(_,E,r+1);p[b]=x,x===_&&y++}return f===h&&y===f?e:p}function $0(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!I0.call(e,i))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const s=t;for(const i of r){if(!I0.call(e,i))return!1;s.push(i)}return s}function Su(e){if(!U0(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!U0(r)||!r.hasOwnProperty("isPrototypeOf"))}function U0(e){return Object.prototype.toString.call(e)==="[object Object]"}function B0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ls(e,t,r){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let s=0,i=e.length;s<i;s++)if(!ls(e[s],t[s],r))return!1;return!0}if(Su(e)&&Su(t)){const s=r?.ignoreUndefined??!0;if(r?.partial){for(const u in t)if((!s||t[u]!==void 0)&&!ls(e[u],t[u],r))return!1;return!0}let i=0;if(!s)i=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&i++;let c=0;for(const u in t)if((!s||t[u]!==void 0)&&(c++,c>i||!ls(e[u],t[u],r)))return!1;return i===c}return!1}function ds(e){let t,r;const s=new Promise((i,c)=>{t=i,r=c});return s.status="pending",s.resolve=i=>{s.status="resolved",s.value=i,t(i),e?.(i)},s.reject=i=>{s.status="rejected",r(i)},s}function pA(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Ca(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function mA(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function q0(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return mA(t)}const sx=["http:","https:","mailto:","tel:"];function xu(e){if(!e)return!1;try{const t=new URL(e);return!sx.includes(t.protocol)}catch{return!1}}const gA={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},yA=/[&><\u2028\u2029]/g;function vA(e){return e.replace(yA,t=>gA[t])}function Kh(e,t){if(!e)return e;const r=/%25|%5C/gi;let s=0,i="",c;for(;(c=r.exec(e))!==null;)i+=q0(e.slice(s,c.index))+c[0],s=r.lastIndex;return i=i+q0(s?e.slice(s):e),i.startsWith("//")&&(i="/"+i.replace(/^\/+/,"")),i}function bA(e){return/[^\u0000-\u007F]/.test(e)?e.replace(/[^\u0000-\u007F]/gu,encodeURIComponent):e}var wA="Invariant failed";function sn(e,t){if(!e)throw new Error(wA)}function _u(e){const t=new Map;let r,s;const i=c=>{c.next&&(c.prev?(c.prev.next=c.next,c.next.prev=c.prev,c.next=void 0,s&&(s.next=c,c.prev=s)):(c.next.prev=void 0,r=c.next,c.next=void 0,s&&(c.prev=s,s.next=c)),s=c)};return{get(c){const u=t.get(c);if(u)return i(u),u.value},set(c,u){if(t.size>=e&&r){const h=r;t.delete(h.key),h.next&&(r=h.next,h.next.prev=void 0),h===s&&(s=void 0)}const f=t.get(c);if(f)f.value=u,i(f);else{const h={key:c,value:u,prev:s};s&&(s.next=h),s=h,r||(r=h),t.set(c,h)}},clear(){t.clear(),r=void 0,s=void 0}}}const ja=0,hs=1,ps=2,ic=3,ss=4,ax=5;function SA(e){const t=e.indexOf("{");if(t===-1)return null;const r=e.indexOf("}",t);return r===-1||t+1>=e.length?null:[t,r]}function mm(e,t,r=new Uint16Array(6)){const s=e.indexOf("/",t),i=s===-1?e.length:s,c=e.substring(t,i);if(!c||!c.includes("$"))return r[0]=ja,r[1]=t,r[2]=t,r[3]=i,r[4]=i,r[5]=i,r;if(c==="$"){const f=e.length;return r[0]=ps,r[1]=t,r[2]=t,r[3]=f,r[4]=f,r[5]=f,r}if(c.charCodeAt(0)===36)return r[0]=hs,r[1]=t,r[2]=t+1,r[3]=i,r[4]=i,r[5]=i,r;const u=SA(c);if(u){const[f,h]=u,p=c.charCodeAt(f+1);if(p===45){if(f+2<c.length&&c.charCodeAt(f+2)===36){const y=f+3,v=h;if(y<v)return r[0]=ic,r[1]=t+f,r[2]=t+y,r[3]=t+v,r[4]=t+h+1,r[5]=i,r}}else if(p===36){const y=f+1,v=f+2;return v===h?(r[0]=ps,r[1]=t+f,r[2]=t+y,r[3]=t+v,r[4]=t+h+1,r[5]=e.length,r):(r[0]=hs,r[1]=t+f,r[2]=t+v,r[3]=t+h,r[4]=t+h+1,r[5]=i,r)}}return r[0]=ja,r[1]=t,r[2]=t,r[3]=i,r[4]=i,r[5]=i,r}function Ku(e,t,r,s,i,c,u){u?.(r);let f=s;{const h=r.fullPath??r.from,p=h.length,y=r.options?.caseSensitive??e,v=!!(r.options?.params?.parse&&r.options?.skipRouteOnParseError?.params);for(;f<p;){const _=mm(h,f,t);let E;const x=f,C=_[5];switch(f=C+1,c++,_[0]){case ja:{const M=h.substring(_[2],_[3]);if(y){const k=i.static?.get(M);if(k)E=k;else{i.static??=new Map;const D=as(r.fullPath??r.from);D.parent=i,D.depth=c,E=D,i.static.set(M,D)}}else{const k=M.toLowerCase(),D=i.staticInsensitive?.get(k);if(D)E=D;else{i.staticInsensitive??=new Map;const U=as(r.fullPath??r.from);U.parent=i,U.depth=c,E=U,i.staticInsensitive.set(k,U)}}break}case hs:{const M=h.substring(x,_[1]),k=h.substring(_[4],C),D=y&&!!(M||k),U=M?D?M:M.toLowerCase():void 0,H=k?D?k:k.toLowerCase():void 0,L=!v&&i.dynamic?.find(j=>!j.skipOnParamError&&j.caseSensitive===D&&j.prefix===U&&j.suffix===H);if(L)E=L;else{const j=Jh(hs,r.fullPath??r.from,D,U,H);E=j,j.depth=c,j.parent=i,i.dynamic??=[],i.dynamic.push(j)}break}case ic:{const M=h.substring(x,_[1]),k=h.substring(_[4],C),D=y&&!!(M||k),U=M?D?M:M.toLowerCase():void 0,H=k?D?k:k.toLowerCase():void 0,L=!v&&i.optional?.find(j=>!j.skipOnParamError&&j.caseSensitive===D&&j.prefix===U&&j.suffix===H);if(L)E=L;else{const j=Jh(ic,r.fullPath??r.from,D,U,H);E=j,j.parent=i,j.depth=c,i.optional??=[],i.optional.push(j)}break}case ps:{const M=h.substring(x,_[1]),k=h.substring(_[4],C),D=y&&!!(M||k),U=M?D?M:M.toLowerCase():void 0,H=k?D?k:k.toLowerCase():void 0,L=Jh(ps,r.fullPath??r.from,D,U,H);E=L,L.parent=i,L.depth=c,i.wildcard??=[],i.wildcard.push(L)}}i=E}if(v&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const _=as(r.fullPath??r.from);_.kind=ax,_.parent=i,c++,_.depth=c,i.pathless??=[],i.pathless.push(_),i=_}const b=(r.path||!r.children)&&!r.isRoot;if(b&&h.endsWith("/")){const _=as(r.fullPath??r.from);_.kind=ss,_.parent=i,c++,_.depth=c,i.index=_,i=_}i.parse=r.options?.params?.parse??null,i.skipOnParamError=v,i.parsingPriority=r.options?.skipRouteOnParseError?.priority??0,b&&!i.route&&(i.route=r,i.fullPath=r.fullPath??r.from)}if(r.children)for(const h of r.children)Ku(e,t,h,f,i,c,u)}function Xh(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function bo(e){if(e.pathless)for(const t of e.pathless)bo(t);if(e.static)for(const t of e.static.values())bo(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())bo(t);if(e.dynamic?.length){e.dynamic.sort(Xh);for(const t of e.dynamic)bo(t)}if(e.optional?.length){e.optional.sort(Xh);for(const t of e.optional)bo(t)}if(e.wildcard?.length){e.wildcard.sort(Xh);for(const t of e.wildcard)bo(t)}}function as(e){return{kind:ja,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Jh(e,t,r,s,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:r,prefix:s,suffix:i}}function xA(e,t){const r=as("/"),s=new Uint16Array(6);for(const i of e)Ku(!1,s,i,1,r,0);bo(r),t.masksTree=r,t.flatCache=_u(1e3)}function _A(e,t){e||="/";const r=t.flatCache.get(e);if(r)return r;const s=gm(e,t.masksTree);return t.flatCache.set(e,s),s}function CA(e,t,r,s,i){e||="/",s||="/";const c=t?`case\0${e}`:e;let u=i.singleCache.get(c);if(!u){u=as("/");const f=new Uint16Array(6);Ku(t,f,{from:e},1,u,0),i.singleCache.set(c,u)}return gm(s,u,r)}function EA(e,t,r=!1){const s=r?e:`nofuzz\0${e}`,i=t.matchCache.get(s);if(i!==void 0)return i;e||="/";let c;try{c=gm(e,t.segmentTree,r)}catch(u){if(u instanceof URIError)c=null;else throw u}return c&&(c.branch=AA(c.route)),t.matchCache.set(s,c),c}function RA(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function TA(e,t=!1,r){const s=as(e.fullPath),i=new Uint16Array(6),c={},u={};let f=0;return Ku(t,i,e,1,s,0,p=>{if(r?.(p,f),sn(!(p.id in c),`Duplicate routes found with id: ${String(p.id)}`),c[p.id]=p,f!==0&&p.path){const y=RA(p.fullPath);(!u[y]||p.fullPath.endsWith("/"))&&(u[y]=p)}f++}),bo(s),{processedTree:{segmentTree:s,singleCache:_u(1e3),matchCache:_u(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:u}}function gm(e,t,r=!1){const s=e.split("/"),i=kA(e,s,t,r);if(!i)return null;const[c]=ix(e,s,i);return{route:i.node.route,rawParams:c,parsedParams:i.parsedParams}}function ix(e,t,r){const s=OA(r.node);let i=null;const c={};let u=r.extract?.part??0,f=r.extract?.node??0,h=r.extract?.path??0,p=r.extract?.segment??0;for(;f<s.length;u++,f++,h++,p++){const y=s[f];if(y.kind===ss)break;if(y.kind===ax){p--,u--,h--;continue}const v=t[u],b=h;if(v&&(h+=v.length),y.kind===hs){i??=r.node.fullPath.split("/");const _=i[p],E=y.prefix?.length??0;if(_.charCodeAt(E)===123){const C=y.suffix?.length??0,O=_.substring(E+2,_.length-C-1),M=v.substring(E,v.length-C);c[O]=decodeURIComponent(M)}else{const C=_.substring(1);c[C]=decodeURIComponent(v)}}else if(y.kind===ic){if(r.skipped&1<<f){u--,h=b-1;continue}i??=r.node.fullPath.split("/");const _=i[p],E=y.prefix?.length??0,x=y.suffix?.length??0,C=_.substring(E+3,_.length-x-1),O=y.suffix||y.prefix?v.substring(E,v.length-x):v;O&&(c[C]=decodeURIComponent(O))}else if(y.kind===ps){const _=y,E=e.substring(b+(_.prefix?.length??0),e.length-(_.suffix?.length??0)),x=decodeURIComponent(E);c["*"]=x,c._splat=x;break}}return r.rawParams&&Object.assign(c,r.rawParams),[c,{part:u,node:f,path:h,segment:p}]}function AA(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function OA(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function kA(e,t,r,s){if(e==="/"&&r.index)return{node:r.index,skipped:0};const i=!ac(t),c=i&&e!=="/",u=t.length-(i?1:0),f=[{node:r,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let h=null,p=null,y=null;for(;f.length;){const v=f.pop(),{node:b,index:_,skipped:E,depth:x,statics:C,dynamics:O,optionals:M}=v;let{extract:k,rawParams:D,parsedParams:U}=v;if(b.skipOnParamError){if(!Wh(e,t,v))continue;D=v.rawParams,k=v.extract,U=v.parsedParams}s&&b.route&&b.kind!==ss&&qi(p,v)&&(p=v);const H=_===u;if(H&&(b.route&&!c&&qi(y,v)&&(y=v),!b.optional&&!b.wildcard&&!b.index&&!b.pathless))continue;const L=H?void 0:t[_];let j;if(H&&b.index){const G={node:b.index,index:_,skipped:E,depth:x+1,statics:C,dynamics:O,optionals:M,extract:k,rawParams:D,parsedParams:U};let ie=!0;if(b.index.skipOnParamError&&(Wh(e,t,G)||(ie=!1)),ie){if(C===u&&!O&&!M&&!E)return G;qi(y,G)&&(y=G)}}if(b.wildcard&&qi(h,v))for(const G of b.wildcard){const{prefix:ie,suffix:ae}=G;if(ie&&(H||!(G.caseSensitive?L:j??=L.toLowerCase()).startsWith(ie)))continue;if(ae){if(H)continue;const ce=t.slice(_).join("/").slice(-ae.length);if((G.caseSensitive?ce:ce.toLowerCase())!==ae)continue}const te={node:G,index:u,skipped:E,depth:x,statics:C,dynamics:O,optionals:M,extract:k,rawParams:D,parsedParams:U};if(!(G.skipOnParamError&&!Wh(e,t,te))){h=te;break}}if(b.optional){const G=E|1<<x,ie=x+1;for(let ae=b.optional.length-1;ae>=0;ae--){const te=b.optional[ae];f.push({node:te,index:_,skipped:G,depth:ie,statics:C,dynamics:O,optionals:M,extract:k,rawParams:D,parsedParams:U})}if(!H)for(let ae=b.optional.length-1;ae>=0;ae--){const te=b.optional[ae],{prefix:ce,suffix:le}=te;if(ce||le){const me=te.caseSensitive?L:j??=L.toLowerCase();if(ce&&!me.startsWith(ce)||le&&!me.endsWith(le))continue}f.push({node:te,index:_+1,skipped:E,depth:ie,statics:C,dynamics:O,optionals:M+1,extract:k,rawParams:D,parsedParams:U})}}if(!H&&b.dynamic&&L)for(let G=b.dynamic.length-1;G>=0;G--){const ie=b.dynamic[G],{prefix:ae,suffix:te}=ie;if(ae||te){const ce=ie.caseSensitive?L:j??=L.toLowerCase();if(ae&&!ce.startsWith(ae)||te&&!ce.endsWith(te))continue}f.push({node:ie,index:_+1,skipped:E,depth:x+1,statics:C,dynamics:O+1,optionals:M,extract:k,rawParams:D,parsedParams:U})}if(!H&&b.staticInsensitive){const G=b.staticInsensitive.get(j??=L.toLowerCase());G&&f.push({node:G,index:_+1,skipped:E,depth:x+1,statics:C+1,dynamics:O,optionals:M,extract:k,rawParams:D,parsedParams:U})}if(!H&&b.static){const G=b.static.get(L);G&&f.push({node:G,index:_+1,skipped:E,depth:x+1,statics:C+1,dynamics:O,optionals:M,extract:k,rawParams:D,parsedParams:U})}if(b.pathless){const G=x+1;for(let ie=b.pathless.length-1;ie>=0;ie--){const ae=b.pathless[ie];f.push({node:ae,index:_,skipped:E,depth:G,statics:C,dynamics:O,optionals:M,extract:k,rawParams:D,parsedParams:U})}}}if(y&&h)return qi(h,y)?y:h;if(y)return y;if(h)return h;if(s&&p){let v=p.index;for(let _=0;_<p.index;_++)v+=t[_].length;const b=v===e.length?"/":e.slice(v);return p.rawParams??={},p.rawParams["**"]=decodeURIComponent(b),p}return null}function Wh(e,t,r){try{const[s,i]=ix(e,t,r);r.rawParams=s,r.extract=i;const c=r.node.parse(s);return r.parsedParams=Object.assign({},r.parsedParams,c),!0}catch{return null}}function qi(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ss)>(e.node.kind===ss)||t.node.kind===ss==(e.node.kind===ss)&&t.depth>e.depth))):!0}function uu(e){return ym(e.filter(t=>t!==void 0).join("/"))}function ym(e){return e.replace(/\/{2,}/g,"/")}function cx(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ir(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function lx(e){return Ir(cx(e))}function Cu(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function MA(e,t,r){return Cu(e,r)===Cu(t,r)}function NA({base:e,to:t,trailingSlash:r="never",cache:s}){const i=t.startsWith("/"),c=!i&&t===".";let u;if(s){u=i?t:c?e:e+"\0"+t;const v=s.get(u);if(v)return v}let f;if(c)f=e.split("/");else if(i)f=t.split("/");else{for(f=e.split("/");f.length>1&&ac(f)==="";)f.pop();const v=t.split("/");for(let b=0,_=v.length;b<_;b++){const E=v[b];E===""?b?b===_-1&&f.push(E):f=[E]:E===".."?f.pop():E==="."||f.push(E)}}f.length>1&&(ac(f)===""?r==="never"&&f.pop():r==="always"&&f.push(""));let h,p="";for(let v=0;v<f.length;v++){v>0&&(p+="/");const b=f[v];if(!b)continue;h=mm(b,0,h);const _=h[0];if(_===ja){p+=b;continue}const E=h[5],x=b.substring(0,h[1]),C=b.substring(h[4],E),O=b.substring(h[2],h[3]);_===hs?p+=x||C?`${x}{$${O}}${C}`:`$${O}`:_===ps?p+=x||C?`${x}{$}${C}`:"$":p+=`${x}{-$${O}}${C}`}p=ym(p);const y=p||"/";return u&&s&&s.set(u,y),y}function jA(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),r=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),s=new RegExp(r,"g");return i=>i.replace(s,c=>t.get(c)??c)}function ep(e,t,r){const s=t[e];return typeof s!="string"?s:e==="_splat"?encodeURI(s):zA(s,r)}function tp({path:e,params:t,decoder:r}){let s=!1;const i={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:s};const c=e.length;let u=0,f,h="";for(;u<c;){const y=u;f=mm(e,y,f);const v=f[5];if(u=v+1,y===v)continue;const b=f[0];if(b===ja){h+="/"+e.substring(y,v);continue}if(b===ps){const _=t._splat;i._splat=_,i["*"]=_;const E=e.substring(y,f[1]),x=e.substring(f[4],v);if(!_){s=!0,(E||x)&&(h+="/"+E+x);continue}const C=ep("_splat",t,r);h+="/"+E+C+x;continue}if(b===hs){const _=e.substring(f[2],f[3]);!s&&!(_ in t)&&(s=!0),i[_]=t[_];const E=e.substring(y,f[1]),x=e.substring(f[4],v),C=ep(_,t,r)??"undefined";h+="/"+E+C+x;continue}if(b===ic){const _=e.substring(f[2],f[3]),E=t[_];if(E==null)continue;i[_]=E;const x=e.substring(y,f[1]),C=e.substring(f[4],v),O=ep(_,t,r)??"";h+="/"+x+O+C;continue}}return e.endsWith("/")&&(h+="/"),{usedParams:i,interpolatedPath:h||"/",isMissingParams:s}}function zA(e,t){const r=encodeURIComponent(e);return t?.(r)??r}function Qt(e){return!!e?.isNotFound}function DA(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Bp="tsr-scroll-restoration-v1_3",PA=(e,t)=>{let r;return(...s)=>{r||(r=setTimeout(()=>{e(...s),r=null},t))}};function LA(){const e=DA();if(!e)return null;const t=e.getItem(Bp);let r=t?JSON.parse(t):{};return{state:r,set:s=>{r=So(s,r)||r;try{e.setItem(Bp,JSON.stringify(r))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Gl=LA(),IA=e=>e.state.__TSR_key||e.href;function $A(e){const t=[];let r;for(;r=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${t.reverse().join(" > ")}`.toLowerCase()}let Eu=!1;function UA({storageKey:e,key:t,behavior:r,shouldScrollRestoration:s,scrollToTopSelectors:i,location:c}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(p){console.error(p);return}const f=t||window.history.state?.__TSR_key,h=u[f];Eu=!0;e:{if(s&&h&&Object.keys(h).length>0){for(const v in h){const b=h[v];if(v==="window")window.scrollTo({top:b.scrollY,left:b.scrollX,behavior:r});else if(v){const _=document.querySelector(v);_&&(_.scrollLeft=b.scrollX,_.scrollTop=b.scrollY)}}break e}const p=(c??window.location).hash.split("#",2)[1];if(p){const v=window.history.state?.__hashScrollIntoViewOptions??!0;if(v){const b=document.getElementById(p);b&&b.scrollIntoView(v)}break e}const y={top:0,left:0,behavior:r};if(window.scrollTo(y),i)for(const v of i){if(v==="window")continue;const b=typeof v=="function"?v():document.querySelector(v);b&&b.scrollTo(y)}}Eu=!1}function BA(e,t){if(!Gl||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!Gl))return;e.isScrollRestorationSetup=!0,Eu=!1;const s=e.options.getScrollRestorationKey||IA;window.history.scrollRestoration="manual";const i=c=>{if(Eu||!e.isScrollRestoring)return;let u="";if(c.target===document||c.target===window)u="window";else{const h=c.target.getAttribute("data-scroll-restoration-id");h?u=`[data-scroll-restoration-id="${h}"]`:u=$A(c.target)}const f=s(e.state.location);Gl.set(h=>{const p=h[f]||={},y=p[u]||={};if(u==="window")y.scrollX=window.scrollX||0,y.scrollY=window.scrollY||0;else if(u){const v=document.querySelector(u);v&&(y.scrollX=v.scrollLeft||0,y.scrollY=v.scrollTop||0)}return h})};typeof document<"u"&&document.addEventListener("scroll",PA(i,100),!0),e.subscribe("onRendered",c=>{const u=s(c.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(UA({storageKey:Bp,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Gl.set(f=>(f[u]||={},f)))})}function qA(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const r=document.getElementById(e.state.location.hash);r&&r.scrollIntoView(t)}}}function ux(e,t=String){const r=new URLSearchParams;for(const s in e){const i=e[s];i!==void 0&&r.set(s,t(i))}return r.toString()}function np(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function FA(e){const t=new URLSearchParams(e),r={};for(const[s,i]of t.entries()){const c=r[s];c==null?r[s]=np(i):Array.isArray(c)?c.push(np(i)):r[s]=[c,np(i)]}return r}const VA=ZA(JSON.parse),HA=QA(JSON.stringify,JSON.parse);function ZA(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=FA(t);for(const s in r){const i=r[s];if(typeof i=="string")try{r[s]=e(i)}catch{}}return r}}function QA(e,t){const r=typeof t=="function";function s(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(r&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const c=ux(i,s);return c?`?${c}`:""}}const Pn="__root__";function fx(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&xu(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${sx.join(", ")} protocols are allowed.`);if(!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function vn(e){return e instanceof Response&&!!e.options}function dx(e){if(e!==null&&typeof e=="object"&&e.isSerializedRedirect)return fx(e)}const fu=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Xu=(e,t)=>!!(e.preload&&!e.router.state.matches.some(r=>r.id===t)),Ea=(e,t,r=!0)=>{const s={...e.router.options.context??{}},i=r?t:t-1;for(let c=0;c<=i;c++){const u=e.matches[c];if(!u)continue;const f=e.router.getMatch(u.id);f&&Object.assign(s,f.__routeContext,f.__beforeLoadContext)}return s},hx=(e,t)=>{const r=e.router.routesById[t.routeId??""]??e.router.routeTree;!r.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(r.options.notFoundComponent=e.router.options.defaultNotFoundComponent),sn(r.options.notFoundComponent);const s=e.matches.find(i=>i.routeId===r.id);sn(s,"Could not find match for route: "+r.id),e.updateMatch(s.id,i=>({...i,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&r.parentRoute&&(t.routeId=r.parentRoute.id,hx(e,t))},xo=(e,t,r)=>{if(!(!vn(r)&&!Qt(r))){if(vn(r)&&r.redirectHandled&&!r.options.reloadDocument)throw r;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const s=vn(r)?"redirected":"notFound";t._nonReactive.error=r,e.updateMatch(t.id,i=>({...i,status:s,context:Ea(e,t.index),isFetching:!1,error:r})),Qt(r)&&!r.routeId&&(r.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw vn(r)?(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r),r):(hx(e,r),r)}},px=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,Fi=(e,t,r,s)=>{const{id:i,routeId:c}=e.matches[t],u=e.router.looseRoutesById[c];if(r instanceof Promise)throw r;r.routerCode=s,e.firstBadMatchIndex??=t,xo(e,e.router.getMatch(i),r);try{u.options.onError?.(r)}catch(f){r=f,xo(e,e.router.getMatch(i),r)}e.updateMatch(i,f=>(f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,f._nonReactive.loadPromise?.resolve(),{...f,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},mx=(e,t,r,s)=>{if(s._nonReactive.pendingTimeout!==void 0)return;const i=r.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Xu(e,t)&&(r.options.loader||r.options.beforeLoad||vx(r))&&typeof i=="number"&&i!==1/0&&(r.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{fu(e)},i);s._nonReactive.pendingTimeout=u}},GA=(e,t,r)=>{const s=e.router.getMatch(t);if(!s._nonReactive.beforeLoadPromise&&!s._nonReactive.loaderPromise)return;mx(e,t,r,s);const i=()=>{const c=e.router.getMatch(t);c.preload&&(c.status==="redirected"||c.status==="notFound")&&xo(e,c,c.error)};return s._nonReactive.beforeLoadPromise?s._nonReactive.beforeLoadPromise.then(i):i()},YA=(e,t,r,s)=>{const i=e.router.getMatch(t),c=i._nonReactive.loadPromise;i._nonReactive.loadPromise=ds(()=>{c?.resolve()});const{paramsError:u,searchError:f}=i;u&&Fi(e,r,u,"PARSE_PARAMS"),f&&Fi(e,r,f,"VALIDATE_SEARCH"),mx(e,t,s,i);const h=new AbortController,p=e.matches[r-1]?.id;(p?e.router.getMatch(p):void 0)?.context??e.router.options.context;let v=!1;const b=()=>{v||(v=!0,e.updateMatch(t,H=>({...H,isFetching:"beforeLoad",fetchCount:H.fetchCount+1,abortController:h})))},_=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,H=>({...H,isFetching:!1}))};if(!s.options.beforeLoad){_a(()=>{b(),_()});return}i._nonReactive.beforeLoadPromise=ds();const E={...Ea(e,r,!1),...i.__routeContext},{search:x,params:C,cause:O}=i,M=Xu(e,t),k={search:x,abortController:h,params:C,preload:M,context:E,location:e.location,navigate:H=>e.router.navigate({...H,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:M?"preload":O,matches:e.matches,...e.router.options.additionalContext},D=H=>{if(H===void 0){_a(()=>{b(),_()});return}(vn(H)||Qt(H))&&(b(),Fi(e,r,H,"BEFORE_LOAD")),_a(()=>{b(),e.updateMatch(t,L=>({...L,__beforeLoadContext:H})),_()})};let U;try{if(U=s.options.beforeLoad(k),Ca(U))return b(),U.catch(H=>{Fi(e,r,H,"BEFORE_LOAD")}).then(D)}catch(H){b(),Fi(e,r,H,"BEFORE_LOAD")}D(U)},KA=(e,t)=>{const{id:r,routeId:s}=e.matches[t],i=e.router.looseRoutesById[s],c=()=>f(),u=()=>YA(e,r,t,i),f=()=>{if(px(e,r))return;const h=GA(e,r,i);return Ca(h)?h.then(u):u()};return c()},XA=(e,t,r)=>{const s=e.router.getMatch(t);if(!s||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:s,params:s.params,loaderData:s.loaderData};return Promise.all([r.options.head?.(i),r.options.scripts?.(i),r.options.headers?.(i)]).then(([c,u,f])=>{const h=c?.meta,p=c?.links,y=c?.scripts,v=c?.styles;return{meta:h,links:p,headScripts:y,headers:f,scripts:u,styles:v}})},gx=(e,t,r,s)=>{const i=e.matchPromises[r-1],{params:c,loaderDeps:u,abortController:f,cause:h}=e.router.getMatch(t),p=Ea(e,r),y=Xu(e,t);return{params:c,deps:u,preload:!!y,parentMatchPromise:i,abortController:f,context:p,location:e.location,navigate:v=>e.router.navigate({...v,_fromLocation:e.location}),cause:y?"preload":h,route:s,...e.router.options.additionalContext}},F0=async(e,t,r,s)=>{try{const i=e.router.getMatch(t);try{(!(fA??e.router.isServer)||i.ssr===!0)&&yx(s);const c=s.options.loader?.(gx(e,t,r,s)),u=s.options.loader&&Ca(c);if((u||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,p=>({...p,isFetching:"loader"})),s.options.loader){const p=u?await c:c;xo(e,e.router.getMatch(t),p),p!==void 0&&e.updateMatch(t,y=>({...y,loaderData:p}))}s._lazyPromise&&await s._lazyPromise;const h=i._nonReactive.minPendingPromise;h&&await h,s._componentsPromise&&await s._componentsPromise,e.updateMatch(t,p=>({...p,error:void 0,context:Ea(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let u=c;if(u?.name==="AbortError"){e.updateMatch(t,h=>({...h,status:h.status==="pending"?"success":h.status,isFetching:!1,context:Ea(e,r)}));return}const f=i._nonReactive.minPendingPromise;f&&await f,Qt(c)&&await s.options.notFoundComponent?.preload?.(),xo(e,e.router.getMatch(t),c);try{s.options.onError?.(c)}catch(h){u=h,xo(e,e.router.getMatch(t),h)}e.updateMatch(t,h=>({...h,error:u,context:Ea(e,r),status:"error",isFetching:!1}))}}catch(i){const c=e.router.getMatch(t);c&&(c._nonReactive.loaderPromise=void 0),xo(e,c,i)}},JA=async(e,t)=>{const{id:r,routeId:s}=e.matches[t];let i=!1,c=!1;const u=e.router.looseRoutesById[s];if(!px(e,r)){const p=e.router.getMatch(r);if(p._nonReactive.loaderPromise){if(p.status==="success"&&!e.sync&&!p.preload)return p;await p._nonReactive.loaderPromise;const y=e.router.getMatch(r),v=y._nonReactive.error||y.error;v&&xo(e,y,v)}else{const y=Date.now()-p.updatedAt,v=Xu(e,r),b=v?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,_=u.options.shouldReload,E=typeof _=="function"?_(gx(e,r,t,u)):_,x=!!v&&!e.router.state.matches.some(k=>k.id===r),C=e.router.getMatch(r);C._nonReactive.loaderPromise=ds(),x!==C.preload&&e.updateMatch(r,k=>({...k,preload:x}));const{status:O,invalid:M}=C;i=O==="success"&&(M||(E??y>b)),v&&u.options.preload===!1||(i&&!e.sync?(c=!0,(async()=>{try{await F0(e,r,t,u);const k=e.router.getMatch(r);k._nonReactive.loaderPromise?.resolve(),k._nonReactive.loadPromise?.resolve(),k._nonReactive.loaderPromise=void 0}catch(k){vn(k)&&await e.router.navigate(k.options)}})()):(O!=="success"||i&&e.sync)&&await F0(e,r,t,u))}}const f=e.router.getMatch(r);c||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve()),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,c||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0;const h=c?f.isFetching:!1;return h!==f.isFetching||f.invalid!==!1?(e.updateMatch(r,p=>({...p,isFetching:h,invalid:!1})),e.router.getMatch(r)):f};async function V0(e){const t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(r=>r._forcePending)&&fu(t);try{for(let f=0;f<t.matches.length;f++){const h=KA(t,f);Ca(h)&&await h}const r=t.firstBadMatchIndex??t.matches.length;for(let f=0;f<r;f++)t.matchPromises.push(JA(t,f));const i=(await Promise.allSettled(t.matchPromises)).filter(f=>f.status==="rejected").map(f=>f.reason);let c;for(const f of i){if(vn(f))throw f;!c&&Qt(f)&&(c=f)}for(const f of t.matches){const{id:h,routeId:p}=f,y=t.router.looseRoutesById[p];try{const v=XA(t,h,y);if(v){const b=await v;t.updateMatch(h,_=>({..._,...b}))}}catch(v){console.error(`Error executing head for route ${p}:`,v)}}if(c)throw c;const u=fu(t);Ca(u)&&await u}catch(r){if(Qt(r)&&!t.preload){const s=fu(t);throw Ca(s)&&await s,r}if(vn(r))throw r}return t.matches}async function yx(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:r,...s}=t.options;Object.assign(e.options,s),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const r=[];for(const s of bx){const i=e.options[s]?.preload;i&&r.push(i())}if(r.length)return Promise.all(r).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function vx(e){for(const t of bx)if(e.options[t]?.preload)return!0;return!1}const bx=["component","errorComponent","pendingComponent","notFoundComponent"];function WA(e){return{input:({url:t})=>{for(const r of e)t=qp(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=wx(e[r],t);return t}}}function eO(e){const t=lx(e.basepath),r=`/${t}`,s=`${r}/`,i=e.caseSensitive?r:r.toLowerCase(),c=e.caseSensitive?s:s.toLowerCase();return{input:({url:u})=>{const f=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return f===i?u.pathname="/":f.startsWith(c)&&(u.pathname=u.pathname.slice(r.length)),u},output:({url:u})=>(u.pathname=uu(["/",t,u.pathname]),u)}}function qp(e,t){const r=e?.input?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function wx(e,t){const r=e?.output?.({url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function tO(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function us(e){const t=e.resolvedLocation,r=e.location,s=t?.pathname!==r.pathname,i=t?.href!==r.href,c=t?.hash!==r.hash;return{fromLocation:t,toLocation:r,pathChanged:s,hrefChanged:i,hashChanged:c}}class nO{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=r=>r(),this.update=r=>{r.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const s=this.options,i=this.basepath??s?.basepath??"/",c=this.basepath===void 0,u=s?.rewrite;if(this.options={...s,...r},this.isServer=this.options.isServer??typeof document>"u",this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=jA(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=lA()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let b;this.resolvePathCache=_u(1e3),b=this.buildRouteTree(),this.setRoutes(b)}!this.__store&&this.latestLocation&&(this.__store=new iA(oO(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(b=>!["redirected"].includes(b.status))}}}),BA(this));let f=!1;const h=this.options.basepath??"/",p=this.options.rewrite;if(c||i!==h||u!==p){this.basepath=h;const b=[],_=lx(h);_&&_!=="/"&&b.push(eO({basepath:h})),p&&b.push(p),this.rewrite=b.length===0?void 0:b.length===1?b[0]:WA(b),this.history&&this.updateLatestLocation(),f=!0}f&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=TA(this.routeTree,this.options.caseSensitive,(s,i)=>{s.init({originalIndex:i})});return this.options.routeMasks&&xA(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,s)=>{const i={eventType:r,fn:s};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=r=>{this.subscribers.forEach(s=>{s.eventType===r.type&&s.fn(r)})},this.parseLocation=(r,s)=>{const i=({href:h,state:p})=>{const y=new URL(h,this.origin),v=qp(this.rewrite,y),b=this.options.parseSearch(v.search),_=this.options.stringifySearch(b);return v.search=_,{href:v.href.replace(v.origin,""),publicHref:h,pathname:Kh(v.pathname),external:!!this.rewrite&&v.origin!==this.origin,searchStr:_,search:zn(s?.search,b),hash:Kh(v.hash.split("#").reverse()[0]??""),state:zn(s?.state,p)}},c=i(r),{__tempLocation:u,__tempKey:f}=c.state;if(u&&(!f||f===this.tempLocationKey)){const h=i(u);return h.state.key=c.state.key,h.state.__TSR_key=c.state.__TSR_key,delete h.state.__tempLocation,{...h,maskedLocation:c}}return c},this.resolvePathWithBase=(r,s)=>NA({base:r,to:ym(s),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,s,i)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:s},i):this.matchRoutesInternal(r,s),this.getMatchedRoutes=r=>sO({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const s=this.getMatch(r);s&&(s.abortController.abort(),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const r=this.state.matches.filter(c=>c.status==="pending"),s=this.state.matches.filter(c=>c.isFetching==="loader");new Set([...this.state.pendingMatches??[],...r,...s]).forEach(c=>{this.cancelMatch(c.id)})},this.buildLocation=r=>{const s=(c={})=>{const u=c._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(u);c.from;const h=c.unsafeRelative==="path"?u.pathname:c.from??f.fullPath,p=this.resolvePathWithBase(h,"."),y=f.search,v={...f.params},b=c.to?this.resolvePathWithBase(p,`${c.to}`):this.resolvePathWithBase(p,"."),_=c.params===!1||c.params===null?{}:(c.params??!0)===!0?v:Object.assign(v,So(c.params,v)),E=tp({path:b,params:_}).interpolatedPath,x=this.getMatchedRoutes(E);let C=x.matchedRoutes;if((x.foundRoute?x.foundRoute.path!=="/"&&x.routeParams["**"]:Ir(E))&&(this.options.notFoundRoute?C=[...C,this.options.notFoundRoute]:H0(this.options.notFoundMode,C)),Object.keys(_).length>0)for(const te of C){const ce=te.options.params?.stringify??te.options.stringifyParams;ce&&Object.assign(_,ce(_))}const M=r.leaveParams?b:Kh(tp({path:b,params:_,decoder:this.pathParamsDecoder}).interpolatedPath);let k=y;if(r._includeValidateSearch&&this.options.search?.strict){const te={};C.forEach(ce=>{if(ce.options.validateSearch)try{Object.assign(te,du(ce.options.validateSearch,{...te,...k}))}catch{}}),k=te}k=aO({search:k,dest:c,destRoutes:C,_includeValidateSearch:r._includeValidateSearch}),k=zn(y,k);const D=this.options.stringifySearch(k),U=c.hash===!0?u.hash:c.hash?So(c.hash,u.hash):void 0,H=U?`#${U}`:"";let L=c.state===!0?u.state:c.state?So(c.state,u.state):{};L=zn(u.state,L);const j=`${M}${D}${H}`;let G,ie,ae=!1;if(this.rewrite){const te=new URL(j,this.origin),ce=wx(this.rewrite,te);G=te.href.replace(te.origin,""),ce.origin!==this.origin?(ie=ce.href,ae=!0):ie=ce.pathname+ce.search+ce.hash}else G=bA(j),ie=G;return{publicHref:ie,href:G,pathname:M,search:k,searchStr:D,state:L,hash:U??"",external:ae,unmaskOnReload:c.unmaskOnReload}},i=(c={},u)=>{const f=s(c);let h=u?s(u):void 0;if(!h){const p={};if(this.options.routeMasks){const y=_A(f.pathname,this.processedTree);if(y){Object.assign(p,y.rawParams);const{from:v,params:b,..._}=y.route,E=b===!1||b===null?{}:(b??!0)===!0?p:Object.assign(p,So(b,p));u={from:r.from,..._,params:E},h=s(u)}}}return h&&(f.maskedLocation=h),f};return r.mask?i(r,{from:r.from,...r.mask}):i(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:s,...i})=>{const c=()=>{const h=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];h.forEach(y=>{i.state[y]=this.latestLocation.state[y]});const p=ls(i.state,this.latestLocation.state);return h.forEach(y=>{delete i.state[y]}),p},u=Ir(this.latestLocation.href)===Ir(i.href),f=this.commitLocationPromise;if(this.commitLocationPromise=ds(()=>{f?.resolve()}),u&&c())this.load();else{let{maskedLocation:h,hashScrollIntoView:p,...y}=i;h&&(y={...h,state:{...h.state,__tempKey:void 0,__tempLocation:{...y,search:y.searchStr,state:{...y.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(y.unmaskOnReload??this.options.unmaskOnReload??!1)&&(y.state.__tempKey=this.tempLocationKey)),y.state.__hashScrollIntoViewOptions=p??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[i.replace?"replace":"push"](y.publicHref,y.state,{ignoreBlocker:s})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:s,hashScrollIntoView:i,viewTransition:c,ignoreBlocker:u,href:f,...h}={})=>{if(f){const v=this.history.location.state.__TSR_index,b=wu(f,{__TSR_index:r?v:v+1}),_=new URL(b.pathname,this.origin),E=qp(this.rewrite,_);h.to=E.pathname,h.search=this.options.parseSearch(b.search),h.hash=b.hash.slice(1)}const p=this.buildLocation({...h,_includeValidateSearch:!0});this.pendingBuiltLocation=p;const y=this.commitLocation({...p,viewTransition:c,replace:r,resetScroll:s,hashScrollIntoView:i,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===p&&(this.pendingBuiltLocation=void 0)}),y},this.navigate=async({to:r,reloadDocument:s,href:i,publicHref:c,...u})=>{let f=!1;if(i)try{new URL(`${i}`),f=!0}catch{}if(f&&!s&&(s=!0),s){if(r!==void 0||!i){const p=this.buildLocation({to:r,...u});i=i??p.publicHref,c=c??p.publicHref}const h=!f&&c?c:i;if(xu(h))return Promise.resolve();if(!u.ignoreBlocker){const y=this.history.getBlockers?.()??[];for(const v of y)if(v?.blockerFn&&await v.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(h):window.location.href=h,Promise.resolve()}return this.buildAndCommitLocation({...u,href:i,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation);this.__store.setState(s=>({...s,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:r,cachedMatches:s.cachedMatches.filter(i=>!r.some(c=>c.id===i.id))}))},this.load=async r=>{let s,i,c;for(c=new Promise(f=>{this.startTransition(async()=>{try{this.beforeLoad();const h=this.latestLocation,p=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...us({resolvedLocation:p,location:h})}),this.emit({type:"onBeforeLoad",...us({resolvedLocation:p,location:h})}),await V0({router:this,sync:r?.sync,matches:this.state.pendingMatches,location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let y=[],v=[],b=[];_a(()=>{this.__store.setState(_=>{const E=_.matches,x=_.pendingMatches||_.matches;return y=E.filter(C=>!x.some(O=>O.id===C.id)),v=x.filter(C=>!E.some(O=>O.id===C.id)),b=x.filter(C=>E.some(O=>O.id===C.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:x,pendingMatches:void 0,cachedMatches:[..._.cachedMatches,...y.filter(C=>C.status!=="error"&&C.status!=="notFound")]}}),this.clearExpiredCache()}),[[y,"onLeave"],[v,"onEnter"],[b,"onStay"]].forEach(([_,E])=>{_.forEach(x=>{this.looseRoutesById[x.routeId].options[E]?.(x)})})})})}})}catch(h){vn(h)?(s=h,this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):Qt(h)&&(i=h),this.__store.setState(p=>({...p,statusCode:s?s.status:i?404:p.matches.some(y=>y.status==="error")?500:200,redirect:s}))}this.latestLoadPromise===c&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=c,await c;this.latestLoadPromise&&c!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(f=>f.status==="error")&&(u=500),u!==void 0&&this.__store.setState(f=>({...f,statusCode:u}))},this.startViewTransition=r=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof s=="object"&&this.isViewTransitionTypesSupported){const c=this.latestLocation,u=this.state.resolvedLocation,f=typeof s.types=="function"?s.types(us({resolvedLocation:u,location:c})):s.types;if(f===!1){r();return}i={update:r,types:f}}else i=r;document.startViewTransition(i)}else r()},this.updateMatch=(r,s)=>{this.startTransition(()=>{const i=this.state.pendingMatches?.some(c=>c.id===r)?"pendingMatches":this.state.matches.some(c=>c.id===r)?"matches":this.state.cachedMatches.some(c=>c.id===r)?"cachedMatches":"";i&&this.__store.setState(c=>({...c,[i]:c[i]?.map(u=>u.id===r?s(u):u)}))})},this.getMatch=r=>{const s=i=>i.id===r;return this.state.cachedMatches.find(s)??this.state.pendingMatches?.find(s)??this.state.matches.find(s)},this.invalidate=r=>{const s=i=>r?.filter?.(i)??!0?{...i,invalid:!0,...r?.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i;return this.__store.setState(i=>({...i,matches:i.matches.map(s),cachedMatches:i.cachedMatches.map(s),pendingMatches:i.pendingMatches?.map(s)})),this.shouldViewTransition=!1,this.load({sync:r?.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const s=r.headers.get("Location");if(r.options.href){if(s)try{const i=new URL(s);if(this.origin&&i.origin===this.origin){const c=i.pathname+i.search+i.hash;r.options.href=c,r.headers.set("Location",c)}}catch{}}else{const i=this.buildLocation(r.options),c=this.getParsedLocationHref(i);r.options.href=c,r.headers.set("Location",c)}return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const s=r?.filter;s!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(c=>!s(c))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const r=s=>{const i=this.looseRoutesById[s.routeId];if(!i.options.loader)return!0;const c=(s.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return s.status==="error"?!0:Date.now()-s.updatedAt>=c};this.clearCache({filter:r})},this.loadRouteChunk=yx,this.preloadRoute=async r=>{const s=this.buildLocation(r);let i=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:r});const c=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(f=>f.id)),u=new Set([...c,...this.state.cachedMatches.map(f=>f.id)]);_a(()=>{i.forEach(f=>{u.has(f.id)||this.__store.setState(h=>({...h,cachedMatches:[...h.cachedMatches,f]}))})});try{return i=await V0({router:this,matches:i,location:s,preload:!0,updateMatch:(f,h)=>{c.has(f)?i=i.map(p=>p.id===f?h(p):p):this.updateMatch(f,h)}}),i}catch(f){if(vn(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:s});Qt(f)||console.error(f);return}},this.matchRoute=(r,s)=>{const i={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},c=this.buildLocation(i);if(s?.pending&&this.state.status!=="pending")return!1;const f=(s?.pending===void 0?!this.state.isLoading:s.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,h=CA(c.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,f.pathname,this.processedTree);return!h||r.params&&!ls(h.rawParams,r.params,{partial:!0})?!1:s?.includeSearch??!0?ls(f.search,c.search,{partial:!0})?h.rawParams:!1:h.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(r=>r.status==="notFound"||r.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??HA,parseSearch:t.parseSearch??VA}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:r,processedTree:s}){this.routesById=t,this.routesByPath=r,this.processedTree=s;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,r){const s=this.getMatchedRoutes(t.pathname),{foundRoute:i,routeParams:c,parsedParams:u}=s;let{matchedRoutes:f}=s,h=!1;(i?i.path!=="/"&&c["**"]:Ir(t.pathname))&&(this.options.notFoundRoute?f=[...f,this.options.notFoundRoute]:h=!0);const p=h?H0(this.options.notFoundMode,f):void 0,y=[],v=b=>b?.id?b.context??this.options.context??void 0:this.options.context??void 0;return f.forEach((b,_)=>{const E=y[_-1],[x,C,O]=(()=>{const le=E?.search??t.search,me=E?._strictSearch??void 0;try{const I=du(b.options.validateSearch,{...le})??void 0;return[{...le,...I},{...me,...I},void 0]}catch(I){let K=I;if(I instanceof Ru||(K=new Ru(I.message,{cause:I})),r?.throwOnError)throw K;return[le,{},K]}})(),M=b.options.loaderDeps?.({search:x})??"",k=M?JSON.stringify(M):"",{interpolatedPath:D,usedParams:U}=tp({path:b.fullPath,params:c,decoder:this.pathParamsDecoder}),H=b.id+D+k,L=this.getMatch(H),j=this.state.matches.find(le=>le.routeId===b.id),G=L?._strictParams??U;let ie;if(!L)try{Z0(b,U,u,G)}catch(le){if(Qt(le)||vn(le)?ie=le:ie=new rO(le.message,{cause:le}),r?.throwOnError)throw ie}Object.assign(c,G);const ae=j?"stay":"enter";let te;if(L)te={...L,cause:ae,params:j?zn(j.params,c):c,_strictParams:G,search:zn(j?j.search:L.search,x),_strictSearch:C};else{const le=b.options.loader||b.options.beforeLoad||b.lazyFn||vx(b)?"pending":"success";te={id:H,ssr:b.options.ssr,index:_,routeId:b.id,params:j?zn(j.params,c):c,_strictParams:G,pathname:D,updatedAt:Date.now(),search:j?zn(j.search,x):x,_strictSearch:C,searchError:void 0,status:le,isFetching:!1,error:void 0,paramsError:ie,__routeContext:void 0,_nonReactive:{loadPromise:ds()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:ae,loaderDeps:j?zn(j.loaderDeps,M):M,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}r?.preload||(te.globalNotFound=p===b.id),te.searchError=O;const ce=v(E);te.context={...ce,...te.__routeContext,...te.__beforeLoadContext},y.push(te)}),y.forEach((b,_)=>{const E=this.looseRoutesById[b.routeId];if(!this.getMatch(b.id)){const C=y[_-1],O=v(C);if(E.options.context){const M={deps:b.loaderDeps,params:b.params,context:O??{},location:t,navigate:k=>this.navigate({...k,_fromLocation:t}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:y};b.__routeContext=E.options.context(M)??void 0}b.context={...O,...b.__routeContext,...b.__beforeLoadContext}}}),y}matchRoutesLightweight(t){const{matchedRoutes:r,routeParams:s,parsedParams:i}=this.getMatchedRoutes(t.pathname),c=ac(r),u={...t.search};for(const y of r)try{Object.assign(u,du(y.options.validateSearch,u))}catch{}const f=ac(this.state.matches),h=f&&f.routeId===c.id&&t.pathname===this.state.location.pathname;let p;if(h)p=f.params;else{const y={...s};for(const v of r)try{Z0(v,s,i??{},y)}catch{}p=y}return{matchedRoutes:r,fullPath:c.fullPath,search:u,params:p}}}class Ru extends Error{}class rO extends Error{}function oO(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function du(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new Ru("Async validation not supported");if(r.issues)throw new Ru(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function sO({pathname:e,routesById:t,processedTree:r}){const s={},i=Ir(e);let c,u;const f=EA(i,r,!0);return f&&(c=f.route,Object.assign(s,f.rawParams),u=Object.assign({},f.parsedParams)),{matchedRoutes:f?.branch||[t[Pn]],routeParams:s,foundRoute:c,parsedParams:u}}function aO({search:e,dest:t,destRoutes:r,_includeValidateSearch:s}){return iO(r)(e,t,s??!1)}function iO(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const i of e){if("search"in i.options)i.options.search?.middlewares&&t.middlewares.push(...i.options.search.middlewares);else if(i.options.preSearchFilters||i.options.postSearchFilters){const c=({search:u,next:f})=>{let h=u;"preSearchFilters"in i.options&&i.options.preSearchFilters&&(h=i.options.preSearchFilters.reduce((y,v)=>v(y),u));const p=f(h);return"postSearchFilters"in i.options&&i.options.postSearchFilters?i.options.postSearchFilters.reduce((y,v)=>v(y),p):p};t.middlewares.push(c)}if(i.options.validateSearch){const c=({search:u,next:f})=>{const h=f(u);if(!t._includeValidateSearch)return h;try{return{...h,...du(i.options.validateSearch,h)??void 0}}catch{return h}};t.middlewares.push(c)}}const r=({search:i})=>{const c=t.dest;return c.search?c.search===!0?i:So(c.search,i):{}};t.middlewares.push(r);const s=(i,c,u)=>{if(i>=u.length)return c;const f=u[i];return f({search:c,next:p=>s(i+1,p,u)})};return function(c,u,f){return t.dest=u,t._includeValidateSearch=f,s(0,c,t.middlewares)}}function H0(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const s=t[r];if(s.children)return s.id}return Pn}function Z0(e,t,r,s){const i=e.options.params?.parse??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const c in t)c in r&&(s[c]=r[c]);else{const c=i(s);Object.assign(s,c)}}const or=Symbol.for("TSR_DEFERRED_PROMISE");function cO(e,t){const r=e;return r[or]||(r[or]={status:"pending"},r.then(s=>{r[or].status="success",r[or].data=s}).catch(s=>{r[or].status="error",r[or].error={data:tO(s),__isServerError:!0}})),r}const lO="Error preloading route! ☝️";class Sx{constructor(t){if(this.init=r=>{this.originalIndex=r.originalIndex;const s=this.options,i=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),i?this._path=Pn:this.parentRoute||sn(!1);let c=i?Pn:s?.path;c&&c!=="/"&&(c=cx(c));const u=s?.id||c;let f=i?Pn:uu([this.parentRoute.id===Pn?"":this.parentRoute.id,u]);c===Pn&&(c="/"),f!==Pn&&(f=uu(["/",f]));const h=f===Pn?"/":uu([this.parentRoute.fullPath,c]);this._path=c,this._id=f,this._fullPath=h,this._to=Ir(h)},this.addChildren=r=>this._addFileChildren(r),this._addFileChildren=r=>(Array.isArray(r)&&(this.children=r),typeof r=="object"&&r!==null&&(this.children=Object.values(r)),this),this._addFileTypes=()=>this,this.updateLoader=r=>(Object.assign(this.options,r),this),this.update=r=>(Object.assign(this.options,r),this),this.lazy=r=>(this.lazyFn=r,this),this.redirect=r=>fx({from:this.fullPath,...r}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class uO extends Sx{constructor(t){super(t)}}var fO=(e=>(e[e.AggregateError=1]="AggregateError",e[e.ArrowFunction=2]="ArrowFunction",e[e.ErrorPrototypeStack=4]="ErrorPrototypeStack",e[e.ObjectAssign=8]="ObjectAssign",e[e.BigIntTypedArray=16]="BigIntTypedArray",e[e.RegExp=32]="RegExp",e))(fO||{}),Ur=Symbol.asyncIterator,xx=Symbol.hasInstance,Ra=Symbol.isConcatSpreadable,Br=Symbol.iterator,_x=Symbol.match,Cx=Symbol.matchAll,Ex=Symbol.replace,Rx=Symbol.search,Tx=Symbol.species,Ax=Symbol.split,Ox=Symbol.toPrimitive,Ta=Symbol.toStringTag,kx=Symbol.unscopables,Mx={[Ur]:0,[xx]:1,[Ra]:2,[Br]:3,[_x]:4,[Cx]:5,[Ex]:6,[Rx]:7,[Tx]:8,[Ax]:9,[Ox]:10,[Ta]:11,[kx]:12},dO={0:Ur,1:xx,2:Ra,3:Br,4:_x,5:Cx,6:Ex,7:Rx,8:Tx,9:Ax,10:Ox,11:Ta,12:kx},A=void 0,hO={2:!0,3:!1,1:A,0:null,4:-0,5:Number.POSITIVE_INFINITY,6:Number.NEGATIVE_INFINITY,7:Number.NaN},pO={0:"Error",1:"EvalError",2:"RangeError",3:"ReferenceError",4:"SyntaxError",5:"TypeError",6:"URIError"},mO={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function He(e,t,r,s,i,c,u,f,h,p,y,v){return{t:e,i:t,s:r,c:s,m:i,p:c,e:u,a:f,f:h,b:p,o:y,l:v}}function ko(e){return He(2,A,e,A,A,A,A,A,A,A,A,A)}var Nx=ko(2),jx=ko(3),gO=ko(1),yO=ko(0),vO=ko(4),bO=ko(5),wO=ko(6),SO=ko(7);function xO(e){switch(e){case'"':return'\\"';case"\\":return"\\\\";case`
|
|
11
|
-
`:return"\\n";case"\r":return"\\r";case"\b":return"\\b";case" ":return"\\t";case"\f":return"\\f";case"<":return"\\x3C";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return A}}function Mo(e){let t="",r=0,s;for(let i=0,c=e.length;i<c;i++)s=xO(e[i]),s&&(t+=e.slice(r,i)+s,r=i+1);return r===0?t=e:t+=e.slice(r),t}function _O(e){switch(e){case"\\\\":return"\\";case'\\"':return'"';case"\\n":return`
|
|
12
|
-
`;case"\\r":return"\r";case"\\b":return"\b";case"\\t":return" ";case"\\f":return"\f";case"\\x3C":return"<";case"\\u2028":return"\u2028";case"\\u2029":return"\u2029";default:return e}}function Ss(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,_O)}var Yl="__SEROVAL_REFS__",zx=new Map,ba=new Map;function Dx(e){return zx.has(e)}function CO(e){return ba.has(e)}function EO(e){if(Dx(e))return zx.get(e);throw new nk(e)}function RO(e){if(CO(e))return ba.get(e);throw new rk(e)}typeof globalThis<"u"?Object.defineProperty(globalThis,Yl,{value:ba,configurable:!0,writable:!1,enumerable:!1}):typeof window<"u"?Object.defineProperty(window,Yl,{value:ba,configurable:!0,writable:!1,enumerable:!1}):typeof self<"u"?Object.defineProperty(self,Yl,{value:ba,configurable:!0,writable:!1,enumerable:!1}):typeof global<"u"&&Object.defineProperty(global,Yl,{value:ba,configurable:!0,writable:!1,enumerable:!1});function vm(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function TO(e){let t=pO[vm(e)];return e.name!==t?{name:e.name}:e.constructor.name!==t?{name:e.constructor.name}:{}}function Px(e,t){let r=TO(e),s=Object.getOwnPropertyNames(e);for(let i=0,c=s.length,u;i<c;i++)u=s[i],u!=="name"&&u!=="message"&&(u==="stack"?t&4&&(r=r||{},r[u]=e[u]):(r=r||{},r[u]=e[u]));return r}function Lx(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:Object.isExtensible(e)?0:1}function AO(e){switch(e){case Number.POSITIVE_INFINITY:return bO;case Number.NEGATIVE_INFINITY:return wO}return e!==e?SO:Object.is(e,-0)?vO:He(0,A,e,A,A,A,A,A,A,A,A,A)}function Ix(e){return He(1,A,Mo(e),A,A,A,A,A,A,A,A,A)}function OO(e){return He(3,A,""+e,A,A,A,A,A,A,A,A,A)}function kO(e){return He(4,e,A,A,A,A,A,A,A,A,A,A)}function MO(e,t){let r=t.valueOf();return He(5,e,r!==r?"":t.toISOString(),A,A,A,A,A,A,A,A,A)}function NO(e,t){return He(6,e,A,Mo(t.source),t.flags,A,A,A,A,A,A,A)}function jO(e,t){return He(17,e,Mx[t],A,A,A,A,A,A,A,A,A)}function zO(e,t){return He(18,e,Mo(EO(t)),A,A,A,A,A,A,A,A,A)}function DO(e,t,r){return He(25,e,r,Mo(t),A,A,A,A,A,A,A,A)}function PO(e,t,r){return He(9,e,A,A,A,A,A,r,A,A,Lx(t),A)}function LO(e,t){return He(21,e,A,A,A,A,A,A,t,A,A,A)}function IO(e,t,r){return He(15,e,A,t.constructor.name,A,A,A,A,r,t.byteOffset,A,t.length)}function $O(e,t,r){return He(16,e,A,t.constructor.name,A,A,A,A,r,t.byteOffset,A,t.byteLength)}function UO(e,t,r){return He(20,e,A,A,A,A,A,A,r,t.byteOffset,A,t.byteLength)}function BO(e,t,r){return He(13,e,vm(t),A,Mo(t.message),r,A,A,A,A,A,A)}function qO(e,t,r){return He(14,e,vm(t),A,Mo(t.message),r,A,A,A,A,A,A)}function FO(e,t){return He(7,e,A,A,A,A,A,t,A,A,A,A)}function VO(e,t){return He(28,A,A,A,A,A,A,[e,t],A,A,A,A)}function HO(e,t){return He(30,A,A,A,A,A,A,[e,t],A,A,A,A)}function ZO(e,t,r){return He(31,e,A,A,A,A,A,r,t,A,A,A)}function QO(e,t){return He(32,e,A,A,A,A,A,A,t,A,A,A)}function GO(e,t){return He(33,e,A,A,A,A,A,A,t,A,A,A)}function YO(e,t){return He(34,e,A,A,A,A,A,A,t,A,A,A)}function KO(e,t,r,s){return He(35,e,r,A,A,A,A,t,A,A,A,s)}var XO={parsing:1,serialization:2,deserialization:3};function JO(e){return`Seroval Error (step: ${XO[e]})`}var WO=(e,t)=>JO(e),$x=class extends Error{constructor(e,t){super(WO(e)),this.cause=t}},Q0=class extends $x{constructor(e){super("parsing",e)}},ek=class extends $x{constructor(e){super("deserialization",e)}};function Vr(e){return`Seroval Error (specific: ${e})`}var Ju=class extends Error{constructor(t){super(Vr(1)),this.value=t}},Ux=class extends Error{constructor(t){super(Vr(2))}},tk=class extends Error{constructor(e){super(Vr(3))}},bc=class extends Error{constructor(e){super(Vr(4))}},nk=class extends Error{constructor(e){super(Vr(5)),this.value=e}},rk=class extends Error{constructor(e){super(Vr(6))}},ok=class extends Error{constructor(e){super(Vr(7))}},No=class extends Error{constructor(e){super(Vr(8))}},sk=class extends Error{constructor(t){super(Vr(9))}},ak=class{constructor(e,t){this.value=e,this.replacement=t}},Wu=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,r)=>{e.s=t,e.f=r}),e},ik=(e,t)=>{e.s(t),e.p.s=1,e.p.v=t},ck=(e,t)=>{e.f(t),e.p.s=2,e.p.v=t};Wu.toString();ik.toString();ck.toString();var lk=()=>{let e=[],t=[],r=!0,s=!1,i=0,c=(h,p,y)=>{for(y=0;y<i;y++)t[y]&&t[y][p](h)},u=(h,p,y,v)=>{for(p=0,y=e.length;p<y;p++)v=e[p],!r&&p===y-1?h[s?"return":"throw"](v):h.next(v)},f=(h,p)=>(r&&(p=i++,t[p]=h),u(h),()=>{r&&(t[p]=t[i],t[i--]=void 0)});return{__SEROVAL_STREAM__:!0,on:h=>f(h),next:h=>{r&&(e.push(h),c(h,"next"))},throw:h=>{r&&(e.push(h),c(h,"throw"),r=!1,s=!1,t.length=0)},return:h=>{r&&(e.push(h),c(h,"return"),r=!1,s=!0,t.length=0)}}},uk=e=>t=>()=>{let r=0,s={[e]:()=>s,next:()=>{if(r>t.d)return{done:!0,value:void 0};let i=r++,c=t.v[i];if(i===t.t)throw c;return{done:i===t.d,value:c}}};return s},fk=(e,t)=>r=>()=>{let s=0,i=-1,c=!1,u=[],f=[],h=(y=0,v=f.length)=>{for(;y<v;y++)f[y].s({done:!0,value:void 0})};r.on({next:y=>{let v=f.shift();v&&v.s({done:!1,value:y}),u.push(y)},throw:y=>{let v=f.shift();v&&v.f(y),h(),i=u.length,c=!0,u.push(y)},return:y=>{let v=f.shift();v&&v.s({done:!0,value:y}),h(),i=u.length,u.push(y)}});let p={[e]:()=>p,next:()=>{if(i===-1){let b=s++;if(b>=u.length){let _=t();return f.push(_),_.p}return{done:!1,value:u[b]}}if(s>i)return{done:!0,value:void 0};let y=s++,v=u[y];if(y!==i)return{done:!1,value:v};if(c)throw v;return{done:!0,value:v}}};return p},Bx=e=>{let t=atob(e),r=t.length,s=new Uint8Array(r);for(let i=0;i<r;i++)s[i]=t.charCodeAt(i);return s.buffer};Bx.toString();function dk(e){return"__SEROVAL_SEQUENCE__"in e}function qx(e,t,r){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:r}}function hk(e){let t=[],r=-1,s=-1,i=e[Br]();for(;;)try{let c=i.next();if(t.push(c.value),c.done){s=t.length-1;break}}catch(c){r=t.length,t.push(c)}return qx(t,r,s)}var pk=uk(Br);function mk(e){return pk(e)}var gk={},yk={},vk={0:{},1:{},2:{},3:{},4:{},5:{}};function ef(e){return"__SEROVAL_STREAM__"in e}function xs(){return lk()}function bk(e){let t=xs(),r=e[Ur]();async function s(){try{let i=await r.next();i.done?t.return(i.value):(t.next(i.value),await s())}catch(i){t.throw(i)}}return s().catch(()=>{}),t}var wk=fk(Ur,Wu);function Sk(e){return wk(e)}async function xk(e){try{return[1,await e]}catch(t){return[0,t]}}function _k(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function hu(e,t){e.marked.add(t)}function Ck(e,t){let r=e.refs.size;return e.refs.set(t,r),r}function tf(e,t){let r=e.refs.get(t);return r!=null?(hu(e,r),{type:1,value:kO(r)}):{type:0,value:Ck(e,t)}}function bm(e,t){let r=tf(e,t);return r.type===1?r:Dx(t)?{type:2,value:zO(r.value,t)}:r}function is(e,t){let r=bm(e,t);if(r.type!==0)return r.value;if(t in Mx)return jO(r.value,t);throw new Ju(t)}function nf(e,t){let r=tf(e,vk[t]);return r.type===1?r.value:He(26,r.value,t,A,A,A,A,A,A,A,A,A)}function Ek(e){let t=tf(e,gk);return t.type===1?t.value:He(27,t.value,A,A,A,A,A,A,is(e,Br),A,A,A)}function Rk(e){let t=tf(e,yk);return t.type===1?t.value:He(29,t.value,A,A,A,A,A,[nf(e,1),is(e,Ur)],A,A,A,A)}function Tk(e,t,r,s){return He(r?11:10,e,A,A,A,s,A,A,A,A,Lx(t),A)}function Ak(e,t,r,s){return He(8,t,A,A,A,A,{k:r,v:s},A,nf(e,0),A,A,A)}function Ok(e,t,r){let s=new Uint8Array(r),i="";for(let c=0,u=s.length;c<u;c++)i+=String.fromCharCode(s[c]);return He(19,t,Mo(btoa(i)),A,A,A,A,A,nf(e,5),A,A,A)}function kk(e,t){return{base:_k(e,t),child:void 0}}var Mk=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return Ot(this._p,this.depth,e)}};async function Nk(e,t,r){let s=[];for(let i=0,c=r.length;i<c;i++)i in r?s[i]=await Ot(e,t,r[i]):s[i]=0;return s}async function jk(e,t,r,s){return PO(r,s,await Nk(e,t,s))}async function wm(e,t,r){let s=Object.entries(r),i=[],c=[];for(let u=0,f=s.length;u<f;u++)i.push(Mo(s[u][0])),c.push(await Ot(e,t,s[u][1]));return Br in r&&(i.push(is(e.base,Br)),c.push(VO(Ek(e.base),await Ot(e,t,hk(r))))),Ur in r&&(i.push(is(e.base,Ur)),c.push(HO(Rk(e.base),await Ot(e,t,bk(r))))),Ta in r&&(i.push(is(e.base,Ta)),c.push(Ix(r[Ta]))),Ra in r&&(i.push(is(e.base,Ra)),c.push(r[Ra]?Nx:jx)),{k:i,v:c}}async function rp(e,t,r,s,i){return Tk(r,s,i,await wm(e,t,s))}async function zk(e,t,r,s){return LO(r,await Ot(e,t,s.valueOf()))}async function Dk(e,t,r,s){return IO(r,s,await Ot(e,t,s.buffer))}async function Pk(e,t,r,s){return $O(r,s,await Ot(e,t,s.buffer))}async function Lk(e,t,r,s){return UO(r,s,await Ot(e,t,s.buffer))}async function G0(e,t,r,s){let i=Px(s,e.base.features);return BO(r,s,i?await wm(e,t,i):A)}async function Ik(e,t,r,s){let i=Px(s,e.base.features);return qO(r,s,i?await wm(e,t,i):A)}async function $k(e,t,r,s){let i=[],c=[];for(let[u,f]of s.entries())i.push(await Ot(e,t,u)),c.push(await Ot(e,t,f));return Ak(e.base,r,i,c)}async function Uk(e,t,r,s){let i=[];for(let c of s.keys())i.push(await Ot(e,t,c));return FO(r,i)}async function Fx(e,t,r,s){let i=e.base.plugins;if(i)for(let c=0,u=i.length;c<u;c++){let f=i[c];if(f.parse.async&&f.test(s))return DO(r,f.tag,await f.parse.async(s,new Mk(e,t),{id:r}))}return A}async function Bk(e,t,r,s){let[i,c]=await xk(s);return He(12,r,i,A,A,A,A,A,await Ot(e,t,c),A,A,A)}function qk(e,t,r,s,i){let c=[],u=r.on({next:f=>{hu(this.base,t),Ot(this,e,f).then(h=>{c.push(QO(t,h))},h=>{i(h),u()})},throw:f=>{hu(this.base,t),Ot(this,e,f).then(h=>{c.push(GO(t,h)),s(c),u()},h=>{i(h),u()})},return:f=>{hu(this.base,t),Ot(this,e,f).then(h=>{c.push(YO(t,h)),s(c),u()},h=>{i(h),u()})}})}async function Fk(e,t,r,s){return ZO(r,nf(e.base,4),await new Promise(qk.bind(e,t,r,s)))}async function Vk(e,t,r,s){let i=[];for(let c=0,u=s.v.length;c<u;c++)i[c]=await Ot(e,t,s.v[c]);return KO(r,i,s.t,s.d)}async function Hk(e,t,r,s){if(Array.isArray(s))return jk(e,t,r,s);if(ef(s))return Fk(e,t,r,s);if(dk(s))return Vk(e,t,r,s);let i=s.constructor;if(i===ak)return Ot(e,t,s.replacement);let c=await Fx(e,t,r,s);if(c)return c;switch(i){case Object:return rp(e,t,r,s,!1);case A:return rp(e,t,r,s,!0);case Date:return MO(r,s);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return G0(e,t,r,s);case Number:case Boolean:case String:case BigInt:return zk(e,t,r,s);case ArrayBuffer:return Ok(e.base,r,s);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return Dk(e,t,r,s);case DataView:return Lk(e,t,r,s);case Map:return $k(e,t,r,s);case Set:return Uk(e,t,r,s)}if(i===Promise||s instanceof Promise)return Bk(e,t,r,s);let u=e.base.features;if(u&32&&i===RegExp)return NO(r,s);if(u&16)switch(i){case BigInt64Array:case BigUint64Array:return Pk(e,t,r,s)}if(u&1&&typeof AggregateError<"u"&&(i===AggregateError||s instanceof AggregateError))return Ik(e,t,r,s);if(s instanceof Error)return G0(e,t,r,s);if(Br in s||Ur in s)return rp(e,t,r,s,!!i);throw new Ju(s)}async function Zk(e,t,r){let s=bm(e.base,r);if(s.type!==0)return s.value;let i=await Fx(e,t,s.value,r);if(i)return i;throw new Ju(r)}async function Ot(e,t,r){switch(typeof r){case"boolean":return r?Nx:jx;case"undefined":return gO;case"string":return Ix(r);case"number":return AO(r);case"bigint":return OO(r);case"object":{if(r){let s=bm(e.base,r);return s.type===0?await Hk(e,t+1,s.value,r):s.value}return yO}case"symbol":return is(e.base,r);case"function":return Zk(e,t,r);default:throw new Ju(r)}}async function Qk(e,t){try{return await Ot(e,0,t)}catch(r){throw r instanceof Q0?r:new Q0(r)}}var Gk=(e=>(e[e.Vanilla=1]="Vanilla",e[e.Cross=2]="Cross",e))(Gk||{});function Vx(e,t){for(let r=0,s=t.length;r<s;r++){let i=t[r];e.has(i)||(e.add(i),i.extends&&Vx(e,i.extends))}}function Hx(e){if(e){let t=new Set;return Vx(t,e),[...t]}}function Yk(e){switch(e){case"Int8Array":return Int8Array;case"Int16Array":return Int16Array;case"Int32Array":return Int32Array;case"Uint8Array":return Uint8Array;case"Uint16Array":return Uint16Array;case"Uint32Array":return Uint32Array;case"Uint8ClampedArray":return Uint8ClampedArray;case"Float32Array":return Float32Array;case"Float64Array":return Float64Array;case"BigInt64Array":return BigInt64Array;case"BigUint64Array":return BigUint64Array;default:throw new ok(e)}}var Kk=1e6,Xk=1e4,Jk=2e4;function Zx(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var Wk=1e3;function eM(e,t){var r;return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:(r=t.features)!=null?r:63^(t.disabledFeatures||0),depthLimit:t.depthLimit||Wk}}function tM(e){return{mode:2,base:eM(2,e),child:A}}var nM=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return tt(this._p,this.depth,e)}};function Qx(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new No({t:4,i:t});if(e.refs.has(t))throw new Error("Conflicted ref id: "+t)}function rM(e,t,r){return Qx(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,r),r}function oM(e,t,r){return Qx(e.base,t),e.base.refs.set(t,r),r}function kt(e,t,r){return e.mode===1?rM(e,t,r):oM(e,t,r)}function Fp(e,t,r){if(Object.hasOwn(t,r))return t[r];throw new No(e)}function sM(e,t){return kt(e,t.i,RO(Ss(t.s)))}function aM(e,t,r){let s=r.a,i=s.length,c=kt(e,r.i,new Array(i));for(let u=0,f;u<i;u++)f=s[u],f&&(c[u]=tt(e,t,f));return Zx(c,r.o),c}function iM(e){switch(e){case"constructor":case"__proto__":case"prototype":case"__defineGetter__":case"__defineSetter__":case"__lookupGetter__":case"__lookupSetter__":return!1;default:return!0}}function cM(e){switch(e){case Ur:case Ra:case Ta:case Br:return!0;default:return!1}}function Y0(e,t,r){iM(t)?e[t]=r:Object.defineProperty(e,t,{value:r,configurable:!0,enumerable:!0,writable:!0})}function lM(e,t,r,s,i){if(typeof s=="string")Y0(r,s,tt(e,t,i));else{let c=tt(e,t,s);switch(typeof c){case"string":Y0(r,c,tt(e,t,i));break;case"symbol":cM(c)&&(r[c]=tt(e,t,i));break;default:throw new No(s)}}}function Gx(e,t,r,s){let i=r.k;if(i.length>0)for(let c=0,u=r.v,f=i.length;c<f;c++)lM(e,t,s,i[c],u[c]);return s}function uM(e,t,r){let s=kt(e,r.i,r.t===10?{}:Object.create(null));return Gx(e,t,r.p,s),Zx(s,r.o),s}function fM(e,t){return kt(e,t.i,new Date(t.s))}function dM(e,t){if(e.base.features&32){let r=Ss(t.c);if(r.length>Jk)throw new No(t);return kt(e,t.i,new RegExp(r,t.m))}throw new Ux(t)}function hM(e,t,r){let s=kt(e,r.i,new Set);for(let i=0,c=r.a,u=c.length;i<u;i++)s.add(tt(e,t,c[i]));return s}function pM(e,t,r){let s=kt(e,r.i,new Map);for(let i=0,c=r.e.k,u=r.e.v,f=c.length;i<f;i++)s.set(tt(e,t,c[i]),tt(e,t,u[i]));return s}function mM(e,t){if(t.s.length>Kk)throw new No(t);return kt(e,t.i,Bx(Ss(t.s)))}function gM(e,t,r){var s;let i=Yk(r.c),c=tt(e,t,r.f),u=(s=r.b)!=null?s:0;if(u<0||u>c.byteLength)throw new No(r);return kt(e,r.i,new i(c,u,r.l))}function yM(e,t,r){var s;let i=tt(e,t,r.f),c=(s=r.b)!=null?s:0;if(c<0||c>i.byteLength)throw new No(r);return kt(e,r.i,new DataView(i,c,r.l))}function Yx(e,t,r,s){if(r.p){let i=Gx(e,t,r.p,{});Object.defineProperties(s,Object.getOwnPropertyDescriptors(i))}return s}function vM(e,t,r){let s=kt(e,r.i,new AggregateError([],Ss(r.m)));return Yx(e,t,r,s)}function bM(e,t,r){let s=Fp(r,mO,r.s),i=kt(e,r.i,new s(Ss(r.m)));return Yx(e,t,r,i)}function wM(e,t,r){let s=Wu(),i=kt(e,r.i,s.p),c=tt(e,t,r.f);return r.s?s.s(c):s.f(c),i}function SM(e,t,r){return kt(e,r.i,Object(tt(e,t,r.f)))}function xM(e,t,r){let s=e.base.plugins;if(s){let i=Ss(r.c);for(let c=0,u=s.length;c<u;c++){let f=s[c];if(f.tag===i)return kt(e,r.i,f.deserialize(r.s,new nM(e,t),{id:r.i}))}}throw new tk(r.c)}function _M(e,t){return kt(e,t.i,kt(e,t.s,Wu()).p)}function CM(e,t,r){let s=e.base.refs.get(r.i);if(s)return s.s(tt(e,t,r.a[1])),A;throw new bc("Promise")}function EM(e,t,r){let s=e.base.refs.get(r.i);if(s)return s.f(tt(e,t,r.a[1])),A;throw new bc("Promise")}function RM(e,t,r){tt(e,t,r.a[0]);let s=tt(e,t,r.a[1]);return mk(s)}function TM(e,t,r){tt(e,t,r.a[0]);let s=tt(e,t,r.a[1]);return Sk(s)}function AM(e,t,r){let s=kt(e,r.i,xs()),i=r.a,c=i.length;if(c)for(let u=0;u<c;u++)tt(e,t,i[u]);return s}function OM(e,t,r){let s=e.base.refs.get(r.i);if(s&&ef(s))return s.next(tt(e,t,r.f)),A;throw new bc("Stream")}function kM(e,t,r){let s=e.base.refs.get(r.i);if(s&&ef(s))return s.throw(tt(e,t,r.f)),A;throw new bc("Stream")}function MM(e,t,r){let s=e.base.refs.get(r.i);if(s&&ef(s))return s.return(tt(e,t,r.f)),A;throw new bc("Stream")}function NM(e,t,r){return tt(e,t,r.f),A}function jM(e,t,r){return tt(e,t,r.a[1]),A}function zM(e,t,r){let s=kt(e,r.i,qx([],r.s,r.l));for(let i=0,c=r.a.length;i<c;i++)s.v[i]=tt(e,t,r.a[i]);return s}function tt(e,t,r){if(t>e.base.depthLimit)throw new sk(e.base.depthLimit);switch(t+=1,r.t){case 2:return Fp(r,hO,r.s);case 0:return Number(r.s);case 1:return Ss(String(r.s));case 3:if(String(r.s).length>Xk)throw new No(r);return BigInt(r.s);case 4:return e.base.refs.get(r.i);case 18:return sM(e,r);case 9:return aM(e,t,r);case 10:case 11:return uM(e,t,r);case 5:return fM(e,r);case 6:return dM(e,r);case 7:return hM(e,t,r);case 8:return pM(e,t,r);case 19:return mM(e,r);case 16:case 15:return gM(e,t,r);case 20:return yM(e,t,r);case 14:return vM(e,t,r);case 13:return bM(e,t,r);case 12:return wM(e,t,r);case 17:return Fp(r,dO,r.s);case 21:return SM(e,t,r);case 25:return xM(e,t,r);case 22:return _M(e,r);case 23:return CM(e,t,r);case 24:return EM(e,t,r);case 28:return RM(e,t,r);case 30:return TM(e,t,r);case 31:return AM(e,t,r);case 32:return OM(e,t,r);case 33:return kM(e,t,r);case 34:return MM(e,t,r);case 27:return NM(e,t,r);case 29:return jM(e,t,r);case 35:return zM(e,t,r);default:throw new Ux(r)}}function DM(e,t){try{return tt(e,0,t)}catch(r){throw new ek(r)}}var PM=()=>T;PM.toString();function op(e,t){let r=Hx(t.plugins),s=tM({plugins:r,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures});return DM(s,e)}async function LM(e,t={}){let r=Hx(t.plugins),s=kk(1,{plugins:r,disabledFeatures:t.disabledFeatures});return{t:await Qk(s,e),f:s.base.features,m:Array.from(s.base.marked)}}function IM(e){return{tag:"$TSR/t/"+e.key,test:e.test,parse:{sync(t,r){return r.parse(e.toSerializable(t))},async async(t,r){return await r.parse(e.toSerializable(t))},stream(t,r){return r.parse(e.toSerializable(t))}},serialize:void 0,deserialize(t,r){return e.fromSerializable(r.deserialize(t))}}}var wo={},Kx=e=>new ReadableStream({start:t=>{e.on({next:r=>{try{t.enqueue(r)}catch{}},throw:r=>{t.error(r)},return:()=>{try{t.close()}catch{}}})}}),$M={tag:"seroval-plugins/web/ReadableStreamFactory",test(e){return e===wo},parse:{sync(){return wo},async async(){return await Promise.resolve(wo)},stream(){return wo}},serialize(){return Kx.toString()},deserialize(){return wo}};function K0(e){let t=xs(),r=e.getReader();async function s(){try{let i=await r.read();i.done?t.return(i.value):(t.next(i.value),await s())}catch(i){t.throw(i)}}return s().catch(()=>{}),t}var UM={tag:"seroval/plugins/web/ReadableStream",extends:[$M],test(e){return typeof ReadableStream>"u"?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(wo),stream:t.parse(xs())}},async async(e,t){return{factory:await t.parse(wo),stream:await t.parse(K0(e))}},stream(e,t){return{factory:t.parse(wo),stream:t.parse(K0(e))}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){let r=t.deserialize(e.stream);return Kx(r)}},BM=UM;const qM={tag:"$TSR/Error",test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return"new Error("+t.serialize(e.message)+")"},deserialize(e,t){return new Error(t.deserialize(e.message))}};class FM{constructor(t,r){this.stream=t,this.hint=r?.hint??"binary"}}const Tu=globalThis.Buffer,Xx=!!Tu&&typeof Tu.from=="function";function Jx(e){if(e.length===0)return"";if(Xx)return Tu.from(e).toString("base64");const t=32768,r=[];for(let s=0;s<e.length;s+=t){const i=e.subarray(s,s+t);r.push(String.fromCharCode.apply(null,i))}return btoa(r.join(""))}function Wx(e){if(e.length===0)return new Uint8Array(0);if(Xx){const s=Tu.from(e,"base64");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}const t=atob(e),r=new Uint8Array(t.length);for(let s=0;s<t.length;s++)r[s]=t.charCodeAt(s);return r}const ec=Object.create(null),tc=Object.create(null),VM=e=>new ReadableStream({start(t){e.on({next(r){try{t.enqueue(Wx(r))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),HM=new TextEncoder,ZM=e=>new ReadableStream({start(t){e.on({next(r){try{typeof r=="string"?t.enqueue(HM.encode(r)):t.enqueue(Wx(r.$b64))}catch{}},throw(r){t.error(r)},return(){try{t.close()}catch{}}})}}),QM="(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))",GM="(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})";function X0(e){const t=xs(),r=e.getReader();return(async()=>{try{for(;;){const{done:s,value:i}=await r.read();if(s){t.return(void 0);break}t.next(Jx(i))}}catch(s){t.throw(s)}finally{r.releaseLock()}})(),t}function J0(e){const t=xs(),r=e.getReader(),s=new TextDecoder("utf-8",{fatal:!0});return(async()=>{try{for(;;){const{done:i,value:c}=await r.read();if(i){try{const u=s.decode();u.length>0&&t.next(u)}catch{}t.return(void 0);break}try{const u=s.decode(c,{stream:!0});u.length>0&&t.next(u)}catch{t.next({$b64:Jx(c)})}}}catch(i){t.throw(i)}finally{r.releaseLock()}})(),t}const YM={tag:"tss/RawStreamFactory",test(e){return e===ec},parse:{sync(){},async(){return Promise.resolve(void 0)},stream(){}},serialize(){return QM},deserialize(){return ec}},KM={tag:"tss/RawStreamFactoryText",test(e){return e===tc},parse:{sync(){},async(){return Promise.resolve(void 0)},stream(){}},serialize(){return GM},deserialize(){return tc}},XM={tag:"tss/RawStream",extends:[YM,KM],test(e){return e instanceof FM},parse:{sync(e,t){const r=e.hint==="text"?tc:ec;return{hint:e.hint,factory:t.parse(r),stream:t.parse(xs())}},async async(e,t){const r=e.hint==="text"?tc:ec,s=e.hint==="text"?J0(e.stream):X0(e.stream);return{hint:e.hint,factory:await t.parse(r),stream:await t.parse(s)}},stream(e,t){const r=e.hint==="text"?tc:ec,s=e.hint==="text"?J0(e.stream):X0(e.stream);return{hint:e.hint,factory:t.parse(r),stream:t.parse(s)}}},serialize(e,t){return"("+t.serialize(e.factory)+")("+t.serialize(e.stream)+")"},deserialize(e,t){const r=t.deserialize(e.stream);return e.hint==="text"?ZM(r):VM(r)}};function JM(e){return{tag:"tss/RawStream",test:()=>!1,parse:{},serialize(){throw new Error("RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.")},deserialize(t){return e(t.streamId)}}}const WM=[qM,XM,BM],eN="use",Au=Yu[eN],Kl=typeof window<"u"?w.useLayoutEffect:w.useEffect;function sp(e){const t=w.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function tN(e,t,r={},s={}){w.useEffect(()=>{if(!e.current||s.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([c])=>{t(c)},r);return i.observe(e.current),()=>{i.disconnect()}},[t,r,s.disabled,e])}function nN(e){const t=w.useRef(null);return w.useImperativeHandle(e,()=>t.current,[]),t}function rN({promise:e}){if(Au)return Au(e);const t=cO(e);if(t[or].status==="pending")throw t;if(t[or].status==="error")throw t[or].error;return t[or].data}function oN(e){const t=g.jsx(sN,{...e});return e.fallback?g.jsx(w.Suspense,{fallback:e.fallback,children:t}):t}function sN(e){const t=rN(e);return e.children(t)}function Sm(e){const t=e.errorComponent??xm;return g.jsx(aN,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:s})=>r?w.createElement(t,{error:r,reset:s}):e.children})}class aN extends w.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,r){r.error&&r.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,r){this.props.onCatch&&this.props.onCatch(t,r)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function xm({error:e}){const[t,r]=w.useState(!1);return g.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[g.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),g.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(s=>!s),children:t?"Hide Error":"Show Error"})]}),g.jsx("div",{style:{height:".25rem"}}),t?g.jsx("div",{children:g.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?g.jsx("code",{children:e.message}):null})}):null]})}function iN({children:e,fallback:t=null}){return e1()?g.jsx(qt.Fragment,{children:e}):g.jsx(qt.Fragment,{children:t})}function e1(){return qt.useSyncExternalStore(cN,()=>!0,()=>!1)}function cN(){return()=>{}}var ap={exports:{}},ip={},cp={exports:{}},lp={};var W0;function lN(){if(W0)return lp;W0=1;var e=vc();function t(v,b){return v===b&&(v!==0||1/v===1/b)||v!==v&&b!==b}var r=typeof Object.is=="function"?Object.is:t,s=e.useState,i=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue;function f(v,b){var _=b(),E=s({inst:{value:_,getSnapshot:b}}),x=E[0].inst,C=E[1];return c(function(){x.value=_,x.getSnapshot=b,h(x)&&C({inst:x})},[v,_,b]),i(function(){return h(x)&&C({inst:x}),v(function(){h(x)&&C({inst:x})})},[v]),u(_),_}function h(v){var b=v.getSnapshot;v=v.value;try{var _=b();return!r(v,_)}catch{return!0}}function p(v,b){return b()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:f;return lp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,lp}var ew;function t1(){return ew||(ew=1,cp.exports=lN()),cp.exports}var tw;function uN(){if(tw)return ip;tw=1;var e=vc(),t=t1();function r(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var s=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,c=e.useRef,u=e.useEffect,f=e.useMemo,h=e.useDebugValue;return ip.useSyncExternalStoreWithSelector=function(p,y,v,b,_){var E=c(null);if(E.current===null){var x={hasValue:!1,value:null};E.current=x}else x=E.current;E=f(function(){function O(H){if(!M){if(M=!0,k=H,H=b(H),_!==void 0&&x.hasValue){var L=x.value;if(_(L,H))return D=L}return D=H}if(L=D,s(k,H))return L;var j=b(H);return _!==void 0&&_(L,j)?(k=H,L):(k=H,D=j)}var M=!1,k,D,U=v===void 0?null:v;return[function(){return O(y())},U===null?void 0:function(){return O(U())}]},[y,v,b,_]);var C=i(p,E[0],E[1]);return u(function(){x.hasValue=!0,x.value=C},[C]),h(C),C},ip}var nw;function fN(){return nw||(nw=1,ap.exports=uN()),ap.exports}var dN=fN();function hN(e,t=s=>s,r={}){const s=r.equal??pN;return dN.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,s)}function pN(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[s,i]of e)if(!t.has(s)||!Object.is(i,t.get(s)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const r=rw(e);if(r.length!==rw(t).length)return!1;for(let s=0;s<r.length;s++)if(!Object.prototype.hasOwnProperty.call(t,r[s])||!Object.is(e[r[s]],t[r[s]]))return!1;return!0}function rw(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const up=w.createContext(null);function n1(){return typeof document>"u"?up:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=up,up)}function Ft(e){const t=w.useContext(n1());return e?.warn,t}function lt(e){const t=Ft({warn:e?.router===void 0}),r=e?.router||t,s=w.useRef(void 0);return hN(r.__store,i=>{if(e?.select){if(e.structuralSharing??r.options.defaultStructuralSharing){const c=zn(s.current,e.select(i));return s.current=c,c}return e.select(i)}return i})}const rf=w.createContext(void 0),mN=w.createContext(void 0);function ur(e){const t=w.useContext(e.from?mN:rf);return lt({select:s=>{const i=s.matches.find(c=>e.from?e.from===c.routeId:c.id===t);if(sn(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function _m(e){return ur({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Cm(e){const{select:t,...r}=e;return ur({...r,select:s=>t?t(s.loaderDeps):s.loaderDeps})}function Em(e){return ur({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const r=e.strict===!1?t.params:t._strictParams;return e.select?e.select(r):r}})}function Rm(e){return ur({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function of(e){const t=Ft();return w.useCallback(r=>t.navigate({...r,from:r.from??e?.from}),[e?.from,t])}var $a=nx();const gN=tx($a);function yN(e,t){const r=Ft(),s=nN(t),{activeProps:i,inactiveProps:c,activeOptions:u,to:f,preload:h,preloadDelay:p,hashScrollIntoView:y,replace:v,startTransition:b,resetScroll:_,viewTransition:E,children:x,target:C,disabled:O,style:M,className:k,onClick:D,onFocus:U,onMouseEnter:H,onMouseLeave:L,onTouchStart:j,ignoreBlocker:G,params:ie,search:ae,hash:te,state:ce,mask:le,reloadDocument:me,unsafeRelative:I,from:K,_fromLocation:V,...re}=e,ve=e1(),z=lt({select:rt=>rt.location.search,structuralSharing:!0}),Q=e.from,ne=w.useMemo(()=>({...e,from:Q}),[r,z,Q,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),oe=w.useMemo(()=>r.buildLocation({...ne}),[r,ne]),pe=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,ye=oe.maskedLocation?oe.maskedLocation.external:oe.external,X=w.useMemo(()=>_N(pe,ye,r.history,O),[O,ye,pe,r.history]),_e=w.useMemo(()=>{if(X?.external)return xu(X.href)?void 0:X.href;if(!CN(f)&&!(typeof f!="string"||f.indexOf(":")===-1))try{return new URL(f),xu(f)?void 0:f}catch{}},[f,X]),xe=lt({select:rt=>{if(_e)return!1;if(u?.exact){if(!MA(rt.location.pathname,oe.pathname,r.basepath))return!1}else{const zt=Cu(rt.location.pathname,r.basepath),Ut=Cu(oe.pathname,r.basepath);if(!(zt.startsWith(Ut)&&(zt.length===Ut.length||zt[Ut.length]==="/")))return!1}return(u?.includeSearch??!0)&&!ls(rt.location.search,oe.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?ve&&rt.location.hash===oe.hash:!0}}),Re=xe?So(i,{})??vN:fp,Ae=xe?fp:So(c,{})??fp,Le=[k,Re.className,Ae.className].filter(Boolean).join(" "),yt=(M||Re.style||Ae.style)&&{...M,...Re.style,...Ae.style},[vt,Sn]=w.useState(!1),Yt=w.useRef(!1),nt=e.reloadDocument||_e?!1:h??r.options.defaultPreload,se=p??r.options.defaultPreloadDelay??0,Ee=w.useCallback(()=>{r.preloadRoute({...ne}).catch(rt=>{console.warn(rt),console.warn(lO)})},[r,ne]),Ue=w.useCallback(rt=>{rt?.isIntersecting&&Ee()},[Ee]);tN(s,Ue,xN,{disabled:!!O||nt!=="viewport"}),w.useEffect(()=>{Yt.current||!O&&nt==="render"&&(Ee(),Yt.current=!0)},[O,Ee,nt]);const ze=rt=>{const zt=rt.currentTarget.getAttribute("target"),Ut=C!==void 0?C:zt;if(!O&&!EN(rt)&&!rt.defaultPrevented&&(!Ut||Ut==="_self")&&rt.button===0){rt.preventDefault(),$a.flushSync(()=>{Sn(!0)});const kc=r.subscribe("onResolved",()=>{kc(),Sn(!1)});r.navigate({...ne,replace:v,resetScroll:_,hashScrollIntoView:y,startTransition:b,viewTransition:E,ignoreBlocker:G})}};if(_e)return{...re,ref:s,href:_e,...x&&{children:x},...C&&{target:C},...O&&{disabled:O},...M&&{style:M},...k&&{className:k},...D&&{onClick:D},...U&&{onFocus:U},...H&&{onMouseEnter:H},...L&&{onMouseLeave:L},...j&&{onTouchStart:j}};const Mt=rt=>{O||nt&&Ee()},Of=Mt,Vt=rt=>{if(!(O||!nt))if(!se)Ee();else{const zt=rt.target;if(Vi.has(zt))return;const Ut=setTimeout(()=>{Vi.delete(zt),Ee()},se);Vi.set(zt,Ut)}},kf=rt=>{if(O||!nt||!se)return;const zt=rt.target,Ut=Vi.get(zt);Ut&&(clearTimeout(Ut),Vi.delete(zt))};return{...re,...Re,...Ae,href:X?.href,ref:s,onClick:Hi([D,ze]),onFocus:Hi([U,Mt]),onMouseEnter:Hi([H,Vt]),onMouseLeave:Hi([L,kf]),onTouchStart:Hi([j,Of]),disabled:!!O,target:C,...yt&&{style:yt},...Le&&{className:Le},...O&&bN,...xe&&wN,...ve&&vt&&SN}}const fp={},vN={className:"active"},bN={role:"link","aria-disabled":!0},wN={"data-status":"active","aria-current":"page"},SN={"data-transitioning":"transitioning"},Vi=new WeakMap,xN={rootMargin:"100px"},Hi=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function _N(e,t,r,s){if(!s)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function CN(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const cs=w.forwardRef((e,t)=>{const{_asChild:r,...s}=e,{type:i,...c}=yN(s,t),u=typeof s.children=="function"?s.children({isActive:c["data-status"]==="active"}):s.children;if(!r){const{disabled:f,...h}=c;return w.createElement("a",h,u)}return w.createElement(r,c,u)});function EN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let RN=class extends Sx{constructor(t){super(t),this.useMatch=r=>ur({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>ur({...r,from:this.id,select:s=>r?.select?r.select(s.context):s.context}),this.useSearch=r=>Rm({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>Em({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Cm({...r,from:this.id}),this.useLoaderData=r=>_m({...r,from:this.id}),this.useNavigate=()=>of({from:this.fullPath}),this.Link=qt.forwardRef((r,s)=>g.jsx(cs,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}};function TN(e){return new RN(e)}class AN extends uO{constructor(t){super(t),this.useMatch=r=>ur({select:r?.select,from:this.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>ur({...r,from:this.id,select:s=>r?.select?r.select(s.context):s.context}),this.useSearch=r=>Rm({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useParams=r=>Em({select:r?.select,structuralSharing:r?.structuralSharing,from:this.id}),this.useLoaderDeps=r=>Cm({...r,from:this.id}),this.useLoaderData=r=>_m({...r,from:this.id}),this.useNavigate=()=>of({from:this.fullPath}),this.Link=qt.forwardRef((r,s)=>g.jsx(cs,{ref:s,from:this.fullPath,...r})),this.$$typeof=Symbol.for("react.memo")}}function ON(e){return new AN(e)}function In(e){return typeof e=="object"?new ow(e,{silent:!0}).createRoute(e):new ow(e,{silent:!0}).createRoute}class ow{constructor(t,r){this.path=t,this.createRoute=s=>{this.silent;const i=TN(s);return i.isRoot=!1,i},this.silent=r?.silent}}class sw{constructor(t){this.useMatch=r=>ur({select:r?.select,from:this.options.id,structuralSharing:r?.structuralSharing}),this.useRouteContext=r=>ur({from:this.options.id,select:s=>r?.select?r.select(s.context):s.context}),this.useSearch=r=>Rm({select:r?.select,structuralSharing:r?.structuralSharing,from:this.options.id}),this.useParams=r=>Em({select:r?.select,structuralSharing:r?.structuralSharing,from:this.options.id}),this.useLoaderDeps=r=>Cm({...r,from:this.options.id}),this.useLoaderData=r=>_m({...r,from:this.options.id}),this.useNavigate=()=>{const r=Ft();return of({from:r.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function aw(e){return typeof e=="object"?new sw(e):t=>new sw({id:e,...t})}function dr(e,t){let r,s,i,c;const u=()=>(r||(r=e().then(h=>{r=void 0,s=h[t]}).catch(h=>{if(i=h,pA(i)&&i instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const p=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(p)||(sessionStorage.setItem(p,"1"),c=!0)}})),r),f=function(p){if(c)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!s)if(Au)Au(u());else throw u();return w.createElement(s,p)};return f.preload=u,f}function kN(){const e=Ft(),t=w.useRef({router:e,mounted:!1}),[r,s]=w.useState(!1),{hasPendingMatches:i,isLoading:c}=lt({select:v=>({isLoading:v.isLoading,hasPendingMatches:v.matches.some(b=>b.status==="pending")}),structuralSharing:!0}),u=sp(c),f=c||r||i,h=sp(f),p=c||i,y=sp(p);return e.startTransition=v=>{s(!0),w.startTransition(()=>{v(),s(!1)})},w.useEffect(()=>{const v=e.history.subscribe(e.load),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ir(e.latestLocation.publicHref)!==Ir(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{v()}},[e,e.history]),Kl(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),Kl(()=>{u&&!c&&e.emit({type:"onLoad",...us(e.state)})},[u,e,c]),Kl(()=>{y&&!p&&e.emit({type:"onBeforeRouteMount",...us(e.state)})},[p,y,e]),Kl(()=>{if(h&&!f){const v=us(e.state);e.emit({type:"onResolved",...v}),e.__store.setState(b=>({...b,status:"idle",resolvedLocation:b.location})),v.hrefChanged&&qA(e)}},[f,h,e]),null}function MN(e){const t=lt({select:r=>`not-found-${r.location.pathname}-${r.status}`});return g.jsx(Sm,{getResetKey:()=>t,onCatch:(r,s)=>{if(Qt(r))e.onCatch?.(r,s);else throw r},errorComponent:({error:r})=>{if(Qt(r))return e.fallback?.(r);throw r},children:e.children})}function NN(){return g.jsx("p",{children:"Not Found"})}function ya(e){return g.jsx(g.Fragment,{children:e.children})}function r1(e,t,r){return t.options.notFoundComponent?g.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?g.jsx(e.options.defaultNotFoundComponent,{...r}):g.jsx(NN,{})}function jN(){return Ft().isScrollRestoring,null}const o1=w.memo(function({matchId:t}){const r=Ft(),s=lt({select:O=>{const M=O.matches.find(k=>k.id===t);return sn(M),{routeId:M.routeId,ssr:M.ssr,_displayPending:M._displayPending}},structuralSharing:!0}),i=r.routesById[s.routeId],c=i.options.pendingComponent??r.options.defaultPendingComponent,u=c?g.jsx(c,{}):null,f=i.options.errorComponent??r.options.defaultErrorComponent,h=i.options.onCatch??r.options.defaultOnCatch,p=i.isRoot?i.options.notFoundComponent??r.options.notFoundRoute?.options.component:i.options.notFoundComponent,y=s.ssr===!1||s.ssr==="data-only",v=(!i.isRoot||i.options.wrapInSuspense||y)&&(i.options.wrapInSuspense??c??(i.options.errorComponent?.preload||y))?w.Suspense:ya,b=f?Sm:ya,_=p?MN:ya,E=lt({select:O=>O.loadedAt}),x=lt({select:O=>{const M=O.matches.findIndex(k=>k.id===t);return O.matches[M-1]?.routeId}}),C=i.isRoot?i.options.shellComponent??ya:ya;return g.jsxs(C,{children:[g.jsx(rf.Provider,{value:t,children:g.jsx(v,{fallback:u,children:g.jsx(b,{getResetKey:()=>E,errorComponent:f||xm,onCatch:(O,M)=>{if(Qt(O))throw O;h?.(O,M)},children:g.jsx(_,{fallback:O=>{if(!p||O.routeId&&O.routeId!==s.routeId||!O.routeId&&!i.isRoot)throw O;return w.createElement(p,O)},children:y||s._displayPending?g.jsx(iN,{fallback:u,children:g.jsx(iw,{matchId:t})}):g.jsx(iw,{matchId:t})})})})}),x===Pn&&r.options.scrollRestoration?g.jsxs(g.Fragment,{children:[g.jsx(zN,{}),g.jsx(jN,{})]}):null]})});function zN(){const e=Ft(),t=w.useRef(void 0);return g.jsx("script",{suppressHydrationWarning:!0,ref:r=>{r&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...us(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const iw=w.memo(function({matchId:t}){const r=Ft(),{match:s,key:i,routeId:c}=lt({select:h=>{const p=h.matches.find(E=>E.id===t),y=p.routeId,b=(r.routesById[y].options.remountDeps??r.options.defaultRemountDeps)?.({routeId:y,loaderDeps:p.loaderDeps,params:p._strictParams,search:p._strictSearch});return{key:b?JSON.stringify(b):void 0,routeId:y,match:{id:p.id,status:p.status,error:p.error,invalid:p.invalid,_forcePending:p._forcePending,_displayPending:p._displayPending}}},structuralSharing:!0}),u=r.routesById[c],f=w.useMemo(()=>{const h=u.options.component??r.options.defaultComponent;return h?g.jsx(h,{},i):g.jsx(s1,{})},[i,u.options.component,r.options.defaultComponent]);if(s._displayPending)throw r.getMatch(s.id)?._nonReactive.displayPendingPromise;if(s._forcePending)throw r.getMatch(s.id)?._nonReactive.minPendingPromise;if(s.status==="pending"){const h=u.options.pendingMinMs??r.options.defaultPendingMinMs;if(h){const p=r.getMatch(s.id);if(p&&!p._nonReactive.minPendingPromise){const y=ds();p._nonReactive.minPendingPromise=y,setTimeout(()=>{y.resolve(),p._nonReactive.minPendingPromise=void 0},h)}}throw r.getMatch(s.id)?._nonReactive.loadPromise}if(s.status==="notFound")return sn(Qt(s.error)),r1(r,u,s.error);if(s.status==="redirected")throw sn(vn(s.error)),r.getMatch(s.id)?._nonReactive.loadPromise;if(s.status==="error")throw s.error;return f}),s1=w.memo(function(){const t=Ft(),r=w.useContext(rf),s=lt({select:p=>p.matches.find(y=>y.id===r)?.routeId}),i=t.routesById[s],c=lt({select:p=>{const v=p.matches.find(b=>b.id===r);return sn(v),v.globalNotFound}}),u=lt({select:p=>{const y=p.matches,v=y.findIndex(b=>b.id===r);return y[v+1]?.id}}),f=t.options.defaultPendingComponent?g.jsx(t.options.defaultPendingComponent,{}):null;if(c)return r1(t,i,void 0);if(!u)return null;const h=g.jsx(o1,{matchId:u});return s===Pn?g.jsx(w.Suspense,{fallback:f,children:h}):h});function DN(){const e=Ft(),r=e.routesById[Pn].options.pendingComponent??e.options.defaultPendingComponent,s=r?g.jsx(r,{}):null,i=typeof document<"u"&&e.ssr?ya:w.Suspense,c=g.jsxs(i,{fallback:s,children:[g.jsx(kN,{}),g.jsx(PN,{})]});return e.options.InnerWrap?g.jsx(e.options.InnerWrap,{children:c}):c}function PN(){const e=Ft(),t=lt({select:i=>i.matches[0]?.id}),r=lt({select:i=>i.loadedAt}),s=t?g.jsx(o1,{matchId:t}):null;return g.jsx(rf.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?s:g.jsx(Sm,{getResetKey:()=>r,errorComponent:xm,onCatch:i=>{i.message||i.toString()},children:s})})}const LN=e=>new IN(e);class IN extends nO{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=In,globalThis.createLazyFileRoute=aw):typeof window<"u"&&(window.createFileRoute=In,window.createLazyFileRoute=aw);function $N({router:e,children:t,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const s=n1(),i=g.jsx(s.Provider,{value:e,children:t});return e.options.Wrap?g.jsx(e.options.Wrap,{children:i}):i}function UN({router:e,...t}){return g.jsx($N,{router:e,...t,children:g.jsx(DN,{})})}function a1({tag:e,attrs:t,children:r,nonce:s}){switch(e){case"title":return g.jsx("title",{...t,suppressHydrationWarning:!0,children:r});case"meta":return g.jsx("meta",{...t,suppressHydrationWarning:!0});case"link":return g.jsx("link",{...t,nonce:s,suppressHydrationWarning:!0});case"style":return g.jsx("style",{...t,dangerouslySetInnerHTML:{__html:r},nonce:s});case"script":return g.jsx(BN,{attrs:t,children:r});default:return null}}function BN({attrs:e,children:t}){Ft(),w.useEffect(()=>{if(e?.src){const r=(()=>{try{const c=document.baseURI||window.location.href;return new URL(e.src,c).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(c=>c.src===r))return;const i=document.createElement("script");for(const[c,u]of Object.entries(e))c!=="suppressHydrationWarning"&&u!==void 0&&u!==!1&&i.setAttribute(c,typeof u=="boolean"?"":String(u));return document.head.appendChild(i),()=>{i.parentNode&&i.parentNode.removeChild(i)}}if(typeof t=="string"){const r=typeof e?.type=="string"?e.type:"text/javascript",s=typeof e?.nonce=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(u=>{if(!(u instanceof HTMLScriptElement))return!1;const f=u.getAttribute("type")??"text/javascript",h=u.getAttribute("nonce")??void 0;return u.textContent===t&&f===r&&h===s}))return;const c=document.createElement("script");if(c.textContent=t,e)for(const[u,f]of Object.entries(e))u!=="suppressHydrationWarning"&&f!==void 0&&f!==!1&&c.setAttribute(u,typeof f=="boolean"?"":String(f));return document.head.appendChild(c),()=>{c.parentNode&&c.parentNode.removeChild(c)}}},[e,t]);{const{src:r,...s}=e||{};return g.jsx("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:""},...s})}}const qN=()=>{const e=Ft(),t=e.options.ssr?.nonce,r=lt({select:h=>h.matches.map(p=>p.meta).filter(Boolean)}),s=w.useMemo(()=>{const h=[],p={};let y;for(let v=r.length-1;v>=0;v--){const b=r[v];for(let _=b.length-1;_>=0;_--){const E=b[_];if(E)if(E.title)y||(y={tag:"title",children:E.title});else if("script:ld+json"in E)try{const x=JSON.stringify(E["script:ld+json"]);h.push({tag:"script",attrs:{type:"application/ld+json"},children:vA(x)})}catch{}else{const x=E.name??E.property;if(x){if(p[x])continue;p[x]=!0}h.push({tag:"meta",attrs:{...E,nonce:t}})}}}return y&&h.push(y),t&&h.push({tag:"meta",attrs:{property:"csp-nonce",content:t}}),h.reverse(),h},[r,t]),i=lt({select:h=>{const p=h.matches.map(b=>b.links).filter(Boolean).flat(1).map(b=>({tag:"link",attrs:{...b,nonce:t}})),y=e.ssr?.manifest,v=h.matches.map(b=>y?.routes[b.routeId]?.assets??[]).filter(Boolean).flat(1).filter(b=>b.tag==="link").map(b=>({tag:"link",attrs:{...b.attrs,suppressHydrationWarning:!0,nonce:t}}));return[...p,...v]},structuralSharing:!0}),c=lt({select:h=>{const p=[];return h.matches.map(y=>e.looseRoutesById[y.routeId]).forEach(y=>e.ssr?.manifest?.routes[y.id]?.preloads?.filter(Boolean).forEach(v=>{p.push({tag:"link",attrs:{rel:"modulepreload",href:v,nonce:t}})})),p},structuralSharing:!0}),u=lt({select:h=>h.matches.map(p=>p.styles).flat(1).filter(Boolean).map(({children:p,...y})=>({tag:"style",attrs:{...y,nonce:t},children:p})),structuralSharing:!0}),f=lt({select:h=>h.matches.map(p=>p.headScripts).flat(1).filter(Boolean).map(({children:p,...y})=>({tag:"script",attrs:{...y,nonce:t},children:p})),structuralSharing:!0});return FN([...s,...c,...i,...u,...f],h=>JSON.stringify(h))};function FN(e,t){const r=new Set;return e.filter(s=>{const i=t(s);return r.has(i)?!1:(r.add(i),!0)})}function VN(){const e=qN(),r=Ft().options.ssr?.nonce;return g.jsx(g.Fragment,{children:e.map(s=>w.createElement(a1,{...s,key:`tsr-meta-${JSON.stringify(s)}`,nonce:r}))})}const HN=()=>{const e=Ft(),t=e.options.ssr?.nonce,r=lt({select:u=>{const f=[],h=e.ssr?.manifest;return h?(u.matches.map(p=>e.looseRoutesById[p.routeId]).forEach(p=>h.routes[p.id]?.assets?.filter(y=>y.tag==="script").forEach(y=>{f.push({tag:"script",attrs:{...y.attrs,nonce:t},children:y.children})})),f):[]},structuralSharing:!0}),{scripts:s}=lt({select:u=>({scripts:u.matches.map(f=>f.scripts).flat(1).filter(Boolean).map(({children:f,...h})=>({tag:"script",attrs:{...h,suppressHydrationWarning:!0,nonce:t},children:f}))}),structuralSharing:!0});let i;e.serverSsr&&(i=e.serverSsr.takeBufferedScripts());const c=[...s,...r];return i&&c.unshift(i),g.jsx(g.Fragment,{children:c.map((u,f)=>w.createElement(a1,{...u,key:`tsr-scripts-${u.tag}-${f}`}))})};function i1(e){if(Array.isArray(e))return e.flatMap(y=>i1(y));if(typeof e!="string")return[];const t=[];let r=0,s,i,c,u,f;const h=()=>{for(;r<e.length&&/\s/.test(e.charAt(r));)r+=1;return r<e.length},p=()=>(i=e.charAt(r),i!=="="&&i!==";"&&i!==",");for(;r<e.length;){for(s=r,f=!1;h();)if(i=e.charAt(r),i===","){for(c=r,r+=1,h(),u=r;r<e.length&&p();)r+=1;r<e.length&&e.charAt(r)==="="?(f=!0,r=u,t.push(e.slice(s,c)),s=r):r=c+1}else r+=1;(!f||r>=e.length)&&t.push(e.slice(s))}return t}function ZN(e){return e instanceof Headers?new Headers(e):Array.isArray(e)?new Headers(e):typeof e=="object"?new Headers(e):new Headers}function QN(...e){return e.reduce((t,r)=>{const s=ZN(r);for(const[i,c]of s.entries())i==="set-cookie"?i1(c).forEach(f=>t.append("set-cookie",f)):t.set(i,c);return t},new Headers)}function GN(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e}async function YN(e){sn(window.$_TSR);const t=e.options.serializationAdapters;if(t?.length){const x=new Map;t.forEach(C=>{x.set(C.key,C.fromSerializable)}),window.$_TSR.t=x,window.$_TSR.buffer.forEach(C=>C())}window.$_TSR.initialized=!0,sn(window.$_TSR.router);const{manifest:r,dehydratedData:s,lastMatchId:i}=window.$_TSR.router;e.ssr={manifest:r};const u=document.querySelector('meta[property="csp-nonce"]')?.content;e.options.ssr={nonce:u};const f=e.matchRoutes(e.state.location),h=Promise.all(f.map(x=>{const C=e.looseRoutesById[x.routeId];return e.loadRouteChunk(C)}));function p(x){const O=e.looseRoutesById[x.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(O){const M=ds();x._nonReactive.minPendingPromise=M,x._forcePending=!0,setTimeout(()=>{M.resolve(),e.updateMatch(x.id,k=>(k._nonReactive.minPendingPromise=void 0,{...k,_forcePending:void 0}))},O)}}function y(x){const C=e.looseRoutesById[x.routeId];C&&(C.options.ssr=x.ssr)}let v;f.forEach(x=>{const C=window.$_TSR.router.matches.find(O=>O.i===x.id);if(!C){x._nonReactive.dehydrated=!1,x.ssr=!1,y(x);return}GN(x,C),y(x),x._nonReactive.dehydrated=x.ssr!==!1,(x.ssr==="data-only"||x.ssr===!1)&&v===void 0&&(v=x.index,p(x))}),e.__store.setState(x=>({...x,matches:f})),await e.options.hydrate?.(s),await Promise.all(e.state.matches.map(async x=>{try{const C=e.looseRoutesById[x.routeId],M=e.state.matches[x.index-1]?.context??e.options.context;if(C.options.context){const H={deps:x.loaderDeps,params:x.params,context:M??{},location:e.state.location,navigate:L=>e.navigate({...L,_fromLocation:e.state.location}),buildLocation:e.buildLocation,cause:x.cause,abortController:x.abortController,preload:!1,matches:f};x.__routeContext=C.options.context(H)??void 0}x.context={...M,...x.__routeContext,...x.__beforeLoadContext};const k={ssr:e.options.ssr,matches:e.state.matches,match:x,params:x.params,loaderData:x.loaderData},D=await C.options.head?.(k),U=await C.options.scripts?.(k);x.meta=D?.meta,x.links=D?.links,x.headScripts=D?.scripts,x.styles=D?.styles,x.scripts=U}catch(C){if(Qt(C))x.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${x.routeId}`,C);else throw x.error=C,console.error(`Error during hydration for route ${x.routeId}:`,C),C}}));const b=f[f.length-1].id!==i;if(!f.some(x=>x.ssr===!1)&&!b)return f.forEach(x=>{x._nonReactive.dehydrated=void 0}),h;const E=Promise.resolve().then(()=>e.load()).catch(x=>{console.error("Error during router hydration:",x)});if(b){const x=f[1];sn(x),p(x),x._displayPending=!0,x._nonReactive.displayPendingPromise=E,E.then(()=>{_a(()=>{e.__store.state.status==="pending"&&e.__store.setState(C=>({...C,status:"idle",resolvedLocation:C.location})),e.updateMatch(x.id,C=>({...C,_displayPending:void 0,displayPendingPromise:void 0}))})})}return h}const KN="__TSS_CONTEXT",Vp=Symbol.for("TSS_SERVER_FUNCTION"),cw=Symbol.for("TSS_SERVER_FUNCTION_FACTORY"),XN="x-tss-serialized",JN="x-tss-raw",c1="application/x-tss-framed",zr={JSON:0,CHUNK:1,END:2,ERROR:3},fa=9,lw=1,WN=/;\s*v=(\d+)/;function ej(e){const t=e.match(WN);return t?parseInt(t[1],10):void 0}function tj(e){const t=ej(e);if(t!==void 0&&t!==lw)throw new Error(`Incompatible framed protocol version: server=${t}, client=${lw}. Please ensure client and server are using compatible versions.`)}const Tm=()=>window.__TSS_START_OPTIONS__;function nj(){return[...Tm()?.serializationAdapters?.map(IM)??[],...WM]}const uw=new TextDecoder,rj=new Uint8Array(0),fw=16*1024*1024,dw=32*1024*1024,hw=1024,pw=1e5;function oj(e){const t=new Map,r=new Map,s=new Set;let i=!1,c=null,u=0,f;const h=new ReadableStream({start(v){f=v},cancel(){i=!0;try{c?.cancel()}catch{}t.forEach(v=>{try{v.error(new Error("Framed response cancelled"))}catch{}}),t.clear(),r.clear(),s.clear()}});function p(v){const b=r.get(v);if(b)return b;if(s.has(v))return new ReadableStream({start(E){E.close()}});if(r.size>=hw)throw new Error(`Too many raw streams in framed response (max ${hw})`);const _=new ReadableStream({start(E){t.set(v,E)},cancel(){s.add(v),t.delete(v),r.delete(v)}});return r.set(v,_),_}function y(v){return p(v),t.get(v)}return(async()=>{const v=e.getReader();c=v;const b=[];let _=0;function E(){if(_<fa)return null;const C=b[0];if(C.length>=fa){const L=C[0],j=(C[1]<<24|C[2]<<16|C[3]<<8|C[4])>>>0,G=(C[5]<<24|C[6]<<16|C[7]<<8|C[8])>>>0;return{type:L,streamId:j,length:G}}const O=new Uint8Array(fa);let M=0,k=fa;for(let L=0;L<b.length&&k>0;L++){const j=b[L],G=Math.min(j.length,k);O.set(j.subarray(0,G),M),M+=G,k-=G}const D=O[0],U=(O[1]<<24|O[2]<<16|O[3]<<8|O[4])>>>0,H=(O[5]<<24|O[6]<<16|O[7]<<8|O[8])>>>0;return{type:D,streamId:U,length:H}}function x(C){if(C===0)return rj;const O=new Uint8Array(C);let M=0,k=C;for(;k>0&&b.length>0;){const D=b[0];if(!D)break;const U=Math.min(D.length,k);O.set(D.subarray(0,U),M),M+=U,k-=U,U===D.length?b.shift():b[0]=D.subarray(U)}return _-=C,O}try{for(;;){const{done:C,value:O}=await v.read();if(i||C)break;if(O){if(_+O.length>dw)throw new Error(`Framed response buffer exceeded ${dw} bytes`);for(b.push(O),_+=O.length;;){const M=E();if(!M)break;const{type:k,streamId:D,length:U}=M;if(k!==zr.JSON&&k!==zr.CHUNK&&k!==zr.END&&k!==zr.ERROR)throw new Error(`Unknown frame type: ${k}`);if(k===zr.JSON){if(D!==0)throw new Error("Invalid JSON frame streamId (expected 0)")}else if(D===0)throw new Error("Invalid raw frame streamId (expected non-zero)");if(U>fw)throw new Error(`Frame payload too large: ${U} bytes (max ${fw})`);const H=fa+U;if(_<H)break;if(++u>pw)throw new Error(`Too many frames in framed response (max ${pw})`);x(fa);const L=x(U);switch(k){case zr.JSON:{try{f.enqueue(uw.decode(L))}catch{}break}case zr.CHUNK:{const j=y(D);j&&j.enqueue(L);break}case zr.END:{const j=y(D);if(s.add(D),j){try{j.close()}catch{}t.delete(D)}break}case zr.ERROR:{const j=y(D);if(s.add(D),j){const G=uw.decode(L);j.error(new Error(G)),t.delete(D)}break}}}}}if(_!==0)throw new Error("Incomplete frame at end of framed response");try{f.close()}catch{}t.forEach(C=>{try{C.close()}catch{}}),t.clear()}catch(C){try{f.error(C)}catch{}t.forEach(O=>{try{O.error(C)}catch{}}),t.clear()}finally{try{v.releaseLock()}catch{}c=null}})(),{getOrCreateStream:p,jsonChunks:h}}let Aa=null;const sj=Object.prototype.hasOwnProperty;function l1(e){for(const t in e)if(sj.call(e,t))return!0;return!1}async function aj(e,t,r){Aa||(Aa=nj());const i=t[0],c=i.fetch??r,u=i.data instanceof FormData?"formData":"payload",f=i.headers?new Headers(i.headers):new Headers;if(f.set("x-tsr-serverFn","true"),u==="payload"&&f.set("accept",`${c1}, application/x-ndjson, application/json`),i.method==="GET"){if(u==="formData")throw new Error("FormData is not supported with GET requests");const p=await u1(i);if(p!==void 0){const y=ux({payload:p});e.includes("?")?e+=`&${y}`:e+=`?${y}`}}let h;if(i.method==="POST"){const p=await ij(i);p?.contentType&&f.set("content-type",p.contentType),h=p?.body}return await cj(async()=>c(e,{method:i.method,headers:f,signal:i.signal,body:h}))}async function u1(e){let t=!1;const r={};if(e.data!==void 0&&(t=!0,r.data=e.data),e.context&&l1(e.context)&&(t=!0,r.context=e.context),t)return f1(r)}async function f1(e){return JSON.stringify(await Promise.resolve(LM(e,{plugins:Aa})))}async function ij(e){if(e.data instanceof FormData){let r;return e.context&&l1(e.context)&&(r=await f1(e.context)),r!==void 0&&e.data.set(KN,r),{body:e.data}}const t=await u1(e);if(t)return{body:t,contentType:"application/json"}}async function cj(e){let t;try{t=await e()}catch(i){if(i instanceof Response)t=i;else throw console.log(i),i}if(t.headers.get(JN)==="true")return t;const r=t.headers.get("content-type");if(sn(r),!!t.headers.get(XN)){let i;if(r.includes(c1)){if(tj(r),!t.body)throw new Error("No response body for framed response");const{getOrCreateStream:c,jsonChunks:u}=oj(t.body),h=[JM(c),...Aa||[]],p=new Map;i=await uj({jsonStream:u,onMessage:y=>op(y,{refs:p,plugins:h}),onError(y,v){console.error(y,v)}})}else if(r.includes("application/x-ndjson")){const c=new Map;i=await lj({response:t,onMessage:u=>op(u,{refs:c,plugins:Aa}),onError(u,f){console.error(u,f)}})}else if(r.includes("application/json")){const c=await t.json();i=op(c,{plugins:Aa})}if(sn(i),i instanceof Error)throw i;return i}if(r.includes("application/json")){const i=await t.json(),c=dx(i);if(c)throw c;if(Qt(i))throw i;return i}if(!t.ok)throw new Error(await t.text());return t}async function lj({response:e,onMessage:t,onError:r}){if(!e.body)throw new Error("No response body");const s=e.body.pipeThrough(new TextDecoderStream).getReader();let i="",c=!1,u;for(;!c;){const{value:f,done:h}=await s.read();if(f&&(i+=f),i.length===0&&h)throw new Error("Stream ended before first object");if(i.endsWith(`
|
|
13
|
-
`)){const p=i.split(`
|
|
14
|
-
`).filter(Boolean),y=p[0];if(!y)throw new Error("No JSON line in the first chunk");u=JSON.parse(y),c=!0,i=p.slice(1).join(`
|
|
15
|
-
`)}else{const p=i.indexOf(`
|
|
16
|
-
`);if(p>=0){const y=i.slice(0,p).trim();i=i.slice(p+1),y.length>0&&(u=JSON.parse(y),c=!0)}}}return(async()=>{try{for(;;){const{value:f,done:h}=await s.read();f&&(i+=f);const p=i.lastIndexOf(`
|
|
17
|
-
`);if(p>=0){const y=i.slice(0,p);i=i.slice(p+1);const v=y.split(`
|
|
18
|
-
`).filter(Boolean);for(const b of v)try{t(JSON.parse(b))}catch(_){r?.(`Invalid JSON line: ${b}`,_)}}if(h)break}}catch(f){r?.("Stream processing error:",f)}})(),t(u)}async function uj({jsonStream:e,onMessage:t,onError:r}){const s=e.getReader(),{value:i,done:c}=await s.read();if(c||!i)throw new Error("Stream ended before first object");const u=JSON.parse(i);return(async()=>{try{for(;;){const{value:f,done:h}=await s.read();if(h)break;if(f)try{t(JSON.parse(f))}catch(p){r?.(`Invalid JSON: ${f}`,p)}}}catch(f){r?.("Stream processing error:",f)}})(),t(u)}function d1(e){const t="/_serverFn/"+e;return Object.assign((...i)=>{const c=Tm()?.serverFns?.fetch;return aj(t,i,c??fetch)},{url:t,serverFnMeta:{id:e},[Vp]:!0})}const fj={key:"$TSS/serverfn",test:e=>typeof e!="function"||!(Vp in e)?!1:!!e[Vp],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>d1(e)};var sr=[],Dn=[],dj=Uint8Array,dp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var da=0,hj=dp.length;da<hj;++da)sr[da]=dp[da],Dn[dp.charCodeAt(da)]=da;Dn[45]=62;Dn[95]=63;function pj(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var s=r===t?0:4-r%4;return[r,s]}function mj(e,t,r){return(t+r)*3/4-r}function cc(e){var t,r=pj(e),s=r[0],i=r[1],c=new dj(mj(e,s,i)),u=0,f=i>0?s-4:s,h;for(h=0;h<f;h+=4)t=Dn[e.charCodeAt(h)]<<18|Dn[e.charCodeAt(h+1)]<<12|Dn[e.charCodeAt(h+2)]<<6|Dn[e.charCodeAt(h+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=t&255;return i===2&&(t=Dn[e.charCodeAt(h)]<<2|Dn[e.charCodeAt(h+1)]>>4,c[u++]=t&255),i===1&&(t=Dn[e.charCodeAt(h)]<<10|Dn[e.charCodeAt(h+1)]<<4|Dn[e.charCodeAt(h+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function gj(e){return sr[e>>18&63]+sr[e>>12&63]+sr[e>>6&63]+sr[e&63]}function yj(e,t,r){for(var s,i=[],c=t;c<r;c+=3)s=(e[c]<<16&16711680)+(e[c+1]<<8&65280)+(e[c+2]&255),i.push(gj(s));return i.join("")}function lc(e){for(var t,r=e.length,s=r%3,i=[],c=16383,u=0,f=r-s;u<f;u+=c)i.push(yj(e,u,u+c>f?f:u+c));return s===1?(t=e[r-1],i.push(sr[t>>2]+sr[t<<4&63]+"==")):s===2&&(t=(e[r-2]<<8)+e[r-1],i.push(sr[t>>10]+sr[t>>4&63]+sr[t<<2&63]+"=")),i.join("")}function Lr(e){if(e===void 0)return{};if(!h1(e))throw new Error(`The arguments to a Convex function must be an object. Received: ${e}`);return e}function vj(e){if(typeof e>"u")throw new Error("Client created with undefined deployment address. If you used an environment variable, check that it's set.");if(typeof e!="string")throw new Error(`Invalid deployment address: found ${e}".`);if(!(e.startsWith("http:")||e.startsWith("https:")))throw new Error(`Invalid deployment address: Must start with "https://" or "http://". Found "${e}".`);try{new URL(e)}catch{throw new Error(`Invalid deployment address: "${e}" is not a valid URL. If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`)}if(e.endsWith(".convex.site"))throw new Error(`Invalid deployment address: "${e}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`)}function h1(e){const t=typeof e=="object",r=Object.getPrototypeOf(e),s=r===null||r===Object.prototype||r?.constructor?.name==="Object";return t&&s}const p1=!0,za=BigInt("-9223372036854775808"),Am=BigInt("9223372036854775807"),Hp=BigInt("0"),bj=BigInt("8"),wj=BigInt("256");function m1(e){return Number.isNaN(e)||!Number.isFinite(e)||Object.is(e,-0)}function Sj(e){e<Hp&&(e-=za+za);let t=e.toString(16);t.length%2===1&&(t="0"+t);const r=new Uint8Array(new ArrayBuffer(8));let s=0;for(const i of t.match(/.{2}/g).reverse())r.set([parseInt(i,16)],s++),e>>=bj;return lc(r)}function xj(e){const t=cc(e);if(t.byteLength!==8)throw new Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);let r=Hp,s=Hp;for(const i of t)r+=BigInt(i)*wj**s,s++;return r>Am&&(r+=za+za),r}function _j(e){if(e<za||Am<e)throw new Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);const t=new ArrayBuffer(8);return new DataView(t).setBigInt64(0,e,!0),lc(new Uint8Array(t))}function Cj(e){const t=cc(e);if(t.byteLength!==8)throw new Error(`Received ${t.byteLength} bytes, expected 8 for $integer`);return new DataView(t.buffer).getBigInt64(0,!0)}const Ej=DataView.prototype.setBigInt64?_j:Sj,Rj=DataView.prototype.getBigInt64?Cj:xj,mw=1024;function g1(e){if(e.length>mw)throw new Error(`Field name ${e} exceeds maximum field name length ${mw}.`);if(e.startsWith("$"))throw new Error(`Field name ${e} starts with a '$', which is reserved.`);for(let t=0;t<e.length;t+=1){const r=e.charCodeAt(t);if(r<32||r>=127)throw new Error(`Field name ${e} has invalid character '${e[t]}': Field names can only contain non-control ASCII characters`)}}function Da(e){if(e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string")return e;if(Array.isArray(e))return e.map(s=>Da(s));if(typeof e!="object")throw new Error(`Unexpected type of ${e}`);const t=Object.entries(e);if(t.length===1){const s=t[0][0];if(s==="$bytes"){if(typeof e.$bytes!="string")throw new Error(`Malformed $bytes field on ${e}`);return cc(e.$bytes).buffer}if(s==="$integer"){if(typeof e.$integer!="string")throw new Error(`Malformed $integer field on ${e}`);return Rj(e.$integer)}if(s==="$float"){if(typeof e.$float!="string")throw new Error(`Malformed $float field on ${e}`);const i=cc(e.$float);if(i.byteLength!==8)throw new Error(`Received ${i.byteLength} bytes, expected 8 for $float`);const u=new DataView(i.buffer).getFloat64(0,p1);if(!m1(u))throw new Error(`Float ${u} should be encoded as a number`);return u}if(s==="$set")throw new Error("Received a Set which is no longer supported as a Convex type.");if(s==="$map")throw new Error("Received a Map which is no longer supported as a Convex type.")}const r={};for(const[s,i]of Object.entries(e))g1(s),r[s]=Da(i);return r}const gw=16384;function nc(e){const t=JSON.stringify(e,(r,s)=>s===void 0?"undefined":typeof s=="bigint"?`${s.toString()}n`:s);if(t.length>gw){const r="[...truncated]";let s=gw-r.length;const i=t.codePointAt(s-1);return i!==void 0&&i>65535&&(s-=1),t.substring(0,s)+r}return t}function Zp(e,t,r,s){if(e===void 0){const u=r&&` (present at path ${r} in original object ${nc(t)})`;throw new Error(`undefined is not a valid Convex value${u}. To learn about Convex's supported types, see https://docs.convex.dev/using/types.`)}if(e===null)return e;if(typeof e=="bigint"){if(e<za||Am<e)throw new Error(`BigInt ${e} does not fit into a 64-bit signed integer.`);return{$integer:Ej(e)}}if(typeof e=="number")if(m1(e)){const u=new ArrayBuffer(8);return new DataView(u).setFloat64(0,e,p1),{$float:lc(new Uint8Array(u))}}else return e;if(typeof e=="boolean"||typeof e=="string")return e;if(e instanceof ArrayBuffer)return{$bytes:lc(new Uint8Array(e))};if(Array.isArray(e))return e.map((u,f)=>Zp(u,t,r+`[${f}]`));if(e instanceof Set)throw new Error(hp(r,"Set",[...e],t));if(e instanceof Map)throw new Error(hp(r,"Map",[...e],t));if(!h1(e)){const u=e?.constructor?.name,f=u?`${u} `:"";throw new Error(hp(r,f,e,t))}const i={},c=Object.entries(e);c.sort(([u,f],[h,p])=>u===h?0:u<h?-1:1);for(const[u,f]of c)f!==void 0&&(g1(u),i[u]=Zp(f,t,r+`.${u}`));return i}function hp(e,t,r,s){return e?`${t}${nc(r)} is not a supported Convex type (present at path ${e} in original object ${nc(s)}). To learn about Convex's supported types, see https://docs.convex.dev/using/types.`:`${t}${nc(r)} is not a supported Convex type.`}function Gn(e){return Zp(e,e,"")}var Tj=Object.defineProperty,Aj=(e,t,r)=>t in e?Tj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,it=(e,t,r)=>Aj(e,typeof t!="symbol"?t+"":t,r);const Oj="https://docs.convex.dev/error#undefined-validator";function uc(e,t){const r=t!==void 0?` for field "${t}"`:"";throw new Error(`A validator is undefined${r} in ${e}. This is often caused by circular imports. See ${Oj} for details.`)}class wn{constructor({isOptional:t}){it(this,"type"),it(this,"fieldPaths"),it(this,"isOptional"),it(this,"isConvexValidator"),this.isOptional=t,this.isConvexValidator=!0}}class Om extends wn{constructor({isOptional:t,tableName:r}){if(super({isOptional:t}),it(this,"tableName"),it(this,"kind","id"),typeof r!="string")throw new Error("v.id(tableName) requires a string");this.tableName=r}get json(){return{type:"id",tableName:this.tableName}}asOptional(){return new Om({isOptional:"optional",tableName:this.tableName})}}class Ou extends wn{constructor(){super(...arguments),it(this,"kind","float64")}get json(){return{type:"number"}}asOptional(){return new Ou({isOptional:"optional"})}}class ku extends wn{constructor(){super(...arguments),it(this,"kind","int64")}get json(){return{type:"bigint"}}asOptional(){return new ku({isOptional:"optional"})}}class km extends wn{constructor(){super(...arguments),it(this,"kind","boolean")}get json(){return{type:this.kind}}asOptional(){return new km({isOptional:"optional"})}}class Mm extends wn{constructor(){super(...arguments),it(this,"kind","bytes")}get json(){return{type:this.kind}}asOptional(){return new Mm({isOptional:"optional"})}}class Nm extends wn{constructor(){super(...arguments),it(this,"kind","string")}get json(){return{type:this.kind}}asOptional(){return new Nm({isOptional:"optional"})}}class jm extends wn{constructor(){super(...arguments),it(this,"kind","null")}get json(){return{type:this.kind}}asOptional(){return new jm({isOptional:"optional"})}}class zm extends wn{constructor(){super(...arguments),it(this,"kind","any")}get json(){return{type:this.kind}}asOptional(){return new zm({isOptional:"optional"})}}class rs extends wn{constructor({isOptional:t,fields:r}){super({isOptional:t}),it(this,"fields"),it(this,"kind","object"),globalThis.Object.entries(r).forEach(([s,i])=>{if(i===void 0&&uc("v.object()",s),!i.isConvexValidator)throw new Error("v.object() entries must be validators")}),this.fields=r}get json(){return{type:this.kind,value:globalThis.Object.fromEntries(globalThis.Object.entries(this.fields).map(([t,r])=>[t,{fieldType:r.json,optional:r.isOptional==="optional"}]))}}asOptional(){return new rs({isOptional:"optional",fields:this.fields})}omit(...t){const r={...this.fields};for(const s of t)delete r[s];return new rs({isOptional:this.isOptional,fields:r})}pick(...t){const r={};for(const s of t)r[s]=this.fields[s];return new rs({isOptional:this.isOptional,fields:r})}partial(){const t={};for(const[r,s]of globalThis.Object.entries(this.fields))t[r]=s.asOptional();return new rs({isOptional:this.isOptional,fields:t})}extend(t){return new rs({isOptional:this.isOptional,fields:{...this.fields,...t}})}}class Dm extends wn{constructor({isOptional:t,value:r}){if(super({isOptional:t}),it(this,"value"),it(this,"kind","literal"),typeof r!="string"&&typeof r!="boolean"&&typeof r!="number"&&typeof r!="bigint")throw new Error("v.literal(value) must be a string, number, or boolean");this.value=r}get json(){return{type:this.kind,value:Gn(this.value)}}asOptional(){return new Dm({isOptional:"optional",value:this.value})}}class Pm extends wn{constructor({isOptional:t,element:r}){super({isOptional:t}),it(this,"element"),it(this,"kind","array"),r===void 0&&uc("v.array()"),this.element=r}get json(){return{type:this.kind,value:this.element.json}}asOptional(){return new Pm({isOptional:"optional",element:this.element})}}class Lm extends wn{constructor({isOptional:t,key:r,value:s}){if(super({isOptional:t}),it(this,"key"),it(this,"value"),it(this,"kind","record"),r===void 0&&uc("v.record()","key"),s===void 0&&uc("v.record()","value"),r.isOptional==="optional")throw new Error("Record validator cannot have optional keys");if(s.isOptional==="optional")throw new Error("Record validator cannot have optional values");if(!r.isConvexValidator||!s.isConvexValidator)throw new Error("Key and value of v.record() but be validators");this.key=r,this.value=s}get json(){return{type:this.kind,keys:this.key.json,values:{fieldType:this.value.json,optional:!1}}}asOptional(){return new Lm({isOptional:"optional",key:this.key,value:this.value})}}class Im extends wn{constructor({isOptional:t,members:r}){super({isOptional:t}),it(this,"members"),it(this,"kind","union"),r.forEach((s,i)=>{if(s===void 0&&uc("v.union()",`member at index ${i}`),!s.isConvexValidator)throw new Error("All members of v.union() must be validators")}),this.members=r}get json(){return{type:this.kind,value:this.members.map(t=>t.json)}}asOptional(){return new Im({isOptional:"optional",members:this.members})}}const et={id:e=>new Om({isOptional:"required",tableName:e}),null:()=>new jm({isOptional:"required"}),number:()=>new Ou({isOptional:"required"}),float64:()=>new Ou({isOptional:"required"}),bigint:()=>new ku({isOptional:"required"}),int64:()=>new ku({isOptional:"required"}),boolean:()=>new km({isOptional:"required"}),string:()=>new Nm({isOptional:"required"}),bytes:()=>new Mm({isOptional:"required"}),literal:e=>new Dm({isOptional:"required",value:e}),array:e=>new Pm({isOptional:"required",element:e}),object:e=>new rs({isOptional:"required",fields:e}),record:(e,t)=>new Lm({isOptional:"required",key:e,value:t}),union:(...e)=>new Im({isOptional:"required",members:e}),any:()=>new zm({isOptional:"required"}),optional:e=>e.asOptional(),nullable:e=>et.union(e,et.null())};var kj=Object.defineProperty,Mj=(e,t,r)=>t in e?kj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pp=(e,t,r)=>Mj(e,typeof t!="symbol"?t+"":t,r),yw,vw;const Nj=Symbol.for("ConvexError");class Qp extends(vw=Error,yw=Nj,vw){constructor(t){super(typeof t=="string"?t:nc(t)),pp(this,"name","ConvexError"),pp(this,"data"),pp(this,yw,!0),this.data=t}}const y1=()=>Array.from({length:4},()=>0);y1();y1();const bw="1.31.6";var jj=Object.defineProperty,zj=(e,t,r)=>t in e?jj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ww=(e,t,r)=>zj(e,typeof t!="symbol"?t+"":t,r);const Dj="color:rgb(0, 145, 255)";function v1(e){switch(e){case"query":return"Q";case"mutation":return"M";case"action":return"A";case"any":return"?"}}class b1{constructor(t){ww(this,"_onLogLineFuncs"),ww(this,"_verbose"),this._onLogLineFuncs={},this._verbose=t.verbose}addLogLineListener(t){let r=Math.random().toString(36).substring(2,15);for(let s=0;s<10&&this._onLogLineFuncs[r]!==void 0;s++)r=Math.random().toString(36).substring(2,15);return this._onLogLineFuncs[r]=t,()=>{delete this._onLogLineFuncs[r]}}logVerbose(...t){if(this._verbose)for(const r of Object.values(this._onLogLineFuncs))r("debug",`${new Date().toISOString()}`,...t)}log(...t){for(const r of Object.values(this._onLogLineFuncs))r("info",...t)}warn(...t){for(const r of Object.values(this._onLogLineFuncs))r("warn",...t)}error(...t){for(const r of Object.values(this._onLogLineFuncs))r("error",...t)}}function w1(e){const t=new b1(e);return t.addLogLineListener((r,...s)=>{switch(r){case"debug":console.debug(...s);break;case"info":console.log(...s);break;case"warn":console.warn(...s);break;case"error":console.error(...s);break;default:console.log(...s)}}),t}function S1(e){return new b1(e)}function Mu(e,t,r,s,i){const c=v1(r);if(typeof i=="object"&&(i=`ConvexError ${JSON.stringify(i.errorData,null,2)}`),t==="info"){const u=i.match(/^\[.*?\] /);if(u===null){e.error(`[CONVEX ${c}(${s})] Could not parse console.log`);return}const f=i.slice(1,u[0].length-2),h=i.slice(u[0].length);e.log(`%c[CONVEX ${c}(${s})] [${f}]`,Dj,h)}else e.error(`[CONVEX ${c}(${s})] ${i}`)}function Pj(e,t){const r=`[CONVEX FATAL ERROR] ${t}`;return e.error(r),new Error(r)}function wa(e,t,r){return`[CONVEX ${v1(e)}(${t})] ${r.errorMessage}
|
|
19
|
-
Called by client`}function Gp(e,t){return t.data=e.errorData,t}function ms(e){const t=e.split(":");let r,s;return t.length===1?(r=t[0],s="default"):(r=t.slice(0,t.length-1).join(":"),s=t[t.length-1]),r.endsWith(".js")&&(r=r.slice(0,-3)),`${r}:${s}`}function fs(e,t){return JSON.stringify({udfPath:ms(e),args:Gn(t)})}function Sw(e,t,r){const{initialNumItems:s,id:i}=r;return JSON.stringify({type:"paginated",udfPath:ms(e),args:Gn(t),options:Gn({initialNumItems:s,id:i})})}var Lj=Object.defineProperty,Ij=(e,t,r)=>t in e?Lj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rr=(e,t,r)=>Ij(e,typeof t!="symbol"?t+"":t,r);class $j{constructor(){rr(this,"nextQueryId"),rr(this,"querySetVersion"),rr(this,"querySet"),rr(this,"queryIdToToken"),rr(this,"identityVersion"),rr(this,"auth"),rr(this,"outstandingQueriesOlderThanRestart"),rr(this,"outstandingAuthOlderThanRestart"),rr(this,"paused"),rr(this,"pendingQuerySetModifications"),this.nextQueryId=0,this.querySetVersion=0,this.identityVersion=0,this.querySet=new Map,this.queryIdToToken=new Map,this.outstandingQueriesOlderThanRestart=new Set,this.outstandingAuthOlderThanRestart=!1,this.paused=!1,this.pendingQuerySetModifications=new Map}hasSyncedPastLastReconnect(){return this.outstandingQueriesOlderThanRestart.size===0&&!this.outstandingAuthOlderThanRestart}markAuthCompletion(){this.outstandingAuthOlderThanRestart=!1}subscribe(t,r,s,i){const c=ms(t),u=fs(c,r),f=this.querySet.get(u);if(f!==void 0)return f.numSubscribers+=1,{queryToken:u,modification:null,unsubscribe:()=>this.removeSubscriber(u)};{const h=this.nextQueryId++,p={id:h,canonicalizedUdfPath:c,args:r,numSubscribers:1,journal:s,componentPath:i};this.querySet.set(u,p),this.queryIdToToken.set(h,u);const y=this.querySetVersion,v=this.querySetVersion+1,b={type:"Add",queryId:h,udfPath:c,args:[Gn(r)],journal:s,componentPath:i};return this.paused?this.pendingQuerySetModifications.set(h,b):this.querySetVersion=v,{queryToken:u,modification:{type:"ModifyQuerySet",baseVersion:y,newVersion:v,modifications:[b]},unsubscribe:()=>this.removeSubscriber(u)}}}transition(t){for(const r of t.modifications)switch(r.type){case"QueryUpdated":case"QueryFailed":{this.outstandingQueriesOlderThanRestart.delete(r.queryId);const s=r.journal;if(s!==void 0){const i=this.queryIdToToken.get(r.queryId);i!==void 0&&(this.querySet.get(i).journal=s)}break}case"QueryRemoved":{this.outstandingQueriesOlderThanRestart.delete(r.queryId);break}default:throw new Error(`Invalid modification ${r.type}`)}}queryId(t,r){const s=ms(t),i=fs(s,r),c=this.querySet.get(i);return c!==void 0?c.id:null}isCurrentOrNewerAuthVersion(t){return t>=this.identityVersion}getAuth(){return this.auth}setAuth(t){this.auth={tokenType:"User",value:t};const r=this.identityVersion;return this.paused||(this.identityVersion=r+1),{type:"Authenticate",baseVersion:r,...this.auth}}setAdminAuth(t,r){const s={tokenType:"Admin",value:t,impersonating:r};this.auth=s;const i=this.identityVersion;return this.paused||(this.identityVersion=i+1),{type:"Authenticate",baseVersion:i,...s}}clearAuth(){this.auth=void 0,this.markAuthCompletion();const t=this.identityVersion;return this.paused||(this.identityVersion=t+1),{type:"Authenticate",tokenType:"None",baseVersion:t}}hasAuth(){return!!this.auth}isNewAuth(t){return this.auth?.value!==t}queryPath(t){const r=this.queryIdToToken.get(t);return r?this.querySet.get(r).canonicalizedUdfPath:null}queryArgs(t){const r=this.queryIdToToken.get(t);return r?this.querySet.get(r).args:null}queryToken(t){return this.queryIdToToken.get(t)??null}queryJournal(t){return this.querySet.get(t)?.journal}restart(t){this.unpause(),this.outstandingQueriesOlderThanRestart.clear();const r=[];for(const c of this.querySet.values()){const u={type:"Add",queryId:c.id,udfPath:c.canonicalizedUdfPath,args:[Gn(c.args)],journal:c.journal,componentPath:c.componentPath};r.push(u),t.has(c.id)||this.outstandingQueriesOlderThanRestart.add(c.id)}this.querySetVersion=1;const s={type:"ModifyQuerySet",baseVersion:0,newVersion:1,modifications:r};if(!this.auth)return this.identityVersion=0,[s,void 0];this.outstandingAuthOlderThanRestart=!0;const i={type:"Authenticate",baseVersion:0,...this.auth};return this.identityVersion=1,[s,i]}pause(){this.paused=!0}resume(){const t=this.pendingQuerySetModifications.size>0?{type:"ModifyQuerySet",baseVersion:this.querySetVersion,newVersion:++this.querySetVersion,modifications:Array.from(this.pendingQuerySetModifications.values())}:void 0,r=this.auth!==void 0?{type:"Authenticate",baseVersion:this.identityVersion++,...this.auth}:void 0;return this.unpause(),[t,r]}unpause(){this.paused=!1,this.pendingQuerySetModifications.clear()}removeSubscriber(t){const r=this.querySet.get(t);if(r.numSubscribers>1)return r.numSubscribers-=1,null;{this.querySet.delete(t),this.queryIdToToken.delete(r.id),this.outstandingQueriesOlderThanRestart.delete(r.id);const s=this.querySetVersion,i=this.querySetVersion+1,c={type:"Remove",queryId:r.id};return this.paused?this.pendingQuerySetModifications.has(r.id)?this.pendingQuerySetModifications.delete(r.id):this.pendingQuerySetModifications.set(r.id,c):this.querySetVersion=i,{type:"ModifyQuerySet",baseVersion:s,newVersion:i,modifications:[c]}}}}var Uj=Object.defineProperty,Bj=(e,t,r)=>t in e?Uj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xl=(e,t,r)=>Bj(e,typeof t!="symbol"?t+"":t,r);class qj{constructor(t,r){this.logger=t,this.markConnectionStateDirty=r,Xl(this,"inflightRequests"),Xl(this,"requestsOlderThanRestart"),Xl(this,"inflightMutationsCount",0),Xl(this,"inflightActionsCount",0),this.inflightRequests=new Map,this.requestsOlderThanRestart=new Set}request(t,r){const s=new Promise(i=>{const c=r?"Requested":"NotSent";this.inflightRequests.set(t.requestId,{message:t,status:{status:c,requestedAt:new Date,onResult:i}}),t.type==="Mutation"?this.inflightMutationsCount++:t.type==="Action"&&this.inflightActionsCount++});return this.markConnectionStateDirty(),s}onResponse(t){const r=this.inflightRequests.get(t.requestId);if(r===void 0||r.status.status==="Completed")return null;const s=r.message.type==="Mutation"?"mutation":"action",i=r.message.udfPath;for(const h of t.logLines)Mu(this.logger,"info",s,i,h);const c=r.status;let u,f;if(t.success)u={success:!0,logLines:t.logLines,value:Da(t.result)},f=()=>c.onResult(u);else{const h=t.result,{errorData:p}=t;Mu(this.logger,"error",s,i,h),u={success:!1,errorMessage:h,errorData:p!==void 0?Da(p):void 0,logLines:t.logLines},f=()=>c.onResult(u)}return t.type==="ActionResponse"||!t.success?(f(),this.inflightRequests.delete(t.requestId),this.requestsOlderThanRestart.delete(t.requestId),r.message.type==="Action"?this.inflightActionsCount--:r.message.type==="Mutation"&&this.inflightMutationsCount--,this.markConnectionStateDirty(),{requestId:t.requestId,result:u}):(r.status={status:"Completed",result:u,ts:t.ts,onResolve:f},null)}removeCompleted(t){const r=new Map;for(const[s,i]of this.inflightRequests.entries()){const c=i.status;c.status==="Completed"&&c.ts.lessThanOrEqual(t)&&(c.onResolve(),r.set(s,c.result),i.message.type==="Mutation"?this.inflightMutationsCount--:i.message.type==="Action"&&this.inflightActionsCount--,this.inflightRequests.delete(s),this.requestsOlderThanRestart.delete(s))}return r.size>0&&this.markConnectionStateDirty(),r}restart(){this.requestsOlderThanRestart=new Set(this.inflightRequests.keys());const t=[];for(const[r,s]of this.inflightRequests){if(s.status.status==="NotSent"){s.status.status="Requested",t.push(s.message);continue}if(s.message.type==="Mutation")t.push(s.message);else if(s.message.type==="Action"){if(this.inflightRequests.delete(r),this.requestsOlderThanRestart.delete(r),this.inflightActionsCount--,s.status.status==="Completed")throw new Error("Action should never be in 'Completed' state");s.status.onResult({success:!1,errorMessage:"Connection lost while action was in flight",logLines:[]})}}return this.markConnectionStateDirty(),t}resume(){const t=[];for(const[,r]of this.inflightRequests)if(r.status.status==="NotSent"){r.status.status="Requested",t.push(r.message);continue}return t}hasIncompleteRequests(){for(const t of this.inflightRequests.values())if(t.status.status==="Requested")return!0;return!1}hasInflightRequests(){return this.inflightRequests.size>0}hasSyncedPastLastReconnect(){return this.requestsOlderThanRestart.size===0}timeOfOldestInflightRequest(){if(this.inflightRequests.size===0)return null;let t=Date.now();for(const r of this.inflightRequests.values())r.status.status!=="Completed"&&r.status.requestedAt.getTime()<t&&(t=r.status.requestedAt.getTime());return new Date(t)}inflightMutations(){return this.inflightMutationsCount}inflightActions(){return this.inflightActionsCount}}const fc=Symbol.for("functionName"),x1=Symbol.for("toReferencePath");function Fj(e){return e[x1]??null}function Vj(e){return e.startsWith("function://")}function Hj(e){let t;if(typeof e=="string")Vj(e)?t={functionHandle:e}:t={name:e};else if(e[fc])t={name:e[fc]};else{const r=Fj(e);if(!r)throw new Error(`${e} is not a functionReference`);t={reference:r}}return t}function on(e){const t=Hj(e);if(t.name===void 0)throw t.functionHandle!==void 0?new Error(`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${t.functionHandle}`):t.reference!==void 0?new Error(`Expected function reference in the current component like "api.file.func" or "internal.file.func", but received reference ${t.reference}`):new Error(`Expected function reference like "api.file.func" or "internal.file.func", but received ${JSON.stringify(t)}`);if(typeof e=="string")return e;const r=e[fc];if(!r)throw new Error(`${e} is not a functionReference`);return r}function _1(e){return{[fc]:e}}function C1(e=[]){const t={get(r,s){if(typeof s=="string"){const i=[...e,s];return C1(i)}else if(s===fc){if(e.length<2){const u=["api",...e].join(".");throw new Error(`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${u}\``)}const i=e.slice(0,-1).join("/"),c=e[e.length-1];return c==="default"?i:i+":"+c}else return s===Symbol.toStringTag?"FunctionReference":void 0}};return new Proxy({},t)}const Zj=C1();var Qj=Object.defineProperty,Gj=(e,t,r)=>t in e?Qj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nu=(e,t,r)=>Gj(e,typeof t!="symbol"?t+"":t,r);class dc{constructor(t){Nu(this,"queryResults"),Nu(this,"modifiedQueries"),this.queryResults=t,this.modifiedQueries=[]}getQuery(t,...r){const s=Lr(r[0]),i=on(t),c=this.queryResults.get(fs(i,s));if(c!==void 0)return dc.queryValue(c.result)}getAllQueries(t){const r=[],s=on(t);for(const i of this.queryResults.values())i.udfPath===ms(s)&&r.push({args:i.args,value:dc.queryValue(i.result)});return r}setQuery(t,r,s){const i=Lr(r),c=on(t),u=fs(c,i);let f;s===void 0?f=void 0:f={success:!0,value:s,logLines:[]};const h={udfPath:c,args:i,result:f};this.queryResults.set(u,h),this.modifiedQueries.push(u)}static queryValue(t){if(t!==void 0)return t.success?t.value:void 0}}class Yj{constructor(){Nu(this,"queryResults"),Nu(this,"optimisticUpdates"),this.queryResults=new Map,this.optimisticUpdates=[]}ingestQueryResultsFromServer(t,r){this.optimisticUpdates=this.optimisticUpdates.filter(u=>!r.has(u.mutationId));const s=this.queryResults;this.queryResults=new Map(t);const i=new dc(this.queryResults);for(const u of this.optimisticUpdates)u.update(i);const c=[];for(const[u,f]of this.queryResults){const h=s.get(u);(h===void 0||h.result!==f.result)&&c.push(u)}return c}applyOptimisticUpdate(t,r){this.optimisticUpdates.push({update:t,mutationId:r});const s=new dc(this.queryResults);return t(s),s.modifiedQueries}rawQueryResult(t){const r=this.queryResults.get(t);if(r!==void 0)return r.result}queryResult(t){const r=this.queryResults.get(t);if(r===void 0)return;const s=r.result;if(s!==void 0){if(s.success)return s.value;throw s.errorData!==void 0?Gp(s,new Qp(wa("query",r.udfPath,s))):new Error(wa("query",r.udfPath,s))}}hasQueryResult(t){return this.queryResults.get(t)!==void 0}queryLogs(t){return this.queryResults.get(t)?.result?.logLines}}var Kj=Object.defineProperty,Xj=(e,t,r)=>t in e?Kj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mp=(e,t,r)=>Xj(e,typeof t!="symbol"?t+"":t,r);class rn{constructor(t,r){mp(this,"low"),mp(this,"high"),mp(this,"__isUnsignedLong__"),this.low=t|0,this.high=r|0,this.__isUnsignedLong__=!0}static isLong(t){return(t&&t.__isUnsignedLong__)===!0}static fromBytesLE(t){return new rn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24)}toBytesLE(){const t=this.high,r=this.low;return[r&255,r>>>8&255,r>>>16&255,r>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]}static fromNumber(t){return isNaN(t)||t<0?xw:t>=Jj?Wj:new rn(t%rc|0,t/rc|0)}toString(){return(BigInt(this.high)*BigInt(rc)+BigInt(this.low)).toString()}equals(t){return rn.isLong(t)||(t=rn.fromValue(t)),this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low}notEquals(t){return!this.equals(t)}comp(t){return rn.isLong(t)||(t=rn.fromValue(t)),this.equals(t)?0:t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1}lessThanOrEqual(t){return this.comp(t)<=0}static fromValue(t){return typeof t=="number"?rn.fromNumber(t):new rn(t.low,t.high)}}const xw=new rn(0,0),_w=65536,rc=_w*_w,Jj=rc*rc,Wj=new rn(-1,-1);var ez=Object.defineProperty,tz=(e,t,r)=>t in e?ez(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jl=(e,t,r)=>tz(e,typeof t!="symbol"?t+"":t,r);class Cw{constructor(t,r){Jl(this,"version"),Jl(this,"remoteQuerySet"),Jl(this,"queryPath"),Jl(this,"logger"),this.version={querySet:0,ts:rn.fromNumber(0),identity:0},this.remoteQuerySet=new Map,this.queryPath=t,this.logger=r}transition(t){const r=t.startVersion;if(this.version.querySet!==r.querySet||this.version.ts.notEquals(r.ts)||this.version.identity!==r.identity)throw new Error(`Invalid start version: ${r.ts.toString()}:${r.querySet}:${r.identity}, transitioning from ${this.version.ts.toString()}:${this.version.querySet}:${this.version.identity}`);for(const s of t.modifications)switch(s.type){case"QueryUpdated":{const i=this.queryPath(s.queryId);if(i)for(const u of s.logLines)Mu(this.logger,"info","query",i,u);const c=Da(s.value??null);this.remoteQuerySet.set(s.queryId,{success:!0,value:c,logLines:s.logLines});break}case"QueryFailed":{const i=this.queryPath(s.queryId);if(i)for(const u of s.logLines)Mu(this.logger,"info","query",i,u);const{errorData:c}=s;this.remoteQuerySet.set(s.queryId,{success:!1,errorMessage:s.errorMessage,errorData:c!==void 0?Da(c):void 0,logLines:s.logLines});break}case"QueryRemoved":{this.remoteQuerySet.delete(s.queryId);break}default:throw new Error(`Invalid modification ${s.type}`)}this.version=t.endVersion}remoteQueryResults(){return this.remoteQuerySet}timestamp(){return this.version.ts}}function gp(e){const t=cc(e);return rn.fromBytesLE(Array.from(t))}function nz(e){const t=new Uint8Array(e.toBytesLE());return lc(t)}function Ew(e){switch(e.type){case"FatalError":case"AuthError":case"ActionResponse":case"TransitionChunk":case"Ping":return{...e};case"MutationResponse":return e.success?{...e,ts:gp(e.ts)}:{...e};case"Transition":return{...e,startVersion:{...e.startVersion,ts:gp(e.startVersion.ts)},endVersion:{...e.endVersion,ts:gp(e.endVersion.ts)}}}}function rz(e){switch(e.type){case"Authenticate":case"ModifyQuerySet":case"Mutation":case"Action":case"Event":return{...e};case"Connect":return e.maxObservedTimestamp!==void 0?{...e,maxObservedTimestamp:nz(e.maxObservedTimestamp)}:{...e,maxObservedTimestamp:void 0}}}var oz=Object.defineProperty,sz=(e,t,r)=>t in e?oz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_t=(e,t,r)=>sz(e,typeof t!="symbol"?t+"":t,r);const az=1e3,iz=1001,cz=1005,lz=4040;let pu;function va(){return pu===void 0&&(pu=Date.now()),typeof performance>"u"||!performance.now?Date.now():Math.round(pu+performance.now())}function Rw(){return`t=${Math.round((va()-pu)/100)/10}s`}const E1={InternalServerError:{timeout:1e3},SubscriptionsWorkerFullError:{timeout:3e3},TooManyConcurrentRequests:{timeout:3e3},CommitterFullError:{timeout:3e3},AwsTooManyRequestsException:{timeout:3e3},ExecuteFullError:{timeout:3e3},SystemTimeoutError:{timeout:3e3},ExpiredInQueue:{timeout:3e3},VectorIndexesUnavailable:{timeout:1e3},SearchIndexesUnavailable:{timeout:1e3},TableSummariesUnavailable:{timeout:1e3},VectorIndexTooLarge:{timeout:3e3},SearchIndexTooLarge:{timeout:3e3},TooManyWritesInTimePeriod:{timeout:3e3}};function uz(e){if(e===void 0)return"Unknown";for(const t of Object.keys(E1))if(e.startsWith(t))return t;return"Unknown"}class fz{constructor(t,r,s,i,c,u){this.markConnectionStateDirty=c,this.debug=u,_t(this,"socket"),_t(this,"connectionCount"),_t(this,"_hasEverConnected",!1),_t(this,"lastCloseReason"),_t(this,"transitionChunkBuffer",null),_t(this,"defaultInitialBackoff"),_t(this,"maxBackoff"),_t(this,"retries"),_t(this,"serverInactivityThreshold"),_t(this,"reconnectDueToServerInactivityTimeout"),_t(this,"scheduledReconnect",null),_t(this,"networkOnlineHandler",null),_t(this,"pendingNetworkRecoveryInfo",null),_t(this,"uri"),_t(this,"onOpen"),_t(this,"onResume"),_t(this,"onMessage"),_t(this,"webSocketConstructor"),_t(this,"logger"),_t(this,"onServerDisconnectError"),this.webSocketConstructor=s,this.socket={state:"disconnected"},this.connectionCount=0,this.lastCloseReason="InitialConnect",this.defaultInitialBackoff=1e3,this.maxBackoff=16e3,this.retries=0,this.serverInactivityThreshold=6e4,this.reconnectDueToServerInactivityTimeout=null,this.uri=t,this.onOpen=r.onOpen,this.onResume=r.onResume,this.onMessage=r.onMessage,this.onServerDisconnectError=r.onServerDisconnectError,this.logger=i,this.setupNetworkListener(),this.connect()}setSocketState(t){this.socket=t,this._logVerbose(`socket state changed: ${this.socket.state}, paused: ${"paused"in this.socket?this.socket.paused:void 0}`),this.markConnectionStateDirty()}setupNetworkListener(){typeof window>"u"||typeof window.addEventListener!="function"||this.networkOnlineHandler===null&&(this.networkOnlineHandler=()=>{this._logVerbose("network online event detected"),this.tryReconnectImmediately()},window.addEventListener("online",this.networkOnlineHandler),this._logVerbose("network online event listener registered"))}cleanupNetworkListener(){this.networkOnlineHandler&&typeof window<"u"&&typeof window.removeEventListener=="function"&&(window.removeEventListener("online",this.networkOnlineHandler),this.networkOnlineHandler=null,this._logVerbose("network online event listener removed"))}assembleTransition(t){if(t.partNumber<0||t.partNumber>=t.totalParts||t.totalParts===0||this.transitionChunkBuffer&&(this.transitionChunkBuffer.totalParts!==t.totalParts||this.transitionChunkBuffer.transitionId!==t.transitionId))throw this.transitionChunkBuffer=null,new Error("Invalid TransitionChunk");if(this.transitionChunkBuffer===null&&(this.transitionChunkBuffer={chunks:[],totalParts:t.totalParts,transitionId:t.transitionId}),t.partNumber!==this.transitionChunkBuffer.chunks.length){const r=this.transitionChunkBuffer.chunks.length;throw this.transitionChunkBuffer=null,new Error(`TransitionChunk received out of order: expected part ${r}, got ${t.partNumber}`)}if(this.transitionChunkBuffer.chunks.push(t.chunk),this.transitionChunkBuffer.chunks.length===t.totalParts){const r=this.transitionChunkBuffer.chunks.join("");this.transitionChunkBuffer=null;const s=Ew(JSON.parse(r));if(s.type!=="Transition")throw new Error(`Expected Transition, got ${s.type} after assembling chunks`);return s}return null}connect(){if(this.socket.state==="terminated")return;if(this.socket.state!=="disconnected"&&this.socket.state!=="stopped")throw new Error("Didn't start connection from disconnected state: "+this.socket.state);const t=new this.webSocketConstructor(this.uri);this._logVerbose("constructed WebSocket"),this.setSocketState({state:"connecting",ws:t,paused:"no"}),this.resetServerInactivityTimeout(),t.onopen=()=>{if(this.logger.logVerbose("begin ws.onopen"),this.socket.state!=="connecting")throw new Error("onopen called with socket not in connecting state");if(this.setSocketState({state:"ready",ws:t,paused:this.socket.paused==="yes"?"uninitialized":"no"}),this.resetServerInactivityTimeout(),this.socket.paused==="no"&&(this._hasEverConnected=!0,this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:va()})),this.lastCloseReason!=="InitialConnect"&&(this.lastCloseReason?this.logger.log("WebSocket reconnected at",Rw(),"after disconnect due to",this.lastCloseReason):this.logger.log("WebSocket reconnected at",Rw())),this.connectionCount+=1,this.lastCloseReason=null,this.pendingNetworkRecoveryInfo!==null){const{timeSavedMs:r}=this.pendingNetworkRecoveryInfo;this.pendingNetworkRecoveryInfo=null,this.sendMessage({type:"Event",eventType:"NetworkRecoveryReconnect",event:{timeSavedMs:r}}),this.logger.log(`Network recovery reconnect saved ~${Math.round(r/1e3)}s of waiting`)}},t.onerror=r=>{this.transitionChunkBuffer=null;const s=r.message;s&&this.logger.log(`WebSocket error message: ${s}`)},t.onmessage=r=>{this.resetServerInactivityTimeout();const s=r.data.length;let i=Ew(JSON.parse(r.data));if(this._logVerbose(`received ws message with type ${i.type}`),i.type==="Ping")return;if(i.type==="TransitionChunk"){const u=this.assembleTransition(i);if(!u)return;i=u,this._logVerbose(`assembled full ws message of type ${i.type}`)}this.transitionChunkBuffer!==null&&(this.transitionChunkBuffer=null,this.logger.log(`Received unexpected ${i.type} while buffering TransitionChunks`)),i.type==="Transition"&&this.reportLargeTransition({messageLength:s,transition:i}),this.onMessage(i).hasSyncedPastLastReconnect&&(this.retries=0,this.markConnectionStateDirty())},t.onclose=r=>{if(this._logVerbose("begin ws.onclose"),this.transitionChunkBuffer=null,this.lastCloseReason===null&&(this.lastCloseReason=r.reason||`closed with code ${r.code}`),r.code!==az&&r.code!==iz&&r.code!==cz&&r.code!==lz){let i=`WebSocket closed with code ${r.code}`;r.reason&&(i+=`: ${r.reason}`),this.logger.log(i),this.onServerDisconnectError&&r.reason&&this.onServerDisconnectError(i)}const s=uz(r.reason);this.scheduleReconnect(s)}}socketState(){return this.socket.state}sendMessage(t){const r={type:t.type,...t.type==="Authenticate"&&t.tokenType==="User"?{value:`...${t.value.slice(-7)}`}:{}};if(this.socket.state==="ready"&&this.socket.paused==="no"){const s=rz(t),i=JSON.stringify(s);let c=!1;try{this.socket.ws.send(i),c=!0}catch(u){this.logger.log(`Failed to send message on WebSocket, reconnecting: ${u}`),this.closeAndReconnect("FailedToSendMessage")}return this._logVerbose(`${c?"sent":"failed to send"} message with type ${t.type}: ${JSON.stringify(r)}`),!0}return this._logVerbose(`message not sent (socket state: ${this.socket.state}, paused: ${"paused"in this.socket?this.socket.paused:void 0}): ${JSON.stringify(r)}`),!1}resetServerInactivityTimeout(){this.socket.state!=="terminated"&&(this.reconnectDueToServerInactivityTimeout!==null&&(clearTimeout(this.reconnectDueToServerInactivityTimeout),this.reconnectDueToServerInactivityTimeout=null),this.reconnectDueToServerInactivityTimeout=setTimeout(()=>{this.closeAndReconnect("InactiveServer")},this.serverInactivityThreshold))}scheduleReconnect(t){this.scheduledReconnect&&(clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null),this.socket={state:"disconnected"};const r=this.nextBackoff(t);this.markConnectionStateDirty(),this.logger.log(`Attempting reconnect in ${Math.round(r)}ms`);const s=va(),i=setTimeout(()=>{this.scheduledReconnect?.timeout===i&&(this.scheduledReconnect=null,this.connect())},r);this.scheduledReconnect={timeout:i,scheduledAt:s,backoffMs:r}}closeAndReconnect(t){switch(this._logVerbose(`begin closeAndReconnect with reason ${t}`),this.socket.state){case"disconnected":case"terminated":case"stopped":return;case"connecting":case"ready":{this.lastCloseReason=t,this.close(),this.scheduleReconnect("client");return}default:this.socket}}close(){switch(this.transitionChunkBuffer=null,this.socket.state){case"disconnected":case"terminated":case"stopped":return Promise.resolve();case"connecting":{const t=this.socket.ws;return t.onmessage=r=>{this._logVerbose("Ignoring message received after close")},new Promise(r=>{t.onclose=()=>{this._logVerbose("Closed after connecting"),r()},t.onopen=()=>{this._logVerbose("Opened after connecting"),t.close()}})}case"ready":{this._logVerbose("ws.close called");const t=this.socket.ws;t.onmessage=s=>{this._logVerbose("Ignoring message received after close")};const r=new Promise(s=>{t.onclose=()=>{s()}});return t.close(),r}default:return this.socket,Promise.resolve()}}terminate(){switch(this.reconnectDueToServerInactivityTimeout&&clearTimeout(this.reconnectDueToServerInactivityTimeout),this.scheduledReconnect&&(clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null),this.cleanupNetworkListener(),this.socket.state){case"terminated":case"stopped":case"disconnected":case"connecting":case"ready":{const t=this.close();return this.setSocketState({state:"terminated"}),t}default:throw this.socket,new Error(`Invalid websocket state: ${this.socket.state}`)}}stop(){switch(this.socket.state){case"terminated":return Promise.resolve();case"connecting":case"stopped":case"disconnected":case"ready":{this.cleanupNetworkListener();const t=this.close();return this.socket={state:"stopped"},t}default:return this.socket,Promise.resolve()}}tryRestart(){switch(this.socket.state){case"stopped":break;case"terminated":case"connecting":case"ready":case"disconnected":this.logger.logVerbose("Restart called without stopping first");return;default:this.socket}this.setupNetworkListener(),this.connect()}pause(){switch(this.socket.state){case"disconnected":case"stopped":case"terminated":return;case"connecting":case"ready":{this.socket={...this.socket,paused:"yes"};return}default:{this.socket;return}}}tryReconnectImmediately(){if(this._logVerbose("tryReconnectImmediately called"),this.socket.state!=="disconnected"){this._logVerbose(`tryReconnectImmediately called but socket state is ${this.socket.state}, no action taken`);return}let t=null;if(this.scheduledReconnect){const r=va()-this.scheduledReconnect.scheduledAt;t=Math.max(0,this.scheduledReconnect.backoffMs-r),this._logVerbose(`would have waited ${Math.round(t)}ms more (backoff was ${Math.round(this.scheduledReconnect.backoffMs)}ms, elapsed ${Math.round(r)}ms)`),clearTimeout(this.scheduledReconnect.timeout),this.scheduledReconnect=null,this._logVerbose("canceled scheduled reconnect")}this.logger.log("Network recovery detected, reconnecting immediately"),this.pendingNetworkRecoveryInfo=t!==null?{timeSavedMs:t}:null,this.connect()}resume(){switch(this.socket.state){case"connecting":this.socket={...this.socket,paused:"no"};return;case"ready":this.socket.paused==="uninitialized"?(this.socket={...this.socket,paused:"no"},this.onOpen({connectionCount:this.connectionCount,lastCloseReason:this.lastCloseReason,clientTs:va()})):this.socket.paused==="yes"&&(this.socket={...this.socket,paused:"no"},this.onResume());return;case"terminated":case"stopped":case"disconnected":return;default:this.socket}this.connect()}connectionState(){return{isConnected:this.socket.state==="ready",hasEverConnected:this._hasEverConnected,connectionCount:this.connectionCount,connectionRetries:this.retries}}_logVerbose(t){this.logger.logVerbose(t)}nextBackoff(t){const s=(t==="client"?100:t==="Unknown"?this.defaultInitialBackoff:E1[t].timeout)*Math.pow(2,this.retries);this.retries+=1;const i=Math.min(s,this.maxBackoff),c=i*(Math.random()-.5);return i+c}reportLargeTransition({transition:t,messageLength:r}){if(t.clientClockSkew===void 0||t.serverTs===void 0)return;const s=va()-t.clientClockSkew-t.serverTs/1e6,i=`${Math.round(s)}ms`,c=`${Math.round(r/1e4)/100}MB`,u=r/(s/1e3),f=`${Math.round(u/1e4)/100}MB per second`;this._logVerbose(`received ${c} transition in ${i} at ${f}`),r>2e7?this.logger.log(`received query results totaling more that 20MB (${c}) which will take a long time to download on slower connections`):s>2e4&&this.logger.log(`received query results totaling ${c} which took more than 20s to arrive (${i})`),this.debug&&this.sendMessage({type:"Event",eventType:"ClientReceivedTransition",event:{transitionTransitTime:s,messageLength:r}})}}function dz(){return hz()}function hz(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}class Yi extends Error{}Yi.prototype.name="InvalidTokenError";function pz(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let s=r.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s}))}function mz(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return pz(t)}catch{return atob(t)}}function R1(e,t){if(typeof e!="string")throw new Yi("Invalid token specified: must be a string");t||(t={});const r=t.header===!0?0:1,s=e.split(".")[r];if(typeof s!="string")throw new Yi(`Invalid token specified: missing part #${r+1}`);let i;try{i=mz(s)}catch(c){throw new Yi(`Invalid token specified: invalid base64 for part #${r+1} (${c.message})`)}try{return JSON.parse(i)}catch(c){throw new Yi(`Invalid token specified: invalid json for part #${r+1} (${c.message})`)}}var gz=Object.defineProperty,yz=(e,t,r)=>t in e?gz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nn=(e,t,r)=>yz(e,typeof t!="symbol"?t+"":t,r);const vz=480*60*60*1e3,Tw=2;class bz{constructor(t,r,s){Nn(this,"authState",{state:"noAuth"}),Nn(this,"configVersion",0),Nn(this,"syncState"),Nn(this,"authenticate"),Nn(this,"stopSocket"),Nn(this,"tryRestartSocket"),Nn(this,"pauseSocket"),Nn(this,"resumeSocket"),Nn(this,"clearAuth"),Nn(this,"logger"),Nn(this,"refreshTokenLeewaySeconds"),Nn(this,"tokenConfirmationAttempts",0),this.syncState=t,this.authenticate=r.authenticate,this.stopSocket=r.stopSocket,this.tryRestartSocket=r.tryRestartSocket,this.pauseSocket=r.pauseSocket,this.resumeSocket=r.resumeSocket,this.clearAuth=r.clearAuth,this.logger=s.logger,this.refreshTokenLeewaySeconds=s.refreshTokenLeewaySeconds}async setConfig(t,r){this.resetAuthState(),this._logVerbose("pausing WS for auth token fetch"),this.pauseSocket();const s=await this.fetchTokenAndGuardAgainstRace(t,{forceRefreshToken:!1});s.isFromOutdatedConfig||(s.value?(this.setAuthState({state:"waitingForServerConfirmationOfCachedToken",config:{fetchToken:t,onAuthChange:r},hasRetried:!1}),this.authenticate(s.value)):(this.setAuthState({state:"initialRefetch",config:{fetchToken:t,onAuthChange:r}}),await this.refetchToken()),this._logVerbose("resuming WS after auth token fetch"),this.resumeSocket())}onTransition(t){if(this.syncState.isCurrentOrNewerAuthVersion(t.endVersion.identity)&&!(t.endVersion.identity<=t.startVersion.identity)){if(this.authState.state==="waitingForServerConfirmationOfCachedToken"){this._logVerbose("server confirmed auth token is valid"),this.refetchToken(),this.authState.config.onAuthChange(!0);return}this.authState.state==="waitingForServerConfirmationOfFreshToken"&&(this._logVerbose("server confirmed new auth token is valid"),this.scheduleTokenRefetch(this.authState.token),this.tokenConfirmationAttempts=0,this.authState.hadAuth||this.authState.config.onAuthChange(!0))}}onAuthError(t){if(t.authUpdateAttempted===!1&&(this.authState.state==="waitingForServerConfirmationOfFreshToken"||this.authState.state==="waitingForServerConfirmationOfCachedToken")){this._logVerbose("ignoring non-auth token expired error");return}const{baseVersion:r}=t;if(!this.syncState.isCurrentOrNewerAuthVersion(r+1)){this._logVerbose("ignoring auth error for previous auth attempt");return}this.tryToReauthenticate(t)}async tryToReauthenticate(t){if(this._logVerbose(`attempting to reauthenticate: ${t.error}`),this.authState.state==="noAuth"||this.authState.state==="waitingForServerConfirmationOfFreshToken"&&this.tokenConfirmationAttempts>=Tw){this.logger.error(`Failed to authenticate: "${t.error}", check your server auth config`),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.authState.state!=="noAuth"&&this.setAndReportAuthFailed(this.authState.config.onAuthChange);return}this.authState.state==="waitingForServerConfirmationOfFreshToken"&&(this.tokenConfirmationAttempts++,this._logVerbose(`retrying reauthentication, ${Tw-this.tokenConfirmationAttempts} attempts remaining`)),await this.stopSocket();const r=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});r.isFromOutdatedConfig||(r.value&&this.syncState.isNewAuth(r.value)?(this.authenticate(r.value),this.setAuthState({state:"waitingForServerConfirmationOfFreshToken",config:this.authState.config,token:r.value,hadAuth:this.authState.state==="notRefetching"||this.authState.state==="waitingForScheduledRefetch"})):(this._logVerbose("reauthentication failed, could not fetch a new token"),this.syncState.hasAuth()&&this.syncState.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this.tryRestartSocket())}async refetchToken(){if(this.authState.state==="noAuth")return;this._logVerbose("refetching auth token");const t=await this.fetchTokenAndGuardAgainstRace(this.authState.config.fetchToken,{forceRefreshToken:!0});t.isFromOutdatedConfig||(t.value?this.syncState.isNewAuth(t.value)?(this.setAuthState({state:"waitingForServerConfirmationOfFreshToken",hadAuth:this.syncState.hasAuth(),token:t.value,config:this.authState.config}),this.authenticate(t.value)):this.setAuthState({state:"notRefetching",config:this.authState.config}):(this._logVerbose("refetching token failed"),this.syncState.hasAuth()&&this.clearAuth(),this.setAndReportAuthFailed(this.authState.config.onAuthChange)),this._logVerbose("restarting WS after auth token fetch (if currently stopped)"),this.tryRestartSocket())}scheduleTokenRefetch(t){if(this.authState.state==="noAuth")return;const r=this.decodeToken(t);if(!r){this.logger.error("Auth token is not a valid JWT, cannot refetch the token");return}const{iat:s,exp:i}=r;if(!s||!i){this.logger.error("Auth token does not have required fields, cannot refetch the token");return}const c=i-s;if(c<=2){this.logger.error("Auth token does not live long enough, cannot refetch the token");return}let u=Math.min(vz,(c-this.refreshTokenLeewaySeconds)*1e3);u<=0&&(this.logger.warn(`Refetching auth token immediately, configured leeway ${this.refreshTokenLeewaySeconds}s is larger than the token's lifetime ${c}s`),u=0);const f=setTimeout(()=>{this._logVerbose("running scheduled token refetch"),this.refetchToken()},u);this.setAuthState({state:"waitingForScheduledRefetch",refetchTokenTimeoutId:f,config:this.authState.config}),this._logVerbose(`scheduled preemptive auth token refetching in ${u}ms`)}async fetchTokenAndGuardAgainstRace(t,r){const s=++this.configVersion;this._logVerbose(`fetching token with config version ${s}`);const i=await t(r);return this.configVersion!==s?(this._logVerbose(`stale config version, expected ${s}, got ${this.configVersion}`),{isFromOutdatedConfig:!0}):{isFromOutdatedConfig:!1,value:i}}stop(){this.resetAuthState(),this.configVersion++,this._logVerbose(`config version bumped to ${this.configVersion}`)}setAndReportAuthFailed(t){t(!1),this.resetAuthState()}resetAuthState(){this.setAuthState({state:"noAuth"})}setAuthState(t){const r=t.state==="waitingForServerConfirmationOfFreshToken"?{hadAuth:t.hadAuth,state:t.state,token:`...${t.token.slice(-7)}`}:{state:t.state};switch(this._logVerbose(`setting auth state to ${JSON.stringify(r)}`),t.state){case"waitingForScheduledRefetch":case"notRefetching":case"noAuth":this.tokenConfirmationAttempts=0;break}this.authState.state==="waitingForScheduledRefetch"&&(clearTimeout(this.authState.refetchTokenTimeoutId),this.syncState.markAuthCompletion()),this.authState=t}decodeToken(t){try{return R1(t)}catch(r){return this._logVerbose(`Error decoding token: ${r instanceof Error?r.message:"Unknown error"}`),null}}_logVerbose(t){this.logger.logVerbose(`${t} [v${this.configVersion}]`)}}const wz=["convexClientConstructed","convexWebSocketOpen","convexFirstMessageReceived"];function Sz(e,t){const r={sessionId:t};typeof performance>"u"||!performance.mark||performance.mark(e,{detail:r})}function xz(e){let t=e.name.slice(6);return t=t.charAt(0).toLowerCase()+t.slice(1),{name:t,startTime:e.startTime}}function _z(e){if(typeof performance>"u"||!performance.getEntriesByName)return[];const t=[];for(const r of wz){const s=performance.getEntriesByName(r).filter(i=>i.entryType==="mark").filter(i=>i.detail.sessionId===e);t.push(...s)}return t.map(xz)}var Cz=Object.defineProperty,Ez=(e,t,r)=>t in e?Cz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ct=(e,t,r)=>Ez(e,typeof t!="symbol"?t+"":t,r);class Rz{constructor(t,r,s){if(Ct(this,"address"),Ct(this,"state"),Ct(this,"requestManager"),Ct(this,"webSocketManager"),Ct(this,"authenticationManager"),Ct(this,"remoteQuerySet"),Ct(this,"optimisticQueryResults"),Ct(this,"_transitionHandlerCounter",0),Ct(this,"_nextRequestId"),Ct(this,"_onTransitionFns",new Map),Ct(this,"_sessionId"),Ct(this,"firstMessageReceived",!1),Ct(this,"debug"),Ct(this,"logger"),Ct(this,"maxObservedTimestamp"),Ct(this,"connectionStateSubscribers",new Map),Ct(this,"nextConnectionStateSubscriberId",0),Ct(this,"_lastPublishedConnectionState"),Ct(this,"markConnectionStateDirty",()=>{Promise.resolve().then(()=>{const _=this.connectionState();if(JSON.stringify(_)!==JSON.stringify(this._lastPublishedConnectionState)){this._lastPublishedConnectionState=_;for(const E of this.connectionStateSubscribers.values())E(_)}})}),Ct(this,"mark",_=>{this.debug&&Sz(_,this.sessionId)}),typeof t=="object")throw new Error("Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly.");s?.skipConvexDeploymentUrlCheck!==!0&&vj(t),s={...s};const i=s.authRefreshTokenLeewaySeconds??2;let c=s.webSocketConstructor;if(!c&&typeof WebSocket>"u")throw new Error("No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient");c=c||WebSocket,this.debug=s.reportDebugInfoToConvex??!1,this.address=t,this.logger=s.logger===!1?S1({verbose:s.verbose??!1}):s.logger!==!0&&s.logger?s.logger:w1({verbose:s.verbose??!1});const u=t.search("://");if(u===-1)throw new Error("Provided address was not an absolute URL.");const f=t.substring(u+3),h=t.substring(0,u);let p;if(h==="http")p="ws";else if(h==="https")p="wss";else throw new Error(`Unknown parent protocol ${h}`);const y=`${p}://${f}/api/${bw}/sync`;this.state=new $j,this.remoteQuerySet=new Cw(_=>this.state.queryPath(_),this.logger),this.requestManager=new qj(this.logger,this.markConnectionStateDirty);const v=()=>{this.webSocketManager.pause(),this.state.pause()};this.authenticationManager=new bz(this.state,{authenticate:_=>{const E=this.state.setAuth(_);return this.webSocketManager.sendMessage(E),E.baseVersion},stopSocket:()=>this.webSocketManager.stop(),tryRestartSocket:()=>this.webSocketManager.tryRestart(),pauseSocket:v,resumeSocket:()=>this.webSocketManager.resume(),clearAuth:()=>{this.clearAuth()}},{logger:this.logger,refreshTokenLeewaySeconds:i}),this.optimisticQueryResults=new Yj,this.addOnTransitionHandler(_=>{r(_.queries.map(E=>E.token))}),this._nextRequestId=0,this._sessionId=dz();const{unsavedChangesWarning:b}=s;if(typeof window>"u"||typeof window.addEventListener>"u"){if(b===!0)throw new Error("unsavedChangesWarning requested, but window.addEventListener not found! Remove {unsavedChangesWarning: true} from Convex client options.")}else b!==!1&&window.addEventListener("beforeunload",_=>{if(this.requestManager.hasIncompleteRequests()){_.preventDefault();const E="Are you sure you want to leave? Your changes may not be saved.";return(_||window.event).returnValue=E,E}});this.webSocketManager=new fz(y,{onOpen:_=>{this.mark("convexWebSocketOpen"),this.webSocketManager.sendMessage({..._,type:"Connect",sessionId:this._sessionId,maxObservedTimestamp:this.maxObservedTimestamp});const E=new Set(this.remoteQuerySet.remoteQueryResults().keys());this.remoteQuerySet=new Cw(O=>this.state.queryPath(O),this.logger);const[x,C]=this.state.restart(E);C&&this.webSocketManager.sendMessage(C),this.webSocketManager.sendMessage(x);for(const O of this.requestManager.restart())this.webSocketManager.sendMessage(O)},onResume:()=>{const[_,E]=this.state.resume();E&&this.webSocketManager.sendMessage(E),_&&this.webSocketManager.sendMessage(_);for(const x of this.requestManager.resume())this.webSocketManager.sendMessage(x)},onMessage:_=>{switch(this.firstMessageReceived||(this.firstMessageReceived=!0,this.mark("convexFirstMessageReceived"),this.reportMarks()),_.type){case"Transition":{this.observedTimestamp(_.endVersion.ts),this.authenticationManager.onTransition(_),this.remoteQuerySet.transition(_),this.state.transition(_);const E=this.requestManager.removeCompleted(this.remoteQuerySet.timestamp());this.notifyOnQueryResultChanges(E);break}case"MutationResponse":{_.success&&this.observedTimestamp(_.ts);const E=this.requestManager.onResponse(_);E!==null&&this.notifyOnQueryResultChanges(new Map([[E.requestId,E.result]]));break}case"ActionResponse":{this.requestManager.onResponse(_);break}case"AuthError":{this.authenticationManager.onAuthError(_);break}case"FatalError":{const E=Pj(this.logger,_.error);throw this.webSocketManager.terminate(),E}}return{hasSyncedPastLastReconnect:this.hasSyncedPastLastReconnect()}},onServerDisconnectError:s.onServerDisconnectError},c,this.logger,this.markConnectionStateDirty,this.debug),this.mark("convexClientConstructed"),s.expectAuth&&v()}hasSyncedPastLastReconnect(){return this.requestManager.hasSyncedPastLastReconnect()||this.state.hasSyncedPastLastReconnect()}observedTimestamp(t){(this.maxObservedTimestamp===void 0||this.maxObservedTimestamp.lessThanOrEqual(t))&&(this.maxObservedTimestamp=t)}getMaxObservedTimestamp(){return this.maxObservedTimestamp}notifyOnQueryResultChanges(t){const r=this.remoteQuerySet.remoteQueryResults(),s=new Map;for(const[c,u]of r){const f=this.state.queryToken(c);if(f!==null){const h={result:u,udfPath:this.state.queryPath(c),args:this.state.queryArgs(c)};s.set(f,h)}}const i=this.optimisticQueryResults.ingestQueryResultsFromServer(s,new Set(t.keys()));this.handleTransition({queries:i.map(c=>{const u=this.optimisticQueryResults.rawQueryResult(c);return{token:c,modification:{kind:"Updated",result:u}}}),reflectedMutations:Array.from(t).map(([c,u])=>({requestId:c,result:u})),timestamp:this.remoteQuerySet.timestamp()})}handleTransition(t){for(const r of this._onTransitionFns.values())r(t)}addOnTransitionHandler(t){const r=this._transitionHandlerCounter++;return this._onTransitionFns.set(r,t),()=>this._onTransitionFns.delete(r)}getCurrentAuthClaims(){const t=this.state.getAuth();let r={};if(t&&t.tokenType==="User")try{r=t?R1(t.value):{}}catch{r={}}else return;return{token:t.value,decoded:r}}setAuth(t,r){this.authenticationManager.setConfig(t,r)}hasAuth(){return this.state.hasAuth()}setAdminAuth(t,r){const s=this.state.setAdminAuth(t,r);this.webSocketManager.sendMessage(s)}clearAuth(){const t=this.state.clearAuth();this.webSocketManager.sendMessage(t)}subscribe(t,r,s){const i=Lr(r),{modification:c,queryToken:u,unsubscribe:f}=this.state.subscribe(t,i,s?.journal,s?.componentPath);return c!==null&&this.webSocketManager.sendMessage(c),{queryToken:u,unsubscribe:()=>{const h=f();h&&this.webSocketManager.sendMessage(h)}}}localQueryResult(t,r){const s=Lr(r),i=fs(t,s);return this.optimisticQueryResults.queryResult(i)}localQueryResultByToken(t){return this.optimisticQueryResults.queryResult(t)}hasLocalQueryResultByToken(t){return this.optimisticQueryResults.hasQueryResult(t)}localQueryLogs(t,r){const s=Lr(r),i=fs(t,s);return this.optimisticQueryResults.queryLogs(i)}queryJournal(t,r){const s=Lr(r),i=fs(t,s);return this.state.queryJournal(i)}connectionState(){const t=this.webSocketManager.connectionState();return{hasInflightRequests:this.requestManager.hasInflightRequests(),isWebSocketConnected:t.isConnected,hasEverConnected:t.hasEverConnected,connectionCount:t.connectionCount,connectionRetries:t.connectionRetries,timeOfOldestInflightRequest:this.requestManager.timeOfOldestInflightRequest(),inflightMutations:this.requestManager.inflightMutations(),inflightActions:this.requestManager.inflightActions()}}subscribeToConnectionState(t){const r=this.nextConnectionStateSubscriberId++;return this.connectionStateSubscribers.set(r,t),()=>{this.connectionStateSubscribers.delete(r)}}async mutation(t,r,s){const i=await this.mutationInternal(t,r,s);if(!i.success)throw i.errorData!==void 0?Gp(i,new Qp(wa("mutation",t,i))):new Error(wa("mutation",t,i));return i.value}async mutationInternal(t,r,s,i){const{mutationPromise:c}=this.enqueueMutation(t,r,s,i);return c}enqueueMutation(t,r,s,i){const c=Lr(r);this.tryReportLongDisconnect();const u=this.nextRequestId;if(this._nextRequestId++,s!==void 0){const y=s.optimisticUpdate;if(y!==void 0){const v=E=>{y(E,c)instanceof Promise&&this.logger.warn("Optimistic update handler returned a Promise. Optimistic updates should be synchronous.")},_=this.optimisticQueryResults.applyOptimisticUpdate(v,u).map(E=>{const x=this.localQueryResultByToken(E);return{token:E,modification:{kind:"Updated",result:x===void 0?void 0:{success:!0,value:x,logLines:[]}}}});this.handleTransition({queries:_,reflectedMutations:[],timestamp:this.remoteQuerySet.timestamp()})}}const f={type:"Mutation",requestId:u,udfPath:t,componentPath:i,args:[Gn(c)]},h=this.webSocketManager.sendMessage(f),p=this.requestManager.request(f,h);return{requestId:u,mutationPromise:p}}async action(t,r){const s=await this.actionInternal(t,r);if(!s.success)throw s.errorData!==void 0?Gp(s,new Qp(wa("action",t,s))):new Error(wa("action",t,s));return s.value}async actionInternal(t,r,s){const i=Lr(r),c=this.nextRequestId;this._nextRequestId++,this.tryReportLongDisconnect();const u={type:"Action",requestId:c,udfPath:t,componentPath:s,args:[Gn(i)]},f=this.webSocketManager.sendMessage(u);return this.requestManager.request(u,f)}async close(){return this.authenticationManager.stop(),this.webSocketManager.terminate()}get url(){return this.address}get nextRequestId(){return this._nextRequestId}get sessionId(){return this._sessionId}reportMarks(){if(this.debug){const t=_z(this.sessionId);this.webSocketManager.sendMessage({type:"Event",eventType:"ClientConnect",event:t})}}tryReportLongDisconnect(){if(!this.debug)return;const t=this.connectionState().timeOfOldestInflightRequest;if(t===null||Date.now()-t.getTime()<=60*1e3)return;const r=`${this.address}/api/debug_event`;fetch(r,{method:"POST",headers:{"Content-Type":"application/json","Convex-Client":`npm-${bw}`},body:JSON.stringify({event:"LongWebsocketDisconnect"})}).then(s=>{s.ok||this.logger.warn("Analytics request failed with response:",s.body)}).catch(s=>{this.logger.warn("Analytics response failed with error:",s)})}}function yp(e){if(typeof e!="object"||e===null||!Array.isArray(e.page)||typeof e.isDone!="boolean"||typeof e.continueCursor!="string")throw new Error(`Not a valid paginated query result: ${e?.toString()}`);return e}var Tz=Object.defineProperty,Az=(e,t,r)=>t in e?Tz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Aw=(e,t,r)=>Az(e,typeof t!="symbol"?t+"":t,r);class Oz{constructor(t,r){this.client=t,this.onTransition=r,Aw(this,"paginatedQuerySet",new Map),Aw(this,"lastTransitionTs"),this.lastTransitionTs=rn.fromNumber(0),this.client.addOnTransitionHandler(s=>this.onBaseTransition(s))}subscribe(t,r,s){const i=ms(t),c=Sw(i,r,s),u=()=>this.removePaginatedQuerySubscriber(c),f=this.paginatedQuerySet.get(c);return f?(f.numSubscribers+=1,{paginatedQueryToken:c,unsubscribe:u}):(this.paginatedQuerySet.set(c,{token:c,canonicalizedUdfPath:i,args:r,numSubscribers:1,options:{initialNumItems:s.initialNumItems},nextPageKey:0,pageKeys:[],pageKeyToQuery:new Map,ongoingSplits:new Map,skip:!1,id:s.id}),this.addPageToPaginatedQuery(c,null,s.initialNumItems),{paginatedQueryToken:c,unsubscribe:u})}localQueryResult(t,r,s){const i=ms(t),c=Sw(i,r,s);return this.localQueryResultByToken(c)}localQueryResultByToken(t){const r=this.paginatedQuerySet.get(t);if(!r)return;const s=this.activePageQueryTokens(r);if(s.length===0)return{results:[],status:"LoadingFirstPage",loadMore:h=>this.loadMoreOfPaginatedQuery(t,h)};let i=[],c=!1,u=!1;for(const h of s){const p=this.client.localQueryResultByToken(h);if(p===void 0){c=!0,u=!1;continue}const y=yp(p);i=i.concat(y.page),u=!!y.isDone}let f;return c?f=i.length===0?"LoadingFirstPage":"LoadingMore":u?f="Exhausted":f="CanLoadMore",{results:i,status:f,loadMore:h=>this.loadMoreOfPaginatedQuery(t,h)}}onBaseTransition(t){const r=t.queries.map(u=>u.token),s=this.queriesContainingTokens(r);let i=[];s.length>0&&(this.processPaginatedQuerySplits(s,u=>this.client.localQueryResultByToken(u)),i=s.map(u=>({token:u,modification:{kind:"Updated",result:this.localQueryResultByToken(u)}})));const c={...t,paginatedQueries:i};this.onTransition(c)}loadMoreOfPaginatedQuery(t,r){this.mustGetPaginatedQuery(t);const s=this.queryTokenForLastPageOfPaginatedQuery(t),i=this.client.localQueryResultByToken(s);if(!i)return!1;const c=yp(i);if(c.isDone)return!1;this.addPageToPaginatedQuery(t,c.continueCursor,r);const u={timestamp:this.lastTransitionTs,reflectedMutations:[],queries:[],paginatedQueries:[{token:t,modification:{kind:"Updated",result:this.localQueryResultByToken(t)}}]};return this.onTransition(u),!0}queriesContainingTokens(t){if(t.length===0)return[];const r=[],s=new Set(t);for(const[i,c]of this.paginatedQuerySet)for(const u of this.allQueryTokens(c))if(s.has(u)){r.push(i);break}return r}processPaginatedQuerySplits(t,r){for(const s of t){const i=this.mustGetPaginatedQuery(s),{ongoingSplits:c,pageKeyToQuery:u,pageKeys:f}=i;for(const[h,[p,y]]of c)r(u.get(p).queryToken)!==void 0&&r(u.get(y).queryToken)!==void 0&&this.completePaginatedQuerySplit(i,h,p,y);for(const h of f){if(c.has(h))continue;const p=u.get(h).queryToken,y=r(p);if(!y)continue;const v=yp(y);v.splitCursor&&(v.pageStatus==="SplitRecommended"||v.pageStatus==="SplitRequired"||v.page.length>i.options.initialNumItems*2)&&this.splitPaginatedQueryPage(i,h,v.splitCursor,v.continueCursor)}}}splitPaginatedQueryPage(t,r,s,i){const c=t.nextPageKey++,u=t.nextPageKey++,f={cursor:i,numItems:t.options.initialNumItems,id:t.id},h=this.client.subscribe(t.canonicalizedUdfPath,{...t.args,paginationOpts:{...f,cursor:null,endCursor:s}});t.pageKeyToQuery.set(c,h);const p=this.client.subscribe(t.canonicalizedUdfPath,{...t.args,paginationOpts:{...f,cursor:s,endCursor:i}});t.pageKeyToQuery.set(u,p),t.ongoingSplits.set(r,[c,u])}addPageToPaginatedQuery(t,r,s){const i=this.mustGetPaginatedQuery(t),c=i.nextPageKey++,u={cursor:r,numItems:s,id:i.id},f={...i.args,paginationOpts:u},h=this.client.subscribe(i.canonicalizedUdfPath,f);return i.pageKeys.push(c),i.pageKeyToQuery.set(c,h),h}removePaginatedQuerySubscriber(t){const r=this.paginatedQuerySet.get(t);if(r&&(r.numSubscribers-=1,!(r.numSubscribers>0))){for(const s of r.pageKeyToQuery.values())s.unsubscribe();this.paginatedQuerySet.delete(t)}}completePaginatedQuerySplit(t,r,s,i){const c=t.pageKeyToQuery.get(r);t.pageKeyToQuery.delete(r);const u=t.pageKeys.indexOf(r);t.pageKeys.splice(u,1,s,i),t.ongoingSplits.delete(r),c.unsubscribe()}activePageQueryTokens(t){return t.pageKeys.map(r=>t.pageKeyToQuery.get(r).queryToken)}allQueryTokens(t){return Array.from(t.pageKeyToQuery.values()).map(r=>r.queryToken)}queryTokenForLastPageOfPaginatedQuery(t){const r=this.mustGetPaginatedQuery(t),s=r.pageKeys[r.pageKeys.length-1];if(s===void 0)throw new Error(`No pages for paginated query ${t}`);return r.pageKeyToQuery.get(s).queryToken}mustGetPaginatedQuery(t){const r=this.paginatedQuerySet.get(t);if(!r)throw new Error("paginated query no longer exists for token "+t);return r}}function kz({getCurrentValue:e,subscribe:t}){const[r,s]=w.useState(()=>({getCurrentValue:e,subscribe:t,value:e()}));let i=r.value;return(r.getCurrentValue!==e||r.subscribe!==t)&&(i=e(),s({getCurrentValue:e,subscribe:t,value:i})),w.useEffect(()=>{let c=!1;const u=()=>{c||s(h=>{if(h.getCurrentValue!==e||h.subscribe!==t)return h;const p=e();return h.value===p?h:{...h,value:p}})},f=t(u);return u(),()=>{c=!0,f()}},[e,t]),i}var Mz=Object.defineProperty,Nz=(e,t,r)=>t in e?Mz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Dr=(e,t,r)=>Nz(e,typeof t!="symbol"?t+"":t,r);const jz=5e3;if(typeof qt>"u")throw new Error("Required dependency 'react' not found");function T1(e,t,r){function s(i){return Lz(i),t.mutation(e,i,{optimisticUpdate:r})}return s.withOptimisticUpdate=function(c){if(r!==void 0)throw new Error(`Already specified optimistic update for mutation ${on(e)}`);return T1(e,t,c)},s}class zz{constructor(t,r){if(Dr(this,"address"),Dr(this,"cachedSync"),Dr(this,"cachedPaginatedQueryClient"),Dr(this,"listeners"),Dr(this,"options"),Dr(this,"closed",!1),Dr(this,"_logger"),Dr(this,"adminAuth"),Dr(this,"fakeUserIdentity"),t===void 0)throw new Error("No address provided to ConvexReactClient.\nIf trying to deploy to production, make sure to follow all the instructions found at https://docs.convex.dev/production/hosting/\nIf running locally, make sure to run `convex dev` and ensure the .env.local file is populated.");if(typeof t!="string")throw new Error(`ConvexReactClient requires a URL like 'https://happy-otter-123.convex.cloud', received something of type ${typeof t} instead.`);if(!t.includes("://"))throw new Error("Provided address was not an absolute URL.");this.address=t,this.listeners=new Map,this._logger=r?.logger===!1?S1({verbose:r?.verbose??!1}):r?.logger!==!0&&r?.logger?r.logger:w1({verbose:r?.verbose??!1}),this.options={...r,logger:this._logger}}get url(){return this.address}get sync(){if(this.closed)throw new Error("ConvexReactClient has already been closed.");return this.cachedSync?this.cachedSync:(this.cachedSync=new Rz(this.address,()=>{},this.options),this.adminAuth&&this.cachedSync.setAdminAuth(this.adminAuth,this.fakeUserIdentity),this.cachedPaginatedQueryClient=new Oz(this.cachedSync,t=>this.handleTransition(t)),this.cachedSync)}get paginatedQueryClient(){if(this.sync,this.cachedPaginatedQueryClient)return this.cachedPaginatedQueryClient;throw new Error("Should already be instantiated")}setAuth(t,r){if(typeof t=="string")throw new Error("Passing a string to ConvexReactClient.setAuth is no longer supported, please upgrade to passing in an async function to handle reauthentication.");this.sync.setAuth(t,r??(()=>{}))}clearAuth(){this.sync.clearAuth()}setAdminAuth(t,r){if(this.adminAuth=t,this.fakeUserIdentity=r,this.closed)throw new Error("ConvexReactClient has already been closed.");this.cachedSync&&this.sync.setAdminAuth(t,r)}watchQuery(t,...r){const[s,i]=r,c=on(t);return{onUpdate:u=>{const{queryToken:f,unsubscribe:h}=this.sync.subscribe(c,s,i),p=this.listeners.get(f);return p!==void 0?p.add(u):this.listeners.set(f,new Set([u])),()=>{if(this.closed)return;const y=this.listeners.get(f);y.delete(u),y.size===0&&this.listeners.delete(f),h()}},localQueryResult:()=>{if(this.cachedSync)return this.cachedSync.localQueryResult(c,s)},localQueryLogs:()=>{if(this.cachedSync)return this.cachedSync.localQueryLogs(c,s)},journal:()=>{if(this.cachedSync)return this.cachedSync.queryJournal(c,s)}}}prewarmQuery(t){const r=t.extendSubscriptionFor??jz,i=this.watchQuery(t.query,t.args||{}).onUpdate(()=>{});setTimeout(i,r)}watchPaginatedQuery(t,r,s){const i=on(t);return{onUpdate:c=>{const{paginatedQueryToken:u,unsubscribe:f}=this.paginatedQueryClient.subscribe(i,r||{},s),h=this.listeners.get(u);return h!==void 0?h.add(c):this.listeners.set(u,new Set([c])),()=>{if(this.closed)return;const p=this.listeners.get(u);p.delete(c),p.size===0&&this.listeners.delete(u),f()}},localQueryResult:()=>this.paginatedQueryClient.localQueryResult(i,r,s)}}mutation(t,...r){const[s,i]=r,c=on(t);return this.sync.mutation(c,s,i)}action(t,...r){const s=on(t);return this.sync.action(s,...r)}query(t,...r){const s=this.watchQuery(t,...r),i=s.localQueryResult();return i!==void 0?Promise.resolve(i):new Promise((c,u)=>{const f=s.onUpdate(()=>{f();try{c(s.localQueryResult())}catch(h){u(h)}})})}connectionState(){return this.sync.connectionState()}subscribeToConnectionState(t){return this.sync.subscribeToConnectionState(t)}get logger(){return this._logger}async close(){if(this.closed=!0,this.listeners=new Map,this.cachedPaginatedQueryClient&&(this.cachedPaginatedQueryClient=void 0),this.cachedSync){const t=this.cachedSync;this.cachedSync=void 0,await t.close()}}handleTransition(t){const r=t.queries.map(i=>i.token),s=t.paginatedQueries.map(i=>i.token);this.transition([...r,...s])}transition(t){for(const r of t){const s=this.listeners.get(r);if(s)for(const i of s)i()}}}const $m=qt.createContext(void 0);function Dz(){return w.useContext($m)}const Pz=({client:e,children:t})=>qt.createElement($m.Provider,{value:e},t);function A1(e,...t){const r=t[0]==="skip",s=t[0]==="skip"?{}:Lr(t[0]),i=typeof e=="string"?_1(e):e,c=on(i),u=w.useMemo(()=>r?{}:{query:{query:i,args:s}},[JSON.stringify(Gn(s)),c,r]),h=Bz(u).query;if(h instanceof Error)throw h;return h}function Ow(e){const t=typeof e=="string"?_1(e):e,r=w.useContext($m);if(r===void 0)throw new Error("Could not find Convex client! `useMutation` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");return w.useMemo(()=>T1(t,r),[r,on(t)])}function Lz(e){if(typeof e=="object"&&e!==null&&"bubbles"in e&&"persist"in e&&"isDefaultPrevented"in e)throw new Error("Convex function called with SyntheticEvent object. Did you use a Convex function as an event handler directly? Event handlers like onClick receive an event object as their first argument. These SyntheticEvent objects are not valid Convex values. Try wrapping the function like `const handler = () => myMutation();` and using `handler` in the event handler.")}var Iz=Object.defineProperty,$z=(e,t,r)=>t in e?Iz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,vp=(e,t,r)=>$z(e,typeof t!="symbol"?t+"":t,r);class Uz{constructor(t){vp(this,"createWatch"),vp(this,"queries"),vp(this,"listeners"),this.createWatch=t,this.queries={},this.listeners=new Set}setQueries(t){for(const r of Object.keys(t)){const{query:s,args:i,paginationOptions:c}=t[r];if(on(s),this.queries[r]===void 0)this.addQuery(r,s,i,c?{paginationOptions:c}:{});else{const u=this.queries[r];(on(s)!==on(u.query)||JSON.stringify(Gn(i))!==JSON.stringify(Gn(u.args))||JSON.stringify(c)!==JSON.stringify(u.paginationOptions))&&(this.removeQuery(r),this.addQuery(r,s,i,c?{paginationOptions:c}:{}))}}for(const r of Object.keys(this.queries))t[r]===void 0&&this.removeQuery(r)}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}getLocalResults(t){const r={};for(const s of Object.keys(t)){const{query:i,args:c}=t[s],u=t[s].paginationOptions;on(i);const f=this.createWatch(i,c,u?{paginationOptions:u}:{});let h;try{h=f.localQueryResult()}catch(p){if(p instanceof Error)h=p;else throw p}r[s]=h}return r}setCreateWatch(t){this.createWatch=t;for(const r of Object.keys(this.queries)){const{query:s,args:i,watch:c,paginationOptions:u}=this.queries[r],f="journal"in c?c.journal():void 0;this.removeQuery(r),this.addQuery(r,s,i,{...f?{journal:f}:[],...u?{paginationOptions:u}:{}})}}destroy(){for(const t of Object.keys(this.queries))this.removeQuery(t);this.listeners=new Set}addQuery(t,r,s,{paginationOptions:i,journal:c}){if(this.queries[t]!==void 0)throw new Error(`Tried to add a new query with identifier ${t} when it already exists.`);const u=this.createWatch(r,s,{...c?{journal:c}:[],...i?{paginationOptions:i}:{}}),f=u.onUpdate(()=>this.notifyListeners());this.queries[t]={query:r,args:s,watch:u,unsubscribe:f,...i?{paginationOptions:i}:{}}}removeQuery(t){const r=this.queries[t];if(r===void 0)throw new Error(`No query found with identifier ${t}.`);r.unsubscribe(),delete this.queries[t]}notifyListeners(){for(const t of this.listeners)t()}}function Bz(e){const t=Dz();if(t===void 0)throw new Error("Could not find Convex client! `useQuery` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app");const r=w.useMemo(()=>(s,i,{journal:c,paginationOptions:u})=>u?t.watchPaginatedQuery(s,i,u):t.watchQuery(s,i,c?{journal:c}:{}),[t]);return qz(e,r)}function qz(e,t){const[r]=w.useState(()=>new Uz(t));r.createWatch!==t&&r.setCreateWatch(t),w.useEffect(()=>()=>r.destroy(),[r]);const s=w.useMemo(()=>({getCurrentValue:()=>r.getLocalResults(e),subscribe:i=>(r.setQueries(e),r.subscribe(i))}),[r,e]);return kz(s)}const Fz="/assets/globals-CoCRjt0K.css";const O1=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim();const Vz=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Hz=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase());const kw=e=>{const t=Hz(e);return t.charAt(0).toUpperCase()+t.slice(1)};var Zz={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Qz=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Gz=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:i="",children:c,iconNode:u,...f},h)=>w.createElement("svg",{ref:h,...Zz,width:t,height:t,stroke:e,strokeWidth:s?Number(r)*24/Number(t):r,className:O1("lucide",i),...!c&&!Qz(f)&&{"aria-hidden":"true"},...f},[...u.map(([p,y])=>w.createElement(p,y)),...Array.isArray(c)?c:[c]]));const Se=(e,t)=>{const r=w.forwardRef(({className:s,...i},c)=>w.createElement(Gz,{ref:c,iconNode:t,className:O1(`lucide-${Vz(kw(e))}`,`lucide-${e}`,s),...i}));return r.displayName=kw(e),r};const Yz=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Kz=Se("archive",Yz);const Xz=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Yp=Se("bell",Xz);const Jz=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],Wz=Se("book",Jz);const e3=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],t3=Se("bookmark",e3);const n3=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],k1=Se("braces",n3);const r3=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Kp=Se("calendar",r3);const o3=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],M1=Se("check",o3);const s3=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_s=Se("chevron-down",s3);const a3=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],i3=Se("chevron-right",a3);const c3=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],N1=Se("chevron-up",c3);const l3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],u3=Se("circle-alert",l3);const f3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],j1=Se("circle-question-mark",f3);const d3=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],h3=Se("clock",d3);const p3=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],m3=Se("code-xml",p3);const g3=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],y3=Se("code",g3);const v3=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],b3=Se("dollar-sign",v3);const w3=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],S3=Se("external-link",w3);const x3=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_3=Se("eye",x3);const C3=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],E3=Se("file-code",C3);const R3=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],T3=Se("file-text",R3);const A3=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M11 18h2",key:"12mj7e"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5",key:"qbrxap"}]],O3=Se("file-type",A3);const k3=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],M3=Se("flag",k3);const N3=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],j3=Se("folder-open",N3);const z3=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],D3=Se("folder",z3);const P3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],L3=Se("globe",P3);const I3=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],z1=Se("hash",I3);const $3=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],U3=Se("heart",$3);const B3=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],D1=Se("house",B3);const q3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],P1=Se("image",q3);const F3=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],L1=Se("layers",F3);const V3=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],H3=Se("layout-dashboard",V3);const Z3=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Q3=Se("link-2",Z3);const G3=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Y3=Se("link",G3);const K3=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],X3=Se("list",K3);const J3=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],W3=Se("loader-circle",J3);const eD=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],tD=Se("lock",eD);const nD=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],rD=Se("log-out",nD);const oD=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],sD=Se("mail",oD);const aD=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],iD=Se("map-pin",aD);const cD=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],lD=Se("message-square",cD);const uD=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],fD=Se("package",uD);const dD=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],hD=Se("phone",dD);const pD=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],I1=Se("plus",pD);const mD=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],gD=Se("settings",mD);const yD=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],vD=Se("square-check-big",yD);const bD=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],wD=Se("square-pen",bD);const SD=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],xD=Se("star",SD);const _D=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],CD=Se("tag",_D);const ED=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],RD=Se("tags",ED);const TD=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],AD=Se("text-align-start",TD);const OD=[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],$1=Se("toggle-left",OD);const kD=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],MD=Se("trash-2",kD);const ND=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],jD=Se("triangle-alert",ND);const zD=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],U1=Se("user",zD);const DD=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ju=Se("x",DD);function B1(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=B1(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function q1(){for(var e,t,r=0,s="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=B1(e))&&(s&&(s+=" "),s+=t);return s}const PD=(e,t)=>{const r=new Array(e.length+t.length);for(let s=0;s<e.length;s++)r[s]=e[s];for(let s=0;s<t.length;s++)r[e.length+s]=t[s];return r},LD=(e,t)=>({classGroupId:e,validator:t}),F1=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),zu="-",Mw=[],ID="arbitrary..",$D=e=>{const t=BD(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return UD(u);const f=u.split(zu),h=f[0]===""&&f.length>1?1:0;return V1(f,h,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const h=s[u],p=r[u];return h?p?PD(p,h):h:p||Mw}return r[u]||Mw}}},V1=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],c=r.nextPart.get(i);if(c){const p=V1(e,t+1,c);if(p)return p}const u=r.validators;if(u===null)return;const f=t===0?e.join(zu):e.slice(t).join(zu),h=u.length;for(let p=0;p<h;p++){const y=u[p];if(y.validator(f))return y.classGroupId}},UD=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),s=t.slice(0,r);return s?ID+s:void 0})(),BD=e=>{const{theme:t,classGroups:r}=e;return qD(r,t)},qD=(e,t)=>{const r=F1();for(const s in e){const i=e[s];Um(i,r,s,t)}return r},Um=(e,t,r,s)=>{const i=e.length;for(let c=0;c<i;c++){const u=e[c];FD(u,t,r,s)}},FD=(e,t,r,s)=>{if(typeof e=="string"){VD(e,t,r);return}if(typeof e=="function"){HD(e,t,r,s);return}ZD(e,t,r,s)},VD=(e,t,r)=>{const s=e===""?t:H1(t,e);s.classGroupId=r},HD=(e,t,r,s)=>{if(QD(e)){Um(e(s),t,r,s);return}t.validators===null&&(t.validators=[]),t.validators.push(LD(r,e))},ZD=(e,t,r,s)=>{const i=Object.entries(e),c=i.length;for(let u=0;u<c;u++){const[f,h]=i[u];Um(h,H1(t,f),r,s)}},H1=(e,t)=>{let r=e;const s=t.split(zu),i=s.length;for(let c=0;c<i;c++){const u=s[c];let f=r.nextPart.get(u);f||(f=F1(),r.nextPart.set(u,f)),r=f}return r},QD=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,GD=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),s=Object.create(null);const i=(c,u)=>{r[c]=u,t++,t>e&&(t=0,s=r,r=Object.create(null))};return{get(c){let u=r[c];if(u!==void 0)return u;if((u=s[c])!==void 0)return i(c,u),u},set(c,u){c in r?r[c]=u:i(c,u)}}},Xp="!",Nw=":",YD=[],jw=(e,t,r,s,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:s,isExternal:i}),KD=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=i=>{const c=[];let u=0,f=0,h=0,p;const y=i.length;for(let x=0;x<y;x++){const C=i[x];if(u===0&&f===0){if(C===Nw){c.push(i.slice(h,x)),h=x+1;continue}if(C==="/"){p=x;continue}}C==="["?u++:C==="]"?u--:C==="("?f++:C===")"&&f--}const v=c.length===0?i:i.slice(h);let b=v,_=!1;v.endsWith(Xp)?(b=v.slice(0,-1),_=!0):v.startsWith(Xp)&&(b=v.slice(1),_=!0);const E=p&&p>h?p-h:void 0;return jw(c,_,b,E)};if(t){const i=t+Nw,c=s;s=u=>u.startsWith(i)?c(u.slice(i.length)):jw(YD,!1,u,void 0,!0)}if(r){const i=s;s=c=>r({className:c,parseClassName:i})}return s},XD=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,s)=>{t.set(r,1e6+s)}),r=>{const s=[];let i=[];for(let c=0;c<r.length;c++){const u=r[c],f=u[0]==="[",h=t.has(u);f||h?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(u)):i.push(u)}return i.length>0&&(i.sort(),s.push(...i)),s}},JD=e=>({cache:GD(e.cacheSize),parseClassName:KD(e),sortModifiers:XD(e),...$D(e)}),WD=/\s+/,e4=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:c}=t,u=[],f=e.trim().split(WD);let h="";for(let p=f.length-1;p>=0;p-=1){const y=f[p],{isExternal:v,modifiers:b,hasImportantModifier:_,baseClassName:E,maybePostfixModifierPosition:x}=r(y);if(v){h=y+(h.length>0?" "+h:h);continue}let C=!!x,O=s(C?E.substring(0,x):E);if(!O){if(!C){h=y+(h.length>0?" "+h:h);continue}if(O=s(E),!O){h=y+(h.length>0?" "+h:h);continue}C=!1}const M=b.length===0?"":b.length===1?b[0]:c(b).join(":"),k=_?M+Xp:M,D=k+O;if(u.indexOf(D)>-1)continue;u.push(D);const U=i(O,C);for(let H=0;H<U.length;++H){const L=U[H];u.push(k+L)}h=y+(h.length>0?" "+h:h)}return h},t4=(...e)=>{let t=0,r,s,i="";for(;t<e.length;)(r=e[t++])&&(s=Z1(r))&&(i&&(i+=" "),i+=s);return i},Z1=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=Z1(e[s]))&&(r&&(r+=" "),r+=t);return r},n4=(e,...t)=>{let r,s,i,c;const u=h=>{const p=t.reduce((y,v)=>v(y),e());return r=JD(p),s=r.cache.get,i=r.cache.set,c=f,f(h)},f=h=>{const p=s(h);if(p)return p;const y=e4(h,r);return i(h,y),y};return c=u,(...h)=>c(t4(...h))},r4=[],At=e=>{const t=r=>r[e]||r4;return t.isThemeGetter=!0,t},Q1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,G1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,o4=/^\d+\/\d+$/,s4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,a4=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,i4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,c4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,l4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ha=e=>o4.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),yo=e=>!!e&&Number.isInteger(Number(e)),bp=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),Pr=e=>s4.test(e),u4=()=>!0,f4=e=>a4.test(e)&&!i4.test(e),Y1=()=>!1,d4=e=>c4.test(e),h4=e=>l4.test(e),p4=e=>!fe(e)&&!de(e),m4=e=>Ua(e,J1,Y1),fe=e=>Q1.test(e),ns=e=>Ua(e,W1,f4),wp=e=>Ua(e,w4,Ne),zw=e=>Ua(e,K1,Y1),g4=e=>Ua(e,X1,h4),Wl=e=>Ua(e,e_,d4),de=e=>G1.test(e),Zi=e=>Ba(e,W1),y4=e=>Ba(e,S4),Dw=e=>Ba(e,K1),v4=e=>Ba(e,J1),b4=e=>Ba(e,X1),eu=e=>Ba(e,e_,!0),Ua=(e,t,r)=>{const s=Q1.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},Ba=(e,t,r=!1)=>{const s=G1.exec(e);return s?s[1]?t(s[1]):r:!1},K1=e=>e==="position"||e==="percentage",X1=e=>e==="image"||e==="url",J1=e=>e==="length"||e==="size"||e==="bg-size",W1=e=>e==="length",w4=e=>e==="number",S4=e=>e==="family-name",e_=e=>e==="shadow",x4=()=>{const e=At("color"),t=At("font"),r=At("text"),s=At("font-weight"),i=At("tracking"),c=At("leading"),u=At("breakpoint"),f=At("container"),h=At("spacing"),p=At("radius"),y=At("shadow"),v=At("inset-shadow"),b=At("text-shadow"),_=At("drop-shadow"),E=At("blur"),x=At("perspective"),C=At("aspect"),O=At("ease"),M=At("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],U=()=>[...D(),de,fe],H=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],j=()=>[de,fe,h],G=()=>[ha,"full","auto",...j()],ie=()=>[yo,"none","subgrid",de,fe],ae=()=>["auto",{span:["full",yo,de,fe]},yo,de,fe],te=()=>[yo,"auto",de,fe],ce=()=>["auto","min","max","fr",de,fe],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],me=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...j()],K=()=>[ha,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],V=()=>[e,de,fe],re=()=>[...D(),Dw,zw,{position:[de,fe]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",v4,m4,{size:[de,fe]}],Q=()=>[bp,Zi,ns],ne=()=>["","none","full",p,de,fe],oe=()=>["",Ne,Zi,ns],pe=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[Ne,bp,Dw,zw],_e=()=>["","none",E,de,fe],xe=()=>["none",Ne,de,fe],Re=()=>["none",Ne,de,fe],Ae=()=>[Ne,de,fe],Le=()=>[ha,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pr],breakpoint:[Pr],color:[u4],container:[Pr],"drop-shadow":[Pr],ease:["in","out","in-out"],font:[p4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pr],shadow:[Pr],spacing:["px",Ne],text:[Pr],"text-shadow":[Pr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ha,fe,de,C]}],container:["container"],columns:[{columns:[Ne,fe,de,f]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:U()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:G()}],"inset-x":[{"inset-x":G()}],"inset-y":[{"inset-y":G()}],start:[{start:G()}],end:[{end:G()}],top:[{top:G()}],right:[{right:G()}],bottom:[{bottom:G()}],left:[{left:G()}],visibility:["visible","invisible","collapse"],z:[{z:[yo,"auto",de,fe]}],basis:[{basis:[ha,"full","auto",f,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,ha,"auto","initial","none",fe]}],grow:[{grow:["",Ne,de,fe]}],shrink:[{shrink:["",Ne,de,fe]}],order:[{order:[yo,"first","last","none",de,fe]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:ae()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:ae()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ce()}],"auto-rows":[{"auto-rows":ce()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...me(),"normal"]}],"justify-self":[{"justify-self":["auto",...me()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...me(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...me(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...me(),"baseline"]}],"place-self":[{"place-self":["auto",...me()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],w:[{w:[f,"screen",...K()]}],"min-w":[{"min-w":[f,"screen","none",...K()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",r,Zi,ns]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,de,wp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",bp,fe]}],"font-family":[{font:[y4,fe,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,de,fe]}],"line-clamp":[{"line-clamp":[Ne,"none",de,wp]}],leading:[{leading:[c,...j()]}],"list-image":[{"list-image":["none",de,fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",de,fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",de,ns]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Ne,"auto",de,fe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de,fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",de,fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},yo,de,fe],radial:["",de,fe],conic:[yo,de,fe]},b4,g4]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,de,fe]}],"outline-w":[{outline:["",Ne,Zi,ns]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",y,eu,Wl]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",v,eu,Wl]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Ne,ns]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",b,eu,Wl]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Ne,de,fe]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[de,fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",de,fe]}],filter:[{filter:["","none",de,fe]}],blur:[{blur:_e()}],brightness:[{brightness:[Ne,de,fe]}],contrast:[{contrast:[Ne,de,fe]}],"drop-shadow":[{"drop-shadow":["","none",_,eu,Wl]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Ne,de,fe]}],"hue-rotate":[{"hue-rotate":[Ne,de,fe]}],invert:[{invert:["",Ne,de,fe]}],saturate:[{saturate:[Ne,de,fe]}],sepia:[{sepia:["",Ne,de,fe]}],"backdrop-filter":[{"backdrop-filter":["","none",de,fe]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,de,fe]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,de,fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,de,fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,de,fe]}],"backdrop-invert":[{"backdrop-invert":["",Ne,de,fe]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,de,fe]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,de,fe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,de,fe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",de,fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",de,fe]}],ease:[{ease:["linear","initial",O,de,fe]}],delay:[{delay:[Ne,de,fe]}],animate:[{animate:["none",M,de,fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,de,fe]}],"perspective-origin":[{"perspective-origin":U()}],rotate:[{rotate:xe()}],"rotate-x":[{"rotate-x":xe()}],"rotate-y":[{"rotate-y":xe()}],"rotate-z":[{"rotate-z":xe()}],scale:[{scale:Re()}],"scale-x":[{"scale-x":Re()}],"scale-y":[{"scale-y":Re()}],"scale-z":[{"scale-z":Re()}],"scale-3d":["scale-3d"],skew:[{skew:Ae()}],"skew-x":[{"skew-x":Ae()}],"skew-y":[{"skew-y":Ae()}],transform:[{transform:[de,fe,"","none","gpu","cpu"]}],"transform-origin":[{origin:U()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Le()}],"translate-x":[{"translate-x":Le()}],"translate-y":[{"translate-y":Le()}],"translate-z":[{"translate-z":Le()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",de,fe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",de,fe]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Ne,Zi,ns,wp]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},_4=n4(x4);function je(...e){return _4(q1(e))}et.union(et.literal("admin"),et.literal("editor"),et.literal("author"),et.literal("viewer"));const C4=et.union(et.literal("contentTypes"),et.literal("contentEntries"),et.literal("mediaItems"),et.literal("settings")),E4=et.union(et.literal("create"),et.literal("read"),et.literal("update"),et.literal("delete"),et.literal("publish"),et.literal("unpublish"),et.literal("restore"),et.literal("manage"),et.literal("move"));et.object({resource:C4,action:E4,scope:et.optional(et.union(et.literal("all"),et.literal("own")))});function oc(e,t="all"){return[{resource:e,action:"create",scope:t},{resource:e,action:"read",scope:t},{resource:e,action:"update",scope:t},{resource:e,action:"delete",scope:t}]}function Oa(e,t="all"){return[{resource:e,action:"read",scope:t}]}function t_(e="all"){return[{resource:"contentEntries",action:"publish",scope:e},{resource:"contentEntries",action:"unpublish",scope:e}]}const R4={name:"admin",displayName:"Administrator",description:"Full access to all CMS features including settings and content type management",isSystem:!0,permissions:[...oc("contentTypes"),...oc("contentEntries"),...t_(),{resource:"contentEntries",action:"restore"},...oc("mediaItems"),{resource:"settings",action:"manage"},...Oa("settings")]},T4={name:"editor",displayName:"Editor",description:"Can manage all content and media, but cannot modify settings or content types",isSystem:!0,permissions:[...Oa("contentTypes"),...oc("contentEntries"),...t_(),{resource:"contentEntries",action:"restore"},...oc("mediaItems")]},A4={name:"author",displayName:"Author",description:"Can create and manage own content and media",isSystem:!0,permissions:[...Oa("contentTypes"),{resource:"contentEntries",action:"create"},{resource:"contentEntries",action:"read",scope:"own"},{resource:"contentEntries",action:"update",scope:"own"},{resource:"contentEntries",action:"delete",scope:"own"},{resource:"contentEntries",action:"publish",scope:"own"},{resource:"contentEntries",action:"unpublish",scope:"own"},{resource:"mediaItems",action:"create"},{resource:"mediaItems",action:"read",scope:"all"},{resource:"mediaItems",action:"update",scope:"own"},{resource:"mediaItems",action:"delete",scope:"own"}]},O4={name:"viewer",displayName:"Viewer",description:"Read-only access to published content and media",isSystem:!0,permissions:[...Oa("contentTypes"),...Oa("contentEntries"),...Oa("mediaItems")]},Bm={admin:R4,editor:T4,author:A4,viewer:O4};function k4(e,t){if(e.resource!==t.resource||e.action!==t.action)return!1;const r=e.scope??"all",s=t.scope??"all";return r==="all"?!0:s==="own"}function M4(e,t,r){const s=Bm[e]??r?.[e];return s?s.permissions.some(i=>k4(i,t)):!1}function N4(e,t){return(Bm[e]??t?.[e])?.permissions??[]}function j4(e,t){return Bm[e]??t?.[e]}function z4(e,t,r){return N4(e,r).filter(s=>s.resource===t)}function x7(e,t,r){return z4(e,t,r).length>0}const n_=w.createContext(null);function D4({children:e,getUser:t,getUserRole:r,onLogout:s,autoRedirectToLogin:i=!1,loginUrl:c="/login"}){const[u,f]=w.useState(null),[h,p]=w.useState(null),[y,v]=w.useState("loading"),[b,_]=w.useState(null),E=w.useCallback(async()=>{v("loading"),_(null);try{const k=await t();if(!k){f(null),p(null),v("unauthenticated"),i&&typeof window<"u"&&(window.location.href=c);return}const D=await r({userId:k.id});f(k),p(D),v("authenticated")}catch(k){console.error("Authentication error:",k),f(null),p(null),_(k instanceof Error?k.message:"Authentication failed"),v("error")}},[t,r,i,c]);w.useEffect(()=>{E()},[E]);const x=w.useCallback(k=>h?M4(h,k):!1,[h]),C=w.useCallback(async()=>{try{s&&await s(),f(null),p(null),v("unauthenticated"),i&&typeof window<"u"&&(window.location.href=c)}catch(k){console.error("Logout error:",k),_(k instanceof Error?k.message:"Logout failed")}},[s,i,c]),O=w.useCallback(async()=>{await E()},[E]),M={user:u,role:h,authState:y,isLoading:y==="loading",isAuthenticated:y==="authenticated",error:b,checkPermission:x,logout:C,refresh:O};return g.jsx(n_.Provider,{value:M,children:e})}function r_(){const e=w.useContext(n_);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e}const o_=w.createContext(null),s_="convex-cms-theme";function Pw(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Lw(){if(typeof window>"u")return"system";const e=localStorage.getItem(s_);return e==="light"||e==="dark"||e==="system"?e:"system"}function P4({children:e}){const[t,r]=w.useState(()=>Lw()),[s,i]=w.useState(()=>{const f=Lw();return f==="system"?Pw():f}),c=w.useCallback(f=>{const h=f==="system"?Pw():f;i(h);const p=document.documentElement;p.classList.remove("light","dark"),p.classList.add(h)},[]),u=w.useCallback(f=>{r(f),localStorage.setItem(s_,f),c(f)},[c]);return w.useEffect(()=>{c(t)},[t,c]),w.useEffect(()=>{const f=window.matchMedia("(prefers-color-scheme: dark)"),h=()=>{t==="system"&&c("system")};return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[t,c]),g.jsx(o_.Provider,{value:{theme:t,resolvedTheme:s,setTheme:u},children:e})}function _7(){const e=w.useContext(o_);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}function W(e,t,r){function s(f,h){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:h,constr:u,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),t(f,h);const p=u.prototype,y=Object.keys(p);for(let v=0;v<y.length;v++){const b=y[v];b in f||(f[b]=p[b].bind(f))}}const i=r?.Parent??Object;class c extends i{}Object.defineProperty(c,"name",{value:e});function u(f){var h;const p=r?.Parent?new c:this;s(p,f),(h=p._zod).deferred??(h.deferred=[]);for(const y of p._zod.deferred)y();return p}return Object.defineProperty(u,"init",{value:s}),Object.defineProperty(u,Symbol.hasInstance,{value:f=>r?.Parent&&f instanceof r.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}class ka extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class a_ extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const i_={};function Eo(e){return i_}function c_(e){const t=Object.values(e).filter(s=>typeof s=="number");return Object.entries(e).filter(([s,i])=>t.indexOf(+s)===-1).map(([s,i])=>i)}function Jp(e,t){return typeof t=="bigint"?t.toString():t}function qm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Fm(e){return e==null}function Vm(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function L4(e,t){const r=(e.toString().split(".")[1]||"").length,s=t.toString();let i=(s.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(s)){const h=s.match(/\d?e-(\d?)/);h?.[1]&&(i=Number.parseInt(h[1]))}const c=r>i?r:i,u=Number.parseInt(e.toFixed(c).replace(".","")),f=Number.parseInt(t.toFixed(c).replace(".",""));return u%f/10**c}const Iw=Symbol("evaluating");function Ye(e,t,r){let s;Object.defineProperty(e,t,{get(){if(s!==Iw)return s===void 0&&(s=Iw,s=r()),s},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function Cs(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function jo(...e){const t={};for(const r of e){const s=Object.getOwnPropertyDescriptors(r);Object.assign(t,s)}return Object.defineProperties({},t)}function $w(e){return JSON.stringify(e)}function I4(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const l_="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Du(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const $4=qm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Pa(e){if(Du(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(Du(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function u_(e){return Pa(e)?{...e}:Array.isArray(e)?[...e]:e}const U4=new Set(["string","number","symbol"]);function sf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function zo(e,t,r){const s=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(s._zod.parent=e),s}function we(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function B4(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const q4={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function F4(e,t){const r=e._zod.def,s=r.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c=jo(e._zod.def,{get shape(){const u={};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&(u[f]=r.shape[f])}return Cs(this,"shape",u),u},checks:[]});return zo(e,c)}function V4(e,t){const r=e._zod.def,s=r.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=jo(e._zod.def,{get shape(){const u={...e._zod.def.shape};for(const f in t){if(!(f in r.shape))throw new Error(`Unrecognized key: "${f}"`);t[f]&&delete u[f]}return Cs(this,"shape",u),u},checks:[]});return zo(e,c)}function H4(e,t){if(!Pa(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const c=e._zod.def.shape;for(const u in t)if(Object.getOwnPropertyDescriptor(c,u)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=jo(e._zod.def,{get shape(){const c={...e._zod.def.shape,...t};return Cs(this,"shape",c),c}});return zo(e,i)}function Z4(e,t){if(!Pa(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=jo(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Cs(this,"shape",s),s}});return zo(e,r)}function Q4(e,t){const r=jo(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t._zod.def.shape};return Cs(this,"shape",s),s},get catchall(){return t._zod.def.catchall},checks:[]});return zo(e,r)}function G4(e,t,r){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const u=jo(t._zod.def,{get shape(){const f=t._zod.def.shape,h={...f};if(r)for(const p in r){if(!(p in f))throw new Error(`Unrecognized key: "${p}"`);r[p]&&(h[p]=e?new e({type:"optional",innerType:f[p]}):f[p])}else for(const p in f)h[p]=e?new e({type:"optional",innerType:f[p]}):f[p];return Cs(this,"shape",h),h},checks:[]});return zo(t,u)}function Y4(e,t,r){const s=jo(t._zod.def,{get shape(){const i=t._zod.def.shape,c={...i};if(r)for(const u in r){if(!(u in c))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=new e({type:"nonoptional",innerType:i[u]}))}else for(const u in i)c[u]=new e({type:"nonoptional",innerType:i[u]});return Cs(this,"shape",c),c}});return zo(t,s)}function Sa(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function xa(e,t){return t.map(r=>{var s;return(s=r).path??(s.path=[]),r.path.unshift(e),r})}function tu(e){return typeof e=="string"?e:e?.message}function Ro(e,t,r){const s={...e,path:e.path??[]};if(!e.message){const i=tu(e.inst?._zod.def?.error?.(e))??tu(t?.error?.(e))??tu(r.customError?.(e))??tu(r.localeError?.(e))??"Invalid input";s.message=i}return delete s.inst,delete s.continue,t?.reportInput||delete s.input,s}function Hm(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function hc(...e){const[t,r,s]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:s}:{...t}}const f_=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Jp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},d_=W("$ZodError",f_),h_=W("$ZodError",f_,{Parent:Error});function K4(e,t=r=>r.message){const r={},s=[];for(const i of e.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(t(i))):s.push(t(i));return{formErrors:s,fieldErrors:r}}function X4(e,t=r=>r.message){const r={_errors:[]},s=i=>{for(const c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>s({issues:u}));else if(c.code==="invalid_key")s({issues:c.issues});else if(c.code==="invalid_element")s({issues:c.issues});else if(c.path.length===0)r._errors.push(t(c));else{let u=r,f=0;for(;f<c.path.length;){const h=c.path[f];f===c.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(t(c))):u[h]=u[h]||{_errors:[]},u=u[h],f++}}};return s(e),r}const Zm=e=>(t,r,s,i)=>{const c=s?Object.assign(s,{async:!1}):{async:!1},u=t._zod.run({value:r,issues:[]},c);if(u instanceof Promise)throw new ka;if(u.issues.length){const f=new(i?.Err??e)(u.issues.map(h=>Ro(h,c,Eo())));throw l_(f,i?.callee),f}return u.value},Qm=e=>async(t,r,s,i)=>{const c=s?Object.assign(s,{async:!0}):{async:!0};let u=t._zod.run({value:r,issues:[]},c);if(u instanceof Promise&&(u=await u),u.issues.length){const f=new(i?.Err??e)(u.issues.map(h=>Ro(h,c,Eo())));throw l_(f,i?.callee),f}return u.value},af=e=>(t,r,s)=>{const i=s?{...s,async:!1}:{async:!1},c=t._zod.run({value:r,issues:[]},i);if(c instanceof Promise)throw new ka;return c.issues.length?{success:!1,error:new(e??d_)(c.issues.map(u=>Ro(u,i,Eo())))}:{success:!0,data:c.value}},J4=af(h_),cf=e=>async(t,r,s)=>{const i=s?Object.assign(s,{async:!0}):{async:!0};let c=t._zod.run({value:r,issues:[]},i);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new e(c.issues.map(u=>Ro(u,i,Eo())))}:{success:!0,data:c.value}},W4=cf(h_),eP=e=>(t,r,s)=>{const i=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Zm(e)(t,r,i)},tP=e=>(t,r,s)=>Zm(e)(t,r,s),nP=e=>async(t,r,s)=>{const i=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return Qm(e)(t,r,i)},rP=e=>async(t,r,s)=>Qm(e)(t,r,s),oP=e=>(t,r,s)=>{const i=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return af(e)(t,r,i)},sP=e=>(t,r,s)=>af(e)(t,r,s),aP=e=>async(t,r,s)=>{const i=s?Object.assign(s,{direction:"backward"}):{direction:"backward"};return cf(e)(t,r,i)},iP=e=>async(t,r,s)=>cf(e)(t,r,s),cP=/^[cC][^\s-]{8,}$/,lP=/^[0-9a-z]+$/,uP=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fP=/^[0-9a-vA-V]{20}$/,dP=/^[A-Za-z0-9]{27}$/,hP=/^[a-zA-Z0-9_-]{21}$/,pP=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,mP=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Uw=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,gP=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,yP="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vP(){return new RegExp(yP,"u")}const bP=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,wP=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,SP=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,xP=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_P=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,p_=/^[A-Za-z0-9_-]*$/,CP=/^\+[1-9]\d{6,14}$/,m_="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",EP=new RegExp(`^${m_}$`);function g_(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function RP(e){return new RegExp(`^${g_(e)}$`)}function TP(e){const t=g_({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${t}(?:${r.join("|")})`;return new RegExp(`^${m_}T(?:${s})$`)}const AP=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},OP=/^-?\d+$/,y_=/^-?\d+(?:\.\d+)?$/,kP=/^(?:true|false)$/i,MP=/^[^A-Z]*$/,NP=/^[^a-z]*$/,an=W("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),v_={number:"number",bigint:"bigint",object:"date"},b_=W("$ZodCheckLessThan",(e,t)=>{an.init(e,t);const r=v_[typeof t.value];e._zod.onattach.push(s=>{const i=s._zod.bag,c=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<c&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value<=t.value:s.value<t.value)||s.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),w_=W("$ZodCheckGreaterThan",(e,t)=>{an.init(e,t);const r=v_[typeof t.value];e._zod.onattach.push(s=>{const i=s._zod.bag,c=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>c&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=s=>{(t.inclusive?s.value>=t.value:s.value>t.value)||s.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:s.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),jP=W("$ZodCheckMultipleOf",(e,t)=>{an.init(e,t),e._zod.onattach.push(r=>{var s;(s=r._zod.bag).multipleOf??(s.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):L4(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),zP=W("$ZodCheckNumberFormat",(e,t)=>{an.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),s=r?"int":"number",[i,c]=q4[t.format];e._zod.onattach.push(u=>{const f=u._zod.bag;f.format=t.format,f.minimum=i,f.maximum=c,r&&(f.pattern=OP)}),e._zod.check=u=>{const f=u.value;if(r){if(!Number.isInteger(f)){u.issues.push({expected:s,format:t.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?u.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort}):u.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!t.abort});return}}f<i&&u.issues.push({origin:"number",input:f,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),f>c&&u.issues.push({origin:"number",input:f,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!t.abort})}}),DP=W("$ZodCheckMaxLength",(e,t)=>{var r;an.init(e,t),(r=e._zod.def).when??(r.when=s=>{const i=s.value;return!Fm(i)&&i.length!==void 0}),e._zod.onattach.push(s=>{const i=s._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(s._zod.bag.maximum=t.maximum)}),e._zod.check=s=>{const i=s.value;if(i.length<=t.maximum)return;const u=Hm(i);s.issues.push({origin:u,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),PP=W("$ZodCheckMinLength",(e,t)=>{var r;an.init(e,t),(r=e._zod.def).when??(r.when=s=>{const i=s.value;return!Fm(i)&&i.length!==void 0}),e._zod.onattach.push(s=>{const i=s._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(s._zod.bag.minimum=t.minimum)}),e._zod.check=s=>{const i=s.value;if(i.length>=t.minimum)return;const u=Hm(i);s.issues.push({origin:u,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),LP=W("$ZodCheckLengthEquals",(e,t)=>{var r;an.init(e,t),(r=e._zod.def).when??(r.when=s=>{const i=s.value;return!Fm(i)&&i.length!==void 0}),e._zod.onattach.push(s=>{const i=s._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=s=>{const i=s.value,c=i.length;if(c===t.length)return;const u=Hm(i),f=c>t.length;s.issues.push({origin:u,...f?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!t.abort})}}),lf=W("$ZodCheckStringFormat",(e,t)=>{var r,s;an.init(e,t),e._zod.onattach.push(i=>{const c=i._zod.bag;c.format=t.format,t.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(s=e._zod).check??(s.check=()=>{})}),IP=W("$ZodCheckRegex",(e,t)=>{lf.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),$P=W("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=MP),lf.init(e,t)}),UP=W("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=NP),lf.init(e,t)}),BP=W("$ZodCheckIncludes",(e,t)=>{an.init(e,t);const r=sf(t.includes),s=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=s,e._zod.onattach.push(i=>{const c=i._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(s)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),qP=W("$ZodCheckStartsWith",(e,t)=>{an.init(e,t);const r=new RegExp(`^${sf(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=s=>{s.value.startsWith(t.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:s.value,inst:e,continue:!t.abort})}}),FP=W("$ZodCheckEndsWith",(e,t)=>{an.init(e,t);const r=new RegExp(`.*${sf(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(s=>{const i=s._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=s=>{s.value.endsWith(t.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:s.value,inst:e,continue:!t.abort})}}),VP=W("$ZodCheckOverwrite",(e,t)=>{an.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class HP{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const s=t.split(`
|
|
20
|
-
`).filter(u=>u),i=Math.min(...s.map(u=>u.length-u.trimStart().length)),c=s.map(u=>u.slice(i)).map(u=>" ".repeat(this.indent*2)+u);for(const u of c)this.content.push(u)}compile(){const t=Function,r=this?.args,i=[...(this?.content??[""]).map(c=>` ${c}`)];return new t(...r,i.join(`
|
|
21
|
-
`))}}const ZP={major:4,minor:3,patch:6},ht=W("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ZP;const s=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&s.unshift(e);for(const i of s)for(const c of i._zod.onattach)c(e);if(s.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(u,f,h)=>{let p=Sa(u),y;for(const v of f){if(v._zod.def.when){if(!v._zod.def.when(u))continue}else if(p)continue;const b=u.issues.length,_=v._zod.check(u);if(_ instanceof Promise&&h?.async===!1)throw new ka;if(y||_ instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await _,u.issues.length!==b&&(p||(p=Sa(u,b)))});else{if(u.issues.length===b)continue;p||(p=Sa(u,b))}}return y?y.then(()=>u):u},c=(u,f,h)=>{if(Sa(u))return u.aborted=!0,u;const p=i(f,s,h);if(p instanceof Promise){if(h.async===!1)throw new ka;return p.then(y=>e._zod.parse(y,h))}return e._zod.parse(p,h)};e._zod.run=(u,f)=>{if(f.skipChecks)return e._zod.parse(u,f);if(f.direction==="backward"){const p=e._zod.parse({value:u.value,issues:[]},{...f,skipChecks:!0});return p instanceof Promise?p.then(y=>c(y,u,f)):c(p,u,f)}const h=e._zod.parse(u,f);if(h instanceof Promise){if(f.async===!1)throw new ka;return h.then(p=>i(p,s,f))}return i(h,s,f)}}Ye(e,"~standard",()=>({validate:i=>{try{const c=J4(e,i);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return W4(e,i).then(u=>u.success?{value:u.data}:{issues:u.error?.issues})}},vendor:"zod",version:1}))}),Gm=W("$ZodString",(e,t)=>{ht.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??AP(e._zod.bag),e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ct=W("$ZodStringFormat",(e,t)=>{lf.init(e,t),Gm.init(e,t)}),QP=W("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=mP),ct.init(e,t)}),GP=W("$ZodUUID",(e,t)=>{if(t.version){const s={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(s===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Uw(s))}else t.pattern??(t.pattern=Uw());ct.init(e,t)}),YP=W("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=gP),ct.init(e,t)}),KP=W("$ZodURL",(e,t)=>{ct.init(e,t),e._zod.check=r=>{try{const s=r.value.trim(),i=new URL(s);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=i.href:r.value=s;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),XP=W("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=vP()),ct.init(e,t)}),JP=W("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=hP),ct.init(e,t)}),WP=W("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=cP),ct.init(e,t)}),eL=W("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=lP),ct.init(e,t)}),tL=W("$ZodULID",(e,t)=>{t.pattern??(t.pattern=uP),ct.init(e,t)}),nL=W("$ZodXID",(e,t)=>{t.pattern??(t.pattern=fP),ct.init(e,t)}),rL=W("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=dP),ct.init(e,t)}),oL=W("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=TP(t)),ct.init(e,t)}),sL=W("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=EP),ct.init(e,t)}),aL=W("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RP(t)),ct.init(e,t)}),iL=W("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=pP),ct.init(e,t)}),cL=W("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=bP),ct.init(e,t),e._zod.bag.format="ipv4"}),lL=W("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=wP),ct.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),uL=W("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=SP),ct.init(e,t)}),fL=W("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=xP),ct.init(e,t),e._zod.check=r=>{const s=r.value.split("/");try{if(s.length!==2)throw new Error;const[i,c]=s;if(!c)throw new Error;const u=Number(c);if(`${u}`!==c)throw new Error;if(u<0||u>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function S_(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const dL=W("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=_P),ct.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{S_(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function hL(e){if(!p_.test(e))return!1;const t=e.replace(/[-_]/g,s=>s==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return S_(r)}const pL=W("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=p_),ct.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{hL(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),mL=W("$ZodE164",(e,t)=>{t.pattern??(t.pattern=CP),ct.init(e,t)});function gL(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[s]=r;if(!s)return!1;const i=JSON.parse(atob(s));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const yL=W("$ZodJWT",(e,t)=>{ct.init(e,t),e._zod.check=r=>{gL(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),x_=W("$ZodNumber",(e,t)=>{ht.init(e,t),e._zod.pattern=e._zod.bag.pattern??y_,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;const c=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...c?{received:c}:{}}),r}}),vL=W("$ZodNumberFormat",(e,t)=>{zP.init(e,t),x_.init(e,t)}),bL=W("$ZodBoolean",(e,t)=>{ht.init(e,t),e._zod.pattern=kP,e._zod.parse=(r,s)=>{if(t.coerce)try{r.value=!!r.value}catch{}const i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),r}}),wL=W("$ZodUnknown",(e,t)=>{ht.init(e,t),e._zod.parse=r=>r}),SL=W("$ZodNever",(e,t)=>{ht.init(e,t),e._zod.parse=(r,s)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Bw(e,t,r){e.issues.length&&t.issues.push(...xa(r,e.issues)),t.value[r]=e.value}const xL=W("$ZodArray",(e,t)=>{ht.init(e,t),e._zod.parse=(r,s)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),r;r.value=Array(i.length);const c=[];for(let u=0;u<i.length;u++){const f=i[u],h=t.element._zod.run({value:f,issues:[]},s);h instanceof Promise?c.push(h.then(p=>Bw(p,r,u))):Bw(h,r,u)}return c.length?Promise.all(c).then(()=>r):r}});function Pu(e,t,r,s,i){if(e.issues.length){if(i&&!(r in s))return;t.issues.push(...xa(r,e.issues))}e.value===void 0?r in s&&(t.value[r]=void 0):t.value[r]=e.value}function __(e){const t=Object.keys(e.shape);for(const s of t)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${s}": expected a Zod schema`);const r=B4(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function C_(e,t,r,s,i,c){const u=[],f=i.keySet,h=i.catchall._zod,p=h.def.type,y=h.optout==="optional";for(const v in t){if(f.has(v))continue;if(p==="never"){u.push(v);continue}const b=h.run({value:t[v],issues:[]},s);b instanceof Promise?e.push(b.then(_=>Pu(_,r,v,t,y))):Pu(b,r,v,t,y)}return u.length&&r.issues.push({code:"unrecognized_keys",keys:u,input:t,inst:c}),e.length?Promise.all(e).then(()=>r):r}const _L=W("$ZodObject",(e,t)=>{if(ht.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const f=t.shape;Object.defineProperty(t,"shape",{get:()=>{const h={...f};return Object.defineProperty(t,"shape",{value:h}),h}})}const s=qm(()=>__(t));Ye(e._zod,"propValues",()=>{const f=t.shape,h={};for(const p in f){const y=f[p]._zod;if(y.values){h[p]??(h[p]=new Set);for(const v of y.values)h[p].add(v)}}return h});const i=Du,c=t.catchall;let u;e._zod.parse=(f,h)=>{u??(u=s.value);const p=f.value;if(!i(p))return f.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),f;f.value={};const y=[],v=u.shape;for(const b of u.keys){const _=v[b],E=_._zod.optout==="optional",x=_._zod.run({value:p[b],issues:[]},h);x instanceof Promise?y.push(x.then(C=>Pu(C,f,b,p,E))):Pu(x,f,b,p,E)}return c?C_(y,p,f,h,s.value,e):y.length?Promise.all(y).then(()=>f):f}}),CL=W("$ZodObjectJIT",(e,t)=>{_L.init(e,t);const r=e._zod.parse,s=qm(()=>__(t)),i=b=>{const _=new HP(["shape","payload","ctx"]),E=s.value,x=k=>{const D=$w(k);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};_.write("const input = payload.value;");const C=Object.create(null);let O=0;for(const k of E.keys)C[k]=`key_${O++}`;_.write("const newResult = {};");for(const k of E.keys){const D=C[k],U=$w(k),L=b[k]?._zod?.optout==="optional";_.write(`const ${D} = ${x(k)};`),L?_.write(`
|
|
22
|
-
if (${D}.issues.length) {
|
|
23
|
-
if (${U} in input) {
|
|
24
|
-
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
25
|
-
...iss,
|
|
26
|
-
path: iss.path ? [${U}, ...iss.path] : [${U}]
|
|
27
|
-
})));
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (${D}.value === undefined) {
|
|
32
|
-
if (${U} in input) {
|
|
33
|
-
newResult[${U}] = undefined;
|
|
34
|
-
}
|
|
35
|
-
} else {
|
|
36
|
-
newResult[${U}] = ${D}.value;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
`):_.write(`
|
|
40
|
-
if (${D}.issues.length) {
|
|
41
|
-
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
42
|
-
...iss,
|
|
43
|
-
path: iss.path ? [${U}, ...iss.path] : [${U}]
|
|
44
|
-
})));
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (${D}.value === undefined) {
|
|
48
|
-
if (${U} in input) {
|
|
49
|
-
newResult[${U}] = undefined;
|
|
50
|
-
}
|
|
51
|
-
} else {
|
|
52
|
-
newResult[${U}] = ${D}.value;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
`)}_.write("payload.value = newResult;"),_.write("return payload;");const M=_.compile();return(k,D)=>M(b,k,D)};let c;const u=Du,f=!i_.jitless,p=f&&$4.value,y=t.catchall;let v;e._zod.parse=(b,_)=>{v??(v=s.value);const E=b.value;return u(E)?f&&p&&_?.async===!1&&_.jitless!==!0?(c||(c=i(t.shape)),b=c(b,_),y?C_([],E,b,_,v,e):b):r(b,_):(b.issues.push({expected:"object",code:"invalid_type",input:E,inst:e}),b)}});function qw(e,t,r,s){for(const c of e)if(c.issues.length===0)return t.value=c.value,t;const i=e.filter(c=>!Sa(c));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(c=>c.issues.map(u=>Ro(u,s,Eo())))}),t)}const EL=W("$ZodUnion",(e,t)=>{ht.init(e,t),Ye(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ye(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ye(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Ye(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(c=>c._zod.pattern);return new RegExp(`^(${i.map(c=>Vm(c.source)).join("|")})$`)}});const r=t.options.length===1,s=t.options[0]._zod.run;e._zod.parse=(i,c)=>{if(r)return s(i,c);let u=!1;const f=[];for(const h of t.options){const p=h._zod.run({value:i.value,issues:[]},c);if(p instanceof Promise)f.push(p),u=!0;else{if(p.issues.length===0)return p;f.push(p)}}return u?Promise.all(f).then(h=>qw(h,i,e,c)):qw(f,i,e,c)}}),RL=W("$ZodIntersection",(e,t)=>{ht.init(e,t),e._zod.parse=(r,s)=>{const i=r.value,c=t.left._zod.run({value:i,issues:[]},s),u=t.right._zod.run({value:i,issues:[]},s);return c instanceof Promise||u instanceof Promise?Promise.all([c,u]).then(([h,p])=>Fw(r,h,p)):Fw(r,c,u)}});function Wp(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Pa(e)&&Pa(t)){const r=Object.keys(t),s=Object.keys(e).filter(c=>r.indexOf(c)!==-1),i={...e,...t};for(const c of s){const u=Wp(e[c],t[c]);if(!u.valid)return{valid:!1,mergeErrorPath:[c,...u.mergeErrorPath]};i[c]=u.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let s=0;s<e.length;s++){const i=e[s],c=t[s],u=Wp(i,c);if(!u.valid)return{valid:!1,mergeErrorPath:[s,...u.mergeErrorPath]};r.push(u.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Fw(e,t,r){const s=new Map;let i;for(const f of t.issues)if(f.code==="unrecognized_keys"){i??(i=f);for(const h of f.keys)s.has(h)||s.set(h,{}),s.get(h).l=!0}else e.issues.push(f);for(const f of r.issues)if(f.code==="unrecognized_keys")for(const h of f.keys)s.has(h)||s.set(h,{}),s.get(h).r=!0;else e.issues.push(f);const c=[...s].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(c.length&&i&&e.issues.push({...i,keys:c}),Sa(e))return e;const u=Wp(t.value,r.value);if(!u.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);return e.value=u.data,e}const TL=W("$ZodRecord",(e,t)=>{ht.init(e,t),e._zod.parse=(r,s)=>{const i=r.value;if(!Pa(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),r;const c=[],u=t.keyType._zod.values;if(u){r.value={};const f=new Set;for(const p of u)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){f.add(typeof p=="number"?p.toString():p);const y=t.valueType._zod.run({value:i[p],issues:[]},s);y instanceof Promise?c.push(y.then(v=>{v.issues.length&&r.issues.push(...xa(p,v.issues)),r.value[p]=v.value})):(y.issues.length&&r.issues.push(...xa(p,y.issues)),r.value[p]=y.value)}let h;for(const p in i)f.has(p)||(h=h??[],h.push(p));h&&h.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:h})}else{r.value={};for(const f of Reflect.ownKeys(i)){if(f==="__proto__")continue;let h=t.keyType._zod.run({value:f,issues:[]},s);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&y_.test(f)&&h.issues.length){const v=t.keyType._zod.run({value:Number(f),issues:[]},s);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(h=v)}if(h.issues.length){t.mode==="loose"?r.value[f]=i[f]:r.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(v=>Ro(v,s,Eo())),input:f,path:[f],inst:e});continue}const y=t.valueType._zod.run({value:i[f],issues:[]},s);y instanceof Promise?c.push(y.then(v=>{v.issues.length&&r.issues.push(...xa(f,v.issues)),r.value[h.value]=v.value})):(y.issues.length&&r.issues.push(...xa(f,y.issues)),r.value[h.value]=y.value)}}return c.length?Promise.all(c).then(()=>r):r}}),AL=W("$ZodEnum",(e,t)=>{ht.init(e,t);const r=c_(t.entries),s=new Set(r);e._zod.values=s,e._zod.pattern=new RegExp(`^(${r.filter(i=>U4.has(typeof i)).map(i=>typeof i=="string"?sf(i):i.toString()).join("|")})$`),e._zod.parse=(i,c)=>{const u=i.value;return s.has(u)||i.issues.push({code:"invalid_value",values:r,input:u,inst:e}),i}}),OL=W("$ZodTransform",(e,t)=>{ht.init(e,t),e._zod.parse=(r,s)=>{if(s.direction==="backward")throw new a_(e.constructor.name);const i=t.transform(r.value,r);if(s.async)return(i instanceof Promise?i:Promise.resolve(i)).then(u=>(r.value=u,r));if(i instanceof Promise)throw new ka;return r.value=i,r}});function Vw(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const E_=W("$ZodOptional",(e,t)=>{ht.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ye(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ye(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Vm(r.source)})?$`):void 0}),e._zod.parse=(r,s)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(r,s);return i instanceof Promise?i.then(c=>Vw(c,r.value)):Vw(i,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,s)}}),kL=W("$ZodExactOptional",(e,t)=>{E_.init(e,t),Ye(e._zod,"values",()=>t.innerType._zod.values),Ye(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,s)=>t.innerType._zod.run(r,s)}),ML=W("$ZodNullable",(e,t)=>{ht.init(e,t),Ye(e._zod,"optin",()=>t.innerType._zod.optin),Ye(e._zod,"optout",()=>t.innerType._zod.optout),Ye(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${Vm(r.source)}|null)$`):void 0}),Ye(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,s)=>r.value===null?r:t.innerType._zod.run(r,s)}),NL=W("$ZodDefault",(e,t)=>{ht.init(e,t),e._zod.optin="optional",Ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,s)=>{if(s.direction==="backward")return t.innerType._zod.run(r,s);if(r.value===void 0)return r.value=t.defaultValue,r;const i=t.innerType._zod.run(r,s);return i instanceof Promise?i.then(c=>Hw(c,t)):Hw(i,t)}});function Hw(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const jL=W("$ZodPrefault",(e,t)=>{ht.init(e,t),e._zod.optin="optional",Ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,s)=>(s.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,s))}),zL=W("$ZodNonOptional",(e,t)=>{ht.init(e,t),Ye(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(s=>s!==void 0)):void 0}),e._zod.parse=(r,s)=>{const i=t.innerType._zod.run(r,s);return i instanceof Promise?i.then(c=>Zw(c,e)):Zw(i,e)}});function Zw(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const DL=W("$ZodCatch",(e,t)=>{ht.init(e,t),Ye(e._zod,"optin",()=>t.innerType._zod.optin),Ye(e._zod,"optout",()=>t.innerType._zod.optout),Ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,s)=>{if(s.direction==="backward")return t.innerType._zod.run(r,s);const i=t.innerType._zod.run(r,s);return i instanceof Promise?i.then(c=>(r.value=c.value,c.issues.length&&(r.value=t.catchValue({...r,error:{issues:c.issues.map(u=>Ro(u,s,Eo()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(c=>Ro(c,s,Eo()))},input:r.value}),r.issues=[]),r)}}),PL=W("$ZodPipe",(e,t)=>{ht.init(e,t),Ye(e._zod,"values",()=>t.in._zod.values),Ye(e._zod,"optin",()=>t.in._zod.optin),Ye(e._zod,"optout",()=>t.out._zod.optout),Ye(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,s)=>{if(s.direction==="backward"){const c=t.out._zod.run(r,s);return c instanceof Promise?c.then(u=>nu(u,t.in,s)):nu(c,t.in,s)}const i=t.in._zod.run(r,s);return i instanceof Promise?i.then(c=>nu(c,t.out,s)):nu(i,t.out,s)}});function nu(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}const LL=W("$ZodReadonly",(e,t)=>{ht.init(e,t),Ye(e._zod,"propValues",()=>t.innerType._zod.propValues),Ye(e._zod,"values",()=>t.innerType._zod.values),Ye(e._zod,"optin",()=>t.innerType?._zod?.optin),Ye(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,s)=>{if(s.direction==="backward")return t.innerType._zod.run(r,s);const i=t.innerType._zod.run(r,s);return i instanceof Promise?i.then(Qw):Qw(i)}});function Qw(e){return e.value=Object.freeze(e.value),e}const IL=W("$ZodCustom",(e,t)=>{an.init(e,t),ht.init(e,t),e._zod.parse=(r,s)=>r,e._zod.check=r=>{const s=r.value,i=t.fn(s);if(i instanceof Promise)return i.then(c=>Gw(c,r,s,e));Gw(i,r,s,e)}});function Gw(e,t,r,s){if(!e){const i={code:"custom",input:r,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(i.params=s._zod.def.params),t.issues.push(hc(i))}}var Yw;class $L{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const s=r[0];return this._map.set(t,s),s&&typeof s=="object"&&"id"in s&&this._idmap.set(s.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const s={...this.get(r)??{}};delete s.id;const i={...s,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function UL(){return new $L}(Yw=globalThis).__zod_globalRegistry??(Yw.__zod_globalRegistry=UL());const Ki=globalThis.__zod_globalRegistry;function BL(e,t){return new e({type:"string",...we(t)})}function qL(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...we(t)})}function Kw(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...we(t)})}function FL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...we(t)})}function VL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...we(t)})}function HL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...we(t)})}function ZL(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...we(t)})}function QL(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...we(t)})}function GL(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...we(t)})}function YL(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...we(t)})}function KL(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...we(t)})}function XL(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...we(t)})}function JL(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...we(t)})}function WL(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...we(t)})}function e5(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...we(t)})}function t5(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...we(t)})}function n5(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...we(t)})}function r5(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...we(t)})}function o5(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...we(t)})}function s5(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...we(t)})}function a5(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...we(t)})}function i5(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...we(t)})}function c5(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...we(t)})}function l5(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...we(t)})}function u5(e,t){return new e({type:"string",format:"date",check:"string_format",...we(t)})}function f5(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...we(t)})}function d5(e,t){return new e({type:"string",format:"duration",check:"string_format",...we(t)})}function h5(e,t){return new e({type:"number",checks:[],...we(t)})}function p5(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...we(t)})}function m5(e,t){return new e({type:"boolean",...we(t)})}function g5(e){return new e({type:"unknown"})}function y5(e,t){return new e({type:"never",...we(t)})}function Xw(e,t){return new b_({check:"less_than",...we(t),value:e,inclusive:!1})}function Sp(e,t){return new b_({check:"less_than",...we(t),value:e,inclusive:!0})}function Jw(e,t){return new w_({check:"greater_than",...we(t),value:e,inclusive:!1})}function xp(e,t){return new w_({check:"greater_than",...we(t),value:e,inclusive:!0})}function Ww(e,t){return new jP({check:"multiple_of",...we(t),value:e})}function R_(e,t){return new DP({check:"max_length",...we(t),maximum:e})}function Lu(e,t){return new PP({check:"min_length",...we(t),minimum:e})}function T_(e,t){return new LP({check:"length_equals",...we(t),length:e})}function v5(e,t){return new IP({check:"string_format",format:"regex",...we(t),pattern:e})}function b5(e){return new $P({check:"string_format",format:"lowercase",...we(e)})}function w5(e){return new UP({check:"string_format",format:"uppercase",...we(e)})}function S5(e,t){return new BP({check:"string_format",format:"includes",...we(t),includes:e})}function x5(e,t){return new qP({check:"string_format",format:"starts_with",...we(t),prefix:e})}function _5(e,t){return new FP({check:"string_format",format:"ends_with",...we(t),suffix:e})}function qa(e){return new VP({check:"overwrite",tx:e})}function C5(e){return qa(t=>t.normalize(e))}function E5(){return qa(e=>e.trim())}function R5(){return qa(e=>e.toLowerCase())}function T5(){return qa(e=>e.toUpperCase())}function A5(){return qa(e=>I4(e))}function O5(e,t,r){return new e({type:"array",element:t,...we(r)})}function k5(e,t,r){return new e({type:"custom",check:"custom",fn:t,...we(r)})}function M5(e){const t=N5(r=>(r.addIssue=s=>{if(typeof s=="string")r.issues.push(hc(s,r.value,t._zod.def));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),r.issues.push(hc(i))}},e(r.value,r)));return t}function N5(e,t){const r=new an({check:"custom",...we(t)});return r._zod.check=e,r}function A_(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Ki,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Et(e,t,r={path:[],schemaPath:[]}){var s;const i=e._zod.def,c=t.seen.get(e);if(c)return c.count++,r.schemaPath.includes(e)&&(c.cycle=r.path),c.schema;const u={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,u);const f=e._zod.toJSONSchema?.();if(f)u.schema=f;else{const y={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,u.schema,y);else{const b=u.schema,_=t.processors[i.type];if(!_)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);_(e,t,b,y)}const v=e._zod.parent;v&&(u.ref||(u.ref=v),Et(v,t,y),t.seen.get(v).isParent=!0)}const h=t.metadataRegistry.get(e);return h&&Object.assign(u.schema,h),t.io==="input"&&Zt(e)&&(delete u.schema.examples,delete u.schema.default),t.io==="input"&&u.schema._prefault&&((s=u.schema).default??(s.default=u.schema._prefault)),delete u.schema._prefault,t.seen.get(e).schema}function O_(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=new Map;for(const u of e.seen.entries()){const f=e.metadataRegistry.get(u[0])?.id;if(f){const h=s.get(f);if(h&&h!==u[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(f,u[0])}}const i=u=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const v=e.external.registry.get(u[0])?.id,b=e.external.uri??(E=>E);if(v)return{ref:b(v)};const _=u[1].defId??u[1].schema.id??`schema${e.counter++}`;return u[1].defId=_,{defId:_,ref:`${b("__shared")}#/${f}/${_}`}}if(u[1]===r)return{ref:"#"};const p=`#/${f}/`,y=u[1].schema.id??`__schema${e.counter++}`;return{defId:y,ref:p+y}},c=u=>{if(u[1].schema.$ref)return;const f=u[1],{ref:h,defId:p}=i(u);f.def={...f.schema},p&&(f.defId=p);const y=f.schema;for(const v in y)delete y[v];y.$ref=h};if(e.cycles==="throw")for(const u of e.seen.entries()){const f=u[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
|
|
56
|
-
|
|
57
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of e.seen.entries()){const f=u[1];if(t===u[0]){c(u);continue}if(e.external){const p=e.external.registry.get(u[0])?.id;if(t!==u[0]&&p){c(u);continue}}if(e.metadataRegistry.get(u[0])?.id){c(u);continue}if(f.cycle){c(u);continue}if(f.count>1&&e.reused==="ref"){c(u);continue}}}function k_(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=u=>{const f=e.seen.get(u);if(f.ref===null)return;const h=f.def??f.schema,p={...h},y=f.ref;if(f.ref=null,y){s(y);const b=e.seen.get(y),_=b.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(_)):Object.assign(h,_),Object.assign(h,p),u._zod.parent===y)for(const x in h)x==="$ref"||x==="allOf"||x in p||delete h[x];if(_.$ref&&b.def)for(const x in h)x==="$ref"||x==="allOf"||x in b.def&&JSON.stringify(h[x])===JSON.stringify(b.def[x])&&delete h[x]}const v=u._zod.parent;if(v&&v!==y){s(v);const b=e.seen.get(v);if(b?.schema.$ref&&(h.$ref=b.schema.$ref,b.def))for(const _ in h)_==="$ref"||_==="allOf"||_ in b.def&&JSON.stringify(h[_])===JSON.stringify(b.def[_])&&delete h[_]}e.override({zodSchema:u,jsonSchema:h,path:f.path??[]})};for(const u of[...e.seen.entries()].reverse())s(u[0]);const i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(u)}Object.assign(i,r.def??r.schema);const c=e.external?.defs??{};for(const u of e.seen.entries()){const f=u[1];f.def&&f.defId&&(c[f.defId]=f.def)}e.external||Object.keys(c).length>0&&(e.target==="draft-2020-12"?i.$defs=c:i.definitions=c);try{const u=JSON.parse(JSON.stringify(i));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:Iu(t,"input",e.processors),output:Iu(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function Zt(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const s=e._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return Zt(s.element,r);if(s.type==="set")return Zt(s.valueType,r);if(s.type==="lazy")return Zt(s.getter(),r);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault")return Zt(s.innerType,r);if(s.type==="intersection")return Zt(s.left,r)||Zt(s.right,r);if(s.type==="record"||s.type==="map")return Zt(s.keyType,r)||Zt(s.valueType,r);if(s.type==="pipe")return Zt(s.in,r)||Zt(s.out,r);if(s.type==="object"){for(const i in s.shape)if(Zt(s.shape[i],r))return!0;return!1}if(s.type==="union"){for(const i of s.options)if(Zt(i,r))return!0;return!1}if(s.type==="tuple"){for(const i of s.items)if(Zt(i,r))return!0;return!!(s.rest&&Zt(s.rest,r))}return!1}const j5=(e,t={})=>r=>{const s=A_({...r,processors:t});return Et(e,s),O_(s,e),k_(s,e)},Iu=(e,t,r={})=>s=>{const{libraryOptions:i,target:c}=s??{},u=A_({...i??{},target:c,io:t,processors:r});return Et(e,u),O_(u,e),k_(u,e)},z5={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},D5=(e,t,r,s)=>{const i=r;i.type="string";const{minimum:c,maximum:u,format:f,patterns:h,contentEncoding:p}=e._zod.bag;if(typeof c=="number"&&(i.minLength=c),typeof u=="number"&&(i.maxLength=u),f&&(i.format=z5[f]??f,i.format===""&&delete i.format,f==="time"&&delete i.format),p&&(i.contentEncoding=p),h&&h.size>0){const y=[...h];y.length===1?i.pattern=y[0].source:y.length>1&&(i.allOf=[...y.map(v=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},P5=(e,t,r,s)=>{const i=r,{minimum:c,maximum:u,format:f,multipleOf:h,exclusiveMaximum:p,exclusiveMinimum:y}=e._zod.bag;typeof f=="string"&&f.includes("int")?i.type="integer":i.type="number",typeof y=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.minimum=y,i.exclusiveMinimum=!0):i.exclusiveMinimum=y),typeof c=="number"&&(i.minimum=c,typeof y=="number"&&t.target!=="draft-04"&&(y>=c?delete i.minimum:delete i.exclusiveMinimum)),typeof p=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(i.maximum=p,i.exclusiveMaximum=!0):i.exclusiveMaximum=p),typeof u=="number"&&(i.maximum=u,typeof p=="number"&&t.target!=="draft-04"&&(p<=u?delete i.maximum:delete i.exclusiveMaximum)),typeof h=="number"&&(i.multipleOf=h)},L5=(e,t,r,s)=>{r.type="boolean"},I5=(e,t,r,s)=>{r.not={}},$5=(e,t,r,s)=>{},U5=(e,t,r,s)=>{const i=e._zod.def,c=c_(i.entries);c.every(u=>typeof u=="number")&&(r.type="number"),c.every(u=>typeof u=="string")&&(r.type="string"),r.enum=c},B5=(e,t,r,s)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},q5=(e,t,r,s)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},F5=(e,t,r,s)=>{const i=r,c=e._zod.def,{minimum:u,maximum:f}=e._zod.bag;typeof u=="number"&&(i.minItems=u),typeof f=="number"&&(i.maxItems=f),i.type="array",i.items=Et(c.element,t,{...s,path:[...s.path,"items"]})},V5=(e,t,r,s)=>{const i=r,c=e._zod.def;i.type="object",i.properties={};const u=c.shape;for(const p in u)i.properties[p]=Et(u[p],t,{...s,path:[...s.path,"properties",p]});const f=new Set(Object.keys(u)),h=new Set([...f].filter(p=>{const y=c.shape[p]._zod;return t.io==="input"?y.optin===void 0:y.optout===void 0}));h.size>0&&(i.required=Array.from(h)),c.catchall?._zod.def.type==="never"?i.additionalProperties=!1:c.catchall?c.catchall&&(i.additionalProperties=Et(c.catchall,t,{...s,path:[...s.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},H5=(e,t,r,s)=>{const i=e._zod.def,c=i.inclusive===!1,u=i.options.map((f,h)=>Et(f,t,{...s,path:[...s.path,c?"oneOf":"anyOf",h]}));c?r.oneOf=u:r.anyOf=u},Z5=(e,t,r,s)=>{const i=e._zod.def,c=Et(i.left,t,{...s,path:[...s.path,"allOf",0]}),u=Et(i.right,t,{...s,path:[...s.path,"allOf",1]}),f=p=>"allOf"in p&&Object.keys(p).length===1,h=[...f(c)?c.allOf:[c],...f(u)?u.allOf:[u]];r.allOf=h},Q5=(e,t,r,s)=>{const i=r,c=e._zod.def;i.type="object";const u=c.keyType,h=u._zod.bag?.patterns;if(c.mode==="loose"&&h&&h.size>0){const y=Et(c.valueType,t,{...s,path:[...s.path,"patternProperties","*"]});i.patternProperties={};for(const v of h)i.patternProperties[v.source]=y}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=Et(c.keyType,t,{...s,path:[...s.path,"propertyNames"]})),i.additionalProperties=Et(c.valueType,t,{...s,path:[...s.path,"additionalProperties"]});const p=u._zod.values;if(p){const y=[...p].filter(v=>typeof v=="string"||typeof v=="number");y.length>0&&(i.required=y)}},G5=(e,t,r,s)=>{const i=e._zod.def,c=Et(i.innerType,t,s),u=t.seen.get(e);t.target==="openapi-3.0"?(u.ref=i.innerType,r.nullable=!0):r.anyOf=[c,{type:"null"}]},Y5=(e,t,r,s)=>{const i=e._zod.def;Et(i.innerType,t,s);const c=t.seen.get(e);c.ref=i.innerType},K5=(e,t,r,s)=>{const i=e._zod.def;Et(i.innerType,t,s);const c=t.seen.get(e);c.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},X5=(e,t,r,s)=>{const i=e._zod.def;Et(i.innerType,t,s);const c=t.seen.get(e);c.ref=i.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},J5=(e,t,r,s)=>{const i=e._zod.def;Et(i.innerType,t,s);const c=t.seen.get(e);c.ref=i.innerType;let u;try{u=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=u},W5=(e,t,r,s)=>{const i=e._zod.def,c=t.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Et(c,t,s);const u=t.seen.get(e);u.ref=c},e6=(e,t,r,s)=>{const i=e._zod.def;Et(i.innerType,t,s);const c=t.seen.get(e);c.ref=i.innerType,r.readOnly=!0},M_=(e,t,r,s)=>{const i=e._zod.def;Et(i.innerType,t,s);const c=t.seen.get(e);c.ref=i.innerType},t6=W("ZodISODateTime",(e,t)=>{oL.init(e,t),ut.init(e,t)});function n6(e){return l5(t6,e)}const r6=W("ZodISODate",(e,t)=>{sL.init(e,t),ut.init(e,t)});function o6(e){return u5(r6,e)}const s6=W("ZodISOTime",(e,t)=>{aL.init(e,t),ut.init(e,t)});function a6(e){return f5(s6,e)}const i6=W("ZodISODuration",(e,t)=>{iL.init(e,t),ut.init(e,t)});function c6(e){return d5(i6,e)}const l6=(e,t)=>{d_.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>X4(e,r)},flatten:{value:r=>K4(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Jp,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Jp,2)}},isEmpty:{get(){return e.issues.length===0}}})},$n=W("ZodError",l6,{Parent:Error}),u6=Zm($n),f6=Qm($n),d6=af($n),h6=cf($n),p6=eP($n),m6=tP($n),g6=nP($n),y6=rP($n),v6=oP($n),b6=sP($n),w6=aP($n),S6=iP($n),pt=W("ZodType",(e,t)=>(ht.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Iu(e,"input"),output:Iu(e,"output")}}),e.toJSONSchema=j5(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(jo(t,{checks:[...t.checks??[],...r.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0}),e.with=e.check,e.clone=(r,s)=>zo(e,r,s),e.brand=()=>e,e.register=((r,s)=>(r.add(e,s),e)),e.parse=(r,s)=>u6(e,r,s,{callee:e.parse}),e.safeParse=(r,s)=>d6(e,r,s),e.parseAsync=async(r,s)=>f6(e,r,s,{callee:e.parseAsync}),e.safeParseAsync=async(r,s)=>h6(e,r,s),e.spa=e.safeParseAsync,e.encode=(r,s)=>p6(e,r,s),e.decode=(r,s)=>m6(e,r,s),e.encodeAsync=async(r,s)=>g6(e,r,s),e.decodeAsync=async(r,s)=>y6(e,r,s),e.safeEncode=(r,s)=>v6(e,r,s),e.safeDecode=(r,s)=>b6(e,r,s),e.safeEncodeAsync=async(r,s)=>w6(e,r,s),e.safeDecodeAsync=async(r,s)=>S6(e,r,s),e.refine=(r,s)=>e.check(gI(r,s)),e.superRefine=r=>e.check(yI(r)),e.overwrite=r=>e.check(qa(r)),e.optional=()=>rS(e),e.exactOptional=()=>rI(e),e.nullable=()=>oS(e),e.nullish=()=>rS(oS(e)),e.nonoptional=r=>lI(e,r),e.array=()=>z_(e),e.or=r=>Y6([e,r]),e.and=r=>X6(e,r),e.transform=r=>sS(e,tI(r)),e.default=r=>aI(e,r),e.prefault=r=>cI(e,r),e.catch=r=>fI(e,r),e.pipe=r=>sS(e,r),e.readonly=()=>pI(e),e.describe=r=>{const s=e.clone();return Ki.add(s,{description:r}),s},Object.defineProperty(e,"description",{get(){return Ki.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Ki.get(e);const s=e.clone();return Ki.add(s,r[0]),s},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),N_=W("_ZodString",(e,t)=>{Gm.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(s,i,c)=>D5(e,s,i);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...s)=>e.check(v5(...s)),e.includes=(...s)=>e.check(S5(...s)),e.startsWith=(...s)=>e.check(x5(...s)),e.endsWith=(...s)=>e.check(_5(...s)),e.min=(...s)=>e.check(Lu(...s)),e.max=(...s)=>e.check(R_(...s)),e.length=(...s)=>e.check(T_(...s)),e.nonempty=(...s)=>e.check(Lu(1,...s)),e.lowercase=s=>e.check(b5(s)),e.uppercase=s=>e.check(w5(s)),e.trim=()=>e.check(E5()),e.normalize=(...s)=>e.check(C5(...s)),e.toLowerCase=()=>e.check(R5()),e.toUpperCase=()=>e.check(T5()),e.slugify=()=>e.check(A5())}),x6=W("ZodString",(e,t)=>{Gm.init(e,t),N_.init(e,t),e.email=r=>e.check(qL(_6,r)),e.url=r=>e.check(QL(C6,r)),e.jwt=r=>e.check(c5($6,r)),e.emoji=r=>e.check(GL(E6,r)),e.guid=r=>e.check(Kw(eS,r)),e.uuid=r=>e.check(FL(ru,r)),e.uuidv4=r=>e.check(VL(ru,r)),e.uuidv6=r=>e.check(HL(ru,r)),e.uuidv7=r=>e.check(ZL(ru,r)),e.nanoid=r=>e.check(YL(R6,r)),e.guid=r=>e.check(Kw(eS,r)),e.cuid=r=>e.check(KL(T6,r)),e.cuid2=r=>e.check(XL(A6,r)),e.ulid=r=>e.check(JL(O6,r)),e.base64=r=>e.check(s5(P6,r)),e.base64url=r=>e.check(a5(L6,r)),e.xid=r=>e.check(WL(k6,r)),e.ksuid=r=>e.check(e5(M6,r)),e.ipv4=r=>e.check(t5(N6,r)),e.ipv6=r=>e.check(n5(j6,r)),e.cidrv4=r=>e.check(r5(z6,r)),e.cidrv6=r=>e.check(o5(D6,r)),e.e164=r=>e.check(i5(I6,r)),e.datetime=r=>e.check(n6(r)),e.date=r=>e.check(o6(r)),e.time=r=>e.check(a6(r)),e.duration=r=>e.check(c6(r))});function ar(e){return BL(x6,e)}const ut=W("ZodStringFormat",(e,t)=>{ct.init(e,t),N_.init(e,t)}),_6=W("ZodEmail",(e,t)=>{YP.init(e,t),ut.init(e,t)}),eS=W("ZodGUID",(e,t)=>{QP.init(e,t),ut.init(e,t)}),ru=W("ZodUUID",(e,t)=>{GP.init(e,t),ut.init(e,t)}),C6=W("ZodURL",(e,t)=>{KP.init(e,t),ut.init(e,t)}),E6=W("ZodEmoji",(e,t)=>{XP.init(e,t),ut.init(e,t)}),R6=W("ZodNanoID",(e,t)=>{JP.init(e,t),ut.init(e,t)}),T6=W("ZodCUID",(e,t)=>{WP.init(e,t),ut.init(e,t)}),A6=W("ZodCUID2",(e,t)=>{eL.init(e,t),ut.init(e,t)}),O6=W("ZodULID",(e,t)=>{tL.init(e,t),ut.init(e,t)}),k6=W("ZodXID",(e,t)=>{nL.init(e,t),ut.init(e,t)}),M6=W("ZodKSUID",(e,t)=>{rL.init(e,t),ut.init(e,t)}),N6=W("ZodIPv4",(e,t)=>{cL.init(e,t),ut.init(e,t)}),j6=W("ZodIPv6",(e,t)=>{lL.init(e,t),ut.init(e,t)}),z6=W("ZodCIDRv4",(e,t)=>{uL.init(e,t),ut.init(e,t)}),D6=W("ZodCIDRv6",(e,t)=>{fL.init(e,t),ut.init(e,t)}),P6=W("ZodBase64",(e,t)=>{dL.init(e,t),ut.init(e,t)}),L6=W("ZodBase64URL",(e,t)=>{pL.init(e,t),ut.init(e,t)}),I6=W("ZodE164",(e,t)=>{mL.init(e,t),ut.init(e,t)}),$6=W("ZodJWT",(e,t)=>{yL.init(e,t),ut.init(e,t)}),j_=W("ZodNumber",(e,t)=>{x_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(s,i,c)=>P5(e,s,i),e.gt=(s,i)=>e.check(Jw(s,i)),e.gte=(s,i)=>e.check(xp(s,i)),e.min=(s,i)=>e.check(xp(s,i)),e.lt=(s,i)=>e.check(Xw(s,i)),e.lte=(s,i)=>e.check(Sp(s,i)),e.max=(s,i)=>e.check(Sp(s,i)),e.int=s=>e.check(tS(s)),e.safe=s=>e.check(tS(s)),e.positive=s=>e.check(Jw(0,s)),e.nonnegative=s=>e.check(xp(0,s)),e.negative=s=>e.check(Xw(0,s)),e.nonpositive=s=>e.check(Sp(0,s)),e.multipleOf=(s,i)=>e.check(Ww(s,i)),e.step=(s,i)=>e.check(Ww(s,i)),e.finite=()=>e;const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function U6(e){return h5(j_,e)}const B6=W("ZodNumberFormat",(e,t)=>{vL.init(e,t),j_.init(e,t)});function tS(e){return p5(B6,e)}const q6=W("ZodBoolean",(e,t)=>{bL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>L5(e,r,s)});function Zn(e){return m5(q6,e)}const F6=W("ZodUnknown",(e,t)=>{wL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>$5()});function nS(){return g5(F6)}const V6=W("ZodNever",(e,t)=>{SL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>I5(e,r,s)});function H6(e){return y5(V6,e)}const Z6=W("ZodArray",(e,t)=>{xL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>F5(e,r,s,i),e.element=t.element,e.min=(r,s)=>e.check(Lu(r,s)),e.nonempty=r=>e.check(Lu(1,r)),e.max=(r,s)=>e.check(R_(r,s)),e.length=(r,s)=>e.check(T_(r,s)),e.unwrap=()=>e.element});function z_(e,t){return O5(Z6,e,t)}const Q6=W("ZodObject",(e,t)=>{CL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>V5(e,r,s,i),Ye(e,"shape",()=>t.shape),e.keyof=()=>Ym(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:nS()}),e.loose=()=>e.clone({...e._zod.def,catchall:nS()}),e.strict=()=>e.clone({...e._zod.def,catchall:H6()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>H4(e,r),e.safeExtend=r=>Z4(e,r),e.merge=r=>Q4(e,r),e.pick=r=>F4(e,r),e.omit=r=>V4(e,r),e.partial=(...r)=>G4(D_,e,r[0]),e.required=(...r)=>Y4(P_,e,r[0])});function Fa(e,t){const r={type:"object",shape:e??{},...we(t)};return new Q6(r)}const G6=W("ZodUnion",(e,t)=>{EL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>H5(e,r,s,i),e.options=t.options});function Y6(e,t){return new G6({type:"union",options:e,...we(t)})}const K6=W("ZodIntersection",(e,t)=>{RL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>Z5(e,r,s,i)});function X6(e,t){return new K6({type:"intersection",left:e,right:t})}const J6=W("ZodRecord",(e,t)=>{TL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>Q5(e,r,s,i),e.keyType=t.keyType,e.valueType=t.valueType});function W6(e,t,r){return new J6({type:"record",keyType:e,valueType:t,...we(r)})}const em=W("ZodEnum",(e,t)=>{AL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(s,i,c)=>U5(e,s,i),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(s,i)=>{const c={};for(const u of s)if(r.has(u))c[u]=t.entries[u];else throw new Error(`Key ${u} not found in enum`);return new em({...t,checks:[],...we(i),entries:c})},e.exclude=(s,i)=>{const c={...t.entries};for(const u of s)if(r.has(u))delete c[u];else throw new Error(`Key ${u} not found in enum`);return new em({...t,checks:[],...we(i),entries:c})}});function Ym(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(s=>[s,s])):e;return new em({type:"enum",entries:r,...we(t)})}const eI=W("ZodTransform",(e,t)=>{OL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>q5(e,r),e._zod.parse=(r,s)=>{if(s.direction==="backward")throw new a_(e.constructor.name);r.addIssue=c=>{if(typeof c=="string")r.issues.push(hc(c,r.value,t));else{const u=c;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=r.value),u.inst??(u.inst=e),r.issues.push(hc(u))}};const i=t.transform(r.value,r);return i instanceof Promise?i.then(c=>(r.value=c,r)):(r.value=i,r)}});function tI(e){return new eI({type:"transform",transform:e})}const D_=W("ZodOptional",(e,t)=>{E_.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>M_(e,r,s,i),e.unwrap=()=>e._zod.def.innerType});function rS(e){return new D_({type:"optional",innerType:e})}const nI=W("ZodExactOptional",(e,t)=>{kL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>M_(e,r,s,i),e.unwrap=()=>e._zod.def.innerType});function rI(e){return new nI({type:"optional",innerType:e})}const oI=W("ZodNullable",(e,t)=>{ML.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>G5(e,r,s,i),e.unwrap=()=>e._zod.def.innerType});function oS(e){return new oI({type:"nullable",innerType:e})}const sI=W("ZodDefault",(e,t)=>{NL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>K5(e,r,s,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function aI(e,t){return new sI({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():u_(t)}})}const iI=W("ZodPrefault",(e,t)=>{jL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>X5(e,r,s,i),e.unwrap=()=>e._zod.def.innerType});function cI(e,t){return new iI({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():u_(t)}})}const P_=W("ZodNonOptional",(e,t)=>{zL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>Y5(e,r,s,i),e.unwrap=()=>e._zod.def.innerType});function lI(e,t){return new P_({type:"nonoptional",innerType:e,...we(t)})}const uI=W("ZodCatch",(e,t)=>{DL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>J5(e,r,s,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function fI(e,t){return new uI({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const dI=W("ZodPipe",(e,t)=>{PL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>W5(e,r,s,i),e.in=t.in,e.out=t.out});function sS(e,t){return new dI({type:"pipe",in:e,out:t})}const hI=W("ZodReadonly",(e,t)=>{LL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>e6(e,r,s,i),e.unwrap=()=>e._zod.def.innerType});function pI(e){return new hI({type:"readonly",innerType:e})}const mI=W("ZodCustom",(e,t)=>{IL.init(e,t),pt.init(e,t),e._zod.processJSONSchema=(r,s,i)=>B5(e,r)});function gI(e,t={}){return k5(mI,e,t)}function yI(e){return M5(e)}const vI=Fa({id:ar(),path:ar(),label:ar(),icon:ar(),visible:Zn().default(!0),section:Ym(["main","config"]).default("main"),badge:ar().optional(),exact:Zn().optional()}),aS=Fa({appName:ar().default("Convex CMS"),logo:ar().optional(),favicon:ar().optional()}),iS=Fa({sidebarWidth:U6().min(200).max(400).default(256),sidebarCollapsible:Zn().default(!1)}),cS=Fa({showDashboard:Zn().default(!0),showContent:Zn().default(!0),showMedia:Zn().default(!0),showTaxonomies:Zn().default(!0),showContentTypes:Zn().default(!0),showTrash:Zn().default(!0),showSettings:Zn().default(!0),customItems:z_(vI).default([])}),lS=Fa({mode:Ym(["light","dark","system"]).default("system"),allowModeSwitch:Zn().default(!0),tokens:W6(ar(),ar()).optional()}),bI=Fa({branding:aS.default(()=>aS.parse({})),layout:iS.default(()=>iS.parse({})),navigation:cS.default(()=>cS.parse({})),theme:lS.default(()=>lS.parse({}))}),wI=[{id:"dashboard",path:"/",label:"Dashboard",icon:"LayoutDashboard",section:"main",exact:!0},{id:"content",path:"/content",label:"Content",icon:"FileText",section:"main"},{id:"media",path:"/media",label:"Media",icon:"Image",section:"main"},{id:"taxonomies",path:"/taxonomies",label:"Taxonomies",icon:"Tags",section:"main"},{id:"content-types",path:"/content-types",label:"Content Types",icon:"Layers",section:"config"},{id:"trash",path:"/trash",label:"Trash",icon:"Trash2",section:"config"},{id:"settings",path:"/settings",label:"Settings",icon:"Settings",section:"config"}];function SI(e){return bI.parse(e??{})}function xI(e){const t={dashboard:e.navigation.showDashboard,content:e.navigation.showContent,media:e.navigation.showMedia,taxonomies:e.navigation.showTaxonomies,"content-types":e.navigation.showContentTypes,trash:e.navigation.showTrash,settings:e.navigation.showSettings},s=[...wI.filter(i=>t[i.id]!==!1),...e.navigation.customItems.filter(i=>i.visible!==!1)];return{main:s.filter(i=>i.section==="main"),config:s.filter(i=>i.section==="config")}}const L_=w.createContext(null);function _I({config:e,children:t}){const r=xI(e),s={...e,navItems:r};return g.jsx(L_.Provider,{value:s,children:t})}function Km(){const e=w.useContext(L_);if(!e)throw new Error("useAdminConfig must be used within AdminConfigProvider");return e}function I_(e,t){const r={get(s,i){if(typeof i=="string"){const c=[...t,i];return I_(e,c)}else if(i===x1){if(t.length<1){const c=[e,...t].join(".");throw new Error(`API path is expected to be of the form \`${e}.childComponent.functionName\`. Found: \`${c}\``)}return"_reference/childComponent/"+t.join("/")}else return}};return new Proxy({},r)}const CI=()=>I_("components",[]),$u=Zj;CI();const $_=w.createContext(null);function EI({baseConfig:e,children:t,api:r}){const s=r??$u.admin,i=A1(s.getSettings),c=w.useMemo(()=>i?{...e,navigation:{...e.navigation,showMedia:e.navigation.showMedia&&i.features.mediaManagement}}:e,[e,i]),u=w.useMemo(()=>({baseConfig:e,settings:i}),[e,i]);return g.jsx($_.Provider,{value:u,children:g.jsx(_I,{config:c,children:t})})}function C7(){const e=w.useContext($_);if(!e)throw new Error("useSettingsConfig must be used within SettingsConfigProvider");return e}const U_=w.createContext(null);function RI({children:e}){const[t,r]=w.useState(new Map),s=w.useCallback((u,f)=>{r(h=>{const p=new Map(h);return p.set(u,f),p})},[]),i=w.useCallback(u=>{r(f=>{const h=new Map(f);return h.delete(u),h})},[]),c=w.useMemo(()=>({overrides:t,setOverride:s,clearOverride:i}),[t,s,i]);return g.jsx(U_.Provider,{value:c,children:e})}function TI(){const e=w.useContext(U_);if(!e)throw new Error("useBreadcrumbContext must be used within a BreadcrumbProvider");return e}const AI={LayoutDashboard:H3,FileText:T3,Image:P1,Layers:L1,Tags:RD,FileCode:E3,Settings:gD,Trash2:MD,HelpCircle:j1,Home:D1,User:U1,Bell:Yp,Lock:tD,Globe:L3,Calendar:Kp,Clock:h3,Link:Y3,Hash:z1,ToggleLeft:$1,ChevronDown:_s,CheckSquare:vD,Braces:k1,Folder:D3,MapPin:iD,DollarSign:b3,Mail:sD,Phone:hD,Package:fD,Star:xD,Heart:U3,Flag:M3,Bookmark:t3,Archive:Kz,Edit:wD,Eye:_3,AlertCircle:u3};function uS({name:e,className:t="size-5"}){const r=AI[e];return r?g.jsx(r,{className:t}):null}function he(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e?.(i),r===!1||!i.defaultPrevented)return t?.(i)}}function OI(e,t){const r=w.createContext(t),s=c=>{const{children:u,...f}=c,h=w.useMemo(()=>f,Object.values(f));return g.jsx(r.Provider,{value:h,children:u})};s.displayName=e+"Provider";function i(c){const u=w.useContext(r);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${c}\` must be used within \`${e}\``)}return[s,i]}function hr(e,t=[]){let r=[];function s(c,u){const f=w.createContext(u),h=r.length;r=[...r,u];const p=v=>{const{scope:b,children:_,...E}=v,x=b?.[e]?.[h]||f,C=w.useMemo(()=>E,Object.values(E));return g.jsx(x.Provider,{value:C,children:_})};p.displayName=c+"Provider";function y(v,b){const _=b?.[e]?.[h]||f,E=w.useContext(_);if(E)return E;if(u!==void 0)return u;throw new Error(`\`${v}\` must be used within \`${c}\``)}return[p,y]}const i=()=>{const c=r.map(u=>w.createContext(u));return function(f){const h=f?.[e]||c;return w.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return i.scopeName=e,[s,kI(i,...t)]}function kI(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const s=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(c){const u=s.reduce((f,{useScope:h,scopeName:p})=>{const v=h(c)[`__scope${p}`];return{...f,...v}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var Rt=globalThis?.document?w.useLayoutEffect:()=>{},MI=Yu[" useInsertionEffect ".trim().toString()]||Rt;function To({prop:e,defaultProp:t,onChange:r=()=>{},caller:s}){const[i,c,u]=NI({defaultProp:t,onChange:r}),f=e!==void 0,h=f?e:i;{const y=w.useRef(e!==void 0);w.useEffect(()=>{const v=y.current;v!==f&&console.warn(`${s} is changing from ${v?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=f},[f,s])}const p=w.useCallback(y=>{if(f){const v=jI(y)?y(e):y;v!==e&&u.current?.(v)}else c(y)},[f,e,c,u]);return[h,p]}function NI({defaultProp:e,onChange:t}){const[r,s]=w.useState(e),i=w.useRef(r),c=w.useRef(t);return MI(()=>{c.current=t},[t]),w.useEffect(()=>{i.current!==r&&(c.current?.(r),i.current=r)},[r,i]),[r,s,c]}function jI(e){return typeof e=="function"}function fS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function wc(...e){return t=>{let r=!1;const s=e.map(i=>{const c=fS(i,t);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let i=0;i<s.length;i++){const c=s[i];typeof c=="function"?c():fS(e[i],null)}}}}function Ve(...e){return w.useCallback(wc(...e),e)}function gs(e){const t=zI(e),r=w.forwardRef((s,i)=>{const{children:c,...u}=s,f=w.Children.toArray(c),h=f.find(PI);if(h){const p=h.props.children,y=f.map(v=>v===h?w.Children.count(p)>1?w.Children.only(null):w.isValidElement(p)?p.props.children:null:v);return g.jsx(t,{...u,ref:i,children:w.isValidElement(p)?w.cloneElement(p,void 0,y):null})}return g.jsx(t,{...u,ref:i,children:c})});return r.displayName=`${e}.Slot`,r}function zI(e){const t=w.forwardRef((r,s)=>{const{children:i,...c}=r;if(w.isValidElement(i)){const u=II(i),f=LI(c,i.props);return i.type!==w.Fragment&&(f.ref=s?wc(s,u):u),w.cloneElement(i,f)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var DI=Symbol("radix.slottable");function PI(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===DI}function LI(e,t){const r={...t};for(const s in t){const i=e[s],c=t[s];/^on[A-Z]/.test(s)?i&&c?r[s]=(...f)=>{const h=c(...f);return i(...f),h}:i&&(r[s]=i):s==="style"?r[s]={...i,...c}:s==="className"&&(r[s]=[i,c].filter(Boolean).join(" "))}return{...e,...r}}function II(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var $I=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=$I.reduce((e,t)=>{const r=gs(`Primitive.${t}`),s=w.forwardRef((i,c)=>{const{asChild:u,...f}=i,h=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(h,{...f,ref:c})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function B_(e,t){e&&$a.flushSync(()=>e.dispatchEvent(t))}function UI(e,t){return w.useReducer((r,s)=>t[r][s]??r,e)}var Un=e=>{const{present:t,children:r}=e,s=BI(t),i=typeof r=="function"?r({present:s.isPresent}):w.Children.only(r),c=Ve(s.ref,qI(i));return typeof r=="function"||s.isPresent?w.cloneElement(i,{ref:c}):null};Un.displayName="Presence";function BI(e){const[t,r]=w.useState(),s=w.useRef(null),i=w.useRef(e),c=w.useRef("none"),u=e?"mounted":"unmounted",[f,h]=UI(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const p=ou(s.current);c.current=f==="mounted"?p:"none"},[f]),Rt(()=>{const p=s.current,y=i.current;if(y!==e){const b=c.current,_=ou(p);e?h("MOUNT"):_==="none"||p?.display==="none"?h("UNMOUNT"):h(y&&b!==_?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,h]),Rt(()=>{if(t){let p;const y=t.ownerDocument.defaultView??window,v=_=>{const x=ou(s.current).includes(CSS.escape(_.animationName));if(_.target===t&&x&&(h("ANIMATION_END"),!i.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",p=y.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},b=_=>{_.target===t&&(c.current=ou(s.current))};return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{y.clearTimeout(p),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:w.useCallback(p=>{s.current=p?getComputedStyle(p):null,r(p)},[])}}function ou(e){return e?.animationName||"none"}function qI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var FI=Yu[" useId ".trim().toString()]||(()=>{}),VI=0;function Qn(e){const[t,r]=w.useState(FI());return Rt(()=>{r(s=>s??String(VI++))},[e]),e||(t?`radix-${t}`:"")}var uf="Collapsible",[HI]=hr(uf),[ZI,Xm]=HI(uf),q_=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:s,defaultOpen:i,disabled:c,onOpenChange:u,...f}=e,[h,p]=To({prop:s,defaultProp:i??!1,onChange:u,caller:uf});return g.jsx(ZI,{scope:r,disabled:c,contentId:Qn(),open:h,onOpenToggle:w.useCallback(()=>p(y=>!y),[p]),children:g.jsx(ke.div,{"data-state":Wm(h),"data-disabled":c?"":void 0,...f,ref:t})})});q_.displayName=uf;var F_="CollapsibleTrigger",V_=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,...s}=e,i=Xm(F_,r);return g.jsx(ke.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Wm(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...s,ref:t,onClick:he(e.onClick,i.onOpenToggle)})});V_.displayName=F_;var Jm="CollapsibleContent",H_=w.forwardRef((e,t)=>{const{forceMount:r,...s}=e,i=Xm(Jm,e.__scopeCollapsible);return g.jsx(Un,{present:r||i.open,children:({present:c})=>g.jsx(QI,{...s,ref:t,present:c})})});H_.displayName=Jm;var QI=w.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:s,children:i,...c}=e,u=Xm(Jm,r),[f,h]=w.useState(s),p=w.useRef(null),y=Ve(t,p),v=w.useRef(0),b=v.current,_=w.useRef(0),E=_.current,x=u.open||f,C=w.useRef(x),O=w.useRef(void 0);return w.useEffect(()=>{const M=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(M)},[]),Rt(()=>{const M=p.current;if(M){O.current=O.current||{transitionDuration:M.style.transitionDuration,animationName:M.style.animationName},M.style.transitionDuration="0s",M.style.animationName="none";const k=M.getBoundingClientRect();v.current=k.height,_.current=k.width,C.current||(M.style.transitionDuration=O.current.transitionDuration,M.style.animationName=O.current.animationName),h(s)}},[u.open,s]),g.jsx(ke.div,{"data-state":Wm(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!x,...c,ref:y,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":E?`${E}px`:void 0,...e.style},children:x&&i})});function Wm(e){return e?"open":"closed"}var GI=q_;const YI=GI,KI=V_,XI=H_;function Yn(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...r)=>t.current?.(...r),[])}function JI(e,t=globalThis?.document){const r=Yn(e);w.useEffect(()=>{const s=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[r,t])}var WI="DismissableLayer",tm="dismissableLayer.update",e$="dismissableLayer.pointerDownOutside",t$="dismissableLayer.focusOutside",dS,Z_=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sc=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:c,onInteractOutside:u,onDismiss:f,...h}=e,p=w.useContext(Z_),[y,v]=w.useState(null),b=y?.ownerDocument??globalThis?.document,[,_]=w.useState({}),E=Ve(t,L=>v(L)),x=Array.from(p.layers),[C]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),O=x.indexOf(C),M=y?x.indexOf(y):-1,k=p.layersWithOutsidePointerEventsDisabled.size>0,D=M>=O,U=o$(L=>{const j=L.target,G=[...p.branches].some(ie=>ie.contains(j));!D||G||(i?.(L),u?.(L),L.defaultPrevented||f?.())},b),H=s$(L=>{const j=L.target;[...p.branches].some(ie=>ie.contains(j))||(c?.(L),u?.(L),L.defaultPrevented||f?.())},b);return JI(L=>{M===p.layers.size-1&&(s?.(L),!L.defaultPrevented&&f&&(L.preventDefault(),f()))},b),w.useEffect(()=>{if(y)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(dS=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),hS(),()=>{r&&p.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=dS)}},[y,b,r,p]),w.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),hS())},[y,p]),w.useEffect(()=>{const L=()=>_({});return document.addEventListener(tm,L),()=>document.removeEventListener(tm,L)},[]),g.jsx(ke.div,{...h,ref:E,style:{pointerEvents:k?D?"auto":"none":void 0,...e.style},onFocusCapture:he(e.onFocusCapture,H.onFocusCapture),onBlurCapture:he(e.onBlurCapture,H.onBlurCapture),onPointerDownCapture:he(e.onPointerDownCapture,U.onPointerDownCapture)})});Sc.displayName=WI;var n$="DismissableLayerBranch",r$=w.forwardRef((e,t)=>{const r=w.useContext(Z_),s=w.useRef(null),i=Ve(t,s);return w.useEffect(()=>{const c=s.current;if(c)return r.branches.add(c),()=>{r.branches.delete(c)}},[r.branches]),g.jsx(ke.div,{...e,ref:i})});r$.displayName=n$;function o$(e,t=globalThis?.document){const r=Yn(e),s=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const c=f=>{if(f.target&&!s.current){let h=function(){Q_(e$,r,p,{discrete:!0})};const p={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=h,t.addEventListener("click",i.current,{once:!0})):h()}else t.removeEventListener("click",i.current);s.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",c),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>s.current=!0}}function s$(e,t=globalThis?.document){const r=Yn(e),s=w.useRef(!1);return w.useEffect(()=>{const i=c=>{c.target&&!s.current&&Q_(t$,r,{originalEvent:c},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function hS(){const e=new CustomEvent(tm);document.dispatchEvent(e)}function Q_(e,t,r,{discrete:s}){const i=r.originalEvent.target,c=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),s?B_(i,c):i.dispatchEvent(c)}var _p="focusScope.autoFocusOnMount",Cp="focusScope.autoFocusOnUnmount",pS={bubbles:!1,cancelable:!0},a$="FocusScope",xc=w.forwardRef((e,t)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:c,...u}=e,[f,h]=w.useState(null),p=Yn(i),y=Yn(c),v=w.useRef(null),b=Ve(t,x=>h(x)),_=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(s){let x=function(k){if(_.paused||!f)return;const D=k.target;f.contains(D)?v.current=D:vo(v.current,{select:!0})},C=function(k){if(_.paused||!f)return;const D=k.relatedTarget;D!==null&&(f.contains(D)||vo(v.current,{select:!0}))},O=function(k){if(document.activeElement===document.body)for(const U of k)U.removedNodes.length>0&&vo(f)};document.addEventListener("focusin",x),document.addEventListener("focusout",C);const M=new MutationObserver(O);return f&&M.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",C),M.disconnect()}}},[s,f,_.paused]),w.useEffect(()=>{if(f){gS.add(_);const x=document.activeElement;if(!f.contains(x)){const O=new CustomEvent(_p,pS);f.addEventListener(_p,p),f.dispatchEvent(O),O.defaultPrevented||(i$(d$(G_(f)),{select:!0}),document.activeElement===x&&vo(f))}return()=>{f.removeEventListener(_p,p),setTimeout(()=>{const O=new CustomEvent(Cp,pS);f.addEventListener(Cp,y),f.dispatchEvent(O),O.defaultPrevented||vo(x??document.body,{select:!0}),f.removeEventListener(Cp,y),gS.remove(_)},0)}}},[f,p,y,_]);const E=w.useCallback(x=>{if(!r&&!s||_.paused)return;const C=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,O=document.activeElement;if(C&&O){const M=x.currentTarget,[k,D]=c$(M);k&&D?!x.shiftKey&&O===D?(x.preventDefault(),r&&vo(k,{select:!0})):x.shiftKey&&O===k&&(x.preventDefault(),r&&vo(D,{select:!0})):O===M&&x.preventDefault()}},[r,s,_.paused]);return g.jsx(ke.div,{tabIndex:-1,...u,ref:b,onKeyDown:E})});xc.displayName=a$;function i$(e,{select:t=!1}={}){const r=document.activeElement;for(const s of e)if(vo(s,{select:t}),document.activeElement!==r)return}function c$(e){const t=G_(e),r=mS(t,e),s=mS(t.reverse(),e);return[r,s]}function G_(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function mS(e,t){for(const r of e)if(!l$(r,{upTo:t}))return r}function l$(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function u$(e){return e instanceof HTMLInputElement&&"select"in e}function vo(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&u$(e)&&t&&e.select()}}var gS=f$();function f$(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=yS(e,t),e.unshift(t)},remove(t){e=yS(e,t),e[0]?.resume()}}}function yS(e,t){const r=[...e],s=r.indexOf(t);return s!==-1&&r.splice(s,1),r}function d$(e){return e.filter(t=>t.tagName!=="A")}var h$="Portal",_c=w.forwardRef((e,t)=>{const{container:r,...s}=e,[i,c]=w.useState(!1);Rt(()=>c(!0),[]);const u=r||i&&globalThis?.document?.body;return u?gN.createPortal(g.jsx(ke.div,{...s,ref:t}),u):null});_c.displayName=h$;var Ep=0;function ff(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??vS()),document.body.insertAdjacentElement("beforeend",e[1]??vS()),Ep++,()=>{Ep===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ep--}},[])}function vS(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ir=function(){return ir=Object.assign||function(t){for(var r,s=1,i=arguments.length;s<i;s++){r=arguments[s];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(t[c]=r[c])}return t},ir.apply(this,arguments)};function Y_(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(r[s[i]]=e[s[i]]);return r}function p$(e,t,r){if(r||arguments.length===2)for(var s=0,i=t.length,c;s<i;s++)(c||!(s in t))&&(c||(c=Array.prototype.slice.call(t,0,s)),c[s]=t[s]);return e.concat(c||Array.prototype.slice.call(t))}var mu="right-scroll-bar-position",gu="width-before-scroll-bar",m$="with-scroll-bars-hidden",g$="--removed-body-scroll-bar-size";function Rp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function y$(e,t){var r=w.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(s){var i=r.value;i!==s&&(r.value=s,r.callback(s,i))}}}})[0];return r.callback=t,r.facade}var v$=typeof window<"u"?w.useLayoutEffect:w.useEffect,bS=new WeakMap;function b$(e,t){var r=y$(null,function(s){return e.forEach(function(i){return Rp(i,s)})});return v$(function(){var s=bS.get(r);if(s){var i=new Set(s),c=new Set(e),u=r.current;i.forEach(function(f){c.has(f)||Rp(f,null)}),c.forEach(function(f){i.has(f)||Rp(f,u)})}bS.set(r,e)},[e]),r}function w$(e){return e}function S$(e,t){t===void 0&&(t=w$);var r=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(c){var u=t(c,s);return r.push(u),function(){r=r.filter(function(f){return f!==u})}},assignSyncMedium:function(c){for(s=!0;r.length;){var u=r;r=[],u.forEach(c)}r={push:function(f){return c(f)},filter:function(){return r}}},assignMedium:function(c){s=!0;var u=[];if(r.length){var f=r;r=[],f.forEach(c),u=r}var h=function(){var y=u;u=[],y.forEach(c)},p=function(){return Promise.resolve().then(h)};p(),r={push:function(y){u.push(y),p()},filter:function(y){return u=u.filter(y),r}}}};return i}function x$(e){e===void 0&&(e={});var t=S$(null);return t.options=ir({async:!0,ssr:!1},e),t}var K_=function(e){var t=e.sideCar,r=Y_(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return w.createElement(s,ir({},r))};K_.isSideCarExport=!0;function _$(e,t){return e.useMedium(t),K_}var X_=x$(),Tp=function(){},df=w.forwardRef(function(e,t){var r=w.useRef(null),s=w.useState({onScrollCapture:Tp,onWheelCapture:Tp,onTouchMoveCapture:Tp}),i=s[0],c=s[1],u=e.forwardProps,f=e.children,h=e.className,p=e.removeScrollBar,y=e.enabled,v=e.shards,b=e.sideCar,_=e.noRelative,E=e.noIsolation,x=e.inert,C=e.allowPinchZoom,O=e.as,M=O===void 0?"div":O,k=e.gapMode,D=Y_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),U=b,H=b$([r,t]),L=ir(ir({},D),i);return w.createElement(w.Fragment,null,y&&w.createElement(U,{sideCar:X_,removeScrollBar:p,shards:v,noRelative:_,noIsolation:E,inert:x,setCallbacks:c,allowPinchZoom:!!C,lockRef:r,gapMode:k}),u?w.cloneElement(w.Children.only(f),ir(ir({},L),{ref:H})):w.createElement(M,ir({},L,{className:h,ref:H}),f))});df.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};df.classNames={fullWidth:gu,zeroRight:mu};var C$=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function E$(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=C$();return t&&e.setAttribute("nonce",t),e}function R$(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function T$(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var A$=function(){var e=0,t=null;return{add:function(r){e==0&&(t=E$())&&(R$(t,r),T$(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},O$=function(){var e=A$();return function(t,r){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},J_=function(){var e=O$(),t=function(r){var s=r.styles,i=r.dynamic;return e(s,i),null};return t},k$={left:0,top:0,right:0,gap:0},Ap=function(e){return parseInt(e||"",10)||0},M$=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Ap(r),Ap(s),Ap(i)]},N$=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return k$;var t=M$(e),r=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-r+t[2]-t[0])}},j$=J_(),Ma="data-scroll-locked",z$=function(e,t,r,s){var i=e.left,c=e.top,u=e.right,f=e.gap;return r===void 0&&(r="margin"),`
|
|
58
|
-
.`.concat(m$,` {
|
|
59
|
-
overflow: hidden `).concat(s,`;
|
|
60
|
-
padding-right: `).concat(f,"px ").concat(s,`;
|
|
61
|
-
}
|
|
62
|
-
body[`).concat(Ma,`] {
|
|
63
|
-
overflow: hidden `).concat(s,`;
|
|
64
|
-
overscroll-behavior: contain;
|
|
65
|
-
`).concat([t&&"position: relative ".concat(s,";"),r==="margin"&&`
|
|
66
|
-
padding-left: `.concat(i,`px;
|
|
67
|
-
padding-top: `).concat(c,`px;
|
|
68
|
-
padding-right: `).concat(u,`px;
|
|
69
|
-
margin-left:0;
|
|
70
|
-
margin-top:0;
|
|
71
|
-
margin-right: `).concat(f,"px ").concat(s,`;
|
|
72
|
-
`),r==="padding"&&"padding-right: ".concat(f,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.`).concat(mu,` {
|
|
76
|
-
right: `).concat(f,"px ").concat(s,`;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.`).concat(gu,` {
|
|
80
|
-
margin-right: `).concat(f,"px ").concat(s,`;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.`).concat(mu," .").concat(mu,` {
|
|
84
|
-
right: 0 `).concat(s,`;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.`).concat(gu," .").concat(gu,` {
|
|
88
|
-
margin-right: 0 `).concat(s,`;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
body[`).concat(Ma,`] {
|
|
92
|
-
`).concat(g$,": ").concat(f,`px;
|
|
93
|
-
}
|
|
94
|
-
`)},wS=function(){var e=parseInt(document.body.getAttribute(Ma)||"0",10);return isFinite(e)?e:0},D$=function(){w.useEffect(function(){return document.body.setAttribute(Ma,(wS()+1).toString()),function(){var e=wS()-1;e<=0?document.body.removeAttribute(Ma):document.body.setAttribute(Ma,e.toString())}},[])},P$=function(e){var t=e.noRelative,r=e.noImportant,s=e.gapMode,i=s===void 0?"margin":s;D$();var c=w.useMemo(function(){return N$(i)},[i]);return w.createElement(j$,{styles:z$(c,!t,i,r?"":"!important")})},nm=!1;if(typeof window<"u")try{var su=Object.defineProperty({},"passive",{get:function(){return nm=!0,!0}});window.addEventListener("test",su,su),window.removeEventListener("test",su,su)}catch{nm=!1}var pa=nm?{passive:!1}:!1,L$=function(e){return e.tagName==="TEXTAREA"},W_=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!L$(e)&&r[t]==="visible")},I$=function(e){return W_(e,"overflowY")},$$=function(e){return W_(e,"overflowX")},SS=function(e,t){var r=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=eC(e,s);if(i){var c=tC(e,s),u=c[1],f=c[2];if(u>f)return!0}s=s.parentNode}while(s&&s!==r.body);return!1},U$=function(e){var t=e.scrollTop,r=e.scrollHeight,s=e.clientHeight;return[t,r,s]},B$=function(e){var t=e.scrollLeft,r=e.scrollWidth,s=e.clientWidth;return[t,r,s]},eC=function(e,t){return e==="v"?I$(t):$$(t)},tC=function(e,t){return e==="v"?U$(t):B$(t)},q$=function(e,t){return e==="h"&&t==="rtl"?-1:1},F$=function(e,t,r,s,i){var c=q$(e,window.getComputedStyle(t).direction),u=c*s,f=r.target,h=t.contains(f),p=!1,y=u>0,v=0,b=0;do{if(!f)break;var _=tC(e,f),E=_[0],x=_[1],C=_[2],O=x-C-c*E;(E||O)&&eC(e,f)&&(v+=O,b+=E);var M=f.parentNode;f=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!h&&f!==document.body||h&&(t.contains(f)||t===f));return(y&&Math.abs(v)<1||!y&&Math.abs(b)<1)&&(p=!0),p},au=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xS=function(e){return[e.deltaX,e.deltaY]},_S=function(e){return e&&"current"in e?e.current:e},V$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},H$=function(e){return`
|
|
95
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
96
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
97
|
-
`)},Z$=0,ma=[];function Q$(e){var t=w.useRef([]),r=w.useRef([0,0]),s=w.useRef(),i=w.useState(Z$++)[0],c=w.useState(J_)[0],u=w.useRef(e);w.useEffect(function(){u.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=p$([e.lockRef.current],(e.shards||[]).map(_S),!0).filter(Boolean);return x.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var f=w.useCallback(function(x,C){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!u.current.allowPinchZoom;var O=au(x),M=r.current,k="deltaX"in x?x.deltaX:M[0]-O[0],D="deltaY"in x?x.deltaY:M[1]-O[1],U,H=x.target,L=Math.abs(k)>Math.abs(D)?"h":"v";if("touches"in x&&L==="h"&&H.type==="range")return!1;var j=window.getSelection(),G=j&&j.anchorNode,ie=G?G===H||G.contains(H):!1;if(ie)return!1;var ae=SS(L,H);if(!ae)return!0;if(ae?U=L:(U=L==="v"?"h":"v",ae=SS(L,H)),!ae)return!1;if(!s.current&&"changedTouches"in x&&(k||D)&&(s.current=U),!U)return!0;var te=s.current||U;return F$(te,C,x,te==="h"?k:D)},[]),h=w.useCallback(function(x){var C=x;if(!(!ma.length||ma[ma.length-1]!==c)){var O="deltaY"in C?xS(C):au(C),M=t.current.filter(function(U){return U.name===C.type&&(U.target===C.target||C.target===U.shadowParent)&&V$(U.delta,O)})[0];if(M&&M.should){C.cancelable&&C.preventDefault();return}if(!M){var k=(u.current.shards||[]).map(_S).filter(Boolean).filter(function(U){return U.contains(C.target)}),D=k.length>0?f(C,k[0]):!u.current.noIsolation;D&&C.cancelable&&C.preventDefault()}}},[]),p=w.useCallback(function(x,C,O,M){var k={name:x,delta:C,target:O,should:M,shadowParent:G$(O)};t.current.push(k),setTimeout(function(){t.current=t.current.filter(function(D){return D!==k})},1)},[]),y=w.useCallback(function(x){r.current=au(x),s.current=void 0},[]),v=w.useCallback(function(x){p(x.type,xS(x),x.target,f(x,e.lockRef.current))},[]),b=w.useCallback(function(x){p(x.type,au(x),x.target,f(x,e.lockRef.current))},[]);w.useEffect(function(){return ma.push(c),e.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:b}),document.addEventListener("wheel",h,pa),document.addEventListener("touchmove",h,pa),document.addEventListener("touchstart",y,pa),function(){ma=ma.filter(function(x){return x!==c}),document.removeEventListener("wheel",h,pa),document.removeEventListener("touchmove",h,pa),document.removeEventListener("touchstart",y,pa)}},[]);var _=e.removeScrollBar,E=e.inert;return w.createElement(w.Fragment,null,E?w.createElement(c,{styles:H$(i)}):null,_?w.createElement(P$,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function G$(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Y$=_$(X_,Q$);var Cc=w.forwardRef(function(e,t){return w.createElement(df,ir({},e,{ref:t,sideCar:Y$}))});Cc.classNames=df.classNames;var K$=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ga=new WeakMap,iu=new WeakMap,cu={},Op=0,nC=function(e){return e&&(e.host||nC(e.parentNode))},X$=function(e,t){return t.map(function(r){if(e.contains(r))return r;var s=nC(r);return s&&e.contains(s)?s:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},J$=function(e,t,r,s){var i=X$(t,Array.isArray(e)?e:[e]);cu[r]||(cu[r]=new WeakMap);var c=cu[r],u=[],f=new Set,h=new Set(i),p=function(v){!v||f.has(v)||(f.add(v),p(v.parentNode))};i.forEach(p);var y=function(v){!v||h.has(v)||Array.prototype.forEach.call(v.children,function(b){if(f.has(b))y(b);else try{var _=b.getAttribute(s),E=_!==null&&_!=="false",x=(ga.get(b)||0)+1,C=(c.get(b)||0)+1;ga.set(b,x),c.set(b,C),u.push(b),x===1&&E&&iu.set(b,!0),C===1&&b.setAttribute(r,"true"),E||b.setAttribute(s,"true")}catch(O){console.error("aria-hidden: cannot operate on ",b,O)}})};return y(t),f.clear(),Op++,function(){u.forEach(function(v){var b=ga.get(v)-1,_=c.get(v)-1;ga.set(v,b),c.set(v,_),b||(iu.has(v)||v.removeAttribute(s),iu.delete(v)),_||v.removeAttribute(r)}),Op--,Op||(ga=new WeakMap,ga=new WeakMap,iu=new WeakMap,cu={})}},hf=function(e,t,r){r===void 0&&(r="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=K$(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),J$(s,i,r,"aria-hidden")):function(){return null}},pf="Dialog",[rC]=hr(pf),[W$,Jn]=rC(pf),oC=e=>{const{__scopeDialog:t,children:r,open:s,defaultOpen:i,onOpenChange:c,modal:u=!0}=e,f=w.useRef(null),h=w.useRef(null),[p,y]=To({prop:s,defaultProp:i??!1,onChange:c,caller:pf});return g.jsx(W$,{scope:t,triggerRef:f,contentRef:h,contentId:Qn(),titleId:Qn(),descriptionId:Qn(),open:p,onOpenChange:y,onOpenToggle:w.useCallback(()=>y(v=>!v),[y]),modal:u,children:r})};oC.displayName=pf;var sC="DialogTrigger",e8=w.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,i=Jn(sC,r),c=Ve(t,i.triggerRef);return g.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ng(i.open),...s,ref:c,onClick:he(e.onClick,i.onOpenToggle)})});e8.displayName=sC;var eg="DialogPortal",[t8,aC]=rC(eg,{forceMount:void 0}),iC=e=>{const{__scopeDialog:t,forceMount:r,children:s,container:i}=e,c=Jn(eg,t);return g.jsx(t8,{scope:t,forceMount:r,children:w.Children.map(s,u=>g.jsx(Un,{present:r||c.open,children:g.jsx(_c,{asChild:!0,container:i,children:u})}))})};iC.displayName=eg;var Uu="DialogOverlay",cC=w.forwardRef((e,t)=>{const r=aC(Uu,e.__scopeDialog),{forceMount:s=r.forceMount,...i}=e,c=Jn(Uu,e.__scopeDialog);return c.modal?g.jsx(Un,{present:s||c.open,children:g.jsx(r8,{...i,ref:t})}):null});cC.displayName=Uu;var n8=gs("DialogOverlay.RemoveScroll"),r8=w.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,i=Jn(Uu,r);return g.jsx(Cc,{as:n8,allowPinchZoom:!0,shards:[i.contentRef],children:g.jsx(ke.div,{"data-state":ng(i.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),ys="DialogContent",lC=w.forwardRef((e,t)=>{const r=aC(ys,e.__scopeDialog),{forceMount:s=r.forceMount,...i}=e,c=Jn(ys,e.__scopeDialog);return g.jsx(Un,{present:s||c.open,children:c.modal?g.jsx(o8,{...i,ref:t}):g.jsx(s8,{...i,ref:t})})});lC.displayName=ys;var o8=w.forwardRef((e,t)=>{const r=Jn(ys,e.__scopeDialog),s=w.useRef(null),i=Ve(t,r.contentRef,s);return w.useEffect(()=>{const c=s.current;if(c)return hf(c)},[]),g.jsx(uC,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(e.onCloseAutoFocus,c=>{c.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:he(e.onPointerDownOutside,c=>{const u=c.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0;(u.button===2||f)&&c.preventDefault()}),onFocusOutside:he(e.onFocusOutside,c=>c.preventDefault())})}),s8=w.forwardRef((e,t)=>{const r=Jn(ys,e.__scopeDialog),s=w.useRef(!1),i=w.useRef(!1);return g.jsx(uC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),c.defaultPrevented||(s.current||r.triggerRef.current?.focus(),c.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),c.defaultPrevented||(s.current=!0,c.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=c.target;r.triggerRef.current?.contains(u)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&i.current&&c.preventDefault()}})}),uC=w.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:c,...u}=e,f=Jn(ys,r),h=w.useRef(null),p=Ve(t,h);return ff(),g.jsxs(g.Fragment,{children:[g.jsx(xc,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:c,children:g.jsx(Sc,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":ng(f.open),...u,ref:p,onDismiss:()=>f.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(a8,{titleId:f.titleId}),g.jsx(c8,{contentRef:h,descriptionId:f.descriptionId})]})]})}),tg="DialogTitle",fC=w.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,i=Jn(tg,r);return g.jsx(ke.h2,{id:i.titleId,...s,ref:t})});fC.displayName=tg;var dC="DialogDescription",hC=w.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,i=Jn(dC,r);return g.jsx(ke.p,{id:i.descriptionId,...s,ref:t})});hC.displayName=dC;var pC="DialogClose",mC=w.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,i=Jn(pC,r);return g.jsx(ke.button,{type:"button",...s,ref:t,onClick:he(e.onClick,()=>i.onOpenChange(!1))})});mC.displayName=pC;function ng(e){return e?"open":"closed"}var gC="DialogTitleWarning",[E7,yC]=OI(gC,{contentName:ys,titleName:tg,docsSlug:"dialog"}),a8=({titleId:e})=>{const t=yC(gC),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
98
|
-
|
|
99
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
100
|
-
|
|
101
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},i8="DialogDescriptionWarning",c8=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yC(i8).contentName}}.`;return w.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},l8=oC,u8=iC,f8=cC,d8=lC,h8=fC,p8=hC,m8=mC;function g8({...e}){return g.jsx(l8,{"data-slot":"dialog",...e})}function y8({...e}){return g.jsx(u8,{"data-slot":"dialog-portal",...e})}function v8({className:e,...t}){return g.jsx(f8,{"data-slot":"dialog-overlay",className:je("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function b8({className:e,children:t,showCloseButton:r=!0,...s}){return g.jsxs(y8,{"data-slot":"dialog-portal",children:[g.jsx(v8,{}),g.jsxs(d8,{"data-slot":"dialog-content",className:je("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...s,children:[t,r&&g.jsxs(m8,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[g.jsx(ju,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function w8({className:e,...t}){return g.jsx("div",{"data-slot":"dialog-header",className:je("flex flex-col gap-2 text-center sm:text-left",e),...t})}function S8({className:e,...t}){return g.jsx("div",{"data-slot":"dialog-footer",className:je("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function x8({className:e,...t}){return g.jsx(h8,{"data-slot":"dialog-title",className:je("text-lg leading-none font-semibold",e),...t})}function _8({className:e,...t}){return g.jsx(p8,{"data-slot":"dialog-description",className:je("text-muted-foreground text-sm",e),...t})}var C8=Symbol.for("react.lazy"),Bu=Yu[" use ".trim().toString()];function E8(e){return typeof e=="object"&&e!==null&&"then"in e}function vC(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===C8&&"_payload"in e&&E8(e._payload)}function bC(e){const t=R8(e),r=w.forwardRef((s,i)=>{let{children:c,...u}=s;vC(c)&&typeof Bu=="function"&&(c=Bu(c._payload));const f=w.Children.toArray(c),h=f.find(A8);if(h){const p=h.props.children,y=f.map(v=>v===h?w.Children.count(p)>1?w.Children.only(null):w.isValidElement(p)?p.props.children:null:v);return g.jsx(t,{...u,ref:i,children:w.isValidElement(p)?w.cloneElement(p,void 0,y):null})}return g.jsx(t,{...u,ref:i,children:c})});return r.displayName=`${e}.Slot`,r}var wC=bC("Slot");function R8(e){const t=w.forwardRef((r,s)=>{let{children:i,...c}=r;if(vC(i)&&typeof Bu=="function"&&(i=Bu(i._payload)),w.isValidElement(i)){const u=k8(i),f=O8(c,i.props);return i.type!==w.Fragment&&(f.ref=s?wc(s,u):u),w.cloneElement(i,f)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var T8=Symbol("radix.slottable");function A8(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===T8}function O8(e,t){const r={...t};for(const s in t){const i=e[s],c=t[s];/^on[A-Z]/.test(s)?i&&c?r[s]=(...f)=>{const h=c(...f);return i(...f),h}:i&&(r[s]=i):s==="style"?r[s]={...i,...c}:s==="className"&&(r[s]=[i,c].filter(Boolean).join(" "))}return{...e,...r}}function k8(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const CS=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ES=q1,M8=(e,t)=>r=>{var s;if(t?.variants==null)return ES(e,r?.class,r?.className);const{variants:i,defaultVariants:c}=t,u=Object.keys(i).map(p=>{const y=r?.[p],v=c?.[p];if(y===null)return null;const b=CS(y)||CS(v);return i[p][b]}),f=r&&Object.entries(r).reduce((p,y)=>{let[v,b]=y;return b===void 0||(p[v]=b),p},{}),h=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((p,y)=>{let{class:v,className:b,..._}=y;return Object.entries(_).every(E=>{let[x,C]=E;return Array.isArray(C)?C.includes({...c,...f}[x]):{...c,...f}[x]===C})?[...p,v,b]:p},[]);return ES(e,u,h,r?.class,r?.className)},N8=M8("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function sc({className:e,variant:t="default",size:r="default",asChild:s=!1,...i}){const c=s?wC:"button";return g.jsx(c,{"data-slot":"button","data-variant":t,"data-size":r,className:je(N8({variant:t,size:r,className:e})),...i})}const RS={fast:"duration-100 ease-out"},j8={primary:"default",secondary:"secondary",danger:"destructive",ghost:"ghost",outline:"outline",link:"link",success:"default",warning:"default"},z8={success:"bg-success text-success-foreground hover:bg-success/90 focus-visible:ring-success",warning:"bg-warning text-warning-foreground hover:bg-warning/90 focus-visible:ring-warning"},D8=()=>g.jsxs("svg",{className:"size-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[g.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});function $r({variant:e="primary",loading:t,disabled:r,children:s,className:i,asChild:c,...u}){const f=j8[e],h=z8[e];return c?g.jsx(sc,{variant:f,disabled:r||t,className:je(RS.fast,h,i),asChild:!0,...u,children:s}):g.jsxs(sc,{variant:f,disabled:r||t,className:je(RS.fast,h,i),...u,children:[t&&g.jsx(D8,{}),s]})}const P8={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl"};function rg({open:e,onOpenChange:t,title:r,description:s,children:i,footer:c,size:u="md",className:f}){return g.jsx(g8,{open:e,onOpenChange:t,children:g.jsxs(b8,{className:je("flex max-h-[85vh] flex-col overflow-hidden",P8[u],f),children:[g.jsxs(w8,{className:"shrink-0",children:[g.jsx(x8,{children:r}),s&&g.jsx(_8,{children:s})]}),g.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto py-4 [&::-webkit-scrollbar]:hidden",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:i}),c&&g.jsx(S8,{className:"shrink-0 border-t pt-4",children:c})]})})}function R7({open:e,onOpenChange:t,title:r,description:s,confirmLabel:i="Confirm",cancelLabel:c="Cancel",onConfirm:u,onCancel:f,variant:h="default",loading:p,isLoading:y,error:v}){const b=p??y??!1,_=()=>{f?.(),t(!1)},E=()=>{u()},x=()=>h==="danger"?"danger":h==="warning"?"warning":"primary";return g.jsx(rg,{open:e,onOpenChange:t,title:r,size:"sm",footer:g.jsxs(g.Fragment,{children:[g.jsx($r,{variant:"outline",onClick:_,disabled:b,children:c}),g.jsx($r,{variant:x(),onClick:E,loading:b,children:i})]}),children:g.jsxs("div",{className:"space-y-3",children:[g.jsx("p",{className:"text-sm text-muted-foreground",children:s}),v&&g.jsx("p",{className:"text-sm text-destructive",children:v})]})})}function os({className:e,type:t,...r}){return g.jsx("input",{type:t,"data-slot":"input",className:je("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}var L8=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mf=L8.reduce((e,t)=>{const r=bC(`Primitive.${t}`),s=w.forwardRef((i,c)=>{const{asChild:u,...f}=i,h=u?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(h,{...f,ref:c})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),I8="Label",SC=w.forwardRef((e,t)=>g.jsx(mf.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));SC.displayName=I8;var $8=SC;function jn({className:e,...t}){return g.jsx($8,{"data-slot":"label",className:je("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function U8({className:e,...t}){return g.jsx("textarea",{"data-slot":"textarea",className:je("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}function xC(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function _C(e){const[t,r]=w.useState(void 0);return Rt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const c=i[0];let u,f;if("borderBoxSize"in c){const h=c.borderBoxSize,p=Array.isArray(h)?h[0]:h;u=p.inlineSize,f=p.blockSize}else u=e.offsetWidth,f=e.offsetHeight;r({width:u,height:f})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else r(void 0)},[e]),t}var gf="Checkbox",[B8]=hr(gf),[q8,og]=B8(gf);function F8(e){const{__scopeCheckbox:t,checked:r,children:s,defaultChecked:i,disabled:c,form:u,name:f,onCheckedChange:h,required:p,value:y="on",internal_do_not_use_render:v}=e,[b,_]=To({prop:r,defaultProp:i??!1,onChange:h,caller:gf}),[E,x]=w.useState(null),[C,O]=w.useState(null),M=w.useRef(!1),k=E?!!u||!!E.closest("form"):!0,D={checked:b,disabled:c,setChecked:_,control:E,setControl:x,name:f,form:u,value:y,hasConsumerStoppedPropagationRef:M,required:p,defaultChecked:Co(i)?!1:i,isFormControl:k,bubbleInput:C,setBubbleInput:O};return g.jsx(q8,{scope:t,...D,children:V8(v)?v(D):s})}var CC="CheckboxTrigger",EC=w.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...s},i)=>{const{control:c,value:u,disabled:f,checked:h,required:p,setControl:y,setChecked:v,hasConsumerStoppedPropagationRef:b,isFormControl:_,bubbleInput:E}=og(CC,e),x=Ve(i,y),C=w.useRef(h);return w.useEffect(()=>{const O=c?.form;if(O){const M=()=>v(C.current);return O.addEventListener("reset",M),()=>O.removeEventListener("reset",M)}},[c,v]),g.jsx(ke.button,{type:"button",role:"checkbox","aria-checked":Co(h)?"mixed":h,"aria-required":p,"data-state":MC(h),"data-disabled":f?"":void 0,disabled:f,value:u,...s,ref:x,onKeyDown:he(t,O=>{O.key==="Enter"&&O.preventDefault()}),onClick:he(r,O=>{v(M=>Co(M)?!0:!M),E&&_&&(b.current=O.isPropagationStopped(),b.current||O.stopPropagation())})})});EC.displayName=CC;var RC=w.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:s,checked:i,defaultChecked:c,required:u,disabled:f,value:h,onCheckedChange:p,form:y,...v}=e;return g.jsx(F8,{__scopeCheckbox:r,checked:i,defaultChecked:c,disabled:f,required:u,onCheckedChange:p,name:s,form:y,value:h,internal_do_not_use_render:({isFormControl:b})=>g.jsxs(g.Fragment,{children:[g.jsx(EC,{...v,ref:t,__scopeCheckbox:r}),b&&g.jsx(kC,{__scopeCheckbox:r})]})})});RC.displayName=gf;var TC="CheckboxIndicator",AC=w.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:s,...i}=e,c=og(TC,r);return g.jsx(Un,{present:s||Co(c.checked)||c.checked===!0,children:g.jsx(ke.span,{"data-state":MC(c.checked),"data-disabled":c.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});AC.displayName=TC;var OC="CheckboxBubbleInput",kC=w.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:s,hasConsumerStoppedPropagationRef:i,checked:c,defaultChecked:u,required:f,disabled:h,name:p,value:y,form:v,bubbleInput:b,setBubbleInput:_}=og(OC,e),E=Ve(r,_),x=xC(c),C=_C(s);w.useEffect(()=>{const M=b;if(!M)return;const k=window.HTMLInputElement.prototype,U=Object.getOwnPropertyDescriptor(k,"checked").set,H=!i.current;if(x!==c&&U){const L=new Event("click",{bubbles:H});M.indeterminate=Co(c),U.call(M,Co(c)?!1:c),M.dispatchEvent(L)}},[b,x,c,i]);const O=w.useRef(Co(c)?!1:c);return g.jsx(ke.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??O.current,required:f,disabled:h,name:p,value:y,form:v,...t,tabIndex:-1,ref:E,style:{...t.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});kC.displayName=OC;function V8(e){return typeof e=="function"}function Co(e){return e==="indeterminate"}function MC(e){return Co(e)?"indeterminate":e?"checked":"unchecked"}function TS({className:e,...t}){return g.jsx(RC,{"data-slot":"checkbox",className:je("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:g.jsx(AC,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:g.jsx(M1,{className:"size-3.5"})})})}function AS(e,[t,r]){return Math.min(r,Math.max(t,e))}function sg(e){const t=e+"CollectionProvider",[r,s]=hr(t),[i,c]=r(t,{collectionRef:{current:null},itemMap:new Map}),u=x=>{const{scope:C,children:O}=x,M=qt.useRef(null),k=qt.useRef(new Map).current;return g.jsx(i,{scope:C,itemMap:k,collectionRef:M,children:O})};u.displayName=t;const f=e+"CollectionSlot",h=gs(f),p=qt.forwardRef((x,C)=>{const{scope:O,children:M}=x,k=c(f,O),D=Ve(C,k.collectionRef);return g.jsx(h,{ref:D,children:M})});p.displayName=f;const y=e+"CollectionItemSlot",v="data-radix-collection-item",b=gs(y),_=qt.forwardRef((x,C)=>{const{scope:O,children:M,...k}=x,D=qt.useRef(null),U=Ve(C,D),H=c(y,O);return qt.useEffect(()=>(H.itemMap.set(D,{ref:D,...k}),()=>{H.itemMap.delete(D)})),g.jsx(b,{[v]:"",ref:U,children:M})});_.displayName=y;function E(x){const C=c(e+"CollectionConsumer",x);return qt.useCallback(()=>{const M=C.collectionRef.current;if(!M)return[];const k=Array.from(M.querySelectorAll(`[${v}]`));return Array.from(C.itemMap.values()).sort((H,L)=>k.indexOf(H.ref.current)-k.indexOf(L.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:u,Slot:p,ItemSlot:_},E,s]}var H8=w.createContext(void 0);function ag(e){const t=w.useContext(H8);return e||t||"ltr"}const Z8=["top","right","bottom","left"],Ao=Math.min,yn=Math.max,qu=Math.round,lu=Math.floor,lr=e=>({x:e,y:e}),Q8={left:"right",right:"left",bottom:"top",top:"bottom"},G8={start:"end",end:"start"};function rm(e,t,r){return yn(e,Ao(t,r))}function qr(e,t){return typeof e=="function"?e(t):e}function Fr(e){return e.split("-")[0]}function Va(e){return e.split("-")[1]}function ig(e){return e==="x"?"y":"x"}function cg(e){return e==="y"?"height":"width"}const Y8=new Set(["top","bottom"]);function cr(e){return Y8.has(Fr(e))?"y":"x"}function lg(e){return ig(cr(e))}function K8(e,t,r){r===void 0&&(r=!1);const s=Va(e),i=lg(e),c=cg(i);let u=i==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[c]>t.floating[c]&&(u=Fu(u)),[u,Fu(u)]}function X8(e){const t=Fu(e);return[om(e),t,om(t)]}function om(e){return e.replace(/start|end/g,t=>G8[t])}const OS=["left","right"],kS=["right","left"],J8=["top","bottom"],W8=["bottom","top"];function eU(e,t,r){switch(e){case"top":case"bottom":return r?t?kS:OS:t?OS:kS;case"left":case"right":return t?J8:W8;default:return[]}}function tU(e,t,r,s){const i=Va(e);let c=eU(Fr(e),r==="start",s);return i&&(c=c.map(u=>u+"-"+i),t&&(c=c.concat(c.map(om)))),c}function Fu(e){return e.replace(/left|right|bottom|top/g,t=>Q8[t])}function nU(e){return{top:0,right:0,bottom:0,left:0,...e}}function NC(e){return typeof e!="number"?nU(e):{top:e,right:e,bottom:e,left:e}}function Vu(e){const{x:t,y:r,width:s,height:i}=e;return{width:s,height:i,top:r,left:t,right:t+s,bottom:r+i,x:t,y:r}}function MS(e,t,r){let{reference:s,floating:i}=e;const c=cr(t),u=lg(t),f=cg(u),h=Fr(t),p=c==="y",y=s.x+s.width/2-i.width/2,v=s.y+s.height/2-i.height/2,b=s[f]/2-i[f]/2;let _;switch(h){case"top":_={x:y,y:s.y-i.height};break;case"bottom":_={x:y,y:s.y+s.height};break;case"right":_={x:s.x+s.width,y:v};break;case"left":_={x:s.x-i.width,y:v};break;default:_={x:s.x,y:s.y}}switch(Va(t)){case"start":_[u]-=b*(r&&p?-1:1);break;case"end":_[u]+=b*(r&&p?-1:1);break}return _}const rU=async(e,t,r)=>{const{placement:s="bottom",strategy:i="absolute",middleware:c=[],platform:u}=r,f=c.filter(Boolean),h=await(u.isRTL==null?void 0:u.isRTL(t));let p=await u.getElementRects({reference:e,floating:t,strategy:i}),{x:y,y:v}=MS(p,s,h),b=s,_={},E=0;for(let x=0;x<f.length;x++){const{name:C,fn:O}=f[x],{x:M,y:k,data:D,reset:U}=await O({x:y,y:v,initialPlacement:s,placement:b,strategy:i,middlewareData:_,rects:p,platform:u,elements:{reference:e,floating:t}});y=M??y,v=k??v,_={..._,[C]:{..._[C],...D}},U&&E<=50&&(E++,typeof U=="object"&&(U.placement&&(b=U.placement),U.rects&&(p=U.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:i}):U.rects),{x:y,y:v}=MS(p,b,h)),x=-1)}return{x:y,y:v,placement:b,strategy:i,middlewareData:_}};async function pc(e,t){var r;t===void 0&&(t={});const{x:s,y:i,platform:c,rects:u,elements:f,strategy:h}=e,{boundary:p="clippingAncestors",rootBoundary:y="viewport",elementContext:v="floating",altBoundary:b=!1,padding:_=0}=qr(t,e),E=NC(_),C=f[b?v==="floating"?"reference":"floating":v],O=Vu(await c.getClippingRect({element:(r=await(c.isElement==null?void 0:c.isElement(C)))==null||r?C:C.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(f.floating)),boundary:p,rootBoundary:y,strategy:h})),M=v==="floating"?{x:s,y:i,width:u.floating.width,height:u.floating.height}:u.reference,k=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f.floating)),D=await(c.isElement==null?void 0:c.isElement(k))?await(c.getScale==null?void 0:c.getScale(k))||{x:1,y:1}:{x:1,y:1},U=Vu(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:M,offsetParent:k,strategy:h}):M);return{top:(O.top-U.top+E.top)/D.y,bottom:(U.bottom-O.bottom+E.bottom)/D.y,left:(O.left-U.left+E.left)/D.x,right:(U.right-O.right+E.right)/D.x}}const oU=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:s,placement:i,rects:c,platform:u,elements:f,middlewareData:h}=t,{element:p,padding:y=0}=qr(e,t)||{};if(p==null)return{};const v=NC(y),b={x:r,y:s},_=lg(i),E=cg(_),x=await u.getDimensions(p),C=_==="y",O=C?"top":"left",M=C?"bottom":"right",k=C?"clientHeight":"clientWidth",D=c.reference[E]+c.reference[_]-b[_]-c.floating[E],U=b[_]-c.reference[_],H=await(u.getOffsetParent==null?void 0:u.getOffsetParent(p));let L=H?H[k]:0;(!L||!await(u.isElement==null?void 0:u.isElement(H)))&&(L=f.floating[k]||c.floating[E]);const j=D/2-U/2,G=L/2-x[E]/2-1,ie=Ao(v[O],G),ae=Ao(v[M],G),te=ie,ce=L-x[E]-ae,le=L/2-x[E]/2+j,me=rm(te,le,ce),I=!h.arrow&&Va(i)!=null&&le!==me&&c.reference[E]/2-(le<te?ie:ae)-x[E]/2<0,K=I?le<te?le-te:le-ce:0;return{[_]:b[_]+K,data:{[_]:me,centerOffset:le-me-K,...I&&{alignmentOffset:K}},reset:I}}}),sU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,s;const{placement:i,middlewareData:c,rects:u,initialPlacement:f,platform:h,elements:p}=t,{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:b,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:x=!0,...C}=qr(e,t);if((r=c.arrow)!=null&&r.alignmentOffset)return{};const O=Fr(i),M=cr(f),k=Fr(f)===f,D=await(h.isRTL==null?void 0:h.isRTL(p.floating)),U=b||(k||!x?[Fu(f)]:X8(f)),H=E!=="none";!b&&H&&U.push(...tU(f,x,E,D));const L=[f,...U],j=await pc(t,C),G=[];let ie=((s=c.flip)==null?void 0:s.overflows)||[];if(y&&G.push(j[O]),v){const le=K8(i,u,D);G.push(j[le[0]],j[le[1]])}if(ie=[...ie,{placement:i,overflows:G}],!G.every(le=>le<=0)){var ae,te;const le=(((ae=c.flip)==null?void 0:ae.index)||0)+1,me=L[le];if(me&&(!(v==="alignment"?M!==cr(me):!1)||ie.every(V=>cr(V.placement)===M?V.overflows[0]>0:!0)))return{data:{index:le,overflows:ie},reset:{placement:me}};let I=(te=ie.filter(K=>K.overflows[0]<=0).sort((K,V)=>K.overflows[1]-V.overflows[1])[0])==null?void 0:te.placement;if(!I)switch(_){case"bestFit":{var ce;const K=(ce=ie.filter(V=>{if(H){const re=cr(V.placement);return re===M||re==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(re=>re>0).reduce((re,ve)=>re+ve,0)]).sort((V,re)=>V[1]-re[1])[0])==null?void 0:ce[0];K&&(I=K);break}case"initialPlacement":I=f;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function NS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function jS(e){return Z8.some(t=>e[t]>=0)}const aU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:s="referenceHidden",...i}=qr(e,t);switch(s){case"referenceHidden":{const c=await pc(t,{...i,elementContext:"reference"}),u=NS(c,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:jS(u)}}}case"escaped":{const c=await pc(t,{...i,altBoundary:!0}),u=NS(c,r.floating);return{data:{escapedOffsets:u,escaped:jS(u)}}}default:return{}}}}},jC=new Set(["left","top"]);async function iU(e,t){const{placement:r,platform:s,elements:i}=e,c=await(s.isRTL==null?void 0:s.isRTL(i.floating)),u=Fr(r),f=Va(r),h=cr(r)==="y",p=jC.has(u)?-1:1,y=c&&h?-1:1,v=qr(t,e);let{mainAxis:b,crossAxis:_,alignmentAxis:E}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return f&&typeof E=="number"&&(_=f==="end"?E*-1:E),h?{x:_*y,y:b*p}:{x:b*p,y:_*y}}const cU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,s;const{x:i,y:c,placement:u,middlewareData:f}=t,h=await iU(t,e);return u===((r=f.offset)==null?void 0:r.placement)&&(s=f.arrow)!=null&&s.alignmentOffset?{}:{x:i+h.x,y:c+h.y,data:{...h,placement:u}}}}},lU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:s,placement:i}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:f={fn:C=>{let{x:O,y:M}=C;return{x:O,y:M}}},...h}=qr(e,t),p={x:r,y:s},y=await pc(t,h),v=cr(Fr(i)),b=ig(v);let _=p[b],E=p[v];if(c){const C=b==="y"?"top":"left",O=b==="y"?"bottom":"right",M=_+y[C],k=_-y[O];_=rm(M,_,k)}if(u){const C=v==="y"?"top":"left",O=v==="y"?"bottom":"right",M=E+y[C],k=E-y[O];E=rm(M,E,k)}const x=f.fn({...t,[b]:_,[v]:E});return{...x,data:{x:x.x-r,y:x.y-s,enabled:{[b]:c,[v]:u}}}}}},uU=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:s,placement:i,rects:c,middlewareData:u}=t,{offset:f=0,mainAxis:h=!0,crossAxis:p=!0}=qr(e,t),y={x:r,y:s},v=cr(i),b=ig(v);let _=y[b],E=y[v];const x=qr(f,t),C=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(h){const k=b==="y"?"height":"width",D=c.reference[b]-c.floating[k]+C.mainAxis,U=c.reference[b]+c.reference[k]-C.mainAxis;_<D?_=D:_>U&&(_=U)}if(p){var O,M;const k=b==="y"?"width":"height",D=jC.has(Fr(i)),U=c.reference[v]-c.floating[k]+(D&&((O=u.offset)==null?void 0:O[v])||0)+(D?0:C.crossAxis),H=c.reference[v]+c.reference[k]+(D?0:((M=u.offset)==null?void 0:M[v])||0)-(D?C.crossAxis:0);E<U?E=U:E>H&&(E=H)}return{[b]:_,[v]:E}}}},fU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,s;const{placement:i,rects:c,platform:u,elements:f}=t,{apply:h=()=>{},...p}=qr(e,t),y=await pc(t,p),v=Fr(i),b=Va(i),_=cr(i)==="y",{width:E,height:x}=c.floating;let C,O;v==="top"||v==="bottom"?(C=v,O=b===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(O=v,C=b==="end"?"top":"bottom");const M=x-y.top-y.bottom,k=E-y.left-y.right,D=Ao(x-y[C],M),U=Ao(E-y[O],k),H=!t.middlewareData.shift;let L=D,j=U;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(j=k),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(L=M),H&&!b){const ie=yn(y.left,0),ae=yn(y.right,0),te=yn(y.top,0),ce=yn(y.bottom,0);_?j=E-2*(ie!==0||ae!==0?ie+ae:yn(y.left,y.right)):L=x-2*(te!==0||ce!==0?te+ce:yn(y.top,y.bottom))}await h({...t,availableWidth:j,availableHeight:L});const G=await u.getDimensions(f.floating);return E!==G.width||x!==G.height?{reset:{rects:!0}}:{}}}};function yf(){return typeof window<"u"}function Ha(e){return zC(e)?(e.nodeName||"").toLowerCase():"#document"}function bn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pr(e){var t;return(t=(zC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zC(e){return yf()?e instanceof Node||e instanceof bn(e).Node:!1}function Kn(e){return yf()?e instanceof Element||e instanceof bn(e).Element:!1}function fr(e){return yf()?e instanceof HTMLElement||e instanceof bn(e).HTMLElement:!1}function zS(e){return!yf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof bn(e).ShadowRoot}const dU=new Set(["inline","contents"]);function Ec(e){const{overflow:t,overflowX:r,overflowY:s,display:i}=Xn(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+r)&&!dU.has(i)}const hU=new Set(["table","td","th"]);function pU(e){return hU.has(Ha(e))}const mU=[":popover-open",":modal"];function vf(e){return mU.some(t=>{try{return e.matches(t)}catch{return!1}})}const gU=["transform","translate","scale","rotate","perspective"],yU=["transform","translate","scale","rotate","perspective","filter"],vU=["paint","layout","strict","content"];function ug(e){const t=fg(),r=Kn(e)?Xn(e):e;return gU.some(s=>r[s]?r[s]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||yU.some(s=>(r.willChange||"").includes(s))||vU.some(s=>(r.contain||"").includes(s))}function bU(e){let t=Oo(e);for(;fr(t)&&!La(t);){if(ug(t))return t;if(vf(t))return null;t=Oo(t)}return null}function fg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const wU=new Set(["html","body","#document"]);function La(e){return wU.has(Ha(e))}function Xn(e){return bn(e).getComputedStyle(e)}function bf(e){return Kn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oo(e){if(Ha(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zS(e)&&e.host||pr(e);return zS(t)?t.host:t}function DC(e){const t=Oo(e);return La(t)?e.ownerDocument?e.ownerDocument.body:e.body:fr(t)&&Ec(t)?t:DC(t)}function mc(e,t,r){var s;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=DC(e),c=i===((s=e.ownerDocument)==null?void 0:s.body),u=bn(i);if(c){const f=sm(u);return t.concat(u,u.visualViewport||[],Ec(i)?i:[],f&&r?mc(f):[])}return t.concat(i,mc(i,[],r))}function sm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function PC(e){const t=Xn(e);let r=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=fr(e),c=i?e.offsetWidth:r,u=i?e.offsetHeight:s,f=qu(r)!==c||qu(s)!==u;return f&&(r=c,s=u),{width:r,height:s,$:f}}function dg(e){return Kn(e)?e:e.contextElement}function Na(e){const t=dg(e);if(!fr(t))return lr(1);const r=t.getBoundingClientRect(),{width:s,height:i,$:c}=PC(t);let u=(c?qu(r.width):r.width)/s,f=(c?qu(r.height):r.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const SU=lr(0);function LC(e){const t=bn(e);return!fg()||!t.visualViewport?SU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xU(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==bn(e)?!1:t}function vs(e,t,r,s){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),c=dg(e);let u=lr(1);t&&(s?Kn(s)&&(u=Na(s)):u=Na(e));const f=xU(c,r,s)?LC(c):lr(0);let h=(i.left+f.x)/u.x,p=(i.top+f.y)/u.y,y=i.width/u.x,v=i.height/u.y;if(c){const b=bn(c),_=s&&Kn(s)?bn(s):s;let E=b,x=sm(E);for(;x&&s&&_!==E;){const C=Na(x),O=x.getBoundingClientRect(),M=Xn(x),k=O.left+(x.clientLeft+parseFloat(M.paddingLeft))*C.x,D=O.top+(x.clientTop+parseFloat(M.paddingTop))*C.y;h*=C.x,p*=C.y,y*=C.x,v*=C.y,h+=k,p+=D,E=bn(x),x=sm(E)}}return Vu({width:y,height:v,x:h,y:p})}function wf(e,t){const r=bf(e).scrollLeft;return t?t.left+r:vs(pr(e)).left+r}function IC(e,t){const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-wf(e,r),i=r.top+t.scrollTop;return{x:s,y:i}}function _U(e){let{elements:t,rect:r,offsetParent:s,strategy:i}=e;const c=i==="fixed",u=pr(s),f=t?vf(t.floating):!1;if(s===u||f&&c)return r;let h={scrollLeft:0,scrollTop:0},p=lr(1);const y=lr(0),v=fr(s);if((v||!v&&!c)&&((Ha(s)!=="body"||Ec(u))&&(h=bf(s)),fr(s))){const _=vs(s);p=Na(s),y.x=_.x+s.clientLeft,y.y=_.y+s.clientTop}const b=u&&!v&&!c?IC(u,h):lr(0);return{width:r.width*p.x,height:r.height*p.y,x:r.x*p.x-h.scrollLeft*p.x+y.x+b.x,y:r.y*p.y-h.scrollTop*p.y+y.y+b.y}}function CU(e){return Array.from(e.getClientRects())}function EU(e){const t=pr(e),r=bf(e),s=e.ownerDocument.body,i=yn(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),c=yn(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let u=-r.scrollLeft+wf(e);const f=-r.scrollTop;return Xn(s).direction==="rtl"&&(u+=yn(t.clientWidth,s.clientWidth)-i),{width:i,height:c,x:u,y:f}}const DS=25;function RU(e,t){const r=bn(e),s=pr(e),i=r.visualViewport;let c=s.clientWidth,u=s.clientHeight,f=0,h=0;if(i){c=i.width,u=i.height;const y=fg();(!y||y&&t==="fixed")&&(f=i.offsetLeft,h=i.offsetTop)}const p=wf(s);if(p<=0){const y=s.ownerDocument,v=y.body,b=getComputedStyle(v),_=y.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(s.clientWidth-v.clientWidth-_);E<=DS&&(c-=E)}else p<=DS&&(c+=p);return{width:c,height:u,x:f,y:h}}const TU=new Set(["absolute","fixed"]);function AU(e,t){const r=vs(e,!0,t==="fixed"),s=r.top+e.clientTop,i=r.left+e.clientLeft,c=fr(e)?Na(e):lr(1),u=e.clientWidth*c.x,f=e.clientHeight*c.y,h=i*c.x,p=s*c.y;return{width:u,height:f,x:h,y:p}}function PS(e,t,r){let s;if(t==="viewport")s=RU(e,r);else if(t==="document")s=EU(pr(e));else if(Kn(t))s=AU(t,r);else{const i=LC(e);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Vu(s)}function $C(e,t){const r=Oo(e);return r===t||!Kn(r)||La(r)?!1:Xn(r).position==="fixed"||$C(r,t)}function OU(e,t){const r=t.get(e);if(r)return r;let s=mc(e,[],!1).filter(f=>Kn(f)&&Ha(f)!=="body"),i=null;const c=Xn(e).position==="fixed";let u=c?Oo(e):e;for(;Kn(u)&&!La(u);){const f=Xn(u),h=ug(u);!h&&f.position==="fixed"&&(i=null),(c?!h&&!i:!h&&f.position==="static"&&!!i&&TU.has(i.position)||Ec(u)&&!h&&$C(e,u))?s=s.filter(y=>y!==u):i=f,u=Oo(u)}return t.set(e,s),s}function kU(e){let{element:t,boundary:r,rootBoundary:s,strategy:i}=e;const u=[...r==="clippingAncestors"?vf(t)?[]:OU(t,this._c):[].concat(r),s],f=u[0],h=u.reduce((p,y)=>{const v=PS(t,y,i);return p.top=yn(v.top,p.top),p.right=Ao(v.right,p.right),p.bottom=Ao(v.bottom,p.bottom),p.left=yn(v.left,p.left),p},PS(t,f,i));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function MU(e){const{width:t,height:r}=PC(e);return{width:t,height:r}}function NU(e,t,r){const s=fr(t),i=pr(t),c=r==="fixed",u=vs(e,!0,c,t);let f={scrollLeft:0,scrollTop:0};const h=lr(0);function p(){h.x=wf(i)}if(s||!s&&!c)if((Ha(t)!=="body"||Ec(i))&&(f=bf(t)),s){const _=vs(t,!0,c,t);h.x=_.x+t.clientLeft,h.y=_.y+t.clientTop}else i&&p();c&&!s&&i&&p();const y=i&&!s&&!c?IC(i,f):lr(0),v=u.left+f.scrollLeft-h.x-y.x,b=u.top+f.scrollTop-h.y-y.y;return{x:v,y:b,width:u.width,height:u.height}}function kp(e){return Xn(e).position==="static"}function LS(e,t){if(!fr(e)||Xn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return pr(e)===r&&(r=r.ownerDocument.body),r}function UC(e,t){const r=bn(e);if(vf(e))return r;if(!fr(e)){let i=Oo(e);for(;i&&!La(i);){if(Kn(i)&&!kp(i))return i;i=Oo(i)}return r}let s=LS(e,t);for(;s&&pU(s)&&kp(s);)s=LS(s,t);return s&&La(s)&&kp(s)&&!ug(s)?r:s||bU(e)||r}const jU=async function(e){const t=this.getOffsetParent||UC,r=this.getDimensions,s=await r(e.floating);return{reference:NU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function zU(e){return Xn(e).direction==="rtl"}const DU={convertOffsetParentRelativeRectToViewportRelativeRect:_U,getDocumentElement:pr,getClippingRect:kU,getOffsetParent:UC,getElementRects:jU,getClientRects:CU,getDimensions:MU,getScale:Na,isElement:Kn,isRTL:zU};function BC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function PU(e,t){let r=null,s;const i=pr(e);function c(){var f;clearTimeout(s),(f=r)==null||f.disconnect(),r=null}function u(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),c();const p=e.getBoundingClientRect(),{left:y,top:v,width:b,height:_}=p;if(f||t(),!b||!_)return;const E=lu(v),x=lu(i.clientWidth-(y+b)),C=lu(i.clientHeight-(v+_)),O=lu(y),k={rootMargin:-E+"px "+-x+"px "+-C+"px "+-O+"px",threshold:yn(0,Ao(1,h))||1};let D=!0;function U(H){const L=H[0].intersectionRatio;if(L!==h){if(!D)return u();L?u(!1,L):s=setTimeout(()=>{u(!1,1e-7)},1e3)}L===1&&!BC(p,e.getBoundingClientRect())&&u(),D=!1}try{r=new IntersectionObserver(U,{...k,root:i.ownerDocument})}catch{r=new IntersectionObserver(U,k)}r.observe(e)}return u(!0),c}function LU(e,t,r,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:c=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,p=dg(e),y=i||c?[...p?mc(p):[],...mc(t)]:[];y.forEach(O=>{i&&O.addEventListener("scroll",r,{passive:!0}),c&&O.addEventListener("resize",r)});const v=p&&f?PU(p,r):null;let b=-1,_=null;u&&(_=new ResizeObserver(O=>{let[M]=O;M&&M.target===p&&_&&(_.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var k;(k=_)==null||k.observe(t)})),r()}),p&&!h&&_.observe(p),_.observe(t));let E,x=h?vs(e):null;h&&C();function C(){const O=vs(e);x&&!BC(x,O)&&r(),x=O,E=requestAnimationFrame(C)}return r(),()=>{var O;y.forEach(M=>{i&&M.removeEventListener("scroll",r),c&&M.removeEventListener("resize",r)}),v?.(),(O=_)==null||O.disconnect(),_=null,h&&cancelAnimationFrame(E)}}const IU=cU,$U=lU,UU=sU,BU=fU,qU=aU,IS=oU,FU=uU,VU=(e,t,r)=>{const s=new Map,i={platform:DU,...r},c={...i.platform,_c:s};return rU(e,t,{...i,platform:c})};var HU=typeof document<"u",ZU=function(){},yu=HU?w.useLayoutEffect:ZU;function Hu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,s,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(s=r;s--!==0;)if(!Hu(e[s],t[s]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(s=r;s--!==0;)if(!{}.hasOwnProperty.call(t,i[s]))return!1;for(s=r;s--!==0;){const c=i[s];if(!(c==="_owner"&&e.$$typeof)&&!Hu(e[c],t[c]))return!1}return!0}return e!==e&&t!==t}function qC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $S(e,t){const r=qC(e);return Math.round(t*r)/r}function Mp(e){const t=w.useRef(e);return yu(()=>{t.current=e}),t}function QU(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:s=[],platform:i,elements:{reference:c,floating:u}={},transform:f=!0,whileElementsMounted:h,open:p}=e,[y,v]=w.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[b,_]=w.useState(s);Hu(b,s)||_(s);const[E,x]=w.useState(null),[C,O]=w.useState(null),M=w.useCallback(V=>{V!==H.current&&(H.current=V,x(V))},[]),k=w.useCallback(V=>{V!==L.current&&(L.current=V,O(V))},[]),D=c||E,U=u||C,H=w.useRef(null),L=w.useRef(null),j=w.useRef(y),G=h!=null,ie=Mp(h),ae=Mp(i),te=Mp(p),ce=w.useCallback(()=>{if(!H.current||!L.current)return;const V={placement:t,strategy:r,middleware:b};ae.current&&(V.platform=ae.current),VU(H.current,L.current,V).then(re=>{const ve={...re,isPositioned:te.current!==!1};le.current&&!Hu(j.current,ve)&&(j.current=ve,$a.flushSync(()=>{v(ve)}))})},[b,t,r,ae,te]);yu(()=>{p===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,v(V=>({...V,isPositioned:!1})))},[p]);const le=w.useRef(!1);yu(()=>(le.current=!0,()=>{le.current=!1}),[]),yu(()=>{if(D&&(H.current=D),U&&(L.current=U),D&&U){if(ie.current)return ie.current(D,U,ce);ce()}},[D,U,ce,ie,G]);const me=w.useMemo(()=>({reference:H,floating:L,setReference:M,setFloating:k}),[M,k]),I=w.useMemo(()=>({reference:D,floating:U}),[D,U]),K=w.useMemo(()=>{const V={position:r,left:0,top:0};if(!I.floating)return V;const re=$S(I.floating,y.x),ve=$S(I.floating,y.y);return f?{...V,transform:"translate("+re+"px, "+ve+"px)",...qC(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:re,top:ve}},[r,f,I.floating,y.x,y.y]);return w.useMemo(()=>({...y,update:ce,refs:me,elements:I,floatingStyles:K}),[y,ce,me,I,K])}const GU=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:s,padding:i}=typeof e=="function"?e(r):e;return s&&t(s)?s.current!=null?IS({element:s.current,padding:i}).fn(r):{}:s?IS({element:s,padding:i}).fn(r):{}}}},YU=(e,t)=>({...IU(e),options:[e,t]}),KU=(e,t)=>({...$U(e),options:[e,t]}),XU=(e,t)=>({...FU(e),options:[e,t]}),JU=(e,t)=>({...UU(e),options:[e,t]}),WU=(e,t)=>({...BU(e),options:[e,t]}),eB=(e,t)=>({...qU(e),options:[e,t]}),tB=(e,t)=>({...GU(e),options:[e,t]});var nB="Arrow",FC=w.forwardRef((e,t)=>{const{children:r,width:s=10,height:i=5,...c}=e;return g.jsx(ke.svg,{...c,ref:t,width:s,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});FC.displayName=nB;var rB=FC,hg="Popper",[VC,Za]=hr(hg),[oB,HC]=VC(hg),ZC=e=>{const{__scopePopper:t,children:r}=e,[s,i]=w.useState(null);return g.jsx(oB,{scope:t,anchor:s,onAnchorChange:i,children:r})};ZC.displayName=hg;var QC="PopperAnchor",GC=w.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:s,...i}=e,c=HC(QC,r),u=w.useRef(null),f=Ve(t,u),h=w.useRef(null);return w.useEffect(()=>{const p=h.current;h.current=s?.current||u.current,p!==h.current&&c.onAnchorChange(h.current)}),s?null:g.jsx(ke.div,{...i,ref:f})});GC.displayName=QC;var pg="PopperContent",[sB,aB]=VC(pg),YC=w.forwardRef((e,t)=>{const{__scopePopper:r,side:s="bottom",sideOffset:i=0,align:c="center",alignOffset:u=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:p=[],collisionPadding:y=0,sticky:v="partial",hideWhenDetached:b=!1,updatePositionStrategy:_="optimized",onPlaced:E,...x}=e,C=HC(pg,r),[O,M]=w.useState(null),k=Ve(t,X=>M(X)),[D,U]=w.useState(null),H=_C(D),L=H?.width??0,j=H?.height??0,G=s+(c!=="center"?"-"+c:""),ie=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},ae=Array.isArray(p)?p:[p],te=ae.length>0,ce={padding:ie,boundary:ae.filter(cB),altBoundary:te},{refs:le,floatingStyles:me,placement:I,isPositioned:K,middlewareData:V}=QU({strategy:"fixed",placement:G,whileElementsMounted:(...X)=>LU(...X,{animationFrame:_==="always"}),elements:{reference:C.anchor},middleware:[YU({mainAxis:i+j,alignmentAxis:u}),h&&KU({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?XU():void 0,...ce}),h&&JU({...ce}),WU({...ce,apply:({elements:X,rects:_e,availableWidth:xe,availableHeight:Re})=>{const{width:Ae,height:Le}=_e.reference,yt=X.floating.style;yt.setProperty("--radix-popper-available-width",`${xe}px`),yt.setProperty("--radix-popper-available-height",`${Re}px`),yt.setProperty("--radix-popper-anchor-width",`${Ae}px`),yt.setProperty("--radix-popper-anchor-height",`${Le}px`)}}),D&&tB({element:D,padding:f}),lB({arrowWidth:L,arrowHeight:j}),b&&eB({strategy:"referenceHidden",...ce})]}),[re,ve]=JC(I),z=Yn(E);Rt(()=>{K&&z?.()},[K,z]);const Q=V.arrow?.x,ne=V.arrow?.y,oe=V.arrow?.centerOffset!==0,[pe,ye]=w.useState();return Rt(()=>{O&&ye(window.getComputedStyle(O).zIndex)},[O]),g.jsx("div",{ref:le.setFloating,"data-radix-popper-content-wrapper":"",style:{...me,transform:K?me.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(sB,{scope:r,placedSide:re,onArrowChange:U,arrowX:Q,arrowY:ne,shouldHideArrow:oe,children:g.jsx(ke.div,{"data-side":re,"data-align":ve,...x,ref:k,style:{...x.style,animation:K?void 0:"none"}})})})});YC.displayName=pg;var KC="PopperArrow",iB={top:"bottom",right:"left",bottom:"top",left:"right"},XC=w.forwardRef(function(t,r){const{__scopePopper:s,...i}=t,c=aB(KC,s),u=iB[c.placedSide];return g.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:g.jsx(rB,{...i,ref:r,style:{...i.style,display:"block"}})})});XC.displayName=KC;function cB(e){return e!==null}var lB=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:s,middlewareData:i}=t,u=i.arrow?.centerOffset!==0,f=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[p,y]=JC(r),v={start:"0%",center:"50%",end:"100%"}[y],b=(i.arrow?.x??0)+f/2,_=(i.arrow?.y??0)+h/2;let E="",x="";return p==="bottom"?(E=u?v:`${b}px`,x=`${-h}px`):p==="top"?(E=u?v:`${b}px`,x=`${s.floating.height+h}px`):p==="right"?(E=`${-h}px`,x=u?v:`${_}px`):p==="left"&&(E=`${s.floating.width+h}px`,x=u?v:`${_}px`),{data:{x:E,y:x}}}});function JC(e){const[t,r="center"]=e.split("-");return[t,r]}var mg=ZC,Sf=GC,gg=YC,yg=XC,WC=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),uB="VisuallyHidden",fB=w.forwardRef((e,t)=>g.jsx(ke.span,{...e,ref:t,style:{...WC,...e.style}}));fB.displayName=uB;var dB=[" ","Enter","ArrowUp","ArrowDown"],hB=[" ","Enter"],bs="Select",[xf,_f,pB]=sg(bs),[Qa]=hr(bs,[pB,Za]),Cf=Za(),[mB,Do]=Qa(bs),[gB,yB]=Qa(bs),eE=e=>{const{__scopeSelect:t,children:r,open:s,defaultOpen:i,onOpenChange:c,value:u,defaultValue:f,onValueChange:h,dir:p,name:y,autoComplete:v,disabled:b,required:_,form:E}=e,x=Cf(t),[C,O]=w.useState(null),[M,k]=w.useState(null),[D,U]=w.useState(!1),H=ag(p),[L,j]=To({prop:s,defaultProp:i??!1,onChange:c,caller:bs}),[G,ie]=To({prop:u,defaultProp:f,onChange:h,caller:bs}),ae=w.useRef(null),te=C?E||!!C.closest("form"):!0,[ce,le]=w.useState(new Set),me=Array.from(ce).map(I=>I.props.value).join(";");return g.jsx(mg,{...x,children:g.jsxs(mB,{required:_,scope:t,trigger:C,onTriggerChange:O,valueNode:M,onValueNodeChange:k,valueNodeHasChildren:D,onValueNodeHasChildrenChange:U,contentId:Qn(),value:G,onValueChange:ie,open:L,onOpenChange:j,dir:H,triggerPointerDownPosRef:ae,disabled:b,children:[g.jsx(xf.Provider,{scope:t,children:g.jsx(gB,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(I=>{le(K=>new Set(K).add(I))},[]),onNativeOptionRemove:w.useCallback(I=>{le(K=>{const V=new Set(K);return V.delete(I),V})},[]),children:r})}),te?g.jsxs(xE,{"aria-hidden":!0,required:_,tabIndex:-1,name:y,autoComplete:v,value:G,onChange:I=>ie(I.target.value),disabled:b,form:E,children:[G===void 0?g.jsx("option",{value:""}):null,Array.from(ce)]},me):null]})})};eE.displayName=bs;var tE="SelectTrigger",nE=w.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:s=!1,...i}=e,c=Cf(r),u=Do(tE,r),f=u.disabled||s,h=Ve(t,u.onTriggerChange),p=_f(r),y=w.useRef("touch"),[v,b,_]=CE(x=>{const C=p().filter(k=>!k.disabled),O=C.find(k=>k.value===u.value),M=EE(C,x,O);M!==void 0&&u.onValueChange(M.value)}),E=x=>{f||(u.onOpenChange(!0),_()),x&&(u.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return g.jsx(Sf,{asChild:!0,...c,children:g.jsx(ke.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":_E(u.value)?"":void 0,...i,ref:h,onClick:he(i.onClick,x=>{x.currentTarget.focus(),y.current!=="mouse"&&E(x)}),onPointerDown:he(i.onPointerDown,x=>{y.current=x.pointerType;const C=x.target;C.hasPointerCapture(x.pointerId)&&C.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(E(x),x.preventDefault())}),onKeyDown:he(i.onKeyDown,x=>{const C=v.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&b(x.key),!(C&&x.key===" ")&&dB.includes(x.key)&&(E(),x.preventDefault())})})})});nE.displayName=tE;var rE="SelectValue",oE=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:s,style:i,children:c,placeholder:u="",...f}=e,h=Do(rE,r),{onValueNodeHasChildrenChange:p}=h,y=c!==void 0,v=Ve(t,h.onValueNodeChange);return Rt(()=>{p(y)},[p,y]),g.jsx(ke.span,{...f,ref:v,style:{pointerEvents:"none"},children:_E(h.value)?g.jsx(g.Fragment,{children:u}):c})});oE.displayName=rE;var vB="SelectIcon",sE=w.forwardRef((e,t)=>{const{__scopeSelect:r,children:s,...i}=e;return g.jsx(ke.span,{"aria-hidden":!0,...i,ref:t,children:s||"▼"})});sE.displayName=vB;var bB="SelectPortal",aE=e=>g.jsx(_c,{asChild:!0,...e});aE.displayName=bB;var ws="SelectContent",iE=w.forwardRef((e,t)=>{const r=Do(ws,e.__scopeSelect),[s,i]=w.useState();if(Rt(()=>{i(new DocumentFragment)},[]),!r.open){const c=s;return c?$a.createPortal(g.jsx(cE,{scope:e.__scopeSelect,children:g.jsx(xf.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),c):null}return g.jsx(lE,{...e,ref:t})});iE.displayName=ws;var Hn=10,[cE,Po]=Qa(ws),wB="SelectContentImpl",SB=gs("SelectContent.RemoveScroll"),lE=w.forwardRef((e,t)=>{const{__scopeSelect:r,position:s="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:c,onPointerDownOutside:u,side:f,sideOffset:h,align:p,alignOffset:y,arrowPadding:v,collisionBoundary:b,collisionPadding:_,sticky:E,hideWhenDetached:x,avoidCollisions:C,...O}=e,M=Do(ws,r),[k,D]=w.useState(null),[U,H]=w.useState(null),L=Ve(t,X=>D(X)),[j,G]=w.useState(null),[ie,ae]=w.useState(null),te=_f(r),[ce,le]=w.useState(!1),me=w.useRef(!1);w.useEffect(()=>{if(k)return hf(k)},[k]),ff();const I=w.useCallback(X=>{const[_e,...xe]=te().map(Le=>Le.ref.current),[Re]=xe.slice(-1),Ae=document.activeElement;for(const Le of X)if(Le===Ae||(Le?.scrollIntoView({block:"nearest"}),Le===_e&&U&&(U.scrollTop=0),Le===Re&&U&&(U.scrollTop=U.scrollHeight),Le?.focus(),document.activeElement!==Ae))return},[te,U]),K=w.useCallback(()=>I([j,k]),[I,j,k]);w.useEffect(()=>{ce&&K()},[ce,K]);const{onOpenChange:V,triggerPointerDownPosRef:re}=M;w.useEffect(()=>{if(k){let X={x:0,y:0};const _e=Re=>{X={x:Math.abs(Math.round(Re.pageX)-(re.current?.x??0)),y:Math.abs(Math.round(Re.pageY)-(re.current?.y??0))}},xe=Re=>{X.x<=10&&X.y<=10?Re.preventDefault():k.contains(Re.target)||V(!1),document.removeEventListener("pointermove",_e),re.current=null};return re.current!==null&&(document.addEventListener("pointermove",_e),document.addEventListener("pointerup",xe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",_e),document.removeEventListener("pointerup",xe,{capture:!0})}}},[k,V,re]),w.useEffect(()=>{const X=()=>V(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[V]);const[ve,z]=CE(X=>{const _e=te().filter(Ae=>!Ae.disabled),xe=_e.find(Ae=>Ae.ref.current===document.activeElement),Re=EE(_e,X,xe);Re&&setTimeout(()=>Re.ref.current.focus())}),Q=w.useCallback((X,_e,xe)=>{const Re=!me.current&&!xe;(M.value!==void 0&&M.value===_e||Re)&&(G(X),Re&&(me.current=!0))},[M.value]),ne=w.useCallback(()=>k?.focus(),[k]),oe=w.useCallback((X,_e,xe)=>{const Re=!me.current&&!xe;(M.value!==void 0&&M.value===_e||Re)&&ae(X)},[M.value]),pe=s==="popper"?am:uE,ye=pe===am?{side:f,sideOffset:h,align:p,alignOffset:y,arrowPadding:v,collisionBoundary:b,collisionPadding:_,sticky:E,hideWhenDetached:x,avoidCollisions:C}:{};return g.jsx(cE,{scope:r,content:k,viewport:U,onViewportChange:H,itemRefCallback:Q,selectedItem:j,onItemLeave:ne,itemTextRefCallback:oe,focusSelectedItem:K,selectedItemText:ie,position:s,isPositioned:ce,searchRef:ve,children:g.jsx(Cc,{as:SB,allowPinchZoom:!0,children:g.jsx(xc,{asChild:!0,trapped:M.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:he(i,X=>{M.trigger?.focus({preventScroll:!0}),X.preventDefault()}),children:g.jsx(Sc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>M.onOpenChange(!1),children:g.jsx(pe,{role:"listbox",id:M.contentId,"data-state":M.open?"open":"closed",dir:M.dir,onContextMenu:X=>X.preventDefault(),...O,...ye,onPlaced:()=>le(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...O.style},onKeyDown:he(O.onKeyDown,X=>{const _e=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!_e&&X.key.length===1&&z(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let Re=te().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);if(["ArrowUp","End"].includes(X.key)&&(Re=Re.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const Ae=X.target,Le=Re.indexOf(Ae);Re=Re.slice(Le+1)}setTimeout(()=>I(Re)),X.preventDefault()}})})})})})})});lE.displayName=wB;var xB="SelectItemAlignedPosition",uE=w.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:s,...i}=e,c=Do(ws,r),u=Po(ws,r),[f,h]=w.useState(null),[p,y]=w.useState(null),v=Ve(t,L=>y(L)),b=_f(r),_=w.useRef(!1),E=w.useRef(!0),{viewport:x,selectedItem:C,selectedItemText:O,focusSelectedItem:M}=u,k=w.useCallback(()=>{if(c.trigger&&c.valueNode&&f&&p&&x&&C&&O){const L=c.trigger.getBoundingClientRect(),j=p.getBoundingClientRect(),G=c.valueNode.getBoundingClientRect(),ie=O.getBoundingClientRect();if(c.dir!=="rtl"){const Ae=ie.left-j.left,Le=G.left-Ae,yt=L.left-Le,vt=L.width+yt,Sn=Math.max(vt,j.width),Yt=window.innerWidth-Hn,nt=AS(Le,[Hn,Math.max(Hn,Yt-Sn)]);f.style.minWidth=vt+"px",f.style.left=nt+"px"}else{const Ae=j.right-ie.right,Le=window.innerWidth-G.right-Ae,yt=window.innerWidth-L.right-Le,vt=L.width+yt,Sn=Math.max(vt,j.width),Yt=window.innerWidth-Hn,nt=AS(Le,[Hn,Math.max(Hn,Yt-Sn)]);f.style.minWidth=vt+"px",f.style.right=nt+"px"}const ae=b(),te=window.innerHeight-Hn*2,ce=x.scrollHeight,le=window.getComputedStyle(p),me=parseInt(le.borderTopWidth,10),I=parseInt(le.paddingTop,10),K=parseInt(le.borderBottomWidth,10),V=parseInt(le.paddingBottom,10),re=me+I+ce+V+K,ve=Math.min(C.offsetHeight*5,re),z=window.getComputedStyle(x),Q=parseInt(z.paddingTop,10),ne=parseInt(z.paddingBottom,10),oe=L.top+L.height/2-Hn,pe=te-oe,ye=C.offsetHeight/2,X=C.offsetTop+ye,_e=me+I+X,xe=re-_e;if(_e<=oe){const Ae=ae.length>0&&C===ae[ae.length-1].ref.current;f.style.bottom="0px";const Le=p.clientHeight-x.offsetTop-x.offsetHeight,yt=Math.max(pe,ye+(Ae?ne:0)+Le+K),vt=_e+yt;f.style.height=vt+"px"}else{const Ae=ae.length>0&&C===ae[0].ref.current;f.style.top="0px";const yt=Math.max(oe,me+x.offsetTop+(Ae?Q:0)+ye)+xe;f.style.height=yt+"px",x.scrollTop=_e-oe+x.offsetTop}f.style.margin=`${Hn}px 0`,f.style.minHeight=ve+"px",f.style.maxHeight=te+"px",s?.(),requestAnimationFrame(()=>_.current=!0)}},[b,c.trigger,c.valueNode,f,p,x,C,O,c.dir,s]);Rt(()=>k(),[k]);const[D,U]=w.useState();Rt(()=>{p&&U(window.getComputedStyle(p).zIndex)},[p]);const H=w.useCallback(L=>{L&&E.current===!0&&(k(),M?.(),E.current=!1)},[k,M]);return g.jsx(CB,{scope:r,contentWrapper:f,shouldExpandOnScrollRef:_,onScrollButtonChange:H,children:g.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:g.jsx(ke.div,{...i,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});uE.displayName=xB;var _B="SelectPopperPosition",am=w.forwardRef((e,t)=>{const{__scopeSelect:r,align:s="start",collisionPadding:i=Hn,...c}=e,u=Cf(r);return g.jsx(gg,{...u,...c,ref:t,align:s,collisionPadding:i,style:{boxSizing:"border-box",...c.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});am.displayName=_B;var[CB,vg]=Qa(ws,{}),im="SelectViewport",fE=w.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:s,...i}=e,c=Po(im,r),u=vg(im,r),f=Ve(t,c.onViewportChange),h=w.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),g.jsx(xf.Slot,{scope:r,children:g.jsx(ke.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:he(i.onScroll,p=>{const y=p.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:b}=u;if(b?.current&&v){const _=Math.abs(h.current-y.scrollTop);if(_>0){const E=window.innerHeight-Hn*2,x=parseFloat(v.style.minHeight),C=parseFloat(v.style.height),O=Math.max(x,C);if(O<E){const M=O+_,k=Math.min(E,M),D=M-k;v.style.height=k+"px",v.style.bottom==="0px"&&(y.scrollTop=D>0?D:0,v.style.justifyContent="flex-end")}}}h.current=y.scrollTop})})})]})});fE.displayName=im;var dE="SelectGroup",[EB,RB]=Qa(dE),TB=w.forwardRef((e,t)=>{const{__scopeSelect:r,...s}=e,i=Qn();return g.jsx(EB,{scope:r,id:i,children:g.jsx(ke.div,{role:"group","aria-labelledby":i,...s,ref:t})})});TB.displayName=dE;var hE="SelectLabel",AB=w.forwardRef((e,t)=>{const{__scopeSelect:r,...s}=e,i=RB(hE,r);return g.jsx(ke.div,{id:i.id,...s,ref:t})});AB.displayName=hE;var Zu="SelectItem",[OB,pE]=Qa(Zu),mE=w.forwardRef((e,t)=>{const{__scopeSelect:r,value:s,disabled:i=!1,textValue:c,...u}=e,f=Do(Zu,r),h=Po(Zu,r),p=f.value===s,[y,v]=w.useState(c??""),[b,_]=w.useState(!1),E=Ve(t,M=>h.itemRefCallback?.(M,s,i)),x=Qn(),C=w.useRef("touch"),O=()=>{i||(f.onValueChange(s),f.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(OB,{scope:r,value:s,disabled:i,textId:x,isSelected:p,onItemTextChange:w.useCallback(M=>{v(k=>k||(M?.textContent??"").trim())},[]),children:g.jsx(xf.ItemSlot,{scope:r,value:s,disabled:i,textValue:y,children:g.jsx(ke.div,{role:"option","aria-labelledby":x,"data-highlighted":b?"":void 0,"aria-selected":p&&b,"data-state":p?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...u,ref:E,onFocus:he(u.onFocus,()=>_(!0)),onBlur:he(u.onBlur,()=>_(!1)),onClick:he(u.onClick,()=>{C.current!=="mouse"&&O()}),onPointerUp:he(u.onPointerUp,()=>{C.current==="mouse"&&O()}),onPointerDown:he(u.onPointerDown,M=>{C.current=M.pointerType}),onPointerMove:he(u.onPointerMove,M=>{C.current=M.pointerType,i?h.onItemLeave?.():C.current==="mouse"&&M.currentTarget.focus({preventScroll:!0})}),onPointerLeave:he(u.onPointerLeave,M=>{M.currentTarget===document.activeElement&&h.onItemLeave?.()}),onKeyDown:he(u.onKeyDown,M=>{h.searchRef?.current!==""&&M.key===" "||(hB.includes(M.key)&&O(),M.key===" "&&M.preventDefault())})})})})});mE.displayName=Zu;var Xi="SelectItemText",gE=w.forwardRef((e,t)=>{const{__scopeSelect:r,className:s,style:i,...c}=e,u=Do(Xi,r),f=Po(Xi,r),h=pE(Xi,r),p=yB(Xi,r),[y,v]=w.useState(null),b=Ve(t,O=>v(O),h.onItemTextChange,O=>f.itemTextRefCallback?.(O,h.value,h.disabled)),_=y?.textContent,E=w.useMemo(()=>g.jsx("option",{value:h.value,disabled:h.disabled,children:_},h.value),[h.disabled,h.value,_]),{onNativeOptionAdd:x,onNativeOptionRemove:C}=p;return Rt(()=>(x(E),()=>C(E)),[x,C,E]),g.jsxs(g.Fragment,{children:[g.jsx(ke.span,{id:h.textId,...c,ref:b}),h.isSelected&&u.valueNode&&!u.valueNodeHasChildren?$a.createPortal(c.children,u.valueNode):null]})});gE.displayName=Xi;var yE="SelectItemIndicator",vE=w.forwardRef((e,t)=>{const{__scopeSelect:r,...s}=e;return pE(yE,r).isSelected?g.jsx(ke.span,{"aria-hidden":!0,...s,ref:t}):null});vE.displayName=yE;var cm="SelectScrollUpButton",bE=w.forwardRef((e,t)=>{const r=Po(cm,e.__scopeSelect),s=vg(cm,e.__scopeSelect),[i,c]=w.useState(!1),u=Ve(t,s.onScrollButtonChange);return Rt(()=>{if(r.viewport&&r.isPositioned){let f=function(){const p=h.scrollTop>0;c(p)};const h=r.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),i?g.jsx(SE,{...e,ref:u,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=r;f&&h&&(f.scrollTop=f.scrollTop-h.offsetHeight)}}):null});bE.displayName=cm;var lm="SelectScrollDownButton",wE=w.forwardRef((e,t)=>{const r=Po(lm,e.__scopeSelect),s=vg(lm,e.__scopeSelect),[i,c]=w.useState(!1),u=Ve(t,s.onScrollButtonChange);return Rt(()=>{if(r.viewport&&r.isPositioned){let f=function(){const p=h.scrollHeight-h.clientHeight,y=Math.ceil(h.scrollTop)<p;c(y)};const h=r.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),i?g.jsx(SE,{...e,ref:u,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=r;f&&h&&(f.scrollTop=f.scrollTop+h.offsetHeight)}}):null});wE.displayName=lm;var SE=w.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:s,...i}=e,c=Po("SelectScrollButton",r),u=w.useRef(null),f=_f(r),h=w.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return w.useEffect(()=>()=>h(),[h]),Rt(()=>{f().find(y=>y.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[f]),g.jsx(ke.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:he(i.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(s,50))}),onPointerMove:he(i.onPointerMove,()=>{c.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(s,50))}),onPointerLeave:he(i.onPointerLeave,()=>{h()})})}),kB="SelectSeparator",MB=w.forwardRef((e,t)=>{const{__scopeSelect:r,...s}=e;return g.jsx(ke.div,{"aria-hidden":!0,...s,ref:t})});MB.displayName=kB;var um="SelectArrow",NB=w.forwardRef((e,t)=>{const{__scopeSelect:r,...s}=e,i=Cf(r),c=Do(um,r),u=Po(um,r);return c.open&&u.position==="popper"?g.jsx(yg,{...i,...s,ref:t}):null});NB.displayName=um;var jB="SelectBubbleInput",xE=w.forwardRef(({__scopeSelect:e,value:t,...r},s)=>{const i=w.useRef(null),c=Ve(s,i),u=xC(t);return w.useEffect(()=>{const f=i.current;if(!f)return;const h=window.HTMLSelectElement.prototype,y=Object.getOwnPropertyDescriptor(h,"value").set;if(u!==t&&y){const v=new Event("change",{bubbles:!0});y.call(f,t),f.dispatchEvent(v)}},[u,t]),g.jsx(ke.select,{...r,style:{...WC,...r.style},ref:c,defaultValue:t})});xE.displayName=jB;function _E(e){return e===""||e===void 0}function CE(e){const t=Yn(e),r=w.useRef(""),s=w.useRef(0),i=w.useCallback(u=>{const f=r.current+u;t(f),(function h(p){r.current=p,window.clearTimeout(s.current),p!==""&&(s.current=window.setTimeout(()=>h(""),1e3))})(f)},[t]),c=w.useCallback(()=>{r.current="",window.clearTimeout(s.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),[r,i,c]}function EE(e,t,r){const i=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,c=r?e.indexOf(r):-1;let u=zB(e,Math.max(c,0));i.length===1&&(u=u.filter(p=>p!==r));const h=u.find(p=>p.textValue.toLowerCase().startsWith(i.toLowerCase()));return h!==r?h:void 0}function zB(e,t){return e.map((r,s)=>e[(t+s)%e.length])}var DB=eE,PB=nE,LB=oE,IB=sE,$B=aE,UB=iE,BB=fE,qB=mE,FB=gE,VB=vE,HB=bE,ZB=wE;function Np({...e}){return g.jsx(DB,{"data-slot":"select",...e})}function jp({...e}){return g.jsx(LB,{"data-slot":"select-value",...e})}function zp({className:e,size:t="default",children:r,...s}){return g.jsxs(PB,{"data-slot":"select-trigger","data-size":t,className:je("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...s,children:[r,g.jsx(IB,{asChild:!0,children:g.jsx(_s,{className:"size-4 opacity-50"})})]})}function Dp({className:e,children:t,position:r="item-aligned",align:s="center",...i}){return g.jsx($B,{children:g.jsxs(UB,{"data-slot":"select-content",className:je("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,align:s,...i,children:[g.jsx(QB,{}),g.jsx(BB,{className:je("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),g.jsx(GB,{})]})})}function Qi({className:e,children:t,...r}){return g.jsxs(qB,{"data-slot":"select-item",className:je("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[g.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:g.jsx(VB,{children:g.jsx(M1,{className:"size-4"})})}),g.jsx(FB,{children:t})]})}function QB({className:e,...t}){return g.jsx(HB,{"data-slot":"select-scroll-up-button",className:je("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(N1,{className:"size-4"})})}function GB({className:e,...t}){return g.jsx(ZB,{"data-slot":"select-scroll-down-button",className:je("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(_s,{className:"size-4"})})}function YB({isOpen:e,onClose:t,breakingChanges:r,onForceUpdate:s,onCancel:i,isLoading:c}){const u=()=>{i(),t()};return g.jsx(rg,{open:e,onOpenChange:f=>!f&&!c&&u(),title:"Breaking Changes Detected",size:"lg",footer:g.jsxs(g.Fragment,{children:[g.jsx($r,{variant:"outline",onClick:u,disabled:c,children:"Cancel"}),g.jsx($r,{variant:"danger",onClick:s,loading:c,children:"Force Update"})]}),children:g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"diff-modified flex items-start gap-3 rounded-lg border p-3",children:[g.jsx(jD,{className:"mt-0.5 size-5 shrink-0 text-diff-modified"}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"text-sm font-medium text-diff-modified",children:"These changes may affect existing content"}),g.jsx("p",{className:"text-sm text-diff-modified-foreground",children:"The following changes could cause data loss or validation errors for existing entries. Review carefully before proceeding."})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("p",{className:"text-sm font-medium text-foreground",children:[r.length," breaking change",r.length!==1?"s":""," detected:"]}),g.jsx("ul",{className:"space-y-2",children:r.map((f,h)=>g.jsxs("li",{className:"flex items-start gap-2 rounded-md border bg-muted/30 px-3 py-2 text-sm",children:[g.jsx("span",{className:"mt-0.5 size-1.5 shrink-0 rounded-full bg-warning"}),g.jsx("span",{className:"text-muted-foreground",children:f})]},h))})]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:'Click "Force Update" to apply these changes anyway, or "Cancel" to go back and modify your changes.'})]})})}const Pp={text:{label:"Text",icon:g.jsx(AD,{className:"size-4"}),description:"Single line text input"},richText:{label:"Rich Text",icon:g.jsx(O3,{className:"size-4"}),description:"Multi-line formatted text"},number:{label:"Number",icon:g.jsx(z1,{className:"size-4"}),description:"Numeric value"},boolean:{label:"Boolean",icon:g.jsx($1,{className:"size-4"}),description:"True/false toggle"},date:{label:"Date",icon:g.jsx(Kp,{className:"size-4"}),description:"Date picker"},datetime:{label:"Date & Time",icon:g.jsx(Kp,{className:"size-4"}),description:"Date and time picker"},reference:{label:"Reference",icon:g.jsx(Q3,{className:"size-4"}),description:"Link to another content entry"},media:{label:"Media",icon:g.jsx(P1,{className:"size-4"}),description:"Image, video, or file"},json:{label:"JSON",icon:g.jsx(k1,{className:"size-4"}),description:"Custom JSON data"},select:{label:"Select",icon:g.jsx(_s,{className:"size-4"}),description:"Dropdown selection"},multiSelect:{label:"Multi-Select",icon:g.jsx(X3,{className:"size-4"}),description:"Multiple selections"},tags:{label:"Tags",icon:g.jsx(CD,{className:"size-4"}),description:"Free-form tag list"},category:{label:"Category",icon:g.jsx(j3,{className:"size-4"}),description:"Taxonomy category selection"}};function US(e){return e.toLowerCase().trim().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"_").replace(/^[0-9]/,"_$&").slice(0,64)}function BS(e){return/^[a-z][a-z0-9_]{0,63}$/.test(e)}function KB({isOpen:e,onClose:t,onCreated:r,onUpdated:s,contentType:i}){const c=!!i,u=i?.source==="code",f=u,[h,p]=w.useState(""),[y,v]=w.useState(""),[b,_]=w.useState(!1),[E,x]=w.useState(""),[C,O]=w.useState(!1),[M,k]=w.useState([{name:"title",label:"Title",type:"text",required:!0}]),[D,U]=w.useState("title"),[H,L]=w.useState("title"),[j,G]=w.useState(!1),[ie,ae]=w.useState(null),[te,ce]=w.useState(null),[le,me]=w.useState(!1),[I,K]=w.useState([]),[V,re]=w.useState(!1),[ve,z]=w.useState(!1),Q=Ow($u.admin.createContentType),ne=Ow($u.admin.updateContentType);w.useEffect(()=>{i&&e&&(p(i.displayName),v(i.name),_(!0),x(i.description||""),O(i.singleton||!1),k(i.fields),U(i.titleField||""),L(i.slugField||""))},[i,e]);const oe=w.useCallback(()=>{p(""),v(""),_(!1),x(""),O(!1),k([{name:"title",label:"Title",type:"text",required:!0}]),U("title"),L("title"),G(!1),ae(null),ce(null),me(!1),K([]),re(!1),z(!1)},[]),pe=w.useCallback(se=>{p(se),b||v(US(se))},[b]),ye=w.useCallback(se=>{_(!0),v(se.toLowerCase().replace(/[^a-z0-9_]/g,""))},[]),X=w.useCallback(()=>{const se=`field_${M.length+1}`;k(Ee=>[...Ee,{name:se,label:`Field ${Ee.length+1}`,type:"text",required:!1}]),ce(M.length),me(!0)},[M.length]),_e=w.useCallback(se=>{const Ee=M[se];if(k(Ue=>Ue.filter((ze,Mt)=>Mt!==se)),D===Ee.name){const Ue=M.find((ze,Mt)=>Mt!==se&&ze.type==="text");U(Ue?.name||"")}if(H===Ee.name){const Ue=M.find((ze,Mt)=>Mt!==se&&ze.type==="text");L(Ue?.name||"")}te===se?(ce(null),me(!1)):te!==null&&te>se&&ce(te-1)},[M,te,D,H]),xe=w.useCallback((se,Ee)=>{k(Ue=>Ue.map((ze,Mt)=>Mt===se?{...ze,...Ee}:ze))},[]),Re=w.useCallback((se,Ee)=>{k(Ue=>{const ze=[...Ue],[Mt]=ze.splice(se,1);return ze.splice(Ee,0,Mt),ze}),ce(Ee)},[]),Ae=w.useMemo(()=>{const se=[];h.trim()||se.push("Display name is required"),y.trim()?BS(y)||se.push("System Name must start with a letter and contain only lowercase letters, numbers, and underscores"):se.push("System Name is required"),M.length===0&&se.push("At least one field is required");const Ee=M.map(ze=>ze.name),Ue=Ee.filter((ze,Mt)=>Ee.indexOf(ze)!==Mt);Ue.length>0&&se.push(`Duplicate field names: ${[...new Set(Ue)].join(", ")}`);for(const ze of M)ze.name.trim()?/^[a-z][a-z0-9_]{0,63}$/.test(ze.name)||se.push(`Field "${ze.name}" has an invalid name format`):se.push(`Field "${ze.label}" has an empty name`),ze.label.trim()||se.push(`Field with name "${ze.name}" has an empty label`),(ze.type==="select"||ze.type==="multiSelect")&&(!ze.options?.options||ze.options.options.length===0)&&se.push(`${ze.type} field "${ze.label}" requires at least one option`);return se},[h,y,M]),Le=w.useMemo(()=>M.filter(se=>se.type==="text"),[M]),yt=se=>se.split(`
|
|
102
|
-
`).filter(Ue=>Ue.trim().startsWith("-")).map(Ue=>Ue.trim().substring(2)),vt=w.useCallback(async(se,Ee=!1)=>{if(se.preventDefault(),Ae.length>0){ae(Ae.join(". "));return}G(!0),ae(null);try{if(c&&i){const Ue=await ne({id:i._id,displayName:h.trim(),description:E.trim()||void 0,fields:M,singleton:C,titleField:D||void 0,slugField:H||void 0,force:Ee});s?.(Ue),oe(),t()}else{const Ue=await Q({name:y,displayName:h.trim(),description:E.trim()||void 0,fields:M,singleton:C,titleField:D||void 0,slugField:H||void 0});r?.(Ue),oe(),t()}}catch(Ue){const ze=Ue instanceof Error?Ue.message:c?"Failed to update content type":"Failed to create content type";if(c&&!Ee&&ze.includes("breaking change")){const Mt=yt(ze);K(Mt),re(!0)}else ae(ze)}finally{G(!1)}},[Ae,c,i,Q,ne,y,h,E,M,C,D,H,r,s,oe,t]),Sn=w.useCallback(async()=>{z(!0);try{if(i){const se=await ne({id:i._id,displayName:h.trim(),description:E.trim()||void 0,fields:M,singleton:C,titleField:D||void 0,slugField:H||void 0,force:!0});s?.(se),oe(),re(!1),t()}}catch(se){const Ee=se instanceof Error?se.message:"Failed to update content type";ae(Ee),re(!1)}finally{z(!1)}},[i,ne,h,E,M,C,D,H,s,oe,t]),Yt=w.useCallback(()=>{j||(oe(),t())},[j,oe,t]);if(!e)return null;const nt=te!==null?M[te]:null;return g.jsxs(g.Fragment,{children:[g.jsx(rg,{open:e,onOpenChange:se=>!se&&Yt(),title:u?"View Content Type":c?"Edit Content Type":"Create Content Type",size:"2xl",footer:f?g.jsx($r,{variant:"outline",onClick:Yt,children:"Close"}):g.jsxs(g.Fragment,{children:[g.jsx($r,{variant:"outline",onClick:Yt,disabled:j,children:"Cancel"}),g.jsx($r,{variant:"primary",onClick:vt,disabled:Ae.length>0,loading:j,"data-testid":c?"update-content-type-submit":"create-content-type-submit",children:c?"Save Changes":"Create Content Type"})]}),children:g.jsxs("form",{onSubmit:vt,className:"space-y-6",children:[u&&g.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-violet-200 bg-violet-50 p-3",children:[g.jsx(m3,{className:"mt-0.5 size-5 shrink-0 text-violet-600"}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"text-sm font-medium text-violet-900",children:"Managed by Code"}),g.jsx("p",{className:"text-sm text-violet-700",children:"This content type is defined in your codebase and cannot be edited through the admin interface. To make changes, update the definition in your code."})]})]}),g.jsxs("div",{className:"space-y-4",children:[g.jsx("h4",{className:"text-sm font-semibold text-foreground",children:"Basic Information"}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(jn,{htmlFor:"displayName",children:["Display Name ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsx(os,{id:"displayName",value:h,onChange:se=>pe(se.target.value),placeholder:"e.g., Blog Post",disabled:j||f,autoFocus:!f,"data-testid":"display-name-input"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(jn,{htmlFor:"machineName",children:["System Name ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsx(os,{id:"machineName",value:y,onChange:se=>ye(se.target.value),placeholder:"e.g., blog_post",disabled:j||c||f,className:je(!BS(y)&&y&&"border-destructive"),"data-testid":"machine-name-input"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:c?"System name cannot be changed after creation":"Lowercase letters, numbers, and underscores only. Used in API queries."})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(jn,{htmlFor:"description",children:"Description"}),g.jsx(U8,{id:"description",value:E,onChange:se=>x(se.target.value),placeholder:"Optional description of this content type",disabled:j||f,rows:2})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(TS,{id:"singleton",checked:C,onCheckedChange:se=>O(se),disabled:j||f}),g.jsx(jn,{htmlFor:"singleton",className:"cursor-pointer",children:"Singleton (only one entry allowed)"})]})]}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h4",{className:"text-sm font-semibold text-foreground",children:"Fields"}),!f&&g.jsxs($r,{type:"button",variant:"secondary",size:"sm",onClick:X,disabled:j,"data-testid":"add-field-button",children:[g.jsx(I1,{className:"size-3.5"}),"Add Field"]})]}),g.jsx("div",{className:"space-y-2",children:M.map((se,Ee)=>g.jsxs("div",{className:je("flex items-center gap-2 rounded-lg border p-2 transition-colors",!f&&"cursor-pointer hover:bg-muted/50",te===Ee&&"border-primary bg-primary/5"),onClick:()=>{f||(ce(Ee),me(!0))},"data-testid":`field-item-${Ee}`,children:[!f&&g.jsxs("div",{className:"flex flex-col gap-0.5",children:[Ee>0&&g.jsx("button",{type:"button",onClick:Ue=>{Ue.stopPropagation(),Re(Ee,Ee-1)},className:"rounded p-0.5 text-muted-foreground hover:bg-muted hover:text-foreground",children:g.jsx(N1,{className:"size-3"})}),Ee<M.length-1&&g.jsx("button",{type:"button",onClick:Ue=>{Ue.stopPropagation(),Re(Ee,Ee+1)},className:"rounded p-0.5 text-muted-foreground hover:bg-muted hover:text-foreground",children:g.jsx(_s,{className:"size-3"})})]}),g.jsx("div",{className:"flex size-8 items-center justify-center rounded bg-muted text-muted-foreground",children:Pp[se.type].icon}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("p",{className:"truncate text-sm font-medium",children:se.label}),g.jsxs("p",{className:"text-xs text-muted-foreground",children:[Pp[se.type].label,se.required&&" *"]})]}),!f&&g.jsx("button",{type:"button",onClick:Ue=>{Ue.stopPropagation(),_e(Ee)},disabled:j||M.length===1,className:"rounded p-1 text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive disabled:opacity-50",children:g.jsx(ju,{className:"size-4"})})]},Ee))}),!f&&le&&nt&&te!==null&&g.jsxs("div",{className:"rounded-lg border bg-muted/30 p-4","data-testid":"field-editor",children:[g.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[g.jsxs("h5",{className:"font-medium",children:["Edit Field: ",nt.label]}),g.jsx("button",{type:"button",onClick:()=>{me(!1),ce(null)},className:"rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",children:g.jsx(ju,{className:"size-4"})})]}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsxs(jn,{htmlFor:"fieldLabel",children:["Label ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsx(os,{id:"fieldLabel",value:nt.label,onChange:se=>xe(te,{label:se.target.value,name:b?nt.name:US(se.target.value)||nt.name}),disabled:j,"data-testid":"field-label-input"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(jn,{htmlFor:"fieldName",children:["Name ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsx(os,{id:"fieldName",value:nt.name,onChange:se=>xe(te,{name:se.target.value.toLowerCase().replace(/[^a-z0-9_]/g,"")}),disabled:j,"data-testid":"field-name-input"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(jn,{htmlFor:"fieldType",children:["Type ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsxs(Np,{value:nt.type,onValueChange:se=>xe(te,{type:se,options:void 0}),disabled:j,children:[g.jsx(zp,{"data-testid":"field-type-select",children:g.jsx(jp,{})}),g.jsx(Dp,{children:Object.entries(Pp).map(([se,Ee])=>g.jsx(Qi,{value:se,children:g.jsxs("div",{className:"flex items-center gap-2",children:[Ee.icon,g.jsx("span",{children:Ee.label}),g.jsxs("span",{className:"text-muted-foreground",children:["- ",Ee.description]})]})},se))})]})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(TS,{id:"fieldRequired",checked:nt.required,onCheckedChange:se=>xe(te,{required:se}),disabled:j}),g.jsx(jn,{htmlFor:"fieldRequired",className:"cursor-pointer",children:"Required"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(jn,{htmlFor:"fieldDescription",children:"Help Text"}),g.jsx(os,{id:"fieldDescription",value:nt.description||"",onChange:se=>xe(te,{description:se.target.value||void 0}),placeholder:"Help text shown below the field",disabled:j})]}),(nt.type==="select"||nt.type==="multiSelect")&&g.jsx(XB,{options:nt.options?.options||[],onChange:se=>xe(te,{options:{...nt.options,options:se}}),disabled:j})]})]})]}),Le.length>0&&g.jsxs("div",{className:"space-y-4",children:[g.jsx("h4",{className:"text-sm font-semibold text-foreground",children:"Display Settings"}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(jn,{htmlFor:"titleField",children:"Title Field"}),g.jsxs(Np,{value:D||"none",onValueChange:se=>U(se==="none"?"":se),disabled:j,children:[g.jsx(zp,{children:g.jsx(jp,{placeholder:"None"})}),g.jsxs(Dp,{children:[g.jsx(Qi,{value:"none",children:"None"}),Le.map(se=>g.jsx(Qi,{value:se.name,children:se.label},se.name))]})]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Field to display as the entry title in lists"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(jn,{htmlFor:"slugField",children:"Slug Field"}),g.jsxs(Np,{value:H||"none",onValueChange:se=>L(se==="none"?"":se),disabled:j,children:[g.jsx(zp,{children:g.jsx(jp,{placeholder:"None (auto-generate)"})}),g.jsxs(Dp,{children:[g.jsx(Qi,{value:"none",children:"None (auto-generate)"}),Le.map(se=>g.jsx(Qi,{value:se.name,children:se.label},se.name))]})]}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Field to use for generating URL-friendly slugs"})]})]}),ie&&g.jsx("div",{className:"diff-removed rounded-lg border px-3 py-2 text-sm",role:"alert","data-testid":"submit-error",children:ie})]})}),g.jsx(YB,{isOpen:V,onClose:()=>re(!1),breakingChanges:I,onForceUpdate:Sn,onCancel:()=>{re(!1),K([])},isLoading:ve})]})}function XB({options:e,onChange:t,disabled:r}){const s=()=>{t([...e,{value:`option_${e.length+1}`,label:""}])},i=u=>{t(e.filter((f,h)=>h!==u))},c=(u,f)=>{t(e.map((h,p)=>p===u?{...h,...f}:h))};return g.jsxs("div",{className:"space-y-2",children:[g.jsxs(jn,{children:["Options ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsx("div",{className:"space-y-2",children:e.map((u,f)=>g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(os,{value:u.label,onChange:h=>{const p=h.target.value,y=p.toLowerCase().replace(/[^a-z0-9]/g,"_").replace(/^_+|_+$/g,"");c(f,{label:p,value:y})},placeholder:"Option label",disabled:r,className:"flex-1"}),g.jsx(os,{value:u.value,onChange:h=>c(f,{value:h.target.value.toLowerCase().replace(/[^a-z0-9_]/g,"")}),placeholder:"value",disabled:r,className:"w-32"}),g.jsx("button",{type:"button",onClick:()=>i(f),disabled:r,className:"rounded p-1 text-muted-foreground hover:bg-destructive/10 hover:text-destructive",children:g.jsx(ju,{className:"size-4"})})]},f))}),g.jsxs($r,{type:"button",variant:"secondary",size:"sm",onClick:s,disabled:r,children:[g.jsx(I1,{className:"size-3.5"}),"Add Option"]})]})}function JB(){const t=lt().location.pathname,r=Km(),{navItems:s,branding:i,layout:c}=r,[u,f]=w.useState(!1),h=A1($u.admin.listContentTypes,{isActive:!0}),p=h?.page??[],y=(x,C)=>C?t===x:t.startsWith(x),v=t==="/content"||t.startsWith("/entries/type/")||t.startsWith("/entries/new/")||t.startsWith("/entries/"),b=x=>x.id==="content"?_(x):g.jsxs(cs,{to:x.path,className:je("flex items-center gap-3 rounded-md px-2 py-2 text-sm font-medium transition-colors",y(x.path,x.exact)?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground"),children:[g.jsx(uS,{name:x.icon,className:"size-5"}),g.jsx("span",{className:"flex-1",children:x.label}),x.badge&&g.jsx("span",{className:"rounded-full bg-sidebar-primary px-2 py-0.5 text-xs text-sidebar-primary-foreground",children:x.badge})]},x.id),_=x=>g.jsxs(YI,{defaultOpen:v,children:[g.jsxs(KI,{className:je("flex w-full items-center gap-3 rounded-md px-2 py-2 text-sm font-medium transition-colors",v?"bg-sidebar-accent text-sidebar-accent-foreground":"text-sidebar-foreground hover:bg-sidebar-accent/50 hover:text-sidebar-accent-foreground","group"),children:[g.jsx(uS,{name:x.icon,className:"size-5"}),g.jsx("span",{className:"flex-1 text-left",children:x.label}),g.jsx(_s,{className:"size-4 transition-transform duration-200 group-data-[state=open]:rotate-180"})]}),g.jsx(XI,{children:g.jsxs("div",{className:"ml-5 mt-1 space-y-1 border-l border-sidebar-border pl-3",children:[g.jsx(cs,{to:"/content",className:je("flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors",t==="/content"?"bg-sidebar-accent/60 text-sidebar-accent-foreground":"text-sidebar-foreground/80 hover:bg-sidebar-accent/30 hover:text-sidebar-accent-foreground"),children:"All Entries"}),p.map(C=>g.jsx(cs,{to:"/entries/type/$contentTypeId",params:{contentTypeId:C._id},className:je("flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors",t===`/entries/type/${C._id}`?"bg-sidebar-accent/60 text-sidebar-accent-foreground":"text-sidebar-foreground/80 hover:bg-sidebar-accent/30 hover:text-sidebar-accent-foreground"),children:C.displayName},C._id)),p.length===0&&h!==void 0&&g.jsx("button",{type:"button",onClick:()=>f(!0),className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-sidebar-foreground/60 hover:bg-sidebar-accent/30 hover:text-sidebar-accent-foreground",children:"+ Create content type"})]})})]},x.id),E=c.sidebarWidth;return g.jsxs(g.Fragment,{children:[g.jsxs("aside",{className:"fixed inset-y-0 left-0 z-50 flex flex-col border-r border-sidebar-border bg-sidebar",style:{width:E},children:[g.jsx("div",{className:"flex h-14 items-center gap-2 border-b border-sidebar-border px-4",children:g.jsxs(cs,{to:"/",className:"flex items-center gap-2 font-semibold text-sidebar-foreground",children:[i.logo?g.jsx("img",{src:i.logo,alt:i.appName,className:"size-8"}):g.jsx("div",{className:"flex size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground",children:g.jsx(L1,{className:"size-4"})}),g.jsx("span",{className:"text-base",children:i.appName})]})}),g.jsxs("nav",{className:"flex-1 space-y-6 overflow-y-auto p-4",children:[s.main.length>0&&g.jsxs("div",{className:"space-y-1",children:[g.jsx("span",{className:"px-2 text-xs font-medium uppercase tracking-wider text-sidebar-foreground/60",children:"Main"}),g.jsx("div",{className:"space-y-1 pt-2",children:s.main.map(b)})]}),s.config.length>0&&g.jsxs("div",{className:"space-y-1",children:[g.jsx("span",{className:"px-2 text-xs font-medium uppercase tracking-wider text-sidebar-foreground/60",children:"Configuration"}),g.jsx("div",{className:"space-y-1 pt-2",children:s.config.map(b)})]})]}),g.jsx("div",{className:"border-t border-sidebar-border p-4",children:g.jsxs("div",{className:"flex items-center justify-between text-xs text-sidebar-foreground/60",children:[g.jsx("span",{children:"Version"}),g.jsx("span",{className:"font-mono",children:"0.1.0"})]})})]}),g.jsx(KB,{isOpen:u,onClose:()=>f(!1)})]})}function WB({...e}){return g.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function e9({className:e,...t}){return g.jsx("ol",{"data-slot":"breadcrumb-list",className:je("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}function t9({className:e,...t}){return g.jsx("li",{"data-slot":"breadcrumb-item",className:je("inline-flex items-center gap-1.5",e),...t})}function n9({asChild:e,className:t,...r}){const s=e?wC:"a";return g.jsx(s,{"data-slot":"breadcrumb-link",className:je("hover:text-foreground transition-colors",t),...r})}function r9({className:e,...t}){return g.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:je("text-foreground font-normal",e),...t})}function o9({children:e,className:t,...r}){return g.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:je("[&>svg]:size-3.5",t),...r,children:e??g.jsx(i3,{})})}var Lp="rovingFocusGroup.onEntryFocus",s9={bubbles:!1,cancelable:!0},Rc="RovingFocusGroup",[fm,RE,a9]=sg(Rc),[i9,TE]=hr(Rc,[a9]),[c9,l9]=i9(Rc),AE=w.forwardRef((e,t)=>g.jsx(fm.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(fm.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(u9,{...e,ref:t})})}));AE.displayName=Rc;var u9=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:s,loop:i=!1,dir:c,currentTabStopId:u,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:h,onEntryFocus:p,preventScrollOnEntryFocus:y=!1,...v}=e,b=w.useRef(null),_=Ve(t,b),E=ag(c),[x,C]=To({prop:u,defaultProp:f??null,onChange:h,caller:Rc}),[O,M]=w.useState(!1),k=Yn(p),D=RE(r),U=w.useRef(!1),[H,L]=w.useState(0);return w.useEffect(()=>{const j=b.current;if(j)return j.addEventListener(Lp,k),()=>j.removeEventListener(Lp,k)},[k]),g.jsx(c9,{scope:r,orientation:s,dir:E,loop:i,currentTabStopId:x,onItemFocus:w.useCallback(j=>C(j),[C]),onItemShiftTab:w.useCallback(()=>M(!0),[]),onFocusableItemAdd:w.useCallback(()=>L(j=>j+1),[]),onFocusableItemRemove:w.useCallback(()=>L(j=>j-1),[]),children:g.jsx(ke.div,{tabIndex:O||H===0?-1:0,"data-orientation":s,...v,ref:_,style:{outline:"none",...e.style},onMouseDown:he(e.onMouseDown,()=>{U.current=!0}),onFocus:he(e.onFocus,j=>{const G=!U.current;if(j.target===j.currentTarget&&G&&!O){const ie=new CustomEvent(Lp,s9);if(j.currentTarget.dispatchEvent(ie),!ie.defaultPrevented){const ae=D().filter(I=>I.focusable),te=ae.find(I=>I.active),ce=ae.find(I=>I.id===x),me=[te,ce,...ae].filter(Boolean).map(I=>I.ref.current);ME(me,y)}}U.current=!1}),onBlur:he(e.onBlur,()=>M(!1))})})}),OE="RovingFocusGroupItem",kE=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:s=!0,active:i=!1,tabStopId:c,children:u,...f}=e,h=Qn(),p=c||h,y=l9(OE,r),v=y.currentTabStopId===p,b=RE(r),{onFocusableItemAdd:_,onFocusableItemRemove:E,currentTabStopId:x}=y;return w.useEffect(()=>{if(s)return _(),()=>E()},[s,_,E]),g.jsx(fm.ItemSlot,{scope:r,id:p,focusable:s,active:i,children:g.jsx(ke.span,{tabIndex:v?0:-1,"data-orientation":y.orientation,...f,ref:t,onMouseDown:he(e.onMouseDown,C=>{s?y.onItemFocus(p):C.preventDefault()}),onFocus:he(e.onFocus,()=>y.onItemFocus(p)),onKeyDown:he(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){y.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const O=h9(C,y.orientation,y.dir);if(O!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let k=b().filter(D=>D.focusable).map(D=>D.ref.current);if(O==="last")k.reverse();else if(O==="prev"||O==="next"){O==="prev"&&k.reverse();const D=k.indexOf(C.currentTarget);k=y.loop?p9(k,D+1):k.slice(D+1)}setTimeout(()=>ME(k))}}),children:typeof u=="function"?u({isCurrentTabStop:v,hasTabStop:x!=null}):u})})});kE.displayName=OE;var f9={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function d9(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function h9(e,t,r){const s=d9(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return f9[s]}function ME(e,t=!1){const r=document.activeElement;for(const s of e)if(s===r||(s.focus({preventScroll:t}),document.activeElement!==r))return}function p9(e,t){return e.map((r,s)=>e[(t+s)%e.length])}var m9=AE,g9=kE,dm=["Enter"," "],y9=["ArrowDown","PageUp","Home"],NE=["ArrowUp","PageDown","End"],v9=[...y9,...NE],b9={ltr:[...dm,"ArrowRight"],rtl:[...dm,"ArrowLeft"]},w9={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Tc="Menu",[gc,S9,x9]=sg(Tc),[Es,jE]=hr(Tc,[x9,Za,TE]),Ef=Za(),zE=TE(),[_9,Rs]=Es(Tc),[C9,Ac]=Es(Tc),DE=e=>{const{__scopeMenu:t,open:r=!1,children:s,dir:i,onOpenChange:c,modal:u=!0}=e,f=Ef(t),[h,p]=w.useState(null),y=w.useRef(!1),v=Yn(c),b=ag(i);return w.useEffect(()=>{const _=()=>{y.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>y.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),g.jsx(mg,{...f,children:g.jsx(_9,{scope:t,open:r,onOpenChange:v,content:h,onContentChange:p,children:g.jsx(C9,{scope:t,onClose:w.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:y,dir:b,modal:u,children:s})})})};DE.displayName=Tc;var E9="MenuAnchor",bg=w.forwardRef((e,t)=>{const{__scopeMenu:r,...s}=e,i=Ef(r);return g.jsx(Sf,{...i,...s,ref:t})});bg.displayName=E9;var wg="MenuPortal",[R9,PE]=Es(wg,{forceMount:void 0}),LE=e=>{const{__scopeMenu:t,forceMount:r,children:s,container:i}=e,c=Rs(wg,t);return g.jsx(R9,{scope:t,forceMount:r,children:g.jsx(Un,{present:r||c.open,children:g.jsx(_c,{asChild:!0,container:i,children:s})})})};LE.displayName=wg;var Ln="MenuContent",[T9,Sg]=Es(Ln),IE=w.forwardRef((e,t)=>{const r=PE(Ln,e.__scopeMenu),{forceMount:s=r.forceMount,...i}=e,c=Rs(Ln,e.__scopeMenu),u=Ac(Ln,e.__scopeMenu);return g.jsx(gc.Provider,{scope:e.__scopeMenu,children:g.jsx(Un,{present:s||c.open,children:g.jsx(gc.Slot,{scope:e.__scopeMenu,children:u.modal?g.jsx(A9,{...i,ref:t}):g.jsx(O9,{...i,ref:t})})})})}),A9=w.forwardRef((e,t)=>{const r=Rs(Ln,e.__scopeMenu),s=w.useRef(null),i=Ve(t,s);return w.useEffect(()=>{const c=s.current;if(c)return hf(c)},[]),g.jsx(xg,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:he(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),O9=w.forwardRef((e,t)=>{const r=Rs(Ln,e.__scopeMenu);return g.jsx(xg,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),k9=gs("MenuContent.ScrollLock"),xg=w.forwardRef((e,t)=>{const{__scopeMenu:r,loop:s=!1,trapFocus:i,onOpenAutoFocus:c,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEntryFocus:h,onEscapeKeyDown:p,onPointerDownOutside:y,onFocusOutside:v,onInteractOutside:b,onDismiss:_,disableOutsideScroll:E,...x}=e,C=Rs(Ln,r),O=Ac(Ln,r),M=Ef(r),k=zE(r),D=S9(r),[U,H]=w.useState(null),L=w.useRef(null),j=Ve(t,L,C.onContentChange),G=w.useRef(0),ie=w.useRef(""),ae=w.useRef(0),te=w.useRef(null),ce=w.useRef("right"),le=w.useRef(0),me=E?Cc:w.Fragment,I=E?{as:k9,allowPinchZoom:!0}:void 0,K=re=>{const ve=ie.current+re,z=D().filter(X=>!X.disabled),Q=document.activeElement,ne=z.find(X=>X.ref.current===Q)?.textValue,oe=z.map(X=>X.textValue),pe=q9(oe,ve,ne),ye=z.find(X=>X.textValue===pe)?.ref.current;(function X(_e){ie.current=_e,window.clearTimeout(G.current),_e!==""&&(G.current=window.setTimeout(()=>X(""),1e3))})(ve),ye&&setTimeout(()=>ye.focus())};w.useEffect(()=>()=>window.clearTimeout(G.current),[]),ff();const V=w.useCallback(re=>ce.current===te.current?.side&&V9(re,te.current?.area),[]);return g.jsx(T9,{scope:r,searchRef:ie,onItemEnter:w.useCallback(re=>{V(re)&&re.preventDefault()},[V]),onItemLeave:w.useCallback(re=>{V(re)||(L.current?.focus(),H(null))},[V]),onTriggerLeave:w.useCallback(re=>{V(re)&&re.preventDefault()},[V]),pointerGraceTimerRef:ae,onPointerGraceIntentChange:w.useCallback(re=>{te.current=re},[]),children:g.jsx(me,{...I,children:g.jsx(xc,{asChild:!0,trapped:i,onMountAutoFocus:he(c,re=>{re.preventDefault(),L.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:g.jsx(Sc,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:p,onPointerDownOutside:y,onFocusOutside:v,onInteractOutside:b,onDismiss:_,children:g.jsx(m9,{asChild:!0,...k,dir:O.dir,orientation:"vertical",loop:s,currentTabStopId:U,onCurrentTabStopIdChange:H,onEntryFocus:he(h,re=>{O.isUsingKeyboardRef.current||re.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(gg,{role:"menu","aria-orientation":"vertical","data-state":eR(C.open),"data-radix-menu-content":"",dir:O.dir,...M,...x,ref:j,style:{outline:"none",...x.style},onKeyDown:he(x.onKeyDown,re=>{const z=re.target.closest("[data-radix-menu-content]")===re.currentTarget,Q=re.ctrlKey||re.altKey||re.metaKey,ne=re.key.length===1;z&&(re.key==="Tab"&&re.preventDefault(),!Q&&ne&&K(re.key));const oe=L.current;if(re.target!==oe||!v9.includes(re.key))return;re.preventDefault();const ye=D().filter(X=>!X.disabled).map(X=>X.ref.current);NE.includes(re.key)&&ye.reverse(),U9(ye)}),onBlur:he(e.onBlur,re=>{re.currentTarget.contains(re.target)||(window.clearTimeout(G.current),ie.current="")}),onPointerMove:he(e.onPointerMove,yc(re=>{const ve=re.target,z=le.current!==re.clientX;if(re.currentTarget.contains(ve)&&z){const Q=re.clientX>le.current?"right":"left";ce.current=Q,le.current=re.clientX}}))})})})})})})});IE.displayName=Ln;var M9="MenuGroup",_g=w.forwardRef((e,t)=>{const{__scopeMenu:r,...s}=e;return g.jsx(ke.div,{role:"group",...s,ref:t})});_g.displayName=M9;var N9="MenuLabel",$E=w.forwardRef((e,t)=>{const{__scopeMenu:r,...s}=e;return g.jsx(ke.div,{...s,ref:t})});$E.displayName=N9;var Qu="MenuItem",qS="menu.itemSelect",Rf=w.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:s,...i}=e,c=w.useRef(null),u=Ac(Qu,e.__scopeMenu),f=Sg(Qu,e.__scopeMenu),h=Ve(t,c),p=w.useRef(!1),y=()=>{const v=c.current;if(!r&&v){const b=new CustomEvent(qS,{bubbles:!0,cancelable:!0});v.addEventListener(qS,_=>s?.(_),{once:!0}),B_(v,b),b.defaultPrevented?p.current=!1:u.onClose()}};return g.jsx(UE,{...i,ref:h,disabled:r,onClick:he(e.onClick,y),onPointerDown:v=>{e.onPointerDown?.(v),p.current=!0},onPointerUp:he(e.onPointerUp,v=>{p.current||v.currentTarget?.click()}),onKeyDown:he(e.onKeyDown,v=>{const b=f.searchRef.current!=="";r||b&&v.key===" "||dm.includes(v.key)&&(v.currentTarget.click(),v.preventDefault())})})});Rf.displayName=Qu;var UE=w.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:s=!1,textValue:i,...c}=e,u=Sg(Qu,r),f=zE(r),h=w.useRef(null),p=Ve(t,h),[y,v]=w.useState(!1),[b,_]=w.useState("");return w.useEffect(()=>{const E=h.current;E&&_((E.textContent??"").trim())},[c.children]),g.jsx(gc.ItemSlot,{scope:r,disabled:s,textValue:i??b,children:g.jsx(g9,{asChild:!0,...f,focusable:!s,children:g.jsx(ke.div,{role:"menuitem","data-highlighted":y?"":void 0,"aria-disabled":s||void 0,"data-disabled":s?"":void 0,...c,ref:p,onPointerMove:he(e.onPointerMove,yc(E=>{s?u.onItemLeave(E):(u.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:he(e.onPointerLeave,yc(E=>u.onItemLeave(E))),onFocus:he(e.onFocus,()=>v(!0)),onBlur:he(e.onBlur,()=>v(!1))})})})}),j9="MenuCheckboxItem",BE=w.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:s,...i}=e;return g.jsx(ZE,{scope:e.__scopeMenu,checked:r,children:g.jsx(Rf,{role:"menuitemcheckbox","aria-checked":Gu(r)?"mixed":r,...i,ref:t,"data-state":Eg(r),onSelect:he(i.onSelect,()=>s?.(Gu(r)?!0:!r),{checkForDefaultPrevented:!1})})})});BE.displayName=j9;var qE="MenuRadioGroup",[z9,D9]=Es(qE,{value:void 0,onValueChange:()=>{}}),FE=w.forwardRef((e,t)=>{const{value:r,onValueChange:s,...i}=e,c=Yn(s);return g.jsx(z9,{scope:e.__scopeMenu,value:r,onValueChange:c,children:g.jsx(_g,{...i,ref:t})})});FE.displayName=qE;var VE="MenuRadioItem",HE=w.forwardRef((e,t)=>{const{value:r,...s}=e,i=D9(VE,e.__scopeMenu),c=r===i.value;return g.jsx(ZE,{scope:e.__scopeMenu,checked:c,children:g.jsx(Rf,{role:"menuitemradio","aria-checked":c,...s,ref:t,"data-state":Eg(c),onSelect:he(s.onSelect,()=>i.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});HE.displayName=VE;var Cg="MenuItemIndicator",[ZE,P9]=Es(Cg,{checked:!1}),QE=w.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:s,...i}=e,c=P9(Cg,r);return g.jsx(Un,{present:s||Gu(c.checked)||c.checked===!0,children:g.jsx(ke.span,{...i,ref:t,"data-state":Eg(c.checked)})})});QE.displayName=Cg;var L9="MenuSeparator",GE=w.forwardRef((e,t)=>{const{__scopeMenu:r,...s}=e;return g.jsx(ke.div,{role:"separator","aria-orientation":"horizontal",...s,ref:t})});GE.displayName=L9;var I9="MenuArrow",YE=w.forwardRef((e,t)=>{const{__scopeMenu:r,...s}=e,i=Ef(r);return g.jsx(yg,{...i,...s,ref:t})});YE.displayName=I9;var $9="MenuSub",[T7,KE]=Es($9),Ji="MenuSubTrigger",XE=w.forwardRef((e,t)=>{const r=Rs(Ji,e.__scopeMenu),s=Ac(Ji,e.__scopeMenu),i=KE(Ji,e.__scopeMenu),c=Sg(Ji,e.__scopeMenu),u=w.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:h}=c,p={__scopeMenu:e.__scopeMenu},y=w.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return w.useEffect(()=>y,[y]),w.useEffect(()=>{const v=f.current;return()=>{window.clearTimeout(v),h(null)}},[f,h]),g.jsx(bg,{asChild:!0,...p,children:g.jsx(UE,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":eR(r.open),...e,ref:wc(t,i.onTriggerChange),onClick:v=>{e.onClick?.(v),!(e.disabled||v.defaultPrevented)&&(v.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:he(e.onPointerMove,yc(v=>{c.onItemEnter(v),!v.defaultPrevented&&!e.disabled&&!r.open&&!u.current&&(c.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{r.onOpenChange(!0),y()},100))})),onPointerLeave:he(e.onPointerLeave,yc(v=>{y();const b=r.content?.getBoundingClientRect();if(b){const _=r.content?.dataset.side,E=_==="right",x=E?-5:5,C=b[E?"left":"right"],O=b[E?"right":"left"];c.onPointerGraceIntentChange({area:[{x:v.clientX+x,y:v.clientY},{x:C,y:b.top},{x:O,y:b.top},{x:O,y:b.bottom},{x:C,y:b.bottom}],side:_}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>c.onPointerGraceIntentChange(null),300)}else{if(c.onTriggerLeave(v),v.defaultPrevented)return;c.onPointerGraceIntentChange(null)}})),onKeyDown:he(e.onKeyDown,v=>{const b=c.searchRef.current!=="";e.disabled||b&&v.key===" "||b9[s.dir].includes(v.key)&&(r.onOpenChange(!0),r.content?.focus(),v.preventDefault())})})})});XE.displayName=Ji;var JE="MenuSubContent",WE=w.forwardRef((e,t)=>{const r=PE(Ln,e.__scopeMenu),{forceMount:s=r.forceMount,...i}=e,c=Rs(Ln,e.__scopeMenu),u=Ac(Ln,e.__scopeMenu),f=KE(JE,e.__scopeMenu),h=w.useRef(null),p=Ve(t,h);return g.jsx(gc.Provider,{scope:e.__scopeMenu,children:g.jsx(Un,{present:s||c.open,children:g.jsx(gc.Slot,{scope:e.__scopeMenu,children:g.jsx(xg,{id:f.contentId,"aria-labelledby":f.triggerId,...i,ref:p,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:y=>{u.isUsingKeyboardRef.current&&h.current?.focus(),y.preventDefault()},onCloseAutoFocus:y=>y.preventDefault(),onFocusOutside:he(e.onFocusOutside,y=>{y.target!==f.trigger&&c.onOpenChange(!1)}),onEscapeKeyDown:he(e.onEscapeKeyDown,y=>{u.onClose(),y.preventDefault()}),onKeyDown:he(e.onKeyDown,y=>{const v=y.currentTarget.contains(y.target),b=w9[u.dir].includes(y.key);v&&b&&(c.onOpenChange(!1),f.trigger?.focus(),y.preventDefault())})})})})})});WE.displayName=JE;function eR(e){return e?"open":"closed"}function Gu(e){return e==="indeterminate"}function Eg(e){return Gu(e)?"indeterminate":e?"checked":"unchecked"}function U9(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function B9(e,t){return e.map((r,s)=>e[(t+s)%e.length])}function q9(e,t,r){const i=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,c=r?e.indexOf(r):-1;let u=B9(e,Math.max(c,0));i.length===1&&(u=u.filter(p=>p!==r));const h=u.find(p=>p.toLowerCase().startsWith(i.toLowerCase()));return h!==r?h:void 0}function F9(e,t){const{x:r,y:s}=e;let i=!1;for(let c=0,u=t.length-1;c<t.length;u=c++){const f=t[c],h=t[u],p=f.x,y=f.y,v=h.x,b=h.y;y>s!=b>s&&r<(v-p)*(s-y)/(b-y)+p&&(i=!i)}return i}function V9(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return F9(r,t)}function yc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var H9=DE,Z9=bg,Q9=LE,G9=IE,Y9=_g,K9=$E,X9=Rf,J9=BE,W9=FE,eq=HE,tq=QE,nq=GE,rq=YE,oq=XE,sq=WE,Tf="DropdownMenu",[aq]=hr(Tf,[jE]),Gt=jE(),[iq,tR]=aq(Tf),nR=e=>{const{__scopeDropdownMenu:t,children:r,dir:s,open:i,defaultOpen:c,onOpenChange:u,modal:f=!0}=e,h=Gt(t),p=w.useRef(null),[y,v]=To({prop:i,defaultProp:c??!1,onChange:u,caller:Tf});return g.jsx(iq,{scope:t,triggerId:Qn(),triggerRef:p,contentId:Qn(),open:y,onOpenChange:v,onOpenToggle:w.useCallback(()=>v(b=>!b),[v]),modal:f,children:g.jsx(H9,{...h,open:y,onOpenChange:v,dir:s,modal:f,children:r})})};nR.displayName=Tf;var rR="DropdownMenuTrigger",oR=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:s=!1,...i}=e,c=tR(rR,r),u=Gt(r);return g.jsx(Z9,{asChild:!0,...u,children:g.jsx(ke.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":s?"":void 0,disabled:s,...i,ref:wc(t,c.triggerRef),onPointerDown:he(e.onPointerDown,f=>{!s&&f.button===0&&f.ctrlKey===!1&&(c.onOpenToggle(),c.open||f.preventDefault())}),onKeyDown:he(e.onKeyDown,f=>{s||(["Enter"," "].includes(f.key)&&c.onOpenToggle(),f.key==="ArrowDown"&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})});oR.displayName=rR;var cq="DropdownMenuPortal",sR=e=>{const{__scopeDropdownMenu:t,...r}=e,s=Gt(t);return g.jsx(Q9,{...s,...r})};sR.displayName=cq;var aR="DropdownMenuContent",iR=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,i=tR(aR,r),c=Gt(r),u=w.useRef(!1);return g.jsx(G9,{id:i.contentId,"aria-labelledby":i.triggerId,...c,...s,ref:t,onCloseAutoFocus:he(e.onCloseAutoFocus,f=>{u.current||i.triggerRef.current?.focus(),u.current=!1,f.preventDefault()}),onInteractOutside:he(e.onInteractOutside,f=>{const h=f.detail.originalEvent,p=h.button===0&&h.ctrlKey===!0,y=h.button===2||p;(!i.modal||y)&&(u.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});iR.displayName=aR;var lq="DropdownMenuGroup",uq=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,i=Gt(r);return g.jsx(Y9,{...i,...s,ref:t})});uq.displayName=lq;var fq="DropdownMenuLabel",cR=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,i=Gt(r);return g.jsx(K9,{...i,...s,ref:t})});cR.displayName=fq;var dq="DropdownMenuItem",lR=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,i=Gt(r);return g.jsx(X9,{...i,...s,ref:t})});lR.displayName=dq;var hq="DropdownMenuCheckboxItem",pq=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,i=Gt(r);return g.jsx(J9,{...i,...s,ref:t})});pq.displayName=hq;var mq="DropdownMenuRadioGroup",gq=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,i=Gt(r);return g.jsx(W9,{...i,...s,ref:t})});gq.displayName=mq;var yq="DropdownMenuRadioItem",vq=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,i=Gt(r);return g.jsx(eq,{...i,...s,ref:t})});vq.displayName=yq;var bq="DropdownMenuItemIndicator",wq=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,i=Gt(r);return g.jsx(tq,{...i,...s,ref:t})});wq.displayName=bq;var Sq="DropdownMenuSeparator",uR=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,i=Gt(r);return g.jsx(nq,{...i,...s,ref:t})});uR.displayName=Sq;var xq="DropdownMenuArrow",_q=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,i=Gt(r);return g.jsx(rq,{...i,...s,ref:t})});_q.displayName=xq;var Cq="DropdownMenuSubTrigger",Eq=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,i=Gt(r);return g.jsx(oq,{...i,...s,ref:t})});Eq.displayName=Cq;var Rq="DropdownMenuSubContent",Tq=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...s}=e,i=Gt(r);return g.jsx(sq,{...i,...s,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Tq.displayName=Rq;var Aq=nR,Oq=oR,kq=sR,Mq=iR,Nq=cR,jq=lR,zq=uR;function Dq({...e}){return g.jsx(Aq,{"data-slot":"dropdown-menu",...e})}function Pq({...e}){return g.jsx(Oq,{"data-slot":"dropdown-menu-trigger",...e})}function Lq({className:e,sideOffset:t=4,...r}){return g.jsx(kq,{children:g.jsx(Mq,{"data-slot":"dropdown-menu-content",sideOffset:t,className:je("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function FS({className:e,inset:t,variant:r="default",...s}){return g.jsx(jq,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:je("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...s})}function Iq({className:e,inset:t,...r}){return g.jsx(Nq,{"data-slot":"dropdown-menu-label","data-inset":t,className:je("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function VS({className:e,...t}){return g.jsx(zq,{"data-slot":"dropdown-menu-separator",className:je("bg-border -mx-1 my-1 h-px",e),...t})}function $q(e,t=[]){let r=[];function s(c,u){const f=w.createContext(u);f.displayName=c+"Context";const h=r.length;r=[...r,u];const p=v=>{const{scope:b,children:_,...E}=v,x=b?.[e]?.[h]||f,C=w.useMemo(()=>E,Object.values(E));return g.jsx(x.Provider,{value:C,children:_})};p.displayName=c+"Provider";function y(v,b){const _=b?.[e]?.[h]||f,E=w.useContext(_);if(E)return E;if(u!==void 0)return u;throw new Error(`\`${v}\` must be used within \`${c}\``)}return[p,y]}const i=()=>{const c=r.map(u=>w.createContext(u));return function(f){const h=f?.[e]||c;return w.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return i.scopeName=e,[s,Uq(i,...t)]}function Uq(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const s=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(c){const u=s.reduce((f,{useScope:h,scopeName:p})=>{const v=h(c)[`__scope${p}`];return{...f,...v}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return r.scopeName=t.scopeName,r}var Bq=t1();function qq(){return Bq.useSyncExternalStore(Fq,()=>!0,()=>!1)}function Fq(){return()=>{}}var Rg="Avatar",[Vq]=$q(Rg),[Hq,fR]=Vq(Rg),dR=w.forwardRef((e,t)=>{const{__scopeAvatar:r,...s}=e,[i,c]=w.useState("idle");return g.jsx(Hq,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:c,children:g.jsx(mf.span,{...s,ref:t})})});dR.displayName=Rg;var hR="AvatarImage",pR=w.forwardRef((e,t)=>{const{__scopeAvatar:r,src:s,onLoadingStatusChange:i=()=>{},...c}=e,u=fR(hR,r),f=Zq(s,c),h=Yn(p=>{i(p),u.onImageLoadingStatusChange(p)});return Rt(()=>{f!=="idle"&&h(f)},[f,h]),f==="loaded"?g.jsx(mf.img,{...c,ref:t,src:s}):null});pR.displayName=hR;var mR="AvatarFallback",gR=w.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:s,...i}=e,c=fR(mR,r),[u,f]=w.useState(s===void 0);return w.useEffect(()=>{if(s!==void 0){const h=window.setTimeout(()=>f(!0),s);return()=>window.clearTimeout(h)}},[s]),u&&c.imageLoadingStatus!=="loaded"?g.jsx(mf.span,{...i,ref:t}):null});gR.displayName=mR;function HS(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Zq(e,{referrerPolicy:t,crossOrigin:r}){const s=qq(),i=w.useRef(null),c=s?(i.current||(i.current=new window.Image),i.current):null,[u,f]=w.useState(()=>HS(c,e));return Rt(()=>{f(HS(c,e))},[c,e]),Rt(()=>{const h=v=>()=>{f(v)};if(!c)return;const p=h("loaded"),y=h("error");return c.addEventListener("load",p),c.addEventListener("error",y),t&&(c.referrerPolicy=t),typeof r=="string"&&(c.crossOrigin=r),()=>{c.removeEventListener("load",p),c.removeEventListener("error",y)}},[c,r,t]),u}var Qq=dR,Gq=pR,Yq=gR;function Kq({className:e,...t}){return g.jsx(Qq,{"data-slot":"avatar",className:je("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function Xq({className:e,...t}){return g.jsx(Gq,{"data-slot":"avatar-image",className:je("aspect-square size-full",e),...t})}function Jq({className:e,...t}){return g.jsx(Yq,{"data-slot":"avatar-fallback",className:je("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}var Af="Popover",[yR]=hr(Af,[Za]),Oc=Za(),[Wq,Lo]=yR(Af),vR=e=>{const{__scopePopover:t,children:r,open:s,defaultOpen:i,onOpenChange:c,modal:u=!1}=e,f=Oc(t),h=w.useRef(null),[p,y]=w.useState(!1),[v,b]=To({prop:s,defaultProp:i??!1,onChange:c,caller:Af});return g.jsx(mg,{...f,children:g.jsx(Wq,{scope:t,contentId:Qn(),triggerRef:h,open:v,onOpenChange:b,onOpenToggle:w.useCallback(()=>b(_=>!_),[b]),hasCustomAnchor:p,onCustomAnchorAdd:w.useCallback(()=>y(!0),[]),onCustomAnchorRemove:w.useCallback(()=>y(!1),[]),modal:u,children:r})})};vR.displayName=Af;var bR="PopoverAnchor",eF=w.forwardRef((e,t)=>{const{__scopePopover:r,...s}=e,i=Lo(bR,r),c=Oc(r),{onCustomAnchorAdd:u,onCustomAnchorRemove:f}=i;return w.useEffect(()=>(u(),()=>f()),[u,f]),g.jsx(Sf,{...c,...s,ref:t})});eF.displayName=bR;var wR="PopoverTrigger",SR=w.forwardRef((e,t)=>{const{__scopePopover:r,...s}=e,i=Lo(wR,r),c=Oc(r),u=Ve(t,i.triggerRef),f=g.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":RR(i.open),...s,ref:u,onClick:he(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?f:g.jsx(Sf,{asChild:!0,...c,children:f})});SR.displayName=wR;var Tg="PopoverPortal",[tF,nF]=yR(Tg,{forceMount:void 0}),xR=e=>{const{__scopePopover:t,forceMount:r,children:s,container:i}=e,c=Lo(Tg,t);return g.jsx(tF,{scope:t,forceMount:r,children:g.jsx(Un,{present:r||c.open,children:g.jsx(_c,{asChild:!0,container:i,children:s})})})};xR.displayName=Tg;var Ia="PopoverContent",_R=w.forwardRef((e,t)=>{const r=nF(Ia,e.__scopePopover),{forceMount:s=r.forceMount,...i}=e,c=Lo(Ia,e.__scopePopover);return g.jsx(Un,{present:s||c.open,children:c.modal?g.jsx(oF,{...i,ref:t}):g.jsx(sF,{...i,ref:t})})});_R.displayName=Ia;var rF=gs("PopoverContent.RemoveScroll"),oF=w.forwardRef((e,t)=>{const r=Lo(Ia,e.__scopePopover),s=w.useRef(null),i=Ve(t,s),c=w.useRef(!1);return w.useEffect(()=>{const u=s.current;if(u)return hf(u)},[]),g.jsx(Cc,{as:rF,allowPinchZoom:!0,children:g.jsx(CR,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(e.onCloseAutoFocus,u=>{u.preventDefault(),c.current||r.triggerRef.current?.focus()}),onPointerDownOutside:he(e.onPointerDownOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0,p=f.button===2||h;c.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:he(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})}),sF=w.forwardRef((e,t)=>{const r=Lo(Ia,e.__scopePopover),s=w.useRef(!1),i=w.useRef(!1);return g.jsx(CR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{e.onCloseAutoFocus?.(c),c.defaultPrevented||(s.current||r.triggerRef.current?.focus(),c.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:c=>{e.onInteractOutside?.(c),c.defaultPrevented||(s.current=!0,c.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=c.target;r.triggerRef.current?.contains(u)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&i.current&&c.preventDefault()}})}),CR=w.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:p,onInteractOutside:y,...v}=e,b=Lo(Ia,r),_=Oc(r);return ff(),g.jsx(xc,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:c,children:g.jsx(Sc,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:y,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:p,onDismiss:()=>b.onOpenChange(!1),children:g.jsx(gg,{"data-state":RR(b.open),role:"dialog",id:b.contentId,..._,...v,ref:t,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ER="PopoverClose",aF=w.forwardRef((e,t)=>{const{__scopePopover:r,...s}=e,i=Lo(ER,r);return g.jsx(ke.button,{type:"button",...s,ref:t,onClick:he(e.onClick,()=>i.onOpenChange(!1))})});aF.displayName=ER;var iF="PopoverArrow",cF=w.forwardRef((e,t)=>{const{__scopePopover:r,...s}=e,i=Oc(r);return g.jsx(yg,{...i,...s,ref:t})});cF.displayName=iF;function RR(e){return e?"open":"closed"}var lF=vR,uF=SR,fF=xR,dF=_R;function ZS({...e}){return g.jsx(lF,{"data-slot":"popover",...e})}function QS({...e}){return g.jsx(uF,{"data-slot":"popover-trigger",...e})}function GS({className:e,align:t="center",sideOffset:r=4,...s}){return g.jsx(fF,{children:g.jsx(dF,{"data-slot":"popover-content",align:t,sideOffset:r,className:je("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...s})})}const hF=[{keys:["⌘","S"],description:"Save entry"},{keys:["⌘","⇧","P"],description:"Publish entry"},{keys:["⌘","K"],description:"Quick search"},{keys:["Esc"],description:"Close modal/panel"}],pF=[{label:"Documentation",url:"https://docs.convex.dev",icon:Wz},{label:"API Reference",url:"https://docs.convex.dev/api",icon:y3},{label:"Community Discord",url:"https://discord.gg/convex",icon:lD}],mF={"/":"Dashboard","/content":"Content","/media":"Media Library","/content-types":"Content Types","/settings":"Settings","/taxonomies":"Taxonomies","/trash":"Trash","/entries":"Entries","/entries/type":"Content Types","/entries/new":"New Entry"};function gF(e,t,r){const s=[{label:t,to:"/"}],i=decodeURIComponent(e);if(i==="/")return s;const c=i.split("/").filter(Boolean);let u="";return c.forEach((f,h)=>{u+=`/${f}`;const p=h===c.length-1;let y=r.get(u)??mF[u];y||(y=f.charAt(0).toUpperCase()+f.slice(1).replace(/-/g," ")),p?s.push({label:y}):s.push({label:y,to:u})}),s}function yF(){const e=lt(),t=of(),{branding:r}=Km();let s=new Map;try{s=TI().overrides}catch{}const i=gF(e.location.pathname,r.appName,s);let c=null,u=null,f=async()=>{},h=!1;try{const x=r_();c=x.user,u=x.role,f=x.logout,h=x.isAuthenticated}catch{}const y=(u?j4(u):null)?.displayName??u??"No Role",v=c?.name??c?.email??"User",b=x=>{const C=x.split(" ");return C.length>=2?`${C[0][0]}${C[1][0]}`.toUpperCase():x.slice(0,2).toUpperCase()},_=c?.name?b(c.name):"U",E=async()=>{await f()};return g.jsxs("header",{className:"sticky top-0 z-40 flex h-14 items-center justify-between border-b border-border bg-background/95 px-6 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:[g.jsx(WB,{children:g.jsx(e9,{children:i.map((x,C)=>g.jsxs(w.Fragment,{children:[C>0&&g.jsx(o9,{}),g.jsx(t9,{children:x.to?g.jsx(n9,{asChild:!0,children:g.jsxs(cs,{to:x.to,className:"flex items-center gap-1.5",children:[C===0&&g.jsx(D1,{className:"size-3.5"}),g.jsx("span",{children:x.label})]})}):g.jsx(r9,{children:x.label})})]},C))})}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsxs(ZS,{children:[g.jsx(QS,{asChild:!0,children:g.jsxs(sc,{variant:"ghost",size:"icon",className:"size-9",children:[g.jsx(Yp,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Notifications"})]})}),g.jsxs(GS,{align:"end",className:"w-80",children:[g.jsx("div",{className:"flex items-center justify-between pb-2",children:g.jsx("h4",{className:"font-medium",children:"Notifications"})}),g.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[g.jsx(Yp,{className:"size-8 text-muted-foreground/50"}),g.jsx("p",{className:"mt-2 text-sm font-medium",children:"No notifications yet"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"You're all caught up!"})]})]})]}),g.jsxs(ZS,{children:[g.jsx(QS,{asChild:!0,children:g.jsxs(sc,{variant:"ghost",size:"icon",className:"size-9",children:[g.jsx(j1,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Help"})]})}),g.jsxs(GS,{align:"end",className:"w-72",children:[g.jsx("div",{className:"pb-2",children:g.jsx("h4",{className:"font-medium",children:"Help & Resources"})}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx("h5",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Keyboard Shortcuts"}),g.jsx("div",{className:"space-y-1",children:hF.map((x,C)=>g.jsxs("div",{className:"flex items-center justify-between text-sm",children:[g.jsx("span",{className:"text-muted-foreground",children:x.description}),g.jsx("div",{className:"flex gap-0.5",children:x.keys.map((O,M)=>g.jsx("kbd",{className:"rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-xs",children:O},M))})]},C))})]}),g.jsxs("div",{children:[g.jsx("h5",{className:"mb-2 text-xs font-medium text-muted-foreground",children:"Resources"}),g.jsx("div",{className:"space-y-1",children:pF.map(x=>g.jsxs("a",{href:x.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-accent",children:[g.jsx(x.icon,{className:"size-4 text-muted-foreground"}),g.jsx("span",{className:"flex-1",children:x.label}),g.jsx(S3,{className:"size-3 text-muted-foreground"})]},x.label))})]})]})]})]}),g.jsxs(Dq,{children:[g.jsx(Pq,{asChild:!0,children:g.jsxs(sc,{variant:"ghost",className:"h-9 gap-2 pl-2 pr-3",children:[g.jsxs(Kq,{className:"size-6",children:[g.jsx(Xq,{src:c?.avatarUrl,alt:v}),g.jsx(Jq,{className:"text-xs",children:_})]}),g.jsx("span",{className:"text-sm font-medium",children:v}),g.jsx(_s,{className:"size-3.5 text-muted-foreground"})]})}),g.jsxs(Lq,{align:"end",className:"w-56",children:[g.jsx(Iq,{className:"font-normal",children:g.jsxs("div",{className:"flex flex-col space-y-1",children:[g.jsx("p",{className:"text-sm font-medium",children:v}),c?.email&&g.jsx("p",{className:"text-xs text-muted-foreground",children:c.email}),g.jsx("p",{className:"text-xs text-muted-foreground",children:y})]})}),g.jsx(VS,{}),g.jsxs(FS,{onClick:()=>t({to:"/settings"}),children:[g.jsx(U1,{className:"mr-2 size-4"}),g.jsx("span",{children:"Profile & Settings"})]}),h&&g.jsxs(g.Fragment,{children:[g.jsx(VS,{}),g.jsxs(FS,{onClick:E,className:"text-destructive focus:text-destructive",children:[g.jsx(rD,{className:"mr-2 size-4"}),g.jsx("span",{children:"Logout"})]})]})]})]})]})]})}function vF({children:e}){const{layout:t}=Km();return g.jsxs("div",{className:"flex min-h-screen bg-background",children:[g.jsx(JB,{}),g.jsxs("div",{className:"flex flex-1 flex-col",style:{marginLeft:t.sidebarWidth},children:[g.jsx(yF,{}),g.jsx("main",{className:"flex-1 overflow-auto p-6",children:e})]})]})}function bF(){return g.jsx("div",{className:"route-guard route-guard--loading bg-background flex items-center justify-center min-h-screen",children:g.jsx(W3,{className:"h-8 w-8 animate-spin text-muted-foreground"})})}function wF(){return g.jsxs("div",{className:"route-guard route-guard--unauthenticated",children:[g.jsx("div",{className:"route-guard-icon",children:g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}),g.jsx("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]})}),g.jsx("h2",{children:"Authentication Required"}),g.jsx("p",{children:"Please log in to access the admin panel."})]})}function Ip({requiredRole:e,requiredPermission:t}){return g.jsxs("div",{className:"route-guard route-guard--unauthorized",children:[g.jsx("div",{className:"route-guard-icon",children:g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("circle",{cx:"12",cy:"12",r:"10"}),g.jsx("line",{x1:"4.93",y1:"4.93",x2:"19.07",y2:"19.07"})]})}),g.jsx("h2",{children:"Access Denied"}),g.jsx("p",{children:"You don't have permission to access this page."}),e&&g.jsxs("p",{className:"route-guard-detail",children:["Required role: ",g.jsx("strong",{children:e})]}),t&&g.jsxs("p",{className:"route-guard-detail",children:["Required permission:"," ",g.jsxs("strong",{children:[t.action," on ",t.resource]})]})]})}function SF({error:e}){return g.jsxs("div",{className:"route-guard route-guard--error",children:[g.jsx("div",{className:"route-guard-icon",children:g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("circle",{cx:"12",cy:"12",r:"10"}),g.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),g.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]})}),g.jsx("h2",{children:"Authentication Error"}),g.jsx("p",{children:e})]})}function xF({children:e,requiredPermission:t,requiredRole:r,loadingComponent:s,unauthenticatedComponent:i,unauthorizedComponent:c,onUnauthenticated:u,onUnauthorized:f}){const{authState:h,role:p,checkPermission:y,error:v}=r_();return h==="loading"?g.jsx(g.Fragment,{children:s??g.jsx(bF,{})}):h==="error"?g.jsx(SF,{error:v??"An error occurred"}):h==="unauthenticated"?(u?.(),g.jsx(g.Fragment,{children:i??g.jsx(wF,{})})):p?r&&p!==r?(f?.(),g.jsx(g.Fragment,{children:c??g.jsx(Ip,{requiredRole:r,requiredPermission:t})})):t&&!y(t)?(f?.(),g.jsx(g.Fragment,{children:c??g.jsx(Ip,{requiredRole:r,requiredPermission:t})})):g.jsx(g.Fragment,{children:e}):(f?.(),g.jsx(g.Fragment,{children:c??g.jsx(Ip,{requiredRole:r,requiredPermission:t})}))}const TR=()=>{throw new Error("createServerOnlyFn() functions can only be called on the server!")};function YS(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"}function hm(e,t){const r=Object.create(null);if(e)for(const s of Object.keys(e))YS(s)&&(r[s]=e[s]);if(t&&typeof t=="object")for(const s of Object.keys(t))YS(s)&&(r[s]=t[s]);return r}function AR(e){return Object.create(null)}const vu=(e,t)=>{const r=t||e||{};return typeof r.method>"u"&&(r.method="GET"),Object.assign(c=>{const u={...r,...c};return vu(void 0,u)},{options:r,middleware:c=>{const u=[...r.middleware||[]];c.map(p=>{cw in p?p.options.middleware&&u.push(...p.options.middleware):u.push(p)});const f={...r,middleware:u},h=vu(void 0,f);return h[cw]=!0,h},inputValidator:c=>{const u={...r,inputValidator:c};return vu(void 0,u)},handler:(...c)=>{const[u,f]=c,h={...r,extractedFn:u,serverFn:f},p=[...h.middleware||[],EF(h)];return Object.assign(async y=>{const v=await KS(p,"client",{...u,...h,data:y?.data,headers:y?.headers,signal:y?.signal,fetch:y?.fetch,context:AR()}),b=dx(v.error);if(b)throw b;if(v.error)throw v.error;return v.result},{...u,__executeServer:async(y,v)=>{const b=TR(),_=b.contextAfterGlobalMiddlewares,E={...u,...y,serverFnMeta:u.serverFnMeta,context:hm(_,y.context),signal:v,request:b.request};return await KS(p,"server",E).then(C=>({result:C.result,error:C.error,context:C.sendContext}))}})}})};async function KS(e,t,r){const s=Tm()?.functionMiddleware||[];let i=_F([...s,...e]);if(t==="server"){const u=TR();u?.executedRequestMiddlewares&&(i=i.filter(f=>!u.executedRequestMiddlewares.has(f)))}const c=async u=>{const f=i.shift();if(!f)return u;try{"inputValidator"in f.options&&f.options.inputValidator&&t==="server"&&(u.data=await CF(f.options.inputValidator,u.data));let h;if(t==="client"?"client"in f.options&&(h=f.options.client):"server"in f.options&&(h=f.options.server),h){const y=await h({...u,next:async(v={})=>{const b={...u,...v,context:hm(u.context,v.context),sendContext:hm(u.sendContext,v.sendContext),headers:QN(u.headers,v.headers),_callSiteFetch:u._callSiteFetch,fetch:u._callSiteFetch??v.fetch??u.fetch,result:v.result!==void 0?v.result:v instanceof Response?v:u.result,error:v.error??u.error},_=await c(b);if(_.error)throw _.error;return _}});if(vn(y))return{...u,error:y};if(y instanceof Response)return{...u,result:y};if(!y)throw new Error("User middleware returned undefined. You must call next() or return a result in your middlewares.");return y}return c(u)}catch(h){return{...u,error:h}}};return c({...r,headers:r.headers||{},sendContext:r.sendContext||{},context:r.context||AR(),_callSiteFetch:r.fetch})}function _F(e,t=100){const r=new Set,s=[],i=(c,u)=>{if(u>t)throw new Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);c.forEach(f=>{f.options.middleware&&i(f.options.middleware,u+1),r.has(f)||(r.add(f),s.push(f))})};return i(e,0),s}async function CF(e,t){if(e==null)return{};if("~standard"in e){const r=await e["~standard"].validate(t);if(r.issues)throw new Error(JSON.stringify(r.issues,void 0,2));return r.value}if("parse"in e)return e.parse(t);if(typeof e=="function")return e(t);throw new Error("Invalid validator type!")}function EF(e){return{"~types":void 0,options:{inputValidator:e.inputValidator,client:async({next:t,sendContext:r,fetch:s,...i})=>{const c={...i,context:r,fetch:s},u=await e.extractedFn?.(c);return t(u)},server:async({next:t,...r})=>{const s=await e.serverFn?.(r);return t({...r,result:s})}}}}const RF=vu({method:"GET"}).handler(d1("dff4e5b7f7b29b6a323200a2df0a5335d739cf583e83c9e514598af6b5ade819")),XS=()=>({id:"mock_user_123",name:"Demo Admin",email:"admin@example.com"}),JS=()=>"admin",WS=()=>{console.log("Logout called (mock mode)")},TF=()=>null,AF=()=>null,OF=()=>{};function kF(e){switch(e){case"mock":case"demo":return{getUser:XS,getUserRole:JS,onLogout:WS};case"none":case"disabled":return{getUser:TF,getUserRole:AF,onLogout:OF};default:return{getUser:XS,getUserRole:JS,onLogout:WS}}}const Bn=ON({head:()=>({meta:[{charSet:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{title:"Convex CMS Admin"},{name:"description",content:"Admin interface for Convex CMS - manage content, media, and publishing workflows"}],links:[{rel:"stylesheet",href:Fz},{rel:"icon",href:"/favicon.ico"}]}),loader:async()=>({config:await RF()}),component:MF});function MF(){const{config:e}=Bn.useLoaderData(),t=w.useMemo(()=>kF(e.authMode),[e.authMode]),r=w.useMemo(()=>SI(e.adminConfig),[e.adminConfig]);return g.jsx(jF,{children:g.jsx(P4,{children:g.jsx(RI,{children:g.jsx(NF,{config:e,adminConfig:r,children:g.jsx(D4,{getUser:t.getUser,getUserRole:t.getUserRole,onLogout:t.onLogout,children:g.jsx(xF,{children:g.jsx(vF,{children:g.jsx(s1,{})})})})})})})})}function NF({children:e,config:t,adminConfig:r}){const s=w.useMemo(()=>t.convexUrl?new zz(t.convexUrl):null,[t.convexUrl]);return s?g.jsx(Pz,{client:s,children:g.jsx(EI,{baseConfig:r,children:e})}):g.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-6",children:g.jsxs("div",{className:"diff-modified max-w-lg space-y-4 rounded-lg border p-6 text-center",children:[g.jsx("h2",{className:"text-xl font-semibold text-diff-modified",children:"Convex Configuration Required"}),g.jsx("p",{className:"text-sm text-diff-modified-foreground",children:"Please provide a Convex deployment URL to connect to your backend."}),g.jsxs("div",{className:"space-y-2 text-left text-sm text-diff-modified-foreground",children:[g.jsx("p",{className:"font-medium",children:"Options:"}),g.jsxs("ul",{className:"list-inside list-disc space-y-1",children:[g.jsxs("li",{children:["Run with URL:"," ",g.jsx("code",{className:"rounded bg-diff-modified-bg/50 px-1",children:"npx convex-cms admin --url YOUR_URL"})]}),g.jsxs("li",{children:["Set environment variable:"," ",g.jsx("code",{className:"rounded bg-diff-modified-bg/50 px-1",children:"CONVEX_URL=YOUR_URL"})]}),g.jsxs("li",{children:["Add to"," ",g.jsx("code",{className:"rounded bg-diff-modified-bg/50 px-1",children:".env.local"}),":"," ",g.jsx("code",{className:"rounded bg-diff-modified-bg/50 px-1",children:"CONVEX_URL=YOUR_URL"})]})]})]}),g.jsxs("p",{className:"text-sm text-diff-modified-foreground",children:["Run"," ",g.jsx("code",{className:"rounded bg-diff-modified-bg/50 px-1",children:"npx convex dev"})," to start Convex and get your URL."]})]})})}function jF({children:e}){return g.jsxs("html",{lang:"en",children:[g.jsx("head",{children:g.jsx(VN,{})}),g.jsxs("body",{children:[e,g.jsx(HN,{})]})]})}const zF="modulepreload",DF=function(e){return"/"+e},ex={},mr=function(t,r,s){let i=Promise.resolve();if(r&&r.length>0){let h=function(p){return Promise.all(p.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),f=u?.nonce||u?.getAttribute("nonce");i=h(r.map(p=>{if(p=DF(p),p in ex)return;ex[p]=!0;const y=p.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${v}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":zF,y||(b.as="script"),b.crossOrigin="",b.href=p,f&&b.setAttribute("nonce",f),document.head.appendChild(b),y)return new Promise((_,E)=>{b.addEventListener("load",_),b.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${p}`)))})}))}function c(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return i.then(u=>{for(const f of u||[])f.status==="rejected"&&c(f.reason);return t().catch(c)})},PF=()=>mr(()=>import("./trash-D7e0uKd9.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),LF=In("/trash")({component:dr(PF,"component")}),IF=()=>mr(()=>import("./taxonomies-DvMppdiD.js"),__vite__mapDeps([10,4,11,1,5,6,12,9])),$F=In("/taxonomies")({component:dr(IF,"component")}),UF=()=>mr(()=>import("./settings-CGVDEV1r.js"),__vite__mapDeps([13,14,1,5,15,6,7,9])),BF=In("/settings")({component:dr(UF,"component")}),qF=()=>mr(()=>import("./media-B2i-mCbx.js"),__vite__mapDeps([16,17,18,1,2,3,4,19,20,6,11,8,9])),FF=In("/media")({component:dr(qF,"component")}),VF=()=>mr(()=>import("./content-types-BrttaLpc.js"),__vite__mapDeps([21,1,2,3,4,6,11,9])),HF=In("/content-types")({component:dr(VF,"component")}),ZF=()=>mr(()=>import("./content-CKQ4QwW2.js"),__vite__mapDeps([22,14,23,6,1,2,3,4,24,9])),QF=In("/content")({component:dr(ZF,"component")}),GF=()=>mr(()=>import("./index-DOkgTSx0.js"),__vite__mapDeps([25,1,7,18,9])),YF=In("/")({component:dr(GF,"component")}),KF=()=>mr(()=>import("./_entryId-D3lr5Dvy.js"),__vite__mapDeps([26,27,15,17,18,4,11,3,20,6,24,12,23,14,28])),XF=In("/entries/$entryId")({component:dr(KF,"component")}),JF=()=>mr(()=>import("./_contentTypeId-DTv8UoTp.js"),__vite__mapDeps([29,14,28,1,2,3,24,6,4,19,20])),WF=In("/entries/type/$contentTypeId")({component:dr(JF,"component")}),e7=()=>mr(()=>import("./new._contentTypeId-VF63rpic.js"),__vite__mapDeps([30,27,15,17,18,4,11,3,20,6,24,12,23,28])),t7=In("/entries/new/$contentTypeId")({component:dr(e7,"component")}),n7=LF.update({id:"/trash",path:"/trash",getParentRoute:()=>Bn}),r7=$F.update({id:"/taxonomies",path:"/taxonomies",getParentRoute:()=>Bn}),o7=BF.update({id:"/settings",path:"/settings",getParentRoute:()=>Bn}),s7=FF.update({id:"/media",path:"/media",getParentRoute:()=>Bn}),a7=HF.update({id:"/content-types",path:"/content-types",getParentRoute:()=>Bn}),i7=QF.update({id:"/content",path:"/content",getParentRoute:()=>Bn}),c7=YF.update({id:"/",path:"/",getParentRoute:()=>Bn}),l7=XF.update({id:"/entries/$entryId",path:"/entries/$entryId",getParentRoute:()=>Bn}),u7=WF.update({id:"/entries/type/$contentTypeId",path:"/entries/type/$contentTypeId",getParentRoute:()=>Bn}),f7=t7.update({id:"/entries/new/$contentTypeId",path:"/entries/new/$contentTypeId",getParentRoute:()=>Bn}),d7={IndexRoute:c7,ContentRoute:i7,ContentTypesRoute:a7,MediaRoute:s7,SettingsRoute:o7,TaxonomiesRoute:r7,TrashRoute:n7,EntriesEntryIdRoute:l7,EntriesNewContentTypeIdRoute:f7,EntriesTypeContentTypeIdRoute:u7},h7=Bn._addFileChildren(d7);function p7(){return LN({routeTree:h7,scrollRestoration:!0,defaultPreload:"intent"})}async function m7(){const e=await p7();let t;return t=[],window.__TSS_START_OPTIONS__={serializationAdapters:t},t.push(fj),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:"",serializationAdapters:t}),e.state.matches.length||await YN(e),e}async function g7(){const e=await m7();return window.$_TSR?.h(),e}let $p;function y7(){return $p||($p=g7()),g.jsx(oN,{promise:$p,children:e=>g.jsx(UN,{router:e})})}w.startTransition(()=>{nA.hydrateRoot(document,g.jsx(w.StrictMode,{children:g.jsx(y7,{})}))});export{O3 as $,x8 as A,P1 as B,$r as C,g8 as D,sc as E,T3 as F,W3 as G,Dq as H,os as I,Pq as J,Lq as K,jn as L,FS as M,_3 as N,VS as O,I1 as P,Q3 as Q,xF as R,Np as S,MD as T,D1 as U,D3 as V,w8 as W,ju as X,S8 as Y,C7 as Z,X3 as _,Ow as a,m3 as a0,AD as a1,KB as a2,j3 as a3,k1 as a4,Kp as a5,$1 as a6,z1 as a7,u3 as a8,L1 as a9,hr as aA,he as aB,Yn as aC,Rt as aD,AS as aE,To as aF,xC as aG,_C as aH,Qn as aI,m9 as aJ,g9 as aK,TE as aL,TI as aM,l8 as aN,u8 as aO,f8 as aP,d8 as aQ,wc as aR,wC as aS,gD as aa,M8 as ab,lt as ac,of as ad,Em as ae,XF as af,WF as ag,cs as ah,N1 as ai,ZS as aj,QS as ak,GS as al,r_ as am,z4 as an,x7 as ao,M4 as ap,t7 as aq,qt as ar,N8 as as,Y3 as at,y3 as au,h3 as av,Ve as aw,ag as ax,ke as ay,Un as az,zp as b,jp as c,Dp as d,Qi as e,jD as f,TS as g,je as h,R7 as i,g as j,$u as k,Se as l,rg as m,U8 as n,RD as o,_s as p,i3 as q,w as r,CD as s,Km as t,A1 as u,tD as v,M1 as w,_7 as x,mf as y,b8 as z};
|