@ogygie/studio 0.27.0 → 0.29.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.
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function s(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(o){if(o.ep)return;o.ep=!0;const c=s(o);fetch(o.href,c)}})();function XS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nf={exports:{}},ir={};var Rg;function JS(){if(Rg)return ir;Rg=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(r,o,c){var d=null;if(c!==void 0&&(d=""+c),o.key!==void 0&&(d=""+o.key),"key"in o){c={};for(var h in o)h!=="key"&&(c[h]=o[h])}else c=o;return o=c.ref,{$$typeof:t,type:r,key:d,ref:o!==void 0?o:null,props:c}}return ir.Fragment=i,ir.jsx=s,ir.jsxs=s,ir}var Cg;function IS(){return Cg||(Cg=1,nf.exports=JS()),nf.exports}var g=IS(),af={exports:{}},pe={};var Mg;function WS(){if(Mg)return pe;Mg=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function S(z){return z===null||typeof z!="object"?null:(z=x&&z[x]||z["@@iterator"],typeof z=="function"?z:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,j={};function A(z,q,X){this.props=z,this.context=q,this.refs=j,this.updater=X||w}A.prototype.isReactComponent={},A.prototype.setState=function(z,q){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,q,"setState")},A.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function k(){}k.prototype=A.prototype;function G(z,q,X){this.props=z,this.context=q,this.refs=j,this.updater=X||w}var Y=G.prototype=new k;Y.constructor=G,E(Y,A.prototype),Y.isPureReactComponent=!0;var P=Array.isArray;function Z(){}var R={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function V(z,q,X){var te=X.ref;return{$$typeof:t,type:z,key:q,ref:te!==void 0?te:null,props:X}}function ee(z,q){return V(z.type,q,z.props)}function re(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function ie(z){var q={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(X){return q[X]})}var he=/\/+/g;function ve(z,q){return typeof z=="object"&&z!==null&&z.key!=null?ie(""+z.key):q.toString(36)}function me(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(Z,Z):(z.status="pending",z.then(function(q){z.status==="pending"&&(z.status="fulfilled",z.value=q)},function(q){z.status==="pending"&&(z.status="rejected",z.reason=q)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function U(z,q,X,te,fe){var xe=typeof z;(xe==="undefined"||xe==="boolean")&&(z=null);var ze=!1;if(z===null)ze=!0;else switch(xe){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(z.$$typeof){case t:case i:ze=!0;break;case b:return ze=z._init,U(ze(z._payload),q,X,te,fe)}}if(ze)return fe=fe(z),ze=te===""?"."+ve(z,0):te,P(fe)?(X="",ze!=null&&(X=ze.replace(he,"$&/")+"/"),U(fe,q,X,"",function(cn){return cn})):fe!=null&&(re(fe)&&(fe=ee(fe,X+(fe.key==null||z&&z.key===fe.key?"":(""+fe.key).replace(he,"$&/")+"/")+ze)),q.push(fe)),1;ze=0;var Ze=te===""?".":te+":";if(P(z))for(var He=0;He<z.length;He++)te=z[He],xe=Ze+ve(te,He),ze+=U(te,q,X,xe,fe);else if(He=S(z),typeof He=="function")for(z=He.call(z),He=0;!(te=z.next()).done;)te=te.value,xe=Ze+ve(te,He++),ze+=U(te,q,X,xe,fe);else if(xe==="object"){if(typeof z.then=="function")return U(me(z),q,X,te,fe);throw q=String(z),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ze}function W(z,q,X){if(z==null)return z;var te=[],fe=0;return U(z,te,"","",function(xe){return q.call(X,xe,fe++)}),te}function B(z){if(z._status===-1){var q=z._result;q=q(),q.then(function(X){(z._status===0||z._status===-1)&&(z._status=1,z._result=X)},function(X){(z._status===0||z._status===-1)&&(z._status=2,z._result=X)}),z._status===-1&&(z._status=0,z._result=q)}if(z._status===1)return z._result.default;throw z._result}var oe=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},de={map:W,forEach:function(z,q,X){W(z,function(){q.apply(this,arguments)},X)},count:function(z){var q=0;return W(z,function(){q++}),q},toArray:function(z){return W(z,function(q){return q})||[]},only:function(z){if(!re(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return pe.Activity=v,pe.Children=de,pe.Component=A,pe.Fragment=s,pe.Profiler=o,pe.PureComponent=G,pe.StrictMode=r,pe.Suspense=m,pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,pe.__COMPILER_RUNTIME={__proto__:null,c:function(z){return R.H.useMemoCache(z)}},pe.cache=function(z){return function(){return z.apply(null,arguments)}},pe.cacheSignal=function(){return null},pe.cloneElement=function(z,q,X){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var te=E({},z.props),fe=z.key;if(q!=null)for(xe in q.key!==void 0&&(fe=""+q.key),q)!I.call(q,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&q.ref===void 0||(te[xe]=q[xe]);var xe=arguments.length-2;if(xe===1)te.children=X;else if(1<xe){for(var ze=Array(xe),Ze=0;Ze<xe;Ze++)ze[Ze]=arguments[Ze+2];te.children=ze}return V(z.type,fe,te)},pe.createContext=function(z){return z={$$typeof:d,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:c,_context:z},z},pe.createElement=function(z,q,X){var te,fe={},xe=null;if(q!=null)for(te in q.key!==void 0&&(xe=""+q.key),q)I.call(q,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(fe[te]=q[te]);var ze=arguments.length-2;if(ze===1)fe.children=X;else if(1<ze){for(var Ze=Array(ze),He=0;He<ze;He++)Ze[He]=arguments[He+2];fe.children=Ze}if(z&&z.defaultProps)for(te in ze=z.defaultProps,ze)fe[te]===void 0&&(fe[te]=ze[te]);return V(z,xe,fe)},pe.createRef=function(){return{current:null}},pe.forwardRef=function(z){return{$$typeof:h,render:z}},pe.isValidElement=re,pe.lazy=function(z){return{$$typeof:b,_payload:{_status:-1,_result:z},_init:B}},pe.memo=function(z,q){return{$$typeof:p,type:z,compare:q===void 0?null:q}},pe.startTransition=function(z){var q=R.T,X={};R.T=X;try{var te=z(),fe=R.S;fe!==null&&fe(X,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(Z,oe)}catch(xe){oe(xe)}finally{q!==null&&X.types!==null&&(q.types=X.types),R.T=q}},pe.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},pe.use=function(z){return R.H.use(z)},pe.useActionState=function(z,q,X){return R.H.useActionState(z,q,X)},pe.useCallback=function(z,q){return R.H.useCallback(z,q)},pe.useContext=function(z){return R.H.useContext(z)},pe.useDebugValue=function(){},pe.useDeferredValue=function(z,q){return R.H.useDeferredValue(z,q)},pe.useEffect=function(z,q){return R.H.useEffect(z,q)},pe.useEffectEvent=function(z){return R.H.useEffectEvent(z)},pe.useId=function(){return R.H.useId()},pe.useImperativeHandle=function(z,q,X){return R.H.useImperativeHandle(z,q,X)},pe.useInsertionEffect=function(z,q){return R.H.useInsertionEffect(z,q)},pe.useLayoutEffect=function(z,q){return R.H.useLayoutEffect(z,q)},pe.useMemo=function(z,q){return R.H.useMemo(z,q)},pe.useOptimistic=function(z,q){return R.H.useOptimistic(z,q)},pe.useReducer=function(z,q,X){return R.H.useReducer(z,q,X)},pe.useRef=function(z){return R.H.useRef(z)},pe.useState=function(z){return R.H.useState(z)},pe.useSyncExternalStore=function(z,q,X){return R.H.useSyncExternalStore(z,q,X)},pe.useTransition=function(){return R.H.useTransition()},pe.version="19.2.8",pe}var Dg;function _r(){return Dg||(Dg=1,af.exports=WS()),af.exports}var J=_r();const jo=XS(J);var sf={exports:{}},ar={},rf={exports:{}},lf={};var kg;function e_(){return kg||(kg=1,(function(t){function i(U,W){var B=U.length;U.push(W);e:for(;0<B;){var oe=B-1>>>1,de=U[oe];if(0<o(de,W))U[oe]=W,U[B]=de,B=oe;else break e}}function s(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var W=U[0],B=U.pop();if(B!==W){U[0]=B;e:for(var oe=0,de=U.length,z=de>>>1;oe<z;){var q=2*(oe+1)-1,X=U[q],te=q+1,fe=U[te];if(0>o(X,B))te<de&&0>o(fe,X)?(U[oe]=fe,U[te]=B,oe=te):(U[oe]=X,U[q]=B,oe=q);else if(te<de&&0>o(fe,B))U[oe]=fe,U[te]=B,oe=te;else break e}}return W}function o(U,W){var B=U.sortIndex-W.sortIndex;return B!==0?B:U.id-W.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();t.unstable_now=function(){return d.now()-h}}var m=[],p=[],b=1,v=null,x=3,S=!1,w=!1,E=!1,j=!1,A=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function Y(U){for(var W=s(p);W!==null;){if(W.callback===null)r(p);else if(W.startTime<=U)r(p),W.sortIndex=W.expirationTime,i(m,W);else break;W=s(p)}}function P(U){if(E=!1,Y(U),!w)if(s(m)!==null)w=!0,Z||(Z=!0,ie());else{var W=s(p);W!==null&&me(P,W.startTime-U)}}var Z=!1,R=-1,I=5,V=-1;function ee(){return j?!0:!(t.unstable_now()-V<I)}function re(){if(j=!1,Z){var U=t.unstable_now();V=U;var W=!0;try{e:{w=!1,E&&(E=!1,k(R),R=-1),S=!0;var B=x;try{t:{for(Y(U),v=s(m);v!==null&&!(v.expirationTime>U&&ee());){var oe=v.callback;if(typeof oe=="function"){v.callback=null,x=v.priorityLevel;var de=oe(v.expirationTime<=U);if(U=t.unstable_now(),typeof de=="function"){v.callback=de,Y(U),W=!0;break t}v===s(m)&&r(m),Y(U)}else r(m);v=s(m)}if(v!==null)W=!0;else{var z=s(p);z!==null&&me(P,z.startTime-U),W=!1}}break e}finally{v=null,x=B,S=!1}W=void 0}}finally{W?ie():Z=!1}}}var ie;if(typeof G=="function")ie=function(){G(re)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,ve=he.port2;he.port1.onmessage=re,ie=function(){ve.postMessage(null)}}else ie=function(){A(re,0)};function me(U,W){R=A(function(){U(t.unstable_now())},W)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(U){switch(x){case 1:case 2:case 3:var W=3;break;default:W=x}var B=x;x=W;try{return U()}finally{x=B}},t.unstable_requestPaint=function(){j=!0},t.unstable_runWithPriority=function(U,W){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var B=x;x=U;try{return W()}finally{x=B}},t.unstable_scheduleCallback=function(U,W,B){var oe=t.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?oe+B:oe):B=oe,U){case 1:var de=-1;break;case 2:de=250;break;case 5:de=1073741823;break;case 4:de=1e4;break;default:de=5e3}return de=B+de,U={id:b++,callback:W,priorityLevel:U,startTime:B,expirationTime:de,sortIndex:-1},B>oe?(U.sortIndex=B,i(p,U),s(m)===null&&U===s(p)&&(E?(k(R),R=-1):E=!0,me(P,B-oe))):(U.sortIndex=de,i(m,U),w||S||(w=!0,Z||(Z=!0,ie()))),U},t.unstable_shouldYield=ee,t.unstable_wrapCallback=function(U){var W=x;return function(){var B=x;x=W;try{return U.apply(this,arguments)}finally{x=B}}}})(lf)),lf}var Ug;function t_(){return Ug||(Ug=1,rf.exports=e_()),rf.exports}var of={exports:{}},pt={};var Lg;function n_(){if(Lg)return pt;Lg=1;var t=_r();function i(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(m,p,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:m,containerInfo:p,implementation:b}}var d=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,pt.createPortal=function(m,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return c(m,p,null,b)},pt.flushSync=function(m){var p=d.T,b=r.p;try{if(d.T=null,r.p=2,m)return m()}finally{d.T=p,r.p=b,r.d.f()}},pt.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(m,p))},pt.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},pt.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var b=p.as,v=h(b,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?r.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:S}):b==="script"&&r.d.X(m,{crossOrigin:v,integrity:x,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},pt.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=h(p.as,p.crossOrigin);r.d.M(m,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(m)},pt.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,v=h(b,p.crossOrigin);r.d.L(m,b,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},pt.preloadModule=function(m,p){if(typeof m=="string")if(p){var b=h(p.as,p.crossOrigin);r.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(m)},pt.requestFormReset=function(m){r.d.r(m)},pt.unstable_batchedUpdates=function(m,p){return m(p)},pt.useFormState=function(m,p,b){return d.H.useFormState(m,p,b)},pt.useFormStatus=function(){return d.H.useHostTransitionStatus()},pt.version="19.2.8",pt}var Zg;function bv(){if(Zg)return of.exports;Zg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),of.exports=n_(),of.exports}var qg;function i_(){if(qg)return ar;qg=1;var t=t_(),i=_r(),s=bv();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" 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 n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function d(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function m(e){if(c(e)!==e)throw Error(r(188))}function p(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,l=n;;){var u=a.return;if(u===null)break;var f=u.alternate;if(f===null){if(l=u.return,l!==null){a=l;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===a)return m(u),e;if(f===l)return m(u),n;f=f.sibling}throw Error(r(188))}if(a.return!==l.return)a=u,l=f;else{for(var y=!1,_=u.child;_;){if(_===a){y=!0,a=u,l=f;break}if(_===l){y=!0,l=u,a=f;break}_=_.sibling}if(!y){for(_=f.child;_;){if(_===a){y=!0,a=f,l=u;break}if(_===l){y=!0,l=f,a=u;break}_=_.sibling}if(!y)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:n}function b(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=b(e),n!==null)return n;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),G=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=re&&e[re]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function ve(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case A:return"Profiler";case j:return"StrictMode";case P:return"Suspense";case Z:return"SuspenseList";case V:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case G:return e.displayName||"Context";case k:return(e._context.displayName||"Context")+".Consumer";case Y:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R:return n=e.displayName||null,n!==null?n:ve(e.type)||"Memo";case I:n=e._payload,e=e._init;try{return ve(e(n))}catch{}}return null}var me=Array.isArray,U=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},oe=[],de=-1;function z(e){return{current:e}}function q(e){0>de||(e.current=oe[de],oe[de]=null,de--)}function X(e,n){de++,oe[de]=e.current,e.current=n}var te=z(null),fe=z(null),xe=z(null),ze=z(null);function Ze(e,n){switch(X(xe,n),X(fe,e),X(te,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?eg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=eg(n),e=tg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(te),X(te,e)}function He(){q(te),q(fe),q(xe)}function cn(e){e.memoizedState!==null&&X(ze,e);var n=te.current,a=tg(n,e.type);n!==a&&(X(fe,e),X(te,a))}function Ti(e){fe.current===e&&(q(te),q(fe)),ze.current===e&&(q(ze),Ws._currentValue=B)}var Zo,Ad;function Ni(e){if(Zo===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Zo=n&&n[1]||"",Ad=-1<a.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+Zo+e+Ad}var qo=!1;function Bo(e,n){if(!e||qo)return"";qo=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(L){var D=L}Reflect.construct(e,[],K)}else{try{K.call()}catch(L){D=L}e.call(K.prototype)}}else{try{throw Error()}catch(L){D=L}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(L){if(L&&D&&typeof L.stack=="string")return[L.stack,D.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),y=f[0],_=f[1];if(y&&_){var O=y.split(`
|
|
4
|
-
`),M=_.split(`
|
|
5
|
-
`);for(u=l=0;l<O.length&&!O[l].includes("DetermineComponentFrameRoot");)l++;for(;u<M.length&&!M[u].includes("DetermineComponentFrameRoot");)u++;if(l===O.length||u===M.length)for(l=O.length-1,u=M.length-1;1<=l&&0<=u&&O[l]!==M[u];)u--;for(;1<=l&&0<=u;l--,u--)if(O[l]!==M[u]){if(l!==1||u!==1)do if(l--,u--,0>u||O[l]!==M[u]){var H=`
|
|
6
|
-
`+O[l].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=l&&0<=u);break}}}finally{qo=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ni(a):""}function j0(e,n){switch(e.tag){case 26:case 27:case 5:return Ni(e.type);case 16:return Ni("Lazy");case 13:return e.child!==n&&n!==null?Ni("Suspense Fallback"):Ni("Suspense");case 19:return Ni("SuspenseList");case 0:case 15:return Bo(e.type,!1);case 11:return Bo(e.type.render,!1);case 1:return Bo(e.type,!0);case 31:return Ni("Activity");default:return""}}function Rd(e){try{var n="",a=null;do n+=j0(e,a),a=e,e=e.return;while(e);return n}catch(l){return`
|
|
7
|
-
Error generating stack: `+l.message+`
|
|
8
|
-
`+l.stack}}var Ho=Object.prototype.hasOwnProperty,$o=t.unstable_scheduleCallback,Qo=t.unstable_cancelCallback,T0=t.unstable_shouldYield,N0=t.unstable_requestPaint,Ct=t.unstable_now,A0=t.unstable_getCurrentPriorityLevel,Cd=t.unstable_ImmediatePriority,Md=t.unstable_UserBlockingPriority,Or=t.unstable_NormalPriority,R0=t.unstable_LowPriority,Dd=t.unstable_IdlePriority,C0=t.log,M0=t.unstable_setDisableYieldValue,fs=null,Mt=null;function Qn(e){if(typeof C0=="function"&&M0(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(fs,e)}catch{}}var Dt=Math.clz32?Math.clz32:U0,D0=Math.log,k0=Math.LN2;function U0(e){return e>>>=0,e===0?32:31-(D0(e)/k0|0)|0}var zr=256,jr=262144,Tr=4194304;function Ai(e){var n=e&42;if(n!==0)return n;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 Nr(e,n,a){var l=e.pendingLanes;if(l===0)return 0;var u=0,f=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var _=l&134217727;return _!==0?(l=_&~f,l!==0?u=Ai(l):(y&=_,y!==0?u=Ai(y):a||(a=_&~e,a!==0&&(u=Ai(a))))):(_=l&~f,_!==0?u=Ai(_):y!==0?u=Ai(y):a||(a=l&~e,a!==0&&(u=Ai(a)))),u===0?0:n!==0&&n!==u&&(n&f)===0&&(f=u&-u,a=n&-n,f>=a||f===32&&(a&4194048)!==0)?n:u}function ds(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function L0(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 kd(){var e=Tr;return Tr<<=1,(Tr&62914560)===0&&(Tr=4194304),e}function Go(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function hs(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Z0(e,n,a,l,u,f){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var _=e.entanglements,O=e.expirationTimes,M=e.hiddenUpdates;for(a=y&~a;0<a;){var H=31-Dt(a),K=1<<H;_[H]=0,O[H]=-1;var D=M[H];if(D!==null)for(M[H]=null,H=0;H<D.length;H++){var L=D[H];L!==null&&(L.lane&=-536870913)}a&=~K}l!==0&&Ud(e,l,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(y&~n))}function Ud(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var l=31-Dt(n);e.entangledLanes|=n,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Ld(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var l=31-Dt(a),u=1<<l;u&n|e[l]&n&&(e[l]|=n),a&=~u}}function Zd(e,n){var a=n&-n;return a=(a&42)!==0?1:Ko(a),(a&(e.suspendedLanes|n))!==0?0:a}function Ko(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 Yo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function qd(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:Eg(e.type))}function Bd(e,n){var a=W.p;try{return W.p=e,n()}finally{W.p=a}}var Gn=Math.random().toString(36).slice(2),ct="__reactFiber$"+Gn,_t="__reactProps$"+Gn,ra="__reactContainer$"+Gn,Fo="__reactEvents$"+Gn,q0="__reactListeners$"+Gn,B0="__reactHandles$"+Gn,Hd="__reactResources$"+Gn,ms="__reactMarker$"+Gn;function Vo(e){delete e[ct],delete e[_t],delete e[Fo],delete e[q0],delete e[B0]}function la(e){var n=e[ct];if(n)return n;for(var a=e.parentNode;a;){if(n=a[ra]||a[ct]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=og(e);e!==null;){if(a=e[ct])return a;e=og(e)}return n}e=a,a=e.parentNode}return null}function oa(e){if(e=e[ct]||e[ra]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function ps(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function ua(e){var n=e[Hd];return n||(n=e[Hd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function rt(e){e[ms]=!0}var $d=new Set,Qd={};function Ri(e,n){ca(e,n),ca(e+"Capture",n)}function ca(e,n){for(Qd[e]=n,e=0;e<n.length;e++)$d.add(n[e])}var H0=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]*$"),Gd={},Kd={};function $0(e){return Ho.call(Kd,e)?!0:Ho.call(Gd,e)?!1:H0.test(e)?Kd[e]=!0:(Gd[e]=!0,!1)}function Ar(e,n,a){if($0(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Rr(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function bn(e,n,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+l)}}function Gt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Q0(e,n,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var u=l.get,f=l.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(y){a=""+y,f.call(this,y)}}),Object.defineProperty(e,n,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Po(e){if(!e._valueTracker){var n=Yd(e)?"checked":"value";e._valueTracker=Q0(e,n,""+e[n])}}function Fd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),l="";return e&&(l=Yd(e)?e.checked?"true":"false":e.value),e=l,e!==a?(n.setValue(e),!0):!1}function Cr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var G0=/[\n"\\]/g;function Kt(e){return e.replace(G0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Xo(e,n,a,l,u,f,y,_){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),n!=null?y==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Gt(n)):e.value!==""+Gt(n)&&(e.value=""+Gt(n)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),n!=null?Jo(e,y,Gt(n)):a!=null?Jo(e,y,Gt(a)):l!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+Gt(_):e.removeAttribute("name")}function Vd(e,n,a,l,u,f,y,_){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),n!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||n!=null)){Po(e);return}a=a!=null?""+Gt(a):"",n=n!=null?""+Gt(n):a,_||n===e.value||(e.value=n),e.defaultValue=n}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=_?e.checked:!!l,e.defaultChecked=!!l,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Po(e)}function Jo(e,n,a){n==="number"&&Cr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function fa(e,n,a,l){if(e=e.options,n){n={};for(var u=0;u<a.length;u++)n["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=n.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Gt(a),n=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Pd(e,n,a){if(n!=null&&(n=""+Gt(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+Gt(a):""}function Xd(e,n,a,l){if(n==null){if(l!=null){if(a!=null)throw Error(r(92));if(me(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),n=a}a=Gt(n),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Po(e)}function da(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var K0=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 Jd(e,n,a){var l=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":l?e.setProperty(n,a):typeof a!="number"||a===0||K0.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function Id(e,n,a){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||n!=null&&n.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var u in n)l=n[u],n.hasOwnProperty(u)&&a[u]!==l&&Jd(e,u,l)}else for(var f in n)n.hasOwnProperty(f)&&Jd(e,f,n[f])}function Io(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 Y0=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"]]),F0=/^[\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 Mr(e){return F0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function xn(){}var Wo=null;function eu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ha=null,ma=null;function Wd(e){var n=oa(e);if(n&&(e=n.stateNode)){var a=e[_t]||null;e:switch(e=n.stateNode,n.type){case"input":if(Xo(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Kt(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var l=a[n];if(l!==e&&l.form===e.form){var u=l[_t]||null;if(!u)throw Error(r(90));Xo(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<a.length;n++)l=a[n],l.form===e.form&&Fd(l)}break e;case"textarea":Pd(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&fa(e,!!a.multiple,n,!1)}}}var tu=!1;function eh(e,n,a){if(tu)return e(n,a);tu=!0;try{var l=e(n);return l}finally{if(tu=!1,(ha!==null||ma!==null)&&(xl(),ha&&(n=ha,e=ma,ma=ha=null,Wd(n),e)))for(n=0;n<e.length;n++)Wd(e[n])}}function gs(e,n){var a=e.stateNode;if(a===null)return null;var l=a[_t]||null;if(l===null)return null;a=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,n,typeof a));return a}var Sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nu=!1;if(Sn)try{var ys={};Object.defineProperty(ys,"passive",{get:function(){nu=!0}}),window.addEventListener("test",ys,ys),window.removeEventListener("test",ys,ys)}catch{nu=!1}var Kn=null,iu=null,Dr=null;function th(){if(Dr)return Dr;var e,n=iu,a=n.length,l,u="value"in Kn?Kn.value:Kn.textContent,f=u.length;for(e=0;e<a&&n[e]===u[e];e++);var y=a-e;for(l=1;l<=y&&n[a-l]===u[f-l];l++);return Dr=u.slice(e,1<l?1-l:void 0)}function kr(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Ur(){return!0}function nh(){return!1}function wt(e){function n(a,l,u,f,y){this._reactName=a,this._targetInst=u,this.type=l,this.nativeEvent=f,this.target=y,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(a=e[_],this[_]=a?a(f):f[_]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Ur:nh,this.isPropagationStopped=nh,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ur)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ur)},persist:function(){},isPersistent:Ur}),n}var Ci={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lr=wt(Ci),vs=v({},Ci,{view:0,detail:0}),V0=wt(vs),au,su,bs,Zr=v({},vs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lu,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!==bs&&(bs&&e.type==="mousemove"?(au=e.screenX-bs.screenX,su=e.screenY-bs.screenY):su=au=0,bs=e),au)},movementY:function(e){return"movementY"in e?e.movementY:su}}),ih=wt(Zr),P0=v({},Zr,{dataTransfer:0}),X0=wt(P0),J0=v({},vs,{relatedTarget:0}),ru=wt(J0),I0=v({},Ci,{animationName:0,elapsedTime:0,pseudoElement:0}),W0=wt(I0),ex=v({},Ci,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tx=wt(ex),nx=v({},Ci,{data:0}),ah=wt(nx),ix={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ax={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"},sx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rx(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=sx[e])?!!n[e]:!1}function lu(){return rx}var lx=v({},vs,{key:function(e){if(e.key){var n=ix[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=kr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ax[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lu,charCode:function(e){return e.type==="keypress"?kr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?kr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ox=wt(lx),ux=v({},Zr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sh=wt(ux),cx=v({},vs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lu}),fx=wt(cx),dx=v({},Ci,{propertyName:0,elapsedTime:0,pseudoElement:0}),hx=wt(dx),mx=v({},Zr,{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}),px=wt(mx),gx=v({},Ci,{newState:0,oldState:0}),yx=wt(gx),vx=[9,13,27,32],ou=Sn&&"CompositionEvent"in window,xs=null;Sn&&"documentMode"in document&&(xs=document.documentMode);var bx=Sn&&"TextEvent"in window&&!xs,rh=Sn&&(!ou||xs&&8<xs&&11>=xs),lh=" ",oh=!1;function uh(e,n){switch(e){case"keyup":return vx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ch(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pa=!1;function xx(e,n){switch(e){case"compositionend":return ch(n);case"keypress":return n.which!==32?null:(oh=!0,lh);case"textInput":return e=n.data,e===lh&&oh?null:e;default:return null}}function Sx(e,n){if(pa)return e==="compositionend"||!ou&&uh(e,n)?(e=th(),Dr=iu=Kn=null,pa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return rh&&n.locale!=="ko"?null:n.data;default:return null}}var _x={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 fh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!_x[e.type]:n==="textarea"}function dh(e,n,a,l){ha?ma?ma.push(l):ma=[l]:ha=l,n=jl(n,"onChange"),0<n.length&&(a=new Lr("onChange","change",null,a,l),e.push({event:a,listeners:n}))}var Ss=null,_s=null;function wx(e){Vp(e,0)}function qr(e){var n=ps(e);if(Fd(n))return e}function hh(e,n){if(e==="change")return n}var mh=!1;if(Sn){var uu;if(Sn){var cu="oninput"in document;if(!cu){var ph=document.createElement("div");ph.setAttribute("oninput","return;"),cu=typeof ph.oninput=="function"}uu=cu}else uu=!1;mh=uu&&(!document.documentMode||9<document.documentMode)}function gh(){Ss&&(Ss.detachEvent("onpropertychange",yh),_s=Ss=null)}function yh(e){if(e.propertyName==="value"&&qr(_s)){var n=[];dh(n,_s,e,eu(e)),eh(wx,n)}}function Ex(e,n,a){e==="focusin"?(gh(),Ss=n,_s=a,Ss.attachEvent("onpropertychange",yh)):e==="focusout"&&gh()}function Ox(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qr(_s)}function zx(e,n){if(e==="click")return qr(n)}function jx(e,n){if(e==="input"||e==="change")return qr(n)}function Tx(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var kt=typeof Object.is=="function"?Object.is:Tx;function ws(e,n){if(kt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),l=Object.keys(n);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var u=a[l];if(!Ho.call(n,u)||!kt(e[u],n[u]))return!1}return!0}function vh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function bh(e,n){var a=vh(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=n&&l>=n)return{node:a,offset:n-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=vh(a)}}function xh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?xh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Sh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Cr(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Cr(e.document)}return n}function fu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var Nx=Sn&&"documentMode"in document&&11>=document.documentMode,ga=null,du=null,Es=null,hu=!1;function _h(e,n,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;hu||ga==null||ga!==Cr(l)||(l=ga,"selectionStart"in l&&fu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Es&&ws(Es,l)||(Es=l,l=jl(du,"onSelect"),0<l.length&&(n=new Lr("onSelect","select",null,n,a),e.push({event:n,listeners:l}),n.target=ga)))}function Mi(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var ya={animationend:Mi("Animation","AnimationEnd"),animationiteration:Mi("Animation","AnimationIteration"),animationstart:Mi("Animation","AnimationStart"),transitionrun:Mi("Transition","TransitionRun"),transitionstart:Mi("Transition","TransitionStart"),transitioncancel:Mi("Transition","TransitionCancel"),transitionend:Mi("Transition","TransitionEnd")},mu={},wh={};Sn&&(wh=document.createElement("div").style,"AnimationEvent"in window||(delete ya.animationend.animation,delete ya.animationiteration.animation,delete ya.animationstart.animation),"TransitionEvent"in window||delete ya.transitionend.transition);function Di(e){if(mu[e])return mu[e];if(!ya[e])return e;var n=ya[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in wh)return mu[e]=n[a];return e}var Eh=Di("animationend"),Oh=Di("animationiteration"),zh=Di("animationstart"),Ax=Di("transitionrun"),Rx=Di("transitionstart"),Cx=Di("transitioncancel"),jh=Di("transitionend"),Th=new Map,pu="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(" ");pu.push("scrollEnd");function tn(e,n){Th.set(e,n),Ri(n,[e])}var Br=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Yt=[],va=0,gu=0;function Hr(){for(var e=va,n=gu=va=0;n<e;){var a=Yt[n];Yt[n++]=null;var l=Yt[n];Yt[n++]=null;var u=Yt[n];Yt[n++]=null;var f=Yt[n];if(Yt[n++]=null,l!==null&&u!==null){var y=l.pending;y===null?u.next=u:(u.next=y.next,y.next=u),l.pending=u}f!==0&&Nh(a,u,f)}}function $r(e,n,a,l){Yt[va++]=e,Yt[va++]=n,Yt[va++]=a,Yt[va++]=l,gu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function yu(e,n,a,l){return $r(e,n,a,l),Qr(e)}function ki(e,n){return $r(e,null,null,n),Qr(e)}function Nh(e,n,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var u=!1,f=e.return;f!==null;)f.childLanes|=a,l=f.alternate,l!==null&&(l.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(u=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,u&&n!==null&&(u=31-Dt(a),e=f.hiddenUpdates,l=e[u],l===null?e[u]=[n]:l.push(n),n.lane=a|536870912),f):null}function Qr(e){if(50<Ys)throw Ys=0,zc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ba={};function Mx(e,n,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(e,n,a,l){return new Mx(e,n,a,l)}function vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _n(e,n){var a=e.alternate;return a===null?(a=Ut(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Ah(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Gr(e,n,a,l,u,f){var y=0;if(l=e,typeof e=="function")vu(e)&&(y=1);else if(typeof e=="string")y=ZS(e,a,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case V:return e=Ut(31,a,n,u),e.elementType=V,e.lanes=f,e;case E:return Ui(a.children,u,f,n);case j:y=8,u|=24;break;case A:return e=Ut(12,a,n,u|2),e.elementType=A,e.lanes=f,e;case P:return e=Ut(13,a,n,u),e.elementType=P,e.lanes=f,e;case Z:return e=Ut(19,a,n,u),e.elementType=Z,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:y=10;break e;case k:y=9;break e;case Y:y=11;break e;case R:y=14;break e;case I:y=16,l=null;break e}y=29,a=Error(r(130,e===null?"null":typeof e,"")),l=null}return n=Ut(y,a,n,u),n.elementType=e,n.type=l,n.lanes=f,n}function Ui(e,n,a,l){return e=Ut(7,e,l,n),e.lanes=a,e}function bu(e,n,a){return e=Ut(6,e,null,n),e.lanes=a,e}function Rh(e){var n=Ut(18,null,null,0);return n.stateNode=e,n}function xu(e,n,a){return n=Ut(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Ch=new WeakMap;function Ft(e,n){if(typeof e=="object"&&e!==null){var a=Ch.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Rd(n)},Ch.set(e,n),n)}return{value:e,source:n,stack:Rd(n)}}var xa=[],Sa=0,Kr=null,Os=0,Vt=[],Pt=0,Yn=null,fn=1,dn="";function wn(e,n){xa[Sa++]=Os,xa[Sa++]=Kr,Kr=e,Os=n}function Mh(e,n,a){Vt[Pt++]=fn,Vt[Pt++]=dn,Vt[Pt++]=Yn,Yn=e;var l=fn;e=dn;var u=32-Dt(l)-1;l&=~(1<<u),a+=1;var f=32-Dt(n)+u;if(30<f){var y=u-u%5;f=(l&(1<<y)-1).toString(32),l>>=y,u-=y,fn=1<<32-Dt(n)+u|a<<u|l,dn=f+e}else fn=1<<f|a<<u|l,dn=e}function Su(e){e.return!==null&&(wn(e,1),Mh(e,1,0))}function _u(e){for(;e===Kr;)Kr=xa[--Sa],xa[Sa]=null,Os=xa[--Sa],xa[Sa]=null;for(;e===Yn;)Yn=Vt[--Pt],Vt[Pt]=null,dn=Vt[--Pt],Vt[Pt]=null,fn=Vt[--Pt],Vt[Pt]=null}function Dh(e,n){Vt[Pt++]=fn,Vt[Pt++]=dn,Vt[Pt++]=Yn,fn=n.id,dn=n.overflow,Yn=e}var ft=null,qe=null,Oe=!1,Fn=null,Xt=!1,wu=Error(r(519));function Vn(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zs(Ft(n,e)),wu}function kh(e){var n=e.stateNode,a=e.type,l=e.memoizedProps;switch(n[ct]=e,n[_t]=l,a){case"dialog":_e("cancel",n),_e("close",n);break;case"iframe":case"object":case"embed":_e("load",n);break;case"video":case"audio":for(a=0;a<Vs.length;a++)_e(Vs[a],n);break;case"source":_e("error",n);break;case"img":case"image":case"link":_e("error",n),_e("load",n);break;case"details":_e("toggle",n);break;case"input":_e("invalid",n),Vd(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":_e("invalid",n);break;case"textarea":_e("invalid",n),Xd(n,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||l.suppressHydrationWarning===!0||Ip(n.textContent,a)?(l.popover!=null&&(_e("beforetoggle",n),_e("toggle",n)),l.onScroll!=null&&_e("scroll",n),l.onScrollEnd!=null&&_e("scrollend",n),l.onClick!=null&&(n.onclick=xn),n=!0):n=!1,n||Vn(e,!0)}function Uh(e){for(ft=e.return;ft;)switch(ft.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:ft=ft.return}}function _a(e){if(e!==ft)return!1;if(!Oe)return Uh(e),Oe=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Hc(e.type,e.memoizedProps)),a=!a),a&&qe&&Vn(e),Uh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));qe=lg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));qe=lg(e)}else n===27?(n=qe,oi(e.type)?(e=Yc,Yc=null,qe=e):qe=n):qe=ft?It(e.stateNode.nextSibling):null;return!0}function Li(){qe=ft=null,Oe=!1}function Eu(){var e=Fn;return e!==null&&(jt===null?jt=e:jt.push.apply(jt,e),Fn=null),e}function zs(e){Fn===null?Fn=[e]:Fn.push(e)}var Ou=z(null),Zi=null,En=null;function Pn(e,n,a){X(Ou,n._currentValue),n._currentValue=a}function On(e){e._currentValue=Ou.current,q(Ou)}function zu(e,n,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),e===a)break;e=e.return}}function ju(e,n,a,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var f=u.dependencies;if(f!==null){var y=u.child;f=f.firstContext;e:for(;f!==null;){var _=f;f=u;for(var O=0;O<n.length;O++)if(_.context===n[O]){f.lanes|=a,_=f.alternate,_!==null&&(_.lanes|=a),zu(f.return,a,e),l||(y=null);break e}f=_.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(r(341));y.lanes|=a,f=y.alternate,f!==null&&(f.lanes|=a),zu(y,a,e),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===e){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function wa(e,n,a,l){e=null;for(var u=n,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var _=u.type;kt(u.pendingProps.value,y.value)||(e!==null?e.push(_):e=[_])}}else if(u===ze.current){if(y=u.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Ws):e=[Ws])}u=u.return}e!==null&&ju(n,e,a,l),n.flags|=262144}function Yr(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){Zi=e,En=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function dt(e){return Lh(Zi,e)}function Fr(e,n){return Zi===null&&qi(e),Lh(e,n)}function Lh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},En===null){if(e===null)throw Error(r(308));En=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else En=En.next=n;return a}var Dx=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},kx=t.unstable_scheduleCallback,Ux=t.unstable_NormalPriority,Je={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Tu(){return{controller:new Dx,data:new Map,refCount:0}}function js(e){e.refCount--,e.refCount===0&&kx(Ux,function(){e.controller.abort()})}var Ts=null,Nu=0,Ea=0,Oa=null;function Lx(e,n){if(Ts===null){var a=Ts=[];Nu=0,Ea=Cc(),Oa={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Nu++,n.then(Zh,Zh),n}function Zh(){if(--Nu===0&&Ts!==null){Oa!==null&&(Oa.status="fulfilled");var e=Ts;Ts=null,Ea=0,Oa=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Zx(e,n){var a=[],l={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){l.status="fulfilled",l.value=n;for(var u=0;u<a.length;u++)(0,a[u])(n)},function(u){for(l.status="rejected",l.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),l}var qh=U.S;U.S=function(e,n){_p=Ct(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Lx(e,n),qh!==null&&qh(e,n)};var Bi=z(null);function Au(){var e=Bi.current;return e!==null?e:Le.pooledCache}function Vr(e,n){n===null?X(Bi,Bi.current):X(Bi,n.pool)}function Bh(){var e=Au();return e===null?null:{parent:Je._currentValue,pool:e}}var za=Error(r(460)),Ru=Error(r(474)),Pr=Error(r(542)),Xr={then:function(){}};function Hh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $h(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(xn,xn),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Gh(e),e;default:if(typeof n.status=="string")n.then(xn,xn);else{if(e=Le,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(l){if(n.status==="pending"){var u=n;u.status="fulfilled",u.value=l}},function(l){if(n.status==="pending"){var u=n;u.status="rejected",u.reason=l}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Gh(e),e}throw $i=n,za}}function Hi(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?($i=a,za):a}}var $i=null;function Qh(){if($i===null)throw Error(r(459));var e=$i;return $i=null,e}function Gh(e){if(e===za||e===Pr)throw Error(r(483))}var ja=null,Ns=0;function Jr(e){var n=Ns;return Ns+=1,ja===null&&(ja=[]),$h(ja,e,n)}function As(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Ir(e,n){throw n.$$typeof===x?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Kh(e){function n(N,T){if(e){var C=N.deletions;C===null?(N.deletions=[T],N.flags|=16):C.push(T)}}function a(N,T){if(!e)return null;for(;T!==null;)n(N,T),T=T.sibling;return null}function l(N){for(var T=new Map;N!==null;)N.key!==null?T.set(N.key,N):T.set(N.index,N),N=N.sibling;return T}function u(N,T){return N=_n(N,T),N.index=0,N.sibling=null,N}function f(N,T,C){return N.index=C,e?(C=N.alternate,C!==null?(C=C.index,C<T?(N.flags|=67108866,T):C):(N.flags|=67108866,T)):(N.flags|=1048576,T)}function y(N){return e&&N.alternate===null&&(N.flags|=67108866),N}function _(N,T,C,$){return T===null||T.tag!==6?(T=bu(C,N.mode,$),T.return=N,T):(T=u(T,C),T.return=N,T)}function O(N,T,C,$){var ue=C.type;return ue===E?H(N,T,C.props.children,$,C.key):T!==null&&(T.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===I&&Hi(ue)===T.type)?(T=u(T,C.props),As(T,C),T.return=N,T):(T=Gr(C.type,C.key,C.props,null,N.mode,$),As(T,C),T.return=N,T)}function M(N,T,C,$){return T===null||T.tag!==4||T.stateNode.containerInfo!==C.containerInfo||T.stateNode.implementation!==C.implementation?(T=xu(C,N.mode,$),T.return=N,T):(T=u(T,C.children||[]),T.return=N,T)}function H(N,T,C,$,ue){return T===null||T.tag!==7?(T=Ui(C,N.mode,$,ue),T.return=N,T):(T=u(T,C),T.return=N,T)}function K(N,T,C){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=bu(""+T,N.mode,C),T.return=N,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case S:return C=Gr(T.type,T.key,T.props,null,N.mode,C),As(C,T),C.return=N,C;case w:return T=xu(T,N.mode,C),T.return=N,T;case I:return T=Hi(T),K(N,T,C)}if(me(T)||ie(T))return T=Ui(T,N.mode,C,null),T.return=N,T;if(typeof T.then=="function")return K(N,Jr(T),C);if(T.$$typeof===G)return K(N,Fr(N,T),C);Ir(N,T)}return null}function D(N,T,C,$){var ue=T!==null?T.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return ue!==null?null:_(N,T,""+C,$);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case S:return C.key===ue?O(N,T,C,$):null;case w:return C.key===ue?M(N,T,C,$):null;case I:return C=Hi(C),D(N,T,C,$)}if(me(C)||ie(C))return ue!==null?null:H(N,T,C,$,null);if(typeof C.then=="function")return D(N,T,Jr(C),$);if(C.$$typeof===G)return D(N,T,Fr(N,C),$);Ir(N,C)}return null}function L(N,T,C,$,ue){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return N=N.get(C)||null,_(T,N,""+$,ue);if(typeof $=="object"&&$!==null){switch($.$$typeof){case S:return N=N.get($.key===null?C:$.key)||null,O(T,N,$,ue);case w:return N=N.get($.key===null?C:$.key)||null,M(T,N,$,ue);case I:return $=Hi($),L(N,T,C,$,ue)}if(me($)||ie($))return N=N.get(C)||null,H(T,N,$,ue,null);if(typeof $.then=="function")return L(N,T,C,Jr($),ue);if($.$$typeof===G)return L(N,T,C,Fr(T,$),ue);Ir(T,$)}return null}function ne(N,T,C,$){for(var ue=null,je=null,ae=T,ye=T=0,Ee=null;ae!==null&&ye<C.length;ye++){ae.index>ye?(Ee=ae,ae=null):Ee=ae.sibling;var Te=D(N,ae,C[ye],$);if(Te===null){ae===null&&(ae=Ee);break}e&&ae&&Te.alternate===null&&n(N,ae),T=f(Te,T,ye),je===null?ue=Te:je.sibling=Te,je=Te,ae=Ee}if(ye===C.length)return a(N,ae),Oe&&wn(N,ye),ue;if(ae===null){for(;ye<C.length;ye++)ae=K(N,C[ye],$),ae!==null&&(T=f(ae,T,ye),je===null?ue=ae:je.sibling=ae,je=ae);return Oe&&wn(N,ye),ue}for(ae=l(ae);ye<C.length;ye++)Ee=L(ae,N,ye,C[ye],$),Ee!==null&&(e&&Ee.alternate!==null&&ae.delete(Ee.key===null?ye:Ee.key),T=f(Ee,T,ye),je===null?ue=Ee:je.sibling=Ee,je=Ee);return e&&ae.forEach(function(hi){return n(N,hi)}),Oe&&wn(N,ye),ue}function ce(N,T,C,$){if(C==null)throw Error(r(151));for(var ue=null,je=null,ae=T,ye=T=0,Ee=null,Te=C.next();ae!==null&&!Te.done;ye++,Te=C.next()){ae.index>ye?(Ee=ae,ae=null):Ee=ae.sibling;var hi=D(N,ae,Te.value,$);if(hi===null){ae===null&&(ae=Ee);break}e&&ae&&hi.alternate===null&&n(N,ae),T=f(hi,T,ye),je===null?ue=hi:je.sibling=hi,je=hi,ae=Ee}if(Te.done)return a(N,ae),Oe&&wn(N,ye),ue;if(ae===null){for(;!Te.done;ye++,Te=C.next())Te=K(N,Te.value,$),Te!==null&&(T=f(Te,T,ye),je===null?ue=Te:je.sibling=Te,je=Te);return Oe&&wn(N,ye),ue}for(ae=l(ae);!Te.done;ye++,Te=C.next())Te=L(ae,N,ye,Te.value,$),Te!==null&&(e&&Te.alternate!==null&&ae.delete(Te.key===null?ye:Te.key),T=f(Te,T,ye),je===null?ue=Te:je.sibling=Te,je=Te);return e&&ae.forEach(function(PS){return n(N,PS)}),Oe&&wn(N,ye),ue}function Ue(N,T,C,$){if(typeof C=="object"&&C!==null&&C.type===E&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case S:e:{for(var ue=C.key;T!==null;){if(T.key===ue){if(ue=C.type,ue===E){if(T.tag===7){a(N,T.sibling),$=u(T,C.props.children),$.return=N,N=$;break e}}else if(T.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===I&&Hi(ue)===T.type){a(N,T.sibling),$=u(T,C.props),As($,C),$.return=N,N=$;break e}a(N,T);break}else n(N,T);T=T.sibling}C.type===E?($=Ui(C.props.children,N.mode,$,C.key),$.return=N,N=$):($=Gr(C.type,C.key,C.props,null,N.mode,$),As($,C),$.return=N,N=$)}return y(N);case w:e:{for(ue=C.key;T!==null;){if(T.key===ue)if(T.tag===4&&T.stateNode.containerInfo===C.containerInfo&&T.stateNode.implementation===C.implementation){a(N,T.sibling),$=u(T,C.children||[]),$.return=N,N=$;break e}else{a(N,T);break}else n(N,T);T=T.sibling}$=xu(C,N.mode,$),$.return=N,N=$}return y(N);case I:return C=Hi(C),Ue(N,T,C,$)}if(me(C))return ne(N,T,C,$);if(ie(C)){if(ue=ie(C),typeof ue!="function")throw Error(r(150));return C=ue.call(C),ce(N,T,C,$)}if(typeof C.then=="function")return Ue(N,T,Jr(C),$);if(C.$$typeof===G)return Ue(N,T,Fr(N,C),$);Ir(N,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,T!==null&&T.tag===6?(a(N,T.sibling),$=u(T,C),$.return=N,N=$):(a(N,T),$=bu(C,N.mode,$),$.return=N,N=$),y(N)):a(N,T)}return function(N,T,C,$){try{Ns=0;var ue=Ue(N,T,C,$);return ja=null,ue}catch(ae){if(ae===za||ae===Pr)throw ae;var je=Ut(29,ae,null,N.mode);return je.lanes=$,je.return=N,je}}}var Qi=Kh(!0),Yh=Kh(!1),Xn=!1;function Cu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Mu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Jn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function In(e,n,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ne&2)!==0){var u=l.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),l.pending=n,n=Qr(e),Nh(e,null,a),n}return $r(e,l,n,a),Qr(e)}function Rs(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var l=n.lanes;l&=e.pendingLanes,a|=l,n.lanes=a,Ld(e,a)}}function Du(e,n){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var u=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?u=f=y:f=f.next=y,a=a.next}while(a!==null);f===null?u=f=n:f=f.next=n}else u=f=n;a={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var ku=!1;function Cs(){if(ku){var e=Oa;if(e!==null)throw e}}function Ms(e,n,a,l){ku=!1;var u=e.updateQueue;Xn=!1;var f=u.firstBaseUpdate,y=u.lastBaseUpdate,_=u.shared.pending;if(_!==null){u.shared.pending=null;var O=_,M=O.next;O.next=null,y===null?f=M:y.next=M,y=O;var H=e.alternate;H!==null&&(H=H.updateQueue,_=H.lastBaseUpdate,_!==y&&(_===null?H.firstBaseUpdate=M:_.next=M,H.lastBaseUpdate=O))}if(f!==null){var K=u.baseState;y=0,H=M=O=null,_=f;do{var D=_.lane&-536870913,L=D!==_.lane;if(L?(we&D)===D:(l&D)===D){D!==0&&D===Ea&&(ku=!0),H!==null&&(H=H.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var ne=e,ce=_;D=n;var Ue=a;switch(ce.tag){case 1:if(ne=ce.payload,typeof ne=="function"){K=ne.call(Ue,K,D);break e}K=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=ce.payload,D=typeof ne=="function"?ne.call(Ue,K,D):ne,D==null)break e;K=v({},K,D);break e;case 2:Xn=!0}}D=_.callback,D!==null&&(e.flags|=64,L&&(e.flags|=8192),L=u.callbacks,L===null?u.callbacks=[D]:L.push(D))}else L={lane:D,tag:_.tag,payload:_.payload,callback:_.callback,next:null},H===null?(M=H=L,O=K):H=H.next=L,y|=D;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;L=_,_=L.next,L.next=null,u.lastBaseUpdate=L,u.shared.pending=null}}while(!0);H===null&&(O=K),u.baseState=O,u.firstBaseUpdate=M,u.lastBaseUpdate=H,f===null&&(u.shared.lanes=0),ii|=y,e.lanes=y,e.memoizedState=K}}function Fh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Vh(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Fh(a[e],n)}var Ta=z(null),Wr=z(0);function Ph(e,n){e=Dn,X(Wr,e),X(Ta,n),Dn=e|n.baseLanes}function Uu(){X(Wr,Dn),X(Ta,Ta.current)}function Lu(){Dn=Wr.current,q(Ta),q(Wr)}var Lt=z(null),Jt=null;function Wn(e){var n=e.alternate;X(Pe,Pe.current&1),X(Lt,e),Jt===null&&(n===null||Ta.current!==null||n.memoizedState!==null)&&(Jt=e)}function Zu(e){X(Pe,Pe.current),X(Lt,e),Jt===null&&(Jt=e)}function Xh(e){e.tag===22?(X(Pe,Pe.current),X(Lt,e),Jt===null&&(Jt=e)):ei()}function ei(){X(Pe,Pe.current),X(Lt,Lt.current)}function Zt(e){q(Lt),Jt===e&&(Jt=null),q(Pe)}var Pe=z(0);function el(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Gc(a)||Kc(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var zn=0,ge=null,De=null,Ie=null,tl=!1,Na=!1,Gi=!1,nl=0,Ds=0,Aa=null,qx=0;function Fe(){throw Error(r(321))}function qu(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!kt(e[a],n[a]))return!1;return!0}function Bu(e,n,a,l,u,f){return zn=f,ge=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=e===null||e.memoizedState===null?Mm:tc,Gi=!1,f=a(l,u),Gi=!1,Na&&(f=Ih(n,a,l,u)),Jh(e),f}function Jh(e){U.H=Ls;var n=De!==null&&De.next!==null;if(zn=0,Ie=De=ge=null,tl=!1,Ds=0,Aa=null,n)throw Error(r(300));e===null||We||(e=e.dependencies,e!==null&&Yr(e)&&(We=!0))}function Ih(e,n,a,l){ge=e;var u=0;do{if(Na&&(Aa=null),Ds=0,Na=!1,25<=u)throw Error(r(301));if(u+=1,Ie=De=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}U.H=Dm,f=n(a,l)}while(Na);return f}function Bx(){var e=U.H,n=e.useState()[0];return n=typeof n.then=="function"?ks(n):n,e=e.useState()[0],(De!==null?De.memoizedState:null)!==e&&(ge.flags|=1024),n}function Hu(){var e=nl!==0;return nl=0,e}function $u(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Qu(e){if(tl){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}tl=!1}zn=0,Ie=De=ge=null,Na=!1,Ds=nl=0,Aa=null}function gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?ge.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function Xe(){if(De===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var n=Ie===null?ge.memoizedState:Ie.next;if(n!==null)Ie=n,De=e;else{if(e===null)throw ge.alternate===null?Error(r(467)):Error(r(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},Ie===null?ge.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function il(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ks(e){var n=Ds;return Ds+=1,Aa===null&&(Aa=[]),e=$h(Aa,e,n),n=ge,(Ie===null?n.memoizedState:Ie.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?Mm:tc),e}function al(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ks(e);if(e.$$typeof===G)return dt(e)}throw Error(r(438,String(e)))}function Gu(e){var n=null,a=ge.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var l=ge.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=il(),ge.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),l=0;l<e;l++)a[l]=ee;return n.index++,a}function jn(e,n){return typeof n=="function"?n(e):n}function sl(e){var n=Xe();return Ku(n,De,e)}function Ku(e,n,a){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=a;var u=e.baseQueue,f=l.pending;if(f!==null){if(u!==null){var y=u.next;u.next=f.next,f.next=y}n.baseQueue=u=f,l.pending=null}if(f=e.baseState,u===null)e.memoizedState=f;else{n=u.next;var _=y=null,O=null,M=n,H=!1;do{var K=M.lane&-536870913;if(K!==M.lane?(we&K)===K:(zn&K)===K){var D=M.revertLane;if(D===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),K===Ea&&(H=!0);else if((zn&D)===D){M=M.next,D===Ea&&(H=!0);continue}else K={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},O===null?(_=O=K,y=f):O=O.next=K,ge.lanes|=D,ii|=D;K=M.action,Gi&&a(f,K),f=M.hasEagerState?M.eagerState:a(f,K)}else D={lane:K,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},O===null?(_=O=D,y=f):O=O.next=D,ge.lanes|=K,ii|=K;M=M.next}while(M!==null&&M!==n);if(O===null?y=f:O.next=_,!kt(f,e.memoizedState)&&(We=!0,H&&(a=Oa,a!==null)))throw a;e.memoizedState=f,e.baseState=y,e.baseQueue=O,l.lastRenderedState=f}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Yu(e){var n=Xe(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var l=a.dispatch,u=a.pending,f=n.memoizedState;if(u!==null){a.pending=null;var y=u=u.next;do f=e(f,y.action),y=y.next;while(y!==u);kt(f,n.memoizedState)||(We=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),a.lastRenderedState=f}return[f,l]}function Wh(e,n,a){var l=ge,u=Xe(),f=Oe;if(f){if(a===void 0)throw Error(r(407));a=a()}else a=n();var y=!kt((De||u).memoizedState,a);if(y&&(u.memoizedState=a,We=!0),u=u.queue,Pu(nm.bind(null,l,u,e),[e]),u.getSnapshot!==n||y||Ie!==null&&Ie.memoizedState.tag&1){if(l.flags|=2048,Ra(9,{destroy:void 0},tm.bind(null,l,u,a,n),null),Le===null)throw Error(r(349));f||(zn&127)!==0||em(l,n,a)}return a}function em(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=ge.updateQueue,n===null?(n=il(),ge.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function tm(e,n,a,l){n.value=a,n.getSnapshot=l,im(n)&&am(e)}function nm(e,n,a){return a(function(){im(n)&&am(e)})}function im(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!kt(e,a)}catch{return!0}}function am(e){var n=ki(e,2);n!==null&&Tt(n,e,2)}function Fu(e){var n=gt();if(typeof e=="function"){var a=e;if(e=a(),Gi){Qn(!0);try{a()}finally{Qn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:e},n}function sm(e,n,a,l){return e.baseState=a,Ku(e,De,typeof l=="function"?l:jn)}function Hx(e,n,a,l,u){if(ol(e))throw Error(r(485));if(e=n.action,e!==null){var f={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){f.listeners.push(y)}};U.T!==null?a(!0):f.isTransition=!1,l(f),a=n.pending,a===null?(f.next=n.pending=f,rm(n,f)):(f.next=a.next,n.pending=a.next=f)}}function rm(e,n){var a=n.action,l=n.payload,u=e.state;if(n.isTransition){var f=U.T,y={};U.T=y;try{var _=a(u,l),O=U.S;O!==null&&O(y,_),lm(e,n,_)}catch(M){Vu(e,n,M)}finally{f!==null&&y.types!==null&&(f.types=y.types),U.T=f}}else try{f=a(u,l),lm(e,n,f)}catch(M){Vu(e,n,M)}}function lm(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){om(e,n,l)},function(l){return Vu(e,n,l)}):om(e,n,a)}function om(e,n,a){n.status="fulfilled",n.value=a,um(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,rm(e,a)))}function Vu(e,n,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=a,um(n),n=n.next;while(n!==l)}e.action=null}function um(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function cm(e,n){return n}function fm(e,n){if(Oe){var a=Le.formState;if(a!==null){e:{var l=ge;if(Oe){if(qe){t:{for(var u=qe,f=Xt;u.nodeType!==8;){if(!f){u=null;break t}if(u=It(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){qe=It(u.nextSibling),l=u.data==="F!";break e}}Vn(l)}l=!1}l&&(n=a[0])}}return a=gt(),a.memoizedState=a.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cm,lastRenderedState:n},a.queue=l,a=Am.bind(null,ge,l),l.dispatch=a,l=Fu(!1),f=ec.bind(null,ge,!1,l.queue),l=gt(),u={state:n,dispatch:null,action:e,pending:null},l.queue=u,a=Hx.bind(null,ge,u,f,a),u.dispatch=a,l.memoizedState=e,[n,a,!1]}function dm(e){var n=Xe();return hm(n,De,e)}function hm(e,n,a){if(n=Ku(e,n,cm)[0],e=sl(jn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=ks(n)}catch(y){throw y===za?Pr:y}else l=n;n=Xe();var u=n.queue,f=u.dispatch;return a!==n.memoizedState&&(ge.flags|=2048,Ra(9,{destroy:void 0},$x.bind(null,u,a),null)),[l,f,e]}function $x(e,n){e.action=n}function mm(e){var n=Xe(),a=De;if(a!==null)return hm(n,a,e);Xe(),n=n.memoizedState,a=Xe();var l=a.queue.dispatch;return a.memoizedState=e,[n,l,!1]}function Ra(e,n,a,l){return e={tag:e,create:a,deps:l,inst:n,next:null},n=ge.updateQueue,n===null&&(n=il(),ge.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,n.lastEffect=e),e}function pm(){return Xe().memoizedState}function rl(e,n,a,l){var u=gt();ge.flags|=e,u.memoizedState=Ra(1|n,{destroy:void 0},a,l===void 0?null:l)}function ll(e,n,a,l){var u=Xe();l=l===void 0?null:l;var f=u.memoizedState.inst;De!==null&&l!==null&&qu(l,De.memoizedState.deps)?u.memoizedState=Ra(n,f,a,l):(ge.flags|=e,u.memoizedState=Ra(1|n,f,a,l))}function gm(e,n){rl(8390656,8,e,n)}function Pu(e,n){ll(2048,8,e,n)}function Qx(e){ge.flags|=4;var n=ge.updateQueue;if(n===null)n=il(),ge.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function ym(e){var n=Xe().memoizedState;return Qx({ref:n,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function vm(e,n){return ll(4,2,e,n)}function bm(e,n){return ll(4,4,e,n)}function xm(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Sm(e,n,a){a=a!=null?a.concat([e]):null,ll(4,4,xm.bind(null,n,e),a)}function Xu(){}function _m(e,n){var a=Xe();n=n===void 0?null:n;var l=a.memoizedState;return n!==null&&qu(n,l[1])?l[0]:(a.memoizedState=[e,n],e)}function wm(e,n){var a=Xe();n=n===void 0?null:n;var l=a.memoizedState;if(n!==null&&qu(n,l[1]))return l[0];if(l=e(),Gi){Qn(!0);try{e()}finally{Qn(!1)}}return a.memoizedState=[l,n],l}function Ju(e,n,a){return a===void 0||(zn&1073741824)!==0&&(we&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=Ep(),ge.lanes|=e,ii|=e,a)}function Em(e,n,a,l){return kt(a,n)?a:Ta.current!==null?(e=Ju(e,a,l),kt(e,n)||(We=!0),e):(zn&42)===0||(zn&1073741824)!==0&&(we&261930)===0?(We=!0,e.memoizedState=a):(e=Ep(),ge.lanes|=e,ii|=e,n)}function Om(e,n,a,l,u){var f=W.p;W.p=f!==0&&8>f?f:8;var y=U.T,_={};U.T=_,ec(e,!1,n,a);try{var O=u(),M=U.S;if(M!==null&&M(_,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var H=Zx(O,l);Us(e,n,H,Ht(e))}else Us(e,n,l,Ht(e))}catch(K){Us(e,n,{then:function(){},status:"rejected",reason:K},Ht())}finally{W.p=f,y!==null&&_.types!==null&&(y.types=_.types),U.T=y}}function Gx(){}function Iu(e,n,a,l){if(e.tag!==5)throw Error(r(476));var u=zm(e).queue;Om(e,u,n,B,a===null?Gx:function(){return jm(e),a(l)})}function zm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:B},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function jm(e){var n=zm(e);n.next===null&&(n=e.alternate.memoizedState),Us(e,n.next.queue,{},Ht())}function Wu(){return dt(Ws)}function Tm(){return Xe().memoizedState}function Nm(){return Xe().memoizedState}function Kx(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=Ht();e=Jn(a);var l=In(n,e,a);l!==null&&(Tt(l,n,a),Rs(l,n,a)),n={cache:Tu()},e.payload=n;return}n=n.return}}function Yx(e,n,a){var l=Ht();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ol(e)?Rm(n,a):(a=yu(e,n,a,l),a!==null&&(Tt(a,e,l),Cm(a,n,l)))}function Am(e,n,a){var l=Ht();Us(e,n,a,l)}function Us(e,n,a,l){var u={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ol(e))Rm(n,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var y=n.lastRenderedState,_=f(y,a);if(u.hasEagerState=!0,u.eagerState=_,kt(_,y))return $r(e,n,u,0),Le===null&&Hr(),!1}catch{}if(a=yu(e,n,u,l),a!==null)return Tt(a,e,l),Cm(a,n,l),!0}return!1}function ec(e,n,a,l){if(l={lane:2,revertLane:Cc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ol(e)){if(n)throw Error(r(479))}else n=yu(e,a,l,2),n!==null&&Tt(n,e,2)}function ol(e){var n=e.alternate;return e===ge||n!==null&&n===ge}function Rm(e,n){Na=tl=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function Cm(e,n,a){if((a&4194048)!==0){var l=n.lanes;l&=e.pendingLanes,a|=l,n.lanes=a,Ld(e,a)}}var Ls={readContext:dt,use:al,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};Ls.useEffectEvent=Fe;var Mm={readContext:dt,use:al,useCallback:function(e,n){return gt().memoizedState=[e,n===void 0?null:n],e},useContext:dt,useEffect:gm,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,rl(4194308,4,xm.bind(null,n,e),a)},useLayoutEffect:function(e,n){return rl(4194308,4,e,n)},useInsertionEffect:function(e,n){rl(4,2,e,n)},useMemo:function(e,n){var a=gt();n=n===void 0?null:n;var l=e();if(Gi){Qn(!0);try{e()}finally{Qn(!1)}}return a.memoizedState=[l,n],l},useReducer:function(e,n,a){var l=gt();if(a!==void 0){var u=a(n);if(Gi){Qn(!0);try{a(n)}finally{Qn(!1)}}}else u=n;return l.memoizedState=l.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},l.queue=e,e=e.dispatch=Yx.bind(null,ge,e),[l.memoizedState,e]},useRef:function(e){var n=gt();return e={current:e},n.memoizedState=e},useState:function(e){e=Fu(e);var n=e.queue,a=Am.bind(null,ge,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Xu,useDeferredValue:function(e,n){var a=gt();return Ju(a,e,n)},useTransition:function(){var e=Fu(!1);return e=Om.bind(null,ge,e.queue,!0,!1),gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var l=ge,u=gt();if(Oe){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),Le===null)throw Error(r(349));(we&127)!==0||em(l,n,a)}u.memoizedState=a;var f={value:a,getSnapshot:n};return u.queue=f,gm(nm.bind(null,l,f,e),[e]),l.flags|=2048,Ra(9,{destroy:void 0},tm.bind(null,l,f,a,n),null),a},useId:function(){var e=gt(),n=Le.identifierPrefix;if(Oe){var a=dn,l=fn;a=(l&~(1<<32-Dt(l)-1)).toString(32)+a,n="_"+n+"R_"+a,a=nl++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=qx++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Wu,useFormState:fm,useActionState:fm,useOptimistic:function(e){var n=gt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=ec.bind(null,ge,!0,a),a.dispatch=n,[e,n]},useMemoCache:Gu,useCacheRefresh:function(){return gt().memoizedState=Kx.bind(null,ge)},useEffectEvent:function(e){var n=gt(),a={impl:e};return n.memoizedState=a,function(){if((Ne&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},tc={readContext:dt,use:al,useCallback:_m,useContext:dt,useEffect:Pu,useImperativeHandle:Sm,useInsertionEffect:vm,useLayoutEffect:bm,useMemo:wm,useReducer:sl,useRef:pm,useState:function(){return sl(jn)},useDebugValue:Xu,useDeferredValue:function(e,n){var a=Xe();return Em(a,De.memoizedState,e,n)},useTransition:function(){var e=sl(jn)[0],n=Xe().memoizedState;return[typeof e=="boolean"?e:ks(e),n]},useSyncExternalStore:Wh,useId:Tm,useHostTransitionStatus:Wu,useFormState:dm,useActionState:dm,useOptimistic:function(e,n){var a=Xe();return sm(a,De,e,n)},useMemoCache:Gu,useCacheRefresh:Nm};tc.useEffectEvent=ym;var Dm={readContext:dt,use:al,useCallback:_m,useContext:dt,useEffect:Pu,useImperativeHandle:Sm,useInsertionEffect:vm,useLayoutEffect:bm,useMemo:wm,useReducer:Yu,useRef:pm,useState:function(){return Yu(jn)},useDebugValue:Xu,useDeferredValue:function(e,n){var a=Xe();return De===null?Ju(a,e,n):Em(a,De.memoizedState,e,n)},useTransition:function(){var e=Yu(jn)[0],n=Xe().memoizedState;return[typeof e=="boolean"?e:ks(e),n]},useSyncExternalStore:Wh,useId:Tm,useHostTransitionStatus:Wu,useFormState:mm,useActionState:mm,useOptimistic:function(e,n){var a=Xe();return De!==null?sm(a,De,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Gu,useCacheRefresh:Nm};Dm.useEffectEvent=ym;function nc(e,n,a,l){n=e.memoizedState,a=a(l,n),a=a==null?n:v({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ic={enqueueSetState:function(e,n,a){e=e._reactInternals;var l=Ht(),u=Jn(l);u.payload=n,a!=null&&(u.callback=a),n=In(e,u,l),n!==null&&(Tt(n,e,l),Rs(n,e,l))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var l=Ht(),u=Jn(l);u.tag=1,u.payload=n,a!=null&&(u.callback=a),n=In(e,u,l),n!==null&&(Tt(n,e,l),Rs(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=Ht(),l=Jn(a);l.tag=2,n!=null&&(l.callback=n),n=In(e,l,a),n!==null&&(Tt(n,e,a),Rs(n,e,a))}};function km(e,n,a,l,u,f,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,y):n.prototype&&n.prototype.isPureReactComponent?!ws(a,l)||!ws(u,f):!0}function Um(e,n,a,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,l),n.state!==e&&ic.enqueueReplaceState(n,n.state,null)}function Ki(e,n){var a=n;if("ref"in n){a={};for(var l in n)l!=="ref"&&(a[l]=n[l])}if(e=e.defaultProps){a===n&&(a=v({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function Lm(e){Br(e)}function Zm(e){console.error(e)}function qm(e){Br(e)}function ul(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(l){setTimeout(function(){throw l})}}function Bm(e,n,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function ac(e,n,a){return a=Jn(a),a.tag=3,a.payload={element:null},a.callback=function(){ul(e,n)},a}function Hm(e){return e=Jn(e),e.tag=3,e}function $m(e,n,a,l){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var f=l.value;e.payload=function(){return u(f)},e.callback=function(){Bm(n,a,l)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Bm(n,a,l),typeof u!="function"&&(ai===null?ai=new Set([this]):ai.add(this));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})})}function Fx(e,n,a,l,u){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=a.alternate,n!==null&&wa(n,a,u,!0),a=Lt.current,a!==null){switch(a.tag){case 31:case 13:return Jt===null?Sl():a.alternate===null&&Ve===0&&(Ve=3),a.flags&=-257,a.flags|=65536,a.lanes=u,l===Xr?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([l]):n.add(l),Nc(e,l,u)),!1;case 22:return a.flags|=65536,l===Xr?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([l]):a.add(l)),Nc(e,l,u)),!1}throw Error(r(435,a.tag))}return Nc(e,l,u),Sl(),!1}if(Oe)return n=Lt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,l!==wu&&(e=Error(r(422),{cause:l}),zs(Ft(e,a)))):(l!==wu&&(n=Error(r(423),{cause:l}),zs(Ft(n,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Ft(l,a),u=ac(e.stateNode,l,u),Du(e,u),Ve!==4&&(Ve=2)),!1;var f=Error(r(520),{cause:l});if(f=Ft(f,a),Ks===null?Ks=[f]:Ks.push(f),Ve!==4&&(Ve=2),n===null)return!0;l=Ft(l,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=ac(a.stateNode,l,e),Du(a,e),!1;case 1:if(n=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(ai===null||!ai.has(f))))return a.flags|=65536,u&=-u,a.lanes|=u,u=Hm(u),$m(u,e,a,l),Du(a,u),!1}a=a.return}while(a!==null);return!1}var sc=Error(r(461)),We=!1;function ht(e,n,a,l){n.child=e===null?Yh(n,null,a,l):Qi(n,e.child,a,l)}function Qm(e,n,a,l,u){a=a.render;var f=n.ref;if("ref"in l){var y={};for(var _ in l)_!=="ref"&&(y[_]=l[_])}else y=l;return qi(n),l=Bu(e,n,a,y,f,u),_=Hu(),e!==null&&!We?($u(e,n,u),Tn(e,n,u)):(Oe&&_&&Su(n),n.flags|=1,ht(e,n,l,u),n.child)}function Gm(e,n,a,l,u){if(e===null){var f=a.type;return typeof f=="function"&&!vu(f)&&f.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=f,Km(e,n,f,l,u)):(e=Gr(a.type,null,l,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,!hc(e,u)){var y=f.memoizedProps;if(a=a.compare,a=a!==null?a:ws,a(y,l)&&e.ref===n.ref)return Tn(e,n,u)}return n.flags|=1,e=_n(f,l),e.ref=n.ref,e.return=n,n.child=e}function Km(e,n,a,l,u){if(e!==null){var f=e.memoizedProps;if(ws(f,l)&&e.ref===n.ref)if(We=!1,n.pendingProps=l=f,hc(e,u))(e.flags&131072)!==0&&(We=!0);else return n.lanes=e.lanes,Tn(e,n,u)}return rc(e,n,a,l,u)}function Ym(e,n,a,l){var u=l.children,f=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((n.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(l=n.child=e.child,u=0;l!==null;)u=u|l.lanes|l.childLanes,l=l.sibling;l=u&~f}else l=0,n.child=null;return Fm(e,n,f,a,l)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vr(n,f!==null?f.cachePool:null),f!==null?Ph(n,f):Uu(),Xh(n);else return l=n.lanes=536870912,Fm(e,n,f!==null?f.baseLanes|a:a,a,l)}else f!==null?(Vr(n,f.cachePool),Ph(n,f),ei(),n.memoizedState=null):(e!==null&&Vr(n,null),Uu(),ei());return ht(e,n,u,a),n.child}function Zs(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Fm(e,n,a,l,u){var f=Au();return f=f===null?null:{parent:Je._currentValue,pool:f},n.memoizedState={baseLanes:a,cachePool:f},e!==null&&Vr(n,null),Uu(),Xh(n),e!==null&&wa(e,n,l,!0),n.childLanes=u,null}function cl(e,n){return n=dl({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Vm(e,n,a){return Qi(n,e.child,null,a),e=cl(n,n.pendingProps),e.flags|=2,Zt(n),n.memoizedState=null,e}function Vx(e,n,a){var l=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Oe){if(l.mode==="hidden")return e=cl(n,l),n.lanes=536870912,Zs(null,e);if(Zu(n),(e=qe)?(e=rg(e,Xt),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Yn!==null?{id:fn,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},a=Rh(e),a.return=n,n.child=a,ft=n,qe=null)):e=null,e===null)throw Vn(n);return n.lanes=536870912,null}return cl(n,l)}var f=e.memoizedState;if(f!==null){var y=f.dehydrated;if(Zu(n),u)if(n.flags&256)n.flags&=-257,n=Vm(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(We||wa(e,n,a,!1),u=(a&e.childLanes)!==0,We||u){if(l=Le,l!==null&&(y=Zd(l,a),y!==0&&y!==f.retryLane))throw f.retryLane=y,ki(e,y),Tt(l,e,y),sc;Sl(),n=Vm(e,n,a)}else e=f.treeContext,qe=It(y.nextSibling),ft=n,Oe=!0,Fn=null,Xt=!1,e!==null&&Dh(n,e),n=cl(n,l),n.flags|=4096;return n}return e=_n(e.child,{mode:l.mode,children:l.children}),e.ref=n.ref,n.child=e,e.return=n,e}function fl(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function rc(e,n,a,l,u){return qi(n),a=Bu(e,n,a,l,void 0,u),l=Hu(),e!==null&&!We?($u(e,n,u),Tn(e,n,u)):(Oe&&l&&Su(n),n.flags|=1,ht(e,n,a,u),n.child)}function Pm(e,n,a,l,u,f){return qi(n),n.updateQueue=null,a=Ih(n,l,a,u),Jh(e),l=Hu(),e!==null&&!We?($u(e,n,f),Tn(e,n,f)):(Oe&&l&&Su(n),n.flags|=1,ht(e,n,a,f),n.child)}function Xm(e,n,a,l,u){if(qi(n),n.stateNode===null){var f=ba,y=a.contextType;typeof y=="object"&&y!==null&&(f=dt(y)),f=new a(l,f),n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=ic,n.stateNode=f,f._reactInternals=n,f=n.stateNode,f.props=l,f.state=n.memoizedState,f.refs={},Cu(n),y=a.contextType,f.context=typeof y=="object"&&y!==null?dt(y):ba,f.state=n.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(nc(n,a,y,l),f.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(y=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),y!==f.state&&ic.enqueueReplaceState(f,f.state,null),Ms(n,l,f,u),Cs(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(e===null){f=n.stateNode;var _=n.memoizedProps,O=Ki(a,_);f.props=O;var M=f.context,H=a.contextType;y=ba,typeof H=="object"&&H!==null&&(y=dt(H));var K=a.getDerivedStateFromProps;H=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,H||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||M!==y)&&Um(n,f,l,y),Xn=!1;var D=n.memoizedState;f.state=D,Ms(n,l,f,u),Cs(),M=n.memoizedState,_||D!==M||Xn?(typeof K=="function"&&(nc(n,a,K,l),M=n.memoizedState),(O=Xn||km(n,a,O,l,D,M,y))?(H||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(n.flags|=4194308)):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=l,n.memoizedState=M),f.props=l,f.state=M,f.context=y,l=O):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{f=n.stateNode,Mu(e,n),y=n.memoizedProps,H=Ki(a,y),f.props=H,K=n.pendingProps,D=f.context,M=a.contextType,O=ba,typeof M=="object"&&M!==null&&(O=dt(M)),_=a.getDerivedStateFromProps,(M=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==K||D!==O)&&Um(n,f,l,O),Xn=!1,D=n.memoizedState,f.state=D,Ms(n,l,f,u),Cs();var L=n.memoizedState;y!==K||D!==L||Xn||e!==null&&e.dependencies!==null&&Yr(e.dependencies)?(typeof _=="function"&&(nc(n,a,_,l),L=n.memoizedState),(H=Xn||km(n,a,H,l,D,L,O)||e!==null&&e.dependencies!==null&&Yr(e.dependencies))?(M||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,L,O),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,L,O)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=L),f.props=l,f.state=L,f.context=O,l=H):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&D===e.memoizedState||(n.flags|=1024),l=!1)}return f=l,fl(e,n),l=(n.flags&128)!==0,f||l?(f=n.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:f.render(),n.flags|=1,e!==null&&l?(n.child=Qi(n,e.child,null,u),n.child=Qi(n,null,a,u)):ht(e,n,a,u),n.memoizedState=f.state,e=n.child):e=Tn(e,n,u),e}function Jm(e,n,a,l){return Li(),n.flags|=256,ht(e,n,a,l),n.child}var lc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function oc(e){return{baseLanes:e,cachePool:Bh()}}function uc(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=Bt),e}function Im(e,n,a){var l=n.pendingProps,u=!1,f=(n.flags&128)!==0,y;if((y=f)||(y=e!==null&&e.memoizedState===null?!1:(Pe.current&2)!==0),y&&(u=!0,n.flags&=-129),y=(n.flags&32)!==0,n.flags&=-33,e===null){if(Oe){if(u?Wn(n):ei(),(e=qe)?(e=rg(e,Xt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Yn!==null?{id:fn,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},a=Rh(e),a.return=n,n.child=a,ft=n,qe=null)):e=null,e===null)throw Vn(n);return Kc(e)?n.lanes=32:n.lanes=536870912,null}var _=l.children;return l=l.fallback,u?(ei(),u=n.mode,_=dl({mode:"hidden",children:_},u),l=Ui(l,u,a,null),_.return=n,l.return=n,_.sibling=l,n.child=_,l=n.child,l.memoizedState=oc(a),l.childLanes=uc(e,y,a),n.memoizedState=lc,Zs(null,l)):(Wn(n),cc(n,_))}var O=e.memoizedState;if(O!==null&&(_=O.dehydrated,_!==null)){if(f)n.flags&256?(Wn(n),n.flags&=-257,n=fc(e,n,a)):n.memoizedState!==null?(ei(),n.child=e.child,n.flags|=128,n=null):(ei(),_=l.fallback,u=n.mode,l=dl({mode:"visible",children:l.children},u),_=Ui(_,u,a,null),_.flags|=2,l.return=n,_.return=n,l.sibling=_,n.child=l,Qi(n,e.child,null,a),l=n.child,l.memoizedState=oc(a),l.childLanes=uc(e,y,a),n.memoizedState=lc,n=Zs(null,l));else if(Wn(n),Kc(_)){if(y=_.nextSibling&&_.nextSibling.dataset,y)var M=y.dgst;y=M,l=Error(r(419)),l.stack="",l.digest=y,zs({value:l,source:null,stack:null}),n=fc(e,n,a)}else if(We||wa(e,n,a,!1),y=(a&e.childLanes)!==0,We||y){if(y=Le,y!==null&&(l=Zd(y,a),l!==0&&l!==O.retryLane))throw O.retryLane=l,ki(e,l),Tt(y,e,l),sc;Gc(_)||Sl(),n=fc(e,n,a)}else Gc(_)?(n.flags|=192,n.child=e.child,n=null):(e=O.treeContext,qe=It(_.nextSibling),ft=n,Oe=!0,Fn=null,Xt=!1,e!==null&&Dh(n,e),n=cc(n,l.children),n.flags|=4096);return n}return u?(ei(),_=l.fallback,u=n.mode,O=e.child,M=O.sibling,l=_n(O,{mode:"hidden",children:l.children}),l.subtreeFlags=O.subtreeFlags&65011712,M!==null?_=_n(M,_):(_=Ui(_,u,a,null),_.flags|=2),_.return=n,l.return=n,l.sibling=_,n.child=l,Zs(null,l),l=n.child,_=e.child.memoizedState,_===null?_=oc(a):(u=_.cachePool,u!==null?(O=Je._currentValue,u=u.parent!==O?{parent:O,pool:O}:u):u=Bh(),_={baseLanes:_.baseLanes|a,cachePool:u}),l.memoizedState=_,l.childLanes=uc(e,y,a),n.memoizedState=lc,Zs(e.child,l)):(Wn(n),a=e.child,e=a.sibling,a=_n(a,{mode:"visible",children:l.children}),a.return=n,a.sibling=null,e!==null&&(y=n.deletions,y===null?(n.deletions=[e],n.flags|=16):y.push(e)),n.child=a,n.memoizedState=null,a)}function cc(e,n){return n=dl({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function dl(e,n){return e=Ut(22,e,null,n),e.lanes=0,e}function fc(e,n,a){return Qi(n,e.child,null,a),e=cc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Wm(e,n,a){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),zu(e.return,n,a)}function dc(e,n,a,l,u,f){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:u,treeForkCount:f}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=l,y.tail=a,y.tailMode=u,y.treeForkCount=f)}function ep(e,n,a){var l=n.pendingProps,u=l.revealOrder,f=l.tail;l=l.children;var y=Pe.current,_=(y&2)!==0;if(_?(y=y&1|2,n.flags|=128):y&=1,X(Pe,y),ht(e,n,l,a),l=Oe?Os:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wm(e,a,n);else if(e.tag===19)Wm(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(a=n.child,u=null;a!==null;)e=a.alternate,e!==null&&el(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=n.child,n.child=null):(u=a.sibling,a.sibling=null),dc(n,!1,u,a,f,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&el(e)===null){n.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}dc(n,!0,a,null,f,l);break;case"together":dc(n,!1,null,null,void 0,l);break;default:n.memoizedState=null}return n.child}function Tn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),ii|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(wa(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,a=_n(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=_n(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function hc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Yr(e)))}function Px(e,n,a){switch(n.tag){case 3:Ze(n,n.stateNode.containerInfo),Pn(n,Je,e.memoizedState.cache),Li();break;case 27:case 5:cn(n);break;case 4:Ze(n,n.stateNode.containerInfo);break;case 10:Pn(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Zu(n),null;break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(Wn(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Im(e,n,a):(Wn(n),e=Tn(e,n,a),e!==null?e.sibling:null);Wn(n);break;case 19:var u=(e.flags&128)!==0;if(l=(a&n.childLanes)!==0,l||(wa(e,n,a,!1),l=(a&n.childLanes)!==0),u){if(l)return ep(e,n,a);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),X(Pe,Pe.current),l)break;return null;case 22:return n.lanes=0,Ym(e,n,a,n.pendingProps);case 24:Pn(n,Je,e.memoizedState.cache)}return Tn(e,n,a)}function tp(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)We=!0;else{if(!hc(e,a)&&(n.flags&128)===0)return We=!1,Px(e,n,a);We=(e.flags&131072)!==0}else We=!1,Oe&&(n.flags&1048576)!==0&&Mh(n,Os,n.index);switch(n.lanes=0,n.tag){case 16:e:{var l=n.pendingProps;if(e=Hi(n.elementType),n.type=e,typeof e=="function")vu(e)?(l=Ki(e,l),n.tag=1,n=Xm(null,n,e,l,a)):(n.tag=0,n=rc(null,n,e,l,a));else{if(e!=null){var u=e.$$typeof;if(u===Y){n.tag=11,n=Qm(null,n,e,l,a);break e}else if(u===R){n.tag=14,n=Gm(null,n,e,l,a);break e}}throw n=ve(e)||e,Error(r(306,n,""))}}return n;case 0:return rc(e,n,n.type,n.pendingProps,a);case 1:return l=n.type,u=Ki(l,n.pendingProps),Xm(e,n,l,u,a);case 3:e:{if(Ze(n,n.stateNode.containerInfo),e===null)throw Error(r(387));l=n.pendingProps;var f=n.memoizedState;u=f.element,Mu(e,n),Ms(n,l,null,a);var y=n.memoizedState;if(l=y.cache,Pn(n,Je,l),l!==f.cache&&ju(n,[Je],a,!0),Cs(),l=y.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:y.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=Jm(e,n,l,a);break e}else if(l!==u){u=Ft(Error(r(424)),n),zs(u),n=Jm(e,n,l,a);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,qe=It(e.firstChild),ft=n,Oe=!0,Fn=null,Xt=!0,a=Yh(n,null,l,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Li(),l===u){n=Tn(e,n,a);break e}ht(e,n,l,a)}n=n.child}return n;case 26:return fl(e,n),e===null?(a=dg(n.type,null,n.pendingProps,null))?n.memoizedState=a:Oe||(a=n.type,e=n.pendingProps,l=Tl(xe.current).createElement(a),l[ct]=n,l[_t]=e,mt(l,a,e),rt(l),n.stateNode=l):n.memoizedState=dg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return cn(n),e===null&&Oe&&(l=n.stateNode=ug(n.type,n.pendingProps,xe.current),ft=n,Xt=!0,u=qe,oi(n.type)?(Yc=u,qe=It(l.firstChild)):qe=u),ht(e,n,n.pendingProps.children,a),fl(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Oe&&((u=l=qe)&&(l=OS(l,n.type,n.pendingProps,Xt),l!==null?(n.stateNode=l,ft=n,qe=It(l.firstChild),Xt=!1,u=!0):u=!1),u||Vn(n)),cn(n),u=n.type,f=n.pendingProps,y=e!==null?e.memoizedProps:null,l=f.children,Hc(u,f)?l=null:y!==null&&Hc(u,y)&&(n.flags|=32),n.memoizedState!==null&&(u=Bu(e,n,Bx,null,null,a),Ws._currentValue=u),fl(e,n),ht(e,n,l,a),n.child;case 6:return e===null&&Oe&&((e=a=qe)&&(a=zS(a,n.pendingProps,Xt),a!==null?(n.stateNode=a,ft=n,qe=null,e=!0):e=!1),e||Vn(n)),null;case 13:return Im(e,n,a);case 4:return Ze(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Qi(n,null,l,a):ht(e,n,l,a),n.child;case 11:return Qm(e,n,n.type,n.pendingProps,a);case 7:return ht(e,n,n.pendingProps,a),n.child;case 8:return ht(e,n,n.pendingProps.children,a),n.child;case 12:return ht(e,n,n.pendingProps.children,a),n.child;case 10:return l=n.pendingProps,Pn(n,n.type,l.value),ht(e,n,l.children,a),n.child;case 9:return u=n.type._context,l=n.pendingProps.children,qi(n),u=dt(u),l=l(u),n.flags|=1,ht(e,n,l,a),n.child;case 14:return Gm(e,n,n.type,n.pendingProps,a);case 15:return Km(e,n,n.type,n.pendingProps,a);case 19:return ep(e,n,a);case 31:return Vx(e,n,a);case 22:return Ym(e,n,a,n.pendingProps);case 24:return qi(n),l=dt(Je),e===null?(u=Au(),u===null&&(u=Le,f=Tu(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=a),u=f),n.memoizedState={parent:l,cache:u},Cu(n),Pn(n,Je,u)):((e.lanes&a)!==0&&(Mu(e,n),Ms(n,null,null,a),Cs()),u=e.memoizedState,f=n.memoizedState,u.parent!==l?(u={parent:l,cache:l},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),Pn(n,Je,l)):(l=f.cache,Pn(n,Je,l),l!==u.cache&&ju(n,[Je],a,!0))),ht(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function Nn(e){e.flags|=4}function mc(e,n,a,l,u){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Tp())e.flags|=8192;else throw $i=Xr,Ru}else e.flags&=-16777217}function np(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!yg(n))if(Tp())e.flags|=8192;else throw $i=Xr,Ru}function hl(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?kd():536870912,e.lanes|=n,ka|=n)}function qs(e,n){if(!Oe)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Be(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(n)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,l|=u.subtreeFlags&65011712,l|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=a,n}function Xx(e,n,a){var l=n.pendingProps;switch(_u(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(n),null;case 1:return Be(n),null;case 3:return a=n.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),On(Je),He(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(_a(n)?Nn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Eu())),Be(n),null;case 26:var u=n.type,f=n.memoizedState;return e===null?(Nn(n),f!==null?(Be(n),np(n,f)):(Be(n),mc(n,u,null,l,a))):f?f!==e.memoizedState?(Nn(n),Be(n),np(n,f)):(Be(n),n.flags&=-16777217):(e=e.memoizedProps,e!==l&&Nn(n),Be(n),mc(n,u,e,l,a)),null;case 27:if(Ti(n),a=xe.current,u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&Nn(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return Be(n),null}e=te.current,_a(n)?kh(n):(e=ug(u,l,a),n.stateNode=e,Nn(n))}return Be(n),null;case 5:if(Ti(n),u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&Nn(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return Be(n),null}if(f=te.current,_a(n))kh(n);else{var y=Tl(xe.current);switch(f){case 1:f=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:f=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":f=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":f=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":f=y.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?y.createElement("select",{is:l.is}):y.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?y.createElement(u,{is:l.is}):y.createElement(u)}}f[ct]=n,f[_t]=l;e:for(y=n.child;y!==null;){if(y.tag===5||y.tag===6)f.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===n)break e;for(;y.sibling===null;){if(y.return===null||y.return===n)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}n.stateNode=f;e:switch(mt(f,u,l),u){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Nn(n)}}return Be(n),mc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==l&&Nn(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error(r(166));if(e=xe.current,_a(n)){if(e=n.stateNode,a=n.memoizedProps,l=null,u=ft,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[ct]=n,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Ip(e.nodeValue,a)),e||Vn(n,!0)}else e=Tl(e).createTextNode(l),e[ct]=n,n.stateNode=e}return Be(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(l=_a(n),a!==null){if(e===null){if(!l)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[ct]=n}else Li(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Be(n),e=!1}else a=Eu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(Zt(n),n):(Zt(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Be(n),null;case 13:if(l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=_a(n),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[ct]=n}else Li(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Be(n),u=!1}else u=Eu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(Zt(n),n):(Zt(n),null)}return Zt(n),(n.flags&128)!==0?(n.lanes=a,n):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=n.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==u&&(l.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),hl(n,n.updateQueue),Be(n),null);case 4:return He(),e===null&&Uc(n.stateNode.containerInfo),Be(n),null;case 10:return On(n.type),Be(n),null;case 19:if(q(Pe),l=n.memoizedState,l===null)return Be(n),null;if(u=(n.flags&128)!==0,f=l.rendering,f===null)if(u)qs(l,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=el(e),f!==null){for(n.flags|=128,qs(l,!1),e=f.updateQueue,n.updateQueue=e,hl(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Ah(a,e),a=a.sibling;return X(Pe,Pe.current&1|2),Oe&&wn(n,l.treeForkCount),n.child}e=e.sibling}l.tail!==null&&Ct()>vl&&(n.flags|=128,u=!0,qs(l,!1),n.lanes=4194304)}else{if(!u)if(e=el(f),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,hl(n,e),qs(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Oe)return Be(n),null}else 2*Ct()-l.renderingStartTime>vl&&a!==536870912&&(n.flags|=128,u=!0,qs(l,!1),n.lanes=4194304);l.isBackwards?(f.sibling=n.child,n.child=f):(e=l.last,e!==null?e.sibling=f:n.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ct(),e.sibling=null,a=Pe.current,X(Pe,u?a&1|2:a&1),Oe&&wn(n,l.treeForkCount),e):(Be(n),null);case 22:case 23:return Zt(n),Lu(),l=n.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?(a&536870912)!==0&&(n.flags&128)===0&&(Be(n),n.subtreeFlags&6&&(n.flags|=8192)):Be(n),a=n.updateQueue,a!==null&&hl(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==a&&(n.flags|=2048),e!==null&&q(Bi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),On(Je),Be(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function Jx(e,n){switch(_u(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return On(Je),He(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ti(n),null;case 31:if(n.memoizedState!==null){if(Zt(n),n.alternate===null)throw Error(r(340));Li()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Zt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Li()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return q(Pe),null;case 4:return He(),null;case 10:return On(n.type),null;case 22:case 23:return Zt(n),Lu(),e!==null&&q(Bi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return On(Je),null;case 25:return null;default:return null}}function ip(e,n){switch(_u(n),n.tag){case 3:On(Je),He();break;case 26:case 27:case 5:Ti(n);break;case 4:He();break;case 31:n.memoizedState!==null&&Zt(n);break;case 13:Zt(n);break;case 19:q(Pe);break;case 10:On(n.type);break;case 22:case 23:Zt(n),Lu(),e!==null&&q(Bi);break;case 24:On(Je)}}function Bs(e,n){try{var a=n.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var u=l.next;a=u;do{if((a.tag&e)===e){l=void 0;var f=a.create,y=a.inst;l=f(),y.destroy=l}a=a.next}while(a!==u)}}catch(_){Me(n,n.return,_)}}function ti(e,n,a){try{var l=n.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var f=u.next;l=f;do{if((l.tag&e)===e){var y=l.inst,_=y.destroy;if(_!==void 0){y.destroy=void 0,u=n;var O=a,M=_;try{M()}catch(H){Me(u,O,H)}}}l=l.next}while(l!==f)}}catch(H){Me(n,n.return,H)}}function ap(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Vh(n,a)}catch(l){Me(e,e.return,l)}}}function sp(e,n,a){a.props=Ki(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Me(e,n,l)}}function Hs(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(u){Me(e,n,u)}}function hn(e,n){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(u){Me(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){Me(e,n,u)}else a.current=null}function rp(e){var n=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(u){Me(e,e.return,u)}}function pc(e,n,a){try{var l=e.stateNode;bS(l,e.type,a,n),l[_t]=n}catch(u){Me(e,e.return,u)}}function lp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&oi(e.type)||e.tag===4}function gc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||lp(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&&oi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function yc(e,n,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=xn));else if(l!==4&&(l===27&&oi(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(yc(e,n,a),e=e.sibling;e!==null;)yc(e,n,a),e=e.sibling}function ml(e,n,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(l!==4&&(l===27&&oi(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ml(e,n,a),e=e.sibling;e!==null;)ml(e,n,a),e=e.sibling}function op(e){var n=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);mt(n,l,a),n[ct]=e,n[_t]=a}catch(f){Me(e,e.return,f)}}var An=!1,et=!1,vc=!1,up=typeof WeakSet=="function"?WeakSet:Set,lt=null;function Ix(e,n){if(e=e.containerInfo,qc=kl,e=Sh(e),fu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var u=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var y=0,_=-1,O=-1,M=0,H=0,K=e,D=null;t:for(;;){for(var L;K!==a||u!==0&&K.nodeType!==3||(_=y+u),K!==f||l!==0&&K.nodeType!==3||(O=y+l),K.nodeType===3&&(y+=K.nodeValue.length),(L=K.firstChild)!==null;)D=K,K=L;for(;;){if(K===e)break t;if(D===a&&++M===u&&(_=y),D===f&&++H===l&&(O=y),(L=K.nextSibling)!==null)break;K=D,D=K.parentNode}K=L}a=_===-1||O===-1?null:{start:_,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(Bc={focusedElem:e,selectionRange:a},kl=!1,lt=n;lt!==null;)if(n=lt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,lt=e;else for(;lt!==null;){switch(n=lt,f=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=n,u=f.memoizedProps,f=f.memoizedState,l=a.stateNode;try{var ne=Ki(a.type,u);e=l.getSnapshotBeforeUpdate(ne,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(ce){Me(a,a.return,ce)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Qc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,lt=e;break}lt=n.return}}function cp(e,n,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Cn(e,a),l&4&&Bs(5,a);break;case 1:if(Cn(e,a),l&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(y){Me(a,a.return,y)}else{var u=Ki(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(u,n,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Me(a,a.return,y)}}l&64&&ap(a),l&512&&Hs(a,a.return);break;case 3:if(Cn(e,a),l&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Vh(e,n)}catch(y){Me(a,a.return,y)}}break;case 27:n===null&&l&4&&op(a);case 26:case 5:Cn(e,a),n===null&&l&4&&rp(a),l&512&&Hs(a,a.return);break;case 12:Cn(e,a);break;case 31:Cn(e,a),l&4&&hp(e,a);break;case 13:Cn(e,a),l&4&&mp(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=lS.bind(null,a),jS(e,a))));break;case 22:if(l=a.memoizedState!==null||An,!l){n=n!==null&&n.memoizedState!==null||et,u=An;var f=et;An=l,(et=n)&&!f?Mn(e,a,(a.subtreeFlags&8772)!==0):Cn(e,a),An=u,et=f}break;case 30:break;default:Cn(e,a)}}function fp(e){var n=e.alternate;n!==null&&(e.alternate=null,fp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Vo(n)),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 $e=null,Et=!1;function Rn(e,n,a){for(a=a.child;a!==null;)dp(e,n,a),a=a.sibling}function dp(e,n,a){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(fs,a)}catch{}switch(a.tag){case 26:et||hn(a,n),Rn(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:et||hn(a,n);var l=$e,u=Et;oi(a.type)&&($e=a.stateNode,Et=!1),Rn(e,n,a),Xs(a.stateNode),$e=l,Et=u;break;case 5:et||hn(a,n);case 6:if(l=$e,u=Et,$e=null,Rn(e,n,a),$e=l,Et=u,$e!==null)if(Et)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(a.stateNode)}catch(f){Me(a,n,f)}else try{$e.removeChild(a.stateNode)}catch(f){Me(a,n,f)}break;case 18:$e!==null&&(Et?(e=$e,ag(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Qa(e)):ag($e,a.stateNode));break;case 4:l=$e,u=Et,$e=a.stateNode.containerInfo,Et=!0,Rn(e,n,a),$e=l,Et=u;break;case 0:case 11:case 14:case 15:ti(2,a,n),et||ti(4,a,n),Rn(e,n,a);break;case 1:et||(hn(a,n),l=a.stateNode,typeof l.componentWillUnmount=="function"&&sp(a,n,l)),Rn(e,n,a);break;case 21:Rn(e,n,a);break;case 22:et=(l=et)||a.memoizedState!==null,Rn(e,n,a),et=l;break;default:Rn(e,n,a)}}function hp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qa(e)}catch(a){Me(n,n.return,a)}}}function mp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qa(e)}catch(a){Me(n,n.return,a)}}function Wx(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new up),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new up),n;default:throw Error(r(435,e.tag))}}function pl(e,n){var a=Wx(e);n.forEach(function(l){if(!a.has(l)){a.add(l);var u=oS.bind(null,e,l);l.then(u,u)}})}function Ot(e,n){var a=n.deletions;if(a!==null)for(var l=0;l<a.length;l++){var u=a[l],f=e,y=n,_=y;e:for(;_!==null;){switch(_.tag){case 27:if(oi(_.type)){$e=_.stateNode,Et=!1;break e}break;case 5:$e=_.stateNode,Et=!1;break e;case 3:case 4:$e=_.stateNode.containerInfo,Et=!0;break e}_=_.return}if($e===null)throw Error(r(160));dp(f,y,u),$e=null,Et=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)pp(n,e),n=n.sibling}var nn=null;function pp(e,n){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ot(n,e),zt(e),l&4&&(ti(3,e,e.return),Bs(3,e),ti(5,e,e.return));break;case 1:Ot(n,e),zt(e),l&512&&(et||a===null||hn(a,a.return)),l&64&&An&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var u=nn;if(Ot(n,e),zt(e),l&512&&(et||a===null||hn(a,a.return)),l&4){var f=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(l){case"title":f=u.getElementsByTagName("title")[0],(!f||f[ms]||f[ct]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(l),u.head.insertBefore(f,u.querySelector("head > title"))),mt(f,l,a),f[ct]=e,rt(f),l=f;break e;case"link":var y=pg("link","href",u).get(l+(a.href||""));if(y){for(var _=0;_<y.length;_++)if(f=y[_],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(_,1);break t}}f=u.createElement(l),mt(f,l,a),u.head.appendChild(f);break;case"meta":if(y=pg("meta","content",u).get(l+(a.content||""))){for(_=0;_<y.length;_++)if(f=y[_],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(_,1);break t}}f=u.createElement(l),mt(f,l,a),u.head.appendChild(f);break;default:throw Error(r(468,l))}f[ct]=e,rt(f),l=f}e.stateNode=l}else gg(u,e.type,e.stateNode);else e.stateNode=mg(u,l,e.memoizedProps);else f!==l?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,l===null?gg(u,e.type,e.stateNode):mg(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&pc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ot(n,e),zt(e),l&512&&(et||a===null||hn(a,a.return)),a!==null&&l&4&&pc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ot(n,e),zt(e),l&512&&(et||a===null||hn(a,a.return)),e.flags&32){u=e.stateNode;try{da(u,"")}catch(ne){Me(e,e.return,ne)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,pc(e,u,a!==null?a.memoizedProps:u)),l&1024&&(vc=!0);break;case 6:if(Ot(n,e),zt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ne){Me(e,e.return,ne)}}break;case 3:if(Rl=null,u=nn,nn=Nl(n.containerInfo),Ot(n,e),nn=u,zt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Qa(n.containerInfo)}catch(ne){Me(e,e.return,ne)}vc&&(vc=!1,gp(e));break;case 4:l=nn,nn=Nl(e.stateNode.containerInfo),Ot(n,e),zt(e),nn=l;break;case 12:Ot(n,e),zt(e);break;case 31:Ot(n,e),zt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,pl(e,l)));break;case 13:Ot(n,e),zt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(yl=Ct()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,pl(e,l)));break;case 22:u=e.memoizedState!==null;var O=a!==null&&a.memoizedState!==null,M=An,H=et;if(An=M||u,et=H||O,Ot(n,e),et=H,An=M,zt(e),l&8192)e:for(n=e.stateNode,n._visibility=u?n._visibility&-2:n._visibility|1,u&&(a===null||O||An||et||Yi(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){O=a=n;try{if(f=O.stateNode,u)y=f.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{_=O.stateNode;var K=O.memoizedProps.style,D=K!=null&&K.hasOwnProperty("display")?K.display:null;_.style.display=D==null||typeof D=="boolean"?"":(""+D).trim()}}catch(ne){Me(O,O.return,ne)}}}else if(n.tag===6){if(a===null){O=n;try{O.stateNode.nodeValue=u?"":O.memoizedProps}catch(ne){Me(O,O.return,ne)}}}else if(n.tag===18){if(a===null){O=n;try{var L=O.stateNode;u?sg(L,!0):sg(O.stateNode,!1)}catch(ne){Me(O,O.return,ne)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,pl(e,a))));break;case 19:Ot(n,e),zt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,pl(e,l)));break;case 30:break;case 21:break;default:Ot(n,e),zt(e)}}function zt(e){var n=e.flags;if(n&2){try{for(var a,l=e.return;l!==null;){if(lp(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var u=a.stateNode,f=gc(e);ml(e,f,u);break;case 5:var y=a.stateNode;a.flags&32&&(da(y,""),a.flags&=-33);var _=gc(e);ml(e,_,y);break;case 3:case 4:var O=a.stateNode.containerInfo,M=gc(e);yc(e,M,O);break;default:throw Error(r(161))}}catch(H){Me(e,e.return,H)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function gp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;gp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Cn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)cp(e,n.alternate,n),n=n.sibling}function Yi(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:ti(4,n,n.return),Yi(n);break;case 1:hn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&sp(n,n.return,a),Yi(n);break;case 27:Xs(n.stateNode);case 26:case 5:hn(n,n.return),Yi(n);break;case 22:n.memoizedState===null&&Yi(n);break;case 30:Yi(n);break;default:Yi(n)}e=e.sibling}}function Mn(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var l=n.alternate,u=e,f=n,y=f.flags;switch(f.tag){case 0:case 11:case 15:Mn(u,f,a),Bs(4,f);break;case 1:if(Mn(u,f,a),l=f,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(M){Me(l,l.return,M)}if(l=f,u=l.updateQueue,u!==null){var _=l.stateNode;try{var O=u.shared.hiddenCallbacks;if(O!==null)for(u.shared.hiddenCallbacks=null,u=0;u<O.length;u++)Fh(O[u],_)}catch(M){Me(l,l.return,M)}}a&&y&64&&ap(f),Hs(f,f.return);break;case 27:op(f);case 26:case 5:Mn(u,f,a),a&&l===null&&y&4&&rp(f),Hs(f,f.return);break;case 12:Mn(u,f,a);break;case 31:Mn(u,f,a),a&&y&4&&hp(u,f);break;case 13:Mn(u,f,a),a&&y&4&&mp(u,f);break;case 22:f.memoizedState===null&&Mn(u,f,a),Hs(f,f.return);break;case 30:break;default:Mn(u,f,a)}n=n.sibling}}function bc(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&js(a))}function xc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&js(e))}function an(e,n,a,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)yp(e,n,a,l),n=n.sibling}function yp(e,n,a,l){var u=n.flags;switch(n.tag){case 0:case 11:case 15:an(e,n,a,l),u&2048&&Bs(9,n);break;case 1:an(e,n,a,l);break;case 3:an(e,n,a,l),u&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&js(e)));break;case 12:if(u&2048){an(e,n,a,l),e=n.stateNode;try{var f=n.memoizedProps,y=f.id,_=f.onPostCommit;typeof _=="function"&&_(y,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){Me(n,n.return,O)}}else an(e,n,a,l);break;case 31:an(e,n,a,l);break;case 13:an(e,n,a,l);break;case 23:break;case 22:f=n.stateNode,y=n.alternate,n.memoizedState!==null?f._visibility&2?an(e,n,a,l):$s(e,n):f._visibility&2?an(e,n,a,l):(f._visibility|=2,Ca(e,n,a,l,(n.subtreeFlags&10256)!==0||!1)),u&2048&&bc(y,n);break;case 24:an(e,n,a,l),u&2048&&xc(n.alternate,n);break;default:an(e,n,a,l)}}function Ca(e,n,a,l,u){for(u=u&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var f=e,y=n,_=a,O=l,M=y.flags;switch(y.tag){case 0:case 11:case 15:Ca(f,y,_,O,u),Bs(8,y);break;case 23:break;case 22:var H=y.stateNode;y.memoizedState!==null?H._visibility&2?Ca(f,y,_,O,u):$s(f,y):(H._visibility|=2,Ca(f,y,_,O,u)),u&&M&2048&&bc(y.alternate,y);break;case 24:Ca(f,y,_,O,u),u&&M&2048&&xc(y.alternate,y);break;default:Ca(f,y,_,O,u)}n=n.sibling}}function $s(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,l=n,u=l.flags;switch(l.tag){case 22:$s(a,l),u&2048&&bc(l.alternate,l);break;case 24:$s(a,l),u&2048&&xc(l.alternate,l);break;default:$s(a,l)}n=n.sibling}}var Qs=8192;function Ma(e,n,a){if(e.subtreeFlags&Qs)for(e=e.child;e!==null;)vp(e,n,a),e=e.sibling}function vp(e,n,a){switch(e.tag){case 26:Ma(e,n,a),e.flags&Qs&&e.memoizedState!==null&&qS(a,nn,e.memoizedState,e.memoizedProps);break;case 5:Ma(e,n,a);break;case 3:case 4:var l=nn;nn=Nl(e.stateNode.containerInfo),Ma(e,n,a),nn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Qs,Qs=16777216,Ma(e,n,a),Qs=l):Ma(e,n,a));break;default:Ma(e,n,a)}}function bp(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Gs(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];lt=l,Sp(l,e)}bp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)xp(e),e=e.sibling}function xp(e){switch(e.tag){case 0:case 11:case 15:Gs(e),e.flags&2048&&ti(9,e,e.return);break;case 3:Gs(e);break;case 12:Gs(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,gl(e)):Gs(e);break;default:Gs(e)}}function gl(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];lt=l,Sp(l,e)}bp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:ti(8,n,n.return),gl(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,gl(n));break;default:gl(n)}e=e.sibling}}function Sp(e,n){for(;lt!==null;){var a=lt;switch(a.tag){case 0:case 11:case 15:ti(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:js(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,lt=l;else e:for(a=e;lt!==null;){l=lt;var u=l.sibling,f=l.return;if(fp(l),l===a){lt=null;break e}if(u!==null){u.return=f,lt=u;break e}lt=f}}}var eS={getCacheForType:function(e){var n=dt(Je),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return dt(Je).controller.signal}},tS=typeof WeakMap=="function"?WeakMap:Map,Ne=0,Le=null,Se=null,we=0,Ce=0,qt=null,ni=!1,Da=!1,Sc=!1,Dn=0,Ve=0,ii=0,Fi=0,_c=0,Bt=0,ka=0,Ks=null,jt=null,wc=!1,yl=0,_p=0,vl=1/0,bl=null,ai=null,nt=0,si=null,Ua=null,kn=0,Ec=0,Oc=null,wp=null,Ys=0,zc=null;function Ht(){return(Ne&2)!==0&&we!==0?we&-we:U.T!==null?Cc():qd()}function Ep(){if(Bt===0)if((we&536870912)===0||Oe){var e=jr;jr<<=1,(jr&3932160)===0&&(jr=262144),Bt=e}else Bt=536870912;return e=Lt.current,e!==null&&(e.flags|=32),Bt}function Tt(e,n,a){(e===Le&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(La(e,0),ri(e,we,Bt,!1)),hs(e,a),((Ne&2)===0||e!==Le)&&(e===Le&&((Ne&2)===0&&(Fi|=a),Ve===4&&ri(e,we,Bt,!1)),mn(e))}function Op(e,n,a){if((Ne&6)!==0)throw Error(r(327));var l=!a&&(n&127)===0&&(n&e.expiredLanes)===0||ds(e,n),u=l?aS(e,n):Tc(e,n,!0),f=l;do{if(u===0){Da&&!l&&ri(e,n,0,!1);break}else{if(a=e.current.alternate,f&&!nS(a)){u=Tc(e,n,!1),f=!1;continue}if(u===2){if(f=n,e.errorRecoveryDisabledLanes&f)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){n=y;e:{var _=e;u=Ks;var O=_.current.memoizedState.isDehydrated;if(O&&(La(_,y).flags|=256),y=Tc(_,y,!1),y!==2){if(Sc&&!O){_.errorRecoveryDisabledLanes|=f,Fi|=f,u=4;break e}f=jt,jt=u,f!==null&&(jt===null?jt=f:jt.push.apply(jt,f))}u=y}if(f=!1,u!==2)continue}}if(u===1){La(e,0),ri(e,n,0,!0);break}e:{switch(l=e,f=u,f){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:ri(l,n,Bt,!ni);break e;case 2:jt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(u=yl+300-Ct(),10<u)){if(ri(l,n,Bt,!ni),Nr(l,0,!0)!==0)break e;kn=n,l.timeoutHandle=ng(zp.bind(null,l,a,jt,bl,wc,n,Bt,Fi,ka,ni,f,"Throttled",-0,0),u);break e}zp(l,a,jt,bl,wc,n,Bt,Fi,ka,ni,f,null,-0,0)}}break}while(!0);mn(e)}function zp(e,n,a,l,u,f,y,_,O,M,H,K,D,L){if(e.timeoutHandle=-1,K=n.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:xn},vp(n,f,K);var ne=(f&62914560)===f?yl-Ct():(f&4194048)===f?_p-Ct():0;if(ne=BS(K,ne),ne!==null){kn=f,e.cancelPendingCommit=ne(Dp.bind(null,e,n,f,a,l,u,y,_,O,H,K,null,D,L)),ri(e,f,y,!M);return}}Dp(e,n,f,a,l,u,y,_,O)}function nS(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var u=a[l],f=u.getSnapshot;u=u.value;try{if(!kt(f(),u))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ri(e,n,a,l){n&=~_c,n&=~Fi,e.suspendedLanes|=n,e.pingedLanes&=~n,l&&(e.warmLanes|=n),l=e.expirationTimes;for(var u=n;0<u;){var f=31-Dt(u),y=1<<f;l[f]=-1,u&=~y}a!==0&&Ud(e,a,n)}function xl(){return(Ne&6)===0?(Fs(0),!1):!0}function jc(){if(Se!==null){if(Ce===0)var e=Se.return;else e=Se,En=Zi=null,Qu(e),ja=null,Ns=0,e=Se;for(;e!==null;)ip(e.alternate,e),e=e.return;Se=null}}function La(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,_S(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),kn=0,jc(),Le=e,Se=a=_n(e.current,null),we=n,Ce=0,qt=null,ni=!1,Da=ds(e,n),Sc=!1,ka=Bt=_c=Fi=ii=Ve=0,jt=Ks=null,wc=!1,(n&8)!==0&&(n|=n&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=n;0<l;){var u=31-Dt(l),f=1<<u;n|=e[u],l&=~f}return Dn=n,Hr(),a}function jp(e,n){ge=null,U.H=Ls,n===za||n===Pr?(n=Qh(),Ce=3):n===Ru?(n=Qh(),Ce=4):Ce=n===sc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,qt=n,Se===null&&(Ve=1,ul(e,Ft(n,e.current)))}function Tp(){var e=Lt.current;return e===null?!0:(we&4194048)===we?Jt===null:(we&62914560)===we||(we&536870912)!==0?e===Jt:!1}function Np(){var e=U.H;return U.H=Ls,e===null?Ls:e}function Ap(){var e=U.A;return U.A=eS,e}function Sl(){Ve=4,ni||(we&4194048)!==we&&Lt.current!==null||(Da=!0),(ii&134217727)===0&&(Fi&134217727)===0||Le===null||ri(Le,we,Bt,!1)}function Tc(e,n,a){var l=Ne;Ne|=2;var u=Np(),f=Ap();(Le!==e||we!==n)&&(bl=null,La(e,n)),n=!1;var y=Ve;e:do try{if(Ce!==0&&Se!==null){var _=Se,O=qt;switch(Ce){case 8:jc(),y=6;break e;case 3:case 2:case 9:case 6:Lt.current===null&&(n=!0);var M=Ce;if(Ce=0,qt=null,Za(e,_,O,M),a&&Da){y=0;break e}break;default:M=Ce,Ce=0,qt=null,Za(e,_,O,M)}}iS(),y=Ve;break}catch(H){jp(e,H)}while(!0);return n&&e.shellSuspendCounter++,En=Zi=null,Ne=l,U.H=u,U.A=f,Se===null&&(Le=null,we=0,Hr()),y}function iS(){for(;Se!==null;)Rp(Se)}function aS(e,n){var a=Ne;Ne|=2;var l=Np(),u=Ap();Le!==e||we!==n?(bl=null,vl=Ct()+500,La(e,n)):Da=ds(e,n);e:do try{if(Ce!==0&&Se!==null){n=Se;var f=qt;t:switch(Ce){case 1:Ce=0,qt=null,Za(e,n,f,1);break;case 2:case 9:if(Hh(f)){Ce=0,qt=null,Cp(n);break}n=function(){Ce!==2&&Ce!==9||Le!==e||(Ce=7),mn(e)},f.then(n,n);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:Hh(f)?(Ce=0,qt=null,Cp(n)):(Ce=0,qt=null,Za(e,n,f,7));break;case 5:var y=null;switch(Se.tag){case 26:y=Se.memoizedState;case 5:case 27:var _=Se;if(y?yg(y):_.stateNode.complete){Ce=0,qt=null;var O=_.sibling;if(O!==null)Se=O;else{var M=_.return;M!==null?(Se=M,_l(M)):Se=null}break t}}Ce=0,qt=null,Za(e,n,f,5);break;case 6:Ce=0,qt=null,Za(e,n,f,6);break;case 8:jc(),Ve=6;break e;default:throw Error(r(462))}}sS();break}catch(H){jp(e,H)}while(!0);return En=Zi=null,U.H=l,U.A=u,Ne=a,Se!==null?0:(Le=null,we=0,Hr(),Ve)}function sS(){for(;Se!==null&&!T0();)Rp(Se)}function Rp(e){var n=tp(e.alternate,e,Dn);e.memoizedProps=e.pendingProps,n===null?_l(e):Se=n}function Cp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=Pm(a,n,n.pendingProps,n.type,void 0,we);break;case 11:n=Pm(a,n,n.pendingProps,n.type.render,n.ref,we);break;case 5:Qu(n);default:ip(a,n),n=Se=Ah(n,Dn),n=tp(a,n,Dn)}e.memoizedProps=e.pendingProps,n===null?_l(e):Se=n}function Za(e,n,a,l){En=Zi=null,Qu(n),ja=null,Ns=0;var u=n.return;try{if(Fx(e,u,n,a,we)){Ve=1,ul(e,Ft(a,e.current)),Se=null;return}}catch(f){if(u!==null)throw Se=u,f;Ve=1,ul(e,Ft(a,e.current)),Se=null;return}n.flags&32768?(Oe||l===1?e=!0:Da||(we&536870912)!==0?e=!1:(ni=e=!0,(l===2||l===9||l===3||l===6)&&(l=Lt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Mp(n,e)):_l(n)}function _l(e){var n=e;do{if((n.flags&32768)!==0){Mp(n,ni);return}e=n.return;var a=Xx(n.alternate,n,Dn);if(a!==null){Se=a;return}if(n=n.sibling,n!==null){Se=n;return}Se=n=e}while(n!==null);Ve===0&&(Ve=5)}function Mp(e,n){do{var a=Jx(e.alternate,e);if(a!==null){a.flags&=32767,Se=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Se=e;return}Se=e=a}while(e!==null);Ve=6,Se=null}function Dp(e,n,a,l,u,f,y,_,O){e.cancelPendingCommit=null;do wl();while(nt!==0);if((Ne&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(f=n.lanes|n.childLanes,f|=gu,Z0(e,a,f,y,_,O),e===Le&&(Se=Le=null,we=0),Ua=n,si=e,kn=a,Ec=f,Oc=u,wp=l,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,uS(Or,function(){return qp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,u=W.p,W.p=2,y=Ne,Ne|=4;try{Ix(e,n,a)}finally{Ne=y,W.p=u,U.T=l}}nt=1,kp(),Up(),Lp()}}function kp(){if(nt===1){nt=0;var e=si,n=Ua,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var l=W.p;W.p=2;var u=Ne;Ne|=4;try{pp(n,e);var f=Bc,y=Sh(e.containerInfo),_=f.focusedElem,O=f.selectionRange;if(y!==_&&_&&_.ownerDocument&&xh(_.ownerDocument.documentElement,_)){if(O!==null&&fu(_)){var M=O.start,H=O.end;if(H===void 0&&(H=M),"selectionStart"in _)_.selectionStart=M,_.selectionEnd=Math.min(H,_.value.length);else{var K=_.ownerDocument||document,D=K&&K.defaultView||window;if(D.getSelection){var L=D.getSelection(),ne=_.textContent.length,ce=Math.min(O.start,ne),Ue=O.end===void 0?ce:Math.min(O.end,ne);!L.extend&&ce>Ue&&(y=Ue,Ue=ce,ce=y);var N=bh(_,ce),T=bh(_,Ue);if(N&&T&&(L.rangeCount!==1||L.anchorNode!==N.node||L.anchorOffset!==N.offset||L.focusNode!==T.node||L.focusOffset!==T.offset)){var C=K.createRange();C.setStart(N.node,N.offset),L.removeAllRanges(),ce>Ue?(L.addRange(C),L.extend(T.node,T.offset)):(C.setEnd(T.node,T.offset),L.addRange(C))}}}}for(K=[],L=_;L=L.parentNode;)L.nodeType===1&&K.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<K.length;_++){var $=K[_];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}kl=!!qc,Bc=qc=null}finally{Ne=u,W.p=l,U.T=a}}e.current=n,nt=2}}function Up(){if(nt===2){nt=0;var e=si,n=Ua,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var l=W.p;W.p=2;var u=Ne;Ne|=4;try{cp(e,n.alternate,n)}finally{Ne=u,W.p=l,U.T=a}}nt=3}}function Lp(){if(nt===4||nt===3){nt=0,N0();var e=si,n=Ua,a=kn,l=wp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?nt=5:(nt=0,Ua=si=null,Zp(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(ai=null),Yo(a),n=n.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(fs,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=U.T,u=W.p,W.p=2,U.T=null;try{for(var f=e.onRecoverableError,y=0;y<l.length;y++){var _=l[y];f(_.value,{componentStack:_.stack})}}finally{U.T=n,W.p=u}}(kn&3)!==0&&wl(),mn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===zc?Ys++:(Ys=0,zc=e):Ys=0,Fs(0)}}function Zp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,js(n)))}function wl(){return kp(),Up(),Lp(),qp()}function qp(){if(nt!==5)return!1;var e=si,n=Ec;Ec=0;var a=Yo(kn),l=U.T,u=W.p;try{W.p=32>a?32:a,U.T=null,a=Oc,Oc=null;var f=si,y=kn;if(nt=0,Ua=si=null,kn=0,(Ne&6)!==0)throw Error(r(331));var _=Ne;if(Ne|=4,xp(f.current),yp(f,f.current,y,a),Ne=_,Fs(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(fs,f)}catch{}return!0}finally{W.p=u,U.T=l,Zp(e,n)}}function Bp(e,n,a){n=Ft(a,n),n=ac(e.stateNode,n,2),e=In(e,n,2),e!==null&&(hs(e,2),mn(e))}function Me(e,n,a){if(e.tag===3)Bp(e,e,a);else for(;n!==null;){if(n.tag===3){Bp(n,e,a);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ai===null||!ai.has(l))){e=Ft(a,e),a=Hm(2),l=In(n,a,2),l!==null&&($m(a,l,n,e),hs(l,2),mn(l));break}}n=n.return}}function Nc(e,n,a){var l=e.pingCache;if(l===null){l=e.pingCache=new tS;var u=new Set;l.set(n,u)}else u=l.get(n),u===void 0&&(u=new Set,l.set(n,u));u.has(a)||(Sc=!0,u.add(a),e=rS.bind(null,e,n,a),n.then(e,e))}function rS(e,n,a){var l=e.pingCache;l!==null&&l.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Le===e&&(we&a)===a&&(Ve===4||Ve===3&&(we&62914560)===we&&300>Ct()-yl?(Ne&2)===0&&La(e,0):_c|=a,ka===we&&(ka=0)),mn(e)}function Hp(e,n){n===0&&(n=kd()),e=ki(e,n),e!==null&&(hs(e,n),mn(e))}function lS(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Hp(e,a)}function oS(e,n){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(n),Hp(e,a)}function uS(e,n){return $o(e,n)}var El=null,qa=null,Ac=!1,Ol=!1,Rc=!1,li=0;function mn(e){e!==qa&&e.next===null&&(qa===null?El=qa=e:qa=qa.next=e),Ol=!0,Ac||(Ac=!0,fS())}function Fs(e,n){if(!Rc&&Ol){Rc=!0;do for(var a=!1,l=El;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var f=0;else{var y=l.suspendedLanes,_=l.pingedLanes;f=(1<<31-Dt(42|e)+1)-1,f&=u&~(y&~_),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Kp(l,f))}else f=we,f=Nr(l,l===Le?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||ds(l,f)||(a=!0,Kp(l,f));l=l.next}while(a);Rc=!1}}function cS(){$p()}function $p(){Ol=Ac=!1;var e=0;li!==0&&SS()&&(e=li);for(var n=Ct(),a=null,l=El;l!==null;){var u=l.next,f=Qp(l,n);f===0?(l.next=null,a===null?El=u:a.next=u,u===null&&(qa=a)):(a=l,(e!==0||(f&3)!==0)&&(Ol=!0)),l=u}nt!==0&&nt!==5||Fs(e),li!==0&&(li=0)}function Qp(e,n){for(var a=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var y=31-Dt(f),_=1<<y,O=u[y];O===-1?((_&a)===0||(_&l)!==0)&&(u[y]=L0(_,n)):O<=n&&(e.expiredLanes|=_),f&=~_}if(n=Le,a=we,a=Nr(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===n&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Qo(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ds(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(l!==null&&Qo(l),Yo(a)){case 2:case 8:a=Md;break;case 32:a=Or;break;case 268435456:a=Dd;break;default:a=Or}return l=Gp.bind(null,e),a=$o(a,l),e.callbackPriority=n,e.callbackNode=a,n}return l!==null&&l!==null&&Qo(l),e.callbackPriority=2,e.callbackNode=null,2}function Gp(e,n){if(nt!==0&&nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(wl()&&e.callbackNode!==a)return null;var l=we;return l=Nr(e,e===Le?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Op(e,l,n),Qp(e,Ct()),e.callbackNode!=null&&e.callbackNode===a?Gp.bind(null,e):null)}function Kp(e,n){if(wl())return null;Op(e,n,!0)}function fS(){wS(function(){(Ne&6)!==0?$o(Cd,cS):$p()})}function Cc(){if(li===0){var e=Ea;e===0&&(e=zr,zr<<=1,(zr&261888)===0&&(zr=256)),li=e}return li}function Yp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Mr(""+e)}function Fp(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function dS(e,n,a,l,u){if(n==="submit"&&a&&a.stateNode===u){var f=Yp((u[_t]||null).action),y=l.submitter;y&&(n=(n=y[_t]||null)?Yp(n.formAction):y.getAttribute("formAction"),n!==null&&(f=n,y=null));var _=new Lr("action","action",null,l,u);e.push({event:_,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(li!==0){var O=y?Fp(u,y):new FormData(u);Iu(a,{pending:!0,data:O,method:u.method,action:f},null,O)}}else typeof f=="function"&&(_.preventDefault(),O=y?Fp(u,y):new FormData(u),Iu(a,{pending:!0,data:O,method:u.method,action:f},f,O))},currentTarget:u}]})}}for(var Mc=0;Mc<pu.length;Mc++){var Dc=pu[Mc],hS=Dc.toLowerCase(),mS=Dc[0].toUpperCase()+Dc.slice(1);tn(hS,"on"+mS)}tn(Eh,"onAnimationEnd"),tn(Oh,"onAnimationIteration"),tn(zh,"onAnimationStart"),tn("dblclick","onDoubleClick"),tn("focusin","onFocus"),tn("focusout","onBlur"),tn(Ax,"onTransitionRun"),tn(Rx,"onTransitionStart"),tn(Cx,"onTransitionCancel"),tn(jh,"onTransitionEnd"),ca("onMouseEnter",["mouseout","mouseover"]),ca("onMouseLeave",["mouseout","mouseover"]),ca("onPointerEnter",["pointerout","pointerover"]),ca("onPointerLeave",["pointerout","pointerover"]),Ri("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ri("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ri("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ri("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ri("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ri("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vs="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(" "),pS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vs));function Vp(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],u=l.event;l=l.listeners;e:{var f=void 0;if(n)for(var y=l.length-1;0<=y;y--){var _=l[y],O=_.instance,M=_.currentTarget;if(_=_.listener,O!==f&&u.isPropagationStopped())break e;f=_,u.currentTarget=M;try{f(u)}catch(H){Br(H)}u.currentTarget=null,f=O}else for(y=0;y<l.length;y++){if(_=l[y],O=_.instance,M=_.currentTarget,_=_.listener,O!==f&&u.isPropagationStopped())break e;f=_,u.currentTarget=M;try{f(u)}catch(H){Br(H)}u.currentTarget=null,f=O}}}}function _e(e,n){var a=n[Fo];a===void 0&&(a=n[Fo]=new Set);var l=e+"__bubble";a.has(l)||(Pp(n,e,2,!1),a.add(l))}function kc(e,n,a){var l=0;n&&(l|=4),Pp(a,e,l,n)}var zl="_reactListening"+Math.random().toString(36).slice(2);function Uc(e){if(!e[zl]){e[zl]=!0,$d.forEach(function(a){a!=="selectionchange"&&(pS.has(a)||kc(a,!1,e),kc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[zl]||(n[zl]=!0,kc("selectionchange",!1,n))}}function Pp(e,n,a,l){switch(Eg(n)){case 2:var u=QS;break;case 8:u=GS;break;default:u=Jc}a=u.bind(null,n,a,e),u=void 0,!nu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(n,a,{capture:!0,passive:u}):e.addEventListener(n,a,!0):u!==void 0?e.addEventListener(n,a,{passive:u}):e.addEventListener(n,a,!1)}function Lc(e,n,a,l,u){var f=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var y=l.tag;if(y===3||y===4){var _=l.stateNode.containerInfo;if(_===u)break;if(y===4)for(y=l.return;y!==null;){var O=y.tag;if((O===3||O===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;_!==null;){if(y=la(_),y===null)return;if(O=y.tag,O===5||O===6||O===26||O===27){l=f=y;continue e}_=_.parentNode}}l=l.return}eh(function(){var M=f,H=eu(a),K=[];e:{var D=Th.get(e);if(D!==void 0){var L=Lr,ne=e;switch(e){case"keypress":if(kr(a)===0)break e;case"keydown":case"keyup":L=ox;break;case"focusin":ne="focus",L=ru;break;case"focusout":ne="blur",L=ru;break;case"beforeblur":case"afterblur":L=ru;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=ih;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=X0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=fx;break;case Eh:case Oh:case zh:L=W0;break;case jh:L=hx;break;case"scroll":case"scrollend":L=V0;break;case"wheel":L=px;break;case"copy":case"cut":case"paste":L=tx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=sh;break;case"toggle":case"beforetoggle":L=yx}var ce=(n&4)!==0,Ue=!ce&&(e==="scroll"||e==="scrollend"),N=ce?D!==null?D+"Capture":null:D;ce=[];for(var T=M,C;T!==null;){var $=T;if(C=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||C===null||N===null||($=gs(T,N),$!=null&&ce.push(Ps(T,$,C))),Ue)break;T=T.return}0<ce.length&&(D=new L(D,ne,null,a,H),K.push({event:D,listeners:ce}))}}if((n&7)===0){e:{if(D=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",D&&a!==Wo&&(ne=a.relatedTarget||a.fromElement)&&(la(ne)||ne[ra]))break e;if((L||D)&&(D=H.window===H?H:(D=H.ownerDocument)?D.defaultView||D.parentWindow:window,L?(ne=a.relatedTarget||a.toElement,L=M,ne=ne?la(ne):null,ne!==null&&(Ue=c(ne),ce=ne.tag,ne!==Ue||ce!==5&&ce!==27&&ce!==6)&&(ne=null)):(L=null,ne=M),L!==ne)){if(ce=ih,$="onMouseLeave",N="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(ce=sh,$="onPointerLeave",N="onPointerEnter",T="pointer"),Ue=L==null?D:ps(L),C=ne==null?D:ps(ne),D=new ce($,T+"leave",L,a,H),D.target=Ue,D.relatedTarget=C,$=null,la(H)===M&&(ce=new ce(N,T+"enter",ne,a,H),ce.target=C,ce.relatedTarget=Ue,$=ce),Ue=$,L&&ne)t:{for(ce=gS,N=L,T=ne,C=0,$=N;$;$=ce($))C++;$=0;for(var ue=T;ue;ue=ce(ue))$++;for(;0<C-$;)N=ce(N),C--;for(;0<$-C;)T=ce(T),$--;for(;C--;){if(N===T||T!==null&&N===T.alternate){ce=N;break t}N=ce(N),T=ce(T)}ce=null}else ce=null;L!==null&&Xp(K,D,L,ce,!1),ne!==null&&Ue!==null&&Xp(K,Ue,ne,ce,!0)}}e:{if(D=M?ps(M):window,L=D.nodeName&&D.nodeName.toLowerCase(),L==="select"||L==="input"&&D.type==="file")var je=hh;else if(fh(D))if(mh)je=jx;else{je=Ox;var ae=Ex}else L=D.nodeName,!L||L.toLowerCase()!=="input"||D.type!=="checkbox"&&D.type!=="radio"?M&&Io(M.elementType)&&(je=hh):je=zx;if(je&&(je=je(e,M))){dh(K,je,a,H);break e}ae&&ae(e,D,M),e==="focusout"&&M&&D.type==="number"&&M.memoizedProps.value!=null&&Jo(D,"number",D.value)}switch(ae=M?ps(M):window,e){case"focusin":(fh(ae)||ae.contentEditable==="true")&&(ga=ae,du=M,Es=null);break;case"focusout":Es=du=ga=null;break;case"mousedown":hu=!0;break;case"contextmenu":case"mouseup":case"dragend":hu=!1,_h(K,a,H);break;case"selectionchange":if(Nx)break;case"keydown":case"keyup":_h(K,a,H)}var ye;if(ou)e:{switch(e){case"compositionstart":var Ee="onCompositionStart";break e;case"compositionend":Ee="onCompositionEnd";break e;case"compositionupdate":Ee="onCompositionUpdate";break e}Ee=void 0}else pa?uh(e,a)&&(Ee="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ee="onCompositionStart");Ee&&(rh&&a.locale!=="ko"&&(pa||Ee!=="onCompositionStart"?Ee==="onCompositionEnd"&&pa&&(ye=th()):(Kn=H,iu="value"in Kn?Kn.value:Kn.textContent,pa=!0)),ae=jl(M,Ee),0<ae.length&&(Ee=new ah(Ee,e,null,a,H),K.push({event:Ee,listeners:ae}),ye?Ee.data=ye:(ye=ch(a),ye!==null&&(Ee.data=ye)))),(ye=bx?xx(e,a):Sx(e,a))&&(Ee=jl(M,"onBeforeInput"),0<Ee.length&&(ae=new ah("onBeforeInput","beforeinput",null,a,H),K.push({event:ae,listeners:Ee}),ae.data=ye)),dS(K,e,M,a,H)}Vp(K,n)})}function Ps(e,n,a){return{instance:e,listener:n,currentTarget:a}}function jl(e,n){for(var a=n+"Capture",l=[];e!==null;){var u=e,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=gs(e,a),u!=null&&l.unshift(Ps(e,u,f)),u=gs(e,n),u!=null&&l.push(Ps(e,u,f))),e.tag===3)return l;e=e.return}return[]}function gS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xp(e,n,a,l,u){for(var f=n._reactName,y=[];a!==null&&a!==l;){var _=a,O=_.alternate,M=_.stateNode;if(_=_.tag,O!==null&&O===l)break;_!==5&&_!==26&&_!==27||M===null||(O=M,u?(M=gs(a,f),M!=null&&y.unshift(Ps(a,M,O))):u||(M=gs(a,f),M!=null&&y.push(Ps(a,M,O)))),a=a.return}y.length!==0&&e.push({event:n,listeners:y})}var yS=/\r\n?/g,vS=/\u0000|\uFFFD/g;function Jp(e){return(typeof e=="string"?e:""+e).replace(yS,`
|
|
9
|
-
`).replace(vS,"")}function Ip(e,n){return n=Jp(n),Jp(e)===n}function ke(e,n,a,l,u,f){switch(a){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||da(e,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&da(e,""+l);break;case"className":Rr(e,"class",l);break;case"tabIndex":Rr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Rr(e,a,l);break;case"style":Id(e,l,f);break;case"data":if(n!=="object"){Rr(e,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Mr(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 f=="function"&&(a==="formAction"?(n!=="input"&&ke(e,n,"name",u.name,u,null),ke(e,n,"formEncType",u.formEncType,u,null),ke(e,n,"formMethod",u.formMethod,u,null),ke(e,n,"formTarget",u.formTarget,u,null)):(ke(e,n,"encType",u.encType,u,null),ke(e,n,"method",u.method,u,null),ke(e,n,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Mr(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=xn);break;case"onScroll":l!=null&&_e("scroll",e);break;case"onScrollEnd":l!=null&&_e("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Mr(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":_e("beforetoggle",e),_e("toggle",e),Ar(e,"popover",l);break;case"xlinkActuate":bn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":bn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":bn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":bn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":bn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":bn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":bn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":bn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":bn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ar(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Y0.get(a)||a,Ar(e,a,l))}}function Zc(e,n,a,l,u,f){switch(a){case"style":Id(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof l=="string"?da(e,l):(typeof l=="number"||typeof l=="bigint")&&da(e,""+l);break;case"onScroll":l!=null&&_e("scroll",e);break;case"onScrollEnd":l!=null&&_e("scrollend",e);break;case"onClick":l!=null&&(e.onclick=xn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Qd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),n=a.slice(2,u?a.length-7:void 0),f=e[_t]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(n,f,u),typeof l=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,l,u);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Ar(e,a,l)}}}function mt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",e),_e("load",e);var l=!1,u=!1,f;for(f in a)if(a.hasOwnProperty(f)){var y=a[f];if(y!=null)switch(f){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ke(e,n,f,y,a,null)}}u&&ke(e,n,"srcSet",a.srcSet,a,null),l&&ke(e,n,"src",a.src,a,null);return;case"input":_e("invalid",e);var _=f=y=u=null,O=null,M=null;for(l in a)if(a.hasOwnProperty(l)){var H=a[l];if(H!=null)switch(l){case"name":u=H;break;case"type":y=H;break;case"checked":O=H;break;case"defaultChecked":M=H;break;case"value":f=H;break;case"defaultValue":_=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,n));break;default:ke(e,n,l,H,a,null)}}Vd(e,f,_,O,M,y,u,!1);return;case"select":_e("invalid",e),l=y=f=null;for(u in a)if(a.hasOwnProperty(u)&&(_=a[u],_!=null))switch(u){case"value":f=_;break;case"defaultValue":y=_;break;case"multiple":l=_;default:ke(e,n,u,_,a,null)}n=f,a=y,e.multiple=!!l,n!=null?fa(e,!!l,n,!1):a!=null&&fa(e,!!l,a,!0);return;case"textarea":_e("invalid",e),f=u=l=null;for(y in a)if(a.hasOwnProperty(y)&&(_=a[y],_!=null))switch(y){case"value":l=_;break;case"defaultValue":u=_;break;case"children":f=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:ke(e,n,y,_,a,null)}Xd(e,l,u,f);return;case"option":for(O in a)a.hasOwnProperty(O)&&(l=a[O],l!=null)&&(O==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":ke(e,n,O,l,a,null));return;case"dialog":_e("beforetoggle",e),_e("toggle",e),_e("cancel",e),_e("close",e);break;case"iframe":case"object":_e("load",e);break;case"video":case"audio":for(l=0;l<Vs.length;l++)_e(Vs[l],e);break;case"image":_e("error",e),_e("load",e);break;case"details":_e("toggle",e);break;case"embed":case"source":case"link":_e("error",e),_e("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(M in a)if(a.hasOwnProperty(M)&&(l=a[M],l!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ke(e,n,M,l,a,null)}return;default:if(Io(n)){for(H in a)a.hasOwnProperty(H)&&(l=a[H],l!==void 0&&Zc(e,n,H,l,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(l=a[_],l!=null&&ke(e,n,_,l,a,null))}function bS(e,n,a,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,y=null,_=null,O=null,M=null,H=null;for(L in a){var K=a[L];if(a.hasOwnProperty(L)&&K!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":O=K;default:l.hasOwnProperty(L)||ke(e,n,L,null,l,K)}}for(var D in l){var L=l[D];if(K=a[D],l.hasOwnProperty(D)&&(L!=null||K!=null))switch(D){case"type":f=L;break;case"name":u=L;break;case"checked":M=L;break;case"defaultChecked":H=L;break;case"value":y=L;break;case"defaultValue":_=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(137,n));break;default:L!==K&&ke(e,n,D,L,l,K)}}Xo(e,y,_,O,M,H,f,u);return;case"select":L=y=_=D=null;for(f in a)if(O=a[f],a.hasOwnProperty(f)&&O!=null)switch(f){case"value":break;case"multiple":L=O;default:l.hasOwnProperty(f)||ke(e,n,f,null,l,O)}for(u in l)if(f=l[u],O=a[u],l.hasOwnProperty(u)&&(f!=null||O!=null))switch(u){case"value":D=f;break;case"defaultValue":_=f;break;case"multiple":y=f;default:f!==O&&ke(e,n,u,f,l,O)}n=_,a=y,l=L,D!=null?fa(e,!!a,D,!1):!!l!=!!a&&(n!=null?fa(e,!!a,n,!0):fa(e,!!a,a?[]:"",!1));return;case"textarea":L=D=null;for(_ in a)if(u=a[_],a.hasOwnProperty(_)&&u!=null&&!l.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:ke(e,n,_,null,l,u)}for(y in l)if(u=l[y],f=a[y],l.hasOwnProperty(y)&&(u!=null||f!=null))switch(y){case"value":D=u;break;case"defaultValue":L=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==f&&ke(e,n,y,u,l,f)}Pd(e,D,L);return;case"option":for(var ne in a)D=a[ne],a.hasOwnProperty(ne)&&D!=null&&!l.hasOwnProperty(ne)&&(ne==="selected"?e.selected=!1:ke(e,n,ne,null,l,D));for(O in l)D=l[O],L=a[O],l.hasOwnProperty(O)&&D!==L&&(D!=null||L!=null)&&(O==="selected"?e.selected=D&&typeof D!="function"&&typeof D!="symbol":ke(e,n,O,D,l,L));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 ce in a)D=a[ce],a.hasOwnProperty(ce)&&D!=null&&!l.hasOwnProperty(ce)&&ke(e,n,ce,null,l,D);for(M in l)if(D=l[M],L=a[M],l.hasOwnProperty(M)&&D!==L&&(D!=null||L!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(r(137,n));break;default:ke(e,n,M,D,l,L)}return;default:if(Io(n)){for(var Ue in a)D=a[Ue],a.hasOwnProperty(Ue)&&D!==void 0&&!l.hasOwnProperty(Ue)&&Zc(e,n,Ue,void 0,l,D);for(H in l)D=l[H],L=a[H],!l.hasOwnProperty(H)||D===L||D===void 0&&L===void 0||Zc(e,n,H,D,l,L);return}}for(var N in a)D=a[N],a.hasOwnProperty(N)&&D!=null&&!l.hasOwnProperty(N)&&ke(e,n,N,null,l,D);for(K in l)D=l[K],L=a[K],!l.hasOwnProperty(K)||D===L||D==null&&L==null||ke(e,n,K,D,l,L)}function Wp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function xS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var u=a[l],f=u.transferSize,y=u.initiatorType,_=u.duration;if(f&&_&&Wp(y)){for(y=0,_=u.responseEnd,l+=1;l<a.length;l++){var O=a[l],M=O.startTime;if(M>_)break;var H=O.transferSize,K=O.initiatorType;H&&Wp(K)&&(O=O.responseEnd,y+=H*(O<_?1:(_-M)/(O-M)))}if(--l,n+=8*(f+y)/(u.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var qc=null,Bc=null;function Tl(e){return e.nodeType===9?e:e.ownerDocument}function eg(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 tg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Hc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var $c=null;function SS(){var e=window.event;return e&&e.type==="popstate"?e===$c?!1:($c=e,!0):($c=null,!1)}var ng=typeof setTimeout=="function"?setTimeout:void 0,_S=typeof clearTimeout=="function"?clearTimeout:void 0,ig=typeof Promise=="function"?Promise:void 0,wS=typeof queueMicrotask=="function"?queueMicrotask:typeof ig<"u"?function(e){return ig.resolve(null).then(e).catch(ES)}:ng;function ES(e){setTimeout(function(){throw e})}function oi(e){return e==="head"}function ag(e,n){var a=n,l=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(u),Qa(n);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Xs(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Xs(a);for(var f=a.firstChild;f;){var y=f.nextSibling,_=f.nodeName;f[ms]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=y}}else a==="body"&&Xs(e.ownerDocument.body);a=u}while(a);Qa(n)}function sg(e,n){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Qc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Qc(a),Vo(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function OS(e,n,a,l){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ms])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=It(e.nextSibling),e===null)break}return null}function zS(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=It(e.nextSibling),e===null))return null;return e}function rg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=It(e.nextSibling),e===null))return null;return e}function Gc(e){return e.data==="$?"||e.data==="$~"}function Kc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function jS(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var l=function(){n(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function It(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Yc=null;function lg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return It(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function og(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function ug(e,n,a){switch(n=Tl(a),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Xs(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Vo(e)}var Wt=new Map,cg=new Set;function Nl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Un=W.d;W.d={f:TS,r:NS,D:AS,C:RS,L:CS,m:MS,X:kS,S:DS,M:US};function TS(){var e=Un.f(),n=xl();return e||n}function NS(e){var n=oa(e);n!==null&&n.tag===5&&n.type==="form"?jm(n):Un.r(e)}var Ba=typeof document>"u"?null:document;function fg(e,n,a){var l=Ba;if(l&&typeof n=="string"&&n){var u=Kt(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),cg.has(u)||(cg.add(u),e={rel:e,crossOrigin:a,href:n},l.querySelector(u)===null&&(n=l.createElement("link"),mt(n,"link",e),rt(n),l.head.appendChild(n)))}}function AS(e){Un.D(e),fg("dns-prefetch",e,null)}function RS(e,n){Un.C(e,n),fg("preconnect",e,n)}function CS(e,n,a){Un.L(e,n,a);var l=Ba;if(l&&e&&n){var u='link[rel="preload"][as="'+Kt(n)+'"]';n==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Kt(a.imageSizes)+'"]')):u+='[href="'+Kt(e)+'"]';var f=u;switch(n){case"style":f=Ha(e);break;case"script":f=$a(e)}Wt.has(f)||(e=v({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),Wt.set(f,e),l.querySelector(u)!==null||n==="style"&&l.querySelector(Js(f))||n==="script"&&l.querySelector(Is(f))||(n=l.createElement("link"),mt(n,"link",e),rt(n),l.head.appendChild(n)))}}function MS(e,n){Un.m(e,n);var a=Ba;if(a&&e){var l=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Kt(l)+'"][href="'+Kt(e)+'"]',f=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=$a(e)}if(!Wt.has(f)&&(e=v({rel:"modulepreload",href:e},n),Wt.set(f,e),a.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Is(f)))return}l=a.createElement("link"),mt(l,"link",e),rt(l),a.head.appendChild(l)}}}function DS(e,n,a){Un.S(e,n,a);var l=Ba;if(l&&e){var u=ua(l).hoistableStyles,f=Ha(e);n=n||"default";var y=u.get(f);if(!y){var _={loading:0,preload:null};if(y=l.querySelector(Js(f)))_.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},a),(a=Wt.get(f))&&Fc(e,a);var O=y=l.createElement("link");rt(O),mt(O,"link",e),O._p=new Promise(function(M,H){O.onload=M,O.onerror=H}),O.addEventListener("load",function(){_.loading|=1}),O.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Al(y,n,l)}y={type:"stylesheet",instance:y,count:1,state:_},u.set(f,y)}}}function kS(e,n){Un.X(e,n);var a=Ba;if(a&&e){var l=ua(a).hoistableScripts,u=$a(e),f=l.get(u);f||(f=a.querySelector(Is(u)),f||(e=v({src:e,async:!0},n),(n=Wt.get(u))&&Vc(e,n),f=a.createElement("script"),rt(f),mt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function US(e,n){Un.M(e,n);var a=Ba;if(a&&e){var l=ua(a).hoistableScripts,u=$a(e),f=l.get(u);f||(f=a.querySelector(Is(u)),f||(e=v({src:e,async:!0,type:"module"},n),(n=Wt.get(u))&&Vc(e,n),f=a.createElement("script"),rt(f),mt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function dg(e,n,a,l){var u=(u=xe.current)?Nl(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Ha(a.href),a=ua(u).hoistableStyles,l=a.get(n),l||(l={type:"style",instance:null,count:0,state:null},a.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ha(a.href);var f=ua(u).hoistableStyles,y=f.get(e);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,y),(f=u.querySelector(Js(e)))&&!f._p&&(y.instance=f,y.state.loading=5),Wt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Wt.set(e,a),f||LS(u,e,a,y.state))),n&&l===null)throw Error(r(528,""));return y}if(n&&l!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=$a(a),a=ua(u).hoistableScripts,l=a.get(n),l||(l={type:"script",instance:null,count:0,state:null},a.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ha(e){return'href="'+Kt(e)+'"'}function Js(e){return'link[rel="stylesheet"]['+e+"]"}function hg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function LS(e,n,a,l){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=1:(n=e.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=1}),n.addEventListener("error",function(){return l.loading|=2}),mt(n,"link",a),rt(n),e.head.appendChild(n))}function $a(e){return'[src="'+Kt(e)+'"]'}function Is(e){return"script[async]"+e}function mg(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var l=e.querySelector('style[data-href~="'+Kt(a.href)+'"]');if(l)return n.instance=l,rt(l),l;var u=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),rt(l),mt(l,"style",u),Al(l,a.precedence,e),n.instance=l;case"stylesheet":u=Ha(a.href);var f=e.querySelector(Js(u));if(f)return n.state.loading|=4,n.instance=f,rt(f),f;l=hg(a),(u=Wt.get(u))&&Fc(l,u),f=(e.ownerDocument||e).createElement("link"),rt(f);var y=f;return y._p=new Promise(function(_,O){y.onload=_,y.onerror=O}),mt(f,"link",l),n.state.loading|=4,Al(f,a.precedence,e),n.instance=f;case"script":return f=$a(a.src),(u=e.querySelector(Is(f)))?(n.instance=u,rt(u),u):(l=a,(u=Wt.get(f))&&(l=v({},a),Vc(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),rt(u),mt(u,"link",l),e.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(l=n.instance,n.state.loading|=4,Al(l,a.precedence,e));return n.instance}function Al(e,n,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,f=u,y=0;y<l.length;y++){var _=l[y];if(_.dataset.precedence===n)f=_;else if(f!==u)break}f?f.parentNode.insertBefore(e,f.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function Fc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Vc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Rl=null;function pg(e,n,a){if(Rl===null){var l=new Map,u=Rl=new Map;u.set(a,l)}else u=Rl,l=u.get(a),l||(l=new Map,u.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var f=a[u];if(!(f[ms]||f[ct]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var y=f.getAttribute(n)||"";y=e+y;var _=l.get(y);_?_.push(f):l.set(y,[f])}}return l}function gg(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function ZS(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function yg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function qS(e,n,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Ha(l.href),f=n.querySelector(Js(u));if(f){n=f._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Cl.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=f,rt(f);return}f=n.ownerDocument||n,l=hg(l),(u=Wt.get(u))&&Fc(l,u),f=f.createElement("link"),rt(f);var y=f;y._p=new Promise(function(_,O){y.onload=_,y.onerror=O}),mt(f,"link",l),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Cl.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Pc=0;function BS(e,n){return e.stylesheets&&e.count===0&&Dl(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Dl(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+n);0<e.imgBytes&&Pc===0&&(Pc=62500*xS());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Dl(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Pc?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(u)}}:null}function Cl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Dl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ml=null;function Dl(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ml=new Map,n.forEach(HS,e),Ml=null,Cl.call(e))}function HS(e,n){if(!(n.state.loading&4)){var a=Ml.get(e);if(a)var l=a.get(null);else{a=new Map,Ml.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var y=u[f];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),l=y)}l&&a.set(null,l)}u=n.instance,y=u.getAttribute("data-precedence"),f=a.get(y)||l,f===l&&a.set(null,u),a.set(y,u),this.count++,l=Cl.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),f?f.parentNode.insertBefore(u,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),n.state.loading|=4}}var Ws={$$typeof:G,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function $S(e,n,a,l,u,f,y,_,O){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=Go(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Go(0),this.hiddenUpdates=Go(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function vg(e,n,a,l,u,f,y,_,O,M,H,K){return e=new $S(e,n,a,y,O,M,H,K,_),n=1,f===!0&&(n|=24),f=Ut(3,null,null,n),e.current=f,f.stateNode=e,n=Tu(),n.refCount++,e.pooledCache=n,n.refCount++,f.memoizedState={element:l,isDehydrated:a,cache:n},Cu(f),e}function bg(e){return e?(e=ba,e):ba}function xg(e,n,a,l,u,f){u=bg(u),l.context===null?l.context=u:l.pendingContext=u,l=Jn(n),l.payload={element:a},f=f===void 0?null:f,f!==null&&(l.callback=f),a=In(e,l,n),a!==null&&(Tt(a,e,n),Rs(a,e,n))}function Sg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Xc(e,n){Sg(e,n),(e=e.alternate)&&Sg(e,n)}function _g(e){if(e.tag===13||e.tag===31){var n=ki(e,67108864);n!==null&&Tt(n,e,67108864),Xc(e,67108864)}}function wg(e){if(e.tag===13||e.tag===31){var n=Ht();n=Ko(n);var a=ki(e,n);a!==null&&Tt(a,e,n),Xc(e,n)}}var kl=!0;function QS(e,n,a,l){var u=U.T;U.T=null;var f=W.p;try{W.p=2,Jc(e,n,a,l)}finally{W.p=f,U.T=u}}function GS(e,n,a,l){var u=U.T;U.T=null;var f=W.p;try{W.p=8,Jc(e,n,a,l)}finally{W.p=f,U.T=u}}function Jc(e,n,a,l){if(kl){var u=Ic(l);if(u===null)Lc(e,n,l,Ul,a),Og(e,l);else if(YS(u,e,n,a,l))l.stopPropagation();else if(Og(e,l),n&4&&-1<KS.indexOf(e)){for(;u!==null;){var f=oa(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=Ai(f.pendingLanes);if(y!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;y;){var O=1<<31-Dt(y);_.entanglements[1]|=O,y&=~O}mn(f),(Ne&6)===0&&(vl=Ct()+500,Fs(0))}}break;case 31:case 13:_=ki(f,2),_!==null&&Tt(_,f,2),xl(),Xc(f,2)}if(f=Ic(l),f===null&&Lc(e,n,l,Ul,a),f===u)break;u=f}u!==null&&l.stopPropagation()}else Lc(e,n,l,null,a)}}function Ic(e){return e=eu(e),Wc(e)}var Ul=null;function Wc(e){if(Ul=null,e=la(e),e!==null){var n=c(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=d(n),e!==null)return e;e=null}else if(a===31){if(e=h(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Ul=e,null}function Eg(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(A0()){case Cd:return 2;case Md:return 8;case Or:case R0:return 32;case Dd:return 268435456;default:return 32}default:return 32}}var ef=!1,ui=null,ci=null,fi=null,er=new Map,tr=new Map,di=[],KS="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 Og(e,n){switch(e){case"focusin":case"focusout":ui=null;break;case"dragenter":case"dragleave":ci=null;break;case"mouseover":case"mouseout":fi=null;break;case"pointerover":case"pointerout":er.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":tr.delete(n.pointerId)}}function nr(e,n,a,l,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:a,eventSystemFlags:l,nativeEvent:f,targetContainers:[u]},n!==null&&(n=oa(n),n!==null&&_g(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function YS(e,n,a,l,u){switch(n){case"focusin":return ui=nr(ui,e,n,a,l,u),!0;case"dragenter":return ci=nr(ci,e,n,a,l,u),!0;case"mouseover":return fi=nr(fi,e,n,a,l,u),!0;case"pointerover":var f=u.pointerId;return er.set(f,nr(er.get(f)||null,e,n,a,l,u)),!0;case"gotpointercapture":return f=u.pointerId,tr.set(f,nr(tr.get(f)||null,e,n,a,l,u)),!0}return!1}function zg(e){var n=la(e.target);if(n!==null){var a=c(n);if(a!==null){if(n=a.tag,n===13){if(n=d(a),n!==null){e.blockedOn=n,Bd(e.priority,function(){wg(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,Bd(e.priority,function(){wg(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ll(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Ic(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Wo=l,a.target.dispatchEvent(l),Wo=null}else return n=oa(a),n!==null&&_g(n),e.blockedOn=a,!1;n.shift()}return!0}function jg(e,n,a){Ll(e)&&a.delete(n)}function FS(){ef=!1,ui!==null&&Ll(ui)&&(ui=null),ci!==null&&Ll(ci)&&(ci=null),fi!==null&&Ll(fi)&&(fi=null),er.forEach(jg),tr.forEach(jg)}function Zl(e,n){e.blockedOn===n&&(e.blockedOn=null,ef||(ef=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,FS)))}var ql=null;function Tg(e){ql!==e&&(ql=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){ql===e&&(ql=null);for(var n=0;n<e.length;n+=3){var a=e[n],l=e[n+1],u=e[n+2];if(typeof l!="function"){if(Wc(l||a)===null)continue;break}var f=oa(a);f!==null&&(e.splice(n,3),n-=3,Iu(f,{pending:!0,data:u,method:a.method,action:l},l,u))}}))}function Qa(e){function n(O){return Zl(O,e)}ui!==null&&Zl(ui,e),ci!==null&&Zl(ci,e),fi!==null&&Zl(fi,e),er.forEach(n),tr.forEach(n);for(var a=0;a<di.length;a++){var l=di[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<di.length&&(a=di[0],a.blockedOn===null);)zg(a),a.blockedOn===null&&di.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var u=a[l],f=a[l+1],y=u[_t]||null;if(typeof f=="function")y||Tg(a);else if(y){var _=null;if(f&&f.hasAttribute("formAction")){if(u=f,y=f[_t]||null)_=y.formAction;else if(Wc(u)!==null)continue}else _=y.action;typeof _=="function"?a[l+1]=_:(a.splice(l,3),l-=3),Tg(a)}}}function Ng(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function n(){u!==null&&(u(),u=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),u!==null&&(u(),u=null)}}}function tf(e){this._internalRoot=e}Bl.prototype.render=tf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,l=Ht();xg(a,l,e,n,null,null)},Bl.prototype.unmount=tf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;xg(e.current,2,null,e,null,null),xl(),n[ra]=null}};function Bl(e){this._internalRoot=e}Bl.prototype.unstable_scheduleHydration=function(e){if(e){var n=qd();e={blockedOn:null,target:e,priority:n};for(var a=0;a<di.length&&n!==0&&n<di[a].priority;a++);di.splice(a,0,e),a===0&&zg(e)}};var Ag=i.version;if(Ag!=="19.2.8")throw Error(r(527,Ag,"19.2.8"));W.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(n),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var VS={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hl.isDisabled&&Hl.supportsFiber)try{fs=Hl.inject(VS),Mt=Hl}catch{}}return ar.createRoot=function(e,n){if(!o(e))throw Error(r(299));var a=!1,l="",u=Lm,f=Zm,y=qm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError)),n=vg(e,1,!1,null,null,a,l,null,u,f,y,Ng),e[ra]=n.current,Uc(e),new tf(n)},ar.hydrateRoot=function(e,n,a){if(!o(e))throw Error(r(299));var l=!1,u="",f=Lm,y=Zm,_=qm,O=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.formState!==void 0&&(O=a.formState)),n=vg(e,1,!0,n,a??null,l,u,O,f,y,_,Ng),n.context=bg(null),a=n.current,l=Ht(),l=Ko(l),u=Jn(l),u.callback=null,In(a,u,l),a=l,n.current.lanes=a,hs(n,a),mn(n),e[ra]=n.current,Uc(e),new Bl(n)},ar.version="19.2.8",ar}var Bg;function a_(){if(Bg)return sf.exports;Bg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),sf.exports=i_(),sf.exports}var s_=a_();const xv=J.createContext(void 0),ta=t=>{const i=J.useContext(xv);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},r_=({client:t,children:i})=>(J.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),g.jsx(xv.Provider,{value:t,children:i})),l_={setTimeout:(t,i)=>setTimeout(t,i),clearTimeout:t=>clearTimeout(t),setInterval:(t,i)=>setInterval(t,i),clearInterval:t=>clearInterval(t)};var o_=class{#e=l_;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,i){return this.#e.setTimeout(t,i)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,i){return this.#e.setInterval(t,i)}clearInterval(t){this.#e.clearInterval(t)}};const Vi=new o_;function u_(t){setTimeout(t,0)}const c_=typeof window>"u"||"Deno"in globalThis;function vt(){}function f_(t,i){return typeof t=="function"?t(i):t}function Af(t){return typeof t=="number"&&t>=0&&t!==1/0}function Sv(t,i){return Math.max(t+(i||0)-Date.now(),0)}function qn(t,i){return typeof t=="function"?t(i):t}function $t(t,i){return typeof t=="function"?t(i):t}function Hg(t,i){const{type:s="all",exact:r,fetchStatus:o,predicate:c,queryKey:d,stale:h}=t;if(d){if(r){if(i.queryHash!==Wf(d,i.options))return!1}else if(!Wa(i.queryKey,d))return!1}if(s!=="all"){const m=i.isActive();if(s==="active"&&!m||s==="inactive"&&m)return!1}return!(typeof h=="boolean"&&i.isStale()!==h||o&&o!==i.state.fetchStatus||c&&!c(i))}function $g(t,i){const{exact:s,status:r,predicate:o,mutationKey:c}=t;if(c){if(!i.options.mutationKey)return!1;if(s){if(Ii(i.options.mutationKey)!==Ii(c))return!1}else if(!Wa(i.options.mutationKey,c))return!1}return!(r&&i.state.status!==r||o&&!o(i))}function Wf(t,i){return(i?.queryKeyHashFn||Ii)(t)}function Ii(t){return JSON.stringify(t,(i,s)=>Rf(s)?Object.keys(s).sort().reduce((r,o)=>(r[o]=s[o],r),{}):s)}function Wa(t,i){if(t===i)return!0;if(typeof t!=typeof i)return!1;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(Array.isArray(t)&&Array.isArray(i)){for(let r=0;r<i.length;r++)if(!Wa(t[r],i[r]))return!1;return!0}const s=Object.keys(i);for(const r of s)if(!Wa(t[r],i[r]))return!1;return!0}return!1}const d_=Object.prototype.hasOwnProperty;function _v(t,i,s=0){if(t===i)return t;if(s>500)return i;const r=Qg(t)&&Qg(i);if(!r&&!(Rf(t)&&Rf(i)))return i;const o=(r?t:Object.keys(t)).length,c=r?i:Object.keys(i),d=c.length,h=r?new Array(d):{};let m=0;for(let p=0;p<d;p++){const b=r?p:c[p],v=t[b],x=i[b];if(v===x){h[b]=v,(r?p<o:d_.call(t,b))&&m++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){h[b]=x;continue}const S=_v(v,x,s+1);h[b]=S,S===v&&m++}return o===d&&m===o?t:h}function co(t,i){if(!i||Object.keys(t).length!==Object.keys(i).length)return!1;for(const s in t)if(t[s]!==i[s])return!1;return!0}function Qg(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Rf(t){if(!Gg(t))return!1;const i=t.constructor;if(i===void 0)return!0;const s=i.prototype;return!(!Gg(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Gg(t){return Object.prototype.toString.call(t)==="[object Object]"}function h_(t){return new Promise(i=>{Vi.setTimeout(i,t)})}function Cf(t,i,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,i):s.structuralSharing!==!1?_v(t,i):i}function m_(t,i,s=0){const r=[...t,i];return s&&r.length>s?r.slice(1):r}function p_(t,i,s=0){const r=[i,...t];return s&&r.length>s?r.slice(0,-1):r}const ed=Symbol();function wv(t,i){return!t.queryFn&&i?.initialPromise?()=>i.initialPromise:!t.queryFn||t.queryFn===ed?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function td(t,i){return typeof t=="function"?t(...i):!!t}function g_(t,i,s){let r=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=i(),r||(r=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)}),t}const fo=(()=>{let t=()=>c_;return{isServer(){return t()},setIsServer(i){t=i}}})();var rs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},y_=class extends rs{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const i=()=>t();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(i=>{i(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const nd=new y_,v_=u_;function b_(){let t=[],i=0,s=h=>{h()},r=h=>{h()},o=v_;const c=h=>{i?t.push(h):o(()=>{s(h)})},d=()=>{const h=t;t=[],h.length&&o(()=>{r(()=>{h.forEach(m=>{s(m)})})})};return{batch:h=>{let m;i++;try{m=h()}finally{i--,i||d()}return m},batchCalls:h=>(...m)=>{c(()=>{h(...m)})},schedule:c,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{r=h},setScheduler:h=>{o=h}}}const it=b_();var x_=class extends rs{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const i=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(i=>{i(t)}))}isOnline(){return this.#e}};const ho=new x_;function S_(t){return Math.min(1e3*2**t,3e4)}function Ev(t){return(t??"online")==="online"?ho.isOnline():!0}var Mf=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Ov(t){let i=!1,s=0,r,o="pending",c,d;const h=new Promise((k,G)=>{c=k,d=G});h.catch(vt);const m=()=>o!=="pending",p=k=>{if(!m()){const G=new Mf(k);E(G),t.onCancel?.(G)}},b=()=>{i=!0},v=()=>{i=!1},x=()=>nd.isFocused()&&(t.networkMode==="always"||ho.isOnline())&&t.canRun(),S=()=>Ev(t.networkMode)&&t.canRun(),w=k=>{m()||(r?.(),o="resolved",c(k))},E=k=>{m()||(r?.(),o="rejected",d(k))},j=()=>new Promise(k=>{r=G=>{(m()||x())&&k(G)},t.onPause?.()}).then(()=>{r=void 0,m()||t.onContinue?.()}),A=()=>{if(m())return;let k;const G=s===0?t.initialPromise:void 0;try{k=G??t.fn()}catch(Y){k=Promise.reject(Y)}Promise.resolve(k).then(w).catch(Y=>{if(m())return;const P=t.retry??(fo.isServer()?0:3),Z=t.retryDelay??S_,R=typeof Z=="function"?Z(s,Y):Z,I=P===!0||typeof P=="number"&&s<P||typeof P=="function"&&P(s,Y);if(i||!I){E(Y);return}s++,t.onFail?.(s,Y),h_(R).then(()=>x()?void 0:j()).then(()=>{i?E(Y):A()})})};return{promise:h,status:()=>o,cancel:p,continue:()=>(r?.(),h),cancelRetry:b,continueRetry:v,canStart:S,start:()=>(S()?A():j().then(A),h)}}var zv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Af(this.gcTime)&&(this.#e=Vi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(fo.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Vi.clearTimeout(this.#e),this.#e=void 0)}};function __(t){return{onFetch:(i,s)=>{const r=i.options,o=i.fetchOptions?.meta?.fetchMore?.direction,c=i.state.data?.pages||[],d=i.state.data?.pageParams||[];let h={pages:[],pageParams:[]},m=0;const p=async()=>{let b=!1;const v=w=>{g_(w,()=>i.signal,()=>b=!0)},x=wv(i.options,i.fetchOptions),S=async(w,E,j)=>{if(b)return Promise.reject(i.signal.reason);if(E==null&&w.pages.length)return Promise.resolve(w);const k=(()=>{const Z={client:i.client,queryKey:i.queryKey,pageParam:E,direction:j?"backward":"forward",meta:i.options.meta};return v(Z),Z})(),G=await x(k),{maxPages:Y}=i.options,P=j?p_:m_;return{pages:P(w.pages,G,Y),pageParams:P(w.pageParams,E,Y)}};if(o&&c.length){const w=o==="backward",E=w?w_:Kg,j={pages:c,pageParams:d};h=await S(j,E(r,j),w)}else{const w=t??c.length;do{const E=m===0?d[0]??r.initialPageParam:Kg(r,h);if(m>0&&E==null)break;h=await S(h,E),m++}while(m<w)}return h};i.options.persister?i.fetchFn=()=>i.options.persister?.(p,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},s):i.fetchFn=p}}}function Kg(t,{pages:i,pageParams:s}){const r=i.length-1;return i.length>0?t.getNextPageParam(i[r],i,s[r],s):void 0}function w_(t,{pages:i,pageParams:s}){return i.length>0?t.getPreviousPageParam?.(i[0],i,s[0],s):void 0}var E_=class extends zv{#e;#t;#n;#i;#s;#a;#r;#o;constructor(t){super(),this.#o=!1,this.#r=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#i=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Fg(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(t){if(this.options={...this.#r,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Fg(this.options);i.data!==void 0&&(this.setState(Yg(i.data,i.dataUpdatedAt)),this.#t=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#i.remove(this)}setData(t,i){const s=Cf(this.state.data,t,this.options);return this.#l({data:s,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),s}setState(t){this.#l({type:"setState",state:t})}cancel(t){const i=this.#a?.promise;return this.#a?.cancel(t),i?i.then(vt).catch(vt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>$t(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ed||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>qn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Sv(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const i=this.observers.indexOf(t);i!==-1&&(this.observers.splice(i,1),this.observers.length||(this.#a&&(this.#o||this.#u()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#i.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,i){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const s=new AbortController,r=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},o=()=>{const m=wv(this.options,i),b=(()=>{const v={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(v),v})();return this.#o=!1,this.options.persister?this.options.persister(m,b,this):m(b)},d=(()=>{const m={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return r(m),m})();(this.#e==="infinite"?__(this.options.pages):this.options.behavior)?.onFetch(d,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#l({type:"fetch",meta:d.fetchOptions?.meta});const h=this.#a=Ov({initialPromise:i?.initialPromise,fn:d.fetchFn,onCancel:m=>{m instanceof Mf&&m.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(m,p)=>{this.#l({type:"failed",failureCount:m,error:p})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const m=await h.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#i.config.onSuccess?.(m,this),this.#i.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Mf){if(m.silent)return this.#a.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#l({type:"error",error:m}),this.#i.config.onError?.(m,this),this.#i.config.onSettled?.(this.state.data,m,this),m}finally{this.#a===h&&(this.#a=void 0),this.scheduleGc()}}#l(t){const i=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...jv(s.data,this.options),fetchMeta:t.meta??null};case"success":const r={...s,...Yg(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?r:void 0,r;case"error":const o=t.error;return{...s,error:o,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=i(this.state),it.batch(()=>{this.observers.slice().forEach(s=>{s.onQueryUpdate()}),this.#i.notify({query:this,type:"updated",action:t})})}};function jv(t,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ev(i.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Yg(t,i){return{data:t,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Fg(t){const i=typeof t.initialData=="function"?t.initialData():t.initialData,s=i!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var O_=class extends rs{#e;#t=void 0;#n=void 0;#i=void 0;#s;#a;#r;#o;#u;#l;#f;#d;#c;#m=new Set;constructor(t,i){super(),this.options=i,this.#e=t,this.#r=null,this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Vg(this.#t,this.options)?this.#h():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Df(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Df(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(t){const i=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof $t(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),i._defaulted&&!co(this.options,i)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Pg(this.#t,s,this.options,i)&&this.#h(),this.updateResult(),r&&(this.#t!==s||$t(this.options.enabled,this.#t)!==$t(i.enabled,this.#t)||qn(this.options.staleTime,this.#t)!==qn(i.staleTime,this.#t))&&this.#p();const o=this.#g();r&&(this.#t!==s||$t(this.options.enabled,this.#t)!==$t(i.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(t){const i=this.#e.getQueryCache().build(this.#e,t),s=this.createResult(i,t);return j_(this,s)&&(this.#i=s,this.#a=this.options,this.#s=this.#t.state),s}getCurrentResult(){return this.#i}trackResult(t,i){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),i?.(r),Reflect.get(s,r))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const i=this.#e.defaultQueryOptions(t),s=this.#e.getQueryCache().build(this.#e,i);let r=()=>{},o;const c=new Promise(d=>{o=d,r=this.#e.getQueryCache().subscribe(h=>{h.type==="updated"&&h.query.queryHash===s.queryHash&&s.state.data!==void 0&&(r(),d(this.createResult(s,i)))})});return Promise.race([s.fetch().then(()=>{const d=this.createResult(s,i);return o?.(d),d}).finally(()=>{r()}),c])}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#h(t){this.#S();let i=this.#t.fetch(this.options,t);return t?.throwOnError||(i=i.catch(vt)),i}#p(){this.#b();const t=qn(this.options.staleTime,this.#t);if(fo.isServer()||this.#i.isStale||!Af(t))return;const i=Sv(this.#i.dataUpdatedAt,t)+1;this.#f=Vi.setTimeout(()=>{this.#i.isStale||this.updateResult()},i)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#x(),this.#c=t,!(fo.isServer()||$t(this.options.enabled,this.#t)===!1||!Af(this.#c)||this.#c===0)&&(this.#d=Vi.setInterval(()=>{(this.options.refetchIntervalInBackground||nd.isFocused())&&this.#h()},this.#c))}#v(){this.#p(),this.#y(this.#g())}#b(){this.#f!==void 0&&(Vi.clearTimeout(this.#f),this.#f=void 0)}#x(){this.#d!==void 0&&(Vi.clearInterval(this.#d),this.#d=void 0)}createResult(t,i){const s=this.#t,r=this.options,o=this.#i,c=this.#s,d=this.#a,h=t!==s?t.state:this.#n,{state:m}=t;let p={...m},b=!1,v;if(i._optimisticResults){const P=this.hasListeners(),Z=!P&&Vg(t,i),R=P&&Pg(t,s,i,r);(Z||R)&&(p={...p,...jv(m.data,t.options)}),i._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:w}=p;v=p.data;let E=!1;if(i.placeholderData!==void 0&&v===void 0&&w==="pending"){let P;o?.isPlaceholderData&&i.placeholderData===d?.placeholderData?(P=o.data,E=!0):P=typeof i.placeholderData=="function"?i.placeholderData(this.#l?.state.data,this.#l):i.placeholderData,P!==void 0&&(w="success",v=Cf(o?.data,P,i),b=!0)}if(i.select&&v!==void 0&&!E)if(o&&v===c?.data&&i.select===this.#o)v=this.#u;else try{this.#o=i.select,v=i.select(v),v=Cf(o?.data,v,i),this.#u=v,this.#r=null}catch(P){this.#r=P}else v===void 0&&(this.#r=null);this.#r&&(x=this.#r,v=this.#u,S=Date.now(),w="error",b=!1);const j=p.fetchStatus==="fetching",A=w==="pending",k=w==="error",G=A&&j,Y=v!==void 0;return{status:w,fetchStatus:p.fetchStatus,isPending:A,isSuccess:w==="success",isError:k,isInitialLoading:G,isLoading:G,data:v,dataUpdatedAt:p.dataUpdatedAt,error:x,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:j,isRefetching:j&&!A,isLoadingError:k&&!Y,isPaused:p.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:k&&Y,isStale:id(t,i),refetch:this.refetch,isEnabled:$t(i.enabled,t)!==!1}}updateResult(){const t=this.#i,i=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#a=this.options,this.#s.data!==void 0&&(this.#l=this.#t),co(i,t))return;this.#i=i;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#m.size)return!0;const c=new Set(o??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#i).some(d=>{const h=d;return this.#i[h]!==t[h]&&c.has(h)})};this.#_({listeners:s()})}#S(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const i=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(i?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#_(t){it.batch(()=>{t.listeners&&this.listeners.forEach(i=>{i(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function z_(t,i){return $t(i.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&$t(i.retryOnMount,t)===!1)}function Vg(t,i){return z_(t,i)||t.state.data!==void 0&&Df(t,i,i.refetchOnMount)}function Df(t,i,s){if($t(i.enabled,t)!==!1&&qn(i.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&id(t,i)}return!1}function Pg(t,i,s,r){return(t!==i||$t(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&id(t,s)}function id(t,i){return $t(i.enabled,t)!==!1&&t.isStaleByTime(qn(i.staleTime,t))}function j_(t,i){return!co(t.getCurrentResult(),i)}var T_=class extends zv{#e;#t;#n;#i;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||Tv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(i=>i!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){const i=()=>{this.#s({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#i=Ov({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(d,h)=>{this.#s({type:"failed",failureCount:d,error:h})},onPause:()=>{this.#s({type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),o=this.state.status==="pending",c=!r.canStart();try{if(o)i();else{this.#s({type:"pending",variables:t,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,s);const h=await this.options.onMutate?.(t,s);h!==this.state.context&&this.#s({type:"pending",context:h,variables:t,isPaused:c})}const d=await r.start();return await this.#n.config.onSuccess?.(d,t,this.state.context,this,s),await this.options.onSuccess?.(d,t,this.state.context,s),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(d,null,t,this.state.context,s),this.#s({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,t,this.state.context,this,s)}catch(h){Promise.reject(h)}try{await this.options.onError?.(d,t,this.state.context,s)}catch(h){Promise.reject(h)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,s)}catch(h){Promise.reject(h)}try{await this.options.onSettled?.(void 0,d,t,this.state.context,s)}catch(h){Promise.reject(h)}throw this.#s({type:"error",error:d}),d}finally{this.#i===r&&(this.#i=void 0),this.#n.runNext(this)}}#s(t){const i=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=i(this.state),it.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Tv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var N_=class extends rs{#e;#t;#n;constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}build(t,i,s){const r=new T_({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(i),state:s});return this.add(r),r}add(t){this.#e.add(t);const i=$l(t);if(typeof i=="string"){const s=this.#t.get(i);s?s.push(t):this.#t.set(i,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const i=$l(t);if(typeof i=="string"){const s=this.#t.get(i);if(s)if(s.length>1){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&this.#t.delete(i)}}this.notify({type:"removed",mutation:t})}canRun(t){const i=$l(t);if(typeof i=="string"){const s=this.#t.get(i)?.find(r=>r.state.status==="pending");return!s||s===t}else return!0}runNext(t){const i=$l(t);return typeof i=="string"?this.#t.get(i)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){it.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const i={exact:!0,...t};return this.getAll().find(s=>$g(i,s))}findAll(t={}){return this.getAll().filter(i=>$g(t,i))}notify(t){it.batch(()=>{this.listeners.forEach(i=>{i(t)})})}resumePausedMutations(){const t=this.getAll().filter(i=>i.state.isPaused);return it.batch(()=>Promise.all(t.map(i=>i.continue().catch(vt))))}};function $l(t){return t.options.scope?.id}var A_=class extends rs{#e;#t=void 0;#n;#i;constructor(i,s){super(),this.#e=i,this.setOptions(s),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){const s=this.options;this.options=this.#e.defaultMutationOptions(i),co(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&Ii(s.mutationKey)!==Ii(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#s())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(i){this.#s(),this.#a(i)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#s(),this.#a()}mutate(i,s){return this.#i=s,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(i)}#s(){const i=this.#n?.state??Tv();this.#t={...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset}}#a(i){it.batch(()=>{if(this.#i&&this.hasListeners()){const s=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(i?.type==="success"){try{this.#i.onSuccess?.(i.data,s,r,o)}catch(c){Promise.reject(c)}try{this.#i.onSettled?.(i.data,null,s,r,o)}catch(c){Promise.reject(c)}}else if(i?.type==="error"){try{this.#i.onError?.(i.error,s,r,o)}catch(c){Promise.reject(c)}try{this.#i.onSettled?.(void 0,i.error,s,r,o)}catch(c){Promise.reject(c)}}}this.listeners.forEach(s=>{s(this.#t)})})}},R_=class extends rs{#e;constructor(t={}){super(),this.config=t,this.#e=new Map}build(t,i,s){const r=i.queryKey,o=i.queryHash??Wf(r,i);let c=this.get(o);return c||(c=new E_({client:t,queryKey:r,queryHash:o,options:t.defaultQueryOptions(i),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(c)),c}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const i=this.#e.get(t.queryHash);i&&(t.destroy(),i===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){it.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const i={exact:!0,...t};return this.getAll().find(s=>Hg(i,s))}findAll(t={}){const i=this.getAll();return Object.keys(t).length>0?i.filter(s=>Hg(t,s)):i}notify(t){it.batch(()=>{this.listeners.forEach(i=>{i(t)})})}onFocus(){it.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},C_=class{#e;#t;#n;#i;#s;#a;#r;#o;constructor(t={}){this.#e=t.queryCache||new R_,this.#t=t.mutationCache||new N_,this.#n=t.defaultOptions||{},this.#i=new Map,this.#s=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#r=nd.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=ho.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#r?.(),this.#r=void 0,this.#o?.(),this.#o=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const i=this.defaultQueryOptions({queryKey:t});return this.#e.get(i.queryHash)?.state.data}ensureQueryData(t){const i=this.defaultQueryOptions(t),s=this.#e.build(this,i),r=s.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(qn(i.staleTime,s))&&this.prefetchQuery(i),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:i,state:s})=>[i,s.data])}setQueryData(t,i,s){const r=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(r.queryHash)?.state.data,c=f_(i,o);if(c!==void 0)return this.#e.build(this,r).setData(c,{...s,manual:!0})}setQueriesData(t,i,s){return it.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,i,s)]))}getQueryState(t){const i=this.defaultQueryOptions({queryKey:t});return this.#e.get(i.queryHash)?.state}removeQueries(t){const i=this.#e;it.batch(()=>{i.findAll(t).forEach(s=>{i.remove(s)})})}resetQueries(t,i){const s=this.#e;return it.batch(()=>{const r=s.findAll(t),o=new Set(r);return r.forEach(c=>{c.reset()}),this.refetchQueries({type:"active",predicate:c=>o.has(c)},i)})}cancelQueries(t,i={}){const s={revert:!0,...i},r=it.batch(()=>this.#e.findAll(t).map(o=>o.cancel(s)));return Promise.all(r).then(vt).catch(vt)}invalidateQueries(t,i={}){return it.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},i)))}refetchQueries(t,i={}){const s={...i,cancelRefetch:i.cancelRefetch??!0},r=it.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,s);return s.throwOnError||(c=c.catch(vt)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(vt)}async query(t){const i=this.defaultQueryOptions(t);i.retry===void 0&&(i.retry=!1);const s=this.#e.build(this,i),r=s.isStaleByTime(qn(i.staleTime,s))?await s.fetch(i):s.state.data,o=i.select;return o?o(r):r}fetchQuery(t){const i=this.defaultQueryOptions(t);i.retry===void 0&&(i.retry=!1);const s=this.#e.build(this,i);return s.isStaleByTime(qn(i.staleTime,s))?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(vt).catch(vt)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(vt).catch(vt)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return ho.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,i){this.#i.set(Ii(t),{queryKey:t,defaultOptions:i})}getQueryDefaults(t){const i=[...this.#i.values()],s={};return i.forEach(r=>{Wa(t,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(t,i){this.#s.set(Ii(t),{mutationKey:t,defaultOptions:i})}getMutationDefaults(t){const i=[...this.#s.values()],s={};return i.forEach(r=>{Wa(t,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const i={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return i.queryHash||(i.queryHash=Wf(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===ed&&(i.enabled=!1),i}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const Nv=J.createContext(!1),M_=()=>J.useContext(Nv);Nv.Provider;function D_(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const k_=J.createContext(D_()),U_=()=>J.useContext(k_),L_=(t,i,s)=>{const r=s?.state.error&&typeof t.throwOnError=="function"?td(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||r)&&(i.isReset()||(t.retryOnMount=!1))},Z_=t=>{J.useEffect(()=>{t.clearReset()},[t])},q_=({result:t,errorResetBoundary:i,throwOnError:s,query:r,suspense:o})=>t.isError&&!i.isReset()&&!t.isFetching&&r&&(o&&t.data===void 0||td(s,[t.error,r])),B_=t=>{if(t.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...o)=>s(r(...o)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},H_=(t,i)=>t?.suspense&&i.isPending,$_=(t,i,s)=>i.fetchOptimistic(t).catch(()=>{s.clearReset()});function Q_(t,i,s){const r=M_(),o=U_(),c=ta(),d=c.defaultQueryOptions(t),h=c.getQueryCache().get(d.queryHash),m=t.subscribed!==!1;d._optimisticResults=r?"isRestoring":m?"optimistic":void 0,B_(d),L_(d,o,h),Z_(o);const[p]=J.useState(()=>new i(c,d)),b=p.getOptimisticResult(d),v=!r&&m;if(J.useSyncExternalStore(J.useCallback(x=>{const S=v?p.subscribe(it.batchCalls(x)):vt;return p.updateResult(),S},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),J.useEffect(()=>{p.setOptions(d)},[d,p]),H_(d,b))throw $_(d,p,o);if(q_({result:b,errorResetBoundary:o,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw b.error;return d.notifyOnChangeProps?b:p.trackResult(b)}function un(t,i){return Q_(t,O_)}function ls(t,i){const s=ta(),[r]=J.useState(()=>new A_(s,t));J.useEffect(()=>{r.setOptions(t)},[r,t]);const o=J.useSyncExternalStore(J.useCallback(d=>r.subscribe(it.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),c=J.useCallback((...d)=>{r.mutate(d[0],d[1]).catch(vt)},[r]);if(o.error&&td(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}const Xg=!1;var Av=J.useLayoutEffect;function xi(t){return t[t.length-1]}function Rv(t,i){return typeof t=="function"?t(i):t}const ad=Object.prototype.hasOwnProperty;function Cv(t){for(const i in t)if(ad.call(t,i))return!0;return!1}const io=()=>Object.create(null),Ga=(t,i)=>vi(t,i,!0);function vi(t,i,s,r=0){if(t===i)return t;if(r++>500)return i;const o=Array.isArray(t)&&Array.isArray(i);if(!o&&!(mo(t)&&mo(i)))return i;const c=Object.keys(t),d=c.length,h=Object.keys(i),m=h.length;if(o?d!==t.length||m!==i.length||d&&xi(c)!==`${d-1}`||m&&xi(h)!==`${m-1}`:d!==Object.getOwnPropertyNames(t).length||m!==Object.getOwnPropertyNames(i).length||Object.getOwnPropertySymbols(i).length)return i;let p=0,b,v,x;if(o){for(;p<m&&(x=p,v=t[x],b=i[x],b=v===b?v:typeof v=="object"?vi(v,b,s,r):b,b===v);p++);if(p===m&&d===m)return t}else{let w=d===m,E=!0;for(;p<m;p++){x=h[p],v=t[x];const j=i[x];b=v===j?v:typeof v=="object"?vi(v,j,s,r):j,w&&=b===v&&(c[p]===x||ad.call(t,x)),E&&=Object.is(b,j),c[p]=b}if(w)return Object.getOwnPropertySymbols(t).length?i:t;if(E)return i}const S=o?h.fill(0):s?io():{};for(let w=0;w<m;w++)x=o?w:h[w],o?(v=t[x],w>p&&(b=i[x],b=v===b?v:typeof v=="object"?vi(v,b,s,r):b),S[x]=w<p?v:b):S[x]=c[w];return S}function mo(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}function Bn(t,i,s,r){if(t===i)return!0;if(Array.isArray(t)&&Array.isArray(i)){if(t.length!==i.length)return!1;for(let o=0,c=t.length;o<c;o++){const d=t[o],h=i[o];if(d!==h&&!Bn(d,h,s,r))return!1}return!0}if(mo(t)&&mo(i)){if(s){for(const c in i)if((r||i[c]!==void 0)&&!Bn(t[c],i[c],s,r))return!1;return!0}let o=0;if(r)o=Object.keys(t).length;else for(const c in t)t[c]!==void 0&&o++;for(const c in i)if((r||i[c]!==void 0)&&(o--===0||!Bn(t[c],i[c],s,r)))return!1;return o===0}return!1}const G_=/[\x00-\x1f\x7f"<>`{}]/g;function K_(t){return t.replace(G_,i=>"%"+i.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function Jg(t){let i;try{i=decodeURI(t)}catch{i=t.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return K_(i)}const Y_=["http:","https:","mailto:","tel:"];function pr(t){if(t[0]!=="/"&&t.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(t)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}const Mv=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Dv(t,i){if(!t)return!1;if(Mv.test(t))return!0;const s=pr(t);return s?!i.has(s):!1}function sr(t){if(!t)return t;let i=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){const s=/%25|%5C/gi;let r=0,o;for(i="";(o=s.exec(t))!==null;)i+=Jg(t.slice(r,o.index))+o[0],r=s.lastIndex;i+=Jg(r?t.slice(r):t)}return i}function F_(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function V_(t,i){if(t===i)return!0;if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==i[s])return!1;return!0}function sd(){throw new Error("Invariant failed")}function Va(t){return t.replace(/\/{2,}/g,"/")}function kv(t){return t==="/"?t:t.replace(/^\/+/,"")}function pn(t){const i=t.length;return i>1&&t[i-1]==="/"?t.replace(/\/+$/,""):t}function Uv(t){return pn(kv(t))}function Ig(t,i){return t?.endsWith("/")&&t!=="/"&&t!==`${i}/`?t.slice(0,-1):t}function Wg(t,i,s="never",r){if(i.includes("//")&&(i=Va(i)),i.startsWith("/"))return i.length===1||s==="preserve"?i:s==="always"?i.endsWith("/")?i:`${i}/`:i.endsWith("/")?i.slice(0,-1):i;const o=i===".";let c;if(r){c=o?t:t+"\0"+i;const p=r.get(c);if(p)return p}let d;if(o)d=t.split("/");else{for(t.includes("//")&&(t=Va(t)),d=t.split("/");d.length>1&&xi(d)==="";)d.pop();const p=i.split("/");for(let b=0,v=p.length;b<v;b++){const x=p[b];x===""?b?b===v-1&&d.push(x):d=[x]:x===".."?d.length>1?d.pop():d=[""]:x==="."||d.push(x)}}d.length>1&&(xi(d)===""?s==="never"&&d.pop():s==="always"&&d.push(""));const h=d.join("/"),m=(o?Va(h):h)||"/";return c&&r&&r.set(c,m),m}function P_(t){const i=new Map(t.map(r=>[encodeURIComponent(r),r])),s=new RegExp([...i.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return r=>r.replace(s,o=>i.get(o)??o)}function X_(t){return t==null||t===""}function J_(t,i,s){if(typeof i!="string")return""+(i??void 0);const r=t==="_splat";if(r&&(!i||/^[a-zA-Z0-9\-._~!/]*$/.test(i)))return i;let o=encodeURIComponent(i);return r&&(o=o.replaceAll("%2F","/")),s?s(o):o}function ey(t,i,s,r,o){const c=t.endsWith("/")?"/":"";let d="";for(const h of i){if(typeof h=="string"){d+=h;continue}const[m,p,b,v]=h,x=m===2,S=x&&v!==void 0?v+c:v;let w=s[p];if(!(m===3&&w==null)){if(o&&(o[p]=w,x&&(o["*"]=w)),x&&X_(w)){if(b==="/"&&!S)continue;w=""}d+=b+J_(p,w,r)+(S||"")}}return d+c||"/"}function es(t){return t?.isNotFound===!0}function I_(){try{return sessionStorage}catch{return}}const W_="tsr-scroll-restoration-v1_3",Lv=I_();function e1(){try{return JSON.parse(Lv?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}const Ka=e1(),ty="data-scroll-restoration-id",t1=t=>t.state.__TSR_key||t.href;function n1(t){const i=t.getAttribute(ty);if(i)return`[${ty}="${i}"]`;let s="",r=t,o;for(;o=r.parentNode;){let c=1,d=r;for(;d=d.previousElementSibling;)c++;const h=`${r.localName}:nth-child(${c})`;s=s?`${h} > ${s}`:h,r=o}return s}let Ql=!1;const ao="window";function kf(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function ny(t){const i=new Set;for(const s of t){if(s===ao)continue;const r=kf(s);r&&i.add(r)}return i}function i1(t,i){const s=t.options.scrollRestoration,r=t._scroll;s&&(r.e=!0);const o=t.options.getScrollRestorationKey||t1,c=new Set,d=h=>{const m=Ka[h]||={};for(const p of c)p===document?m[ao]={scrollX,scrollY}:p.isConnected&&(m[n1(p)]={scrollX:p.scrollLeft,scrollY:p.scrollTop})};s&&!r.s&&(r.s=!0,Ql=!1,history.scrollRestoration="manual",document.addEventListener("scroll",h=>{Ql||c.add(h.target)},!0),t.subscribe("onBeforeLoad",h=>{h.fromLocation&&d(o(h.fromLocation)),c.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",d(o(t.stores.resolvedLocation.get()??t.stores.location.get()));try{Lv?.setItem(W_,JSON.stringify(Ka))}catch{}}),addEventListener("pageshow",h=>{h.persisted&&(history.scrollRestoration="manual")})),!r.r&&(r.r=!0,t.subscribe("onRendered",h=>{const m=t.options.scrollRestorationBehavior,p=t.options.scrollToTopSelectors,b=r.n,v=r.h;let x;if(c.clear(),r.n=!0,r.h=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const S=o(h.toLocation),w=h.fromLocation&&o(h.fromLocation);if(r.e&&w&&w!==S){const E=Ka[w];if(E){let j=Ka[S];for(const A in E){if(A===ao){if(b)continue}else{const k=kf(A);if(!k||b&&p&&(x??=ny(p),x.has(k)))continue}j||(j=Ka[S]={}),j[A]??=E[A]}}}Ql=!0;try{const E=h.toLocation.hash,j=h.toLocation.state.__hashScrollIntoViewOptions??!0;let A=!1;if(b){!E&&p&&(x??=ny(p));const k=E&&j&&v,G=r.e?Ka[S]:void 0;if(G)for(const Y in G){const{scrollX:P,scrollY:Z}=G[Y];if(Y===ao){if(k)continue;scrollTo({top:Z,left:P,behavior:m}),A=!0}else{const R=kf(Y);R&&(R.scrollLeft=P,R.scrollTop=Z,x?.delete(R))}}if(!E){const Y={top:0,left:0,behavior:m};if(A||scrollTo(Y),x)for(const P of x)P.scrollTo(Y)}}!A&&E&&j&&document.getElementById(E)?.scrollIntoView(j)}finally{Ql=!1}}))}function a1(t,i=String){let s;for(const r in t){const o=t[r];o!==void 0&&(s||=new URLSearchParams).set(r,i(o))}return s?s.toString():""}function uf(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function s1(t){const i=new URLSearchParams(t),s=Object.create(null);for(const[r,o]of i.entries()){const c=s[r];c==null?s[r]=uf(o):Array.isArray(c)?c.push(uf(o)):s[r]=[c,uf(o)]}return s}const Zv=/^(?:\s|["[{\d-]|fa|nu|tr)/,r1=o1(JSON.parse),l1=u1(JSON.stringify,JSON.parse);function o1(t){const i=t===JSON.parse;return s=>{s[0]==="?"&&(s=s.slice(1));const r=s1(s);for(const o in r){const c=r[o];if(typeof c=="string"){if(i&&!Zv.test(c))continue;try{r[o]=t(c)}catch{}}}return r}}function u1(t,i){const s=i===JSON.parse;function r(o){if(o&&typeof o=="object")try{return t(o)}catch{}else if(i&&typeof o=="string"){if(s&&!Zv.test(o))return o;try{return i(o),t(o)}catch{}}return o}return o=>{const c=a1(o,r);return c?`?${c}`:""}}const Pa="__root__";function c1(t){t.statusCode=t.statusCode||t.code||307;const i=new Headers(t.headers);t.href&&i.get("Location")===null&&i.set("Location",t.href);const s=new Response(null,{status:t.statusCode,headers:i});if(s.options=t,t.throw)throw s;return s}function qv(t){return t instanceof Response&&!!t.options}function po(t){const i=new Map;let s,r;return{get(o){const c=i.get(o);if(c)return c.visited=!0,c.value},set(o,c){const d=i.get(o);if(d){d.value=c;return}if(i.size>=t){let m=s?.next().value;for(;!m||m.visited;)m?m.visited=!1:s=i.values(),m=s.next().value;m===r&&(s=void 0),i.delete(m.key)}const h={key:o,value:c,visited:!1};r=h,i.set(o,h)},clear(){i.clear(),s=void 0,r=void 0}}}const yi=4,Bv=5;function f1(t){const i=t.names;if(i)return i;const s=[];for(const r of t)typeof r!="string"&&s.push(r[1]);return t.names=s}function d1(t,i,s){const r=t.slice(i,s);if(r.charCodeAt(0)===36)return r.length===1?[2,"_splat","",void 0]:[1,r.slice(1),"",""];const o=r.indexOf("{");if(o>=0){const c=r.indexOf("}",o),d=r.charCodeAt(o+1)===45,h=o+(d?3:2);if(c>=0&&r.charCodeAt(h-1)===36&&(!d||h<c)){const m=r.slice(h,c);return[d?3:m?1:2,m||"_splat",r.slice(0,o),t.slice(i+c+1,m?s:t.length)]}}return r}function gr(t,i,s,r,o,c){let d=s;const h=i.fullPath??i.from,m=i.options,p=h.length,b=h.endsWith("/")?p-1:p,v=m?.caseSensitive??t,x=m?.params?.parse??m?.parseParams;let S,w=c?s-1:0;if(!r||h.includes("$")){S=c?.slice()??[];const A=xi(S);A&&typeof A!="string"&&A[0]===2&&(S[S.length-1]=[A[0],A[1],A[2],A[3]===void 0?void 0:A[3]+h.substring(s-(h[s-2]==="/"?2:1),b)],w=p)}for(;d<p;){const A=d,k=h.indexOf("/",A);let G=k===-1?p:k;const Y=d1(h,A,G);d=G+1;let P;if(typeof Y=="string"){if(!r)continue;let Z=Y,R;v?R=r.static??=new Map:(Z=Y.toLowerCase(),R=r.staticInsensitive??=new Map);const I=R.get(Z);if(I)P=I;else{const V=Pi(r);P=V,R.set(Z,V)}}else{const Z=Y[0];let R=Y[2],I=Y[3]??"";if(Z===2&&(G=p,d=G+1),S&&w<G&&(w<A-1&&S.push(h.slice(w,A-1)),Y[2]="/"+R,Z===2&&Y[3]!==void 0&&b<p&&(Y[3]=I.slice(0,-1)),S.push(Y),w=G),!r)continue;const V=v&&!!(R||I);v||(R=R.toLowerCase(),I=I.toLowerCase());const ee=Z===1?r.dynamic??=[]:Z===3?r.optional??=[]:r.wildcard??=[],re=Z!==2&&!x&&ee.find(ie=>!ie.parse&&ie.caseSensitive===V&&ie.prefix===R&&ie.suffix===I);if(re)P=re;else{const ie=Pi(r,Z,V,R,I);P=ie,ee.push(ie),ee.length===2&&o?.push(ee)}}r=P}S&&w<b&&S.push(h.slice(w,b));const E=S?.slice();if(!r)return E;if(x&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const A=Pi(r,Bv);(r.pathless??=[]).push(A),r=A}const j=(i.path||!i.children)&&!i.isRoot;if(j&&b<p){const A=Pi(r,yi);r.index=A,r=A}return r.parse=x??null,r.priority=m?.params?.priority??0,r.route||(r.data=E,j&&(r.route=i)),[r,d,E]}function Hv(t,i){if(t.parse&&!i.parse)return-1;if(!t.parse&&i.parse)return 1;if(t.parse&&i.parse&&(t.priority||i.priority))return i.priority-t.priority;if(t.prefix&&i.prefix&&t.prefix!==i.prefix){if(t.prefix.startsWith(i.prefix))return-1;if(i.prefix.startsWith(t.prefix))return 1}if(t.suffix&&i.suffix&&t.suffix!==i.suffix){if(t.suffix.endsWith(i.suffix))return-1;if(i.suffix.endsWith(t.suffix))return 1}return t.prefix&&!i.prefix?-1:!t.prefix&&i.prefix?1:t.suffix&&!i.suffix?-1:!t.suffix&&i.suffix?1:t.caseSensitive&&!i.caseSensitive?-1:!t.caseSensitive&&i.caseSensitive?1:0}function Pi(t,i=0,s,r,o){return{kind:i,depth:t?t.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:t,parse:null,priority:0,caseSensitive:s,prefix:r,suffix:o}}function h1(t,i){const s=Pi(),r=[];function o(c,d,h,m){const[p,b,v]=gr(!1,c,d,h,r,m);if(c.children)for(const x of c.children)o(x,b,p,v)}for(const c of t)o(c,1,s);for(const c of r)c.sort(Hv);i.masksTree=s,i.flatCache=po(1e3)}function m1(t,i){t||="/";const s=i.flatCache.get(t);if(s!==void 0)return s;const r=rd(t,i.masksTree);return i.flatCache.set(t,r),r}function p1(t,i,s,r,o){t||="/",r||="/";const c=i?`case\0${t}`:t;let d=o.singleCache.get(c);return d||(d=Pi(),gr(i,{from:t},1,d),o.singleCache.set(c,d)),rd(r,d,s)}function g1(t,i,s=!1){const r=s?t:`nofuzz\0${t}`,o=i.matchCache.get(r);if(o!==void 0)return o;t||="/";let c;try{c=rd(t,i.segmentTree,s)}catch(d){if(d instanceof URIError)c=null;else throw d}return c&&(c.branch=Qv(c.route)),i.matchCache.set(r,c),c}function y1(t,i=!1){const s=Pi(),r=[],o={},c={};let d=0;function h(m,p,b,v){if(m.init(d),m.id in o&&sd(),o[m.id]=m,d!==0&&m.path){const E=pn(m.fullPath);(!c[E]||m.fullPath.endsWith("/"))&&(c[E]=m)}d++;const[x,S,w]=gr(i,m,p,b,r,v);if(m._interpolation=w,m.children)for(const E of m.children)h(E,S,x,w)}h(t,1,s);for(const m of r)m.sort(Hv);return{processedTree:{segmentTree:s,singleCache:po(1e3),matchCache:po(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:c}}function rd(t,i,s=!1){const r=t.split("/"),o=b1(t,r,i,s);if(!o)return null;const[c]=$v(t,r,o);return{route:o.node.route,rawParams:c}}function $v(t,i,s){const r=v1(s.node),o=s.node.data&&f1(s.node.data),c=Object.create(null);let d=s.extract?.part??0,h=s.extract?.node??0,m=s.extract?.path??0,p=s.extract?.param??0;for(;h<r.length;d++,h++,m++){const b=r[h];if(b.kind===yi)break;if(b.kind===Bv){d--,m--;continue}const v=i[d],x=m;if(v&&(m+=v.length),b.kind===1||b.kind===3){const S=o[p++];if(b.kind===3&&s.skipped&1<<h){d--,m=x-1;continue}const w=b.suffix||b.prefix?v.substring(b.prefix.length,v.length-b.suffix.length):v;(w||b.kind===1)&&(c[S]=decodeURIComponent(w))}else if(b.kind===2){const S=b,w=t.substring(x+S.prefix.length,t.length-S.suffix.length),E=decodeURIComponent(w);c["*"]=E,c._splat=E;break}}return s.rawParams&&Object.assign(c,s.rawParams),[c,{part:d,node:h,path:m,param:p}]}function Qv(t){const i=[t];for(;t.parentRoute;)t=t.parentRoute,i.push(t);return i.reverse(),i}function v1(t){const i=Array(t.depth+1);do i[t.depth]=t,t=t.parent;while(t);return i}function b1(t,i,s,r){if(t==="/"&&s.index)return{node:s.index,skipped:0};const o=!xi(i),c=o&&t!=="/",d=i.length-(o?1:0),h=[{node:s,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let m=null,p=null;for(;h.length;){const b=h.pop(),{node:v,index:x,skipped:S,statics:w,dynamics:E,optionals:j}=b;let{extract:A,rawParams:k}=b;if(v.kind===2&&v.route&&!Kl(p,b))continue;if(v.parse){if(!iy(t,i,b))continue;k=b.rawParams,A=b.extract}r&&v.route&&v.kind!==yi&&Kl(m,b)&&(m=b);const G=x===d;if(G&&(v.route&&(!c||v.kind===yi||v.kind===2)&&Kl(p,b)&&(p=b),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const Y=G?void 0:i[x];let P;if(G&&v.index){const Z={node:v.index,index:x,skipped:S,statics:w,dynamics:E,optionals:j,extract:A,rawParams:k};let R=!0;if(v.index.parse&&(iy(t,i,Z)||(R=!1)),R){if(!E&&!j&&!S&&x1(w,d))return Z;Kl(p,Z)&&(p=Z)}}if(v.wildcard)for(let Z=v.wildcard.length-1;Z>=0;Z--){const R=v.wildcard[Z],{prefix:I,suffix:V}=R;if(!(I&&(G||!(R.caseSensitive?Y:P??=Y.toLowerCase()).startsWith(I)))){if(V){if(G)continue;const ee=i.slice(x).join("/"),re=ee.slice(-V.length);if((R.caseSensitive?re:re.toLowerCase())!==V||ee.length-V.length<I.length)continue}h.push({node:R,index:d,skipped:S,statics:w,dynamics:E,optionals:j,extract:A,rawParams:k})}}if(v.optional){const Z=S|1<<v.depth+1;for(let R=v.optional.length-1;R>=0;R--){const I=v.optional[R];h.push({node:I,index:x,skipped:Z,statics:w,dynamics:E,optionals:j,extract:A,rawParams:k})}if(!G)for(let R=v.optional.length-1;R>=0;R--){const I=v.optional[R],{prefix:V,suffix:ee}=I;if(V||ee){const re=I.caseSensitive?Y:P??=Y.toLowerCase();if(V&&!re.startsWith(V)||ee&&re.indexOf(ee,re.length-ee.length)<V.length)continue}h.push({node:I,index:x+1,skipped:S,statics:w,dynamics:E,optionals:j+Gl(d,x),extract:A,rawParams:k})}}if(!G&&v.dynamic&&Y)for(let Z=v.dynamic.length-1;Z>=0;Z--){const R=v.dynamic[Z],{prefix:I,suffix:V}=R;if(I||V){const ee=R.caseSensitive?Y:P??=Y.toLowerCase();if(I&&!ee.startsWith(I)||V&&ee.indexOf(V,ee.length-V.length)<I.length)continue}h.push({node:R,index:x+1,skipped:S,statics:w,dynamics:E+Gl(d,x),optionals:j,extract:A,rawParams:k})}if(!G&&v.staticInsensitive){const Z=v.staticInsensitive.get(P??=Y.toLowerCase());Z&&h.push({node:Z,index:x+1,skipped:S,statics:w+Gl(d,x),dynamics:E,optionals:j,extract:A,rawParams:k})}if(!G&&v.static){const Z=v.static.get(Y);Z&&h.push({node:Z,index:x+1,skipped:S,statics:w+Gl(d,x),dynamics:E,optionals:j,extract:A,rawParams:k})}if(v.pathless)for(let Z=v.pathless.length-1;Z>=0;Z--){const R=v.pathless[Z];h.push({node:R,index:x,skipped:S,statics:w,dynamics:E,optionals:j,extract:A,rawParams:k})}}if(p)return p;if(r&&m){let b=m.index;for(let x=0;x<m.index;x++)b+=i[x].length;const v=b===t.length?"/":t.slice(b);return m.rawParams??=Object.create(null),m.rawParams["**"]=decodeURIComponent(v),m}return null}function Gl(t,i){return 2**(t-i-1)}function x1(t,i){return t===2**(i-1)-1}function iy(t,i,s){let r,o;try{[r,o]=$v(t,i,s)}catch{return null}if(s.rawParams=r,s.extract=o,!s.node.parse)return!0;try{if(s.node.parse(r)===!1)return null}catch{}return!0}function Kl(t,i){return t?i.statics>t.statics||i.statics===t.statics&&(i.dynamics>t.dynamics||i.dynamics===t.dynamics&&(i.optionals>t.optionals||i.optionals===t.optionals&&((i.node.kind===yi)>(t.node.kind===yi)||i.node.kind===yi==(t.node.kind===yi)&&i.node.depth>t.node.depth))):!0}function S1(t,i,s){const r=Uv(t),o=`/${r}`,c=i?o:o.toLowerCase(),d=`${c}/`,h={input:({url:m})=>{const p=i?m.pathname:m.pathname.toLowerCase();return p===c?m.pathname="/":p.startsWith(d)&&(m.pathname=m.pathname.slice(o.length)),m},output:({url:m})=>(m.pathname=Va(`/${r}${m.pathname}`),m)};return s?{input:({url:m})=>Uf(s,h.input({url:m})),output:({url:m})=>h.output({url:Gv(s,m)})}:h}function Uf(t,i){const s=t?.input?.({url:i});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return i}function Gv(t,i){const s=t?.output?.({url:i});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return i}function _1(t,i){const{createMutableStore:s,createReadonlyStore:r,batch:o}=i,c=new Map,d=s("idle"),h=s(t),m=s(void 0),p=s([]),b=r(()=>p.get().map(E=>c.get(E).get())),v=r(()=>({status:d.get(),isLoading:d.get()==="pending",matches:b.get(),location:h.get(),resolvedLocation:m.get()}));function x(E){let j=c.get(E);return j||(j=s(void 0),c.set(E,j)),j}const S={status:d,location:h,resolvedLocation:m,ids:p,matches:b,byRoute:c,__store:v,getMatchStore:x,setMatches:w};function w(E){const j=p.get(),A=E.map(k=>k.routeId);o(()=>{V_(j,A)||p.set(A);for(const k of j)A.includes(k)||c.get(k).set(()=>{});for(const k of E){const G=x(k.routeId);G.get()!==k&&G.set(k)}})}return S}var bi="__TSR_index",ay="popstate",sy="beforeunload",w1=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function so(t){const i=w1.exec(t);return i?"/"+t.slice(i[0].length):t}function Kv(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,i=>`
|
|
10
|
-
\r`.includes(i)?"":encodeURIComponent(i))),so(t)}function E1(t){let i=t.getLocation();const s=new Set,r=d=>{i=t.getLocation(),s.forEach(h=>h({location:i,action:d}))},o=d=>{t.notifyOnIndexChange??!0?r(d):i=t.getLocation()},c=async d=>{const h=d.navigateOpts?.ignoreBlocker?void 0:t.getBlockers?.();if(typeof document<"u"&&h?.length&&(d.type==="PUSH"||d.type==="REPLACE"))for(const m of h){const p=go(d.path,d.state);if(await m.blockerFn({currentLocation:i,nextLocation:p,action:d.type})){t.onBlocked?.();return}}d.task()};return{get location(){return i},get length(){return t.getLength()},subscribers:s,subscribe:d=>(s.add(d),()=>{s.delete(d)}),push:(d,h,m)=>{const p=i.state[bi];h=ry(p+1,h),c({task:()=>{t.pushState(d,h),r({type:"PUSH"})},navigateOpts:m,type:"PUSH",path:d,state:h})},replace:(d,h,m)=>{const p=i.state[bi];h=ry(p,h),c({task:()=>{t.replaceState(d,h),r({type:"REPLACE"})},navigateOpts:m,type:"REPLACE",path:d,state:h})},go:(d,h)=>{c({task:()=>{t.go(d,h?.ignoreBlocker??!1),o({type:"GO",index:d})},navigateOpts:h,type:"GO"})},back:d=>{c({task:()=>{t.back(d?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:d,type:"BACK"})},forward:d=>{c({task:()=>{t.forward(d?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:d,type:"FORWARD"})},canGoBack:()=>i.state[bi]!==0,createHref:d=>t.createHref(d),block:d=>{if(!t.setBlockers)return()=>{};const h=t.getBlockers?.()??[];return t.setBlockers([...h,d]),()=>{const m=t.getBlockers?.()??[];t.setBlockers?.(m.filter(p=>p!==d))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r,_getBlockers:()=>t.getBlockers?.()??[]}}function ry(t,i){const s=ld();return{...i,key:s,__TSR_key:s,[bi]:t}}function O1(t){const i=typeof document<"u"?window:void 0,s=i.history.pushState,r=i.history.replaceState;let o=[];const c=()=>o,d=R=>o=R,h=R=>Kv(R),m=(()=>go(`${i.location.pathname}${i.location.search}${i.location.hash}`,i.history.state));if(!i.history.state?.__TSR_key&&!i.history.state?.key){const R=ld();i.history.replaceState({[bi]:0,key:R,__TSR_key:R},"")}let p=m(),b,v=!1,x=!1,S=!1,w=!1;const E=()=>p;let j;const A=()=>{j&&(Z._ignoreSubscribers=!0,(j[2]?i.history.pushState:i.history.replaceState)(j[1],"",j[0]),Z._ignoreSubscribers=!1,j=void 0,b=void 0)},k=(R,I,V)=>{const ee=!!j;ee||(b=p),p=go(I,V),j=[p.href,V,j?.[2]||R],ee||queueMicrotask(()=>A())},G=R=>{p=m(),Z.notify({type:R})},Y=async()=>{if(w=!1,x){x=!1;return}const R=m(),I=R.state[bi]-p.state[bi],V=I===1,ee=I===-1,re=!V&&!ee||v;v=!1;const ie=re?"GO":ee?"BACK":"FORWARD",he=re?{type:"GO",index:I}:{type:ee?"BACK":"FORWARD"};if(S)S=!1;else{const ve=c();if(typeof document<"u"&&ve.length){for(const me of ve)if(await me.blockerFn({currentLocation:p,nextLocation:R,action:ie})){x=!0,i.history.go(-I),Z.notify(he);return}}}p=m(),Z.notify(he)},P=R=>{if(w){w=!1;return}let I=!1;const V=c();if(typeof document<"u"&&V.length)for(const ee of V){const re=ee.enableBeforeUnload??!0;if(re===!0){I=!0;break}if(typeof re=="function"&&re()===!0){I=!0;break}}if(I)return R.preventDefault(),R.returnValue=""},Z=E1({getLocation:E,getLength:()=>i.history.length,pushState:(R,I)=>k(!0,R,I),replaceState:(R,I)=>k(!1,R,I),back:R=>(R&&(S=!0,w=!0),i.history.back()),forward:R=>{R&&(S=!0,w=!0),i.history.forward()},go:(R,I)=>{v=!0,I&&(S=!0,w=!0),i.history.go(R)},createHref:h,flush:A,destroy:()=>{i.history.pushState=s,i.history.replaceState=r,i.removeEventListener(sy,P,{capture:!0}),i.removeEventListener(ay,Y)},onBlocked:()=>{b&&p!==b&&(p=b)},getBlockers:c,setBlockers:d,notifyOnIndexChange:!1});return Z._ignoreNextBeforeUnload=R=>{w=!1;try{R=new URL(R,i.document.baseURI).href,w=/^https?:/.test(R)&&(!R.includes("#")||R.split("#")[0]!==i.location.href.split("#")[0])}catch{}},i.addEventListener(sy,P,{capture:!0}),i.addEventListener(ay,Y),i.history.pushState=function(...R){const I=s.apply(i.history,R);return Z._ignoreSubscribers||G("PUSH"),I},i.history.replaceState=function(...R){const I=r.apply(i.history,R);return Z._ignoreSubscribers||G("REPLACE"),I},Z}function go(t,i){const s=Kv(t),r=s.indexOf("#"),o=s.indexOf("?");if(!i){const c=ld();i={[bi]:0,key:c,__TSR_key:c}}return{href:s,pathname:s.slice(0,r>-1?o>-1?Math.min(r,o):r:o>-1?o:s.length),hash:r>-1?s.slice(r):"",search:o>-1?s.slice(o,r===-1?void 0:r):"",state:i}}function ld(){return(Math.random()+1).toString(36).slice(7)}function cf(t,i){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==i||!!t.username||!!t.password}function ff(t){return t.pathname+t.search+t.hash}function ly(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}function To(t,i){return{fromLocation:i,toLocation:t,pathChanged:i?.pathname!==t.pathname,hrefChanged:i?.href!==t.href,hashChanged:i?.hash!==t.hash}}function oy({key:t,__TSR_key:i,__TSR_index:s,__hashScrollIntoViewOptions:r,...o}){return o}function z1(t){return t.findIndex(i=>i.status==="error"||i.status==="notFound"||i._notFound)+1}function j1(t,i,s,r,o,c){r&&(i=i.slice(0,r)),o&&(s=s.slice(0,o));for(const d of i){if(c&&t._tx!==c)return;s.some(h=>h.routeId===d.routeId)||t.routesById[d.routeId].options.onLeave?.(d)}for(const d of s){if(c&&t._tx!==c)return;t.routesById[d.routeId].options[i.some(h=>h.routeId===d.routeId)?"onStay":"onEnter"]?.(d)}}var T1=class{constructor(t,i){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async s=>(s(),!1),this.update=s=>{const r=this.options;this.options={...r,...s},this.isServer=this.options.isServer??Xg??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=O1()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const o=this.options.basepath??"/",c=this.options.rewrite,d=this.basepath!==o||r?.rewrite!==c||r?.caseSensitive!==this.options.caseSensitive;if(d&&(this.basepath=o,this.rewrite=o!=="/"&&Uv(o)?S1(o,this.options.caseSensitive,c):c),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||Xg){this.routeTree=this.options.routeTree;let h;h=this.buildRouteTree(),this.setRoutes(h)}if(this.stores)d&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=_1(this.latestLocation,h),i1(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=y1(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&h1(this.options.routeMasks,s.processedTree),{...s,resolvePathCache:po(1e3)}},this.subscribe=(s,r)=>{const o={eventType:s,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=s=>{for(const r of this.subscribers)if(r.eventType===s.type)try{r.fn(s)}catch(o){console.error(o)}},this.parseLocation=(s,r)=>{const o=({pathname:m,search:p,hash:b,href:v},x)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(m)){const j=this.options.parseSearch(p),A=this.options.stringifySearch(j);return{href:m+A+b,publicHref:m+A+b,pathname:sr(m),external:!1,searchStr:A,search:Ga(r?.search,j),hash:sr(b.slice(1)),state:vi(r?.state,x)}}const S=Uf(this.rewrite,new URL(v,this.origin)),w=this.options.parseSearch(S.search),E=this.options.stringifySearch(w);return S.search=E,{href:S.href.replace(S.origin,""),publicHref:v,pathname:sr(so(S.pathname)),external:!!this.rewrite&&cf(S,this.origin),searchStr:E,search:Ga(r?.search,w),hash:sr(S.hash.slice(1)),state:vi(r?.state,x)}},c=o(s,s.state),{__tempLocation:d,__tempKey:h}=c.state;if(d&&(!h||h===this.tempLocationKey)){const m=o(d,{...d.state,__tempLocation:void 0,key:c.state.key,__TSR_key:c.state.__TSR_key});return m.maskedLocation=c,m}return c},this.matchRoutes=(s,r,o)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:r},o):this.matchRoutesInternal(s,r),this.getMatchedRoutes=s=>{const r=Object.create(null),o=g1(pn(s),this.processedTree,!0);return o&&Object.assign(r,o.rawParams),[o?.branch||[this.routesById.__root__],r,o?.route]},this.buildLocation=s=>{{const d=this.staticLocations.get(s);if(d)return d}let r=!1;const o=(d={})=>{if(d.href){const ve=go(d.href,{});d={...d,to:Uf(this.rewrite,new URL(ve.pathname,this.origin)).pathname,search:this.options.parseSearch(ve.search),hash:ve.hash.slice(1)}}const h=s._fromLocation||this._pendingLocation||this.latestLocation;let m;const p=()=>(r=!0,h),b=()=>m??=this.matchRoutesLightweight(p()),v=d.to?`${d.to}`:".",x=Wg(v[0]==="/"?"":d.unsafeRelative==="path"?p().pathname:d.from??b()[1],v,this.options.trailingSlash,this.resolvePathCache),S=this.routesByPath[pn(x)],w=x.includes("$");let E;if(S)E=S._branch??=Qv(S);else if(w)E=[];else{const[ve,me,U]=this.getMatchedRoutes(x);E=ve,this.options.notFoundRoute&&(!U||U.path!=="/"&&me["**"])&&(E=[...E,this.options.notFoundRoute])}const j=w?S?._interpolation??gr(!1,{fullPath:x},0):void 0;let A;for(const ve of E){const me=ve.options.params?.stringify??ve.options.stringifyParams;if(me){const U=b()[3];if(A??=df(d.params,U),!Cv(A))break;A===U&&(A=Object.assign(io(),A));try{Object.assign(A,me(A))}catch{}}}A??=df(d.params,A1(d.params,j)?b()[3]:hf);const k=s.leaveParams?x:so(sr(j?ey(x,j,A,this.pathParamsDecoder):x)),G=R1(E,s._includeValidateSearch),Y=()=>{let ve=b()[2];if(s._includeValidateSearch&&this.options.search?.strict){const me={};E.forEach(U=>{if(U.options.validateSearch)try{Object.assign(me,ro(U.options.validateSearch,{...me,...ve}))}catch{}}),ve=me}return ve},P=G.length?C1(G,Y(),d):d.search===!0?Y():typeof d.search=="function"?d.search(Y()):d.search||hf,Z=this.options.stringifySearch(P),R=d.hash===!0?p().hash:typeof d.hash=="function"?d.hash(p().hash):d.hash||void 0,I=R?`#${R}`:"",V=d.state?d.state===!0?p().state:typeof d.state=="function"?d.state(p().state):d.state:hf,ee=`${k}${Z}${I}`;let re,ie,he=!1;if(this.rewrite){const ve=new URL(ee,this.origin),me=ve.origin,U=Gv(this.rewrite,ve);re=ff(ve),cf(U,me)?(ie=U.href,he=!0):ie=so(ff(U))}else re=F_(ee),ie=re;return{publicHref:ie,href:re,pathname:k,search:P,searchStr:Z,state:V,hash:R??"",external:he,unmaskOnReload:d.unmaskOnReload}},c=o(s);if(s.mask)c.maskedLocation=o({from:s.from,...s.mask});else if(this.options.routeMasks){const d=m1(c.pathname,this.processedTree);if(d){const h=Object.assign(io(),d.rawParams),{from:m,params:p,...b}=d.route,v=df(p,h);c.maskedLocation=o({from:s.from,...b,params:v})}}return!r&&s._fromLocation&&this.staticLocations.set(s,c),c},this.commitLocation=async({viewTransition:s,ignoreBlocker:r,...o})=>{const c=o.maskedLocation??o;if(c.external)return uy(this,c.publicHref,{replace:o.replace,ignoreBlocker:r});let d;const h=pn(this.latestLocation.href)===pn(o.href)&&Bn(oy(o.state),oy(this.latestLocation.state)),m=this._commitPromise;let p;const b=new Promise(v=>{p=v});if(b.resolve=()=>{p(),m?.resolve()},this._commitPromise=b,h)this.load();else{let{maskedLocation:v,hashScrollIntoView:x,...S}=o;v&&(S={...v,state:{...v.state,__tempKey:void 0,__tempLocation:{...S,search:S.searchStr,state:{...S.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(S.unmaskOnReload??this.options.unmaskOnReload??!1)&&(S.state.__tempKey=this.tempLocationKey)),S.state={...S.state,__hashScrollIntoViewOptions:x??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=s,d=o.replace?"REPLACE":"PUSH",this.history[d==="REPLACE"?"replace":"push"](S.publicHref,S.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:d}})}return this._scroll.n=o.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:s,resetScroll:r,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:d,...h}={})=>{const m=this.buildLocation({...h,_includeValidateSearch:!0});this._pendingLocation=m;const p=this.commitLocation({...m,viewTransition:c,replace:s,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:d});return queueMicrotask(()=>{this._pendingLocation===m&&(this._pendingLocation=void 0)}),p},this.navigate=async({to:s,reloadDocument:r,href:o,publicHref:c,...d})=>{const h=o?pr(o):void 0;if(h||r){if(s!==void 0||!o){const p=this.buildLocation({to:s,...d}),b=p.maskedLocation??p;o??=b.publicHref,c??=b.publicHref}return uy(this,!h&&c?c:o,d)}return this.buildAndCommitLocation({...d,href:o,to:s,_isNavigate:!0})},this.load=async s=>{this.updateLatestLocation(),s?.action&&(this._scroll.h=s.action.type==="PUSH"||s.action.type==="REPLACE"),await $1(this,s)},this.startViewTransition=s=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const c=this.latestLocation,d=this.stores.resolvedLocation.get(),h=typeof r.types=="function"?r.types(To(c,d)):r.types;if(h===!1)return s();o={update:s,types:h}}else o=s;return document.startViewTransition(o).updateCallbackDone}return s()},this.invalidate=s=>{const r=this._committed,o=s?.filter,c=this._preloads,d=new Set,h=b=>{(!o||o(b))&&d.add(b.id)};r.forEach(h),this._cache.forEach(h),c?.forEach(b=>b.forEach(h)),this._tx?.[3].forEach(h);const m=[];for(const[b,v]of c??[])v.some(x=>d.has(x.id))&&(c.delete(b),m.push(b));const p=b=>{if(d.has(b.id)){const v=this.routesById[b.routeId],x={...b,invalid:!0,...(s?.forcePending||b.status==="error"||b.status==="notFound")&&ly(v)?{status:"pending",error:void 0}:void 0};return b._flight=void 0,x}return b};this._committed=r.map(p);for(const[b,v]of this._cache)d.has(b)&&(v.invalid=!0,s?.forcePending&&(v.status="pending"));for(const b of d){const v=this._flights?.get(b);this._flights?.delete(b),v&&!v[2]&&m.push(v[1])}for(const b of m)b.abort();return this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.resolveRedirect=s=>{const r=s.options;let o=s.headers.get("Location")||r.href;if(!o){const d=this.buildLocation(r);o=(d.maskedLocation??d).publicHref||"/"}let c;if(Mv.test(o)||(c=pr(o))&&!this.protocolAllowlist.has(c))throw new Error("Redirect blocked: unsafe protocol");if(c==="http:"||c==="https:"){const d=new URL(o);d.pathname.startsWith("//")?o=d.href:cf(d,this.origin)||(o=ff(d),c=void 0)}return c&&(r.reloadDocument=!0),r.href=o,s.headers.set("Location",o),s},this.clearCache=s=>{const r=this._cache,o=this._preloads,c=s?.filter,d=[],h=[];for(const[p,b]of r)(!c||c(b))&&(h.push(p),d.push(b));const m=[];for(const[p,b]of o??[])(!c||b.some(c))&&(m.push(p),d.push(...b));for(const p of h)r.delete(p);for(const p of m)o.delete(p);for(const p of d){const b=p._flight;p._flight=void 0,b&&!--b[2]&&(this._flights?.get(p.id)===b&&this._flights.delete(p.id),m.push(b[1]))}for(const p of m)p.abort()},this.loadRouteChunk=Xa,this.preloadRoute=s=>Q1(this,s),this.matchRoute=(s,r)=>{const o={...s,to:s.to?Wg(s.from||"",s.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:s.params||{},leaveParams:!0},c=this.buildLocation(o),d=this.stores.status.get()==="pending";if(r?.pending&&!d)return!1;const h=r?.pending??!d?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),m=p1(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,h.pathname,this.processedTree);return!m||s.params&&!Bn(m.rawParams,s.params,!0)?!1:r?.includeSearch??!0?Bn(h.search,c.search,!0)?m.rawParams:!1:m.rawParams},this.getStoreConfig=i,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=P_(t.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??l1,parseSearch:t.parseSearch??r1,protocolAllowlist:t.protocolAllowlist??Y_}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(t){Object.assign(this,t),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const i=this.options.notFoundRoute;i&&(i.init(99999999999),this.routesById[i.id]!==i&&(i._interpolation=gr(!1,i,0)),this.routesById[i.id]=i)}matchRoutesInternal(t,i){const[s,r,o]=this.getMatchedRoutes(t.pathname);let c=s,d=!1;(o?o.path!=="/"&&r["**"]:pn(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const h=d?M1(this.options.notFoundMode,c):void 0,m=new Array(c.length),p=this._committed,b=(x,S)=>{const w=p[S];return w?.routeId===x.id?w:x===this.options.notFoundRoute?p.find(E=>E.routeId===x.id):void 0};let v;for(let x=0;x<c.length;x++){const S=c[x],w=m[x-1];let E,j,A;{const he=w?.search??t.search,ve=w?._strictSearch??void 0;try{const me=ro(S.options.validateSearch,{...he})??void 0;E={...he,...me},j={...ve,...me}}catch(me){let U=me;if(me instanceof yo||(U=new yo(me.message,{cause:me})),i?.throwOnError)throw U;E=he,j={},A=U}}let k="",G="";try{k=S.options.loaderDeps?.({search:E})??"",G=k&&JSON.stringify(k)||""}catch(he){if(i?.throwOnError)throw he;A??=he}const Y=io(),P=S._interpolation?ey(S.fullPath,S._interpolation,r,this.pathParamsDecoder,Y):S.fullPath,Z=S.id+P+G,R=b(S,x),I=this._cache.get(Z)??(R?.id===Z?R:void 0);v=I?._strictParams??Object.assign(Y,v);let V;if(!I)try{cy(S,v)}catch(he){if(es(he)||qv(he)?V=he:V=new N1(he.message,{cause:he}),i?.throwOnError)throw V}const ee=R?"stay":"enter";let re;if(I)re={...I,cause:ee,search:Ga(R?R.search:I.search,E),_strictSearch:j,searchError:A};else{const he=ly(S)?"pending":"success";re={id:Z,ssr:S.options.ssr,index:x,routeId:S.id,params:R?.params??v,_strictParams:v,pathname:P,updatedAt:Date.now(),search:R?Ga(R.search,E):E,_strictSearch:j,searchError:A,status:he,isFetching:!1,error:void 0,paramsError:V,context:{},abortController:i?._controller??new AbortController,cause:ee,loaderDeps:R?vi(R.loaderDeps,k):k,invalid:!1,preload:!1,staticData:S.options.staticData||{},fullPath:S.fullPath}}const ie=h===S.id;re._notFound&&!ie&&(re.error=void 0),re._notFound=ie,m[x]=re}for(let x=0;x<m.length;x++){const S=m[x];S.params=S.cause==="stay"?Ga(S.params,v):v,i?._controller&&(S.context={})}return m}matchRoutesLightweight(t){const i=xi(this.stores.ids.get()),s=i?this.stores.byRoute.get(i).get():void 0,r=s?.id,o=this.lightweightCache.get(t);if(o&&o[0]===r)return o[1];const[c,d]=this.getMatchedRoutes(t.pathname),h=xi(c),m={...t.search};for(const x of c)try{Object.assign(m,ro(x.options.validateSearch,m))}catch{}const p=s&&s.routeId===h.id&&s.pathname===t.pathname;let b;if(p)b=s.params;else{const x=d;for(const S of c)try{cy(S,x)}catch{}b=x}const v=[c,h.fullPath,m,b];return this.lightweightCache.set(t,[r,v]),v}};async function uy(t,i,{replace:s,ignoreBlocker:r}){if(!Dv(i,t.protocolAllowlist)){if(!r){const o=t.history._getBlockers();for(const c of o)if(c?.blockerFn&&await c.blockerFn({currentLocation:t.history.location,nextLocation:t.history.location,action:s?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(i),s?window.location.replace(i):window.location.href=i}}var yo=class extends Error{},N1=class extends Error{};function ro(t,i){if(t==null)return{};if("~standard"in t){const s=t["~standard"].validate(i);if(s instanceof Promise)throw new yo("Async validation not supported");if(s.issues)throw new yo(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in t?t.parse(i):typeof t=="function"?t(i):{}}function df(t,i){if(t===void 0||t===!0)return i;const s=Object.create(null);return t===!1||t===null?s:typeof t=="function"?(Object.assign(s,i),Object.assign(s,t(s))):Object.assign(s,i,t)}function A1(t,i){return typeof t=="function"?!0:!i||t===!1||t===null?!1:t===void 0||t===!0||i.some(s=>typeof s!="string"&&!ad.call(t,s[1]))}const hf=Object.freeze({});function R1(t,i){const s=[];for(let r=0;r<t.length;r++){const o=t[r].options;if("search"in o)o.search?.middlewares&&s.push(...o.search.middlewares);else if(o.preSearchFilters||o.postSearchFilters){const d=({search:h,next:m})=>{const p=m(o.preSearchFilters?o.preSearchFilters.reduce((b,v)=>v(b),h):h);return o.postSearchFilters?o.postSearchFilters.reduce((b,v)=>v(b),p):p};s.push(d)}const c=o.validateSearch;if(i&&c){const d=({search:h,next:m,meta:p})=>{const b=m(h);try{const v=ro(c,b);if(p&&v)for(const x in v)x in b||(p.defaulted||=new Map).set(x,v[x]);return{...b,...v}}catch{}return b};s.push(d)}}return s}function C1(t,i,s){const r=(o,c,d)=>{if(o>=t.length){if(!s.search)return{};if(s.search===!0)return c;const m=Rv(s.search,c);return d&&(d.explicit=m),m}const h=(m,p)=>{if(p){const b=d||{};return{search:r(o+1,m,b),meta:b}}return r(o+1,m,d)};return t[o]({search:c,next:h,meta:d})};return r(0,i)}function M1(t,i){if(t!=="root"){let s;for(let r=i.length-1;r>=0;r--){const o=i[r];if(o.options.notFoundComponent)return o.id;s||=o.children&&o.id}if(s)return s}return Pa}function cy(t,i){const s=t.options.params?.parse??t.options.parseParams;s&&Object.assign(i,s(i))}function Lf(t,i){return t.options[i]?.preload?.()}function D1(t,i){const s=Lf(t,"component");let r=Lf(t,"pendingComponent");return i&&(r?r=r.then(i):i()),s&&r?Promise.all([s,r]).then(()=>{}):s??r}function Xa(t,i,s){const r=()=>i===!1?void 0:i?Lf(t,i):D1(t,s),o=t._lazy;if(o)return o===!0?r():o.then(r);if(!t.lazyFn)return r();const c=t.lazyFn().then(d=>{{const{id:h,...m}=d.options;Object.assign(t.options,m),t._lazy=!0}},d=>{throw t._lazy=void 0,d});return t._lazy=c,c.then(r)}function od(t){const i=t.findIndex(s=>s.status!=="success"||s._notFound)+1;return i&&i<t.length?t.slice(0,i):t}function k1(t,i,s){const r=t._tx;return i&&r?.[2]===s&&!r[3].some(o=>o.routeId===i)}const gn=0,Hn=1,No=2,bt=3,Si=[4];function yr(t){return typeof t[0]=="number"}function na(t,i){return i.aborted?Promise.race([Promise.reject(i),t]):new Promise((s,r)=>{const o=()=>r(i);i.addEventListener("abort",o,{once:!0}),Promise.resolve(t).then(s,r).then(()=>i.removeEventListener("abort",o))})}function ia(t,i){return t.routesById[i.routeId]}function vr(t,i,s){return qv(t)?[bt,t]:es(t)?(t.routeId||=s,[No,t]):i?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[Hn,t]):[gn,t]}function ud(t,i){let s=vr(i,!0,t.id);if(s[0]!==Hn)return s;try{t.options.onError?.(s[1])}catch(r){s=vr(r,!0,t.id)}return s}function dr(t,i,s,r,o){return o[0].signal.aborted?Si:dd(t,i,s,ud(s,r),o)}async function U1(t,i,s,r,o,c){const[d,h]=i,m=s[0].signal,p=!!s[3];for(let b=s[6]??0;b<r;b++){const v=h[b],x=ia(t,v);v.abortController=s[0];const S=h[b-1]?.context??t.options.context??{},w={params:v.params,location:d,navigate:k=>t.navigate({...k,_fromLocation:d}),buildLocation:t.buildLocation,cause:p?"preload":v.cause,abortController:s[0],preload:p,matches:h,routeId:x.id};try{const k=v._ctx||=x.options.context?x.options.context({...w,deps:v.loaderDeps,context:S})||{}:void 0;v.context={...S,...k}}catch(k){return Ln(t,v),[b,dr(t,i,x,k,s)]}if(m.aborted)return[b,Si];const E=v.paramsError??v.searchError;if(E!==void 0)return Ln(t,v),[b,dr(t,i,x,E,s)];const j=x.options.beforeLoad;if(!j)continue;const A=v.status;b>=c&&(v.status="pending",s[7]?.());try{br(t,v,"beforeLoad",s[0]);const k=j({...w,search:v.search,context:v.context,...t.options.additionalContext}),G=await(typeof k?.then=="function"?na(k,m):k);if(m.aborted)return[b,Si];const Y=dd(t,i,x,vr(G,!1,x.id),s);if(Y[0]!==gn)return Ln(t,v),[b,Y];v.context={...v.context,...G}}catch(k){return Ln(t,v),[b,dr(t,i,x,k,s)]}finally{v.status=A,br(t,v,!1,s[0])}}o()}function cd(t,i,s){if(!(!s||--s[2])){if(t._flights?.get(i.id)===s){const r=t._tx;if(r&&!r[0].signal.aborted&&!r[3].includes(i)&&r[3].some(o=>o.id===i.id)&&r[3].some(o=>o.isFetching==="beforeLoad"))return;t._flights.delete(i.id)}return s[1]}}function Ln(t,i){const s=i._flight;i._flight=void 0,cd(t,i,s)?.abort()}function Nt(t,i,s,r){const o=[];for(const c of i)if(!s?.includes(c)){const d=c._flight;if(c._flight=void 0,r&&d?.[2]===1&&t._flights?.get(c.id)===d&&s?.some(h=>h.id===c.id))d[2]=0;else{const h=cd(t,c,d);h&&o.push(h)}}for(const c of o)c.abort()}function fd(t){for(const i of t){const s=i._flight;s&&s[2]++}}function br(t,i,s,r){if(i.isFetching=s,r&&t._tx?.[0]!==r)return;const o=t.stores.byRoute.get(i.routeId),c=o?.get();c?.id===i.id&&o.set({...c,isFetching:s})}function Yv(t,i,s,r,o,c,d){const h=i[0];return{params:s.params,location:h,navigate:m=>t.navigate({...m,_fromLocation:h}),cause:d?"preload":s.cause,abortController:o,preload:d,deps:s.loaderDeps,parentMatchPromise:c,context:s.context,route:r,...t.options.additionalContext}}async function fy(t,i,s,r,o,c,d){const h=d[0],m=h.signal;if(m.aborted)return Si;if(!o)return[gn,void 0];let p=s._flight;br(t,s,"loader",h);try{if(!p){const b=new AbortController;p=[Promise.resolve().then(()=>o(Yv(t,i,s,r,b,c,!!d[3]))).then(v=>vr(v,!1,r.id),v=>vr(v,!0,r.id)).then(v=>(v[0]!==gn&&t._flights?.get(s.id)===p&&(t._flights.delete(s.id),p[2]||b.abort()),v[0]===Hn&&p[2]?ud(r,v[1]):v)),b,1],(t._flights??=new Map).set(s.id,p)}return s._flight=p,s.abortController=p[1],dd(t,i,r,await na(p[0],m),d)}catch(b){if(b!==m||!m.aborted)throw b;return Ln(t,s),Si}finally{br(t,s,!1,h)}}function dy(t,i,s){i[0]!==bt&&(t.status="success",t.error=void 0,i[0]===gn?(t.loaderData=i[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=s):t.invalid=!0)}function L1(t,i,s){const r=t._cache.get(i.id);if(r!==s||t._committed.some(c=>c.id===i.id&&c._flight===i._flight))return;const o={...i,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,t._cache.set(i.id,o),r&&Ln(t,r)}function hy(t,i){return i[0]===Hn||i[0]===No?{...t,status:i[0]===Hn?"error":"notFound",error:i[1],_flight:void 0}:t}function Z1(t,i,s,r,o,c,d){const h=i[1][s],m=ia(t,h),p=!!c[3],b=t._cache.get(h.id);let v,x=!1,S;try{if(h.status==="success"&&(v=m.options.shouldReload,typeof v=="function"&&(v=v(Yv(t,i,h,m,c[0],o,p))),c[0].signal.aborted&&(S=Si)),!S)if(h.status!=="success")x=!0;else{const ie=p||h.preload?m.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:m.options.staleTime??t.options.defaultStaleTime??0;x=!!(h.invalid||v||v===void 0&&Date.now()-h.updatedAt>=ie&&(c[5]||h.cause==="enter"||c[2].some(he=>he.routeId===h.routeId&&he.id!==h.id)))}}catch(ie){h.invalid=!0,Ln(t,h),S=dr(t,i,m,ie,c)}const w=m.options.loader,E=typeof w=="function",j=E?w:w?.handler,A=!p||m.options.preload!==!1;let k=A&&w?t._flights?.get(h.id):void 0;k===h._flight||S?k=void 0:k&&!x&&!p&&v===void 0?x=!0:x||(k=void 0);const G=!!(w&&x&&h.status==="success"&&!p&&!c[4]&&((E?void 0:w.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),Y=x&&A,P=Y&&!G&&(h.status!=="success"||!!w),Z=s>=d?c[7]:void 0,R=m.lazyFn&&m._lazy!==!0?Z:void 0;if(Y&&!w&&(h.invalid=!1,h.updatedAt=Date.now()),k&&k[2]++,P){const ie=h._flight;h._flight=k,cd(t,h,ie)?.abort(),s>=d&&(h.status="pending"),Z?.()}Y||(h.isFetching=!1);const I=!S&&P?fy(t,i,h,m,j,o,c).then(ie=>(dy(h,ie,p),ie[0]===gn&&(w&&!c[0].signal.aborted&&L1(t,h,b),s>=d&&(h.status="pending")),ie)):Promise.resolve(S??[gn,h.loaderData]),V=(async()=>{try{const he=Xa(m,void 0,R);he&&await na(he,c[0].signal)}catch(he){if(!i[1].some((ve,me)=>me<=s&&(ve.status==="error"||ve.status==="notFound"||ve._notFound)))return[s,dr(t,i,m,he,c)]}const ie=await I;P&&ie[0]===gn&&h.status==="pending"&&!c[0].signal.aborted&&(h.status="success",Z?.())})();if(r.push([s,I,V]),!G)return I.then(ie=>hy(h,ie));const ee={...h,status:"pending",preload:!1,_flight:k};h.invalid=!1,h.isFetching="loader";const re=fy(t,i,ee,m,j,o,c).then(ie=>(h.isFetching=!1,dy(ee,ie,!1),ie));return(i[2]??=[]).push([s,re,V,ee]),re.then(ie=>hy(ee,ie))}async function Zf(t,i,s,r,o=0){const c=s?.[1][1];let d=c?.routeId?i.findIndex(h=>h.routeId===c.routeId):s?.[0]??i.length-1;d<0&&(d=0);for(let h=d;h>=0;h--){const m=ia(t,i[h]);try{const p=Xa(m,!1);p&&await na(p,r)}catch(p){if(p===r&&r.aborted)throw p}if(m.options.notFoundComponent)return h}return c?.routeId?d:o}function Xi(t,i){i[2]&&(Nt(t,i[2].map(s=>s[3])),i[2]=void 0)}async function my(t,i,s,r){let o;try{await Promise.all(t.map(c=>c[1].then(async d=>{const h=c[0];if(!(r&&h>=await r)){if(d[0]>=bt)throw[h,d];!o&&d[0]!==gn&&(o=[h,d],await Promise.all((s??[]).map(m=>{if(!(m[0]<=h))return m[1].then(p=>{if(p[0]===bt)throw[m[0],p]})})))}})))}catch(c){return c}return i??o}function dd(t,i,s,r,o,c){for(;r[0]===bt;){const d=r[1],h=d.options;try{if((h.href||d.headers.has("Location"))&&(t.resolveRedirect(d),h.reloadDocument)||(h.reloadDocument?o[3]:o[1]>=20))return r;const m=t.buildLocation({...h,_fromLocation:i[0],_includeValidateSearch:!0}),p=m.maskedLocation??m;if(p.external){const b=d.clone();return b.options={...h},b.headers.set("Location",p.publicHref),t.resolveRedirect(b),o[3]?[bt,b]:[bt,b,p]}return[bt,d,m]}catch(m){r=c?[Hn,m]:ud(s,m),c=!0}}return r}async function Fv(t,i,s,r,o,c){const d=i[1];let h=await o,m=!1;const p=d.findIndex(S=>S._notFound),b=S=>S[1][0]===No?Zf(t,d,S,r.signal):S[0];let v=p<0?d.length:p;if((h?.[1][0]??0)>=bt)v=0;else if(h){v=h[2]??=await b(h);for(const S of s){if(S[0]>=v)break;const w=await S[1];if(w[0]!==gn&&w[0]<bt&&!("loaderData"in d[S[0]])){h=[S[0],w],v=h[2]=await b(h);break}}}for(const S of s){if(S[0]>=v)break;const w=await S[2];if(w){h=w;break}}if((h?.[1][0]??0)>=bt){const S=h[1];if(S[0]!==bt||S[1].options.reloadDocument||S[2])return Xi(t,i),S;m=!0,h=[0,[Hn,new Error("Too many redirects")]]}const x=h?h[2]??await b(h):p;if(x>=0){const S=h?.[1],w=S?.[0],E=d[x],j=S?.[1],A=()=>{S&&(E._notFound=void 0,w===Hn?E.status="error":(j.routeId=E.routeId,E.routeId===t.routeTree.id?(E.status="success",E._notFound=!0):E.status="notFound"),E.error=j,E.isFetching=!1)};A(),S||c?.();const k=ia(t,E);try{await na(S?Promise.resolve().then(()=>Xa(k,w===Hn?"errorComponent":"notFoundComponent")):Promise.all([Xa(k),Xa(k,"notFoundComponent")]),r.signal)}catch(G){if(G===r.signal&&r.signal.aborted)return Xi(t,i),Si}S?m&&(r.abort(),await Promise.all([...s.map(G=>G[1]),...s.map(G=>G[2]),...(i[2]??[]).map(G=>G[1])]),Xi(t,i),Nt(t,d),A()):E.status="success"}return i}async function Vv(t,i,s,r=0,o=i[1].length){const c=i[1];for(let d=r;d<o;d++){const h=c[d],m=ia(t,h).options;if(m.head||m.scripts)try{const p={ssr:t.options.ssr,matches:c,match:h,params:h.params,loaderData:h.loaderData},[b,v]=await na(Promise.all([m.head?.(p),m.scripts?.(p)]),s);h.meta=b?.meta,h.links=b?.links,h.headScripts=b?.scripts,h.styles=b?.styles,h.scripts=v}catch(p){if(p===s&&s.aborted)break;console.error(p)}if(h.status!=="success"||h._notFound)break}return i}async function Pv(t,i,s,r){const o=[i,s],c=r[0].signal;let d;try{const h=t.stores.matches.get();let m=s.findIndex(A=>A._notFound);if(t.options.notFoundMode!=="root"&&m>=0){const A=await Zf(t,s,void 0,c,m);s[m]._notFound=void 0,s[A]._notFound=!0,m=A}let p=m<0?s.length:m+1,b=0;for(;b<p&&b!==m;){const A=s[b],k=r[2][b],G=h[b];if(k?.id!==A.id||k.status!=="success"||A.preload||G?.id!==A.id||G.status!=="success"||(b++,k._notFound||G._notFound))break}const v=[],x=r[6]??0;let S=x?Promise.resolve(s[x-1]):void 0;const w=()=>{for(let A=x;A<p&&!c.aborted;A++)S=Z1(t,o,A,v,S,r,b)},E=await U1(t,o,r,p,w,b);if(E){if(r[4]=!0,p=E[0],E[1][0]===No){const A=await Zf(t,s,E,c);E[2]=A,p=Math.min(p,A+1)}else E[1][0]>=bt&&(p=0);w()}if(!c.aborted&&!r[3]){const A=[];for(const[k,G]of t._flights??[])G[2]||(t._flights.delete(k),A.push(G[1]));for(const k of A)k.abort()}const j=Fv(t,o,v,r[0],my(v,E,o[2]),r[7]);o[2]?.length&&(o[3]=my(o[2],void 0,void 0,j.then(A=>yr(A)?0:od(s).length,()=>0))),d=await j}catch(h){if(Xi(t,o),h===c&&c.aborted)return Si;throw h}return yr(d)?d:Vv(t,d,c,r[6]===s.length?r[6]:0)}function qf(t,i){if(t._tx!==i)return;const s=i[3],r=t.stores.matches.get();let o=t._pending;for(let c=0;c<s.length;c++){const d=s[c],h=d.status==="success"&&!d._notFound,m=r[c]?.id===d.id&&r[c]?.status==="pending";if(h&&!m)continue;const p=ia(t,d),b=h||d.invalid?0:p.options.pendingMs??t.options.defaultPendingMs,v=p.options.pendingComponent??t.options.defaultPendingComponent;if(!v||typeof b!="number"||b===1/0){o&&(o[0]=i,o[2]=0,o[4]=!0);return}const x=p.options.pendingMinMs??t.options.defaultPendingMinMs??0;let S=!1;if(o?.[1]===d.id?(S=o[0]!==i,o[0]=i):(clearTimeout(o?.[3]),t._pending=o=void 0),o||(t._pending=o=[i,d.id,m?Date.now()+x:i[4]+b,void 0,m||void 0,v]),o[4]&&!S&&o[5]===v)return;if(o[5]=v,!o[4]){clearTimeout(o[3]);const j=o[2]-Date.now();if(j>0){o[3]=setTimeout(()=>qf(t,i),j);return}o[2]=0}const w=s.map(j=>({...j,_flight:void 0}));w[c].status="pending";const E=o[4]=t.startTransition(()=>t.stores.setMatches(w),w).then(j=>(j&&t._pending===o&&o[4]===E&&!o[2]&&(o[2]=Date.now()+x),j));return}}function rr(t,i){const s=t._pending;(t._tx===i||!t._tx?.[3].some(r=>r.id===s?.[1]))&&(clearTimeout(s?.[3]),t._pending=void 0)}async function py(t,i){const s=t._pending;if(!s)return;clearTimeout(s[3]);const r=s[2]-Date.now();if(!s[4]||r<=0||!od(i[3]).some(c=>c.id===s[1]))return;let o;try{await na(new Promise(c=>{o=setTimeout(c,r)}),i[0].signal)}catch{}clearTimeout(o)}function Xv(t,i){t._committed=i,t.stores.setMatches(i)}function q1(t,i,s,r){const o=t._committed,c=t._lifecycleEnd,d=t._cache;for(const b of s)b.preload=!1,r&&(b._assetEnd=void 0);const h=od(s).length,m=new Map;{const b=Date.now(),v=new Set;for(let x=0;x<s.length;x++){const S=s[x];(x<h||S.status==="success")&&v.add(S.id)}for(const x of[...o,...d.values()]){if(x.status!=="success"||v.has(x.id))continue;const S=ia(t,x);!S.options.loader||b-x.updatedAt>=(x.preload?S.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:S.options.gcTime??t.options.defaultGcTime??3e5)||m.set(x.id,d.get(x.id)===x?x:{...x,_flight:void 0,isFetching:!1,context:{}})}}i[3]=[],t._cache=m;const p=t._lifecycleEnd=z1(s);Xv(t,s),Nt(t,[...d.values(),...o].filter(b=>b._flight&&m.get(b.id)!==b),s),j1(t,o,s,c,p,i)}async function Yl(t,i){let s=t._tx;for(;s&&s!==i;)i=s,await s[5],s=t._tx}function Jv(t,i,s){const r=s[1].options,o=s[2];if(!o)return t.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return t.navigate({href:(o.maskedLocation??o).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});o._redirects=i[1]+1,t._pendingLocation=o;const c=t.commitLocation({...o,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===o&&(t._pendingLocation=void 0)}),c}async function B1(t,i,s,r,o){const c=s.map(m=>({...m}));fd(c);for(const m of r)Ln(t,c[m[0]]),c[m[0]]=m[3];const d=[i[2],c];let h;try{h=await Fv(t,d,r,i[0],o)}catch(m){throw Nt(t,c),m}if(yr(h)){Nt(t,c),h[0]===bt&&t._tx===i&&t._committed===s&&await Jv(t,i,h);return}if(await Vv(t,h,i[0].signal),t._tx!==i||t._committed!==s){Nt(t,c);return}for(const m of c){const p=t._cache.get(m.id);p?._flight&&p._flight===m._flight&&(t._cache.delete(m.id),Ln(t,p))}Xv(t,c),Nt(t,s,c)}async function H1(t,i,s,r,o,c){const d=await Pv(t,i[2],i[3],[i[0],i[1],t._committed,void 0,o,s,c,r]);if(yr(d)){const v=d[0]===bt&&t._tx===i;if((!v||d[1].options.reloadDocument)&&rr(t,i),Nt(t,i[3]),i[3]=[],!v)return;if(t._tx!==i){rr(t,i);return}await Jv(t,i,d);return}const h=d[1];if(t._tx===i&&await py(t,i),t._tx!==i){rr(t,i),Nt(t,h),Xi(t,d);return}const m=i[2],p=To(m,t.stores.resolvedLocation.get()),b=d[2];await t.startViewTransition(async()=>{if(t._tx===i&&await py(t,i),t._tx!==i){rr(t,i),Nt(t,h),Xi(t,d);return}const v=()=>{rr(t,i),q1(t,i,h,c),t._tx===i&&(t.emit({type:"onLoad",...p}),t._tx===i&&t.emit({type:"onBeforeRouteMount",...p}))},x=await t.startTransition(v,h);if(t._tx!==i){Xi(t,d);return}b?.length&&B1(t,i,h,b,d[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(m),t.stores.status.set("idle"),t._tx===i&&t.emit({type:"onResolved",...p}),x&&t._tx===i&&t.emit({type:"onRendered",...p})}),t._tx===i&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}async function $1(t,i){const s=t._tx,r=t.stores.resolvedLocation.get(),o=r??t.stores.location.get(),c=t.latestLocation,d=t._pendingLocation,h=d?.href===c.href?d._redirects??0:0,m=t._handoff,p=m?.[0](),b=new AbortController,v=t._preflight;if(t._preflight=b,p||m?.[1](),v?.abort(),!b.signal.aborted){const Y=To(c,r);t.emit({type:"onBeforeNavigate",...Y}),b.signal.aborted||t.emit({type:"onBeforeLoad",...Y})}if(b.signal.aborted){await Yl(t,s);return}const x=o.href===c.href;let S=b;const w=t.matchRoutes(c,{_controller:b});fd(w);const E=p?m[1](w):void 0;if(E?S=p:p?.abort(),b.signal.aborted){Nt(t,w),await Yl(t,s);return}t._preflight=void 0;let j;const A=()=>H1(t,G,x,()=>qf(t,G),i?.sync,E),k=i?.sync?new Promise(Y=>j=Y):Promise.resolve().then(A),G=[S,h,c,w,Date.now(),k.then(()=>Yl(t,G))];if(t._tx=G,s){for(const Y of t.stores.matches.get()){if(t._tx!==G)break;Y.isFetching&&br(t,Y,!1)}s[0].abort(),Nt(t,s[3],G[3],!0)}if(t._tx!==G){Nt(t,G[3]),G[3]=[],j?.(),await Yl(t,G);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(c)}),(E||!t._committed.length&&w[0]?.status!=="success"&&!w.some(Y=>Y._notFound))&&qf(t,G),j?.(A()),await G[5]}async function Q1(t,i){let s=t.buildLocation(i);for(let r=0;;r++){const o=t._committed,c=new AbortController;let d,h,m;try{try{d=t.matchRoutes(s,{_controller:c}),fd(d),h=(t._preloads??=new Map).set(c,d),m=await Pv(t,s,d,[c,r,o,!0])}finally{h&&(h=h.delete(c),Nt(t,d)),c.abort()}if(!yr(m))return m[1];if(!h||m.length<3)return;s=m[2]}catch(p){es(p)||console.error(p);return}}}const G1="Error preloading route! ☝️";var Iv=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=i=>{this.originalIndex=i,this._branch=void 0;const s=this.options,r=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Pa:this.parentRoute||sd();let o=r?Pa:s?.path;o&&o!=="/"&&(o=kv(o));const c=s?.id||o,d=r?Pa:Va((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(c??""));o==="__root__"&&(o="/");const h=d==="__root__"?"/":o===void 0?this.parentRoute.fullPath:Va(this.parentRoute.fullPath+"/"+o);this._path=o,this._id=d,this._fullPath=h,this._to=pn(h)},this.addChildren=i=>this._addFileChildren(i),this._addFileChildren=i=>(Array.isArray(i)&&(this.children=i),typeof i=="object"&&i!==null&&(this.children=Object.values(i)),this),this._addFileTypes=()=>this,this.updateLoader=i=>(Object.assign(this.options,i),this),this.update=i=>(Object.assign(this.options,i),this),this.lazy=i=>(this.lazyFn=i,this),this.redirect=i=>c1({from:this.fullPath,...i}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},K1=class extends Iv{constructor(t){super(t)}},hd=class extends J.Component{constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,i){const s=t.getResetKey();return i.error&&i.resetKey!==s?{resetKey:s,error:0}:{resetKey:s}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,i){this.props.onCatch?.(t,i)}render(){const t=this.state.error;return t?J.createElement(this.props.errorComponent??Y1,{error:t[0],reset:this.reset}):this.props.children}};function Y1({error:t}){const[i,s]=J.useState(!1);return g.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[g.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),g.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(r=>!r),children:i?"Hide Error":"Show Error"})]}),g.jsx("div",{style:{height:".25rem"}}),i?g.jsx("div",{children:g.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t?.message?g.jsx("code",{children:t.message}):null})}):null]})}var gy=()=>!0,F1=()=>!1;function V1({children:t,fallback:i=null}){return g.jsx(jo.Fragment,{children:P1()?t:i})}function P1(t=!0){return jo.useSyncExternalStore(X1,gy,t?F1:gy)}function X1(){return()=>{}}var Wv=J.createContext(null);function vn(t){return J.useContext(Wv)}function J1(t,i){const s=t.stores.location,r=new Set;let o,c;const d=h=>{k1(t,i,h)||(o=h,r.forEach(m=>m()))};return[()=>o??s.get(),h=>(r.size||(o=s.get(),c=s.subscribe(d).unsubscribe),r.add(h),()=>{r.delete(h),r.size||(c(),o=void 0)})]}var xr=J.createContext(void 0),I1=J.createContext(void 0);function W1({update:t,notify:i,unwatched:s}){return{link:r,unlink:o,propagate:c,checkDirty:d,shallowPropagate:h};function r(p,b,v){const x=b.depsTail;if(x!==void 0&&x.dep===p)return;const S=x!==void 0?x.nextDep:b.deps;if(S!==void 0&&S.dep===p){S.version=v,b.depsTail=S;return}const w=p.subsTail;if(w!==void 0&&w.version===v&&w.sub===b)return;const E=b.depsTail=p.subsTail={version:v,dep:p,sub:b,prevDep:x,nextDep:S,prevSub:w,nextSub:void 0};S!==void 0&&(S.prevDep=E),x!==void 0?x.nextDep=E:b.deps=E,w!==void 0?w.nextSub=E:p.subs=E}function o(p,b=p.sub){const v=p.dep,x=p.prevDep,S=p.nextDep,w=p.nextSub,E=p.prevSub;return S!==void 0?S.prevDep=x:b.depsTail=x,x!==void 0?x.nextDep=S:b.deps=S,w!==void 0?w.prevSub=E:v.subsTail=E,E!==void 0?E.nextSub=w:(v.subs=w)===void 0&&s(v),S}function c(p){let b=p.nextSub,v;e:do{const x=p.sub;let S=x.flags;if(S&60?S&12?S&4?!(S&48)&&m(p,x)?(x.flags=S|40,S&=1):S=0:x.flags=S&-9|32:S=0:x.flags=S|32,S&2&&i(x),S&1){const w=x.subs;if(w!==void 0){const E=(p=w).nextSub;E!==void 0&&(v={value:b,prev:v},b=E);continue}}if((p=b)!==void 0){b=p.nextSub;continue}for(;v!==void 0;)if(p=v.value,v=v.prev,p!==void 0){b=p.nextSub;continue e}break}while(!0)}function d(p,b){let v,x=0,S=!1;e:do{const w=p.dep,E=w.flags;if(b.flags&16)S=!0;else if((E&17)===17){if(t(w)){const j=w.subs;j.nextSub!==void 0&&h(j),S=!0}}else if((E&33)===33){(p.nextSub!==void 0||p.prevSub!==void 0)&&(v={value:p,prev:v}),p=w.deps,b=w,++x;continue}if(!S){const j=p.nextDep;if(j!==void 0){p=j;continue}}for(;x--;){const j=b.subs,A=j.nextSub!==void 0;if(A?(p=v.value,v=v.prev):p=j,S){if(t(b)){A&&h(j),b=p.sub;continue}S=!1}else b.flags&=-33;b=p.sub;const k=p.nextDep;if(k!==void 0){p=k;continue e}}return S}while(!0)}function h(p){do{const b=p.sub,v=b.flags;(v&48)===32&&(b.flags=v|16,(v&6)===2&&i(b))}while((p=p.nextSub)!==void 0)}function m(p,b){let v=b.depsTail;for(;v!==void 0;){if(v===p)return!0;v=v.prevDep}return!1}}function ew(t,i,s){const r=typeof t=="object",o=r?t:void 0;return{next:(r?t.next:t)?.bind(o),error:(r?t.error:i)?.bind(o),complete:(r?t.complete:s)?.bind(o)}}const Bf=[];let lo=0;const{link:yy,unlink:tw,propagate:nw,checkDirty:eb,shallowPropagate:vy}=W1({update(t){return t._update()},notify(t){Bf[Hf++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,vo(t))}});let Fl=0,Hf=0,sn,$f=0;function iw(t){try{++$f,t()}finally{--$f||tb()}}function vo(t){const i=t.depsTail;let s=i!==void 0?i.nextDep:t.deps;for(;s!==void 0;)s=tw(s,t)}function tb(){if(!($f>0)){for(;Fl<Hf;){const t=Bf[Fl];Bf[Fl++]=void 0,t.notify()}Fl=0,Hf=0}}function by(t,i){const s=typeof t=="function",r=t,o={_snapshot:s?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?0:1,get(){return sn!==void 0&&yy(o,sn,lo),o._snapshot},subscribe(c){const d=ew(c),h={current:!1},m=aw(()=>{o.get(),h.current?(sn=void 0,d.next?.(o._snapshot)):h.current=!0});return{unsubscribe:()=>{m.stop()}}},_update(c){const d=sn,h=i?.compare??Object.is;if(s)sn=o,++lo,o.depsTail=void 0;else if(c===void 0)return!1;s&&(o.flags=5);try{const m=o._snapshot,p=typeof c=="function"?c(m):c===void 0&&s?r(m):c;return m===void 0||!h(m,p)?(o._snapshot=p,!0):!1}finally{sn=d,s&&(o.flags&=-5),vo(o)}}};return s?(o.flags=17,o.get=function(){const c=o.flags;if(c&16||c&32&&eb(o.deps,o)){if(o._update()){const d=o.subs;d!==void 0&&vy(d)}}else c&32&&(o.flags=c&-33);return sn!==void 0&&yy(o,sn,lo),o._snapshot}):o.set=function(c){if(o._update(c)){const d=o.subs;d!==void 0&&(nw(d),vy(d),tb())}},o}function aw(t){const i=()=>{const r=sn;sn=s,++lo,s.depsTail=void 0,s.flags=6;try{return t()}finally{sn=r,s.flags&=-5,vo(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const r=this.flags;r&16||r&32&&eb(this.deps,this)?i():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,vo(this)}};return i(),s}var mf={exports:{}},pf={},gf={exports:{}},yf={};var xy;function sw(){if(xy)return yf;xy=1;var t=_r();function i(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var s=typeof Object.is=="function"?Object.is:i,r=t.useState,o=t.useEffect,c=t.useLayoutEffect,d=t.useDebugValue;function h(v,x){var S=x(),w=r({inst:{value:S,getSnapshot:x}}),E=w[0].inst,j=w[1];return c(function(){E.value=S,E.getSnapshot=x,m(E)&&j({inst:E})},[v,S,x]),o(function(){return m(E)&&j({inst:E}),v(function(){m(E)&&j({inst:E})})},[v]),d(S),S}function m(v){var x=v.getSnapshot;v=v.value;try{var S=x();return!s(v,S)}catch{return!0}}function p(v,x){return x()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:h;return yf.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:b,yf}var Sy;function rw(){return Sy||(Sy=1,gf.exports=sw()),gf.exports}var _y;function lw(){if(_y)return pf;_y=1;var t=_r(),i=rw();function s(p,b){return p===b&&(p!==0||1/p===1/b)||p!==p&&b!==b}var r=typeof Object.is=="function"?Object.is:s,o=i.useSyncExternalStore,c=t.useRef,d=t.useEffect,h=t.useMemo,m=t.useDebugValue;return pf.useSyncExternalStoreWithSelector=function(p,b,v,x,S){var w=c(null);if(w.current===null){var E={hasValue:!1,value:null};w.current=E}else E=w.current;w=h(function(){function A(Z){if(!k){if(k=!0,G=Z,Z=x(Z),S!==void 0&&E.hasValue){var R=E.value;if(S(R,Z))return Y=R}return Y=Z}if(R=Y,r(G,Z))return R;var I=x(Z);return S!==void 0&&S(R,I)?(G=Z,R):(G=Z,Y=I)}var k=!1,G,Y,P=v===void 0?null:v;return[function(){return A(b())},P===null?void 0:function(){return A(P())}]},[b,v,x,S]);var j=o(p,w[0],w[1]);return d(function(){E.hasValue=!0,E.value=j},[j]),m(j),j},pf}var wy;function ow(){return wy||(wy=1,mf.exports=lw()),mf.exports}var uw=ow();function cw(t,i){return t===i}function Wi(t,i=r=>r,s){const r=s?.compare??cw,o=J.useCallback(d=>{const{unsubscribe:h}=t.subscribe(d);return h},[t]),c=J.useCallback(()=>t.get(),[t]);return uw.useSyncExternalStoreWithSelector(o,c,c,i,r)}var Ey={};function fw(t,i){const s=J.useRef();return r=>{const o=t?.select?t.select(r):r;return t?.structuralSharing??i.options.defaultStructuralSharing?s.current=vi(s.current,o):o}}function aa(t){const i=vn(),s=J.useContext(t.from?I1:xr),r=t.from??s,o=i.stores.getMatchStore(r),c=fw(t,i),d=Wi(o,h=>h?c(h):Ey);if(d!==Ey)return d;(t.shouldThrow??!0)&&sd()}function nb(t){return aa({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:i=>t.select?t.select(i.loaderData):i.loaderData})}function ib(t){const{select:i,...s}=t;return aa({...s,select:r=>i?i(r.loaderDeps):r.loaderDeps})}function ab(t){return aa({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:i=>{const s=t.strict===!1?i.params:i._strictParams;return t.select?t.select(s):s}})}function sb(t){return aa({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:i=>t.select?t.select(i.search):i.search})}function Ao(t){const i=vn();return J.useCallback(s=>i.navigate({...s,from:s.from??t?.from}),[t?.from,i])}function rb(t){return aa({...t,select:i=>t.select?t.select(i.context):i.context})}function dw(...t){const i=J.useRef(t),s=i.current;return t.forEach((r,o)=>{Bn(s[o],r,!1,!0)||(s[o]=r)}),i.current}function Vl(t,i){t.preloadRoute(i).catch(s=>{console.warn(s),console.warn(G1)})}function hw(t,i){const s=typeof t=="string"&&pr(t);if(s)return i.has(s)?t:null}function mw(t,i,s,r){const o=Ig(t.pathname,r),c=Ig(i.pathname,r);return(s?.exact?o!==c:!(o.startsWith(c)&&(o.length===c.length||o[c.length]==="/")))||(s?.includeSearch??!0)&&!Bn(t.search,i.search,!s?.exact,s?.explicitUndefined)?!1:!s?.includeHash||t.hash===i.hash}function pw(t,i,s){const r=vn(),o=J.useRef(null),c=J.useCallback(q=>{if(o.current=q,typeof i=="function")return i(q);i&&(i.current=q)},[i]),{activeOptions:d,to:h,preload:m,preloadDelay:p,disabled:b,target:v,onClick:x,onBlur:S,onFocus:w,onMouseEnter:E,onMouseLeave:j,onTouchStart:A}=t,[k,G,Y]=dw(t.search,t.params,d),P=J.useContext(xr),Z=(r.stores._linkScopes??={})[P]??=J1(r,P),[R,I,V]=J.useMemo(()=>{const q=hw(h,r.protocolAllowlist);if(q!==void 0){const Ze=[q??void 0];return[t,()=>Ze]}const X={...t};let te,fe,xe;const ze=()=>{const Ze=Z[0]();if(Ze!==te){X._fromLocation=Ze;const He=r.buildLocation(X),cn=xw(He,r,b),Ti=b||cn&&!pr(cn)?mw(Ze,He,Y,r.basepath):void 0;(!fe||fe[0]!==cn||fe[1]!==Ti)&&(fe=[cn,Ti]),te=Ze}return fe};return[X,ze,Y?.includeHash&&(()=>{const Ze=ze();return Ze[1]?xe??=[Ze[0],!1]:Ze})]},[r,Z,t.from,t.hash,t.href,h,k,G,t.state,t.mask,t.unsafeRelative,Y,b]),[ee,re]=J.useSyncExternalStore(Z[1],I,V||I),ie=re===void 0&&ee,he=b||ee===void 0,ve=J.useRef(!1),me=t.reloadDocument||ie||he?!1:m??r.options.defaultPreload,U=p??r.options.defaultPreloadDelay??0,W=J.useCallback(q=>{const X=q?.isIntersecting;if(!(X??me==="intent")){X===!1&&Pl(o);return}if(!U){Vl(r,R);return}o.t??=setTimeout(()=>{o.t=void 0,Vl(r,R)},U)},[r,R,o,me,U]);J.useEffect(()=>{if(!me)return;me==="render"&&!ve.current&&(ve.current=!0,Vl(r,R));let q=!0,X;return me==="viewport"&&o.current&&typeof IntersectionObserver=="function"&&(X=new IntersectionObserver(te=>{q&&W(te.pop())},{rootMargin:"100px"}),X.observe(o.current)),()=>{q=!1,X?.disconnect(),Pl(o)}},[r,R,me,W,o]);const B=vw(t,s);if(B.ref=i?c:o,ie)return B.href=ie,B;const oe=q=>{const X=v??q.currentTarget.getAttribute("target");!he&&!(q.metaKey||q.altKey||q.ctrlKey||q.shiftKey)&&!q.defaultPrevented&&(!X||X==="_self")&&q.button===0&&(q.preventDefault(),Pl(o),r.navigate({...t,_fromLocation:R._fromLocation}))},de=()=>{me==="intent"&&Vl(r,R)},z=()=>{me==="intent"&&Pl(o)};return B.onClick=Ya(x,oe),B.onBlur=Ya(S,z),B.onFocus=Ya(w,W),B.onMouseEnter=Ya(E,W),B.onMouseLeave=Ya(j,z),B.onTouchStart=Ya(A,de),bw(B,t,re,ee,he,s)}var gw={},yw={className:"active"},lb=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function vw(t,i){const s={};for(const r in t)lb.has(r)||r==="type"&&i!==void 0||r==="disabled"&&i==="a"||(s[r]=t[r]);return s}function bw(t,i,s,r,o,c){const{activeProps:d,inactiveProps:h,className:m,style:p,target:b}=i,v=Rv(s?d:h,{})??(s?yw:gw);Object.assign(t,v),t.href=r,c!=="a"&&(t.disabled=o),t.target=b;const x=v.style;(p||x)&&(t.style=p&&x?{...p,...x}:p||x);const S=v.className;return(m||S)&&(t.className=m?S?`${m} ${S}`:m:S),o&&(t.role="link",t["aria-disabled"]=!0),s&&(t["data-status"]="active",t["aria-current"]="page"),t}var Pl=t=>{clearTimeout(t.t),t.t=void 0},Ya=(t,i)=>t?s=>s.defaultPrevented||(t(s),s.defaultPrevented||i(s)):i;function xw(t,i,s){if(s)return;const r=t.maskedLocation??t,o=r.external?r.publicHref:i.history.createHref(r.publicHref)||"/";if(!((r.external||o!==r.publicHref)&&Dv(o,i.protocolAllowlist)))return o}var os=J.memo(J.forwardRef((t,i)=>{const s=t._asChild||"a",r=pw(t,i,s),o=typeof t.children=="function"?t.children({isActive:r["data-status"]==="active"}):t.children;return J.createElement(s,r,o)}),Sw);function Sw(t,i){let s=0;for(const r in i)if(s++,t[r]!==i[r]&&(!lb.has(r)||!Bn(t[r],i[r],!1,!0)))return!1;for(const r in t)s--;return s===0}var _w=class extends Iv{constructor(t){super(t),this.useMatch=i=>aa({...i,from:this.id}),this.useRouteContext=i=>rb({...i,from:this.id}),this.useSearch=i=>sb({...i,from:this.id}),this.useParams=i=>ab({...i,from:this.id}),this.useLoaderDeps=i=>ib({...i,from:this.id}),this.useLoaderData=i=>nb({...i,from:this.id}),this.useNavigate=()=>Ao({from:this.fullPath}),this.Link=jo.forwardRef((i,s)=>g.jsx(os,{ref:s,from:this.fullPath,...i}))}};function sa(t){return new _w(t)}var ww=class extends K1{constructor(t){super(t),this.useMatch=i=>aa({...i,from:this.id}),this.useRouteContext=i=>rb({...i,from:this.id}),this.useSearch=i=>sb({...i,from:this.id}),this.useParams=i=>ab({...i,from:this.id}),this.useLoaderDeps=i=>ib({...i,from:this.id}),this.useLoaderData=i=>nb({...i,from:this.id}),this.useNavigate=()=>Ao({from:this.fullPath}),this.Link=jo.forwardRef((i,s)=>g.jsx(os,{ref:s,from:this.fullPath,...i}))}};function Ew(t){return new ww(t)}function Ow(t){const i=vn(),s=`not-found-${Wi(i.stores.location,r=>r.pathname)}-${Wi(i.stores.status)}`;return g.jsx(hd,{getResetKey:()=>s,onCatch:(r,o)=>{if(es(r))t.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(es(r))return t.fallback?.(r);throw r},children:t.children})}function zw(){return g.jsx("p",{children:"Not Found"})}function ob(t,i,s){return i.options.notFoundComponent?g.jsx(i.options.notFoundComponent,{...s}):t.options.defaultNotFoundComponent?g.jsx(t.options.defaultNotFoundComponent,{...s}):g.jsx(zw,{})}function Ro(t,i){const s=i?.options.pendingComponent??t.options.defaultPendingComponent;return s?g.jsx(s,{}):null}var jw=(t,i)=>t[0]===i[0]&&t[1]===i[1],ub=(t,i,s)=>!i.isRoot||i.options.shellComponent||i.options.wrapInSuspense||s===!1||s==="data-only"||!t.ssr,cb=J.memo(function({routeId:i}){const s=vn(),r=s.stores.getMatchStore(i);return Tw(s,Wi(r))});function Tw(t,i){const s=t.routesById[i.routeId],r=Ro(t,s),o=s.options.errorComponent??t.options.defaultErrorComponent,c=s.options.onCatch??t.options.defaultOnCatch,d=s.isRoot?s.options.notFoundComponent??t.options.notFoundRoute?.options.component:s.options.notFoundComponent,h=i.ssr===!1||i.ssr==="data-only",m=ub(t,s,i.ssr)&&(s.options.wrapInSuspense??r??(s.options.errorComponent?.preload||h));let p=g.jsx(Nw,{match:i});h&&(p=g.jsx(V1,{fallback:r,children:p})),d&&(p=g.jsx(Ow,{fallback:x=>{if(x.routeId??=i.routeId,x.routeId!==i.routeId)throw x;return J.createElement(d,x)},children:p})),o&&(p=g.jsx(hd,{getResetKey:()=>i,errorComponent:o,onCatch:(x,S)=>{if(es(x))throw x.routeId??=i.routeId,x;c?.(x,S)},children:p})),m&&(p=g.jsx(J.Suspense,{fallback:r,children:p}));const b=null,v=s.isRoot&&s.options.shellComponent;return v?g.jsx(xr.Provider,{value:i.routeId,children:g.jsxs(v,{children:[p,b]})}):g.jsxs(xr.Provider,{value:i.routeId,children:[p,b]})}var Nw=J.memo(function({match:i}){const s=vn(),r=i.routeId,o=s.routesById[r],c=J.useMemo(()=>{const h=(o.options.remountDeps??s.options.defaultRemountDeps)?.({routeId:r,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return h?JSON.stringify(h):void 0},[r,i.loaderDeps,i._strictParams,i._strictSearch,o.options.remountDeps,s.options.defaultRemountDeps]),d=J.useMemo(()=>{const h=o.options.component??s.options.defaultComponent;return h?g.jsx(h,{},c):g.jsx(fb,{})},[c,o.options.component,s.options.defaultComponent]);if(i.status==="pending"){if(s.ssr&&!ub(s,o,i.ssr))return d;if(s._tx)throw s._tx[5];return Ro(s,o)}if(i.status==="notFound")return ob(s,o,i.error);if(i.status==="error")throw i.error;return d}),fb=J.memo(function(){const i=vn(),s=J.useContext(xr);let r,o,c;{const h=i.stores.getMatchStore(s);[r,o]=Wi(h,m=>[!!m._notFound,m.error],{compare:jw}),c=Wi(i.stores.ids,m=>m[m.indexOf(s)+1])}if(r)return ob(i,i.routesById[s],o);if(!c)return null;const d=g.jsx(cb,{routeId:c});return s===Pa?g.jsx(J.Suspense,{fallback:Ro(i),children:d}):d});function db(t,i){const s=t[1];t.length=0,s?.(i)}function Aw({t}){const i=vn(),s=i._rendered??=[];return i.startTransition=(r,o)=>new Promise(c=>{db(s,!1),s.push(o,c),t(i),J.startTransition(r)}),Av(()=>{const r=i.history.subscribe(i.load);i.updateLatestLocation();const o=i.latestLocation,c=i.buildLocation({to:o.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(pn(o.publicHref)!==pn(c.publicHref))return i.commitLocation({...c,replace:!0,ignoreBlocker:!0}),r;const d=i.stores.resolvedLocation.get();return d?.href===o.href&&d.state.__TSR_key===o.state.__TSR_key?s.push(i.stores.matches.get(),h=>{h&&i.emit({type:"onRendered",...To(d,d)})}):i._tx||i.load({sync:!0}).catch(console.error),r},[i,i.history]),null}function Rw(){const t=vn(),i=t.routesById[Pa],s=Ro(t,i),r=g.jsxs(g.Fragment,{children:[g.jsx(Aw,{t:J.useState()[1]}),t.ssr?g.jsx(Oy,{}):g.jsx(J.Suspense,{fallback:s,children:g.jsx(Oy,{})})]});return t.options.InnerWrap?g.jsx(t.options.InnerWrap,{children:r}):r}function Oy(){const t=vn(),i=t._rendered,s=Wi(t.stores.matches,d=>i[0]??d),r=s[0],o=r?.routeId;Av(()=>{i[0]===s&&db(i,!0)},[i,s]);const c=o?g.jsx(cb,{routeId:o}):null;return t.options.disableGlobalCatchBoundary?c:g.jsx(hd,{getResetKey:()=>r,onCatch:void 0,children:c})}var Cw=t=>({createMutableStore:by,createReadonlyStore:by,batch:iw}),Mw=t=>new Dw(t),Dw=class extends T1{constructor(t){super(t,Cw)}};function kw({router:t,children:i,...s}){Cv(s)&&t.update({...t.options,...s,context:{...t.options.context,...s.context}});const r=g.jsx(Wv.Provider,{value:t,children:i});return t.options.Wrap?g.jsx(t.options.Wrap,{children:r}):r}function Uw({router:t,...i}){return g.jsx(kw,{router:t,...i,children:g.jsx(Rw,{})})}const Lw={sm:20,md:32,lg:48},Zw=[{kind:"circle",cx:48,cy:48,r:10},{kind:"path",d:"M52.00 74.70 A27 27 0 1 0 44.00 74.70 L44.00 68.62 A21 21 0 1 1 52.00 68.62 Z"},{kind:"path",d:"M52.00 90.81 A43 43 0 1 0 44.00 90.81 L44.00 84.78 A37 37 0 1 1 52.00 84.78 Z"}];function hb({size:t="md",label:i,className:s=""}){const r=Lw[t];return g.jsx("svg",{"data-pattern":"OgygieMark",viewBox:"0 0 96 96",width:r,height:r,fill:"currentColor",className:`shrink-0 ${s}`,...i===void 0?{"aria-hidden":!0}:{role:"img","aria-label":i},children:Zw.map(o=>o.kind==="circle"?g.jsx("circle",{cx:o.cx,cy:o.cy,r:o.r},"citadel"):g.jsx("path",{d:o.d},o.d))})}const qw=t=>1-(1-t)**3;function Bw(t,i){return t.toLocaleString("fr-FR",{minimumFractionDigits:i,maximumFractionDigits:i})}function Hw(){if(typeof window>"u"||typeof getComputedStyle!="function")return 800;const t=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--duration-count"));return Number.isFinite(t)&&t>0?t:800}function zy(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function $w(t){const[i,s]=J.useState(()=>typeof window>"u"||typeof window.requestAnimationFrame!="function"||zy()?t:0),r=J.useRef(!1);return J.useEffect(()=>{if(r.current||typeof window.requestAnimationFrame!="function"||zy()){r.current=!0,s(t);return}r.current=!0;const o=Hw();let c=null,d=0;const h=m=>{c===null&&(c=m);const p=Math.min(1,(m-c)/o);s(t*qw(p)),p<1&&(d=window.requestAnimationFrame(h))};return d=window.requestAnimationFrame(h),()=>window.cancelAnimationFrame(d)},[t]),i}function Ja({value:t,format:i,decimals:s=0,className:r=""}){const o=$w(t),c=i===void 0?Bw(o,s):i(o);return g.jsx("span",{"data-pattern":"Counter","data-value":t,className:`tabular-nums ${r}`,children:c})}function Qf(t){const i=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,o])=>i.indexOf(+r)===-1).map(([r,o])=>o)}function jy(t,i="|"){return t.map(s=>bb(s)).join(i)}function Gf(t,i){return typeof i=="bigint"?i.toString():i}class Qw{constructor(i){this._getter=i,this._value=void 0}get value(){const i=this._getter;return i!==void 0&&(this._value=i(),this._getter=void 0),this._value}}function md(t){return new Qw(t)}function Gw(t){return t==null}function pd(t){const i=t.startsWith("^")?1:0,s=t.endsWith("$")?t.length-1:t.length;return t.slice(i,s)}function Kw(t,i){const s=t/i,r=Math.round(s),o=4*Number.EPSILON*Math.max(Math.abs(s),1);return Math.abs(s-r)<o?0:s-r}function Oi(t,i,s){Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0})}function mb(t){const i=Object.getOwnPropertyDescriptor(t,"shape");return i?.get?i.get.raw:i?.value}function $n(t){return mb(t._zod.def)??t._zod.def.shape}function pb(t,i,s){Object.defineProperty(t,i,{get(){const r=s();return Oi(this,i,r),r},enumerable:!0,configurable:!0})}function gb(t,i,s){i in t?Oi(t,i,s):t[i]=s}function ea(t,i,s,r){const o=$n(i);for(const c of s){const d=Object.getOwnPropertyDescriptor(o,c);d.enumerable&&(d.get?pb(t,c,()=>{const h=i._zod.def.shape[c];return r?r(h,c):h}):gb(t,c,r?r(d.value,c):d.value))}}function Yw(t,i){for(const s of Reflect.ownKeys(i)){const r=Object.getOwnPropertyDescriptor(i,s);r.enumerable&&(r.get?pb(t,s,()=>i[s]):gb(t,s,r.value))}}function Qt(...t){const i={};for(const s of t){const r=Object.getOwnPropertyDescriptors(s);Object.assign(i,r)}return Object.defineProperties({},i)}function Fw(t){return JSON.stringify(t)}function Vw(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const yb="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function bo(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const Pw=md(()=>{if(on.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function ts(t){if(bo(t)===!1)return!1;const i=t.constructor;if(i===void 0||typeof i!="function")return!0;const s=i.prototype;return!(bo(s)===!1||Object.prototype.hasOwnProperty.call(s,"isPrototypeOf")===!1)}function vb(t){return ts(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}const Xw=new Set(["string","number","symbol"]);function ns(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function zi(t,i,s){const r=new t._zod.constr(i??t._zod.def);return(!i||s?.parent)&&(r._zod.parent=t),r}function le(t){const i=t;if(!i)return{};if(typeof i=="string")return{error:()=>i};if(i?.message!==void 0){if(i?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");i.error=i.message}return delete i.message,typeof i.error=="string"?{...i,error:()=>i.error}:i}function bb(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Jw(t){return Object.keys(t).filter(i=>t[i]._zod.optin!==void 0&&t[i]._zod.optout==="optional")}const xb={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Iw={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Ww(t,i){const s=t._zod.def,r=s.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c={};return ea(c,t,Co(t,i)),zi(t,Qt(s,{shape:c,checks:[]}))}function Co(t,i){const s=$n(t),r=[];for(const o of Reflect.ownKeys(i)){if(!Object.getOwnPropertyDescriptor(s,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);i[o]&&r.push(o)}return r}function e2(t,i){const s=t._zod.def,r=s.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=new Set(Co(t,i)),d={};return ea(d,t,Reflect.ownKeys($n(t)).filter(h=>!c.has(h))),zi(t,Qt(s,{shape:d,checks:[]}))}function t2(t,i){if(!ts(i))throw new Error("Invalid input to extend: expected a plain object");const s=t._zod.def.checks;if(s&&s.length>0){const o=$n(t);for(const c of Reflect.ownKeys(i))if(Object.getOwnPropertyDescriptor(o,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return zi(t,Qt(t._zod.def,{shape:Sb(t,i)}))}function Sb(t,i){const s={};return ea(s,t,Reflect.ownKeys($n(t))),Yw(s,i),s}function n2(t,i){if(!ts(i))throw new Error("Invalid input to safeExtend: expected a plain object");return zi(t,Qt(t._zod.def,{shape:Sb(t,i)}))}function i2(t,i){if(!i?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const s={};ea(s,t,Reflect.ownKeys($n(t))),ea(s,i,Reflect.ownKeys($n(i)));const r=Qt(t._zod.def,{shape:s,get catchall(){return i._zod.def.catchall},checks:i._zod.def.checks??[]});return zi(t,r)}function Ty(t,i,s,r="partial"){const c=i._zod.def.checks;if(c&&c.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const h=s?new Set(Co(i,s)):void 0,m={};return ea(m,i,Reflect.ownKeys($n(i)),t&&((p,b)=>h&&!h.has(b)?p:new t({type:"optional",innerType:p}))),zi(i,Qt(i._zod.def,{shape:m,checks:[]}))}function a2(t,i,s){const r=s?new Set(Co(i,s)):void 0,o={};return ea(o,i,Reflect.ownKeys($n(i)),(c,d)=>r&&!r.has(d)?c:new t({type:"nonoptional",innerType:c})),zi(i,Qt(i._zod.def,{shape:o}))}function Zn(t,i=0){if(t.aborted===!0)return!0;for(let s=i;s<t.issues.length;s++)if(t.issues[s]?.continue!==!0)return!0;return!1}function s2(t,i=0){if(t.aborted===!0)return!0;for(let s=i;s<t.issues.length;s++)if(t.issues[s]?.continue===!1)return!0;return!1}function Fa(t,i){return i.map(s=>{var r;return(r=s).path??(r.path=[]),s.path.unshift(t),s})}function lr(t){return typeof t=="string"?t:t?.message}function Ny(t){const i=[];for(const s of t??[]){const r=s._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&i.push([o,s])}return i}function Kf(t,i,s){var r;for(let o=i;o<t.length;o++)(r=t[o]).schema??(r.schema=s)}function _i(t,i,s){var r;const o=t.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=t).schema??(r.schema=t.inst):t.schema=t.inst);const c=t.schema!==t.inst?t.schema?._zod.def?.error:void 0,d=t.message?t.message:lr(t.inst?._zod.def?.error?.(t))??lr(c?.(t))??lr(i?.error?.(t))??lr(s.customError?.(t))??lr(s.localeError?.(t))??"Invalid input",h={};for(const m of Object.keys(t))m==="inst"||m==="schema"||m==="continue"||m==="input"||m==="__proto__"||(h[m]=t[m]);return h.path??(h.path=[]),h.message=d,i?.reportInput&&(h.input=t.input),h}const r2=/[\uD800-\uDBFF]/;function gd(t){const i=t.length;if(!r2.test(t))return i;let s=i;for(let r=0;r<i-1;r++)(t.charCodeAt(r)&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320&&(s--,r++);return s}function yd(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function l2(t){const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";const s=t;if(s&&Object.getPrototypeOf(s)!==Object.prototype&&"constructor"in s&&s.constructor)return s.constructor.name}}return i}function Sr(...t){const[i,s,r]=t;return typeof i=="string"?{message:i,code:"custom",input:s,inst:r}:{...i}}function o2(t,i){for(const s in i){const r=Object.getOwnPropertyDescriptor(i,s);r.get?Object.defineProperty(t,s,{...r,enumerable:!1}):u2(t,s,r.value)}}function wi(t,i,s,r=!0){return Object.defineProperty(t,i,{configurable:!0,writable:!0,enumerable:r,value:s}),s}function _b(t,i,s){return wi(t,i,s,!1)}function wb(t,i){for(const s in t){const r=t[s];Object.defineProperty(i,s,{configurable:!0,enumerable:!0,get(){return wi(this,s,r(this))},set(o){wi(this,s,o)}})}return i}function u2(t,i,s){Object.defineProperty(t,i,{configurable:!0,get(){return this==null?s:wi(this,i,s.bind(this))},set(r){wi(this,i,r)}})}function c2(t,i){const s=Object.getPrototypeOf(t);return i in s?void 0:s}let vf,pi=!1;const f2={configurable:!0,get(){pi=!0}};function Re(t,i,s){const r=Object.getPrototypeOf(t._zod);if(i in r&&vf!==t._zod){vf=void 0;return}vf=t._zod,Object.defineProperty(r,i,{configurable:!0,get(){Object.defineProperty(this,i,f2);const o=pi;pi=!1;try{const c=s(this);return pi?delete this[i]:Object.defineProperty(this,i,{configurable:!0,writable:!0,value:c}),pi=pi||o,c}catch(c){throw delete this[i],pi=pi||o,c}},set(o){Object.defineProperty(this,i,{configurable:!0,writable:!0,value:o})}})}function d2(t,i,s,r){const o=c2(t,i);o&&Object.defineProperty(o,i,{configurable:!0,get(){const c={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,i,c),c.value=s(this),Object.defineProperty(this,i,c),c.value},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:r,value:c})}})}const h2="~constantCatch";function m2(t){const i=()=>t;return i[h2]=!0,i}var Ay;const bf={value:void 0,enumerable:!1};let Ry="captureStackTrace"in Error?Error:null;function p2(t){const i=Ry;if(i){const s=i.stackTraceLimit;if(typeof s=="number"){try{i.stackTraceLimit=0}catch{return Ry=null,new t}try{return new t}finally{i.stackTraceLimit=s}}}return new t}function Q(t,i,s,r){const o={};function c(x){this.def=x,this.constr=v,this.traits=new Set}c.prototype=o;const d=s,h=d&&new WeakSet;function m(x,S){if(x._zod){if(x._zod.traits.has(t))return}else{bf.value=new c(S);try{Object.defineProperty(x,"_zod",bf)}finally{bf.value=void 0}}if(x._zod.traits.add(t),i(x,S),h){const E=Object.getPrototypeOf(x),j=x._zod.constr.prototype;let A=E;for(;A&&A!==j;)A=Object.getPrototypeOf(A);const k=A??E;h.has(k)||(h.add(k),o2(k,d))}const w=v.prototype;for(const E in w)Object.prototype.hasOwnProperty.call(w,E)&&(E in x||(x[E]=w[E].bind(x)))}const p=r?.Parent??Object;class b extends p{}Object.defineProperty(b,"name",{value:t});function v(x){const S=r?.Parent?p2(b):this;m(S,x);const w=S._zod.deferred;if(w){for(const j of w)j();S._zod.deferred=void 0}const E=globalThis.__zod_globalConfig?.postProcessor;return E&&E(S),S}return Object.defineProperty(v,"init",{value:m}),Object.defineProperty(v,Symbol.hasInstance,{value:x=>r?.Parent&&x instanceof r.Parent?!0:x?._zod?.traits?.has(t)}),Object.defineProperty(v,"name",{value:t}),v}class Ji extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Eb extends Error{constructor(i){super(`Encountered unidirectional transform during encode: ${i}`),this.name="ZodEncodeError"}}(Ay=globalThis).__zod_globalConfig??(Ay.__zod_globalConfig={});const on=globalThis.__zod_globalConfig;function yn(t){return t&&Object.assign(on,t),on}function g2(){const t=this._zod;return t.message??(t.message=JSON.stringify(t.def,Gf,2)),t.message}function y2(t){this._zod.message=t}const v2={get:g2,set:y2,enumerable:!0,configurable:!0},xf={value:void 0,enumerable:!1},Cy=new WeakSet([Object.prototype,Error.prototype]),b2=(t,i)=>{t.name="$ZodError",xf.value=i,Object.defineProperty(t,"issues",xf),xf.value=void 0,Object.defineProperty(t,"message",v2);const s=Object.getPrototypeOf(t);Cy.has(s)||(Cy.add(s),Object.defineProperty(s,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},x2=Q("$ZodError",b2);function S2(t,i,s){return Object.prototype.hasOwnProperty.call(t,i)||(i==="__proto__"?Object.defineProperty(t,i,{value:s(),writable:!0,enumerable:!0,configurable:!0}):t[i]=s()),t[i]}function _2(t,i=s=>s.message){const s={},r=[];for(const o of t.issues)o.path.length>0?S2(s,o.path[0],()=>[]).push(i(o)):r.push(i(o));return{formErrors:r,fieldErrors:s}}function w2(t,i=s=>s.message){const s={_errors:[]},r=(o,c=[])=>{for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(h=>r({issues:h},[...c,...d.path]));else if(d.code==="invalid_key")r({issues:d.issues},[...c,...d.path]);else if(d.code==="invalid_element")r({issues:d.issues},[...c,...d.path]);else{const h=[...c,...d.path];if(h.length===0)s._errors.push(i(d));else{let m=s,p=0;for(;p<h.length;){const b=h[p],v=p===h.length-1;if(b==="_errors"){v&&m._errors.push(i(d)),p++;continue}Object.prototype.hasOwnProperty.call(m,b)||Object.defineProperty(m,b,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const x=m[b];v&&x._errors.push(i(d)),m=x,p++}}}};return r(t),s}function Mo(t,i){return{callee:i?.callee??t,Err:i?.Err}}const vd=t=>{const i=(s,r,o,c)=>{const d=o?{...o,async:!1}:{async:!1},h=s._zod.run({value:r,issues:[]},d);if(h instanceof Promise)throw new Ji;if(h.issues.length){const m=new(c?.Err??t)(h.issues.map(p=>_i(p,d,yn())));throw yb(m,c?.callee??i),m}return h.value};return i},bd=t=>{const i=async(s,r,o,c)=>{const d=o?{...o,async:!0}:{async:!0};let h=s._zod.run({value:r,issues:[]},d);if(h instanceof Promise&&(h=await h),h.issues.length){const m=new(c?.Err??t)(h.issues.map(p=>_i(p,d,yn())));throw yb(m,c?.callee??i),m}return h.value};return i},xd=t=>(i,s,r)=>{const o=r?{...r,async:!1}:{async:!1},c=i._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Ji;return c.issues.length?Ob(t,c.issues,o):{success:!0,data:c.value}};function Ob(t,i,s){let r;return{success:!1,get error(){return r||(r=new t(i.map(o=>_i(o,s,yn()))),i=void 0,s=void 0),r},set error(o){r=o,i=void 0,s=void 0}}}const Sd=t=>async(i,s,r)=>{const o=r?{...r,async:!0}:{async:!0};let c=i._zod.run({value:s,issues:[]},o);return c instanceof Promise&&(c=await c),c.issues.length?Ob(t,c.issues,o):{success:!0,data:c.value}},E2=Symbol.for("zod.compile.invalid"),O2=Symbol.for("zod.compile.fallback"),z2=((t,i,s)=>{const r=t._zod.bag.validator;if(r!==void 0){if(r(i)!==E2)return!0;if(r.definite===!0&&s===void 0)return!1}return j2(t,i,s)});function j2(t,i,s){const r=s?{...s,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=t._zod.bag.fallbackRun;let c;if(o?(r[O2]=!0,c=o({value:i,issues:[]},r)):c=t._zod.run({value:i,issues:[]},r),c instanceof Promise)throw new Ji;return c.issues.length===0}const T2=async(t,i,s)=>{const r=s?{...s,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=t._zod.run({value:i,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},N2=t=>{const i=vd(t),s=(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return i(r,o,h,Mo(s,d))};return s},A2=t=>{const i=vd(t),s=(r,o,c,d)=>i(r,o,c,Mo(s,d));return s},R2=t=>{const i=bd(t),s=async(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return await i(r,o,h,Mo(s,d))};return s},C2=t=>{const i=bd(t),s=async(r,o,c,d)=>await i(r,o,c,Mo(s,d));return s},M2=t=>(i,s,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return xd(t)(i,s,o)},D2=t=>(i,s,r)=>xd(t)(i,s,r),k2=t=>async(i,s,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Sd(t)(i,s,o)},U2=t=>async(i,s,r)=>Sd(t)(i,s,r),L2=/^[cC][0-9a-z]{6,}$/,Z2=/^[0-9a-z]+$/,q2=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,B2=/^[0-9a-vA-V]{20}$/,H2=/^[A-Za-z0-9]{27}$/,$2=/^[a-zA-Z0-9_-]{21}$/;function Q2(t){return new RegExp(`^[a-zA-Z0-9_-]{${t}}$`)}const G2=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,K2=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,My=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Y2=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,F2="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function V2(){return new RegExp(F2,"u")}const P2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,X2=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,J2=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,I2=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,W2=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,eE=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,tE=/^https?$/,nE=/^\+[1-9]\d{6,14}$/,zb="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function iE(t){return new RegExp(`^${t}$`)}const aE=iE(zb);function Yf(t){const i="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${i}`:t.precision===0?`${i}:[0-5]\\d`:`${i}:[0-5]\\d\\.\\d{${t.precision}}`:t.seconds?`${i}:[0-5]\\d(?:\\.\\d+)?`:`${i}(?::[0-5]\\d(?:\\.\\d+)?)?`}function sE(t){return new RegExp(`^${Yf(t)}$`)}function rE(t){const i=["Z"];t.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${Yf({precision:t.precision,seconds:!0})}(?:${i.join("|")})`,r=t.local?`${s}|${Yf({precision:t.precision})}`:s;return new RegExp(`^${zb}T(?:${r})$`)}const lE=/^[\s\S]{0,}$/,oE=/^-?\d+$/,_d=/^-?\d+(?:\.\d+)?$/,uE=/^(?:true|false)$/i,cE=/^[^A-Z]*$/,fE=/^[^a-z]*$/,Rt=Q("$ZodCheck",(t,i)=>{var s;t._zod??(t._zod={}),t._zod.def=i,(s=t._zod).onattach??(s.onattach=[])}),wd=t=>{const i=t.value;return!Gw(i)&&i.length!==void 0},xo={number:"number",bigint:"bigint",object:"date"},jb=Q("$ZodCheckLessThan",(t,i)=>{Rt.init(t,i);const s=xo[typeof i.value];t._zod.check=r=>{(i.inclusive?r.value<=i.value:r.value<i.value)||r.issues.push({origin:xo[typeof r.value]??s,code:"too_big",maximum:typeof i.value=="object"?i.value.getTime():i.value,input:r.value,inclusive:i.inclusive,inst:t,continue:!i.abort})}}),Tb=Q("$ZodCheckGreaterThan",(t,i)=>{Rt.init(t,i);const s=xo[typeof i.value];t._zod.check=r=>{(i.inclusive?r.value>=i.value:r.value>i.value)||r.issues.push({origin:xo[typeof r.value]??s,code:"too_small",minimum:typeof i.value=="object"?i.value.getTime():i.value,input:r.value,inclusive:i.inclusive,inst:t,continue:!i.abort})}}),dE=Q("$ZodCheckMultipleOf",(t,i)=>{Rt.init(t,i),t._zod.check=s=>{if(typeof s.value!=typeof i.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof s.value=="bigint"?i.value!==BigInt(0)&&s.value%i.value===BigInt(0):Kw(s.value,i.value)===0)||s.issues.push({origin:typeof s.value,code:"not_multiple_of",divisor:i.value,input:s.value,inst:t,continue:!i.abort})}}),hE=Q("$ZodCheckNumberFormat",(t,i)=>{Rt.init(t,i),i.format=i.format||"float64";const s=i.format?.includes("int"),r=s?"int":"number",[o,c]=xb[i.format];t._zod.check=d=>{const h=d.value;if(s){if(!Number.isInteger(h)){d.issues.push({expected:r,format:i.format,code:"invalid_type",continue:!1,input:h,inst:t});return}if(!Number.isSafeInteger(h)){h>0?d.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!i.abort}):d.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!i.abort});return}}h<o&&d.issues.push({origin:"number",input:h,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!i.abort}),h>c&&d.issues.push({origin:"number",input:h,code:"too_big",maximum:c,inclusive:!0,inst:t,continue:!i.abort})}}),mE=Q("$ZodCheckMaxLength",(t,i)=>{var s;Rt.init(t,i),(s=t._zod.def).when??(s.when=wd),t._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>i.maximum?gd(o):c)<=i.maximum)return;const h=yd(o);r.issues.push({origin:h,code:"too_big",maximum:i.maximum,inclusive:!0,input:o,inst:t,continue:!i.abort})}}),pE=Q("$ZodCheckMinLength",(t,i)=>{var s;Rt.init(t,i),(s=t._zod.def).when??(s.when=wd),t._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>=i.minimum&&c<i.minimum*2?gd(o):c)>=i.minimum)return;const h=yd(o);r.issues.push({origin:h,code:"too_small",minimum:i.minimum,inclusive:!0,input:o,inst:t,continue:!i.abort})}}),gE=Q("$ZodCheckLengthEquals",(t,i)=>{var s;Rt.init(t,i),(s=t._zod.def).when??(s.when=wd),t._zod.check=r=>{const o=r.value,c=o.length,d=typeof o=="string"&&c>=i.length&&c<=i.length*2?gd(o):c;if(d===i.length)return;const h=yd(o),m=d>i.length;r.issues.push({origin:h,...m?{code:"too_big",maximum:i.length}:{code:"too_small",minimum:i.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!i.abort})}}),Do=Q("$ZodCheckStringFormat",(t,i)=>{var s,r;Rt.init(t,i),i.pattern?(s=t._zod).check??(s.check=o=>{i.pattern.lastIndex=0,!i.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:i.format,input:o.value,...i.pattern?{pattern:i.pattern.toString()}:{},inst:t,continue:!i.abort})}):(r=t._zod).check??(r.check=()=>{})}),yE=Q("$ZodCheckRegex",(t,i)=>{Do.init(t,i),t._zod.check=s=>{i.pattern.lastIndex=0,!i.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:"regex",input:s.value,pattern:i.pattern.toString(),inst:t,continue:!i.abort})}}),vE=Q("$ZodCheckLowerCase",(t,i)=>{i.pattern??(i.pattern=cE),Do.init(t,i)}),bE=Q("$ZodCheckUpperCase",(t,i)=>{i.pattern??(i.pattern=fE),Do.init(t,i)}),xE=Q("$ZodCheckIncludes",(t,i)=>{Rt.init(t,i);const s=ns(i.includes),r=new RegExp(typeof i.position=="number"?`^.{${i.position},}${s}`:s);i.pattern=r,t._zod.check=o=>{o.value.includes(i.includes,i.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:i.includes,input:o.value,inst:t,continue:!i.abort})}}),SE=Q("$ZodCheckStartsWith",(t,i)=>{Rt.init(t,i);const s=new RegExp(`^${ns(i.prefix)}.*`);i.pattern??(i.pattern=s),t._zod.check=r=>{r.value.startsWith(i.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:i.prefix,input:r.value,inst:t,continue:!i.abort})}}),_E=Q("$ZodCheckEndsWith",(t,i)=>{Rt.init(t,i);const s=new RegExp(`.*${ns(i.suffix)}$`);i.pattern??(i.pattern=s),t._zod.check=r=>{r.value.endsWith(i.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:i.suffix,input:r.value,inst:t,continue:!i.abort})}}),wE=Q("$ZodCheckOverwrite",(t,i)=>{Rt.init(t,i),t._zod.check=s=>{s.value=i.tx(s.value)}});class EE{constructor(i=[],s={}){this.content=[],this.indent=0,this.args=i,this.closed=s}indented(i){this.indent+=1;try{i(this)}finally{this.indent-=1}}write(i){if(typeof i=="function"){i(this,{execution:"sync"}),i(this,{execution:"async"});return}const r=i.split(`
|
|
11
|
-
`).filter(d=>d),o=Math.min(...r.map(d=>d.length-d.trimStart().length)),c=r.map(d=>d.slice(o)).map(d=>" ".repeat(this.indent*2)+d);for(const d of c)this.content.push(d)}compile(){const i=Function,s=this?.content??[""];return new i(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
12
|
-
${s.join(`
|
|
13
|
-
`)}
|
|
14
|
-
};`)(...Object.values(this.closed))}}const OE={major:4,minor:6,patch:7},Ge=Q("$ZodType",(t,i)=>{var s;t??(t={}),t._zod.def=i,t._zod.bag=t._zod.bag||{},t._zod.version=OE;const r=t._zod.def.checks,o=t._zod.traits.has("$ZodCheck")?[t,...r??[]]:r?.length?[...r]:[];for(const c of o)for(const d of c._zod.onattach)d(t);if(o.length===0)(s=t._zod).deferred??(s.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const c=(h,m,p)=>{if(h.memo)return h;let b=Zn(h),v;for(const x of m){if(x._zod.def.when){if(s2(h)||!x._zod.def.when(h))continue}else if(b)continue;const S=h.issues.length,w=x._zod.check(h);if(w instanceof Promise&&p?.async===!1)throw new Ji;if(v||w instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await w,h.issues.length!==S&&(Kf(h.issues,S,t),b||(b=Zn(h,S)))});else{if(h.issues.length===S)continue;Kf(h.issues,S,t),b||(b=Zn(h,S))}}return v?v.then(()=>h):h},d=(h,m,p)=>{if(Zn(h))return h.aborted=!0,h;const b=c(m,o,p);if(b instanceof Promise){if(p.async===!1)throw new Ji;return b.then(v=>t._zod.parse(v,p))}return t._zod.parse(b,p)};t._zod.run=(h,m)=>{if(m.skipChecks)return t._zod.parse(h,m);if(m.direction==="backward"){const b=t._zod.parse({value:h.value,issues:[]},{...m,skipChecks:!0});return b instanceof Promise?b.then(v=>d(v,h,m)):d(b,h,m)}const p=t._zod.parse(h,m);if(p instanceof Promise){if(m.async===!1)throw new Ji;return p.then(b=>c(b,o,m))}return c(p,o,m)}}},{get"~standard"(){return _b(this,"~standard",Ab(this))},set"~standard"(t){wi(this,"~standard",t)}}),Nb=(t,i)=>t.issues.length?{issues:t.issues.map(s=>_i(s,i,yn()))}:{value:t.value};async function zE(t,i){const s={async:!0};return Nb(await t._zod.run({value:i,issues:[]},s),s)}function Ab(t){return{validate:i=>{const s={async:!1};try{const r=t._zod.run({value:i,issues:[]},s);if(!(r instanceof Promise))return Nb(r,s)}catch{}return zE(t,i)},vendor:"zod",version:1}}const Ed=Q("$ZodString",(t,i)=>{Ge.init(t,i),t._zod.pattern=i.pattern??lE,t._zod.parse=(s,r)=>{if(i.coerce)try{s.value=String(s.value)}catch{}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:t}),s}}),Qe=Q("$ZodStringFormat",(t,i)=>{Do.init(t,i),Ed.init(t,i)}),jE=Q("$ZodGUID",(t,i)=>{i.pattern??(i.pattern=K2),Qe.init(t,i)}),TE=Q("$ZodUUID",(t,i)=>{if(i.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[i.version];if(r===void 0)throw new Error(`Invalid UUID version: "${i.version}"`);i.pattern??(i.pattern=My(r))}else i.pattern??(i.pattern=My());Qe.init(t,i)}),NE=Q("$ZodEmail",(t,i)=>{i.pattern??(i.pattern=Y2),Qe.init(t,i)}),Rb=1,So=2;function Cb(t){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(t):(new URL(t),!0)}catch{return!1}}function AE(t,i){return!("normalize"in i)&&!("hostname"in i)&&!("protocol"in i)?Cb(t)||So:RE(t,i)}function RE(t,i){if(!i.normalize&&i.protocol?.source===tE.source&&!/^https?:\/\//i.test(t))return Rb;try{if(typeof URL<"u"){const s=URL;if(typeof s.parse=="function")return s.parse(t)??So}return new URL(t)}catch{return So}}const CE=/[\t\n\r]/g;function Dy(t){return t.replace(CE,"")}function ME(t,i){return i.lastIndex=0,i.test(t.hostname)}function DE(t,i){return i.lastIndex=0,i.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}const kE=Q("$ZodURL",(t,i)=>{Qe.init(t,i),t._zod.check=s=>{try{const r=s.value.trim(),o=AE(r,i);if(o===Rb){s.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:s.value,inst:t,continue:!i.abort});return}if(o===So){s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:t,continue:!i.abort});return}if(o===!0){s.value=Dy(r);return}i.hostname&&!ME(o,i.hostname)&&s.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:i.hostname.source,input:s.value,inst:t,continue:!i.abort}),i.protocol&&!DE(o,i.protocol)&&s.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:i.protocol.source,input:s.value,inst:t,continue:!i.abort}),s.value=i.normalize?o.href:Dy(r);return}catch{s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:t,continue:!i.abort})}}}),UE=Q("$ZodEmoji",(t,i)=>{i.pattern??(i.pattern=V2()),Qe.init(t,i)}),LE=Q("$ZodNanoID",(t,i)=>{if(i.length!==void 0&&(!Number.isInteger(i.length)||i.length<1))throw new Error(`Invalid nanoid length: ${i.length}`);i.pattern??(i.pattern=i.length===void 0?$2:Q2(i.length)),Qe.init(t,i)}),ZE=Q("$ZodCUID",(t,i)=>{i.pattern??(i.pattern=L2),Qe.init(t,i)}),qE=Q("$ZodCUID2",(t,i)=>{i.pattern??(i.pattern=Z2),Qe.init(t,i)}),BE=Q("$ZodULID",(t,i)=>{i.pattern??(i.pattern=q2),Qe.init(t,i)}),HE=Q("$ZodXID",(t,i)=>{i.pattern??(i.pattern=B2),Qe.init(t,i)}),$E=Q("$ZodKSUID",(t,i)=>{i.pattern??(i.pattern=H2),Qe.init(t,i)}),QE=Q("$ZodISODateTime",(t,i)=>{i.pattern??(i.pattern=rE(i)),Qe.init(t,i)}),GE=Q("$ZodISODate",(t,i)=>{i.pattern??(i.pattern=aE),Qe.init(t,i)}),KE=Q("$ZodISOTime",(t,i)=>{i.pattern??(i.pattern=sE(i)),Qe.init(t,i)}),YE=Q("$ZodISODuration",(t,i)=>{i.pattern??(i.pattern=G2),Qe.init(t,i)}),FE=Q("$ZodIPv4",(t,i)=>{i.pattern??(i.pattern=P2),Qe.init(t,i)}),VE=/^[0-9a-fA-F:.]+$/;function Mb(t){return VE.test(t)?Cb(`http://[${t}]`):!1}const PE=Q("$ZodIPv6",(t,i)=>{i.pattern??(i.pattern=X2),Qe.init(t,i),t._zod.check=s=>{Mb(s.value)||s.issues.push({code:"invalid_format",format:"ipv6",input:s.value,inst:t,continue:!i.abort})}}),XE=Q("$ZodCIDRv4",(t,i)=>{i.pattern??(i.pattern=J2),Qe.init(t,i)});function JE(t){const i=t.split("/");if(i.length!==2)return!1;const[s,r]=i;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:Mb(s)}const IE=Q("$ZodCIDRv6",(t,i)=>{i.pattern??(i.pattern=I2),Qe.init(t,i),t._zod.check=s=>{JE(s.value)||s.issues.push({code:"invalid_format",format:"cidrv6",input:s.value,inst:t,continue:!i.abort})}});function Db(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const kb=/^[0-9a-zA-Z+/]*={0,2}$/,WE=Q("$ZodBase64",(t,i)=>{i.pattern??(i.pattern=kb),Qe.init(t,i),t._zod.check=s=>{Db(s.value)||s.issues.push({code:"invalid_format",format:"base64",input:s.value,inst:t,continue:!i.abort})}}),Od=/^[A-Za-z0-9_-]*$/;function eO(t){if(!Od.test(t))return!1;const i=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),s=i.padEnd(Math.ceil(i.length/4)*4,"=");return Db(s)}const tO=Q("$ZodBase64URL",(t,i)=>{i.pattern??(i.pattern=Od),Qe.init(t,i),t._zod.check=s=>{eO(s.value)||s.issues.push({code:"invalid_format",format:"base64url",input:s.value,inst:t,continue:!i.abort})}}),nO=Q("$ZodE164",(t,i)=>{i.pattern??(i.pattern=nE),Qe.init(t,i)});function iO(t,i=null){try{const s=t.split(".");if(s.length!==3)return!1;const[r]=s;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||i&&(!("alg"in o)||o.alg!==i))}catch{return!1}}const aO=Q("$ZodJWT",(t,i)=>{Qe.init(t,i),t._zod.check=s=>{iO(s.value,i.alg)||s.issues.push({code:"invalid_format",format:"jwt",input:s.value,inst:t,continue:!i.abort})}}),Ub=Q("$ZodNumber",(t,i)=>{Ge.init(t,i),t._zod.pattern=_d,t._zod.parse=(s,r)=>{if(i.coerce)try{s.value=Number(s.value)}catch{}const o=s.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return s;const c=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return s.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...c?{received:c}:{}}),s}}),sO=Q("$ZodNumberFormat",(t,i)=>{hE.init(t,i),Ub.init(t,i)}),rO=Q("$ZodBoolean",(t,i)=>{Ge.init(t,i),t._zod.pattern=uE,t._zod.parse=(s,r)=>{if(i.coerce)try{s.value=!!s.value}catch{}const o=s.value;return typeof o=="boolean"||s.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),s}}),lO=Q("$ZodUnknown",(t,i)=>{Ge.init(t,i),t._zod.parse=s=>s}),oO=Q("$ZodNever",(t,i)=>{Ge.init(t,i),t._zod.parse=(s,r)=>(s.issues.push({expected:"never",code:"invalid_type",input:s.value,inst:t}),s)});function uO(t,i){const s=Ny(t._zod.def.checks);if(!s.length)return;const r=Math.min(...s.map(c=>c[0])),o=t._zod.parse;t._zod.parse=(c,d)=>{const h=i(c.value);if(h>r&&!d?.skipChecks&&d?.direction!=="backward"){for(const[m,p]of Ny(t._zod.def.checks))if(h>m&&p._zod.def.when(c)){const b=c.issues.length;return p._zod.check(c),c.issues[b].continue=!1,Kf(c.issues,b,t),c}}return o(c,d)}}const cO=t=>Array.isArray(t)?t.length:-1;function ky(t,i,s){t.issues.length&&i.issues.push(...Fa(s,t.issues)),i.value[s]=t.value}const fO=Q("$ZodArray",(t,i)=>{Ge.init(t,i);const s=on.memoizer;s?.attach(t),t._zod.parse=(r,o)=>{const c=r.value;if(!Array.isArray(c))return r.issues.push({expected:"array",code:"invalid_type",input:c,inst:t}),r;r.value=s?s.alloc(t,r,Array(c.length),o):Array(c.length);const d=[],h=o?.abortEarly;for(let m=0;m<c.length;m++){const p=c[m],b=i.element._zod.run({value:p,issues:[]},o);if(b instanceof Promise)d.push(b.then(v=>ky(v,r,m)));else if(ky(b,r,m),h&&b.issues.length!==0&&Zn(b))break}return d.length?Promise.all(d).then(()=>r):r},uO(t,cO)});function _o(t,i,s,r,o,c){const d=s in r,h=c==="optional";if(!(!d&&h&&o==="optional")){if(t.issues.length){if(o!==void 0&&h&&!d)return;i.issues.push(...Fa(s,t.issues))}if(!d&&o===void 0){t.issues.length||i.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[s]});return}t.value===void 0?(d||o==="defaulted"&&!h)&&(i.value[s]=void 0):i.value[s]=t.value}}const dO=[];function Lb(t){const i=Object.keys(t.shape),s=Object.getOwnPropertySymbols(t.shape),r=s.length?s:dO,o=r.length?[...i,...r]:i;for(const d of o)if(!t.shape?.[d]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(d)}": expected a Zod schema`);const c=Jw(t.shape);return{...t,allKeys:o,symbolKeys:r,keySet:new Set(i),numKeys:i.length,optionalKeys:new Set(c)}}function Zb(t,i,s,r,o,c,d){const h=[],m=o.keySet,p=o.catchall._zod,b=p.def.type,v=p.optin,x=p.optout;let S=0;for(const w in i){if(d&&s.issues.length!==S){if(Zn(s,S))break;S=s.issues.length}if(m.has(w))continue;if(w==="__proto__"){b==="never"&&h.push(w);continue}if(b==="never"){h.push(w);continue}const E=p.run({value:i[w],issues:[]},r);E instanceof Promise?t.push(E.then(j=>_o(j,s,w,i,v,x))):_o(E,s,w,i,v,x)}return h.length&&s.issues.push({code:"unrecognized_keys",keys:h,input:i,inst:c,continue:!0}),t.length?Promise.all(t).then(()=>s):s}const hO=Q("$ZodObject",(t,i)=>{Ge.init(t,i);const s=Object.getOwnPropertyDescriptor(i,"shape"),r=s?.get?s.get.raw:i.shape??{};if(r){const p=()=>{const b={...r};return Object.defineProperty(i,"shape",{value:b}),p.raw=b,b};p.raw=r,Object.defineProperty(i,"shape",{get:p})}const o=md(()=>Lb(i));Re(t,"propValues",p=>{const b=p.def.shape,v={};for(const x in b){const S=b[x]._zod;if(S.values){Object.prototype.hasOwnProperty.call(v,x)||Oi(v,x,new Set);for(const w of S.values)v[x].add(w);S.optin!==void 0&&v[x].add(void 0)}}return v});const c=bo,d=i.catchall;let h;const m=on.memoizer;m?.attach(t),t._zod.parse=(p,b)=>{h??(h=o.value);const v=p.value;if(!c(v))return p.issues.push({expected:"object",code:"invalid_type",input:v,inst:t}),p;p.value=m?m.alloc(t,p,{},b):{};const x=[],S=h.shape,w=b?.abortEarly;let E=p.issues.length;for(const j of h.allKeys){if(w&&p.issues.length!==E){if(Zn(p,E))break;E=p.issues.length}if(j==="__proto__")continue;const A=S[j],k=A._zod.optin,G=A._zod.optout,Y=A._zod.run({value:v[j],issues:[]},b);Y instanceof Promise?x.push(Y.then(P=>_o(P,p,j,v,k,G))):_o(Y,p,j,v,k,G)}return d?Zb(x,v,p,b,o.value,t,w===!0):x.length?Promise.all(x).then(()=>p):p}}),mO=Q("$ZodObjectJIT",(t,i)=>{hO.init(t,i);const s=t._zod.parse,r=md(()=>Lb(i)),o=on.memoizer,c=S=>{const w=r.value,E=w.symbolKeys,j=new EE(["payload","ctx"],{shape:S,inst:t,memo:o,syms:E}),A=P=>`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`,k=(P,Z)=>`
|
|
15
|
-
let ${P}_ab = false;
|
|
16
|
-
for (let i = 0; i < ${P}.issues.length; i++) {
|
|
17
|
-
const iss = ${P}.issues[i];
|
|
18
|
-
iss.path = iss.path ? [${Z}, ...iss.path] : [${Z}];
|
|
19
|
-
payload.issues.push(iss);
|
|
20
|
-
if (iss.continue !== true) ${P}_ab = true;
|
|
21
|
-
}
|
|
22
|
-
if (${P}_ab && ctx && ctx.abortEarly) {
|
|
23
|
-
payload.value = newResult;
|
|
24
|
-
return payload;
|
|
25
|
-
}`;j.write("const input = payload.value;");const G=Object.create(null);let Y=0;for(const P of w.allKeys)G[P]=`key_${Y++}`;j.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const P of w.allKeys){if(P==="__proto__")continue;const Z=G[P],R=typeof P=="symbol"?`syms[${E.indexOf(P)}]`:Fw(P),I=`${R} in input`,V=S[P],ee=V?._zod?.optin,re=ee!==void 0,ie=V?._zod?.optout==="optional";if(j.write(`const ${Z} = ${A(R)};`),re&&ie){const he=ee==="optional"?`${Z}_present`:`${Z}.value !== undefined || ${Z}_present`;j.write(`
|
|
26
|
-
const ${Z}_present = ${I};
|
|
27
|
-
if (!${Z}.issues.length || ${Z}_present) {
|
|
28
|
-
if (${Z}.issues.length) {${k(Z,R)}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (${he}) {
|
|
32
|
-
newResult[${R}] = ${Z}.value;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
`)}else re?(j.write(`
|
|
37
|
-
if (${Z}.issues.length) {${k(Z,R)}
|
|
38
|
-
}
|
|
39
|
-
`),ee==="defaulted"?j.write(`newResult[${R}] = ${Z}.value;`):j.write(`
|
|
40
|
-
if (${Z}.value !== undefined || ${I}) {
|
|
41
|
-
newResult[${R}] = ${Z}.value;
|
|
42
|
-
}
|
|
43
|
-
`)):j.write(`
|
|
44
|
-
const ${Z}_present = ${I};
|
|
45
|
-
if (${Z}.issues.length) {${k(Z,R)}
|
|
46
|
-
}
|
|
47
|
-
if (!${Z}_present && !${Z}.issues.length) {
|
|
48
|
-
payload.issues.push({
|
|
49
|
-
code: "invalid_type",
|
|
50
|
-
expected: "nonoptional",
|
|
51
|
-
input: undefined,
|
|
52
|
-
path: [${R}]
|
|
53
|
-
});
|
|
54
|
-
if (ctx && ctx.abortEarly) {
|
|
55
|
-
payload.value = newResult;
|
|
56
|
-
return payload;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (${Z}_present) {
|
|
61
|
-
newResult[${R}] = ${Z}.value;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
`)}return j.write("payload.value = newResult;"),j.write("return payload;"),j.compile()};let d;const h=bo,m=!on.jitless,b=m&&Pw.value,v=i.catchall;let x;t._zod.parse=(S,w)=>{x??(x=r.value);const E=S.value;return h(E)?m&&b&&w?.async===!1&&w.jitless!==!0?(d||(d=c(i.shape)),S=d(S,w),v?Zb([],E,S,w,x,t,w?.abortEarly===!0):S):s(S,w):(S.issues.push({expected:"object",code:"invalid_type",input:E,inst:t}),S)}});function Uy(t,i,s,r){for(const c of t)if(c.issues.length===0)return i.value=c.value,i;const o=t.filter(c=>!Zn(c));return o.length===1?(i.value=o[0].value,o[0]):(i.issues.push({code:"invalid_union",input:i.value,inst:s,errors:t.map(c=>c.issues.map(d=>_i(d,r,yn())))}),i)}const pO=Q("$ZodUnion",(t,i)=>{Ge.init(t,i),Re(t,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),Re(t,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Re(t,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),Re(t,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){const o=r.def.options.map(c=>c._zod.pattern);return new RegExp(`^(${o.map(c=>pd(c.source)).join("|")})$`)}});const s=i.options.length===1?i.options[0]._zod.run:null;t._zod.parse=(r,o)=>{if(s)return s(r,o);let c=!1;const d=[];for(const h of i.options){const m=h._zod.run({value:r.value,issues:[]},o);if(m instanceof Promise)d.push(m),c=!0;else{if(m.issues.length===0)return m;d.push(m)}}return c?Promise.all(d).then(h=>Uy(h,r,t,o)):Uy(d,r,t,o)}}),gO=Q("$ZodIntersection",(t,i)=>{Ge.init(t,i),t._zod.parse=(s,r)=>{const o=s.value,c=i.left._zod.run({value:o,issues:[]},r),d=i.right._zod.run({value:o,issues:[]},r);return c instanceof Promise||d instanceof Promise?Promise.all([c,d]).then(([m,p])=>Ly(s,m,p)):Ly(s,c,d)}});function Ff(t,i){if(t===i)return{valid:!0,data:t};if(t instanceof Date&&i instanceof Date&&+t==+i)return{valid:!0,data:t};if(ts(t)&&ts(i)){const s=Object.keys(i),r=Object.keys(t).filter(c=>s.indexOf(c)!==-1),o={...t,...i};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const c of r){if(c==="__proto__")continue;const d=Ff(t[c],i[c]);if(!d.valid)return{valid:!1,mergeErrorPath:[c,...d.mergeErrorPath]};o[c]=d.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(i)){if(t.length!==i.length)return{valid:!1,mergeErrorPath:[]};const s=[];for(let r=0;r<t.length;r++){const o=t[r],c=i[r],d=Ff(o,c);if(!d.valid)return{valid:!1,mergeErrorPath:[r,...d.mergeErrorPath]};s.push(d.data)}return{valid:!0,data:s}}return{valid:!1,mergeErrorPath:[]}}function Ly(t,i,s){const r=new Map;let o;const c=new Map,d=(p,b)=>{let v;if(p.code==="unrecognized_keys"&&!p.path?.length)o??(o=p),v=p.keys;else if(p.code==="invalid_key"&&p.origin==="record"&&p.path?.length===1){const x=String(p.path[0]);c.has(x)||c.set(x,p),v=[x]}else return!1;for(const x of v)r.has(x)||r.set(x,{}),r.get(x)[b]=!0;return!0};for(const p of i.issues)d(p,"l")||t.issues.push(p);for(const p of s.issues)d(p,"r")||t.issues.push(p);const h=[...r].filter(([,p])=>p.l&&p.r).map(([p])=>p);if(h.length){const p=o?h.filter(b=>o.keys.includes(b)):[];p.length&&t.issues.push({...o,keys:p});for(const b of h)!p.includes(b)&&c.has(b)&&t.issues.push(c.get(b))}const m=Ff(i.value,s.value);if(!m.valid){if(Zn(t))return t;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(m.mergeErrorPath)}`)}return t.value=m.data,t}const yO=Q("$ZodRecord",(t,i)=>{Ge.init(t,i);const s=on.memoizer;s?.attach(t),t._zod.parse=(r,o)=>{const c=r.value;if(!ts(c))return r.issues.push({expected:"record",code:"invalid_type",input:c,inst:t}),r;const d=[],h=i.keyType._zod.values;if(h&&!i.partial){r.value=s?s.alloc(t,r,{},o):{};const m=new Set;for(const b of h)if(typeof b=="string"||typeof b=="number"||typeof b=="symbol"){if(m.add(typeof b=="number"?b.toString():b),b==="__proto__")continue;const v=i.keyType._zod.run({value:b,issues:[]},o);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(v.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(w=>_i(w,o,yn())),input:b,path:[b],inst:t});continue}const x=v.value;if(x==="__proto__")continue;const S=i.valueType._zod.run({value:c[b],issues:[]},o);S instanceof Promise?d.push(S.then(w=>{w.issues.length&&r.issues.push(...Fa(b,w.issues)),r.value[x]=w.value})):(S.issues.length&&r.issues.push(...Fa(b,S.issues)),r.value[x]=S.value)}let p;for(const b in c)if(!m.has(b))if(i.mode==="loose"){if(b==="__proto__")continue;r.value[b]=c[b]}else p=p??[],p.push(b);p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:c,inst:t,keys:p,continue:!0})}else{r.value=s?s.alloc(t,r,{},o):{};let m;for(const p of Reflect.ownKeys(c)){if(p==="__proto__"||!Object.prototype.propertyIsEnumerable.call(c,p))continue;let b=i.keyType._zod.run({value:p,issues:[]},o);if(b instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&_d.test(p)&&b.issues.length){const w=i.keyType._zod.run({value:Number(p),issues:[]},o);if(w instanceof Promise)throw new Error("Async schemas not supported in object keys currently");w.issues.length===0&&(b=w)}if(b.issues.length){i.mode==="loose"?r.value[p]=c[p]:h?(m=m??[],m.push(p)):r.issues.push({code:"invalid_key",origin:"record",issues:b.issues.map(w=>_i(w,o,yn())),input:p,path:[p],inst:t});continue}const x=b.value;if(x==="__proto__")continue;const S=i.valueType._zod.run({value:c[p],issues:[]},o);S instanceof Promise?d.push(S.then(w=>{w.issues.length&&r.issues.push(...Fa(p,w.issues)),r.value[x]=w.value})):(S.issues.length&&r.issues.push(...Fa(p,S.issues)),r.value[x]=S.value)}m&&m.length>0&&r.issues.push({code:"unrecognized_keys",input:c,inst:t,keys:m,continue:!0})}return d.length?Promise.all(d).then(()=>r):r}}),vO=Q("$ZodEnum",(t,i)=>{Ge.init(t,i);const s=Qf(i.entries),r=new Set(s);t._zod.values=r,Re(t,"pattern",o=>{const c=Qf(o.def.entries).filter(d=>Xw.has(typeof d));return new RegExp(c.length?`^(${c.map(d=>ns(d.toString())).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(o,c)=>{const d=o.value;return r.has(d)||o.issues.push({code:"invalid_value",values:s,input:d,inst:t}),o}}),bO=Q("$ZodLiteral",(t,i)=>{Ge.init(t,i);const s=new Set(i.values);t._zod.values=s,Re(t,"pattern",r=>{const o=r.def.values;return new RegExp(o.length?`^(${o.map(c=>typeof c=="string"?ns(c):c?ns(c.toString()):String(c)).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(r,o)=>{const c=r.value;return s.has(c)||r.issues.push({code:"invalid_value",values:i.values,input:c,inst:t}),r}}),xO=Q("$ZodTransform",(t,i)=>{Ge.init(t,i),t._zod.optin="optional",on.memoizer?.guard(t),t._zod.parse=(s,r)=>{if(r.direction==="backward")throw new Eb(t.constructor.name);const o=i.transform(s.value,s);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(d=>(s.value=d,s));if(o instanceof Promise)throw new Ji;return s.value=o,s}});function Zy(t,i){return t.value=i.issues.length?void 0:i.value,t}const qb=Q("$ZodOptional",(t,i)=>{Ge.init(t,i),Re(t,"optin",s=>s.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",Re(t,"values",s=>{const r=s.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),Re(t,"pattern",s=>{const r=s.def.innerType._zod.pattern;return r?new RegExp(`^(${pd(r.source)})?$`):void 0}),t._zod.parse=(s,r)=>{if(s.value===void 0){if(i.innerType._zod.optin!=="defaulted")return s;const o=i.innerType._zod.run({value:s.value,issues:[]},r);return o instanceof Promise?o.then(c=>Zy(s,c)):Zy(s,o)}return i.innerType._zod.run(s,r)}}),SO=Q("$ZodExactOptional",(t,i)=>{qb.init(t,i),Re(t,"values",s=>s.def.innerType._zod.values),Re(t,"pattern",s=>s.def.innerType._zod.pattern),t._zod.parse=(s,r)=>i.innerType._zod.run(s,r)}),_O=Q("$ZodNullable",(t,i)=>{Ge.init(t,i),Re(t,"optin",s=>s.def.innerType._zod.optin),Re(t,"optout",s=>s.def.innerType._zod.optout),Re(t,"pattern",s=>{const r=s.def.innerType._zod.pattern;return r?new RegExp(`^(${pd(r.source)}|null)$`):void 0}),Re(t,"values",s=>s.def.innerType._zod.values?new Set([...s.def.innerType._zod.values,null]):void 0),t._zod.parse=(s,r)=>s.value===null?s:i.innerType._zod.run(s,r)}),wO=Q("$ZodDefault",(t,i)=>{Ge.init(t,i),t._zod.optin="defaulted",Re(t,"values",s=>s.def.innerType._zod.values),t._zod.parse=(s,r)=>{if(r.direction==="backward")return i.innerType._zod.run(s,r);if(s.value===void 0)return s.value=i.defaultValue,s;const o=i.innerType._zod.run(s,r);return o instanceof Promise?o.then(c=>qy(c,i)):qy(o,i)}});function qy(t,i){return t.value===void 0&&(t.value=i.defaultValue),t}const EO=Q("$ZodPrefault",(t,i)=>{Ge.init(t,i),t._zod.optin="defaulted",Re(t,"values",s=>s.def.innerType._zod.values),t._zod.parse=(s,r)=>(r.direction==="backward"||s.value===void 0&&(s.value=i.defaultValue),i.innerType._zod.run(s,r))}),OO=Q("$ZodNonOptional",(t,i)=>{Ge.init(t,i),Re(t,"values",s=>{const r=s.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),t._zod.parse=(s,r)=>{const o=i.innerType._zod.run(s,r);return o instanceof Promise?o.then(c=>By(c,t)):By(o,t)}});function By(t,i){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:i}),t}function Hy(t,i,s,r){return i.issues.length?(t.value=s.catchValue({...i,value:t.value,error:{issues:i.issues.map(o=>_i(o,r,yn()))},input:t.value}),t):(t.value=i.value,i.memo&&(t.memo=!0),t)}const zO=Q("$ZodCatch",(t,i)=>{Ge.init(t,i),Re(t,"optin",s=>s.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Re(t,"optout",s=>s.def.innerType._zod.optout),Re(t,"values",s=>s.def.innerType._zod.values),t._zod.parse=(s,r)=>{if(r.direction==="backward")return i.innerType._zod.run(s,r);const o=i.innerType._zod.run({value:s.value,issues:[]},r);return o instanceof Promise?o.then(c=>Hy(s,c,i,r)):Hy(s,o,i,r)}}),jO=Q("$ZodPipe",(t,i)=>{Ge.init(t,i),Re(t,"values",s=>s.def.in._zod.values),Re(t,"optin",s=>s.def.in._zod.optin),Re(t,"optout",s=>s.def.out._zod.optout),Re(t,"propValues",s=>s.def.in._zod.propValues),t._zod.parse=(s,r)=>{if(r.direction==="backward"){const c=i.out._zod.run(s,r);return c instanceof Promise?c.then(d=>Xl(d,i.in,r)):Xl(c,i.in,r)}const o=i.in._zod.run(s,r);return o instanceof Promise?o.then(c=>Xl(c,i.out,r)):Xl(o,i.out,r)}});function Xl(t,i,s){return t.issues.some(r=>r.code!=="unrecognized_keys")?(t.aborted=!0,t):i._zod.run({value:t.value,issues:t.issues},s)}const TO=Q("$ZodReadonly",(t,i)=>{Ge.init(t,i),Re(t,"propValues",s=>s.def.innerType._zod.propValues),Re(t,"values",s=>s.def.innerType._zod.values),Re(t,"optin",s=>s.def.innerType?._zod?.optin),Re(t,"optout",s=>s.def.innerType?._zod?.optout),t._zod.parse=(s,r)=>{if(r.direction==="backward")return i.innerType._zod.run(s,r);const o=i.innerType._zod.run(s,r);return o instanceof Promise?o.then($y):$y(o)}});function $y(t){return t.memo||(t.value=Object.freeze(t.value)),t}const NO=Q("$ZodCustom",(t,i)=>{Rt.init(t,i),Ge.init(t,i),t._zod.parse=(s,r)=>s,t._zod.check=s=>{const r=s.value,o=i.fn(r);if(o instanceof Promise)return o.then(c=>Qy(c,s,r,t));Qy(o,s,r,t)}});function Qy(t,i,s,r){if(!t){const o={code:"custom",input:s,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),i.issues.push(Sr(o))}}class AO extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Vf="~memo",Gy=[];function Bb(t){return t!==null&&typeof t=="object"}function Sf(t){return t.map(i=>i.path?{...i,path:i.path.slice()}:{...i})}const Hb=new WeakMap,cr=0,oo=1,hr=2;function uo(t,i,s){const r=Hb.get(t);if(r!==void 0)return r?hr:cr;if(i.has(t))return hr;i.add(t);let o=cr;const c=b=>{if(o!==hr&&b?._zod){const v=uo(b,i);v>o&&(o=v)}},d=(b,v)=>{let x=cr;for(const S of Reflect.ownKeys(b)){const w=Object.getOwnPropertyDescriptor(b,S);if(!w.enumerable)continue;const E=w.get?oo:w.value?._zod?uo(w.value,i):cr;E>x&&(x=E)}return x},h=b=>{b>o&&(o=b)},m=t._zod.def;switch(m.type){case"object":{const b=mb(m);h(b?d(b):oo),c(m.catchall);break}case"array":c(m.element);break;case"tuple":for(const b of m.items)c(b);c(m.rest);break;case"record":case"map":c(m.keyType),c(m.valueType);break;case"set":c(m.valueType);break;case"union":for(const b of m.options)c(b);break;case"intersection":c(m.left),c(m.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":c(m.innerType);break;case"pipe":c(m.in),c(m.out);break;case"function":c(m.input),c(m.output);break;case"lazy":{const b=m._cachedInner??void 0;h(b?uo(b,i):oo);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const b in m){const v=Object.getOwnPropertyDescriptor(m,b);if(!v||v.get)continue;const x=v.value;if(!(!x||typeof x!="object")){if(x._zod)c(x);else if(Array.isArray(x))for(const S of x)c(S)}}}return i.delete(t),RO(t,o)}function RO(t,i){return i!==oo&&Hb.set(t,i===hr),i}function CO(t,i){let s=t.buckets.get(i);return s||(s=new WeakMap,t.buckets.set(i,s)),s}let Jl;const Il=[],MO={alloc(t,i,s){const r=Jl;if(!r)return s;Jl=void 0;const o={value:s,issues:null};return r.set(i.value,o),Il.push(o),s},guard(t){var i;(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred.push(()=>{const s=t._zod.parse,r=(o,c)=>{if(c.direction!=="backward"&&kO(c,o.value))throw new AO;return s(o,c)};t._zod.parse=r,t._zod.run===s&&(t._zod.run=r)})},attach(t){var i;let s,r=!1,o,c;(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred.push(()=>{const d=t._zod.parse,h=(m,p)=>{if(s===void 0){const A=uo(t,new Set);if(A===cr)return t._zod.parse=d,t._zod.run===h&&(t._zod.run=d),d(m,p);A===hr||r?s=!0:r=!0}const b=m.value;if(!Bb(b))return d(m,p);let v=p[Vf];v||(v={buckets:new WeakMap,backEdges:void 0},p[Vf]=v);let x;o===p?x=c:(x=CO(v,t),o=p,c=x);const S=x.get(b);if(S)return m.value=S.value,S.issues?S.issues.length&&m.issues.push(...Sf(S.issues)):(m.memo=!0,v.backEdges??(v.backEdges=new WeakSet),v.backEdges.add(S.value)),m;Jl=x;const w=Il.length,E=d(m,p);Jl=void 0;const j=Il.length>w?Il.pop():void 0;return E instanceof Promise?E.then(A=>(j&&(j.issues=A.issues.length?Sf(A.issues):Gy),A)):(j&&(j.issues=E.issues.length?Sf(E.issues):Gy),E)};t._zod.parse=h,t._zod.run===d&&(t._zod.run=h)})}};function DO(){return MO}function kO(t,i){const s=t[Vf]?.backEdges;return s!==void 0&&Bb(i)&&s.has(i)}const UO=()=>{const t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function i(c){return t[c]??null}const s={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(c,d){return c==="number"&&typeof d=="number"&&!Number.isFinite(d)?String(d):r[c]??c}return c=>{switch(c.code){case"invalid_type":{const d=o(c.expected),h=l2(c.input),m=o(h,c.input);return`Invalid input: expected ${d}, received ${m}`}case"invalid_value":return c.values.length===1?`Invalid input: expected ${bb(c.values[0])}`:`Invalid option: expected one of ${jy(c.values,"|")}`;case"too_big":{const d=c.exact?"exactly ":c.inclusive?"<=":"<",h=i(c.origin);return h?`Too big: expected ${c.origin??"value"} to have ${d}${c.maximum.toString()} ${h.unit??"elements"}`:`Too big: expected ${c.origin??"value"} to be ${d}${c.maximum.toString()}`}case"too_small":{const d=c.exact?"exactly ":c.inclusive?">=":">",h=i(c.origin);return h?`Too small: expected ${c.origin} to have ${d}${c.minimum.toString()} ${h.unit}`:`Too small: expected ${c.origin} to be ${d}${c.minimum.toString()}`}case"invalid_format":{const d=c;return d.format==="starts_with"?`Invalid string: must start with "${d.prefix}"`:d.format==="ends_with"?`Invalid string: must end with "${d.suffix}"`:d.format==="includes"?`Invalid string: must include "${d.includes}"`:d.format==="regex"?`Invalid string: must match pattern ${d.pattern}`:`Invalid ${s[d.format]??c.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${c.divisor}`;case"unrecognized_keys":return`Unrecognized key${c.keys.length>1?"s":""}: ${jy(c.keys,", ")}`;case"invalid_key":return`Invalid key in ${c.origin}`;case"invalid_union":return c.options&&Array.isArray(c.options)&&c.options.length>0?`Invalid discriminator value. Expected ${c.options.map(h=>`'${h}'`).join(" | ")}`:c.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${c.origin}`;default:return"Invalid input"}}};function LO(){return{localeError:UO()}}var Ky;class ZO{constructor(){this._map=new WeakMap,this._idmap=new Map}add(i,...s){const r=s[0];return this._map.set(i,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,i),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(i){const s=this._map.get(i);return s&&typeof s=="object"&&"id"in s&&this._idmap.delete(s.id),this._map.delete(i),this}get(i){const s=i._zod.parent;if(s){const r={...this.get(s)??{}};delete r.id;const o={...r,...this._map.get(i)};return Object.keys(o).length?o:void 0}return this._map.get(i)}has(i){return this._map.has(i)}}function qO(){return new ZO}(Ky=globalThis).__zod_globalRegistry??(Ky.__zod_globalRegistry=qO());const fr=globalThis.__zod_globalRegistry;function $b(t){return t.checks&&(t.checks=[...t.checks]),t}function BO(t,i){return new t($b({type:"string",...le(i)}))}function HO(t,i){return new t({type:"string",format:"email",check:"string_format",abort:!1,...le(i)})}function $O(t,i){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...le(i)})}function QO(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...le(i)})}function GO(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...le(i)})}function KO(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...le(i)})}function YO(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...le(i)})}function FO(t,i){return new t({type:"string",format:"url",check:"string_format",abort:!1,...le(i)})}function VO(t,i){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...le(i)})}function PO(t,i){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...le(i)})}function XO(t,i){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...le(i)})}function JO(t,i){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...le(i)})}function IO(t,i){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...le(i)})}function WO(t,i){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...le(i)})}function ez(t,i){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...le(i)})}function tz(t,i){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...le(i)})}function nz(t,i){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...le(i)})}function iz(t,i){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...le(i)})}function az(t,i){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...le(i)})}function sz(t,i){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...le(i)})}function rz(t,i){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...le(i)})}function lz(t,i){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...le(i)})}function oz(t,i){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...le(i)})}function Qb(t,i){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...le(i)})}function uz(t,i){return new t({type:"string",format:"date",check:"string_format",...le(i)})}function cz(t,i){return new t({type:"string",format:"time",check:"string_format",precision:null,...le(i)})}function fz(t,i){return new t({type:"string",format:"duration",check:"string_format",...le(i)})}function dz(t,i){return new t($b({type:"number",checks:[],...le(i)}))}function hz(t,i){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...le(i)})}function mz(t,i){return new t({type:"boolean",...le(i)})}function pz(t){return new t({type:"unknown"})}function gz(t,i){return new t({type:"never",...le(i)})}function Yy(t,i){return new jb({check:"less_than",...le(i),value:t,inclusive:!1})}function _f(t,i){return new jb({check:"less_than",...le(i),value:t,inclusive:!0})}function Fy(t,i){return new Tb({check:"greater_than",...le(i),value:t,inclusive:!1})}function wf(t,i){return new Tb({check:"greater_than",...le(i),value:t,inclusive:!0})}function Vy(t,i){return new dE({check:"multiple_of",...le(i),value:t})}function Gb(t,i){return new mE({check:"max_length",...le(i),maximum:t})}function wo(t,i){return new pE({check:"min_length",...le(i),minimum:t})}function Kb(t,i){return new gE({check:"length_equals",...le(i),length:t})}function yz(t,i){return new yE({check:"string_format",format:"regex",...le(i),pattern:t})}function vz(t){return new vE({check:"string_format",format:"lowercase",...le(t)})}function bz(t){return new bE({check:"string_format",format:"uppercase",...le(t)})}function xz(t,i){return new xE({check:"string_format",format:"includes",...le(i),includes:t})}function Sz(t,i){return new SE({check:"string_format",format:"starts_with",...le(i),prefix:t})}function _z(t,i){return new _E({check:"string_format",format:"ends_with",...le(i),suffix:t})}function us(t){return new wE({check:"overwrite",tx:t})}function wz(t){return us(i=>i.normalize(t))}function Ez(){return us(t=>t.trim())}function Oz(){return us(t=>t.toLowerCase())}function zz(){return us(t=>t.toUpperCase())}function jz(){return us(t=>Vw(t))}function Tz(t,i,s){return new t({type:"array",element:i,...le(s)})}function Nz(t,i,s){return new t({type:"custom",check:"custom",fn:i,...le(s)})}function Az(t,i){const s=Rz(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Sr(o,r.value,s._zod.def));else{const c=o;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),"input"in c||(c.input=r.value),c.inst??(c.inst=s),c.continue??(c.continue=!s._zod.def.abort),r.issues.push(Sr(c))}},t(r.value,r)),i);return s}function Rz(t,i){const s=new Rt({check:"custom",...le(i)});return s._zod.check=t,s}function mr(t,...i){for(const s of i)for(const r of Reflect.ownKeys(s))Object.prototype.propertyIsEnumerable.call(s,r)&&Oi(t,r,s[r]);return t}function Yb(t){let i=t?.target??"draft-2020-12";return i==="draft-4"&&(i="draft-04"),i==="draft-7"&&(i="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??fr,target:i,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:t?.cycles??"ref",reused:t?.reused??"inline",intersections:[],deferred:[],external:t?.external??void 0}}function Ei(t,i,s,r,o){const c=typeof i.unrepresentable=="function"?i.unrepresentable({zodSchema:t,path:r.path,message:o}):i.unrepresentable;if(c==="any")return!1;if(c===void 0||c==="throw")throw new Error(o);return Object.assign(s,c),!0}function tt(t,i,s={path:[],schemaPath:[]}){var r;const o=t._zod.def,c=i.seen.get(t);if(c)return c.count++,s.schemaPath.includes(t)&&(c.cycle=s.path),c.schema;const d={schema:{},count:1,cycle:void 0,path:s.path};i.seen.set(t,d),i.sharedDefsExtractedFor=void 0,i.sharedEmitDoneFor=void 0;const h=t._zod.toJSONSchema?.();if(h)d.schema=h;else{const b={...s,schemaPath:[...s.schemaPath,t],path:s.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(i,d.schema,b);else{const x=d.schema,S=i.processors[o.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);S(t,i,x,b)}const v=t._zod.parent;v&&(d.ref||(d.ref=v),tt(v,i,b),i.seen.get(v).isParent=!0)}const m=i.metadataRegistry.get(t);return m&&mr(d.schema,m),i.io==="input"&&yt(t)&&(delete d.schema.examples,delete d.schema.default),i.io==="input"&&"_prefault"in d.schema&&((r=d.schema).default??(r.default=d.schema._prefault)),delete d.schema._prefault,i.seen.get(t).schema}function Py(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function Fb(t,i){const s=t.seen.get(i);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");if(t.external&&t.sharedDefsExtractedFor===t.external)return;const r=new Map;for(const d of t.seen.entries()){const h=t.metadataRegistry.get(d[0])?.id;if(h){const m=r.get(h);if(m&&m!==d[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(h,d[0])}}const o=d=>{const h=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const v=t.external.registry.get(d[0])?.id,x=t.external.uri??(w=>w);if(v)return{ref:x(v)};const S=d[1].defId??d[1].schema.id??`schema${t.counter++}`;return d[1].defId=S,{defId:S,ref:`${x("__shared")}#/${h}/${Py(S)}`}}const m="#",p=`${m}/${h}/`;if(d[1]===s&&!d[1].schema.id)return{ref:m};const b=d[1].schema.id??`__schema${t.counter++}`;return{defId:b,ref:p+Py(b)}},c=d=>{if(d[1].schema.$ref)return;const h=d[1],{ref:m,defId:p}=o(d);h.def={...h.schema},p&&(h.defId=p);const b=h.schema;for(const v in b)delete b[v];b.$ref=m};if(t.cycles==="throw")for(const d of t.seen.entries()){const h=d[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
|
|
65
|
-
|
|
66
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of t.seen.entries()){const h=d[1];if(i===d[0]){c(d);continue}if(t.external){const p=t.external.registry.get(d[0])?.id;if(i!==d[0]&&p){c(d);continue}}if(t.metadataRegistry.get(d[0])?.id){c(d);continue}if(h.cycle){c(d);continue}h.count>1&&t.reused==="ref"&&c(d)}t.external&&(t.sharedDefsExtractedFor=t.external)}function Vb(t){const i=t.anyOf;if(!Array.isArray(i)||i.length===0||t.type!==void 0)return;const s=[];for(const r of i){if(!r||typeof r!="object")return;Vb(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const c=r.type;for(const d of Array.isArray(c)?c:[c]){if(typeof d!="string")return;s.includes(d)||s.push(d)}}delete t.anyOf,t.type=s.length===1?s[0]:s}const Pb=new Set(["type","properties","required","additionalProperties"]),Xy=["oneOf","anyOf"];function Jy(t){const i=t.additionalProperties;return i===void 0||i===!1||typeof i!="object"||i===null?null:Object.keys(i).length?i:null}function Pf(t){const i=[];for(const c of t){if(typeof c!="object"||c.type!=="object")return null;for(const d in c)if(!Pb.has(d))return null;i.push(c)}const s={},r=new Set;for(const c of i){for(const d in c.properties){if(Object.prototype.hasOwnProperty.call(s,d))continue;const h=[];for(const p of i){const b=p.properties?.[d]??Jy(p);b!=null&&(h.some(v=>JSON.stringify(v)===JSON.stringify(b))||h.push(b))}const m=h.length===1?h[0]:Pf(h)??{allOf:h};Oi(s,d,m)}for(const d of c.required??[])r.add(d)}const o={type:"object",properties:s};if(r.size&&(o.required=[...r]),i.every(c=>c.additionalProperties===!1))o.additionalProperties=!1;else{const c=[];for(const d of i){const h=Jy(d);h&&!c.some(m=>JSON.stringify(m)===JSON.stringify(h))&&c.push(h)}c.length===1?o.additionalProperties=c[0]:c.length>1&&(o.additionalProperties={allOf:c})}return o}function Cz(t){const i=t.allOf;if(!Array.isArray(i)||i.length<2)return;for(const o of Pb)if(o in t)return;const s=i.filter(o=>Xy.some(c=>Array.isArray(o[c])));let r=null;if(!s.length)r=Pf(i);else{const o=s[0],c=Xy.find(m=>Array.isArray(o[m]));if(Object.keys(o).length!==1)return;const d=i.filter(m=>m!==o),h=o[c].map(m=>Pf([...d,m]));if(h.some(m=>!m))return;r={[c]:h}}r&&(delete t.allOf,mr(t,r))}function Xb(t,i){const s=t.seen.get(i);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const m=t.seen.get(h);if(m.ref===null)return;const p=m.def??m.schema,b={...p},v=m.ref;if(m.ref=null,v){r(v);const S=t.seen.get(v),w=S.schema;if(w.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(w)):mr(p,w),mr(p,b),h._zod.parent===v)for(const j in p)j==="$ref"||j==="allOf"||j in b||delete p[j];if(w.$ref&&S.def)for(const j in p)j==="$ref"||j==="allOf"||j in S.def&&JSON.stringify(p[j])===JSON.stringify(S.def[j])&&delete p[j]}const x=h._zod.parent;if(x&&x!==v){r(x);const S=t.seen.get(x);if(S?.schema.$ref&&(p.$ref=S.schema.$ref,S.def))for(const w in p)w==="$ref"||w==="allOf"||w in S.def&&JSON.stringify(p[w])===JSON.stringify(S.def[w])&&delete p[w]}t.override({zodSchema:h,jsonSchema:p,path:m.path??[]})};if(!t.external||t.sharedEmitDoneFor!==t.external){for(const h of[...t.seen.entries()].reverse())r(h[0]);if(t.target!=="openapi-3.0")for(const h of t.seen.entries())Vb(h[1].def??h[1].schema);for(const h of t.deferred)h();if(t.intersections.length){const h=new Map;for(const m of t.seen.values())for(const p of[m.schema,m.def]){const b=p?.allOf;if(!Array.isArray(b))continue;const v=h.get(b);v?v.push(p):h.set(b,[p])}for(const m of t.intersections)for(const p of h.get(m)??[])Cz(p)}}const o={};if(t.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const h=t.external.registry.get(i)?.id;if(!h)throw new Error("Schema is missing an `id` property");o.$id=t.external.uri(h)}mr(o,s.defId?s.schema:s.def??s.schema);const c=t.metadataRegistry.get(i)?.id;c!==void 0&&o.id===c&&delete o.id;const d=t.external?.defs??{};if(!t.external||t.sharedEmitDoneFor!==t.external)for(const h of t.seen.entries()){const m=h[1];m.def&&m.defId&&(m.def.id===m.defId&&delete m.def.id,Oi(d,m.defId,m.def))}t.external&&(t.sharedEmitDoneFor=t.external),t.external||Object.keys(d).length>0&&(t.target==="draft-2020-12"?o.$defs=d:o.definitions=d);try{const h=JSON.parse(JSON.stringify(o));return Object.defineProperty(h,"~standard",{value:{...i["~standard"],jsonSchema:{input:Eo(i,"input",t.processors),output:Eo(i,"output",t.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function yt(t,i){const s=i??{seen:new Set};if(s.seen.has(t))return!1;s.seen.add(t);const r=t._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return yt(r.element,s);if(r.type==="set")return yt(r.valueType,s);if(r.type==="lazy")return yt(r.getter(),s);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return yt(r.innerType,s);if(r.type==="intersection")return yt(r.left,s)||yt(r.right,s);if(r.type==="record"||r.type==="map")return yt(r.keyType,s)||yt(r.valueType,s);if(r.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:yt(r.in,s)||yt(r.out,s);if(r.type==="object"){for(const o in r.shape)if(yt(r.shape[o],s))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(yt(o,s))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(yt(o,s))return!0;return!!(r.rest&&yt(r.rest,s))}return!1}const Mz=(t,i={})=>s=>{const r=Yb({...s,processors:i});return tt(t,r),Fb(r,t),Xb(r,t)},Eo=(t,i,s={})=>r=>{const{libraryOptions:o,target:c}=r??{},d=Yb({...o??{},target:c,io:i,processors:s});return tt(t,d),Fb(d,t),Xb(d,t)},is=(t,i,s)=>{(t[i]===void 0||s>t[i])&&(t[i]=s)},as=(t,i,s)=>{(t[i]===void 0||s<t[i])&&(t[i]=s)},Iy=(t,i)=>{is(t,"minimum",i),as(t,"maximum",i)},Jb=(t,i)=>{t.multipleOf??(t.multipleOf=[]),t.multipleOf.includes(i)||t.multipleOf.push(i)},Ib=(t,i)=>{t.patterns??(t.patterns=new Set),t.patterns.add(i)},Wb=(t,i)=>{t.mime=t.mime?t.mime.filter(s=>i.includes(s)):[...i]},e0=(t,i)=>{t.format=i,i.includes("int")&&(t.isInt=!0)},Wy=(t,i)=>is(t,"minimum",i.minimum),ev=(t,i)=>as(t,"maximum",i.maximum),tv=t=>(i,s)=>{e0(i,s.format);const[r,o]=t[s.format];is(i,"minimum",r),as(i,"maximum",o)},Dz={greater_than:(t,i)=>is(t,i.inclusive?"minimum":"exclusiveMinimum",i.value),less_than:(t,i)=>as(t,i.inclusive?"maximum":"exclusiveMaximum",i.value),multiple_of:(t,i)=>Jb(t,i.value),number_format:tv(xb),bigint_format:tv(Iw),min_length:Wy,max_length:ev,length_equals:(t,i)=>Iy(t,i.length),min_size:Wy,max_size:ev,size_equals:(t,i)=>Iy(t,i.size),string_format:(t,i)=>{e0(t,i.format),i.pattern&&Ib(t,i.pattern),(i.format==="base64"||i.format==="base64url")&&(t.contentEncoding=i.format),(i.local||i.precision===-1)&&(t.laxFormat=!0)},mime_type:(t,i)=>Wb(t,i.mime)};function rn(t){const i={},s=t._zod.def,r=t._zod.traits.has("$ZodCheck")?[t,...s.checks??[]]:s.checks??[];for(const c of r)Dz[c._zod.def.check]?.(i,c._zod.def);const o=t._zod.bag;o.minimum!==void 0&&is(i,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&is(i,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&as(i,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&as(i,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&Jb(i,o.multipleOf),o.format!==void 0&&(i.format??(i.format=o.format),o.format.includes("int")&&(i.isInt=!0)),o.mime&&Wb(i,o.mime);for(const c of o.patterns??[])Ib(i,c);return i}const kz={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Uz=new Map([[kb,W2],[Od,eE]]),t0=t=>Uz.get(t)??t,Lz=(t,i,s,r)=>{const o=s;o.type="string";const{minimum:c,maximum:d,format:h,patterns:m,contentEncoding:p,laxFormat:b}=rn(t);if(typeof c=="number"&&(o.minLength=c),typeof d=="number"&&(o.maxLength=d),h&&(o.format=kz[h]??h,o.format===""&&delete o.format,(h==="time"||b)&&delete o.format),p&&(o.contentEncoding=p),m&&m.size>0){const v=[...m].map(t0);v.length===1?o.pattern=v[0].source:v.length>1&&(o.allOf=[...v.map(x=>({...i.target==="draft-07"||i.target==="draft-04"||i.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},Zz=(t,i,s,r)=>{const o=s,{minimum:c,maximum:d,multipleOf:h,exclusiveMaximum:m,exclusiveMinimum:p,isInt:b}=rn(t);o.type=b?"integer":"number";const v=typeof p=="number"&&p>=(c??Number.NEGATIVE_INFINITY),x=typeof m=="number"&&m<=(d??Number.POSITIVE_INFINITY),S=i.target==="draft-04"||i.target==="openapi-3.0";if(v?S?(o.minimum=p,o.exclusiveMinimum=!0):o.exclusiveMinimum=p:typeof c=="number"&&(o.minimum=c),x?S?(o.maximum=m,o.exclusiveMaximum=!0):o.exclusiveMaximum=m:typeof d=="number"&&(o.maximum=d),h){const w=new Set;for(const A of h)Number.isFinite(A)&&A!==0?w.add(Math.abs(A)):Ei(t,i,o,r,`A multipleOf divisor of ${A} cannot be represented in JSON Schema`);const[E,...j]=w;E!==void 0&&(o.multipleOf=E),j.length&&(o.allOf=[...o.allOf??[],...j.map(A=>({multipleOf:A}))])}},qz=(t,i,s,r)=>{s.type="boolean"},Bz=(t,i,s,r)=>{s.not={}},Hz=(t,i,s,r)=>{},$z=(t,i,s,r)=>{const o=t._zod.def,c=Qf(o.entries);if(c.length===0){s.not={};return}c.every(d=>typeof d=="number")&&(s.type="number"),c.every(d=>typeof d=="string")&&(s.type="string"),s.enum=c},Qz=(t,i,s,r)=>{const o=t._zod.def;if(o.values.length===0){s.not={};return}const c=[];for(const d of o.values)if(d===void 0){if(Ei(t,i,s,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof d=="bigint"){if(Ei(t,i,s,r,"BigInt literals cannot be represented in JSON Schema"))return;c.push(Number(d))}else c.push(d);if(c.length!==0)if(c.length===1){const d=c[0];s.type=d===null?"null":typeof d,i.target==="draft-04"||i.target==="openapi-3.0"?s.enum=[d]:s.const=d}else c.every(d=>typeof d=="number")&&(s.type="number"),c.every(d=>typeof d=="string")&&(s.type="string"),c.every(d=>typeof d=="boolean")&&(s.type="boolean"),c.every(d=>d===null)&&(s.type="null"),s.enum=c},Gz=(t,i,s,r)=>{Ei(t,i,s,r,"Custom types cannot be represented in JSON Schema")},Kz=(t,i,s,r)=>{Ei(t,i,s,r,"Transforms cannot be represented in JSON Schema")},Yz=(t,i,s,r)=>{const o=s,c=t._zod.def,{minimum:d,maximum:h}=rn(t);typeof d=="number"&&(o.minItems=d),typeof h=="number"&&(o.maxItems=h),o.type="array",o.items=tt(c.element,i,{...r,path:[...r.path,"items"]})};function Oo(t){const i=t._zod.def;return i.type==="pipe"&&i.in._zod.traits.has("$ZodTransform")?Oo(i.out):i.type==="catch"?Oo(i.innerType):t._zod.optin}const Fz=(t,i,s,r)=>{const o=s,c=t._zod.def,d=c.shape;if(Object.getOwnPropertySymbols(d).length&&Ei(t,i,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const p in d)Oi(o.properties,p,tt(d[p],i,{...r,path:[...r.path,"properties",p]}));const m=[];for(const p of Object.keys(d)){const b=c.shape[p];(i.io==="input"?Oo(b)===void 0:b._zod.optout===void 0)&&m.push(p)}m.length>0&&(o.required=m),c.catchall?._zod.def.type==="never"?o.additionalProperties=!1:c.catchall?c.catchall&&(o.additionalProperties=tt(c.catchall,i,{...r,path:[...r.path,"additionalProperties"]})):i.io==="output"&&(o.additionalProperties=!1)},Vz=(t,i,s,r)=>{const o=t._zod.def,c=o.inclusive===!1,d=o.options.map((h,m)=>tt(h,i,{...r,path:[...r.path,c?"oneOf":"anyOf",m]}));c?s.oneOf=d:s.anyOf=d},Pz=(t,i,s,r)=>{const o=t._zod.def,c=tt(o.left,i,{...r,path:[...r.path,"allOf",0]}),d=tt(o.right,i,{...r,path:[...r.path,"allOf",1]}),h=p=>"allOf"in p&&Object.keys(p).length===1,m=[...h(c)?c.allOf:[c],...h(d)?d.allOf:[d]];s.allOf=m,i.intersections.push(m)};function Xf(t,i,s){if(i.$ref){if(s.has(i))return i;s.add(i);const w=t.get(i)?.def;if(!w)return i;const E=Xf(t,w,s);return E===w?i:E}for(const w of["anyOf","oneOf"]){const E=i[w];if(!Array.isArray(E))continue;const j=E.map(A=>Xf(t,A,s));j.some((A,k)=>A!==E[k])&&(i={...i,[w]:j})}const r=Array.isArray(i.type)?i.type:[i.type],o=!r.includes("string")&&r.some(w=>w==="number"||w==="integer"),c=i.enum??(i.const!==void 0?[i.const]:void 0);if(!o&&!c?.some(w=>typeof w=="number"))return i;const{minimum:d,maximum:h,exclusiveMinimum:m,exclusiveMaximum:p,multipleOf:b,format:v,id:x,...S}=i;return S.enum?S.enum=S.enum.map(w=>typeof w=="number"?String(w):w):typeof S.const=="number"&&(S.const=String(S.const)),o&&(S.type="string",c||(S.pattern=(r.includes("number")?_d:oE).source)),S}const Jf=new WeakMap;function Xz(t){const i=new Map;for(const r of t.seen.values())r.def&&!i.has(r.schema)&&i.set(r.schema,r);const s=new Map;for(const r of Jf.get(t)??[]){const o=t.seen.get(r),c=(o?.def??o?.schema)?.propertyNames;if(!c||c===!0||s.has(c))continue;const d=Xf(i,c,new Set);d!==c&&s.set(c,d)}if(s.size)for(const r of t.seen.values())for(const o of[r.schema,r.def]){const c=o&&s.get(o.propertyNames);c&&(o.propertyNames=c)}}const Jz=(t,i,s,r)=>{const o=s,c=t._zod.def;o.type="object";const d=c.keyType,h=rn(d).patterns;if(c.mode==="loose"&&h&&h.size>0){const b=tt(c.valueType,i,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const v of h)Oi(o.patternProperties,t0(v).source,b)}else{if(i.target==="draft-07"||i.target==="draft-2020-12"){o.propertyNames=tt(c.keyType,i,{...r,path:[...r.path,"propertyNames"]});let b=Jf.get(i);b||(b=[],Jf.set(i,b),i.deferred.push(()=>Xz(i))),b.push(t)}o.additionalProperties=tt(c.valueType,i,{...r,path:[...r.path,"additionalProperties"]})}const m=d._zod.values,p=i.io==="input"&&Oo(c.valueType)!==void 0;if(m&&!c.partial&&!p){const b=[...m].filter(v=>typeof v=="string"||typeof v=="number");b.length>0&&(o.required=b.map(String))}},Iz=(t,i,s,r)=>{const o=t._zod.def,c=tt(o.innerType,i,r),d=i.seen.get(t);i.target==="openapi-3.0"?(d.ref=o.innerType,s.nullable=!0):s.anyOf=[c,{type:"null"}]},Wz=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType},zd=Symbol();function n0(t,i,s,r,o){let c=!1;const d=JSON.stringify(t,(h,m)=>typeof m!="bigint"?m:(c=!0,null));return c?(Ei(i,s,r,o,"BigInt defaults cannot be represented in JSON Schema"),zd):JSON.parse(d)}const ej=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType;const d=n0(o.defaultValue,t,i,s,r);d!==zd&&(s.default=d)},tj=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);if(c.ref=o.innerType,i.io!=="input")return;const d=n0(o.defaultValue,t,i,s,r);d!==zd&&(s._prefault=d)},nj=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType;let d;try{d=o.catchValue(void 0)}catch{Ei(t,i,s,r,"Dynamic catch values are not supported in JSON Schema");return}s.default=d},ij=(t,i,s,r)=>{const o=t._zod.def,c=o.in._zod.traits.has("$ZodTransform"),d=i.io==="input"?c?o.out:o.in:o.out;tt(d,i,r);const h=i.seen.get(t);h.ref=d},aj=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType,s.readOnly=!0},i0=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType},nv=new WeakSet([Object.prototype,Error.prototype]);function Wl(t,i,s){Object.defineProperty(t,i,{configurable:!0,enumerable:!1,get(){const r=s(this);return Object.defineProperty(this,i,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,i,{value:r,configurable:!0,writable:!0})}})}const sj=(t,i)=>{x2.init(t,i),t.name="ZodError";const s=Object.getPrototypeOf(t);nv.has(s)||(nv.add(s),Wl(s,"format",r=>o=>w2(r,o)),Wl(s,"flatten",r=>o=>_2(r,o)),Wl(s,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,Gf,2)}),Wl(s,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,Gf,2)}),Object.defineProperty(s,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},en=Q("ZodError",sj,void 0,{Parent:Error}),rj=vd(en),lj=bd(en),oj=xd(en),uj=Sd(en),cj=N2(en),fj=A2(en),dj=R2(en),hj=C2(en),mj=M2(en),pj=D2(en),gj=k2(en),yj=U2(en);function vj(){on.localeError||yn(LO())}function ko(){on.memoizer||yn({memoizer:DO()})}const Ke=Q("ZodType",(t,i)=>(vj(),Ge.init(t,i),t.def=i,t.type=i.type,t),{check(...t){const i=this.def;return this.clone(Qt(i,{checks:[...i.checks??[],...t.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...t){return this.check(...t)},clone(t,i){return zi(this,t,i)},brand(){return this},register(t,i){return t.add(this,i),this},refine(t,i){return this.check(fT(t,i))},superRefine(t,i){return this.check(dT(t,i))},overwrite(t){return this.check(us(t))},optional(){return sv(this)},exactOptional(){return Wj(this)},nullable(){return rv(this)},nullish(){return sv(rv(this))},nonoptional(t){return aT(this,t)},array(){return be(this)},or(t){return Uo([this,t])},and(t){return Vj(this,t)},transform(t){return lv(this,Ij(t))},default(t){return tT(this,t)},prefault(t){return iT(this,t)},catch(t){return rT(this,t)},pipe(t){return lv(this,t)},readonly(){return uT(this)},describe(t){const i=this.clone();return fr.add(i,{description:t}),i},meta(...t){if(t.length===0)return fr.get(this);const i=this.clone();return fr.add(i,t[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(t,...i){return i.length===0?t(this):t(this,...i)},get"~standard"(){return _b(this,"~standard",{...Ab(this),jsonSchema:{input:Eo(this,"input"),output:Eo(this,"output")}})},set"~standard"(t){wi(this,"~standard",t)},parse:function t(i,s){return rj(this,i,s,{callee:t})},parseAsync:async function t(i,s){return await lj(this,i,s,{callee:t})},safeParse(t,i){return oj(this,t,i)},async safeParseAsync(t,i){return uj(this,t,i)},get spa(){return this?.safeParseAsync},set spa(t){wi(this,"spa",t)},validate(t,i){return z2(this,t,i)},validateAsync(t,i){return T2(this,t,i)},encode:function t(i,s){return cj(this,i,s,{callee:t})},decode:function t(i,s){return fj(this,i,s,{callee:t})},encodeAsync:async function t(i,s){return await dj(this,i,s,{callee:t})},decodeAsync:async function t(i,s){return await hj(this,i,s,{callee:t})},safeEncode(t,i){return mj(this,t,i)},safeDecode(t,i){return pj(this,t,i)},async safeEncodeAsync(t,i){return gj(this,t,i)},async safeDecodeAsync(t,i){return yj(this,t,i)},toJSONSchema(t){return Mz(this,{})(t)},get description(){return fr.get(this)?.description},get _def(){return this._zod.def}}),a0=Q("_ZodString",(t,i)=>{Ed.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Lz(t,s,r)},wb({format:t=>rn(t).format??null,minLength:t=>rn(t).minimum??null,maxLength:t=>rn(t).maximum??null},{regex(...t){return this.check(yz(...t))},includes(...t){return this.check(xz(...t))},startsWith(...t){return this.check(Sz(...t))},endsWith(...t){return this.check(_z(...t))},min(...t){return this.check(wo(...t))},max(...t){return this.check(Gb(...t))},length(...t){return this.check(Kb(...t))},nonempty(...t){return this.check(wo(1,...t))},lowercase(t){return this.check(vz(t))},uppercase(t){return this.check(bz(t))},trim(){return this.check(Ez())},normalize(...t){return this.check(wz(...t))},toLowerCase(){return this.check(Oz())},toUpperCase(){return this.check(zz())},slugify(){return this.check(jz())}})),s0=Q("ZodString",(t,i)=>{Ed.init(t,i),a0.init(t,i)},{email(t){return this.check(HO(_j,t))},url(t){return this.check(FO(Ej,t))},jwt(t){return this.check(oz(qj,t))},emoji(t){return this.check(VO(Oj,t))},guid(t){return this.check($O(wj,t))},uuid(t){return this.check(QO(eo,t))},uuidv4(t){return this.check(GO(eo,t))},uuidv6(t){return this.check(KO(eo,t))},uuidv7(t){return this.check(YO(eo,t))},nanoid(t){return this.check(PO(zj,t))},cuid(t){return this.check(XO(jj,t))},cuid2(t){return this.check(JO(Tj,t))},ulid(t){return this.check(IO(Nj,t))},base64(t){return this.check(sz(Uj,t))},base64url(t){return this.check(rz(Lj,t))},xid(t){return this.check(WO(Aj,t))},ksuid(t){return this.check(ez(Rj,t))},ipv4(t){return this.check(tz(Cj,t))},ipv6(t){return this.check(nz(Mj,t))},cidrv4(t){return this.check(iz(Dj,t))},cidrv6(t){return this.check(az(kj,t))},e164(t){return this.check(lz(Zj,t))},datetime(t){return this.check(Qb(r0,t))},date(t){return this.check(uz(bj,t))},time(t){return this.check(cz(xj,t))},duration(t){return this.check(fz(Sj,t))}});function F(t){return BO(s0,t)}const Ye=Q("ZodStringFormat",(t,i)=>{Qe.init(t,i),a0.init(t,i)}),r0=Q("ZodISODateTime",(t,i)=>{QE.init(t,i),Ye.init(t,i)}),bj=Q("ZodISODate",(t,i)=>{GE.init(t,i),Ye.init(t,i)}),xj=Q("ZodISOTime",(t,i)=>{KE.init(t,i),Ye.init(t,i)}),Sj=Q("ZodISODuration",(t,i)=>{YE.init(t,i),Ye.init(t,i)}),_j=Q("ZodEmail",(t,i)=>{NE.init(t,i),Ye.init(t,i)}),wj=Q("ZodGUID",(t,i)=>{jE.init(t,i),Ye.init(t,i)}),eo=Q("ZodUUID",(t,i)=>{TE.init(t,i),Ye.init(t,i)}),Ej=Q("ZodURL",(t,i)=>{kE.init(t,i),Ye.init(t,i)}),Oj=Q("ZodEmoji",(t,i)=>{UE.init(t,i),Ye.init(t,i)}),zj=Q("ZodNanoID",(t,i)=>{LE.init(t,i),Ye.init(t,i)}),jj=Q("ZodCUID",(t,i)=>{ZE.init(t,i),Ye.init(t,i)}),Tj=Q("ZodCUID2",(t,i)=>{qE.init(t,i),Ye.init(t,i)}),Nj=Q("ZodULID",(t,i)=>{BE.init(t,i),Ye.init(t,i)}),Aj=Q("ZodXID",(t,i)=>{HE.init(t,i),Ye.init(t,i)}),Rj=Q("ZodKSUID",(t,i)=>{$E.init(t,i),Ye.init(t,i)}),Cj=Q("ZodIPv4",(t,i)=>{FE.init(t,i),Ye.init(t,i)}),Mj=Q("ZodIPv6",(t,i)=>{PE.init(t,i),Ye.init(t,i)}),Dj=Q("ZodCIDRv4",(t,i)=>{XE.init(t,i),Ye.init(t,i)}),kj=Q("ZodCIDRv6",(t,i)=>{IE.init(t,i),Ye.init(t,i)}),Uj=Q("ZodBase64",(t,i)=>{WE.init(t,i),Ye.init(t,i)}),Lj=Q("ZodBase64URL",(t,i)=>{tO.init(t,i),Ye.init(t,i)}),Zj=Q("ZodE164",(t,i)=>{nO.init(t,i),Ye.init(t,i)}),qj=Q("ZodJWT",(t,i)=>{aO.init(t,i),Ye.init(t,i)}),l0=Q("ZodNumber",(t,i)=>{Ub.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Zz(t,s,r,o),t.isFinite=!0},wb({minValue:t=>{const{minimum:i,exclusiveMinimum:s}=rn(t);return Math.max(i??Number.NEGATIVE_INFINITY,s??Number.NEGATIVE_INFINITY)},maxValue:t=>{const{maximum:i,exclusiveMaximum:s}=rn(t);return Math.min(i??Number.POSITIVE_INFINITY,s??Number.POSITIVE_INFINITY)},isInt:t=>{const{isInt:i,multipleOf:s}=rn(t);return!!i||!!s?.some(Number.isSafeInteger)},format:t=>rn(t).format??null},{gt(t,i){return this.check(Fy(t,i))},gte(t,i){return this.check(wf(t,i))},min(t,i){return this.check(wf(t,i))},lt(t,i){return this.check(Yy(t,i))},lte(t,i){return this.check(_f(t,i))},max(t,i){return this.check(_f(t,i))},int(t){return this.check(iv(t))},safe(t){return this.check(iv(t))},positive(t){return this.check(Fy(0,t))},nonnegative(t){return this.check(wf(0,t))},negative(t){return this.check(Yy(0,t))},nonpositive(t){return this.check(_f(0,t))},multipleOf(t,i){return this.check(Vy(t,i))},step(t,i){return this.check(Vy(t,i))},finite(){return this}}));function Ae(t){return dz(l0,t)}const Bj=Q("ZodNumberFormat",(t,i)=>{sO.init(t,i),l0.init(t,i)});function iv(t){return hz(Bj,t)}const Hj=Q("ZodBoolean",(t,i)=>{rO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>qz(t,s,r)});function At(t){return mz(Hj,t)}const $j=Q("ZodUnknown",(t,i)=>{lO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Hz()});function If(){return pz($j)}const Qj=Q("ZodNever",(t,i)=>{oO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Bz(t,s,r)});function Gj(t){return gz(Qj,t)}const o0=Q("ZodArray",(t,i)=>{ko(),fO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Yz(t,s,r,o),t.element=i.element},{min(t,i){return this.check(wo(t,i))},nonempty(t){return this.check(wo(1,t))},max(t,i){return this.check(Gb(t,i))},length(t,i){return this.check(Kb(t,i))},unwrap(){return this.element}});function be(t,i){return Tz(o0,t,i)}const Kj=Q("ZodObject",(t,i)=>{ko(),mO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Fz(t,s,r,o),d2(t,"shape",s=>s._zod.def.shape,!1)},{keyof(){return xt(Object.keys(this._zod.def.shape))},catchall(t){return this.clone(Qt(this._zod.def,{catchall:t}))},passthrough(){return this.clone(Qt(this._zod.def,{catchall:If()}))},loose(){return this.clone(Qt(this._zod.def,{catchall:If()}))},strict(){return this.clone(Qt(this._zod.def,{catchall:Gj()}))},strip(){return this.clone(Qt(this._zod.def,{catchall:void 0}))},extend(t){return t2(this,t)},safeExtend(t){return n2(this,t)},merge(t){return i2(this,t)},pick(t){return Ww(this,t)},omit(t){return e2(this,t)},partial(...t){return Ty(u0,this,t[0])},exactPartial(...t){return Ty(c0,this,t[0],"exactPartial")},required(...t){return a2(d0,this,t[0])}});function se(t,i){const s={type:"object",shape:t??{},...le(i)};return new Kj(s)}const Yj=Q("ZodUnion",(t,i)=>{pO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Vz(t,s,r,o),t.options=i.options});function Uo(t,i){return new Yj({type:"union",options:t,...le(i)})}const Fj=Q("ZodIntersection",(t,i)=>{gO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Pz(t,s,r,o)});function Vj(t,i){return new Fj({type:"intersection",left:t,right:i})}const av=Q("ZodRecord",(t,i)=>{ko(),yO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Jz(t,s,r,o),t.keyType=i.keyType,t.valueType=i.valueType});function Pj(t,i,s){return!i||!i._zod?new av({type:"record",keyType:F(),valueType:t,...le(i)}):new av({type:"record",keyType:t,valueType:i,...le(s)})}const zo=Q("ZodEnum",(t,i)=>{vO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(r,o,c)=>$z(t,r,o),t.enum=i.entries,t.options=[...t._zod.values];const s=new Set(Object.keys(i.entries));t.extract=(r,o)=>{const c={};for(const d of r)if(s.has(d))c[d]=i.entries[d];else throw new Error(`Key ${d} not found in enum`);return new zo({...i,checks:[],...le(o),entries:c})},t.exclude=(r,o)=>{const c={...i.entries};for(const d of r)if(s.has(d))delete c[d];else throw new Error(`Key ${d} not found in enum`);return new zo({...i,checks:[],...le(o),entries:c})}});function xt(t,i){const s=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new zo({type:"enum",entries:s,...le(i)})}const Xj=Q("ZodLiteral",(t,i)=>{bO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Qz(t,s,r,o),t.values=new Set(i.values),Object.defineProperty(t,"value",{get(){if(i.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return i.values[0]}})});function gi(t,i){return new Xj({type:"literal",values:Array.isArray(t)?t:[t],...le(i)})}const Jj=Q("ZodTransform",(t,i)=>{ko(),xO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Kz(t,s,r,o),t._zod.parse=(s,r)=>{if(r.direction==="backward")throw new Eb(t.constructor.name);s.addIssue=c=>{if(typeof c=="string")s.issues.push(Sr(c,s.value,i));else{const d=c;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),"input"in d||(d.input=s.value),d.inst??(d.inst=t),s.issues.push(Sr(d))}};const o=i.transform(s.value,s);return o instanceof Promise?o.then(c=>(s.value=c,s)):(s.value=o,s)}});function Ij(t){return new Jj({type:"transform",transform:t})}const u0=Q("ZodOptional",(t,i)=>{qb.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>i0(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function sv(t){return new u0({type:"optional",innerType:t})}const c0=Q("ZodExactOptional",(t,i)=>{SO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>i0(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function Wj(t){return new c0({type:"optional",innerType:t})}const eT=Q("ZodNullable",(t,i)=>{_O.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Iz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function rv(t){return new eT({type:"nullable",innerType:t})}const f0=Q("ZodDefault",(t,i)=>{wO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>ej(t,s,r,o),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function tT(t,i){return new f0({type:"default",innerType:t,get defaultValue(){return typeof i=="function"?i():vb(i)}})}const nT=Q("ZodPrefault",(t,i)=>{EO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>tj(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function iT(t,i){return new nT({type:"prefault",innerType:t,get defaultValue(){return typeof i=="function"?i():vb(i)}})}const d0=Q("ZodNonOptional",(t,i)=>{OO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Wz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function aT(t,i){return new d0({type:"nonoptional",innerType:t,...le(i)})}const sT=Q("ZodCatch",(t,i)=>{zO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>nj(t,s,r,o),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function rT(t,i){return new sT({type:"catch",innerType:t,catchValue:typeof i=="function"?i:m2(i)})}const lT=Q("ZodPipe",(t,i)=>{jO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>ij(t,s,r,o),t.in=i.in,t.out=i.out});function lv(t,i){return new lT({type:"pipe",in:t,out:i})}const oT=Q("ZodReadonly",(t,i)=>{TO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>aj(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function uT(t){return new oT({type:"readonly",innerType:t})}const cT=Q("ZodCustom",(t,i)=>{NO.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Gz(t,s,r,o)});function fT(t,i={}){return Nz(cT,t,i)}function dT(t,i){return Az(t,i)}function hT(t){return Qb(r0,t)}const st=F().regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"kebab-case required"),h0=F().regex(/^package:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"expected package:<kebab-case-name>"),mT=se({method:xt(["GET","POST","PUT","PATCH","DELETE"]),path:F().startsWith("/api/"),description:F().min(10),schemaInput:F().describe("Exported name of the input Zod schema, e.g. CreateOrderInputSchema"),schemaOutput:F().describe("Exported name of the output Zod schema"),invalidates:be(F()).optional().describe("Cache roots this mutation stales BEYOND its own path root (cross-feature dependency, read by the manifest-derived client — never guessed in a screen). Each value must be an existing feature name or route root")}),pT=xt(["reference","ownerless"]),gT=Uo([F(),se({name:F(),shared:gi(!0),sharedKind:pT.optional()})]),yT=se({name:st,intent:F().min(20).max(300).describe("The feature's 'why' in 1-3 sentences"),app:F().optional().describe("Name of the owning app (apps[].name); defaults to the api app"),folder:F().describe("Path relative to the app root, e.g. src/features/orders"),spec:F().nullable().describe("Path to the spec, e.g. specs/orders.spec.md, null for technical features"),routes:be(mT),dbTables:be(gT).describe("Drizzle tables owned by this feature (one table = one owner). String = tenant-scoped; { name, shared: true } = shared referential"),dependsOn:be(Uo([st,h0])).describe("Features imported through their index.ts, and product packages as package:<name> — nothing else"),status:xt(["skeleton","in-progress","delivered"])}),vT=F().regex(/^\d+\.\d+\.\d+$/,"expected a plain x.y.z version"),bT=se({packages:be(se({name:F().describe("Published npm name, e.g. @ogygie/core"),path:F().describe("Folder relative to the repo root"),intent:F().min(20),spec:F().nullable(),status:xt(["skeleton","in-progress","delivered"])})),templates:se({project:F().describe("Folder copied by `ogygie init`"),feature:F().describe("Reserved for `ogygie generate feature` (not wired yet)")}),governedFiles:F().describe("Module declaring the exhaustive list of files `upgrade` may overwrite (D3)")}),xT=se({canonical:F().regex(/^[a-z][a-zA-Z0-9]*$/,"camelCase English term required").describe("The one machine term for this concept, e.g. gadget"),forbiddenAliases:be(F().min(2).regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"lowercase root (kebab-case allowed) required")).min(1).describe("Roots the code may never carry for this concept, e.g. widget"),reference:F().optional().describe("Anchor into AGENTS.product.md where the concept is explained")}),ST=se({entries:be(xT)}),_T=se({name:st,path:F().describe("Folder relative to the repo root, e.g. packages/solver"),intent:F().min(20).max(300).describe("The package's 'why' in 1-3 sentences"),spec:F().nullable(),dependsOn:be(h0).describe("Other PRODUCT packages, as package:<name> — never a feature: a package that depended on one would live under an app, and would be a feature"),status:xt(["skeleton","in-progress","delivered"])}),wT=se({column:F().min(1).describe("SQL name of the tenant column, e.g. workspace_id — the one AGENTS.product.md announces"),rawDbAllowed:be(st).default([]).describe("Features allowed to reach the raw database: the tenancy socle, which BUILDS the contexts and therefore predates them. Every other feature goes through tenantDb")}),ET=se({version:gi(1),product:se({name:F(),description:F().min(20)}),ogygieVersion:vT.optional(),framework:bT.optional(),apps:be(se({name:F(),path:F(),type:xt(["api","front","gateway"]),entryPoint:F(),vendored:gi(!0).optional()})),features:be(yT),tenancy:wT.optional().describe("Product values the framework gates need — absent, the tenancy checks do not run"),packages:be(_T).optional().describe("Product code living outside every app — libraries, engines. Absent = the project has none"),vocabulary:ST.optional().describe("The product's closed vocabulary — declared here, enforced by `ogygie verify-vocabulary`. Absent = gate silent"),conventions:se({agentsMd:gi("AGENTS.md"),failuresMd:gi("FAILURES.md"),specsFolder:gi("specs/")})}).superRefine((t,i)=>{const s=new Set(t.features.map(v=>v.name)),r=new Set;(t.packages??[]).forEach((v,x)=>{s.has(v.name)&&i.addIssue({code:"custom",path:["packages",x,"name"],message:`"${v.name}" is already the name of a feature — one name designates one thing`}),r.has(v.name)&&i.addIssue({code:"custom",path:["packages",x,"name"],message:`package "${v.name}" is declared twice`}),r.add(v.name)});const o=v=>(v.split("/").pop()??v).replace(/\.spec\.md$/,""),c=new Set([...t.features.map(v=>v.name),...r]);(t.framework?.packages??[]).forEach((v,x)=>{if(v.spec===null)return;const S=o(v.spec);c.has(S)&&i.addIssue({code:"custom",path:["framework","packages",x,"spec"],message:`spec "${S}" is already owned by a feature or a product package — one spec, one owner`})});const d=(v,x)=>{v.forEach((S,w)=>{if(!S.startsWith("package:"))return;const E=S.slice(8);r.has(E)||i.addIssue({code:"custom",path:[...x,w],message:`dependency "${S}" matches no declared package`})})};t.features.forEach((v,x)=>{d(v.dependsOn,["features",x,"dependsOn"])}),(t.packages??[]).forEach((v,x)=>{d(v.dependsOn,["packages",x,"dependsOn"])}),(t.tenancy?.rawDbAllowed??[]).forEach((v,x)=>{s.has(v)||i.addIssue({code:"custom",path:["tenancy","rawDbAllowed",x],message:`"${v}" matches no declared feature`})});const h=new Map,m=new Map;(t.vocabulary?.entries??[]).forEach((v,x)=>{const S=v.canonical.toLowerCase(),w=h.get(S);w!==void 0?i.addIssue({code:"custom",path:["vocabulary","entries",x,"canonical"],message:`canonical "${v.canonical}" is already declared by entry ${w}`}):h.set(S,x)}),(t.vocabulary?.entries??[]).forEach((v,x)=>{v.forbiddenAliases.forEach((S,w)=>{const E=["vocabulary","entries",x,"forbiddenAliases",w],j=h.get(S);if(j!==void 0){i.addIssue({code:"custom",path:E,message:`alias "${S}" is the canonical term of entry ${j} — a term cannot be both`});return}const A=m.get(S);if(A!==void 0){i.addIssue({code:"custom",path:E,message:`alias "${S}" is already forbidden by entry ${A} — one alias belongs to one concept`});return}m.set(S,x)})});const p=new Map(t.apps.map(v=>[v.name,v])),b=new Set(t.features.map(v=>v.name));for(const v of t.features)for(const x of v.routes){const S=x.path.split("/")[2];S!==void 0&&b.add(S)}t.features.forEach((v,x)=>{v.routes.forEach((S,w)=>{for(const E of S.invalidates??[])b.has(E)||i.addIssue({code:"custom",path:["features",x,"routes",w,"invalidates"],message:`invalidates target "${E}" matches no feature name and no route root`})})}),t.features.forEach((v,x)=>{if(v.app===void 0)return;const S=p.get(v.app);if(S===void 0){i.addIssue({code:"custom",path:["features",x,"app"],message:`app "${v.app}" is not declared in apps[]`});return}S.type!=="api"&&(v.routes.length>0||v.dbTables.length>0)&&i.addIssue({code:"custom",path:["features",x],message:"a non-api feature owns no HTTP routes and no DB tables — declare them on the api feature"})})}),OT=F().regex(/^.+ blockedBy:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,'Expected "<behavior> blockedBy:<feature-name>" (feature name in kebab-case)'),cs=se({id:st.describe("Identical to the feature name in the manifest"),status:xt(["draft","validated","implemented"]),depends_on:be(st),priority:xt(["P0","P1","P2"]),refs:be(F()).default([]).describe("References to the domain model, e.g. 'modele-gally §4.2'"),deferred:be(OT).default([]).describe("Behaviors deferred to a later feature, blocked by name")}),Ia=["# @intent","# Comportements","# Contrats de données","# États UI","# Non-objectifs","# Budget"],zT="Hypothèses";function jT(t){const i=new RegExp(`^# ${zT}\\s*$`,"mu").exec(t);if(i===null)return[];const s=t.slice(i.index+i[0].length),r=/^# /mu.exec(s);return(r===null?s:s.slice(0,r.index)).split(`
|
|
67
|
-
`).map(c=>c.trim()).filter(c=>/^[-*]\s+\S/u.test(c)).map(c=>c.replace(/^[-*]\s+/u,"").trim())}const jd=se({ogygie:gi(!0).describe("Marker: lets an agent tell our errors from noise"),code:F().regex(/^[A-Z][A-Z0-9_]+$/,"SCREAMING_SNAKE_CASE, stable over time"),message:F().min(10).describe("Human-readable sentence (technical English)"),file:F().nullable().describe("Relative path of the file involved, null when not localizable"),cause:F().describe("The precise datum or condition that triggered the error"),suggestedFix:F().describe("Concrete action to fix — never empty"),details:Pj(F(),If()).default({}),timestamp:hT()});class Lo extends Error{payload;constructor(i){super(i.message),this.name="StudioApiError",this.payload=i}}async function ut(t,i,s){const r=await fetch(t,s),o=await r.json();if(!r.ok){const c=jd.safeParse(o);throw c.success?new Lo(c.data):new Error(`HTTP ${r.status} on ${t} (non-OgygieError payload)`)}return i.parse(o)}function wr(t){return{headers:{"content-type":"application/json"},body:JSON.stringify(t)}}const TT=cs.shape.status,Td=se({id:st,status:TT,priority:cs.shape.priority,depends_on:be(st),filePath:F(),presentSections:be(F()),intent:F().default("")}),NT=se({id:F(),filePath:F(),error:jd}),AT=Uo([Td,NT]),RT=se({specs:be(AT)});se({specId:st});const CT=se({frontmatter:cs,body:F(),presentSections:be(F())});se({frontmatter:cs,body:F().max(2e5).optional()});const MT=se({spec:Td});se({id:st.max(80)});const DT=se({spec:Td}),kT=se({manifest:ET}),UT=se({name:F().min(1).max(200),contentBase64:F().min(1).max(57e5)}),LT=se({questionId:st,answer:F().min(1).max(2e3)});se({brief:F().min(50).max(2e4),specId:st.optional(),attachments:be(UT).max(5).default([]),answers:be(LT).max(15).default([]),round:Ae().int().min(1).max(4).default(1),skipQuestions:At().default(!1)});const ZT=se({id:st,text:F().min(1),options:be(F().min(1)).min(2).max(4)}),qT=se({specId:st,attempts:Ae().int().min(1).max(4),problemsFixed:be(F()),isNewFeature:At(),isAmendment:At(),compositions:be(F()).default([]),generation:se({derivable:Ae().int().nonnegative(),hole:Ae().int().nonnegative()}).nullable().default(null),assumptions:be(F()).default([]),usage:be(se({model:F(),inputTokens:Ae().int().nonnegative(),outputTokens:Ae().int().nonnegative()}))}),BT=se({jobId:F()}),HT=xt(["questions","drafting","judging","compositions","writing","done","failed"]),$T=se({jobId:F(),stage:HT,round:Ae().int().min(1).max(3).optional(),attempt:Ae().int().min(1).max(4).optional(),composition:se({done:Ae().int().nonnegative(),total:Ae().int().nonnegative()}).optional(),elapsedMs:Ae().int().nonnegative(),budgetMs:Ae().int().positive(),questions:be(ZT).min(3).max(5).optional(),result:qT.optional(),error:jd.optional()}),m0=xt(["green","red","pending","none"]),QT=se({specId:st,branch:F(),pullRequest:se({number:Ae().int().positive(),url:F(),headSha:F(),title:F()}).nullable(),specStatus:xt(["draft","validated","implemented","unreadable","absent"]),checks:m0,checkRuns:be(se({name:F(),conclusion:F().nullable()})),mergeable:At().nullable(),requiredRole:xt(["approver","operator"]),canMerge:At(),blockers:be(F()),labels:be(F()).default([]),needsOperator:At().default(!1)}),GT=se({pullRequests:be(se({specId:st,number:Ae().int().positive(),url:F(),checks:m0,needsOperator:At().default(!1)}))}),KT=se({specId:st,pullRequestNumber:Ae().int().positive(),mergeSha:F(),mergedBy:F(),mergedAt:F()}),YT=xt(["development","staging","production"]),p0=xt(["staging","production"]);se({environment:p0});const g0=se({environments:be(se({name:YT,ref:F(),sha:F().nullable(),deployment:se({id:Ae().int(),state:F().nullable(),createdAt:F()}).nullable()})),releases:be(F())});se({sha:F().regex(/^[0-9a-f]{40}$/),rollback:At().optional(),reason:F().min(10).max(2e3).optional()});const FT=se({environment:p0,fromSha:F().nullable(),toSha:F(),actor:F(),at:F(),deploymentId:Ae().int(),releaseTag:F().nullable(),includedPullRequests:be(se({number:Ae().int(),specId:F().nullable(),message:F(),authoredAt:F()})),destructiveMigration:At(),rollback:At()});se({month:F().regex(/^\d{4}-\d{2}$/).optional()});const VT=se({month:F(),specs:be(se({specId:F(),pullRequestNumber:Ae().int(),runs:Ae().int(),inputTokens:Ae().int(),outputTokens:Ae().int(),estimatedUsd:Ae(),uncostedModels:be(F())})),totals:se({runs:Ae().int(),inputTokens:Ae().int(),outputTokens:Ae().int(),estimatedUsd:Ae()}),budgetUsd:Ae().nullable(),budgetRatio:Ae().nullable(),warning:At()}),ov=se({state:F(),path:F(),sizeBytes:Ae().int().nonnegative()}),PT=se({specId:st,previews:be(ov),composition:F().nullable().default(null),compositions:be(se({name:F(),selected:At(),previews:be(ov)})).default([])}),XT=se({specId:st,composition:F(),alreadySelected:At()});function y0(){return un({queryKey:["specs"],queryFn:()=>ut("/api/specs",RT)})}function JT(t){return un({queryKey:["specs",t],queryFn:()=>ut(`/api/specs/${t}`,CT)})}function IT(){return un({queryKey:["manifest"],queryFn:()=>ut("/api/manifest",kT)})}function WT(t){const i=ta();return ls({mutationFn:s=>ut(`/api/specs/${t}`,MT,{method:"PUT",...wr(s)}),onSuccess:async()=>{await i.invalidateQueries({queryKey:["specs"]})}})}function eN(){const t=ta();return ls({mutationFn:i=>ut("/api/specs",DT,{method:"POST",...wr(i)}),onSuccess:async()=>{await t.invalidateQueries({queryKey:["specs"]})}})}const tN=se({email:F(),displayName:F(),role:F(),host:se({environments:At(),mergePolicy:F()}).optional()});function nN(t){return t===void 0||t.pullRequest===null?!1:t.checks==="pending"||t.checks==="none"||t.mergeable===null?1e4:!1}function iN(t,i){const s=t?.environments.find(r=>r.name==="development");return s!==void 0&&s.sha===i&&s.deployment?.state==="success"?!1:1e4}function Er(){return un({queryKey:["me"],queryFn:()=>ut("/api/auth/me",tN),retry:!1})}function aN(){return ls({mutationFn:t=>ut("/api/briefs",BT,{method:"POST",...wr(t)})})}function sN(t){return t===void 0?1e3:t.stage==="done"||t.stage==="failed"||t.stage==="questions"?!1:1e3}function rN(t){return un({queryKey:["briefs",t],queryFn:()=>ut(`/api/briefs/${t??""}`,$T),enabled:t!==null,retry:!1,refetchInterval:i=>sN(i.state.data)})}function lN(t){return un({queryKey:["specs",t,"pull-request"],queryFn:()=>ut(`/api/specs/${t}/pull-request`,QT),retry:!1,refetchInterval:i=>nN(i.state.data)})}function oN(t){return un({queryKey:["pull-requests"],queryFn:()=>ut("/api/pull-requests",GT),enabled:t,retry:!1})}function uN(t){const i=ta();return ls({mutationFn:()=>ut(`/api/specs/${t}/merge`,KT,{method:"POST"}),onSuccess:async()=>{await i.invalidateQueries({queryKey:["specs"]})}})}function cN(t=!0){return un({queryKey:["environments"],queryFn:()=>ut("/api/environments",g0),retry:!1,enabled:t})}function fN(t,i){return un({queryKey:["environments"],queryFn:()=>ut("/api/environments",g0),retry:!1,enabled:i,refetchInterval:s=>iN(s.state.data,t)})}function dN(){const t=ta();return ls({mutationFn:i=>{const{environment:s,...r}=i;return ut(`/api/environments/${s}/promotions`,FT,{method:"POST",...wr(r)})},onSuccess:async()=>{await t.invalidateQueries({queryKey:["environments"]})}})}function hN(t){return un({queryKey:["consumption",t],queryFn:()=>ut(`/api/consumption?month=${t}`,VT),retry:!1})}function mN(t){return un({queryKey:["specs",t,"previews"],queryFn:()=>ut(`/api/specs/${t}/previews`,PT),retry:!1})}function pN(t){const i=ta();return ls({mutationFn:s=>ut(`/api/specs/${t}/compositions/${s}/select`,XT,{method:"POST"}),onSuccess:async()=>{await i.invalidateQueries({queryKey:["specs"]})}})}const gN={primary:"bg-accent text-accent-contrast hover:bg-accent-strong shadow-raised",secondary:"border border-border bg-surface-raised text-text hover:border-border-strong hover:bg-surface-sunken",danger:"bg-danger-soft text-danger border border-danger/40 hover:border-danger",ghost:"text-text-muted hover:text-text hover:bg-surface-sunken"};function at({voice:t="secondary",size:i="md",className:s="",type:r="button",children:o,...c}){const d=i==="sm"?"px-2.5 py-1 text-xs":"px-3.5 py-2 text-sm";return g.jsx("button",{type:r,className:`inline-flex items-center justify-center gap-2 rounded-md font-medium transition-[background-color,border-color,color,transform] duration-(--duration-fast) ease-swell active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-50 ${d} ${gN[t]} ${s}`,...c,children:o})}const yN={neutral:"bg-surface-sunken text-text-muted border-border",accent:"bg-accent-soft text-accent border-accent/30",positive:"bg-positive-soft text-positive border-positive/30",warning:"bg-warning-soft text-warning border-warning/30",danger:"bg-danger-soft text-danger border-danger/30",orichalcum:"bg-surface-sunken text-orichalcum border-orichalcum/40"};function ot({tone:t="neutral",mono:i=!1,children:s,title:r}){return g.jsx("span",{title:r,className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium leading-tight ${i?"font-mono":""} ${yN[t]}`,children:s})}function v0({status:t}){const i=t==="validated"?"accent":t==="implemented"?"positive":"neutral";return g.jsx(ot,{tone:i,children:t})}function b0({title:t,hint:i,action:s}){return g.jsxs("div",{className:"studio-rise flex flex-col items-center gap-3 rounded-lg border border-dashed border-border-strong/60 bg-surface-raised/60 px-6 py-12 text-center",children:[g.jsx("p",{className:"font-display text-xl font-semibold text-text",children:t}),i!==void 0&&g.jsx("p",{className:"max-w-md text-sm text-text-muted",children:i}),s]})}function vN(t){return t instanceof Lo?t.payload:null}function St({error:t}){const i=vN(t);if(i===null){const s=t instanceof Error?t.message:String(t);return g.jsx("div",{role:"alert",className:"rounded-md border border-danger/40 bg-danger-soft p-4 text-sm text-text",children:s})}return g.jsx(Nd,{error:i})}function Nd({error:t}){return g.jsxs("div",{role:"alert",className:"studio-rise rounded-md border border-danger/40 bg-danger-soft p-4 text-sm text-text",children:[g.jsx("p",{className:"font-mono text-xs font-bold uppercase tracking-wide text-danger",children:t.code}),g.jsx("p",{className:"mt-1 font-medium",children:t.message}),g.jsxs("dl",{className:"mt-2 space-y-1 text-xs text-text-muted",children:[t.file!=null&&g.jsxs("div",{className:"flex gap-2",children:[g.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Fichier"}),g.jsx("dd",{className:"font-mono",children:t.file})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Cause"}),g.jsx("dd",{className:"font-mono break-all",children:t.cause})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Correction suggérée"}),g.jsx("dd",{children:t.suggestedFix})]})]})]})}var bN=bv();function x0({open:t,title:i,children:s,onClose:r}){return J.useEffect(()=>{if(!t)return;const o=c=>{c.key==="Escape"&&r()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[t,r]),t?bN.createPortal(g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-surface-sunken/70 p-4 backdrop-blur-sm",children:g.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":i,className:"studio-rise w-full max-w-md rounded-lg border border-border bg-surface-raised p-5 shadow-overlay",children:[g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsx("h2",{className:"font-display text-xl font-semibold text-text",children:i}),g.jsx("button",{type:"button",onClick:r,className:"rounded p-1 text-text-faint transition-colors hover:bg-surface-sunken hover:text-text","aria-label":"Fermer",children:"✕"})]}),g.jsx("div",{className:"mt-3 text-sm text-text-muted",children:s})]})}),document.body):null}function ss({eyebrow:t,title:i,explanation:s,actions:r}){return g.jsxs("header",{className:"flex flex-wrap items-end justify-between gap-4 border-b border-border pb-4",children:[g.jsxs("div",{className:"min-w-0",children:[t!==void 0&&g.jsx("p",{className:"mb-1 font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:t}),g.jsx("h1",{className:"font-display text-2xl font-semibold leading-tight text-text",children:i}),s!==void 0&&g.jsx("p",{className:"mt-1 max-w-2xl text-sm text-text-muted",children:s})]}),r!==void 0&&g.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:r})]})}function ln({children:t,className:i="",...s}){return g.jsx("section",{className:`rounded-lg border border-border bg-surface-raised p-4 shadow-raised ${i}`,...s,children:t})}const xN=[{status:"draft",title:"Draft",explanation:"en écriture",accent:"border-t-border-strong"},{status:"validated",title:"Validated",explanation:"signées, à implémenter",accent:"border-t-accent"},{status:"implemented",title:"Implemented",explanation:"livrées",accent:"border-t-positive"}],SN={P0:"danger",P1:"accent",P2:"neutral"},_N={green:"positive",red:"danger",pending:"warning",none:"neutral"},wN={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"};function uv(t){return!("error"in t)}function EN(t){return t instanceof HTMLElement&&(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT"||t.isContentEditable)}function ON(){const{data:t,isPending:i,error:s}=y0(),r=Er(),o=oN(r.data!==void 0),[c,d]=J.useState(""),[h,m]=J.useState(!1),p=J.useRef(null);if(J.useEffect(()=>{const E=j=>{j.metaKey||j.ctrlKey||j.altKey||EN(j.target)||(j.key==="/"?(j.preventDefault(),p.current?.focus()):j.key==="n"&&(j.preventDefault(),m(!0)))};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]),s)return g.jsx(St,{error:s});if(i)return g.jsx(TN,{});const b=t.specs.filter(uv),v=t.specs.filter(E=>!uv(E));if(t.specs.length===0)return g.jsx(b0,{title:"Aucune spec dans ce repo",hint:"Créez la première depuis le template canonique — elle naîtra en draft.",action:g.jsx(cv,{open:h,onOpen:()=>m(!0),onClose:()=>m(!1)})});const x=c.trim().toLowerCase(),S=E=>x===""||E.id.includes(x)||E.depends_on.some(j=>j.includes(x)),w=new Map((o.data?.pullRequests??[]).map(E=>[E.specId,E]));return g.jsxs("div",{className:"space-y-6",children:[g.jsx(ss,{eyebrow:"Specs",title:"Board",explanation:`${b.length} spec${b.length>1?"s":""} lisible${b.length>1?"s":""} · le repo est l'état, le board n'est qu'une vue.`,actions:g.jsxs(g.Fragment,{children:[g.jsx("input",{ref:p,type:"search",value:c,onChange:E=>d(E.target.value),placeholder:"Filtrer ( / )","aria-label":"Filtrer les specs",className:"w-44 rounded-md border border-border bg-surface-raised px-3 py-2 text-sm text-text transition-colors focus:border-accent"}),g.jsx(cv,{open:h,onOpen:()=>m(!0),onClose:()=>m(!1)})]})}),v.length>0&&g.jsx("section",{"aria-label":"Specs illisibles",className:"space-y-2",children:v.map(E=>g.jsx(Nd,{error:E.error},E.filePath))}),g.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:xN.map(E=>g.jsx(zN,{column:E,specs:b.filter(j=>j.status===E.status&&S(j)),pullsBySpec:w},E.status))})]})}function zN({column:t,specs:i,pullsBySpec:s}){return g.jsxs("section",{"aria-label":`Colonne ${t.title}`,className:`flex flex-col rounded-lg border border-border border-t-2 bg-surface-sunken/50 p-3 ${t.accent}`,children:[g.jsxs("h2",{className:"mb-3 flex items-baseline justify-between px-1",children:[g.jsxs("span",{className:"font-display text-lg font-semibold text-text",children:[t.title," ",g.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:t.explanation})]}),g.jsx(Ja,{value:i.length,className:"font-mono text-xs text-text-faint"})]}),i.length===0?g.jsx("p",{className:"rounded-md border border-dashed border-border px-3 py-6 text-center text-xs text-text-faint",children:"Aucune spec ici"}):g.jsx("ul",{className:"space-y-2",children:i.map((r,o)=>g.jsx("li",{className:"studio-reveal",style:{"--i":o},children:g.jsx(jN,{summary:r,pull:s.get(r.id)})},r.id))})]})}function jN({summary:t,pull:i}){const s=new Set(t.presentSections);return g.jsxs(os,{to:"/specs/$specId",params:{specId:t.id},className:"group block rounded-md border border-border bg-surface-raised p-3 shadow-raised transition-[border-color,transform,box-shadow] duration-(--duration-base) ease-swell hover:-translate-y-0.5 hover:border-accent/60 hover:shadow-overlay",children:[g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsx("p",{className:"min-w-0 truncate font-mono text-sm font-medium text-text group-hover:text-accent",children:t.id}),g.jsx(ot,{tone:SN[t.priority]??"neutral",children:t.priority})]}),g.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[g.jsx("ul",{"aria-label":`${s.size} sections sur ${Ia.length}`,className:"flex flex-1 gap-0.5",children:Ia.map(r=>g.jsx("li",{title:r,className:`h-1 flex-1 rounded-full ${s.has(r)?"bg-accent":"bg-border"}`},r))}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:[s.size,"/",Ia.length]})]}),(t.depends_on.length>0||i!==void 0)&&g.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[i!==void 0&&g.jsxs(ot,{tone:i.needsOperator?"orichalcum":_N[i.checks]??"neutral",mono:!0,title:i.needsOperator?"en attente de l'opérateur (needs-operator)":wN[i.checks]??i.checks,children:["#",i.number,i.needsOperator&&g.jsx("span",{"aria-hidden":"true",children:" ⚑"})]}),t.depends_on.map(r=>g.jsxs(ot,{mono:!0,title:`dépend de ${r}`,children:["← ",r]},r))]})]})}function TN(){return g.jsx("div",{"aria-label":"Chargement du board",className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[0,1,2].map(t=>g.jsx("div",{className:"studio-breathe h-64 rounded-lg border border-border"},t))})}function cv({open:t,onOpen:i,onClose:s}){const[r,o]=J.useState(""),c=Ao(),d=eN(),h=()=>{d.mutate({id:r},{onSuccess:async m=>{s(),await c({to:"/specs/$specId",params:{specId:m.spec.id}})}})};return g.jsxs(g.Fragment,{children:[g.jsx(at,{voice:"primary",onClick:()=>{d.reset(),o(""),i()},children:"Nouvelle spec"}),g.jsx(x0,{open:t,title:"Nouvelle spec depuis le template",onClose:s,children:g.jsxs("form",{onSubmit:m=>{m.preventDefault(),h()},className:"space-y-3",children:[g.jsxs("label",{className:"block text-sm text-text-muted",children:["Identifiant (kebab-case, il nomme le fichier specs/<id>.spec.md)",g.jsx("input",{value:r,onChange:m=>o(m.target.value),placeholder:"ma-nouvelle-feature",autoFocus:!0,className:"mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 font-mono text-sm text-text focus:border-accent"})]}),d.error instanceof Lo&&g.jsx(St,{error:d.error}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(at,{voice:"ghost",onClick:s,children:"Annuler"}),g.jsx(at,{voice:"primary",type:"submit",disabled:d.isPending||r==="",children:"Créer en draft"})]})]})})]})}function NN(t){const i=`
|
|
68
|
-
${t}`,s=[];let r=0;for(const o of Ia){const c=i.indexOf(`
|
|
69
|
-
${o}`,r);c!==-1&&(s.push(o),r=c+o.length)}return s}const AN={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"},RN={green:"positive",red:"danger",pending:"warning",none:"neutral"},CN=new Set(["pending","queued","in_progress","expected","waiting","requested"]),MN=new Set(["success","neutral"]);function DN(t){return t===null||CN.has(t)?{label:"en cours",tone:"warning",live:!0}:MN.has(t)?{label:"vert",tone:"positive",live:!1}:t==="skipped"?{label:"sauté",tone:"neutral",live:!1}:{label:"rouge",tone:"danger",live:!1}}function S0({label:t}){return g.jsx("span",{role:"status","aria-label":t,className:"inline-flex items-center",children:g.jsx("span",{"aria-hidden":"true",className:"studio-live inline-block h-2 w-2 rounded-full bg-accent"})})}function kN({pullRequestNumber:t,mergeSha:i,environmentsConfigured:s}){const r=fN(i,s),o=r.data?.environments.find(v=>v.name==="development"),c=o!==void 0&&o.sha===i,d=c&&o.deployment?.state==="success",h=c&&o.deployment!==null&&o.deployment!==void 0&&["failure","error"].includes(o.deployment.state??""),m=s&&!d&&!h&&r.error==null,p=s?r.error!=null?"Le suivi des environnements n'a pas répondu ; la fusion est faite.":d?`Déployée en development (${i.slice(0,7)}).`:h?`Le déploiement development a échoué sur ${i.slice(0,7)} : voir le workflow du produit.`:c?o.deployment===null||o.deployment===void 0?`La branche par défaut est sur ${i.slice(0,7)} ; en attente du déploiement development que le produit rapporte…`:`Déploiement development en cours (${o.deployment.state??"en attente"})…`:"Le développement suit : la branche par défaut reçoit le commit…":"Cet hôte ne suit pas de déploiement : pas de bloc environments.",b=d?"border-positive/40 bg-positive-soft":h?"border-danger/40 bg-danger-soft":"border-accent/30 bg-surface-raised";return g.jsx("section",{role:"status","aria-label":"Fusion et développement",className:`studio-rise rounded-lg border p-4 text-sm text-text ${b}`,children:g.jsxs("p",{className:"flex flex-wrap items-center gap-2",children:[m&&g.jsx(S0,{label:"développement en cours"}),g.jsxs("span",{className:"font-medium",children:["Pull request #",t," fusionnée."]}),g.jsx("span",{className:"text-text-muted",children:p})]})})}function UN({specId:t,role:i}){const s=lN(t),r=uN(t),o=Er();if(s.error)return g.jsx(St,{error:s.error});if(s.isPending)return g.jsx("div",{"aria-label":"Chargement de la pull request",className:"h-20 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const c=s.data;if(r.isSuccess)return g.jsx(kN,{pullRequestNumber:r.data.pullRequestNumber,mergeSha:r.data.mergeSha,environmentsConfigured:o.data?.host?.environments!==!1});const d=c.canMerge&&dv(i,c.requiredRole),h=c.pullRequest!==null&&(c.checks==="pending"||c.checks==="none"||c.mergeable===null);return g.jsxs(ln,{"aria-label":"Pull request de la spec",className:"text-sm",children:[g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Pull request"}),c.pullRequest!==null&&g.jsxs(g.Fragment,{children:[g.jsxs("a",{className:"font-mono text-accent underline-offset-4 hover:underline",href:c.pullRequest.url,target:"_blank",rel:"noreferrer",children:["#",c.pullRequest.number]}),g.jsx(ot,{tone:RN[c.checks]??"neutral",children:AN[c.checks]??c.checks}),h&&g.jsx(S0,{label:"la CI tourne, relue toutes les dix secondes"}),g.jsx(v0,{status:c.specStatus}),c.needsOperator&&g.jsx(ot,{tone:"orichalcum",children:"en attente de l'opérateur"})]})]}),g.jsx(at,{voice:"primary",size:"sm",disabled:!d||r.isPending,onClick:()=>r.mutate(),children:r.isPending?"Fusion…":"Fusionner"})]}),c.pullRequest===null?g.jsxs("p",{className:"mt-2 text-text-muted",children:["Aucune pull request ouverte : la prochaine sauvegarde en ouvre une sur ",g.jsx("code",{className:"font-mono text-text",children:c.branch}),"."]}):g.jsxs("p",{className:"mt-2 text-text-muted",children:[g.jsx("span",{className:"text-text",children:c.pullRequest.title})," · branche ",g.jsx("code",{className:"font-mono",children:c.branch})]}),c.pullRequest!==null&&c.checkRuns.length>0&&g.jsx("ul",{"aria-label":"Checks de la branche",className:"mt-3 flex flex-wrap gap-2",children:c.checkRuns.map(m=>{const p=DN(m.conclusion);return g.jsxs("li",{className:"flex items-center gap-1.5 rounded-md border border-border bg-surface-raised px-2 py-1 font-mono text-xs",children:[g.jsx("span",{className:"text-text",children:m.name}),g.jsx(ot,{tone:p.tone,children:p.label})]},m.name)})}),c.blockers.length>0&&g.jsx("ul",{className:"mt-3 space-y-1 text-text-muted",children:c.blockers.map(m=>g.jsxs("li",{className:"flex gap-2",children:[g.jsx("span",{"aria-hidden":"true",className:"text-warning",children:"●"}),m]},m))}),c.pullRequest!==null&&!dv(i,c.requiredRole)&&g.jsxs("p",{className:"mt-3 text-text-muted",children:["La fusion exige le rôle ",c.requiredRole,"."]}),r.error!=null&&g.jsx("div",{className:"mt-3",children:g.jsx(St,{error:r.error})})]})}const fv={reader:0,author:1,approver:2,operator:3};function dv(t,i){return(fv[t]??-1)>=(fv[i]??99)}const LN={empty:"Vide",loading:"Chargement",nominal:"Nominal",error:"Erreur"};function ZN({specId:t}){const i=mN(t),s=pN(t),[r,o]=J.useState(null),[c,d]=J.useState(null);if(i.error)return g.jsx(St,{error:i.error});if(i.isPending)return g.jsx("div",{"aria-label":"Chargement des aperçus",className:"h-24 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const h=i.data.compositions,m=i.data.composition,p=h.length>0?h.find(S=>S.name===c)??h.find(S=>S.selected)??h[0]??null:null,b=p===null?i.data.previews:p.previews;if(b.length===0&&p===null)return g.jsxs("section",{"aria-label":"Aperçus de l'écran",className:"rounded-lg border border-dashed border-border-strong/60 bg-surface-raised/60 p-4 text-sm text-text-muted",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Aperçus"}),g.jsx("p",{className:"mt-1",children:"Aucun aperçu sur la branche : la spéculation n'a pas encore rendu d'écran, ou cette spec n'en décrit pas."})]});const v=b.some(S=>S.state===r)?r??"":b[0]?.state??"",x=p===null?`/api/specs/${t}/previews/${v}`:`/api/specs/${t}/previews/${p.name}/${v}`;return g.jsxs(ln,{"aria-label":"Aperçus de l'écran",className:"text-sm",children:[h.length>1&&g.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2 border-b border-border pb-3",children:[g.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:"Compositions"}),g.jsx("div",{role:"radiogroup","aria-label":"Compositions proposées",className:"flex flex-wrap gap-1.5",children:h.map(S=>g.jsx("button",{type:"button",role:"radio","aria-checked":p?.name===S.name,onClick:()=>d(S.name),className:`rounded-full border px-3 py-1 font-mono text-xs transition-colors ${p?.name===S.name?"border-accent bg-accent-soft text-accent":"border-border text-text-muted hover:text-text"}`,children:S.name},S.name))}),p!==null&&p.name===m&&g.jsx(ot,{tone:"positive",children:"retenue"}),p!==null&&p.name!==m&&g.jsx(at,{voice:"primary",size:"sm",disabled:s.isPending,onClick:()=>s.mutate(p.name),children:s.isPending?"Sélection…":"Retenir cette composition"})]}),s.error!=null&&g.jsx("div",{className:"mb-3",children:g.jsx(St,{error:s.error})}),g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("h2",{className:"font-display text-lg font-semibold text-text",children:["Aperçus ",g.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:"l'écran tel qu'il sera"})]}),g.jsx("div",{role:"tablist",className:"inline-flex rounded-md border border-border bg-surface-sunken p-0.5",children:b.map(S=>g.jsx("button",{role:"tab",type:"button","aria-selected":S.state===v,onClick:()=>o(S.state),className:`rounded px-3 py-1 text-xs font-medium transition-colors duration-(--duration-fast) ease-swell ${S.state===v?"bg-accent text-accent-contrast shadow-raised":"text-text-muted hover:text-text"}`,children:LN[S.state]??S.state},S.state))})]}),g.jsx("iframe",{title:`Aperçu ${v}`,sandbox:"",src:x,className:"mt-3 h-[480px] w-full rounded-md border border-border bg-surface-raised"})]})}function _0(t){return t instanceof f0?_0(t.def.innerType):t}function qN(){const t=cs.shape;return Object.keys(t).map(i=>{const s=_0(t[i]);if(s instanceof zo)return{name:i,kind:"enum",options:s.options.map(r=>String(r)),readOnly:!1};if(s instanceof o0)return{name:i,kind:"string-array",readOnly:!1};if(s instanceof s0)return{name:i,kind:"text",readOnly:i==="id"};throw new Error(`deriveFrontmatterFields: unsupported schema for "${String(i)}" — extend the derivation, never hand-describe the form`)})}function hv(t){return{id:t.id,status:t.status,depends_on:t.depends_on.join(`
|
|
70
|
-
`),priority:t.priority,refs:t.refs.join(`
|
|
71
|
-
`),deferred:t.deferred.join(`
|
|
72
|
-
`)}}function Ef(t){return t.split(`
|
|
73
|
-
`).map(i=>i.trim()).filter(i=>i!=="")}function BN(t){return{id:t.id,status:t.status,depends_on:Ef(t.depends_on),priority:t.priority,refs:Ef(t.refs),deferred:Ef(t.deferred)}}function HN(t){const i=[],s=t.split(`
|
|
74
|
-
`);let r=0;for(;r<s.length;){const c=(s[r]??"").trim();if(c===""){r+=1;continue}const d=/^(#{1,6})\s+(.*)$/.exec(c);if(d!==null){i.push({kind:"heading",level:(d[1]??"#").length,text:d[2]??""}),r+=1;continue}if(c.startsWith("```")){const m=[];for(r+=1;r<s.length&&!(s[r]??"").trim().startsWith("```");)m.push(s[r]??""),r+=1;r+=1,i.push({kind:"code",text:m.join(`
|
|
75
|
-
`)});continue}if(c.startsWith("- ")){const m=[];for(;r<s.length;){const p=(s[r]??"").trim();if(p.startsWith("- "))m.push(p.slice(2)),r+=1;else if(p!==""&&!p.startsWith("#"))m[m.length-1]=`${m[m.length-1]??""} ${p}`,r+=1;else break}i.push({kind:"bullet",items:m});continue}const h=[];for(;r<s.length;){const m=(s[r]??"").trim();if(m===""||m.startsWith("#")||m.startsWith("- ")||m.startsWith("```"))break;h.push(m),r+=1}i.push({kind:"paragraph",text:h.join(" ")})}return i}const $N=6,QN={1:"font-display text-xl font-semibold text-text mt-6 first:mt-0 border-b border-border pb-1",2:"font-display text-lg font-semibold text-text mt-4"};function GN({markdown:t}){const i=HN(t);return i.length===0?g.jsx("p",{className:"text-sm text-text-faint",children:"Rien à prévisualiser encore."}):g.jsx("div",{className:"space-y-2",children:i.map((s,r)=>{if(s.kind==="heading")return g.jsx("p",{className:QN[Math.min(s.level,2)],children:s.text},r);if(s.kind==="bullet")return g.jsx("ul",{className:"list-disc space-y-1 pl-5 text-sm text-text-muted marker:text-accent",children:s.items.map((o,c)=>g.jsx("li",{children:o},c))},r);if(s.kind==="code"){const o=s.text.split(`
|
|
76
|
-
`),c=g.jsx("pre",{className:"overflow-x-auto rounded-md border border-border bg-surface-sunken p-3 font-mono text-xs text-text",children:s.text});return o.length<$N?g.jsx("div",{children:c},r):g.jsxs("details",{className:"group rounded-md border border-border bg-surface-sunken/60",children:[g.jsxs("summary",{className:"cursor-pointer select-none px-3 py-2 font-mono text-xs text-text-muted transition-colors hover:text-text",children:[g.jsx("span",{className:"text-text",children:o[0]}),g.jsxs("span",{className:"ml-2 text-text-faint",children:["… ",o.length," lignes — déplier"]})]}),g.jsx("div",{className:"px-2 pb-2",children:c})]},r)}return g.jsx("p",{className:"text-sm text-text-muted",children:s.text},r)})})}const to="mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent";function KN({specId:t}){const{data:i,isPending:s,error:r}=JT(t);return r?g.jsxs("div",{className:"space-y-3",children:[g.jsx(w0,{}),g.jsx(St,{error:r})]}):s?g.jsx("div",{"aria-label":"Chargement de la spec",className:"h-96 animate-pulse rounded-lg border border-border bg-surface-sunken/60"}):g.jsx(YN,{specId:t,initialFrontmatter:i.frontmatter,initialBody:i.body},t)}function w0(){return g.jsx(os,{to:"/",className:"inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-accent",children:"← Retour au board"})}function YN({specId:t,initialFrontmatter:i,initialBody:s}){const r=qN(),[o,c]=J.useState(()=>hv(i)),[d,h]=J.useState(()=>({form:hv(i),body:s})),[m,p]=J.useState(s),[b,v]=J.useState(null),[x,S]=J.useState(!1),[w,E]=J.useState(!1),j=WT(t),A=Er(),k=m!==d.body||JSON.stringify(o)!==JSON.stringify(d.form),G=new Set(NN(m)),Y=(V,ee)=>{c(re=>({...re,[V]:ee}))},P=()=>{const V=cs.safeParse(BN(o));return V.success?(v(null),V.data):(v(V.error.issues.map(ee=>`${ee.path.join(".")}: ${ee.message}`).join(" ; ")),null)},Z=()=>{const V=P();V!==null&&j.mutate({frontmatter:V,body:m},{onSuccess:()=>h({form:o,body:m})})},R=()=>{const V=P();if(V===null){S(!1);return}const ee={...o,status:"validated"};j.mutate({frontmatter:{...V,status:"validated"},body:m},{onSuccess:()=>{c(ee),h({form:ee,body:m})},onSettled:()=>S(!1)})};J.useEffect(()=>{const V=ee=>{(ee.metaKey||ee.ctrlKey)&&ee.key.toLowerCase()==="s"&&(ee.preventDefault(),Z())};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)});const I=jT(m);return g.jsxs("div",{className:"space-y-5",children:[g.jsxs("div",{className:"sticky top-0 z-10 -mx-8 -mt-8 border-b border-border bg-surface/85 px-8 py-4 backdrop-blur",children:[g.jsx(w0,{}),g.jsxs("div",{className:"mt-1 flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[g.jsx("h1",{className:"truncate font-display text-2xl font-semibold leading-tight text-text",children:t}),g.jsx(v0,{status:o.status}),k&&g.jsx(ot,{tone:"orichalcum",children:"Modifications non enregistrées"})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(at,{onClick:Z,disabled:j.isPending,title:"⌘S / Ctrl+S",children:"Enregistrer"}),o.status==="draft"&&g.jsx(at,{voice:"primary",onClick:()=>S(!0),disabled:j.isPending,children:"Valider"})]})]})]}),I.length>0&&g.jsxs(ln,{"aria-label":"Hypothèses du modèle",className:"studio-reveal border-orichalcum/40",style:{"--i":0},children:[g.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Hypothèses"}),g.jsx("span",{className:"font-mono text-xs text-text-faint",children:"ce que le modèle a tranché sans que le brief le dise (D57)"})]}),g.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-text-muted marker:text-orichalcum",children:I.map(V=>g.jsx("li",{children:V},V))}),g.jsx("p",{className:"mt-2 text-xs text-text-faint",children:"Validée, la section fait partie du contrat : amendez la spec si une hypothèse ne vous va pas."})]}),A.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":0},children:g.jsx(ZN,{specId:t})}),A.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":1},children:g.jsx(UN,{specId:t,role:A.data.role})}),b!==null&&g.jsxs("div",{role:"alert",className:"rounded-md border border-warning/40 bg-warning-soft p-3 text-sm text-text",children:["Frontmatter invalide : ",b]}),j.error!=null&&g.jsx(St,{error:j.error}),j.isSuccess&&j.error==null&&!k&&g.jsxs("p",{role:"status",className:"studio-rise rounded-md border border-positive/40 bg-positive-soft p-3 text-sm text-text",children:["Spec enregistrée — statut : ",j.data.spec.status,"."]}),g.jsxs("ol",{"aria-label":"Sections canoniques",className:"studio-reveal flex flex-wrap gap-2",style:{"--i":2},children:[Ia.map((V,ee)=>{const re=V.replace(/^# /u,"");return g.jsx("li",{children:g.jsx(ot,{tone:G.has(V)?"accent":"neutral",title:G.has(V)?"section présente":"section absente ou hors ordre",children:`${ee+1} · ${re}`})},V)}),g.jsxs("li",{className:"self-center font-mono text-xs text-text-faint",children:[g.jsx(Ja,{value:G.size}),"/",Ia.length," présentes, dans l'ordre du gate"]})]}),g.jsxs(ln,{"aria-label":"Frontmatter",className:"studio-reveal",style:{"--i":3},children:[g.jsxs("h2",{className:"mb-3 font-display text-lg font-semibold text-text",children:["Frontmatter ",g.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:"formulaire dérivé de SpecFrontmatterSchema"})]}),g.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:r.map(V=>g.jsxs("label",{className:"block text-sm text-text-muted",children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:V.name}),V.kind==="enum"?g.jsx("select",{value:o[V.name],onChange:ee=>Y(V.name,ee.target.value),className:to,children:(V.options??[]).map(ee=>g.jsx("option",{value:ee,children:ee},ee))}):V.kind==="string-array"?g.jsx("textarea",{value:o[V.name],onChange:ee=>Y(V.name,ee.target.value),rows:2,placeholder:"un élément par ligne",className:`${to} font-mono text-xs`}):g.jsx("input",{value:o[V.name],readOnly:V.readOnly,onChange:ee=>Y(V.name,ee.target.value),className:`${to} font-mono ${V.readOnly?"bg-surface-sunken text-text-faint":""}`})]},V.name))})]}),g.jsxs("section",{"aria-label":"Sections markdown",className:`studio-reveal grid grid-cols-1 gap-4 ${w?"lg:grid-cols-2":""}`,style:{"--i":4},children:[w?g.jsxs("label",{className:"block text-sm text-text-muted",children:[g.jsxs("span",{className:"flex items-center justify-between font-mono text-xs text-text-faint",children:["sections (markdown)",g.jsx(at,{voice:"ghost",size:"sm",onClick:()=>E(!1),children:"Replier l'éditeur"})]}),g.jsx("textarea",{"aria-label":"sections (markdown)",value:m,onChange:V=>p(V.target.value),rows:28,spellCheck:!1,className:`${to} resize-y p-3 font-mono text-xs leading-relaxed`}),g.jsxs("span",{className:"mt-1 block text-right font-mono text-xs text-text-faint",children:[g.jsx(Ja,{value:m.split(`
|
|
77
|
-
`).length})," lignes · ",g.jsx(Ja,{value:m.trim()===""?0:m.trim().split(/\s+/u).length})," mots"]})]}):g.jsxs("button",{type:"button",onClick:()=>E(!0),className:"flex w-full items-center justify-between rounded-md border border-dashed border-border-strong/60 bg-surface-raised/60 px-4 py-3 text-left text-sm text-text-muted transition-colors hover:border-accent hover:text-text",children:[g.jsxs("span",{children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:"sections (markdown)"}),g.jsx("span",{className:"ml-3",children:"Éditer les sections"})]}),g.jsxs("span",{className:"font-mono text-xs tabular-nums text-text-faint",children:[m.split(`
|
|
78
|
-
`).length," lignes · ",m.trim()===""?0:m.trim().split(/\s+/u).length," mots"]})]}),g.jsxs("div",{className:"text-sm",children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:"preview"}),g.jsx("div",{className:"mt-1 h-full rounded-md border border-border bg-surface-raised p-5 shadow-raised",children:g.jsx(GN,{markdown:m})})]})]}),g.jsxs(x0,{open:x,title:`Valider ${t} ?`,onClose:()=>S(!1),children:[g.jsxs("p",{children:["Une spec validée est un contrat d'implémentation : status passera à « validated » et le fichier sera réécrit (message « spec: validate ",t," »)."]}),g.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[g.jsx(at,{voice:"ghost",onClick:()=>S(!1),children:"Annuler"}),g.jsx(at,{voice:"primary",onClick:R,disabled:j.isPending,children:"Confirmer la validation"})]})]})]})}const FN={skeleton:"neutral","in-progress":"warning",delivered:"positive"},VN={GET:"accent",POST:"positive",PUT:"warning",PATCH:"warning",DELETE:"danger"};function PN(){const{data:t,isPending:i,error:s}=IT();if(s)return g.jsx(St,{error:s});if(i)return g.jsx("div",{"aria-label":"Chargement du manifeste",className:"h-96 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const{manifest:r}=t,o=r.features.reduce((d,h)=>d+h.routes.length,0),c=r.features.filter(d=>d.status==="delivered").length;return g.jsxs("div",{className:"space-y-6",children:[g.jsx(ss,{eyebrow:"Manifeste · lecture seule",title:r.product.name,explanation:r.product.description}),g.jsx("dl",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[{label:"apps",value:r.apps.length},{label:"features",value:r.features.length},{label:"livrées",value:c},{label:"routes",value:o}].map((d,h)=>g.jsxs("div",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":h},children:[g.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:d.label}),g.jsx("dd",{className:"mt-1 font-display text-3xl font-semibold leading-none text-text",children:g.jsx(Ja,{value:d.value})})]},d.label))}),g.jsxs(ln,{"aria-label":"Apps",children:[g.jsx("h2",{className:"mb-3 font-display text-lg font-semibold text-text",children:"Apps"}),g.jsx("ul",{className:"divide-y divide-border text-sm",children:r.apps.map(d=>g.jsxs("li",{className:"flex flex-wrap items-center gap-3 py-2",children:[g.jsx("span",{className:"font-mono font-medium text-text",children:d.name}),g.jsx(ot,{children:d.type}),g.jsx("span",{className:"font-mono text-xs text-text-faint",children:d.path})]},d.name))})]}),g.jsxs("section",{"aria-label":"Features",className:"space-y-3",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Features"}),r.features.map(d=>g.jsxs(ln,{children:[g.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g.jsx("h3",{className:"font-mono text-sm font-semibold text-text",children:d.name}),g.jsx(ot,{tone:FN[d.status]??"neutral",children:d.status})]}),g.jsx("p",{className:"mt-1 text-sm text-text-muted",children:d.intent}),d.dependsOn.length>0&&g.jsxs("p",{className:"mt-3 flex flex-wrap items-center gap-1.5 text-xs text-text-faint",children:["Dépend de :"," ",d.dependsOn.map(h=>g.jsx(ot,{mono:!0,children:h},h))]}),d.routes.length>0&&g.jsx("ul",{className:"mt-3 space-y-1 text-xs",children:d.routes.map(h=>g.jsxs("li",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"w-16 shrink-0",children:g.jsx(ot,{tone:VN[h.method]??"neutral",mono:!0,children:h.method})}),g.jsx("span",{className:"font-mono text-text-muted",children:h.path})]},`${h.method} ${h.path}`))})]},d.name))]})]})}const XN=se({accepted:gi(!0)});function mv({children:t}){return g.jsxs("div",{className:"mx-auto max-w-md pt-12",children:[g.jsxs("p",{className:"mb-6 flex flex-col items-center text-center",children:[g.jsx(hb,{size:"lg",label:"Ogygie",className:"mb-3 text-accent"}),g.jsx("span",{className:"font-display text-4xl font-semibold leading-none tracking-wide text-text",children:"Ogygie"}),g.jsx("span",{className:"mt-2 block font-mono text-xs uppercase tracking-[0.3em] text-accent",children:"Studio hébergé"})]}),g.jsx("div",{className:"studio-rise rounded-lg border border-border bg-surface-raised p-6 shadow-overlay",children:t})]})}function JN(){const[t,i]=J.useState(""),[s,r]=J.useState({kind:"idle"});async function o(c){c.preventDefault(),r({kind:"sending"});try{await ut("/api/auth/magic-link",XN,{method:"POST",...wr({email:t})}),r({kind:"sent"})}catch(d){r({kind:"error",error:d})}}return s.kind==="sent"?g.jsx(mv,{children:g.jsxs("section",{className:"studio-reveal",children:[g.jsx("h1",{className:"font-display text-2xl font-semibold text-text",children:"Vérifiez votre boîte mail"}),g.jsx("p",{className:"mt-2 text-sm text-text-muted",children:"Si ce compte existe, un lien de connexion a été envoyé. Il est valable quinze minutes et ne sert qu'une fois."})]})}):g.jsx(mv,{children:g.jsxs("form",{onSubmit:o,className:"studio-reveal",children:[g.jsx("h1",{className:"font-display text-2xl font-semibold text-text",children:"Connexion"}),g.jsx("p",{className:"mt-1 text-sm text-text-muted",children:"Un lien de connexion vous sera envoyé par courriel."}),g.jsx("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"login-email",children:"Adresse e-mail"}),g.jsx("input",{id:"login-email",type:"email",required:!0,autoComplete:"email",autoFocus:!0,value:t,onChange:c=>i(c.target.value),className:"mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent"}),s.kind==="error"&&g.jsx("div",{className:"mt-3",children:g.jsx(St,{error:s.error})}),g.jsx(at,{voice:"primary",type:"submit",disabled:s.kind==="sending",className:"mt-5 w-full",children:s.kind==="sending"?"Envoi…":"Recevoir un lien"})]})})}const no=50,IN=["Je veux une rubrique qui liste les commandes du mois avec leur statut, et un bouton pour marquer une commande livrée.","Les clients doivent pouvoir noter une intervention de 1 à 5 ; une note sous 3 déclenche une alerte au responsable."],WN=[{title:"Décrivez",detail:"le besoin, en français, comme à un collègue"},{title:"Le modèle rédige",detail:"la spec dans le format du repo ; les gates la jugent avant tout affichage"},{title:"Vous relisez",detail:"les comportements d'abord, puis vous validez — rien ne se code avant"}],Of="w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent",zf=3,eA=6,pv=t=>`${Math.floor(t/1e3)} s`;function tA(t){switch(t.stage){case"drafting":return`Le modèle écrit${t.attempt!==void 0&&t.attempt>1?` (tentative ${t.attempt})`:""}…`;case"judging":return`Les gates jugent${t.attempt!==void 0&&t.attempt>1?` (tentative ${t.attempt})`:""}…`;case"compositions":return`Les compositions, ${t.composition?.done??0} sur ${t.composition?.total??0}…`;case"writing":return"La pull request s'ouvre…";default:return""}}function gv({job:t}){const i=Math.min(1,t.elapsedMs/t.budgetMs);return g.jsxs("section",{role:"status","aria-label":"Brief en cours",className:"studio-rise rounded-lg border border-accent/30 bg-surface-raised p-4 text-sm",children:[g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("span",{className:"flex items-center gap-2 text-text",children:[g.jsx("span",{"aria-hidden":"true",className:"studio-live inline-block h-2 w-2 rounded-full bg-accent"}),tA(t)]}),g.jsxs("span",{className:"font-mono text-xs tabular-nums text-text-muted",children:[pv(t.elapsedMs)," / ",pv(t.budgetMs)]})]}),g.jsx("div",{"aria-hidden":"true",className:"mt-3 h-1 overflow-hidden rounded-full bg-surface-sunken",children:g.jsx("div",{className:`h-full rounded-full ${i>=1?"bg-warning":"bg-accent"} transition-[width] duration-(--duration-base)`,style:{width:`${Math.round(i*100)}%`}})}),i>=1&&g.jsx("p",{className:"mt-2 text-xs text-text-muted",children:"Au-delà du budget de 90 s : l'instance continue, le travail finira ou dira pourquoi."})]})}const jf=[".md",".markdown",".txt",".csv",".json",".html",".htm",".xlsx",".pdf"],nA=5,iA=4*1024*1024,yv=t=>t<1024?`${t} o`:t<1024*1024?`${Math.round(t/1024)} Ko`:`${(t/(1024*1024)).toFixed(1)} Mo`;async function aA(t){const i=new Uint8Array(await t.arrayBuffer());let s="";for(let r=0;r<i.length;r+=32768)s+=String.fromCharCode(...i.subarray(r,r+32768));return btoa(s)}function sA(){const[t,i]=J.useState(""),[s,r]=J.useState(""),[o,c]=J.useState(!1),[d,h]=J.useState([]),[m,p]=J.useState(null),[b,v]=J.useState(null),[x,S]=J.useState([]),[w,E]=J.useState({}),j=Ao(),A=aN(),k=rN(b),G=y0(),Y=t.trim().length,P=k.data?.stage==="done"?k.data.result?.specId:void 0;J.useEffect(()=>{P!==void 0&&j({to:"/specs/$specId",params:{specId:P}})},[P,j]);const Z=k.data?.stage==="questions"?k.data:null,R=k.data!==void 0&&k.data.stage!=="done"&&k.data.stage!=="failed"&&k.data.stage!=="questions",I=A.isPending||R||b!==null&&k.isPending,V=k.error instanceof Lo&&k.error.payload.code==="BRIEF_JOB_LOST",ee=x.flatMap(B=>Object.entries(B.answers).map(([oe,de])=>({questionId:oe,answer:de}))),re=s.trim().toLowerCase(),ie=re===""||!o?[]:(G.data?.specs??[]).filter(B=>"status"in B).filter(B=>B.id!==re&&(B.id.includes(re)||B.intent.toLowerCase().includes(re))).slice(0,eA);function he(B){A.mutate({brief:t,...s.trim()===""?{}:{specId:s.trim()},...d.length===0?{}:{attachments:d.map(oe=>({name:oe.name,contentBase64:oe.contentBase64}))},...B.answers.length===0?{}:{answers:B.answers},...B.round===1?{}:{round:B.round},...B.skipQuestions?{skipQuestions:!0}:{}},{onSuccess:oe=>v(oe.jobId)})}function ve(){if(Z===null)return;const B=Z.round??x.length+1,oe=[...x,{round:B,questions:Z.questions??[],answers:w}];S(oe),E({}),v(null),he({answers:oe.flatMap(de=>Object.entries(de.answers).map(([z,q])=>({questionId:z,answer:q}))),round:Math.min(B+1,zf+1),skipQuestions:!1})}function me(){const B=Z?.round??x.length+1;v(null),he({answers:ee,round:B,skipQuestions:!0})}async function U(B){const oe=Array.from(B.target.files??[]);B.target.value="",p(null);const de=[...d];for(const z of oe){const q=z.name.toLowerCase();if(!jf.some(X=>q.endsWith(X))){p(`« ${z.name} » : format non retenu — ${jf.join(", ")}.`);continue}if(z.size>iA){p(`« ${z.name} » : ${yv(z.size)}, au-delà de 4 Mo par pièce.`);continue}if(de.length>=nA){p(`Cinq pièces au plus : « ${z.name} » n'est pas jointe.`);break}de.some(X=>X.name===z.name)||de.push({name:z.name,size:z.size,contentBase64:await aA(z)})}h(de)}function W(B){B.preventDefault(),S([]),E({}),v(null),he({answers:[],round:1,skipQuestions:!1})}return g.jsxs("form",{onSubmit:W,className:"space-y-6",children:[g.jsx(ss,{eyebrow:"Hébergé",title:"Décrire une rubrique",explanation:"Écrivez le besoin en français. Le modèle rédige la spec, les gates du repo la jugent, puis vous la relisez avant de la valider."}),g.jsx("ol",{className:"grid gap-3 md:grid-cols-3",children:WN.map((B,oe)=>g.jsxs("li",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":oe},children:[g.jsxs("p",{className:"font-mono text-xs text-accent",children:["0",oe+1]}),g.jsx("p",{className:"mt-1 font-display text-lg font-semibold text-text",children:B.title}),g.jsx("p",{className:"mt-1 text-sm text-text-muted",children:B.detail})]},B.title))}),g.jsxs(ln,{className:"studio-reveal",style:{"--i":3},children:[g.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[g.jsx("label",{className:"block text-sm font-medium text-text",htmlFor:"brief-text",children:"Brief"}),g.jsxs("span",{className:`font-mono text-xs ${Y<no?"text-text-faint":"text-positive"}`,children:[Y," / ",no," caractères minimum"]})]}),g.jsx("textarea",{id:"brief-text",required:!0,minLength:no,rows:10,value:t,onChange:B=>i(B.target.value),placeholder:"Je veux une rubrique qui…",className:`${Of} mt-2 font-sans leading-relaxed`}),g.jsx("p",{className:"mt-3 text-xs text-text-faint",children:"Pour voir le ton attendu :"}),g.jsx("ul",{className:"mt-1 flex flex-wrap gap-2",children:IN.map(B=>g.jsx("li",{children:g.jsxs(at,{voice:"ghost",size:"sm",onClick:()=>i(B),className:"max-w-md text-left whitespace-normal",children:["« ",B," »"]})},B))}),g.jsxs("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"brief-spec-id",children:["Spec visée ",g.jsx("span",{className:"font-normal text-text-faint",children:"(optionnel, pour amender une spec existante)"})]}),g.jsxs("div",{className:"relative",children:[g.jsx("input",{id:"brief-spec-id",value:s,onChange:B=>r(B.target.value),onFocus:()=>c(!0),onBlur:()=>window.setTimeout(()=>c(!1),150),placeholder:"ex. suivi-des-commandes — tapez quelques lettres",autoComplete:"off","aria-autocomplete":"list","aria-controls":"brief-spec-suggestions","aria-expanded":ie.length>0,className:`${Of} mt-1 font-mono`}),ie.length>0&&g.jsx("ul",{id:"brief-spec-suggestions",role:"listbox","aria-label":"Specs du repo",className:"absolute z-10 mt-1 w-full overflow-hidden rounded-md border border-border bg-surface-raised shadow-overlay",children:ie.map(B=>g.jsx("li",{children:g.jsxs("button",{type:"button",role:"option","aria-selected":!1,onMouseDown:oe=>oe.preventDefault(),onClick:()=>{r(B.id),c(!1)},className:"flex w-full items-baseline gap-3 px-3 py-2 text-left text-sm transition-colors hover:bg-surface-sunken",children:[g.jsx("span",{className:"font-mono text-text",children:B.id}),g.jsx("span",{className:"truncate text-xs text-text-muted",children:B.intent})]})},B.id))})]}),g.jsxs("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"brief-attachments",children:["Pièces jointes ",g.jsx("span",{className:"font-normal text-text-faint",children:"(optionnel : une maquette HTML, un classeur, un document)"})]}),g.jsx("input",{id:"brief-attachments",type:"file",multiple:!0,accept:jf.join(","),onChange:B=>{U(B)},className:"mt-1 block w-full text-sm text-text-muted file:mr-3 file:rounded-md file:border file:border-border file:bg-surface file:px-3 file:py-1.5 file:text-sm file:text-text"}),g.jsx("p",{className:"mt-1 text-xs text-text-faint",children:"Cinq pièces au plus, 4 Mo chacune : md, txt, csv, json, html, xlsx, pdf. Le modèle les lit comme votre matériau ; rien n'est conservé."}),m!==null&&g.jsx("p",{role:"alert",className:"mt-2 text-xs text-danger",children:m}),d.length>0&&g.jsx("ul",{"aria-label":"Pièces jointes au brief",className:"mt-2 space-y-1",children:d.map(B=>g.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border border-border px-3 py-1.5 text-sm",children:[g.jsx("span",{className:"truncate font-mono text-text",children:B.name}),g.jsxs("span",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:yv(B.size)}),g.jsx(at,{voice:"ghost",size:"sm",onClick:()=>h(d.filter(oe=>oe.name!==B.name)),"aria-label":`Retirer ${B.name}`,children:"Retirer"})]})]},B.name))})]}),x.map(B=>g.jsxs("details",{className:"rounded-lg border border-border bg-surface-raised/60 px-4 py-3 text-sm",children:[g.jsxs("summary",{className:"cursor-pointer font-medium text-text",children:["Tournée ",B.round," sur ",zf," — répondue"]}),g.jsx("dl",{className:"mt-2 space-y-1 text-text-muted",children:B.questions.map(oe=>g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("dt",{children:oe.text}),g.jsx("dd",{className:"text-text",children:B.answers[oe.id]??"(sans réponse)"})]},oe.id))})]},B.round)),Z!==null&&g.jsxs(ln,{"aria-label":"Questions du modèle",className:"studio-rise text-sm",children:[g.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Le modèle a des questions"}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:["tournée ",Z.round??x.length+1," sur ",zf]})]}),g.jsx("p",{className:"mt-1 text-text-muted",children:"Une réponse change la spec ; sans réponse, le modèle tranche et l'écrit dans les hypothèses."}),g.jsx("ol",{className:"mt-4 space-y-4",children:(Z.questions??[]).map((B,oe)=>g.jsx("li",{children:g.jsxs("fieldset",{children:[g.jsxs("legend",{className:"font-medium text-text",children:[oe+1,". ",B.text]}),g.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:B.options.map(de=>g.jsxs("label",{className:`cursor-pointer rounded-md border px-3 py-1.5 transition-colors ${w[B.id]===de?"border-accent bg-accent-soft text-text":"border-border text-text-muted hover:border-border-strong"}`,children:[g.jsx("input",{type:"radio",name:`question-${B.id}`,value:de,checked:w[B.id]===de,onChange:()=>E({...w,[B.id]:de}),className:"sr-only"}),de]},de))}),g.jsx("input",{"aria-label":`Autre réponse — ${B.text}`,placeholder:"ou une réponse libre",value:B.options.includes(w[B.id]??"")?"":w[B.id]??"",onChange:de=>E({...w,[B.id]:de.target.value}),className:`${Of} mt-2`})]})},B.id))}),g.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[g.jsx(at,{voice:"primary",onClick:ve,disabled:A.isPending||Object.values(w).every(B=>B.trim()===""),children:"Répondre"}),g.jsx(at,{voice:"ghost",onClick:me,disabled:A.isPending,children:"Passer les questions"})]})]}),R&&k.data!==void 0&&g.jsx(gv,{job:k.data}),A.isPending&&b===null&&g.jsx(gv,{job:{jobId:"",stage:"drafting",attempt:1,elapsedMs:0,budgetMs:9e4}}),V&&g.jsx("section",{role:"alert",className:"studio-rise rounded-lg border border-warning/40 bg-warning-soft p-4 text-sm text-text",children:"Le travail s'est perdu : l'instance a redémarré pendant le brief. Votre texte est conservé, renvoyez-le."}),!V&&k.error!=null&&g.jsx(St,{error:k.error}),k.data?.stage==="failed"&&k.data.error!==void 0&&g.jsx(Nd,{error:k.data.error}),A.error!=null&&g.jsx(St,{error:A.error}),g.jsx(at,{voice:"primary",type:"submit",disabled:I||Z!==null||Y<no,children:x.length>0||Z!==null?"Recommencer le brief":"Rédiger la spec"})]})}const Tf={development:"Développement",staging:"Préproduction",production:"Production"},rA={success:"positive",failure:"danger",error:"danger",in_progress:"warning",pending:"warning",queued:"warning"},Nf="mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent";function lA(){const t=Er(),i=t.data?.host?.environments!==!1,s=cN(i),r=dN(),[o,c]=J.useState({environment:"staging",sha:"",reason:""});if(!i)return g.jsxs("div",{className:"space-y-6",children:[g.jsx(ss,{eyebrow:"Hébergé",title:"Promotions",explanation:"La production ne reçoit que ce que la préproduction a reçu, au commit près."}),g.jsxs(ln,{"aria-label":"Environnements non configurés",className:"studio-reveal text-sm text-text-muted",style:{"--i":0},children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Cet hôte ne déclare pas d'environnements"}),g.jsxs("p",{className:"mt-2",children:["Les promotions supposent les refs ",g.jsx("code",{className:"font-mono text-text",children:"env/staging"})," et ",g.jsx("code",{className:"font-mono text-text",children:"env/production"}),", déclarées dans le bloc"," ",g.jsx("code",{className:"font-mono text-text",children:"environments"})," de la configuration de l'hôte (runbook docs/HOSTED-STUDIO.md, § 6 ter). Sans elles, la fusion d'une spec met le développement à jour, et rien d'autre ne bouge."]})]})]});if(s.error)return g.jsx(St,{error:s.error});if(s.isPending)return g.jsx("div",{"aria-label":"Chargement des environnements",className:"h-40 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const d=s.data,h=x=>d.environments.find(S=>S.name===x)?.sha??null,m=h("development"),p=h("staging"),b=t.data?.role==="operator",v={staging:m,production:p};return g.jsxs("div",{className:"space-y-6",children:[g.jsx(ss,{eyebrow:"Hébergé",title:"Promotions",explanation:"La production ne reçoit que ce que la préproduction a reçu, au commit près."}),r.error!=null&&g.jsx(St,{error:r.error}),r.isSuccess&&g.jsxs("p",{role:"status",className:"studio-rise rounded-md border border-positive/40 bg-positive-soft p-3 text-sm text-text",children:[Tf[r.data.environment]," est à ",r.data.toSha.slice(0,7),r.data.releaseTag===null?"":` — release ${r.data.releaseTag}`,"."]}),g.jsx("ol",{className:"grid gap-3 md:grid-cols-[1fr_auto_1fr_auto_1fr] md:items-stretch",children:d.environments.map((x,S)=>{const w=v[x.name],E=w!=null&&w===x.sha,j=w!=null&&w!==x.sha;return g.jsxs("li",{className:"contents",children:[S>0&&g.jsx("span",{"aria-hidden":"true",className:"hidden self-center font-display text-2xl text-text-faint md:block",children:"→"}),g.jsxs(ln,{"aria-label":Tf[x.name]??x.name,className:"studio-reveal flex flex-col",style:{"--i":S},children:[g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:Tf[x.name]??x.name}),E&&g.jsx(ot,{tone:"positive",children:"à jour"}),j&&g.jsx(ot,{tone:"warning",children:"en retard"})]}),g.jsx("p",{className:"font-mono text-xs text-text-faint",children:x.ref}),g.jsx("p",{className:"mt-3 font-mono text-2xl text-text",children:x.sha===null?"(aucun commit)":x.sha.slice(0,7)}),x.deployment!==null&&g.jsxs("p",{className:"mt-2 flex items-center gap-2 text-xs text-text-muted",children:[g.jsx(ot,{tone:rA[x.deployment.state??"pending"]??"neutral",children:x.deployment.state??"en attente"}),"déployé le ",x.deployment.createdAt.slice(0,10)]}),g.jsxs("div",{className:"mt-auto pt-4",children:[x.name==="staging"&&g.jsx(at,{voice:"primary",size:"sm",className:"w-full",disabled:m===null||m===p||r.isPending,onClick:()=>m!==null&&r.mutate({environment:"staging",sha:m}),children:"Promouvoir le développement vers la préproduction"}),x.name==="production"&&g.jsx(at,{voice:"primary",size:"sm",className:"w-full",disabled:p===null||p===x.sha||r.isPending,onClick:()=>p!==null&&r.mutate({environment:"production",sha:p}),children:"Promouvoir la préproduction vers la production"})]})]})]},x.name)})}),g.jsxs(ln,{className:"studio-reveal",style:{"--i":3},children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Releases"}),d.releases.length===0?g.jsx("p",{className:"mt-1 text-sm text-text-muted",children:"Aucune mise en production étiquetée."}):g.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:d.releases.map(x=>g.jsx("li",{children:g.jsx(ot,{tone:"orichalcum",mono:!0,children:x})},x))})]}),b&&g.jsxs("form",{className:"studio-reveal rounded-lg border border-danger/40 bg-danger-soft/40 p-4 text-sm",style:{"--i":4},onSubmit:x=>{x.preventDefault(),r.mutate({environment:o.environment,sha:o.sha.trim(),rollback:!0,reason:o.reason.trim()})},children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Retour arrière (opérateur)"}),g.jsx("p",{className:"mt-1 text-xs text-text-muted",children:"Le seul chemin qui remonte le courant : il se motive, il se journalise."}),g.jsxs("div",{className:"mt-3 grid gap-3 md:grid-cols-3",children:[g.jsxs("label",{className:"text-xs text-text-muted",children:["Environnement",g.jsxs("select",{value:o.environment,onChange:x=>c({...o,environment:x.target.value}),className:Nf,children:[g.jsx("option",{value:"staging",children:"Préproduction"}),g.jsx("option",{value:"production",children:"Production"})]})]}),g.jsxs("label",{className:"text-xs text-text-muted",children:["Commit (sha complet)",g.jsx("input",{value:o.sha,onChange:x=>c({...o,sha:x.target.value}),className:`${Nf} font-mono`})]}),g.jsxs("label",{className:"text-xs text-text-muted",children:["Motif",g.jsx("input",{value:o.reason,onChange:x=>c({...o,reason:x.target.value}),className:Nf})]})]}),g.jsx(at,{voice:"danger",size:"sm",type:"submit",className:"mt-4",disabled:r.isPending||o.sha.length!==40||o.reason.trim().length<10,children:"Revenir en arrière"})]})]})}function oA(t){const i=[],s=new Date;for(let r=0;r<t;r+=1){const o=new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth()-r,1));i.push(o.toISOString().slice(0,7))}return i}const or=t=>`${t.toFixed(2)} $`,vv=t=>new Intl.NumberFormat("fr-FR",{notation:"compact",maximumFractionDigits:1}).format(t),mi="px-3 py-2 text-right font-mono tabular-nums";function uA(){const t=oA(6),[i,s]=J.useState(t[0]??""),r=hN(i);return g.jsxs("div",{className:"space-y-6",children:[g.jsx(ss,{eyebrow:"Hébergé",title:"Consommation",explanation:"Estimation à partir des jetons rapportés ; la facture vient de l'espace de travail du client.",actions:g.jsxs("label",{className:"text-sm text-text-muted",children:["Mois",g.jsx("select",{value:i,onChange:o=>s(o.target.value),className:"ml-2 rounded-md border border-border bg-surface-raised px-3 py-2 font-mono text-sm text-text",children:t.map(o=>g.jsx("option",{value:o,children:o},o))})]})}),r.error?g.jsx(St,{error:r.error}):null,r.isPending?g.jsx("div",{"aria-label":"Chargement de la consommation",className:"h-40 animate-pulse rounded-lg border border-border bg-surface-sunken/60"}):null,r.data!==void 0&&g.jsxs(g.Fragment,{children:[g.jsx("dl",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[{label:"appels",value:r.data.totals.runs,format:String},{label:"jetons entrés",value:r.data.totals.inputTokens,format:vv},{label:"jetons sortis",value:r.data.totals.outputTokens,format:vv},{label:"estimation",value:r.data.totals.estimatedUsd,format:or}].map((o,c)=>g.jsxs("div",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":c},children:[g.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:o.label}),g.jsx("dd",{className:"mt-1 font-display text-3xl font-semibold leading-none text-text",children:g.jsx(Ja,{value:o.value,format:o.format})})]},o.label))}),r.data.budgetUsd!==null&&g.jsxs("section",{"aria-label":"Plafond du mois",className:`rounded-lg border p-4 text-sm shadow-raised ${r.data.warning?"border-warning/50 bg-warning-soft text-text":"border-border bg-surface-raised text-text-muted"}`,children:[g.jsxs("p",{children:[or(r.data.totals.estimatedUsd)," sur un plafond de ",or(r.data.budgetUsd),r.data.budgetRatio!==null?` (${Math.round(r.data.budgetRatio*100)} %)`:""]}),g.jsx("div",{className:"mt-3 h-2 overflow-hidden rounded-full bg-surface-sunken",role:"presentation",children:g.jsx("div",{className:`h-full rounded-full transition-[width] duration-(--duration-slow) ease-swell ${r.data.warning?"bg-warning":"bg-accent"}`,style:{width:`${Math.min(100,Math.round((r.data.budgetRatio??0)*100))}%`}})}),r.data.warning&&g.jsx("p",{className:"mt-2 font-medium",children:"Plus de 80 % du plafond : au-delà, le modèle refusera jusqu'au mois prochain."})]}),r.data.specs.length===0?g.jsx(b0,{title:"Aucun appel de modèle ce mois-ci",hint:"Les briefs et les spéculations à venir apparaîtront ici, par spec."}):g.jsx("div",{className:"overflow-hidden rounded-lg border border-border bg-surface-raised shadow-raised",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{className:"bg-surface-sunken/60 text-left font-mono text-xs uppercase tracking-[0.12em] text-text-faint",children:g.jsxs("tr",{children:[g.jsx("th",{className:"px-3 py-2 font-normal",children:"Spec"}),g.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Runs"}),g.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Entrée"}),g.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Sortie"}),g.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Estimation"})]})}),g.jsxs("tbody",{children:[r.data.specs.map(o=>g.jsxs("tr",{className:"border-t border-border transition-colors hover:bg-surface-sunken/40",children:[g.jsxs("td",{className:"px-3 py-2 font-mono text-text",children:[o.specId," ",g.jsxs("span",{className:"text-xs text-text-faint",children:["#",o.pullRequestNumber]})]}),g.jsx("td",{className:mi,children:o.runs}),g.jsx("td",{className:mi,children:o.inputTokens}),g.jsx("td",{className:mi,children:o.outputTokens}),g.jsxs("td",{className:mi,children:[or(o.estimatedUsd),o.uncostedModels.length>0&&g.jsxs("span",{className:"ml-1 font-sans text-xs text-text-faint",children:["(+ ",o.uncostedModels.join(", ")," sans coût connu)"]})]})]},o.specId)),g.jsxs("tr",{className:"border-t-2 border-border-strong font-semibold text-text",children:[g.jsx("td",{className:"px-3 py-2",children:"Total"}),g.jsx("td",{className:mi,children:r.data.totals.runs}),g.jsx("td",{className:mi,children:r.data.totals.inputTokens}),g.jsx("td",{className:mi,children:r.data.totals.outputTokens}),g.jsx("td",{className:mi,children:or(r.data.totals.estimatedUsd)})]})]})]})})]})]})}const E0="ogygie-studio-theme";function cA(){try{const t=window.localStorage.getItem(E0);return t==="dark"||t==="light"?t:null}catch{return null}}const fA="dark";function dA(){const[t,i]=J.useState(()=>cA()??fA);J.useEffect(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const s=J.useCallback(()=>{i(r=>{const o=r==="dark"?"light":"dark";try{window.localStorage.setItem(E0,o)}catch{}return o})},[]);return{theme:t,toggle:s}}const hA="flex items-center gap-3 rounded-md px-3 py-2 text-sm text-text-muted transition-colors hover:bg-surface-sunken hover:text-text [&.active]:bg-accent-soft [&.active]:text-accent [&.active]:font-medium";function ur({to:t,glyph:i,children:s}){return g.jsxs(os,{to:t,className:hA,activeOptions:{exact:t==="/"},children:[g.jsx("span",{"aria-hidden":"true",className:"w-4 text-center font-mono text-xs text-text-faint",children:i}),s]})}function mA(){const t=Er(),{theme:i,toggle:s}=dA();return g.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r border-border bg-surface-sunken/60 px-3 py-5",children:[g.jsxs(os,{to:"/",className:"mb-6 flex items-center gap-3 px-3",children:[g.jsx(hb,{size:"md",className:"text-accent"}),g.jsxs("span",{className:"flex flex-col",children:[g.jsx("span",{className:"font-display text-2xl font-semibold leading-none tracking-wide text-text",children:"Ogygie"}),g.jsx("span",{className:"mt-1 block font-mono text-xs uppercase tracking-[0.22em] text-accent",children:"Studio"})]})]}),g.jsxs("nav",{"aria-label":"Navigation du studio",className:"flex flex-col gap-1",children:[g.jsx(ur,{to:"/",glyph:"▦",children:"Board"}),g.jsx(ur,{to:"/manifest",glyph:"◫",children:"Manifeste"}),t.data!==void 0&&g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"mt-4 mb-1 px-3 font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:"Hébergé"}),g.jsx(ur,{to:"/brief",glyph:"✎",children:"Brief"}),t.data.host?.environments!==!1&&g.jsx(ur,{to:"/promotions",glyph:"⇥",children:"Promotions"}),g.jsx(ur,{to:"/consumption",glyph:"◔",children:"Consommation"})]})]}),g.jsxs("div",{className:"mt-auto space-y-3 px-3 pt-6",children:[t.data!==void 0&&g.jsxs("div",{className:"rounded-md border border-border bg-surface-raised px-3 py-2 text-xs",children:[g.jsx("p",{className:"truncate font-medium text-text",children:t.data.displayName}),g.jsx("p",{className:"font-mono text-text-faint",children:t.data.role})]}),g.jsxs("button",{type:"button",onClick:s,"aria-label":i==="dark"?"Passer au thème clair":"Passer au thème sombre",className:"flex w-full items-center justify-between rounded-md border border-border px-3 py-2 text-xs text-text-muted transition-colors hover:border-border-strong hover:text-text",children:[g.jsx("span",{children:i==="dark"?"Abysse":"Marbre"}),g.jsx("span",{"aria-hidden":"true",className:"font-mono",children:i==="dark"?"☾":"☀"})]})]})]})}function pA(){return g.jsxs("div",{className:"flex min-h-screen bg-surface text-text",children:[g.jsx(mA,{}),g.jsx("main",{className:"min-w-0 flex-1",children:g.jsx("div",{className:"studio-rise mx-auto max-w-6xl px-8 py-8",children:g.jsx(fb,{})})})]})}const ji=Ew({component:pA}),gA=sa({getParentRoute:()=>ji,path:"/",component:ON}),O0=sa({getParentRoute:()=>ji,path:"/specs/$specId",component:function(){const{specId:i}=O0.useParams();return g.jsx(KN,{specId:i})}}),yA=sa({getParentRoute:()=>ji,path:"/manifest",component:PN}),vA=sa({getParentRoute:()=>ji,path:"/login",component:JN}),bA=sa({getParentRoute:()=>ji,path:"/brief",component:sA}),xA=sa({getParentRoute:()=>ji,path:"/promotions",component:lA}),SA=sa({getParentRoute:()=>ji,path:"/consumption",component:uA}),_A=ji.addChildren([gA,O0,yA,vA,bA,xA,SA]);function wA(t){return Mw({routeTree:_A})}const EA=new C_,OA=wA(),z0=document.getElementById("root");if(z0===null)throw new Error("Studio UI: #root element missing from index.html");s_.createRoot(z0).render(g.jsx(J.StrictMode,{children:g.jsx(r_,{client:EA,children:g.jsx(Uw,{router:OA})})}));
|