@electric-agent/studio 1.12.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/active-sessions.d.ts +2 -0
- package/dist/active-sessions.d.ts.map +1 -1
- package/dist/active-sessions.js +4 -0
- package/dist/active-sessions.js.map +1 -1
- package/dist/bridge/claude-md-generator.d.ts +5 -2
- package/dist/bridge/claude-md-generator.d.ts.map +1 -1
- package/dist/bridge/claude-md-generator.js +33 -1
- package/dist/bridge/claude-md-generator.js.map +1 -1
- package/dist/client/assets/index-CtOOaA2Q.js +235 -0
- package/dist/client/index.html +1 -1
- package/dist/github-app.d.ts +14 -0
- package/dist/github-app.d.ts.map +1 -0
- package/dist/github-app.js +62 -0
- package/dist/github-app.js.map +1 -0
- package/dist/github-app.test.d.ts +2 -0
- package/dist/github-app.test.d.ts.map +1 -0
- package/dist/github-app.test.js +62 -0
- package/dist/github-app.test.js.map +1 -0
- package/dist/room-router.d.ts.map +1 -1
- package/dist/room-router.js +1 -1
- package/dist/room-router.js.map +1 -1
- package/dist/sandbox/docker.d.ts +1 -0
- package/dist/sandbox/docker.d.ts.map +1 -1
- package/dist/sandbox/docker.js +51 -0
- package/dist/sandbox/docker.js.map +1 -1
- package/dist/sandbox/sprites.d.ts +1 -0
- package/dist/sandbox/sprites.d.ts.map +1 -1
- package/dist/sandbox/sprites.js +51 -0
- package/dist/sandbox/sprites.js.map +1 -1
- package/dist/sandbox/types.d.ts +5 -0
- package/dist/sandbox/types.d.ts.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +171 -125
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/dist/client/assets/index-CiwD5LkP.js +0 -235
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
function CS(t,l){for(var a=0;a<l.length;a++){const r=l[a];if(typeof r!="string"&&!Array.isArray(r)){for(const u in r)if(u!=="default"&&!(u in t)){const s=Object.getOwnPropertyDescriptor(r,u);s&&Object.defineProperty(t,u,s.get?s:{enumerable:!0,get:()=>r[u]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const s of u)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function a(u){const s={};return u.integrity&&(s.integrity=u.integrity),u.referrerPolicy&&(s.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?s.credentials="include":u.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(u){if(u.ep)return;u.ep=!0;const s=a(u);fetch(u.href,s)}})();function Bd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tf={exports:{}},Ur={};var py;function kS(){if(py)return Ur;py=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function a(r,u,s){var c=null;if(s!==void 0&&(c=""+s),u.key!==void 0&&(c=""+u.key),"key"in u){s={};for(var d in u)d!=="key"&&(s[d]=u[d])}else s=u;return u=s.ref,{$$typeof:t,type:r,key:c,ref:u!==void 0?u:null,props:s}}return Ur.Fragment=l,Ur.jsx=a,Ur.jsxs=a,Ur}var gy;function AS(){return gy||(gy=1,Tf.exports=kS()),Tf.exports}var v=AS(),Cf={exports:{}},He={};var yy;function _S(){if(yy)return He;yy=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function S(M){return M===null||typeof M!="object"?null:(M=b&&M[b]||M["@@iterator"],typeof M=="function"?M:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,R={};function k(M,Z,C){this.props=M,this.context=Z,this.refs=R,this.updater=C||E}k.prototype.isReactComponent={},k.prototype.setState=function(M,Z){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,Z,"setState")},k.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function _(){}_.prototype=k.prototype;function j(M,Z,C){this.props=M,this.context=Z,this.refs=R,this.updater=C||E}var J=j.prototype=new _;J.constructor=j,A(J,k.prototype),J.isPureReactComponent=!0;var Q=Array.isArray;function I(){}var O={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function ne(M,Z,C){var de=C.ref;return{$$typeof:t,type:M,key:Z,ref:de!==void 0?de:null,props:C}}function D(M,Z){return ne(M.type,Z,M.props)}function q(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function F(M){var Z={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(C){return Z[C]})}var V=/\/+/g;function ue(M,Z){return typeof M=="object"&&M!==null&&M.key!=null?F(""+M.key):Z.toString(36)}function W(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(I,I):(M.status="pending",M.then(function(Z){M.status==="pending"&&(M.status="fulfilled",M.value=Z)},function(Z){M.status==="pending"&&(M.status="rejected",M.reason=Z)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function B(M,Z,C,de,ge){var Te=typeof M;(Te==="undefined"||Te==="boolean")&&(M=null);var ze=!1;if(M===null)ze=!0;else switch(Te){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(M.$$typeof){case t:case l:ze=!0;break;case y:return ze=M._init,B(ze(M._payload),Z,C,de,ge)}}if(ze)return ge=ge(M),ze=de===""?"."+ue(M,0):de,Q(ge)?(C="",ze!=null&&(C=ze.replace(V,"$&/")+"/"),B(ge,Z,C,"",function(At){return At})):ge!=null&&(q(ge)&&(ge=D(ge,C+(ge.key==null||M&&M.key===ge.key?"":(""+ge.key).replace(V,"$&/")+"/")+ze)),Z.push(ge)),1;ze=0;var ve=de===""?".":de+":";if(Q(M))for(var Oe=0;Oe<M.length;Oe++)de=M[Oe],Te=ve+ue(de,Oe),ze+=B(de,Z,C,Te,ge);else if(Oe=S(M),typeof Oe=="function")for(M=Oe.call(M),Oe=0;!(de=M.next()).done;)de=de.value,Te=ve+ue(de,Oe++),ze+=B(de,Z,C,Te,ge);else if(Te==="object"){if(typeof M.then=="function")return B(W(M),Z,C,de,ge);throw Z=String(M),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return ze}function ee(M,Z,C){if(M==null)return M;var de=[],ge=0;return B(M,de,"","",function(Te){return Z.call(C,Te,ge++)}),de}function ie(M){if(M._status===-1){var Z=M._result;Z=Z(),Z.then(function(C){(M._status===0||M._status===-1)&&(M._status=1,M._result=C)},function(C){(M._status===0||M._status===-1)&&(M._status=2,M._result=C)}),M._status===-1&&(M._status=0,M._result=Z)}if(M._status===1)return M._result.default;throw M._result}var be=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},N={map:ee,forEach:function(M,Z,C){ee(M,function(){Z.apply(this,arguments)},C)},count:function(M){var Z=0;return ee(M,function(){Z++}),Z},toArray:function(M){return ee(M,function(Z){return Z})||[]},only:function(M){if(!q(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return He.Activity=g,He.Children=N,He.Component=k,He.Fragment=a,He.Profiler=u,He.PureComponent=j,He.StrictMode=r,He.Suspense=p,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,He.__COMPILER_RUNTIME={__proto__:null,c:function(M){return O.H.useMemoCache(M)}},He.cache=function(M){return function(){return M.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(M,Z,C){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var de=A({},M.props),ge=M.key;if(Z!=null)for(Te in Z.key!==void 0&&(ge=""+Z.key),Z)!le.call(Z,Te)||Te==="key"||Te==="__self"||Te==="__source"||Te==="ref"&&Z.ref===void 0||(de[Te]=Z[Te]);var Te=arguments.length-2;if(Te===1)de.children=C;else if(1<Te){for(var ze=Array(Te),ve=0;ve<Te;ve++)ze[ve]=arguments[ve+2];de.children=ze}return ne(M.type,ge,de)},He.createContext=function(M){return M={$$typeof:c,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:s,_context:M},M},He.createElement=function(M,Z,C){var de,ge={},Te=null;if(Z!=null)for(de in Z.key!==void 0&&(Te=""+Z.key),Z)le.call(Z,de)&&de!=="key"&&de!=="__self"&&de!=="__source"&&(ge[de]=Z[de]);var ze=arguments.length-2;if(ze===1)ge.children=C;else if(1<ze){for(var ve=Array(ze),Oe=0;Oe<ze;Oe++)ve[Oe]=arguments[Oe+2];ge.children=ve}if(M&&M.defaultProps)for(de in ze=M.defaultProps,ze)ge[de]===void 0&&(ge[de]=ze[de]);return ne(M,Te,ge)},He.createRef=function(){return{current:null}},He.forwardRef=function(M){return{$$typeof:d,render:M}},He.isValidElement=q,He.lazy=function(M){return{$$typeof:y,_payload:{_status:-1,_result:M},_init:ie}},He.memo=function(M,Z){return{$$typeof:h,type:M,compare:Z===void 0?null:Z}},He.startTransition=function(M){var Z=O.T,C={};O.T=C;try{var de=M(),ge=O.S;ge!==null&&ge(C,de),typeof de=="object"&&de!==null&&typeof de.then=="function"&&de.then(I,be)}catch(Te){be(Te)}finally{Z!==null&&C.types!==null&&(Z.types=C.types),O.T=Z}},He.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},He.use=function(M){return O.H.use(M)},He.useActionState=function(M,Z,C){return O.H.useActionState(M,Z,C)},He.useCallback=function(M,Z){return O.H.useCallback(M,Z)},He.useContext=function(M){return O.H.useContext(M)},He.useDebugValue=function(){},He.useDeferredValue=function(M,Z){return O.H.useDeferredValue(M,Z)},He.useEffect=function(M,Z){return O.H.useEffect(M,Z)},He.useEffectEvent=function(M){return O.H.useEffectEvent(M)},He.useId=function(){return O.H.useId()},He.useImperativeHandle=function(M,Z,C){return O.H.useImperativeHandle(M,Z,C)},He.useInsertionEffect=function(M,Z){return O.H.useInsertionEffect(M,Z)},He.useLayoutEffect=function(M,Z){return O.H.useLayoutEffect(M,Z)},He.useMemo=function(M,Z){return O.H.useMemo(M,Z)},He.useOptimistic=function(M,Z){return O.H.useOptimistic(M,Z)},He.useReducer=function(M,Z,C){return O.H.useReducer(M,Z,C)},He.useRef=function(M){return O.H.useRef(M)},He.useState=function(M){return O.H.useState(M)},He.useSyncExternalStore=function(M,Z,C){return O.H.useSyncExternalStore(M,Z,C)},He.useTransition=function(){return O.H.useTransition()},He.version="19.2.4",He}var vy;function Hd(){return vy||(vy=1,Cf.exports=_S()),Cf.exports}var T=Hd();const RS=Bd(T),DS=CS({__proto__:null,default:RS},[T]);var kf={exports:{}},Br={},Af={exports:{}},_f={};var by;function NS(){return by||(by=1,(function(t){function l(B,ee){var ie=B.length;B.push(ee);e:for(;0<ie;){var be=ie-1>>>1,N=B[be];if(0<u(N,ee))B[be]=ee,B[ie]=N,ie=be;else break e}}function a(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var ee=B[0],ie=B.pop();if(ie!==ee){B[0]=ie;e:for(var be=0,N=B.length,M=N>>>1;be<M;){var Z=2*(be+1)-1,C=B[Z],de=Z+1,ge=B[de];if(0>u(C,ie))de<N&&0>u(ge,C)?(B[be]=ge,B[de]=ie,be=de):(B[be]=C,B[Z]=ie,be=Z);else if(de<N&&0>u(ge,ie))B[be]=ge,B[de]=ie,be=de;else break e}}return ee}function u(B,ee){var ie=B.sortIndex-ee.sortIndex;return ie!==0?ie:B.id-ee.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var p=[],h=[],y=1,g=null,b=3,S=!1,E=!1,A=!1,R=!1,k=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function J(B){for(var ee=a(h);ee!==null;){if(ee.callback===null)r(h);else if(ee.startTime<=B)r(h),ee.sortIndex=ee.expirationTime,l(p,ee);else break;ee=a(h)}}function Q(B){if(A=!1,J(B),!E)if(a(p)!==null)E=!0,I||(I=!0,F());else{var ee=a(h);ee!==null&&W(Q,ee.startTime-B)}}var I=!1,O=-1,le=5,ne=-1;function D(){return R?!0:!(t.unstable_now()-ne<le)}function q(){if(R=!1,I){var B=t.unstable_now();ne=B;var ee=!0;try{e:{E=!1,A&&(A=!1,_(O),O=-1),S=!0;var ie=b;try{t:{for(J(B),g=a(p);g!==null&&!(g.expirationTime>B&&D());){var be=g.callback;if(typeof be=="function"){g.callback=null,b=g.priorityLevel;var N=be(g.expirationTime<=B);if(B=t.unstable_now(),typeof N=="function"){g.callback=N,J(B),ee=!0;break t}g===a(p)&&r(p),J(B)}else r(p);g=a(p)}if(g!==null)ee=!0;else{var M=a(h);M!==null&&W(Q,M.startTime-B),ee=!1}}break e}finally{g=null,b=ie,S=!1}ee=void 0}}finally{ee?F():I=!1}}}var F;if(typeof j=="function")F=function(){j(q)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,ue=V.port2;V.port1.onmessage=q,F=function(){ue.postMessage(null)}}else F=function(){k(q,0)};function W(B,ee){O=k(function(){B(t.unstable_now())},ee)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(B){B.callback=null},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(B){switch(b){case 1:case 2:case 3:var ee=3;break;default:ee=b}var ie=b;b=ee;try{return B()}finally{b=ie}},t.unstable_requestPaint=function(){R=!0},t.unstable_runWithPriority=function(B,ee){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ie=b;b=B;try{return ee()}finally{b=ie}},t.unstable_scheduleCallback=function(B,ee,ie){var be=t.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?be+ie:be):ie=be,B){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=ie+N,B={id:y++,callback:ee,priorityLevel:B,startTime:ie,expirationTime:N,sortIndex:-1},ie>be?(B.sortIndex=ie,l(h,B),a(p)===null&&B===a(h)&&(A?(_(O),O=-1):A=!0,W(Q,ie-be))):(B.sortIndex=N,l(p,B),E||S||(E=!0,I||(I=!0,F()))),B},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(B){var ee=b;return function(){var ie=b;b=ee;try{return B.apply(this,arguments)}finally{b=ie}}}})(_f)),_f}var xy;function jS(){return xy||(xy=1,Af.exports=NS()),Af.exports}var Rf={exports:{}},rn={};var Sy;function OS(){if(Sy)return rn;Sy=1;var t=Hd();function l(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}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 a(){}var r={d:{f:a,r:function(){throw Error(l(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},u=Symbol.for("react.portal");function s(p,h,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:g==null?null:""+g,children:p,containerInfo:h,implementation:y}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return rn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,rn.createPortal=function(p,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(l(299));return s(p,h,null,y)},rn.flushSync=function(p){var h=c.T,y=r.p;try{if(c.T=null,r.p=2,p)return p()}finally{c.T=h,r.p=y,r.d.f()}},rn.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(p,h))},rn.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},rn.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var y=h.as,g=d(y,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,S=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?r.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:S}):y==="script"&&r.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:S,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},rn.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=d(h.as,h.crossOrigin);r.d.M(p,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(p)},rn.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,g=d(y,h.crossOrigin);r.d.L(p,y,{crossOrigin:g,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})}},rn.preloadModule=function(p,h){if(typeof p=="string")if(h){var y=d(h.as,h.crossOrigin);r.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(p)},rn.requestFormReset=function(p){r.d.r(p)},rn.unstable_batchedUpdates=function(p,h){return p(h)},rn.useFormState=function(p,h,y){return c.H.useFormState(p,h,y)},rn.useFormStatus=function(){return c.H.useHostTransitionStatus()},rn.version="19.2.4",rn}var Ey;function rb(){if(Ey)return Rf.exports;Ey=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),Rf.exports=OS(),Rf.exports}var wy;function MS(){if(wy)return Br;wy=1;var t=jS(),l=Hd(),a=rb();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(i=n.return),e=n.return;while(e)}return n.tag===3?i:null}function c(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function d(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(s(e)!==e)throw Error(r(188))}function h(e){var n=e.alternate;if(!n){if(n=s(e),n===null)throw Error(r(188));return n!==e?null:e}for(var i=e,o=n;;){var f=i.return;if(f===null)break;var m=f.alternate;if(m===null){if(o=f.return,o!==null){i=o;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===i)return p(f),e;if(m===o)return p(f),n;m=m.sibling}throw Error(r(188))}if(i.return!==o.return)i=f,o=m;else{for(var x=!1,w=f.child;w;){if(w===i){x=!0,i=f,o=m;break}if(w===o){x=!0,o=f,i=m;break}w=w.sibling}if(!x){for(w=m.child;w;){if(w===i){x=!0,i=m,o=f;break}if(w===o){x=!0,o=m,i=f;break}w=w.sibling}if(!x)throw Error(r(189))}}if(i.alternate!==o)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?e:n}function y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(e),n!==null)return n;e=e.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),j=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),q=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=q&&e[q]||e["@@iterator"],typeof e=="function"?e:null)}var V=Symbol.for("react.client.reference");function ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===V?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case k:return"Profiler";case R:return"StrictMode";case Q:return"Suspense";case I:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case j:return e.displayName||"Context";case _:return(e._context.displayName||"Context")+".Consumer";case J:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case O:return n=e.displayName||null,n!==null?n:ue(e.type)||"Memo";case le:n=e._payload,e=e._init;try{return ue(e(n))}catch{}}return null}var W=Array.isArray,B=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},be=[],N=-1;function M(e){return{current:e}}function Z(e){0>N||(e.current=be[N],be[N]=null,N--)}function C(e,n){N++,be[N]=e.current,e.current=n}var de=M(null),ge=M(null),Te=M(null),ze=M(null);function ve(e,n){switch(C(Te,n),C(ge,e),C(de,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Bg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Bg(n),e=Hg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Z(de),C(de,e)}function Oe(){Z(de),Z(ge),Z(Te)}function At(e){e.memoizedState!==null&&C(ze,e);var n=de.current,i=Hg(n,e.type);n!==i&&(C(ge,e),C(de,i))}function vn(e){ge.current===e&&(Z(de),Z(ge)),ze.current===e&&(Z(ze),Or._currentValue=ie)}var Et,Gt;function Qt(e){if(Et===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);Et=n&&n[1]||"",Gt=-1<i.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+Et+e+Gt}var nn=!1;function Yt(e,n){if(!e||nn)return"";nn=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(te){var K=te}Reflect.construct(e,[],se)}else{try{se.call()}catch(te){K=te}e.call(se.prototype)}}else{try{throw Error()}catch(te){K=te}(se=e())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(te){if(te&&K&&typeof te.stack=="string")return[te.stack,K.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=o.DetermineComponentFrameRoot(),x=m[0],w=m[1];if(x&&w){var L=x.split(`
|
|
4
|
-
`),$=w.split(`
|
|
5
|
-
`);for(f=o=0;o<L.length&&!L[o].includes("DetermineComponentFrameRoot");)o++;for(;f<$.length&&!$[f].includes("DetermineComponentFrameRoot");)f++;if(o===L.length||f===$.length)for(o=L.length-1,f=$.length-1;1<=o&&0<=f&&L[o]!==$[f];)f--;for(;1<=o&&0<=f;o--,f--)if(L[o]!==$[f]){if(o!==1||f!==1)do if(o--,f--,0>f||L[o]!==$[f]){var re=`
|
|
6
|
-
`+L[o].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=o&&0<=f);break}}}finally{nn=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Qt(i):""}function dl(e,n){switch(e.tag){case 26:case 27:case 5:return Qt(e.type);case 16:return Qt("Lazy");case 13:return e.child!==n&&n!==null?Qt("Suspense Fallback"):Qt("Suspense");case 19:return Qt("SuspenseList");case 0:case 15:return Yt(e.type,!1);case 11:return Yt(e.type.render,!1);case 1:return Yt(e.type,!0);case 31:return Qt("Activity");default:return""}}function Dn(e){try{var n="",i=null;do n+=dl(e,i),i=e,e=e.return;while(e);return n}catch(o){return`
|
|
7
|
-
Error generating stack: `+o.message+`
|
|
8
|
-
`+o.stack}}var bn=Object.prototype.hasOwnProperty,Nn=t.unstable_scheduleCallback,hl=t.unstable_cancelCallback,Wl=t.unstable_shouldYield,Oa=t.unstable_requestPaint,pt=t.unstable_now,cn=t.unstable_getCurrentPriorityLevel,ae=t.unstable_ImmediatePriority,he=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,Ue=t.unstable_LowPriority,Je=t.unstable_IdlePriority,qt=t.log,ln=t.unstable_setDisableYieldValue,Rt=null,at=null;function gt(e){if(typeof qt=="function"&&ln(e),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(Rt,e)}catch{}}var Pe=Math.clz32?Math.clz32:ai,fn=Math.log,Kt=Math.LN2;function ai(e){return e>>>=0,e===0?32:31-(fn(e)/Kt|0)|0}var xn=256,Gn=262144,ml=4194304;function dn(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function _l(e,n,i){var o=e.pendingLanes;if(o===0)return 0;var f=0,m=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var w=o&134217727;return w!==0?(o=w&~m,o!==0?f=dn(o):(x&=w,x!==0?f=dn(x):i||(i=w&~e,i!==0&&(f=dn(i))))):(w=o&~m,w!==0?f=dn(w):x!==0?f=dn(x):i||(i=o&~e,i!==0&&(f=dn(i)))),f===0?0:n!==0&&n!==f&&(n&m)===0&&(m=f&-f,i=n&-n,m>=i||m===32&&(i&4194048)!==0)?n:f}function Rl(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Ct(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Sn(){var e=ml;return ml<<=1,(ml&62914560)===0&&(ml=4194304),e}function pl(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function al(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ma(e,n,i,o,f,m){var x=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var w=e.entanglements,L=e.expirationTimes,$=e.hiddenUpdates;for(i=x&~i;0<i;){var re=31-Pe(i),se=1<<re;w[re]=0,L[re]=-1;var K=$[re];if(K!==null)for($[re]=null,re=0;re<K.length;re++){var te=K[re];te!==null&&(te.lane&=-536870913)}i&=~se}o!==0&&za(e,o,0),m!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=m&~(x&~n))}function za(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-Pe(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|i&261930}function z(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var o=31-Pe(i),f=1<<o;f&n|e[o]&n&&(e[o]|=n),i&=~f}}function G(e,n){var i=n&-n;return i=(i&42)!==0?1:P(i),(i&(e.suspendedLanes|n))!==0?0:i}function P(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function fe(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ye(){var e=ee.p;return e!==0?e:(e=window.event,e===void 0?32:uy(e.type))}function _e(e,n){var i=ee.p;try{return ee.p=e,n()}finally{ee.p=i}}var we=Math.random().toString(36).slice(2),Se="__reactFiber$"+we,xe="__reactProps$"+we,ke="__reactContainer$"+we,Ne="__reactEvents$"+we,De="__reactListeners$"+we,Xe="__reactHandles$"+we,$e="__reactResources$"+we,Ee="__reactMarker$"+we;function U(e){delete e[Se],delete e[xe],delete e[Ne],delete e[De],delete e[Xe]}function ce(e){var n=e[Se];if(n)return n;for(var i=e.parentNode;i;){if(n=i[ke]||i[Se]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=Pg(e);e!==null;){if(i=e[Se])return i;e=Pg(e)}return n}e=i,i=e.parentNode}return null}function me(e){if(e=e[Se]||e[ke]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Ie(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function ut(e){var n=e[$e];return n||(n=e[$e]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Be(e){e[Ee]=!0}var xt=new Set,_t={};function Vt(e,n){an(e,n),an(e+"Capture",n)}function an(e,n){for(_t[e]=n,e=0;e<n.length;e++)xt.add(n[e])}var yt=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]*$"),gl={},yl={};function tt(e){return bn.call(yl,e)?!0:bn.call(gl,e)?!1:yt.test(e)?yl[e]=!0:(gl[e]=!0,!1)}function jt(e,n,i){if(tt(n))if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+i)}}function il(e,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+i)}}function Zt(e,n,i,o){if(o===null)e.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(n,i,""+o)}}function nt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function La(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function xo(e,n,i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,m=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(x){i=""+x,m.call(this,x)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(x){i=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Qi(e){if(!e._valueTracker){var n=La(e)?"checked":"value";e._valueTracker=xo(e,n,""+e[n])}}function Nh(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),o="";return e&&(o=La(e)?e.checked?"true":"false":e.value),e=o,e!==i?(n.setValue(e),!0):!1}function So(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var bx=/[\n"\\]/g;function Yn(e){return e.replace(bx,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function ys(e,n,i,o,f,m,x,w){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),n!=null?x==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+nt(n)):e.value!==""+nt(n)&&(e.value=""+nt(n)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),n!=null?vs(e,x,nt(n)):i!=null?vs(e,x,nt(i)):o!=null&&e.removeAttribute("value"),f==null&&m!=null&&(e.defaultChecked=!!m),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+nt(w):e.removeAttribute("name")}function jh(e,n,i,o,f,m,x,w){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.type=m),n!=null||i!=null){if(!(m!=="submit"&&m!=="reset"||n!=null)){Qi(e);return}i=i!=null?""+nt(i):"",n=n!=null?""+nt(n):i,w||n===e.value||(e.value=n),e.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=w?e.checked:!!o,e.defaultChecked=!!o,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Qi(e)}function vs(e,n,i){n==="number"&&So(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ii(e,n,i,o){if(e=e.options,n){n={};for(var f=0;f<i.length;f++)n["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=n.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&o&&(e[i].defaultSelected=!0)}else{for(i=""+nt(i),n=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function Oh(e,n,i){if(n!=null&&(n=""+nt(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+nt(i):""}function Mh(e,n,i,o){if(n==null){if(o!=null){if(i!=null)throw Error(r(92));if(W(o)){if(1<o.length)throw Error(r(93));o=o[0]}i=o}i==null&&(i=""),n=i}i=nt(n),e.defaultValue=i,o=e.textContent,o===i&&o!==""&&o!==null&&(e.value=o),Qi(e)}function ri(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var xx=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 zh(e,n,i){var o=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,i):typeof i!="number"||i===0||xx.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function Lh(e,n,i){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var f in n)o=n[f],n.hasOwnProperty(f)&&i[f]!==o&&zh(e,f,o)}else for(var m in n)n.hasOwnProperty(m)&&zh(e,m,n[m])}function bs(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Sx=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"]]),Ex=/^[\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 Eo(e){return Ex.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Dl(){}var xs=null;function Ss(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oi=null,ui=null;function Uh(e){var n=me(e);if(n&&(e=n.stateNode)){var i=e[xe]||null;e:switch(e=n.stateNode,n.type){case"input":if(ys(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Yn(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var o=i[n];if(o!==e&&o.form===e.form){var f=o[xe]||null;if(!f)throw Error(r(90));ys(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<i.length;n++)o=i[n],o.form===e.form&&Nh(o)}break e;case"textarea":Oh(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&ii(e,!!i.multiple,n,!1)}}}var Es=!1;function Bh(e,n,i){if(Es)return e(n,i);Es=!0;try{var o=e(n);return o}finally{if(Es=!1,(oi!==null||ui!==null)&&(su(),oi&&(n=oi,e=ui,ui=oi=null,Uh(n),e)))for(n=0;n<e.length;n++)Uh(e[n])}}function Ki(e,n){var i=e.stateNode;if(i===null)return null;var o=i[xe]||null;if(o===null)return null;i=o[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(r(231,n,typeof i));return i}var Nl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ws=!1;if(Nl)try{var Zi={};Object.defineProperty(Zi,"passive",{get:function(){ws=!0}}),window.addEventListener("test",Zi,Zi),window.removeEventListener("test",Zi,Zi)}catch{ws=!1}var ea=null,Ts=null,wo=null;function Hh(){if(wo)return wo;var e,n=Ts,i=n.length,o,f="value"in ea?ea.value:ea.textContent,m=f.length;for(e=0;e<i&&n[e]===f[e];e++);var x=i-e;for(o=1;o<=x&&n[i-o]===f[m-o];o++);return wo=f.slice(e,1<o?1-o:void 0)}function To(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Co(){return!0}function Ih(){return!1}function En(e){function n(i,o,f,m,x){this._reactName=i,this._targetInst=f,this.type=o,this.nativeEvent=m,this.target=x,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(i=e[w],this[w]=i?i(m):m[w]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Co:Ih,this.isPropagationStopped=Ih,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Co)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Co)},persist:function(){},isPersistent:Co}),n}var Ua={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ko=En(Ua),Ji=g({},Ua,{view:0,detail:0}),wx=En(Ji),Cs,ks,Wi,Ao=g({},Ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_s,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wi&&(Wi&&e.type==="mousemove"?(Cs=e.screenX-Wi.screenX,ks=e.screenY-Wi.screenY):ks=Cs=0,Wi=e),Cs)},movementY:function(e){return"movementY"in e?e.movementY:ks}}),qh=En(Ao),Tx=g({},Ao,{dataTransfer:0}),Cx=En(Tx),kx=g({},Ji,{relatedTarget:0}),As=En(kx),Ax=g({},Ua,{animationName:0,elapsedTime:0,pseudoElement:0}),_x=En(Ax),Rx=g({},Ua,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Dx=En(Rx),Nx=g({},Ua,{data:0}),Fh=En(Nx),jx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ox={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"},Mx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zx(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Mx[e])?!!n[e]:!1}function _s(){return zx}var Lx=g({},Ji,{key:function(e){if(e.key){var n=jx[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=To(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ox[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_s,charCode:function(e){return e.type==="keypress"?To(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?To(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ux=En(Lx),Bx=g({},Ao,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gh=En(Bx),Hx=g({},Ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_s}),Ix=En(Hx),qx=g({},Ua,{propertyName:0,elapsedTime:0,pseudoElement:0}),Fx=En(qx),Gx=g({},Ao,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Yx=En(Gx),Vx=g({},Ua,{newState:0,oldState:0}),Px=En(Vx),Xx=[9,13,27,32],Rs=Nl&&"CompositionEvent"in window,er=null;Nl&&"documentMode"in document&&(er=document.documentMode);var $x=Nl&&"TextEvent"in window&&!er,Yh=Nl&&(!Rs||er&&8<er&&11>=er),Vh=" ",Ph=!1;function Xh(e,n){switch(e){case"keyup":return Xx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $h(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var si=!1;function Qx(e,n){switch(e){case"compositionend":return $h(n);case"keypress":return n.which!==32?null:(Ph=!0,Vh);case"textInput":return e=n.data,e===Vh&&Ph?null:e;default:return null}}function Kx(e,n){if(si)return e==="compositionend"||!Rs&&Xh(e,n)?(e=Hh(),wo=Ts=ea=null,si=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Yh&&n.locale!=="ko"?null:n.data;default:return null}}var Zx={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Qh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Zx[e.type]:n==="textarea"}function Kh(e,n,i,o){oi?ui?ui.push(o):ui=[o]:oi=o,n=gu(n,"onChange"),0<n.length&&(i=new ko("onChange","change",null,i,o),e.push({event:i,listeners:n}))}var tr=null,nr=null;function Jx(e){jg(e,0)}function _o(e){var n=Ie(e);if(Nh(n))return e}function Zh(e,n){if(e==="change")return n}var Jh=!1;if(Nl){var Ds;if(Nl){var Ns="oninput"in document;if(!Ns){var Wh=document.createElement("div");Wh.setAttribute("oninput","return;"),Ns=typeof Wh.oninput=="function"}Ds=Ns}else Ds=!1;Jh=Ds&&(!document.documentMode||9<document.documentMode)}function em(){tr&&(tr.detachEvent("onpropertychange",tm),nr=tr=null)}function tm(e){if(e.propertyName==="value"&&_o(nr)){var n=[];Kh(n,nr,e,Ss(e)),Bh(Jx,n)}}function Wx(e,n,i){e==="focusin"?(em(),tr=n,nr=i,tr.attachEvent("onpropertychange",tm)):e==="focusout"&&em()}function e1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _o(nr)}function t1(e,n){if(e==="click")return _o(n)}function n1(e,n){if(e==="input"||e==="change")return _o(n)}function l1(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var jn=typeof Object.is=="function"?Object.is:l1;function lr(e,n){if(jn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),o=Object.keys(n);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var f=i[o];if(!bn.call(n,f)||!jn(e[f],n[f]))return!1}return!0}function nm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lm(e,n){var i=nm(e);e=0;for(var o;i;){if(i.nodeType===3){if(o=e+i.textContent.length,e<=n&&o>=n)return{node:i,offset:n-e};e=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=nm(i)}}function am(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?am(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function im(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=So(e.document);n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=So(e.document)}return n}function js(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var a1=Nl&&"documentMode"in document&&11>=document.documentMode,ci=null,Os=null,ar=null,Ms=!1;function rm(e,n,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ms||ci==null||ci!==So(o)||(o=ci,"selectionStart"in o&&js(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}),ar&&lr(ar,o)||(ar=o,o=gu(Os,"onSelect"),0<o.length&&(n=new ko("onSelect","select",null,n,i),e.push({event:n,listeners:o}),n.target=ci)))}function Ba(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var fi={animationend:Ba("Animation","AnimationEnd"),animationiteration:Ba("Animation","AnimationIteration"),animationstart:Ba("Animation","AnimationStart"),transitionrun:Ba("Transition","TransitionRun"),transitionstart:Ba("Transition","TransitionStart"),transitioncancel:Ba("Transition","TransitionCancel"),transitionend:Ba("Transition","TransitionEnd")},zs={},om={};Nl&&(om=document.createElement("div").style,"AnimationEvent"in window||(delete fi.animationend.animation,delete fi.animationiteration.animation,delete fi.animationstart.animation),"TransitionEvent"in window||delete fi.transitionend.transition);function Ha(e){if(zs[e])return zs[e];if(!fi[e])return e;var n=fi[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in om)return zs[e]=n[i];return e}var um=Ha("animationend"),sm=Ha("animationiteration"),cm=Ha("animationstart"),i1=Ha("transitionrun"),r1=Ha("transitionstart"),o1=Ha("transitioncancel"),fm=Ha("transitionend"),dm=new Map,Ls="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(" ");Ls.push("scrollEnd");function rl(e,n){dm.set(e,n),Vt(n,[e])}var Ro=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Vn=[],di=0,Us=0;function Do(){for(var e=di,n=Us=di=0;n<e;){var i=Vn[n];Vn[n++]=null;var o=Vn[n];Vn[n++]=null;var f=Vn[n];Vn[n++]=null;var m=Vn[n];if(Vn[n++]=null,o!==null&&f!==null){var x=o.pending;x===null?f.next=f:(f.next=x.next,x.next=f),o.pending=f}m!==0&&hm(i,f,m)}}function No(e,n,i,o){Vn[di++]=e,Vn[di++]=n,Vn[di++]=i,Vn[di++]=o,Us|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Bs(e,n,i,o){return No(e,n,i,o),jo(e)}function Ia(e,n){return No(e,null,null,n),jo(e)}function hm(e,n,i){e.lanes|=i;var o=e.alternate;o!==null&&(o.lanes|=i);for(var f=!1,m=e.return;m!==null;)m.childLanes|=i,o=m.alternate,o!==null&&(o.childLanes|=i),m.tag===22&&(e=m.stateNode,e===null||e._visibility&1||(f=!0)),e=m,m=m.return;return e.tag===3?(m=e.stateNode,f&&n!==null&&(f=31-Pe(i),e=m.hiddenUpdates,o=e[f],o===null?e[f]=[n]:o.push(n),n.lane=i|536870912),m):null}function jo(e){if(50<kr)throw kr=0,Xc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var hi={};function u1(e,n,i,o){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function On(e,n,i,o){return new u1(e,n,i,o)}function Hs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jl(e,n){var i=e.alternate;return i===null?(i=On(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function mm(e,n){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,n=i.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Oo(e,n,i,o,f,m){var x=0;if(o=e,typeof e=="function")Hs(e)&&(x=1);else if(typeof e=="string")x=hS(e,i,de.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=On(31,i,n,f),e.elementType=ne,e.lanes=m,e;case A:return qa(i.children,f,m,n);case R:x=8,f|=24;break;case k:return e=On(12,i,n,f|2),e.elementType=k,e.lanes=m,e;case Q:return e=On(13,i,n,f),e.elementType=Q,e.lanes=m,e;case I:return e=On(19,i,n,f),e.elementType=I,e.lanes=m,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j:x=10;break e;case _:x=9;break e;case J:x=11;break e;case O:x=14;break e;case le:x=16,o=null;break e}x=29,i=Error(r(130,e===null?"null":typeof e,"")),o=null}return n=On(x,i,n,f),n.elementType=e,n.type=o,n.lanes=m,n}function qa(e,n,i,o){return e=On(7,e,o,n),e.lanes=i,e}function Is(e,n,i){return e=On(6,e,null,n),e.lanes=i,e}function pm(e){var n=On(18,null,null,0);return n.stateNode=e,n}function qs(e,n,i){return n=On(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var gm=new WeakMap;function Pn(e,n){if(typeof e=="object"&&e!==null){var i=gm.get(e);return i!==void 0?i:(n={value:e,source:n,stack:Dn(n)},gm.set(e,n),n)}return{value:e,source:n,stack:Dn(n)}}var mi=[],pi=0,Mo=null,ir=0,Xn=[],$n=0,ta=null,vl=1,bl="";function Ol(e,n){mi[pi++]=ir,mi[pi++]=Mo,Mo=e,ir=n}function ym(e,n,i){Xn[$n++]=vl,Xn[$n++]=bl,Xn[$n++]=ta,ta=e;var o=vl;e=bl;var f=32-Pe(o)-1;o&=~(1<<f),i+=1;var m=32-Pe(n)+f;if(30<m){var x=f-f%5;m=(o&(1<<x)-1).toString(32),o>>=x,f-=x,vl=1<<32-Pe(n)+f|i<<f|o,bl=m+e}else vl=1<<m|i<<f|o,bl=e}function Fs(e){e.return!==null&&(Ol(e,1),ym(e,1,0))}function Gs(e){for(;e===Mo;)Mo=mi[--pi],mi[pi]=null,ir=mi[--pi],mi[pi]=null;for(;e===ta;)ta=Xn[--$n],Xn[$n]=null,bl=Xn[--$n],Xn[$n]=null,vl=Xn[--$n],Xn[$n]=null}function vm(e,n){Xn[$n++]=vl,Xn[$n++]=bl,Xn[$n++]=ta,vl=n.id,bl=n.overflow,ta=e}var Jt=null,wt=null,lt=!1,na=null,Qn=!1,Ys=Error(r(519));function la(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw rr(Pn(n,e)),Ys}function bm(e){var n=e.stateNode,i=e.type,o=e.memoizedProps;switch(n[Se]=e,n[xe]=o,i){case"dialog":Ke("cancel",n),Ke("close",n);break;case"iframe":case"object":case"embed":Ke("load",n);break;case"video":case"audio":for(i=0;i<_r.length;i++)Ke(_r[i],n);break;case"source":Ke("error",n);break;case"img":case"image":case"link":Ke("error",n),Ke("load",n);break;case"details":Ke("toggle",n);break;case"input":Ke("invalid",n),jh(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Ke("invalid",n);break;case"textarea":Ke("invalid",n),Mh(n,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||o.suppressHydrationWarning===!0||Lg(n.textContent,i)?(o.popover!=null&&(Ke("beforetoggle",n),Ke("toggle",n)),o.onScroll!=null&&Ke("scroll",n),o.onScrollEnd!=null&&Ke("scrollend",n),o.onClick!=null&&(n.onclick=Dl),n=!0):n=!1,n||la(e,!0)}function xm(e){for(Jt=e.return;Jt;)switch(Jt.tag){case 5:case 31:case 13:Qn=!1;return;case 27:case 3:Qn=!0;return;default:Jt=Jt.return}}function gi(e){if(e!==Jt)return!1;if(!lt)return xm(e),lt=!0,!1;var n=e.tag,i;if((i=n!==3&&n!==27)&&((i=n===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||sf(e.type,e.memoizedProps)),i=!i),i&&wt&&la(e),xm(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));wt=Vg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));wt=Vg(e)}else n===27?(n=wt,ya(e.type)?(e=mf,mf=null,wt=e):wt=n):wt=Jt?Zn(e.stateNode.nextSibling):null;return!0}function Fa(){wt=Jt=null,lt=!1}function Vs(){var e=na;return e!==null&&(kn===null?kn=e:kn.push.apply(kn,e),na=null),e}function rr(e){na===null?na=[e]:na.push(e)}var Ps=M(null),Ga=null,Ml=null;function aa(e,n,i){C(Ps,n._currentValue),n._currentValue=i}function zl(e){e._currentValue=Ps.current,Z(Ps)}function Xs(e,n,i){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===i)break;e=e.return}}function $s(e,n,i,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var m=f.dependencies;if(m!==null){var x=f.child;m=m.firstContext;e:for(;m!==null;){var w=m;m=f;for(var L=0;L<n.length;L++)if(w.context===n[L]){m.lanes|=i,w=m.alternate,w!==null&&(w.lanes|=i),Xs(m.return,i,e),o||(x=null);break e}m=w.next}}else if(f.tag===18){if(x=f.return,x===null)throw Error(r(341));x.lanes|=i,m=x.alternate,m!==null&&(m.lanes|=i),Xs(x,i,e),x=null}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===e){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}}function yi(e,n,i,o){e=null;for(var f=n,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var x=f.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var w=f.type;jn(f.pendingProps.value,x.value)||(e!==null?e.push(w):e=[w])}}else if(f===ze.current){if(x=f.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Or):e=[Or])}f=f.return}e!==null&&$s(n,e,i,o),n.flags|=262144}function zo(e){for(e=e.firstContext;e!==null;){if(!jn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ya(e){Ga=e,Ml=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Wt(e){return Sm(Ga,e)}function Lo(e,n){return Ga===null&&Ya(e),Sm(e,n)}function Sm(e,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},Ml===null){if(e===null)throw Error(r(308));Ml=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Ml=Ml.next=n;return i}var s1=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(i,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(i){return i()})}},c1=t.unstable_scheduleCallback,f1=t.unstable_NormalPriority,Lt={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qs(){return{controller:new s1,data:new Map,refCount:0}}function or(e){e.refCount--,e.refCount===0&&c1(f1,function(){e.controller.abort()})}var ur=null,Ks=0,vi=0,bi=null;function d1(e,n){if(ur===null){var i=ur=[];Ks=0,vi=Wc(),bi={status:"pending",value:void 0,then:function(o){i.push(o)}}}return Ks++,n.then(Em,Em),n}function Em(){if(--Ks===0&&ur!==null){bi!==null&&(bi.status="fulfilled");var e=ur;ur=null,vi=0,bi=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function h1(e,n){var i=[],o={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var f=0;f<i.length;f++)(0,i[f])(n)},function(f){for(o.status="rejected",o.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),o}var wm=B.S;B.S=function(e,n){rg=pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&d1(e,n),wm!==null&&wm(e,n)};var Va=M(null);function Zs(){var e=Va.current;return e!==null?e:vt.pooledCache}function Uo(e,n){n===null?C(Va,Va.current):C(Va,n.pool)}function Tm(){var e=Zs();return e===null?null:{parent:Lt._currentValue,pool:e}}var xi=Error(r(460)),Js=Error(r(474)),Bo=Error(r(542)),Ho={then:function(){}};function Cm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function km(e,n,i){switch(i=e[i],i===void 0?e.push(n):i!==n&&(n.then(Dl,Dl),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,_m(e),e;default:if(typeof n.status=="string")n.then(Dl,Dl);else{if(e=vt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=o}},function(o){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,_m(e),e}throw Xa=n,xi}}function Pa(e){try{var n=e._init;return n(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Xa=i,xi):i}}var Xa=null;function Am(){if(Xa===null)throw Error(r(459));var e=Xa;return Xa=null,e}function _m(e){if(e===xi||e===Bo)throw Error(r(483))}var Si=null,sr=0;function Io(e){var n=sr;return sr+=1,Si===null&&(Si=[]),km(Si,e,n)}function cr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function qo(e,n){throw n.$$typeof===b?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Rm(e){function n(Y,H){if(e){var X=Y.deletions;X===null?(Y.deletions=[H],Y.flags|=16):X.push(H)}}function i(Y,H){if(!e)return null;for(;H!==null;)n(Y,H),H=H.sibling;return null}function o(Y){for(var H=new Map;Y!==null;)Y.key!==null?H.set(Y.key,Y):H.set(Y.index,Y),Y=Y.sibling;return H}function f(Y,H){return Y=jl(Y,H),Y.index=0,Y.sibling=null,Y}function m(Y,H,X){return Y.index=X,e?(X=Y.alternate,X!==null?(X=X.index,X<H?(Y.flags|=67108866,H):X):(Y.flags|=67108866,H)):(Y.flags|=1048576,H)}function x(Y){return e&&Y.alternate===null&&(Y.flags|=67108866),Y}function w(Y,H,X,oe){return H===null||H.tag!==6?(H=Is(X,Y.mode,oe),H.return=Y,H):(H=f(H,X),H.return=Y,H)}function L(Y,H,X,oe){var je=X.type;return je===A?re(Y,H,X.props.children,oe,X.key):H!==null&&(H.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===le&&Pa(je)===H.type)?(H=f(H,X.props),cr(H,X),H.return=Y,H):(H=Oo(X.type,X.key,X.props,null,Y.mode,oe),cr(H,X),H.return=Y,H)}function $(Y,H,X,oe){return H===null||H.tag!==4||H.stateNode.containerInfo!==X.containerInfo||H.stateNode.implementation!==X.implementation?(H=qs(X,Y.mode,oe),H.return=Y,H):(H=f(H,X.children||[]),H.return=Y,H)}function re(Y,H,X,oe,je){return H===null||H.tag!==7?(H=qa(X,Y.mode,oe,je),H.return=Y,H):(H=f(H,X),H.return=Y,H)}function se(Y,H,X){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=Is(""+H,Y.mode,X),H.return=Y,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case S:return X=Oo(H.type,H.key,H.props,null,Y.mode,X),cr(X,H),X.return=Y,X;case E:return H=qs(H,Y.mode,X),H.return=Y,H;case le:return H=Pa(H),se(Y,H,X)}if(W(H)||F(H))return H=qa(H,Y.mode,X,null),H.return=Y,H;if(typeof H.then=="function")return se(Y,Io(H),X);if(H.$$typeof===j)return se(Y,Lo(Y,H),X);qo(Y,H)}return null}function K(Y,H,X,oe){var je=H!==null?H.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return je!==null?null:w(Y,H,""+X,oe);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case S:return X.key===je?L(Y,H,X,oe):null;case E:return X.key===je?$(Y,H,X,oe):null;case le:return X=Pa(X),K(Y,H,X,oe)}if(W(X)||F(X))return je!==null?null:re(Y,H,X,oe,null);if(typeof X.then=="function")return K(Y,H,Io(X),oe);if(X.$$typeof===j)return K(Y,H,Lo(Y,X),oe);qo(Y,X)}return null}function te(Y,H,X,oe,je){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Y=Y.get(X)||null,w(H,Y,""+oe,je);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case S:return Y=Y.get(oe.key===null?X:oe.key)||null,L(H,Y,oe,je);case E:return Y=Y.get(oe.key===null?X:oe.key)||null,$(H,Y,oe,je);case le:return oe=Pa(oe),te(Y,H,X,oe,je)}if(W(oe)||F(oe))return Y=Y.get(X)||null,re(H,Y,oe,je,null);if(typeof oe.then=="function")return te(Y,H,X,Io(oe),je);if(oe.$$typeof===j)return te(Y,H,X,Lo(H,oe),je);qo(H,oe)}return null}function Ce(Y,H,X,oe){for(var je=null,rt=null,Re=H,Fe=H=0,et=null;Re!==null&&Fe<X.length;Fe++){Re.index>Fe?(et=Re,Re=null):et=Re.sibling;var ot=K(Y,Re,X[Fe],oe);if(ot===null){Re===null&&(Re=et);break}e&&Re&&ot.alternate===null&&n(Y,Re),H=m(ot,H,Fe),rt===null?je=ot:rt.sibling=ot,rt=ot,Re=et}if(Fe===X.length)return i(Y,Re),lt&&Ol(Y,Fe),je;if(Re===null){for(;Fe<X.length;Fe++)Re=se(Y,X[Fe],oe),Re!==null&&(H=m(Re,H,Fe),rt===null?je=Re:rt.sibling=Re,rt=Re);return lt&&Ol(Y,Fe),je}for(Re=o(Re);Fe<X.length;Fe++)et=te(Re,Y,Fe,X[Fe],oe),et!==null&&(e&&et.alternate!==null&&Re.delete(et.key===null?Fe:et.key),H=m(et,H,Fe),rt===null?je=et:rt.sibling=et,rt=et);return e&&Re.forEach(function(Ea){return n(Y,Ea)}),lt&&Ol(Y,Fe),je}function Le(Y,H,X,oe){if(X==null)throw Error(r(151));for(var je=null,rt=null,Re=H,Fe=H=0,et=null,ot=X.next();Re!==null&&!ot.done;Fe++,ot=X.next()){Re.index>Fe?(et=Re,Re=null):et=Re.sibling;var Ea=K(Y,Re,ot.value,oe);if(Ea===null){Re===null&&(Re=et);break}e&&Re&&Ea.alternate===null&&n(Y,Re),H=m(Ea,H,Fe),rt===null?je=Ea:rt.sibling=Ea,rt=Ea,Re=et}if(ot.done)return i(Y,Re),lt&&Ol(Y,Fe),je;if(Re===null){for(;!ot.done;Fe++,ot=X.next())ot=se(Y,ot.value,oe),ot!==null&&(H=m(ot,H,Fe),rt===null?je=ot:rt.sibling=ot,rt=ot);return lt&&Ol(Y,Fe),je}for(Re=o(Re);!ot.done;Fe++,ot=X.next())ot=te(Re,Y,Fe,ot.value,oe),ot!==null&&(e&&ot.alternate!==null&&Re.delete(ot.key===null?Fe:ot.key),H=m(ot,H,Fe),rt===null?je=ot:rt.sibling=ot,rt=ot);return e&&Re.forEach(function(TS){return n(Y,TS)}),lt&&Ol(Y,Fe),je}function mt(Y,H,X,oe){if(typeof X=="object"&&X!==null&&X.type===A&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case S:e:{for(var je=X.key;H!==null;){if(H.key===je){if(je=X.type,je===A){if(H.tag===7){i(Y,H.sibling),oe=f(H,X.props.children),oe.return=Y,Y=oe;break e}}else if(H.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===le&&Pa(je)===H.type){i(Y,H.sibling),oe=f(H,X.props),cr(oe,X),oe.return=Y,Y=oe;break e}i(Y,H);break}else n(Y,H);H=H.sibling}X.type===A?(oe=qa(X.props.children,Y.mode,oe,X.key),oe.return=Y,Y=oe):(oe=Oo(X.type,X.key,X.props,null,Y.mode,oe),cr(oe,X),oe.return=Y,Y=oe)}return x(Y);case E:e:{for(je=X.key;H!==null;){if(H.key===je)if(H.tag===4&&H.stateNode.containerInfo===X.containerInfo&&H.stateNode.implementation===X.implementation){i(Y,H.sibling),oe=f(H,X.children||[]),oe.return=Y,Y=oe;break e}else{i(Y,H);break}else n(Y,H);H=H.sibling}oe=qs(X,Y.mode,oe),oe.return=Y,Y=oe}return x(Y);case le:return X=Pa(X),mt(Y,H,X,oe)}if(W(X))return Ce(Y,H,X,oe);if(F(X)){if(je=F(X),typeof je!="function")throw Error(r(150));return X=je.call(X),Le(Y,H,X,oe)}if(typeof X.then=="function")return mt(Y,H,Io(X),oe);if(X.$$typeof===j)return mt(Y,H,Lo(Y,X),oe);qo(Y,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,H!==null&&H.tag===6?(i(Y,H.sibling),oe=f(H,X),oe.return=Y,Y=oe):(i(Y,H),oe=Is(X,Y.mode,oe),oe.return=Y,Y=oe),x(Y)):i(Y,H)}return function(Y,H,X,oe){try{sr=0;var je=mt(Y,H,X,oe);return Si=null,je}catch(Re){if(Re===xi||Re===Bo)throw Re;var rt=On(29,Re,null,Y.mode);return rt.lanes=oe,rt.return=Y,rt}}}var $a=Rm(!0),Dm=Rm(!1),ia=!1;function Ws(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ec(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function oa(e,n,i){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(st&2)!==0){var f=o.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),o.pending=n,n=jo(e),hm(e,null,i),n}return No(e,o,n,i),jo(e)}function fr(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,i|=o,n.lanes=i,z(e,i)}}function tc(e,n){var i=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var f=null,m=null;if(i=i.firstBaseUpdate,i!==null){do{var x={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};m===null?f=m=x:m=m.next=x,i=i.next}while(i!==null);m===null?f=m=n:m=m.next=n}else f=m=n;i={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:o.shared,callbacks:o.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var nc=!1;function dr(){if(nc){var e=bi;if(e!==null)throw e}}function hr(e,n,i,o){nc=!1;var f=e.updateQueue;ia=!1;var m=f.firstBaseUpdate,x=f.lastBaseUpdate,w=f.shared.pending;if(w!==null){f.shared.pending=null;var L=w,$=L.next;L.next=null,x===null?m=$:x.next=$,x=L;var re=e.alternate;re!==null&&(re=re.updateQueue,w=re.lastBaseUpdate,w!==x&&(w===null?re.firstBaseUpdate=$:w.next=$,re.lastBaseUpdate=L))}if(m!==null){var se=f.baseState;x=0,re=$=L=null,w=m;do{var K=w.lane&-536870913,te=K!==w.lane;if(te?(We&K)===K:(o&K)===K){K!==0&&K===vi&&(nc=!0),re!==null&&(re=re.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var Ce=e,Le=w;K=n;var mt=i;switch(Le.tag){case 1:if(Ce=Le.payload,typeof Ce=="function"){se=Ce.call(mt,se,K);break e}se=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Le.payload,K=typeof Ce=="function"?Ce.call(mt,se,K):Ce,K==null)break e;se=g({},se,K);break e;case 2:ia=!0}}K=w.callback,K!==null&&(e.flags|=64,te&&(e.flags|=8192),te=f.callbacks,te===null?f.callbacks=[K]:te.push(K))}else te={lane:K,tag:w.tag,payload:w.payload,callback:w.callback,next:null},re===null?($=re=te,L=se):re=re.next=te,x|=K;if(w=w.next,w===null){if(w=f.shared.pending,w===null)break;te=w,w=te.next,te.next=null,f.lastBaseUpdate=te,f.shared.pending=null}}while(!0);re===null&&(L=se),f.baseState=L,f.firstBaseUpdate=$,f.lastBaseUpdate=re,m===null&&(f.shared.lanes=0),da|=x,e.lanes=x,e.memoizedState=se}}function Nm(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function jm(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Nm(i[e],n)}var Ei=M(null),Fo=M(0);function Om(e,n){e=Yl,C(Fo,e),C(Ei,n),Yl=e|n.baseLanes}function lc(){C(Fo,Yl),C(Ei,Ei.current)}function ac(){Yl=Fo.current,Z(Ei),Z(Fo)}var Mn=M(null),Kn=null;function ua(e){var n=e.alternate;C(Ot,Ot.current&1),C(Mn,e),Kn===null&&(n===null||Ei.current!==null||n.memoizedState!==null)&&(Kn=e)}function ic(e){C(Ot,Ot.current),C(Mn,e),Kn===null&&(Kn=e)}function Mm(e){e.tag===22?(C(Ot,Ot.current),C(Mn,e),Kn===null&&(Kn=e)):sa()}function sa(){C(Ot,Ot.current),C(Mn,Mn.current)}function zn(e){Z(Mn),Kn===e&&(Kn=null),Z(Ot)}var Ot=M(0);function Go(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||df(i)||hf(i)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Ll=0,qe=null,dt=null,Ut=null,Yo=!1,wi=!1,Qa=!1,Vo=0,mr=0,Ti=null,m1=0;function Dt(){throw Error(r(321))}function rc(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!jn(e[i],n[i]))return!1;return!0}function oc(e,n,i,o,f,m){return Ll=m,qe=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,B.H=e===null||e.memoizedState===null?yp:Ec,Qa=!1,m=i(o,f),Qa=!1,wi&&(m=Lm(n,i,o,f)),zm(e),m}function zm(e){B.H=yr;var n=dt!==null&&dt.next!==null;if(Ll=0,Ut=dt=qe=null,Yo=!1,mr=0,Ti=null,n)throw Error(r(300));e===null||Bt||(e=e.dependencies,e!==null&&zo(e)&&(Bt=!0))}function Lm(e,n,i,o){qe=e;var f=0;do{if(wi&&(Ti=null),mr=0,wi=!1,25<=f)throw Error(r(301));if(f+=1,Ut=dt=null,e.updateQueue!=null){var m=e.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}B.H=vp,m=n(i,o)}while(wi);return m}function p1(){var e=B.H,n=e.useState()[0];return n=typeof n.then=="function"?pr(n):n,e=e.useState()[0],(dt!==null?dt.memoizedState:null)!==e&&(qe.flags|=1024),n}function uc(){var e=Vo!==0;return Vo=0,e}function sc(e,n,i){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i}function cc(e){if(Yo){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Yo=!1}Ll=0,Ut=dt=qe=null,wi=!1,mr=Vo=0,Ti=null}function hn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?qe.memoizedState=Ut=e:Ut=Ut.next=e,Ut}function Mt(){if(dt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=dt.next;var n=Ut===null?qe.memoizedState:Ut.next;if(n!==null)Ut=n,dt=e;else{if(e===null)throw qe.alternate===null?Error(r(467)):Error(r(310));dt=e,e={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},Ut===null?qe.memoizedState=Ut=e:Ut=Ut.next=e}return Ut}function Po(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pr(e){var n=mr;return mr+=1,Ti===null&&(Ti=[]),e=km(Ti,e,n),n=qe,(Ut===null?n.memoizedState:Ut.next)===null&&(n=n.alternate,B.H=n===null||n.memoizedState===null?yp:Ec),e}function Xo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return pr(e);if(e.$$typeof===j)return Wt(e)}throw Error(r(438,String(e)))}function fc(e){var n=null,i=qe.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var o=qe.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),i===null&&(i=Po(),qe.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(e),o=0;o<e;o++)i[o]=D;return n.index++,i}function Ul(e,n){return typeof n=="function"?n(e):n}function $o(e){var n=Mt();return dc(n,dt,e)}function dc(e,n,i){var o=e.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=i;var f=e.baseQueue,m=o.pending;if(m!==null){if(f!==null){var x=f.next;f.next=m.next,m.next=x}n.baseQueue=f=m,o.pending=null}if(m=e.baseState,f===null)e.memoizedState=m;else{n=f.next;var w=x=null,L=null,$=n,re=!1;do{var se=$.lane&-536870913;if(se!==$.lane?(We&se)===se:(Ll&se)===se){var K=$.revertLane;if(K===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),se===vi&&(re=!0);else if((Ll&K)===K){$=$.next,K===vi&&(re=!0);continue}else se={lane:0,revertLane:$.revertLane,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},L===null?(w=L=se,x=m):L=L.next=se,qe.lanes|=K,da|=K;se=$.action,Qa&&i(m,se),m=$.hasEagerState?$.eagerState:i(m,se)}else K={lane:se,revertLane:$.revertLane,gesture:$.gesture,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},L===null?(w=L=K,x=m):L=L.next=K,qe.lanes|=se,da|=se;$=$.next}while($!==null&&$!==n);if(L===null?x=m:L.next=w,!jn(m,e.memoizedState)&&(Bt=!0,re&&(i=bi,i!==null)))throw i;e.memoizedState=m,e.baseState=x,e.baseQueue=L,o.lastRenderedState=m}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function hc(e){var n=Mt(),i=n.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var o=i.dispatch,f=i.pending,m=n.memoizedState;if(f!==null){i.pending=null;var x=f=f.next;do m=e(m,x.action),x=x.next;while(x!==f);jn(m,n.memoizedState)||(Bt=!0),n.memoizedState=m,n.baseQueue===null&&(n.baseState=m),i.lastRenderedState=m}return[m,o]}function Um(e,n,i){var o=qe,f=Mt(),m=lt;if(m){if(i===void 0)throw Error(r(407));i=i()}else i=n();var x=!jn((dt||f).memoizedState,i);if(x&&(f.memoizedState=i,Bt=!0),f=f.queue,gc(Im.bind(null,o,f,e),[e]),f.getSnapshot!==n||x||Ut!==null&&Ut.memoizedState.tag&1){if(o.flags|=2048,Ci(9,{destroy:void 0},Hm.bind(null,o,f,i,n),null),vt===null)throw Error(r(349));m||(Ll&127)!==0||Bm(o,n,i)}return i}function Bm(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=qe.updateQueue,n===null?(n=Po(),qe.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function Hm(e,n,i,o){n.value=i,n.getSnapshot=o,qm(n)&&Fm(e)}function Im(e,n,i){return i(function(){qm(n)&&Fm(e)})}function qm(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!jn(e,i)}catch{return!0}}function Fm(e){var n=Ia(e,2);n!==null&&An(n,e,2)}function mc(e){var n=hn();if(typeof e=="function"){var i=e;if(e=i(),Qa){gt(!0);try{i()}finally{gt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ul,lastRenderedState:e},n}function Gm(e,n,i,o){return e.baseState=i,dc(e,dt,typeof o=="function"?o:Ul)}function g1(e,n,i,o,f){if(Zo(e))throw Error(r(485));if(e=n.action,e!==null){var m={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){m.listeners.push(x)}};B.T!==null?i(!0):m.isTransition=!1,o(m),i=n.pending,i===null?(m.next=n.pending=m,Ym(n,m)):(m.next=i.next,n.pending=i.next=m)}}function Ym(e,n){var i=n.action,o=n.payload,f=e.state;if(n.isTransition){var m=B.T,x={};B.T=x;try{var w=i(f,o),L=B.S;L!==null&&L(x,w),Vm(e,n,w)}catch($){pc(e,n,$)}finally{m!==null&&x.types!==null&&(m.types=x.types),B.T=m}}else try{m=i(f,o),Vm(e,n,m)}catch($){pc(e,n,$)}}function Vm(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){Pm(e,n,o)},function(o){return pc(e,n,o)}):Pm(e,n,i)}function Pm(e,n,i){n.status="fulfilled",n.value=i,Xm(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,Ym(e,i)))}function pc(e,n,i){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=i,Xm(n),n=n.next;while(n!==o)}e.action=null}function Xm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function $m(e,n){return n}function Qm(e,n){if(lt){var i=vt.formState;if(i!==null){e:{var o=qe;if(lt){if(wt){t:{for(var f=wt,m=Qn;f.nodeType!==8;){if(!m){f=null;break t}if(f=Zn(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){wt=Zn(f.nextSibling),o=f.data==="F!";break e}}la(o)}o=!1}o&&(n=i[0])}}return i=hn(),i.memoizedState=i.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$m,lastRenderedState:n},i.queue=o,i=mp.bind(null,qe,o),o.dispatch=i,o=mc(!1),m=Sc.bind(null,qe,!1,o.queue),o=hn(),f={state:n,dispatch:null,action:e,pending:null},o.queue=f,i=g1.bind(null,qe,f,m,i),f.dispatch=i,o.memoizedState=e,[n,i,!1]}function Km(e){var n=Mt();return Zm(n,dt,e)}function Zm(e,n,i){if(n=dc(e,n,$m)[0],e=$o(Ul)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=pr(n)}catch(x){throw x===xi?Bo:x}else o=n;n=Mt();var f=n.queue,m=f.dispatch;return i!==n.memoizedState&&(qe.flags|=2048,Ci(9,{destroy:void 0},y1.bind(null,f,i),null)),[o,m,e]}function y1(e,n){e.action=n}function Jm(e){var n=Mt(),i=dt;if(i!==null)return Zm(n,i,e);Mt(),n=n.memoizedState,i=Mt();var o=i.queue.dispatch;return i.memoizedState=e,[n,o,!1]}function Ci(e,n,i,o){return e={tag:e,create:i,deps:o,inst:n,next:null},n=qe.updateQueue,n===null&&(n=Po(),qe.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=e.next=e:(o=i.next,i.next=e,e.next=o,n.lastEffect=e),e}function Wm(){return Mt().memoizedState}function Qo(e,n,i,o){var f=hn();qe.flags|=e,f.memoizedState=Ci(1|n,{destroy:void 0},i,o===void 0?null:o)}function Ko(e,n,i,o){var f=Mt();o=o===void 0?null:o;var m=f.memoizedState.inst;dt!==null&&o!==null&&rc(o,dt.memoizedState.deps)?f.memoizedState=Ci(n,m,i,o):(qe.flags|=e,f.memoizedState=Ci(1|n,m,i,o))}function ep(e,n){Qo(8390656,8,e,n)}function gc(e,n){Ko(2048,8,e,n)}function v1(e){qe.flags|=4;var n=qe.updateQueue;if(n===null)n=Po(),qe.updateQueue=n,n.events=[e];else{var i=n.events;i===null?n.events=[e]:i.push(e)}}function tp(e){var n=Mt().memoizedState;return v1({ref:n,nextImpl:e}),function(){if((st&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function np(e,n){return Ko(4,2,e,n)}function lp(e,n){return Ko(4,4,e,n)}function ap(e,n){if(typeof n=="function"){e=e();var i=n(e);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function ip(e,n,i){i=i!=null?i.concat([e]):null,Ko(4,4,ap.bind(null,n,e),i)}function yc(){}function rp(e,n){var i=Mt();n=n===void 0?null:n;var o=i.memoizedState;return n!==null&&rc(n,o[1])?o[0]:(i.memoizedState=[e,n],e)}function op(e,n){var i=Mt();n=n===void 0?null:n;var o=i.memoizedState;if(n!==null&&rc(n,o[1]))return o[0];if(o=e(),Qa){gt(!0);try{e()}finally{gt(!1)}}return i.memoizedState=[o,n],o}function vc(e,n,i){return i===void 0||(Ll&1073741824)!==0&&(We&261930)===0?e.memoizedState=n:(e.memoizedState=i,e=ug(),qe.lanes|=e,da|=e,i)}function up(e,n,i,o){return jn(i,n)?i:Ei.current!==null?(e=vc(e,i,o),jn(e,n)||(Bt=!0),e):(Ll&42)===0||(Ll&1073741824)!==0&&(We&261930)===0?(Bt=!0,e.memoizedState=i):(e=ug(),qe.lanes|=e,da|=e,n)}function sp(e,n,i,o,f){var m=ee.p;ee.p=m!==0&&8>m?m:8;var x=B.T,w={};B.T=w,Sc(e,!1,n,i);try{var L=f(),$=B.S;if($!==null&&$(w,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var re=h1(L,o);gr(e,n,re,Bn(e))}else gr(e,n,o,Bn(e))}catch(se){gr(e,n,{then:function(){},status:"rejected",reason:se},Bn())}finally{ee.p=m,x!==null&&w.types!==null&&(x.types=w.types),B.T=x}}function b1(){}function bc(e,n,i,o){if(e.tag!==5)throw Error(r(476));var f=cp(e).queue;sp(e,f,n,ie,i===null?b1:function(){return fp(e),i(o)})}function cp(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ul,lastRenderedState:ie},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ul,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function fp(e){var n=cp(e);n.next===null&&(n=e.alternate.memoizedState),gr(e,n.next.queue,{},Bn())}function xc(){return Wt(Or)}function dp(){return Mt().memoizedState}function hp(){return Mt().memoizedState}function x1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=Bn();e=ra(i);var o=oa(n,e,i);o!==null&&(An(o,n,i),fr(o,n,i)),n={cache:Qs()},e.payload=n;return}n=n.return}}function S1(e,n,i){var o=Bn();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Zo(e)?pp(n,i):(i=Bs(e,n,i,o),i!==null&&(An(i,e,o),gp(i,n,o)))}function mp(e,n,i){var o=Bn();gr(e,n,i,o)}function gr(e,n,i,o){var f={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Zo(e))pp(n,f);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var x=n.lastRenderedState,w=m(x,i);if(f.hasEagerState=!0,f.eagerState=w,jn(w,x))return No(e,n,f,0),vt===null&&Do(),!1}catch{}if(i=Bs(e,n,f,o),i!==null)return An(i,e,o),gp(i,n,o),!0}return!1}function Sc(e,n,i,o){if(o={lane:2,revertLane:Wc(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Zo(e)){if(n)throw Error(r(479))}else n=Bs(e,i,o,2),n!==null&&An(n,e,2)}function Zo(e){var n=e.alternate;return e===qe||n!==null&&n===qe}function pp(e,n){wi=Yo=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function gp(e,n,i){if((i&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,i|=o,n.lanes=i,z(e,i)}}var yr={readContext:Wt,use:Xo,useCallback:Dt,useContext:Dt,useEffect:Dt,useImperativeHandle:Dt,useLayoutEffect:Dt,useInsertionEffect:Dt,useMemo:Dt,useReducer:Dt,useRef:Dt,useState:Dt,useDebugValue:Dt,useDeferredValue:Dt,useTransition:Dt,useSyncExternalStore:Dt,useId:Dt,useHostTransitionStatus:Dt,useFormState:Dt,useActionState:Dt,useOptimistic:Dt,useMemoCache:Dt,useCacheRefresh:Dt};yr.useEffectEvent=Dt;var yp={readContext:Wt,use:Xo,useCallback:function(e,n){return hn().memoizedState=[e,n===void 0?null:n],e},useContext:Wt,useEffect:ep,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,Qo(4194308,4,ap.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Qo(4194308,4,e,n)},useInsertionEffect:function(e,n){Qo(4,2,e,n)},useMemo:function(e,n){var i=hn();n=n===void 0?null:n;var o=e();if(Qa){gt(!0);try{e()}finally{gt(!1)}}return i.memoizedState=[o,n],o},useReducer:function(e,n,i){var o=hn();if(i!==void 0){var f=i(n);if(Qa){gt(!0);try{i(n)}finally{gt(!1)}}}else f=n;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=S1.bind(null,qe,e),[o.memoizedState,e]},useRef:function(e){var n=hn();return e={current:e},n.memoizedState=e},useState:function(e){e=mc(e);var n=e.queue,i=mp.bind(null,qe,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:yc,useDeferredValue:function(e,n){var i=hn();return vc(i,e,n)},useTransition:function(){var e=mc(!1);return e=sp.bind(null,qe,e.queue,!0,!1),hn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var o=qe,f=hn();if(lt){if(i===void 0)throw Error(r(407));i=i()}else{if(i=n(),vt===null)throw Error(r(349));(We&127)!==0||Bm(o,n,i)}f.memoizedState=i;var m={value:i,getSnapshot:n};return f.queue=m,ep(Im.bind(null,o,m,e),[e]),o.flags|=2048,Ci(9,{destroy:void 0},Hm.bind(null,o,m,i,n),null),i},useId:function(){var e=hn(),n=vt.identifierPrefix;if(lt){var i=bl,o=vl;i=(o&~(1<<32-Pe(o)-1)).toString(32)+i,n="_"+n+"R_"+i,i=Vo++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=m1++,n="_"+n+"r_"+i.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:xc,useFormState:Qm,useActionState:Qm,useOptimistic:function(e){var n=hn();n.memoizedState=n.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=Sc.bind(null,qe,!0,i),i.dispatch=n,[e,n]},useMemoCache:fc,useCacheRefresh:function(){return hn().memoizedState=x1.bind(null,qe)},useEffectEvent:function(e){var n=hn(),i={impl:e};return n.memoizedState=i,function(){if((st&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},Ec={readContext:Wt,use:Xo,useCallback:rp,useContext:Wt,useEffect:gc,useImperativeHandle:ip,useInsertionEffect:np,useLayoutEffect:lp,useMemo:op,useReducer:$o,useRef:Wm,useState:function(){return $o(Ul)},useDebugValue:yc,useDeferredValue:function(e,n){var i=Mt();return up(i,dt.memoizedState,e,n)},useTransition:function(){var e=$o(Ul)[0],n=Mt().memoizedState;return[typeof e=="boolean"?e:pr(e),n]},useSyncExternalStore:Um,useId:dp,useHostTransitionStatus:xc,useFormState:Km,useActionState:Km,useOptimistic:function(e,n){var i=Mt();return Gm(i,dt,e,n)},useMemoCache:fc,useCacheRefresh:hp};Ec.useEffectEvent=tp;var vp={readContext:Wt,use:Xo,useCallback:rp,useContext:Wt,useEffect:gc,useImperativeHandle:ip,useInsertionEffect:np,useLayoutEffect:lp,useMemo:op,useReducer:hc,useRef:Wm,useState:function(){return hc(Ul)},useDebugValue:yc,useDeferredValue:function(e,n){var i=Mt();return dt===null?vc(i,e,n):up(i,dt.memoizedState,e,n)},useTransition:function(){var e=hc(Ul)[0],n=Mt().memoizedState;return[typeof e=="boolean"?e:pr(e),n]},useSyncExternalStore:Um,useId:dp,useHostTransitionStatus:xc,useFormState:Jm,useActionState:Jm,useOptimistic:function(e,n){var i=Mt();return dt!==null?Gm(i,dt,e,n):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:fc,useCacheRefresh:hp};vp.useEffectEvent=tp;function wc(e,n,i,o){n=e.memoizedState,i=i(o,n),i=i==null?n:g({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Tc={enqueueSetState:function(e,n,i){e=e._reactInternals;var o=Bn(),f=ra(o);f.payload=n,i!=null&&(f.callback=i),n=oa(e,f,o),n!==null&&(An(n,e,o),fr(n,e,o))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var o=Bn(),f=ra(o);f.tag=1,f.payload=n,i!=null&&(f.callback=i),n=oa(e,f,o),n!==null&&(An(n,e,o),fr(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=Bn(),o=ra(i);o.tag=2,n!=null&&(o.callback=n),n=oa(e,o,i),n!==null&&(An(n,e,i),fr(n,e,i))}};function bp(e,n,i,o,f,m,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,m,x):n.prototype&&n.prototype.isPureReactComponent?!lr(i,o)||!lr(f,m):!0}function xp(e,n,i,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,o),n.state!==e&&Tc.enqueueReplaceState(n,n.state,null)}function Ka(e,n){var i=n;if("ref"in n){i={};for(var o in n)o!=="ref"&&(i[o]=n[o])}if(e=e.defaultProps){i===n&&(i=g({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function Sp(e){Ro(e)}function Ep(e){console.error(e)}function wp(e){Ro(e)}function Jo(e,n){try{var i=e.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function Tp(e,n,i){try{var o=e.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Cc(e,n,i){return i=ra(i),i.tag=3,i.payload={element:null},i.callback=function(){Jo(e,n)},i}function Cp(e){return e=ra(e),e.tag=3,e}function kp(e,n,i,o){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var m=o.value;e.payload=function(){return f(m)},e.callback=function(){Tp(n,i,o)}}var x=i.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Tp(n,i,o),typeof f!="function"&&(ha===null?ha=new Set([this]):ha.add(this));var w=o.stack;this.componentDidCatch(o.value,{componentStack:w!==null?w:""})})}function E1(e,n,i,o,f){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=i.alternate,n!==null&&yi(n,i,f,!0),i=Mn.current,i!==null){switch(i.tag){case 31:case 13:return Kn===null?cu():i.alternate===null&&Nt===0&&(Nt=3),i.flags&=-257,i.flags|=65536,i.lanes=f,o===Ho?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([o]):n.add(o),Kc(e,o,f)),!1;case 22:return i.flags|=65536,o===Ho?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([o]):i.add(o)),Kc(e,o,f)),!1}throw Error(r(435,i.tag))}return Kc(e,o,f),cu(),!1}if(lt)return n=Mn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,o!==Ys&&(e=Error(r(422),{cause:o}),rr(Pn(e,i)))):(o!==Ys&&(n=Error(r(423),{cause:o}),rr(Pn(n,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=Pn(o,i),f=Cc(e.stateNode,o,f),tc(e,f),Nt!==4&&(Nt=2)),!1;var m=Error(r(520),{cause:o});if(m=Pn(m,i),Cr===null?Cr=[m]:Cr.push(m),Nt!==4&&(Nt=2),n===null)return!0;o=Pn(o,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=Cc(i.stateNode,o,e),tc(i,e),!1;case 1:if(n=i.type,m=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(ha===null||!ha.has(m))))return i.flags|=65536,f&=-f,i.lanes|=f,f=Cp(f),kp(f,e,i,o),tc(i,f),!1}i=i.return}while(i!==null);return!1}var kc=Error(r(461)),Bt=!1;function en(e,n,i,o){n.child=e===null?Dm(n,null,i,o):$a(n,e.child,i,o)}function Ap(e,n,i,o,f){i=i.render;var m=n.ref;if("ref"in o){var x={};for(var w in o)w!=="ref"&&(x[w]=o[w])}else x=o;return Ya(n),o=oc(e,n,i,x,m,f),w=uc(),e!==null&&!Bt?(sc(e,n,f),Bl(e,n,f)):(lt&&w&&Fs(n),n.flags|=1,en(e,n,o,f),n.child)}function _p(e,n,i,o,f){if(e===null){var m=i.type;return typeof m=="function"&&!Hs(m)&&m.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=m,Rp(e,n,m,o,f)):(e=Oo(i.type,null,o,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(m=e.child,!Mc(e,f)){var x=m.memoizedProps;if(i=i.compare,i=i!==null?i:lr,i(x,o)&&e.ref===n.ref)return Bl(e,n,f)}return n.flags|=1,e=jl(m,o),e.ref=n.ref,e.return=n,n.child=e}function Rp(e,n,i,o,f){if(e!==null){var m=e.memoizedProps;if(lr(m,o)&&e.ref===n.ref)if(Bt=!1,n.pendingProps=o=m,Mc(e,f))(e.flags&131072)!==0&&(Bt=!0);else return n.lanes=e.lanes,Bl(e,n,f)}return Ac(e,n,i,o,f)}function Dp(e,n,i,o){var f=o.children,m=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(m=m!==null?m.baseLanes|i:i,e!==null){for(o=n.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~m}else o=0,n.child=null;return Np(e,n,m,i,o)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Uo(n,m!==null?m.cachePool:null),m!==null?Om(n,m):lc(),Mm(n);else return o=n.lanes=536870912,Np(e,n,m!==null?m.baseLanes|i:i,i,o)}else m!==null?(Uo(n,m.cachePool),Om(n,m),sa(),n.memoizedState=null):(e!==null&&Uo(n,null),lc(),sa());return en(e,n,f,i),n.child}function vr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Np(e,n,i,o,f){var m=Zs();return m=m===null?null:{parent:Lt._currentValue,pool:m},n.memoizedState={baseLanes:i,cachePool:m},e!==null&&Uo(n,null),lc(),Mm(n),e!==null&&yi(e,n,o,!0),n.childLanes=f,null}function Wo(e,n){return n=tu({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function jp(e,n,i){return $a(n,e.child,null,i),e=Wo(n,n.pendingProps),e.flags|=2,zn(n),n.memoizedState=null,e}function w1(e,n,i){var o=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(lt){if(o.mode==="hidden")return e=Wo(n,o),n.lanes=536870912,vr(null,e);if(ic(n),(e=wt)?(e=Yg(e,Qn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ta!==null?{id:vl,overflow:bl}:null,retryLane:536870912,hydrationErrors:null},i=pm(e),i.return=n,n.child=i,Jt=n,wt=null)):e=null,e===null)throw la(n);return n.lanes=536870912,null}return Wo(n,o)}var m=e.memoizedState;if(m!==null){var x=m.dehydrated;if(ic(n),f)if(n.flags&256)n.flags&=-257,n=jp(e,n,i);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(Bt||yi(e,n,i,!1),f=(i&e.childLanes)!==0,Bt||f){if(o=vt,o!==null&&(x=G(o,i),x!==0&&x!==m.retryLane))throw m.retryLane=x,Ia(e,x),An(o,e,x),kc;cu(),n=jp(e,n,i)}else e=m.treeContext,wt=Zn(x.nextSibling),Jt=n,lt=!0,na=null,Qn=!1,e!==null&&vm(n,e),n=Wo(n,o),n.flags|=4096;return n}return e=jl(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function eu(e,n){var i=n.ref;if(i===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(e===null||e.ref!==i)&&(n.flags|=4194816)}}function Ac(e,n,i,o,f){return Ya(n),i=oc(e,n,i,o,void 0,f),o=uc(),e!==null&&!Bt?(sc(e,n,f),Bl(e,n,f)):(lt&&o&&Fs(n),n.flags|=1,en(e,n,i,f),n.child)}function Op(e,n,i,o,f,m){return Ya(n),n.updateQueue=null,i=Lm(n,o,i,f),zm(e),o=uc(),e!==null&&!Bt?(sc(e,n,m),Bl(e,n,m)):(lt&&o&&Fs(n),n.flags|=1,en(e,n,i,m),n.child)}function Mp(e,n,i,o,f){if(Ya(n),n.stateNode===null){var m=hi,x=i.contextType;typeof x=="object"&&x!==null&&(m=Wt(x)),m=new i(o,m),n.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Tc,n.stateNode=m,m._reactInternals=n,m=n.stateNode,m.props=o,m.state=n.memoizedState,m.refs={},Ws(n),x=i.contextType,m.context=typeof x=="object"&&x!==null?Wt(x):hi,m.state=n.memoizedState,x=i.getDerivedStateFromProps,typeof x=="function"&&(wc(n,i,x,o),m.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(x=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),x!==m.state&&Tc.enqueueReplaceState(m,m.state,null),hr(n,o,m,f),dr(),m.state=n.memoizedState),typeof m.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){m=n.stateNode;var w=n.memoizedProps,L=Ka(i,w);m.props=L;var $=m.context,re=i.contextType;x=hi,typeof re=="object"&&re!==null&&(x=Wt(re));var se=i.getDerivedStateFromProps;re=typeof se=="function"||typeof m.getSnapshotBeforeUpdate=="function",w=n.pendingProps!==w,re||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(w||$!==x)&&xp(n,m,o,x),ia=!1;var K=n.memoizedState;m.state=K,hr(n,o,m,f),dr(),$=n.memoizedState,w||K!==$||ia?(typeof se=="function"&&(wc(n,i,se,o),$=n.memoizedState),(L=ia||bp(n,i,L,o,K,$,x))?(re||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"&&(n.flags|=4194308)):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=$),m.props=o,m.state=$,m.context=x,o=L):(typeof m.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{m=n.stateNode,ec(e,n),x=n.memoizedProps,re=Ka(i,x),m.props=re,se=n.pendingProps,K=m.context,$=i.contextType,L=hi,typeof $=="object"&&$!==null&&(L=Wt($)),w=i.getDerivedStateFromProps,($=typeof w=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(x!==se||K!==L)&&xp(n,m,o,L),ia=!1,K=n.memoizedState,m.state=K,hr(n,o,m,f),dr();var te=n.memoizedState;x!==se||K!==te||ia||e!==null&&e.dependencies!==null&&zo(e.dependencies)?(typeof w=="function"&&(wc(n,i,w,o),te=n.memoizedState),(re=ia||bp(n,i,re,o,K,te,L)||e!==null&&e.dependencies!==null&&zo(e.dependencies))?($||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(o,te,L),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(o,te,L)),typeof m.componentDidUpdate=="function"&&(n.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof m.componentDidUpdate!="function"||x===e.memoizedProps&&K===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&K===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=te),m.props=o,m.state=te,m.context=L,o=re):(typeof m.componentDidUpdate!="function"||x===e.memoizedProps&&K===e.memoizedState||(n.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&K===e.memoizedState||(n.flags|=1024),o=!1)}return m=o,eu(e,n),o=(n.flags&128)!==0,m||o?(m=n.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:m.render(),n.flags|=1,e!==null&&o?(n.child=$a(n,e.child,null,f),n.child=$a(n,null,i,f)):en(e,n,i,f),n.memoizedState=m.state,e=n.child):e=Bl(e,n,f),e}function zp(e,n,i,o){return Fa(),n.flags|=256,en(e,n,i,o),n.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Rc(e){return{baseLanes:e,cachePool:Tm()}}function Dc(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=Un),e}function Lp(e,n,i){var o=n.pendingProps,f=!1,m=(n.flags&128)!==0,x;if((x=m)||(x=e!==null&&e.memoizedState===null?!1:(Ot.current&2)!==0),x&&(f=!0,n.flags&=-129),x=(n.flags&32)!==0,n.flags&=-33,e===null){if(lt){if(f?ua(n):sa(),(e=wt)?(e=Yg(e,Qn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ta!==null?{id:vl,overflow:bl}:null,retryLane:536870912,hydrationErrors:null},i=pm(e),i.return=n,n.child=i,Jt=n,wt=null)):e=null,e===null)throw la(n);return hf(e)?n.lanes=32:n.lanes=536870912,null}var w=o.children;return o=o.fallback,f?(sa(),f=n.mode,w=tu({mode:"hidden",children:w},f),o=qa(o,f,i,null),w.return=n,o.return=n,w.sibling=o,n.child=w,o=n.child,o.memoizedState=Rc(i),o.childLanes=Dc(e,x,i),n.memoizedState=_c,vr(null,o)):(ua(n),Nc(n,w))}var L=e.memoizedState;if(L!==null&&(w=L.dehydrated,w!==null)){if(m)n.flags&256?(ua(n),n.flags&=-257,n=jc(e,n,i)):n.memoizedState!==null?(sa(),n.child=e.child,n.flags|=128,n=null):(sa(),w=o.fallback,f=n.mode,o=tu({mode:"visible",children:o.children},f),w=qa(w,f,i,null),w.flags|=2,o.return=n,w.return=n,o.sibling=w,n.child=o,$a(n,e.child,null,i),o=n.child,o.memoizedState=Rc(i),o.childLanes=Dc(e,x,i),n.memoizedState=_c,n=vr(null,o));else if(ua(n),hf(w)){if(x=w.nextSibling&&w.nextSibling.dataset,x)var $=x.dgst;x=$,o=Error(r(419)),o.stack="",o.digest=x,rr({value:o,source:null,stack:null}),n=jc(e,n,i)}else if(Bt||yi(e,n,i,!1),x=(i&e.childLanes)!==0,Bt||x){if(x=vt,x!==null&&(o=G(x,i),o!==0&&o!==L.retryLane))throw L.retryLane=o,Ia(e,o),An(x,e,o),kc;df(w)||cu(),n=jc(e,n,i)}else df(w)?(n.flags|=192,n.child=e.child,n=null):(e=L.treeContext,wt=Zn(w.nextSibling),Jt=n,lt=!0,na=null,Qn=!1,e!==null&&vm(n,e),n=Nc(n,o.children),n.flags|=4096);return n}return f?(sa(),w=o.fallback,f=n.mode,L=e.child,$=L.sibling,o=jl(L,{mode:"hidden",children:o.children}),o.subtreeFlags=L.subtreeFlags&65011712,$!==null?w=jl($,w):(w=qa(w,f,i,null),w.flags|=2),w.return=n,o.return=n,o.sibling=w,n.child=o,vr(null,o),o=n.child,w=e.child.memoizedState,w===null?w=Rc(i):(f=w.cachePool,f!==null?(L=Lt._currentValue,f=f.parent!==L?{parent:L,pool:L}:f):f=Tm(),w={baseLanes:w.baseLanes|i,cachePool:f}),o.memoizedState=w,o.childLanes=Dc(e,x,i),n.memoizedState=_c,vr(e.child,o)):(ua(n),i=e.child,e=i.sibling,i=jl(i,{mode:"visible",children:o.children}),i.return=n,i.sibling=null,e!==null&&(x=n.deletions,x===null?(n.deletions=[e],n.flags|=16):x.push(e)),n.child=i,n.memoizedState=null,i)}function Nc(e,n){return n=tu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function tu(e,n){return e=On(22,e,null,n),e.lanes=0,e}function jc(e,n,i){return $a(n,e.child,null,i),e=Nc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Up(e,n,i){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Xs(e.return,n,i)}function Oc(e,n,i,o,f,m){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:f,treeForkCount:m}:(x.isBackwards=n,x.rendering=null,x.renderingStartTime=0,x.last=o,x.tail=i,x.tailMode=f,x.treeForkCount=m)}function Bp(e,n,i){var o=n.pendingProps,f=o.revealOrder,m=o.tail;o=o.children;var x=Ot.current,w=(x&2)!==0;if(w?(x=x&1|2,n.flags|=128):x&=1,C(Ot,x),en(e,n,o,i),o=lt?ir:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Up(e,i,n);else if(e.tag===19)Up(e,i,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(i=n.child,f=null;i!==null;)e=i.alternate,e!==null&&Go(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=n.child,n.child=null):(f=i.sibling,i.sibling=null),Oc(n,!1,f,i,m,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Go(e)===null){n.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}Oc(n,!0,i,null,m,o);break;case"together":Oc(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function Bl(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),da|=n.lanes,(i&n.childLanes)===0)if(e!==null){if(yi(e,n,i,!1),(i&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,i=jl(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=jl(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function Mc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&zo(e)))}function T1(e,n,i){switch(n.tag){case 3:ve(n,n.stateNode.containerInfo),aa(n,Lt,e.memoizedState.cache),Fa();break;case 27:case 5:At(n);break;case 4:ve(n,n.stateNode.containerInfo);break;case 10:aa(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,ic(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(ua(n),n.flags|=128,null):(i&n.child.childLanes)!==0?Lp(e,n,i):(ua(n),e=Bl(e,n,i),e!==null?e.sibling:null);ua(n);break;case 19:var f=(e.flags&128)!==0;if(o=(i&n.childLanes)!==0,o||(yi(e,n,i,!1),o=(i&n.childLanes)!==0),f){if(o)return Bp(e,n,i);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),C(Ot,Ot.current),o)break;return null;case 22:return n.lanes=0,Dp(e,n,i,n.pendingProps);case 24:aa(n,Lt,e.memoizedState.cache)}return Bl(e,n,i)}function Hp(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)Bt=!0;else{if(!Mc(e,i)&&(n.flags&128)===0)return Bt=!1,T1(e,n,i);Bt=(e.flags&131072)!==0}else Bt=!1,lt&&(n.flags&1048576)!==0&&ym(n,ir,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=Pa(n.elementType),n.type=e,typeof e=="function")Hs(e)?(o=Ka(e,o),n.tag=1,n=Mp(null,n,e,o,i)):(n.tag=0,n=Ac(null,n,e,o,i));else{if(e!=null){var f=e.$$typeof;if(f===J){n.tag=11,n=Ap(null,n,e,o,i);break e}else if(f===O){n.tag=14,n=_p(null,n,e,o,i);break e}}throw n=ue(e)||e,Error(r(306,n,""))}}return n;case 0:return Ac(e,n,n.type,n.pendingProps,i);case 1:return o=n.type,f=Ka(o,n.pendingProps),Mp(e,n,o,f,i);case 3:e:{if(ve(n,n.stateNode.containerInfo),e===null)throw Error(r(387));o=n.pendingProps;var m=n.memoizedState;f=m.element,ec(e,n),hr(n,o,null,i);var x=n.memoizedState;if(o=x.cache,aa(n,Lt,o),o!==m.cache&&$s(n,[Lt],i,!0),dr(),o=x.element,m.isDehydrated)if(m={element:o,isDehydrated:!1,cache:x.cache},n.updateQueue.baseState=m,n.memoizedState=m,n.flags&256){n=zp(e,n,o,i);break e}else if(o!==f){f=Pn(Error(r(424)),n),rr(f),n=zp(e,n,o,i);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,wt=Zn(e.firstChild),Jt=n,lt=!0,na=null,Qn=!0,i=Dm(n,null,o,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Fa(),o===f){n=Bl(e,n,i);break e}en(e,n,o,i)}n=n.child}return n;case 26:return eu(e,n),e===null?(i=Kg(n.type,null,n.pendingProps,null))?n.memoizedState=i:lt||(i=n.type,e=n.pendingProps,o=yu(Te.current).createElement(i),o[Se]=n,o[xe]=e,tn(o,i,e),Be(o),n.stateNode=o):n.memoizedState=Kg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return At(n),e===null&<&&(o=n.stateNode=Xg(n.type,n.pendingProps,Te.current),Jt=n,Qn=!0,f=wt,ya(n.type)?(mf=f,wt=Zn(o.firstChild)):wt=f),en(e,n,n.pendingProps.children,i),eu(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&<&&((f=o=wt)&&(o=eS(o,n.type,n.pendingProps,Qn),o!==null?(n.stateNode=o,Jt=n,wt=Zn(o.firstChild),Qn=!1,f=!0):f=!1),f||la(n)),At(n),f=n.type,m=n.pendingProps,x=e!==null?e.memoizedProps:null,o=m.children,sf(f,m)?o=null:x!==null&&sf(f,x)&&(n.flags|=32),n.memoizedState!==null&&(f=oc(e,n,p1,null,null,i),Or._currentValue=f),eu(e,n),en(e,n,o,i),n.child;case 6:return e===null&<&&((e=i=wt)&&(i=tS(i,n.pendingProps,Qn),i!==null?(n.stateNode=i,Jt=n,wt=null,e=!0):e=!1),e||la(n)),null;case 13:return Lp(e,n,i);case 4:return ve(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=$a(n,null,o,i):en(e,n,o,i),n.child;case 11:return Ap(e,n,n.type,n.pendingProps,i);case 7:return en(e,n,n.pendingProps,i),n.child;case 8:return en(e,n,n.pendingProps.children,i),n.child;case 12:return en(e,n,n.pendingProps.children,i),n.child;case 10:return o=n.pendingProps,aa(n,n.type,o.value),en(e,n,o.children,i),n.child;case 9:return f=n.type._context,o=n.pendingProps.children,Ya(n),f=Wt(f),o=o(f),n.flags|=1,en(e,n,o,i),n.child;case 14:return _p(e,n,n.type,n.pendingProps,i);case 15:return Rp(e,n,n.type,n.pendingProps,i);case 19:return Bp(e,n,i);case 31:return w1(e,n,i);case 22:return Dp(e,n,i,n.pendingProps);case 24:return Ya(n),o=Wt(Lt),e===null?(f=Zs(),f===null&&(f=vt,m=Qs(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=i),f=m),n.memoizedState={parent:o,cache:f},Ws(n),aa(n,Lt,f)):((e.lanes&i)!==0&&(ec(e,n),hr(n,null,null,i),dr()),f=e.memoizedState,m=n.memoizedState,f.parent!==o?(f={parent:o,cache:o},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),aa(n,Lt,o)):(o=m.cache,aa(n,Lt,o),o!==f.cache&&$s(n,[Lt],i,!0))),en(e,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function Hl(e){e.flags|=4}function zc(e,n,i,o,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(dg())e.flags|=8192;else throw Xa=Ho,Js}else e.flags&=-16777217}function Ip(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ty(n))if(dg())e.flags|=8192;else throw Xa=Ho,Js}function nu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Sn():536870912,e.lanes|=n,Ri|=n)}function br(e,n){if(!lt)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Tt(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,o=0;if(n)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=i,n}function C1(e,n,i){var o=n.pendingProps;switch(Gs(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(n),null;case 1:return Tt(n),null;case 3:return i=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),zl(Lt),Oe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(gi(n)?Hl(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Vs())),Tt(n),null;case 26:var f=n.type,m=n.memoizedState;return e===null?(Hl(n),m!==null?(Tt(n),Ip(n,m)):(Tt(n),zc(n,f,null,o,i))):m?m!==e.memoizedState?(Hl(n),Tt(n),Ip(n,m)):(Tt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&Hl(n),Tt(n),zc(n,f,e,o,i)),null;case 27:if(vn(n),i=Te.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Hl(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Tt(n),null}e=de.current,gi(n)?bm(n):(e=Xg(f,o,i),n.stateNode=e,Hl(n))}return Tt(n),null;case 5:if(vn(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Hl(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Tt(n),null}if(m=de.current,gi(n))bm(n);else{var x=yu(Te.current);switch(m){case 1:m=x.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=x.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=x.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=x.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=x.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof o.is=="string"?x.createElement("select",{is:o.is}):x.createElement("select"),o.multiple?m.multiple=!0:o.size&&(m.size=o.size);break;default:m=typeof o.is=="string"?x.createElement(f,{is:o.is}):x.createElement(f)}}m[Se]=n,m[xe]=o;e:for(x=n.child;x!==null;){if(x.tag===5||x.tag===6)m.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===n)break e;for(;x.sibling===null;){if(x.return===null||x.return===n)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}n.stateNode=m;e:switch(tn(m,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Hl(n)}}return Tt(n),zc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,i),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&Hl(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(r(166));if(e=Te.current,gi(n)){if(e=n.stateNode,i=n.memoizedProps,o=null,f=Jt,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[Se]=n,e=!!(e.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||Lg(e.nodeValue,i)),e||la(n,!0)}else e=yu(e).createTextNode(o),e[Se]=n,n.stateNode=e}return Tt(n),null;case 31:if(i=n.memoizedState,e===null||e.memoizedState!==null){if(o=gi(n),i!==null){if(e===null){if(!o)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Se]=n}else Fa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Tt(n),e=!1}else i=Vs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return n.flags&256?(zn(n),n):(zn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Tt(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=gi(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Se]=n}else Fa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Tt(n),f=!1}else f=Vs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(zn(n),n):(zn(n),null)}return zn(n),(n.flags&128)!==0?(n.lanes=i,n):(i=o!==null,e=e!==null&&e.memoizedState!==null,i&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),m=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),m!==f&&(o.flags|=2048)),i!==e&&i&&(n.child.flags|=8192),nu(n,n.updateQueue),Tt(n),null);case 4:return Oe(),e===null&&lf(n.stateNode.containerInfo),Tt(n),null;case 10:return zl(n.type),Tt(n),null;case 19:if(Z(Ot),o=n.memoizedState,o===null)return Tt(n),null;if(f=(n.flags&128)!==0,m=o.rendering,m===null)if(f)br(o,!1);else{if(Nt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(m=Go(e),m!==null){for(n.flags|=128,br(o,!1),e=m.updateQueue,n.updateQueue=e,nu(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)mm(i,e),i=i.sibling;return C(Ot,Ot.current&1|2),lt&&Ol(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&pt()>ou&&(n.flags|=128,f=!0,br(o,!1),n.lanes=4194304)}else{if(!f)if(e=Go(m),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,nu(n,e),br(o,!0),o.tail===null&&o.tailMode==="hidden"&&!m.alternate&&!lt)return Tt(n),null}else 2*pt()-o.renderingStartTime>ou&&i!==536870912&&(n.flags|=128,f=!0,br(o,!1),n.lanes=4194304);o.isBackwards?(m.sibling=n.child,n.child=m):(e=o.last,e!==null?e.sibling=m:n.child=m,o.last=m)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=pt(),e.sibling=null,i=Ot.current,C(Ot,f?i&1|2:i&1),lt&&Ol(n,o.treeForkCount),e):(Tt(n),null);case 22:case 23:return zn(n),ac(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(i&536870912)!==0&&(n.flags&128)===0&&(Tt(n),n.subtreeFlags&6&&(n.flags|=8192)):Tt(n),i=n.updateQueue,i!==null&&nu(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==i&&(n.flags|=2048),e!==null&&Z(Va),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),zl(Lt),Tt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function k1(e,n){switch(Gs(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return zl(Lt),Oe(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return vn(n),null;case 31:if(n.memoizedState!==null){if(zn(n),n.alternate===null)throw Error(r(340));Fa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(zn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Fa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Z(Ot),null;case 4:return Oe(),null;case 10:return zl(n.type),null;case 22:case 23:return zn(n),ac(),e!==null&&Z(Va),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return zl(Lt),null;case 25:return null;default:return null}}function qp(e,n){switch(Gs(n),n.tag){case 3:zl(Lt),Oe();break;case 26:case 27:case 5:vn(n);break;case 4:Oe();break;case 31:n.memoizedState!==null&&zn(n);break;case 13:zn(n);break;case 19:Z(Ot);break;case 10:zl(n.type);break;case 22:case 23:zn(n),ac(),e!==null&&Z(Va);break;case 24:zl(Lt)}}function xr(e,n){try{var i=n.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var f=o.next;i=f;do{if((i.tag&e)===e){o=void 0;var m=i.create,x=i.inst;o=m(),x.destroy=o}i=i.next}while(i!==f)}}catch(w){ft(n,n.return,w)}}function ca(e,n,i){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var m=f.next;o=m;do{if((o.tag&e)===e){var x=o.inst,w=x.destroy;if(w!==void 0){x.destroy=void 0,f=n;var L=i,$=w;try{$()}catch(re){ft(f,L,re)}}}o=o.next}while(o!==m)}}catch(re){ft(n,n.return,re)}}function Fp(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{jm(n,i)}catch(o){ft(e,e.return,o)}}}function Gp(e,n,i){i.props=Ka(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(o){ft(e,n,o)}}function Sr(e,n){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof i=="function"?e.refCleanup=i(o):i.current=o}}catch(f){ft(e,n,f)}}function xl(e,n){var i=e.ref,o=e.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(f){ft(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){ft(e,n,f)}else i.current=null}function Yp(e){var n=e.type,i=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(f){ft(e,e.return,f)}}function Lc(e,n,i){try{var o=e.stateNode;$1(o,e.type,i,n),o[xe]=n}catch(f){ft(e,e.return,f)}}function Vp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ya(e.type)||e.tag===4}function Uc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ya(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Bc(e,n,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,n):(n=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,n.appendChild(e),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=Dl));else if(o!==4&&(o===27&&ya(e.type)&&(i=e.stateNode,n=null),e=e.child,e!==null))for(Bc(e,n,i),e=e.sibling;e!==null;)Bc(e,n,i),e=e.sibling}function lu(e,n,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(o!==4&&(o===27&&ya(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(lu(e,n,i),e=e.sibling;e!==null;)lu(e,n,i),e=e.sibling}function Pp(e){var n=e.stateNode,i=e.memoizedProps;try{for(var o=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);tn(n,o,i),n[Se]=e,n[xe]=i}catch(m){ft(e,e.return,m)}}var Il=!1,Ht=!1,Hc=!1,Xp=typeof WeakSet=="function"?WeakSet:Set,Pt=null;function A1(e,n){if(e=e.containerInfo,of=Tu,e=im(e),js(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var f=o.anchorOffset,m=o.focusNode;o=o.focusOffset;try{i.nodeType,m.nodeType}catch{i=null;break e}var x=0,w=-1,L=-1,$=0,re=0,se=e,K=null;t:for(;;){for(var te;se!==i||f!==0&&se.nodeType!==3||(w=x+f),se!==m||o!==0&&se.nodeType!==3||(L=x+o),se.nodeType===3&&(x+=se.nodeValue.length),(te=se.firstChild)!==null;)K=se,se=te;for(;;){if(se===e)break t;if(K===i&&++$===f&&(w=x),K===m&&++re===o&&(L=x),(te=se.nextSibling)!==null)break;se=K,K=se.parentNode}se=te}i=w===-1||L===-1?null:{start:w,end:L}}else i=null}i=i||{start:0,end:0}}else i=null;for(uf={focusedElem:e,selectionRange:i},Tu=!1,Pt=n;Pt!==null;)if(n=Pt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Pt=e;else for(;Pt!==null;){switch(n=Pt,m=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&m!==null){e=void 0,i=n,f=m.memoizedProps,m=m.memoizedState,o=i.stateNode;try{var Ce=Ka(i.type,f);e=o.getSnapshotBeforeUpdate(Ce,m),o.__reactInternalSnapshotBeforeUpdate=e}catch(Le){ft(i,i.return,Le)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,i=e.nodeType,i===9)ff(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ff(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,Pt=e;break}Pt=n.return}}function $p(e,n,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:Fl(e,i),o&4&&xr(5,i);break;case 1:if(Fl(e,i),o&4)if(e=i.stateNode,n===null)try{e.componentDidMount()}catch(x){ft(i,i.return,x)}else{var f=Ka(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(x){ft(i,i.return,x)}}o&64&&Fp(i),o&512&&Sr(i,i.return);break;case 3:if(Fl(e,i),o&64&&(e=i.updateQueue,e!==null)){if(n=null,i.child!==null)switch(i.child.tag){case 27:case 5:n=i.child.stateNode;break;case 1:n=i.child.stateNode}try{jm(e,n)}catch(x){ft(i,i.return,x)}}break;case 27:n===null&&o&4&&Pp(i);case 26:case 5:Fl(e,i),n===null&&o&4&&Yp(i),o&512&&Sr(i,i.return);break;case 12:Fl(e,i);break;case 31:Fl(e,i),o&4&&Zp(e,i);break;case 13:Fl(e,i),o&4&&Jp(e,i),o&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=L1.bind(null,i),nS(e,i))));break;case 22:if(o=i.memoizedState!==null||Il,!o){n=n!==null&&n.memoizedState!==null||Ht,f=Il;var m=Ht;Il=o,(Ht=n)&&!m?Gl(e,i,(i.subtreeFlags&8772)!==0):Fl(e,i),Il=f,Ht=m}break;case 30:break;default:Fl(e,i)}}function Qp(e){var n=e.alternate;n!==null&&(e.alternate=null,Qp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&U(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var kt=null,wn=!1;function ql(e,n,i){for(i=i.child;i!==null;)Kp(e,n,i),i=i.sibling}function Kp(e,n,i){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(Rt,i)}catch{}switch(i.tag){case 26:Ht||xl(i,n),ql(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Ht||xl(i,n);var o=kt,f=wn;ya(i.type)&&(kt=i.stateNode,wn=!1),ql(e,n,i),Dr(i.stateNode),kt=o,wn=f;break;case 5:Ht||xl(i,n);case 6:if(o=kt,f=wn,kt=null,ql(e,n,i),kt=o,wn=f,kt!==null)if(wn)try{(kt.nodeType===9?kt.body:kt.nodeName==="HTML"?kt.ownerDocument.body:kt).removeChild(i.stateNode)}catch(m){ft(i,n,m)}else try{kt.removeChild(i.stateNode)}catch(m){ft(i,n,m)}break;case 18:kt!==null&&(wn?(e=kt,Fg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Ui(e)):Fg(kt,i.stateNode));break;case 4:o=kt,f=wn,kt=i.stateNode.containerInfo,wn=!0,ql(e,n,i),kt=o,wn=f;break;case 0:case 11:case 14:case 15:ca(2,i,n),Ht||ca(4,i,n),ql(e,n,i);break;case 1:Ht||(xl(i,n),o=i.stateNode,typeof o.componentWillUnmount=="function"&&Gp(i,n,o)),ql(e,n,i);break;case 21:ql(e,n,i);break;case 22:Ht=(o=Ht)||i.memoizedState!==null,ql(e,n,i),Ht=o;break;default:ql(e,n,i)}}function Zp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ui(e)}catch(i){ft(n,n.return,i)}}}function Jp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ui(e)}catch(i){ft(n,n.return,i)}}function _1(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Xp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Xp),n;default:throw Error(r(435,e.tag))}}function au(e,n){var i=_1(e);n.forEach(function(o){if(!i.has(o)){i.add(o);var f=U1.bind(null,e,o);o.then(f,f)}})}function Tn(e,n){var i=n.deletions;if(i!==null)for(var o=0;o<i.length;o++){var f=i[o],m=e,x=n,w=x;e:for(;w!==null;){switch(w.tag){case 27:if(ya(w.type)){kt=w.stateNode,wn=!1;break e}break;case 5:kt=w.stateNode,wn=!1;break e;case 3:case 4:kt=w.stateNode.containerInfo,wn=!0;break e}w=w.return}if(kt===null)throw Error(r(160));Kp(m,x,f),kt=null,wn=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Wp(n,e),n=n.sibling}var ol=null;function Wp(e,n){var i=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Tn(n,e),Cn(e),o&4&&(ca(3,e,e.return),xr(3,e),ca(5,e,e.return));break;case 1:Tn(n,e),Cn(e),o&512&&(Ht||i===null||xl(i,i.return)),o&64&&Il&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var f=ol;if(Tn(n,e),Cn(e),o&512&&(Ht||i===null||xl(i,i.return)),o&4){var m=i!==null?i.memoizedState:null;if(o=e.memoizedState,i===null)if(o===null)if(e.stateNode===null){e:{o=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":m=f.getElementsByTagName("title")[0],(!m||m[Ee]||m[Se]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(o),f.head.insertBefore(m,f.querySelector("head > title"))),tn(m,o,i),m[Se]=e,Be(m),o=m;break e;case"link":var x=Wg("link","href",f).get(o+(i.href||""));if(x){for(var w=0;w<x.length;w++)if(m=x[w],m.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&m.getAttribute("rel")===(i.rel==null?null:i.rel)&&m.getAttribute("title")===(i.title==null?null:i.title)&&m.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){x.splice(w,1);break t}}m=f.createElement(o),tn(m,o,i),f.head.appendChild(m);break;case"meta":if(x=Wg("meta","content",f).get(o+(i.content||""))){for(w=0;w<x.length;w++)if(m=x[w],m.getAttribute("content")===(i.content==null?null:""+i.content)&&m.getAttribute("name")===(i.name==null?null:i.name)&&m.getAttribute("property")===(i.property==null?null:i.property)&&m.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&m.getAttribute("charset")===(i.charSet==null?null:i.charSet)){x.splice(w,1);break t}}m=f.createElement(o),tn(m,o,i),f.head.appendChild(m);break;default:throw Error(r(468,o))}m[Se]=e,Be(m),o=m}e.stateNode=o}else ey(f,e.type,e.stateNode);else e.stateNode=Jg(f,o,e.memoizedProps);else m!==o?(m===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):m.count--,o===null?ey(f,e.type,e.stateNode):Jg(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Lc(e,e.memoizedProps,i.memoizedProps)}break;case 27:Tn(n,e),Cn(e),o&512&&(Ht||i===null||xl(i,i.return)),i!==null&&o&4&&Lc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Tn(n,e),Cn(e),o&512&&(Ht||i===null||xl(i,i.return)),e.flags&32){f=e.stateNode;try{ri(f,"")}catch(Ce){ft(e,e.return,Ce)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,Lc(e,f,i!==null?i.memoizedProps:f)),o&1024&&(Hc=!0);break;case 6:if(Tn(n,e),Cn(e),o&4){if(e.stateNode===null)throw Error(r(162));o=e.memoizedProps,i=e.stateNode;try{i.nodeValue=o}catch(Ce){ft(e,e.return,Ce)}}break;case 3:if(xu=null,f=ol,ol=vu(n.containerInfo),Tn(n,e),ol=f,Cn(e),o&4&&i!==null&&i.memoizedState.isDehydrated)try{Ui(n.containerInfo)}catch(Ce){ft(e,e.return,Ce)}Hc&&(Hc=!1,eg(e));break;case 4:o=ol,ol=vu(e.stateNode.containerInfo),Tn(n,e),Cn(e),ol=o;break;case 12:Tn(n,e),Cn(e);break;case 31:Tn(n,e),Cn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,au(e,o)));break;case 13:Tn(n,e),Cn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(ru=pt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,au(e,o)));break;case 22:f=e.memoizedState!==null;var L=i!==null&&i.memoizedState!==null,$=Il,re=Ht;if(Il=$||f,Ht=re||L,Tn(n,e),Ht=re,Il=$,Cn(e),o&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(i===null||L||Il||Ht||Za(e)),i=null,n=e;;){if(n.tag===5||n.tag===26){if(i===null){L=i=n;try{if(m=L.stateNode,f)x=m.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{w=L.stateNode;var se=L.memoizedProps.style,K=se!=null&&se.hasOwnProperty("display")?se.display:null;w.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(Ce){ft(L,L.return,Ce)}}}else if(n.tag===6){if(i===null){L=n;try{L.stateNode.nodeValue=f?"":L.memoizedProps}catch(Ce){ft(L,L.return,Ce)}}}else if(n.tag===18){if(i===null){L=n;try{var te=L.stateNode;f?Gg(te,!0):Gg(L.stateNode,!1)}catch(Ce){ft(L,L.return,Ce)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,au(e,i))));break;case 19:Tn(n,e),Cn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,au(e,o)));break;case 30:break;case 21:break;default:Tn(n,e),Cn(e)}}function Cn(e){var n=e.flags;if(n&2){try{for(var i,o=e.return;o!==null;){if(Vp(o)){i=o;break}o=o.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var f=i.stateNode,m=Uc(e);lu(e,m,f);break;case 5:var x=i.stateNode;i.flags&32&&(ri(x,""),i.flags&=-33);var w=Uc(e);lu(e,w,x);break;case 3:case 4:var L=i.stateNode.containerInfo,$=Uc(e);Bc(e,$,L);break;default:throw Error(r(161))}}catch(re){ft(e,e.return,re)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function eg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;eg(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Fl(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)$p(e,n.alternate,n),n=n.sibling}function Za(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:ca(4,n,n.return),Za(n);break;case 1:xl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&Gp(n,n.return,i),Za(n);break;case 27:Dr(n.stateNode);case 26:case 5:xl(n,n.return),Za(n);break;case 22:n.memoizedState===null&&Za(n);break;case 30:Za(n);break;default:Za(n)}e=e.sibling}}function Gl(e,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,f=e,m=n,x=m.flags;switch(m.tag){case 0:case 11:case 15:Gl(f,m,i),xr(4,m);break;case 1:if(Gl(f,m,i),o=m,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch($){ft(o,o.return,$)}if(o=m,f=o.updateQueue,f!==null){var w=o.stateNode;try{var L=f.shared.hiddenCallbacks;if(L!==null)for(f.shared.hiddenCallbacks=null,f=0;f<L.length;f++)Nm(L[f],w)}catch($){ft(o,o.return,$)}}i&&x&64&&Fp(m),Sr(m,m.return);break;case 27:Pp(m);case 26:case 5:Gl(f,m,i),i&&o===null&&x&4&&Yp(m),Sr(m,m.return);break;case 12:Gl(f,m,i);break;case 31:Gl(f,m,i),i&&x&4&&Zp(f,m);break;case 13:Gl(f,m,i),i&&x&4&&Jp(f,m);break;case 22:m.memoizedState===null&&Gl(f,m,i),Sr(m,m.return);break;case 30:break;default:Gl(f,m,i)}n=n.sibling}}function Ic(e,n){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&or(i))}function qc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&or(e))}function ul(e,n,i,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)tg(e,n,i,o),n=n.sibling}function tg(e,n,i,o){var f=n.flags;switch(n.tag){case 0:case 11:case 15:ul(e,n,i,o),f&2048&&xr(9,n);break;case 1:ul(e,n,i,o);break;case 3:ul(e,n,i,o),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&or(e)));break;case 12:if(f&2048){ul(e,n,i,o),e=n.stateNode;try{var m=n.memoizedProps,x=m.id,w=m.onPostCommit;typeof w=="function"&&w(x,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(L){ft(n,n.return,L)}}else ul(e,n,i,o);break;case 31:ul(e,n,i,o);break;case 13:ul(e,n,i,o);break;case 23:break;case 22:m=n.stateNode,x=n.alternate,n.memoizedState!==null?m._visibility&2?ul(e,n,i,o):Er(e,n):m._visibility&2?ul(e,n,i,o):(m._visibility|=2,ki(e,n,i,o,(n.subtreeFlags&10256)!==0||!1)),f&2048&&Ic(x,n);break;case 24:ul(e,n,i,o),f&2048&&qc(n.alternate,n);break;default:ul(e,n,i,o)}}function ki(e,n,i,o,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var m=e,x=n,w=i,L=o,$=x.flags;switch(x.tag){case 0:case 11:case 15:ki(m,x,w,L,f),xr(8,x);break;case 23:break;case 22:var re=x.stateNode;x.memoizedState!==null?re._visibility&2?ki(m,x,w,L,f):Er(m,x):(re._visibility|=2,ki(m,x,w,L,f)),f&&$&2048&&Ic(x.alternate,x);break;case 24:ki(m,x,w,L,f),f&&$&2048&&qc(x.alternate,x);break;default:ki(m,x,w,L,f)}n=n.sibling}}function Er(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=e,o=n,f=o.flags;switch(o.tag){case 22:Er(i,o),f&2048&&Ic(o.alternate,o);break;case 24:Er(i,o),f&2048&&qc(o.alternate,o);break;default:Er(i,o)}n=n.sibling}}var wr=8192;function Ai(e,n,i){if(e.subtreeFlags&wr)for(e=e.child;e!==null;)ng(e,n,i),e=e.sibling}function ng(e,n,i){switch(e.tag){case 26:Ai(e,n,i),e.flags&wr&&e.memoizedState!==null&&mS(i,ol,e.memoizedState,e.memoizedProps);break;case 5:Ai(e,n,i);break;case 3:case 4:var o=ol;ol=vu(e.stateNode.containerInfo),Ai(e,n,i),ol=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=wr,wr=16777216,Ai(e,n,i),wr=o):Ai(e,n,i));break;default:Ai(e,n,i)}}function lg(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Tr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var o=n[i];Pt=o,ig(o,e)}lg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ag(e),e=e.sibling}function ag(e){switch(e.tag){case 0:case 11:case 15:Tr(e),e.flags&2048&&ca(9,e,e.return);break;case 3:Tr(e);break;case 12:Tr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,iu(e)):Tr(e);break;default:Tr(e)}}function iu(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var o=n[i];Pt=o,ig(o,e)}lg(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:ca(8,n,n.return),iu(n);break;case 22:i=n.stateNode,i._visibility&2&&(i._visibility&=-3,iu(n));break;default:iu(n)}e=e.sibling}}function ig(e,n){for(;Pt!==null;){var i=Pt;switch(i.tag){case 0:case 11:case 15:ca(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:or(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,Pt=o;else e:for(i=e;Pt!==null;){o=Pt;var f=o.sibling,m=o.return;if(Qp(o),o===i){Pt=null;break e}if(f!==null){f.return=m,Pt=f;break e}Pt=m}}}var R1={getCacheForType:function(e){var n=Wt(Lt),i=n.data.get(e);return i===void 0&&(i=e(),n.data.set(e,i)),i},cacheSignal:function(){return Wt(Lt).controller.signal}},D1=typeof WeakMap=="function"?WeakMap:Map,st=0,vt=null,Qe=null,We=0,ct=0,Ln=null,fa=!1,_i=!1,Fc=!1,Yl=0,Nt=0,da=0,Ja=0,Gc=0,Un=0,Ri=0,Cr=null,kn=null,Yc=!1,ru=0,rg=0,ou=1/0,uu=null,ha=null,Ft=0,ma=null,Di=null,Vl=0,Vc=0,Pc=null,og=null,kr=0,Xc=null;function Bn(){return(st&2)!==0&&We!==0?We&-We:B.T!==null?Wc():ye()}function ug(){if(Un===0)if((We&536870912)===0||lt){var e=Gn;Gn<<=1,(Gn&3932160)===0&&(Gn=262144),Un=e}else Un=536870912;return e=Mn.current,e!==null&&(e.flags|=32),Un}function An(e,n,i){(e===vt&&(ct===2||ct===9)||e.cancelPendingCommit!==null)&&(Ni(e,0),pa(e,We,Un,!1)),al(e,i),((st&2)===0||e!==vt)&&(e===vt&&((st&2)===0&&(Ja|=i),Nt===4&&pa(e,We,Un,!1)),Sl(e))}function sg(e,n,i){if((st&6)!==0)throw Error(r(327));var o=!i&&(n&127)===0&&(n&e.expiredLanes)===0||Rl(e,n),f=o?O1(e,n):Qc(e,n,!0),m=o;do{if(f===0){_i&&!o&&pa(e,n,0,!1);break}else{if(i=e.current.alternate,m&&!N1(i)){f=Qc(e,n,!1),m=!1;continue}if(f===2){if(m=n,e.errorRecoveryDisabledLanes&m)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){n=x;e:{var w=e;f=Cr;var L=w.current.memoizedState.isDehydrated;if(L&&(Ni(w,x).flags|=256),x=Qc(w,x,!1),x!==2){if(Fc&&!L){w.errorRecoveryDisabledLanes|=m,Ja|=m,f=4;break e}m=kn,kn=f,m!==null&&(kn===null?kn=m:kn.push.apply(kn,m))}f=x}if(m=!1,f!==2)continue}}if(f===1){Ni(e,0),pa(e,n,0,!0);break}e:{switch(o=e,m=f,m){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:pa(o,n,Un,!fa);break e;case 2:kn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=ru+300-pt(),10<f)){if(pa(o,n,Un,!fa),_l(o,0,!0)!==0)break e;Vl=n,o.timeoutHandle=Ig(cg.bind(null,o,i,kn,uu,Yc,n,Un,Ja,Ri,fa,m,"Throttled",-0,0),f);break e}cg(o,i,kn,uu,Yc,n,Un,Ja,Ri,fa,m,null,-0,0)}}break}while(!0);Sl(e)}function cg(e,n,i,o,f,m,x,w,L,$,re,se,K,te){if(e.timeoutHandle=-1,se=n.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Dl},ng(n,m,se);var Ce=(m&62914560)===m?ru-pt():(m&4194048)===m?rg-pt():0;if(Ce=pS(se,Ce),Ce!==null){Vl=m,e.cancelPendingCommit=Ce(vg.bind(null,e,n,m,i,o,f,x,w,L,re,se,null,K,te)),pa(e,m,x,!$);return}}vg(e,n,m,i,o,f,x,w,L)}function N1(e){for(var n=e;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var f=i[o],m=f.getSnapshot;f=f.value;try{if(!jn(m(),f))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function pa(e,n,i,o){n&=~Gc,n&=~Ja,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var f=n;0<f;){var m=31-Pe(f),x=1<<m;o[m]=-1,f&=~x}i!==0&&za(e,i,n)}function su(){return(st&6)===0?(Ar(0),!1):!0}function $c(){if(Qe!==null){if(ct===0)var e=Qe.return;else e=Qe,Ml=Ga=null,cc(e),Si=null,sr=0,e=Qe;for(;e!==null;)qp(e.alternate,e),e=e.return;Qe=null}}function Ni(e,n){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Z1(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Vl=0,$c(),vt=e,Qe=i=jl(e.current,null),We=n,ct=0,Ln=null,fa=!1,_i=Rl(e,n),Fc=!1,Ri=Un=Gc=Ja=da=Nt=0,kn=Cr=null,Yc=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var f=31-Pe(o),m=1<<f;n|=e[f],o&=~m}return Yl=n,Do(),i}function fg(e,n){qe=null,B.H=yr,n===xi||n===Bo?(n=Am(),ct=3):n===Js?(n=Am(),ct=4):ct=n===kc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Ln=n,Qe===null&&(Nt=1,Jo(e,Pn(n,e.current)))}function dg(){var e=Mn.current;return e===null?!0:(We&4194048)===We?Kn===null:(We&62914560)===We||(We&536870912)!==0?e===Kn:!1}function hg(){var e=B.H;return B.H=yr,e===null?yr:e}function mg(){var e=B.A;return B.A=R1,e}function cu(){Nt=4,fa||(We&4194048)!==We&&Mn.current!==null||(_i=!0),(da&134217727)===0&&(Ja&134217727)===0||vt===null||pa(vt,We,Un,!1)}function Qc(e,n,i){var o=st;st|=2;var f=hg(),m=mg();(vt!==e||We!==n)&&(uu=null,Ni(e,n)),n=!1;var x=Nt;e:do try{if(ct!==0&&Qe!==null){var w=Qe,L=Ln;switch(ct){case 8:$c(),x=6;break e;case 3:case 2:case 9:case 6:Mn.current===null&&(n=!0);var $=ct;if(ct=0,Ln=null,ji(e,w,L,$),i&&_i){x=0;break e}break;default:$=ct,ct=0,Ln=null,ji(e,w,L,$)}}j1(),x=Nt;break}catch(re){fg(e,re)}while(!0);return n&&e.shellSuspendCounter++,Ml=Ga=null,st=o,B.H=f,B.A=m,Qe===null&&(vt=null,We=0,Do()),x}function j1(){for(;Qe!==null;)pg(Qe)}function O1(e,n){var i=st;st|=2;var o=hg(),f=mg();vt!==e||We!==n?(uu=null,ou=pt()+500,Ni(e,n)):_i=Rl(e,n);e:do try{if(ct!==0&&Qe!==null){n=Qe;var m=Ln;t:switch(ct){case 1:ct=0,Ln=null,ji(e,n,m,1);break;case 2:case 9:if(Cm(m)){ct=0,Ln=null,gg(n);break}n=function(){ct!==2&&ct!==9||vt!==e||(ct=7),Sl(e)},m.then(n,n);break e;case 3:ct=7;break e;case 4:ct=5;break e;case 7:Cm(m)?(ct=0,Ln=null,gg(n)):(ct=0,Ln=null,ji(e,n,m,7));break;case 5:var x=null;switch(Qe.tag){case 26:x=Qe.memoizedState;case 5:case 27:var w=Qe;if(x?ty(x):w.stateNode.complete){ct=0,Ln=null;var L=w.sibling;if(L!==null)Qe=L;else{var $=w.return;$!==null?(Qe=$,fu($)):Qe=null}break t}}ct=0,Ln=null,ji(e,n,m,5);break;case 6:ct=0,Ln=null,ji(e,n,m,6);break;case 8:$c(),Nt=6;break e;default:throw Error(r(462))}}M1();break}catch(re){fg(e,re)}while(!0);return Ml=Ga=null,B.H=o,B.A=f,st=i,Qe!==null?0:(vt=null,We=0,Do(),Nt)}function M1(){for(;Qe!==null&&!Wl();)pg(Qe)}function pg(e){var n=Hp(e.alternate,e,Yl);e.memoizedProps=e.pendingProps,n===null?fu(e):Qe=n}function gg(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=Op(i,n,n.pendingProps,n.type,void 0,We);break;case 11:n=Op(i,n,n.pendingProps,n.type.render,n.ref,We);break;case 5:cc(n);default:qp(i,n),n=Qe=mm(n,Yl),n=Hp(i,n,Yl)}e.memoizedProps=e.pendingProps,n===null?fu(e):Qe=n}function ji(e,n,i,o){Ml=Ga=null,cc(n),Si=null,sr=0;var f=n.return;try{if(E1(e,f,n,i,We)){Nt=1,Jo(e,Pn(i,e.current)),Qe=null;return}}catch(m){if(f!==null)throw Qe=f,m;Nt=1,Jo(e,Pn(i,e.current)),Qe=null;return}n.flags&32768?(lt||o===1?e=!0:_i||(We&536870912)!==0?e=!1:(fa=e=!0,(o===2||o===9||o===3||o===6)&&(o=Mn.current,o!==null&&o.tag===13&&(o.flags|=16384))),yg(n,e)):fu(n)}function fu(e){var n=e;do{if((n.flags&32768)!==0){yg(n,fa);return}e=n.return;var i=C1(n.alternate,n,Yl);if(i!==null){Qe=i;return}if(n=n.sibling,n!==null){Qe=n;return}Qe=n=e}while(n!==null);Nt===0&&(Nt=5)}function yg(e,n){do{var i=k1(e.alternate,e);if(i!==null){i.flags&=32767,Qe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){Qe=e;return}Qe=e=i}while(e!==null);Nt=6,Qe=null}function vg(e,n,i,o,f,m,x,w,L){e.cancelPendingCommit=null;do du();while(Ft!==0);if((st&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(m=n.lanes|n.childLanes,m|=Us,Ma(e,i,m,x,w,L),e===vt&&(Qe=vt=null,We=0),Di=n,ma=e,Vl=i,Vc=m,Pc=f,og=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,B1(Ae,function(){return wg(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=B.T,B.T=null,f=ee.p,ee.p=2,x=st,st|=4;try{A1(e,n,i)}finally{st=x,ee.p=f,B.T=o}}Ft=1,bg(),xg(),Sg()}}function bg(){if(Ft===1){Ft=0;var e=ma,n=Di,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var o=ee.p;ee.p=2;var f=st;st|=4;try{Wp(n,e);var m=uf,x=im(e.containerInfo),w=m.focusedElem,L=m.selectionRange;if(x!==w&&w&&w.ownerDocument&&am(w.ownerDocument.documentElement,w)){if(L!==null&&js(w)){var $=L.start,re=L.end;if(re===void 0&&(re=$),"selectionStart"in w)w.selectionStart=$,w.selectionEnd=Math.min(re,w.value.length);else{var se=w.ownerDocument||document,K=se&&se.defaultView||window;if(K.getSelection){var te=K.getSelection(),Ce=w.textContent.length,Le=Math.min(L.start,Ce),mt=L.end===void 0?Le:Math.min(L.end,Ce);!te.extend&&Le>mt&&(x=mt,mt=Le,Le=x);var Y=lm(w,Le),H=lm(w,mt);if(Y&&H&&(te.rangeCount!==1||te.anchorNode!==Y.node||te.anchorOffset!==Y.offset||te.focusNode!==H.node||te.focusOffset!==H.offset)){var X=se.createRange();X.setStart(Y.node,Y.offset),te.removeAllRanges(),Le>mt?(te.addRange(X),te.extend(H.node,H.offset)):(X.setEnd(H.node,H.offset),te.addRange(X))}}}}for(se=[],te=w;te=te.parentNode;)te.nodeType===1&&se.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<se.length;w++){var oe=se[w];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}Tu=!!of,uf=of=null}finally{st=f,ee.p=o,B.T=i}}e.current=n,Ft=2}}function xg(){if(Ft===2){Ft=0;var e=ma,n=Di,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var o=ee.p;ee.p=2;var f=st;st|=4;try{$p(e,n.alternate,n)}finally{st=f,ee.p=o,B.T=i}}Ft=3}}function Sg(){if(Ft===4||Ft===3){Ft=0,Oa();var e=ma,n=Di,i=Vl,o=og;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Ft=5:(Ft=0,Di=ma=null,Eg(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(ha=null),fe(i),n=n.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(Rt,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=B.T,f=ee.p,ee.p=2,B.T=null;try{for(var m=e.onRecoverableError,x=0;x<o.length;x++){var w=o[x];m(w.value,{componentStack:w.stack})}}finally{B.T=n,ee.p=f}}(Vl&3)!==0&&du(),Sl(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===Xc?kr++:(kr=0,Xc=e):kr=0,Ar(0)}}function Eg(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,or(n)))}function du(){return bg(),xg(),Sg(),wg()}function wg(){if(Ft!==5)return!1;var e=ma,n=Vc;Vc=0;var i=fe(Vl),o=B.T,f=ee.p;try{ee.p=32>i?32:i,B.T=null,i=Pc,Pc=null;var m=ma,x=Vl;if(Ft=0,Di=ma=null,Vl=0,(st&6)!==0)throw Error(r(331));var w=st;if(st|=4,ag(m.current),tg(m,m.current,x,i),st=w,Ar(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(Rt,m)}catch{}return!0}finally{ee.p=f,B.T=o,Eg(e,n)}}function Tg(e,n,i){n=Pn(i,n),n=Cc(e.stateNode,n,2),e=oa(e,n,2),e!==null&&(al(e,2),Sl(e))}function ft(e,n,i){if(e.tag===3)Tg(e,e,i);else for(;n!==null;){if(n.tag===3){Tg(n,e,i);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ha===null||!ha.has(o))){e=Pn(i,e),i=Cp(2),o=oa(n,i,2),o!==null&&(kp(i,o,n,e),al(o,2),Sl(o));break}}n=n.return}}function Kc(e,n,i){var o=e.pingCache;if(o===null){o=e.pingCache=new D1;var f=new Set;o.set(n,f)}else f=o.get(n),f===void 0&&(f=new Set,o.set(n,f));f.has(i)||(Fc=!0,f.add(i),e=z1.bind(null,e,n,i),n.then(e,e))}function z1(e,n,i){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,vt===e&&(We&i)===i&&(Nt===4||Nt===3&&(We&62914560)===We&&300>pt()-ru?(st&2)===0&&Ni(e,0):Gc|=i,Ri===We&&(Ri=0)),Sl(e)}function Cg(e,n){n===0&&(n=Sn()),e=Ia(e,n),e!==null&&(al(e,n),Sl(e))}function L1(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),Cg(e,i)}function U1(e,n){var i=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(r(314))}o!==null&&o.delete(n),Cg(e,i)}function B1(e,n){return Nn(e,n)}var hu=null,Oi=null,Zc=!1,mu=!1,Jc=!1,ga=0;function Sl(e){e!==Oi&&e.next===null&&(Oi===null?hu=Oi=e:Oi=Oi.next=e),mu=!0,Zc||(Zc=!0,I1())}function Ar(e,n){if(!Jc&&mu){Jc=!0;do for(var i=!1,o=hu;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var m=0;else{var x=o.suspendedLanes,w=o.pingedLanes;m=(1<<31-Pe(42|e)+1)-1,m&=f&~(x&~w),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(i=!0,Rg(o,m))}else m=We,m=_l(o,o===vt?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(m&3)===0||Rl(o,m)||(i=!0,Rg(o,m));o=o.next}while(i);Jc=!1}}function H1(){kg()}function kg(){mu=Zc=!1;var e=0;ga!==0&&K1()&&(e=ga);for(var n=pt(),i=null,o=hu;o!==null;){var f=o.next,m=Ag(o,n);m===0?(o.next=null,i===null?hu=f:i.next=f,f===null&&(Oi=i)):(i=o,(e!==0||(m&3)!==0)&&(mu=!0)),o=f}Ft!==0&&Ft!==5||Ar(e),ga!==0&&(ga=0)}function Ag(e,n){for(var i=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,m=e.pendingLanes&-62914561;0<m;){var x=31-Pe(m),w=1<<x,L=f[x];L===-1?((w&i)===0||(w&o)!==0)&&(f[x]=Ct(w,n)):L<=n&&(e.expiredLanes|=w),m&=~w}if(n=vt,i=We,i=_l(e,e===n?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,i===0||e===n&&(ct===2||ct===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&hl(o),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Rl(e,i)){if(n=i&-i,n===e.callbackPriority)return n;switch(o!==null&&hl(o),fe(i)){case 2:case 8:i=he;break;case 32:i=Ae;break;case 268435456:i=Je;break;default:i=Ae}return o=_g.bind(null,e),i=Nn(i,o),e.callbackPriority=n,e.callbackNode=i,n}return o!==null&&o!==null&&hl(o),e.callbackPriority=2,e.callbackNode=null,2}function _g(e,n){if(Ft!==0&&Ft!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(du()&&e.callbackNode!==i)return null;var o=We;return o=_l(e,e===vt?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(sg(e,o,n),Ag(e,pt()),e.callbackNode!=null&&e.callbackNode===i?_g.bind(null,e):null)}function Rg(e,n){if(du())return null;sg(e,n,!0)}function I1(){J1(function(){(st&6)!==0?Nn(ae,H1):kg()})}function Wc(){if(ga===0){var e=vi;e===0&&(e=xn,xn<<=1,(xn&261888)===0&&(xn=256)),ga=e}return ga}function Dg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Eo(""+e)}function Ng(e,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,e.id&&i.setAttribute("form",e.id),n.parentNode.insertBefore(i,n),e=new FormData(e),i.parentNode.removeChild(i),e}function q1(e,n,i,o,f){if(n==="submit"&&i&&i.stateNode===f){var m=Dg((f[xe]||null).action),x=o.submitter;x&&(n=(n=x[xe]||null)?Dg(n.formAction):x.getAttribute("formAction"),n!==null&&(m=n,x=null));var w=new ko("action","action",null,o,f);e.push({event:w,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(ga!==0){var L=x?Ng(f,x):new FormData(f);bc(i,{pending:!0,data:L,method:f.method,action:m},null,L)}}else typeof m=="function"&&(w.preventDefault(),L=x?Ng(f,x):new FormData(f),bc(i,{pending:!0,data:L,method:f.method,action:m},m,L))},currentTarget:f}]})}}for(var ef=0;ef<Ls.length;ef++){var tf=Ls[ef],F1=tf.toLowerCase(),G1=tf[0].toUpperCase()+tf.slice(1);rl(F1,"on"+G1)}rl(um,"onAnimationEnd"),rl(sm,"onAnimationIteration"),rl(cm,"onAnimationStart"),rl("dblclick","onDoubleClick"),rl("focusin","onFocus"),rl("focusout","onBlur"),rl(i1,"onTransitionRun"),rl(r1,"onTransitionStart"),rl(o1,"onTransitionCancel"),rl(fm,"onTransitionEnd"),an("onMouseEnter",["mouseout","mouseover"]),an("onMouseLeave",["mouseout","mouseover"]),an("onPointerEnter",["pointerout","pointerover"]),an("onPointerLeave",["pointerout","pointerover"]),Vt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="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(" "),Y1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_r));function jg(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var o=e[i],f=o.event;o=o.listeners;e:{var m=void 0;if(n)for(var x=o.length-1;0<=x;x--){var w=o[x],L=w.instance,$=w.currentTarget;if(w=w.listener,L!==m&&f.isPropagationStopped())break e;m=w,f.currentTarget=$;try{m(f)}catch(re){Ro(re)}f.currentTarget=null,m=L}else for(x=0;x<o.length;x++){if(w=o[x],L=w.instance,$=w.currentTarget,w=w.listener,L!==m&&f.isPropagationStopped())break e;m=w,f.currentTarget=$;try{m(f)}catch(re){Ro(re)}f.currentTarget=null,m=L}}}}function Ke(e,n){var i=n[Ne];i===void 0&&(i=n[Ne]=new Set);var o=e+"__bubble";i.has(o)||(Og(n,e,2,!1),i.add(o))}function nf(e,n,i){var o=0;n&&(o|=4),Og(i,e,o,n)}var pu="_reactListening"+Math.random().toString(36).slice(2);function lf(e){if(!e[pu]){e[pu]=!0,xt.forEach(function(i){i!=="selectionchange"&&(Y1.has(i)||nf(i,!1,e),nf(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[pu]||(n[pu]=!0,nf("selectionchange",!1,n))}}function Og(e,n,i,o){switch(uy(n)){case 2:var f=vS;break;case 8:f=bS;break;default:f=bf}i=f.bind(null,n,i,e),f=void 0,!ws||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(n,i,{capture:!0,passive:f}):e.addEventListener(n,i,!0):f!==void 0?e.addEventListener(n,i,{passive:f}):e.addEventListener(n,i,!1)}function af(e,n,i,o,f){var m=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var x=o.tag;if(x===3||x===4){var w=o.stateNode.containerInfo;if(w===f)break;if(x===4)for(x=o.return;x!==null;){var L=x.tag;if((L===3||L===4)&&x.stateNode.containerInfo===f)return;x=x.return}for(;w!==null;){if(x=ce(w),x===null)return;if(L=x.tag,L===5||L===6||L===26||L===27){o=m=x;continue e}w=w.parentNode}}o=o.return}Bh(function(){var $=m,re=Ss(i),se=[];e:{var K=dm.get(e);if(K!==void 0){var te=ko,Ce=e;switch(e){case"keypress":if(To(i)===0)break e;case"keydown":case"keyup":te=Ux;break;case"focusin":Ce="focus",te=As;break;case"focusout":Ce="blur",te=As;break;case"beforeblur":case"afterblur":te=As;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=qh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=Cx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=Ix;break;case um:case sm:case cm:te=_x;break;case fm:te=Fx;break;case"scroll":case"scrollend":te=wx;break;case"wheel":te=Yx;break;case"copy":case"cut":case"paste":te=Dx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Gh;break;case"toggle":case"beforetoggle":te=Px}var Le=(n&4)!==0,mt=!Le&&(e==="scroll"||e==="scrollend"),Y=Le?K!==null?K+"Capture":null:K;Le=[];for(var H=$,X;H!==null;){var oe=H;if(X=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||X===null||Y===null||(oe=Ki(H,Y),oe!=null&&Le.push(Rr(H,oe,X))),mt)break;H=H.return}0<Le.length&&(K=new te(K,Ce,null,i,re),se.push({event:K,listeners:Le}))}}if((n&7)===0){e:{if(K=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",K&&i!==xs&&(Ce=i.relatedTarget||i.fromElement)&&(ce(Ce)||Ce[ke]))break e;if((te||K)&&(K=re.window===re?re:(K=re.ownerDocument)?K.defaultView||K.parentWindow:window,te?(Ce=i.relatedTarget||i.toElement,te=$,Ce=Ce?ce(Ce):null,Ce!==null&&(mt=s(Ce),Le=Ce.tag,Ce!==mt||Le!==5&&Le!==27&&Le!==6)&&(Ce=null)):(te=null,Ce=$),te!==Ce)){if(Le=qh,oe="onMouseLeave",Y="onMouseEnter",H="mouse",(e==="pointerout"||e==="pointerover")&&(Le=Gh,oe="onPointerLeave",Y="onPointerEnter",H="pointer"),mt=te==null?K:Ie(te),X=Ce==null?K:Ie(Ce),K=new Le(oe,H+"leave",te,i,re),K.target=mt,K.relatedTarget=X,oe=null,ce(re)===$&&(Le=new Le(Y,H+"enter",Ce,i,re),Le.target=X,Le.relatedTarget=mt,oe=Le),mt=oe,te&&Ce)t:{for(Le=V1,Y=te,H=Ce,X=0,oe=Y;oe;oe=Le(oe))X++;oe=0;for(var je=H;je;je=Le(je))oe++;for(;0<X-oe;)Y=Le(Y),X--;for(;0<oe-X;)H=Le(H),oe--;for(;X--;){if(Y===H||H!==null&&Y===H.alternate){Le=Y;break t}Y=Le(Y),H=Le(H)}Le=null}else Le=null;te!==null&&Mg(se,K,te,Le,!1),Ce!==null&&mt!==null&&Mg(se,mt,Ce,Le,!0)}}e:{if(K=$?Ie($):window,te=K.nodeName&&K.nodeName.toLowerCase(),te==="select"||te==="input"&&K.type==="file")var rt=Zh;else if(Qh(K))if(Jh)rt=n1;else{rt=e1;var Re=Wx}else te=K.nodeName,!te||te.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?$&&bs($.elementType)&&(rt=Zh):rt=t1;if(rt&&(rt=rt(e,$))){Kh(se,rt,i,re);break e}Re&&Re(e,K,$),e==="focusout"&&$&&K.type==="number"&&$.memoizedProps.value!=null&&vs(K,"number",K.value)}switch(Re=$?Ie($):window,e){case"focusin":(Qh(Re)||Re.contentEditable==="true")&&(ci=Re,Os=$,ar=null);break;case"focusout":ar=Os=ci=null;break;case"mousedown":Ms=!0;break;case"contextmenu":case"mouseup":case"dragend":Ms=!1,rm(se,i,re);break;case"selectionchange":if(a1)break;case"keydown":case"keyup":rm(se,i,re)}var Fe;if(Rs)e:{switch(e){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else si?Xh(e,i)&&(et="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(et="onCompositionStart");et&&(Yh&&i.locale!=="ko"&&(si||et!=="onCompositionStart"?et==="onCompositionEnd"&&si&&(Fe=Hh()):(ea=re,Ts="value"in ea?ea.value:ea.textContent,si=!0)),Re=gu($,et),0<Re.length&&(et=new Fh(et,e,null,i,re),se.push({event:et,listeners:Re}),Fe?et.data=Fe:(Fe=$h(i),Fe!==null&&(et.data=Fe)))),(Fe=$x?Qx(e,i):Kx(e,i))&&(et=gu($,"onBeforeInput"),0<et.length&&(Re=new Fh("onBeforeInput","beforeinput",null,i,re),se.push({event:Re,listeners:et}),Re.data=Fe)),q1(se,e,$,i,re)}jg(se,n)})}function Rr(e,n,i){return{instance:e,listener:n,currentTarget:i}}function gu(e,n){for(var i=n+"Capture",o=[];e!==null;){var f=e,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=Ki(e,i),f!=null&&o.unshift(Rr(e,f,m)),f=Ki(e,n),f!=null&&o.push(Rr(e,f,m))),e.tag===3)return o;e=e.return}return[]}function V1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Mg(e,n,i,o,f){for(var m=n._reactName,x=[];i!==null&&i!==o;){var w=i,L=w.alternate,$=w.stateNode;if(w=w.tag,L!==null&&L===o)break;w!==5&&w!==26&&w!==27||$===null||(L=$,f?($=Ki(i,m),$!=null&&x.unshift(Rr(i,$,L))):f||($=Ki(i,m),$!=null&&x.push(Rr(i,$,L)))),i=i.return}x.length!==0&&e.push({event:n,listeners:x})}var P1=/\r\n?/g,X1=/\u0000|\uFFFD/g;function zg(e){return(typeof e=="string"?e:""+e).replace(P1,`
|
|
9
|
-
`).replace(X1,"")}function Lg(e,n){return n=zg(n),zg(e)===n}function ht(e,n,i,o,f,m){switch(i){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||ri(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&ri(e,""+o);break;case"className":il(e,"class",o);break;case"tabIndex":il(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":il(e,i,o);break;case"style":Lh(e,o,m);break;case"data":if(n!=="object"){il(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||i!=="href")){e.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=Eo(""+o),e.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(i,"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"&&(i==="formAction"?(n!=="input"&&ht(e,n,"name",f.name,f,null),ht(e,n,"formEncType",f.formEncType,f,null),ht(e,n,"formMethod",f.formMethod,f,null),ht(e,n,"formTarget",f.formTarget,f,null)):(ht(e,n,"encType",f.encType,f,null),ht(e,n,"method",f.method,f,null),ht(e,n,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=Eo(""+o),e.setAttribute(i,o);break;case"onClick":o!=null&&(e.onclick=Dl);break;case"onScroll":o!=null&&Ke("scroll",e);break;case"onScrollEnd":o!=null&&Ke("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(i=o.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.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"){e.removeAttribute("xlink:href");break}i=Eo(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);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"?e.setAttribute(i,""+o):e.removeAttribute(i);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"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":o===!0?e.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,o):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(i,o):e.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(i):e.setAttribute(i,o);break;case"popover":Ke("beforetoggle",e),Ke("toggle",e),jt(e,"popover",o);break;case"xlinkActuate":Zt(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Zt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Zt(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Zt(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Zt(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Zt(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Zt(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":jt(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Sx.get(i)||i,jt(e,i,o))}}function rf(e,n,i,o,f,m){switch(i){case"style":Lh(e,o,m);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(i=o.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof o=="string"?ri(e,o):(typeof o=="number"||typeof o=="bigint")&&ri(e,""+o);break;case"onScroll":o!=null&&Ke("scroll",e);break;case"onScrollEnd":o!=null&&Ke("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Dl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_t.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),n=i.slice(2,f?i.length-7:void 0),m=e[xe]||null,m=m!=null?m[i]:null,typeof m=="function"&&e.removeEventListener(n,m,f),typeof o=="function")){typeof m!="function"&&m!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,o,f);break e}i in e?e[i]=o:o===!0?e.setAttribute(i,""):jt(e,i,o)}}}function tn(e,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ke("error",e),Ke("load",e);var o=!1,f=!1,m;for(m in i)if(i.hasOwnProperty(m)){var x=i[m];if(x!=null)switch(m){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ht(e,n,m,x,i,null)}}f&&ht(e,n,"srcSet",i.srcSet,i,null),o&&ht(e,n,"src",i.src,i,null);return;case"input":Ke("invalid",e);var w=m=x=f=null,L=null,$=null;for(o in i)if(i.hasOwnProperty(o)){var re=i[o];if(re!=null)switch(o){case"name":f=re;break;case"type":x=re;break;case"checked":L=re;break;case"defaultChecked":$=re;break;case"value":m=re;break;case"defaultValue":w=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,n));break;default:ht(e,n,o,re,i,null)}}jh(e,m,w,L,$,x,f,!1);return;case"select":Ke("invalid",e),o=x=m=null;for(f in i)if(i.hasOwnProperty(f)&&(w=i[f],w!=null))switch(f){case"value":m=w;break;case"defaultValue":x=w;break;case"multiple":o=w;default:ht(e,n,f,w,i,null)}n=m,i=x,e.multiple=!!o,n!=null?ii(e,!!o,n,!1):i!=null&&ii(e,!!o,i,!0);return;case"textarea":Ke("invalid",e),m=f=o=null;for(x in i)if(i.hasOwnProperty(x)&&(w=i[x],w!=null))switch(x){case"value":o=w;break;case"defaultValue":f=w;break;case"children":m=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:ht(e,n,x,w,i,null)}Mh(e,o,f,m);return;case"option":for(L in i)i.hasOwnProperty(L)&&(o=i[L],o!=null)&&(L==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":ht(e,n,L,o,i,null));return;case"dialog":Ke("beforetoggle",e),Ke("toggle",e),Ke("cancel",e),Ke("close",e);break;case"iframe":case"object":Ke("load",e);break;case"video":case"audio":for(o=0;o<_r.length;o++)Ke(_r[o],e);break;case"image":Ke("error",e),Ke("load",e);break;case"details":Ke("toggle",e);break;case"embed":case"source":case"link":Ke("error",e),Ke("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for($ in i)if(i.hasOwnProperty($)&&(o=i[$],o!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ht(e,n,$,o,i,null)}return;default:if(bs(n)){for(re in i)i.hasOwnProperty(re)&&(o=i[re],o!==void 0&&rf(e,n,re,o,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(o=i[w],o!=null&&ht(e,n,w,o,i,null))}function $1(e,n,i,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,x=null,w=null,L=null,$=null,re=null;for(te in i){var se=i[te];if(i.hasOwnProperty(te)&&se!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":L=se;default:o.hasOwnProperty(te)||ht(e,n,te,null,o,se)}}for(var K in o){var te=o[K];if(se=i[K],o.hasOwnProperty(K)&&(te!=null||se!=null))switch(K){case"type":m=te;break;case"name":f=te;break;case"checked":$=te;break;case"defaultChecked":re=te;break;case"value":x=te;break;case"defaultValue":w=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,n));break;default:te!==se&&ht(e,n,K,te,o,se)}}ys(e,x,w,L,$,re,m,f);return;case"select":te=x=w=K=null;for(m in i)if(L=i[m],i.hasOwnProperty(m)&&L!=null)switch(m){case"value":break;case"multiple":te=L;default:o.hasOwnProperty(m)||ht(e,n,m,null,o,L)}for(f in o)if(m=o[f],L=i[f],o.hasOwnProperty(f)&&(m!=null||L!=null))switch(f){case"value":K=m;break;case"defaultValue":w=m;break;case"multiple":x=m;default:m!==L&&ht(e,n,f,m,o,L)}n=w,i=x,o=te,K!=null?ii(e,!!i,K,!1):!!o!=!!i&&(n!=null?ii(e,!!i,n,!0):ii(e,!!i,i?[]:"",!1));return;case"textarea":te=K=null;for(w in i)if(f=i[w],i.hasOwnProperty(w)&&f!=null&&!o.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:ht(e,n,w,null,o,f)}for(x in o)if(f=o[x],m=i[x],o.hasOwnProperty(x)&&(f!=null||m!=null))switch(x){case"value":K=f;break;case"defaultValue":te=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==m&&ht(e,n,x,f,o,m)}Oh(e,K,te);return;case"option":for(var Ce in i)K=i[Ce],i.hasOwnProperty(Ce)&&K!=null&&!o.hasOwnProperty(Ce)&&(Ce==="selected"?e.selected=!1:ht(e,n,Ce,null,o,K));for(L in o)K=o[L],te=i[L],o.hasOwnProperty(L)&&K!==te&&(K!=null||te!=null)&&(L==="selected"?e.selected=K&&typeof K!="function"&&typeof K!="symbol":ht(e,n,L,K,o,te));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 Le in i)K=i[Le],i.hasOwnProperty(Le)&&K!=null&&!o.hasOwnProperty(Le)&&ht(e,n,Le,null,o,K);for($ in o)if(K=o[$],te=i[$],o.hasOwnProperty($)&&K!==te&&(K!=null||te!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(r(137,n));break;default:ht(e,n,$,K,o,te)}return;default:if(bs(n)){for(var mt in i)K=i[mt],i.hasOwnProperty(mt)&&K!==void 0&&!o.hasOwnProperty(mt)&&rf(e,n,mt,void 0,o,K);for(re in o)K=o[re],te=i[re],!o.hasOwnProperty(re)||K===te||K===void 0&&te===void 0||rf(e,n,re,K,o,te);return}}for(var Y in i)K=i[Y],i.hasOwnProperty(Y)&&K!=null&&!o.hasOwnProperty(Y)&&ht(e,n,Y,null,o,K);for(se in o)K=o[se],te=i[se],!o.hasOwnProperty(se)||K===te||K==null&&te==null||ht(e,n,se,K,o,te)}function Ug(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Q1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var f=i[o],m=f.transferSize,x=f.initiatorType,w=f.duration;if(m&&w&&Ug(x)){for(x=0,w=f.responseEnd,o+=1;o<i.length;o++){var L=i[o],$=L.startTime;if($>w)break;var re=L.transferSize,se=L.initiatorType;re&&Ug(se)&&(L=L.responseEnd,x+=re*(L<w?1:(w-$)/(L-$)))}if(--o,n+=8*(m+x)/(f.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var of=null,uf=null;function yu(e){return e.nodeType===9?e:e.ownerDocument}function Bg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function sf(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var cf=null;function K1(){var e=window.event;return e&&e.type==="popstate"?e===cf?!1:(cf=e,!0):(cf=null,!1)}var Ig=typeof setTimeout=="function"?setTimeout:void 0,Z1=typeof clearTimeout=="function"?clearTimeout:void 0,qg=typeof Promise=="function"?Promise:void 0,J1=typeof queueMicrotask=="function"?queueMicrotask:typeof qg<"u"?function(e){return qg.resolve(null).then(e).catch(W1)}:Ig;function W1(e){setTimeout(function(){throw e})}function ya(e){return e==="head"}function Fg(e,n){var i=n,o=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(o===0){e.removeChild(f),Ui(n);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")Dr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Dr(i);for(var m=i.firstChild;m;){var x=m.nextSibling,w=m.nodeName;m[Ee]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&m.rel.toLowerCase()==="stylesheet"||i.removeChild(m),m=x}}else i==="body"&&Dr(e.ownerDocument.body);i=f}while(i);Ui(n)}function Gg(e,n){var i=e;e=0;do{var o=i.nextSibling;if(i.nodeType===1?n?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(n?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=o}while(i)}function ff(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":ff(i),U(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function eS(e,n,i,o){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Ee])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(m=e.getAttribute("rel"),m==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(m!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(m=e.getAttribute("src"),(m!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===m)return e}else return e;if(e=Zn(e.nextSibling),e===null)break}return null}function tS(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Zn(e.nextSibling),e===null))return null;return e}function Yg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Zn(e.nextSibling),e===null))return null;return e}function df(e){return e.data==="$?"||e.data==="$~"}function hf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function nS(e,n){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||i.readyState!=="loading")n();else{var o=function(){n(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Zn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var mf=null;function Vg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(n===0)return Zn(e.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}e=e.nextSibling}return null}function Pg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(n===0)return e;n--}else i!=="/$"&&i!=="/&"||n++}e=e.previousSibling}return null}function Xg(e,n,i){switch(n=yu(i),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Dr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);U(e)}var Jn=new Map,$g=new Set;function vu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Pl=ee.d;ee.d={f:lS,r:aS,D:iS,C:rS,L:oS,m:uS,X:cS,S:sS,M:fS};function lS(){var e=Pl.f(),n=su();return e||n}function aS(e){var n=me(e);n!==null&&n.tag===5&&n.type==="form"?fp(n):Pl.r(e)}var Mi=typeof document>"u"?null:document;function Qg(e,n,i){var o=Mi;if(o&&typeof n=="string"&&n){var f=Yn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),$g.has(f)||($g.add(f),e={rel:e,crossOrigin:i,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),tn(n,"link",e),Be(n),o.head.appendChild(n)))}}function iS(e){Pl.D(e),Qg("dns-prefetch",e,null)}function rS(e,n){Pl.C(e,n),Qg("preconnect",e,n)}function oS(e,n,i){Pl.L(e,n,i);var o=Mi;if(o&&e&&n){var f='link[rel="preload"][as="'+Yn(n)+'"]';n==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+Yn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+Yn(i.imageSizes)+'"]')):f+='[href="'+Yn(e)+'"]';var m=f;switch(n){case"style":m=zi(e);break;case"script":m=Li(e)}Jn.has(m)||(e=g({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),Jn.set(m,e),o.querySelector(f)!==null||n==="style"&&o.querySelector(Nr(m))||n==="script"&&o.querySelector(jr(m))||(n=o.createElement("link"),tn(n,"link",e),Be(n),o.head.appendChild(n)))}}function uS(e,n){Pl.m(e,n);var i=Mi;if(i&&e){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+Yn(o)+'"][href="'+Yn(e)+'"]',m=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Li(e)}if(!Jn.has(m)&&(e=g({rel:"modulepreload",href:e},n),Jn.set(m,e),i.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(jr(m)))return}o=i.createElement("link"),tn(o,"link",e),Be(o),i.head.appendChild(o)}}}function sS(e,n,i){Pl.S(e,n,i);var o=Mi;if(o&&e){var f=ut(o).hoistableStyles,m=zi(e);n=n||"default";var x=f.get(m);if(!x){var w={loading:0,preload:null};if(x=o.querySelector(Nr(m)))w.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":n},i),(i=Jn.get(m))&&pf(e,i);var L=x=o.createElement("link");Be(L),tn(L,"link",e),L._p=new Promise(function($,re){L.onload=$,L.onerror=re}),L.addEventListener("load",function(){w.loading|=1}),L.addEventListener("error",function(){w.loading|=2}),w.loading|=4,bu(x,n,o)}x={type:"stylesheet",instance:x,count:1,state:w},f.set(m,x)}}}function cS(e,n){Pl.X(e,n);var i=Mi;if(i&&e){var o=ut(i).hoistableScripts,f=Li(e),m=o.get(f);m||(m=i.querySelector(jr(f)),m||(e=g({src:e,async:!0},n),(n=Jn.get(f))&&gf(e,n),m=i.createElement("script"),Be(m),tn(m,"link",e),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(f,m))}}function fS(e,n){Pl.M(e,n);var i=Mi;if(i&&e){var o=ut(i).hoistableScripts,f=Li(e),m=o.get(f);m||(m=i.querySelector(jr(f)),m||(e=g({src:e,async:!0,type:"module"},n),(n=Jn.get(f))&&gf(e,n),m=i.createElement("script"),Be(m),tn(m,"link",e),i.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(f,m))}}function Kg(e,n,i,o){var f=(f=Te.current)?vu(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=zi(i.href),i=ut(f).hoistableStyles,o=i.get(n),o||(o={type:"style",instance:null,count:0,state:null},i.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=zi(i.href);var m=ut(f).hoistableStyles,x=m.get(e);if(x||(f=f.ownerDocument||f,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(e,x),(m=f.querySelector(Nr(e)))&&!m._p&&(x.instance=m,x.state.loading=5),Jn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Jn.set(e,i),m||dS(f,e,i,x.state))),n&&o===null)throw Error(r(528,""));return x}if(n&&o!==null)throw Error(r(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Li(i),i=ut(f).hoistableScripts,o=i.get(n),o||(o={type:"script",instance:null,count:0,state:null},i.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function zi(e){return'href="'+Yn(e)+'"'}function Nr(e){return'link[rel="stylesheet"]['+e+"]"}function Zg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function dS(e,n,i,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),tn(n,"link",i),Be(n),e.head.appendChild(n))}function Li(e){return'[src="'+Yn(e)+'"]'}function jr(e){return"script[async]"+e}function Jg(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+Yn(i.href)+'"]');if(o)return n.instance=o,Be(o),o;var f=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Be(o),tn(o,"style",f),bu(o,i.precedence,e),n.instance=o;case"stylesheet":f=zi(i.href);var m=e.querySelector(Nr(f));if(m)return n.state.loading|=4,n.instance=m,Be(m),m;o=Zg(i),(f=Jn.get(f))&&pf(o,f),m=(e.ownerDocument||e).createElement("link"),Be(m);var x=m;return x._p=new Promise(function(w,L){x.onload=w,x.onerror=L}),tn(m,"link",o),n.state.loading|=4,bu(m,i.precedence,e),n.instance=m;case"script":return m=Li(i.src),(f=e.querySelector(jr(m)))?(n.instance=f,Be(f),f):(o=i,(f=Jn.get(m))&&(o=g({},i),gf(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),Be(f),tn(f,"link",o),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,bu(o,i.precedence,e));return n.instance}function bu(e,n,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,m=f,x=0;x<o.length;x++){var w=o[x];if(w.dataset.precedence===n)m=w;else if(m!==f)break}m?m.parentNode.insertBefore(e,m.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(e,n.firstChild))}function pf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function gf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var xu=null;function Wg(e,n,i){if(xu===null){var o=new Map,f=xu=new Map;f.set(i,o)}else f=xu,o=f.get(i),o||(o=new Map,f.set(i,o));if(o.has(e))return o;for(o.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var m=i[f];if(!(m[Ee]||m[Se]||e==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var x=m.getAttribute(n)||"";x=e+x;var w=o.get(x);w?w.push(m):o.set(x,[m])}}return o}function ey(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function hS(e,n,i){if(i===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function ty(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function mS(e,n,i,o){if(i.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=zi(o.href),m=n.querySelector(Nr(f));if(m){n=m._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Su.bind(e),n.then(e,e)),i.state.loading|=4,i.instance=m,Be(m);return}m=n.ownerDocument||n,o=Zg(o),(f=Jn.get(f))&&pf(o,f),m=m.createElement("link"),Be(m);var x=m;x._p=new Promise(function(w,L){x.onload=w,x.onerror=L}),tn(m,"link",o),i.instance=m}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Su.bind(e),n.addEventListener("load",i),n.addEventListener("error",i))}}var yf=0;function pS(e,n){return e.stylesheets&&e.count===0&&wu(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var o=setTimeout(function(){if(e.stylesheets&&wu(e,e.stylesheets),e.unsuspend){var m=e.unsuspend;e.unsuspend=null,m()}},6e4+n);0<e.imgBytes&&yf===0&&(yf=62500*Q1());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&wu(e,e.stylesheets),e.unsuspend)){var m=e.unsuspend;e.unsuspend=null,m()}},(e.imgBytes>yf?50:800)+n);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Su(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Eu=null;function wu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Eu=new Map,n.forEach(gS,e),Eu=null,Su.call(e))}function gS(e,n){if(!(n.state.loading&4)){var i=Eu.get(e);if(i)var o=i.get(null);else{i=new Map,Eu.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var x=f[m];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(i.set(x.dataset.precedence,x),o=x)}o&&i.set(null,o)}f=n.instance,x=f.getAttribute("data-precedence"),m=i.get(x)||o,m===o&&i.set(null,f),i.set(x,f),this.count++,o=Su.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),m?m.parentNode.insertBefore(f,m.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Or={$$typeof:j,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function yS(e,n,i,o,f,m,x,w,L){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=pl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pl(0),this.hiddenUpdates=pl(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function ny(e,n,i,o,f,m,x,w,L,$,re,se){return e=new yS(e,n,i,x,L,$,re,se,w),n=1,m===!0&&(n|=24),m=On(3,null,null,n),e.current=m,m.stateNode=e,n=Qs(),n.refCount++,e.pooledCache=n,n.refCount++,m.memoizedState={element:o,isDehydrated:i,cache:n},Ws(m),e}function ly(e){return e?(e=hi,e):hi}function ay(e,n,i,o,f,m){f=ly(f),o.context===null?o.context=f:o.pendingContext=f,o=ra(n),o.payload={element:i},m=m===void 0?null:m,m!==null&&(o.callback=m),i=oa(e,o,n),i!==null&&(An(i,e,n),fr(i,e,n))}function iy(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function vf(e,n){iy(e,n),(e=e.alternate)&&iy(e,n)}function ry(e){if(e.tag===13||e.tag===31){var n=Ia(e,67108864);n!==null&&An(n,e,67108864),vf(e,67108864)}}function oy(e){if(e.tag===13||e.tag===31){var n=Bn();n=P(n);var i=Ia(e,n);i!==null&&An(i,e,n),vf(e,n)}}var Tu=!0;function vS(e,n,i,o){var f=B.T;B.T=null;var m=ee.p;try{ee.p=2,bf(e,n,i,o)}finally{ee.p=m,B.T=f}}function bS(e,n,i,o){var f=B.T;B.T=null;var m=ee.p;try{ee.p=8,bf(e,n,i,o)}finally{ee.p=m,B.T=f}}function bf(e,n,i,o){if(Tu){var f=xf(o);if(f===null)af(e,n,o,Cu,i),sy(e,o);else if(SS(f,e,n,i,o))o.stopPropagation();else if(sy(e,o),n&4&&-1<xS.indexOf(e)){for(;f!==null;){var m=me(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var x=dn(m.pendingLanes);if(x!==0){var w=m;for(w.pendingLanes|=2,w.entangledLanes|=2;x;){var L=1<<31-Pe(x);w.entanglements[1]|=L,x&=~L}Sl(m),(st&6)===0&&(ou=pt()+500,Ar(0))}}break;case 31:case 13:w=Ia(m,2),w!==null&&An(w,m,2),su(),vf(m,2)}if(m=xf(o),m===null&&af(e,n,o,Cu,i),m===f)break;f=m}f!==null&&o.stopPropagation()}else af(e,n,o,null,i)}}function xf(e){return e=Ss(e),Sf(e)}var Cu=null;function Sf(e){if(Cu=null,e=ce(e),e!==null){var n=s(e);if(n===null)e=null;else{var i=n.tag;if(i===13){if(e=c(n),e!==null)return e;e=null}else if(i===31){if(e=d(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Cu=e,null}function uy(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(cn()){case ae:return 2;case he:return 8;case Ae:case Ue:return 32;case Je:return 268435456;default:return 32}default:return 32}}var Ef=!1,va=null,ba=null,xa=null,Mr=new Map,zr=new Map,Sa=[],xS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function sy(e,n){switch(e){case"focusin":case"focusout":va=null;break;case"dragenter":case"dragleave":ba=null;break;case"mouseover":case"mouseout":xa=null;break;case"pointerover":case"pointerout":Mr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":zr.delete(n.pointerId)}}function Lr(e,n,i,o,f,m){return e===null||e.nativeEvent!==m?(e={blockedOn:n,domEventName:i,eventSystemFlags:o,nativeEvent:m,targetContainers:[f]},n!==null&&(n=me(n),n!==null&&ry(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function SS(e,n,i,o,f){switch(n){case"focusin":return va=Lr(va,e,n,i,o,f),!0;case"dragenter":return ba=Lr(ba,e,n,i,o,f),!0;case"mouseover":return xa=Lr(xa,e,n,i,o,f),!0;case"pointerover":var m=f.pointerId;return Mr.set(m,Lr(Mr.get(m)||null,e,n,i,o,f)),!0;case"gotpointercapture":return m=f.pointerId,zr.set(m,Lr(zr.get(m)||null,e,n,i,o,f)),!0}return!1}function cy(e){var n=ce(e.target);if(n!==null){var i=s(n);if(i!==null){if(n=i.tag,n===13){if(n=c(i),n!==null){e.blockedOn=n,_e(e.priority,function(){oy(i)});return}}else if(n===31){if(n=d(i),n!==null){e.blockedOn=n,_e(e.priority,function(){oy(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ku(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=xf(e.nativeEvent);if(i===null){i=e.nativeEvent;var o=new i.constructor(i.type,i);xs=o,i.target.dispatchEvent(o),xs=null}else return n=me(i),n!==null&&ry(n),e.blockedOn=i,!1;n.shift()}return!0}function fy(e,n,i){ku(e)&&i.delete(n)}function ES(){Ef=!1,va!==null&&ku(va)&&(va=null),ba!==null&&ku(ba)&&(ba=null),xa!==null&&ku(xa)&&(xa=null),Mr.forEach(fy),zr.forEach(fy)}function Au(e,n){e.blockedOn===n&&(e.blockedOn=null,Ef||(Ef=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,ES)))}var _u=null;function dy(e){_u!==e&&(_u=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){_u===e&&(_u=null);for(var n=0;n<e.length;n+=3){var i=e[n],o=e[n+1],f=e[n+2];if(typeof o!="function"){if(Sf(o||i)===null)continue;break}var m=me(i);m!==null&&(e.splice(n,3),n-=3,bc(m,{pending:!0,data:f,method:i.method,action:o},o,f))}}))}function Ui(e){function n(L){return Au(L,e)}va!==null&&Au(va,e),ba!==null&&Au(ba,e),xa!==null&&Au(xa,e),Mr.forEach(n),zr.forEach(n);for(var i=0;i<Sa.length;i++){var o=Sa[i];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Sa.length&&(i=Sa[0],i.blockedOn===null);)cy(i),i.blockedOn===null&&Sa.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var f=i[o],m=i[o+1],x=f[xe]||null;if(typeof m=="function")x||dy(i);else if(x){var w=null;if(m&&m.hasAttribute("formAction")){if(f=m,x=m[xe]||null)w=x.formAction;else if(Sf(f)!==null)continue}else w=x.action;typeof w=="function"?i[o+1]=w:(i.splice(o,3),o-=3),dy(i)}}}function hy(){function e(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(x){return f=x})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),o||setTimeout(i,20)}function i(){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,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function wf(e){this._internalRoot=e}Ru.prototype.render=wf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var i=n.current,o=Bn();ay(i,o,e,n,null,null)},Ru.prototype.unmount=wf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;ay(e.current,2,null,e,null,null),su(),n[ke]=null}};function Ru(e){this._internalRoot=e}Ru.prototype.unstable_scheduleHydration=function(e){if(e){var n=ye();e={blockedOn:null,target:e,priority:n};for(var i=0;i<Sa.length&&n!==0&&n<Sa[i].priority;i++);Sa.splice(i,0,e),i===0&&cy(e)}};var my=l.version;if(my!=="19.2.4")throw Error(r(527,my,"19.2.4"));ee.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=h(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var wS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Du.isDisabled&&Du.supportsFiber)try{Rt=Du.inject(wS),at=Du}catch{}}return Br.createRoot=function(e,n){if(!u(e))throw Error(r(299));var i=!1,o="",f=Sp,m=Ep,x=wp;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(x=n.onRecoverableError)),n=ny(e,1,!1,null,null,i,o,null,f,m,x,hy),e[ke]=n.current,lf(e),new wf(n)},Br.hydrateRoot=function(e,n,i){if(!u(e))throw Error(r(299));var o=!1,f="",m=Sp,x=Ep,w=wp,L=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(x=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(L=i.formState)),n=ny(e,1,!0,n,i??null,o,f,L,m,x,w,hy),n.context=ly(null),i=n.current,o=Bn(),o=P(o),f=ra(o),f.callback=null,oa(i,f,o),i=o,n.current.lanes=i,al(n,i),Sl(n),e[ke]=n.current,lf(e),new Ru(n)},Br.version="19.2.4",Br}var Ty;function zS(){if(Ty)return kf.exports;Ty=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),kf.exports=MS(),kf.exports}var LS=zS();var ob=t=>{throw TypeError(t)},US=(t,l,a)=>l.has(t)||ob("Cannot "+a),Df=(t,l,a)=>(US(t,l,"read from private field"),a?a.call(t):l.get(t)),BS=(t,l,a)=>l.has(t)?ob("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(t):l.set(t,a),Cy="popstate";function HS(t={}){function l(r,u){let{pathname:s,search:c,hash:d}=r.location;return lo("",{pathname:s,search:c,hash:d},u.state&&u.state.usr||null,u.state&&u.state.key||"default")}function a(r,u){return typeof u=="string"?u:kl(u)}return qS(l,a,null,t)}function Ve(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function zt(t,l){if(!t){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function IS(){return Math.random().toString(36).substring(2,10)}function ky(t,l){return{usr:t.state,key:t.key,idx:l}}function lo(t,l,a=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof l=="string"?Da(l):l,state:a,key:l&&l.key||r||IS()}}function kl({pathname:t="/",search:l="",hash:a=""}){return l&&l!=="?"&&(t+=l.charAt(0)==="?"?l:"?"+l),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function Da(t){let l={};if(t){let a=t.indexOf("#");a>=0&&(l.hash=t.substring(a),t=t.substring(0,a));let r=t.indexOf("?");r>=0&&(l.search=t.substring(r),t=t.substring(0,r)),t&&(l.pathname=t)}return l}function qS(t,l,a,r={}){let{window:u=document.defaultView,v5Compat:s=!1}=r,c=u.history,d="POP",p=null,h=y();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function y(){return(c.state||{idx:null}).idx}function g(){d="POP";let R=y(),k=R==null?null:R-h;h=R,p&&p({action:d,location:A.location,delta:k})}function b(R,k){d="PUSH";let _=lo(A.location,R,k);h=y()+1;let j=ky(_,h),J=A.createHref(_);try{c.pushState(j,"",J)}catch(Q){if(Q instanceof DOMException&&Q.name==="DataCloneError")throw Q;u.location.assign(J)}s&&p&&p({action:d,location:A.location,delta:1})}function S(R,k){d="REPLACE";let _=lo(A.location,R,k);h=y();let j=ky(_,h),J=A.createHref(_);c.replaceState(j,"",J),s&&p&&p({action:d,location:A.location,delta:0})}function E(R){return ub(R)}let A={get action(){return d},get location(){return t(u,c)},listen(R){if(p)throw new Error("A history only accepts one active listener");return u.addEventListener(Cy,g),p=R,()=>{u.removeEventListener(Cy,g),p=null}},createHref(R){return l(u,R)},createURL:E,encodeLocation(R){let k=E(R);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:b,replace:S,go(R){return c.go(R)}};return A}function ub(t,l=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),Ve(a,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:kl(t);return r=r.replace(/ $/,"%20"),!l&&r.startsWith("//")&&(r=a+r),new URL(r,a)}var Zr,Ay=class{constructor(t){if(BS(this,Zr,new Map),t)for(let[l,a]of t)this.set(l,a)}get(t){if(Df(this,Zr).has(t))return Df(this,Zr).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,l){Df(this,Zr).set(t,l)}};Zr=new WeakMap;var FS=new Set(["lazy","caseSensitive","path","id","index","children"]);function GS(t){return FS.has(t)}var YS=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function VS(t){return YS.has(t)}function PS(t){return t.index===!0}function ao(t,l,a=[],r={},u=!1){return t.map((s,c)=>{let d=[...a,String(c)],p=typeof s.id=="string"?s.id:d.join("-");if(Ve(s.index!==!0||!s.children,"Cannot specify children on an index route"),Ve(u||!r[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),PS(s)){let h={...s,id:p};return r[p]=_y(h,l(h)),h}else{let h={...s,id:p,children:void 0};return r[p]=_y(h,l(h)),s.children&&(h.children=ao(s.children,l,d,r,u)),h}})}function _y(t,l){return Object.assign(t,{...l,...typeof l.lazy=="object"&&l.lazy!=null?{lazy:{...t.lazy,...l.lazy}}:{}})}function Ca(t,l,a="/"){return Jr(t,l,a,!1)}function Jr(t,l,a,r){let u=typeof l=="string"?Da(l):l,s=tl(u.pathname||"/",a);if(s==null)return null;let c=sb(t);$S(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let h=iE(s);d=lE(c[p],h,r)}return d}function XS(t,l){let{route:a,pathname:r,params:u}=t;return{id:a.id,pathname:r,params:u,data:l[a.id],loaderData:l[a.id],handle:a.handle}}function sb(t,l=[],a=[],r="",u=!1){let s=(c,d,p=u,h)=>{let y={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&p)return;Ve(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let g=Cl([r,y.relativePath]),b=a.concat(y);c.children&&c.children.length>0&&(Ve(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),sb(c.children,l,b,g,p)),!(c.path==null&&!c.index)&&l.push({path:g,score:tE(g,c.index),routesMeta:b})};return t.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))s(c,d);else for(let p of cb(c.path))s(c,d,!0,p)}),l}function cb(t){let l=t.split("/");if(l.length===0)return[];let[a,...r]=l,u=a.endsWith("?"),s=a.replace(/\?$/,"");if(r.length===0)return u?[s,""]:[s];let c=cb(r.join("/")),d=[];return d.push(...c.map(p=>p===""?s:[s,p].join("/"))),u&&d.push(...c),d.map(p=>t.startsWith("/")&&p===""?"/":p)}function $S(t){t.sort((l,a)=>l.score!==a.score?a.score-l.score:nE(l.routesMeta.map(r=>r.childrenIndex),a.routesMeta.map(r=>r.childrenIndex)))}var QS=/^:[\w-]+$/,KS=3,ZS=2,JS=1,WS=10,eE=-2,Ry=t=>t==="*";function tE(t,l){let a=t.split("/"),r=a.length;return a.some(Ry)&&(r+=eE),l&&(r+=ZS),a.filter(u=>!Ry(u)).reduce((u,s)=>u+(QS.test(s)?KS:s===""?JS:WS),r)}function nE(t,l){return t.length===l.length&&t.slice(0,-1).every((r,u)=>r===l[u])?t[t.length-1]-l[l.length-1]:0}function lE(t,l,a=!1){let{routesMeta:r}=t,u={},s="/",c=[];for(let d=0;d<r.length;++d){let p=r[d],h=d===r.length-1,y=s==="/"?l:l.slice(s.length)||"/",g=Zu({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},y),b=p.route;if(!g&&h&&a&&!r[r.length-1].route.index&&(g=Zu({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!g)return null;Object.assign(u,g.params),c.push({params:u,pathname:Cl([s,g.pathname]),pathnameBase:uE(Cl([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=Cl([s,g.pathnameBase]))}return c}function Zu(t,l){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[a,r]=aE(t.path,t.caseSensitive,t.end),u=l.match(a);if(!u)return null;let s=u[0],c=s.replace(/(.)\/+$/,"$1"),d=u.slice(1);return{params:r.reduce((h,{paramName:y,isOptional:g},b)=>{if(y==="*"){let E=d[b]||"";c=s.slice(0,s.length-E.length).replace(/(.)\/+$/,"$1")}const S=d[b];return g&&!S?h[y]=void 0:h[y]=(S||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:c,pattern:t}}function aE(t,l=!1,a=!0){zt(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],u="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p)=>(r.push({paramName:d,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),u+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?u+="\\/*$":t!==""&&t!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,l?void 0:"i"),r]}function iE(t){try{return t.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return zt(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),t}}function tl(t,l){if(l==="/")return t;if(!t.toLowerCase().startsWith(l.toLowerCase()))return null;let a=l.endsWith("/")?l.length-1:l.length,r=t.charAt(a);return r&&r!=="/"?null:t.slice(a)||"/"}function rE({basename:t,pathname:l}){return l==="/"?t:Cl([t,l])}var fb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Id=t=>fb.test(t);function oE(t,l="/"){let{pathname:a,search:r="",hash:u=""}=typeof t=="string"?Da(t):t,s;return a?(a=a.replace(/\/\/+/g,"/"),a.startsWith("/")?s=Dy(a.substring(1),"/"):s=Dy(a,l)):s=l,{pathname:s,search:sE(r),hash:cE(u)}}function Dy(t,l){let a=l.replace(/\/+$/,"").split("/");return t.split("/").forEach(u=>{u===".."?a.length>1&&a.pop():u!=="."&&a.push(u)}),a.length>1?a.join("/"):"/"}function Nf(t,l,a,r){return`Cannot include a '${t}' character in a manually specified \`to.${l}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function db(t){return t.filter((l,a)=>a===0||l.route.path&&l.route.path.length>0)}function qd(t){let l=db(t);return l.map((a,r)=>r===l.length-1?a.pathname:a.pathnameBase)}function Fd(t,l,a,r=!1){let u;typeof t=="string"?u=Da(t):(u={...t},Ve(!u.pathname||!u.pathname.includes("?"),Nf("?","pathname","search",u)),Ve(!u.pathname||!u.pathname.includes("#"),Nf("#","pathname","hash",u)),Ve(!u.search||!u.search.includes("#"),Nf("#","search","hash",u)));let s=t===""||u.pathname==="",c=s?"/":u.pathname,d;if(c==null)d=a;else{let g=l.length-1;if(!r&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),g-=1;u.pathname=b.join("/")}d=g>=0?l[g]:"/"}let p=oE(u,d),h=c&&c!=="/"&&c.endsWith("/"),y=(s||c===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(h||y)&&(p.pathname+="/"),p}var Cl=t=>t.join("/").replace(/\/\/+/g,"/"),uE=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),sE=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,cE=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,so=class{constructor(t,l,a,r=!1){this.status=t,this.statusText=l||"",this.internal=r,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function io(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function co(t){return t.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var hb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function mb(t,l){let a=t;if(typeof a!="string"||!fb.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let r=a,u=!1;if(hb)try{let s=new URL(window.location.href),c=a.startsWith("//")?new URL(s.protocol+a):new URL(a),d=tl(c.pathname,l);c.origin===s.origin&&d!=null?a=d+c.search+c.hash:u=!0}catch{zt(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:u,to:a}}var _a=Symbol("Uninstrumented");function fE(t,l){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(u=>u({id:l.id,index:l.index,path:l.path,instrument(s){let c=Object.keys(a);for(let d of c)s[d]&&a[d].push(s[d])}}));let r={};if(typeof l.lazy=="function"&&a.lazy.length>0){let u=Fi(a.lazy,l.lazy,()=>{});u&&(r.lazy=u)}if(typeof l.lazy=="object"){let u=l.lazy;["middleware","loader","action"].forEach(s=>{let c=u[s],d=a[`lazy.${s}`];if(typeof c=="function"&&d.length>0){let p=Fi(d,c,()=>{});p&&(r.lazy=Object.assign(r.lazy||{},{[s]:p}))}})}return["loader","action"].forEach(u=>{let s=l[u];if(typeof s=="function"&&a[u].length>0){let c=s[_a]??s,d=Fi(a[u],c,(...p)=>Ny(p[0]));d&&(u==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[_a]=c,r[u]=d)}}),l.middleware&&l.middleware.length>0&&a.middleware.length>0&&(r.middleware=l.middleware.map(u=>{let s=u[_a]??u,c=Fi(a.middleware,s,(...d)=>Ny(d[0]));return c?(c[_a]=s,c):u})),r}function dE(t,l){let a={navigate:[],fetch:[]};if(l.forEach(r=>r({instrument(u){let s=Object.keys(u);for(let c of s)u[c]&&a[c].push(u[c])}})),a.navigate.length>0){let r=t.navigate[_a]??t.navigate,u=Fi(a.navigate,r,(...s)=>{let[c,d]=s;return{to:typeof c=="number"||typeof c=="string"?c:c?kl(c):".",...jy(t,d??{})}});u&&(u[_a]=r,t.navigate=u)}if(a.fetch.length>0){let r=t.fetch[_a]??t.fetch,u=Fi(a.fetch,r,(...s)=>{let[c,,d,p]=s;return{href:d??".",fetcherKey:c,...jy(t,p??{})}});u&&(u[_a]=r,t.fetch=u)}return t}function Fi(t,l,a){return t.length===0?null:async(...r)=>{let u=await pb(t,a(...r),()=>l(...r),t.length-1);if(u.type==="error")throw u.value;return u.value}}async function pb(t,l,a,r){let u=t[r],s;if(u){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=pb(t,l,a,r-1),s=await c,Ve(s,"Expected a result"),s.type==="error"&&s.value instanceof Error?{status:"error",error:s.value}:{status:"success",error:void 0});try{await u(d,l)}catch(p){console.error("An instrumentation function threw an error:",p)}c||await d(),await c}else try{s={type:"success",value:await a()}}catch(c){s={type:"error",value:c}}return s||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Ny(t){let{request:l,context:a,params:r,unstable_pattern:u}=t;return{request:hE(l),params:{...r},unstable_pattern:u,context:mE(a)}}function jy(t,l){return{currentUrl:kl(t.state.location),..."formMethod"in l?{formMethod:l.formMethod}:{},..."formEncType"in l?{formEncType:l.formEncType}:{},..."formData"in l?{formData:l.formData}:{},..."body"in l?{body:l.body}:{}}}function hE(t){return{method:t.method,url:t.url,headers:{get:(...l)=>t.headers.get(...l)}}}function mE(t){if(gE(t)){let l={...t};return Object.freeze(l),l}else return{get:l=>t.get(l)}}var pE=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gE(t){if(t===null||typeof t!="object")return!1;const l=Object.getPrototypeOf(t);return l===Object.prototype||l===null||Object.getOwnPropertyNames(l).sort().join("\0")===pE}var gb=["POST","PUT","PATCH","DELETE"],yE=new Set(gb),vE=["GET",...gb],bE=new Set(vE),yb=new Set([301,302,303,307,308]),xE=new Set([307,308]),jf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},SE={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Hr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},EE=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),vb="remix-router-transitions",bb=Symbol("ResetLoaderData");function wE(t){const l=t.window?t.window:typeof window<"u"?window:void 0,a=typeof l<"u"&&typeof l.document<"u"&&typeof l.document.createElement<"u";Ve(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=t.hydrationRouteProperties||[],u=t.mapRouteProperties||EE,s=u;if(t.unstable_instrumentations){let z=t.unstable_instrumentations;s=G=>({...u(G),...fE(z.map(P=>P.route).filter(Boolean),G)})}let c={},d=ao(t.routes,s,void 0,c),p,h=t.basename||"/";h.startsWith("/")||(h=`/${h}`);let y=t.dataStrategy||_E,g={...t.future},b=null,S=new Set,E=null,A=null,R=null,k=t.hydrationData!=null,_=Ca(d,t.history.location,h),j=!1,J=null,Q;if(_==null&&!t.patchRoutesOnNavigation){let z=Wn(404,{pathname:t.history.location.pathname}),{matches:G,route:P}=Nu(d);Q=!0,_=G,J={[P.id]:z}}else if(_&&!t.hydrationData&&Sn(_,d,t.history.location.pathname).active&&(_=null),_)if(_.some(z=>z.route.lazy))Q=!1;else if(!_.some(z=>Gd(z.route)))Q=!0;else{let z=t.hydrationData?t.hydrationData.loaderData:null,G=t.hydrationData?t.hydrationData.errors:null;if(G){let P=_.findIndex(fe=>G[fe.route.id]!==void 0);Q=_.slice(0,P+1).every(fe=>!cd(fe.route,z,G))}else Q=_.every(P=>!cd(P.route,z,G))}else{Q=!1,_=[];let z=Sn(null,d,t.history.location.pathname);z.active&&z.matches&&(j=!0,_=z.matches)}let I,O={historyAction:t.history.action,location:t.history.location,matches:_,initialized:Q,navigation:jf,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||J,fetchers:new Map,blockers:new Map},le="POP",ne=null,D=!1,q,F=!1,V=new Map,ue=null,W=!1,B=!1,ee=new Set,ie=new Map,be=0,N=-1,M=new Map,Z=new Set,C=new Map,de=new Map,ge=new Set,Te=new Map,ze,ve=null;function Oe(){if(b=t.history.listen(({action:z,location:G,delta:P})=>{if(ze){ze(),ze=void 0;return}zt(Te.size===0||P!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let fe=Gn({currentLocation:O.location,nextLocation:G,historyAction:z});if(fe&&P!=null){let ye=new Promise(_e=>{ze=_e});t.history.go(P*-1),xn(fe,{state:"blocked",location:G,proceed(){xn(fe,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),ye.then(()=>t.history.go(P))},reset(){let _e=new Map(O.blockers);_e.set(fe,Hr),Et({blockers:_e})}}),ne?.resolve(),ne=null;return}return Yt(z,G)}),a){PE(l,V);let z=()=>XE(l,V);l.addEventListener("pagehide",z),ue=()=>l.removeEventListener("pagehide",z)}return O.initialized||Yt("POP",O.location,{initialHydration:!0}),I}function At(){b&&b(),ue&&ue(),S.clear(),q&&q.abort(),O.fetchers.forEach((z,G)=>ln(G)),O.blockers.forEach((z,G)=>ai(G))}function vn(z){return S.add(z),()=>S.delete(z)}function Et(z,G={}){z.matches&&(z.matches=z.matches.map(ye=>{let _e=c[ye.route.id],we=ye.route;return we.element!==_e.element||we.errorElement!==_e.errorElement||we.hydrateFallbackElement!==_e.hydrateFallbackElement?{...ye,route:_e}:ye})),O={...O,...z};let P=[],fe=[];O.fetchers.forEach((ye,_e)=>{ye.state==="idle"&&(ge.has(_e)?P.push(_e):fe.push(_e))}),ge.forEach(ye=>{!O.fetchers.has(ye)&&!ie.has(ye)&&P.push(ye)}),[...S].forEach(ye=>ye(O,{deletedFetchers:P,newErrors:z.errors??null,viewTransitionOpts:G.viewTransitionOpts,flushSync:G.flushSync===!0})),P.forEach(ye=>ln(ye)),fe.forEach(ye=>O.fetchers.delete(ye))}function Gt(z,G,{flushSync:P}={}){let fe=O.actionData!=null&&O.navigation.formMethod!=null&&on(O.navigation.formMethod)&&O.navigation.state==="loading"&&z.state?._isRedirect!==!0,ye;G.actionData?Object.keys(G.actionData).length>0?ye=G.actionData:ye=null:fe?ye=O.actionData:ye=null;let _e=G.loaderData?Fy(O.loaderData,G.loaderData,G.matches||[],G.errors):O.loaderData,we=O.blockers;we.size>0&&(we=new Map(we),we.forEach((Ne,De)=>we.set(De,Hr)));let Se=W?!1:Ct(z,G.matches||O.matches),xe=D===!0||O.navigation.formMethod!=null&&on(O.navigation.formMethod)&&z.state?._isRedirect!==!0;p&&(d=p,p=void 0),W||le==="POP"||(le==="PUSH"?t.history.push(z,z.state):le==="REPLACE"&&t.history.replace(z,z.state));let ke;if(le==="POP"){let Ne=V.get(O.location.pathname);Ne&&Ne.has(z.pathname)?ke={currentLocation:O.location,nextLocation:z}:V.has(z.pathname)&&(ke={currentLocation:z,nextLocation:O.location})}else if(F){let Ne=V.get(O.location.pathname);Ne?Ne.add(z.pathname):(Ne=new Set([z.pathname]),V.set(O.location.pathname,Ne)),ke={currentLocation:O.location,nextLocation:z}}Et({...G,actionData:ye,loaderData:_e,historyAction:le,location:z,initialized:!0,navigation:jf,revalidation:"idle",restoreScrollPosition:Se,preventScrollReset:xe,blockers:we},{viewTransitionOpts:ke,flushSync:P===!0}),le="POP",D=!1,F=!1,W=!1,B=!1,ne?.resolve(),ne=null,ve?.resolve(),ve=null}async function Qt(z,G){if(ne?.resolve(),ne=null,typeof z=="number"){ne||(ne=Py());let $e=ne.promise;return t.history.go(z),$e}let P=sd(O.location,O.matches,h,z,G?.fromRouteId,G?.relative),{path:fe,submission:ye,error:_e}=Oy(!1,P,G),we=O.location,Se=lo(O.location,fe,G&&G.state);Se={...Se,...t.history.encodeLocation(Se)};let xe=G&&G.replace!=null?G.replace:void 0,ke="PUSH";xe===!0?ke="REPLACE":xe===!1||ye!=null&&on(ye.formMethod)&&ye.formAction===O.location.pathname+O.location.search&&(ke="REPLACE");let Ne=G&&"preventScrollReset"in G?G.preventScrollReset===!0:void 0,De=(G&&G.flushSync)===!0,Xe=Gn({currentLocation:we,nextLocation:Se,historyAction:ke});if(Xe){xn(Xe,{state:"blocked",location:Se,proceed(){xn(Xe,{state:"proceeding",proceed:void 0,reset:void 0,location:Se}),Qt(z,G)},reset(){let $e=new Map(O.blockers);$e.set(Xe,Hr),Et({blockers:$e})}});return}await Yt(ke,Se,{submission:ye,pendingError:_e,preventScrollReset:Ne,replace:G&&G.replace,enableViewTransition:G&&G.viewTransition,flushSync:De,callSiteDefaultShouldRevalidate:G&&G.unstable_defaultShouldRevalidate})}function nn(){ve||(ve=Py()),he(),Et({revalidation:"loading"});let z=ve.promise;return O.navigation.state==="submitting"?z:O.navigation.state==="idle"?(Yt(O.historyAction,O.location,{startUninterruptedRevalidation:!0}),z):(Yt(le||O.historyAction,O.navigation.location,{overrideNavigation:O.navigation,enableViewTransition:F===!0}),z)}async function Yt(z,G,P){q&&q.abort(),q=null,le=z,W=(P&&P.startUninterruptedRevalidation)===!0,Rl(O.location,O.matches),D=(P&&P.preventScrollReset)===!0,F=(P&&P.enableViewTransition)===!0;let fe=p||d,ye=P&&P.overrideNavigation,_e=P?.initialHydration&&O.matches&&O.matches.length>0&&!j?O.matches:Ca(fe,G,h),we=(P&&P.flushSync)===!0;if(_e&&O.initialized&&!B&&LE(O.location,G)&&!(P&&P.submission&&on(P.submission.formMethod))){Gt(G,{matches:_e},{flushSync:we});return}let Se=Sn(_e,fe,G.pathname);if(Se.active&&Se.matches&&(_e=Se.matches),!_e){let{error:U,notFoundMatches:ce,route:me}=ml(G.pathname);Gt(G,{matches:ce,loaderData:{},errors:{[me.id]:U}},{flushSync:we});return}q=new AbortController;let xe=Ii(t.history,G,q.signal,P&&P.submission),ke=t.getContext?await t.getContext():new Ay,Ne;if(P&&P.pendingError)Ne=[ka(_e).route.id,{type:"error",error:P.pendingError}];else if(P&&P.submission&&on(P.submission.formMethod)){let U=await dl(xe,G,P.submission,_e,ke,Se.active,P&&P.initialHydration===!0,{replace:P.replace,flushSync:we});if(U.shortCircuited)return;if(U.pendingActionResult){let[ce,me]=U.pendingActionResult;if(qn(me)&&io(me.error)&&me.error.status===404){q=null,Gt(G,{matches:U.matches,loaderData:{},errors:{[ce]:me.error}});return}}_e=U.matches||_e,Ne=U.pendingActionResult,ye=Of(G,P.submission),we=!1,Se.active=!1,xe=Ii(t.history,xe.url,xe.signal)}let{shortCircuited:De,matches:Xe,loaderData:$e,errors:Ee}=await Dn(xe,G,_e,ke,Se.active,ye,P&&P.submission,P&&P.fetcherSubmission,P&&P.replace,P&&P.initialHydration===!0,we,Ne,P&&P.callSiteDefaultShouldRevalidate);De||(q=null,Gt(G,{matches:Xe||_e,...Gy(Ne),loaderData:$e,errors:Ee}))}async function dl(z,G,P,fe,ye,_e,we,Se={}){he();let xe=YE(G,P);if(Et({navigation:xe},{flushSync:Se.flushSync===!0}),_e){let De=await pl(fe,G.pathname,z.signal);if(De.type==="aborted")return{shortCircuited:!0};if(De.type==="error"){if(De.partialMatches.length===0){let{matches:$e,route:Ee}=Nu(d);return{matches:$e,pendingActionResult:[Ee.id,{type:"error",error:De.error}]}}let Xe=ka(De.partialMatches).route.id;return{matches:De.partialMatches,pendingActionResult:[Xe,{type:"error",error:De.error}]}}else if(De.matches)fe=De.matches;else{let{notFoundMatches:Xe,error:$e,route:Ee}=ml(G.pathname);return{matches:Xe,pendingActionResult:[Ee.id,{type:"error",error:$e}]}}}let ke,Ne=Gu(fe,G);if(!Ne.route.action&&!Ne.route.lazy)ke={type:"error",error:Wn(405,{method:z.method,pathname:G.pathname,routeId:Ne.route.id})};else{let De=Gi(s,c,z,fe,Ne,we?[]:r,ye),Xe=await cn(z,De,ye,null);if(ke=Xe[Ne.route.id],!ke){for(let $e of fe)if(Xe[$e.route.id]){ke=Xe[$e.route.id];break}}if(z.signal.aborted)return{shortCircuited:!0}}if(ei(ke)){let De;return Se&&Se.replace!=null?De=Se.replace:De=Hy(ke.response.headers.get("Location"),new URL(z.url),h,t.history)===O.location.pathname+O.location.search,await pt(z,ke,!0,{submission:P,replace:De}),{shortCircuited:!0}}if(qn(ke)){let De=ka(fe,Ne.route.id);return(Se&&Se.replace)!==!0&&(le="PUSH"),{matches:fe,pendingActionResult:[De.route.id,ke,Ne.route.id]}}return{matches:fe,pendingActionResult:[Ne.route.id,ke]}}async function Dn(z,G,P,fe,ye,_e,we,Se,xe,ke,Ne,De,Xe){let $e=_e||Of(G,we),Ee=we||Se||Vy($e),U=!W&&!ke;if(ye){if(U){let jt=bn(De);Et({navigation:$e,...jt!==void 0?{actionData:jt}:{}},{flushSync:Ne})}let tt=await pl(P,G.pathname,z.signal);if(tt.type==="aborted")return{shortCircuited:!0};if(tt.type==="error"){if(tt.partialMatches.length===0){let{matches:il,route:Zt}=Nu(d);return{matches:il,loaderData:{},errors:{[Zt.id]:tt.error}}}let jt=ka(tt.partialMatches).route.id;return{matches:tt.partialMatches,loaderData:{},errors:{[jt]:tt.error}}}else if(tt.matches)P=tt.matches;else{let{error:jt,notFoundMatches:il,route:Zt}=ml(G.pathname);return{matches:il,loaderData:{},errors:{[Zt.id]:jt}}}}let ce=p||d,{dsMatches:me,revalidatingFetchers:Ie}=My(z,fe,s,c,t.history,O,P,Ee,G,ke?[]:r,ke===!0,B,ee,ge,C,Z,ce,h,t.patchRoutesOnNavigation!=null,De,Xe);if(N=++be,!t.dataStrategy&&!me.some(tt=>tt.shouldLoad)&&!me.some(tt=>tt.route.middleware&&tt.route.middleware.length>0)&&Ie.length===0){let tt=Pe();return Gt(G,{matches:P,loaderData:{},errors:De&&qn(De[1])?{[De[0]]:De[1].error}:null,...Gy(De),...tt?{fetchers:new Map(O.fetchers)}:{}},{flushSync:Ne}),{shortCircuited:!0}}if(U){let tt={};if(!ye){tt.navigation=$e;let jt=bn(De);jt!==void 0&&(tt.actionData=jt)}Ie.length>0&&(tt.fetchers=Nn(Ie)),Et(tt,{flushSync:Ne})}Ie.forEach(tt=>{at(tt.key),tt.controller&&ie.set(tt.key,tt.controller)});let ut=()=>Ie.forEach(tt=>at(tt.key));q&&q.signal.addEventListener("abort",ut);let{loaderResults:Be,fetcherResults:xt}=await ae(me,Ie,z,fe);if(z.signal.aborted)return{shortCircuited:!0};q&&q.signal.removeEventListener("abort",ut),Ie.forEach(tt=>ie.delete(tt.key));let _t=ju(Be);if(_t)return await pt(z,_t.result,!0,{replace:xe}),{shortCircuited:!0};if(_t=ju(xt),_t)return Z.add(_t.key),await pt(z,_t.result,!0,{replace:xe}),{shortCircuited:!0};let{loaderData:Vt,errors:an}=qy(O,P,Be,De,Ie,xt);ke&&O.errors&&(an={...O.errors,...an});let yt=Pe(),gl=fn(N),yl=yt||gl||Ie.length>0;return{matches:P,loaderData:Vt,errors:an,...yl?{fetchers:new Map(O.fetchers)}:{}}}function bn(z){if(z&&!qn(z[1]))return{[z[0]]:z[1].data};if(O.actionData)return Object.keys(O.actionData).length===0?null:O.actionData}function Nn(z){return z.forEach(G=>{let P=O.fetchers.get(G.key),fe=Ir(void 0,P?P.data:void 0);O.fetchers.set(G.key,fe)}),new Map(O.fetchers)}async function hl(z,G,P,fe){at(z);let ye=(fe&&fe.flushSync)===!0,_e=p||d,we=sd(O.location,O.matches,h,P,G,fe?.relative),Se=Ca(_e,we,h),xe=Sn(Se,_e,we);if(xe.active&&xe.matches&&(Se=xe.matches),!Se){Ue(z,G,Wn(404,{pathname:we}),{flushSync:ye});return}let{path:ke,submission:Ne,error:De}=Oy(!0,we,fe);if(De){Ue(z,G,De,{flushSync:ye});return}let Xe=t.getContext?await t.getContext():new Ay,$e=(fe&&fe.preventScrollReset)===!0;if(Ne&&on(Ne.formMethod)){await Wl(z,G,ke,Se,Xe,xe.active,ye,$e,Ne,fe&&fe.unstable_defaultShouldRevalidate);return}C.set(z,{routeId:G,path:ke}),await Oa(z,G,ke,Se,Xe,xe.active,ye,$e,Ne)}async function Wl(z,G,P,fe,ye,_e,we,Se,xe,ke){he(),C.delete(z);let Ne=O.fetchers.get(z);Ae(z,VE(xe,Ne),{flushSync:we});let De=new AbortController,Xe=Ii(t.history,P,De.signal,xe);if(_e){let nt=await pl(fe,new URL(Xe.url).pathname,Xe.signal,z);if(nt.type==="aborted")return;if(nt.type==="error"){Ue(z,G,nt.error,{flushSync:we});return}else if(nt.matches)fe=nt.matches;else{Ue(z,G,Wn(404,{pathname:P}),{flushSync:we});return}}let $e=Gu(fe,P);if(!$e.route.action&&!$e.route.lazy){let nt=Wn(405,{method:xe.formMethod,pathname:P,routeId:G});Ue(z,G,nt,{flushSync:we});return}ie.set(z,De);let Ee=be,U=Gi(s,c,Xe,fe,$e,r,ye),ce=await cn(Xe,U,ye,z),me=ce[$e.route.id];if(!me){for(let nt of U)if(ce[nt.route.id]){me=ce[nt.route.id];break}}if(Xe.signal.aborted){ie.get(z)===De&&ie.delete(z);return}if(ge.has(z)){if(ei(me)||qn(me)){Ae(z,Ql(void 0));return}}else{if(ei(me))if(ie.delete(z),N>Ee){Ae(z,Ql(void 0));return}else return Z.add(z),Ae(z,Ir(xe)),pt(Xe,me,!1,{fetcherSubmission:xe,preventScrollReset:Se});if(qn(me)){Ue(z,G,me.error);return}}let Ie=O.navigation.location||O.location,ut=Ii(t.history,Ie,De.signal),Be=p||d,xt=O.navigation.state!=="idle"?Ca(Be,O.navigation.location,h):O.matches;Ve(xt,"Didn't find any matches after fetcher action");let _t=++be;M.set(z,_t);let Vt=Ir(xe,me.data);O.fetchers.set(z,Vt);let{dsMatches:an,revalidatingFetchers:yt}=My(ut,ye,s,c,t.history,O,xt,xe,Ie,r,!1,B,ee,ge,C,Z,Be,h,t.patchRoutesOnNavigation!=null,[$e.route.id,me],ke);yt.filter(nt=>nt.key!==z).forEach(nt=>{let La=nt.key,xo=O.fetchers.get(La),Qi=Ir(void 0,xo?xo.data:void 0);O.fetchers.set(La,Qi),at(La),nt.controller&&ie.set(La,nt.controller)}),Et({fetchers:new Map(O.fetchers)});let gl=()=>yt.forEach(nt=>at(nt.key));De.signal.addEventListener("abort",gl);let{loaderResults:yl,fetcherResults:tt}=await ae(an,yt,ut,ye);if(De.signal.aborted)return;if(De.signal.removeEventListener("abort",gl),M.delete(z),ie.delete(z),yt.forEach(nt=>ie.delete(nt.key)),O.fetchers.has(z)){let nt=Ql(me.data);O.fetchers.set(z,nt)}let jt=ju(yl);if(jt)return pt(ut,jt.result,!1,{preventScrollReset:Se});if(jt=ju(tt),jt)return Z.add(jt.key),pt(ut,jt.result,!1,{preventScrollReset:Se});let{loaderData:il,errors:Zt}=qy(O,xt,yl,void 0,yt,tt);fn(_t),O.navigation.state==="loading"&&_t>N?(Ve(le,"Expected pending action"),q&&q.abort(),Gt(O.navigation.location,{matches:xt,loaderData:il,errors:Zt,fetchers:new Map(O.fetchers)})):(Et({errors:Zt,loaderData:Fy(O.loaderData,il,xt,Zt),fetchers:new Map(O.fetchers)}),B=!1)}async function Oa(z,G,P,fe,ye,_e,we,Se,xe){let ke=O.fetchers.get(z);Ae(z,Ir(xe,ke?ke.data:void 0),{flushSync:we});let Ne=new AbortController,De=Ii(t.history,P,Ne.signal);if(_e){let me=await pl(fe,new URL(De.url).pathname,De.signal,z);if(me.type==="aborted")return;if(me.type==="error"){Ue(z,G,me.error,{flushSync:we});return}else if(me.matches)fe=me.matches;else{Ue(z,G,Wn(404,{pathname:P}),{flushSync:we});return}}let Xe=Gu(fe,P);ie.set(z,Ne);let $e=be,Ee=Gi(s,c,De,fe,Xe,r,ye),ce=(await cn(De,Ee,ye,z))[Xe.route.id];if(ie.get(z)===Ne&&ie.delete(z),!De.signal.aborted){if(ge.has(z)){Ae(z,Ql(void 0));return}if(ei(ce))if(N>$e){Ae(z,Ql(void 0));return}else{Z.add(z),await pt(De,ce,!1,{preventScrollReset:Se});return}if(qn(ce)){Ue(z,G,ce.error);return}Ae(z,Ql(ce.data))}}async function pt(z,G,P,{submission:fe,fetcherSubmission:ye,preventScrollReset:_e,replace:we}={}){P||(ne?.resolve(),ne=null),G.response.headers.has("X-Remix-Revalidate")&&(B=!0);let Se=G.response.headers.get("Location");Ve(Se,"Expected a Location header on the redirect Response"),Se=Hy(Se,new URL(z.url),h,t.history);let xe=lo(O.location,Se,{_isRedirect:!0});if(a){let Ee=!1;if(G.response.headers.has("X-Remix-Reload-Document"))Ee=!0;else if(Id(Se)){const U=ub(Se,!0);Ee=U.origin!==l.location.origin||tl(U.pathname,h)==null}if(Ee){we?l.location.replace(Se):l.location.assign(Se);return}}q=null;let ke=we===!0||G.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ne,formAction:De,formEncType:Xe}=O.navigation;!fe&&!ye&&Ne&&De&&Xe&&(fe=Vy(O.navigation));let $e=fe||ye;if(xE.has(G.response.status)&&$e&&on($e.formMethod))await Yt(ke,xe,{submission:{...$e,formAction:Se},preventScrollReset:_e||D,enableViewTransition:P?F:void 0});else{let Ee=Of(xe,fe);await Yt(ke,xe,{overrideNavigation:Ee,fetcherSubmission:ye,preventScrollReset:_e||D,enableViewTransition:P?F:void 0})}}async function cn(z,G,P,fe){let ye,_e={};try{ye=await DE(y,z,G,fe,P,!1)}catch(we){return G.filter(Se=>Se.shouldLoad).forEach(Se=>{_e[Se.route.id]={type:"error",error:we}}),_e}if(z.signal.aborted)return _e;if(!on(z.method))for(let we of G){if(ye[we.route.id]?.type==="error")break;!ye.hasOwnProperty(we.route.id)&&!O.loaderData.hasOwnProperty(we.route.id)&&(!O.errors||!O.errors.hasOwnProperty(we.route.id))&&we.shouldCallHandler()&&(ye[we.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${we.route.id}`)})}for(let[we,Se]of Object.entries(ye))if(IE(Se)){let xe=Se.result;_e[we]={type:"redirect",response:ME(xe,z,we,G,h)}}else _e[we]=await OE(Se);return _e}async function ae(z,G,P,fe){let ye=cn(P,z,fe,null),_e=Promise.all(G.map(async xe=>{if(xe.matches&&xe.match&&xe.request&&xe.controller){let Ne=(await cn(xe.request,xe.matches,fe,xe.key))[xe.match.route.id];return{[xe.key]:Ne}}else return Promise.resolve({[xe.key]:{type:"error",error:Wn(404,{pathname:xe.path})}})})),we=await ye,Se=(await _e).reduce((xe,ke)=>Object.assign(xe,ke),{});return{loaderResults:we,fetcherResults:Se}}function he(){B=!0,C.forEach((z,G)=>{ie.has(G)&&ee.add(G),at(G)})}function Ae(z,G,P={}){O.fetchers.set(z,G),Et({fetchers:new Map(O.fetchers)},{flushSync:(P&&P.flushSync)===!0})}function Ue(z,G,P,fe={}){let ye=ka(O.matches,G);ln(z),Et({errors:{[ye.route.id]:P},fetchers:new Map(O.fetchers)},{flushSync:(fe&&fe.flushSync)===!0})}function Je(z){return de.set(z,(de.get(z)||0)+1),ge.has(z)&&ge.delete(z),O.fetchers.get(z)||SE}function qt(z,G){at(z,G?.reason),Ae(z,Ql(null))}function ln(z){let G=O.fetchers.get(z);ie.has(z)&&!(G&&G.state==="loading"&&M.has(z))&&at(z),C.delete(z),M.delete(z),Z.delete(z),ge.delete(z),ee.delete(z),O.fetchers.delete(z)}function Rt(z){let G=(de.get(z)||0)-1;G<=0?(de.delete(z),ge.add(z)):de.set(z,G),Et({fetchers:new Map(O.fetchers)})}function at(z,G){let P=ie.get(z);P&&(P.abort(G),ie.delete(z))}function gt(z){for(let G of z){let P=Je(G),fe=Ql(P.data);O.fetchers.set(G,fe)}}function Pe(){let z=[],G=!1;for(let P of Z){let fe=O.fetchers.get(P);Ve(fe,`Expected fetcher: ${P}`),fe.state==="loading"&&(Z.delete(P),z.push(P),G=!0)}return gt(z),G}function fn(z){let G=[];for(let[P,fe]of M)if(fe<z){let ye=O.fetchers.get(P);Ve(ye,`Expected fetcher: ${P}`),ye.state==="loading"&&(at(P),M.delete(P),G.push(P))}return gt(G),G.length>0}function Kt(z,G){let P=O.blockers.get(z)||Hr;return Te.get(z)!==G&&Te.set(z,G),P}function ai(z){O.blockers.delete(z),Te.delete(z)}function xn(z,G){let P=O.blockers.get(z)||Hr;Ve(P.state==="unblocked"&&G.state==="blocked"||P.state==="blocked"&&G.state==="blocked"||P.state==="blocked"&&G.state==="proceeding"||P.state==="blocked"&&G.state==="unblocked"||P.state==="proceeding"&&G.state==="unblocked",`Invalid blocker state transition: ${P.state} -> ${G.state}`);let fe=new Map(O.blockers);fe.set(z,G),Et({blockers:fe})}function Gn({currentLocation:z,nextLocation:G,historyAction:P}){if(Te.size===0)return;Te.size>1&&zt(!1,"A router only supports one blocker at a time");let fe=Array.from(Te.entries()),[ye,_e]=fe[fe.length-1],we=O.blockers.get(ye);if(!(we&&we.state==="proceeding")&&_e({currentLocation:z,nextLocation:G,historyAction:P}))return ye}function ml(z){let G=Wn(404,{pathname:z}),P=p||d,{matches:fe,route:ye}=Nu(P);return{notFoundMatches:fe,route:ye,error:G}}function dn(z,G,P){if(E=z,R=G,A=P||null,!k&&O.navigation===jf){k=!0;let fe=Ct(O.location,O.matches);fe!=null&&Et({restoreScrollPosition:fe})}return()=>{E=null,R=null,A=null}}function _l(z,G){return A&&A(z,G.map(fe=>XS(fe,O.loaderData)))||z.key}function Rl(z,G){if(E&&R){let P=_l(z,G);E[P]=R()}}function Ct(z,G){if(E){let P=_l(z,G),fe=E[P];if(typeof fe=="number")return fe}return null}function Sn(z,G,P){if(t.patchRoutesOnNavigation)if(z){if(Object.keys(z[0].params).length>0)return{active:!0,matches:Jr(G,P,h,!0)}}else return{active:!0,matches:Jr(G,P,h,!0)||[]};return{active:!1,matches:null}}async function pl(z,G,P,fe){if(!t.patchRoutesOnNavigation)return{type:"success",matches:z};let ye=z;for(;;){let _e=p==null,we=p||d,Se=c;try{await t.patchRoutesOnNavigation({signal:P,path:G,matches:ye,fetcherKey:fe,patch:(Ne,De)=>{P.aborted||zy(Ne,De,we,Se,s,!1)}})}catch(Ne){return{type:"error",error:Ne,partialMatches:ye}}finally{_e&&!P.aborted&&(d=[...d])}if(P.aborted)return{type:"aborted"};let xe=Ca(we,G,h),ke=null;if(xe){if(Object.keys(xe[0].params).length===0)return{type:"success",matches:xe};if(ke=Jr(we,G,h,!0),!(ke&&ye.length<ke.length&&al(ye,ke.slice(0,ye.length))))return{type:"success",matches:xe}}if(ke||(ke=Jr(we,G,h,!0)),!ke||al(ye,ke))return{type:"success",matches:null};ye=ke}}function al(z,G){return z.length===G.length&&z.every((P,fe)=>P.route.id===G[fe].route.id)}function Ma(z){c={},p=ao(z,s,void 0,c)}function za(z,G,P=!1){let fe=p==null;zy(z,G,p||d,c,s,P),fe&&(d=[...d],Et({}))}return I={get basename(){return h},get future(){return g},get state(){return O},get routes(){return d},get window(){return l},initialize:Oe,subscribe:vn,enableScrollRestoration:dn,navigate:Qt,fetch:hl,revalidate:nn,createHref:z=>t.history.createHref(z),encodeLocation:z=>t.history.encodeLocation(z),getFetcher:Je,resetFetcher:qt,deleteFetcher:Rt,dispose:At,getBlocker:Kt,deleteBlocker:ai,patchRoutes:za,_internalFetchControllers:ie,_internalSetRoutes:Ma,_internalSetStateDoNotUseOrYouWillBreakYourApp(z){Et(z)}},t.unstable_instrumentations&&(I=dE(I,t.unstable_instrumentations.map(z=>z.router).filter(Boolean))),I}function TE(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function sd(t,l,a,r,u,s){let c,d;if(u){c=[];for(let h of l)if(c.push(h),h.route.id===u){d=h;break}}else c=l,d=l[l.length-1];let p=Fd(r||".",qd(c),tl(t.pathname,a)||t.pathname,s==="path");if(r==null&&(p.search=t.search,p.hash=t.hash),(r==null||r===""||r===".")&&d){let h=Vd(p.search);if(d.route.index&&!h)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&h){let y=new URLSearchParams(p.search),g=y.getAll("index");y.delete("index"),g.filter(S=>S).forEach(S=>y.append("index",S));let b=y.toString();p.search=b?`?${b}`:""}}return a!=="/"&&(p.pathname=rE({basename:a,pathname:p.pathname})),kl(p)}function Oy(t,l,a){if(!a||!TE(a))return{path:l};if(a.formMethod&&!GE(a.formMethod))return{path:l,error:Wn(405,{method:a.formMethod})};let r=()=>({path:l,error:Wn(400,{type:"invalid-body"})}),s=(a.formMethod||"get").toUpperCase(),c=Cb(l);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!on(s))return r();let g=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((b,[S,E])=>`${b}${S}=${E}
|
|
10
|
-
`,""):String(a.body);return{path:l,submission:{formMethod:s,formAction:c,formEncType:a.formEncType,formData:void 0,json:void 0,text:g}}}else if(a.formEncType==="application/json"){if(!on(s))return r();try{let g=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:l,submission:{formMethod:s,formAction:c,formEncType:a.formEncType,formData:void 0,json:g,text:void 0}}}catch{return r()}}}Ve(typeof FormData=="function","FormData is not available in this environment");let d,p;if(a.formData)d=dd(a.formData),p=a.formData;else if(a.body instanceof FormData)d=dd(a.body),p=a.body;else if(a.body instanceof URLSearchParams)d=a.body,p=Iy(d);else if(a.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(a.body),p=Iy(d)}catch{return r()}let h={formMethod:s,formAction:c,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(on(h.formMethod))return{path:l,submission:h};let y=Da(l);return t&&y.search&&Vd(y.search)&&d.append("index",""),y.search=`?${d}`,{path:kl(y),submission:h}}function My(t,l,a,r,u,s,c,d,p,h,y,g,b,S,E,A,R,k,_,j,J){let Q=j?qn(j[1])?j[1].error:j[1].data:void 0,I=u.createURL(s.location),O=u.createURL(p),le;if(y&&s.errors){let W=Object.keys(s.errors)[0];le=c.findIndex(B=>B.route.id===W)}else if(j&&qn(j[1])){let W=j[0];le=c.findIndex(B=>B.route.id===W)-1}let ne=j?j[1].statusCode:void 0,D=ne&&ne>=400,q={currentUrl:I,currentParams:s.matches[0]?.params||{},nextUrl:O,nextParams:c[0].params,...d,actionResult:Q,actionStatus:ne},F=co(c),V=c.map((W,B)=>{let{route:ee}=W,ie=null;if(le!=null&&B>le?ie=!1:ee.lazy?ie=!0:Gd(ee)?y?ie=cd(ee,s.loaderData,s.errors):CE(s.loaderData,s.matches[B],W)&&(ie=!0):ie=!1,ie!==null)return fd(a,r,t,F,W,h,l,ie);let be=!1;typeof J=="boolean"?be=J:D?be=!1:(g||I.pathname+I.search===O.pathname+O.search||I.search!==O.search||kE(s.matches[B],W))&&(be=!0);let N={...q,defaultShouldRevalidate:be},M=Wr(W,N);return fd(a,r,t,F,W,h,l,M,N,J)}),ue=[];return E.forEach((W,B)=>{if(y||!c.some(de=>de.route.id===W.routeId)||S.has(B))return;let ee=s.fetchers.get(B),ie=ee&&ee.state!=="idle"&&ee.data===void 0,be=Ca(R,W.path,k);if(!be){if(_&&ie)return;ue.push({key:B,routeId:W.routeId,path:W.path,matches:null,match:null,request:null,controller:null});return}if(A.has(B))return;let N=Gu(be,W.path),M=new AbortController,Z=Ii(u,W.path,M.signal),C=null;if(b.has(B))b.delete(B),C=Gi(a,r,Z,be,N,h,l);else if(ie)g&&(C=Gi(a,r,Z,be,N,h,l));else{let de;typeof J=="boolean"?de=J:D?de=!1:de=g;let ge={...q,defaultShouldRevalidate:de};Wr(N,ge)&&(C=Gi(a,r,Z,be,N,h,l,ge))}C&&ue.push({key:B,routeId:W.routeId,path:W.path,matches:C,match:N,request:Z,controller:M})}),{dsMatches:V,revalidatingFetchers:ue}}function Gd(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function cd(t,l,a){if(t.lazy)return!0;if(!Gd(t))return!1;let r=l!=null&&t.id in l,u=a!=null&&a[t.id]!==void 0;return!r&&u?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!u}function CE(t,l,a){let r=!l||a.route.id!==l.route.id,u=!t.hasOwnProperty(a.route.id);return r||u}function kE(t,l){let a=t.route.path;return t.pathname!==l.pathname||a!=null&&a.endsWith("*")&&t.params["*"]!==l.params["*"]}function Wr(t,l){if(t.route.shouldRevalidate){let a=t.route.shouldRevalidate(l);if(typeof a=="boolean")return a}return l.defaultShouldRevalidate}function zy(t,l,a,r,u,s){let c;if(t){let h=r[t];Ve(h,`No route found to patch children into: routeId = ${t}`),h.children||(h.children=[]),c=h.children}else c=a;let d=[],p=[];if(l.forEach(h=>{let y=c.find(g=>xb(h,g));y?p.push({existingRoute:y,newRoute:h}):d.push(h)}),d.length>0){let h=ao(d,u,[t||"_","patch",String(c?.length||"0")],r);c.push(...h)}if(s&&p.length>0)for(let h=0;h<p.length;h++){let{existingRoute:y,newRoute:g}=p[h],b=y,[S]=ao([g],u,[],{},!0);Object.assign(b,{element:S.element?S.element:b.element,errorElement:S.errorElement?S.errorElement:b.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:b.hydrateFallbackElement})}}function xb(t,l){return"id"in t&&"id"in l&&t.id===l.id?!0:t.index===l.index&&t.path===l.path&&t.caseSensitive===l.caseSensitive?(!t.children||t.children.length===0)&&(!l.children||l.children.length===0)?!0:t.children.every((a,r)=>l.children?.some(u=>xb(a,u))):!1}var Ly=new WeakMap,Sb=({key:t,route:l,manifest:a,mapRouteProperties:r})=>{let u=a[l.id];if(Ve(u,"No route found in manifest"),!u.lazy||typeof u.lazy!="object")return;let s=u.lazy[t];if(!s)return;let c=Ly.get(u);c||(c={},Ly.set(u,c));let d=c[t];if(d)return d;let p=(async()=>{let h=GS(t),g=u[t]!==void 0&&t!=="hasErrorBoundary";if(h)zt(!h,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),c[t]=Promise.resolve();else if(g)zt(!1,`Route "${u.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let b=await s();b!=null&&(Object.assign(u,{[t]:b}),Object.assign(u,r(u)))}typeof u.lazy=="object"&&(u.lazy[t]=void 0,Object.values(u.lazy).every(b=>b===void 0)&&(u.lazy=void 0))})();return c[t]=p,p},Uy=new WeakMap;function AE(t,l,a,r,u){let s=a[t.id];if(Ve(s,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let y=Uy.get(s);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let g=(async()=>{Ve(typeof t.lazy=="function","No lazy route function found");let b=await t.lazy(),S={};for(let E in b){let A=b[E];if(A===void 0)continue;let R=VS(E),_=s[E]!==void 0&&E!=="hasErrorBoundary";R?zt(!R,"Route property "+E+" is not a supported property to be returned from a lazy route function. This property will be ignored."):_?zt(!_,`Route "${s.id}" has a static property "${E}" defined but its lazy function is also returning a value for this property. The lazy route property "${E}" will be ignored.`):S[E]=A}Object.assign(s,S),Object.assign(s,{...r(s),lazy:void 0})})();return Uy.set(s,g),g.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:g}}let c=Object.keys(t.lazy),d=[],p;for(let y of c){if(u&&u.includes(y))continue;let g=Sb({key:y,route:t,manifest:a,mapRouteProperties:r});g&&(d.push(g),y===l&&(p=g))}let h=d.length>0?Promise.all(d).then(()=>{}):void 0;return h?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:p}}async function By(t){let l=t.matches.filter(u=>u.shouldLoad),a={};return(await Promise.all(l.map(u=>u.resolve()))).forEach((u,s)=>{a[l[s].route.id]=u}),a}async function _E(t){return t.matches.some(l=>l.route.middleware)?Eb(t,()=>By(t)):By(t)}function Eb(t,l){return RE(t,l,r=>{if(FE(r))throw r;return r},BE,a);function a(r,u,s){if(s)return Promise.resolve(Object.assign(s.value,{[u]:{type:"error",result:r}}));{let{matches:c}=t,d=Math.min(Math.max(c.findIndex(h=>h.route.id===u),0),Math.max(c.findIndex(h=>h.shouldCallHandler()),0)),p=ka(c,c[d].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:r}})}}}async function RE(t,l,a,r,u){let{matches:s,request:c,params:d,context:p,unstable_pattern:h}=t,y=s.flatMap(b=>b.route.middleware?b.route.middleware.map(S=>[b.route.id,S]):[]);return await wb({request:c,params:d,context:p,unstable_pattern:h},y,l,a,r,u)}async function wb(t,l,a,r,u,s,c=0){let{request:d}=t;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let p=l[c];if(!p)return await a();let[h,y]=p,g,b=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");try{return g={value:await wb(t,l,a,r,u,s,c+1)},g.value}catch(S){return g={value:await s(S,h,g)},g.value}};try{let S=await y(t,b),E=S!=null?r(S):void 0;return u(E)?E:g?E??g.value:(g={value:await b()},g.value)}catch(S){return await s(S,h,g)}}function Tb(t,l,a,r,u){let s=Sb({key:"middleware",route:r.route,manifest:l,mapRouteProperties:t}),c=AE(r.route,on(a.method)?"action":"loader",l,t,u);return{middleware:s,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function fd(t,l,a,r,u,s,c,d,p=null,h){let y=!1,g=Tb(t,l,a,u,s);return{...u,_lazyPromises:g,shouldLoad:d,shouldRevalidateArgs:p,shouldCallHandler(b){return y=!0,p?typeof h=="boolean"?Wr(u,{...p,defaultShouldRevalidate:h}):typeof b=="boolean"?Wr(u,{...p,defaultShouldRevalidate:b}):Wr(u,p):d},resolve(b){let{lazy:S,loader:E,middleware:A}=u.route,R=y||d||b&&!on(a.method)&&(S||E),k=A&&A.length>0&&!E&&!S;return R&&(on(a.method)||!k)?NE({request:a,unstable_pattern:r,match:u,lazyHandlerPromise:g?.handler,lazyRoutePromise:g?.route,handlerOverride:b,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function Gi(t,l,a,r,u,s,c,d=null){return r.map(p=>p.route.id!==u.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:Tb(t,l,a,p,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:fd(t,l,a,co(r),p,s,c,!0,d))}async function DE(t,l,a,r,u,s){a.some(h=>h._lazyPromises?.middleware)&&await Promise.all(a.map(h=>h._lazyPromises?.middleware));let c={request:l,unstable_pattern:co(a),params:a[0].params,context:u,matches:a},p=await t({...c,fetcherKey:r,runClientMiddleware:h=>{let y=c;return Eb(y,()=>h({...y,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(h=>[h._lazyPromises?.handler,h._lazyPromises?.route]))}catch{}return p}async function NE({request:t,unstable_pattern:l,match:a,lazyHandlerPromise:r,lazyRoutePromise:u,handlerOverride:s,scopedContext:c}){let d,p,h=on(t.method),y=h?"action":"loader",g=b=>{let S,E=new Promise((k,_)=>S=_);p=()=>S(),t.signal.addEventListener("abort",p);let A=k=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${a.route.id}]`)):b({request:t,unstable_pattern:l,params:a.params,context:c},...k!==void 0?[k]:[]),R=(async()=>{try{return{type:"data",result:await(s?s(_=>A(_)):A())}}catch(k){return{type:"error",result:k}}})();return Promise.race([R,E])};try{let b=h?a.route.action:a.route.loader;if(r||u)if(b){let S,[E]=await Promise.all([g(b).catch(A=>{S=A}),r,u]);if(S!==void 0)throw S;d=E}else{await r;let S=h?a.route.action:a.route.loader;if(S)[d]=await Promise.all([g(S),u]);else if(y==="action"){let E=new URL(t.url),A=E.pathname+E.search;throw Wn(405,{method:t.method,pathname:A,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(b)d=await g(b);else{let S=new URL(t.url),E=S.pathname+S.search;throw Wn(404,{pathname:E})}}catch(b){return{type:"error",result:b}}finally{p&&t.signal.removeEventListener("abort",p)}return d}async function jE(t){let l=t.headers.get("Content-Type");return l&&/\bapplication\/json\b/.test(l)?t.body==null?null:t.json():t.text()}async function OE(t){let{result:l,type:a}=t;if(Yd(l)){let r;try{r=await jE(l)}catch(u){return{type:"error",error:u}}return a==="error"?{type:"error",error:new so(l.status,l.statusText,r),statusCode:l.status,headers:l.headers}:{type:"data",data:r,statusCode:l.status,headers:l.headers}}return a==="error"?Yy(l)?l.data instanceof Error?{type:"error",error:l.data,statusCode:l.init?.status,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"error",error:UE(l),statusCode:io(l)?l.status:void 0,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"error",error:l,statusCode:io(l)?l.status:void 0}:Yy(l)?{type:"data",data:l.data,statusCode:l.init?.status,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"data",data:l}}function ME(t,l,a,r,u){let s=t.headers.get("Location");if(Ve(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Id(s)){let c=r.slice(0,r.findIndex(d=>d.route.id===a)+1);s=sd(new URL(l.url),c,u,s),t.headers.set("Location",s)}return t}function Hy(t,l,a,r){let u=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Id(t)){let s=t,c=s.startsWith("//")?new URL(l.protocol+s):new URL(s);if(u.includes(c.protocol))throw new Error("Invalid redirect location");let d=tl(c.pathname,a)!=null;if(c.origin===l.origin&&d)return c.pathname+c.search+c.hash}try{let s=r.createURL(t);if(u.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return t}function Ii(t,l,a,r){let u=t.createURL(Cb(l)).toString(),s={signal:a};if(r&&on(r.formMethod)){let{formMethod:c,formEncType:d}=r;s.method=c.toUpperCase(),d==="application/json"?(s.headers=new Headers({"Content-Type":d}),s.body=JSON.stringify(r.json)):d==="text/plain"?s.body=r.text:d==="application/x-www-form-urlencoded"&&r.formData?s.body=dd(r.formData):s.body=r.formData}return new Request(u,s)}function dd(t){let l=new URLSearchParams;for(let[a,r]of t.entries())l.append(a,typeof r=="string"?r:r.name);return l}function Iy(t){let l=new FormData;for(let[a,r]of t.entries())l.append(a,r);return l}function zE(t,l,a,r=!1,u=!1){let s={},c=null,d,p=!1,h={},y=a&&qn(a[1])?a[1].error:void 0;return t.forEach(g=>{if(!(g.route.id in l))return;let b=g.route.id,S=l[b];if(Ve(!ei(S),"Cannot handle redirect results in processLoaderData"),qn(S)){let E=S.error;if(y!==void 0&&(E=y,y=void 0),c=c||{},u)c[b]=E;else{let A=ka(t,b);c[A.route.id]==null&&(c[A.route.id]=E)}r||(s[b]=bb),p||(p=!0,d=io(S.error)?S.error.status:500),S.headers&&(h[b]=S.headers)}else s[b]=S.data,S.statusCode&&S.statusCode!==200&&!p&&(d=S.statusCode),S.headers&&(h[b]=S.headers)}),y!==void 0&&a&&(c={[a[0]]:y},a[2]&&(s[a[2]]=void 0)),{loaderData:s,errors:c,statusCode:d||200,loaderHeaders:h}}function qy(t,l,a,r,u,s){let{loaderData:c,errors:d}=zE(l,a,r);return u.filter(p=>!p.matches||p.matches.some(h=>h.shouldLoad)).forEach(p=>{let{key:h,match:y,controller:g}=p;if(g&&g.signal.aborted)return;let b=s[h];if(Ve(b,"Did not find corresponding fetcher result"),qn(b)){let S=ka(t.matches,y?.route.id);d&&d[S.route.id]||(d={...d,[S.route.id]:b.error}),t.fetchers.delete(h)}else if(ei(b))Ve(!1,"Unhandled fetcher revalidation redirect");else{let S=Ql(b.data);t.fetchers.set(h,S)}}),{loaderData:c,errors:d}}function Fy(t,l,a,r){let u=Object.entries(l).filter(([,s])=>s!==bb).reduce((s,[c,d])=>(s[c]=d,s),{});for(let s of a){let c=s.route.id;if(!l.hasOwnProperty(c)&&t.hasOwnProperty(c)&&s.route.loader&&(u[c]=t[c]),r&&r.hasOwnProperty(c))break}return u}function Gy(t){return t?qn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function ka(t,l){return(l?t.slice(0,t.findIndex(r=>r.route.id===l)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function Nu(t){let l=t.length===1?t[0]:t.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:l}],route:l}}function Wn(t,{pathname:l,routeId:a,method:r,type:u,message:s}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return t===400?(c="Bad Request",r&&l&&a?d=`You made a ${r} request to "${l}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:u==="invalid-body"&&(d="Unable to encode submission body")):t===403?(c="Forbidden",d=`Route "${a}" does not match URL "${l}"`):t===404?(c="Not Found",d=`No route matches URL "${l}"`):t===405&&(c="Method Not Allowed",r&&l&&a?d=`You made a ${r.toUpperCase()} request to "${l}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:r&&(d=`Invalid request method "${r.toUpperCase()}"`)),new so(t||500,c,new Error(d),!0)}function ju(t){let l=Object.entries(t);for(let a=l.length-1;a>=0;a--){let[r,u]=l[a];if(ei(u))return{key:r,result:u}}}function Cb(t){let l=typeof t=="string"?Da(t):t;return kl({...l,hash:""})}function LE(t,l){return t.pathname!==l.pathname||t.search!==l.search?!1:t.hash===""?l.hash!=="":t.hash===l.hash?!0:l.hash!==""}function UE(t){return new so(t.init?.status??500,t.init?.statusText??"Internal Server Error",t.data)}function BE(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([l,a])=>typeof l=="string"&&HE(a))}function HE(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function IE(t){return Yd(t.result)&&yb.has(t.result.status)}function qn(t){return t.type==="error"}function ei(t){return(t&&t.type)==="redirect"}function Yy(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function Yd(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function qE(t){return yb.has(t)}function FE(t){return Yd(t)&&qE(t.status)&&t.headers.has("Location")}function GE(t){return bE.has(t.toUpperCase())}function on(t){return yE.has(t.toUpperCase())}function Vd(t){return new URLSearchParams(t).getAll("index").some(l=>l==="")}function Gu(t,l){let a=typeof l=="string"?Da(l).search:l.search;if(t[t.length-1].route.index&&Vd(a||""))return t[t.length-1];let r=db(t);return r[r.length-1]}function Vy(t){let{formMethod:l,formAction:a,formEncType:r,text:u,formData:s,json:c}=t;if(!(!l||!a||!r)){if(u!=null)return{formMethod:l,formAction:a,formEncType:r,formData:void 0,json:void 0,text:u};if(s!=null)return{formMethod:l,formAction:a,formEncType:r,formData:s,json:void 0,text:void 0};if(c!==void 0)return{formMethod:l,formAction:a,formEncType:r,formData:void 0,json:c,text:void 0}}}function Of(t,l){return l?{state:"loading",location:t,formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function YE(t,l){return{state:"submitting",location:t,formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text}}function Ir(t,l){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:l}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:l}}function VE(t,l){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:l?l.data:void 0}}function Ql(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function PE(t,l){try{let a=t.sessionStorage.getItem(vb);if(a){let r=JSON.parse(a);for(let[u,s]of Object.entries(r||{}))s&&Array.isArray(s)&&l.set(u,new Set(s||[]))}}catch{}}function XE(t,l){if(l.size>0){let a={};for(let[r,u]of l)a[r]=[...u];try{t.sessionStorage.setItem(vb,JSON.stringify(a))}catch(r){zt(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function Py(){let t,l,a=new Promise((r,u)=>{t=async s=>{r(s);try{await a}catch{}},l=async s=>{u(s);try{await a}catch{}}});return{promise:a,resolve:t,reject:l}}var ni=T.createContext(null);ni.displayName="DataRouter";var fo=T.createContext(null);fo.displayName="DataRouterState";var kb=T.createContext(!1);function $E(){return T.useContext(kb)}var Pd=T.createContext({isTransitioning:!1});Pd.displayName="ViewTransition";var Ab=T.createContext(new Map);Ab.displayName="Fetchers";var QE=T.createContext(null);QE.displayName="Await";var ll=T.createContext(null);ll.displayName="Navigation";var as=T.createContext(null);as.displayName="Location";var cl=T.createContext({outlet:null,matches:[],isDataRoute:!1});cl.displayName="Route";var Xd=T.createContext(null);Xd.displayName="RouteError";var _b="REACT_ROUTER_ERROR",KE="REDIRECT",ZE="ROUTE_ERROR_RESPONSE";function JE(t){if(t.startsWith(`${_b}:${KE}:{`))try{let l=JSON.parse(t.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function WE(t){if(t.startsWith(`${_b}:${ZE}:{`))try{let l=JSON.parse(t.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new so(l.status,l.statusText,l.data)}catch{}}function ew(t,{relative:l}={}){Ve(ho(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:r}=T.useContext(ll),{hash:u,pathname:s,search:c}=mo(t,{relative:l}),d=s;return a!=="/"&&(d=s==="/"?a:Cl([a,s])),r.createHref({pathname:d,search:c,hash:u})}function ho(){return T.useContext(as)!=null}function fl(){return Ve(ho(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(as).location}var Rb="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Db(t){T.useContext(ll).static||T.useLayoutEffect(t)}function Zl(){let{isDataRoute:t}=T.useContext(cl);return t?mw():tw()}function tw(){Ve(ho(),"useNavigate() may be used only in the context of a <Router> component.");let t=T.useContext(ni),{basename:l,navigator:a}=T.useContext(ll),{matches:r}=T.useContext(cl),{pathname:u}=fl(),s=JSON.stringify(qd(r)),c=T.useRef(!1);return Db(()=>{c.current=!0}),T.useCallback((p,h={})=>{if(zt(c.current,Rb),!c.current)return;if(typeof p=="number"){a.go(p);return}let y=Fd(p,JSON.parse(s),u,h.relative==="path");t==null&&l!=="/"&&(y.pathname=y.pathname==="/"?l:Cl([l,y.pathname])),(h.replace?a.replace:a.push)(y,h.state,h)},[l,a,s,u,t])}var Nb=T.createContext(null);function $d(){return T.useContext(Nb)}function nw(t){let l=T.useContext(cl).outlet;return T.useMemo(()=>l&&T.createElement(Nb.Provider,{value:t},l),[l,t])}function jb(){let{matches:t}=T.useContext(cl),l=t[t.length-1];return l?l.params:{}}function mo(t,{relative:l}={}){let{matches:a}=T.useContext(cl),{pathname:r}=fl(),u=JSON.stringify(qd(a));return T.useMemo(()=>Fd(t,JSON.parse(u),r,l==="path"),[t,u,r,l])}function lw(t,l,a,r,u){Ve(ho(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=T.useContext(ll),{matches:c}=T.useContext(cl),d=c[c.length-1],p=d?d.params:{},h=d?d.pathname:"/",y=d?d.pathnameBase:"/",g=d&&d.route;{let _=g&&g.path||"";Mb(h,!g||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${_}">) 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.
|
|
11
|
-
|
|
12
|
-
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let b=fl(),S;S=b;let E=S.pathname||"/",A=E;if(y!=="/"){let _=y.replace(/^\//,"").split("/");A="/"+E.replace(/^\//,"").split("/").slice(_.length).join("/")}let R=Ca(t,{pathname:A});return zt(g||R!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),zt(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.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.`),uw(R&&R.map(_=>Object.assign({},_,{params:Object.assign({},p,_.params),pathname:Cl([y,s.encodeLocation?s.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?y:Cl([y,s.encodeLocation?s.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),c,a,r,u)}function aw(){let t=hw(),l=io(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",t),c=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:s},"ErrorBoundary")," or"," ",T.createElement("code",{style:s},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},l),a?T.createElement("pre",{style:u},a):null,c)}var iw=T.createElement(aw,null),Ob=class extends T.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,l){return l.location!==t.location||l.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:l.error,location:l.location,revalidation:t.revalidation||l.revalidation}}componentDidCatch(t,l){this.props.onError?this.props.onError(t,l):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const a=WE(t.digest);a&&(t=a)}let l=t!==void 0?T.createElement(cl.Provider,{value:this.props.routeContext},T.createElement(Xd.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?T.createElement(rw,{error:t},l):l}};Ob.contextType=kb;var Mf=new WeakMap;function rw({children:t,error:l}){let{basename:a}=T.useContext(ll);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let r=JE(l.digest);if(r){let u=Mf.get(l);if(u)throw u;let s=mb(r.location,a);if(hb&&!Mf.get(l))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Mf.set(l,c),c}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function ow({routeContext:t,match:l,children:a}){let r=T.useContext(ni);return r&&r.static&&r.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=l.route.id),T.createElement(cl.Provider,{value:t},a)}function uw(t,l=[],a=null,r=null,u=null){if(t==null){if(!a)return null;if(a.errors)t=a.matches;else if(l.length===0&&!a.initialized&&a.matches.length>0)t=a.matches;else return null}let s=t,c=a?.errors;if(c!=null){let y=s.findIndex(g=>g.route.id&&c?.[g.route.id]!==void 0);Ve(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let d=!1,p=-1;if(a)for(let y=0;y<s.length;y++){let g=s[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(p=y),g.route.id){let{loaderData:b,errors:S}=a,E=g.route.loader&&!b.hasOwnProperty(g.route.id)&&(!S||S[g.route.id]===void 0);if(g.route.lazy||E){d=!0,p>=0?s=s.slice(0,p+1):s=[s[0]];break}}}let h=a&&r?(y,g)=>{r(y,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:co(a.matches),errorInfo:g})}:void 0;return s.reduceRight((y,g,b)=>{let S,E=!1,A=null,R=null;a&&(S=c&&g.route.id?c[g.route.id]:void 0,A=g.route.errorElement||iw,d&&(p<0&&b===0?(Mb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,R=null):p===b&&(E=!0,R=g.route.hydrateFallbackElement||null)));let k=l.concat(s.slice(0,b+1)),_=()=>{let j;return S?j=A:E?j=R:g.route.Component?j=T.createElement(g.route.Component,null):g.route.element?j=g.route.element:j=y,T.createElement(ow,{match:g,routeContext:{outlet:y,matches:k,isDataRoute:a!=null},children:j})};return a&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?T.createElement(Ob,{location:a.location,revalidation:a.revalidation,component:A,error:S,children:_(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:h}):_()},null)}function Qd(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sw(t){let l=T.useContext(ni);return Ve(l,Qd(t)),l}function cw(t){let l=T.useContext(fo);return Ve(l,Qd(t)),l}function fw(t){let l=T.useContext(cl);return Ve(l,Qd(t)),l}function Kd(t){let l=fw(t),a=l.matches[l.matches.length-1];return Ve(a.route.id,`${t} can only be used on routes that contain a unique "id"`),a.route.id}function dw(){return Kd("useRouteId")}function hw(){let t=T.useContext(Xd),l=cw("useRouteError"),a=Kd("useRouteError");return t!==void 0?t:l.errors?.[a]}function mw(){let{router:t}=sw("useNavigate"),l=Kd("useNavigate"),a=T.useRef(!1);return Db(()=>{a.current=!0}),T.useCallback(async(u,s={})=>{zt(a.current,Rb),a.current&&(typeof u=="number"?await t.navigate(u):await t.navigate(u,{fromRouteId:l,...s}))},[t,l])}var Xy={};function Mb(t,l,a){!l&&!Xy[t]&&(Xy[t]=!0,zt(!1,a))}var $y={};function Qy(t,l){!t&&!$y[l]&&($y[l]=!0,console.warn(l))}var pw="useOptimistic",Ky=DS[pw],gw=()=>{};function yw(t){return Ky?Ky(t):[t,gw]}function vw(t){let l={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&zt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(l,{element:T.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&zt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(l,{hydrateFallbackElement:T.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&zt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(l,{errorElement:T.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),l}var bw=["HydrateFallback","hydrateFallbackElement"],xw=class{constructor(){this.status="pending",this.promise=new Promise((t,l)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",t(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",l(a))}})}};function Sw({router:t,flushSync:l,onError:a,unstable_useTransitions:r}){r=$E()||r;let[s,c]=T.useState(t.state),[d,p]=yw(s),[h,y]=T.useState(),[g,b]=T.useState({isTransitioning:!1}),[S,E]=T.useState(),[A,R]=T.useState(),[k,_]=T.useState(),j=T.useRef(new Map),J=T.useCallback((le,{deletedFetchers:ne,newErrors:D,flushSync:q,viewTransitionOpts:F})=>{D&&a&&Object.values(D).forEach(ue=>a(ue,{location:le.location,params:le.matches[0]?.params??{},unstable_pattern:co(le.matches)})),le.fetchers.forEach((ue,W)=>{ue.data!==void 0&&j.current.set(W,ue.data)}),ne.forEach(ue=>j.current.delete(ue)),Qy(q===!1||l!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let V=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(Qy(F==null||V,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!F||!V){l&&q?l(()=>c(le)):r===!1?c(le):T.startTransition(()=>{r===!0&&p(ue=>Zy(ue,le)),c(le)});return}if(l&&q){l(()=>{A&&(S?.resolve(),A.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:F.currentLocation,nextLocation:F.nextLocation})});let ue=t.window.document.startViewTransition(()=>{l(()=>c(le))});ue.finished.finally(()=>{l(()=>{E(void 0),R(void 0),y(void 0),b({isTransitioning:!1})})}),l(()=>R(ue));return}A?(S?.resolve(),A.skipTransition(),_({state:le,currentLocation:F.currentLocation,nextLocation:F.nextLocation})):(y(le),b({isTransitioning:!0,flushSync:!1,currentLocation:F.currentLocation,nextLocation:F.nextLocation}))},[t.window,l,A,S,r,p,a]);T.useLayoutEffect(()=>t.subscribe(J),[t,J]),T.useEffect(()=>{g.isTransitioning&&!g.flushSync&&E(new xw)},[g]),T.useEffect(()=>{if(S&&h&&t.window){let le=h,ne=S.promise,D=t.window.document.startViewTransition(async()=>{r===!1?c(le):T.startTransition(()=>{r===!0&&p(q=>Zy(q,le)),c(le)}),await ne});D.finished.finally(()=>{E(void 0),R(void 0),y(void 0),b({isTransitioning:!1})}),R(D)}},[h,S,t.window,r,p]),T.useEffect(()=>{S&&h&&d.location.key===h.location.key&&S.resolve()},[S,A,d.location,h]),T.useEffect(()=>{!g.isTransitioning&&k&&(y(k.state),b({isTransitioning:!0,flushSync:!1,currentLocation:k.currentLocation,nextLocation:k.nextLocation}),_(void 0))},[g.isTransitioning,k]);let Q=T.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:le=>t.navigate(le),push:(le,ne,D)=>t.navigate(le,{state:ne,preventScrollReset:D?.preventScrollReset}),replace:(le,ne,D)=>t.navigate(le,{replace:!0,state:ne,preventScrollReset:D?.preventScrollReset})}),[t]),I=t.basename||"/",O=T.useMemo(()=>({router:t,navigator:Q,static:!1,basename:I,onError:a}),[t,Q,I,a]);return T.createElement(T.Fragment,null,T.createElement(ni.Provider,{value:O},T.createElement(fo.Provider,{value:d},T.createElement(Ab.Provider,{value:j.current},T.createElement(Pd.Provider,{value:g},T.createElement(Cw,{basename:I,location:d.location,navigationType:d.historyAction,navigator:Q,unstable_useTransitions:r},T.createElement(Ew,{routes:t.routes,future:t.future,state:d,onError:a})))))),null)}function Zy(t,l){return{...t,navigation:l.navigation.state!=="idle"?l.navigation:t.navigation,revalidation:l.revalidation!=="idle"?l.revalidation:t.revalidation,actionData:l.navigation.state!=="submitting"?l.actionData:t.actionData,fetchers:l.fetchers}}var Ew=T.memo(ww);function ww({routes:t,future:l,state:a,onError:r}){return lw(t,void 0,a,r,l)}function Tw(t){return nw(t.context)}function Cw({basename:t="/",children:l=null,location:a,navigationType:r="POP",navigator:u,static:s=!1,unstable_useTransitions:c}){Ve(!ho(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),p=T.useMemo(()=>({basename:d,navigator:u,static:s,unstable_useTransitions:c,future:{}}),[d,u,s,c]);typeof a=="string"&&(a=Da(a));let{pathname:h="/",search:y="",hash:g="",state:b=null,key:S="default"}=a,E=T.useMemo(()=>{let A=tl(h,d);return A==null?null:{location:{pathname:A,search:y,hash:g,state:b,key:S},navigationType:r}},[d,h,y,g,b,S,r]);return zt(E!=null,`<Router basename="${d}"> is not able to match the URL "${h}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:T.createElement(ll.Provider,{value:p},T.createElement(as.Provider,{children:l,value:E}))}var Yu="get",Vu="application/x-www-form-urlencoded";function is(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function kw(t){return is(t)&&t.tagName.toLowerCase()==="button"}function Aw(t){return is(t)&&t.tagName.toLowerCase()==="form"}function _w(t){return is(t)&&t.tagName.toLowerCase()==="input"}function Rw(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Dw(t,l){return t.button===0&&(!l||l==="_self")&&!Rw(t)}function hd(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((l,a)=>{let r=t[a];return l.concat(Array.isArray(r)?r.map(u=>[a,u]):[[a,r]])},[]))}function Nw(t,l){let a=hd(t);return l&&l.forEach((r,u)=>{a.has(u)||l.getAll(u).forEach(s=>{a.append(u,s)})}),a}var Ou=null;function jw(){if(Ou===null)try{new FormData(document.createElement("form"),0),Ou=!1}catch{Ou=!0}return Ou}var Ow=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zf(t){return t!=null&&!Ow.has(t)?(zt(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Vu}"`),null):t}function Mw(t,l){let a,r,u,s,c;if(Aw(t)){let d=t.getAttribute("action");r=d?tl(d,l):null,a=t.getAttribute("method")||Yu,u=zf(t.getAttribute("enctype"))||Vu,s=new FormData(t)}else if(kw(t)||_w(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=t.getAttribute("formaction")||d.getAttribute("action");if(r=p?tl(p,l):null,a=t.getAttribute("formmethod")||d.getAttribute("method")||Yu,u=zf(t.getAttribute("formenctype"))||zf(d.getAttribute("enctype"))||Vu,s=new FormData(d,t),!jw()){let{name:h,type:y,value:g}=t;if(y==="image"){let b=h?`${h}.`:"";s.append(`${b}x`,"0"),s.append(`${b}y`,"0")}else h&&s.append(h,g)}}else{if(is(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Yu,r=null,u=Vu,c=t}return s&&u==="text/plain"&&(c=s,s=void 0),{action:r,method:a.toLowerCase(),encType:u,formData:s,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Zd(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function zw(t,l,a,r){let u=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return a?u.pathname.endsWith("/")?u.pathname=`${u.pathname}_.${r}`:u.pathname=`${u.pathname}.${r}`:u.pathname==="/"?u.pathname=`_root.${r}`:l&&tl(u.pathname,l)==="/"?u.pathname=`${l.replace(/\/$/,"")}/_root.${r}`:u.pathname=`${u.pathname.replace(/\/$/,"")}.${r}`,u}async function Lw(t,l){if(t.id in l)return l[t.id];try{let a=await import(t.module);return l[t.id]=a,a}catch(a){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Uw(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function Bw(t,l,a){let r=await Promise.all(t.map(async u=>{let s=l.routes[u.route.id];if(s){let c=await Lw(s,a);return c.links?c.links():[]}return[]}));return Fw(r.flat(1).filter(Uw).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function Jy(t,l,a,r,u,s){let c=(p,h)=>a[h]?p.route.id!==a[h].route.id:!0,d=(p,h)=>a[h].pathname!==p.pathname||a[h].route.path?.endsWith("*")&&a[h].params["*"]!==p.params["*"];return s==="assets"?l.filter((p,h)=>c(p,h)||d(p,h)):s==="data"?l.filter((p,h)=>{let y=r.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(c(p,h)||d(p,h))return!0;if(p.route.shouldRevalidate){let g=p.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function Hw(t,l,{includeHydrateFallback:a}={}){return Iw(t.map(r=>{let u=l.routes[r.route.id];if(!u)return[];let s=[u.module];return u.clientActionModule&&(s=s.concat(u.clientActionModule)),u.clientLoaderModule&&(s=s.concat(u.clientLoaderModule)),a&&u.hydrateFallbackModule&&(s=s.concat(u.hydrateFallbackModule)),u.imports&&(s=s.concat(u.imports)),s}).flat(1))}function Iw(t){return[...new Set(t)]}function qw(t){let l={},a=Object.keys(t).sort();for(let r of a)l[r]=t[r];return l}function Fw(t,l){let a=new Set;return new Set(l),t.reduce((r,u)=>{let s=JSON.stringify(qw(u));return a.has(s)||(a.add(s),r.push({key:s,link:u})),r},[])}function zb(){let t=T.useContext(ni);return Zd(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function Gw(){let t=T.useContext(fo);return Zd(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Jd=T.createContext(void 0);Jd.displayName="FrameworkContext";function Lb(){let t=T.useContext(Jd);return Zd(t,"You must render this element inside a <HydratedRouter> element"),t}function Yw(t,l){let a=T.useContext(Jd),[r,u]=T.useState(!1),[s,c]=T.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:h,onMouseLeave:y,onTouchStart:g}=l,b=T.useRef(null);T.useEffect(()=>{if(t==="render"&&c(!0),t==="viewport"){let A=k=>{k.forEach(_=>{c(_.isIntersecting)})},R=new IntersectionObserver(A,{threshold:.5});return b.current&&R.observe(b.current),()=>{R.disconnect()}}},[t]),T.useEffect(()=>{if(r){let A=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(A)}}},[r]);let S=()=>{u(!0)},E=()=>{u(!1),c(!1)};return a?t!=="intent"?[s,b,{}]:[s,b,{onFocus:qr(d,S),onBlur:qr(p,E),onMouseEnter:qr(h,S),onMouseLeave:qr(y,E),onTouchStart:qr(g,S)}]:[!1,b,{}]}function qr(t,l){return a=>{t&&t(a),a.defaultPrevented||l(a)}}function Vw({page:t,...l}){let{router:a}=zb(),r=T.useMemo(()=>Ca(a.routes,t,a.basename),[a.routes,t,a.basename]);return r?T.createElement(Xw,{page:t,matches:r,...l}):null}function Pw(t){let{manifest:l,routeModules:a}=Lb(),[r,u]=T.useState([]);return T.useEffect(()=>{let s=!1;return Bw(t,l,a).then(c=>{s||u(c)}),()=>{s=!0}},[t,l,a]),r}function Xw({page:t,matches:l,...a}){let r=fl(),{future:u,manifest:s,routeModules:c}=Lb(),{basename:d}=zb(),{loaderData:p,matches:h}=Gw(),y=T.useMemo(()=>Jy(t,l,h,s,r,"data"),[t,l,h,s,r]),g=T.useMemo(()=>Jy(t,l,h,s,r,"assets"),[t,l,h,s,r]),b=T.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let A=new Set,R=!1;if(l.forEach(_=>{let j=s.routes[_.route.id];!j||!j.hasLoader||(!y.some(J=>J.route.id===_.route.id)&&_.route.id in p&&c[_.route.id]?.shouldRevalidate||j.hasClientLoader?R=!0:A.add(_.route.id))}),A.size===0)return[];let k=zw(t,d,u.unstable_trailingSlashAwareDataRequests,"data");return R&&A.size>0&&k.searchParams.set("_routes",l.filter(_=>A.has(_.route.id)).map(_=>_.route.id).join(",")),[k.pathname+k.search]},[d,u.unstable_trailingSlashAwareDataRequests,p,r,s,y,l,t,c]),S=T.useMemo(()=>Hw(g,s),[g,s]),E=Pw(g);return T.createElement(T.Fragment,null,b.map(A=>T.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...a})),S.map(A=>T.createElement("link",{key:A,rel:"modulepreload",href:A,...a})),E.map(({key:A,link:R})=>T.createElement("link",{key:A,nonce:a.nonce,...R,crossOrigin:R.crossOrigin??a.crossOrigin})))}function $w(...t){return l=>{t.forEach(a=>{typeof a=="function"?a(l):a!=null&&(a.current=l)})}}var Qw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Qw&&(window.__reactRouterVersion="7.13.0")}catch{}function Kw(t,l){return wE({basename:l?.basename,getContext:l?.getContext,future:l?.future,history:HS({window:l?.window}),hydrationData:Zw(),routes:t,mapRouteProperties:vw,hydrationRouteProperties:bw,dataStrategy:l?.dataStrategy,patchRoutesOnNavigation:l?.patchRoutesOnNavigation,window:l?.window,unstable_instrumentations:l?.unstable_instrumentations}).initialize()}function Zw(){let t=window?.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:Jw(t.errors)}),t}function Jw(t){if(!t)return null;let l=Object.entries(t),a={};for(let[r,u]of l)if(u&&u.__type==="RouteErrorResponse")a[r]=new so(u.status,u.statusText,u.data,u.internal===!0);else if(u&&u.__type==="Error"){if(u.__subType){let s=window[u.__subType];if(typeof s=="function")try{let c=new s(u.message);c.stack="",a[r]=c}catch{}}if(a[r]==null){let s=new Error(u.message);s.stack="",a[r]=s}}else a[r]=u;return a}var Ub=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Bb=T.forwardRef(function({onClick:l,discover:a="render",prefetch:r="none",relative:u,reloadDocument:s,replace:c,state:d,target:p,to:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...S},E){let{basename:A,unstable_useTransitions:R}=T.useContext(ll),k=typeof h=="string"&&Ub.test(h),_=mb(h,A);h=_.to;let j=ew(h,{relative:u}),[J,Q,I]=Yw(r,S),O=nT(h,{replace:c,state:d,target:p,preventScrollReset:y,relative:u,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:R});function le(D){l&&l(D),D.defaultPrevented||O(D)}let ne=T.createElement("a",{...S,...I,href:_.absoluteURL||j,onClick:_.isExternal||s?l:le,ref:$w(E,Q),target:p,"data-discover":!k&&a==="render"?"true":void 0});return J&&!k?T.createElement(T.Fragment,null,ne,T.createElement(Vw,{page:j})):ne});Bb.displayName="Link";var Ww=T.forwardRef(function({"aria-current":l="page",caseSensitive:a=!1,className:r="",end:u=!1,style:s,to:c,viewTransition:d,children:p,...h},y){let g=mo(c,{relative:h.relative}),b=fl(),S=T.useContext(fo),{navigator:E,basename:A}=T.useContext(ll),R=S!=null&&uT(g)&&d===!0,k=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,_=b.pathname,j=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;a||(_=_.toLowerCase(),j=j?j.toLowerCase():null,k=k.toLowerCase()),j&&A&&(j=tl(j,A)||j);const J=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let Q=_===k||!u&&_.startsWith(k)&&_.charAt(J)==="/",I=j!=null&&(j===k||!u&&j.startsWith(k)&&j.charAt(k.length)==="/"),O={isActive:Q,isPending:I,isTransitioning:R},le=Q?l:void 0,ne;typeof r=="function"?ne=r(O):ne=[r,Q?"active":null,I?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let D=typeof s=="function"?s(O):s;return T.createElement(Bb,{...h,"aria-current":le,className:ne,ref:y,style:D,to:c,viewTransition:d},typeof p=="function"?p(O):p)});Ww.displayName="NavLink";var eT=T.forwardRef(({discover:t="render",fetcherKey:l,navigate:a,reloadDocument:r,replace:u,state:s,method:c=Yu,action:d,onSubmit:p,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...S},E)=>{let{unstable_useTransitions:A}=T.useContext(ll),R=rT(),k=oT(d,{relative:h}),_=c.toLowerCase()==="get"?"get":"post",j=typeof d=="string"&&Ub.test(d),J=Q=>{if(p&&p(Q),Q.defaultPrevented)return;Q.preventDefault();let I=Q.nativeEvent.submitter,O=I?.getAttribute("formmethod")||c,le=()=>R(I||Q.currentTarget,{fetcherKey:l,method:O,navigate:a,replace:u,state:s,relative:h,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b});A&&a!==!1?T.startTransition(()=>le()):le()};return T.createElement("form",{ref:E,method:_,action:k,onSubmit:r?p:J,...S,"data-discover":!j&&t==="render"?"true":void 0})});eT.displayName="Form";function tT(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hb(t){let l=T.useContext(ni);return Ve(l,tT(t)),l}function nT(t,{target:l,replace:a,state:r,preventScrollReset:u,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d,unstable_useTransitions:p}={}){let h=Zl(),y=fl(),g=mo(t,{relative:s});return T.useCallback(b=>{if(Dw(b,l)){b.preventDefault();let S=a!==void 0?a:kl(y)===kl(g),E=()=>h(t,{replace:S,state:r,preventScrollReset:u,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d});p?T.startTransition(()=>E()):E()}},[y,h,g,a,r,l,t,u,s,c,d,p])}function lT(t){zt(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 l=T.useRef(hd(t)),a=T.useRef(!1),r=fl(),u=T.useMemo(()=>Nw(r.search,a.current?null:l.current),[r.search]),s=Zl(),c=T.useCallback((d,p)=>{const h=hd(typeof d=="function"?d(new URLSearchParams(u)):d);a.current=!0,s("?"+h,p)},[s,u]);return[u,c]}var aT=0,iT=()=>`__${String(++aT)}__`;function rT(){let{router:t}=Hb("useSubmit"),{basename:l}=T.useContext(ll),a=dw(),r=t.fetch,u=t.navigate;return T.useCallback(async(s,c={})=>{let{action:d,method:p,encType:h,formData:y,body:g}=Mw(s,l);if(c.navigate===!1){let b=c.fetcherKey||iT();await r(b,a,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||p,formEncType:c.encType||h,flushSync:c.flushSync})}else await u(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||p,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:a,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,u,l,a])}function oT(t,{relative:l}={}){let{basename:a}=T.useContext(ll),r=T.useContext(cl);Ve(r,"useFormAction must be used inside a RouteContext");let[u]=r.matches.slice(-1),s={...mo(t||".",{relative:l})},c=fl();if(t==null){s.search=c.search;let d=new URLSearchParams(s.search),p=d.getAll("index");if(p.some(y=>y==="")){d.delete("index"),p.filter(g=>g).forEach(g=>d.append("index",g));let y=d.toString();s.search=y?`?${y}`:""}}return(!t||t===".")&&u.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(s.pathname=s.pathname==="/"?a:Cl([a,s.pathname])),kl(s)}function uT(t,{relative:l}={}){let a=T.useContext(Pd);Ve(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Hb("useViewTransitionState"),u=mo(t,{relative:l});if(!a.isTransitioning)return!1;let s=tl(a.currentLocation.pathname,r)||a.currentLocation.pathname,c=tl(a.nextLocation.pathname,r)||a.nextLocation.pathname;return Zu(u.pathname,c)!=null||Zu(u.pathname,s)!=null}var rs=rb();function sT(t){return T.createElement(Sw,{flushSync:rs.flushSync,...t})}const Wd="electric-agent:rooms";function ro(){try{const t=localStorage.getItem(Wd);return t?JSON.parse(t):[]}catch{return[]}}function Wy(t){const a=ro().filter(r=>r.id!==t.id);a.push(t),localStorage.setItem(Wd,JSON.stringify(a))}function cT(t){const a=ro().filter(r=>r.id!==t);localStorage.setItem(Wd,JSON.stringify(a))}const eh="electric-agent:anthropic-api-key",os="electric-agent:oauth-token",th="electric-agent:oauth-manual",nh="electric-agent:gh-token";function Ib(){return localStorage.getItem(eh)}function fT(t){localStorage.setItem(eh,t)}function dT(){localStorage.removeItem(eh)}function hT(){return!!Ib()}function md(){return localStorage.getItem(os)}function mT(t){localStorage.setItem(os,t)}function pT(){localStorage.removeItem(os),localStorage.removeItem(th)}function gT(t){localStorage.setItem(os,t),localStorage.setItem(th,"1")}function Pu(){return localStorage.getItem(th)==="1"}function lh(){return localStorage.getItem(nh)}function yT(t){localStorage.setItem(nh,t)}function vT(){localStorage.removeItem(nh)}function bT(){return!!lh()}function qb(){let t=localStorage.getItem("participant-id"),l=localStorage.getItem("participant-name");return t||(t=crypto.randomUUID(),localStorage.setItem("participant-id",t)),l||(l=`User-${t.slice(0,4)}`,localStorage.setItem("participant-name",l)),{id:t,displayName:l}}const us="electric-agent:sessions",ah="electric-agent:session-tokens";function Vi(){try{const t=localStorage.getItem(us);return t?JSON.parse(t):[]}catch{return[]}}function ih(t){const a=Vi().filter(r=>r.id!==t.id);a.push(t),localStorage.setItem(us,JSON.stringify(a))}function pd(t,l){const a=Vi(),r=a.find(u=>u.id===t);r&&(Object.assign(r,l,{lastActiveAt:new Date().toISOString()}),localStorage.setItem(us,JSON.stringify(a)))}function xT(t){const a=Vi().filter(r=>r.id!==t);localStorage.setItem(us,JSON.stringify(a)),ST(t)}function ev(t){return Vi().find(l=>l.id===t)}function rh(){try{const t=localStorage.getItem(ah);return t?JSON.parse(t):{}}catch{return{}}}function oh(t,l){const a=rh();a[t]=l,localStorage.setItem(ah,JSON.stringify(a))}function uh(t){return rh()[t]}function ST(t){const l=rh();delete l[t],localStorage.setItem(ah,JSON.stringify(l))}const Fb="electric-agent:room-tokens";function Gb(){try{const t=localStorage.getItem(Fb);return t?JSON.parse(t):{}}catch{return{}}}function Yb(t,l){const a=Gb();a[t]=l,localStorage.setItem(Fb,JSON.stringify(a))}function Vb(t){return Gb()[t]}const ET="/api";function sh(){const t={},l=Ib(),a=md(),r=lh();return a?t.oauthToken=a:l&&(t.apiKey=l),r&&(t.ghToken=r),t}function Pb(){const t=lh();return t?{"X-GH-Token":t}:{}}function wT(){const t=qb();return{"X-Participant-Id":t.id,"X-Participant-Name":t.displayName}}function TT(t){return t.match(/^\/sessions\/([^/]+)/)?.[1]}function CT(t){const l=t.match(/^\/rooms\/([^/]+)/);if(l&&l[1]!=="join")return l[1]}async function $t(t,l){const a={...wT(),...l?.headers};l?.body&&(a["Content-Type"]="application/json");const r=TT(t);if(r){const c=uh(r);c&&(a.Authorization=`Bearer ${c}`)}const u=CT(t);if(u){const c=Vb(u);c&&(a["X-Room-Token"]=c)}const s=await fetch(`${ET}${t}`,{method:l?.method??"GET",headers:Object.keys(a).length>0?a:void 0,body:l?.body?JSON.stringify(l.body):void 0});if(!s.ok){const c=await s.json().catch(()=>({error:s.statusText}));throw new Error(c.error||s.statusText)}return s.json()}function kT(){return $t("/config")}async function AT(t,l,a){const r=await $t("/sessions",{method:"POST",body:{description:t,name:l,freeform:a,...sh()}});return r.sessionToken&&oh(r.sessionId,r.sessionToken),r}function _T(t,l){return $t(`/sessions/${t}/iterate`,{method:"POST",body:{request:l}})}function gd(t,l,a){return $t(`/sessions/${t}/respond`,{method:"POST",body:{gate:l,...a}})}function RT(t){return $t(`/sessions/${t}/interrupt`,{method:"POST"})}function DT(t){return $t(`/sessions/${t}`,{method:"DELETE"})}function NT(){return $t("/provision-electric",{method:"POST"})}function jT(){return $t("/github/repos",{headers:Pb()})}function OT(t){return $t(`/github/repos/${t}/branches`,{headers:Pb()})}function MT(){return $t("/credentials/keychain")}async function zT(t,l){const a=await $t("/sessions/resume",{method:"POST",body:{repoUrl:t,branch:l,...sh()}});return a.sessionToken&&oh(a.sessionId,a.sessionToken),a}async function LT(t,l){const a=await $t("/rooms",{method:"POST",body:{name:t,maxRounds:l}});return a.roomToken&&Yb(a.roomId,a.roomToken),a}async function UT(t,l){const a=await $t(`/rooms/join/${t}/${l}`);return a.roomToken&&Yb(a.id,a.roomToken),a}function tv(t){return $t(`/rooms/${t}`)}function BT(t,l){return $t(`/rooms/${t}/agents`,{method:"POST",body:{...l,...sh()}})}function HT(t,l){const a=uh(l.sessionId);return $t(`/rooms/${t}/sessions`,{method:"POST",body:l,headers:a?{Authorization:`Bearer ${a}`}:void 0})}function IT(t,l,a,r){return $t(`/rooms/${t}/messages`,{method:"POST",body:{from:l,body:a,...r?{to:r}:{}}})}function qT(t){return $t(`/rooms/${t}/close`,{method:"POST"})}function FT(t,l,a){T.useEffect(()=>{function r(u){{const s=u.target?.tagName;if(s==="INPUT"||s==="TEXTAREA"||s==="SELECT")return}u.key===t&&(u.preventDefault(),l())}return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[t,l,a?.disabled,a?.allowInInputs])}function ss(t,l){T.useEffect(()=>{if(l)return;function a(r){r.key==="Escape"&&(r.preventDefault(),t())}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[t,l])}const nv=[{bg:"#4a3f6b",fg:"#d0bcff"},{bg:"#2d4a4a",fg:"#75fbfd"},{bg:"#3b4a2d",fg:"#a8e6a1"},{bg:"#4a3a2d",fg:"#ffb87a"},{bg:"#4a2d3b",fg:"#f8a4c8"},{bg:"#2d3b4a",fg:"#9ecbff"},{bg:"#4a4a2d",fg:"#e6e6a1"},{bg:"#3b2d4a",fg:"#c4a4f8"},{bg:"#2d4a3b",fg:"#75e6b8"},{bg:"#4a2d2d",fg:"#f8a4a4"},{bg:"#2d3a4a",fg:"#a4d4f8"},{bg:"#4a3b2d",fg:"#e6c4a1"}];function GT(t){let l=0;for(let a=0;a<t.length;a++)l=(l<<5)-l+t.charCodeAt(a)|0;return Math.abs(l)}function ch(t){return nv[GT(t)%nv.length]}function YT(t){const l=Date.now()-new Date(t).getTime(),a=Math.floor(l/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;const r=Math.floor(a/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function VT({projectName:t,onConfirm:l,onCancel:a}){return ss(a),FT("Enter",l),rs.createPortal(v.jsx("div",{className:"modal-overlay",onClick:a,children:v.jsxs("div",{className:"modal-card",onClick:r=>r.stopPropagation(),children:[v.jsxs("div",{className:"modal-title",children:["Delete ",t,"?"]}),v.jsx("div",{className:"modal-body",children:"All containers, database state, and generated code will be permanently lost."}),v.jsxs("div",{className:"modal-actions",children:[v.jsx("button",{type:"button",className:"modal-btn",onClick:a,children:"Cancel"}),v.jsx("button",{type:"button",className:"modal-btn modal-btn-danger",onClick:l,children:"Delete"})]})]})}),document.body)}function PT({session:t,active:l,onClick:a,onDelete:r}){const[u,s]=T.useState(!1),d=`session-avatar ${`session-avatar-${t.status}`}`,p=ch(t.id),h={background:p.bg,color:p.fg},y=t.projectName.split(/[-_ ]+/).slice(0,2).map(g=>g.charAt(0).toUpperCase()).join("");return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:`session-item ${l?"active":""}`,onClick:a,title:t.projectName,children:[v.jsx("span",{className:d,style:h,children:y}),v.jsxs("div",{className:"session-item-details",children:[v.jsx("div",{className:"session-item-name",children:t.projectName}),v.jsx("div",{className:"session-item-meta",children:v.jsx("span",{children:YT(t.lastActiveAt)})})]}),v.jsx("button",{type:"button",className:"session-item-delete",onClick:g=>{g.stopPropagation(),s(!0)},title:"Delete session",children:"×"})]}),u&&v.jsx(VT,{projectName:t.projectName,onConfirm:()=>{s(!1),r()},onCancel:()=>s(!1)})]})}function XT({collapsed:t}){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-label":t?"Expand menu":"Collapse menu",children:[v.jsx("title",{children:t?"Expand menu":"Collapse menu"}),v.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"2"}),v.jsx("line",{x1:"6",y1:"2",x2:"6",y2:"14"}),t?v.jsx("polyline",{points:"9 6.5 11.5 8 9 9.5"}):v.jsx("polyline",{points:"11.5 6.5 9 8 11.5 9.5"})]})}function $T(){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[v.jsx("title",{children:"Join room"}),v.jsx("path",{d:"M6.5 9.5a3.5 3.5 0 0 0 5 0l2-2a3.5 3.5 0 0 0-5-5l-1 1"}),v.jsx("path",{d:"M9.5 6.5a3.5 3.5 0 0 0-5 0l-2 2a3.5 3.5 0 0 0 5 5l1-1"})]})}function QT({collapsed:t,onToggle:l,mobileOpen:a,onMobileClose:r}){const{sessions:u,pendingProject:s,handleDeleteSession:c,agentRooms:d,refreshAgentRooms:p}=go(),h=Zl(),y=fl(),[g,b]=T.useState(!1),[S,E]=T.useState(""),[A,R]=T.useState(!1),[k,_]=T.useState("");T.useEffect(()=>{t&&(b(!1),E(""),R(!1),_(""))},[t]);const j=y.pathname.startsWith("/session/")?y.pathname.split("/session/")[1]:null,J=y.pathname.startsWith("/room/")?y.pathname.split("/room/")[1]:null,Q=[...u].sort((D,q)=>new Date(q.createdAt).getTime()-new Date(D.createdAt).getTime()),I=D=>{h(D),r?.()},O=T.useCallback(D=>{cT(D),p()},[p]),le=T.useCallback(async()=>{const D=S.trim();if(D)try{const{roomId:q,code:F}=await LT(D);Wy({id:q,code:F,name:D,createdAt:new Date().toISOString()}),p(),E(""),b(!1),h(`/room/${q}`),r?.()}catch(q){console.error("Failed to create room:",q)}},[S,h,r,p]),ne=T.useCallback(async()=>{const D=k.trim();if(!D)return;const q=D.indexOf(":");if(q===-1)return;const F=D.slice(0,q),V=D.slice(q+1);if(!(!F||!V))try{const{id:ue,code:W,name:B}=await UT(F,V);Wy({id:ue,code:W,name:B,createdAt:new Date().toISOString()}),p(),_(""),R(!1),h(`/room/${ue}`),r?.()}catch(ue){console.error("Failed to join room:",ue)}},[k,h,r,p]);return v.jsxs("aside",{className:`sidebar ${a?"mobile-open":""}`,children:[v.jsxs("div",{className:"sidebar-header",children:[v.jsxs("svg",{className:"sidebar-icon",viewBox:"0 0 192 192","aria-label":"Electric",children:[v.jsx("title",{children:"Electric"}),v.jsx("path",{d:"M106.992 16.1244C107.711 15.4029 108.683 15 109.692 15H170L84.0082 101.089C83.2888 101.811 82.3171 102.213 81.3081 102.213H21L106.992 16.1244Z",fill:"var(--brand-1)"}),v.jsx("path",{d:"M96.4157 104.125C96.4157 103.066 97.2752 102.204 98.331 102.204H170L96.4157 176V104.125Z",fill:"var(--brand-1)"})]}),v.jsx("span",{className:"sidebar-brand",children:"Electric Agent"})]}),v.jsxs("div",{className:"sidebar-sessions",children:[v.jsx("div",{className:"sidebar-section-label",children:"Sessions"}),v.jsxs("div",{className:"session-item",onClick:()=>I("/"),title:"New Electric App",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:"+"}),v.jsx("div",{className:"session-item-details",children:v.jsx("div",{className:"session-item-name",children:"New Electric App"})})]}),v.jsxs("div",{className:"session-item",onClick:()=>I("/?mode=session"),title:"Claude Session",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[v.jsx("title",{children:"Claude Session"}),v.jsx("path",{d:"M13 2.5l-9.5 9.5-1 3 3-1 9.5-9.5-2-2z"}),v.jsx("path",{d:"M10.5 5l2 2"})]})}),v.jsx("div",{className:"session-item-details",children:v.jsx("div",{className:"session-item-name",children:"Claude Session"})})]}),s&&v.jsxs("div",{className:"session-item session-item-pending",title:s.name,children:[v.jsx("span",{className:"session-avatar session-avatar-pending"}),v.jsxs("div",{className:"session-item-details",children:[v.jsx("div",{className:"session-item-name",children:s.name}),v.jsx("div",{className:"session-item-meta",children:v.jsx("span",{children:"Setting up..."})})]})]}),Q.map(D=>v.jsx(PT,{session:D,active:D.id===j,onClick:()=>I(`/session/${D.id}`),onDelete:()=>c(D.id)},D.id)),v.jsx("div",{className:"sidebar-section-label",children:"Rooms"}),d.map(D=>{const q=ch(D.id),F=D.name.split(/[-_ ]+/).slice(0,2).map(V=>V.charAt(0).toUpperCase()).join("");return v.jsxs("div",{className:`session-item ${J===D.id?"active":""}`,onClick:()=>I(`/room/${D.id}`),title:D.name,children:[v.jsx("span",{className:"session-avatar session-avatar-shared",style:{background:q.bg,color:q.fg},children:F}),v.jsxs("div",{className:"session-item-details",children:[v.jsx("div",{className:"session-item-name",children:D.name}),v.jsx("div",{className:"session-item-meta",children:v.jsx("span",{children:D.code||D.id.slice(0,8)})})]}),v.jsx("button",{type:"button",className:"session-item-delete",onClick:V=>{V.stopPropagation(),O(D.id)},title:"Remove",children:"×"})]},D.id)}),g&&!t?v.jsxs("div",{className:"sidebar-join-input",children:[v.jsx("input",{type:"text",placeholder:"Room name...",value:S,onChange:D=>E(D.target.value),onKeyDown:D=>{D.key==="Enter"&&le(),D.key==="Escape"&&(b(!1),E(""))}}),v.jsx("button",{type:"button",className:"sidebar-join-go",onClick:le,disabled:!S.trim(),children:"Go"})]}):v.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),b(!0)},title:"Create room",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:"+"}),v.jsx("div",{className:"session-item-details",children:v.jsx("div",{className:"session-item-name",children:"Create"})})]}),A&&!t?v.jsxs("div",{className:"sidebar-join-input",children:[v.jsx("input",{type:"text",placeholder:"Paste join token...",value:k,onChange:D=>_(D.target.value),onKeyDown:D=>{D.key==="Enter"&&ne(),D.key==="Escape"&&(R(!1),_(""))}}),v.jsx("button",{type:"button",className:"sidebar-join-go",onClick:ne,disabled:!k.trim(),children:"Go"})]}):v.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),R(!0)},title:"Join room",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:v.jsx($T,{})}),v.jsx("div",{className:"session-item-details",children:v.jsx("div",{className:"session-item-name",children:"Join"})})]})]}),v.jsx("div",{className:"sidebar-collapse",children:v.jsxs("button",{type:"button",className:"sidebar-collapse-btn",onClick:l,children:[v.jsx(XT,{collapsed:t}),v.jsx("span",{className:"sidebar-collapse-label",children:t?"Expand menu":"Collapse menu"})]})})]})}let KT={data:""},ZT=t=>{if(typeof window=="object"){let l=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return l.nonce=window.__nonce__,l.parentNode||(t||document.head).appendChild(l),l.firstChild}return t||KT},JT=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,WT=/\/\*[^]*?\*\/| +/g,lv=/\n+/g,Aa=(t,l)=>{let a="",r="",u="";for(let s in t){let c=t[s];s[0]=="@"?s[1]=="i"?a=s+" "+c+";":r+=s[1]=="f"?Aa(c,s):s+"{"+Aa(c,s[1]=="k"?"":l)+"}":typeof c=="object"?r+=Aa(c,l?l.replace(/([^,])+/g,d=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,p=>/&/.test(p)?p.replace(/&/g,d):d?d+" "+p:p)):s):c!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),u+=Aa.p?Aa.p(s,c):s+":"+c+";")}return a+(l&&u?l+"{"+u+"}":u)+r},Xl={},Xb=t=>{if(typeof t=="object"){let l="";for(let a in t)l+=a+Xb(t[a]);return l}return t},eC=(t,l,a,r,u)=>{let s=Xb(t),c=Xl[s]||(Xl[s]=(p=>{let h=0,y=11;for(;h<p.length;)y=101*y+p.charCodeAt(h++)>>>0;return"go"+y})(s));if(!Xl[c]){let p=s!==t?t:(h=>{let y,g,b=[{}];for(;y=JT.exec(h.replace(WT,""));)y[4]?b.shift():y[3]?(g=y[3].replace(lv," ").trim(),b.unshift(b[0][g]=b[0][g]||{})):b[0][y[1]]=y[2].replace(lv," ").trim();return b[0]})(t);Xl[c]=Aa(u?{["@keyframes "+c]:p}:p,a?"":"."+c)}let d=a&&Xl.g?Xl.g:null;return a&&(Xl.g=Xl[c]),((p,h,y,g)=>{g?h.data=h.data.replace(g,p):h.data.indexOf(p)===-1&&(h.data=y?p+h.data:h.data+p)})(Xl[c],l,r,d),c},tC=(t,l,a)=>t.reduce((r,u,s)=>{let c=l[s];if(c&&c.call){let d=c(a),p=d&&d.props&&d.props.className||/^go/.test(d)&&d;c=p?"."+p:d&&typeof d=="object"?d.props?"":Aa(d,""):d===!1?"":d}return r+u+(c??"")},"");function cs(t){let l=this||{},a=t.call?t(l.p):t;return eC(a.unshift?a.raw?tC(a,[].slice.call(arguments,1),l.p):a.reduce((r,u)=>Object.assign(r,u&&u.call?u(l.p):u),{}):a,ZT(l.target),l.g,l.o,l.k)}let $b,yd,vd;cs.bind({g:1});let Kl=cs.bind({k:1});function nC(t,l,a,r){Aa.p=l,$b=t,yd=a,vd=r}function Na(t,l){let a=this||{};return function(){let r=arguments;function u(s,c){let d=Object.assign({},s),p=d.className||u.className;a.p=Object.assign({theme:yd&&yd()},d),a.o=/ *go\d+/.test(p),d.className=cs.apply(a,r)+(p?" "+p:"");let h=t;return t[0]&&(h=d.as||t,delete d.as),vd&&h[0]&&vd(d),$b(h,d)}return u}}var lC=t=>typeof t=="function",Ju=(t,l)=>lC(t)?t(l):t,aC=(()=>{let t=0;return()=>(++t).toString()})(),Qb=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");t=!l||l.matches}return t}})(),iC=20,fh="default",Kb=(t,l)=>{let{toastLimit:a}=t.settings;switch(l.type){case 0:return{...t,toasts:[l.toast,...t.toasts].slice(0,a)};case 1:return{...t,toasts:t.toasts.map(c=>c.id===l.toast.id?{...c,...l.toast}:c)};case 2:let{toast:r}=l;return Kb(t,{type:t.toasts.find(c=>c.id===r.id)?1:0,toast:r});case 3:let{toastId:u}=l;return{...t,toasts:t.toasts.map(c=>c.id===u||u===void 0?{...c,dismissed:!0,visible:!1}:c)};case 4:return l.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(c=>c.id!==l.toastId)};case 5:return{...t,pausedAt:l.time};case 6:let s=l.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(c=>({...c,pauseDuration:c.pauseDuration+s}))}}},Xu=[],Zb={toasts:[],pausedAt:void 0,settings:{toastLimit:iC}},Tl={},Jb=(t,l=fh)=>{Tl[l]=Kb(Tl[l]||Zb,t),Xu.forEach(([a,r])=>{a===l&&r(Tl[l])})},Wb=t=>Object.keys(Tl).forEach(l=>Jb(t,l)),rC=t=>Object.keys(Tl).find(l=>Tl[l].toasts.some(a=>a.id===t)),fs=(t=fh)=>l=>{Jb(l,t)},oC={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},uC=(t={},l=fh)=>{let[a,r]=T.useState(Tl[l]||Zb),u=T.useRef(Tl[l]);T.useEffect(()=>(u.current!==Tl[l]&&r(Tl[l]),Xu.push([l,r]),()=>{let c=Xu.findIndex(([d])=>d===l);c>-1&&Xu.splice(c,1)}),[l]);let s=a.toasts.map(c=>{var d,p,h;return{...t,...t[c.type],...c,removeDelay:c.removeDelay||((d=t[c.type])==null?void 0:d.removeDelay)||t?.removeDelay,duration:c.duration||((p=t[c.type])==null?void 0:p.duration)||t?.duration||oC[c.type],style:{...t.style,...(h=t[c.type])==null?void 0:h.style,...c.style}}});return{...a,toasts:s}},sC=(t,l="blank",a)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:l,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...a,id:a?.id||aC()}),po=t=>(l,a)=>{let r=sC(l,t,a);return fs(r.toasterId||rC(r.id))({type:2,toast:r}),r.id},Xt=(t,l)=>po("blank")(t,l);Xt.error=po("error");Xt.success=po("success");Xt.loading=po("loading");Xt.custom=po("custom");Xt.dismiss=(t,l)=>{let a={type:3,toastId:t};l?fs(l)(a):Wb(a)};Xt.dismissAll=t=>Xt.dismiss(void 0,t);Xt.remove=(t,l)=>{let a={type:4,toastId:t};l?fs(l)(a):Wb(a)};Xt.removeAll=t=>Xt.remove(void 0,t);Xt.promise=(t,l,a)=>{let r=Xt.loading(l.loading,{...a,...a?.loading});return typeof t=="function"&&(t=t()),t.then(u=>{let s=l.success?Ju(l.success,u):void 0;return s?Xt.success(s,{id:r,...a,...a?.success}):Xt.dismiss(r),u}).catch(u=>{let s=l.error?Ju(l.error,u):void 0;s?Xt.error(s,{id:r,...a,...a?.error}):Xt.dismiss(r)}),t};var cC=1e3,fC=(t,l="default")=>{let{toasts:a,pausedAt:r}=uC(t,l),u=T.useRef(new Map).current,s=T.useCallback((g,b=cC)=>{if(u.has(g))return;let S=setTimeout(()=>{u.delete(g),c({type:4,toastId:g})},b);u.set(g,S)},[]);T.useEffect(()=>{if(r)return;let g=Date.now(),b=a.map(S=>{if(S.duration===1/0)return;let E=(S.duration||0)+S.pauseDuration-(g-S.createdAt);if(E<0){S.visible&&Xt.dismiss(S.id);return}return setTimeout(()=>Xt.dismiss(S.id,l),E)});return()=>{b.forEach(S=>S&&clearTimeout(S))}},[a,r,l]);let c=T.useCallback(fs(l),[l]),d=T.useCallback(()=>{c({type:5,time:Date.now()})},[c]),p=T.useCallback((g,b)=>{c({type:1,toast:{id:g,height:b}})},[c]),h=T.useCallback(()=>{r&&c({type:6,time:Date.now()})},[r,c]),y=T.useCallback((g,b)=>{let{reverseOrder:S=!1,gutter:E=8,defaultPosition:A}=b||{},R=a.filter(j=>(j.position||A)===(g.position||A)&&j.height),k=R.findIndex(j=>j.id===g.id),_=R.filter((j,J)=>J<k&&j.visible).length;return R.filter(j=>j.visible).slice(...S?[_+1]:[0,_]).reduce((j,J)=>j+(J.height||0)+E,0)},[a]);return T.useEffect(()=>{a.forEach(g=>{if(g.dismissed)s(g.id,g.removeDelay);else{let b=u.get(g.id);b&&(clearTimeout(b),u.delete(g.id))}})},[a,s]),{toasts:a,handlers:{updateHeight:p,startPause:d,endPause:h,calculateOffset:y}}},dC=Kl`
|
|
13
|
-
from {
|
|
14
|
-
transform: scale(0) rotate(45deg);
|
|
15
|
-
opacity: 0;
|
|
16
|
-
}
|
|
17
|
-
to {
|
|
18
|
-
transform: scale(1) rotate(45deg);
|
|
19
|
-
opacity: 1;
|
|
20
|
-
}`,hC=Kl`
|
|
21
|
-
from {
|
|
22
|
-
transform: scale(0);
|
|
23
|
-
opacity: 0;
|
|
24
|
-
}
|
|
25
|
-
to {
|
|
26
|
-
transform: scale(1);
|
|
27
|
-
opacity: 1;
|
|
28
|
-
}`,mC=Kl`
|
|
29
|
-
from {
|
|
30
|
-
transform: scale(0) rotate(90deg);
|
|
31
|
-
opacity: 0;
|
|
32
|
-
}
|
|
33
|
-
to {
|
|
34
|
-
transform: scale(1) rotate(90deg);
|
|
35
|
-
opacity: 1;
|
|
36
|
-
}`,pC=Na("div")`
|
|
37
|
-
width: 20px;
|
|
38
|
-
opacity: 0;
|
|
39
|
-
height: 20px;
|
|
40
|
-
border-radius: 10px;
|
|
41
|
-
background: ${t=>t.primary||"#ff4b4b"};
|
|
42
|
-
position: relative;
|
|
43
|
-
transform: rotate(45deg);
|
|
44
|
-
|
|
45
|
-
animation: ${dC} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
46
|
-
forwards;
|
|
47
|
-
animation-delay: 100ms;
|
|
48
|
-
|
|
49
|
-
&:after,
|
|
50
|
-
&:before {
|
|
51
|
-
content: '';
|
|
52
|
-
animation: ${hC} 0.15s ease-out forwards;
|
|
53
|
-
animation-delay: 150ms;
|
|
54
|
-
position: absolute;
|
|
55
|
-
border-radius: 3px;
|
|
56
|
-
opacity: 0;
|
|
57
|
-
background: ${t=>t.secondary||"#fff"};
|
|
58
|
-
bottom: 9px;
|
|
59
|
-
left: 4px;
|
|
60
|
-
height: 2px;
|
|
61
|
-
width: 12px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&:before {
|
|
65
|
-
animation: ${mC} 0.15s ease-out forwards;
|
|
66
|
-
animation-delay: 180ms;
|
|
67
|
-
transform: rotate(90deg);
|
|
68
|
-
}
|
|
69
|
-
`,gC=Kl`
|
|
70
|
-
from {
|
|
71
|
-
transform: rotate(0deg);
|
|
72
|
-
}
|
|
73
|
-
to {
|
|
74
|
-
transform: rotate(360deg);
|
|
75
|
-
}
|
|
76
|
-
`,yC=Na("div")`
|
|
77
|
-
width: 12px;
|
|
78
|
-
height: 12px;
|
|
79
|
-
box-sizing: border-box;
|
|
80
|
-
border: 2px solid;
|
|
81
|
-
border-radius: 100%;
|
|
82
|
-
border-color: ${t=>t.secondary||"#e0e0e0"};
|
|
83
|
-
border-right-color: ${t=>t.primary||"#616161"};
|
|
84
|
-
animation: ${gC} 1s linear infinite;
|
|
85
|
-
`,vC=Kl`
|
|
86
|
-
from {
|
|
87
|
-
transform: scale(0) rotate(45deg);
|
|
88
|
-
opacity: 0;
|
|
89
|
-
}
|
|
90
|
-
to {
|
|
91
|
-
transform: scale(1) rotate(45deg);
|
|
92
|
-
opacity: 1;
|
|
93
|
-
}`,bC=Kl`
|
|
94
|
-
0% {
|
|
95
|
-
height: 0;
|
|
96
|
-
width: 0;
|
|
97
|
-
opacity: 0;
|
|
98
|
-
}
|
|
99
|
-
40% {
|
|
100
|
-
height: 0;
|
|
101
|
-
width: 6px;
|
|
102
|
-
opacity: 1;
|
|
103
|
-
}
|
|
104
|
-
100% {
|
|
105
|
-
opacity: 1;
|
|
106
|
-
height: 10px;
|
|
107
|
-
}`,xC=Na("div")`
|
|
108
|
-
width: 20px;
|
|
109
|
-
opacity: 0;
|
|
110
|
-
height: 20px;
|
|
111
|
-
border-radius: 10px;
|
|
112
|
-
background: ${t=>t.primary||"#61d345"};
|
|
113
|
-
position: relative;
|
|
114
|
-
transform: rotate(45deg);
|
|
115
|
-
|
|
116
|
-
animation: ${vC} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
117
|
-
forwards;
|
|
118
|
-
animation-delay: 100ms;
|
|
119
|
-
&:after {
|
|
120
|
-
content: '';
|
|
121
|
-
box-sizing: border-box;
|
|
122
|
-
animation: ${bC} 0.2s ease-out forwards;
|
|
123
|
-
opacity: 0;
|
|
124
|
-
animation-delay: 200ms;
|
|
125
|
-
position: absolute;
|
|
126
|
-
border-right: 2px solid;
|
|
127
|
-
border-bottom: 2px solid;
|
|
128
|
-
border-color: ${t=>t.secondary||"#fff"};
|
|
129
|
-
bottom: 6px;
|
|
130
|
-
left: 6px;
|
|
131
|
-
height: 10px;
|
|
132
|
-
width: 6px;
|
|
133
|
-
}
|
|
134
|
-
`,SC=Na("div")`
|
|
135
|
-
position: absolute;
|
|
136
|
-
`,EC=Na("div")`
|
|
137
|
-
position: relative;
|
|
138
|
-
display: flex;
|
|
139
|
-
justify-content: center;
|
|
140
|
-
align-items: center;
|
|
141
|
-
min-width: 20px;
|
|
142
|
-
min-height: 20px;
|
|
143
|
-
`,wC=Kl`
|
|
144
|
-
from {
|
|
145
|
-
transform: scale(0.6);
|
|
146
|
-
opacity: 0.4;
|
|
147
|
-
}
|
|
148
|
-
to {
|
|
149
|
-
transform: scale(1);
|
|
150
|
-
opacity: 1;
|
|
151
|
-
}`,TC=Na("div")`
|
|
152
|
-
position: relative;
|
|
153
|
-
transform: scale(0.6);
|
|
154
|
-
opacity: 0.4;
|
|
155
|
-
min-width: 20px;
|
|
156
|
-
animation: ${wC} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
157
|
-
forwards;
|
|
158
|
-
`,CC=({toast:t})=>{let{icon:l,type:a,iconTheme:r}=t;return l!==void 0?typeof l=="string"?T.createElement(TC,null,l):l:a==="blank"?null:T.createElement(EC,null,T.createElement(yC,{...r}),a!=="loading"&&T.createElement(SC,null,a==="error"?T.createElement(pC,{...r}):T.createElement(xC,{...r})))},kC=t=>`
|
|
159
|
-
0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;}
|
|
160
|
-
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
161
|
-
`,AC=t=>`
|
|
162
|
-
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
163
|
-
100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;}
|
|
164
|
-
`,_C="0%{opacity:0;} 100%{opacity:1;}",RC="0%{opacity:1;} 100%{opacity:0;}",DC=Na("div")`
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
background: #fff;
|
|
168
|
-
color: #363636;
|
|
169
|
-
line-height: 1.3;
|
|
170
|
-
will-change: transform;
|
|
171
|
-
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
|
172
|
-
max-width: 350px;
|
|
173
|
-
pointer-events: auto;
|
|
174
|
-
padding: 8px 10px;
|
|
175
|
-
border-radius: 8px;
|
|
176
|
-
`,NC=Na("div")`
|
|
177
|
-
display: flex;
|
|
178
|
-
justify-content: center;
|
|
179
|
-
margin: 4px 10px;
|
|
180
|
-
color: inherit;
|
|
181
|
-
flex: 1 1 auto;
|
|
182
|
-
white-space: pre-line;
|
|
183
|
-
`,jC=(t,l)=>{let a=t.includes("top")?1:-1,[r,u]=Qb()?[_C,RC]:[kC(a),AC(a)];return{animation:l?`${Kl(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Kl(u)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},OC=T.memo(({toast:t,position:l,style:a,children:r})=>{let u=t.height?jC(t.position||l||"top-center",t.visible):{opacity:0},s=T.createElement(CC,{toast:t}),c=T.createElement(NC,{...t.ariaProps},Ju(t.message,t));return T.createElement(DC,{className:t.className,style:{...u,...a,...t.style}},typeof r=="function"?r({icon:s,message:c}):T.createElement(T.Fragment,null,s,c))});nC(T.createElement);var MC=({id:t,className:l,style:a,onHeightUpdate:r,children:u})=>{let s=T.useCallback(c=>{if(c){let d=()=>{let p=c.getBoundingClientRect().height;r(t,p)};d(),new MutationObserver(d).observe(c,{subtree:!0,childList:!0,characterData:!0})}},[t,r]);return T.createElement("div",{ref:s,className:l,style:a},u)},zC=(t,l)=>{let a=t.includes("top"),r=a?{top:0}:{bottom:0},u=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Qb()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(a?1:-1)}px)`,...r,...u}},LC=cs`
|
|
184
|
-
z-index: 9999;
|
|
185
|
-
> * {
|
|
186
|
-
pointer-events: auto;
|
|
187
|
-
}
|
|
188
|
-
`,Mu=16,UC=({reverseOrder:t,position:l="top-center",toastOptions:a,gutter:r,children:u,toasterId:s,containerStyle:c,containerClassName:d})=>{let{toasts:p,handlers:h}=fC(a,s);return T.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:Mu,left:Mu,right:Mu,bottom:Mu,pointerEvents:"none",...c},className:d,onMouseEnter:h.startPause,onMouseLeave:h.endPause},p.map(y=>{let g=y.position||l,b=h.calculateOffset(y,{reverseOrder:t,gutter:r,defaultPosition:l}),S=zC(g,b);return T.createElement(MC,{id:y.id,key:y.id,onHeightUpdate:h.updateHeight,className:y.visible?LC:"",style:S},y.type==="custom"?Ju(y.message,y):u?u(y):T.createElement(OC,{toast:y,position:g}))}))};function BC(){return v.jsx(UC,{position:"bottom-right",toastOptions:{style:{background:"var(--bg-surface)",color:"var(--text)",border:"1px solid var(--border)",fontFamily:"var(--font-mono)",fontSize:"13px"},success:{iconTheme:{primary:"var(--green)",secondary:"var(--bg-surface)"}},error:{iconTheme:{primary:"var(--red)",secondary:"var(--bg-surface)"}}}})}const e0=T.createContext(null);function go(){const t=T.useContext(e0);if(!t)throw new Error("useAppContext must be used within AppShell");return t}function HC(){const[t,l]=T.useState(()=>window.innerWidth<=768);return T.useEffect(()=>{const a=window.matchMedia("(max-width: 768px)"),r=u=>l(u.matches);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[]),t}function IC(){const[t,l]=T.useState(()=>Vi()),[a,r]=T.useState(null),[u,s]=T.useState(null),[c,d]=T.useState(!1),[p]=T.useState(!1),[h,y]=T.useState(null),[g,b]=T.useState(()=>ro()),[S,E]=T.useState(!1),[A,R]=T.useState(()=>localStorage.getItem("sidebarCollapsed")==="true"),[k,_]=T.useState(!1),j=HC(),J=T.useCallback(()=>{R(B=>(localStorage.setItem("sidebarCollapsed",String(!B)),!B))},[]),Q=T.useCallback(()=>_(!0),[]),I=T.useCallback(()=>_(!1),[]),O=Zl(),le=fl(),ne=T.useCallback(()=>{b(ro())},[]),D=T.useCallback(()=>{l(Vi()),y(null)},[]),q=T.useRef(le.pathname);T.useEffect(()=>{const B=be=>be.startsWith("/session/")||be.startsWith("/shared/")||be.startsWith("/room/"),ee=B(q.current),ie=B(le.pathname);q.current=le.pathname,_(!1),ie&&!ee&&(R(!0),localStorage.setItem("sidebarCollapsed","true")),!ie&&ee&&(R(!1),localStorage.setItem("sidebarCollapsed","false")),ie||D()},[le.pathname,D]);const F=T.useCallback(async()=>{const B=bT();if(s(B),Pu()&&md()){r("oauth");return}try{const{oauthToken:ee}=await MT();if(ee){mT(ee),r("keychain");return}}catch{if(md()){r("keychain");return}}if(hT()){r("api-key");return}r(null),d(!0)},[]);T.useEffect(()=>{F(),kT().then(B=>E(B.devMode)).catch(()=>{})},[F]);const V=T.useCallback((B,ee)=>{const ie=B.split(/\s+/).slice(0,3).join(" ");y({name:ie||"New project"}),O("/session/new",{state:{description:B,freeform:ee}})},[O]),ue=T.useCallback(async B=>{try{await DT(B)}catch{}xT(B),D(),le.pathname===`/session/${B}`&&O("/")},[le.pathname,O,D]),W={sessions:t,pendingProject:h,authSource:a,hasGhToken:u,showSettings:c,setShowSettings:d,refreshSessions:D,refreshSettings:F,handleNewProject:V,handleDeleteSession:ue,loading:p,agentRooms:g,refreshAgentRooms:ne,devMode:S};return v.jsxs(e0.Provider,{value:W,children:[v.jsxs("div",{className:`app-shell ${A?"sidebar-collapsed":""}`,children:[j&&k&&v.jsx("div",{className:"sidebar-backdrop",onClick:I,onKeyDown:B=>{B.key==="Escape"&&I()}}),v.jsx(QT,{collapsed:A,onToggle:J,mobileOpen:k,onMobileClose:I}),v.jsx("main",{className:"main-content",children:v.jsx(Tw,{context:{openMobileDrawer:Q}})}),v.jsx("button",{type:"button",className:"global-settings-btn",onClick:()=>d(B=>!B),title:"Settings",children:v.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16","aria-label":"Settings",children:[v.jsx("title",{children:"Settings"}),v.jsx("path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}),v.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]}),v.jsx(BC,{})]})}function t0({onSubmit:t,placeholder:l,disabled:a,isRunning:r,onCancel:u}){const[s,c]=T.useState(""),d=T.useRef(null),p=T.useCallback(()=>{const b=s.trim();b&&(t(b),c(""),d.current&&(d.current.style.height="auto"))},[s,t]),h=T.useCallback(()=>{r&&u&&u()},[r,u]);ss(h,!r);const y=T.useCallback(b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),p())},[p]),g=T.useCallback(()=>{const b=d.current;b&&(b.style.height="auto",b.style.height=`${Math.min(b.scrollHeight,200)}px`)},[]);return v.jsxs("div",{className:"prompt-bar",children:[v.jsx("textarea",{ref:d,value:s,onChange:b=>{c(b.target.value),g()},onKeyDown:y,placeholder:l??"Describe what you want to build...",disabled:a,rows:1}),v.jsx("button",{className:"primary",onClick:p,disabled:a||!s.trim(),children:"Send"}),r&&u&&v.jsx("button",{className:"danger",onClick:u,children:"Stop"})]})}function qC(t){const l=Date.now()-new Date(t).getTime(),a=Math.floor(l/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;const r=Math.floor(a/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function FC({onSelect:t,onClose:l}){const[a,r]=T.useState([]),[u,s]=T.useState(!0),[c,d]=T.useState(null),[p,h]=T.useState(""),[y,g]=T.useState(null),[b,S]=T.useState([]),[E,A]=T.useState(!1),[R,k]=T.useState(""),[_,j]=T.useState(""),[J,Q]=T.useState(!1);T.useEffect(()=>{jT().then(V=>{r(V.repos),s(!1)}).catch(V=>{d(V instanceof Error?V.message:"Failed to load repos"),s(!1)})},[]);function I(V){g(V),A(!0),S([]),k(""),Q(!1),j(""),OT(V.nameWithOwner).then(ue=>{S(ue.branches),A(!1)}).catch(()=>{A(!1)})}function O(){g(null),S([]),k(""),Q(!1)}function le(V){y&&t(y.url,V)}const ne=T.useCallback(()=>{y?O():l()},[y,l]);ss(ne);const D=p?a.filter(V=>V.nameWithOwner.toLowerCase().includes(p.toLowerCase())):a,F=[...R?b.filter(V=>V.name.toLowerCase().includes(R.toLowerCase())):b].sort((V,ue)=>V.isDefault&&!ue.isDefault?-1:!V.isDefault&&ue.isDefault?1:V.name.localeCompare(ue.name));return rs.createPortal(v.jsx("div",{className:"modal-overlay",onClick:l,children:v.jsx("div",{className:"modal-card",onClick:V=>V.stopPropagation(),style:{maxWidth:500},children:y?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"modal-title",children:[v.jsx("button",{type:"button",onClick:O,style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:"0 8px 0 0",fontSize:14},children:"←"}),y.nameWithOwner]}),v.jsx("div",{className:"repo-picker-filter",children:v.jsx("input",{type:"text",value:R,onChange:V=>k(V.target.value),placeholder:"Filter branches..."})}),E&&v.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading branches..."}),!E&&v.jsxs("div",{className:"repo-picker-list",children:[F.map(V=>v.jsx("div",{className:"repo-picker-item",onClick:()=>le(V.name),children:v.jsxs("span",{className:"repo-picker-item-name",children:[V.name,V.isDefault&&v.jsx("span",{style:{marginLeft:8,fontSize:11,color:"var(--text-subtle)",fontWeight:400},children:"default"})]})},V.name)),J?v.jsxs("div",{className:"repo-picker-new-branch",children:[v.jsx("input",{type:"text",value:_,onChange:V=>j(V.target.value),onKeyDown:V=>{V.key==="Enter"&&_.trim()&&le(_.trim())},placeholder:"branch-name"}),v.jsx("button",{type:"button",className:"modal-btn modal-btn-primary",disabled:!_.trim(),onClick:()=>le(_.trim()),children:"Create"})]}):v.jsx("div",{className:"repo-picker-item",style:{color:"var(--brand-1)"},onClick:()=>Q(!0),children:v.jsx("span",{className:"repo-picker-item-name",children:"+ Create new branch"})})]}),v.jsxs("div",{className:"modal-actions",children:[v.jsx("button",{type:"button",className:"modal-btn",onClick:O,children:"Back"}),v.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})]})]}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"modal-title",children:"Resume from GitHub"}),v.jsx("div",{className:"repo-picker-filter",children:v.jsx("input",{type:"text",value:p,onChange:V=>h(V.target.value),placeholder:"Filter repositories..."})}),u&&v.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading repositories..."}),c&&v.jsx("div",{style:{padding:"16px 0",color:"var(--red)",fontSize:13},children:c}),!u&&!c&&v.jsx("div",{className:"repo-picker-list",children:D.length===0?v.jsx("div",{style:{padding:16,textAlign:"center",color:"var(--text-subtle)",fontSize:13},children:p?"No matching repos":"No repos found"}):D.map(V=>v.jsxs("div",{className:"repo-picker-item",onClick:()=>I(V),children:[v.jsx("span",{className:"repo-picker-item-name",children:V.nameWithOwner}),v.jsx("span",{className:"repo-picker-item-date",children:qC(V.updatedAt)})]},V.nameWithOwner))}),v.jsx("div",{className:"modal-actions",children:v.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})})]})})}),document.body)}function n0({authSource:t,hasGhToken:l,onKeySaved:a,onClose:r,onCopyLog:u}){const s=T.useId(),c=T.useId(),[d,p]=T.useState(Pu()||t==="oauth"?"oauth":"api-key"),[h,y]=T.useState(""),[g,b]=T.useState(""),[S,E]=T.useState(!1),A=d==="api-key"?t==="api-key":Pu(),R=T.useCallback(()=>{h.trim()&&(d==="api-key"?fT(h.trim()):gT(h.trim()),y(""),a())},[h,d,a]),k=T.useCallback(()=>{d==="api-key"?dT():pT(),a()},[d,a]),_=T.useCallback(()=>{g.trim()&&(yT(g.trim()),b(""),a())},[g,a]),j=T.useCallback(()=>{vT(),a()},[a]),J=T.useCallback(le=>{le.key==="Enter"&&(le.preventDefault(),R())},[R]),Q=T.useCallback(le=>{le.key==="Enter"&&(le.preventDefault(),_())},[_]),I=T.useCallback(()=>{u?.(),E(!0),setTimeout(()=>E(!1),2e3)},[u]);ss(r);const O=d==="api-key"?t==="api-key"?"Enter new key to override...":"sk-ant-...":Pu()?"Enter new token to override...":"Paste OAuth token...";return rs.createPortal(v.jsx("div",{className:"modal-overlay",onClick:r,children:v.jsxs("div",{className:"modal-card",onClick:le=>le.stopPropagation(),children:[v.jsx("div",{className:"modal-title",children:"Settings"}),v.jsxs("div",{className:"settings-field",style:{marginTop:12},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[v.jsx("label",{htmlFor:s,style:{margin:0},children:"Claude Authentication"}),v.jsx("span",{className:`settings-status ${t?"active":"missing"}`,children:t==="keychain"?"Using Claude keychain":t==="oauth"?"OAuth token set":t==="api-key"?"API key set":"No credentials"})]}),t==="keychain"&&v.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginBottom:8},children:"Credentials detected from macOS Keychain. No manual key needed."}),!t&&v.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginBottom:8},children:"If you have Claude Code installed on macOS, credentials are automatically read from the Keychain. Otherwise, enter a key below."}),v.jsxs("div",{className:"settings-input-row",children:[v.jsxs("select",{value:d,onChange:le=>{p(le.target.value),y("")},className:"settings-key-type-select",children:[v.jsx("option",{value:"api-key",children:"API Key"}),v.jsx("option",{value:"oauth",children:"OAuth Token"})]}),v.jsx("input",{id:s,type:"password",value:h,onChange:le=>y(le.target.value),onKeyDown:J,placeholder:O}),h.trim()?v.jsx("button",{type:"button",onClick:R,className:"primary",children:"Save"}):A&&v.jsx("button",{type:"button",onClick:k,className:"btn btn-danger",children:"Remove"})]})]}),v.jsx("div",{className:"settings-divider"}),v.jsx("div",{className:"settings-section-label",children:"GitHub"}),v.jsxs("div",{className:"settings-field",children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[v.jsx("label",{htmlFor:c,style:{margin:0},children:"Personal Access Token"}),v.jsx("span",{className:`settings-status ${l?"active":"missing"}`,children:l?"Connected":"Not connected"})]}),v.jsxs("div",{className:"settings-input-row",children:[v.jsx("input",{id:c,type:"password",value:g,onChange:le=>b(le.target.value),onKeyDown:Q,placeholder:l?"Enter new token to override...":"ghp_..."}),g.trim()?v.jsx("button",{type:"button",onClick:_,className:"primary",children:"Save"}):l&&v.jsx("button",{type:"button",onClick:j,className:"btn btn-danger",children:"Remove"})]}),v.jsxs("div",{style:{fontSize:11,color:"var(--text-subtle)",marginTop:4},children:["Required scopes: ",v.jsx("code",{children:"repo"}),", ",v.jsx("code",{children:"read:user"}),". Create one at"," ",v.jsx("a",{href:"https://github.com/settings/tokens/new?scopes=repo,read:user",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--brand-1)"},children:"github.com/settings/tokens"})]})]}),v.jsx("div",{className:"settings-divider"}),u&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"settings-divider"}),v.jsx("div",{className:"settings-section-label",children:"Debug"}),v.jsx("button",{type:"button",className:"btn",onClick:I,children:S?"Copied!":"Copy session log"})]}),v.jsx("div",{className:"modal-actions",style:{marginTop:16},children:v.jsx("button",{type:"button",className:"modal-btn",onClick:r,children:"Close"})})]})}),document.body)}function GC(){const{authSource:t,hasGhToken:l,showSettings:a,setShowSettings:r,refreshSettings:u,refreshSessions:s,handleNewProject:c,loading:d,devMode:p}=go(),h=Zl(),{openMobileDrawer:y}=$d(),[g]=lT(),b=p&&g.get("mode")==="session",[S,E]=T.useState(!1),[A,R]=T.useState(!1),k=T.useCallback(j=>{c(j,!0)},[c]),_=T.useCallback(async(j,J)=>{E(!1),R(!0);try{const{sessionId:Q,session:I}=await zT(j,J);ih(I),s(),h(`/session/${Q}`)}catch(Q){console.error("Failed to resume from GitHub:",Q)}finally{R(!1)}},[h,s]);return v.jsxs(v.Fragment,{children:[a&&v.jsx(n0,{authSource:t,hasGhToken:l??!1,onKeySaved:u,onClose:()=>r(!1)}),v.jsxs("div",{className:"mobile-home-topbar",children:[v.jsx("button",{type:"button",className:"mobile-hamburger",onClick:y,"aria-label":"Open menu",children:v.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[v.jsx("title",{children:"Menu"}),v.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),v.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),v.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),v.jsx("img",{src:"/img/brand/logo.svg",alt:"Electric",className:"mobile-topbar-logo"})]}),v.jsxs("div",{className:"hero",children:[v.jsx("img",{src:"/img/brand/logo.svg",alt:"Electric",className:"hero-logo"}),v.jsx("p",{className:"hero-subtitle",children:b?"Start a freeform session":"Build Reactive apps on Sync"}),v.jsx("div",{className:"hero-prompt",children:v.jsx(t0,{onSubmit:b?k:c,placeholder:t?b?"What do you want to work on?":"What do you want to build?":"Set an API key in Settings to get started...",disabled:d||!t})}),l&&v.jsx("button",{type:"button",className:"hero-resume-btn",onClick:()=>E(!0),disabled:A,children:A?"Cloning...":"Resume from GitHub"})]}),S&&v.jsx(FC,{onSelect:_,onClose:()=>E(!1)})]})}function YC(t){const[l,a]=T.useState([]),[r,u]=T.useState(!1),s=T.useRef("-1");T.useEffect(()=>{if(!t)return;a([]),u(!1),s.current="-1";let p=!1,h=null,y=0;const g=10;function b(){if(p)return;if(y>=g){u(!1);return}const S=new URLSearchParams,E=Vb(t);E&&S.set("token",E),s.current!=="-1"&&S.set("offset",s.current);const A=S.toString(),R=`/api/rooms/${t}/events${A?`?${A}`:""}`;h=new EventSource(R),h.onopen=()=>{p||(y=0,u(!0))},h.onmessage=k=>{if(!p){k.lastEventId&&(s.current=k.lastEventId);try{const _=JSON.parse(k.data);a(j=>[...j,_])}catch{}}},h.onerror=()=>{if(p)return;h?.close(),y++;const k=Math.min(1e3*2**(y-1),3e4);setTimeout(b,k)}}return b(),()=>{p=!0,h&&(h.close(),h=null)}},[t]);const c=l.filter(p=>p.type==="agent_message"),d=l.some(p=>p.type==="room_closed");return{events:l,messages:c,isLive:r,isClosed:d}}function VC(){const{id:t}=jb(),l=Zl(),{openMobileDrawer:a}=$d(),{refreshSessions:r}=go(),[u,s]=T.useState(null),[c,d]=T.useState(null),[p,h]=T.useState(!1),[y,g]=T.useState(!1),b=T.useRef(!1),{events:S,isClosed:E}=YC(t??null),A=t?ro().find(j=>j.id===t):void 0;T.useEffect(()=>{if(!t)return;let j=!1;b.current=!1;const J=()=>{tv(t).then(I=>{if(!j){b.current=!0,s(I),d(null);for(const O of I.participants)pd(O.sessionId,{status:O.running?"running":"complete"});r()}}).catch(I=>{if(!j){const O=I instanceof Error?I.message:String(I);O.includes("not found")||O.includes("Not Found")?d(O):b.current||d(O)}})};J();const Q=setInterval(J,5e3);return()=>{j=!0,clearInterval(Q)}},[t,r]);const R=T.useCallback(async()=>{if(t)try{await qT(t),s(j=>j&&{...j,state:"closed"})}catch(j){console.error("Failed to close room:",j)}},[t]);if(c)return v.jsxs("div",{className:"room-error",children:[v.jsx("h2",{children:"Cannot load room"}),v.jsx("p",{children:c}),v.jsx("button",{type:"button",className:"btn",onClick:()=>l("/"),children:"Go Home"})]});const k=E?"closed":u?.state,_=u?.participants??[];return v.jsxs(v.Fragment,{children:[v.jsx(PC,{roomId:t,roomName:A?.name,roomCode:A?.code,state:k,participants:_,onClose:R,onAddAgent:()=>h(!0),openMobileDrawer:a}),v.jsxs("div",{className:"session-content",children:[v.jsx("div",{className:"room-messages",children:v.jsx($C,{events:S,participants:_})}),v.jsx(QC,{roomId:t??"",participants:_,disabled:k==="closed"||y,sending:y,setSending:g})]}),p&&t&&v.jsx(ZC,{roomId:t,onClose:()=>h(!1),onAdded:()=>{h(!1),r(),tv(t).then(s).catch(()=>{})}})]})}function PC({roomId:t,roomName:l,roomCode:a,state:r,participants:u,onClose:s,onAddAgent:c,openMobileDrawer:d}){const p=Zl(),[h,y]=T.useState(!1),g=T.useCallback(()=>{if(!t||!a)return;const b=`${t}:${a}`;navigator.clipboard.writeText(b),y(!0),setTimeout(()=>y(!1),2e3)},[t,a]);return v.jsxs("div",{className:"session-header",children:[v.jsx("button",{type:"button",className:"mobile-hamburger",onClick:d,"aria-label":"Open menu",children:v.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[v.jsx("title",{children:"Menu"}),v.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),v.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),v.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),v.jsx("span",{className:"session-header-name",children:l||`Room ${t?.slice(0,8)}`}),r==="active"&&v.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Active"}),r==="closed"&&v.jsx("span",{className:"session-header-status",style:{color:"var(--text-subtle)"},children:"Closed"}),v.jsx("span",{className:"room-header-participants",children:u.map(b=>{const S=ch(b.sessionId),E=b.name.split(/[-_ ]+/).slice(0,2).map(A=>A.charAt(0).toUpperCase()).join("");return v.jsx("button",{type:"button",className:"room-header-avatar",style:{background:S.bg,color:S.fg},title:b.name,onClick:()=>p(`/session/${b.sessionId}`),children:E},b.sessionId)})}),a&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"invite-code-label",children:"Join code:"}),v.jsx("button",{type:"button",className:"invite-code-btn",onClick:g,children:h?"Copied!":a})]}),v.jsxs("span",{className:"session-header-actions-group",children:[v.jsx("button",{type:"button",className:"session-header-action",onClick:c,disabled:r==="closed",children:"+ Agent"}),r==="active"&&v.jsx("button",{type:"button",className:"session-header-action",onClick:s,children:"Close Room"})]})]})}function XC({name:t,participants:l}){const a=Zl(),r=l.find(u=>u.name===t);return r?v.jsx("button",{type:"button",className:"room-message-from room-message-from-link",onClick:()=>a(`/session/${r.sessionId}`),title:`Go to ${t}'s session`,children:t}):v.jsx("span",{className:"room-message-from",children:t})}function $C({events:t,participants:l}){const a=T.useRef(null),r=l.filter(u=>u.running);return T.useEffect(()=>{a.current?.scrollIntoView({behavior:"smooth"})},[t.length,r.length]),t.length===0?v.jsx("div",{className:"room-empty",children:v.jsx("p",{children:"No messages yet. Add agents to start the conversation."})}):v.jsxs("div",{className:"room-event-list",children:[t.map((u,s)=>{const c=`${u.ts}-${s}`;switch(u.type){case"agent_message":return v.jsxs("div",{className:"room-event room-message",children:[v.jsxs("div",{className:"room-message-header",children:[v.jsx(XC,{name:u.from,participants:l}),u.to&&v.jsxs("span",{className:"room-message-to",children:["→ ",u.to]}),v.jsx("span",{className:"room-message-time",children:new Date(u.ts).toLocaleTimeString()})]}),v.jsx("div",{className:"room-message-body",children:u.body})]},c);case"participant_joined":return v.jsxs("div",{className:"room-event room-system-event",children:[v.jsxs("span",{children:[u.participant?.displayName??"Unknown"," joined the room"]}),v.jsx("span",{className:"room-message-time",children:new Date(u.ts).toLocaleTimeString()})]},c);case"participant_left":return v.jsx("div",{className:"room-event room-system-event",children:v.jsx("span",{children:"Participant left"})},c);case"room_closed":return v.jsxs("div",{className:"room-event room-system-event room-closed-event",children:[v.jsxs("span",{children:["Room closed by ",u.closedBy]}),u.summary&&v.jsxs("span",{children:[" — ",u.summary]})]},c);default:return null}}),r.length>0&&v.jsxs("div",{className:"room-working-indicator",children:[v.jsxs("span",{className:"room-working-dots",children:[v.jsx("span",{}),v.jsx("span",{}),v.jsx("span",{})]}),v.jsxs("span",{className:"room-working-text",children:[r.map(u=>u.name).join(", ")," ",r.length===1?"is":"are"," working"]})]}),v.jsx("div",{ref:a})]})}function QC({roomId:t,participants:l,disabled:a,sending:r,setSending:u}){const[s,c]=T.useState(""),[d,p]=T.useState("broadcast"),[h,y]=T.useState(null),g=T.useRef(null),b=T.useCallback(async()=>{const E=s.trim();if(!(!E||!t)){u(!0),y(null);try{const A=qb(),R=d==="broadcast"?void 0:d;await IT(t,A.displayName,E,R),c(""),g.current&&(g.current.style.height="auto")}catch(A){const R=A instanceof Error?A.message:"Failed to send message";y(R)}finally{u(!1)}}},[s,t,d,u]),S=T.useCallback(()=>{const E=g.current;E&&(E.style.height="auto",E.style.height=`${Math.min(E.scrollHeight,200)}px`)},[]);return v.jsxs("div",{className:"prompt-bar room-prompt-bar",children:[h&&v.jsxs("div",{className:"room-send-error",children:[h,v.jsx("button",{type:"button",onClick:()=>y(null),children:"×"})]}),v.jsxs("select",{className:"room-target-select",value:d,onChange:E=>p(E.target.value),disabled:a,children:[v.jsx("option",{value:"broadcast",children:"@room (broadcast)"}),l.map(E=>v.jsxs("option",{value:E.name,children:["@",E.name]},E.sessionId))]}),v.jsx("textarea",{ref:g,value:s,onChange:E=>{c(E.target.value),S()},onKeyDown:E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),b())},placeholder:a?"Room closed":"Send a message...",disabled:a,rows:1}),v.jsx("button",{type:"button",className:"primary",onClick:b,disabled:a||!s.trim()||r,children:r?"...":"Send"})]})}const KC=[{value:"coder",label:"Coder",description:"Writes code, creates PRs"},{value:"reviewer",label:"Reviewer",description:"Reviews PRs (read-only)"}];function ZC({roomId:t,onClose:l,onAdded:a}){const{sessions:r}=go(),[u,s]=T.useState("new"),[c,d]=T.useState(""),[p,h]=T.useState(!1),[y,g]=T.useState(""),[b,S]=T.useState(""),[E,A]=T.useState(!1),[R,k]=T.useState(null),_=r.filter(Q=>Q.status==="running"||Q.status==="complete"),j=T.useCallback(async()=>{A(!0),k(null);try{if(u==="existing"){if(!b)return;const I=_.find(O=>O.id===b)?.projectName??b.slice(0,8);await HT(t,{sessionId:b,name:I,initialPrompt:y.trim()||void 0})}else{const Q=await BT(t,{role:c.trim()||void 0,gated:p,initialPrompt:y.trim()||void 0});Q.sessionToken&&oh(Q.sessionId,Q.sessionToken),ih({id:Q.sessionId,projectName:Q.participantName,sandboxProjectDir:"",description:c.trim()||`Agent in room ${t.slice(0,8)}`,createdAt:new Date().toISOString(),lastActiveAt:new Date().toISOString(),status:"running"})}a()}catch(Q){k(Q instanceof Error?Q.message:"Failed to add agent")}finally{A(!1)}},[t,u,c,p,y,b,_,a]),J=u==="existing"?!!b:!0;return v.jsx("div",{className:"modal-overlay",onClick:l,children:v.jsxs("div",{className:"modal-card",onClick:Q=>Q.stopPropagation(),children:[v.jsx("div",{className:"modal-title",children:"Add Agent to Room"}),v.jsxs("div",{className:"modal-body",children:[v.jsxs("div",{className:"room-form-toggle",children:[v.jsx("button",{type:"button",className:`room-form-toggle-btn ${u==="new"?"active":""}`,onClick:()=>s("new"),children:"New Agent"}),v.jsx("button",{type:"button",className:`room-form-toggle-btn ${u==="existing"?"active":""}`,onClick:()=>s("existing"),children:"Existing Session"})]}),u==="existing"?v.jsxs("label",{className:"room-form-label",children:["Session *",v.jsxs("select",{value:b,onChange:Q=>S(Q.target.value),children:[v.jsx("option",{value:"",children:"Select a session..."}),_.map(Q=>v.jsxs("option",{value:Q.id,children:[Q.projectName," (",Q.id.slice(0,8),")"]},Q.id))]})]}):v.jsxs(v.Fragment,{children:[v.jsxs("label",{className:"room-form-label",children:["Role",v.jsxs("select",{value:c,onChange:Q=>d(Q.target.value),children:[v.jsx("option",{value:"",children:"No role (generic participant)"}),KC.map(Q=>v.jsxs("option",{value:Q.value,children:[Q.label," — ",Q.description]},Q.value))]})]}),v.jsxs("label",{className:"room-form-label",children:["Initial Prompt",v.jsx("textarea",{value:y,onChange:Q=>g(Q.target.value),placeholder:"Optional message to send after agent joins",rows:3})]}),v.jsxs("label",{className:"room-form-checkbox",children:[v.jsx("input",{type:"checkbox",checked:p,onChange:Q=>h(Q.target.checked)}),"Gated (require approval for outbound messages)"]})]}),R&&v.jsx("p",{className:"room-form-error",children:R})]}),v.jsxs("div",{className:"modal-actions",children:[v.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"}),v.jsx("button",{type:"button",className:"modal-btn primary",onClick:j,disabled:!J||E,children:E?"Adding...":u==="existing"?"Join Room":"Add Agent"})]})]})})}const{entries:l0,setPrototypeOf:av,isFrozen:JC,getPrototypeOf:WC,getOwnPropertyDescriptor:ek}=Object;let{freeze:gn,seal:nl,create:$u}=Object,{apply:bd,construct:xd}=typeof Reflect<"u"&&Reflect;gn||(gn=function(l){return l});nl||(nl=function(l){return l});bd||(bd=function(l,a){for(var r=arguments.length,u=new Array(r>2?r-2:0),s=2;s<r;s++)u[s-2]=arguments[s];return l.apply(a,u)});xd||(xd=function(l){for(var a=arguments.length,r=new Array(a>1?a-1:0),u=1;u<a;u++)r[u-1]=arguments[u];return new l(...r)});const zu=yn(Array.prototype.forEach),tk=yn(Array.prototype.lastIndexOf),iv=yn(Array.prototype.pop),Fr=yn(Array.prototype.push),nk=yn(Array.prototype.splice),Qu=yn(String.prototype.toLowerCase),Lf=yn(String.prototype.toString),Uf=yn(String.prototype.match),Gr=yn(String.prototype.replace),lk=yn(String.prototype.indexOf),ak=yn(String.prototype.trim),In=yn(Object.prototype.hasOwnProperty),mn=yn(RegExp.prototype.test),Yr=ik(TypeError);function yn(t){return function(l){l instanceof RegExp&&(l.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),u=1;u<a;u++)r[u-1]=arguments[u];return bd(t,l,r)}}function ik(t){return function(){for(var l=arguments.length,a=new Array(l),r=0;r<l;r++)a[r]=arguments[r];return xd(t,a)}}function Ye(t,l){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qu;av&&av(t,null);let r=l.length;for(;r--;){let u=l[r];if(typeof u=="string"){const s=a(u);s!==u&&(JC(l)||(l[r]=s),u=s)}t[u]=!0}return t}function rk(t){for(let l=0;l<t.length;l++)In(t,l)||(t[l]=null);return t}function El(t){const l=$u(null);for(const[a,r]of l0(t))In(t,a)&&(Array.isArray(r)?l[a]=rk(r):r&&typeof r=="object"&&r.constructor===Object?l[a]=El(r):l[a]=r);return l}function Vr(t,l){for(;t!==null;){const r=ek(t,l);if(r){if(r.get)return yn(r.get);if(typeof r.value=="function")return yn(r.value)}t=WC(t)}function a(){return null}return a}const rv=gn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Bf=gn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Hf=gn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ok=gn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),If=gn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),uk=gn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ov=gn(["#text"]),uv=gn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),qf=gn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),sv=gn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lu=gn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sk=nl(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ck=nl(/<%[\w\W]*|[\w\W]*%>/gm),fk=nl(/\$\{[\w\W]*/gm),dk=nl(/^data-[\-\w.\u00B7-\uFFFF]+$/),hk=nl(/^aria-[\-\w]+$/),a0=nl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mk=nl(/^(?:\w+script|data):/i),pk=nl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),i0=nl(/^html$/i),gk=nl(/^[a-z][.\w]*(-[.\w]+)+$/i);var cv=Object.freeze({__proto__:null,ARIA_ATTR:hk,ATTR_WHITESPACE:pk,CUSTOM_ELEMENT:gk,DATA_ATTR:dk,DOCTYPE_NAME:i0,ERB_EXPR:ck,IS_ALLOWED_URI:a0,IS_SCRIPT_OR_DATA:mk,MUSTACHE_EXPR:sk,TMPLIT_EXPR:fk});const Pr={element:1,text:3,progressingInstruction:7,comment:8,document:9},yk=function(){return typeof window>"u"?null:window},vk=function(l,a){if(typeof l!="object"||typeof l.createPolicy!="function")return null;let r=null;const u="data-tt-policy-suffix";a&&a.hasAttribute(u)&&(r=a.getAttribute(u));const s="dompurify"+(r?"#"+r:"");try{return l.createPolicy(s,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},fv=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function r0(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yk();const l=Ee=>r0(Ee);if(l.version="3.3.3",l.removed=[],!t||!t.document||t.document.nodeType!==Pr.document||!t.Element)return l.isSupported=!1,l;let{document:a}=t;const r=a,u=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:d,Element:p,NodeFilter:h,NamedNodeMap:y=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:g,DOMParser:b,trustedTypes:S}=t,E=p.prototype,A=Vr(E,"cloneNode"),R=Vr(E,"remove"),k=Vr(E,"nextSibling"),_=Vr(E,"childNodes"),j=Vr(E,"parentNode");if(typeof c=="function"){const Ee=a.createElement("template");Ee.content&&Ee.content.ownerDocument&&(a=Ee.content.ownerDocument)}let J,Q="";const{implementation:I,createNodeIterator:O,createDocumentFragment:le,getElementsByTagName:ne}=a,{importNode:D}=r;let q=fv();l.isSupported=typeof l0=="function"&&typeof j=="function"&&I&&I.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:F,ERB_EXPR:V,TMPLIT_EXPR:ue,DATA_ATTR:W,ARIA_ATTR:B,IS_SCRIPT_OR_DATA:ee,ATTR_WHITESPACE:ie,CUSTOM_ELEMENT:be}=cv;let{IS_ALLOWED_URI:N}=cv,M=null;const Z=Ye({},[...rv,...Bf,...Hf,...If,...ov]);let C=null;const de=Ye({},[...uv,...qf,...sv,...Lu]);let ge=Object.seal($u(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,ze=null;const ve=Object.seal($u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Oe=!0,At=!0,vn=!1,Et=!0,Gt=!1,Qt=!0,nn=!1,Yt=!1,dl=!1,Dn=!1,bn=!1,Nn=!1,hl=!0,Wl=!1;const Oa="user-content-";let pt=!0,cn=!1,ae={},he=null;const Ae=Ye({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ue=null;const Je=Ye({},["audio","video","img","source","image","track"]);let qt=null;const ln=Ye({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rt="http://www.w3.org/1998/Math/MathML",at="http://www.w3.org/2000/svg",gt="http://www.w3.org/1999/xhtml";let Pe=gt,fn=!1,Kt=null;const ai=Ye({},[Rt,at,gt],Lf);let xn=Ye({},["mi","mo","mn","ms","mtext"]),Gn=Ye({},["annotation-xml"]);const ml=Ye({},["title","style","font","a","script"]);let dn=null;const _l=["application/xhtml+xml","text/html"],Rl="text/html";let Ct=null,Sn=null;const pl=a.createElement("form"),al=function(U){return U instanceof RegExp||U instanceof Function},Ma=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Sn&&Sn===U)){if((!U||typeof U!="object")&&(U={}),U=El(U),dn=_l.indexOf(U.PARSER_MEDIA_TYPE)===-1?Rl:U.PARSER_MEDIA_TYPE,Ct=dn==="application/xhtml+xml"?Lf:Qu,M=In(U,"ALLOWED_TAGS")?Ye({},U.ALLOWED_TAGS,Ct):Z,C=In(U,"ALLOWED_ATTR")?Ye({},U.ALLOWED_ATTR,Ct):de,Kt=In(U,"ALLOWED_NAMESPACES")?Ye({},U.ALLOWED_NAMESPACES,Lf):ai,qt=In(U,"ADD_URI_SAFE_ATTR")?Ye(El(ln),U.ADD_URI_SAFE_ATTR,Ct):ln,Ue=In(U,"ADD_DATA_URI_TAGS")?Ye(El(Je),U.ADD_DATA_URI_TAGS,Ct):Je,he=In(U,"FORBID_CONTENTS")?Ye({},U.FORBID_CONTENTS,Ct):Ae,Te=In(U,"FORBID_TAGS")?Ye({},U.FORBID_TAGS,Ct):El({}),ze=In(U,"FORBID_ATTR")?Ye({},U.FORBID_ATTR,Ct):El({}),ae=In(U,"USE_PROFILES")?U.USE_PROFILES:!1,Oe=U.ALLOW_ARIA_ATTR!==!1,At=U.ALLOW_DATA_ATTR!==!1,vn=U.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Gt=U.SAFE_FOR_TEMPLATES||!1,Qt=U.SAFE_FOR_XML!==!1,nn=U.WHOLE_DOCUMENT||!1,Dn=U.RETURN_DOM||!1,bn=U.RETURN_DOM_FRAGMENT||!1,Nn=U.RETURN_TRUSTED_TYPE||!1,dl=U.FORCE_BODY||!1,hl=U.SANITIZE_DOM!==!1,Wl=U.SANITIZE_NAMED_PROPS||!1,pt=U.KEEP_CONTENT!==!1,cn=U.IN_PLACE||!1,N=U.ALLOWED_URI_REGEXP||a0,Pe=U.NAMESPACE||gt,xn=U.MATHML_TEXT_INTEGRATION_POINTS||xn,Gn=U.HTML_INTEGRATION_POINTS||Gn,ge=U.CUSTOM_ELEMENT_HANDLING||{},U.CUSTOM_ELEMENT_HANDLING&&al(U.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ge.tagNameCheck=U.CUSTOM_ELEMENT_HANDLING.tagNameCheck),U.CUSTOM_ELEMENT_HANDLING&&al(U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ge.attributeNameCheck=U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ge.allowCustomizedBuiltInElements=U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Gt&&(At=!1),bn&&(Dn=!0),ae&&(M=Ye({},ov),C=$u(null),ae.html===!0&&(Ye(M,rv),Ye(C,uv)),ae.svg===!0&&(Ye(M,Bf),Ye(C,qf),Ye(C,Lu)),ae.svgFilters===!0&&(Ye(M,Hf),Ye(C,qf),Ye(C,Lu)),ae.mathMl===!0&&(Ye(M,If),Ye(C,sv),Ye(C,Lu))),In(U,"ADD_TAGS")||(ve.tagCheck=null),In(U,"ADD_ATTR")||(ve.attributeCheck=null),U.ADD_TAGS&&(typeof U.ADD_TAGS=="function"?ve.tagCheck=U.ADD_TAGS:(M===Z&&(M=El(M)),Ye(M,U.ADD_TAGS,Ct))),U.ADD_ATTR&&(typeof U.ADD_ATTR=="function"?ve.attributeCheck=U.ADD_ATTR:(C===de&&(C=El(C)),Ye(C,U.ADD_ATTR,Ct))),U.ADD_URI_SAFE_ATTR&&Ye(qt,U.ADD_URI_SAFE_ATTR,Ct),U.FORBID_CONTENTS&&(he===Ae&&(he=El(he)),Ye(he,U.FORBID_CONTENTS,Ct)),U.ADD_FORBID_CONTENTS&&(he===Ae&&(he=El(he)),Ye(he,U.ADD_FORBID_CONTENTS,Ct)),pt&&(M["#text"]=!0),nn&&Ye(M,["html","head","body"]),M.table&&(Ye(M,["tbody"]),delete Te.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw Yr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Yr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=U.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else J===void 0&&(J=vk(S,u)),J!==null&&typeof Q=="string"&&(Q=J.createHTML(""));gn&&gn(U),Sn=U}},za=Ye({},[...Bf,...Hf,...ok]),z=Ye({},[...If,...uk]),G=function(U){let ce=j(U);(!ce||!ce.tagName)&&(ce={namespaceURI:Pe,tagName:"template"});const me=Qu(U.tagName),Ie=Qu(ce.tagName);return Kt[U.namespaceURI]?U.namespaceURI===at?ce.namespaceURI===gt?me==="svg":ce.namespaceURI===Rt?me==="svg"&&(Ie==="annotation-xml"||xn[Ie]):!!za[me]:U.namespaceURI===Rt?ce.namespaceURI===gt?me==="math":ce.namespaceURI===at?me==="math"&&Gn[Ie]:!!z[me]:U.namespaceURI===gt?ce.namespaceURI===at&&!Gn[Ie]||ce.namespaceURI===Rt&&!xn[Ie]?!1:!z[me]&&(ml[me]||!za[me]):!!(dn==="application/xhtml+xml"&&Kt[U.namespaceURI]):!1},P=function(U){Fr(l.removed,{element:U});try{j(U).removeChild(U)}catch{R(U)}},fe=function(U,ce){try{Fr(l.removed,{attribute:ce.getAttributeNode(U),from:ce})}catch{Fr(l.removed,{attribute:null,from:ce})}if(ce.removeAttribute(U),U==="is")if(Dn||bn)try{P(ce)}catch{}else try{ce.setAttribute(U,"")}catch{}},ye=function(U){let ce=null,me=null;if(dl)U="<remove></remove>"+U;else{const Be=Uf(U,/^[\r\n\t ]+/);me=Be&&Be[0]}dn==="application/xhtml+xml"&&Pe===gt&&(U='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+U+"</body></html>");const Ie=J?J.createHTML(U):U;if(Pe===gt)try{ce=new b().parseFromString(Ie,dn)}catch{}if(!ce||!ce.documentElement){ce=I.createDocument(Pe,"template",null);try{ce.documentElement.innerHTML=fn?Q:Ie}catch{}}const ut=ce.body||ce.documentElement;return U&&me&&ut.insertBefore(a.createTextNode(me),ut.childNodes[0]||null),Pe===gt?ne.call(ce,nn?"html":"body")[0]:nn?ce.documentElement:ut},_e=function(U){return O.call(U.ownerDocument||U,U,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},we=function(U){return U instanceof g&&(typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||!(U.attributes instanceof y)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function")},Se=function(U){return typeof d=="function"&&U instanceof d};function xe(Ee,U,ce){zu(Ee,me=>{me.call(l,U,ce,Sn)})}const ke=function(U){let ce=null;if(xe(q.beforeSanitizeElements,U,null),we(U))return P(U),!0;const me=Ct(U.nodeName);if(xe(q.uponSanitizeElement,U,{tagName:me,allowedTags:M}),Qt&&U.hasChildNodes()&&!Se(U.firstElementChild)&&mn(/<[/\w!]/g,U.innerHTML)&&mn(/<[/\w!]/g,U.textContent)||U.nodeType===Pr.progressingInstruction||Qt&&U.nodeType===Pr.comment&&mn(/<[/\w]/g,U.data))return P(U),!0;if(!(ve.tagCheck instanceof Function&&ve.tagCheck(me))&&(!M[me]||Te[me])){if(!Te[me]&&De(me)&&(ge.tagNameCheck instanceof RegExp&&mn(ge.tagNameCheck,me)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(me)))return!1;if(pt&&!he[me]){const Ie=j(U)||U.parentNode,ut=_(U)||U.childNodes;if(ut&&Ie){const Be=ut.length;for(let xt=Be-1;xt>=0;--xt){const _t=A(ut[xt],!0);_t.__removalCount=(U.__removalCount||0)+1,Ie.insertBefore(_t,k(U))}}}return P(U),!0}return U instanceof p&&!G(U)||(me==="noscript"||me==="noembed"||me==="noframes")&&mn(/<\/no(script|embed|frames)/i,U.innerHTML)?(P(U),!0):(Gt&&U.nodeType===Pr.text&&(ce=U.textContent,zu([F,V,ue],Ie=>{ce=Gr(ce,Ie," ")}),U.textContent!==ce&&(Fr(l.removed,{element:U.cloneNode()}),U.textContent=ce)),xe(q.afterSanitizeElements,U,null),!1)},Ne=function(U,ce,me){if(ze[ce]||hl&&(ce==="id"||ce==="name")&&(me in a||me in pl))return!1;if(!(At&&!ze[ce]&&mn(W,ce))){if(!(Oe&&mn(B,ce))){if(!(ve.attributeCheck instanceof Function&&ve.attributeCheck(ce,U))){if(!C[ce]||ze[ce]){if(!(De(U)&&(ge.tagNameCheck instanceof RegExp&&mn(ge.tagNameCheck,U)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(U))&&(ge.attributeNameCheck instanceof RegExp&&mn(ge.attributeNameCheck,ce)||ge.attributeNameCheck instanceof Function&&ge.attributeNameCheck(ce,U))||ce==="is"&&ge.allowCustomizedBuiltInElements&&(ge.tagNameCheck instanceof RegExp&&mn(ge.tagNameCheck,me)||ge.tagNameCheck instanceof Function&&ge.tagNameCheck(me))))return!1}else if(!qt[ce]){if(!mn(N,Gr(me,ie,""))){if(!((ce==="src"||ce==="xlink:href"||ce==="href")&&U!=="script"&&lk(me,"data:")===0&&Ue[U])){if(!(vn&&!mn(ee,Gr(me,ie,"")))){if(me)return!1}}}}}}}return!0},De=function(U){return U!=="annotation-xml"&&Uf(U,be)},Xe=function(U){xe(q.beforeSanitizeAttributes,U,null);const{attributes:ce}=U;if(!ce||we(U))return;const me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:C,forceKeepAttr:void 0};let Ie=ce.length;for(;Ie--;){const ut=ce[Ie],{name:Be,namespaceURI:xt,value:_t}=ut,Vt=Ct(Be),an=_t;let yt=Be==="value"?an:ak(an);if(me.attrName=Vt,me.attrValue=yt,me.keepAttr=!0,me.forceKeepAttr=void 0,xe(q.uponSanitizeAttribute,U,me),yt=me.attrValue,Wl&&(Vt==="id"||Vt==="name")&&(fe(Be,U),yt=Oa+yt),Qt&&mn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,yt)){fe(Be,U);continue}if(Vt==="attributename"&&Uf(yt,"href")){fe(Be,U);continue}if(me.forceKeepAttr)continue;if(!me.keepAttr){fe(Be,U);continue}if(!Et&&mn(/\/>/i,yt)){fe(Be,U);continue}Gt&&zu([F,V,ue],yl=>{yt=Gr(yt,yl," ")});const gl=Ct(U.nodeName);if(!Ne(gl,Vt,yt)){fe(Be,U);continue}if(J&&typeof S=="object"&&typeof S.getAttributeType=="function"&&!xt)switch(S.getAttributeType(gl,Vt)){case"TrustedHTML":{yt=J.createHTML(yt);break}case"TrustedScriptURL":{yt=J.createScriptURL(yt);break}}if(yt!==an)try{xt?U.setAttributeNS(xt,Be,yt):U.setAttribute(Be,yt),we(U)?P(U):iv(l.removed)}catch{fe(Be,U)}}xe(q.afterSanitizeAttributes,U,null)},$e=function Ee(U){let ce=null;const me=_e(U);for(xe(q.beforeSanitizeShadowDOM,U,null);ce=me.nextNode();)xe(q.uponSanitizeShadowNode,ce,null),ke(ce),Xe(ce),ce.content instanceof s&&Ee(ce.content);xe(q.afterSanitizeShadowDOM,U,null)};return l.sanitize=function(Ee){let U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ce=null,me=null,Ie=null,ut=null;if(fn=!Ee,fn&&(Ee="<!-->"),typeof Ee!="string"&&!Se(Ee))if(typeof Ee.toString=="function"){if(Ee=Ee.toString(),typeof Ee!="string")throw Yr("dirty is not a string, aborting")}else throw Yr("toString is not a function");if(!l.isSupported)return Ee;if(Yt||Ma(U),l.removed=[],typeof Ee=="string"&&(cn=!1),cn){if(Ee.nodeName){const _t=Ct(Ee.nodeName);if(!M[_t]||Te[_t])throw Yr("root node is forbidden and cannot be sanitized in-place")}}else if(Ee instanceof d)ce=ye("<!---->"),me=ce.ownerDocument.importNode(Ee,!0),me.nodeType===Pr.element&&me.nodeName==="BODY"||me.nodeName==="HTML"?ce=me:ce.appendChild(me);else{if(!Dn&&!Gt&&!nn&&Ee.indexOf("<")===-1)return J&&Nn?J.createHTML(Ee):Ee;if(ce=ye(Ee),!ce)return Dn?null:Nn?Q:""}ce&&dl&&P(ce.firstChild);const Be=_e(cn?Ee:ce);for(;Ie=Be.nextNode();)ke(Ie),Xe(Ie),Ie.content instanceof s&&$e(Ie.content);if(cn)return Ee;if(Dn){if(bn)for(ut=le.call(ce.ownerDocument);ce.firstChild;)ut.appendChild(ce.firstChild);else ut=ce;return(C.shadowroot||C.shadowrootmode)&&(ut=D.call(r,ut,!0)),ut}let xt=nn?ce.outerHTML:ce.innerHTML;return nn&&M["!doctype"]&&ce.ownerDocument&&ce.ownerDocument.doctype&&ce.ownerDocument.doctype.name&&mn(i0,ce.ownerDocument.doctype.name)&&(xt="<!DOCTYPE "+ce.ownerDocument.doctype.name+`>
|
|
189
|
-
`+xt),Gt&&zu([F,V,ue],_t=>{xt=Gr(xt,_t," ")}),J&&Nn?J.createHTML(xt):xt},l.setConfig=function(){let Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ma(Ee),Yt=!0},l.clearConfig=function(){Sn=null,Yt=!1},l.isValidAttribute=function(Ee,U,ce){Sn||Ma({});const me=Ct(Ee),Ie=Ct(U);return Ne(me,Ie,ce)},l.addHook=function(Ee,U){typeof U=="function"&&Fr(q[Ee],U)},l.removeHook=function(Ee,U){if(U!==void 0){const ce=tk(q[Ee],U);return ce===-1?void 0:nk(q[Ee],ce,1)[0]}return iv(q[Ee])},l.removeHooks=function(Ee){q[Ee]=[]},l.removeAllHooks=function(){q=fv()},l}var o0=r0();function bk(t,l){const a={};return(t[t.length-1]===""?[...t,""]:t).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const xk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ek={};function dv(t,l){return(Ek.jsx?Sk:xk).test(t)}const wk=/[ \t\n\f\r]/g;function Tk(t){return typeof t=="object"?t.type==="text"?hv(t.value):!1:hv(t)}function hv(t){return t.replace(wk,"")===""}class yo{constructor(l,a,r){this.normal=a,this.property=l,r&&(this.space=r)}}yo.prototype.normal={};yo.prototype.property={};yo.prototype.space=void 0;function u0(t,l){const a={},r={};for(const u of t)Object.assign(a,u.property),Object.assign(r,u.normal);return new yo(a,r,l)}function Sd(t){return t.toLowerCase()}class Rn{constructor(l,a){this.attribute=a,this.property=l}}Rn.prototype.attribute="";Rn.prototype.booleanish=!1;Rn.prototype.boolean=!1;Rn.prototype.commaOrSpaceSeparated=!1;Rn.prototype.commaSeparated=!1;Rn.prototype.defined=!1;Rn.prototype.mustUseProperty=!1;Rn.prototype.number=!1;Rn.prototype.overloadedBoolean=!1;Rn.prototype.property="";Rn.prototype.spaceSeparated=!1;Rn.prototype.space=void 0;let Ck=0;const Ge=li(),It=li(),Ed=li(),pe=li(),St=li(),Yi=li(),Hn=li();function li(){return 2**++Ck}const wd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:It,commaOrSpaceSeparated:Hn,commaSeparated:Yi,number:pe,overloadedBoolean:Ed,spaceSeparated:St},Symbol.toStringTag,{value:"Module"})),Ff=Object.keys(wd);class dh extends Rn{constructor(l,a,r,u){let s=-1;if(super(l,a),mv(this,"space",u),typeof r=="number")for(;++s<Ff.length;){const c=Ff[s];mv(this,Ff[s],(r&wd[c])===wd[c])}}}dh.prototype.defined=!0;function mv(t,l,a){a&&(t[l]=a)}function Xi(t){const l={},a={};for(const[r,u]of Object.entries(t.properties)){const s=new dh(r,t.transform(t.attributes||{},r),u,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),l[r]=s,a[Sd(r)]=r,a[Sd(s.attribute)]=r}return new yo(l,a,t.space)}const s0=Xi({properties:{ariaActiveDescendant:null,ariaAtomic:It,ariaAutoComplete:null,ariaBusy:It,ariaChecked:It,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:St,ariaCurrent:null,ariaDescribedBy:St,ariaDetails:null,ariaDisabled:It,ariaDropEffect:St,ariaErrorMessage:null,ariaExpanded:It,ariaFlowTo:St,ariaGrabbed:It,ariaHasPopup:null,ariaHidden:It,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:St,ariaLevel:pe,ariaLive:null,ariaModal:It,ariaMultiLine:It,ariaMultiSelectable:It,ariaOrientation:null,ariaOwns:St,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:It,ariaReadOnly:It,ariaRelevant:null,ariaRequired:It,ariaRoleDescription:St,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:It,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function c0(t,l){return l in t?t[l]:l}function f0(t,l){return c0(t,l.toLowerCase())}const kk=Xi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yi,acceptCharset:St,accessKey:St,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:St,autoFocus:Ge,autoPlay:Ge,blocking:St,capture:null,charSet:null,checked:Ge,cite:null,className:St,cols:pe,colSpan:null,content:null,contentEditable:It,controls:Ge,controlsList:St,coords:pe|Yi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Ed,draggable:It,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:St,height:pe,hidden:Ed,high:pe,href:null,hrefLang:null,htmlFor:St,httpEquiv:St,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:St,itemRef:St,itemScope:Ge,itemType:St,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,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:Ge,optimum:pe,pattern:null,ping:St,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:St,required:Ge,reversed:Ge,rows:pe,rowSpan:pe,sandbox:St,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:It,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:It,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:St,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:It,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:f0}),Ak=Xi({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:Hn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:St,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Yi,g2:Yi,glyphName:Yi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Hn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:St,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hn,rev:Hn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hn,requiredFeatures:Hn,requiredFonts:Hn,requiredFormats:Hn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Hn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Hn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Hn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:c0}),d0=Xi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,l){return"xlink:"+l.slice(5).toLowerCase()}}),h0=Xi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:f0}),m0=Xi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),_k={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"},Rk=/[A-Z]/g,pv=/-[a-z]/g,Dk=/^data[-\w.:]+$/i;function Nk(t,l){const a=Sd(l);let r=l,u=Rn;if(a in t.normal)return t.property[t.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&Dk.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(pv,Ok);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!pv.test(s)){let c=s.replace(Rk,jk);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}u=dh}return new u(r,l)}function jk(t){return"-"+t.toLowerCase()}function Ok(t){return t.charAt(1).toUpperCase()}const Mk=u0([s0,kk,d0,h0,m0],"html"),hh=u0([s0,Ak,d0,h0,m0],"svg");function zk(t){return t.join(" ").trim()}var Bi={},Gf,gv;function Lk(){if(gv)return Gf;gv=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,a=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
|
|
190
|
-
`,h="/",y="*",g="",b="comment",S="declaration";function E(R,k){if(typeof R!="string")throw new TypeError("First argument must be a string");if(!R)return[];k=k||{};var _=1,j=1;function J(ue){var W=ue.match(l);W&&(_+=W.length);var B=ue.lastIndexOf(p);j=~B?ue.length-B:j+ue.length}function Q(){var ue={line:_,column:j};return function(W){return W.position=new I(ue),ne(),W}}function I(ue){this.start=ue,this.end={line:_,column:j},this.source=k.source}I.prototype.content=R;function O(ue){var W=new Error(k.source+":"+_+":"+j+": "+ue);if(W.reason=ue,W.filename=k.source,W.line=_,W.column=j,W.source=R,!k.silent)throw W}function le(ue){var W=ue.exec(R);if(W){var B=W[0];return J(B),R=R.slice(B.length),W}}function ne(){le(a)}function D(ue){var W;for(ue=ue||[];W=q();)W!==!1&&ue.push(W);return ue}function q(){var ue=Q();if(!(h!=R.charAt(0)||y!=R.charAt(1))){for(var W=2;g!=R.charAt(W)&&(y!=R.charAt(W)||h!=R.charAt(W+1));)++W;if(W+=2,g===R.charAt(W-1))return O("End of comment missing");var B=R.slice(2,W-2);return j+=2,J(B),R=R.slice(W),j+=2,ue({type:b,comment:B})}}function F(){var ue=Q(),W=le(r);if(W){if(q(),!le(u))return O("property missing ':'");var B=le(s),ee=ue({type:S,property:A(W[0].replace(t,g)),value:B?A(B[0].replace(t,g)):g});return le(c),ee}}function V(){var ue=[];D(ue);for(var W;W=F();)W!==!1&&(ue.push(W),D(ue));return ue}return ne(),V()}function A(R){return R?R.replace(d,g):g}return Gf=E,Gf}var yv;function Uk(){if(yv)return Bi;yv=1;var t=Bi&&Bi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.default=a;const l=t(Lk());function a(r,u){let s=null;if(!r||typeof r!="string")return s;const c=(0,l.default)(r),d=typeof u=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:h,value:y}=p;d?u(h,y,p):y&&(s=s||{},s[h]=y)}),s}return Bi}var Xr={},vv;function Bk(){if(vv)return Xr;vv=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,a=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,s=function(h){return!h||a.test(h)||t.test(h)},c=function(h,y){return y.toUpperCase()},d=function(h,y){return"".concat(y,"-")},p=function(h,y){return y===void 0&&(y={}),s(h)?h:(h=h.toLowerCase(),y.reactCompat?h=h.replace(u,d):h=h.replace(r,d),h.replace(l,c))};return Xr.camelCase=p,Xr}var $r,bv;function Hk(){if(bv)return $r;bv=1;var t=$r&&$r.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},l=t(Uk()),a=Bk();function r(u,s){var c={};return!u||typeof u!="string"||(0,l.default)(u,function(d,p){d&&p&&(c[(0,a.camelCase)(d,s)]=p)}),c}return r.default=r,$r=r,$r}var Ik=Hk();const qk=Bd(Ik),p0=g0("end"),mh=g0("start");function g0(t){return l;function l(a){const r=a&&a.position&&a.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Fk(t){const l=mh(t),a=p0(t);if(l&&a)return{start:l,end:a}}function eo(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?xv(t.position):"start"in t||"end"in t?xv(t):"line"in t||"column"in t?Td(t):""}function Td(t){return Sv(t&&t.line)+":"+Sv(t&&t.column)}function xv(t){return Td(t&&t.start)+"-"+Td(t&&t.end)}function Sv(t){return t&&typeof t=="number"?t:1}class sn extends Error{constructor(l,a,r){super(),typeof a=="string"&&(r=a,a=void 0);let u="",s={},c=!1;if(a&&("line"in a&&"column"in a?s={place:a}:"start"in a&&"end"in a?s={place:a}:"type"in a?s={ancestors:[a],place:a.position}:s={...a}),typeof l=="string"?u=l:!s.cause&&l&&(c=!0,u=l.message,s.cause=l),!s.ruleId&&!s.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?s.ruleId=r:(s.source=r.slice(0,p),s.ruleId=r.slice(p+1))}if(!s.place&&s.ancestors&&s.ancestors){const p=s.ancestors[s.ancestors.length-1];p&&(s.place=p.position)}const d=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=u,this.line=d?d.line:void 0,this.name=eo(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}sn.prototype.file="";sn.prototype.name="";sn.prototype.reason="";sn.prototype.message="";sn.prototype.stack="";sn.prototype.column=void 0;sn.prototype.line=void 0;sn.prototype.ancestors=void 0;sn.prototype.cause=void 0;sn.prototype.fatal=void 0;sn.prototype.place=void 0;sn.prototype.ruleId=void 0;sn.prototype.source=void 0;const ph={}.hasOwnProperty,Gk=new Map,Yk=/[A-Z]/g,Vk=new Set(["table","tbody","thead","tfoot","tr"]),Pk=new Set(["td","th"]),y0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Xk(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=l.filePath||void 0;let r;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=tA(a,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=eA(a,l.jsx,l.jsxs)}const u={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:r,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?hh:Mk,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=v0(u,t,void 0);return s&&typeof s!="string"?s:u.create(t,u.Fragment,{children:s||void 0},void 0)}function v0(t,l,a){if(l.type==="element")return $k(t,l,a);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return Qk(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return Zk(t,l,a);if(l.type==="mdxjsEsm")return Kk(t,l);if(l.type==="root")return Jk(t,l,a);if(l.type==="text")return Wk(t,l)}function $k(t,l,a){const r=t.schema;let u=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(u=hh,t.schema=u),t.ancestors.push(l);const s=x0(t,l.tagName,!1),c=nA(t,l);let d=yh(t,l);return Vk.has(l.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!Tk(p):!0})),b0(t,c,s,l),gh(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,a)}function Qk(t,l){if(l.data&&l.data.estree&&t.evaluater){const r=l.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}oo(t,l.position)}function Kk(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);oo(t,l.position)}function Zk(t,l,a){const r=t.schema;let u=r;l.name==="svg"&&r.space==="html"&&(u=hh,t.schema=u),t.ancestors.push(l);const s=l.name===null?t.Fragment:x0(t,l.name,!0),c=lA(t,l),d=yh(t,l);return b0(t,c,s,l),gh(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,a)}function Jk(t,l,a){const r={};return gh(r,yh(t,l)),t.create(l,t.Fragment,r,a)}function Wk(t,l){return l.value}function b0(t,l,a,r){typeof a!="string"&&a!==t.Fragment&&t.passNode&&(l.node=r)}function gh(t,l){if(l.length>0){const a=l.length>1?l:l[0];a&&(t.children=a)}}function eA(t,l,a){return r;function r(u,s,c,d){const h=Array.isArray(c.children)?a:l;return d?h(s,c,d):h(s,c)}}function tA(t,l){return a;function a(r,u,s,c){const d=Array.isArray(s.children),p=mh(r);return l(u,s,c,d,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function nA(t,l){const a={};let r,u;for(u in l.properties)if(u!=="children"&&ph.call(l.properties,u)){const s=aA(t,u,l.properties[u]);if(s){const[c,d]=s;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&Pk.has(l.tagName)?r=d:a[c]=d}}if(r){const s=a.style||(a.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return a}function lA(t,l){const a={};for(const r of l.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const c=s.expression;c.type;const d=c.properties[0];d.type,Object.assign(a,t.evaluater.evaluateExpression(d.argument))}else oo(t,l.position);else{const u=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const d=r.value.data.estree.body[0];d.type,s=t.evaluater.evaluateExpression(d.expression)}else oo(t,l.position);else s=r.value===null?!0:r.value;a[u]=s}return a}function yh(t,l){const a=[];let r=-1;const u=t.passKeys?new Map:Gk;for(;++r<l.children.length;){const s=l.children[r];let c;if(t.passKeys){const p=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(p){const h=u.get(p)||0;c=p+"-"+h,u.set(p,h+1)}}const d=v0(t,s,c);d!==void 0&&a.push(d)}return a}function aA(t,l,a){const r=Nk(t.schema,l);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=r.commaSeparated?bk(a):zk(a)),r.property==="style"){let u=typeof a=="object"?a:iA(t,String(a));return t.stylePropertyNameCase==="css"&&(u=rA(u)),["style",u]}return[t.elementAttributeNameCase==="react"&&r.space?_k[r.property]||r.property:r.attribute,a]}}function iA(t,l){try{return qk(l,{reactCompat:!0})}catch(a){if(t.ignoreInvalidStyle)return{};const r=a,u=new sn("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw u.file=t.filePath||void 0,u.url=y0+"#cannot-parse-style-attribute",u}}function x0(t,l,a){let r;if(!a)r={type:"Literal",value:l};else if(l.includes(".")){const u=l.split(".");let s=-1,c;for(;++s<u.length;){const d=dv(u[s])?{type:"Identifier",name:u[s]}:{type:"Literal",value:u[s]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}r=c}else r=dv(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const u=r.value;return ph.call(t.components,u)?t.components[u]:u}if(t.evaluater)return t.evaluater.evaluateExpression(r);oo(t)}function oo(t,l){const a=new sn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=t.filePath||void 0,a.url=y0+"#cannot-handle-mdx-estrees-without-createevaluater",a}function rA(t){const l={};let a;for(a in t)ph.call(t,a)&&(l[oA(a)]=t[a]);return l}function oA(t){let l=t.replace(Yk,uA);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function uA(t){return"-"+t.toLowerCase()}const Yf={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"]},sA={};function vh(t,l){const a=sA,r=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,u=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return S0(t,r,u)}function S0(t,l,a){if(cA(t)){if("value"in t)return t.type==="html"&&!a?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Ev(t.children,l,a)}return Array.isArray(t)?Ev(t,l,a):""}function Ev(t,l,a){const r=[];let u=-1;for(;++u<t.length;)r[u]=S0(t[u],l,a);return r.join("")}function cA(t){return!!(t&&typeof t=="object")}const wv=document.createElement("i");function bh(t){const l="&"+t+";";wv.innerHTML=l;const a=wv.textContent;return a.charCodeAt(a.length-1)===59&&t!=="semi"||a===l?!1:a}function Fn(t,l,a,r){const u=t.length;let s=0,c;if(l<0?l=-l>u?0:u+l:l=l>u?u:l,a=a>0?a:0,r.length<1e4)c=Array.from(r),c.unshift(l,a),t.splice(...c);else for(a&&t.splice(l,a);s<r.length;)c=r.slice(s,s+1e4),c.unshift(l,0),t.splice(...c),s+=1e4,l+=1e4}function el(t,l){return t.length>0?(Fn(t,t.length,0,l),t):l}const Tv={}.hasOwnProperty;function E0(t){const l={};let a=-1;for(;++a<t.length;)fA(l,t[a]);return l}function fA(t,l){let a;for(a in l){const u=(Tv.call(t,a)?t[a]:void 0)||(t[a]={}),s=l[a];let c;if(s)for(c in s){Tv.call(u,c)||(u[c]=[]);const d=s[c];dA(u[c],Array.isArray(d)?d:d?[d]:[])}}}function dA(t,l){let a=-1;const r=[];for(;++a<l.length;)(l[a].add==="after"?t:r).push(l[a]);Fn(t,0,0,r)}function w0(t,l){const a=Number.parseInt(t,l);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function sl(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pn=ja(/[A-Za-z]/),un=ja(/[\dA-Za-z]/),hA=ja(/[#-'*+\--9=?A-Z^-~]/);function Wu(t){return t!==null&&(t<32||t===127)}const Cd=ja(/\d/),mA=ja(/[\dA-Fa-f]/),pA=ja(/[!-/:-@[-`{-~]/);function Me(t){return t!==null&&t<-2}function bt(t){return t!==null&&(t<0||t===32)}function Ze(t){return t===-2||t===-1||t===32}const ds=ja(new RegExp("\\p{P}|\\p{S}","u")),ti=ja(/\s/);function ja(t){return l;function l(a){return a!==null&&a>-1&&t.test(String.fromCharCode(a))}}function $i(t){const l=[];let a=-1,r=0,u=0;for(;++a<t.length;){const s=t.charCodeAt(a);let c="";if(s===37&&un(t.charCodeAt(a+1))&&un(t.charCodeAt(a+2)))u=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const d=t.charCodeAt(a+1);s<56320&&d>56319&&d<57344?(c=String.fromCharCode(s,d),u=1):c="�"}else c=String.fromCharCode(s);c&&(l.push(t.slice(r,a),encodeURIComponent(c)),r=a+u+1,c=""),u&&(a+=u,u=0)}return l.join("")+t.slice(r)}function it(t,l,a,r){const u=r?r-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(p){return Ze(p)?(t.enter(a),d(p)):l(p)}function d(p){return Ze(p)&&s++<u?(t.consume(p),d):(t.exit(a),l(p))}}const gA={tokenize:yA};function yA(t){const l=t.attempt(this.parser.constructs.contentInitial,r,u);let a;return l;function r(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),it(t,l,"linePrefix")}function u(d){return t.enter("paragraph"),s(d)}function s(d){const p=t.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=p),a=p,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return Me(d)?(t.consume(d),t.exit("chunkText"),s):(t.consume(d),c)}}const vA={tokenize:bA},Cv={tokenize:xA};function bA(t){const l=this,a=[];let r=0,u,s,c;return d;function d(j){if(r<a.length){const J=a[r];return l.containerState=J[1],t.attempt(J[0].continuation,p,h)(j)}return h(j)}function p(j){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,u&&_();const J=l.events.length;let Q=J,I;for(;Q--;)if(l.events[Q][0]==="exit"&&l.events[Q][1].type==="chunkFlow"){I=l.events[Q][1].end;break}k(r);let O=J;for(;O<l.events.length;)l.events[O][1].end={...I},O++;return Fn(l.events,Q+1,0,l.events.slice(J)),l.events.length=O,h(j)}return d(j)}function h(j){if(r===a.length){if(!u)return b(j);if(u.currentConstruct&&u.currentConstruct.concrete)return E(j);l.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Cv,y,g)(j)}function y(j){return u&&_(),k(r),b(j)}function g(j){return l.parser.lazy[l.now().line]=r!==a.length,c=l.now().offset,E(j)}function b(j){return l.containerState={},t.attempt(Cv,S,E)(j)}function S(j){return r++,a.push([l.currentConstruct,l.containerState]),b(j)}function E(j){if(j===null){u&&_(),k(0),t.consume(j);return}return u=u||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:s}),A(j)}function A(j){if(j===null){R(t.exit("chunkFlow"),!0),k(0),t.consume(j);return}return Me(j)?(t.consume(j),R(t.exit("chunkFlow")),r=0,l.interrupt=void 0,d):(t.consume(j),A)}function R(j,J){const Q=l.sliceStream(j);if(J&&Q.push(null),j.previous=s,s&&(s.next=j),s=j,u.defineSkip(j.start),u.write(Q),l.parser.lazy[j.start.line]){let I=u.events.length;for(;I--;)if(u.events[I][1].start.offset<c&&(!u.events[I][1].end||u.events[I][1].end.offset>c))return;const O=l.events.length;let le=O,ne,D;for(;le--;)if(l.events[le][0]==="exit"&&l.events[le][1].type==="chunkFlow"){if(ne){D=l.events[le][1].end;break}ne=!0}for(k(r),I=O;I<l.events.length;)l.events[I][1].end={...D},I++;Fn(l.events,le+1,0,l.events.slice(O)),l.events.length=I}}function k(j){let J=a.length;for(;J-- >j;){const Q=a[J];l.containerState=Q[1],Q[0].exit.call(l,t)}a.length=j}function _(){u.write([null]),s=void 0,u=void 0,l.containerState._closeFlow=void 0}}function xA(t,l,a){return it(t,t.attempt(this.parser.constructs.document,l,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Pi(t){if(t===null||bt(t)||ti(t))return 1;if(ds(t))return 2}function hs(t,l,a){const r=[];let u=-1;for(;++u<t.length;){const s=t[u].resolveAll;s&&!r.includes(s)&&(l=s(l,a),r.push(s))}return l}const kd={name:"attention",resolveAll:SA,tokenize:EA};function SA(t,l){let a=-1,r,u,s,c,d,p,h,y;for(;++a<t.length;)if(t[a][0]==="enter"&&t[a][1].type==="attentionSequence"&&t[a][1]._close){for(r=a;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&l.sliceSerialize(t[r][1]).charCodeAt(0)===l.sliceSerialize(t[a][1]).charCodeAt(0)){if((t[r][1]._close||t[a][1]._open)&&(t[a][1].end.offset-t[a][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[a][1].end.offset-t[a][1].start.offset)%3))continue;p=t[r][1].end.offset-t[r][1].start.offset>1&&t[a][1].end.offset-t[a][1].start.offset>1?2:1;const g={...t[r][1].end},b={...t[a][1].start};kv(g,-p),kv(b,p),c={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...t[r][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...t[a][1].start},end:b},s={type:p>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[a][1].start}},u={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[r][1].end={...c.start},t[a][1].start={...d.end},h=[],t[r][1].end.offset-t[r][1].start.offset&&(h=el(h,[["enter",t[r][1],l],["exit",t[r][1],l]])),h=el(h,[["enter",u,l],["enter",c,l],["exit",c,l],["enter",s,l]]),h=el(h,hs(l.parser.constructs.insideSpan.null,t.slice(r+1,a),l)),h=el(h,[["exit",s,l],["enter",d,l],["exit",d,l],["exit",u,l]]),t[a][1].end.offset-t[a][1].start.offset?(y=2,h=el(h,[["enter",t[a][1],l],["exit",t[a][1],l]])):y=0,Fn(t,r-1,a-r+3,h),a=r+h.length-y-2;break}}for(a=-1;++a<t.length;)t[a][1].type==="attentionSequence"&&(t[a][1].type="data");return t}function EA(t,l){const a=this.parser.constructs.attentionMarkers.null,r=this.previous,u=Pi(r);let s;return c;function c(p){return s=p,t.enter("attentionSequence"),d(p)}function d(p){if(p===s)return t.consume(p),d;const h=t.exit("attentionSequence"),y=Pi(p),g=!y||y===2&&u||a.includes(p),b=!u||u===2&&y||a.includes(r);return h._open=!!(s===42?g:g&&(u||!b)),h._close=!!(s===42?b:b&&(y||!g)),l(p)}}function kv(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const wA={name:"autolink",tokenize:TA};function TA(t,l,a){let r=0;return u;function u(S){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(S){return pn(S)?(t.consume(S),c):S===64?a(S):h(S)}function c(S){return S===43||S===45||S===46||un(S)?(r=1,d(S)):h(S)}function d(S){return S===58?(t.consume(S),r=0,p):(S===43||S===45||S===46||un(S))&&r++<32?(t.consume(S),d):(r=0,h(S))}function p(S){return S===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),l):S===null||S===32||S===60||Wu(S)?a(S):(t.consume(S),p)}function h(S){return S===64?(t.consume(S),y):hA(S)?(t.consume(S),h):a(S)}function y(S){return un(S)?g(S):a(S)}function g(S){return S===46?(t.consume(S),r=0,y):S===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),l):b(S)}function b(S){if((S===45||un(S))&&r++<63){const E=S===45?b:g;return t.consume(S),E}return a(S)}}const vo={partial:!0,tokenize:CA};function CA(t,l,a){return r;function r(s){return Ze(s)?it(t,u,"linePrefix")(s):u(s)}function u(s){return s===null||Me(s)?l(s):a(s)}}const T0={continuation:{tokenize:AA},exit:_A,name:"blockQuote",tokenize:kA};function kA(t,l,a){const r=this;return u;function u(c){if(c===62){const d=r.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),s}return a(c)}function s(c){return Ze(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(c))}}function AA(t,l,a){const r=this;return u;function u(c){return Ze(c)?it(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return t.attempt(T0,l,a)(c)}}function _A(t){t.exit("blockQuote")}const C0={name:"characterEscape",tokenize:RA};function RA(t,l,a){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),u}function u(s){return pA(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):a(s)}}const k0={name:"characterReference",tokenize:DA};function DA(t,l,a){const r=this;let u=0,s,c;return d;function d(g){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),p}function p(g){return g===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(g),t.exit("characterReferenceMarkerNumeric"),h):(t.enter("characterReferenceValue"),s=31,c=un,y(g))}function h(g){return g===88||g===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(g),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,c=mA,y):(t.enter("characterReferenceValue"),s=7,c=Cd,y(g))}function y(g){if(g===59&&u){const b=t.exit("characterReferenceValue");return c===un&&!bh(r.sliceSerialize(b))?a(g):(t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return c(g)&&u++<s?(t.consume(g),y):a(g)}}const Av={partial:!0,tokenize:jA},_v={concrete:!0,name:"codeFenced",tokenize:NA};function NA(t,l,a){const r=this,u={partial:!0,tokenize:Q};let s=0,c=0,d;return p;function p(I){return h(I)}function h(I){const O=r.events[r.events.length-1];return s=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,d=I,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(I)}function y(I){return I===d?(c++,t.consume(I),y):c<3?a(I):(t.exit("codeFencedFenceSequence"),Ze(I)?it(t,g,"whitespace")(I):g(I))}function g(I){return I===null||Me(I)?(t.exit("codeFencedFence"),r.interrupt?l(I):t.check(Av,A,J)(I)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),b(I))}function b(I){return I===null||Me(I)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),g(I)):Ze(I)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),it(t,S,"whitespace")(I)):I===96&&I===d?a(I):(t.consume(I),b)}function S(I){return I===null||Me(I)?g(I):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),E(I))}function E(I){return I===null||Me(I)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),g(I)):I===96&&I===d?a(I):(t.consume(I),E)}function A(I){return t.attempt(u,J,R)(I)}function R(I){return t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),k}function k(I){return s>0&&Ze(I)?it(t,_,"linePrefix",s+1)(I):_(I)}function _(I){return I===null||Me(I)?t.check(Av,A,J)(I):(t.enter("codeFlowValue"),j(I))}function j(I){return I===null||Me(I)?(t.exit("codeFlowValue"),_(I)):(t.consume(I),j)}function J(I){return t.exit("codeFenced"),l(I)}function Q(I,O,le){let ne=0;return D;function D(W){return I.enter("lineEnding"),I.consume(W),I.exit("lineEnding"),q}function q(W){return I.enter("codeFencedFence"),Ze(W)?it(I,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):F(W)}function F(W){return W===d?(I.enter("codeFencedFenceSequence"),V(W)):le(W)}function V(W){return W===d?(ne++,I.consume(W),V):ne>=c?(I.exit("codeFencedFenceSequence"),Ze(W)?it(I,ue,"whitespace")(W):ue(W)):le(W)}function ue(W){return W===null||Me(W)?(I.exit("codeFencedFence"),O(W)):le(W)}}}function jA(t,l,a){const r=this;return u;function u(c){return c===null?a(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s)}function s(c){return r.parser.lazy[r.now().line]?a(c):l(c)}}const Vf={name:"codeIndented",tokenize:MA},OA={partial:!0,tokenize:zA};function MA(t,l,a){const r=this;return u;function u(h){return t.enter("codeIndented"),it(t,s,"linePrefix",5)(h)}function s(h){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(h):a(h)}function c(h){return h===null?p(h):Me(h)?t.attempt(OA,c,p)(h):(t.enter("codeFlowValue"),d(h))}function d(h){return h===null||Me(h)?(t.exit("codeFlowValue"),c(h)):(t.consume(h),d)}function p(h){return t.exit("codeIndented"),l(h)}}function zA(t,l,a){const r=this;return u;function u(c){return r.parser.lazy[r.now().line]?a(c):Me(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u):it(t,s,"linePrefix",5)(c)}function s(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):Me(c)?u(c):a(c)}}const LA={name:"codeText",previous:BA,resolve:UA,tokenize:HA};function UA(t){let l=t.length-4,a=3,r,u;if((t[a][1].type==="lineEnding"||t[a][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(r=a;++r<l;)if(t[r][1].type==="codeTextData"){t[a][1].type="codeTextPadding",t[l][1].type="codeTextPadding",a+=2,l-=2;break}}for(r=a-1,l++;++r<=l;)u===void 0?r!==l&&t[r][1].type!=="lineEnding"&&(u=r):(r===l||t[r][1].type==="lineEnding")&&(t[u][1].type="codeTextData",r!==u+2&&(t[u][1].end=t[r-1][1].end,t.splice(u+2,r-u-2),l-=r-u-2,r=u+2),u=void 0);return t}function BA(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function HA(t,l,a){let r=0,u,s;return c;function c(g){return t.enter("codeText"),t.enter("codeTextSequence"),d(g)}function d(g){return g===96?(t.consume(g),r++,d):(t.exit("codeTextSequence"),p(g))}function p(g){return g===null?a(g):g===32?(t.enter("space"),t.consume(g),t.exit("space"),p):g===96?(s=t.enter("codeTextSequence"),u=0,y(g)):Me(g)?(t.enter("lineEnding"),t.consume(g),t.exit("lineEnding"),p):(t.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||Me(g)?(t.exit("codeTextData"),p(g)):(t.consume(g),h)}function y(g){return g===96?(t.consume(g),u++,y):u===r?(t.exit("codeTextSequence"),t.exit("codeText"),l(g)):(s.type="codeTextData",h(g))}}class IA{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,a){const r=a??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(l,r):l>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(l,a,r){const u=a||0;this.setCursor(Math.trunc(l));const s=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return r&&Qr(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),Qr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),Qr(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const a=this.left.splice(l,Number.POSITIVE_INFINITY);Qr(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);Qr(this.left,a.reverse())}}}function Qr(t,l){let a=0;if(l.length<1e4)t.push(...l);else for(;a<l.length;)t.push(...l.slice(a,a+1e4)),a+=1e4}function A0(t){const l={};let a=-1,r,u,s,c,d,p,h;const y=new IA(t);for(;++a<y.length;){for(;a in l;)a=l[a];if(r=y.get(a),a&&r[1].type==="chunkFlow"&&y.get(a-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,s=0,s<p.length&&p[s][1].type==="lineEndingBlank"&&(s+=2),s<p.length&&p[s][1].type==="content"))for(;++s<p.length&&p[s][1].type!=="content";)p[s][1].type==="chunkText"&&(p[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(l,qA(y,a)),a=l[a],h=!0);else if(r[1]._container){for(s=a,u=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(u&&(y.get(u)[1].type="lineEndingBlank"),c[1].type="lineEnding",u=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;u&&(r[1].end={...y.get(u)[1].start},d=y.slice(u,a),d.unshift(r),y.splice(u,a-u+1,d))}}return Fn(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!h}function qA(t,l){const a=t.get(l)[1],r=t.get(l)[2];let u=l-1;const s=[];let c=a._tokenizer;c||(c=r.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],h={};let y,g,b=-1,S=a,E=0,A=0;const R=[A];for(;S;){for(;t.get(++u)[1]!==S;);s.push(u),S._tokenizer||(y=r.sliceStream(S),S.next||y.push(null),g&&c.defineSkip(S.start),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=S,S=S.next}for(S=a;++b<d.length;)d[b][0]==="exit"&&d[b-1][0]==="enter"&&d[b][1].type===d[b-1][1].type&&d[b][1].start.line!==d[b][1].end.line&&(A=b+1,R.push(A),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(c.events=[],S?(S._tokenizer=void 0,S.previous=void 0):R.pop(),b=R.length;b--;){const k=d.slice(R[b],R[b+1]),_=s.pop();p.push([_,_+k.length-1]),t.splice(_,2,k)}for(p.reverse(),b=-1;++b<p.length;)h[E+p[b][0]]=E+p[b][1],E+=p[b][1]-p[b][0]-1;return h}const FA={resolve:YA,tokenize:VA},GA={partial:!0,tokenize:PA};function YA(t){return A0(t),t}function VA(t,l){let a;return r;function r(d){return t.enter("content"),a=t.enter("chunkContent",{contentType:"content"}),u(d)}function u(d){return d===null?s(d):Me(d)?t.check(GA,c,s)(d):(t.consume(d),u)}function s(d){return t.exit("chunkContent"),t.exit("content"),l(d)}function c(d){return t.consume(d),t.exit("chunkContent"),a.next=t.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,u}}function PA(t,l,a){const r=this;return u;function u(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),it(t,s,"linePrefix")}function s(c){if(c===null||Me(c))return a(c);const d=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):t.interrupt(r.parser.constructs.flow,a,l)(c)}}function _0(t,l,a,r,u,s,c,d,p){const h=p||Number.POSITIVE_INFINITY;let y=0;return g;function g(k){return k===60?(t.enter(r),t.enter(u),t.enter(s),t.consume(k),t.exit(s),b):k===null||k===32||k===41||Wu(k)?a(k):(t.enter(r),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),A(k))}function b(k){return k===62?(t.enter(s),t.consume(k),t.exit(s),t.exit(u),t.exit(r),l):(t.enter(d),t.enter("chunkString",{contentType:"string"}),S(k))}function S(k){return k===62?(t.exit("chunkString"),t.exit(d),b(k)):k===null||k===60||Me(k)?a(k):(t.consume(k),k===92?E:S)}function E(k){return k===60||k===62||k===92?(t.consume(k),S):S(k)}function A(k){return!y&&(k===null||k===41||bt(k))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(r),l(k)):y<h&&k===40?(t.consume(k),y++,A):k===41?(t.consume(k),y--,A):k===null||k===32||k===40||Wu(k)?a(k):(t.consume(k),k===92?R:A)}function R(k){return k===40||k===41||k===92?(t.consume(k),A):A(k)}}function R0(t,l,a,r,u,s){const c=this;let d=0,p;return h;function h(S){return t.enter(r),t.enter(u),t.consume(S),t.exit(u),t.enter(s),y}function y(S){return d>999||S===null||S===91||S===93&&!p||S===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?a(S):S===93?(t.exit(s),t.enter(u),t.consume(S),t.exit(u),t.exit(r),l):Me(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||S===91||S===93||Me(S)||d++>999?(t.exit("chunkString"),y(S)):(t.consume(S),p||(p=!Ze(S)),S===92?b:g)}function b(S){return S===91||S===92||S===93?(t.consume(S),d++,g):g(S)}}function D0(t,l,a,r,u,s){let c;return d;function d(b){return b===34||b===39||b===40?(t.enter(r),t.enter(u),t.consume(b),t.exit(u),c=b===40?41:b,p):a(b)}function p(b){return b===c?(t.enter(u),t.consume(b),t.exit(u),t.exit(r),l):(t.enter(s),h(b))}function h(b){return b===c?(t.exit(s),p(c)):b===null?a(b):Me(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),it(t,h,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===c||b===null||Me(b)?(t.exit("chunkString"),h(b)):(t.consume(b),b===92?g:y)}function g(b){return b===c||b===92?(t.consume(b),y):y(b)}}function to(t,l){let a;return r;function r(u){return Me(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),a=!0,r):Ze(u)?it(t,r,a?"linePrefix":"lineSuffix")(u):l(u)}}const XA={name:"definition",tokenize:QA},$A={partial:!0,tokenize:KA};function QA(t,l,a){const r=this;let u;return s;function s(S){return t.enter("definition"),c(S)}function c(S){return R0.call(r,t,d,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function d(S){return u=sl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),p):a(S)}function p(S){return bt(S)?to(t,h)(S):h(S)}function h(S){return _0(t,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function y(S){return t.attempt($A,g,g)(S)}function g(S){return Ze(S)?it(t,b,"whitespace")(S):b(S)}function b(S){return S===null||Me(S)?(t.exit("definition"),r.parser.defined.push(u),l(S)):a(S)}}function KA(t,l,a){return r;function r(d){return bt(d)?to(t,u)(d):a(d)}function u(d){return D0(t,s,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return Ze(d)?it(t,c,"whitespace")(d):c(d)}function c(d){return d===null||Me(d)?l(d):a(d)}}const ZA={name:"hardBreakEscape",tokenize:JA};function JA(t,l,a){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),u}function u(s){return Me(s)?(t.exit("hardBreakEscape"),l(s)):a(s)}}const WA={name:"headingAtx",resolve:e_,tokenize:t_};function e_(t,l){let a=t.length-2,r=3,u,s;return t[r][1].type==="whitespace"&&(r+=2),a-2>r&&t[a][1].type==="whitespace"&&(a-=2),t[a][1].type==="atxHeadingSequence"&&(r===a-1||a-4>r&&t[a-2][1].type==="whitespace")&&(a-=r+1===a?2:4),a>r&&(u={type:"atxHeadingText",start:t[r][1].start,end:t[a][1].end},s={type:"chunkText",start:t[r][1].start,end:t[a][1].end,contentType:"text"},Fn(t,r,a-r+1,[["enter",u,l],["enter",s,l],["exit",s,l],["exit",u,l]])),t}function t_(t,l,a){let r=0;return u;function u(y){return t.enter("atxHeading"),s(y)}function s(y){return t.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&r++<6?(t.consume(y),c):y===null||bt(y)?(t.exit("atxHeadingSequence"),d(y)):a(y)}function d(y){return y===35?(t.enter("atxHeadingSequence"),p(y)):y===null||Me(y)?(t.exit("atxHeading"),l(y)):Ze(y)?it(t,d,"whitespace")(y):(t.enter("atxHeadingText"),h(y))}function p(y){return y===35?(t.consume(y),p):(t.exit("atxHeadingSequence"),d(y))}function h(y){return y===null||y===35||bt(y)?(t.exit("atxHeadingText"),d(y)):(t.consume(y),h)}}const n_=["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"],Rv=["pre","script","style","textarea"],l_={concrete:!0,name:"htmlFlow",resolveTo:r_,tokenize:o_},a_={partial:!0,tokenize:s_},i_={partial:!0,tokenize:u_};function r_(t){let l=t.length;for(;l--&&!(t[l][0]==="enter"&&t[l][1].type==="htmlFlow"););return l>1&&t[l-2][1].type==="linePrefix"&&(t[l][1].start=t[l-2][1].start,t[l+1][1].start=t[l-2][1].start,t.splice(l-2,2)),t}function o_(t,l,a){const r=this;let u,s,c,d,p;return h;function h(C){return y(C)}function y(C){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(C),g}function g(C){return C===33?(t.consume(C),b):C===47?(t.consume(C),s=!0,A):C===63?(t.consume(C),u=3,r.interrupt?l:N):pn(C)?(t.consume(C),c=String.fromCharCode(C),R):a(C)}function b(C){return C===45?(t.consume(C),u=2,S):C===91?(t.consume(C),u=5,d=0,E):pn(C)?(t.consume(C),u=4,r.interrupt?l:N):a(C)}function S(C){return C===45?(t.consume(C),r.interrupt?l:N):a(C)}function E(C){const de="CDATA[";return C===de.charCodeAt(d++)?(t.consume(C),d===de.length?r.interrupt?l:F:E):a(C)}function A(C){return pn(C)?(t.consume(C),c=String.fromCharCode(C),R):a(C)}function R(C){if(C===null||C===47||C===62||bt(C)){const de=C===47,ge=c.toLowerCase();return!de&&!s&&Rv.includes(ge)?(u=1,r.interrupt?l(C):F(C)):n_.includes(c.toLowerCase())?(u=6,de?(t.consume(C),k):r.interrupt?l(C):F(C)):(u=7,r.interrupt&&!r.parser.lazy[r.now().line]?a(C):s?_(C):j(C))}return C===45||un(C)?(t.consume(C),c+=String.fromCharCode(C),R):a(C)}function k(C){return C===62?(t.consume(C),r.interrupt?l:F):a(C)}function _(C){return Ze(C)?(t.consume(C),_):D(C)}function j(C){return C===47?(t.consume(C),D):C===58||C===95||pn(C)?(t.consume(C),J):Ze(C)?(t.consume(C),j):D(C)}function J(C){return C===45||C===46||C===58||C===95||un(C)?(t.consume(C),J):Q(C)}function Q(C){return C===61?(t.consume(C),I):Ze(C)?(t.consume(C),Q):j(C)}function I(C){return C===null||C===60||C===61||C===62||C===96?a(C):C===34||C===39?(t.consume(C),p=C,O):Ze(C)?(t.consume(C),I):le(C)}function O(C){return C===p?(t.consume(C),p=null,ne):C===null||Me(C)?a(C):(t.consume(C),O)}function le(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||bt(C)?Q(C):(t.consume(C),le)}function ne(C){return C===47||C===62||Ze(C)?j(C):a(C)}function D(C){return C===62?(t.consume(C),q):a(C)}function q(C){return C===null||Me(C)?F(C):Ze(C)?(t.consume(C),q):a(C)}function F(C){return C===45&&u===2?(t.consume(C),B):C===60&&u===1?(t.consume(C),ee):C===62&&u===4?(t.consume(C),M):C===63&&u===3?(t.consume(C),N):C===93&&u===5?(t.consume(C),be):Me(C)&&(u===6||u===7)?(t.exit("htmlFlowData"),t.check(a_,Z,V)(C)):C===null||Me(C)?(t.exit("htmlFlowData"),V(C)):(t.consume(C),F)}function V(C){return t.check(i_,ue,Z)(C)}function ue(C){return t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),W}function W(C){return C===null||Me(C)?V(C):(t.enter("htmlFlowData"),F(C))}function B(C){return C===45?(t.consume(C),N):F(C)}function ee(C){return C===47?(t.consume(C),c="",ie):F(C)}function ie(C){if(C===62){const de=c.toLowerCase();return Rv.includes(de)?(t.consume(C),M):F(C)}return pn(C)&&c.length<8?(t.consume(C),c+=String.fromCharCode(C),ie):F(C)}function be(C){return C===93?(t.consume(C),N):F(C)}function N(C){return C===62?(t.consume(C),M):C===45&&u===2?(t.consume(C),N):F(C)}function M(C){return C===null||Me(C)?(t.exit("htmlFlowData"),Z(C)):(t.consume(C),M)}function Z(C){return t.exit("htmlFlow"),l(C)}}function u_(t,l,a){const r=this;return u;function u(c){return Me(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):a(c)}function s(c){return r.parser.lazy[r.now().line]?a(c):l(c)}}function s_(t,l,a){return r;function r(u){return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),t.attempt(vo,l,a)}}const c_={name:"htmlText",tokenize:f_};function f_(t,l,a){const r=this;let u,s,c;return d;function d(N){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(N),p}function p(N){return N===33?(t.consume(N),h):N===47?(t.consume(N),Q):N===63?(t.consume(N),j):pn(N)?(t.consume(N),le):a(N)}function h(N){return N===45?(t.consume(N),y):N===91?(t.consume(N),s=0,E):pn(N)?(t.consume(N),_):a(N)}function y(N){return N===45?(t.consume(N),S):a(N)}function g(N){return N===null?a(N):N===45?(t.consume(N),b):Me(N)?(c=g,ee(N)):(t.consume(N),g)}function b(N){return N===45?(t.consume(N),S):g(N)}function S(N){return N===62?B(N):N===45?b(N):g(N)}function E(N){const M="CDATA[";return N===M.charCodeAt(s++)?(t.consume(N),s===M.length?A:E):a(N)}function A(N){return N===null?a(N):N===93?(t.consume(N),R):Me(N)?(c=A,ee(N)):(t.consume(N),A)}function R(N){return N===93?(t.consume(N),k):A(N)}function k(N){return N===62?B(N):N===93?(t.consume(N),k):A(N)}function _(N){return N===null||N===62?B(N):Me(N)?(c=_,ee(N)):(t.consume(N),_)}function j(N){return N===null?a(N):N===63?(t.consume(N),J):Me(N)?(c=j,ee(N)):(t.consume(N),j)}function J(N){return N===62?B(N):j(N)}function Q(N){return pn(N)?(t.consume(N),I):a(N)}function I(N){return N===45||un(N)?(t.consume(N),I):O(N)}function O(N){return Me(N)?(c=O,ee(N)):Ze(N)?(t.consume(N),O):B(N)}function le(N){return N===45||un(N)?(t.consume(N),le):N===47||N===62||bt(N)?ne(N):a(N)}function ne(N){return N===47?(t.consume(N),B):N===58||N===95||pn(N)?(t.consume(N),D):Me(N)?(c=ne,ee(N)):Ze(N)?(t.consume(N),ne):B(N)}function D(N){return N===45||N===46||N===58||N===95||un(N)?(t.consume(N),D):q(N)}function q(N){return N===61?(t.consume(N),F):Me(N)?(c=q,ee(N)):Ze(N)?(t.consume(N),q):ne(N)}function F(N){return N===null||N===60||N===61||N===62||N===96?a(N):N===34||N===39?(t.consume(N),u=N,V):Me(N)?(c=F,ee(N)):Ze(N)?(t.consume(N),F):(t.consume(N),ue)}function V(N){return N===u?(t.consume(N),u=void 0,W):N===null?a(N):Me(N)?(c=V,ee(N)):(t.consume(N),V)}function ue(N){return N===null||N===34||N===39||N===60||N===61||N===96?a(N):N===47||N===62||bt(N)?ne(N):(t.consume(N),ue)}function W(N){return N===47||N===62||bt(N)?ne(N):a(N)}function B(N){return N===62?(t.consume(N),t.exit("htmlTextData"),t.exit("htmlText"),l):a(N)}function ee(N){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(N),t.exit("lineEnding"),ie}function ie(N){return Ze(N)?it(t,be,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):be(N)}function be(N){return t.enter("htmlTextData"),c(N)}}const xh={name:"labelEnd",resolveAll:p_,resolveTo:g_,tokenize:y_},d_={tokenize:v_},h_={tokenize:b_},m_={tokenize:x_};function p_(t){let l=-1;const a=[];for(;++l<t.length;){const r=t[l][1];if(a.push(t[l]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const u=r.type==="labelImage"?4:2;r.type="data",l+=u}}return t.length!==a.length&&Fn(t,0,t.length,a),t}function g_(t,l){let a=t.length,r=0,u,s,c,d;for(;a--;)if(u=t[a][1],s){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;t[a][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(c){if(t[a][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(s=a,u.type!=="labelLink")){r=2;break}}else u.type==="labelEnd"&&(c=a);const p={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},h={type:"label",start:{...t[s][1].start},end:{...t[c][1].end}},y={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[c-2][1].start}};return d=[["enter",p,l],["enter",h,l]],d=el(d,t.slice(s+1,s+r+3)),d=el(d,[["enter",y,l]]),d=el(d,hs(l.parser.constructs.insideSpan.null,t.slice(s+r+4,c-3),l)),d=el(d,[["exit",y,l],t[c-2],t[c-1],["exit",h,l]]),d=el(d,t.slice(c+1)),d=el(d,[["exit",p,l]]),Fn(t,s,t.length,d),t}function y_(t,l,a){const r=this;let u=r.events.length,s,c;for(;u--;)if((r.events[u][1].type==="labelImage"||r.events[u][1].type==="labelLink")&&!r.events[u][1]._balanced){s=r.events[u][1];break}return d;function d(b){return s?s._inactive?g(b):(c=r.parser.defined.includes(sl(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(b),t.exit("labelMarker"),t.exit("labelEnd"),p):a(b)}function p(b){return b===40?t.attempt(d_,y,c?y:g)(b):b===91?t.attempt(h_,y,c?h:g)(b):c?y(b):g(b)}function h(b){return t.attempt(m_,y,g)(b)}function y(b){return l(b)}function g(b){return s._balanced=!0,a(b)}}function v_(t,l,a){return r;function r(g){return t.enter("resource"),t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),u}function u(g){return bt(g)?to(t,s)(g):s(g)}function s(g){return g===41?y(g):_0(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return bt(g)?to(t,p)(g):y(g)}function d(g){return a(g)}function p(g){return g===34||g===39||g===40?D0(t,h,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function h(g){return bt(g)?to(t,y)(g):y(g)}function y(g){return g===41?(t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),t.exit("resource"),l):a(g)}}function b_(t,l,a){const r=this;return u;function u(d){return R0.call(r,t,s,c,"reference","referenceMarker","referenceString")(d)}function s(d){return r.parser.defined.includes(sl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(d):a(d)}function c(d){return a(d)}}function x_(t,l,a){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),u}function u(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),l):a(s)}}const S_={name:"labelStartImage",resolveAll:xh.resolveAll,tokenize:E_};function E_(t,l,a){const r=this;return u;function u(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),s}function s(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),c):a(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(d):l(d)}}const w_={name:"labelStartLink",resolveAll:xh.resolveAll,tokenize:T_};function T_(t,l,a){const r=this;return u;function u(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(c):l(c)}}const Pf={name:"lineEnding",tokenize:C_};function C_(t,l){return a;function a(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),it(t,l,"linePrefix")}}const Ku={name:"thematicBreak",tokenize:k_};function k_(t,l,a){let r=0,u;return s;function s(h){return t.enter("thematicBreak"),c(h)}function c(h){return u=h,d(h)}function d(h){return h===u?(t.enter("thematicBreakSequence"),p(h)):r>=3&&(h===null||Me(h))?(t.exit("thematicBreak"),l(h)):a(h)}function p(h){return h===u?(t.consume(h),r++,p):(t.exit("thematicBreakSequence"),Ze(h)?it(t,d,"whitespace")(h):d(h))}}const _n={continuation:{tokenize:D_},exit:j_,name:"list",tokenize:R_},A_={partial:!0,tokenize:O_},__={partial:!0,tokenize:N_};function R_(t,l,a){const r=this,u=r.events[r.events.length-1];let s=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,c=0;return d;function d(S){const E=r.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||S===r.containerState.marker:Cd(S)){if(r.containerState.type||(r.containerState.type=E,t.enter(E,{_container:!0})),E==="listUnordered")return t.enter("listItemPrefix"),S===42||S===45?t.check(Ku,a,h)(S):h(S);if(!r.interrupt||S===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(S)}return a(S)}function p(S){return Cd(S)&&++c<10?(t.consume(S),p):(!r.interrupt||c<2)&&(r.containerState.marker?S===r.containerState.marker:S===41||S===46)?(t.exit("listItemValue"),h(S)):a(S)}function h(S){return t.enter("listItemMarker"),t.consume(S),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||S,t.check(vo,r.interrupt?a:y,t.attempt(A_,b,g))}function y(S){return r.containerState.initialBlankLine=!0,s++,b(S)}function g(S){return Ze(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),b):a(S)}function b(S){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(S)}}function D_(t,l,a){const r=this;return r.containerState._closeFlow=void 0,t.check(vo,u,s);function u(d){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,it(t,l,"listItemIndent",r.containerState.size+1)(d)}function s(d){return r.containerState.furtherBlankLines||!Ze(d)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,c(d)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(__,l,c)(d))}function c(d){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(t,t.attempt(_n,l,a),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function N_(t,l,a){const r=this;return it(t,u,"listItemIndent",r.containerState.size+1);function u(s){const c=r.events[r.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===r.containerState.size?l(s):a(s)}}function j_(t){t.exit(this.containerState.type)}function O_(t,l,a){const r=this;return it(t,u,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(s){const c=r.events[r.events.length-1];return!Ze(s)&&c&&c[1].type==="listItemPrefixWhitespace"?l(s):a(s)}}const Dv={name:"setextUnderline",resolveTo:M_,tokenize:z_};function M_(t,l){let a=t.length,r,u,s;for(;a--;)if(t[a][0]==="enter"){if(t[a][1].type==="content"){r=a;break}t[a][1].type==="paragraph"&&(u=a)}else t[a][1].type==="content"&&t.splice(a,1),!s&&t[a][1].type==="definition"&&(s=a);const c={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[u][1].type="setextHeadingText",s?(t.splice(u,0,["enter",c,l]),t.splice(s+1,0,["exit",t[r][1],l]),t[r][1].end={...t[s][1].end}):t[r][1]=c,t.push(["exit",c,l]),t}function z_(t,l,a){const r=this;let u;return s;function s(h){let y=r.events.length,g;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){g=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(t.enter("setextHeadingLine"),u=h,c(h)):a(h)}function c(h){return t.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===u?(t.consume(h),d):(t.exit("setextHeadingLineSequence"),Ze(h)?it(t,p,"lineSuffix")(h):p(h))}function p(h){return h===null||Me(h)?(t.exit("setextHeadingLine"),l(h)):a(h)}}const L_={tokenize:U_};function U_(t){const l=this,a=t.attempt(vo,r,t.attempt(this.parser.constructs.flowInitial,u,it(t,t.attempt(this.parser.constructs.flow,u,t.attempt(FA,u)),"linePrefix")));return a;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),l.currentConstruct=void 0,a}function u(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),l.currentConstruct=void 0,a}}const B_={resolveAll:j0()},H_=N0("string"),I_=N0("text");function N0(t){return{resolveAll:j0(t==="text"?q_:void 0),tokenize:l};function l(a){const r=this,u=this.parser.constructs[t],s=a.attempt(u,c,d);return c;function c(y){return h(y)?s(y):d(y)}function d(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),p}function p(y){return h(y)?(a.exit("data"),s(y)):(a.consume(y),p)}function h(y){if(y===null)return!0;const g=u[y];let b=-1;if(g)for(;++b<g.length;){const S=g[b];if(!S.previous||S.previous.call(r,r.previous))return!0}return!1}}}function j0(t){return l;function l(a,r){let u=-1,s;for(;++u<=a.length;)s===void 0?a[u]&&a[u][1].type==="data"&&(s=u,u++):(!a[u]||a[u][1].type!=="data")&&(u!==s+2&&(a[s][1].end=a[u-1][1].end,a.splice(s+2,u-s-2),u=s+2),s=void 0);return t?t(a,r):a}}function q_(t,l){let a=0;for(;++a<=t.length;)if((a===t.length||t[a][1].type==="lineEnding")&&t[a-1][1].type==="data"){const r=t[a-1][1],u=l.sliceStream(r);let s=u.length,c=-1,d=0,p;for(;s--;){const h=u[s];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(h===-2)p=!0,d++;else if(h!==-1){s++;break}}if(l._contentTypeTextTrailing&&a===t.length&&(d=0),d){const h={type:a===t.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:r.start._bufferIndex+c,_index:r.start._index+s,line:r.end.line,column:r.end.column-d,offset:r.end.offset-d},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(t.splice(a,0,["enter",h,l],["exit",h,l]),a+=2)}a++}return t}const F_={42:_n,43:_n,45:_n,48:_n,49:_n,50:_n,51:_n,52:_n,53:_n,54:_n,55:_n,56:_n,57:_n,62:T0},G_={91:XA},Y_={[-2]:Vf,[-1]:Vf,32:Vf},V_={35:WA,42:Ku,45:[Dv,Ku],60:l_,61:Dv,95:Ku,96:_v,126:_v},P_={38:k0,92:C0},X_={[-5]:Pf,[-4]:Pf,[-3]:Pf,33:S_,38:k0,42:kd,60:[wA,c_],91:w_,92:[ZA,C0],93:xh,95:kd,96:LA},$_={null:[kd,B_]},Q_={null:[42,95]},K_={null:[]},Z_=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Q_,contentInitial:G_,disable:K_,document:F_,flow:V_,flowInitial:Y_,insideSpan:$_,string:P_,text:X_},Symbol.toStringTag,{value:"Module"}));function J_(t,l,a){let r={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const u={},s=[];let c=[],d=[];const p={attempt:O(Q),check:O(I),consume:_,enter:j,exit:J,interrupt:O(I,{interrupt:!0})},h={code:null,containerState:{},defineSkip:A,events:[],now:E,parser:t,previous:null,sliceSerialize:b,sliceStream:S,write:g};let y=l.tokenize.call(h,p);return l.resolveAll&&s.push(l),h;function g(q){return c=el(c,q),R(),c[c.length-1]!==null?[]:(le(l,0),h.events=hs(s,h.events,h),h.events)}function b(q,F){return e2(S(q),F)}function S(q){return W_(c,q)}function E(){const{_bufferIndex:q,_index:F,line:V,column:ue,offset:W}=r;return{_bufferIndex:q,_index:F,line:V,column:ue,offset:W}}function A(q){u[q.line]=q.column,D()}function R(){let q;for(;r._index<c.length;){const F=c[r._index];if(typeof F=="string")for(q=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===q&&r._bufferIndex<F.length;)k(F.charCodeAt(r._bufferIndex));else k(F)}}function k(q){y=y(q)}function _(q){Me(q)?(r.line++,r.column=1,r.offset+=q===-3?2:1,D()):q!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=q}function j(q,F){const V=F||{};return V.type=q,V.start=E(),h.events.push(["enter",V,h]),d.push(V),V}function J(q){const F=d.pop();return F.end=E(),h.events.push(["exit",F,h]),F}function Q(q,F){le(q,F.from)}function I(q,F){F.restore()}function O(q,F){return V;function V(ue,W,B){let ee,ie,be,N;return Array.isArray(ue)?Z(ue):"tokenize"in ue?Z([ue]):M(ue);function M(Te){return ze;function ze(ve){const Oe=ve!==null&&Te[ve],At=ve!==null&&Te.null,vn=[...Array.isArray(Oe)?Oe:Oe?[Oe]:[],...Array.isArray(At)?At:At?[At]:[]];return Z(vn)(ve)}}function Z(Te){return ee=Te,ie=0,Te.length===0?B:C(Te[ie])}function C(Te){return ze;function ze(ve){return N=ne(),be=Te,Te.partial||(h.currentConstruct=Te),Te.name&&h.parser.constructs.disable.null.includes(Te.name)?ge():Te.tokenize.call(F?Object.assign(Object.create(h),F):h,p,de,ge)(ve)}}function de(Te){return q(be,N),W}function ge(Te){return N.restore(),++ie<ee.length?C(ee[ie]):B}}}function le(q,F){q.resolveAll&&!s.includes(q)&&s.push(q),q.resolve&&Fn(h.events,F,h.events.length-F,q.resolve(h.events.slice(F),h)),q.resolveTo&&(h.events=q.resolveTo(h.events,h))}function ne(){const q=E(),F=h.previous,V=h.currentConstruct,ue=h.events.length,W=Array.from(d);return{from:ue,restore:B};function B(){r=q,h.previous=F,h.currentConstruct=V,h.events.length=ue,d=W,D()}}function D(){r.line in u&&r.column<2&&(r.column=u[r.line],r.offset+=u[r.line]-1)}}function W_(t,l){const a=l.start._index,r=l.start._bufferIndex,u=l.end._index,s=l.end._bufferIndex;let c;if(a===u)c=[t[a].slice(r,s)];else{if(c=t.slice(a,u),r>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(r):c.shift()}s>0&&c.push(t[u].slice(0,s))}return c}function e2(t,l){let a=-1;const r=[];let u;for(;++a<t.length;){const s=t[a];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
|
|
191
|
-
`;break}case-3:{c=`\r
|
|
192
|
-
`;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&u)continue;c=" ";break}default:c=String.fromCharCode(s)}u=s===-2,r.push(c)}return r.join("")}function t2(t){const r={constructs:E0([Z_,...(t||{}).extensions||[]]),content:u(gA),defined:[],document:u(vA),flow:u(L_),lazy:{},string:u(H_),text:u(I_)};return r;function u(s){return c;function c(d){return J_(r,s,d)}}}function n2(t){for(;!A0(t););return t}const Nv=/[\0\t\n\r]/g;function l2(){let t=1,l="",a=!0,r;return u;function u(s,c,d){const p=[];let h,y,g,b,S;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),g=0,l="",a&&(s.charCodeAt(0)===65279&&g++,a=void 0);g<s.length;){if(Nv.lastIndex=g,h=Nv.exec(s),b=h&&h.index!==void 0?h.index:s.length,S=s.charCodeAt(b),!h){l=s.slice(g);break}if(S===10&&g===b&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),g<b&&(p.push(s.slice(g,b)),t+=b-g),S){case 0:{p.push(65533),t++;break}case 9:{for(y=Math.ceil(t/4)*4,p.push(-2);t++<y;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:r=!0,t=1}g=b+1}return d&&(r&&p.push(-5),l&&p.push(l),p.push(null)),p}}const a2=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function i2(t){return t.replace(a2,r2)}function r2(t,l,a){if(l)return l;if(a.charCodeAt(0)===35){const u=a.charCodeAt(1),s=u===120||u===88;return w0(a.slice(s?2:1),s?16:10)}return bh(a)||t}const O0={}.hasOwnProperty;function o2(t,l,a){return typeof l!="string"&&(a=l,l=void 0),u2(a)(n2(t2(a).document().write(l2()(t,l,!0))))}function u2(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(bn),autolinkProtocol:ne,autolinkEmail:ne,atxHeading:s(nn),blockQuote:s(At),characterEscape:ne,characterReference:ne,codeFenced:s(vn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(vn,c),codeText:s(Et,c),codeTextData:ne,data:ne,codeFlowValue:ne,definition:s(Gt),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Qt),hardBreakEscape:s(Yt),hardBreakTrailing:s(Yt),htmlFlow:s(dl,c),htmlFlowData:ne,htmlText:s(dl,c),htmlTextData:ne,image:s(Dn),label:c,link:s(bn),listItem:s(hl),listItemValue:b,listOrdered:s(Nn,g),listUnordered:s(Nn),paragraph:s(Wl),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(nn),strong:s(Oa),thematicBreak:s(cn)},exit:{atxHeading:p(),atxHeadingSequence:Q,autolink:p(),autolinkEmail:Oe,autolinkProtocol:ve,blockQuote:p(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:Te,characterReference:ze,codeFenced:p(R),codeFencedFence:A,codeFencedFenceInfo:S,codeFencedFenceMeta:E,codeFlowValue:D,codeIndented:p(k),codeText:p(W),codeTextData:D,data:D,definition:p(),definitionDestinationString:J,definitionLabelString:_,definitionTitleString:j,emphasis:p(),hardBreakEscape:p(F),hardBreakTrailing:p(F),htmlFlow:p(V),htmlFlowData:D,htmlText:p(ue),htmlTextData:D,image:p(ee),label:be,labelText:ie,lineEnding:q,link:p(B),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:de,resourceDestinationString:N,resourceTitleString:M,resource:Z,setextHeading:p(le),setextHeadingLineSequence:O,setextHeadingText:I,strong:p(),thematicBreak:p()}};M0(l,(t||{}).mdastExtensions||[]);const a={};return r;function r(ae){let he={type:"root",children:[]};const Ae={stack:[he],tokenStack:[],config:l,enter:d,exit:h,buffer:c,resume:y,data:a},Ue=[];let Je=-1;for(;++Je<ae.length;)if(ae[Je][1].type==="listOrdered"||ae[Je][1].type==="listUnordered")if(ae[Je][0]==="enter")Ue.push(Je);else{const qt=Ue.pop();Je=u(ae,qt,Je)}for(Je=-1;++Je<ae.length;){const qt=l[ae[Je][0]];O0.call(qt,ae[Je][1].type)&&qt[ae[Je][1].type].call(Object.assign({sliceSerialize:ae[Je][2].sliceSerialize},Ae),ae[Je][1])}if(Ae.tokenStack.length>0){const qt=Ae.tokenStack[Ae.tokenStack.length-1];(qt[1]||jv).call(Ae,void 0,qt[0])}for(he.position={start:wa(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:wa(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<l.transforms.length;)he=l.transforms[Je](he)||he;return he}function u(ae,he,Ae){let Ue=he-1,Je=-1,qt=!1,ln,Rt,at,gt;for(;++Ue<=Ae;){const Pe=ae[Ue];switch(Pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pe[0]==="enter"?Je++:Je--,gt=void 0;break}case"lineEndingBlank":{Pe[0]==="enter"&&(ln&&!gt&&!Je&&!at&&(at=Ue),gt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:gt=void 0}if(!Je&&Pe[0]==="enter"&&Pe[1].type==="listItemPrefix"||Je===-1&&Pe[0]==="exit"&&(Pe[1].type==="listUnordered"||Pe[1].type==="listOrdered")){if(ln){let fn=Ue;for(Rt=void 0;fn--;){const Kt=ae[fn];if(Kt[1].type==="lineEnding"||Kt[1].type==="lineEndingBlank"){if(Kt[0]==="exit")continue;Rt&&(ae[Rt][1].type="lineEndingBlank",qt=!0),Kt[1].type="lineEnding",Rt=fn}else if(!(Kt[1].type==="linePrefix"||Kt[1].type==="blockQuotePrefix"||Kt[1].type==="blockQuotePrefixWhitespace"||Kt[1].type==="blockQuoteMarker"||Kt[1].type==="listItemIndent"))break}at&&(!Rt||at<Rt)&&(ln._spread=!0),ln.end=Object.assign({},Rt?ae[Rt][1].start:Pe[1].end),ae.splice(Rt||Ue,0,["exit",ln,Pe[2]]),Ue++,Ae++}if(Pe[1].type==="listItemPrefix"){const fn={type:"listItem",_spread:!1,start:Object.assign({},Pe[1].start),end:void 0};ln=fn,ae.splice(Ue,0,["enter",fn,Pe[2]]),Ue++,Ae++,at=void 0,gt=!0}}}return ae[he][1]._spread=qt,Ae}function s(ae,he){return Ae;function Ae(Ue){d.call(this,ae(Ue),Ue),he&&he.call(this,Ue)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ae,he,Ae){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([he,Ae||void 0]),ae.position={start:wa(he.start),end:void 0}}function p(ae){return he;function he(Ae){ae&&ae.call(this,Ae),h.call(this,Ae)}}function h(ae,he){const Ae=this.stack.pop(),Ue=this.tokenStack.pop();if(Ue)Ue[0].type!==ae.type&&(he?he.call(this,ae,Ue[0]):(Ue[1]||jv).call(this,ae,Ue[0]));else throw new Error("Cannot close `"+ae.type+"` ("+eo({start:ae.start,end:ae.end})+"): it’s not open");Ae.position.end=wa(ae.end)}function y(){return vh(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(ae){if(this.data.expectingFirstListItemValue){const he=this.stack[this.stack.length-2];he.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function S(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.lang=ae}function E(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.meta=ae}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.value=ae.replace(/(\r?\n|\r)$/g,"")}function _(ae){const he=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=he,Ae.identifier=sl(this.sliceSerialize(ae)).toLowerCase()}function j(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.title=ae}function J(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.url=ae}function Q(ae){const he=this.stack[this.stack.length-1];if(!he.depth){const Ae=this.sliceSerialize(ae).length;he.depth=Ae}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function O(ae){const he=this.stack[this.stack.length-1];he.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function le(){this.data.setextHeadingSlurpLineEnding=void 0}function ne(ae){const Ae=this.stack[this.stack.length-1].children;let Ue=Ae[Ae.length-1];(!Ue||Ue.type!=="text")&&(Ue=pt(),Ue.position={start:wa(ae.start),end:void 0},Ae.push(Ue)),this.stack.push(Ue)}function D(ae){const he=this.stack.pop();he.value+=this.sliceSerialize(ae),he.position.end=wa(ae.end)}function q(ae){const he=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=he.children[he.children.length-1];Ae.position.end=wa(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(he.type)&&(ne.call(this,ae),D.call(this,ae))}function F(){this.data.atHardBreak=!0}function V(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.value=ae}function ue(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.value=ae}function W(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.value=ae}function B(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=he,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function ee(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=he,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function ie(ae){const he=this.sliceSerialize(ae),Ae=this.stack[this.stack.length-2];Ae.label=i2(he),Ae.identifier=sl(he).toLowerCase()}function be(){const ae=this.stack[this.stack.length-1],he=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const Ue=ae.children;Ae.children=Ue}else Ae.alt=he}function N(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.url=ae}function M(){const ae=this.resume(),he=this.stack[this.stack.length-1];he.title=ae}function Z(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function de(ae){const he=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=he,Ae.identifier=sl(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function ge(ae){this.data.characterReferenceType=ae.type}function Te(ae){const he=this.sliceSerialize(ae),Ae=this.data.characterReferenceType;let Ue;Ae?(Ue=w0(he,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=bh(he);const Je=this.stack[this.stack.length-1];Je.value+=Ue}function ze(ae){const he=this.stack.pop();he.position.end=wa(ae.end)}function ve(ae){D.call(this,ae);const he=this.stack[this.stack.length-1];he.url=this.sliceSerialize(ae)}function Oe(ae){D.call(this,ae);const he=this.stack[this.stack.length-1];he.url="mailto:"+this.sliceSerialize(ae)}function At(){return{type:"blockquote",children:[]}}function vn(){return{type:"code",lang:null,meta:null,value:""}}function Et(){return{type:"inlineCode",value:""}}function Gt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Qt(){return{type:"emphasis",children:[]}}function nn(){return{type:"heading",depth:0,children:[]}}function Yt(){return{type:"break"}}function dl(){return{type:"html",value:""}}function Dn(){return{type:"image",title:null,url:"",alt:null}}function bn(){return{type:"link",title:null,url:"",children:[]}}function Nn(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function hl(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function Wl(){return{type:"paragraph",children:[]}}function Oa(){return{type:"strong",children:[]}}function pt(){return{type:"text",value:""}}function cn(){return{type:"thematicBreak"}}}function wa(t){return{line:t.line,column:t.column,offset:t.offset}}function M0(t,l){let a=-1;for(;++a<l.length;){const r=l[a];Array.isArray(r)?M0(t,r):s2(t,r)}}function s2(t,l){let a;for(a in l)if(O0.call(l,a))switch(a){case"canContainEols":{const r=l[a];r&&t[a].push(...r);break}case"transforms":{const r=l[a];r&&t[a].push(...r);break}case"enter":case"exit":{const r=l[a];r&&Object.assign(t[a],r);break}}}function jv(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+eo({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+eo({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+eo({start:l.start,end:l.end})+") is still open")}function c2(t){const l=this;l.parser=a;function a(r){return o2(r,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function f2(t,l){const a={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,a),t.applyData(l,a)}function d2(t,l){const a={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,a),[t.applyData(l,a),{type:"text",value:`
|
|
193
|
-
`}]}function h2(t,l){const a=l.value?l.value+`
|
|
194
|
-
`:"",r={},u=l.lang?l.lang.split(/\s+/):[];u.length>0&&(r.className=["language-"+u[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:a}]};return l.meta&&(s.data={meta:l.meta}),t.patch(l,s),s=t.applyData(l,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(l,s),s}function m2(t,l){const a={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function p2(t,l){const a={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function g2(t,l){const a=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),u=$i(r.toLowerCase()),s=t.footnoteOrder.indexOf(r);let c,d=t.footnoteCounts.get(r);d===void 0?(d=0,t.footnoteOrder.push(r),c=t.footnoteOrder.length):c=s+1,d+=1,t.footnoteCounts.set(r,d);const p={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+u,id:a+"fnref-"+u+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(l,p);const h={type:"element",tagName:"sup",properties:{},children:[p]};return t.patch(l,h),t.applyData(l,h)}function y2(t,l){const a={type:"element",tagName:"h"+l.depth,properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function v2(t,l){if(t.options.allowDangerousHtml){const a={type:"raw",value:l.value};return t.patch(l,a),t.applyData(l,a)}}function z0(t,l){const a=l.referenceType;let r="]";if(a==="collapsed"?r+="[]":a==="full"&&(r+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+r}];const u=t.all(l),s=u[0];s&&s.type==="text"?s.value="["+s.value:u.unshift({type:"text",value:"["});const c=u[u.length-1];return c&&c.type==="text"?c.value+=r:u.push({type:"text",value:r}),u}function b2(t,l){const a=String(l.identifier).toUpperCase(),r=t.definitionById.get(a);if(!r)return z0(t,l);const u={src:$i(r.url||""),alt:l.alt};r.title!==null&&r.title!==void 0&&(u.title=r.title);const s={type:"element",tagName:"img",properties:u,children:[]};return t.patch(l,s),t.applyData(l,s)}function x2(t,l){const a={src:$i(l.url)};l.alt!==null&&l.alt!==void 0&&(a.alt=l.alt),l.title!==null&&l.title!==void 0&&(a.title=l.title);const r={type:"element",tagName:"img",properties:a,children:[]};return t.patch(l,r),t.applyData(l,r)}function S2(t,l){const a={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};t.patch(l,a);const r={type:"element",tagName:"code",properties:{},children:[a]};return t.patch(l,r),t.applyData(l,r)}function E2(t,l){const a=String(l.identifier).toUpperCase(),r=t.definitionById.get(a);if(!r)return z0(t,l);const u={href:$i(r.url||"")};r.title!==null&&r.title!==void 0&&(u.title=r.title);const s={type:"element",tagName:"a",properties:u,children:t.all(l)};return t.patch(l,s),t.applyData(l,s)}function w2(t,l){const a={href:$i(l.url)};l.title!==null&&l.title!==void 0&&(a.title=l.title);const r={type:"element",tagName:"a",properties:a,children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function T2(t,l,a){const r=t.all(l),u=a?C2(a):L0(l),s={},c=[];if(typeof l.checked=="boolean"){const y=r[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<r.length;){const y=r[d];(u||d!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
|
|
195
|
-
`}),y.type==="element"&&y.tagName==="p"&&!u?c.push(...y.children):c.push(y)}const p=r[r.length-1];p&&(u||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
196
|
-
`});const h={type:"element",tagName:"li",properties:s,children:c};return t.patch(l,h),t.applyData(l,h)}function C2(t){let l=!1;if(t.type==="list"){l=t.spread||!1;const a=t.children;let r=-1;for(;!l&&++r<a.length;)l=L0(a[r])}return l}function L0(t){const l=t.spread;return l??t.children.length>1}function k2(t,l){const a={},r=t.all(l);let u=-1;for(typeof l.start=="number"&&l.start!==1&&(a.start=l.start);++u<r.length;){const c=r[u];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const s={type:"element",tagName:l.ordered?"ol":"ul",properties:a,children:t.wrap(r,!0)};return t.patch(l,s),t.applyData(l,s)}function A2(t,l){const a={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function _2(t,l){const a={type:"root",children:t.wrap(t.all(l))};return t.patch(l,a),t.applyData(l,a)}function R2(t,l){const a={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function D2(t,l){const a=t.all(l),r=a.shift(),u=[];if(r){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(l.children[0],c),u.push(c)}if(a.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(a,!0)},d=mh(l.children[1]),p=p0(l.children[l.children.length-1]);d&&p&&(c.position={start:d,end:p}),u.push(c)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(u,!0)};return t.patch(l,s),t.applyData(l,s)}function N2(t,l,a){const r=a?a.children:void 0,s=(r?r.indexOf(l):1)===0?"th":"td",c=a&&a.type==="table"?a.align:void 0,d=c?c.length:l.children.length;let p=-1;const h=[];for(;++p<d;){const g=l.children[p],b={},S=c?c[p]:void 0;S&&(b.align=S);let E={type:"element",tagName:s,properties:b,children:[]};g&&(E.children=t.all(g),t.patch(g,E),E=t.applyData(g,E)),h.push(E)}const y={type:"element",tagName:"tr",properties:{},children:t.wrap(h,!0)};return t.patch(l,y),t.applyData(l,y)}function j2(t,l){const a={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}const Ov=9,Mv=32;function O2(t){const l=String(t),a=/\r?\n|\r/g;let r=a.exec(l),u=0;const s=[];for(;r;)s.push(zv(l.slice(u,r.index),u>0,!0),r[0]),u=r.index+r[0].length,r=a.exec(l);return s.push(zv(l.slice(u),u>0,!1)),s.join("")}function zv(t,l,a){let r=0,u=t.length;if(l){let s=t.codePointAt(r);for(;s===Ov||s===Mv;)r++,s=t.codePointAt(r)}if(a){let s=t.codePointAt(u-1);for(;s===Ov||s===Mv;)u--,s=t.codePointAt(u-1)}return u>r?t.slice(r,u):""}function M2(t,l){const a={type:"text",value:O2(String(l.value))};return t.patch(l,a),t.applyData(l,a)}function z2(t,l){const a={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,a),t.applyData(l,a)}const L2={blockquote:f2,break:d2,code:h2,delete:m2,emphasis:p2,footnoteReference:g2,heading:y2,html:v2,imageReference:b2,image:x2,inlineCode:S2,linkReference:E2,link:w2,listItem:T2,list:k2,paragraph:A2,root:_2,strong:R2,table:D2,tableCell:j2,tableRow:N2,text:M2,thematicBreak:z2,toml:Uu,yaml:Uu,definition:Uu,footnoteDefinition:Uu};function Uu(){}const U0=-1,ms=0,no=1,es=2,Sh=3,Eh=4,wh=5,Th=6,B0=7,H0=8,Lv=typeof self=="object"?self:globalThis,U2=(t,l)=>{const a=(u,s)=>(t.set(s,u),u),r=u=>{if(t.has(u))return t.get(u);const[s,c]=l[u];switch(s){case ms:case U0:return a(c,u);case no:{const d=a([],u);for(const p of c)d.push(r(p));return d}case es:{const d=a({},u);for(const[p,h]of c)d[r(p)]=r(h);return d}case Sh:return a(new Date(c),u);case Eh:{const{source:d,flags:p}=c;return a(new RegExp(d,p),u)}case wh:{const d=a(new Map,u);for(const[p,h]of c)d.set(r(p),r(h));return d}case Th:{const d=a(new Set,u);for(const p of c)d.add(r(p));return d}case B0:{const{name:d,message:p}=c;return a(new Lv[d](p),u)}case H0:return a(BigInt(c),u);case"BigInt":return a(Object(BigInt(c)),u);case"ArrayBuffer":return a(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return a(new DataView(d),c)}}return a(new Lv[s](c),u)};return r},Uv=t=>U2(new Map,t)(0),Hi="",{toString:B2}={},{keys:H2}=Object,Kr=t=>{const l=typeof t;if(l!=="object"||!t)return[ms,l];const a=B2.call(t).slice(8,-1);switch(a){case"Array":return[no,Hi];case"Object":return[es,Hi];case"Date":return[Sh,Hi];case"RegExp":return[Eh,Hi];case"Map":return[wh,Hi];case"Set":return[Th,Hi];case"DataView":return[no,a]}return a.includes("Array")?[no,a]:a.includes("Error")?[B0,a]:[es,a]},Bu=([t,l])=>t===ms&&(l==="function"||l==="symbol"),I2=(t,l,a,r)=>{const u=(c,d)=>{const p=r.push(c)-1;return a.set(d,p),p},s=c=>{if(a.has(c))return a.get(c);let[d,p]=Kr(c);switch(d){case ms:{let y=c;switch(p){case"bigint":d=H0,y=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);y=null;break;case"undefined":return u([U0],c)}return u([d,y],c)}case no:{if(p){let b=c;return p==="DataView"?b=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(b=new Uint8Array(c)),u([p,[...b]],c)}const y=[],g=u([d,y],c);for(const b of c)y.push(s(b));return g}case es:{if(p)switch(p){case"BigInt":return u([p,c.toString()],c);case"Boolean":case"Number":case"String":return u([p,c.valueOf()],c)}if(l&&"toJSON"in c)return s(c.toJSON());const y=[],g=u([d,y],c);for(const b of H2(c))(t||!Bu(Kr(c[b])))&&y.push([s(b),s(c[b])]);return g}case Sh:return u([d,c.toISOString()],c);case Eh:{const{source:y,flags:g}=c;return u([d,{source:y,flags:g}],c)}case wh:{const y=[],g=u([d,y],c);for(const[b,S]of c)(t||!(Bu(Kr(b))||Bu(Kr(S))))&&y.push([s(b),s(S)]);return g}case Th:{const y=[],g=u([d,y],c);for(const b of c)(t||!Bu(Kr(b)))&&y.push(s(b));return g}}const{message:h}=c;return u([d,{name:p,message:h}],c)};return s},Bv=(t,{json:l,lossy:a}={})=>{const r=[];return I2(!(l||a),!!l,new Map,r)(t),r},ts=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?Uv(Bv(t,l)):structuredClone(t):(t,l)=>Uv(Bv(t,l));function q2(t,l){const a=[{type:"text",value:"↩"}];return l>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),a}function F2(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function G2(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",a=t.options.footnoteBackContent||q2,r=t.options.footnoteBackLabel||F2,u=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<t.footnoteOrder.length;){const h=t.footnoteById.get(t.footnoteOrder[p]);if(!h)continue;const y=t.all(h),g=String(h.identifier).toUpperCase(),b=$i(g.toLowerCase());let S=0;const E=[],A=t.footnoteCounts.get(g);for(;A!==void 0&&++S<=A;){E.length>0&&E.push({type:"text",value:" "});let _=typeof a=="string"?a:a(p,S);typeof _=="string"&&(_={type:"text",value:_}),E.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+b+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,S),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const R=y[y.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const _=R.children[R.children.length-1];_&&_.type==="text"?_.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...E)}else y.push(...E);const k={type:"element",tagName:"li",properties:{id:l+"fn-"+b},children:t.wrap(y,!0)};t.patch(h,k),d.push(k)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...ts(c),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
|
|
197
|
-
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
|
|
198
|
-
`}]}}const ps=(function(t){if(t==null)return X2;if(typeof t=="function")return gs(t);if(typeof t=="object")return Array.isArray(t)?Y2(t):V2(t);if(typeof t=="string")return P2(t);throw new Error("Expected function, string, or object as test")});function Y2(t){const l=[];let a=-1;for(;++a<t.length;)l[a]=ps(t[a]);return gs(r);function r(...u){let s=-1;for(;++s<l.length;)if(l[s].apply(this,u))return!0;return!1}}function V2(t){const l=t;return gs(a);function a(r){const u=r;let s;for(s in t)if(u[s]!==l[s])return!1;return!0}}function P2(t){return gs(l);function l(a){return a&&a.type===t}}function gs(t){return l;function l(a,r,u){return!!($2(a)&&t.call(this,a,typeof r=="number"?r:void 0,u||void 0))}}function X2(){return!0}function $2(t){return t!==null&&typeof t=="object"&&"type"in t}const I0=[],Q2=!0,Ad=!1,K2="skip";function q0(t,l,a,r){let u;typeof l=="function"&&typeof a!="function"?(r=a,a=l):u=l;const s=ps(u),c=r?-1:1;d(t,void 0,[])();function d(p,h,y){const g=p&&typeof p=="object"?p:{};if(typeof g.type=="string"){const S=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(p.type+(S?"<"+S+">":""))+")"})}return b;function b(){let S=I0,E,A,R;if((!l||s(p,h,y[y.length-1]||void 0))&&(S=Z2(a(p,y)),S[0]===Ad))return S;if("children"in p&&p.children){const k=p;if(k.children&&S[0]!==K2)for(A=(r?k.children.length:-1)+c,R=y.concat(k);A>-1&&A<k.children.length;){const _=k.children[A];if(E=d(_,A,R)(),E[0]===Ad)return E;A=typeof E[1]=="number"?E[1]:A+c}}return S}}}function Z2(t){return Array.isArray(t)?t:typeof t=="number"?[Q2,t]:t==null?I0:[t]}function Ch(t,l,a,r){let u,s,c;typeof l=="function"&&typeof a!="function"?(s=void 0,c=l,u=a):(s=l,c=a,u=r),q0(t,s,d,u);function d(p,h){const y=h[h.length-1],g=y?y.children.indexOf(p):void 0;return c(p,g,y)}}const _d={}.hasOwnProperty,J2={};function W2(t,l){const a=l||J2,r=new Map,u=new Map,s=new Map,c={...L2,...a.handlers},d={all:h,applyData:tR,definitionById:r,footnoteById:u,footnoteCounts:s,footnoteOrder:[],handlers:c,one:p,options:a,patch:eR,wrap:lR};return Ch(t,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?r:u,b=String(y.identifier).toUpperCase();g.has(b)||g.set(b,y)}}),d;function p(y,g){const b=y.type,S=d.handlers[b];if(_d.call(d.handlers,b)&&S)return S(d,y,g);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in y){const{children:A,...R}=y,k=ts(R);return k.children=d.all(y),k}return ts(y)}return(d.options.unknownHandler||nR)(d,y,g)}function h(y){const g=[];if("children"in y){const b=y.children;let S=-1;for(;++S<b.length;){const E=d.one(b[S],y);if(E){if(S&&b[S-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=Hv(E.value)),!Array.isArray(E)&&E.type==="element")){const A=E.children[0];A&&A.type==="text"&&(A.value=Hv(A.value))}Array.isArray(E)?g.push(...E):g.push(E)}}}return g}}function eR(t,l){t.position&&(l.position=Fk(t))}function tR(t,l){let a=l;if(t&&t.data){const r=t.data.hName,u=t.data.hChildren,s=t.data.hProperties;if(typeof r=="string")if(a.type==="element")a.tagName=r;else{const c="children"in a?a.children:[a];a={type:"element",tagName:r,properties:{},children:c}}a.type==="element"&&s&&Object.assign(a.properties,ts(s)),"children"in a&&a.children&&u!==null&&u!==void 0&&(a.children=u)}return a}function nR(t,l){const a=l.data||{},r="value"in l&&!(_d.call(a,"hProperties")||_d.call(a,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function lR(t,l){const a=[];let r=-1;for(l&&a.push({type:"text",value:`
|
|
199
|
-
`});++r<t.length;)r&&a.push({type:"text",value:`
|
|
200
|
-
`}),a.push(t[r]);return l&&t.length>0&&a.push({type:"text",value:`
|
|
201
|
-
`}),a}function Hv(t){let l=0,a=t.charCodeAt(l);for(;a===9||a===32;)l++,a=t.charCodeAt(l);return t.slice(l)}function Iv(t,l){const a=W2(t,l),r=a.one(t,void 0),u=G2(a),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return u&&s.children.push({type:"text",value:`
|
|
202
|
-
`},u),s}function aR(t,l){return t&&"run"in t?async function(a,r){const u=Iv(a,{file:r,...l});await t.run(u,r)}:function(a,r){return Iv(a,{file:r,...t||l})}}function qv(t){if(t)throw t}var Xf,Fv;function iR(){if(Fv)return Xf;Fv=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,u=function(h){return typeof Array.isArray=="function"?Array.isArray(h):l.call(h)==="[object Array]"},s=function(h){if(!h||l.call(h)!=="[object Object]")return!1;var y=t.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&t.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!g)return!1;var b;for(b in h);return typeof b>"u"||t.call(h,b)},c=function(h,y){a&&y.name==="__proto__"?a(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},d=function(h,y){if(y==="__proto__")if(t.call(h,y)){if(r)return r(h,y).value}else return;return h[y]};return Xf=function p(){var h,y,g,b,S,E,A=arguments[0],R=1,k=arguments.length,_=!1;for(typeof A=="boolean"&&(_=A,A=arguments[1]||{},R=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});R<k;++R)if(h=arguments[R],h!=null)for(y in h)g=d(A,y),b=d(h,y),A!==b&&(_&&b&&(s(b)||(S=u(b)))?(S?(S=!1,E=g&&u(g)?g:[]):E=g&&s(g)?g:{},c(A,{name:y,newValue:p(_,E,b)})):typeof b<"u"&&c(A,{name:y,newValue:b}));return A},Xf}var rR=iR();const $f=Bd(rR);function Rd(t){if(typeof t!="object"||t===null)return!1;const l=Object.getPrototypeOf(t);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function oR(){const t=[],l={run:a,use:r};return l;function a(...u){let s=-1;const c=u.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...u);function d(p,...h){const y=t[++s];let g=-1;if(p){c(p);return}for(;++g<u.length;)(h[g]===null||h[g]===void 0)&&(h[g]=u[g]);u=h,y?uR(y,d)(...h):c(null,...h)}}function r(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return t.push(u),l}}function uR(t,l){let a;return r;function r(...c){const d=t.length>c.length;let p;d&&c.push(u);try{p=t.apply(this,c)}catch(h){const y=h;if(d&&a)throw y;return u(y)}d||(p&&p.then&&typeof p.then=="function"?p.then(s,u):p instanceof Error?u(p):s(p))}function u(c,...d){a||(a=!0,l(c,...d))}function s(c){u(null,c)}}const wl={basename:sR,dirname:cR,extname:fR,join:dR,sep:"/"};function sR(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');bo(t);let a=0,r=-1,u=t.length,s;if(l===void 0||l.length===0||l.length>t.length){for(;u--;)if(t.codePointAt(u)===47){if(s){a=u+1;break}}else r<0&&(s=!0,r=u+1);return r<0?"":t.slice(a,r)}if(l===t)return"";let c=-1,d=l.length-1;for(;u--;)if(t.codePointAt(u)===47){if(s){a=u+1;break}}else c<0&&(s=!0,c=u+1),d>-1&&(t.codePointAt(u)===l.codePointAt(d--)?d<0&&(r=u):(d=-1,r=c));return a===r?r=c:r<0&&(r=t.length),t.slice(a,r)}function cR(t){if(bo(t),t.length===0)return".";let l=-1,a=t.length,r;for(;--a;)if(t.codePointAt(a)===47){if(r){l=a;break}}else r||(r=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function fR(t){bo(t);let l=t.length,a=-1,r=0,u=-1,s=0,c;for(;l--;){const d=t.codePointAt(l);if(d===47){if(c){r=l+1;break}continue}a<0&&(c=!0,a=l+1),d===46?u<0?u=l:s!==1&&(s=1):u>-1&&(s=-1)}return u<0||a<0||s===0||s===1&&u===a-1&&u===r+1?"":t.slice(u,a)}function dR(...t){let l=-1,a;for(;++l<t.length;)bo(t[l]),t[l]&&(a=a===void 0?t[l]:a+"/"+t[l]);return a===void 0?".":hR(a)}function hR(t){bo(t);const l=t.codePointAt(0)===47;let a=mR(t,!l);return a.length===0&&!l&&(a="."),a.length>0&&t.codePointAt(t.length-1)===47&&(a+="/"),l?"/"+a:a}function mR(t,l){let a="",r=0,u=-1,s=0,c=-1,d,p;for(;++c<=t.length;){if(c<t.length)d=t.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(u===c-1||s===1))if(u!==c-1&&s===2){if(a.length<2||r!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(p=a.lastIndexOf("/"),p!==a.length-1){p<0?(a="",r=0):(a=a.slice(0,p),r=a.length-1-a.lastIndexOf("/")),u=c,s=0;continue}}else if(a.length>0){a="",r=0,u=c,s=0;continue}}l&&(a=a.length>0?a+"/..":"..",r=2)}else a.length>0?a+="/"+t.slice(u+1,c):a=t.slice(u+1,c),r=c-u-1;u=c,s=0}else d===46&&s>-1?s++:s=-1}return a}function bo(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const pR={cwd:gR};function gR(){return"/"}function Dd(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function yR(t){if(typeof t=="string")t=new URL(t);else if(!Dd(t)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(t.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return vR(t)}function vR(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const l=t.pathname;let a=-1;for(;++a<l.length;)if(l.codePointAt(a)===37&&l.codePointAt(a+1)===50){const r=l.codePointAt(a+2);if(r===70||r===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(l)}const Qf=["history","path","basename","stem","extname","dirname"];class F0{constructor(l){let a;l?Dd(l)?a={path:l}:typeof l=="string"||bR(l)?a={value:l}:a=l:a={},this.cwd="cwd"in a?"":pR.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Qf.length;){const s=Qf[r];s in a&&a[s]!==void 0&&a[s]!==null&&(this[s]=s==="history"?[...a[s]]:a[s])}let u;for(u in a)Qf.includes(u)||(this[u]=a[u])}get basename(){return typeof this.path=="string"?wl.basename(this.path):void 0}set basename(l){Zf(l,"basename"),Kf(l,"basename"),this.path=wl.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?wl.dirname(this.path):void 0}set dirname(l){Gv(this.basename,"dirname"),this.path=wl.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?wl.extname(this.path):void 0}set extname(l){if(Kf(l,"extname"),Gv(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=wl.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Dd(l)&&(l=yR(l)),Zf(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?wl.basename(this.path,this.extname):void 0}set stem(l){Zf(l,"stem"),Kf(l,"stem"),this.path=wl.join(this.dirname||"",l+(this.extname||""))}fail(l,a,r){const u=this.message(l,a,r);throw u.fatal=!0,u}info(l,a,r){const u=this.message(l,a,r);return u.fatal=void 0,u}message(l,a,r){const u=new sn(l,a,r);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function Kf(t,l){if(t&&t.includes(wl.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+wl.sep+"`")}function Zf(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function Gv(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function bR(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const xR=(function(t){const r=this.constructor.prototype,u=r[t],s=function(){return u.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),SR={}.hasOwnProperty;class kh extends xR{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=oR()}copy(){const l=new kh;let a=-1;for(;++a<this.attachers.length;){const r=this.attachers[a];l.use(...r)}return l.data($f(!0,{},this.namespace)),l}data(l,a){return typeof l=="string"?arguments.length===2?(ed("data",this.frozen),this.namespace[l]=a,this):SR.call(this.namespace,l)&&this.namespace[l]||void 0:l?(ed("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const u=a.call(l,...r);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const a=Hu(l),r=this.parser||this.Parser;return Jf("parse",r),r(String(a),a)}process(l,a){const r=this;return this.freeze(),Jf("process",this.parser||this.Parser),Wf("process",this.compiler||this.Compiler),a?u(void 0,a):new Promise(u);function u(s,c){const d=Hu(l),p=r.parse(d);r.run(p,d,function(y,g,b){if(y||!g||!b)return h(y);const S=g,E=r.stringify(S,b);TR(E)?b.value=E:b.result=E,h(y,b)});function h(y,g){y||!g?c(y):s?s(g):a(void 0,g)}}}processSync(l){let a=!1,r;return this.freeze(),Jf("processSync",this.parser||this.Parser),Wf("processSync",this.compiler||this.Compiler),this.process(l,u),Vv("processSync","process",a),r;function u(s,c){a=!0,qv(s),r=c}}run(l,a,r){Yv(l),this.freeze();const u=this.transformers;return!r&&typeof a=="function"&&(r=a,a=void 0),r?s(void 0,r):new Promise(s);function s(c,d){const p=Hu(a);u.run(l,p,h);function h(y,g,b){const S=g||l;y?d(y):c?c(S):r(void 0,S,b)}}}runSync(l,a){let r=!1,u;return this.run(l,a,s),Vv("runSync","run",r),u;function s(c,d){qv(c),u=d,r=!0}}stringify(l,a){this.freeze();const r=Hu(a),u=this.compiler||this.Compiler;return Wf("stringify",u),Yv(l),u(l,r)}use(l,...a){const r=this.attachers,u=this.namespace;if(ed("use",this.frozen),l!=null)if(typeof l=="function")p(l,a);else if(typeof l=="object")Array.isArray(l)?d(l):c(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function s(h){if(typeof h=="function")p(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[y,...g]=h;p(y,g)}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");d(h.plugins),h.settings&&(u.settings=$f(!0,u.settings,h.settings))}function d(h){let y=-1;if(h!=null)if(Array.isArray(h))for(;++y<h.length;){const g=h[y];s(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function p(h,y){let g=-1,b=-1;for(;++g<r.length;)if(r[g][0]===h){b=g;break}if(b===-1)r.push([h,...y]);else if(y.length>0){let[S,...E]=y;const A=r[b][1];Rd(A)&&Rd(S)&&(S=$f(!0,A,S)),r[b]=[h,S,...E]}}}}const ER=new kh().freeze();function Jf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Wf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function ed(t,l){if(l)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Yv(t){if(!Rd(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Vv(t,l,a){if(!a)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function Hu(t){return wR(t)?t:new F0(t)}function wR(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function TR(t){return typeof t=="string"||CR(t)}function CR(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const kR="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Pv=[],Xv={allowDangerousHtml:!0},AR=/^(https?|ircs?|mailto|xmpp)$/i,_R=[{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 RR(t){const l=DR(t),a=NR(t);return jR(l.runSync(l.parse(a),a),t)}function DR(t){const l=t.rehypePlugins||Pv,a=t.remarkPlugins||Pv,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Xv}:Xv;return ER().use(c2).use(a).use(aR,r).use(l)}function NR(t){const l=t.children||"",a=new F0;return typeof l=="string"&&(a.value=l),a}function jR(t,l){const a=l.allowedElements,r=l.allowElement,u=l.components,s=l.disallowedElements,c=l.skipHtml,d=l.unwrapDisallowed,p=l.urlTransform||OR;for(const y of _R)Object.hasOwn(l,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+kR+y.id,void 0);return Ch(t,h),Xk(t,{Fragment:v.Fragment,components:u,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(y,g,b){if(y.type==="raw"&&b&&typeof g=="number")return c?b.children.splice(g,1):b.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let S;for(S in Yf)if(Object.hasOwn(Yf,S)&&Object.hasOwn(y.properties,S)){const E=y.properties[S],A=Yf[S];(A===null||A.includes(y.tagName))&&(y.properties[S]=p(String(E||""),S,y))}}if(y.type==="element"){let S=a?!a.includes(y.tagName):s?s.includes(y.tagName):!1;if(!S&&r&&typeof g=="number"&&(S=!r(y,g,b)),S&&b&&typeof g=="number")return d&&y.children?b.children.splice(g,1,...y.children):b.children.splice(g,1),g}}}function OR(t){const l=t.indexOf(":"),a=t.indexOf("?"),r=t.indexOf("#"),u=t.indexOf("/");return l===-1||u!==-1&&l>u||a!==-1&&l>a||r!==-1&&l>r||AR.test(t.slice(0,l))?t:""}function $v(t,l){const a=String(t);if(typeof l!="string")throw new TypeError("Expected character");let r=0,u=a.indexOf(l);for(;u!==-1;)r++,u=a.indexOf(l,u+l.length);return r}function MR(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function zR(t,l,a){const u=ps((a||{}).ignore||[]),s=LR(l);let c=-1;for(;++c<s.length;)q0(t,"text",d);function d(h,y){let g=-1,b;for(;++g<y.length;){const S=y[g],E=b?b.children:void 0;if(u(S,E?E.indexOf(S):void 0,b))return;b=S}if(b)return p(h,y)}function p(h,y){const g=y[y.length-1],b=s[c][0],S=s[c][1];let E=0;const R=g.children.indexOf(h);let k=!1,_=[];b.lastIndex=0;let j=b.exec(h.value);for(;j;){const J=j.index,Q={index:j.index,input:j.input,stack:[...y,h]};let I=S(...j,Q);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?b.lastIndex=J+1:(E!==J&&_.push({type:"text",value:h.value.slice(E,J)}),Array.isArray(I)?_.push(...I):I&&_.push(I),E=J+j[0].length,k=!0),!b.global)break;j=b.exec(h.value)}return k?(E<h.value.length&&_.push({type:"text",value:h.value.slice(E)}),g.children.splice(R,1,..._)):_=[h],R+_.length}}function LR(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<a.length;){const u=a[r];l.push([UR(u[0]),BR(u[1])])}return l}function UR(t){return typeof t=="string"?new RegExp(MR(t),"g"):t}function BR(t){return typeof t=="function"?t:function(){return t}}const td="phrasing",nd=["autolink","link","image","label"];function HR(){return{transforms:[PR],enter:{literalAutolink:qR,literalAutolinkEmail:ld,literalAutolinkHttp:ld,literalAutolinkWww:ld},exit:{literalAutolink:VR,literalAutolinkEmail:YR,literalAutolinkHttp:FR,literalAutolinkWww:GR}}}function IR(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:td,notInConstruct:nd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:td,notInConstruct:nd},{character:":",before:"[ps]",after:"\\/",inConstruct:td,notInConstruct:nd}]}}function qR(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function ld(t){this.config.enter.autolinkProtocol.call(this,t)}function FR(t){this.config.exit.autolinkProtocol.call(this,t)}function GR(t){this.config.exit.data.call(this,t);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(t)}function YR(t){this.config.exit.autolinkEmail.call(this,t)}function VR(t){this.exit(t)}function PR(t){zR(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,XR],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),$R]],{ignore:["link","linkReference"]})}function XR(t,l,a,r,u){let s="";if(!G0(u)||(/^w/i.test(l)&&(a=l+a,l="",s="http://"),!QR(a)))return!1;const c=KR(a+r);if(!c[0])return!1;const d={type:"link",title:null,url:s+l+c[0],children:[{type:"text",value:l+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function $R(t,l,a,r){return!G0(r,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+a,children:[{type:"text",value:l+"@"+a}]}}function QR(t){const l=t.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))}function KR(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let a=l[0],r=a.indexOf(")");const u=$v(t,"(");let s=$v(t,")");for(;r!==-1&&u>s;)t+=a.slice(0,r+1),a=a.slice(r+1),r=a.indexOf(")"),s++;return[t,a]}function G0(t,l){const a=t.input.charCodeAt(t.index-1);return(t.index===0||ti(a)||ds(a))&&(!l||a!==47)}Y0.peek=iD;function ZR(){this.buffer()}function JR(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function WR(){this.buffer()}function eD(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function tD(t){const l=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=sl(this.sliceSerialize(t)).toLowerCase(),a.label=l}function nD(t){this.exit(t)}function lD(t){const l=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=sl(this.sliceSerialize(t)).toLowerCase(),a.label=l}function aD(t){this.exit(t)}function iD(){return"["}function Y0(t,l,a,r){const u=a.createTracker(r);let s=u.move("[^");const c=a.enter("footnoteReference"),d=a.enter("reference");return s+=u.move(a.safe(a.associationId(t),{after:"]",before:s})),d(),c(),s+=u.move("]"),s}function rD(){return{enter:{gfmFootnoteCallString:ZR,gfmFootnoteCall:JR,gfmFootnoteDefinitionLabelString:WR,gfmFootnoteDefinition:eD},exit:{gfmFootnoteCallString:tD,gfmFootnoteCall:nD,gfmFootnoteDefinitionLabelString:lD,gfmFootnoteDefinition:aD}}}function oD(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:a,footnoteReference:Y0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(r,u,s,c){const d=s.createTracker(c);let p=d.move("[^");const h=s.enter("footnoteDefinition"),y=s.enter("label");return p+=d.move(s.safe(s.associationId(r),{before:p,after:"]"})),y(),p+=d.move("]:"),r.children&&r.children.length>0&&(d.shift(4),p+=d.move((l?`
|
|
203
|
-
`:" ")+s.indentLines(s.containerFlow(r,d.current()),l?V0:uD))),h(),p}}function uD(t,l,a){return l===0?t:V0(t,l,a)}function V0(t,l,a){return(a?"":" ")+t}const sD=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];P0.peek=mD;function cD(){return{canContainEols:["delete"],enter:{strikethrough:dD},exit:{strikethrough:hD}}}function fD(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:sD}],handlers:{delete:P0}}}function dD(t){this.enter({type:"delete",children:[]},t)}function hD(t){this.exit(t)}function P0(t,l,a,r){const u=a.createTracker(r),s=a.enter("strikethrough");let c=u.move("~~");return c+=a.containerPhrasing(t,{...u.current(),before:c,after:"~"}),c+=u.move("~~"),s(),c}function mD(){return"~"}function pD(t){return t.length}function gD(t,l){const a=l||{},r=(a.align||[]).concat(),u=a.stringLength||pD,s=[],c=[],d=[],p=[];let h=0,y=-1;for(;++y<t.length;){const A=[],R=[];let k=-1;for(t[y].length>h&&(h=t[y].length);++k<t[y].length;){const _=yD(t[y][k]);if(a.alignDelimiters!==!1){const j=u(_);R[k]=j,(p[k]===void 0||j>p[k])&&(p[k]=j)}A.push(_)}c[y]=A,d[y]=R}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<h;)s[g]=Qv(r[g]);else{const A=Qv(r);for(;++g<h;)s[g]=A}g=-1;const b=[],S=[];for(;++g<h;){const A=s[g];let R="",k="";A===99?(R=":",k=":"):A===108?R=":":A===114&&(k=":");let _=a.alignDelimiters===!1?1:Math.max(1,p[g]-R.length-k.length);const j=R+"-".repeat(_)+k;a.alignDelimiters!==!1&&(_=R.length+_+k.length,_>p[g]&&(p[g]=_),S[g]=_),b[g]=j}c.splice(1,0,b),d.splice(1,0,S),y=-1;const E=[];for(;++y<c.length;){const A=c[y],R=d[y];g=-1;const k=[];for(;++g<h;){const _=A[g]||"";let j="",J="";if(a.alignDelimiters!==!1){const Q=p[g]-(R[g]||0),I=s[g];I===114?j=" ".repeat(Q):I===99?Q%2?(j=" ".repeat(Q/2+.5),J=" ".repeat(Q/2-.5)):(j=" ".repeat(Q/2),J=j):J=" ".repeat(Q)}a.delimiterStart!==!1&&!g&&k.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&_==="")&&(a.delimiterStart!==!1||g)&&k.push(" "),a.alignDelimiters!==!1&&k.push(j),k.push(_),a.alignDelimiters!==!1&&k.push(J),a.padding!==!1&&k.push(" "),(a.delimiterEnd!==!1||g!==h-1)&&k.push("|")}E.push(a.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return E.join(`
|
|
204
|
-
`)}function yD(t){return t==null?"":String(t)}function Qv(t){const l=typeof t=="string"?t.codePointAt(0):0;return l===67||l===99?99:l===76||l===108?108:l===82||l===114?114:0}function vD(t,l,a,r){const u=a.enter("blockquote"),s=a.createTracker(r);s.move("> "),s.shift(2);const c=a.indentLines(a.containerFlow(t,s.current()),bD);return u(),c}function bD(t,l,a){return">"+(a?"":" ")+t}function xD(t,l){return Kv(t,l.inConstruct,!0)&&!Kv(t,l.notInConstruct,!1)}function Kv(t,l,a){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return a;let r=-1;for(;++r<l.length;)if(t.includes(l[r]))return!0;return!1}function Zv(t,l,a,r){let u=-1;for(;++u<a.unsafe.length;)if(a.unsafe[u].character===`
|
|
205
|
-
`&&xD(a.stack,a.unsafe[u]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
206
|
-
`}function SD(t,l){const a=String(t);let r=a.indexOf(l),u=r,s=0,c=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===u?++s>c&&(c=s):s=1,u=r+l.length,r=a.indexOf(l,u);return c}function ED(t,l){return!!(l.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function wD(t){const l=t.options.fence||"`";if(l!=="`"&&l!=="~")throw new Error("Cannot serialize code with `"+l+"` for `options.fence`, expected `` ` `` or `~`");return l}function TD(t,l,a,r){const u=wD(a),s=t.value||"",c=u==="`"?"GraveAccent":"Tilde";if(ED(t,a)){const g=a.enter("codeIndented"),b=a.indentLines(s,CD);return g(),b}const d=a.createTracker(r),p=u.repeat(Math.max(SD(s,u)+1,3)),h=a.enter("codeFenced");let y=d.move(p);if(t.lang){const g=a.enter(`codeFencedLang${c}`);y+=d.move(a.safe(t.lang,{before:y,after:" ",encode:["`"],...d.current()})),g()}if(t.lang&&t.meta){const g=a.enter(`codeFencedMeta${c}`);y+=d.move(" "),y+=d.move(a.safe(t.meta,{before:y,after:`
|
|
207
|
-
`,encode:["`"],...d.current()})),g()}return y+=d.move(`
|
|
208
|
-
`),s&&(y+=d.move(s+`
|
|
209
|
-
`)),y+=d.move(p),h(),y}function CD(t,l,a){return(a?"":" ")+t}function Ah(t){const l=t.options.quote||'"';if(l!=='"'&&l!=="'")throw new Error("Cannot serialize title with `"+l+"` for `options.quote`, expected `\"`, or `'`");return l}function kD(t,l,a,r){const u=Ah(a),s=u==='"'?"Quote":"Apostrophe",c=a.enter("definition");let d=a.enter("label");const p=a.createTracker(r);let h=p.move("[");return h+=p.move(a.safe(a.associationId(t),{before:h,after:"]",...p.current()})),h+=p.move("]: "),d(),!t.url||/[\0- \u007F]/.test(t.url)?(d=a.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(a.safe(t.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(d=a.enter("destinationRaw"),h+=p.move(a.safe(t.url,{before:h,after:t.title?" ":`
|
|
210
|
-
`,...p.current()}))),d(),t.title&&(d=a.enter(`title${s}`),h+=p.move(" "+u),h+=p.move(a.safe(t.title,{before:h,after:u,...p.current()})),h+=p.move(u),d()),c(),h}function AD(t){const l=t.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function uo(t){return"&#x"+t.toString(16).toUpperCase()+";"}function ns(t,l,a){const r=Pi(t),u=Pi(l);return r===void 0?u===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}X0.peek=_D;function X0(t,l,a,r){const u=AD(a),s=a.enter("emphasis"),c=a.createTracker(r),d=c.move(u);let p=c.move(a.containerPhrasing(t,{after:u,before:d,...c.current()}));const h=p.charCodeAt(0),y=ns(r.before.charCodeAt(r.before.length-1),h,u);y.inside&&(p=uo(h)+p.slice(1));const g=p.charCodeAt(p.length-1),b=ns(r.after.charCodeAt(0),g,u);b.inside&&(p=p.slice(0,-1)+uo(g));const S=c.move(u);return s(),a.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+S}function _D(t,l,a){return a.options.emphasis||"*"}function RD(t,l){let a=!1;return Ch(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return a=!0,Ad}),!!((!t.depth||t.depth<3)&&vh(t)&&(l.options.setext||a))}function DD(t,l,a,r){const u=Math.max(Math.min(6,t.depth||1),1),s=a.createTracker(r);if(RD(t,a)){const y=a.enter("headingSetext"),g=a.enter("phrasing"),b=a.containerPhrasing(t,{...s.current(),before:`
|
|
211
|
-
`,after:`
|
|
212
|
-
`});return g(),y(),b+`
|
|
213
|
-
`+(u===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
214
|
-
`))+1))}const c="#".repeat(u),d=a.enter("headingAtx"),p=a.enter("phrasing");s.move(c+" ");let h=a.containerPhrasing(t,{before:"# ",after:`
|
|
215
|
-
`,...s.current()});return/^[\t ]/.test(h)&&(h=uo(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,a.options.closeAtx&&(h+=" "+c),p(),d(),h}$0.peek=ND;function $0(t){return t.value||""}function ND(){return"<"}Q0.peek=jD;function Q0(t,l,a,r){const u=Ah(a),s=u==='"'?"Quote":"Apostrophe",c=a.enter("image");let d=a.enter("label");const p=a.createTracker(r);let h=p.move("![");return h+=p.move(a.safe(t.alt,{before:h,after:"]",...p.current()})),h+=p.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=a.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(a.safe(t.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(d=a.enter("destinationRaw"),h+=p.move(a.safe(t.url,{before:h,after:t.title?" ":")",...p.current()}))),d(),t.title&&(d=a.enter(`title${s}`),h+=p.move(" "+u),h+=p.move(a.safe(t.title,{before:h,after:u,...p.current()})),h+=p.move(u),d()),h+=p.move(")"),c(),h}function jD(){return"!"}K0.peek=OD;function K0(t,l,a,r){const u=t.referenceType,s=a.enter("imageReference");let c=a.enter("label");const d=a.createTracker(r);let p=d.move("![");const h=a.safe(t.alt,{before:p,after:"]",...d.current()});p+=d.move(h+"]["),c();const y=a.stack;a.stack=[],c=a.enter("reference");const g=a.safe(a.associationId(t),{before:p,after:"]",...d.current()});return c(),a.stack=y,s(),u==="full"||!h||h!==g?p+=d.move(g+"]"):u==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function OD(){return"!"}Z0.peek=MD;function Z0(t,l,a){let r=t.value||"",u="`",s=-1;for(;new RegExp("(^|[^`])"+u+"([^`]|$)").test(r);)u+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<a.unsafe.length;){const c=a.unsafe[s],d=a.compilePattern(c);let p;if(c.atBreak)for(;p=d.exec(r);){let h=p.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(p.index+1)}}return u+r+u}function MD(){return"`"}function J0(t,l){const a=vh(t);return!!(!l.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(a===t.url||"mailto:"+a===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}W0.peek=zD;function W0(t,l,a,r){const u=Ah(a),s=u==='"'?"Quote":"Apostrophe",c=a.createTracker(r);let d,p;if(J0(t,a)){const y=a.stack;a.stack=[],d=a.enter("autolink");let g=c.move("<");return g+=c.move(a.containerPhrasing(t,{before:g,after:">",...c.current()})),g+=c.move(">"),d(),a.stack=y,g}d=a.enter("link"),p=a.enter("label");let h=c.move("[");return h+=c.move(a.containerPhrasing(t,{before:h,after:"](",...c.current()})),h+=c.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=a.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(a.safe(t.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(p=a.enter("destinationRaw"),h+=c.move(a.safe(t.url,{before:h,after:t.title?" ":")",...c.current()}))),p(),t.title&&(p=a.enter(`title${s}`),h+=c.move(" "+u),h+=c.move(a.safe(t.title,{before:h,after:u,...c.current()})),h+=c.move(u),p()),h+=c.move(")"),d(),h}function zD(t,l,a){return J0(t,a)?"<":"["}ex.peek=LD;function ex(t,l,a,r){const u=t.referenceType,s=a.enter("linkReference");let c=a.enter("label");const d=a.createTracker(r);let p=d.move("[");const h=a.containerPhrasing(t,{before:p,after:"]",...d.current()});p+=d.move(h+"]["),c();const y=a.stack;a.stack=[],c=a.enter("reference");const g=a.safe(a.associationId(t),{before:p,after:"]",...d.current()});return c(),a.stack=y,s(),u==="full"||!h||h!==g?p+=d.move(g+"]"):u==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function LD(){return"["}function _h(t){const l=t.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function UD(t){const l=_h(t),a=t.options.bulletOther;if(!a)return l==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+a+"`) to be different");return a}function BD(t){const l=t.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function tx(t){const l=t.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function HD(t,l,a,r){const u=a.enter("list"),s=a.bulletCurrent;let c=t.ordered?BD(a):_h(a);const d=t.ordered?c==="."?")":".":UD(a);let p=l&&a.bulletLastUsed?c===a.bulletLastUsed:!1;if(!t.ordered){const y=t.children?t.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(p=!0),tx(a)===c&&y){let g=-1;for(;++g<t.children.length;){const b=t.children[g];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=d),a.bulletCurrent=c;const h=a.containerFlow(t,r);return a.bulletLastUsed=c,a.bulletCurrent=s,u(),h}function ID(t){const l=t.options.listItemIndent||"one";if(l!=="tab"&&l!=="one"&&l!=="mixed")throw new Error("Cannot serialize items with `"+l+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return l}function qD(t,l,a,r){const u=ID(a);let s=a.bulletCurrent||_h(a);l&&l.type==="list"&&l.ordered&&(s=(typeof l.start=="number"&&l.start>-1?l.start:1)+(a.options.incrementListMarker===!1?0:l.children.indexOf(t))+s);let c=s.length+1;(u==="tab"||u==="mixed"&&(l&&l.type==="list"&&l.spread||t.spread))&&(c=Math.ceil(c/4)*4);const d=a.createTracker(r);d.move(s+" ".repeat(c-s.length)),d.shift(c);const p=a.enter("listItem"),h=a.indentLines(a.containerFlow(t,d.current()),y);return p(),h;function y(g,b,S){return b?(S?"":" ".repeat(c))+g:(S?s:s+" ".repeat(c-s.length))+g}}function FD(t,l,a,r){const u=a.enter("paragraph"),s=a.enter("phrasing"),c=a.containerPhrasing(t,r);return s(),u(),c}const GD=ps(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function YD(t,l,a,r){return(t.children.some(function(c){return GD(c)})?a.containerPhrasing:a.containerFlow).call(a,t,r)}function VD(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}nx.peek=PD;function nx(t,l,a,r){const u=VD(a),s=a.enter("strong"),c=a.createTracker(r),d=c.move(u+u);let p=c.move(a.containerPhrasing(t,{after:u,before:d,...c.current()}));const h=p.charCodeAt(0),y=ns(r.before.charCodeAt(r.before.length-1),h,u);y.inside&&(p=uo(h)+p.slice(1));const g=p.charCodeAt(p.length-1),b=ns(r.after.charCodeAt(0),g,u);b.inside&&(p=p.slice(0,-1)+uo(g));const S=c.move(u+u);return s(),a.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+S}function PD(t,l,a){return a.options.strong||"*"}function XD(t,l,a,r){return a.safe(t.value,r)}function $D(t){const l=t.options.ruleRepetition||3;if(l<3)throw new Error("Cannot serialize rules with repetition `"+l+"` for `options.ruleRepetition`, expected `3` or more");return l}function QD(t,l,a){const r=(tx(a)+(a.options.ruleSpaces?" ":"")).repeat($D(a));return a.options.ruleSpaces?r.slice(0,-1):r}const lx={blockquote:vD,break:Zv,code:TD,definition:kD,emphasis:X0,hardBreak:Zv,heading:DD,html:$0,image:Q0,imageReference:K0,inlineCode:Z0,link:W0,linkReference:ex,list:HD,listItem:qD,paragraph:FD,root:YD,strong:nx,text:XD,thematicBreak:QD};function KD(){return{enter:{table:ZD,tableData:Jv,tableHeader:Jv,tableRow:WD},exit:{codeText:eN,table:JD,tableData:ad,tableHeader:ad,tableRow:ad}}}function ZD(t){const l=t._align;this.enter({type:"table",align:l.map(function(a){return a==="none"?null:a}),children:[]},t),this.data.inTable=!0}function JD(t){this.exit(t),this.data.inTable=void 0}function WD(t){this.enter({type:"tableRow",children:[]},t)}function ad(t){this.exit(t)}function Jv(t){this.enter({type:"tableCell",children:[]},t)}function eN(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,tN));const a=this.stack[this.stack.length-1];a.type,a.value=l,this.exit(t)}function tN(t,l){return l==="|"?l:t}function nN(t){const l=t||{},a=l.tableCellPadding,r=l.tablePipeAlign,u=l.stringLength,s=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
216
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:c,tableCell:p,tableRow:d}};function c(S,E,A,R){return h(y(S,A,R),S.align)}function d(S,E,A,R){const k=g(S,A,R),_=h([k]);return _.slice(0,_.indexOf(`
|
|
217
|
-
`))}function p(S,E,A,R){const k=A.enter("tableCell"),_=A.enter("phrasing"),j=A.containerPhrasing(S,{...R,before:s,after:s});return _(),k(),j}function h(S,E){return gD(S,{align:E,alignDelimiters:r,padding:a,stringLength:u})}function y(S,E,A){const R=S.children;let k=-1;const _=[],j=E.enter("table");for(;++k<R.length;)_[k]=g(R[k],E,A);return j(),_}function g(S,E,A){const R=S.children;let k=-1;const _=[],j=E.enter("tableRow");for(;++k<R.length;)_[k]=p(R[k],S,E,A);return j(),_}function b(S,E,A){let R=lx.inlineCode(S,E,A);return A.stack.includes("tableCell")&&(R=R.replace(/\|/g,"\\$&")),R}}function lN(){return{exit:{taskListCheckValueChecked:Wv,taskListCheckValueUnchecked:Wv,paragraph:iN}}}function aN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rN}}}function Wv(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function iN(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const r=a.children[0];if(r&&r.type==="text"){const u=l.children;let s=-1,c;for(;++s<u.length;){const d=u[s];if(d.type==="paragraph"){c=d;break}}c===a&&(r.value=r.value.slice(1),r.value.length===0?a.children.shift():a.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,a.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function rN(t,l,a,r){const u=t.children[0],s=typeof t.checked=="boolean"&&u&&u.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",d=a.createTracker(r);s&&d.move(c);let p=lx.listItem(t,l,a,{...r,...d.current()});return s&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),p;function h(y){return y+c}}function oN(){return[HR(),rD(),cD(),KD(),lN()]}function uN(t){return{extensions:[IR(),oD(t),fD(),nN(t),aN()]}}const sN={tokenize:pN,partial:!0},ax={tokenize:gN,partial:!0},ix={tokenize:yN,partial:!0},rx={tokenize:vN,partial:!0},cN={tokenize:bN,partial:!0},ox={name:"wwwAutolink",tokenize:hN,previous:sx},ux={name:"protocolAutolink",tokenize:mN,previous:cx},Jl={name:"emailAutolink",tokenize:dN,previous:fx},Al={};function fN(){return{text:Al}}let Wa=48;for(;Wa<123;)Al[Wa]=Jl,Wa++,Wa===58?Wa=65:Wa===91&&(Wa=97);Al[43]=Jl;Al[45]=Jl;Al[46]=Jl;Al[95]=Jl;Al[72]=[Jl,ux];Al[104]=[Jl,ux];Al[87]=[Jl,ox];Al[119]=[Jl,ox];function dN(t,l,a){const r=this;let u,s;return c;function c(g){return!Nd(g)||!fx.call(r,r.previous)||Rh(r.events)?a(g):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(g))}function d(g){return Nd(g)?(t.consume(g),d):g===64?(t.consume(g),p):a(g)}function p(g){return g===46?t.check(cN,y,h)(g):g===45||g===95||un(g)?(s=!0,t.consume(g),p):y(g)}function h(g){return t.consume(g),u=!0,p}function y(g){return s&&u&&pn(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(g)):a(g)}}function hN(t,l,a){const r=this;return u;function u(c){return c!==87&&c!==119||!sx.call(r,r.previous)||Rh(r.events)?a(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(sN,t.attempt(ax,t.attempt(ix,s),a),a)(c))}function s(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(c)}}function mN(t,l,a){const r=this;let u="",s=!1;return c;function c(g){return(g===72||g===104)&&cx.call(r,r.previous)&&!Rh(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),u+=String.fromCodePoint(g),t.consume(g),d):a(g)}function d(g){if(pn(g)&&u.length<5)return u+=String.fromCodePoint(g),t.consume(g),d;if(g===58){const b=u.toLowerCase();if(b==="http"||b==="https")return t.consume(g),p}return a(g)}function p(g){return g===47?(t.consume(g),s?h:(s=!0,p)):a(g)}function h(g){return g===null||Wu(g)||bt(g)||ti(g)||ds(g)?a(g):t.attempt(ax,t.attempt(ix,y),a)(g)}function y(g){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(g)}}function pN(t,l,a){let r=0;return u;function u(c){return(c===87||c===119)&&r<3?(r++,t.consume(c),u):c===46&&r===3?(t.consume(c),s):a(c)}function s(c){return c===null?a(c):l(c)}}function gN(t,l,a){let r,u,s;return c;function c(h){return h===46||h===95?t.check(rx,p,d)(h):h===null||bt(h)||ti(h)||h!==45&&ds(h)?p(h):(s=!0,t.consume(h),c)}function d(h){return h===95?r=!0:(u=r,r=void 0),t.consume(h),c}function p(h){return u||r||!s?a(h):l(h)}}function yN(t,l){let a=0,r=0;return u;function u(c){return c===40?(a++,t.consume(c),u):c===41&&r<a?s(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?t.check(rx,l,s)(c):c===null||bt(c)||ti(c)?l(c):(t.consume(c),u)}function s(c){return c===41&&r++,t.consume(c),u}}function vN(t,l,a){return r;function r(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(t.consume(d),r):d===38?(t.consume(d),s):d===93?(t.consume(d),u):d===60||d===null||bt(d)||ti(d)?l(d):a(d)}function u(d){return d===null||d===40||d===91||bt(d)||ti(d)?l(d):r(d)}function s(d){return pn(d)?c(d):a(d)}function c(d){return d===59?(t.consume(d),r):pn(d)?(t.consume(d),c):a(d)}}function bN(t,l,a){return r;function r(s){return t.consume(s),u}function u(s){return un(s)?a(s):l(s)}}function sx(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||bt(t)}function cx(t){return!pn(t)}function fx(t){return!(t===47||Nd(t))}function Nd(t){return t===43||t===45||t===46||t===95||un(t)}function Rh(t){let l=t.length,a=!1;for(;l--;){const r=t[l][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){a=!0;break}if(r._gfmAutolinkLiteralWalkedInto){a=!1;break}}return t.length>0&&!a&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const xN={tokenize:_N,partial:!0};function SN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:CN,continuation:{tokenize:kN},exit:AN}},text:{91:{name:"gfmFootnoteCall",tokenize:TN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:EN,resolveTo:wN}}}}function EN(t,l,a){const r=this;let u=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c;for(;u--;){const p=r.events[u][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 d;function d(p){if(!c||!c._balanced)return a(p);const h=sl(r.sliceSerialize({start:c.end,end:r.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?a(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),l(p))}}function wN(t,l){let a=t.length;for(;a--;)if(t[a][1].type==="labelImage"&&t[a][0]==="enter"){t[a][1];break}t[a+1][1].type="data",t[a+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[a+3][1].start),end:Object.assign({},t[t.length-1][1].end)},u={type:"gfmFootnoteCallMarker",start:Object.assign({},t[a+3][1].end),end:Object.assign({},t[a+3][1].end)};u.end.column++,u.end.offset++,u.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},u.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},d=[t[a+1],t[a+2],["enter",r,l],t[a+3],t[a+4],["enter",u,l],["exit",u,l],["enter",s,l],["enter",c,l],["exit",c,l],["exit",s,l],t[t.length-2],t[t.length-1],["exit",r,l]];return t.splice(a,t.length-a+1,...d),t}function TN(t,l,a){const r=this,u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,c;return d;function d(g){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),p}function p(g){return g!==94?a(g):(t.enter("gfmFootnoteCallMarker"),t.consume(g),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",h)}function h(g){if(s>999||g===93&&!c||g===null||g===91||bt(g))return a(g);if(g===93){t.exit("chunkString");const b=t.exit("gfmFootnoteCallString");return u.includes(sl(r.sliceSerialize(b)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):a(g)}return bt(g)||(c=!0),s++,t.consume(g),g===92?y:h}function y(g){return g===91||g===92||g===93?(t.consume(g),s++,h):h(g)}}function CN(t,l,a){const r=this,u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,c=0,d;return p;function p(E){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(E){return E===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):a(E)}function y(E){if(c>999||E===93&&!d||E===null||E===91||bt(E))return a(E);if(E===93){t.exit("chunkString");const A=t.exit("gfmFootnoteDefinitionLabelString");return s=sl(r.sliceSerialize(A)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return bt(E)||(d=!0),c++,t.consume(E),E===92?g:y}function g(E){return E===91||E===92||E===93?(t.consume(E),c++,y):y(E)}function b(E){return E===58?(t.enter("definitionMarker"),t.consume(E),t.exit("definitionMarker"),u.includes(s)||u.push(s),it(t,S,"gfmFootnoteDefinitionWhitespace")):a(E)}function S(E){return l(E)}}function kN(t,l,a){return t.check(vo,l,t.attempt(xN,l,a))}function AN(t){t.exit("gfmFootnoteDefinition")}function _N(t,l,a){const r=this;return it(t,u,"gfmFootnoteDefinitionIndent",5);function u(s){const c=r.events[r.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?l(s):a(s)}}function RN(t){let a=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:u};return a==null&&(a=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function u(c,d){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 y={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[p][1].end)},g={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[p][1].start)},b=[["enter",y,d],["enter",c[h][1],d],["exit",c[h][1],d],["enter",g,d]],S=d.parser.constructs.insideSpan.null;S&&Fn(b,b.length,0,hs(S,c.slice(h+1,p),d)),Fn(b,b.length,0,[["exit",g,d],["enter",c[p][1],d],["exit",c[p][1],d],["exit",y,d]]),Fn(c,h-1,p-h+3,b),p=h+b.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function s(c,d,p){const h=this.previous,y=this.events;let g=0;return b;function b(E){return h===126&&y[y.length-1][1].type!=="characterEscape"?p(E):(c.enter("strikethroughSequenceTemporary"),S(E))}function S(E){const A=Pi(h);if(E===126)return g>1?p(E):(c.consume(E),g++,S);if(g<2&&!a)return p(E);const R=c.exit("strikethroughSequenceTemporary"),k=Pi(E);return R._open=!k||k===2&&!!A,R._close=!A||A===2&&!!k,d(E)}}}class DN{constructor(){this.map=[]}add(l,a,r){NN(this,l,a,r)}consume(l){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let a=this.map.length;const r=[];for(;a>0;)a-=1,r.push(l.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),l.length=this.map[a][0];r.push(l.slice()),l.length=0;let u=r.pop();for(;u;){for(const s of u)l.push(s);u=r.pop()}this.map.length=0}}function NN(t,l,a,r){let u=0;if(!(a===0&&r.length===0)){for(;u<t.map.length;){if(t.map[u][0]===l){t.map[u][1]+=a,t.map[u][2].push(...r);return}u+=1}t.map.push([l,a,r])}}function jN(t,l){let a=!1;const r=[];for(;l<t.length;){const u=t[l];if(a){if(u[0]==="enter")u[1].type==="tableContent"&&r.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(u[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(u[1].type==="tableDelimiterRow")break}else u[0]==="enter"&&u[1].type==="tableDelimiterRow"&&(a=!0);l+=1}return r}function ON(){return{flow:{null:{name:"table",tokenize:MN,resolveAll:zN}}}}function MN(t,l,a){const r=this;let u=0,s=0,c;return d;function d(D){let q=r.events.length-1;for(;q>-1;){const ue=r.events[q][1].type;if(ue==="lineEnding"||ue==="linePrefix")q--;else break}const F=q>-1?r.events[q][1].type:null,V=F==="tableHead"||F==="tableRow"?I:p;return V===I&&r.parser.lazy[r.now().line]?a(D):V(D)}function p(D){return t.enter("tableHead"),t.enter("tableRow"),h(D)}function h(D){return D===124||(c=!0,s+=1),y(D)}function y(D){return D===null?a(D):Me(D)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),S):a(D):Ze(D)?it(t,y,"whitespace")(D):(s+=1,c&&(c=!1,u+=1),D===124?(t.enter("tableCellDivider"),t.consume(D),t.exit("tableCellDivider"),c=!0,y):(t.enter("data"),g(D)))}function g(D){return D===null||D===124||bt(D)?(t.exit("data"),y(D)):(t.consume(D),D===92?b:g)}function b(D){return D===92||D===124?(t.consume(D),g):g(D)}function S(D){return r.interrupt=!1,r.parser.lazy[r.now().line]?a(D):(t.enter("tableDelimiterRow"),c=!1,Ze(D)?it(t,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):E(D))}function E(D){return D===45||D===58?R(D):D===124?(c=!0,t.enter("tableCellDivider"),t.consume(D),t.exit("tableCellDivider"),A):Q(D)}function A(D){return Ze(D)?it(t,R,"whitespace")(D):R(D)}function R(D){return D===58?(s+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(D),t.exit("tableDelimiterMarker"),k):D===45?(s+=1,k(D)):D===null||Me(D)?J(D):Q(D)}function k(D){return D===45?(t.enter("tableDelimiterFiller"),_(D)):Q(D)}function _(D){return D===45?(t.consume(D),_):D===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(D),t.exit("tableDelimiterMarker"),j):(t.exit("tableDelimiterFiller"),j(D))}function j(D){return Ze(D)?it(t,J,"whitespace")(D):J(D)}function J(D){return D===124?E(D):D===null||Me(D)?!c||u!==s?Q(D):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(D)):Q(D)}function Q(D){return a(D)}function I(D){return t.enter("tableRow"),O(D)}function O(D){return D===124?(t.enter("tableCellDivider"),t.consume(D),t.exit("tableCellDivider"),O):D===null||Me(D)?(t.exit("tableRow"),l(D)):Ze(D)?it(t,O,"whitespace")(D):(t.enter("data"),le(D))}function le(D){return D===null||D===124||bt(D)?(t.exit("data"),O(D)):(t.consume(D),D===92?ne:le)}function ne(D){return D===92||D===124?(t.consume(D),le):le(D)}}function zN(t,l){let a=-1,r=!0,u=0,s=[0,0,0,0],c=[0,0,0,0],d=!1,p=0,h,y,g;const b=new DN;for(;++a<t.length;){const S=t[a],E=S[1];S[0]==="enter"?E.type==="tableHead"?(d=!1,p!==0&&(eb(b,l,p,h,y),y=void 0,p=0),h={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(a,0,[["enter",h,l]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,g=void 0,s=[0,0,0,0],c=[0,a+1,0,0],d&&(d=!1,y={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(a,0,[["enter",y,l]])),u=E.type==="tableDelimiterRow"?2:y?3:1):u&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],g=Iu(b,l,s,u,void 0,g),s=[0,0,0,0]),c[2]=a)):E.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(c[0]=c[1],g=Iu(b,l,s,u,void 0,g)),s=c,c=[s[1],a,0,0])):E.type==="tableHead"?(d=!0,p=a):E.type==="tableRow"||E.type==="tableDelimiterRow"?(p=a,s[1]!==0?(c[0]=c[1],g=Iu(b,l,s,u,a,g)):c[1]!==0&&(g=Iu(b,l,c,u,a,g)),u=0):u&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=a)}for(p!==0&&eb(b,l,p,h,y),b.consume(l.events),a=-1;++a<l.events.length;){const S=l.events[a];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=jN(l.events,a))}return t}function Iu(t,l,a,r,u,s){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",d="tableContent";a[0]!==0&&(s.end=Object.assign({},qi(l.events,a[0])),t.add(a[0],0,[["exit",s,l]]));const p=qi(l.events,a[1]);if(s={type:c,start:Object.assign({},p),end:Object.assign({},p)},t.add(a[1],0,[["enter",s,l]]),a[2]!==0){const h=qi(l.events,a[2]),y=qi(l.events,a[3]),g={type:d,start:Object.assign({},h),end:Object.assign({},y)};if(t.add(a[2],0,[["enter",g,l]]),r!==2){const b=l.events[a[2]],S=l.events[a[3]];if(b[1].end=Object.assign({},S[1].end),b[1].type="chunkText",b[1].contentType="text",a[3]>a[2]+1){const E=a[2]+1,A=a[3]-a[2]-1;t.add(E,A,[])}}t.add(a[3]+1,0,[["exit",g,l]])}return u!==void 0&&(s.end=Object.assign({},qi(l.events,u)),t.add(u,0,[["exit",s,l]]),s=void 0),s}function eb(t,l,a,r,u){const s=[],c=qi(l.events,a);u&&(u.end=Object.assign({},c),s.push(["exit",u,l])),r.end=Object.assign({},c),s.push(["exit",r,l]),t.add(a+1,0,s)}function qi(t,l){const a=t[l],r=a[0]==="enter"?"start":"end";return a[1][r]}const LN={name:"tasklistCheck",tokenize:BN};function UN(){return{text:{91:LN}}}function BN(t,l,a){const r=this;return u;function u(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?a(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),s)}function s(p){return bt(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),c):a(p)}function c(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),d):a(p)}function d(p){return Me(p)?l(p):Ze(p)?t.check({tokenize:HN},l,a)(p):a(p)}}function HN(t,l,a){return it(t,r,"whitespace");function r(u){return u===null?a(u):l(u)}}function IN(t){return E0([fN(),SN(),RN(t),ON(),UN()])}const qN={};function FN(t){const l=this,a=t||qN,r=l.data(),u=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);u.push(IN(a)),s.push(oN()),c.push(uN(a))}const jd=new Set(["<",">","{","}","[","]"]),GN=new Set(["for","do","while","if","else","return","function","var","let","const","true","false","undefined","this","new","delete","typeof","in","instanceof","void","break","continue","switch","case","default","throw","try","catch","finally","debugger","with","yield","async","await","class","extends","super","import","export","from","static"]),dx=new Set(["+","-","*","/","%","=","!","&","|","^","~","!","?",":",".",",",";","'",'"',".","(",")","[","]","#","@","\\",...jd]),YN={keywords:GN,onCommentStart:gx,onCommentEnd:WN},Dh=["identifier","keyword","string","class","property","entity","jsxliterals","sign","comment","break","space"],[id,VN,Ta,PN,rd,XN,$N,$l,tb,Od,nb]=Dh.map((t,l)=>l);function qu(t){return/^[^\S\r\n]+$/g.test(t)}function QN(t){return dx.has(t)}function KN(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ls(t){return/^[\w_]+$/.test(t)||hx(t)}function ZN(t){const l=t[0];return ls(l)&&l===l.toUpperCase()||t==="null"}function hx(t){return/[^\u0000-\u007f]/.test(t)}function mx(t){return/^[a-zA-Z]$/.test(t)}function px(t){return mx(t)||hx(t)}function Fu(t){return px(t[0])&&(t.length===1||ls(t.slice(1)))}function Md(t){return t==="`"}function zd(t){return t==='"'||t==="'"}function JN(t){return zd(t)||Md(t)}function gx(t,l){const a=t+l;return a==="/*"?2:a==="//"?1:0}function WN(t,l){return t+l==="*/"?2:l===`
|
|
218
|
-
`?1:0}function ej(t){return t[0]==="/"&&!gx(t[0],t[1])}function tj(t,l){const{keywords:a,onCommentStart:r,onCommentEnd:u}={...YN,...l};let s="",c=-1,d=[-1,""],p=[-2,""];const h=[];let y=!1,g=0,b=!1,S=0;const E=()=>y&&!b&&!g,A=()=>g&&!E(),R=()=>!g&&E()&&!b&&S>0;let k=null,_=!1,j=0,J=0;const Q=()=>k!==null,I=()=>_,O=()=>J>j,le=()=>J>0&&J===j,ne=()=>Q()||O();function D(F){const V=F===`
|
|
219
|
-
`;if(A()){if(Q())return Ta;const[,W]=d;if(Fu(F)&&(W==="<"||W==="</"))return XN}if(R())return $N;if(Q()||O())return Ta;if(a.has(F))return d[1]==="."?id:VN;if(V)return Od;if(qu(F))return nb;if(F.split("").every(QN))return $l;if(ZN(F))return A()?id:PN;if(Fu(F)){const W=d[1]==="."&&Fu(p[1]);if(!ne()&&!W)return id;if(W)return rd}return Ta}const q=(F,V)=>{if(V&&(s=V),s){c=F||D(s);const ue=[c,s];c!==nb&&c!==Od&&(p=d,d=ue),h.push(ue)}s=""};for(let F=0;F<t.length;F++){const V=t[F],ue=t[F-1],W=t[F+1],B=ue+V,ee=V+W;if(zd(V)&&!R()&&!O()){q(),ue!=="\\"&&(k&&V===k?k=null:k||(k=V)),q(Ta,V);continue}if(!O()&&ue!=="\\n"&&Md(V)){q(),q(Ta,V),J++;continue}if(O()){if(ue!=="\\n"&&Md(V)&&J>0){q(),J--,q(Ta,V);continue}if(ee==="${"){j++,q(Ta),q($l,ee),F++;continue}}if(le()&&V==="}"){q(),j--,q($l,V);continue}if(E()&&V==="{"){q(),q($l,V),b=!0;continue}if(y){if(!g&&V==="<"){q(),W==="/"?(g=2,s=ee,F++):(g=1,s=V),q($l);continue}if(g){if(V===">"&&!"/=".includes(ue)){q(),g===1?(g=0,S++):(g=0,y=!1),q($l,V);continue}if(ee==="/>"||ee==="</"){s!=="<"&&s!=="/"&&q(),ee==="/>"?g=0:S--,S||(y=!1),s=ee,F++,q($l);continue}if(V==="<"){q(),s=V,q($l);continue}if(W==="-"&&!ne()&&!R()&&s){q(rd,s+V+W),F++;continue}if(W==="="&&!ne()&&!qu(V)){qu(s)&&q();const Z=s+V;if(Fu(Z)){q(rd,Z);continue}}}}!g&&(V==="<"&&px(W)||ee==="</")&&(g=W==="/"?2:1,V==="<"&&(W==="/"||mx(W))&&!ne()&&!R()&&!I()&&(y=!0));const ie=JN(V),be=O(),N=!y&&ej(ee),M=R();if(ie||be||zd(k))s+=V;else if(N){q();const[Z,C]=d;if(N&&Z!==-1&&!(Z===$l&&C!==")"||Z===tb)){s=V,q();continue}_=!0;const de=F++,ge=()=>F>=t.length,Te=()=>ge()||t[F]===`
|
|
220
|
-
`;let ze=!1;for(;!Te();F++)if(t[F]==="/"&&t[F-1]!=="\\"){for(ze=!0;de!==F&&/^[a-z]$/.test(t[F+1])&&!Te();)F++;break}_=!1,de!==F&&ze?(s=t.slice(de,F+1),q(Ta)):(s=V,q(),F=de)}else if(r(V,W)){q();const Z=F,C=r(V,W);if(C)for(;F<t.length&&u(t[F-1],t[F])!=C;F++);s=t.slice(Z,F+1),q(tb)}else V===" "||V===`
|
|
221
|
-
`?V===" "&&(qu(s)||!s||M)?(s+=V,W==="<"&&q()):(q(),s=V,q()):b&&V==="}"?(q(),s=V,q(),b=!1):M&&!jd.has(V)||O()||(ls(V)===ls(s[s.length-1])||E())&&!dx.has(V)?s+=V:(B==="</"&&(s=B),q(),B!=="</"&&(s=V),ee==="</"||ee==="/>"?(s=ee,q(),F++):jd.has(V)&&q())}return q(),h}function nj(t){const l=[],a=c=>({type:"element",tagName:"span",children:c,properties:{className:"sh__line"}});function r(c){const d=c.map(([p,h])=>{const y=Dh[p];return{type:"element",tagName:"span",children:[{type:"text",value:h}],properties:{className:`sh__token--${y}`,style:{color:`var(--sh-${y})`}}}});l.push(a(d))}const u=[];let s=!1;for(let c=0;c<t.length;c++){const d=t[c],[p,h]=d,y=c===t.length-1;if(p!==Od){if(h.includes(`
|
|
222
|
-
`)){const g=h.split(`
|
|
223
|
-
`);for(let b=0;b<g.length;b++)u.push([p,g[b]]),b<g.length-1&&(r(u),u.length=0)}else u.push(d);s=!1}else s?r([]):(r(u),u.length=0),y&&r([]),s=!0}return u.length&&r(u),l}const lj=t=>{let l=`class="${t.className}"`;if(t.style){const a=Object.entries(t.style).map(([r,u])=>`${r}:${u}`).join(";");l+=` style="${a}"`}return l};function aj(t){return t.map(l=>{const{tagName:a}=l,r=l.children.map(u=>{const{tagName:s,children:c,properties:d}=u;return`<${s} ${lj(d)}>${KN(c[0].value)}</${s}>`}).join("");return`<${a} class="${l.properties.className}">${r}</${a}>`}).join(`
|
|
224
|
-
`)}function yx(t,l){const a=tj(t,l),r=nj(a);return aj(r)}new Map(Dh.map((t,l)=>[t,l]));function ij(t){return o0.sanitize(t,{ALLOWED_TAGS:["span"],ALLOWED_ATTR:["style","class"]})}function rj({className:t,children:l}){const a=String(l).replace(/\n$/,"");if(!t)return v.jsx("code",{children:l});const u=ij(yx(a));return v.jsx("code",{dangerouslySetInnerHTML:{__html:u}})}function Ld({children:t,inline:l}){return v.jsx("div",{className:l?"markdown-inline":"markdown",children:v.jsx(RR,{remarkPlugins:[FN],components:{code:rj},children:t})})}const oj={plan:"[plan]",approve:"[approve]",task:"[task]",build:"[build]",fix:"[fix]",done:"[done]",error:"[error]",verbose:"[verbose]"};function Ra({value:t}){return t?v.jsx("span",{className:"duration",children:t}):null}function uj({entry:t,duration:l}){return v.jsxs("div",{className:"console-entry",children:[v.jsx("span",{className:`prefix ${t.level}`,children:oj[t.level]}),v.jsx("span",{children:t.message}),v.jsx(Ra,{value:l})]})}function sj({entry:t}){const l=t.sender??"you";return v.jsxs("div",{className:"console-entry user-message",children:[v.jsxs("span",{className:"prefix",style:{color:"var(--orange)"},children:["[",l,"]"]}),v.jsx("span",{children:t.message})]})}const cj=300;function fj({entry:t,duration:l}){const a=t.agent||"agent";return t.text.length<=cj?v.jsxs("div",{className:"console-entry",children:[v.jsxs("span",{className:"prefix task",children:["[",a,"]"]}),v.jsx("span",{children:v.jsx(Ld,{inline:!0,children:t.text})}),v.jsx(Ra,{value:l})]}):v.jsxs("details",{className:"tool-inline",children:[v.jsxs("summary",{children:[v.jsx("span",{className:"tool-inline-name",children:a}),v.jsxs("span",{className:"tool-inline-summary",children:[t.text.slice(0,120),"..."]}),v.jsx(Ra,{value:l})]}),v.jsx("div",{className:"tool-inline-body",children:v.jsx(Ld,{children:t.text})})]})}function dj(t){const{tool_name:l,tool_input:a}=t;if(l==="Glob"){const r=a.pattern||"*",u=a.path;return u?`${r} in ${u}`:r}if(l==="Grep"){const u=[a.pattern||""];return a.path&&u.push(`in ${a.path}`),a.glob&&u.push(`(${a.glob})`),u.join(" ")}if(l==="Read"){const u=[a.file_path||"unknown file"];return a.offset&&u.push(`offset:${a.offset}`),a.limit&&u.push(`limit:${a.limit}`),u.join(" ")}return l==="Write"||l==="Edit"?a.file_path||"unknown file":l==="Bash"?(a.command||"").slice(0,80):l.includes("playbook")?a.name||"read":l.includes("build")?"pnpm build + check":l}function hj(t){return Object.entries(t).map(([a,r])=>{const u=typeof r=="string"?r:JSON.stringify(r,null,2);return u.length>500?`${a}: ${u.slice(0,500)}... (${u.length} chars)`:`${a}: ${u}`}).join(`
|
|
225
|
-
`)}function od({text:t,maxLen:l}){const a=t.length>l,r=a?t.slice(0,l):t,s=o0.sanitize(yx(r),{ALLOWED_TAGS:["span"],ALLOWED_ATTR:["style","class"]})+(a?`
|
|
226
|
-
... (truncated)`:"");return v.jsx("pre",{dangerouslySetInnerHTML:{__html:s}})}function mj(t){return t.tool_name!=="Write"?!1:(t.tool_input.file_path||"").endsWith(".md")}function Ud({entry:t,duration:l}){const a=t.tool_response===null,r=t.tool_name==="Bash"||t.tool_name==="bash",u=r&&t.tool_input.command||"";if(r)return v.jsxs("details",{className:"tool-inline",children:[v.jsxs("summary",{children:[t.agent&&v.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),v.jsx("span",{className:"tool-inline-name",children:"$"}),v.jsx("span",{className:"tool-inline-command",children:u}),a?v.jsx("span",{className:"spinner-inline"}):v.jsx(Ra,{value:l})]}),v.jsx("div",{className:"tool-inline-body",children:t.tool_response!==null&&v.jsx(od,{text:t.tool_response,maxLen:5e3})})]});if(mj(t)){const s=t.tool_input.content||"",c=t.tool_input.file_path||"unknown file";return v.jsxs("details",{className:"tool-inline",open:!0,children:[v.jsxs("summary",{children:[t.agent&&v.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),v.jsx("span",{className:"tool-inline-name",children:t.tool_name}),v.jsx("span",{className:"tool-inline-summary",children:c}),a?v.jsx("span",{className:"spinner-inline"}):v.jsx(Ra,{value:l})]}),v.jsx("div",{className:"tool-inline-body",children:v.jsx(Ld,{children:s})})]})}return v.jsxs("details",{className:"tool-inline",children:[v.jsxs("summary",{children:[t.agent&&v.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),v.jsx("span",{className:"tool-inline-name",children:t.tool_name}),v.jsx("span",{className:"tool-inline-summary",children:dj(t)}),a?v.jsx("span",{className:"spinner-inline"}):v.jsx(Ra,{value:l})]}),v.jsxs("div",{className:"tool-inline-body",children:[v.jsx("div",{className:"section-label",children:"Input"}),v.jsx(od,{text:hj(t.tool_input),maxLen:5e3}),t.tool_response!==null&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"section-label",children:"Output"}),v.jsx(od,{text:t.tool_response,maxLen:5e3})]})]})]})}function pj(t){let l=0,a=!1;for(const{duration:c}of t)if(c)if(a=!0,c.endsWith("ms"))l+=Number.parseInt(c,10);else if(c.includes("m ")){const[d,p]=c.split("m ");l+=Number.parseInt(d,10)*6e4+Number.parseFloat(p)*1e3}else c.endsWith("s")&&(l+=Number.parseFloat(c)*1e3);if(!a)return null;if(l<1e3)return`${l}ms`;const r=l/1e3;if(r<60)return`${r.toFixed(0)}s`;const u=Math.floor(r/60),s=r%60;return`${u}m ${s.toFixed(0)}s`}function gj(t){const l=t.filter(r=>r.entry.kind==="tool_use").length;return t.filter(r=>r.entry.kind==="tool_use").every(r=>r.entry.tool_response!==null)?`${l} action${l!==1?"s":""}`:`${l} action${l!==1?"s":""}...`}function yj({items:t}){const[l,a]=T.useState(!1),r=t.filter(d=>d.entry.kind==="tool_use"),u=r.every(d=>d.entry.tool_response!==null),s=r.length>0?r[r.length-1]:t[t.length-1],c=pj(t);return v.jsxs("div",{className:"tool-group",children:[v.jsxs("div",{className:"tool-group-header",onClick:()=>a(d=>!d),children:[!u&&v.jsx("span",{className:"spinner-inline"}),v.jsx("span",{className:"tool-group-label",children:gj(t)}),v.jsx("span",{className:"tool-group-chevron",children:l?"▼":"▶"}),u&&v.jsx(Ra,{value:c})]}),l&&v.jsx("div",{className:"tool-group-items",children:t.map(({entry:d,index:p,duration:h})=>d.kind==="tool_use"?v.jsx(Ud,{entry:d,duration:h},d.tool_use_id||`gi-${p}`):null)}),!l&&s&&v.jsx("div",{className:"tool-group-tail",children:s.entry.kind==="tool_use"?v.jsx(Ud,{entry:s.entry,duration:s.duration}):null})]})}function vj({sessionId:t,event:l,onResolved:a,resolved:r,resolvedDetails:u}){const s=l.runtime==="docker",[c,d]=T.useState(s?"local":"claim"),[p,h]=T.useState(""),[y,g]=T.useState("https://api.electric-sql.cloud"),[b,S]=T.useState(""),[E,A]=T.useState(""),[R,k]=T.useState(""),[_,j]=T.useState(""),[J,Q]=T.useState(!1),[I,O]=T.useState(!1),[le,ne]=T.useState(!1),[D,q]=T.useState(null),F=l.ghAccounts.length>0,[V,ue]=T.useState(l.ghAccounts[0]?.login??""),[W,B]=T.useState(l.projectName),[ee,ie]=T.useState("private"),[be,N]=T.useState(!1);async function M(){O(!0),q(null);try{const ve=await NT();h(ve.databaseUrl),g(ve.electricUrl),S(ve.sourceId),A(ve.secret),k(ve.claimId),j(ve.claimUrl),ne(!0)}catch(ve){q(ve instanceof Error?ve.message:"Provisioning failed")}finally{O(!1)}}async function Z(){Q(!0);const ve=[];try{const Oe={};c==="claim"?(Oe.mode="claim",Oe.databaseUrl=p,Oe.electricUrl=y,Oe.sourceId=b,Oe.secret=E,Oe.claimId=R,ve.push(`Database: ${p}`),ve.push(`Source ID: ${b}`),_&&ve.push(`Claim: ${_}`)):c==="cloud"?(Oe.mode="cloud",Oe.databaseUrl=p,Oe.electricUrl=y,Oe.sourceId=b,Oe.secret=E,ve.push(`Database: ${p}`),ve.push(`Source ID: ${b}`)):(Oe.mode="local",ve.push("Local Docker")),be&&V&&W.trim()&&(Oe.repoAccount=V,Oe.repoName=W,Oe.repoVisibility=ee,ve.push(`${V}/${W} (${ee})`)),Oe._summary=ve.join(`
|
|
227
|
-
`),await gd(t,"infra_config",Oe),a(ve.join(`
|
|
228
|
-
`))}catch{Q(!1)}}const C=J||!!r,de=p.trim()&&b.trim()&&E.trim(),ge=le&&p.trim()&&b.trim()&&E.trim(),Te=!be||V&&W.trim(),ze={claim:"Provisioned (Cloud)",local:"Local (Docker)",cloud:"Electric Cloud (BYO)"};if(r){const ve=u??{};return u||(ve.Infrastructure=ze[c],(c==="cloud"||c==="claim")&&(p&&(ve["Connection string"]=p),b&&(ve["Source ID"]=b)),c==="claim"&&_&&(ve["Claim link"]=_),be&&V&&W.trim()&&(ve.Repository=`${V}/${W}`,ve.Visibility=ee)),v.jsx("div",{className:"gate-prompt",children:v.jsx("div",{className:"gate-config-summary",children:Object.entries(ve).map(([Oe,At])=>v.jsxs("div",{children:[v.jsxs("strong",{children:[Oe,":"]})," ",At.startsWith("http")?v.jsx("a",{href:At,target:"_blank",rel:"noopener noreferrer",children:At}):At]},Oe))})})}return v.jsxs("div",{className:"gate-prompt",children:[v.jsxs("h3",{children:["Setup ",l.projectName]}),v.jsx("p",{className:"gate-summary",children:"Infrastructure"}),v.jsxs("div",{className:"gate-option-group",children:[v.jsxs("button",{type:"button",className:`gate-option ${c==="claim"?"active":""}`,onClick:()=>d("claim"),disabled:J,children:[v.jsx("span",{className:"gate-option-title",children:"Provision"}),v.jsx("span",{className:"gate-option-desc",children:"Auto-provision database & Electric Cloud (72h)"})]}),s&&v.jsxs("button",{type:"button",className:`gate-option ${c==="local"?"active":""}`,onClick:()=>d("local"),disabled:J,children:[v.jsx("span",{className:"gate-option-title",children:"Local"}),v.jsx("span",{className:"gate-option-desc",children:"Run with Docker Compose on your machine"})]}),v.jsxs("button",{type:"button",className:`gate-option ${c==="cloud"?"active":""}`,onClick:()=>d("cloud"),disabled:J,children:[v.jsx("span",{className:"gate-option-title",children:"Bring your own"}),v.jsx("span",{className:"gate-option-desc",children:"Provide your own database & Electric details"})]})]}),c==="claim"&&v.jsx("div",{className:"question",children:le?v.jsxs("div",{style:{fontSize:"0.85em"},children:[v.jsx("p",{style:{color:"var(--color-done, #4c4)",margin:"0 0 6px"},children:"Resources provisioned successfully (72h TTL)."}),v.jsxs("div",{style:{background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,padding:"8px 10px",margin:"6px 0",fontFamily:"monospace",fontSize:"0.9em",lineHeight:1.6,wordBreak:"break-all"},children:[v.jsxs("div",{children:[v.jsx("strong",{children:"Database URL:"})," ",p]}),v.jsxs("div",{children:[v.jsx("strong",{children:"Source ID:"})," ",b]}),v.jsxs("div",{children:[v.jsx("strong",{children:"Electric URL:"})," ",y]})]}),_&&v.jsxs("p",{style:{margin:"8px 0 0"},children:["Claim into your account:"," ",v.jsx("a",{href:_,target:"_blank",rel:"noopener noreferrer",style:{wordBreak:"break-all"},children:_})]})]}):v.jsxs(v.Fragment,{children:[v.jsx("p",{style:{fontSize:"0.85em",opacity:.7,margin:"0 0 8px"},children:"Automatically provision a Neon Postgres database and Electric Cloud source. Resources are available for 72 hours."}),v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:M,disabled:I||C,style:{marginBottom:8},children:I?"Provisioning...":"Provision Resources"}),I&&v.jsx("p",{style:{fontSize:"0.85em",opacity:.7},children:"This may take 30-60 seconds..."}),D&&v.jsx("p",{style:{color:"var(--color-error, #e55)",fontSize:"0.85em"},children:D})]})}),c==="cloud"&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Database URL"}),v.jsx("input",{type:"text",value:p,onChange:ve=>h(ve.target.value),disabled:C,placeholder:"postgresql://user:pass@host:5432/dbname"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Electric URL"}),v.jsx("input",{type:"text",value:y,onChange:ve=>g(ve.target.value),disabled:C,placeholder:"https://api.electric-sql.cloud"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Source ID"}),v.jsx("input",{type:"text",value:b,onChange:ve=>S(ve.target.value),disabled:C,placeholder:"Your Electric Cloud source ID"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Secret"}),v.jsx("input",{type:"password",value:E,onChange:ve=>A(ve.target.value),disabled:C,placeholder:"Your Electric Cloud secret"})]})]}),F&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"gate-summary",style:{marginTop:16},children:"GitHub Repository"}),v.jsx("div",{className:"gate-option-group",children:v.jsx("button",{type:"button",className:`gate-option ${be?"active":""}`,onClick:()=>N(!be),disabled:C,children:v.jsx("span",{className:"gate-option-title",children:"Create a GitHub repo for this project"})})}),be&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Account"}),l.ghAccounts.length>1?v.jsx("select",{value:V,onChange:ve=>ue(ve.target.value),disabled:C,children:l.ghAccounts.map(ve=>v.jsxs("option",{value:ve.login,children:[ve.login," ",ve.type==="org"?"(org)":"(personal)"]},ve.login))}):v.jsx("input",{type:"text",value:l.ghAccounts[0].login,disabled:!0})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Repository name"}),v.jsx("input",{type:"text",value:W,onChange:ve=>B(ve.target.value),disabled:C,placeholder:"my-app"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Visibility"}),v.jsxs("div",{className:"gate-option-group",children:[v.jsx("button",{type:"button",className:`gate-option ${ee==="private"?"active":""}`,onClick:()=>ie("private"),disabled:C,children:v.jsx("span",{className:"gate-option-title",children:"Private"})}),v.jsx("button",{type:"button",className:`gate-option ${ee==="public"?"active":""}`,onClick:()=>ie("public"),disabled:C,children:v.jsx("span",{className:"gate-option-title",children:"Public"})})]})]})]})]}),v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:Z,disabled:C||c==="cloud"&&!de||c==="claim"&&!ge||!Te,children:J?"Configuring...":"Start"})})]})}function bj({sessionId:t,event:l,onResolved:a,resolved:r,resolvedSummary:u}){const s=l.questions?.length?l.questions:[{question:l.question,options:l.options}],c=s.length>1,d=s.some(ne=>ne.multiSelect),p=c||d,[h,y]=T.useState({}),[g,b]=T.useState({}),[S,E]=T.useState({}),[A,R]=T.useState({}),[k,_]=T.useState(!1),j=k||!!r;function J(){const ne={};for(const D of s)if(D.multiSelect){const q=g[D.question],F=A[D.question]?.trim(),V=q?[...q]:[];F&&V.push(F),ne[D.question]=V.join(", ")}else ne[D.question]=h[D.question]||A[D.question]?.trim()||"";return ne}function Q(ne){const D=Object.entries(ne).filter(([,q])=>q);return D.length===1?D[0][1].slice(0,80):D.map(([,q])=>q.slice(0,40)).join("; ").slice(0,120)}async function I(ne,D){y(F=>({...F,[ne]:D})),_(!0);const q={[ne]:D};try{await gd(t,"ask_user_question",{toolUseId:l.tool_use_id,answers:q,_summary:D}),a(D)}catch{y(F=>({...F,[ne]:""})),_(!1)}}async function O(){const ne=J(),D=Q(ne);_(!0);try{await gd(t,"ask_user_question",{toolUseId:l.tool_use_id,answers:ne,_summary:D}),a(D)}catch{_(!1)}}function le(ne,D){b(q=>{const F=new Set(q[ne]??[]);return F.has(D)?F.delete(D):F.add(D),{...q,[ne]:F}})}if(r){const ne=u||"";return v.jsxs("div",{className:"gate-prompt",children:[v.jsx("h3",{children:"Question"}),s.map(D=>v.jsxs("div",{className:"gate-question-section",children:[D.header&&v.jsx("span",{className:"gate-question-header",children:D.header}),v.jsx("p",{className:"gate-summary",children:D.question})]},D.question)),v.jsx("div",{className:"gate-answer-summary",children:ne})]})}return v.jsxs("div",{className:"gate-prompt",children:[v.jsx("h3",{children:"Question"}),s.map(ne=>{const D=ne.options&&ne.options.length>0,q=S[ne.question];return v.jsxs("div",{className:"gate-question-section",children:[ne.header&&v.jsx("span",{className:"gate-question-header",children:ne.header}),v.jsx("p",{className:"gate-summary",children:ne.question}),D&&ne.multiSelect&&v.jsxs("div",{className:"gate-option-group-vert",children:[ne.options?.map(F=>{const V=g[ne.question]?.has(F.label)??!1;return v.jsxs("button",{type:"button",className:`gate-option gate-option-checkbox ${V?"checked":""}`,onClick:()=>le(ne.question,F.label),disabled:j,children:[v.jsx("span",{className:"gate-checkbox-indicator",children:V?"☑":"☐"}),v.jsx("span",{className:"gate-option-title",children:F.label}),F.description&&v.jsx("span",{className:"gate-option-desc",children:F.description})]},F.label)}),!q&&v.jsx("button",{type:"button",className:"gate-option gate-option-other",onClick:()=>E(F=>({...F,[ne.question]:!0})),disabled:j,children:v.jsx("span",{className:"gate-option-title",children:"Other..."})}),q&&v.jsx("div",{className:"question",children:v.jsx("input",{type:"text",value:A[ne.question]||"",onChange:F=>R(V=>({...V,[ne.question]:F.target.value})),disabled:j,placeholder:"Type your answer..."})})]}),D&&!ne.multiSelect&&v.jsxs("div",{className:"gate-option-group-vert",children:[ne.options?.map(F=>{const V=h[ne.question]===F.label;return v.jsxs("button",{type:"button",className:`gate-option ${V?"selected":""}`,onClick:()=>p?y(ue=>({...ue,[ne.question]:F.label})):I(ne.question,F.label),disabled:j,children:[v.jsx("span",{className:"gate-option-title",children:F.label}),F.description&&v.jsx("span",{className:"gate-option-desc",children:F.description})]},F.label)}),!q&&v.jsx("button",{type:"button",className:"gate-option gate-option-other",onClick:()=>E(F=>({...F,[ne.question]:!0})),disabled:j,children:v.jsx("span",{className:"gate-option-title",children:"Other..."})}),q&&v.jsx("div",{className:"question",children:v.jsx("input",{type:"text",value:A[ne.question]||"",onChange:F=>{const V=F.target.value;R(ue=>({...ue,[ne.question]:V})),y(ue=>({...ue,[ne.question]:""}))},disabled:j,placeholder:"Type your answer..."})})]}),!D&&v.jsx("div",{className:"question",children:v.jsx("textarea",{value:A[ne.question]||"",onChange:F=>R(V=>({...V,[ne.question]:F.target.value})),disabled:j,rows:3,placeholder:"Type your answer..."})})]},ne.question)}),p&&v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:O,disabled:j,children:k?"Submitting...":"Submit"})}),!p&&!s[0]?.options?.length&&v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:O,disabled:j||!A[s[0]?.question]?.trim(),children:k?"Submitting...":"Submit"})}),!p&&s[0]?.options?.length&&S[s[0]?.question]&&v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:O,disabled:j||!A[s[0]?.question]?.trim(),children:k?"Submitting...":"Submit"})})]})}function xj(t){switch(t){case"infra_config_prompt":return"Project configured";case"ask_user_question":return"Question answered";default:return"Decision made"}}function Sj({sessionId:t,entry:l,entryIndex:a,onResolved:r,duration:u}){const s=h=>r(a,h),{resolved:c,resolvedSummary:d}=l;let p=null;switch(l.event.type){case"infra_config_prompt":p=v.jsx(vj,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedDetails:l.resolvedDetails});break;case"ask_user_question":p=v.jsx(bj,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedSummary:d});break;default:return null}return c?v.jsxs("div",{className:"gate-answered",children:[v.jsxs("div",{className:"gate-answered-header",children:[v.jsx("span",{className:"prefix done",children:"[gate]"}),v.jsx("span",{className:"gate-resolved-label",children:xj(l.event.type)}),v.jsx(Ra,{value:u})]}),p]}):p}const lb={pending:"○",in_progress:"◉",completed:"✓"};function Ej(t){switch(t){case"completed":return"todo-status-done";case"in_progress":return"todo-status-progress";default:return"todo-status-pending"}}function wj({entry:t}){const{todos:l}=t,a=l.filter(c=>c.status==="completed").length,r=l.filter(c=>c.status==="in_progress").length,u=l.length,s=[];return a>0&&s.push(`${a}/${u} done`),r>0&&s.push(`${r} in progress`),s.length===0&&s.push(`${u} pending`),v.jsxs("details",{className:"tool-inline",open:!0,children:[v.jsxs("summary",{children:[v.jsx("span",{className:"tool-inline-name",children:"TodoWrite"}),v.jsx("span",{className:"tool-inline-summary",children:s.join(", ")})]}),v.jsx("div",{className:"tool-inline-body",children:v.jsx("ul",{className:"todo-list",children:l.map(c=>v.jsxs("li",{className:"todo-item",children:[v.jsx("span",{className:`todo-status-icon ${Ej(c.status)}`,children:lb[c.status]||lb.pending}),v.jsx("span",{className:"todo-content",children:c.content}),c.priority&&v.jsx("span",{className:"todo-priority",children:c.priority})]},c.id))})})]})}const Tj=3;function ab(t){return t.kind==="tool_use"}function Cj(t,l){const a=[];let r=0;for(;r<t.length;){const u=t[r];if(ab(u)){const s=[];for(;r<t.length&&ab(t[r]);)s.push({entry:t[r],index:r,duration:l[r]}),r++;if(s.length>=Tj)a.push({type:"group",items:s});else for(const c of s)a.push({type:"single",...c});continue}a.push({type:"single",entry:u,index:r,duration:l[r]}),r++}return a}function kj(t){if(t.kind!=="user_prompt")return t.ts}function vx(t){if(t<1e3)return`${t}ms`;const l=t/1e3;if(l<60)return`${l.toFixed(0)}s`;const a=Math.floor(l/60),r=l%60;return`${a}m ${r.toFixed(0)}s`}function Aj({sinceTs:t}){const[l,a]=T.useState("");return T.useEffect(()=>{const r=new Date(t).getTime(),u=()=>{const c=Date.now()-r;a(vx(Math.max(0,c)))};u();const s=setInterval(u,1e3);return()=>clearInterval(s)},[t]),v.jsxs("div",{className:"console-entry waiting-indicator",children:[v.jsx("span",{className:"spinner-inline"}),v.jsx("span",{className:"waiting-label",children:"Waiting for response..."}),v.jsx("span",{className:"duration",children:l})]})}function _j({sessionId:t,entries:l,isLive:a,isComplete:r,onGateResolved:u}){const s=T.useRef(null),c=T.useRef(null),[d,p]=T.useState(!0),h=l.length,y=T.useCallback(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[]),g=T.useCallback(()=>{const k=s.current;if(!k)return;const j=k.scrollHeight-k.scrollTop-k.clientHeight<80;p(j)},[]);T.useEffect(()=>{d&&c.current?.scrollIntoView({behavior:"smooth"})},[h,d]);const b=[];let S=null;for(const k of l){const _=kj(k);if(k.kind==="user_prompt"||!_)b.push(null);else if(S){const j=new Date(_).getTime()-new Date(S).getTime();b.push(j>=0?vx(j):null)}else b.push(null);_&&(S=_)}const E=T.useMemo(()=>Cj(l,b),[l,b]);let A=!1,R="";if(a&&!r&&l.length>0){const k=l[l.length-1],_=k.kind==="tool_use"&&k.tool_response===null,j=k.kind==="gate"&&!k.resolved,J=k.kind==="assistant_message";!_&&!j&&!J&&(A=!0,R=S||new Date().toISOString())}return v.jsxs("div",{className:"console",ref:s,onScroll:g,children:[E.map(k=>{if(k.type==="group")return v.jsx(yj,{items:k.items},`group-${k.items[0].index}`);const{entry:_,index:j,duration:J}=k;switch(_.kind){case"log":return v.jsx(uj,{entry:_,duration:J},`log-${j}`);case"user_prompt":return v.jsx(sj,{entry:_},`user-${j}`);case"tool_use":return v.jsx(Ud,{entry:_,duration:J},_.tool_use_id||`tool-${j}`);case"assistant_message":return v.jsx(fj,{entry:_,duration:J},`text-${j}`);case"todo_widget":return v.jsx(wj,{entry:_},`todo-${j}`);case"gate":return v.jsx(Sj,{sessionId:t,entry:_,entryIndex:j,onResolved:u,duration:J},`gate-${j}`);default:return null}}),A&&v.jsx(Aj,{sinceTs:R}),v.jsx("div",{ref:c}),!d&&v.jsx("button",{type:"button",className:"jump-to-bottom",onClick:y,children:"Jump to latest"})]})}function ud({variant:t="line",width:l}){const a=t==="block"?"skeleton skeleton-block":"skeleton skeleton-line";return v.jsx("div",{className:a,style:l?{width:l}:void 0})}function Rj(t){const[l,a]=T.useState([]),[r,u]=T.useState(!1),[s,c]=T.useState(!1),[d,p]=T.useState(null),[h,y]=T.useState({totalCostUsd:0,totalTurns:0,totalDurationMs:0}),g=T.useRef("-1"),b=T.useCallback(E=>{a(A=>{switch(E.type){case"log":return[...A,{kind:"log",level:E.level,message:E.message,ts:E.ts}];case"user_prompt":return[...A,{kind:"user_prompt",message:E.message,sender:E.sender}];case"pre_tool_use":return[...A,{kind:"tool_use",tool_name:E.tool_name,tool_use_id:E.tool_use_id,tool_input:E.tool_input,tool_response:null,agent:E.agent,ts:E.ts}];case"post_tool_use":{const R=[...A];for(let k=R.length-1;k>=0;k--){const _=R[k];if(_.kind==="tool_use"&&_.tool_use_id===E.tool_use_id){R[k]={..._,tool_response:E.tool_response,agent:_.agent||E.agent};break}}return R}case"post_tool_use_failure":{const R=[...A];for(let k=R.length-1;k>=0;k--){const _=R[k];if(_.kind==="tool_use"&&_.tool_use_id===E.tool_use_id){R[k]={..._,tool_response:`Error: ${E.error}`,agent:_.agent||E.agent};break}}return R}case"assistant_message":return[...A,{kind:"assistant_message",text:E.text,agent:E.agent,ts:E.ts}];case"todo_write":{const R=A.findIndex(_=>_.kind==="todo_widget"),k={kind:"todo_widget",tool_use_id:E.tool_use_id,todos:E.todos,ts:E.ts};if(R>=0){const _=[...A];return _[R]=k,_}return[...A,k]}case"ask_user_question":case"infra_config_prompt":return[...A,{kind:"gate",event:E,resolved:!1,ts:E.ts}];case"gate_resolved":{const R=[...A];let k=!1;for(let _=R.length-1;_>=0;_--){const j=R[_];if(j.kind==="gate"&&!j.resolved){R[_]={...j,resolved:!0,resolvedSummary:E.summary||j.resolvedSummary,resolvedDetails:E.details},k=!0;break}}if(!k&&E.details)for(let _=R.length-1;_>=0;_--){const j=R[_];if(j.kind==="gate"&&j.resolved&&!j.resolvedDetails){R[_]={...j,resolvedDetails:E.details};break}}return R}case"budget_exceeded":{const R=E;return[...A,{kind:"log",level:"error",message:`Session budget exceeded ($${R.spent_usd.toFixed(2)} / $${R.budget_usd.toFixed(2)} limit)`,ts:E.ts}]}case"session_end":case"session_start":case"app_status":return A;default:return A}}),E.type==="app_status"&&p({status:E.status,port:E.port,previewUrl:E.previewUrl}),E.type==="session_end"&&(c(!0),(E.cost_usd!=null||E.num_turns!=null||E.duration_ms!=null)&&y(A=>({totalCostUsd:A.totalCostUsd+(E.cost_usd??0),totalTurns:A.totalTurns+(E.num_turns??0),totalDurationMs:A.totalDurationMs+(E.duration_ms??0)}))),E.type==="budget_exceeded"&&c(!0)},[]);T.useEffect(()=>{if(!t)return;a([]),u(!1),c(!1),p(null),y({totalCostUsd:0,totalTurns:0,totalDurationMs:0}),g.current="-1";let E=!1,A=null,R=0;const k=10;function _(){if(E)return;if(R>=k){console.warn(`[sse] Giving up on session ${t} after ${k} retries`),u(!1);return}const j=uh(t),J=new URLSearchParams;j&&J.set("token",j),g.current!=="-1"&&J.set("offset",g.current);const Q=J.toString(),I=`/api/sessions/${t}/events${Q?`?${Q}`:""}`;A=new EventSource(I),A.onopen=()=>{E||(R=0,u(!0))},A.onmessage=O=>{if(!E){O.lastEventId&&(g.current=O.lastEventId);try{const le=JSON.parse(O.data);b(le)}catch{}}},A.onerror=()=>{if(E)return;A?.close(),R++;const O=Math.min(1e3*2**(R-1),3e4);setTimeout(_,O)}}return _(),()=>{E=!0,A&&(A.close(),A=null)}},[t,b]);const S=T.useCallback((E,A)=>{a(R=>{const k=[...R],_=k[E];return _?.kind==="gate"&&(k[E]={..._,resolved:!0,resolvedSummary:A}),k})},[]);return{entries:l,isLive:r,isComplete:s,appStatus:d,cost:h,markGateResolved:S}}function Dj(t){const l=[];for(const a of t)switch(a.kind){case"user_prompt":l.push(`## User
|
|
229
|
-
|
|
230
|
-
${a.message}
|
|
231
|
-
`);break;case"assistant_message":l.push(`## Assistant
|
|
232
|
-
|
|
233
|
-
${a.text}
|
|
234
|
-
`);break;case"log":l.push(`[${a.level}] ${a.message}`);break;case"tool_use":{l.push(`### Tool: ${a.tool_name}`),l.push("**Input:**"),l.push("```json"),l.push(JSON.stringify(a.tool_input,null,2)),l.push("```"),a.tool_response!=null&&(l.push("**Output:**"),l.push("```"),l.push(a.tool_response),l.push("```")),l.push("");break}}return l.join(`
|
|
235
|
-
`)}function Nj(){const{id:t}=jb(),l=fl(),a=Zl(),{openMobileDrawer:r}=$d(),{showSettings:u,setShowSettings:s,authSource:c,hasGhToken:d,refreshSettings:p,refreshSessions:h}=go(),[y,g]=T.useState(!1);T.useEffect(()=>{if(!y)return;const ie=()=>g(!1);return document.addEventListener("click",ie),()=>document.removeEventListener("click",ie)},[y]);const[b,S]=T.useState(t==="new"),[E,A]=T.useState(t==="new"?null:t??null),R=T.useRef(!1);T.useEffect(()=>{t&&t!=="new"&&(A(t),S(!1),R.current=!1)},[t]),T.useEffect(()=>{if(t!=="new"||R.current)return;const ie=l.state;if(!ie?.description){a("/",{replace:!0});return}R.current=!0,S(!0),AT(ie.description,void 0,ie.freeform).then(({sessionId:be,session:N})=>{ih(N),h(),A(be),S(!1),a(`/session/${be}`,{replace:!0})}).catch(be=>{console.error("Failed to create session:",be),a("/",{replace:!0})})},[t,l.state,a,h]);const k=E,{entries:_,isLive:j,isComplete:J,appStatus:Q,cost:I,markGateResolved:O}=Rj(k),[le,ne]=T.useState(()=>k?ev(k)??null:null);T.useEffect(()=>{if(k){const ie=ev(k);ne(ie??null)}},[k]),T.useEffect(()=>{k&&J&&(pd(k,{status:"complete"}),h())},[k,J,h]);const D=Q?.port,q=Q?.previewUrl,[F,V]=T.useState(null),ue=T.useCallback(async ie=>{if(k){V(null);try{await _T(k,ie)}catch(be){const N=be instanceof Error?be.message:"Failed to send message";V(N)}}},[k]),W=T.useCallback(async()=>{if(k)try{await RT(k),pd(k,{status:"complete"}),ne(ie=>ie?{...ie,status:"complete"}:null),h()}catch(ie){console.error("Failed to interrupt:",ie)}},[k,h]),B=T.useCallback(()=>{const ie=Dj(_);navigator.clipboard.writeText(ie)},[_]);if(!t)return null;const ee=le?.status==="running"&&!J;return v.jsxs(v.Fragment,{children:[u&&v.jsx(n0,{authSource:c,hasGhToken:d??!1,onKeySaved:p,onClose:()=>s(!1),onCopyLog:k?B:void 0}),v.jsxs("div",{className:"session-header",children:[v.jsx("button",{type:"button",className:"mobile-hamburger",onClick:r,"aria-label":"Open menu",children:v.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[v.jsx("title",{children:"Menu"}),v.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),v.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),v.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),v.jsx("span",{className:"session-header-name",children:b?"Initializing...":le?.projectName??"Loading..."}),ee&&v.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Live"}),!b&&!j&&!J&&v.jsx("span",{className:"session-header-status",style:{color:"var(--yellow)"},children:"Connecting..."}),I.totalCostUsd>0&&v.jsxs("span",{className:"session-header-cost",title:`${I.totalTurns} turns`,children:["$",I.totalCostUsd.toFixed(2)]}),Q&&(q||D)&&v.jsx("a",{href:q??`http://localhost:${D}`,target:"_blank",rel:"noopener noreferrer",className:`mobile-open-app-icon ${Q.status==="running"?"primary":""}`,"aria-label":"Open App",children:v.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("title",{children:"Open App"}),v.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),v.jsx("polyline",{points:"15 3 21 3 21 9"}),v.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}),v.jsx("span",{className:"session-header-actions-group",children:Q&&v.jsx("a",{href:q??(D?`http://localhost:${D}`:"#"),target:"_blank",rel:"noopener noreferrer",className:`session-header-action ${Q.status==="running"?"primary":""}`,children:"Open App"})}),v.jsx("button",{type:"button",className:"session-header-overflow",onClick:ie=>{ie.stopPropagation(),g(be=>!be)},"aria-label":"More options",children:v.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[v.jsx("title",{children:"More"}),v.jsx("circle",{cx:"8",cy:"3",r:"1.5"}),v.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),v.jsx("circle",{cx:"8",cy:"13",r:"1.5"})]})}),y&&v.jsxs("div",{className:"session-header-overflow-menu",children:[I.totalCostUsd>0&&v.jsxs("span",{className:"session-header-overflow-menu-item session-header-overflow-cost",children:["Cost: $",I.totalCostUsd.toFixed(2)," (",I.totalTurns," turns)"]}),v.jsx("button",{type:"button",className:"session-header-overflow-menu-item",onClick:()=>{g(!1),s(ie=>!ie)},children:"Settings"})]})]}),v.jsxs("div",{className:"session-content",children:[b?v.jsxs("div",{className:"session-initializing",children:[v.jsx("div",{className:"session-initializing-spinner"}),v.jsx("span",{children:"Setting up your project..."})]}):!j&&!J?v.jsxs("div",{className:"session-loading",children:[v.jsx(ud,{variant:"block"}),v.jsx(ud,{variant:"line",width:"80%"}),v.jsx(ud,{variant:"line",width:"60%"})]}):v.jsx(_j,{sessionId:k??"",entries:_,isLive:j,isComplete:J,onGateResolved:O}),F&&v.jsxs("div",{className:"room-send-error",children:[F,v.jsx("button",{type:"button",onClick:()=>V(null),children:"×"})]}),v.jsx(t0,{onSubmit:ue,placeholder:ee?"Message...":"Ask anything...",disabled:b,isRunning:ee,onCancel:W})]})]})}const jj=Kw([{element:v.jsx(IC,{}),children:[{path:"/",element:v.jsx(GC,{})},{path:"/session/:id",element:v.jsx(Nj,{})},{path:"/room/:id",element:v.jsx(VC,{})}]}]),ib=document.getElementById("root");ib&&LS.createRoot(ib).render(v.jsx(T.StrictMode,{children:v.jsx(sT,{router:jj})}));
|