@package-broker/ui 0.17.1 → 0.17.3

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.
@@ -0,0 +1,88 @@
1
+ (function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function i(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function a(s){if(s.ep)return;s.ep=!0;const u=i(s);fetch(s.href,u)}})();function Bl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nf={exports:{}},kl={};var v0;function Kk(){if(v0)return kl;v0=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function i(a,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var f in s)f!=="key"&&(u[f]=s[f])}else u=s;return s=u.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:u}}return kl.Fragment=n,kl.jsx=i,kl.jsxs=i,kl}var x0;function Jk(){return x0||(x0=1,Nf.exports=Kk()),Nf.exports}var v=Jk(),jf={exports:{}},be={};var b0;function Wk(){if(b0)return be;b0=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function b(A){return A===null||typeof A!="object"?null:(A=x&&A[x]||A["@@iterator"],typeof A=="function"?A:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,j={};function _(A,q,N){this.props=A,this.context=q,this.refs=j,this.updater=N||w}_.prototype.isReactComponent={},_.prototype.setState=function(A,q){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,q,"setState")},_.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function R(){}R.prototype=_.prototype;function T(A,q,N){this.props=A,this.context=q,this.refs=j,this.updater=N||w}var V=T.prototype=new R;V.constructor=T,k(V,_.prototype),V.isPureReactComponent=!0;var X=Array.isArray;function L(){}var Z={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function ie(A,q,N){var le=N.ref;return{$$typeof:e,type:A,key:q,ref:le!==void 0?le:null,props:N}}function H(A,q){return ie(A.type,q,A.props)}function se(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function ue(A){var q={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(N){return q[N]})}var xe=/\/+/g;function I(A,q){return typeof A=="object"&&A!==null&&A.key!=null?ue(""+A.key):q.toString(36)}function U(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(L,L):(A.status="pending",A.then(function(q){A.status==="pending"&&(A.status="fulfilled",A.value=q)},function(q){A.status==="pending"&&(A.status="rejected",A.reason=q)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function D(A,q,N,le,ce){var de=typeof A;(de==="undefined"||de==="boolean")&&(A=null);var Te=!1;if(A===null)Te=!0;else switch(de){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(A.$$typeof){case e:case n:Te=!0;break;case g:return Te=A._init,D(Te(A._payload),q,N,le,ce)}}if(Te)return ce=ce(A),Te=le===""?"."+I(A,0):le,X(ce)?(N="",Te!=null&&(N=Te.replace(xe,"$&/")+"/"),D(ce,q,N,"",function(on){return on})):ce!=null&&(se(ce)&&(ce=H(ce,N+(ce.key==null||A&&A.key===ce.key?"":(""+ce.key).replace(xe,"$&/")+"/")+Te)),q.push(ce)),1;Te=0;var Je=le===""?".":le+":";if(X(A))for(var Be=0;Be<A.length;Be++)le=A[Be],de=Je+I(le,Be),Te+=D(le,q,N,de,ce);else if(Be=b(A),typeof Be=="function")for(A=Be.call(A),Be=0;!(le=A.next()).done;)le=le.value,de=Je+I(le,Be++),Te+=D(le,q,N,de,ce);else if(de==="object"){if(typeof A.then=="function")return D(U(A),q,N,le,ce);throw q=String(A),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Te}function B(A,q,N){if(A==null)return A;var le=[],ce=0;return D(A,le,"","",function(de){return q.call(N,de,ce++)}),le}function te(A){if(A._status===-1){var q=A._result;q=q(),q.then(function(N){(A._status===0||A._status===-1)&&(A._status=1,A._result=N)},function(N){(A._status===0||A._status===-1)&&(A._status=2,A._result=N)}),A._status===-1&&(A._status=0,A._result=q)}if(A._status===1)return A._result.default;throw A._result}var re=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},C={map:B,forEach:function(A,q,N){B(A,function(){q.apply(this,arguments)},N)},count:function(A){var q=0;return B(A,function(){q++}),q},toArray:function(A){return B(A,function(q){return q})||[]},only:function(A){if(!se(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return be.Activity=y,be.Children=C,be.Component=_,be.Fragment=i,be.Profiler=s,be.PureComponent=T,be.StrictMode=a,be.Suspense=p,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,be.__COMPILER_RUNTIME={__proto__:null,c:function(A){return Z.H.useMemoCache(A)}},be.cache=function(A){return function(){return A.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(A,q,N){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var le=k({},A.props),ce=A.key;if(q!=null)for(de in q.key!==void 0&&(ce=""+q.key),q)!Y.call(q,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&q.ref===void 0||(le[de]=q[de]);var de=arguments.length-2;if(de===1)le.children=N;else if(1<de){for(var Te=Array(de),Je=0;Je<de;Je++)Te[Je]=arguments[Je+2];le.children=Te}return ie(A.type,ce,le)},be.createContext=function(A){return A={$$typeof:c,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:u,_context:A},A},be.createElement=function(A,q,N){var le,ce={},de=null;if(q!=null)for(le in q.key!==void 0&&(de=""+q.key),q)Y.call(q,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(ce[le]=q[le]);var Te=arguments.length-2;if(Te===1)ce.children=N;else if(1<Te){for(var Je=Array(Te),Be=0;Be<Te;Be++)Je[Be]=arguments[Be+2];ce.children=Je}if(A&&A.defaultProps)for(le in Te=A.defaultProps,Te)ce[le]===void 0&&(ce[le]=Te[le]);return ie(A,de,ce)},be.createRef=function(){return{current:null}},be.forwardRef=function(A){return{$$typeof:f,render:A}},be.isValidElement=se,be.lazy=function(A){return{$$typeof:g,_payload:{_status:-1,_result:A},_init:te}},be.memo=function(A,q){return{$$typeof:h,type:A,compare:q===void 0?null:q}},be.startTransition=function(A){var q=Z.T,N={};Z.T=N;try{var le=A(),ce=Z.S;ce!==null&&ce(N,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(L,re)}catch(de){re(de)}finally{q!==null&&N.types!==null&&(q.types=N.types),Z.T=q}},be.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},be.use=function(A){return Z.H.use(A)},be.useActionState=function(A,q,N){return Z.H.useActionState(A,q,N)},be.useCallback=function(A,q){return Z.H.useCallback(A,q)},be.useContext=function(A){return Z.H.useContext(A)},be.useDebugValue=function(){},be.useDeferredValue=function(A,q){return Z.H.useDeferredValue(A,q)},be.useEffect=function(A,q){return Z.H.useEffect(A,q)},be.useEffectEvent=function(A){return Z.H.useEffectEvent(A)},be.useId=function(){return Z.H.useId()},be.useImperativeHandle=function(A,q,N){return Z.H.useImperativeHandle(A,q,N)},be.useInsertionEffect=function(A,q){return Z.H.useInsertionEffect(A,q)},be.useLayoutEffect=function(A,q){return Z.H.useLayoutEffect(A,q)},be.useMemo=function(A,q){return Z.H.useMemo(A,q)},be.useOptimistic=function(A,q){return Z.H.useOptimistic(A,q)},be.useReducer=function(A,q,N){return Z.H.useReducer(A,q,N)},be.useRef=function(A){return Z.H.useRef(A)},be.useState=function(A){return Z.H.useState(A)},be.useSyncExternalStore=function(A,q,N){return Z.H.useSyncExternalStore(A,q,N)},be.useTransition=function(){return Z.H.useTransition()},be.version="19.2.3",be}var S0;function jh(){return S0||(S0=1,jf.exports=Wk()),jf.exports}var O=jh();const e_=Bl(O);var Cf={exports:{}},_l={},Tf={exports:{}},Rf={};var w0;function t_(){return w0||(w0=1,(function(e){function n(D,B){var te=D.length;D.push(B);e:for(;0<te;){var re=te-1>>>1,C=D[re];if(0<s(C,B))D[re]=B,D[te]=C,te=re;else break e}}function i(D){return D.length===0?null:D[0]}function a(D){if(D.length===0)return null;var B=D[0],te=D.pop();if(te!==B){D[0]=te;e:for(var re=0,C=D.length,A=C>>>1;re<A;){var q=2*(re+1)-1,N=D[q],le=q+1,ce=D[le];if(0>s(N,te))le<C&&0>s(ce,N)?(D[re]=ce,D[le]=te,re=le):(D[re]=N,D[q]=te,re=q);else if(le<C&&0>s(ce,te))D[re]=ce,D[le]=te,re=le;else break e}}return B}function s(D,B){var te=D.sortIndex-B.sortIndex;return te!==0?te:D.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var p=[],h=[],g=1,y=null,x=3,b=!1,w=!1,k=!1,j=!1,_=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function V(D){for(var B=i(h);B!==null;){if(B.callback===null)a(h);else if(B.startTime<=D)a(h),B.sortIndex=B.expirationTime,n(p,B);else break;B=i(h)}}function X(D){if(k=!1,V(D),!w)if(i(p)!==null)w=!0,L||(L=!0,ue());else{var B=i(h);B!==null&&U(X,B.startTime-D)}}var L=!1,Z=-1,Y=5,ie=-1;function H(){return j?!0:!(e.unstable_now()-ie<Y)}function se(){if(j=!1,L){var D=e.unstable_now();ie=D;var B=!0;try{e:{w=!1,k&&(k=!1,R(Z),Z=-1),b=!0;var te=x;try{t:{for(V(D),y=i(p);y!==null&&!(y.expirationTime>D&&H());){var re=y.callback;if(typeof re=="function"){y.callback=null,x=y.priorityLevel;var C=re(y.expirationTime<=D);if(D=e.unstable_now(),typeof C=="function"){y.callback=C,V(D),B=!0;break t}y===i(p)&&a(p),V(D)}else a(p);y=i(p)}if(y!==null)B=!0;else{var A=i(h);A!==null&&U(X,A.startTime-D),B=!1}}break e}finally{y=null,x=te,b=!1}B=void 0}}finally{B?ue():L=!1}}}var ue;if(typeof T=="function")ue=function(){T(se)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,I=xe.port2;xe.port1.onmessage=se,ue=function(){I.postMessage(null)}}else ue=function(){_(se,0)};function U(D,B){Z=_(function(){D(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(D){switch(x){case 1:case 2:case 3:var B=3;break;default:B=x}var te=x;x=B;try{return D()}finally{x=te}},e.unstable_requestPaint=function(){j=!0},e.unstable_runWithPriority=function(D,B){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var te=x;x=D;try{return B()}finally{x=te}},e.unstable_scheduleCallback=function(D,B,te){var re=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?re+te:re):te=re,D){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=te+C,D={id:g++,callback:B,priorityLevel:D,startTime:te,expirationTime:C,sortIndex:-1},te>re?(D.sortIndex=te,n(h,D),i(p)===null&&D===i(h)&&(k?(R(Z),Z=-1):k=!0,U(X,te-re))):(D.sortIndex=C,n(p,D),w||b||(w=!0,L||(L=!0,ue()))),D},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(D){var B=x;return function(){var te=x;x=B;try{return D.apply(this,arguments)}finally{x=te}}}})(Rf)),Rf}var E0;function n_(){return E0||(E0=1,Tf.exports=t_()),Tf.exports}var Af={exports:{}},Ct={};var k0;function r_(){if(k0)return Ct;k0=1;var e=jh();function n(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(p,h,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:p,containerInfo:h,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Ct.createPortal=function(p,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return u(p,h,null,g)},Ct.flushSync=function(p){var h=c.T,g=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=h,a.p=g,a.d.f()}},Ct.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(p,h))},Ct.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},Ct.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var g=h.as,y=f(g,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:b}):g==="script"&&a.d.X(p,{crossOrigin:y,integrity:x,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Ct.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=f(h.as,h.crossOrigin);a.d.M(p,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(p)},Ct.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,y=f(g,h.crossOrigin);a.d.L(p,g,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Ct.preloadModule=function(p,h){if(typeof p=="string")if(h){var g=f(h.as,h.crossOrigin);a.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(p)},Ct.requestFormReset=function(p){a.d.r(p)},Ct.unstable_batchedUpdates=function(p,h){return p(h)},Ct.useFormState=function(p,h,g){return c.H.useFormState(p,h,g)},Ct.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ct.version="19.2.3",Ct}var _0;function i_(){if(_0)return Af.exports;_0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Af.exports=r_(),Af.exports}var N0;function a_(){if(N0)return _l;N0=1;var e=n_(),n=jh(),i=i_();function a(t){var r="https://react.dev/errors/"+t;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var r=t,l=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(l=r.return),t=r.return;while(t)}return r.tag===3?l:null}function c(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function f(t){if(t.tag===31){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function p(t){if(u(t)!==t)throw Error(a(188))}function h(t){var r=t.alternate;if(!r){if(r=u(t),r===null)throw Error(a(188));return r!==t?null:t}for(var l=t,o=r;;){var d=l.return;if(d===null)break;var m=d.alternate;if(m===null){if(o=d.return,o!==null){l=o;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===l)return p(d),t;if(m===o)return p(d),r;m=m.sibling}throw Error(a(188))}if(l.return!==o.return)l=d,o=m;else{for(var S=!1,E=d.child;E;){if(E===l){S=!0,l=d,o=m;break}if(E===o){S=!0,o=d,l=m;break}E=E.sibling}if(!S){for(E=m.child;E;){if(E===l){S=!0,l=m,o=d;break}if(E===o){S=!0,o=m,l=d;break}E=E.sibling}if(!S)throw Error(a(189))}}if(l.alternate!==o)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?t:r}function g(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t;for(t=t.child;t!==null;){if(r=g(t),r!==null)return r;t=t.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),T=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function ue(t){return t===null||typeof t!="object"?null:(t=se&&t[se]||t["@@iterator"],typeof t=="function"?t:null)}var xe=Symbol.for("react.client.reference");function I(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===xe?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case k:return"Fragment";case _:return"Profiler";case j:return"StrictMode";case X:return"Suspense";case L:return"SuspenseList";case ie:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case w:return"Portal";case T:return t.displayName||"Context";case R:return(t._context.displayName||"Context")+".Consumer";case V:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Z:return r=t.displayName||null,r!==null?r:I(t.type)||"Memo";case Y:r=t._payload,t=t._init;try{return I(t(r))}catch{}}return null}var U=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},re=[],C=-1;function A(t){return{current:t}}function q(t){0>C||(t.current=re[C],re[C]=null,C--)}function N(t,r){C++,re[C]=t.current,t.current=r}var le=A(null),ce=A(null),de=A(null),Te=A(null);function Je(t,r){switch(N(de,r),N(ce,t),N(le,null),r.nodeType){case 9:case 11:t=(t=r.documentElement)&&(t=t.namespaceURI)?By(t):0;break;default:if(t=r.tagName,r=r.namespaceURI)r=By(r),t=Py(r,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}q(le),N(le,t)}function Be(){q(le),q(ce),q(de)}function on(t){t.memoizedState!==null&&N(Te,t);var r=le.current,l=Py(r,t.type);r!==l&&(N(ce,t),N(le,l))}function Pn(t){ce.current===t&&(q(le),q(ce)),Te.current===t&&(q(Te),bl._currentValue=te)}var Aa,Wl;function Zn(t){if(Aa===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Aa=r&&r[1]||"",Wl=-1<l.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Aa+t+Wl}var Ei=!1;function ki(t,r){if(!t||Ei)return"";Ei=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(r){var ne=function(){throw Error()};if(Object.defineProperty(ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ne,[])}catch(Q){var G=Q}Reflect.construct(t,[],ne)}else{try{ne.call()}catch(Q){G=Q}t.call(ne.prototype)}}else{try{throw Error()}catch(Q){G=Q}(ne=t())&&typeof ne.catch=="function"&&ne.catch(function(){})}}catch(Q){if(Q&&G&&typeof Q.stack=="string")return[Q.stack,G.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=o.DetermineComponentFrameRoot(),S=m[0],E=m[1];if(S&&E){var z=S.split(`
4
+ `),F=E.split(`
5
+ `);for(d=o=0;o<z.length&&!z[o].includes("DetermineComponentFrameRoot");)o++;for(;d<F.length&&!F[d].includes("DetermineComponentFrameRoot");)d++;if(o===z.length||d===F.length)for(o=z.length-1,d=F.length-1;1<=o&&0<=d&&z[o]!==F[d];)d--;for(;1<=o&&0<=d;o--,d--)if(z[o]!==F[d]){if(o!==1||d!==1)do if(o--,d--,0>d||z[o]!==F[d]){var K=`
6
+ `+z[o].replace(" at new "," at ");return t.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",t.displayName)),K}while(1<=o&&0<=d);break}}}finally{Ei=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?Zn(l):""}function es(t,r){switch(t.tag){case 26:case 27:case 5:return Zn(t.type);case 16:return Zn("Lazy");case 13:return t.child!==r&&r!==null?Zn("Suspense Fallback"):Zn("Suspense");case 19:return Zn("SuspenseList");case 0:case 15:return ki(t.type,!1);case 11:return ki(t.type.render,!1);case 1:return ki(t.type,!0);case 31:return Zn("Activity");default:return""}}function ts(t){try{var r="",l=null;do r+=es(t,l),l=t,t=t.return;while(t);return r}catch(o){return`
7
+ Error generating stack: `+o.message+`
8
+ `+o.stack}}var _i=Object.prototype.hasOwnProperty,Ni=e.unstable_scheduleCallback,Oa=e.unstable_cancelCallback,cu=e.unstable_shouldYield,fu=e.unstable_requestPaint,At=e.unstable_now,du=e.unstable_getCurrentPriorityLevel,J=e.unstable_ImmediatePriority,oe=e.unstable_UserBlockingPriority,ve=e.unstable_NormalPriority,_e=e.unstable_LowPriority,Ue=e.unstable_IdlePriority,Yt=e.log,Hn=e.unstable_setDisableYieldValue,Ot=null,vt=null;function $t(t){if(typeof Yt=="function"&&Hn(t),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(Ot,t)}catch{}}var Fe=Math.clz32?Math.clz32:Uw,yr=Math.log,kn=Math.LN2;function Uw(t){return t>>>=0,t===0?32:31-(yr(t)/kn|0)|0}var ns=256,rs=262144,is=4194304;function Qr(t){var r=t&42;if(r!==0)return r;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function as(t,r,l){var o=t.pendingLanes;if(o===0)return 0;var d=0,m=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var E=o&134217727;return E!==0?(o=E&~m,o!==0?d=Qr(o):(S&=E,S!==0?d=Qr(S):l||(l=E&~t,l!==0&&(d=Qr(l))))):(E=o&~m,E!==0?d=Qr(E):S!==0?d=Qr(S):l||(l=o&~t,l!==0&&(d=Qr(l)))),d===0?0:r!==0&&r!==d&&(r&m)===0&&(m=d&-d,l=r&-r,m>=l||m===32&&(l&4194048)!==0)?r:d}function za(t,r){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&r)===0}function $w(t,r){switch(t){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 wp(){var t=is;return is<<=1,(is&62914560)===0&&(is=4194304),t}function hu(t){for(var r=[],l=0;31>l;l++)r.push(t);return r}function Da(t,r){t.pendingLanes|=r,r!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Iw(t,r,l,o,d,m){var S=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var E=t.entanglements,z=t.expirationTimes,F=t.hiddenUpdates;for(l=S&~l;0<l;){var K=31-Fe(l),ne=1<<K;E[K]=0,z[K]=-1;var G=F[K];if(G!==null)for(F[K]=null,K=0;K<G.length;K++){var Q=G[K];Q!==null&&(Q.lane&=-536870913)}l&=~ne}o!==0&&Ep(t,o,0),m!==0&&d===0&&t.tag!==0&&(t.suspendedLanes|=m&~(S&~r))}function Ep(t,r,l){t.pendingLanes|=r,t.suspendedLanes&=~r;var o=31-Fe(r);t.entangledLanes|=r,t.entanglements[o]=t.entanglements[o]|1073741824|l&261930}function kp(t,r){var l=t.entangledLanes|=r;for(t=t.entanglements;l;){var o=31-Fe(l),d=1<<o;d&r|t[o]&r&&(t[o]|=r),l&=~d}}function _p(t,r){var l=r&-r;return l=(l&42)!==0?1:pu(l),(l&(t.suspendedLanes|r))!==0?0:l}function pu(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function mu(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Np(){var t=B.p;return t!==0?t:(t=window.event,t===void 0?32:f0(t.type))}function jp(t,r){var l=B.p;try{return B.p=t,r()}finally{B.p=l}}var vr=Math.random().toString(36).slice(2),Et="__reactFiber$"+vr,It="__reactProps$"+vr,ji="__reactContainer$"+vr,gu="__reactEvents$"+vr,qw="__reactListeners$"+vr,Bw="__reactHandles$"+vr,Cp="__reactResources$"+vr,Ma="__reactMarker$"+vr;function yu(t){delete t[Et],delete t[It],delete t[gu],delete t[qw],delete t[Bw]}function Ci(t){var r=t[Et];if(r)return r;for(var l=t.parentNode;l;){if(r=l[ji]||l[Et]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(t=Yy(t);t!==null;){if(l=t[Et])return l;t=Yy(t)}return r}t=l,l=t.parentNode}return null}function Ti(t){if(t=t[Et]||t[ji]){var r=t.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return t}return null}function La(t){var r=t.tag;if(r===5||r===26||r===27||r===6)return t.stateNode;throw Error(a(33))}function Ri(t){var r=t[Cp];return r||(r=t[Cp]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function St(t){t[Ma]=!0}var Tp=new Set,Rp={};function Yr(t,r){Ai(t,r),Ai(t+"Capture",r)}function Ai(t,r){for(Rp[t]=r,t=0;t<r.length;t++)Tp.add(r[t])}var Pw=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]*$"),Ap={},Op={};function Zw(t){return _i.call(Op,t)?!0:_i.call(Ap,t)?!1:Pw.test(t)?Op[t]=!0:(Ap[t]=!0,!1)}function ls(t,r,l){if(Zw(r))if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(r);return;case"boolean":var o=r.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){t.removeAttribute(r);return}}t.setAttribute(r,""+l)}}function ss(t,r,l){if(l===null)t.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(r);return}t.setAttribute(r,""+l)}}function Fn(t,r,l,o){if(o===null)t.removeAttribute(l);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(r,l,""+o)}}function un(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function zp(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Hw(t,r,l){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,r);if(!t.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,m=o.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return d.call(this)},set:function(S){l=""+S,m.call(this,S)}}),Object.defineProperty(t,r,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function vu(t){if(!t._valueTracker){var r=zp(t)?"checked":"value";t._valueTracker=Hw(t,r,""+t[r])}}function Dp(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var l=r.getValue(),o="";return t&&(o=zp(t)?t.checked?"true":"false":t.value),t=o,t!==l?(r.setValue(t),!0):!1}function os(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Fw=/[\n"\\]/g;function cn(t){return t.replace(Fw,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function xu(t,r,l,o,d,m,S,E){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),r!=null?S==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+un(r)):t.value!==""+un(r)&&(t.value=""+un(r)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),r!=null?bu(t,S,un(r)):l!=null?bu(t,S,un(l)):o!=null&&t.removeAttribute("value"),d==null&&m!=null&&(t.defaultChecked=!!m),d!=null&&(t.checked=d&&typeof d!="function"&&typeof d!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?t.name=""+un(E):t.removeAttribute("name")}function Mp(t,r,l,o,d,m,S,E){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),r!=null||l!=null){if(!(m!=="submit"&&m!=="reset"||r!=null)){vu(t);return}l=l!=null?""+un(l):"",r=r!=null?""+un(r):l,E||r===t.value||(t.value=r),t.defaultValue=r}o=o??d,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=E?t.checked:!!o,t.defaultChecked=!!o,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S),vu(t)}function bu(t,r,l){r==="number"&&os(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function Oi(t,r,l,o){if(t=t.options,r){r={};for(var d=0;d<l.length;d++)r["$"+l[d]]=!0;for(l=0;l<t.length;l++)d=r.hasOwnProperty("$"+t[l].value),t[l].selected!==d&&(t[l].selected=d),d&&o&&(t[l].defaultSelected=!0)}else{for(l=""+un(l),r=null,d=0;d<t.length;d++){if(t[d].value===l){t[d].selected=!0,o&&(t[d].defaultSelected=!0);return}r!==null||t[d].disabled||(r=t[d])}r!==null&&(r.selected=!0)}}function Lp(t,r,l){if(r!=null&&(r=""+un(r),r!==t.value&&(t.value=r),l==null)){t.defaultValue!==r&&(t.defaultValue=r);return}t.defaultValue=l!=null?""+un(l):""}function Up(t,r,l,o){if(r==null){if(o!=null){if(l!=null)throw Error(a(92));if(U(o)){if(1<o.length)throw Error(a(93));o=o[0]}l=o}l==null&&(l=""),r=l}l=un(r),t.defaultValue=l,o=t.textContent,o===l&&o!==""&&o!==null&&(t.value=o),vu(t)}function zi(t,r){if(r){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=r;return}}t.textContent=r}var Vw=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 $p(t,r,l){var o=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?o?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="":o?t.setProperty(r,l):typeof l!="number"||l===0||Vw.has(r)?r==="float"?t.cssFloat=l:t[r]=(""+l).trim():t[r]=l+"px"}function Ip(t,r,l){if(r!=null&&typeof r!="object")throw Error(a(62));if(t=t.style,l!=null){for(var o in l)!l.hasOwnProperty(o)||r!=null&&r.hasOwnProperty(o)||(o.indexOf("--")===0?t.setProperty(o,""):o==="float"?t.cssFloat="":t[o]="");for(var d in r)o=r[d],r.hasOwnProperty(d)&&l[d]!==o&&$p(t,d,o)}else for(var m in r)r.hasOwnProperty(m)&&$p(t,m,r[m])}function Su(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Gw=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"]]),Qw=/^[\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 us(t){return Qw.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Vn(){}var wu=null;function Eu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Di=null,Mi=null;function qp(t){var r=Ti(t);if(r&&(t=r.stateNode)){var l=t[It]||null;e:switch(t=r.stateNode,r.type){case"input":if(xu(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+cn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var o=l[r];if(o!==t&&o.form===t.form){var d=o[It]||null;if(!d)throw Error(a(90));xu(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(r=0;r<l.length;r++)o=l[r],o.form===t.form&&Dp(o)}break e;case"textarea":Lp(t,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&Oi(t,!!l.multiple,r,!1)}}}var ku=!1;function Bp(t,r,l){if(ku)return t(r,l);ku=!0;try{var o=t(r);return o}finally{if(ku=!1,(Di!==null||Mi!==null)&&(Xs(),Di&&(r=Di,t=Mi,Mi=Di=null,qp(r),t)))for(r=0;r<t.length;r++)qp(t[r])}}function Ua(t,r){var l=t.stateNode;if(l===null)return null;var o=l[It]||null;if(o===null)return null;l=o[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(t=t.type,o=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!o;break e;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_u=!1;if(Gn)try{var $a={};Object.defineProperty($a,"passive",{get:function(){_u=!0}}),window.addEventListener("test",$a,$a),window.removeEventListener("test",$a,$a)}catch{_u=!1}var xr=null,Nu=null,cs=null;function Pp(){if(cs)return cs;var t,r=Nu,l=r.length,o,d="value"in xr?xr.value:xr.textContent,m=d.length;for(t=0;t<l&&r[t]===d[t];t++);var S=l-t;for(o=1;o<=S&&r[l-o]===d[m-o];o++);return cs=d.slice(t,1<o?1-o:void 0)}function fs(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function ds(){return!0}function Zp(){return!1}function qt(t){function r(l,o,d,m,S){this._reactName=l,this._targetInst=d,this.type=o,this.nativeEvent=m,this.target=S,this.currentTarget=null;for(var E in t)t.hasOwnProperty(E)&&(l=t[E],this[E]=l?l(m):m[E]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?ds:Zp,this.isPropagationStopped=Zp,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ds)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ds)},persist:function(){},isPersistent:ds}),r}var Xr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hs=qt(Xr),Ia=y({},Xr,{view:0,detail:0}),Yw=qt(Ia),ju,Cu,qa,ps=y({},Ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ru,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==qa&&(qa&&t.type==="mousemove"?(ju=t.screenX-qa.screenX,Cu=t.screenY-qa.screenY):Cu=ju=0,qa=t),ju)},movementY:function(t){return"movementY"in t?t.movementY:Cu}}),Hp=qt(ps),Xw=y({},ps,{dataTransfer:0}),Kw=qt(Xw),Jw=y({},Ia,{relatedTarget:0}),Tu=qt(Jw),Ww=y({},Xr,{animationName:0,elapsedTime:0,pseudoElement:0}),eE=qt(Ww),tE=y({},Xr,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),nE=qt(tE),rE=y({},Xr,{data:0}),Fp=qt(rE),iE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aE={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"},lE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sE(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=lE[t])?!!r[t]:!1}function Ru(){return sE}var oE=y({},Ia,{key:function(t){if(t.key){var r=iE[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=fs(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?aE[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ru,charCode:function(t){return t.type==="keypress"?fs(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?fs(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),uE=qt(oE),cE=y({},ps,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vp=qt(cE),fE=y({},Ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ru}),dE=qt(fE),hE=y({},Xr,{propertyName:0,elapsedTime:0,pseudoElement:0}),pE=qt(hE),mE=y({},ps,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),gE=qt(mE),yE=y({},Xr,{newState:0,oldState:0}),vE=qt(yE),xE=[9,13,27,32],Au=Gn&&"CompositionEvent"in window,Ba=null;Gn&&"documentMode"in document&&(Ba=document.documentMode);var bE=Gn&&"TextEvent"in window&&!Ba,Gp=Gn&&(!Au||Ba&&8<Ba&&11>=Ba),Qp=" ",Yp=!1;function Xp(t,r){switch(t){case"keyup":return xE.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Li=!1;function SE(t,r){switch(t){case"compositionend":return Kp(r);case"keypress":return r.which!==32?null:(Yp=!0,Qp);case"textInput":return t=r.data,t===Qp&&Yp?null:t;default:return null}}function wE(t,r){if(Li)return t==="compositionend"||!Au&&Xp(t,r)?(t=Pp(),cs=Nu=xr=null,Li=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Gp&&r.locale!=="ko"?null:r.data;default:return null}}var EE={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 Jp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!EE[t.type]:r==="textarea"}function Wp(t,r,l,o){Di?Mi?Mi.push(o):Mi=[o]:Di=o,r=ro(r,"onChange"),0<r.length&&(l=new hs("onChange","change",null,l,o),t.push({event:l,listeners:r}))}var Pa=null,Za=null;function kE(t){My(t,0)}function ms(t){var r=La(t);if(Dp(r))return t}function em(t,r){if(t==="change")return r}var tm=!1;if(Gn){var Ou;if(Gn){var zu="oninput"in document;if(!zu){var nm=document.createElement("div");nm.setAttribute("oninput","return;"),zu=typeof nm.oninput=="function"}Ou=zu}else Ou=!1;tm=Ou&&(!document.documentMode||9<document.documentMode)}function rm(){Pa&&(Pa.detachEvent("onpropertychange",im),Za=Pa=null)}function im(t){if(t.propertyName==="value"&&ms(Za)){var r=[];Wp(r,Za,t,Eu(t)),Bp(kE,r)}}function _E(t,r,l){t==="focusin"?(rm(),Pa=r,Za=l,Pa.attachEvent("onpropertychange",im)):t==="focusout"&&rm()}function NE(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ms(Za)}function jE(t,r){if(t==="click")return ms(r)}function CE(t,r){if(t==="input"||t==="change")return ms(r)}function TE(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Xt=typeof Object.is=="function"?Object.is:TE;function Ha(t,r){if(Xt(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var l=Object.keys(t),o=Object.keys(r);if(l.length!==o.length)return!1;for(o=0;o<l.length;o++){var d=l[o];if(!_i.call(r,d)||!Xt(t[d],r[d]))return!1}return!0}function am(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function lm(t,r){var l=am(t);t=0;for(var o;l;){if(l.nodeType===3){if(o=t+l.textContent.length,t<=r&&o>=r)return{node:l,offset:r-t};t=o}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=am(l)}}function sm(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?sm(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function om(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var r=os(t.document);r instanceof t.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)t=r.contentWindow;else break;r=os(t.document)}return r}function Du(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}var RE=Gn&&"documentMode"in document&&11>=document.documentMode,Ui=null,Mu=null,Fa=null,Lu=!1;function um(t,r,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Lu||Ui==null||Ui!==os(o)||(o=Ui,"selectionStart"in o&&Du(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Fa&&Ha(Fa,o)||(Fa=o,o=ro(Mu,"onSelect"),0<o.length&&(r=new hs("onSelect","select",null,r,l),t.push({event:r,listeners:o}),r.target=Ui)))}function Kr(t,r){var l={};return l[t.toLowerCase()]=r.toLowerCase(),l["Webkit"+t]="webkit"+r,l["Moz"+t]="moz"+r,l}var $i={animationend:Kr("Animation","AnimationEnd"),animationiteration:Kr("Animation","AnimationIteration"),animationstart:Kr("Animation","AnimationStart"),transitionrun:Kr("Transition","TransitionRun"),transitionstart:Kr("Transition","TransitionStart"),transitioncancel:Kr("Transition","TransitionCancel"),transitionend:Kr("Transition","TransitionEnd")},Uu={},cm={};Gn&&(cm=document.createElement("div").style,"AnimationEvent"in window||(delete $i.animationend.animation,delete $i.animationiteration.animation,delete $i.animationstart.animation),"TransitionEvent"in window||delete $i.transitionend.transition);function Jr(t){if(Uu[t])return Uu[t];if(!$i[t])return t;var r=$i[t],l;for(l in r)if(r.hasOwnProperty(l)&&l in cm)return Uu[t]=r[l];return t}var fm=Jr("animationend"),dm=Jr("animationiteration"),hm=Jr("animationstart"),AE=Jr("transitionrun"),OE=Jr("transitionstart"),zE=Jr("transitioncancel"),pm=Jr("transitionend"),mm=new Map,$u="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(" ");$u.push("scrollEnd");function _n(t,r){mm.set(t,r),Yr(r,[t])}var gs=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},fn=[],Ii=0,Iu=0;function ys(){for(var t=Ii,r=Iu=Ii=0;r<t;){var l=fn[r];fn[r++]=null;var o=fn[r];fn[r++]=null;var d=fn[r];fn[r++]=null;var m=fn[r];if(fn[r++]=null,o!==null&&d!==null){var S=o.pending;S===null?d.next=d:(d.next=S.next,S.next=d),o.pending=d}m!==0&&gm(l,d,m)}}function vs(t,r,l,o){fn[Ii++]=t,fn[Ii++]=r,fn[Ii++]=l,fn[Ii++]=o,Iu|=o,t.lanes|=o,t=t.alternate,t!==null&&(t.lanes|=o)}function qu(t,r,l,o){return vs(t,r,l,o),xs(t)}function Wr(t,r){return vs(t,null,null,r),xs(t)}function gm(t,r,l){t.lanes|=l;var o=t.alternate;o!==null&&(o.lanes|=l);for(var d=!1,m=t.return;m!==null;)m.childLanes|=l,o=m.alternate,o!==null&&(o.childLanes|=l),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(d=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,d&&r!==null&&(d=31-Fe(l),t=m.hiddenUpdates,o=t[d],o===null?t[d]=[r]:o.push(r),r.lane=l|536870912),m):null}function xs(t){if(50<hl)throw hl=0,Yc=null,Error(a(185));for(var r=t.return;r!==null;)t=r,r=t.return;return t.tag===3?t.stateNode:null}var qi={};function DE(t,r,l,o){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kt(t,r,l,o){return new DE(t,r,l,o)}function Bu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Qn(t,r){var l=t.alternate;return l===null?(l=Kt(t.tag,r,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=r,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,r=t.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function ym(t,r){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=r,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,r=l.dependencies,t.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),t}function bs(t,r,l,o,d,m){var S=0;if(o=t,typeof t=="function")Bu(t)&&(S=1);else if(typeof t=="string")S=Ik(t,l,le.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case ie:return t=Kt(31,l,r,d),t.elementType=ie,t.lanes=m,t;case k:return ei(l.children,d,m,r);case j:S=8,d|=24;break;case _:return t=Kt(12,l,r,d|2),t.elementType=_,t.lanes=m,t;case X:return t=Kt(13,l,r,d),t.elementType=X,t.lanes=m,t;case L:return t=Kt(19,l,r,d),t.elementType=L,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case T:S=10;break e;case R:S=9;break e;case V:S=11;break e;case Z:S=14;break e;case Y:S=16,o=null;break e}S=29,l=Error(a(130,t===null?"null":typeof t,"")),o=null}return r=Kt(S,l,r,d),r.elementType=t,r.type=o,r.lanes=m,r}function ei(t,r,l,o){return t=Kt(7,t,o,r),t.lanes=l,t}function Pu(t,r,l){return t=Kt(6,t,null,r),t.lanes=l,t}function vm(t){var r=Kt(18,null,null,0);return r.stateNode=t,r}function Zu(t,r,l){return r=Kt(4,t.children!==null?t.children:[],t.key,r),r.lanes=l,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}var xm=new WeakMap;function dn(t,r){if(typeof t=="object"&&t!==null){var l=xm.get(t);return l!==void 0?l:(r={value:t,source:r,stack:ts(r)},xm.set(t,r),r)}return{value:t,source:r,stack:ts(r)}}var Bi=[],Pi=0,Ss=null,Va=0,hn=[],pn=0,br=null,On=1,zn="";function Yn(t,r){Bi[Pi++]=Va,Bi[Pi++]=Ss,Ss=t,Va=r}function bm(t,r,l){hn[pn++]=On,hn[pn++]=zn,hn[pn++]=br,br=t;var o=On;t=zn;var d=32-Fe(o)-1;o&=~(1<<d),l+=1;var m=32-Fe(r)+d;if(30<m){var S=d-d%5;m=(o&(1<<S)-1).toString(32),o>>=S,d-=S,On=1<<32-Fe(r)+d|l<<d|o,zn=m+t}else On=1<<m|l<<d|o,zn=t}function Hu(t){t.return!==null&&(Yn(t,1),bm(t,1,0))}function Fu(t){for(;t===Ss;)Ss=Bi[--Pi],Bi[Pi]=null,Va=Bi[--Pi],Bi[Pi]=null;for(;t===br;)br=hn[--pn],hn[pn]=null,zn=hn[--pn],hn[pn]=null,On=hn[--pn],hn[pn]=null}function Sm(t,r){hn[pn++]=On,hn[pn++]=zn,hn[pn++]=br,On=r.id,zn=r.overflow,br=t}var kt=null,Ye=null,Oe=!1,Sr=null,mn=!1,Vu=Error(a(519));function wr(t){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ga(dn(r,t)),Vu}function wm(t){var r=t.stateNode,l=t.type,o=t.memoizedProps;switch(r[Et]=t,r[It]=o,l){case"dialog":je("cancel",r),je("close",r);break;case"iframe":case"object":case"embed":je("load",r);break;case"video":case"audio":for(l=0;l<ml.length;l++)je(ml[l],r);break;case"source":je("error",r);break;case"img":case"image":case"link":je("error",r),je("load",r);break;case"details":je("toggle",r);break;case"input":je("invalid",r),Mp(r,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":je("invalid",r);break;case"textarea":je("invalid",r),Up(r,o.value,o.defaultValue,o.children)}l=o.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||o.suppressHydrationWarning===!0||Iy(r.textContent,l)?(o.popover!=null&&(je("beforetoggle",r),je("toggle",r)),o.onScroll!=null&&je("scroll",r),o.onScrollEnd!=null&&je("scrollend",r),o.onClick!=null&&(r.onclick=Vn),r=!0):r=!1,r||wr(t,!0)}function Em(t){for(kt=t.return;kt;)switch(kt.tag){case 5:case 31:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:kt=kt.return}}function Zi(t){if(t!==kt)return!1;if(!Oe)return Em(t),Oe=!0,!1;var r=t.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||ff(t.type,t.memoizedProps)),l=!l),l&&Ye&&wr(t),Em(t),r===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));Ye=Qy(t)}else if(r===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(317));Ye=Qy(t)}else r===27?(r=Ye,Lr(t.type)?(t=gf,gf=null,Ye=t):Ye=r):Ye=kt?yn(t.stateNode.nextSibling):null;return!0}function ti(){Ye=kt=null,Oe=!1}function Gu(){var t=Sr;return t!==null&&(Ht===null?Ht=t:Ht.push.apply(Ht,t),Sr=null),t}function Ga(t){Sr===null?Sr=[t]:Sr.push(t)}var Qu=A(null),ni=null,Xn=null;function Er(t,r,l){N(Qu,r._currentValue),r._currentValue=l}function Kn(t){t._currentValue=Qu.current,q(Qu)}function Yu(t,r,l){for(;t!==null;){var o=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,o!==null&&(o.childLanes|=r)):o!==null&&(o.childLanes&r)!==r&&(o.childLanes|=r),t===l)break;t=t.return}}function Xu(t,r,l,o){var d=t.child;for(d!==null&&(d.return=t);d!==null;){var m=d.dependencies;if(m!==null){var S=d.child;m=m.firstContext;e:for(;m!==null;){var E=m;m=d;for(var z=0;z<r.length;z++)if(E.context===r[z]){m.lanes|=l,E=m.alternate,E!==null&&(E.lanes|=l),Yu(m.return,l,t),o||(S=null);break e}m=E.next}}else if(d.tag===18){if(S=d.return,S===null)throw Error(a(341));S.lanes|=l,m=S.alternate,m!==null&&(m.lanes|=l),Yu(S,l,t),S=null}else S=d.child;if(S!==null)S.return=d;else for(S=d;S!==null;){if(S===t){S=null;break}if(d=S.sibling,d!==null){d.return=S.return,S=d;break}S=S.return}d=S}}function Hi(t,r,l,o){t=null;for(var d=r,m=!1;d!==null;){if(!m){if((d.flags&524288)!==0)m=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var S=d.alternate;if(S===null)throw Error(a(387));if(S=S.memoizedProps,S!==null){var E=d.type;Xt(d.pendingProps.value,S.value)||(t!==null?t.push(E):t=[E])}}else if(d===Te.current){if(S=d.alternate,S===null)throw Error(a(387));S.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(t!==null?t.push(bl):t=[bl])}d=d.return}t!==null&&Xu(r,t,l,o),r.flags|=262144}function ws(t){for(t=t.firstContext;t!==null;){if(!Xt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ri(t){ni=t,Xn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function _t(t){return km(ni,t)}function Es(t,r){return ni===null&&ri(t),km(t,r)}function km(t,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},Xn===null){if(t===null)throw Error(a(308));Xn=r,t.dependencies={lanes:0,firstContext:r},t.flags|=524288}else Xn=Xn.next=r;return l}var ME=typeof AbortController<"u"?AbortController:function(){var t=[],r=this.signal={aborted:!1,addEventListener:function(l,o){t.push(o)}};this.abort=function(){r.aborted=!0,t.forEach(function(l){return l()})}},LE=e.unstable_scheduleCallback,UE=e.unstable_NormalPriority,ft={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ku(){return{controller:new ME,data:new Map,refCount:0}}function Qa(t){t.refCount--,t.refCount===0&&LE(UE,function(){t.controller.abort()})}var Ya=null,Ju=0,Fi=0,Vi=null;function $E(t,r){if(Ya===null){var l=Ya=[];Ju=0,Fi=tf(),Vi={status:"pending",value:void 0,then:function(o){l.push(o)}}}return Ju++,r.then(_m,_m),r}function _m(){if(--Ju===0&&Ya!==null){Vi!==null&&(Vi.status="fulfilled");var t=Ya;Ya=null,Fi=0,Vi=null;for(var r=0;r<t.length;r++)(0,t[r])()}}function IE(t,r){var l=[],o={status:"pending",value:null,reason:null,then:function(d){l.push(d)}};return t.then(function(){o.status="fulfilled",o.value=r;for(var d=0;d<l.length;d++)(0,l[d])(r)},function(d){for(o.status="rejected",o.reason=d,d=0;d<l.length;d++)(0,l[d])(void 0)}),o}var Nm=D.S;D.S=function(t,r){uy=At(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&$E(t,r),Nm!==null&&Nm(t,r)};var ii=A(null);function Wu(){var t=ii.current;return t!==null?t:Ve.pooledCache}function ks(t,r){r===null?N(ii,ii.current):N(ii,r.pool)}function jm(){var t=Wu();return t===null?null:{parent:ft._currentValue,pool:t}}var Gi=Error(a(460)),ec=Error(a(474)),_s=Error(a(542)),Ns={then:function(){}};function Cm(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Tm(t,r,l){switch(l=t[l],l===void 0?t.push(r):l!==r&&(r.then(Vn,Vn),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Am(t),t;default:if(typeof r.status=="string")r.then(Vn,Vn);else{if(t=Ve,t!==null&&100<t.shellSuspendCounter)throw Error(a(482));t=r,t.status="pending",t.then(function(o){if(r.status==="pending"){var d=r;d.status="fulfilled",d.value=o}},function(o){if(r.status==="pending"){var d=r;d.status="rejected",d.reason=o}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw t=r.reason,Am(t),t}throw li=r,Gi}}function ai(t){try{var r=t._init;return r(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(li=l,Gi):l}}var li=null;function Rm(){if(li===null)throw Error(a(459));var t=li;return li=null,t}function Am(t){if(t===Gi||t===_s)throw Error(a(483))}var Qi=null,Xa=0;function js(t){var r=Xa;return Xa+=1,Qi===null&&(Qi=[]),Tm(Qi,t,r)}function Ka(t,r){r=r.props.ref,t.ref=r!==void 0?r:null}function Cs(t,r){throw r.$$typeof===x?Error(a(525)):(t=Object.prototype.toString.call(r),Error(a(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)))}function Om(t){function r($,M){if(t){var P=$.deletions;P===null?($.deletions=[M],$.flags|=16):P.push(M)}}function l($,M){if(!t)return null;for(;M!==null;)r($,M),M=M.sibling;return null}function o($){for(var M=new Map;$!==null;)$.key!==null?M.set($.key,$):M.set($.index,$),$=$.sibling;return M}function d($,M){return $=Qn($,M),$.index=0,$.sibling=null,$}function m($,M,P){return $.index=P,t?(P=$.alternate,P!==null?(P=P.index,P<M?($.flags|=67108866,M):P):($.flags|=67108866,M)):($.flags|=1048576,M)}function S($){return t&&$.alternate===null&&($.flags|=67108866),$}function E($,M,P,W){return M===null||M.tag!==6?(M=Pu(P,$.mode,W),M.return=$,M):(M=d(M,P),M.return=$,M)}function z($,M,P,W){var pe=P.type;return pe===k?K($,M,P.props.children,W,P.key):M!==null&&(M.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===Y&&ai(pe)===M.type)?(M=d(M,P.props),Ka(M,P),M.return=$,M):(M=bs(P.type,P.key,P.props,null,$.mode,W),Ka(M,P),M.return=$,M)}function F($,M,P,W){return M===null||M.tag!==4||M.stateNode.containerInfo!==P.containerInfo||M.stateNode.implementation!==P.implementation?(M=Zu(P,$.mode,W),M.return=$,M):(M=d(M,P.children||[]),M.return=$,M)}function K($,M,P,W,pe){return M===null||M.tag!==7?(M=ei(P,$.mode,W,pe),M.return=$,M):(M=d(M,P),M.return=$,M)}function ne($,M,P){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Pu(""+M,$.mode,P),M.return=$,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return P=bs(M.type,M.key,M.props,null,$.mode,P),Ka(P,M),P.return=$,P;case w:return M=Zu(M,$.mode,P),M.return=$,M;case Y:return M=ai(M),ne($,M,P)}if(U(M)||ue(M))return M=ei(M,$.mode,P,null),M.return=$,M;if(typeof M.then=="function")return ne($,js(M),P);if(M.$$typeof===T)return ne($,Es($,M),P);Cs($,M)}return null}function G($,M,P,W){var pe=M!==null?M.key:null;if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return pe!==null?null:E($,M,""+P,W);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case b:return P.key===pe?z($,M,P,W):null;case w:return P.key===pe?F($,M,P,W):null;case Y:return P=ai(P),G($,M,P,W)}if(U(P)||ue(P))return pe!==null?null:K($,M,P,W,null);if(typeof P.then=="function")return G($,M,js(P),W);if(P.$$typeof===T)return G($,M,Es($,P),W);Cs($,P)}return null}function Q($,M,P,W,pe){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return $=$.get(P)||null,E(M,$,""+W,pe);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case b:return $=$.get(W.key===null?P:W.key)||null,z(M,$,W,pe);case w:return $=$.get(W.key===null?P:W.key)||null,F(M,$,W,pe);case Y:return W=ai(W),Q($,M,P,W,pe)}if(U(W)||ue(W))return $=$.get(P)||null,K(M,$,W,pe,null);if(typeof W.then=="function")return Q($,M,P,js(W),pe);if(W.$$typeof===T)return Q($,M,P,Es(M,W),pe);Cs(M,W)}return null}function fe($,M,P,W){for(var pe=null,De=null,he=M,we=M=0,Ae=null;he!==null&&we<P.length;we++){he.index>we?(Ae=he,he=null):Ae=he.sibling;var Me=G($,he,P[we],W);if(Me===null){he===null&&(he=Ae);break}t&&he&&Me.alternate===null&&r($,he),M=m(Me,M,we),De===null?pe=Me:De.sibling=Me,De=Me,he=Ae}if(we===P.length)return l($,he),Oe&&Yn($,we),pe;if(he===null){for(;we<P.length;we++)he=ne($,P[we],W),he!==null&&(M=m(he,M,we),De===null?pe=he:De.sibling=he,De=he);return Oe&&Yn($,we),pe}for(he=o(he);we<P.length;we++)Ae=Q(he,$,we,P[we],W),Ae!==null&&(t&&Ae.alternate!==null&&he.delete(Ae.key===null?we:Ae.key),M=m(Ae,M,we),De===null?pe=Ae:De.sibling=Ae,De=Ae);return t&&he.forEach(function(Br){return r($,Br)}),Oe&&Yn($,we),pe}function ye($,M,P,W){if(P==null)throw Error(a(151));for(var pe=null,De=null,he=M,we=M=0,Ae=null,Me=P.next();he!==null&&!Me.done;we++,Me=P.next()){he.index>we?(Ae=he,he=null):Ae=he.sibling;var Br=G($,he,Me.value,W);if(Br===null){he===null&&(he=Ae);break}t&&he&&Br.alternate===null&&r($,he),M=m(Br,M,we),De===null?pe=Br:De.sibling=Br,De=Br,he=Ae}if(Me.done)return l($,he),Oe&&Yn($,we),pe;if(he===null){for(;!Me.done;we++,Me=P.next())Me=ne($,Me.value,W),Me!==null&&(M=m(Me,M,we),De===null?pe=Me:De.sibling=Me,De=Me);return Oe&&Yn($,we),pe}for(he=o(he);!Me.done;we++,Me=P.next())Me=Q(he,$,we,Me.value,W),Me!==null&&(t&&Me.alternate!==null&&he.delete(Me.key===null?we:Me.key),M=m(Me,M,we),De===null?pe=Me:De.sibling=Me,De=Me);return t&&he.forEach(function(Xk){return r($,Xk)}),Oe&&Yn($,we),pe}function He($,M,P,W){if(typeof P=="object"&&P!==null&&P.type===k&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case b:e:{for(var pe=P.key;M!==null;){if(M.key===pe){if(pe=P.type,pe===k){if(M.tag===7){l($,M.sibling),W=d(M,P.props.children),W.return=$,$=W;break e}}else if(M.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===Y&&ai(pe)===M.type){l($,M.sibling),W=d(M,P.props),Ka(W,P),W.return=$,$=W;break e}l($,M);break}else r($,M);M=M.sibling}P.type===k?(W=ei(P.props.children,$.mode,W,P.key),W.return=$,$=W):(W=bs(P.type,P.key,P.props,null,$.mode,W),Ka(W,P),W.return=$,$=W)}return S($);case w:e:{for(pe=P.key;M!==null;){if(M.key===pe)if(M.tag===4&&M.stateNode.containerInfo===P.containerInfo&&M.stateNode.implementation===P.implementation){l($,M.sibling),W=d(M,P.children||[]),W.return=$,$=W;break e}else{l($,M);break}else r($,M);M=M.sibling}W=Zu(P,$.mode,W),W.return=$,$=W}return S($);case Y:return P=ai(P),He($,M,P,W)}if(U(P))return fe($,M,P,W);if(ue(P)){if(pe=ue(P),typeof pe!="function")throw Error(a(150));return P=pe.call(P),ye($,M,P,W)}if(typeof P.then=="function")return He($,M,js(P),W);if(P.$$typeof===T)return He($,M,Es($,P),W);Cs($,P)}return typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint"?(P=""+P,M!==null&&M.tag===6?(l($,M.sibling),W=d(M,P),W.return=$,$=W):(l($,M),W=Pu(P,$.mode,W),W.return=$,$=W),S($)):l($,M)}return function($,M,P,W){try{Xa=0;var pe=He($,M,P,W);return Qi=null,pe}catch(he){if(he===Gi||he===_s)throw he;var De=Kt(29,he,null,$.mode);return De.lanes=W,De.return=$,De}}}var si=Om(!0),zm=Om(!1),kr=!1;function tc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nc(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function _r(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Nr(t,r,l){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(Le&2)!==0){var d=o.pending;return d===null?r.next=r:(r.next=d.next,d.next=r),o.pending=r,r=xs(t),gm(t,null,l),r}return vs(t,o,r,l),xs(t)}function Ja(t,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var o=r.lanes;o&=t.pendingLanes,l|=o,r.lanes=l,kp(t,l)}}function rc(t,r){var l=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var d=null,m=null;if(l=l.firstBaseUpdate,l!==null){do{var S={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};m===null?d=m=S:m=m.next=S,l=l.next}while(l!==null);m===null?d=m=r:m=m.next=r}else d=m=r;l={baseState:o.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:o.shared,callbacks:o.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=r:t.next=r,l.lastBaseUpdate=r}var ic=!1;function Wa(){if(ic){var t=Vi;if(t!==null)throw t}}function el(t,r,l,o){ic=!1;var d=t.updateQueue;kr=!1;var m=d.firstBaseUpdate,S=d.lastBaseUpdate,E=d.shared.pending;if(E!==null){d.shared.pending=null;var z=E,F=z.next;z.next=null,S===null?m=F:S.next=F,S=z;var K=t.alternate;K!==null&&(K=K.updateQueue,E=K.lastBaseUpdate,E!==S&&(E===null?K.firstBaseUpdate=F:E.next=F,K.lastBaseUpdate=z))}if(m!==null){var ne=d.baseState;S=0,K=F=z=null,E=m;do{var G=E.lane&-536870913,Q=G!==E.lane;if(Q?(Re&G)===G:(o&G)===G){G!==0&&G===Fi&&(ic=!0),K!==null&&(K=K.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var fe=t,ye=E;G=r;var He=l;switch(ye.tag){case 1:if(fe=ye.payload,typeof fe=="function"){ne=fe.call(He,ne,G);break e}ne=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=ye.payload,G=typeof fe=="function"?fe.call(He,ne,G):fe,G==null)break e;ne=y({},ne,G);break e;case 2:kr=!0}}G=E.callback,G!==null&&(t.flags|=64,Q&&(t.flags|=8192),Q=d.callbacks,Q===null?d.callbacks=[G]:Q.push(G))}else Q={lane:G,tag:E.tag,payload:E.payload,callback:E.callback,next:null},K===null?(F=K=Q,z=ne):K=K.next=Q,S|=G;if(E=E.next,E===null){if(E=d.shared.pending,E===null)break;Q=E,E=Q.next,Q.next=null,d.lastBaseUpdate=Q,d.shared.pending=null}}while(!0);K===null&&(z=ne),d.baseState=z,d.firstBaseUpdate=F,d.lastBaseUpdate=K,m===null&&(d.shared.lanes=0),Ar|=S,t.lanes=S,t.memoizedState=ne}}function Dm(t,r){if(typeof t!="function")throw Error(a(191,t));t.call(r)}function Mm(t,r){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)Dm(l[t],r)}var Yi=A(null),Ts=A(0);function Lm(t,r){t=lr,N(Ts,t),N(Yi,r),lr=t|r.baseLanes}function ac(){N(Ts,lr),N(Yi,Yi.current)}function lc(){lr=Ts.current,q(Yi),q(Ts)}var Jt=A(null),gn=null;function jr(t){var r=t.alternate;N(ut,ut.current&1),N(Jt,t),gn===null&&(r===null||Yi.current!==null||r.memoizedState!==null)&&(gn=t)}function sc(t){N(ut,ut.current),N(Jt,t),gn===null&&(gn=t)}function Um(t){t.tag===22?(N(ut,ut.current),N(Jt,t),gn===null&&(gn=t)):Cr()}function Cr(){N(ut,ut.current),N(Jt,Jt.current)}function Wt(t){q(Jt),gn===t&&(gn=null),q(ut)}var ut=A(0);function Rs(t){for(var r=t;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||pf(l)||mf(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Jn=0,Se=null,Pe=null,dt=null,As=!1,Xi=!1,oi=!1,Os=0,tl=0,Ki=null,qE=0;function at(){throw Error(a(321))}function oc(t,r){if(r===null)return!1;for(var l=0;l<r.length&&l<t.length;l++)if(!Xt(t[l],r[l]))return!1;return!0}function uc(t,r,l,o,d,m){return Jn=m,Se=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,D.H=t===null||t.memoizedState===null?bg:kc,oi=!1,m=l(o,d),oi=!1,Xi&&(m=Im(r,l,o,d)),$m(t),m}function $m(t){D.H=il;var r=Pe!==null&&Pe.next!==null;if(Jn=0,dt=Pe=Se=null,As=!1,tl=0,Ki=null,r)throw Error(a(300));t===null||ht||(t=t.dependencies,t!==null&&ws(t)&&(ht=!0))}function Im(t,r,l,o){Se=t;var d=0;do{if(Xi&&(Ki=null),tl=0,Xi=!1,25<=d)throw Error(a(301));if(d+=1,dt=Pe=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}D.H=Sg,m=r(l,o)}while(Xi);return m}function BE(){var t=D.H,r=t.useState()[0];return r=typeof r.then=="function"?nl(r):r,t=t.useState()[0],(Pe!==null?Pe.memoizedState:null)!==t&&(Se.flags|=1024),r}function cc(){var t=Os!==0;return Os=0,t}function fc(t,r,l){r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~l}function dc(t){if(As){for(t=t.memoizedState;t!==null;){var r=t.queue;r!==null&&(r.pending=null),t=t.next}As=!1}Jn=0,dt=Pe=Se=null,Xi=!1,tl=Os=0,Ki=null}function zt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?Se.memoizedState=dt=t:dt=dt.next=t,dt}function ct(){if(Pe===null){var t=Se.alternate;t=t!==null?t.memoizedState:null}else t=Pe.next;var r=dt===null?Se.memoizedState:dt.next;if(r!==null)dt=r,Pe=t;else{if(t===null)throw Se.alternate===null?Error(a(467)):Error(a(310));Pe=t,t={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},dt===null?Se.memoizedState=dt=t:dt=dt.next=t}return dt}function zs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function nl(t){var r=tl;return tl+=1,Ki===null&&(Ki=[]),t=Tm(Ki,t,r),r=Se,(dt===null?r.memoizedState:dt.next)===null&&(r=r.alternate,D.H=r===null||r.memoizedState===null?bg:kc),t}function Ds(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return nl(t);if(t.$$typeof===T)return _t(t)}throw Error(a(438,String(t)))}function hc(t){var r=null,l=Se.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var o=Se.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(r={data:o.data.map(function(d){return d.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=zs(),Se.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(t),o=0;o<t;o++)l[o]=H;return r.index++,l}function Wn(t,r){return typeof r=="function"?r(t):r}function Ms(t){var r=ct();return pc(r,Pe,t)}function pc(t,r,l){var o=t.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=l;var d=t.baseQueue,m=o.pending;if(m!==null){if(d!==null){var S=d.next;d.next=m.next,m.next=S}r.baseQueue=d=m,o.pending=null}if(m=t.baseState,d===null)t.memoizedState=m;else{r=d.next;var E=S=null,z=null,F=r,K=!1;do{var ne=F.lane&-536870913;if(ne!==F.lane?(Re&ne)===ne:(Jn&ne)===ne){var G=F.revertLane;if(G===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),ne===Fi&&(K=!0);else if((Jn&G)===G){F=F.next,G===Fi&&(K=!0);continue}else ne={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},z===null?(E=z=ne,S=m):z=z.next=ne,Se.lanes|=G,Ar|=G;ne=F.action,oi&&l(m,ne),m=F.hasEagerState?F.eagerState:l(m,ne)}else G={lane:ne,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},z===null?(E=z=G,S=m):z=z.next=G,Se.lanes|=ne,Ar|=ne;F=F.next}while(F!==null&&F!==r);if(z===null?S=m:z.next=E,!Xt(m,t.memoizedState)&&(ht=!0,K&&(l=Vi,l!==null)))throw l;t.memoizedState=m,t.baseState=S,t.baseQueue=z,o.lastRenderedState=m}return d===null&&(o.lanes=0),[t.memoizedState,o.dispatch]}function mc(t){var r=ct(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=t;var o=l.dispatch,d=l.pending,m=r.memoizedState;if(d!==null){l.pending=null;var S=d=d.next;do m=t(m,S.action),S=S.next;while(S!==d);Xt(m,r.memoizedState)||(ht=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),l.lastRenderedState=m}return[m,o]}function qm(t,r,l){var o=Se,d=ct(),m=Oe;if(m){if(l===void 0)throw Error(a(407));l=l()}else l=r();var S=!Xt((Pe||d).memoizedState,l);if(S&&(d.memoizedState=l,ht=!0),d=d.queue,vc(Zm.bind(null,o,d,t),[t]),d.getSnapshot!==r||S||dt!==null&&dt.memoizedState.tag&1){if(o.flags|=2048,Ji(9,{destroy:void 0},Pm.bind(null,o,d,l,r),null),Ve===null)throw Error(a(349));m||(Jn&127)!==0||Bm(o,r,l)}return l}function Bm(t,r,l){t.flags|=16384,t={getSnapshot:r,value:l},r=Se.updateQueue,r===null?(r=zs(),Se.updateQueue=r,r.stores=[t]):(l=r.stores,l===null?r.stores=[t]:l.push(t))}function Pm(t,r,l,o){r.value=l,r.getSnapshot=o,Hm(r)&&Fm(t)}function Zm(t,r,l){return l(function(){Hm(r)&&Fm(t)})}function Hm(t){var r=t.getSnapshot;t=t.value;try{var l=r();return!Xt(t,l)}catch{return!0}}function Fm(t){var r=Wr(t,2);r!==null&&Ft(r,t,2)}function gc(t){var r=zt();if(typeof t=="function"){var l=t;if(t=l(),oi){$t(!0);try{l()}finally{$t(!1)}}}return r.memoizedState=r.baseState=t,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:t},r}function Vm(t,r,l,o){return t.baseState=l,pc(t,Pe,typeof o=="function"?o:Wn)}function PE(t,r,l,o,d){if($s(t))throw Error(a(485));if(t=r.action,t!==null){var m={payload:d,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){m.listeners.push(S)}};D.T!==null?l(!0):m.isTransition=!1,o(m),l=r.pending,l===null?(m.next=r.pending=m,Gm(r,m)):(m.next=l.next,r.pending=l.next=m)}}function Gm(t,r){var l=r.action,o=r.payload,d=t.state;if(r.isTransition){var m=D.T,S={};D.T=S;try{var E=l(d,o),z=D.S;z!==null&&z(S,E),Qm(t,r,E)}catch(F){yc(t,r,F)}finally{m!==null&&S.types!==null&&(m.types=S.types),D.T=m}}else try{m=l(d,o),Qm(t,r,m)}catch(F){yc(t,r,F)}}function Qm(t,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(o){Ym(t,r,o)},function(o){return yc(t,r,o)}):Ym(t,r,l)}function Ym(t,r,l){r.status="fulfilled",r.value=l,Xm(r),t.state=l,r=t.pending,r!==null&&(l=r.next,l===r?t.pending=null:(l=l.next,r.next=l,Gm(t,l)))}function yc(t,r,l){var o=t.pending;if(t.pending=null,o!==null){o=o.next;do r.status="rejected",r.reason=l,Xm(r),r=r.next;while(r!==o)}t.action=null}function Xm(t){t=t.listeners;for(var r=0;r<t.length;r++)(0,t[r])()}function Km(t,r){return r}function Jm(t,r){if(Oe){var l=Ve.formState;if(l!==null){e:{var o=Se;if(Oe){if(Ye){t:{for(var d=Ye,m=mn;d.nodeType!==8;){if(!m){d=null;break t}if(d=yn(d.nextSibling),d===null){d=null;break t}}m=d.data,d=m==="F!"||m==="F"?d:null}if(d){Ye=yn(d.nextSibling),o=d.data==="F!";break e}}wr(o)}o=!1}o&&(r=l[0])}}return l=zt(),l.memoizedState=l.baseState=r,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Km,lastRenderedState:r},l.queue=o,l=yg.bind(null,Se,o),o.dispatch=l,o=gc(!1),m=Ec.bind(null,Se,!1,o.queue),o=zt(),d={state:r,dispatch:null,action:t,pending:null},o.queue=d,l=PE.bind(null,Se,d,m,l),d.dispatch=l,o.memoizedState=t,[r,l,!1]}function Wm(t){var r=ct();return eg(r,Pe,t)}function eg(t,r,l){if(r=pc(t,r,Km)[0],t=Ms(Wn)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var o=nl(r)}catch(S){throw S===Gi?_s:S}else o=r;r=ct();var d=r.queue,m=d.dispatch;return l!==r.memoizedState&&(Se.flags|=2048,Ji(9,{destroy:void 0},ZE.bind(null,d,l),null)),[o,m,t]}function ZE(t,r){t.action=r}function tg(t){var r=ct(),l=Pe;if(l!==null)return eg(r,l,t);ct(),r=r.memoizedState,l=ct();var o=l.queue.dispatch;return l.memoizedState=t,[r,o,!1]}function Ji(t,r,l,o){return t={tag:t,create:l,deps:o,inst:r,next:null},r=Se.updateQueue,r===null&&(r=zs(),Se.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=t.next=t:(o=l.next,l.next=t,t.next=o,r.lastEffect=t),t}function ng(){return ct().memoizedState}function Ls(t,r,l,o){var d=zt();Se.flags|=t,d.memoizedState=Ji(1|r,{destroy:void 0},l,o===void 0?null:o)}function Us(t,r,l,o){var d=ct();o=o===void 0?null:o;var m=d.memoizedState.inst;Pe!==null&&o!==null&&oc(o,Pe.memoizedState.deps)?d.memoizedState=Ji(r,m,l,o):(Se.flags|=t,d.memoizedState=Ji(1|r,m,l,o))}function rg(t,r){Ls(8390656,8,t,r)}function vc(t,r){Us(2048,8,t,r)}function HE(t){Se.flags|=4;var r=Se.updateQueue;if(r===null)r=zs(),Se.updateQueue=r,r.events=[t];else{var l=r.events;l===null?r.events=[t]:l.push(t)}}function ig(t){var r=ct().memoizedState;return HE({ref:r,nextImpl:t}),function(){if((Le&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function ag(t,r){return Us(4,2,t,r)}function lg(t,r){return Us(4,4,t,r)}function sg(t,r){if(typeof r=="function"){t=t();var l=r(t);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function og(t,r,l){l=l!=null?l.concat([t]):null,Us(4,4,sg.bind(null,r,t),l)}function xc(){}function ug(t,r){var l=ct();r=r===void 0?null:r;var o=l.memoizedState;return r!==null&&oc(r,o[1])?o[0]:(l.memoizedState=[t,r],t)}function cg(t,r){var l=ct();r=r===void 0?null:r;var o=l.memoizedState;if(r!==null&&oc(r,o[1]))return o[0];if(o=t(),oi){$t(!0);try{t()}finally{$t(!1)}}return l.memoizedState=[o,r],o}function bc(t,r,l){return l===void 0||(Jn&1073741824)!==0&&(Re&261930)===0?t.memoizedState=r:(t.memoizedState=l,t=fy(),Se.lanes|=t,Ar|=t,l)}function fg(t,r,l,o){return Xt(l,r)?l:Yi.current!==null?(t=bc(t,l,o),Xt(t,r)||(ht=!0),t):(Jn&42)===0||(Jn&1073741824)!==0&&(Re&261930)===0?(ht=!0,t.memoizedState=l):(t=fy(),Se.lanes|=t,Ar|=t,r)}function dg(t,r,l,o,d){var m=B.p;B.p=m!==0&&8>m?m:8;var S=D.T,E={};D.T=E,Ec(t,!1,r,l);try{var z=d(),F=D.S;if(F!==null&&F(E,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var K=IE(z,o);rl(t,r,K,nn(t))}else rl(t,r,o,nn(t))}catch(ne){rl(t,r,{then:function(){},status:"rejected",reason:ne},nn())}finally{B.p=m,S!==null&&E.types!==null&&(S.types=E.types),D.T=S}}function FE(){}function Sc(t,r,l,o){if(t.tag!==5)throw Error(a(476));var d=hg(t).queue;dg(t,d,r,te,l===null?FE:function(){return pg(t),l(o)})}function hg(t){var r=t.memoizedState;if(r!==null)return r;r={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:te},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:l},next:null},t.memoizedState=r,t=t.alternate,t!==null&&(t.memoizedState=r),r}function pg(t){var r=hg(t);r.next===null&&(r=t.alternate.memoizedState),rl(t,r.next.queue,{},nn())}function wc(){return _t(bl)}function mg(){return ct().memoizedState}function gg(){return ct().memoizedState}function VE(t){for(var r=t.return;r!==null;){switch(r.tag){case 24:case 3:var l=nn();t=_r(l);var o=Nr(r,t,l);o!==null&&(Ft(o,r,l),Ja(o,r,l)),r={cache:Ku()},t.payload=r;return}r=r.return}}function GE(t,r,l){var o=nn();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},$s(t)?vg(r,l):(l=qu(t,r,l,o),l!==null&&(Ft(l,t,o),xg(l,r,o)))}function yg(t,r,l){var o=nn();rl(t,r,l,o)}function rl(t,r,l,o){var d={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if($s(t))vg(r,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var S=r.lastRenderedState,E=m(S,l);if(d.hasEagerState=!0,d.eagerState=E,Xt(E,S))return vs(t,r,d,0),Ve===null&&ys(),!1}catch{}if(l=qu(t,r,d,o),l!==null)return Ft(l,t,o),xg(l,r,o),!0}return!1}function Ec(t,r,l,o){if(o={lane:2,revertLane:tf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},$s(t)){if(r)throw Error(a(479))}else r=qu(t,l,o,2),r!==null&&Ft(r,t,2)}function $s(t){var r=t.alternate;return t===Se||r!==null&&r===Se}function vg(t,r){Xi=As=!0;var l=t.pending;l===null?r.next=r:(r.next=l.next,l.next=r),t.pending=r}function xg(t,r,l){if((l&4194048)!==0){var o=r.lanes;o&=t.pendingLanes,l|=o,r.lanes=l,kp(t,l)}}var il={readContext:_t,use:Ds,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useLayoutEffect:at,useInsertionEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useSyncExternalStore:at,useId:at,useHostTransitionStatus:at,useFormState:at,useActionState:at,useOptimistic:at,useMemoCache:at,useCacheRefresh:at};il.useEffectEvent=at;var bg={readContext:_t,use:Ds,useCallback:function(t,r){return zt().memoizedState=[t,r===void 0?null:r],t},useContext:_t,useEffect:rg,useImperativeHandle:function(t,r,l){l=l!=null?l.concat([t]):null,Ls(4194308,4,sg.bind(null,r,t),l)},useLayoutEffect:function(t,r){return Ls(4194308,4,t,r)},useInsertionEffect:function(t,r){Ls(4,2,t,r)},useMemo:function(t,r){var l=zt();r=r===void 0?null:r;var o=t();if(oi){$t(!0);try{t()}finally{$t(!1)}}return l.memoizedState=[o,r],o},useReducer:function(t,r,l){var o=zt();if(l!==void 0){var d=l(r);if(oi){$t(!0);try{l(r)}finally{$t(!1)}}}else d=r;return o.memoizedState=o.baseState=d,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:d},o.queue=t,t=t.dispatch=GE.bind(null,Se,t),[o.memoizedState,t]},useRef:function(t){var r=zt();return t={current:t},r.memoizedState=t},useState:function(t){t=gc(t);var r=t.queue,l=yg.bind(null,Se,r);return r.dispatch=l,[t.memoizedState,l]},useDebugValue:xc,useDeferredValue:function(t,r){var l=zt();return bc(l,t,r)},useTransition:function(){var t=gc(!1);return t=dg.bind(null,Se,t.queue,!0,!1),zt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,r,l){var o=Se,d=zt();if(Oe){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),Ve===null)throw Error(a(349));(Re&127)!==0||Bm(o,r,l)}d.memoizedState=l;var m={value:l,getSnapshot:r};return d.queue=m,rg(Zm.bind(null,o,m,t),[t]),o.flags|=2048,Ji(9,{destroy:void 0},Pm.bind(null,o,m,l,r),null),l},useId:function(){var t=zt(),r=Ve.identifierPrefix;if(Oe){var l=zn,o=On;l=(o&~(1<<32-Fe(o)-1)).toString(32)+l,r="_"+r+"R_"+l,l=Os++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=qE++,r="_"+r+"r_"+l.toString(32)+"_";return t.memoizedState=r},useHostTransitionStatus:wc,useFormState:Jm,useActionState:Jm,useOptimistic:function(t){var r=zt();r.memoizedState=r.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=Ec.bind(null,Se,!0,l),l.dispatch=r,[t,r]},useMemoCache:hc,useCacheRefresh:function(){return zt().memoizedState=VE.bind(null,Se)},useEffectEvent:function(t){var r=zt(),l={impl:t};return r.memoizedState=l,function(){if((Le&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},kc={readContext:_t,use:Ds,useCallback:ug,useContext:_t,useEffect:vc,useImperativeHandle:og,useInsertionEffect:ag,useLayoutEffect:lg,useMemo:cg,useReducer:Ms,useRef:ng,useState:function(){return Ms(Wn)},useDebugValue:xc,useDeferredValue:function(t,r){var l=ct();return fg(l,Pe.memoizedState,t,r)},useTransition:function(){var t=Ms(Wn)[0],r=ct().memoizedState;return[typeof t=="boolean"?t:nl(t),r]},useSyncExternalStore:qm,useId:mg,useHostTransitionStatus:wc,useFormState:Wm,useActionState:Wm,useOptimistic:function(t,r){var l=ct();return Vm(l,Pe,t,r)},useMemoCache:hc,useCacheRefresh:gg};kc.useEffectEvent=ig;var Sg={readContext:_t,use:Ds,useCallback:ug,useContext:_t,useEffect:vc,useImperativeHandle:og,useInsertionEffect:ag,useLayoutEffect:lg,useMemo:cg,useReducer:mc,useRef:ng,useState:function(){return mc(Wn)},useDebugValue:xc,useDeferredValue:function(t,r){var l=ct();return Pe===null?bc(l,t,r):fg(l,Pe.memoizedState,t,r)},useTransition:function(){var t=mc(Wn)[0],r=ct().memoizedState;return[typeof t=="boolean"?t:nl(t),r]},useSyncExternalStore:qm,useId:mg,useHostTransitionStatus:wc,useFormState:tg,useActionState:tg,useOptimistic:function(t,r){var l=ct();return Pe!==null?Vm(l,Pe,t,r):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:hc,useCacheRefresh:gg};Sg.useEffectEvent=ig;function _c(t,r,l,o){r=t.memoizedState,l=l(o,r),l=l==null?r:y({},r,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var Nc={enqueueSetState:function(t,r,l){t=t._reactInternals;var o=nn(),d=_r(o);d.payload=r,l!=null&&(d.callback=l),r=Nr(t,d,o),r!==null&&(Ft(r,t,o),Ja(r,t,o))},enqueueReplaceState:function(t,r,l){t=t._reactInternals;var o=nn(),d=_r(o);d.tag=1,d.payload=r,l!=null&&(d.callback=l),r=Nr(t,d,o),r!==null&&(Ft(r,t,o),Ja(r,t,o))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var l=nn(),o=_r(l);o.tag=2,r!=null&&(o.callback=r),r=Nr(t,o,l),r!==null&&(Ft(r,t,l),Ja(r,t,l))}};function wg(t,r,l,o,d,m,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(o,m,S):r.prototype&&r.prototype.isPureReactComponent?!Ha(l,o)||!Ha(d,m):!0}function Eg(t,r,l,o){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,o),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,o),r.state!==t&&Nc.enqueueReplaceState(r,r.state,null)}function ui(t,r){var l=r;if("ref"in r){l={};for(var o in r)o!=="ref"&&(l[o]=r[o])}if(t=t.defaultProps){l===r&&(l=y({},l));for(var d in t)l[d]===void 0&&(l[d]=t[d])}return l}function kg(t){gs(t)}function _g(t){console.error(t)}function Ng(t){gs(t)}function Is(t,r){try{var l=t.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(o){setTimeout(function(){throw o})}}function jg(t,r,l){try{var o=t.onCaughtError;o(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function jc(t,r,l){return l=_r(l),l.tag=3,l.payload={element:null},l.callback=function(){Is(t,r)},l}function Cg(t){return t=_r(t),t.tag=3,t}function Tg(t,r,l,o){var d=l.type.getDerivedStateFromError;if(typeof d=="function"){var m=o.value;t.payload=function(){return d(m)},t.callback=function(){jg(r,l,o)}}var S=l.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){jg(r,l,o),typeof d!="function"&&(Or===null?Or=new Set([this]):Or.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})})}function QE(t,r,l,o,d){if(l.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(r=l.alternate,r!==null&&Hi(r,l,d,!0),l=Jt.current,l!==null){switch(l.tag){case 31:case 13:return gn===null?Ks():l.alternate===null&&lt===0&&(lt=3),l.flags&=-257,l.flags|=65536,l.lanes=d,o===Ns?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([o]):r.add(o),Jc(t,o,d)),!1;case 22:return l.flags|=65536,o===Ns?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([o])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([o]):l.add(o)),Jc(t,o,d)),!1}throw Error(a(435,l.tag))}return Jc(t,o,d),Ks(),!1}if(Oe)return r=Jt.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=d,o!==Vu&&(t=Error(a(422),{cause:o}),Ga(dn(t,l)))):(o!==Vu&&(r=Error(a(423),{cause:o}),Ga(dn(r,l))),t=t.current.alternate,t.flags|=65536,d&=-d,t.lanes|=d,o=dn(o,l),d=jc(t.stateNode,o,d),rc(t,d),lt!==4&&(lt=2)),!1;var m=Error(a(520),{cause:o});if(m=dn(m,l),dl===null?dl=[m]:dl.push(m),lt!==4&&(lt=2),r===null)return!0;o=dn(o,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,t=d&-d,l.lanes|=t,t=jc(l.stateNode,o,t),rc(l,t),!1;case 1:if(r=l.type,m=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Or===null||!Or.has(m))))return l.flags|=65536,d&=-d,l.lanes|=d,d=Cg(d),Tg(d,t,l,o),rc(l,d),!1}l=l.return}while(l!==null);return!1}var Cc=Error(a(461)),ht=!1;function Nt(t,r,l,o){r.child=t===null?zm(r,null,l,o):si(r,t.child,l,o)}function Rg(t,r,l,o,d){l=l.render;var m=r.ref;if("ref"in o){var S={};for(var E in o)E!=="ref"&&(S[E]=o[E])}else S=o;return ri(r),o=uc(t,r,l,S,m,d),E=cc(),t!==null&&!ht?(fc(t,r,d),er(t,r,d)):(Oe&&E&&Hu(r),r.flags|=1,Nt(t,r,o,d),r.child)}function Ag(t,r,l,o,d){if(t===null){var m=l.type;return typeof m=="function"&&!Bu(m)&&m.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=m,Og(t,r,m,o,d)):(t=bs(l.type,null,o,r,r.mode,d),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,!Lc(t,d)){var S=m.memoizedProps;if(l=l.compare,l=l!==null?l:Ha,l(S,o)&&t.ref===r.ref)return er(t,r,d)}return r.flags|=1,t=Qn(m,o),t.ref=r.ref,t.return=r,r.child=t}function Og(t,r,l,o,d){if(t!==null){var m=t.memoizedProps;if(Ha(m,o)&&t.ref===r.ref)if(ht=!1,r.pendingProps=o=m,Lc(t,d))(t.flags&131072)!==0&&(ht=!0);else return r.lanes=t.lanes,er(t,r,d)}return Tc(t,r,l,o,d)}function zg(t,r,l,o){var d=o.children,m=t!==null?t.memoizedState:null;if(t===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((r.flags&128)!==0){if(m=m!==null?m.baseLanes|l:l,t!==null){for(o=r.child=t.child,d=0;o!==null;)d=d|o.lanes|o.childLanes,o=o.sibling;o=d&~m}else o=0,r.child=null;return Dg(t,r,m,l,o)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},t!==null&&ks(r,m!==null?m.cachePool:null),m!==null?Lm(r,m):ac(),Um(r);else return o=r.lanes=536870912,Dg(t,r,m!==null?m.baseLanes|l:l,l,o)}else m!==null?(ks(r,m.cachePool),Lm(r,m),Cr(),r.memoizedState=null):(t!==null&&ks(r,null),ac(),Cr());return Nt(t,r,d,l),r.child}function al(t,r){return t!==null&&t.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Dg(t,r,l,o,d){var m=Wu();return m=m===null?null:{parent:ft._currentValue,pool:m},r.memoizedState={baseLanes:l,cachePool:m},t!==null&&ks(r,null),ac(),Um(r),t!==null&&Hi(t,r,o,!0),r.childLanes=d,null}function qs(t,r){return r=Ps({mode:r.mode,children:r.children},t.mode),r.ref=t.ref,t.child=r,r.return=t,r}function Mg(t,r,l){return si(r,t.child,null,l),t=qs(r,r.pendingProps),t.flags|=2,Wt(r),r.memoizedState=null,t}function YE(t,r,l){var o=r.pendingProps,d=(r.flags&128)!==0;if(r.flags&=-129,t===null){if(Oe){if(o.mode==="hidden")return t=qs(r,o),r.lanes=536870912,al(null,t);if(sc(r),(t=Ye)?(t=Gy(t,mn),t=t!==null&&t.data==="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:br!==null?{id:On,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},l=vm(t),l.return=r,r.child=l,kt=r,Ye=null)):t=null,t===null)throw wr(r);return r.lanes=536870912,null}return qs(r,o)}var m=t.memoizedState;if(m!==null){var S=m.dehydrated;if(sc(r),d)if(r.flags&256)r.flags&=-257,r=Mg(t,r,l);else if(r.memoizedState!==null)r.child=t.child,r.flags|=128,r=null;else throw Error(a(558));else if(ht||Hi(t,r,l,!1),d=(l&t.childLanes)!==0,ht||d){if(o=Ve,o!==null&&(S=_p(o,l),S!==0&&S!==m.retryLane))throw m.retryLane=S,Wr(t,S),Ft(o,t,S),Cc;Ks(),r=Mg(t,r,l)}else t=m.treeContext,Ye=yn(S.nextSibling),kt=r,Oe=!0,Sr=null,mn=!1,t!==null&&Sm(r,t),r=qs(r,o),r.flags|=4096;return r}return t=Qn(t.child,{mode:o.mode,children:o.children}),t.ref=r.ref,r.child=t,t.return=r,t}function Bs(t,r){var l=r.ref;if(l===null)t!==null&&t.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(t===null||t.ref!==l)&&(r.flags|=4194816)}}function Tc(t,r,l,o,d){return ri(r),l=uc(t,r,l,o,void 0,d),o=cc(),t!==null&&!ht?(fc(t,r,d),er(t,r,d)):(Oe&&o&&Hu(r),r.flags|=1,Nt(t,r,l,d),r.child)}function Lg(t,r,l,o,d,m){return ri(r),r.updateQueue=null,l=Im(r,o,l,d),$m(t),o=cc(),t!==null&&!ht?(fc(t,r,m),er(t,r,m)):(Oe&&o&&Hu(r),r.flags|=1,Nt(t,r,l,m),r.child)}function Ug(t,r,l,o,d){if(ri(r),r.stateNode===null){var m=qi,S=l.contextType;typeof S=="object"&&S!==null&&(m=_t(S)),m=new l(o,m),r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Nc,r.stateNode=m,m._reactInternals=r,m=r.stateNode,m.props=o,m.state=r.memoizedState,m.refs={},tc(r),S=l.contextType,m.context=typeof S=="object"&&S!==null?_t(S):qi,m.state=r.memoizedState,S=l.getDerivedStateFromProps,typeof S=="function"&&(_c(r,l,S,o),m.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(S=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),S!==m.state&&Nc.enqueueReplaceState(m,m.state,null),el(r,o,m,d),Wa(),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308),o=!0}else if(t===null){m=r.stateNode;var E=r.memoizedProps,z=ui(l,E);m.props=z;var F=m.context,K=l.contextType;S=qi,typeof K=="object"&&K!==null&&(S=_t(K));var ne=l.getDerivedStateFromProps;K=typeof ne=="function"||typeof m.getSnapshotBeforeUpdate=="function",E=r.pendingProps!==E,K||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(E||F!==S)&&Eg(r,m,o,S),kr=!1;var G=r.memoizedState;m.state=G,el(r,o,m,d),Wa(),F=r.memoizedState,E||G!==F||kr?(typeof ne=="function"&&(_c(r,l,ne,o),F=r.memoizedState),(z=kr||wg(r,l,z,o,G,F,S))?(K||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(r.flags|=4194308)):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=o,r.memoizedState=F),m.props=o,m.state=F,m.context=S,o=z):(typeof m.componentDidMount=="function"&&(r.flags|=4194308),o=!1)}else{m=r.stateNode,nc(t,r),S=r.memoizedProps,K=ui(l,S),m.props=K,ne=r.pendingProps,G=m.context,F=l.contextType,z=qi,typeof F=="object"&&F!==null&&(z=_t(F)),E=l.getDerivedStateFromProps,(F=typeof E=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S!==ne||G!==z)&&Eg(r,m,o,z),kr=!1,G=r.memoizedState,m.state=G,el(r,o,m,d),Wa();var Q=r.memoizedState;S!==ne||G!==Q||kr||t!==null&&t.dependencies!==null&&ws(t.dependencies)?(typeof E=="function"&&(_c(r,l,E,o),Q=r.memoizedState),(K=kr||wg(r,l,K,o,G,Q,z)||t!==null&&t.dependencies!==null&&ws(t.dependencies))?(F||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(o,Q,z),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(o,Q,z)),typeof m.componentDidUpdate=="function"&&(r.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&G===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&G===t.memoizedState||(r.flags|=1024),r.memoizedProps=o,r.memoizedState=Q),m.props=o,m.state=Q,m.context=z,o=K):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&G===t.memoizedState||(r.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&G===t.memoizedState||(r.flags|=1024),o=!1)}return m=o,Bs(t,r),o=(r.flags&128)!==0,m||o?(m=r.stateNode,l=o&&typeof l.getDerivedStateFromError!="function"?null:m.render(),r.flags|=1,t!==null&&o?(r.child=si(r,t.child,null,d),r.child=si(r,null,l,d)):Nt(t,r,l,d),r.memoizedState=m.state,t=r.child):t=er(t,r,d),t}function $g(t,r,l,o){return ti(),r.flags|=256,Nt(t,r,l,o),r.child}var Rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ac(t){return{baseLanes:t,cachePool:jm()}}function Oc(t,r,l){return t=t!==null?t.childLanes&~l:0,r&&(t|=tn),t}function Ig(t,r,l){var o=r.pendingProps,d=!1,m=(r.flags&128)!==0,S;if((S=m)||(S=t!==null&&t.memoizedState===null?!1:(ut.current&2)!==0),S&&(d=!0,r.flags&=-129),S=(r.flags&32)!==0,r.flags&=-33,t===null){if(Oe){if(d?jr(r):Cr(),(t=Ye)?(t=Gy(t,mn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(r.memoizedState={dehydrated:t,treeContext:br!==null?{id:On,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},l=vm(t),l.return=r,r.child=l,kt=r,Ye=null)):t=null,t===null)throw wr(r);return mf(t)?r.lanes=32:r.lanes=536870912,null}var E=o.children;return o=o.fallback,d?(Cr(),d=r.mode,E=Ps({mode:"hidden",children:E},d),o=ei(o,d,l,null),E.return=r,o.return=r,E.sibling=o,r.child=E,o=r.child,o.memoizedState=Ac(l),o.childLanes=Oc(t,S,l),r.memoizedState=Rc,al(null,o)):(jr(r),zc(r,E))}var z=t.memoizedState;if(z!==null&&(E=z.dehydrated,E!==null)){if(m)r.flags&256?(jr(r),r.flags&=-257,r=Dc(t,r,l)):r.memoizedState!==null?(Cr(),r.child=t.child,r.flags|=128,r=null):(Cr(),E=o.fallback,d=r.mode,o=Ps({mode:"visible",children:o.children},d),E=ei(E,d,l,null),E.flags|=2,o.return=r,E.return=r,o.sibling=E,r.child=o,si(r,t.child,null,l),o=r.child,o.memoizedState=Ac(l),o.childLanes=Oc(t,S,l),r.memoizedState=Rc,r=al(null,o));else if(jr(r),mf(E)){if(S=E.nextSibling&&E.nextSibling.dataset,S)var F=S.dgst;S=F,o=Error(a(419)),o.stack="",o.digest=S,Ga({value:o,source:null,stack:null}),r=Dc(t,r,l)}else if(ht||Hi(t,r,l,!1),S=(l&t.childLanes)!==0,ht||S){if(S=Ve,S!==null&&(o=_p(S,l),o!==0&&o!==z.retryLane))throw z.retryLane=o,Wr(t,o),Ft(S,t,o),Cc;pf(E)||Ks(),r=Dc(t,r,l)}else pf(E)?(r.flags|=192,r.child=t.child,r=null):(t=z.treeContext,Ye=yn(E.nextSibling),kt=r,Oe=!0,Sr=null,mn=!1,t!==null&&Sm(r,t),r=zc(r,o.children),r.flags|=4096);return r}return d?(Cr(),E=o.fallback,d=r.mode,z=t.child,F=z.sibling,o=Qn(z,{mode:"hidden",children:o.children}),o.subtreeFlags=z.subtreeFlags&65011712,F!==null?E=Qn(F,E):(E=ei(E,d,l,null),E.flags|=2),E.return=r,o.return=r,o.sibling=E,r.child=o,al(null,o),o=r.child,E=t.child.memoizedState,E===null?E=Ac(l):(d=E.cachePool,d!==null?(z=ft._currentValue,d=d.parent!==z?{parent:z,pool:z}:d):d=jm(),E={baseLanes:E.baseLanes|l,cachePool:d}),o.memoizedState=E,o.childLanes=Oc(t,S,l),r.memoizedState=Rc,al(t.child,o)):(jr(r),l=t.child,t=l.sibling,l=Qn(l,{mode:"visible",children:o.children}),l.return=r,l.sibling=null,t!==null&&(S=r.deletions,S===null?(r.deletions=[t],r.flags|=16):S.push(t)),r.child=l,r.memoizedState=null,l)}function zc(t,r){return r=Ps({mode:"visible",children:r},t.mode),r.return=t,t.child=r}function Ps(t,r){return t=Kt(22,t,null,r),t.lanes=0,t}function Dc(t,r,l){return si(r,t.child,null,l),t=zc(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function qg(t,r,l){t.lanes|=r;var o=t.alternate;o!==null&&(o.lanes|=r),Yu(t.return,r,l)}function Mc(t,r,l,o,d,m){var S=t.memoizedState;S===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:o,tail:l,tailMode:d,treeForkCount:m}:(S.isBackwards=r,S.rendering=null,S.renderingStartTime=0,S.last=o,S.tail=l,S.tailMode=d,S.treeForkCount=m)}function Bg(t,r,l){var o=r.pendingProps,d=o.revealOrder,m=o.tail;o=o.children;var S=ut.current,E=(S&2)!==0;if(E?(S=S&1|2,r.flags|=128):S&=1,N(ut,S),Nt(t,r,o,l),o=Oe?Va:0,!E&&t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&qg(t,l,r);else if(t.tag===19)qg(t,l,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(d){case"forwards":for(l=r.child,d=null;l!==null;)t=l.alternate,t!==null&&Rs(t)===null&&(d=l),l=l.sibling;l=d,l===null?(d=r.child,r.child=null):(d=l.sibling,l.sibling=null),Mc(r,!1,d,l,m,o);break;case"backwards":case"unstable_legacy-backwards":for(l=null,d=r.child,r.child=null;d!==null;){if(t=d.alternate,t!==null&&Rs(t)===null){r.child=d;break}t=d.sibling,d.sibling=l,l=d,d=t}Mc(r,!0,l,null,m,o);break;case"together":Mc(r,!1,null,null,void 0,o);break;default:r.memoizedState=null}return r.child}function er(t,r,l){if(t!==null&&(r.dependencies=t.dependencies),Ar|=r.lanes,(l&r.childLanes)===0)if(t!==null){if(Hi(t,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(t!==null&&r.child!==t.child)throw Error(a(153));if(r.child!==null){for(t=r.child,l=Qn(t,t.pendingProps),r.child=l,l.return=r;t.sibling!==null;)t=t.sibling,l=l.sibling=Qn(t,t.pendingProps),l.return=r;l.sibling=null}return r.child}function Lc(t,r){return(t.lanes&r)!==0?!0:(t=t.dependencies,!!(t!==null&&ws(t)))}function XE(t,r,l){switch(r.tag){case 3:Je(r,r.stateNode.containerInfo),Er(r,ft,t.memoizedState.cache),ti();break;case 27:case 5:on(r);break;case 4:Je(r,r.stateNode.containerInfo);break;case 10:Er(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,sc(r),null;break;case 13:var o=r.memoizedState;if(o!==null)return o.dehydrated!==null?(jr(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Ig(t,r,l):(jr(r),t=er(t,r,l),t!==null?t.sibling:null);jr(r);break;case 19:var d=(t.flags&128)!==0;if(o=(l&r.childLanes)!==0,o||(Hi(t,r,l,!1),o=(l&r.childLanes)!==0),d){if(o)return Bg(t,r,l);r.flags|=128}if(d=r.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),N(ut,ut.current),o)break;return null;case 22:return r.lanes=0,zg(t,r,l,r.pendingProps);case 24:Er(r,ft,t.memoizedState.cache)}return er(t,r,l)}function Pg(t,r,l){if(t!==null)if(t.memoizedProps!==r.pendingProps)ht=!0;else{if(!Lc(t,l)&&(r.flags&128)===0)return ht=!1,XE(t,r,l);ht=(t.flags&131072)!==0}else ht=!1,Oe&&(r.flags&1048576)!==0&&bm(r,Va,r.index);switch(r.lanes=0,r.tag){case 16:e:{var o=r.pendingProps;if(t=ai(r.elementType),r.type=t,typeof t=="function")Bu(t)?(o=ui(t,o),r.tag=1,r=Ug(null,r,t,o,l)):(r.tag=0,r=Tc(null,r,t,o,l));else{if(t!=null){var d=t.$$typeof;if(d===V){r.tag=11,r=Rg(null,r,t,o,l);break e}else if(d===Z){r.tag=14,r=Ag(null,r,t,o,l);break e}}throw r=I(t)||t,Error(a(306,r,""))}}return r;case 0:return Tc(t,r,r.type,r.pendingProps,l);case 1:return o=r.type,d=ui(o,r.pendingProps),Ug(t,r,o,d,l);case 3:e:{if(Je(r,r.stateNode.containerInfo),t===null)throw Error(a(387));o=r.pendingProps;var m=r.memoizedState;d=m.element,nc(t,r),el(r,o,null,l);var S=r.memoizedState;if(o=S.cache,Er(r,ft,o),o!==m.cache&&Xu(r,[ft],l,!0),Wa(),o=S.element,m.isDehydrated)if(m={element:o,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){r=$g(t,r,o,l);break e}else if(o!==d){d=dn(Error(a(424)),r),Ga(d),r=$g(t,r,o,l);break e}else for(t=r.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,Ye=yn(t.firstChild),kt=r,Oe=!0,Sr=null,mn=!0,l=zm(r,null,o,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ti(),o===d){r=er(t,r,l);break e}Nt(t,r,o,l)}r=r.child}return r;case 26:return Bs(t,r),t===null?(l=Wy(r.type,null,r.pendingProps,null))?r.memoizedState=l:Oe||(l=r.type,t=r.pendingProps,o=io(de.current).createElement(l),o[Et]=r,o[It]=t,jt(o,l,t),St(o),r.stateNode=o):r.memoizedState=Wy(r.type,t.memoizedProps,r.pendingProps,t.memoizedState),null;case 27:return on(r),t===null&&Oe&&(o=r.stateNode=Xy(r.type,r.pendingProps,de.current),kt=r,mn=!0,d=Ye,Lr(r.type)?(gf=d,Ye=yn(o.firstChild)):Ye=d),Nt(t,r,r.pendingProps.children,l),Bs(t,r),t===null&&(r.flags|=4194304),r.child;case 5:return t===null&&Oe&&((d=o=Ye)&&(o=Nk(o,r.type,r.pendingProps,mn),o!==null?(r.stateNode=o,kt=r,Ye=yn(o.firstChild),mn=!1,d=!0):d=!1),d||wr(r)),on(r),d=r.type,m=r.pendingProps,S=t!==null?t.memoizedProps:null,o=m.children,ff(d,m)?o=null:S!==null&&ff(d,S)&&(r.flags|=32),r.memoizedState!==null&&(d=uc(t,r,BE,null,null,l),bl._currentValue=d),Bs(t,r),Nt(t,r,o,l),r.child;case 6:return t===null&&Oe&&((t=l=Ye)&&(l=jk(l,r.pendingProps,mn),l!==null?(r.stateNode=l,kt=r,Ye=null,t=!0):t=!1),t||wr(r)),null;case 13:return Ig(t,r,l);case 4:return Je(r,r.stateNode.containerInfo),o=r.pendingProps,t===null?r.child=si(r,null,o,l):Nt(t,r,o,l),r.child;case 11:return Rg(t,r,r.type,r.pendingProps,l);case 7:return Nt(t,r,r.pendingProps,l),r.child;case 8:return Nt(t,r,r.pendingProps.children,l),r.child;case 12:return Nt(t,r,r.pendingProps.children,l),r.child;case 10:return o=r.pendingProps,Er(r,r.type,o.value),Nt(t,r,o.children,l),r.child;case 9:return d=r.type._context,o=r.pendingProps.children,ri(r),d=_t(d),o=o(d),r.flags|=1,Nt(t,r,o,l),r.child;case 14:return Ag(t,r,r.type,r.pendingProps,l);case 15:return Og(t,r,r.type,r.pendingProps,l);case 19:return Bg(t,r,l);case 31:return YE(t,r,l);case 22:return zg(t,r,l,r.pendingProps);case 24:return ri(r),o=_t(ft),t===null?(d=Wu(),d===null&&(d=Ve,m=Ku(),d.pooledCache=m,m.refCount++,m!==null&&(d.pooledCacheLanes|=l),d=m),r.memoizedState={parent:o,cache:d},tc(r),Er(r,ft,d)):((t.lanes&l)!==0&&(nc(t,r),el(r,null,null,l),Wa()),d=t.memoizedState,m=r.memoizedState,d.parent!==o?(d={parent:o,cache:o},r.memoizedState=d,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=d),Er(r,ft,o)):(o=m.cache,Er(r,ft,o),o!==d.cache&&Xu(r,[ft],l,!0))),Nt(t,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function tr(t){t.flags|=4}function Uc(t,r,l,o,d){if((r=(t.mode&32)!==0)&&(r=!1),r){if(t.flags|=16777216,(d&335544128)===d)if(t.stateNode.complete)t.flags|=8192;else if(my())t.flags|=8192;else throw li=Ns,ec}else t.flags&=-16777217}function Zg(t,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!i0(r))if(my())t.flags|=8192;else throw li=Ns,ec}function Zs(t,r){r!==null&&(t.flags|=4),t.flags&16384&&(r=t.tag!==22?wp():536870912,t.lanes|=r,na|=r)}function ll(t,r){if(!Oe)switch(t.tailMode){case"hidden":r=t.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var o=null;l!==null;)l.alternate!==null&&(o=l),l=l.sibling;o===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:o.sibling=null}}function Xe(t){var r=t.alternate!==null&&t.alternate.child===t.child,l=0,o=0;if(r)for(var d=t.child;d!==null;)l|=d.lanes|d.childLanes,o|=d.subtreeFlags&65011712,o|=d.flags&65011712,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)l|=d.lanes|d.childLanes,o|=d.subtreeFlags,o|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=o,t.childLanes=l,r}function KE(t,r,l){var o=r.pendingProps;switch(Fu(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(r),null;case 1:return Xe(r),null;case 3:return l=r.stateNode,o=null,t!==null&&(o=t.memoizedState.cache),r.memoizedState.cache!==o&&(r.flags|=2048),Kn(ft),Be(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Zi(r)?tr(r):t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Gu())),Xe(r),null;case 26:var d=r.type,m=r.memoizedState;return t===null?(tr(r),m!==null?(Xe(r),Zg(r,m)):(Xe(r),Uc(r,d,null,o,l))):m?m!==t.memoizedState?(tr(r),Xe(r),Zg(r,m)):(Xe(r),r.flags&=-16777217):(t=t.memoizedProps,t!==o&&tr(r),Xe(r),Uc(r,d,t,o,l)),null;case 27:if(Pn(r),l=de.current,d=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==o&&tr(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return Xe(r),null}t=le.current,Zi(r)?wm(r):(t=Xy(d,o,l),r.stateNode=t,tr(r))}return Xe(r),null;case 5:if(Pn(r),d=r.type,t!==null&&r.stateNode!=null)t.memoizedProps!==o&&tr(r);else{if(!o){if(r.stateNode===null)throw Error(a(166));return Xe(r),null}if(m=le.current,Zi(r))wm(r);else{var S=io(de.current);switch(m){case 1:m=S.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:m=S.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":m=S.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":m=S.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":m=S.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof o.is=="string"?S.createElement("select",{is:o.is}):S.createElement("select"),o.multiple?m.multiple=!0:o.size&&(m.size=o.size);break;default:m=typeof o.is=="string"?S.createElement(d,{is:o.is}):S.createElement(d)}}m[Et]=r,m[It]=o;e:for(S=r.child;S!==null;){if(S.tag===5||S.tag===6)m.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===r)break e;for(;S.sibling===null;){if(S.return===null||S.return===r)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}r.stateNode=m;e:switch(jt(m,d,o),d){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&tr(r)}}return Xe(r),Uc(r,r.type,t===null?null:t.memoizedProps,r.pendingProps,l),null;case 6:if(t&&r.stateNode!=null)t.memoizedProps!==o&&tr(r);else{if(typeof o!="string"&&r.stateNode===null)throw Error(a(166));if(t=de.current,Zi(r)){if(t=r.stateNode,l=r.memoizedProps,o=null,d=kt,d!==null)switch(d.tag){case 27:case 5:o=d.memoizedProps}t[Et]=r,t=!!(t.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||Iy(t.nodeValue,l)),t||wr(r,!0)}else t=io(t).createTextNode(o),t[Et]=r,r.stateNode=t}return Xe(r),null;case 31:if(l=r.memoizedState,t===null||t.memoizedState!==null){if(o=Zi(r),l!==null){if(t===null){if(!o)throw Error(a(318));if(t=r.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(a(557));t[Et]=r}else ti(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Xe(r),t=!1}else l=Gu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return r.flags&256?(Wt(r),r):(Wt(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Xe(r),null;case 13:if(o=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(d=Zi(r),o!==null&&o.dehydrated!==null){if(t===null){if(!d)throw Error(a(318));if(d=r.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));d[Et]=r}else ti(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Xe(r),d=!1}else d=Gu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=d),d=!0;if(!d)return r.flags&256?(Wt(r),r):(Wt(r),null)}return Wt(r),(r.flags&128)!==0?(r.lanes=l,r):(l=o!==null,t=t!==null&&t.memoizedState!==null,l&&(o=r.child,d=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(d=o.alternate.memoizedState.cachePool.pool),m=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),m!==d&&(o.flags|=2048)),l!==t&&l&&(r.child.flags|=8192),Zs(r,r.updateQueue),Xe(r),null);case 4:return Be(),t===null&&lf(r.stateNode.containerInfo),Xe(r),null;case 10:return Kn(r.type),Xe(r),null;case 19:if(q(ut),o=r.memoizedState,o===null)return Xe(r),null;if(d=(r.flags&128)!==0,m=o.rendering,m===null)if(d)ll(o,!1);else{if(lt!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(m=Rs(t),m!==null){for(r.flags|=128,ll(o,!1),t=m.updateQueue,r.updateQueue=t,Zs(r,t),r.subtreeFlags=0,t=l,l=r.child;l!==null;)ym(l,t),l=l.sibling;return N(ut,ut.current&1|2),Oe&&Yn(r,o.treeForkCount),r.child}t=t.sibling}o.tail!==null&&At()>Qs&&(r.flags|=128,d=!0,ll(o,!1),r.lanes=4194304)}else{if(!d)if(t=Rs(m),t!==null){if(r.flags|=128,d=!0,t=t.updateQueue,r.updateQueue=t,Zs(r,t),ll(o,!0),o.tail===null&&o.tailMode==="hidden"&&!m.alternate&&!Oe)return Xe(r),null}else 2*At()-o.renderingStartTime>Qs&&l!==536870912&&(r.flags|=128,d=!0,ll(o,!1),r.lanes=4194304);o.isBackwards?(m.sibling=r.child,r.child=m):(t=o.last,t!==null?t.sibling=m:r.child=m,o.last=m)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=At(),t.sibling=null,l=ut.current,N(ut,d?l&1|2:l&1),Oe&&Yn(r,o.treeForkCount),t):(Xe(r),null);case 22:case 23:return Wt(r),lc(),o=r.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(r.flags|=8192):o&&(r.flags|=8192),o?(l&536870912)!==0&&(r.flags&128)===0&&(Xe(r),r.subtreeFlags&6&&(r.flags|=8192)):Xe(r),l=r.updateQueue,l!==null&&Zs(r,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==l&&(r.flags|=2048),t!==null&&q(ii),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),Kn(ft),Xe(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function JE(t,r){switch(Fu(r),r.tag){case 1:return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Kn(ft),Be(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 26:case 27:case 5:return Pn(r),null;case 31:if(r.memoizedState!==null){if(Wt(r),r.alternate===null)throw Error(a(340));ti()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 13:if(Wt(r),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(a(340));ti()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return q(ut),null;case 4:return Be(),null;case 10:return Kn(r.type),null;case 22:case 23:return Wt(r),lc(),t!==null&&q(ii),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 24:return Kn(ft),null;case 25:return null;default:return null}}function Hg(t,r){switch(Fu(r),r.tag){case 3:Kn(ft),Be();break;case 26:case 27:case 5:Pn(r);break;case 4:Be();break;case 31:r.memoizedState!==null&&Wt(r);break;case 13:Wt(r);break;case 19:q(ut);break;case 10:Kn(r.type);break;case 22:case 23:Wt(r),lc(),t!==null&&q(ii);break;case 24:Kn(ft)}}function sl(t,r){try{var l=r.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var d=o.next;l=d;do{if((l.tag&t)===t){o=void 0;var m=l.create,S=l.inst;o=m(),S.destroy=o}l=l.next}while(l!==d)}}catch(E){Ie(r,r.return,E)}}function Tr(t,r,l){try{var o=r.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var m=d.next;o=m;do{if((o.tag&t)===t){var S=o.inst,E=S.destroy;if(E!==void 0){S.destroy=void 0,d=r;var z=l,F=E;try{F()}catch(K){Ie(d,z,K)}}}o=o.next}while(o!==m)}}catch(K){Ie(r,r.return,K)}}function Fg(t){var r=t.updateQueue;if(r!==null){var l=t.stateNode;try{Mm(r,l)}catch(o){Ie(t,t.return,o)}}}function Vg(t,r,l){l.props=ui(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(o){Ie(t,r,o)}}function ol(t,r){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:o=t.stateNode;break;default:o=t.stateNode}typeof l=="function"?t.refCleanup=l(o):l.current=o}}catch(d){Ie(t,r,d)}}function Dn(t,r){var l=t.ref,o=t.refCleanup;if(l!==null)if(typeof o=="function")try{o()}catch(d){Ie(t,r,d)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(d){Ie(t,r,d)}else l.current=null}function Gg(t){var r=t.type,l=t.memoizedProps,o=t.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break e;case"img":l.src?o.src=l.src:l.srcSet&&(o.srcset=l.srcSet)}}catch(d){Ie(t,t.return,d)}}function $c(t,r,l){try{var o=t.stateNode;bk(o,t.type,l,r),o[It]=r}catch(d){Ie(t,t.return,d)}}function Qg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Lr(t.type)||t.tag===4}function Ic(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Qg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Lr(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function qc(t,r,l){var o=t.tag;if(o===5||o===6)t=t.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(t),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=Vn));else if(o!==4&&(o===27&&Lr(t.type)&&(l=t.stateNode,r=null),t=t.child,t!==null))for(qc(t,r,l),t=t.sibling;t!==null;)qc(t,r,l),t=t.sibling}function Hs(t,r,l){var o=t.tag;if(o===5||o===6)t=t.stateNode,r?l.insertBefore(t,r):l.appendChild(t);else if(o!==4&&(o===27&&Lr(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Hs(t,r,l),t=t.sibling;t!==null;)Hs(t,r,l),t=t.sibling}function Yg(t){var r=t.stateNode,l=t.memoizedProps;try{for(var o=t.type,d=r.attributes;d.length;)r.removeAttributeNode(d[0]);jt(r,o,l),r[Et]=t,r[It]=l}catch(m){Ie(t,t.return,m)}}var nr=!1,pt=!1,Bc=!1,Xg=typeof WeakSet=="function"?WeakSet:Set,wt=null;function WE(t,r){if(t=t.containerInfo,uf=fo,t=om(t),Du(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var o=l.getSelection&&l.getSelection();if(o&&o.rangeCount!==0){l=o.anchorNode;var d=o.anchorOffset,m=o.focusNode;o=o.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break e}var S=0,E=-1,z=-1,F=0,K=0,ne=t,G=null;t:for(;;){for(var Q;ne!==l||d!==0&&ne.nodeType!==3||(E=S+d),ne!==m||o!==0&&ne.nodeType!==3||(z=S+o),ne.nodeType===3&&(S+=ne.nodeValue.length),(Q=ne.firstChild)!==null;)G=ne,ne=Q;for(;;){if(ne===t)break t;if(G===l&&++F===d&&(E=S),G===m&&++K===o&&(z=S),(Q=ne.nextSibling)!==null)break;ne=G,G=ne.parentNode}ne=Q}l=E===-1||z===-1?null:{start:E,end:z}}else l=null}l=l||{start:0,end:0}}else l=null;for(cf={focusedElem:t,selectionRange:l},fo=!1,wt=r;wt!==null;)if(r=wt,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,wt=t;else for(;wt!==null;){switch(r=wt,m=r.alternate,t=r.flags,r.tag){case 0:if((t&4)!==0&&(t=r.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)d=t[l],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,l=r,d=m.memoizedProps,m=m.memoizedState,o=l.stateNode;try{var fe=ui(l.type,d);t=o.getSnapshotBeforeUpdate(fe,m),o.__reactInternalSnapshotBeforeUpdate=t}catch(ye){Ie(l,l.return,ye)}}break;case 3:if((t&1024)!==0){if(t=r.stateNode.containerInfo,l=t.nodeType,l===9)hf(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":hf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(a(163))}if(t=r.sibling,t!==null){t.return=r.return,wt=t;break}wt=r.return}}function Kg(t,r,l){var o=l.flags;switch(l.tag){case 0:case 11:case 15:ir(t,l),o&4&&sl(5,l);break;case 1:if(ir(t,l),o&4)if(t=l.stateNode,r===null)try{t.componentDidMount()}catch(S){Ie(l,l.return,S)}else{var d=ui(l.type,r.memoizedProps);r=r.memoizedState;try{t.componentDidUpdate(d,r,t.__reactInternalSnapshotBeforeUpdate)}catch(S){Ie(l,l.return,S)}}o&64&&Fg(l),o&512&&ol(l,l.return);break;case 3:if(ir(t,l),o&64&&(t=l.updateQueue,t!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Mm(t,r)}catch(S){Ie(l,l.return,S)}}break;case 27:r===null&&o&4&&Yg(l);case 26:case 5:ir(t,l),r===null&&o&4&&Gg(l),o&512&&ol(l,l.return);break;case 12:ir(t,l);break;case 31:ir(t,l),o&4&&ey(t,l);break;case 13:ir(t,l),o&4&&ty(t,l),o&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=ok.bind(null,l),Ck(t,l))));break;case 22:if(o=l.memoizedState!==null||nr,!o){r=r!==null&&r.memoizedState!==null||pt,d=nr;var m=pt;nr=o,(pt=r)&&!m?ar(t,l,(l.subtreeFlags&8772)!==0):ir(t,l),nr=d,pt=m}break;case 30:break;default:ir(t,l)}}function Jg(t){var r=t.alternate;r!==null&&(t.alternate=null,Jg(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&yu(r)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var We=null,Bt=!1;function rr(t,r,l){for(l=l.child;l!==null;)Wg(t,r,l),l=l.sibling}function Wg(t,r,l){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Ot,l)}catch{}switch(l.tag){case 26:pt||Dn(l,r),rr(t,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:pt||Dn(l,r);var o=We,d=Bt;Lr(l.type)&&(We=l.stateNode,Bt=!1),rr(t,r,l),yl(l.stateNode),We=o,Bt=d;break;case 5:pt||Dn(l,r);case 6:if(o=We,d=Bt,We=null,rr(t,r,l),We=o,Bt=d,We!==null)if(Bt)try{(We.nodeType===9?We.body:We.nodeName==="HTML"?We.ownerDocument.body:We).removeChild(l.stateNode)}catch(m){Ie(l,r,m)}else try{We.removeChild(l.stateNode)}catch(m){Ie(l,r,m)}break;case 18:We!==null&&(Bt?(t=We,Fy(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),ca(t)):Fy(We,l.stateNode));break;case 4:o=We,d=Bt,We=l.stateNode.containerInfo,Bt=!0,rr(t,r,l),We=o,Bt=d;break;case 0:case 11:case 14:case 15:Tr(2,l,r),pt||Tr(4,l,r),rr(t,r,l);break;case 1:pt||(Dn(l,r),o=l.stateNode,typeof o.componentWillUnmount=="function"&&Vg(l,r,o)),rr(t,r,l);break;case 21:rr(t,r,l);break;case 22:pt=(o=pt)||l.memoizedState!==null,rr(t,r,l),pt=o;break;default:rr(t,r,l)}}function ey(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ca(t)}catch(l){Ie(r,r.return,l)}}}function ty(t,r){if(r.memoizedState===null&&(t=r.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ca(t)}catch(l){Ie(r,r.return,l)}}function ek(t){switch(t.tag){case 31:case 13:case 19:var r=t.stateNode;return r===null&&(r=t.stateNode=new Xg),r;case 22:return t=t.stateNode,r=t._retryCache,r===null&&(r=t._retryCache=new Xg),r;default:throw Error(a(435,t.tag))}}function Fs(t,r){var l=ek(t);r.forEach(function(o){if(!l.has(o)){l.add(o);var d=uk.bind(null,t,o);o.then(d,d)}})}function Pt(t,r){var l=r.deletions;if(l!==null)for(var o=0;o<l.length;o++){var d=l[o],m=t,S=r,E=S;e:for(;E!==null;){switch(E.tag){case 27:if(Lr(E.type)){We=E.stateNode,Bt=!1;break e}break;case 5:We=E.stateNode,Bt=!1;break e;case 3:case 4:We=E.stateNode.containerInfo,Bt=!0;break e}E=E.return}if(We===null)throw Error(a(160));Wg(m,S,d),We=null,Bt=!1,m=d.alternate,m!==null&&(m.return=null),d.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)ny(r,t),r=r.sibling}var Nn=null;function ny(t,r){var l=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Pt(r,t),Zt(t),o&4&&(Tr(3,t,t.return),sl(3,t),Tr(5,t,t.return));break;case 1:Pt(r,t),Zt(t),o&512&&(pt||l===null||Dn(l,l.return)),o&64&&nr&&(t=t.updateQueue,t!==null&&(o=t.callbacks,o!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?o:l.concat(o))));break;case 26:var d=Nn;if(Pt(r,t),Zt(t),o&512&&(pt||l===null||Dn(l,l.return)),o&4){var m=l!==null?l.memoizedState:null;if(o=t.memoizedState,l===null)if(o===null)if(t.stateNode===null){e:{o=t.type,l=t.memoizedProps,d=d.ownerDocument||d;t:switch(o){case"title":m=d.getElementsByTagName("title")[0],(!m||m[Ma]||m[Et]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=d.createElement(o),d.head.insertBefore(m,d.querySelector("head > title"))),jt(m,o,l),m[Et]=t,St(m),o=m;break e;case"link":var S=n0("link","href",d).get(o+(l.href||""));if(S){for(var E=0;E<S.length;E++)if(m=S[E],m.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&m.getAttribute("rel")===(l.rel==null?null:l.rel)&&m.getAttribute("title")===(l.title==null?null:l.title)&&m.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){S.splice(E,1);break t}}m=d.createElement(o),jt(m,o,l),d.head.appendChild(m);break;case"meta":if(S=n0("meta","content",d).get(o+(l.content||""))){for(E=0;E<S.length;E++)if(m=S[E],m.getAttribute("content")===(l.content==null?null:""+l.content)&&m.getAttribute("name")===(l.name==null?null:l.name)&&m.getAttribute("property")===(l.property==null?null:l.property)&&m.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&m.getAttribute("charset")===(l.charSet==null?null:l.charSet)){S.splice(E,1);break t}}m=d.createElement(o),jt(m,o,l),d.head.appendChild(m);break;default:throw Error(a(468,o))}m[Et]=t,St(m),o=m}t.stateNode=o}else r0(d,t.type,t.stateNode);else t.stateNode=t0(d,o,t.memoizedProps);else m!==o?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,o===null?r0(d,t.type,t.stateNode):t0(d,o,t.memoizedProps)):o===null&&t.stateNode!==null&&$c(t,t.memoizedProps,l.memoizedProps)}break;case 27:Pt(r,t),Zt(t),o&512&&(pt||l===null||Dn(l,l.return)),l!==null&&o&4&&$c(t,t.memoizedProps,l.memoizedProps);break;case 5:if(Pt(r,t),Zt(t),o&512&&(pt||l===null||Dn(l,l.return)),t.flags&32){d=t.stateNode;try{zi(d,"")}catch(fe){Ie(t,t.return,fe)}}o&4&&t.stateNode!=null&&(d=t.memoizedProps,$c(t,d,l!==null?l.memoizedProps:d)),o&1024&&(Bc=!0);break;case 6:if(Pt(r,t),Zt(t),o&4){if(t.stateNode===null)throw Error(a(162));o=t.memoizedProps,l=t.stateNode;try{l.nodeValue=o}catch(fe){Ie(t,t.return,fe)}}break;case 3:if(so=null,d=Nn,Nn=ao(r.containerInfo),Pt(r,t),Nn=d,Zt(t),o&4&&l!==null&&l.memoizedState.isDehydrated)try{ca(r.containerInfo)}catch(fe){Ie(t,t.return,fe)}Bc&&(Bc=!1,ry(t));break;case 4:o=Nn,Nn=ao(t.stateNode.containerInfo),Pt(r,t),Zt(t),Nn=o;break;case 12:Pt(r,t),Zt(t);break;case 31:Pt(r,t),Zt(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Fs(t,o)));break;case 13:Pt(r,t),Zt(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Gs=At()),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Fs(t,o)));break;case 22:d=t.memoizedState!==null;var z=l!==null&&l.memoizedState!==null,F=nr,K=pt;if(nr=F||d,pt=K||z,Pt(r,t),pt=K,nr=F,Zt(t),o&8192)e:for(r=t.stateNode,r._visibility=d?r._visibility&-2:r._visibility|1,d&&(l===null||z||nr||pt||ci(t)),l=null,r=t;;){if(r.tag===5||r.tag===26){if(l===null){z=l=r;try{if(m=z.stateNode,d)S=m.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{E=z.stateNode;var ne=z.memoizedProps.style,G=ne!=null&&ne.hasOwnProperty("display")?ne.display:null;E.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(fe){Ie(z,z.return,fe)}}}else if(r.tag===6){if(l===null){z=r;try{z.stateNode.nodeValue=d?"":z.memoizedProps}catch(fe){Ie(z,z.return,fe)}}}else if(r.tag===18){if(l===null){z=r;try{var Q=z.stateNode;d?Vy(Q,!0):Vy(z.stateNode,!1)}catch(fe){Ie(z,z.return,fe)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===t)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}o&4&&(o=t.updateQueue,o!==null&&(l=o.retryQueue,l!==null&&(o.retryQueue=null,Fs(t,l))));break;case 19:Pt(r,t),Zt(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Fs(t,o)));break;case 30:break;case 21:break;default:Pt(r,t),Zt(t)}}function Zt(t){var r=t.flags;if(r&2){try{for(var l,o=t.return;o!==null;){if(Qg(o)){l=o;break}o=o.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var d=l.stateNode,m=Ic(t);Hs(t,m,d);break;case 5:var S=l.stateNode;l.flags&32&&(zi(S,""),l.flags&=-33);var E=Ic(t);Hs(t,E,S);break;case 3:case 4:var z=l.stateNode.containerInfo,F=Ic(t);qc(t,F,z);break;default:throw Error(a(161))}}catch(K){Ie(t,t.return,K)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function ry(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var r=t;ry(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),t=t.sibling}}function ir(t,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Kg(t,r.alternate,r),r=r.sibling}function ci(t){for(t=t.child;t!==null;){var r=t;switch(r.tag){case 0:case 11:case 14:case 15:Tr(4,r,r.return),ci(r);break;case 1:Dn(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Vg(r,r.return,l),ci(r);break;case 27:yl(r.stateNode);case 26:case 5:Dn(r,r.return),ci(r);break;case 22:r.memoizedState===null&&ci(r);break;case 30:ci(r);break;default:ci(r)}t=t.sibling}}function ar(t,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var o=r.alternate,d=t,m=r,S=m.flags;switch(m.tag){case 0:case 11:case 15:ar(d,m,l),sl(4,m);break;case 1:if(ar(d,m,l),o=m,d=o.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(F){Ie(o,o.return,F)}if(o=m,d=o.updateQueue,d!==null){var E=o.stateNode;try{var z=d.shared.hiddenCallbacks;if(z!==null)for(d.shared.hiddenCallbacks=null,d=0;d<z.length;d++)Dm(z[d],E)}catch(F){Ie(o,o.return,F)}}l&&S&64&&Fg(m),ol(m,m.return);break;case 27:Yg(m);case 26:case 5:ar(d,m,l),l&&o===null&&S&4&&Gg(m),ol(m,m.return);break;case 12:ar(d,m,l);break;case 31:ar(d,m,l),l&&S&4&&ey(d,m);break;case 13:ar(d,m,l),l&&S&4&&ty(d,m);break;case 22:m.memoizedState===null&&ar(d,m,l),ol(m,m.return);break;case 30:break;default:ar(d,m,l)}r=r.sibling}}function Pc(t,r){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(t=r.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&Qa(l))}function Zc(t,r){t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Qa(t))}function jn(t,r,l,o){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)iy(t,r,l,o),r=r.sibling}function iy(t,r,l,o){var d=r.flags;switch(r.tag){case 0:case 11:case 15:jn(t,r,l,o),d&2048&&sl(9,r);break;case 1:jn(t,r,l,o);break;case 3:jn(t,r,l,o),d&2048&&(t=null,r.alternate!==null&&(t=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==t&&(r.refCount++,t!=null&&Qa(t)));break;case 12:if(d&2048){jn(t,r,l,o),t=r.stateNode;try{var m=r.memoizedProps,S=m.id,E=m.onPostCommit;typeof E=="function"&&E(S,r.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(z){Ie(r,r.return,z)}}else jn(t,r,l,o);break;case 31:jn(t,r,l,o);break;case 13:jn(t,r,l,o);break;case 23:break;case 22:m=r.stateNode,S=r.alternate,r.memoizedState!==null?m._visibility&2?jn(t,r,l,o):ul(t,r):m._visibility&2?jn(t,r,l,o):(m._visibility|=2,Wi(t,r,l,o,(r.subtreeFlags&10256)!==0||!1)),d&2048&&Pc(S,r);break;case 24:jn(t,r,l,o),d&2048&&Zc(r.alternate,r);break;default:jn(t,r,l,o)}}function Wi(t,r,l,o,d){for(d=d&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var m=t,S=r,E=l,z=o,F=S.flags;switch(S.tag){case 0:case 11:case 15:Wi(m,S,E,z,d),sl(8,S);break;case 23:break;case 22:var K=S.stateNode;S.memoizedState!==null?K._visibility&2?Wi(m,S,E,z,d):ul(m,S):(K._visibility|=2,Wi(m,S,E,z,d)),d&&F&2048&&Pc(S.alternate,S);break;case 24:Wi(m,S,E,z,d),d&&F&2048&&Zc(S.alternate,S);break;default:Wi(m,S,E,z,d)}r=r.sibling}}function ul(t,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=t,o=r,d=o.flags;switch(o.tag){case 22:ul(l,o),d&2048&&Pc(o.alternate,o);break;case 24:ul(l,o),d&2048&&Zc(o.alternate,o);break;default:ul(l,o)}r=r.sibling}}var cl=8192;function ea(t,r,l){if(t.subtreeFlags&cl)for(t=t.child;t!==null;)ay(t,r,l),t=t.sibling}function ay(t,r,l){switch(t.tag){case 26:ea(t,r,l),t.flags&cl&&t.memoizedState!==null&&qk(l,Nn,t.memoizedState,t.memoizedProps);break;case 5:ea(t,r,l);break;case 3:case 4:var o=Nn;Nn=ao(t.stateNode.containerInfo),ea(t,r,l),Nn=o;break;case 22:t.memoizedState===null&&(o=t.alternate,o!==null&&o.memoizedState!==null?(o=cl,cl=16777216,ea(t,r,l),cl=o):ea(t,r,l));break;default:ea(t,r,l)}}function ly(t){var r=t.alternate;if(r!==null&&(t=r.child,t!==null)){r.child=null;do r=t.sibling,t.sibling=null,t=r;while(t!==null)}}function fl(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var o=r[l];wt=o,oy(o,t)}ly(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)sy(t),t=t.sibling}function sy(t){switch(t.tag){case 0:case 11:case 15:fl(t),t.flags&2048&&Tr(9,t,t.return);break;case 3:fl(t);break;case 12:fl(t);break;case 22:var r=t.stateNode;t.memoizedState!==null&&r._visibility&2&&(t.return===null||t.return.tag!==13)?(r._visibility&=-3,Vs(t)):fl(t);break;default:fl(t)}}function Vs(t){var r=t.deletions;if((t.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var o=r[l];wt=o,oy(o,t)}ly(t)}for(t=t.child;t!==null;){switch(r=t,r.tag){case 0:case 11:case 15:Tr(8,r,r.return),Vs(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,Vs(r));break;default:Vs(r)}t=t.sibling}}function oy(t,r){for(;wt!==null;){var l=wt;switch(l.tag){case 0:case 11:case 15:Tr(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var o=l.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Qa(l.memoizedState.cache)}if(o=l.child,o!==null)o.return=l,wt=o;else e:for(l=t;wt!==null;){o=wt;var d=o.sibling,m=o.return;if(Jg(o),o===l){wt=null;break e}if(d!==null){d.return=m,wt=d;break e}wt=m}}}var tk={getCacheForType:function(t){var r=_t(ft),l=r.data.get(t);return l===void 0&&(l=t(),r.data.set(t,l)),l},cacheSignal:function(){return _t(ft).controller.signal}},nk=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ve=null,Ne=null,Re=0,$e=0,en=null,Rr=!1,ta=!1,Hc=!1,lr=0,lt=0,Ar=0,fi=0,Fc=0,tn=0,na=0,dl=null,Ht=null,Vc=!1,Gs=0,uy=0,Qs=1/0,Ys=null,Or=null,xt=0,zr=null,ra=null,sr=0,Gc=0,Qc=null,cy=null,hl=0,Yc=null;function nn(){return(Le&2)!==0&&Re!==0?Re&-Re:D.T!==null?tf():Np()}function fy(){if(tn===0)if((Re&536870912)===0||Oe){var t=rs;rs<<=1,(rs&3932160)===0&&(rs=262144),tn=t}else tn=536870912;return t=Jt.current,t!==null&&(t.flags|=32),tn}function Ft(t,r,l){(t===Ve&&($e===2||$e===9)||t.cancelPendingCommit!==null)&&(ia(t,0),Dr(t,Re,tn,!1)),Da(t,l),((Le&2)===0||t!==Ve)&&(t===Ve&&((Le&2)===0&&(fi|=l),lt===4&&Dr(t,Re,tn,!1)),Mn(t))}function dy(t,r,l){if((Le&6)!==0)throw Error(a(327));var o=!l&&(r&127)===0&&(r&t.expiredLanes)===0||za(t,r),d=o?ak(t,r):Kc(t,r,!0),m=o;do{if(d===0){ta&&!o&&Dr(t,r,0,!1);break}else{if(l=t.current.alternate,m&&!rk(l)){d=Kc(t,r,!1),m=!1;continue}if(d===2){if(m=r,t.errorRecoveryDisabledLanes&m)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){r=S;e:{var E=t;d=dl;var z=E.current.memoizedState.isDehydrated;if(z&&(ia(E,S).flags|=256),S=Kc(E,S,!1),S!==2){if(Hc&&!z){E.errorRecoveryDisabledLanes|=m,fi|=m,d=4;break e}m=Ht,Ht=d,m!==null&&(Ht===null?Ht=m:Ht.push.apply(Ht,m))}d=S}if(m=!1,d!==2)continue}}if(d===1){ia(t,0),Dr(t,r,0,!0);break}e:{switch(o=t,m=d,m){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Dr(o,r,tn,!Rr);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(d=Gs+300-At(),10<d)){if(Dr(o,r,tn,!Rr),as(o,0,!0)!==0)break e;sr=r,o.timeoutHandle=Zy(hy.bind(null,o,l,Ht,Ys,Vc,r,tn,fi,na,Rr,m,"Throttled",-0,0),d);break e}hy(o,l,Ht,Ys,Vc,r,tn,fi,na,Rr,m,null,-0,0)}}break}while(!0);Mn(t)}function hy(t,r,l,o,d,m,S,E,z,F,K,ne,G,Q){if(t.timeoutHandle=-1,ne=r.subtreeFlags,ne&8192||(ne&16785408)===16785408){ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vn},ay(r,m,ne);var fe=(m&62914560)===m?Gs-At():(m&4194048)===m?uy-At():0;if(fe=Bk(ne,fe),fe!==null){sr=m,t.cancelPendingCommit=fe(Sy.bind(null,t,r,m,l,o,d,S,E,z,K,ne,null,G,Q)),Dr(t,m,S,!F);return}}Sy(t,r,m,l,o,d,S,E,z)}function rk(t){for(var r=t;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var o=0;o<l.length;o++){var d=l[o],m=d.getSnapshot;d=d.value;try{if(!Xt(m(),d))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Dr(t,r,l,o){r&=~Fc,r&=~fi,t.suspendedLanes|=r,t.pingedLanes&=~r,o&&(t.warmLanes|=r),o=t.expirationTimes;for(var d=r;0<d;){var m=31-Fe(d),S=1<<m;o[m]=-1,d&=~S}l!==0&&Ep(t,l,r)}function Xs(){return(Le&6)===0?(pl(0),!1):!0}function Xc(){if(Ne!==null){if($e===0)var t=Ne.return;else t=Ne,Xn=ni=null,dc(t),Qi=null,Xa=0,t=Ne;for(;t!==null;)Hg(t.alternate,t),t=t.return;Ne=null}}function ia(t,r){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,Ek(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),sr=0,Xc(),Ve=t,Ne=l=Qn(t.current,null),Re=r,$e=0,en=null,Rr=!1,ta=za(t,r),Hc=!1,na=tn=Fc=fi=Ar=lt=0,Ht=dl=null,Vc=!1,(r&8)!==0&&(r|=r&32);var o=t.entangledLanes;if(o!==0)for(t=t.entanglements,o&=r;0<o;){var d=31-Fe(o),m=1<<d;r|=t[d],o&=~m}return lr=r,ys(),l}function py(t,r){Se=null,D.H=il,r===Gi||r===_s?(r=Rm(),$e=3):r===ec?(r=Rm(),$e=4):$e=r===Cc?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,en=r,Ne===null&&(lt=1,Is(t,dn(r,t.current)))}function my(){var t=Jt.current;return t===null?!0:(Re&4194048)===Re?gn===null:(Re&62914560)===Re||(Re&536870912)!==0?t===gn:!1}function gy(){var t=D.H;return D.H=il,t===null?il:t}function yy(){var t=D.A;return D.A=tk,t}function Ks(){lt=4,Rr||(Re&4194048)!==Re&&Jt.current!==null||(ta=!0),(Ar&134217727)===0&&(fi&134217727)===0||Ve===null||Dr(Ve,Re,tn,!1)}function Kc(t,r,l){var o=Le;Le|=2;var d=gy(),m=yy();(Ve!==t||Re!==r)&&(Ys=null,ia(t,r)),r=!1;var S=lt;e:do try{if($e!==0&&Ne!==null){var E=Ne,z=en;switch($e){case 8:Xc(),S=6;break e;case 3:case 2:case 9:case 6:Jt.current===null&&(r=!0);var F=$e;if($e=0,en=null,aa(t,E,z,F),l&&ta){S=0;break e}break;default:F=$e,$e=0,en=null,aa(t,E,z,F)}}ik(),S=lt;break}catch(K){py(t,K)}while(!0);return r&&t.shellSuspendCounter++,Xn=ni=null,Le=o,D.H=d,D.A=m,Ne===null&&(Ve=null,Re=0,ys()),S}function ik(){for(;Ne!==null;)vy(Ne)}function ak(t,r){var l=Le;Le|=2;var o=gy(),d=yy();Ve!==t||Re!==r?(Ys=null,Qs=At()+500,ia(t,r)):ta=za(t,r);e:do try{if($e!==0&&Ne!==null){r=Ne;var m=en;t:switch($e){case 1:$e=0,en=null,aa(t,r,m,1);break;case 2:case 9:if(Cm(m)){$e=0,en=null,xy(r);break}r=function(){$e!==2&&$e!==9||Ve!==t||($e=7),Mn(t)},m.then(r,r);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:Cm(m)?($e=0,en=null,xy(r)):($e=0,en=null,aa(t,r,m,7));break;case 5:var S=null;switch(Ne.tag){case 26:S=Ne.memoizedState;case 5:case 27:var E=Ne;if(S?i0(S):E.stateNode.complete){$e=0,en=null;var z=E.sibling;if(z!==null)Ne=z;else{var F=E.return;F!==null?(Ne=F,Js(F)):Ne=null}break t}}$e=0,en=null,aa(t,r,m,5);break;case 6:$e=0,en=null,aa(t,r,m,6);break;case 8:Xc(),lt=6;break e;default:throw Error(a(462))}}lk();break}catch(K){py(t,K)}while(!0);return Xn=ni=null,D.H=o,D.A=d,Le=l,Ne!==null?0:(Ve=null,Re=0,ys(),lt)}function lk(){for(;Ne!==null&&!cu();)vy(Ne)}function vy(t){var r=Pg(t.alternate,t,lr);t.memoizedProps=t.pendingProps,r===null?Js(t):Ne=r}function xy(t){var r=t,l=r.alternate;switch(r.tag){case 15:case 0:r=Lg(l,r,r.pendingProps,r.type,void 0,Re);break;case 11:r=Lg(l,r,r.pendingProps,r.type.render,r.ref,Re);break;case 5:dc(r);default:Hg(l,r),r=Ne=ym(r,lr),r=Pg(l,r,lr)}t.memoizedProps=t.pendingProps,r===null?Js(t):Ne=r}function aa(t,r,l,o){Xn=ni=null,dc(r),Qi=null,Xa=0;var d=r.return;try{if(QE(t,d,r,l,Re)){lt=1,Is(t,dn(l,t.current)),Ne=null;return}}catch(m){if(d!==null)throw Ne=d,m;lt=1,Is(t,dn(l,t.current)),Ne=null;return}r.flags&32768?(Oe||o===1?t=!0:ta||(Re&536870912)!==0?t=!1:(Rr=t=!0,(o===2||o===9||o===3||o===6)&&(o=Jt.current,o!==null&&o.tag===13&&(o.flags|=16384))),by(r,t)):Js(r)}function Js(t){var r=t;do{if((r.flags&32768)!==0){by(r,Rr);return}t=r.return;var l=KE(r.alternate,r,lr);if(l!==null){Ne=l;return}if(r=r.sibling,r!==null){Ne=r;return}Ne=r=t}while(r!==null);lt===0&&(lt=5)}function by(t,r){do{var l=JE(t.alternate,t);if(l!==null){l.flags&=32767,Ne=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(t=t.sibling,t!==null)){Ne=t;return}Ne=t=l}while(t!==null);lt=6,Ne=null}function Sy(t,r,l,o,d,m,S,E,z){t.cancelPendingCommit=null;do Ws();while(xt!==0);if((Le&6)!==0)throw Error(a(327));if(r!==null){if(r===t.current)throw Error(a(177));if(m=r.lanes|r.childLanes,m|=Iu,Iw(t,l,m,S,E,z),t===Ve&&(Ne=Ve=null,Re=0),ra=r,zr=t,sr=l,Gc=m,Qc=d,cy=o,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,ck(ve,function(){return Ny(),null})):(t.callbackNode=null,t.callbackPriority=0),o=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||o){o=D.T,D.T=null,d=B.p,B.p=2,S=Le,Le|=4;try{WE(t,r,l)}finally{Le=S,B.p=d,D.T=o}}xt=1,wy(),Ey(),ky()}}function wy(){if(xt===1){xt=0;var t=zr,r=ra,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var o=B.p;B.p=2;var d=Le;Le|=4;try{ny(r,t);var m=cf,S=om(t.containerInfo),E=m.focusedElem,z=m.selectionRange;if(S!==E&&E&&E.ownerDocument&&sm(E.ownerDocument.documentElement,E)){if(z!==null&&Du(E)){var F=z.start,K=z.end;if(K===void 0&&(K=F),"selectionStart"in E)E.selectionStart=F,E.selectionEnd=Math.min(K,E.value.length);else{var ne=E.ownerDocument||document,G=ne&&ne.defaultView||window;if(G.getSelection){var Q=G.getSelection(),fe=E.textContent.length,ye=Math.min(z.start,fe),He=z.end===void 0?ye:Math.min(z.end,fe);!Q.extend&&ye>He&&(S=He,He=ye,ye=S);var $=lm(E,ye),M=lm(E,He);if($&&M&&(Q.rangeCount!==1||Q.anchorNode!==$.node||Q.anchorOffset!==$.offset||Q.focusNode!==M.node||Q.focusOffset!==M.offset)){var P=ne.createRange();P.setStart($.node,$.offset),Q.removeAllRanges(),ye>He?(Q.addRange(P),Q.extend(M.node,M.offset)):(P.setEnd(M.node,M.offset),Q.addRange(P))}}}}for(ne=[],Q=E;Q=Q.parentNode;)Q.nodeType===1&&ne.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ne.length;E++){var W=ne[E];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}fo=!!uf,cf=uf=null}finally{Le=d,B.p=o,D.T=l}}t.current=r,xt=2}}function Ey(){if(xt===2){xt=0;var t=zr,r=ra,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var o=B.p;B.p=2;var d=Le;Le|=4;try{Kg(t,r.alternate,r)}finally{Le=d,B.p=o,D.T=l}}xt=3}}function ky(){if(xt===4||xt===3){xt=0,fu();var t=zr,r=ra,l=sr,o=cy;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?xt=5:(xt=0,ra=zr=null,_y(t,t.pendingLanes));var d=t.pendingLanes;if(d===0&&(Or=null),mu(l),r=r.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Ot,r,void 0,(r.current.flags&128)===128)}catch{}if(o!==null){r=D.T,d=B.p,B.p=2,D.T=null;try{for(var m=t.onRecoverableError,S=0;S<o.length;S++){var E=o[S];m(E.value,{componentStack:E.stack})}}finally{D.T=r,B.p=d}}(sr&3)!==0&&Ws(),Mn(t),d=t.pendingLanes,(l&261930)!==0&&(d&42)!==0?t===Yc?hl++:(hl=0,Yc=t):hl=0,pl(0)}}function _y(t,r){(t.pooledCacheLanes&=r)===0&&(r=t.pooledCache,r!=null&&(t.pooledCache=null,Qa(r)))}function Ws(){return wy(),Ey(),ky(),Ny()}function Ny(){if(xt!==5)return!1;var t=zr,r=Gc;Gc=0;var l=mu(sr),o=D.T,d=B.p;try{B.p=32>l?32:l,D.T=null,l=Qc,Qc=null;var m=zr,S=sr;if(xt=0,ra=zr=null,sr=0,(Le&6)!==0)throw Error(a(331));var E=Le;if(Le|=4,sy(m.current),iy(m,m.current,S,l),Le=E,pl(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Ot,m)}catch{}return!0}finally{B.p=d,D.T=o,_y(t,r)}}function jy(t,r,l){r=dn(l,r),r=jc(t.stateNode,r,2),t=Nr(t,r,2),t!==null&&(Da(t,2),Mn(t))}function Ie(t,r,l){if(t.tag===3)jy(t,t,l);else for(;r!==null;){if(r.tag===3){jy(r,t,l);break}else if(r.tag===1){var o=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Or===null||!Or.has(o))){t=dn(l,t),l=Cg(2),o=Nr(r,l,2),o!==null&&(Tg(l,o,r,t),Da(o,2),Mn(o));break}}r=r.return}}function Jc(t,r,l){var o=t.pingCache;if(o===null){o=t.pingCache=new nk;var d=new Set;o.set(r,d)}else d=o.get(r),d===void 0&&(d=new Set,o.set(r,d));d.has(l)||(Hc=!0,d.add(l),t=sk.bind(null,t,r,l),r.then(t,t))}function sk(t,r,l){var o=t.pingCache;o!==null&&o.delete(r),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Ve===t&&(Re&l)===l&&(lt===4||lt===3&&(Re&62914560)===Re&&300>At()-Gs?(Le&2)===0&&ia(t,0):Fc|=l,na===Re&&(na=0)),Mn(t)}function Cy(t,r){r===0&&(r=wp()),t=Wr(t,r),t!==null&&(Da(t,r),Mn(t))}function ok(t){var r=t.memoizedState,l=0;r!==null&&(l=r.retryLane),Cy(t,l)}function uk(t,r){var l=0;switch(t.tag){case 31:case 13:var o=t.stateNode,d=t.memoizedState;d!==null&&(l=d.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(r),Cy(t,l)}function ck(t,r){return Ni(t,r)}var eo=null,la=null,Wc=!1,to=!1,ef=!1,Mr=0;function Mn(t){t!==la&&t.next===null&&(la===null?eo=la=t:la=la.next=t),to=!0,Wc||(Wc=!0,dk())}function pl(t,r){if(!ef&&to){ef=!0;do for(var l=!1,o=eo;o!==null;){if(t!==0){var d=o.pendingLanes;if(d===0)var m=0;else{var S=o.suspendedLanes,E=o.pingedLanes;m=(1<<31-Fe(42|t)+1)-1,m&=d&~(S&~E),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,Oy(o,m))}else m=Re,m=as(o,o===Ve?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(m&3)===0||za(o,m)||(l=!0,Oy(o,m));o=o.next}while(l);ef=!1}}function fk(){Ty()}function Ty(){to=Wc=!1;var t=0;Mr!==0&&wk()&&(t=Mr);for(var r=At(),l=null,o=eo;o!==null;){var d=o.next,m=Ry(o,r);m===0?(o.next=null,l===null?eo=d:l.next=d,d===null&&(la=l)):(l=o,(t!==0||(m&3)!==0)&&(to=!0)),o=d}xt!==0&&xt!==5||pl(t),Mr!==0&&(Mr=0)}function Ry(t,r){for(var l=t.suspendedLanes,o=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var S=31-Fe(m),E=1<<S,z=d[S];z===-1?((E&l)===0||(E&o)!==0)&&(d[S]=$w(E,r)):z<=r&&(t.expiredLanes|=E),m&=~E}if(r=Ve,l=Re,l=as(t,t===r?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o=t.callbackNode,l===0||t===r&&($e===2||$e===9)||t.cancelPendingCommit!==null)return o!==null&&o!==null&&Oa(o),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||za(t,l)){if(r=l&-l,r===t.callbackPriority)return r;switch(o!==null&&Oa(o),mu(l)){case 2:case 8:l=oe;break;case 32:l=ve;break;case 268435456:l=Ue;break;default:l=ve}return o=Ay.bind(null,t),l=Ni(l,o),t.callbackPriority=r,t.callbackNode=l,r}return o!==null&&o!==null&&Oa(o),t.callbackPriority=2,t.callbackNode=null,2}function Ay(t,r){if(xt!==0&&xt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(Ws()&&t.callbackNode!==l)return null;var o=Re;return o=as(t,t===Ve?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o===0?null:(dy(t,o,r),Ry(t,At()),t.callbackNode!=null&&t.callbackNode===l?Ay.bind(null,t):null)}function Oy(t,r){if(Ws())return null;dy(t,r,!0)}function dk(){kk(function(){(Le&6)!==0?Ni(J,fk):Ty()})}function tf(){if(Mr===0){var t=Fi;t===0&&(t=ns,ns<<=1,(ns&261888)===0&&(ns=256)),Mr=t}return Mr}function zy(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:us(""+t)}function Dy(t,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,t.id&&l.setAttribute("form",t.id),r.parentNode.insertBefore(l,r),t=new FormData(t),l.parentNode.removeChild(l),t}function hk(t,r,l,o,d){if(r==="submit"&&l&&l.stateNode===d){var m=zy((d[It]||null).action),S=o.submitter;S&&(r=(r=S[It]||null)?zy(r.formAction):S.getAttribute("formAction"),r!==null&&(m=r,S=null));var E=new hs("action","action",null,o,d);t.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Mr!==0){var z=S?Dy(d,S):new FormData(d);Sc(l,{pending:!0,data:z,method:d.method,action:m},null,z)}}else typeof m=="function"&&(E.preventDefault(),z=S?Dy(d,S):new FormData(d),Sc(l,{pending:!0,data:z,method:d.method,action:m},m,z))},currentTarget:d}]})}}for(var nf=0;nf<$u.length;nf++){var rf=$u[nf],pk=rf.toLowerCase(),mk=rf[0].toUpperCase()+rf.slice(1);_n(pk,"on"+mk)}_n(fm,"onAnimationEnd"),_n(dm,"onAnimationIteration"),_n(hm,"onAnimationStart"),_n("dblclick","onDoubleClick"),_n("focusin","onFocus"),_n("focusout","onBlur"),_n(AE,"onTransitionRun"),_n(OE,"onTransitionStart"),_n(zE,"onTransitionCancel"),_n(pm,"onTransitionEnd"),Ai("onMouseEnter",["mouseout","mouseover"]),Ai("onMouseLeave",["mouseout","mouseover"]),Ai("onPointerEnter",["pointerout","pointerover"]),Ai("onPointerLeave",["pointerout","pointerover"]),Yr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Yr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Yr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Yr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Yr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Yr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ml="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(" "),gk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ml));function My(t,r){r=(r&4)!==0;for(var l=0;l<t.length;l++){var o=t[l],d=o.event;o=o.listeners;e:{var m=void 0;if(r)for(var S=o.length-1;0<=S;S--){var E=o[S],z=E.instance,F=E.currentTarget;if(E=E.listener,z!==m&&d.isPropagationStopped())break e;m=E,d.currentTarget=F;try{m(d)}catch(K){gs(K)}d.currentTarget=null,m=z}else for(S=0;S<o.length;S++){if(E=o[S],z=E.instance,F=E.currentTarget,E=E.listener,z!==m&&d.isPropagationStopped())break e;m=E,d.currentTarget=F;try{m(d)}catch(K){gs(K)}d.currentTarget=null,m=z}}}}function je(t,r){var l=r[gu];l===void 0&&(l=r[gu]=new Set);var o=t+"__bubble";l.has(o)||(Ly(r,t,2,!1),l.add(o))}function af(t,r,l){var o=0;r&&(o|=4),Ly(l,t,o,r)}var no="_reactListening"+Math.random().toString(36).slice(2);function lf(t){if(!t[no]){t[no]=!0,Tp.forEach(function(l){l!=="selectionchange"&&(gk.has(l)||af(l,!1,t),af(l,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[no]||(r[no]=!0,af("selectionchange",!1,r))}}function Ly(t,r,l,o){switch(f0(r)){case 2:var d=Hk;break;case 8:d=Fk;break;default:d=Sf}l=d.bind(null,r,l,t),d=void 0,!_u||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(d=!0),o?d!==void 0?t.addEventListener(r,l,{capture:!0,passive:d}):t.addEventListener(r,l,!0):d!==void 0?t.addEventListener(r,l,{passive:d}):t.addEventListener(r,l,!1)}function sf(t,r,l,o,d){var m=o;if((r&1)===0&&(r&2)===0&&o!==null)e:for(;;){if(o===null)return;var S=o.tag;if(S===3||S===4){var E=o.stateNode.containerInfo;if(E===d)break;if(S===4)for(S=o.return;S!==null;){var z=S.tag;if((z===3||z===4)&&S.stateNode.containerInfo===d)return;S=S.return}for(;E!==null;){if(S=Ci(E),S===null)return;if(z=S.tag,z===5||z===6||z===26||z===27){o=m=S;continue e}E=E.parentNode}}o=o.return}Bp(function(){var F=m,K=Eu(l),ne=[];e:{var G=mm.get(t);if(G!==void 0){var Q=hs,fe=t;switch(t){case"keypress":if(fs(l)===0)break e;case"keydown":case"keyup":Q=uE;break;case"focusin":fe="focus",Q=Tu;break;case"focusout":fe="blur",Q=Tu;break;case"beforeblur":case"afterblur":Q=Tu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=Hp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=Kw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=dE;break;case fm:case dm:case hm:Q=eE;break;case pm:Q=pE;break;case"scroll":case"scrollend":Q=Yw;break;case"wheel":Q=gE;break;case"copy":case"cut":case"paste":Q=nE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=Vp;break;case"toggle":case"beforetoggle":Q=vE}var ye=(r&4)!==0,He=!ye&&(t==="scroll"||t==="scrollend"),$=ye?G!==null?G+"Capture":null:G;ye=[];for(var M=F,P;M!==null;){var W=M;if(P=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||P===null||$===null||(W=Ua(M,$),W!=null&&ye.push(gl(M,W,P))),He)break;M=M.return}0<ye.length&&(G=new Q(G,fe,null,l,K),ne.push({event:G,listeners:ye}))}}if((r&7)===0){e:{if(G=t==="mouseover"||t==="pointerover",Q=t==="mouseout"||t==="pointerout",G&&l!==wu&&(fe=l.relatedTarget||l.fromElement)&&(Ci(fe)||fe[ji]))break e;if((Q||G)&&(G=K.window===K?K:(G=K.ownerDocument)?G.defaultView||G.parentWindow:window,Q?(fe=l.relatedTarget||l.toElement,Q=F,fe=fe?Ci(fe):null,fe!==null&&(He=u(fe),ye=fe.tag,fe!==He||ye!==5&&ye!==27&&ye!==6)&&(fe=null)):(Q=null,fe=F),Q!==fe)){if(ye=Hp,W="onMouseLeave",$="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(ye=Vp,W="onPointerLeave",$="onPointerEnter",M="pointer"),He=Q==null?G:La(Q),P=fe==null?G:La(fe),G=new ye(W,M+"leave",Q,l,K),G.target=He,G.relatedTarget=P,W=null,Ci(K)===F&&(ye=new ye($,M+"enter",fe,l,K),ye.target=P,ye.relatedTarget=He,W=ye),He=W,Q&&fe)t:{for(ye=yk,$=Q,M=fe,P=0,W=$;W;W=ye(W))P++;W=0;for(var pe=M;pe;pe=ye(pe))W++;for(;0<P-W;)$=ye($),P--;for(;0<W-P;)M=ye(M),W--;for(;P--;){if($===M||M!==null&&$===M.alternate){ye=$;break t}$=ye($),M=ye(M)}ye=null}else ye=null;Q!==null&&Uy(ne,G,Q,ye,!1),fe!==null&&He!==null&&Uy(ne,He,fe,ye,!0)}}e:{if(G=F?La(F):window,Q=G.nodeName&&G.nodeName.toLowerCase(),Q==="select"||Q==="input"&&G.type==="file")var De=em;else if(Jp(G))if(tm)De=CE;else{De=NE;var he=_E}else Q=G.nodeName,!Q||Q.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?F&&Su(F.elementType)&&(De=em):De=jE;if(De&&(De=De(t,F))){Wp(ne,De,l,K);break e}he&&he(t,G,F),t==="focusout"&&F&&G.type==="number"&&F.memoizedProps.value!=null&&bu(G,"number",G.value)}switch(he=F?La(F):window,t){case"focusin":(Jp(he)||he.contentEditable==="true")&&(Ui=he,Mu=F,Fa=null);break;case"focusout":Fa=Mu=Ui=null;break;case"mousedown":Lu=!0;break;case"contextmenu":case"mouseup":case"dragend":Lu=!1,um(ne,l,K);break;case"selectionchange":if(RE)break;case"keydown":case"keyup":um(ne,l,K)}var we;if(Au)e:{switch(t){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else Li?Xp(t,l)&&(Ae="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(Ae="onCompositionStart");Ae&&(Gp&&l.locale!=="ko"&&(Li||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&Li&&(we=Pp()):(xr=K,Nu="value"in xr?xr.value:xr.textContent,Li=!0)),he=ro(F,Ae),0<he.length&&(Ae=new Fp(Ae,t,null,l,K),ne.push({event:Ae,listeners:he}),we?Ae.data=we:(we=Kp(l),we!==null&&(Ae.data=we)))),(we=bE?SE(t,l):wE(t,l))&&(Ae=ro(F,"onBeforeInput"),0<Ae.length&&(he=new Fp("onBeforeInput","beforeinput",null,l,K),ne.push({event:he,listeners:Ae}),he.data=we)),hk(ne,t,F,l,K)}My(ne,r)})}function gl(t,r,l){return{instance:t,listener:r,currentTarget:l}}function ro(t,r){for(var l=r+"Capture",o=[];t!==null;){var d=t,m=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||m===null||(d=Ua(t,l),d!=null&&o.unshift(gl(t,d,m)),d=Ua(t,r),d!=null&&o.push(gl(t,d,m))),t.tag===3)return o;t=t.return}return[]}function yk(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Uy(t,r,l,o,d){for(var m=r._reactName,S=[];l!==null&&l!==o;){var E=l,z=E.alternate,F=E.stateNode;if(E=E.tag,z!==null&&z===o)break;E!==5&&E!==26&&E!==27||F===null||(z=F,d?(F=Ua(l,m),F!=null&&S.unshift(gl(l,F,z))):d||(F=Ua(l,m),F!=null&&S.push(gl(l,F,z)))),l=l.return}S.length!==0&&t.push({event:r,listeners:S})}var vk=/\r\n?/g,xk=/\u0000|\uFFFD/g;function $y(t){return(typeof t=="string"?t:""+t).replace(vk,`
9
+ `).replace(xk,"")}function Iy(t,r){return r=$y(r),$y(t)===r}function Ze(t,r,l,o,d,m){switch(l){case"children":typeof o=="string"?r==="body"||r==="textarea"&&o===""||zi(t,o):(typeof o=="number"||typeof o=="bigint")&&r!=="body"&&zi(t,""+o);break;case"className":ss(t,"class",o);break;case"tabIndex":ss(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":ss(t,l,o);break;case"style":Ip(t,o,m);break;case"data":if(r!=="object"){ss(t,"data",o);break}case"src":case"href":if(o===""&&(r!=="a"||l!=="href")){t.removeAttribute(l);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(l);break}o=us(""+o),t.setAttribute(l,o);break;case"action":case"formAction":if(typeof o=="function"){t.setAttribute(l,"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 m=="function"&&(l==="formAction"?(r!=="input"&&Ze(t,r,"name",d.name,d,null),Ze(t,r,"formEncType",d.formEncType,d,null),Ze(t,r,"formMethod",d.formMethod,d,null),Ze(t,r,"formTarget",d.formTarget,d,null)):(Ze(t,r,"encType",d.encType,d,null),Ze(t,r,"method",d.method,d,null),Ze(t,r,"target",d.target,d,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(l);break}o=us(""+o),t.setAttribute(l,o);break;case"onClick":o!=null&&(t.onclick=Vn);break;case"onScroll":o!=null&&je("scroll",t);break;case"onScrollEnd":o!=null&&je("scrollend",t);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(l=o.__html,l!=null){if(d.children!=null)throw Error(a(60));t.innerHTML=l}}break;case"multiple":t.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":t.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){t.removeAttribute("xlink:href");break}l=us(""+o),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(l,""+o):t.removeAttribute(l);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":o&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":o===!0?t.setAttribute(l,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(l,o):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?t.setAttribute(l,o):t.removeAttribute(l);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?t.removeAttribute(l):t.setAttribute(l,o);break;case"popover":je("beforetoggle",t),je("toggle",t),ls(t,"popover",o);break;case"xlinkActuate":Fn(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Fn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Fn(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Fn(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Fn(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Fn(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Fn(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Fn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Fn(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":ls(t,"is",o);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Gw.get(l)||l,ls(t,l,o))}}function of(t,r,l,o,d,m){switch(l){case"style":Ip(t,o,m);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(l=o.__html,l!=null){if(d.children!=null)throw Error(a(60));t.innerHTML=l}}break;case"children":typeof o=="string"?zi(t,o):(typeof o=="number"||typeof o=="bigint")&&zi(t,""+o);break;case"onScroll":o!=null&&je("scroll",t);break;case"onScrollEnd":o!=null&&je("scrollend",t);break;case"onClick":o!=null&&(t.onclick=Vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rp.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(d=l.endsWith("Capture"),r=l.slice(2,d?l.length-7:void 0),m=t[It]||null,m=m!=null?m[l]:null,typeof m=="function"&&t.removeEventListener(r,m,d),typeof o=="function")){typeof m!="function"&&m!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(r,o,d);break e}l in t?t[l]=o:o===!0?t.setAttribute(l,""):ls(t,l,o)}}}function jt(t,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",t),je("load",t);var o=!1,d=!1,m;for(m in l)if(l.hasOwnProperty(m)){var S=l[m];if(S!=null)switch(m){case"src":o=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Ze(t,r,m,S,l,null)}}d&&Ze(t,r,"srcSet",l.srcSet,l,null),o&&Ze(t,r,"src",l.src,l,null);return;case"input":je("invalid",t);var E=m=S=d=null,z=null,F=null;for(o in l)if(l.hasOwnProperty(o)){var K=l[o];if(K!=null)switch(o){case"name":d=K;break;case"type":S=K;break;case"checked":z=K;break;case"defaultChecked":F=K;break;case"value":m=K;break;case"defaultValue":E=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(a(137,r));break;default:Ze(t,r,o,K,l,null)}}Mp(t,m,E,z,F,S,d,!1);return;case"select":je("invalid",t),o=S=m=null;for(d in l)if(l.hasOwnProperty(d)&&(E=l[d],E!=null))switch(d){case"value":m=E;break;case"defaultValue":S=E;break;case"multiple":o=E;default:Ze(t,r,d,E,l,null)}r=m,l=S,t.multiple=!!o,r!=null?Oi(t,!!o,r,!1):l!=null&&Oi(t,!!o,l,!0);return;case"textarea":je("invalid",t),m=d=o=null;for(S in l)if(l.hasOwnProperty(S)&&(E=l[S],E!=null))switch(S){case"value":o=E;break;case"defaultValue":d=E;break;case"children":m=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(a(91));break;default:Ze(t,r,S,E,l,null)}Up(t,o,d,m);return;case"option":for(z in l)l.hasOwnProperty(z)&&(o=l[z],o!=null)&&(z==="selected"?t.selected=o&&typeof o!="function"&&typeof o!="symbol":Ze(t,r,z,o,l,null));return;case"dialog":je("beforetoggle",t),je("toggle",t),je("cancel",t),je("close",t);break;case"iframe":case"object":je("load",t);break;case"video":case"audio":for(o=0;o<ml.length;o++)je(ml[o],t);break;case"image":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"embed":case"source":case"link":je("error",t),je("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(F in l)if(l.hasOwnProperty(F)&&(o=l[F],o!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:Ze(t,r,F,o,l,null)}return;default:if(Su(r)){for(K in l)l.hasOwnProperty(K)&&(o=l[K],o!==void 0&&of(t,r,K,o,l,void 0));return}}for(E in l)l.hasOwnProperty(E)&&(o=l[E],o!=null&&Ze(t,r,E,o,l,null))}function bk(t,r,l,o){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,m=null,S=null,E=null,z=null,F=null,K=null;for(Q in l){var ne=l[Q];if(l.hasOwnProperty(Q)&&ne!=null)switch(Q){case"checked":break;case"value":break;case"defaultValue":z=ne;default:o.hasOwnProperty(Q)||Ze(t,r,Q,null,o,ne)}}for(var G in o){var Q=o[G];if(ne=l[G],o.hasOwnProperty(G)&&(Q!=null||ne!=null))switch(G){case"type":m=Q;break;case"name":d=Q;break;case"checked":F=Q;break;case"defaultChecked":K=Q;break;case"value":S=Q;break;case"defaultValue":E=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(a(137,r));break;default:Q!==ne&&Ze(t,r,G,Q,o,ne)}}xu(t,S,E,z,F,K,m,d);return;case"select":Q=S=E=G=null;for(m in l)if(z=l[m],l.hasOwnProperty(m)&&z!=null)switch(m){case"value":break;case"multiple":Q=z;default:o.hasOwnProperty(m)||Ze(t,r,m,null,o,z)}for(d in o)if(m=o[d],z=l[d],o.hasOwnProperty(d)&&(m!=null||z!=null))switch(d){case"value":G=m;break;case"defaultValue":E=m;break;case"multiple":S=m;default:m!==z&&Ze(t,r,d,m,o,z)}r=E,l=S,o=Q,G!=null?Oi(t,!!l,G,!1):!!o!=!!l&&(r!=null?Oi(t,!!l,r,!0):Oi(t,!!l,l?[]:"",!1));return;case"textarea":Q=G=null;for(E in l)if(d=l[E],l.hasOwnProperty(E)&&d!=null&&!o.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Ze(t,r,E,null,o,d)}for(S in o)if(d=o[S],m=l[S],o.hasOwnProperty(S)&&(d!=null||m!=null))switch(S){case"value":G=d;break;case"defaultValue":Q=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(a(91));break;default:d!==m&&Ze(t,r,S,d,o,m)}Lp(t,G,Q);return;case"option":for(var fe in l)G=l[fe],l.hasOwnProperty(fe)&&G!=null&&!o.hasOwnProperty(fe)&&(fe==="selected"?t.selected=!1:Ze(t,r,fe,null,o,G));for(z in o)G=o[z],Q=l[z],o.hasOwnProperty(z)&&G!==Q&&(G!=null||Q!=null)&&(z==="selected"?t.selected=G&&typeof G!="function"&&typeof G!="symbol":Ze(t,r,z,G,o,Q));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 ye in l)G=l[ye],l.hasOwnProperty(ye)&&G!=null&&!o.hasOwnProperty(ye)&&Ze(t,r,ye,null,o,G);for(F in o)if(G=o[F],Q=l[F],o.hasOwnProperty(F)&&G!==Q&&(G!=null||Q!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(a(137,r));break;default:Ze(t,r,F,G,o,Q)}return;default:if(Su(r)){for(var He in l)G=l[He],l.hasOwnProperty(He)&&G!==void 0&&!o.hasOwnProperty(He)&&of(t,r,He,void 0,o,G);for(K in o)G=o[K],Q=l[K],!o.hasOwnProperty(K)||G===Q||G===void 0&&Q===void 0||of(t,r,K,G,o,Q);return}}for(var $ in l)G=l[$],l.hasOwnProperty($)&&G!=null&&!o.hasOwnProperty($)&&Ze(t,r,$,null,o,G);for(ne in o)G=o[ne],Q=l[ne],!o.hasOwnProperty(ne)||G===Q||G==null&&Q==null||Ze(t,r,ne,G,o,Q)}function qy(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Sk(){if(typeof performance.getEntriesByType=="function"){for(var t=0,r=0,l=performance.getEntriesByType("resource"),o=0;o<l.length;o++){var d=l[o],m=d.transferSize,S=d.initiatorType,E=d.duration;if(m&&E&&qy(S)){for(S=0,E=d.responseEnd,o+=1;o<l.length;o++){var z=l[o],F=z.startTime;if(F>E)break;var K=z.transferSize,ne=z.initiatorType;K&&qy(ne)&&(z=z.responseEnd,S+=K*(z<E?1:(E-F)/(z-F)))}if(--o,r+=8*(m+S)/(d.duration/1e3),t++,10<t)break}}if(0<t)return r/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var uf=null,cf=null;function io(t){return t.nodeType===9?t:t.ownerDocument}function By(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Py(t,r){if(t===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&r==="foreignObject"?0:t}function ff(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var df=null;function wk(){var t=window.event;return t&&t.type==="popstate"?t===df?!1:(df=t,!0):(df=null,!1)}var Zy=typeof setTimeout=="function"?setTimeout:void 0,Ek=typeof clearTimeout=="function"?clearTimeout:void 0,Hy=typeof Promise=="function"?Promise:void 0,kk=typeof queueMicrotask=="function"?queueMicrotask:typeof Hy<"u"?function(t){return Hy.resolve(null).then(t).catch(_k)}:Zy;function _k(t){setTimeout(function(){throw t})}function Lr(t){return t==="head"}function Fy(t,r){var l=r,o=0;do{var d=l.nextSibling;if(t.removeChild(l),d&&d.nodeType===8)if(l=d.data,l==="/$"||l==="/&"){if(o===0){t.removeChild(d),ca(r);return}o--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")o++;else if(l==="html")yl(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,yl(l);for(var m=l.firstChild;m;){var S=m.nextSibling,E=m.nodeName;m[Ma]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=S}}else l==="body"&&yl(t.ownerDocument.body);l=d}while(l);ca(r)}function Vy(t,r){var l=t;t=0;do{var o=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),o&&o.nodeType===8)if(l=o.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=o}while(l)}function hf(t){var r=t.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":hf(l),yu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function Nk(t,r,l,o){for(;t.nodeType===1;){var d=l;if(t.nodeName.toLowerCase()!==r.toLowerCase()){if(!o&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(o){if(!t[Ma])switch(r){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==d.rel||t.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||t.getAttribute("title")!==(d.title==null?null:d.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(d.src==null?null:d.src)||t.getAttribute("type")!==(d.type==null?null:d.type)||t.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(r==="input"&&t.type==="hidden"){var m=d.name==null?null:""+d.name;if(d.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=yn(t.nextSibling),t===null)break}return null}function jk(t,r,l){if(r==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=yn(t.nextSibling),t===null))return null;return t}function Gy(t,r){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!r||(t=yn(t.nextSibling),t===null))return null;return t}function pf(t){return t.data==="$?"||t.data==="$~"}function mf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Ck(t,r){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=r;else if(t.data!=="$?"||l.readyState!=="loading")r();else{var o=function(){r(),l.removeEventListener("DOMContentLoaded",o)};l.addEventListener("DOMContentLoaded",o),t._reactRetry=o}}function yn(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return t}var gf=null;function Qy(t){t=t.nextSibling;for(var r=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(r===0)return yn(t.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}t=t.nextSibling}return null}function Yy(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return t;r--}else l!=="/$"&&l!=="/&"||r++}t=t.previousSibling}return null}function Xy(t,r,l){switch(r=io(l),t){case"html":if(t=r.documentElement,!t)throw Error(a(452));return t;case"head":if(t=r.head,!t)throw Error(a(453));return t;case"body":if(t=r.body,!t)throw Error(a(454));return t;default:throw Error(a(451))}}function yl(t){for(var r=t.attributes;r.length;)t.removeAttributeNode(r[0]);yu(t)}var vn=new Map,Ky=new Set;function ao(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var or=B.d;B.d={f:Tk,r:Rk,D:Ak,C:Ok,L:zk,m:Dk,X:Lk,S:Mk,M:Uk};function Tk(){var t=or.f(),r=Xs();return t||r}function Rk(t){var r=Ti(t);r!==null&&r.tag===5&&r.type==="form"?pg(r):or.r(t)}var sa=typeof document>"u"?null:document;function Jy(t,r,l){var o=sa;if(o&&typeof r=="string"&&r){var d=cn(r);d='link[rel="'+t+'"][href="'+d+'"]',typeof l=="string"&&(d+='[crossorigin="'+l+'"]'),Ky.has(d)||(Ky.add(d),t={rel:t,crossOrigin:l,href:r},o.querySelector(d)===null&&(r=o.createElement("link"),jt(r,"link",t),St(r),o.head.appendChild(r)))}}function Ak(t){or.D(t),Jy("dns-prefetch",t,null)}function Ok(t,r){or.C(t,r),Jy("preconnect",t,r)}function zk(t,r,l){or.L(t,r,l);var o=sa;if(o&&t&&r){var d='link[rel="preload"][as="'+cn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(d+='[imagesrcset="'+cn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(d+='[imagesizes="'+cn(l.imageSizes)+'"]')):d+='[href="'+cn(t)+'"]';var m=d;switch(r){case"style":m=oa(t);break;case"script":m=ua(t)}vn.has(m)||(t=y({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:t,as:r},l),vn.set(m,t),o.querySelector(d)!==null||r==="style"&&o.querySelector(vl(m))||r==="script"&&o.querySelector(xl(m))||(r=o.createElement("link"),jt(r,"link",t),St(r),o.head.appendChild(r)))}}function Dk(t,r){or.m(t,r);var l=sa;if(l&&t){var o=r&&typeof r.as=="string"?r.as:"script",d='link[rel="modulepreload"][as="'+cn(o)+'"][href="'+cn(t)+'"]',m=d;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=ua(t)}if(!vn.has(m)&&(t=y({rel:"modulepreload",href:t},r),vn.set(m,t),l.querySelector(d)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(xl(m)))return}o=l.createElement("link"),jt(o,"link",t),St(o),l.head.appendChild(o)}}}function Mk(t,r,l){or.S(t,r,l);var o=sa;if(o&&t){var d=Ri(o).hoistableStyles,m=oa(t);r=r||"default";var S=d.get(m);if(!S){var E={loading:0,preload:null};if(S=o.querySelector(vl(m)))E.loading=5;else{t=y({rel:"stylesheet",href:t,"data-precedence":r},l),(l=vn.get(m))&&yf(t,l);var z=S=o.createElement("link");St(z),jt(z,"link",t),z._p=new Promise(function(F,K){z.onload=F,z.onerror=K}),z.addEventListener("load",function(){E.loading|=1}),z.addEventListener("error",function(){E.loading|=2}),E.loading|=4,lo(S,r,o)}S={type:"stylesheet",instance:S,count:1,state:E},d.set(m,S)}}}function Lk(t,r){or.X(t,r);var l=sa;if(l&&t){var o=Ri(l).hoistableScripts,d=ua(t),m=o.get(d);m||(m=l.querySelector(xl(d)),m||(t=y({src:t,async:!0},r),(r=vn.get(d))&&vf(t,r),m=l.createElement("script"),St(m),jt(m,"link",t),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(d,m))}}function Uk(t,r){or.M(t,r);var l=sa;if(l&&t){var o=Ri(l).hoistableScripts,d=ua(t),m=o.get(d);m||(m=l.querySelector(xl(d)),m||(t=y({src:t,async:!0,type:"module"},r),(r=vn.get(d))&&vf(t,r),m=l.createElement("script"),St(m),jt(m,"link",t),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(d,m))}}function Wy(t,r,l,o){var d=(d=de.current)?ao(d):null;if(!d)throw Error(a(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=oa(l.href),l=Ri(d).hoistableStyles,o=l.get(r),o||(o={type:"style",instance:null,count:0,state:null},l.set(r,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=oa(l.href);var m=Ri(d).hoistableStyles,S=m.get(t);if(S||(d=d.ownerDocument||d,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,S),(m=d.querySelector(vl(t)))&&!m._p&&(S.instance=m,S.state.loading=5),vn.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},vn.set(t,l),m||$k(d,t,l,S.state))),r&&o===null)throw Error(a(528,""));return S}if(r&&o!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=ua(l),l=Ri(d).hoistableScripts,o=l.get(r),o||(o={type:"script",instance:null,count:0,state:null},l.set(r,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,t))}}function oa(t){return'href="'+cn(t)+'"'}function vl(t){return'link[rel="stylesheet"]['+t+"]"}function e0(t){return y({},t,{"data-precedence":t.precedence,precedence:null})}function $k(t,r,l,o){t.querySelector('link[rel="preload"][as="style"]['+r+"]")?o.loading=1:(r=t.createElement("link"),o.preload=r,r.addEventListener("load",function(){return o.loading|=1}),r.addEventListener("error",function(){return o.loading|=2}),jt(r,"link",l),St(r),t.head.appendChild(r))}function ua(t){return'[src="'+cn(t)+'"]'}function xl(t){return"script[async]"+t}function t0(t,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var o=t.querySelector('style[data-href~="'+cn(l.href)+'"]');if(o)return r.instance=o,St(o),o;var d=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),St(o),jt(o,"style",d),lo(o,l.precedence,t),r.instance=o;case"stylesheet":d=oa(l.href);var m=t.querySelector(vl(d));if(m)return r.state.loading|=4,r.instance=m,St(m),m;o=e0(l),(d=vn.get(d))&&yf(o,d),m=(t.ownerDocument||t).createElement("link"),St(m);var S=m;return S._p=new Promise(function(E,z){S.onload=E,S.onerror=z}),jt(m,"link",o),r.state.loading|=4,lo(m,l.precedence,t),r.instance=m;case"script":return m=ua(l.src),(d=t.querySelector(xl(m)))?(r.instance=d,St(d),d):(o=l,(d=vn.get(m))&&(o=y({},l),vf(o,d)),t=t.ownerDocument||t,d=t.createElement("script"),St(d),jt(d,"link",o),t.head.appendChild(d),r.instance=d);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(o=r.instance,r.state.loading|=4,lo(o,l.precedence,t));return r.instance}function lo(t,r,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=o.length?o[o.length-1]:null,m=d,S=0;S<o.length;S++){var E=o[S];if(E.dataset.precedence===r)m=E;else if(m!==d)break}m?m.parentNode.insertBefore(t,m.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(t,r.firstChild))}function yf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.title==null&&(t.title=r.title)}function vf(t,r){t.crossOrigin==null&&(t.crossOrigin=r.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=r.referrerPolicy),t.integrity==null&&(t.integrity=r.integrity)}var so=null;function n0(t,r,l){if(so===null){var o=new Map,d=so=new Map;d.set(l,o)}else d=so,o=d.get(l),o||(o=new Map,d.set(l,o));if(o.has(t))return o;for(o.set(t,null),l=l.getElementsByTagName(t),d=0;d<l.length;d++){var m=l[d];if(!(m[Ma]||m[Et]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var S=m.getAttribute(r)||"";S=t+S;var E=o.get(S);E?E.push(m):o.set(S,[m])}}return o}function r0(t,r,l){t=t.ownerDocument||t,t.head.insertBefore(l,r==="title"?t.querySelector("head > title"):null)}function Ik(t,r,l){if(l===1||r.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(t=r.disabled,typeof r.precedence=="string"&&t==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function i0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function qk(t,r,l,o){if(l.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var d=oa(o.href),m=r.querySelector(vl(d));if(m){r=m._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(t.count++,t=oo.bind(t),r.then(t,t)),l.state.loading|=4,l.instance=m,St(m);return}m=r.ownerDocument||r,o=e0(o),(d=vn.get(d))&&yf(o,d),m=m.createElement("link"),St(m);var S=m;S._p=new Promise(function(E,z){S.onload=E,S.onerror=z}),jt(m,"link",o),l.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=oo.bind(t),r.addEventListener("load",l),r.addEventListener("error",l))}}var xf=0;function Bk(t,r){return t.stylesheets&&t.count===0&&co(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var o=setTimeout(function(){if(t.stylesheets&&co(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+r);0<t.imgBytes&&xf===0&&(xf=62500*Sk());var d=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&co(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>xf?50:800)+r);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(d)}}:null}function oo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)co(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var uo=null;function co(t,r){t.stylesheets=null,t.unsuspend!==null&&(t.count++,uo=new Map,r.forEach(Pk,t),uo=null,oo.call(t))}function Pk(t,r){if(!(r.state.loading&4)){var l=uo.get(t);if(l)var o=l.get(null);else{l=new Map,uo.set(t,l);for(var d=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<d.length;m++){var S=d[m];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(l.set(S.dataset.precedence,S),o=S)}o&&l.set(null,o)}d=r.instance,S=d.getAttribute("data-precedence"),m=l.get(S)||o,m===o&&l.set(null,d),l.set(S,d),this.count++,o=oo.bind(this),d.addEventListener("load",o),d.addEventListener("error",o),m?m.parentNode.insertBefore(d,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(d,t.firstChild)),r.state.loading|=4}}var bl={$$typeof:T,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function Zk(t,r,l,o,d,m,S,E,z){this.tag=1,this.containerInfo=t,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=hu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hu(0),this.hiddenUpdates=hu(null),this.identifierPrefix=o,this.onUncaughtError=d,this.onCaughtError=m,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function a0(t,r,l,o,d,m,S,E,z,F,K,ne){return t=new Zk(t,r,l,S,z,F,K,ne,E),r=1,m===!0&&(r|=24),m=Kt(3,null,null,r),t.current=m,m.stateNode=t,r=Ku(),r.refCount++,t.pooledCache=r,r.refCount++,m.memoizedState={element:o,isDehydrated:l,cache:r},tc(m),t}function l0(t){return t?(t=qi,t):qi}function s0(t,r,l,o,d,m){d=l0(d),o.context===null?o.context=d:o.pendingContext=d,o=_r(r),o.payload={element:l},m=m===void 0?null:m,m!==null&&(o.callback=m),l=Nr(t,o,r),l!==null&&(Ft(l,t,r),Ja(l,t,r))}function o0(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<r?l:r}}function bf(t,r){o0(t,r),(t=t.alternate)&&o0(t,r)}function u0(t){if(t.tag===13||t.tag===31){var r=Wr(t,67108864);r!==null&&Ft(r,t,67108864),bf(t,67108864)}}function c0(t){if(t.tag===13||t.tag===31){var r=nn();r=pu(r);var l=Wr(t,r);l!==null&&Ft(l,t,r),bf(t,r)}}var fo=!0;function Hk(t,r,l,o){var d=D.T;D.T=null;var m=B.p;try{B.p=2,Sf(t,r,l,o)}finally{B.p=m,D.T=d}}function Fk(t,r,l,o){var d=D.T;D.T=null;var m=B.p;try{B.p=8,Sf(t,r,l,o)}finally{B.p=m,D.T=d}}function Sf(t,r,l,o){if(fo){var d=wf(o);if(d===null)sf(t,r,o,ho,l),d0(t,o);else if(Gk(d,t,r,l,o))o.stopPropagation();else if(d0(t,o),r&4&&-1<Vk.indexOf(t)){for(;d!==null;){var m=Ti(d);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var S=Qr(m.pendingLanes);if(S!==0){var E=m;for(E.pendingLanes|=2,E.entangledLanes|=2;S;){var z=1<<31-Fe(S);E.entanglements[1]|=z,S&=~z}Mn(m),(Le&6)===0&&(Qs=At()+500,pl(0))}}break;case 31:case 13:E=Wr(m,2),E!==null&&Ft(E,m,2),Xs(),bf(m,2)}if(m=wf(o),m===null&&sf(t,r,o,ho,l),m===d)break;d=m}d!==null&&o.stopPropagation()}else sf(t,r,o,null,l)}}function wf(t){return t=Eu(t),Ef(t)}var ho=null;function Ef(t){if(ho=null,t=Ci(t),t!==null){var r=u(t);if(r===null)t=null;else{var l=r.tag;if(l===13){if(t=c(r),t!==null)return t;t=null}else if(l===31){if(t=f(r),t!==null)return t;t=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null)}}return ho=t,null}function f0(t){switch(t){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(du()){case J:return 2;case oe:return 8;case ve:case _e:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var kf=!1,Ur=null,$r=null,Ir=null,Sl=new Map,wl=new Map,qr=[],Vk="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 d0(t,r){switch(t){case"focusin":case"focusout":Ur=null;break;case"dragenter":case"dragleave":$r=null;break;case"mouseover":case"mouseout":Ir=null;break;case"pointerover":case"pointerout":Sl.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":wl.delete(r.pointerId)}}function El(t,r,l,o,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:l,eventSystemFlags:o,nativeEvent:m,targetContainers:[d]},r!==null&&(r=Ti(r),r!==null&&u0(r)),t):(t.eventSystemFlags|=o,r=t.targetContainers,d!==null&&r.indexOf(d)===-1&&r.push(d),t)}function Gk(t,r,l,o,d){switch(r){case"focusin":return Ur=El(Ur,t,r,l,o,d),!0;case"dragenter":return $r=El($r,t,r,l,o,d),!0;case"mouseover":return Ir=El(Ir,t,r,l,o,d),!0;case"pointerover":var m=d.pointerId;return Sl.set(m,El(Sl.get(m)||null,t,r,l,o,d)),!0;case"gotpointercapture":return m=d.pointerId,wl.set(m,El(wl.get(m)||null,t,r,l,o,d)),!0}return!1}function h0(t){var r=Ci(t.target);if(r!==null){var l=u(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){t.blockedOn=r,jp(t.priority,function(){c0(l)});return}}else if(r===31){if(r=f(l),r!==null){t.blockedOn=r,jp(t.priority,function(){c0(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function po(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var l=wf(t.nativeEvent);if(l===null){l=t.nativeEvent;var o=new l.constructor(l.type,l);wu=o,l.target.dispatchEvent(o),wu=null}else return r=Ti(l),r!==null&&u0(r),t.blockedOn=l,!1;r.shift()}return!0}function p0(t,r,l){po(t)&&l.delete(r)}function Qk(){kf=!1,Ur!==null&&po(Ur)&&(Ur=null),$r!==null&&po($r)&&($r=null),Ir!==null&&po(Ir)&&(Ir=null),Sl.forEach(p0),wl.forEach(p0)}function mo(t,r){t.blockedOn===r&&(t.blockedOn=null,kf||(kf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Qk)))}var go=null;function m0(t){go!==t&&(go=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){go===t&&(go=null);for(var r=0;r<t.length;r+=3){var l=t[r],o=t[r+1],d=t[r+2];if(typeof o!="function"){if(Ef(o||l)===null)continue;break}var m=Ti(l);m!==null&&(t.splice(r,3),r-=3,Sc(m,{pending:!0,data:d,method:l.method,action:o},o,d))}}))}function ca(t){function r(z){return mo(z,t)}Ur!==null&&mo(Ur,t),$r!==null&&mo($r,t),Ir!==null&&mo(Ir,t),Sl.forEach(r),wl.forEach(r);for(var l=0;l<qr.length;l++){var o=qr[l];o.blockedOn===t&&(o.blockedOn=null)}for(;0<qr.length&&(l=qr[0],l.blockedOn===null);)h0(l),l.blockedOn===null&&qr.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(o=0;o<l.length;o+=3){var d=l[o],m=l[o+1],S=d[It]||null;if(typeof m=="function")S||m0(l);else if(S){var E=null;if(m&&m.hasAttribute("formAction")){if(d=m,S=m[It]||null)E=S.formAction;else if(Ef(d)!==null)continue}else E=S.action;typeof E=="function"?l[o+1]=E:(l.splice(o,3),o-=3),m0(l)}}}function g0(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(S){return d=S})},focusReset:"manual",scroll:"manual"})}function r(){d!==null&&(d(),d=null),o||setTimeout(l,20)}function l(){if(!o&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,d=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){o=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),d!==null&&(d(),d=null)}}}function _f(t){this._internalRoot=t}yo.prototype.render=_f.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,o=nn();s0(l,o,t,r,null,null)},yo.prototype.unmount=_f.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;s0(t.current,2,null,t,null,null),Xs(),r[ji]=null}};function yo(t){this._internalRoot=t}yo.prototype.unstable_scheduleHydration=function(t){if(t){var r=Np();t={blockedOn:null,target:t,priority:r};for(var l=0;l<qr.length&&r!==0&&r<qr[l].priority;l++);qr.splice(l,0,t),l===0&&h0(t)}};var y0=n.version;if(y0!=="19.2.3")throw Error(a(527,y0,"19.2.3"));B.findDOMNode=function(t){var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(a(188)):(t=Object.keys(t).join(","),Error(a(268,t)));return t=h(r),t=t!==null?g(t):null,t=t===null?null:t.stateNode,t};var Yk={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vo.isDisabled&&vo.supportsFiber)try{Ot=vo.inject(Yk),vt=vo}catch{}}return _l.createRoot=function(t,r){if(!s(t))throw Error(a(299));var l=!1,o="",d=kg,m=_g,S=Ng;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(d=r.onUncaughtError),r.onCaughtError!==void 0&&(m=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError)),r=a0(t,1,!1,null,null,l,o,null,d,m,S,g0),t[ji]=r.current,lf(t),new _f(r)},_l.hydrateRoot=function(t,r,l){if(!s(t))throw Error(a(299));var o=!1,d="",m=kg,S=_g,E=Ng,z=null;return l!=null&&(l.unstable_strictMode===!0&&(o=!0),l.identifierPrefix!==void 0&&(d=l.identifierPrefix),l.onUncaughtError!==void 0&&(m=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError),l.formState!==void 0&&(z=l.formState)),r=a0(t,1,!0,r,l??null,o,d,z,m,S,E,g0),r.context=l0(null),l=r.current,o=nn(),o=pu(o),d=_r(o),d.callback=null,Nr(l,d,o),l=o,r.current.lanes=l,Da(r,l),Mn(r),t[ji]=r.current,lf(t),new yo(r)},_l.version="19.2.3",_l}var j0;function l_(){if(j0)return Cf.exports;j0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Cf.exports=a_(),Cf.exports}var s_=l_();const o_=Bl(s_);var C0="popstate";function u_(e={}){function n(a,s){let{pathname:u,search:c,hash:f}=a.location;return Vd("",{pathname:u,search:c,hash:f},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function i(a,s){return typeof s=="string"?s:Ml(s)}return f_(n,i,null,e)}function nt(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Sn(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function c_(){return Math.random().toString(36).substring(2,10)}function T0(e,n){return{usr:e.state,key:e.key,idx:n}}function Vd(e,n,i=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?ka(n):n,state:i,key:n&&n.key||a||c_()}}function Ml({pathname:e="/",search:n="",hash:i=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function ka(e){let n={};if(e){let i=e.indexOf("#");i>=0&&(n.hash=e.substring(i),e=e.substring(0,i));let a=e.indexOf("?");a>=0&&(n.search=e.substring(a),e=e.substring(0,a)),e&&(n.pathname=e)}return n}function f_(e,n,i,a={}){let{window:s=document.defaultView,v5Compat:u=!1}=a,c=s.history,f="POP",p=null,h=g();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function g(){return(c.state||{idx:null}).idx}function y(){f="POP";let j=g(),_=j==null?null:j-h;h=j,p&&p({action:f,location:k.location,delta:_})}function x(j,_){f="PUSH";let R=Vd(k.location,j,_);h=g()+1;let T=T0(R,h),V=k.createHref(R);try{c.pushState(T,"",V)}catch(X){if(X instanceof DOMException&&X.name==="DataCloneError")throw X;s.location.assign(V)}u&&p&&p({action:f,location:k.location,delta:1})}function b(j,_){f="REPLACE";let R=Vd(k.location,j,_);h=g();let T=T0(R,h),V=k.createHref(R);c.replaceState(T,"",V),u&&p&&p({action:f,location:k.location,delta:0})}function w(j){return d_(j)}let k={get action(){return f},get location(){return e(s,c)},listen(j){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(C0,y),p=j,()=>{s.removeEventListener(C0,y),p=null}},createHref(j){return n(s,j)},createURL:w,encodeLocation(j){let _=w(j);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:x,replace:b,go(j){return c.go(j)}};return k}function d_(e,n=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),nt(i,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:Ml(e);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=i+a),new URL(a,i)}function Vx(e,n,i="/"){return h_(e,n,i,!1)}function h_(e,n,i,a){let s=typeof n=="string"?ka(n):n,u=hr(s.pathname||"/",i);if(u==null)return null;let c=Gx(e);p_(c);let f=null;for(let p=0;f==null&&p<c.length;++p){let h=__(u);f=E_(c[p],h,a)}return f}function Gx(e,n=[],i=[],a="",s=!1){let u=(c,f,p=s,h)=>{let g={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(a)&&p)return;nt(g.relativePath.startsWith(a),`Absolute route path "${g.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(a.length)}let y=dr([a,g.relativePath]),x=i.concat(g);c.children&&c.children.length>0&&(nt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Gx(c.children,n,x,y,p)),!(c.path==null&&!c.index)&&n.push({path:y,score:S_(y,c.index),routesMeta:x})};return e.forEach((c,f)=>{if(c.path===""||!c.path?.includes("?"))u(c,f);else for(let p of Qx(c.path))u(c,f,!0,p)}),n}function Qx(e){let n=e.split("/");if(n.length===0)return[];let[i,...a]=n,s=i.endsWith("?"),u=i.replace(/\?$/,"");if(a.length===0)return s?[u,""]:[u];let c=Qx(a.join("/")),f=[];return f.push(...c.map(p=>p===""?u:[u,p].join("/"))),s&&f.push(...c),f.map(p=>e.startsWith("/")&&p===""?"/":p)}function p_(e){e.sort((n,i)=>n.score!==i.score?i.score-n.score:w_(n.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var m_=/^:[\w-]+$/,g_=3,y_=2,v_=1,x_=10,b_=-2,R0=e=>e==="*";function S_(e,n){let i=e.split("/"),a=i.length;return i.some(R0)&&(a+=b_),n&&(a+=y_),i.filter(s=>!R0(s)).reduce((s,u)=>s+(m_.test(u)?g_:u===""?v_:x_),a)}function w_(e,n){return e.length===n.length&&e.slice(0,-1).every((a,s)=>a===n[s])?e[e.length-1]-n[n.length-1]:0}function E_(e,n,i=!1){let{routesMeta:a}=e,s={},u="/",c=[];for(let f=0;f<a.length;++f){let p=a[f],h=f===a.length-1,g=u==="/"?n:n.slice(u.length)||"/",y=zo({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},g),x=p.route;if(!y&&h&&i&&!a[a.length-1].route.index&&(y=zo({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},g)),!y)return null;Object.assign(s,y.params),c.push({params:s,pathname:dr([u,y.pathname]),pathnameBase:T_(dr([u,y.pathnameBase])),route:x}),y.pathnameBase!=="/"&&(u=dr([u,y.pathnameBase]))}return c}function zo(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[i,a]=k_(e.path,e.caseSensitive,e.end),s=n.match(i);if(!s)return null;let u=s[0],c=u.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:a.reduce((h,{paramName:g,isOptional:y},x)=>{if(g==="*"){let w=f[x]||"";c=u.slice(0,u.length-w.length).replace(/(.)\/+$/,"$1")}const b=f[x];return y&&!b?h[g]=void 0:h[g]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:c,pattern:e}}function k_(e,n=!1,i=!0){Sn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,p)=>(a.push({paramName:f,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,n?void 0:"i"),a]}function __(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Sn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function hr(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let i=n.endsWith("/")?n.length-1:n.length,a=e.charAt(i);return a&&a!=="/"?null:e.slice(i)||"/"}var Yx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,N_=e=>Yx.test(e);function j_(e,n="/"){let{pathname:i,search:a="",hash:s=""}=typeof e=="string"?ka(e):e,u;if(i)if(N_(i))u=i;else{if(i.includes("//")){let c=i;i=i.replace(/\/\/+/g,"/"),Sn(!1,`Pathnames cannot have embedded double slashes - normalizing ${c} -> ${i}`)}i.startsWith("/")?u=A0(i.substring(1),"/"):u=A0(i,n)}else u=n;return{pathname:u,search:R_(a),hash:A_(s)}}function A0(e,n){let i=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?i.length>1&&i.pop():s!=="."&&i.push(s)}),i.length>1?i.join("/"):"/"}function Of(e,n,i,a){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function C_(e){return e.filter((n,i)=>i===0||n.route.path&&n.route.path.length>0)}function Xx(e){let n=C_(e);return n.map((i,a)=>a===n.length-1?i.pathname:i.pathnameBase)}function Kx(e,n,i,a=!1){let s;typeof e=="string"?s=ka(e):(s={...e},nt(!s.pathname||!s.pathname.includes("?"),Of("?","pathname","search",s)),nt(!s.pathname||!s.pathname.includes("#"),Of("#","pathname","hash",s)),nt(!s.search||!s.search.includes("#"),Of("#","search","hash",s)));let u=e===""||s.pathname==="",c=u?"/":s.pathname,f;if(c==null)f=i;else{let y=n.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),y-=1;s.pathname=x.join("/")}f=y>=0?n[y]:"/"}let p=j_(s,f),h=c&&c!=="/"&&c.endsWith("/"),g=(u||c===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(h||g)&&(p.pathname+="/"),p}var dr=e=>e.join("/").replace(/\/\/+/g,"/"),T_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),R_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,A_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,O_=class{constructor(e,n,i,a=!1){this.status=e,this.statusText=n||"",this.internal=a,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function z_(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function D_(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Jx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Wx(e,n){let i=e;if(typeof i!="string"||!Yx.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let a=i,s=!1;if(Jx)try{let u=new URL(window.location.href),c=i.startsWith("//")?new URL(u.protocol+i):new URL(i),f=hr(c.pathname,n);c.origin===u.origin&&f!=null?i=f+c.search+c.hash:s=!0}catch{Sn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var eb=["POST","PUT","PATCH","DELETE"];new Set(eb);var M_=["GET",...eb];new Set(M_);var _a=O.createContext(null);_a.displayName="DataRouter";var Vo=O.createContext(null);Vo.displayName="DataRouterState";var L_=O.createContext(!1),tb=O.createContext({isTransitioning:!1});tb.displayName="ViewTransition";var U_=O.createContext(new Map);U_.displayName="Fetchers";var $_=O.createContext(null);$_.displayName="Await";var En=O.createContext(null);En.displayName="Navigation";var Pl=O.createContext(null);Pl.displayName="Location";var In=O.createContext({outlet:null,matches:[],isDataRoute:!1});In.displayName="Route";var Ch=O.createContext(null);Ch.displayName="RouteError";var nb="REACT_ROUTER_ERROR",I_="REDIRECT",q_="ROUTE_ERROR_RESPONSE";function B_(e){if(e.startsWith(`${nb}:${I_}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function P_(e){if(e.startsWith(`${nb}:${q_}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new O_(n.status,n.statusText,n.data)}catch{}}function Z_(e,{relative:n}={}){nt(Zl(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:a}=O.useContext(En),{hash:s,pathname:u,search:c}=Fl(e,{relative:n}),f=u;return i!=="/"&&(f=u==="/"?i:dr([i,u])),a.createHref({pathname:f,search:c,hash:s})}function Zl(){return O.useContext(Pl)!=null}function qn(){return nt(Zl(),"useLocation() may be used only in the context of a <Router> component."),O.useContext(Pl).location}var rb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ib(e){O.useContext(En).static||O.useLayoutEffect(e)}function Hl(){let{isDataRoute:e}=O.useContext(In);return e?n2():H_()}function H_(){nt(Zl(),"useNavigate() may be used only in the context of a <Router> component.");let e=O.useContext(_a),{basename:n,navigator:i}=O.useContext(En),{matches:a}=O.useContext(In),{pathname:s}=qn(),u=JSON.stringify(Xx(a)),c=O.useRef(!1);return ib(()=>{c.current=!0}),O.useCallback((p,h={})=>{if(Sn(c.current,rb),!c.current)return;if(typeof p=="number"){i.go(p);return}let g=Kx(p,JSON.parse(u),s,h.relative==="path");e==null&&n!=="/"&&(g.pathname=g.pathname==="/"?n:dr([n,g.pathname])),(h.replace?i.replace:i.push)(g,h.state,h)},[n,i,u,s,e])}O.createContext(null);function ab(){let{matches:e}=O.useContext(In),n=e[e.length-1];return n?n.params:{}}function Fl(e,{relative:n}={}){let{matches:i}=O.useContext(In),{pathname:a}=qn(),s=JSON.stringify(Xx(i));return O.useMemo(()=>Kx(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function F_(e,n){return lb(e,n)}function lb(e,n,i,a,s){nt(Zl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=O.useContext(En),{matches:c}=O.useContext(In),f=c[c.length-1],p=f?f.params:{},h=f?f.pathname:"/",g=f?f.pathnameBase:"/",y=f&&f.route;{let R=y&&y.path||"";ob(h,!y||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+
11
+ Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let x=qn(),b;if(n){let R=typeof n=="string"?ka(n):n;nt(g==="/"||R.pathname?.startsWith(g),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${R.pathname}" was given in the \`location\` prop.`),b=R}else b=x;let w=b.pathname||"/",k=w;if(g!=="/"){let R=g.replace(/^\//,"").split("/");k="/"+w.replace(/^\//,"").split("/").slice(R.length).join("/")}let j=Vx(e,{pathname:k});Sn(y||j!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Sn(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=X_(j&&j.map(R=>Object.assign({},R,{params:Object.assign({},p,R.params),pathname:dr([g,u.encodeLocation?u.encodeLocation(R.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?g:dr([g,u.encodeLocation?u.encodeLocation(R.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),c,i,a,s);return n&&_?O.createElement(Pl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},_):_}function V_(){let e=t2(),n=z_(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},u={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:u},"ErrorBoundary")," or"," ",O.createElement("code",{style:u},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},n),i?O.createElement("pre",{style:s},i):null,c)}var G_=O.createElement(V_,null),sb=class extends O.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const i=P_(e.digest);i&&(e=i)}let n=e!==void 0?O.createElement(In.Provider,{value:this.props.routeContext},O.createElement(Ch.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?O.createElement(Q_,{error:e},n):n}};sb.contextType=L_;var zf=new WeakMap;function Q_({children:e,error:n}){let{basename:i}=O.useContext(En);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let a=B_(n.digest);if(a){let s=zf.get(n);if(s)throw s;let u=Wx(a.location,i);if(Jx&&!zf.get(n))if(u.isExternal||a.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:a.replace}));throw zf.set(n,c),c}return O.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return e}function Y_({routeContext:e,match:n,children:i}){let a=O.useContext(_a);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),O.createElement(In.Provider,{value:e},i)}function X_(e,n=[],i=null,a=null,s=null){if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(n.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let u=e,c=i?.errors;if(c!=null){let g=u.findIndex(y=>y.route.id&&c?.[y.route.id]!==void 0);nt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),u=u.slice(0,Math.min(u.length,g+1))}let f=!1,p=-1;if(i)for(let g=0;g<u.length;g++){let y=u[g];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(p=g),y.route.id){let{loaderData:x,errors:b}=i,w=y.route.loader&&!x.hasOwnProperty(y.route.id)&&(!b||b[y.route.id]===void 0);if(y.route.lazy||w){f=!0,p>=0?u=u.slice(0,p+1):u=[u[0]];break}}}let h=i&&a?(g,y)=>{a(g,{location:i.location,params:i.matches?.[0]?.params??{},unstable_pattern:D_(i.matches),errorInfo:y})}:void 0;return u.reduceRight((g,y,x)=>{let b,w=!1,k=null,j=null;i&&(b=c&&y.route.id?c[y.route.id]:void 0,k=y.route.errorElement||G_,f&&(p<0&&x===0?(ob("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,j=null):p===x&&(w=!0,j=y.route.hydrateFallbackElement||null)));let _=n.concat(u.slice(0,x+1)),R=()=>{let T;return b?T=k:w?T=j:y.route.Component?T=O.createElement(y.route.Component,null):y.route.element?T=y.route.element:T=g,O.createElement(Y_,{match:y,routeContext:{outlet:g,matches:_,isDataRoute:i!=null},children:T})};return i&&(y.route.ErrorBoundary||y.route.errorElement||x===0)?O.createElement(sb,{location:i.location,revalidation:i.revalidation,component:k,error:b,children:R(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:h}):R()},null)}function Th(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function K_(e){let n=O.useContext(_a);return nt(n,Th(e)),n}function J_(e){let n=O.useContext(Vo);return nt(n,Th(e)),n}function W_(e){let n=O.useContext(In);return nt(n,Th(e)),n}function Rh(e){let n=W_(e),i=n.matches[n.matches.length-1];return nt(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function e2(){return Rh("useRouteId")}function t2(){let e=O.useContext(Ch),n=J_("useRouteError"),i=Rh("useRouteError");return e!==void 0?e:n.errors?.[i]}function n2(){let{router:e}=K_("useNavigate"),n=Rh("useNavigate"),i=O.useRef(!1);return ib(()=>{i.current=!0}),O.useCallback(async(s,u={})=>{Sn(i.current,rb),i.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:n,...u}))},[e,n])}var O0={};function ob(e,n,i){!n&&!O0[e]&&(O0[e]=!0,Sn(!1,i))}O.memo(r2);function r2({routes:e,future:n,state:i,onError:a}){return lb(e,void 0,i,a,n)}function cr(e){nt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function i2({basename:e="/",children:n=null,location:i,navigationType:a="POP",navigator:s,static:u=!1,unstable_useTransitions:c}){nt(!Zl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),p=O.useMemo(()=>({basename:f,navigator:s,static:u,unstable_useTransitions:c,future:{}}),[f,s,u,c]);typeof i=="string"&&(i=ka(i));let{pathname:h="/",search:g="",hash:y="",state:x=null,key:b="default"}=i,w=O.useMemo(()=>{let k=hr(h,f);return k==null?null:{location:{pathname:k,search:g,hash:y,state:x,key:b},navigationType:a}},[f,h,g,y,x,b,a]);return Sn(w!=null,`<Router basename="${f}"> is not able to match the URL "${h}${g}${y}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:O.createElement(En.Provider,{value:p},O.createElement(Pl.Provider,{children:n,value:w}))}function z0({children:e,location:n}){return F_(Gd(e),n)}function Gd(e,n=[]){let i=[];return O.Children.forEach(e,(a,s)=>{if(!O.isValidElement(a))return;let u=[...n,s];if(a.type===O.Fragment){i.push.apply(i,Gd(a.props.children,u));return}nt(a.type===cr,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),nt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||u.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=Gd(a.props.children,u)),i.push(c)}),i}var Co="get",To="application/x-www-form-urlencoded";function Go(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function a2(e){return Go(e)&&e.tagName.toLowerCase()==="button"}function l2(e){return Go(e)&&e.tagName.toLowerCase()==="form"}function s2(e){return Go(e)&&e.tagName.toLowerCase()==="input"}function o2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function u2(e,n){return e.button===0&&(!n||n==="_self")&&!o2(e)}function Qd(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,i)=>{let a=e[i];return n.concat(Array.isArray(a)?a.map(s=>[i,s]):[[i,a]])},[]))}function c2(e,n){let i=Qd(e);return n&&n.forEach((a,s)=>{i.has(s)||n.getAll(s).forEach(u=>{i.append(s,u)})}),i}var xo=null;function f2(){if(xo===null)try{new FormData(document.createElement("form"),0),xo=!1}catch{xo=!0}return xo}var d2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Df(e){return e!=null&&!d2.has(e)?(Sn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${To}"`),null):e}function h2(e,n){let i,a,s,u,c;if(l2(e)){let f=e.getAttribute("action");a=f?hr(f,n):null,i=e.getAttribute("method")||Co,s=Df(e.getAttribute("enctype"))||To,u=new FormData(e)}else if(a2(e)||s2(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||f.getAttribute("action");if(a=p?hr(p,n):null,i=e.getAttribute("formmethod")||f.getAttribute("method")||Co,s=Df(e.getAttribute("formenctype"))||Df(f.getAttribute("enctype"))||To,u=new FormData(f,e),!f2()){let{name:h,type:g,value:y}=e;if(g==="image"){let x=h?`${h}.`:"";u.append(`${x}x`,"0"),u.append(`${x}y`,"0")}else h&&u.append(h,y)}}else{if(Go(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Co,a=null,s=To,c=e}return u&&s==="text/plain"&&(c=u,u=void 0),{action:a,method:i.toLowerCase(),encType:s,formData:u,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ah(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function p2(e,n,i){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a.pathname==="/"?a.pathname=`_root.${i}`:n&&hr(a.pathname,n)==="/"?a.pathname=`${n.replace(/\/$/,"")}/_root.${i}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${i}`,a}async function m2(e,n){if(e.id in n)return n[e.id];try{let i=await import(e.module);return n[e.id]=i,i}catch(i){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function g2(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function y2(e,n,i){let a=await Promise.all(e.map(async s=>{let u=n.routes[s.route.id];if(u){let c=await m2(u,i);return c.links?c.links():[]}return[]}));return S2(a.flat(1).filter(g2).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function D0(e,n,i,a,s,u){let c=(p,h)=>i[h]?p.route.id!==i[h].route.id:!0,f=(p,h)=>i[h].pathname!==p.pathname||i[h].route.path?.endsWith("*")&&i[h].params["*"]!==p.params["*"];return u==="assets"?n.filter((p,h)=>c(p,h)||f(p,h)):u==="data"?n.filter((p,h)=>{let g=a.routes[p.route.id];if(!g||!g.hasLoader)return!1;if(c(p,h)||f(p,h))return!0;if(p.route.shouldRevalidate){let y=p.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function v2(e,n,{includeHydrateFallback:i}={}){return x2(e.map(a=>{let s=n.routes[a.route.id];if(!s)return[];let u=[s.module];return s.clientActionModule&&(u=u.concat(s.clientActionModule)),s.clientLoaderModule&&(u=u.concat(s.clientLoaderModule)),i&&s.hydrateFallbackModule&&(u=u.concat(s.hydrateFallbackModule)),s.imports&&(u=u.concat(s.imports)),u}).flat(1))}function x2(e){return[...new Set(e)]}function b2(e){let n={},i=Object.keys(e).sort();for(let a of i)n[a]=e[a];return n}function S2(e,n){let i=new Set;return new Set(n),e.reduce((a,s)=>{let u=JSON.stringify(b2(s));return i.has(u)||(i.add(u),a.push({key:u,link:s})),a},[])}function ub(){let e=O.useContext(_a);return Ah(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function w2(){let e=O.useContext(Vo);return Ah(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Oh=O.createContext(void 0);Oh.displayName="FrameworkContext";function cb(){let e=O.useContext(Oh);return Ah(e,"You must render this element inside a <HydratedRouter> element"),e}function E2(e,n){let i=O.useContext(Oh),[a,s]=O.useState(!1),[u,c]=O.useState(!1),{onFocus:f,onBlur:p,onMouseEnter:h,onMouseLeave:g,onTouchStart:y}=n,x=O.useRef(null);O.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let k=_=>{_.forEach(R=>{c(R.isIntersecting)})},j=new IntersectionObserver(k,{threshold:.5});return x.current&&j.observe(x.current),()=>{j.disconnect()}}},[e]),O.useEffect(()=>{if(a){let k=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(k)}}},[a]);let b=()=>{s(!0)},w=()=>{s(!1),c(!1)};return i?e!=="intent"?[u,x,{}]:[u,x,{onFocus:Nl(f,b),onBlur:Nl(p,w),onMouseEnter:Nl(h,b),onMouseLeave:Nl(g,w),onTouchStart:Nl(y,b)}]:[!1,x,{}]}function Nl(e,n){return i=>{e&&e(i),i.defaultPrevented||n(i)}}function k2({page:e,...n}){let{router:i}=ub(),a=O.useMemo(()=>Vx(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?O.createElement(N2,{page:e,matches:a,...n}):null}function _2(e){let{manifest:n,routeModules:i}=cb(),[a,s]=O.useState([]);return O.useEffect(()=>{let u=!1;return y2(e,n,i).then(c=>{u||s(c)}),()=>{u=!0}},[e,n,i]),a}function N2({page:e,matches:n,...i}){let a=qn(),{manifest:s,routeModules:u}=cb(),{basename:c}=ub(),{loaderData:f,matches:p}=w2(),h=O.useMemo(()=>D0(e,n,p,s,a,"data"),[e,n,p,s,a]),g=O.useMemo(()=>D0(e,n,p,s,a,"assets"),[e,n,p,s,a]),y=O.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let w=new Set,k=!1;if(n.forEach(_=>{let R=s.routes[_.route.id];!R||!R.hasLoader||(!h.some(T=>T.route.id===_.route.id)&&_.route.id in f&&u[_.route.id]?.shouldRevalidate||R.hasClientLoader?k=!0:w.add(_.route.id))}),w.size===0)return[];let j=p2(e,c,"data");return k&&w.size>0&&j.searchParams.set("_routes",n.filter(_=>w.has(_.route.id)).map(_=>_.route.id).join(",")),[j.pathname+j.search]},[c,f,a,s,h,n,e,u]),x=O.useMemo(()=>v2(g,s),[g,s]),b=_2(g);return O.createElement(O.Fragment,null,y.map(w=>O.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...i})),x.map(w=>O.createElement("link",{key:w,rel:"modulepreload",href:w,...i})),b.map(({key:w,link:k})=>O.createElement("link",{key:w,nonce:i.nonce,...k})))}function j2(...e){return n=>{e.forEach(i=>{typeof i=="function"?i(n):i!=null&&(i.current=n)})}}var C2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{C2&&(window.__reactRouterVersion="7.11.0")}catch{}function T2({basename:e,children:n,unstable_useTransitions:i,window:a}){let s=O.useRef();s.current==null&&(s.current=u_({window:a,v5Compat:!0}));let u=s.current,[c,f]=O.useState({action:u.action,location:u.location}),p=O.useCallback(h=>{i===!1?f(h):O.startTransition(()=>f(h))},[i]);return O.useLayoutEffect(()=>u.listen(p),[u,p]),O.createElement(i2,{basename:e,children:n,location:c.location,navigationType:c.action,navigator:u,unstable_useTransitions:i})}var fb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sa=O.forwardRef(function({onClick:n,discover:i="render",prefetch:a="none",relative:s,reloadDocument:u,replace:c,state:f,target:p,to:h,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:x,...b},w){let{basename:k,unstable_useTransitions:j}=O.useContext(En),_=typeof h=="string"&&fb.test(h),R=Wx(h,k);h=R.to;let T=Z_(h,{relative:s}),[V,X,L]=E2(a,b),Z=O2(h,{replace:c,state:f,target:p,preventScrollReset:g,relative:s,viewTransition:y,unstable_defaultShouldRevalidate:x,unstable_useTransitions:j});function Y(H){n&&n(H),H.defaultPrevented||Z(H)}let ie=O.createElement("a",{...b,...L,href:R.absoluteURL||T,onClick:R.isExternal||u?n:Y,ref:j2(w,X),target:p,"data-discover":!_&&i==="render"?"true":void 0});return V&&!_?O.createElement(O.Fragment,null,ie,O.createElement(k2,{page:T})):ie});Sa.displayName="Link";var Yd=O.forwardRef(function({"aria-current":n="page",caseSensitive:i=!1,className:a="",end:s=!1,style:u,to:c,viewTransition:f,children:p,...h},g){let y=Fl(c,{relative:h.relative}),x=qn(),b=O.useContext(Vo),{navigator:w,basename:k}=O.useContext(En),j=b!=null&&$2(y)&&f===!0,_=w.encodeLocation?w.encodeLocation(y).pathname:y.pathname,R=x.pathname,T=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;i||(R=R.toLowerCase(),T=T?T.toLowerCase():null,_=_.toLowerCase()),T&&k&&(T=hr(T,k)||T);const V=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let X=R===_||!s&&R.startsWith(_)&&R.charAt(V)==="/",L=T!=null&&(T===_||!s&&T.startsWith(_)&&T.charAt(_.length)==="/"),Z={isActive:X,isPending:L,isTransitioning:j},Y=X?n:void 0,ie;typeof a=="function"?ie=a(Z):ie=[a,X?"active":null,L?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let H=typeof u=="function"?u(Z):u;return O.createElement(Sa,{...h,"aria-current":Y,className:ie,ref:g,style:H,to:c,viewTransition:f},typeof p=="function"?p(Z):p)});Yd.displayName="NavLink";var R2=O.forwardRef(({discover:e="render",fetcherKey:n,navigate:i,reloadDocument:a,replace:s,state:u,method:c=Co,action:f,onSubmit:p,relative:h,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:x,...b},w)=>{let{unstable_useTransitions:k}=O.useContext(En),j=L2(),_=U2(f,{relative:h}),R=c.toLowerCase()==="get"?"get":"post",T=typeof f=="string"&&fb.test(f),V=X=>{if(p&&p(X),X.defaultPrevented)return;X.preventDefault();let L=X.nativeEvent.submitter,Z=L?.getAttribute("formmethod")||c,Y=()=>j(L||X.currentTarget,{fetcherKey:n,method:Z,navigate:i,replace:s,state:u,relative:h,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:x});k&&i!==!1?O.startTransition(()=>Y()):Y()};return O.createElement("form",{ref:w,method:R,action:_,onSubmit:a?p:V,...b,"data-discover":!T&&e==="render"?"true":void 0})});R2.displayName="Form";function A2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function db(e){let n=O.useContext(_a);return nt(n,A2(e)),n}function O2(e,{target:n,replace:i,state:a,preventScrollReset:s,relative:u,viewTransition:c,unstable_defaultShouldRevalidate:f,unstable_useTransitions:p}={}){let h=Hl(),g=qn(),y=Fl(e,{relative:u});return O.useCallback(x=>{if(u2(x,n)){x.preventDefault();let b=i!==void 0?i:Ml(g)===Ml(y),w=()=>h(e,{replace:b,state:a,preventScrollReset:s,relative:u,viewTransition:c,unstable_defaultShouldRevalidate:f});p?O.startTransition(()=>w()):w()}},[g,h,y,i,a,n,e,s,u,c,f,p])}function z2(e){Sn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=O.useRef(Qd(e)),i=O.useRef(!1),a=qn(),s=O.useMemo(()=>c2(a.search,i.current?null:n.current),[a.search]),u=Hl(),c=O.useCallback((f,p)=>{const h=Qd(typeof f=="function"?f(new URLSearchParams(s)):f);i.current=!0,u("?"+h,p)},[u,s]);return[s,c]}var D2=0,M2=()=>`__${String(++D2)}__`;function L2(){let{router:e}=db("useSubmit"),{basename:n}=O.useContext(En),i=e2(),a=e.fetch,s=e.navigate;return O.useCallback(async(u,c={})=>{let{action:f,method:p,encType:h,formData:g,body:y}=h2(u,n);if(c.navigate===!1){let x=c.fetcherKey||M2();await a(x,i,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:y,formMethod:c.method||p,formEncType:c.encType||h,flushSync:c.flushSync})}else await s(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:y,formMethod:c.method||p,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:i,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,n,i])}function U2(e,{relative:n}={}){let{basename:i}=O.useContext(En),a=O.useContext(In);nt(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),u={...Fl(e||".",{relative:n})},c=qn();if(e==null){u.search=c.search;let f=new URLSearchParams(u.search),p=f.getAll("index");if(p.some(g=>g==="")){f.delete("index"),p.filter(y=>y).forEach(y=>f.append("index",y));let g=f.toString();u.search=g?`?${g}`:""}}return(!e||e===".")&&s.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(u.pathname=u.pathname==="/"?i:dr([i,u.pathname])),Ml(u)}function $2(e,{relative:n}={}){let i=O.useContext(tb);nt(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=db("useViewTransitionState"),s=Fl(e,{relative:n});if(!i.isTransitioning)return!1;let u=hr(i.currentLocation.pathname,a)||i.currentLocation.pathname,c=hr(i.nextLocation.pathname,a)||i.nextLocation.pathname;return zo(s.pathname,c)!=null||zo(s.pathname,u)!=null}var Na=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},I2={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},q2=class{#e=I2;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}},hi=new q2;function B2(e){setTimeout(e,0)}var mi=typeof window>"u"||"Deno"in globalThis;function Mt(){}function P2(e,n){return typeof e=="function"?e(n):e}function Xd(e){return typeof e=="number"&&e>=0&&e!==1/0}function hb(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Hr(e,n){return typeof e=="function"?e(n):e}function xn(e,n){return typeof e=="function"?e(n):e}function M0(e,n){const{type:i="all",exact:a,fetchStatus:s,predicate:u,queryKey:c,stale:f}=e;if(c){if(a){if(n.queryHash!==zh(c,n.options))return!1}else if(!Ll(n.queryKey,c))return!1}if(i!=="all"){const p=n.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof f=="boolean"&&n.isStale()!==f||s&&s!==n.state.fetchStatus||u&&!u(n))}function L0(e,n){const{exact:i,status:a,predicate:s,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(i){if(gi(n.options.mutationKey)!==gi(u))return!1}else if(!Ll(n.options.mutationKey,u))return!1}return!(a&&n.state.status!==a||s&&!s(n))}function zh(e,n){return(n?.queryKeyHashFn||gi)(e)}function gi(e){return JSON.stringify(e,(n,i)=>Kd(i)?Object.keys(i).sort().reduce((a,s)=>(a[s]=i[s],a),{}):i)}function Ll(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(i=>Ll(e[i],n[i])):!1}var Z2=Object.prototype.hasOwnProperty;function pb(e,n){if(e===n)return e;const i=U0(e)&&U0(n);if(!i&&!(Kd(e)&&Kd(n)))return n;const s=(i?e:Object.keys(e)).length,u=i?n:Object.keys(n),c=u.length,f=i?new Array(c):{};let p=0;for(let h=0;h<c;h++){const g=i?h:u[h],y=e[g],x=n[g];if(y===x){f[g]=y,(i?h<s:Z2.call(e,g))&&p++;continue}if(y===null||x===null||typeof y!="object"||typeof x!="object"){f[g]=x;continue}const b=pb(y,x);f[g]=b,b===y&&p++}return s===c&&p===s?e:f}function Do(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const i in e)if(e[i]!==n[i])return!1;return!0}function U0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Kd(e){if(!$0(e))return!1;const n=e.constructor;if(n===void 0)return!0;const i=n.prototype;return!(!$0(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function $0(e){return Object.prototype.toString.call(e)==="[object Object]"}function H2(e){return new Promise(n=>{hi.setTimeout(n,e)})}function Jd(e,n,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,n):i.structuralSharing!==!1?pb(e,n):n}function F2(e,n,i=0){const a=[...e,n];return i&&a.length>i?a.slice(1):a}function V2(e,n,i=0){const a=[n,...e];return i&&a.length>i?a.slice(0,-1):a}var Dh=Symbol();function mb(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===Dh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Mh(e,n){return typeof e=="function"?e(...n):!!e}function G2(e,n,i){let a=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=n(),a||(a=!0,s.aborted?i():s.addEventListener("abort",i,{once:!0})),s)}),e}var Q2=class extends Na{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!mi&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Lh=new Q2;function Wd(){let e,n;const i=new Promise((s,u)=>{e=s,n=u});i.status="pending",i.catch(()=>{});function a(s){Object.assign(i,s),delete i.resolve,delete i.reject}return i.resolve=s=>{a({status:"fulfilled",value:s}),e(s)},i.reject=s=>{a({status:"rejected",reason:s}),n(s)},i}var Y2=B2;function X2(){let e=[],n=0,i=f=>{f()},a=f=>{f()},s=Y2;const u=f=>{n?e.push(f):s(()=>{i(f)})},c=()=>{const f=e;e=[],f.length&&s(()=>{a(()=>{f.forEach(p=>{i(p)})})})};return{batch:f=>{let p;n++;try{p=f()}finally{n--,n||c()}return p},batchCalls:f=>(...p)=>{u(()=>{f(...p)})},schedule:u,setNotifyFunction:f=>{i=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{s=f}}}var bt=X2(),K2=class extends Na{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!mi&&window.addEventListener){const n=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(i=>{i(e)}))}isOnline(){return this.#e}},Mo=new K2;function J2(e){return Math.min(1e3*2**e,3e4)}function gb(e){return(e??"online")==="online"?Mo.isOnline():!0}var eh=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function yb(e){let n=!1,i=0,a;const s=Wd(),u=()=>s.status!=="pending",c=k=>{if(!u()){const j=new eh(k);x(j),e.onCancel?.(j)}},f=()=>{n=!0},p=()=>{n=!1},h=()=>Lh.isFocused()&&(e.networkMode==="always"||Mo.isOnline())&&e.canRun(),g=()=>gb(e.networkMode)&&e.canRun(),y=k=>{u()||(a?.(),s.resolve(k))},x=k=>{u()||(a?.(),s.reject(k))},b=()=>new Promise(k=>{a=j=>{(u()||h())&&k(j)},e.onPause?.()}).then(()=>{a=void 0,u()||e.onContinue?.()}),w=()=>{if(u())return;let k;const j=i===0?e.initialPromise:void 0;try{k=j??e.fn()}catch(_){k=Promise.reject(_)}Promise.resolve(k).then(y).catch(_=>{if(u())return;const R=e.retry??(mi?0:3),T=e.retryDelay??J2,V=typeof T=="function"?T(i,_):T,X=R===!0||typeof R=="number"&&i<R||typeof R=="function"&&R(i,_);if(n||!X){x(_);return}i++,e.onFail?.(i,_),H2(V).then(()=>h()?void 0:b()).then(()=>{n?x(_):w()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a?.(),s),cancelRetry:f,continueRetry:p,canStart:g,start:()=>(g()?w():b().then(w),s)}}var vb=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Xd(this.gcTime)&&(this.#e=hi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(hi.clearTimeout(this.#e),this.#e=void 0)}},W2=class extends vb{#e;#t;#n;#i;#r;#l;#s;constructor(e){super(),this.#s=!1,this.#l=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=q0(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#l,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=q0(this.options);n.data!==void 0&&(this.setState(I0(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,n){const i=Jd(this.state.data,e,this.options);return this.#a({data:i,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),i}setState(e,n){this.#a({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#r?.promise;return this.#r?.cancel(e),n?n.then(Mt).catch(Mt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>xn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Hr(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!hb(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const i=new AbortController,a=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(this.#s=!0,i.signal)})},s=()=>{const f=mb(this.options,n),h=(()=>{const g={client:this.#i,queryKey:this.queryKey,meta:this.meta};return a(g),g})();return this.#s=!1,this.options.persister?this.options.persister(f,h,this):f(h)},c=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:s};return a(f),f})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=yb({initialPromise:n?.initialPromise,fn:c.fetchFn,onCancel:f=>{f instanceof eh&&f.revert&&this.setState({...this.#t,fetchStatus:"idle"}),i.abort()},onFail:(f,p)=>{this.#a({type:"failed",failureCount:f,error:p})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const f=await this.#r.start();if(f===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(f),this.#n.config.onSuccess?.(f,this),this.#n.config.onSettled?.(f,this.state.error,this),f}catch(f){if(f instanceof eh){if(f.silent)return this.#r.promise;if(f.revert){if(this.state.data===void 0)throw f;return this.state.data}}throw this.#a({type:"error",error:f}),this.#n.config.onError?.(f,this),this.#n.config.onSettled?.(this.state.data,f,this),f}finally{this.scheduleGc()}}#a(e){const n=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...xb(i.data,this.options),fetchMeta:e.meta??null};case"success":const a={...i,...I0(e.data,e.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const s=e.error;return{...i,error:s,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=n(this.state),bt.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function xb(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gb(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function I0(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function q0(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,i=n!==void 0,a=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:i?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var eN=class extends Na{constructor(e,n){super(),this.options=n,this.#e=e,this.#a=null,this.#s=Wd(),this.bindMethods(),this.setOptions(n)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#l;#s;#a;#m;#d;#h;#u;#c;#o;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),B0(this.#t,this.options)?this.#f():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return th(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return th(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#S(),this.#t.removeObserver(this)}setOptions(e){const n=this.options,i=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),n._defaulted&&!Do(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&P0(this.#t,i,this.options,n)&&this.#f(),this.updateResult(),a&&(this.#t!==i||xn(this.options.enabled,this.#t)!==xn(n.enabled,this.#t)||Hr(this.options.staleTime,this.#t)!==Hr(n.staleTime,this.#t))&&this.#g();const s=this.#y();a&&(this.#t!==i||xn(this.options.enabled,this.#t)!==xn(n.enabled,this.#t)||s!==this.#o)&&this.#v(s)}getOptimisticResult(e){const n=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(n,e);return nN(this,i)&&(this.#i=i,this.#l=this.options,this.#r=this.#t.state),i}getCurrentResult(){return this.#i}trackResult(e,n){return new Proxy(e,{get:(i,a)=>(this.trackProp(a),n?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,a))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#e.defaultQueryOptions(e),i=this.#e.getQueryCache().build(this.#e,n);return i.fetch().then(()=>this.createResult(i,n))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(e){this.#w();let n=this.#t.fetch(this.options,e);return e?.throwOnError||(n=n.catch(Mt)),n}#g(){this.#b();const e=Hr(this.options.staleTime,this.#t);if(mi||this.#i.isStale||!Xd(e))return;const i=hb(this.#i.dataUpdatedAt,e)+1;this.#u=hi.setTimeout(()=>{this.#i.isStale||this.updateResult()},i)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#S(),this.#o=e,!(mi||xn(this.options.enabled,this.#t)===!1||!Xd(this.#o)||this.#o===0)&&(this.#c=hi.setInterval(()=>{(this.options.refetchIntervalInBackground||Lh.isFocused())&&this.#f()},this.#o))}#x(){this.#g(),this.#v(this.#y())}#b(){this.#u&&(hi.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(hi.clearInterval(this.#c),this.#c=void 0)}createResult(e,n){const i=this.#t,a=this.options,s=this.#i,u=this.#r,c=this.#l,p=e!==i?e.state:this.#n,{state:h}=e;let g={...h},y=!1,x;if(n._optimisticResults){const Y=this.hasListeners(),ie=!Y&&B0(e,n),H=Y&&P0(e,i,n,a);(ie||H)&&(g={...g,...xb(h.data,e.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:w,status:k}=g;x=g.data;let j=!1;if(n.placeholderData!==void 0&&x===void 0&&k==="pending"){let Y;s?.isPlaceholderData&&n.placeholderData===c?.placeholderData?(Y=s.data,j=!0):Y=typeof n.placeholderData=="function"?n.placeholderData(this.#h?.state.data,this.#h):n.placeholderData,Y!==void 0&&(k="success",x=Jd(s?.data,Y,n),y=!0)}if(n.select&&x!==void 0&&!j)if(s&&x===u?.data&&n.select===this.#m)x=this.#d;else try{this.#m=n.select,x=n.select(x),x=Jd(s?.data,x,n),this.#d=x,this.#a=null}catch(Y){this.#a=Y}this.#a&&(b=this.#a,x=this.#d,w=Date.now(),k="error");const _=g.fetchStatus==="fetching",R=k==="pending",T=k==="error",V=R&&_,X=x!==void 0,Z={status:k,fetchStatus:g.fetchStatus,isPending:R,isSuccess:k==="success",isError:T,isInitialLoading:V,isLoading:V,data:x,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>p.dataUpdateCount||g.errorUpdateCount>p.errorUpdateCount,isFetching:_,isRefetching:_&&!R,isLoadingError:T&&!X,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:T&&X,isStale:Uh(e,n),refetch:this.refetch,promise:this.#s,isEnabled:xn(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const Y=se=>{Z.status==="error"?se.reject(Z.error):Z.data!==void 0&&se.resolve(Z.data)},ie=()=>{const se=this.#s=Z.promise=Wd();Y(se)},H=this.#s;switch(H.status){case"pending":e.queryHash===i.queryHash&&Y(H);break;case"fulfilled":(Z.status==="error"||Z.data!==H.value)&&ie();break;case"rejected":(Z.status!=="error"||Z.error!==H.reason)&&ie();break}}return Z}updateResult(){const e=this.#i,n=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#l=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Do(n,e))return;this.#i=n;const i=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!this.#p.size)return!0;const u=new Set(s??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#i).some(c=>{const f=c;return this.#i[f]!==e[f]&&u.has(f)})};this.#E({listeners:i()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const n=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#E(e){bt.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function tN(e,n){return xn(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function B0(e,n){return tN(e,n)||e.state.data!==void 0&&th(e,n,n.refetchOnMount)}function th(e,n,i){if(xn(n.enabled,e)!==!1&&Hr(n.staleTime,e)!=="static"){const a=typeof i=="function"?i(e):i;return a==="always"||a!==!1&&Uh(e,n)}return!1}function P0(e,n,i,a){return(e!==n||xn(a.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&Uh(e,i)}function Uh(e,n){return xn(n.enabled,e)!==!1&&e.isStaleByTime(Hr(n.staleTime,e))}function nN(e,n){return!Do(e.getCurrentResult(),n)}function Z0(e){return{onFetch:(n,i)=>{const a=n.options,s=n.fetchOptions?.meta?.fetchMore?.direction,u=n.state.data?.pages||[],c=n.state.data?.pageParams||[];let f={pages:[],pageParams:[]},p=0;const h=async()=>{let g=!1;const y=w=>{G2(w,()=>n.signal,()=>g=!0)},x=mb(n.options,n.fetchOptions),b=async(w,k,j)=>{if(g)return Promise.reject();if(k==null&&w.pages.length)return Promise.resolve(w);const R=(()=>{const L={client:n.client,queryKey:n.queryKey,pageParam:k,direction:j?"backward":"forward",meta:n.options.meta};return y(L),L})(),T=await x(R),{maxPages:V}=n.options,X=j?V2:F2;return{pages:X(w.pages,T,V),pageParams:X(w.pageParams,k,V)}};if(s&&u.length){const w=s==="backward",k=w?rN:H0,j={pages:u,pageParams:c},_=k(a,j);f=await b(j,_,w)}else{const w=e??u.length;do{const k=p===0?c[0]??a.initialPageParam:H0(a,f);if(p>0&&k==null)break;f=await b(f,k),p++}while(p<w)}return f};n.options.persister?n.fetchFn=()=>n.options.persister?.(h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},i):n.fetchFn=h}}}function H0(e,{pages:n,pageParams:i}){const a=n.length-1;return n.length>0?e.getNextPageParam(n[a],n,i[a],i):void 0}function rN(e,{pages:n,pageParams:i}){return n.length>0?e.getPreviousPageParam?.(n[0],n,i[0],i):void 0}var iN=class extends vb{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||bb(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(n=>n!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#r({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=yb({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#r({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",s=!this.#i.canStart();try{if(a)n();else{this.#r({type:"pending",variables:e,isPaused:s}),await this.#n.config.onMutate?.(e,this,i);const c=await this.options.onMutate?.(e,i);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:s})}const u=await this.#i.start();return await this.#n.config.onSuccess?.(u,e,this.state.context,this,i),await this.options.onSuccess?.(u,e,this.state.context,i),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(u,null,e,this.state.context,i),this.#r({type:"success",data:u}),u}catch(u){try{await this.#n.config.onError?.(u,e,this.state.context,this,i)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,e,this.state.context,i)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,i)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,e,this.state.context,i)}catch(c){Promise.reject(c)}throw this.#r({type:"error",error:u}),u}finally{this.#n.runNext(this)}}#r(e){const n=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),bt.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function bb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var aN=class extends Na{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,i){const a=new iN({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:i});return this.add(a),a}add(e){this.#e.add(e);const n=bo(e);if(typeof n=="string"){const i=this.#t.get(n);i?i.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=bo(e);if(typeof n=="string"){const i=this.#t.get(n);if(i)if(i.length>1){const a=i.indexOf(e);a!==-1&&i.splice(a,1)}else i[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=bo(e);if(typeof n=="string"){const a=this.#t.get(n)?.find(s=>s.state.status==="pending");return!a||a===e}else return!0}runNext(e){const n=bo(e);return typeof n=="string"?this.#t.get(n)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){bt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(i=>L0(n,i))}findAll(e={}){return this.getAll().filter(n=>L0(e,n))}notify(e){bt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return bt.batch(()=>Promise.all(e.map(n=>n.continue().catch(Mt))))}};function bo(e){return e.options.scope?.id}var lN=class extends Na{#e;#t=void 0;#n;#i;constructor(n,i){super(),this.#e=n,this.setOptions(i),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const i=this.options;this.options=this.#e.defaultMutationOptions(n),Do(this.options,i)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),i?.mutationKey&&this.options.mutationKey&&gi(i.mutationKey)!==gi(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(n){this.#r(),this.#l(n)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#l()}mutate(n,i){return this.#i=i,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(n)}#r(){const n=this.#n?.state??bb();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#l(n){bt.batch(()=>{if(this.#i&&this.hasListeners()){const i=this.#t.variables,a=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(n?.type==="success"){try{this.#i.onSuccess?.(n.data,i,a,s)}catch(u){Promise.reject(u)}try{this.#i.onSettled?.(n.data,null,i,a,s)}catch(u){Promise.reject(u)}}else if(n?.type==="error"){try{this.#i.onError?.(n.error,i,a,s)}catch(u){Promise.reject(u)}try{this.#i.onSettled?.(void 0,n.error,i,a,s)}catch(u){Promise.reject(u)}}}this.listeners.forEach(i=>{i(this.#t)})})}},sN=class extends Na{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,i){const a=n.queryKey,s=n.queryHash??zh(a,n);let u=this.get(s);return u||(u=new W2({client:e,queryKey:a,queryHash:s,options:e.defaultQueryOptions(n),state:i,defaultOptions:e.getQueryDefaults(a)}),this.add(u)),u}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){bt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(i=>M0(n,i))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(i=>M0(e,i)):n}notify(e){bt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){bt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){bt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},oN=class{#e;#t;#n;#i;#r;#l;#s;#a;constructor(e={}){this.#e=e.queryCache||new sN,this.#t=e.mutationCache||new aN,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#l=0}mount(){this.#l++,this.#l===1&&(this.#s=Lh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Mo.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#l--,this.#l===0&&(this.#s?.(),this.#s=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),i=this.#e.build(this,n),a=i.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(Hr(n.staleTime,i))&&this.prefetchQuery(n),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:i})=>{const a=i.data;return[n,a]})}setQueryData(e,n,i){const a=this.defaultQueryOptions({queryKey:e}),u=this.#e.get(a.queryHash)?.state.data,c=P2(n,u);if(c!==void 0)return this.#e.build(this,a).setData(c,{...i,manual:!0})}setQueriesData(e,n,i){return bt.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,n,i)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;bt.batch(()=>{n.findAll(e).forEach(i=>{n.remove(i)})})}resetQueries(e,n){const i=this.#e;return bt.batch(()=>(i.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const i={revert:!0,...n},a=bt.batch(()=>this.#e.findAll(e).map(s=>s.cancel(i)));return Promise.all(a).then(Mt).catch(Mt)}invalidateQueries(e,n={}){return bt.batch(()=>(this.#e.findAll(e).forEach(i=>{i.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const i={...n,cancelRefetch:n.cancelRefetch??!0},a=bt.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let u=s.fetch(void 0,i);return i.throwOnError||(u=u.catch(Mt)),s.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(a).then(Mt)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const i=this.#e.build(this,n);return i.isStaleByTime(Hr(n.staleTime,i))?i.fetch(n):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Mt).catch(Mt)}fetchInfiniteQuery(e){return e.behavior=Z0(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Mt).catch(Mt)}ensureInfiniteQueryData(e){return e.behavior=Z0(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Mo.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#i.set(gi(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#i.values()],i={};return n.forEach(a=>{Ll(e,a.queryKey)&&Object.assign(i,a.defaultOptions)}),i}setMutationDefaults(e,n){this.#r.set(gi(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#r.values()],i={};return n.forEach(a=>{Ll(e,a.mutationKey)&&Object.assign(i,a.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=zh(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Dh&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Sb=O.createContext(void 0),Tn=e=>{const n=O.useContext(Sb);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},uN=({client:e,children:n})=>(O.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(Sb.Provider,{value:e,children:n})),wb=O.createContext(!1),cN=()=>O.useContext(wb);wb.Provider;function fN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var dN=O.createContext(fN()),hN=()=>O.useContext(dN),pN=(e,n,i)=>{const a=i?.state.error&&typeof e.throwOnError=="function"?Mh(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(n.isReset()||(e.retryOnMount=!1))},mN=e=>{O.useEffect(()=>{e.clearReset()},[e])},gN=({result:e,errorResetBoundary:n,throwOnError:i,query:a,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||Mh(i,[e.error,a])),yN=e=>{if(e.suspense){const i=s=>s==="static"?s:Math.max(s??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...s)=>i(a(...s)):i(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},vN=(e,n)=>e.isLoading&&e.isFetching&&!n,xN=(e,n)=>e?.suspense&&n.isPending,F0=(e,n,i)=>n.fetchOptimistic(e).catch(()=>{i.clearReset()});function bN(e,n,i){const a=cN(),s=hN(),u=Tn(),c=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const f=u.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",yN(c),pN(c,s,f),mN(s);const p=!u.getQueryCache().get(c.queryHash),[h]=O.useState(()=>new n(u,c)),g=h.getOptimisticResult(c),y=!a&&e.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(x=>{const b=y?h.subscribe(bt.batchCalls(x)):Mt;return h.updateResult(),b},[h,y]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),O.useEffect(()=>{h.setOptions(c)},[c,h]),xN(c,g))throw F0(c,h,s);if(gN({result:g,errorResetBoundary:s,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw g.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(c,g),c.experimental_prefetchInRender&&!mi&&vN(g,a)&&(p?F0(c,h,s):f?.promise)?.catch(Mt).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?g:h.trackResult(g)}function an(e,n){return bN(e,eN)}function wn(e,n){const i=Tn(),[a]=O.useState(()=>new lN(i,e));O.useEffect(()=>{a.setOptions(e)},[a,e]);const s=O.useSyncExternalStore(O.useCallback(c=>a.subscribe(bt.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),u=O.useCallback((c,f)=>{a.mutate(c,f).catch(Mt)},[a]);if(s.error&&Mh(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:u,mutateAsync:s.mutate}}const SN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),wN=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,a)=>a?a.toUpperCase():i.toLowerCase()),V0=e=>{const n=wN(e);return n.charAt(0).toUpperCase()+n.slice(1)},Eb=(...e)=>e.filter((n,i,a)=>!!n&&n.trim()!==""&&a.indexOf(n)===i).join(" ").trim(),EN=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var kN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const _N=O.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:s="",children:u,iconNode:c,...f},p)=>O.createElement("svg",{ref:p,...kN,width:n,height:n,stroke:e,strokeWidth:a?Number(i)*24/Number(n):i,className:Eb("lucide",s),...!u&&!EN(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,g])=>O.createElement(h,g)),...Array.isArray(u)?u:[u]]));const rt=(e,n)=>{const i=O.forwardRef(({className:a,...s},u)=>O.createElement(_N,{ref:u,iconNode:n,className:Eb(`lucide-${SN(V0(e))}`,`lucide-${e}`,a),...s}));return i.displayName=V0(e),i};const NN=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],jN=rt("chart-column",NN);const CN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],kb=rt("check",CN);const TN=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],RN=rt("chevron-left",TN);const AN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ON=rt("chevron-right",AN);const zN=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],_b=rt("clipboard-list",zN);const DN=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],MN=rt("download",DN);const LN=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],nh=rt("heart",LN);const UN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],$N=rt("info",UN);const IN=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],$h=rt("key",IN);const qN=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],BN=rt("log-out",qN);const PN=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],ZN=rt("mail",PN);const HN=[["path",{d:"M12 3v6",key:"1holv5"}],["path",{d:"M16.76 3a2 2 0 0 1 1.8 1.1l2.23 4.479a2 2 0 0 1 .21.891V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9.472a2 2 0 0 1 .211-.894L5.45 4.1A2 2 0 0 1 7.24 3z",key:"187q7i"}],["path",{d:"M3.054 9.013h17.893",key:"grwhos"}]],FN=rt("package-2",HN);const VN=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],yi=rt("package",VN);const GN=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],QN=rt("pen",GN);const YN=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],XN=rt("save",YN);const KN=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Qo=rt("shield",KN);const JN=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],WN=rt("smartphone",JN);const ej=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],tj=rt("trash-2",ej);const nj=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],rj=rt("triangle-alert",nj);const ij=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],G0=rt("upload",ij);const aj=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],lj=rt("user-plus",aj);const sj=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],rh=rt("user",sj);const oj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],vi=rt("x",oj),Vl="/api",uj="composer_proxy_admin_token";function Gl(){return typeof window<"u"?localStorage.getItem(uj):null}async function Ke(e,n={}){const i=Gl(),a={"Content-Type":"application/json",...n.headers};i&&(a.Authorization=`Bearer ${i}`);const s=await fetch(`${Vl}${e}`,{...n,headers:a});if(!s.ok){const u=await s.json().catch(()=>({message:"Unknown error"}));throw new Error(u.message||`HTTP ${s.status}`)}return s.json()}async function cj(){try{const n=await(await fetch(`${Vl}/auth/check`,{headers:{"Content-Type":"application/json"}})).json();return{authRequired:n.authRequired??!0,setupRequired:n.setupRequired??!1}}catch{return{authRequired:!0,setupRequired:!1}}}async function fj(e){return Ke("/setup",{method:"POST",body:JSON.stringify(e)})}async function dj(){return Ke("/stats")}async function Nb(){return Ke("/repositories")}async function hj(e){return Ke("/repositories",{method:"POST",body:JSON.stringify(e)})}async function pj(e,n){return Ke(`/repositories/${e}`,{method:"PUT",body:JSON.stringify(n)})}async function mj(e){return Ke(`/repositories/${e}`,{method:"DELETE"})}async function gj(e){return Ke(`/repositories/${e}/sync`,{method:"POST"})}async function yj(){return Ke("/tokens")}async function vj(e){return Ke("/tokens",{method:"POST",body:JSON.stringify(e)})}async function xj(e,n){return Ke(`/tokens/${e}`,{method:"PATCH",body:JSON.stringify(n)})}async function bj(e){return Ke(`/tokens/${e}`,{method:"DELETE"})}async function Sj(e){const n=new URLSearchParams;e?.search&&n.set("search",e.search),e?.page&&n.set("page",e.page.toString()),e?.limit&&n.set("limit",e.limit.toString());const i=n.toString();return Ke(`/packages${i?`?${i}`:""}`)}async function wj(e){return Ke(`/packages/${encodeURIComponent(e)}`)}async function Ej(e){const n=Gl(),i=new FormData;i.append("file",e);const a={};n&&(a.Authorization=`Bearer ${n}`);const s=await fetch(`${Vl}/packages/upload`,{method:"POST",headers:a,body:i});if(!s.ok){const u=await s.json().catch(()=>({message:"Upload failed"}));throw u.details&&u.details.length>0?new Error(`${u.message||"Upload failed"}
12
+ ${u.details.join(`
13
+ `)}`):new Error(u.message||`HTTP ${s.status}`)}return s.json()}async function kj(e,n){const i=Gl(),a={"Content-Type":"text/markdown"};i&&(a.Authorization=`Bearer ${i}`);const s=await fetch(`${Vl}/packages/${encodeURIComponent(e)}/${encodeURIComponent(n)}/readme`,{headers:a});if(!s.ok){if(s.status===404)return null;throw new Error(`HTTP ${s.status}`)}return s.text()}async function _j(e,n){const i=Gl(),a={"Content-Type":"text/markdown"};i&&(a.Authorization=`Bearer ${i}`);const s=await fetch(`${Vl}/packages/${encodeURIComponent(e)}/${encodeURIComponent(n)}/changelog`,{headers:a});if(!s.ok){if(s.status===404)return null;throw new Error(`HTTP ${s.status}`)}return s.text()}async function Nj(e,n){return Ke(`/packages/${encodeURIComponent(e)}/${encodeURIComponent(n)}/stats`)}async function jb(e,n){return Ke(`/packages/${encodeURIComponent(e)}/${encodeURIComponent(n)}`,{method:"DELETE"})}async function Yo(){return Ke("/settings")}async function jj(e){return Ke("/settings/packagist-mirroring",{method:"PUT",body:JSON.stringify({enabled:e})})}async function Cj(e,n){return Ke("/packages/add-from-mirror",{method:"POST",body:JSON.stringify({repository_id:e,package_names:n})})}async function Tj(){return Ke("/users").then(e=>e.users)}async function Rj(e){return Ke("/users",{method:"POST",body:JSON.stringify(e)})}async function Aj(e){return Ke(`/users/${e}`,{method:"DELETE"})}async function Oj(){return Ke("/auth/2fa/setup",{method:"POST"})}async function zj(e,n){return Ke("/auth/2fa/enable",{method:"POST",body:JSON.stringify({secret:e,code:n})})}async function Dj(){return Ke("/auth/2fa/disable",{method:"POST"})}async function Mj(e,n){return Ke("/auth/invite/accept",{method:"POST",body:JSON.stringify({token:e,password:n})})}const Q0="composer_proxy_sponsor_banner_dismissed";function Lj(){const[e,n]=O.useState(!1);O.useEffect(()=>{if(typeof window<"u"){const a=localStorage.getItem(Q0);n(a==="true")}},[]);const i=()=>{n(!0),typeof window<"u"&&localStorage.setItem(Q0,"true")};return e?null:v.jsxs("div",{className:"relative bg-gradient-to-r from-pink-500/10 via-purple-500/10 to-pink-500/10 border border-pink-500/20 rounded-lg p-4 mb-6",children:[v.jsx("button",{onClick:i,className:"absolute top-2 right-2 text-slate-400 hover:text-slate-200 transition","aria-label":"Dismiss",children:v.jsx(vi,{className:"w-4 h-4"})}),v.jsx("div",{className:"pr-8",children:v.jsxs("div",{className:"flex items-start gap-3",children:[v.jsx(nh,{className:"w-6 h-6 text-pink-400 fill-pink-400"}),v.jsxs("div",{className:"flex-1",children:[v.jsx("p",{className:"text-slate-200 font-medium mb-1",children:"Enjoying this project? Consider sponsoring!"}),v.jsx("p",{className:"text-slate-400 text-sm mb-3",children:"Built during evenings and weekends. Your support helps keep it going and funds new features, better docs, and faster bug fixes."}),v.jsxs("a",{href:"https://github.com/sponsors/lbajsarowicz",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-pink-500 to-purple-600 hover:from-pink-600 hover:to-purple-700 text-white text-sm font-semibold rounded-lg shadow-lg shadow-pink-500/25 transition",children:[v.jsx(nh,{className:"w-4 h-4 fill-current"}),v.jsx("span",{children:"Sponsor on GitHub"})]})]})]})})]})}function Uj(){const{data:e,isLoading:n,error:i}=an({queryKey:["stats"],queryFn:dj}),a=[{title:"Active Repositories",value:e?.active_repos??0,icon:yi,color:"from-primary-500 to-primary-700"},{title:"Cached Packages",value:e?.cached_packages??0,icon:_b,color:"from-accent-500 to-accent-700"},{title:"Total Downloads",value:e?.total_downloads??0,icon:MN,color:"from-emerald-500 to-emerald-700"}];return i?(console.error("Dashboard Error:",i),v.jsx("div",{className:"card p-6","data-testid":"dashboard-error",children:v.jsxs("p",{className:"text-red-400",children:["Error loading stats: ",i.message]})})):v.jsxs("div",{className:"space-y-8","data-testid":"dashboard-page",children:[v.jsxs("div",{children:[v.jsx("h2",{className:"font-display text-2xl font-bold text-slate-100 mb-2","data-testid":"dashboard-heading",children:"Dashboard"}),v.jsx("p",{className:"text-slate-400",children:"Overview of your Composer proxy"})]}),v.jsx(Lj,{}),v.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6","data-testid":"stats-cards",children:a.map(s=>v.jsxs("div",{className:"card p-6","data-testid":`stat-card-${s.title.toLowerCase().replace(/\s+/g,"-")}`,children:[v.jsxs("div",{className:"flex items-center justify-between mb-4",children:[v.jsx("div",{className:`w-12 h-12 rounded-xl bg-gradient-to-br ${s.color} flex items-center justify-center shadow-lg`,children:v.jsx(s.icon,{className:"w-6 h-6 text-white"})}),n&&v.jsx("div",{className:"w-6 h-6 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin","aria-label":"Loading"})]}),v.jsx("p",{className:"text-slate-400 text-sm mb-1",children:s.title}),v.jsx("p",{className:"font-display text-3xl font-bold text-slate-100",children:n?"...":s.value.toLocaleString()})]},s.title))}),v.jsxs("div",{className:"card p-6","data-testid":"quick-start-section",children:[v.jsx("h3",{className:"font-display text-lg font-semibold text-slate-100 mb-4",children:"Quick Start"}),v.jsxs("div",{className:"space-y-4 text-slate-300",children:[v.jsxs("div",{className:"flex items-start gap-3",children:[v.jsx("span",{className:"text-primary-400 font-bold",children:"1."}),v.jsxs("p",{children:["Add a ",v.jsx("strong",{children:"repository source"})," in the Repositories tab"]})]}),v.jsxs("div",{className:"flex items-start gap-3",children:[v.jsx("span",{className:"text-primary-400 font-bold",children:"2."}),v.jsxs("p",{children:["Generate an ",v.jsx("strong",{children:"access token"})," in the Access Tokens tab"]})]}),v.jsxs("div",{className:"flex items-start gap-3",children:[v.jsx("span",{className:"text-primary-400 font-bold",children:"3."}),v.jsxs("div",{className:"flex-1",children:[v.jsx("p",{className:"mb-3",children:"Configure your project to use this proxy:"}),v.jsxs("div",{className:"mb-4","data-testid":"composer-cli-config",children:[v.jsx("p",{className:"text-sm text-slate-400 mb-2",children:"Using Composer CLI:"}),v.jsx("pre",{className:"bg-slate-950 rounded-lg p-4 overflow-x-auto text-sm text-slate-300",children:v.jsxs("code",{"data-testid":"composer-cli-command",children:["composer config repositories.proxy composer ",window.location.origin]})})]}),v.jsxs("div",{"data-testid":"composer-json-config",children:[v.jsx("p",{className:"text-sm text-slate-400 mb-2",children:"Or manually edit composer.json:"}),v.jsx("pre",{className:"bg-slate-950 rounded-lg p-4 overflow-x-auto text-sm text-slate-300",children:v.jsx("code",{"data-testid":"composer-json-code",children:`{
14
+ "repositories": [
15
+ {
16
+ "type": "composer",
17
+ "url": "${window.location.origin}"
18
+ }
19
+ ]
20
+ }`})})]})]})]})]})]})]})}const Lo={http_basic:{label:"HTTP Basic (Username/Password)",fields:[{name:"username",label:"Username",type:"text"},{name:"password",label:"Password",type:"password"}]},github_token:{label:"GitHub Token",fields:[{name:"token",label:"Personal Access Token",type:"password"}]},gitlab_token:{label:"GitLab Token",fields:[{name:"token",label:"Personal/Project Access Token",type:"password"}]},bitbucket_app_password:{label:"Bitbucket App Password",fields:[{name:"username",label:"Username",type:"text"},{name:"password",label:"App Password",type:"password"}]},bitbucket_api_token:{label:"Bitbucket API Token",fields:[{name:"token",label:"Token",type:"password"}]},bitbucket_api_key:{label:"Bitbucket API Key",fields:[{name:"key",label:"API Key",type:"password"}]},bitbucket_server_pat:{label:"Bitbucket Server PAT",fields:[{name:"token",label:"Personal Access Token",type:"password"}]},bearer_token:{label:"Bearer Token",fields:[{name:"token",label:"Token",type:"password"}]},none:{label:"No Authentication",fields:[]}},Uo={composer:["http_basic","bearer_token"],git:["github_token","gitlab_token","bitbucket_app_password","bitbucket_api_token","bitbucket_api_key","bitbucket_server_pat"]};function va(e,n){var i={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(i[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(e);s<a.length;s++)n.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(i[a[s]]=e[a[s]]);return i}const $j={ZodAny:"any",ZodArray:"array",ZodBigInt:"bigint",ZodBoolean:"boolean",ZodDefault:"default",ZodPrefault:"prefault",ZodTransform:"transform",ZodEnum:"enum",ZodIntersection:"intersection",ZodLazy:"lazy",ZodLiteral:"literal",ZodNever:"never",ZodNull:"null",ZodNullable:"nullable",ZodNumber:"number",ZodNonOptional:"nonoptional",ZodObject:"object",ZodOptional:"optional",ZodPipe:"pipe",ZodReadonly:"readonly",ZodRecord:"record",ZodString:"string",ZodTuple:"tuple",ZodType:"type",ZodUnion:"union",ZodDiscriminatedUnion:"union",ZodUnknown:"unknown",ZodVoid:"void",ZodDate:"date",ZodTemplateLiteral:"template_literal"};function fr(e,n){return(Array.isArray(n)?n:[n]).some(a=>{var s;const u=((s=e?.def)===null||s===void 0?void 0:s.type)===$j[a];return a==="ZodDiscriminatedUnion"?u&&"discriminator"in e.def:u})}function fa(e){return e&&"def"in e}let Ij=class{constructor(){this._map=new Map,this._idmap=new Map}add(n,...i){const a=i[0];if(this._map.set(n,a),a&&typeof a=="object"&&"id"in a){if(this._idmap.has(a.id))throw new Error(`ID ${a.id} already exists in the registry`);this._idmap.set(a.id,n)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(n){const i=this._map.get(n);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(n),this}get(n){const i=n._zod.parent;if(i){const a={...this.get(i)??{}};return delete a.id,{...a,...this._map.get(n)}}return this._map.get(n)}has(n){return this._map.has(n)}};function qj(){return new Ij}function Mf(e){return e===void 0}function Bj(e,n){const i={};return Object.entries(e).forEach(([a,s])=>{n.some(u=>u===a)||(i[a]=s)}),i}function Lf(e,n){const i={};return Object.entries(e).forEach(([a,s])=>{n(s,a)||(i[a]=s)}),i}const Y0=qj();class Zr{static collectMetadata(n,i){const a=this.getMetadataFromRegistry(n),s=Object.assign(Object.assign({},a?._internal),i?._internal),u=Object.assign(Object.assign({},a?.param),i?.param),c=Object.assign(Object.assign(Object.assign(Object.assign({},Object.keys(s).length>0?{_internal:s}:{}),a),i),Object.keys(u).length>0?{param:u}:{});if(fr(n,["ZodOptional","ZodNullable","ZodDefault","ZodPrefault","ZodReadonly","ZodNonOptional"])&&fa(n._zod.def.innerType))return this.collectMetadata(n._zod.def.innerType,c);if(fr(n,"ZodPipe")){const f=n._zod.def.in,p=n._zod.def.out;if(fr(f,"ZodTransform")&&fa(p))return this.collectMetadata(p,c);if(fa(f))return this.collectMetadata(f,c)}return c}static getMetadata(n){return this.collectMetadata(n)}static getOpenApiMetadata(n){const i=this.collectMetadata(n);return va(i??{},["_internal"])}static getInternalMetadata(n){var i;return(i=this.collectMetadata(n))===null||i===void 0?void 0:i._internal}static getParamMetadata(n){const i=this.collectMetadata(n);return Object.assign(Object.assign({},i),{param:Object.assign(Object.assign({},i?.description?{description:i.description}:{}),i?.param)})}static buildSchemaMetadata(n){return Lf(Bj(n,["param","_internal"]),Mf)}static buildParameterMetadata(n){return Lf(n,Mf)}static applySchemaMetadata(n,i){return Lf(Object.assign(Object.assign({},n),this.buildSchemaMetadata(i)),Mf)}static getRefId(n){var i;return(i=this.getInternalMetadata(n))===null||i===void 0?void 0:i.refId}static unwrapChained(n){return this.unwrapUntil(n)}static getDefaultValue(n){var i;const a=(i=this.unwrapUntil(n,"ZodDefault"))!==null&&i!==void 0?i:this.unwrapUntil(n,"ZodPrefault");return a?._zod.def.defaultValue}static unwrapUntil(n,i){if(i&&fr(n,i))return n;if(fr(n,["ZodOptional","ZodNullable","ZodDefault","ZodPrefault","ZodReadonly","ZodNonOptional"])&&fa(n._zod.def.innerType))return this.unwrapUntil(n._zod.def.innerType,i);if(fr(n,"ZodPipe")){const a=n._zod.def.in,s=n._zod.def.out;if(fr(a,"ZodTransform")&&fa(s))return this.unwrapUntil(s,i);if(fa(a))return this.unwrapUntil(a,i)}return i?void 0:n}static getMetadataFromInternalRegistry(n){return Y0.get(n)}static getMetadataFromRegistry(n){const i=this.getMetadataFromInternalRegistry(n),a=n.meta();if(!i)return a;const{_internal:s}=i,u=va(i,["_internal"]),c=a??{},{id:f,title:p}=c,h=va(c,["id","title"]);return Object.assign(Object.assign(Object.assign({_internal:Object.assign(Object.assign({},f?{refId:f}:{}),s)},u),p?{description:p}:{}),h)}static setMetadataInRegistry(n,i){Y0.add(n,i)}}function ur(e,n){const i=e[n];typeof i=="function"&&(e[n]=function(...a){const s=i.apply(this,a),u=Zr.getMetadataFromRegistry(this);return u&&Zr.setMetadataInRegistry(s,u),s})}function Pj(e){typeof e.ZodType.prototype.openapi<"u"||(e.ZodType.prototype.openapi=function(...n){const{refId:i,metadata:a,options:s}=Zj(...n),u=a??{},{param:c}=u,f=va(u,["param"]),p=Zr.getMetadataFromRegistry(this),h=p??{},{_internal:g}=h,y=va(h,["_internal"]),x=Object.assign(Object.assign(Object.assign({},g),s),i?{refId:i}:void 0),b=Object.assign(Object.assign(Object.assign({},y),f),y?.param||c?{param:Object.assign(Object.assign({},y?.param),c)}:void 0),w=new this.constructor(this._def);function k(_){Zr.setMetadataInRegistry(_,Object.assign(Object.assign({},Object.keys(x).length>0?{_internal:x}:void 0),b))}if(k(w),fr(w,"ZodLazy")&&k(this),fr(w,"ZodObject")){const _=Zr.getMetadataFromRegistry(w),R=w.extend;w.extend=function(...T){const V=R.apply(w,T),X=_??{},{_internal:L}=X,Z=va(X,["_internal"]);return Zr.setMetadataInRegistry(V,{_internal:{extendedFrom:L?.refId?{refId:L.refId,schema:w}:L?.extendedFrom}}),V.openapi(Z)},ur(w,"catchall")}ur(w,"optional"),ur(w,"nullable"),ur(w,"default"),ur(w,"transform"),ur(w,"refine"),ur(w,"length"),ur(w,"min"),ur(w,"max");const j=w.meta;return w.meta=function(..._){const R=j.apply(this,_);if(_[0]){const T=Zr.getMetadataFromInternalRegistry(this);T&&Zr.setMetadataInRegistry(R,Object.assign(Object.assign({},T),_[0]))}return R},w})}function Zj(e,n,i){return typeof e=="string"?{refId:e,metadata:n,options:i}:{refId:void 0,metadata:e,options:n}}new Set(".\\+*[^]$()");function ee(e,n,i){function a(f,p){if(f._zod||Object.defineProperty(f,"_zod",{value:{def:p,constr:c,traits:new Set},enumerable:!1}),f._zod.traits.has(e))return;f._zod.traits.add(e),n(f,p);const h=c.prototype,g=Object.keys(h);for(let y=0;y<g.length;y++){const x=g[y];x in f||(f[x]=h[x].bind(f))}}const s=i?.Parent??Object;class u extends s{}Object.defineProperty(u,"name",{value:e});function c(f){var p;const h=i?.Parent?new u:this;a(h,f),(p=h._zod).deferred??(p.deferred=[]);for(const g of h._zod.deferred)g();return h}return Object.defineProperty(c,"init",{value:a}),Object.defineProperty(c,Symbol.hasInstance,{value:f=>i?.Parent&&f instanceof i.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class xa extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Cb extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const ih={};function $n(e){return e&&Object.assign(ih,e),ih}function Tb(e){const n=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,s])=>n.indexOf(+a)===-1).map(([a,s])=>s)}function X0(e,n="|"){return e.map(i=>Ob(i)).join(n)}function ah(e,n){return typeof n=="bigint"?n.toString():n}function Ih(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function qh(e){return e==null}function Bh(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function Hj(e,n){const i=(e.toString().split(".")[1]||"").length,a=n.toString();let s=(a.split(".")[1]||"").length;if(s===0&&/\d?e-\d?/.test(a)){const p=a.match(/\d?e-(\d?)/);p?.[1]&&(s=Number.parseInt(p[1]))}const u=i>s?i:s,c=Number.parseInt(e.toFixed(u).replace(".","")),f=Number.parseInt(n.toFixed(u).replace(".",""));return c%f/10**u}const K0=Symbol("evaluating");function qe(e,n,i){let a;Object.defineProperty(e,n,{get(){if(a!==K0)return a===void 0&&(a=K0,a=i()),a},set(s){Object.defineProperty(e,n,{value:s})},configurable:!0})}function bi(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function Vr(...e){const n={};for(const i of e){const a=Object.getOwnPropertyDescriptors(i);Object.assign(n,a)}return Object.defineProperties({},n)}function J0(e){return JSON.stringify(e)}function Fj(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Rb="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function $o(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Vj=Ih(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function wa(e){if($o(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!($o(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Ab(e){return wa(e)?{...e}:Array.isArray(e)?[...e]:e}const Gj=new Set(["string","number","symbol"]);function Xo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pr(e,n,i){const a=new e._zod.constr(n??e._zod.def);return(!n||i?.parent)&&(a._zod.parent=e),a}function me(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function Ob(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Qj(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const Yj={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]};function Xj(e,n){const i=e._zod.def,a=i.checks;if(a&&a.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=Vr(e._zod.def,{get shape(){const c={};for(const f in n){if(!(f in i.shape))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(c[f]=i.shape[f])}return bi(this,"shape",c),c},checks:[]});return pr(e,u)}function Kj(e,n){const i=e._zod.def,a=i.checks;if(a&&a.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=Vr(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const f in n){if(!(f in i.shape))throw new Error(`Unrecognized key: "${f}"`);n[f]&&delete c[f]}return bi(this,"shape",c),c},checks:[]});return pr(e,u)}function Jj(e,n){if(!wa(n))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const u=e._zod.def.shape;for(const c in n)if(Object.getOwnPropertyDescriptor(u,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const s=Vr(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return bi(this,"shape",u),u}});return pr(e,s)}function Wj(e,n){if(!wa(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=Vr(e._zod.def,{get shape(){const a={...e._zod.def.shape,...n};return bi(this,"shape",a),a}});return pr(e,i)}function eC(e,n){const i=Vr(e._zod.def,{get shape(){const a={...e._zod.def.shape,...n._zod.def.shape};return bi(this,"shape",a),a},get catchall(){return n._zod.def.catchall},checks:[]});return pr(e,i)}function tC(e,n,i){const s=n._zod.def.checks;if(s&&s.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=Vr(n._zod.def,{get shape(){const f=n._zod.def.shape,p={...f};if(i)for(const h in i){if(!(h in f))throw new Error(`Unrecognized key: "${h}"`);i[h]&&(p[h]=e?new e({type:"optional",innerType:f[h]}):f[h])}else for(const h in f)p[h]=e?new e({type:"optional",innerType:f[h]}):f[h];return bi(this,"shape",p),p},checks:[]});return pr(n,c)}function nC(e,n,i){const a=Vr(n._zod.def,{get shape(){const s=n._zod.def.shape,u={...s};if(i)for(const c in i){if(!(c in u))throw new Error(`Unrecognized key: "${c}"`);i[c]&&(u[c]=new e({type:"nonoptional",innerType:s[c]}))}else for(const c in s)u[c]=new e({type:"nonoptional",innerType:s[c]});return bi(this,"shape",u),u}});return pr(n,a)}function ma(e,n=0){if(e.aborted===!0)return!0;for(let i=n;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function ga(e,n){return n.map(i=>{var a;return(a=i).path??(a.path=[]),i.path.unshift(e),i})}function So(e){return typeof e=="string"?e:e?.message}function Fr(e,n,i){const a={...e,path:e.path??[]};if(!e.message){const s=So(e.inst?._zod.def?.error?.(e))??So(n?.error?.(e))??So(i.customError?.(e))??So(i.localeError?.(e))??"Invalid input";a.message=s}return delete a.inst,delete a.continue,n?.reportInput||delete a.input,a}function Ph(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function rC(e){const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const i=e;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return n}function Ul(...e){const[n,i,a]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:a}:{...n}}const zb=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,ah,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Db=ee("$ZodError",zb),Mb=ee("$ZodError",zb,{Parent:Error});function Lb(e,n=i=>i.message){const i={},a=[];for(const s of e.issues)s.path.length>0?(i[s.path[0]]=i[s.path[0]]||[],i[s.path[0]].push(n(s))):a.push(n(s));return{formErrors:a,fieldErrors:i}}function Ub(e,n=i=>i.message){const i={_errors:[]},a=s=>{for(const u of s.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(c=>a({issues:c}));else if(u.code==="invalid_key")a({issues:u.issues});else if(u.code==="invalid_element")a({issues:u.issues});else if(u.path.length===0)i._errors.push(n(u));else{let c=i,f=0;for(;f<u.path.length;){const p=u.path[f];f===u.path.length-1?(c[p]=c[p]||{_errors:[]},c[p]._errors.push(n(u))):c[p]=c[p]||{_errors:[]},c=c[p],f++}}};return a(e),i}const Zh=e=>(n,i,a,s)=>{const u=a?Object.assign(a,{async:!1}):{async:!1},c=n._zod.run({value:i,issues:[]},u);if(c instanceof Promise)throw new xa;if(c.issues.length){const f=new(s?.Err??e)(c.issues.map(p=>Fr(p,u,$n())));throw Rb(f,s?.callee),f}return c.value},Hh=e=>async(n,i,a,s)=>{const u=a?Object.assign(a,{async:!0}):{async:!0};let c=n._zod.run({value:i,issues:[]},u);if(c instanceof Promise&&(c=await c),c.issues.length){const f=new(s?.Err??e)(c.issues.map(p=>Fr(p,u,$n())));throw Rb(f,s?.callee),f}return c.value},Ko=e=>(n,i,a)=>{const s=a?{...a,async:!1}:{async:!1},u=n._zod.run({value:i,issues:[]},s);if(u instanceof Promise)throw new xa;return u.issues.length?{success:!1,error:new(e??Db)(u.issues.map(c=>Fr(c,s,$n())))}:{success:!0,data:u.value}},iC=Ko(Mb),Jo=e=>async(n,i,a)=>{const s=a?Object.assign(a,{async:!0}):{async:!0};let u=n._zod.run({value:i,issues:[]},s);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(c=>Fr(c,s,$n())))}:{success:!0,data:u.value}},aC=Jo(Mb),lC=e=>(n,i,a)=>{const s=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Zh(e)(n,i,s)},sC=e=>(n,i,a)=>Zh(e)(n,i,a),oC=e=>async(n,i,a)=>{const s=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Hh(e)(n,i,s)},uC=e=>async(n,i,a)=>Hh(e)(n,i,a),cC=e=>(n,i,a)=>{const s=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Ko(e)(n,i,s)},fC=e=>(n,i,a)=>Ko(e)(n,i,a),dC=e=>async(n,i,a)=>{const s=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Jo(e)(n,i,s)},hC=e=>async(n,i,a)=>Jo(e)(n,i,a),pC=/^[cC][^\s-]{8,}$/,mC=/^[0-9a-z]+$/,gC=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,yC=/^[0-9a-vA-V]{20}$/,vC=/^[A-Za-z0-9]{27}$/,xC=/^[a-zA-Z0-9_-]{21}$/,bC=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,SC=/^([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})$/,W0=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[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)$/,wC=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,EC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function kC(){return new RegExp(EC,"u")}const _C=/^(?:(?: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])$/,NC=/^(([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}|:))$/,jC=/^((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])$/,CC=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,TC=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$b=/^[A-Za-z0-9_-]*$/,RC=/^\+[1-9]\d{6,14}$/,Ib="(?:(?:\\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])))",AC=new RegExp(`^${Ib}$`);function qb(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function OC(e){return new RegExp(`^${qb(e)}$`)}function zC(e){const n=qb({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${n}(?:${i.join("|")})`;return new RegExp(`^${Ib}T(?:${a})$`)}const DC=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},MC=/^-?\d+$/,Bb=/^-?\d+(?:\.\d+)?$/,LC=/^(?:true|false)$/i,UC=/^[^A-Z]*$/,$C=/^[^a-z]*$/,Gt=ee("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),Pb={number:"number",bigint:"bigint",object:"date"},Zb=ee("$ZodCheckLessThan",(e,n)=>{Gt.init(e,n);const i=Pb[typeof n.value];e._zod.onattach.push(a=>{const s=a._zod.bag,u=(n.inclusive?s.maximum:s.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<u&&(n.inclusive?s.maximum=n.value:s.exclusiveMaximum=n.value)}),e._zod.check=a=>{(n.inclusive?a.value<=n.value:a.value<n.value)||a.issues.push({origin:i,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:a.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),Hb=ee("$ZodCheckGreaterThan",(e,n)=>{Gt.init(e,n);const i=Pb[typeof n.value];e._zod.onattach.push(a=>{const s=a._zod.bag,u=(n.inclusive?s.minimum:s.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>u&&(n.inclusive?s.minimum=n.value:s.exclusiveMinimum=n.value)}),e._zod.check=a=>{(n.inclusive?a.value>=n.value:a.value>n.value)||a.issues.push({origin:i,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:a.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),IC=ee("$ZodCheckMultipleOf",(e,n)=>{Gt.init(e,n),e._zod.onattach.push(i=>{var a;(a=i._zod.bag).multipleOf??(a.multipleOf=n.value)}),e._zod.check=i=>{if(typeof i.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%n.value===BigInt(0):Hj(i.value,n.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:n.value,input:i.value,inst:e,continue:!n.abort})}}),qC=ee("$ZodCheckNumberFormat",(e,n)=>{Gt.init(e,n),n.format=n.format||"float64";const i=n.format?.includes("int"),a=i?"int":"number",[s,u]=Yj[n.format];e._zod.onattach.push(c=>{const f=c._zod.bag;f.format=n.format,f.minimum=s,f.maximum=u,i&&(f.pattern=MC)}),e._zod.check=c=>{const f=c.value;if(i){if(!Number.isInteger(f)){c.issues.push({expected:a,format:n.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?c.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!n.abort}):c.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:a,inclusive:!0,continue:!n.abort});return}}f<s&&c.issues.push({origin:"number",input:f,code:"too_small",minimum:s,inclusive:!0,inst:e,continue:!n.abort}),f>u&&c.issues.push({origin:"number",input:f,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!n.abort})}}),BC=ee("$ZodCheckMaxLength",(e,n)=>{var i;Gt.init(e,n),(i=e._zod.def).when??(i.when=a=>{const s=a.value;return!qh(s)&&s.length!==void 0}),e._zod.onattach.push(a=>{const s=a._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<s&&(a._zod.bag.maximum=n.maximum)}),e._zod.check=a=>{const s=a.value;if(s.length<=n.maximum)return;const c=Ph(s);a.issues.push({origin:c,code:"too_big",maximum:n.maximum,inclusive:!0,input:s,inst:e,continue:!n.abort})}}),PC=ee("$ZodCheckMinLength",(e,n)=>{var i;Gt.init(e,n),(i=e._zod.def).when??(i.when=a=>{const s=a.value;return!qh(s)&&s.length!==void 0}),e._zod.onattach.push(a=>{const s=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>s&&(a._zod.bag.minimum=n.minimum)}),e._zod.check=a=>{const s=a.value;if(s.length>=n.minimum)return;const c=Ph(s);a.issues.push({origin:c,code:"too_small",minimum:n.minimum,inclusive:!0,input:s,inst:e,continue:!n.abort})}}),ZC=ee("$ZodCheckLengthEquals",(e,n)=>{var i;Gt.init(e,n),(i=e._zod.def).when??(i.when=a=>{const s=a.value;return!qh(s)&&s.length!==void 0}),e._zod.onattach.push(a=>{const s=a._zod.bag;s.minimum=n.length,s.maximum=n.length,s.length=n.length}),e._zod.check=a=>{const s=a.value,u=s.length;if(u===n.length)return;const c=Ph(s),f=u>n.length;a.issues.push({origin:c,...f?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!n.abort})}}),Wo=ee("$ZodCheckStringFormat",(e,n)=>{var i,a;Gt.init(e,n),e._zod.onattach.push(s=>{const u=s._zod.bag;u.format=n.format,n.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(n.pattern))}),n.pattern?(i=e._zod).check??(i.check=s=>{n.pattern.lastIndex=0,!n.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:n.format,input:s.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(a=e._zod).check??(a.check=()=>{})}),HC=ee("$ZodCheckRegex",(e,n)=>{Wo.init(e,n),e._zod.check=i=>{n.pattern.lastIndex=0,!n.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),FC=ee("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=UC),Wo.init(e,n)}),VC=ee("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=$C),Wo.init(e,n)}),GC=ee("$ZodCheckIncludes",(e,n)=>{Gt.init(e,n);const i=Xo(n.includes),a=new RegExp(typeof n.position=="number"?`^.{${n.position}}${i}`:i);n.pattern=a,e._zod.onattach.push(s=>{const u=s._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(a)}),e._zod.check=s=>{s.value.includes(n.includes,n.position)||s.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:s.value,inst:e,continue:!n.abort})}}),QC=ee("$ZodCheckStartsWith",(e,n)=>{Gt.init(e,n);const i=new RegExp(`^${Xo(n.prefix)}.*`);n.pattern??(n.pattern=i),e._zod.onattach.push(a=>{const s=a._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(i)}),e._zod.check=a=>{a.value.startsWith(n.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:a.value,inst:e,continue:!n.abort})}}),YC=ee("$ZodCheckEndsWith",(e,n)=>{Gt.init(e,n);const i=new RegExp(`.*${Xo(n.suffix)}$`);n.pattern??(n.pattern=i),e._zod.onattach.push(a=>{const s=a._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(i)}),e._zod.check=a=>{a.value.endsWith(n.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:a.value,inst:e,continue:!n.abort})}}),XC=ee("$ZodCheckOverwrite",(e,n)=>{Gt.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class KC{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const a=n.split(`
21
+ `).filter(c=>c),s=Math.min(...a.map(c=>c.length-c.trimStart().length)),u=a.map(c=>c.slice(s)).map(c=>" ".repeat(this.indent*2)+c);for(const c of u)this.content.push(c)}compile(){const n=Function,i=this?.args,s=[...(this?.content??[""]).map(u=>` ${u}`)];return new n(...i,s.join(`
22
+ `))}}const JC={major:4,minor:3,patch:5},ot=ee("$ZodType",(e,n)=>{var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=JC;const a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(const s of a)for(const u of s._zod.onattach)u(e);if(a.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const s=(c,f,p)=>{let h=ma(c),g;for(const y of f){if(y._zod.def.when){if(!y._zod.def.when(c))continue}else if(h)continue;const x=c.issues.length,b=y._zod.check(c);if(b instanceof Promise&&p?.async===!1)throw new xa;if(g||b instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await b,c.issues.length!==x&&(h||(h=ma(c,x)))});else{if(c.issues.length===x)continue;h||(h=ma(c,x))}}return g?g.then(()=>c):c},u=(c,f,p)=>{if(ma(c))return c.aborted=!0,c;const h=s(f,a,p);if(h instanceof Promise){if(p.async===!1)throw new xa;return h.then(g=>e._zod.parse(g,p))}return e._zod.parse(h,p)};e._zod.run=(c,f)=>{if(f.skipChecks)return e._zod.parse(c,f);if(f.direction==="backward"){const h=e._zod.parse({value:c.value,issues:[]},{...f,skipChecks:!0});return h instanceof Promise?h.then(g=>u(g,c,f)):u(h,c,f)}const p=e._zod.parse(c,f);if(p instanceof Promise){if(f.async===!1)throw new xa;return p.then(h=>s(h,a,f))}return s(p,a,f)}}qe(e,"~standard",()=>({validate:s=>{try{const u=iC(e,s);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return aC(e,s).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),Fh=ee("$ZodString",(e,n)=>{ot.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??DC(e._zod.bag),e._zod.parse=(i,a)=>{if(n.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:e}),i}}),et=ee("$ZodStringFormat",(e,n)=>{Wo.init(e,n),Fh.init(e,n)}),WC=ee("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=SC),et.init(e,n)}),eT=ee("$ZodUUID",(e,n)=>{if(n.version){const a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(a===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=W0(a))}else n.pattern??(n.pattern=W0());et.init(e,n)}),tT=ee("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=wC),et.init(e,n)}),nT=ee("$ZodURL",(e,n)=>{et.init(e,n),e._zod.check=i=>{try{const a=i.value.trim(),s=new URL(a);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(s.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:i.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(s.protocol.endsWith(":")?s.protocol.slice(0,-1):s.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:i.value,inst:e,continue:!n.abort})),n.normalize?i.value=s.href:i.value=a;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!n.abort})}}}),rT=ee("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=kC()),et.init(e,n)}),iT=ee("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=xC),et.init(e,n)}),aT=ee("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=pC),et.init(e,n)}),lT=ee("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=mC),et.init(e,n)}),sT=ee("$ZodULID",(e,n)=>{n.pattern??(n.pattern=gC),et.init(e,n)}),oT=ee("$ZodXID",(e,n)=>{n.pattern??(n.pattern=yC),et.init(e,n)}),uT=ee("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=vC),et.init(e,n)}),cT=ee("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=zC(n)),et.init(e,n)}),fT=ee("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=AC),et.init(e,n)}),dT=ee("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=OC(n)),et.init(e,n)}),hT=ee("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=bC),et.init(e,n)}),pT=ee("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=_C),et.init(e,n),e._zod.bag.format="ipv4"}),mT=ee("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=NC),et.init(e,n),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!n.abort})}}}),gT=ee("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=jC),et.init(e,n)}),yT=ee("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=CC),et.init(e,n),e._zod.check=i=>{const a=i.value.split("/");try{if(a.length!==2)throw new Error;const[s,u]=a;if(!u)throw new Error;const c=Number(u);if(`${c}`!==u)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${s}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!n.abort})}}});function Fb(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const vT=ee("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=TC),et.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{Fb(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function xT(e){if(!$b.test(e))return!1;const n=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return Fb(i)}const bT=ee("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=$b),et.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{xT(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),ST=ee("$ZodE164",(e,n)=>{n.pattern??(n.pattern=RC),et.init(e,n)});function wT(e,n=null){try{const i=e.split(".");if(i.length!==3)return!1;const[a]=i;if(!a)return!1;const s=JSON.parse(atob(a));return!("typ"in s&&s?.typ!=="JWT"||!s.alg||n&&(!("alg"in s)||s.alg!==n))}catch{return!1}}const ET=ee("$ZodJWT",(e,n)=>{et.init(e,n),e._zod.check=i=>{wT(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),Vb=ee("$ZodNumber",(e,n)=>{ot.init(e,n),e._zod.pattern=e._zod.bag.pattern??Bb,e._zod.parse=(i,a)=>{if(n.coerce)try{i.value=Number(i.value)}catch{}const s=i.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return i;const u=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:s,inst:e,...u?{received:u}:{}}),i}}),kT=ee("$ZodNumberFormat",(e,n)=>{qC.init(e,n),Vb.init(e,n)}),_T=ee("$ZodBoolean",(e,n)=>{ot.init(e,n),e._zod.pattern=LC,e._zod.parse=(i,a)=>{if(n.coerce)try{i.value=!!i.value}catch{}const s=i.value;return typeof s=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:s,inst:e}),i}}),NT=ee("$ZodUnknown",(e,n)=>{ot.init(e,n),e._zod.parse=i=>i}),jT=ee("$ZodNever",(e,n)=>{ot.init(e,n),e._zod.parse=(i,a)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function ev(e,n,i){e.issues.length&&n.issues.push(...ga(i,e.issues)),n.value[i]=e.value}const CT=ee("$ZodArray",(e,n)=>{ot.init(e,n),e._zod.parse=(i,a)=>{const s=i.value;if(!Array.isArray(s))return i.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),i;i.value=Array(s.length);const u=[];for(let c=0;c<s.length;c++){const f=s[c],p=n.element._zod.run({value:f,issues:[]},a);p instanceof Promise?u.push(p.then(h=>ev(h,i,c))):ev(p,i,c)}return u.length?Promise.all(u).then(()=>i):i}});function Io(e,n,i,a,s){if(e.issues.length){if(s&&!(i in a))return;n.issues.push(...ga(i,e.issues))}e.value===void 0?i in a&&(n.value[i]=void 0):n.value[i]=e.value}function Gb(e){const n=Object.keys(e.shape);for(const a of n)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const i=Qj(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function Qb(e,n,i,a,s,u){const c=[],f=s.keySet,p=s.catchall._zod,h=p.def.type,g=p.optout==="optional";for(const y in n){if(f.has(y))continue;if(h==="never"){c.push(y);continue}const x=p.run({value:n[y],issues:[]},a);x instanceof Promise?e.push(x.then(b=>Io(b,i,y,n,g))):Io(x,i,y,n,g)}return c.length&&i.issues.push({code:"unrecognized_keys",keys:c,input:n,inst:u}),e.length?Promise.all(e).then(()=>i):i}const TT=ee("$ZodObject",(e,n)=>{if(ot.init(e,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){const f=n.shape;Object.defineProperty(n,"shape",{get:()=>{const p={...f};return Object.defineProperty(n,"shape",{value:p}),p}})}const a=Ih(()=>Gb(n));qe(e._zod,"propValues",()=>{const f=n.shape,p={};for(const h in f){const g=f[h]._zod;if(g.values){p[h]??(p[h]=new Set);for(const y of g.values)p[h].add(y)}}return p});const s=$o,u=n.catchall;let c;e._zod.parse=(f,p)=>{c??(c=a.value);const h=f.value;if(!s(h))return f.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),f;f.value={};const g=[],y=c.shape;for(const x of c.keys){const b=y[x],w=b._zod.optout==="optional",k=b._zod.run({value:h[x],issues:[]},p);k instanceof Promise?g.push(k.then(j=>Io(j,f,x,h,w))):Io(k,f,x,h,w)}return u?Qb(g,h,f,p,a.value,e):g.length?Promise.all(g).then(()=>f):f}}),RT=ee("$ZodObjectJIT",(e,n)=>{TT.init(e,n);const i=e._zod.parse,a=Ih(()=>Gb(n)),s=x=>{const b=new KC(["shape","payload","ctx"]),w=a.value,k=T=>{const V=J0(T);return`shape[${V}]._zod.run({ value: input[${V}], issues: [] }, ctx)`};b.write("const input = payload.value;");const j=Object.create(null);let _=0;for(const T of w.keys)j[T]=`key_${_++}`;b.write("const newResult = {};");for(const T of w.keys){const V=j[T],X=J0(T),Z=x[T]?._zod?.optout==="optional";b.write(`const ${V} = ${k(T)};`),Z?b.write(`
23
+ if (${V}.issues.length) {
24
+ if (${X} in input) {
25
+ payload.issues = payload.issues.concat(${V}.issues.map(iss => ({
26
+ ...iss,
27
+ path: iss.path ? [${X}, ...iss.path] : [${X}]
28
+ })));
29
+ }
30
+ }
31
+
32
+ if (${V}.value === undefined) {
33
+ if (${X} in input) {
34
+ newResult[${X}] = undefined;
35
+ }
36
+ } else {
37
+ newResult[${X}] = ${V}.value;
38
+ }
39
+
40
+ `):b.write(`
41
+ if (${V}.issues.length) {
42
+ payload.issues = payload.issues.concat(${V}.issues.map(iss => ({
43
+ ...iss,
44
+ path: iss.path ? [${X}, ...iss.path] : [${X}]
45
+ })));
46
+ }
47
+
48
+ if (${V}.value === undefined) {
49
+ if (${X} in input) {
50
+ newResult[${X}] = undefined;
51
+ }
52
+ } else {
53
+ newResult[${X}] = ${V}.value;
54
+ }
55
+
56
+ `)}b.write("payload.value = newResult;"),b.write("return payload;");const R=b.compile();return(T,V)=>R(x,T,V)};let u;const c=$o,f=!ih.jitless,h=f&&Vj.value,g=n.catchall;let y;e._zod.parse=(x,b)=>{y??(y=a.value);const w=x.value;return c(w)?f&&h&&b?.async===!1&&b.jitless!==!0?(u||(u=s(n.shape)),x=u(x,b),g?Qb([],w,x,b,y,e):x):i(x,b):(x.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),x)}});function tv(e,n,i,a){for(const u of e)if(u.issues.length===0)return n.value=u.value,n;const s=e.filter(u=>!ma(u));return s.length===1?(n.value=s[0].value,s[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:i,errors:e.map(u=>u.issues.map(c=>Fr(c,a,$n())))}),n)}const AT=ee("$ZodUnion",(e,n)=>{ot.init(e,n),qe(e._zod,"optin",()=>n.options.some(s=>s._zod.optin==="optional")?"optional":void 0),qe(e._zod,"optout",()=>n.options.some(s=>s._zod.optout==="optional")?"optional":void 0),qe(e._zod,"values",()=>{if(n.options.every(s=>s._zod.values))return new Set(n.options.flatMap(s=>Array.from(s._zod.values)))}),qe(e._zod,"pattern",()=>{if(n.options.every(s=>s._zod.pattern)){const s=n.options.map(u=>u._zod.pattern);return new RegExp(`^(${s.map(u=>Bh(u.source)).join("|")})$`)}});const i=n.options.length===1,a=n.options[0]._zod.run;e._zod.parse=(s,u)=>{if(i)return a(s,u);let c=!1;const f=[];for(const p of n.options){const h=p._zod.run({value:s.value,issues:[]},u);if(h instanceof Promise)f.push(h),c=!0;else{if(h.issues.length===0)return h;f.push(h)}}return c?Promise.all(f).then(p=>tv(p,s,e,u)):tv(f,s,e,u)}}),OT=ee("$ZodIntersection",(e,n)=>{ot.init(e,n),e._zod.parse=(i,a)=>{const s=i.value,u=n.left._zod.run({value:s,issues:[]},a),c=n.right._zod.run({value:s,issues:[]},a);return u instanceof Promise||c instanceof Promise?Promise.all([u,c]).then(([p,h])=>nv(i,p,h)):nv(i,u,c)}});function lh(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(wa(e)&&wa(n)){const i=Object.keys(n),a=Object.keys(e).filter(u=>i.indexOf(u)!==-1),s={...e,...n};for(const u of a){const c=lh(e[u],n[u]);if(!c.valid)return{valid:!1,mergeErrorPath:[u,...c.mergeErrorPath]};s[u]=c.data}return{valid:!0,data:s}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let a=0;a<e.length;a++){const s=e[a],u=n[a],c=lh(s,u);if(!c.valid)return{valid:!1,mergeErrorPath:[a,...c.mergeErrorPath]};i.push(c.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function nv(e,n,i){const a=new Map;let s;for(const f of n.issues)if(f.code==="unrecognized_keys"){s??(s=f);for(const p of f.keys)a.has(p)||a.set(p,{}),a.get(p).l=!0}else e.issues.push(f);for(const f of i.issues)if(f.code==="unrecognized_keys")for(const p of f.keys)a.has(p)||a.set(p,{}),a.get(p).r=!0;else e.issues.push(f);const u=[...a].filter(([,f])=>f.l&&f.r).map(([f])=>f);if(u.length&&s&&e.issues.push({...s,keys:u}),ma(e))return e;const c=lh(n.value,i.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const zT=ee("$ZodRecord",(e,n)=>{ot.init(e,n),e._zod.parse=(i,a)=>{const s=i.value;if(!wa(s))return i.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),i;const u=[],c=n.keyType._zod.values;if(c){i.value={};const f=new Set;for(const h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){f.add(typeof h=="number"?h.toString():h);const g=n.valueType._zod.run({value:s[h],issues:[]},a);g instanceof Promise?u.push(g.then(y=>{y.issues.length&&i.issues.push(...ga(h,y.issues)),i.value[h]=y.value})):(g.issues.length&&i.issues.push(...ga(h,g.issues)),i.value[h]=g.value)}let p;for(const h in s)f.has(h)||(p=p??[],p.push(h));p&&p.length>0&&i.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:p})}else{i.value={};for(const f of Reflect.ownKeys(s)){if(f==="__proto__")continue;let p=n.keyType._zod.run({value:f,issues:[]},a);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof f=="string"&&Bb.test(f)&&p.issues.length&&p.issues.some(y=>y.code==="invalid_type"&&y.expected==="number")){const y=n.keyType._zod.run({value:Number(f),issues:[]},a);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");y.issues.length===0&&(p=y)}if(p.issues.length){n.mode==="loose"?i.value[f]=s[f]:i.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(y=>Fr(y,a,$n())),input:f,path:[f],inst:e});continue}const g=n.valueType._zod.run({value:s[f],issues:[]},a);g instanceof Promise?u.push(g.then(y=>{y.issues.length&&i.issues.push(...ga(f,y.issues)),i.value[p.value]=y.value})):(g.issues.length&&i.issues.push(...ga(f,g.issues)),i.value[p.value]=g.value)}}return u.length?Promise.all(u).then(()=>i):i}}),DT=ee("$ZodEnum",(e,n)=>{ot.init(e,n);const i=Tb(n.entries),a=new Set(i);e._zod.values=a,e._zod.pattern=new RegExp(`^(${i.filter(s=>Gj.has(typeof s)).map(s=>typeof s=="string"?Xo(s):s.toString()).join("|")})$`),e._zod.parse=(s,u)=>{const c=s.value;return a.has(c)||s.issues.push({code:"invalid_value",values:i,input:c,inst:e}),s}}),MT=ee("$ZodTransform",(e,n)=>{ot.init(e,n),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new Cb(e.constructor.name);const s=n.transform(i.value,i);if(a.async)return(s instanceof Promise?s:Promise.resolve(s)).then(c=>(i.value=c,i));if(s instanceof Promise)throw new xa;return i.value=s,i}});function rv(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Yb=ee("$ZodOptional",(e,n)=>{ot.init(e,n),e._zod.optin="optional",e._zod.optout="optional",qe(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),qe(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Bh(i.source)})?$`):void 0}),e._zod.parse=(i,a)=>{if(n.innerType._zod.optin==="optional"){const s=n.innerType._zod.run(i,a);return s instanceof Promise?s.then(u=>rv(u,i.value)):rv(s,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,a)}}),LT=ee("$ZodExactOptional",(e,n)=>{Yb.init(e,n),qe(e._zod,"values",()=>n.innerType._zod.values),qe(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(i,a)=>n.innerType._zod.run(i,a)}),UT=ee("$ZodNullable",(e,n)=>{ot.init(e,n),qe(e._zod,"optin",()=>n.innerType._zod.optin),qe(e._zod,"optout",()=>n.innerType._zod.optout),qe(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Bh(i.source)}|null)$`):void 0}),qe(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(i,a)=>i.value===null?i:n.innerType._zod.run(i,a)}),$T=ee("$ZodDefault",(e,n)=>{ot.init(e,n),e._zod.optin="optional",qe(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,a)=>{if(a.direction==="backward")return n.innerType._zod.run(i,a);if(i.value===void 0)return i.value=n.defaultValue,i;const s=n.innerType._zod.run(i,a);return s instanceof Promise?s.then(u=>iv(u,n)):iv(s,n)}});function iv(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const IT=ee("$ZodPrefault",(e,n)=>{ot.init(e,n),e._zod.optin="optional",qe(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,a)=>(a.direction==="backward"||i.value===void 0&&(i.value=n.defaultValue),n.innerType._zod.run(i,a))}),qT=ee("$ZodNonOptional",(e,n)=>{ot.init(e,n),qe(e._zod,"values",()=>{const i=n.innerType._zod.values;return i?new Set([...i].filter(a=>a!==void 0)):void 0}),e._zod.parse=(i,a)=>{const s=n.innerType._zod.run(i,a);return s instanceof Promise?s.then(u=>av(u,e)):av(s,e)}});function av(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const BT=ee("$ZodCatch",(e,n)=>{ot.init(e,n),qe(e._zod,"optin",()=>n.innerType._zod.optin),qe(e._zod,"optout",()=>n.innerType._zod.optout),qe(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,a)=>{if(a.direction==="backward")return n.innerType._zod.run(i,a);const s=n.innerType._zod.run(i,a);return s instanceof Promise?s.then(u=>(i.value=u.value,u.issues.length&&(i.value=n.catchValue({...i,error:{issues:u.issues.map(c=>Fr(c,a,$n()))},input:i.value}),i.issues=[]),i)):(i.value=s.value,s.issues.length&&(i.value=n.catchValue({...i,error:{issues:s.issues.map(u=>Fr(u,a,$n()))},input:i.value}),i.issues=[]),i)}}),PT=ee("$ZodPipe",(e,n)=>{ot.init(e,n),qe(e._zod,"values",()=>n.in._zod.values),qe(e._zod,"optin",()=>n.in._zod.optin),qe(e._zod,"optout",()=>n.out._zod.optout),qe(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(i,a)=>{if(a.direction==="backward"){const u=n.out._zod.run(i,a);return u instanceof Promise?u.then(c=>wo(c,n.in,a)):wo(u,n.in,a)}const s=n.in._zod.run(i,a);return s instanceof Promise?s.then(u=>wo(u,n.out,a)):wo(s,n.out,a)}});function wo(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const ZT=ee("$ZodReadonly",(e,n)=>{ot.init(e,n),qe(e._zod,"propValues",()=>n.innerType._zod.propValues),qe(e._zod,"values",()=>n.innerType._zod.values),qe(e._zod,"optin",()=>n.innerType?._zod?.optin),qe(e._zod,"optout",()=>n.innerType?._zod?.optout),e._zod.parse=(i,a)=>{if(a.direction==="backward")return n.innerType._zod.run(i,a);const s=n.innerType._zod.run(i,a);return s instanceof Promise?s.then(lv):lv(s)}});function lv(e){return e.value=Object.freeze(e.value),e}const HT=ee("$ZodCustom",(e,n)=>{Gt.init(e,n),ot.init(e,n),e._zod.parse=(i,a)=>i,e._zod.check=i=>{const a=i.value,s=n.fn(a);if(s instanceof Promise)return s.then(u=>sv(u,i,a,e));sv(s,i,a,e)}});function sv(e,n,i,a){if(!e){const s={code:"custom",input:i,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(s.params=a._zod.def.params),n.issues.push(Ul(s))}}const FT=()=>{const e={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 n(s){return e[s]??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",jwt:"JWT",template_literal:"input"},a={nan:"NaN"};return s=>{switch(s.code){case"invalid_type":{const u=a[s.expected]??s.expected,c=rC(s.input),f=a[c]??c;return`Invalid input: expected ${u}, received ${f}`}case"invalid_value":return s.values.length===1?`Invalid input: expected ${Ob(s.values[0])}`:`Invalid option: expected one of ${X0(s.values,"|")}`;case"too_big":{const u=s.inclusive?"<=":"<",c=n(s.origin);return c?`Too big: expected ${s.origin??"value"} to have ${u}${s.maximum.toString()} ${c.unit??"elements"}`:`Too big: expected ${s.origin??"value"} to be ${u}${s.maximum.toString()}`}case"too_small":{const u=s.inclusive?">=":">",c=n(s.origin);return c?`Too small: expected ${s.origin} to have ${u}${s.minimum.toString()} ${c.unit}`:`Too small: expected ${s.origin} to be ${u}${s.minimum.toString()}`}case"invalid_format":{const u=s;return u.format==="starts_with"?`Invalid string: must start with "${u.prefix}"`:u.format==="ends_with"?`Invalid string: must end with "${u.suffix}"`:u.format==="includes"?`Invalid string: must include "${u.includes}"`:u.format==="regex"?`Invalid string: must match pattern ${u.pattern}`:`Invalid ${i[u.format]??s.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${s.divisor}`;case"unrecognized_keys":return`Unrecognized key${s.keys.length>1?"s":""}: ${X0(s.keys,", ")}`;case"invalid_key":return`Invalid key in ${s.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${s.origin}`;default:return"Invalid input"}}};function VT(){return{localeError:FT()}}var ov;class GT{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...i){const a=i[0];return this._map.set(n,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const i=this._map.get(n);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(n),this}get(n){const i=n._zod.parent;if(i){const a={...this.get(i)??{}};delete a.id;const s={...a,...this._map.get(n)};return Object.keys(s).length?s:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function Xb(){return new GT}(ov=globalThis).__zod_globalRegistry??(ov.__zod_globalRegistry=Xb());const ya=globalThis.__zod_globalRegistry;function QT(e,n){return new e({type:"string",...me(n)})}function YT(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...me(n)})}function uv(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...me(n)})}function XT(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...me(n)})}function KT(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...me(n)})}function JT(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...me(n)})}function WT(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...me(n)})}function eR(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...me(n)})}function tR(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...me(n)})}function nR(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...me(n)})}function rR(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...me(n)})}function iR(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...me(n)})}function aR(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...me(n)})}function lR(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...me(n)})}function sR(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...me(n)})}function oR(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...me(n)})}function uR(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...me(n)})}function cR(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...me(n)})}function fR(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...me(n)})}function dR(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...me(n)})}function hR(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...me(n)})}function pR(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...me(n)})}function mR(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...me(n)})}function gR(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...me(n)})}function yR(e,n){return new e({type:"string",format:"date",check:"string_format",...me(n)})}function vR(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...me(n)})}function xR(e,n){return new e({type:"string",format:"duration",check:"string_format",...me(n)})}function bR(e,n){return new e({type:"number",checks:[],...me(n)})}function SR(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...me(n)})}function wR(e,n){return new e({type:"boolean",...me(n)})}function ER(e){return new e({type:"unknown"})}function kR(e,n){return new e({type:"never",...me(n)})}function sh(e,n){return new Zb({check:"less_than",...me(n),value:e,inclusive:!1})}function Ro(e,n){return new Zb({check:"less_than",...me(n),value:e,inclusive:!0})}function oh(e,n){return new Hb({check:"greater_than",...me(n),value:e,inclusive:!1})}function Ao(e,n){return new Hb({check:"greater_than",...me(n),value:e,inclusive:!0})}function uh(e,n){return new IC({check:"multiple_of",...me(n),value:e})}function Vh(e,n){return new BC({check:"max_length",...me(n),maximum:e})}function $l(e,n){return new PC({check:"min_length",...me(n),minimum:e})}function Gh(e,n){return new ZC({check:"length_equals",...me(n),length:e})}function Kb(e,n){return new HC({check:"string_format",format:"regex",...me(n),pattern:e})}function Jb(e){return new FC({check:"string_format",format:"lowercase",...me(e)})}function Wb(e){return new VC({check:"string_format",format:"uppercase",...me(e)})}function e1(e,n){return new GC({check:"string_format",format:"includes",...me(n),includes:e})}function t1(e,n){return new QC({check:"string_format",format:"starts_with",...me(n),prefix:e})}function n1(e,n){return new YC({check:"string_format",format:"ends_with",...me(n),suffix:e})}function Si(e){return new XC({check:"overwrite",tx:e})}function r1(e){return Si(n=>n.normalize(e))}function i1(){return Si(e=>e.trim())}function a1(){return Si(e=>e.toLowerCase())}function l1(){return Si(e=>e.toUpperCase())}function s1(){return Si(e=>Fj(e))}function _R(e,n,i){return new e({type:"array",element:n,...me(i)})}function NR(e,n,i){return new e({type:"custom",check:"custom",fn:n,...me(i)})}function jR(e){const n=CR(i=>(i.addIssue=a=>{if(typeof a=="string")i.issues.push(Ul(a,i.value,n._zod.def));else{const s=a;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=i.value),s.inst??(s.inst=n),s.continue??(s.continue=!n._zod.def.abort),i.issues.push(Ul(s))}},e(i.value,i)));return n}function CR(e,n){const i=new Gt({check:"custom",...me(n)});return i._zod.check=e,i}function o1(e){let n=e?.target??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ya,target:n,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function yt(e,n,i={path:[],schemaPath:[]}){var a;const s=e._zod.def,u=n.seen.get(e);if(u)return u.count++,i.schemaPath.includes(e)&&(u.cycle=i.path),u.schema;const c={schema:{},count:1,cycle:void 0,path:i.path};n.seen.set(e,c);const f=e._zod.toJSONSchema?.();if(f)c.schema=f;else{const g={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,c.schema,g);else{const x=c.schema,b=n.processors[s.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);b(e,n,x,g)}const y=e._zod.parent;y&&(c.ref||(c.ref=y),yt(y,n,g),n.seen.get(y).isParent=!0)}const p=n.metadataRegistry.get(e);return p&&Object.assign(c.schema,p),n.io==="input"&&Dt(e)&&(delete c.schema.examples,delete c.schema.default),n.io==="input"&&c.schema._prefault&&((a=c.schema).default??(a.default=c.schema._prefault)),delete c.schema._prefault,n.seen.get(e).schema}function u1(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=new Map;for(const c of e.seen.entries()){const f=e.metadataRegistry.get(c[0])?.id;if(f){const p=a.get(f);if(p&&p!==c[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(f,c[0])}}const s=c=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=e.external.registry.get(c[0])?.id,x=e.external.uri??(w=>w);if(y)return{ref:x(y)};const b=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=b,{defId:b,ref:`${x("__shared")}#/${f}/${b}`}}if(c[1]===i)return{ref:"#"};const h=`#/${f}/`,g=c[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:h+g}},u=c=>{if(c[1].schema.$ref)return;const f=c[1],{ref:p,defId:h}=s(c);f.def={...f.schema},h&&(f.defId=h);const g=f.schema;for(const y in g)delete g[y];g.$ref=p};if(e.cycles==="throw")for(const c of e.seen.entries()){const f=c[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
57
+
58
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const f=c[1];if(n===c[0]){u(c);continue}if(e.external){const h=e.external.registry.get(c[0])?.id;if(n!==c[0]&&h){u(c);continue}}if(e.metadataRegistry.get(c[0])?.id){u(c);continue}if(f.cycle){u(c);continue}if(f.count>1&&e.reused==="ref"){u(c);continue}}}function c1(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=c=>{const f=e.seen.get(c);if(f.ref===null)return;const p=f.def??f.schema,h={...p},g=f.ref;if(f.ref=null,g){a(g);const x=e.seen.get(g),b=x.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(b)):Object.assign(p,b),Object.assign(p,h),c._zod.parent===g)for(const k in p)k==="$ref"||k==="allOf"||k in h||delete p[k];if(b.$ref)for(const k in p)k==="$ref"||k==="allOf"||k in x.def&&JSON.stringify(p[k])===JSON.stringify(x.def[k])&&delete p[k]}const y=c._zod.parent;if(y&&y!==g){a(y);const x=e.seen.get(y);if(x?.schema.$ref&&(p.$ref=x.schema.$ref,x.def))for(const b in p)b==="$ref"||b==="allOf"||b in x.def&&JSON.stringify(p[b])===JSON.stringify(x.def[b])&&delete p[b]}e.override({zodSchema:c,jsonSchema:p,path:f.path??[]})};for(const c of[...e.seen.entries()].reverse())a(c[0]);const s={};if(e.target==="draft-2020-12"?s.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?s.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?s.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(n)?.id;if(!c)throw new Error("Schema is missing an `id` property");s.$id=e.external.uri(c)}Object.assign(s,i.def??i.schema);const u=e.external?.defs??{};for(const c of e.seen.entries()){const f=c[1];f.def&&f.defId&&(u[f.defId]=f.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?s.$defs=u:s.definitions=u);try{const c=JSON.parse(JSON.stringify(s));return Object.defineProperty(c,"~standard",{value:{...n["~standard"],jsonSchema:{input:qo(n,"input",e.processors),output:qo(n,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Dt(e,n){const i=n??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return Dt(a.element,i);if(a.type==="set")return Dt(a.valueType,i);if(a.type==="lazy")return Dt(a.getter(),i);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return Dt(a.innerType,i);if(a.type==="intersection")return Dt(a.left,i)||Dt(a.right,i);if(a.type==="record"||a.type==="map")return Dt(a.keyType,i)||Dt(a.valueType,i);if(a.type==="pipe")return Dt(a.in,i)||Dt(a.out,i);if(a.type==="object"){for(const s in a.shape)if(Dt(a.shape[s],i))return!0;return!1}if(a.type==="union"){for(const s of a.options)if(Dt(s,i))return!0;return!1}if(a.type==="tuple"){for(const s of a.items)if(Dt(s,i))return!0;return!!(a.rest&&Dt(a.rest,i))}return!1}const TR=(e,n={})=>i=>{const a=o1({...i,processors:n});return yt(e,a),u1(a,e),c1(a,e)},qo=(e,n,i={})=>a=>{const{libraryOptions:s,target:u}=a??{},c=o1({...s??{},target:u,io:n,processors:i});return yt(e,c),u1(c,e),c1(c,e)},RR={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},AR=(e,n,i,a)=>{const s=i;s.type="string";const{minimum:u,maximum:c,format:f,patterns:p,contentEncoding:h}=e._zod.bag;if(typeof u=="number"&&(s.minLength=u),typeof c=="number"&&(s.maxLength=c),f&&(s.format=RR[f]??f,s.format===""&&delete s.format,f==="time"&&delete s.format),h&&(s.contentEncoding=h),p&&p.size>0){const g=[...p];g.length===1?s.pattern=g[0].source:g.length>1&&(s.allOf=[...g.map(y=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},OR=(e,n,i,a)=>{const s=i,{minimum:u,maximum:c,format:f,multipleOf:p,exclusiveMaximum:h,exclusiveMinimum:g}=e._zod.bag;typeof f=="string"&&f.includes("int")?s.type="integer":s.type="number",typeof g=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(s.minimum=g,s.exclusiveMinimum=!0):s.exclusiveMinimum=g),typeof u=="number"&&(s.minimum=u,typeof g=="number"&&n.target!=="draft-04"&&(g>=u?delete s.minimum:delete s.exclusiveMinimum)),typeof h=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(s.maximum=h,s.exclusiveMaximum=!0):s.exclusiveMaximum=h),typeof c=="number"&&(s.maximum=c,typeof h=="number"&&n.target!=="draft-04"&&(h<=c?delete s.maximum:delete s.exclusiveMaximum)),typeof p=="number"&&(s.multipleOf=p)},zR=(e,n,i,a)=>{i.type="boolean"},DR=(e,n,i,a)=>{i.not={}},MR=(e,n,i,a)=>{},LR=(e,n,i,a)=>{const s=e._zod.def,u=Tb(s.entries);u.every(c=>typeof c=="number")&&(i.type="number"),u.every(c=>typeof c=="string")&&(i.type="string"),i.enum=u},UR=(e,n,i,a)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},$R=(e,n,i,a)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},IR=(e,n,i,a)=>{const s=i,u=e._zod.def,{minimum:c,maximum:f}=e._zod.bag;typeof c=="number"&&(s.minItems=c),typeof f=="number"&&(s.maxItems=f),s.type="array",s.items=yt(u.element,n,{...a,path:[...a.path,"items"]})},qR=(e,n,i,a)=>{const s=i,u=e._zod.def;s.type="object",s.properties={};const c=u.shape;for(const h in c)s.properties[h]=yt(c[h],n,{...a,path:[...a.path,"properties",h]});const f=new Set(Object.keys(c)),p=new Set([...f].filter(h=>{const g=u.shape[h]._zod;return n.io==="input"?g.optin===void 0:g.optout===void 0}));p.size>0&&(s.required=Array.from(p)),u.catchall?._zod.def.type==="never"?s.additionalProperties=!1:u.catchall?u.catchall&&(s.additionalProperties=yt(u.catchall,n,{...a,path:[...a.path,"additionalProperties"]})):n.io==="output"&&(s.additionalProperties=!1)},BR=(e,n,i,a)=>{const s=e._zod.def,u=s.inclusive===!1,c=s.options.map((f,p)=>yt(f,n,{...a,path:[...a.path,u?"oneOf":"anyOf",p]}));u?i.oneOf=c:i.anyOf=c},PR=(e,n,i,a)=>{const s=e._zod.def,u=yt(s.left,n,{...a,path:[...a.path,"allOf",0]}),c=yt(s.right,n,{...a,path:[...a.path,"allOf",1]}),f=h=>"allOf"in h&&Object.keys(h).length===1,p=[...f(u)?u.allOf:[u],...f(c)?c.allOf:[c]];i.allOf=p},ZR=(e,n,i,a)=>{const s=i,u=e._zod.def;s.type="object";const c=u.keyType,p=c._zod.bag?.patterns;if(u.mode==="loose"&&p&&p.size>0){const g=yt(u.valueType,n,{...a,path:[...a.path,"patternProperties","*"]});s.patternProperties={};for(const y of p)s.patternProperties[y.source]=g}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(s.propertyNames=yt(u.keyType,n,{...a,path:[...a.path,"propertyNames"]})),s.additionalProperties=yt(u.valueType,n,{...a,path:[...a.path,"additionalProperties"]});const h=c._zod.values;if(h){const g=[...h].filter(y=>typeof y=="string"||typeof y=="number");g.length>0&&(s.required=g)}},HR=(e,n,i,a)=>{const s=e._zod.def,u=yt(s.innerType,n,a),c=n.seen.get(e);n.target==="openapi-3.0"?(c.ref=s.innerType,i.nullable=!0):i.anyOf=[u,{type:"null"}]},FR=(e,n,i,a)=>{const s=e._zod.def;yt(s.innerType,n,a);const u=n.seen.get(e);u.ref=s.innerType},VR=(e,n,i,a)=>{const s=e._zod.def;yt(s.innerType,n,a);const u=n.seen.get(e);u.ref=s.innerType,i.default=JSON.parse(JSON.stringify(s.defaultValue))},GR=(e,n,i,a)=>{const s=e._zod.def;yt(s.innerType,n,a);const u=n.seen.get(e);u.ref=s.innerType,n.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(s.defaultValue)))},QR=(e,n,i,a)=>{const s=e._zod.def;yt(s.innerType,n,a);const u=n.seen.get(e);u.ref=s.innerType;let c;try{c=s.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=c},YR=(e,n,i,a)=>{const s=e._zod.def,u=n.io==="input"?s.in._zod.def.type==="transform"?s.out:s.in:s.out;yt(u,n,a);const c=n.seen.get(e);c.ref=u},XR=(e,n,i,a)=>{const s=e._zod.def;yt(s.innerType,n,a);const u=n.seen.get(e);u.ref=s.innerType,i.readOnly=!0},f1=(e,n,i,a)=>{const s=e._zod.def;yt(s.innerType,n,a);const u=n.seen.get(e);u.ref=s.innerType},d1=ee("ZodISODateTime",(e,n)=>{cT.init(e,n),tt.init(e,n)});function KR(e){return gR(d1,e)}const h1=ee("ZodISODate",(e,n)=>{fT.init(e,n),tt.init(e,n)});function JR(e){return yR(h1,e)}const p1=ee("ZodISOTime",(e,n)=>{dT.init(e,n),tt.init(e,n)});function WR(e){return vR(p1,e)}const m1=ee("ZodISODuration",(e,n)=>{hT.init(e,n),tt.init(e,n)});function eA(e){return xR(m1,e)}const tA=(e,n)=>{Db.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>Ub(e,i)},flatten:{value:i=>Lb(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,ah,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,ah,2)}},isEmpty:{get(){return e.issues.length===0}}})},sn=ee("ZodError",tA,{Parent:Error}),g1=Zh(sn),y1=Hh(sn),v1=Ko(sn),x1=Jo(sn),b1=lC(sn),S1=sC(sn),w1=oC(sn),E1=uC(sn),k1=cC(sn),_1=fC(sn),N1=dC(sn),j1=hC(sn),it=ee("ZodType",(e,n)=>(ot.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:qo(e,"input"),output:qo(e,"output")}}),e.toJSONSchema=TR(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(Vr(n,{checks:[...n.checks??[],...i.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0}),e.with=e.check,e.clone=(i,a)=>pr(e,i,a),e.brand=()=>e,e.register=((i,a)=>(i.add(e,a),e)),e.parse=(i,a)=>g1(e,i,a,{callee:e.parse}),e.safeParse=(i,a)=>v1(e,i,a),e.parseAsync=async(i,a)=>y1(e,i,a,{callee:e.parseAsync}),e.safeParseAsync=async(i,a)=>x1(e,i,a),e.spa=e.safeParseAsync,e.encode=(i,a)=>b1(e,i,a),e.decode=(i,a)=>S1(e,i,a),e.encodeAsync=async(i,a)=>w1(e,i,a),e.decodeAsync=async(i,a)=>E1(e,i,a),e.safeEncode=(i,a)=>k1(e,i,a),e.safeDecode=(i,a)=>_1(e,i,a),e.safeEncodeAsync=async(i,a)=>N1(e,i,a),e.safeDecodeAsync=async(i,a)=>j1(e,i,a),e.refine=(i,a)=>e.check(SS(i,a)),e.superRefine=i=>e.check(wS(i)),e.overwrite=i=>e.check(Si(i)),e.optional=()=>hh(e),e.exactOptional=()=>oS(e),e.nullable=()=>ph(e),e.nullish=()=>hh(ph(e)),e.nonoptional=i=>pS(e,i),e.array=()=>Ql(e),e.or=i=>eS([e,i]),e.and=i=>nS(e,i),e.transform=i=>mh(e,lS(i)),e.default=i=>fS(e,i),e.prefault=i=>hS(e,i),e.catch=i=>gS(e,i),e.pipe=i=>mh(e,i),e.readonly=()=>xS(e),e.describe=i=>{const a=e.clone();return ya.add(a,{description:i}),a},Object.defineProperty(e,"description",{get(){return ya.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return ya.get(e);const a=e.clone();return ya.add(a,i[0]),a},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),Qh=ee("_ZodString",(e,n)=>{Fh.init(e,n),it.init(e,n),e._zod.processJSONSchema=(a,s,u)=>AR(e,a,s);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...a)=>e.check(Kb(...a)),e.includes=(...a)=>e.check(e1(...a)),e.startsWith=(...a)=>e.check(t1(...a)),e.endsWith=(...a)=>e.check(n1(...a)),e.min=(...a)=>e.check($l(...a)),e.max=(...a)=>e.check(Vh(...a)),e.length=(...a)=>e.check(Gh(...a)),e.nonempty=(...a)=>e.check($l(1,...a)),e.lowercase=a=>e.check(Jb(a)),e.uppercase=a=>e.check(Wb(a)),e.trim=()=>e.check(i1()),e.normalize=(...a)=>e.check(r1(...a)),e.toLowerCase=()=>e.check(a1()),e.toUpperCase=()=>e.check(l1()),e.slugify=()=>e.check(s1())}),C1=ee("ZodString",(e,n)=>{Fh.init(e,n),Qh.init(e,n),e.email=i=>e.check(YT(T1,i)),e.url=i=>e.check(eR(R1,i)),e.jwt=i=>e.check(mR(F1,i)),e.emoji=i=>e.check(tR(A1,i)),e.guid=i=>e.check(uv(ch,i)),e.uuid=i=>e.check(XT(Al,i)),e.uuidv4=i=>e.check(KT(Al,i)),e.uuidv6=i=>e.check(JT(Al,i)),e.uuidv7=i=>e.check(WT(Al,i)),e.nanoid=i=>e.check(nR(O1,i)),e.guid=i=>e.check(uv(ch,i)),e.cuid=i=>e.check(rR(z1,i)),e.cuid2=i=>e.check(iR(D1,i)),e.ulid=i=>e.check(aR(M1,i)),e.base64=i=>e.check(dR(P1,i)),e.base64url=i=>e.check(hR(Z1,i)),e.xid=i=>e.check(lR(L1,i)),e.ksuid=i=>e.check(sR(U1,i)),e.ipv4=i=>e.check(oR($1,i)),e.ipv6=i=>e.check(uR(I1,i)),e.cidrv4=i=>e.check(cR(q1,i)),e.cidrv6=i=>e.check(fR(B1,i)),e.e164=i=>e.check(pR(H1,i)),e.datetime=i=>e.check(KR(i)),e.date=i=>e.check(JR(i)),e.time=i=>e.check(WR(i)),e.duration=i=>e.check(eA(i))});function ke(e){return QT(C1,e)}const tt=ee("ZodStringFormat",(e,n)=>{et.init(e,n),Qh.init(e,n)}),T1=ee("ZodEmail",(e,n)=>{tT.init(e,n),tt.init(e,n)}),ch=ee("ZodGUID",(e,n)=>{WC.init(e,n),tt.init(e,n)}),Al=ee("ZodUUID",(e,n)=>{eT.init(e,n),tt.init(e,n)}),R1=ee("ZodURL",(e,n)=>{nT.init(e,n),tt.init(e,n)}),A1=ee("ZodEmoji",(e,n)=>{rT.init(e,n),tt.init(e,n)}),O1=ee("ZodNanoID",(e,n)=>{iT.init(e,n),tt.init(e,n)}),z1=ee("ZodCUID",(e,n)=>{aT.init(e,n),tt.init(e,n)}),D1=ee("ZodCUID2",(e,n)=>{lT.init(e,n),tt.init(e,n)}),M1=ee("ZodULID",(e,n)=>{sT.init(e,n),tt.init(e,n)}),L1=ee("ZodXID",(e,n)=>{oT.init(e,n),tt.init(e,n)}),U1=ee("ZodKSUID",(e,n)=>{uT.init(e,n),tt.init(e,n)}),$1=ee("ZodIPv4",(e,n)=>{pT.init(e,n),tt.init(e,n)}),I1=ee("ZodIPv6",(e,n)=>{mT.init(e,n),tt.init(e,n)}),q1=ee("ZodCIDRv4",(e,n)=>{gT.init(e,n),tt.init(e,n)}),B1=ee("ZodCIDRv6",(e,n)=>{yT.init(e,n),tt.init(e,n)}),P1=ee("ZodBase64",(e,n)=>{vT.init(e,n),tt.init(e,n)}),Z1=ee("ZodBase64URL",(e,n)=>{bT.init(e,n),tt.init(e,n)}),H1=ee("ZodE164",(e,n)=>{ST.init(e,n),tt.init(e,n)}),F1=ee("ZodJWT",(e,n)=>{ET.init(e,n),tt.init(e,n)}),Yh=ee("ZodNumber",(e,n)=>{Vb.init(e,n),it.init(e,n),e._zod.processJSONSchema=(a,s,u)=>OR(e,a,s),e.gt=(a,s)=>e.check(oh(a,s)),e.gte=(a,s)=>e.check(Ao(a,s)),e.min=(a,s)=>e.check(Ao(a,s)),e.lt=(a,s)=>e.check(sh(a,s)),e.lte=(a,s)=>e.check(Ro(a,s)),e.max=(a,s)=>e.check(Ro(a,s)),e.int=a=>e.check(fh(a)),e.safe=a=>e.check(fh(a)),e.positive=a=>e.check(oh(0,a)),e.nonnegative=a=>e.check(Ao(0,a)),e.negative=a=>e.check(sh(0,a)),e.nonpositive=a=>e.check(Ro(0,a)),e.multipleOf=(a,s)=>e.check(uh(a,s)),e.step=(a,s)=>e.check(uh(a,s)),e.finite=()=>e;const i=e._zod.bag;e.minValue=Math.max(i.minimum??Number.NEGATIVE_INFINITY,i.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(i.maximum??Number.POSITIVE_INFINITY,i.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null});function gt(e){return bR(Yh,e)}const V1=ee("ZodNumberFormat",(e,n)=>{kT.init(e,n),Yh.init(e,n)});function fh(e){return SR(V1,e)}const G1=ee("ZodBoolean",(e,n)=>{_T.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>zR(e,i,a)});function pi(e){return wR(G1,e)}const Q1=ee("ZodUnknown",(e,n)=>{NT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>MR()});function dh(){return ER(Q1)}const Y1=ee("ZodNever",(e,n)=>{jT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>DR(e,i,a)});function X1(e){return kR(Y1,e)}const K1=ee("ZodArray",(e,n)=>{CT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>IR(e,i,a,s),e.element=n.element,e.min=(i,a)=>e.check($l(i,a)),e.nonempty=i=>e.check($l(1,i)),e.max=(i,a)=>e.check(Vh(i,a)),e.length=(i,a)=>e.check(Gh(i,a)),e.unwrap=()=>e.element});function Ql(e,n){return _R(K1,e,n)}const J1=ee("ZodObject",(e,n)=>{RT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>qR(e,i,a,s),qe(e,"shape",()=>n.shape),e.keyof=()=>mr(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:dh()}),e.loose=()=>e.clone({...e._zod.def,catchall:dh()}),e.strict=()=>e.clone({...e._zod.def,catchall:X1()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>Jj(e,i),e.safeExtend=i=>Wj(e,i),e.merge=i=>eC(e,i),e.pick=i=>Xj(e,i),e.omit=i=>Kj(e,i),e.partial=(...i)=>tC(Xh,e,i[0]),e.required=(...i)=>nC(Kh,e,i[0])});function st(e,n){const i={type:"object",shape:e??{},...me(n)};return new J1(i)}const W1=ee("ZodUnion",(e,n)=>{AT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>BR(e,i,a,s),e.options=n.options});function eS(e,n){return new W1({type:"union",options:e,...me(n)})}const tS=ee("ZodIntersection",(e,n)=>{OT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>PR(e,i,a,s)});function nS(e,n){return new tS({type:"intersection",left:e,right:n})}const rS=ee("ZodRecord",(e,n)=>{zT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>ZR(e,i,a,s),e.keyType=n.keyType,e.valueType=n.valueType});function iS(e,n,i){return new rS({type:"record",keyType:e,valueType:n,...me(i)})}const Bo=ee("ZodEnum",(e,n)=>{DT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(a,s,u)=>LR(e,a,s),e.enum=n.entries,e.options=Object.values(n.entries);const i=new Set(Object.keys(n.entries));e.extract=(a,s)=>{const u={};for(const c of a)if(i.has(c))u[c]=n.entries[c];else throw new Error(`Key ${c} not found in enum`);return new Bo({...n,checks:[],...me(s),entries:u})},e.exclude=(a,s)=>{const u={...n.entries};for(const c of a)if(i.has(c))delete u[c];else throw new Error(`Key ${c} not found in enum`);return new Bo({...n,checks:[],...me(s),entries:u})}});function mr(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new Bo({type:"enum",entries:i,...me(n)})}const aS=ee("ZodTransform",(e,n)=>{MT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>$R(e,i),e._zod.parse=(i,a)=>{if(a.direction==="backward")throw new Cb(e.constructor.name);i.addIssue=u=>{if(typeof u=="string")i.issues.push(Ul(u,i.value,n));else{const c=u;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=i.value),c.inst??(c.inst=e),i.issues.push(Ul(c))}};const s=n.transform(i.value,i);return s instanceof Promise?s.then(u=>(i.value=u,i)):(i.value=s,i)}});function lS(e){return new aS({type:"transform",transform:e})}const Xh=ee("ZodOptional",(e,n)=>{Yb.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>f1(e,i,a,s),e.unwrap=()=>e._zod.def.innerType});function hh(e){return new Xh({type:"optional",innerType:e})}const sS=ee("ZodExactOptional",(e,n)=>{LT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>f1(e,i,a,s),e.unwrap=()=>e._zod.def.innerType});function oS(e){return new sS({type:"optional",innerType:e})}const uS=ee("ZodNullable",(e,n)=>{UT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>HR(e,i,a,s),e.unwrap=()=>e._zod.def.innerType});function ph(e){return new uS({type:"nullable",innerType:e})}const cS=ee("ZodDefault",(e,n)=>{$T.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>VR(e,i,a,s),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function fS(e,n){return new cS({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Ab(n)}})}const dS=ee("ZodPrefault",(e,n)=>{IT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>GR(e,i,a,s),e.unwrap=()=>e._zod.def.innerType});function hS(e,n){return new dS({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Ab(n)}})}const Kh=ee("ZodNonOptional",(e,n)=>{qT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>FR(e,i,a,s),e.unwrap=()=>e._zod.def.innerType});function pS(e,n){return new Kh({type:"nonoptional",innerType:e,...me(n)})}const mS=ee("ZodCatch",(e,n)=>{BT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>QR(e,i,a,s),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function gS(e,n){return new mS({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const yS=ee("ZodPipe",(e,n)=>{PT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>YR(e,i,a,s),e.in=n.in,e.out=n.out});function mh(e,n){return new yS({type:"pipe",in:e,out:n})}const vS=ee("ZodReadonly",(e,n)=>{ZT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>XR(e,i,a,s),e.unwrap=()=>e._zod.def.innerType});function xS(e){return new vS({type:"readonly",innerType:e})}const bS=ee("ZodCustom",(e,n)=>{HT.init(e,n),it.init(e,n),e._zod.processJSONSchema=(i,a,s)=>UR(e,i)});function SS(e,n={}){return NR(bS,e,n)}function wS(e){return jR(e)}$n(VT());const nA=Object.freeze(Object.defineProperty({__proto__:null,ZodArray:K1,ZodBase64:P1,ZodBase64URL:Z1,ZodBoolean:G1,ZodCIDRv4:q1,ZodCIDRv6:B1,ZodCUID:z1,ZodCUID2:D1,ZodCatch:mS,ZodCustom:bS,ZodDefault:cS,ZodE164:H1,ZodEmail:T1,ZodEmoji:A1,ZodEnum:Bo,ZodExactOptional:sS,ZodGUID:ch,ZodIPv4:$1,ZodIPv6:I1,ZodISODate:h1,ZodISODateTime:d1,ZodISODuration:m1,ZodISOTime:p1,ZodIntersection:tS,ZodJWT:F1,ZodKSUID:U1,ZodNanoID:O1,ZodNever:Y1,ZodNonOptional:Kh,ZodNullable:uS,ZodNumber:Yh,ZodNumberFormat:V1,ZodObject:J1,ZodOptional:Xh,ZodPipe:yS,ZodPrefault:dS,ZodReadonly:vS,ZodRealError:sn,ZodRecord:rS,ZodString:C1,ZodStringFormat:tt,ZodTransform:aS,ZodType:it,ZodULID:M1,ZodURL:R1,ZodUUID:Al,ZodUnion:W1,ZodUnknown:Q1,ZodXID:L1,_ZodString:Qh,_default:fS,array:Ql,boolean:pi,catch:gS,clone:pr,config:$n,decode:S1,decodeAsync:E1,encode:b1,encodeAsync:w1,endsWith:n1,enum:mr,exactOptional:oS,flattenError:Lb,formatError:Ub,globalRegistry:ya,gt:oh,gte:Ao,includes:e1,int:fh,intersection:nS,length:Gh,lowercase:Jb,lt:sh,lte:Ro,maxLength:Vh,minLength:$l,multipleOf:uh,never:X1,nonoptional:pS,normalize:r1,nullable:ph,number:gt,object:st,optional:hh,overwrite:Si,parse:g1,parseAsync:y1,pipe:mh,prefault:hS,readonly:xS,record:iS,refine:SS,regex:Kb,registry:Xb,safeDecode:_1,safeDecodeAsync:j1,safeEncode:k1,safeEncodeAsync:N1,safeParse:v1,safeParseAsync:x1,slugify:s1,startsWith:t1,string:ke,superRefine:wS,toLowerCase:a1,toUpperCase:l1,transform:lS,trim:i1,union:eS,unknown:dh,uppercase:Wb},Symbol.toStringTag,{value:"Module"}));Pj(nA);const ES=mr(["http_basic","github_token","gitlab_token","bitbucket_app_password","bitbucket_api_token","bitbucket_api_key","bitbucket_server_pat","bearer_token"]),kS=mr(["git","composer","artifact"]),rA=st({url:ke().url("Invalid repository URL"),vcs_type:kS,credential_type:ES,auth_credentials:iS(ke(),ke()).refine(e=>Object.keys(e).length>0,"At least one credential field is required"),composer_json_path:ke().optional(),package_filter:ke().optional()});rA.partial();st({id:ke(),url:ke(),vcs_type:kS,credential_type:ES,composer_json_path:ke().nullable(),package_filter:ke().nullable(),status:mr(["pending","active","error","syncing"]),error_message:ke().nullable(),last_synced_at:gt().nullable(),created_at:gt()});const _S=mr(["readonly","write"]);st({description:ke().min(1,"Description is required"),permissions:_S.default("readonly"),rate_limit_max:gt().int().min(0).max(25e3,"Rate limit cannot exceed 25,000 requests/hour").nullable().default(null),expires_at:gt().int().positive().optional()});st({description:ke().min(1,"Description is required").optional(),rate_limit_max:gt().int().min(0).max(25e3,"Rate limit cannot exceed 25,000 requests/hour").nullable().optional()});const iA=st({id:ke(),description:ke(),permissions:_S,rate_limit_max:gt().nullable(),created_at:gt(),expires_at:gt().nullable(),last_used_at:gt().nullable()});st({email:ke().email("Invalid email address"),password:ke().min(1,"Password is required"),code:ke().optional()});st({token:ke(),user:st({id:ke(),email:ke(),role:mr(["admin","viewer"]),two_factor_enabled:pi()})});const NS=st({id:ke(),email:ke(),role:mr(["admin","viewer"]),two_factor_enabled:pi()});st({users:Ql(NS)});st({email:ke().email("Invalid email address"),password:ke().optional(),role:mr(["admin","viewer"]).default("viewer")});st({message:ke(),user:NS});st({error:ke(),message:ke().optional(),code:ke().optional(),requestId:ke().optional()});st({status:ke(),timestamp:gt()});st({active_repos:gt(),cached_packages:gt(),total_downloads:gt()});st({kv_available:pi(),packagist_mirroring_enabled:pi(),package_caching_enabled:pi()});st({enabled:pi()});const aA=st({page:gt(),limit:gt(),total:gt(),totalPages:gt()});function lA(e){return st({data:Ql(e),pagination:aA})}const jS=st({id:ke(),name:ke(),version:ke(),repo_id:ke(),dist_url:ke().nullable(),source_dist_url:ke().nullable(),released_at:gt().nullable(),created_at:gt()});lA(jS);st({name:ke(),versions:Ql(jS)});iA.extend({token:ke()});const CS=O.createContext(void 0),Uf="composer_proxy_admin_token";function sA({children:e}){const[n,i]=O.useState(()=>typeof window<"u"?localStorage.getItem(Uf):null),[a,s]=O.useState(null),[u,c]=O.useState(null);O.useEffect(()=>{n?fetch("/api/auth/me",{headers:{Authorization:`Bearer ${n}`}}).then(y=>{if(y.ok)return y.json();throw new Error("Failed to fetch user")}).then(y=>s(y.user)).catch(y=>{console.error("AuthContext: Failed to fetch user",y),c(y.message||"Unknown auth error"),p()}):s(null)},[n]);const f=y=>{i(y),localStorage.setItem(Uf,y),c(null)},p=()=>{i(null),s(null),localStorage.removeItem(Uf)},h=n!==null&&n.length>0,g=a?.role==="admin";return v.jsx(CS.Provider,{value:{adminToken:n,isAuthenticated:h,user:a,isAdmin:g,login:f,logout:p,authError:u},children:e})}function ja(){const e=O.useContext(CS);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}function oA(){const[e,n]=O.useState(!1),[i,a]=O.useState(null),s=Tn(),{data:u=[],isLoading:c}=an({queryKey:["repositories"],queryFn:Nb}),{data:f}=an({queryKey:["settings"],queryFn:Yo}),p=f?.packagist_mirroring_enabled??!0,h=u.filter(w=>w.id!=="packagist"||p),g=wn({mutationFn:mj,onSuccess:()=>{s.invalidateQueries({queryKey:["repositories"]})}}),y=wn({mutationFn:gj,onSuccess:()=>{s.invalidateQueries({queryKey:["repositories"]})}}),x=w=>{const k={active:"bg-emerald-500/20 text-emerald-400 border-emerald-500/30",error:"bg-red-500/20 text-red-400 border-red-500/30",pending:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",syncing:"bg-blue-500/20 text-blue-400 border-blue-500/30"};return v.jsx("span",{className:`px-2 py-1 text-xs font-medium rounded-full border ${k[w]}`,children:w})},{isAdmin:b}=ja();return v.jsxs("div",{className:"space-y-8","data-testid":"repositories-page",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{children:[v.jsx("h2",{className:"font-display text-2xl font-bold text-slate-100 mb-2","data-testid":"repositories-heading",children:"Repositories"}),v.jsx("p",{className:"text-slate-400",children:"Manage your package sources. Packages are loaded on-demand when requested."})]}),b&&v.jsx("button",{onClick:()=>n(!0),className:"btn-primary","data-testid":"add-repository-button","aria-label":"Add new repository",children:"+ Add Repository"})]}),v.jsx("div",{className:"card overflow-hidden",children:c?v.jsx("div",{className:"p-8 text-center",children:v.jsx("div",{className:"w-8 h-8 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin mx-auto"})}):h.length===0?v.jsxs("div",{className:"p-8 text-center text-slate-400",children:["No repositories configured yet. ",b?"Add your first repository to get started.":"Ask an admin to configure repositories."]}):v.jsxs("table",{className:"w-full",children:[v.jsx("thead",{className:"bg-slate-800/50 border-b border-slate-700",children:v.jsxs("tr",{children:[v.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"URL"}),v.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Type"}),v.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Status"}),v.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Last Tested"}),b&&v.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Actions"})]})}),v.jsx("tbody",{className:"divide-y divide-slate-800",children:h.map(w=>{const k=w.id==="packagist";return v.jsxs("tr",{className:"hover:bg-slate-800/30",children:[v.jsxs("td",{className:"px-6 py-4",children:[v.jsxs("div",{className:"text-sm text-slate-200 font-medium truncate max-w-xs",children:[w.url,k&&v.jsx("span",{className:"ml-2 text-xs text-slate-500",children:"(Public Packagist)"})]}),w.error_message&&v.jsx("div",{className:"text-xs text-red-400 mt-1",children:w.error_message})]}),v.jsxs("td",{className:"px-6 py-4 text-sm text-slate-400",children:[w.vcs_type," / ",w.credential_type]}),v.jsx("td",{className:"px-6 py-4",children:x(w.status)}),v.jsx("td",{className:"px-6 py-4 text-sm text-slate-400",children:w.last_synced_at?new Date(w.last_synced_at*1e3).toLocaleString():"Never"}),b&&v.jsxs("td",{className:"px-6 py-4 text-right space-x-3",children:[!k&&v.jsxs(v.Fragment,{children:[v.jsx("button",{onClick:()=>y.mutate(w.id),disabled:y.isPending||w.status==="syncing",className:"text-primary-400 hover:text-primary-300 text-sm disabled:opacity-50",title:"Test connection and validate credentials. Packages are loaded on-demand when requested.",children:w.status==="syncing"?"Testing...":"Test"}),v.jsx("button",{onClick:()=>a(w),className:"text-slate-400 hover:text-slate-200 text-sm",children:"Edit"}),v.jsx("button",{onClick:()=>{confirm("Delete this repository?")&&g.mutate(w.id)},className:"text-red-400 hover:text-red-300 text-sm",children:"Delete"})]}),k&&v.jsx("span",{className:"text-xs text-slate-500 italic",children:"Managed by system"})]})]},w.id)})})]})}),v.jsx(fA,{}),e&&v.jsx(uA,{onClose:()=>n(!1)}),i&&v.jsx(cA,{repository:i,onClose:()=>a(null)})]})}function uA({onClose:e}){const[n,i]=O.useState(""),[a,s]=O.useState("composer"),[u,c]=O.useState("http_basic"),[f,p]=O.useState({}),[h,g]=O.useState(""),[y,x]=O.useState(""),b=Tn(),w=wn({mutationFn:hj,onSuccess:()=>{b.invalidateQueries({queryKey:["repositories"]}),e()}}),k=Uo[a]||[],j=Lo[u]?.fields||[],_=T=>{s(T);const V=Uo[T]||[];V.length>0&&!V.includes(u)&&(c(V[0]),p({}))},R=T=>{T.preventDefault(),w.mutate({url:n,vcs_type:a,credential_type:u,auth_credentials:f,composer_json_path:h||void 0,package_filter:y||void 0})};return v.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:v.jsxs("div",{className:"card max-w-lg w-full mx-4 p-6",children:[v.jsxs("div",{className:"flex items-center justify-between mb-6",children:[v.jsx("h3",{className:"font-display text-xl font-bold text-slate-100",children:"Add Repository"}),v.jsx("button",{onClick:e,className:"text-slate-400 hover:text-slate-200",children:v.jsx(vi,{className:"w-4 h-4"})})]}),v.jsxs("form",{onSubmit:R,className:"space-y-4",children:[v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Repository URL"}),v.jsx("input",{type:"url",value:n,onChange:T=>i(T.target.value),placeholder:"https://github.com/owner/repo or https://composer.example.com",className:"input w-full",required:!0})]}),v.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Source Type"}),v.jsxs("select",{value:a,onChange:T=>_(T.target.value),className:"input w-full",children:[v.jsx("option",{value:"composer",children:"Composer Repository"}),v.jsx("option",{value:"git",children:"Git Repository"})]})]}),v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Credential Type"}),v.jsx("select",{value:u,onChange:T=>{c(T.target.value),p({})},className:"input w-full",children:k.map(T=>v.jsx("option",{value:T,children:Lo[T]?.label||T},T))})]})]}),u==="none"?v.jsxs("div",{className:"bg-slate-800/50 border border-slate-700 rounded-lg p-4",children:[v.jsx("p",{className:"text-sm text-slate-300",children:v.jsx("strong",{className:"text-slate-200",children:"Public Repository"})}),v.jsxs("p",{className:"text-xs text-slate-400 mt-1",children:["No authentication required. Packages will be synced on-demand when requested via Composer.",a==="git"&&" Make sure the repository is publicly accessible."]})]}):j.map(T=>v.jsxs("div",{children:[v.jsx("label",{className:"label",children:T.label}),v.jsx("input",{type:T.type,value:f[T.name]||"",onChange:V=>p(X=>({...X,[T.name]:V.target.value})),className:"input w-full",required:!0})]},T.name)),a==="git"&&v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Composer.json Path (optional)"}),v.jsx("input",{type:"text",value:h,onChange:T=>g(T.target.value),placeholder:"**/composer.json",className:"input w-full"}),v.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Glob pattern to find composer.json files. Default: **/composer.json"})]}),v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Package Filter (optional)"}),v.jsx("input",{type:"text",value:y,onChange:T=>x(T.target.value),placeholder:"vendor/*, vendor/package1",className:"input w-full"}),v.jsx("p",{className:"text-xs text-slate-500 mt-1",children:a==="git"?'Packages this repo provides. Supports wildcards: "vendor/*" matches all vendor packages. Reduces API calls.':'Filter packages with wildcards: "vendor/*" or exact names. Leave empty to allow all.'})]}),v.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[v.jsx("button",{type:"button",onClick:e,className:"btn-secondary",children:"Cancel"}),v.jsx("button",{type:"submit",className:"btn-primary",disabled:w.isPending,children:w.isPending?"Adding...":"Add Repository"})]}),w.error&&v.jsx("p",{className:"text-red-400 text-sm",children:w.error.message})]})]})})}function cA({repository:e,onClose:n}){const[i,a]=O.useState(e.url),[s,u]=O.useState(e.vcs_type),[c,f]=O.useState(e.credential_type),[p,h]=O.useState({}),[g,y]=O.useState(e.composer_json_path||""),[x,b]=O.useState(e.package_filter||""),w=Tn(),k=wn({mutationFn:V=>pj(e.id,V),onSuccess:()=>{w.invalidateQueries({queryKey:["repositories"]}),n()}}),j=Uo[s]||[],_=Lo[c]?.fields||[],R=V=>{u(V);const X=Uo[V]||[];X.length>0&&!X.includes(c)&&(f(X[0]),h({}))},T=V=>{V.preventDefault();const X={};if(i!==e.url&&(X.url=i),s!==e.vcs_type&&(X.vcs_type=s),c!==e.credential_type&&(X.credential_type=c),Object.values(p).some(Z=>Z.trim()!=="")&&(X.auth_credentials=p),g!==(e.composer_json_path||"")&&(X.composer_json_path=g||void 0),x!==(e.package_filter||"")&&(X.package_filter=x||void 0),Object.keys(X).length===0){n();return}k.mutate(X)};return v.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:v.jsxs("div",{className:"card max-w-lg w-full mx-4 p-6",children:[v.jsxs("div",{className:"flex items-center justify-between mb-6",children:[v.jsx("h3",{className:"font-display text-xl font-bold text-slate-100",children:"Edit Repository"}),v.jsx("button",{onClick:n,className:"text-slate-400 hover:text-slate-200",children:v.jsx(vi,{className:"w-4 h-4"})})]}),v.jsxs("form",{onSubmit:T,className:"space-y-4",children:[v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Repository URL"}),v.jsx("input",{type:"url",value:i,onChange:V=>a(V.target.value),placeholder:"https://github.com/owner/repo or https://composer.example.com",className:"input w-full",required:!0})]}),v.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Source Type"}),v.jsxs("select",{value:s,onChange:V=>R(V.target.value),className:"input w-full",children:[v.jsx("option",{value:"composer",children:"Composer Repository"}),v.jsx("option",{value:"git",children:"Git Repository"})]})]}),v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Credential Type"}),v.jsx("select",{value:c,onChange:V=>{f(V.target.value),h({})},className:"input w-full",children:j.map(V=>v.jsx("option",{value:V,children:Lo[V]?.label||V},V))})]})]}),c==="none"?v.jsxs("div",{className:"bg-slate-800/50 border border-slate-700 rounded-lg p-4",children:[v.jsx("p",{className:"text-sm text-slate-300",children:v.jsx("strong",{className:"text-slate-200",children:"Public Repository"})}),v.jsxs("p",{className:"text-xs text-slate-400 mt-1",children:["No authentication required. Packages will be synced on-demand when requested via Composer.",s==="git"&&" Make sure the repository is publicly accessible."]})]}):v.jsxs("div",{className:"space-y-4",children:[v.jsx("p",{className:"text-xs text-slate-500",children:"Leave credential fields empty to keep current values."}),_.map(V=>v.jsxs("div",{children:[v.jsx("label",{className:"label",children:V.label}),v.jsx("input",{type:V.type,value:p[V.name]||"",onChange:X=>h(L=>({...L,[V.name]:X.target.value})),placeholder:"Leave empty to keep current",className:"input w-full"})]},V.name))]}),s==="git"&&v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Composer.json Path (optional)"}),v.jsx("input",{type:"text",value:g,onChange:V=>y(V.target.value),placeholder:"**/composer.json",className:"input w-full"}),v.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Glob pattern to find composer.json files. Default: **/composer.json"})]}),v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Package Filter (optional)"}),v.jsx("input",{type:"text",value:x,onChange:V=>b(V.target.value),placeholder:"vendor/*, vendor/package1",className:"input w-full"}),v.jsx("p",{className:"text-xs text-slate-500 mt-1",children:s==="git"?'Packages this repo provides. Supports wildcards: "vendor/*" matches all vendor packages. Reduces API calls.':'Filter packages with wildcards: "vendor/*" or exact names. Leave empty to allow all.'})]}),v.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[v.jsx("button",{type:"button",onClick:n,className:"btn-secondary",children:"Cancel"}),v.jsx("button",{type:"submit",className:"btn-primary",disabled:k.isPending,children:k.isPending?"Saving...":"Save Changes"})]}),k.error&&v.jsx("p",{className:"text-red-400 text-sm",children:k.error.message})]})]})})}function fA(){const e=Tn(),{isAdmin:n}=ja(),{data:i,isLoading:a}=an({queryKey:["settings"],queryFn:Yo}),s=wn({mutationFn:jj,onSuccess:()=>{e.invalidateQueries({queryKey:["settings"]})}}),u=i?.packagist_mirroring_enabled??!0,c=()=>{n&&s.mutate(!u)};return v.jsxs("div",{className:"card p-6 mt-8",children:[v.jsxs("div",{className:"flex items-start justify-between",children:[v.jsxs("div",{className:"flex-1",children:[v.jsx("h3",{className:"font-display text-lg font-semibold text-slate-100 mb-2",children:"Public Packagist Mirroring"}),v.jsxs("p",{className:"text-slate-400 text-sm mb-4",children:["When enabled, packages not found in your private repositories will be proxied from"," ",v.jsx("a",{href:"https://packagist.org",target:"_blank",rel:"noopener noreferrer",className:"text-primary-400 hover:underline",children:"packagist.org"}),". This allows Composer to resolve public dependencies through this proxy."]}),v.jsxs("div",{className:"bg-slate-800/50 rounded-lg p-4 text-sm",children:[v.jsx("p",{className:"text-slate-300 mb-2",children:v.jsx("strong",{children:"When to disable:"})}),v.jsxs("ul",{className:"list-disc list-inside text-slate-400 space-y-1",children:[v.jsx("li",{children:"You're using Magento Marketplace or another private repository as your primary source"}),v.jsx("li",{children:"You want to ensure only private packages are served by this proxy"}),v.jsx("li",{children:"You have a separate Packagist mirror configured in your Composer"})]})]})]}),v.jsxs("div",{className:"ml-8 flex flex-col items-center",children:[v.jsx("button",{onClick:c,disabled:a||s.isPending||!n,className:`relative inline-flex h-7 w-14 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 focus:ring-offset-slate-900 disabled:opacity-50 ${u?"bg-primary-600":"bg-slate-700"}`,role:"switch","aria-checked":u,children:v.jsx("span",{className:`pointer-events-none inline-block h-6 w-6 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out ${u?"translate-x-7":"translate-x-0"}`})}),v.jsx("span",{className:"mt-2 text-xs text-slate-500",children:a?"Loading...":u?"Enabled":"Disabled"})]})]}),s.isError&&v.jsxs("p",{className:"text-red-400 text-sm mt-4",children:["Failed to update setting: ",s.error.message]})]})}function dA(){const[e,n]=O.useState(!1),[i,a]=O.useState(null),s=Tn(),{isAdmin:u}=ja(),{data:c=[],isLoading:f}=an({queryKey:["tokens"],queryFn:yj}),{data:p,isLoading:h}=an({queryKey:["settings"],queryFn:Yo}),g=p?.kv_available??!1,y=f||h,x=wn({mutationFn:({id:w,data:k})=>xj(w,k),onSuccess:()=>{s.invalidateQueries({queryKey:["tokens"]})}}),b=wn({mutationFn:bj,onSuccess:()=>{s.invalidateQueries({queryKey:["tokens"]})}});return v.jsxs("div",{className:"space-y-8","data-testid":"tokens-page",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{children:[v.jsx("h2",{className:"font-display text-2xl font-bold text-slate-100 mb-2","data-testid":"tokens-heading",children:"Access Tokens"}),v.jsx("p",{className:"text-slate-400",children:"Manage tokens for Composer authentication"})]}),u&&v.jsx("button",{onClick:()=>n(!0),className:"btn-primary","data-testid":"generate-token-button","aria-label":"Generate new access token",children:"+ Generate Token"})]}),v.jsx("div",{className:"card overflow-hidden",children:y?v.jsx("div",{className:"p-8 text-center",children:v.jsx("div",{className:"w-8 h-8 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin mx-auto"})}):c.length===0?v.jsxs("div",{className:"p-8 text-center text-slate-400",children:["No tokens generated yet. ",u?"Create your first token to authenticate Composer.":"Ask an admin to generate tokens."]}):v.jsxs("table",{className:"w-full",children:[v.jsx("thead",{className:"bg-slate-800/50 border-b border-slate-700",children:v.jsxs("tr",{children:[v.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Description"}),v.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Permissions"}),v.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Rate Limit"}),v.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Created"}),v.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Last Used"}),u&&v.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Actions"})]})}),v.jsx("tbody",{className:"divide-y divide-slate-800",children:c.map(w=>v.jsx(hA,{token:w,onUpdate:k=>x.mutate({id:w.id,data:k}),onDelete:()=>{confirm("Revoke this token?")&&b.mutate(w.id)},isUpdating:x.isPending,kvAvailable:g,isAdmin:u},w.id))})]})}),e&&v.jsx(pA,{onClose:()=>{n(!1),a(null)},onCreated:w=>{a(w)},newToken:i,kvAvailable:g})]})}function hA({token:e,onUpdate:n,onDelete:i,isUpdating:a,kvAvailable:s,isAdmin:u}){const[c,f]=O.useState(!1),[p,h]=O.useState(e.description),g=!!e.rate_limit_max&&e.rate_limit_max>0,[y,x]=O.useState(s&&g),[b,w]=O.useState(g?String(e.rate_limit_max):""),k=()=>{const _=s&&y&&b!==""?parseInt(b,10):null;n({description:p,...s?{rate_limit_max:_===null||isNaN(_)?null:_}:{}}),f(!1)},j=()=>{const _=!!e.rate_limit_max&&e.rate_limit_max>0;h(e.description),x(s&&_),w(_?String(e.rate_limit_max):""),f(!1)};return v.jsxs("tr",{className:"hover:bg-slate-800/30",children:[v.jsx("td",{className:"px-6 py-4 text-sm text-slate-200 font-medium",children:c?v.jsx("input",{type:"text",value:p,onChange:_=>h(_.target.value),className:"input w-full text-sm",autoFocus:!0}):e.description}),v.jsx("td",{className:"px-6 py-4 text-sm text-slate-400",children:v.jsx("div",{className:"flex items-center gap-2",children:e.permissions==="readonly"?v.jsxs(v.Fragment,{children:[v.jsx(Qo,{className:"w-4 h-4"}),v.jsx("span",{children:"Read-only"})]}):v.jsxs(v.Fragment,{children:[v.jsx($h,{className:"w-4 h-4"}),v.jsx("span",{children:"Write"})]})})}),v.jsx("td",{className:"px-6 py-4 text-sm text-slate-400",children:c?v.jsxs("div",{className:"space-y-2",children:[!s&&v.jsx("p",{className:"text-xs text-slate-500 italic",children:"Configure KV to enable rate limiting"}),v.jsxs("label",{className:"flex items-center gap-2 text-xs text-slate-300",children:[v.jsx("input",{type:"checkbox",checked:y,onChange:_=>{const R=_.target.checked;x(R),R&&b===""&&w("1000"),R||w("")},disabled:!s}),"Enabled"]}),v.jsx("input",{type:"number",value:b,onChange:_=>w(_.target.value),min:0,max:25e3,className:"input w-40 text-sm",disabled:!y||!s,placeholder:"Unlimited"})]}):s?e.rate_limit_max===null||e.rate_limit_max===0?"Unlimited":`${e.rate_limit_max.toLocaleString()}/hour`:v.jsx("span",{className:"text-slate-500 italic",children:"KV not configured"})}),v.jsx("td",{className:"px-6 py-4 text-sm text-slate-400",children:new Date(e.created_at*1e3).toLocaleString()}),v.jsx("td",{className:"px-6 py-4 text-sm text-slate-400",children:e.last_used_at?new Date(e.last_used_at*1e3).toLocaleString():"Never"}),u&&v.jsx("td",{className:"px-6 py-4 text-right",children:v.jsx("div",{className:"flex items-center justify-end gap-2",children:c?v.jsxs(v.Fragment,{children:[v.jsx("button",{onClick:k,disabled:a,className:"text-green-400 hover:text-green-300 text-sm flex items-center gap-1",title:"Save",children:v.jsx(XN,{className:"w-4 h-4"})}),v.jsx("button",{onClick:j,disabled:a,className:"text-slate-400 hover:text-slate-200 text-sm",title:"Cancel",children:v.jsx(vi,{className:"w-4 h-4"})})]}):v.jsxs(v.Fragment,{children:[v.jsx("button",{onClick:()=>f(!0),className:"text-blue-400 hover:text-blue-300 text-sm flex items-center gap-1",title:"Edit",children:v.jsx(QN,{className:"w-4 h-4"})}),v.jsx("button",{onClick:i,className:"text-red-400 hover:text-red-300 text-sm",title:"Revoke",children:"Revoke"})]})})})]})}function pA({onClose:e,onCreated:n,newToken:i,kvAvailable:a}){const[s,u]=O.useState(""),[c,f]=O.useState("readonly"),[p,h]=O.useState(!1),[g,y]=O.useState(""),[x,b]=O.useState(!1),w=Tn(),k=wn({mutationFn:vj,onSuccess:R=>{w.invalidateQueries({queryKey:["tokens"]}),n(R)}}),j=R=>{R.preventDefault();const T=a&&p&&g!==""?parseInt(g,10):null;k.mutate({description:s,permissions:c,rate_limit_max:T===null||isNaN(T)?null:T})},_=R=>{navigator.clipboard.writeText(R),b(!0),setTimeout(()=>b(!1),2e3)};if(i){const R=JSON.stringify({"http-basic":{[window.location.host]:{username:"token",password:i.token}}},null,2);return v.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:v.jsxs("div",{className:"card max-w-lg w-full mx-4 p-6",children:[v.jsxs("div",{className:"flex items-center justify-between mb-6",children:[v.jsx("h3",{className:"font-display text-xl font-bold text-slate-100",children:"Token Generated!"}),v.jsx("button",{onClick:e,className:"text-slate-400 hover:text-slate-200",children:v.jsx(vi,{className:"w-4 h-4"})})]}),v.jsxs("div",{className:"bg-yellow-500/10 border border-yellow-500/30 rounded-lg p-4 mb-6 flex items-start gap-2",children:[v.jsx(rj,{className:"w-4 h-4 text-yellow-400 mt-0.5 flex-shrink-0"}),v.jsx("p",{className:"text-yellow-400 text-sm",children:"Copy this token now! It won't be shown again."})]}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Token"}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx("input",{type:"text",value:i.token,readOnly:!0,className:"input w-full font-mono text-xs"}),v.jsxs("button",{onClick:()=>_(i.token),className:"btn-secondary flex items-center gap-1",children:[x?v.jsx(kb,{className:"w-4 h-4"}):null,x?"Copied":"Copy"]})]})]}),v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"auth.json snippet"}),v.jsx("pre",{className:"bg-slate-950 rounded-lg p-4 overflow-x-auto text-xs text-slate-300",children:v.jsx("code",{children:R})}),v.jsx("button",{onClick:()=>_(R),className:"btn-secondary mt-2 text-sm",children:"Copy auth.json"})]})]}),v.jsx("div",{className:"flex justify-end mt-6",children:v.jsx("button",{onClick:e,className:"btn-primary",children:"Done"})})]})})}return v.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:v.jsxs("div",{className:"card max-w-md w-full mx-4 p-6",children:[v.jsxs("div",{className:"flex items-center justify-between mb-6",children:[v.jsx("h3",{className:"font-display text-xl font-bold text-slate-100",children:"Generate Token"}),v.jsx("button",{onClick:e,className:"text-slate-400 hover:text-slate-200",children:v.jsx(vi,{className:"w-4 h-4"})})]}),v.jsxs("form",{onSubmit:j,className:"space-y-4",children:[v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Description"}),v.jsx("input",{type:"text",value:s,onChange:R=>u(R.target.value),placeholder:"e.g., CI/CD Pipeline",className:"input w-full",required:!0})]}),v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Permissions"}),v.jsxs("div",{className:"space-y-2",children:[v.jsxs("label",{className:"flex items-start gap-3 p-3 rounded-lg border border-slate-700 bg-slate-800/50 cursor-pointer hover:bg-slate-800/70 transition-colors",children:[v.jsx("input",{type:"radio",name:"permissions",value:"readonly",checked:c==="readonly",onChange:R=>f(R.target.value),className:"mt-0.5"}),v.jsxs("div",{className:"flex-1",children:[v.jsxs("div",{className:"flex items-center gap-2 text-slate-200 font-medium",children:[v.jsx(Qo,{className:"w-4 h-4"}),"Read-only"]}),v.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Can only download packages (composer install)"})]})]}),v.jsxs("label",{className:"flex items-start gap-3 p-3 rounded-lg border border-slate-700 bg-slate-800/50 cursor-pointer hover:bg-slate-800/70 transition-colors",children:[v.jsx("input",{type:"radio",name:"permissions",value:"write",checked:c==="write",onChange:R=>f(R.target.value),className:"mt-0.5"}),v.jsxs("div",{className:"flex-1",children:[v.jsxs("div",{className:"flex items-center gap-2 text-slate-200 font-medium",children:[v.jsx($h,{className:"w-4 h-4"}),"Write"]}),v.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Can fetch metadata and sync packages (composer require/update)"})]})]})]})]}),v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Rate Limit (requests/hour)"}),v.jsxs("div",{className:"space-y-2",children:[!a&&v.jsx("p",{className:"text-xs text-slate-500 italic",children:"Configure KV to enable rate limiting"}),v.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-300",children:[v.jsx("input",{type:"checkbox",checked:p,onChange:R=>{const T=R.target.checked;h(T),T&&g===""&&y("1000"),T||y("")},disabled:!a}),"Enable rate limiting"]}),v.jsx("input",{type:"number",value:g,onChange:R=>y(R.target.value),placeholder:"Unlimited",min:0,max:25e3,className:"input w-full",disabled:!p||!a}),v.jsx("p",{className:"text-xs text-slate-400",children:"When disabled, no rate limit is enforced (no KV operations)."})]})]}),v.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[v.jsx("button",{type:"button",onClick:e,className:"btn-secondary",children:"Cancel"}),v.jsx("button",{type:"submit",className:"btn-primary",disabled:k.isPending,children:k.isPending?"Generating...":"Generate Token"})]}),k.error&&v.jsx("p",{className:"text-red-400 text-sm",children:k.error.message})]})]})})}var Eo={exports:{}},$f,cv;function eu(){if(cv)return $f;cv=1;const e="2.0.0",n=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,a=16,s=n-6;return $f={MAX_LENGTH:n,MAX_SAFE_COMPONENT_LENGTH:a,MAX_SAFE_BUILD_LENGTH:s,MAX_SAFE_INTEGER:i,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},$f}var If,fv;function tu(){if(fv)return If;fv=1;var e={};return If=typeof process=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{},If}var dv;function Yl(){return dv||(dv=1,(function(e,n){const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:s}=eu(),u=tu();n=e.exports={};const c=n.re=[],f=n.safeRe=[],p=n.src=[],h=n.safeSrc=[],g=n.t={};let y=0;const x="[a-zA-Z0-9-]",b=[["\\s",1],["\\d",s],[x,a]],w=j=>{for(const[_,R]of b)j=j.split(`${_}*`).join(`${_}{0,${R}}`).split(`${_}+`).join(`${_}{1,${R}}`);return j},k=(j,_,R)=>{const T=w(_),V=y++;u(j,V,_),g[j]=V,p[V]=_,h[V]=T,c[V]=new RegExp(_,R?"g":void 0),f[V]=new RegExp(T,R?"g":void 0)};k("NUMERICIDENTIFIER","0|[1-9]\\d*"),k("NUMERICIDENTIFIERLOOSE","\\d+"),k("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${x}*`),k("MAINVERSION",`(${p[g.NUMERICIDENTIFIER]})\\.(${p[g.NUMERICIDENTIFIER]})\\.(${p[g.NUMERICIDENTIFIER]})`),k("MAINVERSIONLOOSE",`(${p[g.NUMERICIDENTIFIERLOOSE]})\\.(${p[g.NUMERICIDENTIFIERLOOSE]})\\.(${p[g.NUMERICIDENTIFIERLOOSE]})`),k("PRERELEASEIDENTIFIER",`(?:${p[g.NONNUMERICIDENTIFIER]}|${p[g.NUMERICIDENTIFIER]})`),k("PRERELEASEIDENTIFIERLOOSE",`(?:${p[g.NONNUMERICIDENTIFIER]}|${p[g.NUMERICIDENTIFIERLOOSE]})`),k("PRERELEASE",`(?:-(${p[g.PRERELEASEIDENTIFIER]}(?:\\.${p[g.PRERELEASEIDENTIFIER]})*))`),k("PRERELEASELOOSE",`(?:-?(${p[g.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[g.PRERELEASEIDENTIFIERLOOSE]})*))`),k("BUILDIDENTIFIER",`${x}+`),k("BUILD",`(?:\\+(${p[g.BUILDIDENTIFIER]}(?:\\.${p[g.BUILDIDENTIFIER]})*))`),k("FULLPLAIN",`v?${p[g.MAINVERSION]}${p[g.PRERELEASE]}?${p[g.BUILD]}?`),k("FULL",`^${p[g.FULLPLAIN]}$`),k("LOOSEPLAIN",`[v=\\s]*${p[g.MAINVERSIONLOOSE]}${p[g.PRERELEASELOOSE]}?${p[g.BUILD]}?`),k("LOOSE",`^${p[g.LOOSEPLAIN]}$`),k("GTLT","((?:<|>)?=?)"),k("XRANGEIDENTIFIERLOOSE",`${p[g.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),k("XRANGEIDENTIFIER",`${p[g.NUMERICIDENTIFIER]}|x|X|\\*`),k("XRANGEPLAIN",`[v=\\s]*(${p[g.XRANGEIDENTIFIER]})(?:\\.(${p[g.XRANGEIDENTIFIER]})(?:\\.(${p[g.XRANGEIDENTIFIER]})(?:${p[g.PRERELEASE]})?${p[g.BUILD]}?)?)?`),k("XRANGEPLAINLOOSE",`[v=\\s]*(${p[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[g.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[g.XRANGEIDENTIFIERLOOSE]})(?:${p[g.PRERELEASELOOSE]})?${p[g.BUILD]}?)?)?`),k("XRANGE",`^${p[g.GTLT]}\\s*${p[g.XRANGEPLAIN]}$`),k("XRANGELOOSE",`^${p[g.GTLT]}\\s*${p[g.XRANGEPLAINLOOSE]}$`),k("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),k("COERCE",`${p[g.COERCEPLAIN]}(?:$|[^\\d])`),k("COERCEFULL",p[g.COERCEPLAIN]+`(?:${p[g.PRERELEASE]})?(?:${p[g.BUILD]})?(?:$|[^\\d])`),k("COERCERTL",p[g.COERCE],!0),k("COERCERTLFULL",p[g.COERCEFULL],!0),k("LONETILDE","(?:~>?)"),k("TILDETRIM",`(\\s*)${p[g.LONETILDE]}\\s+`,!0),n.tildeTrimReplace="$1~",k("TILDE",`^${p[g.LONETILDE]}${p[g.XRANGEPLAIN]}$`),k("TILDELOOSE",`^${p[g.LONETILDE]}${p[g.XRANGEPLAINLOOSE]}$`),k("LONECARET","(?:\\^)"),k("CARETTRIM",`(\\s*)${p[g.LONECARET]}\\s+`,!0),n.caretTrimReplace="$1^",k("CARET",`^${p[g.LONECARET]}${p[g.XRANGEPLAIN]}$`),k("CARETLOOSE",`^${p[g.LONECARET]}${p[g.XRANGEPLAINLOOSE]}$`),k("COMPARATORLOOSE",`^${p[g.GTLT]}\\s*(${p[g.LOOSEPLAIN]})$|^$`),k("COMPARATOR",`^${p[g.GTLT]}\\s*(${p[g.FULLPLAIN]})$|^$`),k("COMPARATORTRIM",`(\\s*)${p[g.GTLT]}\\s*(${p[g.LOOSEPLAIN]}|${p[g.XRANGEPLAIN]})`,!0),n.comparatorTrimReplace="$1$2$3",k("HYPHENRANGE",`^\\s*(${p[g.XRANGEPLAIN]})\\s+-\\s+(${p[g.XRANGEPLAIN]})\\s*$`),k("HYPHENRANGELOOSE",`^\\s*(${p[g.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[g.XRANGEPLAINLOOSE]})\\s*$`),k("STAR","(<|>)?=?\\s*\\*"),k("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),k("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Eo,Eo.exports)),Eo.exports}var qf,hv;function Jh(){if(hv)return qf;hv=1;const e=Object.freeze({loose:!0}),n=Object.freeze({});return qf=a=>a?typeof a!="object"?e:a:n,qf}var Bf,pv;function TS(){if(pv)return Bf;pv=1;const e=/^[0-9]+$/,n=(a,s)=>{if(typeof a=="number"&&typeof s=="number")return a===s?0:a<s?-1:1;const u=e.test(a),c=e.test(s);return u&&c&&(a=+a,s=+s),a===s?0:u&&!c?-1:c&&!u?1:a<s?-1:1};return Bf={compareIdentifiers:n,rcompareIdentifiers:(a,s)=>n(s,a)},Bf}var Pf,mv;function Ut(){if(mv)return Pf;mv=1;const e=tu(),{MAX_LENGTH:n,MAX_SAFE_INTEGER:i}=eu(),{safeRe:a,t:s}=Yl(),u=Jh(),{compareIdentifiers:c}=TS();class f{constructor(h,g){if(g=u(g),h instanceof f){if(h.loose===!!g.loose&&h.includePrerelease===!!g.includePrerelease)return h;h=h.version}else if(typeof h!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof h}".`);if(h.length>n)throw new TypeError(`version is longer than ${n} characters`);e("SemVer",h,g),this.options=g,this.loose=!!g.loose,this.includePrerelease=!!g.includePrerelease;const y=h.trim().match(g.loose?a[s.LOOSE]:a[s.FULL]);if(!y)throw new TypeError(`Invalid Version: ${h}`);if(this.raw=h,this.major=+y[1],this.minor=+y[2],this.patch=+y[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");y[4]?this.prerelease=y[4].split(".").map(x=>{if(/^[0-9]+$/.test(x)){const b=+x;if(b>=0&&b<i)return b}return x}):this.prerelease=[],this.build=y[5]?y[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(h){if(e("SemVer.compare",this.version,this.options,h),!(h instanceof f)){if(typeof h=="string"&&h===this.version)return 0;h=new f(h,this.options)}return h.version===this.version?0:this.compareMain(h)||this.comparePre(h)}compareMain(h){return h instanceof f||(h=new f(h,this.options)),this.major<h.major?-1:this.major>h.major?1:this.minor<h.minor?-1:this.minor>h.minor?1:this.patch<h.patch?-1:this.patch>h.patch?1:0}comparePre(h){if(h instanceof f||(h=new f(h,this.options)),this.prerelease.length&&!h.prerelease.length)return-1;if(!this.prerelease.length&&h.prerelease.length)return 1;if(!this.prerelease.length&&!h.prerelease.length)return 0;let g=0;do{const y=this.prerelease[g],x=h.prerelease[g];if(e("prerelease compare",g,y,x),y===void 0&&x===void 0)return 0;if(x===void 0)return 1;if(y===void 0)return-1;if(y===x)continue;return c(y,x)}while(++g)}compareBuild(h){h instanceof f||(h=new f(h,this.options));let g=0;do{const y=this.build[g],x=h.build[g];if(e("build compare",g,y,x),y===void 0&&x===void 0)return 0;if(x===void 0)return 1;if(y===void 0)return-1;if(y===x)continue;return c(y,x)}while(++g)}inc(h,g,y){if(h.startsWith("pre")){if(!g&&y===!1)throw new Error("invalid increment argument: identifier is empty");if(g){const x=`-${g}`.match(this.options.loose?a[s.PRERELEASELOOSE]:a[s.PRERELEASE]);if(!x||x[1]!==g)throw new Error(`invalid identifier: ${g}`)}}switch(h){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",g,y);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",g,y);break;case"prepatch":this.prerelease.length=0,this.inc("patch",g,y),this.inc("pre",g,y);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",g,y),this.inc("pre",g,y);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const x=Number(y)?1:0;if(this.prerelease.length===0)this.prerelease=[x];else{let b=this.prerelease.length;for(;--b>=0;)typeof this.prerelease[b]=="number"&&(this.prerelease[b]++,b=-2);if(b===-1){if(g===this.prerelease.join(".")&&y===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(x)}}if(g){let b=[g,x];y===!1&&(b=[g]),c(this.prerelease[0],g)===0?isNaN(this.prerelease[1])&&(this.prerelease=b):this.prerelease=b}break}default:throw new Error(`invalid increment argument: ${h}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Pf=f,Pf}var Zf,gv;function Ca(){if(gv)return Zf;gv=1;const e=Ut();return Zf=(i,a,s=!1)=>{if(i instanceof e)return i;try{return new e(i,a)}catch(u){if(!s)return null;throw u}},Zf}var Hf,yv;function mA(){if(yv)return Hf;yv=1;const e=Ca();return Hf=(i,a)=>{const s=e(i,a);return s?s.version:null},Hf}var Ff,vv;function gA(){if(vv)return Ff;vv=1;const e=Ca();return Ff=(i,a)=>{const s=e(i.trim().replace(/^[=v]+/,""),a);return s?s.version:null},Ff}var Vf,xv;function yA(){if(xv)return Vf;xv=1;const e=Ut();return Vf=(i,a,s,u,c)=>{typeof s=="string"&&(c=u,u=s,s=void 0);try{return new e(i instanceof e?i.version:i,s).inc(a,u,c).version}catch{return null}},Vf}var Gf,bv;function vA(){if(bv)return Gf;bv=1;const e=Ca();return Gf=(i,a)=>{const s=e(i,null,!0),u=e(a,null,!0),c=s.compare(u);if(c===0)return null;const f=c>0,p=f?s:u,h=f?u:s,g=!!p.prerelease.length;if(!!h.prerelease.length&&!g){if(!h.patch&&!h.minor)return"major";if(h.compareMain(p)===0)return h.minor&&!h.patch?"minor":"patch"}const x=g?"pre":"";return s.major!==u.major?x+"major":s.minor!==u.minor?x+"minor":s.patch!==u.patch?x+"patch":"prerelease"},Gf}var Qf,Sv;function xA(){if(Sv)return Qf;Sv=1;const e=Ut();return Qf=(i,a)=>new e(i,a).major,Qf}var Yf,wv;function bA(){if(wv)return Yf;wv=1;const e=Ut();return Yf=(i,a)=>new e(i,a).minor,Yf}var Xf,Ev;function SA(){if(Ev)return Xf;Ev=1;const e=Ut();return Xf=(i,a)=>new e(i,a).patch,Xf}var Kf,kv;function wA(){if(kv)return Kf;kv=1;const e=Ca();return Kf=(i,a)=>{const s=e(i,a);return s&&s.prerelease.length?s.prerelease:null},Kf}var Jf,_v;function Rn(){if(_v)return Jf;_v=1;const e=Ut();return Jf=(i,a,s)=>new e(i,s).compare(new e(a,s)),Jf}var Wf,Nv;function EA(){if(Nv)return Wf;Nv=1;const e=Rn();return Wf=(i,a,s)=>e(a,i,s),Wf}var ed,jv;function kA(){if(jv)return ed;jv=1;const e=Rn();return ed=(i,a)=>e(i,a,!0),ed}var td,Cv;function Wh(){if(Cv)return td;Cv=1;const e=Ut();return td=(i,a,s)=>{const u=new e(i,s),c=new e(a,s);return u.compare(c)||u.compareBuild(c)},td}var nd,Tv;function _A(){if(Tv)return nd;Tv=1;const e=Wh();return nd=(i,a)=>i.sort((s,u)=>e(s,u,a)),nd}var rd,Rv;function NA(){if(Rv)return rd;Rv=1;const e=Wh();return rd=(i,a)=>i.sort((s,u)=>e(u,s,a)),rd}var id,Av;function nu(){if(Av)return id;Av=1;const e=Rn();return id=(i,a,s)=>e(i,a,s)>0,id}var ad,Ov;function ep(){if(Ov)return ad;Ov=1;const e=Rn();return ad=(i,a,s)=>e(i,a,s)<0,ad}var ld,zv;function RS(){if(zv)return ld;zv=1;const e=Rn();return ld=(i,a,s)=>e(i,a,s)===0,ld}var sd,Dv;function AS(){if(Dv)return sd;Dv=1;const e=Rn();return sd=(i,a,s)=>e(i,a,s)!==0,sd}var od,Mv;function tp(){if(Mv)return od;Mv=1;const e=Rn();return od=(i,a,s)=>e(i,a,s)>=0,od}var ud,Lv;function np(){if(Lv)return ud;Lv=1;const e=Rn();return ud=(i,a,s)=>e(i,a,s)<=0,ud}var cd,Uv;function OS(){if(Uv)return cd;Uv=1;const e=RS(),n=AS(),i=nu(),a=tp(),s=ep(),u=np();return cd=(f,p,h,g)=>{switch(p){case"===":return typeof f=="object"&&(f=f.version),typeof h=="object"&&(h=h.version),f===h;case"!==":return typeof f=="object"&&(f=f.version),typeof h=="object"&&(h=h.version),f!==h;case"":case"=":case"==":return e(f,h,g);case"!=":return n(f,h,g);case">":return i(f,h,g);case">=":return a(f,h,g);case"<":return s(f,h,g);case"<=":return u(f,h,g);default:throw new TypeError(`Invalid operator: ${p}`)}},cd}var fd,$v;function jA(){if($v)return fd;$v=1;const e=Ut(),n=Ca(),{safeRe:i,t:a}=Yl();return fd=(u,c)=>{if(u instanceof e)return u;if(typeof u=="number"&&(u=String(u)),typeof u!="string")return null;c=c||{};let f=null;if(!c.rtl)f=u.match(c.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{const b=c.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL];let w;for(;(w=b.exec(u))&&(!f||f.index+f[0].length!==u.length);)(!f||w.index+w[0].length!==f.index+f[0].length)&&(f=w),b.lastIndex=w.index+w[1].length+w[2].length;b.lastIndex=-1}if(f===null)return null;const p=f[2],h=f[3]||"0",g=f[4]||"0",y=c.includePrerelease&&f[5]?`-${f[5]}`:"",x=c.includePrerelease&&f[6]?`+${f[6]}`:"";return n(`${p}.${h}.${g}${y}${x}`,c)},fd}var dd,Iv;function CA(){if(Iv)return dd;Iv=1;class e{constructor(){this.max=1e3,this.map=new Map}get(i){const a=this.map.get(i);if(a!==void 0)return this.map.delete(i),this.map.set(i,a),a}delete(i){return this.map.delete(i)}set(i,a){if(!this.delete(i)&&a!==void 0){if(this.map.size>=this.max){const u=this.map.keys().next().value;this.delete(u)}this.map.set(i,a)}return this}}return dd=e,dd}var hd,qv;function An(){if(qv)return hd;qv=1;const e=/\s+/g;class n{constructor(U,D){if(D=s(D),U instanceof n)return U.loose===!!D.loose&&U.includePrerelease===!!D.includePrerelease?U:new n(U.raw,D);if(U instanceof u)return this.raw=U.value,this.set=[[U]],this.formatted=void 0,this;if(this.options=D,this.loose=!!D.loose,this.includePrerelease=!!D.includePrerelease,this.raw=U.trim().replace(e," "),this.set=this.raw.split("||").map(B=>this.parseRange(B.trim())).filter(B=>B.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const B=this.set[0];if(this.set=this.set.filter(te=>!k(te[0])),this.set.length===0)this.set=[B];else if(this.set.length>1){for(const te of this.set)if(te.length===1&&j(te[0])){this.set=[te];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let U=0;U<this.set.length;U++){U>0&&(this.formatted+="||");const D=this.set[U];for(let B=0;B<D.length;B++)B>0&&(this.formatted+=" "),this.formatted+=D[B].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(U){const B=((this.options.includePrerelease&&b)|(this.options.loose&&w))+":"+U,te=a.get(B);if(te)return te;const re=this.options.loose,C=re?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];U=U.replace(C,ue(this.options.includePrerelease)),c("hyphen replace",U),U=U.replace(p[h.COMPARATORTRIM],g),c("comparator trim",U),U=U.replace(p[h.TILDETRIM],y),c("tilde trim",U),U=U.replace(p[h.CARETTRIM],x),c("caret trim",U);let A=U.split(" ").map(ce=>R(ce,this.options)).join(" ").split(/\s+/).map(ce=>se(ce,this.options));re&&(A=A.filter(ce=>(c("loose invalid filter",ce,this.options),!!ce.match(p[h.COMPARATORLOOSE])))),c("range list",A);const q=new Map,N=A.map(ce=>new u(ce,this.options));for(const ce of N){if(k(ce))return[ce];q.set(ce.value,ce)}q.size>1&&q.has("")&&q.delete("");const le=[...q.values()];return a.set(B,le),le}intersects(U,D){if(!(U instanceof n))throw new TypeError("a Range is required");return this.set.some(B=>_(B,D)&&U.set.some(te=>_(te,D)&&B.every(re=>te.every(C=>re.intersects(C,D)))))}test(U){if(!U)return!1;if(typeof U=="string")try{U=new f(U,this.options)}catch{return!1}for(let D=0;D<this.set.length;D++)if(xe(this.set[D],U,this.options))return!0;return!1}}hd=n;const i=CA(),a=new i,s=Jh(),u=ru(),c=tu(),f=Ut(),{safeRe:p,t:h,comparatorTrimReplace:g,tildeTrimReplace:y,caretTrimReplace:x}=Yl(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:w}=eu(),k=I=>I.value==="<0.0.0-0",j=I=>I.value==="",_=(I,U)=>{let D=!0;const B=I.slice();let te=B.pop();for(;D&&B.length;)D=B.every(re=>te.intersects(re,U)),te=B.pop();return D},R=(I,U)=>(I=I.replace(p[h.BUILD],""),c("comp",I,U),I=L(I,U),c("caret",I),I=V(I,U),c("tildes",I),I=Y(I,U),c("xrange",I),I=H(I,U),c("stars",I),I),T=I=>!I||I.toLowerCase()==="x"||I==="*",V=(I,U)=>I.trim().split(/\s+/).map(D=>X(D,U)).join(" "),X=(I,U)=>{const D=U.loose?p[h.TILDELOOSE]:p[h.TILDE];return I.replace(D,(B,te,re,C,A)=>{c("tilde",I,B,te,re,C,A);let q;return T(te)?q="":T(re)?q=`>=${te}.0.0 <${+te+1}.0.0-0`:T(C)?q=`>=${te}.${re}.0 <${te}.${+re+1}.0-0`:A?(c("replaceTilde pr",A),q=`>=${te}.${re}.${C}-${A} <${te}.${+re+1}.0-0`):q=`>=${te}.${re}.${C} <${te}.${+re+1}.0-0`,c("tilde return",q),q})},L=(I,U)=>I.trim().split(/\s+/).map(D=>Z(D,U)).join(" "),Z=(I,U)=>{c("caret",I,U);const D=U.loose?p[h.CARETLOOSE]:p[h.CARET],B=U.includePrerelease?"-0":"";return I.replace(D,(te,re,C,A,q)=>{c("caret",I,te,re,C,A,q);let N;return T(re)?N="":T(C)?N=`>=${re}.0.0${B} <${+re+1}.0.0-0`:T(A)?re==="0"?N=`>=${re}.${C}.0${B} <${re}.${+C+1}.0-0`:N=`>=${re}.${C}.0${B} <${+re+1}.0.0-0`:q?(c("replaceCaret pr",q),re==="0"?C==="0"?N=`>=${re}.${C}.${A}-${q} <${re}.${C}.${+A+1}-0`:N=`>=${re}.${C}.${A}-${q} <${re}.${+C+1}.0-0`:N=`>=${re}.${C}.${A}-${q} <${+re+1}.0.0-0`):(c("no pr"),re==="0"?C==="0"?N=`>=${re}.${C}.${A}${B} <${re}.${C}.${+A+1}-0`:N=`>=${re}.${C}.${A}${B} <${re}.${+C+1}.0-0`:N=`>=${re}.${C}.${A} <${+re+1}.0.0-0`),c("caret return",N),N})},Y=(I,U)=>(c("replaceXRanges",I,U),I.split(/\s+/).map(D=>ie(D,U)).join(" ")),ie=(I,U)=>{I=I.trim();const D=U.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return I.replace(D,(B,te,re,C,A,q)=>{c("xRange",I,B,te,re,C,A,q);const N=T(re),le=N||T(C),ce=le||T(A),de=ce;return te==="="&&de&&(te=""),q=U.includePrerelease?"-0":"",N?te===">"||te==="<"?B="<0.0.0-0":B="*":te&&de?(le&&(C=0),A=0,te===">"?(te=">=",le?(re=+re+1,C=0,A=0):(C=+C+1,A=0)):te==="<="&&(te="<",le?re=+re+1:C=+C+1),te==="<"&&(q="-0"),B=`${te+re}.${C}.${A}${q}`):le?B=`>=${re}.0.0${q} <${+re+1}.0.0-0`:ce&&(B=`>=${re}.${C}.0${q} <${re}.${+C+1}.0-0`),c("xRange return",B),B})},H=(I,U)=>(c("replaceStars",I,U),I.trim().replace(p[h.STAR],"")),se=(I,U)=>(c("replaceGTE0",I,U),I.trim().replace(p[U.includePrerelease?h.GTE0PRE:h.GTE0],"")),ue=I=>(U,D,B,te,re,C,A,q,N,le,ce,de)=>(T(B)?D="":T(te)?D=`>=${B}.0.0${I?"-0":""}`:T(re)?D=`>=${B}.${te}.0${I?"-0":""}`:C?D=`>=${D}`:D=`>=${D}${I?"-0":""}`,T(N)?q="":T(le)?q=`<${+N+1}.0.0-0`:T(ce)?q=`<${N}.${+le+1}.0-0`:de?q=`<=${N}.${le}.${ce}-${de}`:I?q=`<${N}.${le}.${+ce+1}-0`:q=`<=${q}`,`${D} ${q}`.trim()),xe=(I,U,D)=>{for(let B=0;B<I.length;B++)if(!I[B].test(U))return!1;if(U.prerelease.length&&!D.includePrerelease){for(let B=0;B<I.length;B++)if(c(I[B].semver),I[B].semver!==u.ANY&&I[B].semver.prerelease.length>0){const te=I[B].semver;if(te.major===U.major&&te.minor===U.minor&&te.patch===U.patch)return!0}return!1}return!0};return hd}var pd,Bv;function ru(){if(Bv)return pd;Bv=1;const e=Symbol("SemVer ANY");class n{static get ANY(){return e}constructor(g,y){if(y=i(y),g instanceof n){if(g.loose===!!y.loose)return g;g=g.value}g=g.trim().split(/\s+/).join(" "),c("comparator",g,y),this.options=y,this.loose=!!y.loose,this.parse(g),this.semver===e?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(g){const y=this.options.loose?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],x=g.match(y);if(!x)throw new TypeError(`Invalid comparator: ${g}`);this.operator=x[1]!==void 0?x[1]:"",this.operator==="="&&(this.operator=""),x[2]?this.semver=new f(x[2],this.options.loose):this.semver=e}toString(){return this.value}test(g){if(c("Comparator.test",g,this.options.loose),this.semver===e||g===e)return!0;if(typeof g=="string")try{g=new f(g,this.options)}catch{return!1}return u(g,this.operator,this.semver,this.options)}intersects(g,y){if(!(g instanceof n))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new p(g.value,y).test(this.value):g.operator===""?g.value===""?!0:new p(this.value,y).test(g.semver):(y=i(y),y.includePrerelease&&(this.value==="<0.0.0-0"||g.value==="<0.0.0-0")||!y.includePrerelease&&(this.value.startsWith("<0.0.0")||g.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&g.operator.startsWith(">")||this.operator.startsWith("<")&&g.operator.startsWith("<")||this.semver.version===g.semver.version&&this.operator.includes("=")&&g.operator.includes("=")||u(this.semver,"<",g.semver,y)&&this.operator.startsWith(">")&&g.operator.startsWith("<")||u(this.semver,">",g.semver,y)&&this.operator.startsWith("<")&&g.operator.startsWith(">")))}}pd=n;const i=Jh(),{safeRe:a,t:s}=Yl(),u=OS(),c=tu(),f=Ut(),p=An();return pd}var md,Pv;function iu(){if(Pv)return md;Pv=1;const e=An();return md=(i,a,s)=>{try{a=new e(a,s)}catch{return!1}return a.test(i)},md}var gd,Zv;function TA(){if(Zv)return gd;Zv=1;const e=An();return gd=(i,a)=>new e(i,a).set.map(s=>s.map(u=>u.value).join(" ").trim().split(" ")),gd}var yd,Hv;function RA(){if(Hv)return yd;Hv=1;const e=Ut(),n=An();return yd=(a,s,u)=>{let c=null,f=null,p=null;try{p=new n(s,u)}catch{return null}return a.forEach(h=>{p.test(h)&&(!c||f.compare(h)===-1)&&(c=h,f=new e(c,u))}),c},yd}var vd,Fv;function AA(){if(Fv)return vd;Fv=1;const e=Ut(),n=An();return vd=(a,s,u)=>{let c=null,f=null,p=null;try{p=new n(s,u)}catch{return null}return a.forEach(h=>{p.test(h)&&(!c||f.compare(h)===1)&&(c=h,f=new e(c,u))}),c},vd}var xd,Vv;function OA(){if(Vv)return xd;Vv=1;const e=Ut(),n=An(),i=nu();return xd=(s,u)=>{s=new n(s,u);let c=new e("0.0.0");if(s.test(c)||(c=new e("0.0.0-0"),s.test(c)))return c;c=null;for(let f=0;f<s.set.length;++f){const p=s.set[f];let h=null;p.forEach(g=>{const y=new e(g.semver.version);switch(g.operator){case">":y.prerelease.length===0?y.patch++:y.prerelease.push(0),y.raw=y.format();case"":case">=":(!h||i(y,h))&&(h=y);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${g.operator}`)}}),h&&(!c||i(c,h))&&(c=h)}return c&&s.test(c)?c:null},xd}var bd,Gv;function zA(){if(Gv)return bd;Gv=1;const e=An();return bd=(i,a)=>{try{return new e(i,a).range||"*"}catch{return null}},bd}var Sd,Qv;function rp(){if(Qv)return Sd;Qv=1;const e=Ut(),n=ru(),{ANY:i}=n,a=An(),s=iu(),u=nu(),c=ep(),f=np(),p=tp();return Sd=(g,y,x,b)=>{g=new e(g,b),y=new a(y,b);let w,k,j,_,R;switch(x){case">":w=u,k=f,j=c,_=">",R=">=";break;case"<":w=c,k=p,j=u,_="<",R="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(g,y,b))return!1;for(let T=0;T<y.set.length;++T){const V=y.set[T];let X=null,L=null;if(V.forEach(Z=>{Z.semver===i&&(Z=new n(">=0.0.0")),X=X||Z,L=L||Z,w(Z.semver,X.semver,b)?X=Z:j(Z.semver,L.semver,b)&&(L=Z)}),X.operator===_||X.operator===R||(!L.operator||L.operator===_)&&k(g,L.semver))return!1;if(L.operator===R&&j(g,L.semver))return!1}return!0},Sd}var wd,Yv;function DA(){if(Yv)return wd;Yv=1;const e=rp();return wd=(i,a,s)=>e(i,a,">",s),wd}var Ed,Xv;function MA(){if(Xv)return Ed;Xv=1;const e=rp();return Ed=(i,a,s)=>e(i,a,"<",s),Ed}var kd,Kv;function LA(){if(Kv)return kd;Kv=1;const e=An();return kd=(i,a,s)=>(i=new e(i,s),a=new e(a,s),i.intersects(a,s)),kd}var _d,Jv;function UA(){if(Jv)return _d;Jv=1;const e=iu(),n=Rn();return _d=(i,a,s)=>{const u=[];let c=null,f=null;const p=i.sort((x,b)=>n(x,b,s));for(const x of p)e(x,a,s)?(f=x,c||(c=x)):(f&&u.push([c,f]),f=null,c=null);c&&u.push([c,null]);const h=[];for(const[x,b]of u)x===b?h.push(x):!b&&x===p[0]?h.push("*"):b?x===p[0]?h.push(`<=${b}`):h.push(`${x} - ${b}`):h.push(`>=${x}`);const g=h.join(" || "),y=typeof a.raw=="string"?a.raw:String(a);return g.length<y.length?g:a},_d}var Nd,Wv;function $A(){if(Wv)return Nd;Wv=1;const e=An(),n=ru(),{ANY:i}=n,a=iu(),s=Rn(),u=(y,x,b={})=>{if(y===x)return!0;y=new e(y,b),x=new e(x,b);let w=!1;e:for(const k of y.set){for(const j of x.set){const _=p(k,j,b);if(w=w||_!==null,_)continue e}if(w)return!1}return!0},c=[new n(">=0.0.0-0")],f=[new n(">=0.0.0")],p=(y,x,b)=>{if(y===x)return!0;if(y.length===1&&y[0].semver===i){if(x.length===1&&x[0].semver===i)return!0;b.includePrerelease?y=c:y=f}if(x.length===1&&x[0].semver===i){if(b.includePrerelease)return!0;x=f}const w=new Set;let k,j;for(const Y of y)Y.operator===">"||Y.operator===">="?k=h(k,Y,b):Y.operator==="<"||Y.operator==="<="?j=g(j,Y,b):w.add(Y.semver);if(w.size>1)return null;let _;if(k&&j){if(_=s(k.semver,j.semver,b),_>0)return null;if(_===0&&(k.operator!==">="||j.operator!=="<="))return null}for(const Y of w){if(k&&!a(Y,String(k),b)||j&&!a(Y,String(j),b))return null;for(const ie of x)if(!a(Y,String(ie),b))return!1;return!0}let R,T,V,X,L=j&&!b.includePrerelease&&j.semver.prerelease.length?j.semver:!1,Z=k&&!b.includePrerelease&&k.semver.prerelease.length?k.semver:!1;L&&L.prerelease.length===1&&j.operator==="<"&&L.prerelease[0]===0&&(L=!1);for(const Y of x){if(X=X||Y.operator===">"||Y.operator===">=",V=V||Y.operator==="<"||Y.operator==="<=",k){if(Z&&Y.semver.prerelease&&Y.semver.prerelease.length&&Y.semver.major===Z.major&&Y.semver.minor===Z.minor&&Y.semver.patch===Z.patch&&(Z=!1),Y.operator===">"||Y.operator===">="){if(R=h(k,Y,b),R===Y&&R!==k)return!1}else if(k.operator===">="&&!a(k.semver,String(Y),b))return!1}if(j){if(L&&Y.semver.prerelease&&Y.semver.prerelease.length&&Y.semver.major===L.major&&Y.semver.minor===L.minor&&Y.semver.patch===L.patch&&(L=!1),Y.operator==="<"||Y.operator==="<="){if(T=g(j,Y,b),T===Y&&T!==j)return!1}else if(j.operator==="<="&&!a(j.semver,String(Y),b))return!1}if(!Y.operator&&(j||k)&&_!==0)return!1}return!(k&&V&&!j&&_!==0||j&&X&&!k&&_!==0||Z||L)},h=(y,x,b)=>{if(!y)return x;const w=s(y.semver,x.semver,b);return w>0?y:w<0||x.operator===">"&&y.operator===">="?x:y},g=(y,x,b)=>{if(!y)return x;const w=s(y.semver,x.semver,b);return w<0?y:w>0||x.operator==="<"&&y.operator==="<="?x:y};return Nd=u,Nd}var jd,ex;function IA(){if(ex)return jd;ex=1;const e=Yl(),n=eu(),i=Ut(),a=TS(),s=Ca(),u=mA(),c=gA(),f=yA(),p=vA(),h=xA(),g=bA(),y=SA(),x=wA(),b=Rn(),w=EA(),k=kA(),j=Wh(),_=_A(),R=NA(),T=nu(),V=ep(),X=RS(),L=AS(),Z=tp(),Y=np(),ie=OS(),H=jA(),se=ru(),ue=An(),xe=iu(),I=TA(),U=RA(),D=AA(),B=OA(),te=zA(),re=rp(),C=DA(),A=MA(),q=LA(),N=UA(),le=$A();return jd={parse:s,valid:u,clean:c,inc:f,diff:p,major:h,minor:g,patch:y,prerelease:x,compare:b,rcompare:w,compareLoose:k,compareBuild:j,sort:_,rsort:R,gt:T,lt:V,eq:X,neq:L,gte:Z,lte:Y,cmp:ie,coerce:H,Comparator:se,Range:ue,satisfies:xe,toComparators:I,maxSatisfying:U,minSatisfying:D,minVersion:B,validRange:te,outside:re,gtr:C,ltr:A,intersects:q,simplifyRange:N,subset:le,SemVer:i,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:n.SEMVER_SPEC_VERSION,RELEASE_TYPES:n.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers},jd}var qA=IA();const Un=Bl(qA);function BA(e,n){const[i,a]=O.useState(e);return O.useEffect(()=>{const s=setTimeout(()=>a(e),n);return()=>clearTimeout(s)},[e,n]),i}const PA="composer_proxy_admin_token";function ZA(){return typeof window<"u"?localStorage.getItem(PA):null}function HA({distUrl:e}){const[n,i]=O.useState(!1),[a,s]=O.useState(null),u=async c=>{c.stopPropagation(),i(!0),s(null);try{const f=ZA(),p={};f&&(p.Authorization=`Bearer ${f}`);const h=await fetch(e,{headers:p});if(!h.ok)throw new Error(`Download failed: ${h.status} ${h.statusText}`);const g=await h.blob(),y=window.URL.createObjectURL(g),x=document.createElement("a");x.href=y,x.download=e.split("/").pop()||"package.zip",document.body.appendChild(x),x.click(),document.body.removeChild(x),window.URL.revokeObjectURL(y)}catch(f){s(f instanceof Error?f.message:"Download failed")}finally{i(!1)}};return a?v.jsxs("div",{className:"flex flex-col items-end gap-1",children:[v.jsx("button",{onClick:u,className:"text-red-400 hover:text-red-300 text-sm","data-testid":"download-button",children:"Retry"}),v.jsx("span",{className:"text-xs text-red-500",children:a})]}):v.jsx("button",{onClick:u,disabled:n,className:"text-primary-400 hover:text-primary-300 text-sm disabled:opacity-50 disabled:cursor-not-allowed","data-testid":"download-button",children:n?"Downloading...":"Download"})}const Cd=20;function FA(){const[e,n]=O.useState(""),[i,a]=O.useState(1),[s,u]=O.useState(!1),c=BA(e,500);O.useEffect(()=>{a(1)},[c]);const{data:f,isLoading:p,isFetching:h}=an({queryKey:["packages",c,i],queryFn:()=>Sj({search:c||void 0,page:i,limit:Cd})}),g=f?.data??[],y=f?.pagination??{total:0,totalPages:0},x=g.reduce((k,j)=>(k[j.name]||(k[j.name]=[]),k[j.name].push(j),k),{}),b=()=>{i>1&&a(i-1)},w=()=>{i<y.totalPages&&a(i+1)};return v.jsxs("div",{className:"space-y-8","data-testid":"packages-page",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{children:[v.jsx("h2",{className:"font-display text-2xl font-bold text-slate-100 mb-2","data-testid":"packages-heading",children:"Packages"}),v.jsx("p",{className:"text-slate-400",children:"Browse cached packages"})]}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsxs("div",{className:"w-72 relative",children:[v.jsx("input",{type:"text",value:e,onChange:k=>n(k.target.value),placeholder:"Search packages...",className:"input w-full","data-testid":"package-search-input","aria-label":"Search packages"}),e!==c&&v.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:v.jsx("div",{className:"w-4 h-4 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin"})})]}),v.jsx("button",{onClick:()=>u(!0),className:"btn-primary","data-testid":"add-packages-button",children:"Add Package"})]})]}),s&&v.jsx(GA,{onClose:()=>u(!1),onSuccess:k=>n(k)}),v.jsx("div",{className:"space-y-4","data-testid":"packages-list",children:p?v.jsx("div",{className:"card p-8 text-center","data-testid":"packages-loading",children:v.jsx("div",{className:"w-8 h-8 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin mx-auto","aria-label":"Loading packages"})}):Object.keys(x).length===0?v.jsx("div",{className:"card p-8 text-center text-slate-400","data-testid":"packages-empty",role:"status","aria-live":"polite",children:"No packages found matching your search."}):v.jsxs(v.Fragment,{children:[Object.entries(x).map(([k,j])=>v.jsx(VA,{name:k,versions:j},k)),y.totalPages>1&&v.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-slate-800",children:[v.jsxs("div",{className:"text-sm text-slate-400",children:["Showing ",(i-1)*Cd+1," - ",Math.min(i*Cd,y.total)," of ",y.total," packages"]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("button",{onClick:b,disabled:i===1||h,className:"p-2 rounded-lg bg-slate-800 hover:bg-slate-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors","aria-label":"Previous page","data-testid":"pagination-prev",children:v.jsx(RN,{className:"w-5 h-5 text-slate-300"})}),v.jsxs("span",{className:"px-4 py-2 text-sm text-slate-300",children:["Page ",i," of ",y.totalPages]}),v.jsx("button",{onClick:w,disabled:i===y.totalPages||h,className:"p-2 rounded-lg bg-slate-800 hover:bg-slate-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors","aria-label":"Next page","data-testid":"pagination-next",children:v.jsx(ON,{className:"w-5 h-5 text-slate-300"})})]})]})]})})]})}function VA({name:e,versions:n}){const[i,a]=O.useState(!1),[s,u]=O.useState(!1),[c,f]=O.useState(null),p=Tn(),h=wn({mutationFn:({packageName:j,version:_})=>jb(j,_),onSuccess:()=>{p.invalidateQueries({queryKey:["packages"]}),f(null)}}),g=O.useMemo(()=>[...n].sort((j,_)=>{const R=/^\d+$/.test(j.version),T=/^\d+$/.test(_.version);if(R&&T){const Y=parseInt(j.version,10);return parseInt(_.version,10)-Y}if(R&&!T&&Un.valid(_.version))return 1;if(!R&&T&&Un.valid(j.version))return-1;const V=Un.valid(j.version),X=Un.valid(_.version);if(V&&X)return Un.rcompare(j.version,_.version);if(V&&!X)return-1;if(!V&&X)return 1;const L=j.version.match(/^(\d+)/),Z=_.version.match(/^(\d+)/);if(L&&Z){const Y=parseInt(L[1],10),ie=parseInt(Z[1],10);if(Y!==ie)return ie-Y}return _.version.localeCompare(j.version,void 0,{numeric:!0,sensitivity:"base"})}),[n]),y=g[0],x=s?g:g.slice(0,5),b=g.length>5,k=(j=>{if(!j)return[];try{const _=JSON.parse(j);return Array.isArray(_)?_:[_]}catch{return[j]}})(y.license);return v.jsxs("div",{className:"card","data-testid":"package-card","data-package-name":e,children:[v.jsxs("div",{className:"p-4 flex items-center justify-between cursor-pointer hover:bg-slate-800/30",onClick:()=>a(!i),role:"button","aria-expanded":i,"aria-label":`${e} package, ${n.length} versions`,"data-testid":"package-header",children:[v.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[v.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-primary-500/20 to-accent-500/20 rounded-lg flex items-center justify-center flex-shrink-0",children:v.jsx(yi,{className:"w-5 h-5 text-primary-400"})}),v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[v.jsx(Sa,{to:(()=>{const[j,..._]=e.split("/"),R=_.join("/");return`/packages/${j}/${R}`})(),onClick:j=>j.stopPropagation(),className:"font-medium text-slate-100 hover:text-primary-400 transition-colors truncate",children:e}),y.package_type&&v.jsx("span",{className:"px-2 py-0.5 text-xs bg-slate-700 text-slate-300 rounded",children:y.package_type}),k.length>0&&v.jsx("span",{className:"px-2 py-0.5 text-xs bg-slate-700 text-slate-300 rounded",children:k[0]})]}),y.description&&v.jsx("p",{className:"text-sm text-slate-400 truncate mb-1",children:y.description}),v.jsxs("p",{className:"text-sm text-slate-500",children:[n.length," version",n.length!==1?"s":""," • Latest:"," ",v.jsx("span",{className:"text-primary-400",children:y.version})]})]})]}),v.jsx("span",{className:"text-slate-400","aria-hidden":"true","data-testid":"package-expand-toggle",children:i?"▼":"▶"})]}),i&&v.jsxs("div",{className:"border-t border-slate-800 p-4",role:"region","aria-label":`Versions for ${e}`,children:[v.jsx("h4",{className:"text-sm font-medium text-slate-400 mb-3",children:"Versions"}),v.jsxs("div",{className:"space-y-2",role:"list",children:[x.map(j=>v.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-800/50 rounded-lg","data-testid":"version-row","data-version":j.version,role:"listitem",children:[v.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[v.jsx("span",{className:"font-medium text-slate-200",children:j.version}),j.released_at&&v.jsx("span",{className:"text-sm text-slate-500","aria-label":`Released ${new Date(j.released_at*1e3).toLocaleDateString()}`,children:new Date(j.released_at*1e3).toLocaleDateString()}),j.is_manual_upload===1&&v.jsx("span",{className:"px-2 py-0.5 text-xs bg-blue-600/20 text-blue-400 border border-blue-500/30 rounded",children:"📤 Manual"})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(HA,{distUrl:j.dist_url}),c===j.version?v.jsxs("div",{className:"flex gap-1",children:[v.jsx("button",{onClick:_=>{_.stopPropagation(),h.mutate({packageName:e,version:j.version})},disabled:h.isPending,className:"px-2 py-1 text-xs bg-red-600 hover:bg-red-500 text-white rounded disabled:opacity-50",title:"Confirm delete",children:h.isPending?"...":"Delete"}),v.jsx("button",{onClick:_=>{_.stopPropagation(),f(null)},className:"px-2 py-1 text-xs bg-slate-600 hover:bg-slate-500 text-white rounded",title:"Cancel",children:"Cancel"})]}):v.jsx("button",{onClick:_=>{_.stopPropagation(),f(j.version)},className:"p-1.5 text-slate-500 hover:text-red-400 hover:bg-red-500/10 rounded transition-colors",title:"Delete this version",children:v.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]},j.id)),h.isError&&v.jsx("div",{className:"p-2 bg-red-500/10 border border-red-500/30 rounded text-sm text-red-400",children:h.error instanceof Error?h.error.message:"Failed to delete"})]}),b&&!s&&v.jsx("button",{onClick:j=>{j.stopPropagation(),u(!0)},className:"mt-3 text-sm text-primary-400 hover:text-primary-300","data-testid":"show-all-versions-button","aria-label":"Show all versions",children:"Show all"})]})]})}function GA({onClose:e,onSuccess:n}){const[i,a]=O.useState("fetch"),[s,u]=O.useState(""),[c,f]=O.useState(""),[p,h]=O.useState(null),[g,y]=O.useState(!1),x=Tn(),{data:b=[]}=an({queryKey:["repositories"],queryFn:Nb}),{data:w}=an({queryKey:["settings"],queryFn:Yo}),k=O.useMemo(()=>{const Y=b.filter(ie=>(ie.vcs_type==="composer"||ie.vcs_type==="git")&&(ie.status==="active"||ie.status==="error"||ie.status==="pending")).filter(ie=>!(w?.packagist_mirroring_enabled&&ie.url==="https://repo.packagist.org")).map(ie=>({...ie,displayName:ie.vcs_type==="git"?`${ie.url} (GitHub)`:ie.url}));return w?.packagist_mirroring_enabled&&Y.unshift({id:"packagist",url:"https://repo.packagist.org",vcs_type:"composer",credential_type:"none",composer_json_path:null,package_filter:null,status:"active",error_message:null,last_synced_at:null,created_at:0,displayName:"Packagist.org"}),Y},[b,w]);O.useMemo(()=>{k.length>0&&!c&&f(k[0].id)},[k,c]);const j=wn({mutationFn:Z=>Cj(Z.repositoryId,Z.packageNames),onSuccess:Z=>{if(x.invalidateQueries({queryKey:["packages"]}),Z.summary.failed===0&&Z.summary.succeeded>0){const Y=Z.results.find(ie=>ie.success);Y&&n(Y.package),e()}}}),_=wn({mutationFn:Z=>Ej(Z),onSuccess:()=>{x.invalidateQueries({queryKey:["packages"]}),h(null),e()}}),R=Z=>{if(Z.preventDefault(),i==="fetch"){const Y=s.split(/[,\s\n]+/).map(ie=>ie.trim()).filter(ie=>ie.length>0);if(Y.length===0||!c)return;j.mutate({repositoryId:c,packageNames:Y})}else{if(!p)return;_.mutate(p)}},T=Z=>{Z.preventDefault(),y(!0)},V=Z=>{Z.preventDefault(),y(!1)},X=Z=>{Z.preventDefault(),y(!1);const Y=Array.from(Z.dataTransfer.files);if(Y.length>0){const ie=Y[0];ie.name.endsWith(".zip")?h(ie):alert("Please upload a ZIP file")}},L=Z=>{const Y=Z.target.files;Y&&Y.length>0&&h(Y[0])};return v.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50",children:v.jsxs("div",{className:"card max-w-2xl w-full mx-4 p-6 max-h-[90vh] overflow-y-auto",children:[v.jsxs("div",{className:"flex items-center justify-between mb-6",children:[v.jsx("h3",{className:"font-display text-xl font-bold text-slate-100",children:"Add Package"}),v.jsx("button",{onClick:e,className:"text-slate-400 hover:text-slate-200",children:v.jsx(vi,{className:"w-4 h-4"})})]}),v.jsxs("div",{className:"flex gap-2 mb-6 border-b border-slate-700",children:[v.jsx("button",{onClick:()=>a("fetch"),className:`px-4 py-2 font-medium transition-colors border-b-2 ${i==="fetch"?"border-primary-500 text-primary-400":"border-transparent text-slate-400 hover:text-slate-200"}`,children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(FN,{className:"w-4 h-4"}),"Fetch from Repository"]})}),v.jsx("button",{onClick:()=>a("upload"),className:`px-4 py-2 font-medium transition-colors border-b-2 ${i==="upload"?"border-primary-500 text-primary-400":"border-transparent text-slate-400 hover:text-slate-200"}`,children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(G0,{className:"w-4 h-4"}),"Upload Package"]})})]}),v.jsxs("form",{onSubmit:R,className:"space-y-4",children:[i==="fetch"?v.jsxs(v.Fragment,{children:[v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Package name(s), separated by comma, spaces or newlines"}),v.jsx("textarea",{value:s,onChange:Z=>u(Z.target.value),placeholder:`vendor/package1
59
+ vendor/package2
60
+ vendor/package3`,className:"input w-full min-h-[120px] resize-y font-mono text-sm",required:!0})]}),v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Mirrored Repository"}),v.jsx("select",{value:c,onChange:Z=>f(Z.target.value),className:"input w-full",required:!0,children:k.length===0?v.jsx("option",{value:"",children:"No repositories available"}):k.map(Z=>v.jsx("option",{value:Z.id,children:Z.displayName},Z.id))}),v.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"You can set up mirrored third party repositories on the settings page."})]}),j.error&&v.jsx("div",{className:"bg-red-500/10 border border-red-500/50 rounded-lg p-3",children:v.jsx("p",{className:"text-red-400 text-sm",children:j.error.message})}),j.data&&j.data.summary.failed>0&&v.jsxs("div",{className:"bg-red-500/10 border border-red-500/50 rounded-lg p-4",children:[v.jsxs("p",{className:"text-red-400 text-sm font-medium mb-2",children:[j.data.summary.failed," of ",j.data.summary.total," package(s) failed"]}),v.jsx("div",{className:"space-y-1 text-xs",children:j.data.results.map((Z,Y)=>v.jsxs("div",{className:Z.success?"text-green-400":"text-red-400",children:[Z.package,": ",Z.success?`✓ ${Z.versions} version(s) stored`:`✗ ${Z.error}`]},Y))})]})]}):v.jsxs(v.Fragment,{children:[v.jsxs("div",{children:[v.jsx("label",{className:"label",children:"Package Archive (ZIP)"}),v.jsxs("div",{onDragOver:T,onDragLeave:V,onDrop:X,className:`border-2 border-dashed rounded-lg p-8 text-center transition-colors ${g?"border-primary-500 bg-primary-500/10":"border-slate-700 hover:border-slate-600"}`,children:[v.jsx(G0,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),p?v.jsxs("div",{children:[v.jsx("p",{className:"text-slate-200 font-medium mb-1",children:p.name}),v.jsxs("p",{className:"text-slate-400 text-sm mb-4",children:[(p.size/1024/1024).toFixed(2)," MB"]}),v.jsx("button",{type:"button",onClick:()=>h(null),className:"text-primary-400 hover:text-primary-300 text-sm",children:"Choose different file"})]}):v.jsxs("div",{children:[v.jsx("p",{className:"text-slate-200 mb-2",children:"Drag and drop a ZIP file here, or click to browse"}),v.jsx("input",{type:"file",accept:".zip",onChange:L,className:"hidden",id:"file-upload"}),v.jsx("label",{htmlFor:"file-upload",className:"inline-block px-4 py-2 bg-slate-700 hover:bg-slate-600 rounded-lg cursor-pointer text-sm",children:"Browse Files"}),v.jsx("p",{className:"text-slate-500 text-xs mt-2",children:"Maximum file size: 100MB"})]})]}),v.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"The ZIP archive must contain a valid composer.json file in the root or first-level directory."})]}),_.error&&v.jsx("div",{className:"bg-red-500/10 border border-red-500/50 rounded-lg p-3",children:v.jsx("p",{className:"text-red-400 text-sm whitespace-pre-wrap",children:_.error.message})})]}),v.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[v.jsx("button",{type:"button",onClick:e,className:"btn-secondary",children:"Cancel"}),v.jsx("button",{type:"submit",className:"btn-primary",disabled:i==="fetch"?j.isPending||k.length===0:_.isPending||!p,children:i==="fetch"?j.isPending?"Adding...":"Add":_.isPending?"Uploading...":"Upload"})]})]})]})})}function QA(e,n){const i={};return(e[e.length-1]===""?[...e,""]:e).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const YA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,KA={};function tx(e,n){return(KA.jsx?XA:YA).test(e)}const JA=/[ \t\n\f\r]/g;function WA(e){return typeof e=="object"?e.type==="text"?nx(e.value):!1:nx(e)}function nx(e){return e.replace(JA,"")===""}class Xl{constructor(n,i,a){this.normal=i,this.property=n,a&&(this.space=a)}}Xl.prototype.normal={};Xl.prototype.property={};Xl.prototype.space=void 0;function zS(e,n){const i={},a={};for(const s of e)Object.assign(i,s.property),Object.assign(a,s.normal);return new Xl(i,a,n)}function gh(e){return e.toLowerCase()}class Qt{constructor(n,i){this.attribute=i,this.property=n}}Qt.prototype.attribute="";Qt.prototype.booleanish=!1;Qt.prototype.boolean=!1;Qt.prototype.commaOrSpaceSeparated=!1;Qt.prototype.commaSeparated=!1;Qt.prototype.defined=!1;Qt.prototype.mustUseProperty=!1;Qt.prototype.number=!1;Qt.prototype.overloadedBoolean=!1;Qt.prototype.property="";Qt.prototype.spaceSeparated=!1;Qt.prototype.space=void 0;let e4=0;const Ee=wi(),mt=wi(),yh=wi(),ae=wi(),Qe=wi(),ba=wi(),rn=wi();function wi(){return 2**++e4}const vh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:mt,commaOrSpaceSeparated:rn,commaSeparated:ba,number:ae,overloadedBoolean:yh,spaceSeparated:Qe},Symbol.toStringTag,{value:"Module"})),Td=Object.keys(vh);class ip extends Qt{constructor(n,i,a,s){let u=-1;if(super(n,i),rx(this,"space",s),typeof a=="number")for(;++u<Td.length;){const c=Td[u];rx(this,Td[u],(a&vh[c])===vh[c])}}}ip.prototype.defined=!0;function rx(e,n,i){i&&(e[n]=i)}function Ta(e){const n={},i={};for(const[a,s]of Object.entries(e.properties)){const u=new ip(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(u.mustUseProperty=!0),n[a]=u,i[gh(a)]=a,i[gh(u.attribute)]=a}return new Xl(n,i,e.space)}const DS=Ta({properties:{ariaActiveDescendant:null,ariaAtomic:mt,ariaAutoComplete:null,ariaBusy:mt,ariaChecked:mt,ariaColCount:ae,ariaColIndex:ae,ariaColSpan:ae,ariaControls:Qe,ariaCurrent:null,ariaDescribedBy:Qe,ariaDetails:null,ariaDisabled:mt,ariaDropEffect:Qe,ariaErrorMessage:null,ariaExpanded:mt,ariaFlowTo:Qe,ariaGrabbed:mt,ariaHasPopup:null,ariaHidden:mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qe,ariaLevel:ae,ariaLive:null,ariaModal:mt,ariaMultiLine:mt,ariaMultiSelectable:mt,ariaOrientation:null,ariaOwns:Qe,ariaPlaceholder:null,ariaPosInSet:ae,ariaPressed:mt,ariaReadOnly:mt,ariaRelevant:null,ariaRequired:mt,ariaRoleDescription:Qe,ariaRowCount:ae,ariaRowIndex:ae,ariaRowSpan:ae,ariaSelected:mt,ariaSetSize:ae,ariaSort:null,ariaValueMax:ae,ariaValueMin:ae,ariaValueNow:ae,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function MS(e,n){return n in e?e[n]:n}function LS(e,n){return MS(e,n.toLowerCase())}const t4=Ta({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ba,acceptCharset:Qe,accessKey:Qe,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Qe,autoFocus:Ee,autoPlay:Ee,blocking:Qe,capture:null,charSet:null,checked:Ee,cite:null,className:Qe,cols:ae,colSpan:null,content:null,contentEditable:mt,controls:Ee,controlsList:Qe,coords:ae|ba,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:yh,draggable:mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Qe,height:ae,hidden:yh,high:ae,href:null,hrefLang:null,htmlFor:Qe,httpEquiv:Qe,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Qe,itemRef:Qe,itemScope:Ee,itemType:Qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:ae,manifest:null,max:null,maxLength:ae,media:null,method:null,min:null,minLength:ae,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:ae,pattern:null,ping:Qe,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Qe,required:Ee,reversed:Ee,rows:ae,rowSpan:ae,sandbox:Qe,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:ae,sizes:null,slot:null,span:ae,spellCheck:mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ae,step:null,style:null,tabIndex:ae,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:mt,width:ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qe,axis:null,background:null,bgColor:null,border:ae,borderColor:null,bottomMargin:ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:ae,leftMargin:ae,link:null,longDesc:null,lowSrc:null,marginHeight:ae,marginWidth:ae,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:ae,rules:null,scheme:null,scrolling:mt,standby:null,summary:null,text:null,topMargin:ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:ae,security:null,unselectable:null},space:"html",transform:LS}),n4=Ta({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:rn,accentHeight:ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ae,amplitude:ae,arabicForm:null,ascent:ae,attributeName:null,attributeType:null,azimuth:ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ae,by:null,calcMode:null,capHeight:ae,className:Qe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ae,diffuseConstant:ae,direction:null,display:null,dur:null,divisor:ae,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:ae,enableBackground:null,end:null,event:null,exponent:ae,externalResourcesRequired:null,fill:null,fillOpacity:ae,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ba,g2:ba,glyphName:ba,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ae,horizOriginX:ae,horizOriginY:ae,id:null,ideographic:ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ae,k:ae,k1:ae,k2:ae,k3:ae,k4:ae,kernelMatrix:rn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ae,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ae,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ae,overlineThickness:ae,paintOrder:null,panose1:null,path:null,pathLength:ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ae,pointsAtY:ae,pointsAtZ:ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rn,rev:rn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rn,requiredFeatures:rn,requiredFonts:rn,requiredFormats:rn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ae,specularExponent:ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ae,strikethroughThickness:ae,string:null,stroke:null,strokeDashArray:rn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ae,strokeOpacity:ae,strokeWidth:null,style:null,surfaceScale:ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rn,tabIndex:ae,tableValues:null,target:null,targetX:ae,targetY:ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ae,underlineThickness:ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ae,values:null,vAlphabetic:ae,vMathematical:ae,vectorEffect:null,vHanging:ae,vIdeographic:ae,version:null,vertAdvY:ae,vertOriginX:ae,vertOriginY:ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:MS}),US=Ta({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),$S=Ta({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:LS}),IS=Ta({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),r4={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},i4=/[A-Z]/g,ix=/-[a-z]/g,a4=/^data[-\w.:]+$/i;function l4(e,n){const i=gh(n);let a=n,s=Qt;if(i in e.normal)return e.property[e.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&a4.test(n)){if(n.charAt(4)==="-"){const u=n.slice(5).replace(ix,o4);a="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=n.slice(4);if(!ix.test(u)){let c=u.replace(i4,s4);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}s=ip}return new s(a,n)}function s4(e){return"-"+e.toLowerCase()}function o4(e){return e.charAt(1).toUpperCase()}const u4=zS([DS,t4,US,$S,IS],"html"),ap=zS([DS,n4,US,$S,IS],"svg");function c4(e){return e.join(" ").trim()}var da={},Rd,ax;function f4(){if(ax)return Rd;ax=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,p=`
61
+ `,h="/",g="*",y="",x="comment",b="declaration";function w(j,_){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];_=_||{};var R=1,T=1;function V(I){var U=I.match(n);U&&(R+=U.length);var D=I.lastIndexOf(p);T=~D?I.length-D:T+I.length}function X(){var I={line:R,column:T};return function(U){return U.position=new L(I),ie(),U}}function L(I){this.start=I,this.end={line:R,column:T},this.source=_.source}L.prototype.content=j;function Z(I){var U=new Error(_.source+":"+R+":"+T+": "+I);if(U.reason=I,U.filename=_.source,U.line=R,U.column=T,U.source=j,!_.silent)throw U}function Y(I){var U=I.exec(j);if(U){var D=U[0];return V(D),j=j.slice(D.length),U}}function ie(){Y(i)}function H(I){var U;for(I=I||[];U=se();)U!==!1&&I.push(U);return I}function se(){var I=X();if(!(h!=j.charAt(0)||g!=j.charAt(1))){for(var U=2;y!=j.charAt(U)&&(g!=j.charAt(U)||h!=j.charAt(U+1));)++U;if(U+=2,y===j.charAt(U-1))return Z("End of comment missing");var D=j.slice(2,U-2);return T+=2,V(D),j=j.slice(U),T+=2,I({type:x,comment:D})}}function ue(){var I=X(),U=Y(a);if(U){if(se(),!Y(s))return Z("property missing ':'");var D=Y(u),B=I({type:b,property:k(U[0].replace(e,y)),value:D?k(D[0].replace(e,y)):y});return Y(c),B}}function xe(){var I=[];H(I);for(var U;U=ue();)U!==!1&&(I.push(U),H(I));return I}return ie(),xe()}function k(j){return j?j.replace(f,y):y}return Rd=w,Rd}var lx;function d4(){if(lx)return da;lx=1;var e=da&&da.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(da,"__esModule",{value:!0}),da.default=i;const n=e(f4());function i(a,s){let u=null;if(!a||typeof a!="string")return u;const c=(0,n.default)(a),f=typeof s=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:h,value:g}=p;f?s(h,g,p):g&&(u=u||{},u[h]=g)}),u}return da}var jl={},sx;function h4(){if(sx)return jl;sx=1,Object.defineProperty(jl,"__esModule",{value:!0}),jl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(h){return!h||i.test(h)||e.test(h)},c=function(h,g){return g.toUpperCase()},f=function(h,g){return"".concat(g,"-")},p=function(h,g){return g===void 0&&(g={}),u(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(s,f):h=h.replace(a,f),h.replace(n,c))};return jl.camelCase=p,jl}var Cl,ox;function p4(){if(ox)return Cl;ox=1;var e=Cl&&Cl.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(d4()),i=h4();function a(s,u){var c={};return!s||typeof s!="string"||(0,n.default)(s,function(f,p){f&&p&&(c[(0,i.camelCase)(f,u)]=p)}),c}return a.default=a,Cl=a,Cl}var m4=p4();const g4=Bl(m4),qS=BS("end"),lp=BS("start");function BS(e){return n;function n(i){const a=i&&i.position&&i.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function y4(e){const n=lp(e),i=qS(e);if(n&&i)return{start:n,end:i}}function Ol(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ux(e.position):"start"in e||"end"in e?ux(e):"line"in e||"column"in e?xh(e):""}function xh(e){return cx(e&&e.line)+":"+cx(e&&e.column)}function ux(e){return xh(e&&e.start)+"-"+xh(e&&e.end)}function cx(e){return e&&typeof e=="number"?e:1}class Rt extends Error{constructor(n,i,a){super(),typeof i=="string"&&(a=i,i=void 0);let s="",u={},c=!1;if(i&&("line"in i&&"column"in i?u={place:i}:"start"in i&&"end"in i?u={place:i}:"type"in i?u={ancestors:[i],place:i.position}:u={...i}),typeof n=="string"?s=n:!u.cause&&n&&(c=!0,s=n.message,u.cause=n),!u.ruleId&&!u.source&&typeof a=="string"){const p=a.indexOf(":");p===-1?u.ruleId=a:(u.source=a.slice(0,p),u.ruleId=a.slice(p+1))}if(!u.place&&u.ancestors&&u.ancestors){const p=u.ancestors[u.ancestors.length-1];p&&(u.place=p.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=Ol(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Rt.prototype.file="";Rt.prototype.name="";Rt.prototype.reason="";Rt.prototype.message="";Rt.prototype.stack="";Rt.prototype.column=void 0;Rt.prototype.line=void 0;Rt.prototype.ancestors=void 0;Rt.prototype.cause=void 0;Rt.prototype.fatal=void 0;Rt.prototype.place=void 0;Rt.prototype.ruleId=void 0;Rt.prototype.source=void 0;const sp={}.hasOwnProperty,v4=new Map,x4=/[A-Z]/g,b4=new Set(["table","tbody","thead","tfoot","tr"]),S4=new Set(["td","th"]),PS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function w4(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=n.filePath||void 0;let a;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=R4(i,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=T4(i,n.jsx,n.jsxs)}const s={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:a,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?ap:u4,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},u=ZS(s,e,void 0);return u&&typeof u!="string"?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}function ZS(e,n,i){if(n.type==="element")return E4(e,n,i);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return k4(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return N4(e,n,i);if(n.type==="mdxjsEsm")return _4(e,n);if(n.type==="root")return j4(e,n,i);if(n.type==="text")return C4(e,n)}function E4(e,n,i){const a=e.schema;let s=a;n.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=ap,e.schema=s),e.ancestors.push(n);const u=FS(e,n.tagName,!1),c=A4(e,n);let f=up(e,n);return b4.has(n.tagName)&&(f=f.filter(function(p){return typeof p=="string"?!WA(p):!0})),HS(e,c,u,n),op(c,f),e.ancestors.pop(),e.schema=a,e.create(n,u,c,i)}function k4(e,n){if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}Il(e,n.position)}function _4(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Il(e,n.position)}function N4(e,n,i){const a=e.schema;let s=a;n.name==="svg"&&a.space==="html"&&(s=ap,e.schema=s),e.ancestors.push(n);const u=n.name===null?e.Fragment:FS(e,n.name,!0),c=O4(e,n),f=up(e,n);return HS(e,c,u,n),op(c,f),e.ancestors.pop(),e.schema=a,e.create(n,u,c,i)}function j4(e,n,i){const a={};return op(a,up(e,n)),e.create(n,e.Fragment,a,i)}function C4(e,n){return n.value}function HS(e,n,i,a){typeof i!="string"&&i!==e.Fragment&&e.passNode&&(n.node=a)}function op(e,n){if(n.length>0){const i=n.length>1?n:n[0];i&&(e.children=i)}}function T4(e,n,i){return a;function a(s,u,c,f){const h=Array.isArray(c.children)?i:n;return f?h(u,c,f):h(u,c)}}function R4(e,n){return i;function i(a,s,u,c){const f=Array.isArray(u.children),p=lp(a);return n(s,u,c,f,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function A4(e,n){const i={};let a,s;for(s in n.properties)if(s!=="children"&&sp.call(n.properties,s)){const u=z4(e,s,n.properties[s]);if(u){const[c,f]=u;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&S4.has(n.tagName)?a=f:i[c]=f}}if(a){const u=i.style||(i.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return i}function O4(e,n){const i={};for(const a of n.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const u=a.data.estree.body[0];u.type;const c=u.expression;c.type;const f=c.properties[0];f.type,Object.assign(i,e.evaluater.evaluateExpression(f.argument))}else Il(e,n.position);else{const s=a.name;let u;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else Il(e,n.position);else u=a.value===null?!0:a.value;i[s]=u}return i}function up(e,n){const i=[];let a=-1;const s=e.passKeys?new Map:v4;for(;++a<n.children.length;){const u=n.children[a];let c;if(e.passKeys){const p=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(p){const h=s.get(p)||0;c=p+"-"+h,s.set(p,h+1)}}const f=ZS(e,u,c);f!==void 0&&i.push(f)}return i}function z4(e,n,i){const a=l4(e.schema,n);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?QA(i):c4(i)),a.property==="style"){let s=typeof i=="object"?i:D4(e,String(i));return e.stylePropertyNameCase==="css"&&(s=M4(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?r4[a.property]||a.property:a.attribute,i]}}function D4(e,n){try{return g4(n,{reactCompat:!0})}catch(i){if(e.ignoreInvalidStyle)return{};const a=i,s=new Rt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=PS+"#cannot-parse-style-attribute",s}}function FS(e,n,i){let a;if(!i)a={type:"Literal",value:n};else if(n.includes(".")){const s=n.split(".");let u=-1,c;for(;++u<s.length;){const f=tx(s[u])?{type:"Identifier",name:s[u]}:{type:"Literal",value:s[u]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}a=c}else a=tx(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(a.type==="Literal"){const s=a.value;return sp.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);Il(e)}function Il(e,n){const i=new Rt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=PS+"#cannot-handle-mdx-estrees-without-createevaluater",i}function M4(e){const n={};let i;for(i in e)sp.call(e,i)&&(n[L4(i)]=e[i]);return n}function L4(e){let n=e.replace(x4,U4);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function U4(e){return"-"+e.toLowerCase()}const Ad={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},$4={};function cp(e,n){const i=$4,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,s=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return VS(e,a,s)}function VS(e,n,i){if(I4(e)){if("value"in e)return e.type==="html"&&!i?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return fx(e.children,n,i)}return Array.isArray(e)?fx(e,n,i):""}function fx(e,n,i){const a=[];let s=-1;for(;++s<e.length;)a[s]=VS(e[s],n,i);return a.join("")}function I4(e){return!!(e&&typeof e=="object")}const dx=document.createElement("i");function fp(e){const n="&"+e+";";dx.innerHTML=n;const i=dx.textContent;return i.charCodeAt(i.length-1)===59&&e!=="semi"||i===n?!1:i}function ln(e,n,i,a){const s=e.length;let u=0,c;if(n<0?n=-n>s?0:s+n:n=n>s?s:n,i=i>0?i:0,a.length<1e4)c=Array.from(a),c.unshift(n,i),e.splice(...c);else for(i&&e.splice(n,i);u<a.length;)c=a.slice(u,u+1e4),c.unshift(n,0),e.splice(...c),u+=1e4,n+=1e4}function bn(e,n){return e.length>0?(ln(e,e.length,0,n),e):n}const hx={}.hasOwnProperty;function GS(e){const n={};let i=-1;for(;++i<e.length;)q4(n,e[i]);return n}function q4(e,n){let i;for(i in n){const s=(hx.call(e,i)?e[i]:void 0)||(e[i]={}),u=n[i];let c;if(u)for(c in u){hx.call(s,c)||(s[c]=[]);const f=u[c];B4(s[c],Array.isArray(f)?f:f?[f]:[])}}}function B4(e,n){let i=-1;const a=[];for(;++i<n.length;)(n[i].add==="after"?e:a).push(n[i]);ln(e,0,0,a)}function QS(e,n){const i=Number.parseInt(e,n);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Cn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Lt=Gr(/[A-Za-z]/),Tt=Gr(/[\dA-Za-z]/),P4=Gr(/[#-'*+\--9=?A-Z^-~]/);function Po(e){return e!==null&&(e<32||e===127)}const bh=Gr(/\d/),Z4=Gr(/[\dA-Fa-f]/),H4=Gr(/[!-/:-@[-`{-~]/);function ge(e){return e!==null&&e<-2}function Ge(e){return e!==null&&(e<0||e===32)}function Ce(e){return e===-2||e===-1||e===32}const au=Gr(new RegExp("\\p{P}|\\p{S}","u")),xi=Gr(/\s/);function Gr(e){return n;function n(i){return i!==null&&i>-1&&e.test(String.fromCharCode(i))}}function Ra(e){const n=[];let i=-1,a=0,s=0;for(;++i<e.length;){const u=e.charCodeAt(i);let c="";if(u===37&&Tt(e.charCodeAt(i+1))&&Tt(e.charCodeAt(i+2)))s=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(i+1);u<56320&&f>56319&&f<57344?(c=String.fromCharCode(u,f),s=1):c="�"}else c=String.fromCharCode(u);c&&(n.push(e.slice(a,i),encodeURIComponent(c)),a=i+s+1,c=""),s&&(i+=s,s=0)}return n.join("")+e.slice(a)}function ze(e,n,i,a){const s=a?a-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(p){return Ce(p)?(e.enter(i),f(p)):n(p)}function f(p){return Ce(p)&&u++<s?(e.consume(p),f):(e.exit(i),n(p))}}const F4={tokenize:V4};function V4(e){const n=e.attempt(this.parser.constructs.contentInitial,a,s);let i;return n;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ze(e,n,"linePrefix")}function s(f){return e.enter("paragraph"),u(f)}function u(f){const p=e.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return ge(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),c)}}const G4={tokenize:Q4},px={tokenize:Y4};function Q4(e){const n=this,i=[];let a=0,s,u,c;return f;function f(T){if(a<i.length){const V=i[a];return n.containerState=V[1],e.attempt(V[0].continuation,p,h)(T)}return h(T)}function p(T){if(a++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,s&&R();const V=n.events.length;let X=V,L;for(;X--;)if(n.events[X][0]==="exit"&&n.events[X][1].type==="chunkFlow"){L=n.events[X][1].end;break}_(a);let Z=V;for(;Z<n.events.length;)n.events[Z][1].end={...L},Z++;return ln(n.events,X+1,0,n.events.slice(V)),n.events.length=Z,h(T)}return f(T)}function h(T){if(a===i.length){if(!s)return x(T);if(s.currentConstruct&&s.currentConstruct.concrete)return w(T);n.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(px,g,y)(T)}function g(T){return s&&R(),_(a),x(T)}function y(T){return n.parser.lazy[n.now().line]=a!==i.length,c=n.now().offset,w(T)}function x(T){return n.containerState={},e.attempt(px,b,w)(T)}function b(T){return a++,i.push([n.currentConstruct,n.containerState]),x(T)}function w(T){if(T===null){s&&R(),_(0),e.consume(T);return}return s=s||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),k(T)}function k(T){if(T===null){j(e.exit("chunkFlow"),!0),_(0),e.consume(T);return}return ge(T)?(e.consume(T),j(e.exit("chunkFlow")),a=0,n.interrupt=void 0,f):(e.consume(T),k)}function j(T,V){const X=n.sliceStream(T);if(V&&X.push(null),T.previous=u,u&&(u.next=T),u=T,s.defineSkip(T.start),s.write(X),n.parser.lazy[T.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<c&&(!s.events[L][1].end||s.events[L][1].end.offset>c))return;const Z=n.events.length;let Y=Z,ie,H;for(;Y--;)if(n.events[Y][0]==="exit"&&n.events[Y][1].type==="chunkFlow"){if(ie){H=n.events[Y][1].end;break}ie=!0}for(_(a),L=Z;L<n.events.length;)n.events[L][1].end={...H},L++;ln(n.events,Y+1,0,n.events.slice(Z)),n.events.length=L}}function _(T){let V=i.length;for(;V-- >T;){const X=i[V];n.containerState=X[1],X[0].exit.call(n,e)}i.length=T}function R(){s.write([null]),u=void 0,s=void 0,n.containerState._closeFlow=void 0}}function Y4(e,n,i){return ze(e,e.attempt(this.parser.constructs.document,n,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ea(e){if(e===null||Ge(e)||xi(e))return 1;if(au(e))return 2}function lu(e,n,i){const a=[];let s=-1;for(;++s<e.length;){const u=e[s].resolveAll;u&&!a.includes(u)&&(n=u(n,i),a.push(u))}return n}const Sh={name:"attention",resolveAll:X4,tokenize:K4};function X4(e,n){let i=-1,a,s,u,c,f,p,h,g;for(;++i<e.length;)if(e[i][0]==="enter"&&e[i][1].type==="attentionSequence"&&e[i][1]._close){for(a=i;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&n.sliceSerialize(e[a][1]).charCodeAt(0)===n.sliceSerialize(e[i][1]).charCodeAt(0)){if((e[a][1]._close||e[i][1]._open)&&(e[i][1].end.offset-e[i][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[i][1].end.offset-e[i][1].start.offset)%3))continue;p=e[a][1].end.offset-e[a][1].start.offset>1&&e[i][1].end.offset-e[i][1].start.offset>1?2:1;const y={...e[a][1].end},x={...e[i][1].start};mx(y,-p),mx(x,p),c={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...e[a][1].end}},f={type:p>1?"strongSequence":"emphasisSequence",start:{...e[i][1].start},end:x},u={type:p>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[i][1].start}},s={type:p>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[i][1].start={...f.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=bn(h,[["enter",e[a][1],n],["exit",e[a][1],n]])),h=bn(h,[["enter",s,n],["enter",c,n],["exit",c,n],["enter",u,n]]),h=bn(h,lu(n.parser.constructs.insideSpan.null,e.slice(a+1,i),n)),h=bn(h,[["exit",u,n],["enter",f,n],["exit",f,n],["exit",s,n]]),e[i][1].end.offset-e[i][1].start.offset?(g=2,h=bn(h,[["enter",e[i][1],n],["exit",e[i][1],n]])):g=0,ln(e,a-1,i-a+3,h),i=a+h.length-g-2;break}}for(i=-1;++i<e.length;)e[i][1].type==="attentionSequence"&&(e[i][1].type="data");return e}function K4(e,n){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Ea(a);let u;return c;function c(p){return u=p,e.enter("attentionSequence"),f(p)}function f(p){if(p===u)return e.consume(p),f;const h=e.exit("attentionSequence"),g=Ea(p),y=!g||g===2&&s||i.includes(p),x=!s||s===2&&g||i.includes(a);return h._open=!!(u===42?y:y&&(s||!x)),h._close=!!(u===42?x:x&&(g||!y)),n(p)}}function mx(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const J4={name:"autolink",tokenize:W4};function W4(e,n,i){let a=0;return s;function s(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(b){return Lt(b)?(e.consume(b),c):b===64?i(b):h(b)}function c(b){return b===43||b===45||b===46||Tt(b)?(a=1,f(b)):h(b)}function f(b){return b===58?(e.consume(b),a=0,p):(b===43||b===45||b===46||Tt(b))&&a++<32?(e.consume(b),f):(a=0,h(b))}function p(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):b===null||b===32||b===60||Po(b)?i(b):(e.consume(b),p)}function h(b){return b===64?(e.consume(b),g):P4(b)?(e.consume(b),h):i(b)}function g(b){return Tt(b)?y(b):i(b)}function y(b){return b===46?(e.consume(b),a=0,g):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):x(b)}function x(b){if((b===45||Tt(b))&&a++<63){const w=b===45?x:y;return e.consume(b),w}return i(b)}}const Kl={partial:!0,tokenize:eO};function eO(e,n,i){return a;function a(u){return Ce(u)?ze(e,s,"linePrefix")(u):s(u)}function s(u){return u===null||ge(u)?n(u):i(u)}}const YS={continuation:{tokenize:nO},exit:rO,name:"blockQuote",tokenize:tO};function tO(e,n,i){const a=this;return s;function s(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),u}return i(c)}function u(c){return Ce(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function nO(e,n,i){const a=this;return s;function s(c){return Ce(c)?ze(e,u,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return e.attempt(YS,n,i)(c)}}function rO(e){e.exit("blockQuote")}const XS={name:"characterEscape",tokenize:iO};function iO(e,n,i){return a;function a(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),s}function s(u){return H4(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):i(u)}}const KS={name:"characterReference",tokenize:aO};function aO(e,n,i){const a=this;let s=0,u,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),p}function p(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,c=Tt,g(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,c=Z4,g):(e.enter("characterReferenceValue"),u=7,c=bh,g(y))}function g(y){if(y===59&&s){const x=e.exit("characterReferenceValue");return c===Tt&&!fp(a.sliceSerialize(x))?i(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(y)&&s++<u?(e.consume(y),g):i(y)}}const gx={partial:!0,tokenize:sO},yx={concrete:!0,name:"codeFenced",tokenize:lO};function lO(e,n,i){const a=this,s={partial:!0,tokenize:X};let u=0,c=0,f;return p;function p(L){return h(L)}function h(L){const Z=a.events[a.events.length-1];return u=Z&&Z[1].type==="linePrefix"?Z[2].sliceSerialize(Z[1],!0).length:0,f=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(L)}function g(L){return L===f?(c++,e.consume(L),g):c<3?i(L):(e.exit("codeFencedFenceSequence"),Ce(L)?ze(e,y,"whitespace")(L):y(L))}function y(L){return L===null||ge(L)?(e.exit("codeFencedFence"),a.interrupt?n(L):e.check(gx,k,V)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(L))}function x(L){return L===null||ge(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(L)):Ce(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ze(e,b,"whitespace")(L)):L===96&&L===f?i(L):(e.consume(L),x)}function b(L){return L===null||ge(L)?y(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(L))}function w(L){return L===null||ge(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(L)):L===96&&L===f?i(L):(e.consume(L),w)}function k(L){return e.attempt(s,V,j)(L)}function j(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),_}function _(L){return u>0&&Ce(L)?ze(e,R,"linePrefix",u+1)(L):R(L)}function R(L){return L===null||ge(L)?e.check(gx,k,V)(L):(e.enter("codeFlowValue"),T(L))}function T(L){return L===null||ge(L)?(e.exit("codeFlowValue"),R(L)):(e.consume(L),T)}function V(L){return e.exit("codeFenced"),n(L)}function X(L,Z,Y){let ie=0;return H;function H(U){return L.enter("lineEnding"),L.consume(U),L.exit("lineEnding"),se}function se(U){return L.enter("codeFencedFence"),Ce(U)?ze(L,ue,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):ue(U)}function ue(U){return U===f?(L.enter("codeFencedFenceSequence"),xe(U)):Y(U)}function xe(U){return U===f?(ie++,L.consume(U),xe):ie>=c?(L.exit("codeFencedFenceSequence"),Ce(U)?ze(L,I,"whitespace")(U):I(U)):Y(U)}function I(U){return U===null||ge(U)?(L.exit("codeFencedFence"),Z(U)):Y(U)}}}function sO(e,n,i){const a=this;return s;function s(c){return c===null?i(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u)}function u(c){return a.parser.lazy[a.now().line]?i(c):n(c)}}const Od={name:"codeIndented",tokenize:uO},oO={partial:!0,tokenize:cO};function uO(e,n,i){const a=this;return s;function s(h){return e.enter("codeIndented"),ze(e,u,"linePrefix",5)(h)}function u(h){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(h):i(h)}function c(h){return h===null?p(h):ge(h)?e.attempt(oO,c,p)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||ge(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function p(h){return e.exit("codeIndented"),n(h)}}function cO(e,n,i){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?i(c):ge(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):ze(e,u,"linePrefix",5)(c)}function u(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):ge(c)?s(c):i(c)}}const fO={name:"codeText",previous:hO,resolve:dO,tokenize:pO};function dO(e){let n=e.length-4,i=3,a,s;if((e[i][1].type==="lineEnding"||e[i][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(a=i;++a<n;)if(e[a][1].type==="codeTextData"){e[i][1].type="codeTextPadding",e[n][1].type="codeTextPadding",i+=2,n-=2;break}}for(a=i-1,n++;++a<=n;)s===void 0?a!==n&&e[a][1].type!=="lineEnding"&&(s=a):(a===n||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),n-=a-s-2,a=s+2),s=void 0);return e}function hO(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pO(e,n,i){let a=0,s,u;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),a++,f):(e.exit("codeTextSequence"),p(y))}function p(y){return y===null?i(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),p):y===96?(u=e.enter("codeTextSequence"),s=0,g(y)):ge(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||ge(y)?(e.exit("codeTextData"),p(y)):(e.consume(y),h)}function g(y){return y===96?(e.consume(y),s++,g):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(u.type="codeTextData",h(y))}}class mO{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,i){const a=i??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(n,a):n>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(n,i,a){const s=i||0;this.setCursor(Math.trunc(n));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Tl(this.left,a),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Tl(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Tl(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const i=this.left.splice(n,Number.POSITIVE_INFINITY);Tl(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Tl(this.left,i.reverse())}}}function Tl(e,n){let i=0;if(n.length<1e4)e.push(...n);else for(;i<n.length;)e.push(...n.slice(i,i+1e4)),i+=1e4}function JS(e){const n={};let i=-1,a,s,u,c,f,p,h;const g=new mO(e);for(;++i<g.length;){for(;i in n;)i=n[i];if(a=g.get(i),i&&a[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(p=a[1]._tokenizer.events,u=0,u<p.length&&p[u][1].type==="lineEndingBlank"&&(u+=2),u<p.length&&p[u][1].type==="content"))for(;++u<p.length&&p[u][1].type!=="content";)p[u][1].type==="chunkText"&&(p[u][1]._isInFirstContentOfListItem=!0,u++);if(a[0]==="enter")a[1].contentType&&(Object.assign(n,gO(g,i)),i=n[i],h=!0);else if(a[1]._container){for(u=i,s=void 0;u--;)if(c=g.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(g.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...g.get(s)[1].start},f=g.slice(s,i),f.unshift(a),g.splice(s,i-s+1,f))}}return ln(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function gO(e,n){const i=e.get(n)[1],a=e.get(n)[2];let s=n-1;const u=[];let c=i._tokenizer;c||(c=a.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,p=[],h={};let g,y,x=-1,b=i,w=0,k=0;const j=[k];for(;b;){for(;e.get(++s)[1]!==b;);u.push(s),b._tokenizer||(g=a.sliceStream(b),b.next||g.push(null),y&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=i;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(k=x+1,j.push(k),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):j.pop(),x=j.length;x--;){const _=f.slice(j[x],j[x+1]),R=u.pop();p.push([R,R+_.length-1]),e.splice(R,2,_)}for(p.reverse(),x=-1;++x<p.length;)h[w+p[x][0]]=w+p[x][1],w+=p[x][1]-p[x][0]-1;return h}const yO={resolve:xO,tokenize:bO},vO={partial:!0,tokenize:SO};function xO(e){return JS(e),e}function bO(e,n){let i;return a;function a(f){return e.enter("content"),i=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?u(f):ge(f)?e.check(vO,c,u)(f):(e.consume(f),s)}function u(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),i.next=e.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,s}}function SO(e,n,i){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),ze(e,u,"linePrefix")}function u(c){if(c===null||ge(c))return i(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(a.parser.constructs.flow,i,n)(c)}}function WS(e,n,i,a,s,u,c,f,p){const h=p||Number.POSITIVE_INFINITY;let g=0;return y;function y(_){return _===60?(e.enter(a),e.enter(s),e.enter(u),e.consume(_),e.exit(u),x):_===null||_===32||_===41||Po(_)?i(_):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),k(_))}function x(_){return _===62?(e.enter(u),e.consume(_),e.exit(u),e.exit(s),e.exit(a),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),b(_))}function b(_){return _===62?(e.exit("chunkString"),e.exit(f),x(_)):_===null||_===60||ge(_)?i(_):(e.consume(_),_===92?w:b)}function w(_){return _===60||_===62||_===92?(e.consume(_),b):b(_)}function k(_){return!g&&(_===null||_===41||Ge(_))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),n(_)):g<h&&_===40?(e.consume(_),g++,k):_===41?(e.consume(_),g--,k):_===null||_===32||_===40||Po(_)?i(_):(e.consume(_),_===92?j:k)}function j(_){return _===40||_===41||_===92?(e.consume(_),k):k(_)}}function ew(e,n,i,a,s,u){const c=this;let f=0,p;return h;function h(b){return e.enter(a),e.enter(s),e.consume(b),e.exit(s),e.enter(u),g}function g(b){return f>999||b===null||b===91||b===93&&!p||b===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(e.exit(u),e.enter(s),e.consume(b),e.exit(s),e.exit(a),n):ge(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||ge(b)||f++>999?(e.exit("chunkString"),g(b)):(e.consume(b),p||(p=!Ce(b)),b===92?x:y)}function x(b){return b===91||b===92||b===93?(e.consume(b),f++,y):y(b)}}function tw(e,n,i,a,s,u){let c;return f;function f(x){return x===34||x===39||x===40?(e.enter(a),e.enter(s),e.consume(x),e.exit(s),c=x===40?41:x,p):i(x)}function p(x){return x===c?(e.enter(s),e.consume(x),e.exit(s),e.exit(a),n):(e.enter(u),h(x))}function h(x){return x===c?(e.exit(u),p(c)):x===null?i(x):ge(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),ze(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===c||x===null||ge(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?y:g)}function y(x){return x===c||x===92?(e.consume(x),g):g(x)}}function zl(e,n){let i;return a;function a(s){return ge(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i=!0,a):Ce(s)?ze(e,a,i?"linePrefix":"lineSuffix")(s):n(s)}}const wO={name:"definition",tokenize:kO},EO={partial:!0,tokenize:_O};function kO(e,n,i){const a=this;let s;return u;function u(b){return e.enter("definition"),c(b)}function c(b){return ew.call(a,e,f,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function f(b){return s=Cn(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),p):i(b)}function p(b){return Ge(b)?zl(e,h)(b):h(b)}function h(b){return WS(e,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return e.attempt(EO,y,y)(b)}function y(b){return Ce(b)?ze(e,x,"whitespace")(b):x(b)}function x(b){return b===null||ge(b)?(e.exit("definition"),a.parser.defined.push(s),n(b)):i(b)}}function _O(e,n,i){return a;function a(f){return Ge(f)?zl(e,s)(f):i(f)}function s(f){return tw(e,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return Ce(f)?ze(e,c,"whitespace")(f):c(f)}function c(f){return f===null||ge(f)?n(f):i(f)}}const NO={name:"hardBreakEscape",tokenize:jO};function jO(e,n,i){return a;function a(u){return e.enter("hardBreakEscape"),e.consume(u),s}function s(u){return ge(u)?(e.exit("hardBreakEscape"),n(u)):i(u)}}const CO={name:"headingAtx",resolve:TO,tokenize:RO};function TO(e,n){let i=e.length-2,a=3,s,u;return e[a][1].type==="whitespace"&&(a+=2),i-2>a&&e[i][1].type==="whitespace"&&(i-=2),e[i][1].type==="atxHeadingSequence"&&(a===i-1||i-4>a&&e[i-2][1].type==="whitespace")&&(i-=a+1===i?2:4),i>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},u={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},ln(e,a,i-a+1,[["enter",s,n],["enter",u,n],["exit",u,n],["exit",s,n]])),e}function RO(e,n,i){let a=0;return s;function s(g){return e.enter("atxHeading"),u(g)}function u(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(e.consume(g),c):g===null||Ge(g)?(e.exit("atxHeadingSequence"),f(g)):i(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),p(g)):g===null||ge(g)?(e.exit("atxHeading"),n(g)):Ce(g)?ze(e,f,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function p(g){return g===35?(e.consume(g),p):(e.exit("atxHeadingSequence"),f(g))}function h(g){return g===null||g===35||Ge(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),h)}}const AO=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],vx=["pre","script","style","textarea"],OO={concrete:!0,name:"htmlFlow",resolveTo:MO,tokenize:LO},zO={partial:!0,tokenize:$O},DO={partial:!0,tokenize:UO};function MO(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function LO(e,n,i){const a=this;let s,u,c,f,p;return h;function h(N){return g(N)}function g(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),y}function y(N){return N===33?(e.consume(N),x):N===47?(e.consume(N),u=!0,k):N===63?(e.consume(N),s=3,a.interrupt?n:C):Lt(N)?(e.consume(N),c=String.fromCharCode(N),j):i(N)}function x(N){return N===45?(e.consume(N),s=2,b):N===91?(e.consume(N),s=5,f=0,w):Lt(N)?(e.consume(N),s=4,a.interrupt?n:C):i(N)}function b(N){return N===45?(e.consume(N),a.interrupt?n:C):i(N)}function w(N){const le="CDATA[";return N===le.charCodeAt(f++)?(e.consume(N),f===le.length?a.interrupt?n:ue:w):i(N)}function k(N){return Lt(N)?(e.consume(N),c=String.fromCharCode(N),j):i(N)}function j(N){if(N===null||N===47||N===62||Ge(N)){const le=N===47,ce=c.toLowerCase();return!le&&!u&&vx.includes(ce)?(s=1,a.interrupt?n(N):ue(N)):AO.includes(c.toLowerCase())?(s=6,le?(e.consume(N),_):a.interrupt?n(N):ue(N)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(N):u?R(N):T(N))}return N===45||Tt(N)?(e.consume(N),c+=String.fromCharCode(N),j):i(N)}function _(N){return N===62?(e.consume(N),a.interrupt?n:ue):i(N)}function R(N){return Ce(N)?(e.consume(N),R):H(N)}function T(N){return N===47?(e.consume(N),H):N===58||N===95||Lt(N)?(e.consume(N),V):Ce(N)?(e.consume(N),T):H(N)}function V(N){return N===45||N===46||N===58||N===95||Tt(N)?(e.consume(N),V):X(N)}function X(N){return N===61?(e.consume(N),L):Ce(N)?(e.consume(N),X):T(N)}function L(N){return N===null||N===60||N===61||N===62||N===96?i(N):N===34||N===39?(e.consume(N),p=N,Z):Ce(N)?(e.consume(N),L):Y(N)}function Z(N){return N===p?(e.consume(N),p=null,ie):N===null||ge(N)?i(N):(e.consume(N),Z)}function Y(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Ge(N)?X(N):(e.consume(N),Y)}function ie(N){return N===47||N===62||Ce(N)?T(N):i(N)}function H(N){return N===62?(e.consume(N),se):i(N)}function se(N){return N===null||ge(N)?ue(N):Ce(N)?(e.consume(N),se):i(N)}function ue(N){return N===45&&s===2?(e.consume(N),D):N===60&&s===1?(e.consume(N),B):N===62&&s===4?(e.consume(N),A):N===63&&s===3?(e.consume(N),C):N===93&&s===5?(e.consume(N),re):ge(N)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(zO,q,xe)(N)):N===null||ge(N)?(e.exit("htmlFlowData"),xe(N)):(e.consume(N),ue)}function xe(N){return e.check(DO,I,q)(N)}function I(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),U}function U(N){return N===null||ge(N)?xe(N):(e.enter("htmlFlowData"),ue(N))}function D(N){return N===45?(e.consume(N),C):ue(N)}function B(N){return N===47?(e.consume(N),c="",te):ue(N)}function te(N){if(N===62){const le=c.toLowerCase();return vx.includes(le)?(e.consume(N),A):ue(N)}return Lt(N)&&c.length<8?(e.consume(N),c+=String.fromCharCode(N),te):ue(N)}function re(N){return N===93?(e.consume(N),C):ue(N)}function C(N){return N===62?(e.consume(N),A):N===45&&s===2?(e.consume(N),C):ue(N)}function A(N){return N===null||ge(N)?(e.exit("htmlFlowData"),q(N)):(e.consume(N),A)}function q(N){return e.exit("htmlFlow"),n(N)}}function UO(e,n,i){const a=this;return s;function s(c){return ge(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),u):i(c)}function u(c){return a.parser.lazy[a.now().line]?i(c):n(c)}}function $O(e,n,i){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Kl,n,i)}}const IO={name:"htmlText",tokenize:qO};function qO(e,n,i){const a=this;let s,u,c;return f;function f(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),p}function p(C){return C===33?(e.consume(C),h):C===47?(e.consume(C),X):C===63?(e.consume(C),T):Lt(C)?(e.consume(C),Y):i(C)}function h(C){return C===45?(e.consume(C),g):C===91?(e.consume(C),u=0,w):Lt(C)?(e.consume(C),R):i(C)}function g(C){return C===45?(e.consume(C),b):i(C)}function y(C){return C===null?i(C):C===45?(e.consume(C),x):ge(C)?(c=y,B(C)):(e.consume(C),y)}function x(C){return C===45?(e.consume(C),b):y(C)}function b(C){return C===62?D(C):C===45?x(C):y(C)}function w(C){const A="CDATA[";return C===A.charCodeAt(u++)?(e.consume(C),u===A.length?k:w):i(C)}function k(C){return C===null?i(C):C===93?(e.consume(C),j):ge(C)?(c=k,B(C)):(e.consume(C),k)}function j(C){return C===93?(e.consume(C),_):k(C)}function _(C){return C===62?D(C):C===93?(e.consume(C),_):k(C)}function R(C){return C===null||C===62?D(C):ge(C)?(c=R,B(C)):(e.consume(C),R)}function T(C){return C===null?i(C):C===63?(e.consume(C),V):ge(C)?(c=T,B(C)):(e.consume(C),T)}function V(C){return C===62?D(C):T(C)}function X(C){return Lt(C)?(e.consume(C),L):i(C)}function L(C){return C===45||Tt(C)?(e.consume(C),L):Z(C)}function Z(C){return ge(C)?(c=Z,B(C)):Ce(C)?(e.consume(C),Z):D(C)}function Y(C){return C===45||Tt(C)?(e.consume(C),Y):C===47||C===62||Ge(C)?ie(C):i(C)}function ie(C){return C===47?(e.consume(C),D):C===58||C===95||Lt(C)?(e.consume(C),H):ge(C)?(c=ie,B(C)):Ce(C)?(e.consume(C),ie):D(C)}function H(C){return C===45||C===46||C===58||C===95||Tt(C)?(e.consume(C),H):se(C)}function se(C){return C===61?(e.consume(C),ue):ge(C)?(c=se,B(C)):Ce(C)?(e.consume(C),se):ie(C)}function ue(C){return C===null||C===60||C===61||C===62||C===96?i(C):C===34||C===39?(e.consume(C),s=C,xe):ge(C)?(c=ue,B(C)):Ce(C)?(e.consume(C),ue):(e.consume(C),I)}function xe(C){return C===s?(e.consume(C),s=void 0,U):C===null?i(C):ge(C)?(c=xe,B(C)):(e.consume(C),xe)}function I(C){return C===null||C===34||C===39||C===60||C===61||C===96?i(C):C===47||C===62||Ge(C)?ie(C):(e.consume(C),I)}function U(C){return C===47||C===62||Ge(C)?ie(C):i(C)}function D(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),n):i(C)}function B(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),te}function te(C){return Ce(C)?ze(e,re,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):re(C)}function re(C){return e.enter("htmlTextData"),c(C)}}const dp={name:"labelEnd",resolveAll:HO,resolveTo:FO,tokenize:VO},BO={tokenize:GO},PO={tokenize:QO},ZO={tokenize:YO};function HO(e){let n=-1;const i=[];for(;++n<e.length;){const a=e[n][1];if(i.push(e[n]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",n+=s}}return e.length!==i.length&&ln(e,0,e.length,i),e}function FO(e,n){let i=e.length,a=0,s,u,c,f;for(;i--;)if(s=e[i][1],u){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[i][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[i][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(u=i,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=i);const p={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[u][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[u+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",p,n],["enter",h,n]],f=bn(f,e.slice(u+1,u+a+3)),f=bn(f,[["enter",g,n]]),f=bn(f,lu(n.parser.constructs.insideSpan.null,e.slice(u+a+4,c-3),n)),f=bn(f,[["exit",g,n],e[c-2],e[c-1],["exit",h,n]]),f=bn(f,e.slice(c+1)),f=bn(f,[["exit",p,n]]),ln(e,u,e.length,f),e}function VO(e,n,i){const a=this;let s=a.events.length,u,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){u=a.events[s][1];break}return f;function f(x){return u?u._inactive?y(x):(c=a.parser.defined.includes(Cn(a.sliceSerialize({start:u.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),p):i(x)}function p(x){return x===40?e.attempt(BO,g,c?g:y)(x):x===91?e.attempt(PO,g,c?h:y)(x):c?g(x):y(x)}function h(x){return e.attempt(ZO,g,y)(x)}function g(x){return n(x)}function y(x){return u._balanced=!0,i(x)}}function GO(e,n,i){return a;function a(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),s}function s(y){return Ge(y)?zl(e,u)(y):u(y)}function u(y){return y===41?g(y):WS(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Ge(y)?zl(e,p)(y):g(y)}function f(y){return i(y)}function p(y){return y===34||y===39||y===40?tw(e,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function h(y){return Ge(y)?zl(e,g)(y):g(y)}function g(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),n):i(y)}}function QO(e,n,i){const a=this;return s;function s(f){return ew.call(a,e,u,c,"reference","referenceMarker","referenceString")(f)}function u(f){return a.parser.defined.includes(Cn(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?n(f):i(f)}function c(f){return i(f)}}function YO(e,n,i){return a;function a(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),s}function s(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),n):i(u)}}const XO={name:"labelStartImage",resolveAll:dp.resolveAll,tokenize:KO};function KO(e,n,i){const a=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):i(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(f):n(f)}}const JO={name:"labelStartLink",resolveAll:dp.resolveAll,tokenize:WO};function WO(e,n,i){const a=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(c):n(c)}}const zd={name:"lineEnding",tokenize:ez};function ez(e,n){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ze(e,n,"linePrefix")}}const Oo={name:"thematicBreak",tokenize:tz};function tz(e,n,i){let a=0,s;return u;function u(h){return e.enter("thematicBreak"),c(h)}function c(h){return s=h,f(h)}function f(h){return h===s?(e.enter("thematicBreakSequence"),p(h)):a>=3&&(h===null||ge(h))?(e.exit("thematicBreak"),n(h)):i(h)}function p(h){return h===s?(e.consume(h),a++,p):(e.exit("thematicBreakSequence"),Ce(h)?ze(e,f,"whitespace")(h):f(h))}}const Vt={continuation:{tokenize:az},exit:sz,name:"list",tokenize:iz},nz={partial:!0,tokenize:oz},rz={partial:!0,tokenize:lz};function iz(e,n,i){const a=this,s=a.events[a.events.length-1];let u=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(b){const w=a.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!a.containerState.marker||b===a.containerState.marker:bh(b)){if(a.containerState.type||(a.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Oo,i,h)(b):h(b);if(!a.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(b)}return i(b)}function p(b){return bh(b)&&++c<10?(e.consume(b),p):(!a.interrupt||c<2)&&(a.containerState.marker?b===a.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):i(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||b,e.check(Kl,a.interrupt?i:g,e.attempt(nz,x,y))}function g(b){return a.containerState.initialBlankLine=!0,u++,x(b)}function y(b){return Ce(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),x):i(b)}function x(b){return a.containerState.size=u+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(b)}}function az(e,n,i){const a=this;return a.containerState._closeFlow=void 0,e.check(Kl,s,u);function s(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,ze(e,n,"listItemIndent",a.containerState.size+1)(f)}function u(f){return a.containerState.furtherBlankLines||!Ce(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(rz,n,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,ze(e,e.attempt(Vt,n,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function lz(e,n,i){const a=this;return ze(e,s,"listItemIndent",a.containerState.size+1);function s(u){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?n(u):i(u)}}function sz(e){e.exit(this.containerState.type)}function oz(e,n,i){const a=this;return ze(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(u){const c=a.events[a.events.length-1];return!Ce(u)&&c&&c[1].type==="listItemPrefixWhitespace"?n(u):i(u)}}const xx={name:"setextUnderline",resolveTo:uz,tokenize:cz};function uz(e,n){let i=e.length,a,s,u;for(;i--;)if(e[i][0]==="enter"){if(e[i][1].type==="content"){a=i;break}e[i][1].type==="paragraph"&&(s=i)}else e[i][1].type==="content"&&e.splice(i,1),!u&&e[i][1].type==="definition"&&(u=i);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",u?(e.splice(s,0,["enter",c,n]),e.splice(u+1,0,["exit",e[a][1],n]),e[a][1].end={...e[u][1].end}):e[a][1]=c,e.push(["exit",c,n]),e}function cz(e,n,i){const a=this;let s;return u;function u(h){let g=a.events.length,y;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){y=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(e.enter("setextHeadingLine"),s=h,c(h)):i(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===s?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Ce(h)?ze(e,p,"lineSuffix")(h):p(h))}function p(h){return h===null||ge(h)?(e.exit("setextHeadingLine"),n(h)):i(h)}}const fz={tokenize:dz};function dz(e){const n=this,i=e.attempt(Kl,a,e.attempt(this.parser.constructs.flowInitial,s,ze(e,e.attempt(this.parser.constructs.flow,s,e.attempt(yO,s)),"linePrefix")));return i;function a(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),n.currentConstruct=void 0,i}function s(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),n.currentConstruct=void 0,i}}const hz={resolveAll:rw()},pz=nw("string"),mz=nw("text");function nw(e){return{resolveAll:rw(e==="text"?gz:void 0),tokenize:n};function n(i){const a=this,s=this.parser.constructs[e],u=i.attempt(s,c,f);return c;function c(g){return h(g)?u(g):f(g)}function f(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),p}function p(g){return h(g)?(i.exit("data"),u(g)):(i.consume(g),p)}function h(g){if(g===null)return!0;const y=s[g];let x=-1;if(y)for(;++x<y.length;){const b=y[x];if(!b.previous||b.previous.call(a,a.previous))return!0}return!1}}}function rw(e){return n;function n(i,a){let s=-1,u;for(;++s<=i.length;)u===void 0?i[s]&&i[s][1].type==="data"&&(u=s,s++):(!i[s]||i[s][1].type!=="data")&&(s!==u+2&&(i[u][1].end=i[s-1][1].end,i.splice(u+2,s-u-2),s=u+2),u=void 0);return e?e(i,a):i}}function gz(e,n){let i=0;for(;++i<=e.length;)if((i===e.length||e[i][1].type==="lineEnding")&&e[i-1][1].type==="data"){const a=e[i-1][1],s=n.sliceStream(a);let u=s.length,c=-1,f=0,p;for(;u--;){const h=s[u];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)p=!0,f++;else if(h!==-1){u++;break}}if(n._contentTypeTextTrailing&&i===e.length&&(f=0),f){const h={type:i===e.length||p||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:a.start._bufferIndex+c,_index:a.start._index+u,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(i,0,["enter",h,n],["exit",h,n]),i+=2)}i++}return e}const yz={42:Vt,43:Vt,45:Vt,48:Vt,49:Vt,50:Vt,51:Vt,52:Vt,53:Vt,54:Vt,55:Vt,56:Vt,57:Vt,62:YS},vz={91:wO},xz={[-2]:Od,[-1]:Od,32:Od},bz={35:CO,42:Oo,45:[xx,Oo],60:OO,61:xx,95:Oo,96:yx,126:yx},Sz={38:KS,92:XS},wz={[-5]:zd,[-4]:zd,[-3]:zd,33:XO,38:KS,42:Sh,60:[J4,IO],91:JO,92:[NO,XS],93:dp,95:Sh,96:fO},Ez={null:[Sh,hz]},kz={null:[42,95]},_z={null:[]},Nz=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:kz,contentInitial:vz,disable:_z,document:yz,flow:bz,flowInitial:xz,insideSpan:Ez,string:Sz,text:wz},Symbol.toStringTag,{value:"Module"}));function jz(e,n,i){let a={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const s={},u=[];let c=[],f=[];const p={attempt:Z(X),check:Z(L),consume:R,enter:T,exit:V,interrupt:Z(L,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:w,parser:e,previous:null,sliceSerialize:x,sliceStream:b,write:y};let g=n.tokenize.call(h,p);return n.resolveAll&&u.push(n),h;function y(se){return c=bn(c,se),j(),c[c.length-1]!==null?[]:(Y(n,0),h.events=lu(u,h.events,h),h.events)}function x(se,ue){return Tz(b(se),ue)}function b(se){return Cz(c,se)}function w(){const{_bufferIndex:se,_index:ue,line:xe,column:I,offset:U}=a;return{_bufferIndex:se,_index:ue,line:xe,column:I,offset:U}}function k(se){s[se.line]=se.column,H()}function j(){let se;for(;a._index<c.length;){const ue=c[a._index];if(typeof ue=="string")for(se=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===se&&a._bufferIndex<ue.length;)_(ue.charCodeAt(a._bufferIndex));else _(ue)}}function _(se){g=g(se)}function R(se){ge(se)?(a.line++,a.column=1,a.offset+=se===-3?2:1,H()):se!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=se}function T(se,ue){const xe=ue||{};return xe.type=se,xe.start=w(),h.events.push(["enter",xe,h]),f.push(xe),xe}function V(se){const ue=f.pop();return ue.end=w(),h.events.push(["exit",ue,h]),ue}function X(se,ue){Y(se,ue.from)}function L(se,ue){ue.restore()}function Z(se,ue){return xe;function xe(I,U,D){let B,te,re,C;return Array.isArray(I)?q(I):"tokenize"in I?q([I]):A(I);function A(de){return Te;function Te(Je){const Be=Je!==null&&de[Je],on=Je!==null&&de.null,Pn=[...Array.isArray(Be)?Be:Be?[Be]:[],...Array.isArray(on)?on:on?[on]:[]];return q(Pn)(Je)}}function q(de){return B=de,te=0,de.length===0?D:N(de[te])}function N(de){return Te;function Te(Je){return C=ie(),re=de,de.partial||(h.currentConstruct=de),de.name&&h.parser.constructs.disable.null.includes(de.name)?ce():de.tokenize.call(ue?Object.assign(Object.create(h),ue):h,p,le,ce)(Je)}}function le(de){return se(re,C),U}function ce(de){return C.restore(),++te<B.length?N(B[te]):D}}}function Y(se,ue){se.resolveAll&&!u.includes(se)&&u.push(se),se.resolve&&ln(h.events,ue,h.events.length-ue,se.resolve(h.events.slice(ue),h)),se.resolveTo&&(h.events=se.resolveTo(h.events,h))}function ie(){const se=w(),ue=h.previous,xe=h.currentConstruct,I=h.events.length,U=Array.from(f);return{from:I,restore:D};function D(){a=se,h.previous=ue,h.currentConstruct=xe,h.events.length=I,f=U,H()}}function H(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function Cz(e,n){const i=n.start._index,a=n.start._bufferIndex,s=n.end._index,u=n.end._bufferIndex;let c;if(i===s)c=[e[i].slice(a,u)];else{if(c=e.slice(i,s),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}u>0&&c.push(e[s].slice(0,u))}return c}function Tz(e,n){let i=-1;const a=[];let s;for(;++i<e.length;){const u=e[i];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
62
+ `;break}case-3:{c=`\r
63
+ `;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&s)continue;c=" ";break}default:c=String.fromCharCode(u)}s=u===-2,a.push(c)}return a.join("")}function Rz(e){const a={constructs:GS([Nz,...(e||{}).extensions||[]]),content:s(F4),defined:[],document:s(G4),flow:s(fz),lazy:{},string:s(pz),text:s(mz)};return a;function s(u){return c;function c(f){return jz(a,u,f)}}}function Az(e){for(;!JS(e););return e}const bx=/[\0\t\n\r]/g;function Oz(){let e=1,n="",i=!0,a;return s;function s(u,c,f){const p=[];let h,g,y,x,b;for(u=n+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),y=0,n="",i&&(u.charCodeAt(0)===65279&&y++,i=void 0);y<u.length;){if(bx.lastIndex=y,h=bx.exec(u),x=h&&h.index!==void 0?h.index:u.length,b=u.charCodeAt(x),!h){n=u.slice(y);break}if(b===10&&y===x&&a)p.push(-3),a=void 0;else switch(a&&(p.push(-5),a=void 0),y<x&&(p.push(u.slice(y,x)),e+=x-y),b){case 0:{p.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,p.push(-2);e++<g;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:a=!0,e=1}y=x+1}return f&&(a&&p.push(-5),n&&p.push(n),p.push(null)),p}}const zz=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Dz(e){return e.replace(zz,Mz)}function Mz(e,n,i){if(n)return n;if(i.charCodeAt(0)===35){const s=i.charCodeAt(1),u=s===120||s===88;return QS(i.slice(u?2:1),u?16:10)}return fp(i)||e}const iw={}.hasOwnProperty;function Lz(e,n,i){return typeof n!="string"&&(i=n,n=void 0),Uz(i)(Az(Rz(i).document().write(Oz()(e,n,!0))))}function Uz(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(_i),autolinkProtocol:ie,autolinkEmail:ie,atxHeading:u(Ei),blockQuote:u(on),characterEscape:ie,characterReference:ie,codeFenced:u(Pn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Pn,c),codeText:u(Aa,c),codeTextData:ie,data:ie,codeFlowValue:ie,definition:u(Wl),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(Zn),hardBreakEscape:u(ki),hardBreakTrailing:u(ki),htmlFlow:u(es,c),htmlFlowData:ie,htmlText:u(es,c),htmlTextData:ie,image:u(ts),label:c,link:u(_i),listItem:u(Oa),listItemValue:x,listOrdered:u(Ni,y),listUnordered:u(Ni),paragraph:u(cu),reference:N,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(Ei),strong:u(fu),thematicBreak:u(du)},exit:{atxHeading:p(),atxHeadingSequence:X,autolink:p(),autolinkEmail:Be,autolinkProtocol:Je,blockQuote:p(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:de,characterReference:Te,codeFenced:p(j),codeFencedFence:k,codeFencedFenceInfo:b,codeFencedFenceMeta:w,codeFlowValue:H,codeIndented:p(_),codeText:p(U),codeTextData:H,data:H,definition:p(),definitionDestinationString:V,definitionLabelString:R,definitionTitleString:T,emphasis:p(),hardBreakEscape:p(ue),hardBreakTrailing:p(ue),htmlFlow:p(xe),htmlFlowData:H,htmlText:p(I),htmlTextData:H,image:p(B),label:re,labelText:te,lineEnding:se,link:p(D),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:le,resourceDestinationString:C,resourceTitleString:A,resource:q,setextHeading:p(Y),setextHeadingLineSequence:Z,setextHeadingText:L,strong:p(),thematicBreak:p()}};aw(n,(e||{}).mdastExtensions||[]);const i={};return a;function a(J){let oe={type:"root",children:[]};const ve={stack:[oe],tokenStack:[],config:n,enter:f,exit:h,buffer:c,resume:g,data:i},_e=[];let Ue=-1;for(;++Ue<J.length;)if(J[Ue][1].type==="listOrdered"||J[Ue][1].type==="listUnordered")if(J[Ue][0]==="enter")_e.push(Ue);else{const Yt=_e.pop();Ue=s(J,Yt,Ue)}for(Ue=-1;++Ue<J.length;){const Yt=n[J[Ue][0]];iw.call(Yt,J[Ue][1].type)&&Yt[J[Ue][1].type].call(Object.assign({sliceSerialize:J[Ue][2].sliceSerialize},ve),J[Ue][1])}if(ve.tokenStack.length>0){const Yt=ve.tokenStack[ve.tokenStack.length-1];(Yt[1]||Sx).call(ve,void 0,Yt[0])}for(oe.position={start:Pr(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Pr(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ue=-1;++Ue<n.transforms.length;)oe=n.transforms[Ue](oe)||oe;return oe}function s(J,oe,ve){let _e=oe-1,Ue=-1,Yt=!1,Hn,Ot,vt,$t;for(;++_e<=ve;){const Fe=J[_e];switch(Fe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Fe[0]==="enter"?Ue++:Ue--,$t=void 0;break}case"lineEndingBlank":{Fe[0]==="enter"&&(Hn&&!$t&&!Ue&&!vt&&(vt=_e),$t=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$t=void 0}if(!Ue&&Fe[0]==="enter"&&Fe[1].type==="listItemPrefix"||Ue===-1&&Fe[0]==="exit"&&(Fe[1].type==="listUnordered"||Fe[1].type==="listOrdered")){if(Hn){let yr=_e;for(Ot=void 0;yr--;){const kn=J[yr];if(kn[1].type==="lineEnding"||kn[1].type==="lineEndingBlank"){if(kn[0]==="exit")continue;Ot&&(J[Ot][1].type="lineEndingBlank",Yt=!0),kn[1].type="lineEnding",Ot=yr}else if(!(kn[1].type==="linePrefix"||kn[1].type==="blockQuotePrefix"||kn[1].type==="blockQuotePrefixWhitespace"||kn[1].type==="blockQuoteMarker"||kn[1].type==="listItemIndent"))break}vt&&(!Ot||vt<Ot)&&(Hn._spread=!0),Hn.end=Object.assign({},Ot?J[Ot][1].start:Fe[1].end),J.splice(Ot||_e,0,["exit",Hn,Fe[2]]),_e++,ve++}if(Fe[1].type==="listItemPrefix"){const yr={type:"listItem",_spread:!1,start:Object.assign({},Fe[1].start),end:void 0};Hn=yr,J.splice(_e,0,["enter",yr,Fe[2]]),_e++,ve++,vt=void 0,$t=!0}}}return J[oe][1]._spread=Yt,ve}function u(J,oe){return ve;function ve(_e){f.call(this,J(_e),_e),oe&&oe.call(this,_e)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(J,oe,ve){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([oe,ve||void 0]),J.position={start:Pr(oe.start),end:void 0}}function p(J){return oe;function oe(ve){J&&J.call(this,ve),h.call(this,ve)}}function h(J,oe){const ve=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==J.type&&(oe?oe.call(this,J,_e[0]):(_e[1]||Sx).call(this,J,_e[0]));else throw new Error("Cannot close `"+J.type+"` ("+Ol({start:J.start,end:J.end})+"): it’s not open");ve.position.end=Pr(J.end)}function g(){return cp(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function x(J){if(this.data.expectingFirstListItemValue){const oe=this.stack[this.stack.length-2];oe.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function b(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.lang=J}function w(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.meta=J}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.value=J.replace(/(\r?\n|\r)$/g,"")}function R(J){const oe=this.resume(),ve=this.stack[this.stack.length-1];ve.label=oe,ve.identifier=Cn(this.sliceSerialize(J)).toLowerCase()}function T(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.title=J}function V(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.url=J}function X(J){const oe=this.stack[this.stack.length-1];if(!oe.depth){const ve=this.sliceSerialize(J).length;oe.depth=ve}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function Z(J){const oe=this.stack[this.stack.length-1];oe.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function Y(){this.data.setextHeadingSlurpLineEnding=void 0}function ie(J){const ve=this.stack[this.stack.length-1].children;let _e=ve[ve.length-1];(!_e||_e.type!=="text")&&(_e=At(),_e.position={start:Pr(J.start),end:void 0},ve.push(_e)),this.stack.push(_e)}function H(J){const oe=this.stack.pop();oe.value+=this.sliceSerialize(J),oe.position.end=Pr(J.end)}function se(J){const oe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=oe.children[oe.children.length-1];ve.position.end=Pr(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(oe.type)&&(ie.call(this,J),H.call(this,J))}function ue(){this.data.atHardBreak=!0}function xe(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.value=J}function I(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.value=J}function U(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.value=J}function D(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=oe,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function B(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=oe,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function te(J){const oe=this.sliceSerialize(J),ve=this.stack[this.stack.length-2];ve.label=Dz(oe),ve.identifier=Cn(oe).toLowerCase()}function re(){const J=this.stack[this.stack.length-1],oe=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const _e=J.children;ve.children=_e}else ve.alt=oe}function C(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.url=J}function A(){const J=this.resume(),oe=this.stack[this.stack.length-1];oe.title=J}function q(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function le(J){const oe=this.resume(),ve=this.stack[this.stack.length-1];ve.label=oe,ve.identifier=Cn(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function ce(J){this.data.characterReferenceType=J.type}function de(J){const oe=this.sliceSerialize(J),ve=this.data.characterReferenceType;let _e;ve?(_e=QS(oe,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=fp(oe);const Ue=this.stack[this.stack.length-1];Ue.value+=_e}function Te(J){const oe=this.stack.pop();oe.position.end=Pr(J.end)}function Je(J){H.call(this,J);const oe=this.stack[this.stack.length-1];oe.url=this.sliceSerialize(J)}function Be(J){H.call(this,J);const oe=this.stack[this.stack.length-1];oe.url="mailto:"+this.sliceSerialize(J)}function on(){return{type:"blockquote",children:[]}}function Pn(){return{type:"code",lang:null,meta:null,value:""}}function Aa(){return{type:"inlineCode",value:""}}function Wl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Zn(){return{type:"emphasis",children:[]}}function Ei(){return{type:"heading",depth:0,children:[]}}function ki(){return{type:"break"}}function es(){return{type:"html",value:""}}function ts(){return{type:"image",title:null,url:"",alt:null}}function _i(){return{type:"link",title:null,url:"",children:[]}}function Ni(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Oa(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function cu(){return{type:"paragraph",children:[]}}function fu(){return{type:"strong",children:[]}}function At(){return{type:"text",value:""}}function du(){return{type:"thematicBreak"}}}function Pr(e){return{line:e.line,column:e.column,offset:e.offset}}function aw(e,n){let i=-1;for(;++i<n.length;){const a=n[i];Array.isArray(a)?aw(e,a):$z(e,a)}}function $z(e,n){let i;for(i in n)if(iw.call(n,i))switch(i){case"canContainEols":{const a=n[i];a&&e[i].push(...a);break}case"transforms":{const a=n[i];a&&e[i].push(...a);break}case"enter":case"exit":{const a=n[i];a&&Object.assign(e[i],a);break}}}function Sx(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ol({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ol({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ol({start:n.start,end:n.end})+") is still open")}function Iz(e){const n=this;n.parser=i;function i(a){return Lz(a,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function qz(e,n){const i={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,i),e.applyData(n,i)}function Bz(e,n){const i={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,i),[e.applyData(n,i),{type:"text",value:`
64
+ `}]}function Pz(e,n){const i=n.value?n.value+`
65
+ `:"",a={},s=n.lang?n.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let u={type:"element",tagName:"code",properties:a,children:[{type:"text",value:i}]};return n.meta&&(u.data={meta:n.meta}),e.patch(n,u),u=e.applyData(n,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(n,u),u}function Zz(e,n){const i={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Hz(e,n){const i={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Fz(e,n){const i=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(n.identifier).toUpperCase(),s=Ra(a.toLowerCase()),u=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=u+1,f+=1,e.footnoteCounts.set(a,f);const p={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+s,id:i+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,p);const h={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(n,h),e.applyData(n,h)}function Vz(e,n){const i={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function Gz(e,n){if(e.options.allowDangerousHtml){const i={type:"raw",value:n.value};return e.patch(n,i),e.applyData(n,i)}}function lw(e,n){const i=n.referenceType;let a="]";if(i==="collapsed"?a+="[]":i==="full"&&(a+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+a}];const s=e.all(n),u=s[0];u&&u.type==="text"?u.value="["+u.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=a:s.push({type:"text",value:a}),s}function Qz(e,n){const i=String(n.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return lw(e,n);const s={src:Ra(a.url||""),alt:n.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const u={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,u),e.applyData(n,u)}function Yz(e,n){const i={src:Ra(n.url)};n.alt!==null&&n.alt!==void 0&&(i.alt=n.alt),n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,a),e.applyData(n,a)}function Xz(e,n){const i={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,i);const a={type:"element",tagName:"code",properties:{},children:[i]};return e.patch(n,a),e.applyData(n,a)}function Kz(e,n){const i=String(n.identifier).toUpperCase(),a=e.definitionById.get(i);if(!a)return lw(e,n);const s={href:Ra(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const u={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,u),e.applyData(n,u)}function Jz(e,n){const i={href:Ra(n.url)};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function Wz(e,n,i){const a=e.all(n),s=i?eD(i):sw(n),u={},c=[];if(typeof n.checked=="boolean"){const g=a[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const g=a[f];(s||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
66
+ `}),g.type==="element"&&g.tagName==="p"&&!s?c.push(...g.children):c.push(g)}const p=a[a.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
67
+ `});const h={type:"element",tagName:"li",properties:u,children:c};return e.patch(n,h),e.applyData(n,h)}function eD(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const i=e.children;let a=-1;for(;!n&&++a<i.length;)n=sw(i[a])}return n}function sw(e){const n=e.spread;return n??e.children.length>1}function tD(e,n){const i={},a=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(i.start=n.start);++s<a.length;){const c=a[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const u={type:"element",tagName:n.ordered?"ol":"ul",properties:i,children:e.wrap(a,!0)};return e.patch(n,u),e.applyData(n,u)}function nD(e,n){const i={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function rD(e,n){const i={type:"root",children:e.wrap(e.all(n))};return e.patch(n,i),e.applyData(n,i)}function iD(e,n){const i={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function aD(e,n){const i=e.all(n),a=i.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(n.children[0],c),s.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},f=lp(n.children[1]),p=qS(n.children[n.children.length-1]);f&&p&&(c.position={start:f,end:p}),s.push(c)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,u),e.applyData(n,u)}function lD(e,n,i){const a=i?i.children:void 0,u=(a?a.indexOf(n):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,f=c?c.length:n.children.length;let p=-1;const h=[];for(;++p<f;){const y=n.children[p],x={},b=c?c[p]:void 0;b&&(x.align=b);let w={type:"element",tagName:u,properties:x,children:[]};y&&(w.children=e.all(y),e.patch(y,w),w=e.applyData(y,w)),h.push(w)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(n,g),e.applyData(n,g)}function sD(e,n){const i={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}const wx=9,Ex=32;function oD(e){const n=String(e),i=/\r?\n|\r/g;let a=i.exec(n),s=0;const u=[];for(;a;)u.push(kx(n.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=i.exec(n);return u.push(kx(n.slice(s),s>0,!1)),u.join("")}function kx(e,n,i){let a=0,s=e.length;if(n){let u=e.codePointAt(a);for(;u===wx||u===Ex;)a++,u=e.codePointAt(a)}if(i){let u=e.codePointAt(s-1);for(;u===wx||u===Ex;)s--,u=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function uD(e,n){const i={type:"text",value:oD(String(n.value))};return e.patch(n,i),e.applyData(n,i)}function cD(e,n){const i={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,i),e.applyData(n,i)}const fD={blockquote:qz,break:Bz,code:Pz,delete:Zz,emphasis:Hz,footnoteReference:Fz,heading:Vz,html:Gz,imageReference:Qz,image:Yz,inlineCode:Xz,linkReference:Kz,link:Jz,listItem:Wz,list:tD,paragraph:nD,root:rD,strong:iD,table:aD,tableCell:sD,tableRow:lD,text:uD,thematicBreak:cD,toml:ko,yaml:ko,definition:ko,footnoteDefinition:ko};function ko(){}const ow=-1,su=0,Dl=1,Zo=2,hp=3,pp=4,mp=5,gp=6,uw=7,cw=8,_x=typeof self=="object"?self:globalThis,dD=(e,n)=>{const i=(s,u)=>(e.set(u,s),s),a=s=>{if(e.has(s))return e.get(s);const[u,c]=n[s];switch(u){case su:case ow:return i(c,s);case Dl:{const f=i([],s);for(const p of c)f.push(a(p));return f}case Zo:{const f=i({},s);for(const[p,h]of c)f[a(p)]=a(h);return f}case hp:return i(new Date(c),s);case pp:{const{source:f,flags:p}=c;return i(new RegExp(f,p),s)}case mp:{const f=i(new Map,s);for(const[p,h]of c)f.set(a(p),a(h));return f}case gp:{const f=i(new Set,s);for(const p of c)f.add(a(p));return f}case uw:{const{name:f,message:p}=c;return i(new _x[f](p),s)}case cw:return i(BigInt(c),s);case"BigInt":return i(Object(BigInt(c)),s);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return i(new DataView(f),c)}}return i(new _x[u](c),s)};return a},Nx=e=>dD(new Map,e)(0),ha="",{toString:hD}={},{keys:pD}=Object,Rl=e=>{const n=typeof e;if(n!=="object"||!e)return[su,n];const i=hD.call(e).slice(8,-1);switch(i){case"Array":return[Dl,ha];case"Object":return[Zo,ha];case"Date":return[hp,ha];case"RegExp":return[pp,ha];case"Map":return[mp,ha];case"Set":return[gp,ha];case"DataView":return[Dl,i]}return i.includes("Array")?[Dl,i]:i.includes("Error")?[uw,i]:[Zo,i]},_o=([e,n])=>e===su&&(n==="function"||n==="symbol"),mD=(e,n,i,a)=>{const s=(c,f)=>{const p=a.push(c)-1;return i.set(f,p),p},u=c=>{if(i.has(c))return i.get(c);let[f,p]=Rl(c);switch(f){case su:{let g=c;switch(p){case"bigint":f=cw,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);g=null;break;case"undefined":return s([ow],c)}return s([f,g],c)}case Dl:{if(p){let x=c;return p==="DataView"?x=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(x=new Uint8Array(c)),s([p,[...x]],c)}const g=[],y=s([f,g],c);for(const x of c)g.push(u(x));return y}case Zo:{if(p)switch(p){case"BigInt":return s([p,c.toString()],c);case"Boolean":case"Number":case"String":return s([p,c.valueOf()],c)}if(n&&"toJSON"in c)return u(c.toJSON());const g=[],y=s([f,g],c);for(const x of pD(c))(e||!_o(Rl(c[x])))&&g.push([u(x),u(c[x])]);return y}case hp:return s([f,c.toISOString()],c);case pp:{const{source:g,flags:y}=c;return s([f,{source:g,flags:y}],c)}case mp:{const g=[],y=s([f,g],c);for(const[x,b]of c)(e||!(_o(Rl(x))||_o(Rl(b))))&&g.push([u(x),u(b)]);return y}case gp:{const g=[],y=s([f,g],c);for(const x of c)(e||!_o(Rl(x)))&&g.push(u(x));return y}}const{message:h}=c;return s([f,{name:p,message:h}],c)};return u},jx=(e,{json:n,lossy:i}={})=>{const a=[];return mD(!(n||i),!!n,new Map,a)(e),a},Ho=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?Nx(jx(e,n)):structuredClone(e):(e,n)=>Nx(jx(e,n));function gD(e,n){const i=[{type:"text",value:"↩"}];return n>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),i}function yD(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function vD(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=e.options.footnoteBackContent||gD,a=e.options.footnoteBackLabel||yD,s=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let p=-1;for(;++p<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[p]);if(!h)continue;const g=e.all(h),y=String(h.identifier).toUpperCase(),x=Ra(y.toLowerCase());let b=0;const w=[],k=e.footnoteCounts.get(y);for(;k!==void 0&&++b<=k;){w.length>0&&w.push({type:"text",value:" "});let R=typeof i=="string"?i:i(p,b);typeof R=="string"&&(R={type:"text",value:R}),w.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+x+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(p,b),className:["data-footnote-backref"]},children:Array.isArray(R)?R:[R]})}const j=g[g.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const R=j.children[j.children.length-1];R&&R.type==="text"?R.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...w)}else g.push(...w);const _={type:"element",tagName:"li",properties:{id:n+"fn-"+x},children:e.wrap(g,!0)};e.patch(h,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Ho(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
68
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
69
+ `}]}}const ou=(function(e){if(e==null)return wD;if(typeof e=="function")return uu(e);if(typeof e=="object")return Array.isArray(e)?xD(e):bD(e);if(typeof e=="string")return SD(e);throw new Error("Expected function, string, or object as test")});function xD(e){const n=[];let i=-1;for(;++i<e.length;)n[i]=ou(e[i]);return uu(a);function a(...s){let u=-1;for(;++u<n.length;)if(n[u].apply(this,s))return!0;return!1}}function bD(e){const n=e;return uu(i);function i(a){const s=a;let u;for(u in e)if(s[u]!==n[u])return!1;return!0}}function SD(e){return uu(n);function n(i){return i&&i.type===e}}function uu(e){return n;function n(i,a,s){return!!(ED(i)&&e.call(this,i,typeof a=="number"?a:void 0,s||void 0))}}function wD(){return!0}function ED(e){return e!==null&&typeof e=="object"&&"type"in e}const fw=[],kD=!0,wh=!1,_D="skip";function dw(e,n,i,a){let s;typeof n=="function"&&typeof i!="function"?(a=i,i=n):s=n;const u=ou(s),c=a?-1:1;f(e,void 0,[])();function f(p,h,g){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return x;function x(){let b=fw,w,k,j;if((!n||u(p,h,g[g.length-1]||void 0))&&(b=ND(i(p,g)),b[0]===wh))return b;if("children"in p&&p.children){const _=p;if(_.children&&b[0]!==_D)for(k=(a?_.children.length:-1)+c,j=g.concat(_);k>-1&&k<_.children.length;){const R=_.children[k];if(w=f(R,k,j)(),w[0]===wh)return w;k=typeof w[1]=="number"?w[1]:k+c}}return b}}}function ND(e){return Array.isArray(e)?e:typeof e=="number"?[kD,e]:e==null?fw:[e]}function yp(e,n,i,a){let s,u,c;typeof n=="function"&&typeof i!="function"?(u=void 0,c=n,s=i):(u=n,c=i,s=a),dw(e,u,f,s);function f(p,h){const g=h[h.length-1],y=g?g.children.indexOf(p):void 0;return c(p,y,g)}}const Eh={}.hasOwnProperty,jD={};function CD(e,n){const i=n||jD,a=new Map,s=new Map,u=new Map,c={...fD,...i.handlers},f={all:h,applyData:RD,definitionById:a,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:c,one:p,options:i,patch:TD,wrap:OD};return yp(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?a:s,x=String(g.identifier).toUpperCase();y.has(x)||y.set(x,g)}}),f;function p(g,y){const x=g.type,b=f.handlers[x];if(Eh.call(f.handlers,x)&&b)return b(f,g,y);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in g){const{children:k,...j}=g,_=Ho(j);return _.children=f.all(g),_}return Ho(g)}return(f.options.unknownHandler||AD)(f,g,y)}function h(g){const y=[];if("children"in g){const x=g.children;let b=-1;for(;++b<x.length;){const w=f.one(x[b],g);if(w){if(b&&x[b-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=Cx(w.value)),!Array.isArray(w)&&w.type==="element")){const k=w.children[0];k&&k.type==="text"&&(k.value=Cx(k.value))}Array.isArray(w)?y.push(...w):y.push(w)}}}return y}}function TD(e,n){e.position&&(n.position=y4(e))}function RD(e,n){let i=n;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,u=e.data.hProperties;if(typeof a=="string")if(i.type==="element")i.tagName=a;else{const c="children"in i?i.children:[i];i={type:"element",tagName:a,properties:{},children:c}}i.type==="element"&&u&&Object.assign(i.properties,Ho(u)),"children"in i&&i.children&&s!==null&&s!==void 0&&(i.children=s)}return i}function AD(e,n){const i=n.data||{},a="value"in n&&!(Eh.call(i,"hProperties")||Eh.call(i,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function OD(e,n){const i=[];let a=-1;for(n&&i.push({type:"text",value:`
70
+ `});++a<e.length;)a&&i.push({type:"text",value:`
71
+ `}),i.push(e[a]);return n&&e.length>0&&i.push({type:"text",value:`
72
+ `}),i}function Cx(e){let n=0,i=e.charCodeAt(n);for(;i===9||i===32;)n++,i=e.charCodeAt(n);return e.slice(n)}function Tx(e,n){const i=CD(e,n),a=i.one(e,void 0),s=vD(i),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
73
+ `},s),u}function zD(e,n){return e&&"run"in e?async function(i,a){const s=Tx(i,{file:a,...n});await e.run(s,a)}:function(i,a){return Tx(i,{file:a,...e||n})}}function Rx(e){if(e)throw e}var Dd,Ax;function DD(){if(Ax)return Dd;Ax=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},u=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!y)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},c=function(h,g){i&&g.name==="__proto__"?i(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},f=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(a)return a(h,g).value}else return;return h[g]};return Dd=function p(){var h,g,y,x,b,w,k=arguments[0],j=1,_=arguments.length,R=!1;for(typeof k=="boolean"&&(R=k,k=arguments[1]||{},j=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});j<_;++j)if(h=arguments[j],h!=null)for(g in h)y=f(k,g),x=f(h,g),k!==x&&(R&&x&&(u(x)||(b=s(x)))?(b?(b=!1,w=y&&s(y)?y:[]):w=y&&u(y)?y:{},c(k,{name:g,newValue:p(R,w,x)})):typeof x<"u"&&c(k,{name:g,newValue:x}));return k},Dd}var MD=DD();const Md=Bl(MD);function kh(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function LD(){const e=[],n={run:i,use:a};return n;function i(...s){let u=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(p,...h){const g=e[++u];let y=-1;if(p){c(p);return}for(;++y<s.length;)(h[y]===null||h[y]===void 0)&&(h[y]=s[y]);s=h,g?UD(g,f)(...h):c(null,...h)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),n}}function UD(e,n){let i;return a;function a(...c){const f=e.length>c.length;let p;f&&c.push(s);try{p=e.apply(this,c)}catch(h){const g=h;if(f&&i)throw g;return s(g)}f||(p&&p.then&&typeof p.then=="function"?p.then(u,s):p instanceof Error?s(p):u(p))}function s(c,...f){i||(i=!0,n(c,...f))}function u(c){s(null,c)}}const Ln={basename:$D,dirname:ID,extname:qD,join:BD,sep:"/"};function $D(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Jl(e);let i=0,a=-1,s=e.length,u;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(u){i=s+1;break}}else a<0&&(u=!0,a=s+1);return a<0?"":e.slice(i,a)}if(n===e)return"";let c=-1,f=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(u){i=s+1;break}}else c<0&&(u=!0,c=s+1),f>-1&&(e.codePointAt(s)===n.codePointAt(f--)?f<0&&(a=s):(f=-1,a=c));return i===a?a=c:a<0&&(a=e.length),e.slice(i,a)}function ID(e){if(Jl(e),e.length===0)return".";let n=-1,i=e.length,a;for(;--i;)if(e.codePointAt(i)===47){if(a){n=i;break}}else a||(a=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function qD(e){Jl(e);let n=e.length,i=-1,a=0,s=-1,u=0,c;for(;n--;){const f=e.codePointAt(n);if(f===47){if(c){a=n+1;break}continue}i<0&&(c=!0,i=n+1),f===46?s<0?s=n:u!==1&&(u=1):s>-1&&(u=-1)}return s<0||i<0||u===0||u===1&&s===i-1&&s===a+1?"":e.slice(s,i)}function BD(...e){let n=-1,i;for(;++n<e.length;)Jl(e[n]),e[n]&&(i=i===void 0?e[n]:i+"/"+e[n]);return i===void 0?".":PD(i)}function PD(e){Jl(e);const n=e.codePointAt(0)===47;let i=ZD(e,!n);return i.length===0&&!n&&(i="."),i.length>0&&e.codePointAt(e.length-1)===47&&(i+="/"),n?"/"+i:i}function ZD(e,n){let i="",a=0,s=-1,u=0,c=-1,f,p;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||u===1))if(s!==c-1&&u===2){if(i.length<2||a!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",a=0):(i=i.slice(0,p),a=i.length-1-i.lastIndexOf("/")),s=c,u=0;continue}}else if(i.length>0){i="",a=0,s=c,u=0;continue}}n&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(s+1,c):i=e.slice(s+1,c),a=c-s-1;s=c,u=0}else f===46&&u>-1?u++:u=-1}return i}function Jl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const HD={cwd:FD};function FD(){return"/"}function _h(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function VD(e){if(typeof e=="string")e=new URL(e);else if(!_h(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return GD(e)}function GD(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const n=e.pathname;let i=-1;for(;++i<n.length;)if(n.codePointAt(i)===37&&n.codePointAt(i+1)===50){const a=n.codePointAt(i+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(n)}const Ld=["history","path","basename","stem","extname","dirname"];class hw{constructor(n){let i;n?_h(n)?i={path:n}:typeof n=="string"||QD(n)?i={value:n}:i=n:i={},this.cwd="cwd"in i?"":HD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Ld.length;){const u=Ld[a];u in i&&i[u]!==void 0&&i[u]!==null&&(this[u]=u==="history"?[...i[u]]:i[u])}let s;for(s in i)Ld.includes(s)||(this[s]=i[s])}get basename(){return typeof this.path=="string"?Ln.basename(this.path):void 0}set basename(n){$d(n,"basename"),Ud(n,"basename"),this.path=Ln.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Ln.dirname(this.path):void 0}set dirname(n){Ox(this.basename,"dirname"),this.path=Ln.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Ln.extname(this.path):void 0}set extname(n){if(Ud(n,"extname"),Ox(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ln.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){_h(n)&&(n=VD(n)),$d(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Ln.basename(this.path,this.extname):void 0}set stem(n){$d(n,"stem"),Ud(n,"stem"),this.path=Ln.join(this.dirname||"",n+(this.extname||""))}fail(n,i,a){const s=this.message(n,i,a);throw s.fatal=!0,s}info(n,i,a){const s=this.message(n,i,a);return s.fatal=void 0,s}message(n,i,a){const s=new Rt(n,i,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Ud(e,n){if(e&&e.includes(Ln.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Ln.sep+"`")}function $d(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Ox(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function QD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const YD=(function(e){const a=this.constructor.prototype,s=a[e],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,a),u}),XD={}.hasOwnProperty;class vp extends YD{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=LD()}copy(){const n=new vp;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];n.use(...a)}return n.data(Md(!0,{},this.namespace)),n}data(n,i){return typeof n=="string"?arguments.length===2?(Bd("data",this.frozen),this.namespace[n]=i,this):XD.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Bd("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=i.call(n,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const i=No(n),a=this.parser||this.Parser;return Id("parse",a),a(String(i),i)}process(n,i){const a=this;return this.freeze(),Id("process",this.parser||this.Parser),qd("process",this.compiler||this.Compiler),i?s(void 0,i):new Promise(s);function s(u,c){const f=No(n),p=a.parse(f);a.run(p,f,function(g,y,x){if(g||!y||!x)return h(g);const b=y,w=a.stringify(b,x);WD(w)?x.value=w:x.result=w,h(g,x)});function h(g,y){g||!y?c(g):u?u(y):i(void 0,y)}}}processSync(n){let i=!1,a;return this.freeze(),Id("processSync",this.parser||this.Parser),qd("processSync",this.compiler||this.Compiler),this.process(n,s),Dx("processSync","process",i),a;function s(u,c){i=!0,Rx(u),a=c}}run(n,i,a){zx(n),this.freeze();const s=this.transformers;return!a&&typeof i=="function"&&(a=i,i=void 0),a?u(void 0,a):new Promise(u);function u(c,f){const p=No(i);s.run(n,p,h);function h(g,y,x){const b=y||n;g?f(g):c?c(b):a(void 0,b,x)}}}runSync(n,i){let a=!1,s;return this.run(n,i,u),Dx("runSync","run",a),s;function u(c,f){Rx(c),s=f,a=!0}}stringify(n,i){this.freeze();const a=No(i),s=this.compiler||this.Compiler;return qd("stringify",s),zx(n),s(n,a)}use(n,...i){const a=this.attachers,s=this.namespace;if(Bd("use",this.frozen),n!=null)if(typeof n=="function")p(n,i);else if(typeof n=="object")Array.isArray(n)?f(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function u(h){if(typeof h=="function")p(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...y]=h;p(g,y)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(s.settings=Md(!0,s.settings,h.settings))}function f(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const y=h[g];u(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function p(h,g){let y=-1,x=-1;for(;++y<a.length;)if(a[y][0]===h){x=y;break}if(x===-1)a.push([h,...g]);else if(g.length>0){let[b,...w]=g;const k=a[x][1];kh(k)&&kh(b)&&(b=Md(!0,k,b)),a[x]=[h,b,...w]}}}}const KD=new vp().freeze();function Id(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qd(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Bd(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zx(e){if(!kh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Dx(e,n,i){if(!i)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function No(e){return JD(e)?e:new hw(e)}function JD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function WD(e){return typeof e=="string"||e3(e)}function e3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const t3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Mx=[],Lx={allowDangerousHtml:!0},n3=/^(https?|ircs?|mailto|xmpp)$/i,r3=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Ux(e){const n=i3(e),i=a3(e);return l3(n.runSync(n.parse(i),i),e)}function i3(e){const n=e.rehypePlugins||Mx,i=e.remarkPlugins||Mx,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Lx}:Lx;return KD().use(Iz).use(i).use(zD,a).use(n)}function a3(e){const n=e.children||"",i=new hw;return typeof n=="string"&&(i.value=n),i}function l3(e,n){const i=n.allowedElements,a=n.allowElement,s=n.components,u=n.disallowedElements,c=n.skipHtml,f=n.unwrapDisallowed,p=n.urlTransform||s3;for(const g of r3)Object.hasOwn(n,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+t3+g.id,void 0);return yp(e,h),w4(e,{Fragment:v.Fragment,components:s,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(g,y,x){if(g.type==="raw"&&x&&typeof y=="number")return c?x.children.splice(y,1):x.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let b;for(b in Ad)if(Object.hasOwn(Ad,b)&&Object.hasOwn(g.properties,b)){const w=g.properties[b],k=Ad[b];(k===null||k.includes(g.tagName))&&(g.properties[b]=p(String(w||""),b,g))}}if(g.type==="element"){let b=i?!i.includes(g.tagName):u?u.includes(g.tagName):!1;if(!b&&a&&typeof y=="number"&&(b=!a(g,y,x)),b&&x&&typeof y=="number")return f&&g.children?x.children.splice(y,1,...g.children):x.children.splice(y,1),y}}}function s3(e){const n=e.indexOf(":"),i=e.indexOf("?"),a=e.indexOf("#"),s=e.indexOf("/");return n===-1||s!==-1&&n>s||i!==-1&&n>i||a!==-1&&n>a||n3.test(e.slice(0,n))?e:""}function $x(e,n){const i=String(e);if(typeof n!="string")throw new TypeError("Expected character");let a=0,s=i.indexOf(n);for(;s!==-1;)a++,s=i.indexOf(n,s+n.length);return a}function o3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function u3(e,n,i){const s=ou((i||{}).ignore||[]),u=c3(n);let c=-1;for(;++c<u.length;)dw(e,"text",f);function f(h,g){let y=-1,x;for(;++y<g.length;){const b=g[y],w=x?x.children:void 0;if(s(b,w?w.indexOf(b):void 0,x))return;x=b}if(x)return p(h,g)}function p(h,g){const y=g[g.length-1],x=u[c][0],b=u[c][1];let w=0;const j=y.children.indexOf(h);let _=!1,R=[];x.lastIndex=0;let T=x.exec(h.value);for(;T;){const V=T.index,X={index:T.index,input:T.input,stack:[...g,h]};let L=b(...T,X);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?x.lastIndex=V+1:(w!==V&&R.push({type:"text",value:h.value.slice(w,V)}),Array.isArray(L)?R.push(...L):L&&R.push(L),w=V+T[0].length,_=!0),!x.global)break;T=x.exec(h.value)}return _?(w<h.value.length&&R.push({type:"text",value:h.value.slice(w)}),y.children.splice(j,1,...R)):R=[h],j+R.length}}function c3(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<i.length;){const s=i[a];n.push([f3(s[0]),d3(s[1])])}return n}function f3(e){return typeof e=="string"?new RegExp(o3(e),"g"):e}function d3(e){return typeof e=="function"?e:function(){return e}}const Pd="phrasing",Zd=["autolink","link","image","label"];function h3(){return{transforms:[b3],enter:{literalAutolink:m3,literalAutolinkEmail:Hd,literalAutolinkHttp:Hd,literalAutolinkWww:Hd},exit:{literalAutolink:x3,literalAutolinkEmail:v3,literalAutolinkHttp:g3,literalAutolinkWww:y3}}}function p3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Pd,notInConstruct:Zd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Pd,notInConstruct:Zd},{character:":",before:"[ps]",after:"\\/",inConstruct:Pd,notInConstruct:Zd}]}}function m3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Hd(e){this.config.enter.autolinkProtocol.call(this,e)}function g3(e){this.config.exit.autolinkProtocol.call(this,e)}function y3(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function v3(e){this.config.exit.autolinkEmail.call(this,e)}function x3(e){this.exit(e)}function b3(e){u3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,S3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),w3]],{ignore:["link","linkReference"]})}function S3(e,n,i,a,s){let u="";if(!pw(s)||(/^w/i.test(n)&&(i=n+i,n="",u="http://"),!E3(i)))return!1;const c=k3(i+a);if(!c[0])return!1;const f={type:"link",title:null,url:u+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function w3(e,n,i,a){return!pw(a,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+i,children:[{type:"text",value:n+"@"+i}]}}function E3(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function k3(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let i=n[0],a=i.indexOf(")");const s=$x(e,"(");let u=$x(e,")");for(;a!==-1&&s>u;)e+=i.slice(0,a+1),i=i.slice(a+1),a=i.indexOf(")"),u++;return[e,i]}function pw(e,n){const i=e.input.charCodeAt(e.index-1);return(e.index===0||xi(i)||au(i))&&(!n||i!==47)}mw.peek=z3;function _3(){this.buffer()}function N3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function j3(){this.buffer()}function C3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function T3(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Cn(this.sliceSerialize(e)).toLowerCase(),i.label=n}function R3(e){this.exit(e)}function A3(e){const n=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Cn(this.sliceSerialize(e)).toLowerCase(),i.label=n}function O3(e){this.exit(e)}function z3(){return"["}function mw(e,n,i,a){const s=i.createTracker(a);let u=s.move("[^");const c=i.enter("footnoteReference"),f=i.enter("reference");return u+=s.move(i.safe(i.associationId(e),{after:"]",before:u})),f(),c(),u+=s.move("]"),u}function D3(){return{enter:{gfmFootnoteCallString:_3,gfmFootnoteCall:N3,gfmFootnoteDefinitionLabelString:j3,gfmFootnoteDefinition:C3},exit:{gfmFootnoteCallString:T3,gfmFootnoteCall:R3,gfmFootnoteDefinitionLabelString:A3,gfmFootnoteDefinition:O3}}}function M3(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:i,footnoteReference:mw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(a,s,u,c){const f=u.createTracker(c);let p=f.move("[^");const h=u.enter("footnoteDefinition"),g=u.enter("label");return p+=f.move(u.safe(u.associationId(a),{before:p,after:"]"})),g(),p+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),p+=f.move((n?`
74
+ `:" ")+u.indentLines(u.containerFlow(a,f.current()),n?gw:L3))),h(),p}}function L3(e,n,i){return n===0?e:gw(e,n,i)}function gw(e,n,i){return(i?"":" ")+e}const U3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];yw.peek=P3;function $3(){return{canContainEols:["delete"],enter:{strikethrough:q3},exit:{strikethrough:B3}}}function I3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:U3}],handlers:{delete:yw}}}function q3(e){this.enter({type:"delete",children:[]},e)}function B3(e){this.exit(e)}function yw(e,n,i,a){const s=i.createTracker(a),u=i.enter("strikethrough");let c=s.move("~~");return c+=i.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),u(),c}function P3(){return"~"}function Z3(e){return e.length}function H3(e,n){const i=n||{},a=(i.align||[]).concat(),s=i.stringLength||Z3,u=[],c=[],f=[],p=[];let h=0,g=-1;for(;++g<e.length;){const k=[],j=[];let _=-1;for(e[g].length>h&&(h=e[g].length);++_<e[g].length;){const R=F3(e[g][_]);if(i.alignDelimiters!==!1){const T=s(R);j[_]=T,(p[_]===void 0||T>p[_])&&(p[_]=T)}k.push(R)}c[g]=k,f[g]=j}let y=-1;if(typeof a=="object"&&"length"in a)for(;++y<h;)u[y]=Ix(a[y]);else{const k=Ix(a);for(;++y<h;)u[y]=k}y=-1;const x=[],b=[];for(;++y<h;){const k=u[y];let j="",_="";k===99?(j=":",_=":"):k===108?j=":":k===114&&(_=":");let R=i.alignDelimiters===!1?1:Math.max(1,p[y]-j.length-_.length);const T=j+"-".repeat(R)+_;i.alignDelimiters!==!1&&(R=j.length+R+_.length,R>p[y]&&(p[y]=R),b[y]=R),x[y]=T}c.splice(1,0,x),f.splice(1,0,b),g=-1;const w=[];for(;++g<c.length;){const k=c[g],j=f[g];y=-1;const _=[];for(;++y<h;){const R=k[y]||"";let T="",V="";if(i.alignDelimiters!==!1){const X=p[y]-(j[y]||0),L=u[y];L===114?T=" ".repeat(X):L===99?X%2?(T=" ".repeat(X/2+.5),V=" ".repeat(X/2-.5)):(T=" ".repeat(X/2),V=T):V=" ".repeat(X)}i.delimiterStart!==!1&&!y&&_.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&R==="")&&(i.delimiterStart!==!1||y)&&_.push(" "),i.alignDelimiters!==!1&&_.push(T),_.push(R),i.alignDelimiters!==!1&&_.push(V),i.padding!==!1&&_.push(" "),(i.delimiterEnd!==!1||y!==h-1)&&_.push("|")}w.push(i.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return w.join(`
75
+ `)}function F3(e){return e==null?"":String(e)}function Ix(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function V3(e,n,i,a){const s=i.enter("blockquote"),u=i.createTracker(a);u.move("> "),u.shift(2);const c=i.indentLines(i.containerFlow(e,u.current()),G3);return s(),c}function G3(e,n,i){return">"+(i?"":" ")+e}function Q3(e,n){return qx(e,n.inConstruct,!0)&&!qx(e,n.notInConstruct,!1)}function qx(e,n,i){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return i;let a=-1;for(;++a<n.length;)if(e.includes(n[a]))return!0;return!1}function Bx(e,n,i,a){let s=-1;for(;++s<i.unsafe.length;)if(i.unsafe[s].character===`
76
+ `&&Q3(i.stack,i.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
77
+ `}function Y3(e,n){const i=String(e);let a=i.indexOf(n),s=a,u=0,c=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++u>c&&(c=u):u=1,s=a+n.length,a=i.indexOf(n,s);return c}function X3(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function K3(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function J3(e,n,i,a){const s=K3(i),u=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(X3(e,i)){const y=i.enter("codeIndented"),x=i.indentLines(u,W3);return y(),x}const f=i.createTracker(a),p=s.repeat(Math.max(Y3(u,s)+1,3)),h=i.enter("codeFenced");let g=f.move(p);if(e.lang){const y=i.enter(`codeFencedLang${c}`);g+=f.move(i.safe(e.lang,{before:g,after:" ",encode:["`"],...f.current()})),y()}if(e.lang&&e.meta){const y=i.enter(`codeFencedMeta${c}`);g+=f.move(" "),g+=f.move(i.safe(e.meta,{before:g,after:`
78
+ `,encode:["`"],...f.current()})),y()}return g+=f.move(`
79
+ `),u&&(g+=f.move(u+`
80
+ `)),g+=f.move(p),h(),g}function W3(e,n,i){return(i?"":" ")+e}function xp(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function eM(e,n,i,a){const s=xp(i),u=s==='"'?"Quote":"Apostrophe",c=i.enter("definition");let f=i.enter("label");const p=i.createTracker(a);let h=p.move("[");return h+=p.move(i.safe(i.associationId(e),{before:h,after:"]",...p.current()})),h+=p.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(i.safe(e.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(f=i.enter("destinationRaw"),h+=p.move(i.safe(e.url,{before:h,after:e.title?" ":`
81
+ `,...p.current()}))),f(),e.title&&(f=i.enter(`title${u}`),h+=p.move(" "+s),h+=p.move(i.safe(e.title,{before:h,after:s,...p.current()})),h+=p.move(s),f()),c(),h}function tM(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function ql(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Fo(e,n,i){const a=Ea(e),s=Ea(n);return a===void 0?s===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}vw.peek=nM;function vw(e,n,i,a){const s=tM(i),u=i.enter("emphasis"),c=i.createTracker(a),f=c.move(s);let p=c.move(i.containerPhrasing(e,{after:s,before:f,...c.current()}));const h=p.charCodeAt(0),g=Fo(a.before.charCodeAt(a.before.length-1),h,s);g.inside&&(p=ql(h)+p.slice(1));const y=p.charCodeAt(p.length-1),x=Fo(a.after.charCodeAt(0),y,s);x.inside&&(p=p.slice(0,-1)+ql(y));const b=c.move(s);return u(),i.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},f+p+b}function nM(e,n,i){return i.options.emphasis||"*"}function rM(e,n){let i=!1;return yp(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return i=!0,wh}),!!((!e.depth||e.depth<3)&&cp(e)&&(n.options.setext||i))}function iM(e,n,i,a){const s=Math.max(Math.min(6,e.depth||1),1),u=i.createTracker(a);if(rM(e,i)){const g=i.enter("headingSetext"),y=i.enter("phrasing"),x=i.containerPhrasing(e,{...u.current(),before:`
82
+ `,after:`
83
+ `});return y(),g(),x+`
84
+ `+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
85
+ `))+1))}const c="#".repeat(s),f=i.enter("headingAtx"),p=i.enter("phrasing");u.move(c+" ");let h=i.containerPhrasing(e,{before:"# ",after:`
86
+ `,...u.current()});return/^[\t ]/.test(h)&&(h=ql(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,i.options.closeAtx&&(h+=" "+c),p(),f(),h}xw.peek=aM;function xw(e){return e.value||""}function aM(){return"<"}bw.peek=lM;function bw(e,n,i,a){const s=xp(i),u=s==='"'?"Quote":"Apostrophe",c=i.enter("image");let f=i.enter("label");const p=i.createTracker(a);let h=p.move("![");return h+=p.move(i.safe(e.alt,{before:h,after:"]",...p.current()})),h+=p.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=i.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(i.safe(e.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(f=i.enter("destinationRaw"),h+=p.move(i.safe(e.url,{before:h,after:e.title?" ":")",...p.current()}))),f(),e.title&&(f=i.enter(`title${u}`),h+=p.move(" "+s),h+=p.move(i.safe(e.title,{before:h,after:s,...p.current()})),h+=p.move(s),f()),h+=p.move(")"),c(),h}function lM(){return"!"}Sw.peek=sM;function Sw(e,n,i,a){const s=e.referenceType,u=i.enter("imageReference");let c=i.enter("label");const f=i.createTracker(a);let p=f.move("![");const h=i.safe(e.alt,{before:p,after:"]",...f.current()});p+=f.move(h+"]["),c();const g=i.stack;i.stack=[],c=i.enter("reference");const y=i.safe(i.associationId(e),{before:p,after:"]",...f.current()});return c(),i.stack=g,u(),s==="full"||!h||h!==y?p+=f.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function sM(){return"!"}ww.peek=oM;function ww(e,n,i){let a=e.value||"",s="`",u=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++u<i.unsafe.length;){const c=i.unsafe[u],f=i.compilePattern(c);let p;if(c.atBreak)for(;p=f.exec(a);){let h=p.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(p.index+1)}}return s+a+s}function oM(){return"`"}function Ew(e,n){const i=cp(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(i===e.url||"mailto:"+i===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}kw.peek=uM;function kw(e,n,i,a){const s=xp(i),u=s==='"'?"Quote":"Apostrophe",c=i.createTracker(a);let f,p;if(Ew(e,i)){const g=i.stack;i.stack=[],f=i.enter("autolink");let y=c.move("<");return y+=c.move(i.containerPhrasing(e,{before:y,after:">",...c.current()})),y+=c.move(">"),f(),i.stack=g,y}f=i.enter("link"),p=i.enter("label");let h=c.move("[");return h+=c.move(i.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),p(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(p=i.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(i.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(p=i.enter("destinationRaw"),h+=c.move(i.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),p(),e.title&&(p=i.enter(`title${u}`),h+=c.move(" "+s),h+=c.move(i.safe(e.title,{before:h,after:s,...c.current()})),h+=c.move(s),p()),h+=c.move(")"),f(),h}function uM(e,n,i){return Ew(e,i)?"<":"["}_w.peek=cM;function _w(e,n,i,a){const s=e.referenceType,u=i.enter("linkReference");let c=i.enter("label");const f=i.createTracker(a);let p=f.move("[");const h=i.containerPhrasing(e,{before:p,after:"]",...f.current()});p+=f.move(h+"]["),c();const g=i.stack;i.stack=[],c=i.enter("reference");const y=i.safe(i.associationId(e),{before:p,after:"]",...f.current()});return c(),i.stack=g,u(),s==="full"||!h||h!==y?p+=f.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=f.move("]"),p}function cM(){return"["}function bp(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function fM(e){const n=bp(e),i=e.options.bulletOther;if(!i)return n==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+i+"`) to be different");return i}function dM(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Nw(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function hM(e,n,i,a){const s=i.enter("list"),u=i.bulletCurrent;let c=e.ordered?dM(i):bp(i);const f=e.ordered?c==="."?")":".":fM(i);let p=n&&i.bulletLastUsed?c===i.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(p=!0),Nw(i)===c&&g){let y=-1;for(;++y<e.children.length;){const x=e.children[y];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=f),i.bulletCurrent=c;const h=i.containerFlow(e,a);return i.bulletLastUsed=c,i.bulletCurrent=u,s(),h}function pM(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function mM(e,n,i,a){const s=pM(i);let u=i.bulletCurrent||bp(i);n&&n.type==="list"&&n.ordered&&(u=(typeof n.start=="number"&&n.start>-1?n.start:1)+(i.options.incrementListMarker===!1?0:n.children.indexOf(e))+u);let c=u.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=i.createTracker(a);f.move(u+" ".repeat(c-u.length)),f.shift(c);const p=i.enter("listItem"),h=i.indentLines(i.containerFlow(e,f.current()),g);return p(),h;function g(y,x,b){return x?(b?"":" ".repeat(c))+y:(b?u:u+" ".repeat(c-u.length))+y}}function gM(e,n,i,a){const s=i.enter("paragraph"),u=i.enter("phrasing"),c=i.containerPhrasing(e,a);return u(),s(),c}const yM=ou(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vM(e,n,i,a){return(e.children.some(function(c){return yM(c)})?i.containerPhrasing:i.containerFlow).call(i,e,a)}function xM(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}jw.peek=bM;function jw(e,n,i,a){const s=xM(i),u=i.enter("strong"),c=i.createTracker(a),f=c.move(s+s);let p=c.move(i.containerPhrasing(e,{after:s,before:f,...c.current()}));const h=p.charCodeAt(0),g=Fo(a.before.charCodeAt(a.before.length-1),h,s);g.inside&&(p=ql(h)+p.slice(1));const y=p.charCodeAt(p.length-1),x=Fo(a.after.charCodeAt(0),y,s);x.inside&&(p=p.slice(0,-1)+ql(y));const b=c.move(s+s);return u(),i.attentionEncodeSurroundingInfo={after:x.outside,before:g.outside},f+p+b}function bM(e,n,i){return i.options.strong||"*"}function SM(e,n,i,a){return i.safe(e.value,a)}function wM(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function EM(e,n,i){const a=(Nw(i)+(i.options.ruleSpaces?" ":"")).repeat(wM(i));return i.options.ruleSpaces?a.slice(0,-1):a}const Cw={blockquote:V3,break:Bx,code:J3,definition:eM,emphasis:vw,hardBreak:Bx,heading:iM,html:xw,image:bw,imageReference:Sw,inlineCode:ww,link:kw,linkReference:_w,list:hM,listItem:mM,paragraph:gM,root:vM,strong:jw,text:SM,thematicBreak:EM};function kM(){return{enter:{table:_M,tableData:Px,tableHeader:Px,tableRow:jM},exit:{codeText:CM,table:NM,tableData:Fd,tableHeader:Fd,tableRow:Fd}}}function _M(e){const n=e._align;this.enter({type:"table",align:n.map(function(i){return i==="none"?null:i}),children:[]},e),this.data.inTable=!0}function NM(e){this.exit(e),this.data.inTable=void 0}function jM(e){this.enter({type:"tableRow",children:[]},e)}function Fd(e){this.exit(e)}function Px(e){this.enter({type:"tableCell",children:[]},e)}function CM(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,TM));const i=this.stack[this.stack.length-1];i.type,i.value=n,this.exit(e)}function TM(e,n){return n==="|"?n:e}function RM(e){const n=e||{},i=n.tableCellPadding,a=n.tablePipeAlign,s=n.stringLength,u=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
87
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:p,tableRow:f}};function c(b,w,k,j){return h(g(b,k,j),b.align)}function f(b,w,k,j){const _=y(b,k,j),R=h([_]);return R.slice(0,R.indexOf(`
88
+ `))}function p(b,w,k,j){const _=k.enter("tableCell"),R=k.enter("phrasing"),T=k.containerPhrasing(b,{...j,before:u,after:u});return R(),_(),T}function h(b,w){return H3(b,{align:w,alignDelimiters:a,padding:i,stringLength:s})}function g(b,w,k){const j=b.children;let _=-1;const R=[],T=w.enter("table");for(;++_<j.length;)R[_]=y(j[_],w,k);return T(),R}function y(b,w,k){const j=b.children;let _=-1;const R=[],T=w.enter("tableRow");for(;++_<j.length;)R[_]=p(j[_],b,w,k);return T(),R}function x(b,w,k){let j=Cw.inlineCode(b,w,k);return k.stack.includes("tableCell")&&(j=j.replace(/\|/g,"\\$&")),j}}function AM(){return{exit:{taskListCheckValueChecked:Zx,taskListCheckValueUnchecked:Zx,paragraph:zM}}}function OM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:DM}}}function Zx(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function zM(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const a=i.children[0];if(a&&a.type==="text"){const s=n.children;let u=-1,c;for(;++u<s.length;){const f=s[u];if(f.type==="paragraph"){c=f;break}}c===i&&(a.value=a.value.slice(1),a.value.length===0?i.children.shift():i.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,i.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function DM(e,n,i,a){const s=e.children[0],u=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=i.createTracker(a);u&&f.move(c);let p=Cw.listItem(e,n,i,{...a,...f.current()});return u&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),p;function h(g){return g+c}}function MM(){return[h3(),D3(),$3(),kM(),AM()]}function LM(e){return{extensions:[p3(),M3(e),I3(),RM(e),OM()]}}const UM={tokenize:ZM,partial:!0},Tw={tokenize:HM,partial:!0},Rw={tokenize:FM,partial:!0},Aw={tokenize:VM,partial:!0},$M={tokenize:GM,partial:!0},Ow={name:"wwwAutolink",tokenize:BM,previous:Dw},zw={name:"protocolAutolink",tokenize:PM,previous:Mw},gr={name:"emailAutolink",tokenize:qM,previous:Lw},Bn={};function IM(){return{text:Bn}}let di=48;for(;di<123;)Bn[di]=gr,di++,di===58?di=65:di===91&&(di=97);Bn[43]=gr;Bn[45]=gr;Bn[46]=gr;Bn[95]=gr;Bn[72]=[gr,zw];Bn[104]=[gr,zw];Bn[87]=[gr,Ow];Bn[119]=[gr,Ow];function qM(e,n,i){const a=this;let s,u;return c;function c(y){return!Nh(y)||!Lw.call(a,a.previous)||Sp(a.events)?i(y):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(y))}function f(y){return Nh(y)?(e.consume(y),f):y===64?(e.consume(y),p):i(y)}function p(y){return y===46?e.check($M,g,h)(y):y===45||y===95||Tt(y)?(u=!0,e.consume(y),p):g(y)}function h(y){return e.consume(y),s=!0,p}function g(y){return u&&s&&Lt(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(y)):i(y)}}function BM(e,n,i){const a=this;return s;function s(c){return c!==87&&c!==119||!Dw.call(a,a.previous)||Sp(a.events)?i(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(UM,e.attempt(Tw,e.attempt(Rw,u),i),i)(c))}function u(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function PM(e,n,i){const a=this;let s="",u=!1;return c;function c(y){return(y===72||y===104)&&Mw.call(a,a.previous)&&!Sp(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),e.consume(y),f):i(y)}function f(y){if(Lt(y)&&s.length<5)return s+=String.fromCodePoint(y),e.consume(y),f;if(y===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(y),p}return i(y)}function p(y){return y===47?(e.consume(y),u?h:(u=!0,p)):i(y)}function h(y){return y===null||Po(y)||Ge(y)||xi(y)||au(y)?i(y):e.attempt(Tw,e.attempt(Rw,g),i)(y)}function g(y){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(y)}}function ZM(e,n,i){let a=0;return s;function s(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),s):c===46&&a===3?(e.consume(c),u):i(c)}function u(c){return c===null?i(c):n(c)}}function HM(e,n,i){let a,s,u;return c;function c(h){return h===46||h===95?e.check(Aw,p,f)(h):h===null||Ge(h)||xi(h)||h!==45&&au(h)?p(h):(u=!0,e.consume(h),c)}function f(h){return h===95?a=!0:(s=a,a=void 0),e.consume(h),c}function p(h){return s||a||!u?i(h):n(h)}}function FM(e,n){let i=0,a=0;return s;function s(c){return c===40?(i++,e.consume(c),s):c===41&&a<i?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(Aw,n,u)(c):c===null||Ge(c)||xi(c)?n(c):(e.consume(c),s)}function u(c){return c===41&&a++,e.consume(c),s}}function VM(e,n,i){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),u):f===93?(e.consume(f),s):f===60||f===null||Ge(f)||xi(f)?n(f):i(f)}function s(f){return f===null||f===40||f===91||Ge(f)||xi(f)?n(f):a(f)}function u(f){return Lt(f)?c(f):i(f)}function c(f){return f===59?(e.consume(f),a):Lt(f)?(e.consume(f),c):i(f)}}function GM(e,n,i){return a;function a(u){return e.consume(u),s}function s(u){return Tt(u)?i(u):n(u)}}function Dw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ge(e)}function Mw(e){return!Lt(e)}function Lw(e){return!(e===47||Nh(e))}function Nh(e){return e===43||e===45||e===46||e===95||Tt(e)}function Sp(e){let n=e.length,i=!1;for(;n--;){const a=e[n][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){i=!0;break}if(a._gfmAutolinkLiteralWalkedInto){i=!1;break}}return e.length>0&&!i&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const QM={tokenize:n5,partial:!0};function YM(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:WM,continuation:{tokenize:e5},exit:t5}},text:{91:{name:"gfmFootnoteCall",tokenize:JM},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:XM,resolveTo:KM}}}}function XM(e,n,i){const a=this;let s=a.events.length;const u=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const p=a.events[s][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return f;function f(p){if(!c||!c._balanced)return i(p);const h=Cn(a.sliceSerialize({start:c.end,end:a.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?i(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),n(p))}}function KM(e,n){let i=e.length;for(;i--;)if(e[i][1].type==="labelImage"&&e[i][0]==="enter"){e[i][1];break}e[i+1][1].type="data",e[i+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[i+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[i+3][1].end),end:Object.assign({},e[i+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[i+1],e[i+2],["enter",a,n],e[i+3],e[i+4],["enter",s,n],["exit",s,n],["enter",u,n],["enter",c,n],["exit",c,n],["exit",u,n],e[e.length-2],e[e.length-1],["exit",a,n]];return e.splice(i,e.length-i+1,...f),e}function JM(e,n,i){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u=0,c;return f;function f(y){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?i(y):(e.enter("gfmFootnoteCallMarker"),e.consume(y),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(y){if(u>999||y===93&&!c||y===null||y===91||Ge(y))return i(y);if(y===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(Cn(a.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(y),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):i(y)}return Ge(y)||(c=!0),u++,e.consume(y),y===92?g:h}function g(y){return y===91||y===92||y===93?(e.consume(y),u++,h):h(y)}}function WM(e,n,i){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u,c=0,f;return p;function p(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):i(w)}function g(w){if(c>999||w===93&&!f||w===null||w===91||Ge(w))return i(w);if(w===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return u=Cn(a.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return Ge(w)||(f=!0),c++,e.consume(w),w===92?y:g}function y(w){return w===91||w===92||w===93?(e.consume(w),c++,g):g(w)}function x(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),s.includes(u)||s.push(u),ze(e,b,"gfmFootnoteDefinitionWhitespace")):i(w)}function b(w){return n(w)}}function e5(e,n,i){return e.check(Kl,n,e.attempt(QM,n,i))}function t5(e){e.exit("gfmFootnoteDefinition")}function n5(e,n,i){const a=this;return ze(e,s,"gfmFootnoteDefinitionIndent",5);function s(u){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(u):i(u)}}function r5(e){let i=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:u,resolveAll:s};return i==null&&(i=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,f){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let h=p;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[p][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[p][1].end)},y={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[p][1].start)},x=[["enter",g,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",y,f]],b=f.parser.constructs.insideSpan.null;b&&ln(x,x.length,0,lu(b,c.slice(h+1,p),f)),ln(x,x.length,0,[["exit",y,f],["enter",c[p][1],f],["exit",c[p][1],f],["exit",g,f]]),ln(c,h-1,p-h+3,x),p=h+x.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function u(c,f,p){const h=this.previous,g=this.events;let y=0;return x;function x(w){return h===126&&g[g.length-1][1].type!=="characterEscape"?p(w):(c.enter("strikethroughSequenceTemporary"),b(w))}function b(w){const k=Ea(h);if(w===126)return y>1?p(w):(c.consume(w),y++,b);if(y<2&&!i)return p(w);const j=c.exit("strikethroughSequenceTemporary"),_=Ea(w);return j._open=!_||_===2&&!!k,j._close=!k||k===2&&!!_,f(w)}}}class i5{constructor(){this.map=[]}add(n,i,a){a5(this,n,i,a)}consume(n){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const a=[];for(;i>0;)i-=1,a.push(n.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),n.length=this.map[i][0];a.push(n.slice()),n.length=0;let s=a.pop();for(;s;){for(const u of s)n.push(u);s=a.pop()}this.map.length=0}}function a5(e,n,i,a){let s=0;if(!(i===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===n){e.map[s][1]+=i,e.map[s][2].push(...a);return}s+=1}e.map.push([n,i,a])}}function l5(e,n){let i=!1;const a=[];for(;n<e.length;){const s=e[n];if(i){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const u=a.length-1;a[u]=a[u]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(i=!0);n+=1}return a}function s5(){return{flow:{null:{name:"table",tokenize:o5,resolveAll:u5}}}}function o5(e,n,i){const a=this;let s=0,u=0,c;return f;function f(H){let se=a.events.length-1;for(;se>-1;){const I=a.events[se][1].type;if(I==="lineEnding"||I==="linePrefix")se--;else break}const ue=se>-1?a.events[se][1].type:null,xe=ue==="tableHead"||ue==="tableRow"?L:p;return xe===L&&a.parser.lazy[a.now().line]?i(H):xe(H)}function p(H){return e.enter("tableHead"),e.enter("tableRow"),h(H)}function h(H){return H===124||(c=!0,u+=1),g(H)}function g(H){return H===null?i(H):ge(H)?u>1?(u=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),b):i(H):Ce(H)?ze(e,g,"whitespace")(H):(u+=1,c&&(c=!1,s+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),c=!0,g):(e.enter("data"),y(H)))}function y(H){return H===null||H===124||Ge(H)?(e.exit("data"),g(H)):(e.consume(H),H===92?x:y)}function x(H){return H===92||H===124?(e.consume(H),y):y(H)}function b(H){return a.interrupt=!1,a.parser.lazy[a.now().line]?i(H):(e.enter("tableDelimiterRow"),c=!1,Ce(H)?ze(e,w,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):w(H))}function w(H){return H===45||H===58?j(H):H===124?(c=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),k):X(H)}function k(H){return Ce(H)?ze(e,j,"whitespace")(H):j(H)}function j(H){return H===58?(u+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),_):H===45?(u+=1,_(H)):H===null||ge(H)?V(H):X(H)}function _(H){return H===45?(e.enter("tableDelimiterFiller"),R(H)):X(H)}function R(H){return H===45?(e.consume(H),R):H===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(H))}function T(H){return Ce(H)?ze(e,V,"whitespace")(H):V(H)}function V(H){return H===124?w(H):H===null||ge(H)?!c||s!==u?X(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(H)):X(H)}function X(H){return i(H)}function L(H){return e.enter("tableRow"),Z(H)}function Z(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),Z):H===null||ge(H)?(e.exit("tableRow"),n(H)):Ce(H)?ze(e,Z,"whitespace")(H):(e.enter("data"),Y(H))}function Y(H){return H===null||H===124||Ge(H)?(e.exit("data"),Z(H)):(e.consume(H),H===92?ie:Y)}function ie(H){return H===92||H===124?(e.consume(H),Y):Y(H)}}function u5(e,n){let i=-1,a=!0,s=0,u=[0,0,0,0],c=[0,0,0,0],f=!1,p=0,h,g,y;const x=new i5;for(;++i<e.length;){const b=e[i],w=b[1];b[0]==="enter"?w.type==="tableHead"?(f=!1,p!==0&&(Hx(x,n,p,h,g),g=void 0,p=0),h={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(i,0,[["enter",h,n]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(a=!0,y=void 0,u=[0,0,0,0],c=[0,i+1,0,0],f&&(f=!1,g={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},x.add(i,0,[["enter",g,n]])),s=w.type==="tableDelimiterRow"?2:g?3:1):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],y=jo(x,n,u,s,void 0,y),u=[0,0,0,0]),c[2]=i)):w.type==="tableCellDivider"&&(a?a=!1:(u[1]!==0&&(c[0]=c[1],y=jo(x,n,u,s,void 0,y)),u=c,c=[u[1],i,0,0])):w.type==="tableHead"?(f=!0,p=i):w.type==="tableRow"||w.type==="tableDelimiterRow"?(p=i,u[1]!==0?(c[0]=c[1],y=jo(x,n,u,s,i,y)):c[1]!==0&&(y=jo(x,n,c,s,i,y)),s=0):s&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(c[3]=i)}for(p!==0&&Hx(x,n,p,h,g),x.consume(n.events),i=-1;++i<n.events.length;){const b=n.events[i];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=l5(n.events,i))}return e}function jo(e,n,i,a,s,u){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";i[0]!==0&&(u.end=Object.assign({},pa(n.events,i[0])),e.add(i[0],0,[["exit",u,n]]));const p=pa(n.events,i[1]);if(u={type:c,start:Object.assign({},p),end:Object.assign({},p)},e.add(i[1],0,[["enter",u,n]]),i[2]!==0){const h=pa(n.events,i[2]),g=pa(n.events,i[3]),y={type:f,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(i[2],0,[["enter",y,n]]),a!==2){const x=n.events[i[2]],b=n.events[i[3]];if(x[1].end=Object.assign({},b[1].end),x[1].type="chunkText",x[1].contentType="text",i[3]>i[2]+1){const w=i[2]+1,k=i[3]-i[2]-1;e.add(w,k,[])}}e.add(i[3]+1,0,[["exit",y,n]])}return s!==void 0&&(u.end=Object.assign({},pa(n.events,s)),e.add(s,0,[["exit",u,n]]),u=void 0),u}function Hx(e,n,i,a,s){const u=[],c=pa(n.events,i);s&&(s.end=Object.assign({},c),u.push(["exit",s,n])),a.end=Object.assign({},c),u.push(["exit",a,n]),e.add(i+1,0,u)}function pa(e,n){const i=e[n],a=i[0]==="enter"?"start":"end";return i[1][a]}const c5={name:"tasklistCheck",tokenize:d5};function f5(){return{text:{91:c5}}}function d5(e,n,i){const a=this;return s;function s(p){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?i(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),u)}function u(p){return Ge(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),c):i(p)}function c(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):i(p)}function f(p){return ge(p)?n(p):Ce(p)?e.check({tokenize:h5},n,i)(p):i(p)}}function h5(e,n,i){return ze(e,a,"whitespace");function a(s){return s===null?i(s):n(s)}}function p5(e){return GS([IM(),YM(),r5(e),s5(),f5()])}const m5={};function Fx(e){const n=this,i=e||m5,a=n.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),u=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(p5(i)),u.push(MM()),c.push(LM(i))}const g5="composer_proxy_admin_token";function y5(){return typeof window<"u"?localStorage.getItem(g5):null}function v5({distUrl:e,version:n}){const[i,a]=O.useState(!1),[s,u]=O.useState(null),c=async f=>{f.stopPropagation(),a(!0),u(null);try{const p=y5(),h={};p&&(h.Authorization=`Bearer ${p}`);const g=await fetch(e,{headers:h});if(!g.ok)throw new Error(`Download failed: ${g.status} ${g.statusText}`);const y=await g.blob(),x=window.URL.createObjectURL(y),b=document.createElement("a");b.href=x,b.download=e.split("/").pop()||"package.zip",document.body.appendChild(b),b.click(),document.body.removeChild(b),window.URL.revokeObjectURL(x)}catch(p){u(p instanceof Error?p.message:"Download failed")}finally{a(!1)}};return s?v.jsxs("div",{className:"flex flex-col items-end gap-1",children:[v.jsx("button",{onClick:c,className:"text-red-400 hover:text-red-300 text-sm",children:"Retry"}),v.jsx("span",{className:"text-xs text-red-500",children:s})]}):v.jsx("button",{onClick:c,disabled:i,className:"btn-primary text-sm disabled:opacity-50 disabled:cursor-not-allowed",children:i?"Downloading...":`Download ${n}`})}function x5({text:e,label:n}){const[i,a]=O.useState(!1),s=async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch(u){console.error("Failed to copy:",u)}};return v.jsx("button",{onClick:s,className:"px-3 py-1.5 bg-slate-800 hover:bg-slate-700 border border-slate-700 rounded-lg text-sm text-slate-300 hover:text-slate-100 transition-colors flex items-center gap-2",title:i?"Copied!":`Copy ${n||"command"}`,children:i?v.jsxs(v.Fragment,{children:[v.jsx("span",{children:"✓"}),v.jsx("span",{children:"Copied!"})]}):v.jsxs(v.Fragment,{children:[v.jsx("span",{children:"📋"}),v.jsx("span",{children:"Copy"})]})})}function b5(){const{vendor:e,package:n}=ab(),i=qn(),a=Hl(),s=Tn(),u=e&&n?`${e}/${n}`:null,c=()=>{const I=i.hash;return I.startsWith("#version--")?I.replace("#version--",""):null},[f,p]=O.useState(c()),[h,g]=O.useState(!1),[y,x]=O.useState(!1),[b,w]=O.useState(null);O.useEffect(()=>{const I=c();I!==f&&p(I)},[i.hash]);const k=I=>{p(I),window.location.hash=`version--${I}`},{data:j,isLoading:_}=an({queryKey:["package",u],queryFn:()=>wj(u),enabled:!!u}),R=O.useMemo(()=>j?.versions?[...j.versions].sort((I,U)=>{const D=/^\d+$/.test(I.version),B=/^\d+$/.test(U.version);if(D&&B){const q=parseInt(I.version,10);return parseInt(U.version,10)-q}if(D&&!B&&Un.valid(U.version))return 1;if(!D&&B&&Un.valid(I.version))return-1;const te=Un.valid(I.version),re=Un.valid(U.version);if(te&&re)return Un.rcompare(I.version,U.version);if(te&&!re)return-1;if(!te&&re)return 1;const C=I.version.match(/^(\d+)/),A=U.version.match(/^(\d+)/);if(C&&A){const q=parseInt(C[1],10),N=parseInt(A[1],10);if(q!==N)return N-q}return U.version.localeCompare(I.version,void 0,{numeric:!0,sensitivity:"base"})}):[],[j]),T=O.useMemo(()=>R.length?f&&R.find(I=>I.version===f)||R[0]:null,[R,f]),{data:V,isLoading:X}=an({queryKey:["readme",u,T?.version],queryFn:()=>kj(u,T.version),enabled:!!u&&!!T}),L=O.useMemo(()=>!R.length||!T?!1:T.version===R[0].version,[R,T]),{data:Z,isLoading:Y}=an({queryKey:["changelog",u,T?.version],queryFn:()=>_j(u,T.version),enabled:!!u&&!!T&&L}),{data:ie,isLoading:H}=an({queryKey:["stats",u,T?.version],queryFn:()=>Nj(u,T.version),enabled:!!u&&!!T}),se=wn({mutationFn:({name:I,version:U})=>jb(I,U),onSuccess:(I,{version:U})=>{if(s.invalidateQueries({queryKey:["package",u]}),s.invalidateQueries({queryKey:["packages"]}),w(null),T?.version===U){const D=R.filter(B=>B.version!==U);D.length>0?k(D[0].version):a("/packages")}}}),ue=I=>{if(!I)return[];try{const U=JSON.parse(I);return Array.isArray(U)?U:[U]}catch{return[I]}};if(_)return v.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:v.jsx("div",{className:"w-8 h-8 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin"})});if(!u)return v.jsxs("div",{className:"card p-8 text-center",children:[v.jsx("p",{className:"text-slate-400",children:"Invalid package name"}),v.jsx(Sa,{to:"/packages",className:"text-primary-400 hover:text-primary-300 mt-4 inline-block",children:"← Back to packages"})]});if(!j||!T)return v.jsxs("div",{className:"card p-8 text-center",children:[v.jsxs("p",{className:"text-slate-400",children:["Package not found: ",u]}),v.jsx(Sa,{to:"/packages",className:"text-primary-400 hover:text-primary-300 mt-4 inline-block",children:"← Back to packages"})]});const xe=ue(T.license);return v.jsxs("div",{className:"space-y-6",children:[v.jsx("div",{className:"card p-6",children:v.jsx("div",{className:"flex items-start justify-between gap-4",children:v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-3 mb-2 flex-wrap",children:[v.jsx("h1",{className:"font-display text-3xl font-bold text-slate-100",children:j.name}),v.jsx("select",{value:f||T.version,onChange:I=>k(I.target.value),className:"px-3 py-1.5 bg-slate-800 border border-slate-700 rounded-lg text-slate-100 focus:outline-none focus:ring-2 focus:ring-primary-500 text-sm",children:R.map(I=>v.jsxs("option",{value:I.version,children:[I.version,I.is_manual_upload?" (manual)":""]},I.version))}),T.is_manual_upload===1&&v.jsx("span",{className:"px-2.5 py-1 text-xs font-medium bg-blue-600/20 text-blue-400 border border-blue-500/30 rounded-full",children:"📤 Manual Upload"})]}),T.description&&v.jsx("p",{className:"text-slate-300 text-lg",children:T.description})]})})}),v.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[v.jsxs("div",{className:"lg:col-span-2",children:[v.jsxs("div",{className:"card p-6",children:[v.jsx("h2",{className:"text-xl font-bold text-slate-100 mb-4",children:"README.md"}),X?v.jsx("div",{className:"flex items-center justify-center py-12",children:v.jsx("div",{className:"w-6 h-6 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin"})}):V?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:`prose prose-invert max-w-none ${h?"":"max-h-[300px] overflow-hidden relative"}`,children:[!h&&v.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-20 bg-gradient-to-t from-slate-900 to-transparent pointer-events-none"}),v.jsx("div",{className:"markdown-content",children:v.jsx(Ux,{remarkPlugins:[Fx],components:{a:({node:I,...U})=>v.jsx("a",{...U,className:"text-primary-400 hover:text-primary-300",target:"_blank",rel:"noopener noreferrer"}),code:({node:I,className:U,children:D,...B})=>!U?v.jsx("code",{className:"px-1.5 py-0.5 bg-slate-800 rounded text-sm text-primary-300",...B,children:D}):v.jsx("code",{className:"block p-4 bg-slate-900 rounded-lg overflow-x-auto text-sm",...B,children:D})},children:V})})]}),!h&&v.jsx("button",{onClick:()=>g(!0),className:"mt-4 text-primary-400 hover:text-primary-300 text-sm font-medium transition-colors",children:"Expand full README →"}),h&&v.jsx("button",{onClick:()=>g(!1),className:"mt-4 text-primary-400 hover:text-primary-300 text-sm font-medium transition-colors",children:"Collapse README ↑"})]}):v.jsxs("div",{className:"text-center py-12 text-slate-500",children:[v.jsx("p",{className:"mb-2",children:"📄 No README available for this version"}),v.jsx("p",{className:"text-sm text-slate-600",children:"No README file exists in this package version"})]})]}),L&&v.jsxs("div",{className:"card p-6 mt-6",children:[v.jsx("h2",{className:"text-xl font-bold text-slate-100 mb-4",children:"CHANGELOG"}),Y?v.jsx("div",{className:"flex items-center justify-center py-12",children:v.jsx("div",{className:"w-6 h-6 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin"})}):Z?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:`prose prose-invert max-w-none ${y?"":"max-h-[300px] overflow-hidden relative"}`,children:[!y&&v.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-20 bg-gradient-to-t from-slate-900 to-transparent pointer-events-none"}),v.jsx("div",{className:"markdown-content",children:v.jsx(Ux,{remarkPlugins:[Fx],components:{a:({node:I,...U})=>v.jsx("a",{...U,className:"text-primary-400 hover:text-primary-300",target:"_blank",rel:"noopener noreferrer"}),code:({node:I,className:U,children:D,...B})=>!U?v.jsx("code",{className:"px-1.5 py-0.5 bg-slate-800 rounded text-sm text-primary-300",...B,children:D}):v.jsx("code",{className:"block p-4 bg-slate-900 rounded-lg overflow-x-auto text-sm",...B,children:D})},children:Z})})]}),!y&&v.jsx("button",{onClick:()=>x(!0),className:"mt-4 text-primary-400 hover:text-primary-300 text-sm font-medium transition-colors",children:"Expand full CHANGELOG →"}),y&&v.jsx("button",{onClick:()=>x(!1),className:"mt-4 text-primary-400 hover:text-primary-300 text-sm font-medium transition-colors",children:"Collapse CHANGELOG ↑"})]}):v.jsxs("div",{className:"text-center py-12 text-slate-500",children:[v.jsx("p",{className:"mb-2",children:"📝 No CHANGELOG available"}),v.jsx("p",{className:"text-sm text-slate-600",children:"No CHANGELOG file exists in this package version"})]})]})]}),v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"card p-6",children:[v.jsx("h3",{className:"text-lg font-semibold text-slate-100 mb-4",children:"Get Package"}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{children:[v.jsx("label",{className:"block text-sm text-slate-400 mb-2",children:"Install via Composer"}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs("code",{className:"flex-1 min-w-0 px-3 py-2 bg-slate-900 border border-slate-700 rounded-lg text-sm text-primary-300 font-mono break-all",children:["composer require ",j.name,":",T.version]}),v.jsx(x5,{text:`composer require ${j.name}:${T.version}`})]})]}),v.jsx("div",{className:"pt-2 border-t border-slate-700",children:v.jsx(v5,{distUrl:T.dist_url,version:T.version})})]})]}),v.jsxs("div",{className:"card p-6",children:[v.jsx("h3",{className:"text-lg font-semibold text-slate-100 mb-4",children:"About Package"}),v.jsxs("div",{className:"space-y-4",children:[T.package_type&&v.jsxs("div",{children:[v.jsx("span",{className:"text-sm text-slate-400 block mb-1",children:"Type"}),v.jsx("span",{className:"px-3 py-1 text-sm bg-slate-700 text-slate-200 rounded-lg inline-block",children:T.package_type})]}),xe.length>0&&v.jsxs("div",{children:[v.jsx("span",{className:"text-sm text-slate-400 block mb-1",children:"License"}),v.jsx("span",{className:"px-3 py-1 text-sm bg-slate-700 text-slate-200 rounded-lg inline-block",children:xe.join(", ")})]}),T.homepage&&v.jsxs("div",{children:[v.jsx("span",{className:"text-sm text-slate-400 block mb-1",children:"Homepage"}),v.jsxs("a",{href:T.homepage,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-primary-400 hover:text-primary-300 transition-colors text-sm min-w-0",children:[v.jsx("span",{className:"flex-shrink-0",children:"🌐"}),v.jsx("span",{className:"truncate block min-w-0",children:T.homepage}),v.jsx("span",{className:"text-slate-500 flex-shrink-0",children:"→"})]})]}),v.jsxs("div",{className:"pt-2 border-t border-slate-700 space-y-2",children:[v.jsx("span",{className:"text-sm text-slate-400 block mb-1",children:"Statistics"}),H?v.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500",children:[v.jsx("div",{className:"w-4 h-4 border-2 border-slate-600 border-t-primary-500 rounded-full animate-spin"}),v.jsx("span",{children:"Loading stats..."})]}):ie?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"text-sm",children:[v.jsx("span",{className:"text-slate-400",children:"Downloads: "}),v.jsx("span",{className:"text-slate-200 font-medium",children:ie.downloads.toLocaleString()})]}),ie.lastDownloadedAt?v.jsxs("div",{className:"text-sm",children:[v.jsx("span",{className:"text-slate-400",children:"Last downloaded: "}),v.jsx("span",{className:"text-slate-200",children:new Date(ie.lastDownloadedAt*1e3).toLocaleDateString()})]}):v.jsx("div",{className:"text-sm text-slate-500",children:"Never downloaded"})]}):v.jsx("div",{className:"text-sm text-slate-500",children:"No download statistics available"})]})]})]}),v.jsxs("div",{className:"card p-6",children:[v.jsxs("h3",{className:"text-lg font-semibold text-slate-100 mb-4",children:["Versions (",R.length,")"]}),v.jsx("div",{className:"space-y-2 max-h-96 overflow-y-auto",children:R.map(I=>v.jsx("div",{className:`px-3 py-2 rounded-lg transition-colors ${(f||T.version)===I.version?"bg-primary-500/20":"bg-slate-800/50 hover:bg-slate-800"}`,children:v.jsxs("div",{className:"flex items-center justify-between gap-2",children:[v.jsx("button",{onClick:()=>k(I.version),className:`flex-1 text-left font-medium ${(f||T.version)===I.version?"text-primary-400":"text-slate-300"}`,children:I.version}),v.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[I.is_manual_upload===1&&v.jsx("span",{className:"px-1.5 py-0.5 text-[10px] bg-blue-600/20 text-blue-400 rounded",title:"Manually uploaded",children:"📤"}),I.released_at&&v.jsx("span",{className:"text-xs text-slate-500",children:new Date(I.released_at*1e3).toLocaleDateString()}),b===I.version?v.jsxs("div",{className:"flex gap-1",children:[v.jsx("button",{onClick:()=>se.mutate({name:u,version:I.version}),disabled:se.isPending,className:"px-2 py-0.5 text-xs bg-red-600 hover:bg-red-500 text-white rounded disabled:opacity-50",title:"Confirm delete",children:se.isPending?"...":"✓"}),v.jsx("button",{onClick:()=>w(null),className:"px-2 py-0.5 text-xs bg-slate-600 hover:bg-slate-500 text-white rounded",title:"Cancel",children:"✕"})]}):v.jsx("button",{onClick:U=>{U.stopPropagation(),w(I.version)},className:"p-1 text-slate-500 hover:text-red-400 hover:bg-red-500/10 rounded transition-colors",title:"Delete this version",children:v.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]})},I.version))}),se.isError&&v.jsx("div",{className:"mt-3 p-2 bg-red-500/10 border border-red-500/30 rounded text-sm text-red-400",children:se.error instanceof Error?se.error.message:"Failed to delete"})]})]})]})]})}function S5({onSuccess:e}){const{login:n,authError:i}=ja(),[a,s]=O.useState(""),[u,c]=O.useState(""),[f,p]=O.useState(""),[h,g]=O.useState(null),[y,x]=O.useState(!1),b=async w=>{w.preventDefault(),h!=="2FA required"&&g(null),x(!0);try{const k=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a,password:u,code:f})}),j=await k.json();k.ok&&j.token?(n(j.token),e()):j.code==="2fa_required"?g("2FA required"):g(j.message||j.error||"Invalid credentials")}catch{g("Failed to connect to server")}finally{x(!1)}};return v.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",children:v.jsx("div",{className:"max-w-md w-full mx-4",children:v.jsxs("div",{className:"bg-slate-800/50 backdrop-blur-sm rounded-2xl shadow-2xl border border-slate-700/50 p-8",children:[v.jsxs("div",{className:"text-center mb-8",children:[v.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-orange-500 to-amber-600 mb-4",children:v.jsx(yi,{className:"w-8 h-8 text-white"})}),v.jsx("h1",{className:"text-2xl font-bold text-white",children:"Composer Proxy"}),v.jsx("p",{className:"text-slate-400 mt-1",children:"Sign in to manage your packages"})]}),v.jsxs("form",{onSubmit:b,className:"space-y-5","data-testid":"login-form",children:[i&&v.jsxs("div",{role:"alert","aria-live":"polite","data-testid":"auth-context-error",className:"bg-red-500/10 border border-red-500/50 rounded-lg p-4 text-red-400 text-sm mb-4",children:["Auth Error: ",i]}),h&&v.jsx("div",{role:"alert","aria-live":"polite","data-testid":"login-error",className:"bg-red-500/10 border border-red-500/50 rounded-lg p-4 text-red-400 text-sm",children:h}),v.jsxs("div",{children:[v.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-slate-300 mb-2",children:"Email"}),v.jsx("input",{id:"email",type:"email",value:a,onChange:w=>s(w.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent transition",placeholder:"admin@example.com",required:!0,"aria-label":"Email address",disabled:y})]}),v.jsxs("div",{children:[v.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-slate-300 mb-2",children:"Password"}),v.jsx("input",{id:"password",type:"password",value:u,onChange:w=>c(w.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent transition",placeholder:"Enter your password",required:!0,"aria-label":"Password",disabled:y})]}),h==="2FA required"&&v.jsxs("div",{className:"animate-in fade-in slide-in-from-top-2 duration-300",children:[v.jsx("label",{htmlFor:"code",className:"block text-sm font-medium text-slate-300 mb-2",children:"2FA Code"}),v.jsx("input",{id:"code",type:"text",value:f,onChange:w=>p(w.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent transition",placeholder:"000000",required:!0,autoFocus:!0,maxLength:6,pattern:"\\d{6}","aria-label":"2FA Code",disabled:y})]}),v.jsx("button",{type:"submit",disabled:y||!a||!u||h==="2FA required"&&f.length!==6,className:"w-full py-3 px-4 bg-gradient-to-r from-orange-500 to-amber-600 hover:from-orange-600 hover:to-amber-700 text-white font-semibold rounded-lg shadow-lg shadow-orange-500/25 transition disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Sign in",children:y?"Signing in...":"Sign In"})]})]})})})}function w5(){const{token:e}=ab(),n=Hl(),[i,a]=O.useState(""),[s,u]=O.useState(""),[c,f]=O.useState(""),[p,h]=O.useState(!1),[g]=z2(),y=g.get("token"),x=e||y,b=async w=>{if(w.preventDefault(),!x){f("Invalid invite link");return}if(i!==s){f("Passwords do not match");return}if(i.length<8){f("Password must be at least 8 characters");return}h(!0),f("");try{await Mj(x,i),n("/login",{state:{message:"Password set successfully! Please login."}})}catch(k){f(k.message||"Failed to accept invite")}finally{h(!1)}};return x?v.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",children:v.jsx("div",{className:"max-w-md w-full mx-4",children:v.jsxs("div",{className:"bg-slate-800/50 backdrop-blur-sm rounded-2xl shadow-2xl border border-slate-700/50 p-8",children:[v.jsxs("div",{className:"text-center mb-8",children:[v.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-orange-500 to-amber-600 mb-4",children:v.jsx(yi,{className:"w-8 h-8 text-white"})}),v.jsx("h1",{className:"text-2xl font-bold text-white",children:"Welcome"}),v.jsx("p",{className:"text-slate-400 mt-1",children:"Set your password to accept the invitation"})]}),v.jsxs("form",{className:"space-y-5",onSubmit:b,children:[v.jsxs("div",{children:[v.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-slate-300 mb-2",children:"New Password"}),v.jsx("input",{id:"password",name:"password",type:"password",required:!0,value:i,onChange:w=>a(w.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent transition",placeholder:"Minimum 8 characters",minLength:8})]}),v.jsxs("div",{children:[v.jsx("label",{htmlFor:"confirmPassword",className:"block text-sm font-medium text-slate-300 mb-2",children:"Confirm Password"}),v.jsx("input",{id:"confirmPassword",name:"confirmPassword",type:"password",required:!0,value:s,onChange:w=>u(w.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent transition",placeholder:"Confirm your password"})]}),c&&v.jsx("div",{className:"bg-red-500/10 border border-red-500/50 rounded-lg p-4 text-red-400 text-sm",children:c}),v.jsx("button",{type:"submit",disabled:p,className:"w-full py-3 px-4 bg-gradient-to-r from-orange-500 to-amber-600 hover:from-orange-600 hover:to-amber-700 text-white font-semibold rounded-lg shadow-lg shadow-orange-500/25 transition disabled:opacity-50 disabled:cursor-not-allowed",children:p?"Setting password...":"Set Password and Login"})]})]})})}):v.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",children:v.jsx("div",{className:"max-w-md w-full mx-4",children:v.jsxs("div",{className:"bg-slate-800/50 backdrop-blur-sm rounded-2xl shadow-2xl border border-slate-700/50 p-8 text-center",children:[v.jsx("h2",{className:"text-2xl font-bold text-white mb-2",children:"Invalid Invite Link"}),v.jsx("p",{className:"text-slate-400",children:"Please check the link in your email."})]})})})}function E5({onSuccess:e}){const[n,i]=O.useState(""),[a,s]=O.useState(""),[u,c]=O.useState(null),[f,p]=O.useState(!1),h=async g=>{g.preventDefault(),c(null),p(!0);try{await fj({email:n,password:a}),e()}catch(y){c(y.message||"Failed to complete setup")}finally{p(!1)}};return v.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",children:v.jsx("div",{className:"max-w-md w-full mx-4",children:v.jsxs("div",{className:"bg-slate-800/50 backdrop-blur-sm rounded-2xl shadow-2xl border border-slate-700/50 p-8",children:[v.jsxs("div",{className:"text-center mb-8",children:[v.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-2xl bg-gradient-to-br from-green-500 to-emerald-600 mb-4",children:v.jsx(yi,{className:"w-8 h-8 text-white"})}),v.jsx("h1",{className:"text-2xl font-bold text-white",children:"Welcome!"}),v.jsx("p",{className:"text-slate-400 mt-1",children:"Create your Admin account to get started"})]}),v.jsxs("form",{onSubmit:h,className:"space-y-5","data-testid":"setup-form",children:[u&&v.jsx("div",{role:"alert","aria-live":"polite","data-testid":"setup-error",className:"bg-red-500/10 border border-red-500/50 rounded-lg p-4 text-red-400 text-sm",children:u}),v.jsxs("div",{children:[v.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-slate-300 mb-2",children:"Admin Email"}),v.jsx("input",{id:"email",type:"email",value:n,onChange:g=>i(g.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent transition",placeholder:"admin@example.com",required:!0,"aria-label":"Email address"})]}),v.jsxs("div",{children:[v.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-slate-300 mb-2",children:"Create Password"}),v.jsx("input",{id:"password",type:"password",value:a,onChange:g=>s(g.target.value),className:"w-full px-4 py-3 bg-slate-900/50 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent transition",placeholder:"Choose a strong password",required:!0,minLength:8,"aria-label":"Password"})]}),v.jsx("button",{type:"submit",disabled:f||!n||!a,className:"w-full py-3 px-4 bg-gradient-to-r from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700 text-white font-semibold rounded-lg shadow-lg shadow-green-500/25 transition disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Create Account",children:f?"Setting up...":"Create Account"})]})]})})})}function k5(){const[e,n]=O.useState([]),[i,a]=O.useState(!0),[s,u]=O.useState(null),[c,f]=O.useState(!1),{isAdmin:p}=ja(),[h,g]=O.useState(""),[y,x]=O.useState("viewer"),[b,w]=O.useState(!1);O.useEffect(()=>{k()},[]);const k=async()=>{try{const R=await Tj();n(R)}catch(R){u(R.message)}finally{a(!1)}},j=async R=>{if(window.confirm("Are you sure you want to delete this user?"))try{await Aj(R),n(e.filter(T=>T.id!==R))}catch(T){alert(T.message)}},_=async R=>{R.preventDefault(),w(!0);try{await Rj({email:h,role:y}),f(!1),g(""),k(),alert("User invited successfully. They will receive an email to set their password.")}catch(T){alert(T.message)}finally{w(!1)}};return i?v.jsx("div",{className:"text-slate-400",children:"Loading users..."}):v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{children:[v.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Users"}),v.jsx("p",{className:"text-slate-400",children:"Manage access to the Composer Proxy"})]}),p&&v.jsxs("button",{onClick:()=>f(!0),className:"flex items-center gap-2 px-4 py-2 bg-primary-600 hover:bg-primary-500 text-white rounded-lg transition",children:[v.jsx(lj,{className:"w-5 h-5"}),"Invite User"]})]}),s&&v.jsx("div",{className:"bg-red-500/10 border border-red-500/50 rounded-lg p-4 text-red-400",children:s}),v.jsx("div",{className:"bg-slate-800/50 border border-slate-700 rounded-xl overflow-hidden",children:v.jsxs("table",{className:"w-full text-left border-collapse",children:[v.jsx("thead",{children:v.jsxs("tr",{className:"bg-slate-800 border-b border-slate-700",children:[v.jsx("th",{className:"px-6 py-4 text-sm font-semibold text-slate-300",children:"User"}),v.jsx("th",{className:"px-6 py-4 text-sm font-semibold text-slate-300",children:"Role"}),v.jsx("th",{className:"px-6 py-4 text-sm font-semibold text-slate-300",children:"Status"}),v.jsx("th",{className:"px-6 py-4 text-sm font-semibold text-slate-300",children:"Created"}),p&&v.jsx("th",{className:"px-6 py-4 text-right text-sm font-semibold text-slate-300",children:"Actions"})]})}),v.jsx("tbody",{className:"divide-y divide-slate-700",children:e.map(R=>v.jsxs("tr",{className:"hover:bg-slate-800/30 transition",children:[v.jsx("td",{className:"px-6 py-4",children:v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-700 flex items-center justify-center",children:v.jsx(rh,{className:"w-4 h-4 text-slate-400"})}),v.jsxs("div",{children:[v.jsx("div",{className:"text-slate-200 font-medium",children:R.email}),v.jsx("div",{className:"text-xs text-slate-500 font-mono",children:R.id})]})]})}),v.jsx("td",{className:"px-6 py-4",children:v.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-slate-700/50 border border-slate-600 w-fit",children:[v.jsx(Qo,{className:"w-3 h-3 text-primary-400"}),v.jsx("span",{className:"text-xs font-medium text-slate-300 capitalize",children:R.role})]})}),v.jsx("td",{className:"px-6 py-4",children:v.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${R.status==="active"?"bg-green-500/10 text-green-400 border border-green-500/20":"bg-yellow-500/10 text-yellow-400 border border-yellow-500/20"}`,children:R.status})}),v.jsx("td",{className:"px-6 py-4 text-sm text-slate-400",children:new Date(R.created_at*1e3).toLocaleDateString()}),p&&v.jsx("td",{className:"px-6 py-4 text-right",children:v.jsx("button",{onClick:()=>j(R.id),className:"p-2 text-slate-400 hover:text-red-400 hover:bg-red-500/10 rounded-lg transition",title:"Delete User",children:v.jsx(tj,{className:"w-4 h-4"})})})]},R.id))})]})}),c&&v.jsx("div",{className:"fixed inset-0 bg-slate-900/80 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:v.jsxs("div",{className:"bg-slate-800 border border-slate-700 rounded-xl shadow-2xl max-w-md w-full p-6",children:[v.jsx("h2",{className:"text-xl font-bold text-white mb-4",children:"Invite New User"}),v.jsxs("form",{onSubmit:_,className:"space-y-4",children:[v.jsxs("div",{children:[v.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Email"}),v.jsxs("div",{className:"relative",children:[v.jsx(ZN,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500"}),v.jsx("input",{type:"email",value:h,onChange:R=>g(R.target.value),className:"w-full bg-slate-900 border border-slate-700 rounded-lg pl-9 pr-4 py-2 text-slate-200 focus:outline-none focus:ring-2 focus:ring-primary-500",placeholder:"user@example.com",required:!0})]})]}),v.jsxs("div",{children:[v.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Role"}),v.jsxs("select",{value:y,onChange:R=>x(R.target.value),className:"w-full bg-slate-900 border border-slate-700 rounded-lg px-4 py-2 text-slate-200 focus:outline-none focus:ring-2 focus:ring-primary-500",children:[v.jsx("option",{value:"viewer",children:"Viewer"}),v.jsx("option",{value:"admin",children:"Admin"})]})]}),v.jsxs("div",{className:"flex justify-end gap-3 mt-6",children:[v.jsx("button",{type:"button",onClick:()=>f(!1),className:"px-4 py-2 text-slate-300 hover:text-white transition",children:"Cancel"}),v.jsx("button",{type:"submit",disabled:b,className:"px-4 py-2 bg-primary-600 hover:bg-primary-500 text-white rounded-lg transition disabled:opacity-50",children:b?"Inviting...":"Invite User"})]})]})]})})]})}function _5(){const[e,n]=O.useState(null),[i,a]=O.useState(!0),[s,u]=O.useState(null),[c,f]=O.useState(""),[p,h]=O.useState(null),[g,y]=O.useState(null),[x,b]=O.useState(!1);O.useEffect(()=>{w()},[]);const w=async()=>{try{const R=Gl(),V=await(await fetch("/api/auth/me",{headers:{Authorization:`Bearer ${R}`}})).json();V.user&&n(V.user)}catch(R){console.error("Failed to fetch user",R)}finally{a(!1)}},k=async()=>{b(!0),y(null);try{const R=await Oj();u(R)}catch{y("Failed to start 2FA setup")}finally{b(!1)}},j=async()=>{if(s){b(!0),y(null);try{const R=await zj(s.secret,c);h(R.recoveryCodes),u(null),f(""),await w()}catch{y("Invalid code")}finally{b(!1)}}},_=async()=>{if(confirm("Are you sure you want to disable 2FA? Your account will be less secure.")){b(!0),y(null);try{await Dj(),await w()}catch{y("Failed to disable 2FA")}finally{b(!1)}}};return i?v.jsx("div",{className:"p-8 text-center text-slate-400",children:"Loading profile..."}):v.jsxs("div",{className:"space-y-6",children:[v.jsx("div",{className:"flex items-center justify-between",children:v.jsx("h1",{className:"text-2xl font-bold text-slate-100 font-display",children:"My Profile"})}),v.jsxs("div",{className:"bg-slate-800 rounded-lg border border-slate-700 p-6",children:[v.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[v.jsx("div",{className:"w-16 h-16 bg-slate-700 rounded-full flex items-center justify-center text-2xl font-bold text-slate-300",children:e?.email[0].toUpperCase()}),v.jsxs("div",{children:[v.jsx("h2",{className:"text-xl font-semibold text-white",children:e?.email}),v.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-500/10 text-blue-400 border border-blue-500/20 capitalize",children:e?.role})]})]}),v.jsxs("div",{className:"border-t border-slate-700 pt-6",children:[v.jsxs("h3",{className:"text-lg font-medium text-white mb-4 flex items-center gap-2",children:[v.jsx(Qo,{className:"w-5 h-5 text-orange-500"}),"Security"]}),v.jsxs("div",{className:"bg-slate-900/50 rounded-lg p-6 border border-slate-700/50",children:[v.jsxs("div",{className:"flex items-start justify-between mb-4",children:[v.jsxs("div",{children:[v.jsxs("h4",{className:"font-medium text-slate-200 flex items-center gap-2",children:["Two-Factor Authentication (2FA)",e?.two_factor_enabled&&v.jsx("span",{className:"text-xs bg-green-500/10 text-green-400 border border-green-500/20 px-2 py-0.5 rounded-full",children:"Enabled"})]}),v.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Add an extra layer of security to your account by requiring a code from your authenticator app."})]}),!e?.two_factor_enabled&&!s&&v.jsx("button",{onClick:k,disabled:x,className:"px-4 py-2 bg-orange-600 hover:bg-orange-700 text-white rounded-lg text-sm font-medium transition",children:"Enable 2FA"}),e?.two_factor_enabled&&v.jsx("button",{onClick:_,disabled:x,className:"px-4 py-2 bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/20 rounded-lg text-sm font-medium transition",children:"Disable"})]}),s&&v.jsxs("div",{className:"mt-6 p-4 bg-slate-800 rounded-lg border border-slate-700 animate-in fade-in slide-in-from-top-4",children:[v.jsxs("h5",{className:"font-medium text-white mb-4 flex items-center gap-2",children:[v.jsx(WN,{className:"w-4 h-4"}),"Scan QR Code"]}),v.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[v.jsxs("div",{className:"flex flex-col items-center",children:[v.jsx("div",{className:"bg-white p-2 rounded-lg mb-4",children:v.jsx("img",{src:s.qrCode,alt:"2FA QR Code",className:"w-48 h-48"})}),v.jsx("p",{className:"text-xs text-slate-500 text-center max-w-xs",children:"Scan this code with Google Authenticator, Authy, or 1Password."})]}),v.jsxs("div",{className:"flex flex-col justify-center space-y-4",children:[v.jsxs("div",{children:[v.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Manual Entry Code"}),v.jsx("code",{className:"block w-full p-2 bg-slate-900 rounded text-slate-300 font-mono text-sm select-all",children:s.secret})]}),v.jsxs("div",{children:[v.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Verification Code"}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx("input",{type:"text",value:c,onChange:R=>f(R.target.value),placeholder:"000000",maxLength:6,className:"bg-slate-900 border border-slate-600 rounded px-3 py-2 text-white w-32 focus:ring-2 focus:ring-orange-500 outline-none"}),v.jsx("button",{onClick:j,disabled:c.length!==6||x,className:"px-4 py-2 bg-orange-600 hover:bg-orange-700 text-white rounded font-medium disabled:opacity-50",children:"Verify & Enable"})]}),g&&v.jsx("p",{className:"text-red-400 text-sm mt-2",children:g})]})]})]})]}),p&&v.jsxs("div",{className:"mt-6 p-4 bg-green-500/10 border border-green-500/20 rounded-lg",children:[v.jsxs("div",{className:"flex items-center gap-2 text-green-400 font-medium mb-2",children:[v.jsx(kb,{className:"w-5 h-5"}),"2FA Enabled Successfully!"]}),v.jsx("div",{className:"mb-4 text-slate-300 text-sm",children:"Please save these recovery codes in a secure place. You will need them if you lose access to your authenticator device."}),v.jsx("div",{className:"grid grid-cols-2 gap-2 font-mono text-sm bg-slate-900 p-4 rounded border border-slate-700",children:p.map(R=>v.jsx("div",{className:"text-slate-300 select-all",children:R},R))}),v.jsx("button",{onClick:()=>h(null),className:"mt-4 text-sm text-slate-400 hover:text-white underline",children:"I have saved these codes"})]})]})]})]})]})}function N5(){const{isAuthenticated:e,logout:n}=ja(),[i,a]=O.useState(null),[s,u]=O.useState(!1),[c,f]=O.useState(!0),p=qn(),h=Hl(),[g]=O.useState(()=>p.pathname+p.search);if(O.useEffect(()=>{cj().then(({authRequired:x,setupRequired:b})=>{a(x),u(b),f(!1)})},[]),c)return v.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",children:v.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(s)return v.jsx(E5,{onSuccess:()=>u(!1)});if(p.pathname.startsWith("/invite/"))return v.jsx(z0,{children:v.jsx(cr,{path:"/invite/:token",element:v.jsx(w5,{})})});if(i&&!e)return v.jsx(S5,{onSuccess:()=>h(g||"/",{replace:!0})});const y=[{path:"/",label:"Dashboard",icon:jN},{path:"/repositories",label:"Repositories",icon:yi},{path:"/tokens",label:"Access Tokens",icon:$h},{path:"/packages",label:"Packages",icon:_b},{path:"/users",label:"Users",icon:rh}];return v.jsxs("div",{className:"min-h-screen overflow-x-hidden",children:[v.jsx("header",{className:"bg-slate-900/90 backdrop-blur-sm border-b border-slate-800 sticky top-0 z-50",children:v.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:v.jsxs("div",{className:"flex items-center justify-between h-16",children:[v.jsxs(Sa,{to:"/",className:"flex items-center gap-3 hover:opacity-80 transition-opacity",children:[v.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-primary-500 to-accent-600 rounded-lg flex items-center justify-center",children:v.jsx(yi,{className:"w-6 h-6 text-white"})}),v.jsxs("div",{children:[v.jsx("h1",{className:"font-display font-bold text-lg text-slate-100",children:"PACKAGE.broker"}),v.jsx("p",{className:"text-xs text-slate-500",children:"Serverless Edition"})]})]}),v.jsxs("div",{className:"flex items-center gap-4",children:[v.jsxs("nav",{className:"flex items-center gap-1",role:"navigation","aria-label":"Main navigation",children:[y.map(x=>v.jsxs(Yd,{to:x.path,end:x.path==="/","data-testid":`nav-${x.path==="/"?"dashboard":x.path.slice(1)}`,className:({isActive:b})=>`px-4 py-2 rounded-lg font-medium text-sm transition-all duration-200 flex items-center gap-2 ${b?"bg-slate-800 text-primary-400 shadow-lg":"text-slate-400 hover:text-slate-200 hover:bg-slate-800/50"}`,children:[v.jsx(x.icon,{className:"w-5 h-5 flex-shrink-0"}),v.jsx("span",{children:x.label})]},x.path)),v.jsxs("a",{href:"https://package.broker",target:"_blank",rel:"noopener noreferrer",className:"px-4 py-2 rounded-lg font-medium text-sm text-slate-400 hover:text-slate-200 hover:bg-slate-800/50 transition-all duration-200 flex items-center gap-2","data-testid":"nav-about",children:[v.jsx($N,{className:"w-5 h-5 flex-shrink-0"}),v.jsx("span",{children:"About"})]})]}),e&&v.jsxs("div",{className:"flex items-center gap-2 pl-2 border-l border-slate-700 ml-2",children:[v.jsx(Yd,{to:"/profile",className:({isActive:x})=>`px-3 py-2 text-sm rounded-lg transition flex items-center gap-1 ${x?"text-white bg-slate-800":"text-slate-400 hover:text-slate-200"}`,title:"Profile Settings",children:v.jsx(rh,{className:"w-4 h-4"})}),v.jsx("button",{onClick:n,className:"px-3 py-2 text-sm text-slate-400 hover:text-red-400 transition flex items-center gap-1",title:"Sign out","aria-label":"Sign out","data-testid":"logout-button",children:v.jsx(BN,{className:"w-4 h-4"})})]})]})]})})}),v.jsx("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:v.jsxs(z0,{children:[v.jsx(cr,{path:"/",element:v.jsx(Uj,{})}),v.jsx(cr,{path:"/repositories",element:v.jsx(oA,{})}),v.jsx(cr,{path:"/tokens",element:v.jsx(dA,{})}),v.jsx(cr,{path:"/packages",element:v.jsx(FA,{})}),v.jsx(cr,{path:"/packages/:vendor/:package",element:v.jsx(b5,{})}),v.jsx(cr,{path:"/users",element:v.jsx(k5,{})}),v.jsx(cr,{path:"/profile",element:v.jsx(_5,{})})]})}),v.jsx("footer",{className:"border-t border-slate-800 mt-16 py-8",children:v.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:v.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-4",children:[v.jsxs("div",{className:"text-center md:text-left",children:[v.jsx("p",{className:"text-slate-300 font-medium mb-1",children:"PACKAGE.broker"}),v.jsx("p",{className:"text-slate-500 text-sm",children:"A lightweight, self-hosted Composer proxy running on Cloudflare's edge network"})]}),v.jsxs("div",{className:"flex flex-col items-center md:items-end gap-2",children:[v.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[v.jsx("a",{href:"https://github.com/package-broker/server",target:"_blank",rel:"noopener noreferrer",className:"text-slate-400 hover:text-slate-200 transition",children:"GitHub"}),v.jsxs("a",{href:"https://github.com/sponsors/lbajsarowicz",target:"_blank",rel:"noopener noreferrer",className:"text-pink-400 hover:text-pink-300 transition flex items-center gap-1",children:[v.jsx(nh,{className:"w-4 h-4 fill-current"}),"Sponsor"]})]}),v.jsxs("p",{className:"text-slate-500 text-xs",children:["© ",new Date().getFullYear()," Łukasz Bajsarowicz • Licensed under AGPL-3.0"]})]})]})})})]})}function j5(){return v.jsx(sA,{children:v.jsx(N5,{})})}const C5=new oN({defaultOptions:{queries:{staleTime:1e3*60,refetchOnWindowFocus:!1}}});o_.createRoot(document.getElementById("root")).render(v.jsx(e_.StrictMode,{children:v.jsx(T2,{children:v.jsx(uN,{client:C5,children:v.jsx(j5,{})})})}));