@kky42/pievo-server 2.0.3 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{LoopView-CCYqXrKq.js → LoopView-Pbp2YtUu.js} +1 -1
- package/.output/public/assets/{Modal-BhRzAXQg.js → Modal-B3xpEtcf.js} +1 -1
- package/.output/public/assets/{SignIn-CV3jqX_8.js → SignIn-9vsaKv_p.js} +1 -1
- package/.output/public/assets/{actionUi-BRtdWVvO.js → actionUi-DDDfD0WX.js} +1 -1
- package/.output/public/assets/app-CStTBRt2.css +2 -0
- package/.output/public/assets/{artifactView-DekEs5ME.js → artifactView-BV-yQVrj.js} +1 -1
- package/.output/public/assets/{index-BATGA0jG.js → index-DT_reRxT.js} +4 -4
- package/.output/public/assets/{invite._token-Dp2HL9X5.js → invite._token-5zhVSA26.js} +1 -1
- package/.output/public/assets/{invite._token-CQgv8lTC.js → invite._token-C3t4JfAY.js} +1 -1
- package/.output/public/assets/{lifecycleUi-C3k2MlX8.js → lifecycleUi-CMFw5Nlj.js} +1 -1
- package/.output/public/assets/{loopApi-5s2-kCnu.js → loopApi-C_Dtw-nL.js} +1 -1
- package/.output/public/assets/loops._loopId-6JlPOCsY.js +4 -0
- package/.output/public/assets/{loops._loopId_.runs._runId-BNN-dLrW.js → loops._loopId_.runs._runId-wFUMHN9w.js} +2 -2
- package/.output/public/assets/{notifyFns-DuBElaqG.js → notifyFns-CF12Yboc.js} +1 -1
- package/.output/public/assets/{preload-helper-3xcHsDtt.js → preload-helper--VCqDT5m.js} +2 -2
- package/.output/public/assets/{routes-CmuCVIIS.js → routes-DsdcURfk.js} +1 -1
- package/.output/public/assets/{routes-YnrsFY5X.js → routes-WVPuW976.js} +1 -1
- package/.output/public/assets/{t._teamId-BlE4mCSj.js → t._teamId-BdVLnwih.js} +1 -1
- package/.output/public/assets/{t._teamId-Bi-C9s5j.js → t._teamId-C9uEyAh_.js} +1 -1
- package/.output/public/assets/ui-Gb1413-F.js +1 -0
- package/.output/server/_ssr/{DashboardView-2eNPqWcy.mjs → DashboardView-DJMpoucm.mjs} +8 -8
- package/.output/server/_ssr/{LoopPlaybook-CnQ8Qgyf.mjs → LoopPlaybook-WFNer22Y.mjs} +3 -3
- package/.output/server/_ssr/{LoopView-DM30OPCN.mjs → LoopView-Dsc6oik9.mjs} +7 -7
- package/.output/server/_ssr/{Modal-B7gBr5Pm.mjs → Modal-Bc_5TYGr.mjs} +2 -2
- package/.output/server/_ssr/{SignIn-CaAi4_mk.mjs → SignIn-2qr-vtR5.mjs} +3 -3
- package/.output/server/_ssr/{actionUi-Be7dmMxb.mjs → actionUi-BKF6xI3d.mjs} +2 -2
- package/.output/server/_ssr/{adapters-CHURWoZx.mjs → adapters-Bwuh6uek.mjs} +2 -2
- package/.output/server/_ssr/{artifactFiles-D6b_RP78.mjs → artifactFiles-Cp1IBHne.mjs} +3 -3
- package/.output/server/_ssr/{artifactView-CYV1r48i.mjs → artifactView-DX4P3Krh.mjs} +2 -2
- package/.output/server/_ssr/artifacts-9G_Ai7vO.mjs +2 -0
- package/.output/server/_ssr/{auth-B_OxPpFr.mjs → auth-uQ19WsD1.mjs} +9 -9
- package/.output/server/_ssr/{boot-BNoivm21.mjs → boot-DPoPmSLh.mjs} +1236 -314
- package/.output/server/_ssr/boot-Zz5AJgfy.mjs +2 -0
- package/.output/server/_ssr/{bun-sqlite-dialect-BW9W1_Ps-B3RHdVjo.mjs → bun-sqlite-dialect-BW9W1_Ps-CqcLCApi.mjs} +2 -2
- package/.output/server/_ssr/{d1-sqlite-dialect-BLC8LXE6-DpVe1foU.mjs → d1-sqlite-dialect-BLC8LXE6-AuWb61y8.mjs} +2 -2
- package/.output/server/_ssr/db-BMANvbZu.mjs +2 -0
- package/.output/server/_ssr/{dist-BTx1ljg7.mjs → dist-CtYTvPCD.mjs} +2 -2
- package/.output/server/_ssr/{factory-TSnFcS96.mjs → factory-BtqxMS8a.mjs} +2 -2
- package/.output/server/_ssr/{invite._token-CvqaKH2R.mjs → invite._token-BlbVjz-o.mjs} +2 -2
- package/.output/server/_ssr/{invite._token-CDpO3cfB.mjs → invite._token-DBttmaDb.mjs} +6 -6
- package/.output/server/_ssr/{invite._token-DWOPXXLS.mjs → invite._token-DtAfQyfP.mjs} +5 -5
- package/.output/server/_ssr/{kysely-adapter-BWjzeCGK.mjs → kysely-adapter-bSpTlW7Z.mjs} +1 -1
- package/.output/server/_ssr/{lifecycleUi-5jMhxINb.mjs → lifecycleUi-Djb44Aj3.mjs} +4 -4
- package/.output/server/_ssr/logger-CR1a0flR.mjs +2 -0
- package/.output/server/_ssr/{loopApi-BfMnXaKT.mjs → loopApi-7MTSs6hy.mjs} +5 -5
- package/.output/server/_ssr/{loopApi-Cpm8YV3U.mjs → loopApi-BXRBFGWh.mjs} +23 -23
- package/.output/server/_ssr/{loops._loopId-C-y4Pux_.mjs → loops._loopId-6Q0DMXU0.mjs} +4 -4
- package/.output/server/_ssr/{loops._loopId-DfrHw2mZ.mjs → loops._loopId-C0x0SE8F.mjs} +85 -85
- package/.output/server/_ssr/{loops._loopId_.runs._runId-BXyyqXwX.mjs → loops._loopId_.runs._runId-BOJBJu_a.mjs} +4 -4
- package/.output/server/_ssr/{loops._loopId_.runs._runId-C9d0EC2Q.mjs → loops._loopId_.runs._runId-CkM0-ckn.mjs} +9 -9
- package/.output/server/_ssr/{machineFns-CRbwYxD3.mjs → machineFns-CQuvvdXx.mjs} +3 -3
- package/.output/server/_ssr/{node-sqlite-dialect-B10G6C4W.mjs → node-sqlite-dialect-ZOyD6D7F.mjs} +2 -2
- package/.output/server/_ssr/{notifyFns-DvH4C-GH.mjs → notifyFns-BOeYZDRp.mjs} +3 -3
- package/.output/server/_ssr/{notifyFns-CtmSVNmE.mjs → notifyFns-UFZ2j7Fv.mjs} +7 -7
- package/.output/server/_ssr/{router-B4ipreZ4.mjs → router-jnPelPNh.mjs} +32 -32
- package/.output/server/_ssr/{routes-DKox93l0.mjs → routes-Bx0bRxt9.mjs} +2 -2
- package/.output/server/_ssr/{routes-iHT61OkI.mjs → routes-CMAUcUsZ.mjs} +5 -5
- package/.output/server/_ssr/{routes-l7tUe3lr.mjs → routes-CXnbFjB_.mjs} +6 -6
- package/.output/server/_ssr/runDiff-CDPvl_cY.mjs +2 -0
- package/.output/server/_ssr/ssr.mjs +51 -51
- package/.output/server/_ssr/store-DDOk2Ty_.mjs +2 -0
- package/.output/server/_ssr/{t._teamId-jO8dUmSQ.mjs → t._teamId-36z-mmyw.mjs} +5 -5
- package/.output/server/_ssr/{t._teamId-BPK2mrN3.mjs → t._teamId-Bsm4WrJl.mjs} +6 -6
- package/.output/server/_ssr/{t._teamId-B3g0Cs8B.mjs → t._teamId-D9nCEa2h.mjs} +2 -2
- package/.output/server/_ssr/{teamFns-D4I-0dEB.mjs → teamFns-BBIbatdZ.mjs} +2 -2
- package/.output/server/_ssr/{teamFns-6zjFV7lM.mjs → teamFns-DAx4a1z4.mjs} +3 -3
- package/.output/server/_ssr/tokens-7KEKpLnu.mjs +2 -0
- package/.output/server/_ssr/{ui-CI-OeTr7.mjs → ui-B6mE5-5v.mjs} +6 -6
- package/.output/server/{_tanstack-start-manifest_v-CxHUYCv8.mjs → _tanstack-start-manifest_v-5iQOchGB.mjs} +28 -28
- package/.output/server/drizzle/0015_run_history_foundation.sql +43 -0
- package/.output/server/drizzle/0016_plural_machine_runs.sql +4 -0
- package/.output/server/drizzle/meta/_journal.json +14 -0
- package/.output/server/index.mjs +118 -118
- package/drizzle/0015_run_history_foundation.sql +43 -0
- package/drizzle/0016_plural_machine_runs.sql +4 -0
- package/drizzle/meta/_journal.json +14 -0
- package/package.json +1 -1
- package/.output/public/assets/app-B03JVnFn.css +0 -2
- package/.output/public/assets/loops._loopId-C9vRjZ8W.js +0 -4
- package/.output/public/assets/ui-By58RJgB.js +0 -1
- package/.output/server/_ssr/artifacts-CXMpBzMY.mjs +0 -2
- package/.output/server/_ssr/boot-C9VAWt9Z.mjs +0 -2
- package/.output/server/_ssr/db-C11vQNxP.mjs +0 -2
- package/.output/server/_ssr/logger-DE_PU5bE.mjs +0 -2
- package/.output/server/_ssr/runDiff-Bohd5W5R.mjs +0 -113
- package/.output/server/_ssr/store-Ck7kCAGf.mjs +0 -2
- package/.output/server/_ssr/tokens-oJm6yFyt.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-
|
|
2
|
-
import{n as e,r as t,s as n,t as r}from"./jsx-runtime-BseJUIpC.js";import{A as i,D as a,F as o,I as s,M as c,N as l,O as u,P as d,c as f,f as p,g as m,h,j as g,k as _,l as v,m as y,n as b,p as x,s as S,t as C,w}from"./loopApi-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-WVPuW976.js","assets/jsx-runtime-BseJUIpC.js","assets/preload-helper--VCqDT5m.js","assets/useRouter-DsjH8G0p.js","assets/loopApi-C_Dtw-nL.js","assets/SignIn-9vsaKv_p.js","assets/ui-Gb1413-F.js","assets/routes-DsdcURfk.js","assets/actionUi-DDDfD0WX.js","assets/t._teamId-BdVLnwih.js","assets/t._teamId-C9uEyAh_.js","assets/loops._loopId-6JlPOCsY.js","assets/notifyFns-CF12Yboc.js","assets/Modal-B3xpEtcf.js","assets/lifecycleUi-CMFw5Nlj.js","assets/artifactView-BV-yQVrj.js","assets/invite._token-5zhVSA26.js","assets/invite._token-C3t4JfAY.js","assets/loops._loopId_.runs._runId-wFUMHN9w.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,r as t,s as n,t as r}from"./jsx-runtime-BseJUIpC.js";import{A as i,D as a,F as o,I as s,M as c,N as l,O as u,P as d,c as f,f as p,g as m,h,j as g,k as _,l as v,m as y,n as b,p as x,s as S,t as C,w}from"./loopApi-C_Dtw-nL.js";import{A as ee,B as T,C as E,D,E as te,F as ne,G as re,H as ie,I as ae,J as oe,K as O,L as k,M as se,N as ce,O as le,P as ue,R as A,S as j,T as de,U as fe,V as pe,W as me,Y as he,_ as ge,a as _e,b as ve,d as ye,g as be,h as xe,i as Se,j as Ce,k as we,l as Te,m as M,n as Ee,o as De,p as Oe,q as ke,r as Ae,t as je,u as Me,v as Ne,w as Pe,x as Fe,y as Ie,z as Le}from"./preload-helper--VCqDT5m.js";import{n as Re,t as ze}from"./useRouter-DsjH8G0p.js";import{n as Be,r as Ve,t as He}from"./Modal-B3xpEtcf.js";import{a as Ue,c as We,i as Ge,l as Ke,n as qe,o as Je,r as Ye,s as Xe,t as Ze,u as Qe}from"./notifyFns-CF12Yboc.js";import{A as $e,O as et,S as tt,b as nt,c as rt,f as it,l as at,m as ot,o as st,p as ct,r as lt,t as ut,u as dt,v as ft,y as pt}from"./ui-Gb1413-F.js";import{r as mt}from"./lifecycleUi-CMFw5Nlj.js";var ht=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}var S=!1,C=-1,w=5,ee=-1;function T(){return g?!0:!(e.unstable_now()-ee<w)}function E(){if(g=!1,S){var t=e.unstable_now();ee=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&T());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(E)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,ne=te.port2;te.port1.onmessage=E,D=function(){ne.postMessage(null)}}else D=function(){_(E,0)};function re(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),gt=t(((e,t)=>{t.exports=ht()})),_t=t((t=>{var n=gt(),r=e(),i=s();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 c(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 l(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 u(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 d(e){if(c(e)!==e)throw Error(a(188))}function f(e){var t=e.alternate;if(!t){if(t=c(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 d(i),e;if(o===r)return d(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)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`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),w=Symbol.for(`react.suspense`),ee=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),te=Symbol.for(`react.memo_cache_sentinel`),ne=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var ie=Symbol.for(`react.client.reference`);function ae(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case b:return`Profiler`;case y:return`StrictMode`;case w:return`Suspense`;case ee:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case _:return`Portal`;case S:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case C:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return t=e.displayName||null,t===null?ae(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}var oe=Array.isArray,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ce=[],le=-1;function ue(e){return{current:e}}function A(e){0>le||(e.current=ce[le],ce[le]=null,le--)}function j(e,t){le++,ce[le]=e.current,e.current=t}var de=ue(null),fe=ue(null),pe=ue(null),me=ue(null);function he(e,t){switch(j(pe,t),j(fe,e),j(de,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}}A(de),j(de,e)}function ge(){A(de),A(fe),A(pe)}function _e(e){e.memoizedState!==null&&j(me,e);var t=de.current,n=Hd(t,e.type);t!==n&&(j(fe,e),j(de,n))}function ve(e){fe.current===e&&(A(de),A(fe)),me.current===e&&(A(me),Qf._currentValue=se)}var ye,be;function xe(e){if(ye===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ye=t&&t[1]||``,be=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+ye+e+be}var Se=!1;function Ce(e,t){if(!e||Se)return``;Se=!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(`
|
|
@@ -7,6 +7,6 @@ import{n as e,r as t,s as n,t as r}from"./jsx-runtime-BseJUIpC.js";import{A as i
|
|
|
7
7
|
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?xe(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return xe(e.type);case 16:return xe(`Lazy`);case 13:return e.child!==t&&t!==null?xe(`Suspense Fallback`):xe(`Suspense`);case 19:return xe(`SuspenseList`);case 0:case 15:return Ce(e.type,!1);case 11:return Ce(e.type.render,!1);case 1:return Ce(e.type,!0);case 31:return xe(`Activity`);default:return``}}function Te(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
8
|
Error generating stack: `+e.message+`
|
|
9
9
|
`+e.stack}}var M=Object.prototype.hasOwnProperty,Ee=n.unstable_scheduleCallback,De=n.unstable_cancelCallback,Oe=n.unstable_shouldYield,ke=n.unstable_requestPaint,Ae=n.unstable_now,je=n.unstable_getCurrentPriorityLevel,Me=n.unstable_ImmediatePriority,Ne=n.unstable_UserBlockingPriority,Pe=n.unstable_NormalPriority,Fe=n.unstable_LowPriority,Ie=n.unstable_IdlePriority,Le=n.log,Re=n.unstable_setDisableYieldValue,ze=null,Be=null;function Ve(e){if(typeof Le==`function`&&Re(e),Be&&typeof Be.setStrictMode==`function`)try{Be.setStrictMode(ze,e)}catch{}}var He=Math.clz32?Math.clz32:Ge,Ue=Math.log,We=Math.LN2;function Ge(e){return e>>>=0,e===0?32:31-(Ue(e)/We|0)|0}var Ke=256,qe=262144,Je=4194304;function Ye(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ye(n))):i=Ye(o):i=Ye(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ye(n))):i=Ye(o)):i=Ye(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $e(){var e=Je;return Je<<=1,!(Je&62914560)&&(Je=4194304),e}function et(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-He(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&rt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function rt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-He(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function it(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-He(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function at(e,t){var n=t&-t;return n=n&42?1:ot(n),(n&(e.suspendedLanes|t))===0?n:0}function ot(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function st(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ct(){var e=k.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function lt(e,t){var n=k.p;try{return k.p=e,t()}finally{k.p=n}}var ut=Math.random().toString(36).slice(2),dt=`__reactFiber$`+ut,ft=`__reactProps$`+ut,pt=`__reactContainer$`+ut,mt=`__reactEvents$`+ut,ht=`__reactListeners$`+ut,_t=`__reactHandles$`+ut,vt=`__reactResources$`+ut,yt=`__reactMarker$`+ut;function bt(e){delete e[dt],delete e[ft],delete e[mt],delete e[ht],delete e[_t]}function xt(e){var t=e[dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pt]||n[dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[dt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function St(e){if(e=e[dt]||e[pt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ct(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function wt(e){var t=e[vt];return t||=e[vt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function N(e){e[yt]=!0}var Tt=new Set,Et={};function Dt(e,t){Ot(e,t),Ot(e+`Capture`,t)}function Ot(e,t){for(Et[e]=t,e=0;e<t.length;e++)Tt.add(t[e])}var kt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),At={},jt={};function Mt(e){return M.call(jt,e)?!0:M.call(At,e)?!1:kt.test(e)?jt[e]=!0:(At[e]=!0,!1)}function Nt(e,t,n){if(Mt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Pt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ft(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function It(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Lt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Rt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zt(e){if(!e._valueTracker){var t=Lt(e)?`checked`:`value`;e._valueTracker=Rt(e,t,``+e[t])}}function Bt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Lt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Vt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ht=/[\n"\\]/g;function Ut(e){return e.replace(Ht,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Wt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+It(t)):e.value!==``+It(t)&&(e.value=``+It(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Kt(e,o,It(n)):Kt(e,o,It(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+It(s):e.removeAttribute(`name`)}function Gt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){zt(e);return}n=n==null?``:``+It(n),t=t==null?n:``+It(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),zt(e)}function Kt(e,t,n){t===`number`&&Vt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function qt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+It(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Jt(e,t,n){if(t!=null&&(t=``+It(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+It(n)}function Yt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(oe(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=It(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),zt(e)}function Xt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Qt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function $t(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Qt(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Qt(e,o,t[o])}function en(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var tn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),nn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function rn(e){return nn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function an(){}var on=null;function sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cn=null,ln=null;function un(e){var t=St(e);if(t&&(e=t.stateNode)){var n=e[ft]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Wt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Ut(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[ft]||null;if(!i)throw Error(a(90));Wt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Bt(r)}break a;case`textarea`:Jt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&qt(e,!!n.multiple,t,!1)}}}var dn=!1;function fn(e,t,n){if(dn)return e(t,n);dn=!0;try{return e(t)}finally{if(dn=!1,(cn!==null||ln!==null)&&(bu(),cn&&(t=cn,e=ln,ln=cn=null,un(t),e)))for(t=0;t<e.length;t++)un(e[t])}}function pn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ft]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var mn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),hn=!1;if(mn)try{var gn={};Object.defineProperty(gn,"passive",{get:function(){hn=!0}}),window.addEventListener(`test`,gn,gn),window.removeEventListener(`test`,gn,gn)}catch{hn=!1}var _n=null,vn=null,yn=null;function bn(){if(yn)return yn;var e,t=vn,n=t.length,r,i=`value`in _n?_n.value:_n.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return yn=i.slice(e,1<r?1-r:void 0)}function xn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Sn(){return!0}function Cn(){return!1}function wn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Sn:Cn,this.isPropagationStopped=Cn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Sn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Sn)},persist:function(){},isPersistent:Sn}),t}var Tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},En=wn(Tn),Dn=m({},Tn,{view:0,detail:0}),On=wn(Dn),kn,An,jn,Mn=m({},Dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Un,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==jn&&(jn&&e.type===`mousemove`?(kn=e.screenX-jn.screenX,An=e.screenY-jn.screenY):An=kn=0,jn=e),kn)},movementY:function(e){return`movementY`in e?e.movementY:An}}),Nn=wn(Mn),Pn=wn(m({},Mn,{dataTransfer:0})),Fn=wn(m({},Dn,{relatedTarget:0})),In=wn(m({},Tn,{animationName:0,elapsedTime:0,pseudoElement:0})),Ln=wn(m({},Tn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Rn=wn(m({},Tn,{data:0})),zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Bn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Vn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Hn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vn[e])?!!t[e]:!1}function Un(){return Hn}var Wn=wn(m({},Dn,{key:function(e){if(e.key){var t=zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=xn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Bn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Un,charCode:function(e){return e.type===`keypress`?xn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?xn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Gn=wn(m({},Mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),P=wn(m({},Dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Un})),F=wn(m({},Tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Kn=wn(m({},Mn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),qn=wn(m({},Tn,{newState:0,oldState:0})),Jn=[9,13,27,32],Yn=mn&&`CompositionEvent`in window,Xn=null;mn&&`documentMode`in document&&(Xn=document.documentMode);var Zn=mn&&`TextEvent`in window&&!Xn,I=mn&&(!Yn||Xn&&8<Xn&&11>=Xn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return Jn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Yn&&er(e,t)?(e=bn(),yn=vn=_n=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return I&&t.locale!==`ko`?null:t.data;default:return null}}var ar={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ar[e.type]:t===`textarea`}function sr(e,t,n,r){cn?ln?ln.push(r):ln=[r]:cn=r,t=Ed(t,`onChange`),0<t.length&&(n=new En(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var cr=null,lr=null;function ur(e){yd(e,0)}function dr(e){if(Bt(Ct(e)))return e}function fr(e,t){if(e===`change`)return t}var pr=!1;if(mn){var mr;if(mn){var hr=`oninput`in document;if(!hr){var gr=document.createElement(`div`);gr.setAttribute(`oninput`,`return;`),hr=typeof gr.oninput==`function`}mr=hr}else mr=!1;pr=mr&&(!document.documentMode||9<document.documentMode)}function _r(){cr&&(cr.detachEvent(`onpropertychange`,vr),lr=cr=null)}function vr(e){if(e.propertyName===`value`&&dr(lr)){var t=[];sr(t,lr,e,sn(e)),fn(ur,t)}}function yr(e,t,n){e===`focusin`?(_r(),cr=t,lr=n,cr.attachEvent(`onpropertychange`,vr)):e===`focusout`&&_r()}function br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return dr(lr)}function xr(e,t){if(e===`click`)return dr(t)}function Sr(e,t){if(e===`input`||e===`change`)return dr(t)}function Cr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var wr=typeof Object.is==`function`?Object.is:Cr;function Tr(e,t){if(wr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!M.call(t,i)||!wr(e[i],t[i]))return!1}return!0}function Er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dr(e,t){var n=Er(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=mn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Vt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Ed(Nr,`onSelect`),0<r.length&&(t=new En(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Mr)))}function Lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Rr={animationend:Lr(`Animation`,`AnimationEnd`),animationiteration:Lr(`Animation`,`AnimationIteration`),animationstart:Lr(`Animation`,`AnimationStart`),transitionrun:Lr(`Transition`,`TransitionRun`),transitionstart:Lr(`Transition`,`TransitionStart`),transitioncancel:Lr(`Transition`,`TransitionCancel`),transitionend:Lr(`Transition`,`TransitionEnd`)},zr={},Br={};mn&&(Br=document.createElement(`div`).style,`AnimationEvent`in window||(delete Rr.animationend.animation,delete Rr.animationiteration.animation,delete Rr.animationstart.animation),`TransitionEvent`in window||delete Rr.transitionend.transition);function Vr(e){if(zr[e])return zr[e];if(!Rr[e])return e;var t=Rr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Br)return zr[e]=t[n];return e}var Hr=Vr(`animationend`),Ur=Vr(`animationiteration`),Wr=Vr(`animationstart`),Gr=Vr(`transitionrun`),Kr=Vr(`transitionstart`),qr=Vr(`transitioncancel`),Jr=Vr(`transitionend`),Yr=new Map,Xr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Xr.push(`scrollEnd`);function Zr(e,t){Yr.set(e,t),Dt(t,[e])}var Qr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},$r=[],ei=0,ti=0;function ni(){for(var e=ei,t=ti=ei=0;t<e;){var n=$r[t];$r[t++]=null;var r=$r[t];$r[t++]=null;var i=$r[t];$r[t++]=null;var a=$r[t];if($r[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&oi(n,i,a)}}function ri(e,t,n,r){$r[ei++]=e,$r[ei++]=t,$r[ei++]=n,$r[ei++]=r,ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ii(e,t,n,r){return ri(e,t,n,r),si(e)}function ai(e,t){return ri(e,null,null,t),si(e)}function oi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-He(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function si(e){if(50<du)throw du=0,fu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ci={};function li(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ui(e,t,n,r){return new li(e,t,n,r)}function di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fi(e,t){var n=e.alternate;return n===null?(n=ui(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function pi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function mi(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)di(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,de.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=ui(31,n,t,i),e.elementType=D,e.lanes=o,e;case v:return hi(n.children,i,o,t);case y:s=8,i|=24;break;case b:return e=ui(12,n,t,i|2),e.elementType=b,e.lanes=o,e;case w:return e=ui(13,n,t,i),e.elementType=w,e.lanes=o,e;case ee:return e=ui(19,n,t,i),e.elementType=ee,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case S:s=10;break a;case x:s=9;break a;case C:s=11;break a;case T:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=ui(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function hi(e,t,n,r){return e=ui(7,e,r,t),e.lanes=n,e}function gi(e,t,n){return e=ui(6,e,null,t),e.lanes=n,e}function _i(e){var t=ui(18,null,null,0);return t.stateNode=e,t}function vi(e,t,n){return t=ui(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var yi=new WeakMap;function bi(e,t){if(typeof e==`object`&&e){var n=yi.get(e);return n===void 0?(t={value:e,source:t,stack:Te(t)},yi.set(e,t),t):n}return{value:e,source:t,stack:Te(t)}}var xi=[],Si=0,Ci=null,wi=0,Ti=[],Ei=0,Di=null,Oi=1,ki=``;function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ci,Ci=e,wi=t}function ji(e,t,n){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Di=e;var r=Oi;e=ki;var i=32-He(r)-1;r&=~(1<<i),n+=1;var a=32-He(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Oi=1<<32-He(t)+i|n<<i|r,ki=a+e}else Oi=1<<a|n<<i|r,ki=e}function Mi(e){e.return!==null&&(Ai(e,1),ji(e,1,0))}function Ni(e){for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null;for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,ki=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null}function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Oi=t.id,ki=t.overflow,Di=e}var Fi=null,L=null,R=!1,Ii=null,Li=!1,Ri=Error(a(519));function zi(e){throw Gi(bi(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ri}function Bi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[dt]=e,t[ft]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Gt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Yt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=an),t=!0):t=!1,t||zi(e,!0)}function Vi(e){for(Fi=e.return;Fi;)switch(Fi.tag){case 5:case 31:case 13:Li=!1;return;case 27:case 3:Li=!0;return;default:Fi=Fi.return}}function Hi(e){if(e!==Fi)return!1;if(!R)return Vi(e),R=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&L&&zi(e),Vi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));L=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));L=uf(e)}else t===27?(t=L,Zd(e.type)?(e=lf,lf=null,L=e):L=t):L=Fi?cf(e.stateNode.nextSibling):null;return!0}function Ui(){L=Fi=null,R=!1}function Wi(){var e=Ii;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Ii=null),e}function Gi(e){Ii===null?Ii=[e]:Ii.push(e)}var Ki=ue(null),qi=null,Ji=null;function Yi(e,t,n){j(Ki,t._currentValue),t._currentValue=n}function Xi(e){e._currentValue=Ki.current,A(Ki)}function Zi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Qi(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Zi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Zi(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function $i(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;wr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===me.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&Qi(t,e,n,r),t.flags|=262144}function ea(e){for(e=e.firstContext;e!==null;){if(!wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ta(e){qi=e,Ji=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function na(e){return ia(qi,e)}function ra(e,t){return qi===null&&ta(e),ia(e,t)}function ia(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ji===null){if(e===null)throw Error(a(308));Ji=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ji=Ji.next=t;return n}var aa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},oa=n.unstable_scheduleCallback,sa=n.unstable_NormalPriority,z={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ca(){return{controller:new aa,data:new Map,refCount:0}}function la(e){e.refCount--,e.refCount===0&&oa(sa,function(){e.controller.abort()})}var ua=null,da=0,fa=0,pa=null;function ma(e,t){if(ua===null){var n=ua=[];da=0,fa=dd(),pa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return da++,t.then(ha,ha),t}function ha(){if(--da===0&&ua!==null){pa!==null&&(pa.status=`fulfilled`);var e=ua;ua=null,fa=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ga(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var _a=O.S;O.S=function(e,t){eu=Ae(),typeof t==`object`&&t&&typeof t.then==`function`&&ma(e,t),_a!==null&&_a(e,t)};var va=ue(null);function ya(){var e=va.current;return e===null?K.pooledCache:e}function ba(e,t){t===null?j(va,va.current):j(va,t.pool)}function xa(){var e=ya();return e===null?null:{parent:z._currentValue,pool:e}}var Sa=Error(a(460)),Ca=Error(a(474)),wa=Error(a(542)),Ta={then:function(){}};function Ea(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Da(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(an,an),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e;default:if(typeof t.status==`string`)t.then(an,an);else{if(e=K,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e}throw ka=t,Sa}}function Oa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ka=e,Sa):e}}var ka=null;function Aa(){if(ka===null)throw Error(a(459));var e=ka;return ka=null,e}function ja(e){if(e===Sa||e===wa)throw Error(a(483))}var Ma=null,Na=0;function Pa(e){var t=Na;return Na+=1,Ma===null&&(Ma=[]),Da(Ma,e,t)}function Fa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ia(e,t){throw t.$$typeof===h?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function La(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=gi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===v?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===E&&Oa(a)===t.type)?(t=i(t,n.props),Fa(t,n),t.return=e,t):(t=mi(n.type,n.key,n.props,null,e.mode,r),Fa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=vi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=hi(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=gi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=mi(t.type,t.key,t.props,null,e.mode,n),Fa(n,t),n.return=e,n;case _:return t=vi(t,e.mode,n),t.return=e,t;case E:return t=Oa(t),f(e,t,n)}if(oe(t)||re(t))return t=hi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Pa(t),n);if(t.$$typeof===S)return f(e,ra(e,t),n);Ia(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case g:return n.key===i?l(e,t,n,r):null;case _:return n.key===i?u(e,t,n,r):null;case E:return n=Oa(n),p(e,t,n,r)}if(oe(n)||re(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Pa(n),r);if(n.$$typeof===S)return p(e,t,ra(e,n),r);Ia(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case _:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=Oa(r),m(e,t,n,r,i)}if(oe(r)||re(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Pa(r),i);if(r.$$typeof===S)return m(e,t,n,ra(t,r),i);Ia(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),R&&Ai(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return R&&Ai(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),R&&Ai(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),R&&Ai(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return R&&Ai(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),R&&Ai(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===v&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===v){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Oa(l)===r.type){n(e,r.sibling),c=i(r,o.props),Fa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===v?(c=hi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=mi(o.type,o.key,o.props,null,e.mode,c),Fa(c,o),c.return=e,e=c)}return s(e);case _:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=vi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Oa(o),b(e,r,o,c)}if(oe(o))return h(e,r,o,c);if(re(o)){if(l=re(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Pa(o),c);if(o.$$typeof===S)return b(e,r,ra(e,o),c);Ia(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=gi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Na=0;var i=b(e,t,n,r);return Ma=null,i}catch(t){if(t===Sa||t===wa)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ra=La(!0),za=La(!1),Ba=!1;function Va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ha(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,G&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function Ga(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}function Ka(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var qa=!1;function Ja(){if(qa){var e=pa;if(e!==null)throw e}}function Ya(e,t,n,r){qa=!1;var i=e.updateQueue;Ba=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(J&f)===f:(r&f)===f){f!==0&&f===fa&&(qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Ba=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Xa(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Xa(n[e],t)}var Qa=ue(null),$a=ue(0);function eo(e,t){e=Wl,j($a,e),j(Qa,t),Wl=e|t.baseLanes}function to(){j($a,Wl),j(Qa,Qa.current)}function no(){Wl=$a.current,A(Qa),A($a)}var ro=ue(null),io=null;function ao(e){var t=e.alternate;j(uo,uo.current&1),j(ro,e),io===null&&(t===null||Qa.current!==null||t.memoizedState!==null)&&(io=e)}function oo(e){j(uo,uo.current),j(ro,e),io===null&&(io=e)}function so(e){e.tag===22?(j(uo,uo.current),j(ro,e),io===null&&(io=e)):co(e)}function co(){j(uo,uo.current),j(ro,ro.current)}function lo(e){A(ro),io===e&&(io=null),A(uo)}var uo=ue(0);function fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var po=0,B=null,V=null,mo=null,ho=!1,go=!1,_o=!1,vo=0,yo=0,bo=null,xo=0;function H(){throw Error(a(321))}function So(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wr(e[n],t[n]))return!1;return!0}function Co(e,t,n,r,i,a){return po=a,B=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Bs:Vs,_o=!1,a=n(r,i),_o=!1,go&&(a=To(t,n,r,i)),wo(e),a}function wo(e){O.H=zs;var t=V!==null&&V.next!==null;if(po=0,mo=V=B=null,ho=!1,yo=0,bo=null,t)throw Error(a(300));e===null||ic||(e=e.dependencies,e!==null&&ea(e)&&(ic=!0))}function To(e,t,n,r){B=e;var i=0;do{if(go&&(bo=null),yo=0,go=!1,25<=i)throw Error(a(301));if(i+=1,mo=V=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}O.H=Hs,o=t(n,r)}while(go);return o}function Eo(){var e=O.H,t=e.useState()[0];return t=typeof t.then==`function`?No(t):t,e=e.useState()[0],(V===null?null:V.memoizedState)!==e&&(B.flags|=1024),t}function Do(){var e=vo!==0;return vo=0,e}function Oo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ko(e){if(ho){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ho=!1}po=0,mo=V=B=null,go=!1,yo=vo=0,bo=null}function Ao(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mo===null?B.memoizedState=mo=e:mo=mo.next=e,mo}function jo(){if(V===null){var e=B.alternate;e=e===null?null:e.memoizedState}else e=V.next;var t=mo===null?B.memoizedState:mo.next;if(t!==null)mo=t,V=e;else{if(e===null)throw B.alternate===null?Error(a(467)):Error(a(310));V=e,e={memoizedState:V.memoizedState,baseState:V.baseState,baseQueue:V.baseQueue,queue:V.queue,next:null},mo===null?B.memoizedState=mo=e:mo=mo.next=e}return mo}function Mo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function No(e){var t=yo;return yo+=1,bo===null&&(bo=[]),e=Da(bo,e,t),t=B,(mo===null?t.memoizedState:mo.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Bs:Vs),e}function Po(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return No(e);if(e.$$typeof===S)return na(e)}throw Error(a(438,String(e)))}function Fo(e){var t=null,n=B.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=B.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Mo(),B.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=te;return t.index++,n}function Io(e,t){return typeof t==`function`?t(e):t}function Lo(e){return Ro(jo(),V,e)}function Ro(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(po&f)===f:(J&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===fa&&(d=!0);else if((po&p)===p){u=u.next,p===fa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,B.lanes|=p,Gl|=p;f=u.action,_o&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,B.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!wr(o,e.memoizedState)&&(ic=!0,d&&(n=pa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function zo(e){var t=jo(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);wr(o,t.memoizedState)||(ic=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bo(e,t,n){var r=B,i=jo(),o=R;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!wr((V||i).memoizedState,n);if(s&&(i.memoizedState=n,ic=!0),i=i.queue,ds(Uo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||mo!==null&&mo.memoizedState.tag&1){if(r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,i,n,t),null),K===null)throw Error(a(349));o||po&127||Vo(r,t,n)}return n}function Vo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=B.updateQueue,t===null?(t=Mo(),B.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ho(e,t,n,r){t.value=n,t.getSnapshot=r,Wo(t)&&Go(e)}function Uo(e,t,n){return n(function(){Wo(t)&&Go(e)})}function Wo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wr(e,n)}catch{return!0}}function Go(e){var t=ai(e,2);t!==null&&hu(t,e,2)}function Ko(e){var t=Ao();if(typeof e==`function`){var n=e;if(e=n(),_o){Ve(!0);try{n()}finally{Ve(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:e},t}function qo(e,t,n,r){return e.baseState=n,Ro(e,V,typeof r==`function`?r:Io)}function Jo(e,t,n,r,i){if(Is(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};O.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Yo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Yo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=O.T,o={};O.T=o;try{var s=n(i,r),c=O.S;c!==null&&c(o,s),Xo(e,t,s)}catch(n){Qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),O.T=a}}else try{a=n(i,r),Xo(e,t,a)}catch(n){Qo(e,t,n)}}function Xo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Zo(e,t,n)},function(n){return Qo(e,t,n)}):Zo(e,t,n)}function Zo(e,t,n){t.status=`fulfilled`,t.value=n,$o(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Yo(e,n)))}function Qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,$o(t),t=t.next;while(t!==r)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function es(e,t){return t}function ts(e,t){if(R){var n=K.formState;if(n!==null){a:{var r=B;if(R){if(L){b:{for(var i=L,a=Li;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){L=cf(i.nextSibling),r=i.data===`F!`;break a}}zi(r)}r=!1}r&&(t=n[0])}}return n=Ao(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:es,lastRenderedState:t},n.queue=r,n=Ns.bind(null,B,r),r.dispatch=n,r=Ko(!1),a=Fs.bind(null,B,!1,r.queue),r=Ao(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Jo.bind(null,B,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ns(e){return rs(jo(),V,e)}function rs(e,t,n){if(t=Ro(e,t,es)[0],e=Lo(Io)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=No(t)}catch(e){throw e===Sa?wa:e}else r=t;t=jo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(B.flags|=2048,os(9,{destroy:void 0},is.bind(null,i,n),null)),[r,a,e]}function is(e,t){e.action=t}function as(e){var t=jo(),n=V;if(n!==null)return rs(t,n,e);jo(),t=t.memoizedState,n=jo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function os(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=B.updateQueue,t===null&&(t=Mo(),B.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ss(){return jo().memoizedState}function cs(e,t,n,r){var i=Ao();B.flags|=e,i.memoizedState=os(1|t,{destroy:void 0},n,r===void 0?null:r)}function ls(e,t,n,r){var i=jo();r=r===void 0?null:r;var a=i.memoizedState.inst;V!==null&&r!==null&&So(r,V.memoizedState.deps)?i.memoizedState=os(t,a,n,r):(B.flags|=e,i.memoizedState=os(1|t,a,n,r))}function us(e,t){cs(8390656,8,e,t)}function ds(e,t){ls(2048,8,e,t)}function fs(e){B.flags|=4;var t=B.updateQueue;if(t===null)t=Mo(),B.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ps(e){var t=jo().memoizedState;return fs({ref:t,nextImpl:e}),function(){if(G&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function ms(e,t){return ls(4,2,e,t)}function hs(e,t){return ls(4,4,e,t)}function gs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _s(e,t,n){n=n==null?null:n.concat([e]),ls(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&So(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=jo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&So(t,r[1]))return r[0];if(r=e(),_o){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r}function xs(e,t,n){return n===void 0||po&1073741824&&!(J&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),B.lanes|=e,Gl|=e,n)}function Ss(e,t,n,r){return wr(n,t)?n:Qa.current===null?!(po&42)||po&1073741824&&!(J&261930)?(ic=!0,e.memoizedState=n):(e=mu(),B.lanes|=e,Gl|=e,t):(e=xs(e,n,r),wr(e,t)||(ic=!0),e)}function Cs(e,t,n,r,i){var a=k.p;k.p=a!==0&&8>a?a:8;var o=O.T,s={};O.T=s,Fs(e,!1,t,n);try{var c=i(),l=O.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,ga(c,r),pu(e)):Ps(e,t,r,pu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{k.p=a,o!==null&&s.types!==null&&(o.types=s.types),O.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Es(e).queue;Cs(e,i,t,se,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:se},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Io,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},pu())}function Os(){return na(Qf)}function ks(){return jo().memoizedState}function As(){return jo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ua(n);var r=Wa(t,e,n);r!==null&&(hu(r,t,n),Ga(r,t,n)),t={cache:ca()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=ii(e,t,n,r),n!==null&&(hu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,pu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),K===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return hu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(a(479))}else t=ii(e,n,r,2),t!==null&&hu(t,e,2)}function Is(e){var t=e.alternate;return e===B||t!==null&&t===B}function Ls(e,t){go=ho=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}var zs={readContext:na,use:Po,useCallback:H,useContext:H,useEffect:H,useImperativeHandle:H,useLayoutEffect:H,useInsertionEffect:H,useMemo:H,useReducer:H,useRef:H,useState:H,useDebugValue:H,useDeferredValue:H,useTransition:H,useSyncExternalStore:H,useId:H,useHostTransitionStatus:H,useFormState:H,useActionState:H,useOptimistic:H,useMemoCache:H,useCacheRefresh:H};zs.useEffectEvent=H;var Bs={readContext:na,use:Po,useCallback:function(e,t){return Ao().memoizedState=[e,t===void 0?null:t],e},useContext:na,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=Ao();t=t===void 0?null:t;var r=e();if(_o){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ao();if(n!==void 0){var i=n(t);if(_o){Ve(!0);try{n(t)}finally{Ve(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,B,e),[r.memoizedState,e]},useRef:function(e){var t=Ao();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,B,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(Ao(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,B,e.queue,!0,!1),Ao().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=B,i=Ao();if(R){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),K===null)throw Error(a(349));J&127||Vo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=Ao(),t=K.identifierPrefix;if(R){var n=ki,r=Oi;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=vo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=xo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:ts,useActionState:ts,useOptimistic:function(e){var t=Ao();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,B,!0,n),n.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Ao().memoizedState=js.bind(null,B)},useEffectEvent:function(e){var t=Ao(),n={impl:e};return t.memoizedState=n,function(){if(G&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Vs={readContext:na,use:Po,useCallback:ys,useContext:na,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Lo,useRef:ss,useState:function(){return Lo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){return Ss(jo(),V.memoizedState,e,t)},useTransition:function(){var e=Lo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){return qo(jo(),V,e,t)},useMemoCache:Fo,useCacheRefresh:As};Vs.useEffectEvent=ps;var Hs={readContext:na,use:Po,useCallback:ys,useContext:na,useEffect:ds,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:zo,useRef:ss,useState:function(){return zo(Io)},useDebugValue:vs,useDeferredValue:function(e,t){var n=jo();return V===null?xs(n,e,t):Ss(n,V.memoizedState,e,t)},useTransition:function(){var e=zo(Io)[0],t=jo().memoizedState;return[typeof e==`boolean`?e:No(e),t]},useSyncExternalStore:Bo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){var n=jo();return V===null?(n.baseState=e,[e,n.queue.dispatch]):qo(n,V,e,t)},useMemoCache:Fo,useCacheRefresh:As};Hs.useEffectEvent=ps;function Us(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ua(r);i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(hu(t,e,r),Ga(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ua(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(hu(t,e,r),Ga(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ua(n);r.tag=2,t!=null&&(r.callback=t),t=Wa(e,r,n),t!==null&&(hu(t,e,n),Ga(t,e,n))}};function Gs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Tr(n,r)||!Tr(i,a):!0}function Ks(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ws.enqueueReplaceState(t,t.state,null)}function qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Js(e){Qr(e)}function Ys(e){console.error(e)}function Xs(e){Qr(e)}function Zs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function $s(e,t,n){return n=Ua(n),n.tag=3,n.payload={element:null},n.callback=function(){Zs(e,t)},n}function ec(e){return e=Ua(e),e.tag=3,e}function tc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Qs(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function nc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&$i(t,n,i,!0),n=ro.current,n!==null){switch(n.tag){case 31:case 13:return io===null?Du():n.alternate===null&&X===0&&(X=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Ta?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,i)),!1;case 22:return n.flags|=65536,r===Ta?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,i)),!1}throw Error(a(435,n.tag))}return Gu(e,r,i),Du(),!1}if(R)return t=ro.current,t===null?(r!==Ri&&(t=Error(a(423),{cause:r}),Gi(bi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=bi(r,n),i=$s(e.stateNode,r,i),Ka(e,i),X!==4&&(X=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ri&&(e=Error(a(422),{cause:r}),Gi(bi(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=bi(o,n),Xl===null?Xl=[o]:Xl.push(o),X!==4&&(X=2),t===null)return!0;r=bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=$s(n.stateNode,r,e),Ka(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=ec(i),tc(i,e,n,r),Ka(n,i),!1}n=n.return}while(n!==null);return!1}var rc=Error(a(461)),ic=!1;function ac(e,t,n,r){t.child=e===null?za(t,null,n,r):Ra(t,e.child,n,r)}function oc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ta(t),r=Co(e,t,n,o,a,i),s=Do(),e!==null&&!ic?(Oo(e,t,i),Ac(e,t,i)):(R&&s&&Mi(t),t.flags|=1,ac(e,t,r,i),t.child)}function sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!di(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,cc(e,t,a,r,i)):(e=mi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!jc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Tr:n,n(o,r)&&e.ref===t.ref)return Ac(e,t,i)}return t.flags|=1,e=fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Tr(a,r)&&e.ref===t.ref)if(ic=!1,t.pendingProps=r=a,jc(e,i))e.flags&131072&&(ic=!0);else return t.lanes=e.lanes,Ac(e,t,i)}return gc(e,t,n,r,i)}function lc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return dc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ba(t,a===null?null:a.cachePool),a===null?to():eo(t,a),so(t);else return r=t.lanes=536870912,dc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ba(t,null),to(),co(t)):(ba(t,a.cachePool),eo(t,a),co(t),t.memoizedState=null);return ac(e,t,i,n),t.child}function uc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dc(e,t,n,r,i){var a=ya();return a=a===null?null:{parent:z._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ba(t,null),to(),so(t),e!==null&&$i(e,t,r,!0),t.childLanes=i,null}function fc(e,t){return t=Tc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pc(e,t,n){return Ra(t,e.child,null,n),e=fc(t,t.pendingProps),e.flags|=2,lo(t),t.memoizedState=null,e}function mc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(R){if(r.mode===`hidden`)return e=fc(t,r),t.lanes=536870912,uc(null,e);if(oo(t),(e=L)?(e=rf(e,Li),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,L=null)):e=null,e===null)throw zi(t);return t.lanes=536870912,null}return fc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(oo(t),i)if(t.flags&256)t.flags&=-257,t=pc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(ic||$i(e,t,n,!1),i=(n&e.childLanes)!==0,ic||i){if(r=K,r!==null&&(s=at(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ai(e,s),hu(r,e,s),rc;Du(),t=pc(e,t,n)}else e=o.treeContext,L=cf(s.nextSibling),Fi=t,R=!0,Ii=null,Li=!1,e!==null&&Pi(t,e),t=fc(t,r),t.flags|=4096;return t}return e=fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function gc(e,t,n,r,i){return ta(t),n=Co(e,t,n,r,void 0,i),r=Do(),e!==null&&!ic?(Oo(e,t,i),Ac(e,t,i)):(R&&r&&Mi(t),t.flags|=1,ac(e,t,n,i),t.child)}function _c(e,t,n,r,i,a){return ta(t),t.updateQueue=null,n=To(t,r,n,i),wo(e),r=Do(),e!==null&&!ic?(Oo(e,t,a),Ac(e,t,a)):(R&&r&&Mi(t),t.flags|=1,ac(e,t,n,a),t.child)}function vc(e,t,n,r,i){if(ta(t),t.stateNode===null){var a=ci,o=n.contextType;typeof o==`object`&&o&&(a=na(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ws,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Va(t),o=n.contextType,a.context=typeof o==`object`&&o?na(o):ci,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Us(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ws.enqueueReplaceState(a,a.state,null),Ya(t,r,a,i),Ja(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ci,typeof u==`object`&&u&&(o=na(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ks(t,a,r,o),Ba=!1;var f=t.memoizedState;a.state=f,Ya(t,r,a,i),Ja(),l=t.memoizedState,s||f!==l||Ba?(typeof d==`function`&&(Us(t,n,d,r),l=t.memoizedState),(c=Ba||Gs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ha(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ci,typeof l==`object`&&l&&(c=na(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ks(t,a,r,c),Ba=!1,f=t.memoizedState,a.state=f,Ya(t,r,a,i),Ja();var p=t.memoizedState;o!==d||f!==p||Ba||e!==null&&e.dependencies!==null&&ea(e.dependencies)?(typeof s==`function`&&(Us(t,n,s,r),p=t.memoizedState),(u=Ba||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ea(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,hc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ra(t,e.child,null,i),t.child=Ra(t,null,n,i)):ac(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ac(e,t,i),e}function yc(e,t,n,r){return Ui(),t.flags|=256,ac(e,t,n,r),t.child}var bc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xc(e){return{baseLanes:e,cachePool:xa()}}function Sc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function Cc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(uo.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(R){if(i?ao(t):co(t),(e=L)?(e=rf(e,Li),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,L=null)):e=null,e===null)throw zi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(co(t),i=t.mode,c=Tc({mode:`hidden`,children:c},i),r=hi(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(null,r)):(ao(t),wc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ao(t),t.flags&=-257,t=Ec(e,t,n)):t.memoizedState===null?(co(t),c=r.fallback,i=t.mode,r=Tc({mode:`visible`,children:r.children},i),c=hi(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ra(t,e.child,null,n),r=t.child,r.memoizedState=xc(n),r.childLanes=Sc(e,s,n),t.memoizedState=bc,t=uc(null,r)):(co(t),t.child=e.child,t.flags|=128,t=null);else if(ao(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Gi({value:r,source:null,stack:null}),t=Ec(e,t,n)}else if(ic||$i(e,t,n,!1),s=(n&e.childLanes)!==0,ic||s){if(s=K,s!==null&&(r=at(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ai(e,r),hu(s,e,r),rc;af(c)||Du(),t=Ec(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,L=cf(c.nextSibling),Fi=t,R=!0,Ii=null,Li=!1,e!==null&&Pi(t,e),t=wc(t,r.children),t.flags|=4096);return t}return i?(co(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=fi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=hi(c,i,n,null),c.flags|=2):c=fi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,uc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=xc(n):(i=c.cachePool,i===null?i=xa():(l=z._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=Sc(e,s,n),t.memoizedState=bc,uc(e.child,r)):(ao(t),n=e.child,e=n.sibling,n=fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function wc(e,t){return t=Tc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Tc(e,t){return e=ui(22,e,null,t),e.lanes=0,e}function Ec(e,t,n){return Ra(t,e.child,null,n),e=wc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zi(e.return,t,n)}function Oc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function kc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=uo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,j(uo,o),ac(e,t,r,n),r=R?wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dc(e,n,t);else if(e.tag===19)Dc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&fo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Oc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Oc(t,!0,n,null,a,r);break;case`together`:Oc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ac(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if($i(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ea(e))):!0}function Mc(e,t,n){switch(t.tag){case 3:he(t,t.stateNode.containerInfo),Yi(t,z,e.memoizedState.cache),Ui();break;case 27:case 5:_e(t);break;case 4:he(t,t.stateNode.containerInfo);break;case 10:Yi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ao(t),e=Ac(e,t,n),e===null?null:e.sibling):Cc(e,t,n):(ao(t),t.flags|=128,null);ao(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=($i(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return kc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),j(uo,uo.current),r)break;return null;case 22:return t.lanes=0,lc(e,t,n,t.pendingProps);case 24:Yi(t,z,e.memoizedState.cache)}return Ac(e,t,n)}function Nc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ic=!0;else{if(!jc(e,n)&&!(t.flags&128))return ic=!1,Mc(e,t,n);ic=!!(e.flags&131072)}else ic=!1,R&&t.flags&1048576&&ji(t,wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Oa(t.elementType),t.type=e,typeof e==`function`)di(e)?(r=qs(e,r),t.tag=1,t=vc(null,t,e,r,n)):(t.tag=0,t=gc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===C){t.tag=11,t=oc(null,t,e,r,n);break a}else if(i===T){t.tag=14,t=sc(null,t,e,r,n);break a}}throw t=ae(e)||e,Error(a(306,t,``))}}return t;case 0:return gc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=qs(r,t.pendingProps),vc(e,t,r,i,n);case 3:a:{if(he(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Ha(e,t),Ya(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Yi(t,z,r),r!==o.cache&&Qi(t,[z],n,!0),Ja(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=yc(e,t,r,n);break a}else if(r!==i){i=bi(Error(a(424)),t),Gi(i),t=yc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(L=cf(e.firstChild),Fi=t,R=!0,Ii=null,Li=!0,n=za(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ui(),r===i){t=Ac(e,t,n);break a}ac(e,t,r,n)}t=t.child}return t;case 26:return hc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:R||(n=t.type,e=t.pendingProps,r=Bd(pe.current).createElement(n),r[dt]=t,r[ft]=e,Pd(r,n,e),N(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _e(t),e===null&&R&&(r=t.stateNode=ff(t.type,t.pendingProps,pe.current),Fi=t,Li=!0,i=L,Zd(t.type)?(lf=i,L=cf(r.firstChild)):L=i),ac(e,t,t.pendingProps.children,n),hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&R&&((i=r=L)&&(r=tf(r,t.type,t.pendingProps,Li),r===null?i=!1:(t.stateNode=r,Fi=t,L=cf(r.firstChild),Li=!1,i=!0)),i||zi(t)),_e(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(i,o)?r=null:s!==null&&Ud(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Co(e,t,Eo,null,null,n),Qf._currentValue=i),hc(e,t),ac(e,t,r,n),t.child;case 6:return e===null&&R&&((e=n=L)&&(n=nf(n,t.pendingProps,Li),n===null?e=!1:(t.stateNode=n,Fi=t,L=null,e=!0)),e||zi(t)),null;case 13:return Cc(e,t,n);case 4:return he(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ra(t,null,r,n):ac(e,t,r,n),t.child;case 11:return oc(e,t,t.type,t.pendingProps,n);case 7:return ac(e,t,t.pendingProps,n),t.child;case 8:return ac(e,t,t.pendingProps.children,n),t.child;case 12:return ac(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Yi(t,t.type,r.value),ac(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ta(t),i=na(i),r=r(i),t.flags|=1,ac(e,t,r,n),t.child;case 14:return sc(e,t,t.type,t.pendingProps,n);case 15:return cc(e,t,t.type,t.pendingProps,n);case 19:return kc(e,t,n);case 31:return mc(e,t,n);case 22:return lc(e,t,n,t.pendingProps);case 24:return ta(t),r=na(z),e===null?(i=ya(),i===null&&(i=K,o=ca(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Va(t),Yi(t,z,i)):((e.lanes&n)!==0&&(Ha(e,t),Ya(t,null,null,n),Ja()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Yi(t,z,r),r!==i.cache&&Qi(t,[z],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Yi(t,z,r))),ac(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Pc(e){e.flags|=4}function Fc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw ka=Ta,Ca}else e.flags&=-16777217}function Ic(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw ka=Ta,Ca}function Lc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:$e(),e.lanes|=t,Yl|=t)}function Rc(e,t){if(!R)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function U(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zc(e,t,n){var r=t.pendingProps;switch(Ni(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return U(t),null;case 1:return U(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Xi(z),ge(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?Pc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wi())),U(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Pc(t),o===null?(U(t),Fc(t,i,null,r,n)):(U(t),Ic(t,o))):o?o===e.memoizedState?(U(t),t.flags&=-16777217):(Pc(t),U(t),Ic(t,o)):(e=e.memoizedProps,e!==r&&Pc(t),U(t),Fc(t,i,e,r,n)),null;case 27:if(ve(t),n=pe.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return U(t),null}e=de.current,Hi(t)?Bi(t,e):(e=ff(i,r,n),t.stateNode=e,Pc(t))}return U(t),null;case 5:if(ve(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return U(t),null}if(o=de.current,Hi(t))Bi(t,o);else{var s=Bd(pe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[dt]=t,o[ft]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return U(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=pe.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Fi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[dt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||zi(t,!0)}else e=Bd(e).createTextNode(r),e[dt]=t,t.stateNode=e}return U(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Hi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[dt]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),e=!1}else n=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(lo(t),t):(lo(t),null);if(t.flags&128)throw Error(a(558))}return U(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Hi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[dt]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;U(t),i=!1}else i=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(lo(t),t):(lo(t),null)}return lo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),U(t),null);case 4:return ge(),e===null&&Sd(t.stateNode.containerInfo),U(t),null;case 10:return Xi(t.type),U(t),null;case 19:if(A(uo),r=t.memoizedState,r===null)return U(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Rc(r,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(e),o!==null){for(t.flags|=128,Rc(r,!1),e=o.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return j(uo,uo.current&1|2),R&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>tu&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304)}else{if(!i)if(e=fo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!R)return U(t),null}else 2*Ae()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(U(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=uo.current,j(uo,i?n&1|2:n&1),R&&Ai(t,r.treeForkCount),e);case 22:case 23:return lo(t),no(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(U(t),t.subtreeFlags&6&&(t.flags|=8192)):U(t),n=t.updateQueue,n!==null&&Lc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&A(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xi(z),U(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Bc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(z),ge(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(lo(t),t.alternate===null)throw Error(a(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return A(uo),null;case 4:return ge(),null;case 10:return Xi(t.type),null;case 22:case 23:return lo(t),no(),e!==null&&A(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xi(z),null;case 25:return null;default:return null}}function Vc(e,t){switch(Ni(t),t.tag){case 3:Xi(z),ge();break;case 26:case 27:case 5:ve(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&lo(t);break;case 13:lo(t);break;case 19:A(uo);break;case 10:Xi(t.type);break;case 22:case 23:lo(t),no(),e!==null&&A(va);break;case 24:Xi(z)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Za(t,n)}catch(t){Z(e,e.return,t)}}}function Gc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ft]=t}catch(t){Z(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=an));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[dt]=e,t[ft]=n}catch(t){Z(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Rd=sp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=qs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:xl(e,n),r&4&&Hc(5,n);break;case 1:if(xl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(xl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Za(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:xl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:xl(e,n);break;case 31:xl(e,n),r&4&&fl(e,n);break;case 13:xl(e,n),r&4&&pl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?Cl(e,n,(n.subtreeFlags&8772)!=0):xl(e,n),tl=i,nl=a}break;case 30:break;default:xl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var W=null,ll=!1;function ul(e,t,n){for(n=n.child;n!==null;)dl(e,t,n),n=n.sibling}function dl(e,t,n){if(Be&&typeof Be.onCommitFiberUnmount==`function`)try{Be.onCommitFiberUnmount(ze,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),ul(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=W,i=ll;Zd(n.type)&&(W=n.stateNode,ll=!1),ul(e,t,n),pf(n.stateNode),W=r,ll=i;break;case 5:nl||qc(n,t);case 6:if(r=W,i=ll,W=null,ul(e,t,n),W=r,ll=i,W!==null)if(ll)try{(W.nodeType===9?W.body:W.nodeName===`HTML`?W.ownerDocument.body:W).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{W.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:W!==null&&(ll?(e=W,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(W,n.stateNode));break;case 4:r=W,i=ll,W=n.stateNode.containerInfo,ll=!0,ul(e,t,n),W=r,ll=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),nl||Uc(4,n,t),ul(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,ul(e,t,n),nl=r;break;default:ul(e,t,n)}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function ml(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(a(435,e.tag))}}function hl(e,t){var n=ml(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function gl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){W=c.stateNode,ll=!1;break a}break;case 5:W=c.stateNode,ll=!1;break a;case 3:case 4:W=c.stateNode.containerInfo,ll=!0;break a}c=c.return}if(W===null)throw Error(a(160));dl(o,s,i),W=null,ll=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vl(t,e),t=t.sibling}var _l=null;function vl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gl(t,e),yl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:gl(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=_l;if(gl(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[yt]||o[dt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Pd(o,r,n),o[dt]=e,N(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[dt]=e,N(o),r=o}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:gl(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(gl(t,e),yl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){i=e.stateNode;try{Xt(i,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Yc(e,i,n===null?i:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(gl(t,e),yl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,i=_l,_l=gf(t.containerInfo),gl(t,e),_l=i,yl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}rl&&(rl=!1,bl(e));break;case 4:r=_l,_l=gf(e.stateNode.containerInfo),gl(t,e),yl(e),_l=r;break;case 12:gl(t,e),yl(e);break;case 31:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 13:gl(t,e),yl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Ae()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||i,nl=d||l,gl(t,e),nl=d,tl=u,yl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||tl||nl||Sl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,hl(e,n))));break;case 19:gl(t,e),yl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,hl(e,r)));break;case 30:break;case 21:break;default:gl(t,e),yl(e)}}function yl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;$c(e,Zc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Xt(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(a(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Sl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),Sl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Sl(t);break;case 27:pf(t.stateNode);case 26:case 5:qc(t,t.return),Sl(t);break;case 22:t.memoizedState===null&&Sl(t);break;case 30:Sl(t);break;default:Sl(t)}e=e.sibling}}function Cl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Cl(i,a,n),Hc(4,a);break;case 1:if(Cl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Xa(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:Cl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:Cl(i,a,n);break;case 31:Cl(i,a,n),n&&o&4&&fl(i,a);break;case 13:Cl(i,a,n),n&&o&4&&pl(i,a);break;case 22:a.memoizedState===null&&Cl(i,a,n),Kc(a,a.return);break;case 30:break;default:Cl(i,a,n)}t=t.sibling}}function wl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&la(n))}function Tl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e))}function El(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dl(e,t,n,r),t=t.sibling}function Dl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:El(e,t,n,r),i&2048&&Hc(9,t);break;case 1:El(e,t,n,r);break;case 3:El(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e)));break;case 12:if(i&2048){El(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else El(e,t,n,r);break;case 31:El(e,t,n,r);break;case 13:El(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?El(e,t,n,r):(a._visibility|=2,Ol(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?El(e,t,n,r):kl(e,t),i&2048&&wl(o,t);break;case 24:El(e,t,n,r),i&2048&&Tl(t.alternate,t);break;default:El(e,t,n,r)}}function Ol(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ol(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ol(a,o,s,c,i)):u._visibility&2?Ol(a,o,s,c,i):kl(a,o),i&&l&2048&&wl(o.alternate,o);break;case 24:Ol(a,o,s,c,i),i&&l&2048&&Tl(o.alternate,o);break;default:Ol(a,o,s,c,i)}t=t.sibling}}function kl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:kl(n,r),i&2048&&wl(r.alternate,r);break;case 24:kl(n,r),i&2048&&Tl(r.alternate,r);break;default:kl(n,r)}t=t.sibling}}var Al=8192;function jl(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)Ml(e,t,n),e=e.sibling}function Ml(e,t,n){switch(e.tag){case 26:jl(e,t,n),e.flags&Al&&e.memoizedState!==null&&Gf(n,_l,e.memoizedState,e.memoizedProps);break;case 5:jl(e,t,n);break;case 3:case 4:var r=_l;_l=gf(e.stateNode.containerInfo),jl(e,t,n),_l=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Al,Al=16777216,jl(e,t,n),Al=r):jl(e,t,n));break;default:jl(e,t,n)}}function Nl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Pl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fl(e),e=e.sibling}function Fl(e){switch(e.tag){case 0:case 11:case 15:Pl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Pl(e);break;case 12:Pl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Il(e)):Pl(e);break;default:Pl(e)}}function Il(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Ll(r,e)}Nl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Il(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Il(t));break;default:Il(t)}e=e.sibling}}function Ll(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Uc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:la(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var Rl={getCacheForType:function(e){var t=na(z),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return na(z).controller.signal}},zl=typeof WeakMap==`function`?WeakMap:Map,G=0,K=null,q=null,J=0,Y=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,X=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return G&2&&J!==0?J&-J:O.T===null?ct():dd()}function mu(){if(Jl===0)if(!(J&536870912)||R){var e=qe;qe<<=1,!(qe&3932160)&&(qe=262144),Jl=e}else Jl=536870912;return e=ro.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===K&&(Y===2||Y===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,J,Jl,!1)),tt(e,n),(!(G&2)||e!==K)&&(e===K&&(!(G&2)&&(Kl|=n),X===4&&yu(e,J,Jl,!1)),rd(e))}function gu(e,t,n){if(G&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ze(e,t),i=r?Au(e,t):Ou(e,t,!0),o=r;do{if(i===0){Hl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){i=Ou(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,i=4;break a}o=Zl,Zl=i,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Vl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=$l+300-Ae(),10<i)){if(yu(r,t,Jl,!Vl),Xe(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Vl,o,`Throttled`,-0,0),i);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Vl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:an},Ml(t,a,d);var m=(a&62914560)===a?$l-Ae():(a&4194048)===a?eu-Ae():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!wr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-He(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&rt(e,n,t)}function bu(){return G&6?!0:(id(0,!1),!1)}function xu(){if(q!==null){if(Y===0)var e=q.return;else e=q,Ji=qi=null,ko(e),Ma=null,Na=0,e=q;for(;e!==null;)Vc(e.alternate,e),e=e.return;q=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),K=e,q=n=fi(e.current,null),J=t,Y=0,Bl=null,Vl=!1,Hl=Ze(e,t),Ul=!1,Yl=Jl=ql=Kl=Gl=X=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-He(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,ni(),n}function Cu(e,t){B=null,O.H=zs,t===Sa||t===wa?(t=Aa(),Y=3):t===Ca?(t=Aa(),Y=4):Y=t===rc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,q===null&&(X=1,Zs(e,bi(t,e.current)))}function wu(){var e=ro.current;return e===null?!0:(J&4194048)===J?io===null:(J&62914560)===J||J&536870912?e===io:!1}function Tu(){var e=O.H;return O.H=zs,e===null?zs:e}function Eu(){var e=O.A;return O.A=Rl,e}function Du(){X=4,Vl||(J&4194048)!==J&&ro.current!==null||(Hl=!0),!(Gl&134217727)&&!(Kl&134217727)||K===null||yu(K,J,Jl,!1)}function Ou(e,t,n){var r=G;G|=2;var i=Tu(),a=Eu();(K!==e||J!==t)&&(nu=null,Su(e,t)),t=!1;var o=X;a:do try{if(Y!==0&&q!==null){var s=q,c=Bl;switch(Y){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:ro.current===null&&(t=!0);var l=Y;if(Y=0,Bl=null,Pu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=Y,Y=0,Bl=null,Pu(e,s,c,l)}}ku(),o=X;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ji=qi=null,G=r,O.H=i,O.A=a,q===null&&(K=null,J=0,ni()),o}function ku(){for(;q!==null;)Mu(q)}function Au(e,t){var n=G;G|=2;var r=Tu(),i=Eu();K!==e||J!==t?(nu=null,tu=Ae()+500,Su(e,t)):Hl=Ze(e,t);a:do try{if(Y!==0&&q!==null){t=q;var o=Bl;b:switch(Y){case 1:Y=0,Bl=null,Pu(e,t,o,1);break;case 2:case 9:if(Ea(o)){Y=0,Bl=null,Nu(t);break}t=function(){Y!==2&&Y!==9||K!==e||(Y=7),rd(e)},o.then(t,t);break a;case 3:Y=7;break a;case 4:Y=5;break a;case 7:Ea(o)?(Y=0,Bl=null,Nu(t)):(Y=0,Bl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(q.tag){case 26:s=q.memoizedState;case 5:case 27:var c=q;if(s?Wf(s):c.stateNode.complete){Y=0,Bl=null;var l=c.sibling;if(l!==null)q=l;else{var u=c.return;u===null?q=null:(q=u,Fu(u))}break b}}Y=0,Bl=null,Pu(e,t,o,5);break;case 6:Y=0,Bl=null,Pu(e,t,o,6);break;case 8:xu(),X=6;break a;default:throw Error(a(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Ji=qi=null,O.H=r,O.A=i,G=n,q===null?(K=null,J=0,ni(),X):0}function ju(){for(;q!==null&&!Oe();)Mu(q)}function Mu(e){var t=Nc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Fu(e):q=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=_c(n,t,t.pendingProps,t.type,void 0,J);break;case 11:t=_c(n,t,t.pendingProps,t.type.render,t.ref,J);break;case 5:ko(t);default:Vc(n,t),t=q=pi(t,Wl),t=Nc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Fu(e):q=t}function Pu(e,t,n,r){Ji=qi=null,ko(t),Ma=null,Na=0;var i=t.return;try{if(nc(e,i,t,n,J)){X=1,Zs(e,bi(n,e.current)),q=null;return}}catch(t){if(i!==null)throw q=i,t;X=1,Zs(e,bi(n,e.current)),q=null;return}t.flags&32768?(R||r===1?e=!0:Hl||J&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ro.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Vl);return}e=t.return;var n=zc(t.alternate,t,Wl);if(n!==null){q=n;return}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);X===0&&(X=5)}function Iu(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,q=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){q=e;return}q=e=n}while(e!==null);X=6,q=null}function Lu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(G&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=ti,nt(e,n,o,s,c,l),e===K&&(q=K=null,J=0),ou=t,au=e,su=n,cu=o,lu=i,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Pe,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=O.T,O.T=null,i=k.p,k.p=2,s=G,G|=4;try{ol(e,t,n)}finally{G=s,k.p=i,O.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=G;G|=4;try{vl(t,e);var a=zd,o=kr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Or(s.ownerDocument.documentElement,s)){if(c!==null&&Ar(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{G=i,k.p=r,O.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=G;G|=4;try{sl(e,t.alternate,t)}finally{G=i,k.p=r,O.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,ke();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),st(n),t=t.stateNode,Be&&typeof Be.onCommitFiberRoot==`function`)try{Be.onCommitFiberRoot(ze,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=O.T,i=k.p,k.p=2,O.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{O.T=t,k.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,la(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=st(su),r=O.T,i=k.p;try{k.p=32>n?32:n,O.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,G&6)throw Error(a(331));var c=G;if(G|=4,Fl(o.current),Dl(o,o.current,s,n),G=c,id(0,!1),Be&&typeof Be.onPostCommitFiberRoot==`function`)try{Be.onPostCommitFiberRoot(ze,o)}catch{}return!0}finally{k.p=i,O.T=r,Vu(e,t)}}function Wu(e,t,n){t=bi(n,t),t=$s(e.stateNode,t,2),e=Wa(e,t,2),e!==null&&(tt(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=bi(n,e),n=ec(2),r=Wa(t,n,2),r!==null&&(tc(n,r,t,e),tt(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,K===e&&(J&n)===n&&(X===4||X===3&&(J&62914560)===J&&300>Ae()-$l?!(G&2)&&Su(e,0):ql|=n,Yl===J&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=$e()),e=ai(e,t),e!==null&&(tt(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Ee(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-He(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=J,a=Xe(r,r===K?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ze(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ae(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-He(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Qe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=K,n=J,n=Xe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Y===2||Y===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&De(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ze(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&De(r),st(n)){case 2:case 8:n=Ne;break;case 32:n=Pe;break;case 268435456:n=Ie;break;default:n=Pe}return r=cd.bind(null,e),n=Ee(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&De(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=J;return r=Xe(e,e===K?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Ae()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){G&6?Ee(Me,ad):od()})}function dd(){if(nd===0){var e=fa;e===0&&(e=Ke,Ke<<=1,!(Ke&261888)&&(Ke=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:rn(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[ft]||null).action),o=r.submitter;o&&(t=(t=o[ft]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new En(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Ts(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Ts(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Xr.length;hd++){var gd=Xr[hd];Zr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Zr(Hr,`onAnimationEnd`),Zr(Ur,`onAnimationIteration`),Zr(Wr,`onAnimationStart`),Zr(`dblclick`,`onDoubleClick`),Zr(`focusin`,`onFocus`),Zr(`focusout`,`onBlur`),Zr(Gr,`onTransitionRun`),Zr(Kr,`onTransitionStart`),Zr(qr,`onTransitionCancel`),Zr(Jr,`onTransitionEnd`),Ot(`onMouseEnter`,[`mouseout`,`mouseover`]),Ot(`onMouseLeave`,[`mouseout`,`mouseover`]),Ot(`onPointerEnter`,[`pointerout`,`pointerover`]),Ot(`onPointerLeave`,[`pointerout`,`pointerover`]),Dt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Dt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Dt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Dt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Dt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Dt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[mt];n===void 0&&(n=t[mt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,Tt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!hn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=xt(s),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}s=s.parentNode}}r=r.return}fn(function(){var r=a,i=sn(n),o=[];a:{var s=Yr.get(e);if(s!==void 0){var l=En,u=e;switch(e){case`keypress`:if(xn(n)===0)break a;case`keydown`:case`keyup`:l=Wn;break;case`focusin`:u=`focus`,l=Fn;break;case`focusout`:u=`blur`,l=Fn;break;case`beforeblur`:case`afterblur`:l=Fn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Nn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Pn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=P;break;case Hr:case Ur:case Wr:l=In;break;case Jr:l=F;break;case`scroll`:case`scrollend`:l=On;break;case`wheel`:l=Kn;break;case`copy`:case`cut`:case`paste`:l=Ln;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Gn;break;case`toggle`:case`beforetoggle`:l=qn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=pn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(s=new l(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,s&&n!==on&&(u=n.relatedTarget||n.fromElement)&&(xt(u)||u[pt]))break a;if((l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?xt(u):null,u!==null&&(f=c(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Nn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Gn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?s:Ct(l),h=u==null?s:Ct(u),s=new d(g,m+`leave`,l,n,i),s.target=f,s.relatedTarget=h,g=null,xt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(o,s,l,d,!1),u!==null&&f!==null&&Od(o,f,u,d,!0)}}a:{if(s=r?Ct(r):window,l=s.nodeName&&s.nodeName.toLowerCase(),l===`select`||l===`input`&&s.type===`file`)var v=fr;else if(or(s))if(pr)v=Sr;else{v=br;var y=yr}else l=s.nodeName,!l||l.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&en(r.elementType)&&(v=fr):v=xr;if(v&&=v(e,r)){sr(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Kt(s,`number`,s.value)}switch(y=r?Ct(r):window,e){case`focusin`:(or(y)||y.contentEditable===`true`)&&(Mr=y,Nr=r,Pr=null);break;case`focusout`:Pr=Nr=Mr=null;break;case`mousedown`:Fr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Fr=!1,Ir(o,n,i);break;case`selectionchange`:if(jr)break;case`keydown`:case`keyup`:Ir(o,n,i)}var b;if(Yn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else nr?er(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(I&&n.locale!==`ko`&&(nr||x!==`onCompositionStart`?x===`onCompositionEnd`&&nr&&(b=bn()):(_n=i,vn=`value`in _n?_n.value:_n.textContent,nr=!0)),y=Ed(r,x),0<y.length&&(x=new Rn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=tr(n),b!==null&&(x.data=b)))),(b=Zn?rr(e,n):ir(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Rn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),md(o,e,r,n,i)}yd(o,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=pn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=pn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=pn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=pn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
|
|
10
|
-
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Xt(e,``+r);break;case`className`:Pt(e,`class`,r);break;case`tabIndex`:Pt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Pt(e,n,r);break;case`style`:$t(e,r,o);break;case`data`:if(t!==`object`){Pt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=an);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=rn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Nt(e,`popover`,r);break;case`xlinkActuate`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Nt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=tn.get(n)||n,Nt(e,n,r))}}function Nd(e,t,n,r,i,o){switch(n){case`style`:$t(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Xt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=an);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Et.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[ft]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Nt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,o,s,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:$(e,t,r,d,n,null)}}Gt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&qt(e,!!r,n,!0):qt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:$(e,t,s,c,n,null)}Yt(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,u,r,n,null)}return;default:if(en(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Wt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?qt(e,!!n,n?[]:``,!1):qt(e,!!n,t,!0)):qt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&$(e,t,s,i,r,o)}Jt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(en(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[yt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),bt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[yt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=k.d;k.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=St(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Ut(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),N(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ut(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ut(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ut(n.imageSizes)+`"]`)):i+=`[href="`+Ut(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),N(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ut(r)+`"][href="`+Ut(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),N(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=wt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);N(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=wt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),N(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=wt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),N(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=pe.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=wt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=wt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=wt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+Ut(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),N(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Ut(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ut(n.href)+`"]`);if(r)return t.instance=r,N(r),r;var i=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),N(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,N(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),N(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,N(i),i):(r=n,(i=mf.get(o))&&(r=m({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),N(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[yt]||a[dt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,N(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),N(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:S,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=et(0),this.hiddenUpdates=et(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ui(3,null,null,t),e.current=a,a.stateNode=e,t=ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Va(a),e}function tp(e){return e?(e=ci,e):ci}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ua(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Wa(e,r,t),n!==null&&(hu(n,e,t),Ga(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=ot(t);var n=ai(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=2,up(e,t,n,r)}finally{k.p=a,O.T=i}}function lp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=8,up(e,t,n,r)}finally{k.p=a,O.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=St(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ye(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-He(o);s.entanglements[1]|=c,o&=~c}rd(a),!(G&6)&&(tu=Ae()+500,id(0,!1))}}break;case 31:case 13:s=ai(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=sn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=xt(e),e!==null){var t=c(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=l(t),e!==null)return e;e=null}else if(n===31){if(e=u(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(je()){case Me:return 2;case Ne:return 8;case Pe:case Fe:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=St(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=xt(e.target);if(t!==null){var n=c(t);if(n!==null){if(t=n.tag,t===13){if(t=l(n),t!==null){e.blockedOn=t,lt(e.priority,function(){op(n)});return}}else if(t===31){if(t=u(n),t!==null){e.blockedOn=t,lt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);on=r,n.target.dispatchEvent(r),on=null}else return t=St(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,t){e.blockedOn===t&&(e.blockedOn=null,hp||(hp=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=St(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ft]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ft]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[pt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=r.version;if(Lp!==`19.2.7`)throw Error(a(527,Lp,`19.2.7`));k.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=f(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:O,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{ze=zp.inject(Rp),Be=zp}catch{}}t.hydrateRoot=function(e,t,n){if(!o(e))throw Error(a(299));var r=!1,i=``,s=Js,c=Ys,l=Xs,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=ep(e,1,!0,t,n??null,r,i,u,s,c,l,Pp),t.context=tp(null),n=t.current,r=pu(),r=ot(r),i=Ua(r),i.callback=null,Wa(n,i,r),n=r,t.current.lanes=n,tt(t,n),rd(t),e[pt]=t.current,Sd(e),new Ip(t)}})),vt=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_t()})),yt=xt(JSON.parse),bt=St(JSON.stringify,JSON.parse);function xt(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=g(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function St(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=c(e,r);return t?`?${t}`:``}}var Ct=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},wt=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),N=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Tt=(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},Et=(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},Dt=(e,t,n)=>{if(!(!_(n)&&!l(n)))throw _(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:_(n)?`redirected`:l(n)?`notFound`:r.status===`pending`?`success`:r.status,context:Tt(e,t.index),isFetching:!1,error:n})),l(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),_(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Ot=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},kt=(e,t,n)=>{let r=Tt(e,n);e.updateMatch(t,e=>({...e,context:r}))},At=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,Dt(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,Dt(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&&!_(n)&&!l(n)&&(e.serialError??=n)},jt=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!N(e,t)&&(n.options.loader||n.options.beforeLoad||Ht(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{Ct(e)},i);r._nonReactive.pendingTimeout=t}},Mt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;jt(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&Dt(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Nt=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=A(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&At(e,n,o),s&&At(e,n,s),jt(e,t,r,i);let c=new AbortController,u=!1,d=()=>{u||(u=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},f=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{d(),f()});return}i._nonReactive.beforeLoadPromise=A();let p={...Tt(e,n,!1),...i.__routeContext},{search:m,params:h,cause:g}=i,v=N(e,t),y={search:m,abortController:c,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`:g,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{d(),f()});return}(_(r)||l(r))&&(d(),At(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=>{At(e,n,t)}).then(b)}catch(t){d(),At(e,n,t)}b(x)},Pt=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Nt(e,n,t,i),s=()=>{if(Ot(e,n))return;let t=Mt(e,n,i);return O(t)?t.then(o):o()};return a()},Ft=(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}))},It=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=Tt(e,r),d=N(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}},Lt=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{Vt(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(It(e,t,n,r,i)),l=!!s&&O(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;Dt(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:Tt(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:Tt(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,l(t)&&await i.options.notFoundComponent?.preload?.(),Dt(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,Dt(e,e.router.getMatch(n),t)}!_(o)&&!l(o)&&await Vt(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:Tt(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),Dt(e,r,t)}},Rt=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(It(e,t,i,n,d)):m,{status:g,invalid:v}=l,y=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(v||(h??y)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await Lt(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){_(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await Lt(e,t,i,n,d):kt(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Ot(e,i)){if(!e.router.getMatch(i))return e.matches[n];kt(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=N(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&Dt(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=A(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function zt(e){let t=e,n=[];wt(t.router)&&Ct(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=Pt(t,e);O(n)&&await n}catch(e){if(_(e))throw e;if(l(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?Et(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(Rt(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(_(e))throw e;l(e)?s??=e:c??=e}if(c!==void 0)throw c}let u=s??(r&&!t.preload?r:void 0),f=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!u&&r&&t.preload)return t.matches;if(u){let e=Et(t,u);e===void 0&&d();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})),f=e,await Vt(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 Vt(e,[`errorComponent`])}for(let e=0;e<=f;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=Ft(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=Ct(t);if(O(p)&&await p,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Bt(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Vt(e,t=Ut){!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===Ut?(()=>{if(e._componentsPromise===void 0){let t=Bt(e,Ut);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Bt(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ht(e){for(let t of Ut)if(e.options[t]?.preload)return!0;return!1}var Ut=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function Wt(e){return{input:({url:t})=>{for(let n of e)t=Kt(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=qt(e[n],t);return t}}}function Gt(e){let t=D(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=de([`/`,t,e.pathname]),e)}}function Kt(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 qt(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}function Jt(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(()=>Yt(o,_.get())),x=r(()=>Yt(s,v.get())),S=r(()=>Yt(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),ee=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),T=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()})),E=ne(64);function D(e){let t=E.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()}}),E.set(e,t)),t}let te={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:ee,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:T,getRouteMatchStore:D,setMatches:re,setPending:ie,setCached:ae};re(e.matches),a?.(te);function re(e){Xt(e,o,_,n,i)}function ie(e){Xt(e,s,v,n,i)}function ae(e){Xt(e,c,y,n,i)}return te}function Yt(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function Xt(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)}k(n.get(),a)||n.set(a)})}var Zt=`__TSR_index`,Qt=`popstate`,$t=`beforeunload`;function en(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=an(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[Zt];i=tn(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[Zt];i=tn(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[Zt]!==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 tn(e,t){t||={};let n=on();return{...t,key:n,__TSR_key:n,[Zt]:e}}function nn(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??(()=>an(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=on();t.history.replaceState({[Zt]: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=an(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[Zt]-l.state[Zt],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=en({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($t,S,{capture:!0}),t.removeEventListener(Qt,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener($t,S,{capture:!0}),t.addEventListener(Qt,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 rn(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function an(e,t){let n=rn(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=on();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||{[Zt]:0,key:a,__TSR_key:a}}}function on(){return(Math.random()+1).toString(36).substring(7)}function sn(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function cn(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 ln=new WeakMap,un=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.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=E(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=nn()),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=ne(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Jt(pn(this.latestLocation),e),Nn(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=D(o);t&&t!==`/`&&e.push(Gt({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:Wt(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=ue(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&ce(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:Le(e).path,external:!1,searchStr:o,search:oe(t?.search,i),hash:Le(r.slice(1)).path,state:he(t?.state,a)}}let o=new URL(i,this.origin),s=Kt(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:Le(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:oe(t?.search,c),hash:Le(s.hash.slice(1)).path,state:he(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)=>te({base:e,to:t.includes(`//`)?j(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=>hn({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,a=t.to?`${t.to}`:void 0,o=r.search,s=Object.assign(Object.create(null),r.params),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,u=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,fe(t.params,s)),d=this.routesByPath[le(l)],f;if(d)f=this.getRouteBranch(d);else if(l.includes(`$`))f=[];else{let e=this.getMatchedRoutes(l);f=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(f=[...f,this.options.notFoundRoute])}if(f.length&&me(u))for(let e of f){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(u,t(u))}catch{}}let p=e.leaveParams?l:Le(Pe({path:l,params:u,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,m=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};f.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,mn(t.options.validateSearch,{...e,...m}))}catch{}}),m=e}m=gn({search:m,dest:t,destRoutes:f,_includeValidateSearch:e._includeValidateSearch}),m=oe(o,m);let h=this.options.stringifySearch(m),g=t.hash===!0?n.hash:t.hash?fe(t.hash,n.hash):void 0,_=g?`#${g}`:``,v=t.state===!0?n.state:t.state?fe(t.state,n.state):{};v=he(n.state,v);let y=`${p}${h}${_}`,b,x,S=!1;if(this.rewrite){let e=new URL(y,this.origin),t=qt(this.rewrite,e);b=e.href.replace(e.origin,``),t.origin===this.origin?x=t.pathname+t.search+t.hash:(x=t.href,S=!0)}else b=pe(y),x=b;return{publicHref:x,href:b,pathname:p,search:m,searchStr:h,state:v,hash:g??``,external:S,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=ee(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,fe(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 r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=T(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=le(this.latestLocation.href)===le(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=A(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.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,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}: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=an(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Kt(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(re(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,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t?ln.set(this.latestLocation,t):ln.delete(this.latestLocation);let n=this.latestLocation,r=cn(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await zt({router:this,sync:e?.sync,forceStaleReload:a.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){_(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):l(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===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},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(cn(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&&re(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=Vt,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()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await zt({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(_(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});l(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},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=se(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!T(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?T(i.search,r.search,{partial:!0})?a.rawParams:!1:a.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??bt,parseSearch:e.parseSearch??yt,protocolAllowlist:e.protocolAllowlist??ae}),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=we(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:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:le(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?vn(this.options.notFoundMode,a):void 0,c=Array(a.length),u=new Map;for(let e of this.stores.matchStores.values())e.routeId&&u.set(e.routeId,e.get());for(let n=0;n<a.length;n++){let r=a[n],o=c[n-1],d,f,p;{let n=o?.search??e.search,i=o?._strictSearch??void 0;try{let e=mn(r.options.validateSearch,{...n})??void 0;d={...n,...e},f={...i,...e},p=void 0}catch(e){let r=e;if(e instanceof dn||(r=new dn(e.message,{cause:e})),t?.throwOnError)throw r;d=n,f={},p=r}}let m=r.options.loaderDeps?.({search:d})??``,h=m?JSON.stringify(m):``,{interpolatedPath:g,usedParams:v}=Pe({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),y=r.id+g+h,b=this.getMatch(y),x=u.get(r.id),S=b?._strictParams??v,C;if(!b)try{yn(r,S)}catch(e){if(C=l(e)||_(e)?e:new fn(e.message,{cause:e}),t?.throwOnError)throw C}Object.assign(i,S);let w=x?`stay`:`enter`,ee;if(b)ee={...b,cause:w,params:x?.params??i,_strictParams:S,search:oe(x?x.search:b.search,d),_strictSearch:f};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Ht(r)?`pending`:`success`;ee={id:y,ssr:r.options.ssr,index:n,routeId:r.id,params:x?.params??i,_strictParams:S,pathname:g,updatedAt:Date.now(),search:x?oe(x.search,d):d,_strictSearch:f,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:C,__routeContext:void 0,_nonReactive:{loadPromise:A()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:w,loaderDeps:x?he(x.loaderDeps,m):m,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||(ee.globalNotFound=s===r.id),ee.searchError=p;let T=this.getParentContext(o);ee.context={...T,...ee.__routeContext,...ee.__beforeLoadContext},c[n]=ee}for(let t=0;t<c.length;t++){let n=c[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=u.get(n.routeId);if(n.params=o?oe(o.params,i):i,!a){let i=c[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:c,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return c}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=ke(t),i={...e.search};for(let e of t)try{Object.assign(i,mn(e.options.validateSearch,i))}catch{}let a=ke(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{yn(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},dn=class extends Error{},fn=class extends Error{};function pn(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function mn(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new dn(`Async validation not supported`);if(n.issues)throw new dn(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 hn({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=le(e),a,o=Ce(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function gn({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return _n(n)(e,t,r??!1)}function _n(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=mn(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=fe(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function vn(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 Fe}function yn(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)}}function bn(){try{return sessionStorage}catch{return}}var xn=`tsr-scroll-restoration-v1_3`,Sn=bn();function Cn(){try{return JSON.parse(Sn?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function wn(){try{Sn?.setItem(xn,JSON.stringify(Tn))}catch{}}var Tn=Cn(),En=`data-scroll-restoration-id`,Dn=e=>e.state.__TSR_key||e.href;function On(e){let t=e.getAttribute(En);if(t)return`[${En}="${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 kn=!1,An=`window`;function jn(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Mn(e){let t=[];for(let n of e){if(n===An)continue;let e=jn(n);e&&t.push(e)}return t}function Nn(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Dn,a=new Map,o=(e,t,n)=>{let r=a.get(e)||{};r.scrollX=t,r.scrollY=n,a.set(e,r)},s=e=>{if(!(kn||!r.restoring))if(e.target===document)o(An,scrollX,scrollY);else{let t=e.target;o(t,t.scrollLeft,t.scrollTop)}},c=e=>{if(!r.restoring)return;let t=Tn[e]||={};for(let[e,n]of a)e===An?t[An]=n:e.isConnected&&(t[On(e)]=n)};n&&!r.restoration&&(r.restoration=!0,kn=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,s,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&c(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{c(i(e.stores.resolvedLocation.get()??e.stores.location.get())),wn()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c;if(a.clear(),s||(r.next=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let l=i(t.toLocation),u=t.fromLocation&&i(t.fromLocation);if(r.restoring&&u&&u!==l){let e=Tn[u];if(e){let t=Tn[l];for(let n in e){if(n===An){if(s)continue}else{let e=jn(n);if(!e||s&&o&&(c??=Mn(o),c.includes(e)))continue}t||=Tn[l]={},t[n]??=e[n]}}}kn=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){let s=ln.get(t.toLocation),u=e&&i&&(s===`PUSH`||s===`REPLACE`),d=r.restoring?Tn[l]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:r}=d[e];if(e===An){if(u)continue;scrollTo({top:r,left:t,behavior:n}),a=!0}else{let n=jn(e);n&&(n.scrollLeft=t,n.scrollTop=r)}}if(!a&&!e){let e={top:0,left:0,behavior:n};if(scrollTo(e),o){c??=Mn(o);for(let t of c)t.scrollTo(e)}}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{kn=!1}}))}var Pn=Symbol.for(`TSR_DEFERRED_PROMISE`);function Fn(e,t){let n=e;return n[Pn]?n:(n[Pn]={status:`pending`},n.then(e=>{n[Pn].status=`success`,n[Pn].data=e}).catch(e=>{n[Pn].status=`error`,n[Pn].error={data:(t?.serializeError??sn)(e),__isServerError:!0}}),n)}function In(e,t){if(e)return typeof e==`string`?e:e[t]}function Ln(e){return e?.scriptFormat??`module`}function Rn(e,t,n){let r=zn(t),i=In(n,`script`)??r.crossOrigin;return{...Ln(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function zn(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function Bn(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 Vn(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}var Hn=u({key:`$TSS/serverfn`,test:e=>typeof e!=`function`||!(o in e)?!1:!!e[o],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>a(e)});function Un(e){return e.replaceAll(`\0`,`/`).replaceAll(`�`,`/`)}function Wn(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function Gn(e){window.$_TSR||d();let t=e.options.serializationAdapters;if(t?.length){let e=new Map;t.forEach(t=>{e.set(t.key,t.fromSerializable)}),window.$_TSR.t=e,window.$_TSR.buffer.forEach(e=>e())}window.$_TSR.initialized=!0,window.$_TSR.router||d();let n=window.$_TSR.router;n.matches.forEach(e=>{e.i=Un(e.i)}),n.lastMatchId&&=Un(n.lastMatchId);let{manifest:r,dehydratedData:i,lastMatchId:a}=n;e.ssr={manifest:r};let o=document.querySelector(`meta[property="csp-nonce"]`)?.content;e.options.ssr={nonce:o},await e.options.hydrate?.(i);let s=e.matchRoutes(e.stores.location.get()),c=Promise.all(s.map(t=>e.loadRouteChunk(e.looseRoutesById[t.routeId])));function u(t){let n=e.looseRoutesById[t.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(n){let r=A();t._nonReactive.minPendingPromise=r,t._forcePending=!0,setTimeout(()=>{r.resolve(),e.updateMatch(t.id,e=>(e._nonReactive.minPendingPromise=void 0,{...e,_forcePending:void 0}))},n)}}function f(t){let n=e.looseRoutesById[t.routeId];n&&(n.options.ssr=t.ssr)}let p;s.forEach(e=>{let t=n.matches.find(t=>t.i===e.id);if(!t){e._nonReactive.dehydrated=!1,e.ssr=!1,f(e);return}Wn(e,t),f(e),e._nonReactive.dehydrated=e.ssr!==!1,(e.ssr===`data-only`||e.ssr===!1)&&p===void 0&&(p=e.index,u(e))}),e.stores.setMatches(s);let m=e.stores.matches.get(),h=e.stores.location.get();await Promise.all(m.map(async t=>{try{let n=e.looseRoutesById[t.routeId],r=m[t.index-1]?.context??e.options.context;if(n.options.context){let i={deps:t.loaderDeps,params:t.params,context:r??{},location:h,navigate:t=>e.navigate({...t,_fromLocation:h}),buildLocation:e.buildLocation,cause:t.cause,abortController:t.abortController,preload:!1,matches:s,routeId:n.id};t.__routeContext=n.options.context(i)??void 0}t.context={...r,...t.__routeContext,...t.__beforeLoadContext};let i={ssr:e.options.ssr,matches:m,match:t,params:t.params,loaderData:t.loaderData},a=await n.options.head?.(i),o=await n.options.scripts?.(i);t.meta=a?.meta,t.links=a?.links,t.headScripts=a?.scripts,t.styles=a?.styles,t.scripts=o}catch(e){if(l(e))t.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${t.routeId}`,e);else throw t.error=e,console.error(`Error during hydration for route ${t.routeId}:`,e),e}}));let g=s[s.length-1].id!==a;if(!s.some(e=>e.ssr===!1)&&!g)return s.forEach(e=>{e._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),c;let _=Promise.resolve().then(()=>e.load()).catch(e=>{console.error(`Error during router hydration:`,e)});if(g){let t=s[1];t||d(),u(t),t._displayPending=!0,t._nonReactive.displayPendingPromise=_,_.then(()=>{e.batch(()=>{e.stores.status.get()===`pending`&&(e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(t.id,e=>({...e,_displayPending:void 0,displayPendingPromise:void 0}))})})}return c}var P=n(e(),1),F=r();function Kn({promise:e}){if(Ne)return Ne(e);let t=Fn(e);if(t[Pn].status===`pending`)throw t;if(t[Pn].status===`error`)throw t[Pn].error;return t[Pn].data}function qn(e){let t=(0,F.jsx)(Jn,{...e});return e.fallback?(0,F.jsx)(P.Suspense,{fallback:e.fallback,children:t}):t}function Jn(e){let t=Kn(e);return e.children(t)}function Yn(e){let t=e.errorComponent??Zn;return(0,F.jsx)(Xn,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?P.createElement(t,{error:n,reset:r}):e.children})}var Xn=class extends P.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 Zn({error:e}){let[t,n]=P.useState(!1);return(0,F.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,F.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,F.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,F.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,F.jsx)(`div`,{children:(0,F.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,F.jsx)(`code`,{children:e.message}):null})}):null]})}var I=(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))(I||{});function Qn({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 $n(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 er=[],tr=0,{link:nr,unlink:rr,propagate:ir,checkDirty:ar,shallowPropagate:or}=Qn({update(e){return e._update()},notify(e){er[cr++]=e,e.flags&=~I.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=I.Mutable|I.Dirty,fr(e))}}),sr=0,cr=0,lr,ur=0;function dr(e){try{++ur,e()}finally{--ur||pr()}}function fr(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=rr(n,e)}function pr(){if(!(ur>0)){for(;sr<cr;){let e=er[sr];er[sr++]=void 0,e.notify()}sr=0,cr=0}}function mr(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 lr!==void 0&&nr(i,lr,tr),i._snapshot},subscribe(e){let t=$n(e),n={current:!1},r=hr(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=lr,o=t?.compare??Object.is;if(n)lr=i,++tr,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{lr=a,n&&(i.flags&=~I.RecursedCheck),fr(i)}}};return n?(i.flags=I.Mutable|I.Dirty,i.get=function(){let e=i.flags;if(e&I.Dirty||e&I.Pending&&ar(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&or(e)}}else e&I.Pending&&(i.flags=e&~I.Pending);return lr!==void 0&&nr(i,lr,tr),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(ir(e),or(e),pr())}},i}function hr(e){let t=()=>{let t=lr;lr=n,++tr,n.depsTail=void 0,n.flags=I.Watching|I.RecursedCheck;try{return e()}finally{lr=t,n.flags&=~I.RecursedCheck,fr(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&&ar(this.deps,this)?t():this.flags=I.Watching},stop(){this.flags=I.None,this.depsTail=void 0,fr(this)}};return t(),n}function gr(e){let t=ze(),n=`not-found-${M(t.stores.location,e=>e.pathname)}-${M(t.stores.status,e=>e)}`;return(0,F.jsx)(Yn,{getResetKey:()=>n,onCatch:(t,n)=>{if(l(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(l(t))return e.fallback?.(t);throw t},children:e.children})}function _r(){return(0,F.jsx)(`p`,{children:`Not Found`})}function vr(e){return(0,F.jsx)(F.Fragment,{children:e.children})}function yr(e,t,n){return t.options.notFoundComponent?(0,F.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,F.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,F.jsx)(_r,{})}var br=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,xr=(e,t)=>e[0]===t[0]&&e[1]===t[1],Sr=P.memo(function({matchId:e}){let t=ze(),n=t.stores.matchStores.get(e);n||d();let r=M(t.stores.loadedAt,e=>e),i=M(n,e=>e,br);return(0,F.jsx)(Cr,{router:t,matchId:e,resetKey:r,matchState:P.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 Cr({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,F.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,d=r.ssr===!1||r.ssr===`data-only`,f=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||d))?P.Suspense:vr,p=s?Yn:vr,m=u?gr:vr;return(0,F.jsxs)(i.isRoot?i.options.shellComponent??vr:vr,{children:[(0,F.jsx)(xe.Provider,{value:t,children:(0,F.jsx)(f,{fallback:o,children:(0,F.jsx)(p,{getResetKey:()=>n,errorComponent:s||Zn,onCatch:(e,t)=>{if(l(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,F.jsx)(m,{fallback:e=>{if(e.routeId??=r.routeId,!u||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return P.createElement(u,e)},children:d||r._displayPending?(0,F.jsx)(be,{fallback:o,children:(0,F.jsx)(Tr,{matchId:t})}):(0,F.jsx)(Tr,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(wr,{}),(e.options.scrollRestoration,null)]}):null]})}function wr(){let e=ze(),t=P.useRef();return Ie(()=>{let n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:`onRendered`,...cn(e.stores.location.get(),r??n)}),t.current=n},[M(e.stores.resolvedLocation,e=>e?.state.__TSR_key),e]),null}var Tr=P.memo(function({matchId:e}){let t=ze(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||d();let i=M(r,e=>e),a=i.routeId,o=t.routesById[a],s=P.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=P.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,F.jsx)(e,{},s):(0,F.jsx)(Er,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=A();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return l(i.error)||d(),yr(t,o,i.error);if(i.status===`redirected`)throw _(i.error)||d(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),Er=P.memo(function(){let e=ze(),t=P.useContext(xe),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=M(a,e=>[e?.routeId,e?.globalNotFound??!1],xr),i=M(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,F.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||d(),yr(e,a,void 0);if(!i)return null;let s=(0,F.jsx)(Sr,{matchId:i});return n===`__root__`?(0,F.jsx)(P.Suspense,{fallback:o,children:s}):s});function Dr(){let e=ze(),t=P.useRef({router:e,mounted:!1}),[n,r]=P.useState(!1),i=M(e.stores.isLoading,e=>e),a=M(e.stores.hasPending,e=>e),o=ve(i),s=i||n||a,c=ve(s),l=i||a,u=ve(l);return e.startTransition=e=>{r(!0),P.startTransition(()=>{e(),r(!1)})},P.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 le(e.latestLocation.publicHref)!==le(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),Ie(()=>{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]),Ie(()=>{o&&!i&&e.emit({type:`onLoad`,...cn(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),Ie(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...cn(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,u,e]),Ie(()=>{if(c&&!s){let t=cn(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),dr(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[s,c,e]),null}function Or(){let e=ze(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,F.jsx)(t,{}):null,r=(0,F.jsxs)(typeof document<`u`&&e.ssr?vr:P.Suspense,{fallback:n,children:[(0,F.jsx)(Dr,{}),(0,F.jsx)(kr,{})]});return e.options.InnerWrap?(0,F.jsx)(e.options.InnerWrap,{children:r}):r}function kr(){let e=ze(),t=M(e.stores.firstId,e=>e),n=M(e.stores.loadedAt,e=>e),r=t?(0,F.jsx)(Sr,{matchId:t}):null;return(0,F.jsx)(xe.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,F.jsx)(Yn,{getResetKey:()=>n,errorComponent:Zn,onCatch:void 0,children:r})})}var Ar=e=>({createMutableStore:mr,createReadonlyStore:mr,batch:dr}),jr=e=>new Mr(e),Mr=class extends un{constructor(e){super(e,Ar)}};function Nr({router:e,children:t,...n}){me(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,F.jsx)(Re.Provider,{value:e,children:t});return e.options.Wrap?(0,F.jsx)(e.options.Wrap,{children:r}):r}function Pr({router:e,...t}){return(0,F.jsx)(Nr,{router:e,...t,children:(0,F.jsx)(Or,{})})}function Fr(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 Ir(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e;switch(e.tag){case`title`:return(0,F.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,F.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,F.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,F.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,F.jsx)(Lr,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function Lr({attrs:e,children:t,preventScriptHoist:n}){ze();let r=ge(),i=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(P.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 Fr(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,Fr(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,i]),i&&typeof t==`string`)return(0,F.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return(0,F.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,F.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var Rr=e=>{let t=ze(),n=t.options.ssr?.nonce,r=M(t.stores.matches,e=>e.map(e=>e.meta).filter(e=>e!==void 0),T),i=P.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:ie(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]),a=M(t.stores.matches,e=>e.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),T),o=M(t.stores.matches,r=>{let i=t.ssr?.manifest,a=[];return i?(r.forEach(t=>{i.routes[t.routeId]?.css?.forEach(t=>{let r=Vn(t);a.push({tag:`link`,attrs:{rel:`stylesheet`,...r,crossOrigin:In(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},T),s=M(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:{...Rn(a,t,e),nonce:n}})})}),i},T),c=M(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})),T),l=M(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})),T),u=[];return Bn(u,i),u.push(...s),Bn(u,a),u.push(...o),Bn(u,c),Bn(u,l),u};function zr(e){let t=Rr(e.assetCrossOrigin),n=ze().options.ssr?.nonce;return(0,F.jsx)(F.Fragment,{children:t.map(e=>(0,P.createElement)(Ir,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var Br=()=>{let e=ze(),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})),i=M(e.stores.matches,n,T);return Vr(e,M(e.stores.matches,r,T),i)};function Vr(e,t,n){let r=[...t,...n];return(0,F.jsx)(F.Fragment,{children:r.map((e,t)=>(0,P.createElement)(Ir,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var Hr=`/assets/app-B03JVnFn.css`,Ur=ye({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`},{title:`Pievo`}],links:[{rel:`stylesheet`,href:Hr},{rel:`icon`,type:`image/svg+xml`,href:`/favicon.svg`}]}),shellComponent:Wr});function Wr({children:e}){return(0,F.jsxs)(`html`,{lang:`en`,suppressHydrationWarning:!0,children:[(0,F.jsx)(`head`,{children:(0,F.jsx)(zr,{})}),(0,F.jsxs)(`body`,{className:`dot-grid-subtle bg-paper font-sans text-primary antialiased`,suppressHydrationWarning:!0,children:[e,(0,F.jsx)(Br,{})]})]})}var Gr=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=P.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=P.useMemo(()=>({open:t,close:n}),[t,n]);return(0,F.jsx)(Ke.Provider,{value:i,children:(0,F.jsx)(Qe,{delay:a,timeoutMs:r,children:e.children})})};function Kr({job:e,onOpen:t,onPickRun:n}){let r=e.enabled,i=et(e),a=mt(e),o=pt(),[s,c]=(0,P.useState)([]),l=(0,P.useMemo)(()=>s.length?Xe(e.runs??[],s):e.runs??[],[e.runs,s]),u=l.at(-1),d=u?.reportIncident?u:void 0;return(0,F.jsxs)(`div`,{onClick:()=>t(e.id),className:`mb-[18px] cursor-pointer rounded-card border border-hairline bg-surface px-[26px] pb-5 pt-[22px] shadow-card transition-colors hover:border-wire ${r||d?.reportIncident||e.pauseCause?.kind===`failure-streak`||e.pauseCause?.kind===`blocked`?``:`opacity-60`}`,style:{animation:`fadeIn .25s cubic-bezier(0.25,0.1,0.25,1) both`},children:[(0,F.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-center gap-3`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:n=>{n.stopPropagation(),t(e.id)},className:`cursor-pointer rounded-sm text-left text-[17px] font-semibold tracking-[-0.01em] text-display outline-none focus-visible:ring-2 focus-visible:ring-interactive focus-visible:ring-offset-4 focus-visible:ring-offset-surface`,children:e.name}),a===`stopping`?(0,F.jsx)(lt,{tone:`running`,dot:`pulse`,children:`Stopping`}):a===`paused-finishing`?(0,F.jsx)(lt,{children:e.pauseCause?.kind===`blocked`?`Paused — blocked · current run finishing`:e.pauseCause?.kind===`owner`?`Paused by owner · current run finishing`:`Paused · current run finishing`}):a===`deleting`?(0,F.jsx)(lt,{children:`Deleting`}):e.running?(0,F.jsx)(lt,{tone:`running`,dot:`pulse`,children:`Running`}):e.queued?(0,F.jsx)(lt,{tone:`outline`,children:`Queued`}):null,e.graduation&&(0,F.jsx)(lt,{children:e.graduation}),e.goal&&(0,F.jsx)(lt,{tone:`success`,title:e.goal??void 0,children:`Objective`}),a===`paused`&&(0,F.jsx)(lt,{tone:e.pauseCause?.kind===`blocked`?`accent`:void 0,children:e.pauseCause?.kind===`blocked`?`Paused — blocked`:e.pauseCause?.kind===`failure-streak`?`Paused automatically`:e.pauseCause?.kind===`owner`?`Paused by owner`:`Paused`}),(0,F.jsxs)(`div`,{className:`ml-auto min-w-0 text-right text-meta text-secondary`,children:[(0,F.jsxs)(`div`,{className:`whitespace-nowrap`,children:[(0,F.jsx)(`span`,{className:`text-primary`,title:e.cron,children:e.scheduleMode===`continuous`?`continuous · ${e.continuousDelayMinutes}m`:nt(e.cron)}),(0,F.jsx)(`span`,{className:`mx-2.5 text-wire`,children:`·`}),e.kind]}),(0,F.jsxs)(`div`,{className:`mt-1 truncate text-caption text-disabled`,title:`Model: ${e.model||`default`} · Reasoning: ${e.reasoningEffort||`default`}`,children:[`Model: `,e.model||`default`,` · Reasoning: `,e.reasoningEffort||`default`]})]})]}),(0,F.jsx)(Je,{job:e,runs:l,total:e.runCount,onLoadMore:async()=>{let t=l[0];if(!t)return 0;let n=await h({data:{loopId:e.id,beforeTs:t.ts,limit:16}});return n.length&&c(e=>Xe(e,n)),n.length},onPickRun:t=>n(e.id,t)}),(0,F.jsxs)(`div`,{className:`mt-[18px] flex items-center gap-2 text-label text-secondary`,children:[(0,F.jsxs)(`span`,{children:[e.runCount,` runs`]}),i&&(0,F.jsxs)(`span`,{children:[`· last `,tt(i),o&&` · ${$e(i.ts)}`]})]}),d?.reportIncident&&(0,F.jsx)(`div`,{className:`mt-1.5 text-label text-secondary`,children:d.phase===`error`?`Last run failed · Terminal report rejected`:`Last run telemetry warning · Terminal report rejected`})]})}function qr(e){document.cookie=`pievo.team=${encodeURIComponent(e)}; path=/; max-age=31536000; samesite=lax`}function Jr({data:e}){let t=Oe();if(!e||e.teams.length===0)return null;let n=e=>{qr(e),t({to:`/t/$teamId`,params:{teamId:e}})};return e.teams.length===1?(0,F.jsx)(`span`,{title:`Active team`,className:`inline-flex items-center rounded-full bg-raised px-3 py-1 text-label font-medium text-secondary`,children:e.teams[0].name}):(0,F.jsx)(`select`,{"aria-label":`Active team`,value:e.activeTeamId,onChange:e=>n(e.target.value),className:`lp-select cursor-pointer rounded-full bg-raised py-1 pl-3 text-label font-medium text-secondary outline-none transition-colors hover:text-display`,children:e.teams.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.name},e.id))})}var Yr={telegram:{label:`Telegram`,help:`Create a bot with @BotFather, then DM it once so it can message you.`,fields:[{key:`botToken`,label:`Bot token`,ph:`123456:ABC-DEF…`},{key:`chatId`,label:`Chat id`,ph:`e.g. 87654321 (message @userinfobot to get yours)`}]},feishu:{label:`Feishu`,help:`In a Feishu group: 设置 → 机器人 → 添加自定义机器人. Pick a security setting (signing recommended; paste the secret below if you enabled 签名校验).`,fields:[{key:`webhookUrl`,label:`Webhook URL`,ph:`https://open.feishu.cn/open-apis/bot/v2/hook/…`},{key:`secret`,label:`Signing secret (optional)`,ph:`only if you enabled 签名校验`,optional:!0}]}},Xr=[`telegram`,`feishu`];function Zr(e){return Yr[e]?.label??(e===`slack`?`Slack`:e)}function Qr({open:e,onClose:t}){let[n,r]=(0,P.useState)([]),[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)({}),[u,d]=(0,P.useState)(!1),[f,p]=(0,P.useState)(null),[m,h]=(0,P.useState)({}),g=(0,P.useCallback)(async()=>{try{r(await Ye())}catch{}},[]);(0,P.useEffect)(()=>{if(!e){p(null),a(null);return}g()},[e,g]);function _(e){s(``),l({}),p(null),a(e)}let v=i?Yr[i]:null,y=!!o.trim()&&!!v&&v.fields.every(e=>e.optional||c[e.key]?.trim());async function b(){if(!(!i||!v)){p(null),d(!0);try{let e=Object.fromEntries(v.fields.filter(e=>c[e.key]?.trim()).map(e=>[e.key,c[e.key].trim()])),t=await Ze({data:{type:i,name:o.trim(),config:e}});if(!t.ok){p(t.error??`Could not save this channel.`);return}a(null),await g()}finally{d(!1)}}}async function x(e){p(null);let t=await qe({data:e});if(!t.ok){p(t.error??`Could not delete this channel.`);return}await g()}async function S(e){h(t=>({...t,[e]:`sending`}));let t=await Ge({data:e});h(n=>({...n,[e]:t.ok?`ok`:t.error||`failed`})),setTimeout(()=>h(t=>({...t,[e]:``})),4e3)}return(0,F.jsxs)(He,{open:e,onClose:t,children:[(0,F.jsx)(Be,{title:`Notifications`,sub:`Push channels for this team. A loop routes its run messages to the channel you pick on it.`}),f&&(0,F.jsx)(ut,{message:f,onDismiss:()=>p(null),className:`mb-2 mt-3`}),(0,F.jsx)(Ve,{children:`Channels`}),n.length===0&&!i&&(0,F.jsx)(`div`,{className:`py-3 text-body text-secondary`,children:`No channels yet.`}),(0,F.jsx)(`ul`,{className:`flex flex-col gap-2`,children:n.map(e=>{let t=m[e.id];return(0,F.jsxs)(`li`,{className:`flex items-center justify-between gap-3 rounded-control border border-hairline bg-surface px-4 py-3`,children:[(0,F.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,F.jsx)(`span`,{className:`text-[15px] font-medium text-display`,children:e.name}),(0,F.jsxs)(`span`,{className:`text-label text-secondary`,children:[Zr(e.type),` · `,e.hint]})]}),(0,F.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[t&&t!==`sending`&&(0,F.jsx)(`span`,{className:`inline-flex h-[22px] items-center gap-1.5 rounded-full px-2.5 text-caption font-medium ${t===`ok`?`bg-success-soft text-success`:`bg-accent-soft text-accent`}`,title:t===`ok`?void 0:t,children:t===`ok`?`Sent ✓`:`Failed`}),(0,F.jsx)(`button`,{className:st,disabled:t===`sending`,onClick:()=>void S(e.id),children:t===`sending`?`Sending…`:`Test`}),(0,F.jsx)(`button`,{className:rt,onClick:()=>void x(e.id),children:`Delete`})]})]},e.id)})}),i&&v?(0,F.jsxs)(`div`,{className:`mt-4 rounded-control border border-hairline bg-raised px-4 py-3`,children:[(0,F.jsxs)(Ve,{children:[`New `,v.label,` channel`]}),(0,F.jsx)(`label`,{className:ot,children:`Name`}),(0,F.jsx)(`input`,{className:ct,value:o,onChange:e=>s(e.target.value),placeholder:`e.g. My alerts`}),v.fields.map(e=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`label`,{className:ot,children:e.label}),(0,F.jsx)(`input`,{className:`${ct} font-mono`,value:c[e.key]??``,onChange:t=>l(n=>({...n,[e.key]:t.target.value})),placeholder:e.ph})]},e.key)),(0,F.jsx)(`div`,{className:`mt-1 text-label text-secondary`,children:v.help}),(0,F.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,F.jsx)(`button`,{className:st,onClick:()=>a(null),children:`Cancel`}),(0,F.jsx)(`button`,{className:at,disabled:u||!y,onClick:()=>void b(),children:u?`Saving…`:`Save channel`})]})]}):(0,F.jsx)(`div`,{className:`mt-6 flex gap-2`,children:Xr.map(e=>(0,F.jsxs)(`button`,{className:at,onClick:()=>_(e),children:[`+ Add `,Yr[e]?.label??e]},e))})]})}var $r=w({method:`GET`}).handler(a(`94d1108f156fa2273cb78140852e9c3e368de0b8321db0de932a16567671716f`)),ei=w({method:`GET`}).handler(a(`fc7a4775f418dde12f422ff9ca65d9e07428fb0dc35c9399592c0081467330bf`)),ti=w({method:`POST`}).handler(a(`0f279cfe81021a642289ce6e95622e7198aaeab4147880f85824a02ee9ebafcf`)),ni=w({method:`POST`}).handler(a(`5721e01d84c20ffde19d2191648d76a7e5ede3bbb4f44efa59107a786947cf27`)),ri=w({method:`POST`}).handler(a(`d2372a81af17eb3a7e4c1407d6ef26a8a9522b66fd6a94858cb35c864b270d77`)),ii=w({method:`POST`}).handler(a(`284cb82b5e5cb37242d053b1b14449760d8334e9dadffc6dcbba11db2200a709`)),ai=w({method:`POST`}).handler(a(`c3762cecd4a15f7eca064bca295255e942d7c3dce65f66f8593ae145fd7859a0`)),oi=w({method:`POST`}).handler(a(`a3326ed8ecd726fbcc28a439bf0012983cbe387d5062e0155096ee5a558e313b`)),si=w({method:`POST`}).handler(a(`fe7cc1df829414194e9b0615b86584c8510369da18f4d8805ccd76468cadf2ff`)),ci=w({method:`POST`}).handler(a(`bbc1020c771335020ef51b326d74b1649966740f273913d32040fa2c3c9f5f0b`)),li=w({method:`POST`}).handler(a(`b92e9a08eda2d217bf4028f90dbc6bf7d7e8d7c148ebb8a8330286b5935a3fa1`)),ui=w({method:`POST`}).handler(a(`6f5fe23f6da1d4aecc198b6f71a041c0fe29cabb6ccad807bb3f16c23c5bd9cd`));function di(e){return`${typeof window<`u`?window.location.origin:``}/invite/${e}`}function fi({text:e}){let[t,n]=(0,P.useState)(!1);return(0,F.jsx)(`button`,{className:it,onClick:()=>{navigator.clipboard?.writeText(e),n(!0),setTimeout(()=>n(!1),1400)},children:t?`Copied ✓`:`Copy link`})}function pi({open:e,onClose:t,activeTeamId:n}){let r=Oe(),[i,a]=(0,P.useState)([]),[o,s]=(0,P.useState)(null),[c,l]=(0,P.useState)(null),[u,d]=(0,P.useState)(null),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(``),[g,_]=(0,P.useState)(``),[v,y]=(0,P.useState)(``),[b,x]=(0,P.useState)(`member`),[S,C]=(0,P.useState)(`member`),[w,ee]=(0,P.useState)(null),T=(0,P.useCallback)(async()=>{try{a(await $r())}catch{}},[]),E=(0,P.useCallback)(async e=>{let t=await ei({data:e});if(`error`in t){d(t.error),l(null);return}l(t),_(t.name)},[]);(0,P.useEffect)(()=>{if(!e){d(null),s(null),l(null),ee(null);return}T()},[e,T]),(0,P.useEffect)(()=>{!e||!o||(ee(null),E(o))},[e,o,E]);async function D(e){p(!0),d(null);try{return await e()}finally{p(!1)}}async function te(){let e=m.trim();e&&await D(async()=>{let t=await ti({data:e});if(!t.ok)return d(t.error);h(``),await T(),s(t.id)})}async function ne(){if(!c)return;let e=g.trim();!e||e===c.name||await D(async()=>{let t=await ni({data:{teamId:c.id,name:e}});if(!t.ok)return d(t.error);await T(),await E(c.id)})}async function re(){c&&await D(async()=>{let e=await ri({data:c.id});if(!e.ok)return d(e.error);let i=c.id;s(null),l(null),await T(),i===n&&(t(),r({to:`/`}))})}async function ie(){c&&await D(async()=>{let e=await si({data:c.id});if(!e.ok)return d(e.error);let i=c.id;s(null),l(null),await T(),i===n&&(t(),r({to:`/`}))})}async function ae(){if(!c)return;let e=v.trim();e&&await D(async()=>{let t=await ii({data:{teamId:c.id,email:e,role:b}});if(!t.ok)return d(t.error);y(``),await E(c.id),await T()})}async function oe(e,t){c&&await D(async()=>{let n=await ai({data:{teamId:c.id,userId:e,role:t}});if(!n.ok)return d(n.error);await E(c.id)})}async function O(e){c&&await D(async()=>{let t=await oi({data:{teamId:c.id,userId:e}});if(!t.ok)return d(t.error);await E(c.id),await T()})}async function k(){c&&await D(async()=>{let e=await ci({data:{teamId:c.id,role:S}});if(!e.ok)return d(e.error);ee(e.token),await E(c.id)})}async function se(e){c&&await D(async()=>{let t=await li({data:{teamId:c.id,token:e}});if(!t.ok)return d(t.error);w===e&&ee(null),await E(c.id)})}let ce=c?.role===`owner`;return(0,F.jsxs)(He,{open:e,onClose:t,wide:!0,children:[(0,F.jsx)(Be,{title:`Teams`,sub:`Create teams, manage members and roles, and invite people. Team management is owner-only; any member can create loops.`}),u&&(0,F.jsx)(ut,{message:u,onDismiss:()=>d(null),className:`mb-2 mt-3`}),(0,F.jsxs)(`div`,{className:`mt-3 grid gap-6 md:grid-cols-[minmax(0,18rem)_minmax(0,1fr)]`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(Ve,{children:`My teams`}),i.length===0&&(0,F.jsx)(`div`,{className:`py-2 text-body text-secondary`,children:`No teams yet.`}),(0,F.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:i.map(e=>(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{onClick:()=>s(e.id),className:`flex w-full items-center justify-between gap-2 rounded-control border px-3 py-2 text-left transition-colors ${o===e.id?`border-display bg-raised`:`border-hairline bg-surface hover:bg-raised`}`,children:[(0,F.jsx)(`span`,{className:`min-w-0 truncate text-[15px] font-medium text-display`,children:e.name}),(0,F.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:[(0,F.jsx)(lt,{tone:e.role===`owner`?`ink`:`neutral`,children:e.role}),(0,F.jsxs)(`span`,{className:`text-label text-secondary`,children:[e.memberCount,` member`,e.memberCount===1?``:`s`]})]})]})},e.id))}),(0,F.jsxs)(`div`,{className:`mt-4 rounded-control border border-hairline bg-raised px-3 py-3`,children:[(0,F.jsx)(`label`,{className:`${ot} mt-0`,children:`New team`}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`input`,{className:ct,value:m,onChange:e=>h(e.target.value),placeholder:`e.g. Growth Squad`,onKeyDown:e=>e.key===`Enter`&&void te()}),(0,F.jsx)(`button`,{className:at,disabled:f||!m.trim(),onClick:()=>void te(),children:`Create`})]})]})]}),(0,F.jsx)(`div`,{className:`min-w-0`,children:c?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(Ve,{action:(0,F.jsx)(`button`,{className:it,onClick:()=>{qr(c.id),t(),r({to:`/t/$teamId`,params:{teamId:c.id}})},children:`Open dashboard →`}),children:[c.name,c.personal?` · personal`:``]}),ce&&(0,F.jsxs)(`div`,{className:`mb-4`,children:[(0,F.jsx)(`label`,{className:`mb-1.5 mt-3 block text-label font-medium text-secondary`,children:`Team name`}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`input`,{"aria-label":`Team name`,className:ct,value:g,onChange:e=>_(e.target.value)}),(0,F.jsx)(`button`,{className:st,disabled:f||!g.trim()||g.trim()===c.name,onClick:()=>void ne(),children:`Rename`})]})]}),(0,F.jsx)(Ve,{children:`Members`}),(0,F.jsx)(`ul`,{className:`flex flex-col gap-2`,children:c.members.map(e=>(0,F.jsxs)(`li`,{className:`flex items-center justify-between gap-3 rounded-control border border-hairline bg-surface px-3 py-2.5`,children:[(0,F.jsx)(`div`,{className:`flex min-w-0 flex-col`,children:(0,F.jsxs)(`span`,{className:`truncate text-[15px] font-medium text-display`,children:[e.email??e.displayName??e.userId,e.isSelf&&(0,F.jsx)(`span`,{className:`ml-1.5 text-label text-secondary`,children:`(you)`})]})}),(0,F.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:ce&&!e.isSelf?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`select`,{"aria-label":`Role`,className:`${ft} w-auto py-1.5`,value:e.role,onChange:t=>void oe(e.userId,t.target.value),children:[(0,F.jsx)(`option`,{value:`owner`,children:`owner`}),(0,F.jsx)(`option`,{value:`member`,children:`member`})]}),(0,F.jsx)(`button`,{className:rt,disabled:f,onClick:()=>void O(e.userId),children:`Remove`})]}):(0,F.jsx)(lt,{tone:e.role===`owner`?`ink`:`neutral`,children:e.role})})]},e.userId))}),ce&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`mt-4 rounded-control border border-hairline bg-raised px-3 py-3`,children:[(0,F.jsx)(`label`,{className:`mb-1.5 mt-3 block text-label font-medium text-secondary mt-0`,children:`Add a member by email`}),(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,F.jsx)(`input`,{className:`${ct} min-w-[12rem] flex-1`,value:v,onChange:e=>y(e.target.value),placeholder:`teammate@example.com`,onKeyDown:e=>e.key===`Enter`&&void ae()}),(0,F.jsxs)(`select`,{"aria-label":`Role for new member`,className:`${ft} w-auto`,value:b,onChange:e=>x(e.target.value),children:[(0,F.jsx)(`option`,{value:`member`,children:`member`}),(0,F.jsx)(`option`,{value:`owner`,children:`owner`})]}),(0,F.jsx)(`button`,{className:at,disabled:f||!v.trim(),onClick:()=>void ae(),children:`Add`})]}),(0,F.jsx)(`div`,{className:`mt-1.5 text-label text-secondary`,children:`Adds an existing Pievo account immediately. No account yet? Generate an invite link below.`})]}),(0,F.jsx)(Ve,{children:`Invite links`}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,F.jsxs)(`select`,{"aria-label":`Invite role`,className:`${ft} w-auto`,value:S,onChange:e=>C(e.target.value),children:[(0,F.jsx)(`option`,{value:`member`,children:`as member`}),(0,F.jsx)(`option`,{value:`owner`,children:`as owner`})]}),(0,F.jsx)(`button`,{className:st,disabled:f,onClick:()=>void k(),children:`Generate invite link`}),(0,F.jsx)(`span`,{className:`text-label text-secondary`,children:`Single-use · expires in 7 days`})]}),c.invites.length>0&&(0,F.jsx)(`ul`,{className:`mt-3 flex flex-col gap-2`,children:c.invites.map(e=>(0,F.jsxs)(`li`,{className:`flex items-center justify-between gap-3 rounded-control border border-hairline bg-surface px-3 py-2.5`,children:[(0,F.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,F.jsx)(lt,{tone:`neutral`,children:e.role}),(0,F.jsx)(`span`,{className:`min-w-0 truncate font-mono text-label ${w===e.token?`text-display`:`text-secondary`}`,children:di(e.token)})]}),(0,F.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,F.jsx)(fi,{text:di(e.token)}),(0,F.jsx)(`button`,{className:rt,disabled:f,onClick:()=>void se(e.token),children:`Revoke`})]})]},e.token))})]}),(0,F.jsxs)(`div`,{className:`mt-6 flex items-center justify-between gap-3 border-t border-hairline pt-4`,children:[c.personal?(0,F.jsx)(`span`,{className:`text-label text-secondary`,children:`Your personal team can't be left or deleted.`}):(0,F.jsx)(`button`,{className:st,disabled:f,onClick:()=>void ie(),children:`Leave team`}),ce&&!c.personal&&(0,F.jsxs)(`button`,{className:rt,disabled:f||c.loopCount>0,title:c.loopCount>0?`Move or delete this team's ${c.loopCount} loop${c.loopCount===1?``:`s`} first`:void 0,onClick:()=>void re(),children:[`Delete team`,c.loopCount>0?` (${c.loopCount} loop${c.loopCount===1?``:`s`})`:``]})]})]}):(0,F.jsx)(`div`,{className:`flex h-full items-center justify-center py-10 text-body text-secondary`,children:`Select a team to manage it, or create one.`})})]})]})}var mi={"react-doctor":{worktreeLabel:`Isolated git worktree · off main`,nodes:[{id:`tick`,kicker:`On schedule`,glyph:`◷`,title:`Every day · 6am`,detail:`the loop wakes on cadence`},{id:`scan`,kicker:`Step 1 · Scan`,glyph:`⌕`,title:`Scan the app`,detail:(0,F.jsx)(`code`,{children:`npx react-doctor@latest`})},{id:`prio`,kicker:`Step 2 · Prioritise`,glyph:`⚖`,title:`Pick one issue`,detail:`the worst, by severity & perf impact`},{id:`fix`,wt:!0,kicker:`Step 3 · Fix`,glyph:`✎`,title:`Fix in isolation`,detail:`smallest change, fresh branch`},{id:`verify`,wt:!0,kicker:`Step 4 · Verify`,glyph:`▷`,title:`Verify the fix`,detail:`prove it holds before proposing`},{id:`ship`,wt:!0,kicker:`Step 5 · Ship`,glyph:`⑂`,title:`Open a PR`,detail:`skip if a prior PR's still open`}],dashboard:[{type:`kanban`,heading:`PR board`,sub:`open → merged`,columns:[[`Open`,[[`#231`,`Key-less list items in <Feed/>`,`opened 6h ago`],[`#219`,`Missing memo on heavy list row`,`opened 1d ago`]]],[`Merged`,[[`#212`,`Effect re-runs on every render`,`merged 2d ago`],[`#205`,`Unmemoised context value`,`merged 4d ago`],[`#198`,`Inline object prop churn`,`merged 6d ago`]]]]},{type:`metric`,label:`Health score`,series:[66,68,67,71,72,71,75,77,76,79,81,80,83,84]}]},"docs-sweep":{worktreeLabel:`Isolated git worktree · off main`,nodes:[{id:`tick`,kicker:`On schedule`,glyph:`◷`,title:`Every Mon · 6am`,detail:`weekly · picks up where it left off`},{id:`diff`,kicker:`Step 1 · Compare`,glyph:`⌕`,title:`Diff since last sweep`,detail:`docs vs. what the code ships now`},{id:`verify`,kicker:`Step 2 · Verify`,glyph:`▷`,title:`Verify for real`,detail:`run the commands, links & examples`},{id:`fix`,wt:!0,kicker:`Step 3 · Fix`,glyph:`✎`,title:`Fix real drift only`,detail:`never rewrite accurate docs`},{id:`ship`,wt:!0,kicker:`Step 4 · Ship`,glyph:`⑂`,title:`Open a PR`,detail:`explains the drift · no stacking`}],dashboard:[{type:`embed`,heading:`Latest sweep summary`,title:`Docs drift — weekly sweep`,date:`2026-07-06`,lines:[`3 items fixed, each verified by running it`,`README — dev server is :3001, not :3000`,`Setup guide — dropped a dead /api/v1 link`,"Quickstart — refreshed `pievo new` flags"]},{type:`metric`,label:`Drift count`,series:[6,4,5,3,2,3,1,2,1,0],note:`0 = docs are honest — a clean stop, no PR.`,betterDown:!0}]},"error-sweep":{worktreeLabel:`Isolated git worktree · off main`,nodes:[{id:`setup`,setup:!0,kicker:`Before first run`,glyph:`⚙`,title:`Verify an error source`,detail:`smoke-test logs / tracker / gh · confirm window`},{id:`tick`,kicker:`On schedule`,glyph:`◷`,title:`Every day · 6am`,detail:`sweeps the agreed window`},{id:`sweep`,kicker:`Step 1 · Sweep`,glyph:`⌕`,title:`Group into incidents`,detail:`cluster repeated symptoms`},{id:`triage`,kicker:`Step 2 · Triage`,glyph:`⚖`,title:`Actionable vs. noise`,detail:`drop upstream & noise`},{id:`fix`,wt:!0,kicker:`Step 3 · Fix`,glyph:`✎`,title:`Root-cause & fix`,detail:`smallest verified fix`},{id:`ship`,wt:!0,kicker:`Step 4 · Ship`,glyph:`⑂`,title:`One PR per fix`,detail:`no stacking · never leak secrets`}],dashboard:[{type:`embed`,heading:`Newest report`,title:`Error sweep — daily`,date:`2026-07-08`,lines:[`2 actionable, 14 noise filtered out`,`Checkout 500 — null cart on retry (fixed)`,`/api/render timeout — upstream, watching`,`No credentials or PII in this report`]},{type:`metric`,label:`Actionable errors`,series:[5,3,4,2,3,1,2,1,0,1],note:`0 actionable = a clean stop, no PR.`,betterDown:!0}]},housekeeper:{worktreeLabel:`Isolated git worktree · off main`,nodes:[{id:`tick`,kicker:`On schedule`,glyph:`◷`,title:`Every day · 7am`,detail:`one cleanup a day, no more`},{id:`survey`,kicker:`Step 1 · Survey`,glyph:`⌕`,title:`Find housekeeping debt`,detail:`dead code, stale files, dupes, unused deps`},{id:`prove`,kicker:`Step 2 · Prove`,glyph:`⚖`,title:`Pick one, prove it safe`,detail:`concrete evidence · uncertain → deferred`},{id:`fix`,wt:!0,kicker:`Step 3 · Fix`,glyph:`✎`,title:`Smallest change`,detail:`keep only if build & tests stay green`},{id:`ship`,wt:!0,kicker:`Step 4 · Ship`,glyph:`⑂`,title:`Open a PR`,detail:`no stacking on an open PR`}],dashboard:[{type:`kanban`,heading:`Cleanup board`,sub:`open → merged`,columns:[[`Open`,[[`#142`,`Remove dead export in utils/date`,`opened 5h ago`],[`#138`,`Drop unused dep left-pad`,`opened 2d ago`]]],[`Merged`,[[`#131`,`Delete stale scripts/legacy dir`,`merged 1d ago`],[`#124`,`Dedupe two clamp() helpers`,`merged 3d ago`],[`#119`,`Rename inconsistent isLoading flags`,`merged 5d ago`]]]]},{type:`metric`,label:`Cleanups landed`,series:[0,1,1,2,3,3,4,5,6,6,7,9,10,12]}]},"dependency-triage":{worktreeLabel:`Isolated git worktree · off main`,nodes:[{id:`setup`,setup:!0,kicker:`Before first run`,glyph:`⚙`,title:`Confirm merge authority`,detail:`smoke-test gh sees Dependabot/Renovate · agree merge policy`},{id:`tick`,kicker:`On schedule`,glyph:`◷`,title:`Every Mon`,detail:`weekly · snapshots the open PRs`},{id:`snapshot`,kicker:`Step 1 · Snapshot`,glyph:`⌕`,title:`List open dep PRs`,detail:`process each exactly once`},{id:`judge`,kicker:`Step 2 · Judge`,glyph:`⚖`,title:`Weigh real evidence`,detail:`diff · release notes · advisories · CI at head`},{id:`test`,wt:!0,kicker:`Step 3 · Test`,glyph:`▷`,title:`Run tests in isolation`,detail:`at the exact head · checkout untouched`},{id:`merge`,wt:!0,kicker:`Step 4 · Merge`,glyph:`⑂`,title:`Merge only what’s authorized`,detail:`major/breaking/security → recommend, don’t merge`}],dashboard:[{type:`kanban`,heading:`Dependency PRs`,sub:`merged · deferred · blocked`,columns:[[`Merged`,[[`#412`,`bump vite 7.0→7.1 (patch)`,`merged 1h ago`],[`#408`,`bump @types/node 20→20.14 (minor)`,`merged 3h ago`]]],[`Deferred`,[[`#399`,`react 18→19 (major) — review`,`deferred 2d ago`],[`#391`,`drizzle-orm 0.30→0.31 — CI red`,`deferred 2d ago`]]],[`Blocked`,[[`#405`,`lodash advisory GHSA-…-qxrp (high)`,`flagged 1h ago`]]]]},{type:`metric`,label:`Open dependency PRs`,series:[9,8,8,6,7,5,4,3,4,2],note:`trends down as PRs are merged or resolved.`,betterDown:!0}]},"market-research":{worktreeLabel:``,nodes:[{id:`setup`,setup:!0,kicker:`Before first run`,glyph:`⚙`,title:`Confirm the research focus`,detail:`infer the product & space · propose a focus, confirm`},{id:`tick`,kicker:`On schedule`,glyph:`◷`,title:`Every day · 5am`,detail:`the loop wakes on cadence`},{id:`research`,kicker:`Step 1 · Research`,glyph:`⌕`,title:`Scan today's market`,detail:`competitors, launches, pricing, ecosystem news`},{id:`report`,kicker:`Step 2 · Report`,glyph:`✎`,title:`One dated report`,detail:(0,F.jsx)(`code`,{children:`type: report · title · date`})},{id:`sharpen`,kicker:`Step 3 · Sharpen`,glyph:`✧`,title:`Sharpen the focus`,detail:`lean into what keeps turning out to matter`}],dashboard:[{type:`calendar`,heading:`Reports calendar`,monthLabel:`July 2026`,days:31,firstWeekday:2,reportDays:[1,2,3,6,7,8]},{type:`embed`,heading:`Newest report`,title:`Market watch — daily digest`,date:`2026-07-08`,lines:[`Today's signal: two rivals converged on usage-based pricing`,`Northwind shipped an AI triage add-on, free in beta`,`Acme cut its Team tier 20% and dropped the seat minimum`,`Ecosystem: a new OSS connector spec is gaining traction`]}]},"follow-up-tracker":{worktreeLabel:``,nodes:[{id:`setup`,setup:!0,kicker:`Before first run`,glyph:`⚙`,title:`Verify + define the target`,detail:`smoke-test an observation path · set a standing objective`},{id:`tick`,kicker:`On cadence`,glyph:`◷`,title:`A few times a day`,detail:`wakes on cadence — no fixed clock time`},{id:`observe`,kicker:`Step 1 · Observe`,glyph:`⌕`,title:`Check the outcome`,detail:`through the verified path — logs / URL / gh`},{id:`report`,kicker:`Step 2 · Report`,glyph:`◈`,title:`Report what you find`,detail:`one report · a metric when natural`},{id:`check`,kicker:`Step 3 · Check`,glyph:`⚖`,title:`Track the objective`,detail:`keep watching and surface regressions`}],dashboard:[{type:`embed`,heading:`Latest observation`,title:`Checkout fix — follow-up`,date:`2026-07-08`,lines:[`conversion 29% → 44% over 3 days`,`no error spikes since the deploy`,`goal: hold ≥ 40% for 48h — 31h in, on track`]},{type:`metric`,label:`Checkout conversion %`,series:[29,31,30,34,37,39,41,43,44],note:`objective: sustain ≥ 40%; keep watching for regressions.`}]}},hi=e=>e in mi,gi=344,_i=68,vi=248,yi=64,bi=192,xi=6,Si=30,Ci=48,wi=280,Ti=18,Ei=16,Di=e=>e.setup?78:yi;function Oi(e){let t=e.findIndex(e=>!e.setup),n=[],r=xi;e.forEach((i,a)=>{if(a>0){let t=!!e[a-1].wt,n=!!i.wt,o=!t&&n?48:t&&n?30:36;r+=Di(e[a-1])+o}let o=i.setup?`setup`:a===t?`tick`:`step`;n.push({...i,kind:o,x:_i,y:r,w:vi,h:Di(i)})});let i=n.filter(e=>e.wt),a=i.length?{x:Ci,y:i[0].y-Ti,w:wi,h:i[i.length-1].y+i[i.length-1].h+Ei-(i[0].y-Ti)}:null,o=[];for(let e=0;e<n.length-1;e++)o.push(`M${bi} ${n[e].y+n[e].h} L${bi} ${n[e+1].y-4}`);let s=n[t],c=s.y+s.h/2,l=n[n.length-1],u=o.length,d=l.y+l.h+28;return o.push(`M${bi} ${l.y+l.h} L${bi} ${d-6} Q${bi} ${d} ${bi-6} ${d} L36 ${d} Q${Si} ${d} ${Si} ${d-6} L${Si} ${c+6} Q${Si} ${c} 36 ${c} L${_i-4} ${c}`),{nodes:n,wires:o,route:`M${n.slice(t).map(e=>`${bi} ${e.y+e.h/2}`).join(` L `)} L${bi} ${d} L${Si} ${d} L${Si} ${c} L${_i-4} ${c}`,worktree:a,returnWireIndex:u,viewW:gi,viewH:d+14}}function ki({template:e}){let t=mi[e.name],[n,r]=(0,P.useState)(`flow`);return t?(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`div`,{className:`mb-4 inline-flex rounded-full border border-hairline bg-raised p-0.5 text-label`,children:[(0,F.jsx)(Ai,{active:n===`flow`,onClick:()=>r(`flow`),children:`Loop flow`}),(0,F.jsx)(Ai,{active:n===`dashboard`,onClick:()=>r(`dashboard`),children:`Dashboard`})]}),n===`flow`?(0,F.jsx)(ji,{spec:t}):(0,F.jsx)(Mi,{spec:t})]}):null}function Ai({active:e,onClick:t,children:n}){return(0,F.jsx)(`button`,{type:`button`,onClick:t,className:`cursor-pointer rounded-full px-3.5 py-1.5 font-medium transition-colors ${e?`bg-surface text-display shadow-card`:`text-secondary hover:text-display`}`,children:n})}function ji({spec:e}){let t=(0,P.useMemo)(()=>Oi(e.nodes),[e]),n=(0,P.useRef)(null);return(0,P.useEffect)(()=>{let e=n.current;if(!e||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)return;let r=e.querySelector(`.lpf-route`),i=e.querySelector(`.lpf-pulse`),a=e.querySelector(`.lpf-comet`);if(!r||!i||!a)return;let o=r.getTotalLength(),s=[];for(let e=0;e<=600;e++){let t=o*e/600,n=r.getPointAtLength(t);s.push([t,n.x,n.y])}let c=(e,t)=>{let n=0,r=1/0;for(let i of s){let a=(i[1]-e)**2+(i[2]-t)**2;a<r&&(r=a,n=i[0])}return n},l=new Map;e.querySelectorAll(`[data-lpf]`).forEach(e=>l.set(e.dataset.lpf,e));let u=t.nodes.filter(e=>e.kind!==`setup`).map(e=>({len:c(e.x+e.w/2,e.y+e.h/2),el:l.get(e.id)})).filter(e=>e.el).sort((e,t)=>e.len-t.len),d=210/1e3,f=[],p=u[0],m=u[u.length-1];f.push({type:`dwell`,at:p,dur:520});for(let e=0;e<u.length-1;e++){let t=u[e],n=u[e+1];f.push({type:`move`,from:t.len,to:n.len,dur:Math.max(360,(n.len-t.len)/d)}),f.push({type:`dwell`,at:n,dur:520})}f.push({type:`return`,from:m.len,to:o,dur:Math.max(720,(o-m.len)/d)}),f.push({type:`dwell`,at:p,dur:160,restart:!0}),a.setAttribute(`stroke-dasharray`,`52 ${o}`);let h=e=>{let t=Math.max(0,Math.min(o,e)),n=r.getPointAtLength(t);i.setAttribute(`cx`,n.x.toFixed(2)),i.setAttribute(`cy`,n.y.toFixed(2)),a.setAttribute(`stroke-dashoffset`,(-(e-52*.5)).toFixed(2))},g=()=>u.forEach(e=>e.el.classList.remove(`active`)),_=()=>u.forEach(e=>e.el.classList.remove(`visited`)),v=e=>{g(),e.el.classList.add(`active`,`visited`)},y=0,b=performance.now(),x=0,S=e=>{let t=f[y],n=e-b;if(n>=t.dur)(t.type===`move`||t.type===`return`)&&t.to!=null&&h(t.to),y=(y+1)%f.length,b=e,t=f[y],t.restart&&_(),t.type===`dwell`&&t.at&&(v(t.at),h(t.at.len)),t.type===`return`&&g();else if((t.type===`move`||t.type===`return`)&&t.from!=null&&t.to!=null){let e=n/t.dur,r=e<.5?2*e*e:1-(-2*e+2)**2/2;h(t.from+(t.to-t.from)*r)}else t.at&&h(t.at.len);x=requestAnimationFrame(S)};return v(p),h(p.len),x=requestAnimationFrame(S),()=>cancelAnimationFrame(x)},[t]),(0,F.jsx)(`div`,{ref:n,children:(0,F.jsx)(`div`,{className:`overflow-x-auto`,children:(0,F.jsxs)(`div`,{className:`relative mx-auto`,style:{width:t.viewW,height:t.viewH},children:[(0,F.jsxs)(`svg`,{className:`absolute inset-0`,width:t.viewW,height:t.viewH,viewBox:`0 0 ${t.viewW} ${t.viewH}`,"aria-hidden":`true`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(`marker`,{id:`lpf-arw`,markerUnits:`userSpaceOnUse`,viewBox:`0 0 8 8`,refX:`6`,refY:`4`,markerWidth:`9`,markerHeight:`9`,orient:`auto-start-reverse`,children:(0,F.jsx)(`path`,{d:`M1.2 1.2 L7 4 L1.2 6.8 Z`,fill:`var(--color-interactive)`})}),(0,F.jsxs)(`filter`,{id:`lpf-glow`,x:`-60%`,y:`-60%`,width:`220%`,height:`220%`,children:[(0,F.jsx)(`feGaussianBlur`,{stdDeviation:`2.4`,result:`b`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`b`}),(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,F.jsx)(`path`,{className:`lpf-route`,fill:`none`,d:t.route})]}),t.wires.map((e,n)=>(0,F.jsx)(`path`,{className:`lpf-wire`,d:e,fill:`none`,strokeWidth:2,strokeLinecap:`round`,strokeDasharray:n===t.returnWireIndex?`6 6`:void 0,markerEnd:`url(#lpf-arw)`},n)),(0,F.jsx)(`path`,{className:`lpf-comet`,d:t.route,fill:`none`,strokeWidth:2.5,strokeLinecap:`round`,filter:`url(#lpf-glow)`,opacity:.9}),(0,F.jsx)(`circle`,{className:`lpf-pulse`,r:3.8,filter:`url(#lpf-glow)`})]}),t.worktree&&(0,F.jsx)(`div`,{className:`absolute rounded-[14px] border border-dashed`,style:{left:t.worktree.x,top:t.worktree.y,width:t.worktree.w,height:t.worktree.h,borderColor:`var(--color-interactive)`,background:`var(--color-interactive-soft)`},children:(0,F.jsx)(`span`,{className:`absolute px-2 font-mono text-[9.5px] font-semibold uppercase tracking-[0.1em]`,style:{top:-9,left:16,background:`var(--color-surface)`,color:`var(--color-interactive)`},children:e.worktreeLabel})}),t.nodes.map(e=>(0,F.jsxs)(`div`,{"data-lpf":e.id,className:`lpf-node${e.kind===`tick`?` tick`:``}`,style:{left:e.x,top:e.y,width:e.w,height:e.h},children:[(0,F.jsxs)(`div`,{className:`lpf-k`,children:[(0,F.jsx)(`span`,{className:`g`,children:e.glyph}),e.kicker]}),(0,F.jsx)(`div`,{className:`lpf-t`,children:e.title}),(0,F.jsx)(`div`,{className:`lpf-d`,children:e.detail})]},e.id))]})})})}function Mi({spec:e}){return(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`p`,{className:`mb-4 text-body leading-snug text-secondary`,children:`Pievo sets up a dashboard to track results.`}),e.dashboard.map((e,t)=>(0,F.jsx)(`div`,{className:`min-w-0 ${t>0?`mt-6`:``}`,children:e.type===`kanban`?(0,F.jsx)(Fi,{w:e}):e.type===`metric`?(0,F.jsx)(R,{w:e}):e.type===`calendar`?(0,F.jsx)(Pi,{w:e}):(0,F.jsx)(L,{w:e})},t))]})}var Ni=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`];function Pi({w:e}){let t=new Set(e.reportDays),n=(7-(e.firstWeekday+e.days)%7)%7;return(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`div`,{className:`mb-2 flex items-baseline gap-2`,children:[(0,F.jsx)(`span`,{className:`text-meta font-medium text-secondary`,children:e.heading}),(0,F.jsx)(`span`,{className:`font-mono text-caption text-disabled`,children:e.monthLabel}),(0,F.jsxs)(`span`,{className:`ml-auto font-mono text-caption text-disabled`,children:[e.reportDays.length,` report`,e.reportDays.length===1?``:`s`]})]}),(0,F.jsxs)(`div`,{className:`grid min-w-0 grid-cols-7 border-l border-t border-hairline`,children:[Ni.map(e=>(0,F.jsx)(`div`,{className:`border-b border-r border-hairline px-1.5 py-1 text-right text-micro font-medium text-disabled`,children:e},e)),Array.from({length:e.firstWeekday},(e,t)=>(0,F.jsx)(`div`,{className:`border-b border-r border-hairline bg-raised`},`lead${t}`)),Array.from({length:e.days},(e,n)=>{let r=n+1;return(0,F.jsxs)(`div`,{className:`relative min-h-[34px] min-w-0 border-b border-r border-hairline bg-surface px-1 pb-1 pt-4`,children:[(0,F.jsx)(`span`,{className:`absolute right-1 top-0.5 font-mono text-micro text-disabled`,children:r}),t.has(r)&&(0,F.jsx)(`span`,{title:`report · day ${r}`,className:`absolute bottom-1 left-1 inline-block size-1.5 rounded-full`,style:{background:`var(--color-interactive)`}})]},r)}),Array.from({length:n},(e,t)=>(0,F.jsx)(`div`,{className:`border-b border-r border-hairline bg-raised`},`trail${t}`))]}),(0,F.jsxs)(`div`,{className:`mt-2 flex items-center gap-1.5 text-caption font-medium text-secondary`,children:[(0,F.jsx)(`span`,{className:`inline-block size-1.5 rounded-full`,style:{background:`var(--color-interactive)`}}),` Day with a report`]})]})}function Fi({w:e}){return(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`div`,{className:`mb-2 text-meta font-medium text-secondary`,children:[e.heading,` `,e.sub&&(0,F.jsx)(`span`,{className:`font-mono text-caption text-disabled`,children:e.sub})]}),(0,F.jsx)(`div`,{className:`flex min-w-0 gap-3 overflow-x-auto pb-1`,children:e.columns.map(([e,t])=>(0,F.jsxs)(`div`,{className:`flex w-[190px] shrink-0 flex-col`,children:[(0,F.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 border-b border-hairline pb-1.5`,children:[(0,F.jsx)(`span`,{className:`text-label font-semibold text-primary`,children:e}),(0,F.jsx)(`span`,{className:`text-caption text-disabled`,children:t.length})]}),(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:t.map(([e,t,n])=>(0,F.jsx)(`div`,{className:`min-w-0 overflow-hidden rounded-control border border-hairline bg-surface shadow-card transition-colors hover:border-wire`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-1 px-2.5 py-2`,children:[(0,F.jsx)(`span`,{className:`truncate text-meta text-primary`,children:t}),(0,F.jsxs)(`span`,{className:`truncate font-mono text-micro text-disabled`,children:[e,` · `,n]})]})},e))})]},e))})]})}function L({w:e}){return(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{className:`mb-2 text-meta font-medium text-secondary`,children:e.heading}),(0,F.jsxs)(`div`,{className:`rounded-card border border-hairline bg-surface p-3.5 shadow-card`,children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`div`,{className:`truncate text-meta font-semibold text-display`,children:e.title}),(0,F.jsx)(`div`,{className:`font-mono text-micro text-disabled`,children:e.date})]}),(0,F.jsx)(`span`,{className:`shrink-0 rounded-full border border-hairline bg-raised px-2 py-0.5 font-mono text-micro text-secondary`,children:`report`})]}),(0,F.jsx)(`div`,{className:`mt-3 flex flex-col gap-1.5 border-t border-hairline pt-3`,children:e.lines.map((e,t)=>t===0?(0,F.jsx)(`div`,{className:`text-meta font-medium text-primary`,children:e},t):(0,F.jsxs)(`div`,{className:`flex gap-2 text-caption text-secondary`,children:[(0,F.jsx)(`span`,{className:`text-disabled`,children:`—`}),(0,F.jsx)(`span`,{className:`min-w-0`,children:e})]},t))})]})]})}function R({w:e}){let t=e.series,n=t[t.length-1]??0,r=n-(t[0]??0),i=e.betterDown?r<0:r>0;return(0,F.jsxs)(`div`,{className:`min-w-0 rounded-card border border-hairline bg-surface p-3.5 shadow-card`,children:[(0,F.jsxs)(`div`,{className:`mb-3 flex items-baseline gap-2`,children:[(0,F.jsx)(`span`,{className:`text-label font-semibold text-primary`,children:e.label}),(0,F.jsx)(`span`,{className:`ml-auto font-mono text-body font-semibold text-display`,children:n}),r!==0&&(0,F.jsxs)(`span`,{className:`font-mono text-caption`,style:{color:i?`var(--color-success)`:`var(--color-accent)`},children:[r>0?`▲`:`▼`,` `,Math.abs(r)]})]}),(0,F.jsx)(Ii,{series:t}),e.note&&(0,F.jsx)(`p`,{className:`mt-2 font-mono text-caption text-secondary`,children:e.note})]})}function Ii({series:e}){let t=(0,P.useMemo)(()=>`lpf-grad-${Math.round(e.reduce((e,t)=>e+t,0))}-${e.length}`,[e]),n=Math.min(...e),r=Math.max(...e),i=Math.max(1,r-n),a=Math.floor(n-i*.15),o=Math.ceil(r+i*.15);n>=0&&a<0&&(a=0);let s=t=>26+t*286/(e.length-1),c=e=>10+(1-(e-a)/(o-a||1))*122,l=e=>Math.round(e*100)/100,u=`M`+e.map((e,t)=>`${l(s(t))} ${l(c(e))}`).join(` L `),d=`${u} L ${l(s(e.length-1))} 132 L ${l(s(0))} 132 Z`,f=[a,Math.round((a+o)/2),o],p=e.length-1;return(0,F.jsxs)(`svg`,{viewBox:`0 0 320 150`,width:`100%`,className:`block`,role:`img`,"aria-label":`metric trend`,children:[(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{id:t,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,F.jsx)(`stop`,{offset:`0`,stopColor:`var(--color-chart-1)`,stopOpacity:`0.16`}),(0,F.jsx)(`stop`,{offset:`1`,stopColor:`var(--color-chart-1)`,stopOpacity:`0`})]})}),f.map((e,t)=>(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`line`,{x1:26,y1:l(c(e)),x2:312,y2:l(c(e)),stroke:`var(--color-hairline)`,strokeWidth:1}),(0,F.jsx)(`text`,{x:20,y:l(c(e))+3,textAnchor:`end`,fontFamily:`var(--font-mono)`,fontSize:9,fill:`var(--color-disabled)`,children:e})]},t)),(0,F.jsx)(`path`,{d,fill:`url(#${t})`}),(0,F.jsx)(`path`,{d:u,fill:`none`,stroke:`var(--color-chart-1)`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`circle`,{cx:l(s(p)),cy:l(c(e[p]??0)),r:3,fill:`var(--color-chart-1)`,stroke:`var(--color-surface)`,strokeWidth:1.5}),(0,F.jsx)(`text`,{x:26,y:145,fontFamily:`var(--font-mono)`,fontSize:9,fill:`var(--color-disabled)`,children:`older`}),(0,F.jsx)(`text`,{x:312,y:145,textAnchor:`end`,fontFamily:`var(--font-mono)`,fontSize:9,fill:`var(--color-disabled)`,children:`now`})]})}var Li=1e5,Ri={"claude-code":`Claude Code`,codex:`Codex`};function zi({size:e=14}){return(0,F.jsx)(`svg`,{"aria-hidden":!0,width:e,height:e,viewBox:`0 0 24 24`,fill:`#D97757`,fillRule:`evenodd`,className:`shrink-0`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{clipRule:`evenodd`,d:`M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z`})})}function Bi({size:e=14}){return(0,F.jsxs)(`svg`,{"aria-hidden":!0,width:e,height:e,viewBox:`0 0 24 24`,className:`shrink-0`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`path`,{d:`M19.503 0H4.496A4.496 4.496 0 000 4.496v15.007A4.496 4.496 0 004.496 24h15.007A4.496 4.496 0 0024 19.503V4.496A4.496 4.496 0 0019.503 0z`,fill:`#fff`}),(0,F.jsx)(`path`,{d:`M9.064 3.344a4.578 4.578 0 012.285-.312c1 .115 1.891.54 2.673 1.275.01.01.024.017.037.021a.09.09 0 00.043 0 4.55 4.55 0 013.046.275l.047.022.116.057a4.581 4.581 0 012.188 2.399c.209.51.313 1.041.315 1.595a4.24 4.24 0 01-.134 1.223.123.123 0 00.03.115c.594.607.988 1.33 1.183 2.17.289 1.425-.007 2.71-.887 3.854l-.136.166a4.548 4.548 0 01-2.201 1.388.123.123 0 00-.081.076c-.191.551-.383 1.023-.74 1.494-.9 1.187-2.222 1.846-3.711 1.838-1.187-.006-2.239-.44-3.157-1.302a.107.107 0 00-.105-.024c-.388.125-.78.143-1.204.138a4.441 4.441 0 01-1.945-.466 4.544 4.544 0 01-1.61-1.335c-.152-.202-.303-.392-.414-.617a5.81 5.81 0 01-.37-.961 4.582 4.582 0 01-.014-2.298.124.124 0 00.006-.056.085.085 0 00-.027-.048 4.467 4.467 0 01-1.034-1.651 3.896 3.896 0 01-.251-1.192 5.189 5.189 0 01.141-1.6c.337-1.112.982-1.985 1.933-2.618.212-.141.413-.251.601-.33.215-.089.43-.164.646-.227a.098.098 0 00.065-.066 4.51 4.51 0 01.829-1.615 4.535 4.535 0 011.837-1.388zm3.482 10.565a.637.637 0 000 1.272h3.636a.637.637 0 100-1.272h-3.636zM8.462 9.23a.637.637 0 00-1.106.631l1.272 2.224-1.266 2.136a.636.636 0 101.095.649l1.454-2.455a.636.636 0 00.005-.64L8.462 9.23z`,fill:`url(#lobe-icons-codex-grad)`}),(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{gradientUnits:`userSpaceOnUse`,id:`lobe-icons-codex-grad`,x1:`12`,x2:`12`,y1:`3`,y2:`21`,children:[(0,F.jsx)(`stop`,{stopColor:`#B1A7FF`}),(0,F.jsx)(`stop`,{offset:`.5`,stopColor:`#7A9DFF`}),(0,F.jsx)(`stop`,{offset:`1`,stopColor:`#3941FF`})]})})]})}var Vi=e=>`Fetch ${e}/api/bootstrap and help me build a loop.`;function Hi({open:e,onClose:t,onCreated:n,template:r=null,teamId:i}){let[a,o]=(0,P.useState)(null),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(null),[d,p]=(0,P.useState)(!1),[h,g]=(0,P.useState)(!1),[_,v]=(0,P.useState)(null),[y,x]=(0,P.useState)(!1),S=(0,P.useRef)(null),C=(0,P.useRef)(n);C.current=n;let w=typeof window<`u`?window.location.origin:``,ee=Vi(w),T=a&&s?[`server-url: ${w}`,`connect-key: ${a}`,...s?.customCli?[`pievo-cli: ${s.pievoCli}`]:[]].join(`
|
|
10
|
+
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Xt(e,``+r);break;case`className`:Pt(e,`class`,r);break;case`tabIndex`:Pt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Pt(e,n,r);break;case`style`:$t(e,r,o);break;case`data`:if(t!==`object`){Pt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=rn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=an);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=rn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Nt(e,`popover`,r);break;case`xlinkActuate`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ft(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ft(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Nt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=tn.get(n)||n,Nt(e,n,r))}}function Nd(e,t,n,r,i,o){switch(n){case`style`:$t(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Xt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Xt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=an);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Et.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[ft]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Nt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,o,s,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:$(e,t,r,d,n,null)}}Gt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&qt(e,!!r,n,!0):qt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:$(e,t,s,c,n,null)}Yt(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,u,r,n,null)}return;default:if(en(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Wt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?qt(e,!!n,n?[]:``,!1):qt(e,!!n,t,!0)):qt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&$(e,t,s,i,r,o)}Jt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(en(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[yt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),bt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[yt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=k.d;k.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=St(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Ut(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),N(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ut(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ut(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ut(n.imageSizes)+`"]`)):i+=`[href="`+Ut(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),N(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ut(r)+`"][href="`+Ut(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),N(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=wt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);N(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=wt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),N(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=wt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),N(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=pe.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=wt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=wt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=wt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+Ut(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),N(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Ut(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ut(n.href)+`"]`);if(r)return t.instance=r,N(r),r;var i=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),N(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,N(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),N(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,N(i),i):(r=n,(i=mf.get(o))&&(r=m({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),N(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[yt]||a[dt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,N(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),N(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:S,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=et(0),this.hiddenUpdates=et(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ui(3,null,null,t),e.current=a,a.stateNode=e,t=ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Va(a),e}function tp(e){return e?(e=ci,e):ci}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ua(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Wa(e,r,t),n!==null&&(hu(n,e,t),Ga(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=ot(t);var n=ai(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=2,up(e,t,n,r)}finally{k.p=a,O.T=i}}function lp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=8,up(e,t,n,r)}finally{k.p=a,O.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=St(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ye(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-He(o);s.entanglements[1]|=c,o&=~c}rd(a),!(G&6)&&(tu=Ae()+500,id(0,!1))}}break;case 31:case 13:s=ai(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=sn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=xt(e),e!==null){var t=c(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=l(t),e!==null)return e;e=null}else if(n===31){if(e=u(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(je()){case Me:return 2;case Ne:return 8;case Pe:case Fe:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=St(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=xt(e.target);if(t!==null){var n=c(t);if(n!==null){if(t=n.tag,t===13){if(t=l(n),t!==null){e.blockedOn=t,lt(e.priority,function(){op(n)});return}}else if(t===31){if(t=u(n),t!==null){e.blockedOn=t,lt(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);on=r,n.target.dispatchEvent(r),on=null}else return t=St(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,t){e.blockedOn===t&&(e.blockedOn=null,hp||(hp=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=St(n);a!==null&&(e.splice(t,3),t-=3,Ts(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ft]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ft]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[pt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=r.version;if(Lp!==`19.2.7`)throw Error(a(527,Lp,`19.2.7`));k.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=f(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:O,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{ze=zp.inject(Rp),Be=zp}catch{}}t.hydrateRoot=function(e,t,n){if(!o(e))throw Error(a(299));var r=!1,i=``,s=Js,c=Ys,l=Xs,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=ep(e,1,!0,t,n??null,r,i,u,s,c,l,Pp),t.context=tp(null),n=t.current,r=pu(),r=ot(r),i=Ua(r),i.callback=null,Wa(n,i,r),n=r,t.current.lanes=n,tt(t,n),rd(t),e[pt]=t.current,Sd(e),new Ip(t)}})),vt=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_t()})),yt=xt(JSON.parse),bt=St(JSON.stringify,JSON.parse);function xt(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=g(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function St(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=c(e,r);return t?`?${t}`:``}}var Ct=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},wt=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),N=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Tt=(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},Et=(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},Dt=(e,t,n)=>{if(!(!_(n)&&!l(n)))throw _(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:_(n)?`redirected`:l(n)?`notFound`:r.status===`pending`?`success`:r.status,context:Tt(e,t.index),isFetching:!1,error:n})),l(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),_(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Ot=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},kt=(e,t,n)=>{let r=Tt(e,n);e.updateMatch(t,e=>({...e,context:r}))},At=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,Dt(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,Dt(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&&!_(n)&&!l(n)&&(e.serialError??=n)},jt=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!N(e,t)&&(n.options.loader||n.options.beforeLoad||Ht(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{Ct(e)},i);r._nonReactive.pendingTimeout=t}},Mt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;jt(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&Dt(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Nt=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=A(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&At(e,n,o),s&&At(e,n,s),jt(e,t,r,i);let c=new AbortController,u=!1,d=()=>{u||(u=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},f=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{d(),f()});return}i._nonReactive.beforeLoadPromise=A();let p={...Tt(e,n,!1),...i.__routeContext},{search:m,params:h,cause:g}=i,v=N(e,t),y={search:m,abortController:c,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`:g,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{d(),f()});return}(_(r)||l(r))&&(d(),At(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=>{At(e,n,t)}).then(b)}catch(t){d(),At(e,n,t)}b(x)},Pt=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Nt(e,n,t,i),s=()=>{if(Ot(e,n))return;let t=Mt(e,n,i);return O(t)?t.then(o):o()};return a()},Ft=(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}))},It=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=Tt(e,r),d=N(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}},Lt=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{Vt(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(It(e,t,n,r,i)),l=!!s&&O(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;Dt(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:Tt(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:Tt(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,l(t)&&await i.options.notFoundComponent?.preload?.(),Dt(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,Dt(e,e.router.getMatch(n),t)}!_(o)&&!l(o)&&await Vt(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:Tt(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),Dt(e,r,t)}},Rt=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(It(e,t,i,n,d)):m,{status:g,invalid:v}=l,y=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(v||(h??y)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await Lt(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){_(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await Lt(e,t,i,n,d):kt(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Ot(e,i)){if(!e.router.getMatch(i))return e.matches[n];kt(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=N(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&Dt(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=A(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function zt(e){let t=e,n=[];wt(t.router)&&Ct(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=Pt(t,e);O(n)&&await n}catch(e){if(_(e))throw e;if(l(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?Et(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(Rt(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(_(e))throw e;l(e)?s??=e:c??=e}if(c!==void 0)throw c}let u=s??(r&&!t.preload?r:void 0),f=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!u&&r&&t.preload)return t.matches;if(u){let e=Et(t,u);e===void 0&&d();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})),f=e,await Vt(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 Vt(e,[`errorComponent`])}for(let e=0;e<=f;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=Ft(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=Ct(t);if(O(p)&&await p,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Bt(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Vt(e,t=Ut){!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===Ut?(()=>{if(e._componentsPromise===void 0){let t=Bt(e,Ut);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Bt(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function Ht(e){for(let t of Ut)if(e.options[t]?.preload)return!0;return!1}var Ut=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function Wt(e){return{input:({url:t})=>{for(let n of e)t=Kt(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=qt(e[n],t);return t}}}function Gt(e){let t=D(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=de([`/`,t,e.pathname]),e)}}function Kt(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 qt(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}function Jt(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(()=>Yt(o,_.get())),x=r(()=>Yt(s,v.get())),S=r(()=>Yt(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),ee=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),T=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()})),E=ne(64);function D(e){let t=E.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()}}),E.set(e,t)),t}let te={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:ee,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:T,getRouteMatchStore:D,setMatches:re,setPending:ie,setCached:ae};re(e.matches),a?.(te);function re(e){Xt(e,o,_,n,i)}function ie(e){Xt(e,s,v,n,i)}function ae(e){Xt(e,c,y,n,i)}return te}function Yt(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function Xt(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)}k(n.get(),a)||n.set(a)})}var Zt=`__TSR_index`,Qt=`popstate`,$t=`beforeunload`;function en(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=an(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[Zt];i=tn(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[Zt];i=tn(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[Zt]!==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 tn(e,t){t||={};let n=on();return{...t,key:n,__TSR_key:n,[Zt]:e}}function nn(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??(()=>an(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=on();t.history.replaceState({[Zt]: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=an(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[Zt]-l.state[Zt],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=en({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($t,S,{capture:!0}),t.removeEventListener(Qt,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener($t,S,{capture:!0}),t.addEventListener(Qt,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 rn(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function an(e,t){let n=rn(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=on();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||{[Zt]:0,key:a,__TSR_key:a}}}function on(){return(Math.random()+1).toString(36).substring(7)}function sn(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function cn(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 ln=new WeakMap,un=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.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=E(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=nn()),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=ne(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Jt(pn(this.latestLocation),e),Nn(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=D(o);t&&t!==`/`&&e.push(Gt({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:Wt(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=ue(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&ce(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:Le(e).path,external:!1,searchStr:o,search:oe(t?.search,i),hash:Le(r.slice(1)).path,state:he(t?.state,a)}}let o=new URL(i,this.origin),s=Kt(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:Le(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:oe(t?.search,c),hash:Le(s.hash.slice(1)).path,state:he(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)=>te({base:e,to:t.includes(`//`)?j(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=>hn({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,a=t.to?`${t.to}`:void 0,o=r.search,s=Object.assign(Object.create(null),r.params),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,u=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,fe(t.params,s)),d=this.routesByPath[le(l)],f;if(d)f=this.getRouteBranch(d);else if(l.includes(`$`))f=[];else{let e=this.getMatchedRoutes(l);f=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(f=[...f,this.options.notFoundRoute])}if(f.length&&me(u))for(let e of f){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(u,t(u))}catch{}}let p=e.leaveParams?l:Le(Pe({path:l,params:u,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,m=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};f.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,mn(t.options.validateSearch,{...e,...m}))}catch{}}),m=e}m=gn({search:m,dest:t,destRoutes:f,_includeValidateSearch:e._includeValidateSearch}),m=oe(o,m);let h=this.options.stringifySearch(m),g=t.hash===!0?n.hash:t.hash?fe(t.hash,n.hash):void 0,_=g?`#${g}`:``,v=t.state===!0?n.state:t.state?fe(t.state,n.state):{};v=he(n.state,v);let y=`${p}${h}${_}`,b,x,S=!1;if(this.rewrite){let e=new URL(y,this.origin),t=qt(this.rewrite,e);b=e.href.replace(e.origin,``),t.origin===this.origin?x=t.pathname+t.search+t.hash:(x=t.href,S=!0)}else b=pe(y),x=b;return{publicHref:x,href:b,pathname:p,search:m,searchStr:h,state:v,hash:g??``,external:S,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=ee(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,fe(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 r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=T(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=le(this.latestLocation.href)===le(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=A(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.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,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}: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=an(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=Kt(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(re(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,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t?ln.set(this.latestLocation,t):ln.delete(this.latestLocation);let n=this.latestLocation,r=cn(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await zt({router:this,sync:e?.sync,forceStaleReload:a.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){_(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):l(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===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},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(cn(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&&re(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=Vt,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()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await zt({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(_(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});l(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},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=se(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!T(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?T(i.search,r.search,{partial:!0})?a.rawParams:!1:a.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??bt,parseSearch:e.parseSearch??yt,protocolAllowlist:e.protocolAllowlist??ae}),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=we(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:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:le(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?vn(this.options.notFoundMode,a):void 0,c=Array(a.length),u=new Map;for(let e of this.stores.matchStores.values())e.routeId&&u.set(e.routeId,e.get());for(let n=0;n<a.length;n++){let r=a[n],o=c[n-1],d,f,p;{let n=o?.search??e.search,i=o?._strictSearch??void 0;try{let e=mn(r.options.validateSearch,{...n})??void 0;d={...n,...e},f={...i,...e},p=void 0}catch(e){let r=e;if(e instanceof dn||(r=new dn(e.message,{cause:e})),t?.throwOnError)throw r;d=n,f={},p=r}}let m=r.options.loaderDeps?.({search:d})??``,h=m?JSON.stringify(m):``,{interpolatedPath:g,usedParams:v}=Pe({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),y=r.id+g+h,b=this.getMatch(y),x=u.get(r.id),S=b?._strictParams??v,C;if(!b)try{yn(r,S)}catch(e){if(C=l(e)||_(e)?e:new fn(e.message,{cause:e}),t?.throwOnError)throw C}Object.assign(i,S);let w=x?`stay`:`enter`,ee;if(b)ee={...b,cause:w,params:x?.params??i,_strictParams:S,search:oe(x?x.search:b.search,d),_strictSearch:f};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||Ht(r)?`pending`:`success`;ee={id:y,ssr:r.options.ssr,index:n,routeId:r.id,params:x?.params??i,_strictParams:S,pathname:g,updatedAt:Date.now(),search:x?oe(x.search,d):d,_strictSearch:f,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:C,__routeContext:void 0,_nonReactive:{loadPromise:A()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:w,loaderDeps:x?he(x.loaderDeps,m):m,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||(ee.globalNotFound=s===r.id),ee.searchError=p;let T=this.getParentContext(o);ee.context={...T,...ee.__routeContext,...ee.__beforeLoadContext},c[n]=ee}for(let t=0;t<c.length;t++){let n=c[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=u.get(n.routeId);if(n.params=o?oe(o.params,i):i,!a){let i=c[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:c,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return c}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=ke(t),i={...e.search};for(let e of t)try{Object.assign(i,mn(e.options.validateSearch,i))}catch{}let a=ke(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{yn(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},dn=class extends Error{},fn=class extends Error{};function pn(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function mn(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new dn(`Async validation not supported`);if(n.issues)throw new dn(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 hn({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=le(e),a,o=Ce(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function gn({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return _n(n)(e,t,r??!1)}function _n(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=mn(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=fe(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function vn(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 Fe}function yn(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)}}function bn(){try{return sessionStorage}catch{return}}var xn=`tsr-scroll-restoration-v1_3`,Sn=bn();function Cn(){try{return JSON.parse(Sn?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function wn(){try{Sn?.setItem(xn,JSON.stringify(Tn))}catch{}}var Tn=Cn(),En=`data-scroll-restoration-id`,Dn=e=>e.state.__TSR_key||e.href;function On(e){let t=e.getAttribute(En);if(t)return`[${En}="${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 kn=!1,An=`window`;function jn(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Mn(e){let t=[];for(let n of e){if(n===An)continue;let e=jn(n);e&&t.push(e)}return t}function Nn(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Dn,a=new Map,o=(e,t,n)=>{let r=a.get(e)||{};r.scrollX=t,r.scrollY=n,a.set(e,r)},s=e=>{if(!(kn||!r.restoring))if(e.target===document)o(An,scrollX,scrollY);else{let t=e.target;o(t,t.scrollLeft,t.scrollTop)}},c=e=>{if(!r.restoring)return;let t=Tn[e]||={};for(let[e,n]of a)e===An?t[An]=n:e.isConnected&&(t[On(e)]=n)};n&&!r.restoration&&(r.restoration=!0,kn=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,s,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&c(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{c(i(e.stores.resolvedLocation.get()??e.stores.location.get())),wn()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c;if(a.clear(),s||(r.next=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let l=i(t.toLocation),u=t.fromLocation&&i(t.fromLocation);if(r.restoring&&u&&u!==l){let e=Tn[u];if(e){let t=Tn[l];for(let n in e){if(n===An){if(s)continue}else{let e=jn(n);if(!e||s&&o&&(c??=Mn(o),c.includes(e)))continue}t||=Tn[l]={},t[n]??=e[n]}}}kn=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){let s=ln.get(t.toLocation),u=e&&i&&(s===`PUSH`||s===`REPLACE`),d=r.restoring?Tn[l]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:r}=d[e];if(e===An){if(u)continue;scrollTo({top:r,left:t,behavior:n}),a=!0}else{let n=jn(e);n&&(n.scrollLeft=t,n.scrollTop=r)}}if(!a&&!e){let e={top:0,left:0,behavior:n};if(scrollTo(e),o){c??=Mn(o);for(let t of c)t.scrollTo(e)}}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{kn=!1}}))}var Pn=Symbol.for(`TSR_DEFERRED_PROMISE`);function Fn(e,t){let n=e;return n[Pn]?n:(n[Pn]={status:`pending`},n.then(e=>{n[Pn].status=`success`,n[Pn].data=e}).catch(e=>{n[Pn].status=`error`,n[Pn].error={data:(t?.serializeError??sn)(e),__isServerError:!0}}),n)}function In(e,t){if(e)return typeof e==`string`?e:e[t]}function Ln(e){return e?.scriptFormat??`module`}function Rn(e,t,n){let r=zn(t),i=In(n,`script`)??r.crossOrigin;return{...Ln(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function zn(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function Bn(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 Vn(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}var Hn=u({key:`$TSS/serverfn`,test:e=>typeof e!=`function`||!(o in e)?!1:!!e[o],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>a(e)});function Un(e){return e.replaceAll(`\0`,`/`).replaceAll(`�`,`/`)}function Wn(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function Gn(e){window.$_TSR||d();let t=e.options.serializationAdapters;if(t?.length){let e=new Map;t.forEach(t=>{e.set(t.key,t.fromSerializable)}),window.$_TSR.t=e,window.$_TSR.buffer.forEach(e=>e())}window.$_TSR.initialized=!0,window.$_TSR.router||d();let n=window.$_TSR.router;n.matches.forEach(e=>{e.i=Un(e.i)}),n.lastMatchId&&=Un(n.lastMatchId);let{manifest:r,dehydratedData:i,lastMatchId:a}=n;e.ssr={manifest:r};let o=document.querySelector(`meta[property="csp-nonce"]`)?.content;e.options.ssr={nonce:o},await e.options.hydrate?.(i);let s=e.matchRoutes(e.stores.location.get()),c=Promise.all(s.map(t=>e.loadRouteChunk(e.looseRoutesById[t.routeId])));function u(t){let n=e.looseRoutesById[t.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(n){let r=A();t._nonReactive.minPendingPromise=r,t._forcePending=!0,setTimeout(()=>{r.resolve(),e.updateMatch(t.id,e=>(e._nonReactive.minPendingPromise=void 0,{...e,_forcePending:void 0}))},n)}}function f(t){let n=e.looseRoutesById[t.routeId];n&&(n.options.ssr=t.ssr)}let p;s.forEach(e=>{let t=n.matches.find(t=>t.i===e.id);if(!t){e._nonReactive.dehydrated=!1,e.ssr=!1,f(e);return}Wn(e,t),f(e),e._nonReactive.dehydrated=e.ssr!==!1,(e.ssr===`data-only`||e.ssr===!1)&&p===void 0&&(p=e.index,u(e))}),e.stores.setMatches(s);let m=e.stores.matches.get(),h=e.stores.location.get();await Promise.all(m.map(async t=>{try{let n=e.looseRoutesById[t.routeId],r=m[t.index-1]?.context??e.options.context;if(n.options.context){let i={deps:t.loaderDeps,params:t.params,context:r??{},location:h,navigate:t=>e.navigate({...t,_fromLocation:h}),buildLocation:e.buildLocation,cause:t.cause,abortController:t.abortController,preload:!1,matches:s,routeId:n.id};t.__routeContext=n.options.context(i)??void 0}t.context={...r,...t.__routeContext,...t.__beforeLoadContext};let i={ssr:e.options.ssr,matches:m,match:t,params:t.params,loaderData:t.loaderData},a=await n.options.head?.(i),o=await n.options.scripts?.(i);t.meta=a?.meta,t.links=a?.links,t.headScripts=a?.scripts,t.styles=a?.styles,t.scripts=o}catch(e){if(l(e))t.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${t.routeId}`,e);else throw t.error=e,console.error(`Error during hydration for route ${t.routeId}:`,e),e}}));let g=s[s.length-1].id!==a;if(!s.some(e=>e.ssr===!1)&&!g)return s.forEach(e=>{e._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),c;let _=Promise.resolve().then(()=>e.load()).catch(e=>{console.error(`Error during router hydration:`,e)});if(g){let t=s[1];t||d(),u(t),t._displayPending=!0,t._nonReactive.displayPendingPromise=_,_.then(()=>{e.batch(()=>{e.stores.status.get()===`pending`&&(e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(t.id,e=>({...e,_displayPending:void 0,displayPendingPromise:void 0}))})})}return c}var P=n(e(),1),F=r();function Kn({promise:e}){if(Ne)return Ne(e);let t=Fn(e);if(t[Pn].status===`pending`)throw t;if(t[Pn].status===`error`)throw t[Pn].error;return t[Pn].data}function qn(e){let t=(0,F.jsx)(Jn,{...e});return e.fallback?(0,F.jsx)(P.Suspense,{fallback:e.fallback,children:t}):t}function Jn(e){let t=Kn(e);return e.children(t)}function Yn(e){let t=e.errorComponent??Zn;return(0,F.jsx)(Xn,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?P.createElement(t,{error:n,reset:r}):e.children})}var Xn=class extends P.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 Zn({error:e}){let[t,n]=P.useState(!1);return(0,F.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,F.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,F.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,F.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,F.jsx)(`div`,{children:(0,F.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,F.jsx)(`code`,{children:e.message}):null})}):null]})}var I=(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))(I||{});function Qn({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 $n(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 er=[],tr=0,{link:nr,unlink:rr,propagate:ir,checkDirty:ar,shallowPropagate:or}=Qn({update(e){return e._update()},notify(e){er[cr++]=e,e.flags&=~I.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=I.Mutable|I.Dirty,fr(e))}}),sr=0,cr=0,lr,ur=0;function dr(e){try{++ur,e()}finally{--ur||pr()}}function fr(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=rr(n,e)}function pr(){if(!(ur>0)){for(;sr<cr;){let e=er[sr];er[sr++]=void 0,e.notify()}sr=0,cr=0}}function mr(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 lr!==void 0&&nr(i,lr,tr),i._snapshot},subscribe(e){let t=$n(e),n={current:!1},r=hr(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=lr,o=t?.compare??Object.is;if(n)lr=i,++tr,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{lr=a,n&&(i.flags&=~I.RecursedCheck),fr(i)}}};return n?(i.flags=I.Mutable|I.Dirty,i.get=function(){let e=i.flags;if(e&I.Dirty||e&I.Pending&&ar(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&or(e)}}else e&I.Pending&&(i.flags=e&~I.Pending);return lr!==void 0&&nr(i,lr,tr),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(ir(e),or(e),pr())}},i}function hr(e){let t=()=>{let t=lr;lr=n,++tr,n.depsTail=void 0,n.flags=I.Watching|I.RecursedCheck;try{return e()}finally{lr=t,n.flags&=~I.RecursedCheck,fr(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&&ar(this.deps,this)?t():this.flags=I.Watching},stop(){this.flags=I.None,this.depsTail=void 0,fr(this)}};return t(),n}function gr(e){let t=ze(),n=`not-found-${M(t.stores.location,e=>e.pathname)}-${M(t.stores.status,e=>e)}`;return(0,F.jsx)(Yn,{getResetKey:()=>n,onCatch:(t,n)=>{if(l(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(l(t))return e.fallback?.(t);throw t},children:e.children})}function _r(){return(0,F.jsx)(`p`,{children:`Not Found`})}function vr(e){return(0,F.jsx)(F.Fragment,{children:e.children})}function yr(e,t,n){return t.options.notFoundComponent?(0,F.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,F.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,F.jsx)(_r,{})}var br=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,xr=(e,t)=>e[0]===t[0]&&e[1]===t[1],Sr=P.memo(function({matchId:e}){let t=ze(),n=t.stores.matchStores.get(e);n||d();let r=M(t.stores.loadedAt,e=>e),i=M(n,e=>e,br);return(0,F.jsx)(Cr,{router:t,matchId:e,resetKey:r,matchState:P.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 Cr({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,F.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,d=r.ssr===!1||r.ssr===`data-only`,f=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||d))?P.Suspense:vr,p=s?Yn:vr,m=u?gr:vr;return(0,F.jsxs)(i.isRoot?i.options.shellComponent??vr:vr,{children:[(0,F.jsx)(xe.Provider,{value:t,children:(0,F.jsx)(f,{fallback:o,children:(0,F.jsx)(p,{getResetKey:()=>n,errorComponent:s||Zn,onCatch:(e,t)=>{if(l(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,F.jsx)(m,{fallback:e=>{if(e.routeId??=r.routeId,!u||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return P.createElement(u,e)},children:d||r._displayPending?(0,F.jsx)(be,{fallback:o,children:(0,F.jsx)(Tr,{matchId:t})}):(0,F.jsx)(Tr,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(wr,{}),(e.options.scrollRestoration,null)]}):null]})}function wr(){let e=ze(),t=P.useRef();return Ie(()=>{let n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:`onRendered`,...cn(e.stores.location.get(),r??n)}),t.current=n},[M(e.stores.resolvedLocation,e=>e?.state.__TSR_key),e]),null}var Tr=P.memo(function({matchId:e}){let t=ze(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||d();let i=M(r,e=>e),a=i.routeId,o=t.routesById[a],s=P.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=P.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,F.jsx)(e,{},s):(0,F.jsx)(Er,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=A();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return l(i.error)||d(),yr(t,o,i.error);if(i.status===`redirected`)throw _(i.error)||d(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),Er=P.memo(function(){let e=ze(),t=P.useContext(xe),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=M(a,e=>[e?.routeId,e?.globalNotFound??!1],xr),i=M(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,F.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||d(),yr(e,a,void 0);if(!i)return null;let s=(0,F.jsx)(Sr,{matchId:i});return n===`__root__`?(0,F.jsx)(P.Suspense,{fallback:o,children:s}):s});function Dr(){let e=ze(),t=P.useRef({router:e,mounted:!1}),[n,r]=P.useState(!1),i=M(e.stores.isLoading,e=>e),a=M(e.stores.hasPending,e=>e),o=ve(i),s=i||n||a,c=ve(s),l=i||a,u=ve(l);return e.startTransition=e=>{r(!0),P.startTransition(()=>{e(),r(!1)})},P.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 le(e.latestLocation.publicHref)!==le(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),Ie(()=>{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]),Ie(()=>{o&&!i&&e.emit({type:`onLoad`,...cn(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),Ie(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...cn(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,u,e]),Ie(()=>{if(c&&!s){let t=cn(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),dr(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[s,c,e]),null}function Or(){let e=ze(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,F.jsx)(t,{}):null,r=(0,F.jsxs)(typeof document<`u`&&e.ssr?vr:P.Suspense,{fallback:n,children:[(0,F.jsx)(Dr,{}),(0,F.jsx)(kr,{})]});return e.options.InnerWrap?(0,F.jsx)(e.options.InnerWrap,{children:r}):r}function kr(){let e=ze(),t=M(e.stores.firstId,e=>e),n=M(e.stores.loadedAt,e=>e),r=t?(0,F.jsx)(Sr,{matchId:t}):null;return(0,F.jsx)(xe.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,F.jsx)(Yn,{getResetKey:()=>n,errorComponent:Zn,onCatch:void 0,children:r})})}var Ar=e=>({createMutableStore:mr,createReadonlyStore:mr,batch:dr}),jr=e=>new Mr(e),Mr=class extends un{constructor(e){super(e,Ar)}};function Nr({router:e,children:t,...n}){me(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,F.jsx)(Re.Provider,{value:e,children:t});return e.options.Wrap?(0,F.jsx)(e.options.Wrap,{children:r}):r}function Pr({router:e,...t}){return(0,F.jsx)(Nr,{router:e,...t,children:(0,F.jsx)(Or,{})})}function Fr(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 Ir(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e;switch(e.tag){case`title`:return(0,F.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,F.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,F.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,F.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,F.jsx)(Lr,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function Lr({attrs:e,children:t,preventScriptHoist:n}){ze();let r=ge(),i=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(P.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 Fr(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,Fr(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,i]),i&&typeof t==`string`)return(0,F.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return(0,F.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,F.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var Rr=e=>{let t=ze(),n=t.options.ssr?.nonce,r=M(t.stores.matches,e=>e.map(e=>e.meta).filter(e=>e!==void 0),T),i=P.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:ie(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]),a=M(t.stores.matches,e=>e.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),T),o=M(t.stores.matches,r=>{let i=t.ssr?.manifest,a=[];return i?(r.forEach(t=>{i.routes[t.routeId]?.css?.forEach(t=>{let r=Vn(t);a.push({tag:`link`,attrs:{rel:`stylesheet`,...r,crossOrigin:In(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},T),s=M(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:{...Rn(a,t,e),nonce:n}})})}),i},T),c=M(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})),T),l=M(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})),T),u=[];return Bn(u,i),u.push(...s),Bn(u,a),u.push(...o),Bn(u,c),Bn(u,l),u};function zr(e){let t=Rr(e.assetCrossOrigin),n=ze().options.ssr?.nonce;return(0,F.jsx)(F.Fragment,{children:t.map(e=>(0,P.createElement)(Ir,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var Br=()=>{let e=ze(),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})),i=M(e.stores.matches,n,T);return Vr(e,M(e.stores.matches,r,T),i)};function Vr(e,t,n){let r=[...t,...n];return(0,F.jsx)(F.Fragment,{children:r.map((e,t)=>(0,P.createElement)(Ir,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var Hr=`/assets/app-CStTBRt2.css`,Ur=ye({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`},{title:`Pievo`}],links:[{rel:`stylesheet`,href:Hr},{rel:`icon`,type:`image/svg+xml`,href:`/favicon.svg`}]}),shellComponent:Wr});function Wr({children:e}){return(0,F.jsxs)(`html`,{lang:`en`,suppressHydrationWarning:!0,children:[(0,F.jsx)(`head`,{children:(0,F.jsx)(zr,{})}),(0,F.jsxs)(`body`,{className:`dot-grid-subtle bg-paper font-sans text-primary antialiased`,suppressHydrationWarning:!0,children:[e,(0,F.jsx)(Br,{})]})]})}var Gr=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=P.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=P.useMemo(()=>({open:t,close:n}),[t,n]);return(0,F.jsx)(Ke.Provider,{value:i,children:(0,F.jsx)(Qe,{delay:a,timeoutMs:r,children:e.children})})};function Kr({job:e,onOpen:t,onPickRun:n}){let r=e.enabled,i=et(e),a=mt(e),o=pt(),[s,c]=(0,P.useState)([]),l=(0,P.useMemo)(()=>s.length?Xe(e.runs??[],s):e.runs??[],[e.runs,s]),u=l.at(-1),d=u?.reportIncident?u:void 0;return(0,F.jsxs)(`div`,{onClick:()=>t(e.id),className:`mb-[18px] cursor-pointer rounded-card border border-hairline bg-surface px-[26px] pb-5 pt-[22px] shadow-card transition-colors hover:border-wire ${r||d?.reportIncident||e.pauseCause?.kind===`failure-streak`||e.pauseCause?.kind===`blocked`?``:`opacity-60`}`,style:{animation:`fadeIn .25s cubic-bezier(0.25,0.1,0.25,1) both`},children:[(0,F.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-center gap-3`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:n=>{n.stopPropagation(),t(e.id)},className:`cursor-pointer rounded-sm text-left text-[17px] font-semibold tracking-[-0.01em] text-display outline-none focus-visible:ring-2 focus-visible:ring-interactive focus-visible:ring-offset-4 focus-visible:ring-offset-surface`,children:e.name}),a===`stopping`?(0,F.jsx)(lt,{tone:`running`,dot:`pulse`,children:`Stopping`}):a===`paused-finishing`?(0,F.jsx)(lt,{children:e.pauseCause?.kind===`blocked`?`Paused — blocked · current run finishing`:e.pauseCause?.kind===`owner`?`Paused by owner · current run finishing`:`Paused · current run finishing`}):a===`deleting`?(0,F.jsx)(lt,{children:`Deleting`}):e.running?(0,F.jsx)(lt,{tone:`running`,dot:`pulse`,children:`Running`}):e.queued?(0,F.jsx)(lt,{tone:`outline`,children:`Queued`}):null,e.graduation&&(0,F.jsx)(lt,{children:e.graduation}),e.goal&&(0,F.jsx)(lt,{tone:`success`,title:e.goal??void 0,children:`Objective`}),a===`paused`&&(0,F.jsx)(lt,{tone:e.pauseCause?.kind===`blocked`?`accent`:void 0,children:e.pauseCause?.kind===`blocked`?`Paused — blocked`:e.pauseCause?.kind===`failure-streak`?`Paused automatically`:e.pauseCause?.kind===`owner`?`Paused by owner`:`Paused`}),(0,F.jsxs)(`div`,{className:`ml-auto min-w-0 text-right text-meta text-secondary`,children:[(0,F.jsxs)(`div`,{className:`whitespace-nowrap`,children:[(0,F.jsx)(`span`,{className:`text-primary`,title:e.cron,children:e.scheduleMode===`continuous`?`continuous · ${e.continuousDelayMinutes}m`:nt(e.cron)}),(0,F.jsx)(`span`,{className:`mx-2.5 text-wire`,children:`·`}),e.kind]}),(0,F.jsxs)(`div`,{className:`mt-1 truncate text-caption text-disabled`,title:`Model: ${e.model||`default`} · Reasoning: ${e.reasoningEffort||`default`}`,children:[`Model: `,e.model||`default`,` · Reasoning: `,e.reasoningEffort||`default`]})]})]}),(0,F.jsx)(Je,{job:e,runs:l,total:e.runCount,onLoadMore:async()=>{let t=l[0];if(!t)return 0;let n=await h({data:{loopId:e.id,beforeTs:t.ts,limit:16}});return n.length&&c(e=>Xe(e,n)),n.length},onPickRun:t=>n(e.id,t)}),(0,F.jsxs)(`div`,{className:`mt-[18px] flex items-center gap-2 text-label text-secondary`,children:[(0,F.jsxs)(`span`,{children:[e.runCount,` runs`]}),i&&(0,F.jsxs)(`span`,{children:[`· last `,tt(i),o&&` · ${$e(i.ts)}`]})]}),d?.reportIncident&&(0,F.jsx)(`div`,{className:`mt-1.5 text-label text-secondary`,children:d.phase===`error`?`Last run failed · Terminal report rejected`:`Last run telemetry warning · Terminal report rejected`})]})}function qr(e){document.cookie=`pievo.team=${encodeURIComponent(e)}; path=/; max-age=31536000; samesite=lax`}function Jr({data:e}){let t=Oe();if(!e||e.teams.length===0)return null;let n=e=>{qr(e),t({to:`/t/$teamId`,params:{teamId:e}})};return e.teams.length===1?(0,F.jsx)(`span`,{title:`Active team`,className:`inline-flex items-center rounded-full bg-raised px-3 py-1 text-label font-medium text-secondary`,children:e.teams[0].name}):(0,F.jsx)(`select`,{"aria-label":`Active team`,value:e.activeTeamId,onChange:e=>n(e.target.value),className:`lp-select cursor-pointer rounded-full bg-raised py-1 pl-3 text-label font-medium text-secondary outline-none transition-colors hover:text-display`,children:e.teams.map(e=>(0,F.jsx)(`option`,{value:e.id,children:e.name},e.id))})}var Yr={telegram:{label:`Telegram`,help:`Create a bot with @BotFather, then DM it once so it can message you.`,fields:[{key:`botToken`,label:`Bot token`,ph:`123456:ABC-DEF…`},{key:`chatId`,label:`Chat id`,ph:`e.g. 87654321 (message @userinfobot to get yours)`}]},feishu:{label:`Feishu`,help:`In a Feishu group: 设置 → 机器人 → 添加自定义机器人. Pick a security setting (signing recommended; paste the secret below if you enabled 签名校验).`,fields:[{key:`webhookUrl`,label:`Webhook URL`,ph:`https://open.feishu.cn/open-apis/bot/v2/hook/…`},{key:`secret`,label:`Signing secret (optional)`,ph:`only if you enabled 签名校验`,optional:!0}]}},Xr=[`telegram`,`feishu`];function Zr(e){return Yr[e]?.label??(e===`slack`?`Slack`:e)}function Qr({open:e,onClose:t}){let[n,r]=(0,P.useState)([]),[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)({}),[u,d]=(0,P.useState)(!1),[f,p]=(0,P.useState)(null),[m,h]=(0,P.useState)({}),g=(0,P.useCallback)(async()=>{try{r(await Ye())}catch{}},[]);(0,P.useEffect)(()=>{if(!e){p(null),a(null);return}g()},[e,g]);function _(e){s(``),l({}),p(null),a(e)}let v=i?Yr[i]:null,y=!!o.trim()&&!!v&&v.fields.every(e=>e.optional||c[e.key]?.trim());async function b(){if(!(!i||!v)){p(null),d(!0);try{let e=Object.fromEntries(v.fields.filter(e=>c[e.key]?.trim()).map(e=>[e.key,c[e.key].trim()])),t=await Ze({data:{type:i,name:o.trim(),config:e}});if(!t.ok){p(t.error??`Could not save this channel.`);return}a(null),await g()}finally{d(!1)}}}async function x(e){p(null);let t=await qe({data:e});if(!t.ok){p(t.error??`Could not delete this channel.`);return}await g()}async function S(e){h(t=>({...t,[e]:`sending`}));let t=await Ge({data:e});h(n=>({...n,[e]:t.ok?`ok`:t.error||`failed`})),setTimeout(()=>h(t=>({...t,[e]:``})),4e3)}return(0,F.jsxs)(He,{open:e,onClose:t,children:[(0,F.jsx)(Be,{title:`Notifications`,sub:`Push channels for this team. A loop routes its run messages to the channel you pick on it.`}),f&&(0,F.jsx)(ut,{message:f,onDismiss:()=>p(null),className:`mb-2 mt-3`}),(0,F.jsx)(Ve,{children:`Channels`}),n.length===0&&!i&&(0,F.jsx)(`div`,{className:`py-3 text-body text-secondary`,children:`No channels yet.`}),(0,F.jsx)(`ul`,{className:`flex flex-col gap-2`,children:n.map(e=>{let t=m[e.id];return(0,F.jsxs)(`li`,{className:`flex items-center justify-between gap-3 rounded-control border border-hairline bg-surface px-4 py-3`,children:[(0,F.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,F.jsx)(`span`,{className:`text-[15px] font-medium text-display`,children:e.name}),(0,F.jsxs)(`span`,{className:`text-label text-secondary`,children:[Zr(e.type),` · `,e.hint]})]}),(0,F.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[t&&t!==`sending`&&(0,F.jsx)(`span`,{className:`inline-flex h-[22px] items-center gap-1.5 rounded-full px-2.5 text-caption font-medium ${t===`ok`?`bg-success-soft text-success`:`bg-accent-soft text-accent`}`,title:t===`ok`?void 0:t,children:t===`ok`?`Sent ✓`:`Failed`}),(0,F.jsx)(`button`,{className:st,disabled:t===`sending`,onClick:()=>void S(e.id),children:t===`sending`?`Sending…`:`Test`}),(0,F.jsx)(`button`,{className:rt,onClick:()=>void x(e.id),children:`Delete`})]})]},e.id)})}),i&&v?(0,F.jsxs)(`div`,{className:`mt-4 rounded-control border border-hairline bg-raised px-4 py-3`,children:[(0,F.jsxs)(Ve,{children:[`New `,v.label,` channel`]}),(0,F.jsx)(`label`,{className:ot,children:`Name`}),(0,F.jsx)(`input`,{className:ct,value:o,onChange:e=>s(e.target.value),placeholder:`e.g. My alerts`}),v.fields.map(e=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`label`,{className:ot,children:e.label}),(0,F.jsx)(`input`,{className:`${ct} font-mono`,value:c[e.key]??``,onChange:t=>l(n=>({...n,[e.key]:t.target.value})),placeholder:e.ph})]},e.key)),(0,F.jsx)(`div`,{className:`mt-1 text-label text-secondary`,children:v.help}),(0,F.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,F.jsx)(`button`,{className:st,onClick:()=>a(null),children:`Cancel`}),(0,F.jsx)(`button`,{className:at,disabled:u||!y,onClick:()=>void b(),children:u?`Saving…`:`Save channel`})]})]}):(0,F.jsx)(`div`,{className:`mt-6 flex gap-2`,children:Xr.map(e=>(0,F.jsxs)(`button`,{className:at,onClick:()=>_(e),children:[`+ Add `,Yr[e]?.label??e]},e))})]})}var $r=w({method:`GET`}).handler(a(`94d1108f156fa2273cb78140852e9c3e368de0b8321db0de932a16567671716f`)),ei=w({method:`GET`}).handler(a(`fc7a4775f418dde12f422ff9ca65d9e07428fb0dc35c9399592c0081467330bf`)),ti=w({method:`POST`}).handler(a(`0f279cfe81021a642289ce6e95622e7198aaeab4147880f85824a02ee9ebafcf`)),ni=w({method:`POST`}).handler(a(`5721e01d84c20ffde19d2191648d76a7e5ede3bbb4f44efa59107a786947cf27`)),ri=w({method:`POST`}).handler(a(`d2372a81af17eb3a7e4c1407d6ef26a8a9522b66fd6a94858cb35c864b270d77`)),ii=w({method:`POST`}).handler(a(`284cb82b5e5cb37242d053b1b14449760d8334e9dadffc6dcbba11db2200a709`)),ai=w({method:`POST`}).handler(a(`c3762cecd4a15f7eca064bca295255e942d7c3dce65f66f8593ae145fd7859a0`)),oi=w({method:`POST`}).handler(a(`a3326ed8ecd726fbcc28a439bf0012983cbe387d5062e0155096ee5a558e313b`)),si=w({method:`POST`}).handler(a(`fe7cc1df829414194e9b0615b86584c8510369da18f4d8805ccd76468cadf2ff`)),ci=w({method:`POST`}).handler(a(`bbc1020c771335020ef51b326d74b1649966740f273913d32040fa2c3c9f5f0b`)),li=w({method:`POST`}).handler(a(`b92e9a08eda2d217bf4028f90dbc6bf7d7e8d7c148ebb8a8330286b5935a3fa1`)),ui=w({method:`POST`}).handler(a(`6f5fe23f6da1d4aecc198b6f71a041c0fe29cabb6ccad807bb3f16c23c5bd9cd`));function di(e){return`${typeof window<`u`?window.location.origin:``}/invite/${e}`}function fi({text:e}){let[t,n]=(0,P.useState)(!1);return(0,F.jsx)(`button`,{className:it,onClick:()=>{navigator.clipboard?.writeText(e),n(!0),setTimeout(()=>n(!1),1400)},children:t?`Copied ✓`:`Copy link`})}function pi({open:e,onClose:t,activeTeamId:n}){let r=Oe(),[i,a]=(0,P.useState)([]),[o,s]=(0,P.useState)(null),[c,l]=(0,P.useState)(null),[u,d]=(0,P.useState)(null),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(``),[g,_]=(0,P.useState)(``),[v,y]=(0,P.useState)(``),[b,x]=(0,P.useState)(`member`),[S,C]=(0,P.useState)(`member`),[w,ee]=(0,P.useState)(null),T=(0,P.useCallback)(async()=>{try{a(await $r())}catch{}},[]),E=(0,P.useCallback)(async e=>{let t=await ei({data:e});if(`error`in t){d(t.error),l(null);return}l(t),_(t.name)},[]);(0,P.useEffect)(()=>{if(!e){d(null),s(null),l(null),ee(null);return}T()},[e,T]),(0,P.useEffect)(()=>{!e||!o||(ee(null),E(o))},[e,o,E]);async function D(e){p(!0),d(null);try{return await e()}finally{p(!1)}}async function te(){let e=m.trim();e&&await D(async()=>{let t=await ti({data:e});if(!t.ok)return d(t.error);h(``),await T(),s(t.id)})}async function ne(){if(!c)return;let e=g.trim();!e||e===c.name||await D(async()=>{let t=await ni({data:{teamId:c.id,name:e}});if(!t.ok)return d(t.error);await T(),await E(c.id)})}async function re(){c&&await D(async()=>{let e=await ri({data:c.id});if(!e.ok)return d(e.error);let i=c.id;s(null),l(null),await T(),i===n&&(t(),r({to:`/`}))})}async function ie(){c&&await D(async()=>{let e=await si({data:c.id});if(!e.ok)return d(e.error);let i=c.id;s(null),l(null),await T(),i===n&&(t(),r({to:`/`}))})}async function ae(){if(!c)return;let e=v.trim();e&&await D(async()=>{let t=await ii({data:{teamId:c.id,email:e,role:b}});if(!t.ok)return d(t.error);y(``),await E(c.id),await T()})}async function oe(e,t){c&&await D(async()=>{let n=await ai({data:{teamId:c.id,userId:e,role:t}});if(!n.ok)return d(n.error);await E(c.id)})}async function O(e){c&&await D(async()=>{let t=await oi({data:{teamId:c.id,userId:e}});if(!t.ok)return d(t.error);await E(c.id),await T()})}async function k(){c&&await D(async()=>{let e=await ci({data:{teamId:c.id,role:S}});if(!e.ok)return d(e.error);ee(e.token),await E(c.id)})}async function se(e){c&&await D(async()=>{let t=await li({data:{teamId:c.id,token:e}});if(!t.ok)return d(t.error);w===e&&ee(null),await E(c.id)})}let ce=c?.role===`owner`;return(0,F.jsxs)(He,{open:e,onClose:t,wide:!0,children:[(0,F.jsx)(Be,{title:`Teams`,sub:`Create teams, manage members and roles, and invite people. Team management is owner-only; any member can create loops.`}),u&&(0,F.jsx)(ut,{message:u,onDismiss:()=>d(null),className:`mb-2 mt-3`}),(0,F.jsxs)(`div`,{className:`mt-3 grid gap-6 md:grid-cols-[minmax(0,18rem)_minmax(0,1fr)]`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(Ve,{children:`My teams`}),i.length===0&&(0,F.jsx)(`div`,{className:`py-2 text-body text-secondary`,children:`No teams yet.`}),(0,F.jsx)(`ul`,{className:`flex flex-col gap-1.5`,children:i.map(e=>(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{onClick:()=>s(e.id),className:`flex w-full items-center justify-between gap-2 rounded-control border px-3 py-2 text-left transition-colors ${o===e.id?`border-display bg-raised`:`border-hairline bg-surface hover:bg-raised`}`,children:[(0,F.jsx)(`span`,{className:`min-w-0 truncate text-[15px] font-medium text-display`,children:e.name}),(0,F.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1.5`,children:[(0,F.jsx)(lt,{tone:e.role===`owner`?`ink`:`neutral`,children:e.role}),(0,F.jsxs)(`span`,{className:`text-label text-secondary`,children:[e.memberCount,` member`,e.memberCount===1?``:`s`]})]})]})},e.id))}),(0,F.jsxs)(`div`,{className:`mt-4 rounded-control border border-hairline bg-raised px-3 py-3`,children:[(0,F.jsx)(`label`,{className:`${ot} mt-0`,children:`New team`}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`input`,{className:ct,value:m,onChange:e=>h(e.target.value),placeholder:`e.g. Growth Squad`,onKeyDown:e=>e.key===`Enter`&&void te()}),(0,F.jsx)(`button`,{className:at,disabled:f||!m.trim(),onClick:()=>void te(),children:`Create`})]})]})]}),(0,F.jsx)(`div`,{className:`min-w-0`,children:c?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(Ve,{action:(0,F.jsx)(`button`,{className:it,onClick:()=>{qr(c.id),t(),r({to:`/t/$teamId`,params:{teamId:c.id}})},children:`Open dashboard →`}),children:[c.name,c.personal?` · personal`:``]}),ce&&(0,F.jsxs)(`div`,{className:`mb-4`,children:[(0,F.jsx)(`label`,{className:`mb-1.5 mt-3 block text-label font-medium text-secondary`,children:`Team name`}),(0,F.jsxs)(`div`,{className:`flex gap-2`,children:[(0,F.jsx)(`input`,{"aria-label":`Team name`,className:ct,value:g,onChange:e=>_(e.target.value)}),(0,F.jsx)(`button`,{className:st,disabled:f||!g.trim()||g.trim()===c.name,onClick:()=>void ne(),children:`Rename`})]})]}),(0,F.jsx)(Ve,{children:`Members`}),(0,F.jsx)(`ul`,{className:`flex flex-col gap-2`,children:c.members.map(e=>(0,F.jsxs)(`li`,{className:`flex items-center justify-between gap-3 rounded-control border border-hairline bg-surface px-3 py-2.5`,children:[(0,F.jsx)(`div`,{className:`flex min-w-0 flex-col`,children:(0,F.jsxs)(`span`,{className:`truncate text-[15px] font-medium text-display`,children:[e.email??e.displayName??e.userId,e.isSelf&&(0,F.jsx)(`span`,{className:`ml-1.5 text-label text-secondary`,children:`(you)`})]})}),(0,F.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:ce&&!e.isSelf?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`select`,{"aria-label":`Role`,className:`${ft} w-auto py-1.5`,value:e.role,onChange:t=>void oe(e.userId,t.target.value),children:[(0,F.jsx)(`option`,{value:`owner`,children:`owner`}),(0,F.jsx)(`option`,{value:`member`,children:`member`})]}),(0,F.jsx)(`button`,{className:rt,disabled:f,onClick:()=>void O(e.userId),children:`Remove`})]}):(0,F.jsx)(lt,{tone:e.role===`owner`?`ink`:`neutral`,children:e.role})})]},e.userId))}),ce&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`mt-4 rounded-control border border-hairline bg-raised px-3 py-3`,children:[(0,F.jsx)(`label`,{className:`mb-1.5 mt-3 block text-label font-medium text-secondary mt-0`,children:`Add a member by email`}),(0,F.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,F.jsx)(`input`,{className:`${ct} min-w-[12rem] flex-1`,value:v,onChange:e=>y(e.target.value),placeholder:`teammate@example.com`,onKeyDown:e=>e.key===`Enter`&&void ae()}),(0,F.jsxs)(`select`,{"aria-label":`Role for new member`,className:`${ft} w-auto`,value:b,onChange:e=>x(e.target.value),children:[(0,F.jsx)(`option`,{value:`member`,children:`member`}),(0,F.jsx)(`option`,{value:`owner`,children:`owner`})]}),(0,F.jsx)(`button`,{className:at,disabled:f||!v.trim(),onClick:()=>void ae(),children:`Add`})]}),(0,F.jsx)(`div`,{className:`mt-1.5 text-label text-secondary`,children:`Adds an existing Pievo account immediately. No account yet? Generate an invite link below.`})]}),(0,F.jsx)(Ve,{children:`Invite links`}),(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,F.jsxs)(`select`,{"aria-label":`Invite role`,className:`${ft} w-auto`,value:S,onChange:e=>C(e.target.value),children:[(0,F.jsx)(`option`,{value:`member`,children:`as member`}),(0,F.jsx)(`option`,{value:`owner`,children:`as owner`})]}),(0,F.jsx)(`button`,{className:st,disabled:f,onClick:()=>void k(),children:`Generate invite link`}),(0,F.jsx)(`span`,{className:`text-label text-secondary`,children:`Single-use · expires in 7 days`})]}),c.invites.length>0&&(0,F.jsx)(`ul`,{className:`mt-3 flex flex-col gap-2`,children:c.invites.map(e=>(0,F.jsxs)(`li`,{className:`flex items-center justify-between gap-3 rounded-control border border-hairline bg-surface px-3 py-2.5`,children:[(0,F.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,F.jsx)(lt,{tone:`neutral`,children:e.role}),(0,F.jsx)(`span`,{className:`min-w-0 truncate font-mono text-label ${w===e.token?`text-display`:`text-secondary`}`,children:di(e.token)})]}),(0,F.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,F.jsx)(fi,{text:di(e.token)}),(0,F.jsx)(`button`,{className:rt,disabled:f,onClick:()=>void se(e.token),children:`Revoke`})]})]},e.token))})]}),(0,F.jsxs)(`div`,{className:`mt-6 flex items-center justify-between gap-3 border-t border-hairline pt-4`,children:[c.personal?(0,F.jsx)(`span`,{className:`text-label text-secondary`,children:`Your personal team can't be left or deleted.`}):(0,F.jsx)(`button`,{className:st,disabled:f,onClick:()=>void ie(),children:`Leave team`}),ce&&!c.personal&&(0,F.jsxs)(`button`,{className:rt,disabled:f||c.loopCount>0,title:c.loopCount>0?`Move or delete this team's ${c.loopCount} loop${c.loopCount===1?``:`s`} first`:void 0,onClick:()=>void re(),children:[`Delete team`,c.loopCount>0?` (${c.loopCount} loop${c.loopCount===1?``:`s`})`:``]})]})]}):(0,F.jsx)(`div`,{className:`flex h-full items-center justify-center py-10 text-body text-secondary`,children:`Select a team to manage it, or create one.`})})]})]})}var mi={"react-doctor":{worktreeLabel:`Isolated git worktree · off main`,nodes:[{id:`tick`,kicker:`On schedule`,glyph:`◷`,title:`Every day · 6am`,detail:`the loop wakes on cadence`},{id:`scan`,kicker:`Step 1 · Scan`,glyph:`⌕`,title:`Scan the app`,detail:(0,F.jsx)(`code`,{children:`npx react-doctor@latest`})},{id:`prio`,kicker:`Step 2 · Prioritise`,glyph:`⚖`,title:`Pick one issue`,detail:`the worst, by severity & perf impact`},{id:`fix`,wt:!0,kicker:`Step 3 · Fix`,glyph:`✎`,title:`Fix in isolation`,detail:`smallest change, fresh branch`},{id:`verify`,wt:!0,kicker:`Step 4 · Verify`,glyph:`▷`,title:`Verify the fix`,detail:`prove it holds before proposing`},{id:`ship`,wt:!0,kicker:`Step 5 · Ship`,glyph:`⑂`,title:`Open a PR`,detail:`skip if a prior PR's still open`}],dashboard:[{type:`kanban`,heading:`PR board`,sub:`open → merged`,columns:[[`Open`,[[`#231`,`Key-less list items in <Feed/>`,`opened 6h ago`],[`#219`,`Missing memo on heavy list row`,`opened 1d ago`]]],[`Merged`,[[`#212`,`Effect re-runs on every render`,`merged 2d ago`],[`#205`,`Unmemoised context value`,`merged 4d ago`],[`#198`,`Inline object prop churn`,`merged 6d ago`]]]]},{type:`metric`,label:`Health score`,series:[66,68,67,71,72,71,75,77,76,79,81,80,83,84]}]},"docs-sweep":{worktreeLabel:`Isolated git worktree · off main`,nodes:[{id:`tick`,kicker:`On schedule`,glyph:`◷`,title:`Every Mon · 6am`,detail:`weekly · picks up where it left off`},{id:`diff`,kicker:`Step 1 · Compare`,glyph:`⌕`,title:`Diff since last sweep`,detail:`docs vs. what the code ships now`},{id:`verify`,kicker:`Step 2 · Verify`,glyph:`▷`,title:`Verify for real`,detail:`run the commands, links & examples`},{id:`fix`,wt:!0,kicker:`Step 3 · Fix`,glyph:`✎`,title:`Fix real drift only`,detail:`never rewrite accurate docs`},{id:`ship`,wt:!0,kicker:`Step 4 · Ship`,glyph:`⑂`,title:`Open a PR`,detail:`explains the drift · no stacking`}],dashboard:[{type:`embed`,heading:`Latest sweep summary`,title:`Docs drift — weekly sweep`,date:`2026-07-06`,lines:[`3 items fixed, each verified by running it`,`README — dev server is :3001, not :3000`,`Setup guide — dropped a dead /api/v1 link`,"Quickstart — refreshed `pievo new` flags"]},{type:`metric`,label:`Drift count`,series:[6,4,5,3,2,3,1,2,1,0],note:`0 = docs are honest — a clean stop, no PR.`,betterDown:!0}]},"error-sweep":{worktreeLabel:`Isolated git worktree · off main`,nodes:[{id:`setup`,setup:!0,kicker:`Before first run`,glyph:`⚙`,title:`Verify an error source`,detail:`smoke-test logs / tracker / gh · confirm window`},{id:`tick`,kicker:`On schedule`,glyph:`◷`,title:`Every day · 6am`,detail:`sweeps the agreed window`},{id:`sweep`,kicker:`Step 1 · Sweep`,glyph:`⌕`,title:`Group into incidents`,detail:`cluster repeated symptoms`},{id:`triage`,kicker:`Step 2 · Triage`,glyph:`⚖`,title:`Actionable vs. noise`,detail:`drop upstream & noise`},{id:`fix`,wt:!0,kicker:`Step 3 · Fix`,glyph:`✎`,title:`Root-cause & fix`,detail:`smallest verified fix`},{id:`ship`,wt:!0,kicker:`Step 4 · Ship`,glyph:`⑂`,title:`One PR per fix`,detail:`no stacking · never leak secrets`}],dashboard:[{type:`embed`,heading:`Newest report`,title:`Error sweep — daily`,date:`2026-07-08`,lines:[`2 actionable, 14 noise filtered out`,`Checkout 500 — null cart on retry (fixed)`,`/api/render timeout — upstream, watching`,`No credentials or PII in this report`]},{type:`metric`,label:`Actionable errors`,series:[5,3,4,2,3,1,2,1,0,1],note:`0 actionable = a clean stop, no PR.`,betterDown:!0}]},housekeeper:{worktreeLabel:`Isolated git worktree · off main`,nodes:[{id:`tick`,kicker:`On schedule`,glyph:`◷`,title:`Every day · 7am`,detail:`one cleanup a day, no more`},{id:`survey`,kicker:`Step 1 · Survey`,glyph:`⌕`,title:`Find housekeeping debt`,detail:`dead code, stale files, dupes, unused deps`},{id:`prove`,kicker:`Step 2 · Prove`,glyph:`⚖`,title:`Pick one, prove it safe`,detail:`concrete evidence · uncertain → deferred`},{id:`fix`,wt:!0,kicker:`Step 3 · Fix`,glyph:`✎`,title:`Smallest change`,detail:`keep only if build & tests stay green`},{id:`ship`,wt:!0,kicker:`Step 4 · Ship`,glyph:`⑂`,title:`Open a PR`,detail:`no stacking on an open PR`}],dashboard:[{type:`kanban`,heading:`Cleanup board`,sub:`open → merged`,columns:[[`Open`,[[`#142`,`Remove dead export in utils/date`,`opened 5h ago`],[`#138`,`Drop unused dep left-pad`,`opened 2d ago`]]],[`Merged`,[[`#131`,`Delete stale scripts/legacy dir`,`merged 1d ago`],[`#124`,`Dedupe two clamp() helpers`,`merged 3d ago`],[`#119`,`Rename inconsistent isLoading flags`,`merged 5d ago`]]]]},{type:`metric`,label:`Cleanups landed`,series:[0,1,1,2,3,3,4,5,6,6,7,9,10,12]}]},"dependency-triage":{worktreeLabel:`Isolated git worktree · off main`,nodes:[{id:`setup`,setup:!0,kicker:`Before first run`,glyph:`⚙`,title:`Confirm merge authority`,detail:`smoke-test gh sees Dependabot/Renovate · agree merge policy`},{id:`tick`,kicker:`On schedule`,glyph:`◷`,title:`Every Mon`,detail:`weekly · snapshots the open PRs`},{id:`snapshot`,kicker:`Step 1 · Snapshot`,glyph:`⌕`,title:`List open dep PRs`,detail:`process each exactly once`},{id:`judge`,kicker:`Step 2 · Judge`,glyph:`⚖`,title:`Weigh real evidence`,detail:`diff · release notes · advisories · CI at head`},{id:`test`,wt:!0,kicker:`Step 3 · Test`,glyph:`▷`,title:`Run tests in isolation`,detail:`at the exact head · checkout untouched`},{id:`merge`,wt:!0,kicker:`Step 4 · Merge`,glyph:`⑂`,title:`Merge only what’s authorized`,detail:`major/breaking/security → recommend, don’t merge`}],dashboard:[{type:`kanban`,heading:`Dependency PRs`,sub:`merged · deferred · blocked`,columns:[[`Merged`,[[`#412`,`bump vite 7.0→7.1 (patch)`,`merged 1h ago`],[`#408`,`bump @types/node 20→20.14 (minor)`,`merged 3h ago`]]],[`Deferred`,[[`#399`,`react 18→19 (major) — review`,`deferred 2d ago`],[`#391`,`drizzle-orm 0.30→0.31 — CI red`,`deferred 2d ago`]]],[`Blocked`,[[`#405`,`lodash advisory GHSA-…-qxrp (high)`,`flagged 1h ago`]]]]},{type:`metric`,label:`Open dependency PRs`,series:[9,8,8,6,7,5,4,3,4,2],note:`trends down as PRs are merged or resolved.`,betterDown:!0}]},"market-research":{worktreeLabel:``,nodes:[{id:`setup`,setup:!0,kicker:`Before first run`,glyph:`⚙`,title:`Confirm the research focus`,detail:`infer the product & space · propose a focus, confirm`},{id:`tick`,kicker:`On schedule`,glyph:`◷`,title:`Every day · 5am`,detail:`the loop wakes on cadence`},{id:`research`,kicker:`Step 1 · Research`,glyph:`⌕`,title:`Scan today's market`,detail:`competitors, launches, pricing, ecosystem news`},{id:`report`,kicker:`Step 2 · Report`,glyph:`✎`,title:`One dated report`,detail:(0,F.jsx)(`code`,{children:`type: report · title · date`})},{id:`sharpen`,kicker:`Step 3 · Sharpen`,glyph:`✧`,title:`Sharpen the focus`,detail:`lean into what keeps turning out to matter`}],dashboard:[{type:`calendar`,heading:`Reports calendar`,monthLabel:`July 2026`,days:31,firstWeekday:2,reportDays:[1,2,3,6,7,8]},{type:`embed`,heading:`Newest report`,title:`Market watch — daily digest`,date:`2026-07-08`,lines:[`Today's signal: two rivals converged on usage-based pricing`,`Northwind shipped an AI triage add-on, free in beta`,`Acme cut its Team tier 20% and dropped the seat minimum`,`Ecosystem: a new OSS connector spec is gaining traction`]}]},"follow-up-tracker":{worktreeLabel:``,nodes:[{id:`setup`,setup:!0,kicker:`Before first run`,glyph:`⚙`,title:`Verify + define the target`,detail:`smoke-test an observation path · set a standing objective`},{id:`tick`,kicker:`On cadence`,glyph:`◷`,title:`A few times a day`,detail:`wakes on cadence — no fixed clock time`},{id:`observe`,kicker:`Step 1 · Observe`,glyph:`⌕`,title:`Check the outcome`,detail:`through the verified path — logs / URL / gh`},{id:`report`,kicker:`Step 2 · Report`,glyph:`◈`,title:`Report what you find`,detail:`one report · a metric when natural`},{id:`check`,kicker:`Step 3 · Check`,glyph:`⚖`,title:`Track the objective`,detail:`keep watching and surface regressions`}],dashboard:[{type:`embed`,heading:`Latest observation`,title:`Checkout fix — follow-up`,date:`2026-07-08`,lines:[`conversion 29% → 44% over 3 days`,`no error spikes since the deploy`,`goal: hold ≥ 40% for 48h — 31h in, on track`]},{type:`metric`,label:`Checkout conversion %`,series:[29,31,30,34,37,39,41,43,44],note:`objective: sustain ≥ 40%; keep watching for regressions.`}]}},hi=e=>e in mi,gi=344,_i=68,vi=248,yi=64,bi=192,xi=6,Si=30,Ci=48,wi=280,Ti=18,Ei=16,Di=e=>e.setup?78:yi;function Oi(e){let t=e.findIndex(e=>!e.setup),n=[],r=xi;e.forEach((i,a)=>{if(a>0){let t=!!e[a-1].wt,n=!!i.wt,o=!t&&n?48:t&&n?30:36;r+=Di(e[a-1])+o}let o=i.setup?`setup`:a===t?`tick`:`step`;n.push({...i,kind:o,x:_i,y:r,w:vi,h:Di(i)})});let i=n.filter(e=>e.wt),a=i.length?{x:Ci,y:i[0].y-Ti,w:wi,h:i[i.length-1].y+i[i.length-1].h+Ei-(i[0].y-Ti)}:null,o=[];for(let e=0;e<n.length-1;e++)o.push(`M${bi} ${n[e].y+n[e].h} L${bi} ${n[e+1].y-4}`);let s=n[t],c=s.y+s.h/2,l=n[n.length-1],u=o.length,d=l.y+l.h+28;return o.push(`M${bi} ${l.y+l.h} L${bi} ${d-6} Q${bi} ${d} ${bi-6} ${d} L36 ${d} Q${Si} ${d} ${Si} ${d-6} L${Si} ${c+6} Q${Si} ${c} 36 ${c} L${_i-4} ${c}`),{nodes:n,wires:o,route:`M${n.slice(t).map(e=>`${bi} ${e.y+e.h/2}`).join(` L `)} L${bi} ${d} L${Si} ${d} L${Si} ${c} L${_i-4} ${c}`,worktree:a,returnWireIndex:u,viewW:gi,viewH:d+14}}function ki({template:e}){let t=mi[e.name],[n,r]=(0,P.useState)(`flow`);return t?(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`div`,{className:`mb-4 inline-flex rounded-full border border-hairline bg-raised p-0.5 text-label`,children:[(0,F.jsx)(Ai,{active:n===`flow`,onClick:()=>r(`flow`),children:`Loop flow`}),(0,F.jsx)(Ai,{active:n===`dashboard`,onClick:()=>r(`dashboard`),children:`Dashboard`})]}),n===`flow`?(0,F.jsx)(ji,{spec:t}):(0,F.jsx)(Mi,{spec:t})]}):null}function Ai({active:e,onClick:t,children:n}){return(0,F.jsx)(`button`,{type:`button`,onClick:t,className:`cursor-pointer rounded-full px-3.5 py-1.5 font-medium transition-colors ${e?`bg-surface text-display shadow-card`:`text-secondary hover:text-display`}`,children:n})}function ji({spec:e}){let t=(0,P.useMemo)(()=>Oi(e.nodes),[e]),n=(0,P.useRef)(null);return(0,P.useEffect)(()=>{let e=n.current;if(!e||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)return;let r=e.querySelector(`.lpf-route`),i=e.querySelector(`.lpf-pulse`),a=e.querySelector(`.lpf-comet`);if(!r||!i||!a)return;let o=r.getTotalLength(),s=[];for(let e=0;e<=600;e++){let t=o*e/600,n=r.getPointAtLength(t);s.push([t,n.x,n.y])}let c=(e,t)=>{let n=0,r=1/0;for(let i of s){let a=(i[1]-e)**2+(i[2]-t)**2;a<r&&(r=a,n=i[0])}return n},l=new Map;e.querySelectorAll(`[data-lpf]`).forEach(e=>l.set(e.dataset.lpf,e));let u=t.nodes.filter(e=>e.kind!==`setup`).map(e=>({len:c(e.x+e.w/2,e.y+e.h/2),el:l.get(e.id)})).filter(e=>e.el).sort((e,t)=>e.len-t.len),d=210/1e3,f=[],p=u[0],m=u[u.length-1];f.push({type:`dwell`,at:p,dur:520});for(let e=0;e<u.length-1;e++){let t=u[e],n=u[e+1];f.push({type:`move`,from:t.len,to:n.len,dur:Math.max(360,(n.len-t.len)/d)}),f.push({type:`dwell`,at:n,dur:520})}f.push({type:`return`,from:m.len,to:o,dur:Math.max(720,(o-m.len)/d)}),f.push({type:`dwell`,at:p,dur:160,restart:!0}),a.setAttribute(`stroke-dasharray`,`52 ${o}`);let h=e=>{let t=Math.max(0,Math.min(o,e)),n=r.getPointAtLength(t);i.setAttribute(`cx`,n.x.toFixed(2)),i.setAttribute(`cy`,n.y.toFixed(2)),a.setAttribute(`stroke-dashoffset`,(-(e-52*.5)).toFixed(2))},g=()=>u.forEach(e=>e.el.classList.remove(`active`)),_=()=>u.forEach(e=>e.el.classList.remove(`visited`)),v=e=>{g(),e.el.classList.add(`active`,`visited`)},y=0,b=performance.now(),x=0,S=e=>{let t=f[y],n=e-b;if(n>=t.dur)(t.type===`move`||t.type===`return`)&&t.to!=null&&h(t.to),y=(y+1)%f.length,b=e,t=f[y],t.restart&&_(),t.type===`dwell`&&t.at&&(v(t.at),h(t.at.len)),t.type===`return`&&g();else if((t.type===`move`||t.type===`return`)&&t.from!=null&&t.to!=null){let e=n/t.dur,r=e<.5?2*e*e:1-(-2*e+2)**2/2;h(t.from+(t.to-t.from)*r)}else t.at&&h(t.at.len);x=requestAnimationFrame(S)};return v(p),h(p.len),x=requestAnimationFrame(S),()=>cancelAnimationFrame(x)},[t]),(0,F.jsx)(`div`,{ref:n,children:(0,F.jsx)(`div`,{className:`overflow-x-auto`,children:(0,F.jsxs)(`div`,{className:`relative mx-auto`,style:{width:t.viewW,height:t.viewH},children:[(0,F.jsxs)(`svg`,{className:`absolute inset-0`,width:t.viewW,height:t.viewH,viewBox:`0 0 ${t.viewW} ${t.viewH}`,"aria-hidden":`true`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(`marker`,{id:`lpf-arw`,markerUnits:`userSpaceOnUse`,viewBox:`0 0 8 8`,refX:`6`,refY:`4`,markerWidth:`9`,markerHeight:`9`,orient:`auto-start-reverse`,children:(0,F.jsx)(`path`,{d:`M1.2 1.2 L7 4 L1.2 6.8 Z`,fill:`var(--color-interactive)`})}),(0,F.jsxs)(`filter`,{id:`lpf-glow`,x:`-60%`,y:`-60%`,width:`220%`,height:`220%`,children:[(0,F.jsx)(`feGaussianBlur`,{stdDeviation:`2.4`,result:`b`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`b`}),(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]}),(0,F.jsx)(`path`,{className:`lpf-route`,fill:`none`,d:t.route})]}),t.wires.map((e,n)=>(0,F.jsx)(`path`,{className:`lpf-wire`,d:e,fill:`none`,strokeWidth:2,strokeLinecap:`round`,strokeDasharray:n===t.returnWireIndex?`6 6`:void 0,markerEnd:`url(#lpf-arw)`},n)),(0,F.jsx)(`path`,{className:`lpf-comet`,d:t.route,fill:`none`,strokeWidth:2.5,strokeLinecap:`round`,filter:`url(#lpf-glow)`,opacity:.9}),(0,F.jsx)(`circle`,{className:`lpf-pulse`,r:3.8,filter:`url(#lpf-glow)`})]}),t.worktree&&(0,F.jsx)(`div`,{className:`absolute rounded-[14px] border border-dashed`,style:{left:t.worktree.x,top:t.worktree.y,width:t.worktree.w,height:t.worktree.h,borderColor:`var(--color-interactive)`,background:`var(--color-interactive-soft)`},children:(0,F.jsx)(`span`,{className:`absolute px-2 font-mono text-[9.5px] font-semibold uppercase tracking-[0.1em]`,style:{top:-9,left:16,background:`var(--color-surface)`,color:`var(--color-interactive)`},children:e.worktreeLabel})}),t.nodes.map(e=>(0,F.jsxs)(`div`,{"data-lpf":e.id,className:`lpf-node${e.kind===`tick`?` tick`:``}`,style:{left:e.x,top:e.y,width:e.w,height:e.h},children:[(0,F.jsxs)(`div`,{className:`lpf-k`,children:[(0,F.jsx)(`span`,{className:`g`,children:e.glyph}),e.kicker]}),(0,F.jsx)(`div`,{className:`lpf-t`,children:e.title}),(0,F.jsx)(`div`,{className:`lpf-d`,children:e.detail})]},e.id))]})})})}function Mi({spec:e}){return(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`p`,{className:`mb-4 text-body leading-snug text-secondary`,children:`Pievo sets up a dashboard to track results.`}),e.dashboard.map((e,t)=>(0,F.jsx)(`div`,{className:`min-w-0 ${t>0?`mt-6`:``}`,children:e.type===`kanban`?(0,F.jsx)(Fi,{w:e}):e.type===`metric`?(0,F.jsx)(R,{w:e}):e.type===`calendar`?(0,F.jsx)(Pi,{w:e}):(0,F.jsx)(L,{w:e})},t))]})}var Ni=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`];function Pi({w:e}){let t=new Set(e.reportDays),n=(7-(e.firstWeekday+e.days)%7)%7;return(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`div`,{className:`mb-2 flex items-baseline gap-2`,children:[(0,F.jsx)(`span`,{className:`text-meta font-medium text-secondary`,children:e.heading}),(0,F.jsx)(`span`,{className:`font-mono text-caption text-disabled`,children:e.monthLabel}),(0,F.jsxs)(`span`,{className:`ml-auto font-mono text-caption text-disabled`,children:[e.reportDays.length,` report`,e.reportDays.length===1?``:`s`]})]}),(0,F.jsxs)(`div`,{className:`grid min-w-0 grid-cols-7 border-l border-t border-hairline`,children:[Ni.map(e=>(0,F.jsx)(`div`,{className:`border-b border-r border-hairline px-1.5 py-1 text-right text-micro font-medium text-disabled`,children:e},e)),Array.from({length:e.firstWeekday},(e,t)=>(0,F.jsx)(`div`,{className:`border-b border-r border-hairline bg-raised`},`lead${t}`)),Array.from({length:e.days},(e,n)=>{let r=n+1;return(0,F.jsxs)(`div`,{className:`relative min-h-[34px] min-w-0 border-b border-r border-hairline bg-surface px-1 pb-1 pt-4`,children:[(0,F.jsx)(`span`,{className:`absolute right-1 top-0.5 font-mono text-micro text-disabled`,children:r}),t.has(r)&&(0,F.jsx)(`span`,{title:`report · day ${r}`,className:`absolute bottom-1 left-1 inline-block size-1.5 rounded-full`,style:{background:`var(--color-interactive)`}})]},r)}),Array.from({length:n},(e,t)=>(0,F.jsx)(`div`,{className:`border-b border-r border-hairline bg-raised`},`trail${t}`))]}),(0,F.jsxs)(`div`,{className:`mt-2 flex items-center gap-1.5 text-caption font-medium text-secondary`,children:[(0,F.jsx)(`span`,{className:`inline-block size-1.5 rounded-full`,style:{background:`var(--color-interactive)`}}),` Day with a report`]})]})}function Fi({w:e}){return(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`div`,{className:`mb-2 text-meta font-medium text-secondary`,children:[e.heading,` `,e.sub&&(0,F.jsx)(`span`,{className:`font-mono text-caption text-disabled`,children:e.sub})]}),(0,F.jsx)(`div`,{className:`flex min-w-0 gap-3 overflow-x-auto pb-1`,children:e.columns.map(([e,t])=>(0,F.jsxs)(`div`,{className:`flex w-[190px] shrink-0 flex-col`,children:[(0,F.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 border-b border-hairline pb-1.5`,children:[(0,F.jsx)(`span`,{className:`text-label font-semibold text-primary`,children:e}),(0,F.jsx)(`span`,{className:`text-caption text-disabled`,children:t.length})]}),(0,F.jsx)(`div`,{className:`flex flex-col gap-2`,children:t.map(([e,t,n])=>(0,F.jsx)(`div`,{className:`min-w-0 overflow-hidden rounded-control border border-hairline bg-surface shadow-card transition-colors hover:border-wire`,children:(0,F.jsxs)(`div`,{className:`flex flex-col gap-1 px-2.5 py-2`,children:[(0,F.jsx)(`span`,{className:`truncate text-meta text-primary`,children:t}),(0,F.jsxs)(`span`,{className:`truncate font-mono text-micro text-disabled`,children:[e,` · `,n]})]})},e))})]},e))})]})}function L({w:e}){return(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`div`,{className:`mb-2 text-meta font-medium text-secondary`,children:e.heading}),(0,F.jsxs)(`div`,{className:`rounded-card border border-hairline bg-surface p-3.5 shadow-card`,children:[(0,F.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsx)(`div`,{className:`truncate text-meta font-semibold text-display`,children:e.title}),(0,F.jsx)(`div`,{className:`font-mono text-micro text-disabled`,children:e.date})]}),(0,F.jsx)(`span`,{className:`shrink-0 rounded-full border border-hairline bg-raised px-2 py-0.5 font-mono text-micro text-secondary`,children:`report`})]}),(0,F.jsx)(`div`,{className:`mt-3 flex flex-col gap-1.5 border-t border-hairline pt-3`,children:e.lines.map((e,t)=>t===0?(0,F.jsx)(`div`,{className:`text-meta font-medium text-primary`,children:e},t):(0,F.jsxs)(`div`,{className:`flex gap-2 text-caption text-secondary`,children:[(0,F.jsx)(`span`,{className:`text-disabled`,children:`—`}),(0,F.jsx)(`span`,{className:`min-w-0`,children:e})]},t))})]})]})}function R({w:e}){let t=e.series,n=t[t.length-1]??0,r=n-(t[0]??0),i=e.betterDown?r<0:r>0;return(0,F.jsxs)(`div`,{className:`min-w-0 rounded-card border border-hairline bg-surface p-3.5 shadow-card`,children:[(0,F.jsxs)(`div`,{className:`mb-3 flex items-baseline gap-2`,children:[(0,F.jsx)(`span`,{className:`text-label font-semibold text-primary`,children:e.label}),(0,F.jsx)(`span`,{className:`ml-auto font-mono text-body font-semibold text-display`,children:n}),r!==0&&(0,F.jsxs)(`span`,{className:`font-mono text-caption`,style:{color:i?`var(--color-success)`:`var(--color-accent)`},children:[r>0?`▲`:`▼`,` `,Math.abs(r)]})]}),(0,F.jsx)(Ii,{series:t}),e.note&&(0,F.jsx)(`p`,{className:`mt-2 font-mono text-caption text-secondary`,children:e.note})]})}function Ii({series:e}){let t=(0,P.useMemo)(()=>`lpf-grad-${Math.round(e.reduce((e,t)=>e+t,0))}-${e.length}`,[e]),n=Math.min(...e),r=Math.max(...e),i=Math.max(1,r-n),a=Math.floor(n-i*.15),o=Math.ceil(r+i*.15);n>=0&&a<0&&(a=0);let s=t=>26+t*286/(e.length-1),c=e=>10+(1-(e-a)/(o-a||1))*122,l=e=>Math.round(e*100)/100,u=`M`+e.map((e,t)=>`${l(s(t))} ${l(c(e))}`).join(` L `),d=`${u} L ${l(s(e.length-1))} 132 L ${l(s(0))} 132 Z`,f=[a,Math.round((a+o)/2),o],p=e.length-1;return(0,F.jsxs)(`svg`,{viewBox:`0 0 320 150`,width:`100%`,className:`block`,role:`img`,"aria-label":`metric trend`,children:[(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{id:t,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,F.jsx)(`stop`,{offset:`0`,stopColor:`var(--color-chart-1)`,stopOpacity:`0.16`}),(0,F.jsx)(`stop`,{offset:`1`,stopColor:`var(--color-chart-1)`,stopOpacity:`0`})]})}),f.map((e,t)=>(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`line`,{x1:26,y1:l(c(e)),x2:312,y2:l(c(e)),stroke:`var(--color-hairline)`,strokeWidth:1}),(0,F.jsx)(`text`,{x:20,y:l(c(e))+3,textAnchor:`end`,fontFamily:`var(--font-mono)`,fontSize:9,fill:`var(--color-disabled)`,children:e})]},t)),(0,F.jsx)(`path`,{d,fill:`url(#${t})`}),(0,F.jsx)(`path`,{d:u,fill:`none`,stroke:`var(--color-chart-1)`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`circle`,{cx:l(s(p)),cy:l(c(e[p]??0)),r:3,fill:`var(--color-chart-1)`,stroke:`var(--color-surface)`,strokeWidth:1.5}),(0,F.jsx)(`text`,{x:26,y:145,fontFamily:`var(--font-mono)`,fontSize:9,fill:`var(--color-disabled)`,children:`older`}),(0,F.jsx)(`text`,{x:312,y:145,textAnchor:`end`,fontFamily:`var(--font-mono)`,fontSize:9,fill:`var(--color-disabled)`,children:`now`})]})}var Li=1e5,Ri={"claude-code":`Claude Code`,codex:`Codex`};function zi({size:e=14}){return(0,F.jsx)(`svg`,{"aria-hidden":!0,width:e,height:e,viewBox:`0 0 24 24`,fill:`#D97757`,fillRule:`evenodd`,className:`shrink-0`,xmlns:`http://www.w3.org/2000/svg`,children:(0,F.jsx)(`path`,{clipRule:`evenodd`,d:`M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z`})})}function Bi({size:e=14}){return(0,F.jsxs)(`svg`,{"aria-hidden":!0,width:e,height:e,viewBox:`0 0 24 24`,className:`shrink-0`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`path`,{d:`M19.503 0H4.496A4.496 4.496 0 000 4.496v15.007A4.496 4.496 0 004.496 24h15.007A4.496 4.496 0 0024 19.503V4.496A4.496 4.496 0 0019.503 0z`,fill:`#fff`}),(0,F.jsx)(`path`,{d:`M9.064 3.344a4.578 4.578 0 012.285-.312c1 .115 1.891.54 2.673 1.275.01.01.024.017.037.021a.09.09 0 00.043 0 4.55 4.55 0 013.046.275l.047.022.116.057a4.581 4.581 0 012.188 2.399c.209.51.313 1.041.315 1.595a4.24 4.24 0 01-.134 1.223.123.123 0 00.03.115c.594.607.988 1.33 1.183 2.17.289 1.425-.007 2.71-.887 3.854l-.136.166a4.548 4.548 0 01-2.201 1.388.123.123 0 00-.081.076c-.191.551-.383 1.023-.74 1.494-.9 1.187-2.222 1.846-3.711 1.838-1.187-.006-2.239-.44-3.157-1.302a.107.107 0 00-.105-.024c-.388.125-.78.143-1.204.138a4.441 4.441 0 01-1.945-.466 4.544 4.544 0 01-1.61-1.335c-.152-.202-.303-.392-.414-.617a5.81 5.81 0 01-.37-.961 4.582 4.582 0 01-.014-2.298.124.124 0 00.006-.056.085.085 0 00-.027-.048 4.467 4.467 0 01-1.034-1.651 3.896 3.896 0 01-.251-1.192 5.189 5.189 0 01.141-1.6c.337-1.112.982-1.985 1.933-2.618.212-.141.413-.251.601-.33.215-.089.43-.164.646-.227a.098.098 0 00.065-.066 4.51 4.51 0 01.829-1.615 4.535 4.535 0 011.837-1.388zm3.482 10.565a.637.637 0 000 1.272h3.636a.637.637 0 100-1.272h-3.636zM8.462 9.23a.637.637 0 00-1.106.631l1.272 2.224-1.266 2.136a.636.636 0 101.095.649l1.454-2.455a.636.636 0 00.005-.64L8.462 9.23z`,fill:`url(#lobe-icons-codex-grad)`}),(0,F.jsx)(`defs`,{children:(0,F.jsxs)(`linearGradient`,{gradientUnits:`userSpaceOnUse`,id:`lobe-icons-codex-grad`,x1:`12`,x2:`12`,y1:`3`,y2:`21`,children:[(0,F.jsx)(`stop`,{stopColor:`#B1A7FF`}),(0,F.jsx)(`stop`,{offset:`.5`,stopColor:`#7A9DFF`}),(0,F.jsx)(`stop`,{offset:`1`,stopColor:`#3941FF`})]})})]})}var Vi=e=>`Fetch ${e}/api/bootstrap and help me build a loop.`;function Hi({open:e,onClose:t,onCreated:n,template:r=null,teamId:i}){let[a,o]=(0,P.useState)(null),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(null),[d,p]=(0,P.useState)(!1),[h,g]=(0,P.useState)(!1),[_,v]=(0,P.useState)(null),[y,x]=(0,P.useState)(!1),S=(0,P.useRef)(null),C=(0,P.useRef)(n);C.current=n;let w=typeof window<`u`?window.location.origin:``,ee=Vi(w),T=a&&s?[`server-url: ${w}`,`connect-key: ${a}`,...s?.customCli?[`pievo-cli: ${s.pievoCli}`]:[]].join(`
|
|
11
11
|
`):``,E=r?.description?.trim()??``,D=a&&s?[ee,``,T,...E?[``,E]:[]].join(`
|
|
12
|
-
`):``;(0,P.useEffect)(()=>{e&&(o(null),c(null),u(null),v(null),x(!1),p(!1),g(!1))},[e,r]),(0,P.useEffect)(()=>{if(!e)return;let t=!0;return f().then(e=>{t&&c(e)}).catch(()=>{t&&x(!0)}),m({data:i}).then(e=>{t&&(`token`in e?o(e.token):v(e.error))}).catch(()=>{t&&v(`could not mint a connect key`)}),()=>{t=!1}},[e,i]),(0,P.useEffect)(()=>{if(!e||l||!a)return;S.current&&clearInterval(S.current),S.current=setInterval(()=>{b({data:a}).then(e=>{e.done&&e.id&&(S.current&&clearInterval(S.current),u({id:e.id,name:e.name??`loop`,agent:e.agent??`claude-code`}),C.current())}).catch(()=>{})},2500);let t=setTimeout(()=>g(!0),Li);return()=>{S.current&&clearInterval(S.current),clearTimeout(t)}},[e,l,a]);async function te(){try{await navigator.clipboard.writeText(D),p(!0),setTimeout(()=>p(!1),1500)}catch{v(`could not copy - select the text and copy manually`)}}let ne=(e=!0)=>(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,F.jsx)(`h3`,{className:`text-label font-semibold text-display`,children:`Paste to capture it`}),e&&D&&(0,F.jsx)(`button`,{className:it,onClick:()=>void te(),children:d?`✓ Copied`:`Copy`})]}),(0,F.jsxs)(`div`,{className:`mt-2 overflow-hidden rounded-control border border-hairline bg-raised p-3 font-mono text-label text-primary`,children:[(0,F.jsx)(`p`,{className:`leading-relaxed`,children:ee}),T?(0,F.jsx)(`pre`,{className:`mt-3 overflow-x-auto whitespace-pre-wrap border-t border-hairline pt-3 leading-relaxed text-secondary`,children:T}):(0,F.jsx)(`div`,{className:`mt-3 border-t border-hairline pt-3 leading-relaxed text-secondary`,children:y?`Could not load the CLI configuration. Close and try again.`:a?`Loading CLI configuration…`:`Minting a connect key…`}),E&&T&&(0,F.jsx)(`p`,{className:`mt-3 whitespace-pre-wrap border-t border-hairline pt-3 leading-relaxed text-primary`,children:E})]}),(0,F.jsxs)(`p`,{className:`mt-2 text-body leading-snug text-secondary`,children:[`Paste it in that same session - reuses this machine automatically. Your agent will`,` `,r?`set the loop up from here.`:`ask what the loop should do.`]})]}),re=h?{dot:`bg-secondary`,text:`Still waiting - check your coding agent is running in the right project, then paste again.`}:{dot:`animate-pulse bg-rubik-orange`,text:`Waiting for your coding agent…`},ie=(0,F.jsxs)(`button`,{className:`${dt} ml-auto`,onClick:()=>void te(),disabled:!D,children:[(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,F.jsx)(zi,{}),(0,F.jsx)(Bi,{})]}),d?`✓ Copied`:`Copy prompt`]});if(l)return(0,F.jsxs)(He,{open:e,onClose:t,children:[(0,F.jsx)(Be,{title:`Loop created`,sub:`${Ri[l.agent]} built and registered it.`}),(0,F.jsxs)(`div`,{className:`mt-5 rounded-card border border-hairline bg-surface p-5 shadow-card`,children:[(0,F.jsxs)(`div`,{className:`text-[17px] font-medium text-display`,children:[`✓ `,l.name]}),(0,F.jsx)(`div`,{className:`mt-1 text-body text-secondary`,children:`It’s scheduled now and will run on the machine.`})]}),(0,F.jsx)(`div`,{className:`mt-4`,children:(0,F.jsx)(`button`,{className:at,onClick:t,children:`Done`})})]});if(r){let n=hi(r.name),i=(0,F.jsxs)(`div`,{className:`min-w-0`,children:[ne(!1),_&&(0,F.jsxs)(`div`,{className:`mt-3 text-body text-accent`,children:[`Error: `,_]}),(0,F.jsxs)(`div`,{className:`mt-6 flex items-start gap-3`,children:[(0,F.jsx)(`span`,{className:`mt-1 inline-block h-2 w-2 shrink-0 rounded-full ${re.dot}`}),(0,F.jsx)(`span`,{className:`text-label leading-relaxed text-secondary`,children:re.text}),ie]})]});return(0,F.jsxs)(He,{open:e,onClose:t,wide:n,children:[(0,F.jsx)(Be,{title:r.label,sub:`Paste this into your coding agent, in the project you want the loop for.`}),n?(0,F.jsxs)(`div`,{className:`mt-5 grid gap-8 md:grid-cols-[minmax(0,1fr)_400px]`,children:[i,(0,F.jsx)(`div`,{className:`min-w-0 md:border-l md:border-hairline md:pl-8`,children:(0,F.jsx)(ki,{template:r})})]}):(0,F.jsx)(`div`,{className:`mt-6`,children:i})]})}return(0,F.jsxs)(He,{open:e,onClose:t,children:[(0,F.jsx)(Be,{title:`New loop`}),(0,F.jsxs)(`div`,{className:`mt-6`,children:[(0,F.jsxs)(`div`,{className:`flex gap-3.5`,children:[(0,F.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,F.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center rounded-full border border-display text-micro font-medium leading-none text-display`,children:`1`}),(0,F.jsx)(`span`,{className:`mt-1 w-px flex-1 bg-hairline`})]}),(0,F.jsxs)(`div`,{className:`pb-6`,children:[(0,F.jsx)(`h3`,{className:`text-label font-semibold text-display`,children:`Do it once in your coding agent`}),(0,F.jsx)(`p`,{className:`mt-1.5 text-body leading-snug text-secondary`,children:`Run the task yourself first, to a real result you’re happy with.`})]})]}),(0,F.jsxs)(`div`,{className:`flex gap-3.5`,children:[(0,F.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center rounded-full border border-display text-micro font-medium leading-none text-display`,children:`2`}),ne(!1)]})]}),_&&(0,F.jsxs)(`div`,{className:`mt-3 text-body text-accent`,children:[`Error: `,_]}),(0,F.jsxs)(`div`,{className:`mt-6 flex items-start gap-3`,children:[(0,F.jsx)(`span`,{className:`mt-1 inline-block h-2 w-2 shrink-0 rounded-full ${re.dot}`}),(0,F.jsx)(`span`,{className:`text-label leading-relaxed text-secondary`,children:re.text}),ie]})]})}async function Ui(e){let[t,n,r]=await Promise.all([p({data:e}),We({data:e}),x({data:e})]);return{jobs:t,machines:n,teams:r}}function Wi({teamId:e,initial:t}){let[n,r]=(0,P.useState)(null),{jobs:i,machines:a,teams:o}=n??t,s=t.templates,c=a.filter(e=>e.online).length,l=Oe(),[u,d]=(0,P.useState)({open:!1,template:null}),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(!1),v=(0,P.useCallback)(async()=>{try{r(await Ui(e))}catch{}},[e]),y=(0,P.useRef)(!1);y.current=u.open||f||m||g;let b=i.some(e=>e.running);(0,P.useEffect)(()=>{let e=setInterval(()=>{y.current||v()},b?3e3:1e4);return()=>clearInterval(e)},[v,b]);let x=()=>void v(),S=i.filter(e=>e.enabled).length,C=()=>({onOpen:e=>void l({to:`/loops/$loopId`,params:{loopId:e}}),onPickRun:(e,t)=>void l({to:`/loops/$loopId/runs/$runId`,params:{loopId:e,runId:t.id}})});return(0,F.jsxs)(Gr,{delay:120,children:[(0,F.jsx)(`header`,{className:`glass glass-bar sticky top-0 z-50`,children:(0,F.jsxs)(`div`,{className:`mx-auto flex max-w-[1180px] items-center gap-3 px-8 py-2.5`,children:[(0,F.jsx)(_e,{size:30}),(0,F.jsx)(`span`,{className:`text-[18px] font-semibold tracking-[-0.015em] text-display`,children:`Pievo`}),(0,F.jsx)(Jr,{data:o}),(0,F.jsx)(`div`,{className:`flex-1`}),(0,F.jsx)(`a`,{href:Ae,target:`_blank`,rel:`noreferrer`,"aria-label":`GitHub repository`,title:`GitHub`,className:Ki,children:(0,F.jsx)(Se,{className:`size-[17px]`})}),o&&o.teams.length>0&&(0,F.jsx)(`button`,{onClick:()=>_(!0),className:Gi,children:`Teams`}),(0,F.jsx)(`button`,{onClick:()=>h(!0),className:Gi,children:`Notifications`}),(0,F.jsxs)(`button`,{onClick:()=>p(!0),className:`${Gi} gap-1.5`,children:[(0,F.jsx)(`span`,{className:`inline-block size-1.5 rounded-full ${c?`bg-rubik-green`:`bg-disabled`}`}),c,` `,c===1?`machine`:`machines`,` online`]}),(0,F.jsx)(`button`,{onClick:()=>d({open:!0,template:null}),className:`inline-flex shrink-0 cursor-pointer items-center rounded-full bg-display px-3.5 py-1.5 text-meta font-medium text-paper transition-opacity hover:opacity-85`,children:`New Loop`})]})}),(0,F.jsxs)(`main`,{className:`mx-auto max-w-[1180px] px-8 pb-24`,children:[(0,F.jsxs)(`section`,{className:`pb-2 pt-14 text-center`,children:[(0,F.jsx)(`h1`,{className:`font-pixel text-[clamp(28px,4.5vw,38px)] leading-[1.15] text-display`,children:`What should happen while you sleep?`}),s.length>0&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`mb-5 mt-2 text-body text-secondary`,children:`Start with a template…`}),(0,F.jsx)(qi,{templates:s,onPick:e=>d({open:!0,template:e})})]}),(0,F.jsx)(`div`,{className:`mt-7`,children:(0,F.jsxs)(`button`,{onClick:()=>d({open:!0,template:null}),className:`inline-flex cursor-pointer items-center gap-1.5 rounded-full bg-display px-6 py-2.5 text-body font-medium text-paper transition-opacity hover:opacity-85`,children:[s.length?`Start a blank loop`:`Start your first loop`,(0,F.jsx)(`span`,{"aria-hidden":!0,children:`→`})]})})]}),(0,F.jsxs)(`div`,{className:`mb-5 mt-12 flex items-baseline gap-2.5`,children:[(0,F.jsx)(`h2`,{className:`text-body font-semibold text-display`,children:`Active loops`}),(0,F.jsx)(`span`,{className:`text-label text-secondary`,children:i.length?`${S} scheduled · ${i.length} total`:``})]}),i.length?i.map(e=>(0,P.createElement)(Kr,{job:e,...C(),key:e.id})):(0,F.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,F.jsx)(`div`,{className:`text-[15px] text-secondary`,children:`No loops yet`}),!i.length&&(0,F.jsx)(`div`,{className:`mt-1.5 text-body text-disabled`,children:`Pick a template above, or start a blank loop.`})]}),(0,F.jsx)(Ee,{onStart:()=>d({open:!0,template:null})})]}),(0,F.jsx)(Hi,{open:u.open,template:u.template,teamId:e,onClose:()=>d({open:!1,template:null}),onCreated:x}),(0,F.jsx)(Ue,{open:f,onClose:()=>p(!1),teamId:e}),(0,F.jsx)(Qr,{open:m,onClose:()=>h(!1)}),(0,F.jsx)(pi,{open:g,onClose:()=>_(!1),activeTeamId:e})]})}var Gi=`inline-flex shrink-0 cursor-pointer items-center rounded-full px-3 py-1.5 text-meta font-medium text-secondary transition-colors hover:bg-raised hover:text-display`,Ki=`inline-flex shrink-0 cursor-pointer items-center rounded-full p-1.5 text-secondary transition-colors hover:bg-raised hover:text-display`;function qi({templates:e,onPick:t}){let n=e.length<=5?1:Math.ceil(e.length/4),r=[];for(let t=0,i=0;t<n;t++){let a=Math.ceil((e.length-i)/(n-t));r.push(e.slice(i,i+a)),i+=a}return(0,F.jsx)(`div`,{className:`pb-3 pt-1`,children:r.map((e,n)=>{let r=(e.length-1)/2;return(0,F.jsx)(`div`,{className:`flex flex-wrap items-start justify-center`,children:e.map((n,i)=>{let a=i-r;return(0,F.jsxs)(`button`,{type:`button`,onClick:()=>t(n),title:n.desc,className:`fan-card relative w-[196px] shrink-0 cursor-pointer rounded-card border border-hairline bg-surface p-3 text-left shadow-[0_12px_28px_-16px_rgba(0,0,0,0.25)] outline-none focus-visible:ring-2 focus-visible:ring-interactive`,style:{"--tilt":`${a*3.5}deg`,"--lift":`${Math.abs(a)*7}px`,marginInline:e.length>1?`-5px`:void 0},children:[n.thumb?(0,F.jsx)(`span`,{className:`block overflow-hidden rounded-control bg-raised [&_svg]:block [&_svg]:h-auto [&_svg]:w-full`,dangerouslySetInnerHTML:{__html:n.thumb}}):(0,F.jsx)(`span`,{className:`flex h-[76px] items-center justify-center rounded-control bg-raised text-secondary`,children:(0,F.jsx)(Ji,{})}),(0,F.jsx)(`span`,{className:`mt-2.5 block truncate text-center text-meta font-semibold text-primary`,children:n.label}),(0,F.jsx)(`span`,{className:`mt-0.5 line-clamp-3 min-h-[45px] text-center text-caption leading-snug text-secondary`,children:n.desc})]},n.name)})},n)})})}function Ji(){return(0,F.jsxs)(`svg`,{"aria-hidden":!0,width:`30`,height:`30`,viewBox:`0 0 30 30`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,F.jsx)(`path`,{d:`M25.5 15a10.5 10.5 0 1 1-3.1-7.4`}),(0,F.jsx)(`path`,{d:`M25.5 3.5v5.2h-5.2`})]})}var Yi=Me(`/`)({loader:async()=>{let e=await S();if(e.enabled){let{data:t}=await De.getSession();if(!t)return{mode:`signin`,auth:e};throw i({to:`/t/$teamId`,params:{teamId:await v()}})}return{mode:`dashboard`,auth:e,initial:{...await Ui(),templates:await y()}}},component:Te(()=>je(()=>import(`./routes-YnrsFY5X.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`),errorComponent:Te(()=>je(()=>import(`./routes-CmuCVIIS.js`),__vite__mapDeps([7,1,3,8,6])),`errorComponent`)}),Xi=Me(`/t/$teamId`)({loader:async({params:e})=>{let t=e.teamId,n=await S();if(n.enabled){let{data:e}=await De.getSession();if(!e)return{mode:`signin`,auth:n,teamId:t};if(!await C({data:t}))throw Error(`This team does not exist, or you do not have access to it.`)}return{mode:`dashboard`,auth:n,teamId:t,initial:{...await Ui(t),templates:await y()}}},component:Te(()=>je(()=>import(`./t._teamId-BlE4mCSj.js`),__vite__mapDeps([9,1,2,3,4,5,6])),`component`),errorComponent:Te(()=>je(()=>import(`./t._teamId-Bi-C9s5j.js`),__vite__mapDeps([10,1,3,8,6])),`errorComponent`)}),Zi=Me(`/loops/$loopId`)({loader:async()=>{let e=await S();if(e.enabled){let{data:t}=await De.getSession();if(!t)return{auth:e}}return{auth:e}},component:Te(()=>je(()=>import(`./loops._loopId-C9vRjZ8W.js`),__vite__mapDeps([11,1,2,3,4,12,13,6,14,15,5,8])),`component`)}),Qi=Me(`/invite/$token`)({loader:async({params:e})=>{let t=await S(),n=!1;if(t.enabled){let{data:e}=await De.getSession();n=!!e}return{auth:t,token:e.token,signedIn:n}},component:Te(()=>je(()=>import(`./invite._token-Dp2HL9X5.js`),__vite__mapDeps([16,1,2,3,4,5,6])),`component`),errorComponent:Te(()=>je(()=>import(`./invite._token-CQgv8lTC.js`),__vite__mapDeps([17,1,3,8,6])),`errorComponent`)}),$i=Me(`/loops/$loopId_/runs/$runId`)({loader:async()=>{let e=await S();if(e.enabled){let{data:t}=await De.getSession();if(!t)return{auth:e}}return{auth:e}},component:Te(()=>je(()=>import(`./loops._loopId_.runs._runId-BNN-dLrW.js`),__vite__mapDeps([18,1,2,3,4,5,6,8,14])),`component`)}),ea=Yi.update({id:`/`,path:`/`,getParentRoute:()=>Ur}),ta=Xi.update({id:`/t/$teamId`,path:`/t/$teamId`,getParentRoute:()=>Ur}),na=Zi.update({id:`/loops/$loopId`,path:`/loops/$loopId`,getParentRoute:()=>Ur}),ra={IndexRoute:ea,InviteTokenRoute:Qi.update({id:`/invite/$token`,path:`/invite/$token`,getParentRoute:()=>Ur}),LoopsLoopIdRoute:na,TTeamIdRoute:ta,LoopsLoopIdRunsRunIdRoute:$i.update({id:`/loops/$loopId_/runs/$runId`,path:`/loops/$loopId/runs/$runId`,getParentRoute:()=>Ur})},ia=Ur._addFileChildren(ra);function aa(){return jr({routeTree:ia,scrollRestoration:!0,defaultPreload:`intent`})}async function oa(){let e=await aa(),t=[];return window.__TSS_START_OPTIONS__={serializationAdapters:t},t.push(Hn),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.matchesId.get().length||await Gn(e),e}var sa=oa;async function z(){let e=await sa();return window.$_TSR?.h(),e}var ca;function la(){return ca||=z(),(0,F.jsx)(qn,{promise:ca,children:e=>(0,F.jsx)(Pr,{router:e})})}var ua=vt();(0,P.startTransition)(()=>{(0,ua.hydrateRoot)(document,(0,F.jsx)(P.StrictMode,{children:(0,F.jsx)(la,{})}))});export{Yi as a,qr as c,Xi as i,Qi as n,Wi as o,Zi as r,ui as s,$i as t};
|
|
12
|
+
`):``;(0,P.useEffect)(()=>{e&&(o(null),c(null),u(null),v(null),x(!1),p(!1),g(!1))},[e,r]),(0,P.useEffect)(()=>{if(!e)return;let t=!0;return f().then(e=>{t&&c(e)}).catch(()=>{t&&x(!0)}),m({data:i}).then(e=>{t&&(`token`in e?o(e.token):v(e.error))}).catch(()=>{t&&v(`could not mint a connect key`)}),()=>{t=!1}},[e,i]),(0,P.useEffect)(()=>{if(!e||l||!a)return;S.current&&clearInterval(S.current),S.current=setInterval(()=>{b({data:a}).then(e=>{e.done&&e.id&&(S.current&&clearInterval(S.current),u({id:e.id,name:e.name??`loop`,agent:e.agent??`claude-code`}),C.current())}).catch(()=>{})},2500);let t=setTimeout(()=>g(!0),Li);return()=>{S.current&&clearInterval(S.current),clearTimeout(t)}},[e,l,a]);async function te(){try{await navigator.clipboard.writeText(D),p(!0),setTimeout(()=>p(!1),1500)}catch{v(`could not copy - select the text and copy manually`)}}let ne=(e=!0)=>(0,F.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,F.jsx)(`h3`,{className:`text-label font-semibold text-display`,children:`Paste to capture it`}),e&&D&&(0,F.jsx)(`button`,{className:it,onClick:()=>void te(),children:d?`✓ Copied`:`Copy`})]}),(0,F.jsxs)(`div`,{className:`mt-2 overflow-hidden rounded-control border border-hairline bg-raised p-3 font-mono text-label text-primary`,children:[(0,F.jsx)(`p`,{className:`leading-relaxed`,children:ee}),T?(0,F.jsx)(`pre`,{className:`mt-3 overflow-x-auto whitespace-pre-wrap border-t border-hairline pt-3 leading-relaxed text-secondary`,children:T}):(0,F.jsx)(`div`,{className:`mt-3 border-t border-hairline pt-3 leading-relaxed text-secondary`,children:y?`Could not load the CLI configuration. Close and try again.`:a?`Loading CLI configuration…`:`Minting a connect key…`}),E&&T&&(0,F.jsx)(`p`,{className:`mt-3 whitespace-pre-wrap border-t border-hairline pt-3 leading-relaxed text-primary`,children:E})]}),(0,F.jsxs)(`p`,{className:`mt-2 text-body leading-snug text-secondary`,children:[`Paste it in that same session - reuses this machine automatically. Your agent will`,` `,r?`set the loop up from here.`:`ask what the loop should do.`]})]}),re=h?{dot:`bg-secondary`,text:`Still waiting - check your coding agent is running in the right project, then paste again.`}:{dot:`animate-pulse bg-rubik-orange`,text:`Waiting for your coding agent…`},ie=(0,F.jsxs)(`button`,{className:`${dt} ml-auto`,onClick:()=>void te(),disabled:!D,children:[(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-0.5`,children:[(0,F.jsx)(zi,{}),(0,F.jsx)(Bi,{})]}),d?`✓ Copied`:`Copy prompt`]});if(l)return(0,F.jsxs)(He,{open:e,onClose:t,children:[(0,F.jsx)(Be,{title:`Loop created`,sub:`${Ri[l.agent]} built and registered it.`}),(0,F.jsxs)(`div`,{className:`mt-5 rounded-card border border-hairline bg-surface p-5 shadow-card`,children:[(0,F.jsxs)(`div`,{className:`text-[17px] font-medium text-display`,children:[`✓ `,l.name]}),(0,F.jsx)(`div`,{className:`mt-1 text-body text-secondary`,children:`It’s scheduled now and will run on the machine.`})]}),(0,F.jsx)(`div`,{className:`mt-4`,children:(0,F.jsx)(`button`,{className:at,onClick:t,children:`Done`})})]});if(r){let n=hi(r.name),i=(0,F.jsxs)(`div`,{className:`min-w-0`,children:[ne(!1),_&&(0,F.jsxs)(`div`,{className:`mt-3 text-body text-accent`,children:[`Error: `,_]}),(0,F.jsxs)(`div`,{className:`mt-6 flex items-start gap-3`,children:[(0,F.jsx)(`span`,{className:`mt-1 inline-block h-2 w-2 shrink-0 rounded-full ${re.dot}`}),(0,F.jsx)(`span`,{className:`text-label leading-relaxed text-secondary`,children:re.text}),ie]})]});return(0,F.jsxs)(He,{open:e,onClose:t,wide:n,children:[(0,F.jsx)(Be,{title:r.label,sub:`Paste this into your coding agent, in the project you want the loop for.`}),n?(0,F.jsxs)(`div`,{className:`mt-5 grid gap-8 md:grid-cols-[minmax(0,1fr)_400px]`,children:[i,(0,F.jsx)(`div`,{className:`min-w-0 md:border-l md:border-hairline md:pl-8`,children:(0,F.jsx)(ki,{template:r})})]}):(0,F.jsx)(`div`,{className:`mt-6`,children:i})]})}return(0,F.jsxs)(He,{open:e,onClose:t,children:[(0,F.jsx)(Be,{title:`New loop`}),(0,F.jsxs)(`div`,{className:`mt-6`,children:[(0,F.jsxs)(`div`,{className:`flex gap-3.5`,children:[(0,F.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,F.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center rounded-full border border-display text-micro font-medium leading-none text-display`,children:`1`}),(0,F.jsx)(`span`,{className:`mt-1 w-px flex-1 bg-hairline`})]}),(0,F.jsxs)(`div`,{className:`pb-6`,children:[(0,F.jsx)(`h3`,{className:`text-label font-semibold text-display`,children:`Do it once in your coding agent`}),(0,F.jsx)(`p`,{className:`mt-1.5 text-body leading-snug text-secondary`,children:`Run the task yourself first, to a real result you’re happy with.`})]})]}),(0,F.jsxs)(`div`,{className:`flex gap-3.5`,children:[(0,F.jsx)(`span`,{className:`flex size-5 shrink-0 items-center justify-center rounded-full border border-display text-micro font-medium leading-none text-display`,children:`2`}),ne(!1)]})]}),_&&(0,F.jsxs)(`div`,{className:`mt-3 text-body text-accent`,children:[`Error: `,_]}),(0,F.jsxs)(`div`,{className:`mt-6 flex items-start gap-3`,children:[(0,F.jsx)(`span`,{className:`mt-1 inline-block h-2 w-2 shrink-0 rounded-full ${re.dot}`}),(0,F.jsx)(`span`,{className:`text-label leading-relaxed text-secondary`,children:re.text}),ie]})]})}async function Ui(e){let[t,n,r]=await Promise.all([p({data:e}),We({data:e}),x({data:e})]);return{jobs:t,machines:n,teams:r}}function Wi({teamId:e,initial:t}){let[n,r]=(0,P.useState)(null),{jobs:i,machines:a,teams:o}=n??t,s=t.templates,c=a.filter(e=>e.online).length,l=Oe(),[u,d]=(0,P.useState)({open:!1,template:null}),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(!1),v=(0,P.useCallback)(async()=>{try{r(await Ui(e))}catch{}},[e]),y=(0,P.useRef)(!1);y.current=u.open||f||m||g;let b=i.some(e=>e.running);(0,P.useEffect)(()=>{let e=setInterval(()=>{y.current||v()},b?3e3:1e4);return()=>clearInterval(e)},[v,b]);let x=()=>void v(),S=i.filter(e=>e.enabled).length,C=()=>({onOpen:e=>void l({to:`/loops/$loopId`,params:{loopId:e}}),onPickRun:(e,t)=>void l({to:`/loops/$loopId/runs/$runId`,params:{loopId:e,runId:t.id}})});return(0,F.jsxs)(Gr,{delay:120,children:[(0,F.jsx)(`header`,{className:`glass glass-bar sticky top-0 z-50`,children:(0,F.jsxs)(`div`,{className:`mx-auto flex max-w-[1180px] items-center gap-3 px-8 py-2.5`,children:[(0,F.jsx)(_e,{size:30}),(0,F.jsx)(`span`,{className:`text-[18px] font-semibold tracking-[-0.015em] text-display`,children:`Pievo`}),(0,F.jsx)(Jr,{data:o}),(0,F.jsx)(`div`,{className:`flex-1`}),(0,F.jsx)(`a`,{href:Ae,target:`_blank`,rel:`noreferrer`,"aria-label":`GitHub repository`,title:`GitHub`,className:Ki,children:(0,F.jsx)(Se,{className:`size-[17px]`})}),o&&o.teams.length>0&&(0,F.jsx)(`button`,{onClick:()=>_(!0),className:Gi,children:`Teams`}),(0,F.jsx)(`button`,{onClick:()=>h(!0),className:Gi,children:`Notifications`}),(0,F.jsxs)(`button`,{onClick:()=>p(!0),className:`${Gi} gap-1.5`,children:[(0,F.jsx)(`span`,{className:`inline-block size-1.5 rounded-full ${c?`bg-rubik-green`:`bg-disabled`}`}),c,` `,c===1?`machine`:`machines`,` online`]}),(0,F.jsx)(`button`,{onClick:()=>d({open:!0,template:null}),className:`inline-flex shrink-0 cursor-pointer items-center rounded-full bg-display px-3.5 py-1.5 text-meta font-medium text-paper transition-opacity hover:opacity-85`,children:`New Loop`})]})}),(0,F.jsxs)(`main`,{className:`mx-auto max-w-[1180px] px-8 pb-24`,children:[(0,F.jsxs)(`section`,{className:`pb-2 pt-14 text-center`,children:[(0,F.jsx)(`h1`,{className:`font-pixel text-[clamp(28px,4.5vw,38px)] leading-[1.15] text-display`,children:`What should happen while you sleep?`}),s.length>0&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`mb-5 mt-2 text-body text-secondary`,children:`Start with a template…`}),(0,F.jsx)(qi,{templates:s,onPick:e=>d({open:!0,template:e})})]}),(0,F.jsx)(`div`,{className:`mt-7`,children:(0,F.jsxs)(`button`,{onClick:()=>d({open:!0,template:null}),className:`inline-flex cursor-pointer items-center gap-1.5 rounded-full bg-display px-6 py-2.5 text-body font-medium text-paper transition-opacity hover:opacity-85`,children:[s.length?`Start a blank loop`:`Start your first loop`,(0,F.jsx)(`span`,{"aria-hidden":!0,children:`→`})]})})]}),(0,F.jsxs)(`div`,{className:`mb-5 mt-12 flex items-baseline gap-2.5`,children:[(0,F.jsx)(`h2`,{className:`text-body font-semibold text-display`,children:`Active loops`}),(0,F.jsx)(`span`,{className:`text-label text-secondary`,children:i.length?`${S} scheduled · ${i.length} total`:``})]}),i.length?i.map(e=>(0,P.createElement)(Kr,{job:e,...C(),key:e.id})):(0,F.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,F.jsx)(`div`,{className:`text-[15px] text-secondary`,children:`No loops yet`}),!i.length&&(0,F.jsx)(`div`,{className:`mt-1.5 text-body text-disabled`,children:`Pick a template above, or start a blank loop.`})]}),(0,F.jsx)(Ee,{onStart:()=>d({open:!0,template:null})})]}),(0,F.jsx)(Hi,{open:u.open,template:u.template,teamId:e,onClose:()=>d({open:!1,template:null}),onCreated:x}),(0,F.jsx)(Ue,{open:f,onClose:()=>p(!1),teamId:e}),(0,F.jsx)(Qr,{open:m,onClose:()=>h(!1)}),(0,F.jsx)(pi,{open:g,onClose:()=>_(!1),activeTeamId:e})]})}var Gi=`inline-flex shrink-0 cursor-pointer items-center rounded-full px-3 py-1.5 text-meta font-medium text-secondary transition-colors hover:bg-raised hover:text-display`,Ki=`inline-flex shrink-0 cursor-pointer items-center rounded-full p-1.5 text-secondary transition-colors hover:bg-raised hover:text-display`;function qi({templates:e,onPick:t}){let n=e.length<=5?1:Math.ceil(e.length/4),r=[];for(let t=0,i=0;t<n;t++){let a=Math.ceil((e.length-i)/(n-t));r.push(e.slice(i,i+a)),i+=a}return(0,F.jsx)(`div`,{className:`pb-3 pt-1`,children:r.map((e,n)=>{let r=(e.length-1)/2;return(0,F.jsx)(`div`,{className:`flex flex-wrap items-start justify-center`,children:e.map((n,i)=>{let a=i-r;return(0,F.jsxs)(`button`,{type:`button`,onClick:()=>t(n),title:n.desc,className:`fan-card relative w-[196px] shrink-0 cursor-pointer rounded-card border border-hairline bg-surface p-3 text-left shadow-[0_12px_28px_-16px_rgba(0,0,0,0.25)] outline-none focus-visible:ring-2 focus-visible:ring-interactive`,style:{"--tilt":`${a*3.5}deg`,"--lift":`${Math.abs(a)*7}px`,marginInline:e.length>1?`-5px`:void 0},children:[n.thumb?(0,F.jsx)(`span`,{className:`block overflow-hidden rounded-control bg-raised [&_svg]:block [&_svg]:h-auto [&_svg]:w-full`,dangerouslySetInnerHTML:{__html:n.thumb}}):(0,F.jsx)(`span`,{className:`flex h-[76px] items-center justify-center rounded-control bg-raised text-secondary`,children:(0,F.jsx)(Ji,{})}),(0,F.jsx)(`span`,{className:`mt-2.5 block truncate text-center text-meta font-semibold text-primary`,children:n.label}),(0,F.jsx)(`span`,{className:`mt-0.5 line-clamp-3 min-h-[45px] text-center text-caption leading-snug text-secondary`,children:n.desc})]},n.name)})},n)})})}function Ji(){return(0,F.jsxs)(`svg`,{"aria-hidden":!0,width:`30`,height:`30`,viewBox:`0 0 30 30`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,F.jsx)(`path`,{d:`M25.5 15a10.5 10.5 0 1 1-3.1-7.4`}),(0,F.jsx)(`path`,{d:`M25.5 3.5v5.2h-5.2`})]})}var Yi=Me(`/`)({loader:async()=>{let e=await S();if(e.enabled){let{data:t}=await De.getSession();if(!t)return{mode:`signin`,auth:e};throw i({to:`/t/$teamId`,params:{teamId:await v()}})}return{mode:`dashboard`,auth:e,initial:{...await Ui(),templates:await y()}}},component:Te(()=>je(()=>import(`./routes-WVPuW976.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`),errorComponent:Te(()=>je(()=>import(`./routes-DsdcURfk.js`),__vite__mapDeps([7,1,3,8,6])),`errorComponent`)}),Xi=Me(`/t/$teamId`)({loader:async({params:e})=>{let t=e.teamId,n=await S();if(n.enabled){let{data:e}=await De.getSession();if(!e)return{mode:`signin`,auth:n,teamId:t};if(!await C({data:t}))throw Error(`This team does not exist, or you do not have access to it.`)}return{mode:`dashboard`,auth:n,teamId:t,initial:{...await Ui(t),templates:await y()}}},component:Te(()=>je(()=>import(`./t._teamId-BdVLnwih.js`),__vite__mapDeps([9,1,2,3,4,5,6])),`component`),errorComponent:Te(()=>je(()=>import(`./t._teamId-C9uEyAh_.js`),__vite__mapDeps([10,1,3,8,6])),`errorComponent`)}),Zi=Me(`/loops/$loopId`)({loader:async()=>{let e=await S();if(e.enabled){let{data:t}=await De.getSession();if(!t)return{auth:e}}return{auth:e}},component:Te(()=>je(()=>import(`./loops._loopId-6JlPOCsY.js`),__vite__mapDeps([11,1,2,3,4,12,13,6,14,15,5,8])),`component`)}),Qi=Me(`/invite/$token`)({loader:async({params:e})=>{let t=await S(),n=!1;if(t.enabled){let{data:e}=await De.getSession();n=!!e}return{auth:t,token:e.token,signedIn:n}},component:Te(()=>je(()=>import(`./invite._token-5zhVSA26.js`),__vite__mapDeps([16,1,2,3,4,5,6])),`component`),errorComponent:Te(()=>je(()=>import(`./invite._token-C3t4JfAY.js`),__vite__mapDeps([17,1,3,8,6])),`errorComponent`)}),$i=Me(`/loops/$loopId_/runs/$runId`)({loader:async()=>{let e=await S();if(e.enabled){let{data:t}=await De.getSession();if(!t)return{auth:e}}return{auth:e}},component:Te(()=>je(()=>import(`./loops._loopId_.runs._runId-wFUMHN9w.js`),__vite__mapDeps([18,1,2,3,4,5,6,8,14])),`component`)}),ea=Yi.update({id:`/`,path:`/`,getParentRoute:()=>Ur}),ta=Xi.update({id:`/t/$teamId`,path:`/t/$teamId`,getParentRoute:()=>Ur}),na=Zi.update({id:`/loops/$loopId`,path:`/loops/$loopId`,getParentRoute:()=>Ur}),ra={IndexRoute:ea,InviteTokenRoute:Qi.update({id:`/invite/$token`,path:`/invite/$token`,getParentRoute:()=>Ur}),LoopsLoopIdRoute:na,TTeamIdRoute:ta,LoopsLoopIdRunsRunIdRoute:$i.update({id:`/loops/$loopId_/runs/$runId`,path:`/loops/$loopId/runs/$runId`,getParentRoute:()=>Ur})},ia=Ur._addFileChildren(ra);function aa(){return jr({routeTree:ia,scrollRestoration:!0,defaultPreload:`intent`})}async function oa(){let e=await aa(),t=[];return window.__TSS_START_OPTIONS__={serializationAdapters:t},t.push(Hn),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.matchesId.get().length||await Gn(e),e}var sa=oa;async function z(){let e=await sa();return window.$_TSR?.h(),e}var ca;function la(){return ca||=z(),(0,F.jsx)(qn,{promise:ca,children:e=>(0,F.jsx)(Pr,{router:e})})}var ua=vt();(0,P.startTransition)(()=>{(0,ua.hydrateRoot)(document,(0,F.jsx)(P.StrictMode,{children:(0,F.jsx)(la,{})}))});export{Yi as a,qr as c,Xi as i,Qi as n,Wi as o,Zi as r,ui as s,$i as t};
|