@lunora/studio 1.0.0-alpha.61 → 1.0.0-alpha.63

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.
Files changed (111) hide show
  1. package/dist/standalone/{chunk-JC6WYIHM.js → chunk-26TQSVUV.js} +1 -1
  2. package/dist/standalone/{chunk-ZFWEPGWG.js → chunk-2OUPA2WJ.js} +1 -1
  3. package/dist/standalone/{chunk-HA34GYEX.js → chunk-2PJNAWB3.js} +1 -1
  4. package/dist/standalone/{chunk-CVMRZUF5.js → chunk-2Y36BVVM.js} +1 -1
  5. package/dist/standalone/{chunk-KNN3ZEQ7.js → chunk-37RIZFJ4.js} +1 -1
  6. package/dist/standalone/{chunk-UNN4CESU.js → chunk-3NHORZCK.js} +1 -1
  7. package/dist/standalone/{chunk-UNDFOYRI.js → chunk-3RTTXLMU.js} +1 -1
  8. package/dist/standalone/{chunk-UHHTEBC3.js → chunk-3XIESWL4.js} +1 -1
  9. package/dist/standalone/{chunk-KLLYGWNF.js → chunk-4CGALXS3.js} +1 -1
  10. package/dist/standalone/{chunk-O62HJZV3.js → chunk-4MSKCWUL.js} +1 -1
  11. package/dist/standalone/{chunk-SEDZDNQF.js → chunk-4UOFSGUS.js} +1 -1
  12. package/dist/standalone/{chunk-SA6MBPBL.js → chunk-54MMVNPT.js} +1 -1
  13. package/dist/standalone/{chunk-RE6UWCMG.js → chunk-5L2MD6F6.js} +1 -1
  14. package/dist/standalone/{chunk-HY46NTNW.js → chunk-5RF4QDDA.js} +1 -1
  15. package/dist/standalone/{chunk-YT7VXQVX.js → chunk-5Y3QLNWX.js} +1 -1
  16. package/dist/standalone/{chunk-LPOKAJT4.js → chunk-66TS6K5F.js} +1 -1
  17. package/dist/standalone/{chunk-4FNHHFWR.js → chunk-6ST5ECQA.js} +1 -1
  18. package/dist/standalone/{chunk-C4VURT57.js → chunk-7LQWFOEU.js} +1 -1
  19. package/dist/standalone/{chunk-46IB4C4Q.js → chunk-7QIFDWQV.js} +1 -1
  20. package/dist/standalone/{chunk-AKTGRZXN.js → chunk-7RXOPYR5.js} +1 -1
  21. package/dist/standalone/{chunk-PTTDIYGP.js → chunk-7T7UOTYK.js} +1 -1
  22. package/dist/standalone/{chunk-XRKCGQM2.js → chunk-7YAUSG6S.js} +1 -1
  23. package/dist/standalone/{chunk-PWDMXMRD.js → chunk-7YEFOSPH.js} +1 -1
  24. package/dist/standalone/chunk-AVAC26HJ.js +1 -0
  25. package/dist/standalone/{chunk-VUJGR4PB.js → chunk-AX4PAEGP.js} +1 -1
  26. package/dist/standalone/{chunk-JRWBGR5B.js → chunk-B5E7GQHG.js} +1 -1
  27. package/dist/standalone/{chunk-3DTM4GI5.js → chunk-BEH5N5ZA.js} +1 -1
  28. package/dist/standalone/{chunk-YNBJ6ICE.js → chunk-BGBLQ563.js} +1 -1
  29. package/dist/standalone/{chunk-SZUHZ2OG.js → chunk-BY4QROKU.js} +1 -1
  30. package/dist/standalone/{chunk-7Z5QEFR4.js → chunk-CFPZYHPY.js} +1 -1
  31. package/dist/standalone/{chunk-BAIN7UJ4.js → chunk-DCJKCERP.js} +1 -1
  32. package/dist/standalone/{chunk-P4J6XNG3.js → chunk-DY7CLL2H.js} +1 -1
  33. package/dist/standalone/{chunk-VEFNSN7P.js → chunk-ESVP44Y3.js} +1 -1
  34. package/dist/standalone/{chunk-IE4ROTQD.js → chunk-F6LUZVVI.js} +1 -1
  35. package/dist/standalone/{chunk-UY2Y5CXB.js → chunk-FXCBF4XT.js} +1 -1
  36. package/dist/standalone/{chunk-BHWSIIDT.js → chunk-GBQHGYGH.js} +1 -1
  37. package/dist/standalone/{chunk-HMIOF5GV.js → chunk-GHUPW2Y5.js} +1 -1
  38. package/dist/standalone/{chunk-FXFK4M4E.js → chunk-GMR677FL.js} +1 -1
  39. package/dist/standalone/{chunk-UWF5DOGV.js → chunk-GRL5MG3Z.js} +1 -1
  40. package/dist/standalone/{chunk-GTXVH7I5.js → chunk-H3V2QQ4K.js} +1 -1
  41. package/dist/standalone/{chunk-KZ2YUNMR.js → chunk-H7NIIBHH.js} +1 -1
  42. package/dist/standalone/{chunk-H6SIM4BT.js → chunk-HPFLBYRI.js} +1 -1
  43. package/dist/standalone/{chunk-CZEUVNCQ.js → chunk-IC4L6G56.js} +1 -1
  44. package/dist/standalone/{chunk-PGDWFWH5.js → chunk-IGBEXNXY.js} +1 -1
  45. package/dist/standalone/{chunk-TEIBKU46.js → chunk-IJFCOWEQ.js} +1 -1
  46. package/dist/standalone/{chunk-TYTJDFX2.js → chunk-ILNELDFC.js} +1 -1
  47. package/dist/standalone/{chunk-AGVJJQFL.js → chunk-IPHXIGYP.js} +1 -1
  48. package/dist/standalone/{chunk-TAE2H7PU.js → chunk-IUW24D4X.js} +1 -1
  49. package/dist/standalone/{chunk-C4O5UR4Y.js → chunk-IVFHIQOT.js} +1 -1
  50. package/dist/standalone/{chunk-MZEK4SGD.js → chunk-JGY4NGFW.js} +1 -1
  51. package/dist/standalone/{chunk-JLFCXBNQ.js → chunk-JN2Y24PY.js} +1 -1
  52. package/dist/standalone/{chunk-CYET4BRZ.js → chunk-K7M4SMQ7.js} +1 -1
  53. package/dist/standalone/{chunk-6CLVIOCB.js → chunk-KUVMORDQ.js} +1 -1
  54. package/dist/standalone/{chunk-NCCUM26H.js → chunk-KYF2E5CJ.js} +1 -1
  55. package/dist/standalone/{chunk-QC5HCNJZ.js → chunk-LA3HEESS.js} +1 -1
  56. package/dist/standalone/{chunk-UDZY7MKE.js → chunk-LE56LPNH.js} +1 -1
  57. package/dist/standalone/{chunk-SNDYNCAA.js → chunk-LEDWUPXM.js} +1 -1
  58. package/dist/standalone/{chunk-YQ5PILIJ.js → chunk-LFKCLLPT.js} +1 -1
  59. package/dist/standalone/{chunk-V66TSUKV.js → chunk-LFXFP4IF.js} +1 -1
  60. package/dist/standalone/{chunk-VUXJER3D.js → chunk-LLXFYRGQ.js} +1 -1
  61. package/dist/standalone/{chunk-KJTLW5W2.js → chunk-LWECXQWP.js} +3 -3
  62. package/dist/standalone/{chunk-2A4RKII2.js → chunk-M2B3MDFJ.js} +1 -1
  63. package/dist/standalone/{chunk-ICKBVXPP.js → chunk-M536Y2KX.js} +1 -1
  64. package/dist/standalone/{chunk-LKHUVEHX.js → chunk-M7QCL3ZP.js} +1 -1
  65. package/dist/standalone/{chunk-Q5WXTZWX.js → chunk-MIQTKZAR.js} +1 -1
  66. package/dist/standalone/{chunk-IYYTWZ2E.js → chunk-NPIULIRO.js} +1 -1
  67. package/dist/standalone/{chunk-SKJZDOHG.js → chunk-OWADN6BI.js} +1 -1
  68. package/dist/standalone/{chunk-IBCKC2BO.js → chunk-OZGWNJXD.js} +1 -1
  69. package/dist/standalone/{chunk-CKO3F55C.js → chunk-P4DHFWH7.js} +1 -1
  70. package/dist/standalone/{chunk-3MHKT76P.js → chunk-P4J3Z3SA.js} +1 -1
  71. package/dist/standalone/chunk-PF7V3G2Z.js +62 -0
  72. package/dist/standalone/{chunk-W572365D.js → chunk-PYXZLNG2.js} +1 -1
  73. package/dist/standalone/{chunk-R43KHQDA.js → chunk-PZPFWABF.js} +1 -1
  74. package/dist/standalone/chunk-QBWRC5YX.js +1 -0
  75. package/dist/standalone/{chunk-GS7OBQO5.js → chunk-QLJJ5YYZ.js} +1 -1
  76. package/dist/standalone/{chunk-ZMFZRGAN.js → chunk-QWGT25SE.js} +1 -1
  77. package/dist/standalone/{chunk-RC2K5RBE.js → chunk-RLEENOIX.js} +1 -1
  78. package/dist/standalone/{chunk-Z7MUQMLE.js → chunk-RWZKO2P6.js} +1 -1
  79. package/dist/standalone/{chunk-PR2SE2MD.js → chunk-SD4BERSA.js} +1 -1
  80. package/dist/standalone/{chunk-KYCAYNXM.js → chunk-SFDOII3B.js} +1 -1
  81. package/dist/standalone/{chunk-UNXX5GQH.js → chunk-SM67QXQI.js} +1 -1
  82. package/dist/standalone/{chunk-6UYILUSX.js → chunk-SMIESS7P.js} +1 -1
  83. package/dist/standalone/{chunk-KSRXMTBV.js → chunk-T6VMSOBB.js} +1 -1
  84. package/dist/standalone/{chunk-WYFLGXZ3.js → chunk-TCQEDMAQ.js} +1 -1
  85. package/dist/standalone/{chunk-23HKRH5H.js → chunk-TDE4AR5O.js} +1 -1
  86. package/dist/standalone/{chunk-K5PFWU5J.js → chunk-THIXMMZD.js} +1 -1
  87. package/dist/standalone/{chunk-RUP3M2GF.js → chunk-TRHTFGFW.js} +2 -2
  88. package/dist/standalone/{chunk-Q34MSC2F.js → chunk-UNUU7CJJ.js} +1 -1
  89. package/dist/standalone/{chunk-FYAJPWE7.js → chunk-UVDPQU7J.js} +1 -1
  90. package/dist/standalone/{chunk-JKPK25JO.js → chunk-UZERI5YC.js} +1 -1
  91. package/dist/standalone/{chunk-P2NBOUGZ.js → chunk-V4RWA7QI.js} +1 -1
  92. package/dist/standalone/{chunk-UZYGEOWY.js → chunk-V53KNYRN.js} +1 -1
  93. package/dist/standalone/{chunk-7AZZ7OJO.js → chunk-VSS7NFZJ.js} +1 -1
  94. package/dist/standalone/{chunk-7CRLAMGB.js → chunk-WQTUQZUM.js} +1 -1
  95. package/dist/standalone/{chunk-6I62RSI5.js → chunk-X2FQ6B5V.js} +1 -1
  96. package/dist/standalone/{chunk-UREY4GLG.js → chunk-XBDKZZ67.js} +1 -1
  97. package/dist/standalone/{chunk-TO6NLVFD.js → chunk-XBGJVK32.js} +1 -1
  98. package/dist/standalone/{chunk-QJKRHZYV.js → chunk-XITDHIVL.js} +1 -1
  99. package/dist/standalone/{chunk-6OKDCV7J.js → chunk-XQCVZAGU.js} +1 -1
  100. package/dist/standalone/{chunk-6P7HIPUE.js → chunk-XQGANNLS.js} +1 -1
  101. package/dist/standalone/{chunk-4AYEV5UN.js → chunk-XXQUMVWH.js} +1 -1
  102. package/dist/standalone/{chunk-H6WOFY6A.js → chunk-YQP2EYOC.js} +1 -1
  103. package/dist/standalone/chunk-ZJGP6EKR.js +1 -0
  104. package/dist/standalone/{chunk-J2LMP2A7.js → chunk-ZKEVSU66.js} +1 -1
  105. package/dist/standalone/{chunk-CWWGDW4V.js → chunk-ZSWWTXVW.js} +1 -1
  106. package/dist/standalone/studio.js +2 -2
  107. package/package.json +10 -10
  108. package/dist/standalone/chunk-725RLB7D.js +0 -1
  109. package/dist/standalone/chunk-KOC5KV3E.js +0 -1
  110. package/dist/standalone/chunk-OTJOI23O.js +0 -62
  111. package/dist/standalone/chunk-XDKFPBIL.js +0 -1
@@ -1 +1 @@
1
- import{b as Rs}from"./chunk-KSRXMTBV.js";import{a as ys}from"./chunk-46IB4C4Q.js";import{a as i,e as k,f as W,h as ot}from"./chunk-UHHTEBC3.js";var Go=k(W(),1),ue=Go.createContext(null);var Jo=k(W(),1);function D(t){return Jo.useContext(ue)}i(D,"useRouter");var ze=k(W(),1),Mt=ze.createContext(void 0),Yo=ze.createContext(void 0);function pt(t){return t[t.length-1]}i(pt,"last");function Ss(t){return typeof t=="function"}i(Ss,"isFunction");function Y(t,o){return Ss(t)?t(o):t}i(Y,"functionalUpdate");var er=Object.prototype.hasOwnProperty,Xo=Object.prototype.propertyIsEnumerable;function mt(t){for(let o in t)if(er.call(t,o))return!0;return!1}i(mt,"hasKeys");var Ps=i(()=>Object.create(null),"createNull"),gt=i((t,o)=>at(t,o,Ps),"nullReplaceEqualDeep");function at(t,o,e=()=>({}),s=0){if(!1)return o;if(t===o)return t;if(s>500)return o;let r=o,n=Ke(t)&&Ke(r);if(!n&&!(Yt(t)&&Yt(r)))return r;let a=n?t:Zo(t);if(!a)return r;let c=n?r:Zo(r);if(!c)return r;let u=a.length,d=c.length,f=n?new Array(d):e(),l=0;for(let p=0;p<d;p++){let h=n?p:c[p],m=t[h],y=r[h];if(m===y){f[h]=m,(n?p<u:er.call(t,h))&&l++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){f[h]=y;continue}let g=at(m,y,e,s+1);f[h]=g,g===m&&l++}return u===d&&l===u?t:f}i(at,"replaceEqualDeep");function Zo(t){let o=Object.getOwnPropertyNames(t);for(let r of o)if(!Xo.call(t,r))return!1;let e=Object.getOwnPropertySymbols(t);if(e.length===0)return o;let s=o;for(let r of e){if(!Xo.call(t,r))return!1;s.push(r)}return s}i(Zo,"getEnumerableOwnKeys");function Yt(t){if(!Qo(t))return!1;let o=t.constructor;if(typeof o>"u")return!0;let e=o.prototype;return!(!Qo(e)||!e.hasOwnProperty("isPrototypeOf"))}i(Yt,"isPlainObject");function Qo(t){return Object.prototype.toString.call(t)==="[object Object]"}i(Qo,"hasObjectPrototype");function Ke(t){return Array.isArray(t)&&t.length===Object.keys(t).length}i(Ke,"isPlainArray");function st(t,o,e){if(t===o)return!0;if(typeof t!=typeof o)return!1;if(Array.isArray(t)&&Array.isArray(o)){if(t.length!==o.length)return!1;for(let s=0,r=t.length;s<r;s++)if(!st(t[s],o[s],e))return!1;return!0}if(Yt(t)&&Yt(o)){let s=e?.ignoreUndefined??!0;if(e?.partial){for(let a in o)if((!s||o[a]!==void 0)&&!st(t[a],o[a],e))return!1;return!0}let r=0;if(!s)r=Object.keys(t).length;else for(let a in t)t[a]!==void 0&&r++;let n=0;for(let a in o)if((!s||o[a]!==void 0)&&(n++,n>r||!st(t[a],o[a],e)))return!1;return r===n}return!1}i(st,"deepEqual");function ct(t){let o,e,s=new Promise((r,n)=>{o=r,e=n});return s.status="pending",s.resolve=r=>{s.status="resolved",s.value=r,o(r),t?.(r)},s.reject=r=>{s.status="rejected",e(r)},s}i(ct,"createControlledPromise");function vt(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}i(vt,"isPromise");var xs=/[\x00-\x1f\x7f"<>`{}]/g;function ws(t){return t.replace(xs,o=>"%"+o.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}i(ws,"sanitizePathSegment");function tr(t){let o;try{o=decodeURI(t)}catch{o=t.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return ws(o)}i(tr,"decodeSegment");var qe=["http:","https:","mailto:","tel:"];function ut(t,o){if(!t)return!1;try{let e=new URL(t);return!o.has(e.protocol)}catch{return!1}}i(ut,"isDangerousProtocol");function At(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};let o=/%25|%5C/gi,e=0,s="",r;for(;(r=o.exec(t))!==null;)s+=tr(t.slice(e,r.index))+r[0],e=o.lastIndex;s=s+tr(e?t.slice(e):t);let n=!1;return s.startsWith("//")&&(n=!0,s="/"+s.replace(/^\/+/,"")),{path:s,handledProtocolRelativeURL:n}}i(At,"decodePath");function or(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}i(or,"encodePathLikeUrl");function rr(t,o){if(t===o)return!0;if(t.length!==o.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==o[e])return!1;return!0}i(rr,"arraysEqual");function $(){throw new Error("Invariant failed")}i($,"invariant");function yt(t){let o=new Map,e,s,r=i(n=>{n.next&&(n.prev?(n.prev.next=n.next,n.next.prev=n.prev,n.next=void 0,s&&(s.next=n,n.prev=s)):(n.next.prev=void 0,e=n.next,n.next=void 0,s&&(n.prev=s,s.next=n)),s=n)},"touch");return{get(n){let a=o.get(n);if(a)return r(a),a.value},set(n,a){if(o.size>=t&&e){let u=e;o.delete(u.key),u.next&&(e=u.next,u.next.prev=void 0),u===s&&(s=void 0)}let c=o.get(n);if(c)c.value=a,r(c);else{let u={key:n,value:a,prev:s};s&&(s.next=u),s=u,e||(e=u),o.set(n,u)}},clear(){o.clear(),e=void 0,s=void 0}}}i(yt,"createLRUCache");var St=4,nr=5;function _s(t){let o=t.indexOf("{");if(o===-1)return null;let e=t.indexOf("}",o);return e===-1||o+1>=t.length?null:[o,e]}i(_s,"getOpenAndCloseBraces");function Ye(t,o,e=new Uint16Array(6)){let s=t.indexOf("/",o),r=s===-1?t.length:s,n=t.substring(o,r);if(!n||!n.includes("$"))return e[0]=0,e[1]=o,e[2]=o,e[3]=r,e[4]=r,e[5]=r,e;if(n==="$"){let c=t.length;return e[0]=2,e[1]=o,e[2]=o,e[3]=c,e[4]=c,e[5]=c,e}if(n.charCodeAt(0)===36)return e[0]=1,e[1]=o,e[2]=o+1,e[3]=r,e[4]=r,e[5]=r,e;let a=_s(n);if(a){let[c,u]=a,d=n.charCodeAt(c+1);if(d===45){if(c+2<n.length&&n.charCodeAt(c+2)===36){let f=c+3,l=u;if(f<l)return e[0]=3,e[1]=o+c,e[2]=o+f,e[3]=o+l,e[4]=o+u+1,e[5]=r,e}}else if(d===36){let f=c+1,l=c+2;return l===u?(e[0]=2,e[1]=o+c,e[2]=o+f,e[3]=o+l,e[4]=o+u+1,e[5]=t.length,e):(e[0]=1,e[1]=o+c,e[2]=o+l,e[3]=o+u,e[4]=o+u+1,e[5]=r,e)}}return e[0]=0,e[1]=o,e[2]=o,e[3]=r,e[4]=r,e[5]=r,e}i(Ye,"parseSegment");function de(t,o,e,s,r,n,a){a?.(e);let c=s;{let u=e.fullPath??e.from,d=u.length,f=e.options?.caseSensitive??t,l=e.options?.params?.parse??e.options?.parseParams;for(;c<d;){let h=Ye(u,c,o),m,y=c,g=h[5];switch(c=g+1,n++,h[0]){case 0:{let v=u.substring(h[2],h[3]);if(f){let R=r.static?.get(v);if(R)m=R;else{r.static??=new Map;let S=It(e.fullPath??e.from);S.parent=r,S.depth=n,m=S,r.static.set(v,S)}}else{let R=v.toLowerCase(),S=r.staticInsensitive?.get(R);if(S)m=S;else{r.staticInsensitive??=new Map;let P=It(e.fullPath??e.from);P.parent=r,P.depth=n,m=P,r.staticInsensitive.set(R,P)}}break}case 1:{let v=u.substring(y,h[1]),R=u.substring(h[4],g),S=f&&!!(v||R),P=v?S?v:v.toLowerCase():void 0,_=R?S?R:R.toLowerCase():void 0,b=!l&&r.dynamic?.find(x=>!x.parse&&x.caseSensitive===S&&x.prefix===P&&x.suffix===_);if(b)m=b;else{let x=Je(1,e.fullPath??e.from,S,P,_);m=x,x.depth=n,x.parent=r,r.dynamic??=[],r.dynamic.push(x)}break}case 3:{let v=u.substring(y,h[1]),R=u.substring(h[4],g),S=f&&!!(v||R),P=v?S?v:v.toLowerCase():void 0,_=R?S?R:R.toLowerCase():void 0,b=!l&&r.optional?.find(x=>!x.parse&&x.caseSensitive===S&&x.prefix===P&&x.suffix===_);if(b)m=b;else{let x=Je(3,e.fullPath??e.from,S,P,_);m=x,x.parent=r,x.depth=n,r.optional??=[],r.optional.push(x)}break}case 2:{let v=u.substring(y,h[1]),R=u.substring(h[4],g),S=f&&!!(v||R),P=v?S?v:v.toLowerCase():void 0,_=R?S?R:R.toLowerCase():void 0,b=Je(2,e.fullPath??e.from,S,P,_);m=b,b.parent=r,b.depth=n,r.wildcard??=[],r.wildcard.push(b)}}r=m}if(l&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){let h=It(e.fullPath??e.from);h.kind=nr,h.parent=r,n++,h.depth=n,r.pathless??=[],r.pathless.push(h),r=h}let p=(e.path||!e.children)&&!e.isRoot;if(p&&u.endsWith("/")){let h=It(e.fullPath??e.from);h.kind=St,h.parent=r,n++,h.depth=n,r.index=h,r=h}r.parse=l??null,r.priority=e.options?.params?.priority??0,p&&!r.route&&(r.route=e,r.fullPath=e.fullPath??e.from)}if(e.children)for(let u of e.children)de(t,o,u,c,r,n,a)}i(de,"parseSegments");function Ge(t,o){if(t.parse&&!o.parse)return-1;if(!t.parse&&o.parse)return 1;if(t.parse&&o.parse&&(t.priority||o.priority))return o.priority-t.priority;if(t.prefix&&o.prefix&&t.prefix!==o.prefix){if(t.prefix.startsWith(o.prefix))return-1;if(o.prefix.startsWith(t.prefix))return 1}if(t.suffix&&o.suffix&&t.suffix!==o.suffix){if(t.suffix.endsWith(o.suffix))return-1;if(o.suffix.endsWith(t.suffix))return 1}return t.prefix&&!o.prefix?-1:!t.prefix&&o.prefix?1:t.suffix&&!o.suffix?-1:!t.suffix&&o.suffix?1:t.caseSensitive&&!o.caseSensitive?-1:!t.caseSensitive&&o.caseSensitive?1:0}i(Ge,"sortDynamic");function Rt(t){if(t.pathless)for(let o of t.pathless)Rt(o);if(t.static)for(let o of t.static.values())Rt(o);if(t.staticInsensitive)for(let o of t.staticInsensitive.values())Rt(o);if(t.dynamic?.length){t.dynamic.sort(Ge);for(let o of t.dynamic)Rt(o)}if(t.optional?.length){t.optional.sort(Ge);for(let o of t.optional)Rt(o)}if(t.wildcard?.length){t.wildcard.sort(Ge);for(let o of t.wildcard)Rt(o)}}i(Rt,"sortTreeNodes");function It(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}i(It,"createStaticNode");function Je(t,o,e,s,r){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:o,parent:null,parse:null,priority:0,caseSensitive:e,prefix:s,suffix:r}}i(Je,"createDynamicNode");function ir(t,o){let e=It("/"),s=new Uint16Array(6);for(let r of t)de(!1,s,r,1,e,0);Rt(e),o.masksTree=e,o.flatCache=yt(1e3)}i(ir,"processRouteMasks");function ar(t,o){t||="/";let e=o.flatCache.get(t);if(e)return e;let s=Xe(t,o.masksTree);return o.flatCache.set(t,s),s}i(ar,"findFlatMatch");function cr(t,o,e,s,r){t||="/",s||="/";let n=o?`case\0${t}`:t,a=r.singleCache.get(n);return a||(a=It("/"),de(o,new Uint16Array(6),{from:t},1,a,0),r.singleCache.set(n,a)),Xe(s,a,e)}i(cr,"findSingleMatch");function ur(t,o,e=!1){let s=e?t:`nofuzz\0${t}`,r=o.matchCache.get(s);if(r!==void 0)return r;t||="/";let n;try{n=Xe(t,o.segmentTree,e)}catch(a){if(a instanceof URIError)n=null;else throw a}return n&&(n.branch=Ze(n.route)),o.matchCache.set(s,n),n}i(ur,"findRouteMatch");function Cs(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}i(Cs,"trimPathRight");function lr(t,o=!1,e){let s=It(t.fullPath),r=new Uint16Array(6),n={},a={},c=0;return de(o,r,t,1,s,0,u=>{if(e?.(u,c),u.id in n&&$(),n[u.id]=u,c!==0&&u.path){let d=Cs(u.fullPath);(!a[d]||u.fullPath.endsWith("/"))&&(a[d]=u)}c++}),Rt(s),{processedTree:{segmentTree:s,singleCache:yt(1e3),matchCache:yt(1e3),flatCache:null,masksTree:null},routesById:n,routesByPath:a}}i(lr,"processRouteTree");function Xe(t,o,e=!1){let s=t.split("/"),r=Ls(t,s,o,e);if(!r)return null;let[n]=fr(t,s,r);return{route:r.node.route,rawParams:n}}i(Xe,"findMatch");function fr(t,o,e){let s=bs(e.node),r=null,n=Object.create(null),a=e.extract?.part??0,c=e.extract?.node??0,u=e.extract?.path??0,d=e.extract?.segment??0;for(;c<s.length;a++,c++,u++,d++){let f=s[c];if(f.kind===St)break;if(f.kind===nr){d--,a--,u--;continue}let l=o[a],p=u;if(l&&(u+=l.length),f.kind===1){r??=e.node.fullPath.split("/");let h=r[d],m=f.prefix?.length??0;if(h.charCodeAt(m)===123){let y=f.suffix?.length??0,g=h.substring(m+2,h.length-y-1),v=l.substring(m,l.length-y);n[g]=decodeURIComponent(v)}else{let y=h.substring(1);n[y]=decodeURIComponent(l)}}else if(f.kind===3){if(e.skipped&1<<c){a--,u=p-1;continue}r??=e.node.fullPath.split("/");let h=r[d],m=f.prefix?.length??0,y=f.suffix?.length??0,g=h.substring(m+3,h.length-y-1),v=f.suffix||f.prefix?l.substring(m,l.length-y):l;v&&(n[g]=decodeURIComponent(v))}else if(f.kind===2){let h=f,m=t.substring(p+(h.prefix?.length??0),t.length-(h.suffix?.length??0)),y=decodeURIComponent(m);n["*"]=y,n._splat=y;break}}return e.rawParams&&Object.assign(n,e.rawParams),[n,{part:a,node:c,path:u,segment:d}]}i(fr,"extractParams");function Ze(t){let o=[t];for(;t.parentRoute;)t=t.parentRoute,o.push(t);return o.reverse(),o}i(Ze,"buildRouteBranch");function bs(t){let o=Array(t.depth+1);do o[t.depth]=t,t=t.parent;while(t);return o}i(bs,"buildBranch");function Ls(t,o,e,s){if(t==="/"&&e.index)return{node:e.index,skipped:0};let r=!pt(o),n=r&&t!=="/",a=o.length-(r?1:0),c=[{node:e,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],u=null,d=null;for(;c.length;){let f=c.pop(),{node:l,index:p,skipped:h,depth:m,statics:y,dynamics:g,optionals:v}=f,{extract:R,rawParams:S}=f;if(l.kind===2&&l.route&&!fe(d,f))continue;if(l.parse){if(!sr(t,o,f))continue;S=f.rawParams,R=f.extract}s&&l.route&&l.kind!==St&&fe(u,f)&&(u=f);let P=p===a;if(P&&(l.route&&(!n||l.kind===St||l.kind===2)&&fe(d,f)&&(d=f),!l.optional&&!l.wildcard&&!l.index&&!l.pathless))continue;let _=P?void 0:o[p],b;if(P&&l.index){let x={node:l.index,index:p,skipped:h,depth:m+1,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S},w=!0;if(l.index.parse&&(sr(t,o,x)||(w=!1)),w){if(!g&&!v&&!h&&Ms(y,a))return x;fe(d,x)&&(d=x)}}if(l.wildcard)for(let x=l.wildcard.length-1;x>=0;x--){let w=l.wildcard[x],{prefix:C,suffix:M}=w;if(!(C&&(P||!(w.caseSensitive?_:b??=_.toLowerCase()).startsWith(C)))){if(M){if(P)continue;let L=o.slice(p).join("/").slice(-M.length);if((w.caseSensitive?L:L.toLowerCase())!==M)continue}c.push({node:w,index:a,skipped:h,depth:m+1,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S})}}if(l.optional){let x=h|1<<m,w=m+1;for(let C=l.optional.length-1;C>=0;C--){let M=l.optional[C];c.push({node:M,index:p,skipped:x,depth:w,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S})}if(!P)for(let C=l.optional.length-1;C>=0;C--){let M=l.optional[C],{prefix:L,suffix:I}=M;if(L||I){let rt=M.caseSensitive?_:b??=_.toLowerCase();if(L&&!rt.startsWith(L)||I&&!rt.endsWith(I))continue}c.push({node:M,index:p+1,skipped:h,depth:w,statics:y,dynamics:g,optionals:v+le(a,p),extract:R,rawParams:S})}}if(!P&&l.dynamic&&_)for(let x=l.dynamic.length-1;x>=0;x--){let w=l.dynamic[x],{prefix:C,suffix:M}=w;if(C||M){let L=w.caseSensitive?_:b??=_.toLowerCase();if(C&&!L.startsWith(C)||M&&!L.endsWith(M))continue}c.push({node:w,index:p+1,skipped:h,depth:m+1,statics:y,dynamics:g+le(a,p),optionals:v,extract:R,rawParams:S})}if(!P&&l.staticInsensitive){let x=l.staticInsensitive.get(b??=_.toLowerCase());x&&c.push({node:x,index:p+1,skipped:h,depth:m+1,statics:y+le(a,p),dynamics:g,optionals:v,extract:R,rawParams:S})}if(!P&&l.static){let x=l.static.get(_);x&&c.push({node:x,index:p+1,skipped:h,depth:m+1,statics:y+le(a,p),dynamics:g,optionals:v,extract:R,rawParams:S})}if(l.pathless){let x=m+1;for(let w=l.pathless.length-1;w>=0;w--){let C=l.pathless[w];c.push({node:C,index:p,skipped:h,depth:x,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S})}}}if(d)return d;if(s&&u){let f=u.index;for(let p=0;p<u.index;p++)f+=o[p].length;let l=f===t.length?"/":t.slice(f);return u.rawParams??=Object.create(null),u.rawParams["**"]=decodeURIComponent(l),u}return null}i(Ls,"getNodeMatch");function le(t,o){return 2**(t-o-1)}i(le,"segmentScore");function Ms(t,o){return t===2**(o-1)-1}i(Ms,"isPerfectStaticMatch");function sr(t,o,e){let s,r;try{[s,r]=fr(t,o,e)}catch{return null}if(e.rawParams=s,e.extract=r,!e.node.parse)return!0;try{if(e.node.parse(s)===!1)return null}catch{}return!0}i(sr,"validateParseParams");function fe(t,o){return t?o.statics>t.statics||o.statics===t.statics&&(o.dynamics>t.dynamics||o.dynamics===t.dynamics&&(o.optionals>t.optionals||o.optionals===t.optionals&&((o.node.kind===St)>(t.node.kind===St)||o.node.kind===St==(t.node.kind===St)&&o.depth>t.depth))):!0}i(fe,"isFrameMoreSpecific");function Et(t){return Zt(t.filter(o=>o!==void 0).join("/"))}i(Et,"joinPaths");function Zt(t){return t.replace(/\/{2,}/g,"/")}i(Zt,"cleanPath");function he(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}i(he,"trimPathLeft");function Z(t){let o=t.length;return o>1&&t[o-1]==="/"?t.replace(/\/{1,}$/,""):t}i(Z,"trimPathRight");function Qt(t){return Z(he(t))}i(Qt,"trimPath");function Pt(t,o){return t?.endsWith("/")&&t!=="/"&&t!==`${o}/`?t.slice(0,-1):t}i(Pt,"removeTrailingSlash");function pe(t,o,e){return Pt(t,e)===Pt(o,e)}i(pe,"exactPathTest");function Qe({base:t,to:o,trailingSlash:e="never",cache:s}){let r=o.startsWith("/"),n=!r&&o===".",a;if(s){a=r?o:n?t:t+"\0"+o;let d=s.get(a);if(d)return d}let c;if(n)c=t.split("/");else if(r)c=o.split("/");else{for(c=t.split("/");c.length>1&&pt(c)==="";)c.pop();let d=o.split("/");for(let f=0,l=d.length;f<l;f++){let p=d[f];p===""?f?f===l-1&&c.push(p):c=[p]:p===".."?c.pop():p==="."||c.push(p)}}c.length>1&&(pt(c)===""?e==="never"&&c.pop():e==="always"&&c.push(""));let u=Zt(c.join("/"))||"/";return a&&s&&s.set(a,u),u}i(Qe,"resolvePath");function hr(t){let o=new Map(t.map(r=>[encodeURIComponent(r),r])),e=Array.from(o.keys()).map(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),s=new RegExp(e,"g");return r=>r.replace(s,n=>o.get(n)??n)}i(hr,"compileDecodeCharMap");function Xt(t,o,e){let s=o[t];return typeof s!="string"?s:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(s)?s:s.split("/").map(r=>dr(r,e)).join("/"):dr(s,e)}i(Xt,"encodeParam");function me({path:t,params:o,decoder:e,...s}){let r=!1,n=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:n,isMissingParams:r};if(!t.includes("$"))return{interpolatedPath:t,usedParams:n,isMissingParams:r};if(!1){let f=t.length,l=0,p="";for(;l<f;){for(;l<f&&t.charCodeAt(l)===47;)l++;if(l>=f)break;let h=l,m=t.indexOf("/",l);m===-1&&(m=f),l=m;let y=t.substring(h,m);if(y)if(y.charCodeAt(0)===36)if(y.length===1){let g=o._splat;if(n._splat=g,n["*"]=g,!g){r=!0;continue}let v=Xt("_splat",o,e);p+="/"+v}else{let g=y.substring(1);!r&&!(g in o)&&(r=!0),n[g]=o[g];let v=Xt(g,o,e)??"undefined";p+="/"+v}else p+="/"+y}return t.endsWith("/")&&(p+="/"),{usedParams:n,interpolatedPath:p||"/",isMissingParams:r}}let a=t.length,c=0,u,d="";for(;c<a;){let f=c;u=Ye(t,f,u);let l=u[5];if(c=l+1,f===l)continue;let p=u[0];if(p===0){d+="/"+t.substring(f,l);continue}if(p===2){let h=o._splat;n._splat=h,n["*"]=h;let m=t.substring(f,u[1]),y=t.substring(u[4],l);if(!h){r=!0,(m||y)&&(d+="/"+m+y);continue}let g=Xt("_splat",o,e);d+="/"+m+g+y;continue}if(p===1){let h=t.substring(u[2],u[3]);!r&&!(h in o)&&(r=!0),n[h]=o[h];let m=t.substring(f,u[1]),y=t.substring(u[4],l),g=Xt(h,o,e)??"undefined";d+="/"+m+g+y;continue}if(p===3){let h=t.substring(u[2],u[3]),m=o[h];if(m==null)continue;n[h]=m;let y=t.substring(f,u[1]),g=t.substring(u[4],l),v=Xt(h,o,e)??"";d+="/"+y+v+g;continue}}return t.endsWith("/")&&(d+="/"),{usedParams:n,interpolatedPath:d||"/",isMissingParams:r}}i(me,"interpolatePath");function dr(t,o){let e=encodeURIComponent(t);return o?.(e)??e}i(dr,"encodePathParam");function A(t){return t?.isNotFound===!0}i(A,"isNotFound");function Is(){try{return sessionStorage}catch{return}}i(Is,"getSafeSessionStorage");var Es="tsr-scroll-restoration-v1_3",gr=Is();function ks(){try{return JSON.parse(gr?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}i(ks,"createScrollRestorationCache");function Ts(){try{gr?.setItem(Es,JSON.stringify(Bt))}catch{}}i(Ts,"persistScrollRestorationCache");var Bt=ks(),pr="data-scroll-restoration-id",Os=i(t=>t.state.__TSR_key||t.href,"defaultGetScrollRestorationKey");function Ns(t){let o=t.getAttribute(pr);if(o)return`[${pr}="${o}"]`;let e="",s=t,r;for(;r=s.parentNode;){let n=1,a=s;for(;a=a.previousElementSibling;)n++;let c=`${s.localName}:nth-child(${n})`;e=e?`${c} > ${e}`:c,s=r}return e}i(Ns,"getScrollRestorationSelector");var ge=!1,ve="window";function to(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}i(to,"getElement");function mr(t){let o=new Set;for(let e of t){if(e===ve)continue;let s=to(e);s&&o.add(s)}return o}i(mr,"getScrollToTopElements");function vr(t,o){let e=o??t.options.scrollRestoration,s=t._scroll;if(e&&(s.restoring=!0),!1)return;let r=t.options.getScrollRestorationKey||Os,n=new Set,a=i(c=>{let u=Bt[c]||={};for(let d of n)d===document?u[ve]={scrollX,scrollY}:d.isConnected&&(u[Ns(d)]={scrollX:d.scrollLeft,scrollY:d.scrollTop})},"snapshotCurrentScrollTargets");e&&!s.restoration&&(s.restoration=!0,ge=!1,history.scrollRestoration="manual",document.addEventListener("scroll",c=>{ge||n.add(c.target)},!0),t.subscribe("onBeforeLoad",c=>{c.fromLocation&&a(r(c.fromLocation)),n.clear()}),addEventListener("pagehide",()=>{a(r(t.stores.resolvedLocation.get()??t.stores.location.get())),Ts()})),!s.reset&&(s.reset=!0,t.subscribe("onRendered",c=>{let u=t.options.scrollRestorationBehavior,d=t.options.scrollToTopSelectors,f=s.next,l=s.hash,p;if(n.clear(),s.next=!0,s.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;let h=r(c.toLocation),m=c.fromLocation&&r(c.fromLocation);if(s.restoring&&m&&m!==h){let y=Bt[m];if(y){let g=Bt[h];for(let v in y){if(v===ve){if(f)continue}else{let R=to(v);if(!R||f&&d&&(p??=mr(d),p.has(R)))continue}g||(g=Bt[h]={}),g[v]??=y[v]}}}ge=!0;try{let y=c.toLocation.hash,g=c.toLocation.state.__hashScrollIntoViewOptions??!0,v=!1;if(f){!y&&d&&(p??=mr(d));let R=y&&g&&l,S=s.restoring?Bt[h]:void 0;if(S)for(let P in S){let{scrollX:_,scrollY:b}=S[P];if(P===ve){if(R)continue;scrollTo({top:b,left:_,behavior:u}),v=!0}else{let x=to(P);x&&(x.scrollLeft=_,x.scrollTop=b,p?.delete(x))}}if(!y){let P={top:0,left:0,behavior:u};if(v||scrollTo(P),p)for(let _ of p)_.scrollTo(P)}}!v&&y&&g&&document.getElementById(y)?.scrollIntoView(g)}finally{ge=!1}}))}i(vr,"setupScrollRestoration");function yr(t,o=String){let e=new URLSearchParams;for(let s in t){let r=t[s];r!==void 0&&e.set(s,o(r))}return e.toString()}i(yr,"encode");function eo(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}i(eo,"toValue");function Rr(t){let o=new URLSearchParams(t),e=Object.create(null);for(let[s,r]of o.entries()){let n=e[s];n==null?e[s]=eo(r):Array.isArray(n)?n.push(eo(r)):e[s]=[n,eo(r)]}return e}i(Rr,"decode");var Sr=Ds(JSON.parse),Pr=Fs(JSON.stringify,JSON.parse);function Ds(t){return o=>{o[0]==="?"&&(o=o.substring(1));let e=Rr(o);for(let s in e){let r=e[s];if(typeof r=="string")try{e[s]=t(r)}catch{}}return e}}i(Ds,"parseSearchWith");function Fs(t,o){let e=typeof o=="function";function s(r){if(typeof r=="object"&&r!==null)try{return t(r)}catch{}else if(e&&typeof r=="string")try{return o(r),t(r)}catch{}return r}return i(s,"stringifyValue"),r=>{let n=yr(r,s);return n?`?${n}`:""}}i(Fs,"stringifySearchWith");var X="__root__";function $t(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}let o=new Headers(t.headers);t.href&&o.get("Location")===null&&o.set("Location",t.href);let e=new Response(null,{status:t.statusCode,headers:o});if(e.options=t,t.throw)throw e;return e}i($t,"redirect");function H(t){return t instanceof Response&&!!t.options}i(H,"isRedirect");function xr(t){return{input:i(({url:o})=>{for(let e of t)o=ye(e,o);return o},"input"),output:i(({url:o})=>{for(let e=t.length-1;e>=0;e--)o=oo(t[e],o);return o},"output")}}i(xr,"composeRewrites");function wr(t){let o=Qt(t.basepath),e=`/${o}`,s=t.caseSensitive?e:e.toLowerCase(),r=`${s}/`;return{input:i(({url:n})=>{let a=t.caseSensitive?n.pathname:n.pathname.toLowerCase();return a===s?n.pathname="/":a.startsWith(r)&&(n.pathname=n.pathname.slice(e.length)),n},"input"),output:i(({url:n})=>(n.pathname=Et(["/",o,n.pathname]),n),"output")}}i(wr,"rewriteBasepath");function ye(t,o){let e=t?.input?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}i(ye,"executeRewriteInput");function oo(t,o){let e=t?.output?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}i(oo,"executeRewriteOutput");function no(t){let o=t;return{get(){return o},set(e){o=Y(e,o)}}}i(no,"createNonReactiveMutableStore");function io(t){return{get(){return t()}}}i(io,"createNonReactiveReadonlyStore");function _r(t,o){let{createMutableStore:e,createReadonlyStore:s,batch:r,init:n}=o,a=new Map,c=new Map,u=new Map,d=e(t.status),f=e(t.loadedAt),l=e(t.isLoading),p=e(t.isTransitioning),h=e(t.location),m=e(t.resolvedLocation),y=e(t.statusCode),g=e(t.redirect),v=e([]),R=e([]),S=e([]),P=s(()=>ro(a,v.get())),_=s(()=>ro(c,R.get())),b=s(()=>ro(u,S.get())),x=s(()=>v.get()[0]),w=s(()=>v.get().some(tt=>a.get(tt)?.get().status==="pending")),C=s(()=>({locationHref:h.get().href,resolvedLocationHref:m.get()?.href,status:d.get()})),M=s(()=>({status:d.get(),loadedAt:f.get(),isLoading:l.get(),isTransitioning:p.get(),matches:P.get(),location:h.get(),resolvedLocation:m.get(),statusCode:y.get(),redirect:g.get()})),L=yt(64);function I(tt){let zt=L.get(tt);return zt||(zt=s(()=>{let Fo=v.get();for(let Ao of Fo){let ie=a.get(Ao);if(ie&&ie.routeId===tt)return ie.get()}}),L.set(tt,zt)),zt}i(I,"getRouteMatchStore");let rt={status:d,loadedAt:f,isLoading:l,isTransitioning:p,location:h,resolvedLocation:m,statusCode:y,redirect:g,matchesId:v,pendingIds:R,cachedIds:S,matches:P,pendingMatches:_,cachedMatches:b,firstId:x,hasPending:w,matchRouteDeps:C,matchStores:a,pendingMatchStores:c,cachedMatchStores:u,__store:M,getRouteMatchStore:I,setMatches:K,setPending:dt,setCached:ne};K(t.matches),n?.(rt);function K(tt){so(tt,a,v,e,r)}i(K,"setMatches");function dt(tt){so(tt,c,R,e,r)}i(dt,"setPending");function ne(tt){so(tt,u,S,e,r)}return i(ne,"setCached"),rt}i(_r,"createRouterStores");function ro(t,o){let e=[];for(let s of o){let r=t.get(s);r&&e.push(r.get())}return e}i(ro,"readPoolMatches");function so(t,o,e,s,r){let n=t.map(c=>c.id),a=new Set(n);r(()=>{for(let c of o.keys())a.has(c)||o.delete(c);for(let c of t){let u=o.get(c.id);if(!u){let d=s(c);d.routeId=c.routeId,o.set(c.id,d);continue}u.routeId=c.routeId,u.get()!==c&&u.set(c)}rr(e.get(),n)||e.set(n)})}i(so,"reconcileMatchPool");var ao=i(t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},"triggerOnReady"),As=i(t=>t.stores.matchesId.get().some(o=>t.stores.matchStores.get(o)?.get()._forcePending),"hasForcePendingActiveMatch"),Pe=i((t,o)=>!!(t.preload&&!t.router.stores.matchStores.has(o)),"resolvePreload"),kt=i((t,o,e=!0)=>{let s={...t.router.options.context??{}},r=e?o:o-1;for(let n=0;n<=r;n++){let a=t.matches[n];if(!a)continue;let c=t.router.getMatch(a.id);c&&Object.assign(s,c.__routeContext,c.__beforeLoadContext)}return s},"buildMatchContext"),Cr=i((t,o)=>{if(!t.matches.length)return;let e=o.routeId,s=t.matches.findIndex(a=>a.routeId===t.router.routeTree.id),r=s>=0?s:0,n=e?t.matches.findIndex(a=>a.routeId===e):t.firstBadMatchIndex??t.matches.length-1;n<0&&(n=r);for(let a=n;a>=0;a--){let c=t.matches[a];if(t.router.looseRoutesById[c.routeId].options.notFoundComponent)return a}return e?n:r},"getNotFoundBoundaryIndex"),xt=i((t,o,e)=>{if(!(!H(e)&&!A(e)))throw H(e)&&e.redirectHandled&&!e.options.reloadDocument||(o&&(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.loaderPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loaderPromise=void 0,o._nonReactive.error=e,t.updateMatch(o.id,s=>({...s,status:H(e)?"redirected":A(e)?"notFound":s.status==="pending"?"success":s.status,context:kt(t,o.index),isFetching:!1,error:e})),A(e)&&!e.routeId&&(e.routeId=o.routeId),o._nonReactive.loadPromise?.resolve()),H(e)&&(t.rendered=!0,e.options._fromLocation=t.location,e.redirectHandled=!0,e=t.router.resolveRedirect(e))),e},"handleRedirectAndNotFound"),Ir=i((t,o)=>{let e=t.router.getMatch(o);return!!(!e||!!1&&e._nonReactive.dehydrated||!1)},"shouldSkipLoader"),br=i((t,o,e)=>{let s=kt(t,e);t.updateMatch(o,r=>({...r,context:s}))},"syncMatchContext"),te=i((t,o,e)=>{let{id:s,routeId:r}=t.matches[o],n=t.router.looseRoutesById[r];if(e instanceof Promise)throw e;t.firstBadMatchIndex??=o,xt(t,t.router.getMatch(s),e);try{n.options.onError?.(e)}catch(a){e=a,xt(t,t.router.getMatch(s),e)}t.updateMatch(s,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:e,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!H(e)&&!A(e)&&(t.serialError??=e)},"handleSerialError"),Bs=i((t,o,e,s)=>{let r=t.router.getMatch(o),n=t.matches[e-1]?.id,a=n?t.router.getMatch(n):void 0;if(t.router.isShell()){r.ssr=s.id===X;return}if(a?.ssr===!1){r.ssr=!1;return}let c=i(h=>h===!0&&a?.ssr==="data-only"?"data-only":h,"parentOverride"),u=t.router.options.defaultSsr??!0;if(s.options.ssr===void 0){r.ssr=c(u);return}if(typeof s.options.ssr!="function"){r.ssr=c(s.options.ssr);return}let{search:d,params:f}=r,l={search:Re(d,r.searchError),params:Re(f,r.paramsError),location:t.location,matches:t.matches.map(h=>({index:h.index,pathname:h.pathname,fullPath:h.fullPath,staticData:h.staticData,id:h.id,routeId:h.routeId,search:Re(h.search,h.searchError),params:Re(h.params,h.paramsError),ssr:h.ssr}))},p=s.options.ssr(l);if(vt(p))return p.then(h=>{r.ssr=c(h??u)});r.ssr=c(p??u)},"isBeforeLoadSsr"),Er=i((t,o,e,s)=>{if(s._nonReactive.pendingTimeout!==void 0)return;let r=e.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!!1&&!Pe(t,o)&&(e.options.loader||e.options.beforeLoad||uo(e))&&typeof r=="number"&&r!==1/0&&(e.options.pendingComponent??t.router.options?.defaultPendingComponent)){let n=setTimeout(()=>{ao(t)},r);s._nonReactive.pendingTimeout=n}},"setupPendingTimeout"),$s=i((t,o,e)=>{let s=t.router.getMatch(o);if(!s._nonReactive.beforeLoadPromise&&!s._nonReactive.loaderPromise)return;Er(t,o,e,s);let r=i(()=>{let n=t.router.getMatch(o);n.preload&&(n.status==="redirected"||n.status==="notFound")&&xt(t,n,n.error)},"then");return s._nonReactive.beforeLoadPromise?s._nonReactive.beforeLoadPromise.then(r):r()},"preBeforeLoadSetup"),Us=i((t,o,e,s)=>{let r=t.router.getMatch(o),n=r._nonReactive.loadPromise;r._nonReactive.loadPromise=ct(()=>{n?.resolve(),n=void 0});let{paramsError:a,searchError:c}=r;a&&te(t,e,a),c&&te(t,e,c),Er(t,o,s,r);let u=new AbortController,d=!1,f=i(()=>{d||(d=!0,t.updateMatch(o,P=>({...P,isFetching:"beforeLoad",fetchCount:P.fetchCount+1,abortController:u})))},"pending"),l=i(()=>{r._nonReactive.beforeLoadPromise?.resolve(),r._nonReactive.beforeLoadPromise=void 0,t.updateMatch(o,P=>({...P,isFetching:!1}))},"resolve");if(!s.options.beforeLoad){t.router.batch(()=>{f(),l()});return}r._nonReactive.beforeLoadPromise=ct();let p={...kt(t,e,!1),...r.__routeContext},{search:h,params:m,cause:y}=r,g=Pe(t,o),v={search:h,abortController:u,params:m,preload:g,context:p,location:t.location,navigate:i(P=>t.router.navigate({...P,_fromLocation:t.location}),"navigate"),buildLocation:t.router.buildLocation,cause:g?"preload":y,matches:t.matches,routeId:s.id,...t.router.options.additionalContext},R=i(P=>{if(P===void 0){t.router.batch(()=>{f(),l()});return}(H(P)||A(P))&&(f(),te(t,e,P)),t.router.batch(()=>{f(),t.updateMatch(o,_=>({..._,__beforeLoadContext:P})),l()})},"updateContext"),S;try{if(S=s.options.beforeLoad(v),vt(S))return f(),S.catch(P=>{te(t,e,P)}).then(R)}catch(P){f(),te(t,e,P)}R(S)},"executeBeforeLoad"),Hs=i((t,o)=>{let{id:e,routeId:s}=t.matches[o],r=t.router.looseRoutesById[s],n=i(()=>{if(!1){let u=Bs(t,e,o,r);if(vt(u))return u.then(c)}return c()},"serverSsr"),a=i(()=>Us(t,e,o,r),"execute"),c=i(()=>{if(Ir(t,e))return;let u=$s(t,e,r);return vt(u)?u.then(a):a()},"queueExecution");return n()},"handleBeforeLoad"),Vs=i((t,o,e)=>{let s=t.router.getMatch(o);if(!s||!e.options.head&&!e.options.scripts&&!e.options.headers)return;let r={ssr:t.router.options.ssr,matches:t.matches,match:s,params:s.params,loaderData:s.loaderData};return Promise.all([e.options.head?.(r),e.options.scripts?.(r),e.options.headers?.(r)]).then(([n,a,c])=>({meta:n?.meta,links:n?.links,headScripts:n?.scripts,headers:c,scripts:a,styles:n?.styles}))},"executeHead"),kr=i((t,o,e,s,r)=>{let n=o[s-1],{params:a,loaderDeps:c,abortController:u,cause:d}=t.router.getMatch(e),f=kt(t,s),l=Pe(t,e);return{params:a,deps:c,preload:!!l,parentMatchPromise:n,abortController:u,context:f,location:t.location,navigate:i(p=>t.router.navigate({...p,_fromLocation:t.location}),"navigate"),cause:l?"preload":d,route:r,...t.router.options.additionalContext}},"getLoaderContext"),Lr=i(async(t,o,e,s,r)=>{try{let n=t.router.getMatch(e);try{(!!1||n.ssr===!0)&&Ut(r);let a=r.options.loader,c=typeof a=="function"?a:a?.handler,u=c?.(kr(t,o,e,s,r)),d=!!c&&vt(u);if((d||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||n._nonReactive.minPendingPromise)&&t.updateMatch(e,l=>({...l,isFetching:"loader"})),c){let l=d?await u:u;xt(t,t.router.getMatch(e),l),l!==void 0&&t.updateMatch(e,p=>({...p,loaderData:l}))}r._lazyPromise&&await r._lazyPromise;let f=n._nonReactive.minPendingPromise;f&&await f,r._componentsPromise&&await r._componentsPromise,t.updateMatch(e,l=>({...l,error:void 0,context:kt(t,s),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let c=a;if(c?.name==="AbortError"){if(n.abortController.signal.aborted){n._nonReactive.loaderPromise?.resolve(),n._nonReactive.loaderPromise=void 0;return}t.updateMatch(e,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:kt(t,s)}));return}let u=n._nonReactive.minPendingPromise;u&&await u,A(a)&&await r.options.notFoundComponent?.preload?.(),xt(t,t.router.getMatch(e),a);try{r.options.onError?.(a)}catch(d){c=d,xt(t,t.router.getMatch(e),d)}!H(c)&&!A(c)&&await Ut(r,["errorComponent"]),t.updateMatch(e,d=>({...d,error:c,context:kt(t,s),status:"error",isFetching:!1}))}}catch(n){let a=t.router.getMatch(e);a&&(a._nonReactive.loaderPromise=void 0),xt(t,a,n)}},"runLoader"),Ws=i(async(t,o,e)=>{async function s(h,m,y,g,v){let R=Date.now()-m.updatedAt,S=h?v.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:v.options.staleTime??t.router.options.defaultStaleTime??0,P=v.options.shouldReload,_=typeof P=="function"?P(kr(t,o,r,e,v)):P,{status:b,invalid:x}=g,w=R>=S&&(!!t.forceStaleReload||g.cause==="enter"||y!==void 0&&y!==g.id);a=b==="success"&&(x||(_??w)),h&&v.options.preload===!1||(a&&!t.sync&&f?(c=!0,(async()=>{try{await Lr(t,o,r,e,v);let C=t.router.getMatch(r);C._nonReactive.loaderPromise?.resolve(),C._nonReactive.loadPromise?.resolve(),C._nonReactive.loaderPromise=void 0,C._nonReactive.loadPromise=void 0}catch(C){H(C)&&await t.router.navigate(C.options)}})()):b!=="success"||a?await Lr(t,o,r,e,v):br(t,r,e))}i(s,"handleLoader");let{id:r,routeId:n}=t.matches[e],a=!1,c=!1,u=t.router.looseRoutesById[n],d=u.options.loader,f=((typeof d=="function"?void 0:d?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(Ir(t,r)){if(!t.router.getMatch(r))return t.matches[e];if(br(t,r,e),!1)return t.router.getMatch(r)}else{let h=t.router.getMatch(r),m=t.router.stores.matchesId.get()[e],y=(m&&t.router.stores.matchStores.get(m)||null)?.routeId===n?m:t.router.stores.matches.get().find(v=>v.routeId===n)?.id,g=Pe(t,r);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!t.sync&&!h.preload&&f)return h;await h._nonReactive.loaderPromise;let v=t.router.getMatch(r),R=v._nonReactive.error||v.error;R&&xt(t,v,R),v.status==="pending"&&await s(g,h,y,v,u)}else{let v=g&&!t.router.stores.matchStores.has(r),R=t.router.getMatch(r);R._nonReactive.loaderPromise=ct(),v!==R.preload&&t.updateMatch(r,S=>({...S,preload:v})),await s(g,h,y,R,u)}}let l=t.router.getMatch(r);c||(l._nonReactive.loaderPromise?.resolve(),l._nonReactive.loadPromise?.resolve(),l._nonReactive.loadPromise=void 0),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,c||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0;let p=c?l.isFetching:!1;return p!==l.isFetching||l.invalid!==!1?(t.updateMatch(r,h=>({...h,isFetching:p,invalid:!1})),t.router.getMatch(r)):l},"loadRouteMatch");async function co(t){let o=t,e=[];!!1&&As(o.router)&&ao(o);let s;for(let p=0;p<o.matches.length;p++){try{let h=Hs(o,p);vt(h)&&await h}catch(h){if(H(h))throw h;if(A(h))s=h;else if(!o.preload)throw h;break}if(o.serialError||o.firstBadMatchIndex!=null)break}let r=o.firstBadMatchIndex??o.matches.length,n=s&&!o.preload?Cr(o,s):void 0,a=s&&o.preload?0:n!==void 0?Math.min(n+1,r):r,c,u;for(let p=0;p<a;p++)e.push(Ws(o,e,p));try{await Promise.all(e)}catch{let p=await Promise.allSettled(e);for(let h of p){if(h.status!=="rejected")continue;let m=h.reason;if(H(m))throw m;A(m)?c??=m:u??=m}if(u!==void 0)throw u}let d=c??(s&&!o.preload?s:void 0),f=o.firstBadMatchIndex!==void 0?o.firstBadMatchIndex:o.matches.length-1;if(!d&&s&&o.preload)return o.matches;if(d){let p=Cr(o,d);p===void 0&&$();let h=o.matches[p],m=o.router.looseRoutesById[h.routeId],y=o.router.options?.defaultNotFoundComponent;!m.options.notFoundComponent&&y&&(m.options.notFoundComponent=y),d.routeId=h.routeId;let g=h.routeId===o.router.routeTree.id;o.updateMatch(h.id,v=>({...v,...g?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:d},isFetching:!1})),f=p,await Ut(m,["notFoundComponent"])}else if(!o.preload){let p=o.matches[0];p.globalNotFound||o.router.getMatch(p.id)?.globalNotFound&&o.updateMatch(p.id,h=>({...h,globalNotFound:!1,error:void 0}))}if(o.serialError&&o.firstBadMatchIndex!==void 0){let p=o.router.looseRoutesById[o.matches[o.firstBadMatchIndex].routeId];await Ut(p,["errorComponent"])}for(let p=0;p<=f;p++){let{id:h,routeId:m}=o.matches[p],y=o.router.looseRoutesById[m];try{let g=Vs(o,h,y);if(g){let v=await g;o.updateMatch(h,R=>({...R,...v}))}}catch(g){console.error(`Error executing head for route ${m}:`,g)}}let l=ao(o);if(vt(l)&&await l,d)throw d;if(o.serialError&&!o.preload&&!o.onReady)throw o.serialError;return o.matches}i(co,"loadMatches");function Mr(t,o){let e=o.map(s=>t.options[s]?.preload?.()).filter(Boolean);if(e.length!==0)return Promise.all(e)}i(Mr,"preloadRouteComponents");function Ut(t,o=Se){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(s=>{let{id:r,...n}=s.options;Object.assign(t.options,n),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);let e=i(()=>t._componentsLoaded?void 0:o===Se?(()=>{if(t._componentsPromise===void 0){let s=Mr(t,Se);s?t._componentsPromise=s.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():Mr(t,o),"runAfterLazy");return t._lazyPromise?t._lazyPromise.then(e):e()}i(Ut,"loadRouteChunk");function Re(t,o){return o?{status:"error",error:o}:{status:"success",value:t}}i(Re,"makeMaybe");function uo(t){for(let o of Se)if(t.options[o]?.preload)return!0;return!1}i(uo,"routeNeedsPreload");var Se=["component","errorComponent","pendingComponent","notFoundComponent"];var wt="__TSR_index",Tr="popstate",Or="beforeunload";function fo(t){let o=t.getLocation(),e=new Set,s=i(a=>{o=t.getLocation(),e.forEach(c=>c({location:o,action:a}))},"notify"),r=i(a=>{t.notifyOnIndexChange??!0?s(a):o=t.getLocation()},"handleIndexChange"),n=i(async({task:a,navigateOpts:c,...u})=>{if(c?.ignoreBlocker??!1){a();return}let d=t.getBlockers?.()??[],f=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&d.length&&f)for(let l of d){let p=Ht(u.path,u.state);if(await l.blockerFn({currentLocation:o,nextLocation:p,action:u.type})){t.onBlocked?.();return}}a()},"tryNavigation");return{get location(){return o},get length(){return t.getLength()},subscribers:e,subscribe:i(a=>(e.add(a),()=>{e.delete(a)}),"subscribe"),push:i((a,c,u)=>{let d=o.state[wt];c=lo(d+1,c),n({task:i(()=>{t.pushState(a,c),s({type:"PUSH"})},"task"),navigateOpts:u,type:"PUSH",path:a,state:c})},"push"),replace:i((a,c,u)=>{let d=o.state[wt];c=lo(d,c),n({task:i(()=>{t.replaceState(a,c),s({type:"REPLACE"})},"task"),navigateOpts:u,type:"REPLACE",path:a,state:c})},"replace"),go:i((a,c)=>{n({task:i(()=>{t.go(a),r({type:"GO",index:a})},"task"),navigateOpts:c,type:"GO"})},"go"),back:i(a=>{n({task:i(()=>{t.back(a?.ignoreBlocker??!1),r({type:"BACK"})},"task"),navigateOpts:a,type:"BACK"})},"back"),forward:i(a=>{n({task:i(()=>{t.forward(a?.ignoreBlocker??!1),r({type:"FORWARD"})},"task"),navigateOpts:a,type:"FORWARD"})},"forward"),canGoBack:i(()=>o.state[wt]!==0,"canGoBack"),createHref:i(a=>t.createHref(a),"createHref"),block:i(a=>{if(!t.setBlockers)return()=>{};let c=t.getBlockers?.()??[];return t.setBlockers([...c,a]),()=>{let u=t.getBlockers?.()??[];t.setBlockers?.(u.filter(d=>d!==a))}},"block"),flush:i(()=>t.flush?.(),"flush"),destroy:i(()=>t.destroy?.(),"destroy"),notify:s}}i(fo,"createHistory");function lo(t,o){o||(o={});let e=po();return{...o,key:e,__TSR_key:e,[wt]:t}}i(lo,"assignKeyAndIndex");function ho(t){let o=t?.window??(typeof document<"u"?window:void 0),e=o.history.pushState,s=o.history.replaceState,r=[],n=i(()=>r,"_getBlockers"),a=i(w=>r=w,"_setBlockers"),c=t?.createHref??(w=>w),u=t?.parseLocation??(()=>Ht(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state));if(!o.history.state?.__TSR_key&&!o.history.state?.key){let w=po();o.history.replaceState({[wt]:0,key:w,__TSR_key:w},"")}let d=u(),f,l=!1,p=!1,h=!1,m=!1,y=i(()=>d,"getLocation"),g,v,R=i(()=>{g&&(x._ignoreSubscribers=!0,(g.isPush?o.history.pushState:o.history.replaceState)(g.state,"",g.href),x._ignoreSubscribers=!1,g=void 0,v=void 0,f=void 0)},"flush"),S=i((w,C,M)=>{let L=c(C);v||(f=d),d=Ht(C,M),g={href:L,state:M,isPush:g?.isPush||w==="push"},v||(v=Promise.resolve().then(()=>R()))},"queueHistoryAction"),P=i(w=>{d=u(),x.notify({type:w})},"onPushPop"),_=i(async()=>{if(p){p=!1;return}let w=u(),C=w.state[wt]-d.state[wt],M=C===1,L=C===-1,I=!M&&!L||l;l=!1;let rt=I?"GO":L?"BACK":"FORWARD",K=I?{type:"GO",index:C}:{type:L?"BACK":"FORWARD"};if(h)h=!1;else{let dt=n();if(typeof document<"u"&&dt.length){for(let ne of dt)if(await ne.blockerFn({currentLocation:d,nextLocation:w,action:rt})){p=!0,o.history.go(1),x.notify(K);return}}}d=u(),x.notify(K)},"onPushPopEvent"),b=i(w=>{if(m){m=!1;return}let C=!1,M=n();if(typeof document<"u"&&M.length)for(let L of M){let I=L.enableBeforeUnload??!0;if(I===!0){C=!0;break}if(typeof I=="function"&&I()===!0){C=!0;break}}if(C)return w.preventDefault(),w.returnValue=""},"onBeforeUnload"),x=fo({getLocation:y,getLength:i(()=>o.history.length,"getLength"),pushState:i((w,C)=>S("push",w,C),"pushState"),replaceState:i((w,C)=>S("replace",w,C),"replaceState"),back:i(w=>(w&&(h=!0),m=!0,o.history.back()),"back"),forward:i(w=>{w&&(h=!0),m=!0,o.history.forward()},"forward"),go:i(w=>{l=!0,o.history.go(w)},"go"),createHref:i(w=>c(w),"createHref"),flush:R,destroy:i(()=>{o.history.pushState=e,o.history.replaceState=s,o.removeEventListener(Or,b,{capture:!0}),o.removeEventListener(Tr,_)},"destroy"),onBlocked:i(()=>{f&&d!==f&&(d=f)},"onBlocked"),getBlockers:n,setBlockers:a,notifyOnIndexChange:!1});return o.addEventListener(Or,b,{capture:!0}),o.addEventListener(Tr,_),o.history.pushState=function(...w){let C=e.apply(o.history,w);return x._ignoreSubscribers||P("PUSH"),C},o.history.replaceState=function(...w){let C=s.apply(o.history,w);return x._ignoreSubscribers||P("REPLACE"),C},x}i(ho,"createBrowserHistory");function js(t={initialEntries:["/"]}){let o=t.initialEntries,e=t.initialIndex?Math.min(Math.max(t.initialIndex,0),o.length-1):o.length-1,s=o.map((u,d)=>lo(d,void 0)),r=i(()=>Ht(o[e],s[e]),"getLocation"),n=[];return fo({getLocation:r,getLength:i(()=>o.length,"getLength"),pushState:i((u,d)=>{e<o.length-1&&(o.splice(e+1),s.splice(e+1)),s.push(d),o.push(u),e=Math.max(o.length-1,0)},"pushState"),replaceState:i((u,d)=>{s[e]=d,o[e]=u},"replaceState"),back:i(()=>{e=Math.max(e-1,0)},"back"),forward:i(()=>{e=Math.min(e+1,o.length-1)},"forward"),go:i(u=>{e=Math.min(Math.max(e+u,0),o.length-1)},"go"),createHref:i(u=>u,"createHref"),getBlockers:i(()=>n,"_getBlockers"),setBlockers:i(u=>n=u,"_setBlockers")})}i(js,"createMemoryHistory");function zs(t){let o=t.replace(/[\x00-\x1f\x7f]/g,"");return o.startsWith("//")&&(o="/"+o.replace(/^\/+/,"")),o}i(zs,"sanitizePath");function Ht(t,o){let e=zs(t),s=e.indexOf("#"),r=e.indexOf("?"),n=po();return{href:e,pathname:e.substring(0,s>0?r>0?Math.min(s,r):s:r>0?r:e.length),hash:s>-1?e.substring(s):"",search:r>-1?e.slice(r,s===-1?void 0:s):"",state:o||{[wt]:0,key:n,__TSR_key:n}}}i(Ht,"parseHref");function po(){return(Math.random()+1).toString(36).substring(7)}i(po,"createRandomKey");function ht(t,o){let e=o,s=t;return{fromLocation:e,toLocation:s,pathChanged:e?.pathname!==s.pathname,hrefChanged:e?.href!==s.href,hashChanged:e?.hash!==s.hash}}i(ht,"getLocationChangeInfo");var mo=class{static{i(this,"RouterCore")}constructor(t,o){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let s=this.options,r=this.basepath??s?.basepath??"/",n=this.basepath===void 0,a=s?.rewrite;if(this.options={...s,...e},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=hr(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=ho()),this.origin=this.options.origin,this.origin||(!!1&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let f;if(!1){let l=globalThis.__TSR_CACHE__;this.resolvePathCache=l.resolvePathCache,f=l.processRouteTreeResult}else this.resolvePathCache=yt(1e3),f=this.buildRouteTree(),!1;this.setRoutes(f)}if(!this.stores&&this.latestLocation){let f=this.getStoreConfig(this);this.batch=f.batch,this.stores=_r(Fr(this.latestLocation),f),vr(this)}let c=!1,u=this.options.basepath??"/",d=this.options.rewrite;if(n||r!==u||a!==d){this.basepath=u;let f=[],l=Qt(u);l&&l!=="/"&&f.push(wr({basepath:u})),d&&f.push(d),this.rewrite=f.length===0?void 0:f.length===1?f[0]:xr(f),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=lr(this.routeTree,this.options.caseSensitive,(s,r)=>{s.init({originalIndex:r})});return this.options.routeMasks&&ir(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,s)=>{let r={eventType:e,fn:s};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=e=>{this.subscribers.forEach(s=>{s.eventType===e.type&&s.fn(e)})},this.parseLocation=(e,s)=>{let r=i(({pathname:u,search:d,hash:f,href:l,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(u)){let v=this.options.parseSearch(d),R=this.options.stringifySearch(v);return{href:u+R+f,publicHref:u+R+f,pathname:At(u).path,external:!1,searchStr:R,search:gt(s?.search,v),hash:At(f.slice(1)).path,state:at(s?.state,p)}}let h=new URL(l,this.origin),m=ye(this.rewrite,h),y=this.options.parseSearch(m.search),g=this.options.stringifySearch(y);return m.search=g,{href:m.href.replace(m.origin,""),publicHref:l,pathname:At(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:g,search:gt(s?.search,y),hash:At(m.hash.slice(1)).path,state:at(s?.state,p)}},"parse"),n=r(e),{__tempLocation:a,__tempKey:c}=n.state;if(a&&(!c||c===this.tempLocationKey)){let u=r(a);return u.state.key=n.state.key,u.state.__TSR_key=n.state.__TSR_key,delete u.state.__tempLocation,{...u,maskedLocation:n}}return n},this.resolvePathWithBase=(e,s)=>Qe({base:e,to:s.includes("//")?Zt(s):s,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,s,r)=>typeof e=="string"?this.matchRoutesInternal({pathname:e,search:s},r):this.matchRoutesInternal(e,s),this.getMatchedRoutes=e=>Ar({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let s=this.getMatch(e);s&&(s.abortController.abort(),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let s=this.stores.matchStores.get(e)?.get();s&&(s.status==="pending"||s.isFetching==="loader")&&this.cancelMatch(e)})},this.buildLocation=e=>{let s=i((n={})=>{let a=n._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(a);n.from;let u=n.unsafeRelative==="path"?a.pathname:n.from??c.fullPath,d=n.to?`${n.to}`:void 0,f=c.search,l=Object.assign(Object.create(null),c.params),p=d?.charCodeAt(0)===47?"/":this.resolvePathWithBase(u,"."),h=d?this.resolvePathWithBase(p,d):p,m=n.params===!1||n.params===null?Object.create(null):(n.params??!0)===!0?l:Object.assign(l,Y(n.params,l)),y=this.routesByPath[Z(h)],g;if(y)g=this.getRouteBranch(y);else if(h.includes("$"))g=[];else{let L=this.getMatchedRoutes(h);g=L.matchedRoutes,this.options.notFoundRoute&&(!L.foundRoute||L.foundRoute.path!=="/"&&L.routeParams["**"])&&(g=[...g,this.options.notFoundRoute])}if(g.length&&mt(m))for(let L of g){let I=L.options.params?.stringify??L.options.stringifyParams;if(I)try{Object.assign(m,I(m))}catch{}}let v=e.leaveParams?h:At(me({path:h,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,R=f;if(e._includeValidateSearch&&this.options.search?.strict){let L={};g.forEach(I=>{if(I.options.validateSearch)try{Object.assign(L,xe(I.options.validateSearch,{...L,...R}))}catch{}}),R=L}R=Ks({search:R,dest:n,destRoutes:g,_includeValidateSearch:e._includeValidateSearch}),R=gt(f,R);let S=this.options.stringifySearch(R),P=n.hash===!0?a.hash:n.hash?Y(n.hash,a.hash):void 0,_=P?`#${P}`:"",b=n.state===!0?a.state:n.state?Y(n.state,a.state):{};b=at(a.state,b);let x=`${v}${S}${_}`,w,C,M=!1;if(this.rewrite){let L=new URL(x,this.origin),I=oo(this.rewrite,L);w=L.href.replace(L.origin,""),I.origin!==this.origin?(C=I.href,M=!0):C=I.pathname+I.search+I.hash}else w=or(x),C=w;return{publicHref:C,href:w,pathname:v,search:R,searchStr:S,state:b,hash:P??"",external:M,unmaskOnReload:n.unmaskOnReload}},"build"),r=i((n={},a)=>{let c=s(n),u=a?s(a):void 0;if(!u){let d=Object.create(null);if(this.options.routeMasks){let f=ar(c.pathname,this.processedTree);if(f){Object.assign(d,f.rawParams);let{from:l,params:p,...h}=f.route,m=p===!1||p===null?Object.create(null):(p??!0)===!0?d:Object.assign(d,Y(p,d));a={from:e.from,...h,params:m},u=s(a)}}}return u&&(c.maskedLocation=u),c},"buildWithMatches");return e.mask?r(e,{from:e.from,...e.mask}):r(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:s,...r})=>{let n,a=i(()=>{let d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(l=>{r.state[l]=this.latestLocation.state[l]});let f=st(r.state,this.latestLocation.state);return d.forEach(l=>{delete r.state[l]}),f},"isSameState"),c=Z(this.latestLocation.href)===Z(r.href),u=this.commitLocationPromise;if(this.commitLocationPromise=ct(()=>{u?.resolve(),u=void 0}),c&&a())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...l}=r;d&&(l={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...l,search:l.searchStr,state:{...l.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(l.unmaskOnReload??this.options.unmaskOnReload??!1)&&(l.state.__tempKey=this.tempLocationKey)),l.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,n=r.replace?"REPLACE":"PUSH",this.history[n==="REPLACE"?"replace":"push"](l.publicHref,l.state,{ignoreBlocker:s})}return this._scroll.next=r.resetScroll??!0,this.history.subscribers.size||this.load(n?{action:{type:n}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:s,hashScrollIntoView:r,viewTransition:n,ignoreBlocker:a,href:c,...u}={})=>{if(c){let l=this.history.location.state.__TSR_index,p=Ht(c,{__TSR_index:e?l:l+1}),h=new URL(p.pathname,this.origin);u.to=ye(this.rewrite,h).pathname,u.search=this.options.parseSearch(p.search),u.hash=p.hash.slice(1)}let d=this.buildLocation({...u,_includeValidateSearch:!0});this.pendingBuiltLocation=d;let f=this.commitLocation({...d,viewTransition:n,replace:e,resetScroll:s,hashScrollIntoView:r,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===d&&(this.pendingBuiltLocation=void 0)}),f},this.navigate=async({to:e,reloadDocument:s,href:r,publicHref:n,...a})=>{let c=!1;if(r)try{new URL(`${r}`),c=!0}catch{}if(c&&!s&&(s=!0),s){if(e!==void 0||!r){let d=this.buildLocation({to:e,...a});r=r??d.publicHref,n=n??d.publicHref}let u=!c&&n?n:r;if(ut(u,this.protocolAllowlist))return;if(!a.ignoreBlocker){let d=this.history.getBlockers?.()??[];for(let f of d)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(u):window.location.href=u;return}return this.buildAndCommitLocation({...a,href:r,to:e,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),!1){let r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==r.publicHref){let n=this.getParsedLocationHref(r);throw r.external?$t({href:n}):$t({href:n,_builtLocation:r})}}let e=this.matchRoutes(this.latestLocation),s=this.stores.cachedMatches.get().filter(r=>!e.some(n=>n.id===r.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(s)})},this.load=async e=>{let s=e?.action?.type,r,n,a,c=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad(),s&&(this._scroll.hash=s==="PUSH"||s==="REPLACE");let f=this.latestLocation,l=ht(f,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...l}),this.emit({type:"onBeforeLoad",...l}),await co({router:this,sync:e?.sync,forceStaleReload:c.href===f.href,matches:this.stores.pendingMatches.get(),location:f,updateMatch:this.updateMatch,onReady:i(async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let p=null,h=null,m=null,y=null;this.batch(()=>{let g=this.stores.pendingMatches.get(),v=g.length,R=this.stores.matches.get();p=v?R.filter(_=>!this.stores.pendingMatchStores.has(_.id)):null;let S=new Set;for(let _ of this.stores.pendingMatchStores.values())_.routeId&&S.add(_.routeId);let P=new Set;for(let _ of this.stores.matchStores.values())_.routeId&&P.add(_.routeId);h=v?R.filter(_=>!S.has(_.routeId)):null,m=v?g.filter(_=>!P.has(_.routeId)):null,y=v?g.filter(_=>P.has(_.routeId)):R,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),v&&(this.stores.setMatches(g),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...p.filter(_=>_.status!=="error"&&_.status!=="notFound"&&_.status!=="redirected")]),this.clearExpiredCache())});for(let[g,v]of[[h,"onLeave"],[m,"onEnter"],[y,"onStay"]])if(g)for(let R of g)this.looseRoutesById[R.routeId].options[v]?.(R)})})},"onReady")})}catch(f){H(f)?(r=f,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):A(f)&&(n=f);let l=r?r.status:n?404:this.stores.matches.get().some(p=>p.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(l),this.stores.redirect.set(r)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.stores.matches.get().some(d=>d.status==="error")&&(u=500),u!==void 0&&this.stores.statusCode.set(u)},this.startViewTransition=e=>{let s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;if(typeof s=="object"&&this.isViewTransitionTypesSupported){let n=this.latestLocation,a=this.stores.resolvedLocation.get(),c=typeof s.types=="function"?s.types(ht(n,a)):s.types;if(c===!1){e();return}r={update:e,types:c}}else r=e;document.startViewTransition(r)}else e()},this.updateMatch=(e,s)=>{this.startTransition(()=>{let r=this.stores.pendingMatchStores.get(e);if(r){r.set(s);return}let n=this.stores.matchStores.get(e);if(n){n.set(s);return}let a=this.stores.cachedMatchStores.get(e);if(a){let c=s(a.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(u=>u.filter(d=>d!==e)):a.set(c)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let s=i(r=>e?.filter?.(r)??!0?{...r,invalid:!0,...e?.forcePending||r.status==="error"||r.status==="notFound"?{status:"pending",error:void 0}:void 0}:r,"invalidate");return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(s)),this.stores.setCached(this.stores.cachedMatches.get().map(s)),this.stores.setPending(this.stores.pendingMatches.get().map(s))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||"/",this.resolveRedirect=e=>{let s=e.headers.get("Location");if(!e.options.href||e.options._builtLocation){let r=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(r);e.options.href=n,e.headers.set("Location",n)}else if(s)try{let r=new URL(s);if(this.origin&&r.origin===this.origin){let n=r.pathname+r.search+r.hash;e.options.href=n,e.headers.set("Location",n)}}catch{}if(e.options.href&&!e.options._builtLocation&&ut(e.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return e.headers.get("Location")||e.headers.set("Location",e.options.href),e},this.clearCache=e=>{let s=e?.filter;s!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(r=>!s(r))):this.stores.setCached([])},this.clearExpiredCache=()=>{let e=Date.now(),s=i(r=>{let n=this.looseRoutesById[r.routeId];if(!n.options.loader)return!0;let a=(r.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:e-r.updatedAt>=a},"filter");this.clearCache({filter:s})},this.loadRouteChunk=Ut,this.preloadRoute=async e=>{let s=e._builtLocation??this.buildLocation(e),r=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:e}),n=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...n,...this.stores.cachedIds.get()]),c=r.filter(u=>!a.has(u.id));if(c.length){let u=this.stores.cachedMatches.get();this.stores.setCached([...u,...c])}try{return r=await co({router:this,matches:r,location:s,preload:!0,updateMatch:i((u,d)=>{n.has(u)?r=r.map(f=>f.id===u?d(f):f):this.updateMatch(u,d)},"updateMatch")}),r}catch(u){if(H(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:s});A(u)||console.error(u);return}},this.matchRoute=(e,s)=>{let r={...e,to:e.to?this.resolvePathWithBase(e.from||"",e.to):void 0,params:e.params||{},leaveParams:!0},n=this.buildLocation(r);if(s?.pending&&this.stores.status.get()!=="pending")return!1;let a=(s?.pending===void 0?!this.stores.isLoading.get():s.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=cr(n.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,a.pathname,this.processedTree);return!c||e.params&&!st(c.rawParams,e.params,{partial:!0})?!1:s?.includeSearch??!0?st(a.search,n.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status==="notFound"||e.globalNotFound),this.getStoreConfig=o,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Pr,parseSearch:t.parseSearch??Sr,protocolAllowlist:t.protocolAllowlist??qe}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:o,processedTree:e}){this.routesById=t,this.routesByPath=o,this.processedTree=e;let s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)}getRouteBranch(t){let o=this.routeBranchCache.get(t);return o||(o=Ze(t),this.routeBranchCache.set(t,o)),o}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,o){let e=this.getMatchedRoutes(t.pathname),{foundRoute:s,routeParams:r}=e,{matchedRoutes:n}=e,a=!1;(s?s.path!=="/"&&r["**"]:Z(t.pathname))&&(this.options.notFoundRoute?n=[...n,this.options.notFoundRoute]:a=!0);let c=a?Gs(this.options.notFoundMode,n):void 0,u=new Array(n.length),d=new Map;for(let f of this.stores.matchStores.values())f.routeId&&d.set(f.routeId,f.get());for(let f=0;f<n.length;f++){let l=n[f],p=u[f-1],h,m,y;{let I=p?.search??t.search,rt=p?._strictSearch??void 0;try{let K=xe(l.options.validateSearch,{...I})??void 0;h={...I,...K},m={...rt,...K},y=void 0}catch(K){let dt=K;if(K instanceof ee||(dt=new ee(K.message,{cause:K})),o?.throwOnError)throw dt;h=I,m={},y=dt}}let g=l.options.loaderDeps?.({search:h})??"",v=g?JSON.stringify(g):"",{interpolatedPath:R,usedParams:S}=me({path:l.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),P=l.id+R+v,_=this.getMatch(P),b=d.get(l.id),x=_?._strictParams??S,w;if(!_)try{Nr(l,x)}catch(I){if(A(I)||H(I)?w=I:w=new Dr(I.message,{cause:I}),o?.throwOnError)throw w}Object.assign(r,x);let C=b?"stay":"enter",M;if(_)M={..._,cause:C,params:b?.params??r,_strictParams:x,search:b?gt(b.search,h):gt(_.search,h),_strictSearch:m};else{let I=l.options.loader||l.options.beforeLoad||l.lazyFn||uo(l)?"pending":"success";M={id:P,ssr:l.options.ssr,index:f,routeId:l.id,params:b?.params??r,_strictParams:x,pathname:R,updatedAt:Date.now(),search:b?gt(b.search,h):h,_strictSearch:m,searchError:void 0,status:I,isFetching:!1,error:void 0,paramsError:w,__routeContext:void 0,_nonReactive:{loadPromise:ct()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:C,loaderDeps:b?at(b.loaderDeps,g):g,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:l.options.staticData||{},fullPath:l.fullPath}}o?.preload||(M.globalNotFound=c===l.id),M.searchError=y;let L=this.getParentContext(p);M.context={...L,...M.__routeContext,...M.__beforeLoadContext},u[f]=M}for(let f=0;f<u.length;f++){let l=u[f],p=this.looseRoutesById[l.routeId],h=this.getMatch(l.id),m=d.get(l.routeId);if(l.params=m?gt(m.params,r):r,!h){let y=u[f-1],g=this.getParentContext(y);if(p.options.context){let v={deps:l.loaderDeps,params:l.params,context:g??{},location:t,navigate:i(R=>this.navigate({...R,_fromLocation:t}),"navigate"),buildLocation:this.buildLocation,cause:l.cause,abortController:l.abortController,preload:!!l.preload,matches:u,routeId:p.id};l.__routeContext=p.options.context(v)??void 0}l.context={...g,...l.__routeContext,...l.__beforeLoadContext}}}return u}matchRoutesLightweight(t){let o=pt(this.stores.matchesId.get()),e=this.lightweightCache.get(t);if(e&&e[0]===o)return e[1];let{matchedRoutes:s,routeParams:r}=this.getMatchedRoutes(t.pathname),n=pt(s),a={...t.search};for(let l of s)try{Object.assign(a,xe(l.options.validateSearch,a))}catch{}let c=o&&this.stores.matchStores.get(o)?.get(),u=c&&c.routeId===n.id&&c.pathname===t.pathname,d;if(u)d=c.params;else{let l=Object.assign(Object.create(null),r);for(let p of s)try{Nr(p,l)}catch{}d=l}let f={matchedRoutes:s,fullPath:n.fullPath,search:a,params:d};return this.lightweightCache.set(t,[o,f]),f}},ee=class extends Error{static{i(this,"SearchParamError")}},Dr=class extends Error{static{i(this,"PathParamError")}};function Fr(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}i(Fr,"getInitialRouterState");function xe(t,o){if(t==null)return{};if("~standard"in t){let e=t["~standard"].validate(o);if(e instanceof Promise)throw new ee("Async validation not supported");if(e.issues)throw new ee(JSON.stringify(e.issues,void 0,2),{cause:e});return e.value}return"parse"in t?t.parse(o):typeof t=="function"?t(o):{}}i(xe,"validateSearch");function Ar({pathname:t,routesById:o,processedTree:e}){let s=Object.create(null),r=Z(t),n,a=ur(r,e,!0);return a&&(n=a.route,Object.assign(s,a.rawParams)),{matchedRoutes:a?.branch||[o.__root__],routeParams:s,foundRoute:n}}i(Ar,"getMatchedRoutes");function Ks({search:t,dest:o,destRoutes:e,_includeValidateSearch:s}){return qs(e)(t,o,s??!1)}i(Ks,"applySearchMiddleware");function qs(t){let o,e,s=[];for(let n of t){let a=n.options;if("search"in a)a.search?.middlewares&&s.push(...a.search.middlewares);else if(a.preSearchFilters||a.postSearchFilters){let u=i(({search:d,next:f})=>{let l=f(a.preSearchFilters?a.preSearchFilters.reduce((p,h)=>h(p),d):d);return a.postSearchFilters?a.postSearchFilters.reduce((p,h)=>h(p),l):l},"legacyMiddleware");s.push(u)}let c=a.validateSearch;if(c){let u=i(({search:d,next:f,meta:l})=>{let p=f(d);if(e)try{let h=xe(c,p);if(l&&h)for(let m in h)m in p||(l.defaulted||=new Map).set(m,h[m]);return{...p,...h}}catch{}return p},"validate");s.push(u)}}let r=i((n,a,c)=>{if(n>=s.length){if(!o.search)return{};if(o.search===!0)return a;let d=Y(o.search,a);return c&&(c.explicit=d),d}let u=i((d,f)=>{if(f){let l=c||{};return{search:r(n+1,d,l),meta:l}}return r(n+1,d,c)},"next");return s[n]({search:a,next:u,meta:c})},"applyNext");return i(function(a,c,u){return o=c,e=u,r(0,a)},"middleware")}i(qs,"buildMiddlewareChain");function Gs(t,o){if(t!=="root")for(let e=o.length-1;e>=0;e--){let s=o[e];if(s.children)return s.id}return X}i(Gs,"findGlobalNotFoundRouteId");function Nr(t,o){let e=t.options.params?.parse??t.options.parseParams;if(e){let s=e(o);if(s===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(o,s)}}i(Nr,"extractStrictParams");var go="Error preloading route! \u261D\uFE0F";var we=class{static{i(this,"BaseRoute")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=o=>{this.originalIndex=o.originalIndex;let e=this.options,s=!e?.path&&!e?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=X:this.parentRoute||$();let r=s?X:e?.path;r&&r!=="/"&&(r=he(r));let n=e?.id||r,a=s?X:Et([this.parentRoute.id==="__root__"?"":this.parentRoute.id,n]);r==="__root__"&&(r="/"),a!=="__root__"&&(a=Et(["/",a]));let c=a==="__root__"?"/":Et([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=c,this._to=Z(c)},this.addChildren=o=>this._addFileChildren(o),this._addFileChildren=o=>(Array.isArray(o)&&(this.children=o),typeof o=="object"&&o!==null&&(this.children=Object.values(o)),this),this._addFileTypes=()=>this,this.updateLoader=o=>(Object.assign(this.options,o),this),this.update=o=>(Object.assign(this.options,o),this),this.lazy=o=>(this.lazyFn=o,this),this.redirect=o=>$t({from:this.fullPath,...o}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}};var vo=class extends we{static{i(this,"BaseRootRoute")}constructor(t){super(t)}};var Me=k(W(),1);var F=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(F||{});function Br({update:t,notify:o,unwatched:e}){return{link:s,unlink:r,propagate:n,checkDirty:a,shallowPropagate:c};function s(d,f,l){let p=f.depsTail;if(p!==void 0&&p.dep===d)return;let h=p!==void 0?p.nextDep:f.deps;if(h!==void 0&&h.dep===d){h.version=l,f.depsTail=h;return}let m=d.subsTail;if(m!==void 0&&m.version===l&&m.sub===f)return;let y=f.depsTail=d.subsTail={version:l,dep:d,sub:f,prevDep:p,nextDep:h,prevSub:m,nextSub:void 0};h!==void 0&&(h.prevDep=y),p!==void 0?p.nextDep=y:f.deps=y,m!==void 0?m.nextSub=y:d.subs=y}function r(d,f=d.sub){let l=d.dep,p=d.prevDep,h=d.nextDep,m=d.nextSub,y=d.prevSub;return h!==void 0?h.prevDep=p:f.depsTail=p,p!==void 0?p.nextDep=h:f.deps=h,m!==void 0?m.prevSub=y:l.subsTail=y,y!==void 0?y.nextSub=m:(l.subs=m)===void 0&&e(l),h}function n(d){let f=d.nextSub,l;t:do{let p=d.sub,h=p.flags;if(h&60?h&12?h&4?!(h&48)&&u(d,p)?(p.flags=h|40,h&=1):h=0:p.flags=h&-9|32:h=0:p.flags=h|32,h&2&&o(p),h&1){let m=p.subs;if(m!==void 0){let y=(d=m).nextSub;y!==void 0&&(l={value:f,prev:l},f=y);continue}}if((d=f)!==void 0){f=d.nextSub;continue}for(;l!==void 0;)if(d=l.value,l=l.prev,d!==void 0){f=d.nextSub;continue t}break}while(!0)}function a(d,f){let l,p=0,h=!1;t:do{let m=d.dep,y=m.flags;if(f.flags&16)h=!0;else if((y&17)===17){if(t(m)){let g=m.subs;g.nextSub!==void 0&&c(g),h=!0}}else if((y&33)===33){(d.nextSub!==void 0||d.prevSub!==void 0)&&(l={value:d,prev:l}),d=m.deps,f=m,++p;continue}if(!h){let g=d.nextDep;if(g!==void 0){d=g;continue}}for(;p--;){let g=f.subs,v=g.nextSub!==void 0;if(v?(d=l.value,l=l.prev):d=g,h){if(t(f)){v&&c(g),f=d.sub;continue}h=!1}else f.flags&=-33;f=d.sub;let R=d.nextDep;if(R!==void 0){d=R;continue t}}return h}while(!0)}function c(d){do{let f=d.sub,l=f.flags;(l&48)===32&&(f.flags=l|16,(l&6)===2&&o(f))}while((d=d.nextSub)!==void 0)}function u(d,f){let l=f.depsTail;for(;l!==void 0;){if(l===d)return!0;l=l.prevDep}return!1}}i(Br,"createReactiveSystem");function Hr(t,o,e){let s=typeof t=="object",r=s?t:void 0;return{next:(s?t.next:t)?.bind(r),error:(s?t.error:o)?.bind(r),complete:(s?t.complete:e)?.bind(r)}}i(Hr,"toObserver");var yo=[],Ce=0,{link:$r,unlink:Xs,propagate:Zs,checkDirty:Vr,shallowPropagate:Ur}=Br({update(t){return t._update()},notify(t){yo[Ro++]=t,t.flags&=~F.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=F.Mutable|F.Dirty,be(t))}}),_e=0,Ro=0,lt,So=0;function oe(t){try{++So,t()}finally{--So||Po()}}i(oe,"batch");function be(t){let o=t.depsTail,e=o!==void 0?o.nextDep:t.deps;for(;e!==void 0;)e=Xs(e,t)}i(be,"purgeDeps");function Po(){if(!(So>0)){for(;_e<Ro;){let t=yo[_e];yo[_e++]=void 0,t.notify()}_e=0,Ro=0}}i(Po,"flush");function Le(t,o){let e=typeof t=="function",s=t,r={_snapshot:e?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:e?F.None:F.Mutable,get(){return lt!==void 0&&$r(r,lt,Ce),r._snapshot},subscribe(n){let a=Hr(n),c={current:!1},u=Qs(()=>{r.get(),c.current?a.next?.(r._snapshot):c.current=!0});return{unsubscribe:i(()=>{u.stop()},"unsubscribe")}},_update(n){let a=lt,c=o?.compare??Object.is;if(e)lt=r,++Ce,r.depsTail=void 0;else if(n===void 0)return!1;e&&(r.flags=F.Mutable|F.RecursedCheck);try{let u=r._snapshot,d=typeof n=="function"?n(u):n===void 0&&e?s(u):n;return u===void 0||!c(u,d)?(r._snapshot=d,!0):!1}finally{lt=a,e&&(r.flags&=~F.RecursedCheck),be(r)}}};return e?(r.flags=F.Mutable|F.Dirty,r.get=function(){let n=r.flags;if(n&F.Dirty||n&F.Pending&&Vr(r.deps,r)){if(r._update()){let a=r.subs;a!==void 0&&Ur(a)}}else n&F.Pending&&(r.flags=n&~F.Pending);return lt!==void 0&&$r(r,lt,Ce),r._snapshot}):r.set=function(n){if(r._update(n)){let a=r.subs;a!==void 0&&(Zs(a),Ur(a),Po())}},r}i(Le,"createAtom");function Qs(t){let o=i(()=>{let s=lt;lt=e,++Ce,e.depsTail=void 0,e.flags=F.Watching|F.RecursedCheck;try{return t()}finally{lt=s,e.flags&=~F.RecursedCheck,be(e)}},"run"),e={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:F.Watching|F.RecursedCheck,notify(){let s=this.flags;s&F.Dirty||s&F.Pending&&Vr(this.deps,this)?o():this.flags=F.Watching},stop(){this.flags=F.None,this.depsTail=void 0,be(this)}};return o(),e}i(Qs,"effect");var xo=k(W(),1),Wr=k(Rs(),1);function tn(t,o){return t===o}i(tn,"defaultCompare");function B(t,o,e=tn){let s=(0,xo.useCallback)(a=>{if(!t)return()=>{};let{unsubscribe:c}=t.subscribe(a);return c},[t]),r=(0,xo.useCallback)(()=>t?.get(),[t]);return(0,Wr.useSyncExternalStoreWithSelector)(s,r,r,o,e)}i(B,"useStore");var wo={get(){},subscribe(){return{unsubscribe(){}}}};function _o(t,o){let e=Me.useRef();return s=>{let r=t?.select?t.select(s):s;return t?.structuralSharing??o.options.defaultStructuralSharing?e.current=at(e.current,r):r}}i(_o,"useStructuralSharing");function Q(t){let o=D(),e=Me.useContext(t.from?Yo:Mt),s=t.from?o.stores.getRouteMatchStore(t.from):o.stores.matchStores.get(e);if(!1){let a=s?.get();if(!a){(t.shouldThrow??!0)&&$();return}return t.select?t.select(a):a}let r=_o(t,o),n=B(s??wo,a=>a?r(a):wo);if(n!==wo)return n;(t.shouldThrow??!0)&&$()}i(Q,"useMatch");function Ie(t){return Q({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:i(o=>t.select?t.select(o.search):o.search,"select")})}i(Ie,"useSearch");var nt=k(W(),1);var Tt=typeof window<"u"?nt.useLayoutEffect:nt.useEffect;function Ee(t){let o=nt.useRef({value:t,prev:null}),e=o.current.value;return t!==e&&(o.current={value:t,prev:e}),o.current.prev}i(Ee,"usePrevious");function jr(t,o,e={},s={}){nt.useEffect(()=>{if(!t.current||s.disabled||typeof IntersectionObserver!="function")return;let r=new IntersectionObserver(([n])=>{o(n)},e);return r.observe(t.current),()=>{r.disconnect()}},[o,e,s.disabled,t])}i(jr,"useIntersectionObserver");function zr(t){let o=nt.useRef(null);return nt.useImperativeHandle(t,()=>o.current,[]),o}i(zr,"useForwardedRef");var Co=k(W(),1);function ke(t){let o=D();return Co.useCallback(e=>o.navigate({...e,from:e.from??t?.from}),[t?.from,o])}i(ke,"useNavigate");var Vt=k(W(),1),it=k(ot(),1);function Ot(t){let o=t.errorComponent??Nt;return(0,it.jsx)(en,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:i(({error:e,reset:s})=>e?Vt.createElement(o,{error:e,reset:s}):t.children,"children")})}i(Ot,"CatchBoundary");var en=class extends Vt.Component{static{i(this,"CatchBoundaryImpl")}constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,o){let e=t.getResetKey();return o.error&&o.resetKey!==e?{resetKey:e,error:null}:{resetKey:e}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,o){this.props.onCatch&&this.props.onCatch(t,o)}render(){return this.props.children({error:this.state.error,reset:i(()=>{this.reset()},"reset")})}};function Nt({error:t}){let[o,e]=Vt.useState(!1);return(0,it.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,it.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,it.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,it.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:i(()=>e(s=>!s),"onClick"),children:o?"Hide Error":"Show Error"})]}),(0,it.jsx)("div",{style:{height:".25rem"}}),o?(0,it.jsx)("div",{children:(0,it.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?(0,it.jsx)("code",{children:t.message}):null})}):null]})}i(Nt,"ErrorComponent");var Te=k(W(),1),bo=k(ot(),1);function Kr({children:t,fallback:o=null}){return Lo()?(0,bo.jsx)(Te.default.Fragment,{children:t}):(0,bo.jsx)(Te.default.Fragment,{children:o})}i(Kr,"ClientOnly");function Lo(){return Te.default.useSyncExternalStore(on,()=>!0,()=>!1)}i(Lo,"useHydrated");function on(){return()=>{}}i(on,"subscribe");function Mo(t){return Q({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:i(o=>t.select?t.select(o.loaderData):o.loaderData,"select")})}i(Mo,"useLoaderData");function Io(t){let{select:o,...e}=t;return Q({...e,select:i(s=>o?o(s.loaderDeps):s.loaderDeps,"select")})}i(Io,"useLoaderDeps");function Eo(t){return Q({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:i(o=>{let e=t.strict===!1?o.params:o._strictParams;return t.select?t.select(e):e},"select")})}i(Eo,"useParams");function ko(t){return Q({...t,select:i(o=>t.select?t.select(o.context):o.context,"select")})}i(ko,"useRouteContext");var U=k(W(),1),rn=k(ot(),1);var Zr=k(ys(),1);function sn(t,o){let e=D(),s=zr(o),r=!1,{activeProps:n,inactiveProps:a,activeOptions:c,to:u,preload:d,preloadDelay:f,preloadIntentProximity:l,hashScrollIntoView:p,replace:h,startTransition:m,resetScroll:y,viewTransition:g,children:v,target:R,disabled:S,style:P,className:_,onClick:b,onBlur:x,onFocus:w,onMouseEnter:C,onMouseLeave:M,onTouchStart:L,ignoreBlocker:I,params:rt,search:K,hash:dt,state:ne,mask:tt,reloadDocument:zt,unsafeRelative:Fo,from:Ao,_fromLocation:ie,...Dt}=t;if(r){let O=Xr(u);if(typeof u=="string"&&!O&&u.indexOf(":")>-1)try{return new URL(u),ut(u,e.protocolAllowlist)?{...Dt,ref:s,href:void 0,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_}}:{...Dt,ref:s,href:u,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_}}}catch{}let T=e.buildLocation({...t,from:t.from}),et=Yr(T.maskedLocation?T.maskedLocation.publicHref:T.publicHref,T.maskedLocation?T.maskedLocation.external:T.external,e.history,S),Jt=(()=>{if(et?.external)return ut(et.href,e.protocolAllowlist)?void 0:et.href;if(!O&&typeof u=="string"&&u.indexOf(":")>-1)try{return new URL(u),ut(u,e.protocolAllowlist)?void 0:u}catch{}})(),Ve=(()=>{if(Jt)return!1;let V=e.stores.location.get(),G=c?.exact??!1;if(G){if(!pe(V.pathname,T.pathname,e.basepath))return!1}else{let j=Pt(V.pathname,e.basepath),J=Pt(T.pathname,e.basepath);if(!(j.startsWith(J)&&(j.length===J.length||j[J.length]==="/")))return!1}if((c?.includeSearch??!0)&&V.search!==T.search){let j=!V.search||typeof V.search=="object"&&!mt(V.search),J=!T.search||typeof T.search=="object"&&!mt(T.search);if(!(j&&J)&&!st(V.search,T.search,{partial:!G,ignoreUndefined:!c?.explicitUndefined}))return!1}return!c?.includeHash})();if(Jt)return{...Dt,ref:s,href:Jt,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_}};let We=Ve?Y(n,{})??qr:Wt,je=Ve?Wt:Y(a,{})??Wt,Ko=(()=>{let V=P,G=We.style,j=je.style;if(!(!V&&!G&&!j))return V&&!G&&!j?V:!V&&G&&!j?G:!V&&!G&&j?j:{...V,...G,...j}})(),qo=(()=>{let V=_,G=We.className,j=je.className;if(!V&&!G&&!j)return"";let J="";return V&&(J=V),G&&(J=J?`${J} ${G}`:G),j&&(J=J?`${J} ${j}`:j),J})();return{...Dt,...We,...je,href:et?.href,ref:s,disabled:!!S,target:R,...Ko&&{style:Ko},...qo&&{className:qo},...S&&Gr,...Ve&&Jr}}let $e=Lo(),Kt=U.useMemo(()=>t,[e,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),bt=B(e.stores.location,O=>O,(O,T)=>O.href===T.href),q=U.useMemo(()=>{let O={_fromLocation:bt,...Kt};return e.buildLocation(O)},[e,bt,Kt]),Bo=q.maskedLocation?q.maskedLocation.publicHref:q.publicHref,$o=q.maskedLocation?q.maskedLocation.external:q.external,qt=U.useMemo(()=>Yr(Bo,$o,e.history,S),[S,$o,Bo,e.history]),Gt=U.useMemo(()=>{if(qt?.external)return ut(qt.href,e.protocolAllowlist)?void 0:qt.href;if(!Xr(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),ut(u,e.protocolAllowlist)?void 0:u}catch{}},[u,qt,e.protocolAllowlist]),Ue=U.useMemo(()=>{if(Gt)return!1;if(c?.exact){if(!pe(bt.pathname,q.pathname,e.basepath))return!1}else{let O=Pt(bt.pathname,e.basepath),T=Pt(q.pathname,e.basepath);if(!(O.startsWith(T)&&(O.length===T.length||O[T.length]==="/")))return!1}return(c?.includeSearch??!0)&&!st(bt.search,q.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?$e&&bt.hash===q.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,bt,Gt,$e,q.hash,q.pathname,q.search,e.basepath]),ae=Ue?Y(n,{})??qr:Wt,ce=Ue?Wt:Y(a,{})??Wt,Uo=[_,ae.className,ce.className].filter(Boolean).join(" "),Ho=(P||ae.style||ce.style)&&{...P,...ae.style,...ce.style},[ms,Vo]=U.useState(!1),Wo=U.useRef(!1),Ft=t.reloadDocument||Gt?!1:d??e.options.defaultPreload,He=f??e.options.defaultPreloadDelay??0,Lt=U.useCallback(()=>{e.preloadRoute({...Kt,_builtLocation:q}).catch(O=>{console.warn(O),console.warn(go)})},[e,Kt,q]);jr(s,U.useCallback(O=>{O?.isIntersecting&&Lt()},[Lt]),an,{disabled:!!S||Ft!=="viewport"}),U.useEffect(()=>{Wo.current||!S&&Ft==="render"&&(Lt(),Wo.current=!0)},[S,Lt,Ft]);let gs=i(O=>{let T=O.currentTarget.getAttribute("target"),et=R!==void 0?R:T;if(!S&&!cn(O)&&!O.defaultPrevented&&(!et||et==="_self")&&O.button===0){O.preventDefault(),(0,Zr.flushSync)(()=>{Vo(!0)});let Jt=e.subscribe("onResolved",()=>{Jt(),Vo(!1)});e.navigate({...Kt,replace:h,resetScroll:y,hashScrollIntoView:p,startTransition:m,viewTransition:g,ignoreBlocker:I})}},"handleClick");if(Gt)return{...Dt,ref:s,href:Gt,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_},...b&&{onClick:b},...x&&{onBlur:x},...w&&{onFocus:w},...C&&{onMouseEnter:C},...M&&{onMouseLeave:M},...L&&{onTouchStart:L}};let jo=i(O=>{if(S||Ft!=="intent")return;if(!He){Lt();return}let T=O.currentTarget;if(re.has(T))return;let et=setTimeout(()=>{re.delete(T),Lt()},He);re.set(T,et)},"enqueueIntentPreload"),vs=i(O=>{S||Ft!=="intent"||Lt()},"handleTouchStart"),zo=i(O=>{if(S||!Ft||!He)return;let T=O.currentTarget,et=re.get(T);et&&(clearTimeout(et),re.delete(T))},"handleLeave");return{...Dt,...ae,...ce,href:qt?.href,ref:s,onClick:jt([b,gs]),onBlur:jt([x,zo]),onFocus:jt([w,jo]),onMouseEnter:jt([C,jo]),onMouseLeave:jt([M,zo]),onTouchStart:jt([L,vs]),disabled:!!S,target:R,...Ho&&{style:Ho},...Uo&&{className:Uo},...S&&Gr,...Ue&&Jr,...$e&&ms&&nn}}i(sn,"useLinkProps");var Wt={},qr={className:"active"},Gr={role:"link","aria-disabled":!0},Jr={"data-status":"active","aria-current":"page"},nn={"data-transitioning":"transitioning"},re=new WeakMap,an={rootMargin:"100px"},jt=i(t=>o=>{for(let e of t)if(e){if(o.defaultPrevented)return;e(o)}},"composeHandlers");function Yr(t,o,e,s){if(!s)return o?{href:t,external:!0}:{href:e.createHref(t)||"/",external:!1}}i(Yr,"getHrefOption");function Xr(t){if(typeof t!="string")return!1;let o=t.charCodeAt(0);return o===47?t.charCodeAt(1)!==47:o===46}i(Xr,"isSafeInternal");var To=U.forwardRef((t,o)=>{let{_asChild:e,...s}=t,{type:r,...n}=sn(s,o),a=typeof s.children=="function"?s.children({isActive:n["data-status"]==="active"}):s.children;if(!e){let{disabled:c,...u}=n;return U.createElement("a",u,a)}return U.createElement(e,n,a)});function cn(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}i(cn,"isCtrlEvent");var Oo=k(W(),1),No=k(ot(),1);var Qr=class extends we{static{i(this,"Route")}constructor(t){super(t),this.useMatch=o=>Q({select:o?.select,from:this.id,structuralSharing:o?.structuralSharing}),this.useRouteContext=o=>ko({...o,from:this.id}),this.useSearch=o=>Ie({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useParams=o=>Eo({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useLoaderDeps=o=>Io({...o,from:this.id}),this.useLoaderData=o=>Mo({...o,from:this.id}),this.useNavigate=()=>ke({from:this.fullPath}),this.Link=Oo.default.forwardRef((o,e)=>(0,No.jsx)(To,{ref:e,from:this.fullPath,...o}))}};function un(t){return new Qr(t)}i(un,"createRoute");var ts=class extends vo{static{i(this,"RootRoute")}constructor(t){super(t),this.useMatch=o=>Q({select:o?.select,from:this.id,structuralSharing:o?.structuralSharing}),this.useRouteContext=o=>ko({...o,from:this.id}),this.useSearch=o=>Ie({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useParams=o=>Eo({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useLoaderDeps=o=>Io({...o,from:this.id}),this.useLoaderData=o=>Mo({...o,from:this.id}),this.useNavigate=()=>ke({from:this.fullPath}),this.Link=Oo.default.forwardRef((o,e)=>(0,No.jsx)(To,{ref:e,from:this.fullPath,...o}))}};function ln(t){return new ts(t)}i(ln,"createRootRoute");var Rc=k(W(),1),Oe=k(ot(),1);function es(t){let o=D();if(!1){let s=`not-found-${o.stores.location.get().pathname}-${o.stores.status.get()}`;return(0,Oe.jsx)(Ot,{getResetKey:i(()=>s,"getResetKey"),onCatch:i((r,n)=>{if(A(r))t.onCatch?.(r,n);else throw r},"onCatch"),errorComponent:i(({error:r})=>{if(A(r))return t.fallback?.(r);throw r},"errorComponent"),children:t.children})}let e=`not-found-${B(o.stores.location,s=>s.pathname)}-${B(o.stores.status,s=>s)}`;return(0,Oe.jsx)(Ot,{getResetKey:i(()=>e,"getResetKey"),onCatch:i((s,r)=>{if(A(s))t.onCatch?.(s,r);else throw s},"onCatch"),errorComponent:i(({error:s})=>{if(A(s))return t.fallback?.(s);throw s},"errorComponent"),children:t.children})}i(es,"CatchNotFound");function os(){return(0,Oe.jsx)("p",{children:"Not Found"})}i(os,"DefaultGlobalNotFound");var rs=k(ot(),1);function ss({children:t}){let o=D();return null}i(ss,"ScriptOnce");var bc=k(W(),1),Ne=k(ot(),1);function _t(t){return(0,Ne.jsx)(Ne.Fragment,{children:t.children})}i(_t,"SafeFragment");var Ec=k(W(),1),De=k(ot(),1);function Fe(t,o,e){return o.options.notFoundComponent?(0,De.jsx)(o.options.notFoundComponent,{...e}):t.options.defaultNotFoundComponent?(0,De.jsx)(t.options.defaultNotFoundComponent,{...e}):(0,De.jsx)(os,{})}i(Fe,"renderRouteNotFound");var is=k(ot(),1);function ns(t){return null}i(ns,"getScrollRestorationScriptForRouter");function as(){let t=ns(D());return t?(0,is.jsx)(ss,{children:t}):null}i(as,"ScrollRestoration");var z=k(W(),1),N=k(ot(),1);var fn=i((t,o)=>t.routeId===o.routeId&&t._displayPending===o._displayPending,"matchViewFieldsEqual"),dn=i((t,o)=>t[0]===o[0]&&t[1]===o[1],"outletMatchSelectionEqual"),Ae=z.memo(i(function({matchId:o}){let e=D();if(!1){let a=e.stores.matchStores.get(o)?.get();a||$();let c=a.routeId,u=e.routesById[c].parentRoute?.id;return(0,N.jsx)(cs,{router:e,matchId:o,resetKey:e.stores.loadedAt.get(),matchState:{routeId:c,ssr:a.ssr,_displayPending:a._displayPending,parentRouteId:u}})}let s=e.stores.matchStores.get(o);s||$();let r=B(e.stores.loadedAt,a=>a),n=B(s,a=>a,fn);return(0,N.jsx)(cs,{router:e,matchId:o,resetKey:r,matchState:z.useMemo(()=>{let a=n.routeId,c=e.routesById[a].parentRoute?.id;return{routeId:a,ssr:n.ssr,_displayPending:n._displayPending,parentRouteId:c}},[n._displayPending,n.routeId,n.ssr,e.routesById])})},"MatchImpl"));function cs({router:t,matchId:o,resetKey:e,matchState:s}){let r=t.routesById[s.routeId],n=r.options.pendingComponent??t.options.defaultPendingComponent,a=n?(0,N.jsx)(n,{}):null,c=r.options.errorComponent??t.options.defaultErrorComponent,u=r.options.onCatch??t.options.defaultOnCatch,d=r.isRoot?r.options.notFoundComponent??t.options.notFoundRoute?.options.component:r.options.notFoundComponent,f=s.ssr===!1||s.ssr==="data-only",l=(!r.isRoot||r.options.wrapInSuspense||f)&&(r.options.wrapInSuspense??n??(r.options.errorComponent?.preload||f))?z.Suspense:_t,p=c?Ot:_t,h=d?es:_t;return(0,N.jsxs)(r.isRoot?r.options.shellComponent??_t:_t,{children:[(0,N.jsx)(Mt.Provider,{value:o,children:(0,N.jsx)(l,{fallback:a,children:(0,N.jsx)(p,{getResetKey:i(()=>e,"getResetKey"),errorComponent:c||Nt,onCatch:i((m,y)=>{if(A(m))throw m.routeId??=s.routeId,m;u?.(m,y)},"onCatch"),children:(0,N.jsx)(h,{fallback:i(m=>{if(m.routeId??=s.routeId,!d||m.routeId&&m.routeId!==s.routeId||!m.routeId&&!r.isRoot)throw m;return z.createElement(d,m)},"fallback"),children:f||s._displayPending?(0,N.jsx)(Kr,{fallback:a,children:(0,N.jsx)(us,{matchId:o})}):(0,N.jsx)(us,{matchId:o})})})})}),s.parentRouteId===X?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(hn,{}),t.options.scrollRestoration&&!1?(0,N.jsx)(as,{}):null]}):null]})}i(cs,"MatchView");function hn(){let t=D();if(!1)return null;let o=z.useRef();return Tt(()=>{let e=t.stores.resolvedLocation.get(),s=o.current;e&&(!s||s.href!==e.href)&&t.emit({type:"onRendered",...ht(t.stores.location.get(),s??e)}),o.current=e},[B(t.stores.resolvedLocation,e=>e?.state.__TSR_key),t]),null}i(hn,"OnRendered");var us=z.memo(i(function({matchId:o}){let e=D(),s=i((f,l)=>e.getMatch(f.id)?._nonReactive[l]??f._nonReactive[l],"getMatchPromise");if(!1){let f=e.stores.matchStores.get(o)?.get();f||$();let l=f.routeId,p=e.routesById[l],h=(e.routesById[l].options.remountDeps??e.options.defaultRemountDeps)?.({routeId:l,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch}),m=h?JSON.stringify(h):void 0,y=p.options.component??e.options.defaultComponent,g=y?(0,N.jsx)(y,{},m):(0,N.jsx)(Do,{});if(f._displayPending)throw s(f,"displayPendingPromise");if(f._forcePending)throw s(f,"minPendingPromise");if(f.status==="pending")throw s(f,"loadPromise");if(f.status==="notFound")return A(f.error)||$(),Fe(e,p,f.error);if(f.status==="redirected")throw H(f.error)||$(),s(f,"loadPromise");return f.status==="error"?(0,N.jsx)((p.options.errorComponent??e.options.defaultErrorComponent)||Nt,{error:f.error,reset:void 0,info:{componentStack:""}}):g}let r=e.stores.matchStores.get(o);r||$();let n=B(r,f=>f),a=n.routeId,c=e.routesById[a],u=z.useMemo(()=>{let f=(e.routesById[a].options.remountDeps??e.options.defaultRemountDeps)?.({routeId:a,loaderDeps:n.loaderDeps,params:n._strictParams,search:n._strictSearch});return f?JSON.stringify(f):void 0},[a,n.loaderDeps,n._strictParams,n._strictSearch,e.options.defaultRemountDeps,e.routesById]),d=z.useMemo(()=>{let f=c.options.component??e.options.defaultComponent;return f?(0,N.jsx)(f,{},u):(0,N.jsx)(Do,{})},[u,c.options.component,e.options.defaultComponent]);if(n._displayPending)throw s(n,"displayPendingPromise");if(n._forcePending)throw s(n,"minPendingPromise");if(n.status==="pending"){let f=c.options.pendingMinMs??e.options.defaultPendingMinMs;if(f){let l=e.getMatch(n.id);if(l&&!l._nonReactive.minPendingPromise&&!!1){let p=ct();l._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),l._nonReactive.minPendingPromise=void 0},f)}}throw s(n,"loadPromise")}if(n.status==="notFound")return A(n.error)||$(),Fe(e,c,n.error);if(n.status==="redirected")throw H(n.error)||$(),s(n,"loadPromise");if(n.status==="error"){if(!1)return(0,N.jsx)((c.options.errorComponent??e.options.defaultErrorComponent)||Nt,{error:n.error,reset:void 0,info:{componentStack:""}});throw n.error}return d},"MatchInnerImpl")),Do=z.memo(i(function(){let o=D(),e=z.useContext(Mt),s,r=!1,n;if(!1){let d=o.stores.matches.get(),f=e?d.findIndex(p=>p.id===e):-1,l=f>=0?d[f]:void 0;s=l?.routeId,r=l?.globalNotFound??!1,n=f>=0?d[f+1]?.id:void 0}else{let d=e?o.stores.matchStores.get(e):void 0;[s,r]=B(d,f=>[f?.routeId,f?.globalNotFound??!1],dn),n=B(o.stores.matchesId,f=>f[f.findIndex(l=>l===e)+1])}let a=s?o.routesById[s]:void 0,c=o.options.defaultPendingComponent?(0,N.jsx)(o.options.defaultPendingComponent,{}):null;if(r)return a||$(),Fe(o,a,void 0);if(!n)return null;let u=(0,N.jsx)(Ae,{matchId:n});return s===X?(0,N.jsx)(z.Suspense,{fallback:c,children:u}):u},"OutletImpl"));var Ct=k(W(),1);function ls(){let t=D(),o=Ct.useRef({router:t,mounted:!1}),[e,s]=Ct.useState(!1),r=B(t.stores.isLoading,l=>l),n=B(t.stores.hasPending,l=>l),a=Ee(r),c=r||e||n,u=Ee(c),d=r||n,f=Ee(d);return t.startTransition=l=>{s(!0),Ct.startTransition(()=>{l(),s(!1)})},Ct.useEffect(()=>{let l=t.history.subscribe(t.load),p=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Z(t.latestLocation.publicHref)!==Z(p.publicHref)&&t.commitLocation({...p,replace:!0}),()=>{l()}},[t,t.history]),Tt(()=>{if(typeof window<"u"&&t.ssr||o.current.router===t&&o.current.mounted)return;o.current={router:t,mounted:!0},i(async()=>{try{await t.load()}catch(p){console.error(p)}},"tryLoad")()},[t]),Tt(()=>{a&&!r&&t.emit({type:"onLoad",...ht(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,r]),Tt(()=>{f&&!d&&t.emit({type:"onBeforeRouteMount",...ht(t.stores.location.get(),t.stores.resolvedLocation.get())})},[d,f,t]),Tt(()=>{if(u&&!c){let l=ht(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...l}),oe(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[c,u,t]),null}i(ls,"Transitioner");var Be=k(W(),1),ft=k(ot(),1);function fs(){let t=D(),o=t.routesById[X].options.pendingComponent??t.options.defaultPendingComponent,e=o?(0,ft.jsx)(o,{}):null,s=(0,ft.jsxs)(typeof document<"u"&&t.ssr?_t:Be.Suspense,{fallback:e,children:[!!1&&(0,ft.jsx)(ls,{}),(0,ft.jsx)(pn,{})]});return t.options.InnerWrap?(0,ft.jsx)(t.options.InnerWrap,{children:s}):s}i(fs,"Matches");function pn(){let t=D(),o=!1,e=o?t.stores.firstId.get():B(t.stores.firstId,n=>n),s=o?t.stores.loadedAt.get():B(t.stores.loadedAt,n=>n),r=e?(0,ft.jsx)(Ae,{matchId:e}):null;return(0,ft.jsx)(Mt.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:(0,ft.jsx)(Ot,{getResetKey:i(()=>s,"getResetKey"),errorComponent:Nt,onCatch:void 0,children:r})})}i(pn,"MatchesInner");var ds=i(t=>({createMutableStore:Le,createReadonlyStore:Le,batch:oe}),"getStoreFactory");var mn=i(t=>new hs(t),"createRouter"),hs=class extends mo{static{i(this,"Router")}constructor(t){super(t,ds)}};var Lu=k(W(),1),se=k(ot(),1);function ps({router:t,children:o,...e}){mt(e)&&t.update({...t.options,...e,context:{...t.options.context,...e.context}});let s=(0,se.jsx)(ue.Provider,{value:t,children:o});return t.options.Wrap?(0,se.jsx)(t.options.Wrap,{children:s}):s}i(ps,"RouterContextProvider");function gn({router:t,...o}){return(0,se.jsx)(ps,{router:t,...o,children:(0,se.jsx)(fs,{})})}i(gn,"RouterProvider");function vn(t){let o=D({warn:t?.router===void 0}),e=t?.router||o;if(!1){let s=e.stores.__store.get();return t?.select?t.select(s):s}return B(e.stores.__store,_o(t,e))}i(vn,"useRouterState");export{ho as a,js as b,D as c,Ie as d,ke as e,un as f,ln as g,Do as h,mn as i,gn as j,vn as k};
1
+ import{b as Rs}from"./chunk-T6VMSOBB.js";import{a as ys}from"./chunk-7QIFDWQV.js";import{a as i,e as k,f as W,h as ot}from"./chunk-3XIESWL4.js";var Go=k(W(),1),ue=Go.createContext(null);var Jo=k(W(),1);function D(t){return Jo.useContext(ue)}i(D,"useRouter");var ze=k(W(),1),Mt=ze.createContext(void 0),Yo=ze.createContext(void 0);function pt(t){return t[t.length-1]}i(pt,"last");function Ss(t){return typeof t=="function"}i(Ss,"isFunction");function Y(t,o){return Ss(t)?t(o):t}i(Y,"functionalUpdate");var er=Object.prototype.hasOwnProperty,Xo=Object.prototype.propertyIsEnumerable;function mt(t){for(let o in t)if(er.call(t,o))return!0;return!1}i(mt,"hasKeys");var Ps=i(()=>Object.create(null),"createNull"),gt=i((t,o)=>at(t,o,Ps),"nullReplaceEqualDeep");function at(t,o,e=()=>({}),s=0){if(!1)return o;if(t===o)return t;if(s>500)return o;let r=o,n=Ke(t)&&Ke(r);if(!n&&!(Yt(t)&&Yt(r)))return r;let a=n?t:Zo(t);if(!a)return r;let c=n?r:Zo(r);if(!c)return r;let u=a.length,d=c.length,f=n?new Array(d):e(),l=0;for(let p=0;p<d;p++){let h=n?p:c[p],m=t[h],y=r[h];if(m===y){f[h]=m,(n?p<u:er.call(t,h))&&l++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){f[h]=y;continue}let g=at(m,y,e,s+1);f[h]=g,g===m&&l++}return u===d&&l===u?t:f}i(at,"replaceEqualDeep");function Zo(t){let o=Object.getOwnPropertyNames(t);for(let r of o)if(!Xo.call(t,r))return!1;let e=Object.getOwnPropertySymbols(t);if(e.length===0)return o;let s=o;for(let r of e){if(!Xo.call(t,r))return!1;s.push(r)}return s}i(Zo,"getEnumerableOwnKeys");function Yt(t){if(!Qo(t))return!1;let o=t.constructor;if(typeof o>"u")return!0;let e=o.prototype;return!(!Qo(e)||!e.hasOwnProperty("isPrototypeOf"))}i(Yt,"isPlainObject");function Qo(t){return Object.prototype.toString.call(t)==="[object Object]"}i(Qo,"hasObjectPrototype");function Ke(t){return Array.isArray(t)&&t.length===Object.keys(t).length}i(Ke,"isPlainArray");function st(t,o,e){if(t===o)return!0;if(typeof t!=typeof o)return!1;if(Array.isArray(t)&&Array.isArray(o)){if(t.length!==o.length)return!1;for(let s=0,r=t.length;s<r;s++)if(!st(t[s],o[s],e))return!1;return!0}if(Yt(t)&&Yt(o)){let s=e?.ignoreUndefined??!0;if(e?.partial){for(let a in o)if((!s||o[a]!==void 0)&&!st(t[a],o[a],e))return!1;return!0}let r=0;if(!s)r=Object.keys(t).length;else for(let a in t)t[a]!==void 0&&r++;let n=0;for(let a in o)if((!s||o[a]!==void 0)&&(n++,n>r||!st(t[a],o[a],e)))return!1;return r===n}return!1}i(st,"deepEqual");function ct(t){let o,e,s=new Promise((r,n)=>{o=r,e=n});return s.status="pending",s.resolve=r=>{s.status="resolved",s.value=r,o(r),t?.(r)},s.reject=r=>{s.status="rejected",e(r)},s}i(ct,"createControlledPromise");function vt(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}i(vt,"isPromise");var xs=/[\x00-\x1f\x7f"<>`{}]/g;function ws(t){return t.replace(xs,o=>"%"+o.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}i(ws,"sanitizePathSegment");function tr(t){let o;try{o=decodeURI(t)}catch{o=t.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return ws(o)}i(tr,"decodeSegment");var qe=["http:","https:","mailto:","tel:"];function ut(t,o){if(!t)return!1;try{let e=new URL(t);return!o.has(e.protocol)}catch{return!1}}i(ut,"isDangerousProtocol");function At(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};let o=/%25|%5C/gi,e=0,s="",r;for(;(r=o.exec(t))!==null;)s+=tr(t.slice(e,r.index))+r[0],e=o.lastIndex;s=s+tr(e?t.slice(e):t);let n=!1;return s.startsWith("//")&&(n=!0,s="/"+s.replace(/^\/+/,"")),{path:s,handledProtocolRelativeURL:n}}i(At,"decodePath");function or(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}i(or,"encodePathLikeUrl");function rr(t,o){if(t===o)return!0;if(t.length!==o.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==o[e])return!1;return!0}i(rr,"arraysEqual");function $(){throw new Error("Invariant failed")}i($,"invariant");function yt(t){let o=new Map,e,s,r=i(n=>{n.next&&(n.prev?(n.prev.next=n.next,n.next.prev=n.prev,n.next=void 0,s&&(s.next=n,n.prev=s)):(n.next.prev=void 0,e=n.next,n.next=void 0,s&&(n.prev=s,s.next=n)),s=n)},"touch");return{get(n){let a=o.get(n);if(a)return r(a),a.value},set(n,a){if(o.size>=t&&e){let u=e;o.delete(u.key),u.next&&(e=u.next,u.next.prev=void 0),u===s&&(s=void 0)}let c=o.get(n);if(c)c.value=a,r(c);else{let u={key:n,value:a,prev:s};s&&(s.next=u),s=u,e||(e=u),o.set(n,u)}},clear(){o.clear(),e=void 0,s=void 0}}}i(yt,"createLRUCache");var St=4,nr=5;function _s(t){let o=t.indexOf("{");if(o===-1)return null;let e=t.indexOf("}",o);return e===-1||o+1>=t.length?null:[o,e]}i(_s,"getOpenAndCloseBraces");function Ye(t,o,e=new Uint16Array(6)){let s=t.indexOf("/",o),r=s===-1?t.length:s,n=t.substring(o,r);if(!n||!n.includes("$"))return e[0]=0,e[1]=o,e[2]=o,e[3]=r,e[4]=r,e[5]=r,e;if(n==="$"){let c=t.length;return e[0]=2,e[1]=o,e[2]=o,e[3]=c,e[4]=c,e[5]=c,e}if(n.charCodeAt(0)===36)return e[0]=1,e[1]=o,e[2]=o+1,e[3]=r,e[4]=r,e[5]=r,e;let a=_s(n);if(a){let[c,u]=a,d=n.charCodeAt(c+1);if(d===45){if(c+2<n.length&&n.charCodeAt(c+2)===36){let f=c+3,l=u;if(f<l)return e[0]=3,e[1]=o+c,e[2]=o+f,e[3]=o+l,e[4]=o+u+1,e[5]=r,e}}else if(d===36){let f=c+1,l=c+2;return l===u?(e[0]=2,e[1]=o+c,e[2]=o+f,e[3]=o+l,e[4]=o+u+1,e[5]=t.length,e):(e[0]=1,e[1]=o+c,e[2]=o+l,e[3]=o+u,e[4]=o+u+1,e[5]=r,e)}}return e[0]=0,e[1]=o,e[2]=o,e[3]=r,e[4]=r,e[5]=r,e}i(Ye,"parseSegment");function de(t,o,e,s,r,n,a){a?.(e);let c=s;{let u=e.fullPath??e.from,d=u.length,f=e.options?.caseSensitive??t,l=e.options?.params?.parse??e.options?.parseParams;for(;c<d;){let h=Ye(u,c,o),m,y=c,g=h[5];switch(c=g+1,n++,h[0]){case 0:{let v=u.substring(h[2],h[3]);if(f){let R=r.static?.get(v);if(R)m=R;else{r.static??=new Map;let S=It(e.fullPath??e.from);S.parent=r,S.depth=n,m=S,r.static.set(v,S)}}else{let R=v.toLowerCase(),S=r.staticInsensitive?.get(R);if(S)m=S;else{r.staticInsensitive??=new Map;let P=It(e.fullPath??e.from);P.parent=r,P.depth=n,m=P,r.staticInsensitive.set(R,P)}}break}case 1:{let v=u.substring(y,h[1]),R=u.substring(h[4],g),S=f&&!!(v||R),P=v?S?v:v.toLowerCase():void 0,_=R?S?R:R.toLowerCase():void 0,b=!l&&r.dynamic?.find(x=>!x.parse&&x.caseSensitive===S&&x.prefix===P&&x.suffix===_);if(b)m=b;else{let x=Je(1,e.fullPath??e.from,S,P,_);m=x,x.depth=n,x.parent=r,r.dynamic??=[],r.dynamic.push(x)}break}case 3:{let v=u.substring(y,h[1]),R=u.substring(h[4],g),S=f&&!!(v||R),P=v?S?v:v.toLowerCase():void 0,_=R?S?R:R.toLowerCase():void 0,b=!l&&r.optional?.find(x=>!x.parse&&x.caseSensitive===S&&x.prefix===P&&x.suffix===_);if(b)m=b;else{let x=Je(3,e.fullPath??e.from,S,P,_);m=x,x.parent=r,x.depth=n,r.optional??=[],r.optional.push(x)}break}case 2:{let v=u.substring(y,h[1]),R=u.substring(h[4],g),S=f&&!!(v||R),P=v?S?v:v.toLowerCase():void 0,_=R?S?R:R.toLowerCase():void 0,b=Je(2,e.fullPath??e.from,S,P,_);m=b,b.parent=r,b.depth=n,r.wildcard??=[],r.wildcard.push(b)}}r=m}if(l&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){let h=It(e.fullPath??e.from);h.kind=nr,h.parent=r,n++,h.depth=n,r.pathless??=[],r.pathless.push(h),r=h}let p=(e.path||!e.children)&&!e.isRoot;if(p&&u.endsWith("/")){let h=It(e.fullPath??e.from);h.kind=St,h.parent=r,n++,h.depth=n,r.index=h,r=h}r.parse=l??null,r.priority=e.options?.params?.priority??0,p&&!r.route&&(r.route=e,r.fullPath=e.fullPath??e.from)}if(e.children)for(let u of e.children)de(t,o,u,c,r,n,a)}i(de,"parseSegments");function Ge(t,o){if(t.parse&&!o.parse)return-1;if(!t.parse&&o.parse)return 1;if(t.parse&&o.parse&&(t.priority||o.priority))return o.priority-t.priority;if(t.prefix&&o.prefix&&t.prefix!==o.prefix){if(t.prefix.startsWith(o.prefix))return-1;if(o.prefix.startsWith(t.prefix))return 1}if(t.suffix&&o.suffix&&t.suffix!==o.suffix){if(t.suffix.endsWith(o.suffix))return-1;if(o.suffix.endsWith(t.suffix))return 1}return t.prefix&&!o.prefix?-1:!t.prefix&&o.prefix?1:t.suffix&&!o.suffix?-1:!t.suffix&&o.suffix?1:t.caseSensitive&&!o.caseSensitive?-1:!t.caseSensitive&&o.caseSensitive?1:0}i(Ge,"sortDynamic");function Rt(t){if(t.pathless)for(let o of t.pathless)Rt(o);if(t.static)for(let o of t.static.values())Rt(o);if(t.staticInsensitive)for(let o of t.staticInsensitive.values())Rt(o);if(t.dynamic?.length){t.dynamic.sort(Ge);for(let o of t.dynamic)Rt(o)}if(t.optional?.length){t.optional.sort(Ge);for(let o of t.optional)Rt(o)}if(t.wildcard?.length){t.wildcard.sort(Ge);for(let o of t.wildcard)Rt(o)}}i(Rt,"sortTreeNodes");function It(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}i(It,"createStaticNode");function Je(t,o,e,s,r){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:o,parent:null,parse:null,priority:0,caseSensitive:e,prefix:s,suffix:r}}i(Je,"createDynamicNode");function ir(t,o){let e=It("/"),s=new Uint16Array(6);for(let r of t)de(!1,s,r,1,e,0);Rt(e),o.masksTree=e,o.flatCache=yt(1e3)}i(ir,"processRouteMasks");function ar(t,o){t||="/";let e=o.flatCache.get(t);if(e)return e;let s=Xe(t,o.masksTree);return o.flatCache.set(t,s),s}i(ar,"findFlatMatch");function cr(t,o,e,s,r){t||="/",s||="/";let n=o?`case\0${t}`:t,a=r.singleCache.get(n);return a||(a=It("/"),de(o,new Uint16Array(6),{from:t},1,a,0),r.singleCache.set(n,a)),Xe(s,a,e)}i(cr,"findSingleMatch");function ur(t,o,e=!1){let s=e?t:`nofuzz\0${t}`,r=o.matchCache.get(s);if(r!==void 0)return r;t||="/";let n;try{n=Xe(t,o.segmentTree,e)}catch(a){if(a instanceof URIError)n=null;else throw a}return n&&(n.branch=Ze(n.route)),o.matchCache.set(s,n),n}i(ur,"findRouteMatch");function Cs(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}i(Cs,"trimPathRight");function lr(t,o=!1,e){let s=It(t.fullPath),r=new Uint16Array(6),n={},a={},c=0;return de(o,r,t,1,s,0,u=>{if(e?.(u,c),u.id in n&&$(),n[u.id]=u,c!==0&&u.path){let d=Cs(u.fullPath);(!a[d]||u.fullPath.endsWith("/"))&&(a[d]=u)}c++}),Rt(s),{processedTree:{segmentTree:s,singleCache:yt(1e3),matchCache:yt(1e3),flatCache:null,masksTree:null},routesById:n,routesByPath:a}}i(lr,"processRouteTree");function Xe(t,o,e=!1){let s=t.split("/"),r=Ls(t,s,o,e);if(!r)return null;let[n]=fr(t,s,r);return{route:r.node.route,rawParams:n}}i(Xe,"findMatch");function fr(t,o,e){let s=bs(e.node),r=null,n=Object.create(null),a=e.extract?.part??0,c=e.extract?.node??0,u=e.extract?.path??0,d=e.extract?.segment??0;for(;c<s.length;a++,c++,u++,d++){let f=s[c];if(f.kind===St)break;if(f.kind===nr){d--,a--,u--;continue}let l=o[a],p=u;if(l&&(u+=l.length),f.kind===1){r??=e.node.fullPath.split("/");let h=r[d],m=f.prefix?.length??0;if(h.charCodeAt(m)===123){let y=f.suffix?.length??0,g=h.substring(m+2,h.length-y-1),v=l.substring(m,l.length-y);n[g]=decodeURIComponent(v)}else{let y=h.substring(1);n[y]=decodeURIComponent(l)}}else if(f.kind===3){if(e.skipped&1<<c){a--,u=p-1;continue}r??=e.node.fullPath.split("/");let h=r[d],m=f.prefix?.length??0,y=f.suffix?.length??0,g=h.substring(m+3,h.length-y-1),v=f.suffix||f.prefix?l.substring(m,l.length-y):l;v&&(n[g]=decodeURIComponent(v))}else if(f.kind===2){let h=f,m=t.substring(p+(h.prefix?.length??0),t.length-(h.suffix?.length??0)),y=decodeURIComponent(m);n["*"]=y,n._splat=y;break}}return e.rawParams&&Object.assign(n,e.rawParams),[n,{part:a,node:c,path:u,segment:d}]}i(fr,"extractParams");function Ze(t){let o=[t];for(;t.parentRoute;)t=t.parentRoute,o.push(t);return o.reverse(),o}i(Ze,"buildRouteBranch");function bs(t){let o=Array(t.depth+1);do o[t.depth]=t,t=t.parent;while(t);return o}i(bs,"buildBranch");function Ls(t,o,e,s){if(t==="/"&&e.index)return{node:e.index,skipped:0};let r=!pt(o),n=r&&t!=="/",a=o.length-(r?1:0),c=[{node:e,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],u=null,d=null;for(;c.length;){let f=c.pop(),{node:l,index:p,skipped:h,depth:m,statics:y,dynamics:g,optionals:v}=f,{extract:R,rawParams:S}=f;if(l.kind===2&&l.route&&!fe(d,f))continue;if(l.parse){if(!sr(t,o,f))continue;S=f.rawParams,R=f.extract}s&&l.route&&l.kind!==St&&fe(u,f)&&(u=f);let P=p===a;if(P&&(l.route&&(!n||l.kind===St||l.kind===2)&&fe(d,f)&&(d=f),!l.optional&&!l.wildcard&&!l.index&&!l.pathless))continue;let _=P?void 0:o[p],b;if(P&&l.index){let x={node:l.index,index:p,skipped:h,depth:m+1,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S},w=!0;if(l.index.parse&&(sr(t,o,x)||(w=!1)),w){if(!g&&!v&&!h&&Ms(y,a))return x;fe(d,x)&&(d=x)}}if(l.wildcard)for(let x=l.wildcard.length-1;x>=0;x--){let w=l.wildcard[x],{prefix:C,suffix:M}=w;if(!(C&&(P||!(w.caseSensitive?_:b??=_.toLowerCase()).startsWith(C)))){if(M){if(P)continue;let L=o.slice(p).join("/").slice(-M.length);if((w.caseSensitive?L:L.toLowerCase())!==M)continue}c.push({node:w,index:a,skipped:h,depth:m+1,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S})}}if(l.optional){let x=h|1<<m,w=m+1;for(let C=l.optional.length-1;C>=0;C--){let M=l.optional[C];c.push({node:M,index:p,skipped:x,depth:w,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S})}if(!P)for(let C=l.optional.length-1;C>=0;C--){let M=l.optional[C],{prefix:L,suffix:I}=M;if(L||I){let rt=M.caseSensitive?_:b??=_.toLowerCase();if(L&&!rt.startsWith(L)||I&&!rt.endsWith(I))continue}c.push({node:M,index:p+1,skipped:h,depth:w,statics:y,dynamics:g,optionals:v+le(a,p),extract:R,rawParams:S})}}if(!P&&l.dynamic&&_)for(let x=l.dynamic.length-1;x>=0;x--){let w=l.dynamic[x],{prefix:C,suffix:M}=w;if(C||M){let L=w.caseSensitive?_:b??=_.toLowerCase();if(C&&!L.startsWith(C)||M&&!L.endsWith(M))continue}c.push({node:w,index:p+1,skipped:h,depth:m+1,statics:y,dynamics:g+le(a,p),optionals:v,extract:R,rawParams:S})}if(!P&&l.staticInsensitive){let x=l.staticInsensitive.get(b??=_.toLowerCase());x&&c.push({node:x,index:p+1,skipped:h,depth:m+1,statics:y+le(a,p),dynamics:g,optionals:v,extract:R,rawParams:S})}if(!P&&l.static){let x=l.static.get(_);x&&c.push({node:x,index:p+1,skipped:h,depth:m+1,statics:y+le(a,p),dynamics:g,optionals:v,extract:R,rawParams:S})}if(l.pathless){let x=m+1;for(let w=l.pathless.length-1;w>=0;w--){let C=l.pathless[w];c.push({node:C,index:p,skipped:h,depth:x,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S})}}}if(d)return d;if(s&&u){let f=u.index;for(let p=0;p<u.index;p++)f+=o[p].length;let l=f===t.length?"/":t.slice(f);return u.rawParams??=Object.create(null),u.rawParams["**"]=decodeURIComponent(l),u}return null}i(Ls,"getNodeMatch");function le(t,o){return 2**(t-o-1)}i(le,"segmentScore");function Ms(t,o){return t===2**(o-1)-1}i(Ms,"isPerfectStaticMatch");function sr(t,o,e){let s,r;try{[s,r]=fr(t,o,e)}catch{return null}if(e.rawParams=s,e.extract=r,!e.node.parse)return!0;try{if(e.node.parse(s)===!1)return null}catch{}return!0}i(sr,"validateParseParams");function fe(t,o){return t?o.statics>t.statics||o.statics===t.statics&&(o.dynamics>t.dynamics||o.dynamics===t.dynamics&&(o.optionals>t.optionals||o.optionals===t.optionals&&((o.node.kind===St)>(t.node.kind===St)||o.node.kind===St==(t.node.kind===St)&&o.depth>t.depth))):!0}i(fe,"isFrameMoreSpecific");function Et(t){return Zt(t.filter(o=>o!==void 0).join("/"))}i(Et,"joinPaths");function Zt(t){return t.replace(/\/{2,}/g,"/")}i(Zt,"cleanPath");function he(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}i(he,"trimPathLeft");function Z(t){let o=t.length;return o>1&&t[o-1]==="/"?t.replace(/\/{1,}$/,""):t}i(Z,"trimPathRight");function Qt(t){return Z(he(t))}i(Qt,"trimPath");function Pt(t,o){return t?.endsWith("/")&&t!=="/"&&t!==`${o}/`?t.slice(0,-1):t}i(Pt,"removeTrailingSlash");function pe(t,o,e){return Pt(t,e)===Pt(o,e)}i(pe,"exactPathTest");function Qe({base:t,to:o,trailingSlash:e="never",cache:s}){let r=o.startsWith("/"),n=!r&&o===".",a;if(s){a=r?o:n?t:t+"\0"+o;let d=s.get(a);if(d)return d}let c;if(n)c=t.split("/");else if(r)c=o.split("/");else{for(c=t.split("/");c.length>1&&pt(c)==="";)c.pop();let d=o.split("/");for(let f=0,l=d.length;f<l;f++){let p=d[f];p===""?f?f===l-1&&c.push(p):c=[p]:p===".."?c.pop():p==="."||c.push(p)}}c.length>1&&(pt(c)===""?e==="never"&&c.pop():e==="always"&&c.push(""));let u=Zt(c.join("/"))||"/";return a&&s&&s.set(a,u),u}i(Qe,"resolvePath");function hr(t){let o=new Map(t.map(r=>[encodeURIComponent(r),r])),e=Array.from(o.keys()).map(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),s=new RegExp(e,"g");return r=>r.replace(s,n=>o.get(n)??n)}i(hr,"compileDecodeCharMap");function Xt(t,o,e){let s=o[t];return typeof s!="string"?s:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(s)?s:s.split("/").map(r=>dr(r,e)).join("/"):dr(s,e)}i(Xt,"encodeParam");function me({path:t,params:o,decoder:e,...s}){let r=!1,n=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:n,isMissingParams:r};if(!t.includes("$"))return{interpolatedPath:t,usedParams:n,isMissingParams:r};if(!1){let f=t.length,l=0,p="";for(;l<f;){for(;l<f&&t.charCodeAt(l)===47;)l++;if(l>=f)break;let h=l,m=t.indexOf("/",l);m===-1&&(m=f),l=m;let y=t.substring(h,m);if(y)if(y.charCodeAt(0)===36)if(y.length===1){let g=o._splat;if(n._splat=g,n["*"]=g,!g){r=!0;continue}let v=Xt("_splat",o,e);p+="/"+v}else{let g=y.substring(1);!r&&!(g in o)&&(r=!0),n[g]=o[g];let v=Xt(g,o,e)??"undefined";p+="/"+v}else p+="/"+y}return t.endsWith("/")&&(p+="/"),{usedParams:n,interpolatedPath:p||"/",isMissingParams:r}}let a=t.length,c=0,u,d="";for(;c<a;){let f=c;u=Ye(t,f,u);let l=u[5];if(c=l+1,f===l)continue;let p=u[0];if(p===0){d+="/"+t.substring(f,l);continue}if(p===2){let h=o._splat;n._splat=h,n["*"]=h;let m=t.substring(f,u[1]),y=t.substring(u[4],l);if(!h){r=!0,(m||y)&&(d+="/"+m+y);continue}let g=Xt("_splat",o,e);d+="/"+m+g+y;continue}if(p===1){let h=t.substring(u[2],u[3]);!r&&!(h in o)&&(r=!0),n[h]=o[h];let m=t.substring(f,u[1]),y=t.substring(u[4],l),g=Xt(h,o,e)??"undefined";d+="/"+m+g+y;continue}if(p===3){let h=t.substring(u[2],u[3]),m=o[h];if(m==null)continue;n[h]=m;let y=t.substring(f,u[1]),g=t.substring(u[4],l),v=Xt(h,o,e)??"";d+="/"+y+v+g;continue}}return t.endsWith("/")&&(d+="/"),{usedParams:n,interpolatedPath:d||"/",isMissingParams:r}}i(me,"interpolatePath");function dr(t,o){let e=encodeURIComponent(t);return o?.(e)??e}i(dr,"encodePathParam");function A(t){return t?.isNotFound===!0}i(A,"isNotFound");function Is(){try{return sessionStorage}catch{return}}i(Is,"getSafeSessionStorage");var Es="tsr-scroll-restoration-v1_3",gr=Is();function ks(){try{return JSON.parse(gr?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}i(ks,"createScrollRestorationCache");function Ts(){try{gr?.setItem(Es,JSON.stringify(Bt))}catch{}}i(Ts,"persistScrollRestorationCache");var Bt=ks(),pr="data-scroll-restoration-id",Os=i(t=>t.state.__TSR_key||t.href,"defaultGetScrollRestorationKey");function Ns(t){let o=t.getAttribute(pr);if(o)return`[${pr}="${o}"]`;let e="",s=t,r;for(;r=s.parentNode;){let n=1,a=s;for(;a=a.previousElementSibling;)n++;let c=`${s.localName}:nth-child(${n})`;e=e?`${c} > ${e}`:c,s=r}return e}i(Ns,"getScrollRestorationSelector");var ge=!1,ve="window";function to(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}i(to,"getElement");function mr(t){let o=new Set;for(let e of t){if(e===ve)continue;let s=to(e);s&&o.add(s)}return o}i(mr,"getScrollToTopElements");function vr(t,o){let e=o??t.options.scrollRestoration,s=t._scroll;if(e&&(s.restoring=!0),!1)return;let r=t.options.getScrollRestorationKey||Os,n=new Set,a=i(c=>{let u=Bt[c]||={};for(let d of n)d===document?u[ve]={scrollX,scrollY}:d.isConnected&&(u[Ns(d)]={scrollX:d.scrollLeft,scrollY:d.scrollTop})},"snapshotCurrentScrollTargets");e&&!s.restoration&&(s.restoration=!0,ge=!1,history.scrollRestoration="manual",document.addEventListener("scroll",c=>{ge||n.add(c.target)},!0),t.subscribe("onBeforeLoad",c=>{c.fromLocation&&a(r(c.fromLocation)),n.clear()}),addEventListener("pagehide",()=>{a(r(t.stores.resolvedLocation.get()??t.stores.location.get())),Ts()})),!s.reset&&(s.reset=!0,t.subscribe("onRendered",c=>{let u=t.options.scrollRestorationBehavior,d=t.options.scrollToTopSelectors,f=s.next,l=s.hash,p;if(n.clear(),s.next=!0,s.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;let h=r(c.toLocation),m=c.fromLocation&&r(c.fromLocation);if(s.restoring&&m&&m!==h){let y=Bt[m];if(y){let g=Bt[h];for(let v in y){if(v===ve){if(f)continue}else{let R=to(v);if(!R||f&&d&&(p??=mr(d),p.has(R)))continue}g||(g=Bt[h]={}),g[v]??=y[v]}}}ge=!0;try{let y=c.toLocation.hash,g=c.toLocation.state.__hashScrollIntoViewOptions??!0,v=!1;if(f){!y&&d&&(p??=mr(d));let R=y&&g&&l,S=s.restoring?Bt[h]:void 0;if(S)for(let P in S){let{scrollX:_,scrollY:b}=S[P];if(P===ve){if(R)continue;scrollTo({top:b,left:_,behavior:u}),v=!0}else{let x=to(P);x&&(x.scrollLeft=_,x.scrollTop=b,p?.delete(x))}}if(!y){let P={top:0,left:0,behavior:u};if(v||scrollTo(P),p)for(let _ of p)_.scrollTo(P)}}!v&&y&&g&&document.getElementById(y)?.scrollIntoView(g)}finally{ge=!1}}))}i(vr,"setupScrollRestoration");function yr(t,o=String){let e=new URLSearchParams;for(let s in t){let r=t[s];r!==void 0&&e.set(s,o(r))}return e.toString()}i(yr,"encode");function eo(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}i(eo,"toValue");function Rr(t){let o=new URLSearchParams(t),e=Object.create(null);for(let[s,r]of o.entries()){let n=e[s];n==null?e[s]=eo(r):Array.isArray(n)?n.push(eo(r)):e[s]=[n,eo(r)]}return e}i(Rr,"decode");var Sr=Ds(JSON.parse),Pr=Fs(JSON.stringify,JSON.parse);function Ds(t){return o=>{o[0]==="?"&&(o=o.substring(1));let e=Rr(o);for(let s in e){let r=e[s];if(typeof r=="string")try{e[s]=t(r)}catch{}}return e}}i(Ds,"parseSearchWith");function Fs(t,o){let e=typeof o=="function";function s(r){if(typeof r=="object"&&r!==null)try{return t(r)}catch{}else if(e&&typeof r=="string")try{return o(r),t(r)}catch{}return r}return i(s,"stringifyValue"),r=>{let n=yr(r,s);return n?`?${n}`:""}}i(Fs,"stringifySearchWith");var X="__root__";function $t(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}let o=new Headers(t.headers);t.href&&o.get("Location")===null&&o.set("Location",t.href);let e=new Response(null,{status:t.statusCode,headers:o});if(e.options=t,t.throw)throw e;return e}i($t,"redirect");function H(t){return t instanceof Response&&!!t.options}i(H,"isRedirect");function xr(t){return{input:i(({url:o})=>{for(let e of t)o=ye(e,o);return o},"input"),output:i(({url:o})=>{for(let e=t.length-1;e>=0;e--)o=oo(t[e],o);return o},"output")}}i(xr,"composeRewrites");function wr(t){let o=Qt(t.basepath),e=`/${o}`,s=t.caseSensitive?e:e.toLowerCase(),r=`${s}/`;return{input:i(({url:n})=>{let a=t.caseSensitive?n.pathname:n.pathname.toLowerCase();return a===s?n.pathname="/":a.startsWith(r)&&(n.pathname=n.pathname.slice(e.length)),n},"input"),output:i(({url:n})=>(n.pathname=Et(["/",o,n.pathname]),n),"output")}}i(wr,"rewriteBasepath");function ye(t,o){let e=t?.input?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}i(ye,"executeRewriteInput");function oo(t,o){let e=t?.output?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}i(oo,"executeRewriteOutput");function no(t){let o=t;return{get(){return o},set(e){o=Y(e,o)}}}i(no,"createNonReactiveMutableStore");function io(t){return{get(){return t()}}}i(io,"createNonReactiveReadonlyStore");function _r(t,o){let{createMutableStore:e,createReadonlyStore:s,batch:r,init:n}=o,a=new Map,c=new Map,u=new Map,d=e(t.status),f=e(t.loadedAt),l=e(t.isLoading),p=e(t.isTransitioning),h=e(t.location),m=e(t.resolvedLocation),y=e(t.statusCode),g=e(t.redirect),v=e([]),R=e([]),S=e([]),P=s(()=>ro(a,v.get())),_=s(()=>ro(c,R.get())),b=s(()=>ro(u,S.get())),x=s(()=>v.get()[0]),w=s(()=>v.get().some(tt=>a.get(tt)?.get().status==="pending")),C=s(()=>({locationHref:h.get().href,resolvedLocationHref:m.get()?.href,status:d.get()})),M=s(()=>({status:d.get(),loadedAt:f.get(),isLoading:l.get(),isTransitioning:p.get(),matches:P.get(),location:h.get(),resolvedLocation:m.get(),statusCode:y.get(),redirect:g.get()})),L=yt(64);function I(tt){let zt=L.get(tt);return zt||(zt=s(()=>{let Fo=v.get();for(let Ao of Fo){let ie=a.get(Ao);if(ie&&ie.routeId===tt)return ie.get()}}),L.set(tt,zt)),zt}i(I,"getRouteMatchStore");let rt={status:d,loadedAt:f,isLoading:l,isTransitioning:p,location:h,resolvedLocation:m,statusCode:y,redirect:g,matchesId:v,pendingIds:R,cachedIds:S,matches:P,pendingMatches:_,cachedMatches:b,firstId:x,hasPending:w,matchRouteDeps:C,matchStores:a,pendingMatchStores:c,cachedMatchStores:u,__store:M,getRouteMatchStore:I,setMatches:K,setPending:dt,setCached:ne};K(t.matches),n?.(rt);function K(tt){so(tt,a,v,e,r)}i(K,"setMatches");function dt(tt){so(tt,c,R,e,r)}i(dt,"setPending");function ne(tt){so(tt,u,S,e,r)}return i(ne,"setCached"),rt}i(_r,"createRouterStores");function ro(t,o){let e=[];for(let s of o){let r=t.get(s);r&&e.push(r.get())}return e}i(ro,"readPoolMatches");function so(t,o,e,s,r){let n=t.map(c=>c.id),a=new Set(n);r(()=>{for(let c of o.keys())a.has(c)||o.delete(c);for(let c of t){let u=o.get(c.id);if(!u){let d=s(c);d.routeId=c.routeId,o.set(c.id,d);continue}u.routeId=c.routeId,u.get()!==c&&u.set(c)}rr(e.get(),n)||e.set(n)})}i(so,"reconcileMatchPool");var ao=i(t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},"triggerOnReady"),As=i(t=>t.stores.matchesId.get().some(o=>t.stores.matchStores.get(o)?.get()._forcePending),"hasForcePendingActiveMatch"),Pe=i((t,o)=>!!(t.preload&&!t.router.stores.matchStores.has(o)),"resolvePreload"),kt=i((t,o,e=!0)=>{let s={...t.router.options.context??{}},r=e?o:o-1;for(let n=0;n<=r;n++){let a=t.matches[n];if(!a)continue;let c=t.router.getMatch(a.id);c&&Object.assign(s,c.__routeContext,c.__beforeLoadContext)}return s},"buildMatchContext"),Cr=i((t,o)=>{if(!t.matches.length)return;let e=o.routeId,s=t.matches.findIndex(a=>a.routeId===t.router.routeTree.id),r=s>=0?s:0,n=e?t.matches.findIndex(a=>a.routeId===e):t.firstBadMatchIndex??t.matches.length-1;n<0&&(n=r);for(let a=n;a>=0;a--){let c=t.matches[a];if(t.router.looseRoutesById[c.routeId].options.notFoundComponent)return a}return e?n:r},"getNotFoundBoundaryIndex"),xt=i((t,o,e)=>{if(!(!H(e)&&!A(e)))throw H(e)&&e.redirectHandled&&!e.options.reloadDocument||(o&&(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.loaderPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loaderPromise=void 0,o._nonReactive.error=e,t.updateMatch(o.id,s=>({...s,status:H(e)?"redirected":A(e)?"notFound":s.status==="pending"?"success":s.status,context:kt(t,o.index),isFetching:!1,error:e})),A(e)&&!e.routeId&&(e.routeId=o.routeId),o._nonReactive.loadPromise?.resolve()),H(e)&&(t.rendered=!0,e.options._fromLocation=t.location,e.redirectHandled=!0,e=t.router.resolveRedirect(e))),e},"handleRedirectAndNotFound"),Ir=i((t,o)=>{let e=t.router.getMatch(o);return!!(!e||!!1&&e._nonReactive.dehydrated||!1)},"shouldSkipLoader"),br=i((t,o,e)=>{let s=kt(t,e);t.updateMatch(o,r=>({...r,context:s}))},"syncMatchContext"),te=i((t,o,e)=>{let{id:s,routeId:r}=t.matches[o],n=t.router.looseRoutesById[r];if(e instanceof Promise)throw e;t.firstBadMatchIndex??=o,xt(t,t.router.getMatch(s),e);try{n.options.onError?.(e)}catch(a){e=a,xt(t,t.router.getMatch(s),e)}t.updateMatch(s,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:e,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!H(e)&&!A(e)&&(t.serialError??=e)},"handleSerialError"),Bs=i((t,o,e,s)=>{let r=t.router.getMatch(o),n=t.matches[e-1]?.id,a=n?t.router.getMatch(n):void 0;if(t.router.isShell()){r.ssr=s.id===X;return}if(a?.ssr===!1){r.ssr=!1;return}let c=i(h=>h===!0&&a?.ssr==="data-only"?"data-only":h,"parentOverride"),u=t.router.options.defaultSsr??!0;if(s.options.ssr===void 0){r.ssr=c(u);return}if(typeof s.options.ssr!="function"){r.ssr=c(s.options.ssr);return}let{search:d,params:f}=r,l={search:Re(d,r.searchError),params:Re(f,r.paramsError),location:t.location,matches:t.matches.map(h=>({index:h.index,pathname:h.pathname,fullPath:h.fullPath,staticData:h.staticData,id:h.id,routeId:h.routeId,search:Re(h.search,h.searchError),params:Re(h.params,h.paramsError),ssr:h.ssr}))},p=s.options.ssr(l);if(vt(p))return p.then(h=>{r.ssr=c(h??u)});r.ssr=c(p??u)},"isBeforeLoadSsr"),Er=i((t,o,e,s)=>{if(s._nonReactive.pendingTimeout!==void 0)return;let r=e.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!!1&&!Pe(t,o)&&(e.options.loader||e.options.beforeLoad||uo(e))&&typeof r=="number"&&r!==1/0&&(e.options.pendingComponent??t.router.options?.defaultPendingComponent)){let n=setTimeout(()=>{ao(t)},r);s._nonReactive.pendingTimeout=n}},"setupPendingTimeout"),$s=i((t,o,e)=>{let s=t.router.getMatch(o);if(!s._nonReactive.beforeLoadPromise&&!s._nonReactive.loaderPromise)return;Er(t,o,e,s);let r=i(()=>{let n=t.router.getMatch(o);n.preload&&(n.status==="redirected"||n.status==="notFound")&&xt(t,n,n.error)},"then");return s._nonReactive.beforeLoadPromise?s._nonReactive.beforeLoadPromise.then(r):r()},"preBeforeLoadSetup"),Us=i((t,o,e,s)=>{let r=t.router.getMatch(o),n=r._nonReactive.loadPromise;r._nonReactive.loadPromise=ct(()=>{n?.resolve(),n=void 0});let{paramsError:a,searchError:c}=r;a&&te(t,e,a),c&&te(t,e,c),Er(t,o,s,r);let u=new AbortController,d=!1,f=i(()=>{d||(d=!0,t.updateMatch(o,P=>({...P,isFetching:"beforeLoad",fetchCount:P.fetchCount+1,abortController:u})))},"pending"),l=i(()=>{r._nonReactive.beforeLoadPromise?.resolve(),r._nonReactive.beforeLoadPromise=void 0,t.updateMatch(o,P=>({...P,isFetching:!1}))},"resolve");if(!s.options.beforeLoad){t.router.batch(()=>{f(),l()});return}r._nonReactive.beforeLoadPromise=ct();let p={...kt(t,e,!1),...r.__routeContext},{search:h,params:m,cause:y}=r,g=Pe(t,o),v={search:h,abortController:u,params:m,preload:g,context:p,location:t.location,navigate:i(P=>t.router.navigate({...P,_fromLocation:t.location}),"navigate"),buildLocation:t.router.buildLocation,cause:g?"preload":y,matches:t.matches,routeId:s.id,...t.router.options.additionalContext},R=i(P=>{if(P===void 0){t.router.batch(()=>{f(),l()});return}(H(P)||A(P))&&(f(),te(t,e,P)),t.router.batch(()=>{f(),t.updateMatch(o,_=>({..._,__beforeLoadContext:P})),l()})},"updateContext"),S;try{if(S=s.options.beforeLoad(v),vt(S))return f(),S.catch(P=>{te(t,e,P)}).then(R)}catch(P){f(),te(t,e,P)}R(S)},"executeBeforeLoad"),Hs=i((t,o)=>{let{id:e,routeId:s}=t.matches[o],r=t.router.looseRoutesById[s],n=i(()=>{if(!1){let u=Bs(t,e,o,r);if(vt(u))return u.then(c)}return c()},"serverSsr"),a=i(()=>Us(t,e,o,r),"execute"),c=i(()=>{if(Ir(t,e))return;let u=$s(t,e,r);return vt(u)?u.then(a):a()},"queueExecution");return n()},"handleBeforeLoad"),Vs=i((t,o,e)=>{let s=t.router.getMatch(o);if(!s||!e.options.head&&!e.options.scripts&&!e.options.headers)return;let r={ssr:t.router.options.ssr,matches:t.matches,match:s,params:s.params,loaderData:s.loaderData};return Promise.all([e.options.head?.(r),e.options.scripts?.(r),e.options.headers?.(r)]).then(([n,a,c])=>({meta:n?.meta,links:n?.links,headScripts:n?.scripts,headers:c,scripts:a,styles:n?.styles}))},"executeHead"),kr=i((t,o,e,s,r)=>{let n=o[s-1],{params:a,loaderDeps:c,abortController:u,cause:d}=t.router.getMatch(e),f=kt(t,s),l=Pe(t,e);return{params:a,deps:c,preload:!!l,parentMatchPromise:n,abortController:u,context:f,location:t.location,navigate:i(p=>t.router.navigate({...p,_fromLocation:t.location}),"navigate"),cause:l?"preload":d,route:r,...t.router.options.additionalContext}},"getLoaderContext"),Lr=i(async(t,o,e,s,r)=>{try{let n=t.router.getMatch(e);try{(!!1||n.ssr===!0)&&Ut(r);let a=r.options.loader,c=typeof a=="function"?a:a?.handler,u=c?.(kr(t,o,e,s,r)),d=!!c&&vt(u);if((d||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||n._nonReactive.minPendingPromise)&&t.updateMatch(e,l=>({...l,isFetching:"loader"})),c){let l=d?await u:u;xt(t,t.router.getMatch(e),l),l!==void 0&&t.updateMatch(e,p=>({...p,loaderData:l}))}r._lazyPromise&&await r._lazyPromise;let f=n._nonReactive.minPendingPromise;f&&await f,r._componentsPromise&&await r._componentsPromise,t.updateMatch(e,l=>({...l,error:void 0,context:kt(t,s),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let c=a;if(c?.name==="AbortError"){if(n.abortController.signal.aborted){n._nonReactive.loaderPromise?.resolve(),n._nonReactive.loaderPromise=void 0;return}t.updateMatch(e,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:kt(t,s)}));return}let u=n._nonReactive.minPendingPromise;u&&await u,A(a)&&await r.options.notFoundComponent?.preload?.(),xt(t,t.router.getMatch(e),a);try{r.options.onError?.(a)}catch(d){c=d,xt(t,t.router.getMatch(e),d)}!H(c)&&!A(c)&&await Ut(r,["errorComponent"]),t.updateMatch(e,d=>({...d,error:c,context:kt(t,s),status:"error",isFetching:!1}))}}catch(n){let a=t.router.getMatch(e);a&&(a._nonReactive.loaderPromise=void 0),xt(t,a,n)}},"runLoader"),Ws=i(async(t,o,e)=>{async function s(h,m,y,g,v){let R=Date.now()-m.updatedAt,S=h?v.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:v.options.staleTime??t.router.options.defaultStaleTime??0,P=v.options.shouldReload,_=typeof P=="function"?P(kr(t,o,r,e,v)):P,{status:b,invalid:x}=g,w=R>=S&&(!!t.forceStaleReload||g.cause==="enter"||y!==void 0&&y!==g.id);a=b==="success"&&(x||(_??w)),h&&v.options.preload===!1||(a&&!t.sync&&f?(c=!0,(async()=>{try{await Lr(t,o,r,e,v);let C=t.router.getMatch(r);C._nonReactive.loaderPromise?.resolve(),C._nonReactive.loadPromise?.resolve(),C._nonReactive.loaderPromise=void 0,C._nonReactive.loadPromise=void 0}catch(C){H(C)&&await t.router.navigate(C.options)}})()):b!=="success"||a?await Lr(t,o,r,e,v):br(t,r,e))}i(s,"handleLoader");let{id:r,routeId:n}=t.matches[e],a=!1,c=!1,u=t.router.looseRoutesById[n],d=u.options.loader,f=((typeof d=="function"?void 0:d?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(Ir(t,r)){if(!t.router.getMatch(r))return t.matches[e];if(br(t,r,e),!1)return t.router.getMatch(r)}else{let h=t.router.getMatch(r),m=t.router.stores.matchesId.get()[e],y=(m&&t.router.stores.matchStores.get(m)||null)?.routeId===n?m:t.router.stores.matches.get().find(v=>v.routeId===n)?.id,g=Pe(t,r);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!t.sync&&!h.preload&&f)return h;await h._nonReactive.loaderPromise;let v=t.router.getMatch(r),R=v._nonReactive.error||v.error;R&&xt(t,v,R),v.status==="pending"&&await s(g,h,y,v,u)}else{let v=g&&!t.router.stores.matchStores.has(r),R=t.router.getMatch(r);R._nonReactive.loaderPromise=ct(),v!==R.preload&&t.updateMatch(r,S=>({...S,preload:v})),await s(g,h,y,R,u)}}let l=t.router.getMatch(r);c||(l._nonReactive.loaderPromise?.resolve(),l._nonReactive.loadPromise?.resolve(),l._nonReactive.loadPromise=void 0),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,c||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0;let p=c?l.isFetching:!1;return p!==l.isFetching||l.invalid!==!1?(t.updateMatch(r,h=>({...h,isFetching:p,invalid:!1})),t.router.getMatch(r)):l},"loadRouteMatch");async function co(t){let o=t,e=[];!!1&&As(o.router)&&ao(o);let s;for(let p=0;p<o.matches.length;p++){try{let h=Hs(o,p);vt(h)&&await h}catch(h){if(H(h))throw h;if(A(h))s=h;else if(!o.preload)throw h;break}if(o.serialError||o.firstBadMatchIndex!=null)break}let r=o.firstBadMatchIndex??o.matches.length,n=s&&!o.preload?Cr(o,s):void 0,a=s&&o.preload?0:n!==void 0?Math.min(n+1,r):r,c,u;for(let p=0;p<a;p++)e.push(Ws(o,e,p));try{await Promise.all(e)}catch{let p=await Promise.allSettled(e);for(let h of p){if(h.status!=="rejected")continue;let m=h.reason;if(H(m))throw m;A(m)?c??=m:u??=m}if(u!==void 0)throw u}let d=c??(s&&!o.preload?s:void 0),f=o.firstBadMatchIndex!==void 0?o.firstBadMatchIndex:o.matches.length-1;if(!d&&s&&o.preload)return o.matches;if(d){let p=Cr(o,d);p===void 0&&$();let h=o.matches[p],m=o.router.looseRoutesById[h.routeId],y=o.router.options?.defaultNotFoundComponent;!m.options.notFoundComponent&&y&&(m.options.notFoundComponent=y),d.routeId=h.routeId;let g=h.routeId===o.router.routeTree.id;o.updateMatch(h.id,v=>({...v,...g?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:d},isFetching:!1})),f=p,await Ut(m,["notFoundComponent"])}else if(!o.preload){let p=o.matches[0];p.globalNotFound||o.router.getMatch(p.id)?.globalNotFound&&o.updateMatch(p.id,h=>({...h,globalNotFound:!1,error:void 0}))}if(o.serialError&&o.firstBadMatchIndex!==void 0){let p=o.router.looseRoutesById[o.matches[o.firstBadMatchIndex].routeId];await Ut(p,["errorComponent"])}for(let p=0;p<=f;p++){let{id:h,routeId:m}=o.matches[p],y=o.router.looseRoutesById[m];try{let g=Vs(o,h,y);if(g){let v=await g;o.updateMatch(h,R=>({...R,...v}))}}catch(g){console.error(`Error executing head for route ${m}:`,g)}}let l=ao(o);if(vt(l)&&await l,d)throw d;if(o.serialError&&!o.preload&&!o.onReady)throw o.serialError;return o.matches}i(co,"loadMatches");function Mr(t,o){let e=o.map(s=>t.options[s]?.preload?.()).filter(Boolean);if(e.length!==0)return Promise.all(e)}i(Mr,"preloadRouteComponents");function Ut(t,o=Se){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(s=>{let{id:r,...n}=s.options;Object.assign(t.options,n),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);let e=i(()=>t._componentsLoaded?void 0:o===Se?(()=>{if(t._componentsPromise===void 0){let s=Mr(t,Se);s?t._componentsPromise=s.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():Mr(t,o),"runAfterLazy");return t._lazyPromise?t._lazyPromise.then(e):e()}i(Ut,"loadRouteChunk");function Re(t,o){return o?{status:"error",error:o}:{status:"success",value:t}}i(Re,"makeMaybe");function uo(t){for(let o of Se)if(t.options[o]?.preload)return!0;return!1}i(uo,"routeNeedsPreload");var Se=["component","errorComponent","pendingComponent","notFoundComponent"];var wt="__TSR_index",Tr="popstate",Or="beforeunload";function fo(t){let o=t.getLocation(),e=new Set,s=i(a=>{o=t.getLocation(),e.forEach(c=>c({location:o,action:a}))},"notify"),r=i(a=>{t.notifyOnIndexChange??!0?s(a):o=t.getLocation()},"handleIndexChange"),n=i(async({task:a,navigateOpts:c,...u})=>{if(c?.ignoreBlocker??!1){a();return}let d=t.getBlockers?.()??[],f=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&d.length&&f)for(let l of d){let p=Ht(u.path,u.state);if(await l.blockerFn({currentLocation:o,nextLocation:p,action:u.type})){t.onBlocked?.();return}}a()},"tryNavigation");return{get location(){return o},get length(){return t.getLength()},subscribers:e,subscribe:i(a=>(e.add(a),()=>{e.delete(a)}),"subscribe"),push:i((a,c,u)=>{let d=o.state[wt];c=lo(d+1,c),n({task:i(()=>{t.pushState(a,c),s({type:"PUSH"})},"task"),navigateOpts:u,type:"PUSH",path:a,state:c})},"push"),replace:i((a,c,u)=>{let d=o.state[wt];c=lo(d,c),n({task:i(()=>{t.replaceState(a,c),s({type:"REPLACE"})},"task"),navigateOpts:u,type:"REPLACE",path:a,state:c})},"replace"),go:i((a,c)=>{n({task:i(()=>{t.go(a),r({type:"GO",index:a})},"task"),navigateOpts:c,type:"GO"})},"go"),back:i(a=>{n({task:i(()=>{t.back(a?.ignoreBlocker??!1),r({type:"BACK"})},"task"),navigateOpts:a,type:"BACK"})},"back"),forward:i(a=>{n({task:i(()=>{t.forward(a?.ignoreBlocker??!1),r({type:"FORWARD"})},"task"),navigateOpts:a,type:"FORWARD"})},"forward"),canGoBack:i(()=>o.state[wt]!==0,"canGoBack"),createHref:i(a=>t.createHref(a),"createHref"),block:i(a=>{if(!t.setBlockers)return()=>{};let c=t.getBlockers?.()??[];return t.setBlockers([...c,a]),()=>{let u=t.getBlockers?.()??[];t.setBlockers?.(u.filter(d=>d!==a))}},"block"),flush:i(()=>t.flush?.(),"flush"),destroy:i(()=>t.destroy?.(),"destroy"),notify:s}}i(fo,"createHistory");function lo(t,o){o||(o={});let e=po();return{...o,key:e,__TSR_key:e,[wt]:t}}i(lo,"assignKeyAndIndex");function ho(t){let o=t?.window??(typeof document<"u"?window:void 0),e=o.history.pushState,s=o.history.replaceState,r=[],n=i(()=>r,"_getBlockers"),a=i(w=>r=w,"_setBlockers"),c=t?.createHref??(w=>w),u=t?.parseLocation??(()=>Ht(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state));if(!o.history.state?.__TSR_key&&!o.history.state?.key){let w=po();o.history.replaceState({[wt]:0,key:w,__TSR_key:w},"")}let d=u(),f,l=!1,p=!1,h=!1,m=!1,y=i(()=>d,"getLocation"),g,v,R=i(()=>{g&&(x._ignoreSubscribers=!0,(g.isPush?o.history.pushState:o.history.replaceState)(g.state,"",g.href),x._ignoreSubscribers=!1,g=void 0,v=void 0,f=void 0)},"flush"),S=i((w,C,M)=>{let L=c(C);v||(f=d),d=Ht(C,M),g={href:L,state:M,isPush:g?.isPush||w==="push"},v||(v=Promise.resolve().then(()=>R()))},"queueHistoryAction"),P=i(w=>{d=u(),x.notify({type:w})},"onPushPop"),_=i(async()=>{if(p){p=!1;return}let w=u(),C=w.state[wt]-d.state[wt],M=C===1,L=C===-1,I=!M&&!L||l;l=!1;let rt=I?"GO":L?"BACK":"FORWARD",K=I?{type:"GO",index:C}:{type:L?"BACK":"FORWARD"};if(h)h=!1;else{let dt=n();if(typeof document<"u"&&dt.length){for(let ne of dt)if(await ne.blockerFn({currentLocation:d,nextLocation:w,action:rt})){p=!0,o.history.go(1),x.notify(K);return}}}d=u(),x.notify(K)},"onPushPopEvent"),b=i(w=>{if(m){m=!1;return}let C=!1,M=n();if(typeof document<"u"&&M.length)for(let L of M){let I=L.enableBeforeUnload??!0;if(I===!0){C=!0;break}if(typeof I=="function"&&I()===!0){C=!0;break}}if(C)return w.preventDefault(),w.returnValue=""},"onBeforeUnload"),x=fo({getLocation:y,getLength:i(()=>o.history.length,"getLength"),pushState:i((w,C)=>S("push",w,C),"pushState"),replaceState:i((w,C)=>S("replace",w,C),"replaceState"),back:i(w=>(w&&(h=!0),m=!0,o.history.back()),"back"),forward:i(w=>{w&&(h=!0),m=!0,o.history.forward()},"forward"),go:i(w=>{l=!0,o.history.go(w)},"go"),createHref:i(w=>c(w),"createHref"),flush:R,destroy:i(()=>{o.history.pushState=e,o.history.replaceState=s,o.removeEventListener(Or,b,{capture:!0}),o.removeEventListener(Tr,_)},"destroy"),onBlocked:i(()=>{f&&d!==f&&(d=f)},"onBlocked"),getBlockers:n,setBlockers:a,notifyOnIndexChange:!1});return o.addEventListener(Or,b,{capture:!0}),o.addEventListener(Tr,_),o.history.pushState=function(...w){let C=e.apply(o.history,w);return x._ignoreSubscribers||P("PUSH"),C},o.history.replaceState=function(...w){let C=s.apply(o.history,w);return x._ignoreSubscribers||P("REPLACE"),C},x}i(ho,"createBrowserHistory");function js(t={initialEntries:["/"]}){let o=t.initialEntries,e=t.initialIndex?Math.min(Math.max(t.initialIndex,0),o.length-1):o.length-1,s=o.map((u,d)=>lo(d,void 0)),r=i(()=>Ht(o[e],s[e]),"getLocation"),n=[];return fo({getLocation:r,getLength:i(()=>o.length,"getLength"),pushState:i((u,d)=>{e<o.length-1&&(o.splice(e+1),s.splice(e+1)),s.push(d),o.push(u),e=Math.max(o.length-1,0)},"pushState"),replaceState:i((u,d)=>{s[e]=d,o[e]=u},"replaceState"),back:i(()=>{e=Math.max(e-1,0)},"back"),forward:i(()=>{e=Math.min(e+1,o.length-1)},"forward"),go:i(u=>{e=Math.min(Math.max(e+u,0),o.length-1)},"go"),createHref:i(u=>u,"createHref"),getBlockers:i(()=>n,"_getBlockers"),setBlockers:i(u=>n=u,"_setBlockers")})}i(js,"createMemoryHistory");function zs(t){let o=t.replace(/[\x00-\x1f\x7f]/g,"");return o.startsWith("//")&&(o="/"+o.replace(/^\/+/,"")),o}i(zs,"sanitizePath");function Ht(t,o){let e=zs(t),s=e.indexOf("#"),r=e.indexOf("?"),n=po();return{href:e,pathname:e.substring(0,s>0?r>0?Math.min(s,r):s:r>0?r:e.length),hash:s>-1?e.substring(s):"",search:r>-1?e.slice(r,s===-1?void 0:s):"",state:o||{[wt]:0,key:n,__TSR_key:n}}}i(Ht,"parseHref");function po(){return(Math.random()+1).toString(36).substring(7)}i(po,"createRandomKey");function ht(t,o){let e=o,s=t;return{fromLocation:e,toLocation:s,pathChanged:e?.pathname!==s.pathname,hrefChanged:e?.href!==s.href,hashChanged:e?.hash!==s.hash}}i(ht,"getLocationChangeInfo");var mo=class{static{i(this,"RouterCore")}constructor(t,o){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let s=this.options,r=this.basepath??s?.basepath??"/",n=this.basepath===void 0,a=s?.rewrite;if(this.options={...s,...e},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=hr(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=ho()),this.origin=this.options.origin,this.origin||(!!1&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let f;if(!1){let l=globalThis.__TSR_CACHE__;this.resolvePathCache=l.resolvePathCache,f=l.processRouteTreeResult}else this.resolvePathCache=yt(1e3),f=this.buildRouteTree(),!1;this.setRoutes(f)}if(!this.stores&&this.latestLocation){let f=this.getStoreConfig(this);this.batch=f.batch,this.stores=_r(Fr(this.latestLocation),f),vr(this)}let c=!1,u=this.options.basepath??"/",d=this.options.rewrite;if(n||r!==u||a!==d){this.basepath=u;let f=[],l=Qt(u);l&&l!=="/"&&f.push(wr({basepath:u})),d&&f.push(d),this.rewrite=f.length===0?void 0:f.length===1?f[0]:xr(f),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=lr(this.routeTree,this.options.caseSensitive,(s,r)=>{s.init({originalIndex:r})});return this.options.routeMasks&&ir(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,s)=>{let r={eventType:e,fn:s};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=e=>{this.subscribers.forEach(s=>{s.eventType===e.type&&s.fn(e)})},this.parseLocation=(e,s)=>{let r=i(({pathname:u,search:d,hash:f,href:l,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(u)){let v=this.options.parseSearch(d),R=this.options.stringifySearch(v);return{href:u+R+f,publicHref:u+R+f,pathname:At(u).path,external:!1,searchStr:R,search:gt(s?.search,v),hash:At(f.slice(1)).path,state:at(s?.state,p)}}let h=new URL(l,this.origin),m=ye(this.rewrite,h),y=this.options.parseSearch(m.search),g=this.options.stringifySearch(y);return m.search=g,{href:m.href.replace(m.origin,""),publicHref:l,pathname:At(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:g,search:gt(s?.search,y),hash:At(m.hash.slice(1)).path,state:at(s?.state,p)}},"parse"),n=r(e),{__tempLocation:a,__tempKey:c}=n.state;if(a&&(!c||c===this.tempLocationKey)){let u=r(a);return u.state.key=n.state.key,u.state.__TSR_key=n.state.__TSR_key,delete u.state.__tempLocation,{...u,maskedLocation:n}}return n},this.resolvePathWithBase=(e,s)=>Qe({base:e,to:s.includes("//")?Zt(s):s,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,s,r)=>typeof e=="string"?this.matchRoutesInternal({pathname:e,search:s},r):this.matchRoutesInternal(e,s),this.getMatchedRoutes=e=>Ar({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let s=this.getMatch(e);s&&(s.abortController.abort(),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let s=this.stores.matchStores.get(e)?.get();s&&(s.status==="pending"||s.isFetching==="loader")&&this.cancelMatch(e)})},this.buildLocation=e=>{let s=i((n={})=>{let a=n._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(a);n.from;let u=n.unsafeRelative==="path"?a.pathname:n.from??c.fullPath,d=n.to?`${n.to}`:void 0,f=c.search,l=Object.assign(Object.create(null),c.params),p=d?.charCodeAt(0)===47?"/":this.resolvePathWithBase(u,"."),h=d?this.resolvePathWithBase(p,d):p,m=n.params===!1||n.params===null?Object.create(null):(n.params??!0)===!0?l:Object.assign(l,Y(n.params,l)),y=this.routesByPath[Z(h)],g;if(y)g=this.getRouteBranch(y);else if(h.includes("$"))g=[];else{let L=this.getMatchedRoutes(h);g=L.matchedRoutes,this.options.notFoundRoute&&(!L.foundRoute||L.foundRoute.path!=="/"&&L.routeParams["**"])&&(g=[...g,this.options.notFoundRoute])}if(g.length&&mt(m))for(let L of g){let I=L.options.params?.stringify??L.options.stringifyParams;if(I)try{Object.assign(m,I(m))}catch{}}let v=e.leaveParams?h:At(me({path:h,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,R=f;if(e._includeValidateSearch&&this.options.search?.strict){let L={};g.forEach(I=>{if(I.options.validateSearch)try{Object.assign(L,xe(I.options.validateSearch,{...L,...R}))}catch{}}),R=L}R=Ks({search:R,dest:n,destRoutes:g,_includeValidateSearch:e._includeValidateSearch}),R=gt(f,R);let S=this.options.stringifySearch(R),P=n.hash===!0?a.hash:n.hash?Y(n.hash,a.hash):void 0,_=P?`#${P}`:"",b=n.state===!0?a.state:n.state?Y(n.state,a.state):{};b=at(a.state,b);let x=`${v}${S}${_}`,w,C,M=!1;if(this.rewrite){let L=new URL(x,this.origin),I=oo(this.rewrite,L);w=L.href.replace(L.origin,""),I.origin!==this.origin?(C=I.href,M=!0):C=I.pathname+I.search+I.hash}else w=or(x),C=w;return{publicHref:C,href:w,pathname:v,search:R,searchStr:S,state:b,hash:P??"",external:M,unmaskOnReload:n.unmaskOnReload}},"build"),r=i((n={},a)=>{let c=s(n),u=a?s(a):void 0;if(!u){let d=Object.create(null);if(this.options.routeMasks){let f=ar(c.pathname,this.processedTree);if(f){Object.assign(d,f.rawParams);let{from:l,params:p,...h}=f.route,m=p===!1||p===null?Object.create(null):(p??!0)===!0?d:Object.assign(d,Y(p,d));a={from:e.from,...h,params:m},u=s(a)}}}return u&&(c.maskedLocation=u),c},"buildWithMatches");return e.mask?r(e,{from:e.from,...e.mask}):r(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:s,...r})=>{let n,a=i(()=>{let d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(l=>{r.state[l]=this.latestLocation.state[l]});let f=st(r.state,this.latestLocation.state);return d.forEach(l=>{delete r.state[l]}),f},"isSameState"),c=Z(this.latestLocation.href)===Z(r.href),u=this.commitLocationPromise;if(this.commitLocationPromise=ct(()=>{u?.resolve(),u=void 0}),c&&a())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...l}=r;d&&(l={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...l,search:l.searchStr,state:{...l.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(l.unmaskOnReload??this.options.unmaskOnReload??!1)&&(l.state.__tempKey=this.tempLocationKey)),l.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,n=r.replace?"REPLACE":"PUSH",this.history[n==="REPLACE"?"replace":"push"](l.publicHref,l.state,{ignoreBlocker:s})}return this._scroll.next=r.resetScroll??!0,this.history.subscribers.size||this.load(n?{action:{type:n}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:s,hashScrollIntoView:r,viewTransition:n,ignoreBlocker:a,href:c,...u}={})=>{if(c){let l=this.history.location.state.__TSR_index,p=Ht(c,{__TSR_index:e?l:l+1}),h=new URL(p.pathname,this.origin);u.to=ye(this.rewrite,h).pathname,u.search=this.options.parseSearch(p.search),u.hash=p.hash.slice(1)}let d=this.buildLocation({...u,_includeValidateSearch:!0});this.pendingBuiltLocation=d;let f=this.commitLocation({...d,viewTransition:n,replace:e,resetScroll:s,hashScrollIntoView:r,ignoreBlocker:a});return queueMicrotask(()=>{this.pendingBuiltLocation===d&&(this.pendingBuiltLocation=void 0)}),f},this.navigate=async({to:e,reloadDocument:s,href:r,publicHref:n,...a})=>{let c=!1;if(r)try{new URL(`${r}`),c=!0}catch{}if(c&&!s&&(s=!0),s){if(e!==void 0||!r){let d=this.buildLocation({to:e,...a});r=r??d.publicHref,n=n??d.publicHref}let u=!c&&n?n:r;if(ut(u,this.protocolAllowlist))return;if(!a.ignoreBlocker){let d=this.history.getBlockers?.()??[];for(let f of d)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}a.replace?window.location.replace(u):window.location.href=u;return}return this.buildAndCommitLocation({...a,href:r,to:e,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),!1){let r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==r.publicHref){let n=this.getParsedLocationHref(r);throw r.external?$t({href:n}):$t({href:n,_builtLocation:r})}}let e=this.matchRoutes(this.latestLocation),s=this.stores.cachedMatches.get().filter(r=>!e.some(n=>n.id===r.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(s)})},this.load=async e=>{let s=e?.action?.type,r,n,a,c=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad(),s&&(this._scroll.hash=s==="PUSH"||s==="REPLACE");let f=this.latestLocation,l=ht(f,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...l}),this.emit({type:"onBeforeLoad",...l}),await co({router:this,sync:e?.sync,forceStaleReload:c.href===f.href,matches:this.stores.pendingMatches.get(),location:f,updateMatch:this.updateMatch,onReady:i(async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let p=null,h=null,m=null,y=null;this.batch(()=>{let g=this.stores.pendingMatches.get(),v=g.length,R=this.stores.matches.get();p=v?R.filter(_=>!this.stores.pendingMatchStores.has(_.id)):null;let S=new Set;for(let _ of this.stores.pendingMatchStores.values())_.routeId&&S.add(_.routeId);let P=new Set;for(let _ of this.stores.matchStores.values())_.routeId&&P.add(_.routeId);h=v?R.filter(_=>!S.has(_.routeId)):null,m=v?g.filter(_=>!P.has(_.routeId)):null,y=v?g.filter(_=>P.has(_.routeId)):R,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),v&&(this.stores.setMatches(g),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...p.filter(_=>_.status!=="error"&&_.status!=="notFound"&&_.status!=="redirected")]),this.clearExpiredCache())});for(let[g,v]of[[h,"onLeave"],[m,"onEnter"],[y,"onStay"]])if(g)for(let R of g)this.looseRoutesById[R.routeId].options[v]?.(R)})})},"onReady")})}catch(f){H(f)?(r=f,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):A(f)&&(n=f);let l=r?r.status:n?404:this.stores.matches.get().some(p=>p.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(l),this.stores.redirect.set(r)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.stores.matches.get().some(d=>d.status==="error")&&(u=500),u!==void 0&&this.stores.statusCode.set(u)},this.startViewTransition=e=>{let s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;if(typeof s=="object"&&this.isViewTransitionTypesSupported){let n=this.latestLocation,a=this.stores.resolvedLocation.get(),c=typeof s.types=="function"?s.types(ht(n,a)):s.types;if(c===!1){e();return}r={update:e,types:c}}else r=e;document.startViewTransition(r)}else e()},this.updateMatch=(e,s)=>{this.startTransition(()=>{let r=this.stores.pendingMatchStores.get(e);if(r){r.set(s);return}let n=this.stores.matchStores.get(e);if(n){n.set(s);return}let a=this.stores.cachedMatchStores.get(e);if(a){let c=s(a.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(u=>u.filter(d=>d!==e)):a.set(c)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let s=i(r=>e?.filter?.(r)??!0?{...r,invalid:!0,...e?.forcePending||r.status==="error"||r.status==="notFound"?{status:"pending",error:void 0}:void 0}:r,"invalidate");return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(s)),this.stores.setCached(this.stores.cachedMatches.get().map(s)),this.stores.setPending(this.stores.pendingMatches.get().map(s))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||"/",this.resolveRedirect=e=>{let s=e.headers.get("Location");if(!e.options.href||e.options._builtLocation){let r=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(r);e.options.href=n,e.headers.set("Location",n)}else if(s)try{let r=new URL(s);if(this.origin&&r.origin===this.origin){let n=r.pathname+r.search+r.hash;e.options.href=n,e.headers.set("Location",n)}}catch{}if(e.options.href&&!e.options._builtLocation&&ut(e.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return e.headers.get("Location")||e.headers.set("Location",e.options.href),e},this.clearCache=e=>{let s=e?.filter;s!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(r=>!s(r))):this.stores.setCached([])},this.clearExpiredCache=()=>{let e=Date.now(),s=i(r=>{let n=this.looseRoutesById[r.routeId];if(!n.options.loader)return!0;let a=(r.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:e-r.updatedAt>=a},"filter");this.clearCache({filter:s})},this.loadRouteChunk=Ut,this.preloadRoute=async e=>{let s=e._builtLocation??this.buildLocation(e),r=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:e}),n=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...n,...this.stores.cachedIds.get()]),c=r.filter(u=>!a.has(u.id));if(c.length){let u=this.stores.cachedMatches.get();this.stores.setCached([...u,...c])}try{return r=await co({router:this,matches:r,location:s,preload:!0,updateMatch:i((u,d)=>{n.has(u)?r=r.map(f=>f.id===u?d(f):f):this.updateMatch(u,d)},"updateMatch")}),r}catch(u){if(H(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:s});A(u)||console.error(u);return}},this.matchRoute=(e,s)=>{let r={...e,to:e.to?this.resolvePathWithBase(e.from||"",e.to):void 0,params:e.params||{},leaveParams:!0},n=this.buildLocation(r);if(s?.pending&&this.stores.status.get()!=="pending")return!1;let a=(s?.pending===void 0?!this.stores.isLoading.get():s.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=cr(n.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,a.pathname,this.processedTree);return!c||e.params&&!st(c.rawParams,e.params,{partial:!0})?!1:s?.includeSearch??!0?st(a.search,n.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status==="notFound"||e.globalNotFound),this.getStoreConfig=o,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Pr,parseSearch:t.parseSearch??Sr,protocolAllowlist:t.protocolAllowlist??qe}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:o,processedTree:e}){this.routesById=t,this.routesByPath=o,this.processedTree=e;let s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)}getRouteBranch(t){let o=this.routeBranchCache.get(t);return o||(o=Ze(t),this.routeBranchCache.set(t,o)),o}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,o){let e=this.getMatchedRoutes(t.pathname),{foundRoute:s,routeParams:r}=e,{matchedRoutes:n}=e,a=!1;(s?s.path!=="/"&&r["**"]:Z(t.pathname))&&(this.options.notFoundRoute?n=[...n,this.options.notFoundRoute]:a=!0);let c=a?Gs(this.options.notFoundMode,n):void 0,u=new Array(n.length),d=new Map;for(let f of this.stores.matchStores.values())f.routeId&&d.set(f.routeId,f.get());for(let f=0;f<n.length;f++){let l=n[f],p=u[f-1],h,m,y;{let I=p?.search??t.search,rt=p?._strictSearch??void 0;try{let K=xe(l.options.validateSearch,{...I})??void 0;h={...I,...K},m={...rt,...K},y=void 0}catch(K){let dt=K;if(K instanceof ee||(dt=new ee(K.message,{cause:K})),o?.throwOnError)throw dt;h=I,m={},y=dt}}let g=l.options.loaderDeps?.({search:h})??"",v=g?JSON.stringify(g):"",{interpolatedPath:R,usedParams:S}=me({path:l.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),P=l.id+R+v,_=this.getMatch(P),b=d.get(l.id),x=_?._strictParams??S,w;if(!_)try{Nr(l,x)}catch(I){if(A(I)||H(I)?w=I:w=new Dr(I.message,{cause:I}),o?.throwOnError)throw w}Object.assign(r,x);let C=b?"stay":"enter",M;if(_)M={..._,cause:C,params:b?.params??r,_strictParams:x,search:b?gt(b.search,h):gt(_.search,h),_strictSearch:m};else{let I=l.options.loader||l.options.beforeLoad||l.lazyFn||uo(l)?"pending":"success";M={id:P,ssr:l.options.ssr,index:f,routeId:l.id,params:b?.params??r,_strictParams:x,pathname:R,updatedAt:Date.now(),search:b?gt(b.search,h):h,_strictSearch:m,searchError:void 0,status:I,isFetching:!1,error:void 0,paramsError:w,__routeContext:void 0,_nonReactive:{loadPromise:ct()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:C,loaderDeps:b?at(b.loaderDeps,g):g,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:l.options.staticData||{},fullPath:l.fullPath}}o?.preload||(M.globalNotFound=c===l.id),M.searchError=y;let L=this.getParentContext(p);M.context={...L,...M.__routeContext,...M.__beforeLoadContext},u[f]=M}for(let f=0;f<u.length;f++){let l=u[f],p=this.looseRoutesById[l.routeId],h=this.getMatch(l.id),m=d.get(l.routeId);if(l.params=m?gt(m.params,r):r,!h){let y=u[f-1],g=this.getParentContext(y);if(p.options.context){let v={deps:l.loaderDeps,params:l.params,context:g??{},location:t,navigate:i(R=>this.navigate({...R,_fromLocation:t}),"navigate"),buildLocation:this.buildLocation,cause:l.cause,abortController:l.abortController,preload:!!l.preload,matches:u,routeId:p.id};l.__routeContext=p.options.context(v)??void 0}l.context={...g,...l.__routeContext,...l.__beforeLoadContext}}}return u}matchRoutesLightweight(t){let o=pt(this.stores.matchesId.get()),e=this.lightweightCache.get(t);if(e&&e[0]===o)return e[1];let{matchedRoutes:s,routeParams:r}=this.getMatchedRoutes(t.pathname),n=pt(s),a={...t.search};for(let l of s)try{Object.assign(a,xe(l.options.validateSearch,a))}catch{}let c=o&&this.stores.matchStores.get(o)?.get(),u=c&&c.routeId===n.id&&c.pathname===t.pathname,d;if(u)d=c.params;else{let l=Object.assign(Object.create(null),r);for(let p of s)try{Nr(p,l)}catch{}d=l}let f={matchedRoutes:s,fullPath:n.fullPath,search:a,params:d};return this.lightweightCache.set(t,[o,f]),f}},ee=class extends Error{static{i(this,"SearchParamError")}},Dr=class extends Error{static{i(this,"PathParamError")}};function Fr(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}i(Fr,"getInitialRouterState");function xe(t,o){if(t==null)return{};if("~standard"in t){let e=t["~standard"].validate(o);if(e instanceof Promise)throw new ee("Async validation not supported");if(e.issues)throw new ee(JSON.stringify(e.issues,void 0,2),{cause:e});return e.value}return"parse"in t?t.parse(o):typeof t=="function"?t(o):{}}i(xe,"validateSearch");function Ar({pathname:t,routesById:o,processedTree:e}){let s=Object.create(null),r=Z(t),n,a=ur(r,e,!0);return a&&(n=a.route,Object.assign(s,a.rawParams)),{matchedRoutes:a?.branch||[o.__root__],routeParams:s,foundRoute:n}}i(Ar,"getMatchedRoutes");function Ks({search:t,dest:o,destRoutes:e,_includeValidateSearch:s}){return qs(e)(t,o,s??!1)}i(Ks,"applySearchMiddleware");function qs(t){let o,e,s=[];for(let n of t){let a=n.options;if("search"in a)a.search?.middlewares&&s.push(...a.search.middlewares);else if(a.preSearchFilters||a.postSearchFilters){let u=i(({search:d,next:f})=>{let l=f(a.preSearchFilters?a.preSearchFilters.reduce((p,h)=>h(p),d):d);return a.postSearchFilters?a.postSearchFilters.reduce((p,h)=>h(p),l):l},"legacyMiddleware");s.push(u)}let c=a.validateSearch;if(c){let u=i(({search:d,next:f,meta:l})=>{let p=f(d);if(e)try{let h=xe(c,p);if(l&&h)for(let m in h)m in p||(l.defaulted||=new Map).set(m,h[m]);return{...p,...h}}catch{}return p},"validate");s.push(u)}}let r=i((n,a,c)=>{if(n>=s.length){if(!o.search)return{};if(o.search===!0)return a;let d=Y(o.search,a);return c&&(c.explicit=d),d}let u=i((d,f)=>{if(f){let l=c||{};return{search:r(n+1,d,l),meta:l}}return r(n+1,d,c)},"next");return s[n]({search:a,next:u,meta:c})},"applyNext");return i(function(a,c,u){return o=c,e=u,r(0,a)},"middleware")}i(qs,"buildMiddlewareChain");function Gs(t,o){if(t!=="root")for(let e=o.length-1;e>=0;e--){let s=o[e];if(s.children)return s.id}return X}i(Gs,"findGlobalNotFoundRouteId");function Nr(t,o){let e=t.options.params?.parse??t.options.parseParams;if(e){let s=e(o);if(s===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(o,s)}}i(Nr,"extractStrictParams");var go="Error preloading route! \u261D\uFE0F";var we=class{static{i(this,"BaseRoute")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=o=>{this.originalIndex=o.originalIndex;let e=this.options,s=!e?.path&&!e?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=X:this.parentRoute||$();let r=s?X:e?.path;r&&r!=="/"&&(r=he(r));let n=e?.id||r,a=s?X:Et([this.parentRoute.id==="__root__"?"":this.parentRoute.id,n]);r==="__root__"&&(r="/"),a!=="__root__"&&(a=Et(["/",a]));let c=a==="__root__"?"/":Et([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=c,this._to=Z(c)},this.addChildren=o=>this._addFileChildren(o),this._addFileChildren=o=>(Array.isArray(o)&&(this.children=o),typeof o=="object"&&o!==null&&(this.children=Object.values(o)),this),this._addFileTypes=()=>this,this.updateLoader=o=>(Object.assign(this.options,o),this),this.update=o=>(Object.assign(this.options,o),this),this.lazy=o=>(this.lazyFn=o,this),this.redirect=o=>$t({from:this.fullPath,...o}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}};var vo=class extends we{static{i(this,"BaseRootRoute")}constructor(t){super(t)}};var Me=k(W(),1);var F=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(F||{});function Br({update:t,notify:o,unwatched:e}){return{link:s,unlink:r,propagate:n,checkDirty:a,shallowPropagate:c};function s(d,f,l){let p=f.depsTail;if(p!==void 0&&p.dep===d)return;let h=p!==void 0?p.nextDep:f.deps;if(h!==void 0&&h.dep===d){h.version=l,f.depsTail=h;return}let m=d.subsTail;if(m!==void 0&&m.version===l&&m.sub===f)return;let y=f.depsTail=d.subsTail={version:l,dep:d,sub:f,prevDep:p,nextDep:h,prevSub:m,nextSub:void 0};h!==void 0&&(h.prevDep=y),p!==void 0?p.nextDep=y:f.deps=y,m!==void 0?m.nextSub=y:d.subs=y}function r(d,f=d.sub){let l=d.dep,p=d.prevDep,h=d.nextDep,m=d.nextSub,y=d.prevSub;return h!==void 0?h.prevDep=p:f.depsTail=p,p!==void 0?p.nextDep=h:f.deps=h,m!==void 0?m.prevSub=y:l.subsTail=y,y!==void 0?y.nextSub=m:(l.subs=m)===void 0&&e(l),h}function n(d){let f=d.nextSub,l;t:do{let p=d.sub,h=p.flags;if(h&60?h&12?h&4?!(h&48)&&u(d,p)?(p.flags=h|40,h&=1):h=0:p.flags=h&-9|32:h=0:p.flags=h|32,h&2&&o(p),h&1){let m=p.subs;if(m!==void 0){let y=(d=m).nextSub;y!==void 0&&(l={value:f,prev:l},f=y);continue}}if((d=f)!==void 0){f=d.nextSub;continue}for(;l!==void 0;)if(d=l.value,l=l.prev,d!==void 0){f=d.nextSub;continue t}break}while(!0)}function a(d,f){let l,p=0,h=!1;t:do{let m=d.dep,y=m.flags;if(f.flags&16)h=!0;else if((y&17)===17){if(t(m)){let g=m.subs;g.nextSub!==void 0&&c(g),h=!0}}else if((y&33)===33){(d.nextSub!==void 0||d.prevSub!==void 0)&&(l={value:d,prev:l}),d=m.deps,f=m,++p;continue}if(!h){let g=d.nextDep;if(g!==void 0){d=g;continue}}for(;p--;){let g=f.subs,v=g.nextSub!==void 0;if(v?(d=l.value,l=l.prev):d=g,h){if(t(f)){v&&c(g),f=d.sub;continue}h=!1}else f.flags&=-33;f=d.sub;let R=d.nextDep;if(R!==void 0){d=R;continue t}}return h}while(!0)}function c(d){do{let f=d.sub,l=f.flags;(l&48)===32&&(f.flags=l|16,(l&6)===2&&o(f))}while((d=d.nextSub)!==void 0)}function u(d,f){let l=f.depsTail;for(;l!==void 0;){if(l===d)return!0;l=l.prevDep}return!1}}i(Br,"createReactiveSystem");function Hr(t,o,e){let s=typeof t=="object",r=s?t:void 0;return{next:(s?t.next:t)?.bind(r),error:(s?t.error:o)?.bind(r),complete:(s?t.complete:e)?.bind(r)}}i(Hr,"toObserver");var yo=[],Ce=0,{link:$r,unlink:Xs,propagate:Zs,checkDirty:Vr,shallowPropagate:Ur}=Br({update(t){return t._update()},notify(t){yo[Ro++]=t,t.flags&=~F.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=F.Mutable|F.Dirty,be(t))}}),_e=0,Ro=0,lt,So=0;function oe(t){try{++So,t()}finally{--So||Po()}}i(oe,"batch");function be(t){let o=t.depsTail,e=o!==void 0?o.nextDep:t.deps;for(;e!==void 0;)e=Xs(e,t)}i(be,"purgeDeps");function Po(){if(!(So>0)){for(;_e<Ro;){let t=yo[_e];yo[_e++]=void 0,t.notify()}_e=0,Ro=0}}i(Po,"flush");function Le(t,o){let e=typeof t=="function",s=t,r={_snapshot:e?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:e?F.None:F.Mutable,get(){return lt!==void 0&&$r(r,lt,Ce),r._snapshot},subscribe(n){let a=Hr(n),c={current:!1},u=Qs(()=>{r.get(),c.current?a.next?.(r._snapshot):c.current=!0});return{unsubscribe:i(()=>{u.stop()},"unsubscribe")}},_update(n){let a=lt,c=o?.compare??Object.is;if(e)lt=r,++Ce,r.depsTail=void 0;else if(n===void 0)return!1;e&&(r.flags=F.Mutable|F.RecursedCheck);try{let u=r._snapshot,d=typeof n=="function"?n(u):n===void 0&&e?s(u):n;return u===void 0||!c(u,d)?(r._snapshot=d,!0):!1}finally{lt=a,e&&(r.flags&=~F.RecursedCheck),be(r)}}};return e?(r.flags=F.Mutable|F.Dirty,r.get=function(){let n=r.flags;if(n&F.Dirty||n&F.Pending&&Vr(r.deps,r)){if(r._update()){let a=r.subs;a!==void 0&&Ur(a)}}else n&F.Pending&&(r.flags=n&~F.Pending);return lt!==void 0&&$r(r,lt,Ce),r._snapshot}):r.set=function(n){if(r._update(n)){let a=r.subs;a!==void 0&&(Zs(a),Ur(a),Po())}},r}i(Le,"createAtom");function Qs(t){let o=i(()=>{let s=lt;lt=e,++Ce,e.depsTail=void 0,e.flags=F.Watching|F.RecursedCheck;try{return t()}finally{lt=s,e.flags&=~F.RecursedCheck,be(e)}},"run"),e={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:F.Watching|F.RecursedCheck,notify(){let s=this.flags;s&F.Dirty||s&F.Pending&&Vr(this.deps,this)?o():this.flags=F.Watching},stop(){this.flags=F.None,this.depsTail=void 0,be(this)}};return o(),e}i(Qs,"effect");var xo=k(W(),1),Wr=k(Rs(),1);function tn(t,o){return t===o}i(tn,"defaultCompare");function B(t,o,e=tn){let s=(0,xo.useCallback)(a=>{if(!t)return()=>{};let{unsubscribe:c}=t.subscribe(a);return c},[t]),r=(0,xo.useCallback)(()=>t?.get(),[t]);return(0,Wr.useSyncExternalStoreWithSelector)(s,r,r,o,e)}i(B,"useStore");var wo={get(){},subscribe(){return{unsubscribe(){}}}};function _o(t,o){let e=Me.useRef();return s=>{let r=t?.select?t.select(s):s;return t?.structuralSharing??o.options.defaultStructuralSharing?e.current=at(e.current,r):r}}i(_o,"useStructuralSharing");function Q(t){let o=D(),e=Me.useContext(t.from?Yo:Mt),s=t.from?o.stores.getRouteMatchStore(t.from):o.stores.matchStores.get(e);if(!1){let a=s?.get();if(!a){(t.shouldThrow??!0)&&$();return}return t.select?t.select(a):a}let r=_o(t,o),n=B(s??wo,a=>a?r(a):wo);if(n!==wo)return n;(t.shouldThrow??!0)&&$()}i(Q,"useMatch");function Ie(t){return Q({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:i(o=>t.select?t.select(o.search):o.search,"select")})}i(Ie,"useSearch");var nt=k(W(),1);var Tt=typeof window<"u"?nt.useLayoutEffect:nt.useEffect;function Ee(t){let o=nt.useRef({value:t,prev:null}),e=o.current.value;return t!==e&&(o.current={value:t,prev:e}),o.current.prev}i(Ee,"usePrevious");function jr(t,o,e={},s={}){nt.useEffect(()=>{if(!t.current||s.disabled||typeof IntersectionObserver!="function")return;let r=new IntersectionObserver(([n])=>{o(n)},e);return r.observe(t.current),()=>{r.disconnect()}},[o,e,s.disabled,t])}i(jr,"useIntersectionObserver");function zr(t){let o=nt.useRef(null);return nt.useImperativeHandle(t,()=>o.current,[]),o}i(zr,"useForwardedRef");var Co=k(W(),1);function ke(t){let o=D();return Co.useCallback(e=>o.navigate({...e,from:e.from??t?.from}),[t?.from,o])}i(ke,"useNavigate");var Vt=k(W(),1),it=k(ot(),1);function Ot(t){let o=t.errorComponent??Nt;return(0,it.jsx)(en,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:i(({error:e,reset:s})=>e?Vt.createElement(o,{error:e,reset:s}):t.children,"children")})}i(Ot,"CatchBoundary");var en=class extends Vt.Component{static{i(this,"CatchBoundaryImpl")}constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,o){let e=t.getResetKey();return o.error&&o.resetKey!==e?{resetKey:e,error:null}:{resetKey:e}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,o){this.props.onCatch&&this.props.onCatch(t,o)}render(){return this.props.children({error:this.state.error,reset:i(()=>{this.reset()},"reset")})}};function Nt({error:t}){let[o,e]=Vt.useState(!1);return(0,it.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,it.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,it.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,it.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:i(()=>e(s=>!s),"onClick"),children:o?"Hide Error":"Show Error"})]}),(0,it.jsx)("div",{style:{height:".25rem"}}),o?(0,it.jsx)("div",{children:(0,it.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?(0,it.jsx)("code",{children:t.message}):null})}):null]})}i(Nt,"ErrorComponent");var Te=k(W(),1),bo=k(ot(),1);function Kr({children:t,fallback:o=null}){return Lo()?(0,bo.jsx)(Te.default.Fragment,{children:t}):(0,bo.jsx)(Te.default.Fragment,{children:o})}i(Kr,"ClientOnly");function Lo(){return Te.default.useSyncExternalStore(on,()=>!0,()=>!1)}i(Lo,"useHydrated");function on(){return()=>{}}i(on,"subscribe");function Mo(t){return Q({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:i(o=>t.select?t.select(o.loaderData):o.loaderData,"select")})}i(Mo,"useLoaderData");function Io(t){let{select:o,...e}=t;return Q({...e,select:i(s=>o?o(s.loaderDeps):s.loaderDeps,"select")})}i(Io,"useLoaderDeps");function Eo(t){return Q({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:i(o=>{let e=t.strict===!1?o.params:o._strictParams;return t.select?t.select(e):e},"select")})}i(Eo,"useParams");function ko(t){return Q({...t,select:i(o=>t.select?t.select(o.context):o.context,"select")})}i(ko,"useRouteContext");var U=k(W(),1),rn=k(ot(),1);var Zr=k(ys(),1);function sn(t,o){let e=D(),s=zr(o),r=!1,{activeProps:n,inactiveProps:a,activeOptions:c,to:u,preload:d,preloadDelay:f,preloadIntentProximity:l,hashScrollIntoView:p,replace:h,startTransition:m,resetScroll:y,viewTransition:g,children:v,target:R,disabled:S,style:P,className:_,onClick:b,onBlur:x,onFocus:w,onMouseEnter:C,onMouseLeave:M,onTouchStart:L,ignoreBlocker:I,params:rt,search:K,hash:dt,state:ne,mask:tt,reloadDocument:zt,unsafeRelative:Fo,from:Ao,_fromLocation:ie,...Dt}=t;if(r){let O=Xr(u);if(typeof u=="string"&&!O&&u.indexOf(":")>-1)try{return new URL(u),ut(u,e.protocolAllowlist)?{...Dt,ref:s,href:void 0,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_}}:{...Dt,ref:s,href:u,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_}}}catch{}let T=e.buildLocation({...t,from:t.from}),et=Yr(T.maskedLocation?T.maskedLocation.publicHref:T.publicHref,T.maskedLocation?T.maskedLocation.external:T.external,e.history,S),Jt=(()=>{if(et?.external)return ut(et.href,e.protocolAllowlist)?void 0:et.href;if(!O&&typeof u=="string"&&u.indexOf(":")>-1)try{return new URL(u),ut(u,e.protocolAllowlist)?void 0:u}catch{}})(),Ve=(()=>{if(Jt)return!1;let V=e.stores.location.get(),G=c?.exact??!1;if(G){if(!pe(V.pathname,T.pathname,e.basepath))return!1}else{let j=Pt(V.pathname,e.basepath),J=Pt(T.pathname,e.basepath);if(!(j.startsWith(J)&&(j.length===J.length||j[J.length]==="/")))return!1}if((c?.includeSearch??!0)&&V.search!==T.search){let j=!V.search||typeof V.search=="object"&&!mt(V.search),J=!T.search||typeof T.search=="object"&&!mt(T.search);if(!(j&&J)&&!st(V.search,T.search,{partial:!G,ignoreUndefined:!c?.explicitUndefined}))return!1}return!c?.includeHash})();if(Jt)return{...Dt,ref:s,href:Jt,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_}};let We=Ve?Y(n,{})??qr:Wt,je=Ve?Wt:Y(a,{})??Wt,Ko=(()=>{let V=P,G=We.style,j=je.style;if(!(!V&&!G&&!j))return V&&!G&&!j?V:!V&&G&&!j?G:!V&&!G&&j?j:{...V,...G,...j}})(),qo=(()=>{let V=_,G=We.className,j=je.className;if(!V&&!G&&!j)return"";let J="";return V&&(J=V),G&&(J=J?`${J} ${G}`:G),j&&(J=J?`${J} ${j}`:j),J})();return{...Dt,...We,...je,href:et?.href,ref:s,disabled:!!S,target:R,...Ko&&{style:Ko},...qo&&{className:qo},...S&&Gr,...Ve&&Jr}}let $e=Lo(),Kt=U.useMemo(()=>t,[e,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),bt=B(e.stores.location,O=>O,(O,T)=>O.href===T.href),q=U.useMemo(()=>{let O={_fromLocation:bt,...Kt};return e.buildLocation(O)},[e,bt,Kt]),Bo=q.maskedLocation?q.maskedLocation.publicHref:q.publicHref,$o=q.maskedLocation?q.maskedLocation.external:q.external,qt=U.useMemo(()=>Yr(Bo,$o,e.history,S),[S,$o,Bo,e.history]),Gt=U.useMemo(()=>{if(qt?.external)return ut(qt.href,e.protocolAllowlist)?void 0:qt.href;if(!Xr(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),ut(u,e.protocolAllowlist)?void 0:u}catch{}},[u,qt,e.protocolAllowlist]),Ue=U.useMemo(()=>{if(Gt)return!1;if(c?.exact){if(!pe(bt.pathname,q.pathname,e.basepath))return!1}else{let O=Pt(bt.pathname,e.basepath),T=Pt(q.pathname,e.basepath);if(!(O.startsWith(T)&&(O.length===T.length||O[T.length]==="/")))return!1}return(c?.includeSearch??!0)&&!st(bt.search,q.search,{partial:!c?.exact,ignoreUndefined:!c?.explicitUndefined})?!1:c?.includeHash?$e&&bt.hash===q.hash:!0},[c?.exact,c?.explicitUndefined,c?.includeHash,c?.includeSearch,bt,Gt,$e,q.hash,q.pathname,q.search,e.basepath]),ae=Ue?Y(n,{})??qr:Wt,ce=Ue?Wt:Y(a,{})??Wt,Uo=[_,ae.className,ce.className].filter(Boolean).join(" "),Ho=(P||ae.style||ce.style)&&{...P,...ae.style,...ce.style},[ms,Vo]=U.useState(!1),Wo=U.useRef(!1),Ft=t.reloadDocument||Gt?!1:d??e.options.defaultPreload,He=f??e.options.defaultPreloadDelay??0,Lt=U.useCallback(()=>{e.preloadRoute({...Kt,_builtLocation:q}).catch(O=>{console.warn(O),console.warn(go)})},[e,Kt,q]);jr(s,U.useCallback(O=>{O?.isIntersecting&&Lt()},[Lt]),an,{disabled:!!S||Ft!=="viewport"}),U.useEffect(()=>{Wo.current||!S&&Ft==="render"&&(Lt(),Wo.current=!0)},[S,Lt,Ft]);let gs=i(O=>{let T=O.currentTarget.getAttribute("target"),et=R!==void 0?R:T;if(!S&&!cn(O)&&!O.defaultPrevented&&(!et||et==="_self")&&O.button===0){O.preventDefault(),(0,Zr.flushSync)(()=>{Vo(!0)});let Jt=e.subscribe("onResolved",()=>{Jt(),Vo(!1)});e.navigate({...Kt,replace:h,resetScroll:y,hashScrollIntoView:p,startTransition:m,viewTransition:g,ignoreBlocker:I})}},"handleClick");if(Gt)return{...Dt,ref:s,href:Gt,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_},...b&&{onClick:b},...x&&{onBlur:x},...w&&{onFocus:w},...C&&{onMouseEnter:C},...M&&{onMouseLeave:M},...L&&{onTouchStart:L}};let jo=i(O=>{if(S||Ft!=="intent")return;if(!He){Lt();return}let T=O.currentTarget;if(re.has(T))return;let et=setTimeout(()=>{re.delete(T),Lt()},He);re.set(T,et)},"enqueueIntentPreload"),vs=i(O=>{S||Ft!=="intent"||Lt()},"handleTouchStart"),zo=i(O=>{if(S||!Ft||!He)return;let T=O.currentTarget,et=re.get(T);et&&(clearTimeout(et),re.delete(T))},"handleLeave");return{...Dt,...ae,...ce,href:qt?.href,ref:s,onClick:jt([b,gs]),onBlur:jt([x,zo]),onFocus:jt([w,jo]),onMouseEnter:jt([C,jo]),onMouseLeave:jt([M,zo]),onTouchStart:jt([L,vs]),disabled:!!S,target:R,...Ho&&{style:Ho},...Uo&&{className:Uo},...S&&Gr,...Ue&&Jr,...$e&&ms&&nn}}i(sn,"useLinkProps");var Wt={},qr={className:"active"},Gr={role:"link","aria-disabled":!0},Jr={"data-status":"active","aria-current":"page"},nn={"data-transitioning":"transitioning"},re=new WeakMap,an={rootMargin:"100px"},jt=i(t=>o=>{for(let e of t)if(e){if(o.defaultPrevented)return;e(o)}},"composeHandlers");function Yr(t,o,e,s){if(!s)return o?{href:t,external:!0}:{href:e.createHref(t)||"/",external:!1}}i(Yr,"getHrefOption");function Xr(t){if(typeof t!="string")return!1;let o=t.charCodeAt(0);return o===47?t.charCodeAt(1)!==47:o===46}i(Xr,"isSafeInternal");var To=U.forwardRef((t,o)=>{let{_asChild:e,...s}=t,{type:r,...n}=sn(s,o),a=typeof s.children=="function"?s.children({isActive:n["data-status"]==="active"}):s.children;if(!e){let{disabled:c,...u}=n;return U.createElement("a",u,a)}return U.createElement(e,n,a)});function cn(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}i(cn,"isCtrlEvent");var Oo=k(W(),1),No=k(ot(),1);var Qr=class extends we{static{i(this,"Route")}constructor(t){super(t),this.useMatch=o=>Q({select:o?.select,from:this.id,structuralSharing:o?.structuralSharing}),this.useRouteContext=o=>ko({...o,from:this.id}),this.useSearch=o=>Ie({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useParams=o=>Eo({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useLoaderDeps=o=>Io({...o,from:this.id}),this.useLoaderData=o=>Mo({...o,from:this.id}),this.useNavigate=()=>ke({from:this.fullPath}),this.Link=Oo.default.forwardRef((o,e)=>(0,No.jsx)(To,{ref:e,from:this.fullPath,...o}))}};function un(t){return new Qr(t)}i(un,"createRoute");var ts=class extends vo{static{i(this,"RootRoute")}constructor(t){super(t),this.useMatch=o=>Q({select:o?.select,from:this.id,structuralSharing:o?.structuralSharing}),this.useRouteContext=o=>ko({...o,from:this.id}),this.useSearch=o=>Ie({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useParams=o=>Eo({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useLoaderDeps=o=>Io({...o,from:this.id}),this.useLoaderData=o=>Mo({...o,from:this.id}),this.useNavigate=()=>ke({from:this.fullPath}),this.Link=Oo.default.forwardRef((o,e)=>(0,No.jsx)(To,{ref:e,from:this.fullPath,...o}))}};function ln(t){return new ts(t)}i(ln,"createRootRoute");var Rc=k(W(),1),Oe=k(ot(),1);function es(t){let o=D();if(!1){let s=`not-found-${o.stores.location.get().pathname}-${o.stores.status.get()}`;return(0,Oe.jsx)(Ot,{getResetKey:i(()=>s,"getResetKey"),onCatch:i((r,n)=>{if(A(r))t.onCatch?.(r,n);else throw r},"onCatch"),errorComponent:i(({error:r})=>{if(A(r))return t.fallback?.(r);throw r},"errorComponent"),children:t.children})}let e=`not-found-${B(o.stores.location,s=>s.pathname)}-${B(o.stores.status,s=>s)}`;return(0,Oe.jsx)(Ot,{getResetKey:i(()=>e,"getResetKey"),onCatch:i((s,r)=>{if(A(s))t.onCatch?.(s,r);else throw s},"onCatch"),errorComponent:i(({error:s})=>{if(A(s))return t.fallback?.(s);throw s},"errorComponent"),children:t.children})}i(es,"CatchNotFound");function os(){return(0,Oe.jsx)("p",{children:"Not Found"})}i(os,"DefaultGlobalNotFound");var rs=k(ot(),1);function ss({children:t}){let o=D();return null}i(ss,"ScriptOnce");var bc=k(W(),1),Ne=k(ot(),1);function _t(t){return(0,Ne.jsx)(Ne.Fragment,{children:t.children})}i(_t,"SafeFragment");var Ec=k(W(),1),De=k(ot(),1);function Fe(t,o,e){return o.options.notFoundComponent?(0,De.jsx)(o.options.notFoundComponent,{...e}):t.options.defaultNotFoundComponent?(0,De.jsx)(t.options.defaultNotFoundComponent,{...e}):(0,De.jsx)(os,{})}i(Fe,"renderRouteNotFound");var is=k(ot(),1);function ns(t){return null}i(ns,"getScrollRestorationScriptForRouter");function as(){let t=ns(D());return t?(0,is.jsx)(ss,{children:t}):null}i(as,"ScrollRestoration");var z=k(W(),1),N=k(ot(),1);var fn=i((t,o)=>t.routeId===o.routeId&&t._displayPending===o._displayPending,"matchViewFieldsEqual"),dn=i((t,o)=>t[0]===o[0]&&t[1]===o[1],"outletMatchSelectionEqual"),Ae=z.memo(i(function({matchId:o}){let e=D();if(!1){let a=e.stores.matchStores.get(o)?.get();a||$();let c=a.routeId,u=e.routesById[c].parentRoute?.id;return(0,N.jsx)(cs,{router:e,matchId:o,resetKey:e.stores.loadedAt.get(),matchState:{routeId:c,ssr:a.ssr,_displayPending:a._displayPending,parentRouteId:u}})}let s=e.stores.matchStores.get(o);s||$();let r=B(e.stores.loadedAt,a=>a),n=B(s,a=>a,fn);return(0,N.jsx)(cs,{router:e,matchId:o,resetKey:r,matchState:z.useMemo(()=>{let a=n.routeId,c=e.routesById[a].parentRoute?.id;return{routeId:a,ssr:n.ssr,_displayPending:n._displayPending,parentRouteId:c}},[n._displayPending,n.routeId,n.ssr,e.routesById])})},"MatchImpl"));function cs({router:t,matchId:o,resetKey:e,matchState:s}){let r=t.routesById[s.routeId],n=r.options.pendingComponent??t.options.defaultPendingComponent,a=n?(0,N.jsx)(n,{}):null,c=r.options.errorComponent??t.options.defaultErrorComponent,u=r.options.onCatch??t.options.defaultOnCatch,d=r.isRoot?r.options.notFoundComponent??t.options.notFoundRoute?.options.component:r.options.notFoundComponent,f=s.ssr===!1||s.ssr==="data-only",l=(!r.isRoot||r.options.wrapInSuspense||f)&&(r.options.wrapInSuspense??n??(r.options.errorComponent?.preload||f))?z.Suspense:_t,p=c?Ot:_t,h=d?es:_t;return(0,N.jsxs)(r.isRoot?r.options.shellComponent??_t:_t,{children:[(0,N.jsx)(Mt.Provider,{value:o,children:(0,N.jsx)(l,{fallback:a,children:(0,N.jsx)(p,{getResetKey:i(()=>e,"getResetKey"),errorComponent:c||Nt,onCatch:i((m,y)=>{if(A(m))throw m.routeId??=s.routeId,m;u?.(m,y)},"onCatch"),children:(0,N.jsx)(h,{fallback:i(m=>{if(m.routeId??=s.routeId,!d||m.routeId&&m.routeId!==s.routeId||!m.routeId&&!r.isRoot)throw m;return z.createElement(d,m)},"fallback"),children:f||s._displayPending?(0,N.jsx)(Kr,{fallback:a,children:(0,N.jsx)(us,{matchId:o})}):(0,N.jsx)(us,{matchId:o})})})})}),s.parentRouteId===X?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(hn,{}),t.options.scrollRestoration&&!1?(0,N.jsx)(as,{}):null]}):null]})}i(cs,"MatchView");function hn(){let t=D();if(!1)return null;let o=z.useRef();return Tt(()=>{let e=t.stores.resolvedLocation.get(),s=o.current;e&&(!s||s.href!==e.href)&&t.emit({type:"onRendered",...ht(t.stores.location.get(),s??e)}),o.current=e},[B(t.stores.resolvedLocation,e=>e?.state.__TSR_key),t]),null}i(hn,"OnRendered");var us=z.memo(i(function({matchId:o}){let e=D(),s=i((f,l)=>e.getMatch(f.id)?._nonReactive[l]??f._nonReactive[l],"getMatchPromise");if(!1){let f=e.stores.matchStores.get(o)?.get();f||$();let l=f.routeId,p=e.routesById[l],h=(e.routesById[l].options.remountDeps??e.options.defaultRemountDeps)?.({routeId:l,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch}),m=h?JSON.stringify(h):void 0,y=p.options.component??e.options.defaultComponent,g=y?(0,N.jsx)(y,{},m):(0,N.jsx)(Do,{});if(f._displayPending)throw s(f,"displayPendingPromise");if(f._forcePending)throw s(f,"minPendingPromise");if(f.status==="pending")throw s(f,"loadPromise");if(f.status==="notFound")return A(f.error)||$(),Fe(e,p,f.error);if(f.status==="redirected")throw H(f.error)||$(),s(f,"loadPromise");return f.status==="error"?(0,N.jsx)((p.options.errorComponent??e.options.defaultErrorComponent)||Nt,{error:f.error,reset:void 0,info:{componentStack:""}}):g}let r=e.stores.matchStores.get(o);r||$();let n=B(r,f=>f),a=n.routeId,c=e.routesById[a],u=z.useMemo(()=>{let f=(e.routesById[a].options.remountDeps??e.options.defaultRemountDeps)?.({routeId:a,loaderDeps:n.loaderDeps,params:n._strictParams,search:n._strictSearch});return f?JSON.stringify(f):void 0},[a,n.loaderDeps,n._strictParams,n._strictSearch,e.options.defaultRemountDeps,e.routesById]),d=z.useMemo(()=>{let f=c.options.component??e.options.defaultComponent;return f?(0,N.jsx)(f,{},u):(0,N.jsx)(Do,{})},[u,c.options.component,e.options.defaultComponent]);if(n._displayPending)throw s(n,"displayPendingPromise");if(n._forcePending)throw s(n,"minPendingPromise");if(n.status==="pending"){let f=c.options.pendingMinMs??e.options.defaultPendingMinMs;if(f){let l=e.getMatch(n.id);if(l&&!l._nonReactive.minPendingPromise&&!!1){let p=ct();l._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),l._nonReactive.minPendingPromise=void 0},f)}}throw s(n,"loadPromise")}if(n.status==="notFound")return A(n.error)||$(),Fe(e,c,n.error);if(n.status==="redirected")throw H(n.error)||$(),s(n,"loadPromise");if(n.status==="error"){if(!1)return(0,N.jsx)((c.options.errorComponent??e.options.defaultErrorComponent)||Nt,{error:n.error,reset:void 0,info:{componentStack:""}});throw n.error}return d},"MatchInnerImpl")),Do=z.memo(i(function(){let o=D(),e=z.useContext(Mt),s,r=!1,n;if(!1){let d=o.stores.matches.get(),f=e?d.findIndex(p=>p.id===e):-1,l=f>=0?d[f]:void 0;s=l?.routeId,r=l?.globalNotFound??!1,n=f>=0?d[f+1]?.id:void 0}else{let d=e?o.stores.matchStores.get(e):void 0;[s,r]=B(d,f=>[f?.routeId,f?.globalNotFound??!1],dn),n=B(o.stores.matchesId,f=>f[f.findIndex(l=>l===e)+1])}let a=s?o.routesById[s]:void 0,c=o.options.defaultPendingComponent?(0,N.jsx)(o.options.defaultPendingComponent,{}):null;if(r)return a||$(),Fe(o,a,void 0);if(!n)return null;let u=(0,N.jsx)(Ae,{matchId:n});return s===X?(0,N.jsx)(z.Suspense,{fallback:c,children:u}):u},"OutletImpl"));var Ct=k(W(),1);function ls(){let t=D(),o=Ct.useRef({router:t,mounted:!1}),[e,s]=Ct.useState(!1),r=B(t.stores.isLoading,l=>l),n=B(t.stores.hasPending,l=>l),a=Ee(r),c=r||e||n,u=Ee(c),d=r||n,f=Ee(d);return t.startTransition=l=>{s(!0),Ct.startTransition(()=>{l(),s(!1)})},Ct.useEffect(()=>{let l=t.history.subscribe(t.load),p=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Z(t.latestLocation.publicHref)!==Z(p.publicHref)&&t.commitLocation({...p,replace:!0}),()=>{l()}},[t,t.history]),Tt(()=>{if(typeof window<"u"&&t.ssr||o.current.router===t&&o.current.mounted)return;o.current={router:t,mounted:!0},i(async()=>{try{await t.load()}catch(p){console.error(p)}},"tryLoad")()},[t]),Tt(()=>{a&&!r&&t.emit({type:"onLoad",...ht(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,r]),Tt(()=>{f&&!d&&t.emit({type:"onBeforeRouteMount",...ht(t.stores.location.get(),t.stores.resolvedLocation.get())})},[d,f,t]),Tt(()=>{if(u&&!c){let l=ht(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...l}),oe(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[c,u,t]),null}i(ls,"Transitioner");var Be=k(W(),1),ft=k(ot(),1);function fs(){let t=D(),o=t.routesById[X].options.pendingComponent??t.options.defaultPendingComponent,e=o?(0,ft.jsx)(o,{}):null,s=(0,ft.jsxs)(typeof document<"u"&&t.ssr?_t:Be.Suspense,{fallback:e,children:[!!1&&(0,ft.jsx)(ls,{}),(0,ft.jsx)(pn,{})]});return t.options.InnerWrap?(0,ft.jsx)(t.options.InnerWrap,{children:s}):s}i(fs,"Matches");function pn(){let t=D(),o=!1,e=o?t.stores.firstId.get():B(t.stores.firstId,n=>n),s=o?t.stores.loadedAt.get():B(t.stores.loadedAt,n=>n),r=e?(0,ft.jsx)(Ae,{matchId:e}):null;return(0,ft.jsx)(Mt.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:(0,ft.jsx)(Ot,{getResetKey:i(()=>s,"getResetKey"),errorComponent:Nt,onCatch:void 0,children:r})})}i(pn,"MatchesInner");var ds=i(t=>({createMutableStore:Le,createReadonlyStore:Le,batch:oe}),"getStoreFactory");var mn=i(t=>new hs(t),"createRouter"),hs=class extends mo{static{i(this,"Router")}constructor(t){super(t,ds)}};var Lu=k(W(),1),se=k(ot(),1);function ps({router:t,children:o,...e}){mt(e)&&t.update({...t.options,...e,context:{...t.options.context,...e.context}});let s=(0,se.jsx)(ue.Provider,{value:t,children:o});return t.options.Wrap?(0,se.jsx)(t.options.Wrap,{children:s}):s}i(ps,"RouterContextProvider");function gn({router:t,...o}){return(0,se.jsx)(ps,{router:t,...o,children:(0,se.jsx)(fs,{})})}i(gn,"RouterProvider");function vn(t){let o=D({warn:t?.router===void 0}),e=t?.router||o;if(!1){let s=e.stores.__store.get();return t?.select?t.select(s):s}return B(e.stores.__store,_o(t,e))}i(vn,"useRouterState");export{ho as a,js as b,D as c,Ie as d,ke as e,un as f,ln as g,Do as h,mn as i,gn as j,vn as k};
@@ -1 +1 @@
1
- import{a as s,c as m,f as V}from"./chunk-UHHTEBC3.js";var h=m(w=>{"use strict";var a=V();function z(e,u){return e===u&&(e!==0||1/e===1/u)||e!==e&&u!==u}s(z,"is");var I=typeof Object.is=="function"?Object.is:z,M=a.useState,_=a.useEffect,g=a.useLayoutEffect,G=a.useDebugValue;function L(e,u){var t=u(),i=M({inst:{value:t,getSnapshot:u}}),r=i[0].inst,n=i[1];return g(function(){r.value=t,r.getSnapshot=u,y(r)&&n({inst:r})},[e,t,u]),_(function(){return y(r)&&n({inst:r}),e(function(){y(r)&&n({inst:r})})},[e]),G(t),t}s(L,"useSyncExternalStore$2");function y(e){var u=e.getSnapshot;e=e.value;try{var t=u();return!I(e,t)}catch{return!0}}s(y,"checkIfSnapshotChanged");function $(e,u){return u()}s($,"useSyncExternalStore$1");var k=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$:L;w.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:k});var O=m((T,D)=>{"use strict";D.exports=h()});var N=m(R=>{"use strict";var E=V(),C=O();function U(e,u){return e===u&&(e!==0||1/e===1/u)||e!==e&&u!==u}s(U,"is");var W=typeof Object.is=="function"?Object.is:U,A=C.useSyncExternalStore,B=E.useRef,F=E.useEffect,H=E.useMemo,J=E.useDebugValue;R.useSyncExternalStoreWithSelector=function(e,u,t,i,r){var n=B(null);if(n.current===null){var c={hasValue:!1,value:null};n.current=c}else c=n.current;n=H(function(){function j(o){if(!S){if(S=!0,v=o,o=i(o),r!==void 0&&c.hasValue){var f=c.value;if(r(f,o))return d=f}return d=o}if(f=d,W(v,o))return f;var p=i(o);return r!==void 0&&r(f,p)?(v=o,f):(v=o,d=p)}s(j,"memoizedSelector");var S=!1,v,d,b=t===void 0?null:t;return[function(){return j(u())},b===null?void 0:function(){return j(b())}]},[u,t,i,r]);var l=A(e,n[0],n[1]);return F(function(){c.hasValue=!0,c.value=l},[l]),J(l),l}});var K=m((Z,q)=>{"use strict";q.exports=N()});export{O as a,K as b};
1
+ import{a as s,c as m,f as V}from"./chunk-3XIESWL4.js";var h=m(w=>{"use strict";var a=V();function z(e,u){return e===u&&(e!==0||1/e===1/u)||e!==e&&u!==u}s(z,"is");var I=typeof Object.is=="function"?Object.is:z,M=a.useState,_=a.useEffect,g=a.useLayoutEffect,G=a.useDebugValue;function L(e,u){var t=u(),i=M({inst:{value:t,getSnapshot:u}}),r=i[0].inst,n=i[1];return g(function(){r.value=t,r.getSnapshot=u,y(r)&&n({inst:r})},[e,t,u]),_(function(){return y(r)&&n({inst:r}),e(function(){y(r)&&n({inst:r})})},[e]),G(t),t}s(L,"useSyncExternalStore$2");function y(e){var u=e.getSnapshot;e=e.value;try{var t=u();return!I(e,t)}catch{return!0}}s(y,"checkIfSnapshotChanged");function $(e,u){return u()}s($,"useSyncExternalStore$1");var k=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?$:L;w.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:k});var O=m((T,D)=>{"use strict";D.exports=h()});var N=m(R=>{"use strict";var E=V(),C=O();function U(e,u){return e===u&&(e!==0||1/e===1/u)||e!==e&&u!==u}s(U,"is");var W=typeof Object.is=="function"?Object.is:U,A=C.useSyncExternalStore,B=E.useRef,F=E.useEffect,H=E.useMemo,J=E.useDebugValue;R.useSyncExternalStoreWithSelector=function(e,u,t,i,r){var n=B(null);if(n.current===null){var c={hasValue:!1,value:null};n.current=c}else c=n.current;n=H(function(){function j(o){if(!S){if(S=!0,v=o,o=i(o),r!==void 0&&c.hasValue){var f=c.value;if(r(f,o))return d=f}return d=o}if(f=d,W(v,o))return f;var p=i(o);return r!==void 0&&r(f,p)?(v=o,f):(v=o,d=p)}s(j,"memoizedSelector");var S=!1,v,d,b=t===void 0?null:t;return[function(){return j(u())},b===null?void 0:function(){return j(b())}]},[u,t,i,r]);var l=A(e,n[0],n[1]);return F(function(){c.hasValue=!0,c.value=l},[l]),J(l),l}});var K=m((Z,q)=>{"use strict";q.exports=N()});export{O as a,K as b};
@@ -1,3 +1,3 @@
1
- import{a as q}from"./chunk-C4VURT57.js";import{c as k}from"./chunk-SKJZDOHG.js";import{a as y,e as w}from"./chunk-JKPK25JO.js";import{a as P}from"./chunk-UZYGEOWY.js";import{a as D}from"./chunk-V66TSUKV.js";import{b as j}from"./chunk-UWF5DOGV.js";import"./chunk-PTTDIYGP.js";import"./chunk-7Z5QEFR4.js";import"./chunk-46IB4C4Q.js";import{c as $}from"./chunk-UY2Y5CXB.js";import"./chunk-ZFWEPGWG.js";import"./chunk-4FNHHFWR.js";import{a as f}from"./chunk-GXZAXNZI.js";import{f as L}from"./chunk-KJTLW5W2.js";import"./chunk-UREY4GLG.js";import{d as J,f as I,g as S,h as b,m as v}from"./chunk-KLLYGWNF.js";import{b as N}from"./chunk-UDZY7MKE.js";import{a,e as A,f as U,h as z}from"./chunk-UHHTEBC3.js";var c=A(U(),1);var e=A(z(),1);var X=I(f.exportShard),G=I(f.importShard),H=a(m=>m.map(s=>JSON.stringify(s)).join(`
1
+ import{a as q}from"./chunk-7LQWFOEU.js";import{c as k}from"./chunk-OWADN6BI.js";import{a as y,e as w}from"./chunk-UZERI5YC.js";import{a as P}from"./chunk-V53KNYRN.js";import{a as D}from"./chunk-LFXFP4IF.js";import{b as j}from"./chunk-GRL5MG3Z.js";import"./chunk-7T7UOTYK.js";import"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{c as $}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import"./chunk-6ST5ECQA.js";import{a as f}from"./chunk-GXZAXNZI.js";import{f as L}from"./chunk-LWECXQWP.js";import"./chunk-XBDKZZ67.js";import{d as J,f as I,g as S,h as b,m as v}from"./chunk-4CGALXS3.js";import{b as N}from"./chunk-LE56LPNH.js";import{a,e as A,f as U,h as z}from"./chunk-3XIESWL4.js";var c=A(U(),1);var e=A(z(),1);var X=I(f.exportShard),G=I(f.importShard),H=a(m=>m.map(s=>JSON.stringify(s)).join(`
2
2
  `),"X"),Q=a(m=>{let s=[],x=m.split(`
3
3
  `);for(let[t,l]of x.entries()){let h=l.trim();if(h==="")continue;let n=JSON.parse(h);if(typeof n!="object"||n===null)throw new N("INTERNAL",`line ${(t+1).toString()}: expected a { table, doc } object`);let o=n;if(typeof o.table!="string"||typeof o.doc!="object"||o.doc===null||Array.isArray(o.doc))throw new N("INTERNAL",`line ${(t+1).toString()}: expected a { table, doc } object`);s.push(o)}return s},"z"),ie=a(({initialShardKey:m})=>{let s=L(),x=k(),t=J(),[l,h]=(0,c.useState)(m??""),[n,o]=(0,c.useState)(""),[E,p]=(0,c.useState)(!1),[C,u]=(0,c.useState)(null),[i,g]=(0,c.useState)(null),[O,T]=(0,c.useState)(null),R=a(async()=>{p(!0),u(null),g(null);try{let r=await s.query(X,{},S(l));j(l),o(H(r.rows)),T(r.rows.length)}catch(r){u(b(r))}finally{p(!1)}},"T"),_=a(async()=>{p(!0),u(null),g(null),T(null);let r;try{r=Q(n)}catch(d){u(t("Invalid NDJSON: {message}",{message:b(d)})),p(!1);return}try{let d=await s.query(G,{rows:r},S(l));j(l),g(d),x(f.readTablePage),x(f.listTables)}catch(d){u(b(d))}finally{p(!1)}},"C"),B=i===null?0:Object.values(i.inserted).reduce((r,d)=>r+d,0),F=a(()=>{v(R())},"k"),K=a(()=>{v(_())},"J"),M=a(r=>{o(r.target.value)},"q");return(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-export-import",children:[(0,e.jsxs)(y,{className:"rounded-xl border border-border bg-card shadow-xs",children:[(0,e.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,e.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:t("Export")})}),(0,e.jsxs)(w,{className:"flex flex-col gap-3 p-4",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)(D,{onChange:h,testId:"ei-shard-input",value:l}),(0,e.jsx)($,{"data-testid":"ei-export",disabled:E,onClick:F,type:"button",children:t("Export")})]}),O!==null&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"ei-export-result",children:t("Exported {count} rows.",{count:O})})]})]}),(0,e.jsxs)(y,{className:"rounded-xl border border-border bg-card shadow-xs",children:[(0,e.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,e.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:t("Import")})}),(0,e.jsxs)(w,{className:"flex flex-col gap-3 p-4",children:[(0,e.jsx)(P,{"aria-label":"NDJSON",className:"font-mono text-xs min-h-40 rounded-md","data-testid":"ei-ndjson",onChange:M,placeholder:'{"table":"messages","doc":{\u2026}}',value:n}),(0,e.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:(0,e.jsx)(q,{confirmLabel:t("Import (writes rows)?"),disabled:E||n.trim()==="",onConfirm:K,testId:"ei-import",children:t("Import")})}),i!==null&&(0,e.jsxs)("div",{className:"flex flex-col gap-2","data-testid":"ei-import-result",children:[(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t("Inserted {inserted}, {conflicts} conflicts, {errors} errors.",{conflicts:i.conflicts,errors:i.errors.length,inserted:B})}),i.errors.length>0&&(0,e.jsx)("ul",{className:"flex flex-col gap-1","data-testid":"ei-import-errors",children:i.errors.map(r=>(0,e.jsx)("li",{className:"text-xs text-destructive",children:t("line {line} ({table}): {message}",{line:r.line,message:r.message,table:r.table})},`${r.table}-${r.line.toString()}`))})]})]})]}),C!==null&&(0,e.jsx)("p",{className:"text-sm text-destructive","data-testid":"ei-error",role:"alert",children:C})]})},"ne");export{ie as ExportImportPanel};
@@ -1,4 +1,4 @@
1
- import{a as je}from"./chunk-UZYGEOWY.js";import{a as be}from"./chunk-YT7VXQVX.js";import{a as Z}from"./chunk-H6SIM4BT.js";import{d as we,f as $e,g as Oe,k as ie}from"./chunk-KOC5KV3E.js";import{a as Ce}from"./chunk-V66TSUKV.js";import"./chunk-UWF5DOGV.js";import"./chunk-PTTDIYGP.js";import{R as Se}from"./chunk-7Z5QEFR4.js";import"./chunk-46IB4C4Q.js";import{c as F}from"./chunk-UY2Y5CXB.js";import"./chunk-ZFWEPGWG.js";import{b as ke}from"./chunk-K5PFWU5J.js";import"./chunk-4FNHHFWR.js";import{a as _e}from"./chunk-GXZAXNZI.js";import{f as G}from"./chunk-KJTLW5W2.js";import"./chunk-UREY4GLG.js";import{a as U}from"./chunk-6OKDCV7J.js";import{d as M,e as Ie,f as le,g as de,h as ce,m as Pe,o as oe}from"./chunk-KLLYGWNF.js";import{b as Ne}from"./chunk-UDZY7MKE.js";import{a as u,e as D,f as ge,g as ae,h as ne,j as xe}from"./chunk-UHHTEBC3.js";var Qe=D(ae(),1),ye=D(ge(),1);var ee=D(ae(),1);var Y=D(ge(),1);var K=D(ne(),1);var Xe=le(_e.listTables),Ze=["react","client","cli"],Ye=!1,et={action:"action",mutation:"mutation",query:"query"},Ae=u(t=>{let e=t.indexOf(":");return e===-1?{file:"",fn:t}:{file:t.slice(0,e),fn:t.slice(e+1)}},"X"),Re=u(({file:t,fn:e,kind:a})=>`await client.${et[a]}(api.${t}.${e}, { /* args */ });`,"J"),tt=u(t=>{let e=`api.${t.file}.${t.fn}`;switch(t.kind){case"action":return Re(t);case"mutation":return`const ${t.fn} = useMutation(${e});`;default:return`const data = useQuery(${e}, { /* args */ });`}},"ce"),rt=u(({file:t,fn:e})=>`lunora run ${t}:${e} --args '{ }'`,"de"),at=u(t=>["// Read rows",`const rows = await ctx.db.query("${t}").collect();`,"","// Insert a row",`const id = await ctx.db.insert("${t}", { /* fields */ });`,"","// Generated types",`type Row = Doc<"${t}">;`,`type RowId = Id<"${t}">;`].join(`
1
+ import{a as je}from"./chunk-V53KNYRN.js";import{a as be}from"./chunk-5Y3QLNWX.js";import{a as Z}from"./chunk-HPFLBYRI.js";import{d as we,f as $e,g as Oe,k as ie}from"./chunk-QBWRC5YX.js";import{a as Ce}from"./chunk-LFXFP4IF.js";import"./chunk-GRL5MG3Z.js";import"./chunk-7T7UOTYK.js";import{R as Se}from"./chunk-CFPZYHPY.js";import"./chunk-7QIFDWQV.js";import{c as F}from"./chunk-FXCBF4XT.js";import"./chunk-2OUPA2WJ.js";import{b as ke}from"./chunk-THIXMMZD.js";import"./chunk-6ST5ECQA.js";import{a as _e}from"./chunk-GXZAXNZI.js";import{f as G}from"./chunk-LWECXQWP.js";import"./chunk-XBDKZZ67.js";import{a as U}from"./chunk-XQCVZAGU.js";import{d as M,e as Ie,f as le,g as de,h as ce,m as Pe,o as oe}from"./chunk-4CGALXS3.js";import{b as Ne}from"./chunk-LE56LPNH.js";import{a as u,e as D,f as ge,g as ae,h as ne,j as xe}from"./chunk-3XIESWL4.js";var Qe=D(ae(),1),ye=D(ge(),1);var ee=D(ae(),1);var Y=D(ge(),1);var K=D(ne(),1);var Xe=le(_e.listTables),Ze=["react","client","cli"],Ye=!1,et={action:"action",mutation:"mutation",query:"query"},Ae=u(t=>{let e=t.indexOf(":");return e===-1?{file:"",fn:t}:{file:t.slice(0,e),fn:t.slice(e+1)}},"X"),Re=u(({file:t,fn:e,kind:a})=>`await client.${et[a]}(api.${t}.${e}, { /* args */ });`,"J"),tt=u(t=>{let e=`api.${t.file}.${t.fn}`;switch(t.kind){case"action":return Re(t);case"mutation":return`const ${t.fn} = useMutation(${e});`;default:return`const data = useQuery(${e}, { /* args */ });`}},"ce"),rt=u(({file:t,fn:e})=>`lunora run ${t}:${e} --args '{ }'`,"de"),at=u(t=>["// Read rows",`const rows = await ctx.db.query("${t}").collect();`,"","// Insert a row",`const id = await ctx.db.insert("${t}", { /* fields */ });`,"","// Generated types",`type Row = Doc<"${t}">;`,`type RowId = Id<"${t}">;`].join(`
2
2
  `),"pe"),nt=u((t,e)=>{switch(t){case"cli":return rt(e);case"client":return Re(e);default:return tt(e)}},"fe"),Je=u(t=>{let e=(0,ee.c)(19),{code:a,label:r,testId:n}=t,s=M(),o;e[0]!==a?(o=u(()=>{oe(a)},"o"),e[0]=a,e[1]=o):o=e[1];let i=o,c;e[2]!==r?(c=(0,K.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:r}),e[2]=r,e[3]=c):c=e[3];let p=`${n}-copy`,l;e[4]!==s?(l=s("Copy"),e[4]=s,e[5]=l):l=e[5];let d;e[6]!==i||e[7]!==p||e[8]!==l?(d=(0,K.jsx)(F,{"data-testid":p,onClick:i,size:"xs",type:"button",variant:"ghost",children:l}),e[6]=i,e[7]=p,e[8]=l,e[9]=d):d=e[9];let f;e[10]!==c||e[11]!==d?(f=(0,K.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[c,d]}),e[10]=c,e[11]=d,e[12]=f):f=e[12];let v;e[13]!==a||e[14]!==n?(v=(0,K.jsx)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":n,children:a}),e[13]=a,e[14]=n,e[15]=v):v=e[15];let N;return e[16]!==f||e[17]!==v?(N=(0,K.jsxs)("div",{className:"flex flex-col gap-1.5",children:[f,v]}),e[16]=f,e[17]=v,e[18]=N):N=e[18],N},"W"),ot=u(t=>{let e=(0,ee.c)(50),{file:a,fn:r,kind:n}=t,s=M(),[o,i]=(0,Y.useState)("react"),c,p,l;if(e[0]!==a||e[1]!==r||e[2]!==n||e[3]!==s||e[4]!==o){let I={file:a,fn:r,kind:n},O;e[8]!==s?(O=s("CLI"),e[8]=s,e[9]=O):O=e[9];let j;e[10]!==s?(j=s("Client"),e[10]=s,e[11]=j):j=e[11];let T;e[12]!==s?(T=s("React"),e[12]=s,e[13]=T):T=e[13];let J;e[14]!==O||e[15]!==j||e[16]!==T?(J={cli:O,client:j,react:T},e[14]=O,e[15]=j,e[16]=T,e[17]=J):J=e[17],l=J;let A;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=u(E=>{i(E.currentTarget.dataset.tab)},"q"),e[18]=A):A=e[18],c=A,p=nt(o,I),e[0]=a,e[1]=r,e[2]=n,e[3]=s,e[4]=o,e[5]=c,e[6]=p,e[7]=l}else c=e[5],p=e[6],l=e[7];let d=p,f=n==="action"&&o==="react"&&!Ye,v=`api.${a}.${r}`,N;e[19]!==v?(N=(0,K.jsx)("h2",{className:"font-mono text-sm font-semibold text-foreground","data-testid":"api-fn-title",children:v}),e[19]=v,e[20]=N):N=e[20];let k;e[21]!==n||e[22]!==s?(k=s("Call this {kind} from your app.",{kind:n}),e[21]=n,e[22]=s,e[23]=k):k=e[23];let h;e[24]!==k?(h=(0,K.jsx)("p",{className:"text-xs text-muted-foreground",children:k}),e[24]=k,e[25]=h):h=e[25];let g;e[26]!==N||e[27]!==h?(g=(0,K.jsxs)("div",{children:[N,h]}),e[26]=N,e[27]=h,e[28]=g):g=e[28];let b;e[29]!==s?(b=s("Snippet flavour"),e[29]=s,e[30]=b):b=e[30];let x;e[31]!==c||e[32]!==o||e[33]!==l?(x=Ze.map(I=>(0,K.jsx)(F,{"aria-selected":o===I,"data-tab":I,"data-testid":`api-tab-${I}`,onClick:c,role:"tab",size:"xs",type:"button",variant:o===I?"default":"outline",children:l[I]},I)),e[31]=c,e[32]=o,e[33]=l,e[34]=x):x=e[34];let y;e[35]!==b||e[36]!==x?(y=(0,K.jsx)("div",{"aria-label":b,className:"flex gap-1.5","data-testid":"api-tabs",role:"tablist",children:x}),e[35]=b,e[36]=x,e[37]=y):y=e[37];let w=l[o],_=`api-snippet-${o}`,S;e[38]!==d||e[39]!==w||e[40]!==_?(S=(0,K.jsx)(Je,{code:d,label:w,testId:_}),e[38]=d,e[39]=w,e[40]=_,e[41]=S):S=e[41];let $;e[42]!==f||e[43]!==s?($=f&&(0,K.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"api-action-note",children:s("Actions have no React hook \u2014 call them through the client.")}),e[42]=f,e[43]=s,e[44]=$):$=e[44];let P;return e[45]!==S||e[46]!==$||e[47]!==g||e[48]!==y?(P=(0,K.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"api-fn-doc",children:[g,y,S,$]}),e[45]=S,e[46]=$,e[47]=g,e[48]=y,e[49]=P):P=e[49],P},"ue"),st=u(t=>{let e=(0,ee.c)(19),{name:a}=t,r=M(),n;e[0]!==a?(n=at(a),e[0]=a,e[1]=n):n=e[1];let s=n,o;e[2]!==a?(o=(0,K.jsx)("h2",{className:"font-mono text-sm font-semibold text-foreground","data-testid":"api-table-title",children:a}),e[2]=a,e[3]=o):o=e[3];let i;e[4]!==r?(i=r("Read and write this table through the typed data model."),e[4]=r,e[5]=i):i=e[5];let c;e[6]!==i?(c=(0,K.jsx)("p",{className:"text-xs text-muted-foreground",children:i}),e[6]=i,e[7]=c):c=e[7];let p;e[8]!==o||e[9]!==c?(p=(0,K.jsxs)("div",{children:[o,c]}),e[8]=o,e[9]=c,e[10]=p):p=e[10];let l;e[11]!==r?(l=r("Data model"),e[11]=r,e[12]=l):l=e[12];let d;e[13]!==s||e[14]!==l?(d=(0,K.jsx)(Je,{code:s,label:l,testId:"api-snippet-table"}),e[13]=s,e[14]=l,e[15]=d):d=e[15];let f;return e[16]!==p||e[17]!==d?(f=(0,K.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"api-table-doc",children:[p,d]}),e[16]=p,e[17]=d,e[18]=f):f=e[18],f},"me"),Te=u(t=>{let e=(0,ee.c)(8),{active:a,label:r,onSelect:n,testId:s,value:o}=t,i;e[0]!==n||e[1]!==o?(i=u(()=>{n(o)},"f"),e[0]=n,e[1]=o,e[2]=i):i=e[2];let c=i,p=a?"page":void 0,l;return e[3]!==r||e[4]!==c||e[5]!==p||e[6]!==s?(l=(0,K.jsx)("button",{"aria-current":p,className:"w-full truncate rounded-md px-2 py-1 text-start font-mono text-xs text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent aria-[current=page]:bg-sidebar-accent aria-[current=page]:font-medium aria-[current=page]:text-foreground","data-testid":s,onClick:c,type:"button",children:r}),e[3]=r,e[4]=c,e[5]=p,e[6]=s,e[7]=l):l=e[7],l},"Y"),Ee=u(t=>{let e=(0,ee.c)(67),{functions:a,initialShardKey:r}=t,n=M(),s=G(),[o,i]=(0,Y.useState)(null),[c,p]=(0,Y.useState)(null),l,d;e[0]!==s||e[1]!==r?(l=u(()=>{let R=!1;return s.query(Xe,{},de(r??"")).then(q=>(R||i(q),q)).catch(()=>{R||i([])}),()=>{R=!0}},"i"),d=[s,r],e[0]=s,e[1]=r,e[2]=l,e[3]=d):(l=e[2],d=e[3]),(0,Y.useEffect)(l,d);let f;e[4]!==a?(f=a??[],e[4]=a,e[5]=f):f=e[5];let v=f,N;if(e[6]!==v){let R=new Map;for(let q of v){let{file:H,fn:X}=Ae(q.path),se=R.get(H)??[];se.push({fn:X,kind:q.kind,path:q.path}),R.set(H,se)}N=[...R.entries()].map(lt).toSorted(dt),e[6]=v,e[7]=N}else N=e[7];let k=N,h,g,b,x,y,w,_,S,$,P;if(e[8]!==v||e[9]!==k||e[10]!==c||e[11]!==n||e[12]!==o){let R=(o??[]).map(ct).toSorted(pt),q;e[23]===Symbol.for("react.memo_cache_sentinel")?(q=u(z=>{p({kind:"fn",path:z})},"E"),e[23]=q):q=e[23];let H=q,X;e[24]===Symbol.for("react.memo_cache_sentinel")?(X=u(z=>{p({kind:"table",name:z})},"L"),e[24]=X):X=e[24];let se=X;if(g=c?.kind==="fn"?v.find(z=>z.path===c.path):void 0,h=v.length>0||R.length>0,b=g===void 0?void 0:Ae(g.path),x="grid min-h-0 gap-6 md:grid-cols-[16rem_minmax(0,1fr)]",y="lunora-api-docs",e[25]!==n?(w=n("API resources"),e[25]=n,e[26]=w):w=e[26],_="flex flex-col gap-4 overflow-y-auto",S="api-rail",e[27]!==k||e[28]!==c||e[29]!==n){let z;e[31]!==c||e[32]!==n?(z=u(he=>(0,K.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,K.jsx)("span",{className:"px-2 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:he.file||n("(root)")}),he.items.map(re=>(0,K.jsx)(Te,{active:c?.kind==="fn"&&c.path===re.path,label:re.fn,onSelect:H,testId:`api-rail-fn-${re.path}`,value:re.path},re.path))]},he.file),"b"),e[31]=c,e[32]=n,e[33]=z):z=e[33],$=k.map(z),e[27]=k,e[28]=c,e[29]=n,e[30]=$}else $=e[30];P=R.length>0&&(0,K.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,K.jsx)("span",{className:"px-2 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n("Tables")}),R.map(z=>(0,K.jsx)(Te,{active:c?.kind==="table"&&c.name===z,label:z,onSelect:se,testId:`api-rail-table-${z}`,value:z},z))]}),e[8]=v,e[9]=k,e[10]=c,e[11]=n,e[12]=o,e[13]=h,e[14]=g,e[15]=b,e[16]=x,e[17]=y,e[18]=w,e[19]=_,e[20]=S,e[21]=$,e[22]=P}else h=e[13],g=e[14],b=e[15],x=e[16],y=e[17],w=e[18],_=e[19],S=e[20],$=e[21],P=e[22];let I;e[34]!==h||e[35]!==n?(I=!h&&(0,K.jsx)("p",{className:"px-2 text-xs text-muted-foreground","data-testid":"api-rail-empty",children:n("No functions or tables to document yet.")}),e[34]=h,e[35]=n,e[36]=I):I=e[36];let O;e[37]!==I||e[38]!==w||e[39]!==_||e[40]!==S||e[41]!==$||e[42]!==P?(O=(0,K.jsxs)("nav",{"aria-label":w,className:_,"data-testid":S,children:[$,P,I]}),e[37]=I,e[38]=w,e[39]=_,e[40]=S,e[41]=$,e[42]=P,e[43]=O):O=e[43];let j;e[44]!==c||e[45]!==n?(j=c===null&&(0,K.jsx)(U,{description:n("Select a function or table to see how to call it from your app."),testId:"api-empty",title:n("API usage snippets")}),e[44]=c,e[45]=n,e[46]=j):j=e[46];let T;e[47]!==c?.kind||e[48]!==g||e[49]!==b?(T=c?.kind==="fn"&&g!==void 0&&b!==void 0&&(0,K.jsx)(ot,{file:b.file,fn:b.fn,kind:g.kind},g.path),e[47]=c?.kind,e[48]=g,e[49]=b,e[50]=T):T=e[50];let J;e[51]!==c?.kind||e[52]!==g||e[53]!==n?(J=c?.kind==="fn"&&g===void 0&&(0,K.jsx)(U,{testId:"api-empty",title:n("API usage snippets")}),e[51]=c?.kind,e[52]=g,e[53]=n,e[54]=J):J=e[54];let A;e[55]!==c?(A=c?.kind==="table"&&(0,K.jsx)(st,{name:c.name}),e[55]=c,e[56]=A):A=e[56];let E;e[57]!==j||e[58]!==T||e[59]!==J||e[60]!==A?(E=(0,K.jsxs)("div",{className:"min-w-0",children:[j,T,J,A]}),e[57]=j,e[58]=T,e[59]=J,e[60]=A,e[61]=E):E=e[61];let C;return e[62]!==x||e[63]!==y||e[64]!==O||e[65]!==E?(C=(0,K.jsxs)("div",{className:x,"data-testid":y,children:[O,E]}),e[62]=x,e[63]=y,e[64]=O,e[65]=E,e[66]=C):C=e[66],C},"Re");function it(t,e){return t.fn.localeCompare(e.fn)}u(it,"he");function lt(t){let[e,a]=t;return{file:e,items:a.toSorted(it)}}u(lt,"xe");function dt(t,e){return t.file.localeCompare(e.file)}u(dt,"be");function ct(t){return t.name}u(ct,"ge");function pt(t,e){return t.localeCompare(e)}u(pt,"ve");var He=D(ae(),1);var W=D(ae(),1),L=D(ge(),1);var m=D(ne(),1);var ue=u(function(t,e,a){let r=(0,W.c)(10),n;r[0]===Symbol.for("react.memo_cache_sentinel")?(n={kind:"loading"},r[0]=n):n=r[0];let[s,o]=(0,L.useState)(n),i,c;r[1]!==a||r[2]!==e||r[3]!==t?(i=u(()=>{if(t!==void 0)return;let l=!1;return e().then(d=>(l||o(a(d)),d)).catch(d=>{l||o({kind:"error",message:ce(d)})}),()=>{l=!0}},"c"),c=[a,e,t],r[1]=a,r[2]=e,r[3]=t,r[4]=i,r[5]=c):(i=r[4],c=r[5]),(0,L.useEffect)(i,c);let p;return r[6]!==a||r[7]!==s||r[8]!==t?(p=t===void 0?s:a(t),r[6]=a,r[7]=s,r[8]=t,r[9]=p):p=r[9],p},"bt"),mt=u(t=>typeof t=="number"?"number":typeof t=="boolean"?"boolean":"string","$e"),Me=u(t=>{if(t.enum!==void 0&&t.enum.length>0)return t.enum;if(t.anyOf!==void 0&&t.anyOf.length>0&&t.anyOf.every(e=>e.const!==void 0))return t.anyOf.map(e=>e.const)},"ee"),me=u(t=>t===void 0?"any":t.const!==void 0?JSON.stringify(t.const):t.enum!==void 0&&t.enum.length>0?t.enum.map(e=>JSON.stringify(e)).join(" | "):t.anyOf!==void 0&&t.anyOf.length>0?t.anyOf.map(e=>me(e)).join(" | "):t.type==="array"?`array<${me(t.items)}>`:t.type??"any","F"),ut=u(t=>{let e=Me(t);return e!==void 0?t.type??mt(e[0]):me(t)},"we"),ft=u(t=>{let e=Me(t);return e===void 0?void 0:e.map(a=>JSON.stringify(a)).join(" | ")},"Se"),ht=u(t=>{let e=[];t.minimum!==void 0?e.push(`${String(t.minimum)} \u2264`):t.exclusiveMinimum!==void 0&&e.push(`${String(t.exclusiveMinimum)} <`);let a=e.length>0;e.push("value"),t.maximum!==void 0?e.push(`\u2264 ${String(t.maximum)}`):t.exclusiveMaximum!==void 0&&e.push(`< ${String(t.exclusiveMaximum)}`);let r=e.length>(a?2:1);return a||r?e.join(" "):void 0},"Oe"),gt=u(t=>{if(t.type==="object"&&t.properties!==void 0)return t;if(t.type==="array"&&t.items?.type==="object"&&t.items.properties!==void 0)return t.items},"je"),te=u(t=>{if(t===void 0)return null;if(t.const!==void 0)return t.const;if(t.enum!==void 0&&t.enum.length>0)return t.enum[0];if(t.anyOf!==void 0&&t.anyOf.length>0)return te(t.anyOf[0]);switch(t.type){case"array":return[];case"boolean":return!1;case"number":return 0;case"object":{let e={};for(let[a,r]of Object.entries(t.properties??{}))e[a]=te(r);return e}case"string":return"";default:return null}},"B"),pe=u(t=>{let e=(0,W.c)(7),{label:a,value:r}=t,n;e[0]!==a?(n=(0,m.jsx)("span",{className:"text-muted-foreground",children:a}),e[0]=a,e[1]=n):n=e[1];let s;e[2]!==r?(s=(0,m.jsx)("span",{className:"text-foreground",children:r}),e[2]=r,e[3]=s):s=e[3];let o;return e[4]!==n||e[5]!==s?(o=(0,m.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border border-border px-1.5 py-0.5 font-mono text-[10px]",children:[n,s]}),e[4]=n,e[5]=s,e[6]=o):o=e[6],o},"z"),xt=u(t=>{let e=(0,W.c)(40),{name:a,required:r,schema:n}=t,s=M(),o;e[0]!==n?(o=ht(n),e[0]=n,e[1]=o):o=e[1];let i=o,c;e[2]!==n?(c=ft(n),e[2]=n,e[3]=c):c=e[3];let p=c,l=n["x-lunora-table"],d=n.format!==void 0||i!==void 0||p!==void 0||l!==void 0,f;e[4]!==n?(f=gt(n),e[4]=n,e[5]=f):f=e[5];let v=f,N=r?"*":"?",k;e[6]!==N?(k=(0,m.jsx)("span",{className:"text-muted-foreground",children:N}),e[6]=N,e[7]=k):k=e[7];let h;e[8]!==a||e[9]!==k?(h=(0,m.jsxs)("span",{className:"font-mono text-foreground",children:[a,k]}),e[8]=a,e[9]=k,e[10]=h):h=e[10];let g;e[11]!==n?(g=ut(n),e[11]=n,e[12]=g):g=e[12];let b;e[13]!==g?(b=(0,m.jsx)("span",{className:"font-mono text-muted-foreground",children:g}),e[13]=g,e[14]=b):b=e[14];let x;e[15]!==h||e[16]!==b?(x=(0,m.jsxs)("div",{className:"flex items-baseline gap-2",children:[h,b]}),e[15]=h,e[16]=b,e[17]=x):x=e[17];let y;e[18]!==n.description?(y=n.description!==void 0&&(0,m.jsx)("p",{className:"max-w-prose text-muted-foreground",children:n.description}),e[18]=n.description,e[19]=y):y=e[19];let w;e[20]!==d||e[21]!==i||e[22]!==l||e[23]!==n.format||e[24]!==s||e[25]!==p?(w=d&&(0,m.jsxs)("div",{className:"flex flex-wrap gap-1",children:[n.format!==void 0&&(0,m.jsx)(pe,{label:s("Format"),value:n.format}),i!==void 0&&(0,m.jsx)(pe,{label:s("Range"),value:i}),p!==void 0&&(0,m.jsx)(pe,{label:s("Value in"),value:p}),l!==void 0&&(0,m.jsx)(pe,{label:s("relation"),value:l})]}),e[20]=d,e[21]=i,e[22]=l,e[23]=n.format,e[24]=s,e[25]=p,e[26]=w):w=e[26];let _;e[27]!==y||e[28]!==w||e[29]!==x?(_=(0,m.jsxs)("div",{className:"flex flex-col gap-1 py-2",children:[x,y,w]}),e[27]=y,e[28]=w,e[29]=x,e[30]=_):_=e[30];let S=_;if(v===void 0){let O;return e[31]!==S?(O=(0,m.jsx)("div",{className:"border-b border-border/50 last:border-b-0",children:S}),e[31]=S,e[32]=O):O=e[32],O}let $;e[33]!==S?($=(0,m.jsx)("summary",{className:"cursor-pointer marker:text-muted-foreground",children:S}),e[33]=S,e[34]=$):$=e[34];let P;e[35]!==v?(P=(0,m.jsx)("div",{className:"mb-2 ml-2 border-l border-border pl-3",children:(0,m.jsx)(Le,{schema:v})}),e[35]=v,e[36]=P):P=e[36];let I;return e[37]!==$||e[38]!==P?(I=(0,m.jsxs)("details",{className:"border-b border-border/50 last:border-b-0",children:[$,P]}),e[37]=$,e[38]=P,e[39]=I):I=e[39],I},"Pe"),Le=u(t=>{let e=(0,W.c)(7),{schema:a}=t,r;e[0]!==a.required?(r=new Set(a.required),e[0]=a.required,e[1]=r):r=e[1];let n=r,s;e[2]!==a.properties?(s=Object.entries(a.properties??{}),e[2]=a.properties,e[3]=s):s=e[3];let o=s,i;return e[4]!==n||e[5]!==o?(i=(0,m.jsx)("div",{className:"flex flex-col",children:o.map(c=>{let[p,l]=c;return(0,m.jsx)(xt,{name:p,required:n.has(p),schema:l},p)})}),e[4]=n,e[5]=o,e[6]=i):i=e[6],i},"te"),Ke=u(t=>{let e=(0,W.c)(10),{schema:a,testId:r}=t;if(a?.type!=="object"||Object.keys(a.properties??{}).length===0){let o;e[0]!==a?(o=me(a),e[0]=a,e[1]=o):o=e[1];let i;return e[2]!==o||e[3]!==r?(i=(0,m.jsx)("p",{className:"font-mono text-xs text-muted-foreground","data-testid":r,children:o}),e[2]=o,e[3]=r,e[4]=i):i=e[4],i}let n;e[5]!==a?(n=(0,m.jsx)(Le,{schema:a}),e[5]=a,e[6]=n):n=e[6];let s;return e[7]!==n||e[8]!==r?(s=(0,m.jsx)("div",{className:"text-xs","data-testid":r,children:n}),e[7]=n,e[8]=r,e[9]=s):s=e[9],s},"Q"),bt=["curl","javascript","lunora"],vt={lunora:"Lunora",curl:"cURL",javascript:"JavaScript"},yt=u(t=>`api.${t.replaceAll(/[/:]/g,".")}`,"Te"),Nt=u(t=>{let e=te(t.argsSchema)??{};return t.functionPath===void 0?e:{args:e,functionPath:t.functionPath}},"Ie"),kt=u((t,e,a)=>{let r=`${a}${e.httpPath}`,n=JSON.stringify(Nt(e),void 0,2),s=JSON.stringify(te(e.argsSchema)??{},void 0,2);switch(t){case"curl":{let o=e.method!=="GET"&&e.method!=="HEAD",i=[`curl -X ${e.method} ${JSON.stringify(r)}`];return o&&i.push(' -H "Content-Type: application/json"',` -d '${n}'`),i.join(` \\
3
3
  `)}case"lunora":return e.functionPath===void 0?`await fetch(${JSON.stringify(e.httpPath)}, { method: ${JSON.stringify(e.method)} });`:`import { useLunora } from "@lunora/react";
4
4
  import { api } from "./_generated/api";