@deslop/workbench 0.0.277 → 0.0.285

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.
@@ -1,4 +1,4 @@
1
- import{n as e,o as t,r as n,t as r}from"./compiler-runtime-CUwoe8mk.js";import{$i as i,Bi as a,Gi as o,Gn as s,It as c,Ji as l,Ki as u,Rn as d,Ta as f,Wi as p,Xi as m,Yi as h,Zi as g,bt as _,c as v,ca as y,da as b,ia as x,l as S,o as C,oa as w,t as T,ta as E,u as D,ua as O,vo as k,zn as ee}from"./utils-BcciP3Sx.js";import{F as A,t as te}from"./button-D5PTso91.js";import{_ as ne,a as re,c as ie,d as ae,f as oe,g as j,h as se,i as ce,l as le,m as ue,n as de,o as fe,p as pe,s as me,t as he,u as ge,v as _e}from"./dialog-CTqPdO7i.js";import{r as ve,t as ye}from"./diff-BT1KPXaz.js";import{a as be,c as xe,d as Se,l as Ce,o as we,r as M,s as Te,t as Ee}from"./state-CfuBgP9R.js";import{B as De,F as Oe,I as ke,L as Ae,R as je,V as Me,z as Ne}from"./composite-CV4TlLb7.js";var Pe=A(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Fe=A(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Ie=A(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),Le=A(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),N=t(n(),1),Re=(0,N.createContext)(null);function ze(){return(0,N.useContext)(Re)?.defaultOptions??{}}function Be(e){return typeof e==`object`&&!!e&&`current`in e}function P(){if(typeof navigator>`u`)return`linux`;let e=navigator.platform?.toLowerCase()??``,t=navigator.userAgent?.toLowerCase()??``;return e.includes(`mac`)||t.includes(`mac`)?`mac`:e.includes(`win`)||t.includes(`win`)?`windows`:`linux`}var Ve=[`Control`,`Alt`,`Shift`,`Meta`];new Set(Ve);var He={Control:`Control`,Ctrl:`Control`,control:`Control`,ctrl:`Control`,Shift:`Shift`,shift:`Shift`,Alt:`Alt`,Option:`Alt`,alt:`Alt`,option:`Alt`,Command:`Meta`,Cmd:`Meta`,Meta:`Meta`,command:`Meta`,cmd:`Meta`,meta:`Meta`,OS:`Meta`,os:`Meta`,Win:`Meta`,win:`Meta`,CommandOrControl:`Mod`,Mod:`Mod`,commandorcontrol:`Mod`,mod:`Mod`};function Ue(e,t=P()){return e===`Mod`?t===`mac`?`Meta`:`Control`:e}var We=new Set(`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``)),Ge=new Set([`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`]),Ke=new Set([`F1`,`F2`,`F3`,`F4`,`F5`,`F6`,`F7`,`F8`,`F9`,`F10`,`F11`,`F12`]),qe=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`]),Je=new Set([`Enter`,`Escape`,`Space`,`Tab`,`Backspace`,`Delete`]),Ye=new Set([`/`,`[`,`]`,`\\`,`=`,`-`,`,`,`.`,`;`,"`"]),Xe={Backquote:"`",Backslash:`\\`,BracketLeft:`[`,BracketRight:`]`,Comma:`,`,Equal:`=`,Minus:`-`,Period:`.`,Semicolon:`;`,Slash:`/`};new Set([...We,...Ge,...Ke,...qe,...Je,...Ye]);var Ze={Esc:`Escape`,esc:`Escape`,escape:`Escape`,Return:`Enter`,return:`Enter`,enter:`Enter`," ":`Space`,space:`Space`,Spacebar:`Space`,spacebar:`Space`,tab:`Tab`,backspace:`Backspace`,Del:`Delete`,del:`Delete`,delete:`Delete`,Up:`ArrowUp`,up:`ArrowUp`,arrowup:`ArrowUp`,Down:`ArrowDown`,down:`ArrowDown`,arrowdown:`ArrowDown`,Left:`ArrowLeft`,left:`ArrowLeft`,arrowleft:`ArrowLeft`,Right:`ArrowRight`,right:`ArrowRight`,arrowright:`ArrowRight`,home:`Home`,end:`End`,pageup:`PageUp`,pagedown:`PageDown`,PgUp:`PageUp`,PgDn:`PageDown`,pgup:`PageUp`,pgdn:`PageDown`};function Qe(e){return/^\p{Letter}$/u.test(e)}function F(e){if(!e)return``;if(e in Ze)return Ze[e];if(Qe(e)){let t=e.toUpperCase();return t.length===1?t:e}let t=e.toUpperCase();return/^F([1-9]|1[0-2])$/.test(t)?t:e}function $e(e,t=P()){let n=e.split(`+`),r=new Set,i=``;for(let e=0;e<n.length;e++){let a=n[e].trim();if(e===n.length-1)i=F(a);else{let e=He[a]??He[a.toLowerCase()];if(e){let n=Ue(e,t);r.add(n)}else n.length===1&&(i=F(a))}}return!i&&n.length>0&&(i=F(n[n.length-1].trim())),{key:i,ctrl:r.has(`Control`),shift:r.has(`Shift`),alt:r.has(`Alt`),meta:r.has(`Meta`),modifiers:Ve.filter(e=>r.has(e))}}function et(e,t=P()){let n=e.ctrl??!1,r=e.shift??!1,i=e.alt??!1,a=e.meta??!1;e.mod&&(Ue(`Mod`,t)===`Control`?n=!0:a=!0);let o=Ve.filter(e=>{switch(e){case`Control`:return n;case`Shift`:return r;case`Alt`:return i;case`Meta`:return a;default:return!1}});return{key:e.key,ctrl:n,shift:r,alt:i,meta:a,modifiers:o}}function tt(e,t){let n=t===`mac`?e.meta&&!e.ctrl:e.ctrl&&!e.meta,r=[];if(n)r.push(`Mod`),e.alt&&r.push(`Alt`),e.shift&&r.push(`Shift`);else for(let t of Ve)e.modifiers.includes(t)&&r.push(t);return r.push(F(e.key)),r.join(`+`)}function nt(e,t=P()){return tt($e(e,t),t)}function rt(e,t=P()){return tt(e,t)}function it(e,t=P()){return typeof e==`string`?nt(e,t):rt(et(e,t),t)}function at(e){let t=[];for(let n of Ve)e.modifiers.includes(n)&&t.push(n);return t.push(e.key),t.join(`+`)}function ot(e,t,n=P()){let r=typeof t==`string`?$e(t,n):t;if(e.ctrlKey!==r.ctrl||e.shiftKey!==r.shift||e.altKey!==r.alt||e.metaKey!==r.meta)return!1;let i=F(e.key),a=r.key;if(i!==`Dead`&&i.length===1&&a.length===1){if(i.toUpperCase()===a.toUpperCase())return!0;if(Qe(i)&&(/^[A-Za-z]$/.test(i)||!e.altKey))return!1}if(e.code&&(i===`Dead`||i.length===1&&a.length===1)){if(e.code.startsWith(`Key`)){let t=e.code.slice(3);if(t.length===1&&/^[A-Za-z]$/.test(t))return t.toUpperCase()===a.toUpperCase()}if(e.code.startsWith(`Digit`)){let t=e.code.slice(5);if(t.length===1&&/^[0-9]$/.test(t))return t===a}return e.code in Xe?Xe[e.code]===a:!1}return i===a}var st={preventDefault:!0,stopPropagation:!0,eventType:`keydown`,enabled:!0,ignoreInputs:!0,conflictBehavior:`warn`};function ct(e){return!(e.ctrl||e.meta||e.key===`Escape`)}function lt(e){if(!e)return!1;if(e instanceof HTMLInputElement){let t=e.type.toLowerCase();return!(t===`button`||t===`submit`||t===`reset`)}return!!(e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable)}function ut(e){return typeof document>`u`?null:typeof Document<`u`&&e instanceof Document||typeof Node<`u`&&e.nodeType===Node.DOCUMENT_NODE?e.activeElement:typeof HTMLElement<`u`&&e instanceof HTMLElement?e.ownerDocument.activeElement??null:e.document.activeElement??null}function dt(e,t,n){let r=ut(t);return r&&lt(r)&&r!==n||e.composedPath().some(e=>lt(e)&&e!==n)?!0:lt(e.target)&&e.target!==n}function ft(e,t){return t===document||t===window?e.currentTarget===t||e.currentTarget===document.documentElement:t===window?e.currentTarget===window||e.currentTarget===document||e.currentTarget===document.documentElement:!!(t instanceof HTMLElement&&(e.currentTarget===t||e.target instanceof Node&&t.contains(e.target)))}function pt(e,t,n,r){if(n!==`allow`){if(n===`warn`){console.warn(`'${t}' is already registered. Multiple handlers will be triggered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to suppress this warning.`);return}if(n===`error`)throw Error(`'${t}' is already registered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to allow multiple registrations.`);r(e)}}var I=function(e){return e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e}({});function mt({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&(I.RecursedCheck|I.Recursed|I.Dirty|I.Pending)?a&(I.RecursedCheck|I.Recursed)?a&I.RecursedCheck?!(a&(I.Dirty|I.Pending))&&c(e,i)?(i.flags=a|(I.Recursed|I.Pending),a&=I.Mutable):a=I.None:i.flags=a&~I.Recursed|I.Pending:a=I.None:i.flags=a|I.Pending,a&I.Watching&&t(i),a&I.Mutable){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&I.Dirty)a=!0;else if((c&(I.Mutable|I.Dirty))===(I.Mutable|I.Dirty)){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&(I.Mutable|I.Pending))===(I.Mutable|I.Pending)){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=~I.Pending;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&(I.Pending|I.Dirty))===I.Pending&&(n.flags=r|I.Dirty,(r&(I.Watching|I.RecursedCheck))===I.Watching&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function ht(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var gt=[],_t=0,{link:vt,unlink:yt,propagate:bt,checkDirty:xt,shallowPropagate:St}=mt({update(e){return e._update()},notify(e){gt[wt++]=e,e.flags&=~I.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=I.Mutable|I.Dirty,Et(e))}}),Ct=0,wt=0,L,Tt=0;function Et(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=yt(n,e)}function Dt(){if(!(Tt>0)){for(;Ct<wt;){let e=gt[Ct];gt[Ct++]=void 0,e.notify()}Ct=0,wt=0}}function Ot(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?I.None:I.Mutable,get(){return L!==void 0&&vt(i,L,_t),i._snapshot},subscribe(e){let t=ht(e),n={current:!1},r=kt(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=L,o=t?.compare??Object.is;if(n)L=i,++_t,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=I.Mutable|I.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{L=a,n&&(i.flags&=~I.RecursedCheck),Et(i)}}};return n?(i.flags=I.Mutable|I.Dirty,i.get=function(){let e=i.flags;if(e&I.Dirty||e&I.Pending&&xt(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&St(e)}}else e&I.Pending&&(i.flags=e&~I.Pending);return L!==void 0&&vt(i,L,_t),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(bt(e),St(e),Dt())}},i}function kt(e){let t=()=>{let t=L;L=n,++_t,n.depsTail=void 0,n.flags=I.Watching|I.RecursedCheck;try{return e()}finally{L=t,n.flags&=~I.RecursedCheck,Et(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:I.Watching|I.RecursedCheck,notify(){let e=this.flags;e&I.Dirty||e&I.Pending&&xt(this.deps,this)?t():this.flags=I.Watching},stop(){this.flags=I.None,this.depsTail=void 0,Et(this)}};return t(),n}var At=class{constructor(e,t){this.atom=Ot(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(ht(e))}},jt=0;function Mt(){return`hotkey_${++jt}`}var Nt=class e{static#e=null;#t;#n=new Map;#r=new Map;constructor(){this.registrations=new At(new Map),this.#t=P()}static getInstance(){return e.#e||=new e,e.#e}static resetInstance(){e.#e&&=(e.#e.destroy(),null)}register(e,t,n={}){if(typeof document>`u`&&!n.target){let e=t;return{id:Mt(),unregister:()=>{},get callback(){return e},set callback(t){e=t},setOptions:()=>{},get isActive(){return!1}}}let r=Mt(),i=n.platform??this.#t,a=typeof e==`string`?$e(e,i):et(e,i),o=typeof e==`string`?e:at(a),s=n.target??document,c=n.conflictBehavior??`warn`,l=this.#d(o,s);l&&pt(l.id,o,c,e=>this.#i(e));let u=n.ignoreInputs??ct(a),d={id:r,hotkey:o,parsedHotkey:a,callback:t,options:{...st,requireReset:!1,...n,platform:i,ignoreInputs:u},hasFired:!1,triggerCount:0,target:s};this.registrations.setState(e=>new Map(e).set(r,d)),this.#r.has(s)||this.#r.set(s,new Set),this.#r.get(s).add(r),this.#a(s);let f=this;return{get id(){return r},unregister:()=>{f.#i(r)},get callback(){return f.registrations.state.get(r)?.callback??t},set callback(e){let t=f.registrations.state.get(r);t&&(t.callback=e)},setOptions:e=>{f.registrations.setState(t=>{let n=t.get(r);if(n){let i=new Map(t);return i.set(r,{...n,options:{...n.options,...e}}),i}return t})},get isActive(){return f.registrations.state.has(r)}}}#i(e){let t=this.registrations.state.get(e);if(!t)return;let n=t.target;this.registrations.setState(t=>{let n=new Map(t);return n.delete(e),n});let r=this.#r.get(n);r&&(r.delete(e),r.size===0&&this.#o(n))}#a(e){if(typeof document>`u`||this.#n.has(e))return;let t=this.#l(e),n=this.#u(e);e.addEventListener(`keydown`,t),e.addEventListener(`keyup`,n),this.#n.set(e,{keydown:t,keyup:n})}#o(e){if(typeof document>`u`)return;let t=this.#n.get(e);t&&(e.removeEventListener(`keydown`,t.keydown),e.removeEventListener(`keyup`,t.keyup),this.#n.delete(e),this.#r.delete(e))}#s(e,t,n){let r=this.#r.get(t);if(r)for(let i of r){let r=this.registrations.state.get(i);if(r&&ft(e,t)&&r.options.enabled&&!(r.options.ignoreInputs!==!1&&dt(e,t,r.target)))if(n===`keydown`){if(r.options.eventType!==`keydown`)continue;ot(e,r.parsedHotkey,r.options.platform)&&(r.options.preventDefault&&e.preventDefault(),r.options.stopPropagation&&e.stopPropagation(),(!r.options.requireReset||!r.hasFired)&&(this.#c(r,e),r.options.requireReset&&(r.hasFired=!0)))}else r.options.eventType===`keyup`&&ot(e,r.parsedHotkey,r.options.platform)&&this.#c(r,e),r.options.requireReset&&r.hasFired&&this.#f(r,e)&&(r.hasFired=!1)}}#c(e,t){e.options.preventDefault&&t.preventDefault(),e.options.stopPropagation&&t.stopPropagation(),e.triggerCount++,this.registrations.setState(e=>new Map(e));let n={hotkey:e.hotkey,parsedHotkey:e.parsedHotkey};e.callback(t,n)}#l(e){return t=>{this.#s(t,e,`keydown`)}}#u(e){return t=>{this.#s(t,e,`keyup`)}}#d(e,t){for(let n of this.registrations.state.values())if(n.hotkey===e&&n.target===t)return n;return null}#f(e,t){let n=e.parsedHotkey,r=F(t.key),i=n.key.length===1?n.key.toUpperCase():n.key;return!!((r.length===1?r.toUpperCase():r)===i||n.ctrl&&r===`Control`||n.shift&&r===`Shift`||n.alt&&r===`Alt`||n.meta&&r===`Meta`)}triggerRegistration(e){let t=this.registrations.state.get(e);if(!t)return!1;let n=t.parsedHotkey,r=new KeyboardEvent(t.options.eventType??`keydown`,{key:n.key,ctrlKey:n.ctrl,shiftKey:n.shift,altKey:n.alt,metaKey:n.meta,bubbles:!0,cancelable:!0});return t.triggerCount++,this.registrations.setState(e=>new Map(e)),t.callback(r,{hotkey:t.hotkey,parsedHotkey:t.parsedHotkey}),!0}getRegistrationCount(){return this.registrations.state.size}isRegistered(e,t){for(let n of this.registrations.state.values())if(n.hotkey===e&&(t===void 0||n.target===t))return!0;return!1}destroy(){for(let e of this.#n.keys())this.#o(e);this.registrations.setState(()=>new Map),this.#n.clear(),this.#r.clear()}};function Pt(){return Nt.getInstance()}function Ft(e,t,n={}){let r={...ze().hotkey,...n},i=Pt(),a=(0,N.useRef)(null),o=(0,N.useRef)(t),s=(0,N.useRef)(r),c=(0,N.useRef)(i);o.current=t,s.current=r,c.current=i;let l=(0,N.useRef)(null),u=(0,N.useRef)(null),d=it(e,r.platform??P()),{target:f,...p}=r;(0,N.useEffect)(()=>{let e=Be(s.current.target)?s.current.target.current:s.current.target??(typeof document<`u`?document:null);if(!e){a.current?.isActive&&(a.current.unregister(),a.current=null),l.current=null,u.current=null;return}let t=l.current!==null&&l.current!==e,n=u.current!==null&&u.current!==d;return a.current?.isActive&&(t||n)&&(a.current.unregister(),a.current=null),(!a.current||!a.current.isActive)&&(a.current=c.current.register(d,o.current,{...s.current,target:e})),l.current=e,u.current=d,()=>{a.current?.isActive&&(a.current.unregister(),a.current=null)}},[d]),a.current?.isActive&&(a.current.callback=t,a.current.setOptions(p))}var It=`diffs-container`;(()=>{try{return!1}catch{return!1}})();var Lt=/(?=^From [a-f0-9]+ .+$)/m,Rt=/(?=^diff --git)/gm,zt=/(?=^---\s+\S)/gm,Bt=/(?<=\n)/,Vt=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Ht=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Ut=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Wt=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Gt=`header-prefix`,Kt=`header-metadata`,qt=`header-custom`,R={dark:`pierre-dark`,light:`pierre-light`},Jt=`data-theme-css`,Yt=`data-unsafe-css`,Xt=`data-diffs-scrollbar-measure`,Zt=`--diffs-scrollbar-gutter-measured`,Qt=1e5,$t={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...$t});var en=Object.freeze({fromStart:0,fromEnd:0}),tn={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},nn={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function z(e){return e.replace(/\n$|\r\n$/,``)}var rn=new TextEncoder,an=new TextDecoder(`utf-8`,{ignoreBOM:!0}),on=/[\uD800-\uDFFF]/,sn=1024,cn=new Uint8Array(sn);function ln(){cn.length!==sn&&(cn=new Uint8Array(sn))}function B(e){if(e.length===0)return e;if(on.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;cn.length<t&&(cn=new Uint8Array(t));let{written:n}=rn.encodeInto(e,cn);return an.decode(cn.subarray(0,n))}function un(e,t,n){try{return dn(e,t,n)}finally{ln()}}function dn(e,t,n=!1){let r=xn(e),i=r?Sn(e,`diff --git`):e.split(zt),a,o=[];for(let e of i){if(r&&!Rt.test(e)){if(a==null)a=B(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}else if(!r&&!zt.test(e)){if(a==null)a=B(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}let i=pn(e,{cacheKey:t==null?void 0:`${t}-${o.length}`,isGitDiff:r,throwOnError:n});i!=null&&o.push(i)}return{patchMetadata:a,files:o}}function fn(e,t){try{return pn(e,t)}finally{ln()}}function pn(e,{cacheKey:t,isGitDiff:n=Rt.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=Sn(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=_n(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=vn(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?gn(i.contents):[],deletionLines:!l&&r!=null&&i!=null?gn(r.contents):[],cacheKey:wn(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(Ut),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=B(r.trim()),n!==r&&(c.prevName=B(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?Ht:Vt):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=B(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=B(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=B(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=B(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=B(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=B(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(Wt)??[];t!=null&&(c.prevObjectId=B(t)),n!=null&&(c.newObjectId=B(n)),r!=null&&(c.mode=B(r))}e.startsWith(`rename from `)&&(c.prevName=B(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=B(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
1
+ import{n as e,o as t,r as n,t as r}from"./compiler-runtime-CUwoe8mk.js";import{$i as i,Bi as a,Gi as o,Gn as s,It as c,Ji as l,Ki as u,Rn as d,Ta as f,Wi as p,Xi as m,Yi as h,Zi as g,bt as _,c as v,ca as y,da as b,ia as x,l as S,o as C,oa as w,t as T,ta as E,u as D,ua as O,vo as k,zn as ee}from"./utils-BcciP3Sx.js";import{F as A,t as te}from"./button-D5PTso91.js";import{_ as ne,a as re,c as ie,d as ae,f as oe,g as j,h as se,i as ce,l as le,m as ue,n as de,o as fe,p as pe,s as me,t as he,u as ge,v as _e}from"./dialog-CTqPdO7i.js";import{r as ve,t as ye}from"./diff-A0Z4G6HR.js";import{a as be,c as xe,d as Se,l as Ce,o as we,r as M,s as Te,t as Ee}from"./state-CQDoh6vk.js";import{B as De,F as Oe,I as ke,L as Ae,R as je,V as Me,z as Ne}from"./composite-CV4TlLb7.js";var Pe=A(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Fe=A(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Ie=A(`git-compare`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`path`,{d:`M11 18H8a2 2 0 0 1-2-2V9`,key:`19pyzm`}]]),Le=A(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),N=t(n(),1),Re=(0,N.createContext)(null);function ze(){return(0,N.useContext)(Re)?.defaultOptions??{}}function Be(e){return typeof e==`object`&&!!e&&`current`in e}function P(){if(typeof navigator>`u`)return`linux`;let e=navigator.platform?.toLowerCase()??``,t=navigator.userAgent?.toLowerCase()??``;return e.includes(`mac`)||t.includes(`mac`)?`mac`:e.includes(`win`)||t.includes(`win`)?`windows`:`linux`}var Ve=[`Control`,`Alt`,`Shift`,`Meta`];new Set(Ve);var He={Control:`Control`,Ctrl:`Control`,control:`Control`,ctrl:`Control`,Shift:`Shift`,shift:`Shift`,Alt:`Alt`,Option:`Alt`,alt:`Alt`,option:`Alt`,Command:`Meta`,Cmd:`Meta`,Meta:`Meta`,command:`Meta`,cmd:`Meta`,meta:`Meta`,OS:`Meta`,os:`Meta`,Win:`Meta`,win:`Meta`,CommandOrControl:`Mod`,Mod:`Mod`,commandorcontrol:`Mod`,mod:`Mod`};function Ue(e,t=P()){return e===`Mod`?t===`mac`?`Meta`:`Control`:e}var We=new Set(`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``)),Ge=new Set([`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`]),Ke=new Set([`F1`,`F2`,`F3`,`F4`,`F5`,`F6`,`F7`,`F8`,`F9`,`F10`,`F11`,`F12`]),qe=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`]),Je=new Set([`Enter`,`Escape`,`Space`,`Tab`,`Backspace`,`Delete`]),Ye=new Set([`/`,`[`,`]`,`\\`,`=`,`-`,`,`,`.`,`;`,"`"]),Xe={Backquote:"`",Backslash:`\\`,BracketLeft:`[`,BracketRight:`]`,Comma:`,`,Equal:`=`,Minus:`-`,Period:`.`,Semicolon:`;`,Slash:`/`};new Set([...We,...Ge,...Ke,...qe,...Je,...Ye]);var Ze={Esc:`Escape`,esc:`Escape`,escape:`Escape`,Return:`Enter`,return:`Enter`,enter:`Enter`," ":`Space`,space:`Space`,Spacebar:`Space`,spacebar:`Space`,tab:`Tab`,backspace:`Backspace`,Del:`Delete`,del:`Delete`,delete:`Delete`,Up:`ArrowUp`,up:`ArrowUp`,arrowup:`ArrowUp`,Down:`ArrowDown`,down:`ArrowDown`,arrowdown:`ArrowDown`,Left:`ArrowLeft`,left:`ArrowLeft`,arrowleft:`ArrowLeft`,Right:`ArrowRight`,right:`ArrowRight`,arrowright:`ArrowRight`,home:`Home`,end:`End`,pageup:`PageUp`,pagedown:`PageDown`,PgUp:`PageUp`,PgDn:`PageDown`,pgup:`PageUp`,pgdn:`PageDown`};function Qe(e){return/^\p{Letter}$/u.test(e)}function F(e){if(!e)return``;if(e in Ze)return Ze[e];if(Qe(e)){let t=e.toUpperCase();return t.length===1?t:e}let t=e.toUpperCase();return/^F([1-9]|1[0-2])$/.test(t)?t:e}function $e(e,t=P()){let n=e.split(`+`),r=new Set,i=``;for(let e=0;e<n.length;e++){let a=n[e].trim();if(e===n.length-1)i=F(a);else{let e=He[a]??He[a.toLowerCase()];if(e){let n=Ue(e,t);r.add(n)}else n.length===1&&(i=F(a))}}return!i&&n.length>0&&(i=F(n[n.length-1].trim())),{key:i,ctrl:r.has(`Control`),shift:r.has(`Shift`),alt:r.has(`Alt`),meta:r.has(`Meta`),modifiers:Ve.filter(e=>r.has(e))}}function et(e,t=P()){let n=e.ctrl??!1,r=e.shift??!1,i=e.alt??!1,a=e.meta??!1;e.mod&&(Ue(`Mod`,t)===`Control`?n=!0:a=!0);let o=Ve.filter(e=>{switch(e){case`Control`:return n;case`Shift`:return r;case`Alt`:return i;case`Meta`:return a;default:return!1}});return{key:e.key,ctrl:n,shift:r,alt:i,meta:a,modifiers:o}}function tt(e,t){let n=t===`mac`?e.meta&&!e.ctrl:e.ctrl&&!e.meta,r=[];if(n)r.push(`Mod`),e.alt&&r.push(`Alt`),e.shift&&r.push(`Shift`);else for(let t of Ve)e.modifiers.includes(t)&&r.push(t);return r.push(F(e.key)),r.join(`+`)}function nt(e,t=P()){return tt($e(e,t),t)}function rt(e,t=P()){return tt(e,t)}function it(e,t=P()){return typeof e==`string`?nt(e,t):rt(et(e,t),t)}function at(e){let t=[];for(let n of Ve)e.modifiers.includes(n)&&t.push(n);return t.push(e.key),t.join(`+`)}function ot(e,t,n=P()){let r=typeof t==`string`?$e(t,n):t;if(e.ctrlKey!==r.ctrl||e.shiftKey!==r.shift||e.altKey!==r.alt||e.metaKey!==r.meta)return!1;let i=F(e.key),a=r.key;if(i!==`Dead`&&i.length===1&&a.length===1){if(i.toUpperCase()===a.toUpperCase())return!0;if(Qe(i)&&(/^[A-Za-z]$/.test(i)||!e.altKey))return!1}if(e.code&&(i===`Dead`||i.length===1&&a.length===1)){if(e.code.startsWith(`Key`)){let t=e.code.slice(3);if(t.length===1&&/^[A-Za-z]$/.test(t))return t.toUpperCase()===a.toUpperCase()}if(e.code.startsWith(`Digit`)){let t=e.code.slice(5);if(t.length===1&&/^[0-9]$/.test(t))return t===a}return e.code in Xe?Xe[e.code]===a:!1}return i===a}var st={preventDefault:!0,stopPropagation:!0,eventType:`keydown`,enabled:!0,ignoreInputs:!0,conflictBehavior:`warn`};function ct(e){return!(e.ctrl||e.meta||e.key===`Escape`)}function lt(e){if(!e)return!1;if(e instanceof HTMLInputElement){let t=e.type.toLowerCase();return!(t===`button`||t===`submit`||t===`reset`)}return!!(e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement||e instanceof HTMLElement&&e.isContentEditable)}function ut(e){return typeof document>`u`?null:typeof Document<`u`&&e instanceof Document||typeof Node<`u`&&e.nodeType===Node.DOCUMENT_NODE?e.activeElement:typeof HTMLElement<`u`&&e instanceof HTMLElement?e.ownerDocument.activeElement??null:e.document.activeElement??null}function dt(e,t,n){let r=ut(t);return r&&lt(r)&&r!==n||e.composedPath().some(e=>lt(e)&&e!==n)?!0:lt(e.target)&&e.target!==n}function ft(e,t){return t===document||t===window?e.currentTarget===t||e.currentTarget===document.documentElement:t===window?e.currentTarget===window||e.currentTarget===document||e.currentTarget===document.documentElement:!!(t instanceof HTMLElement&&(e.currentTarget===t||e.target instanceof Node&&t.contains(e.target)))}function pt(e,t,n,r){if(n!==`allow`){if(n===`warn`){console.warn(`'${t}' is already registered. Multiple handlers will be triggered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to suppress this warning.`);return}if(n===`error`)throw Error(`'${t}' is already registered. Use conflictBehavior: 'replace' to replace the existing handler, or conflictBehavior: 'allow' to allow multiple registrations.`);r(e)}}var I=function(e){return e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e}({});function mt({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&(I.RecursedCheck|I.Recursed|I.Dirty|I.Pending)?a&(I.RecursedCheck|I.Recursed)?a&I.RecursedCheck?!(a&(I.Dirty|I.Pending))&&c(e,i)?(i.flags=a|(I.Recursed|I.Pending),a&=I.Mutable):a=I.None:i.flags=a&~I.Recursed|I.Pending:a=I.None:i.flags=a|I.Pending,a&I.Watching&&t(i),a&I.Mutable){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&I.Dirty)a=!0;else if((c&(I.Mutable|I.Dirty))===(I.Mutable|I.Dirty)){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&(I.Mutable|I.Pending))===(I.Mutable|I.Pending)){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=~I.Pending;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&(I.Pending|I.Dirty))===I.Pending&&(n.flags=r|I.Dirty,(r&(I.Watching|I.RecursedCheck))===I.Watching&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function ht(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var gt=[],_t=0,{link:vt,unlink:yt,propagate:bt,checkDirty:xt,shallowPropagate:St}=mt({update(e){return e._update()},notify(e){gt[wt++]=e,e.flags&=~I.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=I.Mutable|I.Dirty,Et(e))}}),Ct=0,wt=0,L,Tt=0;function Et(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=yt(n,e)}function Dt(){if(!(Tt>0)){for(;Ct<wt;){let e=gt[Ct];gt[Ct++]=void 0,e.notify()}Ct=0,wt=0}}function Ot(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?I.None:I.Mutable,get(){return L!==void 0&&vt(i,L,_t),i._snapshot},subscribe(e){let t=ht(e),n={current:!1},r=kt(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=L,o=t?.compare??Object.is;if(n)L=i,++_t,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=I.Mutable|I.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{L=a,n&&(i.flags&=~I.RecursedCheck),Et(i)}}};return n?(i.flags=I.Mutable|I.Dirty,i.get=function(){let e=i.flags;if(e&I.Dirty||e&I.Pending&&xt(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&St(e)}}else e&I.Pending&&(i.flags=e&~I.Pending);return L!==void 0&&vt(i,L,_t),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(bt(e),St(e),Dt())}},i}function kt(e){let t=()=>{let t=L;L=n,++_t,n.depsTail=void 0,n.flags=I.Watching|I.RecursedCheck;try{return e()}finally{L=t,n.flags&=~I.RecursedCheck,Et(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:I.Watching|I.RecursedCheck,notify(){let e=this.flags;e&I.Dirty||e&I.Pending&&xt(this.deps,this)?t():this.flags=I.Watching},stop(){this.flags=I.None,this.depsTail=void 0,Et(this)}};return t(),n}var At=class{constructor(e,t){this.atom=Ot(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(ht(e))}},jt=0;function Mt(){return`hotkey_${++jt}`}var Nt=class e{static#e=null;#t;#n=new Map;#r=new Map;constructor(){this.registrations=new At(new Map),this.#t=P()}static getInstance(){return e.#e||=new e,e.#e}static resetInstance(){e.#e&&=(e.#e.destroy(),null)}register(e,t,n={}){if(typeof document>`u`&&!n.target){let e=t;return{id:Mt(),unregister:()=>{},get callback(){return e},set callback(t){e=t},setOptions:()=>{},get isActive(){return!1}}}let r=Mt(),i=n.platform??this.#t,a=typeof e==`string`?$e(e,i):et(e,i),o=typeof e==`string`?e:at(a),s=n.target??document,c=n.conflictBehavior??`warn`,l=this.#d(o,s);l&&pt(l.id,o,c,e=>this.#i(e));let u=n.ignoreInputs??ct(a),d={id:r,hotkey:o,parsedHotkey:a,callback:t,options:{...st,requireReset:!1,...n,platform:i,ignoreInputs:u},hasFired:!1,triggerCount:0,target:s};this.registrations.setState(e=>new Map(e).set(r,d)),this.#r.has(s)||this.#r.set(s,new Set),this.#r.get(s).add(r),this.#a(s);let f=this;return{get id(){return r},unregister:()=>{f.#i(r)},get callback(){return f.registrations.state.get(r)?.callback??t},set callback(e){let t=f.registrations.state.get(r);t&&(t.callback=e)},setOptions:e=>{f.registrations.setState(t=>{let n=t.get(r);if(n){let i=new Map(t);return i.set(r,{...n,options:{...n.options,...e}}),i}return t})},get isActive(){return f.registrations.state.has(r)}}}#i(e){let t=this.registrations.state.get(e);if(!t)return;let n=t.target;this.registrations.setState(t=>{let n=new Map(t);return n.delete(e),n});let r=this.#r.get(n);r&&(r.delete(e),r.size===0&&this.#o(n))}#a(e){if(typeof document>`u`||this.#n.has(e))return;let t=this.#l(e),n=this.#u(e);e.addEventListener(`keydown`,t),e.addEventListener(`keyup`,n),this.#n.set(e,{keydown:t,keyup:n})}#o(e){if(typeof document>`u`)return;let t=this.#n.get(e);t&&(e.removeEventListener(`keydown`,t.keydown),e.removeEventListener(`keyup`,t.keyup),this.#n.delete(e),this.#r.delete(e))}#s(e,t,n){let r=this.#r.get(t);if(r)for(let i of r){let r=this.registrations.state.get(i);if(r&&ft(e,t)&&r.options.enabled&&!(r.options.ignoreInputs!==!1&&dt(e,t,r.target)))if(n===`keydown`){if(r.options.eventType!==`keydown`)continue;ot(e,r.parsedHotkey,r.options.platform)&&(r.options.preventDefault&&e.preventDefault(),r.options.stopPropagation&&e.stopPropagation(),(!r.options.requireReset||!r.hasFired)&&(this.#c(r,e),r.options.requireReset&&(r.hasFired=!0)))}else r.options.eventType===`keyup`&&ot(e,r.parsedHotkey,r.options.platform)&&this.#c(r,e),r.options.requireReset&&r.hasFired&&this.#f(r,e)&&(r.hasFired=!1)}}#c(e,t){e.options.preventDefault&&t.preventDefault(),e.options.stopPropagation&&t.stopPropagation(),e.triggerCount++,this.registrations.setState(e=>new Map(e));let n={hotkey:e.hotkey,parsedHotkey:e.parsedHotkey};e.callback(t,n)}#l(e){return t=>{this.#s(t,e,`keydown`)}}#u(e){return t=>{this.#s(t,e,`keyup`)}}#d(e,t){for(let n of this.registrations.state.values())if(n.hotkey===e&&n.target===t)return n;return null}#f(e,t){let n=e.parsedHotkey,r=F(t.key),i=n.key.length===1?n.key.toUpperCase():n.key;return!!((r.length===1?r.toUpperCase():r)===i||n.ctrl&&r===`Control`||n.shift&&r===`Shift`||n.alt&&r===`Alt`||n.meta&&r===`Meta`)}triggerRegistration(e){let t=this.registrations.state.get(e);if(!t)return!1;let n=t.parsedHotkey,r=new KeyboardEvent(t.options.eventType??`keydown`,{key:n.key,ctrlKey:n.ctrl,shiftKey:n.shift,altKey:n.alt,metaKey:n.meta,bubbles:!0,cancelable:!0});return t.triggerCount++,this.registrations.setState(e=>new Map(e)),t.callback(r,{hotkey:t.hotkey,parsedHotkey:t.parsedHotkey}),!0}getRegistrationCount(){return this.registrations.state.size}isRegistered(e,t){for(let n of this.registrations.state.values())if(n.hotkey===e&&(t===void 0||n.target===t))return!0;return!1}destroy(){for(let e of this.#n.keys())this.#o(e);this.registrations.setState(()=>new Map),this.#n.clear(),this.#r.clear()}};function Pt(){return Nt.getInstance()}function Ft(e,t,n={}){let r={...ze().hotkey,...n},i=Pt(),a=(0,N.useRef)(null),o=(0,N.useRef)(t),s=(0,N.useRef)(r),c=(0,N.useRef)(i);o.current=t,s.current=r,c.current=i;let l=(0,N.useRef)(null),u=(0,N.useRef)(null),d=it(e,r.platform??P()),{target:f,...p}=r;(0,N.useEffect)(()=>{let e=Be(s.current.target)?s.current.target.current:s.current.target??(typeof document<`u`?document:null);if(!e){a.current?.isActive&&(a.current.unregister(),a.current=null),l.current=null,u.current=null;return}let t=l.current!==null&&l.current!==e,n=u.current!==null&&u.current!==d;return a.current?.isActive&&(t||n)&&(a.current.unregister(),a.current=null),(!a.current||!a.current.isActive)&&(a.current=c.current.register(d,o.current,{...s.current,target:e})),l.current=e,u.current=d,()=>{a.current?.isActive&&(a.current.unregister(),a.current=null)}},[d]),a.current?.isActive&&(a.current.callback=t,a.current.setOptions(p))}var It=`diffs-container`;(()=>{try{return!1}catch{return!1}})();var Lt=/(?=^From [a-f0-9]+ .+$)/m,Rt=/(?=^diff --git)/gm,zt=/(?=^---\s+\S)/gm,Bt=/(?<=\n)/,Vt=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Ht=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Ut=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Wt=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Gt=`header-prefix`,Kt=`header-metadata`,qt=`header-custom`,R={dark:`pierre-dark`,light:`pierre-light`},Jt=`data-theme-css`,Yt=`data-unsafe-css`,Xt=`data-diffs-scrollbar-measure`,Zt=`--diffs-scrollbar-gutter-measured`,Qt=1e5,$t={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...$t});var en=Object.freeze({fromStart:0,fromEnd:0}),tn={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},nn={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function z(e){return e.replace(/\n$|\r\n$/,``)}var rn=new TextEncoder,an=new TextDecoder(`utf-8`,{ignoreBOM:!0}),on=/[\uD800-\uDFFF]/,sn=1024,cn=new Uint8Array(sn);function ln(){cn.length!==sn&&(cn=new Uint8Array(sn))}function B(e){if(e.length===0)return e;if(on.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;cn.length<t&&(cn=new Uint8Array(t));let{written:n}=rn.encodeInto(e,cn);return an.decode(cn.subarray(0,n))}function un(e,t,n){try{return dn(e,t,n)}finally{ln()}}function dn(e,t,n=!1){let r=xn(e),i=r?Sn(e,`diff --git`):e.split(zt),a,o=[];for(let e of i){if(r&&!Rt.test(e)){if(a==null)a=B(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}else if(!r&&!zt.test(e)){if(a==null)a=B(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}let i=pn(e,{cacheKey:t==null?void 0:`${t}-${o.length}`,isGitDiff:r,throwOnError:n});i!=null&&o.push(i)}return{patchMetadata:a,files:o}}function fn(e,t){try{return pn(e,t)}finally{ln()}}function pn(e,{cacheKey:t,isGitDiff:n=Rt.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=Sn(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=_n(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=vn(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?gn(i.contents):[],deletionLines:!l&&r!=null&&i!=null?gn(r.contents):[],cacheKey:wn(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(Ut),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=B(r.trim()),n!==r&&(c.prevName=B(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?Ht:Vt):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=B(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=B(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=B(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=B(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=B(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=B(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(Wt)??[];t!=null&&(c.prevObjectId=B(t)),n!=null&&(c.newObjectId=B(n)),r!=null&&(c.mode=B(r))}e.startsWith(`rename from `)&&(c.prevName=B(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=B(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
2
2
  `||s[s.length-1]===`\r`||s[s.length-1]===`\r
3
3
  `||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:wn(p.hunkContext),hunkSpecs:B(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`))break;let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=Tn(n);if(r===`addition`){let e=En(t);(g==null||g.type!==`change`)&&(g=Dn(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&c.additionLines.push(e),g.additions++,m++,_=`addition`}else if(r===`deletion`){let e=En(t);(g==null||g.type!==`change`)&&(g=Dn(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&c.deletionLines.push(e),g.deletions++,h++,_=`deletion`}else if(r===`context`){let e=En(t);(g==null||g.type!==`context`)&&(g=Dn(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e)),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=z(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=z(c.deletionLines[e]))}}}b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(b.additionStart-1-o,0),c.hunks.push(b),o=b.additionStart+b.additionCount-1;for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=e.additionStart+e.additionCount-1,n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),c}}function mn(e,t,n=!1){let r=[],i=hn(e)?e.split(Lt):[e];for(let e of i)try{r.push(un(e,t==null?void 0:`${t}-${r.length}`,n))}catch(e){if(n)throw e;console.error(e)}return r}function hn(e){return e.startsWith(`From `)||e.includes(`
4
4
  From `)}function gn(e){let t=_n(e);for(let e=0;e<t.length;e++)t[e]=B(t[e]);return t}function _n(e){if(e.length===0)return[``];let t=[],n=0;for(;;){let r=e.indexOf(`
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser-D0lHtlHJ.js","assets/compiler-runtime-CUwoe8mk.js","assets/utils-BcciP3Sx.js","assets/state-CfuBgP9R.js","assets/button-D5PTso91.js","assets/composite-CV4TlLb7.js","assets/check-C1Q0x6Ev.js","assets/info-C9lZ-VFp.js"])))=>i.map(i=>d[i]);
2
- import{n as e,t}from"./compiler-runtime-CUwoe8mk.js";import{So as n,a as r,n as i,t as a,xo as o}from"./utils-BcciP3Sx.js";import{F as s,P as c,t as l}from"./button-D5PTso91.js";var u=s(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),d=n(`/(home)/$worktree/browser`)({component:o(()=>r(()=>import(`./browser-D0lHtlHJ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`component`)}),f=t(),p=e(),m=c(`grid gap-0.5 rounded-none border px-2.5 py-2 text-left text-xs has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 w-full relative group/alert`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function h(e){let t=(0,f.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o;t[4]!==n||t[5]!==i?(o=a(m({variant:i}),n),t[4]=n,t[5]=i,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o?(s=(0,p.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:o,...r}),t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function g(e){let t=(0,f.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`[&_a]:hover:text-foreground font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,p.jsx)(`div`,{"data-slot":`alert-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function _(e){let t=(0,f.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`text-muted-foreground [&_a]:hover:text-foreground text-xs/relaxed text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-2`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,p.jsx)(`div`,{"data-slot":`alert-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function v(){let e=(0,f.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-4`,children:(0,p.jsxs)(h,{variant:`destructive`,className:`w-full max-w-lg`,children:[(0,p.jsx)(u,{}),(0,p.jsx)(g,{children:`Page not found`}),(0,p.jsx)(_,{children:`Error 404`})]})}),e[0]=t):t=e[0],t}function y(){let e=(0,f.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,p.jsx)(`div`,{className:`animation-duration-[2.5s] border-muted-foreground/50 size-8 animate-spin border-2`})}),e[0]=t):t=e[0],t}function b(e){let t=(0,f.c)(12),n;t[0]===e.error?n=t[1]:(n=i(e.error),t[0]=e.error,t[1]=n);let r=n,a;t[2]!==r||t[3]!==e?(a=()=>{navigator.clipboard.writeText(r),e.reset()},t[2]=r,t[3]=e,t[4]=a):a=t[4];let o,s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,p.jsx)(u,{}),s=(0,p.jsx)(g,{children:`Something went wrong`}),t[5]=o,t[6]=s):(o=t[5],s=t[6]);let c;t[7]===r?c=t[8]:(c=(0,p.jsxs)(h,{variant:`destructive`,className:`w-full max-w-lg`,children:[o,s,(0,p.jsx)(_,{className:`wrap-break-word whitespace-pre-wrap`,children:r})]}),t[7]=r,t[8]=c);let d;return t[9]!==a||t[10]!==c?(d=(0,p.jsx)(l,{variant:`ghost`,onClick:a,className:`flex h-full w-full cursor-pointer items-center justify-center p-4 select-text`,children:c}),t[9]=a,t[10]=c,t[11]=d):d=t[11],d}export{d as i,y as n,v as r,b as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browser-WO1SlWNU.js","assets/compiler-runtime-CUwoe8mk.js","assets/utils-BcciP3Sx.js","assets/state-CQDoh6vk.js","assets/button-D5PTso91.js","assets/composite-CV4TlLb7.js","assets/check-C1Q0x6Ev.js","assets/info-C9lZ-VFp.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,t}from"./compiler-runtime-CUwoe8mk.js";import{So as n,a as r,n as i,t as a,xo as o}from"./utils-BcciP3Sx.js";import{F as s,P as c,t as l}from"./button-D5PTso91.js";var u=s(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),d=n(`/(home)/$worktree/browser`)({component:o(()=>r(()=>import(`./browser-WO1SlWNU.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`component`)}),f=t(),p=e(),m=c(`grid gap-0.5 rounded-none border px-2.5 py-2 text-left text-xs has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4 w-full relative group/alert`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function h(e){let t=(0,f.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o;t[4]!==n||t[5]!==i?(o=a(m({variant:i}),n),t[4]=n,t[5]=i,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o?(s=(0,p.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:o,...r}),t[7]=r,t[8]=o,t[9]=s):s=t[9],s}function g(e){let t=(0,f.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`[&_a]:hover:text-foreground font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,p.jsx)(`div`,{"data-slot":`alert-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function _(e){let t=(0,f.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`text-muted-foreground [&_a]:hover:text-foreground text-xs/relaxed text-balance md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-2`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,p.jsx)(`div`,{"data-slot":`alert-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function v(){let e=(0,f.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-4`,children:(0,p.jsxs)(h,{variant:`destructive`,className:`w-full max-w-lg`,children:[(0,p.jsx)(u,{}),(0,p.jsx)(g,{children:`Page not found`}),(0,p.jsx)(_,{children:`Error 404`})]})}),e[0]=t):t=e[0],t}function y(){let e=(0,f.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,p.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,p.jsx)(`div`,{className:`animation-duration-[2.5s] border-muted-foreground/50 size-8 animate-spin border-2`})}),e[0]=t):t=e[0],t}function b(e){let t=(0,f.c)(12),n;t[0]===e.error?n=t[1]:(n=i(e.error),t[0]=e.error,t[1]=n);let r=n,a;t[2]!==r||t[3]!==e?(a=()=>{navigator.clipboard.writeText(r),e.reset()},t[2]=r,t[3]=e,t[4]=a):a=t[4];let o,s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,p.jsx)(u,{}),s=(0,p.jsx)(g,{children:`Something went wrong`}),t[5]=o,t[6]=s):(o=t[5],s=t[6]);let c;t[7]===r?c=t[8]:(c=(0,p.jsxs)(h,{variant:`destructive`,className:`w-full max-w-lg`,children:[o,s,(0,p.jsx)(_,{className:`wrap-break-word whitespace-pre-wrap`,children:r})]}),t[7]=r,t[8]=c);let d;return t[9]!==a||t[10]!==c?(d=(0,p.jsx)(l,{variant:`ghost`,onClick:a,className:`flex h-full w-full cursor-pointer items-center justify-center p-4 select-text`,children:c}),t[9]=a,t[10]=c,t[11]=d):d=t[11],d}export{d as i,y as n,v as r,b as t};
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/(home)-DqYzvhAC.js","assets/compiler-runtime-CUwoe8mk.js"])))=>i.map(i=>d[i]);
2
- import{i as e,n as t,o as n,r}from"./compiler-runtime-CUwoe8mk.js";import{$o as i,Bo as a,Co as o,Do as s,Eo as c,So as l,a as u,bo as d,ds as f,fs as p,ls as m,ms as h,ps as g,rs as _,ts as v,wo as y,xo as b}from"./utils-BcciP3Sx.js";import{a as x,c as ee,i as te,n as ne,o as re,s as ie,t as ae}from"./route-XNMYtWT-.js";import{n as oe,t as se}from"./diff-BT1KPXaz.js";import{i as ce,n as le,r as ue,t as de}from"./fallbacks-BYq-1Jf8.js";import{t as fe}from"./terminal-Br2Fi1vV.js";function pe(e,t){if(e)return typeof e==`string`?e:e[t]}function S(e){return e?.scriptFormat??`module`}function C(e,t,n){let r=me(t),i=pe(n,`script`)??r.crossOrigin;return{...S(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function me(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function he(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function ge(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}var w=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(w||{});function T({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function E(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var _e=[],ve=0,{link:ye,unlink:be,propagate:xe,checkDirty:Se,shallowPropagate:Ce}=T({update(e){return e._update()},notify(e){_e[Te++]=e,e.flags&=~w.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=w.Mutable|w.Dirty,ke(e))}}),we=0,Te=0,Ee,De=0;function Oe(e){try{++De,e()}finally{--De||Ae()}}function ke(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=be(n,e)}function Ae(){if(!(De>0)){for(;we<Te;){let e=_e[we];_e[we++]=void 0,e.notify()}we=0,Te=0}}function je(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?w.None:w.Mutable,get(){return Ee!==void 0&&ye(i,Ee,ve),i._snapshot},subscribe(e){let t=E(e),n={current:!1},r=Me(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Ee,o=t?.compare??Object.is;if(n)Ee=i,++ve,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=w.Mutable|w.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Ee=a,n&&(i.flags&=~w.RecursedCheck),ke(i)}}};return n?(i.flags=w.Mutable|w.Dirty,i.get=function(){let e=i.flags;if(e&w.Dirty||e&w.Pending&&Se(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Ce(e)}}else e&w.Pending&&(i.flags=e&~w.Pending);return Ee!==void 0&&ye(i,Ee,ve),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(xe(e),Ce(e),Ae())}},i}function Me(e){let t=()=>{let t=Ee;Ee=n,++ve,n.depsTail=void 0,n.flags=w.Watching|w.RecursedCheck;try{return e()}finally{Ee=t,n.flags&=~w.RecursedCheck,ke(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:w.Watching|w.RecursedCheck,notify(){let e=this.flags;e&w.Dirty||e&w.Pending&&Se(this.deps,this)?t():this.flags=w.Watching},stop(){this.flags=w.None,this.depsTail=void 0,ke(this)}};return t(),n}var Ne=e=>({createMutableStore:je,createReadonlyStore:je,batch:Oe}),Pe=e=>new Fe(e),Fe=class extends ie{constructor(e){super(e,Ne)}},Ie=n(r(),1);function Le(){let e=f(),t=Ie.useRef({router:e,mounted:!1}),[n,r]=Ie.useState(!1),i=s(e.stores.isLoading,e=>e),o=s(e.stores.hasPending,e=>e),c=h(i),l=i||n||o,u=h(l),d=i||o,p=h(d);return e.startTransition=e=>{r(!0),Ie.startTransition(()=>{e(),r(!1)})},Ie.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return a(e.latestLocation.publicHref)!==a(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),g(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),g(()=>{c&&!i&&e.emit({type:`onLoad`,...ee(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,e,i]),g(()=>{p&&!d&&e.emit({type:`onBeforeRouteMount`,...ee(e.stores.location.get(),e.stores.resolvedLocation.get())})},[d,p,e]),g(()=>{if(u&&!l){let t=ee(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),Oe(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[l,u,e]),null}var D=t();function Re(){let e=f(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,D.jsx)(t,{}):null,r=(0,D.jsxs)(typeof document<`u`&&e.ssr?te:Ie.Suspense,{fallback:n,children:[(0,D.jsx)(Le,{}),(0,D.jsx)(ze,{})]});return e.options.InnerWrap?(0,D.jsx)(e.options.InnerWrap,{children:r}):r}function ze(){let e=f(),t=s(e.stores.firstId,e=>e),n=s(e.stores.loadedAt,e=>e),r=t?(0,D.jsx)(ne,{matchId:t}):null;return(0,D.jsx)(m.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,D.jsx)(x,{getResetKey:()=>n,errorComponent:re,onCatch:void 0,children:r})})}function Be({router:e,children:t,...n}){_(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,D.jsx)(p.Provider,{value:e,children:t});return e.options.Wrap?(0,D.jsx)(e.options.Wrap,{children:r}):r}function Ve({router:e,...t}){return(0,D.jsx)(Be,{router:e,...t,children:(0,D.jsx)(Re,{})})}function He(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function Ue(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e;switch(e.tag){case`title`:return(0,D.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,D.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,D.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,D.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,D.jsx)(We,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function We({attrs:e,children:t,preventScriptHoist:n}){f();let r=c(),i=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(Ie.useEffect(()=>{if(!i){if(e?.src){let t=(()=>{try{let t=document.baseURI||window.location.href;return new URL(e.src,t).href}catch{return e.src}})();for(let e of document.querySelectorAll(`script[src]`))if(e.src===t)return;let n=document.createElement(`script`);return He(n,e),document.head.appendChild(n),()=>n.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.querySelectorAll(`script:not([src])`)){if(!(e instanceof HTMLScriptElement))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,He(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,i]),i&&typeof t==`string`)return(0,D.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return(0,D.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,D.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var Ge=e=>{let t=f(),n=t.options.ssr?.nonce,r=s(t.stores.matches,e=>e.map(e=>e.meta).filter(e=>e!==void 0),i),a=Ie.useMemo(()=>{let e=[],t={},i;for(let a=r.length-1;a>=0;a--){let o=r[a];for(let r=o.length-1;r>=0;r--){let a=o[r];if(a)if(a.title)i||={tag:`title`,children:a.title};else if(`script:ld+json`in a)try{let t=JSON.stringify(a[`script:ld+json`]);e.push({tag:`script`,attrs:{type:`application/ld+json`},children:v(t)})}catch{}else{let r=a.name??a.property;if(r){if(t[r])continue;t[r]=!0}e.push({tag:`meta`,attrs:{...a,nonce:n}})}}}return i&&e.push(i),n&&e.push({tag:`meta`,attrs:{property:`csp-nonce`,content:n}}),e.reverse(),e},[r,n]),o=s(t.stores.matches,e=>e.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),i),c=s(t.stores.matches,r=>{let i=t.ssr?.manifest,a=[];return i?(r.forEach(t=>{i.routes[t.routeId]?.css?.forEach(t=>{let r=ge(t);a.push({tag:`link`,attrs:{rel:`stylesheet`,...r,crossOrigin:pe(e,`stylesheet`)??r.crossOrigin,suppressHydrationWarning:!0,nonce:n}})})}),i.inlineStyle&&a.push({tag:`style`,attrs:{...i.inlineStyle.attrs,nonce:n},children:i.inlineStyle.children,inlineCss:!0}),a):a},i),l=s(t.stores.matches,r=>{let i=[],a=t.ssr?.manifest;return a&&r.forEach(t=>{a.routes[t.routeId]?.preloads?.forEach(t=>{i.push({tag:`link`,attrs:{...C(a,t,e),nonce:n}})})}),i},i),u=s(t.stores.matches,e=>e.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`style`,attrs:{...t,nonce:n},children:e})),i),d=s(t.stores.matches,e=>e.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`script`,attrs:{...t,nonce:n},children:e})),i),p=[];return he(p,a),p.push(...l),he(p,o),p.push(...c),he(p,u),he(p,d),p};function Ke(e){let t=Ge(e.assetCrossOrigin),n=f().options.ssr?.nonce;return(0,D.jsx)(D.Fragment,{children:t.map(e=>(0,Ie.createElement)(Ue,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var qe=()=>{let e=f(),t=e.options.ssr?.nonce,n=n=>{let r=[],i=e.ssr?.manifest;if(!i)return[];for(let e of n){let n=i.routes[e.routeId]?.scripts;if(n)for(let e of n)r.push({tag:`script`,attrs:{...e.attrs,nonce:t},children:e.children,...typeof e.attrs?.src==`string`?{preventScriptHoist:!0}:{}})}return r},r=e=>e.map(e=>e.scripts).flat(1).filter(Boolean).map(({children:e,...n})=>({tag:`script`,attrs:{...n,suppressHydrationWarning:!0,nonce:t},children:e})),a=s(e.stores.matches,n,i);return Je(e,s(e.stores.matches,r,i),a)};function Je(e,t,n){let r=[...t,...n];return(0,D.jsx)(D.Fragment,{children:r.map((e,t)=>(0,Ie.createElement)(Ue,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var Ye=e((e=>{var t=d(),n=r(),i=y();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(a(188))}function f(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,h=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case te:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,S=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},he=[],ge=-1;function w(e){return{current:e}}function T(e){0>ge||(e.current=he[ge],he[ge]=null,ge--)}function E(e,t){ge++,he[ge]=e.current,e.current=t}var _e=w(null),ve=w(null),ye=w(null),be=w(null);function xe(e,t){switch(E(ye,t),E(ve,e),E(_e,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}T(_e),E(_e,e)}function Se(){T(_e),T(ve),T(ye)}function Ce(e){e.memoizedState!==null&&E(be,e);var t=_e.current,n=Hd(t,e.type);t!==n&&(E(ve,e),E(_e,n))}function we(e){ve.current===e&&(T(_e),T(ve)),be.current===e&&(T(be),Qf._currentValue=me)}var Te,Ee;function De(e){if(Te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||``,Ee=-1<e.stack.indexOf(`
2
+ import{i as e,n as t,o as n,r}from"./compiler-runtime-CUwoe8mk.js";import{$o as i,Bo as a,Co as o,Do as s,Eo as c,So as l,a as u,bo as d,ds as f,fs as p,ls as m,ms as h,ps as g,rs as _,ts as v,wo as y,xo as b}from"./utils-BcciP3Sx.js";import{a as x,c as ee,i as te,n as ne,o as re,s as ie,t as ae}from"./route-CPP99S5h.js";import{n as oe,t as se}from"./diff-A0Z4G6HR.js";import{i as ce,n as le,r as ue,t as de}from"./fallbacks-Cvg98U3d.js";import{t as fe}from"./terminal-RfiAqmoT.js";function pe(e,t){if(e)return typeof e==`string`?e:e[t]}function S(e){return e?.scriptFormat??`module`}function C(e,t,n){let r=me(t),i=pe(n,`script`)??r.crossOrigin;return{...S(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function me(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function he(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function ge(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}var w=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(w||{});function T({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function E(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var _e=[],ve=0,{link:ye,unlink:be,propagate:xe,checkDirty:Se,shallowPropagate:Ce}=T({update(e){return e._update()},notify(e){_e[Te++]=e,e.flags&=~w.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=w.Mutable|w.Dirty,ke(e))}}),we=0,Te=0,Ee,De=0;function Oe(e){try{++De,e()}finally{--De||Ae()}}function ke(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=be(n,e)}function Ae(){if(!(De>0)){for(;we<Te;){let e=_e[we];_e[we++]=void 0,e.notify()}we=0,Te=0}}function je(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?w.None:w.Mutable,get(){return Ee!==void 0&&ye(i,Ee,ve),i._snapshot},subscribe(e){let t=E(e),n={current:!1},r=Me(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Ee,o=t?.compare??Object.is;if(n)Ee=i,++ve,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=w.Mutable|w.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Ee=a,n&&(i.flags&=~w.RecursedCheck),ke(i)}}};return n?(i.flags=w.Mutable|w.Dirty,i.get=function(){let e=i.flags;if(e&w.Dirty||e&w.Pending&&Se(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Ce(e)}}else e&w.Pending&&(i.flags=e&~w.Pending);return Ee!==void 0&&ye(i,Ee,ve),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(xe(e),Ce(e),Ae())}},i}function Me(e){let t=()=>{let t=Ee;Ee=n,++ve,n.depsTail=void 0,n.flags=w.Watching|w.RecursedCheck;try{return e()}finally{Ee=t,n.flags&=~w.RecursedCheck,ke(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:w.Watching|w.RecursedCheck,notify(){let e=this.flags;e&w.Dirty||e&w.Pending&&Se(this.deps,this)?t():this.flags=w.Watching},stop(){this.flags=w.None,this.depsTail=void 0,ke(this)}};return t(),n}var Ne=e=>({createMutableStore:je,createReadonlyStore:je,batch:Oe}),Pe=e=>new Fe(e),Fe=class extends ie{constructor(e){super(e,Ne)}},Ie=n(r(),1);function Le(){let e=f(),t=Ie.useRef({router:e,mounted:!1}),[n,r]=Ie.useState(!1),i=s(e.stores.isLoading,e=>e),o=s(e.stores.hasPending,e=>e),c=h(i),l=i||n||o,u=h(l),d=i||o,p=h(d);return e.startTransition=e=>{r(!0),Ie.startTransition(()=>{e(),r(!1)})},Ie.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return a(e.latestLocation.publicHref)!==a(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),g(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),g(()=>{c&&!i&&e.emit({type:`onLoad`,...ee(e.stores.location.get(),e.stores.resolvedLocation.get())})},[c,e,i]),g(()=>{p&&!d&&e.emit({type:`onBeforeRouteMount`,...ee(e.stores.location.get(),e.stores.resolvedLocation.get())})},[d,p,e]),g(()=>{if(u&&!l){let t=ee(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),Oe(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[l,u,e]),null}var D=t();function Re(){let e=f(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,D.jsx)(t,{}):null,r=(0,D.jsxs)(typeof document<`u`&&e.ssr?te:Ie.Suspense,{fallback:n,children:[(0,D.jsx)(Le,{}),(0,D.jsx)(ze,{})]});return e.options.InnerWrap?(0,D.jsx)(e.options.InnerWrap,{children:r}):r}function ze(){let e=f(),t=s(e.stores.firstId,e=>e),n=s(e.stores.loadedAt,e=>e),r=t?(0,D.jsx)(ne,{matchId:t}):null;return(0,D.jsx)(m.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,D.jsx)(x,{getResetKey:()=>n,errorComponent:re,onCatch:void 0,children:r})})}function Be({router:e,children:t,...n}){_(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,D.jsx)(p.Provider,{value:e,children:t});return e.options.Wrap?(0,D.jsx)(e.options.Wrap,{children:r}):r}function Ve({router:e,...t}){return(0,D.jsx)(Be,{router:e,...t,children:(0,D.jsx)(Re,{})})}function He(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function Ue(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e;switch(e.tag){case`title`:return(0,D.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,D.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,D.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,D.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,D.jsx)(We,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function We({attrs:e,children:t,preventScriptHoist:n}){f();let r=c(),i=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(Ie.useEffect(()=>{if(!i){if(e?.src){let t=(()=>{try{let t=document.baseURI||window.location.href;return new URL(e.src,t).href}catch{return e.src}})();for(let e of document.querySelectorAll(`script[src]`))if(e.src===t)return;let n=document.createElement(`script`);return He(n,e),document.head.appendChild(n),()=>n.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.querySelectorAll(`script:not([src])`)){if(!(e instanceof HTMLScriptElement))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,He(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,i]),i&&typeof t==`string`)return(0,D.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return(0,D.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,D.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var Ge=e=>{let t=f(),n=t.options.ssr?.nonce,r=s(t.stores.matches,e=>e.map(e=>e.meta).filter(e=>e!==void 0),i),a=Ie.useMemo(()=>{let e=[],t={},i;for(let a=r.length-1;a>=0;a--){let o=r[a];for(let r=o.length-1;r>=0;r--){let a=o[r];if(a)if(a.title)i||={tag:`title`,children:a.title};else if(`script:ld+json`in a)try{let t=JSON.stringify(a[`script:ld+json`]);e.push({tag:`script`,attrs:{type:`application/ld+json`},children:v(t)})}catch{}else{let r=a.name??a.property;if(r){if(t[r])continue;t[r]=!0}e.push({tag:`meta`,attrs:{...a,nonce:n}})}}}return i&&e.push(i),n&&e.push({tag:`meta`,attrs:{property:`csp-nonce`,content:n}}),e.reverse(),e},[r,n]),o=s(t.stores.matches,e=>e.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),i),c=s(t.stores.matches,r=>{let i=t.ssr?.manifest,a=[];return i?(r.forEach(t=>{i.routes[t.routeId]?.css?.forEach(t=>{let r=ge(t);a.push({tag:`link`,attrs:{rel:`stylesheet`,...r,crossOrigin:pe(e,`stylesheet`)??r.crossOrigin,suppressHydrationWarning:!0,nonce:n}})})}),i.inlineStyle&&a.push({tag:`style`,attrs:{...i.inlineStyle.attrs,nonce:n},children:i.inlineStyle.children,inlineCss:!0}),a):a},i),l=s(t.stores.matches,r=>{let i=[],a=t.ssr?.manifest;return a&&r.forEach(t=>{a.routes[t.routeId]?.preloads?.forEach(t=>{i.push({tag:`link`,attrs:{...C(a,t,e),nonce:n}})})}),i},i),u=s(t.stores.matches,e=>e.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`style`,attrs:{...t,nonce:n},children:e})),i),d=s(t.stores.matches,e=>e.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`script`,attrs:{...t,nonce:n},children:e})),i),p=[];return he(p,a),p.push(...l),he(p,o),p.push(...c),he(p,u),he(p,d),p};function Ke(e){let t=Ge(e.assetCrossOrigin),n=f().options.ssr?.nonce;return(0,D.jsx)(D.Fragment,{children:t.map(e=>(0,Ie.createElement)(Ue,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var qe=()=>{let e=f(),t=e.options.ssr?.nonce,n=n=>{let r=[],i=e.ssr?.manifest;if(!i)return[];for(let e of n){let n=i.routes[e.routeId]?.scripts;if(n)for(let e of n)r.push({tag:`script`,attrs:{...e.attrs,nonce:t},children:e.children,...typeof e.attrs?.src==`string`?{preventScriptHoist:!0}:{}})}return r},r=e=>e.map(e=>e.scripts).flat(1).filter(Boolean).map(({children:e,...n})=>({tag:`script`,attrs:{...n,suppressHydrationWarning:!0,nonce:t},children:e})),a=s(e.stores.matches,n,i);return Je(e,s(e.stores.matches,r,i),a)};function Je(e,t,n){let r=[...t,...n];return(0,D.jsx)(D.Fragment,{children:r.map((e,t)=>(0,Ie.createElement)(Ue,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var Ye=e((e=>{var t=d(),n=r(),i=y();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(a(188))}function f(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,h=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case te:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,S=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},he=[],ge=-1;function w(e){return{current:e}}function T(e){0>ge||(e.current=he[ge],he[ge]=null,ge--)}function E(e,t){ge++,he[ge]=e.current,e.current=t}var _e=w(null),ve=w(null),ye=w(null),be=w(null);function xe(e,t){switch(E(ye,t),E(ve,e),E(_e,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}T(_e),E(_e,e)}function Se(){T(_e),T(ve),T(ye)}function Ce(e){e.memoizedState!==null&&E(be,e);var t=_e.current,n=Hd(t,e.type);t!==n&&(E(ve,e),E(_e,n))}function we(e){ve.current===e&&(T(_e),T(ve)),be.current===e&&(T(be),Qf._currentValue=me)}var Te,Ee;function De(e){if(Te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||``,Ee=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+Te+e+Ee}var Oe=!1;function ke(e,t){if(!e||Oe)return``;Oe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
5
  `),l=s.split(`
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-Cw2wqWmD.js","assets/compiler-runtime-CUwoe8mk.js","assets/utils-BcciP3Sx.js","assets/state-CfuBgP9R.js","assets/button-D5PTso91.js","assets/dialog-CTqPdO7i.js","assets/composite-CV4TlLb7.js","assets/check-C1Q0x6Ev.js"])))=>i.map(i=>d[i]);
2
- import{n as e,o as t,r as n}from"./compiler-runtime-CUwoe8mk.js";import{$o as r,Ao as i,Bo as a,Do as o,E as s,Fo as c,Go as l,Ho as u,Io as d,Jo as f,Ko as p,Lo as m,Mo as h,No as g,Po as _,Qo as v,Ro as y,So as b,To as x,Uo as S,Vo as C,Wo as w,Xo as T,Yo as E,Zo as D,a as ee,as as O,cs as k,ds as A,es as te,is as ne,ls as re,ns as j,os as ie,ps as ae,q as oe,qo as se,rs as ce,ss as M,xo as le,zo as ue}from"./utils-BcciP3Sx.js";function de(e){let t=e;return{get(){return t},set(e){t=j(e,t)}}}function fe(e){return{get(){return e()}}}function pe(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>N(o,_.get())),x=r(()=>N(s,v.get())),S=r(()=>N(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),D=se(64);function ee(e){let t=D.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),D.set(e,t)),t}let O={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:ee,setMatches:k,setPending:A,setCached:te};k(e.matches),a?.(O);function k(e){P(e,o,_,n,i)}function A(e){P(e,s,v,n,i)}function te(e){P(e,c,y,n,i)}return O}function N(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function P(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}T(n.get(),a)||n.set(a)})}function me(){try{return sessionStorage}catch{return}}var he=`tsr-scroll-restoration-v1_3`,ge=me();function _e(){try{return JSON.parse(ge?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function ve(){try{ge?.setItem(he,JSON.stringify(F))}catch{}}var F=_e(),ye=`data-scroll-restoration-id`,be=e=>e.state.__TSR_key||e.href;function xe(e){let t=e.getAttribute(ye);if(t)return`[${ye}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var I=!1,L=`window`;function R(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Se(e){let t=[];for(let n of e){if(n===L)continue;let e=R(n);e&&t.push(e)}return t}function Ce(e,t){if((t??e.options.scrollRestoration)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,I=!1;let n=e.options.getScrollRestorationKey||be,r=new Map,i=(e,t,n)=>{let i=r.get(e)||{};i.scrollX=t,i.scrollY=n,r.set(e,i)};history.scrollRestoration=`manual`;let a=t=>{if(!(I||!e.isScrollRestoring))if(t.target===document)i(L,scrollX,scrollY);else{let e=t.target;i(e,e.scrollLeft,e.scrollTop)}},o=t=>{if(!e.isScrollRestoring)return;let n=F[t]||={};for(let[e,t]of r)e===L?n[L]=t:e.isConnected&&(n[xe(e)]=t)};document.addEventListener(`scroll`,a,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(n(e.fromLocation)),r.clear()}),addEventListener(`pagehide`,()=>{o(n(e.stores.resolvedLocation.get()??e.stores.location.get())),ve()}),e.subscribe(`onRendered`,t=>{let i=e.options.scrollRestorationBehavior,a=e.options.scrollToTopSelectors,o=e.resetNextScroll,s;if(r.clear(),o||(e.resetNextScroll=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let c=n(t.toLocation),l=t.fromLocation&&n(t.fromLocation);if(e.isScrollRestoring&&l&&l!==c){let e=F[l];if(e){let t=F[c];for(let n in e){if(n===L){if(o)continue}else{let e=R(n);if(!e||o&&a&&(s??=Se(a),s.includes(e)))continue}t||=F[c]={},t[n]??=e[n]}}}I=!0;try{let n=t.toLocation.hash,r=t.toLocation.state.__hashScrollIntoViewOptions??!0,l=!1;if(o){let o=it.get(t.toLocation),u=n&&r&&(o===`PUSH`||o===`REPLACE`),d=e.isScrollRestoring?F[c]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:n}=d[e];if(e===L){if(u)continue;scrollTo({top:n,left:t,behavior:i}),l=!0}else{let r=R(e);r&&(r.scrollLeft=t,r.scrollTop=n)}}if(!l&&!n){let e={top:0,left:0,behavior:i};if(scrollTo(e),a){s??=Se(a);for(let t of s)t.scrollTo(e)}}}!l&&n&&r&&document.getElementById(n)?.scrollIntoView(r)}finally{I=!1}})}function we(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Te(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Ee(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Te(r):Array.isArray(t)?t.push(Te(r)):n[e]=[t,Te(r)]}return n}var De=ke(JSON.parse),Oe=Ae(JSON.stringify,JSON.parse);function ke(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Ee(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Ae(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=we(e,r);return t?`?${t}`:``}}var je=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Me=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),z=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),B=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},Ne=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},V=(e,t,n)=>{if(!(!i(n)&&!g(n)))throw i(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:i(n)?`redirected`:g(n)?`notFound`:r.status===`pending`?`success`:r.status,context:B(e,t.index),isFetching:!1,error:n})),g(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),i(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Pe=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Fe=(e,t,n)=>{let r=B(e,n);e.updateMatch(t,e=>({...e,context:r}))},H=(e,t,n)=>{let{id:r,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,V(e,e.router.getMatch(r),n);try{o.options.onError?.(n)}catch(t){n=t,V(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!i(n)&&!g(n)&&(e.serialError??=n)},Ie=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!z(e,t)&&(n.options.loader||n.options.beforeLoad||Ke(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{je(e)},i);r._nonReactive.pendingTimeout=t}},Le=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Ie(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&V(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Re=(e,t,n,r)=>{let a=e.router.getMatch(t),o=a._nonReactive.loadPromise;a._nonReactive.loadPromise=D(()=>{o?.resolve(),o=void 0});let{paramsError:s,searchError:c}=a;s&&H(e,n,s),c&&H(e,n,c),Ie(e,t,r,a);let l=new AbortController,u=!1,d=()=>{u||(u=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:l})))},f=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{d(),f()});return}a._nonReactive.beforeLoadPromise=D();let p={...B(e,n,!1),...a.__routeContext},{search:m,params:h,cause:_}=a,v=z(e,t),y={search:m,abortController:l,params:h,preload:v,context:p,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:_,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{d(),f()});return}(i(r)||g(r))&&(d(),H(e,n,r)),e.router.batch(()=>{d(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),f()})},x;try{if(x=r.options.beforeLoad(y),O(x))return d(),x.catch(t=>{H(e,n,t)}).then(b)}catch(t){d(),H(e,n,t)}b(x)},ze=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Re(e,n,t,i),s=()=>{if(Pe(e,n))return;let t=Le(e,n,i);return O(t)?t.then(o):o()};return a()},Be=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},Ve=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=B(e,r),d=z(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},He=async(e,t,n,r,a)=>{try{let o=e.router.getMatch(n);try{U(a);let i=a.options.loader,s=typeof i==`function`?i:i?.handler,c=s?.(Ve(e,t,n,r,a)),l=!!s&&O(c);if((l||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||o._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;V(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}a._lazyPromise&&await a._lazyPromise;let u=o._nonReactive.minPendingPromise;u&&await u,a._componentsPromise&&await a._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:B(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let s=t;if(s?.name===`AbortError`){if(o.abortController.signal.aborted){o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:B(e,r)}));return}let c=o._nonReactive.minPendingPromise;c&&await c,g(t)&&await a.options.notFoundComponent?.preload?.(),V(e,e.router.getMatch(n),t);try{a.options.onError?.(t)}catch(t){s=t,V(e,e.router.getMatch(n),t)}!i(s)&&!g(s)&&await U(a,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:s,context:B(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),V(e,r,t)}},Ue=async(e,t,n)=>{async function r(r,o,l,u,f){let p=Date.now()-o.updatedAt,m=r?f.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:f.options.staleTime??e.router.options.defaultStaleTime??0,h=f.options.shouldReload,g=typeof h==`function`?h(Ve(e,t,a,n,f)):h,{status:_,invalid:v}=u,y=p>=m&&(!!e.forceStaleReload||u.cause===`enter`||l!==void 0&&l!==u.id);s=_===`success`&&(v||(g??y)),r&&f.options.preload===!1||(s&&!e.sync&&d?(c=!0,(async()=>{try{await He(e,t,a,n,f);let r=e.router.getMatch(a);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){i(t)&&await e.router.navigate(t.options)}})()):_!==`success`||s?await He(e,t,a,n,f):Fe(e,a,n))}let{id:a,routeId:o}=e.matches[n],s=!1,c=!1,l=e.router.looseRoutesById[o],u=l.options.loader,d=((typeof u==`function`?void 0:u?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Pe(e,a)){if(!e.router.getMatch(a))return e.matches[n];Fe(e,a,n)}else{let t=e.router.getMatch(a),i=e.router.stores.matchesId.get()[n],s=(i&&e.router.stores.matchStores.get(i)||null)?.routeId===o?i:e.router.stores.matches.get().find(e=>e.routeId===o)?.id,c=z(e,a);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&d)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(a),i=n._nonReactive.error||n.error;i&&V(e,n,i),n.status===`pending`&&await r(c,t,s,n,l)}else{let n=c&&!e.router.stores.matchStores.has(a),i=e.router.getMatch(a);i._nonReactive.loaderPromise=D(),n!==i.preload&&e.updateMatch(a,e=>({...e,preload:n})),await r(c,t,s,i,l)}}let f=e.router.getMatch(a);c||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve(),f._nonReactive.loadPromise=void 0),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,c||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0;let p=c?f.isFetching:!1;return p!==f.isFetching||f.invalid!==!1?(e.updateMatch(a,e=>({...e,isFetching:p,invalid:!1})),e.router.getMatch(a)):f};async function We(e){let t=e,n=[];Me(t.router)&&je(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=ze(t,e);O(n)&&await n}catch(e){if(i(e))throw e;if(g(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let a=t.firstBadMatchIndex??t.matches.length,o=r&&!t.preload?Ne(t,r):void 0,s=r&&t.preload?0:o===void 0?a:Math.min(o+1,a),c,l;for(let e=0;e<s;e++)n.push(Ue(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(i(e))throw e;g(e)?c??=e:l??=e}if(l!==void 0)throw l}let u=c??(r&&!t.preload?r:void 0),d=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!u&&r&&t.preload)return t.matches;if(u){let e=Ne(t,u);e===void 0&&f();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),u.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:u},isFetching:!1})),d=e,await U(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await U(e,[`errorComponent`])}for(let e=0;e<=d;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=Be(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let p=je(t);if(O(p)&&await p,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Ge(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function U(e,t=W){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===W?(()=>{if(e._componentsPromise===void 0){let t=Ge(e,W);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Ge(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ke(e){for(let t of W)if(e.options[t]?.preload)return!0;return!1}var W=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function qe(e){return{input:({url:t})=>{for(let n of e)t=Ye(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Xe(e[n],t);return t}}}function Je(e){let t=ue(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=m([`/`,t,e.pathname]),e)}}function Ye(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Xe(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}var G=`__TSR_index`,Ze=`popstate`,Qe=`beforeunload`;function $e(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=K(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[G];i=et(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[G];i=et(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[G]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function et(e,t){t||={};let n=rt();return{...t,key:n,__TSR_key:n,[G]:e}}function tt(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>K(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=rt();t.history.replaceState({[G]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=K(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[G]-l.state[G],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=$e({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Qe,S,{capture:!0}),t.removeEventListener(Ze,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Qe,S,{capture:!0}),t.addEventListener(Ze,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function nt(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function K(e,t){let n=nt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=rt();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[G]:0,key:a,__TSR_key:a}}}function rt(){return(Math.random()+1).toString(36).substring(7)}function q(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var it=new WeakMap,at=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=c(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=tt()),this.origin=this.options.origin,this.origin||(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 e;this.resolvePathCache=se(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=pe(st(this.latestLocation),e),Ce(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=ue(o);t&&t!==`/`&&e.push(Je({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:qe(e),this.history&&this.updateLatestLocation(),a=!0}a&&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=p(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&l(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:v(e).path,external:!1,searchStr:o,search:M(t?.search,i),hash:v(r.slice(1)).path,state:k(t?.state,a)}}let o=new URL(i,this.origin),s=Ye(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:v(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:M(t?.search,c),hash:v(s.hash.slice(1)).path,state:k(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>y({base:e,to:t.includes(`//`)?_(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>ct({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._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 t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,o=t.to?`${t.to}`:void 0,s=r.search,c=Object.assign(Object.create(null),r.params),l=o?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),u=o?this.resolvePathWithBase(l,o):l,f=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?c:Object.assign(c,j(t.params,c)),p=this.routesByPath[a(u)],m;if(p)m=this.getRouteBranch(p);else if(u.includes(`$`))m=[];else{let e=this.getMatchedRoutes(u);m=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(m=[...m,this.options.notFoundRoute])}if(m.length&&ce(f))for(let e of m){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(f,t(f))}catch{}}let h=e.leaveParams?u:v(d({path:u,params:f,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,g=s;if(e._includeValidateSearch&&this.options.search?.strict){let e={};m.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Y(t.options.validateSearch,{...e,...g}))}catch{}}),g=e}g=lt({search:g,dest:t,destRoutes:m,_includeValidateSearch:e._includeValidateSearch}),g=M(s,g);let _=this.options.stringifySearch(g),y=t.hash===!0?n.hash:t.hash?j(t.hash,n.hash):void 0,b=y?`#${y}`:``,x=t.state===!0?n.state:t.state?j(t.state,n.state):{};x=k(n.state,x);let S=`${h}${_}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=Xe(this.rewrite,e);C=e.href.replace(e.origin,``),t.origin===this.origin?w=t.pathname+t.search+t.hash:(w=t.href,T=!0)}else C=te(S),w=C;return{publicHref:w,href:C,pathname:h,search:g,searchStr:_,state:x,hash:y??``,external:T,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=u(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,j(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let i,o=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=r(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},s=a(this.latestLocation.href)===a(n.href),c=this.commitLocationPromise;if(this.commitLocationPromise=D(()=>{c?.resolve(),c=void 0}),s&&o())this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(i?{action:{type:i}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=K(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Ye(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(ne(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.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(t)})},this.load=async e=>{let t=e?.action?.type,n,r,a,o=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(s=>{this.startTransition(async()=>{try{this.beforeLoad(),t?it.set(this.latestLocation,t):it.delete(this.latestLocation);let n=this.latestLocation,r=q(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await We({router:this,sync:e?.sync,forceStaleReload:o.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){i(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):g(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),s()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let s;this.hasNotFoundMatch()?s=404:this.stores.matches.get().some(e=>e.status===`error`)&&(s=500),s!==void 0&&this.stores.statusCode.set(s)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(q(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},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 t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&ne(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=U,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...r,...this.stores.cachedIds.get()]),o=n.filter(e=>!a.has(e.id));if(o.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...o])}try{return n=await We({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(i(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});g(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},i=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let a=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=w(i.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!r(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?r(a.search,i.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Oe,parseSearch:e.parseSearch??De,protocolAllowlist:e.protocolAllowlist??E}),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:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=C(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:o}=n,{matchedRoutes:s}=n,c=!1;(r?r.path!==`/`&&o[`**`]:a(e.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:c=!0);let l=c?dt(this.options.notFoundMode,s):void 0,u=Array(s.length),f=new Map;for(let e of this.stores.matchStores.values())e.routeId&&f.set(e.routeId,e.get());for(let n=0;n<s.length;n++){let r=s[n],a=u[n-1],c,p,m;{let n=a?.search??e.search,i=a?._strictSearch??void 0;try{let e=Y(r.options.validateSearch,{...n})??void 0;c={...n,...e},p={...i,...e},m=void 0}catch(e){let r=e;if(e instanceof J||(r=new J(e.message,{cause:e})),t?.throwOnError)throw r;c=n,p={},m=r}}let h=r.options.loaderDeps?.({search:c})??``,_=h?JSON.stringify(h):``,{interpolatedPath:v,usedParams:y}=d({path:r.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),b=r.id+v+_,x=this.getMatch(b),S=f.get(r.id),C=x?._strictParams??y,w;if(!x)try{ft(r,C)}catch(e){if(w=g(e)||i(e)?e:new ot(e.message,{cause:e}),t?.throwOnError)throw w}Object.assign(o,C);let T=S?`stay`:`enter`,E;if(x)E={...x,cause:T,params:S?.params??o,_strictParams:C,search:M(S?S.search:x.search,c),_strictSearch:p};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Ke(r)?`pending`:`success`;E={id:b,ssr:r.options.ssr,index:n,routeId:r.id,params:S?.params??o,_strictParams:C,pathname:v,updatedAt:Date.now(),search:S?M(S.search,c):c,_strictSearch:p,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:w,__routeContext:void 0,_nonReactive:{loadPromise:D()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:T,loaderDeps:S?k(S.loaderDeps,h):h,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(E.globalNotFound=l===r.id),E.searchError=m;let ee=this.getParentContext(a);E.context={...ee,...E.__routeContext,...E.__beforeLoadContext},u[n]=E}for(let t=0;t<u.length;t++){let n=u[t],r=this.looseRoutesById[n.routeId],i=this.getMatch(n.id),a=f.get(n.routeId);if(n.params=a?M(a.params,o):o,!i){let i=u[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:u,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return u}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=ie(t),i={...e.search};for(let e of t)try{Object.assign(i,Y(e.options.validateSearch,i))}catch{}let a=ie(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{ft(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},J=class extends Error{},ot=class extends Error{};function st(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Y(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new J(`Async validation not supported`);if(n.issues)throw new J(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function ct({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=a(e),o,s=S(i,n,!0);return s&&(o=s.route,Object.assign(r,s.rawParams)),{matchedRoutes:s?.branch||[t.__root__],routeParams:r,foundRoute:o}}function lt({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return ut(n)(e,t,r??!1)}function ut(e){let t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(let n of e)`search`in n.options?n.options.search?.middlewares&&t.middlewares.push(...n.options.search.middlewares):(n.options.preSearchFilters||n.options.postSearchFilters)&&t.middlewares.push(({search:e,next:t})=>{let r=e;`preSearchFilters`in n.options&&n.options.preSearchFilters&&(r=n.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=t(r);return`postSearchFilters`in n.options&&n.options.postSearchFilters?n.options.postSearchFilters.reduce((e,t)=>t(e),i):i}),n.options.validateSearch&&t.middlewares.push(({search:e,next:r})=>{let i=r(e);if(!t._includeValidateSearch)return i;try{return{...i,...Y(n.options.validateSearch,i)??void 0}}catch{return i}});t.middlewares.push(({search:e})=>{let n=t.dest;return n.search?n.search===!0?e:j(n.search,e):{}});let n=(e,t,r)=>{if(e>=r.length)return t;let i=r[e];return i({search:t,next:t=>n(e+1,t,r)})};return function(e,r,i){return t.dest=r,t._includeValidateSearch=i,n(0,e,t.middlewares)}}function dt(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return h}function ft(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}var X=t(n(),1),Z=e();function pt(e){let t=e.errorComponent??Q;return(0,Z.jsx)(mt,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?X.createElement(t,{error:n,reset:r}):e.children})}var mt=class extends X.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Q({error:e}){let[t,n]=X.useState(!1);return(0,Z.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,Z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,Z.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,Z.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,Z.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,Z.jsx)(`div`,{children:(0,Z.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,Z.jsx)(`code`,{children:e.message}):null})}):null]})}function ht(e){let t=A(),n=`not-found-${o(t.stores.location,e=>e.pathname)}-${o(t.stores.status,e=>e)}`;return(0,Z.jsx)(pt,{getResetKey:()=>n,onCatch:(t,n)=>{if(g(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(g(t))return e.fallback?.(t);throw t},children:e.children})}function gt(){return(0,Z.jsx)(`p`,{children:`Not Found`})}function $(e){return(0,Z.jsx)(Z.Fragment,{children:e.children})}function _t(e,t,n){return t.options.notFoundComponent?(0,Z.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,Z.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,Z.jsx)(gt,{})}var vt=X.memo(function({matchId:e}){let t=A(),n=t.stores.matchStores.get(e);n||f();let r=o(t.stores.loadedAt,e=>e),i=o(n,e=>e);return(0,Z.jsx)(yt,{router:t,matchId:e,resetKey:r,matchState:X.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function yt({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,Z.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?X.Suspense:$,f=s?pt:$,p=l?ht:$;return(0,Z.jsxs)(i.isRoot?i.options.shellComponent??$:$,{children:[(0,Z.jsx)(re.Provider,{value:t,children:(0,Z.jsx)(d,{fallback:o,children:(0,Z.jsx)(f,{getResetKey:()=>n,errorComponent:s||Q,onCatch:(e,t)=>{if(g(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,Z.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return X.createElement(l,e)},children:u||r._displayPending?(0,Z.jsx)(x,{fallback:o,children:(0,Z.jsx)(xt,{matchId:t})}):(0,Z.jsx)(xt,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(bt,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function bt({resetKey:e}){let t=A(),n=X.useRef(void 0);return ae(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...q(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var xt=X.memo(function({matchId:e}){let t=A(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||f();let a=o(r,e=>e),s=a.routeId,c=t.routesById[s],l=X.useMemo(()=>{let e=(t.routesById[s].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:s,loaderDeps:a.loaderDeps,params:a._strictParams,search:a._strictSearch});return e?JSON.stringify(e):void 0},[s,a.loaderDeps,a._strictParams,a._strictSearch,t.options.defaultRemountDeps,t.routesById]),u=X.useMemo(()=>{let e=c.options.component??t.options.defaultComponent;return e?(0,Z.jsx)(e,{},l):(0,Z.jsx)(St,{})},[l,c.options.component,t.options.defaultComponent]);if(a._displayPending)throw n(a,`displayPendingPromise`);if(a._forcePending)throw n(a,`minPendingPromise`);if(a.status===`pending`){let e=c.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(a.id);if(n&&!n._nonReactive.minPendingPromise){let t=D();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(a,`loadPromise`)}if(a.status===`notFound`)return g(a.error)||f(),_t(t,c,a.error);if(a.status===`redirected`)throw i(a.error)||f(),n(a,`loadPromise`);if(a.status===`error`)throw a.error;return u}),St=X.memo(function(){let e=A(),t=X.useContext(re),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=o(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=o(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,s=e.options.defaultPendingComponent?(0,Z.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||f(),_t(e,a,void 0);if(!i)return null;let c=(0,Z.jsx)(vt,{matchId:i});return n===`__root__`?(0,Z.jsx)(X.Suspense,{fallback:s,children:c}):c}),Ct=b(`/(home)`)({component:le(()=>ee(()=>import(`./route-Cw2wqWmD.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`component`),validateSearch:oe(s({}))});export{pt as a,q as c,$ as i,de as l,vt as n,Q as o,St as r,at as s,Ct as t,fe as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-Xh3KoGqC.js","assets/compiler-runtime-CUwoe8mk.js","assets/utils-BcciP3Sx.js","assets/state-CQDoh6vk.js","assets/button-D5PTso91.js","assets/dialog-CTqPdO7i.js","assets/composite-CV4TlLb7.js","assets/check-C1Q0x6Ev.js"])))=>i.map(i=>d[i]);
2
+ import{n as e,o as t,r as n}from"./compiler-runtime-CUwoe8mk.js";import{$o as r,Ao as i,Bo as a,Do as o,E as s,Fo as c,Go as l,Ho as u,Io as d,Jo as f,Ko as p,Lo as m,Mo as h,No as g,Po as _,Qo as v,Ro as y,So as b,To as x,Uo as S,Vo as C,Wo as w,Xo as T,Yo as E,Zo as D,a as ee,as as O,cs as k,ds as A,es as te,is as ne,ls as re,ns as j,os as ie,ps as ae,q as oe,qo as se,rs as ce,ss as M,xo as le,zo as ue}from"./utils-BcciP3Sx.js";function de(e){let t=e;return{get(){return t},set(e){t=j(e,t)}}}function fe(e){return{get(){return e()}}}function pe(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>N(o,_.get())),x=r(()=>N(s,v.get())),S=r(()=>N(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),D=se(64);function ee(e){let t=D.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),D.set(e,t)),t}let O={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:ee,setMatches:k,setPending:A,setCached:te};k(e.matches),a?.(O);function k(e){P(e,o,_,n,i)}function A(e){P(e,s,v,n,i)}function te(e){P(e,c,y,n,i)}return O}function N(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function P(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}T(n.get(),a)||n.set(a)})}function me(){try{return sessionStorage}catch{return}}var he=`tsr-scroll-restoration-v1_3`,ge=me();function _e(){try{return JSON.parse(ge?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function ve(){try{ge?.setItem(he,JSON.stringify(F))}catch{}}var F=_e(),ye=`data-scroll-restoration-id`,be=e=>e.state.__TSR_key||e.href;function xe(e){let t=e.getAttribute(ye);if(t)return`[${ye}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var I=!1,L=`window`;function R(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Se(e){let t=[];for(let n of e){if(n===L)continue;let e=R(n);e&&t.push(e)}return t}function Ce(e,t){if((t??e.options.scrollRestoration)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,I=!1;let n=e.options.getScrollRestorationKey||be,r=new Map,i=(e,t,n)=>{let i=r.get(e)||{};i.scrollX=t,i.scrollY=n,r.set(e,i)};history.scrollRestoration=`manual`;let a=t=>{if(!(I||!e.isScrollRestoring))if(t.target===document)i(L,scrollX,scrollY);else{let e=t.target;i(e,e.scrollLeft,e.scrollTop)}},o=t=>{if(!e.isScrollRestoring)return;let n=F[t]||={};for(let[e,t]of r)e===L?n[L]=t:e.isConnected&&(n[xe(e)]=t)};document.addEventListener(`scroll`,a,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(n(e.fromLocation)),r.clear()}),addEventListener(`pagehide`,()=>{o(n(e.stores.resolvedLocation.get()??e.stores.location.get())),ve()}),e.subscribe(`onRendered`,t=>{let i=e.options.scrollRestorationBehavior,a=e.options.scrollToTopSelectors,o=e.resetNextScroll,s;if(r.clear(),o||(e.resetNextScroll=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let c=n(t.toLocation),l=t.fromLocation&&n(t.fromLocation);if(e.isScrollRestoring&&l&&l!==c){let e=F[l];if(e){let t=F[c];for(let n in e){if(n===L){if(o)continue}else{let e=R(n);if(!e||o&&a&&(s??=Se(a),s.includes(e)))continue}t||=F[c]={},t[n]??=e[n]}}}I=!0;try{let n=t.toLocation.hash,r=t.toLocation.state.__hashScrollIntoViewOptions??!0,l=!1;if(o){let o=it.get(t.toLocation),u=n&&r&&(o===`PUSH`||o===`REPLACE`),d=e.isScrollRestoring?F[c]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:n}=d[e];if(e===L){if(u)continue;scrollTo({top:n,left:t,behavior:i}),l=!0}else{let r=R(e);r&&(r.scrollLeft=t,r.scrollTop=n)}}if(!l&&!n){let e={top:0,left:0,behavior:i};if(scrollTo(e),a){s??=Se(a);for(let t of s)t.scrollTo(e)}}}!l&&n&&r&&document.getElementById(n)?.scrollIntoView(r)}finally{I=!1}})}function we(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Te(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Ee(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Te(r):Array.isArray(t)?t.push(Te(r)):n[e]=[t,Te(r)]}return n}var De=ke(JSON.parse),Oe=Ae(JSON.stringify,JSON.parse);function ke(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Ee(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Ae(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=we(e,r);return t?`?${t}`:``}}var je=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Me=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),z=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),B=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},Ne=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},V=(e,t,n)=>{if(!(!i(n)&&!g(n)))throw i(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:i(n)?`redirected`:g(n)?`notFound`:r.status===`pending`?`success`:r.status,context:B(e,t.index),isFetching:!1,error:n})),g(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),i(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Pe=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Fe=(e,t,n)=>{let r=B(e,n);e.updateMatch(t,e=>({...e,context:r}))},H=(e,t,n)=>{let{id:r,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,V(e,e.router.getMatch(r),n);try{o.options.onError?.(n)}catch(t){n=t,V(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!i(n)&&!g(n)&&(e.serialError??=n)},Ie=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!z(e,t)&&(n.options.loader||n.options.beforeLoad||Ke(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{je(e)},i);r._nonReactive.pendingTimeout=t}},Le=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Ie(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&V(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Re=(e,t,n,r)=>{let a=e.router.getMatch(t),o=a._nonReactive.loadPromise;a._nonReactive.loadPromise=D(()=>{o?.resolve(),o=void 0});let{paramsError:s,searchError:c}=a;s&&H(e,n,s),c&&H(e,n,c),Ie(e,t,r,a);let l=new AbortController,u=!1,d=()=>{u||(u=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:l})))},f=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{d(),f()});return}a._nonReactive.beforeLoadPromise=D();let p={...B(e,n,!1),...a.__routeContext},{search:m,params:h,cause:_}=a,v=z(e,t),y={search:m,abortController:l,params:h,preload:v,context:p,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:_,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{d(),f()});return}(i(r)||g(r))&&(d(),H(e,n,r)),e.router.batch(()=>{d(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),f()})},x;try{if(x=r.options.beforeLoad(y),O(x))return d(),x.catch(t=>{H(e,n,t)}).then(b)}catch(t){d(),H(e,n,t)}b(x)},ze=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Re(e,n,t,i),s=()=>{if(Pe(e,n))return;let t=Le(e,n,i);return O(t)?t.then(o):o()};return a()},Be=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},Ve=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=B(e,r),d=z(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},He=async(e,t,n,r,a)=>{try{let o=e.router.getMatch(n);try{U(a);let i=a.options.loader,s=typeof i==`function`?i:i?.handler,c=s?.(Ve(e,t,n,r,a)),l=!!s&&O(c);if((l||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||o._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;V(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}a._lazyPromise&&await a._lazyPromise;let u=o._nonReactive.minPendingPromise;u&&await u,a._componentsPromise&&await a._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:B(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let s=t;if(s?.name===`AbortError`){if(o.abortController.signal.aborted){o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:B(e,r)}));return}let c=o._nonReactive.minPendingPromise;c&&await c,g(t)&&await a.options.notFoundComponent?.preload?.(),V(e,e.router.getMatch(n),t);try{a.options.onError?.(t)}catch(t){s=t,V(e,e.router.getMatch(n),t)}!i(s)&&!g(s)&&await U(a,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:s,context:B(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),V(e,r,t)}},Ue=async(e,t,n)=>{async function r(r,o,l,u,f){let p=Date.now()-o.updatedAt,m=r?f.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:f.options.staleTime??e.router.options.defaultStaleTime??0,h=f.options.shouldReload,g=typeof h==`function`?h(Ve(e,t,a,n,f)):h,{status:_,invalid:v}=u,y=p>=m&&(!!e.forceStaleReload||u.cause===`enter`||l!==void 0&&l!==u.id);s=_===`success`&&(v||(g??y)),r&&f.options.preload===!1||(s&&!e.sync&&d?(c=!0,(async()=>{try{await He(e,t,a,n,f);let r=e.router.getMatch(a);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){i(t)&&await e.router.navigate(t.options)}})()):_!==`success`||s?await He(e,t,a,n,f):Fe(e,a,n))}let{id:a,routeId:o}=e.matches[n],s=!1,c=!1,l=e.router.looseRoutesById[o],u=l.options.loader,d=((typeof u==`function`?void 0:u?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Pe(e,a)){if(!e.router.getMatch(a))return e.matches[n];Fe(e,a,n)}else{let t=e.router.getMatch(a),i=e.router.stores.matchesId.get()[n],s=(i&&e.router.stores.matchStores.get(i)||null)?.routeId===o?i:e.router.stores.matches.get().find(e=>e.routeId===o)?.id,c=z(e,a);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&d)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(a),i=n._nonReactive.error||n.error;i&&V(e,n,i),n.status===`pending`&&await r(c,t,s,n,l)}else{let n=c&&!e.router.stores.matchStores.has(a),i=e.router.getMatch(a);i._nonReactive.loaderPromise=D(),n!==i.preload&&e.updateMatch(a,e=>({...e,preload:n})),await r(c,t,s,i,l)}}let f=e.router.getMatch(a);c||(f._nonReactive.loaderPromise?.resolve(),f._nonReactive.loadPromise?.resolve(),f._nonReactive.loadPromise=void 0),clearTimeout(f._nonReactive.pendingTimeout),f._nonReactive.pendingTimeout=void 0,c||(f._nonReactive.loaderPromise=void 0),f._nonReactive.dehydrated=void 0;let p=c?f.isFetching:!1;return p!==f.isFetching||f.invalid!==!1?(e.updateMatch(a,e=>({...e,isFetching:p,invalid:!1})),e.router.getMatch(a)):f};async function We(e){let t=e,n=[];Me(t.router)&&je(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=ze(t,e);O(n)&&await n}catch(e){if(i(e))throw e;if(g(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let a=t.firstBadMatchIndex??t.matches.length,o=r&&!t.preload?Ne(t,r):void 0,s=r&&t.preload?0:o===void 0?a:Math.min(o+1,a),c,l;for(let e=0;e<s;e++)n.push(Ue(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(i(e))throw e;g(e)?c??=e:l??=e}if(l!==void 0)throw l}let u=c??(r&&!t.preload?r:void 0),d=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!u&&r&&t.preload)return t.matches;if(u){let e=Ne(t,u);e===void 0&&f();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),u.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:u},isFetching:!1})),d=e,await U(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await U(e,[`errorComponent`])}for(let e=0;e<=d;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=Be(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let p=je(t);if(O(p)&&await p,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Ge(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function U(e,t=W){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===W?(()=>{if(e._componentsPromise===void 0){let t=Ge(e,W);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Ge(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ke(e){for(let t of W)if(e.options[t]?.preload)return!0;return!1}var W=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function qe(e){return{input:({url:t})=>{for(let n of e)t=Ye(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Xe(e[n],t);return t}}}function Je(e){let t=ue(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=m([`/`,t,e.pathname]),e)}}function Ye(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Xe(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}var G=`__TSR_index`,Ze=`popstate`,Qe=`beforeunload`;function $e(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=K(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[G];i=et(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[G];i=et(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[G]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function et(e,t){t||={};let n=rt();return{...t,key:n,__TSR_key:n,[G]:e}}function tt(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>K(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=rt();t.history.replaceState({[G]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=K(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[G]-l.state[G],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=$e({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Qe,S,{capture:!0}),t.removeEventListener(Ze,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Qe,S,{capture:!0}),t.addEventListener(Ze,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function nt(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function K(e,t){let n=nt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=rt();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[G]:0,key:a,__TSR_key:a}}}function rt(){return(Math.random()+1).toString(36).substring(7)}function q(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var it=new WeakMap,at=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=c(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=tt()),this.origin=this.options.origin,this.origin||(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 e;this.resolvePathCache=se(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=pe(st(this.latestLocation),e),Ce(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=ue(o);t&&t!==`/`&&e.push(Je({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:qe(e),this.history&&this.updateLatestLocation(),a=!0}a&&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=p(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&l(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:v(e).path,external:!1,searchStr:o,search:M(t?.search,i),hash:v(r.slice(1)).path,state:k(t?.state,a)}}let o=new URL(i,this.origin),s=Ye(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:v(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:M(t?.search,c),hash:v(s.hash.slice(1)).path,state:k(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>y({base:e,to:t.includes(`//`)?_(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>ct({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._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 t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,o=t.to?`${t.to}`:void 0,s=r.search,c=Object.assign(Object.create(null),r.params),l=o?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),u=o?this.resolvePathWithBase(l,o):l,f=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?c:Object.assign(c,j(t.params,c)),p=this.routesByPath[a(u)],m;if(p)m=this.getRouteBranch(p);else if(u.includes(`$`))m=[];else{let e=this.getMatchedRoutes(u);m=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(m=[...m,this.options.notFoundRoute])}if(m.length&&ce(f))for(let e of m){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(f,t(f))}catch{}}let h=e.leaveParams?u:v(d({path:u,params:f,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,g=s;if(e._includeValidateSearch&&this.options.search?.strict){let e={};m.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Y(t.options.validateSearch,{...e,...g}))}catch{}}),g=e}g=lt({search:g,dest:t,destRoutes:m,_includeValidateSearch:e._includeValidateSearch}),g=M(s,g);let _=this.options.stringifySearch(g),y=t.hash===!0?n.hash:t.hash?j(t.hash,n.hash):void 0,b=y?`#${y}`:``,x=t.state===!0?n.state:t.state?j(t.state,n.state):{};x=k(n.state,x);let S=`${h}${_}${b}`,C,w,T=!1;if(this.rewrite){let e=new URL(S,this.origin),t=Xe(this.rewrite,e);C=e.href.replace(e.origin,``),t.origin===this.origin?w=t.pathname+t.search+t.hash:(w=t.href,T=!0)}else C=te(S),w=C;return{publicHref:w,href:C,pathname:h,search:g,searchStr:_,state:x,hash:y??``,external:T,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=u(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,j(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let i,o=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=r(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},s=a(this.latestLocation.href)===a(n.href),c=this.commitLocationPromise;if(this.commitLocationPromise=D(()=>{c?.resolve(),c=void 0}),s&&o())this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(i?{action:{type:i}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=K(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Ye(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(ne(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.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(t)})},this.load=async e=>{let t=e?.action?.type,n,r,a,o=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(s=>{this.startTransition(async()=>{try{this.beforeLoad(),t?it.set(this.latestLocation,t):it.delete(this.latestLocation);let n=this.latestLocation,r=q(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await We({router:this,sync:e?.sync,forceStaleReload:o.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){i(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):g(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),s()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let s;this.hasNotFoundMatch()?s=404:this.stores.matches.get().some(e=>e.status===`error`)&&(s=500),s!==void 0&&this.stores.statusCode.set(s)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(q(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},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 t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&ne(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=U,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...r,...this.stores.cachedIds.get()]),o=n.filter(e=>!a.has(e.id));if(o.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...o])}try{return n=await We({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(i(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});g(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},i=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let a=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=w(i.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!r(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?r(a.search,i.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Oe,parseSearch:e.parseSearch??De,protocolAllowlist:e.protocolAllowlist??E}),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:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=C(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:o}=n,{matchedRoutes:s}=n,c=!1;(r?r.path!==`/`&&o[`**`]:a(e.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:c=!0);let l=c?dt(this.options.notFoundMode,s):void 0,u=Array(s.length),f=new Map;for(let e of this.stores.matchStores.values())e.routeId&&f.set(e.routeId,e.get());for(let n=0;n<s.length;n++){let r=s[n],a=u[n-1],c,p,m;{let n=a?.search??e.search,i=a?._strictSearch??void 0;try{let e=Y(r.options.validateSearch,{...n})??void 0;c={...n,...e},p={...i,...e},m=void 0}catch(e){let r=e;if(e instanceof J||(r=new J(e.message,{cause:e})),t?.throwOnError)throw r;c=n,p={},m=r}}let h=r.options.loaderDeps?.({search:c})??``,_=h?JSON.stringify(h):``,{interpolatedPath:v,usedParams:y}=d({path:r.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),b=r.id+v+_,x=this.getMatch(b),S=f.get(r.id),C=x?._strictParams??y,w;if(!x)try{ft(r,C)}catch(e){if(w=g(e)||i(e)?e:new ot(e.message,{cause:e}),t?.throwOnError)throw w}Object.assign(o,C);let T=S?`stay`:`enter`,E;if(x)E={...x,cause:T,params:S?.params??o,_strictParams:C,search:M(S?S.search:x.search,c),_strictSearch:p};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Ke(r)?`pending`:`success`;E={id:b,ssr:r.options.ssr,index:n,routeId:r.id,params:S?.params??o,_strictParams:C,pathname:v,updatedAt:Date.now(),search:S?M(S.search,c):c,_strictSearch:p,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:w,__routeContext:void 0,_nonReactive:{loadPromise:D()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:T,loaderDeps:S?k(S.loaderDeps,h):h,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(E.globalNotFound=l===r.id),E.searchError=m;let ee=this.getParentContext(a);E.context={...ee,...E.__routeContext,...E.__beforeLoadContext},u[n]=E}for(let t=0;t<u.length;t++){let n=u[t],r=this.looseRoutesById[n.routeId],i=this.getMatch(n.id),a=f.get(n.routeId);if(n.params=a?M(a.params,o):o,!i){let i=u[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:u,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return u}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=ie(t),i={...e.search};for(let e of t)try{Object.assign(i,Y(e.options.validateSearch,i))}catch{}let a=ie(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{ft(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},J=class extends Error{},ot=class extends Error{};function st(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Y(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new J(`Async validation not supported`);if(n.issues)throw new J(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function ct({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=a(e),o,s=S(i,n,!0);return s&&(o=s.route,Object.assign(r,s.rawParams)),{matchedRoutes:s?.branch||[t.__root__],routeParams:r,foundRoute:o}}function lt({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return ut(n)(e,t,r??!1)}function ut(e){let t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(let n of e)`search`in n.options?n.options.search?.middlewares&&t.middlewares.push(...n.options.search.middlewares):(n.options.preSearchFilters||n.options.postSearchFilters)&&t.middlewares.push(({search:e,next:t})=>{let r=e;`preSearchFilters`in n.options&&n.options.preSearchFilters&&(r=n.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=t(r);return`postSearchFilters`in n.options&&n.options.postSearchFilters?n.options.postSearchFilters.reduce((e,t)=>t(e),i):i}),n.options.validateSearch&&t.middlewares.push(({search:e,next:r})=>{let i=r(e);if(!t._includeValidateSearch)return i;try{return{...i,...Y(n.options.validateSearch,i)??void 0}}catch{return i}});t.middlewares.push(({search:e})=>{let n=t.dest;return n.search?n.search===!0?e:j(n.search,e):{}});let n=(e,t,r)=>{if(e>=r.length)return t;let i=r[e];return i({search:t,next:t=>n(e+1,t,r)})};return function(e,r,i){return t.dest=r,t._includeValidateSearch=i,n(0,e,t.middlewares)}}function dt(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return h}function ft(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}var X=t(n(),1),Z=e();function pt(e){let t=e.errorComponent??Q;return(0,Z.jsx)(mt,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?X.createElement(t,{error:n,reset:r}):e.children})}var mt=class extends X.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Q({error:e}){let[t,n]=X.useState(!1);return(0,Z.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,Z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,Z.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,Z.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,Z.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,Z.jsx)(`div`,{children:(0,Z.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,Z.jsx)(`code`,{children:e.message}):null})}):null]})}function ht(e){let t=A(),n=`not-found-${o(t.stores.location,e=>e.pathname)}-${o(t.stores.status,e=>e)}`;return(0,Z.jsx)(pt,{getResetKey:()=>n,onCatch:(t,n)=>{if(g(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(g(t))return e.fallback?.(t);throw t},children:e.children})}function gt(){return(0,Z.jsx)(`p`,{children:`Not Found`})}function $(e){return(0,Z.jsx)(Z.Fragment,{children:e.children})}function _t(e,t,n){return t.options.notFoundComponent?(0,Z.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,Z.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,Z.jsx)(gt,{})}var vt=X.memo(function({matchId:e}){let t=A(),n=t.stores.matchStores.get(e);n||f();let r=o(t.stores.loadedAt,e=>e),i=o(n,e=>e);return(0,Z.jsx)(yt,{router:t,matchId:e,resetKey:r,matchState:X.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function yt({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,Z.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?X.Suspense:$,f=s?pt:$,p=l?ht:$;return(0,Z.jsxs)(i.isRoot?i.options.shellComponent??$:$,{children:[(0,Z.jsx)(re.Provider,{value:t,children:(0,Z.jsx)(d,{fallback:o,children:(0,Z.jsx)(f,{getResetKey:()=>n,errorComponent:s||Q,onCatch:(e,t)=>{if(g(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,Z.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return X.createElement(l,e)},children:u||r._displayPending?(0,Z.jsx)(x,{fallback:o,children:(0,Z.jsx)(xt,{matchId:t})}):(0,Z.jsx)(xt,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(bt,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function bt({resetKey:e}){let t=A(),n=X.useRef(void 0);return ae(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...q(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var xt=X.memo(function({matchId:e}){let t=A(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||f();let a=o(r,e=>e),s=a.routeId,c=t.routesById[s],l=X.useMemo(()=>{let e=(t.routesById[s].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:s,loaderDeps:a.loaderDeps,params:a._strictParams,search:a._strictSearch});return e?JSON.stringify(e):void 0},[s,a.loaderDeps,a._strictParams,a._strictSearch,t.options.defaultRemountDeps,t.routesById]),u=X.useMemo(()=>{let e=c.options.component??t.options.defaultComponent;return e?(0,Z.jsx)(e,{},l):(0,Z.jsx)(St,{})},[l,c.options.component,t.options.defaultComponent]);if(a._displayPending)throw n(a,`displayPendingPromise`);if(a._forcePending)throw n(a,`minPendingPromise`);if(a.status===`pending`){let e=c.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(a.id);if(n&&!n._nonReactive.minPendingPromise){let t=D();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(a,`loadPromise`)}if(a.status===`notFound`)return g(a.error)||f(),_t(t,c,a.error);if(a.status===`redirected`)throw i(a.error)||f(),n(a,`loadPromise`);if(a.status===`error`)throw a.error;return u}),St=X.memo(function(){let e=A(),t=X.useContext(re),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=o(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=o(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,s=e.options.defaultPendingComponent?(0,Z.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||f(),_t(e,a,void 0);if(!i)return null;let c=(0,Z.jsx)(vt,{matchId:i});return n===`__root__`?(0,Z.jsx)(X.Suspense,{fallback:s,children:c}):c}),Ct=b(`/(home)`)({component:le(()=>ee(()=>import(`./route-Xh3KoGqC.js`),__vite__mapDeps([0,1,2,3,4,5,6,7])),`component`),validateSearch:oe(s({}))});export{pt as a,q as c,$ as i,de as l,vt as n,Q as o,St as r,at as s,Ct as t,fe as u};
@@ -1,4 +1,4 @@
1
- import{n as e,o as t,r as n,t as r}from"./compiler-runtime-CUwoe8mk.js";import{Bn as i,Do as a,Ea as o,Hi as s,Hn as c,Ji as l,Ln as u,Ta as d,Ui as f,Un as p,Vn as m,Yi as h,bt as g,c as _,cs as v,da as y,ds as ee,l as b,ln as x,oa as S,ro as C,t as w,ta as T,u as E,vo as D,wo as O,zn as k}from"./utils-BcciP3Sx.js";import{r as A,t as j}from"./route-XNMYtWT-.js";import{F as M,t as te}from"./button-D5PTso91.js";import{a as N,c as ne,i as P,n as re,o as ie,r as ae,s as oe,t as se,v as ce}from"./dialog-CTqPdO7i.js";import{t as le}from"./check-C1Q0x6Ev.js";import{a as ue,c as de,i as fe,l as pe,n as me,o as he,r as ge,s as _e,t as ve}from"./state-CfuBgP9R.js";import{F,I,L as ye,R as L,z as R}from"./composite-CV4TlLb7.js";var z=t(n(),1);function B(e){let t=ee({warn:e?.router===void 0}),n=e?.router||t,r=(0,z.useRef)(void 0);return a(n.stores.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=v(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var be=M(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),xe=M(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),Se=M(`git-branch-plus`,[[`path`,{d:`M6 3v12`,key:`qpgusn`}],[`path`,{d:`M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`1d02ji`}],[`path`,{d:`M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`chk6ph`}],[`path`,{d:`M15 6a9 9 0 0 0-9 9`,key:`or332x`}],[`path`,{d:`M18 15v6`,key:`9wciyi`}],[`path`,{d:`M21 18h-6`,key:`139f0c`}]]),Ce=M(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),V=M(`panel-top`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),we=M(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Te=M(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Ee=M(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),H=r(),U=1,De=.9,Oe=.8,ke=.17,Ae=.1,je=.999,Me=.9999,Ne=.99,Pe=/[\\\/_+.#"@\[\(\{&]/,Fe=/[\\\/_+.#"@\[\(\{&]/g,Ie=/[\s-]/,Le=/[\s-]/g;function Re(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?U:Ne;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Re(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=U:Pe.test(e.charAt(l-1))?(d*=Oe,p=e.slice(i,l-1).match(Fe),p&&i>0&&(d*=je**+p.length)):Ie.test(e.charAt(l-1))?(d*=De,m=e.slice(i,l-1).match(Le),m&&i>0&&(d*=je**+m.length)):(d*=ke,i>0&&(d*=je**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Me)),(d<Ae&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Re(e,t,n,r,l+1,a+2,o),f*Ae>d&&(d=f*Ae)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function ze(e){return e.toLowerCase().replace(Le,` `)}function Be(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Re(e,t,ze(e),ze(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Ve(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function G(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ve(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ve(e[t],null)}}}}function He(...e){return z.useCallback(G(...e),e)}var K=e();function Ue(e,t){let n=z.createContext(t),r=e=>{let{children:t,...r}=e,i=z.useMemo(()=>r,Object.values(r));return(0,K.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=z.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function We(e,t=[]){let n=[];function r(t,r){let i=z.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=z.useMemo(()=>o,Object.values(o));return(0,K.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=z.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>z.createContext(e));return function(n){let r=n?.[e]||t;return z.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Ge(i,...t)]}function Ge(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return z.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Ke=globalThis?.document?z.useLayoutEffect:()=>{},qe=z.useId||(()=>void 0),Je=0;function q(e){let[t,n]=z.useState(qe());return Ke(()=>{e||n(e=>e??String(Je++))},[e]),e||(t?`radix-${t}`:``)}var Ye=z.useInsertionEffect||Ke;function Xe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Ze({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=z.useRef(e!==void 0);z.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,z.useCallback(t=>{if(s){let n=Qe(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Ze({defaultProp:e,onChange:t}){let[n,r]=z.useState(e),i=z.useRef(n),a=z.useRef(t);return Ye(()=>{a.current=t},[t]),z.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Qe(e){return typeof e==`function`}var $e=t(O(),1);function et(e){let t=tt(e),n=z.forwardRef((e,n)=>{let{children:r,...i}=e,a=z.Children.toArray(r),o=a.find(rt);if(o){let e=o.props.children,r=a.map(t=>t===o?z.Children.count(e)>1?z.Children.only(null):z.isValidElement(e)?e.props.children:null:t);return(0,K.jsx)(t,{...i,ref:n,children:z.isValidElement(e)?z.cloneElement(e,void 0,r):null})}return(0,K.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function tt(e){let t=z.forwardRef((e,t)=>{let{children:n,...r}=e;if(z.isValidElement(n)){let e=at(n),i=it(r,n.props);return n.type!==z.Fragment&&(i.ref=t?G(t,e):e),z.cloneElement(n,i)}return z.Children.count(n)>1?z.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nt=Symbol(`radix.slottable`);function rt(e){return z.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===nt}function it(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function at(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var J=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=et(`Primitive.${t}`),r=z.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,K.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ot(e,t){e&&$e.flushSync(()=>e.dispatchEvent(t))}function st(e){let t=z.useRef(e);return z.useEffect(()=>{t.current=e}),z.useMemo(()=>(...e)=>t.current?.(...e),[])}function ct(e,t=globalThis?.document){let n=st(e);z.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var lt=`DismissableLayer`,ut=`dismissableLayer.update`,dt=`dismissableLayer.pointerDownOutside`,ft=`dismissableLayer.focusOutside`,pt,mt=z.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ht=z.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=z.useContext(mt),[u,d]=z.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=z.useState({}),m=He(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,ee=v>=_,b=vt(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!ee||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),x=yt(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return ct(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),z.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(pt=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),bt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=pt)}},[u,f,n,l]),z.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),bt())},[u,l]),z.useEffect(()=>{let e=()=>p({});return document.addEventListener(ut,e),()=>document.removeEventListener(ut,e)},[]),(0,K.jsx)(J.div,{...c,ref:m,style:{pointerEvents:y?ee?`auto`:`none`:void 0,...e.style},onFocusCapture:W(e.onFocusCapture,x.onFocusCapture),onBlurCapture:W(e.onBlurCapture,x.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,b.onPointerDownCapture)})});ht.displayName=lt;var gt=`DismissableLayerBranch`,_t=z.forwardRef((e,t)=>{let n=z.useContext(mt),r=z.useRef(null),i=He(t,r);return z.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,K.jsx)(J.div,{...e,ref:i})});_t.displayName=gt;function vt(e,t=globalThis?.document){let n=st(e),r=z.useRef(!1),i=z.useRef(()=>{});return z.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){xt(dt,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function yt(e,t=globalThis?.document){let n=st(e),r=z.useRef(!1);return z.useEffect(()=>{let e=e=>{e.target&&!r.current&&xt(ft,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bt(){let e=new CustomEvent(ut);document.dispatchEvent(e)}function xt(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ot(i,a):i.dispatchEvent(a)}var St=`focusScope.autoFocusOnMount`,Ct=`focusScope.autoFocusOnUnmount`,wt={bubbles:!1,cancelable:!0},Tt=`FocusScope`,Et=z.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=z.useState(null),l=st(i),u=st(a),d=z.useRef(null),f=He(t,e=>c(e)),p=z.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;z.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Y(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Y(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Y(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),z.useEffect(()=>{if(s){Nt.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(St,wt);s.addEventListener(St,l),s.dispatchEvent(t),t.defaultPrevented||(Dt(It(kt(s)),{select:!0}),document.activeElement===e&&Y(s))}return()=>{s.removeEventListener(St,l),setTimeout(()=>{let t=new CustomEvent(Ct,wt);s.addEventListener(Ct,u),s.dispatchEvent(t),t.defaultPrevented||Y(e??document.body,{select:!0}),s.removeEventListener(Ct,u),Nt.remove(p)},0)}}},[s,l,u,p]);let m=z.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ot(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Y(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Y(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,K.jsx)(J.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Et.displayName=Tt;function Dt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Y(r,{select:t}),document.activeElement!==n)return}function Ot(e){let t=kt(e);return[At(t,e),At(t.reverse(),e)]}function kt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function At(e,t){for(let n of e)if(!jt(n,{upTo:t}))return n}function jt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Mt(e){return e instanceof HTMLInputElement&&`select`in e}function Y(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mt(e)&&t&&e.select()}}var Nt=Pt();function Pt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ft(e,t),e.unshift(t)},remove(t){e=Ft(e,t),e[0]?.resume()}}}function Ft(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function It(e){return e.filter(e=>e.tagName!==`A`)}var Lt=`Portal`,Rt=z.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=z.useState(!1);Ke(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?$e.createPortal((0,K.jsx)(J.div,{...r,ref:t}),o):null});Rt.displayName=Lt;function zt(e,t){return z.useReducer((e,n)=>t[e][n]??e,e)}var Bt=e=>{let{present:t,children:n}=e,r=Vt(t),i=typeof n==`function`?n({present:r.isPresent}):z.Children.only(n),a=He(r.ref,Ut(i));return typeof n==`function`||r.isPresent?z.cloneElement(i,{ref:a}):null};Bt.displayName=`Presence`;function Vt(e){let[t,n]=z.useState(),r=z.useRef(null),i=z.useRef(e),a=z.useRef(`none`),[o,s]=zt(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return z.useEffect(()=>{let e=Ht(r.current);a.current=o===`mounted`?e:`none`},[o]),Ke(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Ht(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Ke(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Ht(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Ht(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:z.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Ht(e){return e?.animationName||`none`}function Ut(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wt=0;function Gt(){z.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Kt()),document.body.insertAdjacentElement(`beforeend`,e[1]??Kt()),Wt++,()=>{Wt===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Wt--}},[])}function Kt(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var X=function(){return X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},X.apply(this,arguments)};function qt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Jt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Yt=`right-scroll-bar-position`,Xt=`width-before-scroll-bar`,Zt=`with-scroll-bars-hidden`,Qt=`--removed-body-scroll-bar-size`;function $t(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function en(e,t){var n=(0,z.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var tn=typeof window<`u`?z.useLayoutEffect:z.useEffect,nn=new WeakMap;function rn(e,t){var n=en(t||null,function(t){return e.forEach(function(e){return $t(e,t)})});return tn(function(){var t=nn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||$t(e,null)}),i.forEach(function(e){r.has(e)||$t(e,a)})}nn.set(n,e)},[e]),n}function an(e){return e}function on(e,t){t===void 0&&(t=an);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function sn(e){e===void 0&&(e={});var t=on(null);return t.options=X({async:!0,ssr:!1},e),t}var cn=function(e){var t=e.sideCar,n=qt(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return z.createElement(r,X({},n))};cn.isSideCarExport=!0;function ln(e,t){return e.useMedium(t),cn}var un=sn(),dn=function(){},fn=z.forwardRef(function(e,t){var n=z.useRef(null),r=z.useState({onScrollCapture:dn,onWheelCapture:dn,onTouchMoveCapture:dn}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,ee=qt(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),b=f,x=rn([n,t]),S=X(X({},ee),i);return z.createElement(z.Fragment,null,u&&z.createElement(b,{sideCar:un,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?z.cloneElement(z.Children.only(s),X(X({},S),{ref:x})):z.createElement(v,X({},S,{className:c,ref:x}),s))});fn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},fn.classNames={fullWidth:Xt,zeroRight:Yt};var pn,mn=function(){if(pn)return pn;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function hn(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=mn();return t&&e.setAttribute(`nonce`,t),e}function gn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _n(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var vn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hn())&&(gn(t,n),_n(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yn=function(){var e=vn();return function(t,n){z.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bn=function(){var e=yn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},xn={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||``,10)||0},Cn=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Sn(n),Sn(r),Sn(i)]},wn=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return xn;var t=Cn(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Tn=bn(),En=`data-scroll-locked`,Dn=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
1
+ import{n as e,o as t,r as n,t as r}from"./compiler-runtime-CUwoe8mk.js";import{Bn as i,Do as a,Ea as o,Hi as s,Hn as c,Ji as l,Ln as u,Ta as d,Ui as f,Un as p,Vn as m,Yi as h,bt as g,c as _,cs as v,da as y,ds as ee,l as b,ln as x,oa as S,ro as C,t as w,ta as T,u as E,vo as D,wo as O,zn as k}from"./utils-BcciP3Sx.js";import{r as A,t as j}from"./route-CPP99S5h.js";import{F as M,t as te}from"./button-D5PTso91.js";import{a as N,c as ne,i as P,n as re,o as ie,r as ae,s as oe,t as se,v as ce}from"./dialog-CTqPdO7i.js";import{t as le}from"./check-C1Q0x6Ev.js";import{a as ue,c as de,i as fe,l as pe,n as me,o as he,r as ge,s as _e,t as ve}from"./state-CQDoh6vk.js";import{F,I,L as ye,R as L,z as R}from"./composite-CV4TlLb7.js";var z=t(n(),1);function B(e){let t=ee({warn:e?.router===void 0}),n=e?.router||t,r=(0,z.useRef)(void 0);return a(n.stores.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=v(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var be=M(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),xe=M(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),Se=M(`git-branch-plus`,[[`path`,{d:`M6 3v12`,key:`qpgusn`}],[`path`,{d:`M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`1d02ji`}],[`path`,{d:`M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`chk6ph`}],[`path`,{d:`M15 6a9 9 0 0 0-9 9`,key:`or332x`}],[`path`,{d:`M18 15v6`,key:`9wciyi`}],[`path`,{d:`M21 18h-6`,key:`139f0c`}]]),Ce=M(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),V=M(`panel-top`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),we=M(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Te=M(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Ee=M(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),H=r(),U=1,De=.9,Oe=.8,ke=.17,Ae=.1,je=.999,Me=.9999,Ne=.99,Pe=/[\\\/_+.#"@\[\(\{&]/,Fe=/[\\\/_+.#"@\[\(\{&]/g,Ie=/[\s-]/,Le=/[\s-]/g;function Re(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?U:Ne;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Re(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=U:Pe.test(e.charAt(l-1))?(d*=Oe,p=e.slice(i,l-1).match(Fe),p&&i>0&&(d*=je**+p.length)):Ie.test(e.charAt(l-1))?(d*=De,m=e.slice(i,l-1).match(Le),m&&i>0&&(d*=je**+m.length)):(d*=ke,i>0&&(d*=je**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Me)),(d<Ae&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Re(e,t,n,r,l+1,a+2,o),f*Ae>d&&(d=f*Ae)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function ze(e){return e.toLowerCase().replace(Le,` `)}function Be(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Re(e,t,ze(e),ze(t),0,0,{})}typeof window<`u`&&window.document&&window.document.createElement;function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function Ve(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function G(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ve(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ve(e[t],null)}}}}function He(...e){return z.useCallback(G(...e),e)}var K=e();function Ue(e,t){let n=z.createContext(t),r=e=>{let{children:t,...r}=e,i=z.useMemo(()=>r,Object.values(r));return(0,K.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=z.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function We(e,t=[]){let n=[];function r(t,r){let i=z.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=z.useMemo(()=>o,Object.values(o));return(0,K.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=z.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>z.createContext(e));return function(n){let r=n?.[e]||t;return z.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Ge(i,...t)]}function Ge(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return z.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Ke=globalThis?.document?z.useLayoutEffect:()=>{},qe=z.useId||(()=>void 0),Je=0;function q(e){let[t,n]=z.useState(qe());return Ke(()=>{e||n(e=>e??String(Je++))},[e]),e||(t?`radix-${t}`:``)}var Ye=z.useInsertionEffect||Ke;function Xe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Ze({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=z.useRef(e!==void 0);z.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,z.useCallback(t=>{if(s){let n=Qe(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Ze({defaultProp:e,onChange:t}){let[n,r]=z.useState(e),i=z.useRef(n),a=z.useRef(t);return Ye(()=>{a.current=t},[t]),z.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Qe(e){return typeof e==`function`}var $e=t(O(),1);function et(e){let t=tt(e),n=z.forwardRef((e,n)=>{let{children:r,...i}=e,a=z.Children.toArray(r),o=a.find(rt);if(o){let e=o.props.children,r=a.map(t=>t===o?z.Children.count(e)>1?z.Children.only(null):z.isValidElement(e)?e.props.children:null:t);return(0,K.jsx)(t,{...i,ref:n,children:z.isValidElement(e)?z.cloneElement(e,void 0,r):null})}return(0,K.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function tt(e){let t=z.forwardRef((e,t)=>{let{children:n,...r}=e;if(z.isValidElement(n)){let e=at(n),i=it(r,n.props);return n.type!==z.Fragment&&(i.ref=t?G(t,e):e),z.cloneElement(n,i)}return z.Children.count(n)>1?z.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nt=Symbol(`radix.slottable`);function rt(e){return z.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===nt}function it(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function at(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var J=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=et(`Primitive.${t}`),r=z.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,K.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ot(e,t){e&&$e.flushSync(()=>e.dispatchEvent(t))}function st(e){let t=z.useRef(e);return z.useEffect(()=>{t.current=e}),z.useMemo(()=>(...e)=>t.current?.(...e),[])}function ct(e,t=globalThis?.document){let n=st(e);z.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var lt=`DismissableLayer`,ut=`dismissableLayer.update`,dt=`dismissableLayer.pointerDownOutside`,ft=`dismissableLayer.focusOutside`,pt,mt=z.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ht=z.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=z.useContext(mt),[u,d]=z.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=z.useState({}),m=He(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,ee=v>=_,b=vt(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!ee||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),x=yt(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return ct(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),z.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(pt=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),bt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=pt)}},[u,f,n,l]),z.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),bt())},[u,l]),z.useEffect(()=>{let e=()=>p({});return document.addEventListener(ut,e),()=>document.removeEventListener(ut,e)},[]),(0,K.jsx)(J.div,{...c,ref:m,style:{pointerEvents:y?ee?`auto`:`none`:void 0,...e.style},onFocusCapture:W(e.onFocusCapture,x.onFocusCapture),onBlurCapture:W(e.onBlurCapture,x.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,b.onPointerDownCapture)})});ht.displayName=lt;var gt=`DismissableLayerBranch`,_t=z.forwardRef((e,t)=>{let n=z.useContext(mt),r=z.useRef(null),i=He(t,r);return z.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,K.jsx)(J.div,{...e,ref:i})});_t.displayName=gt;function vt(e,t=globalThis?.document){let n=st(e),r=z.useRef(!1),i=z.useRef(()=>{});return z.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){xt(dt,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function yt(e,t=globalThis?.document){let n=st(e),r=z.useRef(!1);return z.useEffect(()=>{let e=e=>{e.target&&!r.current&&xt(ft,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bt(){let e=new CustomEvent(ut);document.dispatchEvent(e)}function xt(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ot(i,a):i.dispatchEvent(a)}var St=`focusScope.autoFocusOnMount`,Ct=`focusScope.autoFocusOnUnmount`,wt={bubbles:!1,cancelable:!0},Tt=`FocusScope`,Et=z.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=z.useState(null),l=st(i),u=st(a),d=z.useRef(null),f=He(t,e=>c(e)),p=z.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;z.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:Y(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Y(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Y(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),z.useEffect(()=>{if(s){Nt.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(St,wt);s.addEventListener(St,l),s.dispatchEvent(t),t.defaultPrevented||(Dt(It(kt(s)),{select:!0}),document.activeElement===e&&Y(s))}return()=>{s.removeEventListener(St,l),setTimeout(()=>{let t=new CustomEvent(Ct,wt);s.addEventListener(Ct,u),s.dispatchEvent(t),t.defaultPrevented||Y(e??document.body,{select:!0}),s.removeEventListener(Ct,u),Nt.remove(p)},0)}}},[s,l,u,p]);let m=z.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ot(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Y(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Y(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,K.jsx)(J.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});Et.displayName=Tt;function Dt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Y(r,{select:t}),document.activeElement!==n)return}function Ot(e){let t=kt(e);return[At(t,e),At(t.reverse(),e)]}function kt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function At(e,t){for(let n of e)if(!jt(n,{upTo:t}))return n}function jt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Mt(e){return e instanceof HTMLInputElement&&`select`in e}function Y(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mt(e)&&t&&e.select()}}var Nt=Pt();function Pt(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ft(e,t),e.unshift(t)},remove(t){e=Ft(e,t),e[0]?.resume()}}}function Ft(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function It(e){return e.filter(e=>e.tagName!==`A`)}var Lt=`Portal`,Rt=z.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=z.useState(!1);Ke(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?$e.createPortal((0,K.jsx)(J.div,{...r,ref:t}),o):null});Rt.displayName=Lt;function zt(e,t){return z.useReducer((e,n)=>t[e][n]??e,e)}var Bt=e=>{let{present:t,children:n}=e,r=Vt(t),i=typeof n==`function`?n({present:r.isPresent}):z.Children.only(n),a=He(r.ref,Ut(i));return typeof n==`function`||r.isPresent?z.cloneElement(i,{ref:a}):null};Bt.displayName=`Presence`;function Vt(e){let[t,n]=z.useState(),r=z.useRef(null),i=z.useRef(e),a=z.useRef(`none`),[o,s]=zt(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return z.useEffect(()=>{let e=Ht(r.current);a.current=o===`mounted`?e:`none`},[o]),Ke(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Ht(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Ke(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Ht(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Ht(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:z.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Ht(e){return e?.animationName||`none`}function Ut(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wt=0;function Gt(){z.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Kt()),document.body.insertAdjacentElement(`beforeend`,e[1]??Kt()),Wt++,()=>{Wt===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Wt--}},[])}function Kt(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var X=function(){return X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},X.apply(this,arguments)};function qt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Jt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Yt=`right-scroll-bar-position`,Xt=`width-before-scroll-bar`,Zt=`with-scroll-bars-hidden`,Qt=`--removed-body-scroll-bar-size`;function $t(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function en(e,t){var n=(0,z.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var tn=typeof window<`u`?z.useLayoutEffect:z.useEffect,nn=new WeakMap;function rn(e,t){var n=en(t||null,function(t){return e.forEach(function(e){return $t(e,t)})});return tn(function(){var t=nn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||$t(e,null)}),i.forEach(function(e){r.has(e)||$t(e,a)})}nn.set(n,e)},[e]),n}function an(e){return e}function on(e,t){t===void 0&&(t=an);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function sn(e){e===void 0&&(e={});var t=on(null);return t.options=X({async:!0,ssr:!1},e),t}var cn=function(e){var t=e.sideCar,n=qt(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return z.createElement(r,X({},n))};cn.isSideCarExport=!0;function ln(e,t){return e.useMedium(t),cn}var un=sn(),dn=function(){},fn=z.forwardRef(function(e,t){var n=z.useRef(null),r=z.useState({onScrollCapture:dn,onWheelCapture:dn,onTouchMoveCapture:dn}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,ee=qt(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),b=f,x=rn([n,t]),S=X(X({},ee),i);return z.createElement(z.Fragment,null,u&&z.createElement(b,{sideCar:un,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?z.cloneElement(z.Children.only(s),X(X({},S),{ref:x})):z.createElement(v,X({},S,{className:c,ref:x}),s))});fn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},fn.classNames={fullWidth:Xt,zeroRight:Yt};var pn,mn=function(){if(pn)return pn;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function hn(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=mn();return t&&e.setAttribute(`nonce`,t),e}function gn(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _n(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var vn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hn())&&(gn(t,n),_n(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yn=function(){var e=vn();return function(t,n){z.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},bn=function(){var e=yn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},xn={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||``,10)||0},Cn=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Sn(n),Sn(r),Sn(i)]},wn=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return xn;var t=Cn(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Tn=bn(),En=`data-scroll-locked`,Dn=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
2
  .${Zt} {
3
3
  overflow: hidden ${r};
4
4
  padding-right: ${s}px ${r};