@fuma-content/studio 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{QueryClientProvider-DqiXnN2L.js → QueryClientProvider-BFSUF51X.js} +1 -1
- package/build/client/assets/actions-ByenKsIt.js +1 -0
- package/build/client/assets/actions-ClHPL1CP.js +1 -0
- package/build/client/assets/badge-BnhEE6iu.js +1 -0
- package/build/client/assets/{client-OSVRoCKH.js → client-BEKU4RIg.js} +148 -146
- package/build/client/assets/client-DBU2dkUR.js +1 -0
- package/build/client/assets/client-DvwvjHta.js +1 -0
- package/build/client/assets/client-wd2sce2I.js +8 -0
- package/build/client/assets/dropdown-menu-By_XeFX4.js +1 -0
- package/build/client/assets/entry.rsc-J_U0YQEr.js +1 -0
- package/build/client/assets/{index-BdrDVoE8.js → index-B5GacMxj.js} +1 -1
- package/build/client/assets/index-BTaHNKf7.js +1 -0
- package/build/client/assets/index-BgFxGtat.js +1 -0
- package/build/client/assets/index-CG_0cSZQ.js +1 -0
- package/build/client/assets/index-CfCSvolS.js +1 -0
- package/build/client/assets/{index-Bx93mXy1.js → index-D8KuzOxG.js} +1 -1
- package/build/client/assets/index-DrT4Adhh.js +41 -0
- package/build/client/assets/{index-BpILsqFO.js → index-El_a1Yhs.js} +1 -1
- package/build/client/assets/index-QYLIz8qa.js +1 -0
- package/build/client/assets/layout-BPVd8vtW.js +1 -0
- package/build/client/assets/{mdx-BNErtsK6.js → mdx-DBJIR6uw.js} +1 -1
- package/build/client/assets/page-BJL5nvn-.js +1 -0
- package/build/client/assets/page-eyuUZvVn.js +1 -0
- package/build/client/assets/popover-BowiFsDm.js +1 -0
- package/build/client/assets/{react-B8--K7an.js → react-CzFdRS7Y.js} +7 -7
- package/build/client/assets/root-7fvd-0uP.js +1 -0
- package/build/client/assets/root-B0B6-NU5.css +1 -0
- package/build/client/assets/{root-B_CXTQpA.js → root-jg-0qm8s.js} +1 -1
- package/build/client/assets/route-BLLsZ_zO.js +1 -0
- package/build/client/assets/{router-a9jyj9wf.js → router-QEl8O8lm.js} +1 -1
- package/build/client/assets/select-BI356bZ1.js +1 -0
- package/build/client/assets/separator-0kwG7IIM.js +1 -0
- package/build/client/assets/sidebar-ByyQE2QS.js +12 -0
- package/build/client/assets/{site-header-DQkKe-WA.js → site-header-iBpA4Sim.js} +1 -1
- package/build/client/assets/spinner-D35u7i0p.js +1 -0
- package/build/client/assets/tooltip-v-_I4rCw.js +16 -0
- package/build/client/assets/use-sync-yCWvjE_m.js +2 -0
- package/build/client/assets/{yaml-Cloe7OVn.js → yaml-BnQf_2Zt.js} +1 -1
- package/build/server/__ssr_build/__vite_rsc_assets_manifest.js +213 -133
- package/build/server/__ssr_build/assets/{actions-BFtCTvOL.js → actions-C5Kv8XYU.js} +2 -2
- package/build/server/__ssr_build/assets/{actions-B50-3n-a.js → actions-DQIBBM15.js} +4 -4
- package/build/server/__ssr_build/assets/{badge-DYFvBSp8.js → badge-B48L9yYO.js} +1 -1
- package/build/server/__ssr_build/assets/{client-CU90j0R8.js → client-AuWNsacU.js} +3 -3
- package/build/server/__ssr_build/assets/client-BHaLyky8.js +1162 -0
- package/build/server/__ssr_build/assets/{client--HXec13w.js → client-BogEWrwz.js} +10 -6
- package/build/server/__ssr_build/assets/{client-BqW9rGyi.js → client-DXOHI3cC.js} +2994 -4866
- package/build/server/__ssr_build/assets/{dropdown-menu-D2YyT3lP.js → dropdown-menu-CnDgV_JY.js} +7 -10
- package/build/server/__ssr_build/assets/{entry.rsc-Cg_DxYkh.js → entry.rsc-aOU-YPkj.js} +1 -1
- package/build/server/__ssr_build/assets/{index-PpqpVA51.js → index-B6ajh-UP.js} +1 -1
- package/build/server/__ssr_build/assets/index-BPd5y8T-.js +76 -0
- package/build/server/__ssr_build/assets/{button-C_-b_vqm.js → index-By9m5mBe.js} +3295 -3195
- package/build/server/__ssr_build/assets/index-Ch7b9Ofo.js +37 -0
- package/build/server/__ssr_build/assets/{index-B-gno69w.js → index-Cw6b1mnl.js} +8 -7
- package/build/server/__ssr_build/assets/{index-DBc0nhEL.js → index-kCa2P0Xn.js} +4 -75
- package/build/server/__ssr_build/assets/{index-Dtw6X3NW.js → index-tFzyztyE.js} +2 -2
- package/build/server/__ssr_build/assets/{layout-CPnSx9PI.js → layout-CC-HJHWR.js} +13 -11
- package/build/server/__ssr_build/assets/{mdx-bmeV1kyx.js → mdx-D9VFmsYC.js} +1 -1
- package/build/server/__ssr_build/assets/{page-BwoghW3K.js → page-BVUd9aDy.js} +10 -8
- package/build/server/__ssr_build/assets/{page-HxttullC.js → page-C_wQzy3_.js} +13 -11
- package/build/server/__ssr_build/assets/popover-CzQgoguQ.js +321 -0
- package/build/server/__ssr_build/assets/{root-CS7F-km4.js → root-BmMc6_zA.js} +1 -1
- package/build/server/__ssr_build/assets/route-CNYc37pV.js +860 -0
- package/build/server/__ssr_build/assets/{spinner-BXcLlTNs.js → select-B8QQSB6X.js} +10 -25
- package/build/server/__ssr_build/assets/{separator-8UA_ceSq.js → separator-C601eKPH.js} +2 -2
- package/build/server/__ssr_build/assets/{sidebar-BzNOZeBO.js → sidebar-C6fHDjcx.js} +237 -65
- package/build/server/__ssr_build/assets/{site-header-CXHKSzqk.js → site-header-Bmsr3a30.js} +2 -2
- package/build/server/__ssr_build/assets/spinner-D5zAJQcS.js +19 -0
- package/build/server/__ssr_build/assets/{tooltip-DZ4WdJt-.js → tooltip-B3A57zPO.js} +1211 -1214
- package/build/server/__ssr_build/assets/{use-sync-TRS0zL-Y.js → use-sync-DTZgOM1O.js} +259 -1498
- package/build/server/__ssr_build/assets/{yaml-BEdFfhvc.js → yaml-xJU1Ur4O.js} +1 -1
- package/build/server/__ssr_build/index.js +31 -15
- package/build/server/__vite_rsc_assets_manifest.js +213 -133
- package/build/server/assets/{actions-C92yn6jE.js → actions-BbMzIy5J.js} +2 -2
- package/build/server/assets/{actions-CWWFIcb1.js → actions-CjWBMAed.js} +2 -2
- package/build/server/assets/{actions-DZdN0IBq.js → actions-cRzXiMyR.js} +2 -2
- package/build/server/assets/{config-Cb909uq6.js → config-Dka4Bvz4.js} +10 -10
- package/build/server/assets/{layout-CRw_6FCt.js → layout-CIIfFN0v.js} +2 -2
- package/build/server/assets/{page-zlF_Ew1s.js → page-pyqagPXb.js} +2 -2
- package/build/server/assets/root-B0B6-NU5.css +1 -0
- package/build/server/assets/{root-CVOXO6T9.js → root-D1ebFoST.js} +1 -1
- package/build/server/assets/{route-o-6k10r9.js → route-C7QEArEP.js} +12571 -4431
- package/build/server/index.js +40 -15
- package/dist/bin.mjs +4 -4
- package/dist/package.mjs +1 -1
- package/package.json +36 -18
- package/build/client/assets/actions-DkbV2Z0p.js +0 -1
- package/build/client/assets/actions-DpkI7OTF.js +0 -1
- package/build/client/assets/badge-CZkdLoIP.js +0 -1
- package/build/client/assets/button-Bm94vje1.js +0 -41
- package/build/client/assets/client-BWBqEatf.js +0 -1
- package/build/client/assets/client-Crg-pMcu.js +0 -1
- package/build/client/assets/dropdown-menu-EF-sTINr.js +0 -1
- package/build/client/assets/entry.rsc-D51PwnQL.js +0 -1
- package/build/client/assets/index-CQRgqbuL.js +0 -1
- package/build/client/assets/index-DOs5iMXj.js +0 -1
- package/build/client/assets/index-DTzAH5JX.js +0 -1
- package/build/client/assets/layout-CnpYRqF0.js +0 -1
- package/build/client/assets/page-DOzl4Kpa.js +0 -1
- package/build/client/assets/page-uNpJU_rv.js +0 -1
- package/build/client/assets/root-D3NoAGI1.js +0 -1
- package/build/client/assets/root-z8crlXSh.css +0 -1
- package/build/client/assets/separator-tWFpvpUX.js +0 -1
- package/build/client/assets/sidebar-BBYit8gY.js +0 -12
- package/build/client/assets/spinner-BdPhtfsc.js +0 -1
- package/build/client/assets/tooltip-Dvh-iHDG.js +0 -16
- package/build/client/assets/use-sync-ZgcwUdu_.js +0 -9
- package/build/server/assets/root-z8crlXSh.css +0 -1
- /package/build/server/__ssr_build/assets/{root-D-Y-rGw5.js → root-S8l7oX7x.js} +0 -0
- /package/build/server/assets/{root-dGb6ch_9.js → root-DRYtk85G.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as h,R as wn,W as ie,a as Rn}from"./react-B8--K7an.js";var da=e=>{throw TypeError(e)},En=(e,t,r)=>t.has(e)||da("Cannot "+r),Bt=(e,t,r)=>(En(e,t,"read from private field"),r?r.call(e):t.get(e)),bn=(e,t,r)=>t.has(e)?da("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ir="popstate";function Sn(e={}){function t(a,n){let{pathname:o,search:i,hash:l}=a.location;return lt("",{pathname:o,search:i,hash:l},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function r(a,n){return typeof n=="string"?n:Se(n)}return Dn(t,r,null,e)}function A(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function q(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ln(){return Math.random().toString(36).substring(2,10)}function Fr(e,t){return{usr:e.state,key:e.key,idx:t}}function lt(e,t,r=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ie(t):t,state:r,key:t&&t.key||a||Ln()}}function Se({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 Ie(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 Dn(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,l="POP",u=null,s=f();s==null&&(s=0,i.replaceState({...i.state,idx:s},""));function f(){return(i.state||{idx:null}).idx}function c(){l="POP";let E=f(),L=E==null?null:E-s;s=E,u&&u({action:l,location:S.location,delta:L})}function p(E,L){l="PUSH";let b=lt(S.location,E,L);s=f()+1;let _=Fr(b,s),H=S.createHref(b);try{i.pushState(_,"",H)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;n.location.assign(H)}o&&u&&u({action:l,location:S.location,delta:1})}function y(E,L){l="REPLACE";let b=lt(S.location,E,L);s=f();let _=Fr(b,s),H=S.createHref(b);i.replaceState(_,"",H),o&&u&&u({action:l,location:S.location,delta:0})}function w(E){return fa(E)}let S={get action(){return l},get location(){return e(n,i)},listen(E){if(u)throw new Error("A history only accepts one active listener");return n.addEventListener(Ir,c),u=E,()=>{n.removeEventListener(Ir,c),u=null}},createHref(E){return t(n,E)},createURL:w,encodeLocation(E){let L=w(E);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:p,replace:y,go(E){return i.go(E)}};return S}function fa(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),A(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:Se(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function xn(e){return{defaultValue:e}}var nt,Ar=class{constructor(e){if(bn(this,nt,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Bt(this,nt).has(e))return Bt(this,nt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Bt(this,nt).set(e,t)}};nt=new WeakMap;var Cn=new Set(["lazy","caseSensitive","path","id","index","children"]);function Mn(e){return Cn.has(e)}var Pn=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function _n(e){return Pn.has(e)}function Tn(e){return e.index===!0}function st(e,t,r=[],a={},n=!1){return e.map((o,i)=>{let l=[...r,String(i)],u=typeof o.id=="string"?o.id:l.join("-");if(A(o.index!==!0||!o.children,"Cannot specify children on an index route"),A(n||!a[u],`Found a route id collision on id "${u}". Route id's must be globally unique within Data Router usages`),Tn(o)){let s={...o,id:u};return a[u]=$r(s,t(s)),s}else{let s={...o,id:u,children:void 0};return a[u]=$r(s,t(s)),o.children&&(s.children=st(o.children,t,l,a,n)),s}})}function $r(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Pe(e,t,r="/"){return ot(e,t,r,!1)}function ot(e,t,r,a){let n=typeof t=="string"?Ie(t):t,o=fe(n.pathname||"/",r);if(o==null)return null;let i=ma(e);On(i);let l=null;for(let u=0;l==null&&u<i.length;++u){let s=Bn(o);l=jn(i[u],s,a)}return l}function ha(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 ma(e,t=[],r=[],a="",n=!1){let o=(i,l,u=n,s)=>{let f={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(a)&&u)return;A(f.relativePath.startsWith(a),`Absolute route path "${f.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(a.length)}let c=be([a,f.relativePath]),p=r.concat(f);i.children&&i.children.length>0&&(A(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),ma(i.children,t,p,c,u)),!(i.path==null&&!i.index)&&t.push({path:c,score:kn(c,i.index),routesMeta:p})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let u of pa(i.path))o(i,l,!0,u)}),t}function pa(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=pa(a.join("/")),l=[];return l.push(...i.map(u=>u===""?o:[o,u].join("/"))),n&&l.push(...i),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function On(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:zn(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var In=/^:[\w-]+$/,Fn=3,An=2,$n=1,Un=10,Nn=-2,Ur=e=>e==="*";function kn(e,t){let r=e.split("/"),a=r.length;return r.some(Ur)&&(a+=Nn),t&&(a+=An),r.filter(n=>!Ur(n)).reduce((n,o)=>n+(In.test(o)?Fn:o===""?$n:Un),a)}function zn(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 jn(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let l=0;l<a.length;++l){let u=a[l],s=l===a.length-1,f=o==="/"?t:t.slice(o.length)||"/",c=Ot({path:u.relativePath,caseSensitive:u.caseSensitive,end:s},f),p=u.route;if(!c&&s&&r&&!a[a.length-1].route.index&&(c=Ot({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},f)),!c)return null;Object.assign(n,c.params),i.push({params:n,pathname:be([o,c.pathname]),pathnameBase:Yn(be([o,c.pathnameBase])),route:p}),c.pathnameBase!=="/"&&(o=be([o,c.pathnameBase]))}return i}function Ot(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Hn(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((s,{paramName:f,isOptional:c},p)=>{if(f==="*"){let w=l[p]||"";i=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const y=l[p];return c&&!y?s[f]=void 0:s[f]=(y||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:i,pattern:e}}function Hn(e,t=!1,r=!0){q(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,u)=>(a.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)")).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 Bn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return q(!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 fe(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 Wn({basename:e,pathname:t}){return t==="/"?e:be([e,t])}var ya=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,or=e=>ya.test(e);function Vn(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Ie(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=Nr(r.substring(1),"/"):o=Nr(r,t)):o=t,{pathname:o,search:Jn(a),hash:Kn(n)}}function Nr(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 Wt(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 va(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ir(e){let t=va(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function lr(e,t,r,a=!1){let n;typeof e=="string"?n=Ie(e):(n={...e},A(!n.pathname||!n.pathname.includes("?"),Wt("?","pathname","search",n)),A(!n.pathname||!n.pathname.includes("#"),Wt("#","pathname","hash",n)),A(!n.search||!n.search.includes("#"),Wt("#","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 u=Vn(n,l),s=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(s||f)&&(u.pathname+="/"),u}var be=e=>e.join("/").replace(/\/\/+/g,"/"),Yn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Jn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Kn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Gn=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function Xn(e,t){return new Gn(e,typeof t=="number"?{status:t}:t)}var qn=(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})},He=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 je(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ut(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ga=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wa(e,t){let r=e;if(typeof r!="string"||!ya.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(ga)try{let o=new URL(window.location.href),i=r.startsWith("//")?new URL(o.protocol+r):new URL(r),l=fe(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:n=!0}catch{q(!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 Oe=Symbol("Uninstrumented");function Qn(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=Je(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 u=Je(l,i,()=>{});u&&(a.lazy=Object.assign(a.lazy||{},{[o]:u}))}})}return["loader","action"].forEach(n=>{let o=t[n];if(typeof o=="function"&&r[n].length>0){let i=o[Oe]??o,l=Je(r[n],i,(...u)=>kr(u[0]));l&&(n==="loader"&&i.hydrate===!0&&(l.hydrate=!0),l[Oe]=i,a[n]=l)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(n=>{let o=n[Oe]??n,i=Je(r.middleware,o,(...l)=>kr(l[0]));return i?(i[Oe]=o,i):n})),a}function Zn(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[Oe]??e.navigate,n=Je(r.navigate,a,(...o)=>{let[i,l]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?Se(i):".",...zr(e,l??{})}});n&&(n[Oe]=a,e.navigate=n)}if(r.fetch.length>0){let a=e.fetch[Oe]??e.fetch,n=Je(r.fetch,a,(...o)=>{let[i,,l,u]=o;return{href:l??".",fetcherKey:i,...zr(e,u??{})}});n&&(n[Oe]=a,e.fetch=n)}return e}function Je(e,t,r){return e.length===0?null:async(...a)=>{let n=await Ra(e,r(...a),()=>t(...a),e.length-1);if(n.type==="error")throw n.value;return n.value}}async function Ra(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=Ra(e,t,r,a-1),o=await i,A(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(u){console.error("An instrumentation function threw an error:",u)}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 kr(e){let{request:t,context:r,params:a,unstable_pattern:n}=e;return{request:eo(t),params:{...a},unstable_pattern:n,context:to(r)}}function zr(e,t){return{currentUrl:Se(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 eo(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function to(e){if(ao(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var ro=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ao(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")===ro}var Ea=["POST","PUT","PATCH","DELETE"],no=new Set(Ea),oo=["GET",...Ea],io=new Set(oo),ba=new Set([301,302,303,307,308]),lo=new Set([307,308]),Vt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},so={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},tt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},uo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Sa="remix-router-transitions",La=Symbol("ResetLoaderData");function co(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";A(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],n=e.mapRouteProperties||uo,o=n;if(e.unstable_instrumentations){let d=e.unstable_instrumentations;o=m=>({...n(m),...Qn(d.map(v=>v.route).filter(Boolean),m)})}let i={},l=st(e.routes,o,void 0,i),u,s=e.basename||"/";s.startsWith("/")||(s=`/${s}`);let f=e.dataStrategy||yo,c={...e.future},p=null,y=new Set,w=null,S=null,E=null,L=e.hydrationData!=null,b=Pe(l,e.history.location,s),_=!1,H=null,U;if(b==null&&!e.patchRoutesOnNavigation){let d=ve(404,{pathname:e.history.location.pathname}),{matches:m,route:v}=St(l);U=!0,b=m,H={[v.id]:d}}else if(b&&!e.hydrationData&>(b,l,e.history.location.pathname).active&&(b=null),b)if(b.some(d=>d.route.lazy))U=!1;else if(!b.some(d=>sr(d.route)))U=!0;else{let d=e.hydrationData?e.hydrationData.loaderData:null,m=e.hydrationData?e.hydrationData.errors:null;if(m){let v=b.findIndex(R=>m[R.route.id]!==void 0);U=b.slice(0,v+1).every(R=>!Xt(R.route,d,m))}else U=b.every(v=>!Xt(v.route,d,m))}else{U=!1,b=[];let d=gt(null,l,e.history.location.pathname);d.active&&d.matches&&(_=!0,b=d.matches)}let W,g={historyAction:e.history.action,location:e.history.location,matches:b,initialized:U,navigation:Vt,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||H,fetchers:new Map,blockers:new Map},I="POP",$=null,J=!1,Y,Q=!1,ge=new Map,X=null,V=!1,K=!1,he=new Set,j=new Map,Z=0,le=-1,we=new Map,se=new Set,me=new Map,pe=new Map,ce=new Set,Fe=new Map,yt,qe=null;function en(){if(p=e.history.listen(({action:d,location:m,delta:v})=>{if(yt){yt(),yt=void 0;return}q(Fe.size===0||v!=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 R=Mr({currentLocation:g.location,nextLocation:m,historyAction:d});if(R&&v!=null){let D=new Promise(M=>{yt=M});e.history.go(v*-1),vt(R,{state:"blocked",location:m,proceed(){vt(R,{state:"proceeding",proceed:void 0,reset:void 0,location:m}),D.then(()=>e.history.go(v))},reset(){let M=new Map(g.blockers);M.set(R,tt),ae({blockers:M})}}),$?.resolve(),$=null;return}return Ae(d,m)}),r){Fo(t,ge);let d=()=>Ao(t,ge);t.addEventListener("pagehide",d),X=()=>t.removeEventListener("pagehide",d)}return g.initialized||Ae("POP",g.location,{initialHydration:!0}),W}function tn(){p&&p(),X&&X(),y.clear(),Y&&Y.abort(),g.fetchers.forEach((d,m)=>zt(m)),g.blockers.forEach((d,m)=>Cr(m))}function rn(d){return y.add(d),()=>y.delete(d)}function ae(d,m={}){d.matches&&(d.matches=d.matches.map(D=>{let M=i[D.route.id],x=D.route;return x.element!==M.element||x.errorElement!==M.errorElement||x.hydrateFallbackElement!==M.hydrateFallbackElement?{...D,route:M}:D})),g={...g,...d};let v=[],R=[];g.fetchers.forEach((D,M)=>{D.state==="idle"&&(ce.has(M)?v.push(M):R.push(M))}),ce.forEach(D=>{!g.fetchers.has(D)&&!j.has(D)&&v.push(D)}),[...y].forEach(D=>D(g,{deletedFetchers:v,newErrors:d.errors??null,viewTransitionOpts:m.viewTransitionOpts,flushSync:m.flushSync===!0})),v.forEach(D=>zt(D)),R.forEach(D=>g.fetchers.delete(D))}function We(d,m,{flushSync:v}={}){let R=g.actionData!=null&&g.navigation.formMethod!=null&&re(g.navigation.formMethod)&&g.navigation.state==="loading"&&d.state?._isRedirect!==!0,D;m.actionData?Object.keys(m.actionData).length>0?D=m.actionData:D=null:R?D=g.actionData:D=null;let M=m.loaderData?Xr(g.loaderData,m.loaderData,m.matches||[],m.errors):g.loaderData,x=g.blockers;x.size>0&&(x=new Map(x),x.forEach((F,T)=>x.set(T,tt)));let C=V?!1:_r(d,m.matches||g.matches),P=J===!0||g.navigation.formMethod!=null&&re(g.navigation.formMethod)&&d.state?._isRedirect!==!0;u&&(l=u,u=void 0),V||I==="POP"||(I==="PUSH"?e.history.push(d,d.state):I==="REPLACE"&&e.history.replace(d,d.state));let O;if(I==="POP"){let F=ge.get(g.location.pathname);F&&F.has(d.pathname)?O={currentLocation:g.location,nextLocation:d}:ge.has(d.pathname)&&(O={currentLocation:d,nextLocation:g.location})}else if(Q){let F=ge.get(g.location.pathname);F?F.add(d.pathname):(F=new Set([d.pathname]),ge.set(g.location.pathname,F)),O={currentLocation:g.location,nextLocation:d}}ae({...m,actionData:D,loaderData:M,historyAction:I,location:d,initialized:!0,navigation:Vt,revalidation:"idle",restoreScrollPosition:C,preventScrollReset:P,blockers:x},{viewTransitionOpts:O,flushSync:v===!0}),I="POP",J=!1,Q=!1,V=!1,K=!1,$?.resolve(),$=null,qe?.resolve(),qe=null}async function Rr(d,m){if($?.resolve(),$=null,typeof d=="number"){$||($=Zr());let z=$.promise;return e.history.go(d),z}let v=Gt(g.location,g.matches,s,d,m?.fromRouteId,m?.relative),{path:R,submission:D,error:M}=jr(!1,v,m),x=g.location,C=lt(g.location,R,m&&m.state);C={...C,...e.history.encodeLocation(C)};let P=m&&m.replace!=null?m.replace:void 0,O="PUSH";P===!0?O="REPLACE":P===!1||D!=null&&re(D.formMethod)&&D.formAction===g.location.pathname+g.location.search&&(O="REPLACE");let F=m&&"preventScrollReset"in m?m.preventScrollReset===!0:void 0,T=(m&&m.flushSync)===!0,k=Mr({currentLocation:x,nextLocation:C,historyAction:O});if(k){vt(k,{state:"blocked",location:C,proceed(){vt(k,{state:"proceeding",proceed:void 0,reset:void 0,location:C}),Rr(d,m)},reset(){let z=new Map(g.blockers);z.set(k,tt),ae({blockers:z})}});return}await Ae(O,C,{submission:D,pendingError:M,preventScrollReset:F,replace:m&&m.replace,enableViewTransition:m&&m.viewTransition,flushSync:T,callSiteDefaultShouldRevalidate:m&&m.unstable_defaultShouldRevalidate})}function an(){qe||(qe=Zr()),kt(),ae({revalidation:"loading"});let d=qe.promise;return g.navigation.state==="submitting"?d:g.navigation.state==="idle"?(Ae(g.historyAction,g.location,{startUninterruptedRevalidation:!0}),d):(Ae(I||g.historyAction,g.navigation.location,{overrideNavigation:g.navigation,enableViewTransition:Q===!0}),d)}async function Ae(d,m,v){Y&&Y.abort(),Y=null,I=d,V=(v&&v.startUninterruptedRevalidation)===!0,pn(g.location,g.matches),J=(v&&v.preventScrollReset)===!0,Q=(v&&v.enableViewTransition)===!0;let R=u||l,D=v&&v.overrideNavigation,M=v?.initialHydration&&g.matches&&g.matches.length>0&&!_?g.matches:Pe(R,m,s),x=(v&&v.flushSync)===!0;if(M&&g.initialized&&!K&&Lo(g.location,m)&&!(v&&v.submission&&re(v.submission.formMethod))){We(m,{matches:M},{flushSync:x});return}let C=gt(M,R,m.pathname);if(C.active&&C.matches&&(M=C.matches),!M){let{error:ee,notFoundMatches:oe,route:B}=jt(m.pathname);We(m,{matches:oe,loaderData:{},errors:{[B.id]:ee}},{flushSync:x});return}Y=new AbortController;let P=Ye(e.history,m,Y.signal,v&&v.submission),O=e.getContext?await e.getContext():new Ar,F;if(v&&v.pendingError)F=[Te(M).route.id,{type:"error",error:v.pendingError}];else if(v&&v.submission&&re(v.submission.formMethod)){let ee=await nn(P,m,v.submission,M,O,C.active,v&&v.initialHydration===!0,{replace:v.replace,flushSync:x});if(ee.shortCircuited)return;if(ee.pendingActionResult){let[oe,B]=ee.pendingActionResult;if(de(B)&&je(B.error)&&B.error.status===404){Y=null,We(m,{matches:ee.matches,loaderData:{},errors:{[oe]:B.error}});return}}M=ee.matches||M,F=ee.pendingActionResult,D=Yt(m,v.submission),x=!1,C.active=!1,P=Ye(e.history,P.url,P.signal)}let{shortCircuited:T,matches:k,loaderData:z,errors:te}=await on(P,m,M,O,C.active,D,v&&v.submission,v&&v.fetcherSubmission,v&&v.replace,v&&v.initialHydration===!0,x,F,v&&v.callSiteDefaultShouldRevalidate);T||(Y=null,We(m,{matches:k||M,...qr(F),loaderData:z,errors:te}))}async function nn(d,m,v,R,D,M,x,C={}){kt();let P=Oo(m,v);if(ae({navigation:P},{flushSync:C.flushSync===!0}),M){let T=await wt(R,m.pathname,d.signal);if(T.type==="aborted")return{shortCircuited:!0};if(T.type==="error"){if(T.partialMatches.length===0){let{matches:z,route:te}=St(l);return{matches:z,pendingActionResult:[te.id,{type:"error",error:T.error}]}}let k=Te(T.partialMatches).route.id;return{matches:T.partialMatches,pendingActionResult:[k,{type:"error",error:T.error}]}}else if(T.matches)R=T.matches;else{let{notFoundMatches:k,error:z,route:te}=jt(m.pathname);return{matches:k,pendingActionResult:[te.id,{type:"error",error:z}]}}}let O,F=Mt(R,m);if(!F.route.action&&!F.route.lazy)O={type:"error",error:ve(405,{method:d.method,pathname:m.pathname,routeId:F.route.id})};else{let T=Ke(o,i,d,R,F,x?[]:a,D),k=await Qe(d,T,D,null);if(O=k[F.route.id],!O){for(let z of R)if(k[z.route.id]){O=k[z.route.id];break}}if(d.signal.aborted)return{shortCircuited:!0}}if(ze(O)){let T;return C&&C.replace!=null?T=C.replace:T=Jr(O.response.headers.get("Location"),new URL(d.url),s,e.history)===g.location.pathname+g.location.search,await $e(d,O,!0,{submission:v,replace:T}),{shortCircuited:!0}}if(de(O)){let T=Te(R,F.route.id);return(C&&C.replace)!==!0&&(I="PUSH"),{matches:R,pendingActionResult:[T.route.id,O,F.route.id]}}return{matches:R,pendingActionResult:[F.route.id,O]}}async function on(d,m,v,R,D,M,x,C,P,O,F,T,k){let z=M||Yt(m,x),te=x||C||Qr(z),ee=!V&&!O;if(D){if(ee){let ne=Er(T);ae({navigation:z,...ne!==void 0?{actionData:ne}:{}},{flushSync:F})}let N=await wt(v,m.pathname,d.signal);if(N.type==="aborted")return{shortCircuited:!0};if(N.type==="error"){if(N.partialMatches.length===0){let{matches:Ve,route:ke}=St(l);return{matches:Ve,loaderData:{},errors:{[ke.id]:N.error}}}let ne=Te(N.partialMatches).route.id;return{matches:N.partialMatches,loaderData:{},errors:{[ne]:N.error}}}else if(N.matches)v=N.matches;else{let{error:ne,notFoundMatches:Ve,route:ke}=jt(m.pathname);return{matches:Ve,loaderData:{},errors:{[ke.id]:ne}}}}let oe=u||l,{dsMatches:B,revalidatingFetchers:ye}=Hr(d,R,o,i,e.history,g,v,te,m,O?[]:a,O===!0,K,he,ce,me,se,oe,s,e.patchRoutesOnNavigation!=null,T,k);if(le=++Z,!e.dataStrategy&&!B.some(N=>N.shouldLoad)&&!B.some(N=>N.route.middleware&&N.route.middleware.length>0)&&ye.length===0){let N=Dr();return We(m,{matches:v,loaderData:{},errors:T&&de(T[1])?{[T[0]]:T[1].error}:null,...qr(T),...N?{fetchers:new Map(g.fetchers)}:{}},{flushSync:F}),{shortCircuited:!0}}if(ee){let N={};if(!D){N.navigation=z;let ne=Er(T);ne!==void 0&&(N.actionData=ne)}ye.length>0&&(N.fetchers=ln(ye)),ae(N,{flushSync:F})}ye.forEach(N=>{Ce(N.key),N.controller&&j.set(N.key,N.controller)});let Ue=()=>ye.forEach(N=>Ce(N.key));Y&&Y.signal.addEventListener("abort",Ue);let{loaderResults:Ze,fetcherResults:_e}=await br(B,ye,d,R);if(d.signal.aborted)return{shortCircuited:!0};Y&&Y.signal.removeEventListener("abort",Ue),ye.forEach(N=>j.delete(N.key));let Ee=Lt(Ze);if(Ee)return await $e(d,Ee.result,!0,{replace:P}),{shortCircuited:!0};if(Ee=Lt(_e),Ee)return se.add(Ee.key),await $e(d,Ee.result,!0,{replace:P}),{shortCircuited:!0};let{loaderData:Ht,errors:et}=Gr(g,v,Ze,T,ye,_e);O&&g.errors&&(et={...g.errors,...et});let Ne=Dr(),Rt=xr(le),Et=Ne||Rt||ye.length>0;return{matches:v,loaderData:Ht,errors:et,...Et?{fetchers:new Map(g.fetchers)}:{}}}function Er(d){if(d&&!de(d[1]))return{[d[0]]:d[1].data};if(g.actionData)return Object.keys(g.actionData).length===0?null:g.actionData}function ln(d){return d.forEach(m=>{let v=g.fetchers.get(m.key),R=rt(void 0,v?v.data:void 0);g.fetchers.set(m.key,R)}),new Map(g.fetchers)}async function sn(d,m,v,R){Ce(d);let D=(R&&R.flushSync)===!0,M=u||l,x=Gt(g.location,g.matches,s,v,m,R?.relative),C=Pe(M,x,s),P=gt(C,M,x);if(P.active&&P.matches&&(C=P.matches),!C){xe(d,m,ve(404,{pathname:x}),{flushSync:D});return}let{path:O,submission:F,error:T}=jr(!0,x,R);if(T){xe(d,m,T,{flushSync:D});return}let k=e.getContext?await e.getContext():new Ar,z=(R&&R.preventScrollReset)===!0;if(F&&re(F.formMethod)){await un(d,m,O,C,k,P.active,D,z,F,R&&R.unstable_defaultShouldRevalidate);return}me.set(d,{routeId:m,path:O}),await cn(d,m,O,C,k,P.active,D,z,F)}async function un(d,m,v,R,D,M,x,C,P,O){kt(),me.delete(d);let F=g.fetchers.get(d);De(d,Io(P,F),{flushSync:x});let T=new AbortController,k=Ye(e.history,v,T.signal,P);if(M){let G=await wt(R,new URL(k.url).pathname,k.signal,d);if(G.type==="aborted")return;if(G.type==="error"){xe(d,m,G.error,{flushSync:x});return}else if(G.matches)R=G.matches;else{xe(d,m,ve(404,{pathname:v}),{flushSync:x});return}}let z=Mt(R,v);if(!z.route.action&&!z.route.lazy){let G=ve(405,{method:P.formMethod,pathname:v,routeId:m});xe(d,m,G,{flushSync:x});return}j.set(d,T);let te=Z,ee=Ke(o,i,k,R,z,a,D),oe=await Qe(k,ee,D,d),B=oe[z.route.id];if(!B){for(let G of ee)if(oe[G.route.id]){B=oe[G.route.id];break}}if(k.signal.aborted){j.get(d)===T&&j.delete(d);return}if(ce.has(d)){if(ze(B)||de(B)){De(d,Me(void 0));return}}else{if(ze(B))if(j.delete(d),le>te){De(d,Me(void 0));return}else return se.add(d),De(d,rt(P)),$e(k,B,!1,{fetcherSubmission:P,preventScrollReset:C});if(de(B)){xe(d,m,B.error);return}}let ye=g.navigation.location||g.location,Ue=Ye(e.history,ye,T.signal),Ze=u||l,_e=g.navigation.state!=="idle"?Pe(Ze,g.navigation.location,s):g.matches;A(_e,"Didn't find any matches after fetcher action");let Ee=++Z;we.set(d,Ee);let Ht=rt(P,B.data);g.fetchers.set(d,Ht);let{dsMatches:et,revalidatingFetchers:Ne}=Hr(Ue,D,o,i,e.history,g,_e,P,ye,a,!1,K,he,ce,me,se,Ze,s,e.patchRoutesOnNavigation!=null,[z.route.id,B],O);Ne.filter(G=>G.key!==d).forEach(G=>{let bt=G.key,Or=g.fetchers.get(bt),gn=rt(void 0,Or?Or.data:void 0);g.fetchers.set(bt,gn),Ce(bt),G.controller&&j.set(bt,G.controller)}),ae({fetchers:new Map(g.fetchers)});let Rt=()=>Ne.forEach(G=>Ce(G.key));T.signal.addEventListener("abort",Rt);let{loaderResults:Et,fetcherResults:N}=await br(et,Ne,Ue,D);if(T.signal.aborted)return;if(T.signal.removeEventListener("abort",Rt),we.delete(d),j.delete(d),Ne.forEach(G=>j.delete(G.key)),g.fetchers.has(d)){let G=Me(B.data);g.fetchers.set(d,G)}let ne=Lt(Et);if(ne)return $e(Ue,ne.result,!1,{preventScrollReset:C});if(ne=Lt(N),ne)return se.add(ne.key),$e(Ue,ne.result,!1,{preventScrollReset:C});let{loaderData:Ve,errors:ke}=Gr(g,_e,Et,void 0,Ne,N);xr(Ee),g.navigation.state==="loading"&&Ee>le?(A(I,"Expected pending action"),Y&&Y.abort(),We(g.navigation.location,{matches:_e,loaderData:Ve,errors:ke,fetchers:new Map(g.fetchers)})):(ae({errors:ke,loaderData:Xr(g.loaderData,Ve,_e,ke),fetchers:new Map(g.fetchers)}),K=!1)}async function cn(d,m,v,R,D,M,x,C,P){let O=g.fetchers.get(d);De(d,rt(P,O?O.data:void 0),{flushSync:x});let F=new AbortController,T=Ye(e.history,v,F.signal);if(M){let B=await wt(R,new URL(T.url).pathname,T.signal,d);if(B.type==="aborted")return;if(B.type==="error"){xe(d,m,B.error,{flushSync:x});return}else if(B.matches)R=B.matches;else{xe(d,m,ve(404,{pathname:v}),{flushSync:x});return}}let k=Mt(R,v);j.set(d,F);let z=Z,te=Ke(o,i,T,R,k,a,D),oe=(await Qe(T,te,D,d))[k.route.id];if(j.get(d)===F&&j.delete(d),!T.signal.aborted){if(ce.has(d)){De(d,Me(void 0));return}if(ze(oe))if(le>z){De(d,Me(void 0));return}else{se.add(d),await $e(T,oe,!1,{preventScrollReset:C});return}if(de(oe)){xe(d,m,oe.error);return}De(d,Me(oe.data))}}async function $e(d,m,v,{submission:R,fetcherSubmission:D,preventScrollReset:M,replace:x}={}){v||($?.resolve(),$=null),m.response.headers.has("X-Remix-Revalidate")&&(K=!0);let C=m.response.headers.get("Location");A(C,"Expected a Location header on the redirect Response"),C=Jr(C,new URL(d.url),s,e.history);let P=lt(g.location,C,{_isRedirect:!0});if(r){let te=!1;if(m.response.headers.has("X-Remix-Reload-Document"))te=!0;else if(or(C)){const ee=fa(C,!0);te=ee.origin!==t.location.origin||fe(ee.pathname,s)==null}if(te){x?t.location.replace(C):t.location.assign(C);return}}Y=null;let O=x===!0||m.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:F,formAction:T,formEncType:k}=g.navigation;!R&&!D&&F&&T&&k&&(R=Qr(g.navigation));let z=R||D;if(lo.has(m.response.status)&&z&&re(z.formMethod))await Ae(O,P,{submission:{...z,formAction:C},preventScrollReset:M||J,enableViewTransition:v?Q:void 0});else{let te=Yt(P,R);await Ae(O,P,{overrideNavigation:te,fetcherSubmission:D,preventScrollReset:M||J,enableViewTransition:v?Q:void 0})}}async function Qe(d,m,v,R){let D,M={};try{D=await go(f,d,m,R,v,!1)}catch(x){return m.filter(C=>C.shouldLoad).forEach(C=>{M[C.route.id]={type:"error",error:x}}),M}if(d.signal.aborted)return M;if(!re(d.method))for(let x of m){if(D[x.route.id]?.type==="error")break;!D.hasOwnProperty(x.route.id)&&!g.loaderData.hasOwnProperty(x.route.id)&&(!g.errors||!g.errors.hasOwnProperty(x.route.id))&&x.shouldCallHandler()&&(D[x.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${x.route.id}`)})}for(let[x,C]of Object.entries(D))if(Mo(C)){let P=C.result;M[x]={type:"redirect",response:bo(P,d,x,m,s)}}else M[x]=await Eo(C);return M}async function br(d,m,v,R){let D=Qe(v,d,R,null),M=Promise.all(m.map(async P=>{if(P.matches&&P.match&&P.request&&P.controller){let F=(await Qe(P.request,P.matches,R,P.key))[P.match.route.id];return{[P.key]:F}}else return Promise.resolve({[P.key]:{type:"error",error:ve(404,{pathname:P.path})}})})),x=await D,C=(await M).reduce((P,O)=>Object.assign(P,O),{});return{loaderResults:x,fetcherResults:C}}function kt(){K=!0,me.forEach((d,m)=>{j.has(m)&&he.add(m),Ce(m)})}function De(d,m,v={}){g.fetchers.set(d,m),ae({fetchers:new Map(g.fetchers)},{flushSync:(v&&v.flushSync)===!0})}function xe(d,m,v,R={}){let D=Te(g.matches,m);zt(d),ae({errors:{[D.route.id]:v},fetchers:new Map(g.fetchers)},{flushSync:(R&&R.flushSync)===!0})}function Sr(d){return pe.set(d,(pe.get(d)||0)+1),ce.has(d)&&ce.delete(d),g.fetchers.get(d)||so}function dn(d,m){Ce(d,m?.reason),De(d,Me(null))}function zt(d){let m=g.fetchers.get(d);j.has(d)&&!(m&&m.state==="loading"&&we.has(d))&&Ce(d),me.delete(d),we.delete(d),se.delete(d),ce.delete(d),he.delete(d),g.fetchers.delete(d)}function fn(d){let m=(pe.get(d)||0)-1;m<=0?(pe.delete(d),ce.add(d)):pe.set(d,m),ae({fetchers:new Map(g.fetchers)})}function Ce(d,m){let v=j.get(d);v&&(v.abort(m),j.delete(d))}function Lr(d){for(let m of d){let v=Sr(m),R=Me(v.data);g.fetchers.set(m,R)}}function Dr(){let d=[],m=!1;for(let v of se){let R=g.fetchers.get(v);A(R,`Expected fetcher: ${v}`),R.state==="loading"&&(se.delete(v),d.push(v),m=!0)}return Lr(d),m}function xr(d){let m=[];for(let[v,R]of we)if(R<d){let D=g.fetchers.get(v);A(D,`Expected fetcher: ${v}`),D.state==="loading"&&(Ce(v),we.delete(v),m.push(v))}return Lr(m),m.length>0}function hn(d,m){let v=g.blockers.get(d)||tt;return Fe.get(d)!==m&&Fe.set(d,m),v}function Cr(d){g.blockers.delete(d),Fe.delete(d)}function vt(d,m){let v=g.blockers.get(d)||tt;A(v.state==="unblocked"&&m.state==="blocked"||v.state==="blocked"&&m.state==="blocked"||v.state==="blocked"&&m.state==="proceeding"||v.state==="blocked"&&m.state==="unblocked"||v.state==="proceeding"&&m.state==="unblocked",`Invalid blocker state transition: ${v.state} -> ${m.state}`);let R=new Map(g.blockers);R.set(d,m),ae({blockers:R})}function Mr({currentLocation:d,nextLocation:m,historyAction:v}){if(Fe.size===0)return;Fe.size>1&&q(!1,"A router only supports one blocker at a time");let R=Array.from(Fe.entries()),[D,M]=R[R.length-1],x=g.blockers.get(D);if(!(x&&x.state==="proceeding")&&M({currentLocation:d,nextLocation:m,historyAction:v}))return D}function jt(d){let m=ve(404,{pathname:d}),v=u||l,{matches:R,route:D}=St(v);return{notFoundMatches:R,route:D,error:m}}function mn(d,m,v){if(w=d,E=m,S=v||null,!L&&g.navigation===Vt){L=!0;let R=_r(g.location,g.matches);R!=null&&ae({restoreScrollPosition:R})}return()=>{w=null,E=null,S=null}}function Pr(d,m){return S&&S(d,m.map(R=>ha(R,g.loaderData)))||d.key}function pn(d,m){if(w&&E){let v=Pr(d,m);w[v]=E()}}function _r(d,m){if(w){let v=Pr(d,m),R=w[v];if(typeof R=="number")return R}return null}function gt(d,m,v){if(e.patchRoutesOnNavigation)if(d){if(Object.keys(d[0].params).length>0)return{active:!0,matches:ot(m,v,s,!0)}}else return{active:!0,matches:ot(m,v,s,!0)||[]};return{active:!1,matches:null}}async function wt(d,m,v,R){if(!e.patchRoutesOnNavigation)return{type:"success",matches:d};let D=d;for(;;){let M=u==null,x=u||l,C=i;try{await e.patchRoutesOnNavigation({signal:v,path:m,matches:D,fetcherKey:R,patch:(F,T)=>{v.aborted||Br(F,T,x,C,o,!1)}})}catch(F){return{type:"error",error:F,partialMatches:D}}finally{M&&!v.aborted&&(l=[...l])}if(v.aborted)return{type:"aborted"};let P=Pe(x,m,s),O=null;if(P){if(Object.keys(P[0].params).length===0)return{type:"success",matches:P};if(O=ot(x,m,s,!0),!(O&&D.length<O.length&&Tr(D,O.slice(0,D.length))))return{type:"success",matches:P}}if(O||(O=ot(x,m,s,!0)),!O||Tr(D,O))return{type:"success",matches:null};D=O}}function Tr(d,m){return d.length===m.length&&d.every((v,R)=>v.route.id===m[R].route.id)}function yn(d){i={},u=st(d,o,void 0,i)}function vn(d,m,v=!1){let R=u==null;Br(d,m,u||l,i,o,v),R&&(l=[...l],ae({}))}return W={get basename(){return s},get future(){return c},get state(){return g},get routes(){return l},get window(){return t},initialize:en,subscribe:rn,enableScrollRestoration:mn,navigate:Rr,fetch:sn,revalidate:an,createHref:d=>e.history.createHref(d),encodeLocation:d=>e.history.encodeLocation(d),getFetcher:Sr,resetFetcher:dn,deleteFetcher:fn,dispose:tn,getBlocker:hn,deleteBlocker:Cr,patchRoutes:vn,_internalFetchControllers:j,_internalSetRoutes:yn,_internalSetStateDoNotUseOrYouWillBreakYourApp(d){ae(d)}},e.unstable_instrumentations&&(W=Zn(W,e.unstable_instrumentations.map(d=>d.router).filter(Boolean))),W}function fo(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Gt(e,t,r,a,n,o){let i,l;if(n){i=[];for(let s of t)if(i.push(s),s.route.id===n){l=s;break}}else i=t,l=t[t.length-1];let u=lr(a||".",ir(i),fe(e.pathname,r)||e.pathname,o==="path");if(a==null&&(u.search=e.search,u.hash=e.hash),(a==null||a===""||a===".")&&l){let s=ur(u.search);if(l.route.index&&!s)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&s){let f=new URLSearchParams(u.search),c=f.getAll("index");f.delete("index"),c.filter(y=>y).forEach(y=>f.append("index",y));let p=f.toString();u.search=p?`?${p}`:""}}return r!=="/"&&(u.pathname=Wn({basename:r,pathname:u.pathname})),Se(u)}function jr(e,t,r){if(!r||!fo(r))return{path:t};if(r.formMethod&&!To(r.formMethod))return{path:t,error:ve(405,{method:r.formMethod})};let a=()=>({path:t,error:ve(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=_a(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!re(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,[y,w])=>`${p}${y}=${w}
|
|
1
|
+
import{r as h,R as wn,W as ie,a as Rn}from"./react-CzFdRS7Y.js";var da=e=>{throw TypeError(e)},En=(e,t,r)=>t.has(e)||da("Cannot "+r),Bt=(e,t,r)=>(En(e,t,"read from private field"),r?r.call(e):t.get(e)),bn=(e,t,r)=>t.has(e)?da("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ir="popstate";function Sn(e={}){function t(a,n){let{pathname:o,search:i,hash:l}=a.location;return lt("",{pathname:o,search:i,hash:l},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function r(a,n){return typeof n=="string"?n:Se(n)}return Dn(t,r,null,e)}function A(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function q(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ln(){return Math.random().toString(36).substring(2,10)}function Fr(e,t){return{usr:e.state,key:e.key,idx:t}}function lt(e,t,r=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ie(t):t,state:r,key:t&&t.key||a||Ln()}}function Se({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 Ie(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 Dn(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,l="POP",u=null,s=f();s==null&&(s=0,i.replaceState({...i.state,idx:s},""));function f(){return(i.state||{idx:null}).idx}function c(){l="POP";let E=f(),L=E==null?null:E-s;s=E,u&&u({action:l,location:S.location,delta:L})}function p(E,L){l="PUSH";let b=lt(S.location,E,L);s=f()+1;let _=Fr(b,s),H=S.createHref(b);try{i.pushState(_,"",H)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;n.location.assign(H)}o&&u&&u({action:l,location:S.location,delta:1})}function y(E,L){l="REPLACE";let b=lt(S.location,E,L);s=f();let _=Fr(b,s),H=S.createHref(b);i.replaceState(_,"",H),o&&u&&u({action:l,location:S.location,delta:0})}function w(E){return fa(E)}let S={get action(){return l},get location(){return e(n,i)},listen(E){if(u)throw new Error("A history only accepts one active listener");return n.addEventListener(Ir,c),u=E,()=>{n.removeEventListener(Ir,c),u=null}},createHref(E){return t(n,E)},createURL:w,encodeLocation(E){let L=w(E);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:p,replace:y,go(E){return i.go(E)}};return S}function fa(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),A(r,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:Se(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function xn(e){return{defaultValue:e}}var nt,Ar=class{constructor(e){if(bn(this,nt,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Bt(this,nt).has(e))return Bt(this,nt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Bt(this,nt).set(e,t)}};nt=new WeakMap;var Cn=new Set(["lazy","caseSensitive","path","id","index","children"]);function Mn(e){return Cn.has(e)}var Pn=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function _n(e){return Pn.has(e)}function Tn(e){return e.index===!0}function st(e,t,r=[],a={},n=!1){return e.map((o,i)=>{let l=[...r,String(i)],u=typeof o.id=="string"?o.id:l.join("-");if(A(o.index!==!0||!o.children,"Cannot specify children on an index route"),A(n||!a[u],`Found a route id collision on id "${u}". Route id's must be globally unique within Data Router usages`),Tn(o)){let s={...o,id:u};return a[u]=$r(s,t(s)),s}else{let s={...o,id:u,children:void 0};return a[u]=$r(s,t(s)),o.children&&(s.children=st(o.children,t,l,a,n)),s}})}function $r(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Pe(e,t,r="/"){return ot(e,t,r,!1)}function ot(e,t,r,a){let n=typeof t=="string"?Ie(t):t,o=fe(n.pathname||"/",r);if(o==null)return null;let i=ma(e);On(i);let l=null;for(let u=0;l==null&&u<i.length;++u){let s=Bn(o);l=jn(i[u],s,a)}return l}function ha(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 ma(e,t=[],r=[],a="",n=!1){let o=(i,l,u=n,s)=>{let f={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(a)&&u)return;A(f.relativePath.startsWith(a),`Absolute route path "${f.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(a.length)}let c=be([a,f.relativePath]),p=r.concat(f);i.children&&i.children.length>0&&(A(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),ma(i.children,t,p,c,u)),!(i.path==null&&!i.index)&&t.push({path:c,score:kn(c,i.index),routesMeta:p})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let u of pa(i.path))o(i,l,!0,u)}),t}function pa(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=pa(a.join("/")),l=[];return l.push(...i.map(u=>u===""?o:[o,u].join("/"))),n&&l.push(...i),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function On(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:zn(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var In=/^:[\w-]+$/,Fn=3,An=2,$n=1,Un=10,Nn=-2,Ur=e=>e==="*";function kn(e,t){let r=e.split("/"),a=r.length;return r.some(Ur)&&(a+=Nn),t&&(a+=An),r.filter(n=>!Ur(n)).reduce((n,o)=>n+(In.test(o)?Fn:o===""?$n:Un),a)}function zn(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 jn(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let l=0;l<a.length;++l){let u=a[l],s=l===a.length-1,f=o==="/"?t:t.slice(o.length)||"/",c=Ot({path:u.relativePath,caseSensitive:u.caseSensitive,end:s},f),p=u.route;if(!c&&s&&r&&!a[a.length-1].route.index&&(c=Ot({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},f)),!c)return null;Object.assign(n,c.params),i.push({params:n,pathname:be([o,c.pathname]),pathnameBase:Yn(be([o,c.pathnameBase])),route:p}),c.pathnameBase!=="/"&&(o=be([o,c.pathnameBase]))}return i}function Ot(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Hn(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((s,{paramName:f,isOptional:c},p)=>{if(f==="*"){let w=l[p]||"";i=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const y=l[p];return c&&!y?s[f]=void 0:s[f]=(y||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:i,pattern:e}}function Hn(e,t=!1,r=!0){q(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,u)=>(a.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)")).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 Bn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return q(!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 fe(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 Wn({basename:e,pathname:t}){return t==="/"?e:be([e,t])}var ya=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,or=e=>ya.test(e);function Vn(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?Ie(e):e,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=Nr(r.substring(1),"/"):o=Nr(r,t)):o=t,{pathname:o,search:Jn(a),hash:Kn(n)}}function Nr(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 Wt(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 va(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ir(e){let t=va(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function lr(e,t,r,a=!1){let n;typeof e=="string"?n=Ie(e):(n={...e},A(!n.pathname||!n.pathname.includes("?"),Wt("?","pathname","search",n)),A(!n.pathname||!n.pathname.includes("#"),Wt("#","pathname","hash",n)),A(!n.search||!n.search.includes("#"),Wt("#","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 u=Vn(n,l),s=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(s||f)&&(u.pathname+="/"),u}var be=e=>e.join("/").replace(/\/\/+/g,"/"),Yn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Jn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Kn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Gn=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function Xn(e,t){return new Gn(e,typeof t=="number"?{status:t}:t)}var qn=(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})},He=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 je(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ut(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ga=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function wa(e,t){let r=e;if(typeof r!="string"||!ya.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(ga)try{let o=new URL(window.location.href),i=r.startsWith("//")?new URL(o.protocol+r):new URL(r),l=fe(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:n=!0}catch{q(!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 Oe=Symbol("Uninstrumented");function Qn(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=Je(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 u=Je(l,i,()=>{});u&&(a.lazy=Object.assign(a.lazy||{},{[o]:u}))}})}return["loader","action"].forEach(n=>{let o=t[n];if(typeof o=="function"&&r[n].length>0){let i=o[Oe]??o,l=Je(r[n],i,(...u)=>kr(u[0]));l&&(n==="loader"&&i.hydrate===!0&&(l.hydrate=!0),l[Oe]=i,a[n]=l)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(n=>{let o=n[Oe]??n,i=Je(r.middleware,o,(...l)=>kr(l[0]));return i?(i[Oe]=o,i):n})),a}function Zn(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[Oe]??e.navigate,n=Je(r.navigate,a,(...o)=>{let[i,l]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?Se(i):".",...zr(e,l??{})}});n&&(n[Oe]=a,e.navigate=n)}if(r.fetch.length>0){let a=e.fetch[Oe]??e.fetch,n=Je(r.fetch,a,(...o)=>{let[i,,l,u]=o;return{href:l??".",fetcherKey:i,...zr(e,u??{})}});n&&(n[Oe]=a,e.fetch=n)}return e}function Je(e,t,r){return e.length===0?null:async(...a)=>{let n=await Ra(e,r(...a),()=>t(...a),e.length-1);if(n.type==="error")throw n.value;return n.value}}async function Ra(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=Ra(e,t,r,a-1),o=await i,A(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(u){console.error("An instrumentation function threw an error:",u)}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 kr(e){let{request:t,context:r,params:a,unstable_pattern:n}=e;return{request:eo(t),params:{...a},unstable_pattern:n,context:to(r)}}function zr(e,t){return{currentUrl:Se(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 eo(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function to(e){if(ao(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var ro=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ao(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")===ro}var Ea=["POST","PUT","PATCH","DELETE"],no=new Set(Ea),oo=["GET",...Ea],io=new Set(oo),ba=new Set([301,302,303,307,308]),lo=new Set([307,308]),Vt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},so={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},tt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},uo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Sa="remix-router-transitions",La=Symbol("ResetLoaderData");function co(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";A(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],n=e.mapRouteProperties||uo,o=n;if(e.unstable_instrumentations){let d=e.unstable_instrumentations;o=m=>({...n(m),...Qn(d.map(v=>v.route).filter(Boolean),m)})}let i={},l=st(e.routes,o,void 0,i),u,s=e.basename||"/";s.startsWith("/")||(s=`/${s}`);let f=e.dataStrategy||yo,c={...e.future},p=null,y=new Set,w=null,S=null,E=null,L=e.hydrationData!=null,b=Pe(l,e.history.location,s),_=!1,H=null,U;if(b==null&&!e.patchRoutesOnNavigation){let d=ve(404,{pathname:e.history.location.pathname}),{matches:m,route:v}=St(l);U=!0,b=m,H={[v.id]:d}}else if(b&&!e.hydrationData&>(b,l,e.history.location.pathname).active&&(b=null),b)if(b.some(d=>d.route.lazy))U=!1;else if(!b.some(d=>sr(d.route)))U=!0;else{let d=e.hydrationData?e.hydrationData.loaderData:null,m=e.hydrationData?e.hydrationData.errors:null;if(m){let v=b.findIndex(R=>m[R.route.id]!==void 0);U=b.slice(0,v+1).every(R=>!Xt(R.route,d,m))}else U=b.every(v=>!Xt(v.route,d,m))}else{U=!1,b=[];let d=gt(null,l,e.history.location.pathname);d.active&&d.matches&&(_=!0,b=d.matches)}let W,g={historyAction:e.history.action,location:e.history.location,matches:b,initialized:U,navigation:Vt,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||H,fetchers:new Map,blockers:new Map},I="POP",$=null,J=!1,Y,Q=!1,ge=new Map,X=null,V=!1,K=!1,he=new Set,j=new Map,Z=0,le=-1,we=new Map,se=new Set,me=new Map,pe=new Map,ce=new Set,Fe=new Map,yt,qe=null;function en(){if(p=e.history.listen(({action:d,location:m,delta:v})=>{if(yt){yt(),yt=void 0;return}q(Fe.size===0||v!=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 R=Mr({currentLocation:g.location,nextLocation:m,historyAction:d});if(R&&v!=null){let D=new Promise(M=>{yt=M});e.history.go(v*-1),vt(R,{state:"blocked",location:m,proceed(){vt(R,{state:"proceeding",proceed:void 0,reset:void 0,location:m}),D.then(()=>e.history.go(v))},reset(){let M=new Map(g.blockers);M.set(R,tt),ae({blockers:M})}}),$?.resolve(),$=null;return}return Ae(d,m)}),r){Fo(t,ge);let d=()=>Ao(t,ge);t.addEventListener("pagehide",d),X=()=>t.removeEventListener("pagehide",d)}return g.initialized||Ae("POP",g.location,{initialHydration:!0}),W}function tn(){p&&p(),X&&X(),y.clear(),Y&&Y.abort(),g.fetchers.forEach((d,m)=>zt(m)),g.blockers.forEach((d,m)=>Cr(m))}function rn(d){return y.add(d),()=>y.delete(d)}function ae(d,m={}){d.matches&&(d.matches=d.matches.map(D=>{let M=i[D.route.id],x=D.route;return x.element!==M.element||x.errorElement!==M.errorElement||x.hydrateFallbackElement!==M.hydrateFallbackElement?{...D,route:M}:D})),g={...g,...d};let v=[],R=[];g.fetchers.forEach((D,M)=>{D.state==="idle"&&(ce.has(M)?v.push(M):R.push(M))}),ce.forEach(D=>{!g.fetchers.has(D)&&!j.has(D)&&v.push(D)}),[...y].forEach(D=>D(g,{deletedFetchers:v,newErrors:d.errors??null,viewTransitionOpts:m.viewTransitionOpts,flushSync:m.flushSync===!0})),v.forEach(D=>zt(D)),R.forEach(D=>g.fetchers.delete(D))}function We(d,m,{flushSync:v}={}){let R=g.actionData!=null&&g.navigation.formMethod!=null&&re(g.navigation.formMethod)&&g.navigation.state==="loading"&&d.state?._isRedirect!==!0,D;m.actionData?Object.keys(m.actionData).length>0?D=m.actionData:D=null:R?D=g.actionData:D=null;let M=m.loaderData?Xr(g.loaderData,m.loaderData,m.matches||[],m.errors):g.loaderData,x=g.blockers;x.size>0&&(x=new Map(x),x.forEach((F,T)=>x.set(T,tt)));let C=V?!1:_r(d,m.matches||g.matches),P=J===!0||g.navigation.formMethod!=null&&re(g.navigation.formMethod)&&d.state?._isRedirect!==!0;u&&(l=u,u=void 0),V||I==="POP"||(I==="PUSH"?e.history.push(d,d.state):I==="REPLACE"&&e.history.replace(d,d.state));let O;if(I==="POP"){let F=ge.get(g.location.pathname);F&&F.has(d.pathname)?O={currentLocation:g.location,nextLocation:d}:ge.has(d.pathname)&&(O={currentLocation:d,nextLocation:g.location})}else if(Q){let F=ge.get(g.location.pathname);F?F.add(d.pathname):(F=new Set([d.pathname]),ge.set(g.location.pathname,F)),O={currentLocation:g.location,nextLocation:d}}ae({...m,actionData:D,loaderData:M,historyAction:I,location:d,initialized:!0,navigation:Vt,revalidation:"idle",restoreScrollPosition:C,preventScrollReset:P,blockers:x},{viewTransitionOpts:O,flushSync:v===!0}),I="POP",J=!1,Q=!1,V=!1,K=!1,$?.resolve(),$=null,qe?.resolve(),qe=null}async function Rr(d,m){if($?.resolve(),$=null,typeof d=="number"){$||($=Zr());let z=$.promise;return e.history.go(d),z}let v=Gt(g.location,g.matches,s,d,m?.fromRouteId,m?.relative),{path:R,submission:D,error:M}=jr(!1,v,m),x=g.location,C=lt(g.location,R,m&&m.state);C={...C,...e.history.encodeLocation(C)};let P=m&&m.replace!=null?m.replace:void 0,O="PUSH";P===!0?O="REPLACE":P===!1||D!=null&&re(D.formMethod)&&D.formAction===g.location.pathname+g.location.search&&(O="REPLACE");let F=m&&"preventScrollReset"in m?m.preventScrollReset===!0:void 0,T=(m&&m.flushSync)===!0,k=Mr({currentLocation:x,nextLocation:C,historyAction:O});if(k){vt(k,{state:"blocked",location:C,proceed(){vt(k,{state:"proceeding",proceed:void 0,reset:void 0,location:C}),Rr(d,m)},reset(){let z=new Map(g.blockers);z.set(k,tt),ae({blockers:z})}});return}await Ae(O,C,{submission:D,pendingError:M,preventScrollReset:F,replace:m&&m.replace,enableViewTransition:m&&m.viewTransition,flushSync:T,callSiteDefaultShouldRevalidate:m&&m.unstable_defaultShouldRevalidate})}function an(){qe||(qe=Zr()),kt(),ae({revalidation:"loading"});let d=qe.promise;return g.navigation.state==="submitting"?d:g.navigation.state==="idle"?(Ae(g.historyAction,g.location,{startUninterruptedRevalidation:!0}),d):(Ae(I||g.historyAction,g.navigation.location,{overrideNavigation:g.navigation,enableViewTransition:Q===!0}),d)}async function Ae(d,m,v){Y&&Y.abort(),Y=null,I=d,V=(v&&v.startUninterruptedRevalidation)===!0,pn(g.location,g.matches),J=(v&&v.preventScrollReset)===!0,Q=(v&&v.enableViewTransition)===!0;let R=u||l,D=v&&v.overrideNavigation,M=v?.initialHydration&&g.matches&&g.matches.length>0&&!_?g.matches:Pe(R,m,s),x=(v&&v.flushSync)===!0;if(M&&g.initialized&&!K&&Lo(g.location,m)&&!(v&&v.submission&&re(v.submission.formMethod))){We(m,{matches:M},{flushSync:x});return}let C=gt(M,R,m.pathname);if(C.active&&C.matches&&(M=C.matches),!M){let{error:ee,notFoundMatches:oe,route:B}=jt(m.pathname);We(m,{matches:oe,loaderData:{},errors:{[B.id]:ee}},{flushSync:x});return}Y=new AbortController;let P=Ye(e.history,m,Y.signal,v&&v.submission),O=e.getContext?await e.getContext():new Ar,F;if(v&&v.pendingError)F=[Te(M).route.id,{type:"error",error:v.pendingError}];else if(v&&v.submission&&re(v.submission.formMethod)){let ee=await nn(P,m,v.submission,M,O,C.active,v&&v.initialHydration===!0,{replace:v.replace,flushSync:x});if(ee.shortCircuited)return;if(ee.pendingActionResult){let[oe,B]=ee.pendingActionResult;if(de(B)&&je(B.error)&&B.error.status===404){Y=null,We(m,{matches:ee.matches,loaderData:{},errors:{[oe]:B.error}});return}}M=ee.matches||M,F=ee.pendingActionResult,D=Yt(m,v.submission),x=!1,C.active=!1,P=Ye(e.history,P.url,P.signal)}let{shortCircuited:T,matches:k,loaderData:z,errors:te}=await on(P,m,M,O,C.active,D,v&&v.submission,v&&v.fetcherSubmission,v&&v.replace,v&&v.initialHydration===!0,x,F,v&&v.callSiteDefaultShouldRevalidate);T||(Y=null,We(m,{matches:k||M,...qr(F),loaderData:z,errors:te}))}async function nn(d,m,v,R,D,M,x,C={}){kt();let P=Oo(m,v);if(ae({navigation:P},{flushSync:C.flushSync===!0}),M){let T=await wt(R,m.pathname,d.signal);if(T.type==="aborted")return{shortCircuited:!0};if(T.type==="error"){if(T.partialMatches.length===0){let{matches:z,route:te}=St(l);return{matches:z,pendingActionResult:[te.id,{type:"error",error:T.error}]}}let k=Te(T.partialMatches).route.id;return{matches:T.partialMatches,pendingActionResult:[k,{type:"error",error:T.error}]}}else if(T.matches)R=T.matches;else{let{notFoundMatches:k,error:z,route:te}=jt(m.pathname);return{matches:k,pendingActionResult:[te.id,{type:"error",error:z}]}}}let O,F=Mt(R,m);if(!F.route.action&&!F.route.lazy)O={type:"error",error:ve(405,{method:d.method,pathname:m.pathname,routeId:F.route.id})};else{let T=Ke(o,i,d,R,F,x?[]:a,D),k=await Qe(d,T,D,null);if(O=k[F.route.id],!O){for(let z of R)if(k[z.route.id]){O=k[z.route.id];break}}if(d.signal.aborted)return{shortCircuited:!0}}if(ze(O)){let T;return C&&C.replace!=null?T=C.replace:T=Jr(O.response.headers.get("Location"),new URL(d.url),s,e.history)===g.location.pathname+g.location.search,await $e(d,O,!0,{submission:v,replace:T}),{shortCircuited:!0}}if(de(O)){let T=Te(R,F.route.id);return(C&&C.replace)!==!0&&(I="PUSH"),{matches:R,pendingActionResult:[T.route.id,O,F.route.id]}}return{matches:R,pendingActionResult:[F.route.id,O]}}async function on(d,m,v,R,D,M,x,C,P,O,F,T,k){let z=M||Yt(m,x),te=x||C||Qr(z),ee=!V&&!O;if(D){if(ee){let ne=Er(T);ae({navigation:z,...ne!==void 0?{actionData:ne}:{}},{flushSync:F})}let N=await wt(v,m.pathname,d.signal);if(N.type==="aborted")return{shortCircuited:!0};if(N.type==="error"){if(N.partialMatches.length===0){let{matches:Ve,route:ke}=St(l);return{matches:Ve,loaderData:{},errors:{[ke.id]:N.error}}}let ne=Te(N.partialMatches).route.id;return{matches:N.partialMatches,loaderData:{},errors:{[ne]:N.error}}}else if(N.matches)v=N.matches;else{let{error:ne,notFoundMatches:Ve,route:ke}=jt(m.pathname);return{matches:Ve,loaderData:{},errors:{[ke.id]:ne}}}}let oe=u||l,{dsMatches:B,revalidatingFetchers:ye}=Hr(d,R,o,i,e.history,g,v,te,m,O?[]:a,O===!0,K,he,ce,me,se,oe,s,e.patchRoutesOnNavigation!=null,T,k);if(le=++Z,!e.dataStrategy&&!B.some(N=>N.shouldLoad)&&!B.some(N=>N.route.middleware&&N.route.middleware.length>0)&&ye.length===0){let N=Dr();return We(m,{matches:v,loaderData:{},errors:T&&de(T[1])?{[T[0]]:T[1].error}:null,...qr(T),...N?{fetchers:new Map(g.fetchers)}:{}},{flushSync:F}),{shortCircuited:!0}}if(ee){let N={};if(!D){N.navigation=z;let ne=Er(T);ne!==void 0&&(N.actionData=ne)}ye.length>0&&(N.fetchers=ln(ye)),ae(N,{flushSync:F})}ye.forEach(N=>{Ce(N.key),N.controller&&j.set(N.key,N.controller)});let Ue=()=>ye.forEach(N=>Ce(N.key));Y&&Y.signal.addEventListener("abort",Ue);let{loaderResults:Ze,fetcherResults:_e}=await br(B,ye,d,R);if(d.signal.aborted)return{shortCircuited:!0};Y&&Y.signal.removeEventListener("abort",Ue),ye.forEach(N=>j.delete(N.key));let Ee=Lt(Ze);if(Ee)return await $e(d,Ee.result,!0,{replace:P}),{shortCircuited:!0};if(Ee=Lt(_e),Ee)return se.add(Ee.key),await $e(d,Ee.result,!0,{replace:P}),{shortCircuited:!0};let{loaderData:Ht,errors:et}=Gr(g,v,Ze,T,ye,_e);O&&g.errors&&(et={...g.errors,...et});let Ne=Dr(),Rt=xr(le),Et=Ne||Rt||ye.length>0;return{matches:v,loaderData:Ht,errors:et,...Et?{fetchers:new Map(g.fetchers)}:{}}}function Er(d){if(d&&!de(d[1]))return{[d[0]]:d[1].data};if(g.actionData)return Object.keys(g.actionData).length===0?null:g.actionData}function ln(d){return d.forEach(m=>{let v=g.fetchers.get(m.key),R=rt(void 0,v?v.data:void 0);g.fetchers.set(m.key,R)}),new Map(g.fetchers)}async function sn(d,m,v,R){Ce(d);let D=(R&&R.flushSync)===!0,M=u||l,x=Gt(g.location,g.matches,s,v,m,R?.relative),C=Pe(M,x,s),P=gt(C,M,x);if(P.active&&P.matches&&(C=P.matches),!C){xe(d,m,ve(404,{pathname:x}),{flushSync:D});return}let{path:O,submission:F,error:T}=jr(!0,x,R);if(T){xe(d,m,T,{flushSync:D});return}let k=e.getContext?await e.getContext():new Ar,z=(R&&R.preventScrollReset)===!0;if(F&&re(F.formMethod)){await un(d,m,O,C,k,P.active,D,z,F,R&&R.unstable_defaultShouldRevalidate);return}me.set(d,{routeId:m,path:O}),await cn(d,m,O,C,k,P.active,D,z,F)}async function un(d,m,v,R,D,M,x,C,P,O){kt(),me.delete(d);let F=g.fetchers.get(d);De(d,Io(P,F),{flushSync:x});let T=new AbortController,k=Ye(e.history,v,T.signal,P);if(M){let G=await wt(R,new URL(k.url).pathname,k.signal,d);if(G.type==="aborted")return;if(G.type==="error"){xe(d,m,G.error,{flushSync:x});return}else if(G.matches)R=G.matches;else{xe(d,m,ve(404,{pathname:v}),{flushSync:x});return}}let z=Mt(R,v);if(!z.route.action&&!z.route.lazy){let G=ve(405,{method:P.formMethod,pathname:v,routeId:m});xe(d,m,G,{flushSync:x});return}j.set(d,T);let te=Z,ee=Ke(o,i,k,R,z,a,D),oe=await Qe(k,ee,D,d),B=oe[z.route.id];if(!B){for(let G of ee)if(oe[G.route.id]){B=oe[G.route.id];break}}if(k.signal.aborted){j.get(d)===T&&j.delete(d);return}if(ce.has(d)){if(ze(B)||de(B)){De(d,Me(void 0));return}}else{if(ze(B))if(j.delete(d),le>te){De(d,Me(void 0));return}else return se.add(d),De(d,rt(P)),$e(k,B,!1,{fetcherSubmission:P,preventScrollReset:C});if(de(B)){xe(d,m,B.error);return}}let ye=g.navigation.location||g.location,Ue=Ye(e.history,ye,T.signal),Ze=u||l,_e=g.navigation.state!=="idle"?Pe(Ze,g.navigation.location,s):g.matches;A(_e,"Didn't find any matches after fetcher action");let Ee=++Z;we.set(d,Ee);let Ht=rt(P,B.data);g.fetchers.set(d,Ht);let{dsMatches:et,revalidatingFetchers:Ne}=Hr(Ue,D,o,i,e.history,g,_e,P,ye,a,!1,K,he,ce,me,se,Ze,s,e.patchRoutesOnNavigation!=null,[z.route.id,B],O);Ne.filter(G=>G.key!==d).forEach(G=>{let bt=G.key,Or=g.fetchers.get(bt),gn=rt(void 0,Or?Or.data:void 0);g.fetchers.set(bt,gn),Ce(bt),G.controller&&j.set(bt,G.controller)}),ae({fetchers:new Map(g.fetchers)});let Rt=()=>Ne.forEach(G=>Ce(G.key));T.signal.addEventListener("abort",Rt);let{loaderResults:Et,fetcherResults:N}=await br(et,Ne,Ue,D);if(T.signal.aborted)return;if(T.signal.removeEventListener("abort",Rt),we.delete(d),j.delete(d),Ne.forEach(G=>j.delete(G.key)),g.fetchers.has(d)){let G=Me(B.data);g.fetchers.set(d,G)}let ne=Lt(Et);if(ne)return $e(Ue,ne.result,!1,{preventScrollReset:C});if(ne=Lt(N),ne)return se.add(ne.key),$e(Ue,ne.result,!1,{preventScrollReset:C});let{loaderData:Ve,errors:ke}=Gr(g,_e,Et,void 0,Ne,N);xr(Ee),g.navigation.state==="loading"&&Ee>le?(A(I,"Expected pending action"),Y&&Y.abort(),We(g.navigation.location,{matches:_e,loaderData:Ve,errors:ke,fetchers:new Map(g.fetchers)})):(ae({errors:ke,loaderData:Xr(g.loaderData,Ve,_e,ke),fetchers:new Map(g.fetchers)}),K=!1)}async function cn(d,m,v,R,D,M,x,C,P){let O=g.fetchers.get(d);De(d,rt(P,O?O.data:void 0),{flushSync:x});let F=new AbortController,T=Ye(e.history,v,F.signal);if(M){let B=await wt(R,new URL(T.url).pathname,T.signal,d);if(B.type==="aborted")return;if(B.type==="error"){xe(d,m,B.error,{flushSync:x});return}else if(B.matches)R=B.matches;else{xe(d,m,ve(404,{pathname:v}),{flushSync:x});return}}let k=Mt(R,v);j.set(d,F);let z=Z,te=Ke(o,i,T,R,k,a,D),oe=(await Qe(T,te,D,d))[k.route.id];if(j.get(d)===F&&j.delete(d),!T.signal.aborted){if(ce.has(d)){De(d,Me(void 0));return}if(ze(oe))if(le>z){De(d,Me(void 0));return}else{se.add(d),await $e(T,oe,!1,{preventScrollReset:C});return}if(de(oe)){xe(d,m,oe.error);return}De(d,Me(oe.data))}}async function $e(d,m,v,{submission:R,fetcherSubmission:D,preventScrollReset:M,replace:x}={}){v||($?.resolve(),$=null),m.response.headers.has("X-Remix-Revalidate")&&(K=!0);let C=m.response.headers.get("Location");A(C,"Expected a Location header on the redirect Response"),C=Jr(C,new URL(d.url),s,e.history);let P=lt(g.location,C,{_isRedirect:!0});if(r){let te=!1;if(m.response.headers.has("X-Remix-Reload-Document"))te=!0;else if(or(C)){const ee=fa(C,!0);te=ee.origin!==t.location.origin||fe(ee.pathname,s)==null}if(te){x?t.location.replace(C):t.location.assign(C);return}}Y=null;let O=x===!0||m.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:F,formAction:T,formEncType:k}=g.navigation;!R&&!D&&F&&T&&k&&(R=Qr(g.navigation));let z=R||D;if(lo.has(m.response.status)&&z&&re(z.formMethod))await Ae(O,P,{submission:{...z,formAction:C},preventScrollReset:M||J,enableViewTransition:v?Q:void 0});else{let te=Yt(P,R);await Ae(O,P,{overrideNavigation:te,fetcherSubmission:D,preventScrollReset:M||J,enableViewTransition:v?Q:void 0})}}async function Qe(d,m,v,R){let D,M={};try{D=await go(f,d,m,R,v,!1)}catch(x){return m.filter(C=>C.shouldLoad).forEach(C=>{M[C.route.id]={type:"error",error:x}}),M}if(d.signal.aborted)return M;if(!re(d.method))for(let x of m){if(D[x.route.id]?.type==="error")break;!D.hasOwnProperty(x.route.id)&&!g.loaderData.hasOwnProperty(x.route.id)&&(!g.errors||!g.errors.hasOwnProperty(x.route.id))&&x.shouldCallHandler()&&(D[x.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${x.route.id}`)})}for(let[x,C]of Object.entries(D))if(Mo(C)){let P=C.result;M[x]={type:"redirect",response:bo(P,d,x,m,s)}}else M[x]=await Eo(C);return M}async function br(d,m,v,R){let D=Qe(v,d,R,null),M=Promise.all(m.map(async P=>{if(P.matches&&P.match&&P.request&&P.controller){let F=(await Qe(P.request,P.matches,R,P.key))[P.match.route.id];return{[P.key]:F}}else return Promise.resolve({[P.key]:{type:"error",error:ve(404,{pathname:P.path})}})})),x=await D,C=(await M).reduce((P,O)=>Object.assign(P,O),{});return{loaderResults:x,fetcherResults:C}}function kt(){K=!0,me.forEach((d,m)=>{j.has(m)&&he.add(m),Ce(m)})}function De(d,m,v={}){g.fetchers.set(d,m),ae({fetchers:new Map(g.fetchers)},{flushSync:(v&&v.flushSync)===!0})}function xe(d,m,v,R={}){let D=Te(g.matches,m);zt(d),ae({errors:{[D.route.id]:v},fetchers:new Map(g.fetchers)},{flushSync:(R&&R.flushSync)===!0})}function Sr(d){return pe.set(d,(pe.get(d)||0)+1),ce.has(d)&&ce.delete(d),g.fetchers.get(d)||so}function dn(d,m){Ce(d,m?.reason),De(d,Me(null))}function zt(d){let m=g.fetchers.get(d);j.has(d)&&!(m&&m.state==="loading"&&we.has(d))&&Ce(d),me.delete(d),we.delete(d),se.delete(d),ce.delete(d),he.delete(d),g.fetchers.delete(d)}function fn(d){let m=(pe.get(d)||0)-1;m<=0?(pe.delete(d),ce.add(d)):pe.set(d,m),ae({fetchers:new Map(g.fetchers)})}function Ce(d,m){let v=j.get(d);v&&(v.abort(m),j.delete(d))}function Lr(d){for(let m of d){let v=Sr(m),R=Me(v.data);g.fetchers.set(m,R)}}function Dr(){let d=[],m=!1;for(let v of se){let R=g.fetchers.get(v);A(R,`Expected fetcher: ${v}`),R.state==="loading"&&(se.delete(v),d.push(v),m=!0)}return Lr(d),m}function xr(d){let m=[];for(let[v,R]of we)if(R<d){let D=g.fetchers.get(v);A(D,`Expected fetcher: ${v}`),D.state==="loading"&&(Ce(v),we.delete(v),m.push(v))}return Lr(m),m.length>0}function hn(d,m){let v=g.blockers.get(d)||tt;return Fe.get(d)!==m&&Fe.set(d,m),v}function Cr(d){g.blockers.delete(d),Fe.delete(d)}function vt(d,m){let v=g.blockers.get(d)||tt;A(v.state==="unblocked"&&m.state==="blocked"||v.state==="blocked"&&m.state==="blocked"||v.state==="blocked"&&m.state==="proceeding"||v.state==="blocked"&&m.state==="unblocked"||v.state==="proceeding"&&m.state==="unblocked",`Invalid blocker state transition: ${v.state} -> ${m.state}`);let R=new Map(g.blockers);R.set(d,m),ae({blockers:R})}function Mr({currentLocation:d,nextLocation:m,historyAction:v}){if(Fe.size===0)return;Fe.size>1&&q(!1,"A router only supports one blocker at a time");let R=Array.from(Fe.entries()),[D,M]=R[R.length-1],x=g.blockers.get(D);if(!(x&&x.state==="proceeding")&&M({currentLocation:d,nextLocation:m,historyAction:v}))return D}function jt(d){let m=ve(404,{pathname:d}),v=u||l,{matches:R,route:D}=St(v);return{notFoundMatches:R,route:D,error:m}}function mn(d,m,v){if(w=d,E=m,S=v||null,!L&&g.navigation===Vt){L=!0;let R=_r(g.location,g.matches);R!=null&&ae({restoreScrollPosition:R})}return()=>{w=null,E=null,S=null}}function Pr(d,m){return S&&S(d,m.map(R=>ha(R,g.loaderData)))||d.key}function pn(d,m){if(w&&E){let v=Pr(d,m);w[v]=E()}}function _r(d,m){if(w){let v=Pr(d,m),R=w[v];if(typeof R=="number")return R}return null}function gt(d,m,v){if(e.patchRoutesOnNavigation)if(d){if(Object.keys(d[0].params).length>0)return{active:!0,matches:ot(m,v,s,!0)}}else return{active:!0,matches:ot(m,v,s,!0)||[]};return{active:!1,matches:null}}async function wt(d,m,v,R){if(!e.patchRoutesOnNavigation)return{type:"success",matches:d};let D=d;for(;;){let M=u==null,x=u||l,C=i;try{await e.patchRoutesOnNavigation({signal:v,path:m,matches:D,fetcherKey:R,patch:(F,T)=>{v.aborted||Br(F,T,x,C,o,!1)}})}catch(F){return{type:"error",error:F,partialMatches:D}}finally{M&&!v.aborted&&(l=[...l])}if(v.aborted)return{type:"aborted"};let P=Pe(x,m,s),O=null;if(P){if(Object.keys(P[0].params).length===0)return{type:"success",matches:P};if(O=ot(x,m,s,!0),!(O&&D.length<O.length&&Tr(D,O.slice(0,D.length))))return{type:"success",matches:P}}if(O||(O=ot(x,m,s,!0)),!O||Tr(D,O))return{type:"success",matches:null};D=O}}function Tr(d,m){return d.length===m.length&&d.every((v,R)=>v.route.id===m[R].route.id)}function yn(d){i={},u=st(d,o,void 0,i)}function vn(d,m,v=!1){let R=u==null;Br(d,m,u||l,i,o,v),R&&(l=[...l],ae({}))}return W={get basename(){return s},get future(){return c},get state(){return g},get routes(){return l},get window(){return t},initialize:en,subscribe:rn,enableScrollRestoration:mn,navigate:Rr,fetch:sn,revalidate:an,createHref:d=>e.history.createHref(d),encodeLocation:d=>e.history.encodeLocation(d),getFetcher:Sr,resetFetcher:dn,deleteFetcher:fn,dispose:tn,getBlocker:hn,deleteBlocker:Cr,patchRoutes:vn,_internalFetchControllers:j,_internalSetRoutes:yn,_internalSetStateDoNotUseOrYouWillBreakYourApp(d){ae(d)}},e.unstable_instrumentations&&(W=Zn(W,e.unstable_instrumentations.map(d=>d.router).filter(Boolean))),W}function fo(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Gt(e,t,r,a,n,o){let i,l;if(n){i=[];for(let s of t)if(i.push(s),s.route.id===n){l=s;break}}else i=t,l=t[t.length-1];let u=lr(a||".",ir(i),fe(e.pathname,r)||e.pathname,o==="path");if(a==null&&(u.search=e.search,u.hash=e.hash),(a==null||a===""||a===".")&&l){let s=ur(u.search);if(l.route.index&&!s)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&s){let f=new URLSearchParams(u.search),c=f.getAll("index");f.delete("index"),c.filter(y=>y).forEach(y=>f.append("index",y));let p=f.toString();u.search=p?`?${p}`:""}}return r!=="/"&&(u.pathname=Wn({basename:r,pathname:u.pathname})),Se(u)}function jr(e,t,r){if(!r||!fo(r))return{path:t};if(r.formMethod&&!To(r.formMethod))return{path:t,error:ve(405,{method:r.formMethod})};let a=()=>({path:t,error:ve(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=_a(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!re(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,[y,w])=>`${p}${y}=${w}
|
|
2
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(!re(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()}}}A(typeof FormData=="function","FormData is not available in this environment");let l,u;if(r.formData)l=Qt(r.formData),u=r.formData;else if(r.body instanceof FormData)l=Qt(r.body),u=r.body;else if(r.body instanceof URLSearchParams)l=r.body,u=Kr(l);else if(r.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(r.body),u=Kr(l)}catch{return a()}let s={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(re(s.formMethod))return{path:t,submission:s};let f=Ie(t);return e&&f.search&&ur(f.search)&&l.append("index",""),f.search=`?${l}`,{path:Se(f),submission:s}}function Hr(e,t,r,a,n,o,i,l,u,s,f,c,p,y,w,S,E,L,b,_,H){let U=_?de(_[1])?_[1].error:_[1].data:void 0,W=n.createURL(o.location),g=n.createURL(u),I;if(f&&o.errors){let V=Object.keys(o.errors)[0];I=i.findIndex(K=>K.route.id===V)}else if(_&&de(_[1])){let V=_[0];I=i.findIndex(K=>K.route.id===V)-1}let $=_?_[1].statusCode:void 0,J=$&&$>=400,Y={currentUrl:W,currentParams:o.matches[0]?.params||{},nextUrl:g,nextParams:i[0].params,...l,actionResult:U,actionStatus:$},Q=ut(i),ge=i.map((V,K)=>{let{route:he}=V,j=null;if(I!=null&&K>I?j=!1:he.lazy?j=!0:sr(he)?f?j=Xt(he,o.loaderData,o.errors):ho(o.loaderData,o.matches[K],V)&&(j=!0):j=!1,j!==null)return qt(r,a,e,Q,V,s,t,j);let Z=!1;typeof H=="boolean"?Z=H:J?Z=!1:(c||W.pathname+W.search===g.pathname+g.search||W.search!==g.search||mo(o.matches[K],V))&&(Z=!0);let le={...Y,defaultShouldRevalidate:Z},we=it(V,le);return qt(r,a,e,Q,V,s,t,we,le,H)}),X=[];return w.forEach((V,K)=>{if(f||!i.some(pe=>pe.route.id===V.routeId)||y.has(K))return;let he=o.fetchers.get(K),j=he&&he.state!=="idle"&&he.data===void 0,Z=Pe(E,V.path,L);if(!Z){if(b&&j)return;X.push({key:K,routeId:V.routeId,path:V.path,matches:null,match:null,request:null,controller:null});return}if(S.has(K))return;let le=Mt(Z,V.path),we=new AbortController,se=Ye(n,V.path,we.signal),me=null;if(p.has(K))p.delete(K),me=Ke(r,a,se,Z,le,s,t);else if(j)c&&(me=Ke(r,a,se,Z,le,s,t));else{let pe;typeof H=="boolean"?pe=H:J?pe=!1:pe=c;let ce={...Y,defaultShouldRevalidate:pe};it(le,ce)&&(me=Ke(r,a,se,Z,le,s,t,ce))}me&&X.push({key:K,routeId:V.routeId,path:V.path,matches:me,match:le,request:se,controller:we})}),{dsMatches:ge,revalidatingFetchers:X}}function sr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Xt(e,t,r){if(e.lazy)return!0;if(!sr(e))return!1;let a=t!=null&&e.id in t,n=r!=null&&r[e.id]!==void 0;return!a&&n?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!a&&!n}function ho(e,t,r){let a=!t||r.route.id!==t.route.id,n=!e.hasOwnProperty(r.route.id);return a||n}function mo(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function it(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Br(e,t,r,a,n,o){let i;if(e){let s=a[e];A(s,`No route found to patch children into: routeId = ${e}`),s.children||(s.children=[]),i=s.children}else i=r;let l=[],u=[];if(t.forEach(s=>{let f=i.find(c=>Da(s,c));f?u.push({existingRoute:f,newRoute:s}):l.push(s)}),l.length>0){let s=st(l,n,[e||"_","patch",String(i?.length||"0")],a);i.push(...s)}if(o&&u.length>0)for(let s=0;s<u.length;s++){let{existingRoute:f,newRoute:c}=u[s],p=f,[y]=st([c],n,[],{},!0);Object.assign(p,{element:y.element?y.element:p.element,errorElement:y.errorElement?y.errorElement:p.errorElement,hydrateFallbackElement:y.hydrateFallbackElement?y.hydrateFallbackElement:p.hydrateFallbackElement})}}function Da(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=>Da(r,n))):!1}var Wr=new WeakMap,xa=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let n=r[t.id];if(A(n,"No route found in manifest"),!n.lazy||typeof n.lazy!="object")return;let o=n.lazy[e];if(!o)return;let i=Wr.get(n);i||(i={},Wr.set(n,i));let l=i[e];if(l)return l;let u=(async()=>{let s=Mn(e),c=n[e]!==void 0&&e!=="hasErrorBoundary";if(s)q(!s,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(c)q(!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]=u,u},Vr=new WeakMap;function po(e,t,r,a,n){let o=r[e.id];if(A(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let f=Vr.get(o);if(f)return{lazyRoutePromise:f,lazyHandlerPromise:f};let c=(async()=>{A(typeof e.lazy=="function","No lazy route function found");let p=await e.lazy(),y={};for(let w in p){let S=p[w];if(S===void 0)continue;let E=_n(w),b=o[w]!==void 0&&w!=="hasErrorBoundary";E?q(!E,"Route property "+w+" is not a supported property to be returned from a lazy route function. This property will be ignored."):b?q(!b,`Route "${o.id}" has a static property "${w}" defined but its lazy function is also returning a value for this property. The lazy route property "${w}" will be ignored.`):y[w]=S}Object.assign(o,y),Object.assign(o,{...a(o),lazy:void 0})})();return Vr.set(o,c),c.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:c}}let i=Object.keys(e.lazy),l=[],u;for(let f of i){if(n&&n.includes(f))continue;let c=xa({key:f,route:e,manifest:r,mapRouteProperties:a});c&&(l.push(c),f===t&&(u=c))}let s=l.length>0?Promise.all(l).then(()=>{}):void 0;return s?.catch(()=>{}),u?.catch(()=>{}),{lazyRoutePromise:s,lazyHandlerPromise:u}}async function Yr(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 yo(e){return e.matches.some(t=>t.route.middleware)?Ca(e,()=>Yr(e)):Yr(e)}function Ca(e,t){return vo(e,t,a=>{if(_o(a))throw a;return a},xo,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(s=>s.route.id===n),0),Math.max(i.findIndex(s=>s.shouldCallHandler()),0)),u=Te(i,i[l].route.id).route.id;return Promise.resolve({[u]:{type:"error",result:a}})}}}async function vo(e,t,r,a,n){let{matches:o,request:i,params:l,context:u,unstable_pattern:s}=e,f=o.flatMap(p=>p.route.middleware?p.route.middleware.map(y=>[p.route.id,y]):[]);return await Ma({request:i,params:l,context:u,unstable_pattern:s},f,t,r,a,n)}async function Ma(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 u=t[i];if(!u)return await r();let[s,f]=u,c,p=async()=>{if(c)throw new Error("You may only call `next()` once per middleware");try{return c={value:await Ma(e,t,r,a,n,o,i+1)},c.value}catch(y){return c={value:await o(y,s,c)},c.value}};try{let y=await f(e,p),w=y!=null?a(y):void 0;return n(w)?w:c?w??c.value:(c={value:await p()},c.value)}catch(y){return await o(y,s,c)}}function Pa(e,t,r,a,n){let o=xa({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),i=po(a.route,re(r.method)?"action":"loader",t,e,n);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function qt(e,t,r,a,n,o,i,l,u=null,s){let f=!1,c=Pa(e,t,r,n,o);return{...n,_lazyPromises:c,shouldLoad:l,shouldRevalidateArgs:u,shouldCallHandler(p){return f=!0,u?typeof s=="boolean"?it(n,{...u,defaultShouldRevalidate:s}):typeof p=="boolean"?it(n,{...u,defaultShouldRevalidate:p}):it(n,u):l},resolve(p){let{lazy:y,loader:w,middleware:S}=n.route,E=f||l||p&&!re(r.method)&&(y||w),L=S&&S.length>0&&!w&&!y;return E&&(re(r.method)||!L)?wo({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 Ke(e,t,r,a,n,o,i,l=null){return a.map(u=>u.route.id!==n.route.id?{...u,shouldLoad:!1,shouldRevalidateArgs:l,shouldCallHandler:()=>!1,_lazyPromises:Pa(e,t,r,u,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:qt(e,t,r,ut(a),u,o,i,!0,l))}async function go(e,t,r,a,n,o){r.some(s=>s._lazyPromises?.middleware)&&await Promise.all(r.map(s=>s._lazyPromises?.middleware));let i={request:t,unstable_pattern:ut(r),params:r[0].params,context:n,matches:r},u=await e({...i,fetcherKey:a,runClientMiddleware:s=>{let f=i;return Ca(f,()=>s({...f,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(s=>[s._lazyPromises?.handler,s._lazyPromises?.route]))}catch{}return u}async function wo({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:a,lazyRoutePromise:n,handlerOverride:o,scopedContext:i}){let l,u,s=re(e.method),f=s?"action":"loader",c=p=>{let y,w=new Promise((L,b)=>y=b);u=()=>y(),e.signal.addEventListener("abort",u);let S=L=>typeof p!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${f}" [routeId: ${r.route.id}]`)):p({request:e,unstable_pattern:t,params:r.params,context:i},...L!==void 0?[L]:[]),E=(async()=>{try{return{type:"data",result:await(o?o(b=>S(b)):S())}}catch(L){return{type:"error",result:L}}})();return Promise.race([E,w])};try{let p=s?r.route.action:r.route.loader;if(a||n)if(p){let y,[w]=await Promise.all([c(p).catch(S=>{y=S}),a,n]);if(y!==void 0)throw y;l=w}else{await a;let y=s?r.route.action:r.route.loader;if(y)[l]=await Promise.all([c(y),n]);else if(f==="action"){let w=new URL(e.url),S=w.pathname+w.search;throw ve(405,{method:e.method,pathname:S,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(p)l=await c(p);else{let y=new URL(e.url),w=y.pathname+y.search;throw ve(404,{pathname:w})}}catch(p){return{type:"error",result:p}}finally{u&&e.signal.removeEventListener("abort",u)}return l}async function Ro(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 Eo(e){let{result:t,type:r}=e;if(At(t)){let a;try{a=await Ro(t)}catch(n){return{type:"error",error:n}}return r==="error"?{type:"error",error:new He(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return r==="error"?Zt(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:Do(t),statusCode:je(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:je(t)?t.status:void 0}:Zt(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 bo(e,t,r,a,n){let o=e.headers.get("Location");if(A(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!or(o)){let i=a.slice(0,a.findIndex(l=>l.route.id===r)+1);o=Gt(new URL(t.url),i,n,o),e.headers.set("Location",o)}return e}function Jr(e,t,r,a){let n=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(or(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=fe(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 Ye(e,t,r,a){let n=e.createURL(_a(t)).toString(),o={signal:r};if(a&&re(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=Qt(a.formData):o.body=a.formData}return new Request(n,o)}function Qt(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function Kr(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function So(e,t,r,a=!1,n=!1){let o={},i=null,l,u=!1,s={},f=r&&de(r[1])?r[1].error:void 0;return e.forEach(c=>{if(!(c.route.id in t))return;let p=c.route.id,y=t[p];if(A(!ze(y),"Cannot handle redirect results in processLoaderData"),de(y)){let w=y.error;if(f!==void 0&&(w=f,f=void 0),i=i||{},n)i[p]=w;else{let S=Te(e,p);i[S.route.id]==null&&(i[S.route.id]=w)}a||(o[p]=La),u||(u=!0,l=je(y.error)?y.error.status:500),y.headers&&(s[p]=y.headers)}else o[p]=y.data,y.statusCode&&y.statusCode!==200&&!u&&(l=y.statusCode),y.headers&&(s[p]=y.headers)}),f!==void 0&&r&&(i={[r[0]]:f},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:l||200,loaderHeaders:s}}function Gr(e,t,r,a,n,o){let{loaderData:i,errors:l}=So(t,r,a);return n.filter(u=>!u.matches||u.matches.some(s=>s.shouldLoad)).forEach(u=>{let{key:s,match:f,controller:c}=u;if(c&&c.signal.aborted)return;let p=o[s];if(A(p,"Did not find corresponding fetcher result"),de(p)){let y=Te(e.matches,f?.route.id);l&&l[y.route.id]||(l={...l,[y.route.id]:p.error}),e.fetchers.delete(s)}else if(ze(p))A(!1,"Unhandled fetcher revalidation redirect");else{let y=Me(p.data);e.fetchers.set(s,y)}}),{loaderData:i,errors:l}}function Xr(e,t,r,a){let n=Object.entries(t).filter(([,o])=>o!==La).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 qr(e){return e?de(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Te(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 St(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 ve(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 He(e||500,i,new Error(l),!0)}function Lt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,n]=t[r];if(ze(n))return{key:a,result:n}}}function _a(e){let t=typeof e=="string"?Ie(e):e;return Se({...t,hash:""})}function Lo(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Do(e){return new He(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function xo(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&Co(r))}function Co(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function Mo(e){return At(e.result)&&ba.has(e.result.status)}function de(e){return e.type==="error"}function ze(e){return(e&&e.type)==="redirect"}function Zt(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function At(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Po(e){return ba.has(e)}function _o(e){return At(e)&&Po(e.status)&&e.headers.has("Location")}function To(e){return io.has(e.toUpperCase())}function re(e){return no.has(e.toUpperCase())}function ur(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Mt(e,t){let r=typeof t=="string"?Ie(t).search:t.search;if(e[e.length-1].route.index&&ur(r||""))return e[e.length-1];let a=va(e);return a[a.length-1]}function Qr(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 Yt(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Oo(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function rt(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 Io(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 Me(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 Fo(e,t){try{let r=e.sessionStorage.getItem(Sa);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 Ao(e,t){if(t.size>0){let r={};for(let[a,n]of t)r[a]=[...n];try{e.sessionStorage.setItem(Sa,JSON.stringify(r))}catch(a){q(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function Zr(){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 Be=h.createContext(null);Be.displayName="DataRouter";var Xe=h.createContext(null);Xe.displayName="DataRouterState";var cr=h.createContext(!1);function $o(){return h.useContext(cr)}var dr=h.createContext({isTransitioning:!1});dr.displayName="ViewTransition";var Ta=h.createContext(new Map);Ta.displayName="Fetchers";var Uo=h.createContext(null);Uo.displayName="Await";var ue=h.createContext(null);ue.displayName="Navigation";var $t=h.createContext(null);$t.displayName="Location";var Re=h.createContext({outlet:null,matches:[],isDataRoute:!1});Re.displayName="Route";var fr=h.createContext(null);fr.displayName="RouteError";var Oa="REACT_ROUTER_ERROR",No="REDIRECT",ko="ROUTE_ERROR_RESPONSE";function zo(e){if(e.startsWith(`${Oa}:${No}:{`))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 jo(e){if(e.startsWith(`${Oa}:${ko}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new He(t.status,t.statusText,t.data)}catch{}}function Ho(e,{relative:t}={}){A(ct(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=h.useContext(ue),{hash:n,pathname:o,search:i}=dt(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:be([r,o])),a.createHref({pathname:l,search:i,hash:n})}function ct(){return h.useContext($t)!=null}function Le(){return A(ct(),"useLocation() may be used only in the context of a <Router> component."),h.useContext($t).location}var Ia="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Fa(e){h.useContext(ue).static||h.useLayoutEffect(e)}function Bo(){let{isDataRoute:e}=h.useContext(Re);return e?ai():Wo()}function Wo(){A(ct(),"useNavigate() may be used only in the context of a <Router> component.");let e=h.useContext(Be),{basename:t,navigator:r}=h.useContext(ue),{matches:a}=h.useContext(Re),{pathname:n}=Le(),o=JSON.stringify(ir(a)),i=h.useRef(!1);return Fa(()=>{i.current=!0}),h.useCallback((u,s={})=>{if(q(i.current,Ia),!i.current)return;if(typeof u=="number"){r.go(u);return}let f=lr(u,JSON.parse(o),n,s.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:be([t,f.pathname])),(s.replace?r.replace:r.push)(f,s.state,s)},[t,r,o,n,e])}var Vo=h.createContext(null);function Yo(e){let t=h.useContext(Re).outlet;return h.useMemo(()=>t&&h.createElement(Vo.Provider,{value:e},t),[t,e])}function hr(){let{matches:e}=h.useContext(Re),t=e[e.length-1];return t?t.params:{}}function dt(e,{relative:t}={}){let{matches:r}=h.useContext(Re),{pathname:a}=Le(),n=JSON.stringify(ir(r));return h.useMemo(()=>lr(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function Jo(e,t,r,a,n){A(ct(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=h.useContext(ue),{matches:i}=h.useContext(Re),l=i[i.length-1],u=l?l.params:{},s=l?l.pathname:"/",f=l?l.pathnameBase:"/",c=l&&l.route;{let b=c&&c.path||"";Ua(s,!c||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${b}">) 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
3
|
|
|
4
4
|
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let p=Le(),y;y=p;let w=y.pathname||"/",S=w;if(f!=="/"){let b=f.replace(/^\//,"").split("/");S="/"+w.replace(/^\//,"").split("/").slice(b.length).join("/")}let E=Pe(e,{pathname:S});return q(c||E!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),q(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.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.`),Qo(E&&E.map(b=>Object.assign({},b,{params:Object.assign({},u,b.params),pathname:be([f,o.encodeLocation?o.encodeLocation(b.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?f:be([f,o.encodeLocation?o.encodeLocation(b.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),i,r,a,n)}function Ko(){let e=$a(),t=je(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=h.createElement(h.Fragment,null,h.createElement("p",null,"💿 Hey developer 👋"),h.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",h.createElement("code",{style:o},"ErrorBoundary")," or"," ",h.createElement("code",{style:o},"errorElement")," prop on your route.")),h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),r?h.createElement("pre",{style:n},r):null,i)}var Go=h.createElement(Ko,null),Aa=class extends h.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=jo(e.digest);r&&(e=r)}let t=e!==void 0?h.createElement(Re.Provider,{value:this.props.routeContext},h.createElement(fr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?h.createElement(Xo,{error:e},t):t}};Aa.contextType=cr;var Jt=new WeakMap;function Xo({children:e,error:t}){let{basename:r}=h.useContext(ue);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=zo(t.digest);if(a){let n=Jt.get(t);if(n)throw n;let o=wa(a.location,r);if(ga&&!Jt.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 Jt.set(t,i),i}return h.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function qo({routeContext:e,match:t,children:r}){let a=h.useContext(Be);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),h.createElement(Re.Provider,{value:e},r)}function Qo(e,t=[],r=null,a=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r?.errors;if(i!=null){let f=o.findIndex(c=>c.route.id&&i?.[c.route.id]!==void 0);A(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(r)for(let f=0;f<o.length;f++){let c=o[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=f),c.route.id){let{loaderData:p,errors:y}=r,w=c.route.loader&&!p.hasOwnProperty(c.route.id)&&(!y||y[c.route.id]===void 0);if(c.route.lazy||w){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}let s=r&&a?(f,c)=>{a(f,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:ut(r.matches),errorInfo:c})}:void 0;return o.reduceRight((f,c,p)=>{let y,w=!1,S=null,E=null;r&&(y=i&&c.route.id?i[c.route.id]:void 0,S=c.route.errorElement||Go,l&&(u<0&&p===0?(Ua("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,E=null):u===p&&(w=!0,E=c.route.hydrateFallbackElement||null)));let L=t.concat(o.slice(0,p+1)),b=()=>{let _;return y?_=S:w?_=E:c.route.Component?_=h.createElement(c.route.Component,null):c.route.element?_=c.route.element:_=f,h.createElement(qo,{match:c,routeContext:{outlet:f,matches:L,isDataRoute:r!=null},children:_})};return r&&(c.route.ErrorBoundary||c.route.errorElement||p===0)?h.createElement(Aa,{location:r.location,revalidation:r.revalidation,component:S,error:y,children:b(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:s}):b()},null)}function mr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Zo(e){let t=h.useContext(Be);return A(t,mr(e)),t}function ft(e){let t=h.useContext(Xe);return A(t,mr(e)),t}function ei(e){let t=h.useContext(Re);return A(t,mr(e)),t}function ht(e){let t=ei(e),r=t.matches[t.matches.length-1];return A(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function ti(){return ht("useRouteId")}function ri(){return ft("useNavigation").navigation}function pr(){let{matches:e,loaderData:t}=ft("useMatches");return h.useMemo(()=>e.map(r=>ha(r,t)),[e,t])}function yr(){let e=ft("useLoaderData"),t=ht("useLoaderData");return e.loaderData[t]}function vr(){let e=ft("useActionData"),t=ht("useLoaderData");return e.actionData?e.actionData[t]:void 0}function $a(){let e=h.useContext(fr),t=ft("useRouteError"),r=ht("useRouteError");return e!==void 0?e:t.errors?.[r]}function ai(){let{router:e}=Zo("useNavigate"),t=ht("useNavigate"),r=h.useRef(!1);return Fa(()=>{r.current=!0}),h.useCallback(async(n,o={})=>{q(r.current,Ia),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var ea={};function Ua(e,t,r){!t&&!ea[e]&&(ea[e]=!0,q(!1,r))}var ta={};function ra(e,t){!e&&!ta[t]&&(ta[t]=!0,console.warn(t))}var ni="useOptimistic",aa=wn[ni],oi=()=>{};function ii(e){return aa?aa(e):[e,oi]}var li=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 si({router:e,flushSync:t,onError:r,unstable_useTransitions:a}){a=$o()||a;let[o,i]=h.useState(e.state),[l,u]=ii(o),[s,f]=h.useState(),[c,p]=h.useState({isTransitioning:!1}),[y,w]=h.useState(),[S,E]=h.useState(),[L,b]=h.useState(),_=h.useRef(new Map),H=h.useCallback((I,{deletedFetchers:$,newErrors:J,flushSync:Y,viewTransitionOpts:Q})=>{J&&r&&Object.values(J).forEach(X=>r(X,{location:I.location,params:I.matches[0]?.params??{},unstable_pattern:ut(I.matches)})),I.fetchers.forEach((X,V)=>{X.data!==void 0&&_.current.set(V,X.data)}),$.forEach(X=>_.current.delete(X)),ra(Y===!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 ge=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(ra(Q==null||ge,"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."),!Q||!ge){t&&Y?t(()=>i(I)):a===!1?i(I):h.startTransition(()=>{a===!0&&u(X=>na(X,I)),i(I)});return}if(t&&Y){t(()=>{S&&(y?.resolve(),S.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})});let X=e.window.document.startViewTransition(()=>{t(()=>i(I))});X.finished.finally(()=>{t(()=>{w(void 0),E(void 0),f(void 0),p({isTransitioning:!1})})}),t(()=>E(X));return}S?(y?.resolve(),S.skipTransition(),b({state:I,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})):(f(I),p({isTransitioning:!0,flushSync:!1,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation}))},[e.window,t,S,y,a,u,r]);h.useLayoutEffect(()=>e.subscribe(H),[e,H]),h.useEffect(()=>{c.isTransitioning&&!c.flushSync&&w(new li)},[c]),h.useEffect(()=>{if(y&&s&&e.window){let I=s,$=y.promise,J=e.window.document.startViewTransition(async()=>{a===!1?i(I):h.startTransition(()=>{a===!0&&u(Y=>na(Y,I)),i(I)}),await $});J.finished.finally(()=>{w(void 0),E(void 0),f(void 0),p({isTransitioning:!1})}),E(J)}},[s,y,e.window,a,u]),h.useEffect(()=>{y&&s&&l.location.key===s.location.key&&y.resolve()},[y,S,l.location,s]),h.useEffect(()=>{!c.isTransitioning&&L&&(f(L.state),p({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}),b(void 0))},[c.isTransitioning,L]);let U=h.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:I=>e.navigate(I),push:(I,$,J)=>e.navigate(I,{state:$,preventScrollReset:J?.preventScrollReset}),replace:(I,$,J)=>e.navigate(I,{replace:!0,state:$,preventScrollReset:J?.preventScrollReset})}),[e]),W=e.basename||"/",g=h.useMemo(()=>({router:e,navigator:U,static:!1,basename:W,onError:r}),[e,U,W,r]);return h.createElement(h.Fragment,null,h.createElement(Be.Provider,{value:g},h.createElement(Xe.Provider,{value:l},h.createElement(Ta.Provider,{value:_.current},h.createElement(dr.Provider,{value:c},h.createElement(di,{basename:W,location:l.location,navigationType:l.historyAction,navigator:U,unstable_useTransitions:a},h.createElement(ui,{routes:e.routes,future:e.future,state:l,onError:r})))))),null)}function na(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 ui=h.memo(ci);function ci({routes:e,future:t,state:r,onError:a}){return Jo(e,void 0,r,a,t)}function gl(e){return Yo(e.context)}function di({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,unstable_useTransitions:i}){A(!ct(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),u=h.useMemo(()=>({basename:l,navigator:n,static:o,unstable_useTransitions:i,future:{}}),[l,n,o,i]);typeof r=="string"&&(r=Ie(r));let{pathname:s="/",search:f="",hash:c="",state:p=null,key:y="default"}=r,w=h.useMemo(()=>{let S=fe(s,l);return S==null?null:{location:{pathname:S,search:f,hash:c,state:p,key:y},navigationType:a}},[l,s,f,c,p,y,a]);return q(w!=null,`<Router basename="${l}"> is not able to match the URL "${s}${f}${c}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:h.createElement(ue.Provider,{value:u},h.createElement($t.Provider,{children:t,value:w}))}function fi(){return{params:hr(),loaderData:yr(),actionData:vr(),matches:pr()}}function wl({children:e}){const t=fi();return h.cloneElement(e,t)}function hi(){return{params:hr(),loaderData:yr(),actionData:vr()}}function Rl({children:e}){const t=hi();return h.cloneElement(e,t)}function mi(){return{params:hr(),loaderData:yr(),actionData:vr(),error:$a()}}function El({children:e}){const t=mi();return h.cloneElement(e,t)}var Pt="get",_t="application/x-www-form-urlencoded";function Ut(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function pi(e){return Ut(e)&&e.tagName.toLowerCase()==="button"}function yi(e){return Ut(e)&&e.tagName.toLowerCase()==="form"}function vi(e){return Ut(e)&&e.tagName.toLowerCase()==="input"}function gi(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function wi(e,t){return e.button===0&&(!t||t==="_self")&&!gi(e)}var Dt=null;function Ri(){if(Dt===null)try{new FormData(document.createElement("form"),0),Dt=!1}catch{Dt=!0}return Dt}var Ei=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Kt(e){return e!=null&&!Ei.has(e)?(q(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_t}"`),null):e}function bi(e,t){let r,a,n,o,i;if(yi(e)){let l=e.getAttribute("action");a=l?fe(l,t):null,r=e.getAttribute("method")||Pt,n=Kt(e.getAttribute("enctype"))||_t,o=new FormData(e)}else if(pi(e)||vi(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 u=e.getAttribute("formaction")||l.getAttribute("action");if(a=u?fe(u,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Pt,n=Kt(e.getAttribute("formenctype"))||Kt(l.getAttribute("enctype"))||_t,o=new FormData(l,e),!Ri()){let{name:s,type:f,value:c}=e;if(f==="image"){let p=s?`${s}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else s&&o.append(s,c)}}else{if(Ut(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Pt,a=null,n=_t,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");async function Si(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 Li={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Di=/[&><\u2028\u2029]/g;function er(e){return e.replace(Di,t=>Li[t])}function mt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var Na=class extends Error{},xi=new Set([100,101,204,205]);function Ci(e,t,r,a,n,o,i=()=>!0){return async l=>{let{request:u,matches:s,fetcherKey:f}=l,c=e();return u.method!=="GET"?Mi(l,r,n,o):(s.some(p=>{let{hasLoader:y,hasClientLoader:w}=t(p);return p.shouldCallHandler()&&y&&!w}),f?Ti(l,r,n,o):Pi(l,c,t,r,a,n,o,i))}}async function Mi(e,t,r,a){let n=e.matches.find(l=>l.shouldCallHandler());mt(n,"No action match found");let o,i=await n.resolve(async l=>await l(async()=>{let{data:s,status:f}=await t(e,r,a,[n.route.id]);return o=f,It(s,n.route.id)}));return At(i.result)||je(i.result)||Zt(i.result)?{[n.route.id]:i}:{[n.route.id]:{type:i.type,result:Xn(i.result,o)}}}async function Pi(e,t,r,a,n,o,i,l=()=>!0){let u=new Set,s=!1,f=e.matches.map(()=>oa()),c=oa(),p={},y=Promise.all(e.matches.map(async(S,E)=>S.resolve(async L=>{f[E].resolve();let b=S.route.id,{hasLoader:_,hasClientLoader:H,hasShouldRevalidate:U}=r(S),W=!S.shouldRevalidateArgs||S.shouldRevalidateArgs.actionStatus==null||S.shouldRevalidateArgs.actionStatus<400;if(!S.shouldCallHandler(W)){s||(s=S.shouldRevalidateArgs!=null&&_&&U===!0);return}if(l(S)&&H){_&&(s=!0);try{let I=await L(async()=>{let{data:$}=await a(e,o,i,[b]);return It($,b)});p[b]={type:"data",result:I}}catch(I){p[b]={type:"error",result:I}}return}_&&u.add(b);try{let I=await L(async()=>{let $=await c.promise;return It($,b)});p[b]={type:"data",result:I}}catch(I){p[b]={type:"error",result:I}}})));if(await Promise.all(f.map(S=>S.promise)),(!t.state.initialized&&t.state.navigation.state==="idle"||u.size===0)&&!window.__reactRouterHdrActive)c.resolve({routes:{}});else{let S=s&&u.size>0?[...u.keys()]:void 0;try{let E=await a(e,o,i,S);c.resolve(E.data)}catch(E){c.reject(E)}}return await y,await _i(c.promise,e.matches,u,p),p}async function _i(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 Na&&(a[i].result=n)})}catch{}}async function Ti(e,t,r,a){let n=e.matches.find(l=>l.shouldCallHandler());mt(n,"No fetcher match found");let o=n.route.id,i=await n.resolve(async l=>l(async()=>{let{data:u}=await t(e,r,a,[o]);return It(u,o)}));return{[n.route.id]:i}}function Oi(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 ka(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&&fe(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${a}`,n}function It(e,t){if("redirect"in e){let{redirect:a,revalidate:n,reload:o,replace:i,status:l}=e.redirect;throw qn(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 Na(`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 oa(){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 Ii(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 Fi(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(u=>({rel:"stylesheet",href:u})):[],i?.links?.()||[]]}).flat(2),n=ja(e,r);return Ha(a,n)}function za(e){return e!=null&&typeof e.page=="string"}function Ai(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 $i(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await Ii(o,r);return i.links?i.links():[]}return[]}));return Ha(a.flat(1).filter(Ai).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function ia(e,t,r,a,n,o){let i=(u,s)=>r[s]?u.route.id!==r[s].route.id:!0,l=(u,s)=>r[s].pathname!==u.pathname||r[s].route.path?.endsWith("*")&&r[s].params["*"]!==u.params["*"];return o==="assets"?t.filter((u,s)=>i(u,s)||l(u,s)):o==="data"?t.filter((u,s)=>{let f=a.routes[u.route.id];if(!f||!f.hasLoader)return!1;if(i(u,s)||l(u,s))return!0;if(u.route.shouldRevalidate){let c=u.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof c=="boolean")return c}return!0}):[]}function ja(e,t,{includeHydrateFallback:r}={}){return Ui(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 Ui(e){return[...new Set(e)]}function Ni(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function Ha(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!za(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify(Ni(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}function ki(e,t){let r="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 He(405,"Method Not Allowed",new Error(a),!0)}function Ba(e,t,r,a){return a&&e!=="root"||t!=null&&(t.hydrate===!0||r!==!0)}function Wa(){let e=h.useContext(Be);return mt(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function gr(){let e=h.useContext(Xe);return mt(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var pt=h.createContext(void 0);pt.displayName="FrameworkContext";function Nt(){let e=h.useContext(pt);return mt(e,"You must render this element inside a <HydratedRouter> element"),e}function zi(e,t){let r=h.useContext(pt),[a,n]=h.useState(!1),[o,i]=h.useState(!1),{onFocus:l,onBlur:u,onMouseEnter:s,onMouseLeave:f,onTouchStart:c}=t,p=h.useRef(null);h.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let S=L=>{L.forEach(b=>{i(b.isIntersecting)})},E=new IntersectionObserver(S,{threshold:.5});return p.current&&E.observe(p.current),()=>{E.disconnect()}}},[e]),h.useEffect(()=>{if(a){let S=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(S)}}},[a]);let y=()=>{n(!0)},w=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,p,{}]:[o,p,{onFocus:at(l,y),onBlur:at(u,w),onMouseEnter:at(s,y),onMouseLeave:at(f,w),onTouchStart:at(c,y)}]:[!1,p,{}]}function at(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Va(e,t,r){if(r&&!Ja)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 la="data-react-router-critical-css";function bl({nonce:e,crossOrigin:t}){let{isSpaMode:r,manifest:a,routeModules:n,criticalCss:o}=Nt(),{errors:i,matches:l}=gr(),u=Va(l,i,r),s=h.useMemo(()=>Fi(u,n,a),[u,n,a]);return h.createElement(h.Fragment,null,typeof o=="string"?h.createElement("style",{[la]:"",nonce:e,dangerouslySetInnerHTML:{__html:o}}):null,typeof o=="object"?h.createElement("link",{[la]:"",rel:"stylesheet",href:o.href,nonce:e,crossOrigin:t}):null,s.map(({key:f,link:c})=>za(c)?h.createElement(Ya,{key:f,nonce:e,...c,crossOrigin:c.crossOrigin??t}):h.createElement("link",{key:f,nonce:e,...c,crossOrigin:c.crossOrigin??t})))}function Ya({page:e,...t}){let{router:r}=Wa(),a=h.useMemo(()=>Pe(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?h.createElement(Hi,{page:e,matches:a,...t}):null}function ji(e){let{manifest:t,routeModules:r}=Nt(),[a,n]=h.useState([]);return h.useEffect(()=>{let o=!1;return $i(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function Hi({page:e,matches:t,...r}){let a=Le(),{future:n,manifest:o,routeModules:i}=Nt(),{basename:l}=Wa(),{loaderData:u,matches:s}=gr(),f=h.useMemo(()=>ia(e,t,s,o,a,"data"),[e,t,s,o,a]),c=h.useMemo(()=>ia(e,t,s,o,a,"assets"),[e,t,s,o,a]),p=h.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let S=new Set,E=!1;if(t.forEach(b=>{let _=o.routes[b.route.id];!_||!_.hasLoader||(!f.some(H=>H.route.id===b.route.id)&&b.route.id in u&&i[b.route.id]?.shouldRevalidate||_.hasClientLoader?E=!0:S.add(b.route.id))}),S.size===0)return[];let L=ka(e,l,n.unstable_trailingSlashAwareDataRequests,"data");return E&&S.size>0&&L.searchParams.set("_routes",t.filter(b=>S.has(b.route.id)).map(b=>b.route.id).join(",")),[L.pathname+L.search]},[l,n.unstable_trailingSlashAwareDataRequests,u,a,o,f,t,e,i]),y=h.useMemo(()=>ja(c,o),[c,o]),w=ji(c);return h.createElement(h.Fragment,null,p.map(S=>h.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),y.map(S=>h.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),w.map(({key:S,link:E})=>h.createElement("link",{key:S,nonce:r.nonce,...E,crossOrigin:E.crossOrigin??r.crossOrigin})))}function Sl(){let{isSpaMode:e,routeModules:t}=Nt(),{errors:r,matches:a,loaderData:n}=gr(),o=Le(),i=Va(a,r,e),l=null;r&&(l=r[i[i.length-1].route.id]);let u=[],s=null,f=[];for(let c=0;c<i.length;c++){let p=i[c],y=p.route.id,w=n[y],S=p.params,E=t[y],L=[],b={id:y,data:w,loaderData:w,meta:[],params:p.params,pathname:p.pathname,handle:p.route.handle,error:l};if(f[c]=b,E?.meta?L=typeof E.meta=="function"?E.meta({data:w,loaderData:w,params:S,location:o,matches:f,error:l}):Array.isArray(E.meta)?[...E.meta]:E.meta:s&&(L=[...s]),L=L||[],!Array.isArray(L))throw new Error("The route at "+p.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as n,j as r,a as Ee}from"./react-CzFdRS7Y.js";import{c as Ne,h as be,R as nt,u as Ie,o as k,A as rt,P as j,i as P,g as G,v as st,w as Re,V as at,f as lt,x as ct,D as it,y as dt,F as ut,E as pt,j as ft,z as mt,G as ht,H as vt,d as te}from"./index-DrT4Adhh.js";import{u as gt,c as xt,C as St}from"./index-BTaHNKf7.js";const wt=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_e=Ne("chevron-down",wt);const Ct=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],yt=Ne("chevron-up",Ct);function Pe(t,[o,e]){return Math.min(e,Math.max(o,t))}function It(t){const o=n.useRef({value:t,previous:t});return n.useMemo(()=>(o.current.value!==t&&(o.current.previous=o.current.value,o.current.value=t),o.current.previous),[t])}var Tt=[" ","Enter","ArrowUp","ArrowDown"],bt=[" ","Enter"],J="Select",[ie,de,Pt]=xt(J),[oe]=ft(J,[Pt,Re]),ue=Re(),[Et,$]=oe(J),[Nt,Rt]=oe(J),je=t=>{const{__scopeSelect:o,children:e,open:c,defaultOpen:a,onOpenChange:u,value:s,defaultValue:l,onValueChange:i,dir:f,name:g,autoComplete:w,disabled:E,required:T,form:y}=t,d=ue(o),[h,x]=n.useState(null),[m,v]=n.useState(null),[U,M]=n.useState(!1),ne=gt(f),[N,O]=be({prop:c,defaultProp:a??!1,onChange:u,caller:J}),[W,q]=be({prop:s,defaultProp:l,onChange:i,caller:J}),L=n.useRef(null),B=h?y||!!h.closest("form"):!0,[z,V]=n.useState(new Set),H=Array.from(z).map(R=>R.props.value).join(";");return r.jsx(nt,{...d,children:r.jsxs(Et,{required:T,scope:o,trigger:h,onTriggerChange:x,valueNode:m,onValueNodeChange:v,valueNodeHasChildren:U,onValueNodeHasChildrenChange:M,contentId:Ie(),value:W,onValueChange:q,open:N,onOpenChange:O,dir:ne,triggerPointerDownPosRef:L,disabled:E,children:[r.jsx(ie.Provider,{scope:o,children:r.jsx(Nt,{scope:t.__scopeSelect,onNativeOptionAdd:n.useCallback(R=>{V(D=>new Set(D).add(R))},[]),onNativeOptionRemove:n.useCallback(R=>{V(D=>{const F=new Set(D);return F.delete(R),F})},[]),children:e})}),B?r.jsxs(Qe,{"aria-hidden":!0,required:T,tabIndex:-1,name:g,autoComplete:w,value:W,onChange:R=>q(R.target.value),disabled:E,form:y,children:[W===void 0?r.jsx("option",{value:""}):null,Array.from(z)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=n.forwardRef((t,o)=>{const{__scopeSelect:e,disabled:c=!1,...a}=t,u=ue(e),s=$(Me,e),l=s.disabled||c,i=k(o,s.onTriggerChange),f=de(e),g=n.useRef("touch"),[w,E,T]=tt(d=>{const h=f().filter(v=>!v.disabled),x=h.find(v=>v.value===s.value),m=ot(h,d,x);m!==void 0&&s.onValueChange(m.value)}),y=d=>{l||(s.onOpenChange(!0),T()),d&&(s.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})};return r.jsx(rt,{asChild:!0,...u,children:r.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...a,ref:i,onClick:P(a.onClick,d=>{d.currentTarget.focus(),g.current!=="mouse"&&y(d)}),onPointerDown:P(a.onPointerDown,d=>{g.current=d.pointerType;const h=d.target;h.hasPointerCapture(d.pointerId)&&h.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(y(d),d.preventDefault())}),onKeyDown:P(a.onKeyDown,d=>{const h=w.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&E(d.key),!(h&&d.key===" ")&&Tt.includes(d.key)&&(y(),d.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:c,style:a,children:u,placeholder:s="",...l}=t,i=$(Oe,e),{onValueNodeHasChildrenChange:f}=i,g=u!==void 0,w=k(o,i.onValueNodeChange);return G(()=>{f(g)},[f,g]),r.jsx(j.span,{...l,ref:w,style:{pointerEvents:"none"},children:et(i.value)?r.jsx(r.Fragment,{children:s}):u})});De.displayName=Oe;var _t="SelectIcon",ke=n.forwardRef((t,o)=>{const{__scopeSelect:e,children:c,...a}=t;return r.jsx(j.span,{"aria-hidden":!0,...a,ref:o,children:c||"▼"})});ke.displayName=_t;var jt="SelectPortal",Le=t=>r.jsx(st,{asChild:!0,...t});Le.displayName=jt;var Q="SelectContent",Be=n.forwardRef((t,o)=>{const e=$(Q,t.__scopeSelect),[c,a]=n.useState();if(G(()=>{a(new DocumentFragment)},[]),!e.open){const u=c;return u?Ee.createPortal(r.jsx(Ve,{scope:t.__scopeSelect,children:r.jsx(ie.Slot,{scope:t.__scopeSelect,children:r.jsx("div",{children:t.children})})}),u):null}return r.jsx(He,{...t,ref:o})});Be.displayName=Q;var A=10,[Ve,Y]=oe(Q),Mt="SelectContentImpl",At=mt("SelectContent.RemoveScroll"),He=n.forwardRef((t,o)=>{const{__scopeSelect:e,position:c="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:u,onPointerDownOutside:s,side:l,sideOffset:i,align:f,alignOffset:g,arrowPadding:w,collisionBoundary:E,collisionPadding:T,sticky:y,hideWhenDetached:d,avoidCollisions:h,...x}=t,m=$(Q,e),[v,U]=n.useState(null),[M,ne]=n.useState(null),N=k(o,p=>U(p)),[O,W]=n.useState(null),[q,L]=n.useState(null),B=de(e),[z,V]=n.useState(!1),H=n.useRef(!1);n.useEffect(()=>{if(v)return ct(v)},[v]),it();const R=n.useCallback(p=>{const[I,..._]=B().map(b=>b.ref.current),[S]=_.slice(-1),C=document.activeElement;for(const b of p)if(b===C||(b?.scrollIntoView({block:"nearest"}),b===I&&M&&(M.scrollTop=0),b===S&&M&&(M.scrollTop=M.scrollHeight),b?.focus(),document.activeElement!==C))return},[B,M]),D=n.useCallback(()=>R([O,v]),[R,O,v]);n.useEffect(()=>{z&&D()},[z,D]);const{onOpenChange:F,triggerPointerDownPosRef:K}=m;n.useEffect(()=>{if(v){let p={x:0,y:0};const I=S=>{p={x:Math.abs(Math.round(S.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(S.pageY)-(K.current?.y??0))}},_=S=>{p.x<=10&&p.y<=10?S.preventDefault():v.contains(S.target)||F(!1),document.removeEventListener("pointermove",I),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",I),document.addEventListener("pointerup",_,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",I),document.removeEventListener("pointerup",_,{capture:!0})}}},[v,F,K]),n.useEffect(()=>{const p=()=>F(!1);return window.addEventListener("blur",p),window.addEventListener("resize",p),()=>{window.removeEventListener("blur",p),window.removeEventListener("resize",p)}},[F]);const[pe,ae]=tt(p=>{const I=B().filter(C=>!C.disabled),_=I.find(C=>C.ref.current===document.activeElement),S=ot(I,p,_);S&&setTimeout(()=>S.ref.current.focus())}),fe=n.useCallback((p,I,_)=>{const S=!H.current&&!_;(m.value!==void 0&&m.value===I||S)&&(W(p),S&&(H.current=!0))},[m.value]),me=n.useCallback(()=>v?.focus(),[v]),ee=n.useCallback((p,I,_)=>{const S=!H.current&&!_;(m.value!==void 0&&m.value===I||S)&&L(p)},[m.value]),le=c==="popper"?xe:Fe,re=le===xe?{side:l,sideOffset:i,align:f,alignOffset:g,arrowPadding:w,collisionBoundary:E,collisionPadding:T,sticky:y,hideWhenDetached:d,avoidCollisions:h}:{};return r.jsx(Ve,{scope:e,content:v,viewport:M,onViewportChange:ne,itemRefCallback:fe,selectedItem:O,onItemLeave:me,itemTextRefCallback:ee,focusSelectedItem:D,selectedItemText:q,position:c,isPositioned:z,searchRef:pe,children:r.jsx(dt,{as:At,allowPinchZoom:!0,children:r.jsx(ut,{asChild:!0,trapped:m.open,onMountAutoFocus:p=>{p.preventDefault()},onUnmountAutoFocus:P(a,p=>{m.trigger?.focus({preventScroll:!0}),p.preventDefault()}),children:r.jsx(pt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:r.jsx(le,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:p=>p.preventDefault(),...x,...re,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:P(x.onKeyDown,p=>{const I=p.ctrlKey||p.altKey||p.metaKey;if(p.key==="Tab"&&p.preventDefault(),!I&&p.key.length===1&&ae(p.key),["ArrowUp","ArrowDown","Home","End"].includes(p.key)){let S=B().filter(C=>!C.disabled).map(C=>C.ref.current);if(["ArrowUp","End"].includes(p.key)&&(S=S.slice().reverse()),["ArrowUp","ArrowDown"].includes(p.key)){const C=p.target,b=S.indexOf(C);S=S.slice(b+1)}setTimeout(()=>R(S)),p.preventDefault()}})})})})})})});He.displayName=Mt;var Ot="SelectItemAlignedPosition",Fe=n.forwardRef((t,o)=>{const{__scopeSelect:e,onPlaced:c,...a}=t,u=$(Q,e),s=Y(Q,e),[l,i]=n.useState(null),[f,g]=n.useState(null),w=k(o,N=>g(N)),E=de(e),T=n.useRef(!1),y=n.useRef(!0),{viewport:d,selectedItem:h,selectedItemText:x,focusSelectedItem:m}=s,v=n.useCallback(()=>{if(u.trigger&&u.valueNode&&l&&f&&d&&h&&x){const N=u.trigger.getBoundingClientRect(),O=f.getBoundingClientRect(),W=u.valueNode.getBoundingClientRect(),q=x.getBoundingClientRect();if(u.dir!=="rtl"){const C=q.left-O.left,b=W.left-C,X=N.left-b,Z=N.width+X,he=Math.max(Z,O.width),ve=window.innerWidth-A,ge=Pe(b,[A,Math.max(A,ve-he)]);l.style.minWidth=Z+"px",l.style.left=ge+"px"}else{const C=O.right-q.right,b=window.innerWidth-W.right-C,X=window.innerWidth-N.right-b,Z=N.width+X,he=Math.max(Z,O.width),ve=window.innerWidth-A,ge=Pe(b,[A,Math.max(A,ve-he)]);l.style.minWidth=Z+"px",l.style.right=ge+"px"}const L=E(),B=window.innerHeight-A*2,z=d.scrollHeight,V=window.getComputedStyle(f),H=parseInt(V.borderTopWidth,10),R=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),F=parseInt(V.paddingBottom,10),K=H+R+z+F+D,pe=Math.min(h.offsetHeight*5,K),ae=window.getComputedStyle(d),fe=parseInt(ae.paddingTop,10),me=parseInt(ae.paddingBottom,10),ee=N.top+N.height/2-A,le=B-ee,re=h.offsetHeight/2,p=h.offsetTop+re,I=H+R+p,_=K-I;if(I<=ee){const C=L.length>0&&h===L[L.length-1].ref.current;l.style.bottom="0px";const b=f.clientHeight-d.offsetTop-d.offsetHeight,X=Math.max(le,re+(C?me:0)+b+D),Z=I+X;l.style.height=Z+"px"}else{const C=L.length>0&&h===L[0].ref.current;l.style.top="0px";const X=Math.max(ee,H+d.offsetTop+(C?fe:0)+re)+_;l.style.height=X+"px",d.scrollTop=I-ee+d.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=pe+"px",l.style.maxHeight=B+"px",c?.(),requestAnimationFrame(()=>T.current=!0)}},[E,u.trigger,u.valueNode,l,f,d,h,x,u.dir,c]);G(()=>v(),[v]);const[U,M]=n.useState();G(()=>{f&&M(window.getComputedStyle(f).zIndex)},[f]);const ne=n.useCallback(N=>{N&&y.current===!0&&(v(),m?.(),y.current=!1)},[v,m]);return r.jsx(kt,{scope:e,contentWrapper:l,shouldExpandOnScrollRef:T,onScrollButtonChange:ne,children:r.jsx("div",{ref:i,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:U},children:r.jsx(j.div,{...a,ref:w,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});Fe.displayName=Ot;var Dt="SelectPopperPosition",xe=n.forwardRef((t,o)=>{const{__scopeSelect:e,align:c="start",collisionPadding:a=A,...u}=t,s=ue(e);return r.jsx(ht,{...s,...u,ref:o,align:c,collisionPadding:a,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});xe.displayName=Dt;var[kt,Te]=oe(Q,{}),Se="SelectViewport",Ue=n.forwardRef((t,o)=>{const{__scopeSelect:e,nonce:c,...a}=t,u=Y(Se,e),s=Te(Se,e),l=k(o,u.onViewportChange),i=n.useRef(0);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:c}),r.jsx(ie.Slot,{scope:e,children:r.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:P(a.onScroll,f=>{const g=f.currentTarget,{contentWrapper:w,shouldExpandOnScrollRef:E}=s;if(E?.current&&w){const T=Math.abs(i.current-g.scrollTop);if(T>0){const y=window.innerHeight-A*2,d=parseFloat(w.style.minHeight),h=parseFloat(w.style.height),x=Math.max(d,h);if(x<y){const m=x+T,v=Math.min(y,m),U=m-v;w.style.height=v+"px",w.style.bottom==="0px"&&(g.scrollTop=U>0?U:0,w.style.justifyContent="flex-end")}}}i.current=g.scrollTop})})})]})});Ue.displayName=Se;var We="SelectGroup",[Lt,Bt]=oe(We),Vt=n.forwardRef((t,o)=>{const{__scopeSelect:e,...c}=t,a=Ie();return r.jsx(Lt,{scope:e,id:a,children:r.jsx(j.div,{role:"group","aria-labelledby":a,...c,ref:o})})});Vt.displayName=We;var ze="SelectLabel",Ht=n.forwardRef((t,o)=>{const{__scopeSelect:e,...c}=t,a=Bt(ze,e);return r.jsx(j.div,{id:a.id,...c,ref:o})});Ht.displayName=ze;var ce="SelectItem",[Ft,Ke]=oe(ce),Ge=n.forwardRef((t,o)=>{const{__scopeSelect:e,value:c,disabled:a=!1,textValue:u,...s}=t,l=$(ce,e),i=Y(ce,e),f=l.value===c,[g,w]=n.useState(u??""),[E,T]=n.useState(!1),y=k(o,m=>i.itemRefCallback?.(m,c,a)),d=Ie(),h=n.useRef("touch"),x=()=>{a||(l.onValueChange(c),l.onOpenChange(!1))};if(c==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return r.jsx(Ft,{scope:e,value:c,disabled:a,textId:d,isSelected:f,onItemTextChange:n.useCallback(m=>{w(v=>v||(m?.textContent??"").trim())},[]),children:r.jsx(ie.ItemSlot,{scope:e,value:c,disabled:a,textValue:g,children:r.jsx(j.div,{role:"option","aria-labelledby":d,"data-highlighted":E?"":void 0,"aria-selected":f&&E,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:y,onFocus:P(s.onFocus,()=>T(!0)),onBlur:P(s.onBlur,()=>T(!1)),onClick:P(s.onClick,()=>{h.current!=="mouse"&&x()}),onPointerUp:P(s.onPointerUp,()=>{h.current==="mouse"&&x()}),onPointerDown:P(s.onPointerDown,m=>{h.current=m.pointerType}),onPointerMove:P(s.onPointerMove,m=>{h.current=m.pointerType,a?i.onItemLeave?.():h.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:P(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&i.onItemLeave?.()}),onKeyDown:P(s.onKeyDown,m=>{i.searchRef?.current!==""&&m.key===" "||(bt.includes(m.key)&&x(),m.key===" "&&m.preventDefault())})})})})});Ge.displayName=ce;var se="SelectItemText",$e=n.forwardRef((t,o)=>{const{__scopeSelect:e,className:c,style:a,...u}=t,s=$(se,e),l=Y(se,e),i=Ke(se,e),f=Rt(se,e),[g,w]=n.useState(null),E=k(o,x=>w(x),i.onItemTextChange,x=>l.itemTextRefCallback?.(x,i.value,i.disabled)),T=g?.textContent,y=n.useMemo(()=>r.jsx("option",{value:i.value,disabled:i.disabled,children:T},i.value),[i.disabled,i.value,T]),{onNativeOptionAdd:d,onNativeOptionRemove:h}=f;return G(()=>(d(y),()=>h(y)),[d,h,y]),r.jsxs(r.Fragment,{children:[r.jsx(j.span,{id:i.textId,...u,ref:E}),i.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ee.createPortal(u.children,s.valueNode):null]})});$e.displayName=se;var Ye="SelectItemIndicator",qe=n.forwardRef((t,o)=>{const{__scopeSelect:e,...c}=t;return Ke(Ye,e).isSelected?r.jsx(j.span,{"aria-hidden":!0,...c,ref:o}):null});qe.displayName=Ye;var we="SelectScrollUpButton",Xe=n.forwardRef((t,o)=>{const e=Y(we,t.__scopeSelect),c=Te(we,t.__scopeSelect),[a,u]=n.useState(!1),s=k(o,c.onScrollButtonChange);return G(()=>{if(e.viewport&&e.isPositioned){let l=function(){const f=i.scrollTop>0;u(f)};const i=e.viewport;return l(),i.addEventListener("scroll",l),()=>i.removeEventListener("scroll",l)}},[e.viewport,e.isPositioned]),a?r.jsx(Je,{...t,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:i}=e;l&&i&&(l.scrollTop=l.scrollTop-i.offsetHeight)}}):null});Xe.displayName=we;var Ce="SelectScrollDownButton",Ze=n.forwardRef((t,o)=>{const e=Y(Ce,t.__scopeSelect),c=Te(Ce,t.__scopeSelect),[a,u]=n.useState(!1),s=k(o,c.onScrollButtonChange);return G(()=>{if(e.viewport&&e.isPositioned){let l=function(){const f=i.scrollHeight-i.clientHeight,g=Math.ceil(i.scrollTop)<f;u(g)};const i=e.viewport;return l(),i.addEventListener("scroll",l),()=>i.removeEventListener("scroll",l)}},[e.viewport,e.isPositioned]),a?r.jsx(Je,{...t,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:i}=e;l&&i&&(l.scrollTop=l.scrollTop+i.offsetHeight)}}):null});Ze.displayName=Ce;var Je=n.forwardRef((t,o)=>{const{__scopeSelect:e,onAutoScroll:c,...a}=t,u=Y("SelectScrollButton",e),s=n.useRef(null),l=de(e),i=n.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return n.useEffect(()=>()=>i(),[i]),G(()=>{l().find(g=>g.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),r.jsx(j.div,{"aria-hidden":!0,...a,ref:o,style:{flexShrink:0,...a.style},onPointerDown:P(a.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(c,50))}),onPointerMove:P(a.onPointerMove,()=>{u.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(c,50))}),onPointerLeave:P(a.onPointerLeave,()=>{i()})})}),Ut="SelectSeparator",Wt=n.forwardRef((t,o)=>{const{__scopeSelect:e,...c}=t;return r.jsx(j.div,{"aria-hidden":!0,...c,ref:o})});Wt.displayName=Ut;var ye="SelectArrow",zt=n.forwardRef((t,o)=>{const{__scopeSelect:e,...c}=t,a=ue(e),u=$(ye,e),s=Y(ye,e);return u.open&&s.position==="popper"?r.jsx(vt,{...a,...c,ref:o}):null});zt.displayName=ye;var Kt="SelectBubbleInput",Qe=n.forwardRef(({__scopeSelect:t,value:o,...e},c)=>{const a=n.useRef(null),u=k(c,a),s=It(o);return n.useEffect(()=>{const l=a.current;if(!l)return;const i=window.HTMLSelectElement.prototype,g=Object.getOwnPropertyDescriptor(i,"value").set;if(s!==o&&g){const w=new Event("change",{bubbles:!0});g.call(l,o),l.dispatchEvent(w)}},[s,o]),r.jsx(j.select,{...e,style:{...at,...e.style},ref:u,defaultValue:o})});Qe.displayName=Kt;function et(t){return t===""||t===void 0}function tt(t){const o=lt(t),e=n.useRef(""),c=n.useRef(0),a=n.useCallback(s=>{const l=e.current+s;o(l),(function i(f){e.current=f,window.clearTimeout(c.current),f!==""&&(c.current=window.setTimeout(()=>i(""),1e3))})(l)},[o]),u=n.useCallback(()=>{e.current="",window.clearTimeout(c.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(c.current),[]),[e,a,u]}function ot(t,o,e){const a=o.length>1&&Array.from(o).every(f=>f===o[0])?o[0]:o,u=e?t.indexOf(e):-1;let s=Gt(t,Math.max(u,0));a.length===1&&(s=s.filter(f=>f!==e));const i=s.find(f=>f.textValue.toLowerCase().startsWith(a.toLowerCase()));return i!==e?i:void 0}function Gt(t,o){return t.map((e,c)=>t[(o+c)%t.length])}var $t=je,Yt=Ae,qt=De,Xt=ke,Zt=Le,Jt=Be,Qt=Ue,eo=Ge,to=$e,oo=qe,no=Xe,ro=Ze;function uo({...t}){return r.jsx($t,{"data-slot":"select",...t})}function po({...t}){return r.jsx(qt,{"data-slot":"select-value",...t})}function fo({className:t,size:o="default",children:e,...c}){return r.jsxs(Yt,{"data-slot":"select-trigger","data-size":o,className:te("flex w-fit items-center justify-between gap-1.5 whitespace-nowrap rounded-4xl border border-input bg-input/30 px-3 py-2 text-sm outline-none transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 data-[size=default]:h-9 data-[size=sm]:h-8 data-placeholder:text-muted-foreground *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:hover:bg-input/50 [&_svg]:shrink-0",t),...c,children:[e,r.jsx(Xt,{asChild:!0,children:r.jsx(_e,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function mo({className:t,children:o,position:e="item-aligned",align:c="center",...a}){return r.jsx(Zt,{children:r.jsxs(Jt,{"data-slot":"select-content",className:te("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-2xl bg-popover text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 data-closed:animate-out data-open:animate-in",e==="popper"&&"data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",t),position:e,align:c,...a,children:[r.jsx(so,{}),r.jsx(Qt,{"data-position":e,className:te("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",e==="popper"&&""),children:o}),r.jsx(ao,{})]})})}function ho({className:t,children:o,...e}){return r.jsxs(eo,{"data-slot":"select-item",className:te("flex w-full select-none items-center gap-2.5 ps-3 p-2 text-sm outline-hidden focus:bg-accent data-[state=checked]:bg-accent data-[state=checked]:text-accent-foreground data-disabled:opacity-50 [&_svg]:shrink-0 *:[span]:flex *:[span]:items-center *:[span]:gap-2 *:[span]:flex-1",t),...e,children:[r.jsx(to,{children:o}),r.jsx(oo,{asChild:!0,children:r.jsx(St,{className:"size-4"})})]})}function so({className:t,...o}){return r.jsx(no,{"data-slot":"select-scroll-up-button",className:te("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),...o,children:r.jsx(yt,{})})}function ao({className:t,...o}){return r.jsx(ro,{"data-slot":"select-scroll-down-button",className:te("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),...o,children:r.jsx(_e,{})})}export{_e as C,uo as S,fo as a,po as b,mo as c,ho as d,It as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as e}from"./react-CzFdRS7Y.js";import{P as d}from"./index-CfCSvolS.js";import{d as m}from"./index-DrT4Adhh.js";var v="Separator",n="horizontal",f=["horizontal","vertical"],s=c.forwardRef((r,o)=>{const{decorative:t,orientation:a=n,...l}=r,i=u(a)?a:n,p=t?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return e.jsx(d.div,{"data-orientation":i,...p,...l,ref:o})});s.displayName=v;function u(r){return f.includes(r)}var x=s;function z({className:r,orientation:o="horizontal",decorative:t=!0,...a}){return e.jsx(x,{"data-slot":"separator",decorative:t,orientation:o,className:m("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",r),...a})}export{z as S};
|