@pg-boss/dashboard 1.1.1 → 1.1.3
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/build/client/assets/MenuTrigger-BUdpY9vj.js +1 -0
- package/build/client/assets/{_index-9fLquIe1.js → _index-DXfER9RD.js} +1 -1
- package/build/client/assets/{badge-B5ZugmiV.js → badge-to3cY6Nn.js} +1 -1
- package/build/client/assets/{button-Djse56Dx.js → button-CudTDtZF.js} +1 -1
- package/build/client/assets/{chevron-down-B4tDL9Ah.js → chevron-down-ClrMXFFn.js} +1 -1
- package/build/client/assets/chunk-EVOBXE3Y-CmKRT32p.js +26 -0
- package/build/client/assets/{createLucideIcon-B0YqJFaz.js → createLucideIcon-C5Bm8BOS.js} +1 -1
- package/build/client/assets/db-link-BzIwSws3.js +1 -0
- package/build/client/assets/dialog-BBFR7NS6.js +1 -0
- package/build/client/assets/{entry.client-Szv-xmaE.js → entry.client-B-bLoJqf.js} +4 -4
- package/build/client/assets/{error-card-CXoOCvsg.js → error-card--OB_TuOC.js} +1 -1
- package/build/client/assets/{filter-select-DXyBBVm8.js → filter-select-07am_j5T.js} +1 -1
- package/build/client/assets/{index-x2yWco1W.js → index-By5u-yQ6.js} +1 -1
- package/build/client/assets/{jobs-CM6xcK-O.js → jobs-Gp0x24mG.js} +1 -1
- package/build/client/assets/manifest-560249af.js +1 -0
- package/build/client/assets/{pagination-C4yyCmBA.js → pagination-DCEs769S.js} +1 -1
- package/build/client/assets/{queues._index-Dn3ieC5d.js → queues._index-DxMtAiK3.js} +1 -1
- package/build/client/assets/{queues._name-GrviLLx2.js → queues._name-DqI0ZH4S.js} +1 -1
- package/build/client/assets/{queues._name.jobs._jobId-s_wYs79w.js → queues._name.jobs._jobId-BEwVDYH6.js} +1 -1
- package/build/client/assets/{queues.create-Ch3Mqw52.js → queues.create-aEr8z6Lt.js} +1 -1
- package/build/client/assets/{root-D0qqtdF7.js → root-Cubm0m9Y.js} +1 -1
- package/build/client/assets/{schedules-DwnuuhxF.js → schedules-BacoSVY9.js} +1 -1
- package/build/client/assets/{schedules._name._key-DJn-u3Cm.js → schedules._name._key-zuc0HZqU.js} +1 -1
- package/build/client/assets/{schedules.new-CQuE2Uhz.js → schedules.new-CrK1w4GF.js} +1 -1
- package/build/client/assets/{send-DVfuC6NR.js → send-wPFbslqy.js} +1 -1
- package/build/client/assets/{table-CtSLyG7m.js → table-CV0K56fY.js} +1 -1
- package/build/client/assets/useOpenInteractionType-C7OfDyTB.js +1 -0
- package/build/client/assets/{warnings-DqRQYomb.js → warnings-DLjttltF.js} +1 -1
- package/build/server/assets/server-build.js +134 -58
- package/package.json +17 -17
- package/build/client/assets/MenuTrigger-CEHCnGow.js +0 -1
- package/build/client/assets/chunk-LFPYN7LY-Cj1DJmJR.js +0 -26
- package/build/client/assets/db-link-DmvfwdX4.js +0 -1
- package/build/client/assets/dialog-CQzw3QVH.js +0 -1
- package/build/client/assets/manifest-acaa4b8e.js +0 -1
- package/build/client/assets/useOpenInteractionType-Ss_6xZdw.js +0 -12
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
function eo(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const n in a)if(n!=="default"&&!(n in e)){const o=Object.getOwnPropertyDescriptor(a,n);o&&Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>a[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function to(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zt={exports:{}},it={};var Qr;function ro(){if(Qr)return it;Qr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,n,o){var i=null;if(o!==void 0&&(i=""+o),n.key!==void 0&&(i=""+n.key),"key"in n){o={};for(var l in n)l!=="key"&&(o[l]=n[l])}else o=n;return n=o.ref,{$$typeof:e,type:a,key:i,ref:n!==void 0?n:null,props:o}}return it.Fragment=t,it.jsx=r,it.jsxs=r,it}var Zr;function ao(){return Zr||(Zr=1,Zt.exports=ro()),Zt.exports}var ws=ao(),er={exports:{}},W={};var ea;function no(){if(ea)return W;ea=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),y=Symbol.iterator;function w(m){return m===null||typeof m!="object"?null:(m=y&&m[y]||m["@@iterator"],typeof m=="function"?m:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,v={};function C(m,L,A){this.props=m,this.context=L,this.refs=v,this.updater=A||R}C.prototype.isReactComponent={},C.prototype.setState=function(m,L){if(typeof m!="object"&&typeof m!="function"&&m!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,m,L,"setState")},C.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function S(){}S.prototype=C.prototype;function T(m,L,A){this.props=m,this.context=L,this.refs=v,this.updater=A||R}var _=T.prototype=new S;_.constructor=T,b(_,C.prototype),_.isPureReactComponent=!0;var M=Array.isArray;function D(){}var O={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function N(m,L,A){var $=A.ref;return{$$typeof:e,type:m,key:L,ref:$!==void 0?$:null,props:A}}function K(m,L){return N(m.type,L,m.props)}function te(m){return typeof m=="object"&&m!==null&&m.$$typeof===e}function G(m){var L={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(A){return L[A]})}var ne=/\/+/g;function le(m,L){return typeof m=="object"&&m!==null&&m.key!=null?G(""+m.key):L.toString(36)}function B(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then(D,D):(m.status="pending",m.then(function(L){m.status==="pending"&&(m.status="fulfilled",m.value=L)},function(L){m.status==="pending"&&(m.status="rejected",m.reason=L)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function X(m,L,A,$,V){var J=typeof m;(J==="undefined"||J==="boolean")&&(m=null);var Q=!1;if(m===null)Q=!0;else switch(J){case"bigint":case"string":case"number":Q=!0;break;case"object":switch(m.$$typeof){case e:case t:Q=!0;break;case h:return Q=m._init,X(Q(m._payload),L,A,$,V)}}if(Q)return V=V(m),Q=$===""?"."+le(m,0):$,M(V)?(A="",Q!=null&&(A=Q.replace(ne,"$&/")+"/"),X(V,L,A,"",function(Gt){return Gt})):V!=null&&(te(V)&&(V=K(V,A+(V.key==null||m&&m.key===V.key?"":(""+V.key).replace(ne,"$&/")+"/")+Q)),L.push(V)),1;Q=0;var ge=$===""?".":$+":";if(M(m))for(var de=0;de<m.length;de++)$=m[de],J=ge+le($,de),Q+=X($,L,A,J,V);else if(de=w(m),typeof de=="function")for(m=de.call(m),de=0;!($=m.next()).done;)$=$.value,J=ge+le($,de++),Q+=X($,L,A,J,V);else if(J==="object"){if(typeof m.then=="function")return X(B(m),L,A,$,V);throw L=String(m),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return Q}function ce(m,L,A){if(m==null)return m;var $=[],V=0;return X(m,$,"","",function(J){return L.call(A,J,V++)}),$}function fe(m){if(m._status===-1){var L=m._result;L=L(),L.then(function(A){(m._status===0||m._status===-1)&&(m._status=1,m._result=A)},function(A){(m._status===0||m._status===-1)&&(m._status=2,m._result=A)}),m._status===-1&&(m._status=0,m._result=L)}if(m._status===1)return m._result.default;throw m._result}var q=typeof reportError=="function"?reportError:function(m){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof m=="object"&&m!==null&&typeof m.message=="string"?String(m.message):String(m),error:m});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",m);return}console.error(m)},ve={map:ce,forEach:function(m,L,A){ce(m,function(){L.apply(this,arguments)},A)},count:function(m){var L=0;return ce(m,function(){L++}),L},toArray:function(m){return ce(m,function(L){return L})||[]},only:function(m){if(!te(m))throw Error("React.Children.only expected to receive a single React element child.");return m}};return W.Activity=c,W.Children=ve,W.Component=C,W.Fragment=r,W.Profiler=n,W.PureComponent=T,W.StrictMode=a,W.Suspense=s,W.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,W.__COMPILER_RUNTIME={__proto__:null,c:function(m){return O.H.useMemoCache(m)}},W.cache=function(m){return function(){return m.apply(null,arguments)}},W.cacheSignal=function(){return null},W.cloneElement=function(m,L,A){if(m==null)throw Error("The argument must be a React element, but you passed "+m+".");var $=b({},m.props),V=m.key;if(L!=null)for(J in L.key!==void 0&&(V=""+L.key),L)!E.call(L,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&L.ref===void 0||($[J]=L[J]);var J=arguments.length-2;if(J===1)$.children=A;else if(1<J){for(var Q=Array(J),ge=0;ge<J;ge++)Q[ge]=arguments[ge+2];$.children=Q}return N(m.type,V,$)},W.createContext=function(m){return m={$$typeof:i,_currentValue:m,_currentValue2:m,_threadCount:0,Provider:null,Consumer:null},m.Provider=m,m.Consumer={$$typeof:o,_context:m},m},W.createElement=function(m,L,A){var $,V={},J=null;if(L!=null)for($ in L.key!==void 0&&(J=""+L.key),L)E.call(L,$)&&$!=="key"&&$!=="__self"&&$!=="__source"&&(V[$]=L[$]);var Q=arguments.length-2;if(Q===1)V.children=A;else if(1<Q){for(var ge=Array(Q),de=0;de<Q;de++)ge[de]=arguments[de+2];V.children=ge}if(m&&m.defaultProps)for($ in Q=m.defaultProps,Q)V[$]===void 0&&(V[$]=Q[$]);return N(m,J,V)},W.createRef=function(){return{current:null}},W.forwardRef=function(m){return{$$typeof:l,render:m}},W.isValidElement=te,W.lazy=function(m){return{$$typeof:h,_payload:{_status:-1,_result:m},_init:fe}},W.memo=function(m,L){return{$$typeof:u,type:m,compare:L===void 0?null:L}},W.startTransition=function(m){var L=O.T,A={};O.T=A;try{var $=m(),V=O.S;V!==null&&V(A,$),typeof $=="object"&&$!==null&&typeof $.then=="function"&&$.then(D,q)}catch(J){q(J)}finally{L!==null&&A.types!==null&&(L.types=A.types),O.T=L}},W.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},W.use=function(m){return O.H.use(m)},W.useActionState=function(m,L,A){return O.H.useActionState(m,L,A)},W.useCallback=function(m,L){return O.H.useCallback(m,L)},W.useContext=function(m){return O.H.useContext(m)},W.useDebugValue=function(){},W.useDeferredValue=function(m,L){return O.H.useDeferredValue(m,L)},W.useEffect=function(m,L){return O.H.useEffect(m,L)},W.useEffectEvent=function(m){return O.H.useEffectEvent(m)},W.useId=function(){return O.H.useId()},W.useImperativeHandle=function(m,L,A){return O.H.useImperativeHandle(m,L,A)},W.useInsertionEffect=function(m,L){return O.H.useInsertionEffect(m,L)},W.useLayoutEffect=function(m,L){return O.H.useLayoutEffect(m,L)},W.useMemo=function(m,L){return O.H.useMemo(m,L)},W.useOptimistic=function(m,L){return O.H.useOptimistic(m,L)},W.useReducer=function(m,L,A){return O.H.useReducer(m,L,A)},W.useRef=function(m){return O.H.useRef(m)},W.useState=function(m){return O.H.useState(m)},W.useSyncExternalStore=function(m,L,A){return O.H.useSyncExternalStore(m,L,A)},W.useTransition=function(){return O.H.useTransition()},W.version="19.2.5",W}var ta;function oo(){return ta||(ta=1,er.exports=no()),er.exports}var d=oo();const io=to(d),lo=eo({__proto__:null,default:io},[d]);var Fa=e=>{throw TypeError(e)},so=(e,t,r)=>t.has(e)||Fa("Cannot "+r),tr=(e,t,r)=>(so(e,t,"read from private field"),r?r.call(e):t.get(e)),uo=(e,t,r)=>t.has(e)?Fa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ra="popstate";function aa(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Es(e={}){function t(a,n){let o=n.state?.masked,{pathname:i,search:l,hash:s}=o||a.location;return ft("",{pathname:i,search:l,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:Te(n)}return fo(t,r,null,e)}function Y(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ie(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function co(){return Math.random().toString(36).substring(2,10)}function na(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ft(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?_e(t):t,state:r,key:t&&t.key||a||co(),unstable_mask:n}}function Te({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function _e(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function fo(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,l="POP",s=null,u=h();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function h(){return(i.state||{idx:null}).idx}function c(){l="POP";let v=h(),C=v==null?null:v-u;u=v,s&&s({action:l,location:b.location,delta:C})}function y(v,C){l="PUSH";let S=aa(v)?v:ft(b.location,v,C);u=h()+1;let T=na(S,u),_=b.createHref(S.unstable_mask||S);try{i.pushState(T,"",_)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;n.location.assign(_)}o&&s&&s({action:l,location:b.location,delta:1})}function w(v,C){l="REPLACE";let S=aa(v)?v:ft(b.location,v,C);u=h();let T=na(S,u),_=b.createHref(S.unstable_mask||S);i.replaceState(T,"",_),o&&s&&s({action:l,location:b.location,delta:0})}function R(v){return Aa(v)}let b={get action(){return l},get location(){return e(n,i)},listen(v){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(ra,c),s=v,()=>{n.removeEventListener(ra,c),s=null}},createHref(v){return t(n,v)},createURL:R,encodeLocation(v){let C=R(v);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:y,replace:w,go(v){return i.go(v)}};return b}function Aa(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Y(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:Te(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}var ut,oa=class{constructor(e){if(uo(this,ut,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(tr(this,ut).has(e))return tr(this,ut).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){tr(this,ut).set(e,t)}};ut=new WeakMap;var ho=new Set(["lazy","caseSensitive","path","id","index","children"]);function mo(e){return ho.has(e)}var po=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function yo(e){return po.has(e)}function vo(e){return e.index===!0}function ht(e,t,r=[],a={},n=!1){return e.map((o,i)=>{let l=[...r,String(i)],s=typeof o.id=="string"?o.id:l.join("-");if(Y(o.index!==!0||!o.children,"Cannot specify children on an index route"),Y(n||!a[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),vo(o)){let u={...o,id:s};return a[s]=ia(u,t(u)),u}else{let u={...o,id:s,children:void 0};return a[s]=ia(u,t(u)),o.children&&(u.children=ht(o.children,t,l,a,n)),u}})}function ia(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Ae(e,t,r="/"){return ct(e,t,r,!1)}function ct(e,t,r,a){let n=typeof t=="string"?_e(t):t,o=Ee(n.pathname||"/",r);if(o==null)return null;let i=Na(e);go(i);let l=null;for(let s=0;l==null&&s<i.length;++s){let u=To(o);l=Po(i[s],u,a)}return l}function Ia(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Na(e,t=[],r=[],a="",n=!1){let o=(i,l,s=n,u)=>{let h={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(a)&&s)return;Y(h.relativePath.startsWith(a),`Absolute route path "${h.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(a.length)}let c=Le([a,h.relativePath]),y=r.concat(h);i.children&&i.children.length>0&&(Y(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),Na(i.children,t,y,c,s)),!(i.path==null&&!i.index)&&t.push({path:c,score:xo(c,i.index),routesMeta:y})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let s of $a(i.path))o(i,l,!0,s)}),t}function $a(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=$a(a.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),n&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function go(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Co(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var wo=/^:[\w-]+$/,Eo=3,Ro=2,bo=1,So=10,Lo=-2,la=e=>e==="*";function xo(e,t){let r=e.split("/"),a=r.length;return r.some(la)&&(a+=Lo),t&&(a+=Ro),r.filter(n=>!la(n)).reduce((n,o)=>n+(wo.test(o)?Eo:o===""?bo:So),a)}function Co(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function Po(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let l=0;l<a.length;++l){let s=a[l],u=l===a.length-1,h=o==="/"?t:t.slice(o.length)||"/",c=It({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},h),y=s.route;if(!c&&u&&r&&!a[a.length-1].route.index&&(c=It({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},h)),!c)return null;Object.assign(n,c.params),i.push({params:n,pathname:Le([o,c.pathname]),pathnameBase:Do(Le([o,c.pathnameBase])),route:y}),c.pathnameBase!=="/"&&(o=Le([o,c.pathnameBase]))}return i}function It(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=ja(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let o=n[0],i=o.replace(/(.)\/+$/,"$1"),l=n.slice(1);return{params:a.reduce((u,{paramName:h,isOptional:c},y)=>{if(h==="*"){let R=l[y]||"";i=o.slice(0,o.length-R.length).replace(/(.)\/+$/,"$1")}const w=l[y];return c&&!w?u[h]=void 0:u[h]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function ja(e,t=!1,r=!0){ie(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,s,u,h)=>{if(a.push({paramName:l,isOptional:s!=null}),s){let c=h.charAt(u+i.length);return c&&c!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function To(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ie(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ee(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Mo({basename:e,pathname:t}){return t==="/"?e:Le([e,t])}var Ua=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rr=e=>Ua.test(e);function _o(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?_e(e):e,o;return r?(r=Sr(r),r.startsWith("/")?o=sa(r.substring(1),"/"):o=sa(r,t)):o=t,{pathname:o,search:Oo(a),hash:ko(n)}}function sa(e,t){let r=Nt(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function rr(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ha(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function br(e){let t=Ha(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function Ut(e,t,r,a=!1){let n;typeof e=="string"?n=_e(e):(n={...e},Y(!n.pathname||!n.pathname.includes("?"),rr("?","pathname","search",n)),Y(!n.pathname||!n.pathname.includes("#"),rr("#","pathname","hash",n)),Y(!n.search||!n.search.includes("#"),rr("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,l;if(i==null)l=r;else{let c=t.length-1;if(!a&&i.startsWith("..")){let y=i.split("/");for(;y[0]==="..";)y.shift(),c-=1;n.pathname=y.join("/")}l=c>=0?t[c]:"/"}let s=_o(n,l),u=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||h)&&(s.pathname+="/"),s}var Sr=e=>e.replace(/\/\/+/g,"/"),Le=e=>Sr(e.join("/")),Nt=e=>e.replace(/\/+$/,""),Do=e=>Nt(e).replace(/^\/*/,"/"),Oo=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ko=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Fo=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function Ao(e,t){return new Fo(e,typeof t=="number"?{status:t}:t)}var Io=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let a=new Headers(r.headers);return a.set("Location",e),new Response(null,{...r,headers:a})},je=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Ve(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function pt(e){let t=e.map(r=>r.route.path).filter(Boolean);return Le(t)||"/"}var za=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ba(e,t){let r=e;if(typeof r!="string"||!Ua.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(za)try{let o=new URL(window.location.href),i=r.startsWith("//")?new URL(o.protocol+r):new URL(r),l=Ee(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:n=!0}catch{ie(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var $e=Symbol("Uninstrumented");function No(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(n=>n({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let l of i)o[l]&&r[l].push(o[l])}}));let a={};if(typeof t.lazy=="function"&&r.lazy.length>0){let n=et(r.lazy,t.lazy,()=>{});n&&(a.lazy=n)}if(typeof t.lazy=="object"){let n=t.lazy;["middleware","loader","action"].forEach(o=>{let i=n[o],l=r[`lazy.${o}`];if(typeof i=="function"&&l.length>0){let s=et(l,i,()=>{});s&&(a.lazy=Object.assign(a.lazy||{},{[o]:s}))}})}return["loader","action"].forEach(n=>{let o=t[n];if(typeof o=="function"&&r[n].length>0){let i=o[$e]??o,l=et(r[n],i,(...s)=>ua(s[0]));l&&(n==="loader"&&i.hydrate===!0&&(l.hydrate=!0),l[$e]=i,a[n]=l)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(n=>{let o=n[$e]??n,i=et(r.middleware,o,(...l)=>ua(l[0]));return i?(i[$e]=o,i):n})),a}function $o(e,t){let r={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(n){let o=Object.keys(n);for(let i of o)n[i]&&r[i].push(n[i])}})),r.navigate.length>0){let a=e.navigate[$e]??e.navigate,n=et(r.navigate,a,(...o)=>{let[i,l]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?Te(i):".",...ca(e,l??{})}});n&&(n[$e]=a,e.navigate=n)}if(r.fetch.length>0){let a=e.fetch[$e]??e.fetch,n=et(r.fetch,a,(...o)=>{let[i,,l,s]=o;return{href:l??".",fetcherKey:i,...ca(e,s??{})}});n&&(n[$e]=a,e.fetch=n)}return e}function et(e,t,r){return e.length===0?null:async(...a)=>{let n=await Wa(e,r(...a),()=>t(...a),e.length-1);if(n.type==="error")throw n.value;return n.value}}async function Wa(e,t,r,a){let n=e[a],o;if(n){let i,l=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=Wa(e,t,r,a-1),o=await i,Y(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await n(l,t)}catch(s){console.error("An instrumentation function threw an error:",s)}i||await l(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function ua(e){let{request:t,context:r,params:a,unstable_pattern:n}=e;return{request:jo(t),params:{...a},unstable_pattern:n,context:Uo(r)}}function ca(e,t){return{currentUrl:Te(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function jo(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Uo(e){if(zo(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Ho=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function zo(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Ho}var Ya=["POST","PUT","PATCH","DELETE"],Bo=new Set(Ya),Wo=["GET",...Ya],Yo=new Set(Wo),Va=new Set([301,302,303,307,308]),Vo=new Set([307,308]),ar={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ja={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Qe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Jo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ga="remix-router-transitions",Ka=Symbol("ResetLoaderData");function Rs(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";Y(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],n=e.mapRouteProperties||Jo,o=n;if(e.unstable_instrumentations){let f=e.unstable_instrumentations;o=p=>({...n(p),...No(f.map(g=>g.route).filter(Boolean),p)})}let i={},l=ht(e.routes,o,void 0,i),s,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let h=e.dataStrategy||Qo,c={unstable_passThroughRequests:!1,...e.future},y=null,w=new Set,R=null,b=null,v=null,C=e.hydrationData!=null,S=Ae(l,e.history.location,u),T=!1,_=null,M,D;if(S==null&&!e.patchRoutesOnNavigation){let f=Ce(404,{pathname:e.history.location.pathname}),{matches:p,route:g}=xt(l);M=!0,D=!M,S=p,_={[g.id]:f}}else if(S&&!e.hydrationData&&Et(S,l,e.history.location.pathname).active&&(S=null),S)if(S.some(f=>f.route.lazy))M=!1,D=!M;else if(!S.some(f=>Lr(f.route)))M=!0,D=!M;else{let f=e.hydrationData?e.hydrationData.loaderData:null,p=e.hydrationData?e.hydrationData.errors:null,g=S;if(p){let x=S.findIndex(P=>p[P.route.id]!==void 0);g=g.slice(0,x+1)}D=!1,M=!0,g.forEach(x=>{let P=Xa(x.route,f,p);D=D||P.renderFallback,M=M&&!P.shouldLoad})}else{M=!1,D=!M,S=[];let f=Et(null,l,e.history.location.pathname);f.active&&f.matches&&(T=!0,S=f.matches)}let O,E={historyAction:e.history.action,location:e.history.location,matches:S,initialized:M,renderFallback:D,navigation:ar,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||_,fetchers:new Map,blockers:new Map},N="POP",K=null,te=!1,G,ne=!1,le=new Map,B=null,X=!1,ce=!1,fe=new Set,q=new Map,ve=0,m=-1,L=new Map,A=new Set,$=new Map,V=new Map,J=new Set,Q=new Map,ge,de=null;function Gt(){if(y=e.history.listen(({action:f,location:p,delta:g})=>{if(ge){ge(),ge=void 0;return}ie(Q.size===0||g!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let x=Jr({currentLocation:E.location,nextLocation:p,historyAction:f});if(x&&g!=null){let P=new Promise(U=>{ge=U});e.history.go(g*-1),wt(x,{state:"blocked",location:p,proceed(){wt(x,{state:"proceeding",proceed:void 0,reset:void 0,location:p}),P.then(()=>e.history.go(g))},reset(){let U=new Map(E.blockers);U.set(x,Qe),me({blockers:U})}}),K?.resolve(),K=null;return}return Ue(f,p)}),r){yi(t,le);let f=()=>vi(t,le);t.addEventListener("pagehide",f),B=()=>t.removeEventListener("pagehide",f)}return E.initialized||Ue("POP",E.location,{initialHydration:!0}),O}function Nn(){y&&y(),B&&B(),w.clear(),G&&G.abort(),E.fetchers.forEach((f,p)=>Xt(p)),E.blockers.forEach((f,p)=>Vr(p))}function $n(f){return w.add(f),()=>w.delete(f)}function me(f,p={}){f.matches&&(f.matches=f.matches.map(P=>{let U=i[P.route.id],I=P.route;return I.element!==U.element||I.errorElement!==U.errorElement||I.hydrateFallbackElement!==U.hydrateFallbackElement?{...P,route:U}:P})),E={...E,...f};let g=[],x=[];E.fetchers.forEach((P,U)=>{P.state==="idle"&&(J.has(U)?g.push(U):x.push(U))}),J.forEach(P=>{!E.fetchers.has(P)&&!q.has(P)&&g.push(P)}),[...w].forEach(P=>P(E,{deletedFetchers:g,newErrors:f.errors??null,viewTransitionOpts:p.viewTransitionOpts,flushSync:p.flushSync===!0})),g.forEach(P=>Xt(P)),x.forEach(P=>E.fetchers.delete(P))}function Xe(f,p,{flushSync:g}={}){let x=E.actionData!=null&&E.navigation.formMethod!=null&&ye(E.navigation.formMethod)&&E.navigation.state==="loading"&&f.state?._isRedirect!==!0,P;p.actionData?Object.keys(p.actionData).length>0?P=p.actionData:P=null:x?P=E.actionData:P=null;let U=p.loaderData?Ra(E.loaderData,p.loaderData,p.matches||[],p.errors):E.loaderData,I=E.blockers;I.size>0&&(I=new Map(I),I.forEach((z,j)=>I.set(j,Qe)));let F=X?!1:Kr(f,p.matches||E.matches),H=te===!0||E.navigation.formMethod!=null&&ye(E.navigation.formMethod)&&f.state?._isRedirect!==!0;s&&(l=s,s=void 0),X||N==="POP"||(N==="PUSH"?e.history.push(f,f.state):N==="REPLACE"&&e.history.replace(f,f.state));let k;if(N==="POP"){let z=le.get(E.location.pathname);z&&z.has(f.pathname)?k={currentLocation:E.location,nextLocation:f}:le.has(f.pathname)&&(k={currentLocation:f,nextLocation:E.location})}else if(ne){let z=le.get(E.location.pathname);z?z.add(f.pathname):(z=new Set([f.pathname]),le.set(E.location.pathname,z)),k={currentLocation:E.location,nextLocation:f}}me({...p,actionData:P,loaderData:U,historyAction:N,location:f,initialized:!0,renderFallback:!1,navigation:ar,revalidation:"idle",restoreScrollPosition:F,preventScrollReset:H,blockers:I},{viewTransitionOpts:k,flushSync:g===!0}),N="POP",te=!1,ne=!1,X=!1,ce=!1,K?.resolve(),K=null,de?.resolve(),de=null}async function jr(f,p){if(K?.resolve(),K=null,typeof f=="number"){K||(K=La());let oe=K.promise;return e.history.go(f),oe}let g=ur(E.location,E.matches,u,f,p?.fromRouteId,p?.relative),{path:x,submission:P,error:U}=da(!1,g,p),I;p?.unstable_mask&&(I={pathname:"",search:"",hash:"",...typeof p.unstable_mask=="string"?_e(p.unstable_mask):{...E.location.unstable_mask,...p.unstable_mask}});let F=E.location,H=ft(F,x,p&&p.state,void 0,I);H={...H,...e.history.encodeLocation(H)};let k=p&&p.replace!=null?p.replace:void 0,z="PUSH";k===!0?z="REPLACE":k===!1||P!=null&&ye(P.formMethod)&&P.formAction===E.location.pathname+E.location.search&&(z="REPLACE");let j=p&&"preventScrollReset"in p?p.preventScrollReset===!0:void 0,ae=(p&&p.flushSync)===!0,ee=Jr({currentLocation:F,nextLocation:H,historyAction:z});if(ee){wt(ee,{state:"blocked",location:H,proceed(){wt(ee,{state:"proceeding",proceed:void 0,reset:void 0,location:H}),jr(f,p)},reset(){let oe=new Map(E.blockers);oe.set(ee,Qe),me({blockers:oe})}});return}await Ue(z,H,{submission:P,pendingError:U,preventScrollReset:j,replace:p&&p.replace,enableViewTransition:p&&p.viewTransition,flushSync:ae,callSiteDefaultShouldRevalidate:p&&p.unstable_defaultShouldRevalidate})}function jn(){de||(de=La()),Kt(),me({revalidation:"loading"});let f=de.promise;return E.navigation.state==="submitting"?f:E.navigation.state==="idle"?(Ue(E.historyAction,E.location,{startUninterruptedRevalidation:!0}),f):(Ue(N||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation,enableViewTransition:ne===!0}),f)}async function Ue(f,p,g){G&&G.abort(),G=null,N=f,X=(g&&g.startUninterruptedRevalidation)===!0,Xn(E.location,E.matches),te=(g&&g.preventScrollReset)===!0,ne=(g&&g.enableViewTransition)===!0;let x=s||l,P=g&&g.overrideNavigation,U=g?.initialHydration&&E.matches&&E.matches.length>0&&!T?E.matches:Ae(x,p,u),I=(g&&g.flushSync)===!0;if(U&&E.initialized&&!ce&&ii(E.location,p)&&!(g&&g.submission&&ye(g.submission.formMethod))){Xe(p,{matches:U},{flushSync:I});return}let F=Et(U,x,p.pathname);if(F.active&&F.matches&&(U=F.matches),!U){let{error:ue,notFoundMatches:he,route:re}=qt(p.pathname);Xe(p,{matches:he,loaderData:{},errors:{[re.id]:ue}},{flushSync:I});return}G=new AbortController;let H=Ze(e.history,p,G.signal,g&&g.submission),k=e.getContext?await e.getContext():new oa,z;if(g&&g.pendingError)z=[Ne(U).route.id,{type:"error",error:g.pendingError}];else if(g&&g.submission&&ye(g.submission.formMethod)){let ue=await Un(H,p,g.submission,U,k,F.active,g&&g.initialHydration===!0,{replace:g.replace,flushSync:I});if(ue.shortCircuited)return;if(ue.pendingActionResult){let[he,re]=ue.pendingActionResult;if(Se(re)&&Ve(re.error)&&re.error.status===404){G=null,Xe(p,{matches:ue.matches,loaderData:{},errors:{[he]:re.error}});return}}U=ue.matches||U,z=ue.pendingActionResult,P=nr(p,g.submission),I=!1,F.active=!1,H=Ze(e.history,H.url,H.signal)}let{shortCircuited:j,matches:ae,loaderData:ee,errors:oe}=await Hn(H,p,U,k,F.active,P,g&&g.submission,g&&g.fetcherSubmission,g&&g.replace,g&&g.initialHydration===!0,I,z,g&&g.callSiteDefaultShouldRevalidate);j||(G=null,Xe(p,{matches:ae||U,...ba(z),loaderData:ee,errors:oe}))}async function Un(f,p,g,x,P,U,I,F={}){Kt();let H=mi(p,g);if(me({navigation:H},{flushSync:F.flushSync===!0}),U){let j=await Rt(x,p.pathname,f.signal);if(j.type==="aborted")return{shortCircuited:!0};if(j.type==="error"){if(j.partialMatches.length===0){let{matches:ee,route:oe}=xt(l);return{matches:ee,pendingActionResult:[oe.id,{type:"error",error:j.error}]}}let ae=Ne(j.partialMatches).route.id;return{matches:j.partialMatches,pendingActionResult:[ae,{type:"error",error:j.error}]}}else if(j.matches)x=j.matches;else{let{notFoundMatches:ae,error:ee,route:oe}=qt(p.pathname);return{matches:ae,pendingActionResult:[oe.id,{type:"error",error:ee}]}}}let k,z=Ot(x,p);if(!z.route.action&&!z.route.lazy)k={type:"error",error:Ce(405,{method:f.method,pathname:p.pathname,routeId:z.route.id})};else{let j=tt(o,i,f,p,x,z,I?[]:a,P),ae=await at(f,p,j,P,null);if(k=ae[z.route.id],!k){for(let ee of x)if(ae[ee.route.id]){k=ae[ee.route.id];break}}if(f.signal.aborted)return{shortCircuited:!0}}if(Ye(k)){let j;return F&&F.replace!=null?j=F.replace:j=ga(k.response.headers.get("Location"),new URL(f.url),u,e.history)===E.location.pathname+E.location.search,await He(f,k,!0,{submission:g,replace:j}),{shortCircuited:!0}}if(Se(k)){let j=Ne(x,z.route.id);return(F&&F.replace)!==!0&&(N="PUSH"),{matches:x,pendingActionResult:[j.route.id,k,z.route.id]}}return{matches:x,pendingActionResult:[z.route.id,k]}}async function Hn(f,p,g,x,P,U,I,F,H,k,z,j,ae){let ee=U||nr(p,I),oe=I||F||Sa(ee),ue=!X&&!k;if(P){if(ue){let pe=Ur(j);me({navigation:ee,...pe!==void 0?{actionData:pe}:{}},{flushSync:z})}let Z=await Rt(g,p.pathname,f.signal);if(Z.type==="aborted")return{shortCircuited:!0};if(Z.type==="error"){if(Z.partialMatches.length===0){let{matches:qe,route:We}=xt(l);return{matches:qe,loaderData:{},errors:{[We.id]:Z.error}}}let pe=Ne(Z.partialMatches).route.id;return{matches:Z.partialMatches,loaderData:{},errors:{[pe]:Z.error}}}else if(Z.matches)g=Z.matches;else{let{error:pe,notFoundMatches:qe,route:We}=qt(p.pathname);return{matches:qe,loaderData:{},errors:{[We.id]:pe}}}}let he=s||l,{dsMatches:re,revalidatingFetchers:be}=fa(f,x,o,i,e.history,E,g,oe,p,k?[]:a,k===!0,ce,fe,J,$,A,he,u,e.patchRoutesOnNavigation!=null,j,ae);if(m=++ve,!e.dataStrategy&&!re.some(Z=>Z.shouldLoad)&&!re.some(Z=>Z.route.middleware&&Z.route.middleware.length>0)&&be.length===0){let Z=Wr();return Xe(p,{matches:g,loaderData:{},errors:j&&Se(j[1])?{[j[0]]:j[1].error}:null,...ba(j),...Z?{fetchers:new Map(E.fetchers)}:{}},{flushSync:z}),{shortCircuited:!0}}if(ue){let Z={};if(!P){Z.navigation=ee;let pe=Ur(j);pe!==void 0&&(Z.actionData=pe)}be.length>0&&(Z.fetchers=zn(be)),me(Z,{flushSync:z})}be.forEach(Z=>{ke(Z.key),Z.controller&&q.set(Z.key,Z.controller)});let ze=()=>be.forEach(Z=>ke(Z.key));G&&G.signal.addEventListener("abort",ze);let{loaderResults:nt,fetcherResults:Ie}=await Hr(re,be,f,p,x);if(f.signal.aborted)return{shortCircuited:!0};G&&G.signal.removeEventListener("abort",ze),be.forEach(Z=>q.delete(Z.key));let Me=Ct(nt);if(Me)return await He(f,Me.result,!0,{replace:H}),{shortCircuited:!0};if(Me=Ct(Ie),Me)return A.add(Me.key),await He(f,Me.result,!0,{replace:H}),{shortCircuited:!0};let{loaderData:Qt,errors:ot}=Ea(E,g,nt,j,be,Ie);k&&E.errors&&(ot={...E.errors,...ot});let Be=Wr(),bt=Yr(m),St=Be||bt||be.length>0;return{matches:g,loaderData:Qt,errors:ot,...St?{fetchers:new Map(E.fetchers)}:{}}}function Ur(f){if(f&&!Se(f[1]))return{[f[0]]:f[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function zn(f){return f.forEach(p=>{let g=E.fetchers.get(p.key),x=lt(void 0,g?g.data:void 0);E.fetchers.set(p.key,x)}),new Map(E.fetchers)}async function Bn(f,p,g,x){ke(f);let P=(x&&x.flushSync)===!0,U=s||l,I=ur(E.location,E.matches,u,g,p,x?.relative),F=Ae(U,I,u),H=Et(F,U,I);if(H.active&&H.matches&&(F=H.matches),!F){Oe(f,p,Ce(404,{pathname:I}),{flushSync:P});return}let{path:k,submission:z,error:j}=da(!0,I,x);if(j){Oe(f,p,j,{flushSync:P});return}let ae=e.getContext?await e.getContext():new oa,ee=(x&&x.preventScrollReset)===!0;if(z&&ye(z.formMethod)){await Wn(f,p,k,F,ae,H.active,P,ee,z,x&&x.unstable_defaultShouldRevalidate);return}$.set(f,{routeId:p,path:k}),await Yn(f,p,k,F,ae,H.active,P,ee,z)}async function Wn(f,p,g,x,P,U,I,F,H,k){Kt(),$.delete(f);let z=E.fetchers.get(f);De(f,pi(H,z),{flushSync:I});let j=new AbortController,ae=Ze(e.history,g,j.signal,H);if(U){let se=await Rt(x,new URL(ae.url).pathname,ae.signal,f);if(se.type==="aborted")return;if(se.type==="error"){Oe(f,p,se.error,{flushSync:I});return}else if(se.matches)x=se.matches;else{Oe(f,p,Ce(404,{pathname:g}),{flushSync:I});return}}let ee=Ot(x,g);if(!ee.route.action&&!ee.route.lazy){let se=Ce(405,{method:H.formMethod,pathname:g,routeId:p});Oe(f,p,se,{flushSync:I});return}q.set(f,j);let oe=ve,ue=tt(o,i,ae,g,x,ee,a,P),he=await at(ae,g,ue,P,f),re=he[ee.route.id];if(!re){for(let se of ue)if(he[se.route.id]){re=he[se.route.id];break}}if(ae.signal.aborted){q.get(f)===j&&q.delete(f);return}if(J.has(f)){if(Ye(re)||Se(re)){De(f,Fe(void 0));return}}else{if(Ye(re))if(q.delete(f),m>oe){De(f,Fe(void 0));return}else return A.add(f),De(f,lt(H)),He(ae,re,!1,{fetcherSubmission:H,preventScrollReset:F});if(Se(re)){Oe(f,p,re.error);return}}let be=E.navigation.location||E.location,ze=Ze(e.history,be,j.signal),nt=s||l,Ie=E.navigation.state!=="idle"?Ae(nt,E.navigation.location,u):E.matches;Y(Ie,"Didn't find any matches after fetcher action");let Me=++ve;L.set(f,Me);let Qt=lt(H,re.data);E.fetchers.set(f,Qt);let{dsMatches:ot,revalidatingFetchers:Be}=fa(ze,P,o,i,e.history,E,Ie,H,be,a,!1,ce,fe,J,$,A,nt,u,e.patchRoutesOnNavigation!=null,[ee.route.id,re],k);Be.filter(se=>se.key!==f).forEach(se=>{let Lt=se.key,qr=E.fetchers.get(Lt),Zn=lt(void 0,qr?qr.data:void 0);E.fetchers.set(Lt,Zn),ke(Lt),se.controller&&q.set(Lt,se.controller)}),me({fetchers:new Map(E.fetchers)});let bt=()=>Be.forEach(se=>ke(se.key));j.signal.addEventListener("abort",bt);let{loaderResults:St,fetcherResults:Z}=await Hr(ot,Be,ze,be,P);if(j.signal.aborted)return;if(j.signal.removeEventListener("abort",bt),L.delete(f),q.delete(f),Be.forEach(se=>q.delete(se.key)),E.fetchers.has(f)){let se=Fe(re.data);E.fetchers.set(f,se)}let pe=Ct(St);if(pe)return He(ze,pe.result,!1,{preventScrollReset:F});if(pe=Ct(Z),pe)return A.add(pe.key),He(ze,pe.result,!1,{preventScrollReset:F});let{loaderData:qe,errors:We}=Ea(E,Ie,St,void 0,Be,Z);Yr(Me),E.navigation.state==="loading"&&Me>m?(Y(N,"Expected pending action"),G&&G.abort(),Xe(E.navigation.location,{matches:Ie,loaderData:qe,errors:We,fetchers:new Map(E.fetchers)})):(me({errors:We,loaderData:Ra(E.loaderData,qe,Ie,We),fetchers:new Map(E.fetchers)}),ce=!1)}async function Yn(f,p,g,x,P,U,I,F,H){let k=E.fetchers.get(f);De(f,lt(H,k?k.data:void 0),{flushSync:I});let z=new AbortController,j=Ze(e.history,g,z.signal);if(U){let re=await Rt(x,new URL(j.url).pathname,j.signal,f);if(re.type==="aborted")return;if(re.type==="error"){Oe(f,p,re.error,{flushSync:I});return}else if(re.matches)x=re.matches;else{Oe(f,p,Ce(404,{pathname:g}),{flushSync:I});return}}let ae=Ot(x,g);q.set(f,z);let ee=ve,oe=tt(o,i,j,g,x,ae,a,P),ue=await at(j,g,oe,P,f),he=ue[ae.route.id];if(!he){for(let re of x)if(ue[re.route.id]){he=ue[re.route.id];break}}if(q.get(f)===z&&q.delete(f),!j.signal.aborted){if(J.has(f)){De(f,Fe(void 0));return}if(Ye(he))if(m>ee){De(f,Fe(void 0));return}else{A.add(f),await He(j,he,!1,{preventScrollReset:F});return}if(Se(he)){Oe(f,p,he.error);return}De(f,Fe(he.data))}}async function He(f,p,g,{submission:x,fetcherSubmission:P,preventScrollReset:U,replace:I}={}){g||(K?.resolve(),K=null),p.response.headers.has("X-Remix-Revalidate")&&(ce=!0);let F=p.response.headers.get("Location");Y(F,"Expected a Location header on the redirect Response"),F=ga(F,new URL(f.url),u,e.history);let H=ft(E.location,F,{_isRedirect:!0});if(r){let oe=!1;if(p.response.headers.has("X-Remix-Reload-Document"))oe=!0;else if(Rr(F)){const ue=Aa(F,!0);oe=ue.origin!==t.location.origin||Ee(ue.pathname,u)==null}if(oe){I?t.location.replace(F):t.location.assign(F);return}}G=null;let k=I===!0||p.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:z,formAction:j,formEncType:ae}=E.navigation;!x&&!P&&z&&j&&ae&&(x=Sa(E.navigation));let ee=x||P;if(Vo.has(p.response.status)&&ee&&ye(ee.formMethod))await Ue(k,H,{submission:{...ee,formAction:F},preventScrollReset:U||te,enableViewTransition:g?ne:void 0});else{let oe=nr(H,x);await Ue(k,H,{overrideNavigation:oe,fetcherSubmission:P,preventScrollReset:U||te,enableViewTransition:g?ne:void 0})}}async function at(f,p,g,x,P){let U,I={};try{U=await ei(h,f,p,g,P,x,!1)}catch(F){return g.filter(H=>H.shouldLoad).forEach(H=>{I[H.route.id]={type:"error",error:F}}),I}if(f.signal.aborted)return I;if(!ye(f.method))for(let F of g){if(U[F.route.id]?.type==="error")break;!U.hasOwnProperty(F.route.id)&&!E.loaderData.hasOwnProperty(F.route.id)&&(!E.errors||!E.errors.hasOwnProperty(F.route.id))&&F.shouldCallHandler()&&(U[F.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${F.route.id}`)})}for(let[F,H]of Object.entries(U))if(ci(H)){let k=H.result;I[F]={type:"redirect",response:ni(k,f,F,g,u)}}else I[F]=await ai(H);return I}async function Hr(f,p,g,x,P){let U=at(g,x,f,P,null),I=Promise.all(p.map(async k=>{if(k.matches&&k.match&&k.request&&k.controller){let j=(await at(k.request,k.path,k.matches,P,k.key))[k.match.route.id];return{[k.key]:j}}else return Promise.resolve({[k.key]:{type:"error",error:Ce(404,{pathname:k.path})}})})),F=await U,H=(await I).reduce((k,z)=>Object.assign(k,z),{});return{loaderResults:F,fetcherResults:H}}function Kt(){ce=!0,$.forEach((f,p)=>{q.has(p)&&fe.add(p),ke(p)})}function De(f,p,g={}){E.fetchers.set(f,p),me({fetchers:new Map(E.fetchers)},{flushSync:(g&&g.flushSync)===!0})}function Oe(f,p,g,x={}){let P=Ne(E.matches,p);Xt(f),me({errors:{[P.route.id]:g},fetchers:new Map(E.fetchers)},{flushSync:(x&&x.flushSync)===!0})}function zr(f){return V.set(f,(V.get(f)||0)+1),J.has(f)&&J.delete(f),E.fetchers.get(f)||Ja}function Vn(f,p){ke(f,p?.reason),De(f,Fe(null))}function Xt(f){let p=E.fetchers.get(f);q.has(f)&&!(p&&p.state==="loading"&&L.has(f))&&ke(f),$.delete(f),L.delete(f),A.delete(f),J.delete(f),fe.delete(f),E.fetchers.delete(f)}function Jn(f){let p=(V.get(f)||0)-1;p<=0?(V.delete(f),J.add(f)):V.set(f,p),me({fetchers:new Map(E.fetchers)})}function ke(f,p){let g=q.get(f);g&&(g.abort(p),q.delete(f))}function Br(f){for(let p of f){let g=zr(p),x=Fe(g.data);E.fetchers.set(p,x)}}function Wr(){let f=[],p=!1;for(let g of A){let x=E.fetchers.get(g);Y(x,`Expected fetcher: ${g}`),x.state==="loading"&&(A.delete(g),f.push(g),p=!0)}return Br(f),p}function Yr(f){let p=[];for(let[g,x]of L)if(x<f){let P=E.fetchers.get(g);Y(P,`Expected fetcher: ${g}`),P.state==="loading"&&(ke(g),L.delete(g),p.push(g))}return Br(p),p.length>0}function Gn(f,p){let g=E.blockers.get(f)||Qe;return Q.get(f)!==p&&Q.set(f,p),g}function Vr(f){E.blockers.delete(f),Q.delete(f)}function wt(f,p){let g=E.blockers.get(f)||Qe;Y(g.state==="unblocked"&&p.state==="blocked"||g.state==="blocked"&&p.state==="blocked"||g.state==="blocked"&&p.state==="proceeding"||g.state==="blocked"&&p.state==="unblocked"||g.state==="proceeding"&&p.state==="unblocked",`Invalid blocker state transition: ${g.state} -> ${p.state}`);let x=new Map(E.blockers);x.set(f,p),me({blockers:x})}function Jr({currentLocation:f,nextLocation:p,historyAction:g}){if(Q.size===0)return;Q.size>1&&ie(!1,"A router only supports one blocker at a time");let x=Array.from(Q.entries()),[P,U]=x[x.length-1],I=E.blockers.get(P);if(!(I&&I.state==="proceeding")&&U({currentLocation:f,nextLocation:p,historyAction:g}))return P}function qt(f){let p=Ce(404,{pathname:f}),g=s||l,{matches:x,route:P}=xt(g);return{notFoundMatches:x,route:P,error:p}}function Kn(f,p,g){if(R=f,v=p,b=g||null,!C&&E.navigation===ar){C=!0;let x=Kr(E.location,E.matches);x!=null&&me({restoreScrollPosition:x})}return()=>{R=null,v=null,b=null}}function Gr(f,p){return b&&b(f,p.map(x=>Ia(x,E.loaderData)))||f.key}function Xn(f,p){if(R&&v){let g=Gr(f,p);R[g]=v()}}function Kr(f,p){if(R){let g=Gr(f,p),x=R[g];if(typeof x=="number")return x}return null}function Et(f,p,g){if(e.patchRoutesOnNavigation)if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:ct(p,g,u,!0)}}else return{active:!0,matches:ct(p,g,u,!0)||[]};return{active:!1,matches:null}}async function Rt(f,p,g,x){if(!e.patchRoutesOnNavigation)return{type:"success",matches:f};let P=f;for(;;){let U=s==null,I=s||l,F=i;try{await e.patchRoutesOnNavigation({signal:g,path:p,matches:P,fetcherKey:x,patch:(z,j)=>{g.aborted||ha(z,j,I,F,o,!1)}})}catch(z){return{type:"error",error:z,partialMatches:P}}finally{U&&!g.aborted&&(l=[...l])}if(g.aborted)return{type:"aborted"};let H=Ae(I,p,u),k=null;if(H){if(Object.keys(H[0].params).length===0)return{type:"success",matches:H};if(k=ct(I,p,u,!0),!(k&&P.length<k.length&&Xr(P,k.slice(0,P.length))))return{type:"success",matches:H}}if(k||(k=ct(I,p,u,!0)),!k||Xr(P,k))return{type:"success",matches:null};P=k}}function Xr(f,p){return f.length===p.length&&f.every((g,x)=>g.route.id===p[x].route.id)}function qn(f){i={},s=ht(f,o,void 0,i)}function Qn(f,p,g=!1){let x=s==null;ha(f,p,s||l,i,o,g),x&&(l=[...l],me({}))}return O={get basename(){return u},get future(){return c},get state(){return E},get routes(){return l},get window(){return t},initialize:Gt,subscribe:$n,enableScrollRestoration:Kn,navigate:jr,fetch:Bn,revalidate:jn,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:zr,resetFetcher:Vn,deleteFetcher:Jn,dispose:Nn,getBlocker:Gn,deleteBlocker:Vr,patchRoutes:Qn,_internalFetchControllers:q,_internalSetRoutes:qn,_internalSetStateDoNotUseOrYouWillBreakYourApp(f){me(f)}},e.unstable_instrumentations&&(O=$o(O,e.unstable_instrumentations.map(f=>f.router).filter(Boolean))),O}function Go(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ur(e,t,r,a,n,o){let i,l;if(n){i=[];for(let u of t)if(i.push(u),u.route.id===n){l=u;break}}else i=t,l=t[t.length-1];let s=Ut(a||".",br(i),Ee(e.pathname,r)||e.pathname,o==="path");if(a==null&&(s.search=e.search,s.hash=e.hash),(a==null||a===""||a===".")&&l){let u=xr(s.search);if(l.route.index&&!u)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&u){let h=new URLSearchParams(s.search),c=h.getAll("index");h.delete("index"),c.filter(w=>w).forEach(w=>h.append("index",w));let y=h.toString();s.search=y?`?${y}`:""}}return r!=="/"&&(s.pathname=Mo({basename:r,pathname:s.pathname})),Te(s)}function da(e,t,r){if(!r||!Go(r))return{path:t};if(r.formMethod&&!hi(r.formMethod))return{path:t,error:Ce(405,{method:r.formMethod})};let a=()=>({path:t,error:Ce(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=an(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ye(o))return a();let c=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,[w,R])=>`${y}${w}=${R}
|
|
2
|
+
`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:c}}}else if(r.formEncType==="application/json"){if(!ye(o))return a();try{let c=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:c,text:void 0}}}catch{return a()}}}Y(typeof FormData=="function","FormData is not available in this environment");let l,s;if(r.formData)l=dr(r.formData),s=r.formData;else if(r.body instanceof FormData)l=dr(r.body),s=r.body;else if(r.body instanceof URLSearchParams)l=r.body,s=wa(l);else if(r.body==null)l=new URLSearchParams,s=new FormData;else try{l=new URLSearchParams(r.body),s=wa(l)}catch{return a()}let u={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(ye(u.formMethod))return{path:t,submission:u};let h=_e(t);return e&&h.search&&xr(h.search)&&l.append("index",""),h.search=`?${l}`,{path:Te(h),submission:u}}function fa(e,t,r,a,n,o,i,l,s,u,h,c,y,w,R,b,v,C,S,T,_){let M=T?Se(T[1])?T[1].error:T[1].data:void 0,D=n.createURL(o.location),O=n.createURL(s),E;if(h&&o.errors){let B=Object.keys(o.errors)[0];E=i.findIndex(X=>X.route.id===B)}else if(T&&Se(T[1])){let B=T[0];E=i.findIndex(X=>X.route.id===B)-1}let N=T?T[1].statusCode:void 0,K=N&&N>=400,te={currentUrl:D,currentParams:o.matches[0]?.params||{},nextUrl:O,nextParams:i[0].params,...l,actionResult:M,actionStatus:N},G=pt(i),ne=i.map((B,X)=>{let{route:ce}=B,fe=null;if(E!=null&&X>E)fe=!1;else if(ce.lazy)fe=!0;else if(!Lr(ce))fe=!1;else if(h){let{shouldLoad:L}=Xa(ce,o.loaderData,o.errors);fe=L}else Ko(o.loaderData,o.matches[X],B)&&(fe=!0);if(fe!==null)return cr(r,a,e,s,G,B,u,t,fe);let q=!1;typeof _=="boolean"?q=_:K?q=!1:(c||D.pathname+D.search===O.pathname+O.search||D.search!==O.search||Xo(o.matches[X],B))&&(q=!0);let ve={...te,defaultShouldRevalidate:q},m=dt(B,ve);return cr(r,a,e,s,G,B,u,t,m,ve,_)}),le=[];return R.forEach((B,X)=>{if(h||!i.some($=>$.route.id===B.routeId)||w.has(X))return;let ce=o.fetchers.get(X),fe=ce&&ce.state!=="idle"&&ce.data===void 0,q=Ae(v,B.path,C);if(!q){if(S&&fe)return;le.push({key:X,routeId:B.routeId,path:B.path,matches:null,match:null,request:null,controller:null});return}if(b.has(X))return;let ve=Ot(q,B.path),m=new AbortController,L=Ze(n,B.path,m.signal),A=null;if(y.has(X))y.delete(X),A=tt(r,a,L,B.path,q,ve,u,t);else if(fe)c&&(A=tt(r,a,L,B.path,q,ve,u,t));else{let $;typeof _=="boolean"?$=_:K?$=!1:$=c;let V={...te,defaultShouldRevalidate:$};dt(ve,V)&&(A=tt(r,a,L,B.path,q,ve,u,t,V))}A&&le.push({key:X,routeId:B.routeId,path:B.path,matches:A,match:ve,request:L,controller:m})}),{dsMatches:ne,revalidatingFetchers:le}}function Lr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Xa(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Lr(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,n=r!=null&&r[e.id]!==void 0;if(!a&&n)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let o=!a&&!n;return{shouldLoad:o,renderFallback:o}}function Ko(e,t,r){let a=!t||r.route.id!==t.route.id,n=!e.hasOwnProperty(r.route.id);return a||n}function Xo(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function dt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function ha(e,t,r,a,n,o){let i;if(e){let u=a[e];Y(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),i=u.children}else i=r;let l=[],s=[];if(t.forEach(u=>{let h=i.find(c=>qa(u,c));h?s.push({existingRoute:h,newRoute:u}):l.push(u)}),l.length>0){let u=ht(l,n,[e||"_","patch",String(i?.length||"0")],a);i.push(...u)}if(o&&s.length>0)for(let u=0;u<s.length;u++){let{existingRoute:h,newRoute:c}=s[u],y=h,[w]=ht([c],n,[],{},!0);Object.assign(y,{element:w.element?w.element:y.element,errorElement:w.errorElement?w.errorElement:y.errorElement,hydrateFallbackElement:w.hydrateFallbackElement?w.hydrateFallbackElement:y.hydrateFallbackElement})}}function qa(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((r,a)=>t.children?.some(n=>qa(r,n)))??!1:!1}var ma=new WeakMap,Qa=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let n=r[t.id];if(Y(n,"No route found in manifest"),!n.lazy||typeof n.lazy!="object")return;let o=n.lazy[e];if(!o)return;let i=ma.get(n);i||(i={},ma.set(n,i));let l=i[e];if(l)return l;let s=(async()=>{let u=mo(e),c=n[e]!==void 0&&e!=="hasErrorBoundary";if(u)ie(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(c)ie(!1,`Route "${n.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let y=await o();y!=null&&(Object.assign(n,{[e]:y}),Object.assign(n,a(n)))}typeof n.lazy=="object"&&(n.lazy[e]=void 0,Object.values(n.lazy).every(y=>y===void 0)&&(n.lazy=void 0))})();return i[e]=s,s},pa=new WeakMap;function qo(e,t,r,a,n){let o=r[e.id];if(Y(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let h=pa.get(o);if(h)return{lazyRoutePromise:h,lazyHandlerPromise:h};let c=(async()=>{Y(typeof e.lazy=="function","No lazy route function found");let y=await e.lazy(),w={};for(let R in y){let b=y[R];if(b===void 0)continue;let v=yo(R),S=o[R]!==void 0&&R!=="hasErrorBoundary";v?ie(!v,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):S?ie(!S,`Route "${o.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):w[R]=b}Object.assign(o,w),Object.assign(o,{...a(o),lazy:void 0})})();return pa.set(o,c),c.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:c}}let i=Object.keys(e.lazy),l=[],s;for(let h of i){if(n&&n.includes(h))continue;let c=Qa({key:h,route:e,manifest:r,mapRouteProperties:a});c&&(l.push(c),h===t&&(s=c))}let u=l.length>0?Promise.all(l).then(()=>{}):void 0;return u?.catch(()=>{}),s?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:s}}async function ya(e){let t=e.matches.filter(n=>n.shouldLoad),r={};return(await Promise.all(t.map(n=>n.resolve()))).forEach((n,o)=>{r[t[o].route.id]=n}),r}async function Qo(e){return e.matches.some(t=>t.route.middleware)?Za(e,()=>ya(e)):ya(e)}function Za(e,t){return Zo(e,t,a=>{if(fi(a))throw a;return a},si,r);function r(a,n,o){if(o)return Promise.resolve(Object.assign(o.value,{[n]:{type:"error",result:a}}));{let{matches:i}=e,l=Math.min(Math.max(i.findIndex(u=>u.route.id===n),0),Math.max(i.findIndex(u=>u.shouldCallHandler()),0)),s=Ne(i,i[l].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:a}})}}}async function Zo(e,t,r,a,n){let{matches:o,...i}=e,l=o.flatMap(u=>u.route.middleware?u.route.middleware.map(h=>[u.route.id,h]):[]);return await en(i,l,t,r,a,n)}async function en(e,t,r,a,n,o,i=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let s=t[i];if(!s)return await r();let[u,h]=s,c,y=async()=>{if(c)throw new Error("You may only call `next()` once per middleware");try{return c={value:await en(e,t,r,a,n,o,i+1)},c.value}catch(w){return c={value:await o(w,u,c)},c.value}};try{let w=await h(e,y),R=w!=null?a(w):void 0;return n(R)?R:c?R??c.value:(c={value:await y()},c.value)}catch(w){return await o(w,u,c)}}function tn(e,t,r,a,n){let o=Qa({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),i=qo(a.route,ye(r.method)?"action":"loader",t,e,n);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function cr(e,t,r,a,n,o,i,l,s,u=null,h){let c=!1,y=tn(e,t,r,o,i);return{...o,_lazyPromises:y,shouldLoad:s,shouldRevalidateArgs:u,shouldCallHandler(w){return c=!0,u?typeof h=="boolean"?dt(o,{...u,defaultShouldRevalidate:h}):typeof w=="boolean"?dt(o,{...u,defaultShouldRevalidate:w}):dt(o,u):s},resolve(w){let{lazy:R,loader:b,middleware:v}=o.route,C=c||s||w&&!ye(r.method)&&(R||b),S=v&&v.length>0&&!b&&!R;return C&&(ye(r.method)||!S)?ti({request:r,path:a,unstable_pattern:n,match:o,lazyHandlerPromise:y?.handler,lazyRoutePromise:y?.route,handlerOverride:w,scopedContext:l}):Promise.resolve({type:"data",result:void 0})}}}function tt(e,t,r,a,n,o,i,l,s=null){return n.map(u=>u.route.id!==o.route.id?{...u,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:tn(e,t,r,u,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:cr(e,t,r,a,pt(n),u,i,l,!0,s))}async function ei(e,t,r,a,n,o,i){a.some(h=>h._lazyPromises?.middleware)&&await Promise.all(a.map(h=>h._lazyPromises?.middleware));let l={request:t,unstable_url:rn(t,r),unstable_pattern:pt(a),params:a[0].params,context:o,matches:a},u=await e({...l,fetcherKey:n,runClientMiddleware:h=>{let c=l;return Za(c,()=>h({...c,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(h=>[h._lazyPromises?.handler,h._lazyPromises?.route]))}catch{}return u}async function ti({request:e,path:t,unstable_pattern:r,match:a,lazyHandlerPromise:n,lazyRoutePromise:o,handlerOverride:i,scopedContext:l}){let s,u,h=ye(e.method),c=h?"action":"loader",y=w=>{let R,b=new Promise((S,T)=>R=T);u=()=>R(),e.signal.addEventListener("abort",u);let v=S=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${c}" [routeId: ${a.route.id}]`)):w({request:e,unstable_url:rn(e,t),unstable_pattern:r,params:a.params,context:l},...S!==void 0?[S]:[]),C=(async()=>{try{return{type:"data",result:await(i?i(T=>v(T)):v())}}catch(S){return{type:"error",result:S}}})();return Promise.race([C,b])};try{let w=h?a.route.action:a.route.loader;if(n||o)if(w){let R,[b]=await Promise.all([y(w).catch(v=>{R=v}),n,o]);if(R!==void 0)throw R;s=b}else{await n;let R=h?a.route.action:a.route.loader;if(R)[s]=await Promise.all([y(R),o]);else if(c==="action"){let b=new URL(e.url),v=b.pathname+b.search;throw Ce(405,{method:e.method,pathname:v,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(w)s=await y(w);else{let R=new URL(e.url),b=R.pathname+R.search;throw Ce(404,{pathname:b})}}catch(w){return{type:"error",result:w}}finally{u&&e.signal.removeEventListener("abort",u)}return s}async function ri(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function ai(e){let{result:t,type:r}=e;if(Ht(t)){let a;try{a=await ri(t)}catch(n){return{type:"error",error:n}}return r==="error"?{type:"error",error:new je(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return r==="error"?fr(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:li(t),statusCode:Ve(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Ve(t)?t.status:void 0}:fr(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function ni(e,t,r,a,n){let o=e.headers.get("Location");if(Y(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Rr(o)){let i=a.slice(0,a.findIndex(l=>l.route.id===r)+1);o=ur(new URL(t.url),i,n,o),e.headers.set("Location",o)}return e}var va=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function ga(e,t,r,a){if(Rr(e)){let n=e,o=n.startsWith("//")?new URL(t.protocol+n):new URL(n);if(va.includes(o.protocol))throw new Error("Invalid redirect location");let i=Ee(o.pathname,r)!=null;if(o.origin===t.origin&&i)return Sr(o.pathname)+o.search+o.hash}try{let n=a.createURL(e);if(va.includes(n.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ze(e,t,r,a){let n=e.createURL(an(t)).toString(),o={signal:r};if(a&&ye(a.formMethod)){let{formMethod:i,formEncType:l}=a;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(a.json)):l==="text/plain"?o.body=a.text:l==="application/x-www-form-urlencoded"&&a.formData?o.body=dr(a.formData):o.body=a.formData}return new Request(n,o)}function rn(e,t){let r=new URL(e.url),a=typeof t=="string"?_e(t):t;if(r.pathname=a.pathname||"/",a.search){let n=new URLSearchParams(a.search),o=n.getAll("index");n.delete("index");for(let i of o.filter(Boolean))n.append("index",i);r.search=n.size?`?${n.toString()}`:""}else r.search="";return r.hash=a.hash||"",r}function dr(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function wa(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function oi(e,t,r,a=!1,n=!1){let o={},i=null,l,s=!1,u={},h=r&&Se(r[1])?r[1].error:void 0;return e.forEach(c=>{if(!(c.route.id in t))return;let y=c.route.id,w=t[y];if(Y(!Ye(w),"Cannot handle redirect results in processLoaderData"),Se(w)){let R=w.error;if(h!==void 0&&(R=h,h=void 0),i=i||{},n)i[y]=R;else{let b=Ne(e,y);i[b.route.id]==null&&(i[b.route.id]=R)}a||(o[y]=Ka),s||(s=!0,l=Ve(w.error)?w.error.status:500),w.headers&&(u[y]=w.headers)}else o[y]=w.data,w.statusCode&&w.statusCode!==200&&!s&&(l=w.statusCode),w.headers&&(u[y]=w.headers)}),h!==void 0&&r&&(i={[r[0]]:h},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:l||200,loaderHeaders:u}}function Ea(e,t,r,a,n,o){let{loaderData:i,errors:l}=oi(t,r,a);return n.filter(s=>!s.matches||s.matches.some(u=>u.shouldLoad)).forEach(s=>{let{key:u,match:h,controller:c}=s;if(c&&c.signal.aborted)return;let y=o[u];if(Y(y,"Did not find corresponding fetcher result"),Se(y)){let w=Ne(e.matches,h?.route.id);l&&l[w.route.id]||(l={...l,[w.route.id]:y.error}),e.fetchers.delete(u)}else if(Ye(y))Y(!1,"Unhandled fetcher revalidation redirect");else{let w=Fe(y.data);e.fetchers.set(u,w)}}),{loaderData:i,errors:l}}function Ra(e,t,r,a){let n=Object.entries(t).filter(([,o])=>o!==Ka).reduce((o,[i,l])=>(o[i]=l,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(n[i]=e[i]),a&&a.hasOwnProperty(i))break}return n}function ba(e){return e?Se(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ne(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function xt(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ce(e,{pathname:t,routeId:r,method:a,type:n,message:o}={}){let i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&t&&r?l=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:n==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",l=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",a&&t&&r?l=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(l=`Invalid request method "${a.toUpperCase()}"`)),new je(e||500,i,new Error(l),!0)}function Ct(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,n]=t[r];if(Ye(n))return{key:a,result:n}}}function an(e){let t=typeof e=="string"?_e(e):e;return Te({...t,hash:""})}function ii(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function li(e){return new je(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function si(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&ui(r))}function ui(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function ci(e){return Ht(e.result)&&Va.has(e.result.status)}function Se(e){return e.type==="error"}function Ye(e){return(e&&e.type)==="redirect"}function fr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Ht(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function di(e){return Va.has(e)}function fi(e){return Ht(e)&&di(e.status)&&e.headers.has("Location")}function hi(e){return Yo.has(e.toUpperCase())}function ye(e){return Bo.has(e.toUpperCase())}function xr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ot(e,t){let r=typeof t=="string"?_e(t).search:t.search;if(e[e.length-1].route.index&&xr(r||""))return e[e.length-1];let a=Ha(e);return a[a.length-1]}function Sa(e){let{formMethod:t,formAction:r,formEncType:a,text:n,formData:o,json:i}=e;if(!(!t||!r||!a)){if(n!=null)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:n};if(o!=null)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:i,text:void 0}}}function nr(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function mi(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function lt(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function pi(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Fe(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function yi(e,t){try{let r=e.sessionStorage.getItem(Ga);if(r){let a=JSON.parse(r);for(let[n,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(n,new Set(o||[]))}}catch{}}function vi(e,t){if(t.size>0){let r={};for(let[a,n]of t)r[a]=[...n];try{e.sessionStorage.setItem(Ga,JSON.stringify(r))}catch(a){ie(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function La(){let e,t,r=new Promise((a,n)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>{n(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Je=d.createContext(null);Je.displayName="DataRouter";var rt=d.createContext(null);rt.displayName="DataRouterState";var nn=d.createContext(!1);function Cr(){return d.useContext(nn)}var Pr=d.createContext({isTransitioning:!1});Pr.displayName="ViewTransition";var Tr=d.createContext(new Map);Tr.displayName="Fetchers";var gi=d.createContext(null);gi.displayName="Await";var Re=d.createContext(null);Re.displayName="Navigation";var zt=d.createContext(null);zt.displayName="Location";var Pe=d.createContext({outlet:null,matches:[],isDataRoute:!1});Pe.displayName="Route";var Mr=d.createContext(null);Mr.displayName="RouteError";var on="REACT_ROUTER_ERROR",wi="REDIRECT",Ei="ROUTE_ERROR_RESPONSE";function Ri(e){if(e.startsWith(`${on}:${wi}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function bi(e){if(e.startsWith(`${on}:${Ei}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new je(t.status,t.statusText,t.data)}catch{}}function Si(e,{relative:t}={}){Y(yt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=d.useContext(Re),{hash:n,pathname:o,search:i}=vt(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:Le([r,o])),a.createHref({pathname:l,search:i,hash:n})}function yt(){return d.useContext(zt)!=null}function xe(){return Y(yt(),"useLocation() may be used only in the context of a <Router> component."),d.useContext(zt).location}var ln="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function sn(e){d.useContext(Re).static||d.useLayoutEffect(e)}function un(){let{isDataRoute:e}=d.useContext(Pe);return e?Ni():Li()}function Li(){Y(yt(),"useNavigate() may be used only in the context of a <Router> component.");let e=d.useContext(Je),{basename:t,navigator:r}=d.useContext(Re),{matches:a}=d.useContext(Pe),{pathname:n}=xe(),o=JSON.stringify(br(a)),i=d.useRef(!1);return sn(()=>{i.current=!0}),d.useCallback((s,u={})=>{if(ie(i.current,ln),!i.current)return;if(typeof s=="number"){r.go(s);return}let h=Ut(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Le([t,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[t,r,o,n,e])}var xi=d.createContext(null);function Ci(e){let t=d.useContext(Pe).outlet;return d.useMemo(()=>t&&d.createElement(xi.Provider,{value:e},t),[t,e])}function cn(){let{matches:e}=d.useContext(Pe);return e[e.length-1]?.params??{}}function vt(e,{relative:t}={}){let{matches:r}=d.useContext(Pe),{pathname:a}=xe(),n=JSON.stringify(br(r));return d.useMemo(()=>Ut(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function Pi(e,t,r){Y(yt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=d.useContext(Re),{matches:n}=d.useContext(Pe),o=n[n.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;{let v=u&&u.path||"";pn(l,!u||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${v}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
3
|
+
|
|
4
|
+
Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}/*`}">.`)}let h=xe(),c;c=h;let y=c.pathname||"/",w=y;if(s!=="/"){let v=s.replace(/^\//,"").split("/");w="/"+y.replace(/^\//,"").split("/").slice(v.length).join("/")}let R=Ae(e,{pathname:w});return ie(u||R!=null,`No routes matched location "${c.pathname}${c.search}${c.hash}" `),ie(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${c.pathname}${c.search}${c.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Oi(R&&R.map(v=>Object.assign({},v,{params:Object.assign({},i,v.params),pathname:Le([s,a.encodeLocation?a.encodeLocation(v.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:Le([s,a.encodeLocation?a.encodeLocation(v.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathnameBase])})),n,r)}function Ti(){let e=Or(),t=Ve(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=d.createElement(d.Fragment,null,d.createElement("p",null,"💿 Hey developer 👋"),d.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",d.createElement("code",{style:o},"ErrorBoundary")," or"," ",d.createElement("code",{style:o},"errorElement")," prop on your route.")),d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},t),r?d.createElement("pre",{style:n},r):null,i)}var Mi=d.createElement(Ti,null),dn=class extends d.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=bi(e.digest);r&&(e=r)}let t=e!==void 0?d.createElement(Pe.Provider,{value:this.props.routeContext},d.createElement(Mr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?d.createElement(_i,{error:e},t):t}};dn.contextType=nn;var or=new WeakMap;function _i({children:e,error:t}){let{basename:r}=d.useContext(Re);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=Ri(t.digest);if(a){let n=or.get(t);if(n)throw n;let o=Ba(a.location,r);if(za&&!or.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw or.set(t,i),i}return d.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Di({routeContext:e,match:t,children:r}){let a=d.useContext(Je);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),d.createElement(Pe.Provider,{value:e},r)}function Oi(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,o=a?.errors;if(o!=null){let h=n.findIndex(c=>c.route.id&&o?.[c.route.id]!==void 0);Y(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,h+1))}let i=!1,l=-1;if(r&&a){i=a.renderFallback;for(let h=0;h<n.length;h++){let c=n[h];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(l=h),c.route.id){let{loaderData:y,errors:w}=a,R=c.route.loader&&!y.hasOwnProperty(c.route.id)&&(!w||w[c.route.id]===void 0);if(c.route.lazy||R){r.isStatic&&(i=!0),l>=0?n=n.slice(0,l+1):n=[n[0]];break}}}}let s=r?.onError,u=a&&s?(h,c)=>{s(h,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:pt(a.matches),errorInfo:c})}:void 0;return n.reduceRight((h,c,y)=>{let w,R=!1,b=null,v=null;a&&(w=o&&c.route.id?o[c.route.id]:void 0,b=c.route.errorElement||Mi,i&&(l<0&&y===0?(pn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,v=null):l===y&&(R=!0,v=c.route.hydrateFallbackElement||null)));let C=t.concat(n.slice(0,y+1)),S=()=>{let T;return w?T=b:R?T=v:c.route.Component?T=d.createElement(c.route.Component,null):c.route.element?T=c.route.element:T=h,d.createElement(Di,{match:c,routeContext:{outlet:h,matches:C,isDataRoute:a!=null},children:T})};return a&&(c.route.ErrorBoundary||c.route.errorElement||y===0)?d.createElement(dn,{location:a.location,revalidation:a.revalidation,component:b,error:w,children:S(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:u}):S()},null)}function _r(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fn(e){let t=d.useContext(Je);return Y(t,_r(e)),t}function Ge(e){let t=d.useContext(rt);return Y(t,_r(e)),t}function ki(e){let t=d.useContext(Pe);return Y(t,_r(e)),t}function gt(e){let t=ki(e),r=t.matches[t.matches.length-1];return Y(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Fi(){return gt("useRouteId")}function Ai(){return Ge("useNavigation").navigation}function Dr(){let{matches:e,loaderData:t}=Ge("useMatches");return d.useMemo(()=>e.map(r=>Ia(r,t)),[e,t])}function hn(){let e=Ge("useLoaderData"),t=gt("useLoaderData");return e.loaderData[t]}function bs(e){return Ge("useRouteLoaderData").loaderData[e]}function mn(){let e=Ge("useActionData"),t=gt("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Or(){let e=d.useContext(Mr),t=Ge("useRouteError"),r=gt("useRouteError");return e!==void 0?e:t.errors?.[r]}var Ii=0;function Ss(e){let{router:t,basename:r}=fn("useBlocker"),a=Ge("useBlocker"),[n,o]=d.useState(""),i=d.useCallback(l=>{if(typeof e!="function")return!!e;if(r==="/")return e(l);let{currentLocation:s,nextLocation:u,historyAction:h}=l;return e({currentLocation:{...s,pathname:Ee(s.pathname,r)||s.pathname},nextLocation:{...u,pathname:Ee(u.pathname,r)||u.pathname},historyAction:h})},[r,e]);return d.useEffect(()=>{let l=String(++Ii);return o(l),()=>t.deleteBlocker(l)},[t]),d.useEffect(()=>{n!==""&&t.getBlocker(n,i)},[t,n,i]),n&&a.blockers.has(n)?a.blockers.get(n):Qe}function Ni(){let{router:e}=fn("useNavigate"),t=gt("useNavigate"),r=d.useRef(!1);return sn(()=>{r.current=!0}),d.useCallback(async(n,o={})=>{ie(r.current,ln),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var xa={};function pn(e,t,r){!t&&!xa[e]&&(xa[e]=!0,ie(!1,r))}var Ca={};function hr(e,t){!e&&!Ca[t]&&(Ca[t]=!0,console.warn(t))}var $i="useOptimistic",Pa=lo[$i],ji=()=>{};function Ui(e){return Pa?Pa(e):[e,ji]}function Ls(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&ie(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:d.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&ie(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:d.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&ie(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:d.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var xs=["HydrateFallback","hydrateFallbackElement"],Hi=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function Cs({router:e,flushSync:t,onError:r,unstable_useTransitions:a}){a=Cr()||a;let[o,i]=d.useState(e.state),[l,s]=Ui(o),[u,h]=d.useState(),[c,y]=d.useState({isTransitioning:!1}),[w,R]=d.useState(),[b,v]=d.useState(),[C,S]=d.useState(),T=d.useRef(new Map),_=d.useCallback((N,{deletedFetchers:K,newErrors:te,flushSync:G,viewTransitionOpts:ne})=>{te&&r&&Object.values(te).forEach(B=>r(B,{location:N.location,params:N.matches[0]?.params??{},unstable_pattern:pt(N.matches)})),N.fetchers.forEach((B,X)=>{B.data!==void 0&&T.current.set(X,B.data)}),K.forEach(B=>T.current.delete(B)),hr(G===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let le=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(hr(ne==null||le,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!ne||!le){t&&G?t(()=>i(N)):a===!1?i(N):d.startTransition(()=>{a===!0&&s(B=>Ta(B,N)),i(N)});return}if(t&&G){t(()=>{b&&(w?.resolve(),b.skipTransition()),y({isTransitioning:!0,flushSync:!0,currentLocation:ne.currentLocation,nextLocation:ne.nextLocation})});let B=e.window.document.startViewTransition(()=>{t(()=>i(N))});B.finished.finally(()=>{t(()=>{R(void 0),v(void 0),h(void 0),y({isTransitioning:!1})})}),t(()=>v(B));return}b?(w?.resolve(),b.skipTransition(),S({state:N,currentLocation:ne.currentLocation,nextLocation:ne.nextLocation})):(h(N),y({isTransitioning:!0,flushSync:!1,currentLocation:ne.currentLocation,nextLocation:ne.nextLocation}))},[e.window,t,b,w,a,s,r]);d.useLayoutEffect(()=>e.subscribe(_),[e,_]);let M=l.initialized;d.useLayoutEffect(()=>{!M&&e.state.initialized&&_(e.state,{deletedFetchers:[],flushSync:!1,newErrors:null})},[M,_,e.state]),d.useEffect(()=>{c.isTransitioning&&!c.flushSync&&R(new Hi)},[c]),d.useEffect(()=>{if(w&&u&&e.window){let N=u,K=w.promise,te=e.window.document.startViewTransition(async()=>{a===!1?i(N):d.startTransition(()=>{a===!0&&s(G=>Ta(G,N)),i(N)}),await K});te.finished.finally(()=>{R(void 0),v(void 0),h(void 0),y({isTransitioning:!1})}),v(te)}},[u,w,e.window,a,s]),d.useEffect(()=>{w&&u&&l.location.key===u.location.key&&w.resolve()},[w,b,l.location,u]),d.useEffect(()=>{!c.isTransitioning&&C&&(h(C.state),y({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),S(void 0))},[c.isTransitioning,C]);let D=d.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:N=>e.navigate(N),push:(N,K,te)=>e.navigate(N,{state:K,preventScrollReset:te?.preventScrollReset}),replace:(N,K,te)=>e.navigate(N,{replace:!0,state:K,preventScrollReset:te?.preventScrollReset})}),[e]),O=e.basename||"/",E=d.useMemo(()=>({router:e,navigator:D,static:!1,basename:O,onError:r}),[e,D,O,r]);return d.createElement(d.Fragment,null,d.createElement(Je.Provider,{value:E},d.createElement(rt.Provider,{value:l},d.createElement(Tr.Provider,{value:T.current},d.createElement(Pr.Provider,{value:c},d.createElement(Wi,{basename:O,location:l.location,navigationType:l.historyAction,navigator:D,unstable_useTransitions:a},d.createElement(zi,{routes:e.routes,future:e.future,state:l,isStatic:!1,onError:r})))))),null)}function Ta(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var zi=d.memo(Bi);function Bi({routes:e,future:t,state:r,isStatic:a,onError:n}){return Pi(e,void 0,{state:r,isStatic:a,onError:n})}function Ps(e){return Ci(e.context)}function Wi({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,unstable_useTransitions:i}){Y(!yt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=d.useMemo(()=>({basename:l,navigator:n,static:o,unstable_useTransitions:i,future:{}}),[l,n,o,i]);typeof r=="string"&&(r=_e(r));let{pathname:u="/",search:h="",hash:c="",state:y=null,key:w="default",unstable_mask:R}=r,b=d.useMemo(()=>{let v=Ee(u,l);return v==null?null:{location:{pathname:v,search:h,hash:c,state:y,key:w,unstable_mask:R},navigationType:a}},[l,u,h,c,y,w,a,R]);return ie(b!=null,`<Router basename="${l}"> is not able to match the URL "${u}${h}${c}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:d.createElement(Re.Provider,{value:s},d.createElement(zt.Provider,{children:t,value:b}))}function Yi(){return{params:cn(),loaderData:hn(),actionData:mn(),matches:Dr()}}function Ts(e){return function(){const r=Yi();return d.createElement(e,r)}}function Vi(){return{params:cn(),loaderData:hn(),actionData:mn(),error:Or()}}function Ms(e){return function(){const r=Vi();return d.createElement(e,r)}}var kt="get",Ft="application/x-www-form-urlencoded";function Bt(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Ji(e){return Bt(e)&&e.tagName.toLowerCase()==="button"}function Gi(e){return Bt(e)&&e.tagName.toLowerCase()==="form"}function Ki(e){return Bt(e)&&e.tagName.toLowerCase()==="input"}function Xi(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qi(e,t){return e.button===0&&(!t||t==="_self")&&!Xi(e)}function mr(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function Qi(e,t){let r=mr(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var Pt=null;function Zi(){if(Pt===null)try{new FormData(document.createElement("form"),0),Pt=!1}catch{Pt=!0}return Pt}var el=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ir(e){return e!=null&&!el.has(e)?(ie(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ft}"`),null):e}function tl(e,t){let r,a,n,o,i;if(Gi(e)){let l=e.getAttribute("action");a=l?Ee(l,t):null,r=e.getAttribute("method")||kt,n=ir(e.getAttribute("enctype"))||Ft,o=new FormData(e)}else if(Ji(e)||Ki(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(a=s?Ee(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||kt,n=ir(e.getAttribute("formenctype"))||ir(l.getAttribute("enctype"))||Ft,o=new FormData(l,e),!Zi()){let{name:u,type:h,value:c}=e;if(h==="image"){let y=u?`${u}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else u&&o.append(u,c)}}else{if(Bt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=kt,a=null,n=Ft,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var rl=-1,al=-2,nl=-3,ol=-4,il=-5,ll=-6,sl=-7,ul="B",cl="D",yn="E",dl="M",fl="N",vn="P",hl="R",ml="S",pl="Y",yl="U",vl="Z",gn=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],wn=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function gl(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,a){const n=e.decode(r,{stream:!0}),o=(t+n).split(`
|
|
5
|
+
`);t=o.pop()||"";for(const i of o)a.enqueue(i)},flush(r){t&&r.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Tt=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function pr(e){const{hydrated:t,values:r}=this;if(typeof e=="number")return Ma.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;const a=r.length;for(const n of e)r.push(n);return t.length=r.length,Ma.call(this,a)}function Ma(e){const{hydrated:t,values:r,deferred:a,plugins:n}=this;let o;const i=[[e,s=>{o=s}]];let l=[];for(;i.length>0;){const[s,u]=i.pop();switch(s){case sl:u(void 0);continue;case il:u(null);continue;case al:u(NaN);continue;case ll:u(1/0);continue;case nl:u(-1/0);continue;case ol:u(-0);continue}if(t[s]){u(t[s]);continue}const h=r[s];if(!h||typeof h!="object"){t[s]=h,u(h);continue}if(Array.isArray(h))if(typeof h[0]=="string"){const[c,y,w]=h;switch(c){case cl:u(t[s]=new Date(y));continue;case yl:u(t[s]=new URL(y));continue;case ul:u(t[s]=BigInt(y));continue;case hl:u(t[s]=new RegExp(y,w));continue;case pl:u(t[s]=Symbol.for(y));continue;case ml:const R=new Set;t[s]=R;for(let _=h.length-1;_>0;_--)i.push([h[_],M=>{R.add(M)}]);u(R);continue;case dl:const b=new Map;t[s]=b;for(let _=h.length-2;_>0;_-=2){const M=[];i.push([h[_+1],D=>{M[1]=D}]),i.push([h[_],D=>{M[0]=D}]),l.push(()=>{b.set(M[0],M[1])})}u(b);continue;case fl:const v=Object.create(null);t[s]=v;for(const _ of Object.keys(y).reverse()){const M=[];i.push([y[_],D=>{M[1]=D}]),i.push([Number(_.slice(1)),D=>{M[0]=D}]),l.push(()=>{v[M[0]]=M[1]})}u(v);continue;case vn:if(t[y])u(t[s]=t[y]);else{const _=new wn;a[y]=_,u(t[s]=_.promise)}continue;case yn:const[,C,S]=h;let T=S&&Tt&&gn.includes(S)&&S in Tt&&typeof Tt[S]=="function"?new Tt[S](C):new Error(C);t[s]=T,u(T);continue;case vl:u(t[s]=t[y]);continue;default:if(Array.isArray(n)){const _=[],M=h.slice(1);for(let D=0;D<M.length;D++){const O=M[D];i.push([O,E=>{_[D]=E}])}l.push(()=>{for(const D of n){const O=D(h[0],..._);if(O){u(t[s]=O.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{const c=[];t[s]=c;for(let y=0;y<h.length;y++){const w=h[y];w!==rl&&i.push([w,R=>{c[y]=R}])}u(c);continue}else{const c={};t[s]=c;for(const y of Object.keys(h).reverse()){const w=[];i.push([h[y],R=>{w[1]=R}]),i.push([Number(y.slice(1)),R=>{w[0]=R}]),l.push(()=>{c[w[0]]=w[1]})}u(c);continue}}for(;l.length>0;)l.pop()();return o}async function wl(e,t){const{plugins:r}=t??{},a=new wn,n=e.pipeThrough(gl()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},i=await El.call(o,n);let l=a.promise;return i.done?a.resolve():l=Rl.call(o,n).then(a.resolve).catch(s=>{for(const u of Object.values(o.deferred))u.reject(s);a.reject(s)}),{done:l.then(()=>n.closed),value:i.value}}async function El(e){const t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch{throw new SyntaxError}return{done:t.done,value:pr.call(this,r)}}async function Rl(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case vn:{const a=r.indexOf(":"),n=Number(r.slice(1,a)),o=this.deferred[n];if(!o)throw new Error(`Deferred ID ${n} not found in stream`);const i=r.slice(a+1);let l;try{l=JSON.parse(i)}catch{throw new SyntaxError}const s=pr.call(this,l);o.resolve(s);break}case yn:{const a=r.indexOf(":"),n=Number(r.slice(1,a)),o=this.deferred[n];if(!o)throw new Error(`Deferred ID ${n} not found in stream`);const i=r.slice(a+1);let l;try{l=JSON.parse(i)}catch{throw new SyntaxError}const s=pr.call(this,l);o.reject(s);break}default:throw new SyntaxError}t=await e.read()}}async function bl(e){let t={signal:e.signal};if(e.method!=="GET"){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var Sl={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Ll=/[&><\u2028\u2029]/g;function yr(e){return e.replace(Ll,t=>Sl[t])}function we(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var vr=Symbol("SingleFetchRedirect"),En=class extends Error{},xl=202,Cl=new Set([100,101,204,205]);function _s(e,t,r,a,n,o){let i=Pl(e,l=>{let s=t.routes[l.route.id];we(s,"Route not found in manifest");let u=r[l.route.id];return{hasLoader:s.hasLoader,hasClientLoader:s.hasClientLoader,hasShouldRevalidate:!!u?.shouldRevalidate}},Fl,a,n,o);return async l=>l.runClientMiddleware(i)}function Pl(e,t,r,a,n,o,i=()=>!0){return async l=>{let{request:s,matches:u,fetcherKey:h}=l,c=e();if(s.method!=="GET")return Tl(l,r,n,o);let y=u.some(w=>{let{hasLoader:R,hasClientLoader:b}=t(w);return w.shouldCallHandler()&&R&&!b});return!a&&!y?Ml(l,t,r,n,o):h?Ol(l,r,n,o):_l(l,c,t,r,a,n,o,i)}}async function Tl(e,t,r,a){let n=e.matches.find(l=>l.shouldCallHandler());we(n,"No action match found");let o,i=await n.resolve(async l=>await l(async()=>{let{data:u,status:h}=await t(e,r,a,[n.route.id]);return o=h,mt(u,n.route.id)}));return Ht(i.result)||Ve(i.result)||fr(i.result)?{[n.route.id]:i}:{[n.route.id]:{type:i.type,result:Ao(i.result,o)}}}async function Ml(e,t,r,a,n){let o=e.matches.filter(l=>l.shouldCallHandler()),i={};return await Promise.all(o.map(l=>l.resolve(async s=>{try{let{hasClientLoader:u}=t(l),h=l.route.id,c=u?await s(async()=>{let{data:y}=await r(e,a,n,[h]);return mt(y,h)}):await s();i[l.route.id]={type:"data",result:c}}catch(u){i[l.route.id]={type:"error",result:u}}}))),i}async function _l(e,t,r,a,n,o,i,l=()=>!0){let s=new Set,u=!1,h=e.matches.map(()=>_a()),c=_a(),y={},w=Promise.all(e.matches.map(async(b,v)=>b.resolve(async C=>{h[v].resolve();let S=b.route.id,{hasLoader:T,hasClientLoader:_,hasShouldRevalidate:M}=r(b),D=!b.shouldRevalidateArgs||b.shouldRevalidateArgs.actionStatus==null||b.shouldRevalidateArgs.actionStatus<400;if(!b.shouldCallHandler(D)){u||(u=b.shouldRevalidateArgs!=null&&T&&M===!0);return}if(l(b)&&_){T&&(u=!0);try{let E=await C(async()=>{let{data:N}=await a(e,o,i,[S]);return mt(N,S)});y[S]={type:"data",result:E}}catch(E){y[S]={type:"error",result:E}}return}T&&s.add(S);try{let E=await C(async()=>{let N=await c.promise;return mt(N,S)});y[S]={type:"data",result:E}}catch(E){y[S]={type:"error",result:E}}})));if(await Promise.all(h.map(b=>b.promise)),(!t.state.initialized&&t.state.navigation.state==="idle"||s.size===0)&&!window.__reactRouterHdrActive)c.resolve({routes:{}});else{let b=n&&u&&s.size>0?[...s.keys()]:void 0;try{let v=await a(e,o,i,b);c.resolve(v.data)}catch(v){c.reject(v)}}return await w,await Dl(c.promise,e.matches,s,y),y}async function Dl(e,t,r,a){try{let n,o=await e;if("routes"in o){for(let i of t)if(i.route.id in o.routes){let l=o.routes[i.route.id];if("error"in l){n=l.error,a[i.route.id]?.result==null&&(a[i.route.id]={type:"error",result:n});break}}}n!==void 0&&Array.from(r.values()).forEach(i=>{a[i].result instanceof En&&(a[i].result=n)})}catch{}}async function Ol(e,t,r,a){let n=e.matches.find(l=>l.shouldCallHandler());we(n,"No fetcher match found");let o=n.route.id,i=await n.resolve(async l=>l(async()=>{let{data:s}=await t(e,r,a,[o]);return mt(s,o)}));return{[n.route.id]:i}}function kl(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let a of t)a&&r.push(a);for(let a of r)e.searchParams.append("index",a);return e}function kr(e,t,r,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&Ee(n.pathname,t)==="/"?n.pathname=`${Nt(t)}/_root.${a}`:n.pathname=`${Nt(n.pathname)}.${a}`,n}async function Fl(e,t,r,a){let{request:n}=e,o=kr(n.url,t,r,"data");n.method==="GET"&&(o=kl(o),a&&o.searchParams.set("_routes",a.join(",")));let i=await fetch(o,await bl(n));if(i.status>=400&&!i.headers.has("X-Remix-Response"))throw new je(i.status,i.statusText,await i.text());if(i.status===204&&i.headers.has("X-Remix-Redirect"))return{status:xl,data:{redirect:{redirect:i.headers.get("X-Remix-Redirect"),status:Number(i.headers.get("X-Remix-Status")||"302"),revalidate:i.headers.get("X-Remix-Revalidate")==="true",reload:i.headers.get("X-Remix-Reload-Document")==="true",replace:i.headers.get("X-Remix-Replace")==="true"}}};if(Cl.has(i.status)){let l={};return a&&n.method!=="GET"&&(l[a[0]]={data:void 0}),{status:i.status,data:{routes:l}}}we(i.body,"No response body to decode");try{let l=await Al(i.body,window),s;if(n.method==="GET"){let u=l.value;vr in u?s={redirect:u[vr]}:s={routes:u}}else{let u=l.value,h=a?.[0];we(h,"No routeId found for single fetch call decoding"),"redirect"in u?s={redirect:u}:s={routes:{[h]:u}}}return{status:i.status,data:s}}catch{throw new Error("Unable to decode turbo-stream response")}}function Al(e,t){return wl(e,{plugins:[(r,...a)=>{if(r==="SanitizedError"){let[n,o,i]=a,l=Error;n&&gn.includes(n)&&n in t&&typeof t[n]=="function"&&(l=t[n]);let s=new l(o);return s.stack=i,{value:s}}if(r==="ErrorResponse"){let[n,o,i]=a;return{value:new je(o,i,n)}}if(r==="SingleFetchRedirect")return{value:{[vr]:a[0]}};if(r==="SingleFetchClassInstance")return{value:a[0]};if(r==="SingleFetchFallback")return{value:void 0}}]})}function mt(e,t){if("redirect"in e){let{redirect:a,revalidate:n,reload:o,replace:i,status:l}=e.redirect;throw Io(a,{status:l,headers:{...n?{"X-Remix-Revalidate":"yes"}:null,...o?{"X-Remix-Reload-Document":"yes"}:null,...i?{"X-Remix-Replace":"yes"}:null}})}let r=e.routes[t];if(r==null)throw new En(`No result found for routeId "${t}"`);if("error"in r)throw r.error;if("data"in r)return r.data;throw new Error(`Invalid response found for routeId "${t}"`)}function _a(){let e,t,r=new Promise((a,n)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>{n(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}async function Rn(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Il(e,t,r){let a=e.map(o=>{let i=t[o.route.id],l=r.routes[o.route.id];return[l&&l.css?l.css.map(s=>({rel:"stylesheet",href:s})):[],i?.links?.()||[]]}).flat(2),n=Ar(e,r);return xn(a,n)}function bn(e){return e.css?e.css.map(t=>({rel:"stylesheet",href:t})):[]}async function Nl(e){if(!e.css)return;let t=bn(e);await Promise.all(t.map(Ln))}async function Sn(e,t){if(!e.css&&!t.links||!zl())return;let r=[];if(e.css&&r.push(...bn(e)),t.links&&r.push(...t.links()),r.length===0)return;let a=[];for(let n of r)!Fr(n)&&n.rel==="stylesheet"&&a.push({...n,rel:"preload",as:"style"});await Promise.all(a.map(Ln))}async function Ln(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let r=document.createElement("link");Object.assign(r,e);function a(){document.head.contains(r)&&document.head.removeChild(r)}r.onload=()=>{a(),t()},r.onerror=()=>{a(),t()},document.head.appendChild(r)})}function Fr(e){return e!=null&&typeof e.page=="string"}function $l(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function jl(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await Rn(o,r);return i.links?i.links():[]}return[]}));return xn(a.flat(1).filter($l).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function Da(e,t,r,a,n,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{let h=a.routes[s.route.id];if(!h||!h.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let c=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof c=="boolean")return c}return!0}):[]}function Ar(e,t,{includeHydrateFallback:r}={}){return Ul(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function Ul(e){return[...new Set(e)]}function Hl(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function xn(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Fr(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify(Hl(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}var Mt;function zl(){if(Mt!==void 0)return Mt;let e=document.createElement("link");return Mt=e.relList.supports("preload"),e=null,Mt}function Bl(){return d.createElement(gr,{title:"Loading...",renderScripts:!0},d.createElement("script",{dangerouslySetInnerHTML:{__html:`
|
|
6
|
+
console.log(
|
|
7
|
+
"💿 Hey developer 👋. You can provide a way better UX than this " +
|
|
8
|
+
"when your app is loading JS modules and/or running \`clientLoader\` " +
|
|
9
|
+
"functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " +
|
|
10
|
+
"for more information."
|
|
11
|
+
);
|
|
12
|
+
`}}))}function Cn(e){let t={};return Object.values(e).forEach(r=>{if(r){let a=r.parentId||"";t[a]||(t[a]=[]),t[a].push(r)}}),t}function Wl(e,t,r){let a=Pn(t),n=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?Bl:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id==="root"?()=>d.createElement(_n,{error:Or()}):void 0;return e.id==="root"&&t.Layout?{...a?{element:d.createElement(t.Layout,null,d.createElement(a,null))}:{Component:a},...o?{errorElement:d.createElement(t.Layout,null,d.createElement(o,null))}:{ErrorBoundary:o},...n?{hydrateFallbackElement:d.createElement(t.Layout,null,d.createElement(n,null))}:{HydrateFallback:n}}:{Component:a,ErrorBoundary:o,HydrateFallback:n}}function Ds(e,t,r,a,n,o){return Ir(t,r,a,n,o,"",Cn(t),e)}function _t(e,t){if(e==="loader"&&!t.hasLoader||e==="action"&&!t.hasAction){let a=`You are trying to call ${e==="action"?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw console.error(a),new je(400,"Bad Request",new Error(a),!0)}}function lr(e,t){let r=e==="clientAction"?"a":"an",a=`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`;throw console.error(a),new je(405,"Method Not Allowed",new Error(a),!0)}function Ir(e,t,r,a,n,o="",i=Cn(e),l){return(i[o]||[]).map(s=>{let u=t[s.id];function h(S){return we(typeof S=="function","No single fetch function available for route handler"),S()}function c(S){return s.hasLoader?h(S):Promise.resolve(null)}function y(S){if(!s.hasAction)throw lr("action",s.id);return h(S)}function w(S){import(S)}function R(S){S.clientActionModule&&w(S.clientActionModule),S.clientLoaderModule&&w(S.clientLoaderModule)}async function b(S){let T=t[s.id],_=T?Sn(s,T):Promise.resolve();try{return S()}finally{await _}}let v={id:s.id,index:s.index,path:s.path};if(u){Object.assign(v,{...v,...Wl(s,u,n),middleware:u.clientMiddleware,handle:u.handle,shouldRevalidate:Oa(v.path,u,s,a,l)});let S=r&&r.loaderData&&s.id in r.loaderData,T=S?r?.loaderData?.[s.id]:void 0,_=r&&r.errors&&s.id in r.errors,M=_?r?.errors?.[s.id]:void 0,D=l==null&&(u.clientLoader?.hydrate===!0||!s.hasLoader);v.loader=async({request:O,params:E,context:N,unstable_pattern:K,unstable_url:te},G)=>{try{return await b(async()=>(we(u,"No `routeModule` available for critical-route loader"),u.clientLoader?u.clientLoader({request:O,params:E,context:N,unstable_pattern:K,unstable_url:te,async serverLoader(){if(_t("loader",s),D){if(S)return T;if(_)throw M}return c(G)}}):c(G)))}finally{D=!1}},v.loader.hydrate=Jl(s.id,u.clientLoader,s.hasLoader,n),v.action=({request:O,params:E,context:N,unstable_pattern:K,unstable_url:te},G)=>b(async()=>{if(we(u,"No `routeModule` available for critical-route action"),!u.clientAction){if(n)throw lr("clientAction",s.id);return y(G)}return u.clientAction({request:O,params:E,context:N,unstable_pattern:K,unstable_url:te,async serverAction(){return _t("action",s),y(G)}})})}else{s.hasClientLoader||(v.loader=(_,M)=>b(()=>c(M))),s.hasClientAction||(v.action=(_,M)=>b(()=>{if(n)throw lr("clientAction",s.id);return y(M)}));let S;async function T(){return S?await S:(S=(async()=>{(s.clientLoaderModule||s.clientActionModule)&&await new Promise(M=>setTimeout(M,0));let _=Vl(s,t);return R(s),await _})(),await S)}v.lazy={loader:s.hasClientLoader?async()=>{let{clientLoader:_}=s.clientLoaderModule?await import(s.clientLoaderModule):await T();return we(_,"No `clientLoader` export found"),(M,D)=>_({...M,async serverLoader(){return _t("loader",s),c(D)}})}:void 0,action:s.hasClientAction?async()=>{let _=s.clientActionModule?import(s.clientActionModule):T();R(s);let{clientAction:M}=await _;return we(M,"No `clientAction` export found"),(D,O)=>M({...D,async serverAction(){return _t("action",s),y(O)}})}:void 0,middleware:s.hasClientMiddleware?async()=>{let{clientMiddleware:_}=s.clientMiddlewareModule?await import(s.clientMiddlewareModule):await T();return we(_,"No `clientMiddleware` export found"),_}:void 0,shouldRevalidate:async()=>{let _=await T();return Oa(v.path,_,s,a,l)},handle:async()=>(await T()).handle,Component:async()=>(await T()).Component,ErrorBoundary:s.hasErrorBoundary?async()=>(await T()).ErrorBoundary:void 0}}let C=Ir(e,t,r,a,n,s.id,i,l);return C.length>0&&(v.children=C),v})}function Oa(e,t,r,a,n){if(n)return Yl(r.id,t.shouldRevalidate,n);if(!a&&r.hasLoader&&!r.hasClientLoader){let o=e?ja(e)[1].map(l=>l.paramName):[];const i=l=>o.some(s=>l.currentParams[s]!==l.nextParams[s]);if(t.shouldRevalidate){let l=t.shouldRevalidate;return s=>l({...s,defaultShouldRevalidate:i(s)})}else return l=>i(l)}return t.shouldRevalidate}function Yl(e,t,r){let a=!1;return n=>a?t?t(n):n.defaultShouldRevalidate:(a=!0,r.has(e))}async function Vl(e,t){let r=Rn(e,t),a=Nl(e),n=await r;return await Promise.all([a,Sn(e,n)]),{Component:Pn(n),ErrorBoundary:n.ErrorBoundary,clientMiddleware:n.clientMiddleware,clientAction:n.clientAction,clientLoader:n.clientLoader,handle:n.handle,links:n.links,meta:n.meta,shouldRevalidate:n.shouldRevalidate}}function Pn(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function Jl(e,t,r,a){return a&&e!=="root"||t!=null&&(t.hydrate===!0||r!==!0)}var At=new Set,Gl=1e3,$t=new Set,Kl=7680;function Nr(e,t){return e.mode==="lazy"&&t===!0}function Xl({sri:e,...t},r){let a=new Set(r.state.matches.map(l=>l.route.id)),n=r.state.location.pathname.split("/").filter(Boolean),o=["/"];for(n.pop();n.length>0;)o.push(`/${n.join("/")}`),n.pop();o.forEach(l=>{let s=Ae(r.routes,l,r.basename);s&&s.forEach(u=>a.add(u.route.id))});let i=[...a].reduce((l,s)=>Object.assign(l,{[s]:t.routes[s]}),{});return{...t,routes:i,sri:e?!0:void 0}}function Os(e,t,r,a,n,o,i){if(Nr(n,a))return async({path:l,patch:s,signal:u,fetcherKey:h})=>{if($t.has(l))return;let{state:c}=e();await Tn([l],h?window.location.href:Te(c.navigation.location||c.location),t,r,a,o,i,n.manifestPath,s,u)}}function ks(e,t,r,a,n,o){d.useEffect(()=>{if(!Nr(n,a)||window.navigator?.connection?.saveData===!0)return;function i(h){let c=h.tagName==="FORM"?h.getAttribute("action"):h.getAttribute("href");if(!c)return;let y=h.tagName==="A"?h.pathname:new URL(c,window.location.origin).pathname;$t.has(y)||At.add(y)}async function l(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(i);let h=Array.from(At.keys()).filter(c=>$t.has(c)?(At.delete(c),!1):!0);if(h.length!==0)try{await Tn(h,null,t,r,a,o,e.basename,n.manifestPath,e.patchRoutes)}catch(c){console.error("Failed to fetch manifest patches",c)}}let s=Zl(l,100);l();let u=new MutationObserver(()=>s());return u.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>u.disconnect()},[a,o,t,r,e,n])}function ql(e,t){let r=e||"/__manifest";return t==null?r:Le([t,r])}var sr="react-router-manifest-version";async function Tn(e,t,r,a,n,o,i,l,s,u){const h=new URLSearchParams;h.set("paths",e.sort().join(",")),h.set("version",r.version);let c=new URL(ql(l,i),window.location.origin);if(c.search=h.toString(),c.toString().length>Kl){At.clear();return}let y;try{let v=await fetch(c,{signal:u});if(v.ok){if(v.status===204&&v.headers.has("X-Remix-Reload-Document")){if(!t){console.warn("Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.");return}try{if(sessionStorage.getItem(sr)===r.version){console.error("Unable to discover routes due to manifest version mismatch.");return}sessionStorage.setItem(sr,r.version)}catch{}window.location.href=t,console.warn("Detected manifest version mismatch, reloading..."),await new Promise(()=>{})}else if(v.status>=400)throw new Error(await v.text())}else throw new Error(`${v.status} ${v.statusText}`);try{sessionStorage.removeItem(sr)}catch{}y=await v.json()}catch(v){if(u?.aborted)return;throw v}let w=new Set(Object.keys(r.routes)),R=Object.values(y).reduce((v,C)=>(C&&!w.has(C.id)&&(v[C.id]=C),v),{});Object.assign(r.routes,R),e.forEach(v=>Ql(v,$t));let b=new Set;Object.values(R).forEach(v=>{v&&(!v.parentId||!R[v.parentId])&&b.add(v.parentId)}),b.forEach(v=>s(v||null,Ir(R,a,null,n,o,v)))}function Ql(e,t){if(t.size>=Gl){let r=t.values().next().value;t.delete(r)}t.add(e)}function Zl(e,t){let r;return(...a)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...a),t)}}function Wt(){let e=d.useContext(Je);return we(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Yt(){let e=d.useContext(rt);return we(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Vt=d.createContext(void 0);Vt.displayName="FrameworkContext";function Ke(){let e=d.useContext(Vt);return we(e,"You must render this element inside a <HydratedRouter> element"),e}function es(e,t){let r=d.useContext(Vt),[a,n]=d.useState(!1),[o,i]=d.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:h,onTouchStart:c}=t,y=d.useRef(null);d.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let b=C=>{C.forEach(S=>{i(S.isIntersecting)})},v=new IntersectionObserver(b,{threshold:.5});return y.current&&v.observe(y.current),()=>{v.disconnect()}}},[e]),d.useEffect(()=>{if(a){let b=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(b)}}},[a]);let w=()=>{n(!0)},R=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,y,{}]:[o,y,{onFocus:st(l,w),onBlur:st(s,R),onMouseEnter:st(u,w),onMouseLeave:st(h,R),onTouchStart:st(c,w)}]:[!1,y,{}]}function st(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function $r(e,t,r){if(r&&!jt)return[e[0]];if(t){let a=e.findIndex(n=>t[n.route.id]!==void 0);return e.slice(0,a+1)}return e}var ka="data-react-router-critical-css";function Fs({nonce:e,crossOrigin:t}){let{isSpaMode:r,manifest:a,routeModules:n,criticalCss:o}=Ke(),{errors:i,matches:l}=Yt(),s=$r(l,i,r),u=d.useMemo(()=>Il(s,n,a),[s,n,a]);return d.createElement(d.Fragment,null,typeof o=="string"?d.createElement("style",{[ka]:"",nonce:e,dangerouslySetInnerHTML:{__html:o}}):null,typeof o=="object"?d.createElement("link",{[ka]:"",rel:"stylesheet",href:o.href,nonce:e,crossOrigin:t}):null,u.map(({key:h,link:c})=>Fr(c)?d.createElement(Mn,{key:h,nonce:e,...c,crossOrigin:c.crossOrigin??t}):d.createElement("link",{key:h,nonce:e,...c,crossOrigin:c.crossOrigin??t})))}function Mn({page:e,...t}){let r=Cr(),{router:a}=Wt(),n=d.useMemo(()=>Ae(a.routes,e,a.basename),[a.routes,e,a.basename]);return n?r?d.createElement(rs,{page:e,matches:n,...t}):d.createElement(as,{page:e,matches:n,...t}):null}function ts(e){let{manifest:t,routeModules:r}=Ke(),[a,n]=d.useState([]);return d.useEffect(()=>{let o=!1;return jl(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function rs({page:e,matches:t,...r}){let a=xe(),{future:n}=Ke(),{basename:o}=Wt(),i=d.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let l=kr(e,o,n.unstable_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let h of t)typeof h.route.shouldRevalidate=="function"?s=!0:u.push(h.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[o,n.unstable_trailingSlashAwareDataRequests,e,a,t]);return d.createElement(d.Fragment,null,i.map(l=>d.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function as({page:e,matches:t,...r}){let a=xe(),{future:n,manifest:o,routeModules:i}=Ke(),{basename:l}=Wt(),{loaderData:s,matches:u}=Yt(),h=d.useMemo(()=>Da(e,t,u,o,a,"data"),[e,t,u,o,a]),c=d.useMemo(()=>Da(e,t,u,o,a,"assets"),[e,t,u,o,a]),y=d.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let b=new Set,v=!1;if(t.forEach(S=>{let T=o.routes[S.route.id];!T||!T.hasLoader||(!h.some(_=>_.route.id===S.route.id)&&S.route.id in s&&i[S.route.id]?.shouldRevalidate||T.hasClientLoader?v=!0:b.add(S.route.id))}),b.size===0)return[];let C=kr(e,l,n.unstable_trailingSlashAwareDataRequests,"data");return v&&b.size>0&&C.searchParams.set("_routes",t.filter(S=>b.has(S.route.id)).map(S=>S.route.id).join(",")),[C.pathname+C.search]},[l,n.unstable_trailingSlashAwareDataRequests,s,a,o,h,t,e,i]),w=d.useMemo(()=>Ar(c,o),[c,o]),R=ts(c);return d.createElement(d.Fragment,null,y.map(b=>d.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...r})),w.map(b=>d.createElement("link",{key:b,rel:"modulepreload",href:b,...r})),R.map(({key:b,link:v})=>d.createElement("link",{key:b,nonce:r.nonce,...v,crossOrigin:v.crossOrigin??r.crossOrigin})))}function As(){let{isSpaMode:e,routeModules:t}=Ke(),{errors:r,matches:a,loaderData:n}=Yt(),o=xe(),i=$r(a,r,e),l=null;r&&(l=r[i[i.length-1].route.id]);let s=[],u=null,h=[];for(let c=0;c<i.length;c++){let y=i[c],w=y.route.id,R=n[w],b=y.params,v=t[w],C=[],S={id:w,data:R,loaderData:R,meta:[],params:y.params,pathname:y.pathname,handle:y.route.handle,error:l};if(h[c]=S,v?.meta?C=typeof v.meta=="function"?v.meta({data:R,loaderData:R,params:b,location:o,matches:h,error:l}):Array.isArray(v.meta)?[...v.meta]:v.meta:u&&(C=[...u]),C=C||[],!Array.isArray(C))throw new Error("The route at "+y.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
|
|
13
|
+
|
|
14
|
+
To reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta`);S.meta=C,h[c]=S,s=[...C],u=s}return d.createElement(d.Fragment,null,s.flat().map(c=>{if(!c)return null;if("tagName"in c){let{tagName:y,...w}=c;if(!ns(y))return console.warn(`A meta object uses an invalid tagName: ${y}. Expected either 'link' or 'meta'`),null;let R=y;return d.createElement(R,{key:JSON.stringify(w),...w})}if("title"in c)return d.createElement("title",{key:"title"},String(c.title));if("charset"in c&&(c.charSet??(c.charSet=c.charset),delete c.charset),"charSet"in c&&c.charSet!=null)return typeof c.charSet=="string"?d.createElement("meta",{key:"charSet",charSet:c.charSet}):null;if("script:ld+json"in c)try{let y=JSON.stringify(c["script:ld+json"]);return d.createElement("script",{key:`script:ld+json:${y}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:yr(y)}})}catch{return null}return d.createElement("meta",{key:JSON.stringify(c),...c})}))}function ns(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}var jt=!1;function os(){jt=!0}function is(e){let{manifest:t,serverHandoffString:r,isSpaMode:a,renderMeta:n,routeDiscovery:o,ssr:i}=Ke(),{router:l,static:s,staticContext:u}=Wt(),{matches:h}=Yt(),c=Cr(),y=Nr(o,i);n&&(n.didRenderScripts=!0);let w=$r(h,null,a);d.useEffect(()=>{os()},[]);let R=d.useMemo(()=>{if(c)return null;let S=u?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",T=s?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${y?"":`import ${JSON.stringify(t.url)}`};
|
|
15
|
+
${w.map((_,M)=>{let D=`route${M}`,O=t.routes[_.route.id];we(O,`Route ${_.route.id} not found in manifest`);let{clientActionModule:E,clientLoaderModule:N,clientMiddlewareModule:K,hydrateFallbackModule:te,module:G}=O,ne=[...E?[{module:E,varName:`${D}_clientAction`}]:[],...N?[{module:N,varName:`${D}_clientLoader`}]:[],...K?[{module:K,varName:`${D}_clientMiddleware`}]:[],...te?[{module:te,varName:`${D}_HydrateFallback`}]:[],{module:G,varName:`${D}_main`}];if(ne.length===1)return`import * as ${D} from ${JSON.stringify(G)};`;let le=ne.map(X=>`import * as ${X.varName} from "${X.module}";`).join(`
|
|
16
|
+
`),B=`const ${D} = {${ne.map(X=>`...${X.varName}`).join(",")}};`;return[le,B].join(`
|
|
17
|
+
`)}).join(`
|
|
18
|
+
`)}
|
|
19
|
+
${y?`window.__reactRouterManifest = ${JSON.stringify(Xl(t,l),null,2)};`:""}
|
|
20
|
+
window.__reactRouterRouteModules = {${w.map((_,M)=>`${JSON.stringify(_.route.id)}:route${M}`).join(",")}};
|
|
21
|
+
|
|
22
|
+
import(${JSON.stringify(t.entry.module)});`:" ";return d.createElement(d.Fragment,null,d.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:S},type:void 0}),d.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:T},type:"module",async:!0}))},[]),b=jt||c?[]:ls(t.entry.imports.concat(Ar(w,t,{includeHydrateFallback:!0}))),v=typeof t.sri=="object"?t.sri:{};return hr(!c,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),jt||c?null:d.createElement(d.Fragment,null,typeof t.sri=="object"?d.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:v})}}):null,y?null:d.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:v[t.url],suppressHydrationWarning:!0}),d.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:v[t.entry.module],suppressHydrationWarning:!0}),b.map(C=>d.createElement("link",{key:C,rel:"modulepreload",href:C,crossOrigin:e.crossOrigin,integrity:v[C],suppressHydrationWarning:!0})),R)}function ls(e){return[...new Set(e)]}function ss(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Is=class extends d.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error||null,location:e.location}:{error:e.error||t.error,location:t.location}}render(){return this.state.error?d.createElement(_n,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function _n({error:e,isOutsideRemixApp:t}){console.error(e);let r=d.createElement("script",{dangerouslySetInnerHTML:{__html:`
|
|
23
|
+
console.log(
|
|
24
|
+
"💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
|
|
25
|
+
);
|
|
26
|
+
`}});if(Ve(e))return d.createElement(gr,{title:"Unhandled Thrown Response!"},d.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let a;if(e instanceof Error)a=e;else{let n=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(n)}return d.createElement(gr,{title:"Application Error!",isOutsideRemixApp:t},d.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),d.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),r)}function gr({title:e,renderScripts:t,isOutsideRemixApp:r,children:a}){let{routeModules:n}=Ke();return n.root?.Layout&&!r?a:d.createElement("html",{lang:"en"},d.createElement("head",null,d.createElement("meta",{charSet:"utf-8"}),d.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),d.createElement("title",null,e)),d.createElement("body",null,d.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},a,t?d.createElement(is,null):null)))}var us=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{us&&(window.__reactRouterVersion="7.14.2")}catch{}var Dn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,On=d.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,unstable_mask:l,state:s,target:u,to:h,preventScrollReset:c,viewTransition:y,unstable_defaultShouldRevalidate:w,...R},b){let{basename:v,navigator:C,unstable_useTransitions:S}=d.useContext(Re),T=typeof h=="string"&&Dn.test(h),_=Ba(h,v);h=_.to;let M=Si(h,{relative:n}),D=xe(),O=null;if(l){let B=Ut(l,[],D.unstable_mask?D.unstable_mask.pathname:"/",!0);v!=="/"&&(B.pathname=B.pathname==="/"?v:Le([v,B.pathname])),O=C.createHref(B)}let[E,N,K]=es(a,R),te=fs(h,{replace:i,unstable_mask:l,state:s,target:u,preventScrollReset:c,relative:n,viewTransition:y,unstable_defaultShouldRevalidate:w,unstable_useTransitions:S});function G(B){t&&t(B),B.defaultPrevented||te(B)}let ne=!(_.isExternal||o),le=d.createElement("a",{...R,...K,href:(ne?O:void 0)||_.absoluteURL||M,onClick:ne?G:t,ref:ss(b,N),target:u,"data-discover":!T&&r==="render"?"true":void 0});return E&&!T?d.createElement(d.Fragment,null,le,d.createElement(Mn,{page:M})):le});On.displayName="Link";var cs=d.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:l,children:s,...u},h){let c=vt(i,{relative:u.relative}),y=xe(),w=d.useContext(rt),{navigator:R,basename:b}=d.useContext(Re),v=w!=null&&gs(c)&&l===!0,C=R.encodeLocation?R.encodeLocation(c).pathname:c.pathname,S=y.pathname,T=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;r||(S=S.toLowerCase(),T=T?T.toLowerCase():null,C=C.toLowerCase()),T&&b&&(T=Ee(T,b)||T);const _=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let M=S===C||!n&&S.startsWith(C)&&S.charAt(_)==="/",D=T!=null&&(T===C||!n&&T.startsWith(C)&&T.charAt(C.length)==="/"),O={isActive:M,isPending:D,isTransitioning:v},E=M?t:void 0,N;typeof a=="function"?N=a(O):N=[a,M?"active":null,D?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let K=typeof o=="function"?o(O):o;return d.createElement(On,{...u,"aria-current":E,className:N,ref:h,style:K,to:i,viewTransition:l},typeof s=="function"?s(O):s)});cs.displayName="NavLink";var kn=d.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=kt,action:l,onSubmit:s,relative:u,preventScrollReset:h,viewTransition:c,unstable_defaultShouldRevalidate:y,...w},R)=>{let{unstable_useTransitions:b}=d.useContext(Re),v=In(),C=ps(l,{relative:u}),S=i.toLowerCase()==="get"?"get":"post",T=typeof l=="string"&&Dn.test(l),_=M=>{if(s&&s(M),M.defaultPrevented)return;M.preventDefault();let D=M.nativeEvent.submitter,O=D?.getAttribute("formmethod")||i,E=()=>v(D||M.currentTarget,{fetcherKey:t,method:O,navigate:r,replace:n,state:o,relative:u,preventScrollReset:h,viewTransition:c,unstable_defaultShouldRevalidate:y});b&&r!==!1?d.startTransition(()=>E()):E()};return d.createElement("form",{ref:R,method:S,action:C,onSubmit:a?s:_,...w,"data-discover":!T&&e==="render"?"true":void 0})});kn.displayName="Form";function ds({getKey:e,storageKey:t,...r}){let a=d.useContext(Vt),{basename:n}=d.useContext(Re),o=xe(),i=Dr();ys({getKey:e,storageKey:t});let l=d.useMemo(()=>{if(!a||!e)return null;let u=Er(o,i,n,e);return u!==o.key?u:null},[]);if(!a||a.isSpaMode)return null;let s=((u,h)=>{if(!window.history.state||!window.history.state.key){let c=Math.random().toString(32).slice(2);window.history.replaceState({key:c},"")}try{let y=JSON.parse(sessionStorage.getItem(u)||"{}")[h||window.history.state.key];typeof y=="number"&&window.scrollTo(0,y)}catch(c){console.error(c),sessionStorage.removeItem(u)}}).toString();return d.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${yr(JSON.stringify(t||wr))}, ${yr(JSON.stringify(l))})`}})}ds.displayName="ScrollRestoration";function Fn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jt(e){let t=d.useContext(Je);return Y(t,Fn(e)),t}function An(e){let t=d.useContext(rt);return Y(t,Fn(e)),t}function fs(e,{target:t,replace:r,unstable_mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,unstable_defaultShouldRevalidate:s,unstable_useTransitions:u}={}){let h=un(),c=xe(),y=vt(e,{relative:i});return d.useCallback(w=>{if(qi(w,t)){w.preventDefault();let R=r!==void 0?r:Te(c)===Te(y),b=()=>h(e,{replace:R,unstable_mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,unstable_defaultShouldRevalidate:s});u?d.startTransition(()=>b()):b()}},[c,h,y,r,a,n,t,e,o,i,l,s,u])}function Ns(e){ie(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=d.useRef(mr(e)),r=d.useRef(!1),a=xe(),n=d.useMemo(()=>Qi(a.search,r.current?null:t.current),[a.search]),o=un(),i=d.useCallback((l,s)=>{const u=mr(typeof l=="function"?l(new URLSearchParams(n)):l);r.current=!0,o("?"+u,s)},[o,n]);return[n,i]}var hs=0,ms=()=>`__${String(++hs)}__`;function In(){let{router:e}=Jt("useSubmit"),{basename:t}=d.useContext(Re),r=Fi(),a=e.fetch,n=e.navigate;return d.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:h,body:c}=tl(o,t);if(i.navigate===!1){let y=i.fetcherKey||ms();await a(y,r,i.action||l,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:h,body:c,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await n(i.action||l,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:h,body:c,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[a,n,t,r])}function ps(e,{relative:t}={}){let{basename:r}=d.useContext(Re),a=d.useContext(Pe);Y(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...vt(e||".",{relative:t})},i=xe();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(h=>h==="")){l.delete("index"),s.filter(c=>c).forEach(c=>l.append("index",c));let h=l.toString();o.search=h?`?${h}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Le([r,o.pathname])),Te(o)}function $s({key:e}={}){let{router:t}=Jt("useFetcher"),r=An("useFetcher"),a=d.useContext(Tr),n=d.useContext(Pe),o=n.matches[n.matches.length-1]?.route.id;Y(a,"useFetcher must be used inside a FetchersContext"),Y(n,"useFetcher must be used inside a RouteContext"),Y(o!=null,'useFetcher can only be used on routes that contain a unique "id"');let i=d.useId(),[l,s]=d.useState(e||i);e&&e!==l&&s(e);let{deleteFetcher:u,getFetcher:h,resetFetcher:c,fetch:y}=t;d.useEffect(()=>(h(l),()=>u(l)),[u,h,l]);let w=d.useCallback(async(M,D)=>{Y(o,"No routeId available for fetcher.load()"),await y(l,o,M,D)},[l,o,y]),R=In(),b=d.useCallback(async(M,D)=>{await R(M,{...D,navigate:!1,fetcherKey:l})},[l,R]),v=d.useCallback(M=>c(l,M),[c,l]),C=d.useMemo(()=>{let M=d.forwardRef((D,O)=>d.createElement(kn,{...D,navigate:!1,fetcherKey:l,ref:O}));return M.displayName="fetcher.Form",M},[l]),S=r.fetchers.get(l)||Ja,T=a.get(l);return d.useMemo(()=>({Form:C,submit:b,load:w,reset:v,...S,data:T}),[C,b,w,v,S,T])}var wr="react-router-scroll-positions",Dt={};function Er(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:Ee(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function ys({getKey:e,storageKey:t}={}){let{router:r}=Jt("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=An("useScrollRestoration"),{basename:o}=d.useContext(Re),i=xe(),l=Dr(),s=Ai();d.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),vs(d.useCallback(()=>{if(s.state==="idle"){let u=Er(i,l,o,e);Dt[u]=window.scrollY}try{sessionStorage.setItem(t||wr,JSON.stringify(Dt))}catch(u){ie(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(d.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||wr);u&&(Dt=JSON.parse(u))}catch{}},[t]),d.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(Dt,()=>window.scrollY,e?(h,c)=>Er(h,c,o,e):void 0);return()=>u&&u()},[r,o,e]),d.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{ie(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}n!==!0&&window.scrollTo(0,0)}},[i,a,n]))}function vs(e,t){let{capture:r}={};d.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function gs(e,{relative:t}={}){let r=d.useContext(Pr);Y(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Jt("useViewTransitionState"),n=vt(e,{relative:t});if(!r.isTransitioning)return!1;let o=Ee(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=Ee(r.nextLocation.pathname,a)||r.nextLocation.pathname;return It(n.pathname,i)!=null||It(n.pathname,o)!=null}export{Ts as A,Ms as B,is as C,mn as D,je as E,Vt as F,Ss as G,$s as H,lo as I,On as J,Fs as L,As as M,Cl as N,Ps as O,io as R,ds as S,d as a,Y as b,Is as c,Cs as d,Al as e,Ir as f,Rs as g,Os as h,Ve as i,_s as j,Es as k,Ds as l,Ae as m,Ls as n,xs as o,ws as p,bs as q,oo as r,Jl as s,Ns as t,ks as u,un as v,cs as w,Ai as x,Dr as y,xe as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-EVOBXE3Y-CmKRT32p.js";const l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim();const C=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const f=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase());const i=t=>{const e=f(t);return e.charAt(0).toUpperCase()+e.slice(1)};var w={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 h=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};const g=s.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:u,...c},p)=>s.createElement("svg",{ref:p,...w,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",n),...!a&&!h(c)&&{"aria-hidden":"true"},...c},[...u.map(([m,d])=>s.createElement(m,d)),...Array.isArray(a)?a:[a]]));const b=(t,e)=>{const r=s.forwardRef(({className:o,...n},a)=>s.createElement(g,{ref:a,iconNode:e,className:l(`lucide-${C(i(t))}`,`lucide-${t}`,o),...n}));return r.displayName=i(t),r};export{b as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as T,t as st,p as at,J as it}from"./chunk-EVOBXE3Y-CmKRT32p.js";function lt(e,t){return function(o,...n){const s=new URL(e);return s.searchParams.set("code",o.toString()),n.forEach(a=>s.searchParams.append("args[]",a)),`${t} error #${o}; visit ${s} for the full message.`}}const ct=lt("https://base-ui.com/production-error","Base UI"),xe={};function Me(e,t){const r=T.useRef(xe);return r.current===xe&&(r.current=e(t)),r}function Ae(e,t,r,o){const n=Me(_e).current;return ut(n,e,t,r,o)&&Oe(n,[e,t,r,o]),n.callback}function dt(e){const t=Me(_e).current;return mt(t,e)&&Oe(t,e),t.callback}function _e(){return{callback:null,cleanup:null,refs:[]}}function ut(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function mt(e,t){return e.refs.length!==t.length||e.refs.some((r,o)=>r!==t[o])}function Oe(e,t){if(e.refs=t,t.every(r=>r==null)){e.callback=null;return}e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),r!=null){const o=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){const s=t[n];if(s!=null)switch(typeof s){case"function":{const a=s(r);typeof a=="function"&&(o[n]=a);break}case"object":{s.current=r;break}}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){const s=t[n];if(s!=null)switch(typeof s){case"function":{const a=o[n];typeof a=="function"?a():s(null);break}case"object":{s.current=null;break}}}}}}}const ft=parseInt(T.version,10);function bt(e){return ft>=e}function Se(e){if(!T.isValidElement(e))return null;const t=e,r=t.props;return(bt(19)?r?.ref:t.ref)??null}function le(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Sr(){}const Cr=Object.freeze([]),U=Object.freeze({});function pt(e,t){const r={};for(const o in e){const n=e[o];if(t?.hasOwnProperty(o)){const s=t[o](n);s!=null&&Object.assign(r,s);continue}n===!0?r[`data-${o.toLowerCase()}`]="":n&&(r[`data-${o.toLowerCase()}`]=n.toString())}return r}function gt(e,t){return typeof e=="function"?e(t):e}function ht(e,t){return typeof e=="function"?e(t):e}const de={};function je(e,t,r,o,n){if(!r&&!o&&!e)return ee(t);let s=ee(e);return t&&(s=H(s,t)),r&&(s=H(s,r)),o&&(s=H(s,o)),s}function yt(e){if(e.length===0)return de;if(e.length===1)return ee(e[0]);let t=ee(e[0]);for(let r=1;r<e.length;r+=1)t=H(t,e[r]);return t}function ee(e){return ue(e)?{...Ge(e,de)}:kt(e)}function H(e,t){return ue(t)?Ge(t,e):wt(e,t)}function kt(e){const t={...e};for(const r in t){const o=t[r];Le(r,o)&&(t[r]=Ve(o))}return t}function wt(e,t){if(!t)return e;for(const r in t){const o=t[r];switch(r){case"style":{e[r]=le(e.style,o);break}case"className":{e[r]=$e(e.className,o);break}default:Le(r,o)?e[r]=vt(e[r],o):e[r]=o}}return e}function Le(e,t){const r=e.charCodeAt(0),o=e.charCodeAt(1),n=e.charCodeAt(2);return r===111&&o===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function ue(e){return typeof e=="function"}function Ge(e,t){return ue(e)?e(t):e??de}function vt(e,t){return t?e?(...r)=>{const o=r[0];if(Fe(o)){const s=o;We(s);const a=t(...r);return s.baseUIHandlerPrevented||e?.(...r),a}const n=t(...r);return e?.(...r),n}:Ve(t):e}function Ve(e){return e&&((...t)=>{const r=t[0];return Fe(r)&&We(r),e(...t)})}function We(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function $e(e,t){return t?e?t+" "+e:t:e}function Fe(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function xt(e,t,r={}){const o=t.render,n=At(t,r);if(r.enabled===!1)return null;const s=r.state??U;return zt(e,o,n,s)}function At(e,t={}){const{className:r,style:o,render:n}=e,{state:s=U,ref:a,props:f,stateAttributesMapping:c,enabled:m=!0}=t,p=m?gt(r,s):void 0,g=m?ht(o,s):void 0,h=m?pt(s,c):U,z=m&&f?St(f):void 0,y=m?le(h,z)??{}:U;return typeof document<"u"&&(m?Array.isArray(a)?y.ref=dt([y.ref,Se(n),...a]):y.ref=Ae(y.ref,Se(n),a):Ae(null,null)),m?(p!==void 0&&(y.className=$e(y.className,p)),g!==void 0&&(y.style=le(y.style,g)),y):U}function St(e){return Array.isArray(e)?yt(e):je(void 0,e)}const Ct=Symbol.for("react.lazy");function zt(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);const n=je(r,t.props);n.ref=r.ref;let s=t;return s?.$$typeof===Ct&&(s=T.Children.toArray(t)[0]),T.cloneElement(s,n)}if(e&&typeof e=="string")return Pt(e,r);throw new Error(ct(8))}function Pt(e,t){return e==="button"?T.createElement("button",{type:"button",...t,key:t.key}):e==="img"?T.createElement("img",{alt:"",...t,key:t.key}):T.createElement(e,t)}function Be(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Be(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Ue(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Be(e))&&(o&&(o+=" "),o+=t);return o}const Et=(e,t)=>{const r=new Array(e.length+t.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<t.length;o++)r[e.length+o]=t[o];return r},It=(e,t)=>({classGroupId:e,validator:t}),De=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),te="-",Ce=[],Rt="arbitrary..",Tt=e=>{const t=Mt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Nt(a);const f=a.split(te),c=f[0]===""&&f.length>1?1:0;return Ye(f,c,t)},getConflictingClassGroupIds:(a,f)=>{if(f){const c=o[a],m=r[a];return c?m?Et(m,c):c:m||Ce}return r[a]||Ce}}},Ye=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const m=Ye(e,t+1,s);if(m)return m}const a=r.validators;if(a===null)return;const f=t===0?e.join(te):e.slice(t).join(te),c=a.length;for(let m=0;m<c;m++){const p=a[m];if(p.validator(f))return p.classGroupId}},Nt=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),o=t.slice(0,r);return o?Rt+o:void 0})(),Mt=e=>{const{theme:t,classGroups:r}=e;return _t(r,t)},_t=(e,t)=>{const r=De();for(const o in e){const n=e[o];me(n,r,o,t)}return r},me=(e,t,r,o)=>{const n=e.length;for(let s=0;s<n;s++){const a=e[s];Ot(a,t,r,o)}},Ot=(e,t,r,o)=>{if(typeof e=="string"){jt(e,t,r);return}if(typeof e=="function"){Lt(e,t,r,o);return}Gt(e,t,r,o)},jt=(e,t,r)=>{const o=e===""?t:qe(t,e);o.classGroupId=r},Lt=(e,t,r,o)=>{if(Vt(e)){me(e(o),t,r,o);return}t.validators===null&&(t.validators=[]),t.validators.push(It(r,e))},Gt=(e,t,r,o)=>{const n=Object.entries(e),s=n.length;for(let a=0;a<s;a++){const[f,c]=n[a];me(c,qe(t,f),r,o)}},qe=(e,t)=>{let r=e;const o=t.split(te),n=o.length;for(let s=0;s<n;s++){const a=o[s];let f=r.nextPart.get(a);f||(f=De(),r.nextPart.set(a,f)),r=f}return r},Vt=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Wt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),o=Object.create(null);const n=(s,a)=>{r[s]=a,t++,t>e&&(t=0,o=r,r=Object.create(null))};return{get(s){let a=r[s];if(a!==void 0)return a;if((a=o[s])!==void 0)return n(s,a),a},set(s,a){s in r?r[s]=a:n(s,a)}}},ce="!",ze=":",$t=[],Pe=(e,t,r,o,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:o,isExternal:n}),Ft=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=n=>{const s=[];let a=0,f=0,c=0,m;const p=n.length;for(let S=0;S<p;S++){const v=n[S];if(a===0&&f===0){if(v===ze){s.push(n.slice(c,S)),c=S+1;continue}if(v==="/"){m=S;continue}}v==="["?a++:v==="]"?a--:v==="("?f++:v===")"&&f--}const g=s.length===0?n:n.slice(c);let h=g,z=!1;g.endsWith(ce)?(h=g.slice(0,-1),z=!0):g.startsWith(ce)&&(h=g.slice(1),z=!0);const y=m&&m>c?m-c:void 0;return Pe(s,z,h,y)};if(t){const n=t+ze,s=o;o=a=>a.startsWith(n)?s(a.slice(n.length)):Pe($t,!1,a,void 0,!0)}if(r){const n=o;o=s=>r({className:s,parseClassName:n})}return o},Bt=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{t.set(r,1e6+o)}),r=>{const o=[];let n=[];for(let s=0;s<r.length;s++){const a=r[s],f=a[0]==="[",c=t.has(a);f||c?(n.length>0&&(n.sort(),o.push(...n),n=[]),o.push(a)):n.push(a)}return n.length>0&&(n.sort(),o.push(...n)),o}},Ut=e=>({cache:Wt(e.cacheSize),parseClassName:Ft(e),sortModifiers:Bt(e),...Tt(e)}),Dt=/\s+/,Yt=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:s}=t,a=[],f=e.trim().split(Dt);let c="";for(let m=f.length-1;m>=0;m-=1){const p=f[m],{isExternal:g,modifiers:h,hasImportantModifier:z,baseClassName:y,maybePostfixModifierPosition:S}=r(p);if(g){c=p+(c.length>0?" "+c:c);continue}let v=!!S,M=o(v?y.substring(0,S):y);if(!M){if(!v){c=p+(c.length>0?" "+c:c);continue}if(M=o(y),!M){c=p+(c.length>0?" "+c:c);continue}v=!1}const D=h.length===0?"":h.length===1?h[0]:s(h).join(":"),$=z?D+ce:D,G=$+M;if(a.indexOf(G)>-1)continue;a.push(G);const V=n(M,v);for(let _=0;_<V.length;++_){const F=V[_];a.push($+F)}c=p+(c.length>0?" "+c:c)}return c},qt=(...e)=>{let t=0,r,o,n="";for(;t<e.length;)(r=e[t++])&&(o=Je(r))&&(n&&(n+=" "),n+=o);return n},Je=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Je(e[o]))&&(r&&(r+=" "),r+=t);return r},Jt=(e,...t)=>{let r,o,n,s;const a=c=>{const m=t.reduce((p,g)=>g(p),e());return r=Ut(m),o=r.cache.get,n=r.cache.set,s=f,f(c)},f=c=>{const m=o(c);if(m)return m;const p=Yt(c,r);return n(c,p),p};return s=a,(...c)=>s(qt(...c))},Qt=[],k=e=>{const t=r=>r[e]||Qt;return t.isThemeGetter=!0,t},Qe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Xt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Zt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kt=/\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$/,Ht=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,er=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,I=e=>Xt.test(e),b=e=>!!e&&!Number.isNaN(Number(e)),R=e=>!!e&&Number.isInteger(Number(e)),ie=e=>e.endsWith("%")&&b(e.slice(0,-1)),E=e=>Zt.test(e),Ze=()=>!0,rr=e=>Kt.test(e)&&!Ht.test(e),fe=()=>!1,or=e=>er.test(e),nr=e=>tr.test(e),sr=e=>!i(e)&&!l(e),ar=e=>N(e,et,fe),i=e=>Qe.test(e),j=e=>N(e,tt,rr),Ee=e=>N(e,br,b),ir=e=>N(e,ot,Ze),lr=e=>N(e,rt,fe),Ie=e=>N(e,Ke,fe),cr=e=>N(e,He,nr),Z=e=>N(e,nt,or),l=e=>Xe.test(e),B=e=>L(e,tt),dr=e=>L(e,rt),Re=e=>L(e,Ke),ur=e=>L(e,et),mr=e=>L(e,He),K=e=>L(e,nt,!0),fr=e=>L(e,ot,!0),N=(e,t,r)=>{const o=Qe.exec(e);return o?o[1]?t(o[1]):r(o[2]):!1},L=(e,t,r=!1)=>{const o=Xe.exec(e);return o?o[1]?t(o[1]):r:!1},Ke=e=>e==="position"||e==="percentage",He=e=>e==="image"||e==="url",et=e=>e==="length"||e==="size"||e==="bg-size",tt=e=>e==="length",br=e=>e==="number",rt=e=>e==="family-name",ot=e=>e==="number"||e==="weight",nt=e=>e==="shadow",pr=()=>{const e=k("color"),t=k("font"),r=k("text"),o=k("font-weight"),n=k("tracking"),s=k("leading"),a=k("breakpoint"),f=k("container"),c=k("spacing"),m=k("radius"),p=k("shadow"),g=k("inset-shadow"),h=k("text-shadow"),z=k("drop-shadow"),y=k("blur"),S=k("perspective"),v=k("aspect"),M=k("ease"),D=k("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...G(),l,i],_=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],d=()=>[l,i,c],C=()=>[I,"full","auto",...d()],be=()=>[R,"none","subgrid",l,i],pe=()=>["auto",{span:["full",R,l,i]},R,l,i],Y=()=>[R,"auto",l,i],ge=()=>["auto","min","max","fr",l,i],re=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...d()],O=()=>[I,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...d()],oe=()=>[I,"screen","full","dvw","lvw","svw","min","max","fit",...d()],ne=()=>[I,"screen","full","lh","dvh","lvh","svh","min","max","fit",...d()],u=()=>[e,l,i],he=()=>[...G(),Re,Ie,{position:[l,i]}],ye=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ke=()=>["auto","cover","contain",ur,ar,{size:[l,i]}],se=()=>[ie,B,j],x=()=>["","none","full",m,l,i],A=()=>["",b,B,j],q=()=>["solid","dashed","dotted","double"],we=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],w=()=>[b,ie,Re,Ie],ve=()=>["","none",y,l,i],J=()=>["none",b,l,i],Q=()=>["none",b,l,i],ae=()=>[b,l,i],X=()=>[I,"full",...d()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[E],breakpoint:[E],color:[Ze],container:[E],"drop-shadow":[E],ease:["in","out","in-out"],font:[sr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[E],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[E],shadow:[E],spacing:["px",b],text:[E],"text-shadow":[E],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",I,i,l,v]}],container:["container"],columns:[{columns:[b,i,l,f]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:V()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{"inset-s":C(),start:C()}],end:[{"inset-e":C(),end:C()}],"inset-bs":[{"inset-bs":C()}],"inset-be":[{"inset-be":C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[R,"auto",l,i]}],basis:[{basis:[I,"full","auto",f,...d()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[b,I,"auto","initial","none",i]}],grow:[{grow:["",b,l,i]}],shrink:[{shrink:["",b,l,i]}],order:[{order:[R,"first","last","none",l,i]}],"grid-cols":[{"grid-cols":be()}],"col-start-end":[{col:pe()}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":be()}],"row-start-end":[{row:pe()}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ge()}],"auto-rows":[{"auto-rows":ge()}],gap:[{gap:d()}],"gap-x":[{"gap-x":d()}],"gap-y":[{"gap-y":d()}],"justify-content":[{justify:[...re(),"normal"]}],"justify-items":[{"justify-items":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...re()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],p:[{p:d()}],px:[{px:d()}],py:[{py:d()}],ps:[{ps:d()}],pe:[{pe:d()}],pbs:[{pbs:d()}],pbe:[{pbe:d()}],pt:[{pt:d()}],pr:[{pr:d()}],pb:[{pb:d()}],pl:[{pl:d()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":d()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":d()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],"inline-size":[{inline:["auto",...oe()]}],"min-inline-size":[{"min-inline":["auto",...oe()]}],"max-inline-size":[{"max-inline":["none",...oe()]}],"block-size":[{block:["auto",...ne()]}],"min-block-size":[{"min-block":["auto",...ne()]}],"max-block-size":[{"max-block":["none",...ne()]}],w:[{w:[f,"screen",...O()]}],"min-w":[{"min-w":[f,"screen","none",...O()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[a]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",r,B,j]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,fr,ir]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ie,i]}],"font-family":[{font:[dr,lr,t]}],"font-features":[{"font-features":[i]}],"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:[n,l,i]}],"line-clamp":[{"line-clamp":[b,"none",l,Ee]}],leading:[{leading:[s,...d()]}],"list-image":[{"list-image":["none",l,i]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",l,i]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:u()}],"text-color":[{text:u()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[b,"from-font","auto",l,j]}],"text-decoration-color":[{decoration:u()}],"underline-offset":[{"underline-offset":[b,"auto",l,i]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:d()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",l,i]}],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",l,i]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:he()}],"bg-repeat":[{bg:ye()}],"bg-size":[{bg:ke()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},R,l,i],radial:["",l,i],conic:[R,l,i]},mr,cr]}],"bg-color":[{bg:u()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:u()}],"gradient-via":[{via:u()}],"gradient-to":[{to:u()}],rounded:[{rounded:x()}],"rounded-s":[{"rounded-s":x()}],"rounded-e":[{"rounded-e":x()}],"rounded-t":[{"rounded-t":x()}],"rounded-r":[{"rounded-r":x()}],"rounded-b":[{"rounded-b":x()}],"rounded-l":[{"rounded-l":x()}],"rounded-ss":[{"rounded-ss":x()}],"rounded-se":[{"rounded-se":x()}],"rounded-ee":[{"rounded-ee":x()}],"rounded-es":[{"rounded-es":x()}],"rounded-tl":[{"rounded-tl":x()}],"rounded-tr":[{"rounded-tr":x()}],"rounded-br":[{"rounded-br":x()}],"rounded-bl":[{"rounded-bl":x()}],"border-w":[{border:A()}],"border-w-x":[{"border-x":A()}],"border-w-y":[{"border-y":A()}],"border-w-s":[{"border-s":A()}],"border-w-e":[{"border-e":A()}],"border-w-bs":[{"border-bs":A()}],"border-w-be":[{"border-be":A()}],"border-w-t":[{"border-t":A()}],"border-w-r":[{"border-r":A()}],"border-w-b":[{"border-b":A()}],"border-w-l":[{"border-l":A()}],"divide-x":[{"divide-x":A()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":A()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:u()}],"border-color-x":[{"border-x":u()}],"border-color-y":[{"border-y":u()}],"border-color-s":[{"border-s":u()}],"border-color-e":[{"border-e":u()}],"border-color-bs":[{"border-bs":u()}],"border-color-be":[{"border-be":u()}],"border-color-t":[{"border-t":u()}],"border-color-r":[{"border-r":u()}],"border-color-b":[{"border-b":u()}],"border-color-l":[{"border-l":u()}],"divide-color":[{divide:u()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[b,l,i]}],"outline-w":[{outline:["",b,B,j]}],"outline-color":[{outline:u()}],shadow:[{shadow:["","none",p,K,Z]}],"shadow-color":[{shadow:u()}],"inset-shadow":[{"inset-shadow":["none",g,K,Z]}],"inset-shadow-color":[{"inset-shadow":u()}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:u()}],"ring-offset-w":[{"ring-offset":[b,j]}],"ring-offset-color":[{"ring-offset":u()}],"inset-ring-w":[{"inset-ring":A()}],"inset-ring-color":[{"inset-ring":u()}],"text-shadow":[{"text-shadow":["none",h,K,Z]}],"text-shadow-color":[{"text-shadow":u()}],opacity:[{opacity:[b,l,i]}],"mix-blend":[{"mix-blend":[...we(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":we()}],"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":[b]}],"mask-image-linear-from-pos":[{"mask-linear-from":w()}],"mask-image-linear-to-pos":[{"mask-linear-to":w()}],"mask-image-linear-from-color":[{"mask-linear-from":u()}],"mask-image-linear-to-color":[{"mask-linear-to":u()}],"mask-image-t-from-pos":[{"mask-t-from":w()}],"mask-image-t-to-pos":[{"mask-t-to":w()}],"mask-image-t-from-color":[{"mask-t-from":u()}],"mask-image-t-to-color":[{"mask-t-to":u()}],"mask-image-r-from-pos":[{"mask-r-from":w()}],"mask-image-r-to-pos":[{"mask-r-to":w()}],"mask-image-r-from-color":[{"mask-r-from":u()}],"mask-image-r-to-color":[{"mask-r-to":u()}],"mask-image-b-from-pos":[{"mask-b-from":w()}],"mask-image-b-to-pos":[{"mask-b-to":w()}],"mask-image-b-from-color":[{"mask-b-from":u()}],"mask-image-b-to-color":[{"mask-b-to":u()}],"mask-image-l-from-pos":[{"mask-l-from":w()}],"mask-image-l-to-pos":[{"mask-l-to":w()}],"mask-image-l-from-color":[{"mask-l-from":u()}],"mask-image-l-to-color":[{"mask-l-to":u()}],"mask-image-x-from-pos":[{"mask-x-from":w()}],"mask-image-x-to-pos":[{"mask-x-to":w()}],"mask-image-x-from-color":[{"mask-x-from":u()}],"mask-image-x-to-color":[{"mask-x-to":u()}],"mask-image-y-from-pos":[{"mask-y-from":w()}],"mask-image-y-to-pos":[{"mask-y-to":w()}],"mask-image-y-from-color":[{"mask-y-from":u()}],"mask-image-y-to-color":[{"mask-y-to":u()}],"mask-image-radial":[{"mask-radial":[l,i]}],"mask-image-radial-from-pos":[{"mask-radial-from":w()}],"mask-image-radial-to-pos":[{"mask-radial-to":w()}],"mask-image-radial-from-color":[{"mask-radial-from":u()}],"mask-image-radial-to-color":[{"mask-radial-to":u()}],"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":G()}],"mask-image-conic-pos":[{"mask-conic":[b]}],"mask-image-conic-from-pos":[{"mask-conic-from":w()}],"mask-image-conic-to-pos":[{"mask-conic-to":w()}],"mask-image-conic-from-color":[{"mask-conic-from":u()}],"mask-image-conic-to-color":[{"mask-conic-to":u()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:he()}],"mask-repeat":[{mask:ye()}],"mask-size":[{mask:ke()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",l,i]}],filter:[{filter:["","none",l,i]}],blur:[{blur:ve()}],brightness:[{brightness:[b,l,i]}],contrast:[{contrast:[b,l,i]}],"drop-shadow":[{"drop-shadow":["","none",z,K,Z]}],"drop-shadow-color":[{"drop-shadow":u()}],grayscale:[{grayscale:["",b,l,i]}],"hue-rotate":[{"hue-rotate":[b,l,i]}],invert:[{invert:["",b,l,i]}],saturate:[{saturate:[b,l,i]}],sepia:[{sepia:["",b,l,i]}],"backdrop-filter":[{"backdrop-filter":["","none",l,i]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[b,l,i]}],"backdrop-contrast":[{"backdrop-contrast":[b,l,i]}],"backdrop-grayscale":[{"backdrop-grayscale":["",b,l,i]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b,l,i]}],"backdrop-invert":[{"backdrop-invert":["",b,l,i]}],"backdrop-opacity":[{"backdrop-opacity":[b,l,i]}],"backdrop-saturate":[{"backdrop-saturate":[b,l,i]}],"backdrop-sepia":[{"backdrop-sepia":["",b,l,i]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":d()}],"border-spacing-x":[{"border-spacing-x":d()}],"border-spacing-y":[{"border-spacing-y":d()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",l,i]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[b,"initial",l,i]}],ease:[{ease:["linear","initial",M,l,i]}],delay:[{delay:[b,l,i]}],animate:[{animate:["none",D,l,i]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,l,i]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[l,i,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:X()}],"translate-x":[{"translate-x":X()}],"translate-y":[{"translate-y":X()}],"translate-z":[{"translate-z":X()}],"translate-none":["translate-none"],accent:[{accent:u()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:u()}],"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",l,i]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":d()}],"scroll-mx":[{"scroll-mx":d()}],"scroll-my":[{"scroll-my":d()}],"scroll-ms":[{"scroll-ms":d()}],"scroll-me":[{"scroll-me":d()}],"scroll-mbs":[{"scroll-mbs":d()}],"scroll-mbe":[{"scroll-mbe":d()}],"scroll-mt":[{"scroll-mt":d()}],"scroll-mr":[{"scroll-mr":d()}],"scroll-mb":[{"scroll-mb":d()}],"scroll-ml":[{"scroll-ml":d()}],"scroll-p":[{"scroll-p":d()}],"scroll-px":[{"scroll-px":d()}],"scroll-py":[{"scroll-py":d()}],"scroll-ps":[{"scroll-ps":d()}],"scroll-pe":[{"scroll-pe":d()}],"scroll-pbs":[{"scroll-pbs":d()}],"scroll-pbe":[{"scroll-pbe":d()}],"scroll-pt":[{"scroll-pt":d()}],"scroll-pr":[{"scroll-pr":d()}],"scroll-pb":[{"scroll-pb":d()}],"scroll-pl":[{"scroll-pl":d()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",l,i]}],fill:[{fill:["none",...u()]}],"stroke-w":[{stroke:[b,B,j,Ee]}],stroke:[{stroke:["none",...u()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},gr=Jt(pr);function hr(...e){return gr(Ue(e))}function zr(e){const t=Math.floor((Date.now()-e.getTime())/1e3);return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}function Pr(e){return e.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function Er(e){return e.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"})}const yr=["created","retry","active","completed","cancelled","failed"],kr="pending",wr="all",Ir={created:"gray",retry:"warning",active:"primary",completed:"success",cancelled:"gray",failed:"error"},Rr=[{value:wr,label:"All States"},{value:kr,label:"Pending"},...yr.map(e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1)}))],vr=["slow_query","queue_backlog","clock_skew"],Tr={slow_query:"warning",queue_backlog:"error",clock_skew:"gray"},xr={slow_query:"Slow Query",queue_backlog:"Queue Backlog",clock_skew:"Clock Skew"},Nr=[{value:null,label:"All Types"},...vr.map(e=>({value:e,label:xr[e]}))];function Mr(e){if(!e)return"-";if(typeof e=="string")return e;try{const t=e,r=[];return t.elapsed&&r.push(`${t.elapsed.toFixed(2)}s`),t.name&&r.push(`queue: ${t.name}`),t.queuedCount&&r.push(`queued: ${t.queuedCount}`),t.seconds&&r.push(`skew: ${t.seconds.toFixed(1)}s`),t.direction&&r.push(`(${t.direction})`),r.length>0?r.join(", "):JSON.stringify(e)}catch{return String(e)}}const Te=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ne=Ue,_r=(e,t)=>r=>{var o;if(t?.variants==null)return Ne(e,r?.class,r?.className);const{variants:n,defaultVariants:s}=t,a=Object.keys(n).map(m=>{const p=r?.[m],g=s?.[m];if(p===null)return null;const h=Te(p)||Te(g);return n[m][h]}),f=r&&Object.entries(r).reduce((m,p)=>{let[g,h]=p;return h===void 0||(m[g]=h),m},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((m,p)=>{let{class:g,className:h,...z}=p;return Object.entries(z).every(y=>{let[S,v]=y;return Array.isArray(v)?v.includes({...s,...f}[S]):{...s,...f}[S]===v})?[...m,g,h]:m},[]);return Ne(e,a,c,r?.class,r?.className)};function Or(e){return xt(e.defaultTagName??"div",e,e)}function jr({to:e,children:t,className:r,...o}){const[n]=st(),s=n.get("db");let a;if(typeof e=="string"){const f=new URL(e,"http://localhost");s&&!f.searchParams.has("db")&&f.searchParams.set("db",s),a=f.pathname+f.search}else if(typeof e=="object"&&e!==null){const f=e.pathname||"",c=e.search||"",m=e.hash||"",p=new URLSearchParams(c.replace(/^\?/,""));s&&!p.has("db")&&p.set("db",s);const g=p.toString();a=f+(g?`?${g}`:"")+m}else a=String(e);return at.jsx(it,{to:a,className:hr("cursor-pointer",r),...o,children:t})}export{jr as D,U as E,Rr as J,Sr as N,xr as W,_r as a,Tr as b,hr as c,Ir as d,Pr as e,zr as f,ct as g,Ae as h,xt as i,Me as j,Cr as k,We as l,je as m,bt as n,Nr as o,Mr as p,Er as q,Or as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s,p as c}from"./chunk-EVOBXE3Y-CmKRT32p.js";import{g as U,j as G,i as w,c as P}from"./db-link-BzIwSws3.js";import{c as J}from"./createLucideIcon-C5Bm8BOS.js";import{b1 as X,b2 as Z,b3 as q,h as W,b4 as Q,b5 as A,b7 as ee,b6 as te,aN as oe,b9 as ne,j as se,a7 as ae,aV as re,$ as ie,aW as le,aY as de,aZ as h,a$ as ce,aJ as z,aK as K,u as ue,bm as pe,c as H,bn as N,aG as ge,aL as fe,aI as me,aM as xe,aR as Ce,aS as he}from"./useOpenInteractionType-C7OfDyTB.js";const Se=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ye=J("x",Se);function De(t){const{store:e,parentContext:o,actionsRef:r,isDrawer:d}=t,a=e.useState("open"),u=e.useState("disablePointerDismissal"),p=e.useState("modal"),i=e.useState("popupElement"),{openMethod:n,triggerProps:g}=X(a);Z(e);const{forceUnmount:f}=q(a,e),m=s.useCallback(()=>{e.setOpen(!1,W(Q))},[e]);s.useImperativeHandle(r,()=>({unmount:f,close:m}),[f,m]);const x=A({popupStore:e,onOpenChange:e.setOpen,treatPopupAsFloatingElement:!0}),[C,l]=s.useState(0),[D,R]=s.useState(0),O=C===0,T=ee(x),M=te(x,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:p==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(S){if(!e.context.outsidePressEnabledRef.current||"button"in S&&S.button!==0||"touches"in S&&S.touches.length!==1)return!1;const y=se(S);if(O&&!u){const E=y;return p&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===E||e.context.backdropRef.current===E||ae(E,i)&&!E?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:O});oe(a&&p===!0,i);const{getReferenceProps:I,getFloatingProps:k,getTriggerProps:v}=ne([T,M]);e.useContextCallback("onNestedDialogOpen",(S,y)=>{l(S),R(y)}),e.useContextCallback("onNestedDialogClose",()=>{l(0),R(0)}),s.useEffect(()=>(o?.onNestedDialogOpen&&a&&o.onNestedDialogOpen(C+1,D+(d?1:0)),o?.onNestedDialogClose&&!a&&o.onNestedDialogClose(),()=>{o?.onNestedDialogClose&&a&&o.onNestedDialogClose()}),[d,a,C,D,o]);const j=s.useMemo(()=>I(g),[I,g]),F=s.useMemo(()=>v(g),[v,g]),$=s.useMemo(()=>k(),[k]);e.useSyncedValues({openMethod:n,activeTriggerProps:j,inactiveTriggerProps:F,popupProps:$,floatingRootContext:x,nestedOpenDialogCount:C,nestedOpenDrawerCount:D})}const L=s.createContext(void 0);function b(t){const e=s.useContext(L);if(t===!1&&e===void 0)throw new Error(U(27));return e}const Re={...le,modal:h(t=>t.modal),nested:h(t=>t.nested),nestedOpenDialogCount:h(t=>t.nestedOpenDialogCount),nestedOpenDrawerCount:h(t=>t.nestedOpenDrawerCount),disablePointerDismissal:h(t=>t.disablePointerDismissal),openMethod:h(t=>t.openMethod),descriptionElementId:h(t=>t.descriptionElementId),titleElementId:h(t=>t.titleElementId),viewportElement:h(t=>t.viewportElement),role:h(t=>t.role)};class B extends re{constructor(e){super(be(e),{popupRef:s.createRef(),backdropRef:s.createRef(),internalBackdropRef:s.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new ie,onOpenChange:void 0,onOpenChangeComplete:void 0},Re)}setOpen=(e,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!e&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,o);const r={open:e},d=o.trigger?.id??null;(d||e)&&(r.activeTriggerId=d,r.activeTriggerElement=o.trigger??null),this.update(r)};static useStore(e,o){const r=G(()=>new B(o)).current;return e??r}}function be(t={}){return{...de(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:"dialog",...t}}const V=s.createContext(!1);function Oe(t){const{children:e,open:o,defaultOpen:r=!1,onOpenChange:d,onOpenChangeComplete:a,disablePointerDismissal:u=!1,modal:p=!0,actionsRef:i,handle:n,triggerId:g,defaultTriggerId:f=null}=t,m=b(!0),x=s.useContext(V),C=!!m,l=B.useStore(n?.store,{open:r,openProp:o,activeTriggerId:f,triggerIdProp:g,modal:p,disablePointerDismissal:u,nested:C});ce(()=>{o===void 0&&l.state.open===!1&&r===!0&&l.update({open:!0,activeTriggerId:f})}),l.useControlledProp("openProp",o),l.useControlledProp("triggerIdProp",g),l.useSyncedValues({disablePointerDismissal:u,nested:C,modal:p}),l.useContextCallback("onOpenChange",d),l.useContextCallback("onOpenChangeComplete",a);const D=l.useState("payload");De({store:l,actionsRef:i,parentContext:m?.store.context,isDrawer:x});const R=s.useMemo(()=>({store:l}),[l]);return c.jsx(V.Provider,{value:!1,children:c.jsx(L.Provider,{value:R,children:typeof e=="function"?e({payload:D}):e})})}const Pe={...z,...K},we=s.forwardRef(function(e,o){const{render:r,className:d,style:a,forceRender:u=!1,...p}=e,{store:i}=b(),n=i.useState("open"),g=i.useState("nested"),f=i.useState("mounted"),m=i.useState("transitionStatus");return w("div",e,{state:{open:n,transitionStatus:m},ref:[i.context.backdropRef,o],stateAttributesMapping:Pe,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},p],enabled:u||!g})}),Ie=s.forwardRef(function(e,o){const{render:r,className:d,disabled:a=!1,nativeButton:u=!0,style:p,...i}=e,{store:n}=b(),g=n.useState("open");function f(l){g&&n.setOpen(!1,W(pe,l.nativeEvent))}const{getButtonProps:m,buttonRef:x}=ue({disabled:a,native:u});return w("button",e,{state:{disabled:a},ref:[o,x],props:[{onClick:f},i,m]})}),ke=s.forwardRef(function(e,o){const{render:r,className:d,style:a,id:u,...p}=e,{store:i}=b(),n=H(u);return i.useSyncedValueWithCleanup("descriptionElementId",n),w("p",e,{ref:o,props:[{id:n},p]})});let ve=(function(t){return t.nestedDialogs="--nested-dialogs",t})({}),Ee=(function(t){return t[t.open=N.open]="open",t[t.closed=N.closed]="closed",t[t.startingStyle=N.startingStyle]="startingStyle",t[t.endingStyle=N.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});const Y=s.createContext(void 0);function Ne(){const t=s.useContext(Y);if(t===void 0)throw new Error(U(26));return t}const Te={...z,...K,nestedDialogOpen(t){return t?{[Ee.nestedDialogOpen]:""}:null}},Me=s.forwardRef(function(e,o){const{className:r,finalFocus:d,initialFocus:a,render:u,style:p,...i}=e,{store:n}=b(),g=n.useState("descriptionElementId"),f=n.useState("disablePointerDismissal"),m=n.useState("floatingRootContext"),x=n.useState("popupProps"),C=n.useState("modal"),l=n.useState("mounted"),D=n.useState("nested"),R=n.useState("nestedOpenDialogCount"),O=n.useState("open"),T=n.useState("openMethod"),M=n.useState("titleElementId"),I=n.useState("transitionStatus"),k=n.useState("role");Ne(),ge({open:O,ref:n.context.popupRef,onComplete(){O&&n.context.onOpenChangeComplete?.(!0)}});function v(y){return y==="touch"?n.context.popupRef.current:!0}const j=a===void 0?v:a,F=R>0,S=w("div",e,{state:{open:O,nested:D,transitionStatus:I,nestedDialogOpen:F},props:[x,{"aria-labelledby":M??void 0,"aria-describedby":g??void 0,role:k,tabIndex:-1,hidden:!l,onKeyDown(y){fe.has(y.key)&&y.stopPropagation()},style:{[ve.nestedDialogs]:R}},i],ref:[o,n.context.popupRef,n.useStateSetter("popupElement")],stateAttributesMapping:Te});return c.jsx(me,{context:m,openInteractionType:T,disabled:!l,closeOnFocusOut:!f,initialFocus:j,returnFocus:d,modal:C!==!1,restoreFocus:"popup",children:S})}),je=s.forwardRef(function(e,o){const{keepMounted:r=!1,...d}=e,{store:a}=b(),u=a.useState("mounted"),p=a.useState("modal"),i=a.useState("open");return u||r?c.jsx(Y.Provider,{value:r,children:c.jsxs(xe,{ref:o,...d,children:[u&&p===!0&&c.jsx(Ce,{ref:a.context.internalBackdropRef,inert:he(!i)}),e.children]})}):null}),Fe=s.forwardRef(function(e,o){const{render:r,className:d,style:a,id:u,...p}=e,{store:i}=b(),n=H(u);return i.useSyncedValueWithCleanup("titleElementId",n),w("h2",e,{ref:o,props:[{id:n},p]})}),_e=Oe,Be=je,_=s.forwardRef(({className:t,...e},o)=>c.jsx(we,{ref:o,className:P("fixed inset-0 z-50 bg-gray-900/50 data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0",t),...e}));_.displayName="DialogBackdrop";const $e=s.forwardRef(({className:t,children:e,hideCloseButton:o=!1,...r},d)=>c.jsxs(Be,{children:[c.jsx(_,{}),c.jsxs(Me,{ref:d,className:P("fixed left-[50%] top-[50%] z-50 w-full max-w-lg translate-x-[-50%] translate-y-[-50%]","bg-white rounded-lg shadow-xl p-6","dark:bg-gray-900 dark:border dark:border-gray-800","data-open:animate-in data-closed:animate-out","data-closed:fade-out-0 data-open:fade-in-0","data-closed:zoom-out-95 data-open:zoom-in-95","data-closed:slide-out-to-left-1/2 data-closed:slide-out-to-top-[48%]","data-open:slide-in-from-left-1/2 data-open:slide-in-from-top-[48%]",t),...r,children:[e,!o&&c.jsxs(Ie,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 disabled:pointer-events-none dark:ring-offset-gray-900 dark:text-gray-400 dark:hover:text-gray-100",children:[c.jsx(ye,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));$e.displayName="DialogContent";const Ve=({className:t,...e})=>c.jsx("div",{className:P("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Ve.displayName="DialogHeader";const Ue=({className:t,...e})=>c.jsx("div",{className:P("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});Ue.displayName="DialogFooter";const We=s.forwardRef(({className:t,...e},o)=>c.jsx(Fe,{ref:o,className:P("text-lg font-semibold text-gray-900 dark:text-gray-100",t),...e}));We.displayName="DialogTitle";const ze=s.forwardRef(({className:t,...e},o)=>c.jsx(ke,{ref:o,className:P("text-sm text-gray-600 dark:text-gray-400",t),...e}));ze.displayName="DialogDescription";export{_e as D,$e as a,Ve as b,We as c,ze as d,Ue as e};
|