PageSourceSearch

https://extra.email/assets/router-xHpJ7bfC.js

js extra.email collected 2026-10-02 14:36:32 UTC 85,332 bytes, 25 lines download raw bytes

1import{r as dt,g as Zt,a as Cn}from"./react-uS-d4TUT.js";function Mn(e,n){for(var t=0;t<n.length;t++){const s=n[t];if(typeof s!="string"&&!Array.isArray(s)){for(const r in s)if(r!=="default"&&!(r in e)){const o=Object.getOwnPropertyDescriptor(s,r);o&&Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>s[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var C=dt();const ue=Zt(C),vr=Mn({__proto__:null,default:ue},[C]);var Ye={exports:{}},ge={};/**
2 * @license React
3 * react-jsx-runtime.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var Tt;function kn(){if(Tt)return ge;Tt=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(s,r,o){var i=null;if(o!==void 0&&(i=""+o),r.key!==void 0&&(i=""+r.key),"key"in r){o={};for(var a in r)a!=="key"&&(o[a]=r[a])}else o=r;return r=o.ref,{$$typeof:e,type:s,key:i,ref:r!==void 0?r:null,props:o}}return ge.Fragment=n,ge.jsx=t,ge.jsxs=t,ge}var It;function Tn(){return It||(It=1,Ye.exports=kn()),Ye.exports}var w=Tn();const ut=new WeakMap,In=new WeakMap,Ae={current:[]};let Xe=!1,xe=0;const Re=new Set,ke=new Map;function Qt(e){for(const n of e){if(Ae.current.includes(n))continue;Ae.current.push(n),n.recompute();const t=In.get(n);if(t)for(const s of t){const r=ut.get(s);r!=null&&r.length&&Qt(r)}}}function En(e){const n={prevVal:e.prevState,currentVal:e.state};for(const t of e.listeners)t(n)}function Bn(e){const n={prevVal:e.prevState,currentVal:e.state};for(const t of e.listeners)t(n)}function en(e){if(xe>0&&!ke.has(e)&&ke.set(e,e.prevState),Re.add(e),!(xe>0)&&!Xe)try{for(Xe=!0;Re.size>0;){const n=Array.from(Re);Re.clear();for(const t of n){const s=ke.get(t)??t.prevState;t.prevState=s,En(t)}for(const t of n){const s=ut.get(t);s&&(Ae.current.push(t),Qt(s))}for(const t of n){const s=ut.get(t);if(s)for(const r of s)Bn(r)}}}finally{Xe=!1,Ae.current=[],ke.clear()}}function we(e){xe++;try{e()}finally{if(xe--,xe===0){const n=Re.values().next().value;n&&en(n)}}}function An(e){return typeof e=="function"}class Fn{constructor(n,t){this.listeners=new Set,this.subscribe=s=>{var r,o;this.listeners.add(s);const i=(o=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:o.call(r,s,this);return()=>{this.listeners.delete(s),i==null||i()}},this.prevState=n,this.state=n,this.options=t}setState(n){var t,s,r;this.prevState=this.state,(t=this.options)!=null&&t.updateFn?this.state=this.options.updateFn(this.prevState)(n):An(n)?this.state=n(this.prevState):this.state=n,(r=(s=this.options)==null?void 0:s.onUpdate)==null||r.call(s),en(this)}}const X="__TSR_index",Et="popstate",Bt="beforeunload";function jn(e){let n=e.getLocation();const t=new Set,s=i=>{n=e.getLocation(),t.forEach(a=>a({location:n,action:i}))},r=i=>{e.notifyOnIndexChange??!0?s(i):n=e.getLocation()},o=async({task:i,navigateOpts:a,...l})=>{var f,h;if((a==null?void 0:a.ignoreBlocker)??!1){i();return}const d=((f=e.getBlockers)==null?void 0:f.call(e))??[],c=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&d.length&&c)for(const m of d){const p=Fe(l.path,l.state);if(await m.blockerFn({currentLocation:n,nextLocation:p,action:l.type})){(h=e.onBlocked)==null||h.call(e);return}}i()};return{get location(){return n},get length(){return e.getLength()},subscribers:t,subscribe:i=>(t.add(i),()=>{t.delete(i)}),push:(i,a,l)=>{const u=n.state[X];a=At(u+1,a),o({task:()=>{e.pushState(i,a),s({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:i,state:a})},replace:(i,a,l)=>{const u=n.state[X];a=At(u,a),o({task:()=>{e.replaceState(i,a),s({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:i,state:a})},go:(i,a)=>{o({task:()=>{e.go(i),r({type:"GO",index:i})},navigateOpts:a,type:"GO"})},back:i=>{o({task:()=>{e.back((i==null?void 0:i.ignoreBlocker)??!1),r({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{o({task:()=>{e.forward((i==null?void 0:i.ignoreBlocker)??!1),r({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>n.state[X]!==0,createHref:i=>e.createHref(i),block:i=>{var l;if(!e.setBlockers)return()=>{};const a=((l=e.getBlockers)==null?void 0:l.call(e))??[];return e.setBlockers([...a,i]),()=>{var d,c;const u=((d=e.getBlockers)==null?void 0:d.call(e))??[];(c=e.setBlockers)==null||c.call(e,u.filter(f=>f!==i))}},flush:()=>{var i;return(i=e.flush)==null?void 0:i.call(e)},destroy:()=>{var i;return(i=e.destroy)==null?void 0:i.call(e)},notify:s}}function At(e,n){n||(n={});const t=mt();return{...n,key:t,__TSR_key:t,[X]:e}}function Nn(e){var R,M;const n=typeof document<"u"?window:void 0,t=n.history.pushState,s=n.history.replaceState;let r=[];const o=()=>r,i=L=>r=L,a=(L=>L),l=(()=>Fe(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((R=n.history.state)!=null&&R.__TSR_key)&&!((M=n.history.state)!=null&&M.key)){const L=mt();n.history.replaceState({[X]:0,key:L,__TSR_key:L},"")}let u=l(),d,c=!1,f=!1,h=!1,m=!1;const p=()=>u;let g,v;const _=()=>{g&&(y._ignoreSubscribers=!0,(g.isPush?n.history.pushState:n.history.replaceState)(g.state,"",g.href),y._ignoreSubscribers=!1,g=void 0,v=void 0,d=void 0)},P=(L,b,k)=>{const A=a(b);v||(d=u),u=Fe(b,k),g={href:A,state:k,isPush:(g==null?void 0:g.isPush)||L==="push"},v||(v=Promise.resolve().then(()=>_()))},x=L=>
9{u=l(),y.notify({type:L})},T=async()=>{if(f){f=!1;return}const L=l(),b=L.state[X]-u.state[X],k=b===1,A=b===-1,V=!k&&!A||c;c=!1;const de=V?"GO":A?"BACK":"FORWARD",j=V?{type:"GO",index:b}:{type:A?"BACK":"FORWARD"};if(h)h=!1;else{const U=o();if(typeof document<"u"&&U.length){for(const H of U)if(await H.blockerFn({currentLocation:u,nextLocation:L,action:de})){f=!0,n.history.go(1),y.notify(j);return}}}u=l(),y.notify(j)},S=L=>{if(m){m=!1;return}let b=!1;const k=o();if(typeof document<"u"&&k.length)for(const A of k){const V=A.enableBeforeUnload??!0;if(V===!0){b=!0;break}if(typeof V=="function"&&V()===!0){b=!0;break}}if(b)return L.preventDefault(),L.returnValue=""},y=jn({getLocation:p,getLength:()=>n.history.length,pushState:(L,b)=>P("push",L,b),replaceState:(L,b)=>P("replace",L,b),back:L=>(L&&(h=!0),m=!0,n.history.back()),forward:L=>{L&&(h=!0),m=!0,n.history.forward()},go:L=>{c=!0,n.history.go(L)},createHref:L=>a(L),flush:_,destroy:()=>{n.history.pushState=t,n.history.replaceState=s,n.removeEventListener(Bt,S,{capture:!0}),n.removeEventListener(Et,T)},onBlocked:()=>{d&&u!==d&&(u=d)},getBlockers:o,setBlockers:i,notifyOnIndexChange:!1});return n.addEventListener(Bt,S,{capture:!0}),n.addEventListener(Et,T),n.history.pushState=function(...L){const b=t.apply(n.history,L);return y._ignoreSubscribers||x("PUSH"),b},n.history.replaceState=function(...L){const b=s.apply(n.history,L);return y._ignoreSubscribers||x("REPLACE"),b},y}function Fe(e,n){const t=e.indexOf("#"),s=e.indexOf("?"),r=mt();return{href:e,pathname:e.substring(0,t>0?s>0?Math.min(t,s):t:s>0?s:e.length),hash:t>-1?e.substring(t):"",search:s>-1?e.slice(s,t===-1?void 0:t):"",state:n||{[X]:0,key:r,__TSR_key:r}}}function mt(){return(Math.random()+1).toString(36).substring(7)}function je(e){return e[e.length-1]}function On(e){return typeof e=="function"}function J(e,n){return On(e)?e(n):e}const Dn=Object.prototype.hasOwnProperty;function D(e,n){if(e===n)return e;const t=n,s=Nt(e)&&Nt(t);if(!s&&!(Ne(e)&&Ne(t)))return t;const r=s?e:Ft(e);if(!r)return t;const o=s?t:Ft(t);if(!o)return t;const i=r.length,a=o.length,l=s?new Array(a):{};let u=0;for(let d=0;d<a;d++){const c=s?d:o[d],f=e[c],h=t[c];if(f===h){l[c]=f,(s?d<i:Dn.call(e,c))&&u++;continue}if(f===null||h===null||typeof f!="object"||typeof h!="object"){l[c]=h;continue}const m=D(f,h);l[c]=m,m===f&&u++}return i===a&&u===i?e:l}function Ft(e){const n=[],t=Object.getOwnPropertyNames(e);for(const r of t){if(!Object.prototype.propertyIsEnumerable.call(e,r))return!1;n.push(r)}const s=Object.getOwnPropertySymbols(e);for(const r of s){if(!Object.prototype.propertyIsEnumerable.call(e,r))return!1;n.push(r)}return n}function Ne(e){if(!jt(e))return!1;const n=e.constructor;if(typeof n>"u")return!0;const t=n.prototype;return!(!jt(t)||!t.hasOwnProperty("isPrototypeOf"))}function jt(e){return Object.prototype.toString.call(e)==="[object Object]"}function Nt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function te(e,n,t){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return!1;for(let s=0,r=e.length;s<r;s++)if(!te(e[s],n[s],t))return!1;return!0}if(Ne(e)&&Ne(n)){const s=(t==null?void 0:t.ignoreUndefined)??!0;if(t!=null&&t.partial){for(const i in n)if((!s||n[i]!==void 0)&&!te(e[i],n[i],t))return!1;return!0}let r=0;if(!s)r=Object.keys(e).length;else for(const i in e)e[i]!==void 0&&r++;let o=0;for(const i in n)if((!s||n[i]!==void 0)&&(o++,o>r||!te(e[i],n[i],t)))return!1;return r===o}return!1}function fe(e){let n,t;const s=new Promise((r,o)=>{n=r,t=o});return s.status="pending",s.resolve=r=>{s.status="resolved",s.value=r,n(r),e==null||e(r)},s.reject=r=>{s.status="rejected",t(r)},s}function Z(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Ot(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}}function Dt(e,n){if(!e)return e;const t=/%25|%5C/gi;let s=0,r="",o;for(;(o=t.exec(e))!==null;)r+=Ot(e.slice(s,o.index))+o[0],s=t.lastIndex;return r+Ot(s?e.slice(s):e)}var $n="Invariant failed";function q(e,n){if(!e)throw new Error($n)}function Oe(e){const n=new Map;let t,s;const r=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,s&&(s.next=o,o.prev=s)):(o.next.prev=void 0,t=o.next,o.next=void 0,s&&(o.prev=s,s.next=o)),s=o)};return{get(o){const i=n.get(o);if(i)return r(i),i.value},set(o,i){if(n.size>=e&&t){const l=t;n.delete(l.key),l.next&&(t=l.next,l.next.prev=void 0),l===s&&(s=void 0)}const a=n.get(o);if(a)a.value=i,r(a);else{const l={key:o,value:i,prev:s};s&&(s.next=l),s=l,t||(t=l),n.set(o,l)}},clear(){n.clear(),t=void 0,s=void 0}}}const he=0,re=1,oe=2,Le=3,ce=4,Un=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,Wn=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,Vn=/^([^{]*)\{\$\}([^}]*)$/;function pt(e,n,t=new Uint16Array(6)){const s=e.indexOf("/",n),r=s===-1?e.length:s,o=e.substring(n,r);if(!o||!o.includes("$"))return t[0]=he,t[1]=n,t[2]=n,t[3]=r,t[4]=r,t[5]=r,t;if(o==="$"){const u=e.length;return t[0]=oe,t[1]=n,t[2]=n,t[3]=u,t[4]=u,t[5]=u,t}
9if(o.charCodeAt(0)===36)return t[0]=re,t[1]=n,t[2]=n+1,t[3]=r,t[4]=r,t[5]=r,t;const i=o.match(Vn);if(i){const d=i[1].length;return t[0]=oe,t[1]=n+d,t[2]=n+d+1,t[3]=n+d+2,t[4]=n+d+3,t[5]=e.length,t}const a=o.match(Wn);if(a){const u=a[1],d=a[2],c=a[3],f=u.length;return t[0]=Le,t[1]=n+f,t[2]=n+f+3,t[3]=n+f+3+d.length,t[4]=r-c.length,t[5]=r,t}const l=o.match(Un);if(l){const u=l[1],d=l[2],c=l[3],f=u.length;return t[0]=re,t[1]=n+f,t[2]=n+f+2,t[3]=n+f+2+d.length,t[4]=r-c.length,t[5]=r,t}return t[0]=he,t[1]=n,t[2]=n,t[3]=r,t[4]=r,t[5]=r,t}function Ve(e,n,t,s,r,o,i){var l,u,d,c,f;i==null||i(t);let a=s;{const h=t.fullPath??t.from,m=h.length,p=((l=t.options)==null?void 0:l.caseSensitive)??e;for(;a<m;){const v=pt(h,a,n);let _;const P=a,x=v[5];switch(a=x+1,o++,v[0]){case he:{const S=h.substring(v[2],v[3]);if(p){const y=(u=r.static)==null?void 0:u.get(S);if(y)_=y;else{r.static??(r.static=new Map);const R=le(t.fullPath??t.from);R.parent=r,R.depth=o,_=R,r.static.set(S,R)}}else{const y=S.toLowerCase(),R=(d=r.staticInsensitive)==null?void 0:d.get(y);if(R)_=R;else{r.staticInsensitive??(r.staticInsensitive=new Map);const M=le(t.fullPath??t.from);M.parent=r,M.depth=o,_=M,r.staticInsensitive.set(y,M)}}break}case re:{const S=h.substring(P,v[1]),y=h.substring(v[4],x),R=p&&!!(S||y),M=S?R?S:S.toLowerCase():void 0,L=y?R?y:y.toLowerCase():void 0,b=(c=r.dynamic)==null?void 0:c.find(k=>k.caseSensitive===R&&k.prefix===M&&k.suffix===L);if(b)_=b;else{const k=Qe(re,t.fullPath??t.from,R,M,L);_=k,k.depth=o,k.parent=r,r.dynamic??(r.dynamic=[]),r.dynamic.push(k)}break}case Le:{const S=h.substring(P,v[1]),y=h.substring(v[4],x),R=p&&!!(S||y),M=S?R?S:S.toLowerCase():void 0,L=y?R?y:y.toLowerCase():void 0,b=(f=r.optional)==null?void 0:f.find(k=>k.caseSensitive===R&&k.prefix===M&&k.suffix===L);if(b)_=b;else{const k=Qe(Le,t.fullPath??t.from,R,M,L);_=k,k.parent=r,k.depth=o,r.optional??(r.optional=[]),r.optional.push(k)}break}case oe:{const S=h.substring(P,v[1]),y=h.substring(v[4],x),R=p&&!!(S||y),M=S?R?S:S.toLowerCase():void 0,L=y?R?y:y.toLowerCase():void 0,b=Qe(oe,t.fullPath??t.from,R,M,L);_=b,b.parent=r,b.depth=o,r.wildcard??(r.wildcard=[]),r.wildcard.push(b)}}r=_}const g=(t.path||!t.children)&&!t.isRoot;if(g&&h.endsWith("/")){const v=le(t.fullPath??t.from);v.kind=ce,v.parent=r,o++,v.depth=o,r.index=v,r=v}g&&!r.route&&(r.route=t,r.fullPath=t.fullPath??t.from)}if(t.children)for(const h of t.children)Ve(e,n,h,a,r,o,i)}function Ze(e,n){if(e.prefix&&n.prefix&&e.prefix!==n.prefix){if(e.prefix.startsWith(n.prefix))return-1;if(n.prefix.startsWith(e.prefix))return 1}if(e.suffix&&n.suffix&&e.suffix!==n.suffix){if(e.suffix.endsWith(n.suffix))return-1;if(n.suffix.endsWith(e.suffix))return 1}return e.prefix&&!n.prefix?-1:!e.prefix&&n.prefix?1:e.suffix&&!n.suffix?-1:!e.suffix&&n.suffix?1:e.caseSensitive&&!n.caseSensitive?-1:!e.caseSensitive&&n.caseSensitive?1:0}function ee(e){var n,t,s;if(e.static)for(const r of e.static.values())ee(r);if(e.staticInsensitive)for(const r of e.staticInsensitive.values())ee(r);if((n=e.dynamic)!=null&&n.length){e.dynamic.sort(Ze);for(const r of e.dynamic)ee(r)}if((t=e.optional)!=null&&t.length){e.optional.sort(Ze);for(const r of e.optional)ee(r)}if((s=e.wildcard)!=null&&s.length){e.wildcard.sort(Ze);for(const r of e.wildcard)ee(r)}}function le(e){return{kind:he,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null}}function Qe(e,n,t,s,r){return{kind:e,depth:0,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,caseSensitive:t,prefix:s,suffix:r}}function Hn(e,n){const t=le("/"),s=new Uint16Array(6);for(const r of e)Ve(!1,s,r,1,t,0);ee(t),n.masksTree=t,n.flatCache=Oe(1e3)}function zn(e,n){e||(e="/");const t=n.flatCache.get(e);if(t)return t;const s=gt(e,n.masksTree);return n.flatCache.set(e,s),s}function Kn(e,n,t,s,r){e||(e="/"),s||(s="/");const o=n?`case\0${e}`:e;let i=r.singleCache.get(o);if(!i){i=le("/");const a=new Uint16Array(6);Ve(n,a,{from:e},1,i,0),r.singleCache.set(o,i)}return gt(s,i,t)}function qn(e,n,t=!1){const s=t?e:`nofuzz\0${e}`,r=n.matchCache.get(s);if(r!==void 0)return r;e||(e="/");const o=gt(e,n.segmentTree,t);return o&&(o.branch=Xn(o.route)),n.matchCache.set(s,o),o}function Gn(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}
9function Jn(e,n=!1,t){const s=le(e.fullPath),r=new Uint16Array(6),o={},i={};let a=0;return Ve(n,r,e,1,s,0,u=>{if(t==null||t(u,a),q(!(u.id in o),`Duplicate routes found with id: ${String(u.id)}`),o[u.id]=u,a!==0&&u.path){const d=Gn(u.fullPath);(!i[d]||u.fullPath.endsWith("/"))&&(i[d]=u)}a++}),ee(s),{processedTree:{segmentTree:s,singleCache:Oe(1e3),matchCache:Oe(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:i}}function gt(e,n,t=!1){const s=e.split("/"),r=Qn(e,s,n,t);if(!r)return null;const o=Yn(e,s,r);return"**"in r&&(o["**"]=r["**"]),{route:r.node.route,params:o}}function Yn(e,n,t){var i,a,l,u,d,c;const s=Zn(t.node);let r=null;const o={};for(let f=0,h=0,m=0;h<s.length;f++,h++,m++){const p=s[h],g=n[f],v=m;if(g&&(m+=g.length),p.kind===re){r??(r=t.node.fullPath.split("/"));const _=r[h],P=((i=p.prefix)==null?void 0:i.length)??0;if(_.charCodeAt(P)===123){const T=((a=p.suffix)==null?void 0:a.length)??0,S=_.substring(P+2,_.length-T-1),y=g.substring(P,g.length-T);o[S]=decodeURIComponent(y)}else{const T=_.substring(1);o[T]=decodeURIComponent(g)}}else if(p.kind===Le){if(t.skipped&1<<h){f--;continue}r??(r=t.node.fullPath.split("/"));const _=r[h],P=((l=p.prefix)==null?void 0:l.length)??0,x=((u=p.suffix)==null?void 0:u.length)??0,T=_.substring(P+3,_.length-x-1),S=p.suffix||p.prefix?g.substring(P,g.length-x):g;S&&(o[T]=decodeURIComponent(S))}else if(p.kind===oe){const _=p,P=e.substring(v+(((d=_.prefix)==null?void 0:d.length)??0),e.length-(((c=_.suffix)==null?void 0:c.length)??0)),x=decodeURIComponent(P);o["*"]=x,o._splat=x;break}}return o}function Xn(e){const n=[e];for(;e.parentRoute;)e=e.parentRoute,n.push(e);return n.reverse(),n}function Zn(e){const n=Array(e.depth+1);do n[e.depth]=e,e=e.parent;while(e);return n}function Qn(e,n,t,s){if(e==="/"&&t.index)return{node:t.index,skipped:0};const r=!je(n),o=r&&e!=="/",i=n.length-(r?1:0),a=[{node:t,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let l=null,u=null,d=null;for(;a.length;){const c=a.pop();let{node:f,index:h,skipped:m,depth:p,statics:g,dynamics:v,optionals:_}=c;s&&f.route&&f.kind!==ce&&ye(u,c)&&(u=c);const P=h===i;if(P&&(f.route&&!o&&ye(d,c)&&(d=c),!f.optional&&!f.wildcard&&!f.index))continue;const x=P?void 0:n[h];let T;if(P&&f.index){const S={node:f.index,index:h,skipped:m,depth:p+1,statics:g,dynamics:v,optionals:_};if(g===i&&!v&&!_&&!m)return S;ye(d,S)&&(d=S)}if(f.wildcard&&ye(l,c))for(const S of f.wildcard){const{prefix:y,suffix:R}=S;if(!(y&&(P||!(S.caseSensitive?x:T??(T=x.toLowerCase())).startsWith(y)))){if(R){if(P)continue;const M=n.slice(h).join("/").slice(-R.length);if((S.caseSensitive?M:M.toLowerCase())!==R)continue}l={node:S,index:i,skipped:m,depth:p,statics:g,dynamics:v,optionals:_};break}}if(f.optional){const S=m|1<<p,y=p+1;for(let R=f.optional.length-1;R>=0;R--){const M=f.optional[R];a.push({node:M,index:h,skipped:S,depth:y,statics:g,dynamics:v,optionals:_})}if(!P)for(let R=f.optional.length-1;R>=0;R--){const M=f.optional[R],{prefix:L,suffix:b}=M;if(L||b){const k=M.caseSensitive?x:T??(T=x.toLowerCase());if(L&&!k.startsWith(L)||b&&!k.endsWith(b))continue}a.push({node:M,index:h+1,skipped:m,depth:y,statics:g,dynamics:v,optionals:_+1})}}if(!P&&f.dynamic&&x)for(let S=f.dynamic.length-1;S>=0;S--){const y=f.dynamic[S],{prefix:R,suffix:M}=y;if(R||M){const L=y.caseSensitive?x:T??(T=x.toLowerCase());if(R&&!L.startsWith(R)||M&&!L.endsWith(M))continue}a.push({node:y,index:h+1,skipped:m,depth:p+1,statics:g,dynamics:v+1,optionals:_})}if(!P&&f.staticInsensitive){const S=f.staticInsensitive.get(T??(T=x.toLowerCase()));S&&a.push({node:S,index:h+1,skipped:m,depth:p+1,statics:g+1,dynamics:v,optionals:_})}if(!P&&f.static){const S=f.static.get(x);S&&a.push({node:S,index:h+1,skipped:m,depth:p+1,statics:g+1,dynamics:v,optionals:_})}}if(d&&l)return ye(l,d)?d:l;if(d)return d;if(l)return l;if(s&&u){let c=u.index;for(let h=0;h<u.index;h++)c+=n[h].length;const f=c===e.length?"/":e.slice(c);return{node:u.node,skipped:u.skipped,"**":decodeURIComponent(f)}}return null}function ye(e,n){return e?n.statics>e.statics||n.statics===e.statics&&(n.dynamics>e.dynamics||n.dynamics===e.dynamics&&(n.optionals>e.optionals||n.optionals===e.optionals&&((n.node.kind===ce)>(e.node.kind===ce)||n.node.kind===ce==(e.node.kind===ce)&&n.depth>
9e.depth))):!0}function Ee(e){return yt(e.filter(n=>n!==void 0).join("/"))}function yt(e){return e.replace(/\/{2,}/g,"/")}function tn(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ne(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function nn(e){return ne(tn(e))}function De(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function es(e,n,t){return De(e,t)===De(n,t)}function ts({base:e,to:n,trailingSlash:t="never",cache:s}){const r=n.startsWith("/"),o=!r&&n===".";let i;if(s){i=r?n:o?e:e+"\0"+n;const c=s.get(i);if(c)return c}let a;if(o)a=e.split("/");else if(r)a=n.split("/");else{for(a=e.split("/");a.length>1&&je(a)==="";)a.pop();const c=n.split("/");for(let f=0,h=c.length;f<h;f++){const m=c[f];m===""?f?f===h-1&&a.push(m):a=[m]:m===".."?a.pop():m==="."||a.push(m)}}a.length>1&&(je(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));let l,u="";for(let c=0;c<a.length;c++){c>0&&(u+="/");const f=a[c];if(!f)continue;l=pt(f,0,l);const h=l[0];if(h===he){u+=f;continue}const m=l[5],p=f.substring(0,l[1]),g=f.substring(l[4],m),v=f.substring(l[2],l[3]);h===re?u+=p||g?`${p}{$${v}}${g}`:`$${v}`:h===oe?u+=p||g?`${p}{$}${g}`:"$":u+=`${p}{-$${v}}${g}`}u=yt(u);const d=u||"/";return i&&s&&s.set(i,d),d}function et(e,n,t){const s=n[e];return typeof s!="string"?s:e==="_splat"?encodeURI(s):ns(s,t)}function tt({path:e,params:n,decodeCharMap:t}){let s=!1;const r={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:r,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:r,isMissingParams:s};const o=e.length;let i=0,a,l="";for(;i<o;){const d=i;a=pt(e,d,a);const c=a[5];if(i=c+1,d===c)continue;const f=a[0];if(f===he){l+="/"+e.substring(d,c);continue}if(f===oe){const h=n._splat;r._splat=h,r["*"]=h;const m=e.substring(d,a[1]),p=e.substring(a[4],c);if(!h){s=!0,(m||p)&&(l+="/"+m+p);continue}const g=et("_splat",n,t);l+="/"+m+g+p;continue}if(f===re){const h=e.substring(a[2],a[3]);!s&&!(h in n)&&(s=!0),r[h]=n[h];const m=e.substring(d,a[1]),p=e.substring(a[4],c),g=et(h,n,t)??"undefined";l+="/"+m+g+p;continue}if(f===Le){const h=e.substring(a[2],a[3]),m=n[h];if(m==null)continue;r[h]=m;const p=e.substring(d,a[1]),g=e.substring(a[4],c),v=et(h,n,t)??"";l+="/"+p+v+g;continue}}return e.endsWith("/")&&(l+="/"),{usedParams:r,interpolatedPath:l||"/",isMissingParams:s}}function ns(e,n){let t=encodeURIComponent(e);if(n)for(const[s,r]of n)t=t.replaceAll(s,r);return t}function O(e){return!!(e!=null&&e.isNotFound)}function ss(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const $e="tsr-scroll-restoration-v1_3",rs=(e,n)=>{let t;return(...s)=>{t||(t=setTimeout(()=>{e(...s),t=null},n))}};function os(){const e=ss();if(!e)return null;const n=e.getItem($e);let t=n?JSON.parse(n):{};return{state:t,set:s=>(t=J(s,t)||t,e.setItem($e,JSON.stringify(t)))}}const Te=os(),ft=e=>e.state.__TSR_key||e.href;function is(e){const n=[];let t;for(;t=e.parentNode;)n.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(t.children,e)+1})`),e=t;return`${n.reverse().join(" > ")}`.toLowerCase()}let Ue=!1;function sn({storageKey:e,key:n,behavior:t,shouldScrollRestoration:s,scrollToTopSelectors:r,location:o}){var u,d;let i;try{i=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(c){console.error(c);return}const a=n||((u=window.history.state)==null?void 0:u.__TSR_key),l=i[a];Ue=!0;e:{if(s&&l&&Object.keys(l).length>0){for(const h in l){const m=l[h];if(h==="window")window.scrollTo({top:m.scrollY,left:m.scrollX,behavior:t});else if(h){const p=document.querySelector(h);p&&(p.scrollLeft=m.scrollX,p.scrollTop=m.scrollY)}}break e}const c=(o??window.location).hash.split("#",2)[1];if(c){const h=((d=window.history.state)==null?void 0:d.__hashScrollIntoViewOptions)??!0;if(h){const m=document.getElementById(c);m&&m.scrollIntoView(h)}break e}const f={top:0,left:0,behavior:t};if(window.scrollTo(f),r)for(const h of r){if(h==="window")continue;const m=typeof h=="function"?h():document.querySelector(h);m&&m.scrollTo(f)}}Ue=!1}function as(e,n){if(!Te&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Te))return;e.isScrollRestorationSetup=!0,Ue=!1;const s=e.options.getScrollRestorationKey||ft;window.history.scrollRestoration="manual";const r=o=>{if(Ue||!e.isScrollRestoring)return;let i="";if(o.target===document||o.target===window)i="window";else{const l=o.target.getAttribute("data-scroll-restoration-id");l?i=`[data-scroll-restoration-id="${l}"]`:i=is(o.target)}const a=s(e.state.location);Te.set(l=>{const u=l[a]||(l[a]={}),d=u[i]||(u[i]={});if(i==="window")d.scrollX=window.scrollX||0,d.scrollY=window.scrollY||0;else if(i){const c=document.querySelector(i);c&&(d.scrollX=c.scrollLeft||0,d.scrollY=c.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",rs(r,100),!0),e.subscribe("onRendered",o=>{const i=s(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}
9typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(sn({storageKey:$e,key:i,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Te.set(a=>(a[i]||(a[i]={}),a)))})}function cs(e){if(typeof document<"u"&&document.querySelector){const n=e.state.location.state.__hashScrollIntoViewOptions??!0;if(n&&e.state.location.hash!==""){const t=document.getElementById(e.state.location.hash);t&&t.scrollIntoView(n)}}}function ls(e,n=String){const t=new URLSearchParams;for(const s in e){const r=e[s];r!==void 0&&t.set(s,n(r))}return t.toString()}function nt(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function us(e){const n=new URLSearchParams(e),t={};for(const[s,r]of n.entries()){const o=t[s];o==null?t[s]=nt(r):Array.isArray(o)?o.push(nt(r)):t[s]=[o,nt(r)]}return t}const fs=ds(JSON.parse),hs=ms(JSON.stringify,JSON.parse);function ds(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=us(n);for(const s in t){const r=t[s];if(typeof r=="string")try{t[s]=e(r)}catch{}}return t}}function ms(e,n){const t=typeof n=="function";function s(r){if(typeof r=="object"&&r!==null)try{return e(r)}catch{}else if(t&&typeof r=="string")try{return n(r),e(r)}catch{}return r}return r=>{const o=ls(r,s);return o?`?${o}`:""}}const N="__root__";function ps(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const n=new Headers(e.headers);e.href&&n.get("Location")===null&&n.set("Location",e.href);const t=new Response(null,{status:e.statusCode,headers:n});if(t.options=e,e.throw)throw t;return t}function $(e){return e instanceof Response&&!!e.options}const Be=e=>{var n;if(!e.rendered)return e.rendered=!0,(n=e.onReady)==null?void 0:n.call(e)},He=(e,n)=>!!(e.preload&&!e.router.state.matches.some(t=>t.id===n)),St=(e,n,t=!0)=>{const s={...e.router.options.context??{}},r=t?n:n-1;for(let o=0;o<=r;o++){const i=e.matches[o];if(!i)continue;const a=e.router.getMatch(i.id);a&&Object.assign(s,a.__routeContext,a.__beforeLoadContext)}return s},rn=(e,n)=>{var r;const t=e.router.routesById[n.routeId??""]??e.router.routeTree;!t.options.notFoundComponent&&((r=e.router.options)!=null&&r.defaultNotFoundComponent)&&(t.options.notFoundComponent=e.router.options.defaultNotFoundComponent),q(t.options.notFoundComponent);const s=e.matches.find(o=>o.routeId===t.id);q(s,"Could not find match for route: "+t.id),e.updateMatch(s.id,o=>({...o,status:"notFound",error:n,isFetching:!1})),n.routerCode==="BEFORE_LOAD"&&t.parentRoute&&(n.routeId=t.parentRoute.id,rn(e,n))},Y=(e,n,t)=>{var s,r,o;
9if(!(!$(t)&&!O(t))){if($(t)&&t.redirectHandled&&!t.options.reloadDocument)throw t;if(n){(s=n._nonReactive.beforeLoadPromise)==null||s.resolve(),(r=n._nonReactive.loaderPromise)==null||r.resolve(),n._nonReactive.beforeLoadPromise=void 0,n._nonReactive.loaderPromise=void 0;const i=$(t)?"redirected":"notFound";n._nonReactive.error=t,e.updateMatch(n.id,a=>({...a,status:i,isFetching:!1,error:t})),O(t)&&!t.routeId&&(t.routeId=n.routeId),(o=n._nonReactive.loadPromise)==null||o.resolve()}throw $(t)?(e.rendered=!0,t.options._fromLocation=e.location,t.redirectHandled=!0,t=e.router.resolveRedirect(t),t):(rn(e,t),t)}},on=(e,n)=>{const t=e.router.getMatch(n);return!!(!e.router.isServer&&t._nonReactive.dehydrated||e.router.isServer&&t.ssr===!1)},Se=(e,n,t,s)=>{var a,l;const{id:r,routeId:o}=e.matches[n],i=e.router.looseRoutesById[o];if(t instanceof Promise)throw t;t.routerCode=s,e.firstBadMatchIndex??(e.firstBadMatchIndex=n),Y(e,e.router.getMatch(r),t);try{(l=(a=i.options).onError)==null||l.call(a,t)}catch(u){t=u,Y(e,e.router.getMatch(r),t)}e.updateMatch(r,u=>{var d,c;return(d=u._nonReactive.beforeLoadPromise)==null||d.resolve(),u._nonReactive.beforeLoadPromise=void 0,(c=u._nonReactive.loadPromise)==null||c.resolve(),{...u,error:t,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}})},gs=(e,n,t,s)=>{var h;const r=e.router.getMatch(n),o=(h=e.matches[t-1])==null?void 0:h.id,i=o?e.router.getMatch(o):void 0;if(e.router.isShell()){r.ssr=s.id===N;return}if((i==null?void 0:i.ssr)===!1){r.ssr=!1;return}const a=m=>m===!0&&(i==null?void 0:i.ssr)==="data-only"?"data-only":m,l=e.router.options.defaultSsr??!0;if(s.options.ssr===void 0){r.ssr=a(l);return}if(typeof s.options.ssr!="function"){r.ssr=a(s.options.ssr);return}const{search:u,params:d}=r,c={search:Ie(u,r.searchError),params:Ie(d,r.paramsError),location:e.location,matches:e.matches.map(m=>({index:m.index,pathname:m.pathname,fullPath:m.fullPath,staticData:m.staticData,id:m.id,routeId:m.routeId,search:Ie(m.search,m.searchError),params:Ie(m.params,m.paramsError),ssr:m.ssr}))},f=s.options.ssr(c);if(Z(f))return f.then(m=>{r.ssr=a(m??l)});r.ssr=a(f??l)},an=(e,n,t,s)=>{var i;if(s._nonReactive.pendingTimeout!==void 0)return;const r=t.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!He(e,n)&&(t.options.loader||t.options.beforeLoad||un(t))&&typeof r=="number"&&r!==1/0&&(t.options.pendingComponent??((i=e.router.options)==null?void 0:i.defaultPendingComponent)))){const a=setTimeout(()=>{Be(e)},r);s._nonReactive.pendingTimeout=a}},ys=(e,n,t)=>{const s=e.router.getMatch(n);if(!s._nonReactive.beforeLoadPromise&&!s._nonReactive.loaderPromise)return;an(e,n,t,s);const r=()=>{const o=e.router.getMatch(n);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Y(e,o,o.error)};return s._nonReactive.beforeLoadPromise?s._nonReactive.beforeLoadPromise.then(r):r()},Ss=(e,n,t,s)=>{var S;const r=e.router.getMatch(n),o=r._nonReactive.loadPromise;r._nonReactive.loadPromise=fe(()=>{o==null||o.resolve()});const{paramsError:i,searchError:a}=r;i&&Se(e,t,i,"PARSE_PARAMS"),a&&Se(e,t,a,"VALIDATE_SEARCH"),an(e,n,s,r);const l=new AbortController,u=(S=e.matches[t-1])==null?void 0:S.id,d=u?e.router.getMatch(u):void 0;(d==null?void 0:d.context)??e.router.options.context;let c=!1;const f=()=>{c||(c=!0,e.updateMatch(n,y=>({...y,isFetching:"beforeLoad",fetchCount:y.fetchCount+1,abortController:l})))},h=()=>{var y;(y=r._nonReactive.beforeLoadPromise)==null||y.resolve(),r._nonReactive.beforeLoadPromise=void 0,e.updateMatch(n,R=>({...R,isFetching:!1}))};if(!s.options.beforeLoad){we(()=>{f(),h()});return}r._nonReactive.beforeLoadPromise=fe();const m={...St(e,t,!1),...r.__routeContext},{search:p,params:g,cause:v}=r,_=He(e,n),P={search:p,abortController:l,params:g,preload:_,context:m,location:e.location,navigate:y=>e.router.navigate({...y,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:_?"preload":v,matches:e.matches,...e.router.options.additionalContext},x=y=>{if(y===void 0){we(()=>{f(),h()});return}($(y)||O(y))&&(f(),Se(e,t,y,"BEFORE_LOAD")),we(()=>{f(),e.updateMatch(n,R=>({...R,__beforeLoadContext:y})),h()})};let T;
9try{if(T=s.options.beforeLoad(P),Z(T))return f(),T.catch(y=>{Se(e,t,y,"BEFORE_LOAD")}).then(x)}catch(y){f(),Se(e,t,y,"BEFORE_LOAD")}x(T)},vs=(e,n)=>{const{id:t,routeId:s}=e.matches[n],r=e.router.looseRoutesById[s],o=()=>{if(e.router.isServer){const l=gs(e,t,n,r);if(Z(l))return l.then(a)}return a()},i=()=>Ss(e,t,n,r),a=()=>{if(on(e,t))return;const l=ys(e,t,r);return Z(l)?l.then(i):i()};return o()},_s=(e,n,t)=>{var o,i,a,l,u,d;const s=e.router.getMatch(n);if(!s||!t.options.head&&!t.options.scripts&&!t.options.headers)return;const r={matches:e.matches,match:s,params:s.params,loaderData:s.loaderData};return Promise.all([(i=(o=t.options).head)==null?void 0:i.call(o,r),(l=(a=t.options).scripts)==null?void 0:l.call(a,r),(d=(u=t.options).headers)==null?void 0:d.call(u,r)]).then(([c,f,h])=>{const m=c==null?void 0:c.meta,p=c==null?void 0:c.links,g=c==null?void 0:c.scripts,v=c==null?void 0:c.styles;return{meta:m,links:p,headScripts:g,headers:h,scripts:f,styles:v}})},cn=(e,n,t,s)=>{const r=e.matchPromises[t-1],{params:o,loaderDeps:i,abortController:a,cause:l}=e.router.getMatch(n),u=St(e,t),d=He(e,n);return{params:o,deps:i,preload:!!d,parentMatchPromise:r,abortController:a,context:u,location:e.location,navigate:c=>e.router.navigate({...c,_fromLocation:e.location}),cause:d?"preload":l,route:s,...e.router.options.additionalContext}},$t=async(e,n,t,s)=>{var r,o,i,a,l,u;try{const d=e.router.getMatch(n);try{(!e.router.isServer||d.ssr===!0)&&ln(s);const c=(o=(r=s.options).loader)==null?void 0:o.call(r,cn(e,n,t,s)),f=s.options.loader&&Z(c);if(!!(f||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||d._nonReactive.minPendingPromise)&&e.updateMatch(n,p=>({...p,isFetching:"loader"})),s.options.loader){const p=f?await c:c;Y(e,e.router.getMatch(n),p),p!==void 0&&e.updateMatch(n,g=>({...g,loaderData:p}))}s._lazyPromise&&await s._lazyPromise;const m=d._nonReactive.minPendingPromise;m&&await m,s._componentsPromise&&await s._componentsPromise,e.updateMatch(n,p=>({...p,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(c){let f=c;const h=d._nonReactive.minPendingPromise;h&&await h,O(c)&&await((a=(i=s.options.notFoundComponent)==null?void 0:i.preload)==null?void 0:a.call(i)),Y(e,e.router.getMatch(n),c);try{(u=(l=s.options).onError)==null||u.call(l,c)}catch(m){f=m,Y(e,e.router.getMatch(n),m)}e.updateMatch(n,m=>({...m,error:f,status:"error",isFetching:!1}))}}catch(d){const c=e.router.getMatch(n);c&&(c._nonReactive.loaderPromise=void 0),Y(e,c,d)}},Rs=async(e,n)=>{var d,c;const{id:t,routeId:s}=e.matches[n];let r=!1,o=!1;const i=e.router.looseRoutesById[s],a=()=>{e.updateMatch(t,f=>({...f,context:St(e,n)}))};if(on(e,t)){if(e.router.isServer)return e.router.getMatch(t)}else{const f=e.router.getMatch(t);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const h=e.router.getMatch(t),m=h._nonReactive.error||h.error;m&&Y(e,h,m)}else{const h=Date.now()-f.updatedAt,m=He(e,t),p=m?i.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:i.options.staleTime??e.router.options.defaultStaleTime??0,g=i.options.shouldReload,v=typeof g=="function"?g(cn(e,t,n,i)):g,_=!!m&&!e.router.state.matches.some(S=>S.id===t),P=e.router.getMatch(t);P._nonReactive.loaderPromise=fe(),_!==P.preload&&e.updateMatch(t,S=>({...S,preload:_}));const{status:x,invalid:T}=P;r=x==="success"&&(T||(v??h>p)),m&&i.options.preload===!1||(r&&!e.sync?(o=!0,(async()=>{var S,y;try{await $t(e,t,n,i),a();const R=e.router.getMatch(t);(S=R._nonReactive.loaderPromise)==null||S.resolve(),(y=R._nonReactive.loadPromise)==null||y.resolve(),R._nonReactive.loaderPromise=void 0}catch(R){$(R)&&await e.router.navigate(R.options)}})()):(x!=="success"||r&&e.sync)&&await $t(e,t,n,i))}}const l=e.router.getMatch(t);o||((d=l._nonReactive.loaderPromise)==null||d.resolve(),(c=l._nonReactive.loadPromise)==null||c.resolve()),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,o||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0,o||a();const u=o?l.isFetching:!1;
9return u!==l.isFetching||l.invalid!==!1?(e.updateMatch(t,f=>({...f,isFetching:u,invalid:!1})),e.router.getMatch(t)):l};async function Ut(e){const n=Object.assign(e,{matchPromises:[]});!n.router.isServer&&n.router.state.matches.some(t=>t._forcePending)&&Be(n);try{for(let a=0;a<n.matches.length;a++){const l=vs(n,a);Z(l)&&await l}const t=n.firstBadMatchIndex??n.matches.length;for(let a=0;a<t;a++)n.matchPromises.push(Rs(n,a));const r=(await Promise.allSettled(n.matchPromises)).filter(a=>a.status==="rejected").map(a=>a.reason);let o;for(const a of r){if($(a))throw a;!o&&O(a)&&(o=a)}for(const a of n.matches){const{id:l,routeId:u}=a,d=n.router.looseRoutesById[u];try{const c=_s(n,l,d);if(c){const f=await c;n.updateMatch(l,h=>({...h,...f}))}}catch(c){console.error(`Error executing head for route ${u}:`,c)}}if(o)throw o;const i=Be(n);Z(i)&&await i}catch(t){if(O(t)&&!n.preload){const s=Be(n);throw Z(s)&&await s,t}if($(t))throw t}return n.matches}async function ln(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(n=>{const{id:t,...s}=n.options;Object.assign(e.options,s),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const n=()=>{var s;const t=[];for(const r of fn){const o=(s=e.options[r])==null?void 0:s.preload;o&&t.push(o())}if(t.length)return Promise.all(t).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(n):n()}return e._componentsPromise}function Ie(e,n){return n?{status:"error",error:n}:{status:"success",value:e}}function un(e){var n;for(const t of fn)if((n=e.options[t])!=null&&n.preload)return!0;return!1}const fn=["component","errorComponent","pendingComponent","notFoundComponent"];function Ps(e){return{input:({url:n})=>{for(const t of e)n=hn(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=dn(e[t],n);return n}}}function xs(e){const n=nn(e.basepath),t=`/${n}`,s=`${t}/`,r=e.caseSensitive?t:t.toLowerCase(),o=e.caseSensitive?s:s.toLowerCase();return{input:({url:i})=>{const a=e.caseSensitive?i.pathname:i.pathname.toLowerCase();return a===r?i.pathname="/":a.startsWith(o)&&(i.pathname=i.pathname.slice(t.length)),i},output:({url:i})=>(i.pathname=Ee(["/",n,i.pathname]),i)}}function hn(e,n){var s;const t=(s=e==null?void 0:e.input)==null?void 0:s.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function dn(e,n){var s;const t=(s=e==null?void 0:e.output)==null?void 0:s.call(e,{url:n});if(t){if(typeof t=="string")return new URL(t);if(t instanceof URL)return t}return n}function se(e){const n=e.resolvedLocation,t=e.location,s=(n==null?void 0:n.pathname)!==t.pathname,r=(n==null?void 0:n.href)!==t.href,o=(n==null?void 0:n.hash)!==t.hash;return{fromLocation:n,toLocation:t,pathChanged:s,hrefChanged:r,hashChanged:o}}class ws{constructor(n){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=t=>t(),this.update=t=>{var f;t.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const s=this.options,r=this.basepath??(s==null?void 0:s.basepath)??"/",o=this.basepath===void 0,i=s==null?void 0:s.rewrite;this.options={...s,...t},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(h=>[encodeURIComponent(h),h])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=Nn())),this.origin=this.options.origin,this.origin||(!this.isServer&&(window!=null&&window.origin)&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new Fn(bs(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(h=>!["redirected"].includes(h.status))}}}),as(this));let a=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(o||r!==l||i!==u){this.basepath=l;const h=[];nn(l)!==""&&h.push(xs({basepath:l})),u&&h.push(u),this.rewrite=h.length===0?void 0:h.length===1?h[0]:Ps(h),this.history&&this.updateLatestLocation(),a=!0}a&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof((f=window.CSS)==null?void 0:f.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:t,routesByPath:s,processedTree:r}=Jn(this.routeTree,this.options.caseSensitive,(i,a)=>{i.init({originalIndex:a})});this.options.routeMasks&&Hn(this.options.routeMasks,r),this.routesById=t,this.routesByPath=s,this.processedTree=r;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)},this.subscribe=(t,s)=>{const r={eventType:t,fn:s};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=t=>
9{this.subscribers.forEach(s=>{s.eventType===t.type&&s.fn(t)})},this.parseLocation=(t,s)=>{const r=({href:l,state:u})=>{const d=new URL(l,this.origin),c=hn(this.rewrite,d),f=this.options.parseSearch(c.search),h=this.options.stringifySearch(f);return c.search=h,{href:c.href.replace(c.origin,""),publicHref:l,url:c,pathname:Dt(c.pathname),searchStr:h,search:D(s==null?void 0:s.search,f),hash:c.hash.split("#").reverse()[0]??"",state:D(s==null?void 0:s.state,u)}},o=r(t),{__tempLocation:i,__tempKey:a}=o.state;if(i&&(!a||a===this.tempLocationKey)){const l=r(i);return l.state.key=o.state.key,l.state.__TSR_key=o.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:o}}return o},this.resolvePathCache=Oe(1e3),this.resolvePathWithBase=(t,s)=>ts({base:t,to:yt(s),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(t,s,r)=>typeof t=="string"?this.matchRoutesInternal({pathname:t,search:s},r):this.matchRoutesInternal(t,s),this.getMatchedRoutes=t=>Cs({pathname:t,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=t=>{const s=this.getMatch(t);s&&(s.abortController.abort(),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const t=this.state.matches.filter(o=>o.status==="pending"),s=this.state.matches.filter(o=>o.isFetching==="loader");new Set([...this.state.pendingMatches??[],...t,...s]).forEach(o=>{this.cancelMatch(o.id)})},this.buildLocation=t=>{const s=(o={})=>{var L,b;const i=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,a=this.matchRoutes(i,{_buildLocation:!0}),l=je(a);o.from;const u=o.unsafeRelative==="path"?i.pathname:o.from??l.fullPath,d=this.resolvePathWithBase(u,"."),c=l.search,f={...l.params},h=o.to?this.resolvePathWithBase(d,`${o.to}`):this.resolvePathWithBase(d,"."),m=o.params===!1||o.params===null?{}:(o.params??!0)===!0?f:Object.assign(f,J(o.params,f)),p=tt({path:h,params:m}).interpolatedPath,g=this.matchRoutes(p,void 0,{_buildLocation:!0}).map(k=>this.looseRoutesById[k.routeId]);if(Object.keys(m).length>0)for(const k of g){const A=((L=k.options.params)==null?void 0:L.stringify)??k.options.stringifyParams;A&&Object.assign(m,A(m))}const v=t.leaveParams?h:Dt(tt({path:h,params:m,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let _=c;if(t._includeValidateSearch&&((b=this.options.search)!=null&&b.strict)){const k={};g.forEach(A=>{if(A.options.validateSearch)try{Object.assign(k,ht(A.options.validateSearch,{...k,..._}))}catch{}}),_=k}_=Ms({search:_,dest:o,destRoutes:g,_includeValidateSearch:t._includeValidateSearch}),_=D(c,_);const P=this.options.stringifySearch(_),x=o.hash===!0?i.hash:o.hash?J(o.hash,i.hash):void 0,T=x?`#${x}`:"";let S=o.state===!0?i.state:o.state?J(o.state,i.state):{};S=D(i.state,S);const y=`${v}${P}${T}`,R=new URL(y,this.origin),M=dn(this.rewrite,R);return{publicHref:M.pathname+M.search+M.hash,href:y,url:M,pathname:v,search:_,searchStr:P,state:S,hash:x??"",unmaskOnReload:o.unmaskOnReload}},r=(o={},i)=>{const a=s(o);let l=i?s(i):void 0;if(!l){const u={};if(this.options.routeMasks){const d=zn(a.pathname,this.processedTree);if(d){Object.assign(u,d.params);const{from:c,params:f,...h}=d.route,m=f===!1||f===null?{}:(f??!0)===!0?u:Object.assign(u,J(f,u));i={from:t.from,...h,params:m},l=s(i)}}}return l&&(a.maskedLocation=l),a};return t.mask?r(t,{from:t.from,...t.mask}):r(t)},this.commitLocation=({viewTransition:t,ignoreBlocker:s,...r})=>{const o=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(d=>{r.state[d]=this.latestLocation.state[d]});const u=te(r.state,this.latestLocation.state);return l.forEach(d=>{delete r.state[d]}),u},i=ne(this.latestLocation.href)===ne(r.href),a=this.commitLocationPromise;if(this.commitLocationPromise=fe(()=>{a==null||a.resolve()}),i&&o())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,url:d,...c}=r;l&&(c={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...c,search:c.searchStr,state:{...c.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(c.unmaskOnReload??this.options.unmaskOnReload??!1)&&(c.state.__tempKey=this.tempLocationKey)),c.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=t,this.history[r.replace?"replace":"push"](c.publicHref,c.state,{ignoreBlocker:s})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:t,resetScroll:s,hashScrollIntoView:r,viewTransition:o,ignoreBlocker:i,href:a,...l}={})=>
9{if(a){const c=this.history.location.state.__TSR_index,f=Fe(a,{__TSR_index:t?c:c+1});l.to=f.pathname,l.search=this.options.parseSearch(f.search),l.hash=f.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const d=this.commitLocation({...u,viewTransition:o,replace:t,resetScroll:s,hashScrollIntoView:r,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),d},this.navigate=async({to:t,reloadDocument:s,href:r,publicHref:o,...i})=>{var l;let a=!1;if(r)try{new URL(`${r}`),a=!0}catch{}if(a&&!s&&(s=!0),s){if(!r||!o&&!a){const d=this.buildLocation({to:t,...i});r=r??d.url.href,o=o??d.url.href}const u=!a&&o?o:r;if(!i.ignoreBlocker){const d=this.history,c=((l=d.getBlockers)==null?void 0:l.call(d))??[];for(const f of c)if(f!=null&&f.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(u):window.location.href=u,Promise.resolve()}return this.buildAndCommitLocation({...i,href:r,to:t,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const s=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==s.publicHref||s.url.origin!==this.origin){const r=this.getParsedLocationHref(s);throw ps({href:r})}}const t=this.matchRoutes(this.latestLocation);this.__store.setState(s=>({...s,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:t,cachedMatches:s.cachedMatches.filter(r=>!t.some(o=>o.id===r.id))}))},this.load=async t=>{let s,r,o;for(o=new Promise(a=>{this.startTransition(async()=>{var l;try{this.beforeLoad();const u=this.latestLocation,d=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...se({resolvedLocation:d,location:u})}),this.emit({type:"onBeforeLoad",...se({resolvedLocation:d,location:u})}),await Ut({router:this,sync:t==null?void 0:t.sync,matches:this.state.pendingMatches,location:u,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let c=[],f=[],h=[];we(()=>{this.__store.setState(m=>{const p=m.matches,g=m.pendingMatches||m.matches;return c=p.filter(v=>!g.some(_=>_.id===v.id)),f=g.filter(v=>!p.some(_=>_.id===v.id)),h=g.filter(v=>p.some(_=>_.id===v.id)),{...m,isLoading:!1,loadedAt:Date.now(),matches:g,pendingMatches:void 0,cachedMatches:[...m.cachedMatches,...c.filter(v=>v.status!=="error"&&v.status!=="notFound")]}}),this.clearExpiredCache()}),[[c,"onLeave"],[f,"onEnter"],[h,"onStay"]].forEach(([m,p])=>{m.forEach(g=>{var v,_;(_=(v=this.looseRoutesById[g.routeId].options)[p])==null||_.call(v,g)})})})})}})}catch(u){$(u)?(s=u,this.isServer||this.navigate({...s.options,replace:!0,ignoreBlocker:!0})):O(u)&&(r=u),this.__store.setState(d=>({...d,statusCode:s?s.status:r?404:d.matches.some(c=>c.status==="error")?500:200,redirect:s}))}this.latestLoadPromise===o&&((l=this.commitLocationPromise)==null||l.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),a()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let i;this.hasNotFoundMatch()?i=404:this.__store.state.matches.some(a=>a.status==="error")&&(i=500),i!==void 0&&this.__store.setState(a=>({...a,statusCode:i}))},this.startViewTransition=t=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;if(typeof s=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,i=this.state.resolvedLocation,a=typeof s.types=="function"?s.types(se({resolvedLocation:i,location:o})):s.types;if(a===!1){t();return}r={update:t,types:a}}else r=t;document.startViewTransition(r)}else t()},this.updateMatch=(t,s)=>{this.startTransition(()=>{var o;const r=(o=this.state.pendingMatches)!=null&&o.some(i=>i.id===t)?"pendingMatches":this.state.matches.some(i=>i.id===t)?"matches":this.state.cachedMatches.some(i=>i.id===t)?"cachedMatches":"";r&&this.__store.setState(i=>{var a;
9return{...i,[r]:(a=i[r])==null?void 0:a.map(l=>l.id===t?s(l):l)}})})},this.getMatch=t=>{var r;const s=o=>o.id===t;return this.state.cachedMatches.find(s)??((r=this.state.pendingMatches)==null?void 0:r.find(s))??this.state.matches.find(s)},this.invalidate=t=>{const s=r=>{var o;return((o=t==null?void 0:t.filter)==null?void 0:o.call(t,r))??!0?{...r,invalid:!0,...t!=null&&t.forcePending||r.status==="error"||r.status==="notFound"?{status:"pending",error:void 0}:void 0}:r};return this.__store.setState(r=>{var o;return{...r,matches:r.matches.map(s),cachedMatches:r.cachedMatches.map(s),pendingMatches:(o=r.pendingMatches)==null?void 0:o.map(s)}}),this.shouldViewTransition=!1,this.load({sync:t==null?void 0:t.sync})},this.getParsedLocationHref=t=>{let s=t.url.href;return this.origin&&t.url.origin===this.origin&&(s=s.replace(this.origin,"")||"/"),s},this.resolveRedirect=t=>{if(!t.options.href){const s=this.buildLocation(t.options),r=this.getParsedLocationHref(s);t.options.href=s.href,t.headers.set("Location",r)}return t.headers.get("Location")||t.headers.set("Location",t.options.href),t},this.clearCache=t=>{const s=t==null?void 0:t.filter;s!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(o=>!s(o))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const t=s=>{const r=this.looseRoutesById[s.routeId];if(!r.options.loader)return!0;const o=(s.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??300*1e3;return s.status==="error"?!0:Date.now()-s.updatedAt>=o};this.clearCache({filter:t})},this.loadRouteChunk=ln,this.preloadRoute=async t=>{const s=this.buildLocation(t);let r=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:t});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(a=>a.id)),i=new Set([...o,...this.state.cachedMatches.map(a=>a.id)]);we(()=>{r.forEach(a=>{i.has(a.id)||this.__store.setState(l=>({...l,cachedMatches:[...l.cachedMatches,a]}))})});try{return r=await Ut({router:this,matches:r,location:s,preload:!0,updateMatch:(a,l)=>{o.has(a)?r=r.map(u=>u.id===a?l(u):u):this.updateMatch(a,l)}}),r}catch(a){if($(a))return a.options.reloadDocument?void 0:await this.preloadRoute({...a.options,_fromLocation:s});O(a)||console.error(a);return}},this.matchRoute=(t,s)=>{const r={...t,to:t.to?this.resolvePathWithBase(t.from||"",t.to):void 0,params:t.params||{},leaveParams:!0},o=this.buildLocation(r);
9if(s!=null&&s.pending&&this.state.status!=="pending")return!1;const a=((s==null?void 0:s.pending)===void 0?!this.state.isLoading:s.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,l=Kn(o.pathname,(s==null?void 0:s.caseSensitive)??!1,(s==null?void 0:s.fuzzy)??!1,a.pathname,this.processedTree);return!l||t.params&&!te(l.params,t.params,{partial:!0})?!1:(s==null?void 0:s.includeSearch)??!0?te(a.search,o.search,{partial:!0})?l.params:!1:l.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(t=>t.status==="notFound"||t.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??hs,parseSearch:n.parseSearch??fs}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(n,t){const s=this.getMatchedRoutes(n.pathname),{foundRoute:r,routeParams:o}=s;let{matchedRoutes:i}=s,a=!1;(r?r.path!=="/"&&o["**"]:ne(n.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const l=(()=>{if(a){if(this.options.notFoundMode!=="root")for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.children)return f.id}return N}})(),u=[],d=c=>(c==null?void 0:c.id)?c.context??this.options.context??void 0:this.options.context??void 0;return i.forEach((c,f)=>{var A,V,de;const h=u[f-1],[m,p,g]=(()=>{const j=(h==null?void 0:h.search)??n.search,U=(h==null?void 0:h._strictSearch)??void 0;try{const H=ht(c.options.validateSearch,{...j})??void 0;return[{...j,...H},{...U,...H},void 0]}catch(H){let me=H;if(H instanceof We||(me=new We(H.message,{cause:H})),t!=null&&t.throwOnError)throw me;return[j,{},me]}})(),v=((V=(A=c.options).loaderDeps)==null?void 0:V.call(A,{search:m}))??"",_=v?JSON.stringify(v):"",{interpolatedPath:P,usedParams:x}=tt({path:c.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),T=c.id+P+_,S=this.getMatch(T),y=this.state.matches.find(j=>j.routeId===c.id),R=(S==null?void 0:S._strictParams)??x;let M;if(!S){const j=((de=c.options.params)==null?void 0:de.parse)??c.options.parseParams;if(j)try{Object.assign(R,j(R))}catch(U){if(O(U)||$(U)?M=U:M=new Ls(U.message,{cause:U}),t!=null&&t.throwOnError)throw M}}Object.assign(o,R);const L=y?"stay":"enter";let b;if(S)b={...S,cause:L,params:y?D(y.params,o):o,_strictParams:R,search:D(y?y.search:S.search,m),_strictSearch:p};else{const j=c.options.loader||c.options.beforeLoad||c.lazyFn||un(c)?"pending":"success";b={id:T,ssr:this.isServer?void 0:c.options.ssr,index:f,routeId:c.id,params:y?D(y.params,o):o,_strictParams:R,pathname:P,updatedAt:Date.now(),search:y?D(y.search,m):m,_strictSearch:p,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:M,__routeContext:void 0,_nonReactive:{loadPromise:fe()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:y?D(y.loaderDeps,v):v,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:c.options.staticData||{},fullPath:c.fullPath}}t!=null&&t.preload||(b.globalNotFound=l===c.id),b.searchError=g;const k=d(h);b.context={...k,...b.__routeContext,...b.__beforeLoadContext},u.push(b)}),u.forEach((c,f)=>{const h=this.looseRoutesById[c.routeId];if(!this.getMatch(c.id)&&(t==null?void 0:t._buildLocation)!==!0){const p=u[f-1],g=d(p);if(h.options.context){const v={deps:c.loaderDeps,params:c.params,context:g??{},location:n,navigate:_=>this.navigate({..._,_fromLocation:n}),buildLocation:this.buildLocation,cause:c.cause,abortController:c.abortController,preload:!!c.preload,matches:u};c.__routeContext=h.options.context(v)??void 0}c.context={...g,...c.__routeContext,...c.__beforeLoadContext}}}),u}}class We extends Error{}
9class Ls extends Error{}function bs(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function ht(e,n){if(e==null)return{};if("~standard"in e){const t=e["~standard"].validate(n);if(t instanceof Promise)throw new We("Async validation not supported");if(t.issues)throw new We(JSON.stringify(t.issues,void 0,2),{cause:t});return t.value}return"parse"in e?e.parse(n):typeof e=="function"?e(n):{}}function Cs({pathname:e,routesById:n,processedTree:t}){const s={},r=ne(e);let o;const i=qn(r,t,!0);return i&&(o=i.route,Object.assign(s,i.params)),{matchedRoutes:(i==null?void 0:i.branch)||[n[N]],routeParams:s,foundRoute:o}}function Ms({search:e,dest:n,destRoutes:t,_includeValidateSearch:s}){const r=t.reduce((a,l)=>{var d;const u=[];if("search"in l.options)(d=l.options.search)!=null&&d.middlewares&&u.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const c=({search:f,next:h})=>{let m=f;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(m=l.options.preSearchFilters.reduce((g,v)=>v(g),f));const p=h(m);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((g,v)=>v(g),p):p};u.push(c)}if(s&&l.options.validateSearch){const c=({search:f,next:h})=>{const m=h(f);try{return{...m,...ht(l.options.validateSearch,m)??void 0}}catch{return m}};u.push(c)}return a.concat(u)},[])??[],o=({search:a})=>n.search?n.search===!0?a:J(n.search,a):{};r.push(o);const i=(a,l)=>{if(a>=r.length)return l;const u=r[a];return u({search:l,next:c=>i(a+1,c)})};return i(0,e)}const ks="Error preloading route! ☝️";class mn{constructor(n){if(this.init=t=>{var u,d;this.originalIndex=t.originalIndex;const s=this.options,r=!(s!=null&&s.path)&&!(s!=null&&s.id);this.parentRoute=(d=(u=this.options).getParentRoute)==null?void 0:d.call(u),r?this._path=N:this.parentRoute||q(!1);let o=r?N:s==null?void 0:s.path;o&&o!=="/"&&(o=tn(o));const i=(s==null?void 0:s.id)||o;let a=r?N:Ee([this.parentRoute.id===N?"":this.parentRoute.id,i]);o===N&&(o="/"),a!==N&&(a=Ee(["/",a]));const l=a===N?"/":Ee([this.parentRoute.fullPath,o]);this._path=o,this._id=a,this._fullPath=l,this._to=l},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.options=n||{},this.isRoot=!(n!=null&&n.getParentRoute),n!=null&&n.id&&(n!=null&&n.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class Ts extends mn{constructor(n){super(n)}}function vt(e){const n=e.errorComponent??ze;return w.jsx(Is,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:t,reset:s})=>t?C.createElement(n,{error:t,reset:s}):e.children})}class Is extends C.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(n){return{resetKey:n.getResetKey()}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidUpdate(n,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(n,t){this.props.onCatch&&this.props.onCatch(n,t)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function ze({error:e}){const[n,t]=C.useState(!1);return w.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[w.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[w.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),w.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>t(s=>!s),children:n?"Hide Error":"Show Error"})]}),w.jsx("div",{style:{height:".25rem"}}),n?w.jsx("div",{children:w.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?w.jsx("code",{children:e.message}):null})}):null]})}function Es({children:e,fallback:n=null}){return Bs()?w.jsx(ue.Fragment,{children:e}):w.jsx(ue.Fragment,{children:n})}function Bs(){return ue.useSyncExternalStore(As,()=>!0,()=>!1)}function As(){return()=>{}}var st={exports:{}},rt={},ot={exports:{}},it={};
9/**
10 * @license React
11 * use-sync-external-store-shim.production.js
12 *
13 * Copyright (c) Meta Platforms, Inc. and affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var Wt;function Fs(){if(Wt)return it;Wt=1;var e=dt();function n(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var t=typeof Object.is=="function"?Object.is:n,s=e.useState,r=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function a(c,f){var h=f(),m=s({inst:{value:h,getSnapshot:f}}),p=m[0].inst,g=m[1];return o(function(){p.value=h,p.getSnapshot=f,l(p)&&g({inst:p})},[c,h,f]),r(function(){return l(p)&&g({inst:p}),c(function(){l(p)&&g({inst:p})})},[c]),i(h),h}function l(c){var f=c.getSnapshot;c=c.value;try{var h=f();return!t(c,h)}catch{return!0}}function u(c,f){return f()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:a;return it.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,it}var Vt;function js(){return Vt||(Vt=1,ot.exports=Fs()),ot.exports}/**
18 * @license React
19 * use-sync-external-store-shim/with-selector.production.js
20 *
21 * Copyright (c) Meta Platforms, Inc. and affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var Ht;function Ns(){if(Ht)return rt;Ht=1;var e=dt(),n=js();function t(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var s=typeof Object.is=="function"?Object.is:t,r=n.useSyncExternalStore,o=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;return rt.useSyncExternalStoreWithSelector=function(u,d,c,f,h){var m=o(null);if(m.current===null){var p={hasValue:!1,value:null};m.current=p}else p=m.current;m=a(function(){function v(S){if(!_){if(_=!0,P=S,S=f(S),h!==void 0&&p.hasValue){var y=p.value;if(h(y,S))return x=y}return x=S}if(y=x,s(P,S))return y;var R=f(S);return h!==void 0&&h(y,R)?(P=S,y):(P=S,x=R)}var _=!1,P,x,T=c===void 0?null:c;return[function(){return v(d())},T===null?void 0:function(){return v(T())}]},[d,c,f,h]);var g=r(u,m[0],m[1]);return i(function(){p.hasValue=!0,p.value=g},[g]),l(g),g},rt}var zt;function Os(){return zt||(zt=1,st.exports=Ns()),st.exports}var Ds=Os();function $s(e,n=s=>s,t={}){const s=t.equal??Us;return Ds.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,n,s)}function Us(e,n){if(Object.is(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;if(e instanceof Map&&n instanceof Map){if(e.size!==n.size)return!1;for(const[s,r]of e)if(!n.has(s)||!Object.is(r,n.get(s)))return!1;return!0}if(e instanceof Set&&n instanceof Set){if(e.size!==n.size)return!1;for(const s of e)if(!n.has(s))return!1;return!0}if(e instanceof Date&&n instanceof Date)return e.getTime()===n.getTime();const t=Kt(e);if(t.length!==Kt(n).length)return!1;for(let s=0;s<t.length;s++)if(!Object.prototype.hasOwnProperty.call(n,t[s])||!Object.is(e[t[s]],n[t[s]]))return!1;return!0}function Kt(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const at=C.createContext(null);function pn(){return typeof document>"u"?at:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=at,at)}function B(e){const n=C.useContext(pn());return e==null||e.warn,n}function E(e){const n=B({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n,s=C.useRef(void 0);return $s(t.__store,r=>{if(e!=null&&e.select){if(e.structuralSharing??t.options.defaultStructuralSharing){const o=D(s.current,e.select(r));return s.current=o,o}return e.select(r)}return r})}const Ke=C.createContext(void 0),Ws=C.createContext(void 0);function z(e){const n=C.useContext(e.from?Ws:Ke);return E({select:s=>{const r=s.matches.find(o=>e.from?e.from===o.routeId:o.id===n);if(q(!((e.shouldThrow??!0)&&!r),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),r!==void 0)return e.select?e.select(r):r},structuralSharing:e.structuralSharing})}function _t(e){return z({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function Rt(e){const{select:n,...t}=e;return z({...t,select:s=>n?n(s.loaderDeps):s.loaderDeps})}function Pt(e){return z({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:n=>{const t=e.strict===!1?n.params:n._strictParams;return e.select?e.select(t):t}})}function xt(e){return z({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}const Pe=typeof window<"u"?C.useLayoutEffect:C.useEffect;function ct(e){const n=C.useRef({value:e,prev:null}),t=n.current.value;return e!==t&&(n.current={value:e,prev:t}),n.current.prev}function Vs(e,n,t={},s={}){C.useEffect(()=>{if(!e.current||s.disabled||typeof IntersectionObserver!="function")return;const r=new IntersectionObserver(([o])=>{n(o)},t);return r.observe(e.current),()=>{r.disconnect()}},[n,t,s.disabled,e])}function Hs(e){const n=C.useRef(null);return C.useImperativeHandle(e,()=>n.current,[]),n}function qe(e){const n=B();return C.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function _r(e){const n=B(),t=qe(),s=C.useRef(null);return Pe(()=>{s.current!==e&&(t(e),s.current=e)},[n,e,t]),null}var gn=Cn();const Rr=Zt(gn);function zs(e,n){const t=B(),[s,r]=C.useState(!1),o=C.useRef(!1),i=Hs(n),{activeProps:a,inactiveProps:l,activeOptions:u,to:d,preload:c,preloadDelay:f,hashScrollIntoView:h,replace:m,startTransition:p,resetScroll:g,viewTransition:v,children:_,target:P,disabled:x,style:T,className:S,onClick:y,onFocus:R,onMouseEnter:M,onMouseLeave:L,onTouchStart:b,ignoreBlocker:k,params:A,search:V,hash:de,state:j,mask:U,reloadDocument:H,unsafeRelative:me,from:gr,_fromLocation:yr,...wt}=e,Rn=E({select:I=>I.location.search,structuralSharing:!0}),Lt=e.from,pe=C.useMemo(()=>({...e,from:Lt}),[t,Rn,Lt,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),K=C.useMemo(()=>t.buildLocation({...pe}),[t,pe]),G=C.useMemo(()=>
25{if(x)return;let I=K.maskedLocation?K.maskedLocation.url.href:K.url.href,F=!1;return t.origin&&(I.startsWith(t.origin)?I=t.history.createHref(I.replace(t.origin,""))||"/":F=!0),{href:I,external:F}},[x,K.maskedLocation,K.url,t.origin,t.history]),be=C.useMemo(()=>{if(G!=null&&G.external)return G.href;try{return new URL(d),d}catch{}},[d,G]),ie=e.reloadDocument||be?!1:c??t.options.defaultPreload,Ge=f??t.options.defaultPreloadDelay??0,Je=E({select:I=>{if(be)return!1;if(u!=null&&u.exact){if(!es(I.location.pathname,K.pathname,t.basepath))return!1}else{const F=De(I.location.pathname,t.basepath),W=De(K.pathname,t.basepath);if(!(F.startsWith(W)&&(F.length===W.length||F[W.length]==="/")))return!1}return((u==null?void 0:u.includeSearch)??!0)&&!te(I.location.search,K.search,{partial:!(u!=null&&u.exact),ignoreUndefined:!(u!=null&&u.explicitUndefined)})?!1:u!=null&&u.includeHash?I.location.hash===K.hash:!0}}),Q=C.useCallback(()=>{t.preloadRoute({...pe}).catch(I=>{console.warn(I),console.warn(ks)})},[t,pe]),Pn=C.useCallback(I=>{I!=null&&I.isIntersecting&&Q()},[Q]);Vs(i,Pn,Ys,{disabled:!!x||ie!=="viewport"}),C.useEffect(()=>{o.current||!x&&ie==="render"&&(Q(),o.current=!0)},[x,Q,ie]);const xn=I=>{const F=I.currentTarget.getAttribute("target"),W=P!==void 0?P:F;if(!x&&!Xs(I)&&!I.defaultPrevented&&(!W||W==="_self")&&I.button===0){I.preventDefault(),gn.flushSync(()=>{r(!0)});const kt=t.subscribe("onResolved",()=>{kt(),r(!1)});t.navigate({...pe,replace:m,resetScroll:g,hashScrollIntoView:h,startTransition:p,viewTransition:v,ignoreBlocker:k})}};if(be)return{...wt,ref:i,href:be,..._&&{children:_},...P&&{target:P},...x&&{disabled:x},...T&&{style:T},...S&&{className:S},...y&&{onClick:y},...R&&{onFocus:R},...M&&{onMouseEnter:M},...L&&{onMouseLeave:L},...b&&{onTouchStart:b}};const bt=I=>{x||ie&&Q()},wn=bt,Ln=I=>{if(!(x||!ie))if(!Ge)Q();else{const F=I.target;if(ve.has(F))return;const W=setTimeout(()=>{ve.delete(F),Q()},Ge);ve.set(F,W)}},bn=I=>{if(x||!ie||!Ge)return;const F=I.target,W=ve.get(F);W&&(clearTimeout(W),ve.delete(F))},Ce=Je?J(a,{})??Ks:lt,Me=Je?lt:J(l,{})??lt,Ct=[S,Ce.className,Me.className].filter(Boolean).join(" "),Mt=(T||Ce.style||Me.style)&&{...T,...Ce.style,...Me.style};return{...wt,...Ce,...Me,href:G==null?void 0:G.href,ref:i,onClick:_e([y,xn]),onFocus:_e([R,bt]),onMouseEnter:_e([M,Ln]),onMouseLeave:_e([L,bn]),onTouchStart:_e([b,wn]),disabled:!!x,target:P,...Mt&&{style:Mt},...Ct&&{className:Ct},...x&&qs,...Je&&Gs,...s&&Js}}const lt={},Ks={className:"active"},qs={role:"link","aria-disabled":!0},Gs={"data-status":"active","aria-current":"page"},Js={"data-transitioning":"transitioning"},ve=new WeakMap,Ys={rootMargin:"100px"},_e=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}},yn=C.forwardRef((e,n)=>{const{_asChild:t,...s}=e,{type:r,ref:o,...i}=zs(s,n),a=typeof s.children=="function"?s.children({isActive:i["data-status"]==="active"}):s.children;return t===void 0&&delete i.disabled,C.createElement(t||"a",{...i,ref:o},a)});function Xs(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class Zs extends mn{constructor(n){super(n),this.useMatch=t=>z({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>z({...t,from:this.id,select:s=>t!=null&&t.select?t.select(s.context):s.context}),this.useSearch=t=>xt({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Pt({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Rt({...t,from:this.id}),this.useLoaderData=t=>_t({...t,from:this.id}),this.useNavigate=()=>qe({from:this.fullPath}),this.Link=ue.forwardRef((t,s)=>w.jsx(yn,{ref:s,from:this.fullPath,...t})),this.$$typeof=Symbol.for("react.memo")}}function Qs(e){return new Zs(e)}function Pr(){return e=>tr(e)}class er extends Ts{constructor(n){super(n),this.useMatch=t=>z({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>z({...t,from:this.id,select:s=>t!=null&&t.select?t.select(s.context):s.context}),this.useSearch=t=>xt({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Pt({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>Rt({...t,from:this.id}),this.useLoaderData=t=>_t({...t,from:this.id}),this.useNavigate=()=>qe({from:this.fullPath}),this.Link=ue.forwardRef((t,s)=>w.jsx(yn,{ref:s,from:this.fullPath,...t})),this.$$typeof=Symbol.for("react.memo")}}function tr(e){return new er(e)}function qt(e){return typeof e=="object"?new Gt(e,{silent:!0}).createRoute(e):new Gt(e,{silent:!0}).createRoute}class Gt{constructor(n,t){this.path=n,this.createRoute=s=>{this.silent;const r=Qs(s);return r.isRoot=!1,r},this.silent=t==null?void 0:t.silent}}class Jt{constructor(n){this.useMatch=t=>z({select:t==null?void 0:t.select,from:this.options.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>z({from:this.options.id,select:s=>t!=null&&t.select?t.select(s.context):s.context}),this.useSearch=t=>xt({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.options.id}),this.useParams=t=>Pt({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.options.id}),this.useLoaderDeps=t=>Rt({...t,from:this.options.id}),this.useLoaderData=t=>_t({...t,from:this.options.id}),this.useNavigate=()=>{const t=B();return qe({from:t.routesById[this.options.id].fullPath})},this.options=n,this.$$typeof=Symbol.for("react.memo")}}function Yt(e){return typeof e=="object"?new Jt(e):n=>new Jt({id:e,...n})}function nr(){const e=B(),n=C.useRef({router:e,mounted:!1}),[t,s]=C.useState(!1),{hasPendingMatches:r,isLoading:o}=E({select:c=>({isLoading:c.isLoading,hasPendingMatches:c.matches.some(f=>f.status==="pending")}),structuralSharing:!0}),i=ct(o),a=o||t||r,l=ct(a),u=o||r,d=ct(u);return e.startTransition=c=>{s(!0),C.startTransition(()=>{c(),s(!1)})},C.useEffect(()=>{const c=e.history.subscribe(e.load),f=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ne(e.latestLocation.publicHref)!==ne(f.publicHref)&&e.commitLocation({...f,replace:!0}),()=>{c()}},[e,e.history]),Pe(()=>{if(typeof window<"u"&&e.ssr||n.current.router===e&&n.current.mounted)return;n.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(f){console.error(f)}})()},[e]),Pe(()=>{i&&!o&&e.emit({type:"onLoad",...se(e.state)})},[i,e,o]),Pe(()=>{d&&!u&&e.emit({type:"onBeforeRouteMount",...se(e.state)})},[u,d,e]),Pe(()=>{if(l&&!a){const c=se(e.state);e.emit({type:"onResolved",...c}),e.__store.setState(f=>({...f,status:"idle",resolvedLocation:f.location})),c.hrefChanged&&cs(e)}},[a,l,e]),null}function sr(e){const n=E({select:t=>`not-found-${t.location.pathname}-${t.status}`});return w.jsx(vt,{getResetKey:()=>n,onCatch:(t,s)=>{var r;if(O(t))(r=e.onCatch)==null||r.call(e,t,s);else throw t},errorComponent:({error:t})=>{var s;if(O(t))return(s=e.fallback)==null?void 0:s.call(e,t);throw t},children:e.children})}function rr(){return w.jsx("p",{children:"Not Found"})}function ae(e){return w.jsx(w.Fragment,{children:e.children})}function Sn(e,n,t){return n.options.notFoundComponent?w.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?w.jsx(e.options.defaultNotFoundComponent,{...t}):w.jsx(rr,{})}function or({children:e}){var t;const n=B();return n.isServer?w.jsx("script",{nonce:(t=n.options.ssr)==null?void 0:t.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function ir(){const e=B();
25if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const t=(e.options.getScrollRestorationKey||ft)(e.latestLocation),s=t!==ft(e.latestLocation)?t:void 0,r={storageKey:$e,shouldScrollRestoration:!0};return s&&(r.key=s),w.jsx(or,{children:`(${sn.toString()})(${JSON.stringify(r)})`})}const vn=C.memo(function({matchId:n}){var v,_;const t=B(),s=E({select:P=>{const x=P.matches.find(T=>T.id===n);return q(x),{routeId:x.routeId,ssr:x.ssr,_displayPending:x._displayPending}},structuralSharing:!0}),r=t.routesById[s.routeId],o=r.options.pendingComponent??t.options.defaultPendingComponent,i=o?w.jsx(o,{}):null,a=r.options.errorComponent??t.options.defaultErrorComponent,l=r.options.onCatch??t.options.defaultOnCatch,u=r.isRoot?r.options.notFoundComponent??((v=t.options.notFoundRoute)==null?void 0:v.options.component):r.options.notFoundComponent,d=s.ssr===!1||s.ssr==="data-only",c=(!r.isRoot||r.options.wrapInSuspense||d)&&(r.options.wrapInSuspense??o??(((_=r.options.errorComponent)==null?void 0:_.preload)||d))?C.Suspense:ae,f=a?vt:ae,h=u?sr:ae,m=E({select:P=>P.loadedAt}),p=E({select:P=>{var T;const x=P.matches.findIndex(S=>S.id===n);return(T=P.matches[x-1])==null?void 0:T.routeId}}),g=r.isRoot?r.options.shellComponent??ae:ae;return w.jsxs(g,{children:[w.jsx(Ke.Provider,{value:n,children:w.jsx(c,{fallback:i,children:w.jsx(f,{getResetKey:()=>m,errorComponent:a||ze,onCatch:(P,x)=>{if(O(P))throw P;l==null||l(P,x)},children:w.jsx(h,{fallback:P=>{if(!u||P.routeId&&P.routeId!==s.routeId||!P.routeId&&!r.isRoot)throw P;return C.createElement(u,P)},children:d||s._displayPending?w.jsx(Es,{fallback:i,children:w.jsx(Xt,{matchId:n})}):w.jsx(Xt,{matchId:n})})})})}),p===N&&t.options.scrollRestoration?w.jsxs(w.Fragment,{children:[w.jsx(ar,{}),w.jsx(ir,{})]}):null]})});function ar(){const e=B(),n=C.useRef(void 0);return w.jsx("script",{suppressHydrationWarning:!0,ref:t=>{t&&(n.current===void 0||n.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...se(e.state)}),n.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Xt=C.memo(function({matchId:n}){var l,u,d,c;const t=B(),{match:s,key:r,routeId:o}=E({select:f=>{const h=f.matches.find(_=>_.id===n),m=h.routeId,p=t.routesById[m].options.remountDeps??t.options.defaultRemountDeps,g=p==null?void 0:p({routeId:m,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:g?JSON.stringify(g):void 0,routeId:m,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),i=t.routesById[o],a=C.useMemo(()=>{const f=i.options.component??t.options.defaultComponent;return f?w.jsx(f,{},r):w.jsx(cr,{})},[r,i.options.component,t.options.defaultComponent]);if(s._displayPending)throw(l=t.getMatch(s.id))==null?void 0:l._nonReactive.displayPendingPromise;if(s._forcePending)throw(u=t.getMatch(s.id))==null?void 0:u._nonReactive.minPendingPromise;if(s.status==="pending"){const f=i.options.pendingMinMs??t.options.defaultPendingMinMs;if(f){const h=t.getMatch(s.id);if(h&&!h._nonReactive.minPendingPromise&&!t.isServer){const m=fe();h._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),h._nonReactive.minPendingPromise=void 0},f)}}throw(d=t.getMatch(s.id))==null?void 0:d._nonReactive.loadPromise}if(s.status==="notFound")return q(O(s.error)),Sn(t,i,s.error);if(s.status==="redirected")throw q($(s.error)),(c=t.getMatch(s.id))==null?void 0:c._nonReactive.loadPromise;if(s.status==="error"){if(t.isServer){const f=(i.options.errorComponent??t.options.defaultErrorComponent)||ze;return w.jsx(f,{error:s.error,reset:void 0,info:{componentStack:""}})}throw s.error}return a}),cr=C.memo(function(){const n=B(),t=C.useContext(Ke),s=E({select:u=>{var d;return(d=u.matches.find(c=>c.id===t))==null?void 0:d.routeId}}),r=n.routesById[s],o=E({select:u=>{const c=u.matches.find(f=>f.id===t);return q(c),c.globalNotFound}}),i=E({select:u=>{var f;const d=u.matches,c=d.findIndex(h=>h.id===t);return(f=d[c+1])==null?void 0:f.id}}),a=n.options.defaultPendingComponent?w.jsx(n.options.defaultPendingComponent,{}):null;if(o)return Sn(n,r,void 0);if(!i)return null;const l=w.jsx(vn,{matchId:i}
25);return s===N?w.jsx(C.Suspense,{fallback:a,children:l}):l});function lr(){const e=B(),t=e.routesById[N].options.pendingComponent??e.options.defaultPendingComponent,s=t?w.jsx(t,{}):null,r=e.isServer||typeof document<"u"&&e.ssr?ae:C.Suspense,o=w.jsxs(r,{fallback:s,children:[!e.isServer&&w.jsx(nr,{}),w.jsx(ur,{})]});return e.options.InnerWrap?w.jsx(e.options.InnerWrap,{children:o}):o}function ur(){const e=B(),n=E({select:r=>{var o;return(o=r.matches[0])==null?void 0:o.id}}),t=E({select:r=>r.loadedAt}),s=n?w.jsx(vn,{matchId:n}):null;return w.jsx(Ke.Provider,{value:n,children:e.options.disableGlobalCatchBoundary?s:w.jsx(vt,{getResetKey:()=>t,errorComponent:ze,onCatch:r=>{r.message||r.toString()},children:s})})}const xr=e=>new fr(e);class fr extends ws{constructor(n){super(n)}}typeof globalThis<"u"?(globalThis.createFileRoute=qt,globalThis.createLazyFileRoute=Yt):typeof window<"u"&&(window.createFileRoute=qt,window.createLazyFileRoute=Yt);function hr({router:e,children:n,...t}){Object.keys(t).length>0&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const s=pn(),r=w.jsx(s.Provider,{value:e,children:n});return e.options.Wrap?w.jsx(e.options.Wrap,{children:r}):r}function wr({router:e,...n}){return w.jsx(hr,{router:e,...n,children:w.jsx(lr,{})})}function Lr(e){return E({select:n=>n.location})}function _n({tag:e,attrs:n,children:t,nonce:s}
25){switch(e){case"title":return w.jsx("title",{...n,suppressHydrationWarning:!0,children:t});case"meta":return w.jsx("meta",{...n,suppressHydrationWarning:!0});case"link":return w.jsx("link",{...n,nonce:s,suppressHydrationWarning:!0});case"style":return w.jsx("style",{...n,dangerouslySetInnerHTML:{__html:t},nonce:s});case"script":return w.jsx(dr,{attrs:n,children:t});default:return null}}function dr({attrs:e,children:n}){const t=B();if(C.useEffect(()=>{if(e!=null&&e.src){const s=(()=>{try{const i=document.baseURI||window.location.href;return new URL(e.src,i).href}catch{return e.src}})();if(Array.from(document.querySelectorAll("script[src]")).find(i=>i.src===s))return;const o=document.createElement("script");for(const[i,a]of Object.entries(e))i!=="suppressHydrationWarning"&&a!==void 0&&a!==!1&&o.setAttribute(i,typeof a=="boolean"?"":String(a));return document.head.appendChild(o),()=>{o.parentNode&&o.parentNode.removeChild(o)}}if(typeof n=="string"){const s=typeof(e==null?void 0:e.type)=="string"?e.type:"text/javascript",r=typeof(e==null?void 0:e.nonce)=="string"?e.nonce:void 0;if(Array.from(document.querySelectorAll("script:not([src])")).find(a=>{if(!(a instanceof HTMLScriptElement))return!1;const l=a.getAttribute("type")??"text/javascript",u=a.getAttribute("nonce")??void 0;return a.textContent===n&&l===s&&u===r}))return;const i=document.createElement("script");if(i.textContent=n,e)for(const[a,l]of Object.entries(e))a!=="suppressHydrationWarning"&&l!==void 0&&l!==!1&&i.setAttribute(a,typeof l=="boolean"?"":String(l));return document.head.appendChild(i),()=>{i.parentNode&&i.parentNode.removeChild(i)}}},[e,n]),!t.isServer){const{src:s,...r}=e||{};return w.jsx("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:""},...r})}return e!=null&&e.src&&typeof e.src=="string"?w.jsx("script",{...e,suppressHydrationWarning:!0}):typeof n=="string"?w.jsx("script",{...e,dangerouslySetInnerHTML:{__html:n},suppressHydrationWarning:!0}):null}const mr=()=>{var l;const e=B(),n=(l=e.options.ssr)==null?void 0:l.nonce,t=E({select:u=>u.matches.map(d=>d.meta).filter(Boolean)}),s=C.useMemo(()=>{const u=[],d={};let c;for(let f=t.length-1;f>=0;f--){const h=t[f];for(let m=h.length-1;m>=0;m--){const p=h[m];if(p)if(p.title)c||(c={tag:"title",children:p.title});else{const g=p.name??p.property;if(g){if(d[g])continue;d[g]=!0}u.push({tag:"meta",attrs:{...p,nonce:n}})}}}return c&&u.push(c),n&&u.push({tag:"meta",attrs:{property:"csp-nonce",content:n}}),u.reverse(),u},[t,n]),r=E({select:u=>{var h;const d=u.matches.map(m=>m.links).filter(Boolean).flat(1).map(m=>({tag:"link",attrs:{...m,nonce:n}})),c=(h=e.ssr)==null?void 0:h.manifest,f=u.matches.map(m=>{var p;return((p=c==null?void 0:c.routes[m.routeId])==null?void 0:p.assets)??[]}).filter(Boolean).flat(1).filter(m=>m.tag==="link").map(m=>({tag:"link",attrs:{...m.attrs,suppressHydrationWarning:!0,nonce:n}}));return[...d,...f]},structuralSharing:!0}),o=E({select:u=>{const d=[];return u.matches.map(c=>e.looseRoutesById[c.routeId]).forEach(c=>{var f,h,m,p;return(p=(m=(h=(f=e.ssr)==null?void 0:f.manifest)==null?void 0:h.routes[c.id])==null?void 0:m.preloads)==null?void 0:p.filter(Boolean).forEach(g=>{d.push({tag:"link",attrs:{rel:"modulepreload",href:g,nonce:n}})})}),d},structuralSharing:!0}),i=E({select:u=>u.matches.map(d=>d.styles).flat(1).filter(Boolean).map(({children:d,...c})=>({tag:"style",attrs:c,children:d,nonce:n})),structuralSharing:!0}),a=E({select:u=>u.matches.map(d=>d.headScripts).flat(1).filter(Boolean).map(({children:d,...c})=>({tag:"script",attrs:{...c,nonce:n},children:d})),structuralSharing:!0});return pr([...s,...o,...r,...i,...a],u=>JSON.stringify(u))};function br(){var s;const e=mr(),t=(s=B().options.ssr)==null?void 0:s.nonce;return e.map(r=>C.createElement(_n,{...r,key:`tsr-meta-${JSON.stringify(r)}`,nonce:t}))}function pr(e,n){const t=new Set;return e.filter(s=>{const r=n(s);return t.has(r)?!1:(t.add(r),!0)})}const Cr=()=>{var i;const e=B(),n=(i=e.options.ssr)==null?void 0:i.nonce,t=E({select:a=>{var d;const l=[],u=(d=e.ssr)==null?void 0:d.manifest;return u?(a.matches.map(c=>
25e.looseRoutesById[c.routeId]).forEach(c=>{var f,h;return(h=(f=u.routes[c.id])==null?void 0:f.assets)==null?void 0:h.filter(m=>m.tag==="script").forEach(m=>{l.push({tag:"script",attrs:{...m.attrs,nonce:n},children:m.children})})}),l):[]},structuralSharing:!0}),{scripts:s}=E({select:a=>({scripts:a.matches.map(l=>l.scripts).flat(1).filter(Boolean).map(({children:l,...u})=>({tag:"script",attrs:{...u,suppressHydrationWarning:!0,nonce:n},children:l}))}),structuralSharing:!0});let r;e.serverSsr&&(r=e.serverSsr.takeBufferedScripts());const o=[...s,...t];return r&&o.unshift(r),w.jsx(w.Fragment,{children:o.map((a,l)=>C.createElement(_n,{...a,key:`tsr-scripts-${a.tag}-${l}`}))})};export{br as H,yn as L,_r as N,cr as O,vr as R,Cr as S,gn as a,Rr as b,ue as c,Tn as d,Pr as e,qt as f,B as g,Lr as h,xt as i,w as j,ps as k,xr as l,wr as m,Yt as n,C as r,qe as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.