@ogygie/studio 0.28.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.
- package/dist/server.js +610 -198
- package/dist-ui/assets/index-BINhW8jc.js +78 -0
- package/dist-ui/index.html +1 -1
- package/package.json +3 -3
- package/dist-ui/assets/index-CTdNCZow.js +0 -78
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.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 i(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=i(o);fetch(o.href,c)}})();function t_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lf={exports:{}},sr={};var kg;function n_(){if(kg)return sr;kg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(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 sr.Fragment=a,sr.jsx=i,sr.jsxs=i,sr}var Ug;function a_(){return Ug||(Ug=1,lf.exports=n_()),lf.exports}var g=a_(),of={exports:{}},ge={};var Lg;function s_(){if(Lg)return ge;Lg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=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(j){return j===null||typeof j!="object"?null:(j=x&&j[x]||j["@@iterator"],typeof j=="function"?j:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,z={};function R(j,q,ee){this.props=j,this.context=q,this.refs=z,this.updater=ee||w}R.prototype.isReactComponent={},R.prototype.setState=function(j,q){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,q,"setState")},R.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function U(){}U.prototype=R.prototype;function Q(j,q,ee){this.props=j,this.context=q,this.refs=z,this.updater=ee||w}var V=Q.prototype=new U;V.constructor=Q,O(V,R.prototype),V.isPureReactComponent=!0;var J=Array.isArray;function L(){}var A={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function P(j,q,ee){var ae=ee.ref;return{$$typeof:t,type:j,key:q,ref:ae!==void 0?ae:null,props:ee}}function te(j,q){return P(j.type,q,j.props)}function le(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function re(j){var q={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ee){return q[ee]})}var me=/\/+/g;function ye(j,q){return typeof j=="object"&&j!==null&&j.key!=null?re(""+j.key):q.toString(36)}function F(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(L,L):(j.status="pending",j.then(function(q){j.status==="pending"&&(j.status="fulfilled",j.value=q)},function(q){j.status==="pending"&&(j.status="rejected",j.reason=q)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function M(j,q,ee,ae,pe){var xe=typeof j;(xe==="undefined"||xe==="boolean")&&(j=null);var je=!1;if(j===null)je=!0;else switch(xe){case"bigint":case"string":case"number":je=!0;break;case"object":switch(j.$$typeof){case t:case a:je=!0;break;case b:return je=j._init,M(je(j._payload),q,ee,ae,pe)}}if(je)return pe=pe(j),je=ae===""?"."+ye(j,0):ae,J(pe)?(ee="",je!=null&&(ee=je.replace(me,"$&/")+"/"),M(pe,q,ee,"",function(cn){return cn})):pe!=null&&(le(pe)&&(pe=te(pe,ee+(pe.key==null||j&&j.key===pe.key?"":(""+pe.key).replace(me,"$&/")+"/")+je)),q.push(pe)),1;je=0;var Ze=ae===""?".":ae+":";if(J(j))for(var He=0;He<j.length;He++)ae=j[He],xe=Ze+ye(ae,He),je+=M(ae,q,ee,xe,pe);else if(He=S(j),typeof He=="function")for(j=He.call(j),He=0;!(ae=j.next()).done;)ae=ae.value,xe=Ze+ye(ae,He++),je+=M(ae,q,ee,xe,pe);else if(xe==="object"){if(typeof j.then=="function")return M(F(j),q,ee,ae,pe);throw q=String(j),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return je}function I(j,q,ee){if(j==null)return j;var ae=[],pe=0;return M(j,ae,"","",function(xe){return q.call(ee,xe,pe++)}),ae}function B(j){if(j._status===-1){var q=j._result;q=q(),q.then(function(ee){(j._status===0||j._status===-1)&&(j._status=1,j._result=ee)},function(ee){(j._status===0||j._status===-1)&&(j._status=2,j._result=ee)}),j._status===-1&&(j._status=0,j._result=q)}if(j._status===1)return j._result.default;throw j._result}var se=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},fe={map:I,forEach:function(j,q,ee){I(j,function(){q.apply(this,arguments)},ee)},count:function(j){var q=0;return I(j,function(){q++}),q},toArray:function(j){return I(j,function(q){return q})||[]},only:function(j){if(!le(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return ge.Activity=v,ge.Children=fe,ge.Component=R,ge.Fragment=i,ge.Profiler=o,ge.PureComponent=Q,ge.StrictMode=r,ge.Suspense=m,ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,ge.__COMPILER_RUNTIME={__proto__:null,c:function(j){return A.H.useMemoCache(j)}},ge.cache=function(j){return function(){return j.apply(null,arguments)}},ge.cacheSignal=function(){return null},ge.cloneElement=function(j,q,ee){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ae=O({},j.props),pe=j.key;if(q!=null)for(xe in q.key!==void 0&&(pe=""+q.key),q)!X.call(q,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&q.ref===void 0||(ae[xe]=q[xe]);var xe=arguments.length-2;if(xe===1)ae.children=ee;else if(1<xe){for(var je=Array(xe),Ze=0;Ze<xe;Ze++)je[Ze]=arguments[Ze+2];ae.children=je}return P(j.type,pe,ae)},ge.createContext=function(j){return j={$$typeof:d,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:c,_context:j},j},ge.createElement=function(j,q,ee){var ae,pe={},xe=null;if(q!=null)for(ae in q.key!==void 0&&(xe=""+q.key),q)X.call(q,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(pe[ae]=q[ae]);var je=arguments.length-2;if(je===1)pe.children=ee;else if(1<je){for(var Ze=Array(je),He=0;He<je;He++)Ze[He]=arguments[He+2];pe.children=Ze}if(j&&j.defaultProps)for(ae in je=j.defaultProps,je)pe[ae]===void 0&&(pe[ae]=je[ae]);return P(j,xe,pe)},ge.createRef=function(){return{current:null}},ge.forwardRef=function(j){return{$$typeof:h,render:j}},ge.isValidElement=le,ge.lazy=function(j){return{$$typeof:b,_payload:{_status:-1,_result:j},_init:B}},ge.memo=function(j,q){return{$$typeof:p,type:j,compare:q===void 0?null:q}},ge.startTransition=function(j){var q=A.T,ee={};A.T=ee;try{var ae=j(),pe=A.S;pe!==null&&pe(ee,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(L,se)}catch(xe){se(xe)}finally{q!==null&&ee.types!==null&&(q.types=ee.types),A.T=q}},ge.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},ge.use=function(j){return A.H.use(j)},ge.useActionState=function(j,q,ee){return A.H.useActionState(j,q,ee)},ge.useCallback=function(j,q){return A.H.useCallback(j,q)},ge.useContext=function(j){return A.H.useContext(j)},ge.useDebugValue=function(){},ge.useDeferredValue=function(j,q){return A.H.useDeferredValue(j,q)},ge.useEffect=function(j,q){return A.H.useEffect(j,q)},ge.useEffectEvent=function(j){return A.H.useEffectEvent(j)},ge.useId=function(){return A.H.useId()},ge.useImperativeHandle=function(j,q,ee){return A.H.useImperativeHandle(j,q,ee)},ge.useInsertionEffect=function(j,q){return A.H.useInsertionEffect(j,q)},ge.useLayoutEffect=function(j,q){return A.H.useLayoutEffect(j,q)},ge.useMemo=function(j,q){return A.H.useMemo(j,q)},ge.useOptimistic=function(j,q){return A.H.useOptimistic(j,q)},ge.useReducer=function(j,q,ee){return A.H.useReducer(j,q,ee)},ge.useRef=function(j){return A.H.useRef(j)},ge.useState=function(j){return A.H.useState(j)},ge.useSyncExternalStore=function(j,q,ee){return A.H.useSyncExternalStore(j,q,ee)},ge.useTransition=function(){return A.H.useTransition()},ge.version="19.2.8",ge}var Zg;function Or(){return Zg||(Zg=1,of.exports=s_()),of.exports}var W=Or();const To=t_(W);var uf={exports:{}},ir={},cf={exports:{}},ff={};var qg;function i_(){return qg||(qg=1,(function(t){function a(M,I){var B=M.length;M.push(I);e:for(;0<B;){var se=B-1>>>1,fe=M[se];if(0<o(fe,I))M[se]=I,M[B]=fe,B=se;else break e}}function i(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var I=M[0],B=M.pop();if(B!==I){M[0]=B;e:for(var se=0,fe=M.length,j=fe>>>1;se<j;){var q=2*(se+1)-1,ee=M[q],ae=q+1,pe=M[ae];if(0>o(ee,B))ae<fe&&0>o(pe,ee)?(M[se]=pe,M[ae]=B,se=ae):(M[se]=ee,M[q]=B,se=q);else if(ae<fe&&0>o(pe,B))M[se]=pe,M[ae]=B,se=ae;else break e}}return I}function o(M,I){var B=M.sortIndex-I.sortIndex;return B!==0?B:M.id-I.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,O=!1,z=!1,R=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function V(M){for(var I=i(p);I!==null;){if(I.callback===null)r(p);else if(I.startTime<=M)r(p),I.sortIndex=I.expirationTime,a(m,I);else break;I=i(p)}}function J(M){if(O=!1,V(M),!w)if(i(m)!==null)w=!0,L||(L=!0,re());else{var I=i(p);I!==null&&F(J,I.startTime-M)}}var L=!1,A=-1,X=5,P=-1;function te(){return z?!0:!(t.unstable_now()-P<X)}function le(){if(z=!1,L){var M=t.unstable_now();P=M;var I=!0;try{e:{w=!1,O&&(O=!1,U(A),A=-1),S=!0;var B=x;try{t:{for(V(M),v=i(m);v!==null&&!(v.expirationTime>M&&te());){var se=v.callback;if(typeof se=="function"){v.callback=null,x=v.priorityLevel;var fe=se(v.expirationTime<=M);if(M=t.unstable_now(),typeof fe=="function"){v.callback=fe,V(M),I=!0;break t}v===i(m)&&r(m),V(M)}else r(m);v=i(m)}if(v!==null)I=!0;else{var j=i(p);j!==null&&F(J,j.startTime-M),I=!1}}break e}finally{v=null,x=B,S=!1}I=void 0}}finally{I?re():L=!1}}}var re;if(typeof Q=="function")re=function(){Q(le)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,ye=me.port2;me.port1.onmessage=le,re=function(){ye.postMessage(null)}}else re=function(){R(le,0)};function F(M,I){A=R(function(){M(t.unstable_now())},I)}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(M){M.callback=null},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(M){switch(x){case 1:case 2:case 3:var I=3;break;default:I=x}var B=x;x=I;try{return M()}finally{x=B}},t.unstable_requestPaint=function(){z=!0},t.unstable_runWithPriority=function(M,I){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var B=x;x=M;try{return I()}finally{x=B}},t.unstable_scheduleCallback=function(M,I,B){var se=t.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?se+B:se):B=se,M){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=B+fe,M={id:b++,callback:I,priorityLevel:M,startTime:B,expirationTime:fe,sortIndex:-1},B>se?(M.sortIndex=B,a(p,M),i(m)===null&&M===i(p)&&(O?(U(A),A=-1):O=!0,F(J,B-se))):(M.sortIndex=fe,a(m,M),w||S||(w=!0,L||(L=!0,re()))),M},t.unstable_shouldYield=te,t.unstable_wrapCallback=function(M){var I=x;return function(){var B=x;x=I;try{return M.apply(this,arguments)}finally{x=B}}}})(ff)),ff}var Bg;function r_(){return Bg||(Bg=1,cf.exports=i_()),cf.exports}var df={exports:{}},yt={};var $g;function l_(){if($g)return yt;$g=1;var t=Or();function a(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 i(){}var r={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},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 yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,yt.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(a(299));return c(m,p,null,b)},yt.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()}},yt.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))},yt.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},yt.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})}},yt.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)},yt.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})}},yt.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)},yt.requestFormReset=function(m){r.d.r(m)},yt.unstable_batchedUpdates=function(m,p){return m(p)},yt.useFormState=function(m,p,b){return d.H.useFormState(m,p,b)},yt.useFormStatus=function(){return d.H.useHostTransitionStatus()},yt.version="19.2.8",yt}var Hg;function Ev(){if(Hg)return df.exports;Hg=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(a){console.error(a)}}return t(),df.exports=l_(),df.exports}var Qg;function o_(){if(Qg)return ir;Qg=1;var t=r_(),a=Or(),i=Ev();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s])}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,s=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(s=n.return),e=n.return;while(e)}return n.tag===3?s: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 s=e,l=n;;){var u=s.return;if(u===null)break;var f=u.alternate;if(f===null){if(l=u.return,l!==null){s=l;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===s)return m(u),e;if(f===l)return m(u),n;f=f.sibling}throw Error(r(188))}if(s.return!==l.return)s=u,l=f;else{for(var y=!1,_=u.child;_;){if(_===s){y=!0,s=u,l=f;break}if(_===l){y=!0,l=u,s=f;break}_=_.sibling}if(!y){for(_=f.child;_;){if(_===s){y=!0,s=f,l=u;break}if(_===l){y=!0,l=f,s=u;break}_=_.sibling}if(!y)throw Error(r(189))}}if(s.alternate!==l)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?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"),O=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function re(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case R:return"Profiler";case z:return"StrictMode";case J:return"Suspense";case L:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case Q:return e.displayName||"Context";case U:return(e._context.displayName||"Context")+".Consumer";case V:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case A:return n=e.displayName||null,n!==null?n:ye(e.type)||"Memo";case X:n=e._payload,e=e._init;try{return ye(e(n))}catch{}}return null}var F=Array.isArray,M=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},se=[],fe=-1;function j(e){return{current:e}}function q(e){0>fe||(e.current=se[fe],se[fe]=null,fe--)}function ee(e,n){fe++,se[fe]=e.current,e.current=n}var ae=j(null),pe=j(null),xe=j(null),je=j(null);function Ze(e,n){switch(ee(xe,n),ee(pe,e),ee(ae,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?sg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=sg(n),e=ig(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(ae),ee(ae,e)}function He(){q(ae),q(pe),q(xe)}function cn(e){e.memoizedState!==null&&ee(je,e);var n=ae.current,s=ig(n,e.type);n!==s&&(ee(pe,e),ee(ae,s))}function Ra(e){pe.current===e&&(q(ae),q(pe)),je.current===e&&(q(je),er._currentValue=B)}var Ho,Dd;function Aa(e){if(Ho===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);Ho=n&&n[1]||"",Dd=-1<s.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Ho+e+Dd}var Qo=!1;function Ko(e,n){if(!e||Qo)return"";Qo=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(Z){var k=Z}Reflect.construct(e,[],Y)}else{try{Y.call()}catch(Z){k=Z}e.call(Y.prototype)}}else{try{throw Error()}catch(Z){k=Z}(Y=e())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(Z){if(Z&&k&&typeof Z.stack=="string")return[Z.stack,k.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 E=y.split(`
|
|
4
|
+
`),D=_.split(`
|
|
5
|
+
`);for(u=l=0;l<E.length&&!E[l].includes("DetermineComponentFrameRoot");)l++;for(;u<D.length&&!D[u].includes("DetermineComponentFrameRoot");)u++;if(l===E.length||u===D.length)for(l=E.length-1,u=D.length-1;1<=l&&0<=u&&E[l]!==D[u];)u--;for(;1<=l&&0<=u;l--,u--)if(E[l]!==D[u]){if(l!==1||u!==1)do if(l--,u--,0>u||E[l]!==D[u]){var $=`
|
|
6
|
+
`+E[l].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=l&&0<=u);break}}}finally{Qo=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?Aa(s):""}function C0(e,n){switch(e.tag){case 26:case 27:case 5:return Aa(e.type);case 16:return Aa("Lazy");case 13:return e.child!==n&&n!==null?Aa("Suspense Fallback"):Aa("Suspense");case 19:return Aa("SuspenseList");case 0:case 15:return Ko(e.type,!1);case 11:return Ko(e.type.render,!1);case 1:return Ko(e.type,!0);case 31:return Aa("Activity");default:return""}}function kd(e){try{var n="",s=null;do n+=C0(e,s),s=e,e=e.return;while(e);return n}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var Go=Object.prototype.hasOwnProperty,Yo=t.unstable_scheduleCallback,Fo=t.unstable_cancelCallback,M0=t.unstable_shouldYield,D0=t.unstable_requestPaint,Ct=t.unstable_now,k0=t.unstable_getCurrentPriorityLevel,Ud=t.unstable_ImmediatePriority,Ld=t.unstable_UserBlockingPriority,zr=t.unstable_NormalPriority,U0=t.unstable_LowPriority,Zd=t.unstable_IdlePriority,L0=t.log,Z0=t.unstable_setDisableYieldValue,di=null,Mt=null;function Gn(e){if(typeof L0=="function"&&Z0(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(di,e)}catch{}}var Dt=Math.clz32?Math.clz32:$0,q0=Math.log,B0=Math.LN2;function $0(e){return e>>>=0,e===0?32:31-(q0(e)/B0|0)|0}var Nr=256,Tr=262144,Rr=4194304;function Ca(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 Ar(e,n,s){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=Ca(l):(y&=_,y!==0?u=Ca(y):s||(s=_&~e,s!==0&&(u=Ca(s))))):(_=l&~f,_!==0?u=Ca(_):y!==0?u=Ca(y):s||(s=l&~e,s!==0&&(u=Ca(s)))),u===0?0:n!==0&&n!==u&&(n&f)===0&&(f=u&-u,s=n&-n,f>=s||f===32&&(s&4194048)!==0)?n:u}function hi(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function H0(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 qd(){var e=Rr;return Rr<<=1,(Rr&62914560)===0&&(Rr=4194304),e}function Vo(e){for(var n=[],s=0;31>s;s++)n.push(e);return n}function mi(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Q0(e,n,s,l,u,f){var y=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var _=e.entanglements,E=e.expirationTimes,D=e.hiddenUpdates;for(s=y&~s;0<s;){var $=31-Dt(s),Y=1<<$;_[$]=0,E[$]=-1;var k=D[$];if(k!==null)for(D[$]=null,$=0;$<k.length;$++){var Z=k[$];Z!==null&&(Z.lane&=-536870913)}s&=~Y}l!==0&&Bd(e,l,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(y&~n))}function Bd(e,n,s){e.pendingLanes|=n,e.suspendedLanes&=~n;var l=31-Dt(n);e.entangledLanes|=n,e.entanglements[l]=e.entanglements[l]|1073741824|s&261930}function $d(e,n){var s=e.entangledLanes|=n;for(e=e.entanglements;s;){var l=31-Dt(s),u=1<<l;u&n|e[l]&n&&(e[l]|=n),s&=~u}}function Hd(e,n){var s=n&-n;return s=(s&42)!==0?1:Po(s),(s&(e.suspendedLanes|n))!==0?0:s}function Po(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 Xo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Qd(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Ng(e.type))}function Kd(e,n){var s=I.p;try{return I.p=e,n()}finally{I.p=s}}var Yn=Math.random().toString(36).slice(2),ct="__reactFiber$"+Yn,wt="__reactProps$"+Yn,os="__reactContainer$"+Yn,Jo="__reactEvents$"+Yn,K0="__reactListeners$"+Yn,G0="__reactHandles$"+Yn,Gd="__reactResources$"+Yn,pi="__reactMarker$"+Yn;function Io(e){delete e[ct],delete e[wt],delete e[Jo],delete e[K0],delete e[G0]}function us(e){var n=e[ct];if(n)return n;for(var s=e.parentNode;s;){if(n=s[os]||s[ct]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(e=dg(e);e!==null;){if(s=e[ct])return s;e=dg(e)}return n}e=s,s=e.parentNode}return null}function cs(e){if(e=e[ct]||e[os]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function gi(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function fs(e){var n=e[Gd];return n||(n=e[Gd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function lt(e){e[pi]=!0}var Yd=new Set,Fd={};function Ma(e,n){ds(e,n),ds(e+"Capture",n)}function ds(e,n){for(Fd[e]=n,e=0;e<n.length;e++)Yd.add(n[e])}var Y0=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]*$"),Vd={},Pd={};function F0(e){return Go.call(Pd,e)?!0:Go.call(Vd,e)?!1:Y0.test(e)?Pd[e]=!0:(Vd[e]=!0,!1)}function Cr(e,n,s){if(F0(n))if(s===null)e.removeAttribute(n);else{switch(typeof s){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,""+s)}}function Mr(e,n,s){if(s===null)e.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+s)}}function Sn(e,n,s,l){if(l===null)e.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(n,s,""+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 Xd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function V0(e,n,s){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){s=""+y,f.call(this,y)}}),Object.defineProperty(e,n,{enumerable:l.enumerable}),{getValue:function(){return s},setValue:function(y){s=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Wo(e){if(!e._valueTracker){var n=Xd(e)?"checked":"value";e._valueTracker=V0(e,n,""+e[n])}}function Jd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var s=n.getValue(),l="";return e&&(l=Xd(e)?e.checked?"true":"false":e.value),e=l,e!==s?(n.setValue(e),!0):!1}function Dr(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 P0=/[\n"\\]/g;function Yt(e){return e.replace(P0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function eu(e,n,s,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?tu(e,y,Gt(n)):s!=null?tu(e,y,Gt(s)):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 Id(e,n,s,l,u,f,y,_){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),n!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||n!=null)){Wo(e);return}s=s!=null?""+Gt(s):"",n=n!=null?""+Gt(n):s,_||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),Wo(e)}function tu(e,n,s){n==="number"&&Dr(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function hs(e,n,s,l){if(e=e.options,n){n={};for(var u=0;u<s.length;u++)n["$"+s[u]]=!0;for(s=0;s<e.length;s++)u=n.hasOwnProperty("$"+e[s].value),e[s].selected!==u&&(e[s].selected=u),u&&l&&(e[s].defaultSelected=!0)}else{for(s=""+Gt(s),n=null,u=0;u<e.length;u++){if(e[u].value===s){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Wd(e,n,s){if(n!=null&&(n=""+Gt(n),n!==e.value&&(e.value=n),s==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=s!=null?""+Gt(s):""}function eh(e,n,s,l){if(n==null){if(l!=null){if(s!=null)throw Error(r(92));if(F(l)){if(1<l.length)throw Error(r(93));l=l[0]}s=l}s==null&&(s=""),n=s}s=Gt(n),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l),Wo(e)}function ms(e,n){if(n){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=n;return}}e.textContent=n}var X0=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 th(e,n,s){var l=n.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":l?e.setProperty(n,s):typeof s!="number"||s===0||X0.has(n)?n==="float"?e.cssFloat=s:e[n]=(""+s).trim():e[n]=s+"px"}function nh(e,n,s){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,s!=null){for(var l in s)!s.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)&&s[u]!==l&&th(e,u,l)}else for(var f in n)n.hasOwnProperty(f)&&th(e,f,n[f])}function nu(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 J0=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"]]),I0=/^[\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 kr(e){return I0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function _n(){}var au=null;function su(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ps=null,gs=null;function ah(e){var n=cs(e);if(n&&(e=n.stateNode)){var s=e[wt]||null;e:switch(e=n.stateNode,n.type){case"input":if(eu(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),n=s.name,s.type==="radio"&&n!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Yt(""+n)+'"][type="radio"]'),n=0;n<s.length;n++){var l=s[n];if(l!==e&&l.form===e.form){var u=l[wt]||null;if(!u)throw Error(r(90));eu(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<s.length;n++)l=s[n],l.form===e.form&&Jd(l)}break e;case"textarea":Wd(e,s.value,s.defaultValue);break e;case"select":n=s.value,n!=null&&hs(e,!!s.multiple,n,!1)}}}var iu=!1;function sh(e,n,s){if(iu)return e(n,s);iu=!0;try{var l=e(n);return l}finally{if(iu=!1,(ps!==null||gs!==null)&&(_l(),ps&&(n=ps,e=gs,gs=ps=null,ah(n),e)))for(n=0;n<e.length;n++)ah(e[n])}}function yi(e,n){var s=e.stateNode;if(s===null)return null;var l=s[wt]||null;if(l===null)return null;s=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(s&&typeof s!="function")throw Error(r(231,n,typeof s));return s}var wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ru=!1;if(wn)try{var vi={};Object.defineProperty(vi,"passive",{get:function(){ru=!0}}),window.addEventListener("test",vi,vi),window.removeEventListener("test",vi,vi)}catch{ru=!1}var Fn=null,lu=null,Ur=null;function ih(){if(Ur)return Ur;var e,n=lu,s=n.length,l,u="value"in Fn?Fn.value:Fn.textContent,f=u.length;for(e=0;e<s&&n[e]===u[e];e++);var y=s-e;for(l=1;l<=y&&n[s-l]===u[f-l];l++);return Ur=u.slice(e,1<l?1-l:void 0)}function Lr(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 Zr(){return!0}function rh(){return!1}function Ot(e){function n(s,l,u,f,y){this._reactName=s,this._targetInst=u,this.type=l,this.nativeEvent=f,this.target=y,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(s=e[_],this[_]=s?s(f):f[_]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Zr:rh,this.isPropagationStopped=rh,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Zr)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Zr)},persist:function(){},isPersistent:Zr}),n}var Da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qr=Ot(Da),bi=v({},Da,{view:0,detail:0}),W0=Ot(bi),ou,uu,xi,Br=v({},bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fu,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!==xi&&(xi&&e.type==="mousemove"?(ou=e.screenX-xi.screenX,uu=e.screenY-xi.screenY):uu=ou=0,xi=e),ou)},movementY:function(e){return"movementY"in e?e.movementY:uu}}),lh=Ot(Br),ex=v({},Br,{dataTransfer:0}),tx=Ot(ex),nx=v({},bi,{relatedTarget:0}),cu=Ot(nx),ax=v({},Da,{animationName:0,elapsedTime:0,pseudoElement:0}),sx=Ot(ax),ix=v({},Da,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rx=Ot(ix),lx=v({},Da,{data:0}),oh=Ot(lx),ox={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ux={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"},cx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fx(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=cx[e])?!!n[e]:!1}function fu(){return fx}var dx=v({},bi,{key:function(e){if(e.key){var n=ox[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Lr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ux[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fu,charCode:function(e){return e.type==="keypress"?Lr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Lr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),hx=Ot(dx),mx=v({},Br,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uh=Ot(mx),px=v({},bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fu}),gx=Ot(px),yx=v({},Da,{propertyName:0,elapsedTime:0,pseudoElement:0}),vx=Ot(yx),bx=v({},Br,{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}),xx=Ot(bx),Sx=v({},Da,{newState:0,oldState:0}),_x=Ot(Sx),wx=[9,13,27,32],du=wn&&"CompositionEvent"in window,Si=null;wn&&"documentMode"in document&&(Si=document.documentMode);var Ox=wn&&"TextEvent"in window&&!Si,ch=wn&&(!du||Si&&8<Si&&11>=Si),fh=" ",dh=!1;function hh(e,n){switch(e){case"keyup":return wx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ys=!1;function Ex(e,n){switch(e){case"compositionend":return mh(n);case"keypress":return n.which!==32?null:(dh=!0,fh);case"textInput":return e=n.data,e===fh&&dh?null:e;default:return null}}function jx(e,n){if(ys)return e==="compositionend"||!du&&hh(e,n)?(e=ih(),Ur=lu=Fn=null,ys=!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 ch&&n.locale!=="ko"?null:n.data;default:return null}}var zx={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 ph(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!zx[e.type]:n==="textarea"}function gh(e,n,s,l){ps?gs?gs.push(l):gs=[l]:ps=l,n=Tl(n,"onChange"),0<n.length&&(s=new qr("onChange","change",null,s,l),e.push({event:s,listeners:n}))}var _i=null,wi=null;function Nx(e){Ip(e,0)}function $r(e){var n=gi(e);if(Jd(n))return e}function yh(e,n){if(e==="change")return n}var vh=!1;if(wn){var hu;if(wn){var mu="oninput"in document;if(!mu){var bh=document.createElement("div");bh.setAttribute("oninput","return;"),mu=typeof bh.oninput=="function"}hu=mu}else hu=!1;vh=hu&&(!document.documentMode||9<document.documentMode)}function xh(){_i&&(_i.detachEvent("onpropertychange",Sh),wi=_i=null)}function Sh(e){if(e.propertyName==="value"&&$r(wi)){var n=[];gh(n,wi,e,su(e)),sh(Nx,n)}}function Tx(e,n,s){e==="focusin"?(xh(),_i=n,wi=s,_i.attachEvent("onpropertychange",Sh)):e==="focusout"&&xh()}function Rx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $r(wi)}function Ax(e,n){if(e==="click")return $r(n)}function Cx(e,n){if(e==="input"||e==="change")return $r(n)}function Mx(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var kt=typeof Object.is=="function"?Object.is:Mx;function Oi(e,n){if(kt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var s=Object.keys(e),l=Object.keys(n);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var u=s[l];if(!Go.call(n,u)||!kt(e[u],n[u]))return!1}return!0}function _h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wh(e,n){var s=_h(e);e=0;for(var l;s;){if(s.nodeType===3){if(l=e+s.textContent.length,e<=n&&l>=n)return{node:s,offset:n-e};e=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=_h(s)}}function Oh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Oh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Eh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Dr(e.document);n instanceof e.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)e=n.contentWindow;else break;n=Dr(e.document)}return n}function pu(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 Dx=wn&&"documentMode"in document&&11>=document.documentMode,vs=null,gu=null,Ei=null,yu=!1;function jh(e,n,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;yu||vs==null||vs!==Dr(l)||(l=vs,"selectionStart"in l&&pu(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}),Ei&&Oi(Ei,l)||(Ei=l,l=Tl(gu,"onSelect"),0<l.length&&(n=new qr("onSelect","select",null,n,s),e.push({event:n,listeners:l}),n.target=vs)))}function ka(e,n){var s={};return s[e.toLowerCase()]=n.toLowerCase(),s["Webkit"+e]="webkit"+n,s["Moz"+e]="moz"+n,s}var bs={animationend:ka("Animation","AnimationEnd"),animationiteration:ka("Animation","AnimationIteration"),animationstart:ka("Animation","AnimationStart"),transitionrun:ka("Transition","TransitionRun"),transitionstart:ka("Transition","TransitionStart"),transitioncancel:ka("Transition","TransitionCancel"),transitionend:ka("Transition","TransitionEnd")},vu={},zh={};wn&&(zh=document.createElement("div").style,"AnimationEvent"in window||(delete bs.animationend.animation,delete bs.animationiteration.animation,delete bs.animationstart.animation),"TransitionEvent"in window||delete bs.transitionend.transition);function Ua(e){if(vu[e])return vu[e];if(!bs[e])return e;var n=bs[e],s;for(s in n)if(n.hasOwnProperty(s)&&s in zh)return vu[e]=n[s];return e}var Nh=Ua("animationend"),Th=Ua("animationiteration"),Rh=Ua("animationstart"),kx=Ua("transitionrun"),Ux=Ua("transitionstart"),Lx=Ua("transitioncancel"),Ah=Ua("transitionend"),Ch=new Map,bu="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(" ");bu.push("scrollEnd");function an(e,n){Ch.set(e,n),Ma(n,[e])}var Hr=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)},Ft=[],xs=0,xu=0;function Qr(){for(var e=xs,n=xu=xs=0;n<e;){var s=Ft[n];Ft[n++]=null;var l=Ft[n];Ft[n++]=null;var u=Ft[n];Ft[n++]=null;var f=Ft[n];if(Ft[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&&Mh(s,u,f)}}function Kr(e,n,s,l){Ft[xs++]=e,Ft[xs++]=n,Ft[xs++]=s,Ft[xs++]=l,xu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Su(e,n,s,l){return Kr(e,n,s,l),Gr(e)}function La(e,n){return Kr(e,null,null,n),Gr(e)}function Mh(e,n,s){e.lanes|=s;var l=e.alternate;l!==null&&(l.lanes|=s);for(var u=!1,f=e.return;f!==null;)f.childLanes|=s,l=f.alternate,l!==null&&(l.childLanes|=s),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(s),e=f.hiddenUpdates,l=e[u],l===null?e[u]=[n]:l.push(n),n.lane=s|536870912),f):null}function Gr(e){if(50<Fi)throw Fi=0,Rc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Ss={};function Zx(e,n,s,l){this.tag=e,this.key=s,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,s,l){return new Zx(e,n,s,l)}function _u(e){return e=e.prototype,!(!e||!e.isReactComponent)}function On(e,n){var s=e.alternate;return s===null?(s=Ut(e.tag,n,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=n,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,n=e.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Dh(e,n){e.flags&=65011714;var s=e.alternate;return s===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=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,n=s.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Yr(e,n,s,l,u,f){var y=0;if(l=e,typeof e=="function")_u(e)&&(y=1);else if(typeof e=="string")y=QS(e,s,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=Ut(31,s,n,u),e.elementType=P,e.lanes=f,e;case O:return Za(s.children,u,f,n);case z:y=8,u|=24;break;case R:return e=Ut(12,s,n,u|2),e.elementType=R,e.lanes=f,e;case J:return e=Ut(13,s,n,u),e.elementType=J,e.lanes=f,e;case L:return e=Ut(19,s,n,u),e.elementType=L,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:y=10;break e;case U:y=9;break e;case V:y=11;break e;case A:y=14;break e;case X:y=16,l=null;break e}y=29,s=Error(r(130,e===null?"null":typeof e,"")),l=null}return n=Ut(y,s,n,u),n.elementType=e,n.type=l,n.lanes=f,n}function Za(e,n,s,l){return e=Ut(7,e,l,n),e.lanes=s,e}function wu(e,n,s){return e=Ut(6,e,null,n),e.lanes=s,e}function kh(e){var n=Ut(18,null,null,0);return n.stateNode=e,n}function Ou(e,n,s){return n=Ut(4,e.children!==null?e.children:[],e.key,n),n.lanes=s,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Uh=new WeakMap;function Vt(e,n){if(typeof e=="object"&&e!==null){var s=Uh.get(e);return s!==void 0?s:(n={value:e,source:n,stack:kd(n)},Uh.set(e,n),n)}return{value:e,source:n,stack:kd(n)}}var _s=[],ws=0,Fr=null,ji=0,Pt=[],Xt=0,Vn=null,fn=1,dn="";function En(e,n){_s[ws++]=ji,_s[ws++]=Fr,Fr=e,ji=n}function Lh(e,n,s){Pt[Xt++]=fn,Pt[Xt++]=dn,Pt[Xt++]=Vn,Vn=e;var l=fn;e=dn;var u=32-Dt(l)-1;l&=~(1<<u),s+=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|s<<u|l,dn=f+e}else fn=1<<f|s<<u|l,dn=e}function Eu(e){e.return!==null&&(En(e,1),Lh(e,1,0))}function ju(e){for(;e===Fr;)Fr=_s[--ws],_s[ws]=null,ji=_s[--ws],_s[ws]=null;for(;e===Vn;)Vn=Pt[--Xt],Pt[Xt]=null,dn=Pt[--Xt],Pt[Xt]=null,fn=Pt[--Xt],Pt[Xt]=null}function Zh(e,n){Pt[Xt++]=fn,Pt[Xt++]=dn,Pt[Xt++]=Vn,fn=n.id,dn=n.overflow,Vn=e}var ft=null,Be=null,Ee=!1,Pn=null,Jt=!1,zu=Error(r(519));function Xn(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zi(Vt(n,e)),zu}function qh(e){var n=e.stateNode,s=e.type,l=e.memoizedProps;switch(n[ct]=e,n[wt]=l,s){case"dialog":_e("cancel",n),_e("close",n);break;case"iframe":case"object":case"embed":_e("load",n);break;case"video":case"audio":for(s=0;s<Pi.length;s++)_e(Pi[s],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),Id(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),eh(n,l.value,l.defaultValue,l.children)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||n.textContent===""+s||l.suppressHydrationWarning===!0||ng(n.textContent,s)?(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=_n),n=!0):n=!1,n||Xn(e,!0)}function Bh(e){for(ft=e.return;ft;)switch(ft.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:ft=ft.return}}function Os(e){if(e!==ft)return!1;if(!Ee)return Bh(e),Ee=!0,!1;var n=e.tag,s;if((s=n!==3&&n!==27)&&((s=n===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||Gc(e.type,e.memoizedProps)),s=!s),s&&Be&&Xn(e),Bh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Be=fg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Be=fg(e)}else n===27?(n=Be,ca(e.type)?(e=Xc,Xc=null,Be=e):Be=n):Be=ft?Wt(e.stateNode.nextSibling):null;return!0}function qa(){Be=ft=null,Ee=!1}function Nu(){var e=Pn;return e!==null&&(Nt===null?Nt=e:Nt.push.apply(Nt,e),Pn=null),e}function zi(e){Pn===null?Pn=[e]:Pn.push(e)}var Tu=j(null),Ba=null,jn=null;function Jn(e,n,s){ee(Tu,n._currentValue),n._currentValue=s}function zn(e){e._currentValue=Tu.current,q(Tu)}function Ru(e,n,s){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===s)break;e=e.return}}function Au(e,n,s,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 E=0;E<n.length;E++)if(_.context===n[E]){f.lanes|=s,_=f.alternate,_!==null&&(_.lanes|=s),Ru(f.return,s,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|=s,f=y.alternate,f!==null&&(f.lanes|=s),Ru(y,s,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 Es(e,n,s,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===je.current){if(y=u.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(er):e=[er])}u=u.return}e!==null&&Au(n,e,s,l),n.flags|=262144}function Vr(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $a(e){Ba=e,jn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function dt(e){return $h(Ba,e)}function Pr(e,n){return Ba===null&&$a(e),$h(e,n)}function $h(e,n){var s=n._currentValue;if(n={context:n,memoizedValue:s,next:null},jn===null){if(e===null)throw Error(r(308));jn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else jn=jn.next=n;return s}var qx=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(s,l){e.push(l)}};this.abort=function(){n.aborted=!0,e.forEach(function(s){return s()})}},Bx=t.unstable_scheduleCallback,$x=t.unstable_NormalPriority,We={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cu(){return{controller:new qx,data:new Map,refCount:0}}function Ni(e){e.refCount--,e.refCount===0&&Bx($x,function(){e.controller.abort()})}var Ti=null,Mu=0,js=0,zs=null;function Hx(e,n){if(Ti===null){var s=Ti=[];Mu=0,js=Uc(),zs={status:"pending",value:void 0,then:function(l){s.push(l)}}}return Mu++,n.then(Hh,Hh),n}function Hh(){if(--Mu===0&&Ti!==null){zs!==null&&(zs.status="fulfilled");var e=Ti;Ti=null,js=0,zs=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Qx(e,n){var s=[],l={status:"pending",value:null,reason:null,then:function(u){s.push(u)}};return e.then(function(){l.status="fulfilled",l.value=n;for(var u=0;u<s.length;u++)(0,s[u])(n)},function(u){for(l.status="rejected",l.reason=u,u=0;u<s.length;u++)(0,s[u])(void 0)}),l}var Qh=M.S;M.S=function(e,n){jp=Ct(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Hx(e,n),Qh!==null&&Qh(e,n)};var Ha=j(null);function Du(){var e=Ha.current;return e!==null?e:Le.pooledCache}function Xr(e,n){n===null?ee(Ha,Ha.current):ee(Ha,n.pool)}function Kh(){var e=Du();return e===null?null:{parent:We._currentValue,pool:e}}var Ns=Error(r(460)),ku=Error(r(474)),Jr=Error(r(542)),Ir={then:function(){}};function Gh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yh(e,n,s){switch(s=e[s],s===void 0?e.push(n):s!==n&&(n.then(_n,_n),n=s),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Vh(e),e;default:if(typeof n.status=="string")n.then(_n,_n);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,Vh(e),e}throw Ka=n,Ns}}function Qa(e){try{var n=e._init;return n(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ka=s,Ns):s}}var Ka=null;function Fh(){if(Ka===null)throw Error(r(459));var e=Ka;return Ka=null,e}function Vh(e){if(e===Ns||e===Jr)throw Error(r(483))}var Ts=null,Ri=0;function Wr(e){var n=Ri;return Ri+=1,Ts===null&&(Ts=[]),Yh(Ts,e,n)}function Ai(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function el(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 Ph(e){function n(T,N){if(e){var C=T.deletions;C===null?(T.deletions=[N],T.flags|=16):C.push(N)}}function s(T,N){if(!e)return null;for(;N!==null;)n(T,N),N=N.sibling;return null}function l(T){for(var N=new Map;T!==null;)T.key!==null?N.set(T.key,T):N.set(T.index,T),T=T.sibling;return N}function u(T,N){return T=On(T,N),T.index=0,T.sibling=null,T}function f(T,N,C){return T.index=C,e?(C=T.alternate,C!==null?(C=C.index,C<N?(T.flags|=67108866,N):C):(T.flags|=67108866,N)):(T.flags|=1048576,N)}function y(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function _(T,N,C,K){return N===null||N.tag!==6?(N=wu(C,T.mode,K),N.return=T,N):(N=u(N,C),N.return=T,N)}function E(T,N,C,K){var ce=C.type;return ce===O?$(T,N,C.props.children,K,C.key):N!==null&&(N.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===X&&Qa(ce)===N.type)?(N=u(N,C.props),Ai(N,C),N.return=T,N):(N=Yr(C.type,C.key,C.props,null,T.mode,K),Ai(N,C),N.return=T,N)}function D(T,N,C,K){return N===null||N.tag!==4||N.stateNode.containerInfo!==C.containerInfo||N.stateNode.implementation!==C.implementation?(N=Ou(C,T.mode,K),N.return=T,N):(N=u(N,C.children||[]),N.return=T,N)}function $(T,N,C,K,ce){return N===null||N.tag!==7?(N=Za(C,T.mode,K,ce),N.return=T,N):(N=u(N,C),N.return=T,N)}function Y(T,N,C){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=wu(""+N,T.mode,C),N.return=T,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case S:return C=Yr(N.type,N.key,N.props,null,T.mode,C),Ai(C,N),C.return=T,C;case w:return N=Ou(N,T.mode,C),N.return=T,N;case X:return N=Qa(N),Y(T,N,C)}if(F(N)||re(N))return N=Za(N,T.mode,C,null),N.return=T,N;if(typeof N.then=="function")return Y(T,Wr(N),C);if(N.$$typeof===Q)return Y(T,Pr(T,N),C);el(T,N)}return null}function k(T,N,C,K){var ce=N!==null?N.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return ce!==null?null:_(T,N,""+C,K);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case S:return C.key===ce?E(T,N,C,K):null;case w:return C.key===ce?D(T,N,C,K):null;case X:return C=Qa(C),k(T,N,C,K)}if(F(C)||re(C))return ce!==null?null:$(T,N,C,K,null);if(typeof C.then=="function")return k(T,N,Wr(C),K);if(C.$$typeof===Q)return k(T,N,Pr(T,C),K);el(T,C)}return null}function Z(T,N,C,K,ce){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return T=T.get(C)||null,_(N,T,""+K,ce);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case S:return T=T.get(K.key===null?C:K.key)||null,E(N,T,K,ce);case w:return T=T.get(K.key===null?C:K.key)||null,D(N,T,K,ce);case X:return K=Qa(K),Z(T,N,C,K,ce)}if(F(K)||re(K))return T=T.get(C)||null,$(N,T,K,ce,null);if(typeof K.then=="function")return Z(T,N,C,Wr(K),ce);if(K.$$typeof===Q)return Z(T,N,C,Pr(N,K),ce);el(N,K)}return null}function ie(T,N,C,K){for(var ce=null,ze=null,oe=N,be=N=0,Oe=null;oe!==null&&be<C.length;be++){oe.index>be?(Oe=oe,oe=null):Oe=oe.sibling;var Ne=k(T,oe,C[be],K);if(Ne===null){oe===null&&(oe=Oe);break}e&&oe&&Ne.alternate===null&&n(T,oe),N=f(Ne,N,be),ze===null?ce=Ne:ze.sibling=Ne,ze=Ne,oe=Oe}if(be===C.length)return s(T,oe),Ee&&En(T,be),ce;if(oe===null){for(;be<C.length;be++)oe=Y(T,C[be],K),oe!==null&&(N=f(oe,N,be),ze===null?ce=oe:ze.sibling=oe,ze=oe);return Ee&&En(T,be),ce}for(oe=l(oe);be<C.length;be++)Oe=Z(oe,T,be,C[be],K),Oe!==null&&(e&&Oe.alternate!==null&&oe.delete(Oe.key===null?be:Oe.key),N=f(Oe,N,be),ze===null?ce=Oe:ze.sibling=Oe,ze=Oe);return e&&oe.forEach(function(pa){return n(T,pa)}),Ee&&En(T,be),ce}function de(T,N,C,K){if(C==null)throw Error(r(151));for(var ce=null,ze=null,oe=N,be=N=0,Oe=null,Ne=C.next();oe!==null&&!Ne.done;be++,Ne=C.next()){oe.index>be?(Oe=oe,oe=null):Oe=oe.sibling;var pa=k(T,oe,Ne.value,K);if(pa===null){oe===null&&(oe=Oe);break}e&&oe&&pa.alternate===null&&n(T,oe),N=f(pa,N,be),ze===null?ce=pa:ze.sibling=pa,ze=pa,oe=Oe}if(Ne.done)return s(T,oe),Ee&&En(T,be),ce;if(oe===null){for(;!Ne.done;be++,Ne=C.next())Ne=Y(T,Ne.value,K),Ne!==null&&(N=f(Ne,N,be),ze===null?ce=Ne:ze.sibling=Ne,ze=Ne);return Ee&&En(T,be),ce}for(oe=l(oe);!Ne.done;be++,Ne=C.next())Ne=Z(oe,T,be,Ne.value,K),Ne!==null&&(e&&Ne.alternate!==null&&oe.delete(Ne.key===null?be:Ne.key),N=f(Ne,N,be),ze===null?ce=Ne:ze.sibling=Ne,ze=Ne);return e&&oe.forEach(function(e_){return n(T,e_)}),Ee&&En(T,be),ce}function Ue(T,N,C,K){if(typeof C=="object"&&C!==null&&C.type===O&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case S:e:{for(var ce=C.key;N!==null;){if(N.key===ce){if(ce=C.type,ce===O){if(N.tag===7){s(T,N.sibling),K=u(N,C.props.children),K.return=T,T=K;break e}}else if(N.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===X&&Qa(ce)===N.type){s(T,N.sibling),K=u(N,C.props),Ai(K,C),K.return=T,T=K;break e}s(T,N);break}else n(T,N);N=N.sibling}C.type===O?(K=Za(C.props.children,T.mode,K,C.key),K.return=T,T=K):(K=Yr(C.type,C.key,C.props,null,T.mode,K),Ai(K,C),K.return=T,T=K)}return y(T);case w:e:{for(ce=C.key;N!==null;){if(N.key===ce)if(N.tag===4&&N.stateNode.containerInfo===C.containerInfo&&N.stateNode.implementation===C.implementation){s(T,N.sibling),K=u(N,C.children||[]),K.return=T,T=K;break e}else{s(T,N);break}else n(T,N);N=N.sibling}K=Ou(C,T.mode,K),K.return=T,T=K}return y(T);case X:return C=Qa(C),Ue(T,N,C,K)}if(F(C))return ie(T,N,C,K);if(re(C)){if(ce=re(C),typeof ce!="function")throw Error(r(150));return C=ce.call(C),de(T,N,C,K)}if(typeof C.then=="function")return Ue(T,N,Wr(C),K);if(C.$$typeof===Q)return Ue(T,N,Pr(T,C),K);el(T,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,N!==null&&N.tag===6?(s(T,N.sibling),K=u(N,C),K.return=T,T=K):(s(T,N),K=wu(C,T.mode,K),K.return=T,T=K),y(T)):s(T,N)}return function(T,N,C,K){try{Ri=0;var ce=Ue(T,N,C,K);return Ts=null,ce}catch(oe){if(oe===Ns||oe===Jr)throw oe;var ze=Ut(29,oe,null,T.mode);return ze.lanes=K,ze.return=T,ze}}}var Ga=Ph(!0),Xh=Ph(!1),In=!1;function Uu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lu(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 Wn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ea(e,n,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Te&2)!==0){var u=l.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),l.pending=n,n=Gr(e),Mh(e,null,s),n}return Kr(e,l,n,s),Gr(e)}function Ci(e,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194048)!==0)){var l=n.lanes;l&=e.pendingLanes,s|=l,n.lanes=s,$d(e,s)}}function Zu(e,n){var s=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var u=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?u=f=y:f=f.next=y,s=s.next}while(s!==null);f===null?u=f=n:f=f.next=n}else u=f=n;s={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=n:e.next=n,s.lastBaseUpdate=n}var qu=!1;function Mi(){if(qu){var e=zs;if(e!==null)throw e}}function Di(e,n,s,l){qu=!1;var u=e.updateQueue;In=!1;var f=u.firstBaseUpdate,y=u.lastBaseUpdate,_=u.shared.pending;if(_!==null){u.shared.pending=null;var E=_,D=E.next;E.next=null,y===null?f=D:y.next=D,y=E;var $=e.alternate;$!==null&&($=$.updateQueue,_=$.lastBaseUpdate,_!==y&&(_===null?$.firstBaseUpdate=D:_.next=D,$.lastBaseUpdate=E))}if(f!==null){var Y=u.baseState;y=0,$=D=E=null,_=f;do{var k=_.lane&-536870913,Z=k!==_.lane;if(Z?(we&k)===k:(l&k)===k){k!==0&&k===js&&(qu=!0),$!==null&&($=$.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var ie=e,de=_;k=n;var Ue=s;switch(de.tag){case 1:if(ie=de.payload,typeof ie=="function"){Y=ie.call(Ue,Y,k);break e}Y=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=de.payload,k=typeof ie=="function"?ie.call(Ue,Y,k):ie,k==null)break e;Y=v({},Y,k);break e;case 2:In=!0}}k=_.callback,k!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=u.callbacks,Z===null?u.callbacks=[k]:Z.push(k))}else Z={lane:k,tag:_.tag,payload:_.payload,callback:_.callback,next:null},$===null?(D=$=Z,E=Y):$=$.next=Z,y|=k;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;Z=_,_=Z.next,Z.next=null,u.lastBaseUpdate=Z,u.shared.pending=null}}while(!0);$===null&&(E=Y),u.baseState=E,u.firstBaseUpdate=D,u.lastBaseUpdate=$,f===null&&(u.shared.lanes=0),ia|=y,e.lanes=y,e.memoizedState=Y}}function Jh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Ih(e,n){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Jh(s[e],n)}var Rs=j(null),tl=j(0);function Wh(e,n){e=Un,ee(tl,e),ee(Rs,n),Un=e|n.baseLanes}function Bu(){ee(tl,Un),ee(Rs,Rs.current)}function $u(){Un=tl.current,q(Rs),q(tl)}var Lt=j(null),It=null;function ta(e){var n=e.alternate;ee(Xe,Xe.current&1),ee(Lt,e),It===null&&(n===null||Rs.current!==null||n.memoizedState!==null)&&(It=e)}function Hu(e){ee(Xe,Xe.current),ee(Lt,e),It===null&&(It=e)}function em(e){e.tag===22?(ee(Xe,Xe.current),ee(Lt,e),It===null&&(It=e)):na()}function na(){ee(Xe,Xe.current),ee(Lt,Lt.current)}function Zt(e){q(Lt),It===e&&(It=null),q(Xe)}var Xe=j(0);function nl(e){for(var n=e;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Vc(s)||Pc(s)))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 Nn=0,ve=null,De=null,et=null,al=!1,As=!1,Ya=!1,sl=0,ki=0,Cs=null,Kx=0;function Ve(){throw Error(r(321))}function Qu(e,n){if(n===null)return!1;for(var s=0;s<n.length&&s<e.length;s++)if(!kt(e[s],n[s]))return!1;return!0}function Ku(e,n,s,l,u,f){return Nn=f,ve=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,M.H=e===null||e.memoizedState===null?Lm:ic,Ya=!1,f=s(l,u),Ya=!1,As&&(f=nm(n,s,l,u)),tm(e),f}function tm(e){M.H=Zi;var n=De!==null&&De.next!==null;if(Nn=0,et=De=ve=null,al=!1,ki=0,Cs=null,n)throw Error(r(300));e===null||tt||(e=e.dependencies,e!==null&&Vr(e)&&(tt=!0))}function nm(e,n,s,l){ve=e;var u=0;do{if(As&&(Cs=null),ki=0,As=!1,25<=u)throw Error(r(301));if(u+=1,et=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)}M.H=Zm,f=n(s,l)}while(As);return f}function Gx(){var e=M.H,n=e.useState()[0];return n=typeof n.then=="function"?Ui(n):n,e=e.useState()[0],(De!==null?De.memoizedState:null)!==e&&(ve.flags|=1024),n}function Gu(){var e=sl!==0;return sl=0,e}function Yu(e,n,s){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~s}function Fu(e){if(al){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}al=!1}Nn=0,et=De=ve=null,As=!1,ki=sl=0,Cs=null}function bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return et===null?ve.memoizedState=et=e:et=et.next=e,et}function Je(){if(De===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var n=et===null?ve.memoizedState:et.next;if(n!==null)et=n,De=e;else{if(e===null)throw ve.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},et===null?ve.memoizedState=et=e:et=et.next=e}return et}function il(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ui(e){var n=ki;return ki+=1,Cs===null&&(Cs=[]),e=Yh(Cs,e,n),n=ve,(et===null?n.memoizedState:et.next)===null&&(n=n.alternate,M.H=n===null||n.memoizedState===null?Lm:ic),e}function rl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ui(e);if(e.$$typeof===Q)return dt(e)}throw Error(r(438,String(e)))}function Vu(e){var n=null,s=ve.updateQueue;if(s!==null&&(n=s.memoCache),n==null){var l=ve.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}),s===null&&(s=il(),ve.updateQueue=s),s.memoCache=n,s=n.data[n.index],s===void 0)for(s=n.data[n.index]=Array(e),l=0;l<e;l++)s[l]=te;return n.index++,s}function Tn(e,n){return typeof n=="function"?n(e):n}function ll(e){var n=Je();return Pu(n,De,e)}function Pu(e,n,s){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=s;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,E=null,D=n,$=!1;do{var Y=D.lane&-536870913;if(Y!==D.lane?(we&Y)===Y:(Nn&Y)===Y){var k=D.revertLane;if(k===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),Y===js&&($=!0);else if((Nn&k)===k){D=D.next,k===js&&($=!0);continue}else Y={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},E===null?(_=E=Y,y=f):E=E.next=Y,ve.lanes|=k,ia|=k;Y=D.action,Ya&&s(f,Y),f=D.hasEagerState?D.eagerState:s(f,Y)}else k={lane:Y,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},E===null?(_=E=k,y=f):E=E.next=k,ve.lanes|=Y,ia|=Y;D=D.next}while(D!==null&&D!==n);if(E===null?y=f:E.next=_,!kt(f,e.memoizedState)&&(tt=!0,$&&(s=zs,s!==null)))throw s;e.memoizedState=f,e.baseState=y,e.baseQueue=E,l.lastRenderedState=f}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Xu(e){var n=Je(),s=n.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=e;var l=s.dispatch,u=s.pending,f=n.memoizedState;if(u!==null){s.pending=null;var y=u=u.next;do f=e(f,y.action),y=y.next;while(y!==u);kt(f,n.memoizedState)||(tt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),s.lastRenderedState=f}return[f,l]}function am(e,n,s){var l=ve,u=Je(),f=Ee;if(f){if(s===void 0)throw Error(r(407));s=s()}else s=n();var y=!kt((De||u).memoizedState,s);if(y&&(u.memoizedState=s,tt=!0),u=u.queue,Wu(rm.bind(null,l,u,e),[e]),u.getSnapshot!==n||y||et!==null&&et.memoizedState.tag&1){if(l.flags|=2048,Ms(9,{destroy:void 0},im.bind(null,l,u,s,n),null),Le===null)throw Error(r(349));f||(Nn&127)!==0||sm(l,n,s)}return s}function sm(e,n,s){e.flags|=16384,e={getSnapshot:n,value:s},n=ve.updateQueue,n===null?(n=il(),ve.updateQueue=n,n.stores=[e]):(s=n.stores,s===null?n.stores=[e]:s.push(e))}function im(e,n,s,l){n.value=s,n.getSnapshot=l,lm(n)&&om(e)}function rm(e,n,s){return s(function(){lm(n)&&om(e)})}function lm(e){var n=e.getSnapshot;e=e.value;try{var s=n();return!kt(e,s)}catch{return!0}}function om(e){var n=La(e,2);n!==null&&Tt(n,e,2)}function Ju(e){var n=bt();if(typeof e=="function"){var s=e;if(e=s(),Ya){Gn(!0);try{s()}finally{Gn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:e},n}function um(e,n,s,l){return e.baseState=s,Pu(e,De,typeof l=="function"?l:Tn)}function Yx(e,n,s,l,u){if(cl(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)}};M.T!==null?s(!0):f.isTransition=!1,l(f),s=n.pending,s===null?(f.next=n.pending=f,cm(n,f)):(f.next=s.next,n.pending=s.next=f)}}function cm(e,n){var s=n.action,l=n.payload,u=e.state;if(n.isTransition){var f=M.T,y={};M.T=y;try{var _=s(u,l),E=M.S;E!==null&&E(y,_),fm(e,n,_)}catch(D){Iu(e,n,D)}finally{f!==null&&y.types!==null&&(f.types=y.types),M.T=f}}else try{f=s(u,l),fm(e,n,f)}catch(D){Iu(e,n,D)}}function fm(e,n,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){dm(e,n,l)},function(l){return Iu(e,n,l)}):dm(e,n,s)}function dm(e,n,s){n.status="fulfilled",n.value=s,hm(n),e.state=s,n=e.pending,n!==null&&(s=n.next,s===n?e.pending=null:(s=s.next,n.next=s,cm(e,s)))}function Iu(e,n,s){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=s,hm(n),n=n.next;while(n!==l)}e.action=null}function hm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function mm(e,n){return n}function pm(e,n){if(Ee){var s=Le.formState;if(s!==null){e:{var l=ve;if(Ee){if(Be){t:{for(var u=Be,f=Jt;u.nodeType!==8;){if(!f){u=null;break t}if(u=Wt(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){Be=Wt(u.nextSibling),l=u.data==="F!";break e}}Xn(l)}l=!1}l&&(n=s[0])}}return s=bt(),s.memoizedState=s.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mm,lastRenderedState:n},s.queue=l,s=Dm.bind(null,ve,l),l.dispatch=s,l=Ju(!1),f=sc.bind(null,ve,!1,l.queue),l=bt(),u={state:n,dispatch:null,action:e,pending:null},l.queue=u,s=Yx.bind(null,ve,u,f,s),u.dispatch=s,l.memoizedState=e,[n,s,!1]}function gm(e){var n=Je();return ym(n,De,e)}function ym(e,n,s){if(n=Pu(e,n,mm)[0],e=ll(Tn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=Ui(n)}catch(y){throw y===Ns?Jr:y}else l=n;n=Je();var u=n.queue,f=u.dispatch;return s!==n.memoizedState&&(ve.flags|=2048,Ms(9,{destroy:void 0},Fx.bind(null,u,s),null)),[l,f,e]}function Fx(e,n){e.action=n}function vm(e){var n=Je(),s=De;if(s!==null)return ym(n,s,e);Je(),n=n.memoizedState,s=Je();var l=s.queue.dispatch;return s.memoizedState=e,[n,l,!1]}function Ms(e,n,s,l){return e={tag:e,create:s,deps:l,inst:n,next:null},n=ve.updateQueue,n===null&&(n=il(),ve.updateQueue=n),s=n.lastEffect,s===null?n.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,n.lastEffect=e),e}function bm(){return Je().memoizedState}function ol(e,n,s,l){var u=bt();ve.flags|=e,u.memoizedState=Ms(1|n,{destroy:void 0},s,l===void 0?null:l)}function ul(e,n,s,l){var u=Je();l=l===void 0?null:l;var f=u.memoizedState.inst;De!==null&&l!==null&&Qu(l,De.memoizedState.deps)?u.memoizedState=Ms(n,f,s,l):(ve.flags|=e,u.memoizedState=Ms(1|n,f,s,l))}function xm(e,n){ol(8390656,8,e,n)}function Wu(e,n){ul(2048,8,e,n)}function Vx(e){ve.flags|=4;var n=ve.updateQueue;if(n===null)n=il(),ve.updateQueue=n,n.events=[e];else{var s=n.events;s===null?n.events=[e]:s.push(e)}}function Sm(e){var n=Je().memoizedState;return Vx({ref:n,nextImpl:e}),function(){if((Te&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function _m(e,n){return ul(4,2,e,n)}function wm(e,n){return ul(4,4,e,n)}function Om(e,n){if(typeof n=="function"){e=e();var s=n(e);return function(){typeof s=="function"?s():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Em(e,n,s){s=s!=null?s.concat([e]):null,ul(4,4,Om.bind(null,n,e),s)}function ec(){}function jm(e,n){var s=Je();n=n===void 0?null:n;var l=s.memoizedState;return n!==null&&Qu(n,l[1])?l[0]:(s.memoizedState=[e,n],e)}function zm(e,n){var s=Je();n=n===void 0?null:n;var l=s.memoizedState;if(n!==null&&Qu(n,l[1]))return l[0];if(l=e(),Ya){Gn(!0);try{e()}finally{Gn(!1)}}return s.memoizedState=[l,n],l}function tc(e,n,s){return s===void 0||(Nn&1073741824)!==0&&(we&261930)===0?e.memoizedState=n:(e.memoizedState=s,e=Np(),ve.lanes|=e,ia|=e,s)}function Nm(e,n,s,l){return kt(s,n)?s:Rs.current!==null?(e=tc(e,s,l),kt(e,n)||(tt=!0),e):(Nn&42)===0||(Nn&1073741824)!==0&&(we&261930)===0?(tt=!0,e.memoizedState=s):(e=Np(),ve.lanes|=e,ia|=e,n)}function Tm(e,n,s,l,u){var f=I.p;I.p=f!==0&&8>f?f:8;var y=M.T,_={};M.T=_,sc(e,!1,n,s);try{var E=u(),D=M.S;if(D!==null&&D(_,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var $=Qx(E,l);Li(e,n,$,$t(e))}else Li(e,n,l,$t(e))}catch(Y){Li(e,n,{then:function(){},status:"rejected",reason:Y},$t())}finally{I.p=f,y!==null&&_.types!==null&&(y.types=_.types),M.T=y}}function Px(){}function nc(e,n,s,l){if(e.tag!==5)throw Error(r(476));var u=Rm(e).queue;Tm(e,u,n,B,s===null?Px:function(){return Am(e),s(l)})}function Rm(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:Tn,lastRenderedState:B},next:null};var s={};return n.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:s},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Am(e){var n=Rm(e);n.next===null&&(n=e.alternate.memoizedState),Li(e,n.next.queue,{},$t())}function ac(){return dt(er)}function Cm(){return Je().memoizedState}function Mm(){return Je().memoizedState}function Xx(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var s=$t();e=Wn(s);var l=ea(n,e,s);l!==null&&(Tt(l,n,s),Ci(l,n,s)),n={cache:Cu()},e.payload=n;return}n=n.return}}function Jx(e,n,s){var l=$t();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},cl(e)?km(n,s):(s=Su(e,n,s,l),s!==null&&(Tt(s,e,l),Um(s,n,l)))}function Dm(e,n,s){var l=$t();Li(e,n,s,l)}function Li(e,n,s,l){var u={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(cl(e))km(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,s);if(u.hasEagerState=!0,u.eagerState=_,kt(_,y))return Kr(e,n,u,0),Le===null&&Qr(),!1}catch{}if(s=Su(e,n,u,l),s!==null)return Tt(s,e,l),Um(s,n,l),!0}return!1}function sc(e,n,s,l){if(l={lane:2,revertLane:Uc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},cl(e)){if(n)throw Error(r(479))}else n=Su(e,s,l,2),n!==null&&Tt(n,e,2)}function cl(e){var n=e.alternate;return e===ve||n!==null&&n===ve}function km(e,n){As=al=!0;var s=e.pending;s===null?n.next=n:(n.next=s.next,s.next=n),e.pending=n}function Um(e,n,s){if((s&4194048)!==0){var l=n.lanes;l&=e.pendingLanes,s|=l,n.lanes=s,$d(e,s)}}var Zi={readContext:dt,use:rl,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve};Zi.useEffectEvent=Ve;var Lm={readContext:dt,use:rl,useCallback:function(e,n){return bt().memoizedState=[e,n===void 0?null:n],e},useContext:dt,useEffect:xm,useImperativeHandle:function(e,n,s){s=s!=null?s.concat([e]):null,ol(4194308,4,Om.bind(null,n,e),s)},useLayoutEffect:function(e,n){return ol(4194308,4,e,n)},useInsertionEffect:function(e,n){ol(4,2,e,n)},useMemo:function(e,n){var s=bt();n=n===void 0?null:n;var l=e();if(Ya){Gn(!0);try{e()}finally{Gn(!1)}}return s.memoizedState=[l,n],l},useReducer:function(e,n,s){var l=bt();if(s!==void 0){var u=s(n);if(Ya){Gn(!0);try{s(n)}finally{Gn(!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=Jx.bind(null,ve,e),[l.memoizedState,e]},useRef:function(e){var n=bt();return e={current:e},n.memoizedState=e},useState:function(e){e=Ju(e);var n=e.queue,s=Dm.bind(null,ve,n);return n.dispatch=s,[e.memoizedState,s]},useDebugValue:ec,useDeferredValue:function(e,n){var s=bt();return tc(s,e,n)},useTransition:function(){var e=Ju(!1);return e=Tm.bind(null,ve,e.queue,!0,!1),bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,s){var l=ve,u=bt();if(Ee){if(s===void 0)throw Error(r(407));s=s()}else{if(s=n(),Le===null)throw Error(r(349));(we&127)!==0||sm(l,n,s)}u.memoizedState=s;var f={value:s,getSnapshot:n};return u.queue=f,xm(rm.bind(null,l,f,e),[e]),l.flags|=2048,Ms(9,{destroy:void 0},im.bind(null,l,f,s,n),null),s},useId:function(){var e=bt(),n=Le.identifierPrefix;if(Ee){var s=dn,l=fn;s=(l&~(1<<32-Dt(l)-1)).toString(32)+s,n="_"+n+"R_"+s,s=sl++,0<s&&(n+="H"+s.toString(32)),n+="_"}else s=Kx++,n="_"+n+"r_"+s.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:ac,useFormState:pm,useActionState:pm,useOptimistic:function(e){var n=bt();n.memoizedState=n.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=s,n=sc.bind(null,ve,!0,s),s.dispatch=n,[e,n]},useMemoCache:Vu,useCacheRefresh:function(){return bt().memoizedState=Xx.bind(null,ve)},useEffectEvent:function(e){var n=bt(),s={impl:e};return n.memoizedState=s,function(){if((Te&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},ic={readContext:dt,use:rl,useCallback:jm,useContext:dt,useEffect:Wu,useImperativeHandle:Em,useInsertionEffect:_m,useLayoutEffect:wm,useMemo:zm,useReducer:ll,useRef:bm,useState:function(){return ll(Tn)},useDebugValue:ec,useDeferredValue:function(e,n){var s=Je();return Nm(s,De.memoizedState,e,n)},useTransition:function(){var e=ll(Tn)[0],n=Je().memoizedState;return[typeof e=="boolean"?e:Ui(e),n]},useSyncExternalStore:am,useId:Cm,useHostTransitionStatus:ac,useFormState:gm,useActionState:gm,useOptimistic:function(e,n){var s=Je();return um(s,De,e,n)},useMemoCache:Vu,useCacheRefresh:Mm};ic.useEffectEvent=Sm;var Zm={readContext:dt,use:rl,useCallback:jm,useContext:dt,useEffect:Wu,useImperativeHandle:Em,useInsertionEffect:_m,useLayoutEffect:wm,useMemo:zm,useReducer:Xu,useRef:bm,useState:function(){return Xu(Tn)},useDebugValue:ec,useDeferredValue:function(e,n){var s=Je();return De===null?tc(s,e,n):Nm(s,De.memoizedState,e,n)},useTransition:function(){var e=Xu(Tn)[0],n=Je().memoizedState;return[typeof e=="boolean"?e:Ui(e),n]},useSyncExternalStore:am,useId:Cm,useHostTransitionStatus:ac,useFormState:vm,useActionState:vm,useOptimistic:function(e,n){var s=Je();return De!==null?um(s,De,e,n):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:Vu,useCacheRefresh:Mm};Zm.useEffectEvent=Sm;function rc(e,n,s,l){n=e.memoizedState,s=s(l,n),s=s==null?n:v({},n,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var lc={enqueueSetState:function(e,n,s){e=e._reactInternals;var l=$t(),u=Wn(l);u.payload=n,s!=null&&(u.callback=s),n=ea(e,u,l),n!==null&&(Tt(n,e,l),Ci(n,e,l))},enqueueReplaceState:function(e,n,s){e=e._reactInternals;var l=$t(),u=Wn(l);u.tag=1,u.payload=n,s!=null&&(u.callback=s),n=ea(e,u,l),n!==null&&(Tt(n,e,l),Ci(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var s=$t(),l=Wn(s);l.tag=2,n!=null&&(l.callback=n),n=ea(e,l,s),n!==null&&(Tt(n,e,s),Ci(n,e,s))}};function qm(e,n,s,l,u,f,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,y):n.prototype&&n.prototype.isPureReactComponent?!Oi(s,l)||!Oi(u,f):!0}function Bm(e,n,s,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,l),n.state!==e&&lc.enqueueReplaceState(n,n.state,null)}function Fa(e,n){var s=n;if("ref"in n){s={};for(var l in n)l!=="ref"&&(s[l]=n[l])}if(e=e.defaultProps){s===n&&(s=v({},s));for(var u in e)s[u]===void 0&&(s[u]=e[u])}return s}function $m(e){Hr(e)}function Hm(e){console.error(e)}function Qm(e){Hr(e)}function fl(e,n){try{var s=e.onUncaughtError;s(n.value,{componentStack:n.stack})}catch(l){setTimeout(function(){throw l})}}function Km(e,n,s){try{var l=e.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function oc(e,n,s){return s=Wn(s),s.tag=3,s.payload={element:null},s.callback=function(){fl(e,n)},s}function Gm(e){return e=Wn(e),e.tag=3,e}function Ym(e,n,s,l){var u=s.type.getDerivedStateFromError;if(typeof u=="function"){var f=l.value;e.payload=function(){return u(f)},e.callback=function(){Km(n,s,l)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Km(n,s,l),typeof u!="function"&&(ra===null?ra=new Set([this]):ra.add(this));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})})}function Ix(e,n,s,l,u){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=s.alternate,n!==null&&Es(n,s,u,!0),s=Lt.current,s!==null){switch(s.tag){case 31:case 13:return It===null?wl():s.alternate===null&&Pe===0&&(Pe=3),s.flags&=-257,s.flags|=65536,s.lanes=u,l===Ir?s.flags|=16384:(n=s.updateQueue,n===null?s.updateQueue=new Set([l]):n.add(l),Mc(e,l,u)),!1;case 22:return s.flags|=65536,l===Ir?s.flags|=16384:(n=s.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=n):(s=n.retryQueue,s===null?n.retryQueue=new Set([l]):s.add(l)),Mc(e,l,u)),!1}throw Error(r(435,s.tag))}return Mc(e,l,u),wl(),!1}if(Ee)return n=Lt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,l!==zu&&(e=Error(r(422),{cause:l}),zi(Vt(e,s)))):(l!==zu&&(n=Error(r(423),{cause:l}),zi(Vt(n,s))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Vt(l,s),u=oc(e.stateNode,l,u),Zu(e,u),Pe!==4&&(Pe=2)),!1;var f=Error(r(520),{cause:l});if(f=Vt(f,s),Yi===null?Yi=[f]:Yi.push(f),Pe!==4&&(Pe=2),n===null)return!0;l=Vt(l,s),s=n;do{switch(s.tag){case 3:return s.flags|=65536,e=u&-u,s.lanes|=e,e=oc(s.stateNode,l,e),Zu(s,e),!1;case 1:if(n=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(ra===null||!ra.has(f))))return s.flags|=65536,u&=-u,s.lanes|=u,u=Gm(u),Ym(u,e,s,l),Zu(s,u),!1}s=s.return}while(s!==null);return!1}var uc=Error(r(461)),tt=!1;function ht(e,n,s,l){n.child=e===null?Xh(n,null,s,l):Ga(n,e.child,s,l)}function Fm(e,n,s,l,u){s=s.render;var f=n.ref;if("ref"in l){var y={};for(var _ in l)_!=="ref"&&(y[_]=l[_])}else y=l;return $a(n),l=Ku(e,n,s,y,f,u),_=Gu(),e!==null&&!tt?(Yu(e,n,u),Rn(e,n,u)):(Ee&&_&&Eu(n),n.flags|=1,ht(e,n,l,u),n.child)}function Vm(e,n,s,l,u){if(e===null){var f=s.type;return typeof f=="function"&&!_u(f)&&f.defaultProps===void 0&&s.compare===null?(n.tag=15,n.type=f,Pm(e,n,f,l,u)):(e=Yr(s.type,null,l,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,!yc(e,u)){var y=f.memoizedProps;if(s=s.compare,s=s!==null?s:Oi,s(y,l)&&e.ref===n.ref)return Rn(e,n,u)}return n.flags|=1,e=On(f,l),e.ref=n.ref,e.return=n,n.child=e}function Pm(e,n,s,l,u){if(e!==null){var f=e.memoizedProps;if(Oi(f,l)&&e.ref===n.ref)if(tt=!1,n.pendingProps=l=f,yc(e,u))(e.flags&131072)!==0&&(tt=!0);else return n.lanes=e.lanes,Rn(e,n,u)}return cc(e,n,s,l,u)}function Xm(e,n,s,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|s:s,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 Jm(e,n,f,s,l)}if((s&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xr(n,f!==null?f.cachePool:null),f!==null?Wh(n,f):Bu(),em(n);else return l=n.lanes=536870912,Jm(e,n,f!==null?f.baseLanes|s:s,s,l)}else f!==null?(Xr(n,f.cachePool),Wh(n,f),na(),n.memoizedState=null):(e!==null&&Xr(n,null),Bu(),na());return ht(e,n,u,s),n.child}function qi(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Jm(e,n,s,l,u){var f=Du();return f=f===null?null:{parent:We._currentValue,pool:f},n.memoizedState={baseLanes:s,cachePool:f},e!==null&&Xr(n,null),Bu(),em(n),e!==null&&Es(e,n,l,!0),n.childLanes=u,null}function dl(e,n){return n=ml({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Im(e,n,s){return Ga(n,e.child,null,s),e=dl(n,n.pendingProps),e.flags|=2,Zt(n),n.memoizedState=null,e}function Wx(e,n,s){var l=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ee){if(l.mode==="hidden")return e=dl(n,l),n.lanes=536870912,qi(null,e);if(Hu(n),(e=Be)?(e=cg(e,Jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Vn!==null?{id:fn,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},s=kh(e),s.return=n,n.child=s,ft=n,Be=null)):e=null,e===null)throw Xn(n);return n.lanes=536870912,null}return dl(n,l)}var f=e.memoizedState;if(f!==null){var y=f.dehydrated;if(Hu(n),u)if(n.flags&256)n.flags&=-257,n=Im(e,n,s);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(tt||Es(e,n,s,!1),u=(s&e.childLanes)!==0,tt||u){if(l=Le,l!==null&&(y=Hd(l,s),y!==0&&y!==f.retryLane))throw f.retryLane=y,La(e,y),Tt(l,e,y),uc;wl(),n=Im(e,n,s)}else e=f.treeContext,Be=Wt(y.nextSibling),ft=n,Ee=!0,Pn=null,Jt=!1,e!==null&&Zh(n,e),n=dl(n,l),n.flags|=4096;return n}return e=On(e.child,{mode:l.mode,children:l.children}),e.ref=n.ref,n.child=e,e.return=n,e}function hl(e,n){var s=n.ref;if(s===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(e===null||e.ref!==s)&&(n.flags|=4194816)}}function cc(e,n,s,l,u){return $a(n),s=Ku(e,n,s,l,void 0,u),l=Gu(),e!==null&&!tt?(Yu(e,n,u),Rn(e,n,u)):(Ee&&l&&Eu(n),n.flags|=1,ht(e,n,s,u),n.child)}function Wm(e,n,s,l,u,f){return $a(n),n.updateQueue=null,s=nm(n,l,s,u),tm(e),l=Gu(),e!==null&&!tt?(Yu(e,n,f),Rn(e,n,f)):(Ee&&l&&Eu(n),n.flags|=1,ht(e,n,s,f),n.child)}function ep(e,n,s,l,u){if($a(n),n.stateNode===null){var f=Ss,y=s.contextType;typeof y=="object"&&y!==null&&(f=dt(y)),f=new s(l,f),n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=lc,n.stateNode=f,f._reactInternals=n,f=n.stateNode,f.props=l,f.state=n.memoizedState,f.refs={},Uu(n),y=s.contextType,f.context=typeof y=="object"&&y!==null?dt(y):Ss,f.state=n.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(rc(n,s,y,l),f.state=n.memoizedState),typeof s.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&&lc.enqueueReplaceState(f,f.state,null),Di(n,l,f,u),Mi(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(e===null){f=n.stateNode;var _=n.memoizedProps,E=Fa(s,_);f.props=E;var D=f.context,$=s.contextType;y=Ss,typeof $=="object"&&$!==null&&(y=dt($));var Y=s.getDerivedStateFromProps;$=typeof Y=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,$||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||D!==y)&&Bm(n,f,l,y),In=!1;var k=n.memoizedState;f.state=k,Di(n,l,f,u),Mi(),D=n.memoizedState,_||k!==D||In?(typeof Y=="function"&&(rc(n,s,Y,l),D=n.memoizedState),(E=In||qm(n,s,E,l,k,D,y))?($||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=D),f.props=l,f.state=D,f.context=y,l=E):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{f=n.stateNode,Lu(e,n),y=n.memoizedProps,$=Fa(s,y),f.props=$,Y=n.pendingProps,k=f.context,D=s.contextType,E=Ss,typeof D=="object"&&D!==null&&(E=dt(D)),_=s.getDerivedStateFromProps,(D=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==Y||k!==E)&&Bm(n,f,l,E),In=!1,k=n.memoizedState,f.state=k,Di(n,l,f,u),Mi();var Z=n.memoizedState;y!==Y||k!==Z||In||e!==null&&e.dependencies!==null&&Vr(e.dependencies)?(typeof _=="function"&&(rc(n,s,_,l),Z=n.memoizedState),($=In||qm(n,s,$,l,k,Z,E)||e!==null&&e.dependencies!==null&&Vr(e.dependencies))?(D||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,Z,E),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,Z,E)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&k===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&k===e.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=Z),f.props=l,f.state=Z,f.context=E,l=$):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&k===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&k===e.memoizedState||(n.flags|=1024),l=!1)}return f=l,hl(e,n),l=(n.flags&128)!==0,f||l?(f=n.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:f.render(),n.flags|=1,e!==null&&l?(n.child=Ga(n,e.child,null,u),n.child=Ga(n,null,s,u)):ht(e,n,s,u),n.memoizedState=f.state,e=n.child):e=Rn(e,n,u),e}function tp(e,n,s,l){return qa(),n.flags|=256,ht(e,n,s,l),n.child}var fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dc(e){return{baseLanes:e,cachePool:Kh()}}function hc(e,n,s){return e=e!==null?e.childLanes&~s:0,n&&(e|=Bt),e}function np(e,n,s){var l=n.pendingProps,u=!1,f=(n.flags&128)!==0,y;if((y=f)||(y=e!==null&&e.memoizedState===null?!1:(Xe.current&2)!==0),y&&(u=!0,n.flags&=-129),y=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ee){if(u?ta(n):na(),(e=Be)?(e=cg(e,Jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Vn!==null?{id:fn,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},s=kh(e),s.return=n,n.child=s,ft=n,Be=null)):e=null,e===null)throw Xn(n);return Pc(e)?n.lanes=32:n.lanes=536870912,null}var _=l.children;return l=l.fallback,u?(na(),u=n.mode,_=ml({mode:"hidden",children:_},u),l=Za(l,u,s,null),_.return=n,l.return=n,_.sibling=l,n.child=_,l=n.child,l.memoizedState=dc(s),l.childLanes=hc(e,y,s),n.memoizedState=fc,qi(null,l)):(ta(n),mc(n,_))}var E=e.memoizedState;if(E!==null&&(_=E.dehydrated,_!==null)){if(f)n.flags&256?(ta(n),n.flags&=-257,n=pc(e,n,s)):n.memoizedState!==null?(na(),n.child=e.child,n.flags|=128,n=null):(na(),_=l.fallback,u=n.mode,l=ml({mode:"visible",children:l.children},u),_=Za(_,u,s,null),_.flags|=2,l.return=n,_.return=n,l.sibling=_,n.child=l,Ga(n,e.child,null,s),l=n.child,l.memoizedState=dc(s),l.childLanes=hc(e,y,s),n.memoizedState=fc,n=qi(null,l));else if(ta(n),Pc(_)){if(y=_.nextSibling&&_.nextSibling.dataset,y)var D=y.dgst;y=D,l=Error(r(419)),l.stack="",l.digest=y,zi({value:l,source:null,stack:null}),n=pc(e,n,s)}else if(tt||Es(e,n,s,!1),y=(s&e.childLanes)!==0,tt||y){if(y=Le,y!==null&&(l=Hd(y,s),l!==0&&l!==E.retryLane))throw E.retryLane=l,La(e,l),Tt(y,e,l),uc;Vc(_)||wl(),n=pc(e,n,s)}else Vc(_)?(n.flags|=192,n.child=e.child,n=null):(e=E.treeContext,Be=Wt(_.nextSibling),ft=n,Ee=!0,Pn=null,Jt=!1,e!==null&&Zh(n,e),n=mc(n,l.children),n.flags|=4096);return n}return u?(na(),_=l.fallback,u=n.mode,E=e.child,D=E.sibling,l=On(E,{mode:"hidden",children:l.children}),l.subtreeFlags=E.subtreeFlags&65011712,D!==null?_=On(D,_):(_=Za(_,u,s,null),_.flags|=2),_.return=n,l.return=n,l.sibling=_,n.child=l,qi(null,l),l=n.child,_=e.child.memoizedState,_===null?_=dc(s):(u=_.cachePool,u!==null?(E=We._currentValue,u=u.parent!==E?{parent:E,pool:E}:u):u=Kh(),_={baseLanes:_.baseLanes|s,cachePool:u}),l.memoizedState=_,l.childLanes=hc(e,y,s),n.memoizedState=fc,qi(e.child,l)):(ta(n),s=e.child,e=s.sibling,s=On(s,{mode:"visible",children:l.children}),s.return=n,s.sibling=null,e!==null&&(y=n.deletions,y===null?(n.deletions=[e],n.flags|=16):y.push(e)),n.child=s,n.memoizedState=null,s)}function mc(e,n){return n=ml({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function ml(e,n){return e=Ut(22,e,null,n),e.lanes=0,e}function pc(e,n,s){return Ga(n,e.child,null,s),e=mc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function ap(e,n,s){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),Ru(e.return,n,s)}function gc(e,n,s,l,u,f){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:u,treeForkCount:f}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=l,y.tail=s,y.tailMode=u,y.treeForkCount=f)}function sp(e,n,s){var l=n.pendingProps,u=l.revealOrder,f=l.tail;l=l.children;var y=Xe.current,_=(y&2)!==0;if(_?(y=y&1|2,n.flags|=128):y&=1,ee(Xe,y),ht(e,n,l,s),l=Ee?ji:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ap(e,s,n);else if(e.tag===19)ap(e,s,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(s=n.child,u=null;s!==null;)e=s.alternate,e!==null&&nl(e)===null&&(u=s),s=s.sibling;s=u,s===null?(u=n.child,n.child=null):(u=s.sibling,s.sibling=null),gc(n,!1,u,s,f,l);break;case"backwards":case"unstable_legacy-backwards":for(s=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&nl(e)===null){n.child=u;break}e=u.sibling,u.sibling=s,s=u,u=e}gc(n,!0,s,null,f,l);break;case"together":gc(n,!1,null,null,void 0,l);break;default:n.memoizedState=null}return n.child}function Rn(e,n,s){if(e!==null&&(n.dependencies=e.dependencies),ia|=n.lanes,(s&n.childLanes)===0)if(e!==null){if(Es(e,n,s,!1),(s&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,s=On(e,e.pendingProps),n.child=s,s.return=n;e.sibling!==null;)e=e.sibling,s=s.sibling=On(e,e.pendingProps),s.return=n;s.sibling=null}return n.child}function yc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Vr(e)))}function eS(e,n,s){switch(n.tag){case 3:Ze(n,n.stateNode.containerInfo),Jn(n,We,e.memoizedState.cache),qa();break;case 27:case 5:cn(n);break;case 4:Ze(n,n.stateNode.containerInfo);break;case 10:Jn(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Hu(n),null;break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(ta(n),n.flags|=128,null):(s&n.child.childLanes)!==0?np(e,n,s):(ta(n),e=Rn(e,n,s),e!==null?e.sibling:null);ta(n);break;case 19:var u=(e.flags&128)!==0;if(l=(s&n.childLanes)!==0,l||(Es(e,n,s,!1),l=(s&n.childLanes)!==0),u){if(l)return sp(e,n,s);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ee(Xe,Xe.current),l)break;return null;case 22:return n.lanes=0,Xm(e,n,s,n.pendingProps);case 24:Jn(n,We,e.memoizedState.cache)}return Rn(e,n,s)}function ip(e,n,s){if(e!==null)if(e.memoizedProps!==n.pendingProps)tt=!0;else{if(!yc(e,s)&&(n.flags&128)===0)return tt=!1,eS(e,n,s);tt=(e.flags&131072)!==0}else tt=!1,Ee&&(n.flags&1048576)!==0&&Lh(n,ji,n.index);switch(n.lanes=0,n.tag){case 16:e:{var l=n.pendingProps;if(e=Qa(n.elementType),n.type=e,typeof e=="function")_u(e)?(l=Fa(e,l),n.tag=1,n=ep(null,n,e,l,s)):(n.tag=0,n=cc(null,n,e,l,s));else{if(e!=null){var u=e.$$typeof;if(u===V){n.tag=11,n=Fm(null,n,e,l,s);break e}else if(u===A){n.tag=14,n=Vm(null,n,e,l,s);break e}}throw n=ye(e)||e,Error(r(306,n,""))}}return n;case 0:return cc(e,n,n.type,n.pendingProps,s);case 1:return l=n.type,u=Fa(l,n.pendingProps),ep(e,n,l,u,s);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,Lu(e,n),Di(n,l,null,s);var y=n.memoizedState;if(l=y.cache,Jn(n,We,l),l!==f.cache&&Au(n,[We],s,!0),Mi(),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=tp(e,n,l,s);break e}else if(l!==u){u=Vt(Error(r(424)),n),zi(u),n=tp(e,n,l,s);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Be=Wt(e.firstChild),ft=n,Ee=!0,Pn=null,Jt=!0,s=Xh(n,null,l,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(qa(),l===u){n=Rn(e,n,s);break e}ht(e,n,l,s)}n=n.child}return n;case 26:return hl(e,n),e===null?(s=gg(n.type,null,n.pendingProps,null))?n.memoizedState=s:Ee||(s=n.type,e=n.pendingProps,l=Rl(xe.current).createElement(s),l[ct]=n,l[wt]=e,mt(l,s,e),lt(l),n.stateNode=l):n.memoizedState=gg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return cn(n),e===null&&Ee&&(l=n.stateNode=hg(n.type,n.pendingProps,xe.current),ft=n,Jt=!0,u=Be,ca(n.type)?(Xc=u,Be=Wt(l.firstChild)):Be=u),ht(e,n,n.pendingProps.children,s),hl(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ee&&((u=l=Be)&&(l=RS(l,n.type,n.pendingProps,Jt),l!==null?(n.stateNode=l,ft=n,Be=Wt(l.firstChild),Jt=!1,u=!0):u=!1),u||Xn(n)),cn(n),u=n.type,f=n.pendingProps,y=e!==null?e.memoizedProps:null,l=f.children,Gc(u,f)?l=null:y!==null&&Gc(u,y)&&(n.flags|=32),n.memoizedState!==null&&(u=Ku(e,n,Gx,null,null,s),er._currentValue=u),hl(e,n),ht(e,n,l,s),n.child;case 6:return e===null&&Ee&&((e=s=Be)&&(s=AS(s,n.pendingProps,Jt),s!==null?(n.stateNode=s,ft=n,Be=null,e=!0):e=!1),e||Xn(n)),null;case 13:return np(e,n,s);case 4:return Ze(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Ga(n,null,l,s):ht(e,n,l,s),n.child;case 11:return Fm(e,n,n.type,n.pendingProps,s);case 7:return ht(e,n,n.pendingProps,s),n.child;case 8:return ht(e,n,n.pendingProps.children,s),n.child;case 12:return ht(e,n,n.pendingProps.children,s),n.child;case 10:return l=n.pendingProps,Jn(n,n.type,l.value),ht(e,n,l.children,s),n.child;case 9:return u=n.type._context,l=n.pendingProps.children,$a(n),u=dt(u),l=l(u),n.flags|=1,ht(e,n,l,s),n.child;case 14:return Vm(e,n,n.type,n.pendingProps,s);case 15:return Pm(e,n,n.type,n.pendingProps,s);case 19:return sp(e,n,s);case 31:return Wx(e,n,s);case 22:return Xm(e,n,s,n.pendingProps);case 24:return $a(n),l=dt(We),e===null?(u=Du(),u===null&&(u=Le,f=Cu(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=s),u=f),n.memoizedState={parent:l,cache:u},Uu(n),Jn(n,We,u)):((e.lanes&s)!==0&&(Lu(e,n),Di(n,null,null,s),Mi()),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),Jn(n,We,l)):(l=f.cache,Jn(n,We,l),l!==u.cache&&Au(n,[We],s,!0))),ht(e,n,n.pendingProps.children,s),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function An(e){e.flags|=4}function vc(e,n,s,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(Cp())e.flags|=8192;else throw Ka=Ir,ku}else e.flags&=-16777217}function rp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Sg(n))if(Cp())e.flags|=8192;else throw Ka=Ir,ku}function pl(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?qd():536870912,e.lanes|=n,Ls|=n)}function Bi(e,n){if(!Ee)switch(e.tailMode){case"hidden":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function $e(e){var n=e.alternate!==null&&e.alternate.child===e.child,s=0,l=0;if(n)for(var u=e.child;u!==null;)s|=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;)s|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=s,n}function tS(e,n,s){var l=n.pendingProps;switch(ju(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(n),null;case 1:return $e(n),null;case 3:return s=n.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),zn(We),He(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Os(n)?An(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Nu())),$e(n),null;case 26:var u=n.type,f=n.memoizedState;return e===null?(An(n),f!==null?($e(n),rp(n,f)):($e(n),vc(n,u,null,l,s))):f?f!==e.memoizedState?(An(n),$e(n),rp(n,f)):($e(n),n.flags&=-16777217):(e=e.memoizedProps,e!==l&&An(n),$e(n),vc(n,u,e,l,s)),null;case 27:if(Ra(n),s=xe.current,u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&An(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return $e(n),null}e=ae.current,Os(n)?qh(n):(e=hg(u,l,s),n.stateNode=e,An(n))}return $e(n),null;case 5:if(Ra(n),u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&An(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return $e(n),null}if(f=ae.current,Os(n))qh(n);else{var y=Rl(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[wt]=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&&An(n)}}return $e(n),vc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,s),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==l&&An(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error(r(166));if(e=xe.current,Os(n)){if(e=n.stateNode,s=n.memoizedProps,l=null,u=ft,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[ct]=n,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||ng(e.nodeValue,s)),e||Xn(n,!0)}else e=Rl(e).createTextNode(l),e[ct]=n,n.stateNode=e}return $e(n),null;case 31:if(s=n.memoizedState,e===null||e.memoizedState!==null){if(l=Os(n),s!==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 qa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$e(n),e=!1}else s=Nu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return n.flags&256?(Zt(n),n):(Zt(n),null);if((n.flags&128)!==0)throw Error(r(558))}return $e(n),null;case 13:if(l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Os(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 qa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$e(n),u=!1}else u=Nu(),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=s,n):(s=l!==null,e=e!==null&&e.memoizedState!==null,s&&(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)),s!==e&&s&&(n.child.flags|=8192),pl(n,n.updateQueue),$e(n),null);case 4:return He(),e===null&&Bc(n.stateNode.containerInfo),$e(n),null;case 10:return zn(n.type),$e(n),null;case 19:if(q(Xe),l=n.memoizedState,l===null)return $e(n),null;if(u=(n.flags&128)!==0,f=l.rendering,f===null)if(u)Bi(l,!1);else{if(Pe!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=nl(e),f!==null){for(n.flags|=128,Bi(l,!1),e=f.updateQueue,n.updateQueue=e,pl(n,e),n.subtreeFlags=0,e=s,s=n.child;s!==null;)Dh(s,e),s=s.sibling;return ee(Xe,Xe.current&1|2),Ee&&En(n,l.treeForkCount),n.child}e=e.sibling}l.tail!==null&&Ct()>xl&&(n.flags|=128,u=!0,Bi(l,!1),n.lanes=4194304)}else{if(!u)if(e=nl(f),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,pl(n,e),Bi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Ee)return $e(n),null}else 2*Ct()-l.renderingStartTime>xl&&s!==536870912&&(n.flags|=128,u=!0,Bi(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,s=Xe.current,ee(Xe,u?s&1|2:s&1),Ee&&En(n,l.treeForkCount),e):($e(n),null);case 22:case 23:return Zt(n),$u(),l=n.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?(s&536870912)!==0&&(n.flags&128)===0&&($e(n),n.subtreeFlags&6&&(n.flags|=8192)):$e(n),s=n.updateQueue,s!==null&&pl(n,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==s&&(n.flags|=2048),e!==null&&q(Ha),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),zn(We),$e(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function nS(e,n){switch(ju(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return zn(We),He(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ra(n),null;case 31:if(n.memoizedState!==null){if(Zt(n),n.alternate===null)throw Error(r(340));qa()}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));qa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return q(Xe),null;case 4:return He(),null;case 10:return zn(n.type),null;case 22:case 23:return Zt(n),$u(),e!==null&&q(Ha),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return zn(We),null;case 25:return null;default:return null}}function lp(e,n){switch(ju(n),n.tag){case 3:zn(We),He();break;case 26:case 27:case 5:Ra(n);break;case 4:He();break;case 31:n.memoizedState!==null&&Zt(n);break;case 13:Zt(n);break;case 19:q(Xe);break;case 10:zn(n.type);break;case 22:case 23:Zt(n),$u(),e!==null&&q(Ha);break;case 24:zn(We)}}function $i(e,n){try{var s=n.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var u=l.next;s=u;do{if((s.tag&e)===e){l=void 0;var f=s.create,y=s.inst;l=f(),y.destroy=l}s=s.next}while(s!==u)}}catch(_){Me(n,n.return,_)}}function aa(e,n,s){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 E=s,D=_;try{D()}catch($){Me(u,E,$)}}}l=l.next}while(l!==f)}}catch($){Me(n,n.return,$)}}function op(e){var n=e.updateQueue;if(n!==null){var s=e.stateNode;try{Ih(n,s)}catch(l){Me(e,e.return,l)}}}function up(e,n,s){s.props=Fa(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){Me(e,n,l)}}function Hi(e,n){try{var s=e.ref;if(s!==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 s=="function"?e.refCleanup=s(l):s.current=l}}catch(u){Me(e,n,u)}}function hn(e,n){var s=e.ref,l=e.refCleanup;if(s!==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 s=="function")try{s(null)}catch(u){Me(e,n,u)}else s.current=null}function cp(e){var n=e.type,s=e.memoizedProps,l=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(u){Me(e,e.return,u)}}function bc(e,n,s){try{var l=e.stateNode;OS(l,e.type,s,n),l[wt]=n}catch(u){Me(e,e.return,u)}}function fp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ca(e.type)||e.tag===4}function xc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fp(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&&ca(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 Sc(e,n,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,n):(n=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,n.appendChild(e),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=_n));else if(l!==4&&(l===27&&ca(e.type)&&(s=e.stateNode,n=null),e=e.child,e!==null))for(Sc(e,n,s),e=e.sibling;e!==null;)Sc(e,n,s),e=e.sibling}function gl(e,n,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?s.insertBefore(e,n):s.appendChild(e);else if(l!==4&&(l===27&&ca(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(gl(e,n,s),e=e.sibling;e!==null;)gl(e,n,s),e=e.sibling}function dp(e){var n=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);mt(n,l,s),n[ct]=e,n[wt]=s}catch(f){Me(e,e.return,f)}}var Cn=!1,nt=!1,_c=!1,hp=typeof WeakSet=="function"?WeakSet:Set,ot=null;function aS(e,n){if(e=e.containerInfo,Qc=Ll,e=Eh(e),pu(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var u=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var y=0,_=-1,E=-1,D=0,$=0,Y=e,k=null;t:for(;;){for(var Z;Y!==s||u!==0&&Y.nodeType!==3||(_=y+u),Y!==f||l!==0&&Y.nodeType!==3||(E=y+l),Y.nodeType===3&&(y+=Y.nodeValue.length),(Z=Y.firstChild)!==null;)k=Y,Y=Z;for(;;){if(Y===e)break t;if(k===s&&++D===u&&(_=y),k===f&&++$===l&&(E=y),(Z=Y.nextSibling)!==null)break;Y=k,k=Y.parentNode}Y=Z}s=_===-1||E===-1?null:{start:_,end:E}}else s=null}s=s||{start:0,end:0}}else s=null;for(Kc={focusedElem:e,selectionRange:s},Ll=!1,ot=n;ot!==null;)if(n=ot,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ot=e;else for(;ot!==null;){switch(n=ot,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(s=0;s<e.length;s++)u=e[s],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,s=n,u=f.memoizedProps,f=f.memoizedState,l=s.stateNode;try{var ie=Fa(s.type,u);e=l.getSnapshotBeforeUpdate(ie,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(de){Me(s,s.return,de)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,s=e.nodeType,s===9)Fc(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fc(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,ot=e;break}ot=n.return}}function mp(e,n,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:Dn(e,s),l&4&&$i(5,s);break;case 1:if(Dn(e,s),l&4)if(e=s.stateNode,n===null)try{e.componentDidMount()}catch(y){Me(s,s.return,y)}else{var u=Fa(s.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(u,n,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Me(s,s.return,y)}}l&64&&op(s),l&512&&Hi(s,s.return);break;case 3:if(Dn(e,s),l&64&&(e=s.updateQueue,e!==null)){if(n=null,s.child!==null)switch(s.child.tag){case 27:case 5:n=s.child.stateNode;break;case 1:n=s.child.stateNode}try{Ih(e,n)}catch(y){Me(s,s.return,y)}}break;case 27:n===null&&l&4&&dp(s);case 26:case 5:Dn(e,s),n===null&&l&4&&cp(s),l&512&&Hi(s,s.return);break;case 12:Dn(e,s);break;case 31:Dn(e,s),l&4&&yp(e,s);break;case 13:Dn(e,s),l&4&&vp(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=dS.bind(null,s),CS(e,s))));break;case 22:if(l=s.memoizedState!==null||Cn,!l){n=n!==null&&n.memoizedState!==null||nt,u=Cn;var f=nt;Cn=l,(nt=n)&&!f?kn(e,s,(s.subtreeFlags&8772)!==0):Dn(e,s),Cn=u,nt=f}break;case 30:break;default:Dn(e,s)}}function pp(e){var n=e.alternate;n!==null&&(e.alternate=null,pp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Io(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 Qe=null,Et=!1;function Mn(e,n,s){for(s=s.child;s!==null;)gp(e,n,s),s=s.sibling}function gp(e,n,s){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(di,s)}catch{}switch(s.tag){case 26:nt||hn(s,n),Mn(e,n,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:nt||hn(s,n);var l=Qe,u=Et;ca(s.type)&&(Qe=s.stateNode,Et=!1),Mn(e,n,s),Ji(s.stateNode),Qe=l,Et=u;break;case 5:nt||hn(s,n);case 6:if(l=Qe,u=Et,Qe=null,Mn(e,n,s),Qe=l,Et=u,Qe!==null)if(Et)try{(Qe.nodeType===9?Qe.body:Qe.nodeName==="HTML"?Qe.ownerDocument.body:Qe).removeChild(s.stateNode)}catch(f){Me(s,n,f)}else try{Qe.removeChild(s.stateNode)}catch(f){Me(s,n,f)}break;case 18:Qe!==null&&(Et?(e=Qe,og(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Gs(e)):og(Qe,s.stateNode));break;case 4:l=Qe,u=Et,Qe=s.stateNode.containerInfo,Et=!0,Mn(e,n,s),Qe=l,Et=u;break;case 0:case 11:case 14:case 15:aa(2,s,n),nt||aa(4,s,n),Mn(e,n,s);break;case 1:nt||(hn(s,n),l=s.stateNode,typeof l.componentWillUnmount=="function"&&up(s,n,l)),Mn(e,n,s);break;case 21:Mn(e,n,s);break;case 22:nt=(l=nt)||s.memoizedState!==null,Mn(e,n,s),nt=l;break;default:Mn(e,n,s)}}function yp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gs(e)}catch(s){Me(n,n.return,s)}}}function vp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gs(e)}catch(s){Me(n,n.return,s)}}function sS(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new hp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new hp),n;default:throw Error(r(435,e.tag))}}function yl(e,n){var s=sS(e);n.forEach(function(l){if(!s.has(l)){s.add(l);var u=hS.bind(null,e,l);l.then(u,u)}})}function jt(e,n){var s=n.deletions;if(s!==null)for(var l=0;l<s.length;l++){var u=s[l],f=e,y=n,_=y;e:for(;_!==null;){switch(_.tag){case 27:if(ca(_.type)){Qe=_.stateNode,Et=!1;break e}break;case 5:Qe=_.stateNode,Et=!1;break e;case 3:case 4:Qe=_.stateNode.containerInfo,Et=!0;break e}_=_.return}if(Qe===null)throw Error(r(160));gp(f,y,u),Qe=null,Et=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)bp(n,e),n=n.sibling}var sn=null;function bp(e,n){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:jt(n,e),zt(e),l&4&&(aa(3,e,e.return),$i(3,e),aa(5,e,e.return));break;case 1:jt(n,e),zt(e),l&512&&(nt||s===null||hn(s,s.return)),l&64&&Cn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var u=sn;if(jt(n,e),zt(e),l&512&&(nt||s===null||hn(s,s.return)),l&4){var f=s!==null?s.memoizedState:null;if(l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null){e:{l=e.type,s=e.memoizedProps,u=u.ownerDocument||u;t:switch(l){case"title":f=u.getElementsByTagName("title")[0],(!f||f[pi]||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,s),f[ct]=e,lt(f),l=f;break e;case"link":var y=bg("link","href",u).get(l+(s.href||""));if(y){for(var _=0;_<y.length;_++)if(f=y[_],f.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&f.getAttribute("rel")===(s.rel==null?null:s.rel)&&f.getAttribute("title")===(s.title==null?null:s.title)&&f.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){y.splice(_,1);break t}}f=u.createElement(l),mt(f,l,s),u.head.appendChild(f);break;case"meta":if(y=bg("meta","content",u).get(l+(s.content||""))){for(_=0;_<y.length;_++)if(f=y[_],f.getAttribute("content")===(s.content==null?null:""+s.content)&&f.getAttribute("name")===(s.name==null?null:s.name)&&f.getAttribute("property")===(s.property==null?null:s.property)&&f.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&f.getAttribute("charset")===(s.charSet==null?null:s.charSet)){y.splice(_,1);break t}}f=u.createElement(l),mt(f,l,s),u.head.appendChild(f);break;default:throw Error(r(468,l))}f[ct]=e,lt(f),l=f}e.stateNode=l}else xg(u,e.type,e.stateNode);else e.stateNode=vg(u,l,e.memoizedProps);else f!==l?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,l===null?xg(u,e.type,e.stateNode):vg(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&bc(e,e.memoizedProps,s.memoizedProps)}break;case 27:jt(n,e),zt(e),l&512&&(nt||s===null||hn(s,s.return)),s!==null&&l&4&&bc(e,e.memoizedProps,s.memoizedProps);break;case 5:if(jt(n,e),zt(e),l&512&&(nt||s===null||hn(s,s.return)),e.flags&32){u=e.stateNode;try{ms(u,"")}catch(ie){Me(e,e.return,ie)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,bc(e,u,s!==null?s.memoizedProps:u)),l&1024&&(_c=!0);break;case 6:if(jt(n,e),zt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(ie){Me(e,e.return,ie)}}break;case 3:if(Ml=null,u=sn,sn=Al(n.containerInfo),jt(n,e),sn=u,zt(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{Gs(n.containerInfo)}catch(ie){Me(e,e.return,ie)}_c&&(_c=!1,xp(e));break;case 4:l=sn,sn=Al(e.stateNode.containerInfo),jt(n,e),zt(e),sn=l;break;case 12:jt(n,e),zt(e);break;case 31:jt(n,e),zt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,yl(e,l)));break;case 13:jt(n,e),zt(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(bl=Ct()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,yl(e,l)));break;case 22:u=e.memoizedState!==null;var E=s!==null&&s.memoizedState!==null,D=Cn,$=nt;if(Cn=D||u,nt=$||E,jt(n,e),nt=$,Cn=D,zt(e),l&8192)e:for(n=e.stateNode,n._visibility=u?n._visibility&-2:n._visibility|1,u&&(s===null||E||Cn||nt||Va(e)),s=null,n=e;;){if(n.tag===5||n.tag===26){if(s===null){E=s=n;try{if(f=E.stateNode,u)y=f.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{_=E.stateNode;var Y=E.memoizedProps.style,k=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;_.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(ie){Me(E,E.return,ie)}}}else if(n.tag===6){if(s===null){E=n;try{E.stateNode.nodeValue=u?"":E.memoizedProps}catch(ie){Me(E,E.return,ie)}}}else if(n.tag===18){if(s===null){E=n;try{var Z=E.stateNode;u?ug(Z,!0):ug(E.stateNode,!1)}catch(ie){Me(E,E.return,ie)}}}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;s===n&&(s=null),n=n.return}s===n&&(s=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=e.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,yl(e,s))));break;case 19:jt(n,e),zt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,yl(e,l)));break;case 30:break;case 21:break;default:jt(n,e),zt(e)}}function zt(e){var n=e.flags;if(n&2){try{for(var s,l=e.return;l!==null;){if(fp(l)){s=l;break}l=l.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var u=s.stateNode,f=xc(e);gl(e,f,u);break;case 5:var y=s.stateNode;s.flags&32&&(ms(y,""),s.flags&=-33);var _=xc(e);gl(e,_,y);break;case 3:case 4:var E=s.stateNode.containerInfo,D=xc(e);Sc(e,D,E);break;default:throw Error(r(161))}}catch($){Me(e,e.return,$)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function xp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;xp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Dn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)mp(e,n.alternate,n),n=n.sibling}function Va(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:aa(4,n,n.return),Va(n);break;case 1:hn(n,n.return);var s=n.stateNode;typeof s.componentWillUnmount=="function"&&up(n,n.return,s),Va(n);break;case 27:Ji(n.stateNode);case 26:case 5:hn(n,n.return),Va(n);break;case 22:n.memoizedState===null&&Va(n);break;case 30:Va(n);break;default:Va(n)}e=e.sibling}}function kn(e,n,s){for(s=s&&(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:kn(u,f,s),$i(4,f);break;case 1:if(kn(u,f,s),l=f,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(D){Me(l,l.return,D)}if(l=f,u=l.updateQueue,u!==null){var _=l.stateNode;try{var E=u.shared.hiddenCallbacks;if(E!==null)for(u.shared.hiddenCallbacks=null,u=0;u<E.length;u++)Jh(E[u],_)}catch(D){Me(l,l.return,D)}}s&&y&64&&op(f),Hi(f,f.return);break;case 27:dp(f);case 26:case 5:kn(u,f,s),s&&l===null&&y&4&&cp(f),Hi(f,f.return);break;case 12:kn(u,f,s);break;case 31:kn(u,f,s),s&&y&4&&yp(u,f);break;case 13:kn(u,f,s),s&&y&4&&vp(u,f);break;case 22:f.memoizedState===null&&kn(u,f,s),Hi(f,f.return);break;case 30:break;default:kn(u,f,s)}n=n.sibling}}function wc(e,n){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&Ni(s))}function Oc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ni(e))}function rn(e,n,s,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Sp(e,n,s,l),n=n.sibling}function Sp(e,n,s,l){var u=n.flags;switch(n.tag){case 0:case 11:case 15:rn(e,n,s,l),u&2048&&$i(9,n);break;case 1:rn(e,n,s,l);break;case 3:rn(e,n,s,l),u&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ni(e)));break;case 12:if(u&2048){rn(e,n,s,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(E){Me(n,n.return,E)}}else rn(e,n,s,l);break;case 31:rn(e,n,s,l);break;case 13:rn(e,n,s,l);break;case 23:break;case 22:f=n.stateNode,y=n.alternate,n.memoizedState!==null?f._visibility&2?rn(e,n,s,l):Qi(e,n):f._visibility&2?rn(e,n,s,l):(f._visibility|=2,Ds(e,n,s,l,(n.subtreeFlags&10256)!==0||!1)),u&2048&&wc(y,n);break;case 24:rn(e,n,s,l),u&2048&&Oc(n.alternate,n);break;default:rn(e,n,s,l)}}function Ds(e,n,s,l,u){for(u=u&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var f=e,y=n,_=s,E=l,D=y.flags;switch(y.tag){case 0:case 11:case 15:Ds(f,y,_,E,u),$i(8,y);break;case 23:break;case 22:var $=y.stateNode;y.memoizedState!==null?$._visibility&2?Ds(f,y,_,E,u):Qi(f,y):($._visibility|=2,Ds(f,y,_,E,u)),u&&D&2048&&wc(y.alternate,y);break;case 24:Ds(f,y,_,E,u),u&&D&2048&&Oc(y.alternate,y);break;default:Ds(f,y,_,E,u)}n=n.sibling}}function Qi(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var s=e,l=n,u=l.flags;switch(l.tag){case 22:Qi(s,l),u&2048&&wc(l.alternate,l);break;case 24:Qi(s,l),u&2048&&Oc(l.alternate,l);break;default:Qi(s,l)}n=n.sibling}}var Ki=8192;function ks(e,n,s){if(e.subtreeFlags&Ki)for(e=e.child;e!==null;)_p(e,n,s),e=e.sibling}function _p(e,n,s){switch(e.tag){case 26:ks(e,n,s),e.flags&Ki&&e.memoizedState!==null&&KS(s,sn,e.memoizedState,e.memoizedProps);break;case 5:ks(e,n,s);break;case 3:case 4:var l=sn;sn=Al(e.stateNode.containerInfo),ks(e,n,s),sn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ki,Ki=16777216,ks(e,n,s),Ki=l):ks(e,n,s));break;default:ks(e,n,s)}}function wp(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 Gi(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var l=n[s];ot=l,Ep(l,e)}wp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Op(e),e=e.sibling}function Op(e){switch(e.tag){case 0:case 11:case 15:Gi(e),e.flags&2048&&aa(9,e,e.return);break;case 3:Gi(e);break;case 12:Gi(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,vl(e)):Gi(e);break;default:Gi(e)}}function vl(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var s=0;s<n.length;s++){var l=n[s];ot=l,Ep(l,e)}wp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:aa(8,n,n.return),vl(n);break;case 22:s=n.stateNode,s._visibility&2&&(s._visibility&=-3,vl(n));break;default:vl(n)}e=e.sibling}}function Ep(e,n){for(;ot!==null;){var s=ot;switch(s.tag){case 0:case 11:case 15:aa(8,s,n);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ni(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,ot=l;else e:for(s=e;ot!==null;){l=ot;var u=l.sibling,f=l.return;if(pp(l),l===s){ot=null;break e}if(u!==null){u.return=f,ot=u;break e}ot=f}}}var iS={getCacheForType:function(e){var n=dt(We),s=n.data.get(e);return s===void 0&&(s=e(),n.data.set(e,s)),s},cacheSignal:function(){return dt(We).controller.signal}},rS=typeof WeakMap=="function"?WeakMap:Map,Te=0,Le=null,Se=null,we=0,Ce=0,qt=null,sa=!1,Us=!1,Ec=!1,Un=0,Pe=0,ia=0,Pa=0,jc=0,Bt=0,Ls=0,Yi=null,Nt=null,zc=!1,bl=0,jp=0,xl=1/0,Sl=null,ra=null,it=0,la=null,Zs=null,Ln=0,Nc=0,Tc=null,zp=null,Fi=0,Rc=null;function $t(){return(Te&2)!==0&&we!==0?we&-we:M.T!==null?Uc():Qd()}function Np(){if(Bt===0)if((we&536870912)===0||Ee){var e=Tr;Tr<<=1,(Tr&3932160)===0&&(Tr=262144),Bt=e}else Bt=536870912;return e=Lt.current,e!==null&&(e.flags|=32),Bt}function Tt(e,n,s){(e===Le&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(qs(e,0),oa(e,we,Bt,!1)),mi(e,s),((Te&2)===0||e!==Le)&&(e===Le&&((Te&2)===0&&(Pa|=s),Pe===4&&oa(e,we,Bt,!1)),mn(e))}function Tp(e,n,s){if((Te&6)!==0)throw Error(r(327));var l=!s&&(n&127)===0&&(n&e.expiredLanes)===0||hi(e,n),u=l?uS(e,n):Cc(e,n,!0),f=l;do{if(u===0){Us&&!l&&oa(e,n,0,!1);break}else{if(s=e.current.alternate,f&&!lS(s)){u=Cc(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=Yi;var E=_.current.memoizedState.isDehydrated;if(E&&(qs(_,y).flags|=256),y=Cc(_,y,!1),y!==2){if(Ec&&!E){_.errorRecoveryDisabledLanes|=f,Pa|=f,u=4;break e}f=Nt,Nt=u,f!==null&&(Nt===null?Nt=f:Nt.push.apply(Nt,f))}u=y}if(f=!1,u!==2)continue}}if(u===1){qs(e,0),oa(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:oa(l,n,Bt,!sa);break e;case 2:Nt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(u=bl+300-Ct(),10<u)){if(oa(l,n,Bt,!sa),Ar(l,0,!0)!==0)break e;Ln=n,l.timeoutHandle=rg(Rp.bind(null,l,s,Nt,Sl,zc,n,Bt,Pa,Ls,sa,f,"Throttled",-0,0),u);break e}Rp(l,s,Nt,Sl,zc,n,Bt,Pa,Ls,sa,f,null,-0,0)}}break}while(!0);mn(e)}function Rp(e,n,s,l,u,f,y,_,E,D,$,Y,k,Z){if(e.timeoutHandle=-1,Y=n.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_n},_p(n,f,Y);var ie=(f&62914560)===f?bl-Ct():(f&4194048)===f?jp-Ct():0;if(ie=GS(Y,ie),ie!==null){Ln=f,e.cancelPendingCommit=ie(Zp.bind(null,e,n,f,s,l,u,y,_,E,$,Y,null,k,Z)),oa(e,f,y,!D);return}}Zp(e,n,f,s,l,u,y,_,E)}function lS(e){for(var n=e;;){var s=n.tag;if((s===0||s===11||s===15)&&n.flags&16384&&(s=n.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var u=s[l],f=u.getSnapshot;u=u.value;try{if(!kt(f(),u))return!1}catch{return!1}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;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 oa(e,n,s,l){n&=~jc,n&=~Pa,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}s!==0&&Bd(e,s,n)}function _l(){return(Te&6)===0?(Vi(0),!1):!0}function Ac(){if(Se!==null){if(Ce===0)var e=Se.return;else e=Se,jn=Ba=null,Fu(e),Ts=null,Ri=0,e=Se;for(;e!==null;)lp(e.alternate,e),e=e.return;Se=null}}function qs(e,n){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,zS(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Ln=0,Ac(),Le=e,Se=s=On(e.current,null),we=n,Ce=0,qt=null,sa=!1,Us=hi(e,n),Ec=!1,Ls=Bt=jc=Pa=ia=Pe=0,Nt=Yi=null,zc=!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 Un=n,Qr(),s}function Ap(e,n){ve=null,M.H=Zi,n===Ns||n===Jr?(n=Fh(),Ce=3):n===ku?(n=Fh(),Ce=4):Ce=n===uc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,qt=n,Se===null&&(Pe=1,fl(e,Vt(n,e.current)))}function Cp(){var e=Lt.current;return e===null?!0:(we&4194048)===we?It===null:(we&62914560)===we||(we&536870912)!==0?e===It:!1}function Mp(){var e=M.H;return M.H=Zi,e===null?Zi:e}function Dp(){var e=M.A;return M.A=iS,e}function wl(){Pe=4,sa||(we&4194048)!==we&&Lt.current!==null||(Us=!0),(ia&134217727)===0&&(Pa&134217727)===0||Le===null||oa(Le,we,Bt,!1)}function Cc(e,n,s){var l=Te;Te|=2;var u=Mp(),f=Dp();(Le!==e||we!==n)&&(Sl=null,qs(e,n)),n=!1;var y=Pe;e:do try{if(Ce!==0&&Se!==null){var _=Se,E=qt;switch(Ce){case 8:Ac(),y=6;break e;case 3:case 2:case 9:case 6:Lt.current===null&&(n=!0);var D=Ce;if(Ce=0,qt=null,Bs(e,_,E,D),s&&Us){y=0;break e}break;default:D=Ce,Ce=0,qt=null,Bs(e,_,E,D)}}oS(),y=Pe;break}catch($){Ap(e,$)}while(!0);return n&&e.shellSuspendCounter++,jn=Ba=null,Te=l,M.H=u,M.A=f,Se===null&&(Le=null,we=0,Qr()),y}function oS(){for(;Se!==null;)kp(Se)}function uS(e,n){var s=Te;Te|=2;var l=Mp(),u=Dp();Le!==e||we!==n?(Sl=null,xl=Ct()+500,qs(e,n)):Us=hi(e,n);e:do try{if(Ce!==0&&Se!==null){n=Se;var f=qt;t:switch(Ce){case 1:Ce=0,qt=null,Bs(e,n,f,1);break;case 2:case 9:if(Gh(f)){Ce=0,qt=null,Up(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:Gh(f)?(Ce=0,qt=null,Up(n)):(Ce=0,qt=null,Bs(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?Sg(y):_.stateNode.complete){Ce=0,qt=null;var E=_.sibling;if(E!==null)Se=E;else{var D=_.return;D!==null?(Se=D,Ol(D)):Se=null}break t}}Ce=0,qt=null,Bs(e,n,f,5);break;case 6:Ce=0,qt=null,Bs(e,n,f,6);break;case 8:Ac(),Pe=6;break e;default:throw Error(r(462))}}cS();break}catch($){Ap(e,$)}while(!0);return jn=Ba=null,M.H=l,M.A=u,Te=s,Se!==null?0:(Le=null,we=0,Qr(),Pe)}function cS(){for(;Se!==null&&!M0();)kp(Se)}function kp(e){var n=ip(e.alternate,e,Un);e.memoizedProps=e.pendingProps,n===null?Ol(e):Se=n}function Up(e){var n=e,s=n.alternate;switch(n.tag){case 15:case 0:n=Wm(s,n,n.pendingProps,n.type,void 0,we);break;case 11:n=Wm(s,n,n.pendingProps,n.type.render,n.ref,we);break;case 5:Fu(n);default:lp(s,n),n=Se=Dh(n,Un),n=ip(s,n,Un)}e.memoizedProps=e.pendingProps,n===null?Ol(e):Se=n}function Bs(e,n,s,l){jn=Ba=null,Fu(n),Ts=null,Ri=0;var u=n.return;try{if(Ix(e,u,n,s,we)){Pe=1,fl(e,Vt(s,e.current)),Se=null;return}}catch(f){if(u!==null)throw Se=u,f;Pe=1,fl(e,Vt(s,e.current)),Se=null;return}n.flags&32768?(Ee||l===1?e=!0:Us||(we&536870912)!==0?e=!1:(sa=e=!0,(l===2||l===9||l===3||l===6)&&(l=Lt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Lp(n,e)):Ol(n)}function Ol(e){var n=e;do{if((n.flags&32768)!==0){Lp(n,sa);return}e=n.return;var s=tS(n.alternate,n,Un);if(s!==null){Se=s;return}if(n=n.sibling,n!==null){Se=n;return}Se=n=e}while(n!==null);Pe===0&&(Pe=5)}function Lp(e,n){do{var s=nS(e.alternate,e);if(s!==null){s.flags&=32767,Se=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!n&&(e=e.sibling,e!==null)){Se=e;return}Se=e=s}while(e!==null);Pe=6,Se=null}function Zp(e,n,s,l,u,f,y,_,E){e.cancelPendingCommit=null;do El();while(it!==0);if((Te&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(f=n.lanes|n.childLanes,f|=xu,Q0(e,s,f,y,_,E),e===Le&&(Se=Le=null,we=0),Zs=n,la=e,Ln=s,Nc=f,Tc=u,zp=l,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,mS(zr,function(){return Qp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||l){l=M.T,M.T=null,u=I.p,I.p=2,y=Te,Te|=4;try{aS(e,n,s)}finally{Te=y,I.p=u,M.T=l}}it=1,qp(),Bp(),$p()}}function qp(){if(it===1){it=0;var e=la,n=Zs,s=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||s){s=M.T,M.T=null;var l=I.p;I.p=2;var u=Te;Te|=4;try{bp(n,e);var f=Kc,y=Eh(e.containerInfo),_=f.focusedElem,E=f.selectionRange;if(y!==_&&_&&_.ownerDocument&&Oh(_.ownerDocument.documentElement,_)){if(E!==null&&pu(_)){var D=E.start,$=E.end;if($===void 0&&($=D),"selectionStart"in _)_.selectionStart=D,_.selectionEnd=Math.min($,_.value.length);else{var Y=_.ownerDocument||document,k=Y&&Y.defaultView||window;if(k.getSelection){var Z=k.getSelection(),ie=_.textContent.length,de=Math.min(E.start,ie),Ue=E.end===void 0?de:Math.min(E.end,ie);!Z.extend&&de>Ue&&(y=Ue,Ue=de,de=y);var T=wh(_,de),N=wh(_,Ue);if(T&&N&&(Z.rangeCount!==1||Z.anchorNode!==T.node||Z.anchorOffset!==T.offset||Z.focusNode!==N.node||Z.focusOffset!==N.offset)){var C=Y.createRange();C.setStart(T.node,T.offset),Z.removeAllRanges(),de>Ue?(Z.addRange(C),Z.extend(N.node,N.offset)):(C.setEnd(N.node,N.offset),Z.addRange(C))}}}}for(Y=[],Z=_;Z=Z.parentNode;)Z.nodeType===1&&Y.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<Y.length;_++){var K=Y[_];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Ll=!!Qc,Kc=Qc=null}finally{Te=u,I.p=l,M.T=s}}e.current=n,it=2}}function Bp(){if(it===2){it=0;var e=la,n=Zs,s=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||s){s=M.T,M.T=null;var l=I.p;I.p=2;var u=Te;Te|=4;try{mp(e,n.alternate,n)}finally{Te=u,I.p=l,M.T=s}}it=3}}function $p(){if(it===4||it===3){it=0,D0();var e=la,n=Zs,s=Ln,l=zp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?it=5:(it=0,Zs=la=null,Hp(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(ra=null),Xo(s),n=n.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(di,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=M.T,u=I.p,I.p=2,M.T=null;try{for(var f=e.onRecoverableError,y=0;y<l.length;y++){var _=l[y];f(_.value,{componentStack:_.stack})}}finally{M.T=n,I.p=u}}(Ln&3)!==0&&El(),mn(e),u=e.pendingLanes,(s&261930)!==0&&(u&42)!==0?e===Rc?Fi++:(Fi=0,Rc=e):Fi=0,Vi(0)}}function Hp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Ni(n)))}function El(){return qp(),Bp(),$p(),Qp()}function Qp(){if(it!==5)return!1;var e=la,n=Nc;Nc=0;var s=Xo(Ln),l=M.T,u=I.p;try{I.p=32>s?32:s,M.T=null,s=Tc,Tc=null;var f=la,y=Ln;if(it=0,Zs=la=null,Ln=0,(Te&6)!==0)throw Error(r(331));var _=Te;if(Te|=4,Op(f.current),Sp(f,f.current,y,s),Te=_,Vi(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(di,f)}catch{}return!0}finally{I.p=u,M.T=l,Hp(e,n)}}function Kp(e,n,s){n=Vt(s,n),n=oc(e.stateNode,n,2),e=ea(e,n,2),e!==null&&(mi(e,2),mn(e))}function Me(e,n,s){if(e.tag===3)Kp(e,e,s);else for(;n!==null;){if(n.tag===3){Kp(n,e,s);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ra===null||!ra.has(l))){e=Vt(s,e),s=Gm(2),l=ea(n,s,2),l!==null&&(Ym(s,l,n,e),mi(l,2),mn(l));break}}n=n.return}}function Mc(e,n,s){var l=e.pingCache;if(l===null){l=e.pingCache=new rS;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(s)||(Ec=!0,u.add(s),e=fS.bind(null,e,n,s),n.then(e,e))}function fS(e,n,s){var l=e.pingCache;l!==null&&l.delete(n),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,Le===e&&(we&s)===s&&(Pe===4||Pe===3&&(we&62914560)===we&&300>Ct()-bl?(Te&2)===0&&qs(e,0):jc|=s,Ls===we&&(Ls=0)),mn(e)}function Gp(e,n){n===0&&(n=qd()),e=La(e,n),e!==null&&(mi(e,n),mn(e))}function dS(e){var n=e.memoizedState,s=0;n!==null&&(s=n.retryLane),Gp(e,s)}function hS(e,n){var s=0;switch(e.tag){case 31:case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(s=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),Gp(e,s)}function mS(e,n){return Yo(e,n)}var jl=null,$s=null,Dc=!1,zl=!1,kc=!1,ua=0;function mn(e){e!==$s&&e.next===null&&($s===null?jl=$s=e:$s=$s.next=e),zl=!0,Dc||(Dc=!0,gS())}function Vi(e,n){if(!kc&&zl){kc=!0;do for(var s=!1,l=jl;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&&(s=!0,Pp(l,f))}else f=we,f=Ar(l,l===Le?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||hi(l,f)||(s=!0,Pp(l,f));l=l.next}while(s);kc=!1}}function pS(){Yp()}function Yp(){zl=Dc=!1;var e=0;ua!==0&&jS()&&(e=ua);for(var n=Ct(),s=null,l=jl;l!==null;){var u=l.next,f=Fp(l,n);f===0?(l.next=null,s===null?jl=u:s.next=u,u===null&&($s=s)):(s=l,(e!==0||(f&3)!==0)&&(zl=!0)),l=u}it!==0&&it!==5||Vi(e),ua!==0&&(ua=0)}function Fp(e,n){for(var s=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var y=31-Dt(f),_=1<<y,E=u[y];E===-1?((_&s)===0||(_&l)!==0)&&(u[y]=H0(_,n)):E<=n&&(e.expiredLanes|=_),f&=~_}if(n=Le,s=we,s=Ar(e,e===n?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,s===0||e===n&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Fo(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||hi(e,s)){if(n=s&-s,n===e.callbackPriority)return n;switch(l!==null&&Fo(l),Xo(s)){case 2:case 8:s=Ld;break;case 32:s=zr;break;case 268435456:s=Zd;break;default:s=zr}return l=Vp.bind(null,e),s=Yo(s,l),e.callbackPriority=n,e.callbackNode=s,n}return l!==null&&l!==null&&Fo(l),e.callbackPriority=2,e.callbackNode=null,2}function Vp(e,n){if(it!==0&&it!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(El()&&e.callbackNode!==s)return null;var l=we;return l=Ar(e,e===Le?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Tp(e,l,n),Fp(e,Ct()),e.callbackNode!=null&&e.callbackNode===s?Vp.bind(null,e):null)}function Pp(e,n){if(El())return null;Tp(e,n,!0)}function gS(){NS(function(){(Te&6)!==0?Yo(Ud,pS):Yp()})}function Uc(){if(ua===0){var e=js;e===0&&(e=Nr,Nr<<=1,(Nr&261888)===0&&(Nr=256)),ua=e}return ua}function Xp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:kr(""+e)}function Jp(e,n){var s=n.ownerDocument.createElement("input");return s.name=n.name,s.value=n.value,e.id&&s.setAttribute("form",e.id),n.parentNode.insertBefore(s,n),e=new FormData(e),s.parentNode.removeChild(s),e}function yS(e,n,s,l,u){if(n==="submit"&&s&&s.stateNode===u){var f=Xp((u[wt]||null).action),y=l.submitter;y&&(n=(n=y[wt]||null)?Xp(n.formAction):y.getAttribute("formAction"),n!==null&&(f=n,y=null));var _=new qr("action","action",null,l,u);e.push({event:_,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ua!==0){var E=y?Jp(u,y):new FormData(u);nc(s,{pending:!0,data:E,method:u.method,action:f},null,E)}}else typeof f=="function"&&(_.preventDefault(),E=y?Jp(u,y):new FormData(u),nc(s,{pending:!0,data:E,method:u.method,action:f},f,E))},currentTarget:u}]})}}for(var Lc=0;Lc<bu.length;Lc++){var Zc=bu[Lc],vS=Zc.toLowerCase(),bS=Zc[0].toUpperCase()+Zc.slice(1);an(vS,"on"+bS)}an(Nh,"onAnimationEnd"),an(Th,"onAnimationIteration"),an(Rh,"onAnimationStart"),an("dblclick","onDoubleClick"),an("focusin","onFocus"),an("focusout","onBlur"),an(kx,"onTransitionRun"),an(Ux,"onTransitionStart"),an(Lx,"onTransitionCancel"),an(Ah,"onTransitionEnd"),ds("onMouseEnter",["mouseout","mouseover"]),ds("onMouseLeave",["mouseout","mouseover"]),ds("onPointerEnter",["pointerout","pointerover"]),ds("onPointerLeave",["pointerout","pointerover"]),Ma("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ma("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ma("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ma("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ma("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ma("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pi="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(" "),xS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pi));function Ip(e,n){n=(n&4)!==0;for(var s=0;s<e.length;s++){var l=e[s],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],E=_.instance,D=_.currentTarget;if(_=_.listener,E!==f&&u.isPropagationStopped())break e;f=_,u.currentTarget=D;try{f(u)}catch($){Hr($)}u.currentTarget=null,f=E}else for(y=0;y<l.length;y++){if(_=l[y],E=_.instance,D=_.currentTarget,_=_.listener,E!==f&&u.isPropagationStopped())break e;f=_,u.currentTarget=D;try{f(u)}catch($){Hr($)}u.currentTarget=null,f=E}}}}function _e(e,n){var s=n[Jo];s===void 0&&(s=n[Jo]=new Set);var l=e+"__bubble";s.has(l)||(Wp(n,e,2,!1),s.add(l))}function qc(e,n,s){var l=0;n&&(l|=4),Wp(s,e,l,n)}var Nl="_reactListening"+Math.random().toString(36).slice(2);function Bc(e){if(!e[Nl]){e[Nl]=!0,Yd.forEach(function(s){s!=="selectionchange"&&(xS.has(s)||qc(s,!1,e),qc(s,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Nl]||(n[Nl]=!0,qc("selectionchange",!1,n))}}function Wp(e,n,s,l){switch(Ng(n)){case 2:var u=VS;break;case 8:u=PS;break;default:u=tf}s=u.bind(null,n,s,e),u=void 0,!ru||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(n,s,{capture:!0,passive:u}):e.addEventListener(n,s,!0):u!==void 0?e.addEventListener(n,s,{passive:u}):e.addEventListener(n,s,!1)}function $c(e,n,s,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 E=y.tag;if((E===3||E===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;_!==null;){if(y=us(_),y===null)return;if(E=y.tag,E===5||E===6||E===26||E===27){l=f=y;continue e}_=_.parentNode}}l=l.return}sh(function(){var D=f,$=su(s),Y=[];e:{var k=Ch.get(e);if(k!==void 0){var Z=qr,ie=e;switch(e){case"keypress":if(Lr(s)===0)break e;case"keydown":case"keyup":Z=hx;break;case"focusin":ie="focus",Z=cu;break;case"focusout":ie="blur",Z=cu;break;case"beforeblur":case"afterblur":Z=cu;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=lh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=tx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=gx;break;case Nh:case Th:case Rh:Z=sx;break;case Ah:Z=vx;break;case"scroll":case"scrollend":Z=W0;break;case"wheel":Z=xx;break;case"copy":case"cut":case"paste":Z=rx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=uh;break;case"toggle":case"beforetoggle":Z=_x}var de=(n&4)!==0,Ue=!de&&(e==="scroll"||e==="scrollend"),T=de?k!==null?k+"Capture":null:k;de=[];for(var N=D,C;N!==null;){var K=N;if(C=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||C===null||T===null||(K=yi(N,T),K!=null&&de.push(Xi(N,K,C))),Ue)break;N=N.return}0<de.length&&(k=new Z(k,ie,null,s,$),Y.push({event:k,listeners:de}))}}if((n&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",k&&s!==au&&(ie=s.relatedTarget||s.fromElement)&&(us(ie)||ie[os]))break e;if((Z||k)&&(k=$.window===$?$:(k=$.ownerDocument)?k.defaultView||k.parentWindow:window,Z?(ie=s.relatedTarget||s.toElement,Z=D,ie=ie?us(ie):null,ie!==null&&(Ue=c(ie),de=ie.tag,ie!==Ue||de!==5&&de!==27&&de!==6)&&(ie=null)):(Z=null,ie=D),Z!==ie)){if(de=lh,K="onMouseLeave",T="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(de=uh,K="onPointerLeave",T="onPointerEnter",N="pointer"),Ue=Z==null?k:gi(Z),C=ie==null?k:gi(ie),k=new de(K,N+"leave",Z,s,$),k.target=Ue,k.relatedTarget=C,K=null,us($)===D&&(de=new de(T,N+"enter",ie,s,$),de.target=C,de.relatedTarget=Ue,K=de),Ue=K,Z&&ie)t:{for(de=SS,T=Z,N=ie,C=0,K=T;K;K=de(K))C++;K=0;for(var ce=N;ce;ce=de(ce))K++;for(;0<C-K;)T=de(T),C--;for(;0<K-C;)N=de(N),K--;for(;C--;){if(T===N||N!==null&&T===N.alternate){de=T;break t}T=de(T),N=de(N)}de=null}else de=null;Z!==null&&eg(Y,k,Z,de,!1),ie!==null&&Ue!==null&&eg(Y,Ue,ie,de,!0)}}e:{if(k=D?gi(D):window,Z=k.nodeName&&k.nodeName.toLowerCase(),Z==="select"||Z==="input"&&k.type==="file")var ze=yh;else if(ph(k))if(vh)ze=Cx;else{ze=Rx;var oe=Tx}else Z=k.nodeName,!Z||Z.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?D&&nu(D.elementType)&&(ze=yh):ze=Ax;if(ze&&(ze=ze(e,D))){gh(Y,ze,s,$);break e}oe&&oe(e,k,D),e==="focusout"&&D&&k.type==="number"&&D.memoizedProps.value!=null&&tu(k,"number",k.value)}switch(oe=D?gi(D):window,e){case"focusin":(ph(oe)||oe.contentEditable==="true")&&(vs=oe,gu=D,Ei=null);break;case"focusout":Ei=gu=vs=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,jh(Y,s,$);break;case"selectionchange":if(Dx)break;case"keydown":case"keyup":jh(Y,s,$)}var be;if(du)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else ys?hh(e,s)&&(Oe="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Oe="onCompositionStart");Oe&&(ch&&s.locale!=="ko"&&(ys||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&ys&&(be=ih()):(Fn=$,lu="value"in Fn?Fn.value:Fn.textContent,ys=!0)),oe=Tl(D,Oe),0<oe.length&&(Oe=new oh(Oe,e,null,s,$),Y.push({event:Oe,listeners:oe}),be?Oe.data=be:(be=mh(s),be!==null&&(Oe.data=be)))),(be=Ox?Ex(e,s):jx(e,s))&&(Oe=Tl(D,"onBeforeInput"),0<Oe.length&&(oe=new oh("onBeforeInput","beforeinput",null,s,$),Y.push({event:oe,listeners:Oe}),oe.data=be)),yS(Y,e,D,s,$)}Ip(Y,n)})}function Xi(e,n,s){return{instance:e,listener:n,currentTarget:s}}function Tl(e,n){for(var s=n+"Capture",l=[];e!==null;){var u=e,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=yi(e,s),u!=null&&l.unshift(Xi(e,u,f)),u=yi(e,n),u!=null&&l.push(Xi(e,u,f))),e.tag===3)return l;e=e.return}return[]}function SS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function eg(e,n,s,l,u){for(var f=n._reactName,y=[];s!==null&&s!==l;){var _=s,E=_.alternate,D=_.stateNode;if(_=_.tag,E!==null&&E===l)break;_!==5&&_!==26&&_!==27||D===null||(E=D,u?(D=yi(s,f),D!=null&&y.unshift(Xi(s,D,E))):u||(D=yi(s,f),D!=null&&y.push(Xi(s,D,E)))),s=s.return}y.length!==0&&e.push({event:n,listeners:y})}var _S=/\r\n?/g,wS=/\u0000|\uFFFD/g;function tg(e){return(typeof e=="string"?e:""+e).replace(_S,`
|
|
9
|
+
`).replace(wS,"")}function ng(e,n){return n=tg(n),tg(e)===n}function ke(e,n,s,l,u,f){switch(s){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||ms(e,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&ms(e,""+l);break;case"className":Mr(e,"class",l);break;case"tabIndex":Mr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Mr(e,s,l);break;case"style":nh(e,l,f);break;case"data":if(n!=="object"){Mr(e,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||s!=="href")){e.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=kr(""+l),e.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(s,"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"&&(s==="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(s);break}l=kr(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=_n);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(s=l.__html,s!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=s}}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}s=kr(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);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(s,""+l):e.removeAttribute(s);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(s,""):e.removeAttribute(s);break;case"capture":case"download":l===!0?e.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,l):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(s,l):e.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(s):e.setAttribute(s,l);break;case"popover":_e("beforetoggle",e),_e("toggle",e),Cr(e,"popover",l);break;case"xlinkActuate":Sn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Sn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Sn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Sn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Sn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Sn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Cr(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=J0.get(s)||s,Cr(e,s,l))}}function Hc(e,n,s,l,u,f){switch(s){case"style":nh(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(s=l.__html,s!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=s}}break;case"children":typeof l=="string"?ms(e,l):(typeof l=="number"||typeof l=="bigint")&&ms(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=_n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fd.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(u=s.endsWith("Capture"),n=s.slice(2,u?s.length-7:void 0),f=e[wt]||null,f=f!=null?f[s]:null,typeof f=="function"&&e.removeEventListener(n,f,u),typeof l=="function")){typeof f!="function"&&f!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(n,l,u);break e}s in e?e[s]=l:l===!0?e.setAttribute(s,""):Cr(e,s,l)}}}function mt(e,n,s){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 s)if(s.hasOwnProperty(f)){var y=s[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,s,null)}}u&&ke(e,n,"srcSet",s.srcSet,s,null),l&&ke(e,n,"src",s.src,s,null);return;case"input":_e("invalid",e);var _=f=y=u=null,E=null,D=null;for(l in s)if(s.hasOwnProperty(l)){var $=s[l];if($!=null)switch(l){case"name":u=$;break;case"type":y=$;break;case"checked":E=$;break;case"defaultChecked":D=$;break;case"value":f=$;break;case"defaultValue":_=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(r(137,n));break;default:ke(e,n,l,$,s,null)}}Id(e,f,_,E,D,y,u,!1);return;case"select":_e("invalid",e),l=y=f=null;for(u in s)if(s.hasOwnProperty(u)&&(_=s[u],_!=null))switch(u){case"value":f=_;break;case"defaultValue":y=_;break;case"multiple":l=_;default:ke(e,n,u,_,s,null)}n=f,s=y,e.multiple=!!l,n!=null?hs(e,!!l,n,!1):s!=null&&hs(e,!!l,s,!0);return;case"textarea":_e("invalid",e),f=u=l=null;for(y in s)if(s.hasOwnProperty(y)&&(_=s[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,_,s,null)}eh(e,l,u,f);return;case"option":for(E in s)s.hasOwnProperty(E)&&(l=s[E],l!=null)&&(E==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":ke(e,n,E,l,s,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<Pi.length;l++)_e(Pi[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(D in s)if(s.hasOwnProperty(D)&&(l=s[D],l!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ke(e,n,D,l,s,null)}return;default:if(nu(n)){for($ in s)s.hasOwnProperty($)&&(l=s[$],l!==void 0&&Hc(e,n,$,l,s,void 0));return}}for(_ in s)s.hasOwnProperty(_)&&(l=s[_],l!=null&&ke(e,n,_,l,s,null))}function OS(e,n,s,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,E=null,D=null,$=null;for(Z in s){var Y=s[Z];if(s.hasOwnProperty(Z)&&Y!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":E=Y;default:l.hasOwnProperty(Z)||ke(e,n,Z,null,l,Y)}}for(var k in l){var Z=l[k];if(Y=s[k],l.hasOwnProperty(k)&&(Z!=null||Y!=null))switch(k){case"type":f=Z;break;case"name":u=Z;break;case"checked":D=Z;break;case"defaultChecked":$=Z;break;case"value":y=Z;break;case"defaultValue":_=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,n));break;default:Z!==Y&&ke(e,n,k,Z,l,Y)}}eu(e,y,_,E,D,$,f,u);return;case"select":Z=y=_=k=null;for(f in s)if(E=s[f],s.hasOwnProperty(f)&&E!=null)switch(f){case"value":break;case"multiple":Z=E;default:l.hasOwnProperty(f)||ke(e,n,f,null,l,E)}for(u in l)if(f=l[u],E=s[u],l.hasOwnProperty(u)&&(f!=null||E!=null))switch(u){case"value":k=f;break;case"defaultValue":_=f;break;case"multiple":y=f;default:f!==E&&ke(e,n,u,f,l,E)}n=_,s=y,l=Z,k!=null?hs(e,!!s,k,!1):!!l!=!!s&&(n!=null?hs(e,!!s,n,!0):hs(e,!!s,s?[]:"",!1));return;case"textarea":Z=k=null;for(_ in s)if(u=s[_],s.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=s[y],l.hasOwnProperty(y)&&(u!=null||f!=null))switch(y){case"value":k=u;break;case"defaultValue":Z=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)}Wd(e,k,Z);return;case"option":for(var ie in s)k=s[ie],s.hasOwnProperty(ie)&&k!=null&&!l.hasOwnProperty(ie)&&(ie==="selected"?e.selected=!1:ke(e,n,ie,null,l,k));for(E in l)k=l[E],Z=s[E],l.hasOwnProperty(E)&&k!==Z&&(k!=null||Z!=null)&&(E==="selected"?e.selected=k&&typeof k!="function"&&typeof k!="symbol":ke(e,n,E,k,l,Z));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 de in s)k=s[de],s.hasOwnProperty(de)&&k!=null&&!l.hasOwnProperty(de)&&ke(e,n,de,null,l,k);for(D in l)if(k=l[D],Z=s[D],l.hasOwnProperty(D)&&k!==Z&&(k!=null||Z!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,n));break;default:ke(e,n,D,k,l,Z)}return;default:if(nu(n)){for(var Ue in s)k=s[Ue],s.hasOwnProperty(Ue)&&k!==void 0&&!l.hasOwnProperty(Ue)&&Hc(e,n,Ue,void 0,l,k);for($ in l)k=l[$],Z=s[$],!l.hasOwnProperty($)||k===Z||k===void 0&&Z===void 0||Hc(e,n,$,k,l,Z);return}}for(var T in s)k=s[T],s.hasOwnProperty(T)&&k!=null&&!l.hasOwnProperty(T)&&ke(e,n,T,null,l,k);for(Y in l)k=l[Y],Z=s[Y],!l.hasOwnProperty(Y)||k===Z||k==null&&Z==null||ke(e,n,Y,k,l,Z)}function ag(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ES(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,s=performance.getEntriesByType("resource"),l=0;l<s.length;l++){var u=s[l],f=u.transferSize,y=u.initiatorType,_=u.duration;if(f&&_&&ag(y)){for(y=0,_=u.responseEnd,l+=1;l<s.length;l++){var E=s[l],D=E.startTime;if(D>_)break;var $=E.transferSize,Y=E.initiatorType;$&&ag(Y)&&(E=E.responseEnd,y+=$*(E<_?1:(_-D)/(E-D)))}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,Kc=null;function Rl(e){return e.nodeType===9?e:e.ownerDocument}function sg(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 ig(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 Gc(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 Yc=null;function jS(){var e=window.event;return e&&e.type==="popstate"?e===Yc?!1:(Yc=e,!0):(Yc=null,!1)}var rg=typeof setTimeout=="function"?setTimeout:void 0,zS=typeof clearTimeout=="function"?clearTimeout:void 0,lg=typeof Promise=="function"?Promise:void 0,NS=typeof queueMicrotask=="function"?queueMicrotask:typeof lg<"u"?function(e){return lg.resolve(null).then(e).catch(TS)}:rg;function TS(e){setTimeout(function(){throw e})}function ca(e){return e==="head"}function og(e,n){var s=n,l=0;do{var u=s.nextSibling;if(e.removeChild(s),u&&u.nodeType===8)if(s=u.data,s==="/$"||s==="/&"){if(l===0){e.removeChild(u),Gs(n);return}l--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")l++;else if(s==="html")Ji(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Ji(s);for(var f=s.firstChild;f;){var y=f.nextSibling,_=f.nodeName;f[pi]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=y}}else s==="body"&&Ji(e.ownerDocument.body);s=u}while(s);Gs(n)}function ug(e,n){var s=e;e=0;do{var l=s.nextSibling;if(s.nodeType===1?n?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(n?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),l&&l.nodeType===8)if(s=l.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=l}while(s)}function Fc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var s=n;switch(n=n.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Fc(s),Io(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function RS(e,n,s,l){for(;e.nodeType===1;){var u=s;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[pi])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=Wt(e.nextSibling),e===null)break}return null}function AS(e,n,s){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Wt(e.nextSibling),e===null))return null;return e}function cg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Wt(e.nextSibling),e===null))return null;return e}function Vc(e){return e.data==="$?"||e.data==="$~"}function Pc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function CS(e,n){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||s.readyState!=="loading")n();else{var l=function(){n(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Wt(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 Xc=null;function fg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(n===0)return Wt(e.nextSibling);n--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||n++}e=e.nextSibling}return null}function dg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(n===0)return e;n--}else s!=="/$"&&s!=="/&"||n++}e=e.previousSibling}return null}function hg(e,n,s){switch(n=Rl(s),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 Ji(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Io(e)}var en=new Map,mg=new Set;function Al(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Zn=I.d;I.d={f:MS,r:DS,D:kS,C:US,L:LS,m:ZS,X:BS,S:qS,M:$S};function MS(){var e=Zn.f(),n=_l();return e||n}function DS(e){var n=cs(e);n!==null&&n.tag===5&&n.type==="form"?Am(n):Zn.r(e)}var Hs=typeof document>"u"?null:document;function pg(e,n,s){var l=Hs;if(l&&typeof n=="string"&&n){var u=Yt(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof s=="string"&&(u+='[crossorigin="'+s+'"]'),mg.has(u)||(mg.add(u),e={rel:e,crossOrigin:s,href:n},l.querySelector(u)===null&&(n=l.createElement("link"),mt(n,"link",e),lt(n),l.head.appendChild(n)))}}function kS(e){Zn.D(e),pg("dns-prefetch",e,null)}function US(e,n){Zn.C(e,n),pg("preconnect",e,n)}function LS(e,n,s){Zn.L(e,n,s);var l=Hs;if(l&&e&&n){var u='link[rel="preload"][as="'+Yt(n)+'"]';n==="image"&&s&&s.imageSrcSet?(u+='[imagesrcset="'+Yt(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(u+='[imagesizes="'+Yt(s.imageSizes)+'"]')):u+='[href="'+Yt(e)+'"]';var f=u;switch(n){case"style":f=Qs(e);break;case"script":f=Ks(e)}en.has(f)||(e=v({rel:"preload",href:n==="image"&&s&&s.imageSrcSet?void 0:e,as:n},s),en.set(f,e),l.querySelector(u)!==null||n==="style"&&l.querySelector(Ii(f))||n==="script"&&l.querySelector(Wi(f))||(n=l.createElement("link"),mt(n,"link",e),lt(n),l.head.appendChild(n)))}}function ZS(e,n){Zn.m(e,n);var s=Hs;if(s&&e){var l=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Yt(l)+'"][href="'+Yt(e)+'"]',f=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ks(e)}if(!en.has(f)&&(e=v({rel:"modulepreload",href:e},n),en.set(f,e),s.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Wi(f)))return}l=s.createElement("link"),mt(l,"link",e),lt(l),s.head.appendChild(l)}}}function qS(e,n,s){Zn.S(e,n,s);var l=Hs;if(l&&e){var u=fs(l).hoistableStyles,f=Qs(e);n=n||"default";var y=u.get(f);if(!y){var _={loading:0,preload:null};if(y=l.querySelector(Ii(f)))_.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},s),(s=en.get(f))&&Jc(e,s);var E=y=l.createElement("link");lt(E),mt(E,"link",e),E._p=new Promise(function(D,$){E.onload=D,E.onerror=$}),E.addEventListener("load",function(){_.loading|=1}),E.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Cl(y,n,l)}y={type:"stylesheet",instance:y,count:1,state:_},u.set(f,y)}}}function BS(e,n){Zn.X(e,n);var s=Hs;if(s&&e){var l=fs(s).hoistableScripts,u=Ks(e),f=l.get(u);f||(f=s.querySelector(Wi(u)),f||(e=v({src:e,async:!0},n),(n=en.get(u))&&Ic(e,n),f=s.createElement("script"),lt(f),mt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function $S(e,n){Zn.M(e,n);var s=Hs;if(s&&e){var l=fs(s).hoistableScripts,u=Ks(e),f=l.get(u);f||(f=s.querySelector(Wi(u)),f||(e=v({src:e,async:!0,type:"module"},n),(n=en.get(u))&&Ic(e,n),f=s.createElement("script"),lt(f),mt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function gg(e,n,s,l){var u=(u=xe.current)?Al(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(n=Qs(s.href),s=fs(u).hoistableStyles,l=s.get(n),l||(l={type:"style",instance:null,count:0,state:null},s.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=Qs(s.href);var f=fs(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(Ii(e)))&&!f._p&&(y.instance=f,y.state.loading=5),en.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},en.set(e,s),f||HS(u,e,s,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=s.async,s=s.src,typeof s=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Ks(s),s=fs(u).hoistableScripts,l=s.get(n),l||(l={type:"script",instance:null,count:0,state:null},s.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Qs(e){return'href="'+Yt(e)+'"'}function Ii(e){return'link[rel="stylesheet"]['+e+"]"}function yg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function HS(e,n,s,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",s),lt(n),e.head.appendChild(n))}function Ks(e){return'[src="'+Yt(e)+'"]'}function Wi(e){return"script[async]"+e}function vg(e,n,s){if(n.count++,n.instance===null)switch(n.type){case"style":var l=e.querySelector('style[data-href~="'+Yt(s.href)+'"]');if(l)return n.instance=l,lt(l),l;var u=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),lt(l),mt(l,"style",u),Cl(l,s.precedence,e),n.instance=l;case"stylesheet":u=Qs(s.href);var f=e.querySelector(Ii(u));if(f)return n.state.loading|=4,n.instance=f,lt(f),f;l=yg(s),(u=en.get(u))&&Jc(l,u),f=(e.ownerDocument||e).createElement("link"),lt(f);var y=f;return y._p=new Promise(function(_,E){y.onload=_,y.onerror=E}),mt(f,"link",l),n.state.loading|=4,Cl(f,s.precedence,e),n.instance=f;case"script":return f=Ks(s.src),(u=e.querySelector(Wi(f)))?(n.instance=u,lt(u),u):(l=s,(u=en.get(f))&&(l=v({},s),Ic(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),lt(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,Cl(l,s.precedence,e));return n.instance}function Cl(e,n,s){for(var l=s.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=s.nodeType===9?s.head:s,n.insertBefore(e,n.firstChild))}function Jc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Ic(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Ml=null;function bg(e,n,s){if(Ml===null){var l=new Map,u=Ml=new Map;u.set(s,l)}else u=Ml,l=u.get(s),l||(l=new Map,u.set(s,l));if(l.has(e))return l;for(l.set(e,null),s=s.getElementsByTagName(e),u=0;u<s.length;u++){var f=s[u];if(!(f[pi]||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 xg(e,n,s){e=e.ownerDocument||e,e.head.insertBefore(s,n==="title"?e.querySelector("head > title"):null)}function QS(e,n,s){if(s===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 Sg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function KS(e,n,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var u=Qs(l.href),f=n.querySelector(Ii(u));if(f){n=f._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Dl.bind(e),n.then(e,e)),s.state.loading|=4,s.instance=f,lt(f);return}f=n.ownerDocument||n,l=yg(l),(u=en.get(u))&&Jc(l,u),f=f.createElement("link"),lt(f);var y=f;y._p=new Promise(function(_,E){y.onload=_,y.onerror=E}),mt(f,"link",l),s.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,n),(n=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=Dl.bind(e),n.addEventListener("load",s),n.addEventListener("error",s))}}var Wc=0;function GS(e,n){return e.stylesheets&&e.count===0&&Ul(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var l=setTimeout(function(){if(e.stylesheets&&Ul(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+n);0<e.imgBytes&&Wc===0&&(Wc=62500*ES());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ul(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Wc?50:800)+n);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(u)}}:null}function Dl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ul(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var kl=null;function Ul(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,kl=new Map,n.forEach(YS,e),kl=null,Dl.call(e))}function YS(e,n){if(!(n.state.loading&4)){var s=kl.get(e);if(s)var l=s.get(null);else{s=new Map,kl.set(e,s);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")&&(s.set(y.dataset.precedence,y),l=y)}l&&s.set(null,l)}u=n.instance,y=u.getAttribute("data-precedence"),f=s.get(y)||l,f===l&&s.set(null,u),s.set(y,u),this.count++,l=Dl.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 er={$$typeof:Q,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function FS(e,n,s,l,u,f,y,_,E){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=Vo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vo(0),this.hiddenUpdates=Vo(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function _g(e,n,s,l,u,f,y,_,E,D,$,Y){return e=new FS(e,n,s,y,E,D,$,Y,_),n=1,f===!0&&(n|=24),f=Ut(3,null,null,n),e.current=f,f.stateNode=e,n=Cu(),n.refCount++,e.pooledCache=n,n.refCount++,f.memoizedState={element:l,isDehydrated:s,cache:n},Uu(f),e}function wg(e){return e?(e=Ss,e):Ss}function Og(e,n,s,l,u,f){u=wg(u),l.context===null?l.context=u:l.pendingContext=u,l=Wn(n),l.payload={element:s},f=f===void 0?null:f,f!==null&&(l.callback=f),s=ea(e,l,n),s!==null&&(Tt(s,e,n),Ci(s,e,n))}function Eg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<n?s:n}}function ef(e,n){Eg(e,n),(e=e.alternate)&&Eg(e,n)}function jg(e){if(e.tag===13||e.tag===31){var n=La(e,67108864);n!==null&&Tt(n,e,67108864),ef(e,67108864)}}function zg(e){if(e.tag===13||e.tag===31){var n=$t();n=Po(n);var s=La(e,n);s!==null&&Tt(s,e,n),ef(e,n)}}var Ll=!0;function VS(e,n,s,l){var u=M.T;M.T=null;var f=I.p;try{I.p=2,tf(e,n,s,l)}finally{I.p=f,M.T=u}}function PS(e,n,s,l){var u=M.T;M.T=null;var f=I.p;try{I.p=8,tf(e,n,s,l)}finally{I.p=f,M.T=u}}function tf(e,n,s,l){if(Ll){var u=nf(l);if(u===null)$c(e,n,l,Zl,s),Tg(e,l);else if(JS(u,e,n,s,l))l.stopPropagation();else if(Tg(e,l),n&4&&-1<XS.indexOf(e)){for(;u!==null;){var f=cs(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=Ca(f.pendingLanes);if(y!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;y;){var E=1<<31-Dt(y);_.entanglements[1]|=E,y&=~E}mn(f),(Te&6)===0&&(xl=Ct()+500,Vi(0))}}break;case 31:case 13:_=La(f,2),_!==null&&Tt(_,f,2),_l(),ef(f,2)}if(f=nf(l),f===null&&$c(e,n,l,Zl,s),f===u)break;u=f}u!==null&&l.stopPropagation()}else $c(e,n,l,null,s)}}function nf(e){return e=su(e),af(e)}var Zl=null;function af(e){if(Zl=null,e=us(e),e!==null){var n=c(e);if(n===null)e=null;else{var s=n.tag;if(s===13){if(e=d(n),e!==null)return e;e=null}else if(s===31){if(e=h(n),e!==null)return e;e=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Zl=e,null}function Ng(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(k0()){case Ud:return 2;case Ld:return 8;case zr:case U0:return 32;case Zd:return 268435456;default:return 32}default:return 32}}var sf=!1,fa=null,da=null,ha=null,tr=new Map,nr=new Map,ma=[],XS="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 Tg(e,n){switch(e){case"focusin":case"focusout":fa=null;break;case"dragenter":case"dragleave":da=null;break;case"mouseover":case"mouseout":ha=null;break;case"pointerover":case"pointerout":tr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":nr.delete(n.pointerId)}}function ar(e,n,s,l,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:s,eventSystemFlags:l,nativeEvent:f,targetContainers:[u]},n!==null&&(n=cs(n),n!==null&&jg(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function JS(e,n,s,l,u){switch(n){case"focusin":return fa=ar(fa,e,n,s,l,u),!0;case"dragenter":return da=ar(da,e,n,s,l,u),!0;case"mouseover":return ha=ar(ha,e,n,s,l,u),!0;case"pointerover":var f=u.pointerId;return tr.set(f,ar(tr.get(f)||null,e,n,s,l,u)),!0;case"gotpointercapture":return f=u.pointerId,nr.set(f,ar(nr.get(f)||null,e,n,s,l,u)),!0}return!1}function Rg(e){var n=us(e.target);if(n!==null){var s=c(n);if(s!==null){if(n=s.tag,n===13){if(n=d(s),n!==null){e.blockedOn=n,Kd(e.priority,function(){zg(s)});return}}else if(n===31){if(n=h(s),n!==null){e.blockedOn=n,Kd(e.priority,function(){zg(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ql(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var s=nf(e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);au=l,s.target.dispatchEvent(l),au=null}else return n=cs(s),n!==null&&jg(n),e.blockedOn=s,!1;n.shift()}return!0}function Ag(e,n,s){ql(e)&&s.delete(n)}function IS(){sf=!1,fa!==null&&ql(fa)&&(fa=null),da!==null&&ql(da)&&(da=null),ha!==null&&ql(ha)&&(ha=null),tr.forEach(Ag),nr.forEach(Ag)}function Bl(e,n){e.blockedOn===n&&(e.blockedOn=null,sf||(sf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,IS)))}var $l=null;function Cg(e){$l!==e&&($l=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){$l===e&&($l=null);for(var n=0;n<e.length;n+=3){var s=e[n],l=e[n+1],u=e[n+2];if(typeof l!="function"){if(af(l||s)===null)continue;break}var f=cs(s);f!==null&&(e.splice(n,3),n-=3,nc(f,{pending:!0,data:u,method:s.method,action:l},l,u))}}))}function Gs(e){function n(E){return Bl(E,e)}fa!==null&&Bl(fa,e),da!==null&&Bl(da,e),ha!==null&&Bl(ha,e),tr.forEach(n),nr.forEach(n);for(var s=0;s<ma.length;s++){var l=ma[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ma.length&&(s=ma[0],s.blockedOn===null);)Rg(s),s.blockedOn===null&&ma.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var u=s[l],f=s[l+1],y=u[wt]||null;if(typeof f=="function")y||Cg(s);else if(y){var _=null;if(f&&f.hasAttribute("formAction")){if(u=f,y=f[wt]||null)_=y.formAction;else if(af(u)!==null)continue}else _=y.action;typeof _=="function"?s[l+1]=_:(s.splice(l,3),l-=3),Cg(s)}}}function Mg(){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(s,20)}function s(){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(s,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),u!==null&&(u(),u=null)}}}function rf(e){this._internalRoot=e}Hl.prototype.render=rf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var s=n.current,l=$t();Og(s,l,e,n,null,null)},Hl.prototype.unmount=rf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Og(e.current,2,null,e,null,null),_l(),n[os]=null}};function Hl(e){this._internalRoot=e}Hl.prototype.unstable_scheduleHydration=function(e){if(e){var n=Qd();e={blockedOn:null,target:e,priority:n};for(var s=0;s<ma.length&&n!==0&&n<ma[s].priority;s++);ma.splice(s,0,e),s===0&&Rg(e)}};var Dg=a.version;if(Dg!=="19.2.8")throw Error(r(527,Dg,"19.2.8"));I.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 WS={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ql=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ql.isDisabled&&Ql.supportsFiber)try{di=Ql.inject(WS),Mt=Ql}catch{}}return ir.createRoot=function(e,n){if(!o(e))throw Error(r(299));var s=!1,l="",u=$m,f=Hm,y=Qm;return n!=null&&(n.unstable_strictMode===!0&&(s=!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=_g(e,1,!1,null,null,s,l,null,u,f,y,Mg),e[os]=n.current,Bc(e),new rf(n)},ir.hydrateRoot=function(e,n,s){if(!o(e))throw Error(r(299));var l=!1,u="",f=$m,y=Hm,_=Qm,E=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(_=s.onRecoverableError),s.formState!==void 0&&(E=s.formState)),n=_g(e,1,!0,n,s??null,l,u,E,f,y,_,Mg),n.context=wg(null),s=n.current,l=$t(),l=Po(l),u=Wn(l),u.callback=null,ea(s,u,l),s=l,n.current.lanes=s,mi(n,s),mn(n),e[os]=n.current,Bc(e),new Hl(n)},ir.version="19.2.8",ir}var Kg;function u_(){if(Kg)return uf.exports;Kg=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(a){console.error(a)}}return t(),uf.exports=o_(),uf.exports}var c_=u_();const jv=W.createContext(void 0),as=t=>{const a=W.useContext(jv);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},f_=({client:t,children:a})=>(W.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),g.jsx(jv.Provider,{value:t,children:a})),d_={setTimeout:(t,a)=>setTimeout(t,a),clearTimeout:t=>clearTimeout(t),setInterval:(t,a)=>setInterval(t,a),clearInterval:t=>clearInterval(t)};var h_=class{#e=d_;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,a){return this.#e.setTimeout(t,a)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,a){return this.#e.setInterval(t,a)}clearInterval(t){this.#e.clearInterval(t)}};const Xa=new h_;function m_(t){setTimeout(t,0)}const p_=typeof window>"u"||"Deno"in globalThis;function St(){}function g_(t,a){return typeof t=="function"?t(a):t}function Mf(t){return typeof t=="number"&&t>=0&&t!==1/0}function zv(t,a){return Math.max(t+(a||0)-Date.now(),0)}function $n(t,a){return typeof t=="function"?t(a):t}function Ht(t,a){return typeof t=="function"?t(a):t}function Gg(t,a){const{type:i="all",exact:r,fetchStatus:o,predicate:c,queryKey:d,stale:h}=t;if(d){if(r){if(a.queryHash!==ad(d,a.options))return!1}else if(!ei(a.queryKey,d))return!1}if(i!=="all"){const m=a.isActive();if(i==="active"&&!m||i==="inactive"&&m)return!1}return!(typeof h=="boolean"&&a.isStale()!==h||o&&o!==a.state.fetchStatus||c&&!c(a))}function Yg(t,a){const{exact:i,status:r,predicate:o,mutationKey:c}=t;if(c){if(!a.options.mutationKey)return!1;if(i){if(es(a.options.mutationKey)!==es(c))return!1}else if(!ei(a.options.mutationKey,c))return!1}return!(r&&a.state.status!==r||o&&!o(a))}function ad(t,a){return(a?.queryKeyHashFn||es)(t)}function es(t){return JSON.stringify(t,(a,i)=>Df(i)?Object.keys(i).sort().reduce((r,o)=>(r[o]=i[o],r),{}):i)}function ei(t,a){if(t===a)return!0;if(typeof t!=typeof a)return!1;if(t&&a&&typeof t=="object"&&typeof a=="object"){if(Array.isArray(t)&&Array.isArray(a)){for(let r=0;r<a.length;r++)if(!ei(t[r],a[r]))return!1;return!0}const i=Object.keys(a);for(const r of i)if(!ei(t[r],a[r]))return!1;return!0}return!1}const y_=Object.prototype.hasOwnProperty;function Nv(t,a,i=0){if(t===a)return t;if(i>500)return a;const r=Fg(t)&&Fg(a);if(!r&&!(Df(t)&&Df(a)))return a;const o=(r?t:Object.keys(t)).length,c=r?a:Object.keys(a),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=a[b];if(v===x){h[b]=v,(r?p<o:y_.call(t,b))&&m++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){h[b]=x;continue}const S=Nv(v,x,i+1);h[b]=S,S===v&&m++}return o===d&&m===o?t:h}function ho(t,a){if(!a||Object.keys(t).length!==Object.keys(a).length)return!1;for(const i in t)if(t[i]!==a[i])return!1;return!0}function Fg(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Df(t){if(!Vg(t))return!1;const a=t.constructor;if(a===void 0)return!0;const i=a.prototype;return!(!Vg(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Vg(t){return Object.prototype.toString.call(t)==="[object Object]"}function v_(t){return new Promise(a=>{Xa.setTimeout(a,t)})}function kf(t,a,i){return typeof i.structuralSharing=="function"?i.structuralSharing(t,a):i.structuralSharing!==!1?Nv(t,a):a}function b_(t,a,i=0){const r=[...t,a];return i&&r.length>i?r.slice(1):r}function x_(t,a,i=0){const r=[a,...t];return i&&r.length>i?r.slice(0,-1):r}const sd=Symbol();function Tv(t,a){return!t.queryFn&&a?.initialPromise?()=>a.initialPromise:!t.queryFn||t.queryFn===sd?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function id(t,a){return typeof t=="function"?t(...a):!!t}function S_(t,a,i){let r=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=a(),r||(r=!0,o.aborted?i():o.addEventListener("abort",i,{once:!0})),o)}),t}const mo=(()=>{let t=()=>p_;return{isServer(){return t()},setIsServer(a){t=a}}})();var li=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(){}},__=class extends li{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const a=()=>t();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}}}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(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(a=>{a(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const rd=new __,w_=m_;function O_(){let t=[],a=0,i=h=>{h()},r=h=>{h()},o=w_;const c=h=>{a?t.push(h):o(()=>{i(h)})},d=()=>{const h=t;t=[],h.length&&o(()=>{r(()=>{h.forEach(m=>{i(m)})})})};return{batch:h=>{let m;a++;try{m=h()}finally{a--,a||d()}return m},batchCalls:h=>(...m)=>{c(()=>{h(...m)})},schedule:c,setNotifyFunction:h=>{i=h},setBatchNotifyFunction:h=>{r=h},setScheduler:h=>{o=h}}}const rt=O_();var E_=class extends li{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const a=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",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(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(a=>{a(t)}))}isOnline(){return this.#e}};const po=new E_;function j_(t){return Math.min(1e3*2**t,3e4)}function Rv(t){return(t??"online")==="online"?po.isOnline():!0}var Uf=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Av(t){let a=!1,i=0,r,o="pending",c,d;const h=new Promise((U,Q)=>{c=U,d=Q});h.catch(St);const m=()=>o!=="pending",p=U=>{if(!m()){const Q=new Uf(U);O(Q),t.onCancel?.(Q)}},b=()=>{a=!0},v=()=>{a=!1},x=()=>rd.isFocused()&&(t.networkMode==="always"||po.isOnline())&&t.canRun(),S=()=>Rv(t.networkMode)&&t.canRun(),w=U=>{m()||(r?.(),o="resolved",c(U))},O=U=>{m()||(r?.(),o="rejected",d(U))},z=()=>new Promise(U=>{r=Q=>{(m()||x())&&U(Q)},t.onPause?.()}).then(()=>{r=void 0,m()||t.onContinue?.()}),R=()=>{if(m())return;let U;const Q=i===0?t.initialPromise:void 0;try{U=Q??t.fn()}catch(V){U=Promise.reject(V)}Promise.resolve(U).then(w).catch(V=>{if(m())return;const J=t.retry??(mo.isServer()?0:3),L=t.retryDelay??j_,A=typeof L=="function"?L(i,V):L,X=J===!0||typeof J=="number"&&i<J||typeof J=="function"&&J(i,V);if(a||!X){O(V);return}i++,t.onFail?.(i,V),v_(A).then(()=>x()?void 0:z()).then(()=>{a?O(V):R()})})};return{promise:h,status:()=>o,cancel:p,continue:()=>(r?.(),h),cancelRetry:b,continueRetry:v,canStart:S,start:()=>(S()?R():z().then(R),h)}}var Cv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Mf(this.gcTime)&&(this.#e=Xa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(mo.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Xa.clearTimeout(this.#e),this.#e=void 0)}};function z_(t){return{onFetch:(a,i)=>{const r=a.options,o=a.fetchOptions?.meta?.fetchMore?.direction,c=a.state.data?.pages||[],d=a.state.data?.pageParams||[];let h={pages:[],pageParams:[]},m=0;const p=async()=>{let b=!1;const v=w=>{S_(w,()=>a.signal,()=>b=!0)},x=Tv(a.options,a.fetchOptions),S=async(w,O,z)=>{if(b)return Promise.reject(a.signal.reason);if(O==null&&w.pages.length)return Promise.resolve(w);const U=(()=>{const L={client:a.client,queryKey:a.queryKey,pageParam:O,direction:z?"backward":"forward",meta:a.options.meta};return v(L),L})(),Q=await x(U),{maxPages:V}=a.options,J=z?x_:b_;return{pages:J(w.pages,Q,V),pageParams:J(w.pageParams,O,V)}};if(o&&c.length){const w=o==="backward",O=w?N_:Pg,z={pages:c,pageParams:d};h=await S(z,O(r,z),w)}else{const w=t??c.length;do{const O=m===0?d[0]??r.initialPageParam:Pg(r,h);if(m>0&&O==null)break;h=await S(h,O),m++}while(m<w)}return h};a.options.persister?a.fetchFn=()=>a.options.persister?.(p,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},i):a.fetchFn=p}}}function Pg(t,{pages:a,pageParams:i}){const r=a.length-1;return a.length>0?t.getNextPageParam(a[r],a,i[r],i):void 0}function N_(t,{pages:a,pageParams:i}){return a.length>0?t.getPreviousPageParam?.(a[0],a,i[0],i):void 0}var T_=class extends Cv{#e;#t;#n;#a;#i;#s;#r;#o;constructor(t){super(),this.#o=!1,this.#r=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#a=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Jg(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.#s?.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 a=Jg(this.options);a.data!==void 0&&(this.setState(Xg(a.data,a.dataUpdatedAt)),this.#t=a)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(t,a){const i=kf(this.state.data,t,this.options);return this.#l({data:i,type:"success",dataUpdatedAt:a?.updatedAt,manual:a?.manual}),i}setState(t){this.#l({type:"setState",state:t})}cancel(t){const a=this.#s?.promise;return this.#s?.cancel(t),a?a.then(St).catch(St):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=>Ht(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sd||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>$n(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:!zv(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const a=this.observers.indexOf(t);a!==-1&&(this.observers.splice(a,1),this.observers.length||(this.#s&&(this.#o||this.#u()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#a.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,a){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&a?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const i=new AbortController,r=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#o=!0,i.signal)})},o=()=>{const m=Tv(this.options,a),b=(()=>{const v={client:this.#i,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:a,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return r(m),m})();(this.#e==="infinite"?z_(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.#s=Av({initialPromise:a?.initialPromise,fn:d.fetchFn,onCancel:m=>{m instanceof Uf&&m.revert&&this.setState({...this.#n,fetchStatus:"idle"}),i.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.#a.config.onSuccess?.(m,this),this.#a.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Uf){if(m.silent)return this.#s.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#l({type:"error",error:m}),this.#a.config.onError?.(m,this),this.#a.config.onSettled?.(this.state.data,m,this),m}finally{this.#s===h&&(this.#s=void 0),this.scheduleGc()}}#l(t){const a=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Mv(i.data,this.options),fetchMeta:t.meta??null};case"success":const r={...i,...Xg(t.data,t.dataUpdatedAt),dataUpdateCount:i.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{...i,error:o,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=a(this.state),rt.batch(()=>{this.observers.slice().forEach(i=>{i.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:t})})}};function Mv(t,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Rv(a.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Xg(t,a){return{data:t,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Jg(t){const a=typeof t.initialData=="function"?t.initialData():t.initialData,i=a!==void 0,r=i?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var R_=class extends li{#e;#t=void 0;#n=void 0;#a=void 0;#i;#s;#r;#o;#u;#l;#f;#d;#c;#m=new Set;constructor(t,a){super(),this.options=a,this.#e=t,this.#r=null,this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ig(this.#t,this.options)?this.#h():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Lf(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Lf(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(t){const a=this.options,i=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 Ht(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),a._defaulted&&!ho(this.options,a)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Wg(this.#t,i,this.options,a)&&this.#h(),this.updateResult(),r&&(this.#t!==i||Ht(this.options.enabled,this.#t)!==Ht(a.enabled,this.#t)||$n(this.options.staleTime,this.#t)!==$n(a.staleTime,this.#t))&&this.#p();const o=this.#g();r&&(this.#t!==i||Ht(this.options.enabled,this.#t)!==Ht(a.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(t){const a=this.#e.getQueryCache().build(this.#e,t),i=this.createResult(a,t);return C_(this,i)&&(this.#a=i,this.#s=this.options,this.#i=this.#t.state),i}getCurrentResult(){return this.#a}trackResult(t,a){return new Proxy(t,{get:(i,r)=>(this.trackProp(r),a?.(r),Reflect.get(i,r))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const a=this.#e.defaultQueryOptions(t),i=this.#e.getQueryCache().build(this.#e,a);let r=()=>{},o;const c=new Promise(d=>{o=d,r=this.#e.getQueryCache().subscribe(h=>{h.type==="updated"&&h.query.queryHash===i.queryHash&&i.state.data!==void 0&&(r(),d(this.createResult(i,a)))})});return Promise.race([i.fetch().then(()=>{const d=this.createResult(i,a);return o?.(d),d}).finally(()=>{r()}),c])}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#h(t){this.#S();let a=this.#t.fetch(this.options,t);return t?.throwOnError||(a=a.catch(St)),a}#p(){this.#b();const t=$n(this.options.staleTime,this.#t);if(mo.isServer()||this.#a.isStale||!Mf(t))return;const a=zv(this.#a.dataUpdatedAt,t)+1;this.#f=Xa.setTimeout(()=>{this.#a.isStale||this.updateResult()},a)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#x(),this.#c=t,!(mo.isServer()||Ht(this.options.enabled,this.#t)===!1||!Mf(this.#c)||this.#c===0)&&(this.#d=Xa.setInterval(()=>{(this.options.refetchIntervalInBackground||rd.isFocused())&&this.#h()},this.#c))}#v(){this.#p(),this.#y(this.#g())}#b(){this.#f!==void 0&&(Xa.clearTimeout(this.#f),this.#f=void 0)}#x(){this.#d!==void 0&&(Xa.clearInterval(this.#d),this.#d=void 0)}createResult(t,a){const i=this.#t,r=this.options,o=this.#a,c=this.#i,d=this.#s,h=t!==i?t.state:this.#n,{state:m}=t;let p={...m},b=!1,v;if(a._optimisticResults){const J=this.hasListeners(),L=!J&&Ig(t,a),A=J&&Wg(t,i,a,r);(L||A)&&(p={...p,...Mv(m.data,t.options)}),a._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:w}=p;v=p.data;let O=!1;if(a.placeholderData!==void 0&&v===void 0&&w==="pending"){let J;o?.isPlaceholderData&&a.placeholderData===d?.placeholderData?(J=o.data,O=!0):J=typeof a.placeholderData=="function"?a.placeholderData(this.#l?.state.data,this.#l):a.placeholderData,J!==void 0&&(w="success",v=kf(o?.data,J,a),b=!0)}if(a.select&&v!==void 0&&!O)if(o&&v===c?.data&&a.select===this.#o)v=this.#u;else try{this.#o=a.select,v=a.select(v),v=kf(o?.data,v,a),this.#u=v,this.#r=null}catch(J){this.#r=J}else v===void 0&&(this.#r=null);this.#r&&(x=this.#r,v=this.#u,S=Date.now(),w="error",b=!1);const z=p.fetchStatus==="fetching",R=w==="pending",U=w==="error",Q=R&&z,V=v!==void 0;return{status:w,fetchStatus:p.fetchStatus,isPending:R,isSuccess:w==="success",isError:U,isInitialLoading:Q,isLoading:Q,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:z,isRefetching:z&&!R,isLoadingError:U&&!V,isPaused:p.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:U&&V,isStale:ld(t,a),refetch:this.refetch,isEnabled:Ht(a.enabled,t)!==!1}}updateResult(){const t=this.#a,a=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#s=this.options,this.#i.data!==void 0&&(this.#l=this.#t),ho(a,t))return;this.#a=a;const i=()=>{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.#a).some(d=>{const h=d;return this.#a[h]!==t[h]&&c.has(h)})};this.#_({listeners:i()})}#S(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const a=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(a?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#_(t){rt.batch(()=>{t.listeners&&this.listeners.forEach(a=>{a(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function A_(t,a){return Ht(a.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&Ht(a.retryOnMount,t)===!1)}function Ig(t,a){return A_(t,a)||t.state.data!==void 0&&Lf(t,a,a.refetchOnMount)}function Lf(t,a,i){if(Ht(a.enabled,t)!==!1&&$n(a.staleTime,t)!=="static"){const r=typeof i=="function"?i(t):i;return r==="always"||r!==!1&&ld(t,a)}return!1}function Wg(t,a,i,r){return(t!==a||Ht(r.enabled,t)===!1)&&(!i.suspense||t.state.status!=="error")&&ld(t,i)}function ld(t,a){return Ht(a.enabled,t)!==!1&&t.isStaleByTime($n(a.staleTime,t))}function C_(t,a){return!ho(t.getCurrentResult(),a)}var M_=class extends Cv{#e;#t;#n;#a;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||Dv(),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(a=>a!==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.#a?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){const a=()=>{this.#i({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#a=Av({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(d,h)=>{this.#i({type:"failed",failureCount:d,error:h})},onPause:()=>{this.#i({type:"pause"})},onContinue:a,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)a();else{this.#i({type:"pending",variables:t,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,i);const h=await this.options.onMutate?.(t,i);h!==this.state.context&&this.#i({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,i),await this.options.onSuccess?.(d,t,this.state.context,i),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(d,null,t,this.state.context,i),this.#i({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,t,this.state.context,this,i)}catch(h){Promise.reject(h)}try{await this.options.onError?.(d,t,this.state.context,i)}catch(h){Promise.reject(h)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,i)}catch(h){Promise.reject(h)}try{await this.options.onSettled?.(void 0,d,t,this.state.context,i)}catch(h){Promise.reject(h)}throw this.#i({type:"error",error:d}),d}finally{this.#a===r&&(this.#a=void 0),this.#n.runNext(this)}}#i(t){const a=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,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{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=a(this.state),rt.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Dv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var D_=class extends li{#e;#t;#n;constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}build(t,a,i){const r=new M_({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(a),state:i});return this.add(r),r}add(t){this.#e.add(t);const a=Kl(t);if(typeof a=="string"){const i=this.#t.get(a);i?i.push(t):this.#t.set(a,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const a=Kl(t);if(typeof a=="string"){const i=this.#t.get(a);if(i)if(i.length>1){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}else i[0]===t&&this.#t.delete(a)}}this.notify({type:"removed",mutation:t})}canRun(t){const a=Kl(t);if(typeof a=="string"){const i=this.#t.get(a)?.find(r=>r.state.status==="pending");return!i||i===t}else return!0}runNext(t){const a=Kl(t);return typeof a=="string"?this.#t.get(a)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){rt.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 a={exact:!0,...t};return this.getAll().find(i=>Yg(a,i))}findAll(t={}){return this.getAll().filter(a=>Yg(t,a))}notify(t){rt.batch(()=>{this.listeners.forEach(a=>{a(t)})})}resumePausedMutations(){const t=this.getAll().filter(a=>a.state.isPaused);return rt.batch(()=>Promise.all(t.map(a=>a.continue().catch(St))))}};function Kl(t){return t.options.scope?.id}var k_=class extends li{#e;#t=void 0;#n;#a;constructor(a,i){super(),this.#e=a,this.setOptions(i),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){const i=this.options;this.options=this.#e.defaultMutationOptions(a),ho(this.options,i)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),i?.mutationKey&&this.options.mutationKey&&es(i.mutationKey)!==es(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.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(a){this.#i(),this.#s(a)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#s()}mutate(a,i){return this.#a=i,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(a)}#i(){const a=this.#n?.state??Dv();this.#t={...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset}}#s(a){rt.batch(()=>{if(this.#a&&this.hasListeners()){const i=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(a?.type==="success"){try{this.#a.onSuccess?.(a.data,i,r,o)}catch(c){Promise.reject(c)}try{this.#a.onSettled?.(a.data,null,i,r,o)}catch(c){Promise.reject(c)}}else if(a?.type==="error"){try{this.#a.onError?.(a.error,i,r,o)}catch(c){Promise.reject(c)}try{this.#a.onSettled?.(void 0,a.error,i,r,o)}catch(c){Promise.reject(c)}}}this.listeners.forEach(i=>{i(this.#t)})})}},U_=class extends li{#e;constructor(t={}){super(),this.config=t,this.#e=new Map}build(t,a,i){const r=a.queryKey,o=a.queryHash??ad(r,a);let c=this.get(o);return c||(c=new T_({client:t,queryKey:r,queryHash:o,options:t.defaultQueryOptions(a),state:i,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 a=this.#e.get(t.queryHash);a&&(t.destroy(),a===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){rt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const a={exact:!0,...t};return this.getAll().find(i=>Gg(a,i))}findAll(t={}){const a=this.getAll();return Object.keys(t).length>0?a.filter(i=>Gg(t,i)):a}notify(t){rt.batch(()=>{this.listeners.forEach(a=>{a(t)})})}onFocus(){rt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){rt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},L_=class{#e;#t;#n;#a;#i;#s;#r;#o;constructor(t={}){this.#e=t.queryCache||new U_,this.#t=t.mutationCache||new D_,this.#n=t.defaultOptions||{},this.#a=new Map,this.#i=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#r=rd.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=po.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===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 a=this.defaultQueryOptions({queryKey:t});return this.#e.get(a.queryHash)?.state.data}ensureQueryData(t){const a=this.defaultQueryOptions(t),i=this.#e.build(this,a),r=i.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&i.isStaleByTime($n(a.staleTime,i))&&this.prefetchQuery(a),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:a,state:i})=>[a,i.data])}setQueryData(t,a,i){const r=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(r.queryHash)?.state.data,c=g_(a,o);if(c!==void 0)return this.#e.build(this,r).setData(c,{...i,manual:!0})}setQueriesData(t,a,i){return rt.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,a,i)]))}getQueryState(t){const a=this.defaultQueryOptions({queryKey:t});return this.#e.get(a.queryHash)?.state}removeQueries(t){const a=this.#e;rt.batch(()=>{a.findAll(t).forEach(i=>{a.remove(i)})})}resetQueries(t,a){const i=this.#e;return rt.batch(()=>{const r=i.findAll(t),o=new Set(r);return r.forEach(c=>{c.reset()}),this.refetchQueries({type:"active",predicate:c=>o.has(c)},a)})}cancelQueries(t,a={}){const i={revert:!0,...a},r=rt.batch(()=>this.#e.findAll(t).map(o=>o.cancel(i)));return Promise.all(r).then(St).catch(St)}invalidateQueries(t,a={}){return rt.batch(()=>(this.#e.findAll(t).forEach(i=>{i.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},a)))}refetchQueries(t,a={}){const i={...a,cancelRefetch:a.cancelRefetch??!0},r=rt.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,i);return i.throwOnError||(c=c.catch(St)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(St)}async query(t){const a=this.defaultQueryOptions(t);a.retry===void 0&&(a.retry=!1);const i=this.#e.build(this,a),r=i.isStaleByTime($n(a.staleTime,i))?await i.fetch(a):i.state.data,o=a.select;return o?o(r):r}fetchQuery(t){const a=this.defaultQueryOptions(t);a.retry===void 0&&(a.retry=!1);const i=this.#e.build(this,a);return i.isStaleByTime($n(a.staleTime,i))?i.fetch(a):Promise.resolve(i.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(St).catch(St)}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(St).catch(St)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return po.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,a){this.#a.set(es(t),{queryKey:t,defaultOptions:a})}getQueryDefaults(t){const a=[...this.#a.values()],i={};return a.forEach(r=>{ei(t,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(t,a){this.#i.set(es(t),{mutationKey:t,defaultOptions:a})}getMutationDefaults(t){const a=[...this.#i.values()],i={};return a.forEach(r=>{ei(t,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(t){if(t._defaulted)return t;const a={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return a.queryHash||(a.queryHash=ad(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===sd&&(a.enabled=!1),a}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 kv=W.createContext(!1),Z_=()=>W.useContext(kv);kv.Provider;function q_(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const B_=W.createContext(q_()),$_=()=>W.useContext(B_),H_=(t,a,i)=>{const r=i?.state.error&&typeof t.throwOnError=="function"?id(t.throwOnError,[i.state.error,i]):t.throwOnError;(t.suspense||r)&&(a.isReset()||(t.retryOnMount=!1))},Q_=t=>{W.useEffect(()=>{t.clearReset()},[t])},K_=({result:t,errorResetBoundary:a,throwOnError:i,query:r,suspense:o})=>t.isError&&!a.isReset()&&!t.isFetching&&r&&(o&&t.data===void 0||id(i,[t.error,r])),G_=t=>{if(t.suspense){const i=o=>o==="static"?o:Math.max(o??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...o)=>i(r(...o)):i(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Y_=(t,a)=>t?.suspense&&a.isPending,F_=(t,a,i)=>a.fetchOptimistic(t).catch(()=>{i.clearReset()});function V_(t,a,i){const r=Z_(),o=$_(),c=as(),d=c.defaultQueryOptions(t),h=c.getQueryCache().get(d.queryHash),m=t.subscribed!==!1;d._optimisticResults=r?"isRestoring":m?"optimistic":void 0,G_(d),H_(d,o,h),Q_(o);const[p]=W.useState(()=>new a(c,d)),b=p.getOptimisticResult(d),v=!r&&m;if(W.useSyncExternalStore(W.useCallback(x=>{const S=v?p.subscribe(rt.batchCalls(x)):St;return p.updateResult(),S},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),W.useEffect(()=>{p.setOptions(d)},[d,p]),Y_(d,b))throw F_(d,p,o);if(K_({result:b,errorResetBoundary:o,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw b.error;return d.notifyOnChangeProps?b:p.trackResult(b)}function Kt(t,a){return V_(t,R_)}function oi(t,a){const i=as(),[r]=W.useState(()=>new k_(i,t));W.useEffect(()=>{r.setOptions(t)},[r,t]);const o=W.useSyncExternalStore(W.useCallback(d=>r.subscribe(rt.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),c=W.useCallback((...d)=>{r.mutate(d[0],d[1]).catch(St)},[r]);if(o.error&&id(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}const ey=!1;var Uv=W.useLayoutEffect;function _a(t){return t[t.length-1]}function Lv(t,a){return typeof t=="function"?t(a):t}const od=Object.prototype.hasOwnProperty;function Zv(t){for(const a in t)if(od.call(t,a))return!0;return!1}const io=()=>Object.create(null),Ys=(t,a)=>xa(t,a,!0);function xa(t,a,i,r=0){if(t===a)return t;if(r++>500)return a;const o=Array.isArray(t)&&Array.isArray(a);if(!o&&!(go(t)&&go(a)))return a;const c=Object.keys(t),d=c.length,h=Object.keys(a),m=h.length;if(o?d!==t.length||m!==a.length||d&&_a(c)!==`${d-1}`||m&&_a(h)!==`${m-1}`:d!==Object.getOwnPropertyNames(t).length||m!==Object.getOwnPropertyNames(a).length||Object.getOwnPropertySymbols(a).length)return a;let p=0,b,v,x;if(o){for(;p<m&&(x=p,v=t[x],b=a[x],b=v===b?v:typeof v=="object"?xa(v,b,i,r):b,b===v);p++);if(p===m&&d===m)return t}else{let w=d===m,O=!0;for(;p<m;p++){x=h[p],v=t[x];const z=a[x];b=v===z?v:typeof v=="object"?xa(v,z,i,r):z,w&&=b===v&&(c[p]===x||od.call(t,x)),O&&=Object.is(b,z),c[p]=b}if(w)return Object.getOwnPropertySymbols(t).length?a:t;if(O)return a}const S=o?h.fill(0):i?io():{};for(let w=0;w<m;w++)x=o?w:h[w],o?(v=t[x],w>p&&(b=a[x],b=v===b?v:typeof v=="object"?xa(v,b,i,r):b),S[x]=w<p?v:b):S[x]=c[w];return S}function go(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}function Hn(t,a,i,r){if(t===a)return!0;if(Array.isArray(t)&&Array.isArray(a)){if(t.length!==a.length)return!1;for(let o=0,c=t.length;o<c;o++){const d=t[o],h=a[o];if(d!==h&&!Hn(d,h,i,r))return!1}return!0}if(go(t)&&go(a)){if(i){for(const c in a)if((r||a[c]!==void 0)&&!Hn(t[c],a[c],i,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 a)if((r||a[c]!==void 0)&&(o--===0||!Hn(t[c],a[c],i,r)))return!1;return o===0}return!1}const P_=/[\x00-\x1f\x7f"<>`{}]/g;function X_(t){return t.replace(P_,a=>"%"+a.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function ty(t){let a;try{a=decodeURI(t)}catch{a=t.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return X_(a)}const J_=["http:","https:","mailto:","tel:"];function yr(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 qv=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Bv(t,a){if(!t)return!1;if(qv.test(t))return!0;const i=yr(t);return i?!a.has(i):!1}function rr(t){if(!t)return t;let a=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){const i=/%25|%5C/gi;let r=0,o;for(a="";(o=i.exec(t))!==null;)a+=ty(t.slice(r,o.index))+o[0],r=i.lastIndex;a+=ty(r?t.slice(r):t)}return a}function I_(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function W_(t,a){if(t===a)return!0;if(t.length!==a.length)return!1;for(let i=0;i<t.length;i++)if(t[i]!==a[i])return!1;return!0}function ud(){throw new Error("Invariant failed")}function Xs(t){return t.replace(/\/{2,}/g,"/")}function $v(t){return t==="/"?t:t.replace(/^\/+/,"")}function gn(t){const a=t.length;return a>1&&t[a-1]==="/"?t.replace(/\/+$/,""):t}function Hv(t){return gn($v(t))}function ny(t,a){return t?.endsWith("/")&&t!=="/"&&t!==`${a}/`?t.slice(0,-1):t}function ay(t,a,i="never",r){if(a.includes("//")&&(a=Xs(a)),a.startsWith("/"))return a.length===1||i==="preserve"?a:i==="always"?a.endsWith("/")?a:`${a}/`:a.endsWith("/")?a.slice(0,-1):a;const o=a===".";let c;if(r){c=o?t:t+"\0"+a;const p=r.get(c);if(p)return p}let d;if(o)d=t.split("/");else{for(t.includes("//")&&(t=Xs(t)),d=t.split("/");d.length>1&&_a(d)==="";)d.pop();const p=a.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&&(_a(d)===""?i==="never"&&d.pop():i==="always"&&d.push(""));const h=d.join("/"),m=(o?Xs(h):h)||"/";return c&&r&&r.set(c,m),m}function e1(t){const a=new Map(t.map(r=>[encodeURIComponent(r),r])),i=new RegExp([...a.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return r=>r.replace(i,o=>a.get(o)??o)}function t1(t){return t==null||t===""}function n1(t,a,i){if(typeof a!="string")return""+(a??void 0);const r=t==="_splat";if(r&&(!a||/^[a-zA-Z0-9\-._~!/]*$/.test(a)))return a;let o=encodeURIComponent(a);return r&&(o=o.replaceAll("%2F","/")),i?i(o):o}function sy(t,a,i,r,o){const c=t.endsWith("/")?"/":"";let d="";for(const h of a){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=i[p];if(!(m===3&&w==null)){if(o&&(o[p]=w,x&&(o["*"]=w)),x&&t1(w)){if(b==="/"&&!S)continue;w=""}d+=b+n1(p,w,r)+(S||"")}}return d+c||"/"}function ti(t){return t?.isNotFound===!0}function a1(){try{return sessionStorage}catch{return}}const s1="tsr-scroll-restoration-v1_3",Qv=a1();function i1(){try{return JSON.parse(Qv?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}const Fs=i1(),iy="data-scroll-restoration-id",r1=t=>t.state.__TSR_key||t.href;function l1(t){const a=t.getAttribute(iy);if(a)return`[${iy}="${a}"]`;let i="",r=t,o;for(;o=r.parentNode;){let c=1,d=r;for(;d=d.previousElementSibling;)c++;const h=`${r.localName}:nth-child(${c})`;i=i?`${h} > ${i}`:h,r=o}return i}let Gl=!1;const ro="window";function Zf(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function ry(t){const a=new Set;for(const i of t){if(i===ro)continue;const r=Zf(i);r&&a.add(r)}return a}function o1(t,a){const i=t.options.scrollRestoration,r=t._scroll;i&&(r.e=!0);const o=t.options.getScrollRestorationKey||r1,c=new Set,d=h=>{const m=Fs[h]||={};for(const p of c)p===document?m[ro]={scrollX,scrollY}:p.isConnected&&(m[l1(p)]={scrollX:p.scrollLeft,scrollY:p.scrollTop})};i&&!r.s&&(r.s=!0,Gl=!1,history.scrollRestoration="manual",document.addEventListener("scroll",h=>{Gl||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{Qv?.setItem(s1,JSON.stringify(Fs))}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 O=Fs[w];if(O){let z=Fs[S];for(const R in O){if(R===ro){if(b)continue}else{const U=Zf(R);if(!U||b&&p&&(x??=ry(p),x.has(U)))continue}z||(z=Fs[S]={}),z[R]??=O[R]}}}Gl=!0;try{const O=h.toLocation.hash,z=h.toLocation.state.__hashScrollIntoViewOptions??!0;let R=!1;if(b){!O&&p&&(x??=ry(p));const U=O&&z&&v,Q=r.e?Fs[S]:void 0;if(Q)for(const V in Q){const{scrollX:J,scrollY:L}=Q[V];if(V===ro){if(U)continue;scrollTo({top:L,left:J,behavior:m}),R=!0}else{const A=Zf(V);A&&(A.scrollLeft=J,A.scrollTop=L,x?.delete(A))}}if(!O){const V={top:0,left:0,behavior:m};if(R||scrollTo(V),x)for(const J of x)J.scrollTo(V)}}!R&&O&&z&&document.getElementById(O)?.scrollIntoView(z)}finally{Gl=!1}}))}function u1(t,a=String){let i;for(const r in t){const o=t[r];o!==void 0&&(i||=new URLSearchParams).set(r,a(o))}return i?i.toString():""}function hf(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function c1(t){const a=new URLSearchParams(t),i=Object.create(null);for(const[r,o]of a.entries()){const c=i[r];c==null?i[r]=hf(o):Array.isArray(c)?c.push(hf(o)):i[r]=[c,hf(o)]}return i}const Kv=/^(?:\s|["[{\d-]|fa|nu|tr)/,f1=h1(JSON.parse),d1=m1(JSON.stringify,JSON.parse);function h1(t){const a=t===JSON.parse;return i=>{i[0]==="?"&&(i=i.slice(1));const r=c1(i);for(const o in r){const c=r[o];if(typeof c=="string"){if(a&&!Kv.test(c))continue;try{r[o]=t(c)}catch{}}}return r}}function m1(t,a){const i=a===JSON.parse;function r(o){if(o&&typeof o=="object")try{return t(o)}catch{}else if(a&&typeof o=="string"){if(i&&!Kv.test(o))return o;try{return a(o),t(o)}catch{}}return o}return o=>{const c=u1(o,r);return c?`?${c}`:""}}const Js="__root__";function p1(t){t.statusCode=t.statusCode||t.code||307;const a=new Headers(t.headers);t.href&&a.get("Location")===null&&a.set("Location",t.href);const i=new Response(null,{status:t.statusCode,headers:a});if(i.options=t,t.throw)throw i;return i}function Gv(t){return t instanceof Response&&!!t.options}function yo(t){const a=new Map;let i,r;return{get(o){const c=a.get(o);if(c)return c.visited=!0,c.value},set(o,c){const d=a.get(o);if(d){d.value=c;return}if(a.size>=t){let m=i?.next().value;for(;!m||m.visited;)m?m.visited=!1:i=a.values(),m=i.next().value;m===r&&(i=void 0),a.delete(m.key)}const h={key:o,value:c,visited:!1};r=h,a.set(o,h)},clear(){a.clear(),i=void 0,r=void 0}}}const ba=4,Yv=5;function g1(t){const a=t.names;if(a)return a;const i=[];for(const r of t)typeof r!="string"&&i.push(r[1]);return t.names=i}function y1(t,a,i){const r=t.slice(a,i);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(a+c+1,m?i:t.length)]}}return r}function vr(t,a,i,r,o,c){let d=i;const h=a.fullPath??a.from,m=a.options,p=h.length,b=h.endsWith("/")?p-1:p,v=m?.caseSensitive??t,x=m?.params?.parse??m?.parseParams;let S,w=c?i-1:0;if(!r||h.includes("$")){S=c?.slice()??[];const R=_a(S);R&&typeof R!="string"&&R[0]===2&&(S[S.length-1]=[R[0],R[1],R[2],R[3]===void 0?void 0:R[3]+h.substring(i-(h[i-2]==="/"?2:1),b)],w=p)}for(;d<p;){const R=d,U=h.indexOf("/",R);let Q=U===-1?p:U;const V=y1(h,R,Q);d=Q+1;let J;if(typeof V=="string"){if(!r)continue;let L=V,A;v?A=r.static??=new Map:(L=V.toLowerCase(),A=r.staticInsensitive??=new Map);const X=A.get(L);if(X)J=X;else{const P=Ja(r);J=P,A.set(L,P)}}else{const L=V[0];let A=V[2],X=V[3]??"";if(L===2&&(Q=p,d=Q+1),S&&w<Q&&(w<R-1&&S.push(h.slice(w,R-1)),V[2]="/"+A,L===2&&V[3]!==void 0&&b<p&&(V[3]=X.slice(0,-1)),S.push(V),w=Q),!r)continue;const P=v&&!!(A||X);v||(A=A.toLowerCase(),X=X.toLowerCase());const te=L===1?r.dynamic??=[]:L===3?r.optional??=[]:r.wildcard??=[],le=L!==2&&!x&&te.find(re=>!re.parse&&re.caseSensitive===P&&re.prefix===A&&re.suffix===X);if(le)J=le;else{const re=Ja(r,L,P,A,X);J=re,te.push(re),te.length===2&&o?.push(te)}}r=J}S&&w<b&&S.push(h.slice(w,b));const O=S?.slice();if(!r)return O;if(x&&a.children&&!a.isRoot&&a.id&&a.id.charCodeAt(a.id.lastIndexOf("/")+1)===95){const R=Ja(r,Yv);(r.pathless??=[]).push(R),r=R}const z=(a.path||!a.children)&&!a.isRoot;if(z&&b<p){const R=Ja(r,ba);r.index=R,r=R}return r.parse=x??null,r.priority=m?.params?.priority??0,r.route||(r.data=O,z&&(r.route=a)),[r,d,O]}function Fv(t,a){if(t.parse&&!a.parse)return-1;if(!t.parse&&a.parse)return 1;if(t.parse&&a.parse&&(t.priority||a.priority))return a.priority-t.priority;if(t.prefix&&a.prefix&&t.prefix!==a.prefix){if(t.prefix.startsWith(a.prefix))return-1;if(a.prefix.startsWith(t.prefix))return 1}if(t.suffix&&a.suffix&&t.suffix!==a.suffix){if(t.suffix.endsWith(a.suffix))return-1;if(a.suffix.endsWith(t.suffix))return 1}return t.prefix&&!a.prefix?-1:!t.prefix&&a.prefix?1:t.suffix&&!a.suffix?-1:!t.suffix&&a.suffix?1:t.caseSensitive&&!a.caseSensitive?-1:!t.caseSensitive&&a.caseSensitive?1:0}function Ja(t,a=0,i,r,o){return{kind:a,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:i,prefix:r,suffix:o}}function v1(t,a){const i=Ja(),r=[];function o(c,d,h,m){const[p,b,v]=vr(!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,i);for(const c of r)c.sort(Fv);a.masksTree=i,a.flatCache=yo(1e3)}function b1(t,a){t||="/";const i=a.flatCache.get(t);if(i!==void 0)return i;const r=cd(t,a.masksTree);return a.flatCache.set(t,r),r}function x1(t,a,i,r,o){t||="/",r||="/";const c=a?`case\0${t}`:t;let d=o.singleCache.get(c);return d||(d=Ja(),vr(a,{from:t},1,d),o.singleCache.set(c,d)),cd(r,d,i)}function S1(t,a,i=!1){const r=i?t:`nofuzz\0${t}`,o=a.matchCache.get(r);if(o!==void 0)return o;t||="/";let c;try{c=cd(t,a.segmentTree,i)}catch(d){if(d instanceof URIError)c=null;else throw d}return c&&(c.branch=Pv(c.route)),a.matchCache.set(r,c),c}function _1(t,a=!1){const i=Ja(),r=[],o={},c={};let d=0;function h(m,p,b,v){if(m.init(d),m.id in o&&ud(),o[m.id]=m,d!==0&&m.path){const O=gn(m.fullPath);(!c[O]||m.fullPath.endsWith("/"))&&(c[O]=m)}d++;const[x,S,w]=vr(a,m,p,b,r,v);if(m._interpolation=w,m.children)for(const O of m.children)h(O,S,x,w)}h(t,1,i);for(const m of r)m.sort(Fv);return{processedTree:{segmentTree:i,singleCache:yo(1e3),matchCache:yo(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:c}}function cd(t,a,i=!1){const r=t.split("/"),o=O1(t,r,a,i);if(!o)return null;const[c]=Vv(t,r,o);return{route:o.node.route,rawParams:c}}function Vv(t,a,i){const r=w1(i.node),o=i.node.data&&g1(i.node.data),c=Object.create(null);let d=i.extract?.part??0,h=i.extract?.node??0,m=i.extract?.path??0,p=i.extract?.param??0;for(;h<r.length;d++,h++,m++){const b=r[h];if(b.kind===ba)break;if(b.kind===Yv){d--,m--;continue}const v=a[d],x=m;if(v&&(m+=v.length),b.kind===1||b.kind===3){const S=o[p++];if(b.kind===3&&i.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),O=decodeURIComponent(w);c["*"]=O,c._splat=O;break}}return i.rawParams&&Object.assign(c,i.rawParams),[c,{part:d,node:h,path:m,param:p}]}function Pv(t){const a=[t];for(;t.parentRoute;)t=t.parentRoute,a.push(t);return a.reverse(),a}function w1(t){const a=Array(t.depth+1);do a[t.depth]=t,t=t.parent;while(t);return a}function O1(t,a,i,r){if(t==="/"&&i.index)return{node:i.index,skipped:0};const o=!_a(a),c=o&&t!=="/",d=a.length-(o?1:0),h=[{node:i,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:O,optionals:z}=b;let{extract:R,rawParams:U}=b;if(v.kind===2&&v.route&&!Fl(p,b))continue;if(v.parse){if(!ly(t,a,b))continue;U=b.rawParams,R=b.extract}r&&v.route&&v.kind!==ba&&Fl(m,b)&&(m=b);const Q=x===d;if(Q&&(v.route&&(!c||v.kind===ba||v.kind===2)&&Fl(p,b)&&(p=b),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const V=Q?void 0:a[x];let J;if(Q&&v.index){const L={node:v.index,index:x,skipped:S,statics:w,dynamics:O,optionals:z,extract:R,rawParams:U};let A=!0;if(v.index.parse&&(ly(t,a,L)||(A=!1)),A){if(!O&&!z&&!S&&E1(w,d))return L;Fl(p,L)&&(p=L)}}if(v.wildcard)for(let L=v.wildcard.length-1;L>=0;L--){const A=v.wildcard[L],{prefix:X,suffix:P}=A;if(!(X&&(Q||!(A.caseSensitive?V:J??=V.toLowerCase()).startsWith(X)))){if(P){if(Q)continue;const te=a.slice(x).join("/"),le=te.slice(-P.length);if((A.caseSensitive?le:le.toLowerCase())!==P||te.length-P.length<X.length)continue}h.push({node:A,index:d,skipped:S,statics:w,dynamics:O,optionals:z,extract:R,rawParams:U})}}if(v.optional){const L=S|1<<v.depth+1;for(let A=v.optional.length-1;A>=0;A--){const X=v.optional[A];h.push({node:X,index:x,skipped:L,statics:w,dynamics:O,optionals:z,extract:R,rawParams:U})}if(!Q)for(let A=v.optional.length-1;A>=0;A--){const X=v.optional[A],{prefix:P,suffix:te}=X;if(P||te){const le=X.caseSensitive?V:J??=V.toLowerCase();if(P&&!le.startsWith(P)||te&&le.indexOf(te,le.length-te.length)<P.length)continue}h.push({node:X,index:x+1,skipped:S,statics:w,dynamics:O,optionals:z+Yl(d,x),extract:R,rawParams:U})}}if(!Q&&v.dynamic&&V)for(let L=v.dynamic.length-1;L>=0;L--){const A=v.dynamic[L],{prefix:X,suffix:P}=A;if(X||P){const te=A.caseSensitive?V:J??=V.toLowerCase();if(X&&!te.startsWith(X)||P&&te.indexOf(P,te.length-P.length)<X.length)continue}h.push({node:A,index:x+1,skipped:S,statics:w,dynamics:O+Yl(d,x),optionals:z,extract:R,rawParams:U})}if(!Q&&v.staticInsensitive){const L=v.staticInsensitive.get(J??=V.toLowerCase());L&&h.push({node:L,index:x+1,skipped:S,statics:w+Yl(d,x),dynamics:O,optionals:z,extract:R,rawParams:U})}if(!Q&&v.static){const L=v.static.get(V);L&&h.push({node:L,index:x+1,skipped:S,statics:w+Yl(d,x),dynamics:O,optionals:z,extract:R,rawParams:U})}if(v.pathless)for(let L=v.pathless.length-1;L>=0;L--){const A=v.pathless[L];h.push({node:A,index:x,skipped:S,statics:w,dynamics:O,optionals:z,extract:R,rawParams:U})}}if(p)return p;if(r&&m){let b=m.index;for(let x=0;x<m.index;x++)b+=a[x].length;const v=b===t.length?"/":t.slice(b);return m.rawParams??=Object.create(null),m.rawParams["**"]=decodeURIComponent(v),m}return null}function Yl(t,a){return 2**(t-a-1)}function E1(t,a){return t===2**(a-1)-1}function ly(t,a,i){let r,o;try{[r,o]=Vv(t,a,i)}catch{return null}if(i.rawParams=r,i.extract=o,!i.node.parse)return!0;try{if(i.node.parse(r)===!1)return null}catch{}return!0}function Fl(t,a){return t?a.statics>t.statics||a.statics===t.statics&&(a.dynamics>t.dynamics||a.dynamics===t.dynamics&&(a.optionals>t.optionals||a.optionals===t.optionals&&((a.node.kind===ba)>(t.node.kind===ba)||a.node.kind===ba==(t.node.kind===ba)&&a.node.depth>t.node.depth))):!0}function j1(t,a,i){const r=Hv(t),o=`/${r}`,c=a?o:o.toLowerCase(),d=`${c}/`,h={input:({url:m})=>{const p=a?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=Xs(`/${r}${m.pathname}`),m)};return i?{input:({url:m})=>qf(i,h.input({url:m})),output:({url:m})=>h.output({url:Xv(i,m)})}:h}function qf(t,a){const i=t?.input?.({url:a});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return a}function Xv(t,a){const i=t?.output?.({url:a});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return a}function z1(t,a){const{createMutableStore:i,createReadonlyStore:r,batch:o}=a,c=new Map,d=i("idle"),h=i(t),m=i(void 0),p=i([]),b=r(()=>p.get().map(O=>c.get(O).get())),v=r(()=>({status:d.get(),isLoading:d.get()==="pending",matches:b.get(),location:h.get(),resolvedLocation:m.get()}));function x(O){let z=c.get(O);return z||(z=i(void 0),c.set(O,z)),z}const S={status:d,location:h,resolvedLocation:m,ids:p,matches:b,byRoute:c,__store:v,getMatchStore:x,setMatches:w};function w(O){const z=p.get(),R=O.map(U=>U.routeId);o(()=>{W_(z,R)||p.set(R);for(const U of z)R.includes(U)||c.get(U).set(()=>{});for(const U of O){const Q=x(U.routeId);Q.get()!==U&&Q.set(U)}})}return S}var Sa="__TSR_index",oy="popstate",uy="beforeunload",N1=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function lo(t){const a=N1.exec(t);return a?"/"+t.slice(a[0].length):t}function Jv(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,a=>`
|
|
10
|
+
\r`.includes(a)?"":encodeURIComponent(a))),lo(t)}function T1(t){let a=t.getLocation();const i=new Set,r=d=>{a=t.getLocation(),i.forEach(h=>h({location:a,action:d}))},o=d=>{t.notifyOnIndexChange??!0?r(d):a=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=vo(d.path,d.state);if(await m.blockerFn({currentLocation:a,nextLocation:p,action:d.type})){t.onBlocked?.();return}}d.task()};return{get location(){return a},get length(){return t.getLength()},subscribers:i,subscribe:d=>(i.add(d),()=>{i.delete(d)}),push:(d,h,m)=>{const p=a.state[Sa];h=cy(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=a.state[Sa];h=cy(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:()=>a.state[Sa]!==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 cy(t,a){const i=fd();return{...a,key:i,__TSR_key:i,[Sa]:t}}function R1(t){const a=typeof document<"u"?window:void 0,i=a.history.pushState,r=a.history.replaceState;let o=[];const c=()=>o,d=A=>o=A,h=A=>Jv(A),m=(()=>vo(`${a.location.pathname}${a.location.search}${a.location.hash}`,a.history.state));if(!a.history.state?.__TSR_key&&!a.history.state?.key){const A=fd();a.history.replaceState({[Sa]:0,key:A,__TSR_key:A},"")}let p=m(),b,v=!1,x=!1,S=!1,w=!1;const O=()=>p;let z;const R=()=>{z&&(L._ignoreSubscribers=!0,(z[2]?a.history.pushState:a.history.replaceState)(z[1],"",z[0]),L._ignoreSubscribers=!1,z=void 0,b=void 0)},U=(A,X,P)=>{const te=!!z;te||(b=p),p=vo(X,P),z=[p.href,P,z?.[2]||A],te||queueMicrotask(()=>R())},Q=A=>{p=m(),L.notify({type:A})},V=async()=>{if(w=!1,x){x=!1;return}const A=m(),X=A.state[Sa]-p.state[Sa],P=X===1,te=X===-1,le=!P&&!te||v;v=!1;const re=le?"GO":te?"BACK":"FORWARD",me=le?{type:"GO",index:X}:{type:te?"BACK":"FORWARD"};if(S)S=!1;else{const ye=c();if(typeof document<"u"&&ye.length){for(const F of ye)if(await F.blockerFn({currentLocation:p,nextLocation:A,action:re})){x=!0,a.history.go(-X),L.notify(me);return}}}p=m(),L.notify(me)},J=A=>{if(w){w=!1;return}let X=!1;const P=c();if(typeof document<"u"&&P.length)for(const te of P){const le=te.enableBeforeUnload??!0;if(le===!0){X=!0;break}if(typeof le=="function"&&le()===!0){X=!0;break}}if(X)return A.preventDefault(),A.returnValue=""},L=T1({getLocation:O,getLength:()=>a.history.length,pushState:(A,X)=>U(!0,A,X),replaceState:(A,X)=>U(!1,A,X),back:A=>(A&&(S=!0,w=!0),a.history.back()),forward:A=>{A&&(S=!0,w=!0),a.history.forward()},go:(A,X)=>{v=!0,X&&(S=!0,w=!0),a.history.go(A)},createHref:h,flush:R,destroy:()=>{a.history.pushState=i,a.history.replaceState=r,a.removeEventListener(uy,J,{capture:!0}),a.removeEventListener(oy,V)},onBlocked:()=>{b&&p!==b&&(p=b)},getBlockers:c,setBlockers:d,notifyOnIndexChange:!1});return L._ignoreNextBeforeUnload=A=>{w=!1;try{A=new URL(A,a.document.baseURI).href,w=/^https?:/.test(A)&&(!A.includes("#")||A.split("#")[0]!==a.location.href.split("#")[0])}catch{}},a.addEventListener(uy,J,{capture:!0}),a.addEventListener(oy,V),a.history.pushState=function(...A){const X=i.apply(a.history,A);return L._ignoreSubscribers||Q("PUSH"),X},a.history.replaceState=function(...A){const X=r.apply(a.history,A);return L._ignoreSubscribers||Q("REPLACE"),X},L}function vo(t,a){const i=Jv(t),r=i.indexOf("#"),o=i.indexOf("?");if(!a){const c=fd();a={[Sa]:0,key:c,__TSR_key:c}}return{href:i,pathname:i.slice(0,r>-1?o>-1?Math.min(r,o):r:o>-1?o:i.length),hash:r>-1?i.slice(r):"",search:o>-1?i.slice(o,r===-1?void 0:r):"",state:a}}function fd(){return(Math.random()+1).toString(36).slice(7)}function mf(t,a){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==a||!!t.username||!!t.password}function pf(t){return t.pathname+t.search+t.hash}function fy(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}function Ro(t,a){return{fromLocation:a,toLocation:t,pathChanged:a?.pathname!==t.pathname,hrefChanged:a?.href!==t.href,hashChanged:a?.hash!==t.hash}}function dy({key:t,__TSR_key:a,__TSR_index:i,__hashScrollIntoViewOptions:r,...o}){return o}function A1(t){return t.findIndex(a=>a.status==="error"||a.status==="notFound"||a._notFound)+1}function C1(t,a,i,r,o,c){r&&(a=a.slice(0,r)),o&&(i=i.slice(0,o));for(const d of a){if(c&&t._tx!==c)return;i.some(h=>h.routeId===d.routeId)||t.routesById[d.routeId].options.onLeave?.(d)}for(const d of i){if(c&&t._tx!==c)return;t.routesById[d.routeId].options[a.some(h=>h.routeId===d.routeId)?"onStay":"onEnter"]?.(d)}}var M1=class{constructor(t,a){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async i=>(i(),!1),this.update=i=>{const r=this.options;this.options={...r,...i},this.isServer=this.options.isServer??ey??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=R1()),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!=="/"&&Hv(o)?j1(o,this.options.caseSensitive,c):c),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||ey){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=z1(this.latestLocation,h),o1(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=_1(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&v1(this.options.routeMasks,i.processedTree),{...i,resolvePathCache:yo(1e3)}},this.subscribe=(i,r)=>{const o={eventType:i,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=i=>{for(const r of this.subscribers)if(r.eventType===i.type)try{r.fn(i)}catch(o){console.error(o)}},this.parseLocation=(i,r)=>{const o=({pathname:m,search:p,hash:b,href:v},x)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(m)){const z=this.options.parseSearch(p),R=this.options.stringifySearch(z);return{href:m+R+b,publicHref:m+R+b,pathname:rr(m),external:!1,searchStr:R,search:Ys(r?.search,z),hash:rr(b.slice(1)),state:xa(r?.state,x)}}const S=qf(this.rewrite,new URL(v,this.origin)),w=this.options.parseSearch(S.search),O=this.options.stringifySearch(w);return S.search=O,{href:S.href.replace(S.origin,""),publicHref:v,pathname:rr(lo(S.pathname)),external:!!this.rewrite&&mf(S,this.origin),searchStr:O,search:Ys(r?.search,w),hash:rr(S.hash.slice(1)),state:xa(r?.state,x)}},c=o(i,i.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=(i,r,o)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},o):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>{const r=Object.create(null),o=S1(gn(i),this.processedTree,!0);return o&&Object.assign(r,o.rawParams),[o?.branch||[this.routesById.__root__],r,o?.route]},this.buildLocation=i=>{{const d=this.staticLocations.get(i);if(d)return d}let r=!1;const o=(d={})=>{if(d.href){const ye=vo(d.href,{});d={...d,to:qf(this.rewrite,new URL(ye.pathname,this.origin)).pathname,search:this.options.parseSearch(ye.search),hash:ye.hash.slice(1)}}const h=i._fromLocation||this._pendingLocation||this.latestLocation;let m;const p=()=>(r=!0,h),b=()=>m??=this.matchRoutesLightweight(p()),v=d.to?`${d.to}`:".",x=ay(v[0]==="/"?"":d.unsafeRelative==="path"?p().pathname:d.from??b()[1],v,this.options.trailingSlash,this.resolvePathCache),S=this.routesByPath[gn(x)],w=x.includes("$");let O;if(S)O=S._branch??=Pv(S);else if(w)O=[];else{const[ye,F,M]=this.getMatchedRoutes(x);O=ye,this.options.notFoundRoute&&(!M||M.path!=="/"&&F["**"])&&(O=[...O,this.options.notFoundRoute])}const z=w?S?._interpolation??vr(!1,{fullPath:x},0):void 0;let R;for(const ye of O){const F=ye.options.params?.stringify??ye.options.stringifyParams;if(F){const M=b()[3];if(R??=gf(d.params,M),!Zv(R))break;R===M&&(R=Object.assign(io(),R));try{Object.assign(R,F(R))}catch{}}}R??=gf(d.params,k1(d.params,z)?b()[3]:yf);const U=i.leaveParams?x:lo(rr(z?sy(x,z,R,this.pathParamsDecoder):x)),Q=U1(O,i._includeValidateSearch),V=()=>{let ye=b()[2];if(i._includeValidateSearch&&this.options.search?.strict){const F={};O.forEach(M=>{if(M.options.validateSearch)try{Object.assign(F,oo(M.options.validateSearch,{...F,...ye}))}catch{}}),ye=F}return ye},J=Q.length?L1(Q,V(),d):d.search===!0?V():typeof d.search=="function"?d.search(V()):d.search||yf,L=this.options.stringifySearch(J),A=d.hash===!0?p().hash:typeof d.hash=="function"?d.hash(p().hash):d.hash||void 0,X=A?`#${A}`:"",P=d.state?d.state===!0?p().state:typeof d.state=="function"?d.state(p().state):d.state:yf,te=`${U}${L}${X}`;let le,re,me=!1;if(this.rewrite){const ye=new URL(te,this.origin),F=ye.origin,M=Xv(this.rewrite,ye);le=pf(ye),mf(M,F)?(re=M.href,me=!0):re=lo(pf(M))}else le=I_(te),re=le;return{publicHref:re,href:le,pathname:U,search:J,searchStr:L,state:P,hash:A??"",external:me,unmaskOnReload:d.unmaskOnReload}},c=o(i);if(i.mask)c.maskedLocation=o({from:i.from,...i.mask});else if(this.options.routeMasks){const d=b1(c.pathname,this.processedTree);if(d){const h=Object.assign(io(),d.rawParams),{from:m,params:p,...b}=d.route,v=gf(p,h);c.maskedLocation=o({from:i.from,...b,params:v})}}return!r&&i._fromLocation&&this.staticLocations.set(i,c),c},this.commitLocation=async({viewTransition:i,ignoreBlocker:r,...o})=>{const c=o.maskedLocation??o;if(c.external)return hy(this,c.publicHref,{replace:o.replace,ignoreBlocker:r});let d;const h=gn(this.latestLocation.href)===gn(o.href)&&Hn(dy(o.state),dy(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=i,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:i,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:i,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:d});return queueMicrotask(()=>{this._pendingLocation===m&&(this._pendingLocation=void 0)}),p},this.navigate=async({to:i,reloadDocument:r,href:o,publicHref:c,...d})=>{const h=o?yr(o):void 0;if(h||r){if(i!==void 0||!o){const p=this.buildLocation({to:i,...d}),b=p.maskedLocation??p;o??=b.publicHref,c??=b.publicHref}return hy(this,!h&&c?c:o,d)}return this.buildAndCommitLocation({...d,href:o,to:i,_isNavigate:!0})},this.load=async i=>{this.updateLatestLocation(),i?.action&&(this._scroll.h=i.action.type==="PUSH"||i.action.type==="REPLACE"),await F1(this,i)},this.startViewTransition=i=>{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(Ro(c,d)):r.types;if(h===!1)return i();o={update:i,types:h}}else o=i;return document.startViewTransition(o).updateCallbackDone}return i()},this.invalidate=i=>{const r=this._committed,o=i?.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,...(i?.forcePending||b.status==="error"||b.status==="notFound")&&fy(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,i?.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:i?.sync})},this.resolveRedirect=i=>{const r=i.options;let o=i.headers.get("Location")||r.href;if(!o){const d=this.buildLocation(r);o=(d.maskedLocation??d).publicHref||"/"}let c;if(qv.test(o)||(c=yr(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:mf(d,this.origin)||(o=pf(d),c=void 0)}return c&&(r.reloadDocument=!0),r.href=o,i.headers.set("Location",o),i},this.clearCache=i=>{const r=this._cache,o=this._preloads,c=i?.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=Is,this.preloadRoute=i=>V1(this,i),this.matchRoute=(i,r)=>{const o={...i,to:i.to?ay(i.from||"",i.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:i.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=x1(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,h.pathname,this.processedTree);return!m||i.params&&!Hn(m.rawParams,i.params,!0)?!1:r?.includeSearch??!0?Hn(h.search,c.search,!0)?m.rawParams:!1:m.rawParams},this.getStoreConfig=a,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=e1(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??d1,parseSearch:t.parseSearch??f1,protocolAllowlist:t.protocolAllowlist??J_}),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 a=this.options.notFoundRoute;a&&(a.init(99999999999),this.routesById[a.id]!==a&&(a._interpolation=vr(!1,a,0)),this.routesById[a.id]=a)}matchRoutesInternal(t,a){const[i,r,o]=this.getMatchedRoutes(t.pathname);let c=i,d=!1;(o?o.path!=="/"&&r["**"]:gn(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const h=d?Z1(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(O=>O.routeId===x.id):void 0};let v;for(let x=0;x<c.length;x++){const S=c[x],w=m[x-1];let O,z,R;{const me=w?.search??t.search,ye=w?._strictSearch??void 0;try{const F=oo(S.options.validateSearch,{...me})??void 0;O={...me,...F},z={...ye,...F}}catch(F){let M=F;if(F instanceof bo||(M=new bo(F.message,{cause:F})),a?.throwOnError)throw M;O=me,z={},R=M}}let U="",Q="";try{U=S.options.loaderDeps?.({search:O})??"",Q=U&&JSON.stringify(U)||""}catch(me){if(a?.throwOnError)throw me;R??=me}const V=io(),J=S._interpolation?sy(S.fullPath,S._interpolation,r,this.pathParamsDecoder,V):S.fullPath,L=S.id+J+Q,A=b(S,x),X=this._cache.get(L)??(A?.id===L?A:void 0);v=X?._strictParams??Object.assign(V,v);let P;if(!X)try{my(S,v)}catch(me){if(ti(me)||Gv(me)?P=me:P=new D1(me.message,{cause:me}),a?.throwOnError)throw P}const te=A?"stay":"enter";let le;if(X)le={...X,cause:te,search:Ys(A?A.search:X.search,O),_strictSearch:z,searchError:R};else{const me=fy(S)?"pending":"success";le={id:L,ssr:S.options.ssr,index:x,routeId:S.id,params:A?.params??v,_strictParams:v,pathname:J,updatedAt:Date.now(),search:A?Ys(A.search,O):O,_strictSearch:z,searchError:R,status:me,isFetching:!1,error:void 0,paramsError:P,context:{},abortController:a?._controller??new AbortController,cause:te,loaderDeps:A?xa(A.loaderDeps,U):U,invalid:!1,preload:!1,staticData:S.options.staticData||{},fullPath:S.fullPath}}const re=h===S.id;le._notFound&&!re&&(le.error=void 0),le._notFound=re,m[x]=le}for(let x=0;x<m.length;x++){const S=m[x];S.params=S.cause==="stay"?Ys(S.params,v):v,a?._controller&&(S.context={})}return m}matchRoutesLightweight(t){const a=_a(this.stores.ids.get()),i=a?this.stores.byRoute.get(a).get():void 0,r=i?.id,o=this.lightweightCache.get(t);if(o&&o[0]===r)return o[1];const[c,d]=this.getMatchedRoutes(t.pathname),h=_a(c),m={...t.search};for(const x of c)try{Object.assign(m,oo(x.options.validateSearch,m))}catch{}const p=i&&i.routeId===h.id&&i.pathname===t.pathname;let b;if(p)b=i.params;else{const x=d;for(const S of c)try{my(S,x)}catch{}b=x}const v=[c,h.fullPath,m,b];return this.lightweightCache.set(t,[r,v]),v}};async function hy(t,a,{replace:i,ignoreBlocker:r}){if(!Bv(a,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:i?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(a),i?window.location.replace(a):window.location.href=a}}var bo=class extends Error{},D1=class extends Error{};function oo(t,a){if(t==null)return{};if("~standard"in t){const i=t["~standard"].validate(a);if(i instanceof Promise)throw new bo("Async validation not supported");if(i.issues)throw new bo(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in t?t.parse(a):typeof t=="function"?t(a):{}}function gf(t,a){if(t===void 0||t===!0)return a;const i=Object.create(null);return t===!1||t===null?i:typeof t=="function"?(Object.assign(i,a),Object.assign(i,t(i))):Object.assign(i,a,t)}function k1(t,a){return typeof t=="function"?!0:!a||t===!1||t===null?!1:t===void 0||t===!0||a.some(i=>typeof i!="string"&&!od.call(t,i[1]))}const yf=Object.freeze({});function U1(t,a){const i=[];for(let r=0;r<t.length;r++){const o=t[r].options;if("search"in o)o.search?.middlewares&&i.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};i.push(d)}const c=o.validateSearch;if(a&&c){const d=({search:h,next:m,meta:p})=>{const b=m(h);try{const v=oo(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};i.push(d)}}return i}function L1(t,a,i){const r=(o,c,d)=>{if(o>=t.length){if(!i.search)return{};if(i.search===!0)return c;const m=Lv(i.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,a)}function Z1(t,a){if(t!=="root"){let i;for(let r=a.length-1;r>=0;r--){const o=a[r];if(o.options.notFoundComponent)return o.id;i||=o.children&&o.id}if(i)return i}return Js}function my(t,a){const i=t.options.params?.parse??t.options.parseParams;i&&Object.assign(a,i(a))}function Bf(t,a){return t.options[a]?.preload?.()}function q1(t,a){const i=Bf(t,"component");let r=Bf(t,"pendingComponent");return a&&(r?r=r.then(a):a()),i&&r?Promise.all([i,r]).then(()=>{}):i??r}function Is(t,a,i){const r=()=>a===!1?void 0:a?Bf(t,a):q1(t,i),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 dd(t){const a=t.findIndex(i=>i.status!=="success"||i._notFound)+1;return a&&a<t.length?t.slice(0,a):t}function B1(t,a,i){const r=t._tx;return a&&r?.[2]===i&&!r[3].some(o=>o.routeId===a)}const yn=0,Qn=1,Ao=2,_t=3,wa=[4];function br(t){return typeof t[0]=="number"}function ss(t,a){return a.aborted?Promise.race([Promise.reject(a),t]):new Promise((i,r)=>{const o=()=>r(a);a.addEventListener("abort",o,{once:!0}),Promise.resolve(t).then(i,r).then(()=>a.removeEventListener("abort",o))})}function is(t,a){return t.routesById[a.routeId]}function xr(t,a,i){return Gv(t)?[_t,t]:ti(t)?(t.routeId||=i,[Ao,t]):a?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[Qn,t]):[yn,t]}function hd(t,a){let i=xr(a,!0,t.id);if(i[0]!==Qn)return i;try{t.options.onError?.(i[1])}catch(r){i=xr(r,!0,t.id)}return i}function mr(t,a,i,r,o){return o[0].signal.aborted?wa:gd(t,a,i,hd(i,r),o)}async function $1(t,a,i,r,o,c){const[d,h]=a,m=i[0].signal,p=!!i[3];for(let b=i[6]??0;b<r;b++){const v=h[b],x=is(t,v);v.abortController=i[0];const S=h[b-1]?.context??t.options.context??{},w={params:v.params,location:d,navigate:U=>t.navigate({...U,_fromLocation:d}),buildLocation:t.buildLocation,cause:p?"preload":v.cause,abortController:i[0],preload:p,matches:h,routeId:x.id};try{const U=v._ctx||=x.options.context?x.options.context({...w,deps:v.loaderDeps,context:S})||{}:void 0;v.context={...S,...U}}catch(U){return qn(t,v),[b,mr(t,a,x,U,i)]}if(m.aborted)return[b,wa];const O=v.paramsError??v.searchError;if(O!==void 0)return qn(t,v),[b,mr(t,a,x,O,i)];const z=x.options.beforeLoad;if(!z)continue;const R=v.status;b>=c&&(v.status="pending",i[7]?.());try{Sr(t,v,"beforeLoad",i[0]);const U=z({...w,search:v.search,context:v.context,...t.options.additionalContext}),Q=await(typeof U?.then=="function"?ss(U,m):U);if(m.aborted)return[b,wa];const V=gd(t,a,x,xr(Q,!1,x.id),i);if(V[0]!==yn)return qn(t,v),[b,V];v.context={...v.context,...Q}}catch(U){return qn(t,v),[b,mr(t,a,x,U,i)]}finally{v.status=R,Sr(t,v,!1,i[0])}}o()}function md(t,a,i){if(!(!i||--i[2])){if(t._flights?.get(a.id)===i){const r=t._tx;if(r&&!r[0].signal.aborted&&!r[3].includes(a)&&r[3].some(o=>o.id===a.id)&&r[3].some(o=>o.isFetching==="beforeLoad"))return;t._flights.delete(a.id)}return i[1]}}function qn(t,a){const i=a._flight;a._flight=void 0,md(t,a,i)?.abort()}function Rt(t,a,i,r){const o=[];for(const c of a)if(!i?.includes(c)){const d=c._flight;if(c._flight=void 0,r&&d?.[2]===1&&t._flights?.get(c.id)===d&&i?.some(h=>h.id===c.id))d[2]=0;else{const h=md(t,c,d);h&&o.push(h)}}for(const c of o)c.abort()}function pd(t){for(const a of t){const i=a._flight;i&&i[2]++}}function Sr(t,a,i,r){if(a.isFetching=i,r&&t._tx?.[0]!==r)return;const o=t.stores.byRoute.get(a.routeId),c=o?.get();c?.id===a.id&&o.set({...c,isFetching:i})}function Iv(t,a,i,r,o,c,d){const h=a[0];return{params:i.params,location:h,navigate:m=>t.navigate({...m,_fromLocation:h}),cause:d?"preload":i.cause,abortController:o,preload:d,deps:i.loaderDeps,parentMatchPromise:c,context:i.context,route:r,...t.options.additionalContext}}async function py(t,a,i,r,o,c,d){const h=d[0],m=h.signal;if(m.aborted)return wa;if(!o)return[yn,void 0];let p=i._flight;Sr(t,i,"loader",h);try{if(!p){const b=new AbortController;p=[Promise.resolve().then(()=>o(Iv(t,a,i,r,b,c,!!d[3]))).then(v=>xr(v,!1,r.id),v=>xr(v,!0,r.id)).then(v=>(v[0]!==yn&&t._flights?.get(i.id)===p&&(t._flights.delete(i.id),p[2]||b.abort()),v[0]===Qn&&p[2]?hd(r,v[1]):v)),b,1],(t._flights??=new Map).set(i.id,p)}return i._flight=p,i.abortController=p[1],gd(t,a,r,await ss(p[0],m),d)}catch(b){if(b!==m||!m.aborted)throw b;return qn(t,i),wa}finally{Sr(t,i,!1,h)}}function gy(t,a,i){a[0]!==_t&&(t.status="success",t.error=void 0,a[0]===yn?(t.loaderData=a[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=i):t.invalid=!0)}function H1(t,a,i){const r=t._cache.get(a.id);if(r!==i||t._committed.some(c=>c.id===a.id&&c._flight===a._flight))return;const o={...a,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,t._cache.set(a.id,o),r&&qn(t,r)}function yy(t,a){return a[0]===Qn||a[0]===Ao?{...t,status:a[0]===Qn?"error":"notFound",error:a[1],_flight:void 0}:t}function Q1(t,a,i,r,o,c,d){const h=a[1][i],m=is(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(Iv(t,a,h,m,c[0],o,p))),c[0].signal.aborted&&(S=wa)),!S)if(h.status!=="success")x=!0;else{const re=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>=re&&(c[5]||h.cause==="enter"||c[2].some(me=>me.routeId===h.routeId&&me.id!==h.id)))}}catch(re){h.invalid=!0,qn(t,h),S=mr(t,a,m,re,c)}const w=m.options.loader,O=typeof w=="function",z=O?w:w?.handler,R=!p||m.options.preload!==!1;let U=R&&w?t._flights?.get(h.id):void 0;U===h._flight||S?U=void 0:U&&!x&&!p&&v===void 0?x=!0:x||(U=void 0);const Q=!!(w&&x&&h.status==="success"&&!p&&!c[4]&&((O?void 0:w.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),V=x&&R,J=V&&!Q&&(h.status!=="success"||!!w),L=i>=d?c[7]:void 0,A=m.lazyFn&&m._lazy!==!0?L:void 0;if(V&&!w&&(h.invalid=!1,h.updatedAt=Date.now()),U&&U[2]++,J){const re=h._flight;h._flight=U,md(t,h,re)?.abort(),i>=d&&(h.status="pending"),L?.()}V||(h.isFetching=!1);const X=!S&&J?py(t,a,h,m,z,o,c).then(re=>(gy(h,re,p),re[0]===yn&&(w&&!c[0].signal.aborted&&H1(t,h,b),i>=d&&(h.status="pending")),re)):Promise.resolve(S??[yn,h.loaderData]),P=(async()=>{try{const me=Is(m,void 0,A);me&&await ss(me,c[0].signal)}catch(me){if(!a[1].some((ye,F)=>F<=i&&(ye.status==="error"||ye.status==="notFound"||ye._notFound)))return[i,mr(t,a,m,me,c)]}const re=await X;J&&re[0]===yn&&h.status==="pending"&&!c[0].signal.aborted&&(h.status="success",L?.())})();if(r.push([i,X,P]),!Q)return X.then(re=>yy(h,re));const te={...h,status:"pending",preload:!1,_flight:U};h.invalid=!1,h.isFetching="loader";const le=py(t,a,te,m,z,o,c).then(re=>(h.isFetching=!1,gy(te,re,!1),re));return(a[2]??=[]).push([i,le,P,te]),le.then(re=>yy(te,re))}async function $f(t,a,i,r,o=0){const c=i?.[1][1];let d=c?.routeId?a.findIndex(h=>h.routeId===c.routeId):i?.[0]??a.length-1;d<0&&(d=0);for(let h=d;h>=0;h--){const m=is(t,a[h]);try{const p=Is(m,!1);p&&await ss(p,r)}catch(p){if(p===r&&r.aborted)throw p}if(m.options.notFoundComponent)return h}return c?.routeId?d:o}function Ia(t,a){a[2]&&(Rt(t,a[2].map(i=>i[3])),a[2]=void 0)}async function vy(t,a,i,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]>=_t)throw[h,d];!o&&d[0]!==yn&&(o=[h,d],await Promise.all((i??[]).map(m=>{if(!(m[0]<=h))return m[1].then(p=>{if(p[0]===_t)throw[m[0],p]})})))}})))}catch(c){return c}return a??o}function gd(t,a,i,r,o,c){for(;r[0]===_t;){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:a[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]?[_t,b]:[_t,b,p]}return[_t,d,m]}catch(m){r=c?[Qn,m]:hd(i,m),c=!0}}return r}async function Wv(t,a,i,r,o,c){const d=a[1];let h=await o,m=!1;const p=d.findIndex(S=>S._notFound),b=S=>S[1][0]===Ao?$f(t,d,S,r.signal):S[0];let v=p<0?d.length:p;if((h?.[1][0]??0)>=_t)v=0;else if(h){v=h[2]??=await b(h);for(const S of i){if(S[0]>=v)break;const w=await S[1];if(w[0]!==yn&&w[0]<_t&&!("loaderData"in d[S[0]])){h=[S[0],w],v=h[2]=await b(h);break}}}for(const S of i){if(S[0]>=v)break;const w=await S[2];if(w){h=w;break}}if((h?.[1][0]??0)>=_t){const S=h[1];if(S[0]!==_t||S[1].options.reloadDocument||S[2])return Ia(t,a),S;m=!0,h=[0,[Qn,new Error("Too many redirects")]]}const x=h?h[2]??await b(h):p;if(x>=0){const S=h?.[1],w=S?.[0],O=d[x],z=S?.[1],R=()=>{S&&(O._notFound=void 0,w===Qn?O.status="error":(z.routeId=O.routeId,O.routeId===t.routeTree.id?(O.status="success",O._notFound=!0):O.status="notFound"),O.error=z,O.isFetching=!1)};R(),S||c?.();const U=is(t,O);try{await ss(S?Promise.resolve().then(()=>Is(U,w===Qn?"errorComponent":"notFoundComponent")):Promise.all([Is(U),Is(U,"notFoundComponent")]),r.signal)}catch(Q){if(Q===r.signal&&r.signal.aborted)return Ia(t,a),wa}S?m&&(r.abort(),await Promise.all([...i.map(Q=>Q[1]),...i.map(Q=>Q[2]),...(a[2]??[]).map(Q=>Q[1])]),Ia(t,a),Rt(t,d),R()):O.status="success"}return a}async function eb(t,a,i,r=0,o=a[1].length){const c=a[1];for(let d=r;d<o;d++){const h=c[d],m=is(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 ss(Promise.all([m.head?.(p),m.scripts?.(p)]),i);h.meta=b?.meta,h.links=b?.links,h.headScripts=b?.scripts,h.styles=b?.styles,h.scripts=v}catch(p){if(p===i&&i.aborted)break;console.error(p)}if(h.status!=="success"||h._notFound)break}return a}async function tb(t,a,i,r){const o=[a,i],c=r[0].signal;let d;try{const h=t.stores.matches.get();let m=i.findIndex(R=>R._notFound);if(t.options.notFoundMode!=="root"&&m>=0){const R=await $f(t,i,void 0,c,m);i[m]._notFound=void 0,i[R]._notFound=!0,m=R}let p=m<0?i.length:m+1,b=0;for(;b<p&&b!==m;){const R=i[b],U=r[2][b],Q=h[b];if(U?.id!==R.id||U.status!=="success"||R.preload||Q?.id!==R.id||Q.status!=="success"||(b++,U._notFound||Q._notFound))break}const v=[],x=r[6]??0;let S=x?Promise.resolve(i[x-1]):void 0;const w=()=>{for(let R=x;R<p&&!c.aborted;R++)S=Q1(t,o,R,v,S,r,b)},O=await $1(t,o,r,p,w,b);if(O){if(r[4]=!0,p=O[0],O[1][0]===Ao){const R=await $f(t,i,O,c);O[2]=R,p=Math.min(p,R+1)}else O[1][0]>=_t&&(p=0);w()}if(!c.aborted&&!r[3]){const R=[];for(const[U,Q]of t._flights??[])Q[2]||(t._flights.delete(U),R.push(Q[1]));for(const U of R)U.abort()}const z=Wv(t,o,v,r[0],vy(v,O,o[2]),r[7]);o[2]?.length&&(o[3]=vy(o[2],void 0,void 0,z.then(R=>br(R)?0:dd(i).length,()=>0))),d=await z}catch(h){if(Ia(t,o),h===c&&c.aborted)return wa;throw h}return br(d)?d:eb(t,d,c,r[6]===i.length?r[6]:0)}function Hf(t,a){if(t._tx!==a)return;const i=a[3],r=t.stores.matches.get();let o=t._pending;for(let c=0;c<i.length;c++){const d=i[c],h=d.status==="success"&&!d._notFound,m=r[c]?.id===d.id&&r[c]?.status==="pending";if(h&&!m)continue;const p=is(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]=a,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]!==a,o[0]=a):(clearTimeout(o?.[3]),t._pending=o=void 0),o||(t._pending=o=[a,d.id,m?Date.now()+x:a[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 z=o[2]-Date.now();if(z>0){o[3]=setTimeout(()=>Hf(t,a),z);return}o[2]=0}const w=i.map(z=>({...z,_flight:void 0}));w[c].status="pending";const O=o[4]=t.startTransition(()=>t.stores.setMatches(w),w).then(z=>(z&&t._pending===o&&o[4]===O&&!o[2]&&(o[2]=Date.now()+x),z));return}}function lr(t,a){const i=t._pending;(t._tx===a||!t._tx?.[3].some(r=>r.id===i?.[1]))&&(clearTimeout(i?.[3]),t._pending=void 0)}async function by(t,a){const i=t._pending;if(!i)return;clearTimeout(i[3]);const r=i[2]-Date.now();if(!i[4]||r<=0||!dd(a[3]).some(c=>c.id===i[1]))return;let o;try{await ss(new Promise(c=>{o=setTimeout(c,r)}),a[0].signal)}catch{}clearTimeout(o)}function nb(t,a){t._committed=a,t.stores.setMatches(a)}function K1(t,a,i,r){const o=t._committed,c=t._lifecycleEnd,d=t._cache;for(const b of i)b.preload=!1,r&&(b._assetEnd=void 0);const h=dd(i).length,m=new Map;{const b=Date.now(),v=new Set;for(let x=0;x<i.length;x++){const S=i[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=is(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:{}})}}a[3]=[],t._cache=m;const p=t._lifecycleEnd=A1(i);nb(t,i),Rt(t,[...d.values(),...o].filter(b=>b._flight&&m.get(b.id)!==b),i),C1(t,o,i,c,p,a)}async function Vl(t,a){let i=t._tx;for(;i&&i!==a;)a=i,await i[5],i=t._tx}function ab(t,a,i){const r=i[1].options,o=i[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=a[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 G1(t,a,i,r,o){const c=i.map(m=>({...m}));pd(c);for(const m of r)qn(t,c[m[0]]),c[m[0]]=m[3];const d=[a[2],c];let h;try{h=await Wv(t,d,r,a[0],o)}catch(m){throw Rt(t,c),m}if(br(h)){Rt(t,c),h[0]===_t&&t._tx===a&&t._committed===i&&await ab(t,a,h);return}if(await eb(t,h,a[0].signal),t._tx!==a||t._committed!==i){Rt(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),qn(t,p))}nb(t,c),Rt(t,i,c)}async function Y1(t,a,i,r,o,c){const d=await tb(t,a[2],a[3],[a[0],a[1],t._committed,void 0,o,i,c,r]);if(br(d)){const v=d[0]===_t&&t._tx===a;if((!v||d[1].options.reloadDocument)&&lr(t,a),Rt(t,a[3]),a[3]=[],!v)return;if(t._tx!==a){lr(t,a);return}await ab(t,a,d);return}const h=d[1];if(t._tx===a&&await by(t,a),t._tx!==a){lr(t,a),Rt(t,h),Ia(t,d);return}const m=a[2],p=Ro(m,t.stores.resolvedLocation.get()),b=d[2];await t.startViewTransition(async()=>{if(t._tx===a&&await by(t,a),t._tx!==a){lr(t,a),Rt(t,h),Ia(t,d);return}const v=()=>{lr(t,a),K1(t,a,h,c),t._tx===a&&(t.emit({type:"onLoad",...p}),t._tx===a&&t.emit({type:"onBeforeRouteMount",...p}))},x=await t.startTransition(v,h);if(t._tx!==a){Ia(t,d);return}b?.length&&G1(t,a,h,b,d[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(m),t.stores.status.set("idle"),t._tx===a&&t.emit({type:"onResolved",...p}),x&&t._tx===a&&t.emit({type:"onRendered",...p})}),t._tx===a&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}async function F1(t,a){const i=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 V=Ro(c,r);t.emit({type:"onBeforeNavigate",...V}),b.signal.aborted||t.emit({type:"onBeforeLoad",...V})}if(b.signal.aborted){await Vl(t,i);return}const x=o.href===c.href;let S=b;const w=t.matchRoutes(c,{_controller:b});pd(w);const O=p?m[1](w):void 0;if(O?S=p:p?.abort(),b.signal.aborted){Rt(t,w),await Vl(t,i);return}t._preflight=void 0;let z;const R=()=>Y1(t,Q,x,()=>Hf(t,Q),a?.sync,O),U=a?.sync?new Promise(V=>z=V):Promise.resolve().then(R),Q=[S,h,c,w,Date.now(),U.then(()=>Vl(t,Q))];if(t._tx=Q,i){for(const V of t.stores.matches.get()){if(t._tx!==Q)break;V.isFetching&&Sr(t,V,!1)}i[0].abort(),Rt(t,i[3],Q[3],!0)}if(t._tx!==Q){Rt(t,Q[3]),Q[3]=[],z?.(),await Vl(t,Q);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(c)}),(O||!t._committed.length&&w[0]?.status!=="success"&&!w.some(V=>V._notFound))&&Hf(t,Q),z?.(R()),await Q[5]}async function V1(t,a){let i=t.buildLocation(a);for(let r=0;;r++){const o=t._committed,c=new AbortController;let d,h,m;try{try{d=t.matchRoutes(i,{_controller:c}),pd(d),h=(t._preloads??=new Map).set(c,d),m=await tb(t,i,d,[c,r,o,!0])}finally{h&&(h=h.delete(c),Rt(t,d)),c.abort()}if(!br(m))return m[1];if(!h||m.length<3)return;i=m[2]}catch(p){ti(p)||console.error(p);return}}}const P1="Error preloading route! ☝️";var sb=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=a=>{this.originalIndex=a,this._branch=void 0;const i=this.options,r=!i?.path&&!i?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Js:this.parentRoute||ud();let o=r?Js:i?.path;o&&o!=="/"&&(o=$v(o));const c=i?.id||o,d=r?Js:Xs((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(c??""));o==="__root__"&&(o="/");const h=d==="__root__"?"/":o===void 0?this.parentRoute.fullPath:Xs(this.parentRoute.fullPath+"/"+o);this._path=o,this._id=d,this._fullPath=h,this._to=gn(h)},this.addChildren=a=>this._addFileChildren(a),this._addFileChildren=a=>(Array.isArray(a)&&(this.children=a),typeof a=="object"&&a!==null&&(this.children=Object.values(a)),this),this._addFileTypes=()=>this,this.updateLoader=a=>(Object.assign(this.options,a),this),this.update=a=>(Object.assign(this.options,a),this),this.lazy=a=>(this.lazyFn=a,this),this.redirect=a=>p1({from:this.fullPath,...a}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},X1=class extends sb{constructor(t){super(t)}},yd=class extends W.Component{constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,a){const i=t.getResetKey();return a.error&&a.resetKey!==i?{resetKey:i,error:0}:{resetKey:i}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,a){this.props.onCatch?.(t,a)}render(){const t=this.state.error;return t?W.createElement(this.props.errorComponent??J1,{error:t[0],reset:this.reset}):this.props.children}};function J1({error:t}){const[a,i]=W.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:()=>i(r=>!r),children:a?"Hide Error":"Show Error"})]}),g.jsx("div",{style:{height:".25rem"}}),a?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 xy=()=>!0,I1=()=>!1;function W1({children:t,fallback:a=null}){return g.jsx(To.Fragment,{children:ew()?t:a})}function ew(t=!0){return To.useSyncExternalStore(tw,xy,t?I1:xy)}function tw(){return()=>{}}var ib=W.createContext(null);function xn(t){return W.useContext(ib)}function nw(t,a){const i=t.stores.location,r=new Set;let o,c;const d=h=>{B1(t,a,h)||(o=h,r.forEach(m=>m()))};return[()=>o??i.get(),h=>(r.size||(o=i.get(),c=i.subscribe(d).unsubscribe),r.add(h),()=>{r.delete(h),r.size||(c(),o=void 0)})]}var _r=W.createContext(void 0),aw=W.createContext(void 0);function sw({update:t,notify:a,unwatched:i}){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 O=b.depsTail=p.subsTail={version:v,dep:p,sub:b,prevDep:x,nextDep:S,prevSub:w,nextSub:void 0};S!==void 0&&(S.prevDep=O),x!==void 0?x.nextDep=O:b.deps=O,w!==void 0?w.nextSub=O:p.subs=O}function o(p,b=p.sub){const v=p.dep,x=p.prevDep,S=p.nextDep,w=p.nextSub,O=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=O:v.subsTail=O,O!==void 0?O.nextSub=w:(v.subs=w)===void 0&&i(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&&a(x),S&1){const w=x.subs;if(w!==void 0){const O=(p=w).nextSub;O!==void 0&&(v={value:b,prev:v},b=O);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,O=w.flags;if(b.flags&16)S=!0;else if((O&17)===17){if(t(w)){const z=w.subs;z.nextSub!==void 0&&h(z),S=!0}}else if((O&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 z=p.nextDep;if(z!==void 0){p=z;continue}}for(;x--;){const z=b.subs,R=z.nextSub!==void 0;if(R?(p=v.value,v=v.prev):p=z,S){if(t(b)){R&&h(z),b=p.sub;continue}S=!1}else b.flags&=-33;b=p.sub;const U=p.nextDep;if(U!==void 0){p=U;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&&a(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 iw(t,a,i){const r=typeof t=="object",o=r?t:void 0;return{next:(r?t.next:t)?.bind(o),error:(r?t.error:a)?.bind(o),complete:(r?t.complete:i)?.bind(o)}}const Qf=[];let uo=0;const{link:Sy,unlink:rw,propagate:lw,checkDirty:rb,shallowPropagate:_y}=sw({update(t){return t._update()},notify(t){Qf[Kf++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,xo(t))}});let Pl=0,Kf=0,ln,Gf=0;function ow(t){try{++Gf,t()}finally{--Gf||lb()}}function xo(t){const a=t.depsTail;let i=a!==void 0?a.nextDep:t.deps;for(;i!==void 0;)i=rw(i,t)}function lb(){if(!(Gf>0)){for(;Pl<Kf;){const t=Qf[Pl];Qf[Pl++]=void 0,t.notify()}Pl=0,Kf=0}}function wy(t,a){const i=typeof t=="function",r=t,o={_snapshot:i?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?0:1,get(){return ln!==void 0&&Sy(o,ln,uo),o._snapshot},subscribe(c){const d=iw(c),h={current:!1},m=uw(()=>{o.get(),h.current?(ln=void 0,d.next?.(o._snapshot)):h.current=!0});return{unsubscribe:()=>{m.stop()}}},_update(c){const d=ln,h=a?.compare??Object.is;if(i)ln=o,++uo,o.depsTail=void 0;else if(c===void 0)return!1;i&&(o.flags=5);try{const m=o._snapshot,p=typeof c=="function"?c(m):c===void 0&&i?r(m):c;return m===void 0||!h(m,p)?(o._snapshot=p,!0):!1}finally{ln=d,i&&(o.flags&=-5),xo(o)}}};return i?(o.flags=17,o.get=function(){const c=o.flags;if(c&16||c&32&&rb(o.deps,o)){if(o._update()){const d=o.subs;d!==void 0&&_y(d)}}else c&32&&(o.flags=c&-33);return ln!==void 0&&Sy(o,ln,uo),o._snapshot}):o.set=function(c){if(o._update(c)){const d=o.subs;d!==void 0&&(lw(d),_y(d),lb())}},o}function uw(t){const a=()=>{const r=ln;ln=i,++uo,i.depsTail=void 0,i.flags=6;try{return t()}finally{ln=r,i.flags&=-5,xo(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const r=this.flags;r&16||r&32&&rb(this.deps,this)?a():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,xo(this)}};return a(),i}var vf={exports:{}},bf={},xf={exports:{}},Sf={};var Oy;function cw(){if(Oy)return Sf;Oy=1;var t=Or();function a(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var i=typeof Object.is=="function"?Object.is:a,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}}),O=w[0].inst,z=w[1];return c(function(){O.value=S,O.getSnapshot=x,m(O)&&z({inst:O})},[v,S,x]),o(function(){return m(O)&&z({inst:O}),v(function(){m(O)&&z({inst:O})})},[v]),d(S),S}function m(v){var x=v.getSnapshot;v=v.value;try{var S=x();return!i(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 Sf.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:b,Sf}var Ey;function fw(){return Ey||(Ey=1,xf.exports=cw()),xf.exports}var jy;function dw(){if(jy)return bf;jy=1;var t=Or(),a=fw();function i(p,b){return p===b&&(p!==0||1/p===1/b)||p!==p&&b!==b}var r=typeof Object.is=="function"?Object.is:i,o=a.useSyncExternalStore,c=t.useRef,d=t.useEffect,h=t.useMemo,m=t.useDebugValue;return bf.useSyncExternalStoreWithSelector=function(p,b,v,x,S){var w=c(null);if(w.current===null){var O={hasValue:!1,value:null};w.current=O}else O=w.current;w=h(function(){function R(L){if(!U){if(U=!0,Q=L,L=x(L),S!==void 0&&O.hasValue){var A=O.value;if(S(A,L))return V=A}return V=L}if(A=V,r(Q,L))return A;var X=x(L);return S!==void 0&&S(A,X)?(Q=L,A):(Q=L,V=X)}var U=!1,Q,V,J=v===void 0?null:v;return[function(){return R(b())},J===null?void 0:function(){return R(J())}]},[b,v,x,S]);var z=o(p,w[0],w[1]);return d(function(){O.hasValue=!0,O.value=z},[z]),m(z),z},bf}var zy;function hw(){return zy||(zy=1,vf.exports=dw()),vf.exports}var mw=hw();function pw(t,a){return t===a}function ts(t,a=r=>r,i){const r=i?.compare??pw,o=W.useCallback(d=>{const{unsubscribe:h}=t.subscribe(d);return h},[t]),c=W.useCallback(()=>t.get(),[t]);return mw.useSyncExternalStoreWithSelector(o,c,c,a,r)}var Ny={};function gw(t,a){const i=W.useRef();return r=>{const o=t?.select?t.select(r):r;return t?.structuralSharing??a.options.defaultStructuralSharing?i.current=xa(i.current,o):o}}function rs(t){const a=xn(),i=W.useContext(t.from?aw:_r),r=t.from??i,o=a.stores.getMatchStore(r),c=gw(t,a),d=ts(o,h=>h?c(h):Ny);if(d!==Ny)return d;(t.shouldThrow??!0)&&ud()}function ob(t){return rs({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:a=>t.select?t.select(a.loaderData):a.loaderData})}function ub(t){const{select:a,...i}=t;return rs({...i,select:r=>a?a(r.loaderDeps):r.loaderDeps})}function cb(t){return rs({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:a=>{const i=t.strict===!1?a.params:a._strictParams;return t.select?t.select(i):i}})}function fb(t){return rs({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:a=>t.select?t.select(a.search):a.search})}function Co(t){const a=xn();return W.useCallback(i=>a.navigate({...i,from:i.from??t?.from}),[t?.from,a])}function db(t){return rs({...t,select:a=>t.select?t.select(a.context):a.context})}function yw(...t){const a=W.useRef(t),i=a.current;return t.forEach((r,o)=>{Hn(i[o],r,!1,!0)||(i[o]=r)}),a.current}function Xl(t,a){t.preloadRoute(a).catch(i=>{console.warn(i),console.warn(P1)})}function vw(t,a){const i=typeof t=="string"&&yr(t);if(i)return a.has(i)?t:null}function bw(t,a,i,r){const o=ny(t.pathname,r),c=ny(a.pathname,r);return(i?.exact?o!==c:!(o.startsWith(c)&&(o.length===c.length||o[c.length]==="/")))||(i?.includeSearch??!0)&&!Hn(t.search,a.search,!i?.exact,i?.explicitUndefined)?!1:!i?.includeHash||t.hash===a.hash}function xw(t,a,i){const r=xn(),o=W.useRef(null),c=W.useCallback(q=>{if(o.current=q,typeof a=="function")return a(q);a&&(a.current=q)},[a]),{activeOptions:d,to:h,preload:m,preloadDelay:p,disabled:b,target:v,onClick:x,onBlur:S,onFocus:w,onMouseEnter:O,onMouseLeave:z,onTouchStart:R}=t,[U,Q,V]=yw(t.search,t.params,d),J=W.useContext(_r),L=(r.stores._linkScopes??={})[J]??=nw(r,J),[A,X,P]=W.useMemo(()=>{const q=vw(h,r.protocolAllowlist);if(q!==void 0){const Ze=[q??void 0];return[t,()=>Ze]}const ee={...t};let ae,pe,xe;const je=()=>{const Ze=L[0]();if(Ze!==ae){ee._fromLocation=Ze;const He=r.buildLocation(ee),cn=Ew(He,r,b),Ra=b||cn&&!yr(cn)?bw(Ze,He,V,r.basepath):void 0;(!pe||pe[0]!==cn||pe[1]!==Ra)&&(pe=[cn,Ra]),ae=Ze}return pe};return[ee,je,V?.includeHash&&(()=>{const Ze=je();return Ze[1]?xe??=[Ze[0],!1]:Ze})]},[r,L,t.from,t.hash,t.href,h,U,Q,t.state,t.mask,t.unsafeRelative,V,b]),[te,le]=W.useSyncExternalStore(L[1],X,P||X),re=le===void 0&&te,me=b||te===void 0,ye=W.useRef(!1),F=t.reloadDocument||re||me?!1:m??r.options.defaultPreload,M=p??r.options.defaultPreloadDelay??0,I=W.useCallback(q=>{const ee=q?.isIntersecting;if(!(ee??F==="intent")){ee===!1&&Jl(o);return}if(!M){Xl(r,A);return}o.t??=setTimeout(()=>{o.t=void 0,Xl(r,A)},M)},[r,A,o,F,M]);W.useEffect(()=>{if(!F)return;F==="render"&&!ye.current&&(ye.current=!0,Xl(r,A));let q=!0,ee;return F==="viewport"&&o.current&&typeof IntersectionObserver=="function"&&(ee=new IntersectionObserver(ae=>{q&&I(ae.pop())},{rootMargin:"100px"}),ee.observe(o.current)),()=>{q=!1,ee?.disconnect(),Jl(o)}},[r,A,F,I,o]);const B=ww(t,i);if(B.ref=a?c:o,re)return B.href=re,B;const se=q=>{const ee=v??q.currentTarget.getAttribute("target");!me&&!(q.metaKey||q.altKey||q.ctrlKey||q.shiftKey)&&!q.defaultPrevented&&(!ee||ee==="_self")&&q.button===0&&(q.preventDefault(),Jl(o),r.navigate({...t,_fromLocation:A._fromLocation}))},fe=()=>{F==="intent"&&Xl(r,A)},j=()=>{F==="intent"&&Jl(o)};return B.onClick=Vs(x,se),B.onBlur=Vs(S,j),B.onFocus=Vs(w,I),B.onMouseEnter=Vs(O,I),B.onMouseLeave=Vs(z,j),B.onTouchStart=Vs(R,fe),Ow(B,t,le,te,me,i)}var Sw={},_w={className:"active"},hb=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 ww(t,a){const i={};for(const r in t)hb.has(r)||r==="type"&&a!==void 0||r==="disabled"&&a==="a"||(i[r]=t[r]);return i}function Ow(t,a,i,r,o,c){const{activeProps:d,inactiveProps:h,className:m,style:p,target:b}=a,v=Lv(i?d:h,{})??(i?_w:Sw);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),i&&(t["data-status"]="active",t["aria-current"]="page"),t}var Jl=t=>{clearTimeout(t.t),t.t=void 0},Vs=(t,a)=>t?i=>i.defaultPrevented||(t(i),i.defaultPrevented||a(i)):a;function Ew(t,a,i){if(i)return;const r=t.maskedLocation??t,o=r.external?r.publicHref:a.history.createHref(r.publicHref)||"/";if(!((r.external||o!==r.publicHref)&&Bv(o,a.protocolAllowlist)))return o}var ui=W.memo(W.forwardRef((t,a)=>{const i=t._asChild||"a",r=xw(t,a,i),o=typeof t.children=="function"?t.children({isActive:r["data-status"]==="active"}):t.children;return W.createElement(i,r,o)}),jw);function jw(t,a){let i=0;for(const r in a)if(i++,t[r]!==a[r]&&(!hb.has(r)||!Hn(t[r],a[r],!1,!0)))return!1;for(const r in t)i--;return i===0}var zw=class extends sb{constructor(t){super(t),this.useMatch=a=>rs({...a,from:this.id}),this.useRouteContext=a=>db({...a,from:this.id}),this.useSearch=a=>fb({...a,from:this.id}),this.useParams=a=>cb({...a,from:this.id}),this.useLoaderDeps=a=>ub({...a,from:this.id}),this.useLoaderData=a=>ob({...a,from:this.id}),this.useNavigate=()=>Co({from:this.fullPath}),this.Link=To.forwardRef((a,i)=>g.jsx(ui,{ref:i,from:this.fullPath,...a}))}};function ls(t){return new zw(t)}var Nw=class extends X1{constructor(t){super(t),this.useMatch=a=>rs({...a,from:this.id}),this.useRouteContext=a=>db({...a,from:this.id}),this.useSearch=a=>fb({...a,from:this.id}),this.useParams=a=>cb({...a,from:this.id}),this.useLoaderDeps=a=>ub({...a,from:this.id}),this.useLoaderData=a=>ob({...a,from:this.id}),this.useNavigate=()=>Co({from:this.fullPath}),this.Link=To.forwardRef((a,i)=>g.jsx(ui,{ref:i,from:this.fullPath,...a}))}};function Tw(t){return new Nw(t)}function Rw(t){const a=xn(),i=`not-found-${ts(a.stores.location,r=>r.pathname)}-${ts(a.stores.status)}`;return g.jsx(yd,{getResetKey:()=>i,onCatch:(r,o)=>{if(ti(r))t.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(ti(r))return t.fallback?.(r);throw r},children:t.children})}function Aw(){return g.jsx("p",{children:"Not Found"})}function mb(t,a,i){return a.options.notFoundComponent?g.jsx(a.options.notFoundComponent,{...i}):t.options.defaultNotFoundComponent?g.jsx(t.options.defaultNotFoundComponent,{...i}):g.jsx(Aw,{})}function Mo(t,a){const i=a?.options.pendingComponent??t.options.defaultPendingComponent;return i?g.jsx(i,{}):null}var Cw=(t,a)=>t[0]===a[0]&&t[1]===a[1],pb=(t,a,i)=>!a.isRoot||a.options.shellComponent||a.options.wrapInSuspense||i===!1||i==="data-only"||!t.ssr,gb=W.memo(function({routeId:a}){const i=xn(),r=i.stores.getMatchStore(a);return Mw(i,ts(r))});function Mw(t,a){const i=t.routesById[a.routeId],r=Mo(t,i),o=i.options.errorComponent??t.options.defaultErrorComponent,c=i.options.onCatch??t.options.defaultOnCatch,d=i.isRoot?i.options.notFoundComponent??t.options.notFoundRoute?.options.component:i.options.notFoundComponent,h=a.ssr===!1||a.ssr==="data-only",m=pb(t,i,a.ssr)&&(i.options.wrapInSuspense??r??(i.options.errorComponent?.preload||h));let p=g.jsx(Dw,{match:a});h&&(p=g.jsx(W1,{fallback:r,children:p})),d&&(p=g.jsx(Rw,{fallback:x=>{if(x.routeId??=a.routeId,x.routeId!==a.routeId)throw x;return W.createElement(d,x)},children:p})),o&&(p=g.jsx(yd,{getResetKey:()=>a,errorComponent:o,onCatch:(x,S)=>{if(ti(x))throw x.routeId??=a.routeId,x;c?.(x,S)},children:p})),m&&(p=g.jsx(W.Suspense,{fallback:r,children:p}));const b=null,v=i.isRoot&&i.options.shellComponent;return v?g.jsx(_r.Provider,{value:a.routeId,children:g.jsxs(v,{children:[p,b]})}):g.jsxs(_r.Provider,{value:a.routeId,children:[p,b]})}var Dw=W.memo(function({match:a}){const i=xn(),r=a.routeId,o=i.routesById[r],c=W.useMemo(()=>{const h=(o.options.remountDeps??i.options.defaultRemountDeps)?.({routeId:r,loaderDeps:a.loaderDeps,params:a._strictParams,search:a._strictSearch});return h?JSON.stringify(h):void 0},[r,a.loaderDeps,a._strictParams,a._strictSearch,o.options.remountDeps,i.options.defaultRemountDeps]),d=W.useMemo(()=>{const h=o.options.component??i.options.defaultComponent;return h?g.jsx(h,{},c):g.jsx(yb,{})},[c,o.options.component,i.options.defaultComponent]);if(a.status==="pending"){if(i.ssr&&!pb(i,o,a.ssr))return d;if(i._tx)throw i._tx[5];return Mo(i,o)}if(a.status==="notFound")return mb(i,o,a.error);if(a.status==="error")throw a.error;return d}),yb=W.memo(function(){const a=xn(),i=W.useContext(_r);let r,o,c;{const h=a.stores.getMatchStore(i);[r,o]=ts(h,m=>[!!m._notFound,m.error],{compare:Cw}),c=ts(a.stores.ids,m=>m[m.indexOf(i)+1])}if(r)return mb(a,a.routesById[i],o);if(!c)return null;const d=g.jsx(gb,{routeId:c});return i===Js?g.jsx(W.Suspense,{fallback:Mo(a),children:d}):d});function vb(t,a){const i=t[1];t.length=0,i?.(a)}function kw({t}){const a=xn(),i=a._rendered??=[];return a.startTransition=(r,o)=>new Promise(c=>{vb(i,!1),i.push(o,c),t(a),W.startTransition(r)}),Uv(()=>{const r=a.history.subscribe(a.load);a.updateLatestLocation();const o=a.latestLocation,c=a.buildLocation({to:o.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(gn(o.publicHref)!==gn(c.publicHref))return a.commitLocation({...c,replace:!0,ignoreBlocker:!0}),r;const d=a.stores.resolvedLocation.get();return d?.href===o.href&&d.state.__TSR_key===o.state.__TSR_key?i.push(a.stores.matches.get(),h=>{h&&a.emit({type:"onRendered",...Ro(d,d)})}):a._tx||a.load({sync:!0}).catch(console.error),r},[a,a.history]),null}function Uw(){const t=xn(),a=t.routesById[Js],i=Mo(t,a),r=g.jsxs(g.Fragment,{children:[g.jsx(kw,{t:W.useState()[1]}),t.ssr?g.jsx(Ty,{}):g.jsx(W.Suspense,{fallback:i,children:g.jsx(Ty,{})})]});return t.options.InnerWrap?g.jsx(t.options.InnerWrap,{children:r}):r}function Ty(){const t=xn(),a=t._rendered,i=ts(t.stores.matches,d=>a[0]??d),r=i[0],o=r?.routeId;Uv(()=>{a[0]===i&&vb(a,!0)},[a,i]);const c=o?g.jsx(gb,{routeId:o}):null;return t.options.disableGlobalCatchBoundary?c:g.jsx(yd,{getResetKey:()=>r,onCatch:void 0,children:c})}var Lw=t=>({createMutableStore:wy,createReadonlyStore:wy,batch:ow}),Zw=t=>new qw(t),qw=class extends M1{constructor(t){super(t,Lw)}};function Bw({router:t,children:a,...i}){Zv(i)&&t.update({...t.options,...i,context:{...t.options.context,...i.context}});const r=g.jsx(ib.Provider,{value:t,children:a});return t.options.Wrap?g.jsx(t.options.Wrap,{children:r}):r}function $w({router:t,...a}){return g.jsx(Bw,{router:t,...a,children:g.jsx(Uw,{})})}const Hw={sm:20,md:32,lg:48},Qw=[{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 bb({size:t="md",label:a,className:i=""}){const r=Hw[t];return g.jsx("svg",{"data-pattern":"OgygieMark",viewBox:"0 0 96 96",width:r,height:r,fill:"currentColor",className:`shrink-0 ${i}`,...a===void 0?{"aria-hidden":!0}:{role:"img","aria-label":a},children:Qw.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 Kw=t=>1-(1-t)**3;function Gw(t,a){return t.toLocaleString("fr-FR",{minimumFractionDigits:a,maximumFractionDigits:a})}function Yw(){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 Ry(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Fw(t){const[a,i]=W.useState(()=>typeof window>"u"||typeof window.requestAnimationFrame!="function"||Ry()?t:0),r=W.useRef(!1);return W.useEffect(()=>{if(r.current||typeof window.requestAnimationFrame!="function"||Ry()){r.current=!0,i(t);return}r.current=!0;const o=Yw();let c=null,d=0;const h=m=>{c===null&&(c=m);const p=Math.min(1,(m-c)/o);i(t*Kw(p)),p<1&&(d=window.requestAnimationFrame(h))};return d=window.requestAnimationFrame(h),()=>window.cancelAnimationFrame(d)},[t]),a}function vn({value:t,format:a,decimals:i=0,className:r=""}){const o=Fw(t),c=a===void 0?Gw(o,i):a(o);return g.jsx("span",{"data-pattern":"Counter","data-value":t,className:`tabular-nums ${r}`,children:c})}function Yf(t){const a=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,o])=>a.indexOf(+r)===-1).map(([r,o])=>o)}function Ay(t,a="|"){return t.map(i=>Eb(i)).join(a)}function Ff(t,a){return typeof a=="bigint"?a.toString():a}class Vw{constructor(a){this._getter=a,this._value=void 0}get value(){const a=this._getter;return a!==void 0&&(this._value=a(),this._getter=void 0),this._value}}function vd(t){return new Vw(t)}function Pw(t){return t==null}function bd(t){const a=t.startsWith("^")?1:0,i=t.endsWith("$")?t.length-1:t.length;return t.slice(a,i)}function Xw(t,a){const i=t/a,r=Math.round(i),o=4*Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-r)<o?0:i-r}function za(t,a,i){Object.defineProperty(t,a,{value:i,writable:!0,enumerable:!0,configurable:!0})}function xb(t){const a=Object.getOwnPropertyDescriptor(t,"shape");return a?.get?a.get.raw:a?.value}function Kn(t){return xb(t._zod.def)??t._zod.def.shape}function Sb(t,a,i){Object.defineProperty(t,a,{get(){const r=i();return za(this,a,r),r},enumerable:!0,configurable:!0})}function _b(t,a,i){a in t?za(t,a,i):t[a]=i}function ns(t,a,i,r){const o=Kn(a);for(const c of i){const d=Object.getOwnPropertyDescriptor(o,c);d.enumerable&&(d.get?Sb(t,c,()=>{const h=a._zod.def.shape[c];return r?r(h,c):h}):_b(t,c,r?r(d.value,c):d.value))}}function Jw(t,a){for(const i of Reflect.ownKeys(a)){const r=Object.getOwnPropertyDescriptor(a,i);r.enumerable&&(r.get?Sb(t,i,()=>a[i]):_b(t,i,r.value))}}function Qt(...t){const a={};for(const i of t){const r=Object.getOwnPropertyDescriptors(i);Object.assign(a,r)}return Object.defineProperties({},a)}function Iw(t){return JSON.stringify(t)}function Ww(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const wb="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function So(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const e2=vd(()=>{if(un.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function ni(t){if(So(t)===!1)return!1;const a=t.constructor;if(a===void 0||typeof a!="function")return!0;const i=a.prototype;return!(So(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Ob(t){return ni(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}const t2=new Set(["string","number","symbol"]);function ai(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Na(t,a,i){const r=new t._zod.constr(a??t._zod.def);return(!a||i?.parent)&&(r._zod.parent=t),r}function ue(t){const a=t;if(!a)return{};if(typeof a=="string")return{error:()=>a};if(a?.message!==void 0){if(a?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");a.error=a.message}return delete a.message,typeof a.error=="string"?{...a,error:()=>a.error}:a}function Eb(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function n2(t){return Object.keys(t).filter(a=>t[a]._zod.optin!==void 0&&t[a]._zod.optout==="optional")}const jb={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]},a2={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function s2(t,a){const i=t._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c={};return ns(c,t,Do(t,a)),Na(t,Qt(i,{shape:c,checks:[]}))}function Do(t,a){const i=Kn(t),r=[];for(const o of Reflect.ownKeys(a)){if(!Object.getOwnPropertyDescriptor(i,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);a[o]&&r.push(o)}return r}function i2(t,a){const i=t._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=new Set(Do(t,a)),d={};return ns(d,t,Reflect.ownKeys(Kn(t)).filter(h=>!c.has(h))),Na(t,Qt(i,{shape:d,checks:[]}))}function r2(t,a){if(!ni(a))throw new Error("Invalid input to extend: expected a plain object");const i=t._zod.def.checks;if(i&&i.length>0){const o=Kn(t);for(const c of Reflect.ownKeys(a))if(Object.getOwnPropertyDescriptor(o,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Na(t,Qt(t._zod.def,{shape:zb(t,a)}))}function zb(t,a){const i={};return ns(i,t,Reflect.ownKeys(Kn(t))),Jw(i,a),i}function l2(t,a){if(!ni(a))throw new Error("Invalid input to safeExtend: expected a plain object");return Na(t,Qt(t._zod.def,{shape:zb(t,a)}))}function o2(t,a){if(!a?._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 i={};ns(i,t,Reflect.ownKeys(Kn(t))),ns(i,a,Reflect.ownKeys(Kn(a)));const r=Qt(t._zod.def,{shape:i,get catchall(){return a._zod.def.catchall},checks:a._zod.def.checks??[]});return Na(t,r)}function Cy(t,a,i,r="partial"){const c=a._zod.def.checks;if(c&&c.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const h=i?new Set(Do(a,i)):void 0,m={};return ns(m,a,Reflect.ownKeys(Kn(a)),t&&((p,b)=>h&&!h.has(b)?p:new t({type:"optional",innerType:p}))),Na(a,Qt(a._zod.def,{shape:m,checks:[]}))}function u2(t,a,i){const r=i?new Set(Do(a,i)):void 0,o={};return ns(o,a,Reflect.ownKeys(Kn(a)),(c,d)=>r&&!r.has(d)?c:new t({type:"nonoptional",innerType:c})),Na(a,Qt(a._zod.def,{shape:o}))}function Bn(t,a=0){if(t.aborted===!0)return!0;for(let i=a;i<t.issues.length;i++)if(t.issues[i]?.continue!==!0)return!0;return!1}function c2(t,a=0){if(t.aborted===!0)return!0;for(let i=a;i<t.issues.length;i++)if(t.issues[i]?.continue===!1)return!0;return!1}function Ps(t,a){return a.map(i=>{var r;return(r=i).path??(r.path=[]),i.path.unshift(t),i})}function or(t){return typeof t=="string"?t:t?.message}function My(t){const a=[];for(const i of t??[]){const r=i._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&a.push([o,i])}return a}function Vf(t,a,i){var r;for(let o=a;o<t.length;o++)(r=t[o]).schema??(r.schema=i)}function Oa(t,a,i){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:or(t.inst?._zod.def?.error?.(t))??or(c?.(t))??or(a?.error?.(t))??or(i.customError?.(t))??or(i.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,a?.reportInput&&(h.input=t.input),h}const f2=/[\uD800-\uDBFF]/;function xd(t){const a=t.length;if(!f2.test(t))return a;let i=a;for(let r=0;r<a-1;r++)(t.charCodeAt(r)&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320&&(i--,r++);return i}function Sd(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function d2(t){const a=typeof t;switch(a){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";const i=t;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return a}function wr(...t){const[a,i,r]=t;return typeof a=="string"?{message:a,code:"custom",input:i,inst:r}:{...a}}function h2(t,a){for(const i in a){const r=Object.getOwnPropertyDescriptor(a,i);r.get?Object.defineProperty(t,i,{...r,enumerable:!1}):m2(t,i,r.value)}}function Ea(t,a,i,r=!0){return Object.defineProperty(t,a,{configurable:!0,writable:!0,enumerable:r,value:i}),i}function Nb(t,a,i){return Ea(t,a,i,!1)}function Tb(t,a){for(const i in t){const r=t[i];Object.defineProperty(a,i,{configurable:!0,enumerable:!0,get(){return Ea(this,i,r(this))},set(o){Ea(this,i,o)}})}return a}function m2(t,a,i){Object.defineProperty(t,a,{configurable:!0,get(){return this==null?i:Ea(this,a,i.bind(this))},set(r){Ea(this,a,r)}})}function p2(t,a){const i=Object.getPrototypeOf(t);return a in i?void 0:i}let _f,ya=!1;const g2={configurable:!0,get(){ya=!0}};function Ae(t,a,i){const r=Object.getPrototypeOf(t._zod);if(a in r&&_f!==t._zod){_f=void 0;return}_f=t._zod,Object.defineProperty(r,a,{configurable:!0,get(){Object.defineProperty(this,a,g2);const o=ya;ya=!1;try{const c=i(this);return ya?delete this[a]:Object.defineProperty(this,a,{configurable:!0,writable:!0,value:c}),ya=ya||o,c}catch(c){throw delete this[a],ya=ya||o,c}},set(o){Object.defineProperty(this,a,{configurable:!0,writable:!0,value:o})}})}function y2(t,a,i,r){const o=p2(t,a);o&&Object.defineProperty(o,a,{configurable:!0,get(){const c={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,a,c),c.value=i(this),Object.defineProperty(this,a,c),c.value},set(c){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:r,value:c})}})}const v2="~constantCatch";function b2(t){const a=()=>t;return a[v2]=!0,a}var Dy;const wf={value:void 0,enumerable:!1};let ky="captureStackTrace"in Error?Error:null;function x2(t){const a=ky;if(a){const i=a.stackTraceLimit;if(typeof i=="number"){try{a.stackTraceLimit=0}catch{return ky=null,new t}try{return new t}finally{a.stackTraceLimit=i}}}return new t}function G(t,a,i,r){const o={};function c(x){this.def=x,this.constr=v,this.traits=new Set}c.prototype=o;const d=i,h=d&&new WeakSet;function m(x,S){if(x._zod){if(x._zod.traits.has(t))return}else{wf.value=new c(S);try{Object.defineProperty(x,"_zod",wf)}finally{wf.value=void 0}}if(x._zod.traits.add(t),a(x,S),h){const O=Object.getPrototypeOf(x),z=x._zod.constr.prototype;let R=O;for(;R&&R!==z;)R=Object.getPrototypeOf(R);const U=R??O;h.has(U)||(h.add(U),h2(U,d))}const w=v.prototype;for(const O in w)Object.prototype.hasOwnProperty.call(w,O)&&(O in x||(x[O]=w[O].bind(x)))}const p=r?.Parent??Object;class b extends p{}Object.defineProperty(b,"name",{value:t});function v(x){const S=r?.Parent?x2(b):this;m(S,x);const w=S._zod.deferred;if(w){for(const z of w)z();S._zod.deferred=void 0}const O=globalThis.__zod_globalConfig?.postProcessor;return O&&O(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 Wa extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Rb extends Error{constructor(a){super(`Encountered unidirectional transform during encode: ${a}`),this.name="ZodEncodeError"}}(Dy=globalThis).__zod_globalConfig??(Dy.__zod_globalConfig={});const un=globalThis.__zod_globalConfig;function bn(t){return t&&Object.assign(un,t),un}function S2(){const t=this._zod;return t.message??(t.message=JSON.stringify(t.def,Ff,2)),t.message}function _2(t){this._zod.message=t}const w2={get:S2,set:_2,enumerable:!0,configurable:!0},Of={value:void 0,enumerable:!1},Uy=new WeakSet([Object.prototype,Error.prototype]),O2=(t,a)=>{t.name="$ZodError",Of.value=a,Object.defineProperty(t,"issues",Of),Of.value=void 0,Object.defineProperty(t,"message",w2);const i=Object.getPrototypeOf(t);Uy.has(i)||(Uy.add(i),Object.defineProperty(i,"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})}}))},E2=G("$ZodError",O2);function j2(t,a,i){return Object.prototype.hasOwnProperty.call(t,a)||(a==="__proto__"?Object.defineProperty(t,a,{value:i(),writable:!0,enumerable:!0,configurable:!0}):t[a]=i()),t[a]}function z2(t,a=i=>i.message){const i={},r=[];for(const o of t.issues)o.path.length>0?j2(i,o.path[0],()=>[]).push(a(o)):r.push(a(o));return{formErrors:r,fieldErrors:i}}function N2(t,a=i=>i.message){const i={_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)i._errors.push(a(d));else{let m=i,p=0;for(;p<h.length;){const b=h[p],v=p===h.length-1;if(b==="_errors"){v&&m._errors.push(a(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(a(d)),m=x,p++}}}};return r(t),i}function ko(t,a){return{callee:a?.callee??t,Err:a?.Err}}const _d=t=>{const a=(i,r,o,c)=>{const d=o?{...o,async:!1}:{async:!1},h=i._zod.run({value:r,issues:[]},d);if(h instanceof Promise)throw new Wa;if(h.issues.length){const m=new(c?.Err??t)(h.issues.map(p=>Oa(p,d,bn())));throw wb(m,c?.callee??a),m}return h.value};return a},wd=t=>{const a=async(i,r,o,c)=>{const d=o?{...o,async:!0}:{async:!0};let h=i._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=>Oa(p,d,bn())));throw wb(m,c?.callee??a),m}return h.value};return a},Od=t=>(a,i,r)=>{const o=r?{...r,async:!1}:{async:!1},c=a._zod.run({value:i,issues:[]},o);if(c instanceof Promise)throw new Wa;return c.issues.length?Ab(t,c.issues,o):{success:!0,data:c.value}};function Ab(t,a,i){let r;return{success:!1,get error(){return r||(r=new t(a.map(o=>Oa(o,i,bn()))),a=void 0,i=void 0),r},set error(o){r=o,a=void 0,i=void 0}}}const Ed=t=>async(a,i,r)=>{const o=r?{...r,async:!0}:{async:!0};let c=a._zod.run({value:i,issues:[]},o);return c instanceof Promise&&(c=await c),c.issues.length?Ab(t,c.issues,o):{success:!0,data:c.value}},T2=Symbol.for("zod.compile.invalid"),R2=Symbol.for("zod.compile.fallback"),A2=((t,a,i)=>{const r=t._zod.bag.validator;if(r!==void 0){if(r(a)!==T2)return!0;if(r.definite===!0&&i===void 0)return!1}return C2(t,a,i)});function C2(t,a,i){const r=i?{...i,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=t._zod.bag.fallbackRun;let c;if(o?(r[R2]=!0,c=o({value:a,issues:[]},r)):c=t._zod.run({value:a,issues:[]},r),c instanceof Promise)throw new Wa;return c.issues.length===0}const M2=async(t,a,i)=>{const r=i?{...i,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=t._zod.run({value:a,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},D2=t=>{const a=_d(t),i=(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return a(r,o,h,ko(i,d))};return i},k2=t=>{const a=_d(t),i=(r,o,c,d)=>a(r,o,c,ko(i,d));return i},U2=t=>{const a=wd(t),i=async(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return await a(r,o,h,ko(i,d))};return i},L2=t=>{const a=wd(t),i=async(r,o,c,d)=>await a(r,o,c,ko(i,d));return i},Z2=t=>(a,i,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Od(t)(a,i,o)},q2=t=>(a,i,r)=>Od(t)(a,i,r),B2=t=>async(a,i,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Ed(t)(a,i,o)},$2=t=>async(a,i,r)=>Ed(t)(a,i,r),H2=/^[cC][0-9a-z]{6,}$/,Q2=/^[0-9a-z]+$/,K2=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,G2=/^[0-9a-vA-V]{20}$/,Y2=/^[A-Za-z0-9]{27}$/,F2=/^[a-zA-Z0-9_-]{21}$/;function V2(t){return new RegExp(`^[a-zA-Z0-9_-]{${t}}$`)}const P2=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,X2=/^([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})$/,Ly=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)$/,J2=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,I2="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function W2(){return new RegExp(I2,"u")}const eO=/^(?:(?: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])$/,tO=/^(([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}|:))$/,nO=/^((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])$/,aO=/^(([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])$/,sO=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,iO=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,rO=/^https?$/,lO=/^\+[1-9]\d{6,14}$/,Cb="(?:(?:\\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 oO(t){return new RegExp(`^${t}$`)}const uO=oO(Cb);function Pf(t){const a="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${a}`:t.precision===0?`${a}:[0-5]\\d`:`${a}:[0-5]\\d\\.\\d{${t.precision}}`:t.seconds?`${a}:[0-5]\\d(?:\\.\\d+)?`:`${a}(?::[0-5]\\d(?:\\.\\d+)?)?`}function cO(t){return new RegExp(`^${Pf(t)}$`)}function fO(t){const a=["Z"];t.offset&&a.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${Pf({precision:t.precision,seconds:!0})}(?:${a.join("|")})`,r=t.local?`${i}|${Pf({precision:t.precision})}`:i;return new RegExp(`^${Cb}T(?:${r})$`)}const dO=/^[\s\S]{0,}$/,hO=/^-?\d+$/,jd=/^-?\d+(?:\.\d+)?$/,mO=/^(?:true|false)$/i,pO=/^[^A-Z]*$/,gO=/^[^a-z]*$/,At=G("$ZodCheck",(t,a)=>{var i;t._zod??(t._zod={}),t._zod.def=a,(i=t._zod).onattach??(i.onattach=[])}),zd=t=>{const a=t.value;return!Pw(a)&&a.length!==void 0},_o={number:"number",bigint:"bigint",object:"date"},Mb=G("$ZodCheckLessThan",(t,a)=>{At.init(t,a);const i=_o[typeof a.value];t._zod.check=r=>{(a.inclusive?r.value<=a.value:r.value<a.value)||r.issues.push({origin:_o[typeof r.value]??i,code:"too_big",maximum:typeof a.value=="object"?a.value.getTime():a.value,input:r.value,inclusive:a.inclusive,inst:t,continue:!a.abort})}}),Db=G("$ZodCheckGreaterThan",(t,a)=>{At.init(t,a);const i=_o[typeof a.value];t._zod.check=r=>{(a.inclusive?r.value>=a.value:r.value>a.value)||r.issues.push({origin:_o[typeof r.value]??i,code:"too_small",minimum:typeof a.value=="object"?a.value.getTime():a.value,input:r.value,inclusive:a.inclusive,inst:t,continue:!a.abort})}}),yO=G("$ZodCheckMultipleOf",(t,a)=>{At.init(t,a),t._zod.check=i=>{if(typeof i.value!=typeof a.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?a.value!==BigInt(0)&&i.value%a.value===BigInt(0):Xw(i.value,a.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:a.value,input:i.value,inst:t,continue:!a.abort})}}),vO=G("$ZodCheckNumberFormat",(t,a)=>{At.init(t,a),a.format=a.format||"float64";const i=a.format?.includes("int"),r=i?"int":"number",[o,c]=jb[a.format];t._zod.check=d=>{const h=d.value;if(i){if(!Number.isInteger(h)){d.issues.push({expected:r,format:a.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:!a.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:!a.abort});return}}h<o&&d.issues.push({origin:"number",input:h,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!a.abort}),h>c&&d.issues.push({origin:"number",input:h,code:"too_big",maximum:c,inclusive:!0,inst:t,continue:!a.abort})}}),bO=G("$ZodCheckMaxLength",(t,a)=>{var i;At.init(t,a),(i=t._zod.def).when??(i.when=zd),t._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>a.maximum?xd(o):c)<=a.maximum)return;const h=Sd(o);r.issues.push({origin:h,code:"too_big",maximum:a.maximum,inclusive:!0,input:o,inst:t,continue:!a.abort})}}),xO=G("$ZodCheckMinLength",(t,a)=>{var i;At.init(t,a),(i=t._zod.def).when??(i.when=zd),t._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>=a.minimum&&c<a.minimum*2?xd(o):c)>=a.minimum)return;const h=Sd(o);r.issues.push({origin:h,code:"too_small",minimum:a.minimum,inclusive:!0,input:o,inst:t,continue:!a.abort})}}),SO=G("$ZodCheckLengthEquals",(t,a)=>{var i;At.init(t,a),(i=t._zod.def).when??(i.when=zd),t._zod.check=r=>{const o=r.value,c=o.length,d=typeof o=="string"&&c>=a.length&&c<=a.length*2?xd(o):c;if(d===a.length)return;const h=Sd(o),m=d>a.length;r.issues.push({origin:h,...m?{code:"too_big",maximum:a.length}:{code:"too_small",minimum:a.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!a.abort})}}),Uo=G("$ZodCheckStringFormat",(t,a)=>{var i,r;At.init(t,a),a.pattern?(i=t._zod).check??(i.check=o=>{a.pattern.lastIndex=0,!a.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:a.format,input:o.value,...a.pattern?{pattern:a.pattern.toString()}:{},inst:t,continue:!a.abort})}):(r=t._zod).check??(r.check=()=>{})}),_O=G("$ZodCheckRegex",(t,a)=>{Uo.init(t,a),t._zod.check=i=>{a.pattern.lastIndex=0,!a.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:a.pattern.toString(),inst:t,continue:!a.abort})}}),wO=G("$ZodCheckLowerCase",(t,a)=>{a.pattern??(a.pattern=pO),Uo.init(t,a)}),OO=G("$ZodCheckUpperCase",(t,a)=>{a.pattern??(a.pattern=gO),Uo.init(t,a)}),EO=G("$ZodCheckIncludes",(t,a)=>{At.init(t,a);const i=ai(a.includes),r=new RegExp(typeof a.position=="number"?`^.{${a.position},}${i}`:i);a.pattern=r,t._zod.check=o=>{o.value.includes(a.includes,a.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:a.includes,input:o.value,inst:t,continue:!a.abort})}}),jO=G("$ZodCheckStartsWith",(t,a)=>{At.init(t,a);const i=new RegExp(`^${ai(a.prefix)}.*`);a.pattern??(a.pattern=i),t._zod.check=r=>{r.value.startsWith(a.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:a.prefix,input:r.value,inst:t,continue:!a.abort})}}),zO=G("$ZodCheckEndsWith",(t,a)=>{At.init(t,a);const i=new RegExp(`.*${ai(a.suffix)}$`);a.pattern??(a.pattern=i),t._zod.check=r=>{r.value.endsWith(a.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:a.suffix,input:r.value,inst:t,continue:!a.abort})}}),NO=G("$ZodCheckOverwrite",(t,a)=>{At.init(t,a),t._zod.check=i=>{i.value=a.tx(i.value)}});class TO{constructor(a=[],i={}){this.content=[],this.indent=0,this.args=a,this.closed=i}indented(a){this.indent+=1;try{a(this)}finally{this.indent-=1}}write(a){if(typeof a=="function"){a(this,{execution:"sync"}),a(this,{execution:"async"});return}const r=a.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 a=Function,i=this?.content??[""];return new a(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
12
|
+
${i.join(`
|
|
13
|
+
`)}
|
|
14
|
+
};`)(...Object.values(this.closed))}}const RO={major:4,minor:6,patch:7},Ge=G("$ZodType",(t,a)=>{var i;t??(t={}),t._zod.def=a,t._zod.bag=t._zod.bag||{},t._zod.version=RO;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)(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const c=(h,m,p)=>{if(h.memo)return h;let b=Bn(h),v;for(const x of m){if(x._zod.def.when){if(c2(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 Wa;if(v||w instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await w,h.issues.length!==S&&(Vf(h.issues,S,t),b||(b=Bn(h,S)))});else{if(h.issues.length===S)continue;Vf(h.issues,S,t),b||(b=Bn(h,S))}}return v?v.then(()=>h):h},d=(h,m,p)=>{if(Bn(h))return h.aborted=!0,h;const b=c(m,o,p);if(b instanceof Promise){if(p.async===!1)throw new Wa;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 Wa;return p.then(b=>c(b,o,m))}return c(p,o,m)}}},{get"~standard"(){return Nb(this,"~standard",Ub(this))},set"~standard"(t){Ea(this,"~standard",t)}}),kb=(t,a)=>t.issues.length?{issues:t.issues.map(i=>Oa(i,a,bn()))}:{value:t.value};async function AO(t,a){const i={async:!0};return kb(await t._zod.run({value:a,issues:[]},i),i)}function Ub(t){return{validate:a=>{const i={async:!1};try{const r=t._zod.run({value:a,issues:[]},i);if(!(r instanceof Promise))return kb(r,i)}catch{}return AO(t,a)},vendor:"zod",version:1}}const Nd=G("$ZodString",(t,a)=>{Ge.init(t,a),t._zod.pattern=a.pattern??dO,t._zod.parse=(i,r)=>{if(a.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:t}),i}}),Ke=G("$ZodStringFormat",(t,a)=>{Uo.init(t,a),Nd.init(t,a)}),CO=G("$ZodGUID",(t,a)=>{a.pattern??(a.pattern=X2),Ke.init(t,a)}),MO=G("$ZodUUID",(t,a)=>{if(a.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[a.version];if(r===void 0)throw new Error(`Invalid UUID version: "${a.version}"`);a.pattern??(a.pattern=Ly(r))}else a.pattern??(a.pattern=Ly());Ke.init(t,a)}),DO=G("$ZodEmail",(t,a)=>{a.pattern??(a.pattern=J2),Ke.init(t,a)}),Lb=1,wo=2;function Zb(t){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(t):(new URL(t),!0)}catch{return!1}}function kO(t,a){return!("normalize"in a)&&!("hostname"in a)&&!("protocol"in a)?Zb(t)||wo:UO(t,a)}function UO(t,a){if(!a.normalize&&a.protocol?.source===rO.source&&!/^https?:\/\//i.test(t))return Lb;try{if(typeof URL<"u"){const i=URL;if(typeof i.parse=="function")return i.parse(t)??wo}return new URL(t)}catch{return wo}}const LO=/[\t\n\r]/g;function Zy(t){return t.replace(LO,"")}function ZO(t,a){return a.lastIndex=0,a.test(t.hostname)}function qO(t,a){return a.lastIndex=0,a.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}const BO=G("$ZodURL",(t,a)=>{Ke.init(t,a),t._zod.check=i=>{try{const r=i.value.trim(),o=kO(r,a);if(o===Lb){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:t,continue:!a.abort});return}if(o===wo){i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:t,continue:!a.abort});return}if(o===!0){i.value=Zy(r);return}a.hostname&&!ZO(o,a.hostname)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:a.hostname.source,input:i.value,inst:t,continue:!a.abort}),a.protocol&&!qO(o,a.protocol)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:a.protocol.source,input:i.value,inst:t,continue:!a.abort}),i.value=a.normalize?o.href:Zy(r);return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:t,continue:!a.abort})}}}),$O=G("$ZodEmoji",(t,a)=>{a.pattern??(a.pattern=W2()),Ke.init(t,a)}),HO=G("$ZodNanoID",(t,a)=>{if(a.length!==void 0&&(!Number.isInteger(a.length)||a.length<1))throw new Error(`Invalid nanoid length: ${a.length}`);a.pattern??(a.pattern=a.length===void 0?F2:V2(a.length)),Ke.init(t,a)}),QO=G("$ZodCUID",(t,a)=>{a.pattern??(a.pattern=H2),Ke.init(t,a)}),KO=G("$ZodCUID2",(t,a)=>{a.pattern??(a.pattern=Q2),Ke.init(t,a)}),GO=G("$ZodULID",(t,a)=>{a.pattern??(a.pattern=K2),Ke.init(t,a)}),YO=G("$ZodXID",(t,a)=>{a.pattern??(a.pattern=G2),Ke.init(t,a)}),FO=G("$ZodKSUID",(t,a)=>{a.pattern??(a.pattern=Y2),Ke.init(t,a)}),VO=G("$ZodISODateTime",(t,a)=>{a.pattern??(a.pattern=fO(a)),Ke.init(t,a)}),PO=G("$ZodISODate",(t,a)=>{a.pattern??(a.pattern=uO),Ke.init(t,a)}),XO=G("$ZodISOTime",(t,a)=>{a.pattern??(a.pattern=cO(a)),Ke.init(t,a)}),JO=G("$ZodISODuration",(t,a)=>{a.pattern??(a.pattern=P2),Ke.init(t,a)}),IO=G("$ZodIPv4",(t,a)=>{a.pattern??(a.pattern=eO),Ke.init(t,a)}),WO=/^[0-9a-fA-F:.]+$/;function qb(t){return WO.test(t)?Zb(`http://[${t}]`):!1}const eE=G("$ZodIPv6",(t,a)=>{a.pattern??(a.pattern=tO),Ke.init(t,a),t._zod.check=i=>{qb(i.value)||i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:t,continue:!a.abort})}}),tE=G("$ZodCIDRv4",(t,a)=>{a.pattern??(a.pattern=nO),Ke.init(t,a)});function nE(t){const a=t.split("/");if(a.length!==2)return!1;const[i,r]=a;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:qb(i)}const aE=G("$ZodCIDRv6",(t,a)=>{a.pattern??(a.pattern=aO),Ke.init(t,a),t._zod.check=i=>{nE(i.value)||i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:t,continue:!a.abort})}});function Bb(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const $b=/^[0-9a-zA-Z+/]*={0,2}$/,sE=G("$ZodBase64",(t,a)=>{a.pattern??(a.pattern=$b),Ke.init(t,a),t._zod.check=i=>{Bb(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:t,continue:!a.abort})}}),Td=/^[A-Za-z0-9_-]*$/;function iE(t){if(!Td.test(t))return!1;const a=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),i=a.padEnd(Math.ceil(a.length/4)*4,"=");return Bb(i)}const rE=G("$ZodBase64URL",(t,a)=>{a.pattern??(a.pattern=Td),Ke.init(t,a),t._zod.check=i=>{iE(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:t,continue:!a.abort})}}),lE=G("$ZodE164",(t,a)=>{a.pattern??(a.pattern=lO),Ke.init(t,a)});function oE(t,a=null){try{const i=t.split(".");if(i.length!==3)return!1;const[r]=i;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||a&&(!("alg"in o)||o.alg!==a))}catch{return!1}}const uE=G("$ZodJWT",(t,a)=>{Ke.init(t,a),t._zod.check=i=>{oE(i.value,a.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:t,continue:!a.abort})}}),Hb=G("$ZodNumber",(t,a)=>{Ge.init(t,a),t._zod.pattern=jd,t._zod.parse=(i,r)=>{if(a.coerce)try{i.value=Number(i.value)}catch{}const o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;const c=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return i.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...c?{received:c}:{}}),i}}),cE=G("$ZodNumberFormat",(t,a)=>{vO.init(t,a),Hb.init(t,a)}),fE=G("$ZodBoolean",(t,a)=>{Ge.init(t,a),t._zod.pattern=mO,t._zod.parse=(i,r)=>{if(a.coerce)try{i.value=!!i.value}catch{}const o=i.value;return typeof o=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),i}}),dE=G("$ZodUnknown",(t,a)=>{Ge.init(t,a),t._zod.parse=i=>i}),hE=G("$ZodNever",(t,a)=>{Ge.init(t,a),t._zod.parse=(i,r)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:t}),i)});function mE(t,a){const i=My(t._zod.def.checks);if(!i.length)return;const r=Math.min(...i.map(c=>c[0])),o=t._zod.parse;t._zod.parse=(c,d)=>{const h=a(c.value);if(h>r&&!d?.skipChecks&&d?.direction!=="backward"){for(const[m,p]of My(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,Vf(c.issues,b,t),c}}return o(c,d)}}const pE=t=>Array.isArray(t)?t.length:-1;function qy(t,a,i){t.issues.length&&a.issues.push(...Ps(i,t.issues)),a.value[i]=t.value}const gE=G("$ZodArray",(t,a)=>{Ge.init(t,a);const i=un.memoizer;i?.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=i?i.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=a.element._zod.run({value:p,issues:[]},o);if(b instanceof Promise)d.push(b.then(v=>qy(v,r,m)));else if(qy(b,r,m),h&&b.issues.length!==0&&Bn(b))break}return d.length?Promise.all(d).then(()=>r):r},mE(t,pE)});function Oo(t,a,i,r,o,c){const d=i in r,h=c==="optional";if(!(!d&&h&&o==="optional")){if(t.issues.length){if(o!==void 0&&h&&!d)return;a.issues.push(...Ps(i,t.issues))}if(!d&&o===void 0){t.issues.length||a.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}t.value===void 0?(d||o==="defaulted"&&!h)&&(a.value[i]=void 0):a.value[i]=t.value}}const yE=[];function Qb(t){const a=Object.keys(t.shape),i=Object.getOwnPropertySymbols(t.shape),r=i.length?i:yE,o=r.length?[...a,...r]:a;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=n2(t.shape);return{...t,allKeys:o,symbolKeys:r,keySet:new Set(a),numKeys:a.length,optionalKeys:new Set(c)}}function Kb(t,a,i,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 a){if(d&&i.issues.length!==S){if(Bn(i,S))break;S=i.issues.length}if(m.has(w))continue;if(w==="__proto__"){b==="never"&&h.push(w);continue}if(b==="never"){h.push(w);continue}const O=p.run({value:a[w],issues:[]},r);O instanceof Promise?t.push(O.then(z=>Oo(z,i,w,a,v,x))):Oo(O,i,w,a,v,x)}return h.length&&i.issues.push({code:"unrecognized_keys",keys:h,input:a,inst:c,continue:!0}),t.length?Promise.all(t).then(()=>i):i}const vE=G("$ZodObject",(t,a)=>{Ge.init(t,a);const i=Object.getOwnPropertyDescriptor(a,"shape"),r=i?.get?i.get.raw:a.shape??{};if(r){const p=()=>{const b={...r};return Object.defineProperty(a,"shape",{value:b}),p.raw=b,b};p.raw=r,Object.defineProperty(a,"shape",{get:p})}const o=vd(()=>Qb(a));Ae(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)||za(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=So,d=a.catchall;let h;const m=un.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 O=p.issues.length;for(const z of h.allKeys){if(w&&p.issues.length!==O){if(Bn(p,O))break;O=p.issues.length}if(z==="__proto__")continue;const R=S[z],U=R._zod.optin,Q=R._zod.optout,V=R._zod.run({value:v[z],issues:[]},b);V instanceof Promise?x.push(V.then(J=>Oo(J,p,z,v,U,Q))):Oo(V,p,z,v,U,Q)}return d?Kb(x,v,p,b,o.value,t,w===!0):x.length?Promise.all(x).then(()=>p):p}}),bE=G("$ZodObjectJIT",(t,a)=>{vE.init(t,a);const i=t._zod.parse,r=vd(()=>Qb(a)),o=un.memoizer,c=S=>{const w=r.value,O=w.symbolKeys,z=new TO(["payload","ctx"],{shape:S,inst:t,memo:o,syms:O}),R=J=>`shape[${J}]._zod.run({ value: input[${J}], issues: [] }, ctx)`,U=(J,L)=>`
|
|
15
|
+
let ${J}_ab = false;
|
|
16
|
+
for (let i = 0; i < ${J}.issues.length; i++) {
|
|
17
|
+
const iss = ${J}.issues[i];
|
|
18
|
+
iss.path = iss.path ? [${L}, ...iss.path] : [${L}];
|
|
19
|
+
payload.issues.push(iss);
|
|
20
|
+
if (iss.continue !== true) ${J}_ab = true;
|
|
21
|
+
}
|
|
22
|
+
if (${J}_ab && ctx && ctx.abortEarly) {
|
|
23
|
+
payload.value = newResult;
|
|
24
|
+
return payload;
|
|
25
|
+
}`;z.write("const input = payload.value;");const Q=Object.create(null);let V=0;for(const J of w.allKeys)Q[J]=`key_${V++}`;z.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const J of w.allKeys){if(J==="__proto__")continue;const L=Q[J],A=typeof J=="symbol"?`syms[${O.indexOf(J)}]`:Iw(J),X=`${A} in input`,P=S[J],te=P?._zod?.optin,le=te!==void 0,re=P?._zod?.optout==="optional";if(z.write(`const ${L} = ${R(A)};`),le&&re){const me=te==="optional"?`${L}_present`:`${L}.value !== undefined || ${L}_present`;z.write(`
|
|
26
|
+
const ${L}_present = ${X};
|
|
27
|
+
if (!${L}.issues.length || ${L}_present) {
|
|
28
|
+
if (${L}.issues.length) {${U(L,A)}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (${me}) {
|
|
32
|
+
newResult[${A}] = ${L}.value;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
`)}else le?(z.write(`
|
|
37
|
+
if (${L}.issues.length) {${U(L,A)}
|
|
38
|
+
}
|
|
39
|
+
`),te==="defaulted"?z.write(`newResult[${A}] = ${L}.value;`):z.write(`
|
|
40
|
+
if (${L}.value !== undefined || ${X}) {
|
|
41
|
+
newResult[${A}] = ${L}.value;
|
|
42
|
+
}
|
|
43
|
+
`)):z.write(`
|
|
44
|
+
const ${L}_present = ${X};
|
|
45
|
+
if (${L}.issues.length) {${U(L,A)}
|
|
46
|
+
}
|
|
47
|
+
if (!${L}_present && !${L}.issues.length) {
|
|
48
|
+
payload.issues.push({
|
|
49
|
+
code: "invalid_type",
|
|
50
|
+
expected: "nonoptional",
|
|
51
|
+
input: undefined,
|
|
52
|
+
path: [${A}]
|
|
53
|
+
});
|
|
54
|
+
if (ctx && ctx.abortEarly) {
|
|
55
|
+
payload.value = newResult;
|
|
56
|
+
return payload;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (${L}_present) {
|
|
61
|
+
newResult[${A}] = ${L}.value;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
`)}return z.write("payload.value = newResult;"),z.write("return payload;"),z.compile()};let d;const h=So,m=!un.jitless,b=m&&e2.value,v=a.catchall;let x;t._zod.parse=(S,w)=>{x??(x=r.value);const O=S.value;return h(O)?m&&b&&w?.async===!1&&w.jitless!==!0?(d||(d=c(a.shape)),S=d(S,w),v?Kb([],O,S,w,x,t,w?.abortEarly===!0):S):i(S,w):(S.issues.push({expected:"object",code:"invalid_type",input:O,inst:t}),S)}});function By(t,a,i,r){for(const c of t)if(c.issues.length===0)return a.value=c.value,a;const o=t.filter(c=>!Bn(c));return o.length===1?(a.value=o[0].value,o[0]):(a.issues.push({code:"invalid_union",input:a.value,inst:i,errors:t.map(c=>c.issues.map(d=>Oa(d,r,bn())))}),a)}const xE=G("$ZodUnion",(t,a)=>{Ge.init(t,a),Ae(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),Ae(t,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ae(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)))}),Ae(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=>bd(c.source)).join("|")})$`)}});const i=a.options.length===1?a.options[0]._zod.run:null;t._zod.parse=(r,o)=>{if(i)return i(r,o);let c=!1;const d=[];for(const h of a.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=>By(h,r,t,o)):By(d,r,t,o)}}),SE=G("$ZodIntersection",(t,a)=>{Ge.init(t,a),t._zod.parse=(i,r)=>{const o=i.value,c=a.left._zod.run({value:o,issues:[]},r),d=a.right._zod.run({value:o,issues:[]},r);return c instanceof Promise||d instanceof Promise?Promise.all([c,d]).then(([m,p])=>$y(i,m,p)):$y(i,c,d)}});function Xf(t,a){if(t===a)return{valid:!0,data:t};if(t instanceof Date&&a instanceof Date&&+t==+a)return{valid:!0,data:t};if(ni(t)&&ni(a)){const i=Object.keys(a),r=Object.keys(t).filter(c=>i.indexOf(c)!==-1),o={...t,...a};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const c of r){if(c==="__proto__")continue;const d=Xf(t[c],a[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(a)){if(t.length!==a.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let r=0;r<t.length;r++){const o=t[r],c=a[r],d=Xf(o,c);if(!d.valid)return{valid:!1,mergeErrorPath:[r,...d.mergeErrorPath]};i.push(d.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function $y(t,a,i){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 a.issues)d(p,"l")||t.issues.push(p);for(const p of i.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=Xf(a.value,i.value);if(!m.valid){if(Bn(t))return t;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(m.mergeErrorPath)}`)}return t.value=m.data,t}const _E=G("$ZodRecord",(t,a)=>{Ge.init(t,a);const i=un.memoizer;i?.attach(t),t._zod.parse=(r,o)=>{const c=r.value;if(!ni(c))return r.issues.push({expected:"record",code:"invalid_type",input:c,inst:t}),r;const d=[],h=a.keyType._zod.values;if(h&&!a.partial){r.value=i?i.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=a.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=>Oa(w,o,bn())),input:b,path:[b],inst:t});continue}const x=v.value;if(x==="__proto__")continue;const S=a.valueType._zod.run({value:c[b],issues:[]},o);S instanceof Promise?d.push(S.then(w=>{w.issues.length&&r.issues.push(...Ps(b,w.issues)),r.value[x]=w.value})):(S.issues.length&&r.issues.push(...Ps(b,S.issues)),r.value[x]=S.value)}let p;for(const b in c)if(!m.has(b))if(a.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=i?i.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=a.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"&&jd.test(p)&&b.issues.length){const w=a.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){a.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=>Oa(w,o,bn())),input:p,path:[p],inst:t});continue}const x=b.value;if(x==="__proto__")continue;const S=a.valueType._zod.run({value:c[p],issues:[]},o);S instanceof Promise?d.push(S.then(w=>{w.issues.length&&r.issues.push(...Ps(p,w.issues)),r.value[x]=w.value})):(S.issues.length&&r.issues.push(...Ps(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}}),wE=G("$ZodEnum",(t,a)=>{Ge.init(t,a);const i=Yf(a.entries),r=new Set(i);t._zod.values=r,Ae(t,"pattern",o=>{const c=Yf(o.def.entries).filter(d=>t2.has(typeof d));return new RegExp(c.length?`^(${c.map(d=>ai(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:i,input:d,inst:t}),o}}),OE=G("$ZodLiteral",(t,a)=>{Ge.init(t,a);const i=new Set(a.values);t._zod.values=i,Ae(t,"pattern",r=>{const o=r.def.values;return new RegExp(o.length?`^(${o.map(c=>typeof c=="string"?ai(c):c?ai(c.toString()):String(c)).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(r,o)=>{const c=r.value;return i.has(c)||r.issues.push({code:"invalid_value",values:a.values,input:c,inst:t}),r}}),EE=G("$ZodTransform",(t,a)=>{Ge.init(t,a),t._zod.optin="optional",un.memoizer?.guard(t),t._zod.parse=(i,r)=>{if(r.direction==="backward")throw new Rb(t.constructor.name);const o=a.transform(i.value,i);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(d=>(i.value=d,i));if(o instanceof Promise)throw new Wa;return i.value=o,i}});function Hy(t,a){return t.value=a.issues.length?void 0:a.value,t}const Gb=G("$ZodOptional",(t,a)=>{Ge.init(t,a),Ae(t,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",Ae(t,"values",i=>{const r=i.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),Ae(t,"pattern",i=>{const r=i.def.innerType._zod.pattern;return r?new RegExp(`^(${bd(r.source)})?$`):void 0}),t._zod.parse=(i,r)=>{if(i.value===void 0){if(a.innerType._zod.optin!=="defaulted")return i;const o=a.innerType._zod.run({value:i.value,issues:[]},r);return o instanceof Promise?o.then(c=>Hy(i,c)):Hy(i,o)}return a.innerType._zod.run(i,r)}}),jE=G("$ZodExactOptional",(t,a)=>{Gb.init(t,a),Ae(t,"values",i=>i.def.innerType._zod.values),Ae(t,"pattern",i=>i.def.innerType._zod.pattern),t._zod.parse=(i,r)=>a.innerType._zod.run(i,r)}),zE=G("$ZodNullable",(t,a)=>{Ge.init(t,a),Ae(t,"optin",i=>i.def.innerType._zod.optin),Ae(t,"optout",i=>i.def.innerType._zod.optout),Ae(t,"pattern",i=>{const r=i.def.innerType._zod.pattern;return r?new RegExp(`^(${bd(r.source)}|null)$`):void 0}),Ae(t,"values",i=>i.def.innerType._zod.values?new Set([...i.def.innerType._zod.values,null]):void 0),t._zod.parse=(i,r)=>i.value===null?i:a.innerType._zod.run(i,r)}),NE=G("$ZodDefault",(t,a)=>{Ge.init(t,a),t._zod.optin="defaulted",Ae(t,"values",i=>i.def.innerType._zod.values),t._zod.parse=(i,r)=>{if(r.direction==="backward")return a.innerType._zod.run(i,r);if(i.value===void 0)return i.value=a.defaultValue,i;const o=a.innerType._zod.run(i,r);return o instanceof Promise?o.then(c=>Qy(c,a)):Qy(o,a)}});function Qy(t,a){return t.value===void 0&&(t.value=a.defaultValue),t}const TE=G("$ZodPrefault",(t,a)=>{Ge.init(t,a),t._zod.optin="defaulted",Ae(t,"values",i=>i.def.innerType._zod.values),t._zod.parse=(i,r)=>(r.direction==="backward"||i.value===void 0&&(i.value=a.defaultValue),a.innerType._zod.run(i,r))}),RE=G("$ZodNonOptional",(t,a)=>{Ge.init(t,a),Ae(t,"values",i=>{const r=i.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),t._zod.parse=(i,r)=>{const o=a.innerType._zod.run(i,r);return o instanceof Promise?o.then(c=>Ky(c,t)):Ky(o,t)}});function Ky(t,a){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:a}),t}function Gy(t,a,i,r){return a.issues.length?(t.value=i.catchValue({...a,value:t.value,error:{issues:a.issues.map(o=>Oa(o,r,bn()))},input:t.value}),t):(t.value=a.value,a.memo&&(t.memo=!0),t)}const AE=G("$ZodCatch",(t,a)=>{Ge.init(t,a),Ae(t,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Ae(t,"optout",i=>i.def.innerType._zod.optout),Ae(t,"values",i=>i.def.innerType._zod.values),t._zod.parse=(i,r)=>{if(r.direction==="backward")return a.innerType._zod.run(i,r);const o=a.innerType._zod.run({value:i.value,issues:[]},r);return o instanceof Promise?o.then(c=>Gy(i,c,a,r)):Gy(i,o,a,r)}}),CE=G("$ZodPipe",(t,a)=>{Ge.init(t,a),Ae(t,"values",i=>i.def.in._zod.values),Ae(t,"optin",i=>i.def.in._zod.optin),Ae(t,"optout",i=>i.def.out._zod.optout),Ae(t,"propValues",i=>i.def.in._zod.propValues),t._zod.parse=(i,r)=>{if(r.direction==="backward"){const c=a.out._zod.run(i,r);return c instanceof Promise?c.then(d=>Il(d,a.in,r)):Il(c,a.in,r)}const o=a.in._zod.run(i,r);return o instanceof Promise?o.then(c=>Il(c,a.out,r)):Il(o,a.out,r)}});function Il(t,a,i){return t.issues.some(r=>r.code!=="unrecognized_keys")?(t.aborted=!0,t):a._zod.run({value:t.value,issues:t.issues},i)}const ME=G("$ZodReadonly",(t,a)=>{Ge.init(t,a),Ae(t,"propValues",i=>i.def.innerType._zod.propValues),Ae(t,"values",i=>i.def.innerType._zod.values),Ae(t,"optin",i=>i.def.innerType?._zod?.optin),Ae(t,"optout",i=>i.def.innerType?._zod?.optout),t._zod.parse=(i,r)=>{if(r.direction==="backward")return a.innerType._zod.run(i,r);const o=a.innerType._zod.run(i,r);return o instanceof Promise?o.then(Yy):Yy(o)}});function Yy(t){return t.memo||(t.value=Object.freeze(t.value)),t}const DE=G("$ZodCustom",(t,a)=>{At.init(t,a),Ge.init(t,a),t._zod.parse=(i,r)=>i,t._zod.check=i=>{const r=i.value,o=a.fn(r);if(o instanceof Promise)return o.then(c=>Fy(c,i,r,t));Fy(o,i,r,t)}});function Fy(t,a,i,r){if(!t){const o={code:"custom",input:i,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),a.issues.push(wr(o))}}class kE extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Jf="~memo",Vy=[];function Yb(t){return t!==null&&typeof t=="object"}function Ef(t){return t.map(a=>a.path?{...a,path:a.path.slice()}:{...a})}const Fb=new WeakMap,dr=0,co=1,pr=2;function fo(t,a,i){const r=Fb.get(t);if(r!==void 0)return r?pr:dr;if(a.has(t))return pr;a.add(t);let o=dr;const c=b=>{if(o!==pr&&b?._zod){const v=fo(b,a);v>o&&(o=v)}},d=(b,v)=>{let x=dr;for(const S of Reflect.ownKeys(b)){const w=Object.getOwnPropertyDescriptor(b,S);if(!w.enumerable)continue;const O=w.get?co:w.value?._zod?fo(w.value,a):dr;O>x&&(x=O)}return x},h=b=>{b>o&&(o=b)},m=t._zod.def;switch(m.type){case"object":{const b=xb(m);h(b?d(b):co),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?fo(b,a):co);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 a.delete(t),UE(t,o)}function UE(t,a){return a!==co&&Fb.set(t,a===pr),a}function LE(t,a){let i=t.buckets.get(a);return i||(i=new WeakMap,t.buckets.set(a,i)),i}let Wl;const eo=[],ZE={alloc(t,a,i){const r=Wl;if(!r)return i;Wl=void 0;const o={value:i,issues:null};return r.set(a.value,o),eo.push(o),i},guard(t){var a;(a=t._zod).deferred??(a.deferred=[]),t._zod.deferred.push(()=>{const i=t._zod.parse,r=(o,c)=>{if(c.direction!=="backward"&&BE(c,o.value))throw new kE;return i(o,c)};t._zod.parse=r,t._zod.run===i&&(t._zod.run=r)})},attach(t){var a;let i,r=!1,o,c;(a=t._zod).deferred??(a.deferred=[]),t._zod.deferred.push(()=>{const d=t._zod.parse,h=(m,p)=>{if(i===void 0){const R=fo(t,new Set);if(R===dr)return t._zod.parse=d,t._zod.run===h&&(t._zod.run=d),d(m,p);R===pr||r?i=!0:r=!0}const b=m.value;if(!Yb(b))return d(m,p);let v=p[Jf];v||(v={buckets:new WeakMap,backEdges:void 0},p[Jf]=v);let x;o===p?x=c:(x=LE(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(...Ef(S.issues)):(m.memo=!0,v.backEdges??(v.backEdges=new WeakSet),v.backEdges.add(S.value)),m;Wl=x;const w=eo.length,O=d(m,p);Wl=void 0;const z=eo.length>w?eo.pop():void 0;return O instanceof Promise?O.then(R=>(z&&(z.issues=R.issues.length?Ef(R.issues):Vy),R)):(z&&(z.issues=O.issues.length?Ef(O.issues):Vy),O)};t._zod.parse=h,t._zod.run===d&&(t._zod.run=h)})}};function qE(){return ZE}function BE(t,a){const i=t[Jf]?.backEdges;return i!==void 0&&Yb(a)&&i.has(a)}const $E=()=>{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 a(c){return t[c]??null}const i={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=d2(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 ${Eb(c.values[0])}`:`Invalid option: expected one of ${Ay(c.values,"|")}`;case"too_big":{const d=c.exact?"exactly ":c.inclusive?"<=":"<",h=a(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=a(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 ${i[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":""}: ${Ay(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 HE(){return{localeError:$E()}}var Py;class QE{constructor(){this._map=new WeakMap,this._idmap=new Map}add(a,...i){const r=i[0];return this._map.set(a,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,a),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(a){const i=this._map.get(a);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(a),this}get(a){const i=a._zod.parent;if(i){const r={...this.get(i)??{}};delete r.id;const o={...r,...this._map.get(a)};return Object.keys(o).length?o:void 0}return this._map.get(a)}has(a){return this._map.has(a)}}function KE(){return new QE}(Py=globalThis).__zod_globalRegistry??(Py.__zod_globalRegistry=KE());const hr=globalThis.__zod_globalRegistry;function Vb(t){return t.checks&&(t.checks=[...t.checks]),t}function GE(t,a){return new t(Vb({type:"string",...ue(a)}))}function YE(t,a){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ue(a)})}function FE(t,a){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ue(a)})}function VE(t,a){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ue(a)})}function PE(t,a){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ue(a)})}function XE(t,a){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ue(a)})}function JE(t,a){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ue(a)})}function IE(t,a){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ue(a)})}function WE(t,a){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ue(a)})}function ej(t,a){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ue(a)})}function tj(t,a){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ue(a)})}function nj(t,a){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ue(a)})}function aj(t,a){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ue(a)})}function sj(t,a){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ue(a)})}function ij(t,a){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ue(a)})}function rj(t,a){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ue(a)})}function lj(t,a){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ue(a)})}function oj(t,a){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ue(a)})}function uj(t,a){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ue(a)})}function cj(t,a){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ue(a)})}function fj(t,a){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ue(a)})}function dj(t,a){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ue(a)})}function hj(t,a){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ue(a)})}function Pb(t,a){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ue(a)})}function mj(t,a){return new t({type:"string",format:"date",check:"string_format",...ue(a)})}function pj(t,a){return new t({type:"string",format:"time",check:"string_format",precision:null,...ue(a)})}function gj(t,a){return new t({type:"string",format:"duration",check:"string_format",...ue(a)})}function yj(t,a){return new t(Vb({type:"number",checks:[],...ue(a)}))}function vj(t,a){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ue(a)})}function bj(t,a){return new t({type:"boolean",...ue(a)})}function xj(t){return new t({type:"unknown"})}function Sj(t,a){return new t({type:"never",...ue(a)})}function Xy(t,a){return new Mb({check:"less_than",...ue(a),value:t,inclusive:!1})}function jf(t,a){return new Mb({check:"less_than",...ue(a),value:t,inclusive:!0})}function Jy(t,a){return new Db({check:"greater_than",...ue(a),value:t,inclusive:!1})}function zf(t,a){return new Db({check:"greater_than",...ue(a),value:t,inclusive:!0})}function Iy(t,a){return new yO({check:"multiple_of",...ue(a),value:t})}function Xb(t,a){return new bO({check:"max_length",...ue(a),maximum:t})}function Eo(t,a){return new xO({check:"min_length",...ue(a),minimum:t})}function Jb(t,a){return new SO({check:"length_equals",...ue(a),length:t})}function _j(t,a){return new _O({check:"string_format",format:"regex",...ue(a),pattern:t})}function wj(t){return new wO({check:"string_format",format:"lowercase",...ue(t)})}function Oj(t){return new OO({check:"string_format",format:"uppercase",...ue(t)})}function Ej(t,a){return new EO({check:"string_format",format:"includes",...ue(a),includes:t})}function jj(t,a){return new jO({check:"string_format",format:"starts_with",...ue(a),prefix:t})}function zj(t,a){return new zO({check:"string_format",format:"ends_with",...ue(a),suffix:t})}function ci(t){return new NO({check:"overwrite",tx:t})}function Nj(t){return ci(a=>a.normalize(t))}function Tj(){return ci(t=>t.trim())}function Rj(){return ci(t=>t.toLowerCase())}function Aj(){return ci(t=>t.toUpperCase())}function Cj(){return ci(t=>Ww(t))}function Mj(t,a,i){return new t({type:"array",element:a,...ue(i)})}function Dj(t,a,i){return new t({type:"custom",check:"custom",fn:a,...ue(i)})}function kj(t,a){const i=Uj(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(wr(o,r.value,i._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=i),c.continue??(c.continue=!i._zod.def.abort),r.issues.push(wr(c))}},t(r.value,r)),a);return i}function Uj(t,a){const i=new At({check:"custom",...ue(a)});return i._zod.check=t,i}function gr(t,...a){for(const i of a)for(const r of Reflect.ownKeys(i))Object.prototype.propertyIsEnumerable.call(i,r)&&za(t,r,i[r]);return t}function Ib(t){let a=t?.target??"draft-2020-12";return a==="draft-4"&&(a="draft-04"),a==="draft-7"&&(a="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??hr,target:a,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 ja(t,a,i,r,o){const c=typeof a.unrepresentable=="function"?a.unrepresentable({zodSchema:t,path:r.path,message:o}):a.unrepresentable;if(c==="any")return!1;if(c===void 0||c==="throw")throw new Error(o);return Object.assign(i,c),!0}function at(t,a,i={path:[],schemaPath:[]}){var r;const o=t._zod.def,c=a.seen.get(t);if(c)return c.count++,i.schemaPath.includes(t)&&(c.cycle=i.path),c.schema;const d={schema:{},count:1,cycle:void 0,path:i.path};a.seen.set(t,d),a.sharedDefsExtractedFor=void 0,a.sharedEmitDoneFor=void 0;const h=t._zod.toJSONSchema?.();if(h)d.schema=h;else{const b={...i,schemaPath:[...i.schemaPath,t],path:i.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(a,d.schema,b);else{const x=d.schema,S=a.processors[o.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);S(t,a,x,b)}const v=t._zod.parent;v&&(d.ref||(d.ref=v),at(v,a,b),a.seen.get(v).isParent=!0)}const m=a.metadataRegistry.get(t);return m&&gr(d.schema,m),a.io==="input"&&xt(t)&&(delete d.schema.examples,delete d.schema.default),a.io==="input"&&"_prefault"in d.schema&&((r=d.schema).default??(r.default=d.schema._prefault)),delete d.schema._prefault,a.seen.get(t).schema}function Wy(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function Wb(t,a){const i=t.seen.get(a);if(!i)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}/${Wy(S)}`}}const m="#",p=`${m}/${h}/`;if(d[1]===i&&!d[1].schema.id)return{ref:m};const b=d[1].schema.id??`__schema${t.counter++}`;return{defId:b,ref:p+Wy(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(a===d[0]){c(d);continue}if(t.external){const p=t.external.registry.get(d[0])?.id;if(a!==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 e0(t){const a=t.anyOf;if(!Array.isArray(a)||a.length===0||t.type!==void 0)return;const i=[];for(const r of a){if(!r||typeof r!="object")return;e0(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;i.includes(d)||i.push(d)}}delete t.anyOf,t.type=i.length===1?i[0]:i}const t0=new Set(["type","properties","required","additionalProperties"]),ev=["oneOf","anyOf"];function tv(t){const a=t.additionalProperties;return a===void 0||a===!1||typeof a!="object"||a===null?null:Object.keys(a).length?a:null}function If(t){const a=[];for(const c of t){if(typeof c!="object"||c.type!=="object")return null;for(const d in c)if(!t0.has(d))return null;a.push(c)}const i={},r=new Set;for(const c of a){for(const d in c.properties){if(Object.prototype.hasOwnProperty.call(i,d))continue;const h=[];for(const p of a){const b=p.properties?.[d]??tv(p);b!=null&&(h.some(v=>JSON.stringify(v)===JSON.stringify(b))||h.push(b))}const m=h.length===1?h[0]:If(h)??{allOf:h};za(i,d,m)}for(const d of c.required??[])r.add(d)}const o={type:"object",properties:i};if(r.size&&(o.required=[...r]),a.every(c=>c.additionalProperties===!1))o.additionalProperties=!1;else{const c=[];for(const d of a){const h=tv(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 Lj(t){const a=t.allOf;if(!Array.isArray(a)||a.length<2)return;for(const o of t0)if(o in t)return;const i=a.filter(o=>ev.some(c=>Array.isArray(o[c])));let r=null;if(!i.length)r=If(a);else{const o=i[0],c=ev.find(m=>Array.isArray(o[m]));if(Object.keys(o).length!==1)return;const d=a.filter(m=>m!==o),h=o[c].map(m=>If([...d,m]));if(h.some(m=>!m))return;r={[c]:h}}r&&(delete t.allOf,gr(t,r))}function n0(t,a){const i=t.seen.get(a);if(!i)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)):gr(p,w),gr(p,b),h._zod.parent===v)for(const z in p)z==="$ref"||z==="allOf"||z in b||delete p[z];if(w.$ref&&S.def)for(const z in p)z==="$ref"||z==="allOf"||z in S.def&&JSON.stringify(p[z])===JSON.stringify(S.def[z])&&delete p[z]}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())e0(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)??[])Lj(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(a)?.id;if(!h)throw new Error("Schema is missing an `id` property");o.$id=t.external.uri(h)}gr(o,i.defId?i.schema:i.def??i.schema);const c=t.metadataRegistry.get(a)?.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,za(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:{...a["~standard"],jsonSchema:{input:jo(a,"input",t.processors),output:jo(a,"output",t.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function xt(t,a){const i=a??{seen:new Set};if(i.seen.has(t))return!1;i.seen.add(t);const r=t._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return xt(r.element,i);if(r.type==="set")return xt(r.valueType,i);if(r.type==="lazy")return xt(r.getter(),i);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 xt(r.innerType,i);if(r.type==="intersection")return xt(r.left,i)||xt(r.right,i);if(r.type==="record"||r.type==="map")return xt(r.keyType,i)||xt(r.valueType,i);if(r.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:xt(r.in,i)||xt(r.out,i);if(r.type==="object"){for(const o in r.shape)if(xt(r.shape[o],i))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(xt(o,i))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(xt(o,i))return!0;return!!(r.rest&&xt(r.rest,i))}return!1}const Zj=(t,a={})=>i=>{const r=Ib({...i,processors:a});return at(t,r),Wb(r,t),n0(r,t)},jo=(t,a,i={})=>r=>{const{libraryOptions:o,target:c}=r??{},d=Ib({...o??{},target:c,io:a,processors:i});return at(t,d),Wb(d,t),n0(d,t)},si=(t,a,i)=>{(t[a]===void 0||i>t[a])&&(t[a]=i)},ii=(t,a,i)=>{(t[a]===void 0||i<t[a])&&(t[a]=i)},nv=(t,a)=>{si(t,"minimum",a),ii(t,"maximum",a)},a0=(t,a)=>{t.multipleOf??(t.multipleOf=[]),t.multipleOf.includes(a)||t.multipleOf.push(a)},s0=(t,a)=>{t.patterns??(t.patterns=new Set),t.patterns.add(a)},i0=(t,a)=>{t.mime=t.mime?t.mime.filter(i=>a.includes(i)):[...a]},r0=(t,a)=>{t.format=a,a.includes("int")&&(t.isInt=!0)},av=(t,a)=>si(t,"minimum",a.minimum),sv=(t,a)=>ii(t,"maximum",a.maximum),iv=t=>(a,i)=>{r0(a,i.format);const[r,o]=t[i.format];si(a,"minimum",r),ii(a,"maximum",o)},qj={greater_than:(t,a)=>si(t,a.inclusive?"minimum":"exclusiveMinimum",a.value),less_than:(t,a)=>ii(t,a.inclusive?"maximum":"exclusiveMaximum",a.value),multiple_of:(t,a)=>a0(t,a.value),number_format:iv(jb),bigint_format:iv(a2),min_length:av,max_length:sv,length_equals:(t,a)=>nv(t,a.length),min_size:av,max_size:sv,size_equals:(t,a)=>nv(t,a.size),string_format:(t,a)=>{r0(t,a.format),a.pattern&&s0(t,a.pattern),(a.format==="base64"||a.format==="base64url")&&(t.contentEncoding=a.format),(a.local||a.precision===-1)&&(t.laxFormat=!0)},mime_type:(t,a)=>i0(t,a.mime)};function on(t){const a={},i=t._zod.def,r=t._zod.traits.has("$ZodCheck")?[t,...i.checks??[]]:i.checks??[];for(const c of r)qj[c._zod.def.check]?.(a,c._zod.def);const o=t._zod.bag;o.minimum!==void 0&&si(a,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&si(a,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&ii(a,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&ii(a,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&a0(a,o.multipleOf),o.format!==void 0&&(a.format??(a.format=o.format),o.format.includes("int")&&(a.isInt=!0)),o.mime&&i0(a,o.mime);for(const c of o.patterns??[])s0(a,c);return a}const Bj={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$j=new Map([[$b,sO],[Td,iO]]),l0=t=>$j.get(t)??t,Hj=(t,a,i,r)=>{const o=i;o.type="string";const{minimum:c,maximum:d,format:h,patterns:m,contentEncoding:p,laxFormat:b}=on(t);if(typeof c=="number"&&(o.minLength=c),typeof d=="number"&&(o.maxLength=d),h&&(o.format=Bj[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(l0);v.length===1?o.pattern=v[0].source:v.length>1&&(o.allOf=[...v.map(x=>({...a.target==="draft-07"||a.target==="draft-04"||a.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},Qj=(t,a,i,r)=>{const o=i,{minimum:c,maximum:d,multipleOf:h,exclusiveMaximum:m,exclusiveMinimum:p,isInt:b}=on(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=a.target==="draft-04"||a.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 R of h)Number.isFinite(R)&&R!==0?w.add(Math.abs(R)):ja(t,a,o,r,`A multipleOf divisor of ${R} cannot be represented in JSON Schema`);const[O,...z]=w;O!==void 0&&(o.multipleOf=O),z.length&&(o.allOf=[...o.allOf??[],...z.map(R=>({multipleOf:R}))])}},Kj=(t,a,i,r)=>{i.type="boolean"},Gj=(t,a,i,r)=>{i.not={}},Yj=(t,a,i,r)=>{},Fj=(t,a,i,r)=>{const o=t._zod.def,c=Yf(o.entries);if(c.length===0){i.not={};return}c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),i.enum=c},Vj=(t,a,i,r)=>{const o=t._zod.def;if(o.values.length===0){i.not={};return}const c=[];for(const d of o.values)if(d===void 0){if(ja(t,a,i,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof d=="bigint"){if(ja(t,a,i,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];i.type=d===null?"null":typeof d,a.target==="draft-04"||a.target==="openapi-3.0"?i.enum=[d]:i.const=d}else c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),c.every(d=>typeof d=="boolean")&&(i.type="boolean"),c.every(d=>d===null)&&(i.type="null"),i.enum=c},Pj=(t,a,i,r)=>{ja(t,a,i,r,"Custom types cannot be represented in JSON Schema")},Xj=(t,a,i,r)=>{ja(t,a,i,r,"Transforms cannot be represented in JSON Schema")},Jj=(t,a,i,r)=>{const o=i,c=t._zod.def,{minimum:d,maximum:h}=on(t);typeof d=="number"&&(o.minItems=d),typeof h=="number"&&(o.maxItems=h),o.type="array",o.items=at(c.element,a,{...r,path:[...r.path,"items"]})};function zo(t){const a=t._zod.def;return a.type==="pipe"&&a.in._zod.traits.has("$ZodTransform")?zo(a.out):a.type==="catch"?zo(a.innerType):t._zod.optin}const Ij=(t,a,i,r)=>{const o=i,c=t._zod.def,d=c.shape;if(Object.getOwnPropertySymbols(d).length&&ja(t,a,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const p in d)za(o.properties,p,at(d[p],a,{...r,path:[...r.path,"properties",p]}));const m=[];for(const p of Object.keys(d)){const b=c.shape[p];(a.io==="input"?zo(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=at(c.catchall,a,{...r,path:[...r.path,"additionalProperties"]})):a.io==="output"&&(o.additionalProperties=!1)},Wj=(t,a,i,r)=>{const o=t._zod.def,c=o.inclusive===!1,d=o.options.map((h,m)=>at(h,a,{...r,path:[...r.path,c?"oneOf":"anyOf",m]}));c?i.oneOf=d:i.anyOf=d},ez=(t,a,i,r)=>{const o=t._zod.def,c=at(o.left,a,{...r,path:[...r.path,"allOf",0]}),d=at(o.right,a,{...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]];i.allOf=m,a.intersections.push(m)};function Wf(t,a,i){if(a.$ref){if(i.has(a))return a;i.add(a);const w=t.get(a)?.def;if(!w)return a;const O=Wf(t,w,i);return O===w?a:O}for(const w of["anyOf","oneOf"]){const O=a[w];if(!Array.isArray(O))continue;const z=O.map(R=>Wf(t,R,i));z.some((R,U)=>R!==O[U])&&(a={...a,[w]:z})}const r=Array.isArray(a.type)?a.type:[a.type],o=!r.includes("string")&&r.some(w=>w==="number"||w==="integer"),c=a.enum??(a.const!==void 0?[a.const]:void 0);if(!o&&!c?.some(w=>typeof w=="number"))return a;const{minimum:d,maximum:h,exclusiveMinimum:m,exclusiveMaximum:p,multipleOf:b,format:v,id:x,...S}=a;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")?jd:hO).source)),S}const ed=new WeakMap;function tz(t){const a=new Map;for(const r of t.seen.values())r.def&&!a.has(r.schema)&&a.set(r.schema,r);const i=new Map;for(const r of ed.get(t)??[]){const o=t.seen.get(r),c=(o?.def??o?.schema)?.propertyNames;if(!c||c===!0||i.has(c))continue;const d=Wf(a,c,new Set);d!==c&&i.set(c,d)}if(i.size)for(const r of t.seen.values())for(const o of[r.schema,r.def]){const c=o&&i.get(o.propertyNames);c&&(o.propertyNames=c)}}const nz=(t,a,i,r)=>{const o=i,c=t._zod.def;o.type="object";const d=c.keyType,h=on(d).patterns;if(c.mode==="loose"&&h&&h.size>0){const b=at(c.valueType,a,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const v of h)za(o.patternProperties,l0(v).source,b)}else{if(a.target==="draft-07"||a.target==="draft-2020-12"){o.propertyNames=at(c.keyType,a,{...r,path:[...r.path,"propertyNames"]});let b=ed.get(a);b||(b=[],ed.set(a,b),a.deferred.push(()=>tz(a))),b.push(t)}o.additionalProperties=at(c.valueType,a,{...r,path:[...r.path,"additionalProperties"]})}const m=d._zod.values,p=a.io==="input"&&zo(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))}},az=(t,a,i,r)=>{const o=t._zod.def,c=at(o.innerType,a,r),d=a.seen.get(t);a.target==="openapi-3.0"?(d.ref=o.innerType,i.nullable=!0):i.anyOf=[c,{type:"null"}]},sz=(t,a,i,r)=>{const o=t._zod.def;at(o.innerType,a,r);const c=a.seen.get(t);c.ref=o.innerType},Rd=Symbol();function o0(t,a,i,r,o){let c=!1;const d=JSON.stringify(t,(h,m)=>typeof m!="bigint"?m:(c=!0,null));return c?(ja(a,i,r,o,"BigInt defaults cannot be represented in JSON Schema"),Rd):JSON.parse(d)}const iz=(t,a,i,r)=>{const o=t._zod.def;at(o.innerType,a,r);const c=a.seen.get(t);c.ref=o.innerType;const d=o0(o.defaultValue,t,a,i,r);d!==Rd&&(i.default=d)},rz=(t,a,i,r)=>{const o=t._zod.def;at(o.innerType,a,r);const c=a.seen.get(t);if(c.ref=o.innerType,a.io!=="input")return;const d=o0(o.defaultValue,t,a,i,r);d!==Rd&&(i._prefault=d)},lz=(t,a,i,r)=>{const o=t._zod.def;at(o.innerType,a,r);const c=a.seen.get(t);c.ref=o.innerType;let d;try{d=o.catchValue(void 0)}catch{ja(t,a,i,r,"Dynamic catch values are not supported in JSON Schema");return}i.default=d},oz=(t,a,i,r)=>{const o=t._zod.def,c=o.in._zod.traits.has("$ZodTransform"),d=a.io==="input"?c?o.out:o.in:o.out;at(d,a,r);const h=a.seen.get(t);h.ref=d},uz=(t,a,i,r)=>{const o=t._zod.def;at(o.innerType,a,r);const c=a.seen.get(t);c.ref=o.innerType,i.readOnly=!0},u0=(t,a,i,r)=>{const o=t._zod.def;at(o.innerType,a,r);const c=a.seen.get(t);c.ref=o.innerType},rv=new WeakSet([Object.prototype,Error.prototype]);function to(t,a,i){Object.defineProperty(t,a,{configurable:!0,enumerable:!1,get(){const r=i(this);return Object.defineProperty(this,a,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,a,{value:r,configurable:!0,writable:!0})}})}const cz=(t,a)=>{E2.init(t,a),t.name="ZodError";const i=Object.getPrototypeOf(t);rv.has(i)||(rv.add(i),to(i,"format",r=>o=>N2(r,o)),to(i,"flatten",r=>o=>z2(r,o)),to(i,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,Ff,2)}),to(i,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,Ff,2)}),Object.defineProperty(i,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},nn=G("ZodError",cz,void 0,{Parent:Error}),fz=_d(nn),dz=wd(nn),hz=Od(nn),mz=Ed(nn),pz=D2(nn),gz=k2(nn),yz=U2(nn),vz=L2(nn),bz=Z2(nn),xz=q2(nn),Sz=B2(nn),_z=$2(nn);function wz(){un.localeError||bn(HE())}function Lo(){un.memoizer||bn({memoizer:qE()})}const Ye=G("ZodType",(t,a)=>(wz(),Ge.init(t,a),t.def=a,t.type=a.type,t),{check(...t){const a=this.def;return this.clone(Qt(a,{checks:[...a.checks??[],...t.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...t){return this.check(...t)},clone(t,a){return Na(this,t,a)},brand(){return this},register(t,a){return t.add(this,a),this},refine(t,a){return this.check(gN(t,a))},superRefine(t,a){return this.check(yN(t,a))},overwrite(t){return this.check(ci(t))},optional(){return uv(this)},exactOptional(){return sN(this)},nullable(){return cv(this)},nullish(){return uv(cv(this))},nonoptional(t){return uN(this,t)},array(){return he(this)},or(t){return Zo([this,t])},and(t){return Wz(this,t)},transform(t){return fv(this,aN(t))},default(t){return rN(this,t)},prefault(t){return oN(this,t)},catch(t){return fN(this,t)},pipe(t){return fv(this,t)},readonly(){return mN(this)},describe(t){const a=this.clone();return hr.add(a,{description:t}),a},meta(...t){if(t.length===0)return hr.get(this);const a=this.clone();return hr.add(a,t[0]),a},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(t,...a){return a.length===0?t(this):t(this,...a)},get"~standard"(){return Nb(this,"~standard",{...Ub(this),jsonSchema:{input:jo(this,"input"),output:jo(this,"output")}})},set"~standard"(t){Ea(this,"~standard",t)},parse:function t(a,i){return fz(this,a,i,{callee:t})},parseAsync:async function t(a,i){return await dz(this,a,i,{callee:t})},safeParse(t,a){return hz(this,t,a)},async safeParseAsync(t,a){return mz(this,t,a)},get spa(){return this?.safeParseAsync},set spa(t){Ea(this,"spa",t)},validate(t,a){return A2(this,t,a)},validateAsync(t,a){return M2(this,t,a)},encode:function t(a,i){return pz(this,a,i,{callee:t})},decode:function t(a,i){return gz(this,a,i,{callee:t})},encodeAsync:async function t(a,i){return await yz(this,a,i,{callee:t})},decodeAsync:async function t(a,i){return await vz(this,a,i,{callee:t})},safeEncode(t,a){return bz(this,t,a)},safeDecode(t,a){return xz(this,t,a)},async safeEncodeAsync(t,a){return Sz(this,t,a)},async safeDecodeAsync(t,a){return _z(this,t,a)},toJSONSchema(t){return Zj(this,{})(t)},get description(){return hr.get(this)?.description},get _def(){return this._zod.def}}),c0=G("_ZodString",(t,a)=>{Nd.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>Hj(t,i,r)},Tb({format:t=>on(t).format??null,minLength:t=>on(t).minimum??null,maxLength:t=>on(t).maximum??null},{regex(...t){return this.check(_j(...t))},includes(...t){return this.check(Ej(...t))},startsWith(...t){return this.check(jj(...t))},endsWith(...t){return this.check(zj(...t))},min(...t){return this.check(Eo(...t))},max(...t){return this.check(Xb(...t))},length(...t){return this.check(Jb(...t))},nonempty(...t){return this.check(Eo(1,...t))},lowercase(t){return this.check(wj(t))},uppercase(t){return this.check(Oj(t))},trim(){return this.check(Tj())},normalize(...t){return this.check(Nj(...t))},toLowerCase(){return this.check(Rj())},toUpperCase(){return this.check(Aj())},slugify(){return this.check(Cj())}})),f0=G("ZodString",(t,a)=>{Nd.init(t,a),c0.init(t,a)},{email(t){return this.check(YE(zz,t))},url(t){return this.check(IE(Tz,t))},jwt(t){return this.check(hj(Kz,t))},emoji(t){return this.check(WE(Rz,t))},guid(t){return this.check(FE(Nz,t))},uuid(t){return this.check(VE(no,t))},uuidv4(t){return this.check(PE(no,t))},uuidv6(t){return this.check(XE(no,t))},uuidv7(t){return this.check(JE(no,t))},nanoid(t){return this.check(ej(Az,t))},cuid(t){return this.check(tj(Cz,t))},cuid2(t){return this.check(nj(Mz,t))},ulid(t){return this.check(aj(Dz,t))},base64(t){return this.check(cj($z,t))},base64url(t){return this.check(fj(Hz,t))},xid(t){return this.check(sj(kz,t))},ksuid(t){return this.check(ij(Uz,t))},ipv4(t){return this.check(rj(Lz,t))},ipv6(t){return this.check(lj(Zz,t))},cidrv4(t){return this.check(oj(qz,t))},cidrv6(t){return this.check(uj(Bz,t))},e164(t){return this.check(dj(Qz,t))},datetime(t){return this.check(Pb(d0,t))},date(t){return this.check(mj(Oz,t))},time(t){return this.check(pj(Ez,t))},duration(t){return this.check(gj(jz,t))}});function H(t){return GE(f0,t)}const Fe=G("ZodStringFormat",(t,a)=>{Ke.init(t,a),c0.init(t,a)}),d0=G("ZodISODateTime",(t,a)=>{VO.init(t,a),Fe.init(t,a)}),Oz=G("ZodISODate",(t,a)=>{PO.init(t,a),Fe.init(t,a)}),Ez=G("ZodISOTime",(t,a)=>{XO.init(t,a),Fe.init(t,a)}),jz=G("ZodISODuration",(t,a)=>{JO.init(t,a),Fe.init(t,a)}),zz=G("ZodEmail",(t,a)=>{DO.init(t,a),Fe.init(t,a)}),Nz=G("ZodGUID",(t,a)=>{CO.init(t,a),Fe.init(t,a)}),no=G("ZodUUID",(t,a)=>{MO.init(t,a),Fe.init(t,a)}),Tz=G("ZodURL",(t,a)=>{BO.init(t,a),Fe.init(t,a)}),Rz=G("ZodEmoji",(t,a)=>{$O.init(t,a),Fe.init(t,a)}),Az=G("ZodNanoID",(t,a)=>{HO.init(t,a),Fe.init(t,a)}),Cz=G("ZodCUID",(t,a)=>{QO.init(t,a),Fe.init(t,a)}),Mz=G("ZodCUID2",(t,a)=>{KO.init(t,a),Fe.init(t,a)}),Dz=G("ZodULID",(t,a)=>{GO.init(t,a),Fe.init(t,a)}),kz=G("ZodXID",(t,a)=>{YO.init(t,a),Fe.init(t,a)}),Uz=G("ZodKSUID",(t,a)=>{FO.init(t,a),Fe.init(t,a)}),Lz=G("ZodIPv4",(t,a)=>{IO.init(t,a),Fe.init(t,a)}),Zz=G("ZodIPv6",(t,a)=>{eE.init(t,a),Fe.init(t,a)}),qz=G("ZodCIDRv4",(t,a)=>{tE.init(t,a),Fe.init(t,a)}),Bz=G("ZodCIDRv6",(t,a)=>{aE.init(t,a),Fe.init(t,a)}),$z=G("ZodBase64",(t,a)=>{sE.init(t,a),Fe.init(t,a)}),Hz=G("ZodBase64URL",(t,a)=>{rE.init(t,a),Fe.init(t,a)}),Qz=G("ZodE164",(t,a)=>{lE.init(t,a),Fe.init(t,a)}),Kz=G("ZodJWT",(t,a)=>{uE.init(t,a),Fe.init(t,a)}),h0=G("ZodNumber",(t,a)=>{Hb.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>Qj(t,i,r,o),t.isFinite=!0},Tb({minValue:t=>{const{minimum:a,exclusiveMinimum:i}=on(t);return Math.max(a??Number.NEGATIVE_INFINITY,i??Number.NEGATIVE_INFINITY)},maxValue:t=>{const{maximum:a,exclusiveMaximum:i}=on(t);return Math.min(a??Number.POSITIVE_INFINITY,i??Number.POSITIVE_INFINITY)},isInt:t=>{const{isInt:a,multipleOf:i}=on(t);return!!a||!!i?.some(Number.isSafeInteger)},format:t=>on(t).format??null},{gt(t,a){return this.check(Jy(t,a))},gte(t,a){return this.check(zf(t,a))},min(t,a){return this.check(zf(t,a))},lt(t,a){return this.check(Xy(t,a))},lte(t,a){return this.check(jf(t,a))},max(t,a){return this.check(jf(t,a))},int(t){return this.check(lv(t))},safe(t){return this.check(lv(t))},positive(t){return this.check(Jy(0,t))},nonnegative(t){return this.check(zf(0,t))},negative(t){return this.check(Xy(0,t))},nonpositive(t){return this.check(jf(0,t))},multipleOf(t,a){return this.check(Iy(t,a))},step(t,a){return this.check(Iy(t,a))},finite(){return this}}));function Re(t){return yj(h0,t)}const Gz=G("ZodNumberFormat",(t,a)=>{cE.init(t,a),h0.init(t,a)});function lv(t){return vj(Gz,t)}const Yz=G("ZodBoolean",(t,a)=>{fE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>Kj(t,i,r)});function vt(t){return bj(Yz,t)}const Fz=G("ZodUnknown",(t,a)=>{dE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>Yj()});function td(){return xj(Fz)}const Vz=G("ZodNever",(t,a)=>{hE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>Gj(t,i,r)});function Pz(t){return Sj(Vz,t)}const m0=G("ZodArray",(t,a)=>{Lo(),gE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>Jj(t,i,r,o),t.element=a.element},{min(t,a){return this.check(Eo(t,a))},nonempty(t){return this.check(Eo(1,t))},max(t,a){return this.check(Xb(t,a))},length(t,a){return this.check(Jb(t,a))},unwrap(){return this.element}});function he(t,a){return Mj(m0,t,a)}const Xz=G("ZodObject",(t,a)=>{Lo(),bE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>Ij(t,i,r,o),y2(t,"shape",i=>i._zod.def.shape,!1)},{keyof(){return gt(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:td()}))},loose(){return this.clone(Qt(this._zod.def,{catchall:td()}))},strict(){return this.clone(Qt(this._zod.def,{catchall:Pz()}))},strip(){return this.clone(Qt(this._zod.def,{catchall:void 0}))},extend(t){return r2(this,t)},safeExtend(t){return l2(this,t)},merge(t){return o2(this,t)},pick(t){return s2(this,t)},omit(t){return i2(this,t)},partial(...t){return Cy(p0,this,t[0])},exactPartial(...t){return Cy(g0,this,t[0],"exactPartial")},required(...t){return u2(v0,this,t[0])}});function ne(t,a){const i={type:"object",shape:t??{},...ue(a)};return new Xz(i)}const Jz=G("ZodUnion",(t,a)=>{xE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>Wj(t,i,r,o),t.options=a.options});function Zo(t,a){return new Jz({type:"union",options:t,...ue(a)})}const Iz=G("ZodIntersection",(t,a)=>{SE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>ez(t,i,r,o)});function Wz(t,a){return new Iz({type:"intersection",left:t,right:a})}const ov=G("ZodRecord",(t,a)=>{Lo(),_E.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>nz(t,i,r,o),t.keyType=a.keyType,t.valueType=a.valueType});function eN(t,a,i){return!a||!a._zod?new ov({type:"record",keyType:H(),valueType:t,...ue(a)}):new ov({type:"record",keyType:t,valueType:a,...ue(i)})}const No=G("ZodEnum",(t,a)=>{wE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(r,o,c)=>Fj(t,r,o),t.enum=a.entries,t.options=[...t._zod.values];const i=new Set(Object.keys(a.entries));t.extract=(r,o)=>{const c={};for(const d of r)if(i.has(d))c[d]=a.entries[d];else throw new Error(`Key ${d} not found in enum`);return new No({...a,checks:[],...ue(o),entries:c})},t.exclude=(r,o)=>{const c={...a.entries};for(const d of r)if(i.has(d))delete c[d];else throw new Error(`Key ${d} not found in enum`);return new No({...a,checks:[],...ue(o),entries:c})}});function gt(t,a){const i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new No({type:"enum",entries:i,...ue(a)})}const tN=G("ZodLiteral",(t,a)=>{OE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>Vj(t,i,r,o),t.values=new Set(a.values),Object.defineProperty(t,"value",{get(){if(a.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return a.values[0]}})});function va(t,a){return new tN({type:"literal",values:Array.isArray(t)?t:[t],...ue(a)})}const nN=G("ZodTransform",(t,a)=>{Lo(),EE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>Xj(t,i,r,o),t._zod.parse=(i,r)=>{if(r.direction==="backward")throw new Rb(t.constructor.name);i.addIssue=c=>{if(typeof c=="string")i.issues.push(wr(c,i.value,a));else{const d=c;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),"input"in d||(d.input=i.value),d.inst??(d.inst=t),i.issues.push(wr(d))}};const o=a.transform(i.value,i);return o instanceof Promise?o.then(c=>(i.value=c,i)):(i.value=o,i)}});function aN(t){return new nN({type:"transform",transform:t})}const p0=G("ZodOptional",(t,a)=>{Gb.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>u0(t,i,r,o),t.unwrap=()=>t._zod.def.innerType});function uv(t){return new p0({type:"optional",innerType:t})}const g0=G("ZodExactOptional",(t,a)=>{jE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>u0(t,i,r,o),t.unwrap=()=>t._zod.def.innerType});function sN(t){return new g0({type:"optional",innerType:t})}const iN=G("ZodNullable",(t,a)=>{zE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>az(t,i,r,o),t.unwrap=()=>t._zod.def.innerType});function cv(t){return new iN({type:"nullable",innerType:t})}const y0=G("ZodDefault",(t,a)=>{NE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>iz(t,i,r,o),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function rN(t,a){return new y0({type:"default",innerType:t,get defaultValue(){return typeof a=="function"?a():Ob(a)}})}const lN=G("ZodPrefault",(t,a)=>{TE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>rz(t,i,r,o),t.unwrap=()=>t._zod.def.innerType});function oN(t,a){return new lN({type:"prefault",innerType:t,get defaultValue(){return typeof a=="function"?a():Ob(a)}})}const v0=G("ZodNonOptional",(t,a)=>{RE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>sz(t,i,r,o),t.unwrap=()=>t._zod.def.innerType});function uN(t,a){return new v0({type:"nonoptional",innerType:t,...ue(a)})}const cN=G("ZodCatch",(t,a)=>{AE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>lz(t,i,r,o),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function fN(t,a){return new cN({type:"catch",innerType:t,catchValue:typeof a=="function"?a:b2(a)})}const dN=G("ZodPipe",(t,a)=>{CE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>oz(t,i,r,o),t.in=a.in,t.out=a.out});function fv(t,a){return new dN({type:"pipe",in:t,out:a})}const hN=G("ZodReadonly",(t,a)=>{ME.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>uz(t,i,r,o),t.unwrap=()=>t._zod.def.innerType});function mN(t){return new hN({type:"readonly",innerType:t})}const pN=G("ZodCustom",(t,a)=>{DE.init(t,a),Ye.init(t,a),t._zod.processJSONSchema=(i,r,o)=>Pj(t,i,r,o)});function gN(t,a={}){return Dj(pN,t,a)}function yN(t,a){return kj(t,a)}function vN(t){return Pb(d0,t)}const Ie=H().regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"kebab-case required"),b0=H().regex(/^package:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"expected package:<kebab-case-name>"),bN=ne({method:gt(["GET","POST","PUT","PATCH","DELETE"]),path:H().startsWith("/api/"),description:H().min(10),schemaInput:H().describe("Exported name of the input Zod schema, e.g. CreateOrderInputSchema"),schemaOutput:H().describe("Exported name of the output Zod schema"),invalidates:he(H()).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")}),xN=gt(["reference","ownerless"]),SN=Zo([H(),ne({name:H(),shared:va(!0),sharedKind:xN.optional()})]),_N=ne({name:Ie,intent:H().min(20).max(300).describe("The feature's 'why' in 1-3 sentences"),app:H().optional().describe("Name of the owning app (apps[].name); defaults to the api app"),folder:H().describe("Path relative to the app root, e.g. src/features/orders"),spec:H().nullable().describe("Path to the spec, e.g. specs/orders.spec.md, null for technical features"),routes:he(bN),dbTables:he(SN).describe("Drizzle tables owned by this feature (one table = one owner). String = tenant-scoped; { name, shared: true } = shared referential"),dependsOn:he(Zo([Ie,b0])).describe("Features imported through their index.ts, and product packages as package:<name> — nothing else"),status:gt(["skeleton","in-progress","delivered"])}),wN=H().regex(/^\d+\.\d+\.\d+$/,"expected a plain x.y.z version"),ON=ne({packages:he(ne({name:H().describe("Published npm name, e.g. @ogygie/core"),path:H().describe("Folder relative to the repo root"),intent:H().min(20),spec:H().nullable(),status:gt(["skeleton","in-progress","delivered"])})),templates:ne({project:H().describe("Folder copied by `ogygie init`"),feature:H().describe("Reserved for `ogygie generate feature` (not wired yet)")}),governedFiles:H().describe("Module declaring the exhaustive list of files `upgrade` may overwrite (D3)")}),EN=ne({canonical:H().regex(/^[a-z][a-zA-Z0-9]*$/,"camelCase English term required").describe("The one machine term for this concept, e.g. gadget"),forbiddenAliases:he(H().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:H().optional().describe("Anchor into AGENTS.product.md where the concept is explained")}),jN=ne({entries:he(EN)}),zN=ne({name:Ie,path:H().describe("Folder relative to the repo root, e.g. packages/solver"),intent:H().min(20).max(300).describe("The package's 'why' in 1-3 sentences"),spec:H().nullable(),dependsOn:he(b0).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:gt(["skeleton","in-progress","delivered"])}),NN=ne({column:H().min(1).describe("SQL name of the tenant column, e.g. workspace_id — the one AGENTS.product.md announces"),rawDbAllowed:he(Ie).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")}),TN=ne({version:va(1),product:ne({name:H(),description:H().min(20)}),ogygieVersion:wN.optional(),framework:ON.optional(),apps:he(ne({name:H(),path:H(),type:gt(["api","front","gateway"]),entryPoint:H(),vendored:va(!0).optional()})),features:he(_N),tenancy:NN.optional().describe("Product values the framework gates need — absent, the tenancy checks do not run"),packages:he(zN).optional().describe("Product code living outside every app — libraries, engines. Absent = the project has none"),vocabulary:jN.optional().describe("The product's closed vocabulary — declared here, enforced by `ogygie verify-vocabulary`. Absent = gate silent"),conventions:ne({agentsMd:va("AGENTS.md"),failuresMd:va("FAILURES.md"),specsFolder:va("specs/")})}).superRefine((t,a)=>{const i=new Set(t.features.map(v=>v.name)),r=new Set;(t.packages??[]).forEach((v,x)=>{i.has(v.name)&&a.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)&&a.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)&&a.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 O=S.slice(8);r.has(O)||a.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)=>{i.has(v)||a.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?a.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 O=["vocabulary","entries",x,"forbiddenAliases",w],z=h.get(S);if(z!==void 0){a.addIssue({code:"custom",path:O,message:`alias "${S}" is the canonical term of entry ${z} — a term cannot be both`});return}const R=m.get(S);if(R!==void 0){a.addIssue({code:"custom",path:O,message:`alias "${S}" is already forbidden by entry ${R} — 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 O of S.invalidates??[])b.has(O)||a.addIssue({code:"custom",path:["features",x,"routes",w,"invalidates"],message:`invalidates target "${O}" 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){a.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)&&a.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"})})}),RN=H().regex(/^.+ blockedBy:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,'Expected "<behavior> blockedBy:<feature-name>" (feature name in kebab-case)'),fi=ne({id:Ie.describe("Identical to the feature name in the manifest"),status:gt(["draft","validated","implemented"]),depends_on:he(Ie),priority:gt(["P0","P1","P2"]),refs:he(H()).default([]).describe("References to the domain model, e.g. 'modele-gally §4.2'"),deferred:he(RN).default([]).describe("Behaviors deferred to a later feature, blocked by name")}),Ws=["# @intent","# Comportements","# Contrats de données","# États UI","# Non-objectifs","# Budget"],AN="Hypothèses";function CN(t){const a=new RegExp(`^# ${AN}\\s*$`,"mu").exec(t);if(a===null)return[];const i=t.slice(a.index+a[0].length),r=/^# /mu.exec(i);return(r===null?i:i.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 qo=ne({ogygie:va(!0).describe("Marker: lets an agent tell our errors from noise"),code:H().regex(/^[A-Z][A-Z0-9_]+$/,"SCREAMING_SNAKE_CASE, stable over time"),message:H().min(10).describe("Human-readable sentence (technical English)"),file:H().nullable().describe("Relative path of the file involved, null when not localizable"),cause:H().describe("The precise datum or condition that triggered the error"),suggestedFix:H().describe("Concrete action to fix — never empty"),details:eN(H(),td()).default({}),timestamp:vN()});class Bo extends Error{payload;constructor(a){super(a.message),this.name="StudioApiError",this.payload=a}}async function st(t,a,i){const r=await fetch(t,i),o=await r.json();if(!r.ok){const c=qo.safeParse(o);throw c.success?new Bo(c.data):new Error(`HTTP ${r.status} on ${t} (non-OgygieError payload)`)}return a.parse(o)}function Er(t){return{headers:{"content-type":"application/json"},body:JSON.stringify(t)}}const nd=gt(["feature","package","framework-package"]),MN=ne({scannedFolders:he(H()),coveredKinds:he(nd),outOfReach:he(H())}),DN=ne({target:ne({name:H(),kind:nd,folder:H()}),dependents:he(ne({name:H(),kind:nd,importedSymbols:he(H()),viaIndexOnly:vt()})),routes:he(ne({method:H(),path:H(),description:H()})),ownedTables:he(H()),tableReadersOutsideOwner:he(ne({table:H(),feature:H(),file:H()})),findings:he(qo),testCommand:H(),scope:MN}),kN=fi.shape.status,Ad=ne({id:Ie,status:kN,priority:fi.shape.priority,depends_on:he(Ie),filePath:H(),presentSections:he(H()),intent:H().default("")}),UN=ne({id:H(),filePath:H(),error:qo}),LN=Zo([Ad,UN]),ZN=ne({specs:he(LN)});ne({specId:Ie});const qN=ne({frontmatter:fi,body:H(),presentSections:he(H())});ne({frontmatter:fi,body:H().max(2e5).optional()});const BN=ne({spec:Ad});ne({id:Ie.max(80)});const $N=ne({spec:Ad}),HN=ne({manifest:TN}),QN=ne({name:H().min(1).max(200),contentBase64:H().min(1).max(57e5)}),KN=ne({questionId:Ie,answer:H().min(1).max(2e3)});ne({brief:H().min(50).max(2e4),specId:Ie.optional(),attachments:he(QN).max(5).default([]),answers:he(KN).max(15).default([]),round:Re().int().min(1).max(4).default(1),skipQuestions:vt().default(!1)});const GN=ne({id:Ie,text:H().min(1),options:he(H().min(1)).min(2).max(4)}),YN=ne({specId:Ie,attempts:Re().int().min(1).max(4),problemsFixed:he(H()),isNewFeature:vt(),isAmendment:vt(),compositions:he(H()).default([]),generation:ne({derivable:Re().int().nonnegative(),hole:Re().int().nonnegative()}).nullable().default(null),assumptions:he(H()).default([]),usage:he(ne({model:H(),inputTokens:Re().int().nonnegative(),outputTokens:Re().int().nonnegative()}))}),FN=ne({jobId:H()}),VN=gt(["questions","drafting","judging","compositions","writing","done","failed"]),PN=ne({jobId:H(),stage:VN,round:Re().int().min(1).max(3).optional(),attempt:Re().int().min(1).max(4).optional(),composition:ne({done:Re().int().nonnegative(),total:Re().int().nonnegative()}).optional(),elapsedMs:Re().int().nonnegative(),budgetMs:Re().int().positive(),questions:he(GN).min(3).max(5).optional(),result:YN.optional(),error:qo.optional()}),XN=ne({specId:Ie,ref:H(),onMap:vt(),report:DN.nullable()}),x0=gt(["green","red","pending","none"]),JN=ne({specId:Ie,branch:H(),pullRequest:ne({number:Re().int().positive(),url:H(),headSha:H(),title:H()}).nullable(),specStatus:gt(["draft","validated","implemented","unreadable","absent"]),checks:x0,checkRuns:he(ne({name:H(),conclusion:H().nullable()})),mergeable:vt().nullable(),requiredRole:gt(["approver","operator"]),canMerge:vt(),blockers:he(H()),labels:he(H()).default([]),needsOperator:vt().default(!1)}),IN=ne({pullRequests:he(ne({specId:Ie,number:Re().int().positive(),url:H(),checks:x0,needsOperator:vt().default(!1)}))}),WN=ne({specId:Ie,pullRequestNumber:Re().int().positive(),mergeSha:H(),mergedBy:H(),mergedAt:H()}),Cd=gt(["development","staging","production"]),S0=gt(["staging","production"]);ne({environment:S0});const _0=ne({environments:he(ne({name:Cd,ref:H(),sha:H().nullable(),deployment:ne({id:Re().int(),state:H().nullable(),createdAt:H()}).nullable()})),releases:he(H())});ne({environment:Cd});const eT=gt(["deployed","forward","backward","unreachable"]),tT=ne({sha:H(),title:H(),specId:Ie.nullable(),author:H(),authoredAt:H(),releaseTag:H().nullable(),reach:eT,why:H()}),nT=ne({environment:Cd,ref:H(),deployedSha:H().nullable(),commits:he(tT).max(30)});ne({sha:H().regex(/^[0-9a-f]{40}$/),rollback:vt().optional(),reason:H().min(10).max(2e3).optional()});const aT=ne({environment:S0,fromSha:H().nullable(),toSha:H(),actor:H(),at:H(),deploymentId:Re().int(),releaseTag:H().nullable(),includedPullRequests:he(ne({number:Re().int(),specId:H().nullable(),message:H(),authoredAt:H()})),destructiveMigration:vt(),rollback:vt()});ne({month:H().regex(/^\d{4}-\d{2}$/).optional()});const sT=ne({month:H(),specs:he(ne({specId:H(),pullRequestNumber:Re().int(),runs:Re().int(),inputTokens:Re().int(),outputTokens:Re().int(),estimatedUsd:Re(),uncostedModels:he(H())})),totals:ne({runs:Re().int(),inputTokens:Re().int(),outputTokens:Re().int(),estimatedUsd:Re()}),budgetUsd:Re().nullable(),budgetRatio:Re().nullable(),warning:vt()}),dv=ne({state:H(),path:H(),sizeBytes:Re().int().nonnegative()}),iT=ne({specId:Ie,previews:he(dv),composition:H().nullable().default(null),compositions:he(ne({name:H(),selected:vt(),previews:he(dv)})).default([])}),rT=ne({specId:Ie,composition:H(),alreadySelected:vt()});function Md(){return Kt({queryKey:["specs"],queryFn:()=>st("/api/specs",ZN)})}function lT(t){return Kt({queryKey:["specs",t],queryFn:()=>st(`/api/specs/${t}`,qN)})}function oT(){return Kt({queryKey:["manifest"],queryFn:()=>st("/api/manifest",HN)})}function uT(t){const a=as();return oi({mutationFn:i=>st(`/api/specs/${t}`,BN,{method:"PUT",...Er(i)}),onSuccess:async()=>{await a.invalidateQueries({queryKey:["specs"]})}})}function cT(){const t=as();return oi({mutationFn:a=>st("/api/specs",$N,{method:"POST",...Er(a)}),onSuccess:async()=>{await t.invalidateQueries({queryKey:["specs"]})}})}const fT=ne({email:H(),displayName:H(),role:H(),host:ne({environments:vt(),mergePolicy:H()}).optional()});function dT(t){return t===void 0||t.pullRequest===null?!1:t.checks==="pending"||t.checks==="none"||t.mergeable===null?1e4:!1}function hT(t,a){const i=t?.environments.find(r=>r.name==="development");return i!==void 0&&i.sha===a&&i.deployment?.state==="success"?!1:1e4}function jr(){return Kt({queryKey:["me"],queryFn:()=>st("/api/auth/me",fT),retry:!1})}function mT(){return oi({mutationFn:t=>st("/api/briefs",FN,{method:"POST",...Er(t)})})}function pT(t){return t===void 0?1e3:t.stage==="done"||t.stage==="failed"||t.stage==="questions"?!1:1e3}function gT(t){return Kt({queryKey:["briefs",t],queryFn:()=>st(`/api/briefs/${t??""}`,PN),enabled:t!==null,retry:!1,refetchInterval:a=>pT(a.state.data)})}function yT(t){return Kt({queryKey:["specs",t,"impact"],queryFn:()=>st(`/api/specs/${t}/impact`,XN),retry:!1})}function vT(t){return Kt({queryKey:["specs",t,"pull-request"],queryFn:()=>st(`/api/specs/${t}/pull-request`,JN),retry:!1,refetchInterval:a=>dT(a.state.data)})}function bT(t){return Kt({queryKey:["pull-requests"],queryFn:()=>st("/api/pull-requests",IN),enabled:t,retry:!1})}function xT(t){const a=as();return oi({mutationFn:()=>st(`/api/specs/${t}/merge`,WN,{method:"POST"}),onSuccess:async()=>{await a.invalidateQueries({queryKey:["specs"]})}})}function ST(t,a){if(a===null)return!1;const i=t?.environments.find(r=>r.name===a.environment);return i!==void 0&&i.sha===a.sha&&i.deployment?.state==="success"?!1:1e4}function _T(t=!0,a=null){return Kt({queryKey:["environments"],queryFn:()=>st("/api/environments",_0),retry:!1,enabled:t,refetchInterval:i=>ST(i.state.data,a)})}function hv(t,a=!0){return Kt({queryKey:["environments",t,"commits"],queryFn:()=>st(`/api/environments/${t??""}/commits`,nT),retry:!1,enabled:a&&t!==null})}function wT(t,a){return Kt({queryKey:["environments"],queryFn:()=>st("/api/environments",_0),retry:!1,enabled:a,refetchInterval:i=>hT(i.state.data,t)})}function OT(){const t=as();return oi({mutationFn:a=>{const{environment:i,...r}=a;return st(`/api/environments/${i}/promotions`,aT,{method:"POST",...Er(r)})},onSuccess:async()=>{await t.invalidateQueries({queryKey:["environments"]})}})}function ET(t){return Kt({queryKey:["consumption",t],queryFn:()=>st(`/api/consumption?month=${t}`,sT),retry:!1})}function jT(t){return Kt({queryKey:["specs",t,"previews"],queryFn:()=>st(`/api/specs/${t}/previews`,iT),retry:!1})}function zT(t){const a=as();return oi({mutationFn:i=>st(`/api/specs/${t}/compositions/${i}/select`,rT,{method:"POST"}),onSuccess:async()=>{await a.invalidateQueries({queryKey:["specs"]})}})}const NT={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 ut({voice:t="secondary",size:a="md",className:i="",type:r="button",children:o,...c}){const d=a==="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} ${NT[t]} ${i}`,...c,children:o})}const TT={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 qe({tone:t="neutral",mono:a=!1,children:i,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 ${a?"font-mono":""} ${TT[t]}`,children:i})}function w0({status:t}){const a=t==="validated"?"accent":t==="implemented"?"positive":"neutral";return g.jsx(qe,{tone:a,children:t})}function O0({title:t,hint:a,action:i}){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}),a!==void 0&&g.jsx("p",{className:"max-w-md text-sm text-text-muted",children:a}),i]})}function RT(t){return t instanceof Bo?t.payload:null}function pt({error:t}){const a=RT(t);if(a===null){const i=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:i})}return g.jsx($o,{error:a})}function $o({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 AT=Ev();function E0({open:t,title:a,children:i,onClose:r}){return W.useEffect(()=>{if(!t)return;const o=c=>{c.key==="Escape"&&r()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[t,r]),t?AT.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":a,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:a}),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:i})]})}),document.body):null}function ri({eyebrow:t,title:a,explanation:i,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:a}),i!==void 0&&g.jsx("p",{className:"mt-1 max-w-2xl text-sm text-text-muted",children:i})]}),r!==void 0&&g.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:r})]})}function tn({children:t,className:a="",...i}){return g.jsx("section",{className:`rounded-lg border border-border bg-surface-raised p-4 shadow-raised ${a}`,...i,children:t})}const CT=[{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"}],MT={P0:"danger",P1:"accent",P2:"neutral"},DT={green:"positive",red:"danger",pending:"warning",none:"neutral"},kT={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"};function mv(t){return!("error"in t)}function UT(t){return t instanceof HTMLElement&&(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT"||t.isContentEditable)}function LT(){const{data:t,isPending:a,error:i}=Md(),r=jr(),o=bT(r.data!==void 0),[c,d]=W.useState(""),[h,m]=W.useState(!1),p=W.useRef(null);if(W.useEffect(()=>{const O=z=>{z.metaKey||z.ctrlKey||z.altKey||UT(z.target)||(z.key==="/"?(z.preventDefault(),p.current?.focus()):z.key==="n"&&(z.preventDefault(),m(!0)))};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[]),i)return g.jsx(pt,{error:i});if(a)return g.jsx(BT,{});const b=t.specs.filter(mv),v=t.specs.filter(O=>!mv(O));if(t.specs.length===0)return g.jsx(O0,{title:"Aucune spec dans ce repo",hint:"Créez la première depuis le template canonique — elle naîtra en draft.",action:g.jsx(pv,{open:h,onOpen:()=>m(!0),onClose:()=>m(!1)})});const x=c.trim().toLowerCase(),S=O=>x===""||O.id.includes(x)||O.depends_on.some(z=>z.includes(x)),w=new Map((o.data?.pullRequests??[]).map(O=>[O.specId,O]));return g.jsxs("div",{className:"space-y-6",children:[g.jsx(ri,{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:O=>d(O.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(pv,{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(O=>g.jsx($o,{error:O.error},O.filePath))}),g.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:CT.map(O=>g.jsx(ZT,{column:O,specs:b.filter(z=>z.status===O.status&&S(z)),pullsBySpec:w},O.status))})]})}function ZT({column:t,specs:a,pullsBySpec:i}){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(vn,{value:a.length,className:"font-mono text-xs text-text-faint"})]}),a.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:a.map((r,o)=>g.jsx("li",{className:"studio-reveal",style:{"--i":o},children:g.jsx(qT,{summary:r,pull:i.get(r.id)})},r.id))})]})}function qT({summary:t,pull:a}){const i=new Set(t.presentSections);return g.jsxs(ui,{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(qe,{tone:MT[t.priority]??"neutral",children:t.priority})]}),g.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[g.jsx("ul",{"aria-label":`${i.size} sections sur ${Ws.length}`,className:"flex flex-1 gap-0.5",children:Ws.map(r=>g.jsx("li",{title:r,className:`h-1 flex-1 rounded-full ${i.has(r)?"bg-accent":"bg-border"}`},r))}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:[i.size,"/",Ws.length]})]}),(t.depends_on.length>0||a!==void 0)&&g.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[a!==void 0&&g.jsxs(qe,{tone:a.needsOperator?"orichalcum":DT[a.checks]??"neutral",mono:!0,title:a.needsOperator?"en attente de l'opérateur (needs-operator)":kT[a.checks]??a.checks,children:["#",a.number,a.needsOperator&&g.jsx("span",{"aria-hidden":"true",children:" ⚑"})]}),t.depends_on.map(r=>g.jsxs(qe,{mono:!0,title:`dépend de ${r}`,children:["← ",r]},r))]})]})}function BT(){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 pv({open:t,onOpen:a,onClose:i}){const[r,o]=W.useState(""),c=Co(),d=cT(),h=()=>{d.mutate({id:r},{onSuccess:async m=>{i(),await c({to:"/specs/$specId",params:{specId:m.spec.id}})}})};return g.jsxs(g.Fragment,{children:[g.jsx(ut,{voice:"primary",onClick:()=>{d.reset(),o(""),a()},children:"Nouvelle spec"}),g.jsx(E0,{open:t,title:"Nouvelle spec depuis le template",onClose:i,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 Bo&&g.jsx(pt,{error:d.error}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(ut,{voice:"ghost",onClick:i,children:"Annuler"}),g.jsx(ut,{voice:"primary",type:"submit",disabled:d.isPending||r==="",children:"Créer en draft"})]})]})})]})}function $T(t){const a=`
|
|
68
|
+
${t}`,i=[];let r=0;for(const o of Ws){const c=a.indexOf(`
|
|
69
|
+
${o}`,r);c!==-1&&(i.push(o),r=c+o.length)}return i}const gv={feature:"feature",package:"paquet","framework-package":"paquet du framework"};function HT({specId:t}){const a=yT(t);if(a.error)return g.jsx(pt,{error:a.error});if(a.isPending)return g.jsx("div",{"aria-label":"Chargement de l'impact",className:"h-24 studio-breathe rounded-lg border border-border bg-surface-sunken/60"});const i=a.data;if(!i.onMap||i.report===null)return g.jsxs("section",{"aria-label":"Impact de la spec",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:"Impact"}),g.jsxs("p",{className:"mt-1",children:["Cette rubrique n'est pas encore sur la carte de ",g.jsx("code",{className:"font-mono text-text",children:i.ref})," : son entrée vient avec la spéculation, l'impact se lira ensuite."]})]});const r=i.report,o=[{label:"dépendants",value:r.dependents.length},{label:"routes exposées",value:r.routes.length},{label:"tables possédées",value:r.ownedTables.length},{label:"lecteurs hors propriétaire",value:r.tableReadersOutsideOwner.length}];return g.jsxs(tn,{"aria-label":"Impact de la spec",className:"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:"Impact"}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:[r.target.name," · ",gv[r.target.kind]??r.target.kind," · lu sur ",i.ref]})]}),g.jsx("dl",{className:"mt-3 grid grid-cols-2 gap-3 md:grid-cols-4",children:o.map(c=>g.jsxs("div",{className:"rounded-md border border-border bg-surface-sunken/60 px-3 py-2",children:[g.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.12em] text-text-faint",children:c.label}),g.jsx("dd",{className:"font-mono text-2xl text-text",children:g.jsx(vn,{value:c.value})})]},c.label))}),r.dependents.length>0&&g.jsx("ul",{"aria-label":"Dépendants",className:"mt-3 space-y-1",children:r.dependents.map(c=>g.jsxs("li",{className:"flex flex-wrap items-center gap-2 text-text-muted",children:[g.jsx("span",{className:"font-mono text-text",children:c.name}),g.jsx(qe,{tone:"neutral",children:gv[c.kind]??c.kind}),g.jsx("span",{children:c.importedSymbols.length>0?`importe ${c.importedSymbols.join(", ")}`:"n'importe aucun symbole"}),g.jsx(qe,{tone:c.viaIndexOnly?"positive":"warning",children:c.viaIndexOnly?"via index.ts":"contourne index.ts"})]},c.name))}),r.routes.length>0&&g.jsx("ul",{"aria-label":"Routes exposées",className:"mt-3 flex flex-wrap gap-2",children:r.routes.map(c=>g.jsx("li",{children:g.jsxs(qe,{tone:"accent",mono:!0,children:[c.method," ",c.path]})},`${c.method} ${c.path}`))}),r.tableReadersOutsideOwner.length>0&&g.jsx("ul",{"aria-label":"Lecteurs hors propriétaire",className:"mt-3 space-y-1 text-text-muted",children:r.tableReadersOutsideOwner.map(c=>g.jsxs("li",{children:[g.jsx("span",{className:"text-warning",children:"⚠"})," ",g.jsx("code",{className:"font-mono text-text",children:c.table})," lue par ",c.feature," (",c.file,")"]},`${c.table}:${c.file}`))}),g.jsxs("p",{className:"mt-3 font-mono text-xs text-text-faint",children:["tests à rejouer : ",r.testCommand]}),g.jsxs("p",{className:"mt-1 text-xs text-text-faint",children:["Regardé : ",r.scope.scannedFolders.join(", ")||"rien"," · natures : ",r.scope.coveredKinds.join(", "),r.scope.outOfReach.length>0?` · hors de portée : ${r.scope.outOfReach.join(" ; ")}`:""]}),r.findings.length>0&&g.jsx("div",{className:"mt-3 space-y-2",children:r.findings.map((c,d)=>g.jsx($o,{error:c},`${c.code}-${d}`))})]})}const QT={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"},KT={green:"positive",red:"danger",pending:"warning",none:"neutral"},GT=new Set(["pending","queued","in_progress","expected","waiting","requested"]),YT=new Set(["success","neutral"]);function FT(t){return t===null||GT.has(t)?{label:"en cours",tone:"warning",live:!0}:YT.has(t)?{label:"vert",tone:"positive",live:!1}:t==="skipped"?{label:"sauté",tone:"neutral",live:!1}:{label:"rouge",tone:"danger",live:!1}}function j0({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 VT({pullRequestNumber:t,mergeSha:a,environmentsConfigured:i}){const r=wT(a,i),o=r.data?.environments.find(v=>v.name==="development"),c=o!==void 0&&o.sha===a,d=c&&o.deployment?.state==="success",h=c&&o.deployment!==null&&o.deployment!==void 0&&["failure","error"].includes(o.deployment.state??""),m=i&&!d&&!h&&r.error==null,p=i?r.error!=null?"Le suivi des environnements n'a pas répondu ; la fusion est faite.":d?`Déployée en development (${a.slice(0,7)}).`:h?`Le déploiement development a échoué sur ${a.slice(0,7)} : voir le workflow du produit.`:c?o.deployment===null||o.deployment===void 0?`La branche par défaut est sur ${a.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(j0,{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 PT({specId:t,role:a}){const i=vT(t),r=xT(t),o=jr();if(i.error)return g.jsx(pt,{error:i.error});if(i.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=i.data;if(r.isSuccess)return g.jsx(VT,{pullRequestNumber:r.data.pullRequestNumber,mergeSha:r.data.mergeSha,environmentsConfigured:o.data?.host?.environments!==!1});const d=c.canMerge&&vv(a,c.requiredRole),h=c.pullRequest!==null&&(c.checks==="pending"||c.checks==="none"||c.mergeable===null);return g.jsxs(tn,{"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(qe,{tone:KT[c.checks]??"neutral",children:QT[c.checks]??c.checks}),h&&g.jsx(j0,{label:"la CI tourne, relue toutes les dix secondes"}),g.jsx(w0,{status:c.specStatus}),c.needsOperator&&g.jsx(qe,{tone:"orichalcum",children:"en attente de l'opérateur"})]})]}),g.jsx(ut,{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=FT(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(qe,{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&&!vv(a,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(pt,{error:r.error})})]})}const yv={reader:0,author:1,approver:2,operator:3};function vv(t,a){return(yv[t]??-1)>=(yv[a]??99)}const XT={empty:"Vide",loading:"Chargement",nominal:"Nominal",error:"Erreur"};function JT({specId:t}){const a=jT(t),i=zT(t),[r,o]=W.useState(null),[c,d]=W.useState(null);if(a.error)return g.jsx(pt,{error:a.error});if(a.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=a.data.compositions,m=a.data.composition,p=h.length>0?h.find(S=>S.name===c)??h.find(S=>S.selected)??h[0]??null:null,b=p===null?a.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(tn,{"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(qe,{tone:"positive",children:"retenue"}),p!==null&&p.name!==m&&g.jsx(ut,{voice:"primary",size:"sm",disabled:i.isPending,onClick:()=>i.mutate(p.name),children:i.isPending?"Sélection…":"Retenir cette composition"})]}),i.error!=null&&g.jsx("div",{className:"mb-3",children:g.jsx(pt,{error:i.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:XT[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 z0(t){return t instanceof y0?z0(t.def.innerType):t}function IT(){const t=fi.shape;return Object.keys(t).map(a=>{const i=z0(t[a]);if(i instanceof No)return{name:a,kind:"enum",options:i.options.map(r=>String(r)),readOnly:!1};if(i instanceof m0)return{name:a,kind:"string-array",readOnly:!1};if(i instanceof f0)return{name:a,kind:"text",readOnly:a==="id"};throw new Error(`deriveFrontmatterFields: unsupported schema for "${String(a)}" — extend the derivation, never hand-describe the form`)})}function bv(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 Nf(t){return t.split(`
|
|
73
|
+
`).map(a=>a.trim()).filter(a=>a!=="")}function WT(t){return{id:t.id,status:t.status,depends_on:Nf(t.depends_on),priority:t.priority,refs:Nf(t.refs),deferred:Nf(t.deferred)}}function eR(t){const a=[],i=t.split(`
|
|
74
|
+
`);let r=0;for(;r<i.length;){const c=(i[r]??"").trim();if(c===""){r+=1;continue}const d=/^(#{1,6})\s+(.*)$/.exec(c);if(d!==null){a.push({kind:"heading",level:(d[1]??"#").length,text:d[2]??""}),r+=1;continue}if(c.startsWith("```")){const m=[];for(r+=1;r<i.length&&!(i[r]??"").trim().startsWith("```");)m.push(i[r]??""),r+=1;r+=1,a.push({kind:"code",text:m.join(`
|
|
75
|
+
`)});continue}if(c.startsWith("- ")){const m=[];for(;r<i.length;){const p=(i[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}a.push({kind:"bullet",items:m});continue}const h=[];for(;r<i.length;){const m=(i[r]??"").trim();if(m===""||m.startsWith("#")||m.startsWith("- ")||m.startsWith("```"))break;h.push(m),r+=1}a.push({kind:"paragraph",text:h.join(" ")})}return a}const tR=6,nR={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 aR({markdown:t}){const a=eR(t);return a.length===0?g.jsx("p",{className:"text-sm text-text-faint",children:"Rien à prévisualiser encore."}):g.jsx("div",{className:"space-y-2",children:a.map((i,r)=>{if(i.kind==="heading")return g.jsx("p",{className:nR[Math.min(i.level,2)],children:i.text},r);if(i.kind==="bullet")return g.jsx("ul",{className:"list-disc space-y-1 pl-5 text-sm text-text-muted marker:text-accent",children:i.items.map((o,c)=>g.jsx("li",{children:o},c))},r);if(i.kind==="code"){const o=i.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:i.text});return o.length<tR?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:i.text},r)})})}const ao="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 sR({specId:t}){const{data:a,isPending:i,error:r}=lT(t);return r?g.jsxs("div",{className:"space-y-3",children:[g.jsx(N0,{}),g.jsx(pt,{error:r})]}):i?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(iR,{specId:t,initialFrontmatter:a.frontmatter,initialBody:a.body},t)}function N0(){return g.jsx(ui,{to:"/",className:"inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-accent",children:"← Retour au board"})}function iR({specId:t,initialFrontmatter:a,initialBody:i}){const r=IT(),[o,c]=W.useState(()=>bv(a)),[d,h]=W.useState(()=>({form:bv(a),body:i})),[m,p]=W.useState(i),[b,v]=W.useState(null),[x,S]=W.useState(!1),[w,O]=W.useState(!1),z=uT(t),R=jr(),U=m!==d.body||JSON.stringify(o)!==JSON.stringify(d.form),Q=new Set($T(m)),V=(P,te)=>{c(le=>({...le,[P]:te}))},J=()=>{const P=fi.safeParse(WT(o));return P.success?(v(null),P.data):(v(P.error.issues.map(te=>`${te.path.join(".")}: ${te.message}`).join(" ; ")),null)},L=()=>{const P=J();P!==null&&z.mutate({frontmatter:P,body:m},{onSuccess:()=>h({form:o,body:m})})},A=()=>{const P=J();if(P===null){S(!1);return}const te={...o,status:"validated"};z.mutate({frontmatter:{...P,status:"validated"},body:m},{onSuccess:()=>{c(te),h({form:te,body:m})},onSettled:()=>S(!1)})};W.useEffect(()=>{const P=te=>{(te.metaKey||te.ctrlKey)&&te.key.toLowerCase()==="s"&&(te.preventDefault(),L())};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)});const X=CN(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(N0,{}),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(w0,{status:o.status}),U&&g.jsx(qe,{tone:"orichalcum",children:"Modifications non enregistrées"})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(ut,{onClick:L,disabled:z.isPending,title:"⌘S / Ctrl+S",children:"Enregistrer"}),o.status==="draft"&&g.jsx(ut,{voice:"primary",onClick:()=>S(!0),disabled:z.isPending,children:"Valider"})]})]})]}),X.length>0&&g.jsxs(tn,{"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:X.map(P=>g.jsx("li",{children:P},P))}),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."})]}),R.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":0},children:g.jsx(JT,{specId:t})}),R.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":1},children:g.jsx(PT,{specId:t,role:R.data.role})}),R.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":2},children:g.jsx(HT,{specId:t})}),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]}),z.error!=null&&g.jsx(pt,{error:z.error}),z.isSuccess&&z.error==null&&!U&&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 : ",z.data.spec.status,"."]}),g.jsxs("ol",{"aria-label":"Sections canoniques",className:"studio-reveal flex flex-wrap gap-2",style:{"--i":3},children:[Ws.map((P,te)=>{const le=P.replace(/^# /u,"");return g.jsx("li",{children:g.jsx(qe,{tone:Q.has(P)?"accent":"neutral",title:Q.has(P)?"section présente":"section absente ou hors ordre",children:`${te+1} · ${le}`})},P)}),g.jsxs("li",{className:"self-center font-mono text-xs text-text-faint",children:[g.jsx(vn,{value:Q.size}),"/",Ws.length," présentes, dans l'ordre du gate"]})]}),g.jsxs(tn,{"aria-label":"Frontmatter",className:"studio-reveal",style:{"--i":4},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(P=>g.jsxs("label",{className:"block text-sm text-text-muted",children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:P.name}),P.kind==="enum"?g.jsx("select",{value:o[P.name],onChange:te=>V(P.name,te.target.value),className:ao,children:(P.options??[]).map(te=>g.jsx("option",{value:te,children:te},te))}):P.kind==="string-array"?g.jsx("textarea",{value:o[P.name],onChange:te=>V(P.name,te.target.value),rows:2,placeholder:"un élément par ligne",className:`${ao} font-mono text-xs`}):g.jsx("input",{value:o[P.name],readOnly:P.readOnly,onChange:te=>V(P.name,te.target.value),className:`${ao} font-mono ${P.readOnly?"bg-surface-sunken text-text-faint":""}`})]},P.name))})]}),g.jsxs("section",{"aria-label":"Sections markdown",className:`studio-reveal grid grid-cols-1 gap-4 ${w?"lg:grid-cols-2":""}`,style:{"--i":5},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(ut,{voice:"ghost",size:"sm",onClick:()=>O(!1),children:"Replier l'éditeur"})]}),g.jsx("textarea",{"aria-label":"sections (markdown)",value:m,onChange:P=>p(P.target.value),rows:28,spellCheck:!1,className:`${ao} 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(vn,{value:m.split(`
|
|
77
|
+
`).length})," lignes · ",g.jsx(vn,{value:m.trim()===""?0:m.trim().split(/\s+/u).length})," mots"]})]}):g.jsxs("button",{type:"button",onClick:()=>O(!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(aR,{markdown:m})})]})]}),g.jsxs(E0,{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(ut,{voice:"ghost",onClick:()=>S(!1),children:"Annuler"}),g.jsx(ut,{voice:"primary",onClick:A,disabled:z.isPending,children:"Confirmer la validation"})]})]})]})}const rR={skeleton:"neutral","in-progress":"warning",delivered:"positive"},lR={GET:"accent",POST:"positive",PUT:"warning",PATCH:"warning",DELETE:"danger"};function oR(){const{data:t,isPending:a,error:i}=oT();if(i)return g.jsx(pt,{error:i});if(a)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(ri,{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(vn,{value:d.value})})]},d.label))}),g.jsxs(tn,{"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(qe,{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(tn,{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(qe,{tone:rR[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(qe,{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(qe,{tone:lR[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 uR=ne({accepted:va(!0)});function xv({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(bb,{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 cR(){const[t,a]=W.useState(""),[i,r]=W.useState({kind:"idle"});async function o(c){c.preventDefault(),r({kind:"sending"});try{await st("/api/auth/magic-link",uR,{method:"POST",...Er({email:t})}),r({kind:"sent"})}catch(d){r({kind:"error",error:d})}}return i.kind==="sent"?g.jsx(xv,{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(xv,{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=>a(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"}),i.kind==="error"&&g.jsx("div",{className:"mt-3",children:g.jsx(pt,{error:i.error})}),g.jsx(ut,{voice:"primary",type:"submit",disabled:i.kind==="sending",className:"mt-5 w-full",children:i.kind==="sending"?"Envoi…":"Recevoir un lien"})]})})}const so=50,fR=["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."],dR=[{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"}],Tf="w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent",Rf=3,hR=6,Sv=t=>`${Math.floor(t/1e3)} s`;function mR(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 _v({job:t}){const a=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"}),mR(t)]}),g.jsxs("span",{className:"font-mono text-xs tabular-nums text-text-muted",children:[Sv(t.elapsedMs)," / ",Sv(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 ${a>=1?"bg-warning":"bg-accent"} transition-[width] duration-(--duration-base)`,style:{width:`${Math.round(a*100)}%`}})}),a>=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 Af=[".md",".markdown",".txt",".csv",".json",".html",".htm",".xlsx",".pdf"],pR=5,gR=4*1024*1024,wv=t=>t<1024?`${t} o`:t<1024*1024?`${Math.round(t/1024)} Ko`:`${(t/(1024*1024)).toFixed(1)} Mo`;async function yR(t){const a=new Uint8Array(await t.arrayBuffer());let i="";for(let r=0;r<a.length;r+=32768)i+=String.fromCharCode(...a.subarray(r,r+32768));return btoa(i)}function vR(){const[t,a]=W.useState(""),[i,r]=W.useState(""),[o,c]=W.useState(!1),[d,h]=W.useState([]),[m,p]=W.useState(null),[b,v]=W.useState(null),[x,S]=W.useState([]),[w,O]=W.useState({}),z=Co(),R=mT(),U=gT(b),Q=Md(),V=t.trim().length,J=U.data?.stage==="done"?U.data.result?.specId:void 0;W.useEffect(()=>{J!==void 0&&z({to:"/specs/$specId",params:{specId:J}})},[J,z]);const L=U.data?.stage==="questions"?U.data:null,A=U.data!==void 0&&U.data.stage!=="done"&&U.data.stage!=="failed"&&U.data.stage!=="questions",X=R.isPending||A||b!==null&&U.isPending,P=U.error instanceof Bo&&U.error.payload.code==="BRIEF_JOB_LOST",te=x.flatMap(B=>Object.entries(B.answers).map(([se,fe])=>({questionId:se,answer:fe}))),le=i.trim().toLowerCase(),re=le===""||!o?[]:(Q.data?.specs??[]).filter(B=>"status"in B).filter(B=>B.id!==le&&(B.id.includes(le)||B.intent.toLowerCase().includes(le))).slice(0,hR);function me(B){R.mutate({brief:t,...i.trim()===""?{}:{specId:i.trim()},...d.length===0?{}:{attachments:d.map(se=>({name:se.name,contentBase64:se.contentBase64}))},...B.answers.length===0?{}:{answers:B.answers},...B.round===1?{}:{round:B.round},...B.skipQuestions?{skipQuestions:!0}:{}},{onSuccess:se=>v(se.jobId)})}function ye(){if(L===null)return;const B=L.round??x.length+1,se=[...x,{round:B,questions:L.questions??[],answers:w}];S(se),O({}),v(null),me({answers:se.flatMap(fe=>Object.entries(fe.answers).map(([j,q])=>({questionId:j,answer:q}))),round:Math.min(B+1,Rf+1),skipQuestions:!1})}function F(){const B=L?.round??x.length+1;v(null),me({answers:te,round:B,skipQuestions:!0})}async function M(B){const se=Array.from(B.target.files??[]);B.target.value="",p(null);const fe=[...d];for(const j of se){const q=j.name.toLowerCase();if(!Af.some(ee=>q.endsWith(ee))){p(`« ${j.name} » : format non retenu — ${Af.join(", ")}.`);continue}if(j.size>gR){p(`« ${j.name} » : ${wv(j.size)}, au-delà de 4 Mo par pièce.`);continue}if(fe.length>=pR){p(`Cinq pièces au plus : « ${j.name} » n'est pas jointe.`);break}fe.some(ee=>ee.name===j.name)||fe.push({name:j.name,size:j.size,contentBase64:await yR(j)})}h(fe)}function I(B){B.preventDefault(),S([]),O({}),v(null),me({answers:[],round:1,skipQuestions:!1})}return g.jsxs("form",{onSubmit:I,className:"space-y-6",children:[g.jsx(ri,{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:dR.map((B,se)=>g.jsxs("li",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":se},children:[g.jsxs("p",{className:"font-mono text-xs text-accent",children:["0",se+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(tn,{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 ${V<so?"text-text-faint":"text-positive"}`,children:[V," / ",so," caractères minimum"]})]}),g.jsx("textarea",{id:"brief-text",required:!0,minLength:so,rows:10,value:t,onChange:B=>a(B.target.value),placeholder:"Je veux une rubrique qui…",className:`${Tf} 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:fR.map(B=>g.jsx("li",{children:g.jsxs(ut,{voice:"ghost",size:"sm",onClick:()=>a(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:i,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":re.length>0,className:`${Tf} mt-1 font-mono`}),re.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:re.map(B=>g.jsx("li",{children:g.jsxs("button",{type:"button",role:"option","aria-selected":!1,onMouseDown:se=>se.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:Af.join(","),onChange:B=>{M(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:wv(B.size)}),g.jsx(ut,{voice:"ghost",size:"sm",onClick:()=>h(d.filter(se=>se.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 ",Rf," — répondue"]}),g.jsx("dl",{className:"mt-2 space-y-1 text-text-muted",children:B.questions.map(se=>g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("dt",{children:se.text}),g.jsx("dd",{className:"text-text",children:B.answers[se.id]??"(sans réponse)"})]},se.id))})]},B.round)),L!==null&&g.jsxs(tn,{"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 ",L.round??x.length+1," sur ",Rf]})]}),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:(L.questions??[]).map((B,se)=>g.jsx("li",{children:g.jsxs("fieldset",{children:[g.jsxs("legend",{className:"font-medium text-text",children:[se+1,". ",B.text]}),g.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:B.options.map(fe=>g.jsxs("label",{className:`cursor-pointer rounded-md border px-3 py-1.5 transition-colors ${w[B.id]===fe?"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:fe,checked:w[B.id]===fe,onChange:()=>O({...w,[B.id]:fe}),className:"sr-only"}),fe]},fe))}),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:fe=>O({...w,[B.id]:fe.target.value}),className:`${Tf} mt-2`})]})},B.id))}),g.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[g.jsx(ut,{voice:"primary",onClick:ye,disabled:R.isPending||Object.values(w).every(B=>B.trim()===""),children:"Répondre"}),g.jsx(ut,{voice:"ghost",onClick:F,disabled:R.isPending,children:"Passer les questions"})]})]}),A&&U.data!==void 0&&g.jsx(_v,{job:U.data}),R.isPending&&b===null&&g.jsx(_v,{job:{jobId:"",stage:"drafting",attempt:1,elapsedMs:0,budgetMs:9e4}}),P&&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."}),!P&&U.error!=null&&g.jsx(pt,{error:U.error}),U.data?.stage==="failed"&&U.data.error!==void 0&&g.jsx($o,{error:U.data.error}),R.error!=null&&g.jsx(pt,{error:R.error}),g.jsx(ut,{voice:"primary",type:"submit",disabled:X||L!==null||V<so,children:x.length>0||L!==null?"Recommencer le brief":"Rédiger la spec"})]})}const bR=["development","staging","production"],pn={development:"Développement",staging:"Préproduction",production:"Production"},xR={staging:"development",production:"staging"},SR={success:"positive",failure:"danger",error:"danger",in_progress:"warning",pending:"warning",queued:"warning"},ur={deployed:"border-accent bg-accent shadow-[0_0_0_4px_var(--theme-accent-glow)]",forward:"border-accent bg-surface-sunken",backward:"border-orichalcum bg-surface-sunken",unreachable:"border-border bg-transparent"},_R="mt-2 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent",wR=10,Cf=t=>t.slice(0,10);function OR({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 ER(){const t=jr(),a=t.data?.host?.environments!==!1,[i,r]=W.useState("staging"),[o,c]=W.useState(null),[d,h]=W.useState(""),[m,p]=W.useState(null),b=_T(a,m),v=hv("development",a),x=hv(i,a),S=Md(),w=OT(),O=t.data?.role==="operator";if(!a)return g.jsxs("div",{className:"space-y-6",children:[g.jsx(ri,{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(tn,{"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(b.error)return g.jsx(pt,{error:b.error});if(b.isPending)return g.jsx("div",{"aria-label":"Chargement des environnements",className:"h-40 studio-breathe rounded-lg border border-border bg-surface-sunken/60"});const z=b.data,R=new Map;for(const F of S.data?.specs??[])"intent"in F&&F.intent!==""&&R.set(F.id,F.intent);const U=F=>F.specId!==null&&R.get(F.specId)||F.title,Q=v.data?.commits??[],V=F=>F===null?-1:Q.findIndex(M=>M.sha===F),J=F=>z.environments.find(M=>M.name===F)?.sha??null,L=x.data?.commits??[],A=L.findIndex(F=>F.reach==="deployed"),X=o===null?-1:L.findIndex(F=>F.sha===o),P=X===-1?null:L[X]??null,te=P?.reach==="forward",le=P===null||A===-1?L.slice(0,Math.max(X,0)):te?L.slice(X,A):L.slice(A,X),re=P!==null&&i!=="development"&&(te||O&&d.trim().length>=wR)&&!w.isPending;function me(F){r(F),c(null),h("")}function ye(){if(P===null||i==="development")return;const F=i,M=P.sha;w.mutate(te?{environment:F,sha:M}:{environment:F,sha:M,rollback:!0,reason:d.trim()},{onSuccess:()=>{c(null),h(""),p({environment:F,sha:M}),x.refetch(),v.refetch()}})}return g.jsxs("div",{className:"space-y-6",children:[g.jsx(ri,{eyebrow:"Hébergé",title:"Promotions",explanation:"Trois environnements, une ligne de commits par environnement. Le commit déployé porte l'anneau ; cliquer un autre commit de la ligne le déploie. La production ne reçoit que ce que la préproduction a reçu, au commit près."}),w.error!=null&&g.jsx(pt,{error:w.error}),g.jsx("ol",{"aria-label":"Environnements",className:"grid gap-3 md:grid-cols-[1fr_auto_1fr_auto_1fr] md:items-stretch",children:z.environments.map((F,M)=>{const I=F.name,B=xR[I],se=V(F.sha),fe=B===void 0||se===-1?null:Math.max(0,se-Math.max(V(J(B)),0)),j=se===-1?null:Q[se]??null,q=m!==null&&m.environment===I&&!(F.sha===m.sha&&F.deployment?.state==="success");return g.jsxs("li",{className:"contents",children:[M>0&&g.jsx("span",{"aria-hidden":"true",className:"hidden self-center font-display text-2xl text-text-faint md:block",children:"→"}),g.jsxs("button",{type:"button","aria-label":pn[I],"aria-pressed":i===I,onClick:()=>me(I),className:`studio-reveal flex flex-col rounded-lg border bg-surface-raised p-4 text-left shadow-raised transition-[transform,box-shadow,border-color] duration-(--duration-fast) hover:-translate-y-0.5 hover:shadow-overlay focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent ${i===I?"border-accent shadow-glow":"border-border"}`,style:{"--i":M},children:[g.jsxs("div",{className:"flex w-full items-start justify-between gap-2",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:pn[I]}),g.jsx("p",{className:"font-mono text-xs text-text-faint",children:F.ref})]}),q?g.jsxs(qe,{tone:"accent",children:[g.jsx(OR,{label:`déploiement de ${pn[I].toLowerCase()} en cours`})," déploiement"]}):B===void 0?g.jsxs(qe,{tone:"accent",children:["tête de ",F.ref]}):fe===0?g.jsx(qe,{tone:"positive",children:"à jour"}):fe!==null?g.jsx(qe,{tone:"warning",children:"en retard"}):null]}),g.jsx("p",{className:"mt-3 font-display text-xl font-semibold leading-tight text-text text-balance",children:F.sha===null?"Aucun commit":j===null?"Commit hors de la ligne lue":U(j)}),g.jsxs("p",{className:"mt-1 flex flex-wrap items-center gap-x-2 font-mono text-xs text-text-faint",children:[g.jsx("span",{children:F.sha===null?"—":F.sha.slice(0,7)}),j!==null&&g.jsxs(g.Fragment,{children:[g.jsx("span",{children:"·"}),g.jsx("span",{children:j.author}),g.jsx("span",{children:"·"}),g.jsx("span",{children:Cf(j.authoredAt)})]}),j?.releaseTag!=null&&g.jsx(qe,{tone:"orichalcum",children:j.releaseTag})]}),F.deployment!==null&&g.jsxs("p",{className:"mt-2 flex items-center gap-2 text-xs text-text-muted",children:[g.jsx(qe,{tone:SR[F.deployment.state??"pending"]??"neutral",children:F.deployment.state??"en attente"}),"déployé le ",Cf(F.deployment.createdAt)]}),g.jsxs("p",{className:"mt-auto flex items-baseline gap-2 pt-4",children:[g.jsx("span",{className:"font-mono text-2xl text-accent",children:B===void 0?g.jsx(vn,{value:Q.length}):fe===null?"—":g.jsx(vn,{value:fe})}),g.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.12em] text-text-faint",children:B===void 0?"commits lus":`commit${fe!==null&&fe>1?"s":""} d'avance en ${pn[B].toLowerCase()}`})]})]})]},I)})}),g.jsxs(tn,{"aria-label":`Ligne de ${pn[i].toLowerCase()}`,className:"studio-reveal text-sm",style:{"--i":3},children:[g.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[g.jsx("h2",{className:"font-display text-xl font-semibold text-text",children:pn[i]}),g.jsxs("span",{className:"font-mono text-xs text-text-muted",children:[x.data?.ref??""," · ",L.length," commits lus sur ",v.data?.ref??"la branche par défaut"]})]}),g.jsxs("p",{className:"mt-1 flex flex-wrap gap-4 text-xs text-text-faint",children:[g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx("i",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${ur.deployed}`})," déployé"]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx("i",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${ur.forward}`})," promouvable"]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx("i",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${ur.backward}`})," retour arrière (opérateur)"]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx("i",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${ur.unreachable}`})," hors d'atteinte"]})]}),x.error!=null&&g.jsx("div",{className:"mt-3",children:g.jsx(pt,{error:x.error})}),x.isPending&&g.jsx("div",{"aria-label":"Chargement de la ligne",className:"mt-4 h-24 studio-breathe rounded-md border border-border bg-surface-sunken/60"}),L.length>0&&g.jsx("ol",{"aria-label":"Commits de la ligne",className:"relative mt-4 space-y-1 before:absolute before:bottom-2 before:left-[0.8rem] before:top-2 before:w-0.5 before:bg-border",children:L.map((F,M)=>{const I=F.reach==="unreachable"||F.reach==="deployed"||F.reach==="backward"&&!O||i==="development",B=bR.filter(se=>J(se)===F.sha);return g.jsx("li",{className:"studio-reveal",style:{"--i":M},children:g.jsxs("button",{type:"button",disabled:I,title:F.why,"aria-current":F.reach==="deployed",onClick:()=>c(o===F.sha?null:F.sha),className:`grid w-full grid-cols-[1.6rem_minmax(0,1fr)_auto] items-center gap-3 rounded-md border px-2 py-2 text-left transition-[background,border-color,transform] duration-(--duration-fast) ${F.reach==="deployed"?"border-accent/35 bg-accent-soft":o===F.sha?"border-accent bg-surface-sunken":"border-transparent"} ${I?"cursor-not-allowed opacity-55":"hover:translate-x-0.5 hover:border-border hover:bg-surface-sunken"}`,children:[g.jsx("i",{"aria-hidden":"true",className:`relative z-10 inline-block h-2.5 w-2.5 justify-self-center rounded-full border-2 ${ur[F.reach]}`}),g.jsxs("span",{className:"flex min-w-0 flex-wrap items-baseline gap-x-3 gap-y-0.5",children:[g.jsx("span",{className:"font-medium text-text",children:U(F)}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:[F.specId!==null?`${F.specId} · `:"",F.sha.slice(0,7)]}),g.jsxs("span",{className:"text-xs text-text-faint",children:[F.author," · ",Cf(F.authoredAt)]})]}),g.jsxs("span",{className:"flex items-center gap-1.5 justify-self-end",children:[B.map(se=>g.jsx(qe,{tone:se===i?"accent":"neutral",children:pn[se].toLowerCase()},se)),F.releaseTag!==null&&g.jsx(qe,{tone:"orichalcum",children:F.releaseTag})]})]})},F.sha)})}),P!==null&&i!=="development"&&g.jsxs("section",{"aria-label":te?"Promouvoir":"Retour arrière",className:"studio-rise mt-4 rounded-lg border border-accent/35 bg-surface p-4 shadow-overlay",children:[g.jsxs("h3",{className:"font-display text-lg font-semibold text-text",children:[te?"Promouvoir":"Revenir"," ",pn[i].toLowerCase()," ",te?"vers":"sur"," ",g.jsx("code",{className:"font-mono text-base",children:P.sha.slice(0,7)})]}),g.jsxs("p",{className:"mt-1 text-text-muted",children:[pn[i]," ",te?"recevrait":"perdrait"," ",g.jsx(vn,{value:le.length,className:"font-medium text-text"})," commit",le.length>1?"s":"",te?" :":" — un retour arrière s'enregistre avec son motif :"]}),g.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-text-muted marker:text-accent",children:le.map(F=>g.jsxs("li",{children:[g.jsx("span",{className:"text-text",children:U(F)})," ",g.jsx("span",{className:"font-mono text-xs text-text-faint",children:F.sha.slice(0,7)})," — ",F.author]},F.sha))}),!te&&g.jsxs("label",{className:"block text-xs text-text-faint",children:["Motif du retour (dix caractères au moins, journalisé)",g.jsx("textarea",{"aria-label":"Motif du retour arrière",rows:2,value:d,onChange:F=>h(F.target.value),className:_R})]}),g.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[g.jsx(ut,{voice:te?"primary":"danger",size:"sm",disabled:!re,onClick:ye,children:w.isPending?"Promotion…":te?"Promouvoir":"Revenir, avec ce motif"}),g.jsx(ut,{voice:"ghost",size:"sm",onClick:()=>c(null),children:"Annuler"}),g.jsx("span",{className:"text-xs text-text-faint",children:P.why})]})]}),w.isSuccess&&m!==null&&g.jsxs("p",{role:"status",className:"studio-rise mt-4 rounded-md border border-positive/40 bg-positive-soft p-3 text-text",children:[pn[w.data.environment]," est à ",w.data.toSha.slice(0,7),w.data.releaseTag===null?"":` — release ${w.data.releaseTag}`,"."," ",jR(z,m)?"Le produit n'a pas encore rapporté le déploiement.":"Déployé."]})]}),g.jsxs(tn,{className:"studio-reveal",style:{"--i":4},children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Releases"}),z.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:z.releases.map(F=>g.jsx("li",{children:g.jsx(qe,{tone:"orichalcum",mono:!0,children:F})},F))})]})]})}function jR(t,a){const i=t.environments.find(r=>r.name===a.environment);return!(i!==void 0&&i.sha===a.sha&&i.deployment?.state==="success")}function zR(t){const a=[],i=new Date;for(let r=0;r<t;r+=1){const o=new Date(Date.UTC(i.getUTCFullYear(),i.getUTCMonth()-r,1));a.push(o.toISOString().slice(0,7))}return a}const cr=t=>`${t.toFixed(2)} $`,Ov=t=>new Intl.NumberFormat("fr-FR",{notation:"compact",maximumFractionDigits:1}).format(t),ga="px-3 py-2 text-right font-mono tabular-nums";function NR(){const t=zR(6),[a,i]=W.useState(t[0]??""),r=ET(a);return g.jsxs("div",{className:"space-y-6",children:[g.jsx(ri,{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:a,onChange:o=>i(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(pt,{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:Ov},{label:"jetons sortis",value:r.data.totals.outputTokens,format:Ov},{label:"estimation",value:r.data.totals.estimatedUsd,format:cr}].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(vn,{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:[cr(r.data.totals.estimatedUsd)," sur un plafond de ",cr(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(O0,{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:ga,children:o.runs}),g.jsx("td",{className:ga,children:o.inputTokens}),g.jsx("td",{className:ga,children:o.outputTokens}),g.jsxs("td",{className:ga,children:[cr(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:ga,children:r.data.totals.runs}),g.jsx("td",{className:ga,children:r.data.totals.inputTokens}),g.jsx("td",{className:ga,children:r.data.totals.outputTokens}),g.jsx("td",{className:ga,children:cr(r.data.totals.estimatedUsd)})]})]})]})})]})]})}const T0="ogygie-studio-theme";function TR(){try{const t=window.localStorage.getItem(T0);return t==="dark"||t==="light"?t:null}catch{return null}}const RR="dark";function AR(){const[t,a]=W.useState(()=>TR()??RR);W.useEffect(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const i=W.useCallback(()=>{a(r=>{const o=r==="dark"?"light":"dark";try{window.localStorage.setItem(T0,o)}catch{}return o})},[]);return{theme:t,toggle:i}}const CR="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 fr({to:t,glyph:a,children:i}){return g.jsxs(ui,{to:t,className:CR,activeOptions:{exact:t==="/"},children:[g.jsx("span",{"aria-hidden":"true",className:"w-4 text-center font-mono text-xs text-text-faint",children:a}),i]})}function MR(){const t=jr(),{theme:a,toggle:i}=AR();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(ui,{to:"/",className:"mb-6 flex items-center gap-3 px-3",children:[g.jsx(bb,{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(fr,{to:"/",glyph:"▦",children:"Board"}),g.jsx(fr,{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(fr,{to:"/brief",glyph:"✎",children:"Brief"}),t.data.host?.environments!==!1&&g.jsx(fr,{to:"/promotions",glyph:"⇥",children:"Promotions"}),g.jsx(fr,{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:i,"aria-label":a==="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:a==="dark"?"Abysse":"Marbre"}),g.jsx("span",{"aria-hidden":"true",className:"font-mono",children:a==="dark"?"☾":"☀"})]})]})]})}function DR(){return g.jsxs("div",{className:"flex min-h-screen bg-surface text-text",children:[g.jsx(MR,{}),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(yb,{})})})]})}const Ta=Tw({component:DR}),kR=ls({getParentRoute:()=>Ta,path:"/",component:LT}),R0=ls({getParentRoute:()=>Ta,path:"/specs/$specId",component:function(){const{specId:a}=R0.useParams();return g.jsx(sR,{specId:a})}}),UR=ls({getParentRoute:()=>Ta,path:"/manifest",component:oR}),LR=ls({getParentRoute:()=>Ta,path:"/login",component:cR}),ZR=ls({getParentRoute:()=>Ta,path:"/brief",component:vR}),qR=ls({getParentRoute:()=>Ta,path:"/promotions",component:ER}),BR=ls({getParentRoute:()=>Ta,path:"/consumption",component:NR}),$R=Ta.addChildren([kR,R0,UR,LR,ZR,qR,BR]);function HR(t){return Zw({routeTree:$R})}const QR=new L_,KR=HR(),A0=document.getElementById("root");if(A0===null)throw new Error("Studio UI: #root element missing from index.html");c_.createRoot(A0).render(g.jsx(W.StrictMode,{children:g.jsx(f_,{client:QR,children:g.jsx($w,{router:KR})})}));
|