@pg-boss/dashboard 1.0.1 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -173
- package/build/client/assets/MenuTrigger-CEHCnGow.js +1 -0
- package/build/client/assets/{_index-Bcg_-XSd.js → _index-9fLquIe1.js} +1 -1
- package/build/client/assets/{badge-Cd8v3tl3.js → badge-B5ZugmiV.js} +1 -1
- package/build/client/assets/{button-BaXUPm8v.js → button-Djse56Dx.js} +1 -1
- package/build/client/assets/{chevron-down-xu6Uceu-.js → chevron-down-B4tDL9Ah.js} +1 -1
- package/build/client/assets/chunk-LFPYN7LY-Cj1DJmJR.js +26 -0
- package/build/client/assets/{createLucideIcon-BXGwbdrh.js → createLucideIcon-B0YqJFaz.js} +1 -1
- package/build/client/assets/db-link-DmvfwdX4.js +1 -0
- package/build/client/assets/dialog-CQzw3QVH.js +1 -0
- package/build/client/assets/{entry.client-COnaNoy-.js → entry.client-Szv-xmaE.js} +4 -4
- package/build/client/assets/{error-card-DmoxS3Ao.js → error-card-CXoOCvsg.js} +1 -1
- package/build/client/assets/{filter-select-mMC79WOR.js → filter-select-DXyBBVm8.js} +1 -1
- package/build/client/assets/{index-DhMkYPMa.js → index-x2yWco1W.js} +1 -1
- package/build/client/assets/{jobs-DtmTCs8I.js → jobs-CM6xcK-O.js} +1 -1
- package/build/client/assets/manifest-acaa4b8e.js +1 -0
- package/build/client/assets/{pagination-NfhvsUbp.js → pagination-C4yyCmBA.js} +1 -1
- package/build/client/assets/{queues._index-Cw1B49mg.js → queues._index-Dn3ieC5d.js} +1 -1
- package/build/client/assets/{queues._name-D0cG_qDX.js → queues._name-GrviLLx2.js} +1 -1
- package/build/client/assets/{queues._name.jobs._jobId-uJ3dfM3J.js → queues._name.jobs._jobId-s_wYs79w.js} +1 -1
- package/build/client/assets/{queues.create-BGXDhJ3m.js → queues.create-Ch3Mqw52.js} +1 -1
- package/build/client/assets/root-Bpb4WtY4.css +1 -0
- package/build/client/assets/{root-NWrBrGvr.js → root-D0qqtdF7.js} +1 -1
- package/build/client/assets/{schedules-DzgBEayh.js → schedules-DwnuuhxF.js} +1 -1
- package/build/client/assets/{schedules._name._key-i42S9kw2.js → schedules._name._key-DJn-u3Cm.js} +1 -1
- package/build/client/assets/{schedules.new-Dt78KptL.js → schedules.new-CQuE2Uhz.js} +1 -1
- package/build/client/assets/{send-0eWgiWNl.js → send-DVfuC6NR.js} +1 -1
- package/build/client/assets/{table-CTo0I5HG.js → table-CtSLyG7m.js} +1 -1
- package/build/client/assets/useOpenInteractionType-Ss_6xZdw.js +12 -0
- package/build/client/assets/{warnings-BhQM6lFV.js → warnings-DqRQYomb.js} +1 -1
- package/build/server/assets/auth.server-DgTIakNo.js +17 -0
- package/build/server/assets/server-build.js +305 -39
- package/build/server/index.js +5 -0
- package/package.json +16 -15
- package/build/client/assets/MenuTrigger-SThQHnlb.js +0 -1
- package/build/client/assets/chunk-JZWAC4HX-DC8i-F7r.js +0 -26
- package/build/client/assets/db-link-CtPnIrIr.js +0 -1
- package/build/client/assets/dialog-Bl8T588f.js +0 -1
- package/build/client/assets/manifest-25954681.js +0 -1
- package/build/client/assets/root-DJRlbyb5.css +0 -1
- package/build/client/assets/useOpenInteractionType-C_L8nZ_l.js +0 -12
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
function Kn(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 Xn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xt={exports:{}},it={};var Gr;function qn(){if(Gr)return it;Gr=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 Kr;function Qn(){return Kr||(Kr=1,Xt.exports=qn()),Xt.exports}var hs=Qn(),qt={exports:{}},z={};var Xr;function Zn(){if(Xr)return z;Xr=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"),p=Symbol.iterator;function g(m){return m===null||typeof m!="object"?null:(m=p&&m[p]||m["@@iterator"],typeof m=="function"?m:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function C(m,x,A){this.props=m,this.context=x,this.refs=w,this.updater=A||R}C.prototype.isReactComponent={},C.prototype.setState=function(m,x){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,x,"setState")},C.prototype.forceUpdate=function(m){this.updater.enqueueForceUpdate(this,m,"forceUpdate")};function S(){}S.prototype=C.prototype;function M(m,x,A){this.props=m,this.context=x,this.refs=w,this.updater=A||R}var D=M.prototype=new S;D.constructor=M,b(D,C.prototype),D.isPureReactComponent=!0;var T=Array.isArray;function _(){}var k={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function B(m,x,A){var I=A.ref;return{$$typeof:e,type:m,key:x,ref:I!==void 0?I:null,props:A}}function G(m,x){return B(m.type,x,m.props)}function re(m){return typeof m=="object"&&m!==null&&m.$$typeof===e}function K(m){var x={"=":"=0",":":"=2"};return"$"+m.replace(/[=:]/g,function(A){return x[A]})}var se=/\/+/g;function te(m,x){return typeof m=="object"&&m!==null&&m.key!=null?K(""+m.key):x.toString(36)}function J(m){switch(m.status){case"fulfilled":return m.value;case"rejected":throw m.reason;default:switch(typeof m.status=="string"?m.then(_,_):(m.status="pending",m.then(function(x){m.status==="pending"&&(m.status="fulfilled",m.value=x)},function(x){m.status==="pending"&&(m.status="rejected",m.reason=x)})),m.status){case"fulfilled":return m.value;case"rejected":throw m.reason}}throw m}function q(m,x,A,I,Y){var V=typeof m;(V==="undefined"||V==="boolean")&&(m=null);var Q=!1;if(m===null)Q=!0;else switch(V){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,q(Q(m._payload),x,A,I,Y)}}if(Q)return Y=Y(m),Q=I===""?"."+te(m,0):I,T(Y)?(A="",Q!=null&&(A=Q.replace(se,"$&/")+"/"),q(Y,x,A,"",function(Yt){return Yt})):Y!=null&&(re(Y)&&(Y=G(Y,A+(Y.key==null||m&&m.key===Y.key?"":(""+Y.key).replace(se,"$&/")+"/")+Q)),x.push(Y)),1;Q=0;var ve=I===""?".":I+":";if(T(m))for(var ce=0;ce<m.length;ce++)I=m[ce],V=ve+te(I,ce),Q+=q(I,x,A,V,Y);else if(ce=g(m),typeof ce=="function")for(m=ce.call(m),ce=0;!(I=m.next()).done;)I=I.value,V=ve+te(I,ce++),Q+=q(I,x,A,V,Y);else if(V==="object"){if(typeof m.then=="function")return q(J(m),x,A,I,Y);throw x=String(m),Error("Objects are not valid as a React child (found: "+(x==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":x)+"). If you meant to render a collection of children, use an array instead.")}return Q}function ue(m,x,A){if(m==null)return m;var I=[],Y=0;return q(m,I,"","",function(V){return x.call(A,V,Y++)}),I}function fe(m){if(m._status===-1){var x=m._result;x=x(),x.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=x)}if(m._status===1)return m._result.default;throw m._result}var X=typeof reportError=="function"?reportError:function(m){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var x=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(x))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",m);return}console.error(m)},ye={map:ue,forEach:function(m,x,A){ue(m,function(){x.apply(this,arguments)},A)},count:function(m){var x=0;return ue(m,function(){x++}),x},toArray:function(m){return ue(m,function(x){return x})||[]},only:function(m){if(!re(m))throw Error("React.Children.only expected to receive a single React element child.");return m}};return z.Activity=c,z.Children=ye,z.Component=C,z.Fragment=r,z.Profiler=n,z.PureComponent=M,z.StrictMode=a,z.Suspense=s,z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,z.__COMPILER_RUNTIME={__proto__:null,c:function(m){return k.H.useMemoCache(m)}},z.cache=function(m){return function(){return m.apply(null,arguments)}},z.cacheSignal=function(){return null},z.cloneElement=function(m,x,A){if(m==null)throw Error("The argument must be a React element, but you passed "+m+".");var I=b({},m.props),Y=m.key;if(x!=null)for(V in x.key!==void 0&&(Y=""+x.key),x)!v.call(x,V)||V==="key"||V==="__self"||V==="__source"||V==="ref"&&x.ref===void 0||(I[V]=x[V]);var V=arguments.length-2;if(V===1)I.children=A;else if(1<V){for(var Q=Array(V),ve=0;ve<V;ve++)Q[ve]=arguments[ve+2];I.children=Q}return B(m.type,Y,I)},z.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},z.createElement=function(m,x,A){var I,Y={},V=null;if(x!=null)for(I in x.key!==void 0&&(V=""+x.key),x)v.call(x,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(Y[I]=x[I]);var Q=arguments.length-2;if(Q===1)Y.children=A;else if(1<Q){for(var ve=Array(Q),ce=0;ce<Q;ce++)ve[ce]=arguments[ce+2];Y.children=ve}if(m&&m.defaultProps)for(I in Q=m.defaultProps,Q)Y[I]===void 0&&(Y[I]=Q[I]);return B(m,V,Y)},z.createRef=function(){return{current:null}},z.forwardRef=function(m){return{$$typeof:l,render:m}},z.isValidElement=re,z.lazy=function(m){return{$$typeof:h,_payload:{_status:-1,_result:m},_init:fe}},z.memo=function(m,x){return{$$typeof:u,type:m,compare:x===void 0?null:x}},z.startTransition=function(m){var x=k.T,A={};k.T=A;try{var I=m(),Y=k.S;Y!==null&&Y(A,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(_,X)}catch(V){X(V)}finally{x!==null&&A.types!==null&&(x.types=A.types),k.T=x}},z.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},z.use=function(m){return k.H.use(m)},z.useActionState=function(m,x,A){return k.H.useActionState(m,x,A)},z.useCallback=function(m,x){return k.H.useCallback(m,x)},z.useContext=function(m){return k.H.useContext(m)},z.useDebugValue=function(){},z.useDeferredValue=function(m,x){return k.H.useDeferredValue(m,x)},z.useEffect=function(m,x){return k.H.useEffect(m,x)},z.useEffectEvent=function(m){return k.H.useEffectEvent(m)},z.useId=function(){return k.H.useId()},z.useImperativeHandle=function(m,x,A){return k.H.useImperativeHandle(m,x,A)},z.useInsertionEffect=function(m,x){return k.H.useInsertionEffect(m,x)},z.useLayoutEffect=function(m,x){return k.H.useLayoutEffect(m,x)},z.useMemo=function(m,x){return k.H.useMemo(m,x)},z.useOptimistic=function(m,x){return k.H.useOptimistic(m,x)},z.useReducer=function(m,x,A){return k.H.useReducer(m,x,A)},z.useRef=function(m){return k.H.useRef(m)},z.useState=function(m){return k.H.useState(m)},z.useSyncExternalStore=function(m,x,A){return k.H.useSyncExternalStore(m,x,A)},z.useTransition=function(){return k.H.useTransition()},z.version="19.2.4",z}var qr;function eo(){return qr||(qr=1,qt.exports=Zn()),qt.exports}var d=eo();const to=Xn(d),ro=Kn({__proto__:null,default:to},[d]);var Ma=e=>{throw TypeError(e)},ao=(e,t,r)=>t.has(e)||Ma("Cannot "+r),Qt=(e,t,r)=>(ao(e,t,"read from private field"),r?r.call(e):t.get(e)),no=(e,t,r)=>t.has(e)?Ma("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Qr="popstate";function Zr(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ms(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 io(t,r,null,e)}function W(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 oo(){return Math.random().toString(36).substring(2,10)}function ea(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"?Ae(t):t,state:r,key:t&&t.key||a||oo(),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 Ae(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 io(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 w=h(),C=w==null?null:w-u;u=w,s&&s({action:l,location:b.location,delta:C})}function p(w,C){l="PUSH";let S=Zr(w)?w:ft(b.location,w,C);u=h()+1;let M=ea(S,u),D=b.createHref(S.unstable_mask||S);try{i.pushState(M,"",D)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;n.location.assign(D)}o&&s&&s({action:l,location:b.location,delta:1})}function g(w,C){l="REPLACE";let S=Zr(w)?w:ft(b.location,w,C);u=h();let M=ea(S,u),D=b.createHref(S.unstable_mask||S);i.replaceState(M,"",D),o&&s&&s({action:l,location:b.location,delta:0})}function R(w){return Da(w)}let b={get action(){return l},get location(){return e(n,i)},listen(w){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Qr,c),s=w,()=>{n.removeEventListener(Qr,c),s=null}},createHref(w){return t(n,w)},createURL:R,encodeLocation(w){let C=R(w);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:p,replace:g,go(w){return i.go(w)}};return b}function Da(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),W(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,ta=class{constructor(e){if(no(this,ut,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Qt(this,ut).has(e))return Qt(this,ut).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Qt(this,ut).set(e,t)}};ut=new WeakMap;var lo=new Set(["lazy","caseSensitive","path","id","index","children"]);function so(e){return lo.has(e)}var uo=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function co(e){return uo.has(e)}function fo(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(W(o.index!==!0||!o.children,"Cannot specify children on an index route"),W(n||!a[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),fo(o)){let u={...o,id:s};return a[s]=ra(u,t(u)),u}else{let u={...o,id:s,children:void 0};return a[s]=ra(u,t(u)),o.children&&(u.children=ht(o.children,t,l,a,n)),u}})}function ra(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Fe(e,t,r="/"){return ct(e,t,r,!1)}function ct(e,t,r,a){let n=typeof t=="string"?Ae(t):t,o=Ee(n.pathname||"/",r);if(o==null)return null;let i=Oa(e);ho(i);let l=null;for(let s=0;l==null&&s<i.length;++s){let u=So(o);l=bo(i[s],u,a)}return l}function _a(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 Oa(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;W(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=Pe([a,h.relativePath]),p=r.concat(h);i.children&&i.children.length>0&&(W(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),Oa(i.children,t,p,c,s)),!(i.path==null&&!i.index)&&t.push({path:c,score:Eo(c,i.index),routesMeta:p})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let s of ka(i.path))o(i,l,!0,s)}),t}function ka(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=ka(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 ho(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ro(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var mo=/^:[\w-]+$/,po=3,yo=2,vo=1,go=10,wo=-2,aa=e=>e==="*";function Eo(e,t){let r=e.split("/"),a=r.length;return r.some(aa)&&(a+=wo),t&&(a+=yo),r.filter(n=>!aa(n)).reduce((n,o)=>n+(mo.test(o)?po:o===""?vo:go),a)}function Ro(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 bo(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=At({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},h),p=s.route;if(!c&&u&&r&&!a[a.length-1].route.index&&(c=At({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},h)),!c)return null;Object.assign(n,c.params),i.push({params:n,pathname:Pe([o,c.pathname]),pathnameBase:Co(Pe([o,c.pathnameBase])),route:p}),c.pathnameBase!=="/"&&(o=Pe([o,c.pathnameBase]))}return i}function At(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Fa(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},p)=>{if(h==="*"){let R=l[p]||"";i=o.slice(0,o.length-R.length).replace(/(.)\/+$/,"$1")}const g=l[p];return c&&!g?u[h]=void 0:u[h]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function Fa(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 So(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 xo({basename:e,pathname:t}){return t==="/"?e:Pe([e,t])}var Aa=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wr=e=>Aa.test(e);function Lo(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Ae(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=na(r.substring(1),"/"):o=na(r,t)):o=t,{pathname:o,search:Po(a),hash:To(n)}}function na(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Zt(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 Ia(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Er(e){let t=Ia(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function $t(e,t,r,a=!1){let n;typeof e=="string"?n=Ae(e):(n={...e},W(!n.pathname||!n.pathname.includes("?"),Zt("?","pathname","search",n)),W(!n.pathname||!n.pathname.includes("#"),Zt("#","pathname","hash",n)),W(!n.search||!n.search.includes("#"),Zt("#","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 p=i.split("/");for(;p[0]==="..";)p.shift(),c-=1;n.pathname=p.join("/")}l=c>=0?t[c]:"/"}let s=Lo(n,l),u=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||h)&&(s.pathname+="/"),s}var Pe=e=>e.join("/").replace(/\/\/+/g,"/"),Co=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Po=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,To=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Mo=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function Do(e,t){return new Mo(e,typeof t=="number"?{status:t}:t)}var _o=(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){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Na=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $a(e,t){let r=e;if(typeof r!="string"||!Aa.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(Na)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 Oo(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=Ze(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=Ze(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=Ze(r[n],i,(...s)=>oa(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=Ze(r.middleware,o,(...l)=>oa(l[0]));return i?(i[$e]=o,i):n})),a}function ko(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=Ze(r.navigate,a,(...o)=>{let[i,l]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?Te(i):".",...ia(e,l??{})}});n&&(n[$e]=a,e.navigate=n)}if(r.fetch.length>0){let a=e.fetch[$e]??e.fetch,n=Ze(r.fetch,a,(...o)=>{let[i,,l,s]=o;return{href:l??".",fetcherKey:i,...ia(e,s??{})}});n&&(n[$e]=a,e.fetch=n)}return e}function Ze(e,t,r){return e.length===0?null:async(...a)=>{let n=await ja(e,r(...a),()=>t(...a),e.length-1);if(n.type==="error")throw n.value;return n.value}}async function ja(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=ja(e,t,r,a-1),o=await i,W(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 oa(e){let{request:t,context:r,params:a,unstable_pattern:n}=e;return{request:Fo(t),params:{...a},unstable_pattern:n,context:Ao(r)}}function ia(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 Fo(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Ao(e){if(No(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Io=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function No(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")===Io}var Ua=["POST","PUT","PATCH","DELETE"],$o=new Set(Ua),jo=["GET",...Ua],Uo=new Set(jo),Ha=new Set([301,302,303,307,308]),Ho=new Set([307,308]),er={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},za={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},zo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ba="remix-router-transitions",Wa=Symbol("ResetLoaderData");function ps(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";W(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],n=e.mapRouteProperties||zo,o=n;if(e.unstable_instrumentations){let f=e.unstable_instrumentations;o=y=>({...n(y),...Oo(f.map(E=>E.route).filter(Boolean),y)})}let i={},l=ht(e.routes,o,void 0,i),s,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let h=e.dataStrategy||Jo,c={...e.future},p=null,g=new Set,R=null,b=null,w=null,C=e.hydrationData!=null,S=Fe(l,e.history.location,u),M=!1,D=null,T,_;if(S==null&&!e.patchRoutesOnNavigation){let f=xe(404,{pathname:e.history.location.pathname}),{matches:y,route:E}=Lt(l);T=!0,_=!T,S=y,D={[E.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))T=!1,_=!T;else if(!S.some(f=>Rr(f.route)))T=!0,_=!T;else{let f=e.hydrationData?e.hydrationData.loaderData:null,y=e.hydrationData?e.hydrationData.errors:null,E=S;if(y){let L=S.findIndex(P=>y[P.route.id]!==void 0);E=E.slice(0,L+1)}_=!1,T=E.every(L=>{let P=Ya(L.route,f,y);return _=_||P.renderFallback,!P.shouldLoad})}else{T=!1,_=!T,S=[];let f=Et(null,l,e.history.location.pathname);f.active&&f.matches&&(M=!0,S=f.matches)}let k,v={historyAction:e.history.action,location:e.history.location,matches:S,initialized:T,renderFallback:_,navigation:er,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||D,fetchers:new Map,blockers:new Map},B="POP",G=null,re=!1,K,se=!1,te=new Map,J=null,q=!1,ue=!1,fe=new Set,X=new Map,ye=0,m=-1,x=new Map,A=new Set,I=new Map,Y=new Map,V=new Set,Q=new Map,ve,ce=null;function Yt(){if(p=e.history.listen(({action:f,location:y,delta:E})=>{if(ve){ve(),ve=void 0;return}ie(Q.size===0||E!=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 L=Br({currentLocation:v.location,nextLocation:y,historyAction:f});if(L&&E!=null){let P=new Promise(N=>{ve=N});e.history.go(E*-1),wt(L,{state:"blocked",location:y,proceed(){wt(L,{state:"proceeding",proceed:void 0,reset:void 0,location:y}),P.then(()=>e.history.go(E))},reset(){let N=new Map(v.blockers);N.set(L,qe),he({blockers:N})}}),G?.resolve(),G=null;return}return Ue(f,y)}),r){di(t,te);let f=()=>fi(t,te);t.addEventListener("pagehide",f),J=()=>t.removeEventListener("pagehide",f)}return v.initialized||Ue("POP",v.location,{initialHydration:!0}),k}function On(){p&&p(),J&&J(),g.clear(),K&&K.abort(),v.fetchers.forEach((f,y)=>Jt(y)),v.blockers.forEach((f,y)=>zr(y))}function kn(f){return g.add(f),()=>g.delete(f)}function he(f,y={}){f.matches&&(f.matches=f.matches.map(P=>{let N=i[P.route.id],O=P.route;return O.element!==N.element||O.errorElement!==N.errorElement||O.hydrateFallbackElement!==N.hydrateFallbackElement?{...P,route:N}:P})),v={...v,...f};let E=[],L=[];v.fetchers.forEach((P,N)=>{P.state==="idle"&&(V.has(N)?E.push(N):L.push(N))}),V.forEach(P=>{!v.fetchers.has(P)&&!X.has(P)&&E.push(P)}),[...g].forEach(P=>P(v,{deletedFetchers:E,newErrors:f.errors??null,viewTransitionOpts:y.viewTransitionOpts,flushSync:y.flushSync===!0})),E.forEach(P=>Jt(P)),L.forEach(P=>v.fetchers.delete(P))}function Ke(f,y,{flushSync:E}={}){let L=v.actionData!=null&&v.navigation.formMethod!=null&&pe(v.navigation.formMethod)&&v.navigation.state==="loading"&&f.state?._isRedirect!==!0,P;y.actionData?Object.keys(y.actionData).length>0?P=y.actionData:P=null:L?P=v.actionData:P=null;let N=y.loaderData?ya(v.loaderData,y.loaderData,y.matches||[],y.errors):v.loaderData,O=v.blockers;O.size>0&&(O=new Map(O),O.forEach((H,$)=>O.set($,qe)));let j=q?!1:Yr(f,y.matches||v.matches),F=re===!0||v.navigation.formMethod!=null&&pe(v.navigation.formMethod)&&f.state?._isRedirect!==!0;s&&(l=s,s=void 0),q||B==="POP"||(B==="PUSH"?e.history.push(f,f.state):B==="REPLACE"&&e.history.replace(f,f.state));let U;if(B==="POP"){let H=te.get(v.location.pathname);H&&H.has(f.pathname)?U={currentLocation:v.location,nextLocation:f}:te.has(f.pathname)&&(U={currentLocation:f,nextLocation:v.location})}else if(se){let H=te.get(v.location.pathname);H?H.add(f.pathname):(H=new Set([f.pathname]),te.set(v.location.pathname,H)),U={currentLocation:v.location,nextLocation:f}}he({...y,actionData:P,loaderData:N,historyAction:B,location:f,initialized:!0,renderFallback:!1,navigation:er,revalidation:"idle",restoreScrollPosition:j,preventScrollReset:F,blockers:O},{viewTransitionOpts:U,flushSync:E===!0}),B="POP",re=!1,se=!1,q=!1,ue=!1,G?.resolve(),G=null,ce?.resolve(),ce=null}async function Ar(f,y){if(G?.resolve(),G=null,typeof f=="number"){G||(G=wa());let oe=G.promise;return e.history.go(f),oe}let E=lr(v.location,v.matches,u,f,y?.fromRouteId,y?.relative),{path:L,submission:P,error:N}=la(!1,E,y),O;y?.unstable_mask&&(O={pathname:"",search:"",hash:"",...typeof y.unstable_mask=="string"?Ae(y.unstable_mask):{...v.location.unstable_mask,...y.unstable_mask}});let j=v.location,F=ft(j,L,y&&y.state,void 0,O);F={...F,...e.history.encodeLocation(F)};let U=y&&y.replace!=null?y.replace:void 0,H="PUSH";U===!0?H="REPLACE":U===!1||P!=null&&pe(P.formMethod)&&P.formAction===v.location.pathname+v.location.search&&(H="REPLACE");let $=y&&"preventScrollReset"in y?y.preventScrollReset===!0:void 0,ae=(y&&y.flushSync)===!0,ee=Br({currentLocation:j,nextLocation:F,historyAction:H});if(ee){wt(ee,{state:"blocked",location:F,proceed(){wt(ee,{state:"proceeding",proceed:void 0,reset:void 0,location:F}),Ar(f,y)},reset(){let oe=new Map(v.blockers);oe.set(ee,qe),he({blockers:oe})}});return}await Ue(H,F,{submission:P,pendingError:N,preventScrollReset:$,replace:y&&y.replace,enableViewTransition:y&&y.viewTransition,flushSync:ae,callSiteDefaultShouldRevalidate:y&&y.unstable_defaultShouldRevalidate})}function Fn(){ce||(ce=wa()),Vt(),he({revalidation:"loading"});let f=ce.promise;return v.navigation.state==="submitting"?f:v.navigation.state==="idle"?(Ue(v.historyAction,v.location,{startUninterruptedRevalidation:!0}),f):(Ue(B||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:se===!0}),f)}async function Ue(f,y,E){K&&K.abort(),K=null,B=f,q=(E&&E.startUninterruptedRevalidation)===!0,Yn(v.location,v.matches),re=(E&&E.preventScrollReset)===!0,se=(E&&E.enableViewTransition)===!0;let L=s||l,P=E&&E.overrideNavigation,N=E?.initialHydration&&v.matches&&v.matches.length>0&&!M?v.matches:Fe(L,y,u),O=(E&&E.flushSync)===!0;if(N&&v.initialized&&!ue&&ti(v.location,y)&&!(E&&E.submission&&pe(E.submission.formMethod))){Ke(y,{matches:N},{flushSync:O});return}let j=Et(N,L,y.pathname);if(j.active&&j.matches&&(N=j.matches),!N){let{error:de,notFoundMatches:ge,route:ne}=Gt(y.pathname);Ke(y,{matches:ge,loaderData:{},errors:{[ne.id]:de}},{flushSync:O});return}K=new AbortController;let F=Qe(e.history,y,K.signal,E&&E.submission),U=e.getContext?await e.getContext():new ta,H;if(E&&E.pendingError)H=[Ne(N).route.id,{type:"error",error:E.pendingError}];else if(E&&E.submission&&pe(E.submission.formMethod)){let de=await An(F,y,E.submission,N,U,j.active,E&&E.initialHydration===!0,{replace:E.replace,flushSync:O});if(de.shortCircuited)return;if(de.pendingActionResult){let[ge,ne]=de.pendingActionResult;if(be(ne)&&Ve(ne.error)&&ne.error.status===404){K=null,Ke(y,{matches:de.matches,loaderData:{},errors:{[ge]:ne.error}});return}}N=de.matches||N,H=de.pendingActionResult,P=tr(y,E.submission),O=!1,j.active=!1,F=Qe(e.history,F.url,F.signal)}let{shortCircuited:$,matches:ae,loaderData:ee,errors:oe}=await In(F,y,N,U,j.active,P,E&&E.submission,E&&E.fetcherSubmission,E&&E.replace,E&&E.initialHydration===!0,O,H,E&&E.callSiteDefaultShouldRevalidate);$||(K=null,Ke(y,{matches:ae||N,...va(H),loaderData:ee,errors:oe}))}async function An(f,y,E,L,P,N,O,j={}){Vt();let F=ui(y,E);if(he({navigation:F},{flushSync:j.flushSync===!0}),N){let $=await Rt(L,y.pathname,f.signal);if($.type==="aborted")return{shortCircuited:!0};if($.type==="error"){if($.partialMatches.length===0){let{matches:ee,route:oe}=Lt(l);return{matches:ee,pendingActionResult:[oe.id,{type:"error",error:$.error}]}}let ae=Ne($.partialMatches).route.id;return{matches:$.partialMatches,pendingActionResult:[ae,{type:"error",error:$.error}]}}else if($.matches)L=$.matches;else{let{notFoundMatches:ae,error:ee,route:oe}=Gt(y.pathname);return{matches:ae,pendingActionResult:[oe.id,{type:"error",error:ee}]}}}let U,H=_t(L,y);if(!H.route.action&&!H.route.lazy)U={type:"error",error:xe(405,{method:f.method,pathname:y.pathname,routeId:H.route.id})};else{let $=et(o,i,f,L,H,O?[]:a,P),ae=await at(f,$,P,null);if(U=ae[H.route.id],!U){for(let ee of L)if(ae[ee.route.id]){U=ae[ee.route.id];break}}if(f.signal.aborted)return{shortCircuited:!0}}if(Ye(U)){let $;return j&&j.replace!=null?$=j.replace:$=ha(U.response.headers.get("Location"),new URL(f.url),u,e.history)===v.location.pathname+v.location.search,await He(f,U,!0,{submission:E,replace:$}),{shortCircuited:!0}}if(be(U)){let $=Ne(L,H.route.id);return(j&&j.replace)!==!0&&(B="PUSH"),{matches:L,pendingActionResult:[$.route.id,U,H.route.id]}}return{matches:L,pendingActionResult:[H.route.id,U]}}async function In(f,y,E,L,P,N,O,j,F,U,H,$,ae){let ee=N||tr(y,O),oe=O||j||ga(ee),de=!q&&!U;if(P){if(de){let me=Ir($);he({navigation:ee,...me!==void 0?{actionData:me}:{}},{flushSync:H})}let Z=await Rt(E,y.pathname,f.signal);if(Z.type==="aborted")return{shortCircuited:!0};if(Z.type==="error"){if(Z.partialMatches.length===0){let{matches:Xe,route:We}=Lt(l);return{matches:Xe,loaderData:{},errors:{[We.id]:Z.error}}}let me=Ne(Z.partialMatches).route.id;return{matches:Z.partialMatches,loaderData:{},errors:{[me]:Z.error}}}else if(Z.matches)E=Z.matches;else{let{error:me,notFoundMatches:Xe,route:We}=Gt(y.pathname);return{matches:Xe,loaderData:{},errors:{[We.id]:me}}}}let ge=s||l,{dsMatches:ne,revalidatingFetchers:Se}=sa(f,L,o,i,e.history,v,E,oe,y,U?[]:a,U===!0,ue,fe,V,I,A,ge,u,e.patchRoutesOnNavigation!=null,$,ae);if(m=++ye,!e.dataStrategy&&!ne.some(Z=>Z.shouldLoad)&&!ne.some(Z=>Z.route.middleware&&Z.route.middleware.length>0)&&Se.length===0){let Z=Ur();return Ke(y,{matches:E,loaderData:{},errors:$&&be($[1])?{[$[0]]:$[1].error}:null,...va($),...Z?{fetchers:new Map(v.fetchers)}:{}},{flushSync:H}),{shortCircuited:!0}}if(de){let Z={};if(!P){Z.navigation=ee;let me=Ir($);me!==void 0&&(Z.actionData=me)}Se.length>0&&(Z.fetchers=Nn(Se)),he(Z,{flushSync:H})}Se.forEach(Z=>{Oe(Z.key),Z.controller&&X.set(Z.key,Z.controller)});let ze=()=>Se.forEach(Z=>Oe(Z.key));K&&K.signal.addEventListener("abort",ze);let{loaderResults:nt,fetcherResults:Ie}=await Nr(ne,Se,f,L);if(f.signal.aborted)return{shortCircuited:!0};K&&K.signal.removeEventListener("abort",ze),Se.forEach(Z=>X.delete(Z.key));let Me=Ct(nt);if(Me)return await He(f,Me.result,!0,{replace:F}),{shortCircuited:!0};if(Me=Ct(Ie),Me)return A.add(Me.key),await He(f,Me.result,!0,{replace:F}),{shortCircuited:!0};let{loaderData:Kt,errors:ot}=pa(v,E,nt,$,Se,Ie);U&&v.errors&&(ot={...v.errors,...ot});let Be=Ur(),bt=Hr(m),St=Be||bt||Se.length>0;return{matches:E,loaderData:Kt,errors:ot,...St?{fetchers:new Map(v.fetchers)}:{}}}function Ir(f){if(f&&!be(f[1]))return{[f[0]]:f[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function Nn(f){return f.forEach(y=>{let E=v.fetchers.get(y.key),L=lt(void 0,E?E.data:void 0);v.fetchers.set(y.key,L)}),new Map(v.fetchers)}async function $n(f,y,E,L){Oe(f);let P=(L&&L.flushSync)===!0,N=s||l,O=lr(v.location,v.matches,u,E,y,L?.relative),j=Fe(N,O,u),F=Et(j,N,O);if(F.active&&F.matches&&(j=F.matches),!j){_e(f,y,xe(404,{pathname:O}),{flushSync:P});return}let{path:U,submission:H,error:$}=la(!0,O,L);if($){_e(f,y,$,{flushSync:P});return}let ae=e.getContext?await e.getContext():new ta,ee=(L&&L.preventScrollReset)===!0;if(H&&pe(H.formMethod)){await jn(f,y,U,j,ae,F.active,P,ee,H,L&&L.unstable_defaultShouldRevalidate);return}I.set(f,{routeId:y,path:U}),await Un(f,y,U,j,ae,F.active,P,ee,H)}async function jn(f,y,E,L,P,N,O,j,F,U){Vt(),I.delete(f);let H=v.fetchers.get(f);De(f,ci(F,H),{flushSync:O});let $=new AbortController,ae=Qe(e.history,E,$.signal,F);if(N){let le=await Rt(L,new URL(ae.url).pathname,ae.signal,f);if(le.type==="aborted")return;if(le.type==="error"){_e(f,y,le.error,{flushSync:O});return}else if(le.matches)L=le.matches;else{_e(f,y,xe(404,{pathname:E}),{flushSync:O});return}}let ee=_t(L,E);if(!ee.route.action&&!ee.route.lazy){let le=xe(405,{method:F.formMethod,pathname:E,routeId:y});_e(f,y,le,{flushSync:O});return}X.set(f,$);let oe=ye,de=et(o,i,ae,L,ee,a,P),ge=await at(ae,de,P,f),ne=ge[ee.route.id];if(!ne){for(let le of de)if(ge[le.route.id]){ne=ge[le.route.id];break}}if(ae.signal.aborted){X.get(f)===$&&X.delete(f);return}if(V.has(f)){if(Ye(ne)||be(ne)){De(f,ke(void 0));return}}else{if(Ye(ne))if(X.delete(f),m>oe){De(f,ke(void 0));return}else return A.add(f),De(f,lt(F)),He(ae,ne,!1,{fetcherSubmission:F,preventScrollReset:j});if(be(ne)){_e(f,y,ne.error);return}}let Se=v.navigation.location||v.location,ze=Qe(e.history,Se,$.signal),nt=s||l,Ie=v.navigation.state!=="idle"?Fe(nt,v.navigation.location,u):v.matches;W(Ie,"Didn't find any matches after fetcher action");let Me=++ye;x.set(f,Me);let Kt=lt(F,ne.data);v.fetchers.set(f,Kt);let{dsMatches:ot,revalidatingFetchers:Be}=sa(ze,P,o,i,e.history,v,Ie,F,Se,a,!1,ue,fe,V,I,A,nt,u,e.patchRoutesOnNavigation!=null,[ee.route.id,ne],U);Be.filter(le=>le.key!==f).forEach(le=>{let xt=le.key,Jr=v.fetchers.get(xt),Gn=lt(void 0,Jr?Jr.data:void 0);v.fetchers.set(xt,Gn),Oe(xt),le.controller&&X.set(xt,le.controller)}),he({fetchers:new Map(v.fetchers)});let bt=()=>Be.forEach(le=>Oe(le.key));$.signal.addEventListener("abort",bt);let{loaderResults:St,fetcherResults:Z}=await Nr(ot,Be,ze,P);if($.signal.aborted)return;if($.signal.removeEventListener("abort",bt),x.delete(f),X.delete(f),Be.forEach(le=>X.delete(le.key)),v.fetchers.has(f)){let le=ke(ne.data);v.fetchers.set(f,le)}let me=Ct(St);if(me)return He(ze,me.result,!1,{preventScrollReset:j});if(me=Ct(Z),me)return A.add(me.key),He(ze,me.result,!1,{preventScrollReset:j});let{loaderData:Xe,errors:We}=pa(v,Ie,St,void 0,Be,Z);Hr(Me),v.navigation.state==="loading"&&Me>m?(W(B,"Expected pending action"),K&&K.abort(),Ke(v.navigation.location,{matches:Ie,loaderData:Xe,errors:We,fetchers:new Map(v.fetchers)})):(he({errors:We,loaderData:ya(v.loaderData,Xe,Ie,We),fetchers:new Map(v.fetchers)}),ue=!1)}async function Un(f,y,E,L,P,N,O,j,F){let U=v.fetchers.get(f);De(f,lt(F,U?U.data:void 0),{flushSync:O});let H=new AbortController,$=Qe(e.history,E,H.signal);if(N){let ne=await Rt(L,new URL($.url).pathname,$.signal,f);if(ne.type==="aborted")return;if(ne.type==="error"){_e(f,y,ne.error,{flushSync:O});return}else if(ne.matches)L=ne.matches;else{_e(f,y,xe(404,{pathname:E}),{flushSync:O});return}}let ae=_t(L,E);X.set(f,H);let ee=ye,oe=et(o,i,$,L,ae,a,P),ge=(await at($,oe,P,f))[ae.route.id];if(X.get(f)===H&&X.delete(f),!$.signal.aborted){if(V.has(f)){De(f,ke(void 0));return}if(Ye(ge))if(m>ee){De(f,ke(void 0));return}else{A.add(f),await He($,ge,!1,{preventScrollReset:j});return}if(be(ge)){_e(f,y,ge.error);return}De(f,ke(ge.data))}}async function He(f,y,E,{submission:L,fetcherSubmission:P,preventScrollReset:N,replace:O}={}){E||(G?.resolve(),G=null),y.response.headers.has("X-Remix-Revalidate")&&(ue=!0);let j=y.response.headers.get("Location");W(j,"Expected a Location header on the redirect Response"),j=ha(j,new URL(f.url),u,e.history);let F=ft(v.location,j,{_isRedirect:!0});if(r){let oe=!1;if(y.response.headers.has("X-Remix-Reload-Document"))oe=!0;else if(wr(j)){const de=Da(j,!0);oe=de.origin!==t.location.origin||Ee(de.pathname,u)==null}if(oe){O?t.location.replace(j):t.location.assign(j);return}}K=null;let U=O===!0||y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:H,formAction:$,formEncType:ae}=v.navigation;!L&&!P&&H&&$&&ae&&(L=ga(v.navigation));let ee=L||P;if(Ho.has(y.response.status)&&ee&&pe(ee.formMethod))await Ue(U,F,{submission:{...ee,formAction:j},preventScrollReset:N||re,enableViewTransition:E?se:void 0});else{let oe=tr(F,L);await Ue(U,F,{overrideNavigation:oe,fetcherSubmission:P,preventScrollReset:N||re,enableViewTransition:E?se:void 0})}}async function at(f,y,E,L){let P,N={};try{P=await Ko(h,f,y,L,E,!1)}catch(O){return y.filter(j=>j.shouldLoad).forEach(j=>{N[j.route.id]={type:"error",error:O}}),N}if(f.signal.aborted)return N;if(!pe(f.method))for(let O of y){if(P[O.route.id]?.type==="error")break;!P.hasOwnProperty(O.route.id)&&!v.loaderData.hasOwnProperty(O.route.id)&&(!v.errors||!v.errors.hasOwnProperty(O.route.id))&&O.shouldCallHandler()&&(P[O.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${O.route.id}`)})}for(let[O,j]of Object.entries(P))if(oi(j)){let F=j.result;N[O]={type:"redirect",response:Zo(F,f,O,y,u)}}else N[O]=await Qo(j);return N}async function Nr(f,y,E,L){let P=at(E,f,L,null),N=Promise.all(y.map(async F=>{if(F.matches&&F.match&&F.request&&F.controller){let H=(await at(F.request,F.matches,L,F.key))[F.match.route.id];return{[F.key]:H}}else return Promise.resolve({[F.key]:{type:"error",error:xe(404,{pathname:F.path})}})})),O=await P,j=(await N).reduce((F,U)=>Object.assign(F,U),{});return{loaderResults:O,fetcherResults:j}}function Vt(){ue=!0,I.forEach((f,y)=>{X.has(y)&&fe.add(y),Oe(y)})}function De(f,y,E={}){v.fetchers.set(f,y),he({fetchers:new Map(v.fetchers)},{flushSync:(E&&E.flushSync)===!0})}function _e(f,y,E,L={}){let P=Ne(v.matches,y);Jt(f),he({errors:{[P.route.id]:E},fetchers:new Map(v.fetchers)},{flushSync:(L&&L.flushSync)===!0})}function $r(f){return Y.set(f,(Y.get(f)||0)+1),V.has(f)&&V.delete(f),v.fetchers.get(f)||za}function Hn(f,y){Oe(f,y?.reason),De(f,ke(null))}function Jt(f){let y=v.fetchers.get(f);X.has(f)&&!(y&&y.state==="loading"&&x.has(f))&&Oe(f),I.delete(f),x.delete(f),A.delete(f),V.delete(f),fe.delete(f),v.fetchers.delete(f)}function zn(f){let y=(Y.get(f)||0)-1;y<=0?(Y.delete(f),V.add(f)):Y.set(f,y),he({fetchers:new Map(v.fetchers)})}function Oe(f,y){let E=X.get(f);E&&(E.abort(y),X.delete(f))}function jr(f){for(let y of f){let E=$r(y),L=ke(E.data);v.fetchers.set(y,L)}}function Ur(){let f=[],y=!1;for(let E of A){let L=v.fetchers.get(E);W(L,`Expected fetcher: ${E}`),L.state==="loading"&&(A.delete(E),f.push(E),y=!0)}return jr(f),y}function Hr(f){let y=[];for(let[E,L]of x)if(L<f){let P=v.fetchers.get(E);W(P,`Expected fetcher: ${E}`),P.state==="loading"&&(Oe(E),x.delete(E),y.push(E))}return jr(y),y.length>0}function Bn(f,y){let E=v.blockers.get(f)||qe;return Q.get(f)!==y&&Q.set(f,y),E}function zr(f){v.blockers.delete(f),Q.delete(f)}function wt(f,y){let E=v.blockers.get(f)||qe;W(E.state==="unblocked"&&y.state==="blocked"||E.state==="blocked"&&y.state==="blocked"||E.state==="blocked"&&y.state==="proceeding"||E.state==="blocked"&&y.state==="unblocked"||E.state==="proceeding"&&y.state==="unblocked",`Invalid blocker state transition: ${E.state} -> ${y.state}`);let L=new Map(v.blockers);L.set(f,y),he({blockers:L})}function Br({currentLocation:f,nextLocation:y,historyAction:E}){if(Q.size===0)return;Q.size>1&&ie(!1,"A router only supports one blocker at a time");let L=Array.from(Q.entries()),[P,N]=L[L.length-1],O=v.blockers.get(P);if(!(O&&O.state==="proceeding")&&N({currentLocation:f,nextLocation:y,historyAction:E}))return P}function Gt(f){let y=xe(404,{pathname:f}),E=s||l,{matches:L,route:P}=Lt(E);return{notFoundMatches:L,route:P,error:y}}function Wn(f,y,E){if(R=f,w=y,b=E||null,!C&&v.navigation===er){C=!0;let L=Yr(v.location,v.matches);L!=null&&he({restoreScrollPosition:L})}return()=>{R=null,w=null,b=null}}function Wr(f,y){return b&&b(f,y.map(L=>_a(L,v.loaderData)))||f.key}function Yn(f,y){if(R&&w){let E=Wr(f,y);R[E]=w()}}function Yr(f,y){if(R){let E=Wr(f,y),L=R[E];if(typeof L=="number")return L}return null}function Et(f,y,E){if(e.patchRoutesOnNavigation)if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:ct(y,E,u,!0)}}else return{active:!0,matches:ct(y,E,u,!0)||[]};return{active:!1,matches:null}}async function Rt(f,y,E,L){if(!e.patchRoutesOnNavigation)return{type:"success",matches:f};let P=f;for(;;){let N=s==null,O=s||l,j=i;try{await e.patchRoutesOnNavigation({signal:E,path:y,matches:P,fetcherKey:L,patch:(H,$)=>{E.aborted||ua(H,$,O,j,o,!1)}})}catch(H){return{type:"error",error:H,partialMatches:P}}finally{N&&!E.aborted&&(l=[...l])}if(E.aborted)return{type:"aborted"};let F=Fe(O,y,u),U=null;if(F){if(Object.keys(F[0].params).length===0)return{type:"success",matches:F};if(U=ct(O,y,u,!0),!(U&&P.length<U.length&&Vr(P,U.slice(0,P.length))))return{type:"success",matches:F}}if(U||(U=ct(O,y,u,!0)),!U||Vr(P,U))return{type:"success",matches:null};P=U}}function Vr(f,y){return f.length===y.length&&f.every((E,L)=>E.route.id===y[L].route.id)}function Vn(f){i={},s=ht(f,o,void 0,i)}function Jn(f,y,E=!1){let L=s==null;ua(f,y,s||l,i,o,E),L&&(l=[...l],he({}))}return k={get basename(){return u},get future(){return c},get state(){return v},get routes(){return l},get window(){return t},initialize:Yt,subscribe:kn,enableScrollRestoration:Wn,navigate:Ar,fetch:$n,revalidate:Fn,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:$r,resetFetcher:Hn,deleteFetcher:zn,dispose:On,getBlocker:Bn,deleteBlocker:zr,patchRoutes:Jn,_internalFetchControllers:X,_internalSetRoutes:Vn,_internalSetStateDoNotUseOrYouWillBreakYourApp(f){he(f)}},e.unstable_instrumentations&&(k=ko(k,e.unstable_instrumentations.map(f=>f.router).filter(Boolean))),k}function Bo(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function lr(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=$t(a||".",Er(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=br(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(g=>g).forEach(g=>h.append("index",g));let p=h.toString();s.search=p?`?${p}`:""}}return r!=="/"&&(s.pathname=xo({basename:r,pathname:s.pathname})),Te(s)}function la(e,t,r){if(!r||!Bo(r))return{path:t};if(r.formMethod&&!si(r.formMethod))return{path:t,error:xe(405,{method:r.formMethod})};let a=()=>({path:t,error:xe(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=qa(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!pe(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((p,[g,R])=>`${p}${g}=${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(!pe(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()}}}W(typeof FormData=="function","FormData is not available in this environment");let l,s;if(r.formData)l=ur(r.formData),s=r.formData;else if(r.body instanceof FormData)l=ur(r.body),s=r.body;else if(r.body instanceof URLSearchParams)l=r.body,s=ma(l);else if(r.body==null)l=new URLSearchParams,s=new FormData;else try{l=new URLSearchParams(r.body),s=ma(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(pe(u.formMethod))return{path:t,submission:u};let h=Ae(t);return e&&h.search&&br(h.search)&&l.append("index",""),h.search=`?${l}`,{path:Te(h),submission:u}}function sa(e,t,r,a,n,o,i,l,s,u,h,c,p,g,R,b,w,C,S,M,D){let T=M?be(M[1])?M[1].error:M[1].data:void 0,_=n.createURL(o.location),k=n.createURL(s),v;if(h&&o.errors){let J=Object.keys(o.errors)[0];v=i.findIndex(q=>q.route.id===J)}else if(M&&be(M[1])){let J=M[0];v=i.findIndex(q=>q.route.id===J)-1}let B=M?M[1].statusCode:void 0,G=B&&B>=400,re={currentUrl:_,currentParams:o.matches[0]?.params||{},nextUrl:k,nextParams:i[0].params,...l,actionResult:T,actionStatus:B},K=pt(i),se=i.map((J,q)=>{let{route:ue}=J,fe=null;if(v!=null&&q>v)fe=!1;else if(ue.lazy)fe=!0;else if(!Rr(ue))fe=!1;else if(h){let{shouldLoad:x}=Ya(ue,o.loaderData,o.errors);fe=x}else Wo(o.loaderData,o.matches[q],J)&&(fe=!0);if(fe!==null)return sr(r,a,e,K,J,u,t,fe);let X=!1;typeof D=="boolean"?X=D:G?X=!1:(c||_.pathname+_.search===k.pathname+k.search||_.search!==k.search||Yo(o.matches[q],J))&&(X=!0);let ye={...re,defaultShouldRevalidate:X},m=dt(J,ye);return sr(r,a,e,K,J,u,t,m,ye,D)}),te=[];return R.forEach((J,q)=>{if(h||!i.some(I=>I.route.id===J.routeId)||g.has(q))return;let ue=o.fetchers.get(q),fe=ue&&ue.state!=="idle"&&ue.data===void 0,X=Fe(w,J.path,C);if(!X){if(S&&fe)return;te.push({key:q,routeId:J.routeId,path:J.path,matches:null,match:null,request:null,controller:null});return}if(b.has(q))return;let ye=_t(X,J.path),m=new AbortController,x=Qe(n,J.path,m.signal),A=null;if(p.has(q))p.delete(q),A=et(r,a,x,X,ye,u,t);else if(fe)c&&(A=et(r,a,x,X,ye,u,t));else{let I;typeof D=="boolean"?I=D:G?I=!1:I=c;let Y={...re,defaultShouldRevalidate:I};dt(ye,Y)&&(A=et(r,a,x,X,ye,u,t,Y))}A&&te.push({key:q,routeId:J.routeId,path:J.path,matches:A,match:ye,request:x,controller:m})}),{dsMatches:se,revalidatingFetchers:te}}function Rr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Ya(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Rr(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 Wo(e,t,r){let a=!t||r.route.id!==t.route.id,n=!e.hasOwnProperty(r.route.id);return a||n}function Yo(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 ua(e,t,r,a,n,o){let i;if(e){let u=a[e];W(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=>Va(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],p=h,[g]=ht([c],n,[],{},!0);Object.assign(p,{element:g.element?g.element:p.element,errorElement:g.errorElement?g.errorElement:p.errorElement,hydrateFallbackElement:g.hydrateFallbackElement?g.hydrateFallbackElement:p.hydrateFallbackElement})}}function Va(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=>Va(r,n)))??!1:!1}var ca=new WeakMap,Ja=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let n=r[t.id];if(W(n,"No route found in manifest"),!n.lazy||typeof n.lazy!="object")return;let o=n.lazy[e];if(!o)return;let i=ca.get(n);i||(i={},ca.set(n,i));let l=i[e];if(l)return l;let s=(async()=>{let u=so(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 p=await o();p!=null&&(Object.assign(n,{[e]:p}),Object.assign(n,a(n)))}typeof n.lazy=="object"&&(n.lazy[e]=void 0,Object.values(n.lazy).every(p=>p===void 0)&&(n.lazy=void 0))})();return i[e]=s,s},da=new WeakMap;function Vo(e,t,r,a,n){let o=r[e.id];if(W(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let h=da.get(o);if(h)return{lazyRoutePromise:h,lazyHandlerPromise:h};let c=(async()=>{W(typeof e.lazy=="function","No lazy route function found");let p=await e.lazy(),g={};for(let R in p){let b=p[R];if(b===void 0)continue;let w=co(R),S=o[R]!==void 0&&R!=="hasErrorBoundary";w?ie(!w,"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.`):g[R]=b}Object.assign(o,g),Object.assign(o,{...a(o),lazy:void 0})})();return da.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=Ja({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 fa(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 Jo(e){return e.matches.some(t=>t.route.middleware)?Ga(e,()=>fa(e)):fa(e)}function Ga(e,t){return Go(e,t,a=>{if(li(a))throw a;return a},ai,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 Go(e,t,r,a,n){let{matches:o,request:i,params:l,context:s,unstable_pattern:u}=e,h=o.flatMap(p=>p.route.middleware?p.route.middleware.map(g=>[p.route.id,g]):[]);return await Ka({request:i,params:l,context:s,unstable_pattern:u},h,t,r,a,n)}async function Ka(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,p=async()=>{if(c)throw new Error("You may only call `next()` once per middleware");try{return c={value:await Ka(e,t,r,a,n,o,i+1)},c.value}catch(g){return c={value:await o(g,u,c)},c.value}};try{let g=await h(e,p),R=g!=null?a(g):void 0;return n(R)?R:c?R??c.value:(c={value:await p()},c.value)}catch(g){return await o(g,u,c)}}function Xa(e,t,r,a,n){let o=Ja({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),i=Vo(a.route,pe(r.method)?"action":"loader",t,e,n);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function sr(e,t,r,a,n,o,i,l,s=null,u){let h=!1,c=Xa(e,t,r,n,o);return{...n,_lazyPromises:c,shouldLoad:l,shouldRevalidateArgs:s,shouldCallHandler(p){return h=!0,s?typeof u=="boolean"?dt(n,{...s,defaultShouldRevalidate:u}):typeof p=="boolean"?dt(n,{...s,defaultShouldRevalidate:p}):dt(n,s):l},resolve(p){let{lazy:g,loader:R,middleware:b}=n.route,w=h||l||p&&!pe(r.method)&&(g||R),C=b&&b.length>0&&!R&&!g;return w&&(pe(r.method)||!C)?Xo({request:r,unstable_pattern:a,match:n,lazyHandlerPromise:c?.handler,lazyRoutePromise:c?.route,handlerOverride:p,scopedContext:i}):Promise.resolve({type:"data",result:void 0})}}}function et(e,t,r,a,n,o,i,l=null){return a.map(s=>s.route.id!==n.route.id?{...s,shouldLoad:!1,shouldRevalidateArgs:l,shouldCallHandler:()=>!1,_lazyPromises:Xa(e,t,r,s,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:sr(e,t,r,pt(a),s,o,i,!0,l))}async function Ko(e,t,r,a,n,o){r.some(u=>u._lazyPromises?.middleware)&&await Promise.all(r.map(u=>u._lazyPromises?.middleware));let i={request:t,unstable_pattern:pt(r),params:r[0].params,context:n,matches:r},s=await e({...i,fetcherKey:a,runClientMiddleware:u=>{let h=i;return Ga(h,()=>u({...h,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(u=>[u._lazyPromises?.handler,u._lazyPromises?.route]))}catch{}return s}async function Xo({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:a,lazyRoutePromise:n,handlerOverride:o,scopedContext:i}){let l,s,u=pe(e.method),h=u?"action":"loader",c=p=>{let g,R=new Promise((C,S)=>g=S);s=()=>g(),e.signal.addEventListener("abort",s);let b=C=>typeof p!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${r.route.id}]`)):p({request:e,unstable_pattern:t,params:r.params,context:i},...C!==void 0?[C]:[]),w=(async()=>{try{return{type:"data",result:await(o?o(S=>b(S)):b())}}catch(C){return{type:"error",result:C}}})();return Promise.race([w,R])};try{let p=u?r.route.action:r.route.loader;if(a||n)if(p){let g,[R]=await Promise.all([c(p).catch(b=>{g=b}),a,n]);if(g!==void 0)throw g;l=R}else{await a;let g=u?r.route.action:r.route.loader;if(g)[l]=await Promise.all([c(g),n]);else if(h==="action"){let R=new URL(e.url),b=R.pathname+R.search;throw xe(405,{method:e.method,pathname:b,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(p)l=await c(p);else{let g=new URL(e.url),R=g.pathname+g.search;throw xe(404,{pathname:R})}}catch(p){return{type:"error",result:p}}finally{s&&e.signal.removeEventListener("abort",s)}return l}async function qo(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 Qo(e){let{result:t,type:r}=e;if(jt(t)){let a;try{a=await qo(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"?cr(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:ri(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}:cr(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 Zo(e,t,r,a,n){let o=e.headers.get("Location");if(W(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!wr(o)){let i=a.slice(0,a.findIndex(l=>l.route.id===r)+1);o=lr(new URL(t.url),i,n,o),e.headers.set("Location",o)}return e}function ha(e,t,r,a){let n=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(wr(e)){let o=e,i=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(n.includes(i.protocol))throw new Error("Invalid redirect location");let l=Ee(i.pathname,r)!=null;if(i.origin===t.origin&&l)return i.pathname+i.search+i.hash}try{let o=a.createURL(e);if(n.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Qe(e,t,r,a){let n=e.createURL(qa(t)).toString(),o={signal:r};if(a&&pe(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=ur(a.formData):o.body=a.formData}return new Request(n,o)}function ur(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function ma(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function ei(e,t,r,a=!1,n=!1){let o={},i=null,l,s=!1,u={},h=r&&be(r[1])?r[1].error:void 0;return e.forEach(c=>{if(!(c.route.id in t))return;let p=c.route.id,g=t[p];if(W(!Ye(g),"Cannot handle redirect results in processLoaderData"),be(g)){let R=g.error;if(h!==void 0&&(R=h,h=void 0),i=i||{},n)i[p]=R;else{let b=Ne(e,p);i[b.route.id]==null&&(i[b.route.id]=R)}a||(o[p]=Wa),s||(s=!0,l=Ve(g.error)?g.error.status:500),g.headers&&(u[p]=g.headers)}else o[p]=g.data,g.statusCode&&g.statusCode!==200&&!s&&(l=g.statusCode),g.headers&&(u[p]=g.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 pa(e,t,r,a,n,o){let{loaderData:i,errors:l}=ei(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 p=o[u];if(W(p,"Did not find corresponding fetcher result"),be(p)){let g=Ne(e.matches,h?.route.id);l&&l[g.route.id]||(l={...l,[g.route.id]:p.error}),e.fetchers.delete(u)}else if(Ye(p))W(!1,"Unhandled fetcher revalidation redirect");else{let g=ke(p.data);e.fetchers.set(u,g)}}),{loaderData:i,errors:l}}function ya(e,t,r,a){let n=Object.entries(t).filter(([,o])=>o!==Wa).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 va(e){return e?be(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 Lt(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 xe(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 qa(e){let t=typeof e=="string"?Ae(e):e;return Te({...t,hash:""})}function ti(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ri(e){return new je(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function ai(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&ni(r))}function ni(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function oi(e){return jt(e.result)&&Ha.has(e.result.status)}function be(e){return e.type==="error"}function Ye(e){return(e&&e.type)==="redirect"}function cr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function jt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function ii(e){return Ha.has(e)}function li(e){return jt(e)&&ii(e.status)&&e.headers.has("Location")}function si(e){return Uo.has(e.toUpperCase())}function pe(e){return $o.has(e.toUpperCase())}function br(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function _t(e,t){let r=typeof t=="string"?Ae(t).search:t.search;if(e[e.length-1].route.index&&br(r||""))return e[e.length-1];let a=Ia(e);return a[a.length-1]}function ga(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 tr(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 ui(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 ci(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 ke(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 di(e,t){try{let r=e.sessionStorage.getItem(Ba);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 fi(e,t){if(t.size>0){let r={};for(let[a,n]of t)r[a]=[...n];try{e.sessionStorage.setItem(Ba,JSON.stringify(r))}catch(a){ie(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function wa(){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 tt=d.createContext(null);tt.displayName="DataRouterState";var Qa=d.createContext(!1);function Za(){return d.useContext(Qa)}var Sr=d.createContext({isTransitioning:!1});Sr.displayName="ViewTransition";var xr=d.createContext(new Map);xr.displayName="Fetchers";var hi=d.createContext(null);hi.displayName="Await";var Re=d.createContext(null);Re.displayName="Navigation";var Ut=d.createContext(null);Ut.displayName="Location";var Le=d.createContext({outlet:null,matches:[],isDataRoute:!1});Le.displayName="Route";var Lr=d.createContext(null);Lr.displayName="RouteError";var en="REACT_ROUTER_ERROR",mi="REDIRECT",pi="ROUTE_ERROR_RESPONSE";function yi(e){if(e.startsWith(`${en}:${mi}:{`))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 vi(e){if(e.startsWith(`${en}:${pi}:{`))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 gi(e,{relative:t}={}){W(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:Pe([r,o])),a.createHref({pathname:l,search:i,hash:n})}function yt(){return d.useContext(Ut)!=null}function Ce(){return W(yt(),"useLocation() may be used only in the context of a <Router> component."),d.useContext(Ut).location}var tn="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function rn(e){d.useContext(Re).static||d.useLayoutEffect(e)}function an(){let{isDataRoute:e}=d.useContext(Le);return e?Oi():wi()}function wi(){W(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(Le),{pathname:n}=Ce(),o=JSON.stringify(Er(a)),i=d.useRef(!1);return rn(()=>{i.current=!0}),d.useCallback((s,u={})=>{if(ie(i.current,tn),!i.current)return;if(typeof s=="number"){r.go(s);return}let h=$t(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Pe([t,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[t,r,o,n,e])}var Ei=d.createContext(null);function Ri(e){let t=d.useContext(Le).outlet;return d.useMemo(()=>t&&d.createElement(Ei.Provider,{value:e},t),[t,e])}function nn(){let{matches:e}=d.useContext(Le),t=e[e.length-1];return t?t.params:{}}function vt(e,{relative:t}={}){let{matches:r}=d.useContext(Le),{pathname:a}=Ce(),n=JSON.stringify(Er(r));return d.useMemo(()=>$t(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function bi(e,t,r){W(yt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=d.useContext(Re),{matches:n}=d.useContext(Le),o=n[n.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;{let w=u&&u.path||"";cn(l,!u||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${w}">) 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="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let h=Ce(),c;c=h;let p=c.pathname||"/",g=p;if(s!=="/"){let w=s.replace(/^\//,"").split("/");g="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let R=Fe(e,{pathname:g});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.`),Pi(R&&R.map(w=>Object.assign({},w,{params:Object.assign({},i,w.params),pathname:Pe([s,a.encodeLocation?a.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?s:Pe([s,a.encodeLocation?a.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),n,r)}function Si(){let e=Tr(),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 xi=d.createElement(Si,null),on=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=vi(e.digest);r&&(e=r)}let t=e!==void 0?d.createElement(Le.Provider,{value:this.props.routeContext},d.createElement(Lr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?d.createElement(Li,{error:e},t):t}};on.contextType=Qa;var rr=new WeakMap;function Li({children:e,error:t}){let{basename:r}=d.useContext(Re);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=yi(t.digest);if(a){let n=rr.get(t);if(n)throw n;let o=$a(a.location,r);if(Na&&!rr.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 rr.set(t,i),i}return d.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Ci({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(Le.Provider,{value:e},r)}function Pi(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);W(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:p,errors:g}=a,R=c.route.loader&&!p.hasOwnProperty(c.route.id)&&(!g||g[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,p)=>{let g,R=!1,b=null,w=null;a&&(g=o&&c.route.id?o[c.route.id]:void 0,b=c.route.errorElement||xi,i&&(l<0&&p===0?(cn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,w=null):l===p&&(R=!0,w=c.route.hydrateFallbackElement||null)));let C=t.concat(n.slice(0,p+1)),S=()=>{let M;return g?M=b:R?M=w:c.route.Component?M=d.createElement(c.route.Component,null):c.route.element?M=c.route.element:M=h,d.createElement(Ci,{match:c,routeContext:{outlet:h,matches:C,isDataRoute:a!=null},children:M})};return a&&(c.route.ErrorBoundary||c.route.errorElement||p===0)?d.createElement(on,{location:a.location,revalidation:a.revalidation,component:b,error:g,children:S(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:u}):S()},null)}function Cr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ln(e){let t=d.useContext(Je);return W(t,Cr(e)),t}function Ge(e){let t=d.useContext(tt);return W(t,Cr(e)),t}function Ti(e){let t=d.useContext(Le);return W(t,Cr(e)),t}function gt(e){let t=Ti(e),r=t.matches[t.matches.length-1];return W(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Mi(){return gt("useRouteId")}function Di(){return Ge("useNavigation").navigation}function Pr(){let{matches:e,loaderData:t}=Ge("useMatches");return d.useMemo(()=>e.map(r=>_a(r,t)),[e,t])}function sn(){let e=Ge("useLoaderData"),t=gt("useLoaderData");return e.loaderData[t]}function ys(e){return Ge("useRouteLoaderData").loaderData[e]}function un(){let e=Ge("useActionData"),t=gt("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Tr(){let e=d.useContext(Lr),t=Ge("useRouteError"),r=gt("useRouteError");return e!==void 0?e:t.errors?.[r]}var _i=0;function vs(e){let{router:t,basename:r}=ln("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(++_i);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 Oi(){let{router:e}=ln("useNavigate"),t=gt("useNavigate"),r=d.useRef(!1);return rn(()=>{r.current=!0}),d.useCallback(async(n,o={})=>{ie(r.current,tn),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var Ea={};function cn(e,t,r){!t&&!Ea[e]&&(Ea[e]=!0,ie(!1,r))}var Ra={};function dr(e,t){!e&&!Ra[t]&&(Ra[t]=!0,console.warn(t))}var ki="useOptimistic",ba=ro[ki],Fi=()=>{};function Ai(e){return ba?ba(e):[e,Fi]}function gs(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 ws=["HydrateFallback","hydrateFallbackElement"],Ii=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 Es({router:e,flushSync:t,onError:r,unstable_useTransitions:a}){a=Za()||a;let[o,i]=d.useState(e.state),[l,s]=Ai(o),[u,h]=d.useState(),[c,p]=d.useState({isTransitioning:!1}),[g,R]=d.useState(),[b,w]=d.useState(),[C,S]=d.useState(),M=d.useRef(new Map),D=d.useCallback((v,{deletedFetchers:B,newErrors:G,flushSync:re,viewTransitionOpts:K})=>{G&&r&&Object.values(G).forEach(te=>r(te,{location:v.location,params:v.matches[0]?.params??{},unstable_pattern:pt(v.matches)})),v.fetchers.forEach((te,J)=>{te.data!==void 0&&M.current.set(J,te.data)}),B.forEach(te=>M.current.delete(te)),dr(re===!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 se=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(dr(K==null||se,"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."),!K||!se){t&&re?t(()=>i(v)):a===!1?i(v):d.startTransition(()=>{a===!0&&s(te=>Sa(te,v)),i(v)});return}if(t&&re){t(()=>{b&&(g?.resolve(),b.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:K.currentLocation,nextLocation:K.nextLocation})});let te=e.window.document.startViewTransition(()=>{t(()=>i(v))});te.finished.finally(()=>{t(()=>{R(void 0),w(void 0),h(void 0),p({isTransitioning:!1})})}),t(()=>w(te));return}b?(g?.resolve(),b.skipTransition(),S({state:v,currentLocation:K.currentLocation,nextLocation:K.nextLocation})):(h(v),p({isTransitioning:!0,flushSync:!1,currentLocation:K.currentLocation,nextLocation:K.nextLocation}))},[e.window,t,b,g,a,s,r]);d.useLayoutEffect(()=>e.subscribe(D),[e,D]),d.useEffect(()=>{c.isTransitioning&&!c.flushSync&&R(new Ii)},[c]),d.useEffect(()=>{if(g&&u&&e.window){let v=u,B=g.promise,G=e.window.document.startViewTransition(async()=>{a===!1?i(v):d.startTransition(()=>{a===!0&&s(re=>Sa(re,v)),i(v)}),await B});G.finished.finally(()=>{R(void 0),w(void 0),h(void 0),p({isTransitioning:!1})}),w(G)}},[u,g,e.window,a,s]),d.useEffect(()=>{g&&u&&l.location.key===u.location.key&&g.resolve()},[g,b,l.location,u]),d.useEffect(()=>{!c.isTransitioning&&C&&(h(C.state),p({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),S(void 0))},[c.isTransitioning,C]);let T=d.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:v=>e.navigate(v),push:(v,B,G)=>e.navigate(v,{state:B,preventScrollReset:G?.preventScrollReset}),replace:(v,B,G)=>e.navigate(v,{replace:!0,state:B,preventScrollReset:G?.preventScrollReset})}),[e]),_=e.basename||"/",k=d.useMemo(()=>({router:e,navigator:T,static:!1,basename:_,onError:r}),[e,T,_,r]);return d.createElement(d.Fragment,null,d.createElement(Je.Provider,{value:k},d.createElement(tt.Provider,{value:l},d.createElement(xr.Provider,{value:M.current},d.createElement(Sr.Provider,{value:c},d.createElement(ji,{basename:_,location:l.location,navigationType:l.historyAction,navigator:T,unstable_useTransitions:a},d.createElement(Ni,{routes:e.routes,future:e.future,state:l,isStatic:!1,onError:r})))))),null)}function Sa(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 Ni=d.memo($i);function $i({routes:e,future:t,state:r,isStatic:a,onError:n}){return bi(e,void 0,{state:r,isStatic:a,onError:n})}function Rs(e){return Ri(e.context)}function ji({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,unstable_useTransitions:i}){W(!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=Ae(r));let{pathname:u="/",search:h="",hash:c="",state:p=null,key:g="default",unstable_mask:R}=r,b=d.useMemo(()=>{let w=Ee(u,l);return w==null?null:{location:{pathname:w,search:h,hash:c,state:p,key:g,unstable_mask:R},navigationType:a}},[l,u,h,c,p,g,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(Ut.Provider,{children:t,value:b}))}function Ui(){return{params:nn(),loaderData:sn(),actionData:un(),matches:Pr()}}function bs(e){return function(){const r=Ui();return d.createElement(e,r)}}function Hi(){return{params:nn(),loaderData:sn(),actionData:un(),error:Tr()}}function Ss(e){return function(){const r=Hi();return d.createElement(e,r)}}var Ot="get",kt="application/x-www-form-urlencoded";function Ht(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function zi(e){return Ht(e)&&e.tagName.toLowerCase()==="button"}function Bi(e){return Ht(e)&&e.tagName.toLowerCase()==="form"}function Wi(e){return Ht(e)&&e.tagName.toLowerCase()==="input"}function Yi(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vi(e,t){return e.button===0&&(!t||t==="_self")&&!Yi(e)}function fr(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 Ji(e,t){let r=fr(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var Pt=null;function Gi(){if(Pt===null)try{new FormData(document.createElement("form"),0),Pt=!1}catch{Pt=!0}return Pt}var Ki=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ar(e){return e!=null&&!Ki.has(e)?(ie(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${kt}"`),null):e}function Xi(e,t){let r,a,n,o,i;if(Bi(e)){let l=e.getAttribute("action");a=l?Ee(l,t):null,r=e.getAttribute("method")||Ot,n=ar(e.getAttribute("enctype"))||kt,o=new FormData(e)}else if(zi(e)||Wi(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")||Ot,n=ar(e.getAttribute("formenctype"))||ar(l.getAttribute("enctype"))||kt,o=new FormData(l,e),!Gi()){let{name:u,type:h,value:c}=e;if(h==="image"){let p=u?`${u}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else u&&o.append(u,c)}}else{if(Ht(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ot,a=null,n=kt,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var qi=-1,Qi=-2,Zi=-3,el=-4,tl=-5,rl=-6,al=-7,nl="B",ol="D",dn="E",il="M",ll="N",fn="P",sl="R",ul="S",cl="Y",dl="U",fl="Z",hn=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function hl(){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 nr=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function hr(e){const{hydrated:t,values:r}=this;if(typeof e=="number")return xa.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,xa.call(this,a)}function xa(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 al:u(void 0);continue;case tl:u(null);continue;case Qi:u(NaN);continue;case rl:u(1/0);continue;case Zi:u(-1/0);continue;case el: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,p,g]=h;switch(c){case ol:u(t[s]=new Date(p));continue;case dl:u(t[s]=new URL(p));continue;case nl:u(t[s]=BigInt(p));continue;case sl:u(t[s]=new RegExp(p,g));continue;case cl:u(t[s]=Symbol.for(p));continue;case ul:const R=new Set;t[s]=R;for(let D=h.length-1;D>0;D--)i.push([h[D],T=>{R.add(T)}]);u(R);continue;case il:const b=new Map;t[s]=b;for(let D=h.length-2;D>0;D-=2){const T=[];i.push([h[D+1],_=>{T[1]=_}]),i.push([h[D],_=>{T[0]=_}]),l.push(()=>{b.set(T[0],T[1])})}u(b);continue;case ll:const w=Object.create(null);t[s]=w;for(const D of Object.keys(p).reverse()){const T=[];i.push([p[D],_=>{T[1]=_}]),i.push([Number(D.slice(1)),_=>{T[0]=_}]),l.push(()=>{w[T[0]]=T[1]})}u(w);continue;case fn:if(t[p])u(t[s]=t[p]);else{const D=new hn;a[p]=D,u(t[s]=D.promise)}continue;case dn:const[,C,S]=h;let M=S&&nr&&nr[S]?new nr[S](C):new Error(C);t[s]=M,u(M);continue;case fl:u(t[s]=t[p]);continue;default:if(Array.isArray(n)){const D=[],T=h.slice(1);for(let _=0;_<T.length;_++){const k=T[_];i.push([k,v=>{D[_]=v}])}l.push(()=>{for(const _ of n){const k=_(h[0],...D);if(k){u(t[s]=k.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{const c=[];t[s]=c;for(let p=0;p<h.length;p++){const g=h[p];g!==qi&&i.push([g,R=>{c[p]=R}])}u(c);continue}else{const c={};t[s]=c;for(const p of Object.keys(h).reverse()){const g=[];i.push([h[p],R=>{g[1]=R}]),i.push([Number(p.slice(1)),R=>{g[0]=R}]),l.push(()=>{c[g[0]]=g[1]})}u(c);continue}}for(;l.length>0;)l.pop()();return o}async function ml(e,t){const{plugins:r}=t??{},a=new hn,n=e.pipeThrough(hl()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},i=await pl.call(o,n);let l=a.promise;return i.done?a.resolve():l=yl.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 pl(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:hr.call(this,r)}}async function yl(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case fn:{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=hr.call(this,l);o.resolve(s);break}case dn:{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=hr.call(this,l);o.reject(s);break}default:throw new SyntaxError}t=await e.read()}}async function vl(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 gl={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},wl=/[&><\u2028\u2029]/g;function mr(e){return e.replace(wl,t=>gl[t])}function we(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var pr=Symbol("SingleFetchRedirect"),mn=class extends Error{},El=202,Rl=new Set([100,101,204,205]);function xs(e,t,r,a,n,o){let i=bl(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}},Ml,a,n,o);return async l=>l.runClientMiddleware(i)}function bl(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 Sl(l,r,n,o);let p=u.some(g=>{let{hasLoader:R,hasClientLoader:b}=t(g);return g.shouldCallHandler()&&R&&!b});return!a&&!p?xl(l,t,r,n,o):h?Pl(l,r,n,o):Ll(l,c,t,r,a,n,o,i)}}async function Sl(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 jt(i.result)||Ve(i.result)||cr(i.result)?{[n.route.id]:i}:{[n.route.id]:{type:i.type,result:Do(i.result,o)}}}async function xl(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:p}=await r(e,a,n,[h]);return mt(p,h)}):await s();i[l.route.id]={type:"data",result:c}}catch(u){i[l.route.id]={type:"error",result:u}}}))),i}async function Ll(e,t,r,a,n,o,i,l=()=>!0){let s=new Set,u=!1,h=e.matches.map(()=>La()),c=La(),p={},g=Promise.all(e.matches.map(async(b,w)=>b.resolve(async C=>{h[w].resolve();let S=b.route.id,{hasLoader:M,hasClientLoader:D,hasShouldRevalidate:T}=r(b),_=!b.shouldRevalidateArgs||b.shouldRevalidateArgs.actionStatus==null||b.shouldRevalidateArgs.actionStatus<400;if(!b.shouldCallHandler(_)){u||(u=b.shouldRevalidateArgs!=null&&M&&T===!0);return}if(l(b)&&D){M&&(u=!0);try{let v=await C(async()=>{let{data:B}=await a(e,o,i,[S]);return mt(B,S)});p[S]={type:"data",result:v}}catch(v){p[S]={type:"error",result:v}}return}M&&s.add(S);try{let v=await C(async()=>{let B=await c.promise;return mt(B,S)});p[S]={type:"data",result:v}}catch(v){p[S]={type:"error",result:v}}})));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 w=await a(e,o,i,b);c.resolve(w.data)}catch(w){c.reject(w)}}return await g,await Cl(c.promise,e.matches,s,p),p}async function Cl(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 mn&&(a[i].result=n)})}catch{}}async function Pl(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 Tl(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 pn(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=`${t.replace(/\/$/,"")}/_root.${a}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${a}`,n}async function Ml(e,t,r,a){let{request:n}=e,o=pn(n.url,t,r,"data");n.method==="GET"&&(o=Tl(o),a&&o.searchParams.set("_routes",a.join(",")));let i=await fetch(o,await vl(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:El,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(Rl.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 Dl(i.body,window),s;if(n.method==="GET"){let u=l.value;pr in u?s={redirect:u[pr]}: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 Dl(e,t){return ml(e,{plugins:[(r,...a)=>{if(r==="SanitizedError"){let[n,o,i]=a,l=Error;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:{[pr]: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 _o(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 mn(`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 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}}async function yn(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 _l(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=Dr(e,r);return En(a,n)}function vn(e){return e.css?e.css.map(t=>({rel:"stylesheet",href:t})):[]}async function Ol(e){if(!e.css)return;let t=vn(e);await Promise.all(t.map(wn))}async function gn(e,t){if(!e.css&&!t.links||!Nl())return;let r=[];if(e.css&&r.push(...vn(e)),t.links&&r.push(...t.links()),r.length===0)return;let a=[];for(let n of r)!Mr(n)&&n.rel==="stylesheet"&&a.push({...n,rel:"preload",as:"style"});await Promise.all(a.map(wn))}async function wn(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 Mr(e){return e!=null&&typeof e.page=="string"}function kl(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 Fl(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await yn(o,r);return i.links?i.links():[]}return[]}));return En(a.flat(1).filter(kl).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function Ca(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 Dr(e,t,{includeHydrateFallback:r}={}){return Al(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 Al(e){return[...new Set(e)]}function Il(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function En(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Mr(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify(Il(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}var Tt;function Nl(){if(Tt!==void 0)return Tt;let e=document.createElement("link");return Tt=e.relList.supports("preload"),e=null,Tt}function $l(){return d.createElement(yr,{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 Rn(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 jl(e,t,r){let a=bn(t),n=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?$l:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id==="root"?()=>d.createElement(Ln,{error:Tr()}):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 Ls(e,t,r,a,n,o){return _r(t,r,a,n,o,"",Rn(t),e)}function Mt(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 or(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 _r(e,t,r,a,n,o="",i=Rn(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 p(S){if(!s.hasAction)throw or("action",s.id);return h(S)}function g(S){import(S)}function R(S){S.clientActionModule&&g(S.clientActionModule),S.clientLoaderModule&&g(S.clientLoaderModule)}async function b(S){let M=t[s.id],D=M?gn(s,M):Promise.resolve();try{return S()}finally{await D}}let w={id:s.id,index:s.index,path:s.path};if(u){Object.assign(w,{...w,...jl(s,u,n),middleware:u.clientMiddleware,handle:u.handle,shouldRevalidate:Pa(w.path,u,s,a,l)});let S=r&&r.loaderData&&s.id in r.loaderData,M=S?r?.loaderData?.[s.id]:void 0,D=r&&r.errors&&s.id in r.errors,T=D?r?.errors?.[s.id]:void 0,_=l==null&&(u.clientLoader?.hydrate===!0||!s.hasLoader);w.loader=async({request:k,params:v,context:B,unstable_pattern:G},re)=>{try{return await b(async()=>(we(u,"No `routeModule` available for critical-route loader"),u.clientLoader?u.clientLoader({request:k,params:v,context:B,unstable_pattern:G,async serverLoader(){if(Mt("loader",s),_){if(S)return M;if(D)throw T}return c(re)}}):c(re)))}finally{_=!1}},w.loader.hydrate=zl(s.id,u.clientLoader,s.hasLoader,n),w.action=({request:k,params:v,context:B,unstable_pattern:G},re)=>b(async()=>{if(we(u,"No `routeModule` available for critical-route action"),!u.clientAction){if(n)throw or("clientAction",s.id);return p(re)}return u.clientAction({request:k,params:v,context:B,unstable_pattern:G,async serverAction(){return Mt("action",s),p(re)}})})}else{s.hasClientLoader||(w.loader=(D,T)=>b(()=>c(T))),s.hasClientAction||(w.action=(D,T)=>b(()=>{if(n)throw or("clientAction",s.id);return p(T)}));let S;async function M(){return S?await S:(S=(async()=>{(s.clientLoaderModule||s.clientActionModule)&&await new Promise(T=>setTimeout(T,0));let D=Hl(s,t);return R(s),await D})(),await S)}w.lazy={loader:s.hasClientLoader?async()=>{let{clientLoader:D}=s.clientLoaderModule?await import(s.clientLoaderModule):await M();return we(D,"No `clientLoader` export found"),(T,_)=>D({...T,async serverLoader(){return Mt("loader",s),c(_)}})}:void 0,action:s.hasClientAction?async()=>{let D=s.clientActionModule?import(s.clientActionModule):M();R(s);let{clientAction:T}=await D;return we(T,"No `clientAction` export found"),(_,k)=>T({..._,async serverAction(){return Mt("action",s),p(k)}})}:void 0,middleware:s.hasClientMiddleware?async()=>{let{clientMiddleware:D}=s.clientMiddlewareModule?await import(s.clientMiddlewareModule):await M();return we(D,"No `clientMiddleware` export found"),D}:void 0,shouldRevalidate:async()=>{let D=await M();return Pa(w.path,D,s,a,l)},handle:async()=>(await M()).handle,Component:async()=>(await M()).Component,ErrorBoundary:s.hasErrorBoundary?async()=>(await M()).ErrorBoundary:void 0}}let C=_r(e,t,r,a,n,s.id,i,l);return C.length>0&&(w.children=C),w})}function Pa(e,t,r,a,n){if(n)return Ul(r.id,t.shouldRevalidate,n);if(!a&&r.hasLoader&&!r.hasClientLoader){let o=e?Fa(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 Ul(e,t,r){let a=!1;return n=>a?t?t(n):n.defaultShouldRevalidate:(a=!0,r.has(e))}async function Hl(e,t){let r=yn(e,t),a=Ol(e),n=await r;return await Promise.all([a,gn(e,n)]),{Component:bn(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 bn(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function zl(e,t,r,a){return a&&e!=="root"||t!=null&&(t.hydrate===!0||r!==!0)}var Ft=new Set,Bl=1e3,It=new Set,Wl=7680;function Or(e,t){return e.mode==="lazy"&&t===!0}function Yl({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=Fe(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 Cs(e,t,r,a,n,o,i){if(Or(n,a))return async({path:l,patch:s,signal:u,fetcherKey:h})=>{if(It.has(l))return;let{state:c}=e();await Sn([l],h?window.location.href:Te(c.navigation.location||c.location),t,r,a,o,i,n.manifestPath,s,u)}}function Ps(e,t,r,a,n,o){d.useEffect(()=>{if(!Or(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 p=h.tagName==="A"?h.pathname:new URL(c,window.location.origin).pathname;It.has(p)||Ft.add(p)}async function l(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(i);let h=Array.from(Ft.keys()).filter(c=>It.has(c)?(Ft.delete(c),!1):!0);if(h.length!==0)try{await Sn(h,null,t,r,a,o,e.basename,n.manifestPath,e.patchRoutes)}catch(c){console.error("Failed to fetch manifest patches",c)}}let s=Gl(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 Vl(e,t){let r=e||"/__manifest";return t==null?r:`${t}${r}`.replace(/\/+/g,"/")}var ir="react-router-manifest-version";async function Sn(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(Vl(l,i),window.location.origin);if(c.search=h.toString(),c.toString().length>Wl){Ft.clear();return}let p;try{let w=await fetch(c,{signal:u});if(w.ok){if(w.status===204&&w.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(ir)===r.version){console.error("Unable to discover routes due to manifest version mismatch.");return}sessionStorage.setItem(ir,r.version)}catch{}window.location.href=t,console.warn("Detected manifest version mismatch, reloading..."),await new Promise(()=>{})}else if(w.status>=400)throw new Error(await w.text())}else throw new Error(`${w.status} ${w.statusText}`);try{sessionStorage.removeItem(ir)}catch{}p=await w.json()}catch(w){if(u?.aborted)return;throw w}let g=new Set(Object.keys(r.routes)),R=Object.values(p).reduce((w,C)=>(C&&!g.has(C.id)&&(w[C.id]=C),w),{});Object.assign(r.routes,R),e.forEach(w=>Jl(w,It));let b=new Set;Object.values(R).forEach(w=>{w&&(!w.parentId||!R[w.parentId])&&b.add(w.parentId)}),b.forEach(w=>s(w||null,_r(R,a,null,n,o,w)))}function Jl(e,t){if(t.size>=Bl){let r=t.values().next().value;t.delete(r)}t.add(e)}function Gl(e,t){let r;return(...a)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...a),t)}}function kr(){let e=d.useContext(Je);return we(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function zt(){let e=d.useContext(tt);return we(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Bt=d.createContext(void 0);Bt.displayName="FrameworkContext";function rt(){let e=d.useContext(Bt);return we(e,"You must render this element inside a <HydratedRouter> element"),e}function Kl(e,t){let r=d.useContext(Bt),[a,n]=d.useState(!1),[o,i]=d.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:h,onTouchStart:c}=t,p=d.useRef(null);d.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let b=C=>{C.forEach(S=>{i(S.isIntersecting)})},w=new IntersectionObserver(b,{threshold:.5});return p.current&&w.observe(p.current),()=>{w.disconnect()}}},[e]),d.useEffect(()=>{if(a){let b=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(b)}}},[a]);let g=()=>{n(!0)},R=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,p,{}]:[o,p,{onFocus:st(l,g),onBlur:st(s,R),onMouseEnter:st(u,g),onMouseLeave:st(h,R),onTouchStart:st(c,g)}]:[!1,p,{}]}function st(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Fr(e,t,r){if(r&&!Nt)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 Ta="data-react-router-critical-css";function Ts({nonce:e,crossOrigin:t}){let{isSpaMode:r,manifest:a,routeModules:n,criticalCss:o}=rt(),{errors:i,matches:l}=zt(),s=Fr(l,i,r),u=d.useMemo(()=>_l(s,n,a),[s,n,a]);return d.createElement(d.Fragment,null,typeof o=="string"?d.createElement("style",{[Ta]:"",nonce:e,dangerouslySetInnerHTML:{__html:o}}):null,typeof o=="object"?d.createElement("link",{[Ta]:"",rel:"stylesheet",href:o.href,nonce:e,crossOrigin:t}):null,u.map(({key:h,link:c})=>Mr(c)?d.createElement(xn,{key:h,nonce:e,...c,crossOrigin:c.crossOrigin??t}):d.createElement("link",{key:h,nonce:e,...c,crossOrigin:c.crossOrigin??t})))}function xn({page:e,...t}){let{router:r}=kr(),a=d.useMemo(()=>Fe(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?d.createElement(ql,{page:e,matches:a,...t}):null}function Xl(e){let{manifest:t,routeModules:r}=rt(),[a,n]=d.useState([]);return d.useEffect(()=>{let o=!1;return Fl(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function ql({page:e,matches:t,...r}){let a=Ce(),{future:n,manifest:o,routeModules:i}=rt(),{basename:l}=kr(),{loaderData:s,matches:u}=zt(),h=d.useMemo(()=>Ca(e,t,u,o,a,"data"),[e,t,u,o,a]),c=d.useMemo(()=>Ca(e,t,u,o,a,"assets"),[e,t,u,o,a]),p=d.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let b=new Set,w=!1;if(t.forEach(S=>{let M=o.routes[S.route.id];!M||!M.hasLoader||(!h.some(D=>D.route.id===S.route.id)&&S.route.id in s&&i[S.route.id]?.shouldRevalidate||M.hasClientLoader?w=!0:b.add(S.route.id))}),b.size===0)return[];let C=pn(e,l,n.unstable_trailingSlashAwareDataRequests,"data");return w&&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]),g=d.useMemo(()=>Dr(c,o),[c,o]),R=Xl(c);return d.createElement(d.Fragment,null,p.map(b=>d.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...r})),g.map(b=>d.createElement("link",{key:b,rel:"modulepreload",href:b,...r})),R.map(({key:b,link:w})=>d.createElement("link",{key:b,nonce:r.nonce,...w,crossOrigin:w.crossOrigin??r.crossOrigin})))}function Ms(){let{isSpaMode:e,routeModules:t}=rt(),{errors:r,matches:a,loaderData:n}=zt(),o=Ce(),i=Fr(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 p=i[c],g=p.route.id,R=n[g],b=p.params,w=t[g],C=[],S={id:g,data:R,loaderData:R,meta:[],params:p.params,pathname:p.pathname,handle:p.route.handle,error:l};if(h[c]=S,w?.meta?C=typeof w.meta=="function"?w.meta({data:R,loaderData:R,params:b,location:o,matches:h,error:l}):Array.isArray(w.meta)?[...w.meta]:w.meta:u&&(C=[...u]),C=C||[],!Array.isArray(C))throw new Error("The route at "+p.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:p,...g}=c;if(!Ql(p))return console.warn(`A meta object uses an invalid tagName: ${p}. Expected either 'link' or 'meta'`),null;let R=p;return d.createElement(R,{key:JSON.stringify(g),...g})}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 p=JSON.stringify(c["script:ld+json"]);return d.createElement("script",{key:`script:ld+json:${p}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:mr(p)}})}catch{return null}return d.createElement("meta",{key:JSON.stringify(c),...c})}))}function Ql(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}var Nt=!1;function Zl(){Nt=!0}function es(e){let{manifest:t,serverHandoffString:r,isSpaMode:a,renderMeta:n,routeDiscovery:o,ssr:i}=rt(),{router:l,static:s,staticContext:u}=kr(),{matches:h}=zt(),c=Za(),p=Or(o,i);n&&(n.didRenderScripts=!0);let g=Fr(h,null,a);d.useEffect(()=>{Zl()},[]);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());`:" ",M=s?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${p?"":`import ${JSON.stringify(t.url)}`};
|
|
15
|
+
${g.map((D,T)=>{let _=`route${T}`,k=t.routes[D.route.id];we(k,`Route ${D.route.id} not found in manifest`);let{clientActionModule:v,clientLoaderModule:B,clientMiddlewareModule:G,hydrateFallbackModule:re,module:K}=k,se=[...v?[{module:v,varName:`${_}_clientAction`}]:[],...B?[{module:B,varName:`${_}_clientLoader`}]:[],...G?[{module:G,varName:`${_}_clientMiddleware`}]:[],...re?[{module:re,varName:`${_}_HydrateFallback`}]:[],{module:K,varName:`${_}_main`}];if(se.length===1)return`import * as ${_} from ${JSON.stringify(K)};`;let te=se.map(q=>`import * as ${q.varName} from "${q.module}";`).join(`
|
|
16
|
+
`),J=`const ${_} = {${se.map(q=>`...${q.varName}`).join(",")}};`;return[te,J].join(`
|
|
17
|
+
`)}).join(`
|
|
18
|
+
`)}
|
|
19
|
+
${p?`window.__reactRouterManifest = ${JSON.stringify(Yl(t,l),null,2)};`:""}
|
|
20
|
+
window.__reactRouterRouteModules = {${g.map((D,T)=>`${JSON.stringify(D.route.id)}:route${T}`).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:M},type:"module",async:!0}))},[]),b=Nt||c?[]:ts(t.entry.imports.concat(Dr(g,t,{includeHydrateFallback:!0}))),w=typeof t.sri=="object"?t.sri:{};return dr(!c,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),Nt||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:w})}}):null,p?null:d.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:w[t.url],suppressHydrationWarning:!0}),d.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:w[t.entry.module],suppressHydrationWarning:!0}),b.map(C=>d.createElement("link",{key:C,rel:"modulepreload",href:C,crossOrigin:e.crossOrigin,integrity:w[C],suppressHydrationWarning:!0})),R)}function ts(e){return[...new Set(e)]}function rs(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ds=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(Ln,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function Ln({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(yr,{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(yr,{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 yr({title:e,renderScripts:t,isOutsideRemixApp:r,children:a}){let{routeModules:n}=rt();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(es,null):null)))}var as=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{as&&(window.__reactRouterVersion="7.13.1")}catch{}var Cn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pn=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:p,unstable_defaultShouldRevalidate:g,...R},b){let{basename:w,navigator:C,unstable_useTransitions:S}=d.useContext(Re),M=typeof h=="string"&&Cn.test(h),D=$a(h,w);h=D.to;let T=gi(h,{relative:n}),_=Ce(),k=null;if(l){let J=$t(l,[],_.unstable_mask?_.unstable_mask.pathname:"/",!0);w!=="/"&&(J.pathname=J.pathname==="/"?w:Pe([w,J.pathname])),k=C.createHref(J)}let[v,B,G]=Kl(a,R),re=is(h,{replace:i,unstable_mask:l,state:s,target:u,preventScrollReset:c,relative:n,viewTransition:p,unstable_defaultShouldRevalidate:g,unstable_useTransitions:S});function K(J){t&&t(J),J.defaultPrevented||re(J)}let se=!(D.isExternal||o),te=d.createElement("a",{...R,...G,href:(se?k:void 0)||D.absoluteURL||T,onClick:se?K:t,ref:rs(b,B),target:u,"data-discover":!M&&r==="render"?"true":void 0});return v&&!M?d.createElement(d.Fragment,null,te,d.createElement(xn,{page:T})):te});Pn.displayName="Link";var ns=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}),p=Ce(),g=d.useContext(tt),{navigator:R,basename:b}=d.useContext(Re),w=g!=null&&fs(c)&&l===!0,C=R.encodeLocation?R.encodeLocation(c).pathname:c.pathname,S=p.pathname,M=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(S=S.toLowerCase(),M=M?M.toLowerCase():null,C=C.toLowerCase()),M&&b&&(M=Ee(M,b)||M);const D=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let T=S===C||!n&&S.startsWith(C)&&S.charAt(D)==="/",_=M!=null&&(M===C||!n&&M.startsWith(C)&&M.charAt(C.length)==="/"),k={isActive:T,isPending:_,isTransitioning:w},v=T?t:void 0,B;typeof a=="function"?B=a(k):B=[a,T?"active":null,_?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let G=typeof o=="function"?o(k):o;return d.createElement(Pn,{...u,"aria-current":v,className:B,ref:h,style:G,to:i,viewTransition:l},typeof s=="function"?s(k):s)});ns.displayName="NavLink";var Tn=d.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=Ot,action:l,onSubmit:s,relative:u,preventScrollReset:h,viewTransition:c,unstable_defaultShouldRevalidate:p,...g},R)=>{let{unstable_useTransitions:b}=d.useContext(Re),w=_n(),C=us(l,{relative:u}),S=i.toLowerCase()==="get"?"get":"post",M=typeof l=="string"&&Cn.test(l),D=T=>{if(s&&s(T),T.defaultPrevented)return;T.preventDefault();let _=T.nativeEvent.submitter,k=_?.getAttribute("formmethod")||i,v=()=>w(_||T.currentTarget,{fetcherKey:t,method:k,navigate:r,replace:n,state:o,relative:u,preventScrollReset:h,viewTransition:c,unstable_defaultShouldRevalidate:p});b&&r!==!1?d.startTransition(()=>v()):v()};return d.createElement("form",{ref:R,method:S,action:C,onSubmit:a?s:D,...g,"data-discover":!M&&e==="render"?"true":void 0})});Tn.displayName="Form";function os({getKey:e,storageKey:t,...r}){let a=d.useContext(Bt),{basename:n}=d.useContext(Re),o=Ce(),i=Pr();cs({getKey:e,storageKey:t});let l=d.useMemo(()=>{if(!a||!e)return null;let u=gr(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 p=JSON.parse(sessionStorage.getItem(u)||"{}")[h||window.history.state.key];typeof p=="number"&&window.scrollTo(0,p)}catch(c){console.error(c),sessionStorage.removeItem(u)}}).toString();return d.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${mr(JSON.stringify(t||vr))}, ${mr(JSON.stringify(l))})`}})}os.displayName="ScrollRestoration";function Mn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wt(e){let t=d.useContext(Je);return W(t,Mn(e)),t}function Dn(e){let t=d.useContext(tt);return W(t,Mn(e)),t}function is(e,{target:t,replace:r,unstable_mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,unstable_defaultShouldRevalidate:s,unstable_useTransitions:u}={}){let h=an(),c=Ce(),p=vt(e,{relative:i});return d.useCallback(g=>{if(Vi(g,t)){g.preventDefault();let R=r!==void 0?r:Te(c)===Te(p),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,p,r,a,n,t,e,o,i,l,s,u])}function _s(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(fr(e)),r=d.useRef(!1),a=Ce(),n=d.useMemo(()=>Ji(a.search,r.current?null:t.current),[a.search]),o=an(),i=d.useCallback((l,s)=>{const u=fr(typeof l=="function"?l(new URLSearchParams(n)):l);r.current=!0,o("?"+u,s)},[o,n]);return[n,i]}var ls=0,ss=()=>`__${String(++ls)}__`;function _n(){let{router:e}=Wt("useSubmit"),{basename:t}=d.useContext(Re),r=Mi(),a=e.fetch,n=e.navigate;return d.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:h,body:c}=Xi(o,t);if(i.navigate===!1){let p=i.fetcherKey||ss();await a(p,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 us(e,{relative:t}={}){let{basename:r}=d.useContext(Re),a=d.useContext(Le);W(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...vt(e||".",{relative:t})},i=Ce();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:Pe([r,o.pathname])),Te(o)}function Os({key:e}={}){let{router:t}=Wt("useFetcher"),r=Dn("useFetcher"),a=d.useContext(xr),n=d.useContext(Le),o=n.matches[n.matches.length-1]?.route.id;W(a,"useFetcher must be used inside a FetchersContext"),W(n,"useFetcher must be used inside a RouteContext"),W(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:p}=t;d.useEffect(()=>(h(l),()=>u(l)),[u,h,l]);let g=d.useCallback(async(T,_)=>{W(o,"No routeId available for fetcher.load()"),await p(l,o,T,_)},[l,o,p]),R=_n(),b=d.useCallback(async(T,_)=>{await R(T,{..._,navigate:!1,fetcherKey:l})},[l,R]),w=d.useCallback(T=>c(l,T),[c,l]),C=d.useMemo(()=>{let T=d.forwardRef((_,k)=>d.createElement(Tn,{..._,navigate:!1,fetcherKey:l,ref:k}));return T.displayName="fetcher.Form",T},[l]),S=r.fetchers.get(l)||za,M=a.get(l);return d.useMemo(()=>({Form:C,submit:b,load:g,reset:w,...S,data:M}),[C,b,g,w,S,M])}var vr="react-router-scroll-positions",Dt={};function gr(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 cs({getKey:e,storageKey:t}={}){let{router:r}=Wt("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=Dn("useScrollRestoration"),{basename:o}=d.useContext(Re),i=Ce(),l=Pr(),s=Di();d.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),ds(d.useCallback(()=>{if(s.state==="idle"){let u=gr(i,l,o,e);Dt[u]=window.scrollY}try{sessionStorage.setItem(t||vr,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||vr);u&&(Dt=JSON.parse(u))}catch{}},[t]),d.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(Dt,()=>window.scrollY,e?(h,c)=>gr(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 ds(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 fs(e,{relative:t}={}){let r=d.useContext(Sr);W(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Wt("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 At(n.pathname,i)!=null||At(n.pathname,o)!=null}export{bs as A,Ss as B,es as C,un as D,je as E,Bt as F,vs as G,Os as H,ro as I,Pn as J,Ts as L,Ms as M,Rl as N,Rs as O,to as R,os as S,d as a,W as b,Ds as c,Es as d,Dl as e,_r as f,ps as g,Cs as h,Ve as i,xs as j,ms as k,Ls as l,Fe as m,gs as n,ws as o,hs as p,ys as q,eo as r,zl as s,_s as t,Ps as u,an as v,ns as w,Di as x,Pr as y,Ce as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
1
|
+
import{a as s}from"./chunk-LFPYN7LY-Cj1DJmJR.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 He,p as et,J as tt}from"./chunk-LFPYN7LY-Cj1DJmJR.js";function rt(e,...t){const r=new URL("https://base-ui.com/production-error");return r.searchParams.set("code",e.toString()),t.forEach(o=>r.searchParams.append("args[]",o)),`Base UI error #${e}; visit ${r} for the full message.`}const xe={};function Ne(e,t){const r=T.useRef(xe);return r.current===xe&&(r.current=e(t)),r}function ve(e,t,r,o){const n=Ne(Me).current;return nt(n,e,t,r,o)&&Oe(n,[e,t,r,o]),n.callback}function ot(e){const t=Ne(Me).current;return st(t,e)&&Oe(t,e),t.callback}function Me(){return{callback:null,cleanup:null,refs:[]}}function nt(e,t,r,o,n){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==o||e.refs[3]!==n}function st(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 at=parseInt(T.version,10);function it(e){return at>=e}function Ae(e){if(!T.isValidElement(e))return null;const t=e,r=t.props;return(it(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 lt(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 ct(e,t){return typeof e=="function"?e(t):e}function dt(e,t){return typeof e=="function"?e(t):e}const D={};function ut(e,t,r,o,n){let s={...ce(e,D)};return t&&(s=ee(s,t)),r&&(s=ee(s,r)),o&&(s=ee(s,o)),s}function mt(e){if(e.length===0)return D;if(e.length===1)return ce(e[0],D);let t={...ce(e[0],D)};for(let r=1;r<e.length;r+=1)t=ee(t,e[r]);return t}function ee(e,t){return _e(t)?t(e):ft(e,t)}function ft(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]=je(e.className,o);break}default:bt(r,o)?e[r]=pt(e[r],o):e[r]=o}}return e}function bt(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 _e(e){return typeof e=="function"}function ce(e,t){return _e(e)?e(t):e??D}function pt(e,t){return t?e?r=>{if(ht(r)){const n=r;gt(n);const s=t(n);return n.baseUIHandlerPrevented||e?.(n),s}const o=t(r);return e?.(r),o}:t:e}function gt(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function je(e,t){return t?e?t+" "+e:t:e}function ht(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function kr(){}const wr=Object.freeze([]),$=Object.freeze({});function yt(e,t,r={}){const o=t.render,n=kt(t,r);if(r.enabled===!1)return null;const s=r.state??$;return xt(e,o,n,s)}function kt(e,t={}){const{className:r,style:o,render:n}=e,{state:s=$,ref:a,props:m,stateAttributesMapping:c,enabled:f=!0}=t,p=f?ct(r,s):void 0,g=f?dt(o,s):void 0,h=f?lt(s,c):$,y=f?le(h,Array.isArray(m)?mt(m):m)??$:$;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=ot([y.ref,Ae(n),...a]):y.ref=ve(y.ref,Ae(n),a):ve(null,null)),f?(p!==void 0&&(y.className=je(y.className,p)),g!==void 0&&(y.style=le(y.style,g)),y):$}const wt=Symbol.for("react.lazy");function xt(e,t,r,o){if(t){if(typeof t=="function")return t(r,o);const n=ut(r,t.props);n.ref=r.ref;let s=t;return s?.$$typeof===wt&&(s=T.Children.toArray(t)[0]),T.cloneElement(s,n)}if(e&&typeof e=="string")return vt(e,r);throw new Error(rt(8))}function vt(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 Le(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=Le(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Ge(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Le(e))&&(o&&(o+=" "),o+=t);return o}const At=(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},St=(e,t)=>({classGroupId:e,validator:t}),Ve=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),te="-",Se=[],Ct="arbitrary..",zt=e=>{const t=Et(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Pt(a);const m=a.split(te),c=m[0]===""&&m.length>1?1:0;return We(m,c,t)},getConflictingClassGroupIds:(a,m)=>{if(m){const c=o[a],f=r[a];return c?f?At(f,c):c:f||Se}return r[a]||Se}}},We=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const f=We(e,t+1,s);if(f)return f}const a=r.validators;if(a===null)return;const m=t===0?e.join(te):e.slice(t).join(te),c=a.length;for(let f=0;f<c;f++){const p=a[f];if(p.validator(m))return p.classGroupId}},Pt=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?Ct+o:void 0})(),Et=e=>{const{theme:t,classGroups:r}=e;return It(r,t)},It=(e,t)=>{const r=Ve();for(const o in e){const n=e[o];ue(n,r,o,t)}return r},ue=(e,t,r,o)=>{const n=e.length;for(let s=0;s<n;s++){const a=e[s];Rt(a,t,r,o)}},Rt=(e,t,r,o)=>{if(typeof e=="string"){Tt(e,t,r);return}if(typeof e=="function"){Nt(e,t,r,o);return}Mt(e,t,r,o)},Tt=(e,t,r)=>{const o=e===""?t:$e(t,e);o.classGroupId=r},Nt=(e,t,r,o)=>{if(Ot(e)){ue(e(o),t,r,o);return}t.validators===null&&(t.validators=[]),t.validators.push(St(r,e))},Mt=(e,t,r,o)=>{const n=Object.entries(e),s=n.length;for(let a=0;a<s;a++){const[m,c]=n[a];ue(c,$e(t,m),r,o)}},$e=(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 m=r.nextPart.get(a);m||(m=Ve(),r.nextPart.set(a,m)),r=m}return r},Ot=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,_t=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)}}},de="!",Ce=":",jt=[],ze=(e,t,r,o,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:o,isExternal:n}),Lt=e=>{const{prefix:t,experimentalParseClassName:r}=e;let o=n=>{const s=[];let a=0,m=0,c=0,f;const p=n.length;for(let S=0;S<p;S++){const x=n[S];if(a===0&&m===0){if(x===Ce){s.push(n.slice(c,S)),c=S+1;continue}if(x==="/"){f=S;continue}}x==="["?a++:x==="]"?a--:x==="("?m++:x===")"&&m--}const g=s.length===0?n:n.slice(c);let h=g,y=!1;g.endsWith(de)?(h=g.slice(0,-1),y=!0):g.startsWith(de)&&(h=g.slice(1),y=!0);const P=f&&f>c?f-c:void 0;return ze(s,y,h,P)};if(t){const n=t+Ce,s=o;o=a=>a.startsWith(n)?s(a.slice(n.length)):ze(jt,!1,a,void 0,!0)}if(r){const n=o;o=s=>r({className:s,parseClassName:n})}return o},Gt=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],m=a[0]==="[",c=t.has(a);m||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}},Vt=e=>({cache:_t(e.cacheSize),parseClassName:Lt(e),sortModifiers:Gt(e),...zt(e)}),Wt=/\s+/,$t=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:s}=t,a=[],m=e.trim().split(Wt);let c="";for(let f=m.length-1;f>=0;f-=1){const p=m[f],{isExternal:g,modifiers:h,hasImportantModifier:y,baseClassName:P,maybePostfixModifierPosition:S}=r(p);if(g){c=p+(c.length>0?" "+c:c);continue}let x=!!S,M=o(x?P.substring(0,S):P);if(!M){if(!x){c=p+(c.length>0?" "+c:c);continue}if(M=o(P),!M){c=p+(c.length>0?" "+c:c);continue}x=!1}const Y=h.length===0?"":h.length===1?h[0]:s(h).join(":"),B=y?Y+de:Y,G=B+M;if(a.indexOf(G)>-1)continue;a.push(G);const V=n(M,x);for(let O=0;O<V.length;++O){const F=V[O];a.push(B+F)}c=p+(c.length>0?" "+c:c)}return c},Bt=(...e)=>{let t=0,r,o,n="";for(;t<e.length;)(r=e[t++])&&(o=Be(r))&&(n&&(n+=" "),n+=o);return n},Be=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Be(e[o]))&&(r&&(r+=" "),r+=t);return r},Ft=(e,...t)=>{let r,o,n,s;const a=c=>{const f=t.reduce((p,g)=>g(p),e());return r=Vt(f),o=r.cache.get,n=r.cache.set,s=m,m(c)},m=c=>{const f=o(c);if(f)return f;const p=$t(c,r);return n(c,p),p};return s=a,(...c)=>s(Bt(...c))},Ut=[],k=e=>{const t=r=>r[e]||Ut;return t.isThemeGetter=!0,t},Fe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ue=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Dt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qt=/\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$/,Jt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,I=e=>Dt.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=>Yt.test(e),De=()=>!0,Zt=e=>qt.test(e)&&!Jt.test(e),me=()=>!1,Kt=e=>Qt.test(e),Ht=e=>Xt.test(e),er=e=>!i(e)&&!l(e),tr=e=>N(e,Je,me),i=e=>Fe.test(e),j=e=>N(e,Qe,Zt),Pe=e=>N(e,cr,b),rr=e=>N(e,Ze,De),or=e=>N(e,Xe,me),Ee=e=>N(e,Ye,me),nr=e=>N(e,qe,Ht),K=e=>N(e,Ke,Kt),l=e=>Ue.test(e),U=e=>L(e,Qe),sr=e=>L(e,Xe),Ie=e=>L(e,Ye),ar=e=>L(e,Je),ir=e=>L(e,qe),H=e=>L(e,Ke,!0),lr=e=>L(e,Ze,!0),N=(e,t,r)=>{const o=Fe.exec(e);return o?o[1]?t(o[1]):r(o[2]):!1},L=(e,t,r=!1)=>{const o=Ue.exec(e);return o?o[1]?t(o[1]):r:!1},Ye=e=>e==="position"||e==="percentage",qe=e=>e==="image"||e==="url",Je=e=>e==="length"||e==="size"||e==="bg-size",Qe=e=>e==="length",cr=e=>e==="number",Xe=e=>e==="family-name",Ze=e=>e==="number"||e==="weight",Ke=e=>e==="shadow",dr=()=>{const e=k("color"),t=k("font"),r=k("text"),o=k("font-weight"),n=k("tracking"),s=k("leading"),a=k("breakpoint"),m=k("container"),c=k("spacing"),f=k("radius"),p=k("shadow"),g=k("inset-shadow"),h=k("text-shadow"),y=k("drop-shadow"),P=k("blur"),S=k("perspective"),x=k("aspect"),M=k("ease"),Y=k("animate"),B=()=>["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],O=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto","contain","none"],d=()=>[l,i,c],C=()=>[I,"full","auto",...d()],fe=()=>[R,"none","subgrid",l,i],be=()=>["auto",{span:["full",R,l,i]},R,l,i],q=()=>[R,"auto",l,i],pe=()=>["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"],z=()=>["auto",...d()],_=()=>[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],ge=()=>[...G(),Ie,Ee,{position:[l,i]}],he=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ye=()=>["auto","cover","contain",ar,tr,{size:[l,i]}],se=()=>[ie,U,j],v=()=>["","none","full",f,l,i],A=()=>["",b,U,j],J=()=>["solid","dashed","dotted","double"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],w=()=>[b,ie,Ie,Ee],we=()=>["","none",P,l,i],Q=()=>["none",b,l,i],X=()=>["none",b,l,i],ae=()=>[b,l,i],Z=()=>[I,"full",...d()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[E],breakpoint:[E],color:[De],container:[E],"drop-shadow":[E],ease:["in","out","in-out"],font:[er],"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,x]}],container:["container"],columns:[{columns:[b,i,l,m]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],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",m,...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":fe()}],"col-start-end":[{col:be()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":fe()}],"row-start-end":[{row:be()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":pe()}],"auto-rows":[{"auto-rows":pe()}],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:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":d()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":d()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],"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:[m,"screen",..._()]}],"min-w":[{"min-w":[m,"screen","none",..._()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[a]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",r,U,j]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,lr,rr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ie,i]}],"font-family":[{font:[sr,or,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,Pe]}],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:[...J(),"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:ge()}],"bg-repeat":[{bg:he()}],"bg-size":[{bg:ye()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},R,l,i],radial:["",l,i],conic:[R,l,i]},ir,nr]}],"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:v()}],"rounded-s":[{"rounded-s":v()}],"rounded-e":[{"rounded-e":v()}],"rounded-t":[{"rounded-t":v()}],"rounded-r":[{"rounded-r":v()}],"rounded-b":[{"rounded-b":v()}],"rounded-l":[{"rounded-l":v()}],"rounded-ss":[{"rounded-ss":v()}],"rounded-se":[{"rounded-se":v()}],"rounded-ee":[{"rounded-ee":v()}],"rounded-es":[{"rounded-es":v()}],"rounded-tl":[{"rounded-tl":v()}],"rounded-tr":[{"rounded-tr":v()}],"rounded-br":[{"rounded-br":v()}],"rounded-bl":[{"rounded-bl":v()}],"border-w":[{border: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:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"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:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[b,l,i]}],"outline-w":[{outline:["",b,U,j]}],"outline-color":[{outline:u()}],shadow:[{shadow:["","none",p,H,K]}],"shadow-color":[{shadow:u()}],"inset-shadow":[{"inset-shadow":["none",g,H,K]}],"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,H,K]}],"text-shadow-color":[{"text-shadow":u()}],opacity:[{opacity:[b,l,i]}],"mix-blend":[{"mix-blend":[...ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ke()}],"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:ge()}],"mask-repeat":[{mask:he()}],"mask-size":[{mask:ye()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",l,i]}],filter:[{filter:["","none",l,i]}],blur:[{blur:we()}],brightness:[{brightness:[b,l,i]}],contrast:[{contrast:[b,l,i]}],"drop-shadow":[{"drop-shadow":["","none",y,H,K]}],"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":we()}],"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",Y,l,i]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,l,i]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Q()}],"rotate-x":[{"rotate-x":Q()}],"rotate-y":[{"rotate-y":Q()}],"rotate-z":[{"rotate-z":Q()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"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:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"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,U,j,Pe]}],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"]}},ur=Ft(dr);function mr(...e){return ur(Ge(e))}function xr(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 vr(e){return e.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function Ar(e){return e.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"})}const fr=["created","retry","active","completed","cancelled","failed"],br="pending",pr="all",Sr={created:"gray",retry:"warning",active:"primary",completed:"success",cancelled:"gray",failed:"error"},Cr=[{value:pr,label:"All States"},{value:br,label:"Pending"},...fr.map(e=>({value:e,label:e.charAt(0).toUpperCase()+e.slice(1)}))],gr=["slow_query","queue_backlog","clock_skew"],zr={slow_query:"warning",queue_backlog:"error",clock_skew:"gray"},hr={slow_query:"Slow Query",queue_backlog:"Queue Backlog",clock_skew:"Clock Skew"},Pr=[{value:null,label:"All Types"},...gr.map(e=>({value:e,label:hr[e]}))];function Er(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 Re=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Te=Ge,Ir=(e,t)=>r=>{var o;if(t?.variants==null)return Te(e,r?.class,r?.className);const{variants:n,defaultVariants:s}=t,a=Object.keys(n).map(f=>{const p=r?.[f],g=s?.[f];if(p===null)return null;const h=Re(p)||Re(g);return n[f][h]}),m=r&&Object.entries(r).reduce((f,p)=>{let[g,h]=p;return h===void 0||(f[g]=h),f},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((f,p)=>{let{class:g,className:h,...y}=p;return Object.entries(y).every(P=>{let[S,x]=P;return Array.isArray(x)?x.includes({...s,...m}[S]):{...s,...m}[S]===x})?[...f,g,h]:f},[]);return Te(e,a,c,r?.class,r?.className)};function Rr(e){return yt(e.defaultTagName??"div",e,e)}function Tr({to:e,children:t,className:r,...o}){const[n]=He(),s=n.get("db");let a;if(typeof e=="string"){const m=new URL(e,"http://localhost");s&&!m.searchParams.has("db")&&m.searchParams.set("db",s),a=m.pathname+m.search}else if(typeof e=="object"&&e!==null){const m=e.pathname||"",c=e.search||"",f=e.hash||"",p=new URLSearchParams(c.replace(/^\?/,""));s&&!p.has("db")&&p.set("db",s);const g=p.toString();a=m+(g?`?${g}`:"")+f}else a=String(e);return et.jsx(tt,{to:a,className:mr("cursor-pointer",r),...o,children:t})}export{Tr as D,$ as E,Cr as J,kr as N,hr as W,Ir as a,zr as b,mr as c,Sr as d,vr as e,xr as f,rt as g,ve as h,yt as i,Ne as j,wr as k,gt as l,ut as m,it as n,Pr as o,Er as p,Ar as q,Rr as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s,p as u}from"./chunk-LFPYN7LY-Cj1DJmJR.js";import{g as B,i as v,j as K,c as P}from"./db-link-DmvfwdX4.js";import{c as L}from"./createLucideIcon-B0YqJFaz.js";import{av as q,aw as X,ax as Y,_ as A,k as U,az as G,aA as J,aC as Q,aB as Z,ay as ee,aE as te,R as oe,N as ne,an as se,P as ae,ao as re,aq as ie,ar as h,ad as V,ae as $,u as le,aR as de,b as z,aS as N,aa as ce,af as ue,ac as pe,ag as ge,aj as fe,ak as me,at as xe}from"./useOpenInteractionType-Ss_6xZdw.js";const Ce=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],he=L("x",Ce);function Se(t){const{store:e,parentContext:o,actionsRef:c}=t,a=e.useState("open"),r=e.useState("disablePointerDismissal"),d=e.useState("modal"),i=e.useState("popupElement"),{openMethod:n,triggerProps:p,reset:m}=q(a);X(e);const{forceUnmount:g}=Y(a,e,()=>{m()}),x=A(f=>{const C=U(f);return C.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},C}),S=s.useCallback(()=>{e.setOpen(!1,x(G))},[e,x]);s.useImperativeHandle(c,()=>({unmount:g,close:S}),[g,S]);const l=J({popupStore:e,onOpenChange:e.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[R,y]=s.useState(0),b=R===0,w=Q(l),T=Z(l,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:d==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(f){if(!e.context.outsidePressEnabledRef.current||"button"in f&&f.button!==0||"touches"in f&&f.touches.length!==1)return!1;const C=oe(f);if(b&&!r){const O=C;return d&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===O||e.context.backdropRef.current===O||ne(O,i)&&!O?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:b});ee(a&&d===!0,i);const{getReferenceProps:E,getFloatingProps:k,getTriggerProps:I}=te([w,T]);e.useContextCallback("onNestedDialogOpen",f=>{y(f+1)}),e.useContextCallback("onNestedDialogClose",()=>{y(0)}),s.useEffect(()=>(o?.onNestedDialogOpen&&a&&o.onNestedDialogOpen(R),o?.onNestedDialogClose&&!a&&o.onNestedDialogClose(),()=>{o?.onNestedDialogClose&&a&&o.onNestedDialogClose()}),[a,o,R]);const M=s.useMemo(()=>E(p),[E,p]),j=s.useMemo(()=>I(p),[I,p]),F=s.useMemo(()=>k(),[k]);e.useSyncedValues({openMethod:n,activeTriggerProps:M,inactiveTriggerProps:j,popupProps:F,floatingRootContext:l,nestedOpenDialogCount:R})}const W=s.createContext(void 0);function D(t){const e=s.useContext(W);if(t===!1&&e===void 0)throw new Error(B(27));return e}const Re={...re,modal:h(t=>t.modal),nested:h(t=>t.nested),nestedOpenDialogCount:h(t=>t.nestedOpenDialogCount),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 ye extends se{constructor(e){super(De(e),{popupRef:s.createRef(),backdropRef:s.createRef(),internalBackdropRef:s.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new ae,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;const c={open:e,nativeEvent:o.event,reason:o.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",c);const a={open:e},r=o.trigger?.id??null;(r||e)&&(a.activeTriggerId=r,a.activeTriggerElement=o.trigger??null),this.update(a)}}function De(t={}){return{...ie(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...t}}const be={...V,...$},Pe=s.forwardRef(function(e,o){const{render:c,className:a,forceRender:r=!1,...d}=e,{store:i}=D(),n=i.useState("open"),p=i.useState("nested"),m=i.useState("mounted"),g=i.useState("transitionStatus");return v("div",e,{state:{open:n,transitionStatus:g},ref:[i.context.backdropRef,o],stateAttributesMapping:be,props:[{role:"presentation",hidden:!m,style:{userSelect:"none",WebkitUserSelect:"none"}},d],enabled:r||!p})}),ve=s.forwardRef(function(e,o){const{render:c,className:a,disabled:r=!1,nativeButton:d=!0,...i}=e,{store:n}=D(),p=n.useState("open");function m(l){p&&n.setOpen(!1,U(de,l.nativeEvent))}const{getButtonProps:g,buttonRef:x}=le({disabled:r,native:d});return v("button",e,{state:{disabled:r},ref:[o,x],props:[{onClick:m},i,g]})}),Ee=s.forwardRef(function(e,o){const{render:c,className:a,id:r,...d}=e,{store:i}=D(),n=z(r);return i.useSyncedValueWithCleanup("descriptionElementId",n),v("p",e,{ref:o,props:[{id:n},d]})});let ke=(function(t){return t.nestedDialogs="--nested-dialogs",t})({}),Ie=(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 _=s.createContext(void 0);function Oe(){const t=s.useContext(_);if(t===void 0)throw new Error(B(26));return t}const Ne={...V,...$,nestedDialogOpen(t){return t?{[Ie.nestedDialogOpen]:""}:null}},we=s.forwardRef(function(e,o){const{className:c,finalFocus:a,initialFocus:r,render:d,...i}=e,{store:n}=D(),p=n.useState("descriptionElementId"),m=n.useState("disablePointerDismissal"),g=n.useState("floatingRootContext"),x=n.useState("popupProps"),S=n.useState("modal"),l=n.useState("mounted"),R=n.useState("nested"),y=n.useState("nestedOpenDialogCount"),b=n.useState("open"),w=n.useState("openMethod"),T=n.useState("titleElementId"),E=n.useState("transitionStatus"),k=n.useState("role");Oe(),ce({open:b,ref:n.context.popupRef,onComplete(){b&&n.context.onOpenChangeComplete?.(!0)}});function I(C){return C==="touch"?n.context.popupRef.current:!0}const M=r===void 0?I:r,j=y>0,f=v("div",e,{state:{open:b,nested:R,transitionStatus:E,nestedDialogOpen:j},props:[x,{"aria-labelledby":T??void 0,"aria-describedby":p??void 0,role:k,tabIndex:-1,hidden:!l,onKeyDown(C){ue.has(C.key)&&C.stopPropagation()},style:{[ke.nestedDialogs]:y}},i],ref:[o,n.context.popupRef,n.useStateSetter("popupElement")],stateAttributesMapping:Ne});return u.jsx(pe,{context:g,openInteractionType:w,disabled:!l,closeOnFocusOut:!m,initialFocus:M,returnFocus:a,modal:S!==!1,restoreFocus:"popup",children:f})}),Te=s.forwardRef(function(e,o){const{keepMounted:c=!1,...a}=e,{store:r}=D(),d=r.useState("mounted"),i=r.useState("modal"),n=r.useState("open");return d||c?u.jsx(_.Provider,{value:c,children:u.jsxs(ge,{ref:o,...a,children:[d&&i===!0&&u.jsx(fe,{ref:r.context.internalBackdropRef,inert:me(!n)}),e.children]})}):null}),Me=s.forwardRef(function(e,o){const{render:c,className:a,id:r,...d}=e,{store:i}=D(),n=z(r);return i.useSyncedValueWithCleanup("titleElementId",n),v("h2",e,{ref:o,props:[{id:n},d]})});function je(t){const{children:e,open:o,defaultOpen:c=!1,onOpenChange:a,onOpenChangeComplete:r,disablePointerDismissal:d=!1,modal:i=!0,actionsRef:n,handle:p,triggerId:m,defaultTriggerId:g=null}=t,x=D(!0),S=!!x,l=K(()=>p?.store??new ye({open:c,openProp:o,activeTriggerId:g,triggerIdProp:m,modal:i,disablePointerDismissal:d,nested:S})).current;xe(()=>{o===void 0&&l.state.open===!1&&c===!0&&l.update({open:!0,activeTriggerId:g})}),l.useControlledProp("openProp",o),l.useControlledProp("triggerIdProp",m),l.useSyncedValues({disablePointerDismissal:d,nested:S,modal:i}),l.useContextCallback("onOpenChange",a),l.useContextCallback("onOpenChangeComplete",r);const R=l.useState("payload");Se({store:l,actionsRef:n,parentContext:x?.store.context});const y=s.useMemo(()=>({store:l}),[l]);return u.jsx(W.Provider,{value:y,children:typeof e=="function"?e({payload:R}):e})}const Le=je,Fe=Te,H=s.forwardRef(({className:t,...e},o)=>u.jsx(Pe,{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}));H.displayName="DialogBackdrop";const Be=s.forwardRef(({className:t,children:e,hideCloseButton:o=!1,...c},a)=>u.jsxs(Fe,{children:[u.jsx(H,{}),u.jsxs(we,{ref:a,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),...c,children:[e,!o&&u.jsxs(ve,{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:[u.jsx(he,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Be.displayName="DialogContent";const Ue=({className:t,...e})=>u.jsx("div",{className:P("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Ue.displayName="DialogHeader";const Ve=({className:t,...e})=>u.jsx("div",{className:P("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});Ve.displayName="DialogFooter";const $e=s.forwardRef(({className:t,...e},o)=>u.jsx(Me,{ref:o,className:P("text-lg font-semibold text-gray-900 dark:text-gray-100",t),...e}));$e.displayName="DialogTitle";const ze=s.forwardRef(({className:t,...e},o)=>u.jsx(Ee,{ref:o,className:P("text-sm text-gray-600 dark:text-gray-400",t),...e}));ze.displayName="DialogDescription";export{Le as D,Be as a,Ue as b,$e as c,ze as d,Ve as e};
|