@thready-web/dsh-bot-plugin 0.1.0-beta.6 → 0.1.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,63 @@
1
+ (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 o of u)if(o.type==="childList")for(const f of o.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function a(u){const o={};return u.integrity&&(o.integrity=u.integrity),u.referrerPolicy&&(o.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?o.credentials="include":u.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(u){if(u.ep)return;u.ep=!0;const o=a(u);fetch(u.href,o)}})();function _S(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ad={exports:{}},es={};var Ay;function zS(){if(Ay)return es;Ay=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function a(r,u,o){var f=null;if(o!==void 0&&(f=""+o),u.key!==void 0&&(f=""+u.key),"key"in u){o={};for(var h in u)h!=="key"&&(o[h]=u[h])}else o=u;return u=o.ref,{$$typeof:n,type:r,key:f,ref:u!==void 0?u:null,props:o}}return es.Fragment=l,es.jsx=a,es.jsxs=a,es}var Cy;function qS(){return Cy||(Cy=1,ad.exports=zS()),ad.exports}var b=qS(),rd={exports:{}},Oe={};var Ny;function RS(){if(Ny)return Oe;Ny=1;var n=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"),o=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),S=Symbol.for("react.view_transition"),x=Symbol.iterator;function k(q){return q===null||typeof q!="object"?null:(q=x&&q[x]||q["@@iterator"],typeof q=="function"?q:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,E={};function M(q,te,fe){this.props=q,this.context=te,this.refs=E,this.updater=fe||T}M.prototype.isReactComponent={},M.prototype.setState=function(q,te){if(typeof q!="object"&&typeof q!="function"&&q!=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,q,te,"setState")},M.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function H(){}H.prototype=M.prototype;function W(q,te,fe){this.props=q,this.context=te,this.refs=E,this.updater=fe||T}var ne=W.prototype=new H;ne.constructor=W,C(ne,M.prototype),ne.isPureReactComponent=!0;var O=Array.isArray;function F(){}var ie={H:null,A:null,T:null,S:null},he=Object.prototype.hasOwnProperty;function _(q,te,fe){var me=fe.ref;return{$$typeof:n,type:q,key:te,ref:me!==void 0?me:null,props:fe}}function Z(q,te){return _(q.type,te,q.props)}function ee(q){return typeof q=="object"&&q!==null&&q.$$typeof===n}function we(q){var te={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(fe){return te[fe]})}var Re=/\/+/g;function le(q,te){return typeof q=="object"&&q!==null&&q.key!=null?we(""+q.key):te.toString(36)}function Q(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(F,F):(q.status="pending",q.then(function(te){q.status==="pending"&&(q.status="fulfilled",q.value=te)},function(te){q.status==="pending"&&(q.status="rejected",q.reason=te)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function se(q,te,fe,me,Te){var Ce=typeof q;(Ce==="undefined"||Ce==="boolean")&&(q=null);var Ee=!1;if(q===null)Ee=!0;else switch(Ce){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(q.$$typeof){case n:case l:Ee=!0;break;case y:return Ee=q._init,se(Ee(q._payload),te,fe,me,Te)}}if(Ee)return Te=Te(q),Ee=me===""?"."+le(q,0):me,O(Te)?(fe="",Ee!=null&&(fe=Ee.replace(Re,"$&/")+"/"),se(Te,te,fe,"",function(at){return at})):Te!=null&&(ee(Te)&&(Te=Z(Te,fe+(Te.key==null||q&&q.key===Te.key?"":(""+Te.key).replace(Re,"$&/")+"/")+Ee)),te.push(Te)),1;Ee=0;var P=me===""?".":me+":";if(O(q))for(var de=0;de<q.length;de++)me=q[de],Ce=P+le(me,de),Ee+=se(me,te,fe,Ce,Te);else if(de=k(q),typeof de=="function")for(q=de.call(q),de=0;!(me=q.next()).done;)me=me.value,Ce=P+le(me,de++),Ee+=se(me,te,fe,Ce,Te);else if(Ce==="object"){if(typeof q.then=="function")return se(Q(q),te,fe,me,Te);throw te=String(q),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function ue(q,te,fe){if(q==null)return q;var me=[],Te=0;return se(q,me,"","",function(Ce){return te.call(fe,Ce,Te++)}),me}function ke(q){if(q._status===-1){var te=q._result,fe=te();fe.then(function(me){(q._status===0||q._status===-1)&&(q._status=1,q._result=me,fe.status===void 0&&(fe.status="fulfilled",fe.value=me))},function(me){(q._status===0||q._status===-1)&&(q._status=2,q._result=me,fe.status===void 0&&(fe.status="rejected",fe.reason=me))}),q._status===-1&&(q._status=0,q._result=fe)}if(q._status===1)return q._result.default;throw q._result}var j=typeof reportError=="function"?reportError:function(q){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q),error:q});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",q);return}console.error(q)};function We(q){var te=ie.T,fe={};fe.types=te!==null?te.types:null,ie.T=fe;try{var me=q(),Te=ie.S;Te!==null&&Te(fe,me),typeof me=="object"&&me!==null&&typeof me.then=="function"&&me.then(F,j)}catch(Ce){j(Ce)}finally{te!==null&&fe.types!==null&&(te.types=fe.types),ie.T=te}}function dt(q){var te=ie.T;if(te!==null){var fe=te.types;fe===null?te.types=[q]:fe.indexOf(q)===-1&&fe.push(q)}else We(dt.bind(null,q))}var z={map:ue,forEach:function(q,te,fe){ue(q,function(){te.apply(this,arguments)},fe)},count:function(q){var te=0;return ue(q,function(){te++}),te},toArray:function(q){return ue(q,function(te){return te})||[]},only:function(q){if(!ee(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return Oe.Activity=m,Oe.Children=z,Oe.Component=M,Oe.Fragment=a,Oe.Profiler=u,Oe.PureComponent=W,Oe.StrictMode=r,Oe.Suspense=p,Oe.ViewTransition=S,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ie,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(q){return ie.H.useMemoCache(q)}},Oe.addTransitionType=dt,Oe.cache=function(q){return function(){return q.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(q,te,fe){if(q==null)throw Error("The argument must be a React element, but you passed "+q+".");var me=C({},q.props),Te=q.key;if(te!=null)for(Ce in te.key!==void 0&&(Te=""+te.key),te)!he.call(te,Ce)||Ce==="key"||Ce==="__self"||Ce==="__source"||Ce==="ref"&&te.ref===void 0||(me[Ce]=te[Ce]);var Ce=arguments.length-2;if(Ce===1)me.children=fe;else if(1<Ce){for(var Ee=Array(Ce),P=0;P<Ce;P++)Ee[P]=arguments[P+2];me.children=Ee}return _(q.type,Te,me)},Oe.createContext=function(q){return q={$$typeof:f,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null},q.Provider=q,q.Consumer={$$typeof:o,_context:q},q},Oe.createElement=function(q,te,fe){var me,Te={},Ce=null;if(te!=null)for(me in te.key!==void 0&&(Ce=""+te.key),te)he.call(te,me)&&me!=="key"&&me!=="__self"&&me!=="__source"&&(Te[me]=te[me]);var Ee=arguments.length-2;if(Ee===1)Te.children=fe;else if(1<Ee){for(var P=Array(Ee),de=0;de<Ee;de++)P[de]=arguments[de+2];Te.children=P}if(q&&q.defaultProps)for(me in Ee=q.defaultProps,Ee)Te[me]===void 0&&(Te[me]=Ee[me]);return _(q,Ce,Te)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(q){return{$$typeof:h,render:q}},Oe.isValidElement=ee,Oe.lazy=function(q){return{$$typeof:y,_payload:{_status:-1,_result:q},_init:ke}},Oe.memo=function(q,te){return{$$typeof:g,type:q,compare:te===void 0?null:te}},Oe.startTransition=We,Oe.unstable_useCacheRefresh=function(){return ie.H.useCacheRefresh()},Oe.use=function(q){return ie.H.use(q)},Oe.useActionState=function(q,te,fe){return ie.H.useActionState(q,te,fe)},Oe.useCallback=function(q,te){return ie.H.useCallback(q,te)},Oe.useContext=function(q){return ie.H.useContext(q)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(q,te){return ie.H.useDeferredValue(q,te)},Oe.useEffect=function(q,te){return ie.H.useEffect(q,te)},Oe.useEffectEvent=function(q){return ie.H.useEffectEvent(q)},Oe.useId=function(){return ie.H.useId()},Oe.useImperativeHandle=function(q,te,fe){return ie.H.useImperativeHandle(q,te,fe)},Oe.useInsertionEffect=function(q,te){return ie.H.useInsertionEffect(q,te)},Oe.useLayoutEffect=function(q,te){return ie.H.useLayoutEffect(q,te)},Oe.useMemo=function(q,te){return ie.H.useMemo(q,te)},Oe.useOptimistic=function(q,te){return ie.H.useOptimistic(q,te)},Oe.useReducer=function(q,te,fe){return ie.H.useReducer(q,te,fe)},Oe.useRef=function(q){return ie.H.useRef(q)},Oe.useState=function(q){return ie.H.useState(q)},Oe.useSyncExternalStore=function(q,te,fe){return ie.H.useSyncExternalStore(q,te,fe)},Oe.useTransition=function(){return ie.H.useTransition()},Oe.version="19.3.1",Oe}var jy;function eh(){return jy||(jy=1,rd.exports=RS()),rd.exports}var D=eh(),sd={exports:{}},ts={},ud={exports:{}},od={};var Oy;function MS(){return Oy||(Oy=1,(function(n){function l(Q,se){var ue=Q.length;Q.push(se);e:for(;0<ue;){var ke=ue-1>>>1,j=Q[ke];if(0<u(j,se))Q[ke]=se,Q[ue]=j,ue=ke;else break e}}function a(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var se=Q[0],ue=Q.pop();if(ue!==se){Q[0]=ue;e:for(var ke=0,j=Q.length,We=j>>>1;ke<We;){var dt=2*(ke+1)-1,z=Q[dt],q=dt+1,te=Q[q];if(0>u(z,ue))q<j&&0>u(te,z)?(Q[ke]=te,Q[q]=ue,ke=q):(Q[ke]=z,Q[dt]=ue,ke=dt);else if(q<j&&0>u(te,ue))Q[ke]=te,Q[q]=ue,ke=q;else break e}}return se}function u(Q,se){var ue=Q.sortIndex-se.sortIndex;return ue!==0?ue:Q.id-se.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var p=[],g=[],y=1,m=null,S=3,x=!1,k=!1,T=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function W(Q){for(var se=a(g);se!==null;){if(se.callback===null)r(g);else if(se.startTime<=Q)r(g),se.sortIndex=se.expirationTime,l(p,se);else break;se=a(g)}}function ne(Q){if(T=!1,W(Q),!k)if(a(p)!==null)k=!0,O||(O=!0,ee());else{var se=a(g);se!==null&&le(ne,se.startTime-Q)}}var O=!1,F=-1,ie=5,he=-1;function _(){return C?!0:!(n.unstable_now()-he<ie)}function Z(){if(C=!1,O){var Q=n.unstable_now();he=Q;var se=!0;try{e:{k=!1,T&&(T=!1,M(F),F=-1),x=!0;var ue=S;try{t:{for(W(Q),m=a(p);m!==null&&!(m.expirationTime>Q&&_());){var ke=m.callback;if(typeof ke=="function"){m.callback=null,S=m.priorityLevel;var j=ke(m.expirationTime<=Q);if(Q=n.unstable_now(),typeof j=="function"){m.callback=j,W(Q),se=!0;break t}m===a(p)&&r(p),W(Q)}else r(p);m=a(p)}if(m!==null)se=!0;else{var We=a(g);We!==null&&le(ne,We.startTime-Q),se=!1}}break e}finally{m=null,S=ue,x=!1}se=void 0}}finally{se?ee():O=!1}}}var ee;if(typeof H=="function")ee=function(){H(Z)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,Re=we.port2;we.port1.onmessage=Z,ee=function(){Re.postMessage(null)}}else ee=function(){E(Z,0)};function le(Q,se){F=E(function(){Q(n.unstable_now())},se)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Q){Q.callback=null},n.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ie=0<Q?Math.floor(1e3/Q):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(Q){switch(S){case 1:case 2:case 3:var se=3;break;default:se=S}var ue=S;S=se;try{return Q()}finally{S=ue}},n.unstable_requestPaint=function(){C=!0},n.unstable_runWithPriority=function(Q,se){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var ue=S;S=Q;try{return se()}finally{S=ue}},n.unstable_scheduleCallback=function(Q,se,ue){var ke=n.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?ke+ue:ke):ue=ke,Q){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=ue+j,Q={id:y++,callback:se,priorityLevel:Q,startTime:ue,expirationTime:j,sortIndex:-1},ue>ke?(Q.sortIndex=ue,l(g,Q),a(p)===null&&Q===a(g)&&(T?(M(F),F=-1):T=!0,le(ne,ue-ke))):(Q.sortIndex=j,l(p,Q),k||x||(k=!0,O||(O=!0,ee()))),Q},n.unstable_shouldYield=_,n.unstable_wrapCallback=function(Q){var se=S;return function(){var ue=S;S=se;try{return Q.apply(this,arguments)}finally{S=ue}}}})(od)),od}var _y;function DS(){return _y||(_y=1,ud.exports=MS()),ud.exports}var cd={exports:{}},tn={};var zy;function LS(){if(zy)return tn;zy=1;var n=eh();function l(y){var m="https://react.dev/errors/"+y;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)m+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+y+"; visit "+m+" 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"),o=Symbol.for("react.recoverable"),f=Symbol.for("react.optimistic_key");function h(y,m,S){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:x==null?null:x===f?f:""+x,children:y,containerInfo:m,implementation:S}}var p=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(y,m){if(y==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return tn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,tn.browser=function(y){return{$$typeof:o,_reason:y}},tn.createPortal=function(y,m){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return h(y,m,null,S)},tn.flushSync=function(y){var m=p.T,S=r.p;try{if(p.T=null,r.p=2,y)return y()}finally{p.T=m,r.p=S,r.d.f()}},tn.preconnect=function(y,m){typeof y=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(y,m))},tn.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},tn.preinit=function(y,m){if(typeof y=="string"&&m&&typeof m.as=="string"){var S=m.as,x=g(S,m.crossOrigin),k=typeof m.integrity=="string"?m.integrity:void 0,T=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;S==="style"?r.d.S(y,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:k,fetchPriority:T}):S==="script"&&r.d.X(y,{crossOrigin:x,integrity:k,fetchPriority:T,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},tn.preinitModule=function(y,m){if(typeof y=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var S=g(m.as,m.crossOrigin);r.d.M(y,{crossOrigin:S,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0})}}else m==null&&r.d.M(y)},tn.preload=function(y,m){if(typeof y=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var S=m.as,x=g(S,m.crossOrigin);r.d.L(y,S,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},tn.preloadModule=function(y,m){if(typeof y=="string")if(m){var S=g(m.as,m.crossOrigin);r.d.m(y,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:S,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0})}else r.d.m(y)},tn.requestFormReset=function(y){r.d.r(y)},tn.unstable_batchedUpdates=function(y,m){return y(m)},tn.useFormState=function(y,m,S){return p.H.useFormState(y,m,S)},tn.useFormStatus=function(){return p.H.useHostTransitionStatus()},tn.version="19.3.1",tn}var qy;function Jv(){if(qy)return cd.exports;qy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),cd.exports=LS(),cd.exports}var Ry;function BS(){if(Ry)return ts;Ry=1;var n=DS(),l=eh(),a=Jv();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,i=t;i&&!i.alternate;)t=i,(t.flags&4098)!==0&&(e=t.return),i=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(o(e)!==e)throw Error(r(188))}function g(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(r(188));return t!==e?null:e}for(var i=e,s=t;;){var c=i.return;if(c===null)break;var d=c.alternate;if(d===null){if(s=c.return,s!==null){i=s;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===i)return p(c),e;if(d===s)return p(c),t;d=d.sibling}throw Error(r(188))}if(i.return!==s.return)i=c,s=d;else{for(var v=!1,w=c.child;w;){if(w===i){v=!0,i=c,s=d;break}if(w===s){v=!0,s=c,i=d;break}w=w.sibling}if(!v){for(w=d.child;w;){if(w===i){v=!0,i=d,s=c;break}if(w===s){v=!0,s=d,i=c;break}w=w.sibling}if(!v)throw Error(r(189))}}if(i.alternate!==s)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}function m(e,t,i,s,c,d){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&i(e,s,c,d)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,i,s,c,d))return!0;e=e.sibling}return!1}function S(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function x(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function k(e){var t=[null,null],i=S(e);return i===null||T(t,e,i.child,{foundSelf:!1}),t}function T(e,t,i,s){for(;i!==null;){if(i===t)s.foundSelf=!0;else if(i.tag===5||i.tag===27||i.tag===6){if(s.foundSelf)return e[1]=i,!0;e[0]=i}else if((i.tag!==22||i.memoizedState===null)&&T(e,t,i.child,s))return!0;i=i.sibling}return!1}function C(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(r(559))}}var E=null,M=null;function H(e,t,i){return e===i?!0:e===t?(E=e,!0):!1}function W(e,t,i){return e===i?(M=e,!1):e===t?(M!==null&&(E=e),!0):!1}function ne(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function O(e,t,i){for(var s=0,c=e;c;c=i(c))s++;c=0;for(var d=t;d;d=i(d))c++;for(;0<s-c;)e=i(e),s--;for(;0<c-s;)t=i(t),c--;for(;s--;){if(e===t||t!==null&&e===t.alternate)return e;e=i(e),t=i(t)}return null}var F=Object.assign,ie=Symbol.for("react.element"),he=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),ee=Symbol.for("react.strict_mode"),we=Symbol.for("react.profiler"),Re=Symbol.for("react.consumer"),le=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),se=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),ke=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),We=Symbol.for("react.activity"),dt=Symbol.for("react.legacy_hidden"),z=Symbol.for("react.memo_cache_sentinel"),q=Symbol.for("react.view_transition"),te=Symbol.for("react.recoverable"),fe=Symbol.iterator;function me(e){return e===null||typeof e!="object"?null:(e=fe&&e[fe]||e["@@iterator"],typeof e=="function"?e:null)}var Te=Symbol.for("react.client.reference");function Ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Z:return"Fragment";case we:return"Profiler";case ee:return"StrictMode";case se:return"Suspense";case ue:return"SuspenseList";case We:return"Activity";case q:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case le:return e.displayName||"Context";case Re:return(e._context.displayName||"Context")+".Consumer";case Q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ke:return t=e.displayName||null,t!==null?t:Ce(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return Ce(e(t))}catch{}}return null}var Ee=Array.isArray,P=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at={pending:!1,data:null,method:null,action:null},_t=[],xe=-1;function zt(e){return{current:e}}function vt(e){0>xe||(e.current=_t[xe],_t[xe]=null,xe--)}function Ze(e,t){xe++,_t[xe]=e.current,e.current=t}var _e=zt(null),rt=zt(null),wt=zt(null),un=zt(null);function Zt(e,t){switch(Ze(wt,t),Ze(rt,e),Ze(_e,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Mg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Mg(t),e=Dg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}vt(_e),Ze(_e,e)}function Vt(){vt(_e),vt(rt),vt(wt)}function Rn(e){var t=e.memoizedState;t!==null&&(tr._currentValue=t.memoizedState,Ze(un,e)),t=_e.current;var i=Dg(t,e.type);t!==i&&(Ze(rt,e),Ze(_e,i))}function Yt(e){rt.current===e&&(vt(_e),vt(rt)),un.current===e&&(vt(un),tr._currentValue=at)}var X,ae;function ye(e){if(X===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);X=t&&t[1]||"",ae=-1<i.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+X+e+ae}var ge=!1;function ht(e,t){if(!e||ge)return"";ge=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(ce){var L=ce}Reflect.construct(e,[],$)}else{try{$.call()}catch(ce){L=ce}$=!1;try{var Y=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),$=!0,new e}finally{$&&(Y!==void 0?Object.defineProperty(e.prototype,"props",Y):delete e.prototype.props)}}}else{try{throw Error()}catch(ce){L=ce}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(ce){if(ce&&L&&typeof ce.stack=="string")return[ce.stack,L.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=s.DetermineComponentFrameRoot(),v=d[0],w=d[1];if(v&&w){var N=v.split(`
4
+ `),U=w.split(`
5
+ `);for(c=s=0;s<N.length&&!N[s].includes("DetermineComponentFrameRoot");)s++;for(;c<U.length&&!U[c].includes("DetermineComponentFrameRoot");)c++;if(s===N.length||c===U.length)for(s=N.length-1,c=U.length-1;1<=s&&0<=c&&N[s]!==U[c];)c--;for(;1<=s&&0<=c;s--,c--)if(N[s]!==U[c]){if(s!==1||c!==1)do if(s--,c--,0>c||N[s]!==U[c]){var G=`
6
+ `+N[s].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=s&&0<=c);break}}}finally{ge=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ye(i):""}function ze(e,t){switch(e.tag){case 26:case 27:case 5:return ye(e.type);case 16:return ye("Lazy");case 13:return e.child!==t&&t!==null?ye("Suspense Fallback"):ye("Suspense");case 19:return ye("SuspenseList");case 0:case 15:return ht(e.type,!1);case 11:return ht(e.type.render,!1);case 1:return ht(e.type,!0);case 31:return ye("Activity");case 30:return ye("ViewTransition");default:return""}}function kt(e){try{var t="",i=null;do t+=ze(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
7
+ Error generating stack: `+s.message+`
8
+ `+s.stack}}var Gt=Object.prototype.hasOwnProperty,on=n.unstable_scheduleCallback,At=n.unstable_cancelCallback,cn=n.unstable_shouldYield,_l=n.unstable_requestPaint,Ct=n.unstable_now,Kt=n.unstable_getCurrentPriorityLevel,Mn=n.unstable_ImmediatePriority,bt=n.unstable_UserBlockingPriority,Ti=n.unstable_NormalPriority,Ai=n.unstable_LowPriority,zl=n.unstable_IdlePriority,Mo=n.log,Do=n.unstable_setDisableYieldValue,Xi=null,fn=null;function ui(e){if(typeof Mo=="function"&&Do(e),fn&&typeof fn.setStrictMode=="function")try{fn.setStrictMode(Xi,e)}catch{}}var dn=Math.clz32?Math.clz32:ma,pa=Math.log,Lo=Math.LN2;function ma(e){return e>>>=0,e===0?32:31-(pa(e)/Lo|0)|0}var ql=256,Rl=262144,Zi=4194304;function Xn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;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 Ml(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var c=0,d=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var w=s&134217727;return w!==0?(s=w&~d,s!==0?c=Xn(s):(v&=w,v!==0?c=Xn(v):i||(i=w&~e,i!==0&&(c=Xn(i))))):(w=s&~d,w!==0?c=Xn(w):v!==0?c=Xn(v):i||(i=s&~e,i!==0&&(c=Xn(i)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,i=t&-t,d>=i||d===32&&(i&4194048)!==0)?t:c}function Ci(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ga(e,t){(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var s=31-dn(i),c=1<<s;t|=e[s],i&=~c}return t}function Es(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Dl(){var e=Zi;return Zi<<=1,(Zi&62914560)===0&&(Zi=4194304),e}function Ki(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Ni(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ts(e,t,i,s,c,d){var v=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,N=e.expirationTimes,U=e.hiddenUpdates;for(i=v&~i;0<i;){var G=31-dn(i),$=1<<G;w[G]=0,N[G]=-1;var L=U[G];if(L!==null)for(U[G]=null,G=0;G<L.length;G++){var Y=L[G];Y!==null&&(Y.lane&=-536870913)}i&=~$}s!==0&&Ll(e,s,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(v&~t))}function Ll(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-dn(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function ya(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-dn(i),c=1<<s;c&t|e[s]&t&&(e[s]|=t),i&=~c}}function oi(e,t){var i=t&-t;return i=(i&42)!==0?1:Bl(i),(i&(e.suspendedLanes|t))!==0?0:i}function Bl(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 or(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ji(){var e=de.p;return e!==0?e:(e=window.event,e===void 0?32:by(e.type))}function As(e,t){var i=de.p;try{return de.p=e,t()}finally{de.p=i}}var Tn=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Tn,an="__reactProps$"+Tn,Ji="__reactContainer$"+Tn,Cs="__reactEvents$"+Tn,$i="__reactListeners$"+Tn,Bo="__reactHandles$"+Tn,cr="__reactResources$"+Tn,Pi="__reactMarker$"+Tn,ci="__reactLoad$"+Tn;function Ht(e){delete e[Nt],delete e[an],delete e[$i],delete e[Bo]}function Zn(e){var t;if(t=e[Nt])return t;for(var i=e.parentNode;i;){if(t=i[Ji]||i[Nt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Wg(e);e!==null;){if(i=e[Nt])return i;e=Wg(e)}return t}e=i,i=e.parentNode}return null}function Oi(e){if(e=e[Nt]||e[Ji]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Wi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function _i(e){var t=e[cr];return t||(t=e[cr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Rt(e){e[Pi]=!0}function Uo(e){e[ci]=void 0}var fr=new Set,Kn={};function Jn(e,t){el(e,t),el(e+"Capture",t)}function el(e,t){for(Kn[e]=t,e=0;e<t.length;e++)fr.add(t[e])}var fi=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]*$"),va={},$n={};function Ns(e){return Gt.call($n,e)?!0:Gt.call(va,e)?!1:fi.test(e)?$n[e]=!0:(va[e]=!0,!1)}var Ve=!1;function ba(){var e=Ve;return Ve=!1,e}function tl(e,t,i){if(Ns(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,i)}}function Ul(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,i)}}function Pn(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,s)}}function rn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function js(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ho(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,d=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(v){i=""+v,d.call(this,v)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dr(e){if(!e._valueTracker){var t=js(e)?"checked":"value";e._valueTracker=Ho(e,t,""+e[t])}}function Os(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=js(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}var Io=/[\n"\\]/g;function hn(e){return e.replace(Io,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function xa(e,t,i,s,c,d,v,w){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+rn(t)):e.value!==""+rn(t)&&(e.value=""+rn(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?v==="number"&&e.value==t?Sa(e,rn(e.value)):Sa(e,rn(t)):i!=null?Sa(e,rn(i)):s!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+rn(w):e.removeAttribute("name")}function _s(e,t,i,s,c,d,v,w){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||i!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){dr(e);return}i=i!=null?""+rn(i):"",t=t!=null?""+rn(t):i,w||t===e.value||(e.value=t),e.defaultValue=t}s=s??c,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=w?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),dr(e)}function Sa(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function zi(e,t,i,s){if(e=e.options,t){t={};for(var c=0;c<i.length;c++)t["$"+i[c]]=!0;for(i=0;i<e.length;i++)c=t.hasOwnProperty("$"+e[i].value),e[i].selected!==c&&(e[i].selected=c),c&&s&&(e[i].defaultSelected=!0)}else{for(i=""+rn(i),t=null,c=0;c<e.length;c++){if(e[c].value===i){e[c].selected=!0,s&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function zs(e,t,i){if(t!=null&&(t=""+rn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+rn(i):""}function qs(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(r(92));if(Ee(s)){if(1<s.length)throw Error(r(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=rn(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),dr(e)}function Dn(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Oh=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 hr(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||Oh.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Rs(e,t,i){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="",Ve=!0);for(var c in t)s=t[c],t.hasOwnProperty(c)&&i[c]!==s&&(hr(e,c,s),Ve=!0)}else for(var d in t)t.hasOwnProperty(d)&&hr(e,d,t[d])}function wa(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 A=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"],["maskType","mask-type"],["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"]]),V=/^[\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 K(e){return V.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function oe(){}var Ne=null;function be(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Le=null,et=null;function $e(e){var t=Oi(e);if(t&&(e=t.stateNode)){var i=e[an]||null;e:switch(e=t.stateNode,t.type){case"input":if(xa(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+hn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var c=s[an]||null;if(!c)throw Error(r(90));xa(s,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Os(s)}break e;case"textarea":zs(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&zi(e,!!i.multiple,t,!1)}}}var Je=!1;function pt(e,t,i){if(Je)return e(t,i);Je=!0;try{var s=e(t);return s}finally{if(Je=!1,(Le!==null||et!==null)&&(Ru(),Le&&(t=Le,e=et,et=Le=null,$e(t),e)))for(t=0;t<e.length;t++)$e(e[t])}}function ct(e,t){var i=e.stateNode;if(i===null)return null;var s=i[an]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(r(231,t,typeof i));return i}var tt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ln=!1;if(tt)try{var qi={};Object.defineProperty(qi,"passive",{get:function(){Ln=!0}}),window.addEventListener("test",qi,qi),window.removeEventListener("test",qi,qi)}catch{Ln=!1}var nl=null,Vo=null,Ms=null;function _h(){if(Ms)return Ms;var e,t=Vo,i=t.length,s,c="value"in nl?nl.value:nl.textContent,d=c.length;for(e=0;e<i&&t[e]===c[e];e++);var v=i-e;for(s=1;s<=v&&t[i-s]===c[d-s];s++);return Ms=c.slice(e,1<s?1-s:void 0)}function Ds(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ls(){return!0}function zh(){return!1}function pn(e){function t(i,s,c,d,v){this._reactName=i,this._targetInst=c,this.type=s,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(i=e[w],this[w]=i?i(d):d[w]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Ls:zh,this.isPropagationStopped=zh,this}return F(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Ls)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Ls)},persist:function(){},isPersistent:Ls}),t}var il={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bs=pn(il),pr=F({},il,{view:0,detail:0}),n1=pn(pr),Yo,Go,mr,Us=F({},pr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fo,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!==mr&&(mr&&e.type==="mousemove"?(Yo=e.screenX-mr.screenX,Go=e.screenY-mr.screenY):Go=Yo=0,mr=e),Yo)},movementY:function(e){return"movementY"in e?e.movementY:Go}}),qh=pn(Us),i1=F({},Us,{dataTransfer:0}),l1=pn(i1),a1=F({},pr,{relatedTarget:0}),Qo=pn(a1),r1=F({},il,{animationName:0,elapsedTime:0,pseudoElement:0}),s1=pn(r1),u1=F({},il,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),o1=pn(u1),c1=F({},il,{data:0}),Rh=pn(c1),f1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},d1={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"},h1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function p1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=h1[e])?!!t[e]:!1}function Fo(){return p1}var m1=F({},pr,{key:function(e){if(e.key){var t=f1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?d1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fo,charCode:function(e){return e.type==="keypress"?Ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),g1=pn(m1),y1=F({},Us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mh=pn(y1),v1=F({},il,{submitter:0}),b1=pn(v1),x1=F({},pr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fo}),S1=pn(x1),w1=F({},il,{propertyName:0,elapsedTime:0,pseudoElement:0}),k1=pn(w1),E1=F({},Us,{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}),T1=pn(E1),A1=F({},il,{newState:0,oldState:0,source:0}),C1=pn(A1),N1=[9,13,27,32],Xo=tt&&"CompositionEvent"in window,gr=null;tt&&"documentMode"in document&&(gr=document.documentMode);var j1=tt&&"TextEvent"in window&&!gr,Dh=tt&&(!Xo||gr&&8<gr&&11>=gr),Lh=" ",Bh=!1;function Uh(e,t){switch(e){case"keyup":return N1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ka=!1;function O1(e,t){switch(e){case"compositionend":return Hh(t);case"keypress":return t.which!==32?null:(Bh=!0,Lh);case"textInput":return e=t.data,e===Lh&&Bh?null:e;default:return null}}function _1(e,t){if(ka)return e==="compositionend"||!Xo&&Uh(e,t)?(e=_h(),Ms=Vo=nl=null,ka=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dh&&t.locale!=="ko"?null:t.data;default:return null}}var z1={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 Ih(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!z1[e.type]:t==="textarea"}function Vh(e,t,i,s){Le?et?et.push(s):et=[s]:Le=s,t=Hu(t,"onChange"),0<t.length&&(i=new Bs("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var yr=null,vr=null;function q1(e){jg(e,0)}function Hs(e){var t=Wi(e);if(Os(t))return e}function Yh(e,t){if(e==="change")return t}var Gh=!1;if(tt){var Zo;if(tt){var Ko="oninput"in document;if(!Ko){var Qh=document.createElement("div");Qh.setAttribute("oninput","return;"),Ko=typeof Qh.oninput=="function"}Zo=Ko}else Zo=!1;Gh=Zo&&(!document.documentMode||9<document.documentMode)}function Fh(){yr&&(yr.detachEvent("onpropertychange",Xh),vr=yr=null)}function Xh(e){if(e.propertyName==="value"&&Hs(vr)){var t=[];Vh(t,vr,e,be(e)),pt(q1,t)}}function R1(e,t,i){e==="focusin"?(Fh(),yr=t,vr=i,yr.attachEvent("onpropertychange",Xh)):e==="focusout"&&Fh()}function M1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hs(vr)}function D1(e,t){if(e==="click")return Hs(t)}function L1(e,t){if(e==="input"||e==="change")return Hs(t)}function B1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var An=typeof Object.is=="function"?Object.is:B1;function br(e,t){if(An(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var c=i[s];if(!Gt.call(t,c)||!An(e[c],t[c]))return!1}return!0}function Jo(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}}function Zh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kh(e,t){var i=Zh(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Zh(i)}}function Jh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $h(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Jo(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Jo(e.document)}return t}function $o(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var U1=tt&&"documentMode"in document&&11>=document.documentMode,Ea=null,Po=null,xr=null,Wo=!1;function Ph(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Wo||Ea==null||Ea!==Jo(s)||(s=Ea,"selectionStart"in s&&$o(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),xr&&br(xr,s)||(xr=s,s=Hu(Po,"onSelect"),0<s.length&&(t=new Bs("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Ea)))}function Hl(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ta={animationend:Hl("Animation","AnimationEnd"),animationiteration:Hl("Animation","AnimationIteration"),animationstart:Hl("Animation","AnimationStart"),transitionrun:Hl("Transition","TransitionRun"),transitionstart:Hl("Transition","TransitionStart"),transitioncancel:Hl("Transition","TransitionCancel"),transitionend:Hl("Transition","TransitionEnd")},ec={},Wh={};tt&&(Wh=document.createElement("div").style,"AnimationEvent"in window||(delete Ta.animationend.animation,delete Ta.animationiteration.animation,delete Ta.animationstart.animation),"TransitionEvent"in window||delete Ta.transitionend.transition);function Il(e){if(ec[e])return ec[e];if(!Ta[e])return e;var t=Ta[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Wh)return ec[e]=t[i];return e}var ep=Il("animationend"),tp=Il("animationiteration"),np=Il("animationstart"),H1=Il("transitionrun"),I1=Il("transitionstart"),V1=Il("transitioncancel"),ip=Il("transitionend"),lp=new Map,tc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");tc.push("scrollEnd");function Wn(e,t){lp.set(e,t),Jn(t,[e])}var Y1=0;function Ri(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=ii.identifierPrefix;var i=Y1++;return e="_"+e+"t_"+i.toString(32)+"_",t.autoName=e}function ap(e){if(e==null||typeof e=="string")return e;var t=null,i=Qa;if(i!==null)for(var s=0;s<i.length;s++){var c=e[i[s]];if(c!=null){if(c==="none")return"none";t=t==null?c:t+(" "+c)}}return t??e.default}function Mi(e,t){return e=ap(e),t=ap(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Is=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Bn=[],Aa=0,nc=0;function Vs(){for(var e=Aa,t=nc=Aa=0;t<e;){var i=Bn[t];Bn[t++]=null;var s=Bn[t];Bn[t++]=null;var c=Bn[t];Bn[t++]=null;var d=Bn[t];if(Bn[t++]=null,s!==null&&c!==null){var v=s.pending;v===null?c.next=c:(c.next=v.next,v.next=c),s.pending=c}d!==0&&rp(i,c,d)}}function Ys(e,t,i,s){Bn[Aa++]=e,Bn[Aa++]=t,Bn[Aa++]=i,Bn[Aa++]=s,nc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function ic(e,t,i,s){return Ys(e,t,i,s),Gs(e)}function Vl(e,t){return Ys(e,null,null,t),Gs(e)}function rp(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var c=!1,d=e.return;d!==null;)d.childLanes|=i,s=d.alternate,s!==null&&(s.childLanes|=i),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-dn(i),e=d.hiddenUpdates,s=e[c],s===null?e[c]=[t]:s.push(t),t.lane=i|536870912),d):null}function Gs(e){if(50<Vr)throw Vr=0,qu=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ca={};function G1(e,t,i,s){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=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(e,t,i,s){return new G1(e,t,i,s)}function lc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Di(e,t){var i=e.alternate;return i===null?(i=vn(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&1206910976,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function sp(e,t){e.flags&=1206910978;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=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,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Qs(e,t,i,s,c,d){var v=0;if(s=e,typeof s=="function")lc(s)&&(v=1);else if(typeof s=="string")v=vS(e,i,_e.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(s){case We:return e=vn(31,i,t,c),e.elementType=We,e.lanes=d,e;case Z:return Yl(i.children,c,d,t);case ee:v=8,c|=24;break;case we:return e=vn(12,i,t,c|2),e.elementType=we,e.lanes=d,e;case se:return e=vn(13,i,t,c),e.elementType=se,e.lanes=d,e;case ue:return e=vn(19,i,t,c),e.elementType=ue,e.lanes=d,e;case dt:case q:return e=c|32,e=vn(30,i,t,e),e.elementType=q,e.lanes=d,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case le:v=10;break e;case Re:v=9;break e;case Q:v=11;break e;case ke:v=14;break e;case j:v=16,s=null;break e}v=29,i=Error(r(130,e===null?"null":typeof e,"")),s=null}return t=vn(v,i,t,c),t.elementType=e,t.type=s,t.lanes=d,t}function Yl(e,t,i,s){return e=vn(7,e,s,t),e.lanes=i,e}function ac(e,t,i){return e=vn(6,e,null,t),e.lanes=i,e}function up(e){var t=vn(18,null,null,0);return t.stateNode=e,t}function rc(e,t,i){return t=vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var op=new WeakMap;function Un(e,t){if(typeof e=="object"&&e!==null){var i=op.get(e);return i!==void 0?i:(t={value:e,source:t,stack:kt(t)},op.set(e,t),t)}return{value:e,source:t,stack:kt(t)}}var Na=[],ja=0,Fs=null,Sr=0,Hn=[],In=0,ll=null,di=1,hi="";function Li(e,t){Na[ja++]=Sr,Na[ja++]=Fs,Fs=e,Sr=t}function cp(e,t,i){Hn[In++]=di,Hn[In++]=hi,Hn[In++]=ll,ll=e;var s=di;e=hi;var c=32-dn(s)-1;s&=~(1<<c),i+=1;var d=32-dn(t)+c;if(30<d){var v=c-c%5;d=(s&(1<<v)-1).toString(32),s>>=v,c-=v,di=1<<32-dn(t)+c|i<<c|s,hi=d+e}else di=1<<d|i<<c|s,hi=e}function Xs(e){e.return!==null&&(Li(e,1),cp(e,1,0))}function sc(e){for(;e===Fs;)Fs=Na[--ja],Na[ja]=null,Sr=Na[--ja],Na[ja]=null;for(;e===ll;)ll=Hn[--In],Hn[In]=null,hi=Hn[--In],Hn[In]=null,di=Hn[--In],Hn[In]=null}function fp(e,t){Hn[In++]=di,Hn[In++]=hi,Hn[In++]=ll,di=t.id,hi=t.overflow,ll=e}var Qt=null,xt=null,Be=!1,al=null,Vn=!1,uc=Error(r(519));function rl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wr(Un(t,e)),uc}function dp(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[Nt]=e,t[an]=s,i){case"dialog":Ie("cancel",t),Ie("close",t);break;case"iframe":case"object":case"embed":Ie("load",t);break;case"video":case"audio":for(i=0;i<Gr.length;i++)Ie(Gr[i],t);break;case"source":Ie("error",t);break;case"img":case"image":case"link":Ie("error",t),Ie("load",t);break;case"details":Ie("toggle",t);break;case"input":Ie("invalid",t),_s(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ie("invalid",t);break;case"textarea":Ie("invalid",t),qs(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||qg(t.textContent,i)?(s.popover!=null&&(Ie("beforetoggle",t),Ie("toggle",t)),s.onScroll!=null&&Ie("scroll",t),s.onScrollEnd!=null&&Ie("scrollend",t),s.onClick!=null&&(t.onclick=oe),t=!0):t=!1,t||rl(e,!0)}function Zs(e){for(Qt=e.return;Qt;)switch(Qt.tag){case 5:case 31:case 13:Vn=!1;return;case 27:case 3:Vn=!0;return;default:Qt=Qt.return}}function Oa(e){if(e!==Qt)return!1;if(!Be)return Zs(e),Be=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Uf(e.type,e.memoizedProps)),i=!i),i&&xt&&rl(e),Zs(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));xt=Pg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));xt=Pg(e)}else t===27?(t=xt,wl(e.type)?(e=Zf,Zf=null,xt=e):xt=t):xt=Qt?Gn(e.stateNode.nextSibling):null;return!0}function Gl(){xt=Qt=null,Be=!1}function oc(){var e=al;return e!==null&&(Sn===null?Sn=e:Sn.push.apply(Sn,e),al=null),e}function wr(e){al===null?al=[e]:al.push(e)}var cc=zt(null),Ql=null,Bi=null;function sl(e,t,i){Ze(cc,t._currentValue),t._currentValue=i}function Ui(e){e._currentValue=cc.current,vt(cc)}function Ks(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function fc(e,t,i,s){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var v=c.child;d=d.firstContext;e:for(;d!==null;){var w=d;d=c;for(var N=0;N<t.length;N++)if(w.context===t[N]){d.lanes|=i,w=d.alternate,w!==null&&(w.lanes|=i),Ks(d.return,i,e),s||(v=null);break e}d=w.next}}else if(c.tag===18){if(v=c.return,v===null)throw Error(r(341));v.lanes|=i,d=v.alternate,d!==null&&(d.lanes|=i),Ks(v,i,e),v=null}else c.tag===13&&c.memoizedState!==null&&c.memoizedState.dehydrated===null?(c.lanes|=i,v=c.alternate,v!==null&&(v.lanes|=i),Ks(c.return,i,e),v=c.child,v=v!==null?v.sibling:null):v=c.child;if(v!==null)v.return=c;else for(v=c;v!==null;){if(v===e){v=null;break}if(c=v.sibling,c!==null){c.return=v.return,v=c;break}v=v.return}c=v}}function Fl(e,t,i,s){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var v=c.alternate;if(v===null)throw Error(r(387));if(v=v.memoizedProps,v!==null){var w=c.type;An(c.pendingProps.value,v.value)||(e!==null?e.push(w):e=[w])}}else if(c===un.current){if(v=c.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(tr):e=[tr])}c=c.return}return e!==null&&fc(t,e,i,s),t.flags|=262144,e!==null}function Js(e){for(e=e.firstContext;e!==null;){if(!An(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Xl(e){Ql=e,Bi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Jt(e){return hp(Ql,e)}function $s(e,t){return Ql===null&&Xl(e),hp(e,t)}function hp(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Bi===null){if(e===null)throw Error(r(308));Bi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Bi=Bi.next=t;return i}var Q1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},F1=n.unstable_scheduleCallback,X1=n.unstable_NormalPriority,Mt={$$typeof:le,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dc(){return{controller:new Q1,data:new Map,refCount:0}}function kr(e){e.refCount--,e.refCount===0&&F1(X1,function(){e.controller.abort()})}function pp(e,t){if((e.pendingLanes&4194048)!==0){var i=e.transitionTypes;for(i===null&&(i=e.transitionTypes=[]),e=0;e<t.length;e++){var s=t[e];i.indexOf(s)===-1&&i.push(s)}}}var Er=null;function Z1(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Tr=null,hc=0,Zl=0,_a=null;function K1(e,t){if(Tr===null){var i=Tr=[];hc=0,Zl=Of(),_a={status:"pending",value:void 0,then:function(s){i.push(s)}}}return hc++,t.then(mp,mp),t}function mp(){if(--hc===0&&(Er=null,Tr!==null)){_a!==null&&(_a.status="fulfilled");var e=Tr;Tr=null,Zl=0,_a=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function J1(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(c){i.push(c)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var c=0;c<i.length;c++)(0,i[c])(t)},function(c){for(s.status="rejected",s.reason=c,c=0;c<i.length;c++)(0,i[c])(void 0)}),s}var gp=P.S;P.S=function(e,t){if(ug=Ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&K1(e,t),Er!==null)for(var i=Ka;i!==null;)pp(i,Er),i=i.next;if(i=e.types,i!==null){for(var s=Ka;s!==null;)pp(s,i),s=s.next;if(Zl!==0){s=Er,s===null&&(s=Er=[]);for(var c=0;c<i.length;c++){var d=i[c];s.indexOf(d)===-1&&s.push(d)}}}gp!==null&&gp(e,t)};var Kl=zt(null);function pc(){var e=Kl.current;return e!==null?e:mt.pooledCache}function Ps(e,t){t===null?Ze(Kl,Kl.current):Ze(Kl,t.pool)}function yp(){var e=pc();return e===null?null:{parent:Mt._currentValue,pool:e}}var za=Error(r(460)),mc=Error(r(474)),Ws=Error(r(542)),eu={then:function(){}};function vp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bp(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(oe,oe),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Sp(e),e===void 0&&!("reason"in t)?Error(r(600)):e;default:if(typeof t.status=="string")t.then(oe,oe);else{if(e=mt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=s}},function(s){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Sp(e),e}throw $l=t,za}}function Jl(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?($l=i,za):i}}var $l=null;function xp(){if($l===null)throw Error(r(459));var e=$l;return $l=null,e}function Sp(e){if(e===za||e===Ws)throw Error(r(483))}var qa=null,Ar=0;function tu(e){var t=Ar;return Ar+=1,qa===null&&(qa=[]),bp(qa,e,t)}function ul(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function nu(e,t){throw t.$$typeof===ie?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function wp(e){function t(B,R){if(e){var I=B.deletions;I===null?(B.deletions=[R],B.flags|=16):I.push(R)}}function i(B,R){if(!e)return null;for(;R!==null;)t(B,R),R=R.sibling;return null}function s(B){for(var R=new Map;B!==null;)B.key===null?R.set(B.index,B):R.set(B.key,B),B=B.sibling;return R}function c(B,R){return B=Di(B,R),B.index=0,B.sibling=null,B}function d(B,R,I){return B.index=I,e?(I=B.alternate,I!==null?(I=I.index,I<R?(B.flags|=2,R):I):(B.flags|=134217730,R)):(B.flags|=1048576,R)}function v(B){return e&&B.alternate===null&&(B.flags|=134217730),B}function w(B,R,I,J){return R===null||R.tag!==6?(R=ac(I,B.mode,J),R.return=B,R):(R=c(R,I),R.return=B,R)}function N(B,R,I,J){var pe=I.type;return pe===Z?(B=G(B,R,I.props.children,J,I.key),ul(B,I),B):R!==null&&(R.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===j&&Jl(pe)===R.type)?(R=c(R,I.props),ul(R,I),R.return=B,R):(R=Qs(I.type,I.key,I.props,null,B.mode,J),ul(R,I),R.return=B,R)}function U(B,R,I,J){return R===null||R.tag!==4||R.stateNode.containerInfo!==I.containerInfo||R.stateNode.implementation!==I.implementation?(R=rc(I,B.mode,J),R.return=B,R):(R=c(R,I.children||[]),R.return=B,R)}function G(B,R,I,J,pe){return R===null||R.tag!==7?(R=Yl(I,B.mode,J,pe),R.return=B,R):(R=c(R,I),R.return=B,R)}function $(B,R,I){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=ac(""+R,B.mode,I),R.return=B,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case he:return I=Qs(R.type,R.key,R.props,null,B.mode,I),ul(I,R),I.return=B,I;case _:return R=rc(R,B.mode,I),R.return=B,R;case j:return R=Jl(R),$(B,R,I)}if(Ee(R)||me(R))return R=Yl(R,B.mode,I,null),R.return=B,R;if(typeof R.then=="function")return $(B,tu(R),I);if(R.$$typeof===le)return $(B,$s(B,R),I);nu(B,R)}return null}function L(B,R,I,J){var pe=R!==null?R.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return pe!==null?null:w(B,R,""+I,J);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case he:return I.key===pe?N(B,R,I,J):null;case _:return I.key===pe?U(B,R,I,J):null;case j:return I=Jl(I),L(B,R,I,J)}if(Ee(I)||me(I))return pe!==null?null:G(B,R,I,J,null);if(typeof I.then=="function")return L(B,R,tu(I),J);if(I.$$typeof===le)return L(B,R,$s(B,I),J);nu(B,I)}return null}function Y(B,R,I,J,pe){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return B=B.get(I)||null,w(R,B,""+J,pe);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case he:return B=B.get(J.key===null?I:J.key)||null,N(R,B,J,pe);case _:return B=B.get(J.key===null?I:J.key)||null,U(R,B,J,pe);case j:return J=Jl(J),Y(B,R,I,J,pe)}if(Ee(J)||me(J))return B=B.get(I)||null,G(R,B,J,pe,null);if(typeof J.then=="function")return Y(B,R,I,tu(J),pe);if(J.$$typeof===le)return Y(B,R,I,$s(R,J),pe);nu(R,J)}return null}function ce(B,R,I,J){for(var pe=null,Ge=null,Se=R,je=R=0,Bt=null;Se!==null&&je<I.length;je++){Se.index>je?(Bt=Se,Se=null):Bt=Se.sibling;var Ke=L(B,Se,I[je],J);if(Ke===null){Se===null&&(Se=Bt);break}e&&Se&&Ke.alternate===null&&t(B,Se),R=d(Ke,R,je),Ge===null?pe=Ke:Ge.sibling=Ke,Ge=Ke,Se=Bt}if(je===I.length)return i(B,Se),Be&&Li(B,je),pe;if(Se===null){for(;je<I.length;je++)Se=$(B,I[je],J),Se!==null&&(R=d(Se,R,je),Ge===null?pe=Se:Ge.sibling=Se,Ge=Se);return Be&&Li(B,je),pe}for(Se=s(Se);je<I.length;je++)Bt=Y(Se,B,je,I[je],J),Bt!==null&&(e&&(Ke=Bt.alternate,Ke!==null&&Se.delete(Ke.key===null?je:Ke.key)),R=d(Bt,R,je),Ge===null?pe=Bt:Ge.sibling=Bt,Ge=Bt);return e&&Se.forEach(function(Cl){return t(B,Cl)}),Be&&Li(B,je),pe}function ve(B,R,I,J){if(I==null)throw Error(r(151));for(var pe=null,Ge=null,Se=R,je=R=0,Bt=null,Ke=I.next();Se!==null&&!Ke.done;je++,Ke=I.next()){Se.index>je?(Bt=Se,Se=null):Bt=Se.sibling;var Cl=L(B,Se,Ke.value,J);if(Cl===null){Se===null&&(Se=Bt);break}e&&Se&&Cl.alternate===null&&t(B,Se),R=d(Cl,R,je),Ge===null?pe=Cl:Ge.sibling=Cl,Ge=Cl,Se=Bt}if(Ke.done)return i(B,Se),Be&&Li(B,je),pe;if(Se===null){for(;!Ke.done;je++,Ke=I.next())Ke=$(B,Ke.value,J),Ke!==null&&(R=d(Ke,R,je),Ge===null?pe=Ke:Ge.sibling=Ke,Ge=Ke);return Be&&Li(B,je),pe}for(Se=s(Se);!Ke.done;je++,Ke=I.next())Ke=Y(Se,B,je,Ke.value,J),Ke!==null&&(e&&(Bt=Ke.alternate,Bt!==null&&Se.delete(Bt.key===null?je:Bt.key)),R=d(Ke,R,je),Ge===null?pe=Ke:Ge.sibling=Ke,Ge=Ke);return e&&Se.forEach(function(OS){return t(B,OS)}),Be&&Li(B,je),pe}function De(B,R,I,J){if(typeof I=="object"&&I!==null&&I.type===Z&&I.key===null&&I.props.ref===void 0&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case he:e:{for(var pe=I.key;R!==null;){if(R.key===pe){if(pe=I.type,pe===Z){if(R.tag===7){i(B,R.sibling),J=c(R,I.props.children),ul(J,I),J.return=B,B=J;break e}}else if(R.elementType===pe||typeof pe=="object"&&pe!==null&&pe.$$typeof===j&&Jl(pe)===R.type){i(B,R.sibling),J=c(R,I.props),ul(J,I),J.return=B,B=J;break e}i(B,R);break}else t(B,R);R=R.sibling}I.type===Z?(J=Yl(I.props.children,B.mode,J,I.key),ul(J,I),J.return=B,B=J):(J=Qs(I.type,I.key,I.props,null,B.mode,J),ul(J,I),J.return=B,B=J)}return v(B);case _:e:{for(pe=I.key;R!==null;){if(R.key===pe)if(R.tag===4&&R.stateNode.containerInfo===I.containerInfo&&R.stateNode.implementation===I.implementation){i(B,R.sibling),J=c(R,I.children||[]),J.return=B,B=J;break e}else{i(B,R);break}else t(B,R);R=R.sibling}J=rc(I,B.mode,J),J.return=B,B=J}return v(B);case j:return I=Jl(I),De(B,R,I,J)}if(Ee(I))return ce(B,R,I,J);if(me(I)){if(pe=me(I),typeof pe!="function")throw Error(r(150));return I=pe.call(I),ve(B,R,I,J)}if(typeof I.then=="function")return De(B,R,tu(I),J);if(I.$$typeof===le)return De(B,R,$s(B,I),J);nu(B,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,R!==null&&R.tag===6?(i(B,R.sibling),J=c(R,I),J.return=B,B=J):(i(B,R),J=ac(I,B.mode,J),J.return=B,B=J),v(B)):i(B,R)}return function(B,R,I,J){try{Ar=0;var pe=De(B,R,I,J);return qa=null,pe}catch(Se){if(Se===za||Se===Ws)throw Se;var Ge=vn(29,Se,null,B.mode);return Ge.lanes=J,Ge.return=B,Ge}}}var Pl=wp(!0),kp=wp(!1),ol=!1;function gc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function cl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fl(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(nt&2)!==0){var c=s.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),s.pending=t,t=Gs(e),rp(e,null,i),t}return Ys(e,s,t,i),Gs(e)}function Cr(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,ya(e,i)}}function vc(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var c=null,d=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};d===null?c=d=v:d=d.next=v,i=i.next}while(i!==null);d===null?c=d=t:d=d.next=t}else c=d=t;i={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var bc=!1;function Nr(){if(bc){var e=_a;if(e!==null)throw e}}function jr(e,t,i,s){bc=!1;var c=e.updateQueue;ol=!1;var d=c.firstBaseUpdate,v=c.lastBaseUpdate,w=c.shared.pending;if(w!==null){c.shared.pending=null;var N=w,U=N.next;N.next=null,v===null?d=U:v.next=U,v=N;var G=e.alternate;G!==null&&(G=G.updateQueue,w=G.lastBaseUpdate,w!==v&&(w===null?G.firstBaseUpdate=U:w.next=U,G.lastBaseUpdate=N))}if(d!==null){var $=c.baseState;v=0,G=U=N=null,w=d;do{var L=w.lane&-536870913,Y=L!==w.lane;if(Y?(Ye&L)===L:(s&L)===L){L!==0&&L===Zl&&(bc=!0),G!==null&&(G=G.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ce=e,ve=w;L=t;var De=i;switch(ve.tag){case 1:if(ce=ve.payload,typeof ce=="function"){$=ce.call(De,$,L);break e}$=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ve.payload,L=typeof ce=="function"?ce.call(De,$,L):ce,L==null)break e;$=F({},$,L);break e;case 2:ol=!0}}L=w.callback,L!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=c.callbacks,Y===null?c.callbacks=[L]:Y.push(L))}else Y={lane:L,tag:w.tag,payload:w.payload,callback:w.callback,next:null},G===null?(U=G=Y,N=$):G=G.next=Y,v|=L;if(w=w.next,w===null){if(w=c.shared.pending,w===null)break;Y=w,w=Y.next,Y.next=null,c.lastBaseUpdate=Y,c.shared.pending=null}}while(!0);G===null&&(N=$),c.baseState=N,c.firstBaseUpdate=U,c.lastBaseUpdate=G,d===null&&(c.shared.lanes=0),vl|=v,e.lanes=v,e.memoizedState=$}}function Ep(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Tp(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Ep(i[e],t)}var dl=zt(null),iu=zt(0);function Ap(e,t){e=Gi,Ze(iu,e),Ze(dl,t),Gi=e|t.baseLanes}function xc(){Ze(iu,Gi),Ze(dl,dl.current)}function Sc(){Gi=iu.current,vt(dl),vt(iu)}var $t=zt(null),sn=null;function hl(e){var t=e.alternate;Ze(Pt,Pt.current&1),Ze($t,e),sn===null&&(t===null||dl.current!==null||t.memoizedState!==null)&&(sn=e)}function wc(e){Ze(Pt,Pt.current),Ze($t,e),sn===null&&(sn=e)}function Cp(e){e.tag===22?(Ze(Pt,Pt.current),Ze($t,e),sn===null&&(sn=e)):pl()}function pl(){Ze(Pt,Pt.current),Ze($t,$t.current)}function Cn(e){vt($t),sn===e&&(sn=null),vt(Pt)}var Pt=zt(0);function Or(e,t){Ze($t,$t.current),Ze(Pt,t)}function kc(e){vt(Pt),vt($t),sn===e&&(sn=null)}function lu(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Ff(i)||Xf(i)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hi=0,Me=null,ft=null,Dt=null,au=!1,Ra=!1,Wl=!1,ru=0,_r=0,Ma=null,$1=0;function jt(){throw Error(r(321))}function Ec(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!An(e[i],t[i]))return!1;return!0}function Tc(e,t,i,s,c,d){return Hi=d,Me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?cm:fm,Wl=!1,d=i(s,c),Wl=!1,Ra&&(d=jp(t,i,s,c)),Np(e),d}function Np(e){P.H=hu;var t=ft!==null&&ft.next!==null;if(Hi=0,Dt=ft=Me=null,au=!1,_r=0,Ma=null,t)throw Error(r(300));e===null||Lt||(e=e.dependencies,e!==null&&Js(e)&&(Lt=!0))}function jp(e,t,i,s){Me=e;var c=0;do{if(Ra&&(Ma=null),_r=0,Ra=!1,25<=c)throw Error(r(301));if(c+=1,Dt=ft=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}P.H=ax,d=t(i,s)}while(Ra);return d}function P1(){var e=P.H,t=e.useState()[0];return t=typeof t.then=="function"?zr(t):t,e=e.useState()[0],(ft!==null?ft.memoizedState:null)!==e&&(Me.flags|=1024),t}function Ac(){var e=ru!==0;return ru=0,e}function Cc(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Nc(e){if(au){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}au=!1}Hi=0,Dt=ft=Me=null,Ra=!1,_r=ru=0,Ma=null}function mn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?Me.memoizedState=Dt=e:Dt=Dt.next=e,Dt}function qt(){if(ft===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=Dt===null?Me.memoizedState:Dt.next;if(t!==null)Dt=t,ft=e;else{if(e===null)throw Me.alternate===null?Error(r(467)):Error(r(310));ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},Dt===null?Me.memoizedState=Dt=e:Dt=Dt.next=e}return Dt}function su(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zr(e){var t=_r;return _r+=1,Ma===null&&(Ma=[]),e=bp(Ma,e,t),t=Me,(Dt===null?t.memoizedState:Dt.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?cm:fm),e}function uu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return zr(e);if(e.$$typeof===te)return;if(e.$$typeof===le)return Jt(e)}throw Error(r(438,String(e)))}function jc(e){var t=null,i=Me.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Me.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=su(),Me.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=z;return t.index++,i}function Ii(e,t){return typeof t=="function"?t(e):t}function ou(e){var t=qt();return Oc(t,ft,e)}function Oc(e,t,i){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=i;var c=e.baseQueue,d=s.pending;if(d!==null){if(c!==null){var v=c.next;c.next=d.next,d.next=v}t.baseQueue=c=d,s.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var w=v=null,N=null,U=t,G=!1;do{var $=U.lane&-536870913;if($!==U.lane?(Ye&$)===$:(Hi&$)===$){var L=U.revertLane;if(L===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),$===Zl&&(G=!0);else if((Hi&L)===L){U=U.next,L===Zl&&(G=!0);continue}else $={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},N===null?(w=N=$,v=d):N=N.next=$,Me.lanes|=L,vl|=L;$=U.action,Wl&&i(d,$),d=U.hasEagerState?U.eagerState:i(d,$)}else L={lane:$,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},N===null?(w=N=L,v=d):N=N.next=L,Me.lanes|=$,vl|=$;U=U.next}while(U!==null&&U!==t);if(N===null?v=d:N.next=w,!An(d,e.memoizedState)&&(Lt=!0,G&&(i=_a,i!==null)))throw i;e.memoizedState=d,e.baseState=v,e.baseQueue=N,s.lastRenderedState=d}return c===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function _c(e){var t=qt(),i=t.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var s=i.dispatch,c=i.pending,d=t.memoizedState;if(c!==null){i.pending=null;var v=c=c.next;do d=e(d,v.action),v=v.next;while(v!==c);An(d,t.memoizedState)||(Lt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),i.lastRenderedState=d}return[d,s]}function Op(e,t,i){var s=Me,c=qt(),d=Be;if(d){if(i===void 0)throw Error(r(407));i=i()}else i=t();var v=!An((ft||c).memoizedState,i);if(v&&(c.memoizedState=i,Lt=!0),c=c.queue,Rc(qp.bind(null,s,c,e),[e]),e=c.getSnapshot!==t||v||Dt!==null&&(Dt.memoizedState.tag&1)!==0,Da(e?9:8,{destroy:void 0},zp.bind(null,s,c,i,t),null),e){if(s.flags|=2048,mt===null)throw Error(r(349));d||(Hi&127)!==0||_p(s,t,i)}return i}function _p(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Me.updateQueue,t===null?(t=su(),Me.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function zp(e,t,i,s){t.value=i,t.getSnapshot=s,Rp(t)&&Mp(e)}function qp(e,t,i){return i(function(){Rp(t)&&Mp(e)})}function Rp(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!An(e,i)}catch{return!0}}function Mp(e){var t=Vl(e,2);t!==null&&wn(t,e,2)}function zc(e){var t=mn();if(typeof e=="function"){var i=e;if(e=i(),Wl){ui(!0);try{i()}finally{ui(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:e},t}function Dp(e,t,i,s){return e.baseState=i,Oc(e,ft,typeof s=="function"?s:Ii)}function W1(e,t,i,s,c){if(du(e))throw Error(r(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};P.T!==null?i(!0):d.isTransition=!1,s(d),i=t.pending,i===null?(d.next=t.pending=d,Lp(t,d)):(d.next=i.next,t.pending=i.next=d)}}function Lp(e,t){var i=t.action,s=t.payload,c=e.state;if(t.isTransition){var d=P.T,v={};v.types=d!==null?d.types:null,P.T=v;try{var w=i(c,s),N=P.S;N!==null&&N(v,w),Bp(e,t,w)}catch(U){qc(e,t,U)}finally{d!==null&&v.types!==null&&(d.types=v.types),P.T=d}}else try{d=i(c,s),Bp(e,t,d)}catch(U){qc(e,t,U)}}function Bp(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Up(e,t,s)},function(s){return qc(e,t,s)}):Up(e,t,i)}function Up(e,t,i){t.status="fulfilled",t.value=i,Hp(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Lp(e,i)))}function qc(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,Hp(t),t=t.next;while(t!==s)}e.action=null}function Hp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ip(e,t){return t}function Vp(e,t){if(Be){var i=mt.formState;if(i!==null){e:{var s=Me;if(Be){if(xt){t:{for(var c=xt,d=Vn;c.nodeType!==8;){if(!d){c=null;break t}if(c=Gn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){xt=Gn(c.nextSibling),s=c.data==="F!";break e}}rl(s)}s=!1}s&&(t=i[0])}}return i=mn(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ip,lastRenderedState:t},i.queue=s,i=sm.bind(null,Me,s),s.dispatch=i,s=zc(!1),d=Uc.bind(null,Me,!1,s.queue),s=mn(),c={state:t,dispatch:null,action:e,pending:null},s.queue=c,i=W1.bind(null,Me,c,d,i),c.dispatch=i,s.memoizedState=e,[t,i,!1]}function Yp(e){var t=qt();return Gp(t,ft,e)}function Gp(e,t,i){if(t=Oc(e,t,Ip)[0],e=ou(Ii)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=zr(t)}catch(v){throw v===za?Ws:v}else s=t;t=qt();var c=t.queue,d=c.dispatch;return i!==t.memoizedState&&(Me.flags|=2048,Da(9,{destroy:void 0},ex.bind(null,c,i),null)),[s,d,e]}function ex(e,t){e.action=t}function Qp(e){var t=qt(),i=ft;if(i!==null)return Gp(t,i,e);qt(),t=t.memoizedState,i=qt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Da(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Me.updateQueue,t===null&&(t=su(),Me.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Fp(){return qt().memoizedState}function cu(e,t,i,s){var c=mn();Me.flags|=e,c.memoizedState=Da(1|t,{destroy:void 0},i,s===void 0?null:s)}function fu(e,t,i,s){var c=qt();s=s===void 0?null:s;var d=c.memoizedState.inst;ft!==null&&s!==null&&Ec(s,ft.memoizedState.deps)?c.memoizedState=Da(t,d,i,s):(Me.flags|=e,c.memoizedState=Da(1|t,d,i,s))}function Xp(e,t){cu(8390656,8,e,t)}function Rc(e,t){fu(2048,8,e,t)}function tx(e){Me.flags|=4;var t=Me.updateQueue;if(t===null)t=su(),Me.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Zp(e){var t=qt().memoizedState;return tx({ref:t,nextImpl:e}),function(){if((nt&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Kp(e,t){return fu(4,2,e,t)}function Jp(e,t){return fu(4,4,e,t)}function $p(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Pp(e,t,i){i=i!=null?i.concat([e]):null,fu(4,4,$p.bind(null,t,e),i)}function Mc(){}function Wp(e,t){var i=qt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&Ec(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function em(e,t){var i=qt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&Ec(t,s[1]))return s[0];if(s=e(),Wl){ui(!0);try{e()}finally{ui(!1)}}return i.memoizedState=[s,t],s}function Dc(e,t,i){return i===void 0||(Hi&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=cg(),Me.lanes|=e,vl|=e,i)}function tm(e,t,i,s){return An(i,t)?i:dl.current!==null?(e=Dc(e,i,s),An(e,t)||(Lt=!0),e):(Hi&106)===0||(Hi&1073741824)!==0&&(Ye&261930)===0?(Lt=!0,e.memoizedState=i):(e=cg(),Me.lanes|=e,vl|=e,t)}function nm(e,t,i,s,c){var d=de.p;de.p=d!==0&&8>d?d:8;var v=P.T,w={};w.types=v!==null?v.types:null,P.T=w,Uc(e,!1,t,i);try{var N=c(),U=P.S;if(U!==null&&U(w,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var G=J1(N,s);qr(e,t,G,_n(e))}else qr(e,t,s,_n(e))}catch($){qr(e,t,{then:function(){},status:"rejected",reason:$},_n())}finally{de.p=d,v!==null&&w.types!==null&&(v.types=w.types),P.T=v}}function nx(){}function Lc(e,t,i,s){if(e.tag!==5)throw Error(r(476));var c=im(e).queue;nm(e,c,t,at,i===null?nx:function(){return lm(e),i(s)})}function im(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:at,baseState:at,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:at},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ii,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function lm(e){var t=im(e);t.next===null&&(t=e.alternate.memoizedState),qr(e,t.next.queue,{},_n())}function Bc(){return Jt(tr)}function am(){return qt().memoizedState}function rm(){return qt().memoizedState}function ix(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=_n();e=cl(i);var s=fl(t,e,i);s!==null&&(wn(s,t,i),Cr(s,t,i)),t={cache:dc()},e.payload=t;return}t=t.return}}function lx(e,t,i){var s=_n();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},du(e)?um(t,i):(i=ic(e,t,i,s),i!==null&&(wn(i,e,s),om(i,t,s)))}function sm(e,t,i){var s=_n();qr(e,t,i,s)}function qr(e,t,i,s){var c={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(du(e))um(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var v=t.lastRenderedState,w=d(v,i);if(c.hasEagerState=!0,c.eagerState=w,An(w,v))return Ys(e,t,c,0),mt===null&&Vs(),!1}catch{}if(i=ic(e,t,c,s),i!==null)return wn(i,e,s),om(i,t,s),!0}return!1}function Uc(e,t,i,s){if(s={lane:2,revertLane:Of(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},du(e)){if(t)throw Error(r(479))}else t=ic(e,i,s,2),t!==null&&wn(t,e,2)}function du(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function um(e,t){Ra=au=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function om(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,ya(e,i)}}var hu={readContext:Jt,use:uu,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt,useEffectEvent:jt},cm={readContext:Jt,use:uu,useCallback:function(e,t){return mn().memoizedState=[e,t===void 0?null:t],e},useContext:Jt,useEffect:Xp,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,cu(4194308,4,$p.bind(null,t,e),i)},useLayoutEffect:function(e,t){return cu(4194308,4,e,t)},useInsertionEffect:function(e,t){cu(4,2,e,t)},useMemo:function(e,t){var i=mn();t=t===void 0?null:t;var s=e();if(Wl){ui(!0);try{e()}finally{ui(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=mn();if(i!==void 0){var c=i(t);if(Wl){ui(!0);try{i(t)}finally{ui(!1)}}}else c=t;return s.memoizedState=s.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},s.queue=e,e=e.dispatch=lx.bind(null,Me,e),[s.memoizedState,e]},useRef:function(e){var t=mn();return e={current:e},t.memoizedState=e},useState:function(e){e=zc(e);var t=e.queue,i=sm.bind(null,Me,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Mc,useDeferredValue:function(e,t){var i=mn();return Dc(i,e,t)},useTransition:function(){var e=zc(!1);return e=nm.bind(null,Me,e.queue,!0,!1),mn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Me,c=mn();if(Be){if(i===void 0)throw Error(r(407));i=i()}else{if(i=t(),mt===null)throw Error(r(349));(Ye&127)!==0||_p(s,t,i)}c.memoizedState=i;var d={value:i,getSnapshot:t};return c.queue=d,Xp(qp.bind(null,s,d,e),[e]),s.flags|=2048,Da(9,{destroy:void 0},zp.bind(null,s,d,i,t),null),i},useId:function(){var e=mn(),t=mt.identifierPrefix;if(Be){var i=hi,s=di;i=(s&~(1<<32-dn(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=ru++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=$1++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Bc,useFormState:Vp,useActionState:Vp,useOptimistic:function(e){var t=mn();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Uc.bind(null,Me,!0,i),i.dispatch=t,[e,t]},useMemoCache:jc,useCacheRefresh:function(){return mn().memoizedState=ix.bind(null,Me)},useEffectEvent:function(e){var t=mn(),i={impl:e};return t.memoizedState=i,function(){if((nt&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},fm={readContext:Jt,use:uu,useCallback:Wp,useContext:Jt,useEffect:Rc,useImperativeHandle:Pp,useInsertionEffect:Kp,useLayoutEffect:Jp,useMemo:em,useReducer:ou,useRef:Fp,useState:function(){return ou(Ii)},useDebugValue:Mc,useDeferredValue:function(e,t){var i=qt();return tm(i,ft.memoizedState,e,t)},useTransition:function(){var e=ou(Ii)[0],t=qt().memoizedState;return[typeof e=="boolean"?e:zr(e),t]},useSyncExternalStore:Op,useId:am,useHostTransitionStatus:Bc,useFormState:Yp,useActionState:Yp,useOptimistic:function(e,t){var i=qt();return Dp(i,ft,e,t)},useMemoCache:jc,useCacheRefresh:rm,useEffectEvent:Zp},ax={readContext:Jt,use:uu,useCallback:Wp,useContext:Jt,useEffect:Rc,useImperativeHandle:Pp,useInsertionEffect:Kp,useLayoutEffect:Jp,useMemo:em,useReducer:_c,useRef:Fp,useState:function(){return _c(Ii)},useDebugValue:Mc,useDeferredValue:function(e,t){var i=qt();return ft===null?Dc(i,e,t):tm(i,ft.memoizedState,e,t)},useTransition:function(){var e=_c(Ii)[0],t=qt().memoizedState;return[typeof e=="boolean"?e:zr(e),t]},useSyncExternalStore:Op,useId:am,useHostTransitionStatus:Bc,useFormState:Qp,useActionState:Qp,useOptimistic:function(e,t){var i=qt();return ft!==null?Dp(i,ft,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:jc,useCacheRefresh:rm,useEffectEvent:Zp};function Hc(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:F({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Ic={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=_n(),c=cl(s);c.payload=t,i!=null&&(c.callback=i),t=fl(e,c,s),t!==null&&(wn(t,e,s),Cr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=_n(),c=cl(s);c.tag=1,c.payload=t,i!=null&&(c.callback=i),t=fl(e,c,s),t!==null&&(wn(t,e,s),Cr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=_n(),s=cl(i);s.tag=2,t!=null&&(s.callback=t),t=fl(e,s,i),t!==null&&(wn(t,e,i),Cr(t,e,i))}};function dm(e,t,i,s,c,d,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,d,v):t.prototype&&t.prototype.isPureReactComponent?!br(i,s)||!br(c,d):!0}function hm(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&Ic.enqueueReplaceState(t,t.state,null)}function ea(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=F({},i));for(var c in e)i[c]===void 0&&(i[c]=e[c])}return i}function pm(e){Is(e)}function mm(e){console.error(e)}function gm(e){Is(e)}function pu(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function ym(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Vc(e,t,i){return i=cl(i),i.tag=3,i.payload={element:null},i.callback=function(){pu(e,t)},i}function vm(e){return e=cl(e),e.tag=3,e}function bm(e,t,i,s){var c=i.type.getDerivedStateFromError;if(typeof c=="function"){var d=s.value;e.payload=function(){return c(d)},e.callback=function(){ym(t,i,s)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){ym(t,i,s),typeof c!="function"&&(bl===null?bl=new Set([this]):bl.add(this));var w=s.stack;this.componentDidCatch(s.value,{componentStack:w!==null?w:""})})}function rx(e,t,i,s,c){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Fl(t,i,c,!0),i=$t.current,i!==null){switch(i.tag){case 31:case 13:case 19:return sn===null?Mu():i.alternate===null&&Ot===0&&(Ot=3),i.flags&=-257,i.flags|=65536,i.lanes=c,s===eu?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Cf(e,s,c)),!1;case 22:return i.flags|=65536,s===eu?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Cf(e,s,c)),!1}throw Error(r(435,i.tag))}return Cf(e,s,c),Mu(),!1}if(Be)return t=$t.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,s!==uc&&(e=Error(r(422),{cause:s}),wr(Un(e,i)))):(s!==uc&&(t=Error(r(423),{cause:s}),wr(Un(t,i))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,s=Un(s,i),c=Vc(e.stateNode,s,c),vc(e,c),Ot!==4&&(Ot=2)),!1;var d=Error(r(520),{cause:s});if(d=Un(d,i),Ir===null?Ir=[d]:Ir.push(d),Ot!==4&&(Ot=2),t===null)return!0;s=Un(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=c&-c,i.lanes|=e,e=Vc(i.stateNode,s,e),vc(i,e),!1;case 1:if(t=i.type,d=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(bl===null||!bl.has(d))))return i.flags|=65536,c&=-c,i.lanes|=c,c=vm(c),bm(c,e,i,s),vc(i,c),!1;break;case 22:if(i.memoizedState!==null)return i.flags|=65536,!1}i=i.return}while(i!==null);return!1}var Yc=Error(r(461)),Lt=!1;function It(e,t,i,s){t.child=e===null?kp(t,null,i,s):Pl(t,e.child,i,s)}function xm(e,t,i,s,c){i=i.render;var d=t.ref;if("ref"in s){var v={};for(var w in s)w!=="ref"&&(v[w]=s[w])}else v=s;return Xl(t),s=Tc(e,t,i,v,d,c),w=Ac(),e!==null&&!Lt?(Cc(e,t,c),Vi(e,t,c)):(Be&&w&&Xs(t),t.flags|=1,It(e,t,s,c),t.child)}function Sm(e,t,i,s,c){if(e===null){var d=i.type;return typeof d=="function"&&!lc(d)&&d.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=d,wm(e,t,d,s,c)):(e=Qs(i.type,null,s,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!$c(e,c)){var v=d.memoizedProps;if(i=i.compare,i=i!==null?i:br,i(v,s)&&e.ref===t.ref)return Vi(e,t,c)}return t.flags|=1,e=Di(d,s),e.ref=t.ref,e.return=t,t.child=e}function wm(e,t,i,s,c){if(e!==null){var d=e.memoizedProps;if(br(d,s)&&e.ref===t.ref)if(Lt=!1,t.pendingProps=s=d,$c(e,c))(e.flags&131072)!==0&&(Lt=!0);else return t.lanes=e.lanes,Vi(e,t,c)}return Gc(e,t,i,s,c)}function km(e,t,i,s){var c=s.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|i:i,e!==null){for(s=t.child=e.child,c=0;s!==null;)c=c|s.lanes|s.childLanes,s=s.sibling;s=c&~d}else s=0,t.child=null;return Em(e,t,d,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ps(t,d!==null?d.cachePool:null),d!==null?Ap(t,d):xc(),Cp(t);else return s=t.lanes=536870912,Em(e,t,d!==null?d.baseLanes|i:i,i,s)}else d!==null?(Ps(t,d.cachePool),Ap(t,d),pl(),t.memoizedState=null):(e!==null&&Ps(t,null),xc(),pl());return It(e,t,c,i),t.child}function Rr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Em(e,t,i,s,c){var d=pc();return d=d===null?null:{parent:Mt._currentValue,pool:d},t.memoizedState={baseLanes:i,cachePool:d},e!==null&&Ps(t,null),xc(),Cp(t),e!==null&&Fl(e,t,s,!0),t.childLanes=c,null}function mu(e,t){return t=gu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Tm(e,t,i){return Pl(t,e.child,null,i),e=mu(t,t.pendingProps),e.flags|=2,Cn(t),t.memoizedState=null,e}function sx(e,t,i){var s=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Be){if(s.mode==="hidden")return e=mu(t,s),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Rr(null,e);if(wc(t),(e=xt)?(e=$g(e,Vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ll!==null?{id:di,overflow:hi}:null,retryLane:536870912,hydrationErrors:null},i=up(e),i.return=t,t.child=i,Qt=t,xt=null)):e=null,e===null)throw rl(t);return t.lanes=536870912,null}return mu(t,s)}var d=e.memoizedState;if(d!==null){var v=d.dehydrated;if(wc(t),c)if(t.flags&256)t.flags&=-257,t=Tm(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Lt||Fl(e,t,i,!1),c=(i&e.childLanes)!==0,Lt||c){if(dl.current===null){if(s=mt,s!==null&&(v=oi(s,i),v!==0&&v!==d.retryLane))throw d.retryLane=v,Vl(e,v),wn(s,e,v),Yc;Mu()}t=Tm(e,t,i)}else e=d.treeContext,xt=Gn(v.nextSibling),Qt=t,Be=!0,al=null,Vn=!1,e!==null&&fp(t,e),t=mu(t,s),t.flags|=134221824;return t}return e=Di(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function La(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Gc(e,t,i,s,c){return Xl(t),i=Tc(e,t,i,s,void 0,c),s=Ac(),e!==null&&!Lt?(Cc(e,t,c),Vi(e,t,c)):(Be&&s&&Xs(t),t.flags|=1,It(e,t,i,c),t.child)}function Am(e,t,i,s,c,d){return Xl(t),t.updateQueue=null,i=jp(t,s,i,c),Np(e),s=Ac(),e!==null&&!Lt?(Cc(e,t,d),Vi(e,t,d)):(Be&&s&&Xs(t),t.flags|=1,It(e,t,i,d),t.child)}function Cm(e,t,i,s,c){if(Xl(t),t.stateNode===null){var d=Ca,v=i.contextType;typeof v=="object"&&v!==null&&(d=Jt(v)),d=new i(s,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Ic,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=s,d.state=t.memoizedState,d.refs={},gc(t),v=i.contextType,d.context=typeof v=="object"&&v!==null?Jt(v):Ca,d.state=t.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(Hc(t,i,v,s),d.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&Ic.enqueueReplaceState(d,d.state,null),jr(t,s,d,c),Nr(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){d=t.stateNode;var w=t.memoizedProps,N=ea(i,w);d.props=N;var U=d.context,G=i.contextType;v=Ca,typeof G=="object"&&G!==null&&(v=Jt(G));var $=i.getDerivedStateFromProps;G=typeof $=="function"||typeof d.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,G||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(w||U!==v)&&hm(t,d,s,v),ol=!1;var L=t.memoizedState;d.state=L,jr(t,s,d,c),Nr(),U=t.memoizedState,w||L!==U||ol?(typeof $=="function"&&(Hc(t,i,$,s),U=t.memoizedState),(N=ol||dm(t,i,N,s,L,U,v))?(G||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=U),d.props=s,d.state=U,d.context=v,s=N):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{d=t.stateNode,yc(e,t),v=t.memoizedProps,G=ea(i,v),d.props=G,$=t.pendingProps,L=d.context,U=i.contextType,N=Ca,typeof U=="object"&&U!==null&&(N=Jt(U)),w=i.getDerivedStateFromProps,(U=typeof w=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==$||L!==N)&&hm(t,d,s,N),ol=!1,L=t.memoizedState,d.state=L,jr(t,s,d,c),Nr();var Y=t.memoizedState;v!==$||L!==Y||ol||e!==null&&e.dependencies!==null&&Js(e.dependencies)?(typeof w=="function"&&(Hc(t,i,w,s),Y=t.memoizedState),(G=ol||dm(t,i,G,s,L,Y,N)||e!==null&&e.dependencies!==null&&Js(e.dependencies))?(U||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,Y,N),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,Y,N)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=Y),d.props=s,d.state=Y,d.context=N,s=G):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),s=!1)}return d=s,La(e,t),s=(t.flags&128)!==0,d||s?(d=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&s?(t.child=Pl(t,e.child,null,c),t.child=Pl(t,null,i,c)):It(e,t,i,c),t.memoizedState=d.state,e=t.child):e=Vi(e,t,c),e}function Nm(e,t,i,s){return Gl(),t.flags|=256,It(e,t,i,s),t.child}var Qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fc(e){return{baseLanes:e,cachePool:yp()}}function Xc(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=On),e}function jm(e,t,i){var s=t.pendingProps,c=!1,d=(t.flags&128)!==0,v;if((v=d)||(v=e!==null&&e.memoizedState===null?!1:(Pt.current&2)!==0),v&&(c=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(Be){if(c?hl(t):pl(),(e=xt)?(e=$g(e,Vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ll!==null?{id:di,overflow:hi}:null,retryLane:536870912,hydrationErrors:null},i=up(e),i.return=t,t.child=i,Qt=t,xt=null)):e=null,e===null)throw rl(t);return Xf(e)?t.lanes=32:t.lanes=536870912,null}return d=s.children,s=s.fallback,c?(pl(),c=t.mode,d=gu({mode:"hidden",children:d},c),s=Yl(s,c,i,null),d.return=t,s.return=t,d.sibling=s,t.child=d,s=t.child,s.memoizedState=Fc(i),s.childLanes=Xc(e,v,i),t.memoizedState=Qc,Rr(null,s)):(hl(t),Zc(t,d))}var w=e.memoizedState;if(w!==null){var N=w.dehydrated;if(N!==null)return ux(e,t,d,v,s,N,w,i)}return c?(pl(),c=s.fallback,d=t.mode,w=e.child,N=w.sibling,s=Di(w,{mode:"hidden",children:s.children}),s.subtreeFlags=w.subtreeFlags&1206910976,N!==null?c=Di(N,c):(c=Yl(c,d,i,null),c.flags|=2),c.return=t,s.return=t,s.sibling=c,t.child=s,Rr(null,s),s=t.child,c=e.child.memoizedState,c===null?c=Fc(i):(d=c.cachePool,d!==null?(w=Mt._currentValue,d=d.parent!==w?{parent:w,pool:w}:d):d=yp(),c={baseLanes:c.baseLanes|i,cachePool:d}),s.memoizedState=c,s.childLanes=Xc(e,v,i),t.memoizedState=Qc,Rr(e.child,s)):(hl(t),i=e.child,e=i.sibling,i=Di(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=i,t.memoizedState=null,i)}function Zc(e,t){return t=gu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function gu(e,t){return e=vn(22,e,null,t),e.lanes=0,e}function yu(e,t,i){return Pl(t,e.child,null,i),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ux(e,t,i,s,c,d,v,w){if(i)return t.flags&256?(hl(t),t.flags&=-257,yu(e,t,w)):t.memoizedState!==null?(pl(),t.child=e.child,t.flags|=128,null):(pl(),d=c.fallback,v=t.mode,c=gu({mode:"visible",children:c.children},v),d=Yl(d,v,w,null),d.flags|=2,c.return=t,d.return=t,c.sibling=d,t.child=c,Pl(t,e.child,null,w),c=t.child,c.memoizedState=Fc(w),c.childLanes=Xc(e,s,w),t.memoizedState=Qc,Rr(null,c));if(hl(t),Xf(d)){if(s=d.nextSibling&&d.nextSibling.dataset,s)var N=s.dgst;return s=N,s!==""&&(c=Error(r(419)),c.stack="",c.digest=s,wr({value:c,source:null,stack:null})),yu(e,t,w)}if(Lt||Fl(e,t,w,!1),s=(w&e.childLanes)!==0,Lt||s){if(dl.current!==null)return yu(e,t,w);if(s=mt,s!==null&&(c=oi(s,w),c!==0&&c!==v.retryLane))throw v.retryLane=c,Vl(e,c),wn(s,e,c),Yc;return Ff(d)||Mu(),yu(e,t,w)}return Ff(d)?(t.flags|=192,t.child=e.child,null):(e=v.treeContext,xt=Gn(d.nextSibling),Qt=t,Be=!0,al=null,Vn=!1,e!==null&&fp(t,e),t=Zc(t,c.children),t.flags|=134221824,t)}function Om(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ks(e.return,t,i)}function _m(e){for(var t=null;e!==null;){var i=e.alternate;i!==null&&lu(i)===null&&(t=e),e=e.sibling}return t}function vu(e,t,i,s,c,d){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:c,treeForkCount:d}:(v.isBackwards=t,v.rendering=null,v.renderingStartTime=0,v.last=s,v.tail=i,v.tailMode=c,v.treeForkCount=d)}function Kc(e){var t=e.child;for(e.child=null;t!==null;){var i=t.sibling;t.sibling=e.child,e.child=t,t=i}}function Jc(e,t,i){var s=t.pendingProps,c=s.revealOrder,d=s.tail;s=s.children;var v=Pt.current;if(t.flags&128)return Or(t,v),null;var w=(v&2)!==0;if(w?(v=v&1|2,t.flags|=128):v&=1,Or(t,v),c==="backwards"&&e!==null?(Kc(e),It(e,t,s,i),Kc(e)):It(e,t,s,i),s=Be?Sr:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Om(e,i,t);else if(e.tag===19)Om(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"backwards":i=_m(t.child),i===null?(c=t.child,t.child=null):(c=i.sibling,i.sibling=null,Kc(t)),vu(t,!0,c,null,d,s);break;case"unstable_legacy-backwards":for(i=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&lu(e)===null){t.child=c;break}e=c.sibling,c.sibling=i,i=c,c=e}vu(t,!0,i,null,d,s);break;case"together":vu(t,!1,null,null,void 0,s);break;case"independent":t.memoizedState=null;break;default:i=_m(t.child),i===null?(c=t.child,t.child=null):(c=i.sibling,i.sibling=null),vu(t,!1,c,i,d,s)}return t.child}function zm(e,t,i){var s=t.pendingProps;return sl(t,t.type,s.value),It(e,t,s.children,i),t.child}function Vi(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),vl|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Fl(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,i=Di(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Di(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function $c(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Js(e)))}function ox(e,t,i){switch(t.tag){case 3:Zt(t,t.stateNode.containerInfo),sl(t,Mt,e.memoizedState.cache),Gl();break;case 27:case 5:Rn(t);break;case 4:Zt(t,t.stateNode.containerInfo);break;case 10:sl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,wc(t),null;break;case 13:var s=t.memoizedState;if(s!==null){if(s.dehydrated!==null)return hl(t),t.flags|=128,null;s=Fl(e,t,i,!1);var c=t.child.childLanes;return s||(i&c)!==0?jm(e,t,i):(hl(t),e=Vi(e,t,i),e!==null?e.sibling:null)}hl(t);break;case 19:if(t.flags&128)return Jc(e,t,i);if(c=(e.flags&128)!==0,s=(i&t.childLanes)!==0,s||(Fl(e,t,i,!1),s=(i&t.childLanes)!==0),c){if(s)return Jc(e,t,i);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Or(t,Pt.current),s)break;return null;case 22:return t.lanes=0,km(e,t,i,t.pendingProps);case 24:sl(t,Mt,e.memoizedState.cache)}return Vi(e,t,i)}function qm(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Lt=!0;else{if(!$c(e,i)&&(t.flags&128)===0)return Lt=!1,ox(e,t,i);Lt=(e.flags&131072)!==0}else Lt=!1,Be&&(t.flags&1048576)!==0&&cp(t,Sr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Jl(t.elementType),t.type=e,typeof e=="function")lc(e)?(s=ea(e,s),t.tag=1,t=Cm(null,t,e,s,i)):(t.tag=0,t=Gc(null,t,e,s,i));else{if(e!=null){var c=e.$$typeof;if(c===Q){t.tag=11,t=xm(null,t,e,s,i);break e}else if(c===ke){t.tag=14,t=Sm(null,t,e,s,i);break e}else if(c===le){t.tag=10,t.type=e,t=zm(null,t,i);break e}}throw t=Ce(e)||e,Error(r(306,t,""))}}return t;case 0:return Gc(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,c=ea(s,t.pendingProps),Cm(e,t,s,c,i);case 3:e:{if(Zt(t,t.stateNode.containerInfo),e===null)throw Error(r(387));s=t.pendingProps;var d=t.memoizedState;c=d.element,yc(e,t),jr(t,s,null,i);var v=t.memoizedState;if(s=v.cache,sl(t,Mt,s),s!==d.cache&&fc(t,[Mt],i,!0),Nr(),s=v.element,d.isDehydrated)if(d={element:s,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Nm(e,t,s,i);break e}else if(s!==c){c=Un(Error(r(424)),t),wr(c),t=Nm(e,t,s,i);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,xt=Gn(e.firstChild),Qt=t,Be=!0,al=null,Vn=!0,i=kp(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|134221824,i=i.sibling;else{if(Gl(),s===c){t=Vi(e,t,i);break e}It(e,t,s,i)}t=t.child}return t;case 26:return La(e,t),e===null?(i=ly(t.type,null,t.pendingProps,null))?t.memoizedState=i:Be||(t.stateNode=Lg(t.type,t.pendingProps,wt.current,t)):t.memoizedState=ly(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Rn(t),e===null&&Be&&(s=t.stateNode=ey(t.type,t.pendingProps,wt.current),Qt=t,Vn=!0,c=xt,wl(t.type)?(Zf=c,xt=Gn(s.firstChild)):xt=c),It(e,t,t.pendingProps.children,i),La(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Be&&((c=s=xt)&&(s=iS(s,t.type,t.pendingProps,Vn),s!==null?(t.stateNode=s,Qt=t,xt=Gn(s.firstChild),Vn=!1,c=!0):c=!1),c||rl(t)),Rn(t),c=t.type,d=t.pendingProps,v=e!==null?e.memoizedProps:null,s=d.children,Uf(c,d)?s=null:v!==null&&Uf(c,v)&&(t.flags|=32),t.memoizedState!==null&&(c=Tc(e,t,P1,null,null,i),tr._currentValue=c),La(e,t),It(e,t,s,i),t.child;case 6:return e===null&&Be&&((e=i=xt)&&(i=lS(i,t.pendingProps,Vn),i!==null?(t.stateNode=i,Qt=t,xt=null,e=!0):e=!1),e||rl(t)),null;case 13:return jm(e,t,i);case 4:return Zt(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Pl(t,null,s,i):It(e,t,s,i),t.child;case 11:return xm(e,t,t.type,t.pendingProps,i);case 7:return s=t.pendingProps,La(e,t),It(e,t,s,i),t.child;case 8:return It(e,t,t.pendingProps.children,i),t.child;case 12:return It(e,t,t.pendingProps.children,i),t.child;case 10:return zm(e,t,i);case 9:return c=t.type._context,s=t.pendingProps.children,Xl(t),c=Jt(c),s=s(c),t.flags|=1,It(e,t,s,i),t.child;case 14:return Sm(e,t,t.type,t.pendingProps,i);case 15:return wm(e,t,t.type,t.pendingProps,i);case 19:return Jc(e,t,i);case 31:return sx(e,t,i);case 22:return km(e,t,i,t.pendingProps);case 24:return Xl(t),s=Jt(Mt),e===null?(c=pc(),c===null&&(c=mt,d=dc(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=i),c=d),t.memoizedState={parent:s,cache:c},gc(t),sl(t,Mt,c)):((e.lanes&i)!==0&&(yc(e,t),jr(t,null,null,i),Nr()),c=e.memoizedState,d=t.memoizedState,c.parent!==s?(c={parent:s,cache:s},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),sl(t,Mt,s)):(s=d.cache,sl(t,Mt,s),s!==c.cache&&fc(t,[Mt],i,!0))),It(e,t,t.pendingProps.children,i),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),s=t.pendingProps,s.name!=null&&s.name!=="auto"?t.flags|=e===null?18882560:18874368:Be&&Xs(t),e!==null&&e.memoizedProps.name!==s.name?t.flags|=4194816:La(e,t),It(e,t,s.children,i),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Yi(e){e.flags|=4}function Pc(e,t,i,s,c){var d;if((d=(e.mode&32)!==0)&&(d=i===null?uy(t,s):uy(t,s)&&(s.src!==i.src||s.srcSet!==i.srcSet)),d){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(pg())e.flags|=8192;else throw $l=eu,mc}else e.flags&=-16777217}function Rm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!oy(t))if(pg())e.flags|=8192;else throw $l=eu,mc}function bu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Dl():536870912,e.lanes|=t,Va|=t)}function Mr(e,t){if(!Be)switch(e.tailMode){case"visible":break;case"collapsed":for(var i=e.tail,s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null;break;default:for(t=e.tail,i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null}}function St(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var c=e.child;c!==null;)i|=c.lanes|c.childLanes,s|=c.subtreeFlags&1206910976,s|=c.flags&1206910976,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)i|=c.lanes|c.childLanes,s|=c.subtreeFlags,s|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function cx(e,t,i){var s=t.pendingProps;switch(sc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(t),null;case 1:return St(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ui(Mt),Vt(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Oa(t)?Yi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,oc())),St(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(Yi(t),d!==null?(St(t),Rm(t,d)):(St(t),Pc(t,c,null,s,i))):d?d!==e.memoizedState?(Yi(t),St(t),Rm(t,d)):(St(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Yi(t),St(t),Pc(t,c,e,s,i)),null;case 27:if(Yt(t),i=wt.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Yi(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return St(t),t.subtreeFlags&=-33554433,null}e=_e.current,Oa(t)?dp(t):(e=ey(c,s,i),t.stateNode=e,Yi(t))}return St(t),t.subtreeFlags&=-33554433,null;case 5:if(Yt(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Yi(t);else{if(!s){if(t.stateNode===null)throw Error(r(166));return St(t),t.subtreeFlags&=-33554433,null}if(d=_e.current,Oa(t))dp(t);else{var v=Fr(wt.current);switch(d){case 1:d=v.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=v.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=v.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=v.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=v.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof s.is=="string"?v.createElement("select",{is:s.is}):v.createElement("select"),s.multiple?d.multiple=!0:s.size&&(d.size=s.size);break;default:d=typeof s.is=="string"?v.createElement(c,{is:s.is}):v.createElement(c)}}d[Nt]=t,d[an]=s;e:for(v=t.child;v!==null;){if(v.tag===5||v.tag===6)d.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===t)break e;for(;v.sibling===null;){if(v.return===null||v.return===t)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}t.stateNode=d;e:switch(en(d,c,s),c){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Yi(t)}}return St(t),t.subtreeFlags&=-33554433,Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Yi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(r(166));if(e=wt.current,Oa(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,c=Qt,c!==null)switch(c.tag){case 27:case 5:s=c.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||qg(e.nodeValue,i)),e||rl(t,!0)}else e=Fr(e).createTextNode(s),e[Nt]=t,t.stateNode=e}return St(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Oa(t),i!==null){if(e===null){if(!s)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Nt]=t}else Gl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;St(t),e=!1}else i=oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Cn(t),t):(Cn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return St(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Oa(t),s!==null&&s.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[Nt]=t}else Gl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;St(t),c=!1}else c=oc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Cn(t),t):(Cn(t),null)}return Cn(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,c=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(c=s.alternate.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==c&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),bu(t,t.updateQueue),St(t),null);case 4:return Vt(),e===null&&Rf(t.stateNode.containerInfo),t.flags|=67108864,St(t),null;case 10:return Ui(t.type),St(t),null;case 19:if(kc(t),s=t.memoizedState,s===null)return St(t),null;if(c=(t.flags&128)!==0,d=s.rendering,d===null)if(c)Mr(s,!1);else{if(Ot!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=lu(e),d!==null){for(t.flags|=128,Mr(s,!1),e=d.updateQueue,t.updateQueue=e,bu(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)sp(i,e),i=i.sibling;return Or(t,Pt.current&1|2),Be&&Li(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Ct()>_u&&(t.flags|=128,c=!0,Mr(s,!1),t.lanes=4194304)}else{if(!c)if(e=lu(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,bu(t,e),Mr(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!d.alternate&&!Be)return St(t),null}else 2*Ct()-s.renderingStartTime>_u&&i!==536870912&&(t.flags|=128,c=!0,Mr(s,!1),t.lanes=4194304);s.isBackwards?(d.sibling=t.child,t.child=d):(e=s.last,e!==null?e.sibling=d:t.child=d,s.last=d)}if(s.tail!==null){e=s.tail;e:{for(i=e;i!==null;){if(i.alternate!==null){i=!1;break e}i=i.sibling}i=!0}return s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ct(),e.sibling=null,d=Pt.current,d=c?d&1|2:d&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!i||Be?Or(t,d):(i=d,Ze($t,t),Ze(Pt,i),sn===null&&(sn=t)),Be&&Li(t,s.treeForkCount),e}return St(t),null;case 22:case 23:return Cn(t),Sc(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(St(t),t.subtreeFlags&6&&(t.flags|=8192)):St(t),i=t.updateQueue,i!==null&&bu(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&vt(Kl),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Ui(Mt),St(t),null;case 25:return null;case 30:return t.flags|=33554432,St(t),null}throw Error(r(156,t.tag))}function fx(e,t){switch(sc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ui(Mt),Vt(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Yt(t),null;case 31:if(t.memoizedState!==null){if(Cn(t),t.alternate===null)throw Error(r(340));Gl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Cn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Gl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return kc(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Vt(),null;case 10:return Ui(t.type),null;case 22:case 23:return Cn(t),Sc(),e!==null&&vt(Kl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ui(Mt),null;case 25:return null;default:return null}}function Mm(e,t){switch(sc(t),t.tag){case 3:Ui(Mt),Vt();break;case 26:case 27:case 5:Yt(t);break;case 4:Vt();break;case 31:t.memoizedState!==null&&Cn(t);break;case 13:Cn(t);break;case 19:kc(t);break;case 10:Ui(t.type);break;case 22:case 23:Cn(t),Sc(),e!==null&&vt(Kl);break;case 24:Ui(Mt)}}function Dr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var c=s.next;i=c;do{if((i.tag&e)===e){s=void 0;var d=i.create,v=i.inst;s=d(),v.destroy=s}i=i.next}while(i!==c)}}catch(w){ut(t,t.return,w)}}function ml(e,t,i){try{var s=t.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var d=c.next;s=d;do{if((s.tag&e)===e){var v=s.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,c=t;var N=i,U=w;try{U()}catch(G){ut(c,N,G)}}}s=s.next}while(s!==d)}}catch(G){ut(t,t.return,G)}}function Dm(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Tp(t,i)}catch(s){ut(e,e.return,s)}}}function Lm(e,t,i){i.props=ea(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){ut(e,t,s)}}function pi(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:var c=e.stateNode,d=Ri(e.memoizedProps,c);(c.ref===null||c.ref.name!==d)&&(c.ref=Gg(d)),s=c.ref;break;case 7:if(e.stateNode===null){var v=new zn(e);m(e.child,!1,tS,v,void 0,void 0),e.stateNode=v}s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(w){ut(e,t,w)}}function Wt(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(c){ut(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(c){ut(e,t,c)}else i.current=null}function xu(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var i=0;i<t.length;i++)Jg(e.stateNode,t[i])}function Bm(e){for(var t=e.return;t!==null&&(ef(t)&&Jg(e.stateNode,t.stateNode),!Wc(t));)t=t.return}function Lr(e){for(var t=e.return;t!==null&&(ef(t)&&nS(e.stateNode,t.stateNode),!Wc(t));)t=t.return}function Wc(e){return e.tag===5||e.tag===3||e.tag===27}function ef(e){return e&&e.tag===7&&e.stateNode!==null}function tf(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(c){ut(e,e.return,c)}}function nf(e,t,i){try{var s=e.stateNode;Lx(s,e.type,i,t),s[an]=t}catch(c){ut(e,e.return,c)}}function Um(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wl(e.type)||e.tag===4}function lf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Um(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&&wl(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 af(e,t,i,s){var c=e.tag;if(c===5||c===6)c=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(c,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(c),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=oe)),xu(e,s),Ve=!0;else if(c!==4&&(c===27&&(xu(e,s),s=null,wl(e.type)&&(i=e.stateNode,t=null)),e=e.child,e!==null))for(af(e,t,i,s),e=e.sibling;e!==null;)af(e,t,i,s),e=e.sibling}function Su(e,t,i,s){var c=e.tag;if(c===5||c===6)c=e.stateNode,t?i.insertBefore(c,t):i.appendChild(c),xu(e,s),Ve=!0;else if(c!==4&&(c===27&&(xu(e,s),s=null,wl(e.type)&&(i=e.stateNode)),e=e.child,e!==null))for(Su(e,t,i,s),e=e.sibling;e!==null;)Su(e,t,i,s),e=e.sibling}function Hm(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);en(t,s,i),t[Nt]=e,t[an]=i}catch(d){ut(e,e.return,d)}}var wu=!1,Nn=null;function Im(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(wu=!0)}var mi=null;function Vm(){var e=mi;return mi=null,e}var bn=0;function Ba(e,t,i,s,c){return bn=0,Ym(e.child,t,i,s,c)}function Ym(e,t,i,s,c){for(var d=!1;e!==null;){if(e.tag===5){var v=e.stateNode;if(s!==null){var w=Vf(v);s.push(w),w.view&&(d=!0)}else d||Vf(v).view&&(d=!0);wu=!0,Vg(v,bn===0?t:t+"_"+bn,i),bn++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&c||Ym(e.child,t,i,s,c)&&(d=!0));e=e.sibling}return d}function gi(e,t){for(;e!==null;)e.tag===5?Yg(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||gi(e.child,t)),e=e.sibling}function ku(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(ku(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(r(544));var i=t.name;t=Mi(t.default,t.share),t!=="none"&&(Ba(e,i,t,null,!1)||gi(e.child,!1))}e=e.sibling}}function rf(e,t){if(e.tag===30){var i=e.stateNode,s=e.memoizedProps,c=Ri(s,i),d=Mi(s.default,i.paired?s.share:s.enter);d!=="none"?Ba(e,c,d,null,!1)?(ku(e),i.paired||t||Fa(e,s.onEnter)):gi(e.child,!1):ku(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)rf(e,t),e=e.sibling;else ku(e)}function sf(e){if(Nn!==null&&Nn.size!==0){var t=Nn;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var i=e.memoizedProps,s=i.name;if(s!=null&&s!=="auto"){var c=t.get(s);if(c!==void 0){var d=Mi(i.default,i.share);if(d!=="none"&&(Ba(e,s,d,null,!1)?(d=e.stateNode,c.paired=d,d.paired=c,Fa(e,i.onShare)):gi(e.child,!1)),t.delete(s),t.size===0)break}}}sf(e)}e=e.sibling}}}function uf(e){if(e.tag===30){var t=e.memoizedProps,i=Ri(t,e.stateNode),s=Nn!==null?Nn.get(i):void 0,c=Mi(t.default,s!==void 0?t.share:t.exit);c!=="none"&&(Ba(e,i,c,null,!1)?s!==void 0?(c=e.stateNode,s.paired=c,c.paired=s,Nn.delete(i),Fa(e,t.onShare)):Fa(e,t.onExit):gi(e.child,!1)),Nn!==null&&sf(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)uf(e),e=e.sibling;else Nn!==null&&sf(e)}function Gm(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,i=Ri(t,e.stateNode);t=Mi(t.default,t.update),e.flags&=-5,t!=="none"&&Ba(e,i,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&Gm(e);e=e.sibling}}function of(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,gi(e.child,!1))}of(e)}e=e.sibling}}function Eu(e){if(e.tag===30)e.stateNode.paired=null,gi(e.child,!1),of(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Eu(e),e=e.sibling;else of(e)}function Qm(e){for(e=e.child;e!==null;)e.tag===30?gi(e.child,!1):(e.subtreeFlags&33554432)!==0&&Qm(e),e=e.sibling}function cf(e,t,i,s,c,d,v){for(var w=!1;t!==null;){if(t.tag===5){var N=t.stateNode;if(d!==null&&bn<d.length){var U=d[bn],G=Vf(N);(U.view||G.view)&&(w=!0);var $;if($=(e.flags&4)===0)if(G.clip)$=!0;else{$=U.rect;var L=G.rect;$=$.y!==L.y||$.x!==L.x||$.height!==L.height||$.width!==L.width}$&&(e.flags|=4),G.abs?G=!U.abs:(U=U.rect,G=G.rect,G=U.height!==G.height||U.width!==G.width),G&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&Vg(N,bn===0?i:i+"_"+bn,c),w&&(e.flags&4)!==0||(mi===null&&(mi=[]),mi.push(N,bn===0?s:s+"_"+bn,t.memoizedProps)),bn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&v?e.flags|=t.flags&32:cf(e,t.child,i,s,c,d,v)&&(w=!0));t=t.sibling}return w}function Fm(e,t){for(e=e.child;e!==null;){if(e.tag===30){var i=e.memoizedProps,s=e.stateNode,c=Ri(i,s),d=Mi(i.default,i.update),v;v=e.memoizedState,e.memoizedState=null,s=e;var w=e.child;bn=0,c=cf(s,w,c,c,d,v,!1),(e.flags&4)!==0&&c&&Fa(e,i.onUpdate)}else(e.subtreeFlags&33554432)!==0&&Fm(e);e=e.sibling}}var Ft=!1,it=!1,yi=!1,ff=!1,Xm=typeof WeakSet=="function"?WeakSet:Set,Xt=null,vi=!1,Br=!1,Tu=!1,df=!1;function dx(e,t,i){if(e=e.containerInfo,Lf=nr,e=$h(e),$o(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var d=c.anchorOffset,v=c.focusNode;c=c.focusOffset;try{s.nodeType,v.nodeType}catch{s=null;break e}var w=0,N=-1,U=-1,G=0,$=0,L=e,Y=null;t:for(;;){for(var ce;L!==s||d!==0&&L.nodeType!==3||(N=w+d),L!==v||c!==0&&L.nodeType!==3||(U=w+c),L.nodeType===3&&(w+=L.nodeValue.length),(ce=L.firstChild)!==null;)Y=L,L=ce;for(;;){if(L===e)break t;if(Y===s&&++G===d&&(N=w),Y===v&&++$===c&&(U=w),(ce=L.nextSibling)!==null)break;L=Y,Y=L.parentNode}L=ce}s=N===-1||U===-1?null:{start:N,end:U}}else s=null}s=s||{start:0,end:0}}else s=null;for(Bf={focusedElem:e,selectionRange:s},nr=!1,i=(i&335544064)===i,Xt=t,t=i?9270:1024;Xt!==null;){if(e=Xt,i&&(s=e.deletions,s!==null))for(d=0;d<s.length;d++)i&&uf(s[d]);if(e.alternate===null&&(e.flags&2)!==0)i&&Im(e),Au(i);else{if(e.tag===22){if(s=e.alternate,e.memoizedState!==null){s!==null&&s.memoizedState===null&&i&&uf(s),Au(i);continue}else if(s!==null&&s.memoizedState!==null){i&&Im(e),Au(i);continue}}s=e.child,(e.subtreeFlags&t)!==0&&s!==null?(s.return=e,Xt=s):(i&&Gm(e),Au(i))}}Nn=null}function Au(e){for(;Xt!==null;){var t=Xt,i=e,s=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((c&1024)!==0&&s!==null){i=void 0,c=s.memoizedProps,s=s.memoizedState;var d=t.stateNode;try{var v=ea(t.type,c);i=d.getSnapshotBeforeUpdate(v,s),d.__reactInternalSnapshotBeforeUpdate=i}catch(w){ut(t,t.return,w)}}break;case 3:if((c&1024)!==0){if(s=t.stateNode.containerInfo,i=s.nodeType,i===9)Qf(s);else if(i===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Qf(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:i&&s!==null&&(i=Ri(s.memoizedProps,s.stateNode),c=t.memoizedProps,c=Mi(c.default,c.update),c!=="none"&&Ba(s,i,c,s.memoizedState=[],!0));break;default:if((c&1024)!==0)throw Error(r(163))}if(s=t.sibling,s!==null){s.return=t.return,Xt=s;break}Xt=t.return}}function Zm(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:bi(e,i),s&4&&Dr(5,i);break;case 1:if(bi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(v){ut(i,i.return,v)}else{var c=ea(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(v){ut(i,i.return,v)}}s&64&&Dm(i),s&512&&pi(i,i.return);break;case 3:if(bi(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Tp(e,t)}catch(v){ut(i,i.return,v)}}break;case 27:t===null&&s&4&&Hm(i);case 26:case 5:bi(e,i),t===null&&s&4&&tf(i),s&512&&pi(i,i.return);break;case 12:bi(e,i);break;case 31:bi(e,i),s&4&&Pm(e,i);break;case 13:bi(e,i),s&4&&Wm(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Ex.bind(null,i),aS(e,i))));break;case 22:if(s=i.memoizedState!==null||Ft,!s){var d=t!==null&&t.memoizedState!==null||it;t=Ft,c=it,Ft=s,(it=d)&&!c?(s=2,(i.subtreeFlags&8772)!==0&&(s|=1),ni(e,i,s)):bi(e,i),Ft=t,it=c}break;case 30:bi(e,i),s&512&&pi(i,i.return);break;case 7:s&512&&pi(i,i.return);default:bi(e,i)}}function hf(e,t){for(e=e.child;e!==null;)Km(e,t),e=e.sibling}function Km(e,t){switch(e.tag){case 5:case 26:try{var i=e.stateNode;if(t){var s=i.style;typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"}else{var c=e.stateNode,d=e.memoizedProps.style,v=d!=null&&d.hasOwnProperty("display")?d.display:null;c.style.display=v==null||typeof v=="boolean"?"":(""+v).trim()}}catch(N){ut(e,e.return,N)}pf(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ve=!0}catch(N){ut(e,e.return,N)}break;case 18:try{var w=e.stateNode;t?Ig(w,!0):Ig(e.stateNode,!1)}catch(N){ut(e,e.return,N)}break;case 22:case 23:e.memoizedState===null&&hf(e,t);break;default:hf(e,t)}}function pf(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var i=e,s=t;switch(i.tag){case 4:Km(i,s);break e;case 22:i.memoizedState===null&&pf(i,s);break e;default:pf(i,s)}}e=e.sibling}}function Jm(e){var t=e.alternate;t!==null&&(e.alternate=null,Jm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ht(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Et=null,xn=!1;function ei(e,t,i){for(i=i.child;i!==null;)$m(e,t,i),i=i.sibling}function $m(e,t,i){if(fn&&typeof fn.onCommitFiberUnmount=="function")try{fn.onCommitFiberUnmount(Xi,i)}catch{}switch(i.tag){case 26:it||Wt(i,t),ei(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&!it&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:it||Wt(i,t),Lr(i);var s=Et,c=xn;wl(i.type)&&(Et=i.stateNode,xn=!1),ei(e,t,i),ty(i.stateNode,i.type,i.memoizedProps),Et=s,xn=c;break;case 5:it||Wt(i,t),Lr(i);case 6:if(i.tag===6&&Lr(i),s=Et,c=xn,Et=null,ei(e,t,i),Et=s,xn=c,Et!==null)if(xn)try{(Et.nodeType===9?Et.body:Et.nodeName==="HTML"?Et.ownerDocument.body:Et).removeChild(i.stateNode),Ve=!0}catch(d){ut(i,t,d)}else try{Et.removeChild(i.stateNode),Ve=!0}catch(d){ut(i,t,d)}break;case 18:Et!==null&&(xn?(e=Et,Hg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),ir(e)):Hg(Et,i.stateNode));break;case 4:s=Et,c=xn,Et=i.stateNode.containerInfo,xn=!0,ei(e,t,i),Et=s,xn=c;break;case 0:case 11:case 14:case 15:ml(2,i,t),it||ml(4,i,t),ei(e,t,i);break;case 1:it||(Wt(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&Lm(i,t,s)),ei(e,t,i);break;case 21:ei(e,t,i);break;case 22:it=(s=it)||i.memoizedState!==null,ei(e,t,i),it=s;break;case 30:Wt(i,t),ei(e,t,i);break;case 7:it||Wt(i,t),ei(e,t,i);break;default:ei(e,t,i)}}function Pm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ir(e)}catch(i){ut(t,t.return,i)}}}function Wm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ir(e)}catch(i){ut(t,t.return,i)}}function hx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Xm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Xm),t;default:throw Error(r(435,e.tag))}}function Cu(e,t){var i=hx(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var c=Tx.bind(null,e,s);s.then(c,c)}})}function gn(e,t,i){var s=t.deletions;if(s!==null)for(var c=0;c<s.length;c++){var d=s[c],v=e,w=t,N=w;e:for(;N!==null;){switch(N.tag){case 27:if(wl(N.type)){Et=N.stateNode,xn=!1;break e}break;case 5:Et=N.stateNode,xn=!1;break e;case 3:case 4:Et=N.stateNode.containerInfo,xn=!0;break e}N=N.return}if(Et===null)throw Error(r(160));$m(v,w,d),Et=null,xn=!1,v=d.alternate,v!==null&&(v.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)eg(t,e,i),t=t.sibling}var ti=null;function eg(e,t,i){var s=e.alternate,c=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(c&4&&(s=e.updateQueue,s=s!==null?s.events:null,s!==null))for(var d=0;d<s.length;d++){var v=s[d];v.ref.impl=v.nextImpl}gn(t,e,i),yn(e),c&4&&(ml(3,e,e.return),Dr(3,e),ml(5,e,e.return));break;case 1:gn(t,e,i),yn(e),c&512&&(it||s===null||Wt(s,s.return)),c&64&&Ft&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?t:i.concat(t))));break;case 26:if(d=ti,gn(t,e,i),yn(e),c&512&&(it||s===null||Wt(s,s.return)),c&4)if(c=s!==null?s.memoizedState:null,i=e.memoizedState,s===null)if(i===null)if(e.stateNode===null)if(Ft)e.stateNode=Lg(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,i=e.memoizedProps,c=d.ownerDocument||d;t:switch(t){case"title":s=c.getElementsByTagName("title")[0],(!s||s[Pi]||s[Nt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=c.createElement(t),c.head.insertBefore(s,c.querySelector("head > title"))),en(s,t,i),s[Nt]=e,Rt(s),t=s;break e;case"link":if(d=sy("link","href",c).get(t+(i.href||""))){for(v=0;v<d.length;v++)if(s=d[v],s.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&s.getAttribute("rel")===(i.rel==null?null:i.rel)&&s.getAttribute("title")===(i.title==null?null:i.title)&&s.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){d.splice(v,1);break t}}s=c.createElement(t),en(s,t,i),c.head.appendChild(s);break;case"meta":if(d=sy("meta","content",c).get(t+(i.content||""))){for(v=0;v<d.length;v++)if(s=d[v],s.getAttribute("content")===(i.content==null?null:""+i.content)&&s.getAttribute("name")===(i.name==null?null:i.name)&&s.getAttribute("property")===(i.property==null?null:i.property)&&s.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&s.getAttribute("charset")===(i.charSet==null?null:i.charSet)){d.splice(v,1);break t}}s=c.createElement(t),en(s,t,i),c.head.appendChild(s);break;default:throw Error(r(468,t))}s[Nt]=e,Rt(s),t=s}e.stateNode=t}else Ft||Pf(d,e.type,e.stateNode);else e.stateNode=ry(d,i,e.memoizedProps);else c!==i?(c===null?(t=s.stateNode,t===null||it||t.parentNode.removeChild(t)):c.count--,i===null?Ft||Pf(d,e.type,e.stateNode):ry(d,i,e.memoizedProps)):i===null&&e.stateNode!==null&&nf(e,e.memoizedProps,s.memoizedProps);break;case 27:gn(t,e,i),yn(e),c&512&&(it||s===null||Wt(s,s.return)),s!==null&&c&4&&nf(e,e.memoizedProps,s.memoizedProps);break;case 5:if(d=yi,yi=!1,gn(t,e,i),yi=d,yn(e),c&512&&(it||s===null||Wt(s,s.return)),e.flags&32){t=e.stateNode;try{Dn(t,""),Ve=!0}catch(G){ut(e,e.return,G)}}c&4&&e.stateNode!=null&&(t=e.memoizedProps,nf(e,t,s!==null?s.memoizedProps:t)),c&1024&&(ff=!0);break;case 6:if(gn(t,e,i),yn(e),c&4){if(e.stateNode===null)throw Error(r(162));t=e.memoizedProps,i=e.stateNode;try{i.nodeValue=t,Ve=!0}catch(G){ut(e,e.return,G)}}break;case 3:if(Ve=!1,Vu=null,d=ti,ti=Xr(t.containerInfo),gn(t,e,i),ti=d,yn(e),c&4&&s!==null&&s.memoizedState.isDehydrated)try{ir(t.containerInfo)}catch(G){ut(e,e.return,G)}ff&&(ff=!1,tg(e)),Ve=!1;break;case 4:c=yi,yi=Ft,s=ba(),d=ti,ti=Xr(e.stateNode.containerInfo),gn(t,e,i),yn(e),ti=d,Ve&&Br&&(Tu=!0),Ve=s,yi=c;break;case 12:gn(t,e,i),yn(e);break;case 31:gn(t,e,i),yn(e),c&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Cu(e,t)));break;case 13:gn(t,e,i),yn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Ou=Ct()),c&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Cu(e,t)));break;case 22:d=e.memoizedState!==null,v=s!==null&&s.memoizedState!==null;var w=Ft,N=it,U=yi;Ft=w||d,yi=U||d,it=N||v,gn(t,e,i),it=N,yi=U,Ft=w,yn(e),c&8192&&(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,!d||s===null||v||Ft||it||(t=v||it,i=Ft,s=it,Ft=d||Ft,it=t,gl(e,2),Ft=i,it=s),!d&&yi||hf(e,d)),c&4&&(t=e.updateQueue,t!==null&&(i=t.retryQueue,i!==null&&(t.retryQueue=null,Cu(e,i))));break;case 19:gn(t,e,i),yn(e),c&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Cu(e,t)));break;case 30:c&512&&(it||s===null||Wt(s,s.return)),c=ba(),d=Br,v=(i&335544064)===i,w=e.memoizedProps,Br=v&&Mi(w.default,w.update)!=="none",gn(t,e,i),yn(e),v&&s!==null&&Ve&&(e.flags|=4),Br=d,Ve=c;break;case 21:break;case 7:c&512&&(it||s===null||Wt(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=e);default:gn(t,e,i),yn(e)}}function yn(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(Um(s)){i=s;break}s=s.return}s=null;for(var c=e.return;c!==null;){if(ef(c)){var d=c.stateNode;s===null?s=[d]:s.push(d)}if(Wc(c))break;c=c.return}var v=s;if(i==null)throw Error(r(160));switch(i.tag){case 27:var w=i.stateNode,N=lf(e);Su(e,N,w,v);break;case 5:var U=i.stateNode;i.flags&32&&(Dn(U,""),i.flags&=-33);var G=lf(e);Su(e,G,U,v);break;case 3:case 4:var $=i.stateNode.containerInfo,L=lf(e);af(e,L,$,v);break;default:throw Error(r(161))}}catch(Y){ut(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function tg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;tg(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,nr=!0,t.reset(),nr=!1),e=e.sibling}}function Ua(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)ng(t,e),t=t.sibling;else Fm(t)}function ng(e,t){var i=e.alternate;if(i===null)rf(e,!1);else switch(e.tag){case 3:if(df=vi=!1,Vm(),Ua(t,e),!vi&&!Tu){if(e=mi,e!==null)for(var s=0;s<e.length;s+=3){i=e[s];var c=e[s+1];Yg(i,e[s+2]),i=i.ownerDocument.documentElement,i!==null&&i.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+c+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),df=!0}mi=null;break;case 5:Ua(t,e);break;case 4:s=vi,vi=!1,Ua(t,e),vi&&(Tu=!0),vi=s;break;case 22:e.memoizedState===null&&(i.memoizedState!==null?rf(e,!1):Ua(t,e));break;case 30:s=vi,c=Vm(),vi=!1,Ua(t,e),vi&&(e.flags|=4);var d=e.memoizedProps,v=e.stateNode;t=Ri(d,v),v=Ri(i.memoizedProps,v);var w=Mi(d.default,d.update);w==="none"?t=!1:(d=i.memoizedState,i.memoizedState=null,i=e.child,bn=0,t=cf(e,i,t,v,w,d,!0),bn!==(d===null?0:d.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Fa(e,e.memoizedProps.onUpdate),mi=c):c!==null&&(c.push.apply(c,mi),mi=c),vi=(e.flags&32)!==0?!0:s;break;default:Ua(t,e)}}function bi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Zm(e,t.alternate,t),t=t.sibling}function gl(e,t){for(e=e.child;e!==null;){var i=e,s=t;switch(i.tag){case 0:case 11:case 14:case 15:ml(4,i,i.return),gl(i,s);break;case 1:Wt(i,i.return);var c=i.stateNode;typeof c.componentWillUnmount=="function"&&Lm(i,i.return,c),gl(i,s);break;case 27:(s&2)!==0&&ty(i.stateNode,i.type,i.memoizedProps);case 5:Wt(i,i.return),i.tag!==5&&i.tag!==27||Lr(i),gl(i,s);break;case 6:Lr(i);break;case 26:Wt(i,i.return),c=i.stateNode,i.memoizedState!==null||c===null||it||c.parentNode.removeChild(c),gl(i,s);break;case 22:i.memoizedState===null&&gl(i,s);break;case 30:Wt(i,i.return),gl(i,s);break;case 7:Wt(i,i.return);default:gl(i,s)}e=e.sibling}}function ni(e,t,i){for(i=(t.subtreeFlags&8772)!==0?i:i&-2,t=t.child;t!==null;){var s=t.alternate,c=e,d=t,v=d.flags,w=(i&1)!==0;switch(d.tag){case 0:case 11:case 15:ni(c,d,i),Dr(4,d);break;case 1:if(ni(c,d,i),s=d,c=s.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(G){ut(s,s.return,G)}if(s=d,c=s.updateQueue,c!==null){var N=s.stateNode;try{var U=c.shared.hiddenCallbacks;if(U!==null)for(c.shared.hiddenCallbacks=null,c=0;c<U.length;c++)Ep(U[c],N)}catch(G){ut(s,s.return,G)}}w&&v&64&&Dm(d),pi(d,d.return);break;case 27:(i&2)!==0&&Hm(d);case 5:d.tag!==5&&d.tag!==27||Bm(d),ni(c,d,i),w&&s===null&&v&4&&tf(d),pi(d,d.return);break;case 6:Bm(d);break;case 26:N=d.stateNode,d.memoizedState!==null||N===null||Ft||Pf(Xr(N.ownerDocument),d.type,N),ni(c,d,i),w&&s===null&&v&4&&tf(d),pi(d,d.return);break;case 12:ni(c,d,i);break;case 31:ni(c,d,i),w&&v&4&&Pm(c,d);break;case 13:ni(c,d,i),w&&v&4&&Wm(c,d);break;case 22:d.memoizedState===null&&ni(c,d,i),pi(d,d.return);break;case 30:ni(c,d,i),pi(d,d.return);break;case 7:pi(d,d.return);default:ni(c,d,i)}t=t.sibling}}function mf(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&kr(i))}function gf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&kr(e))}function Yn(e,t,i,s){var c=(i&335544064)===i;if(t.subtreeFlags&(c?10262:10256))for(t=t.child;t!==null;)ig(e,t,i,s),t=t.sibling;else c&&Qm(t)}function ig(e,t,i,s){var c=(i&335544064)===i;c&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Eu(t);var d=t.flags;switch(t.tag){case 0:case 11:case 15:Yn(e,t,i,s),d&2048&&Dr(9,t);break;case 1:Yn(e,t,i,s);break;case 3:Yn(e,t,i,s),c&&df&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),d&2048&&(d=null,t.alternate!==null&&(d=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==d&&(t.refCount++,d!=null&&kr(d)));break;case 12:if(d&2048){Yn(e,t,i,s),d=t.stateNode;try{var v=t.memoizedProps,w=v.id,N=v.onPostCommit;typeof N=="function"&&N(w,t.alternate===null?"mount":"update",d.passiveEffectDuration,-0)}catch(U){ut(t,t.return,U)}}else Yn(e,t,i,s);break;case 31:Yn(e,t,i,s);break;case 13:Yn(e,t,i,s);break;case 23:break;case 22:v=t.stateNode,w=t.alternate,t.memoizedState!==null?(c&&w!==null&&w.memoizedState===null&&Eu(w),v._visibility&2?Yn(e,t,i,s):Ur(e,t)):(c&&w!==null&&w.memoizedState!==null&&Eu(t),v._visibility&2?Yn(e,t,i,s):(v._visibility|=2,Ha(e,t,i,s,(t.subtreeFlags&10256)!==0||!1))),d&2048&&mf(w,t);break;case 24:Yn(e,t,i,s),d&2048&&gf(t.alternate,t);break;case 30:c&&(d=t.alternate,d!==null&&(gi(d.child,!0),gi(t.child,!0))),Yn(e,t,i,s);break;default:Yn(e,t,i,s)}}function Ha(e,t,i,s,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,v=t,w=i,N=s,U=v.flags;switch(v.tag){case 0:case 11:case 15:Ha(d,v,w,N,c),Dr(8,v);break;case 23:break;case 22:var G=v.stateNode;v.memoizedState!==null?G._visibility&2?Ha(d,v,w,N,c):Ur(d,v):(G._visibility|=2,Ha(d,v,w,N,c)),c&&U&2048&&mf(v.alternate,v);break;case 24:Ha(d,v,w,N,c),c&&U&2048&&gf(v.alternate,v);break;default:Ha(d,v,w,N,c)}t=t.sibling}}function Ur(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,c=s.flags;switch(s.tag){case 22:Ur(i,s),c&2048&&mf(s.alternate,s);break;case 24:Ur(i,s),c&2048&&gf(s.alternate,s);break;default:Ur(i,s)}t=t.sibling}}var ta=8192;function na(e,t,i){if(e.subtreeFlags&ta)for(e=e.child;e!==null;)lg(e,t,i),e=e.sibling}function lg(e,t,i){switch(e.tag){case 26:na(e,t,i),e.flags&ta&&(e.memoizedState!==null?bS(i,ti,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&fy(i,e)));break;case 5:na(e,t,i),e.flags&ta&&(e=e.stateNode,(t&335544128)===t&&fy(i,e));break;case 3:case 4:var s=ti;ti=Xr(e.stateNode.containerInfo),na(e,t,i),ti=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=ta,ta=16777216,na(e,t,i),ta=s):na(e,t,i));break;case 30:if((e.flags&ta)!==0&&(s=e.memoizedProps.name,s!=null&&s!=="auto")){var c=e.stateNode;c.paired=null,Nn===null&&(Nn=new Map),Nn.set(s,c)}na(e,t,i);break;default:na(e,t,i)}}function ag(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Hr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Xt=s,sg(s,e)}ag(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)rg(e),e=e.sibling}function rg(e){switch(e.tag){case 0:case 11:case 15:Hr(e),e.flags&2048&&ml(9,e,e.return);break;case 3:Hr(e);break;case 12:Hr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Nu(e)):Hr(e);break;default:Hr(e)}}function Nu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];Xt=s,sg(s,e)}ag(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ml(8,t,t.return),Nu(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Nu(t));break;default:Nu(t)}e=e.sibling}}function sg(e,t){for(;Xt!==null;){var i=Xt;switch(i.tag){case 0:case 11:case 15:ml(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:kr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,Xt=s;else e:for(i=e;Xt!==null;){s=Xt;var c=s.sibling,d=s.return;if(Jm(s),s===i){Xt=null;break e}if(c!==null){c.return=d,Xt=c;break e}Xt=d}}}var px={getCacheForType:function(e){var t=Jt(Mt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Jt(Mt).controller.signal}},mx=typeof WeakMap=="function"?WeakMap:Map,nt=0,mt=null,He=null,Ye=0,st=0,jn=null,yl=!1,Ia=!1,yf=!1,Gi=0,Ot=0,vl=0,ia=0,ju=0,On=0,Va=0,Ir=null,Sn=null,vf=!1,Ou=0,ug=0,_u=1/0,zu=null,bl=null,Tt=0,ii=null,la=null,xi=0,bf=0,xf=null,og=null,Ya=null,Ga=null,Qa=null,Vr=0,qu=null;function _n(){return(nt&2)!==0&&Ye!==0?Ye&-Ye:P.T!==null?Of():ji()}function cg(){if(On===0)if((Ye&536870912)===0||Be){var e=Rl;Rl<<=1,(Rl&3932160)===0&&(Rl=262144),On=e}else On=536870912;return e=$t.current,e!==null&&(e.flags|=32),On}function Fa(e,t){if(t!=null){var i=e.stateNode,s=i.ref;s===null&&(s=i.ref=Gg(Ri(e.memoizedProps,i))),Ga===null&&(Ga=[]),Ga.push(t.bind(null,s))}}function wn(e,t,i){(e===mt&&(st===2||st===9)||e.cancelPendingCommit!==null)&&(Xa(e,0),xl(e,Ye,On,!1)),Ni(e,i),((nt&2)===0||e!==mt)&&(e===mt&&((nt&2)===0&&(ia|=i),Ot===4&&xl(e,Ye,On,!1)),Si(e))}function fg(e,t,i){if((nt&6)!==0)throw Error(r(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Ci(e,t),c=s?vx(e,t):wf(e,t,!0),d=s;do{if(c===0){Ia&&!s&&xl(e,t,0,!1);break}else{if(i=e.current.alternate,d&&!gx(i)){c=wf(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){t=v;e:{var w=e;c=Ir;var N=w.current.memoizedState.isDehydrated;if(N&&(Xa(w,v).flags|=256),v=wf(w,v,!1),v!==2&&v!==6){if(yf&&!N){w.errorRecoveryDisabledLanes|=d,ia|=d,c=4;break e}d=Sn,Sn=c,d!==null&&(Sn===null?Sn=d:Sn.push.apply(Sn,d))}c=v}if(d=!1,c!==2)continue}}if(c===1){Xa(e,0),xl(e,t,0,!0);break}e:{switch(s=e,d=c,d){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:xl(s,t,On,!yl);break e;case 2:Sn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(c=Ou+300-Ct(),10<c)){if(xl(s,t,On,!yl),Ml(s,0,!0)!==0)break e;xi=t,s.timeoutHandle=If(dg.bind(null,s,i,Sn,zu,vf,t,On,ia,Va,yl,d,"Throttled",-0,0),c);break e}dg(s,i,Sn,zu,vf,t,On,ia,Va,yl,d,null,-0,0)}}break}while(!0);Si(e)}function dg(e,t,i,s,c,d,v,w,N,U,G,$,L,Y){e.timeoutHandle=-1;var ce=t.subtreeFlags,ve=(d&335544064)===d;if($=null,(ve||ce&8192||(ce&16785408)===16785408)&&($={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:oe},Nn=null,lg(t,d,$),ve&&(ce=$,ve=e.containerInfo,ve=(ve.nodeType===9?ve:ve.ownerDocument).__reactViewTransition,ve!=null&&(ce.count++,ce.waitingForViewTransition=!0,ce=Jr.bind(ce),ve.finished.then(ce,ce))),ce=(d&62914560)===d?Ou-Ct():(d&4194048)===d?ug-Ct():0,ce=xS($,ce),ce!==null)){xi=d,e.cancelPendingCommit=ce(xg.bind(null,e,t,d,i,s,c,v,w,N,U,G,$,null,L,Y)),xl(e,d,v,!U);return}xg(e,t,d,i,s,c,v,w,N,U,G,$)}function gx(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var c=i[s],d=c.getSnapshot;c=c.value;try{if(!An(d(),c))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xl(e,t,i,s){t=ga(e,t),t&=~ju,t&=~ia,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var c=t;0<c;){var d=31-dn(c),v=1<<d;s[d]=-1,c&=~v}i!==0&&Ll(e,i,t)}function Ru(){return(nt&6)===0?(Yr(0),!1):!0}function Sf(){if(He!==null){if(st===0)var e=He.return;else e=He,Bi=Ql=null,Nc(e),qa=null,Ar=0,e=He;for(;e!==null;)Mm(e.alternate,e),e=e.return;He=null}}function Xa(e,t){var i=e.timeoutHandle;return i!==-1&&(e.timeoutHandle=-1,Hx(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),xi=0,Sf(),mt=e,He=i=Di(e.current,null),Ye=t,st=0,jn=null,yl=!1,Ia=Ci(e,t),yf=!1,Va=On=ju=ia=vl=Ot=0,Sn=Ir=null,vf=!1,Gi=ga(e,t),Vs(),i}function hg(e,t){Me=null,P.H=hu,t===za||t===Ws?(t=xp(),st=3):t===mc?(t=xp(),st=4):st=t===Yc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,jn=t,He===null&&(Ot=1,pu(e,Un(t,e.current)))}function pg(){var e=$t.current;return e===null?!0:(Ye&4194048)===Ye?sn===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===sn:!1}function mg(){var e=P.H;return P.H=hu,e===null?hu:e}function gg(){var e=P.A;return P.A=px,e}function Mu(){Ot=4,yl||(Ye&4194048)!==Ye&&$t.current!==null||(Ia=!0),(vl&134217727)===0&&(ia&134217727)===0||mt===null||xl(mt,Ye,On,!1)}function wf(e,t,i){var s=nt;nt|=2;var c=mg(),d=gg();(mt!==e||Ye!==t)&&(zu=null,Xa(e,t)),t=!1;var v=Ot;e:do try{if(st!==0&&He!==null){var w=He,N=jn;switch(st){case 8:Sf(),v=6;break e;case 3:case 2:case 9:case 6:$t.current===null&&(t=!0);var U=st;if(st=0,jn=null,Za(e,w,N,U),i&&Ia){v=0;break e}break;default:U=st,st=0,jn=null,Za(e,w,N,U)}}yx(),v=Ot;break}catch(G){hg(e,G)}while(!0);return t&&e.shellSuspendCounter++,Bi=Ql=null,nt=s,P.H=c,P.A=d,He===null&&(mt=null,Ye=0,Vs()),v}function yx(){for(;He!==null;)yg(He)}function vx(e,t){var i=nt;nt|=2;var s=mg(),c=gg();mt!==e||Ye!==t?(zu=null,_u=Ct()+500,Xa(e,t)):Ia=Ci(e,t);e:do try{if(st!==0&&He!==null){t=He;var d=jn;t:switch(st){case 1:st=0,jn=null,Za(e,t,d,1);break;case 2:case 9:if(vp(d)){st=0,jn=null,vg(t);break}t=function(){st!==2&&st!==9||mt!==e||(st=7),Si(e)},d.then(t,t);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:vp(d)?(st=0,jn=null,vg(t)):(st=0,jn=null,Za(e,t,d,7));break;case 5:var v=null;switch(He.tag){case 26:v=He.memoizedState;case 5:case 27:var w=He;if(v?oy(v):w.stateNode.complete){st=0,jn=null;var N=w.sibling;if(N!==null)He=N;else{var U=w.return;U!==null?(He=U,Du(U)):He=null}break t}}st=0,jn=null,Za(e,t,d,5);break;case 6:st=0,jn=null,Za(e,t,d,6);break;case 8:Sf(),Ot=6;break e;default:throw Error(r(462))}}bx();break}catch(G){hg(e,G)}while(!0);return Bi=Ql=null,P.H=s,P.A=c,nt=i,He!==null?0:(mt=null,Ye=0,Vs(),Ot)}function bx(){for(;He!==null&&!cn();)yg(He)}function yg(e){var t=qm(e.alternate,e,Gi);e.memoizedProps=e.pendingProps,t===null?Du(e):He=t}function vg(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Am(i,t,t.pendingProps,t.type,void 0,Ye);break;case 11:t=Am(i,t,t.pendingProps,t.type.render,t.ref,Ye);break;case 5:Nc(t);var s=t;s===Qt&&(Be?(Zs(s),s.tag===5&&s.stateNode!=null&&(xt=s.stateNode)):(Zs(s),Be=!0));default:Mm(i,t),t=He=sp(t,Gi),t=qm(i,t,Gi)}e.memoizedProps=e.pendingProps,t===null?Du(e):He=t}function Za(e,t,i,s){Bi=Ql=null,Nc(t),qa=null,Ar=0;var c=t.return;try{if(rx(e,c,t,i,Ye)){Ot=1,pu(e,Un(i,e.current)),He=null;return}}catch(d){if(c!==null)throw He=c,d;Ot=1,pu(e,Un(i,e.current)),He=null;return}t.flags&32768?(Be||s===1?e=!0:Ia||(Ye&536870912)!==0?e=!1:(yl=e=!0,(s===2||s===9||s===3||s===6)&&(s=$t.current,s!==null&&s.tag===13&&(s.flags|=16384))),bg(t,e)):Du(t)}function Du(e){var t=e;do{if((t.flags&32768)!==0){bg(t,yl);return}e=t.return;var i=cx(t.alternate,t,Gi);if(i!==null){He=i;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);Ot===0&&(Ot=5)}function bg(e,t){do{var i=fx(e.alternate,e);if(i!==null){i.flags&=32767,He=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=i}while(e!==null);Ot=6,He=null}function xg(e,t,i,s,c,d,v,w,N,U,G,$){e.cancelPendingCommit=null;do Lu();while(Tt!==0);if((nt&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));e===mt&&(He=mt=null,Ye=0),la=t,ii=e,xi=i,xf=c,og=s,xx(e,t,i,v,w,N,$)}}function xx(e,t,i,s,c,d,v){var w=t.lanes|t.childLanes;if(bf=w,w|=nc,Ts(e,i,w,s,c,d),Ga=null,(i&335544064)===i?(Qa=Z1(e),s=10262):(Qa=null,s=10256),(t.subtreeFlags&s)!==0||(t.flags&s)!==0?(e.callbackNode=null,e.callbackPriority=0,Ax(Ti,function(){return Af(),null})):(e.callbackNode=null,e.callbackPriority=0),wu=!1,s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=P.T,P.T=null,c=de.p,de.p=2,d=nt,nt|=4;try{dx(e,t,i)}finally{nt=d,de.p=c,P.T=s}}Tt=1,wu?Ya=Fx(v,e.containerInfo,Qa,kf,Ef,wx,Tf,Af,Sx):(kf(),Ef(),Tf())}function Sx(e){if(Tt!==0){var t=ii.onRecoverableError;t(e,{componentStack:null})}}function wx(){Tt===3&&(Tt=0,ng(la,ii),Tt=4)}function kf(){if(Tt===1){Tt=0;var e=ii,t=la,i=xi,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=P.T,P.T=null;var c=de.p;de.p=2;var d=nt;nt|=4;try{Br=Tu=!1,eg(t,e,i),i=Bf;var v=$h(e.containerInfo),w=i.focusedElem,N=i.selectionRange;if(v!==w&&w&&w.ownerDocument&&Jh(w.ownerDocument.documentElement,w)){if(N!==null&&$o(w)){var U=N.start,G=N.end;if(G===void 0&&(G=U),"selectionStart"in w)w.selectionStart=U,w.selectionEnd=Math.min(G,w.value.length);else{var $=w.ownerDocument||document,L=$&&$.defaultView||window;if(L.getSelection){var Y=L.getSelection(),ce=w.textContent.length,ve=Math.min(N.start,ce),De=N.end===void 0?ve:Math.min(N.end,ce);!Y.extend&&ve>De&&(v=De,De=ve,ve=v);var B=Kh(w,ve),R=Kh(w,De);if(B&&R&&(Y.rangeCount!==1||Y.anchorNode!==B.node||Y.anchorOffset!==B.offset||Y.focusNode!==R.node||Y.focusOffset!==R.offset)){var I=$.createRange();I.setStart(B.node,B.offset),Y.removeAllRanges(),ve>De?(Y.addRange(I),Y.extend(R.node,R.offset)):(I.setEnd(R.node,R.offset),Y.addRange(I))}}}}for($=[],Y=w;Y=Y.parentNode;)Y.nodeType===1&&$.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<$.length;w++){var J=$[w];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}nr=!!Lf,Bf=Lf=null}finally{nt=d,de.p=c,P.T=s}}e.current=t,Tt=2}}function Ef(){if(Tt===2){Tt=0;var e=ii,t=la,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=P.T,P.T=null;var s=de.p;de.p=2;var c=nt;nt|=4;try{Zm(e,t.alternate,t)}finally{nt=c,de.p=s,P.T=i}}Tt=3}}function Tf(){if(Tt===4||Tt===3){Tt=0;var e=Ya;Ya=null,_l();var t=ii,i=la,s=xi,c=og,d=(s&335544064)===s?10262:10256;if((i.subtreeFlags&d)!==0||(i.flags&d)!==0?Tt=5:(Tt=0,la=ii=null,Sg(t,t.pendingLanes)),d=t.pendingLanes,d===0&&(bl=null),or(s),i=i.stateNode,fn&&typeof fn.onCommitFiberRoot=="function")try{fn.onCommitFiberRoot(Xi,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=P.T,d=de.p,de.p=2,P.T=null;try{for(var v=t.onRecoverableError,w=0;w<c.length;w++){var N=c[w];v(N.value,{componentStack:N.stack})}}finally{P.T=i,de.p=d}}if(c=Ga,v=Qa,Qa=null,c!==null&&(Ga=null,v===null&&(v=[]),e!==null))for(N=0;N<c.length;N++)i=(0,c[N])(v),i!==void 0&&e.finished.finally(i);(xi&3)!==0&&Lu(),Si(t),d=t.pendingLanes,(s&261930)!==0&&(d&42)!==0?t===qu?Vr++:(Vr=0,qu=t):(Vr=0,qu=null),Yr(0)}}function Sg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,kr(t)))}function Lu(){return Ya!==null&&(Ya.skipTransition(),Ya=null),kf(),Ef(),Tf(),Af()}function Af(){if(Tt!==5)return!1;var e=ii,t=bf;bf=0;var i=or(xi),s=P.T,c=de.p;try{de.p=32>i?32:i,P.T=null,i=xf,xf=null;var d=ii,v=xi;if(Tt=0,la=ii=null,xi=0,(nt&6)!==0)throw Error(r(331));var w=nt;if(nt|=4,rg(d.current),ig(d,d.current,v,i),nt=w,Yr(0,!1),fn&&typeof fn.onPostCommitFiberRoot=="function")try{fn.onPostCommitFiberRoot(Xi,d)}catch{}return!0}finally{de.p=c,P.T=s,Sg(e,t)}}function wg(e,t,i){t=Un(i,t),t=Vc(e.stateNode,t,2),e=fl(e,t,2),e!==null&&(Ni(e,2),Si(e))}function ut(e,t,i){if(e.tag===3)wg(e,e,i);else for(;t!==null;){if(t.tag===3){wg(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(bl===null||!bl.has(s))){e=Un(i,e),i=vm(2),s=fl(t,i,2),s!==null&&(bm(i,s,t,e),Ni(s,2),Si(s));break}}t=t.return}}function Cf(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new mx;var c=new Set;s.set(t,c)}else c=s.get(t),c===void 0&&(c=new Set,s.set(t,c));c.has(i)||(yf=!0,c.add(i),e=kx.bind(null,e,t,i),t.then(e,e))}function kx(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,mt===e&&(Ye&i)===i&&((Ot===4||Ot===3&&(Ye&62914560)===Ye&&300>Ct()-Ou)&&(nt&2)===0?Xa(e,0):ju|=i,Va===Ye&&(Va=0)),Si(e)}function kg(e,t){t===0&&(t=Dl()),e=Vl(e,t),e!==null&&(Ni(e,t),Si(e))}function Ex(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),kg(e,i)}function Tx(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,c=e.memoizedState;c!==null&&(i=c.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(t),kg(e,i)}function Ax(e,t){return on(e,t)}var Ka=null,Ja=null,Nf=!1,Bu=!1,jf=!1,Sl=0;function Si(e){e!==Ja&&e.next===null&&(Ja===null?Ka=Ja=e:Ja=Ja.next=e),Bu=!0,Nf||(Nf=!0,Nx())}function Yr(e,t){if(!jf&&Bu){jf=!0;do for(var i=!1,s=Ka;s!==null;){if(e!==0){var c=s.pendingLanes;if(c===0)var d=0;else{var v=s.suspendedLanes,w=s.pingedLanes;d=(1<<31-dn(42|e)+1)-1,d&=c&~(v&~w),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(i=!0,Cg(s,d))}else d=Ye,d=Ml(s,s===mt?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(d&3)===0||Ci(s,d)||(i=!0,Cg(s,d));s=s.next}while(i);jf=!1}}function Cx(){Eg()}function Eg(){Bu=Nf=!1;var e=0;Sl!==0&&Ux()&&(e=Sl);for(var t=Ct(),i=null,s=Ka;s!==null;){var c=s.next,d=Tg(s,t);d===0?(s.next=null,i===null?Ka=c:i.next=c,c===null&&(Ja=i)):(i=s,(e!==0||(d&3)!==0)&&(Bu=!0)),s=c}Tt!==0&&Tt!==5||Yr(e),Sl!==0&&(Sl=0)}function Tg(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var v=31-dn(d),w=1<<v,N=c[v];N===-1?((w&i)===0||(w&s)!==0)&&(c[v]=Es(w,t)):N<=t&&(e.expiredLanes|=w),d&=~w}if(t=mt,i=Ye,i=Ml(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(st===2||st===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&At(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ci(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&At(s),or(i)){case 2:case 8:i=bt;break;case 32:i=Ti;break;case 268435456:i=zl;break;default:i=Ti}return s=Ag.bind(null,e),i=on(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&At(s),e.callbackPriority=2,e.callbackNode=null,2}function Ag(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Lu()&&e.callbackNode!==i)return null;var s=Ye;return s=Ml(e,e===mt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(fg(e,s,t),Tg(e,Ct()),e.callbackNode!=null&&e.callbackNode===i?Ag.bind(null,e):null)}function Cg(e,t){if(Lu())return null;fg(e,t,!0)}function Nx(){Ix(function(){(nt&6)!==0?on(Mn,Cx):Eg()})}function Of(){if(Sl===0){var e=Zl;e===0&&(e=ql,ql<<=1,(ql&261888)===0&&(ql=256)),Sl=e}return Sl}function Ng(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:K(e)}function jx(e,t,i,s,c){if(t==="submit"&&i&&i.stateNode===c){var d=Ng((c[an]||null).action),v=s.submitter;v&&(t=(t=v[an]||null)?Ng(t.formAction):v.getAttribute("formAction"),t!==null&&(d=t,v=null));var w=new Bs("action","action",null,s,c);e.push({event:w,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Sl!==0){var N=new FormData(c,v);Lc(i,{pending:!0,data:N,method:c.method,action:d},null,N)}}else typeof d=="function"&&(w.preventDefault(),N=new FormData(c,v),Lc(i,{pending:!0,data:N,method:c.method,action:d},d,N))},currentTarget:c}]})}}for(var _f=0;_f<tc.length;_f++){var zf=tc[_f],Ox=zf.toLowerCase(),_x=zf[0].toUpperCase()+zf.slice(1);Wn(Ox,"on"+_x)}Wn(ep,"onAnimationEnd"),Wn(tp,"onAnimationIteration"),Wn(np,"onAnimationStart"),Wn("dblclick","onDoubleClick"),Wn("focusin","onFocus"),Wn("focusout","onBlur"),Wn(H1,"onTransitionRun"),Wn(I1,"onTransitionStart"),Wn(V1,"onTransitionCancel"),Wn(ip,"onTransitionEnd"),el("onMouseEnter",["mouseout","mouseover"]),el("onMouseLeave",["mouseout","mouseover"]),el("onPointerEnter",["pointerout","pointerover"]),el("onPointerLeave",["pointerout","pointerover"]),Jn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gr="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(" "),zx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gr));function jg(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],c=s.event;s=s.listeners;e:{var d=void 0;if(t)for(var v=s.length-1;0<=v;v--){var w=s[v],N=w.instance,U=w.currentTarget;if(w=w.listener,N!==d&&c.isPropagationStopped())break e;d=w,c.currentTarget=U;try{d(c)}catch(G){Is(G)}c.currentTarget=null,d=N}else for(v=0;v<s.length;v++){if(w=s[v],N=w.instance,U=w.currentTarget,w=w.listener,N!==d&&c.isPropagationStopped())break e;d=w,c.currentTarget=U;try{d(c)}catch(G){Is(G)}c.currentTarget=null,d=N}}}}function Ie(e,t){var i=t[Cs];i===void 0&&(i=t[Cs]=new Set);var s=e+"__bubble";i.has(s)||(Og(t,e,2,!1),i.add(s))}function qf(e,t,i){var s=0;t&&(s|=4),Og(i,e,s,t)}var Uu="_reactListening"+Math.random().toString(36).slice(2);function Rf(e){if(!e[Uu]){e[Uu]=!0,fr.forEach(function(i){i!=="selectionchange"&&(zx.has(i)||qf(i,!1,e),qf(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Uu]||(t[Uu]=!0,qf("selectionchange",!1,t))}}function Og(e,t,i,s){switch(by(t)){case 2:var c=ES;break;case 8:c=TS;break;default:c=ed}i=c.bind(null,t,i,e),c=void 0,!Ln||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),s?c!==void 0?e.addEventListener(t,i,{capture:!0,passive:c}):e.addEventListener(t,i,!0):c!==void 0?e.addEventListener(t,i,{passive:c}):e.addEventListener(t,i,!1)}function Mf(e,t,i,s,c){var d=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var w=s.stateNode.containerInfo;if(w===c)break;if(v===4)for(v=s.return;v!==null;){var N=v.tag;if((N===3||N===4)&&v.stateNode.containerInfo===c)return;v=v.return}for(;w!==null;){if(v=Zn(w),v===null)return;if(N=v.tag,N===5||N===6||N===26||N===27){s=d=v;continue e}w=w.parentNode}}s=s.return}pt(function(){var U=d,G=be(i),$=[];e:{var L=lp.get(e);if(L!==void 0){var Y=Bs,ce=e;switch(e){case"keypress":if(Ds(i)===0)break e;case"keydown":case"keyup":Y=g1;break;case"focusin":ce="focus",Y=Qo;break;case"focusout":ce="blur",Y=Qo;break;case"beforeblur":case"afterblur":Y=Qo;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":Y=qh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=l1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=S1;break;case ep:case tp:case np:Y=s1;break;case ip:Y=k1;break;case"scroll":case"scrollend":Y=n1;break;case"wheel":Y=T1;break;case"copy":case"cut":case"paste":Y=o1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Mh;break;case"submit":Y=b1;break;case"toggle":case"beforetoggle":Y=C1}var ve=(t&4)!==0,De=!ve&&(e==="scroll"||e==="scrollend"),B=ve?L!==null?L+"Capture":null:L;ve=[];for(var R=U,I;R!==null;){var J=R;if(I=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||I===null||B===null||(J=ct(R,B),J!=null&&ve.push(Qr(R,J,I))),De)break;R=R.return}0<ve.length&&(L=new Y(L,ce,null,i,G),$.push({event:L,listeners:ve}))}}if((t&7)===0){e:{if(Y=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",Y&&i!==Ne&&(ce=i.relatedTarget||i.fromElement)&&(Zn(ce)||ce[Ji]))break e;(L||Y)&&(ce=G.window===G?G:(Y=G.ownerDocument)?Y.defaultView||Y.parentWindow:window,L?(Y=i.relatedTarget||i.toElement,L=U,Y=Y?Zn(Y):null,Y!==null&&(De=o(Y),ve=Y.tag,Y!==De||ve!==5&&ve!==27&&ve!==6)&&(Y=null)):(L=null,Y=U),L!==Y&&(ve=qh,J="onMouseLeave",B="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(ve=Mh,J="onPointerLeave",B="onPointerEnter",R="pointer"),De=L==null?ce:Wi(L),I=Y==null?ce:Wi(Y),ce=new ve(J,R+"leave",L,i,G),ce.target=De,ce.relatedTarget=I,J=null,Zn(G)===U&&(ve=new ve(B,R+"enter",Y,i,G),ve.target=I,ve.relatedTarget=De,J=ve),De=J,ve=L&&Y?O(L,Y,qx):null,L!==null&&_g($,ce,L,ve,!1),Y!==null&&De!==null&&_g($,De,Y,ve,!0)))}e:{if(L=U?Wi(U):window,Y=L.nodeName&&L.nodeName.toLowerCase(),Y==="select"||Y==="input"&&L.type==="file")var pe=Yh;else if(Ih(L))if(Gh)pe=L1;else{pe=M1;var Ge=R1}else Y=L.nodeName,!Y||Y.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?U&&wa(U.elementType)&&(pe=Yh):pe=D1;if(pe&&(pe=pe(e,U))){Vh($,pe,i,G);break e}Ge&&Ge(e,L,U)}switch(Ge=U?Wi(U):window,e){case"focusin":(Ih(Ge)||Ge.contentEditable==="true")&&(Ea=Ge,Po=U,xr=null);break;case"focusout":xr=Po=Ea=null;break;case"mousedown":Wo=!0;break;case"contextmenu":case"mouseup":case"dragend":Wo=!1,Ph($,i,G);break;case"selectionchange":if(U1)break;case"keydown":case"keyup":Ph($,i,G)}var Se;if(Xo)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else ka?Uh(e,i)&&(je="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(je="onCompositionStart");je&&(Dh&&i.locale!=="ko"&&(ka||je!=="onCompositionStart"?je==="onCompositionEnd"&&ka&&(Se=_h()):(nl=G,Vo="value"in nl?nl.value:nl.textContent,ka=!0)),Ge=Hu(U,je),0<Ge.length&&(je=new Rh(je,e,null,i,G),$.push({event:je,listeners:Ge}),Se?je.data=Se:(Se=Hh(i),Se!==null&&(je.data=Se)))),(Se=j1?O1(e,i):_1(e,i))&&(je=Hu(U,"onBeforeInput"),0<je.length&&(Ge=new Rh("onBeforeInput","beforeinput",null,i,G),$.push({event:Ge,listeners:je}),Ge.data=Se)),jx($,e,U,i,G)}jg($,t)})}function Qr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Hu(e,t){for(var i=t+"Capture",s=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=ct(e,i),c!=null&&s.unshift(Qr(e,c,d)),c=ct(e,t),c!=null&&s.push(Qr(e,c,d))),e.tag===3)return s;e=e.return}return[]}function qx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function _g(e,t,i,s,c){for(var d=t._reactName,v=[];i!==null&&i!==s;){var w=i,N=w.alternate,U=w.stateNode;if(w=w.tag,N!==null&&N===s)break;w!==5&&w!==26&&w!==27||U===null||(N=U,c?(U=ct(i,d),U!=null&&v.unshift(Qr(i,U,N))):c||(U=ct(i,d),U!=null&&v.push(Qr(i,U,N)))),i=i.return}v.length!==0&&e.push({event:t,listeners:v})}var Rx=/\r\n?/g,Mx=/\u0000|\uFFFD/g;function zg(e){return(typeof e=="string"?e:""+e).replace(Rx,`
9
+ `).replace(Mx,"")}function qg(e,t){return t=zg(t),zg(e)===t}function ot(e,t,i,s,c,d){switch(i){case"children":if(typeof s=="string")t==="body"||t==="textarea"&&s===""||Dn(e,s);else if(typeof s=="number"||typeof s=="bigint")t!=="body"&&Dn(e,""+s);else return;break;case"className":Ul(e,"class",s);break;case"tabIndex":Ul(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Ul(e,i,s);break;case"style":Rs(e,s,d);return;case"data":if(t!=="object"){Ul(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=K(s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="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 d=="function"&&(i==="formAction"?(t!=="input"&&ot(e,t,"name",c.name,c,null),ot(e,t,"formEncType",c.formEncType,c,null),ot(e,t,"formMethod",c.formMethod,c,null),ot(e,t,"formTarget",c.formTarget,c,null)):(ot(e,t,"encType",c.encType,c,null),ot(e,t,"method",c.method,c,null),ot(e,t,"target",c.target,c,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=K(s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=oe);return;case"onScroll":s!=null&&Ie("scroll",e);return;case"onScrollEnd":s!=null&&Ie("scrollend",e);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(i=s.__html,i!=null){if(c.children!=null)throw Error(r(60));d?.__html!==i&&(e.innerHTML=i)}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=K(s),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":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":Ie("beforetoggle",e),Ie("toggle",e),tl(e,"popover",s);break;case"xlinkActuate":Pn(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Pn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Pn(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Pn(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Pn(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Pn(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":tl(e,"is",s);break;case"innerText":case"textContent":return;default:if(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")i=A.get(i)||i,tl(e,i,s);else return}Ve=!0}function Df(e,t,i,s,c,d){switch(i){case"style":Rs(e,s,d);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(i=s.__html,i!=null){if(c.children!=null)throw Error(r(60));d?.__html!==i&&(e.innerHTML=i)}}break;case"children":if(typeof s=="string")Dn(e,s);else if(typeof s=="number"||typeof s=="bigint")Dn(e,""+s);else return;break;case"onScroll":s!=null&&Ie("scroll",e);return;case"onScrollEnd":s!=null&&Ie("scrollend",e);return;case"onClick":s!=null&&(e.onclick=oe);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Kn.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(c=i.endsWith("Capture"),d=i.slice(2,c?i.length-7:void 0),t=e[an]||null,t=t!=null?t[i]:null,typeof t=="function"&&e.removeEventListener(d,t,c),typeof s=="function")){typeof t!="function"&&t!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(d,s,c);break e}Ve=!0,i in e?e[i]=s:s===!0?e.setAttribute(i,""):tl(e,i,s)}return}Ve=!0}function en(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",e),Ie("load",e);var s=!1,c=!1,d;for(d in i)if(i.hasOwnProperty(d)){var v=i[d];if(v!=null)switch(d){case"src":s=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ot(e,t,d,v,i,null)}}c&&ot(e,t,"srcSet",i.srcSet,i,null),s&&ot(e,t,"src",i.src,i,null);return;case"input":Ie("invalid",e);var w=d=v=c=null,N=null,U=null;for(s in i)if(i.hasOwnProperty(s)){var G=i[s];if(G!=null)switch(s){case"name":c=G;break;case"type":v=G;break;case"checked":N=G;break;case"defaultChecked":U=G;break;case"value":d=G;break;case"defaultValue":w=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,t));break;default:ot(e,t,s,G,i,null)}}_s(e,d,w,N,U,v,c,!1);return;case"select":Ie("invalid",e),s=v=d=null;for(c in i)if(i.hasOwnProperty(c)&&(w=i[c],w!=null))switch(c){case"value":d=w;break;case"defaultValue":v=w;break;case"multiple":s=w;default:ot(e,t,c,w,i,null)}t=d,i=v,e.multiple=!!s,t!=null?zi(e,!!s,t,!1):i!=null&&zi(e,!!s,i,!0);return;case"textarea":Ie("invalid",e),d=c=s=null;for(v in i)if(i.hasOwnProperty(v)&&(w=i[v],w!=null))switch(v){case"value":s=w;break;case"defaultValue":c=w;break;case"children":d=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:ot(e,t,v,w,i,null)}qs(e,s,c,d);return;case"option":for(N in i)i.hasOwnProperty(N)&&(s=i[N],s!=null)&&(N==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":ot(e,t,N,s,i,null));return;case"dialog":Ie("beforetoggle",e),Ie("toggle",e),Ie("cancel",e),Ie("close",e);break;case"iframe":case"object":Ie("load",e);break;case"video":case"audio":for(s=0;s<Gr.length;s++)Ie(Gr[s],e);break;case"image":Ie("error",e),Ie("load",e);break;case"details":Ie("toggle",e);break;case"embed":case"source":case"link":Ie("error",e),Ie("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in i)if(i.hasOwnProperty(U)&&(s=i[U],s!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:ot(e,t,U,s,i,null)}return;default:if(wa(t)){for(G in i)i.hasOwnProperty(G)&&(s=i[G],s!==void 0&&Df(e,t,G,s,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(s=i[w],s!=null&&ot(e,t,w,s,i,null))}var Dx={};function Lx(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,v=null,w=null,N=null,U=null,G=null;for(Y in i){var $=i[Y];if(i.hasOwnProperty(Y)&&$!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":N=$;default:s.hasOwnProperty(Y)||ot(e,t,Y,null,s,$)}}for(var L in s){var Y=s[L];if($=i[L],s.hasOwnProperty(L)&&(Y!=null||$!=null))switch(L){case"type":Y!==$&&(Ve=!0),d=Y;break;case"name":Y!==$&&(Ve=!0),c=Y;break;case"checked":Y!==$&&(Ve=!0),U=Y;break;case"defaultChecked":Y!==$&&(Ve=!0),G=Y;break;case"value":Y!==$&&(Ve=!0),v=Y;break;case"defaultValue":Y!==$&&(Ve=!0),w=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(137,t));break;default:Y!==$&&ot(e,t,L,Y,s,$)}}xa(e,v,w,N,U,G,d,c);return;case"select":Y=v=w=L=null;for(d in i)if(N=i[d],i.hasOwnProperty(d)&&N!=null)switch(d){case"value":break;case"multiple":Y=N;default:s.hasOwnProperty(d)||ot(e,t,d,null,s,N)}for(c in s)if(d=s[c],N=i[c],s.hasOwnProperty(c)&&(d!=null||N!=null))switch(c){case"value":d!==N&&(Ve=!0),L=d;break;case"defaultValue":d!==N&&(Ve=!0),w=d;break;case"multiple":d!==N&&(Ve=!0),v=d;default:d!==N&&ot(e,t,c,d,s,N)}t=w,i=v,s=Y,L!=null?zi(e,!!i,L,!1):!!s!=!!i&&(t!=null?zi(e,!!i,t,!0):zi(e,!!i,i?[]:"",!1));return;case"textarea":Y=L=null;for(w in i)if(c=i[w],i.hasOwnProperty(w)&&c!=null&&!s.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:ot(e,t,w,null,s,c)}for(v in s)if(c=s[v],d=i[v],s.hasOwnProperty(v)&&(c!=null||d!=null))switch(v){case"value":c!==d&&(Ve=!0),L=c;break;case"defaultValue":c!==d&&(Ve=!0),Y=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==d&&ot(e,t,v,c,s,d)}zs(e,L,Y);return;case"option":for(var ce in i)L=i[ce],i.hasOwnProperty(ce)&&L!=null&&!s.hasOwnProperty(ce)&&(ce==="selected"?e.selected=!1:ot(e,t,ce,null,s,L));for(N in s)L=s[N],Y=i[N],s.hasOwnProperty(N)&&L!==Y&&(L!=null||Y!=null)&&(N==="selected"?(L!==Y&&(Ve=!0),e.selected=L&&typeof L!="function"&&typeof L!="symbol"):ot(e,t,N,L,s,Y));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 ve in i)L=i[ve],i.hasOwnProperty(ve)&&L!=null&&!s.hasOwnProperty(ve)&&ot(e,t,ve,null,s,L);for(U in s)if(L=s[U],Y=i[U],s.hasOwnProperty(U)&&L!==Y&&(L!=null||Y!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(137,t));break;default:ot(e,t,U,L,s,Y)}return;default:if(wa(t)){for(var De in i)L=i[De],i.hasOwnProperty(De)&&L!==void 0&&!s.hasOwnProperty(De)&&Df(e,t,De,void 0,s,L);for(G in s)L=s[G],Y=i[G],!s.hasOwnProperty(G)||L===Y||L===void 0&&Y===void 0||Df(e,t,G,L,s,Y);return}}for(var B in i)L=i[B],i.hasOwnProperty(B)&&L!=null&&!s.hasOwnProperty(B)&&ot(e,t,B,null,s,L);for($ in s)L=s[$],Y=i[$],!s.hasOwnProperty($)||L===Y||L==null&&Y==null||ot(e,t,$,L,s,Y)}function Rg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Bx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var c=i[s],d=c.transferSize,v=c.initiatorType,w=c.duration;if(d&&w&&Rg(v)){for(v=0,w=c.responseEnd,s+=1;s<i.length;s++){var N=i[s],U=N.startTime;if(U>w)break;var G=N.transferSize,$=N.initiatorType;G&&Rg($)&&(N=N.responseEnd,v+=G*(N<w?1:(w-U)/(N-U)))}if(--s,t+=8*(d+v)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Lf=null,Bf=null;function Fr(e){return e.nodeType===9?e:e.ownerDocument}function Mg(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 Dg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Lg(e,t,i,s){return i=Fr(i).createElement(e),i[Nt]=s,i[an]=t,en(i,e,t),Rt(i),i}function Uf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Hf=null;function Ux(){var e=window.event;return e&&e.type==="popstate"?e===Hf?!1:(Hf=e,!0):(Hf=null,!1)}var If=typeof setTimeout=="function"?setTimeout:void 0,Hx=typeof clearTimeout=="function"?clearTimeout:void 0,Bg=typeof Promise=="function"?Promise:void 0,Ug=typeof requestAnimationFrame=="function"?requestAnimationFrame:If,Ix=typeof queueMicrotask=="function"?queueMicrotask:typeof Bg<"u"?function(e){return Bg.resolve(null).then(e).catch(Vx)}:If;function Vx(e){setTimeout(function(){throw e})}function wl(e){return e==="head"}function Hg(e,t){var i=t,s=0;do{var c=i.nextSibling;if(e.removeChild(i),c&&c.nodeType===8)if(i=c.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(c),ir(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Kf(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Kf(i);for(var d=i.firstChild;d;){var v=d.nextSibling,w=d.nodeName;d[Pi]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&d.rel.toLowerCase()==="stylesheet"||i.removeChild(d),d=v}}else i==="body"&&Kf(e.ownerDocument.body);i=c}while(i);ir(t)}function Ig(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function Vg(e,t,i){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,i!=null&&(e.style.viewTransitionClass=i),i=getComputedStyle(e),i.display==="inline"){if(t=e.getClientRects(),t.length===1)var s=1;else for(var c=s=0;c<t.length;c++){var d=t[c];0<d.width&&0<d.height&&s++}s===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+i.paddingTop,e.marginBottom="-"+i.paddingBottom)}}function Yg(e,t){e=e.style,t=t.style;var i=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=i==null||typeof i=="boolean"?"":(""+i).trim(),i=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=i==null||typeof i=="boolean"?"":(""+i).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(i=t.display,e.display=i==null||typeof i=="boolean"?"":i,i=t.margin,i!=null?e.margin=i:(i=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=i==null||typeof i=="boolean"?"":i,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function Yx(e,t,i){return i=i.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=i.innerHeight&&e.left<=i.innerWidth}}function Vf(e){var t=e.getBoundingClientRect(),i=getComputedStyle(e);return Yx(t,i,e)}function Gx(e){return e.documentElement.clientHeight}function Qx(e){this.addEventListener("load",e),this.addEventListener("error",e)}function Fx(e,t,i,s,c,d,v,w,N){var U=t.nodeType===9?t:t.ownerDocument;try{var G=U.startViewTransition({update:function(){var L=U.defaultView,Y=L.navigation&&L.navigation.transition,ce=U.fonts.status;s();var ve=[];if(ce==="loaded"&&(Gx(U),U.fonts.status==="loading"&&ve.push(U.fonts.ready)),ce=ve.length,e!==null)for(var De=e.suspenseyImages,B=0,R=0;R<De.length;R++){var I=De[R];if(!I.complete){var J=I.getBoundingClientRect();if(0<J.bottom&&0<J.right&&J.top<L.innerHeight&&J.left<L.innerWidth){if(B+=cy(I),B>Yu){ve.length=ce;break}I=new Promise(Qx.bind(I)),ve.push(I)}}}if(0<ve.length)return L=Promise.race([Promise.all(ve),new Promise(function(pe){return setTimeout(pe,500)})]).then(c,c),(Y?Promise.allSettled([Y.finished,L]):L).then(d,d);if(c(),Y)return Y.finished.then(d,d);d()},types:i});U.__reactViewTransition=G;var $=[];return G.ready.then(function(){for(var L=U.documentElement.getAnimations({subtree:!0}),Y=0;Y<L.length;Y++){var ce=L[Y],ve=ce.effect,De=ve.pseudoElement;if(De!=null&&De.startsWith("::view-transition")){$.push(ce),ce=ve.getKeyframes();for(var B=De=void 0,R=!0,I=0;I<ce.length;I++){var J=ce[I],pe=J.width;if(De===void 0)De=pe;else if(De!==pe){R=!1;break}if(pe=J.height,B===void 0)B=pe;else if(B!==pe){R=!1;break}delete J.width,delete J.height,J.transform==="none"&&delete J.transform}R&&De!==void 0&&B!==void 0&&(ve.setKeyframes(ce),R=getComputedStyle(ve.target,ve.pseudoElement),R.width!==De||R.height!==B)&&(R=ce[0],R.width=De,R.height=B,R=ce[ce.length-1],R.width=De,R.height=B,ve.setKeyframes(ce))}}v()},function(L){U.__reactViewTransition===G&&(U.__reactViewTransition=null);try{typeof L=="object"&&L!==null&&L.name==="InvalidStateError"&&(L.message==="View transition was skipped because document visibility state is hidden."||L.message==="Skipping view transition because document visibility state has become hidden."||L.message==="Skipping view transition because viewport size changed."||L.message==="Transition was aborted because of invalid state")&&(L=null),L!==null&&N(L)}finally{s(),c(),v()}}),G.finished.finally(function(){for(var L=0;L<$.length;L++)$[L].cancel();U.__reactViewTransition===G&&(U.__reactViewTransition=null),w()}),G}catch{return s(),c(),v(),null}}function aa(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}aa.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:F({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},aa.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,i=e.getAnimations({subtree:!0}),s=[],c=0;c<i.length;c++){var d=i[c].effect;d!==null&&d.target===e&&d.pseudoElement===t&&s.push(i[c])}return s},aa.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Gg(e){return{name:e,group:new aa("group",e),imagePair:new aa("image-pair",e),old:new aa("old",e),new:new aa("new",e)}}function zn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}zn.prototype.addEventListener=function(e,t,i){var s=null,c=null;if(!(i!=null&&typeof i!="boolean"&&(s=i.signal||null,s!==null&&s.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var d=this._eventListeners;if(Fg(d,e,t,i)===-1){var v=this,w=t;i!=null&&typeof i!="boolean"&&i.once===!0&&(w=function(N){v.removeEventListener(e,t,i),typeof t=="function"?t.call(this,N):t.handleEvent(N)}),s!==null&&(c=v.removeEventListener.bind(v,e,t,i),s.addEventListener("abort",c,{once:!0}),c=s.removeEventListener.bind(s,"abort",c)),s=$a(i),d.push({type:e,listener:t,optionsOrUseCapture:i,attachedListener:w,cleanup:c}),m(this._fragmentFiber.child,!1,Xx,e,w,s)}this._eventListeners=d}};function Xx(e,t,i,s){return C(e).addEventListener(t,i,s),!1}zn.prototype.removeEventListener=function(e,t,i){var s=this._eventListeners;if(s!==null&&(t=Fg(s,e,t,i),t!==-1)){var c=s[t];i=c.attachedListener;var d=c.cleanup;c=$a(c.optionsOrUseCapture),m(this._fragmentFiber.child,!1,Zx,e,i,c),s.splice(t,1),d!==null&&d()}};function Zx(e,t,i,s){return C(e).removeEventListener(t,i,s),!1}function $a(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Qg(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function Fg(e,t,i,s){if(e.length===0)return-1;s=Qg(s);for(var c=0;c<e.length;c++){var d=e[c];if(d.type===t&&d.listener===i&&Qg(d.optionsOrUseCapture)===s)return c}return-1}zn.prototype.dispatchEvent=function(e){var t=S(this._fragmentFiber);if(t===null)return!0;t=C(t);var i=this._eventListeners;if(i!==null&&0<i.length||!e.bubbles){var s=t.nodeType===9?t.createComment(""):document.createTextNode("");if(i)for(var c=0;c<i.length;c++){var d=i[c];s.addEventListener(d.type,d.attachedListener,$a(d.optionsOrUseCapture))}if(t.appendChild(s),e=s.dispatchEvent(e),i)for(c=0;c<i.length;c++)d=i[c],s.removeEventListener(d.type,d.attachedListener,$a(d.optionsOrUseCapture));return t.removeChild(s),e}return t.dispatchEvent(e)},zn.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Xg,e,void 0,void 0)};function Xg(e,t){return e.tag===6?!1:(e=C(e),rS(e,t))}zn.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Yf,t,void 0,void 0);for(var i=t.length-1;0<=i&&!Xg(t[i],e);i--);};function Yf(e,t){return t.push(e),!1}zn.prototype.blur=function(){var e=S(this._fragmentFiber);e!==null&&(e=C(e),e=Fr(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Kx,e,void 0,void 0))};function Kx(e,t){return e.tag===6?!1:(e=C(e),e===t||e.contains(t)?(t.blur(),!0):!1)}zn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,Jx,e,void 0,void 0)};function Jx(e,t){return e.tag===6||(e=C(e),t.observe(e)),!1}zn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,$x,e,void 0,void 0);for(var i=t=0;i<li.length;i++){var s=li[i];s.fragmentInstance===this&&s.observer===e?e.unobserve(s.instance):li[t++]=s}li.length=t}};function $x(e,t){return e.tag===6||(e=C(e),t.unobserve(e)),!1}var li=[],Gf=!1;function Px(e,t,i){li.push({fragmentInstance:e,observer:t,instance:i}),Gf||(Gf=!0,sS(function(){Gf=!1;var s=li;li=[];for(var c=0;c<s.length;c++){var d=s[c];d.observer.unobserve(d.instance)}}))}zn.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,Wx,e,void 0,void 0),e};function Wx(e,t){if(e.tag===6){e=e.stateNode;var i=e.ownerDocument.createRange();i.selectNodeContents(e),t.push.apply(t,i.getClientRects())}else e=C(e),t.push.apply(t,e.getClientRects());return!1}zn.prototype.getRootNode=function(e){var t=S(this._fragmentFiber);return t===null?this:C(t).getRootNode(e)},zn.prototype.compareDocumentPosition=function(e){var t=S(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var i=[];m(this._fragmentFiber.child,!1,Yf,i,void 0,void 0);var s=C(t);if(i.length===0){if(i=s,x(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(i=t)}t=this._fragmentFiber;var c=s=i.compareDocumentPosition(e);return i===e?c=Node.DOCUMENT_POSITION_CONTAINS:s&Node.DOCUMENT_POSITION_CONTAINED_BY&&(i=k(t)[1],i===null?c=Node.DOCUMENT_POSITION_PRECEDING:(e=C(i).compareDocumentPosition(e),c=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),c|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=C(i[0]),c=C(i[i.length-1]);var d=x(this._fragmentFiber)?t.parentElement:s;if(d==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=d.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,d=d.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_CONTAINED_BY;var v=t.compareDocumentPosition(e),w=c.compareDocumentPosition(e),N=v&Node.DOCUMENT_POSITION_CONTAINED_BY||w&Node.DOCUMENT_POSITION_CONTAINED_BY;return w=s&&d&&v&Node.DOCUMENT_POSITION_FOLLOWING&&w&Node.DOCUMENT_POSITION_PRECEDING,t=s&&t===e||d&&c===e||N||w?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&t===e||!d&&c===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:v,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||eS(t,this._fragmentFiber,i[0],i[i.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function eS(e,t,i,s,c){var d=Zn(c);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(i=!!d)e:{for(;d!==null;){if(d.tag===7&&(d===t||d.alternate===t)){i=!0;break e}d=d.return}i=!1}return i}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(d===null)return d=c.ownerDocument,c===d||c===d.documentElement||c===d.body;e:{for(d=t,t=S(t);d!==null;){if(!(d.tag!==5&&d.tag!==3&&d.tag!==27||d!==t&&d.alternate!==t)){d=!0;break e}d=d.return}d=!1}return d}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!d)&&!(t=d===i)&&(t=O(i,d,ne),t===null?t=!1:(m(t,!0,H,d,i),d=E,E=null,t=d!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!d)&&!(t=d===s)&&(t=O(s,d,ne),t===null?t=!1:(m(t,!0,W,d,s),d=E,M=E=null,t=d!==null)),t):!1}function Zg(e,t){var i=e.ownerDocument.createRange();i.selectNodeContents(e),e=i.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}zn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(r(566));var t=[];m(this._fragmentFiber.child,!1,Yf,t,void 0,void 0);var i=e!==!1;if(t.length===0){var s=k(this._fragmentFiber);if(s=i?s[1]||s[0]||S(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){e=C(s),Zg(e,i);return}if(s=C(s),s.nodeType!==9){if(s.nodeType===11){i="host"in s?s.host:null,i!==null&&i.scrollIntoView(e);return}s.scrollIntoView(e)}}for(s=i?t.length-1:0;s!==(i?-1:t.length);){var c=t[s];c.tag===6?(c=C(c),Zg(c,i)):C(c).scrollIntoView(e),s+=i?-1:1}};function tS(e,t){return e=C(e),Kg(e,t),!1}function Kg(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function Jg(e,t){var i=t._eventListeners;if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];e.addEventListener(c.type,c.attachedListener,$a(c.optionsOrUseCapture))}e.nodeType!==3&&(i=t._observers,i!==null&&i.forEach(function(d){for(var v=0,w=0;w<li.length;w++){var N=li[w];(N.fragmentInstance!==t||N.observer!==d||N.instance!==e)&&(li[v++]=N)}li.length=v,d.observe(e)}),Kg(e,t))}function nS(e,t){var i=t._eventListeners;if(i!==null)for(var s=0;s<i.length;s++){var c=i[s];e.removeEventListener(c.type,c.attachedListener,$a(c.optionsOrUseCapture))}e.nodeType!==3&&(i=t._observers,i!==null&&i.forEach(function(d){typeof d.rootMargin=="string"?Px(t,d,e):d.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Qf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Qf(i),Ht(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function iS(e,t,i,s){for(;e.nodeType===1;){var c=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Pi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Gn(e.nextSibling),e===null)break}return null}function lS(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Gn(e.nextSibling),e===null))return null;return e}function $g(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Gn(e.nextSibling),e===null))return null;return e}function Ff(e){return e.data==="$?"||e.data==="$~"}function Xf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function aS(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Gn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Zf=null;function Pg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Gn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Wg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function rS(e,t){function i(){s=!0}if(e.ownerDocument.activeElement===e)return!0;var s=!1;try{e.ownerDocument.addEventListener("focus",i,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",i,!0)}return s}function sS(e){Ug(function(){Ug(function(t){return e(t)})})}function ey(e,t,i){switch(t=Fr(i),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function ty(e,t,i){for(var s in i){var c=i[s];i.hasOwnProperty(s)&&c!=null&&ot(e,t,s,null,Dx,c)}i.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===oe&&(e.onclick=null),Ht(e)}function Kf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ht(e)}var Qn=new Map,ny=new Set;function Xr(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Qi=de.d;de.d={f:uS,r:oS,D:cS,C:fS,L:dS,m:hS,X:mS,S:pS,M:gS};function uS(){var e=Qi.f(),t=Ru();return e||t}function oS(e){var t=Oi(e);t!==null&&t.tag===5&&t.type==="form"?lm(t):Qi.r(e)}var Pa=typeof document>"u"?null:document;function iy(e,t,i){var s=Pa;if(s&&typeof t=="string"&&t){var c=hn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof i=="string"&&(c+='[crossorigin="'+i+'"]'),ny.has(c)||(ny.add(c),e={rel:e,crossOrigin:i,href:t},s.querySelector(c)===null&&(t=s.createElement("link"),en(t,"link",e),Rt(t),s.head.appendChild(t)))}}function cS(e){Qi.D(e),iy("dns-prefetch",e,null)}function fS(e,t){Qi.C(e,t),iy("preconnect",e,t)}function dS(e,t,i){Qi.L(e,t,i);var s=Pa;if(s&&e&&t){var c='link[rel="preload"][as="'+hn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(c+='[imagesrcset="'+hn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(c+='[imagesizes="'+hn(i.imageSizes)+'"]')):c+='[href="'+hn(e)+'"]';var d=c;switch(t){case"style":d=Wa(e);break;case"script":d=er(e)}if(!(Qn.has(d)||(e=F({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Qn.set(d,e),s.querySelector(c)!==null||t==="style"&&s.querySelector(Zr(d))||t==="script"&&s.querySelector(Kr(d))))){var v=s.createElement("link");en(v,"link",e),t==="style"&&(v[ci]=!0,v.onload=v.onerror=function(){Uo(v)}),Rt(v),s.head.appendChild(v)}}}function hS(e,t){Qi.m(e,t);var i=Pa;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+hn(s)+'"][href="'+hn(e)+'"]',d=c;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=er(e)}if(!Qn.has(d)&&(e=F({rel:"modulepreload",href:e},t),Qn.set(d,e),i.querySelector(c)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Kr(d)))return}s=i.createElement("link"),en(s,"link",e),Rt(s),i.head.appendChild(s)}}}function pS(e,t,i){Qi.S(e,t,i);var s=Pa;if(s&&e){var c=_i(s).hoistableStyles,d=Wa(e);t=t||"default";var v=c.get(d);if(!v){var w={loading:0,preload:null};if(v=s.querySelector(Zr(d)))w.loading=5;else{e=F({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Qn.get(d))&&Jf(e,i);var N=v=s.createElement("link");Rt(N),en(N,"link",e),N._p=new Promise(function(U,G){N.onload=U,N.onerror=G}),N.addEventListener("load",function(){w.loading|=1}),N.addEventListener("error",function(){w.loading|=2}),w.loading|=4,Iu(v,t,s)}v={type:"stylesheet",instance:v,count:1,state:w},c.set(d,v)}}}function mS(e,t){Qi.X(e,t);var i=Pa;if(i&&e){var s=_i(i).hoistableScripts,c=er(e),d=s.get(c);d||(d=i.querySelector(Kr(c)),d||(e=F({src:e,async:!0},t),(t=Qn.get(c))&&$f(e,t),d=i.createElement("script"),Rt(d),en(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(c,d))}}function gS(e,t){Qi.M(e,t);var i=Pa;if(i&&e){var s=_i(i).hoistableScripts,c=er(e),d=s.get(c);d||(d=i.querySelector(Kr(c)),d||(e=F({src:e,async:!0,type:"module"},t),(t=Qn.get(c))&&$f(e,t),d=i.createElement("script"),Rt(d),en(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(c,d))}}function ly(e,t,i,s){var c=(c=wt.current)?Xr(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(i=Wa(i.href),t=_i(c).hoistableStyles,s=t.get(i),s||(s={type:"style",instance:null,count:0,state:null},t.set(i,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Wa(i.href);var d=_i(c).hoistableStyles,v=d.get(e);if(v||(c=c.ownerDocument||c,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,v),(d=c.querySelector(Zr(e)))?d._p||(v.instance=d,v.state.loading=5):(d=Qn.get(e),d||(d={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Qn.set(e,d)),yS(c,e,d,v.state))),t&&s===null)throw Error(r(528,""));return v}if(t&&s!==null)throw Error(r(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(i=er(i),t=_i(c).hoistableScripts,s=t.get(i),s||(s={type:"script",instance:null,count:0,state:null},t.set(i,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Wa(e){return'href="'+hn(e)+'"'}function Zr(e){return'link[rel="stylesheet"]['+e+"]"}function ay(e){return F({},e,{"data-precedence":e.precedence,precedence:null})}function yS(e,t,i,s){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[ci]!==!0){s.loading=1;return}}else t=e.createElement("link"),t[ci]=!0,t.onload=t.onerror=Uo.bind(null,t),en(t,"link",i),Rt(t),e.head.appendChild(t);s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2})}function er(e){return'[src="'+hn(e)+'"]'}function Kr(e){return"script[async]"+e}function ry(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+hn(i.href)+'"]');if(s)return t.instance=s,Rt(s),s;var c=F({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Rt(s),en(s,"style",c),Iu(s,i.precedence,e),t.instance=s;case"stylesheet":c=Wa(i.href);var d=e.querySelector(Zr(c));if(d)return t.state.loading|=4,t.instance=d,Rt(d),d;s=ay(i),(c=Qn.get(c))&&Jf(s,c),d=(e.ownerDocument||e).createElement("link"),Rt(d);var v=d;return v._p=new Promise(function(w,N){v.onload=w,v.onerror=N}),en(d,"link",s),t.state.loading|=4,Iu(d,i.precedence,e),t.instance=d;case"script":return d=er(i.src),(c=e.querySelector(Kr(d)))?(t.instance=c,Rt(c),c):(s=i,(c=Qn.get(d))&&(s=F({},i),$f(s,c)),e=e.ownerDocument||e,c=e.createElement("script"),Rt(c),en(c,"link",s),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Iu(s,i.precedence,e));return t.instance}function Iu(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=s.length?s[s.length-1]:null,d=c,v=0;v<s.length;v++){var w=s[v];if(w.dataset.precedence===t)d=w;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Jf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $f(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Vu=null;function sy(e,t,i){if(Vu===null){var s=new Map,c=Vu=new Map;c.set(i,s)}else c=Vu,s=c.get(i),s||(s=new Map,c.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),c=0;c<i.length;c++){var d=i[c];if(!(d[Pi]||d[Nt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(t)||"";v=e+v;var w=s.get(v);w?w.push(d):s.set(v,[d])}}return s}function Pf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function vS(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function uy(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function oy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function cy(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function fy(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=cy(t),e.suspenseyImages.push(t)),e=SS.bind(e),t.decode().then(e,e))}function bS(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var c=Wa(s.href),d=t.querySelector(Zr(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Jr.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=d,Rt(d);return}d=t.ownerDocument||t,s=ay(s),(c=Qn.get(c))&&Jf(s,c),d=d.createElement("link"),Rt(d);var v=d;v._p=new Promise(function(w,N){v.onload=w,v.onerror=N}),en(d,"link",s),i.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Jr.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Yu=0;function xS(e,t){return e.stylesheets&&e.count===0&&Qu(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&Qu(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Yu===0&&(Yu=62500*Bx());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qu(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Yu?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(c)}}:null}function dy(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Qu(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Jr(){this.count--,dy(this)}function SS(){this.imgCount--,dy(this)}var Gu=null;function Qu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Gu=new Map,t.forEach(wS,e),Gu=null,Jr.call(e))}function wS(e,t){if(!(t.state.loading&4)){var i=Gu.get(e);if(i)var s=i.get(null);else{i=new Map,Gu.set(e,i);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var v=c[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),s=v)}s&&i.set(null,s)}c=t.instance,v=c.getAttribute("data-precedence"),d=i.get(v)||s,d===s&&i.set(null,c),i.set(v,c),this.count++,s=Jr.bind(this),c.addEventListener("load",s),c.addEventListener("error",s),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var tr={$$typeof:le,Provider:null,Consumer:null,_currentValue:at,_currentValue2:at,_threadCount:0};function kS(e,t,i,s,c,d,v,w,N){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=Ki(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ki(0),this.hiddenUpdates=Ki(null),this.identifierPrefix=s,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.transitionTypes=null,this.incompleteTransitions=new Map}function hy(e,t,i,s,c,d,v,w,N,U,G,$){return e=new kS(e,t,i,v,N,U,G,$,w),t=1,d===!0&&(t|=24),d=vn(3,null,null,t),e.current=d,d.stateNode=e,t=dc(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:s,isDehydrated:i,cache:t},gc(d),e}function py(e){return e?(e=Ca,e):Ca}function my(e,t,i,s,c,d){c=py(c),s.context===null?s.context=c:s.pendingContext=c,s=cl(t),s.payload={element:i},d=d===void 0?null:d,d!==null&&(s.callback=d),i=fl(e,s,t),i!==null&&(wn(i,e,t),Cr(i,e,t))}function gy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Wf(e,t){gy(e,t),(e=e.alternate)&&gy(e,t)}function yy(e){if(e.tag===13||e.tag===31){var t=Vl(e,67108864);t!==null&&wn(t,e,67108864),Wf(e,67108864)}}function vy(e){if(e.tag===13||e.tag===31){var t=_n();t=Bl(t);var i=Vl(e,t);i!==null&&wn(i,e,t),Wf(e,t)}}var nr=!0;function ES(e,t,i,s){var c=P.T;P.T=null;var d=de.p;try{de.p=2,ed(e,t,i,s)}finally{de.p=d,P.T=c}}function TS(e,t,i,s){var c=P.T;P.T=null;var d=de.p;try{de.p=8,ed(e,t,i,s)}finally{de.p=d,P.T=c}}function ed(e,t,i,s){if(nr){var c=td(s);if(c===null)Mf(e,t,s,Fu,i),xy(e,s);else if(CS(c,e,t,i,s))s.stopPropagation();else if(xy(e,s),t&4&&-1<AS.indexOf(e)){for(;c!==null;){var d=Oi(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=Xn(d.pendingLanes);if(v!==0){var w=d;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var N=1<<31-dn(v);w.entanglements[1]|=N,v&=~N}Si(d),(nt&6)===0&&(_u=Ct()+500,Yr(0))}}break;case 31:case 13:w=Vl(d,2),w!==null&&wn(w,d,2),Ru(),Wf(d,2)}if(d=td(s),d===null&&Mf(e,t,s,Fu,i),d===c)break;c=d}c!==null&&s.stopPropagation()}else Mf(e,t,s,null,i)}}function td(e){return e=be(e),nd(e)}var Fu=null;function nd(e){if(Fu=null,e=Zn(e),e!==null){var t=o(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(t),e!==null)return e;e=null}else if(i===31){if(e=h(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Fu=e,null}function by(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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Kt()){case Mn:return 2;case bt:return 8;case Ti:case Ai:return 32;case zl:return 268435456;default:return 32}default:return 32}}var id=!1,kl=null,El=null,Tl=null,$r=new Map,Pr=new Map,Al=[],AS="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 xy(e,t){switch(e){case"focusin":case"focusout":kl=null;break;case"dragenter":case"dragleave":El=null;break;case"mouseover":case"mouseout":Tl=null;break;case"pointerover":case"pointerout":$r.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pr.delete(t.pointerId)}}function Wr(e,t,i,s,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:d,targetContainers:[c]},t!==null&&(t=Oi(t),t!==null&&yy(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function CS(e,t,i,s,c){switch(t){case"focusin":return kl=Wr(kl,e,t,i,s,c),!0;case"dragenter":return El=Wr(El,e,t,i,s,c),!0;case"mouseover":return Tl=Wr(Tl,e,t,i,s,c),!0;case"pointerover":var d=c.pointerId;return $r.set(d,Wr($r.get(d)||null,e,t,i,s,c)),!0;case"gotpointercapture":return d=c.pointerId,Pr.set(d,Wr(Pr.get(d)||null,e,t,i,s,c)),!0}return!1}function Sy(e){var t=Zn(e.target);if(t!==null){var i=o(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,As(e.priority,function(){vy(i)});return}}else if(t===31){if(t=h(i),t!==null){e.blockedOn=t,As(e.priority,function(){vy(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Xu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=td(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Ne=s,i.target.dispatchEvent(s),Ne=null}else return t=Oi(i),t!==null&&yy(t),e.blockedOn=i,!1;t.shift()}return!0}function wy(e,t,i){Xu(e)&&i.delete(t)}function NS(){id=!1,kl!==null&&Xu(kl)&&(kl=null),El!==null&&Xu(El)&&(El=null),Tl!==null&&Xu(Tl)&&(Tl=null),$r.forEach(wy),Pr.forEach(wy)}function Zu(e,t){e.blockedOn===t&&(e.blockedOn=null,id||(id=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,NS)))}var Ku=null;function ky(e){Ku!==e&&(Ku=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ku===e&&(Ku=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],c=e[t+2];if(typeof s!="function"){if(nd(s||i)===null)continue;break}var d=Oi(i);d!==null&&(e.splice(t,3),t-=3,Lc(d,{pending:!0,data:c,method:i.method,action:s},s,c))}}))}function ir(e){function t(N){return Zu(N,e)}kl!==null&&Zu(kl,e),El!==null&&Zu(El,e),Tl!==null&&Zu(Tl,e),$r.forEach(t),Pr.forEach(t);for(var i=0;i<Al.length;i++){var s=Al[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Al.length&&(i=Al[0],i.blockedOn===null);)Sy(i),i.blockedOn===null&&Al.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var c=i[s],d=i[s+1],v=c[an]||null;if(typeof d=="function")v||ky(i);else if(v){var w=null;if(d&&d.hasAttribute("formAction")){if(c=d,v=d[an]||null)w=v.formAction;else if(nd(c)!==null)continue}else w=v.action;typeof w=="function"?i[s+1]=w:(i.splice(s,3),s-=3),ky(i)}}}function Ey(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(v){return c=v})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function ld(e){this._internalRoot=e}Ju.prototype.render=ld.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var i=t.current,s=_n();my(i,s,e,t,null,null)},Ju.prototype.unmount=ld.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;my(e.current,2,null,e,null,null),Ru(),t[Ji]=null}};function Ju(e){this._internalRoot=e}Ju.prototype.unstable_scheduleHydration=function(e){if(e){var t=ji();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Al.length&&t!==0&&t<Al[i].priority;i++);Al.splice(i,0,e),i===0&&Sy(e)}};var Ty=l.version;if(Ty!=="19.3.1")throw Error(r(527,Ty,"19.3.1"));de.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=g(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var jS={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$u.isDisabled&&$u.supportsFiber)try{Xi=$u.inject(jS),fn=$u}catch{}}return ts.createRoot=function(e,t){if(!u(e))throw Error(r(299));var i=!1,s="",c=pm,d=mm,v=gm;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(v=t.onRecoverableError)),t=hy(e,1,!1,null,null,i,s,null,c,d,v,Ey),e[Ji]=t.current,Rf(e),new ld(t)},ts.hydrateRoot=function(e,t,i){if(!u(e))throw Error(r(299));var s=!1,c="",d=pm,v=mm,w=gm,N=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(N=i.formState)),t=hy(e,1,!0,t,i??null,s,c,N,d,v,w,Ey),t.context=py(null),i=t.current,s=_n(),s=Bl(s),c=cl(s),c.callback=null,fl(i,c,s),i=s,t.current.lanes=i,Ni(t,i),Si(t),e[Ji]=t.current,Rf(e),new Ju(t)},ts.version="19.3.1",ts}var My;function US(){if(My)return sd.exports;My=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),sd.exports=BS(),sd.exports}var HS=US();async function lt(n,l){const a=await fetch("/dsh-bot/api"+n,{...l,headers:{accept:"application/json",...l?.headers??{}}}),r=await a.json().catch(()=>({}));return{status:a.status,body:r&&typeof r=="object"?r:{}}}async function hs(n,l){const a=await fetch(n,{...l,headers:{accept:"application/json",...l?.headers??{}}}),r=await a.json().catch(()=>({}));return{status:a.status,body:r&&typeof r=="object"?r:{}}}function $v(n,l){return typeof n.message=="string"&&n.message!==""?n.message:l}const IS=/^(?:Name|名字)\s*[::]\s*(.+?)\s*$/i,VS=/^(?:Style|风格)\s*[::]\s*(.+?)\s*$/i,YS=/^(?:Task|任务)\s*[::]\s*(.+?)\s*$/i;function GS(n,l,a){const r=[];return n.trim()!==""&&r.push(`Name: ${n.trim()}`),l.trim()!==""&&r.push(`Style: ${l.trim()}`),a.trim()!==""&&r.push(`Task: ${a.trim()}`),r.join(`
10
+
11
+ `)}function QS(n){const l={name:"",style:"",task:""};for(const a of n.split(`
12
+ `)){const r=IS.exec(a),u=VS.exec(a),o=YS.exec(a);r&&l.name===""?l.name=r[1]??"":u&&l.style===""?l.style=u[1]??"":o&&l.task===""&&(l.task=o[1]??"")}return l}const FS={"activity.status.preparing":"Preparing call","activity.status.waiting":"Waiting for tool result","activity.status.running":"Running (confirmed)","activity.status.worker":"Waiting for Worker","activity.status.background":"Background job (last known)","activity.status.backgroundDetail":"Background job · last known state","activity.status.succeeded":"Completed","activity.status.failed":"Failed","activity.status.cancelled":"Cancelled","activity.status.unknown":"Outcome unknown","activity.ticket.scheduling":"Waiting for Worker scheduling","activity.ticket.needsUser":"Waiting for you","activity.ticket.ready":"Worker returned; awaiting review","activity.pendingCount":"{count} pending activities","activity.thinking":"Thinking","activity.reasoning":"Reasoning","activity.waitingModel":"Waiting for model response","activity.syncing":"Syncing","activity.connectionUnavailable":"Connection unavailable","activity.lastKnown":"last known","activity.lastKnownSuffix":" · last known","activity.staleSummary":"{phase} · last known: {text}","activity.count.active":"Active","activity.count.failed":"Failed","activity.count.cancelled":"Cancelled","activity.count.unknown":"Unknown","activity.title":"Activity","activity.titleOne":"1 action","activity.titleWithCount":"{count} actions","activity.resyncing":"Resyncing · last known state","activity.connectionLastKnown":"Connection unavailable · last known state","activity.generating":"Generating response; no new tool execution evidence","activity.runCommand":"Run command","activity.updatePlan":"Update plan","activity.planComplete":"complete (plan record)","activity.callRequested":"Call requested; process start not confirmed","activity.jobRegistered":"registered, not proof of completion or continued liveness","activity.latestReport":"Latest report","activity.cwdRecorded":"Recorded working directory","activity.cwdRequested":"Requested working directory","activity.cwdSessionDefault":"Session default directory (not execution confirmation)","activity.callRecorded":"Call recorded","activity.callWait":"Call wait","activity.fullArgs":"Full arguments (redacted)","activity.toolResult":"Tool result (redacted)","activity.emptyResult":"(empty result)"},XS={"activity.status.preparing":"准备调用","activity.status.waiting":"等待工具结果","activity.status.running":"执行中(已确认)","activity.status.worker":"等待 Worker","activity.status.background":"后台任务(最后已知)","activity.status.backgroundDetail":"后台任务 · 最后已知状态","activity.status.succeeded":"完成","activity.status.failed":"失败","activity.status.cancelled":"已取消","activity.status.unknown":"结果未知","activity.ticket.scheduling":"等待 Worker 调度","activity.ticket.needsUser":"等待用户","activity.ticket.ready":"Worker 已返回,待确认","activity.pendingCount":"{count} 项待完成活动","activity.thinking":"思考中","activity.reasoning":"思考记录","activity.waitingModel":"等待模型响应","activity.syncing":"正在同步","activity.connectionUnavailable":"连接不可用","activity.lastKnown":"最后已知","activity.lastKnownSuffix":" · 最后已知","activity.staleSummary":"{phase} · 最后已知: {text}","activity.count.active":"活动中","activity.count.failed":"失败","activity.count.cancelled":"取消","activity.count.unknown":"未知","activity.title":"活动","activity.titleOne":"1 个操作","activity.titleWithCount":"{count} 个操作","activity.resyncing":"正在恢复同步 · 最后已知状态","activity.connectionLastKnown":"连接不可用 · 最后已知状态","activity.generating":"正在生成回复;尚无新的工具执行证据","activity.runCommand":"执行命令","activity.updatePlan":"更新计划","activity.planComplete":"项完成(计划记录)","activity.callRequested":"已收到调用请求;尚无进程启动确认","activity.jobRegistered":"已登记,不代表完成或持续存活","activity.latestReport":"最新报告","activity.cwdRecorded":"执行记录目录","activity.cwdRequested":"请求目录","activity.cwdSessionDefault":"会话默认目录(非执行确认)","activity.callRecorded":"调用记录时间","activity.callWait":"调用等待耗时","activity.fullArgs":"完整参数(已脱敏)","activity.toolResult":"工具返回(已脱敏)","activity.emptyResult":"(空结果)"},Pv={en:FS,zh:XS},ZS={"bot.waiting":"Waiting","bot.running":"Running","bot.stopped":"Stopped","bot.stoppedBackground":"This turn stopped. Background work is still running.","bot.retry":"Retry","bot.thinking":"Thinking","bot.replying":"Replying","bot.processed":"Done","bot.untitled":"Untitled","inbox.received":"sent a message","inbox.open":"Open bot messages, {who}: {line}","inbox.lead":"These are the words bots sent each other. They do not include the other bot's persona, memory, or permissions.","inbox.empty":"No bot messages yet.","inbox.other":"another bot","inbox.sentTo":"Sent to {name}","inbox.hop":"Hop {hop}","inbox.source":"Source"},KS={"bot.waiting":"等待操作","bot.running":"运行中","bot.stopped":"已停下","bot.stoppedBackground":"这一轮已经停下。后台还在跑。","bot.retry":"重试","bot.thinking":"正在想","bot.replying":"正在回复","bot.processed":"已处理","bot.untitled":"未命名","inbox.received":"发来一条消息","inbox.open":"打开 BOT 消息,{who}:{line}","inbox.lead":"这里是 BOT 之间传来的正文,不带对方的人格、记忆或权限。","inbox.empty":"还没有 BOT 消息。","inbox.other":"另一个 BOT","inbox.sentTo":"发给 {name}","inbox.hop":"第 {hop} 跳","inbox.source":"来源"},Wv={en:ZS,zh:KS},JS={"app.title":"DSH Bot","lang.switch":"中文","nav.back":"Back","nav.sessions":"Sessions","nav.botMessages":"Bot messages","nav.official":"Official client","nav.where":"Session location","nav.mainSession":"Main session","nav.worker":"Worker session","nav.pick":"Pick a session on the left, or create one.","nav.empty":"This session has no messages yet.","load.messages":"Loading messages…","load.messagesPct":"Loading messages… {pct}%","load.aria":"Loading messages","file.close":"Close","file.loading":"Reading the file…","file.error":"This file could not be opened","file.truncated":"Only the first 2000 lines are shown.","turn.rail":"Turns","turn.jump":"Jump to item {index}","basis.plain":"Ordinary session","basis.facts":"{head} · {count} facts","health.up":"Runtime is reachable","health.down":"Runtime is unreachable","health.modelReady":"The model catalog is available. You can send.","health.loading":"Reading the model catalog.","health.noProvider":"No model provider is configured, so execution is off.","health.catalogUnreadable":"The model catalog could not be read.","health.usageReady":"The usage endpoint returned data.","health.usageOff":"Usage is not connected.","health.sameSession":"The official client is at the site root. This page is /dsh-bot/. It is the same session.","health.primaryUnready":"This process has not issued a session cookie yet.","health.primaryDown":"The runtime could not be reached.","health.usageMissing":"The usage plugin is not installed.","health.usageUpstream":"The usage upstream is unavailable.","health.sessionUnreadable":"Could not tell whether the session is still running."},$S={"app.title":"DSH Bot","lang.switch":"English","nav.back":"返回","nav.sessions":"会话","nav.botMessages":"BOT 消息","nav.official":"原生界面","nav.where":"会话位置","nav.mainSession":"主会话","nav.worker":"执行会话","nav.pick":"从左边选一个会话,或新建一个。","nav.empty":"这个会话还没有消息。","load.messages":"正在加载消息…","load.messagesPct":"正在加载消息… {pct}%","load.aria":"正在加载消息","file.close":"关闭","file.loading":"正在读取文件…","file.error":"无法打开此文件","file.truncated":"只显示了前 2000 行。","turn.rail":"回合","turn.jump":"跳到第 {index} 处","basis.plain":"普通会话","basis.facts":"{head} · {count} 条事实","health.up":"主运行时可达","health.down":"主运行时不可达","health.modelReady":"模型目录可用,可以发送。","health.loading":"正在读取模型目录。","health.noProvider":"未配置模型提供方,执行已禁用","health.catalogUnreadable":"无法读取模型目录。","health.usageReady":"用量接口已返回数据。","health.usageOff":"用量未接入","health.sameSession":"原生界面在站点根路径,这里是 /dsh-bot/。同一个会话。","health.primaryUnready":"主运行时尚未交出启动令牌","health.primaryDown":"主运行时不可达","health.usageMissing":"用量插件未接入","health.usageUpstream":"用量上游不可用","health.sessionUnreadable":"无法读取会话是否仍在运行"},eb={en:JS,zh:$S},PS={"composer.mention":"Mention a bot","composer.noBot":"No matching bot","composer.interrupt":"Sending interrupts this reply","composer.mentionHint":"Message, or type @ to mention another bot","composer.task":"Message, or describe a task","composer.pick":"Choose a session","composer.add":"Add a file or a command","composer.command":"Insert a command","composer.filesLater":"Attaching files is not available yet.","composer.cancel":"Cancel","composer.send":"Send","composer.notSent":"The task was not sent.","composer.supplyFailed":"Not sent."},WS={"composer.mention":"提及 BOT","composer.noBot":"没有匹配的 BOT","composer.interrupt":"发送会打断这一句","composer.mentionHint":"发消息,输入 @ 提及另一个 BOT","composer.task":"发消息,或描述一个任务","composer.pick":"选择一个会话","composer.add":"添加文件或调用指令","composer.command":"调用指令","composer.filesLater":"附带文件还不可用。","composer.cancel":"取消","composer.send":"发送","composer.notSent":"任务没有发送。","composer.supplyFailed":"没有送出。"},tb={en:PS,zh:WS},ew={"new.title":"New bot","new.close":"Close","new.lead":"The name shows in the list and is the bot's own name. Style and task become its persona.","new.name":"Bot name","new.style":"Bot style","new.task":"Bot task","new.namePlaceholder":"for example: Guide","new.stylePlaceholder":"for example: brief and direct","new.taskPlaceholder":"for example: turn the user's notes into short sentences","new.cancel":"Cancel","new.create":"Create","new.creating":"Creating","new.nameRequired":"Write this bot's name first.","new.created":'Created "{name}".',"new.createFailed":"Could not create the session.","new.personaFailed":"The session was created, but the persona was not applied.","session.search":"Search sessions","session.searchPlaceholder":"Search sessions","session.none":"No sessions yet.","session.noMatch":"No matching sessions.","session.running":"In progress","session.blank":"Blank","session.archived":"Archived","session.hide":"Hide","session.show":"Show","session.blankCount":"Blank sessions · {count}","session.archiveAll":"Archive all","session.purgeAll":"Delete all","session.archive":"Archive","session.purge":"Delete","session.archiveLabel":"Archive blank session {name}","session.purgeLabel":"Delete blank session {name}","session.archiveConfirm":"Archive {count} blank sessions? Sessions that already have messages stay. You can restore archived sessions from the official client.","session.purgeOneConfirm":'Delete "{name}" permanently? The log is removed from disk and cannot be restored from the archive.',"session.purgeAllConfirm":"Permanently delete {count} blank sessions? Logs are removed from disk and cannot be restored. Sessions that already have messages stay.","session.notBlankArchive":"This session already has content, so it cannot be removed as a blank session.","session.archiveFailed":"Could not remove this blank session.","session.archiveSomeFailed":"Some blank sessions could not be removed.","session.purgeNotBlank":"Only a blank session can be deleted permanently.","session.purgeFailed":"Could not delete this session permanently.","session.purgeSomeFailed":"Some blank sessions could not be deleted permanently.","session.menu":"Session actions","session.delete":"Delete permanently","session.deleteRunning":"This session is still running. Wait until it finishes, then delete it.","session.deleteAttached":"This session is still open in the runtime. Leave it, then delete it.","session.deleteFailed":"Could not delete this session.","session.listUnavailable":"The session list is unavailable.","session.unnamed":"New session","session.blankName":"Blank session","local.mark":"Me","local.here":"This machine","local.down":"Runtime unreachable"},tw={"new.title":"新建 BOT","new.close":"关闭","new.lead":"名字会显示在左侧列表里,也是这个 bot 自己的名字。风格和任务写进它的人格。","new.name":"Bot 名字","new.style":"Bot 风格","new.task":"Bot 任务","new.namePlaceholder":"例如:狗子","new.stylePlaceholder":"例如:幽默风趣","new.taskPlaceholder":"例如:把用户的话写成短句","new.cancel":"取消","new.create":"创建","new.creating":"正在创建","new.nameRequired":"先写上这个 bot 的名字。","new.created":"已创建「{name}」。","new.createFailed":"未能创建会话","new.personaFailed":"会话已创建,人格没有套上。","session.search":"搜索会话","session.searchPlaceholder":"搜索会话","session.none":"还没有会话。","session.noMatch":"没有匹配的会话。","session.running":"进行中","session.blank":"空白","session.archived":"已归档","session.hide":"收起","session.show":"展开","session.blankCount":"空白会话 · {count}","session.archiveAll":"全部归档","session.purgeAll":"全部彻底删除","session.archive":"归档","session.purge":"彻底删除","session.archiveLabel":"归档空白会话 {name}","session.purgeLabel":"彻底删除空白会话 {name}","session.archiveConfirm":"归档 {count} 个空白会话?已经有消息的会话会保留。归档后可以在原生界面的已归档列表里恢复。","session.purgeOneConfirm":"彻底删除「{name}」?日志会从磁盘去掉,不能从已归档列表恢复。","session.purgeAllConfirm":"彻底删除 {count} 个空白会话?日志会从磁盘去掉,不能恢复。已经有消息的会话会保留。","session.notBlankArchive":"这个会话已经有内容,不能当作空白会话删除。","session.archiveFailed":"没能删除这个空白会话。","session.archiveSomeFailed":"有的空白会话没能删除。","session.purgeNotBlank":"只有空白会话可以彻底删除。","session.purgeFailed":"没能彻底删除这个会话。","session.purgeSomeFailed":"有的空白会话没能彻底删除。","session.menu":"会话操作","session.delete":"彻底删除","session.deleteRunning":"这个会话还在进行,等它结束后再删除。","session.deleteAttached":"这个会话还开在运行时里。先离开它,再彻底删除。","session.deleteFailed":"没能彻底删除这个会话。","session.listUnavailable":"会话列表不可用","session.unnamed":"新会话","session.blankName":"空白会话","local.mark":"本","local.here":"本机","local.down":"主运行时不可达"},nb={en:ew,zh:tw},nw={"question.waiting":"Waiting for your answer","question.aborted":"This question was cancelled before you answered.","question.failed":"This question could not be completed.","question.skipped":"Skipped","question.answered":"Answered","question.multiSelect":"You can choose more than one option.","question.custom":"Other: {text}","question.customLabel":"Other","question.customPlaceholder":"Type a custom answer","question.skip":"Skip","question.submit":"Submit answers","question.submitting":"Submitting…","question.submitFailed":"The answer could not be submitted.","question.incomplete":"Answer or skip each question before submitting.","question.recommended":"Recommended","question.remaining":"{time} remaining","question.waitingNoTimer":"Waiting, no timer","question.takeTime":"Need more time","question.continued":"You can still answer","question.planTitle":"Plan review","question.viewFull":"View full plan","question.hidePlan":"Hide full plan","question.requestChanges":"Request changes","question.approvePlan":"Approve","question.changeComments":"What should change?","question.changePlaceholder":"Describe the changes you want","question.changesNeeded":"Please describe the changes you want.","question.allow":"Allow","question.reject":"Reject","question.alwaysAllow":"Always allow","question.approvalAnswered":"Decision recorded"},iw={"question.waiting":"等待你的回答","question.aborted":"这个问题在回答前被取消了。","question.failed":"这个问题未能完成。","question.skipped":"已跳过","question.answered":"已回答","question.multiSelect":"可以选择多个选项。","question.custom":"其他:{text}","question.customLabel":"其他","question.customPlaceholder":"输入自定义回答","question.skip":"跳过","question.submit":"提交回答","question.submitting":"正在提交…","question.submitFailed":"回答未能提交。","question.incomplete":"请先回答或跳过每一项再提交。","question.recommended":"推荐","question.remaining":"剩余 {time}","question.waitingNoTimer":"等待中,无计时","question.takeTime":"再等一等","question.continued":"现在仍可以回答","question.planTitle":"计划审阅","question.viewFull":"查看完整计划","question.hidePlan":"收起完整计划","question.requestChanges":"请求修改","question.approvePlan":"批准","question.changeComments":"需要怎样修改?","question.changePlaceholder":"描述你希望改动的地方","question.changesNeeded":"请先描述你希望改动的地方。","question.allow":"允许","question.reject":"拒绝","question.alwaysAllow":"始终允许","question.approvalAnswered":"已记录决定"},ib={en:nw,zh:iw},lw={"approval.title":"Tool approval","approval.allowOnce":"Allow once","approval.reject":"Reject","approval.waiting":"Waiting for your answer","approval.allowed":"Allowed once","approval.rejected":"Rejected","approval.cancelled":"This request was cancelled.","approval.failed":"This request could not be completed.","approval.submitFailed":"The decision could not be submitted."},aw={"approval.title":"工具许可","approval.allowOnce":"允许一次","approval.reject":"拒绝","approval.waiting":"等待你的回答","approval.allowed":"已允许一次","approval.rejected":"已拒绝","approval.cancelled":"这个请求已被取消。","approval.failed":"这个请求未能完成。","approval.submitFailed":"决定未能提交。"},lb={en:lw,zh:aw},rw={"permission.title":"Permissions","permission.open":"Session permissions","permission.current":"Current preset","permission.confirmTitle":"Confirm this permission","permission.confirmFull":"Give this session full access?","permission.confirmAuto":"Turn on Auto for this session?","permission.confirm":"Confirm","permission.cancel":"Cancel","permission.unavailable":"Official permission presets are not available on this host.","permission.failed":"The permission could not be changed.","permission.close":"Close","permission.preset.readOnly":"Read Only","permission.preset.workspaceWrite":"Workspace Write","permission.preset.fullAccess":"Full access","permission.preset.auto":"Auto review"},sw={"permission.title":"权限","permission.open":"会话权限","permission.current":"当前预设","permission.confirmTitle":"确认此项权限","permission.confirmFull":"为此会话开启完全访问?","permission.confirmAuto":"为此会话开启自动审阅?","permission.confirm":"确认","permission.cancel":"取消","permission.unavailable":"此主机未提供官方权限预设。","permission.failed":"权限未能更改。","permission.close":"关闭","permission.preset.readOnly":"只读","permission.preset.workspaceWrite":"工作区可写","permission.preset.fullAccess":"完全访问","permission.preset.auto":"自动审阅"},ab={en:rw,zh:sw},uw={"auth.title":"Authorization","auth.open":"Credentials","auth.empty":"No authorization flows are available.","auth.start":"Start","auth.writeVault":"Write to vault","auth.cancel":"Cancel","auth.secretMask":"••••••••","auth.unavailable":"Official authorization is not available on this host.","auth.failed":"Authorization could not be completed.","auth.close":"Close"},ow={"auth.title":"授权","auth.open":"凭据","auth.empty":"当前没有可进行的授权流程。","auth.start":"开始","auth.writeVault":"写入保险库","auth.cancel":"取消","auth.secretMask":"••••••••","auth.unavailable":"此主机未提供官方授权。","auth.failed":"授权未能完成。","auth.close":"关闭"},rb={en:uw,zh:ow},cw={"cua.title":"Computer Use permissions","cua.open":"Computer Use","cua.system":"System permissions","cua.accessibility":"Accessibility","cua.screenRecording":"Screen recording","cua.granted":"Granted","cua.missing":"Not granted","cua.request":"Request","cua.openSettings":"Open system settings","cua.grants":"Always-allow list","cua.blocked":"Refused applications","cua.revoke":"Revoke","cua.askAgain":"Ask again","cua.emptyGrants":"No saved application grants.","cua.emptyBlocked":"No refused applications.","cua.failed":"Computer Use permissions could not be updated.","cua.close":"Close"},fw={"cua.title":"计算机使用权限","cua.open":"计算机使用","cua.system":"系统权限","cua.accessibility":"辅助功能","cua.screenRecording":"屏幕录制","cua.granted":"已授予","cua.missing":"未授予","cua.request":"请求","cua.openSettings":"打开系统设置","cua.grants":"始终允许列表","cua.blocked":"已拒绝的应用","cua.revoke":"撤销","cua.askAgain":"再次询问","cua.emptyGrants":"没有已保存的应用授权。","cua.emptyBlocked":"没有已拒绝的应用。","cua.failed":"计算机使用权限未能更新。","cua.close":"关闭"},sb={en:cw,zh:fw},dw={"work.status.accepted":"Accepted","work.status.enqueued":"Enqueued","work.status.started":"Started","work.status.waitingBudget":"Waiting for budget","work.fact.waitingBudget":"Worker admission is paused pending a sufficient budget grant. Waiting time does not consume runtime.","work.status.needs_user":"Needs you","work.status.ready":"Candidate","work.status.delivered":"Delivered","work.status.cancelled":"Cancelled","work.status.failed":"Failed","work.ticket":"Ticket","work.preview.startedMany":"Started · {count}","work.placeholder.many":"Background work is running. You can say something else.","work.placeholder.started":"Background work has started. You can say something else.","work.placeholder.needsUser":"This box is still an ordinary message. Answer the ticket on the card above.","work.placeholder.ready":"Send a message. The result becomes delivered only after the assistant writes it into the chat.","work.placeholder.failed":"This ticket has failed. You can say something else.","work.fact.revision":"Generation {revision}","work.fact.accepted":"The ticket is recorded and is not on the execution queue yet.","work.fact.enqueued":"It is on the execution queue. The worker has not seen the task yet.","work.fact.elapsed":"Elapsed {time}","work.fact.wall":"Background limit is 10 minutes.","work.fact.needsUser":"This round has ended.","work.fact.ready":"This is not the reply in the chat yet.","work.fact.delivered":"The text is in the assistant reply.","work.fact.failed":"This ticket has failed.","work.fact.sameWorker":"It is still the same worker session.","work.fact.restart":"It returns to started after the worker sees the task again.","work.budgetFallback":"This one was not accepted. Unfinished tickets already hit the host concurrency limit.","work.openWorker":"Open the worker session","work.questionEmpty":"The worker asked a question.","work.questionStale":"The previous question is void.","work.answerLabel":"Reply to this ticket","work.answerSubmit":"Reply to this ticket","work.cancelTitle":"Cancellation note","work.taskTitle":"Task","work.generation":"Generation {revision}","work.duration":"Duration {value}","work.material":"Material {hash}","work.minutes":"{count} min","work.seconds":"{count} s","work.milliseconds":"{count} ms"},hw={"work.status.accepted":"已受理","work.status.enqueued":"已派工","work.status.started":"已开始","work.status.waitingBudget":"等待预算","work.fact.waitingBudget":"Worker 已暂停下一步,等待足够的新预算;等待时间不计入运行时长。","work.status.needs_user":"需要用户","work.status.ready":"候选","work.status.delivered":"已交付","work.status.cancelled":"已取消","work.status.failed":"失败","work.ticket":"工单","work.preview.startedMany":"已开始 · {count} 张","work.placeholder.many":"后台都在跑,可以直接说别的","work.placeholder.started":"后台已开始,可以直接说别的","work.placeholder.needsUser":"这里仍是普通消息。回答工单用上面的卡片","work.placeholder.ready":"发消息。结果要由助手写进对话,才会变成已交付","work.placeholder.failed":"这张工单已经失败,可以直接说别的","work.fact.revision":"第 {revision} 代","work.fact.accepted":"工单已记下,还没进入执行队列","work.fact.enqueued":"已进入执行队列,执行会话还没有看到任务","work.fact.elapsed":"已进行 {time}","work.fact.wall":"后台上限 10 分钟","work.fact.needsUser":"这一轮已经结束","work.fact.ready":"这还不是对话里的答复","work.fact.delivered":"正文在对话里的助手回复中","work.fact.failed":"这张工单已经失败","work.fact.sameWorker":"还是原来的执行会话","work.fact.restart":"执行会话再次看到任务后,才会回到已开始","work.budgetFallback":"这张没有接住。未结束工单已经达到宿主并发上限。","work.openWorker":"打开执行会话","work.questionEmpty":"执行会话问了一个问题。","work.questionStale":"上一问已作废","work.answerLabel":"对这张工单的回答","work.answerSubmit":"回复这张工单","work.cancelTitle":"取消说明","work.taskTitle":"执行任务","work.generation":"第 {revision} 代","work.duration":"时长 {value}","work.material":"材料 {hash}","work.minutes":"{count} 分钟","work.seconds":"{count} 秒","work.milliseconds":"{count} 毫秒"},ub={en:dw,zh:hw},ob={en:{"image.untitled":"Image","image.open":"Preview image: {name}","image.enlarge":"Click to enlarge","image.fit":"Fit to screen","image.original":"Original size","image.close":"Close image preview","image.scroll":"Original image. Scroll to inspect details.","image.openLink":"Open image link","image.unavailable":"Image unavailable; the file may have been removed.","image.retry":"Retry image"},zh:{"image.untitled":"图片","image.open":"预览图片:{name}","image.enlarge":"点击放大","image.fit":"适应屏幕","image.original":"原始大小","image.close":"关闭图片预览","image.scroll":"原始图片,可滚动查看细节。","image.openLink":"打开图片链接","image.unavailable":"图片不可用,文件可能已被清理。","image.retry":"重试图片"}},pw={...nb.en,...eb.en,...tb.en,...Wv.en,...ub.en,...Pv.en,...ib.en,...lb.en,...ab.en,...rb.en,...sb.en,...ob.en},mw={...nb.zh,...eb.zh,...tb.zh,...Wv.zh,...ub.zh,...Pv.zh,...ib.zh,...lb.zh,...ab.zh,...rb.zh,...sb.zh,...ob.zh},Dy={en:pw,zh:mw},cb="dsh-bot.locale";function gw(){try{const n=localStorage.getItem(cb);if(n==="en"||n==="zh")return n}catch{}return"en"}function yw(n){try{localStorage.setItem(cb,n)}catch{}typeof document<"u"&&(document.documentElement.lang=n==="zh"?"zh-CN":"en")}function fb(n,l,a){const r=Dy[n][l]??Dy.en[l];return a?r.replace(/\{(\w+)\}/g,(u,o)=>a[o]??""):r}function ki(n,l){return fb("en",n,l)}const vw={loading:"health.loading",no_provider:"health.noProvider",catalog_unreadable:"health.catalogUnreadable",primary_unready:"health.primaryUnready",primary_down:"health.primaryDown",usage_not_installed:"health.usageMissing",usage_unconfigured:"health.usageUpstream",session_unreadable:"health.sessionUnreadable"};function bw(n,l,a=ki){const r=vw[n];return r?a(r):l}const db=D.createContext({locale:"en",setLocale:()=>{},t:ki});function xw({children:n}){const[l,a]=D.useState(()=>gw()),r=D.useCallback(f=>{yw(f),a(f)},[]),u=D.useCallback((f,h)=>fb(l,f,h),[l]),o=D.useMemo(()=>({locale:l,setLocale:r,t:u}),[l,r,u]);return b.jsx(db.Provider,{value:o,children:n})}function Qe(){return D.useContext(db)}const Sw={accepted:"work.status.accepted",enqueued:"work.status.enqueued",started:"work.status.started",waiting_budget:"work.status.waitingBudget",needs_user:"work.status.needs_user",ready:"work.status.ready",delivered:"work.status.delivered",cancelled:"work.status.cancelled",failed:"work.status.failed"},ww=new Set(["delivered","cancelled"]),kw=new Set(["accepted","enqueued","started","needs_user","waiting_budget"]);function hb(n,l=ki){const a=Sw[n];return a?l(a):n}function pb(n){return n.replace(/^\uFEFF/,"").trimStart().startsWith("[foundations:ticket]")}function th(n){const l=n.replace(/^\uFEFF/,"").replace(/\r\n/g,`
13
+ `).trimStart();if(!l.startsWith("[foundations:briefing]"))return null;const a=l.slice(22).replace(/^\n/,""),r=a.indexOf(`
14
+ ---
15
+ `);if(r<0)return null;const u=[],o={};for(const g of a.slice(0,r).split(`
16
+ `)){const y=/^(briefing_revision|budget_wall_ms|budget_max_tokens|material_sha256):\s*(.*)$/.exec(g);y?.[1]?o[y[1]]=(y[2]??"").trim():g.trim()!==""&&u.push(g.trim())}const f=Number(o.briefing_revision),h=Number(o.budget_wall_ms),p=Number(o.budget_max_tokens);return{revision:Number.isFinite(f)&&f>0?f:1,wallMs:Number.isFinite(h)&&h>0?h:null,maxTokens:Number.isFinite(p)&&p>0?p:null,material:o.material_sha256??"",notes:u,body:a.slice(r+5).trim(),cancel:u.some(g=>g.startsWith("This is a cancellation note")||g.startsWith("这是取消说明"))}}function ua(n){return n.startsWith("worker-")&&n.length>7}function Ew(n){return ua(n)?n.slice(7):""}function Tw(n){const l=n.signals;if(!l||typeof l!="object"||Array.isArray(l))return{};const a={};for(const[r,u]of Object.entries(l))a[r]=Array.isArray(u)?u.filter(o=>typeof o=="string"):[];return a}function Aw(n){const l=n.cards;if(!l||typeof l!="object"||Array.isArray(l))return{};const a={};for(const[r,u]of Object.entries(l))a[r]=Nw({cards:u});return a}function Cw(n){const l=n.work&&typeof n.work=="object"&&!Array.isArray(n.work)?n.work:n;return!("signals"in l)&&!("cards"in l)?null:{signals:Tw(l),cards:Aw(l)}}function Nw(n){return Array.isArray(n.cards)?n.cards.flatMap(l=>{if(!l||typeof l!="object")return[];const a=l,r=typeof a.summary=="string"?a.summary:"",u=jw(a,r);return u?[u]:[]}):[]}function jw(n,l="",a=ki){const r=n.ticket;if(!r||typeof r!="object")return null;const u=r;if(typeof u.id!="string"||typeof u.status!="string")return null;const o=Array.isArray(n.attempts)?n.attempts:[],f=typeof u.active_attempt_id=="string"?u.active_attempt_id:"",h=o.find(S=>S&&typeof S=="object"&&S.id===f),p=Array.isArray(n.events)?n.events.flatMap(Bw):[],g=typeof u.child_session_id=="string"?u.child_session_id:"";let y=u.waiting_budget===!0;if(typeof u.budget_json=="string")try{y||=JSON.parse(u.budget_json).quota?.waiting===!0}catch{}const m=l.trim()||a("work.ticket");return{id:u.id,status:y&&["started","enqueued"].includes(u.status)?"waiting_budget":u.status,revision:typeof u.briefing_revision=="number"?u.briefing_revision:1,summary:m,childSessionId:g.startsWith("worker-")?g:null,startedAt:typeof h?.started_at=="string"?h.started_at:null,events:p}}function mb(n){const l=n.filter(r=>!ww.has(r.status)),a=n.find(r=>r.status==="delivered");return a?[...l,a]:l}function gb(n){return n.some(l=>kw.has(l.status))}function Ly(n,l,a=!1){return a?!1:n&&!gb(l)}const Ow=new Set(["accepted","enqueued","started"]);function _w(n,l=!1){if(l)return"run";let a=!1,r=!1;for(const u of n)u.status==="delivered"||u.status==="cancelled"||(u.status==="needs_user"||u.status==="waiting_budget"?a=!0:Ow.has(u.status)&&(r=!0));return a?"wait":r?"run":null}function fd(n,l=Date.now(),a=ki){const r=n.filter(f=>f.status==="started");if(r.length>1)return a("work.preview.startedMany",{count:String(r.length)});const u=bb(n);if(!u||u.status==="ready")return"";const o=hb(u.status,a);if(u.status==="started"){const f=vb(u.startedAt,l);return f?`${o} · ${f}`:o}return o}function zw(n,l=ki){if(n.filter(u=>u.status==="started").length>1)return l("work.placeholder.many");const r=bb(n);return r?r.status==="started"?l("work.placeholder.started"):r.status==="waiting_budget"?l("work.fact.waitingBudget"):r.status==="needs_user"?l("work.placeholder.needsUser"):r.status==="ready"?l("work.placeholder.ready"):r.status==="failed"?l("work.placeholder.failed"):null:null}function qw(n,l,a=ki){const r=[a("work.fact.revision",{revision:String(n.revision)})];if(n.status==="accepted"&&r.push(a("work.fact.accepted")),n.status==="enqueued"&&r.push(a("work.fact.enqueued")),n.status==="started"){const o=vb(n.startedAt,l);o&&r.push(a("work.fact.elapsed",{time:o})),r.push(a("work.fact.wall"))}n.status==="waiting_budget"&&r.push(a("work.fact.waitingBudget")),n.status==="needs_user"&&r.push(a("work.fact.needsUser")),n.status==="ready"&&r.push(a("work.fact.ready")),n.status==="delivered"&&r.push(a("work.fact.delivered")),n.status==="failed"&&r.push(a("work.fact.failed")),n.revision>1&&(n.status==="enqueued"||n.status==="accepted")&&(r.push(a("work.fact.sameWorker")),r.push(a("work.fact.restart")));const u=Lw(n);return u&&r.push(u),r}function Rw(n){const l=n.events.filter(a=>a.kind==="question"&&a.text.trim()!=="");if(n.status==="needs_user")return{text:l.filter(r=>r.revision===n.revision&&r.applyStatus!=="stale").at(-1)?.text??"",stale:!1};if(n.revision>1&&(n.status==="enqueued"||n.status==="accepted"||n.status==="started")){const a=[...l].reverse().find(r=>r.applyStatus==="stale");if(a)return{text:a.text,stale:!0}}return null}function yb(n){if(n.name!=="foundations_dispatch"||n.result.trim()==="")return null;const l=nh(n.result);return l?l.ok===!1?null:typeof l.ticketId=="string"&&l.ticketId!==""?l.ticketId:null:/"ticketId"\s*:\s*"([^"]+)"/.exec(n.result)?.[1]??null}function Mw(n){if(n.name!=="foundations_dispatch"||n.result.trim()==="")return!1;const l=nh(n.result);return l?l.ok===!1&&l.code==="BUDGET":n.result.includes('"BUDGET"')||/concurrency limit/i.test(n.result)}function Dw(n,l=ki){const a=nh(n);return a&&typeof a.message=="string"&&a.message!==""?a.message:l("work.budgetFallback")}function vb(n,l){if(!n)return"";const a=Date.parse(n);if(!Number.isFinite(a))return"";const r=Math.max(0,Math.floor((l-a)/1e3)),u=Math.floor(r/60),o=r%60;return`${u}:${String(o).padStart(2,"0")}`}function bb(n){const l=mb(n),a=["waiting_budget","needs_user","started","enqueued","accepted","ready","failed"];for(const r of a){const u=l.find(o=>o.status===r);if(u)return u}return l[0]??null}function Lw(n){return n.events.filter(a=>a.kind==="progress"&&a.applyStatus==="applied"&&a.revision===n.revision&&a.text.trim()!=="").at(-1)?.text??""}function Bw(n){if(!n||typeof n!="object")return[];const l=n;return typeof l.event_id!="string"||typeof l.kind!="string"?[]:[{eventId:l.event_id,kind:l.kind,applyStatus:typeof l.apply_status=="string"?l.apply_status:"",revision:typeof l.briefing_revision=="number"?l.briefing_revision:0,text:typeof l.text=="string"?l.text:""}]}function nh(n){try{const l=JSON.parse(n);return!l||typeof l!="object"||Array.isArray(l)?null:l}catch{return null}}var ih=Jv();function Uw({sessionId:n,path:l,line:a,onClose:r}){const[u,o]=D.useState({status:"loading",text:"",eof:!0}),{t:f}=Qe(),h=l.split("/").filter(Boolean).at(-1)??l,p=Iw(h);return D.useEffect(()=>{const g=document.body.style.overflow;document.body.style.overflow="hidden";const y=m=>{m.key==="Escape"&&r()};return document.addEventListener("keydown",y),()=>{document.body.style.overflow=g,document.removeEventListener("keydown",y)}},[r]),D.useEffect(()=>{const g=new AbortController;o({status:"loading",text:"",eof:!0});const y=`/file?sessionId=${encodeURIComponent(n)}&path=${encodeURIComponent(l)}`;return lt(y,{signal:g.signal}).then(m=>{if(g.signal.aborted)return;const S=typeof m.body.text=="string"?m.body.text:"";if(m.status!==200){o({status:"error",text:"",eof:!0});return}o({status:"ready",text:S,eof:m.body.eof!==!1})}).catch(()=>{g.signal.aborted||o({status:"error",text:"",eof:!0})}),()=>g.abort()},[n,l]),ih.createPortal(b.jsxs("div",{className:"file-modal",role:"presentation",children:[b.jsx("div",{className:"file-modal-mask",onClick:r}),b.jsxs("div",{className:"file-modal-card",role:"dialog","aria-modal":"true","aria-label":h,tabIndex:-1,children:[b.jsxs("header",{className:"file-modal-head",children:[b.jsxs("div",{className:"file-modal-title",children:[b.jsx("strong",{children:h}),l!==h?b.jsx("span",{children:l}):null]}),b.jsx("button",{type:"button",className:"file-modal-close","aria-label":f("file.close"),onClick:r,children:b.jsx(Vw,{})})]}),b.jsx(Hw,{state:u,language:p,line:a})]})]}),document.body)}function Hw({state:n,language:l,line:a}){const{t:r}=Qe(),[u,o]=D.useState(!1);if(n.status==="loading")return b.jsx("p",{className:"file-modal-status",children:r("file.loading")});if(n.status==="error")return b.jsx("p",{className:"file-modal-status",children:r("file.error")});const f=n.text===""?[]:n.text.split(`
17
+ `);return b.jsxs("div",{className:"file-preview","data-code-preview":"",children:[b.jsxs("div",{className:"file-preview-banner",children:[b.jsx("span",{className:"file-preview-lang",children:l||"Code"}),b.jsx("button",{type:"button",className:"diff-copy","aria-label":u?"Copied":"Copy",onClick:()=>{navigator.clipboard.writeText(n.text).then(()=>{o(!0),window.setTimeout(()=>o(!1),1e3)})},children:u?b.jsx(Gw,{}):b.jsx(Yw,{})})]}),b.jsx("div",{className:"file-preview-scroll",children:b.jsx("pre",{children:b.jsx("code",{style:{"--line-width":`${Math.max(2,String(f.length).length)}ch`},children:f.map((h,p)=>b.jsx("span",{className:a===p+1?"source-line current":"source-line",children:h},p))})})}),n.eof?null:b.jsx("p",{className:"file-modal-note",children:r("file.truncated")})]})}function Iw(n){const l=n.split(".").pop()?.toLowerCase()??"";return{py:"python",ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",md:"markdown",css:"css",html:"html",json:"json",sh:"bash",yml:"yaml",yaml:"yaml",go:"go",rs:"rust",rb:"ruby",c:"c"}[l]??""}function Vw(){return b.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:b.jsx("path",{d:"M4.2 4.2L11.8 11.8M11.8 4.2L4.2 11.8",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function Yw(){return b.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[b.jsx("rect",{x:"5.2",y:"5.2",width:"7.2",height:"7.6",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M10.2 5.2V3.8A1.3 1.3 0 0 0 8.9 2.5H3.8A1.3 1.3 0 0 0 2.5 3.8v5.1A1.3 1.3 0 0 0 3.8 10.2H5.2",fill:"none",stroke:"currentColor",strokeWidth:"1.2"})]})}function Gw(){return b.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:b.jsx("path",{d:"M3.5 8.2L6.4 11.1L12.5 4.8",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function Qw({onClose:n,onCreated:l}){const[a,r]=D.useState(""),[u,o]=D.useState(""),[f,h]=D.useState(""),[p,g]=D.useState(!1),[y,m]=D.useState(""),{locale:S,setLocale:x,t:k}=Qe();function T(E){r(E)}async function C(){if(p)return;const E=a.trim();if(E===""){m(k("new.nameRequired"));return}g(!0),m("");const M=await lt("/sessions",{method:"POST",headers:{"content-type":"application/json","idempotency-key":crypto.randomUUID()},body:JSON.stringify({name:E})}),H=typeof M.body.sessionId=="string"?M.body.sessionId:"";if(!H){const F=M.body.upstream;m(F?.message||String(M.body.error||k("new.createFailed"))),g(!1);return}const W=GS(E,u,f),ne=await hs("/dsh-bot/api/sessions/open",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:H,personaText:W,idempotencyKey:crypto.randomUUID()})}),O=ne.body.ok===!0?k("new.created",{name:E}):$v(ne.body,k("new.personaFailed"));l(H,O,E)}return b.jsx("div",{className:"setup-mask",role:"presentation",onMouseDown:n,children:b.jsxs("form",{className:"setup-card",role:"dialog","aria-labelledby":"new-session-title",onMouseDown:E=>E.stopPropagation(),onSubmit:E=>{E.preventDefault(),C()},children:[b.jsxs("div",{className:"setup-head",children:[b.jsx("h2",{id:"new-session-title",children:k("new.title")}),b.jsx("button",{type:"button",className:"setup-close","aria-label":k("new.close"),onClick:n,children:"×"})]}),b.jsx("p",{className:"setup-lead",children:k("new.lead")}),b.jsx("label",{htmlFor:"setup-name",children:k("new.name")}),b.jsx("input",{id:"setup-name",value:a,placeholder:k("new.namePlaceholder"),onChange:E=>T(E.target.value)}),b.jsx("label",{htmlFor:"setup-style",children:k("new.style")}),b.jsx("input",{id:"setup-style",value:u,placeholder:k("new.stylePlaceholder"),onChange:E=>o(E.target.value)}),b.jsx("label",{htmlFor:"setup-task",children:k("new.task")}),b.jsx("textarea",{id:"setup-task",rows:3,value:f,placeholder:k("new.taskPlaceholder"),onChange:E=>h(E.target.value)}),y?b.jsx("p",{className:"setup-error",children:y}):null,b.jsxs("div",{className:"setup-actions",children:[b.jsx("button",{type:"button",onClick:()=>x(S==="en"?"zh":"en"),children:k("lang.switch")}),b.jsx("button",{type:"button",onClick:n,children:k("new.cancel")}),b.jsx("button",{type:"submit",className:"primary",disabled:p||a.trim()==="",children:k(p?"new.creating":"new.create")})]})]})})}function Fw(n,l){const{t:a}=Qe(),[r,u]=D.useState("");return D.useEffect(()=>{if(n===""){u("");return}let o=!1;return(async()=>{const f=await hs(`/dsh-bot/api/status?sessionId=${encodeURIComponent(n)}`),h=await hs(`/dsh-bot/api/memory?sessionId=${encodeURIComponent(n)}`);if(o||f.body.ok!==!0)return;const p=f.body.binding;if((p&&typeof p=="object"?p.kind:f.body.kind)!=="bot"){u(a("basis.plain"));return}const y=typeof f.body.personaText=="string"?f.body.personaText.trim():"",m=QS(y),S=[m.name,m.style,m.task].filter(T=>T!=="").join(" · "),k=(Array.isArray(h.body.facts)?h.body.facts:[]).filter(T=>T&&typeof T=="object"&&T.status==="active").length;u(k>0?a("basis.facts",{head:S||"BOT",count:String(k)}):S||"BOT")})(),()=>{o=!0}},[n,l,a]),r}function So(n){const l=n.replace(/\r\n/g,`
18
+ `);if(!l.startsWith("[foundations:message]"))return null;const a=l.slice(21).replace(/^\n/,""),r=a.indexOf(`
19
+ ---
20
+ `);if(r<0)return null;const u={},o=[];for(const f of a.slice(0,r).split(`
21
+ `)){const h=/^(id|from|correlation|causation|hop):\s*(.*)$/.exec(f);h?.[1]?u[h[1]]=(h[2]??"").trim():f.trim()!==""&&o.push(f.trim())}return u.from?{id:u.id??"",from:u.from,correlation:u.correlation??"",causation:u.causation??"",hop:u.hop??"",note:o.join(" "),body:a.slice(r+5).trim()}:null}function xb(n,l){return l!==""&&l!==n?l:n.startsWith("session-")&&n.length>18?`${n.slice(0,12)}…${n.slice(-4)}`:n}const Xw=new Set(["foundations_send","foundations_reply"]);function Sb(n){const l=[];for(const a of n){if(a.kind==="user"){const u=So(a.text);if(!u)continue;l.push({kind:"in",id:a.id,seq:a.seq,time:a.time,mail:u});continue}if(a.kind!=="tool"||!Xw.has(a.name))continue;const r=$w(a);r&&l.push(r)}return l.sort((a,r)=>a.seq-r.seq||(a.kind===r.kind?0:a.kind==="in"?-1:1)),l}function Zw(n){const l=Sb(n);if(!l.some(u=>u.kind==="in"))return n.slice();const r=new Set(l.filter(u=>u.kind==="out").map(u=>u.id));return n.filter(u=>!r.has(u.id))}function Kw(n,l){const a=n.filter(o=>o.kind==="in"),r=a.at(-1);if(!r)return null;const u=r.mail.body.replace(/\s+/g," ").trim();return{who:l(r.mail.from)||"BOT",preview:u.length>72?`${u.slice(0,71)}…`:u,count:a.length}}function Jw(n,l){if(n.target)return n.target;if(!n.correlation)return"";for(let a=l.length-1;a>=0;a-=1){const r=l[a];if(!(!r||r.seq>n.seq)&&r.kind==="in"&&r.mail.correlation===n.correlation)return r.mail.from}return""}function $w(n){let l;try{const r=JSON.parse(n.args);if(!r||typeof r!="object"||Array.isArray(r))return null;l=r}catch{return null}const a=typeof l.text=="string"?l.text.trim():"";return a?{kind:"out",id:n.id,seq:n.seq,text:a,target:typeof l.targetSessionId=="string"?l.targetSessionId:"",correlation:typeof l.correlationId=="string"?l.correlationId:""}:null}function Pw(n,l){const a={};return(n[n.length-1]===""?[...n,""]:n).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const Ww=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ek=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tk={};function By(n,l){return(tk.jsx?ek:Ww).test(n)}const nk=/[ \t\n\f\r]/g;function ik(n){return typeof n=="object"?n.type==="text"?Uy(n.value):!1:Uy(n)}function Uy(n){return n.replace(nk,"")===""}class bs{constructor(l,a,r){this.normal=a,this.property=l,r&&(this.space=r)}}bs.prototype.normal={};bs.prototype.property={};bs.prototype.space=void 0;function wb(n,l){const a={},r={};for(const u of n)Object.assign(a,u.property),Object.assign(r,u.normal);return new bs(a,r,l)}function Md(n){return n.toLowerCase()}class En{constructor(l,a){this.attribute=a,this.property=l}}En.prototype.attribute="";En.prototype.booleanish=!1;En.prototype.boolean=!1;En.prototype.commaOrSpaceSeparated=!1;En.prototype.commaSeparated=!1;En.prototype.defined=!1;En.prototype.mustUseProperty=!1;En.prototype.number=!1;En.prototype.overloadedBoolean=!1;En.prototype.property="";En.prototype.spaceSeparated=!1;En.prototype.space=void 0;let lk=0;const qe=ha(),Ut=ha(),Dd=ha(),re=ha(),gt=ha(),fa=ha(),qn=ha();function ha(){return 2**++lk}const Ld=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:Ut,commaOrSpaceSeparated:qn,commaSeparated:fa,number:re,overloadedBoolean:Dd,spaceSeparated:gt},Symbol.toStringTag,{value:"Module"})),dd=Object.keys(Ld);class lh extends En{constructor(l,a,r,u){let o=-1;if(super(l,a),Hy(this,"space",u),typeof r=="number")for(;++o<dd.length;){const f=dd[o];Hy(this,dd[o],(r&Ld[f])===Ld[f])}}}lh.prototype.defined=!0;function Hy(n,l,a){a&&(n[l]=a)}function sr(n){const l={},a={};for(const[r,u]of Object.entries(n.properties)){const o=new lh(r,n.transform(n.attributes||{},r),u,n.space);n.mustUseProperty&&n.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),l[r]=o,a[Md(r)]=r,a[Md(o.attribute)]=r}return new bs(l,a,n.space)}const kb=sr({properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:gt,ariaCurrent:null,ariaDescribedBy:gt,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:gt,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:gt,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:gt,ariaLevel:re,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:gt,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:gt,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:Ut,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(n,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function Eb(n,l){return l in n?n[l]:l}function Tb(n,l){return Eb(n,l.toLowerCase())}const ak=sr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fa,acceptCharset:gt,accessKey:gt,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alpha:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:gt,autoFocus:qe,autoPlay:qe,blocking:gt,capture:null,charSet:null,checked:qe,cite:null,className:gt,closedBy:null,colorSpace:null,cols:re,colSpan:re,command:null,commandFor:null,content:null,contentEditable:Ut,controls:qe,controlsList:gt,coords:re|fa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:Dd,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:gt,height:re,hidden:Dd,high:re,href:null,hrefLang:null,htmlFor:gt,httpEquiv:gt,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:gt,itemRef:gt,itemScope:qe,itemType:gt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,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:qe,optimum:re,pattern:null,ping:gt,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:gt,required:qe,reversed:qe,rows:re,rowSpan:re,sandbox:gt,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootCustomElementRegistry:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shadowRootSerializable:qe,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:qe,useMap:null,value:Ut,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:gt,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:qe,disablePictureInPicture:qe,disableRemotePlayback:qe,exportParts:fa,part:gt,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:Tb}),rk=sr({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",maskType:"mask-type",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:qn,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:gt,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:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,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:fa,g2:fa,glyphName:fa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:qn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,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:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:gt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qn,rev:qn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qn,requiredFeatures:qn,requiredFonts:qn,requiredFormats:qn,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:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:qn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qn,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Eb}),Ab=sr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,l){return"xlink:"+l.slice(5).toLowerCase()}}),Cb=sr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tb}),Nb=sr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,l){return"xml:"+l.slice(3).toLowerCase()}}),sk={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"},uk=/[A-Z]/g,Iy=/-[a-z]/g,ok=/^data[-\w.:]+$/i;function ck(n,l){const a=Md(l);let r=l,u=En;if(a in n.normal)return n.property[n.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&ok.test(l)){if(l.charAt(4)==="-"){const o=l.slice(5).replace(Iy,dk);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=l.slice(4);if(!Iy.test(o)){let f=o.replace(uk,fk);f.charAt(0)!=="-"&&(f="-"+f),l="data"+f}}u=lh}return new u(r,l)}function fk(n){return"-"+n.toLowerCase()}function dk(n){return n.charAt(1).toUpperCase()}const hk=wb([kb,ak,Ab,Cb,Nb],"html"),ah=wb([kb,rk,Ab,Cb,Nb],"svg");function pk(n){return n.join(" ").trim()}var Vy=/\/\*(?:[^*]|\*(?!\/))*\*\//g,mk=/\n/g,gk=/^\s*/,yk=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,vk=/^:\s*/,bk=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,xk=/^[;\s]*/,Sk=`
22
+ `,Yy="/",Gy="*",ns="",wk="comment",kk="declaration";function Ek(n,l){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];l=l||{};var a=1,r=1;function u(k){var T=k.match(mk);T&&(a+=T.length);var C=k.lastIndexOf(Sk);r=~C?k.length-C:r+k.length}function o(){var k={line:a,column:r};return function(T){return T.position=new f(k),g(),T}}function f(k){this.start=k,this.end={line:a,column:r},this.source=l.source}f.prototype.content=n;function h(k){var T=new Error(l.source+":"+a+":"+r+": "+k);if(T.reason=k,T.filename=l.source,T.line=a,T.column=r,T.source=n,!l.silent)throw T}function p(k){var T=k.exec(n);if(T){var C=T[0];return u(C),n=n.slice(C.length),T}}function g(){p(gk)}function y(k){for(var T;T=m();)k.push(T);return k}function m(){var k=o();if(!(Yy!=n.charAt(0)||Gy!=n.charAt(1))){for(var T=2;ns!=n.charAt(T)&&(Gy!=n.charAt(T)||Yy!=n.charAt(T+1));)++T;if(T+=2,ns===n.charAt(T-1))return h("End of comment missing");var C=n.slice(2,T-2);return r+=2,u(C),n=n.slice(T),r+=2,k({type:wk,comment:C})}}function S(){var k=o(),T=p(yk);if(T){if(m(),!p(vk))return h("property missing ':'");var C=p(bk),E=k({type:kk,property:T[0].replace(Vy,ns).trim(),value:C?C[0].replace(Vy,ns).trim():ns});return p(xk),E}}function x(){var k=[];y(k);for(var T;T=S();)k.push(T),y(k);return k}return g(),x()}function Tk(n,l){let a=null;if(!n||typeof n!="string")return a;const r=Ek(n),u=typeof l=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:f,value:h}=o;u?l(f,h,o):h&&(a=a??{},a[f]=h)}),a}const jb=Ob("end"),rh=Ob("start");function Ob(n){return l;function l(a){const r=a&&a.position&&a.position[n]||{};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 Ak(n){const l=rh(n),a=jb(n);if(l&&a)return{start:l,end:a}}function ss(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Qy(n.position):"start"in n||"end"in n?Qy(n):"line"in n||"column"in n?Bd(n):""}function Bd(n){return Fy(n&&n.line)+":"+Fy(n&&n.column)}function Qy(n){return Bd(n&&n.start)+"-"+Bd(n&&n.end)}function Fy(n){return n&&typeof n=="number"?n:1}class wo extends Error{constructor(l,a,r){super(),typeof a=="string"&&(r=a,a=void 0);let u="",o={},f=!1;if(a&&("line"in a&&"column"in a?o={place:a}:"start"in a&&"end"in a?o={place:a}:"type"in a?o={ancestors:[a],place:a.position}:o={...a}),typeof l=="string"?u=l:!o.cause&&l&&(f=!0,u=l.message,o.cause=l),!o.ruleId&&!o.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?o.ruleId=r:(o.source=r.slice(0,p),o.ruleId=r.slice(p+1))}if(!o.place&&o.ancestors){const p=o.ancestors[o.ancestors.length-1];p&&(o.place=p.position)}const h=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=u,this.line=h?h.line:void 0,this.name=ss(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=f&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Object.defineProperties(wo.prototype,{file:{configurable:!0,enumerable:!0,value:"",writable:!0},name:{configurable:!0,enumerable:!0,value:"",writable:!0},reason:{configurable:!0,enumerable:!0,value:"",writable:!0},message:{configurable:!0,enumerable:!0,value:"",writable:!0},stack:{configurable:!0,enumerable:!0,value:"",writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});const sh={}.hasOwnProperty,Ck=new Map,Nk=/[A-Z]/g,jk=/-([a-z])/g,Ok=new Set(["table","tbody","thead","tfoot","tr"]),_k=new Set(["td","th"]),_b="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function zk(n,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=Hk(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=Uk(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"?ah:hk,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},o=zb(u,n,void 0);return o&&typeof o!="string"?o:u.create(n,u.Fragment,{children:o||void 0},void 0)}function zb(n,l,a){if(l.type==="element")return qk(n,l,a);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return Rk(n,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return Dk(n,l,a);if(l.type==="mdxjsEsm")return Mk(n,l);if(l.type==="root")return Lk(n,l,a);if(l.type==="text")return Bk(n,l)}function qk(n,l,a){const r=n.schema;let u=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(u=ah,n.schema=u),n.ancestors.push(l);const o=Rb(n,l.tagName,!1),f=Ik(n,l);let h=oh(n,l);return Ok.has(l.tagName)&&(h=h.filter(function(p){return typeof p=="string"?!ik(p):!0})),qb(n,f,o,l),uh(f,h),n.ancestors.pop(),n.schema=r,n.create(l,o,f,a)}function Rk(n,l){if(l.data&&l.data.estree&&n.evaluater){const r=l.data.estree.body[0];return r.type,n.evaluater.evaluateExpression(r.expression)}ps(n,l.position)}function Mk(n,l){if(l.data&&l.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(l.data.estree);ps(n,l.position)}function Dk(n,l,a){const r=n.schema;let u=r;l.name==="svg"&&r.space==="html"&&(u=ah,n.schema=u),n.ancestors.push(l);const o=l.name===null?n.Fragment:Rb(n,l.name,!0),f=Vk(n,l),h=oh(n,l);return qb(n,f,o,l),uh(f,h),n.ancestors.pop(),n.schema=r,n.create(l,o,f,a)}function Lk(n,l,a){const r={};return uh(r,oh(n,l)),n.create(l,n.Fragment,r,a)}function Bk(n,l){return l.value}function qb(n,l,a,r){typeof a!="string"&&a!==n.Fragment&&n.passNode&&(l.node=r)}function uh(n,l){if(l.length>0){const a=l.length>1?l:l[0];a&&(n.children=a)}}function Uk(n,l,a){return r;function r(u,o,f,h){const g=Array.isArray(f.children)?a:l;return h?g(o,f,h):g(o,f)}}function Hk(n,l){return a;function a(r,u,o,f){const h=Array.isArray(o.children),p=rh(r);return l(u,o,f,h,{columnNumber:p?p.column-1:void 0,fileName:n,lineNumber:p?p.line:void 0},void 0)}}function Ik(n,l){const a={};let r,u;for(u in l.properties)if(u!=="children"&&sh.call(l.properties,u)){const o=Yk(n,u,l.properties[u]);if(o){const[f,h]=o;n.tableCellAlignToStyle&&f==="align"&&typeof h=="string"&&_k.has(l.tagName)?r=h:a[f]=h}}if(r){const o=a.style||(a.style={});o[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return a}function Vk(n,l){const a={};for(const r of l.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&n.evaluater){const o=r.data.estree.body[0];o.type;const f=o.expression;f.type;const h=f.properties[0];h.type,Object.assign(a,n.evaluater.evaluateExpression(h.argument))}else ps(n,l.position);else{const{name:u}=r;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&n.evaluater){const h=r.value.data.estree.body[0];h.type,o=n.evaluater.evaluateExpression(h.expression)}else ps(n,l.position);else o=r.value===null?!0:r.value;a[u]=o}return a}function oh(n,l){const a=[];let r=-1;const u=n.passKeys?new Map:Ck;for(;++r<l.children.length;){const o=l.children[r];let f;if(n.passKeys){const p=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(p){const g=u.get(p)||0;f=p+"-"+g,u.set(p,g+1)}}const h=zb(n,o,f);h!==void 0&&a.push(h)}return a}function Yk(n,l,a){if(a==null||typeof a=="number"&&Number.isNaN(a))return;const r=ck(n.schema,l);return Array.isArray(a)&&(a=r.commaSeparated?Pw(a):pk(a)),r.property==="style"?["style",typeof a=="object"?n.stylePropertyNameCase==="dom"?a:Qk(a):Gk(n,String(a))]:[n.elementAttributeNameCase==="react"&&r.space?sk[r.property]||r.property:r.attribute,a]}function Gk(n,l){const a={};try{Tk(l,function(r,u){if(r&&u){let o=r;o.slice(0,2)!=="--"&&(o=o.toLowerCase(),n.stylePropertyNameCase==="dom"&&(o.slice(0,4)==="-ms-"&&(o=o.slice(1)),o=o.replace(jk,Zk))),a[o]=u}})}catch(r){if(n.ignoreInvalidStyle)return{};const u=r,o=new wo("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:u,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=n.filePath||void 0,o.url=_b+"#cannot-parse-style-attribute",o}return a}function Rb(n,l,a){let r;if(!a)r={type:"Literal",value:l};else if(l.includes(".")){const u=l.split(".");let o=-1,f;for(;++o<u.length;){const h=By(u[o])?{type:"Identifier",name:u[o]}:{type:"Literal",value:u[o]};f=f?{type:"MemberExpression",object:f,property:h,computed:!!(o&&h.type==="Literal"),optional:!1}:h}r=f}else r=By(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const u=r.value;return sh.call(n.components,u)?n.components[u]:u}if(n.evaluater)return n.evaluater.evaluateExpression(r);ps(n)}function ps(n,l){const a=new wo("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=n.filePath||void 0,a.url=_b+"#cannot-handle-mdx-estrees-without-createevaluater",a}function Qk(n){const l={};let a;for(a in n)sh.call(n,a)&&(l[Fk(a)]=n[a]);return l}function Fk(n){if(n.slice(0,2)==="--")return n;let l=n.replace(Nk,Xk);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function Xk(n){return"-"+n.toLowerCase()}function Zk(n,l){return l.toUpperCase()}const hd={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"]},Kk={};function ko(n,l){const a=Kk,r=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,u=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return Mb(n,r,u)}function Mb(n,l,a){if(Jk(n)){if("value"in n)return n.type==="html"&&!a?"":n.value;if(l&&"alt"in n&&n.alt)return n.alt;if("children"in n)return Xy(n.children,l,a)}return Array.isArray(n)?Xy(n,l,a):""}function Xy(n,l,a){const r=[];let u=-1;for(;++u<n.length;)r[u]=Mb(n[u],l,a);return r.join("")}function Jk(n){return!!(n&&typeof n=="object")}const Zy=document.createElement("i");function ch(n){const l="&"+n+";";Zy.innerHTML=l;const a=Zy.textContent;return a.charCodeAt(a.length-1)===59&&n!=="semi"||a===l?!1:a}function ri(n,l,a,r){const u=n.length;let o=0,f;if(l<0?l=-l>u?0:u+l:l=l>u?u:l,a=a>0?a:0,r.length<1e4)f=Array.from(r),f.unshift(l,a),n.splice(...f);else for(a&&n.splice(l,a);o<r.length;)f=r.slice(o,o+1e4),f.unshift(l,0),n.splice(...f),o+=1e4,l+=1e4}function Fn(n,l){return n.length>0?(ri(n,n.length,0,l),n):l}const Ky={}.hasOwnProperty;function Db(n){const l={};let a=-1;for(;++a<n.length;)$k(l,n[a]);return l}function $k(n,l){let a;for(a in l){const u=(Ky.call(n,a)?n[a]:void 0)||(n[a]={}),o=l[a];let f;if(o)for(f in o){Ky.call(u,f)||(u[f]=[]);const h=o[f];Pk(u[f],Array.isArray(h)?h:h?[h]:[])}}}function Pk(n,l){let a=-1;const r=[];for(;++a<l.length;)(l[a].add==="after"?n:r).push(l[a]);ri(n,0,0,r)}function Lb(n,l){const a=Number.parseInt(n,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 si(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const nn=Ol(/[A-Za-z]/),ln=Ol(/[\dA-Za-z]/),Wk=Ol(/[#-'*+\--9=?A-Z^-~]/);function uo(n){return n!==null&&(n<32||n===127)}const Ud=Ol(/\d/),eE=Ol(/[\dA-Fa-f]/),Bb=Ol(/[!-/:-@[-`{-~]/);function Ae(n){return n!==null&&n<-2}function yt(n){return n!==null&&(n<0||n===32)}function Ue(n){return n===-2||n===-1||n===32}const xs=Ol(new RegExp("\\p{P}|\\p{S}","u")),da=Ol(/\s/);function Ol(n){return l;function l(a){return a!==null&&a>-1&&n.test(String.fromCharCode(a))}}function ur(n){const l=[];let a=-1,r=0,u=0;for(;++a<n.length;){const o=n.charCodeAt(a);let f="";if(o===37&&ln(n.charCodeAt(a+1))&&ln(n.charCodeAt(a+2)))u=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(f=String.fromCharCode(o));else if(o>55295&&o<57344){const h=n.charCodeAt(a+1);o<56320&&h>56319&&h<57344?(f=String.fromCharCode(o,h),u=1):f="�"}else f=String.fromCharCode(o);f&&(l.push(n.slice(r,a),encodeURIComponent(f)),r=a+u+1,f=""),u&&(a+=u,u=0)}return l.join("")+n.slice(r)}function Pe(n,l,a,r){const u=r?r-1:1/0;let o=0;return f;function f(p){return Ue(p)?(n.enter(a),h(p)):l(p)}function h(p){return Ue(p)&&o++<u?(n.consume(p),h):(n.exit(a),l(p))}}function Ub(n,l,a,r,u,o){let f=0;return h;function h(y){return Ue(y)?(n.enter(r),p(y)):g(y)}function p(y){return Ue(y)&&f<o?(n.consume(y),f++,p):(n.exit(r),g(y))}function g(y){return f>=u?l(y):a(y)}}const tE={tokenize:nE};function nE(n){const l=n.attempt(this.parser.constructs.contentInitial,r,u);let a;return l;function r(h){if(h===null){n.consume(h);return}return n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),Pe(n,l,"linePrefix")}function u(h){return n.enter("paragraph"),o(h)}function o(h){const p=n.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=p),a=p,f(h)}function f(h){if(h===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(h);return}return Ae(h)?(n.consume(h),n.exit("chunkText"),o):(n.consume(h),f)}}let oo=class{constructor(){this.index=new Map,this.map=[]}add(l,a,r){Jy(this,l,a,r,!1)}addBefore(l,a,r){Jy(this,l,a,r,!0)}consume(l){if(this.map.sort(function(o,f){return o[0]-f[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 o of u)l.push(o);u=r.pop()}this.map.length=0,this.index.clear()}};function Jy(n,l,a,r,u){if(a===0&&r.length===0)return;const o=n.index.get(l);if(o){o[1]+=a,u?(r.push(...o[2]),o[2]=r):o[2].push(...r);return}const f=[l,a,r];n.map.push(f),n.index.set(l,f)}const iE={tokenize:lE},$y={tokenize:aE};function lE(n){const l=this,a=[];let r=0,u,o,f;return h;function h(H){if(r<a.length){const W=a[r];return l.containerState=W[1],n.attempt(W[0].continuation,p,g)(H)}return g(H)}function p(H){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,u&&M();const W=l.events.length;let ne=W,O;for(;ne--;)if(l.events[ne][0]==="exit"&&l.events[ne][1].type==="chunkFlow"){O=l.events[ne][1].end;break}E(r);let F=W;for(;F<l.events.length;)l.events[F][1].end={...O},F++;const ie=new oo;return ie.add(ne+1,0,l.events.slice(W)),ie.add(W,F-W,[]),ie.consume(l.events),g(H)}return h(H)}function g(H){if(r===a.length){if(!u)return S(H);if(u.currentConstruct&&u.currentConstruct.concrete)return k(H);l.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return l.containerState={},n.check($y,y,m)(H)}function y(H){return u&&M(),E(r),S(H)}function m(H){return l.parser.lazy[l.now().line]=r!==a.length,f=l.now().offset,k(H)}function S(H){return l.containerState={},n.attempt($y,x,k)(H)}function x(H){return r++,a.push([l.currentConstruct,l.containerState]),S(H)}function k(H){if(H===null){u&&M(),E(0),n.consume(H);return}return u=u||l.parser.flow(l.now()),n.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:o}),T(H)}function T(H){if(H===null){C(n.exit("chunkFlow"),!0),E(0),n.consume(H);return}return Ae(H)?(n.consume(H),C(n.exit("chunkFlow")),r=0,l.interrupt=void 0,h):(n.consume(H),T)}function C(H,W){const ne=l.sliceStream(H);if(W&&ne.push(null),H.previous=o,o&&(o.next=H),o=H,u.defineSkip(H.start),u.write(ne),l.parser.lazy[H.start.line]){let O=u.events.length;for(;O--;)if(u.events[O][1].start.offset<f&&(!u.events[O][1].end||u.events[O][1].end.offset>f))return;const F=l.events.length;let ie=F,he,_;for(;ie--;)if(l.events[ie][0]==="exit"&&l.events[ie][1].type==="chunkFlow"){if(he){_=l.events[ie][1].end;break}he=!0}for(E(r),O=F;O<l.events.length;)l.events[O][1].end={..._},O++;const Z=new oo;Z.add(ie+1,0,l.events.slice(F)),Z.add(F,O-F,[]),Z.consume(l.events)}}function E(H){let W=a.length;for(;W-- >H;){const ne=a[W];l.containerState=ne[1],ne[0].exit.call(l,n)}a.length=H}function M(){u.write([null]),o=void 0,u=void 0,l.containerState._closeFlow=void 0}}function aE(n,l,a){return Pe(n,n.attempt(this.parser.constructs.document,l,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function jl(n){if(n===null||yt(n)||da(n))return 1;if(xs(n))return 2}function Eo(n,l,a){const r=[];let u=-1;for(;++u<n.length;){const o=n[u].resolveAll;o&&!r.includes(o)&&(l=o(l,a),r.push(o))}return l}const Hd={name:"attention",resolveAll:rE,tokenize:sE};function rE(n,l){let a=-1,r;for(;++a<n.length;)if(n[a][0]==="enter"&&n[a][1].type==="attentionSequence"&&n[a][1]._close){let u=a;for(;u--;)if(n[u][0]==="exit"&&n[u][1].type==="attentionSequence"&&n[u][1]._open&&l.sliceSerialize(n[u][1]).charCodeAt(0)===l.sliceSerialize(n[a][1]).charCodeAt(0)){if((n[u][1]._close||n[a][1]._open)&&(n[a][1].end.offset-n[a][1].start.offset)%3&&!((n[u][1].end.offset-n[u][1].start.offset+n[a][1].end.offset-n[a][1].start.offset)%3))continue;const o=n[u][1].end.offset-n[u][1].start.offset>1&&n[a][1].end.offset-n[a][1].start.offset>1?2:1,f={...n[u][1].end},h={...n[a][1].start};Py(f,-o),Py(h,o);const p={type:o>1?"strongSequence":"emphasisSequence",start:f,end:{...n[u][1].end}},g={type:o>1?"strongSequence":"emphasisSequence",start:{...n[a][1].start},end:h},y={type:o>1?"strongText":"emphasisText",start:{...n[u][1].end},end:{...n[a][1].start}},m={type:o>1?"strong":"emphasis",start:{...p.start},end:{...g.end}};n[u][1].end={...p.start},n[a][1].start={...g.end},r=[],n[u][1].end.offset-n[u][1].start.offset&&(r=Fn(r,[["enter",n[u][1],l],["exit",n[u][1],l]])),r=Fn(r,[["enter",m,l],["enter",p,l],["exit",p,l],["enter",y,l]]),r=Fn(r,Eo(l.parser.constructs.insideSpan.null,n.slice(u+1,a),l)),r=Fn(r,[["exit",y,l],["enter",g,l],["exit",g,l],["exit",m,l]]);let S=0;n[a][1].end.offset-n[a][1].start.offset&&(S=2,r=Fn(r,[["enter",n[a][1],l],["exit",n[a][1],l]])),ri(n,u-1,a-u+3,r),a=u+r.length-S-2;break}}for(a=-1;++a<n.length;)n[a][1].type==="attentionSequence"&&(n[a][1].type="data");return n}function sE(n,l){const a=this.parser.constructs.attentionMarkers.null,r=this.previous,u=jl(r);let o;return f;function f(p){return o=p,n.enter("attentionSequence"),h(p)}function h(p){if(p===o)return n.consume(p),h;const g=n.exit("attentionSequence"),y=jl(p),m=!y||y===2&&u||a.includes(p)&&p!==42&&p!==95,S=!u||u===2&&y||a.includes(r)&&r!==42&&r!==95;return g._open=!!(o===42?m:m&&(u||!S)),g._close=!!(o===42?S:S&&(y||!m)),l(p)}}function Py(n,l){n.column+=l,n.offset+=l,n._bufferIndex+=l}const uE={name:"autolink",tokenize:oE};function oE(n,l,a){let r=0;return u;function u(x){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(x),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),o}function o(x){return nn(x)?(n.consume(x),f):x===64?a(x):g(x)}function f(x){return x===43||x===45||x===46||ln(x)?(r=1,h(x)):g(x)}function h(x){return x===58?(n.consume(x),r=0,p):(x===43||x===45||x===46||ln(x))&&r++<32?(n.consume(x),h):(r=0,g(x))}function p(x){return x===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(x),n.exit("autolinkMarker"),n.exit("autolink"),l):x===null||x===32||x===60||uo(x)?a(x):(n.consume(x),p)}function g(x){return x===64?(n.consume(x),y):Wk(x)?(n.consume(x),g):a(x)}function y(x){return ln(x)?m(x):a(x)}function m(x){return x===46?(n.consume(x),r=0,y):x===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(x),n.exit("autolinkMarker"),n.exit("autolink"),l):S(x)}function S(x){if((x===45||ln(x))&&r++<63){const k=x===45?S:m;return n.consume(x),k}return a(x)}}const Ss={partial:!0,tokenize:cE};function cE(n,l,a){return r;function r(o){return Ue(o)?Pe(n,u,"linePrefix")(o):u(o)}function u(o){return o===null||Ae(o)?l(o):a(o)}}const Hb={continuation:{tokenize:dE},exit:hE,name:"blockQuote",tokenize:fE};function fE(n,l,a){const r=this;return u;function u(f){if(f===62){const h=r.containerState;return h.open||(n.enter("blockQuote",{_container:!0}),h.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(f),n.exit("blockQuoteMarker"),o}return a(f)}function o(f){return Ue(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),l):(n.exit("blockQuotePrefix"),l(f))}}function dE(n,l,a){const r=this;return u;function u(f){return Ue(f)?Pe(n,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):o(f)}function o(f){return n.attempt(Hb,l,a)(f)}}function hE(n){n.exit("blockQuote")}const Ib={name:"characterEscape",tokenize:pE};function pE(n,l,a){return r;function r(o){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(o),n.exit("escapeMarker"),u}function u(o){return Bb(o)?(n.enter("characterEscapeValue"),n.consume(o),n.exit("characterEscapeValue"),n.exit("characterEscape"),l):a(o)}}const Vb={name:"characterReference",tokenize:mE};function mE(n,l,a){const r=this;let u=0,o,f;return h;function h(m){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(m),n.exit("characterReferenceMarker"),p}function p(m){return m===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(m),n.exit("characterReferenceMarkerNumeric"),g):(n.enter("characterReferenceValue"),o=31,f=ln,y(m))}function g(m){return m===88||m===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(m),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),o=6,f=eE,y):(n.enter("characterReferenceValue"),o=7,f=Ud,y(m))}function y(m){if(m===59&&u){const S=n.exit("characterReferenceValue");return f===ln&&!ch(r.sliceSerialize(S))?a(m):(n.enter("characterReferenceMarker"),n.consume(m),n.exit("characterReferenceMarker"),n.exit("characterReference"),l)}return f(m)&&u++<o?(n.consume(m),y):a(m)}}const Id={partial:!0,tokenize:gE};function gE(n,l,a){const r=this;return u;function u(f){return f===null?a(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),o)}function o(f){return r.parser.lazy[r.now().line]?a(f):l(f)}}const Wy={concrete:!0,name:"codeFenced",tokenize:yE};function yE(n,l,a){const r=this,u={partial:!0,tokenize:ne};let o=0,f=0,h;return p;function p(O){return g(O)}function g(O){const F=r.events[r.events.length-1];return o=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,h=O,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),y(O)}function y(O){return O===h?(f++,n.consume(O),y):f<3?a(O):(n.exit("codeFencedFenceSequence"),Ue(O)?Pe(n,m,"whitespace")(O):m(O))}function m(O){return O===null||Ae(O)?(n.exit("codeFencedFence"),r.interrupt?l(O):n.check(Id,T,W)(O)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),S(O))}function S(O){return O===null||Ae(O)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),m(O)):Ue(O)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Pe(n,x,"whitespace")(O)):O===96&&O===h?a(O):(n.consume(O),S)}function x(O){return O===null||Ae(O)?m(O):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(O))}function k(O){return O===null||Ae(O)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),m(O)):O===96&&O===h?a(O):(n.consume(O),k)}function T(O){return n.attempt(u,W,C)(O)}function C(O){return n.enter("lineEnding"),n.consume(O),n.exit("lineEnding"),E}function E(O){return o>0&&Ue(O)?Pe(n,M,"linePrefix",o+1)(O):M(O)}function M(O){return O===null||Ae(O)?n.check(Id,T,W)(O):(n.enter("codeFlowValue"),H(O))}function H(O){return O===null||Ae(O)?(n.exit("codeFlowValue"),M(O)):(n.consume(O),H)}function W(O){return n.exit("codeFenced"),l(O)}function ne(O,F,ie){let he=0;return _;function _(le){return O.enter("lineEnding"),O.consume(le),O.exit("lineEnding"),Z}function Z(le){return O.enter("codeFencedFence"),Ue(le)?Pe(O,ee,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(le):ee(le)}function ee(le){return le===h?(O.enter("codeFencedFenceSequence"),we(le)):ie(le)}function we(le){return le===h?(he++,O.consume(le),we):he>=f?(O.exit("codeFencedFenceSequence"),Ue(le)?Pe(O,Re,"whitespace")(le):Re(le)):ie(le)}function Re(le){return le===null||Ae(le)?(O.exit("codeFencedFence"),F(le)):ie(le)}}}const pd={name:"codeIndented",tokenize:bE},vE={partial:!0,tokenize:xE};function bE(n,l,a){return r;function r(h){return n.enter("codeIndented"),Ub(n,u,a,"linePrefix",4,4)(h)}function u(h){return h===null?f(h):Ae(h)?n.attempt(vE,u,f)(h):(n.enter("codeFlowValue"),o(h))}function o(h){return h===null||Ae(h)?(n.exit("codeFlowValue"),u(h)):(n.consume(h),o)}function f(h){return n.exit("codeIndented"),l(h)}}function xE(n,l,a){const r=this;return u;function u(f){return r.parser.lazy[r.now().line]?a(f):Ae(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),u):Ub(n,l,o,"linePrefix",4,4)(f)}function o(f){return Ae(f)?u(f):a(f)}}const SE={name:"codeText",previous:kE,resolve:wE,tokenize:EE};function wE(n){let l=n.length-4,a=3,r,u;if((n[a][1].type==="lineEnding"||n[a][1].type==="space")&&(n[l][1].type==="lineEnding"||n[l][1].type==="space")){for(r=a;++r<l;)if(n[r][1].type==="codeTextData"){n[a][1].type="codeTextPadding",n[l][1].type="codeTextPadding",a+=2,l-=2;break}}for(r=a-1,l++;++r<=l;)u===void 0?r!==l&&n[r][1].type!=="lineEnding"&&(u=r):(r===l||n[r][1].type==="lineEnding")&&(n[u][1].type="codeTextData",r!==u+2&&(n[u][1].end=n[r-1][1].end,n.splice(u+2,r-u-2),l-=r-u-2,r=u+2),u=void 0);return n}function kE(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function EE(n,l,a){let r=0,u,o;return f;function f(m){return n.enter("codeText"),n.enter("codeTextSequence"),h(m)}function h(m){return m===96?(n.consume(m),r++,h):(n.exit("codeTextSequence"),p(m))}function p(m){return m===null?a(m):m===32?(n.enter("space"),n.consume(m),n.exit("space"),p):m===96?(o=n.enter("codeTextSequence"),u=0,y(m)):Ae(m)?(n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),p):(n.enter("codeTextData"),g(m))}function g(m){return m===null||m===32||m===96||Ae(m)?(n.exit("codeTextData"),p(m)):(n.consume(m),g)}function y(m){return m===96?(n.consume(m),u++,y):u===r?(n.exit("codeTextSequence"),n.exit("codeText"),l(m)):(o.type="codeTextData",g(m))}}class TE{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 o=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return r&&is(this.left,r),o.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),is(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),is(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);is(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);is(this.left,a.reverse())}}}function is(n,l){let a=0;if(l.length<1e4)n.push(...l);else for(;a<l.length;)n.push(...l.slice(a,a+1e4)),a+=1e4}function Yb(n){const l={};let a=-1,r,u,o,f,h,p,g;const y=new TE(n);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,o=0,o<p.length&&p[o][1].type==="lineEndingBlank"&&(o+=2),o<p.length&&p[o][1].type==="content"))for(;++o<p.length&&p[o][1].type!=="content";)p[o][1].type==="chunkText"&&(p[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(l,AE(y,a)),a=l[a],g=!0);else if(r[1]._container){for(o=a,u=void 0;o--;)if(f=y.get(o),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(u&&(y.get(u)[1].type="lineEndingBlank"),f[1].type="lineEnding",u=o);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;u&&(r[1].end={...y.get(u)[1].start},h=y.slice(u,a),h.unshift(r),y.splice(u,a-u+1,h))}}return ri(n,0,Number.POSITIVE_INFINITY,y.slice(0)),!g}function AE(n,l){const a=n.get(l)[1],r=n.get(l)[2];let u=l-1;const o=[];let f=a._tokenizer;f||(f=r.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const h=f.events,p=[],g={};let y,m,S=-1,x=a,k=0,T=0;const C=[T];for(;x;){for(;n.get(++u)[1]!==x;);o.push(u),x._tokenizer||(y=r.sliceStream(x),x.next||y.push(null),m&&f.defineSkip(x.start),x._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(y),x._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),m=x,x=x.next}for(x=a;++S<h.length;)h[S][0]==="exit"&&h[S-1][0]==="enter"&&h[S][1].type===h[S-1][1].type&&h[S][1].start.line!==h[S][1].end.line&&(T=S+1,C.push(T),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(f.events=[],x?(x._tokenizer=void 0,x.previous=void 0):C.pop(),S=C.length;S--;){const E=h.slice(C[S],C[S+1]),M=o.pop();p.push([M,M+E.length-1]),n.splice(M,2,E)}for(p.reverse(),S=-1;++S<p.length;)g[k+p[S][0]]=k+p[S][1],k+=p[S][1]-p[S][0]-1;return g}const CE={resolve:jE,tokenize:OE},NE={partial:!0,tokenize:_E};function jE(n){return Yb(n),n}function OE(n,l){let a;return r;function r(h){return n.enter("content"),a=n.enter("chunkContent",{contentType:"content"}),u(h)}function u(h){return h===null?o(h):Ae(h)?n.check(NE,f,o)(h):(n.consume(h),u)}function o(h){return n.exit("chunkContent"),n.exit("content"),l(h)}function f(h){return n.consume(h),n.exit("chunkContent"),a.next=n.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,u}}function _E(n,l,a){const r=this;return u;function u(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),Pe(n,o,"linePrefix")}function o(f){if(f===null||Ae(f))return a(f);const h=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):n.interrupt(r.parser.constructs.flow,a,l)(f)}}function Gb(n,l,a,r,u,o,f,h,p){const g=p||Number.POSITIVE_INFINITY;let y=0;return m;function m(E){return E===60?(n.enter(r),n.enter(u),n.enter(o),n.consume(E),n.exit(o),S):E===null||E===32||E===41||uo(E)?a(E):(n.enter(r),n.enter(f),n.enter(h),n.enter("chunkString",{contentType:"string"}),T(E))}function S(E){return E===62?(n.enter(o),n.consume(E),n.exit(o),n.exit(u),n.exit(r),l):(n.enter(h),n.enter("chunkString",{contentType:"string"}),x(E))}function x(E){return E===62?(n.exit("chunkString"),n.exit(h),S(E)):E===null||E===60||Ae(E)?a(E):(n.consume(E),E===92?k:x)}function k(E){return E===60||E===62||E===92?(n.consume(E),x):x(E)}function T(E){return!y&&(E===null||E===41||yt(E))?(n.exit("chunkString"),n.exit(h),n.exit(f),n.exit(r),l(E)):y<g&&E===40?(n.consume(E),y++,T):E===41?(n.consume(E),y--,T):E===null||E===32||E===40||uo(E)?a(E):(n.consume(E),E===92?C:T)}function C(E){return E===40||E===41||E===92?(n.consume(E),T):T(E)}}function Qb(n,l,a,r,u,o){const f=this;let h=0,p;return g;function g(x){return n.enter(r),n.enter(u),n.consume(x),n.exit(u),n.enter(o),y}function y(x){return h>999||x===null||x===91||x===93&&!p||x===94&&!h&&"_hiddenFootnoteSupport"in f.parser.constructs?a(x):x===93?(n.exit(o),n.enter(u),n.consume(x),n.exit(u),n.exit(r),l):Ae(x)?(n.enter("lineEnding"),n.consume(x),n.exit("lineEnding"),y):(n.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===null||x===91||x===93||Ae(x)||h++>999?(n.exit("chunkString"),y(x)):(n.consume(x),p||(p=!Ue(x)),x===92?S:m)}function S(x){return x===91||x===92||x===93?(n.consume(x),h++,m):m(x)}}function Fb(n,l,a,r,u,o){let f;return h;function h(S){return S===34||S===39||S===40?(n.enter(r),n.enter(u),n.consume(S),n.exit(u),f=S===40?41:S,p):a(S)}function p(S){return S===f?(n.enter(u),n.consume(S),n.exit(u),n.exit(r),l):(n.enter(o),g(S))}function g(S){return S===f?(n.exit(o),p(f)):S===null?a(S):Ae(S)?(n.enter("lineEnding"),n.consume(S),n.exit("lineEnding"),Pe(n,g,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===f||S===null||Ae(S)?(n.exit("chunkString"),g(S)):(n.consume(S),S===92?m:y)}function m(S){return S===f||S===92?(n.consume(S),y):y(S)}}function us(n,l){let a;return r;function r(u){return Ae(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),a=!0,r):Ue(u)?Pe(n,r,a?"linePrefix":"lineSuffix")(u):l(u)}}const zE={name:"definition",tokenize:RE},qE={partial:!0,tokenize:ME};function RE(n,l,a){const r=this;let u;return o;function o(x){return n.enter("definition"),f(x)}function f(x){return Qb.call(r,n,h,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function h(x){return u=si(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(n.enter("definitionMarker"),n.consume(x),n.exit("definitionMarker"),p):a(x)}function p(x){return yt(x)?us(n,g)(x):g(x)}function g(x){return Gb(n,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function y(x){return n.attempt(qE,m,m)(x)}function m(x){return Ue(x)?Pe(n,S,"whitespace")(x):S(x)}function S(x){return x===null||Ae(x)?(n.exit("definition"),r.parser.defined.push(u),l(x)):a(x)}}function ME(n,l,a){return r;function r(h){return yt(h)?us(n,u)(h):a(h)}function u(h){return Fb(n,o,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function o(h){return Ue(h)?Pe(n,f,"whitespace")(h):f(h)}function f(h){return h===null||Ae(h)?l(h):a(h)}}const DE={name:"hardBreakEscape",tokenize:LE};function LE(n,l,a){return r;function r(o){return n.enter("hardBreakEscape"),n.consume(o),u}function u(o){return Ae(o)?(n.exit("hardBreakEscape"),l(o)):a(o)}}const BE={name:"headingAtx",resolve:UE,tokenize:HE};function UE(n,l){let a=n.length-2,r=3;if(n[r][1].type==="whitespace"&&(r+=2),a-2>r&&n[a][1].type==="whitespace"&&(a-=2),n[a][1].type==="atxHeadingSequence"&&(r===a-1||a-4>r&&n[a-2][1].type==="whitespace")&&(a-=r+1===a?2:4),a>r){const u={type:"atxHeadingText",start:n[r][1].start,end:n[a][1].end},o={type:"chunkText",start:n[r][1].start,end:n[a][1].end,contentType:"text"};ri(n,r,a-r+1,[["enter",u,l],["enter",o,l],["exit",o,l],["exit",u,l]])}return n}function HE(n,l,a){let r=0;return u;function u(y){return n.enter("atxHeading"),o(y)}function o(y){return n.enter("atxHeadingSequence"),f(y)}function f(y){return y===35&&r++<6?(n.consume(y),f):y===null||yt(y)?(n.exit("atxHeadingSequence"),h(y)):a(y)}function h(y){return y===35?(n.enter("atxHeadingSequence"),p(y)):y===null||Ae(y)?(n.exit("atxHeading"),l(y)):Ue(y)?Pe(n,h,"whitespace")(y):(n.enter("atxHeadingText"),g(y))}function p(y){return y===35?(n.consume(y),p):(n.exit("atxHeadingSequence"),h(y))}function g(y){return y===null||y===35||yt(y)?(n.exit("atxHeadingText"),h(y)):(n.consume(y),g)}}const Xb=["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"],Vd=["pre","script","style","textarea"],IE={concrete:!0,name:"htmlFlow",resolveTo:YE,tokenize:GE},VE={partial:!0,tokenize:QE};function YE(n){let l=n.length;for(;l--&&!(n[l][0]==="enter"&&n[l][1].type==="htmlFlow"););return l>1&&n[l-2][1].type==="linePrefix"&&(n[l][1].start=n[l-2][1].start,n[l+1][1].start=n[l-2][1].start,n.splice(l-2,2)),n}function GE(n,l,a){const r=this;let u,o,f,h,p;return g;function g(z){return y(z)}function y(z){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(z),m}function m(z){return z===33?(n.consume(z),S):z===47?(n.consume(z),o=!0,T):z===63?(n.consume(z),u=3,r.interrupt?l:j):nn(z)?(n.consume(z),f=String.fromCharCode(z),C):a(z)}function S(z){return z===45?(n.consume(z),u=2,x):z===91?(n.consume(z),u=5,h=0,k):nn(z)?(n.consume(z),u=4,r.interrupt?l:j):a(z)}function x(z){return z===45?(n.consume(z),r.interrupt?l:j):a(z)}function k(z){const q="CDATA[";return z===q.charCodeAt(h++)?(n.consume(z),h===q.length?r.interrupt?l:ee:k):a(z)}function T(z){return nn(z)?(n.consume(z),f=String.fromCharCode(z),C):a(z)}function C(z){if(z===null||z===47||z===62||yt(z)){const q=z===47,te=f.toLowerCase();return!q&&!o&&Vd.includes(te)?(u=1,r.interrupt?l(z):ee(z)):Xb.includes(f.toLowerCase())?(u=6,q?(n.consume(z),E):r.interrupt?l(z):ee(z)):(u=7,r.interrupt&&!r.parser.lazy[r.now().line]?a(z):o?M(z):H(z))}return z===45||ln(z)?(n.consume(z),f+=String.fromCharCode(z),C):a(z)}function E(z){return z===62?(n.consume(z),r.interrupt?l:ee):a(z)}function M(z){return Ue(z)?(n.consume(z),M):_(z)}function H(z){return z===47?(n.consume(z),_):z===58||z===95||nn(z)?(n.consume(z),W):Ue(z)?(n.consume(z),H):_(z)}function W(z){return z===45||z===46||z===58||z===95||ln(z)?(n.consume(z),W):ne(z)}function ne(z){return z===61?(n.consume(z),O):Ue(z)?(n.consume(z),ne):H(z)}function O(z){return z===null||z===60||z===61||z===62||z===96?a(z):z===34||z===39?(n.consume(z),p=z,F):Ue(z)?(n.consume(z),O):ie(z)}function F(z){return z===p?(n.consume(z),p=null,he):z===null||Ae(z)?a(z):(n.consume(z),F)}function ie(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||yt(z)?ne(z):(n.consume(z),ie)}function he(z){return z===47||z===62||Ue(z)?H(z):a(z)}function _(z){return z===62?(n.consume(z),Z):a(z)}function Z(z){return z===null||Ae(z)?ee(z):Ue(z)?(n.consume(z),Z):a(z)}function ee(z){return z===45&&u===2?(n.consume(z),Q):z===60&&u===1?(n.consume(z),se):z===62&&u===4?(n.consume(z),We):z===63&&u===3?(n.consume(z),j):z===93&&u===5?(n.consume(z),ke):Ae(z)&&(u===6||u===7)?(n.exit("htmlFlowData"),n.check(VE,dt,we)(z)):z===null||Ae(z)?(n.exit("htmlFlowData"),we(z)):(n.consume(z),ee)}function we(z){return n.check(Id,Re,dt)(z)}function Re(z){return n.enter("lineEnding"),n.consume(z),n.exit("lineEnding"),le}function le(z){return z===null||Ae(z)?we(z):(n.enter("htmlFlowData"),ee(z))}function Q(z){return z===45?(n.consume(z),j):ee(z)}function se(z){return z===47?(n.consume(z),f="",ue):ee(z)}function ue(z){if(z===62){const q=f.toLowerCase();return Vd.includes(q)?(n.consume(z),We):ee(z)}return nn(z)&&f.length<8?(n.consume(z),f+=String.fromCharCode(z),ue):ee(z)}function ke(z){return z===93?(n.consume(z),j):ee(z)}function j(z){return z===62?(n.consume(z),We):z===45&&u===2?(n.consume(z),j):ee(z)}function We(z){return z===null||Ae(z)?(n.exit("htmlFlowData"),dt(z)):(n.consume(z),We)}function dt(z){return n.exit("htmlFlow"),l(z)}}function QE(n,l,a){return r;function r(u){return n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),n.attempt(Ss,l,a)}}const FE={name:"htmlText",tokenize:XE};function XE(n,l,a){const r=this;let u,o,f;return h;function h(j){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(j),p}function p(j){return j===33?(n.consume(j),g):j===47?(n.consume(j),ne):j===63?(n.consume(j),H):nn(j)?(n.consume(j),ie):a(j)}function g(j){return j===45?(n.consume(j),y):j===91?(n.consume(j),o=0,k):nn(j)?(n.consume(j),M):a(j)}function y(j){return j===45?(n.consume(j),x):a(j)}function m(j){return j===null?a(j):j===45?(n.consume(j),S):Ae(j)?(f=m,se(j)):(n.consume(j),m)}function S(j){return j===45?(n.consume(j),x):m(j)}function x(j){return j===62?Q(j):j===45?S(j):m(j)}function k(j){const We="CDATA[";return j===We.charCodeAt(o++)?(n.consume(j),o===We.length?T:k):a(j)}function T(j){return j===null?a(j):j===93?(n.consume(j),C):Ae(j)?(f=T,se(j)):(n.consume(j),T)}function C(j){return j===93?(n.consume(j),E):T(j)}function E(j){return j===62?Q(j):j===93?(n.consume(j),E):T(j)}function M(j){return j===null||j===62?Q(j):Ae(j)?(f=M,se(j)):(n.consume(j),M)}function H(j){return j===null?a(j):j===63?(n.consume(j),W):Ae(j)?(f=H,se(j)):(n.consume(j),H)}function W(j){return j===62?Q(j):H(j)}function ne(j){return nn(j)?(n.consume(j),O):a(j)}function O(j){return j===45||ln(j)?(n.consume(j),O):F(j)}function F(j){return Ae(j)?(f=F,se(j)):Ue(j)?(n.consume(j),F):Q(j)}function ie(j){return j===45||ln(j)?(n.consume(j),ie):j===47||j===62||yt(j)?he(j):a(j)}function he(j){return j===47?(n.consume(j),Q):j===58||j===95||nn(j)?(n.consume(j),_):Ae(j)?(f=he,se(j)):Ue(j)?(n.consume(j),he):Q(j)}function _(j){return j===45||j===46||j===58||j===95||ln(j)?(n.consume(j),_):Z(j)}function Z(j){return j===61?(n.consume(j),ee):Ae(j)?(f=Z,se(j)):Ue(j)?(n.consume(j),Z):he(j)}function ee(j){return j===null||j===60||j===61||j===62||j===96?a(j):j===34||j===39?(n.consume(j),u=j,we):Ae(j)?(f=ee,se(j)):Ue(j)?(n.consume(j),ee):(n.consume(j),Re)}function we(j){return j===u?(n.consume(j),u=void 0,le):j===null?a(j):Ae(j)?(f=we,se(j)):(n.consume(j),we)}function Re(j){return j===null||j===34||j===39||j===60||j===61||j===96?a(j):j===47||j===62||yt(j)?he(j):(n.consume(j),Re)}function le(j){return j===47||j===62||yt(j)?he(j):a(j)}function Q(j){return j===62?(n.consume(j),n.exit("htmlTextData"),n.exit("htmlText"),l):a(j)}function se(j){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),ue}function ue(j){return Ue(j)?Pe(n,ke,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):ke(j)}function ke(j){return n.enter("htmlTextData"),f(j)}}const fh={name:"labelEnd",resolveAll:$E,resolveTo:PE,tokenize:WE},ZE={tokenize:eT},KE={tokenize:tT},JE={tokenize:nT};function $E(n){let l=-1;const a=[];for(;++l<n.length;){const r=n[l][1];if(a.push(n[l]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const u=r.type==="labelImage"?4:2;r.type="data",l+=u}}return n.length!==a.length&&ri(n,0,n.length,a),n}function PE(n,l){let a=n.length,r=0,u,o,f;for(;a--;){const y=n[a][1];if(u){if(y.type==="link"||y.type==="labelLink"&&y._inactive)break;n[a][0]==="enter"&&y.type==="labelLink"&&(y._inactive=!0)}else if(o){if(n[a][0]==="enter"&&(y.type==="labelImage"||y.type==="labelLink")&&!y._balanced&&(u=a,y.type!=="labelLink")){r=2;break}}else y.type==="labelEnd"&&(o=a)}const h={type:n[u][1].type==="labelLink"?"link":"image",start:{...n[u][1].start},end:{...n[n.length-1][1].end}},p={type:"label",start:{...n[u][1].start},end:{...n[o][1].end}},g={type:"labelText",start:{...n[u+r+2][1].end},end:{...n[o-2][1].start}};return f=[["enter",h,l],["enter",p,l]],f=Fn(f,n.slice(u+1,u+r+3)),f=Fn(f,[["enter",g,l]]),f=Fn(f,Eo(l.parser.constructs.insideSpan.null,n.slice(u+r+4,o-3),l)),f=Fn(f,[["exit",g,l],n[o-2],n[o-1],["exit",p,l]]),f=Fn(f,n.slice(o+1)),f=Fn(f,[["exit",h,l]]),ri(n,u,n.length,f),n}function WE(n,l,a){const r=this,u=r._labelStarts;let o,f;if(u){for(;u.length>0&&u[u.length-1]._balanced;)u.pop();o=u[u.length-1]}return h;function h(S){return o?o._inactive?m(S):(f=r.parser.defined.includes(si(r.sliceSerialize({start:o.end,end:r.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(S),n.exit("labelMarker"),n.exit("labelEnd"),p):a(S)}function p(S){return S===40?n.attempt(ZE,y,f?y:m)(S):S===91?n.attempt(KE,y,f?g:m)(S):f?y(S):m(S)}function g(S){return n.attempt(JE,y,m)(S)}function y(S){return u.pop(),l(S)}function m(S){return o._balanced=!0,a(S)}}function eT(n,l,a){return r;function r(m){return n.enter("resource"),n.enter("resourceMarker"),n.consume(m),n.exit("resourceMarker"),u}function u(m){return yt(m)?us(n,o)(m):o(m)}function o(m){return m===41?y(m):Gb(n,f,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function f(m){return yt(m)?us(n,p)(m):y(m)}function h(m){return a(m)}function p(m){return m===34||m===39||m===40?Fb(n,g,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):y(m)}function g(m){return yt(m)?us(n,y)(m):y(m)}function y(m){return m===41?(n.enter("resourceMarker"),n.consume(m),n.exit("resourceMarker"),n.exit("resource"),l):a(m)}}function tT(n,l,a){const r=this;return u;function u(h){return Qb.call(r,n,o,f,"reference","referenceMarker","referenceString")(h)}function o(h){return r.parser.defined.includes(si(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(h):a(h)}function f(h){return a(h)}}function nT(n,l,a){return r;function r(o){return n.enter("reference"),n.enter("referenceMarker"),n.consume(o),n.exit("referenceMarker"),u}function u(o){return o===93?(n.enter("referenceMarker"),n.consume(o),n.exit("referenceMarker"),n.exit("reference"),l):a(o)}}const iT={name:"labelStartImage",resolveAll:fh.resolveAll,tokenize:lT};function lT(n,l,a){const r=this;let u;return o;function o(p){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(p),n.exit("labelImageMarker"),f}function f(p){return p===91?(n.enter("labelMarker"),n.consume(p),n.exit("labelMarker"),u=n.exit("labelImage"),h):a(p)}function h(p){return p===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(p):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(u),l(p))}}const aT={name:"labelStartLink",resolveAll:fh.resolveAll,tokenize:rT};function rT(n,l,a){const r=this;let u;return o;function o(h){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(h),n.exit("labelMarker"),u=n.exit("labelLink"),f}function f(h){return h===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(h):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(u),l(h))}}const md={name:"lineEnding",tokenize:sT};function sT(n,l){return a;function a(r){return n.enter("lineEnding"),n.consume(r),n.exit("lineEnding"),Pe(n,l,"linePrefix")}}const ao={name:"thematicBreak",tokenize:uT};function uT(n,l,a){let r=0,u;return o;function o(g){return n.enter("thematicBreak"),f(g)}function f(g){return u=g,h(g)}function h(g){return g===u?(n.enter("thematicBreakSequence"),p(g)):r>=3&&(g===null||Ae(g))?(n.exit("thematicBreak"),l(g)):a(g)}function p(g){return g===u?(n.consume(g),r++,p):(n.exit("thematicBreakSequence"),Ue(g)?Pe(n,h,"whitespace")(g):h(g))}}const kn={continuation:{tokenize:dT},exit:pT,name:"list",tokenize:fT},oT={partial:!0,tokenize:mT},cT={partial:!0,tokenize:hT};function fT(n,l,a){const r=this,u=r.events[r.events.length-1];let o=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,f=0;return h;function h(x){const k=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:Ud(x)){if(r.containerState.type||(r.containerState.type=k,n.enter(k,{_container:!0})),k==="listUnordered")return n.enter("listItemPrefix"),x===42||x===45?n.check(ao,a,g)(x):g(x);if(!r.interrupt||x===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),p(x)}return a(x)}function p(x){return Ud(x)&&++f<10?(n.consume(x),p):(!r.interrupt||f<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(n.exit("listItemValue"),g(x)):a(x)}function g(x){return n.enter("listItemMarker"),n.consume(x),n.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,n.check(Ss,r.interrupt?a:y,n.attempt(oT,S,m))}function y(x){return r.containerState.initialBlankLine=!0,o++,S(x)}function m(x){return Ue(x)?(n.enter("listItemPrefixWhitespace"),n.consume(x),n.exit("listItemPrefixWhitespace"),S):a(x)}function S(x){return r.containerState.size=o+r.sliceSerialize(n.exit("listItemPrefix"),!0).length,l(x)}}function dT(n,l,a){const r=this;return r.containerState._closeFlow=void 0,n.check(Ss,u,o);function u(h){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Pe(n,l,"listItemIndent",r.containerState.size+1)(h)}function o(h){return r.containerState.furtherBlankLines||!Ue(h)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,f(h)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,n.attempt(cT,l,f)(h))}function f(h){return r.containerState._closeFlow=!0,r.interrupt=void 0,Pe(n,n.attempt(kn,l,a),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function hT(n,l,a){const r=this;return Pe(n,u,"listItemIndent",r.containerState.size+1);function u(o){const f=r.events[r.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===r.containerState.size?l(o):a(o)}}function pT(n){n.exit(this.containerState.type)}function mT(n,l,a){const r=this;return Pe(n,u,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(o){const f=r.events[r.events.length-1];return!Ue(o)&&f&&f[1].type==="listItemPrefixWhitespace"?l(o):a(o)}}const ev={name:"setextUnderline",resolveTo:gT,tokenize:yT};function gT(n,l){const a=new oo;let r=n.length,u,o,f;for(;r--;)if(n[r][0]==="enter"){if(n[r][1].type==="content"){u=r;break}n[r][1].type==="paragraph"&&(o=r)}else n[r][1].type==="content"&&a.add(r,1,[]),!f&&n[r][1].type==="definition"&&(f=r);const h={type:"setextHeading",start:{...n[u][1].start},end:{...n[n.length-1][1].end}};return n[o][1].type="setextHeadingText",f?(a.add(o,0,[["enter",h,l]]),a.add(f+1,0,[["exit",n[u][1],l]]),n[u][1].end={...n[f][1].end}):n[u][1]=h,a.add(n.length,0,[["exit",h,l]]),a.consume(n),n}function yT(n,l,a){const r=this;let u;return o;function o(g){let y=r.events.length,m;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){m=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(n.enter("setextHeadingLine"),u=g,f(g)):a(g)}function f(g){return n.enter("setextHeadingLineSequence"),h(g)}function h(g){return g===u?(n.consume(g),h):(n.exit("setextHeadingLineSequence"),Ue(g)?Pe(n,p,"lineSuffix")(g):p(g))}function p(g){return g===null||Ae(g)?(n.exit("setextHeadingLine"),l(g)):a(g)}}const vT={tokenize:bT};function bT(n){const l=this,a=n.attempt(Ss,r,n.attempt(this.parser.constructs.flowInitial,u,Pe(n,n.attempt(this.parser.constructs.flow,u,n.attempt(CE,u)),"linePrefix")));return a;function r(o){if(o===null){n.consume(o);return}return n.enter("lineEndingBlank"),n.consume(o),n.exit("lineEndingBlank"),l.currentConstruct=void 0,a}function u(o){if(o===null){n.consume(o);return}return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),l.currentConstruct=void 0,a}}const xT={resolveAll:Kb()},ST=Zb("string"),wT=Zb("text");function Zb(n){return{resolveAll:Kb(n==="text"?kT:void 0),tokenize:l};function l(a){const r=this,u=this.parser.constructs[n],o=a.attempt(u,f,h);return f;function f(y){return g(y)?o(y):h(y)}function h(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),p}function p(y){return g(y)?(a.exit("data"),o(y)):(a.consume(y),p)}function g(y){if(y===null)return!0;const m=u[y];let S=-1;if(m)for(;++S<m.length;){const x=m[S];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function Kb(n){return l;function l(a,r){let u=-1,o;for(;++u<=a.length;)o===void 0?a[u]&&a[u][1].type==="data"&&(o=u,u++):(!a[u]||a[u][1].type!=="data")&&(u!==o+2&&(a[o][1].end=a[u-1][1].end,a.splice(o+2,u-o-2),u=o+2),o=void 0);return n?n(a,r):a}}function kT(n,l){const a=new oo;let r=0;for(;++r<=n.length;)if((r===n.length||n[r][1].type==="lineEnding")&&n[r-1][1].type==="data"){const u=n[r-1][1],o=l.sliceStream(u);let f=o.length,h=-1,p=0,g;for(;f--;){const y=o[f];if(typeof y=="string"){for(h=y.length;y.charCodeAt(h-1)===32;)p++,h--;if(h)break;h=-1}else if(y===-2)g=!0,p++;else if(y!==-1){f++;break}}if(l._contentTypeTextTrailing&&r===n.length&&(p=0),p){const y={type:r===n.length||g||p<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:f?h:u.start._bufferIndex+h,_index:u.start._index+f,line:u.end.line,column:u.end.column-p,offset:u.end.offset-p},end:{...u.end}};u.end={...y.start},u.start.offset===u.end.offset?Object.assign(u,y):a.add(r,0,[["enter",y,l],["exit",y,l]])}r++}return a.consume(n),n}const ET={42:kn,43:kn,45:kn,48:kn,49:kn,50:kn,51:kn,52:kn,53:kn,54:kn,55:kn,56:kn,57:kn,62:Hb},TT={91:zE},AT={[-2]:pd,[-1]:pd,32:pd},CT={35:BE,42:ao,45:[ev,ao],60:IE,61:ev,95:ao,96:Wy,126:Wy},NT={38:Vb,92:Ib},jT={[-5]:md,[-4]:md,[-3]:md,33:iT,38:Vb,42:Hd,60:[uE,FE],91:aT,92:[DE,Ib],93:fh,95:Hd,96:SE},OT={null:[Hd,xT]},_T={null:[42,95]},zT={null:[]},qT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:_T,contentInitial:TT,disable:zT,document:ET,flow:CT,flowInitial:AT,insideSpan:OT,string:NT,text:jT},Symbol.toStringTag,{value:"Module"}));function RT(n,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={},o=[];let f=[],h=[];const p={attempt:F(ne),check:F(O),consume:M,enter:H,exit:W,interrupt:F(O,{interrupt:!0})},g={code:null,containerState:{},defineSkip:T,events:[],now:k,parser:n,previous:null,sliceSerialize:S,sliceStream:x,write:m};let y=l.tokenize.call(g,p);return l.resolveAll&&o.push(l),g;function m(Z){return f=Fn(f,Z),C(),f[f.length-1]!==null?[]:(ie(l,0),g.events=Eo(o,g.events,g),g.events)}function S(Z,ee){return DT(x(Z),ee)}function x(Z){return MT(f,Z)}function k(){const{_bufferIndex:Z,_index:ee,line:we,column:Re,offset:le}=r;return{_bufferIndex:Z,_index:ee,line:we,column:Re,offset:le}}function T(Z){u[Z.line]=Z.column,_()}function C(){for(;r._index<f.length;){const Z=f[r._index];if(typeof Z=="string"){const ee=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===ee&&r._bufferIndex<Z.length;)E(Z.charCodeAt(r._bufferIndex))}else E(Z)}}function E(Z){y=y(Z)}function M(Z){Ae(Z)?(r.line++,r.column=1,r.offset+=Z===-3?2:1,_()):Z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===f[r._index].length&&(r._bufferIndex=-1,r._index++)),g.previous=Z}function H(Z,ee){const we=ee||{};return we.type=Z,we.start=k(),g.events.push(["enter",we,g]),h.push(we),we}function W(Z){const ee=h.pop();return ee.end=k(),g.events.push(["exit",ee,g]),ee}function ne(Z,ee){ie(Z,ee.from)}function O(Z,ee){ee.restore()}function F(Z,ee){return we;function we(Re,le,Q){let se,ue,ke,j;return Array.isArray(Re)?dt(Re):"tokenize"in Re?dt([Re]):We(Re);function We(fe){return me;function me(Te){const Ce=Te!==null&&fe[Te],Ee=Te!==null&&fe.null,P=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return dt(P)(Te)}}function dt(fe){return se=fe,ue=0,fe.length===0?Q:z(fe[ue])}function z(fe){return me;function me(Te){return j=he(),ke=fe,fe.partial||(g.currentConstruct=fe),fe.name&&g.parser.constructs.disable.null.includes(fe.name)?te():fe.tokenize.call(ee?Object.assign(Object.create(g),ee):g,p,q,te)(Te)}}function q(fe){return Z(ke,j),le}function te(fe){return j.restore(),++ue<se.length?z(se[ue]):Q}}}function ie(Z,ee){Z.resolveAll&&!o.includes(Z)&&o.push(Z),Z.resolve&&ri(g.events,ee,g.events.length-ee,Z.resolve(g.events.slice(ee),g)),Z.resolveTo&&(g.events=Z.resolveTo(g.events,g))}function he(){const Z=k(),ee=g.previous,we=g.currentConstruct,Re=g.events.length,le=Array.from(h);return{from:Re,restore:Q};function Q(){r=Z,g.previous=ee,g.currentConstruct=we,g.events.length=Re,h=le,_()}}function _(){r.line in u&&r.column<2&&(r.column=u[r.line],r.offset+=u[r.line]-1)}}function MT(n,l){const a=l.start._index,r=l.start._bufferIndex,u=l.end._index,o=l.end._bufferIndex;let f;if(a===u)f=[n[a].slice(r,o)];else{if(f=n.slice(a,u),r>-1){const h=f[0];typeof h=="string"?f[0]=h.slice(r):f.shift()}o>0&&f.push(n[u].slice(0,o))}return f}function DT(n,l){let a=-1;const r=[];let u;for(;++a<n.length;){const o=n[a];let f;if(typeof o=="string")f=o;else switch(o){case-5:{f="\r";break}case-4:{f=`
23
+ `;break}case-3:{f=`\r
24
+ `;break}case-2:{f=l?" ":" ";break}case-1:{if(!l&&u)continue;f=" ";break}default:f=String.fromCharCode(o)}u=o===-2,r.push(f)}return r.join("")}function LT(n){const r={constructs:Db([qT,...(n||{}).extensions||[]]),content:u(tE),defined:[],document:u(iE),flow:u(vT),lazy:{},string:u(ST),text:u(wT)};return r;function u(o){return f;function f(h){return RT(r,o,h)}}}function BT(n){for(;!Yb(n););return n}const tv=/[\0\t\n\r]/g;function UT(){let n=1,l="",a=!0,r;return u;function u(o,f,h){o=l+(typeof o=="string"?o.toString():new TextDecoder(f||void 0).decode(o));const p=[];let g=0;for(l="",a&&(o.charCodeAt(0)===65279&&g++,a=void 0);g<o.length;){tv.lastIndex=g;const y=tv.exec(o),m=y&&y.index!==void 0?y.index:o.length,S=o.charCodeAt(m);if(!y){l=o.slice(g);break}if(S===10&&g===m&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),g<m&&(p.push(o.slice(g,m)),n+=m-g),S){case 0:{p.push(65533),n++;break}case 9:{const x=Math.ceil(n/4)*4;for(p.push(-2);n++<x;)p.push(-1);break}case 10:{p.push(-4),n=1;break}default:r=!0,n=1}g=m+1}return h&&(r&&p.push(-5),l&&p.push(l),p.push(null)),p}}const HT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function IT(n){return n.replace(HT,VT)}function VT(n,l,a){if(l)return l;if(a.charCodeAt(0)===35){const u=a.charCodeAt(1),o=u===120||u===88;return Lb(a.slice(o?2:1),o?16:10)}return ch(a)||n}const Jb={}.hasOwnProperty;function YT(n,l,a){return l&&typeof l=="object"&&(a=l,l=void 0),GT(a)(BT(LT(a).document().write(UT()(n,l,!0))))}function GT(n){const l={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:f(rt),autolinkProtocol:_,autolinkEmail:_,atxHeading:f(zt),blockQuote:f(P),characterEscape:_,characterReference:_,codeFenced:f(de),codeFencedFenceInfo:h,codeFencedFenceMeta:h,codeIndented:f(de,h),codeText:f(at,h),codeTextData:_,data:_,codeFlowValue:_,definition:f(_t),definitionDestinationString:h,definitionLabelString:h,definitionTitleString:h,emphasis:f(xe),hardBreakEscape:f(vt),hardBreakTrailing:f(vt),htmlFlow:f(Ze,h),htmlFlowData:_,htmlText:f(Ze,h),htmlTextData:_,image:f(_e),label:h,link:f(rt),listItem:f(un),listItemValue:x,listOrdered:f(wt,S),listUnordered:f(wt),paragraph:f(Zt),reference:q,referenceString:h,resourceDestinationString:h,resourceTitleString:h,setextHeading:f(zt),strong:f(Vt),thematicBreak:f(Yt)},exit:{atxHeading:g(),atxHeadingSequence:O,autolink:g(),autolinkEmail:Ee,autolinkProtocol:Ce,blockQuote:g(),characterEscapeValue:Z,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:me,characterReference:Te,codeFenced:g(E),codeFencedFence:C,codeFencedFenceInfo:k,codeFencedFenceMeta:T,codeFlowValue:Z,codeIndented:g(M),codeText:g(Q),codeTextData:Z,data:Z,definition:g(),definitionDestinationString:ne,definitionLabelString:H,definitionTitleString:W,emphasis:g(),hardBreakEscape:g(we),hardBreakTrailing:g(we),htmlFlow:g(Re),htmlFlowData:Z,htmlText:g(le),htmlTextData:Z,image:g(ue),label:j,labelText:ke,lineEnding:ee,link:g(se),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:te,resourceDestinationString:We,resourceTitleString:dt,resource:z,setextHeading:g(he),setextHeadingLineSequence:ie,setextHeadingText:F,strong:g(),thematicBreak:g()}};$b(l,(n||{}).mdastExtensions||[]);const a={};return r;function r(X){let ae={type:"root",children:[],position:void 0};const ye={stack:[ae],tokenStack:[],config:l,enter:p,exit:y,buffer:h,resume:m,data:a},ge=[],ht=[];let ze=-1;for(;++ze<X.length;)if(ht.push(X[ze]),X[ze][1].type==="listOrdered"||X[ze][1].type==="listUnordered")if(X[ze][0]==="enter")ge.push(ht.length-1);else{const kt=ge.pop();o(ht,kt)}for(X=ht,ze=-1;++ze<X.length;){const kt=l[X[ze][0]];X[ze][0]==="enter"&&l.beforeEnter.length>0&&u(l.beforeEnter,{...ye,sliceSerialize:X[ze][2].sliceSerialize},X[ze][1]),Jb.call(kt,X[ze][1].type)&&kt[X[ze][1].type].call({...ye,sliceSerialize:X[ze][2].sliceSerialize},X[ze][1]),X[ze][0]==="exit"&&l.afterExit.length>0&&u(l.afterExit,{...ye,sliceSerialize:X[ze][2].sliceSerialize},X[ze][1])}if(ye.tokenStack.length>0){const kt=ye.tokenStack[ye.tokenStack.length-1];(kt[1]||nv).call(ye,void 0,kt[0])}for(ae.position={start:Nl(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:Nl(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},ze=-1;++ze<l.transforms.length;)ae=l.transforms[ze](ae)||ae;return ae}function u(X,ae,ye){let ge=-1;for(;++ge<X.length;)X[ge].call(ae,ye)}function o(X,ae){const ye=X.length-1;let ge=ae-1,ht=-1,ze=!1,kt,Gt,on,At;const cn=[];for(;++ge<=ye;){const Kt=X[ge];switch(Kt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Kt[0]==="enter"?ht++:ht--,At=void 0;break}case"lineEndingBlank":{Kt[0]==="enter"&&(kt&&!At&&!ht&&!on&&(on=ge),At=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:At=void 0}if(!ht&&Kt[0]==="enter"&&Kt[1].type==="listItemPrefix"||ht===-1&&Kt[0]==="exit"&&(Kt[1].type==="listUnordered"||Kt[1].type==="listOrdered")){if(kt){let Mn=ge;for(Gt=void 0;Mn--;){const bt=X[Mn];if(bt[1].type==="lineEnding"||bt[1].type==="lineEndingBlank"){if(bt[0]==="exit")continue;Gt&&(X[Gt][1].type="lineEndingBlank",ze=!0),bt[1].type="lineEnding",Gt=Mn}else if(!(bt[1].type==="linePrefix"||bt[1].type==="blockQuotePrefix"||bt[1].type==="blockQuotePrefixWhitespace"||bt[1].type==="blockQuoteMarker"||bt[1].type==="listItemIndent"))break}on&&(!Gt||on<Gt)&&(kt._spread=!0),kt.end=Object.assign({},Gt?X[Gt][1].start:Kt[1].end),cn.push({at:Gt||ge,event:["exit",kt,Kt[2]]})}if(Kt[1].type==="listItemPrefix"){const Mn={type:"listItem",_spread:!1,start:Object.assign({},Kt[1].start),end:void 0};kt=Mn,cn.push({at:ge,event:["enter",Mn,Kt[2]]}),on=void 0,At=!0}}}const _l=X.splice(ae);let Ct=0;for(ge=-1;++ge<_l.length;){for(;Ct<cn.length&&cn[Ct].at===ae+ge;)X.push(cn[Ct++].event);X.push(_l[ge])}X[ae][1]._spread=ze}function f(X,ae){return ye;function ye(ge){p.call(this,X(ge),ge),ae&&ae.call(this,ge)}}function h(){this.stack.push({type:"fragment",children:[]})}function p(X,ae,ye){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([ae,ye||void 0]),X.position={start:Nl(ae.start),end:void 0}}function g(X){return ae;function ae(ye){X&&X.call(this,ye),y.call(this,ye)}}function y(X,ae){const ye=this.stack.pop(),ge=this.tokenStack.pop();if(!ge)throw new Error("Cannot close `"+X.type+"` ("+ss({start:X.start,end:X.end})+"): it’s not open");ge[0].type!==X.type&&(ae?ae.call(this,X,ge[0]):(ge[1]||nv).call(this,X,ge[0])),ye.position.end=Nl(X.end)}function m(){return ko(this.stack.pop())}function S(){this.data.expectingFirstListItemValue=!0}function x(X){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function k(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=X}function T(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=X}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function M(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X.replace(/(\r?\n|\r)$/g,"")}function H(X){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.label=ae,ye.identifier=si(this.sliceSerialize(X)).toLowerCase()}function W(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.title=X}function ne(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.url=X}function O(X){const ae=this.stack[this.stack.length-1];if(!ae.depth){const ye=this.sliceSerialize(X).length;ae.depth=ye}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function ie(X){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function he(){this.data.setextHeadingSlurpLineEnding=void 0}function _(X){const ye=this.stack[this.stack.length-1].children;let ge=ye[ye.length-1];(!ge||ge.type!=="text")&&(ge=Rn(),ge.position={start:Nl(X.start),end:void 0},ye.push(ge)),this.stack.push(ge)}function Z(X){const ae=this.stack.pop();ae.value+=this.sliceSerialize(X),ae.position.end=Nl(X.end)}function ee(X){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ye=ae.children[ae.children.length-1];ye.position.end=Nl(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(ae.type)&&(_.call(this,X),Z.call(this,X))}function we(){this.data.atHardBreak=!0}function Re(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X}function le(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X}function Q(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X}function se(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ae,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function ue(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ae,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function ke(X){const ae=this.sliceSerialize(X),ye=this.stack[this.stack.length-2];ye.label=IT(ae),ye.identifier=si(ae).toLowerCase()}function j(){const X=this.stack[this.stack.length-1],ae=this.resume(),ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,ye.type==="link"){const ge=X.children;ye.children=ge}else ye.alt=ae}function We(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.url=X}function dt(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.title=X}function z(){this.data.inReference=void 0}function q(){this.data.referenceType="collapsed"}function te(X){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.label=ae,ye.identifier=si(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function fe(X){this.data.characterReferenceType=X.type}function me(X){const ae=this.sliceSerialize(X),ye=this.data.characterReferenceType;let ge;ye?(ge=Lb(ae,ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ge=ch(ae);const ht=this.stack[this.stack.length-1];ht.value+=ge}function Te(X){const ae=this.stack.pop();ae.position.end=Nl(X.end)}function Ce(X){Z.call(this,X);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(X)}function Ee(X){Z.call(this,X);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(X)}function P(){return{type:"blockquote",children:[],position:void 0}}function de(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function at(){return{type:"inlineCode",value:"",position:void 0}}function _t(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function xe(){return{type:"emphasis",children:[],position:void 0}}function zt(){return{type:"heading",depth:0,children:[],position:void 0}}function vt(){return{type:"break",position:void 0}}function Ze(){return{type:"html",value:"",position:void 0}}function _e(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function rt(){return{type:"link",title:null,url:"",children:[],position:void 0}}function wt(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[],position:void 0}}function un(X){return{type:"listItem",spread:X._spread,checked:null,children:[],position:void 0}}function Zt(){return{type:"paragraph",children:[],position:void 0}}function Vt(){return{type:"strong",children:[],position:void 0}}function Rn(){return{type:"text",value:"",position:void 0}}function Yt(){return{type:"thematicBreak",position:void 0}}}function Nl(n){return{line:n.line,column:n.column,offset:n.offset}}function $b(n,l){let a=-1;for(;++a<l.length;){const r=l[a];Array.isArray(r)?$b(n,r):QT(n,r)}}function QT(n,l){let a;for(a in l)if(Jb.call(l,a))switch(a){case"canContainEols":{const r=l[a];r&&n[a].push(...r);break}case"transforms":{const r=l[a];r&&n[a].push(...r);break}case"afterExit":case"beforeEnter":{const r=l[a];r&&n[a].push(r);break}case"enter":case"exit":{const r=l[a];r&&Object.assign(n[a],r);break}}}function nv(n,l){throw n?new Error("Cannot close `"+n.type+"` ("+ss({start:n.start,end:n.end})+"): a different token (`"+l.type+"`, "+ss({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+ss({start:l.start,end:l.end})+") is still open")}function FT(n){const l=this;l.parser=a;function a(r){return YT(r,{...l.data("settings"),...n,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function XT(n,l){const a={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(l),!0)};return n.patch(l,a),n.applyData(l,a)}function ZT(n,l){const a={type:"element",tagName:"br",properties:{},children:[]};return n.patch(l,a),[n.applyData(l,a),{type:"text",value:`
25
+ `}]}function KT(n,l){const a=l.value?l.value+`
26
+ `:"",r={},u=l.lang?l.lang.split(/\s+/):[];u.length>0&&(r.className=["language-"+u[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:a}]};return l.meta&&(o.data={meta:l.meta}),n.patch(l,o),o=n.applyData(l,o),o={type:"element",tagName:"pre",properties:{},children:[o]},n.patch(l,o),o}function JT(n,l){const a={type:"element",tagName:"del",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function $T(n,l){const a={type:"element",tagName:"em",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function PT(n,l){const a=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),u=ur(r.toLowerCase()),o=n.footnoteOrder.indexOf(r);let f,h=n.footnoteCounts.get(r);h===void 0?(h=0,n.footnoteOrder.push(r),f=n.footnoteOrder.length):f=o+1,h+=1,n.footnoteCounts.set(r,h);const p={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+u,id:a+"fnref-"+u+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(l,p);const g={type:"element",tagName:"sup",properties:{},children:[p]};return n.patch(l,g),n.applyData(l,g)}function WT(n,l){const a={type:"element",tagName:"h"+l.depth,properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function eA(n,l){if(n.options.allowDangerousHtml){const a={type:"raw",value:l.value};return n.patch(l,a),n.applyData(l,a)}}function Pb(n,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=n.all(l),o=u[0];o&&o.type==="text"?o.value="["+o.value:u.unshift({type:"text",value:"["});const f=u[u.length-1];return f&&f.type==="text"?f.value+=r:u.push({type:"text",value:r}),u}function tA(n,l){const a=String(l.identifier).toUpperCase(),r=n.definitionById.get(a);if(!r)return Pb(n,l);const u={src:ur(r.url||""),alt:l.alt};r.title!==null&&r.title!==void 0&&(u.title=r.title);const o={type:"element",tagName:"img",properties:u,children:[]};return n.patch(l,o),n.applyData(l,o)}function nA(n,l){const a={src:ur(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 n.patch(l,r),n.applyData(l,r)}function iA(n,l){const a={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};n.patch(l,a);const r={type:"element",tagName:"code",properties:{},children:[a]};return n.patch(l,r),n.applyData(l,r)}function lA(n,l){const a=String(l.identifier).toUpperCase(),r=n.definitionById.get(a);if(!r)return Pb(n,l);const u={href:ur(r.url||"")};r.title!==null&&r.title!==void 0&&(u.title=r.title);const o={type:"element",tagName:"a",properties:u,children:n.all(l)};return n.patch(l,o),n.applyData(l,o)}function aA(n,l){const a={href:ur(l.url)};l.title!==null&&l.title!==void 0&&(a.title=l.title);const r={type:"element",tagName:"a",properties:a,children:n.all(l)};return n.patch(l,r),n.applyData(l,r)}function rA(n,l,a){const r=n.all(l),u=a?sA(a):Wb(l),o={},f=[];if(typeof l.checked=="boolean"){const y=r[0];let m;y&&y.type==="element"&&y.tagName==="p"?m=y:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let h=-1;for(;++h<r.length;){const y=r[h];(u||h!==0||y.type!=="element"||y.tagName!=="p")&&f.push({type:"text",value:`
27
+ `}),y.type==="element"&&y.tagName==="p"&&!u?f.push(...y.children):f.push(y)}const p=r[r.length-1];p&&(u||p.type!=="element"||p.tagName!=="p")&&f.push({type:"text",value:`
28
+ `});const g={type:"element",tagName:"li",properties:o,children:f};return n.patch(l,g),n.applyData(l,g)}function sA(n){let l=!1;if(n.type==="list"){l=n.spread||!1;const a=n.children;let r=-1;for(;!l&&++r<a.length;)l=Wb(a[r])}return l}function Wb(n){const l=n.spread;return l??n.children.length>1}function uA(n,l){const a={},r=n.all(l);let u=-1;for(typeof l.start=="number"&&l.start!==1&&(a.start=l.start);++u<r.length;){const f=r[u];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const o={type:"element",tagName:l.ordered?"ol":"ul",properties:a,children:n.wrap(r,!0)};return n.patch(l,o),n.applyData(l,o)}function oA(n,l){const a={type:"element",tagName:"p",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function cA(n,l){const a={type:"root",children:n.wrap(n.all(l))};return n.patch(l,a),n.applyData(l,a)}function fA(n,l){const a={type:"element",tagName:"strong",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function dA(n,l){const a=n.all(l),r=a.shift(),u=[];if(r){const f={type:"element",tagName:"thead",properties:{},children:n.wrap([r],!0)};n.patch(l.children[0],f),u.push(f)}if(a.length>0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(a,!0)},h=rh(l.children[1]),p=jb(l.children[l.children.length-1]);h&&p&&(f.position={start:h,end:p}),u.push(f)}const o={type:"element",tagName:"table",properties:{},children:n.wrap(u,!0)};return n.patch(l,o),n.applyData(l,o)}function hA(n,l,a){const r=a?a.children:void 0,o=(r?r.indexOf(l):1)===0?"th":"td",f=a&&a.type==="table"?a.align:void 0,h=f?f.length:l.children.length;let p=-1;const g=[];for(;++p<h;){const m=l.children[p],S={},x=f?f[p]:void 0;x&&(S.align=x);let k={type:"element",tagName:o,properties:S,children:[]};m&&(k.children=n.all(m),n.patch(m,k),k=n.applyData(m,k)),g.push(k)}const y={type:"element",tagName:"tr",properties:{},children:n.wrap(g,!0)};return n.patch(l,y),n.applyData(l,y)}function pA(n,l){const a={type:"element",tagName:"td",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}const iv=9,lv=32;function mA(n){const l=String(n),a=/\r?\n|\r/g;let r=a.exec(l),u=0;const o=[];for(;r;)o.push(av(l.slice(u,r.index),u>0,!0),r[0]),u=r.index+r[0].length,r=a.exec(l);return o.push(av(l.slice(u),u>0,!1)),o.join("")}function av(n,l,a){let r=0,u=n.length;if(l){let o=n.codePointAt(r);for(;o===iv||o===lv;)r++,o=n.codePointAt(r)}if(a){let o=n.codePointAt(u-1);for(;o===iv||o===lv;)u--,o=n.codePointAt(u-1)}return u>r?n.slice(r,u):""}function gA(n,l){const a={type:"text",value:mA(String(l.value))};return n.patch(l,a),n.applyData(l,a)}function yA(n,l){const a={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(l,a),n.applyData(l,a)}const vA={blockquote:XT,break:ZT,code:KT,delete:JT,emphasis:$T,footnoteReference:PT,heading:WT,html:eA,imageReference:tA,image:nA,inlineCode:iA,linkReference:lA,link:aA,listItem:rA,list:uA,paragraph:oA,root:cA,strong:fA,table:dA,tableCell:pA,tableRow:hA,text:gA,thematicBreak:yA,toml:Pu,yaml:Pu,definition:Pu,footnoteDefinition:Pu};function Pu(){}const e0=-1,To=0,os=1,co=2,dh=3,hh=4,ph=5,mh=6,t0=7,n0=8,{defineProperty:bA}=Object,i0=typeof self=="object"?self:globalThis,rv=(n,l)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new i0[n](l)},xA=(n,l)=>{const a=(u,o)=>(n.set(o,u),u),r=u=>{if(n.has(u))return n.get(u);const[o,f]=l[u];switch(o){case To:case e0:return a(f,u);case os:{const h=a([],u);for(const p of f)h.push(r(p));return h}case co:{const h=a({},u);for(const[p,g]of f){const y=r(p),m=r(g);y==="__proto__"?bA(h,y,{value:m,configurable:!0,enumerable:!0,writable:!0}):h[y]=m}return h}case dh:return a(new Date(f),u);case hh:{const{source:h,flags:p}=f;return a(new RegExp(h,p),u)}case ph:{const h=a(new Map,u);for(const[p,g]of f)h.set(r(p),r(g));return h}case mh:{const h=a(new Set,u);for(const p of f)h.add(r(p));return h}case t0:{const{name:h,message:p}=f;return a(typeof i0[h]=="function"?rv(h,p):new Error(p),u)}case n0:return a(BigInt(f),u);case"BigInt":return a(Object(BigInt(f)),u);case"ArrayBuffer":return a(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:h}=new Uint8Array(f);return a(new DataView(h),f)}case"-0":return-0}return a(rv(o,f),u)};return r},sv=n=>xA(new Map,n)(0),oa="",{toString:SA}={},{keys:wA,is:kA}=Object,ls=n=>{const l=typeof n;if(l!=="object"||!n)return[To,l];const a=SA.call(n).slice(8,-1);switch(a){case"Array":return[os,oa];case"Object":return[co,oa];case"Date":return[dh,oa];case"RegExp":return[hh,oa];case"Map":return[ph,oa];case"Set":return[mh,oa];case"DataView":return[os,a]}return a.includes("Array")?[os,a]:n instanceof Error?[t0,n.name||"Error"]:[co,a]},Wu=([n,l])=>n===To&&(l==="function"||l==="symbol"),EA=(n,l,a,r)=>{const u=(f,h)=>{const p=r.push(f)-1;return a.set(h,p),p},o=f=>{if(a.has(f))return a.get(f);let[h,p]=ls(f);switch(h){case To:{let y=f;switch(p){case"bigint":h=n0,y=f.toString();break;case"number":if(!f&&kA(f,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+p);y=null;break;case"undefined":return u([e0],f)}return u([h,y],f)}case os:{if(p){let S=f;return p==="DataView"?S=new Uint8Array(f.buffer):p==="ArrayBuffer"&&(S=new Uint8Array(f)),u([p,[...S]],f)}const y=[],m=u([h,y],f);for(const S of f)y.push(o(S));return m}case co:{if(p)switch(p){case"BigInt":return u([p,f.toString()],f);case"Boolean":case"Number":case"String":return u([p,f.valueOf()],f)}if(l&&"toJSON"in f)return o(f.toJSON());const y=[],m=u([h,y],f);for(const S of wA(f))(n||!Wu(ls(f[S])))&&y.push([o(S),o(f[S])]);return m}case dh:return u([h,isNaN(f.getTime())?oa:f.toISOString()],f);case hh:{const{source:y,flags:m}=f;return u([h,{source:y,flags:m}],f)}case ph:{const y=[],m=u([h,y],f);for(const[S,x]of f)(n||!(Wu(ls(S))||Wu(ls(x))))&&y.push([o(S),o(x)]);return m}case mh:{const y=[],m=u([h,y],f);for(const S of f)(n||!Wu(ls(S)))&&y.push(o(S));return m}}const{message:g}=f;return u([h,{name:p,message:g}],f)};return o},uv=(n,{json:l,lossy:a}={})=>{const r=[];return EA(!(l||a),!!l,new Map,r)(n),r},fo=typeof structuredClone=="function"?(n,l)=>l&&("json"in l||"lossy"in l)?sv(uv(n,l)):structuredClone(n):(n,l)=>sv(uv(n,l));function TA(n,l){const a=[{type:"text",value:"↩"}];return l>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),a}function AA(n,l){return"Back to reference "+(n+1)+(l>1?"-"+l:"")}function CA(n){const l=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",a=n.options.footnoteBackContent||TA,r=n.options.footnoteBackLabel||AA,u=n.options.footnoteLabel||"Footnotes",o=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let p=-1;for(;++p<n.footnoteOrder.length;){const g=n.footnoteById.get(n.footnoteOrder[p]);if(!g)continue;const y=n.all(g),m=String(g.identifier).toUpperCase(),S=ur(m.toLowerCase());let x=0;const k=[],T=n.footnoteCounts.get(m);for(;T!==void 0&&++x<=T;){k.length>0&&k.push({type:"text",value:" "});let M=typeof a=="string"?a:a(p,x);typeof M=="string"&&(M={type:"text",value:M}),k.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+S+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,x),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const C=y[y.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const M=C.children[C.children.length-1];M&&M.type==="text"?M.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...k)}else y.push(...k);const E={type:"element",tagName:"li",properties:{id:l+"fn-"+S},children:n.wrap(y,!0)};n.patch(g,E),h.push(E)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...fo(f),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
29
+ `},{type:"element",tagName:"ol",properties:{},children:n.wrap(h,!0)},{type:"text",value:`
30
+ `}]}}const Ao=(function(n){if(n==null)return _A;if(typeof n=="function")return Co(n);if(typeof n=="object")return Array.isArray(n)?NA(n):jA(n);if(typeof n=="string")return OA(n);throw new Error("Expected function, string, or object as test")});function NA(n){const l=[];let a=-1;for(;++a<n.length;)l[a]=Ao(n[a]);return Co(r);function r(...u){let o=-1;for(;++o<l.length;)if(l[o].apply(this,u))return!0;return!1}}function jA(n){const l=n;return Co(a);function a(r){const u=r;let o;for(o in n)if(u[o]!==l[o])return!1;return!0}}function OA(n){return Co(l);function l(a){return a&&a.type===n}}function Co(n){return l;function l(a,r,u){return!!(zA(a)&&n.call(this,a,typeof r=="number"?r:void 0,u||void 0))}}function _A(){return!0}function zA(n){return n!==null&&typeof n=="object"&&"type"in n}const l0=[],qA=!0,cs=!1,Yd="skip";function Gd(n,l,a,r){if(!n||typeof n!="object")throw new Error("Unexpected value `"+n+"` for `tree`, expected node");let u=!0,o,f,h,p;if(typeof a=="function"||a&&typeof a=="object"?(o=l,f=a,r&&(u=!1)):(f=l,a&&(u=!1)),typeof f=="function")h=f;else if(f&&typeof f=="object"){if(!(f.enter===null||f.enter===void 0))if(typeof f.enter=="function")h=f.enter;else throw new Error("Unexpected value `"+f.enter+"` for `visitors.enter`, expected optional visitor");if(typeof f.exit=="function")p=f.exit;else throw new Error("Unexpected value `"+f.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+f+"` for `enter` or `visitors`, expected visitor or object with visitors");const g=Ao(o),y=u?1:-1;m(n,void 0,[])();function m(S,x,k){const T=S&&typeof S=="object"?S:{};if(typeof T.type=="string"){const E=typeof T.tagName=="string"?T.tagName:typeof T.name=="string"?T.name:void 0;Object.defineProperty(C,"name",{value:"node ("+(S.type+(E?"<"+E+">":""))+")"})}return C;function C(){const E=!o||g(S,x,k[k.length-1]||void 0);let M=l0;if(h&&E&&(M=ov(h(S,k,x)),M[0]===cs))return M;if("children"in S&&S.children){const H=S;if(H.children&&M[0]!==Yd){let W=(u?-1:H.children.length)+y;const ne=[...k,H];for(;W>-1&&W<H.children.length;){const O=H.children[W],F=m(O,W,ne)();if(F[0]===cs)return F;W=typeof F[1]=="number"?F[1]:W+y}}}if(p&&E){const H=ov(p(S,k,x));if(H[0]===Yd)throw new Error("Unexpected value `"+H[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(H[0]===cs||typeof H[1]=="number")return H}return M}}}function ov(n){return Array.isArray(n)?n:typeof n=="number"?[qA,n]:n==null?l0:[n]}function No(n,l,a,r){let u,o,f;o=l,f=a,typeof o=="function"?Gd(n,u,Qd(o),f):Gd(n,u,RA(o),f)}function RA(n){return!n||typeof n!="object"?n:{enter:typeof n.enter=="function"?Qd(n.enter):n.enter,exit:typeof n.exit=="function"?Qd(n.exit):n.exit}}function Qd(n){return l;function l(a,r,u){return n(a,u,r[r.length-1])}}const Fd={}.hasOwnProperty,MA={};function DA(n,l){const a=l||MA,r=new Map,u=new Map,o=new Map,f={...vA,...a.handlers},h={all:g,applyData:BA,definitionById:r,footnoteById:u,footnoteCounts:o,footnoteOrder:[],handlers:f,one:p,options:a,patch:LA,wrap:HA};return No(n,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const m=y.type==="definition"?r:u,S=String(y.identifier).toUpperCase();m.has(S)||m.set(S,y)}}),h;function p(y,m){const S=y.type,x=h.handlers[S];if(Fd.call(h.handlers,S)&&x)return x(h,y,m);if(h.options.passThrough&&h.options.passThrough.includes(S)){if("children"in y){const{children:T,...C}=y,E=fo(C);return E.children=h.all(y),E}return fo(y)}return(h.options.unknownHandler||UA)(h,y,m)}function g(y){const m=[];if("children"in y){const S=y.children;let x=-1;for(;++x<S.length;){const k=h.one(S[x],y);if(k){if(x&&S[x-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=cv(k.value)),!Array.isArray(k)&&k.type==="element")){const T=k.children[0];T&&T.type==="text"&&(T.value=cv(T.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function LA(n,l){n.position&&(l.position=Ak(n))}function BA(n,l){let a=l;if(n&&n.data){const r=n.data.hName,u=n.data.hChildren,o=n.data.hProperties;if(typeof r=="string")if(a.type==="element")a.tagName=r;else{const f="children"in a?a.children:[a];a={type:"element",tagName:r,properties:{},children:f}}a.type==="element"&&o&&Object.assign(a.properties,fo(o)),"children"in a&&a.children&&u!==null&&u!==void 0&&(a.children=u)}return a}function UA(n,l){const a=l.data||{},r="value"in l&&!(Fd.call(a,"hProperties")||Fd.call(a,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:n.all(l)};return n.patch(l,r),n.applyData(l,r)}function HA(n,l){const a=[];let r=-1;for(l&&a.push({type:"text",value:`
31
+ `});++r<n.length;)r&&a.push({type:"text",value:`
32
+ `}),a.push(n[r]);return l&&n.length>0&&a.push({type:"text",value:`
33
+ `}),a}function cv(n){let l=0,a=n.charCodeAt(l);for(;a===9||a===32;)l++,a=n.charCodeAt(l);return n.slice(l)}function fv(n,l){const a=DA(n,l),r=a.one(n,void 0),u=CA(a),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return u&&o.children.push({type:"text",value:`
34
+ `},u),o}function IA(n,l){return n&&"run"in n?async function(a,r){const u=fv(a,{file:r,...l});await n.run(u,r)}:function(a,r){return fv(a,{file:r,...n||l})}}function dv(n){if(n)throw n}var gd,hv;function VA(){if(hv)return gd;hv=1;var n=Object.prototype.hasOwnProperty,l=Object.prototype.toString,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,u=function(g){return typeof Array.isArray=="function"?Array.isArray(g):l.call(g)==="[object Array]"},o=function(g){if(!g||l.call(g)!=="[object Object]")return!1;var y=n.call(g,"constructor"),m=g.constructor&&g.constructor.prototype&&n.call(g.constructor.prototype,"isPrototypeOf");if(g.constructor&&!y&&!m)return!1;var S;for(S in g);return typeof S>"u"||n.call(g,S)},f=function(g,y){a&&y.name==="__proto__"?a(g,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):g[y.name]=y.newValue},h=function(g,y){if(y==="__proto__")if(n.call(g,y)){if(r)return r(g,y).value}else return;return g[y]};return gd=function p(){var g,y,m,S,x,k,T=arguments[0],C=1,E=arguments.length,M=!1;for(typeof T=="boolean"&&(M=T,T=arguments[1]||{},C=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});C<E;++C)if(g=arguments[C],g!=null)for(y in g)m=h(T,y),S=h(g,y),T!==S&&(M&&S&&(o(S)||(x=u(S)))?(x?(x=!1,k=m&&u(m)?m:[]):k=m&&o(m)?m:{},f(T,{name:y,newValue:p(M,k,S)})):typeof S<"u"&&f(T,{name:y,newValue:S}));return T},gd}var YA=VA();const yd=_S(YA);function Xd(n){if(typeof n!="object"||n===null)return!1;const l=Object.getPrototypeOf(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function GA(){const n=[],l={run:a,use:r};return l;function a(...u){let o=-1;const f=u.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);h(null,...u);function h(p,...g){const y=n[++o];let m=-1;if(p){f(p);return}for(;++m<u.length;)(g[m]===null||g[m]===void 0)&&(g[m]=u[m]);u=g,y?QA(y,h)(...g):f(null,...g)}}function r(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return n.push(u),l}}function QA(n,l){let a;return r;function r(...f){const h=n.length>f.length;let p;h&&f.push(u);try{p=n.apply(this,f)}catch(g){const y=g;if(h&&a)throw y;return u(y)}h||(p&&p.then&&typeof p.then=="function"?p.then(o,u):p instanceof Error?u(p):o(p))}function u(f,...h){a||(a=!0,l(f,...h))}function o(f){u(null,f)}}const wi={basename:FA,dirname:XA,extname:ZA,join:KA,sep:"/"};function FA(n,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');ws(n);let a=0,r=-1,u=n.length,o;if(l===void 0||l.length===0||l.length>n.length){for(;u--;)if(n.codePointAt(u)===47){if(o){a=u+1;break}}else r<0&&(o=!0,r=u+1);return r<0?"":n.slice(a,r)}if(l===n)return"";let f=-1,h=l.length-1;for(;u--;)if(n.codePointAt(u)===47){if(o){a=u+1;break}}else f<0&&(o=!0,f=u+1),h>-1&&(n.codePointAt(u)===l.codePointAt(h--)?h<0&&(r=u):(h=-1,r=f));return a===r?r=f:r<0&&(r=n.length),n.slice(a,r)}function XA(n){if(ws(n),n.length===0)return".";let l=-1,a=n.length,r;for(;--a;)if(n.codePointAt(a)===47){if(r){l=a;break}}else r||(r=!0);return l<0?n.codePointAt(0)===47?"/":".":l===1&&n.codePointAt(0)===47?"//":n.slice(0,l)}function ZA(n){ws(n);let l=n.length,a=-1,r=0,u=-1,o=0,f;for(;l--;){const h=n.codePointAt(l);if(h===47){if(f){r=l+1;break}continue}a<0&&(f=!0,a=l+1),h===46?u<0?u=l:o!==1&&(o=1):u>-1&&(o=-1)}return u<0||a<0||o===0||o===1&&u===a-1&&u===r+1?"":n.slice(u,a)}function KA(...n){let l=-1,a;for(;++l<n.length;)ws(n[l]),n[l]&&(a=a===void 0?n[l]:a+"/"+n[l]);return a===void 0?".":JA(a)}function JA(n){ws(n);const l=n.codePointAt(0)===47;let a=$A(n,!l);return a.length===0&&!l&&(a="."),a.length>0&&n.codePointAt(n.length-1)===47&&(a+="/"),l?"/"+a:a}function $A(n,l){let a="",r=0,u=-1,o=0,f=-1,h,p;for(;++f<=n.length;){if(f<n.length)h=n.codePointAt(f);else{if(h===47)break;h=47}if(h===47){if(!(u===f-1||o===1))if(u!==f-1&&o===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=f,o=0;continue}}else if(a.length>0){a="",r=0,u=f,o=0;continue}}l&&(a=a.length>0?a+"/..":"..",r=2)}else a.length>0?a+="/"+n.slice(u+1,f):a=n.slice(u+1,f),r=f-u-1;u=f,o=0}else h===46&&o>-1?o++:o=-1}return a}function ws(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const PA={cwd:WA};function WA(){return"/"}function Zd(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function eC(n){if(typeof n=="string")n=new URL(n);else if(!Zd(n)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(n.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return tC(n)}function tC(n){if(n.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=n.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 vd=["history","path","basename","stem","extname","dirname"];class a0{constructor(l){let a;l?Zd(l)?a={path:l}:typeof l=="string"||nC(l)?a={value:l}:a=l:a={},this.cwd="cwd"in a?"":PA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<vd.length;){const o=vd[r];o in a&&a[o]!==void 0&&a[o]!==null&&(this[o]=o==="history"?[...a[o]]:a[o])}let u;for(u in a)vd.includes(u)||(this[u]=a[u])}get basename(){return typeof this.path=="string"?wi.basename(this.path):void 0}set basename(l){xd(l,"basename"),bd(l,"basename"),this.path=wi.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?wi.dirname(this.path):void 0}set dirname(l){pv(this.basename,"dirname"),this.path=wi.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?wi.extname(this.path):void 0}set extname(l){if(bd(l,"extname"),pv(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=wi.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Zd(l)&&(l=eC(l)),xd(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?wi.basename(this.path,this.extname):void 0}set stem(l){xd(l,"stem"),bd(l,"stem"),this.path=wi.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 wo(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 bd(n,l){if(n&&n.includes(wi.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+wi.sep+"`")}function xd(n,l){if(!n)throw new Error("`"+l+"` cannot be empty")}function pv(n,l){if(!n)throw new Error("Setting `"+l+"` requires `path` to be set too")}function nC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const iC=(function(n){const r=this.constructor.prototype,u=r[n],o=function(){return u.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),lC={}.hasOwnProperty;class gh extends iC{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=GA()}copy(){const l=new gh;let a=-1;for(;++a<this.attachers.length;){const r=this.attachers[a];l.use(...r)}return l.data(yd(!0,{},this.namespace)),l}data(l,a){return typeof l=="string"?arguments.length===2?(kd("data",this.frozen),this.namespace[l]=a,this):lC.call(this.namespace,l)&&this.namespace[l]||void 0:l?(kd("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=eo(l),r=this.parser||this.Parser;return Sd("parse",r),r(String(a),a)}process(l,a){const r=this;return this.freeze(),Sd("process",this.parser||this.Parser),wd("process",this.compiler||this.Compiler),a?u(void 0,a):new Promise(u);function u(o,f){const h=eo(l),p=r.parse(h);r.run(p,h,function(y,m,S){if(y||!m||!S)return g(y);const x=m,k=r.stringify(x,S);sC(k)?S.value=k:S.result=k,g(y,S)});function g(y,m){y||!m?f(y):o?o(m):a(void 0,m)}}}processSync(l){let a=!1,r;return this.freeze(),Sd("processSync",this.parser||this.Parser),wd("processSync",this.compiler||this.Compiler),this.process(l,u),gv("processSync","process",a),r;function u(o,f){a=!0,dv(o),r=f}}run(l,a,r){mv(l),this.freeze();const u=this.transformers;return!r&&typeof a=="function"&&(r=a,a=void 0),r?o(void 0,r):new Promise(o);function o(f,h){const p=eo(a);u.run(l,p,g);function g(y,m,S){const x=m||l;y?h(y):f?f(x):r(void 0,x,S)}}}runSync(l,a){let r=!1,u;return this.run(l,a,o),gv("runSync","run",r),u;function o(f,h){dv(f),u=h,r=!0}}stringify(l,a){this.freeze();const r=eo(a),u=this.compiler||this.Compiler;return wd("stringify",u),mv(l),u(l,r)}use(l,...a){const r=this.attachers,u=this.namespace;if(kd("use",this.frozen),l!=null)if(typeof l=="function")p(l,a);else if(typeof l=="object")Array.isArray(l)?h(l):f(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function o(g){if(typeof g=="function")p(g,[]);else if(typeof g=="object")if(Array.isArray(g)){const[y,...m]=g;p(y,m)}else f(g);else throw new TypeError("Expected usable value, not `"+g+"`")}function f(g){if(!("plugins"in g)&&!("settings"in g))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");h(g.plugins),g.settings&&(u.settings=yd(!0,u.settings,g.settings))}function h(g){let y=-1;if(g!=null)if(Array.isArray(g))for(;++y<g.length;){const m=g[y];o(m)}else throw new TypeError("Expected a list of plugins, not `"+g+"`")}function p(g,y){let m=-1,S=-1;for(;++m<r.length;)if(r[m][0]===g){S=m;break}if(S===-1)r.push([g,...y]);else if(y.length>0){let[x,...k]=y;const T=r[S][1];Xd(T)&&Xd(x)&&(x=yd(!0,T,x)),r[S]=[g,x,...k]}}}}const aC=new gh().freeze();function Sd(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function wd(n,l){if(typeof l!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function kd(n,l){if(l)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function mv(n){if(!Xd(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function gv(n,l,a){if(!a)throw new Error("`"+n+"` finished async. Use `"+l+"` instead")}function eo(n){return rC(n)?n:new a0(n)}function rC(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function sC(n){return typeof n=="string"||uC(n)}function uC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const oC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",yv=[],vv={allowDangerousHtml:!0},cC=/^(https?|ircs?|mailto|xmpp)$/i,fC=[{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 dC(n){const l=hC(n),a=pC(n);return mC(l.runSync(l.parse(a),a),n)}function hC(n){const l=n.rehypePlugins||yv,a=n.remarkPlugins||yv,r=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...vv}:vv;return aC().use(FT).use(a).use(IA,r).use(l)}function pC(n){const l=n.children||"",a=new a0;return typeof l=="string"&&(a.value=l),a}function mC(n,l){const a=l.allowedElements,r=l.allowElement,u=l.components,o=l.disallowedElements,f=l.skipHtml,h=l.unwrapDisallowed,p=l.urlTransform||gC;for(const y of fC)Object.hasOwn(l,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+oC+y.id,void 0);return No(n,g),zk(n,{Fragment:b.Fragment,components:u,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function g(y,m,S){if(y.type==="raw"&&S&&typeof m=="number")return f?S.children.splice(m,1):S.children[m]={type:"text",value:y.value},m;if(y.type==="element"){let x;for(x in hd)if(Object.hasOwn(hd,x)&&Object.hasOwn(y.properties,x)){const k=y.properties[x],T=hd[x];(T===null||T.includes(y.tagName))&&(y.properties[x]=p(String(k||""),x,y))}}if(y.type==="element"){let x=a?!a.includes(y.tagName):o?o.includes(y.tagName):!1;if(!x&&r&&typeof m=="number"&&(x=!r(y,m,S)),x&&S&&typeof m=="number")return h&&y.children?S.children.splice(m,1,...y.children):S.children.splice(m,1),m}}}function gC(n){const l=n.indexOf(":"),a=n.indexOf("?"),r=n.indexOf("#"),u=n.indexOf("/");return l===-1||u!==-1&&l>u||a!==-1&&l>a||r!==-1&&l>r||cC.test(n.slice(0,l))?n:""}function bv(n,l){const a=String(n);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 yC(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function vC(n,l,a){const u=Ao((a||{}).ignore||[]),o=bC(l);let f=-1;for(;++f<o.length;)Gd(n,h);function h(g,y,m){if(g.type==="text"&&typeof m=="number")return p(g,y,m);if(u(g,m,y[y.length-1]))return Yd}function p(g,y,m){const S=y[y.length-1],x=o[f][0],k=o[f][1];let T=0,C=!1,E=[];x.lastIndex=0;let M=x.exec(g.value);for(;M;){const W=M.index,ne={index:M.index,input:M.input,stack:[...y,g]};let O=k(...M,ne);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1)x.lastIndex=W+1;else{if(T!==W&&H({type:"text",value:g.value.slice(T,W)}),Array.isArray(O))for(const F of O)H(F);else O&&H(O);T=W+M[0].length,C=!0}if(!x.global)break;M=x.exec(g.value)}return C?(T<g.value.length&&H({type:"text",value:g.value.slice(T)}),S.children.splice(m,1,...E)):E=[g],m+E.length;function H(W){const ne=E[E.length-1];ne&&ne.type==="text"&&W.type==="text"?ne.value+=W.value:E.push(W)}}}function bC(n){if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const l=[],a=!n[0]||Array.isArray(n[0])?n:[n];let r=-1;for(;++r<a.length;){const u=a[r];l.push([xC(u[0]),SC(u[1])])}return l}function xC(n){return typeof n=="string"?new RegExp(yC(n),"g"):n}function SC(n){return typeof n=="function"?n:function(){return n}}const Ed="phrasing",Td=["autolink","link","image","label"];function wC(){return{transforms:[jC],enter:{literalAutolink:EC,literalAutolinkEmail:Ad,literalAutolinkHttp:Ad,literalAutolinkWww:Ad},exit:{literalAutolink:NC,literalAutolinkEmail:CC,literalAutolinkHttp:TC,literalAutolinkWww:AC}}}function kC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ed,notInConstruct:Td},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ed,notInConstruct:Td},{character:":",before:"[ps]",after:"\\/",inConstruct:Ed,notInConstruct:Td}]}}function EC(n){this.enter({type:"link",title:null,url:"",children:[],position:void 0},n)}function Ad(n){this.config.enter.autolinkProtocol.call(this,n)}function TC(n){this.config.exit.autolinkProtocol.call(this,n)}function AC(n){this.config.exit.data.call(this,n);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(n)}function CC(n){this.config.exit.autolinkEmail.call(this,n)}function NC(n){this.exit(n)}function jC(n){vC(n,[[new RegExp("(?<![\\da-z])(https?:\\/\\/|www(?=\\.))([\\w-]*\\.[\\w\\-.]*)([^\\t\\n\\r ]*)","gi"),OC],[new RegExp("(?<![\\w+\\-.@])xmpp:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)(\\/(?:[\\w\\-/]|\\.(?=[\\dA-Za-z]))*)?","g"),qC],[new RegExp("(?<![\\w+\\-.@])mailto:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),zC],[new RegExp("(?<![\\w+\\-.]|(?:^|[^\\d@A-Za-z])(?:mailto|xmpp):)([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),_C]],{ignore:["link","linkReference"]})}function OC(n,l,a,r,u){if(!DC(u))return!1;let o="";if(/^w/i.test(l)&&(a=l+a,l="",o="http://"),xs(a.charCodeAt(0))||!RC(a))return!1;const f=MC(a+r),h={type:"link",title:null,url:o+l+f[0],children:[{type:"text",value:l+f[0],position:void 0}],position:void 0};return f[1]?[h,{type:"text",value:f[1],position:void 0}]:h}function _C(n,l,a){return/[\d\-_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+a,children:[{type:"text",value:l+"@"+a,position:void 0}],position:void 0}}function zC(n,l,a){if(/[\d\-_]$/.test(a))return!1;const r="mailto:"+l+"@"+a;return{type:"link",title:null,url:r,children:[{type:"text",value:r,position:void 0}],position:void 0}}function qC(n,l,a,r,u){if(/[\d\-_]$/.test(a)||r&&(!/[A-Za-z]$/.test(r)||u.input.charAt(u.index+n.length)==="@"))return!1;const o="xmpp:"+l+"@"+a+(r||"");return{type:"link",title:null,url:o,children:[{type:"text",value:o,position:void 0}],position:void 0}}function RC(n){const l=n.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[\dA-Za-z]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[\dA-Za-z]/.test(l[l.length-2])))}function MC(n){let l=n.length;for(;l>0;){const f=n.charCodeAt(l-1);if(f===33||f===34||f===38||f===39||f===41||f===44||f===46||f===58||f===59||f===60||f===62||f===63||f===93||f===125)l--;else break}if(l===n.length)return[n,void 0];let a=n.slice(l);n=n.slice(0,l);let r=a.indexOf(")");const u=bv(n,"(");let o=bv(n,")");for(;r!==-1&&u>o;)n+=a.slice(0,r+1),a=a.slice(r+1),r=a.indexOf(")"),o++;return[n,a]}function DC(n){const l=n.input.charCodeAt(n.index-1);return n.index===0||da(l)||xs(l)}r0.peek=QC;function LC(){this.buffer()}function BC(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function UC(){this.buffer()}function HC(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function IC(n){const l=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=si(this.sliceSerialize(n)).toLowerCase(),a.label=l}function VC(n){this.exit(n)}function YC(n){const l=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=si(this.sliceSerialize(n)).toLowerCase(),a.label=l}function GC(n){this.exit(n)}function QC(){return"["}function r0(n,l,a,r){const u=a.createTracker(r);let o=u.move("[^");const f=a.enter("footnoteReference"),h=a.enter("reference");return o+=u.move(a.safe(a.associationId(n),{after:"]",before:o})),h(),f(),o+=u.move("]"),o}function FC(){return{enter:{gfmFootnoteCallString:LC,gfmFootnoteCall:BC,gfmFootnoteDefinitionLabelString:UC,gfmFootnoteDefinition:HC},exit:{gfmFootnoteCallString:IC,gfmFootnoteCall:VC,gfmFootnoteDefinitionLabelString:YC,gfmFootnoteDefinition:GC}}}function XC(n){let l=!1;return n&&n.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:a,footnoteReference:r0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(r,u,o,f){const h=o.createTracker(f);let p=h.move("[^");const g=o.enter("footnoteDefinition"),y=o.enter("label");return p+=h.move(o.safe(o.associationId(r),{before:p,after:"]"})),y(),p+=h.move("]:"),r.children&&r.children.length>0&&(h.shift(4),p+=h.move((l?`
35
+ `:" ")+o.indentLines(o.containerFlow(r,h.current()),l?s0:ZC))),g(),p}}function ZC(n,l,a){return l===0?n:s0(n,l,a)}function s0(n,l,a){return(a?"":" ")+n}const KC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];yh.attention=eN;yh.peek=tN;function JC(){return{canContainEols:["delete"],enter:{strikethrough:PC},exit:{strikethrough:WC}}}function $C(){return{handlers:{delete:yh},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:KC}]}}function PC(n){this.enter({type:"delete",children:[],position:void 0},n)}function WC(n){this.exit(n)}function yh(n,l,a,r){const u=a.createTracker(r),o=a.stack.includes("strikethrough")?"~":"~~",f=a.enter("strikethrough");let h=u.move(o);return h+=a.containerPhrasing(n,{...u.current(),before:h,after:"~"}),h+=u.move(o),f(),h}function eN(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function tN(){return"~"}function nN(n){return n.length}function iN(n,l){const a=l||{},r=(a.align||[]).concat(),u=a.stringLength||nN,o=[],f=[],h=[],p=[];let g=0,y=-1;for(;++y<n.length;){const T=[],C=[];let E=-1;for(n[y].length>g&&(g=n[y].length);++E<n[y].length;){const M=lN(n[y][E]);if(a.alignDelimiters!==!1){const H=u(M);C[E]=H,(p[E]===void 0||H>p[E])&&(p[E]=H)}T.push(M)}f[y]=T,h[y]=C}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<g;)o[m]=xv(r[m]);else{const T=xv(r);for(;++m<g;)o[m]=T}m=-1;const S=[],x=[];for(;++m<g;){const T=o[m];let C="",E="";T===99?(C=":",E=":"):T===108?C=":":T===114&&(E=":");let M=a.alignDelimiters===!1?1:Math.max(1,p[m]-C.length-E.length);const H=C+"-".repeat(M)+E;a.alignDelimiters!==!1&&(M=C.length+M+E.length,M>p[m]&&(p[m]=M),x[m]=M),S[m]=H}f.splice(1,0,S),h.splice(1,0,x),y=-1;const k=[];for(;++y<f.length;){const T=f[y],C=h[y],E=a.fillRows===!1?Math.max(1,f[y===1?0:y].length):g;m=-1;const M=[];for(;++m<E;){const H=T[m]||"";let W="",ne="";if(a.alignDelimiters!==!1){const O=p[m]-(C[m]||0),F=o[m];if(F===114)W=" ".repeat(O);else if(F===99){const ie=O/2;O%2?(W=" ".repeat(ie+.5),ne=" ".repeat(ie-.5)):(W=" ".repeat(ie),ne=W)}else ne=" ".repeat(O)}a.delimiterStart!==!1&&!m&&M.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&H==="")&&(a.delimiterStart!==!1||m)&&M.push(" "),a.alignDelimiters!==!1&&M.push(W),M.push(H),a.alignDelimiters!==!1&&M.push(ne),a.padding!==!1&&M.push(" "),(a.delimiterEnd!==!1||m!==E-1)&&M.push("|")}k.push(a.delimiterEnd===!1?M.join("").replace(/ +$/,""):M.join(""))}return k.join(`
36
+ `)}function lN(n){return n==null?"":String(n)}function xv(n){const l=typeof n=="string"?n.codePointAt(0):0;return l===67||l===99?99:l===76||l===108?108:l===82||l===114?114:0}const aN=Ao(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function rN(n,l,a,r){const u=a.enter("blockquote"),o=a.createTracker(r);o.move("> "),o.shift(2);const f=a.indentLines(a.containerFlow(n,o.current()),sN);return u(),f}function sN(n,l,a){return">"+(a?"":" ")+n}function uN(n,l){return Sv(n,l.inConstruct,!0)&&!Sv(n,l.notInConstruct,!1)}function Sv(n,l,a){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return a;let r=-1;for(;++r<l.length;)if(n.includes(l[r]))return!0;return!1}function wv(n,l,a,r){let u=-1;for(;++u<a.unsafe.length;){const o=a.unsafe[u];if(o.character===`
37
+ `&&!o.before&&!o.after&&uN(a.stack,o))return/[\t ]/.test(r.before)?"":" "}return`\\
38
+ `}function oN(n,l){const a=String(n);let r=a.indexOf(l),u=r,o=0,f=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===u?++o>f&&(f=o):o=1,u=r+l.length,r=a.indexOf(l,u);return f}function cN(n,l){return!!(l.options.fences===!1&&n.value&&!n.lang&&/[^\n\r ]/.test(n.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(n.value))}function fN(n){const l=n.options.fence||"`";if(l!=="`"&&l!=="~")throw new Error("Cannot serialize code with `"+l+"` for `options.fence`, expected `` ` `` or `~`");return l}function dN(n,l,a,r){const u=fN(a),o=n.value||"";if(cN(n,a)){const m=a.enter("codeIndented"),S=a.indentLines(o,hN);return m(),S}const f=a.createTracker(r),h=u.repeat(Math.max(oN(o,u)+1,3)),p=a.enter("codeFenced"),g=u==="`"?"GraveAccent":"Tilde";let y=f.move(h);if(n.lang){const m=a.enter(`codeFencedLang${g}`);y+=f.move(a.safe(n.lang,{before:y,after:" ",encode:["`"],...f.current()})),m()}if(n.lang&&n.meta){const m=a.enter(`codeFencedMeta${g}`);y+=f.move(" "),y+=f.move(a.safe(n.meta,{before:y,after:`
39
+ `,encode:["`"],...f.current()})),m()}return y+=f.move(`
40
+ `),o&&(y+=f.move(o+`
41
+ `)),y+=f.move(h),p(),y}function hN(n,l,a){return(a?"":" ")+n}function vh(n){const l=n.options.quote||'"';if(l!=='"'&&l!=="'")throw new Error("Cannot serialize title with `"+l+"` for `options.quote`, expected `\"`, or `'`");return l}function pN(n,l,a,r){const u=vh(a),o=u==='"'?"Quote":"Apostrophe",f=a.enter("definition");let h=a.enter("label");const p=a.createTracker(r);let g=p.move("[");return g+=p.move(a.safe(a.associationId(n),{before:g,after:"]",...p.current()})),g+=p.move("]: "),h(),!n.url||/[\0- \u007F]/.test(n.url)?(h=a.enter("destinationLiteral"),g+=p.move("<"),g+=p.move(a.safe(n.url,{before:g,after:">",...p.current()})),g+=p.move(">")):(h=a.enter("destinationRaw"),g+=p.move(a.safe(n.url,{before:g,after:n.title?" ":`
42
+ `,...p.current()}))),h(),n.title&&(h=a.enter(`title${o}`),g+=p.move(" "+u),g+=p.move(a.safe(n.title,{before:g,after:u,...p.current()})),g+=p.move(u),h()),f(),g}function mN(n){const l=n.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function ho(n){const l=n.codePointAt(0);return l===void 0?"":String.fromCodePoint(l)}function rr(n){const l=n.codePointAt(n.length-2);return l!==void 0&&l>65535?n.slice(-2):n.slice(-1)}function u0(n){return"&#x"+n.toString(16).toUpperCase()+";"}function kv(n,l,a){const r=jl(n),u=jl(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}}function gN(n){if(n.charCodeAt(0)!==60)return;const l=n.charCodeAt(1);if(l===33){const h=n.charCodeAt(2);return h===45?2:h===91?5:nn(h)?4:void 0}if(l===63)return 3;const a=l===47,r=a?2:1;let u=r,o=n.charCodeAt(u);if(!nn(o))return;for(;o===45||ln(o);)o=n.charCodeAt(++u);const f=n.slice(r,u).toLowerCase();return!a&&o!==47&&Vd.includes(f)?1:Xb.includes(f)?6:7}const o0=new Map([["*",!1],["_",!0]]);function yN(n,l,a){const r=new Set;for(const o of n){const f=a.get(o);if(f&&o.attention&&l.some(h=>h.attention===o.attention))for(const h of f.tokens)r.add(h.attention)}const u=[];for(const o of n)o.attention&&r.delete(o.attention)&&u.push(o.attention);return u.reverse(),u}function c0(n,l,a){const r=[],u=new Map,o=new Map;let f=0;for(;f<n.length;){if(!n[f].attention){f++;continue}const h=n[f].value.charAt(0),p=o0.get(h);let g=f+1;for(;g<n.length&&n[g].attention&&n[g].value.charAt(0)===h;)g++;const y=f?n[f-1].value:l,m=jl(y.charCodeAt(y.length-1)),S=jl((g<n.length?n[g].value:a).charCodeAt(0)),x=!S||S===2&&!!m,k=!m||m===2&&!!S,T={tokens:n.slice(f,g),markers:[],start:0,end:0,open:p?x&&(!!m||!k):x,close:p?k&&(!!S||!x):k,split:p!==void 0};for(const C of T.tokens){u.set(C,[...T.tokens]),o.set(C,T);let E=C.value.length;for(;E--;)T.markers.push(C)}T.end=T.markers.length,r.push(T),f=g}for(bN(r,u),f=-1;++f<n.length;){const h=u.get(n[f]);if(h)return{attention:yN(n,h,o),index:f}}}function to(n,l){const a=n[l?0:n.length-1];if(!a||a.attention)return;const r=l?ho(a.value):rr(a.value),u=u0(r.codePointAt(0));if(l)a.value=u+a.value.slice(r.length);else{let o=a.value.slice(0,a.value.length-r.length),f=0;for(;o.charCodeAt(o.length-1-f)===92;)f++;f%2&&(o+="\\"),a.value=o+u}}function vN(n,l,a,r,u){for(const o of a.attention){const f=l.get(o)||o.sequences[0];for(const h of o.sequences){if(h===f)continue;const p=new Map(l);p.set(o,h);const g=jo(n,p,r,u),y=c0(g,r,u);if(!y||y.index>a.index)return{chosen:p,mistake:y,tokens:g}}}}function bN(n,l){const a=new Map;for(const r of n){const u=r.tokens[0].value.charAt(0);let o=a.get(u);o||(o=[],a.set(u,o));let f=r.close?o.length:0;for(;f--&&r.start<r.end;){const h=o[f],p=h.end-h.start,g=r.end-r.start;if(r.split?(h.close||r.open)&&g%3&&!((p+g)%3):p!==h.markers.length||p!==g)continue;const y=r.split?p>1&&g>1?2:1:g,m=h.markers.slice(h.end-y,h.end),S=r.markers.slice(r.start,r.start+y),x=m[0],k=S[0];if(x===m[y-1]&&x.value.length===y&&k===S[y-1]&&k.value.length===y&&x.attention===k.attention)l.delete(x),l.delete(k);else{const T=[...new Set([...m,...S])];for(const C of T){const E=l.get(C);E&&E.push(...T)}}h.end-=y,r.start+=y,h.start===h.end&&o.splice(f,1),f=o.length}r.open&&r.start<r.end&&o.push(r)}}function xN(n,l,a){if(l.length===0)throw new Error("Cannot serialize `"+n+"` as attention without markers, expected one or more markers");if(a.length===0)throw new Error("Cannot serialize `"+n+"` as attention without sizes, expected one or more sizes");for(const u of a)if(!Number.isSafeInteger(u)||u<1)throw new Error("Cannot serialize `"+n+"` as attention with `"+u+"` as size, expected positive integer");const r=[];for(const u of l){if(u.length!==1)throw new Error("Cannot serialize `"+n+"` as attention with `"+u+"` as marker, expected a single ascii character");if(!Bb(u.charCodeAt(0)))throw new Error("Cannot serialize `"+n+"` as attention with `"+u+"` as marker, expected ascii punctuation");for(const o of a)r.push(u.repeat(o))}return r}function SN(n,l,a){const r=l.indexStack,u=n.children||[],o=[];let f=-1,h=a.before;r.push(-1);let p=l.createTracker(a);for(;++f<u.length;){const g=u[f];let y;if(r[r.length-1]=f,f+1<u.length){let x=l.handle.handlers[u[f+1].type];x&&x.peek&&(x=x.peek),y=x?ho(x(u[f+1],n,l,{before:"",after:"",...p.current()})):""}else y=a.after;const m=o[o.length-1];typeof m=="string"&&(h==="\r"||h===`
43
+ `)&&g.type==="html"&&gN(g.value)!==7&&(o[o.length-1]=m.replace(/(\r?\n|\r)$/," "),h=" ",p=l.createTracker(a),p.move(Oo(o,a.before,a.after)));const S=l.handle.handlers[g.type];if(S&&S.attention){const x=bh(g,S.attention,l,p);if(!x)continue;o.push(x),h=rr(x.sequences[0])}else{const x=l.handle(g,n,l,{...p.current(),after:y,before:h});if(!x)continue;p.move(x),o.push(x),h=rr(x)}}return r.pop(),o}function bh(n,l,a,r){const{construct:u,markers:o,sizes:f}=l(n,a),h=xN(n.type,o,f),p=h[0],g=a.enter(u),y=a.createTracker(r.current());y.move(p);const m=SN(n,a,{...y.current(),before:p,after:p});if(g(),m.length!==0)return r.move(p),r.move(Oo(m,p,p)),r.move(p),{children:m,sequences:h}}function Ev(n,l,a,r){let u=jo(n,l,a,r),o=c0(u,a,r);for(;o;){const f=vN(n,l,o,a,r);if(!f)return;l=f.chosen,u=f.tokens,o=f.mistake}return u}function f0(n,l,a,r){let u=a,o=-1;for(;++o<n.length;){const f=n[o];if(typeof f=="string"){u="";continue}const h=o===n.length-1?r:"",p=f.sequences.find(function(g){const y=g.charAt(0);return y!==u.charAt(0)&&y!==h.charAt(0)||n.length===1&&o0.has(y)&&g.length>a.length})||f.sequences[0];p!==f.sequences[0]&&l.set(f,p),f0(f.children,l,p,p),u=p}}function jo(n,l,a,r){const u=[];let o,f=rr(a),h=-1;for(;++h<n.length;){const p=n[h];if(typeof p=="string"){const H={value:p,attention:void 0};o&&o===ho(p)&&to([H],!0),o=void 0,u.push(H),H.value&&(f=rr(H.value));continue}const g=l.get(p)||p.sequences[0],y=g.charAt(0),m=n[h+1],S=f,x=ho(m===void 0?r:typeof m=="string"?m:l.get(m)||m.sequences[0]),k=jo(p.children,l,g,g),T=k[0].value,C=kv(S.charCodeAt(S.length-1),T.charCodeAt(0),y);C.inside&&to(k,!0);const E=rr(k[k.length-1].value),M=kv(x.charCodeAt(0),E.charCodeAt(E.length-1),y);M.inside&&to(k,!1),C.outside&&S!==`
44
+ `&&S!=="\r"&&to(u,!1),M.outside&&(o=x),u.push({value:g,attention:p},...k,{value:g,attention:p}),f=g.charAt(g.length-1)}return u}function Oo(n,l,a){const r=new Map;f0(n,r,l,a);const u=(r.size>0?Ev(n,r,l,a):void 0)||Ev(n,new Map,l,a)||jo(n,new Map,l,a);let o="";for(const f of u)o+=f.value;return o}xh.attention=d0;xh.peek=wN;function xh(n,l,a,r){const u=a.enter("phrasing"),o=bh(n,d0,a,a.createTracker(r)),f=o?Oo([o],r.before,r.after):"";return u(),f}function d0(n,l){return{construct:"emphasis",markers:mN(l)==="*"?["*","_"]:["_","*"],sizes:[1]}}function wN(n,l,a){return a.options.emphasis||"*"}function kN(n,l){let a=!1;return No(n,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return a=!0,cs}),!!((!n.depth||n.depth<3)&&ko(n)&&(l.options.setext||a))}function EN(n,l,a,r){const u=Math.max(Math.min(6,n.depth||1),1),o=a.createTracker(r);if(kN(n,a)){const m=a.enter("headingSetext"),S=a.enter("phrasing"),x=a.containerPhrasing(n,{...o.current(),before:`
45
+ `,after:`
46
+ `});return S(),m(),x+`
47
+ `+(u===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
48
+ `))+1))}const f="#".repeat(u),h=a.enter("headingAtx"),p=a.enter("phrasing");o.move(f+" ");let g=a.containerPhrasing(n,{before:"# ",after:`
49
+ `,...o.current()});const y=g.charCodeAt(0);return(y===9||y===32)&&(g=u0(y)+g.slice(1)),g=g?f+" "+g:f,a.options.closeAtx&&(g+=" "+f),p(),h(),g}h0.peek=TN;function h0(n){return n.value||""}function TN(){return"<"}p0.peek=AN;function p0(n,l,a,r){const u=vh(a),o=u==='"'?"Quote":"Apostrophe",f=a.enter("image");let h=a.enter("label");const p=a.createTracker(r);let g=p.move("![");return g+=p.move(a.safe(n.alt,{before:g,after:"]",...p.current()})),g+=p.move("]("),h(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(h=a.enter("destinationLiteral"),g+=p.move("<"),g+=p.move(a.safe(n.url,{before:g,after:">",...p.current()})),g+=p.move(">")):(h=a.enter("destinationRaw"),g+=p.move(a.safe(n.url,{before:g,after:n.title?" ":")",...p.current()}))),h(),n.title&&(h=a.enter(`title${o}`),g+=p.move(" "+u),g+=p.move(a.safe(n.title,{before:g,after:u,...p.current()})),g+=p.move(u),h()),g+=p.move(")"),f(),g}function AN(){return"!"}m0.peek=CN;function m0(n,l,a,r){const u=n.referenceType,o=a.enter("imageReference");let f=a.enter("label");const h=a.createTracker(r);let p=h.move("![");const g=a.safe(n.alt,{before:p,after:"]",...h.current()});p+=h.move(g+"]["),f();const y=a.stack;a.stack=y.filter(function(S){return S!=="phrasing"}),f=a.enter("reference");const m=a.safe(a.associationId(n),{before:p,after:"]",...h.current()});return f(),a.stack=y,o(),u==="full"||!g||g!==m?p+=h.move(m+"]"):u==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function CN(){return"!"}g0.peek=NN;function g0(n,l,a){let r=n.value||"",u="`",o=-1;for(;new RegExp("(^|[^`])"+u+"([^`]|$)").test(r);)u+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<a.unsafe.length;){const f=a.unsafe[o],h=a.compilePattern(f);if(!f.atBreak)continue;let p;for(;p=h.exec(r);){let g=p.index;r.charCodeAt(g)===10&&r.charCodeAt(g-1)===13&&g--,r=r.slice(0,g)+" "+r.slice(p.index+1)}}return u+r+u}function NN(){return"`"}function y0(n,l){const a=ko(n);return!!(!l.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(a===n.url||"mailto:"+a===n.url)&&/^[a-z][+\-.a-z]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}v0.peek=jN;function v0(n,l,a,r){const u=vh(a),o=u==='"'?"Quote":"Apostrophe",f=a.createTracker(r);if(y0(n,a)){const k=a.stack;a.stack=k.filter(function(E){return E!=="phrasing"});const T=a.enter("autolink");let C=f.move("<");return C+=f.move(a.containerPhrasing(n,{before:C,after:">",...f.current()})),C+=f.move(">"),T(),a.stack=k,C}const h=a.enter("link");let p=a.enter("label"),g=f.move("[");const y=a.containerPhrasing(n,{before:g,after:"](",...f.current()});g+=f.move(y),p(),g+=f.move("](");const m=/[\0- \u007F]/.test(n.url),S=r.before.charAt(r.before.length-1);let x=n.title||void 0;if(!x&&!m&&(S===`
50
+ `||S==="\r")){let k=0;for(;k<y.length&&y.charCodeAt(k)!==93;)k+=y.charCodeAt(k)===92?2:1;y.charCodeAt(k+1)===58&&(x="")}return!n.url&&typeof x=="string"||m?(p=a.enter("destinationLiteral"),g+=f.move("<"),g+=f.move(a.safe(n.url,{before:g,after:">",...f.current()})),g+=f.move(">")):(p=a.enter("destinationRaw"),g+=f.move(a.safe(n.url,{before:g,after:typeof x=="string"?" ":")",...f.current()}))),p(),typeof x=="string"&&(p=a.enter(`title${o}`),g+=f.move(" "+u),g+=f.move(a.safe(x,{before:g,after:u,...f.current()})),g+=f.move(u),p()),g+=f.move(")"),h(),g}function jN(n,l,a){return y0(n,a)?"<":"["}b0.peek=ON;function b0(n,l,a,r){const u=n.referenceType,o=a.enter("linkReference");let f=a.enter("label");const h=a.createTracker(r);let p=h.move("[");const g=a.containerPhrasing(n,{before:p,after:"]",...h.current()});p+=h.move(g+"]["),f();const y=a.stack;a.stack=y.filter(function(S){return S!=="phrasing"}),f=a.enter("reference");const m=a.safe(a.associationId(n),{before:p,after:"]",...h.current()});return f(),a.stack=y,o(),u==="full"||!g||g!==m?p+=h.move(m+"]"):u==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function ON(){return"["}function Sh(n){const l=n.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function _N(n){const l=Sh(n),a=n.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 zN(n){const l=n.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function x0(n){const l=n.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function qN(n,l,a,r){const u=a.enter("list"),o=a.bulletCurrent;let f=n.ordered?zN(a):Sh(a);const h=n.ordered?f==="."?")":".":_N(a);let p=l&&a.bulletLastUsed?f===a.bulletLastUsed:!1;if(!n.ordered){const y=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&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),x0(a)===f&&y){let m=-1;for(;++m<n.children.length;){const S=n.children[m];if(S&&S.type==="listItem"&&S.children&&S.children[0]&&S.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(f=h),a.bulletCurrent=f;const g=a.containerFlow(n,r);return a.bulletLastUsed=f,a.bulletCurrent=o,u(),g}function RN(n){const l=n.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 MN(n,l,a,r){const u=RN(a);let o=a.bulletCurrent||Sh(a);l&&l.type==="list"&&l.ordered&&(o=(typeof l.start=="number"&&l.start>-1?l.start:1)+(a.options.incrementListMarker===!1?0:l.children.indexOf(n))+o);let f=o.length+1;(u==="tab"||u==="mixed"&&(l&&l.type==="list"&&l.spread||n.spread))&&(f=Math.ceil(f/4)*4);const h=a.createTracker(r);h.move(o+" ".repeat(f-o.length)),h.shift(f);const p=a.enter("listItem"),g=a.indentLines(a.containerFlow(n,h.current()),y);return p(),g;function y(m,S,x){return S?(x?"":" ".repeat(f))+m:(x?o:o+" ".repeat(f-o.length))+m}}function DN(n,l,a,r){const u=a.enter("paragraph"),o=a.enter("phrasing"),f=a.containerPhrasing(n,r);return o(),u(),f}function LN(n,l,a,r){if(!n.children.some(function(h){return aN(h)}))return a.containerFlow(n,r);const o=a.enter("phrasing"),f=a.containerPhrasing(n,r);return o(),f}function BN(n){const l=n.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}wh.attention=S0;wh.peek=UN;function wh(n,l,a,r){const u=a.enter("phrasing"),o=bh(n,S0,a,a.createTracker(r)),f=o?Oo([o],r.before,r.after):"";return u(),f}function S0(n,l){return{construct:"strong",markers:BN(l)==="*"?["*","_"]:["_","*"],sizes:[2]}}function UN(n,l,a){return a.options.strong||"*"}function HN(n,l,a,r){const u=l?l.children:[],o=a.indexStack[a.indexStack.length-1];return a.safe(n.value,{...r,afterNode:u[o+1],beforeNode:u[o-1]})}function IN(n){const l=n.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 VN(n,l,a){const r=(x0(a)+(a.options.ruleSpaces?" ":"")).repeat(IN(a));return a.options.ruleSpaces?r.slice(0,-1):r}const Kd={blockquote:rN,break:wv,code:dN,definition:pN,emphasis:xh,hardBreak:wv,heading:EN,html:h0,image:p0,imageReference:m0,inlineCode:g0,link:v0,linkReference:b0,list:qN,listItem:MN,paragraph:DN,root:LN,strong:wh,text:HN,thematicBreak:VN};function YN(){return{enter:{table:GN,tableData:Tv,tableHeader:Tv,tableRow:FN},exit:{codeText:XN,table:QN,tableData:Cd,tableHeader:Cd,tableRow:Cd}}}function GN(n){const l=n._align;this.enter({type:"table",align:l.map(function(a){return a==="none"?null:a}),children:[],position:void 0},n),this.data.inTable=!0}function QN(n){this.exit(n),this.data.inTable=void 0}function FN(n){this.enter({type:"tableRow",children:[],position:void 0},n)}function Cd(n){this.exit(n)}function Tv(n){this.enter({type:"tableCell",children:[],position:void 0},n)}function XN(n){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,ZN));const a=this.stack[this.stack.length-1];a.type,a.value=l,this.exit(n)}function ZN(n,l){return l==="|"?l:n}function KN(n){const l=n||{},{tableCellPadding:a,tablePipeAlign:r,stringLength:u}=l,o=a?" ":"|";return{handlers:{inlineCode:S,table:f,tableCell:p,tableRow:h},join:[JN],unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
51
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}]};function f(x,k,T,C){const E=y(x,T,C),M=E[0];if(M){let H=x.align?x.align.length:0,W=-1;if(!H)for(;++W<E.length;)E[W].length>H&&(H=E[W].length);for(;M.length<H;)M.push("")}return g(E,x.align)}function h(x,k,T,C){const E=m(x,T,C),M=g([E]);return M.slice(0,M.indexOf(`
52
+ `))}function p(x,k,T,C){const E=T.enter("tableCell"),M=T.enter("phrasing"),H=T.containerPhrasing(x,{...C,before:o,after:o});return M(),E(),H}function g(x,k){return iN(x,{align:k,alignDelimiters:r,fillRows:!1,padding:a,stringLength:u})}function y(x,k,T){const{children:C}=x;let E=-1;const M=[],H=k.enter("table");for(;++E<C.length;)M[E]=m(C[E],k,T);return H(),M}function m(x,k,T){const{children:C}=x;let E=-1;const M=[],H=k.enter("tableRow");for(;++E<C.length;)M[E]=p(C[E],x,k,T);return H(),M}function S(x,k,T){const C=Kd.inlineCode(x,k,T);if(!T.stack.includes("tableCell"))return C;const E=[];let M=0,H=C.indexOf("|");for(;H!==-1;){let W=H;for(;W>M&&C.charCodeAt(W-1)===92;)W--;E.push(C.slice(M,H)),(H-W)%2===0&&E.push("\\"),M=H,H=C.indexOf("|",H+1)}return E.push(C.slice(M)),E.join("")}}function JN(n,l,a,r){if(n.type==="table"&&a.type==="listItem"&&a.spread===!1&&(l.type==="definition"||l.type==="heading"&&$N(l,r)||l.type==="paragraph"||l.type==="table"))return 1}function $N(n,l){let a=!1;return No(n,function(r){if(r.type==="break"||"value"in r&&/\r?\n|\r/.test(r.value))return a=!0,cs}),!!((!n.depth||n.depth<3)&&ko(n)&&(l.options.setext||a))}function PN(){return{exit:{taskListCheckValueChecked:Av,taskListCheckValueUnchecked:Av,paragraph:e2}}}function WN(){return{handlers:{paragraph:t2},join:[n2]}}function Av(n){const l=this.stack[this.stack.length-2];l.type,l.checked=n.type==="taskListCheckValueChecked"}function e2(n){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 o=-1,f;for(;++o<u.length;){const h=u[o];if(h.type==="paragraph"){f=h;break}}f===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={...r.position.start}))}}this.exit(n)}function t2(n,l,a,r){if(!l||l.type!=="listItem"||w0(l)!==n)return Kd.paragraph(n,l,a,r);const u="["+(l.checked?"x":" ")+"] ",o=a.createTracker(r);o.move(u);const f=Kd.paragraph(n.children.length>0?n:{type:"paragraph",children:[{type:"text",value:" "}]},l,a,{...r,...o.current()});return u+f}function n2(n,l,a){if(!(n.type==="definition"&&a.type==="listItem"))return;const r=w0(a);if(r&&a.children.indexOf(n)<a.children.indexOf(r))return 0}function w0(n){if(typeof n.checked=="boolean")for(const l of n.children){if(l.type==="paragraph")return l;if(l.type!=="definition")return}}function i2(){return[wC(),FC(),JC(),YN(),PN()]}function l2(n){return{extensions:[kC(),XC(n),$C(),KN(n),WN()]}}const a2={tokenize:f2,partial:!0},k0={tokenize:d2,partial:!0},E0={tokenize:h2,partial:!0},T0={tokenize:p2,partial:!0},r2={tokenize:m2,partial:!0},A0={name:"wwwAutolink",tokenize:o2,previous:N0},C0={name:"protocolAutolink",tokenize:c2,previous:j0},Fi={name:"emailAutolink",tokenize:u2,previous:O0},Ei={};function s2(){return{text:Ei}}let ra=48;for(;ra<123;)Ei[ra]=Fi,ra++,ra===58?ra=65:ra===91&&(ra=97);Ei[43]=Fi;Ei[45]=Fi;Ei[46]=Fi;Ei[95]=Fi;Ei[72]=[Fi,C0];Ei[104]=[Fi,C0];Ei[87]=[Fi,A0];Ei[119]=[Fi,A0];function u2(n,l,a){const r=this;let u,o;return f;function f(m){return!Jd(m)||!O0.call(r,r.previous)||kh(r.events)?a(m):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),h(m))}function h(m){return Jd(m)?(n.consume(m),h):m===64?(n.consume(m),p):a(m)}function p(m){return m===46?n.check(r2,y,g)(m):m===45||m===95||ln(m)?(o=!0,n.consume(m),p):y(m)}function g(m){return n.consume(m),u=!0,p}function y(m){return o&&u&&nn(r.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),l(m)):a(m)}}function o2(n,l,a){const r=this;return u;function u(f){return f!==87&&f!==119||!N0.call(r,r.previous)||kh(r.events)?a(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(a2,n.attempt(k0,n.attempt(E0,o),a),a)(f))}function o(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),l(f)}}function c2(n,l,a){const r=this;let u="",o=!1;return f;function f(m){return(m===72||m===104)&&j0.call(r,r.previous)&&!kh(r.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),u+=String.fromCodePoint(m),n.consume(m),h):a(m)}function h(m){if(nn(m)&&u.length<5)return u+=String.fromCodePoint(m),n.consume(m),h;if(m===58){const S=u.toLowerCase();if(S==="http"||S==="https")return n.consume(m),p}return a(m)}function p(m){return m===47?(n.consume(m),o?g:(o=!0,p)):a(m)}function g(m){return m===null||uo(m)||yt(m)||da(m)||xs(m)?a(m):n.attempt(k0,n.attempt(E0,y),a)(m)}function y(m){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),l(m)}}function f2(n,l,a){let r=0;return u;function u(f){return(f===87||f===119)&&r<3?(r++,n.consume(f),u):f===46&&r===3?(n.consume(f),o):a(f)}function o(f){return f===null?a(f):l(f)}}function d2(n,l,a){let r,u,o;return f;function f(g){return g===46||g===95?n.check(T0,p,h)(g):g===null||yt(g)||da(g)||g!==45&&xs(g)?p(g):(o=!0,n.consume(g),f)}function h(g){return g===95?r=!0:(u=r,r=void 0),n.consume(g),f}function p(g){return u||r||!o?a(g):l(g)}}function h2(n,l){let a=0,r=0;return u;function u(f){return f===40?(a++,n.consume(f),u):f===41&&r<a?o(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?n.check(T0,l,o)(f):f===null||yt(f)||da(f)?l(f):(n.consume(f),u)}function o(f){return f===41&&r++,n.consume(f),u}}function p2(n,l,a){return r;function r(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(n.consume(h),r):h===38?(n.consume(h),o):h===93?(n.consume(h),u):h===60||h===null||yt(h)||da(h)?l(h):a(h)}function u(h){return h===null||h===40||h===91||yt(h)||da(h)?l(h):r(h)}function o(h){return nn(h)?f(h):a(h)}function f(h){return h===59?(n.consume(h),r):nn(h)?(n.consume(h),f):a(h)}}function m2(n,l,a){return r;function r(o){return n.consume(o),u}function u(o){return ln(o)?a(o):l(o)}}function N0(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||yt(n)}function j0(n){return!nn(n)}function O0(n){return!(n===47||Jd(n))}function Jd(n){return n===43||n===45||n===46||n===95||ln(n)}function kh(n){let l=n.length,a=!1;for(;l--;){const r=n[l][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){a=!0;break}if(r._gfmAutolinkLiteralWalkedInto){a=!1;break}}return n.length>0&&!a&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const g2={tokenize:E2,partial:!0};function y2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:S2,continuation:{tokenize:w2},exit:k2}},text:{91:{name:"gfmFootnoteCall",tokenize:x2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:v2,resolveTo:b2}}}}function v2(n,l,a){const r=this;let u=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let f;for(;u--;){const p=r.events[u][1];if(p.type==="labelImage"){f=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return h;function h(p){if(!f||!f._balanced)return a(p);const g=si(r.sliceSerialize({start:f.end,end:r.now()}));return g.codePointAt(0)!==94||!o.includes(g.slice(1))?a(p):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(p),n.exit("gfmFootnoteCallLabelMarker"),l(p))}}function b2(n,l){let a=n.length;for(;a--;)if(n[a][1].type==="labelImage"&&n[a][0]==="enter"){n[a][1];break}n[a+1][1].type="data",n[a+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},n[a+3][1].start),end:Object.assign({},n[n.length-1][1].end)},u={type:"gfmFootnoteCallMarker",start:Object.assign({},n[a+3][1].end),end:Object.assign({},n[a+3][1].end)};u.end.column++,u.end.offset++,u.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},u.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},h=[n[a+1],n[a+2],["enter",r,l],n[a+3],n[a+4],["enter",u,l],["exit",u,l],["enter",o,l],["enter",f,l],["exit",f,l],["exit",o,l],n[n.length-2],n[n.length-1],["exit",r,l]];return n.splice(a,n.length-a+1,...h),n}function x2(n,l,a){const r=this,u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,f;return h;function h(m){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(m),n.exit("gfmFootnoteCallLabelMarker"),p}function p(m){return m!==94?a(m):(n.enter("gfmFootnoteCallMarker"),n.consume(m),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",g)}function g(m){if(o>999||m===93&&!f||m===null||m===91||yt(m))return a(m);if(m===93){n.exit("chunkString");const S=n.exit("gfmFootnoteCallString");return u.includes(si(r.sliceSerialize(S)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(m),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),l):a(m)}return yt(m)||(f=!0),o++,n.consume(m),m===92?y:g}function y(m){return m===91||m===92||m===93?(n.consume(m),o++,g):g(m)}}function S2(n,l,a){const r=this,u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,f=0,h;return p;function p(k){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),g}function g(k){return k===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",y):a(k)}function y(k){if(f>999||k===93&&!h||k===null||k===91||yt(k))return a(k);if(k===93){n.exit("chunkString");const T=n.exit("gfmFootnoteDefinitionLabelString");return o=si(r.sliceSerialize(T)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),S}return yt(k)||(h=!0),f++,n.consume(k),k===92?m:y}function m(k){return k===91||k===92||k===93?(n.consume(k),f++,y):y(k)}function S(k){return k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),u.includes(o)||u.push(o),Pe(n,x,"gfmFootnoteDefinitionWhitespace")):a(k)}function x(k){return l(k)}}function w2(n,l,a){return n.check(Ss,l,n.attempt(g2,l,a))}function k2(n){n.exit("gfmFootnoteDefinition")}function E2(n,l,a){const r=this;return Pe(n,u,"gfmFootnoteDefinitionIndent",5);function u(o){const f=r.events[r.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?l(o):a(o)}}function T2(n){let a=(n||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:u};return a==null&&(a=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function u(f,h){let p=-1;for(;++p<f.length;)if(f[p][0]==="enter"&&f[p][1].type==="strikethroughSequenceTemporary"&&f[p][1]._close){let g=p;for(;g--;)if(f[g][0]==="exit"&&f[g][1].type==="strikethroughSequenceTemporary"&&f[g][1]._open&&f[p][1].end.offset-f[p][1].start.offset===f[g][1].end.offset-f[g][1].start.offset){f[p][1].type="strikethroughSequence",f[g][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},f[g][1].start),end:Object.assign({},f[p][1].end)},m={type:"strikethroughText",start:Object.assign({},f[g][1].end),end:Object.assign({},f[p][1].start)},S=[["enter",y,h],["enter",f[g][1],h],["exit",f[g][1],h],["enter",m,h]],x=h.parser.constructs.insideSpan.null;x&&ri(S,S.length,0,Eo(x,f.slice(g+1,p),h)),ri(S,S.length,0,[["exit",m,h],["enter",f[p][1],h],["exit",f[p][1],h],["exit",y,h]]),ri(f,g-1,p-g+3,S),p=g+S.length-2;break}}for(p=-1;++p<f.length;)f[p][1].type==="strikethroughSequenceTemporary"&&(f[p][1].type="data");return f}function o(f,h,p){const g=this.previous,y=this.events;let m=0;return S;function S(k){return g===126&&y[y.length-1][1].type!=="characterEscape"?p(k):(f.enter("strikethroughSequenceTemporary"),x(k))}function x(k){const T=jl(g);if(k===126)return m>1?p(k):(f.consume(k),m++,x);if(m<2&&!a)return p(k);const C=f.exit("strikethroughSequenceTemporary"),E=jl(k);return C._open=!E||E===2&&!!T,C._close=!T||T===2&&!!E,h(k)}}}class A2{constructor(){this.map=[],this.index=new Map}add(l,a,r){C2(this,l,a,r)}consume(l){if(this.map.sort(function(o,f){return o[0]-f[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 o of u)l.push(o);u=r.pop()}this.map.length=0,this.index.clear()}}function C2(n,l,a,r){if(a===0&&r.length===0)return;const u=n.index.get(l);if(u){u[1]+=a,u[2].push(...r);return}const o=[l,a,r];n.map.push(o),n.index.set(l,o)}function N2(n,l){let a=!1;const r=[];for(;l<n.length;){const u=n[l];if(a){if(u[0]==="enter")u[1].type==="tableContent"&&r.push(n[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(u[1].type==="tableContent"){if(n[l-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="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 j2(){return{flow:{null:{name:"table",tokenize:O2,resolveAll:_2}}}}function O2(n,l,a){const r=this;let u=0,o=0,f;return h;function h(_){let Z=r.events.length-1;for(;Z>-1;){const{type:Re}=r.events[Z][1];if(Re==="lineEnding"||Re==="linePrefix")Z--;else break}const ee=Z>-1?r.events[Z][1].type:null,we=ee==="tableHead"||ee==="tableRow"?O:p;return we===O&&r.parser.lazy[r.now().line]?a(_):we(_)}function p(_){return n.enter("tableHead"),n.enter("tableRow"),g(_)}function g(_){return _===124||(f=!0,o+=1),y(_)}function y(_){return _===null?a(_):Ae(_)?o>1?(o=0,r.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),x):a(_):Ue(_)?Pe(n,y,"whitespace")(_):(o+=1,f&&(f=!1,u+=1),_===124?(n.enter("tableCellDivider"),n.consume(_),n.exit("tableCellDivider"),f=!0,y):(n.enter("data"),m(_)))}function m(_){return _===null||_===124||yt(_)?(n.exit("data"),y(_)):(n.consume(_),_===92?S:m)}function S(_){return _===92||_===124?(n.consume(_),m):m(_)}function x(_){return r.interrupt=!1,r.parser.lazy[r.now().line]?a(_):(n.enter("tableDelimiterRow"),f=!1,Ue(_)?Pe(n,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):k(_))}function k(_){return _===45||_===58?C(_):_===124?(f=!0,n.enter("tableCellDivider"),n.consume(_),n.exit("tableCellDivider"),T):ne(_)}function T(_){return Ue(_)?Pe(n,C,"whitespace")(_):C(_)}function C(_){return _===58?(o+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(_),n.exit("tableDelimiterMarker"),E):_===45?(o+=1,E(_)):_===null||Ae(_)?W(_):ne(_)}function E(_){return _===45?(n.enter("tableDelimiterFiller"),M(_)):ne(_)}function M(_){return _===45?(n.consume(_),M):_===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(_),n.exit("tableDelimiterMarker"),H):(n.exit("tableDelimiterFiller"),H(_))}function H(_){return Ue(_)?Pe(n,W,"whitespace")(_):W(_)}function W(_){return _===124?k(_):_===null||Ae(_)?!f||u!==o?ne(_):(n.exit("tableDelimiterRow"),n.exit("tableHead"),l(_)):ne(_)}function ne(_){return a(_)}function O(_){return n.enter("tableRow"),F(_)}function F(_){return _===124?(n.enter("tableCellDivider"),n.consume(_),n.exit("tableCellDivider"),F):_===null||Ae(_)?(n.exit("tableRow"),l(_)):Ue(_)?Pe(n,F,"whitespace")(_):(n.enter("data"),ie(_))}function ie(_){return _===null||_===124||yt(_)?(n.exit("data"),F(_)):(n.consume(_),_===92?he:ie)}function he(_){return _===92||_===124?(n.consume(_),ie):ie(_)}}function _2(n,l){let a=-1,r=!0,u=0,o=[0,0,0,0],f=[0,0,0,0],h=!1,p=0,g,y,m;const S=new A2;for(;++a<n.length;){const x=n[a],k=x[1];x[0]==="enter"?k.type==="tableHead"?(h=!1,p!==0&&(Cv(S,l,p,g,y),y=void 0,p=0),g={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},S.add(a,0,[["enter",g,l]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,m=void 0,o=[0,0,0,0],f=[0,a+1,0,0],h&&(h=!1,y={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},S.add(a,0,[["enter",y,l]])),u=k.type==="tableDelimiterRow"?2:y?3:1):u&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,f[2]===0&&(o[1]!==0&&(f[0]=f[1],m=no(S,l,o,u,void 0,m),o=[0,0,0,0]),f[2]=a)):k.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(f[0]=f[1],m=no(S,l,o,u,void 0,m)),o=f,f=[o[1],a,0,0])):k.type==="tableHead"?(h=!0,p=a):k.type==="tableRow"||k.type==="tableDelimiterRow"?(p=a,o[1]!==0?(f[0]=f[1],m=no(S,l,o,u,a,m)):f[1]!==0&&(m=no(S,l,f,u,a,m)),u=0):u&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(f[3]=a)}for(p!==0&&Cv(S,l,p,g,y),S.consume(l.events),a=-1;++a<l.events.length;){const x=l.events[a];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=N2(l.events,a))}return n}function no(n,l,a,r,u,o){const f=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",h="tableContent";a[0]!==0&&(o.end=Object.assign({},lr(l.events,a[0])),n.add(a[0],0,[["exit",o,l]]));const p=lr(l.events,a[1]);if(o={type:f,start:Object.assign({},p),end:Object.assign({},p)},n.add(a[1],0,[["enter",o,l]]),a[2]!==0){const g=lr(l.events,a[2]),y=lr(l.events,a[3]),m={type:h,start:Object.assign({},g),end:Object.assign({},y)};if(n.add(a[2],0,[["enter",m,l]]),r!==2){const S=l.events[a[2]],x=l.events[a[3]];if(S[1].end=Object.assign({},x[1].end),S[1].type="chunkText",S[1].contentType="text",a[3]>a[2]+1){const k=a[2]+1,T=a[3]-a[2]-1;n.add(k,T,[])}}n.add(a[3]+1,0,[["exit",m,l]])}return u!==void 0&&(o.end=Object.assign({},lr(l.events,u)),n.add(u,0,[["exit",o,l]]),o=void 0),o}function Cv(n,l,a,r,u){const o=[],f=lr(l.events,a);u&&(u.end=Object.assign({},f),o.push(["exit",u,l])),r.end=Object.assign({},f),o.push(["exit",r,l]),n.add(a+1,0,o)}function lr(n,l){const a=n[l],r=a[0]==="enter"?"start":"end";return a[1][r]}const z2={name:"tasklistCheck",tokenize:R2};function q2(){return{text:{91:z2}}}function R2(n,l,a){const r=this;return u;function u(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?a(p):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(p),n.exit("taskListCheckMarker"),o)}function o(p){return yt(p)?(n.enter("taskListCheckValueUnchecked"),n.consume(p),n.exit("taskListCheckValueUnchecked"),f):p===88||p===120?(n.enter("taskListCheckValueChecked"),n.consume(p),n.exit("taskListCheckValueChecked"),f):a(p)}function f(p){return p===93?(n.enter("taskListCheckMarker"),n.consume(p),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),h):a(p)}function h(p){return Ae(p)?l(p):Ue(p)?n.check({tokenize:M2},l,a)(p):a(p)}}function M2(n,l,a){return Pe(n,r,"whitespace");function r(u){return u===null?a(u):l(u)}}function D2(n){return Db([s2(),y2(),T2(n),j2(),q2()])}const L2={};function B2(n){const l=this,a=n||L2,r=l.data(),u=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),f=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);u.push(D2(a)),o.push(i2()),f.push(l2(a))}function _0(n=128){const l=new Set,a=new Set,r=()=>{for(const u of a)u()};return{has:u=>l.has(u),fail(u){l.has(u)||u.length>4096||(l.add(u),l.size>n&&l.delete(l.values().next().value),r())},retry(u){l.delete(u)&&r()},subscribe(u){return a.add(u),()=>{a.delete(u)}}}}const z0=D.createContext(null);function U2({children:n}){const[l]=D.useState(_0);return b.jsx(z0.Provider,{value:l,children:n})}function H2({src:n,alt:l="",title:a}){const{t:r}=Qe(),u=D.useContext(z0),[o]=D.useState(_0),f=u??o,h=D.useSyncExternalStore(f.subscribe,()=>f.has(n??""),()=>!1),[p,g]=D.useState(null),y=h||p===n,[m,S]=D.useState(!1),[x,k]=D.useState(!1),T=D.useRef(null),C=D.useRef(null),E=D.useRef(null),M=D.useRef(null),H=l||r("image.untitled");D.useEffect(()=>{if(!m||y)return;const O=document.activeElement instanceof HTMLElement?document.activeElement:null,F=document.body.style.overflow;document.body.style.overflow="hidden",C.current?.focus();const ie=_=>{if(_.key==="Escape"&&(_.preventDefault(),_.stopPropagation(),S(!1)),_.key!=="Tab")return;const Z=[...T.current?.querySelectorAll('button, [href], [tabindex="0"]')??[]],ee=Z[0],we=Z.at(-1);_.shiftKey&&(document.activeElement===ee||!T.current?.contains(document.activeElement))?(_.preventDefault(),we?.focus()):!_.shiftKey&&(document.activeElement===we||!T.current?.contains(document.activeElement))&&(_.preventDefault(),ee?.focus())},he=_=>{T.current?.contains(_.target)||C.current?.focus()};return document.addEventListener("keydown",ie,!0),document.addEventListener("focusin",he),()=>{document.removeEventListener("keydown",ie,!0),document.removeEventListener("focusin",he),document.body.style.overflow=F,O?.isConnected?O.focus():E.current?.focus()}},[m,y]),D.useEffect(()=>{k(!1),S(!1)},[n]);function W(){k(O=>!O),M.current&&(M.current.scrollLeft=0,M.current.scrollTop=0)}function ne(){n&&(f.fail(n),g(n)),S(!1)}if(!n||y){const O=n?.split(/[?#]/)[0]?.split("/").at(-1);return b.jsxs("span",{className:"image-unavailable",role:"status",children:[b.jsx("strong",{children:l||O||r("image.untitled")}),b.jsx("span",{children:r("image.unavailable")}),n&&b.jsx("button",{ref:E,type:"button",onClick:()=>{S(!1),g(null),f.retry(n)},children:r("image.retry")})]})}return b.jsxs(b.Fragment,{children:[b.jsxs("button",{type:"button",className:"image-preview-trigger","aria-label":r("image.open",{name:H}),"aria-haspopup":"dialog","aria-expanded":m,title:r("image.open",{name:H}),onClick:()=>{k(!1),S(!0)},children:[b.jsx("img",{className:"image-preview-thumbnail",src:n,alt:l,title:a,loading:"lazy",onError:ne}),b.jsx("span",{className:"image-preview-hint","aria-hidden":"true",children:r("image.enlarge")})]}),m&&ih.createPortal(b.jsx("div",{className:"image-lightbox",onClick:O=>{O.target===O.currentTarget&&S(!1)},children:b.jsxs("div",{ref:T,className:"image-lightbox-dialog",role:"dialog","aria-modal":"true","aria-label":H,children:[b.jsxs("header",{className:"image-lightbox-toolbar",children:[b.jsx("span",{className:"image-lightbox-name",title:H,children:H}),b.jsx("button",{type:"button",onClick:W,"aria-pressed":x,children:r(x?"image.fit":"image.original")}),b.jsx("button",{ref:C,type:"button",onClick:()=>S(!1),"aria-label":r("image.close"),children:r("image.close")})]}),b.jsx("div",{ref:M,className:x?"image-lightbox-stage original":"image-lightbox-stage",tabIndex:0,role:"region","aria-label":r(x?"image.scroll":"image.fit"),children:b.jsx("img",{src:n,alt:l,title:a,draggable:!1,onError:ne})})]})}),document.body)]})}function I2({text:n,language:l}){const[a,r]=D.useState(!1);return b.jsxs("div",{className:"code-block",children:[b.jsxs("div",{className:"code-banner",children:[b.jsx("span",{className:"code-lang",children:l||"Code block"}),b.jsx("button",{type:"button",className:"code-copy","aria-label":a?"Copied":"Copy",onClick:()=>{navigator.clipboard.writeText(n).then(()=>{r(!0),window.setTimeout(()=>r(!1),1e3)})},children:a?"Copied":"Copy"})]}),b.jsx("pre",{children:b.jsx("code",{children:n})})]})}function V2({children:n}){const l=D.Children.toArray(n)[0];if(D.isValidElement(l)){const a=l,r=String(a.props.children??"").replace(/\n$/,""),u=/language-([\w-]+)/.exec(a.props.className??"");return b.jsx(I2,{text:r,language:u?.[1]})}return b.jsx("pre",{children:n})}function Y2(n){if(!n||/^[a-z][a-z0-9+.-]*:/i.test(n)||n.startsWith("#")||n.startsWith("//")||n.startsWith("?"))return null;const l=n.indexOf("#"),a=l<0?n:n.slice(0,l);if(a.includes("?"))return null;let r;try{r=decodeURIComponent(a)}catch{return null}const u=/:(\d+)$/.exec(r);if(u&&(r=r.slice(0,-u[0].length)),!r||/[\u0000-\u001f\\]/.test(r)||r.split("/").includes(".."))return null;const o=u?Number(u[1]):void 0;return o!=null&&Number.isSafeInteger(o)&&o>0?{path:r,line:o}:{path:r}}const q0=D.createContext({streaming:!1}),G2={pre:V2,img({src:n,alt:l,title:a}){const r=typeof n=="string"&&n!==""&&!/^(?:[a-z][a-z0-9+.-]*:|\/|#|\?)/i.test(n);return b.jsx(H2,{src:r?`/dsh-bot/${n.replace(/^\.\//,"")}`:n||void 0,alt:l,title:a})},code({className:n,children:l}){return b.jsx("code",{className:n,children:l})},table({children:n}){return b.jsx("div",{className:"table-scroll",children:b.jsx("table",{children:n})})},a({href:n,children:l,node:a}){const{streaming:r,onOpenFile:u}=D.useContext(q0),{t:o}=Qe();if(a?.children.some(h=>h.type==="element"&&h.tagName==="img"))return b.jsxs("span",{className:"image-preview-linked",children:[l,b.jsx("a",{href:n,target:"_blank",rel:"noreferrer",children:o("image.openLink")})]});const f=r?null:Y2(n);return f&&u?b.jsx("button",{type:"button",className:"file-mention",title:f.path,onClick:()=>u(f.path,f.line),children:l}):b.jsx("a",{href:n,target:"_blank",rel:"noreferrer",children:l})}};function Q2(n,l){if(!l)return n;const a=n.match(/```/g);return a&&a.length%2===1?`${n}
53
+ \`\`\``:n}function _o({text:n,streaming:l=!1,onOpenFile:a}){const r=D.useMemo(()=>({streaming:l,onOpenFile:a}),[l,a]);return b.jsx(q0.Provider,{value:r,children:b.jsx("div",{className:l?"markdown streaming":"markdown",children:b.jsx(dC,{remarkPlugins:[B2],components:G2,children:Q2(n,l)})})})}function F2({mail:n,label:l,onOpenFile:a}){const{t:r}=Qe(),u=xb(n.from,l),o=/^\d+$/.test(n.hop)?n.hop:"",f=[n.id?`id ${n.id}`:"",`from ${n.from}`,n.correlation?`correlation ${n.correlation}`:"",n.causation?`causation ${n.causation}`:""].filter(Boolean).join(`
54
+ `);return b.jsxs("article",{className:"mail-card",children:[b.jsxs("header",{className:"mail-head",children:[b.jsx("span",{className:"bot-badge",children:"BOT"}),b.jsxs("span",{className:"mail-who",children:[b.jsx("strong",{children:u}),b.jsx("span",{children:r("inbox.received")})]}),o?b.jsx("span",{className:"mail-hop",children:r("inbox.hop",{hop:o})}):null]}),n.body?b.jsx("div",{className:"mail-body",children:b.jsx(_o,{text:n.body,onOpenFile:a})}):null,b.jsx("p",{className:"mail-note",children:r("inbox.lead")}),f?b.jsxs("details",{className:"mail-details",children:[b.jsx("summary",{children:r("inbox.source")}),b.jsx("pre",{children:f})]}):null]})}function X2({who:n,preview:l,time:a,mark:r,onOpen:u}){const{t:o}=Qe(),f=l||o("inbox.received");return b.jsxs("div",{className:"inbox-line","data-turn":r,children:[b.jsxs("button",{type:"button",className:"inbox-entry",onClick:u,"aria-label":o("inbox.open",{who:n,line:f}),children:[b.jsx("span",{className:"inbox-icon",children:b.jsx(P2,{})}),b.jsxs("span",{className:"inbox-copy",children:[b.jsx("strong",{children:n}),b.jsx("span",{children:f})]})]}),a?b.jsx("time",{children:a}):null]})}function Z2({items:n,botLabel:l,onOpenFile:a}){const{locale:r}=Qe();return b.jsxs("div",{className:"bot-chat",children:[b.jsx(J2,{}),n.length===0?b.jsx($2,{}):null,n.map(u=>u.kind==="in"?b.jsxs("div",{className:"mail-row",children:[b.jsx(F2,{mail:u.mail,label:l(u.mail.from),onOpenFile:a}),po(u.time,r)?b.jsx("time",{children:po(u.time,r)}):null]},u.id):b.jsx(K2,{item:u,items:n,botLabel:l},u.id))]})}function K2({item:n,items:l,botLabel:a}){const{t:r,locale:u}=Qe(),o=Jw(n,l),f=o?xb(o,a(o)):r("inbox.other");return b.jsxs("div",{className:"bot-out",children:[b.jsx("div",{className:"user-bubble",children:n.text}),b.jsx("span",{children:r("inbox.sentTo",{name:f})}),po(n.time,u)?b.jsx("time",{children:po(n.time,u)}):null]})}function J2(){const{t:n}=Qe();return b.jsx("p",{className:"bot-chat-lead",children:n("inbox.lead")})}function $2(){const{t:n}=Qe();return b.jsx("p",{className:"empty-thread",children:n("inbox.empty")})}function po(n,l){if(!n)return"";const a=new Date(n);return Number.isNaN(a.getTime())?"":a.toLocaleTimeString(l==="zh"?"zh-CN":"en",{hour:"2-digit",minute:"2-digit"})}function P2(){return b.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[b.jsx("path",{d:"M4 13.2 6.4 5.5h11.2L20 13.2",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"}),b.jsx("path",{d:"M4 13.2h4.1l1.1 2h5.6l1.1-2H20V19a1.4 1.4 0 0 1-1.4 1.4H5.4A1.4 1.4 0 0 1 4 19Z",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinejoin:"round"})]})}function W2({root:n,marks:l,busyId:a}){const r=D.useRef(null),[u,o]=D.useState(l.at(-1)?.id??""),[f,h]=D.useState(null),[p,g]=D.useState({top:!1,bottom:!1}),y=l.map(x=>x.id).join("\0");D.useEffect(()=>{const x=n.current;if(!x||l.length<2)return;const k=()=>{const T=x.getBoundingClientRect().top,C=x.scrollHeight-x.scrollTop-x.clientHeight<48;let E=l[0]?.id??"";if(C)E=l.at(-1)?.id??E;else for(const M of l){const H=x.querySelector(`[data-turn="${CSS.escape(M.id)}"]`);H instanceof HTMLElement&&H.getBoundingClientRect().top-T<=36&&(E=M.id)}o(M=>M===E?M:E)};return k(),x.addEventListener("scroll",k,{passive:!0}),()=>x.removeEventListener("scroll",k)},[n,l,y]),D.useEffect(()=>{const x=r.current,k=x?.querySelector('[aria-current="true"]');if(!x||!k)return;const T=k.offsetTop-(x.clientHeight-k.offsetHeight)/2;x.scrollTop=Math.max(0,T);const C=x.scrollTop>1,E=x.scrollTop<x.scrollHeight-x.clientHeight-1;g(M=>M.top===C&&M.bottom===E?M:{top:C,bottom:E})},[u,y]);const{t:m}=Qe();if(l.length<2)return null;const S=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;return b.jsx("nav",{ref:r,className:["turn-rail",p.top?"fade-top":"",p.bottom?"fade-bottom":""].filter(Boolean).join(" "),"aria-label":m("turn.rail"),onMouseLeave:()=>h(null),children:l.map((x,k)=>{const T=x.id===u;return b.jsx("button",{type:"button",className:["turn-mark",T?"active":"",x.id===f?"preview":"",x.id===a?"busy":""].filter(Boolean).join(" "),"aria-current":T?"true":void 0,"aria-label":m("turn.jump",{index:String(k+1)}),onMouseEnter:()=>h(x.id),onFocus:()=>h(x.id),onBlur:()=>h(C=>C===x.id?null:C),onClick:()=>{n.current?.querySelector(`[data-turn="${CSS.escape(x.id)}"]`)?.scrollIntoView({block:"start",behavior:S?"auto":"smooth"})}},x.id)})})}function ej(n){let l=!1,a=n.visible!==!1,r=!1,u=!1,o=!1,f=0,h=0,p="",g=!1,y=()=>{},m=null;function S(C){const E=JSON.stringify(C);E!==p&&(p=E,g=n.active?.(C)===!0,n.apply(C))}function x(){if(y(),l||!a)return;const C=r?6e4:g?1500:Math.min(15e3,2e3*2**Math.min(h,3));y=n.schedule(()=>{k()},C)}async function k(){if(l||!a)return;if(u){o=!0;return}y(),u=!0;const C=f;m=new AbortController;const E=m,M=n.schedule(()=>E.abort(),1e4);try{const H=await n.fetch(m.signal);!l&&a&&C===f&&S(H),h=Math.min(h+1,3)}catch{h=Math.min(h+1,3)}finally{M(),u=!1,o?(o=!1,k()):x()}}const T={ingest(C){l||!a||(f++,r=!0,h=0,S(C),x())},disconnected(){r=!1,h=0,x()},setVisible(C){a!==C&&(a=C,C||(r=!1),f++,y(),m?.abort(),a&&(h=0,k()))},close(){l=!0,f++,y(),m?.abort()},refresh:k};return k(),T}function R0(n,l=Date.now){let a=null,r=0,u=null,o=0;const f={invalidate(){o++,a=null},get(){if(a&&l()-r<3e4)return Promise.resolve(a);if(u)return u;const h=o,p=n().then(g=>h!==o?(u=null,f.get()):(h===o&&(a=g,r=l()),g)).finally(()=>{u===p&&(u=null)});return u=p,p}};return f}const fs=new Set(["preparing","waiting","running","worker"]),M0=new Set([...fs,"background"]),tj=/(?:password|passwd|passphrase|secret|token|api[-_]?key|authorization|cookie|credential|private[-_]?key)/i;function Xe(n){if(/^\s*[\[{]/.test(n))try{const l=JSON.parse(n);if(l&&typeof l=="object")return JSON.stringify(mo(l),null,2)}catch{}return n.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g,"").replace(/-----BEGIN [^-]*PRIVATE KEY-----[\s\S]*?(?:-----END [^-]*PRIVATE KEY-----|$)/g,"[REDACTED PRIVATE KEY]").replace(/(https?:\/\/)[^\s/@]+:[^\s/@]+@/gi,"$1[REDACTED]@").replace(/\b(Bearer|Basic)\s+[A-Za-z0-9+/_.=~-]+/gi,"$1 [REDACTED]").replace(/\b(?:sk-|gh[pousr]_|github_pat_|xox[baprs]-)[A-Za-z0-9_-]+/g,"[REDACTED]").replace(/("[^"\n]*(?:password|passwd|passphrase|secret|token|api[-_]?key|authorization|cookie|credential|private[-_]?key)[^"\n]*"\s*:\s*)("(?:\\.|[^"\\])*"?|[^,}\n]+)/gi,'$1"[REDACTED]"').replace(/((?:--)?[A-Za-z_][A-Za-z0-9_-]*(?:password|passwd|secret|token|api[-_]?key|authorization|cookie|credential)[A-Za-z0-9_-]*\s*(?:=|:\s*|\s+))('[^']*'?|"(?:\\.|[^"\\])*"?|[^\s,;]+)/gi,"$1[REDACTED]").replace(/((?:--)?(?:password|passwd|secret|token|api[-_]?key|authorization|cookie|credential)\s*(?:=|:\s*|\s+))('[^']*'?|"(?:\\.|[^"\\])*"?|[^\s,;]+)/gi,"$1[REDACTED]")}function mo(n){return Array.isArray(n)?n.map(mo):n&&typeof n=="object"?Object.fromEntries(Object.entries(n).map(([l,a])=>[l,tj.test(l)?"[REDACTED]":mo(a)])):typeof n=="string"?Xe(n):n}function nj(n){try{return JSON.stringify(mo(JSON.parse(n)),null,2)}catch{return Xe(n)}}function ms(n){try{const l=JSON.parse(n);return l&&typeof l=="object"&&!Array.isArray(l)?l:{}}catch{return{}}}function Eh(n){return["bash","shell","pwsh","powershell"].includes(n.toLowerCase())}function zo(n,l,a,r=""){if(/^TOOL_(NOT_STARTED|OUTCOME_UNKNOWN)$/.test(r))return"unknown";if(/ABORT|CANCEL/i.test(r))return"cancelled";if(a)return"failed";if(Eh(n)){if(/^\[stopped: .+\]$/m.test(l))return"cancelled";if(/^\[(?:timed out after .+|killed by signal: .+|sandbox: .+)\]$/m.test(l))return"failed";const u=/^\[exit code: (-?\d+)\]$/m.exec(l);if(u)return Number(u[1])!==0?"failed":"succeeded";if(/^started background job \S+/m.test(l)||/^\[still running after \d+ms; moved to background job .+\]$/m.test(l))return"background"}return"succeeded"}function Th(n){return n.status?n.status:n.resultReceived||n.result!==""?zo(n.name,n.result,n.error):n.running?"waiting":"unknown"}const ij={preparing:"activity.status.preparing",waiting:"activity.status.waiting",running:"activity.status.running",worker:"activity.status.worker",background:"activity.status.backgroundDetail",succeeded:"activity.status.succeeded",failed:"activity.status.failed",cancelled:"activity.status.cancelled",unknown:"activity.status.unknown"};function Nv(n,l=ki){return l(ij[n])}function ds(n,l,a=[]){const r=ms(n.args),u=ms(n.result),o=Eh(n.name),f=o&&typeof r.command=="string"?Xe(r.command):"",h=typeof r.description=="string"?Xe(r.description):"",p=n.meta&&typeof n.meta=="object"?n.meta:{},g=typeof p.cwd=="string"?p.cwd:typeof r.workdir=="string"?r.workdir:l,y=typeof p.cwd=="string"||!g||g.startsWith("/")||!l?g:l.replace(/\/$/,"")+"/"+g,m=y?Xe(y):"",S=typeof u.ticketId=="string"?u.ticketId:"",x=a.find(E=>E.id===S);let k=Th(n);x&&n.name==="foundations_dispatch"?k=x.status==="failed"?"failed":x.status==="cancelled"?"cancelled":x.status==="delivered"?"succeeded":"worker":n.name==="foundations_dispatch"&&k==="succeeded"&&S&&(k="worker");const T=n.name==="todo_write"&&Array.isArray(r.todos)?r.todos.flatMap(E=>{if(!E||typeof E!="object")return[];const M=E;return typeof M.content=="string"&&typeof M.status=="string"?[{content:Xe(M.content),status:M.status}]:[]}):[],C=o?/^\[exit code: (-?\d+)\]$/m.exec(n.result):null;return{status:k,command:f,description:h,cwd:m,cwdSource:typeof p.cwd=="string"?"recorded":typeof r.workdir=="string"?"requested":"session",todos:T,title:n.name==="todo_write"?"todo_write":Xe(n.name),args:nj(n.args),output:Xe(n.result),exitCode:C?Number(C[1]):null,ticket:x,ticketId:S,latestReport:x?.events.filter(E=>E.revision===x.revision&&E.applyStatus!=="stale").at(-1)?.text??"",jobId:o?/(?:^started background job |moved to background job )([^\s\]]+)/m.exec(n.result)?.[1]??"":""}}const lj="ask_user_question";function D0(n){return n.replace(/-/g,"_").toLowerCase()===lj}function aj(n,l=!1){const a=n.match(/^(.*?)\s*[\((]\s*(Recommended|推荐|建議)\s*[\))]\s*$/i);return{label:n,displayLabel:a?.[1]?.trim()?a[1].trim():n,recommended:l||!!a}}function Nd(n,l,a=""){return n?l.startsWith("zh")&&typeof n.zh=="string"&&n.zh!==""?n.zh:typeof n[l]=="string"&&n[l]!==""?n[l]:n.en||a:a}function rj(n){if(!n||typeof n!="object")return;const l=n;if(l.kind==="plan-review"&&typeof l.approve=="string"){const a={kind:"plan-review",approve:l.approve};return typeof l.callId=="string"&&l.callId!==""&&(a.callId=l.callId),a}if(l.kind==="approval"&&typeof l.approve=="string"&&typeof l.reject=="string"){const a={kind:"approval",approve:l.approve,reject:l.reject};if(typeof l.always=="string"&&l.always!==""&&(a.always=l.always),l.subject&&typeof l.subject=="object"){const r=l.subject;typeof r.name=="string"&&r.name!==""&&(a.subject={name:r.name},typeof r.icon=="string"&&r.icon!==""&&(a.subject.icon=r.icon))}if(l.display&&typeof l.display=="object"){const r=l.display,u=jd(r.question);if(u){a.display={question:u};const o=jd(r.detail);o&&(a.display.detail=o);const f=jd(r.approve);f&&(a.display.approve=f)}}return a}}function jd(n){if(!n||typeof n!="object"||typeof n.en!="string")return;const l={en:n.en};for(const[a,r]of Object.entries(n))typeof r=="string"&&(l[a]=r);return l}function L0(n){const l=n[0];if(!l||n.length!==1||l.multiSelect||l.intent?.kind!=="plan-review")return;const a=l.options.find(u=>u.label===l.intent?.approve);if(!a)return;const r=l.options.find(u=>u.label!==a.label);if(!(l.options.length>2))return{item:l,approve:a,decline:r,plan:l.detail}}function B0(n){const l=n[0];if(!l||n.length!==1||l.multiSelect||l.intent?.kind!=="approval")return;const a=l.intent,r=l.options.find(f=>f.label===a.approve),u=l.options.find(f=>f.label===a.reject);if(!r||!u)return;const o=a.always?l.options.find(f=>f.label===a.always):void 0;return{item:l,intent:a,approve:r,reject:u,always:o}}function ca(n){return typeof n=="string"?n:""}function sj(n){return Array.isArray(n)?n.flatMap(l=>{if(!l||typeof l!="object")return[];const a=l;return typeof a.label!="string"?[]:[{label:a.label,description:ca(a.description),recommended:a.recommended===!0}]}):[]}function uj(n){return Array.isArray(n)?n.flatMap((l,a)=>{if(!l||typeof l!="object")return[];const r=l,u=ca(r.question);if(!u)return[];const o=ca(r.id);return[{id:o===""?`question-${a+1}`:o,question:u,detail:ca(r.detail),header:ca(r.header),options:sj(r.options),multiSelect:r.multi_select===!0||r.multiSelect===!0,intent:rj(r.intent)}]}):[]}function oj(n){const l=new Map,a=ms(n),r=Array.isArray(a.answers)?a.answers:Array.isArray(a)?a:[];for(const u of r){if(!u||typeof u!="object")continue;const o=u,f=ca(o.id);if(!f)continue;const h=Array.isArray(o.selected)?o.selected.flatMap(p=>typeof p=="string"?[p]:[]):[];l.set(f,{selected:h,custom:ca(o.custom)})}return l}function cj(n){const l=n.errorCode??"";return/ASK_ABORTED|ABORT|CANCEL/i.test(l)||/aborted before the user answered/i.test(n.result)}function U0(n){if(!n)return!1;const l=ms(n);return!!(l&&l.pending===!0)}function fj(n){return U0(n.result)?!1:!!(n.resultReceived||n.result!==""||n.error||n.errorCode)}function dj(n){const l=n.timeout;if(!(typeof l!="number"||!Number.isFinite(l)||l<=0))return l>1e3?l:l*1e3}function ks(n){if(!D0(n.name))return null;const l=ms(n.args),a=uj(l.questions),r=oj(n.result),u=cj(n),o=U0(n.result),f=fj(n),h=f&&n.error&&!u,p=o?"continued":f?u?"aborted":h?"failed":"answered":"open",g=dj(l),y=o?"continued":p==="open"&&g?"counting":"none",m=a.map(k=>{const T=r.get(k.id),C=T?.selected??[],E=T?.custom??"";return{...k,selected:C,custom:E,skipped:p==="answered"&&C.length===0&&!E}}),S=m.find(k=>k.header)?.header||m[0]?.question||n.name,x=L0(m)?"plan-review":B0(m)?"approval":"question";return{callId:n.callId,state:p,wait:y,timeoutMs:g,title:S,questions:m,presentation:x}}function H0(n){return n==="open"||n==="continued"}const hj=new Set(["accepted","enqueued","started","needs_user","ready"]),pj=new Set(["delivered","failed","cancelled"]),mj={preparing:"activity.status.preparing",waiting:"activity.status.waiting",running:"activity.status.running",worker:"activity.status.worker",background:"activity.status.background",succeeded:"activity.status.succeeded",failed:"activity.status.failed",cancelled:"activity.status.cancelled",unknown:"activity.status.unknown"},gj={accepted:"activity.ticket.scheduling",enqueued:"activity.ticket.scheduling",started:"activity.status.worker",needs_user:"activity.ticket.needsUser",ready:"activity.ticket.ready"};function $d(n){const{segments:l,drafting:a,currentTurn:r,tickets:u=[],t:o=ki}=n,f=[],h=[],p=new Set,g=S=>r==null||S===r,y=S=>o(mj[S]);for(const S of l){if(S.kind!=="tool")continue;const x=ds(S,void 0,u),k=ks(S);if(k&&H0(k.state)&&a&&g(S.turn)){f.push({text:o("question.waiting"),moving:!0});continue}if(x.status==="worker"&&x.ticket)continue;if(x.status==="worker"&&x.ticketId){if(p.has(x.ticketId))continue;p.add(x.ticketId)}const T=x.description||x.command||x.title,C={text:`${y(x.status)}: ${T}`,moving:x.status!=="background"};if(x.status==="background"){a&&g(S.turn)&&h.push(C);continue}fs.has(x.status)&&(!a||!g(S.turn)||f.push(C))}n.pendingApprovals?.some(S=>S.state==="open")&&f.push({text:o("approval.waiting"),moving:!0});for(const S of u){if(p.has(S.id)||pj.has(S.status)||!hj.has(S.status))continue;p.add(S.id);const x=gj[S.status];x&&f.push({text:`${o(x)}: ${S.summary}`,moving:["accepted","enqueued","started"].includes(S.status)})}let m=f.find(S=>S.text===o("question.waiting"))??f.at(-1);if(f.length>1&&m&&(m={text:`${o("activity.pendingCount",{count:String(f.length)})} · ${m.text}`,moving:f.some(S=>S.moving)}),!m&&h.length&&(m=h.at(-1)),!m&&a){const S=l.filter(x=>g(x.turn));m=S.some(x=>x.kind==="think"&&x.running)?{text:o("activity.thinking"),moving:!0}:S.some(x=>x.kind==="assistant"&&x.streaming)?{text:o("bot.replying"),moving:!0}:{text:o("activity.waitingModel"),moving:!0}}if(!m)return null;if(n.connectionPhase&&n.connectionPhase!=="live"){const S=["restoring","connecting","syncing"].includes(n.connectionPhase);m={text:o("activity.staleSummary",{phase:o(S?"activity.syncing":"activity.connectionUnavailable"),text:m.text}),moving:!1}}return{...m,text:Xe(m.text).replace(/\s+/g," ").trim()}}function yj(n){const{t:l}=Qe(),a=$d({...n,t:l}),[r,u]=D.useState(()=>typeof document>"u"||document.visibilityState!=="hidden");return D.useEffect(()=>{const o=()=>u(document.visibilityState!=="hidden");return document.addEventListener("visibilitychange",o),o(),()=>document.removeEventListener("visibilitychange",o)},[]),a?b.jsxs("div",{className:"composer-activity",role:"status","aria-live":"polite","aria-atomic":"true","data-moving":a.moving&&r?"true":"false",children:[b.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:b.jsx("path",{d:"M3 4h10M3 8h10M3 12h6",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})}),b.jsx("span",{className:"composer-activity-text",title:a.text,children:a.text})]}):null}function I0(n,l){return n==="workspace-write"?l("permission.preset.workspaceWrite"):n==="read-only"||n==="readonly"?l("permission.preset.readOnly"):n==="danger-full-access"?l("permission.preset.fullAccess"):n==="auto"?l("permission.preset.auto"):n}function jv(n,l,a){const r=I0(n,a);return r!==n?r:l&&l!==""?l:n}function Ah({title:n,closeLabel:l,onClose:a,children:r}){D.useEffect(()=>{if(typeof document>"u")return;const o=document.body.style.overflow;document.body.style.overflow="hidden";const f=h=>{h.key==="Escape"&&a()};return document.addEventListener("keydown",f),()=>{document.body.style.overflow=o,document.removeEventListener("keydown",f)}},[a]);const u=b.jsxs("div",{className:"settings-drawer",children:[b.jsx("div",{className:"settings-drawer-mask",onClick:a}),b.jsxs("div",{className:"settings-drawer-sheet",role:"dialog","aria-modal":"true","aria-label":n,tabIndex:-1,children:[b.jsx("div",{className:"settings-drawer-handle","aria-hidden":"true"}),b.jsxs("div",{className:"settings-head",children:[b.jsx("h3",{children:n}),b.jsx("button",{type:"button",className:"user-question-skip",onClick:a,children:l})]}),b.jsx("div",{className:"settings-drawer-body",children:r})]})]});return typeof document>"u"||!document.body?u:ih.createPortal(u,document.body)}function vj({sessionId:n,current:l,onClose:a,onChanged:r}){const{t:u}=Qe(),[o,f]=D.useState(null),[h,p]=D.useState(null),[g,y]=D.useState(""),[m,S]=D.useState(!1);D.useEffect(()=>{lt(`/permissions?sessionId=${encodeURIComponent(n)}`).then(E=>f(E.body))},[n]);async function x(E){S(!0),y("");try{const M=await lt("/permissions",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:n,name:E})});if(M.status===200&&M.body.ok!==!1){f(M.body),p(null),typeof M.body.currentValue=="string"&&r?.(M.body.currentValue);return}y(typeof M.body.message=="string"?M.body.message:u("permission.failed"))}catch{y(u("permission.failed"))}finally{S(!1)}}function k(E){if(!(E.value===o?.currentValue||E.value==="custom")){if(E.value==="danger-full-access"||E.value==="auto"){p(E);return}x(E.value)}}const T=o?.options??[],C=T.find(E=>E.value===(o?.currentValue??l));return b.jsxs(Ah,{title:u("permission.title"),closeLabel:u("permission.close"),onClose:a,children:[o&&o.available===!1?b.jsx("p",{className:"user-question-hint",children:u("permission.unavailable")}):null,o?.currentValue||l?b.jsxs("p",{className:"user-question-hint",children:[u("permission.current"),":"," ",jv(o?.currentValue??l??"",C?.name,u)||"—"]}):null,b.jsx("ul",{className:"user-question-options",children:T.map(E=>b.jsx("li",{children:b.jsxs("button",{type:"button",className:E.value===o?.currentValue?"user-question-option selected":"user-question-option",disabled:m||E.value==="custom",onClick:()=>k(E),children:[b.jsx("span",{className:"user-question-option-label",children:jv(E.value,E.name,u)}),E.description?b.jsx("span",{className:"user-question-option-desc",children:E.description}):null]})},E.value))}),h?b.jsxs("div",{className:"settings-confirm",children:[b.jsx("p",{className:"user-question-text",children:u("permission.confirmTitle")}),b.jsx("p",{className:"user-question-hint",children:h.value==="auto"?u("permission.confirmAuto"):u("permission.confirmFull")}),b.jsxs("div",{className:"user-question-row",children:[b.jsx("button",{type:"button",className:"user-question-skip",disabled:m,onClick:()=>p(null),children:u("permission.cancel")}),b.jsx("button",{type:"button",className:"user-question-submit",disabled:m,onClick:()=>{x(h.value)},children:u("permission.confirm")})]})]}):null,g?b.jsx("p",{className:"user-question-status exception",children:g}):null]})}function bj({onClose:n,authorization:l,catalog:a}){const{t:r}=Qe(),[u,o]=D.useState(!0),[f,h]=D.useState([]),[p,g]=D.useState([]),[y,m]=D.useState([]),[S,x]=D.useState({}),[k,T]=D.useState(""),[C,E]=D.useState(!1),[M]=D.useState(()=>R0(async()=>{const _=await lt("/authorization");if(_.status!==200)throw new Error("Authorization catalog unavailable");return _.body})),H=a??M,W=D.useRef(!0),ne=D.useRef(0);async function O(_=!1){if(document.hidden)return;_&&H.invalidate();const Z=++ne.current;try{const ee=await H.get();if(!W.current||Z!==ne.current)return;o(ee.available!==!1),h(Array.isArray(ee.entries)?ee.entries:[]),l||(g(Array.isArray(ee.notices)?ee.notices:[]),m(Array.isArray(ee.prompts)?ee.prompts:[]))}catch{W.current&&Z===ne.current&&T(r("auth.failed"))}}D.useEffect(()=>{l&&(o(l.available!==!1),(Array.isArray(l.prompts)&&l.prompts.length>0||Array.isArray(l.inFlight)&&l.inFlight.length>0)&&E(!1),g(Array.isArray(l.notices)?l.notices:[]),m(Array.isArray(l.prompts)?l.prompts:[]))},[l]),D.useEffect(()=>{W.current=!0,O();const _=()=>{document.hidden||O(!0)},Z=window.setInterval(()=>{O()},3e4);return document.addEventListener("visibilitychange",_),()=>{W.current=!1,ne.current++,window.clearInterval(Z),document.removeEventListener("visibilitychange",_)}},[H,l?.catalogRevision]);async function F(_,Z){E(!0),T("");try{const ee=await lt("/authorization/begin",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({key:_.key,method:Z})});(ee.status!==200||ee.body.ok===!1)&&T(typeof ee.body.message=="string"?ee.body.message:r("auth.failed")),await O(!0)}catch{T(r("auth.failed"))}finally{E(!1)}}async function ie(_,Z=!1,ee){E(!0),T("");try{const we=await lt("/authorization/answer",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({promptId:_.promptId,value:Z?void 0:ee??S[_.promptId]??"",declined:Z})});(we.status!==200||we.body.ok===!1)&&T(typeof we.body.message=="string"?we.body.message:r("auth.failed")),await O(!0)}catch{T(r("auth.failed"))}finally{E(!1)}}async function he(_){E(!0);try{await lt("/authorization/cancel",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({key:_.key})}),await O(!0)}finally{E(!1)}}return b.jsxs(Ah,{title:r("auth.title"),closeLabel:r("auth.close"),onClose:n,children:[u?null:b.jsx("p",{className:"user-question-hint",children:r("auth.unavailable")}),u&&f.length===0&&y.length===0?b.jsx("p",{className:"user-question-hint",children:r("auth.empty")}):null,p.map((_,Z)=>b.jsxs("p",{className:"user-question-hint",children:[_.message,_.code?` · ${_.code}`:"",_.url?b.jsxs(b.Fragment,{children:[" ",b.jsx("a",{href:_.url,target:"_blank",rel:"noreferrer",children:_.url})]}):null]},`${_.message}-${Z}`)),y.map(_=>b.jsxs("article",{className:"user-question",children:[b.jsx("p",{className:"user-question-text",children:_.message}),_.kind==="select"?b.jsx("ul",{className:"user-question-options",children:(_.options??[]).map(Z=>b.jsx("li",{children:b.jsxs("button",{type:"button",className:"user-question-option",disabled:C,onClick:()=>{ie(_,!1,Z.id)},children:[b.jsx("span",{className:"user-question-option-label",children:Z.label}),Z.description?b.jsx("span",{className:"user-question-option-desc",children:Z.description}):null]})},Z.id))}):_.kind==="secret"?b.jsxs("label",{className:"user-question-custom",children:[b.jsx("span",{className:"user-question-secret",children:r("auth.secretMask")}),b.jsx("input",{type:"text",className:"user-question-secret-input",autoComplete:"off",autoCorrect:"off",spellCheck:!1,value:S[_.promptId]??"",placeholder:_.placeholder,disabled:C,onChange:Z=>x(ee=>({...ee,[_.promptId]:Z.target.value}))})]}):b.jsx("label",{className:"user-question-custom",children:b.jsx("input",{type:"text",value:S[_.promptId]??"",placeholder:_.placeholder,disabled:C,onChange:Z=>x(ee=>({...ee,[_.promptId]:Z.target.value}))})}),b.jsxs("div",{className:"user-question-row",children:[b.jsx("button",{type:"button",className:"user-question-skip",disabled:C,onClick:()=>{ie(_,!0)},children:r("auth.cancel")}),_.kind!=="select"?b.jsx("button",{type:"button",className:"user-question-submit",disabled:C||_.kind!=="secret"&&!(S[_.promptId]??"").trim(),onClick:()=>{ie(_)},children:r("auth.writeVault")}):null]})]},_.promptId)),f.map(_=>{const Z={..._,inFlight:_.inFlight||Array.isArray(l?.inFlight)&&l.inFlight.some(ee=>JSON.stringify(ee)===JSON.stringify(_.key))};return b.jsxs("article",{className:"user-question",children:[b.jsx("p",{className:"user-question-text",children:Z.label}),b.jsxs("div",{className:"user-question-row",children:[Z.methods.map(ee=>b.jsx("button",{type:"button",className:"user-question-submit",disabled:C||Z.inFlight,onClick:()=>{F(Z,ee.id)},children:ee.label||r("auth.start")},ee.id)),Z.inFlight?b.jsx("button",{type:"button",className:"user-question-skip",disabled:C,onClick:()=>{he(Z)},children:r("auth.cancel")}):null]})]},JSON.stringify(Z.key))}),k?b.jsx("p",{className:"user-question-status exception",children:k}):null]})}function xj({onClose:n}){const{t:l,locale:a}=Qe(),[r,u]=D.useState(!1),[o,f]=D.useState(!1),[h,p]=D.useState(null),[g,y]=D.useState([]),[m,S]=D.useState([]),[x,k]=D.useState(""),[T,C]=D.useState(!1);async function E(){const H=await lt(`/cua?locale=${encodeURIComponent(a)}`);f(!0),u(H.body.available===!0);const W=H.body.systemStatus;p(W&&typeof W=="object"?W:null);const ne=H.body.applications;if(ne&&typeof ne=="object"){const O=ne;y(Array.isArray(O.allowedApps)?O.allowedApps:[]),S(Array.isArray(O.blockedApps)?O.blockedApps:[])}}D.useEffect(()=>{E()},[a]);async function M(H,W={}){C(!0),k("");try{const ne=await lt("/cua",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:H,locale:a,...W})});(ne.status!==200||ne.body.ok===!1)&&k(typeof ne.body.message=="string"?ne.body.message:l("cua.failed")),await E()}catch{k(l("cua.failed"))}finally{C(!1)}}return o&&!r?null:b.jsxs(Ah,{title:l("cua.title"),closeLabel:l("cua.close"),onClose:n,children:[b.jsx("h4",{className:"user-question-header",children:l("cua.system")}),["accessibility","screenRecording"].map(H=>b.jsxs("div",{className:"user-question-row",children:[b.jsxs("p",{className:"user-question-text",children:[l(H==="accessibility"?"cua.accessibility":"cua.screenRecording"),b.jsx("span",{className:"user-question-hint",children:h?.[H]?l("cua.granted"):l("cua.missing")})]}),b.jsx("button",{type:"button",className:"user-question-submit",disabled:T,onClick:()=>{M("requestPermission",{permission:H})},children:l("cua.request")}),b.jsx("button",{type:"button",className:"user-question-skip",disabled:T,onClick:()=>{M("openSettings",{permission:H})},children:l("cua.openSettings")})]},H)),b.jsx("h4",{className:"user-question-header",children:l("cua.grants")}),g.length===0?b.jsx("p",{className:"user-question-hint",children:l("cua.emptyGrants")}):null,g.map(H=>b.jsxs("div",{className:"user-question-row",children:[b.jsx("p",{className:"user-question-text",children:H.name}),b.jsx("button",{type:"button",className:"user-question-skip",disabled:T,onClick:()=>{M("revoke",{id:H.id})},children:l("cua.revoke")})]},H.id)),b.jsx("h4",{className:"user-question-header",children:l("cua.blocked")}),m.length===0?b.jsx("p",{className:"user-question-hint",children:l("cua.emptyBlocked")}):null,m.map(H=>b.jsxs("div",{className:"user-question-row",children:[b.jsx("p",{className:"user-question-text",children:H.name}),b.jsx("button",{type:"button",className:"user-question-submit",disabled:T,onClick:()=>{M("retryApproval",{id:H.id})},children:l("cua.askAgain")})]},H.id)),x?b.jsx("p",{className:"user-question-status exception",children:x}):null]})}function Sj(n){const l=[],a=new Set;for(const r of n){if(r.kind==="user"){l.push({id:r.id});continue}const u=r.turn??-1;a.has(u)||(a.add(u),l.push({id:`turn:${u}`}))}return l}function V0(n){return Array.isArray(n)?n.filter(l=>l?.type==="text"&&typeof l.text=="string").map(l=>l.text??"").join(`
55
+ `).trim():""}function Ch(n){const l=n.message;return l&&typeof l=="object"?l:Array.isArray(n.content)||typeof n.toolCallId=="string"?n:null}function go(n){if(typeof n=="string")return n;if(n&&typeof n=="object")try{return JSON.stringify(n)}catch{return""}return""}function Fe(n){return typeof n=="number"?n:void 0}function wj(n){if(!n||typeof n!="object")return null;const l=n;if(l.kind==="error"){const a=typeof l.error?.message=="string"&&l.error.message!==""?l.error.message:"This turn failed",r=typeof l.error?.code=="string"?l.error.code:void 0;return{message:a,...r?{code:r}:{}}}return l.kind==="interrupted"?{message:"The DSH process exited before this turn finished.",code:"INTERRUPTED"}:l.kind==="aborted"&&l.reason?.kind==="hook"&&l.reason.reason==="deepseek-account/signed-out"?{message:"Stopped because you signed out of DeepSeek.",code:"ACCOUNT_SIGNED_OUT"}:null}function qo(n,l){return`${n??""}:${l??""}`}function gs(n){return n.sort((l,a)=>l.seq-a.seq)}function kj(n,l){const a=n.findIndex(r=>r.kind==="user"&&r.optimistic&&r.text.trim()===l.text.trim());if(a>=0){const r=n.slice(),u=r[a];return!u||u.kind!=="user"?n:(r[a]={...u,optimistic:!1,time:l.time??u.time,seq:l.seq,turn:l.turn},r)}return gs([...n,l])}function Ej(n,l){const a=l.trim();if(!a)return"";try{const r=JSON.parse(a),u=typeof r.command=="string"?r.command:"",o=typeof r.description=="string"?r.description:"",f=["path","file_path","file","target_file","target"].map(p=>r[p]).find(p=>typeof p=="string"),h=typeof r.query=="string"?r.query:typeof r.pattern=="string"?r.pattern:typeof r.prompt=="string"?r.prompt:"";return(u||(typeof f=="string"?f:"")||h||o||n).replace(/\s+/g," ").trim()}catch{return a.replace(/\s+/g," ").trim()}}function Y0(n){const l=[];let a=[],r=0;const u=()=>{a.length!==0&&(l.push({type:"activity",id:`activity:${r++}`,segments:a}),a=[])};for(const o of n)o.kind==="assistant"?(u(),l.push({type:"text",segment:o})):o.kind==="tool"&&D0(o.name)?(u(),l.push({type:"question",segment:o})):(o.kind==="think"||o.kind==="tool")&&a.push(o);return u(),l}function Tj(n){let l;try{const u=JSON.parse(n.args);if(!u||typeof u!="object")return null;l=u}catch{return null}const a=n.name.toLowerCase(),r=Aj(l,["file_path","path","file"]);if(!r)return null;if(a==="write"){const u=typeof l.content=="string"?l.content:"",o=yo(u).map(f=>({kind:"add",text:f}));return Ov(r,u.length,o,o.length,0)}if(a==="edit"||a==="apply_patch"||a==="str_replace_editor"){const u=typeof l.old_string=="string"?l.old_string:typeof l.old_str=="string"?l.old_str:null,o=typeof l.new_string=="string"?l.new_string:typeof l.new_str=="string"?l.new_str:typeof l.content=="string"?l.content:typeof l.file_text=="string"?l.file_text:"",f=u==null||u===""?yo(o).map(g=>({kind:"add",text:g})):Cj(u,o),h=f.filter(g=>g.kind==="add").length,p=f.filter(g=>g.kind==="del").length;return Ov(r,o.length,f,h,p)}return null}function Ov(n,l,a,r,u){const o=n.split("/").filter(Boolean).at(-1)??n;return{path:n,name:o,language:Nj(o),kilobytes:Math.max(1,Math.ceil(l/1024)),added:r,removed:u,lines:a}}function Aj(n,l){for(const a of l){const r=n[a];if(typeof r=="string"&&r.trim())return r.trim()}return""}function yo(n){return n===""?[]:(n.endsWith(`
56
+ `)?n.slice(0,-1):n).split(`
57
+ `)}function Cj(n,l){const a=yo(n),r=yo(l);if(a.length>180||r.length>180)return[...a.map(y=>({kind:"del",text:y})),...r.map(y=>({kind:"add",text:y}))];const u=a.length+1,o=r.length+1,f=Array.from({length:u},()=>Array(o).fill(0));for(let y=a.length-1;y>=0;y-=1)for(let m=r.length-1;m>=0;m-=1){const S=f[y],x=f[y+1];!S||!x||(S[m]=a[y]===r[m]?(x[m+1]??0)+1:Math.max(x[m]??0,S[m+1]??0))}const h=[];let p=0,g=0;for(;p<a.length&&g<r.length;)a[p]===r[g]?(h.push({kind:"context",text:a[p]??""}),p+=1,g+=1):(f[p+1]?.[g]??0)>=(f[p]?.[g+1]??0)?(h.push({kind:"del",text:a[p]??""}),p+=1):(h.push({kind:"add",text:r[g]??""}),g+=1);for(;p<a.length;)h.push({kind:"del",text:a[p]??""}),p+=1;for(;g<r.length;)h.push({kind:"add",text:r[g]??""}),g+=1;return h}function Nj(n){const l=n.split(".").pop()?.toLowerCase()??"";return{py:"python",ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",md:"markdown",css:"css",html:"html",json:"json",sh:"bash",yml:"yaml",yaml:"yaml",go:"go",rs:"rust",rb:"ruby"}[l]??""}function jj(n){return(n.split(`
58
+ `).map(a=>a.trim()).find(Boolean)??"").replaceAll("**","")}function G0(n,l){const a=n.findIndex(m=>m.kind==="tool"&&m.callId===l.callId);if(a<0)return gs([...n,l]);const r=n[a];if(!r||r.kind!=="tool")return n;const u=n.slice(),o=r.resultReceived===!0||l.resultReceived===!0,h=l.resultReceived&&(!r.resultReceived||(l.resultSeq??-1)>(r.resultSeq??-1))?l:r,g=l.callReceived&&(!r.callReceived||(l.callSeq??-1)>(r.callSeq??-1))?l:r,y=(g.name!=="tool"?g.name:l.name)||r.name;return u[a]={...r,seq:!r.callReceived&&r.resultReceived&&l.callReceived?Math.min(r.seq,l.seq):r.seq,id:`tool:${l.callId}`,name:y,args:g.callReceived?g.args:l.args||r.args,callReceived:r.callReceived||l.callReceived,callSeq:g.callSeq,requestedAt:g.requestedAt,resultReceived:o,result:o?h.result:"",error:o?h.error:!1,errorCode:h.errorCode,meta:h.meta,resultSeq:h.resultSeq,settledAt:h.settledAt,status:o?zo(y,h.result,h.error,h.errorCode):l.status??r.status,running:!o&&(l.running||r.running),turn:r.turn??l.turn,step:r.step??l.step},gs(u)}function Oj(n,l,a,r,u,o){const f=`live:${l}:`,h=n.segments.filter(y=>y.id.startsWith(f));let p=n.segments.filter(y=>!y.id.startsWith(f)||y.kind==="tool"&&(y.callReceived||y.resultReceived));const g=[];for(const y of a){const m=r+y.index/100;if(y.kind==="reasoning"&&y.text.trim())g.push({kind:"think",id:`${f}think:${y.index}`,text:y.text,running:!0,seq:m,turn:u,step:o});else if(y.kind==="text"&&y.text)g.push({kind:"assistant",id:`${f}text:${y.index}`,text:y.text,streaming:!0,seq:m,turn:u,step:o});else if(y.kind==="tool-call"&&(y.name||y.args||y.id)){const S=y.id||`${f}tool:${y.index}`,x=[...p,...h].find(T=>T.kind==="tool"&&T.callId===S),k=p.findIndex(T=>T.kind==="tool"&&T.callId===S);if(k>=0){const T=p[k];if(T&&T.kind==="tool"&&!T.callReceived&&!T.resultReceived){const C=p.slice();C[k]={...T,name:y.name||T.name,args:y.args||T.args,running:T.resultReceived?!1:T.running,status:T.resultReceived||T.callReceived?T.status:"preparing"},p=C}}else g.push({kind:"tool",id:`${f}tool:${y.index}`,callId:S,name:y.name||x?.name||"tool",args:y.args||x?.args||"",result:x?.result??"",error:x?.error??!1,running:!x?.resultReceived,status:x?.status??"preparing",resultReceived:x?.resultReceived,seq:x?.seq??m,turn:u,step:o})}}return gs([...p,...g])}function Q0(n,l,a){const r=n.find(u=>u.index===l);return r?r.kind===a?n:n.map(u=>u.index===l?{...u,kind:a}:u):[...n,{index:l,kind:a,text:"",id:"",name:"",args:""}].sort((u,o)=>u.index-o.index)}function io(n,l,a,r){return Q0(n,l,a).map(o=>o.index===l?r({...o,kind:a}):o)}function _j(n,l){const a=Fe(l.index)??0,r=typeof l.type=="string"?l.type:"";if(r==="block-start"){const u=l.blockType==="reasoning"||l.blockType==="tool-call"||l.blockType==="text"?l.blockType:"text";return Q0(n,a,u)}if(r==="text-delta"||r==="text-chunks"){const u=typeof l.text=="string"?l.text:_v(l.texts);return io(n,a,"text",o=>({...o,text:o.text+u}))}if(r==="reasoning-delta"||r==="reasoning-chunks"){const u=typeof l.text=="string"?l.text:_v(l.texts);return io(n,a,"reasoning",o=>({...o,text:o.text+u}))}if(r==="tool-call-delta"||r==="tool-call-chunks"){const u=typeof l.argumentsDelta=="string"?l.argumentsDelta:go(l.args??l.arguments);return io(n,a,"tool-call",o=>({...o,id:typeof l.id=="string"&&l.id?l.id:o.id,name:typeof l.name=="string"&&l.name?l.name:o.name,args:r==="tool-call-chunks"&&u?u:o.args+u}))}if(r==="block-end"&&l.block&&typeof l.block=="object"){const u=l.block,o=u.type==="reasoning"||u.type==="tool-call"||u.type==="text"?u.type:"text";return io(n,a,o,f=>({...f,kind:o,text:typeof u.text=="string"?u.text:f.text,id:u.id||f.id,name:u.name||f.name,args:go(u.arguments)||f.args}))}return n}function _v(n){return Array.isArray(n)?n.filter(l=>typeof l=="string").join(""):""}function F0(n,l){const a=l.data??{},r=a.chunk;if(!r||typeof r!="object")return n;const u=Fe(a.turn),o=Fe(a.step),f=qo(u,o),h=n.live[f]??{seq:l.seq??0,blocks:[]},p=_j(h.blocks,r),g={...n.live,[f]:{seq:h.seq||l.seq||0,blocks:p}},y=h.seq||l.seq||0;return{...n,live:g,drafting:!0,turn:u??n.turn,segments:Oj({...n},f,p,y,u,o)}}function X0(n,l){const a=l.data??{},r=Ch(a),u=r?.content??[],o=Fe(a.turn),f=Fe(a.step),h=qo(o,f),p={...n.live};delete p[h];let g=n.segments.filter(m=>!m.id.startsWith(`live:${h}:`));g=g.filter(m=>!((m.kind==="think"||m.kind==="assistant")&&m.turn===o&&m.step===f));const y=l.seq??0;return u.forEach((m,S)=>{const x=y+S/100;if(m.type==="reasoning"&&m.text?.trim())g.push({kind:"think",id:`think:${h}:${S}`,text:m.text,running:!1,seq:x,turn:o,step:f});else if(m.type==="text"&&m.text)g.push({kind:"assistant",id:`text:${h}:${S}`,text:m.text,streaming:!1,time:l.time,seq:x,turn:o,step:f,messageId:r?.id});else if(m.type==="tool-call"){const k=m.id||`call:${h}:${S}`,T=g.find(C=>C.kind==="tool"&&C.callId===k);g=g.filter(C=>!(C.kind==="tool"&&C.callId===k)),g.push({...T?.kind==="tool"?T:{},kind:"tool",id:`tool:${k}`,callId:k,name:T?.kind==="tool"&&T.callReceived?T.name:m.name||(T?.kind==="tool"?T.name:"")||"tool",args:T?.kind==="tool"&&T.callReceived?T.args:go(m.arguments)||(T?.kind==="tool"?T.args:""),result:T?.kind==="tool"?T.result:"",error:T?.kind==="tool"?T.error:!1,running:T?.kind==="tool"?T.running&&!T.resultReceived:!0,status:T?.kind==="tool"?T.resultReceived?zo(m.name||T.name,T.result,T.error,T.errorCode):T.status:"preparing",seq:x,turn:o,step:f})}}),{...n,live:p,segments:gs(g)}}function zj(n,l){const a=l.data??{},r=typeof a.callId=="string"?a.callId:"";if(!r)return n;const u=Fe(a.turn),o=Fe(a.step);return{...n,segments:G0(n.segments,{kind:"tool",id:`tool:${r}`,callId:r,name:typeof a.name=="string"?a.name:"tool",args:go(a.arguments),status:n.turnEnds?.[u??-1]?"unknown":"waiting",callReceived:!0,callSeq:l.seq,requestedAt:l.time,result:"",error:!1,running:!0,seq:l.seq??Number.MAX_SAFE_INTEGER,turn:u,step:o})}}function qj(n,l){const a=l.data??{},r=Ch(a),u=r?.toolCallId??(typeof a.callId=="string"?a.callId:"");if(!u)return n;const o=V0(r?.content),f=Fe(a.turn),h=Fe(a.step),p=n.segments.find(g=>g.kind==="tool"&&g.callId===u);return{...n,segments:G0(n.segments,{kind:"tool",id:`tool:${u}`,callId:u,name:p?.kind==="tool"?p.name:"tool",args:p?.kind==="tool"?p.args:"",result:o,resultReceived:!0,resultSeq:l.seq,settledAt:l.time,meta:a.meta,errorCode:typeof a.error?.code=="string"?a.error.code:void 0,status:zo(p?.kind==="tool"?p.name:"tool",o,r?.isError===!0,typeof a.error?.code=="string"?a.error.code:void 0),error:r?.isError===!0,running:!1,seq:p?.seq??l.seq??Number.MAX_SAFE_INTEGER,turn:f??(p?.kind==="tool"?p.turn:void 0),step:h??(p?.kind==="tool"?p.step:void 0)})}}function Rj(n){if(!n||typeof n!="object")return null;const l=n,a=l.value;if(a&&typeof a=="object"&&!Array.isArray(a)){const r=a;if(typeof r.type=="string")return r}return typeof l.type=="string"?l:null}function Z0(n,l){let a=l;for(const r of n.segments)r.seq>a&&(a=r.seq);return a+.5}function Mj(n){if(!Array.isArray(n))return[];const l=[];for(const a of n){if(!a||typeof a!="object")continue;const r=a;if(r.type==="chunk"&&r.chunk&&typeof r.chunk=="object"){l.push({time:Fe(r.time)??0,chunk:r.chunk});continue}const u=Fe(r.index)??0,o=Array.isArray(r.texts)?r.texts:Array.isArray(r.args)?r.args:null;if(!o)continue;let f=Fe(r.time0)??0;const h=Array.isArray(r.dt)?r.dt:[];o.forEach((p,g)=>{g>0&&(f+=Fe(h[g-1])??0);const y=typeof p=="string"?p:"";r.type==="text-chunks"?l.push({time:f,chunk:{type:"text-delta",index:u,text:y}}):r.type==="reasoning-chunks"?l.push({time:f,chunk:{type:"reasoning-delta",index:u,text:y}}):r.type==="tool-call-chunks"&&l.push({time:f,chunk:{type:"tool-call-delta",index:u,id:typeof r.id=="string"?r.id:"",...typeof r.name=="string"?{name:r.name}:{},argumentsDelta:y}})})}return l}function K0(n,l,a,r,u,o){return F0(n,{seq:o,data:{turn:l,step:a,chunk:u}})}function Pd(n,l,a,r=!1){const u=qo(l,a),o={...n.live};return delete o[u],{...n,live:o,segments:n.segments.filter(f=>f.id.startsWith(`live:${u}:`)?f.kind==="tool"&&(f.callReceived===!0||f.resultReceived===!0):!(r&&f.kind!=="user"&&f.turn===l&&f.step===a&&(f.kind==="assistant"||f.kind==="think")))}}function Dj(n,l){const a=n.streamAttempt;if(!a||l.surfaceOp!=null&&l.surfaceOp!=="append")return!1;const r=l.data??{};return Fe(r.turn)!==a.turn||Fe(r.step)!==a.step?!1:l.seq==null||l.seq>a.startedAfterSeq}function rs(n){const l=n.pendingAssistant;return{...l?X0(n,l):n,pendingAssistant:null,streamAttempt:null}}function Lj(n,l,a){return{...n,streamAttempt:null,pendingAssistant:null,segments:n.segments.map(r=>r.kind==="user"||r.turn!==l||r.step!==a?r:r.kind==="think"?{...r,running:!1}:r.kind==="tool"?{...r,running:!1,status:r.resultReceived||!M0.has(Th(r))?r.status:"unknown"}:r.kind==="assistant"?{...r,streaming:!1}:r)}}function J0(n,l,a){return!!n.turnEnds?.[l]||n.segments.some(r=>r.kind!=="user"&&r.turn===l&&r.step===a&&(r.kind==="tool"?r.callReceived||r.resultReceived:r.kind==="assistant"?!r.id.startsWith("live:")&&!r.streaming:r.kind==="think"&&!r.id.startsWith("live:")&&!r.running))}function Bj(n,l){const a=Fe(l.revision)??n.streamRevision;if(a<n.streamRevision)return n;let r={...n,streamRevision:a};const u=l.activeAttempt;if(!u||typeof u!="object")return{...r,streamAttempt:null};const o=u,f=typeof o.attemptId=="string"?o.attemptId:"",h=Fe(o.turn),p=Fe(o.step),g=Fe(o.startedAfterSeq)??a;if(!f||h==null||p==null)return{...r,streamAttempt:null};if(J0(r,h,p))return{...r,streamAttempt:null};r=Pd(r,h,p);const y=Mj(o.stream),m=Math.min(Fe(o.nextIndex)??y.length,y.length),S=Z0(r,g);for(let x=0;x<m;x+=1){const k=y[x];k&&(r=K0(r,h,p,k.time,k.chunk,S))}return{...r,drafting:m>0||r.drafting,streamAttempt:{attemptId:f,turn:h,step:p,nextIndex:m,startedAfterSeq:g}}}function Uj(n,l){const a=typeof l.type=="string"?l.type:"",r=Fe(l.revision),u=typeof l.attemptId=="string"?l.attemptId:"";if(r==null||!u||r<=n.streamRevision)return n;if(a==="start"){const f=Fe(l.turn),h=Fe(l.step);if(f==null||h==null||J0(n,f,h))return n;const p=n.pendingAssistant?rs(n):n;return{...Pd(p,f,h,!0),drafting:!0,streamRevision:r,streamAttempt:{attemptId:u,turn:f,step:h,nextIndex:0,startedAfterSeq:Fe(l.startedAfterSeq)??n.streamRevision}}}if(r!==n.streamRevision+1)return{...rs(n),streamRevision:r};const o=n.streamAttempt;if(!o||n.turnEnds?.[o.turn]||o.attemptId!==u)return{...n,streamRevision:r};if(a==="chunk"){const f=Fe(l.index),h=l.chunk;if(f==null||!h||typeof h!="object")return{...n,streamRevision:r};if(f!==o.nextIndex)return{...rs(n),streamRevision:r};const p=qo(o.turn,o.step),g=n.live[p]?.seq||Z0(n,o.startedAfterSeq);return{...K0(n,o.turn,o.step,Fe(l.time)??0,h,g),streamRevision:r,streamAttempt:{...o,nextIndex:o.nextIndex+1}}}if(a==="end"){const f=l.outcome&&typeof l.outcome=="object"?l.outcome:{},h={...n,streamRevision:r};if(f.kind==="abandoned"){const p={...h,segments:h.segments.map(y=>y.kind==="tool"&&!y.callReceived&&!y.resultReceived&&y.turn===o.turn&&y.step===o.step?{...y,id:`tool:${y.callId}`,running:!1,status:"cancelled"}:y)};return{...Pd(p,o.turn,o.step),streamAttempt:null,pendingAssistant:null}}return f.kind==="committed"&&f.eventType==="assistant/message"?{...rs(h),streamRevision:r}:{...Lj(h,o.turn,o.step),streamRevision:r}}return{...n,streamRevision:r}}function Hj(n,l,a=!1){const r=Fe(n.pendingAssistant?.data?.turn),u=n.pendingAssistant&&(l==null||r===l)?rs(n):n,o=Object.fromEntries(Object.entries(u.live).filter(([f])=>!f.startsWith(`${l??""}:`)));return{...u,live:o,segments:u.segments.filter(f=>!(typeof l=="number"&&f.id.startsWith(`live:${l}:`))||f.kind==="tool").map(f=>f.turn!==l?f:f.kind==="think"?{...f,running:!1}:f.kind==="tool"?{...f,running:!1,status:f.resultReceived||!M0.has(Th(f))?f.status:a&&!f.callReceived?"cancelled":"unknown"}:f.kind==="assistant"?{...f,streaming:!1}:f)}}function Ij(n,l){const a=l.projections,r=a&&typeof a=="object"?a.values??{}:{},u={...n};typeof r.title=="string"&&(u.title=r.title);const o=r.modelSelection&&typeof r.modelSelection=="object"?r.modelSelection.lastUsed:void 0;o?.model&&(u.model=o.model);const f=r.permissions;if(f&&typeof f=="object"){const p=f,g=p.currentValue??p.preset??p.sandbox;typeof g=="string"&&(u.preset=g)}const h=r.sessionStats;if(h&&typeof h=="object"){const p=h.turns,g=h.steps;typeof p=="number"&&(u.turns=p),typeof g=="number"&&(u.steps=g)}return u}function Vj(n,l){if(typeof l.type!="string")return n;let a=n;const r=l.data??{};if(l.type==="session/title"&&typeof r.title=="string"){const u=r.source&&typeof r.source=="object"?r.source.kind:"";return a.title&&u!=="provider"||(a={...a,title:r.title}),a}if(l.type==="request/context"){const u=typeof r.model=="string"?r.model:"";return u&&(a={...a,model:u}),a}if(l.type==="turn/start"){const u=Fe(r.turn);return a={...a,drafting:!0,turn:u??a.turn,turnStartedAt:typeof l.time=="number"?l.time:Date.now()},a}if(l.type==="turn/end"){const u=Fe(r.turn)??a.turn,o={...a.completed};u!=null&&a.turn===u&&a.turnStartedAt!=null&&typeof l.time=="number"&&(o[u]=Math.max(1,Math.round((l.time-a.turnStartedAt)/1e3)));const f=u==null?null:wj(r.reason),h=f==null||u==null?a.failures:{...a.failures,[u]:f},p=r.reason&&typeof r.reason=="object"&&typeof r.reason.kind=="string"?r.reason.kind:"",g=u==null?a.turnEnds??{}:{...a.turnEnds??{},[u]:p||a.turnEnds?.[u]||"ended"};return a=Hj(a,u,p==="aborted"),a={...a,drafting:a.turn===u?!1:a.drafting,completed:o,failures:h,turnEnds:g,turnStartedAt:a.turn===u?null:a.turnStartedAt},a}if(l.type==="llm/retry"){const u=Fe(r.turn),o=typeof r.retryId=="string"?r.retryId:"",f=Fe(r.retry);if(u==null||o===""||f==null)return a;const h=r.failure&&typeof r.failure=="object"?r.failure:{},p={retryId:o,retry:f,maxRetries:Fe(r.maxRetries)??null,delayMs:typeof r.delayMs=="number"?r.delayMs:0,message:typeof h.message=="string"?h.message:"Request failed.",...typeof h.code=="string"?{code:h.code}:{},state:"scheduled"},g=a.retries[u]??[];return a={...a,retries:{...a.retries,[u]:[...g.filter(y=>y.retryId!==o||y.retry!==f),p]}},a}if(l.type==="llm/retry-started"){const u=Fe(r.turn),o=typeof r.retryId=="string"?r.retryId:"",f=Fe(r.retry);if(u==null||o===""||f==null)return a;const h=a.retries[u];return h&&(a={...a,retries:{...a.retries,[u]:h.map(p=>p.retryId===o&&p.retry===f?{...p,state:"started"}:p)}}),a}if(l.type==="assistant/live-chunk")return a=F0(a,l),a;if(l.type==="user/message"){const u=Ch(r);if(!u||u.source?.kind!=="user")return a;const o=V0(u.content);return o&&(a={...a,segments:kj(a.segments,{kind:"user",id:`user:${l.seq??o}`,text:o,time:l.time,seq:l.seq??Number.MAX_SAFE_INTEGER,turn:Fe(r.turn)})}),a}return l.type==="assistant/message"?(Dj(a,l)?a={...a,pendingAssistant:l}:a=X0(a,l),a):l.type==="tool/call"?(a=zj(a,l),a):(l.type==="tool/result"&&(a=qj(a,l)),a)}function Yj(n,l){const a=Rj(l)??(l&&typeof l=="object"?l:null);if(!a)return n;let r=n;if(a.type==="snapshot"){r=Ij(r,a);const u=a.assistantStream;u&&typeof u=="object"&&(r=Bj(r,u))}if(a.type==="assistant-stream"){const u=a.frame;u&&typeof u=="object"&&(r=Uj(r,u))}return r}function Gj(n){for(let l=n.length-1;l>=0;l-=1){const a=n[l];if(!a||a.kind==="user"&&pb(a.text))continue;const r=a.kind==="user"?So(a.text):null,u=a.kind==="user"?th(a.text):null,f=(r?r.body:u?.body?u.body:a.kind==="user"||a.kind==="assistant"?a.text:a.kind==="tool"?a.result||Ej(a.name,a.args):jj(a.text)).replace(/```[\s\S]*?```/g," ").replace(/^#{1,6}\s+/gm,"").replace(/[|*_`>]/g," ").replace(/\s+/g," ").trim();if(f)return f.slice(0,80)}return""}function vo(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}function zv(n,l){if(!vo(n))return;if(l==="ticket.id"){const r=n.ticket;if(!vo(r))return;const u=r.id;return typeof u=="string"&&u!==""?u:void 0}const a=n[l];if(typeof a=="string"&&a!=="")return a;if(typeof a=="number"&&Number.isFinite(a))return String(a)}function ys(n,l){if(!vo(l)||l.t!=="v"&&l.t!=="o"&&l.t!=="l")return n;const a=l;return a.t==="v"?a.v:a.t==="o"?Qj(n,a):Fj(n,a)}function Qj(n,l){const a=vo(n)?{...n}:{};for(const r of l.d??[])delete a[r];for(const[r,u]of Object.entries(l.s))a[r]=ys(a[r],u);return a}function Fj(n,l){const a=l.id,r=Array.isArray(n)?n.slice():[],u=new Set(l.d??[]),o=[],f=new Map;for(const p of r){const g=zv(p,a);g!==void 0&&u.has(g)||(g!==void 0&&f.set(g,o.length),o.push(p))}for(const[p,g]of Object.entries(l.s??{})){const y=f.get(p);if(y===void 0){o.push(ys(void 0,g));continue}o[y]=ys(o[y],g)}if(!l.order)return o;const h=new Map;for(const p of o){const g=zv(p,a);g!==void 0&&h.set(g,p)}return l.order.filter(p=>h.has(p)).map(p=>h.get(p))}const Xj=1,Zj=500,Kj={minMessages:50,minTurns:2},Jj=500,$j=2e3,Pj=256*1024,Wj=6,eO=3,tO=5e3,nO=8*1024*1024,iO=2e3,lO=500,aO=1e4,Od=3,$0=64*1024*1024,P0="/api/dsh-bot/log/range",rO="/api/dsh-bot/log/manifest",sO="/api/dsh-bot/log/chunk",uO="/api/session/events",oO=3e3,cO=3e4,fO=1e3,dO=15e3;class hO{appliedSeq;headSeq=null;pending=new Map;pendingBytes=0;constructor(l=-1){this.appliedSeq=l}setHead(l){(this.headSeq==null||l>this.headSeq)&&(this.headSeq=l)}push(l){const a=[];for(const o of l)if(!(typeof o.seq!="number"||!Number.isFinite(o.seq))&&!(o.seq<=this.appliedSeq)){if(o.seq===this.appliedSeq+1){a.push(o),this.appliedSeq=o.seq,this.flushPending(a);continue}this.pending.has(o.seq)||(this.pending.set(o.seq,o),this.pendingBytes+=qv(o))}let r=null;(this.pending.size>tO||this.pendingBytes>nO)&&(r={afterSeq:this.appliedSeq,dropped:this.pending.size},this.pending.clear(),this.pendingBytes=0);const u=this.nextGap();return{delivered:a,gapTo:u,overflow:r}}flushPending(l){for(;this.pending.has(this.appliedSeq+1);){const a=this.pending.get(this.appliedSeq+1);if(this.pending.delete(this.appliedSeq+1),!a)break;this.pendingBytes=Math.max(0,this.pendingBytes-qv(a)),l.push(a),this.appliedSeq=a.seq}}nextGap(){if(this.pending.size===0)return null;let l=Number.POSITIVE_INFINITY;for(const a of this.pending.keys())a<l&&(l=a);return Number.isFinite(l)?l:null}}function qv(n){return 64+(typeof n.type=="string"?n.type.length:0)}function ar(n,l){return{kind:"session",sessionId:n}}function Rv(n){const l=n.addressOf??(r=>ar(r)),a=n.openingMessages??Xj;return{kind:"ws-follow",open(r,u,o){return new Promise(f=>{const h=typeof location<"u"&&location.protocol==="https:"?"wss:":"ws:",p=typeof location<"u"?location.host:"127.0.0.1",g=n.url??`${h}//${p}/api/remote.mux`,y=(n.websocket??(C=>new WebSocket(C)))(g),m=`follow-${Math.random().toString(36).slice(2)}`;let S=!1;const x=()=>!S&&y.readyState===1,k=C=>{if(!S){S=!0,o.removeEventListener("abort",T);try{y.close()}catch{}f(C)}},T=()=>k({ok:!1,retryable:!1,code:"ABORTED"});o.addEventListener("abort",T),y.addEventListener("open",()=>{o.aborted||y.send(JSON.stringify({type:"open",streamId:m,endpoint:"session/follow",payload:{args:{request:{address:l(r.sessionId),maxMessages:a,assistantStream:!0,activate:!0}}}}))}),y.addEventListener("message",C=>{let E;try{E=JSON.parse(String(C.data))}catch{return}if(E.streamId===m){if(E.type==="error"){k({ok:!1,retryable:!0,code:"FOLLOW_ERROR",message:E.error?.message});return}if(E.type==="end"){k({ok:!0,throughSeq:-1});return}E.type==="item"&&pO(E.value,u,x)}}),y.addEventListener("close",()=>k({ok:!1,retryable:!0,code:"FOLLOW_CLOSED"})),y.addEventListener("error",()=>k({ok:!1,retryable:!0,code:"FOLLOW_ERROR"}))})}}}function pO(n,l,a){const r=W0(n);if(!r)return;if(r.type==="snapshot"){const o=typeof r.cursor=="number"?r.cursor:-1,f=vs(r.records),h=f.length>0?Math.min(...f.map(g=>g.seq)):o+1,p=r.hasMore===!0;l.opened({firstSeq:h,cursor:o,hasMore:p,...a?{alive:a}:{}}),l.head(o),f.length&&l.events(f),l.ephemeral(r);return}if(r.type==="assistant-stream"){l.ephemeral(r);return}const u=vs(r);u.length&&l.events(u)}function W0(n){if(!n||typeof n!="object")return null;const l=n;if(typeof l.type=="string"&&(l.type==="snapshot"||l.type==="assistant-stream"||l.type==="event"))return l;const a=l.value;return a&&typeof a=="object"&&!Array.isArray(a)?W0(a):l}function vs(n){const l=[];return ro(n,l),l.sort((a,r)=>a.seq-r.seq)}function ro(n,l){if(!n)return;if(Array.isArray(n)){for(const u of n)ro(u,l);return}if(typeof n!="object")return;const a=n;if(a.event&&typeof a.event=="object"){const u=Mv(a.event);u&&l.push(u);return}const r=Mv(a);r&&l.push(r),Array.isArray(a.records)&&ro(a.records,l),Array.isArray(a.events)&&ro(a.events,l)}function Mv(n){if(!n||typeof n!="object")return null;const l=n;return typeof l.type!="string"||typeof l.seq!="number"?null:{type:l.type,seq:l.seq,time:typeof l.time=="number"?l.time:0,data:l.data,...l.surfaceOp!==void 0?{surfaceOp:l.surfaceOp}:{},...l.sourceEventSeqs!==void 0?{sourceEventSeqs:l.sourceEventSeqs}:{}}}function Dv(n={}){const l=n.fetch??fetch,a=n.url??P0;return{kind:"plugin-range",async fetch(r,u,o){if(r.throughSeq<=r.afterSeq)return{ok:!0,throughSeq:r.throughSeq};let f=r.afterSeq;try{for(;!o.aborted;){const h=new URLSearchParams({sessionId:r.sessionId,afterSeq:String(f),throughSeq:String(r.throughSeq),limit:String(Jj)}),p=await l(`${a}?${h}`,{method:"GET",credentials:"same-origin",signal:o,headers:{accept:"application/json"}});if(p.status===404)return{ok:!1,retryable:!1,code:"ENHANCE_UNAVAILABLE"};if(!p.ok)return{ok:!1,retryable:p.status>=500,code:"RANGE_ERROR",message:`HTTP ${p.status}`};const g=await p.json(),y=vs(g.events);if(y.length&&u.events(y,{throughSeq:r.throughSeq}),g.nextAfterSeq==null)return{ok:!0,throughSeq:r.throughSeq};if(g.nextAfterSeq<=f)return{ok:!1,retryable:!0,code:"RANGE_STALLED"};f=g.nextAfterSeq}return{ok:!1,retryable:!1,code:"ABORTED"}}catch(h){return o.aborted?{ok:!1,retryable:!1,code:"ABORTED"}:{ok:!1,retryable:!0,code:"RANGE_ERROR",message:h instanceof Error?h.message:String(h)}}}}}async function mO(n=fetch,l=P0,a){try{return(await n(l,{method:"HEAD",credentials:"same-origin",signal:a})).ok}catch{return!1}}const gO=n=>{if(typeof document>"u"||typeof window>"u")return()=>{};let l=document.visibilityState==="hidden"?Date.now():null;const a=()=>l==null?0:Math.max(0,Date.now()-l),r=()=>{if(document.visibilityState==="hidden"){l==null&&(l=Date.now());return}const p=a();l=null,n({reason:"visible",hiddenMs:p})},u=()=>{l==null&&(l=Date.now())},o=p=>{const g=a();l=null,n({reason:"pageshow",hiddenMs:g,persisted:p.persisted})},f=()=>n({reason:"online",hiddenMs:a()}),h=()=>{if(document.visibilityState==="hidden")return;const p=a();l=null,n({reason:"focus",hiddenMs:p})};return document.addEventListener("visibilitychange",r),window.addEventListener("pagehide",u),window.addEventListener("pageshow",o),window.addEventListener("online",f),window.addEventListener("focus",h),()=>{document.removeEventListener("visibilitychange",r),window.removeEventListener("pagehide",u),window.removeEventListener("pageshow",o),window.removeEventListener("online",f),window.removeEventListener("focus",h)}};function yO(){return typeof document<"u"&&document.visibilityState==="hidden"}function Lv(n){return{open(l,a){return vO(n,l,a??{})}}}function vO(n,l,a){const r=new AbortController,u=new Set,o=new Set,f=new Set;let h={phase:"restoring",appliedSeq:-1,headSeq:null,lag:null,fraction:null},p;const g=new Promise(P=>{p=P});let y=!1;const m=P=>{y||(y=!0,p(P))};let S=[],x=!1,k=null;const T=n.raf??(typeof requestAnimationFrame=="function"?requestAnimationFrame:P=>setTimeout(P,0)),C=n.cancelRaf??(typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout),E=()=>{k!=null&&(k.kind==="timer"?clearTimeout(k.id):C(k.id),k=null)},M=n.wait??xO,H=n.random??Math.random,W=n.now??Date.now,ne=n.isHidden??yO,O=()=>{if(k=null,S.length===0)return;const P=S;S=[];const de={events:P,fromCache:x};x=!1;for(const at of u)at(de)},F=()=>{E(),O()},ie=(P,de=!1)=>{if(P.length===0||(de&&(x=!0),S.push(...P),k!=null))return;const at={kind:ne()?"timer":"raf",id:null};k=at,at.id=at.kind==="timer"?setTimeout(O,0):T(O)},he=P=>{h={...h,...P,lag:(P.headSeq??h.headSeq)==null||(P.appliedSeq??h.appliedSeq)==null?P.lag??h.lag:(P.headSeq??h.headSeq)-(P.appliedSeq??h.appliedSeq)};for(const de of f)de(h)};let _=0,Z=!1,ee=0,we=!0,Re=null,le=!1,Q=null,se=null,ue=!1,ke=W(),j=Number.NEGATIVE_INFINITY;const We=async P=>{if(r.signal.aborted)return;if(le){le=!1;return}const de=new AbortController;Re=de;const at=()=>de.abort();r.signal.addEventListener("abort",at,{once:!0});try{await M(P,de.signal)}catch{}finally{r.signal.removeEventListener("abort",at),Re===de&&(Re=null)}},dt=()=>{const P=ue;return ue=!1,P},z=P=>{if(!we||r.signal.aborted)return;F();const de=W(),at=se?se():!0,_t=de-ke>=cO,xe=!at||P.reason==="online"||P.persisted===!0||P.hiddenMs>=oO||P.reason!=="focus"&&_t;if(ee=0,_=0,Z=!1,Re){Re.abort();return}if(!Q){le=!0;return}xe&&(de-j<fO||(j=de,Q.signal.aborted||(ue=!0,Q.abort())))};q();async function q(){try{await te()}finally{we=!1,Ee()}}async function te(){const P=await n.checkpoint.getCursor(l);let de=P?.appliedSeq??-1;const at=await n.checkpoint.readEvents(l,-1),_t=bO(at,-1).filter(_e=>_e.seq<=de||de<0);de<0&&_t.length&&(de=_t[_t.length-1].seq);const xe=new hO(de);P?.headSeq!=null&&xe.setHead(P.headSeq),_t.length&&ie(_t,!0),he({phase:"connecting",appliedSeq:xe.appliedSeq,headSeq:xe.headSeq});let zt=a.enhancement==="off"?!1:await fe();const vt=()=>({events(_e){const rt=xe.push(_e);xe.headSeq!=null&&xe.appliedSeq>xe.headSeq&&xe.setHead(xe.appliedSeq),rt.delivered.length&&(ie(rt.delivered),n.checkpoint.putEvents(l,rt.delivered),n.checkpoint.setCursor(l,xe.appliedSeq,xe.headSeq)),he({appliedSeq:xe.appliedSeq,headSeq:xe.headSeq,fraction:h.fraction}),rt.overflow},head(_e){xe.setHead(_e),he({headSeq:xe.headSeq,appliedSeq:xe.appliedSeq})},progress(_e){const rt=_e.total&&_e.total>0?Math.min(1,_e.loaded/_e.total):null;he({fraction:rt,appliedSeq:xe.appliedSeq,headSeq:xe.headSeq})},ephemeral(_e){for(const rt of o)rt(_e)},opened(){}}),Ze=async(_e,rt,wt)=>{if(rt<=_e)return{ok:!0,throughSeq:rt};he({phase:"syncing",fraction:h.fraction});const un=rt-_e,Zt=vt(),Vt=zt&&n.cdc!=null&&(un>$j||un*128>Pj);if(zt&&n.range!=null&&!Vt&&n.range){const Yt=await n.range.fetch({sessionId:l,afterSeq:_e,throughSeq:rt},Zt,wt);if(Yt.ok||wt.aborted)return Yt;zt=!1}else if(Vt&&n.cdc){const Yt=await n.cdc.fetch({sessionId:l,afterSeq:_e,throughSeq:rt},Zt,wt);if(Yt.ok||wt.aborted)return Yt;zt=!1}return n.page.fetch({sessionId:l,afterSeq:xe.appliedSeq,throughSeq:rt},Zt,wt)};for(;!r.signal.aborted;){if(Z){he({phase:"stalled",appliedSeq:xe.appliedSeq,headSeq:xe.headSeq,fraction:null});const ze=new AbortController,kt=()=>ze.abort();r.signal.addEventListener("abort",kt);const Gt=xe.headSeq??xe.appliedSeq,on=await n.page.fetch({sessionId:l,afterSeq:xe.appliedSeq,throughSeq:Math.max(Gt,xe.appliedSeq)},vt(),ze.signal);r.signal.removeEventListener("abort",kt),on.ok&&xe.headSeq!=null&&xe.appliedSeq>=xe.headSeq&&(he({phase:"live",appliedSeq:xe.appliedSeq,headSeq:xe.headSeq,fraction:null,error:void 0}),m({ok:!0,caughtUpTo:xe.appliedSeq})),ee+=1;const At=lo(ee,H);await We(Math.min(At,iO)),Z=_>=Od}if(r.signal.aborted)break;he({phase:h.phase==="restoring"?"connecting":h.phase==="live"?"syncing":"connecting"});const _e=new AbortController;Q=_e,se=null;const rt=()=>_e.abort();r.signal.addEventListener("abort",rt);const wt=()=>{r.signal.removeEventListener("abort",rt),_e.abort(),Q===_e&&(Q=null,se=null)};let un=null;const Zt=vt(),Vt=()=>{Q===_e&&(ke=W())},Rn={events(ze,kt){Vt(),Zt.events(ze,kt)},head(ze){Vt(),Zt.head(ze)},progress:Zt.progress,ephemeral(ze){Vt(),Zt.ephemeral(ze)},opened(ze){Vt(),un=ze,Q===_e&&(se=ze.alive??null),xe.setHead(ze.cursor),he({headSeq:ze.cursor,appliedSeq:xe.appliedSeq,phase:"syncing"})}},Yt=n.follow.open({sessionId:l},Rn,_e.signal),X=await Promise.race([Yt.then(ze=>({kind:"done",outcome:ze})),SO(()=>un!=null,_e.signal,M).then(()=>({kind:"opened"}))]),ae=un;if(X.kind==="done"||ae==null||_e.signal.aborted){if(wt(),r.signal.aborted)break;if(dt())continue;_+=1,_>=Od&&(Z=!0),ee+=1,await We(lo(ee,H));continue}_=0,ee=0;const ye=ae.firstSeq-1,ge=await Ze(xe.appliedSeq,ye,_e.signal);if(_e.signal.aborted){if(wt(),r.signal.aborted)break;dt();continue}if(!ge.ok&&!ge.retryable){he({phase:"error",error:{code:ge.code,message:ge.message??ge.code,retrying:!1},appliedSeq:xe.appliedSeq,headSeq:xe.headSeq}),m({ok:!1,code:ge.code,message:ge.message??ge.code}),wt();break}if(!ge.ok){wt(),he({phase:"stalled",error:{code:ge.code,message:ge.message??ge.code,retrying:!0},appliedSeq:xe.appliedSeq,headSeq:xe.headSeq}),ee+=1,await We(lo(ee,H));continue}he({phase:"live",appliedSeq:xe.appliedSeq,headSeq:xe.headSeq,fraction:null,error:void 0}),xe.appliedSeq>=ye&&m({ok:!0,caughtUpTo:xe.appliedSeq});const ht=await Yt;if(wt(),r.signal.aborted)break;dt()||ht.ok||(_+=1,_>=Od&&(Z=!0),he({phase:"stalled",error:{code:ht.code,message:ht.message??ht.code,retrying:!0}}),ee+=1,await We(lo(ee,H)))}h.phase!=="error"&&he({phase:"closed"}),E()}async function fe(){return a.enhancement==="off"||!n.cdc&&!n.range?!1:n.probe?n.probe():mO()}const me=(n.onResume??gO)(z),Te=n.livenessMs===void 0?dO:n.livenessMs;let Ce=null;Te!==!1&&Te>0&&(Ce=setInterval(()=>{ne()||!Q||!se||se()||z({reason:"liveness",hiddenMs:0})},Te),Ce.unref?.());function Ee(){Ce!=null&&clearInterval(Ce),Ce=null}return{onBatch(P){return u.add(P),()=>u.delete(P)},onEphemeral(P){return o.add(P),()=>o.delete(P)},onStatus(P){return f.add(P),P(h),()=>f.delete(P)},get status(){return h},ready:g,close(){me(),Ee(),r.abort(),E(),he({phase:"closed"})}}}function bO(n,l){const a=[...n].sort((o,f)=>o.seq-f.seq),r=[];let u=l+1;for(const o of a)if(!(o.seq<u)){if(o.seq!==u)break;r.push(o),u=o.seq+1}return r}function lo(n,l){return Math.min(aO,lO*2**Math.max(0,n-1))*(.5+l()*.5)}function xO(n,l){return new Promise((a,r)=>{const u=setTimeout(()=>{l.removeEventListener("abort",o),a()},n),o=()=>{clearTimeout(u),r(new DOMException("Aborted","AbortError"))};l.aborted?o():l.addEventListener("abort",o,{once:!0})})}async function SO(n,l,a){for(;!n()&&!l.aborted;)await a(5,l).catch(()=>{})}function Bv(n={}){const l=n.addressOf??(o=>ar(o)),a=n.fetch??fetch,r=n.url??uO,u=n.maxMessages??Zj;return{kind:"official-page",async fetch(o,f,h){if(o.throughSeq<=o.afterSeq)return{ok:!0,throughSeq:o.throughSeq};let p=o.throughSeq+1,g=0;const y=o.throughSeq-o.afterSeq;f.progress({loaded:0,total:y,unit:"events"});try{for(;!h.aborted;){const m=await wO(a,r,{address:l(o.sessionId),throughSeq:o.throughSeq,beforeSeq:p,maxMessages:u,turnWindow:Kj},h);if(!m.ok)return m;const S=vs(m.records);S.length&&f.events(S,{throughSeq:o.throughSeq}),g+=S.length,f.progress({loaded:g,total:y,unit:"events"});const x=S.reduce((k,T)=>Math.min(k,T.seq),Number.POSITIVE_INFINITY);if(!m.hasMore||!Number.isFinite(x)||x<=o.afterSeq+1)break;if(x>=p)return{ok:!1,retryable:!0,code:"PAGE_STALLED",message:"Official page did not move."};p=x}return h.aborted?{ok:!1,retryable:!1,code:"ABORTED"}:{ok:!0,throughSeq:o.throughSeq}}catch(m){return h.aborted?{ok:!1,retryable:!1,code:"ABORTED"}:{ok:!1,retryable:!0,code:"PAGE_ERROR",message:m instanceof Error?m.message:String(m)}}}}}async function wO(n,l,a,r){const u=await n(l,{method:"POST",headers:{"content-type":"application/json",accept:"application/json"},credentials:"same-origin",signal:r,body:JSON.stringify({type:"client-request",rpcId:crypto.randomUUID(),method:"session/events",payload:{args:{request:a}}})});let o=null;try{o=await u.json()}catch{o=null}if(!u.ok||o?.result?.ok===!1)return{ok:!1,retryable:u.status>=500||u.status===0,code:"PAGE_ERROR",message:o?.result?.error?.message??`session/events HTTP ${u.status}`};const f=o?.result?.value??o?.result??o;return{ok:!0,records:f?.records??f?.events??f,hasMore:f?.hasMore===!0,cursor:f?.cursor}}async function Uv(n){const l=await crypto.subtle.digest("SHA-256",n);return[...new Uint8Array(l)].map(a=>a.toString(16).padStart(2,"0")).join("")}function Hv(n){const l=n.fetch??fetch,a=n.concurrency??Wj,r=n.retries??eO,u=n.manifestUrl??rO,o=n.chunkUrl??sO,f=n.wait??AO;return{kind:"cdc-snapshot",async fetch(h,p,g){if(h.throughSeq<=h.afterSeq)return{ok:!0,throughSeq:h.throughSeq};const y=new AbortController,m=()=>y.abort();g.addEventListener("abort",m);try{const S=await kO(l,u,h,y.signal);return S.ok?await EO({manifest:S.value,afterSeq:h.afterSeq,throughSeq:h.throughSeq,sink:p,cache:n.cache,fetchImpl:l,chunkUrl:o,concurrency:a,retries:r,wait:f,signal:y.signal}):S}catch(S){return g.aborted||y.signal.aborted?{ok:!1,retryable:!1,code:"ABORTED"}:{ok:!1,retryable:!0,code:"CDC_ERROR",message:S instanceof Error?S.message:String(S)}}finally{g.removeEventListener("abort",m),y.signal.aborted||y.abort()}}}}async function kO(n,l,a,r){const u=new URLSearchParams({sessionId:a.sessionId,throughSeq:String(a.throughSeq),afterSeq:String(a.afterSeq)}),o=await n(`${l}?${u}`,{method:"GET",credentials:"same-origin",signal:r,headers:{accept:"application/json"}});if(o.status===404)return{ok:!1,retryable:!1,code:"ENHANCE_UNAVAILABLE"};if(!o.ok)return{ok:!1,retryable:o.status>=500,code:"CDC_MANIFEST",message:`HTTP ${o.status}`};const f=await o.json();return Array.isArray(f.chunks)?{ok:!0,value:f}:{ok:!1,retryable:!0,code:"CDC_MANIFEST"}}async function EO(n){const l=[...n.manifest.chunks].sort((C,E)=>C.fromSeq-E.fromSeq),a=new Map;let r=0;const u=n.manifest.totalSize;n.sink.progress({loaded:r,total:u,unit:"bytes"}),n.sink.head(n.manifest.throughSeq);let o=0;const f=()=>{for(;o<l.length;){const C=l[o];if(!C||!a.has(C.fromSeq))break;const E=(a.get(C.fromSeq)??[]).filter(M=>M.seq>n.afterSeq&&M.seq<=n.throughSeq);E.length&&n.sink.events(E,{throughSeq:n.throughSeq}),o+=1}},h=[];for(const C of l){const E=await n.cache.getChunk(C.hash);E&&await Uv(E)===C.hash?(a.set(C.fromSeq,Iv(E)),r+=C.bytes,n.sink.progress({loaded:r,total:u,unit:"bytes"}),f()):h.push(C)}if(h.length===0)return f(),{ok:!0,throughSeq:n.throughSeq};let p=0,g=0,y=null,m=null;const S=()=>{const C=m;m=null,C?.()},x=()=>new Promise(C=>{if(g===0){C();return}m=C}),k=async C=>{for(let E=0;E<n.retries;E+=1){if(n.signal.aborted||y)return;try{const M=await TO(n.fetchImpl,n.chunkUrl,n.manifest.sessionId,C,n.signal);if(await Uv(M)!==C.hash)throw new Error("hash mismatch");await n.cache.putChunk(C.hash,M),a.set(C.fromSeq,Iv(M)),r+=C.bytes,n.sink.progress({loaded:r,total:u,unit:"bytes"}),f();return}catch(M){if(n.signal.aborted||y)return;if(E+1>=n.retries){y={ok:!1,retryable:!0,code:"CDC_CHUNK_FAILED",message:M instanceof Error?M.message:String(M)};return}await n.wait(50*2**E,n.signal).catch(()=>{})}}},T=()=>{for(;!y&&!n.signal.aborted&&g<n.concurrency&&p<h.length;){const C=h[p];if(p+=1,!C)break;g+=1,k(C).finally(()=>{g-=1,S()})}};for(T();g>0&&!n.signal.aborted;)T(),g>0&&await x();return n.signal.aborted?{ok:!1,retryable:!1,code:"ABORTED"}:y||(f(),{ok:!0,throughSeq:n.throughSeq})}async function TO(n,l,a,r,u){const o=new URLSearchParams({sessionId:a,fromSeq:String(r.fromSeq),toSeq:String(r.toSeq),hash:r.hash}),f=await n(`${l}?${o}`,{method:"GET",credentials:"same-origin",signal:u});if(f.status===404)throw Object.assign(new Error("not found"),{code:"ENHANCE_UNAVAILABLE",status:404});if(!f.ok)throw new Error(`HTTP ${f.status}`);return new Uint8Array(await f.arrayBuffer())}function Iv(n){const l=new TextDecoder().decode(n),a=[];for(const r of l.split(`
59
+ `))if(r.trim()!=="")try{a.push(...vs(JSON.parse(r)))}catch{}return a.sort((r,u)=>r.seq-u.seq)}function AO(n,l){return new Promise((a,r)=>{const u=setTimeout(()=>{l.removeEventListener("abort",o),a()},n),o=()=>{clearTimeout(u),r(new DOMException("Aborted","AbortError"))};l.aborted?o():l.addEventListener("abort",o,{once:!0})})}const CO="dsh-bot",NO=2,jO=["log_chunks","log_events","log_cursors"];function OO(n){const l=globalThis.indexedDB;return l?new Promise(a=>{let r=!1;const u=o=>{r||(r=!0,a(o))};try{const o=l.open(CO,NO);o.onupgradeneeded=f=>{const h=o.result;if(f.oldVersion<2){for(const g of["chunks","events"])h.objectStoreNames.contains(g)&&h.deleteObjectStore(g);h.objectStoreNames.contains("log_chunks")||h.createObjectStore("log_chunks").createIndex("byLastUsed","lastUsed"),h.objectStoreNames.contains("log_events")||h.createObjectStore("log_events",{keyPath:["sessionId","seq"]}).createIndex("bySession","sessionId"),h.objectStoreNames.contains("log_cursors")||h.createObjectStore("log_cursors",{keyPath:"sessionId"})}},o.onblocked=()=>u({ok:!1,reason:"blocked"}),o.onsuccess=()=>{const f=o.result;if(f.onversionchange=()=>f.close(),!jO.every(h=>f.objectStoreNames.contains(h))){f.close(),u({ok:!1,reason:"unavailable"});return}u({ok:!0,db:f})},o.onerror=()=>u({ok:!1,reason:"unavailable"})}catch{u({ok:!1,reason:"unavailable"})}}):Promise.resolve({ok:!1,reason:"unavailable"})}function _O(){const n=new Map,l=new Map,a=new Map;let r=0;const u=()=>{const o=[...a.entries()].sort((f,h)=>f[1].lastUsed-h[1].lastUsed);for(;r>$0&&o.length>0;){const f=o.shift();if(!f)break;a.delete(f[0]),r-=f[1].bytes.byteLength}};return{mode:"memory",async getCursor(o){return n.get(o)??null},async setCursor(o,f,h){const p=n.get(o),g=p?Math.max(p.appliedSeq,f):f,y=h==null?p?.headSeq??null:Math.max(p?.headSeq??h,h);n.set(o,{appliedSeq:g,headSeq:y})},async putEvents(o,f){const h=l.get(o)??new Map;for(const p of f)h.set(p.seq,p);l.set(o,h)},async readEvents(o,f=-1){const h=l.get(o);return h?[...h.values()].filter(p=>p.seq>f).sort((p,g)=>p.seq-g.seq):[]},async getChunk(o){const f=a.get(o);return f?(f.lastUsed=Date.now(),f.bytes):null},async putChunk(o,f){const h=a.get(o);h&&(r-=h.bytes.byteLength),a.set(o,{bytes:f,lastUsed:Date.now()}),r+=f.byteLength,u()}}}async function Vv(n){const l=await qO(n);if(l.ok!==!0)return _O();const a=l.db;return{mode:"idb",async getCursor(r){return sa(a,"log_cursors","readonly",u=>ai(u.get(r))).then(u=>u?{appliedSeq:u.appliedSeq,headSeq:u.headSeq??null}:null)},async setCursor(r,u,o){await sa(a,"log_cursors","readwrite",async f=>{const h=await ai(f.get(r)),p=h?Math.max(h.appliedSeq,u):u,g=o==null?h?.headSeq??null:Math.max(h?.headSeq??o,o);await ai(f.put({sessionId:r,appliedSeq:p,headSeq:g,updatedAt:Date.now()}))})},async putEvents(r,u){await sa(a,"log_events","readwrite",async o=>{for(const f of u)await ai(o.put({sessionId:r,seq:f.seq,event:f}))})},async readEvents(r,u=-1){return(await sa(a,"log_events","readonly",f=>{const h=f.index("bySession");return ai(h.getAll(r))})).map(f=>f.event).filter(f=>f&&f.seq>u).sort((f,h)=>f.seq-h.seq)},async getChunk(r){const u=await sa(a,"log_chunks","readonly",o=>ai(o.get(r)));return u?.bytes?(sa(a,"log_chunks","readwrite",o=>ai(o.put({...u,lastUsed:Date.now()},r))),u.bytes):null},async putChunk(r,u){await sa(a,"log_chunks","readwrite",async o=>{await ai(o.put({bytes:u,lastUsed:Date.now()},r)),await zO(o)})}}}async function zO(n){const l=n.index("byLastUsed"),a=await ai(l.getAll()),r=await ai(l.getAllKeys());let u=a.reduce((o,f)=>o+(f.bytes?.byteLength??0),0);for(let o=0;o<a.length&&u>$0;o+=1){const f=r[o],h=a[o];f==null||!h||(u-=h.bytes.byteLength,await ai(n.delete(f)))}}function qO(n){try{return OO(n)}catch{return Promise.resolve({ok:!1,reason:"unavailable"})}}function sa(n,l,a,r){return new Promise((u,o)=>{const f=n.transaction(l,a),h=f.objectStore(l);Promise.resolve(r(h)).then(u,o),f.onerror=()=>o(f.error)})}function ai(n){return new Promise((l,a)=>{n.onsuccess=()=>l(n.result),n.onerror=()=>a(n.error)})}function RO(n,l){const a=Math.max(0,Math.min(l,n.length)),r=/(?:^|\s)@([^\s@()]*)$/.exec(n.slice(0,a));if(!r||r.index==null)return null;const u=r[1]??"";return{start:r.index+r[0].length-u.length-1,query:u}}function MO(n){return n.replace(/[@()\r\n]/g," ").replace(/\s+/g," ").trim()||"Untitled"}function DO(n,l){return`@${MO(n)} (${l})`}function LO(n,l,a,r,u){const o=Math.max(0,Math.min(l,n.length)),f=`${DO(r,u)} `;return{text:n.slice(0,a)+f+n.slice(o),cursor:a+f.length}}function BO(n,l){const a=l.trim().toLowerCase();return n.filter(r=>a===""?!0:r.label.toLowerCase().includes(a)||r.sessionId.toLowerCase().includes(a)).slice(0,8)}const _d=()=>({segments:[],live:{},activity:"",completed:{},failures:{},retries:{},title:"",model:"",preset:"",turns:null,steps:null,drafting:!1,turn:null,turnStartedAt:null,streamAttempt:null,streamRevision:0,pendingAssistant:null,turnEnds:{}});function bo(n,l,a){return bw(n,l,a)}function UO({active:n,progress:l}){const{t:a}=Qe(),[r,u]=D.useState(n),[o,f]=D.useState(!1);if(D.useEffect(()=>{if(n){u(!0);return}f(!1)},[n]),D.useEffect(()=>{if(!r||!n)return;const g=window.requestAnimationFrame(()=>f(!0));return()=>window.cancelAnimationFrame(g)},[r,n]),D.useEffect(()=>{if(n||!r)return;const g=window.setTimeout(()=>u(!1),280);return()=>window.clearTimeout(g)},[n,r]),!r)return null;const h=l!=null&&l.total>0,p=h?Math.min(100,Math.round(l.loaded/l.total*100)):0;return b.jsx("div",{className:o?"chunk-loading visible":"chunk-loading",role:"status",children:b.jsxs("div",{className:"chunk-loading-card",children:[b.jsx("p",{children:b.jsx("span",{className:"shimmer",children:h?a("load.messagesPct",{pct:String(p)}):a("load.messages")})}),b.jsx("div",{className:"chunk-progress-track",role:"progressbar","aria-valuemin":0,"aria-valuemax":h?l.total:1,"aria-valuenow":h?l.loaded:0,"aria-label":a("load.aria"),children:b.jsx("div",{className:h?"chunk-progress-fill":"chunk-progress-fill indeterminate",style:h?{width:`${p}%`}:void 0})})]})})}function Yv({signal:n}){const{t:l}=Qe();if(!n)return null;const a=n==="wait";return b.jsx("span",{className:a?"bot-dot wait":"bot-dot",role:"img","aria-label":l(a?"bot.waiting":"bot.running")})}function HO(n){const l=[];return n.turns!=null&&l.push(`${n.turns} turns`),n.steps!=null&&l.push(`${n.steps} steps`),l.join(" · ")}function IO({health:n,usage:l,execution:a,model:r}){const{t:u}=Qe(),o=n?.primary?.reachable===!0,f=l&&"code"in l&&typeof l.code=="string"?l.code:"";return b.jsxs("div",{className:"status",children:[b.jsx("p",{children:u(o?"health.up":"health.down")}),r?b.jsx("p",{className:"muted",children:r}):null,b.jsx("p",{className:a.ready?"":"muted",children:a.ready?u("health.modelReady"):bo(a.reason,a.reason,u)}),b.jsx("p",{className:l?.connected?"":"muted",children:l?.connected?u("health.usageReady"):bo(f,l?.error||u("health.usageOff"),u)}),b.jsx("p",{className:"muted",children:u("health.sameSession")})]})}function VO(){return b.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[b.jsx("circle",{cx:"11",cy:"11",r:"6.25",fill:"none",stroke:"currentColor",strokeWidth:"1.8"}),b.jsx("path",{d:"M16 16.5L20 20.5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}function Gv(){return b.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:b.jsx("path",{d:"M12 5v14M5 12h14",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})})}function YO({preset:n}){return n==="read-only"||n==="readonly"||n==="danger-full-access"||n==="auto"?b.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[b.jsx("path",{d:"M6.6 2.15C7.5 1.81 8.5 1.81 9.4 2.15L13.92 3.84V7.12C13.92 11.61 10.56 13.6 8 14.58C5.44 13.6 2.08 11.61 2.08 7.12V3.84L6.6 2.15Z",fill:"none",stroke:"currentColor",strokeLinejoin:"round"}),n==="danger-full-access"?b.jsx("path",{d:"M8 4.4V9.9M8 10.8V11.8",fill:"none",stroke:"currentColor"}):null,n==="read-only"||n==="readonly"?b.jsx("path",{d:"M5.09 8.14L7.18 10.24C7.27 10.32 7.4 10.31 7.48 10.23L11.51 5.61",fill:"none",stroke:"currentColor"}):null]}):b.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[b.jsx("path",{d:"M6.42 1.68C7.44 1.3 8.56 1.3 9.58 1.68L14.1 3.38C14.29 3.45 14.42 3.63 14.42 3.84V6.49L9.23 2.62C8.44 2.32 7.56 2.32 6.77 2.62L2.58 4.19V7.12C2.58 11.18 5.52 13.06 8 14.04C8.28 13.93 8.56 13.81 8.84 13.67C9.07 13.95 9.33 14.19 9.62 14.41C9.12 14.66 8.64 14.87 8.18 15.04C8.06 15.09 7.94 15.09 7.82 15.04C5.22 14.05 1.58 11.94 1.58 7.12V3.84C1.58 3.63 1.7 3.45 1.9 3.38L6.42 1.68Z",fill:"currentColor"}),b.jsx("path",{d:"M5.26 6.6H10.74M5.26 9.87H8.33",fill:"none",stroke:"currentColor"}),b.jsx("path",{d:"M10.03 13.22C12.15 11.95 14.58 8.9 14.78 8.64C14.41 8.37 13.68 7.83 13.5 8.1C12.4 9.72 11.31 11.34 10.21 12.95C10.15 13.04 10.09 13.13 10.03 13.22Z",fill:"currentColor"})]})}function GO(){return b.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:b.jsx("path",{d:"M12 17V7M7 11.5L12 6.5l5 5",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ro({open:n,children:l,className:a}){const[r,u]=D.useState(n),[o,f]=D.useState(n);D.useLayoutEffect(()=>{if(n){u(!0);const g=requestAnimationFrame(()=>f(!0));return()=>cancelAnimationFrame(g)}f(!1),window.matchMedia("(prefers-reduced-motion: reduce)").matches&&u(!1)},[n]);function h(g){g.target!==g.currentTarget||g.propertyName!=="grid-template-rows"||n||u(!1)}const p=["coll-container",o?"expand":"",a].filter(Boolean).join(" ");return b.jsx("div",{className:p,onTransitionEnd:h,children:b.jsx("div",{children:r?l:null})})}function e1({ticket:n,now:l,onSupply:a,onOpen:r}){const{t:u}=Qe(),[o,f]=D.useState(""),[h,p]=D.useState(""),[g,y]=D.useState(!1),m=Rw(n),S=n.status==="started"||n.status==="needs_user";return b.jsxs("article",{className:"work-card",children:[b.jsxs("header",{children:[b.jsx("h3",{children:n.summary}),n.status==="ready"?null:b.jsx("span",{className:S?"work-status live":"work-status",children:hb(n.status,u)})]}),qw(n,l,u).map(x=>b.jsx("p",{children:x},x)),n.childSessionId?b.jsx("button",{type:"button",className:"work-open",onClick:()=>r(n.childSessionId??""),children:u("work.openWorker")}):null,m?b.jsx("p",{className:m.stale?"stale":"work-question",children:m.text||u("work.questionEmpty")}):null,m?.stale?b.jsx("p",{className:"work-quiet",children:u("work.questionStale")}):null,n.status==="needs_user"?b.jsxs("form",{className:"work-reply",onSubmit:x=>{x.preventDefault();const k=o.trim();!k||g||(y(!0),p(""),a(n.id,k).then(T=>{y(!1),T?p(T):f("")}))},children:[b.jsxs("label",{children:[b.jsx("span",{children:u("work.answerLabel")}),b.jsx("textarea",{value:o,rows:2,disabled:g,onChange:x=>f(x.target.value)})]}),h?b.jsx("p",{className:"work-error",children:h}):null,b.jsx("button",{type:"submit",disabled:g||o.trim()==="",children:u("work.answerSubmit")})]}):null]})}function QO({briefing:n,time:l,mark:a,onOpenFile:r}){const{t:u}=Qe(),[o,f]=D.useState(!1),h=n.body.split(`
60
+ `).map(g=>g.trim()).find(Boolean)??"",p=[n.wallMs!=null?u("work.duration",{value:FO(n.wallMs,u)}):"",n.maxTokens!=null?`token ${n.maxTokens.toLocaleString("en-US")}`:"",n.material?u("work.material",{hash:n.material.slice(0,8)}):""].filter(Boolean);return b.jsxs("div",{className:"briefing-row","data-turn":a,children:[b.jsxs("article",{className:o?"briefing-card open":"briefing-card",children:[b.jsxs("button",{type:"button",className:"briefing-toggle","aria-expanded":o,onClick:()=>f(g=>!g),children:[b.jsx("span",{className:"briefing-title",children:n.cancel?u("work.cancelTitle"):u("work.taskTitle")}),b.jsx("span",{className:"briefing-rev",children:u("work.generation",{revision:String(n.revision)})}),b.jsx(XO,{}),h&&!o?b.jsx("span",{className:"briefing-preview",children:h}):null]}),b.jsx(Ro,{open:o,children:b.jsxs("div",{className:"briefing-body",children:[n.body?b.jsx(_o,{text:n.body,onOpenFile:r}):null,p.length?b.jsx("p",{className:"briefing-facts",children:p.join(" · ")}):null,n.notes.map(g=>b.jsx("p",{className:"briefing-note",children:g},g))]})})]}),l?b.jsx("time",{children:l}):null]})}function FO(n,l){return n%6e4===0?l("work.minutes",{count:String(n/6e4)}):n%1e3===0?l("work.seconds",{count:String(n/1e3)}):l("work.milliseconds",{count:String(n)})}function XO(){return b.jsx("svg",{className:"briefing-chevron",viewBox:"0 0 16 16","aria-hidden":"true",children:b.jsx("path",{d:"M4 6.5L8 10.5L12 6.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function ZO({text:n}){return b.jsx("p",{className:"work-refused",children:n})}function KO({segment:n}){const[l,a]=D.useState(!1),{t:r}=Qe();return b.jsxs("div",{className:"official-row","data-variant":"think","data-segment":n.id,children:[b.jsxs("button",{type:"button",className:"official-title","aria-expanded":l,onClick:()=>a(!l),children:[b.jsxs("span",{className:"official-leading",children:[b.jsx(t3,{}),b.jsx(xo,{})]}),b.jsx("span",{className:"official-label",children:n.running?r("activity.thinking"):r("activity.reasoning")})]}),b.jsx(Ro,{open:l,children:b.jsx("div",{className:"think-body",children:Xe(n.text)})})]})}function JO({segments:n,pending:l=!1,tickets:a=[],cwd:r,connectionPhase:u}){const{t:o}=Qe(),f=l||n.some(S=>S.kind==="think"?S.running:fs.has(ds(S,r,a).status)),h=n.filter(S=>S.kind==="tool").map(S=>ds(S,r,a).status),p=[[o("activity.count.active"),h.filter(S=>fs.has(S)).length],[o("activity.count.failed"),h.filter(S=>S==="failed").length],[o("activity.count.cancelled"),h.filter(S=>S==="cancelled").length],[o("activity.count.unknown"),h.filter(S=>S==="unknown").length]].filter(([,S])=>Number(S)>0).map(([S,x])=>`${S} ${x}`).join(" · "),[g,y]=D.useState(()=>f),m=u!=null&&u!=="live";return b.jsxs("section",{className:g?"activity-group open":"activity-group","aria-label":o("activity.title"),"data-state":f?"running":"settled","data-activity-start":n[0]?.id,children:[b.jsxs("button",{type:"button",className:"official-title","aria-expanded":g,onClick:()=>y(S=>!S),children:[b.jsxs("span",{className:"official-leading",children:[b.jsx(Wd,{}),b.jsx(xo,{})]}),b.jsx("span",{className:"official-label",children:n.length===1?o("activity.titleOne"):o("activity.titleWithCount",{count:String(n.length)})}),p?b.jsx("span",{className:"activity-status",children:p}):null,m?b.jsx("span",{className:"activity-status",children:["restoring","connecting","syncing"].includes(u??"")?o("activity.resyncing"):o("activity.connectionLastKnown")}):null]}),b.jsx(Ro,{open:g,children:b.jsxs("div",{className:"activity-body",children:[l&&!n.some(S=>S.kind==="think"?S.running:fs.has(ds(S,r,a).status))?b.jsx("p",{className:"activity-note",children:o("activity.generating")}):null,n.map(S=>S.kind==="think"?b.jsx(KO,{segment:S},S.id):b.jsx($O,{segment:S,cwd:r,tickets:a,stale:m},S.callId))]})})]})}function $O(n){const[l,a]=D.useState(!1),[r,u]=D.useState(!1);return b.jsx(PO,{...n,open:l,argsOpen:r,onToggle:()=>a(o=>!o),onArgsToggle:()=>u(o=>!o)})}function PO({segment:n,cwd:l,tickets:a=[],stale:r=!1,open:u,argsOpen:o,onToggle:f,onArgsToggle:h}){const p=D.useId(),{t:g,locale:y}=Qe(),m=ds(n,l,a),S=Tj({...n,args:m.args,result:m.output}),x=Eh(n.name)?g("activity.runCommand"):m.title,k=m.description||(m.todos.length?g("activity.updatePlan"):"")||(m.ticket?Xe(m.ticket.summary):"")||S?.name||x,T=["failed","cancelled","unknown"].includes(m.status);return b.jsx(Qv,{className:"official-row tool-activity",status:m.status,segmentId:n.id,open:u,onToggle:f,panelId:`${p}-tool`,title:b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:"official-leading",children:[b.jsx(Wd,{}),b.jsx(xo,{})]}),b.jsx("span",{className:"official-label",children:k}),T?b.jsxs("span",{className:"activity-status",children:[Nv(m.status,g),r?g("activity.lastKnownSuffix"):""]}):null]}),children:b.jsxs("div",{className:"activity-detail",children:[m.status!=="succeeded"&&!T?b.jsxs("p",{className:"activity-note",children:[Nv(m.status,g),r?g("activity.lastKnownSuffix"):""]}):null,m.todos.length?b.jsxs("p",{className:"activity-note",children:[m.todos.filter(C=>C.status==="completed").length,"/",m.todos.length," ",g("activity.planComplete")]}):null,b.jsxs("div",{className:"activity-facts",children:[m.title," · ",Xe(n.callId)]}),m.command?b.jsxs("div",{className:"activity-command",children:[b.jsx(so,{text:m.command}),b.jsx("pre",{children:m.command})]}):null,m.cwd?b.jsxs("p",{className:"activity-facts",children:[m.cwdSource==="recorded"?g("activity.cwdRecorded"):m.cwdSource==="requested"?g("activity.cwdRequested"):g("activity.cwdSessionDefault"),": ",m.cwd]}):null,m.status==="waiting"?b.jsx("p",{className:"activity-note",children:g("activity.callRequested")}):null,m.jobId?b.jsxs("p",{className:"activity-facts",children:["Job: ",Xe(m.jobId)," · ",g("activity.jobRegistered")]}):null,m.ticketId?b.jsxs("p",{className:"activity-facts",children:["Ticket: ",Xe(m.ticketId)," ",m.ticket?.childSessionId?`· Worker: ${Xe(m.ticket.childSessionId)}`:""]}):null,m.latestReport?b.jsxs("p",{className:"activity-note",children:[g("activity.latestReport")," (v",m.ticket?.revision,"): ",Xe(m.latestReport)]}):null,m.todos.length?b.jsx("ul",{className:"activity-todos",children:m.todos.map((C,E)=>b.jsxs("li",{children:[b.jsx("span",{children:C.status})," ",C.content]},E))}):null,n.requestedAt!=null?b.jsxs("p",{className:"activity-facts",children:[g("activity.callRecorded"),":"," ",new Date(n.requestedAt).toLocaleString(y==="zh"?"zh-CN":"en"),n.settledAt!=null?` · ${g("activity.callWait")}: ${Math.max(0,n.settledAt-n.requestedAt)}ms`:""]}):null,m.exitCode!=null?b.jsxs("p",{className:"activity-facts",children:["Exit: ",m.exitCode]}):null,S?b.jsx(WO,{change:S}):null,b.jsx(Qv,{className:"official-row activity-arguments",open:o,onToggle:h,panelId:`${p}-args`,title:b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:"official-leading",children:[b.jsx(Wd,{}),b.jsx(xo,{})]}),b.jsx("span",{className:"official-label",children:g("activity.fullArgs")})]}),trailing:o?b.jsx(so,{text:m.args}):null,children:b.jsx("pre",{children:m.args||"{}"})}),n.resultReceived||n.result?b.jsxs("div",{className:"activity-output",children:[b.jsxs("div",{className:"activity-block-head",children:[b.jsx("span",{children:g("activity.toolResult")}),b.jsx(so,{text:m.output})]}),b.jsx("pre",{children:m.output||g("activity.emptyResult")})]}):null]})})}function Qv({className:n,status:l,segmentId:a,open:r,onToggle:u,panelId:o,title:f,trailing:h,children:p}){return b.jsxs("div",{className:`${n}${r?" open":""}`,"data-state":l,"data-segment":a,children:[b.jsx("button",{type:"button",className:"official-title","aria-expanded":r,"aria-controls":o,onClick:g=>{g.stopPropagation(),u()},children:f}),h,b.jsx("div",{id:o,className:"activity-panel",children:b.jsx(Ro,{open:r,children:p})})]})}function WO({change:n}){const l=n.lines.map(a=>`${a.kind==="del"?"- ":a.kind==="add"?"+ ":" "}${a.text}`).join(`
61
+ `);return b.jsxs("div",{className:"diff-card","data-diff":"",children:[b.jsxs("div",{className:"diff-head",children:[b.jsxs("span",{className:"diff-heading",children:[b.jsx("span",{className:"diff-lang",children:n.language||"Code block"}),b.jsx("span",{className:"diff-file",children:n.name})]}),b.jsx(so,{text:l})]}),b.jsx("div",{className:"diff-body",children:n.lines.map((a,r)=>b.jsx("div",{className:e3(a.kind),children:a.text},r))})]})}function e3(n){return n==="add"?"diff-line added":n==="del"?"diff-line removed":"diff-line same"}function so({text:n}){const[l,a]=D.useState(!1);return b.jsx("button",{type:"button",className:"diff-copy","aria-label":l?"Copied":"Copy",onClick:r=>{r.stopPropagation(),navigator.clipboard.writeText(Xe(n)).then(()=>{a(!0),window.setTimeout(()=>a(!1),1e3)})},children:l?b.jsx(i3,{}):b.jsx(n3,{})})}function xo(){return b.jsx("svg",{className:"chevron",viewBox:"0 0 16 16","aria-hidden":"true",children:b.jsx("path",{d:"M4 6.5L8 10.5L12 6.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function t3(){return b.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[b.jsx("path",{d:"M8 1.8c2.8 0 5 2 5 4.6 0 1.6-.8 3-2 3.8-.4.3-.6.7-.6 1.1V12H5.6v-.7c0-.4-.2-.8-.6-1.1-1.2-.8-2-2.2-2-3.8 0-2.6 2.2-4.6 5-4.6Z",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M6.2 13.6h3.6",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function Wd(){return b.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:b.jsx("path",{d:"M3.2 4.2h9.6M3.2 8h9.6M3.2 11.8h6",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})})}function n3(){return b.jsxs("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:[b.jsx("rect",{x:"5.2",y:"5.2",width:"7.2",height:"7.6",rx:"1.4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M10.2 5.2V3.8A1.3 1.3 0 0 0 8.9 2.5H3.8A1.3 1.3 0 0 0 2.5 3.8v5.1A1.3 1.3 0 0 0 3.8 10.2H5.2",fill:"none",stroke:"currentColor",strokeWidth:"1.2"})]})}function i3(){return b.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:b.jsx("path",{d:"M3.5 8.2L6.4 11.1L12.5 4.8",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const l3={aborted:"question.aborted",failed:"question.failed",answered:"question.answered"};function as(n){return{selected:[...n.selected],custom:n.custom,skipped:n.skipped}}function a3(n){const l=Math.max(0,Math.ceil(n/1e3)),a=Math.floor(l/60),r=l%60;return a>0?`${a}:${String(r).padStart(2,"0")}`:`${r}s`}function r3({item:n,draft:l,interactive:a,disabled:r,onToggle:u}){const{t:o}=Qe();if(!n.options.length)return null;const f=new Set(l.selected);return b.jsx("ul",{className:"user-question-options",children:n.options.map(h=>{const p=f.has(h.label),g=aj(h.label,h.recommended),y=p?"user-question-option selected":"user-question-option",m=b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:"user-question-option-label",children:[Xe(h.label),g.recommended?b.jsx("span",{className:"user-question-badge",children:o("question.recommended")}):null]}),h.description?b.jsx("span",{className:"user-question-option-desc",children:Xe(h.description)}):null]});return b.jsx("li",{children:a?b.jsx("button",{type:"button",className:y,"data-selected":p?"true":"false","aria-pressed":n.multiSelect?p:void 0,disabled:r,onClick:()=>u(h.label),children:m}):b.jsx("div",{className:y,"data-selected":p?"true":"false",children:m})},h.label)})})}function Nh({interactive:n,waitLabel:l,onTakeTime:a,busy:r}){const{t:u}=Qe();return l?b.jsxs("div",{className:"user-question-wait",children:[b.jsx("p",{className:"user-question-hint",children:l}),n&&l!==u("question.continued")&&l!==u("question.waitingNoTimer")?b.jsx("button",{type:"button",className:"user-question-skip",disabled:r,onClick:a,children:u("question.takeTime")}):null]}):null}function s3({segment:n,sessionId:l,onCompose:a,remainingMs:r,waitState:u}){const o=ks(n);return o?o.presentation==="plan-review"?b.jsx(o3,{segment:n,sessionId:l,onCompose:a,remainingMs:r,waitState:u}):o.presentation==="approval"?b.jsx(c3,{segment:n,sessionId:l,remainingMs:r,waitState:u}):b.jsx(u3,{segment:n,sessionId:l,remainingMs:r,waitState:u}):null}function jh(n,l,a,r,u){const{t:o}=Qe(),f=!!(a&&H0(a.state)),[h,p]=D.useState(u==="waiting"||a?.wait==="waiting"),[g,y]=D.useState(u==="continued"||a?.state==="continued"),[m,S]=D.useState(r??a?.timeoutMs),x=D.useRef(null),k=(u==="counting"||a?.wait==="counting"||typeof(r??a?.timeoutMs)=="number")&&!h&&!g;D.useEffect(()=>{u==="waiting"&&p(!0),(u==="continued"||a?.state==="continued")&&y(!0),typeof r=="number"&&(x.current=Date.now()+r,S(r))},[r,u,a?.state]),D.useEffect(()=>{if(!f||!k)return;const E=r??m??a?.timeoutMs;if(typeof E!="number")return;x.current==null&&(x.current=Date.now()+E);const M=()=>{const W=Math.max(0,(x.current??Date.now())-Date.now());return S(W),W<=0?(y(!0),n&&lt("/questions/timeout",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:n,callId:l})}),!1):!0};if(!M())return;const H=window.setInterval(()=>{M()||window.clearInterval(H)},250);return()=>window.clearInterval(H)},[f,k,n,l,r,m,a?.timeoutMs]);async function T(){p(!0),x.current=null,n&&await lt("/questions/take-time",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:n,callId:l})})}const C=g?o("question.continued"):h?o("question.waitingNoTimer"):k&&typeof m=="number"?o("question.remaining",{time:a3(m)}):null;return{answerable:f,held:h,continued:g,waitLabel:C,takeTime:T,markHeld:()=>p(!0)}}function u3({segment:n,sessionId:l,remainingMs:a,waitState:r}){const{t:u}=Qe(),o=ks(n),f=jh(l,o.callId,o,a,r),[h,p]=D.useState({}),[g,y]=D.useState(!1),[m,S]=D.useState(""),x=o.questions,k=D.useMemo(()=>{const O={};for(const F of x)O[F.id]=h[F.id]??as(F);return O},[h,x]),T=!!l&&f.answerable,C=x.length>1||x.some(O=>O.multiSelect||O.options.length===0);function E(O,F){f.markHeld(),p(ie=>{const he=x.find(Z=>Z.id===O),_=ie[O]??(he?as(he):{selected:[],custom:"",skipped:!1});return{...ie,[O]:{..._,...F}}})}async function M(O){if(!(!l||g)){y(!0),S("");try{const F=await lt("/questions/answer",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:l,callId:o.callId,answers:O})});if(F.status===200&&F.body.ok!==!1||F.status===409)return;const ie=typeof F.body.message=="string"?F.body.message:u("question.submitFailed");S(ie)}catch{S(u("question.submitFailed"))}finally{y(!1)}}}function H(O,F){return F.skipped?{id:O.id,selected:[]}:F.custom.trim()&&(O.multiSelect||F.selected.length===0||O.options.length===0)?O.multiSelect?{id:O.id,selected:F.selected,custom:F.custom}:{id:O.id,selected:[],custom:F.custom}:F.selected.length?{id:O.id,selected:[...F.selected]}:null}function W(){const O=x.map(F=>H(F,k[F.id]??as(F)));if(O.some(F=>F==null)){S(u("question.incomplete"));return}M(O)}function ne(O,F){if(!T||g)return;if(!O.multiSelect&&x.length===1&&!k[O.id]?.custom){M([{id:O.id,selected:[F]}]);return}const ie=k[O.id]??as(O),he=O.multiSelect?ie.selected.includes(F)?ie.selected.filter(_=>_!==F):[...ie.selected,F]:[F];E(O.id,{selected:he,skipped:!1,custom:O.multiSelect?ie.custom:""})}return b.jsxs("section",{className:"user-question-card","data-segment":n.id,"data-state":f.continued?"continued":o.state,"data-call":o.callId,"data-session":l||void 0,"data-kind":"question",children:[b.jsx(Nh,{interactive:T,waitLabel:f.waitLabel,onTakeTime:()=>{f.takeTime()},busy:g}),o.questions.map(O=>{const F=k[O.id]??as(O);return b.jsxs("article",{className:"user-question","data-question":O.id,children:[O.header?b.jsx("h3",{className:"user-question-header",children:Xe(O.header)}):null,b.jsx("p",{className:"user-question-text",children:Xe(O.question)}),O.detail?b.jsx("p",{className:"user-question-hint",children:Xe(O.detail)}):null,O.multiSelect&&f.answerable?b.jsx("p",{className:"user-question-hint",children:u("question.multiSelect")}):null,b.jsx(r3,{item:O,draft:f.answerable?F:{selected:O.selected,custom:O.custom,skipped:O.skipped},interactive:T,disabled:g,onToggle:ie=>ne(O,ie)}),T?b.jsxs("div",{className:"user-question-actions",children:[b.jsxs("label",{className:"user-question-custom",children:[b.jsx("span",{children:u("question.customLabel")}),b.jsx("textarea",{value:F.custom,disabled:g,rows:2,placeholder:u("question.customPlaceholder"),onChange:ie=>E(O.id,{custom:ie.target.value,skipped:!1})})]}),b.jsx("button",{type:"button",className:"user-question-skip",disabled:g,onClick:()=>{if(x.length===1){M([{id:O.id,selected:[]}]);return}E(O.id,{skipped:!0,selected:[],custom:""})},children:u("question.skip")})]}):null,!T&&O.custom?b.jsx("p",{className:"user-question-hint",children:u("question.custom",{text:Xe(O.custom)})}):null,(O.skipped||F.skipped)&&(o.state!=="open"||T)?b.jsx("p",{className:"user-question-hint",children:u("question.skipped")}):null]},O.id)}),T&&(C||x.some(O=>(k[O.id]?.custom??"").trim()!==""))?b.jsx("button",{type:"button",className:"user-question-submit",disabled:g,onClick:W,children:u(g?"question.submitting":"question.submit")}):null,m?b.jsx("p",{className:"user-question-status exception",children:m}):null,!f.answerable&&o.state!=="open"&&o.state!=="continued"?b.jsx("p",{className:o.state==="answered"?"user-question-status":"user-question-status exception",children:u(l3[o.state])}):null]})}function o3({segment:n,sessionId:l,onCompose:a,remainingMs:r,waitState:u}){const{t:o}=Qe(),f=ks(n),h=L0(f.questions),p=jh(l,f.callId,f,r,u),[g,y]=D.useState(!1),[m,S]=D.useState(""),[x,k]=D.useState(!1),[T,C]=D.useState(""),E=!!l&&p.answerable,M=h.item.selected[0],H=M===h.approve.label;async function W(){if(!(!l||x)){k(!0),C("");try{const O=await lt("/questions/answer",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:l,callId:f.callId,answers:[{id:h.item.id,selected:[h.approve.label]}]})});if(O.status===200&&O.body.ok!==!1||O.status===409)return;C(typeof O.body.message=="string"?O.body.message:o("question.submitFailed"))}catch{C(o("question.submitFailed"))}finally{k(!1)}}}async function ne(){if(!l||x)return;const O=m.trim();if(!O){C(o("question.changesNeeded"));return}k(!0),C("");try{const F=await lt("/questions/cancel",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:l,callId:f.callId})});if(F.status===200&&F.body.ok!==!1){a?.(O);return}if(F.status===409){a?.(O);return}C(typeof F.body.message=="string"?F.body.message:o("question.submitFailed"))}catch{C(o("question.submitFailed"))}finally{k(!1)}}return b.jsxs("section",{className:"user-question-card","data-segment":n.id,"data-state":p.continued?"continued":f.state,"data-call":f.callId,"data-session":l||void 0,"data-kind":"plan-review",children:[b.jsx("h3",{className:"user-question-header",children:o("question.planTitle")}),b.jsx("p",{className:"user-question-text",children:Xe(h.item.question)}),b.jsx(Nh,{interactive:E,waitLabel:p.waitLabel,onTakeTime:()=>{p.takeTime()},busy:x}),h.plan?g?b.jsx("div",{className:"user-question-plan",children:b.jsx(_o,{text:h.plan})}):b.jsx("p",{className:"user-question-hint",children:Xe(h.plan).split(`
62
+ `).filter(Boolean).slice(0,2).join(" ")}):null,h.plan?b.jsx("button",{type:"button",className:"user-question-skip",onClick:()=>y(O=>!O),children:o(g?"question.hidePlan":"question.viewFull")}):null,E?b.jsxs("div",{className:"user-question-actions",children:[b.jsxs("label",{className:"user-question-custom",children:[b.jsx("span",{children:o("question.changeComments")}),b.jsx("textarea",{value:m,disabled:x,rows:3,placeholder:o("question.changePlaceholder"),onChange:O=>{p.markHeld(),S(O.target.value)}})]}),b.jsxs("div",{className:"user-question-row",children:[b.jsx("button",{type:"button",className:"user-question-skip",disabled:x,onClick:()=>{ne()},children:o("question.requestChanges")}),b.jsx("button",{type:"button",className:"user-question-submit",disabled:x,onClick:()=>{W()},children:o(x?"question.submitting":"question.approvePlan")})]})]}):M?b.jsx("p",{className:"user-question-status",children:H?o("question.approvePlan"):Xe(M)}):f.state==="aborted"?b.jsx("p",{className:"user-question-status exception",children:o("question.aborted")}):f.state==="failed"?b.jsx("p",{className:"user-question-status exception",children:o("question.failed")}):null,T?b.jsx("p",{className:"user-question-status exception",children:T}):null]})}function c3({segment:n,sessionId:l,remainingMs:a,waitState:r}){const{t:u,locale:o}=Qe(),f=ks(n),h=B0(f.questions),p=jh(l,f.callId,f,a,r),[g,y]=D.useState(!1),[m,S]=D.useState(""),x=!!l&&p.answerable,k=Nd(h.intent.display?.question,o,h.item.question),T=Nd(h.intent.display?.detail,o,h.item.detail),C=Nd(h.intent.display?.approve,o,h.approve.label),E=h.item.selected[0];async function M(H){if(!(!l||g)){y(!0),S("");try{const W=await lt("/questions/answer",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:l,callId:f.callId,answers:[{id:h.item.id,selected:[H]}]})});if(W.status===200&&W.body.ok!==!1||W.status===409)return;S(typeof W.body.message=="string"?W.body.message:u("question.submitFailed"))}catch{S(u("question.submitFailed"))}finally{y(!1)}}}return b.jsxs("section",{className:"user-question-card","data-segment":n.id,"data-state":p.continued?"continued":f.state,"data-call":f.callId,"data-session":l||void 0,"data-kind":"approval",children:[h.intent.subject?.name?b.jsx("h3",{className:"user-question-header",children:Xe(h.intent.subject.name)}):null,b.jsx("p",{className:"user-question-text",children:Xe(k)}),T?b.jsx("p",{className:"user-question-hint",children:Xe(T)}):null,b.jsx(Nh,{interactive:x,waitLabel:p.waitLabel,onTakeTime:()=>{p.takeTime()},busy:g}),x?b.jsxs("div",{className:"user-question-row",children:[b.jsx("button",{type:"button",className:"user-question-skip",disabled:g,onClick:()=>{M(h.reject.label)},children:u("question.reject")}),b.jsx("button",{type:"button",className:"user-question-submit",disabled:g,onClick:()=>{M(h.approve.label)},children:g?u("question.submitting"):Xe(C)||u("question.allow")}),h.always?b.jsx("button",{type:"button",className:"user-question-submit",disabled:g,onClick:()=>{M(h.always.label)},children:u("question.alwaysAllow")}):null]}):E?b.jsx("p",{className:"user-question-status",children:u("question.approvalAnswered")}):f.state==="aborted"?b.jsx("p",{className:"user-question-status exception",children:u("question.aborted")}):f.state==="failed"?b.jsx("p",{className:"user-question-status exception",children:u("question.failed")}):null,m?b.jsx("p",{className:"user-question-status exception",children:m}):null]})}function zd({approval:n,sessionId:l}){const{t:a,locale:r}=Qe(),[u,o]=D.useState(!1),[f,h]=D.useState(""),[p,g]=D.useState(n.state),y=!!l&&p==="open",m=r.startsWith("zh")&&n.displayReason?.zh?n.displayReason.zh:n.displayReason?.en||n.reason;async function S(k){if(!(!l||u)){o(!0),h("");try{const T=await lt("/approvals/answer",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:l,requestId:n.requestId,outcome:k})});if(T.status===200&&T.body.ok!==!1){g(k);return}if(T.status===409){g(k);return}h(typeof T.body.message=="string"?T.body.message:a("approval.submitFailed"))}catch{h(a("approval.submitFailed"))}finally{o(!1)}}}const x=p==="allowed-once"?a("approval.allowed"):p==="rejected"?a("approval.rejected"):p==="cancelled"?a("approval.cancelled"):p==="unavailable"?a("approval.failed"):null;return b.jsxs("section",{className:"user-question-card","data-kind":"tool-approval","data-state":p,"data-request":n.requestId,"data-session":l||void 0,children:[b.jsx("h3",{className:"user-question-header",children:a("approval.title")}),b.jsx("p",{className:"user-question-text",children:Xe(n.toolName)}),m?b.jsx("p",{className:"user-question-hint",children:Xe(m)}):null,y?b.jsxs("div",{className:"user-question-row",children:[b.jsx("button",{type:"button",className:"user-question-skip",disabled:u,onClick:()=>{S("rejected")},children:a("approval.reject")}),b.jsx("button",{type:"button",className:"user-question-submit",disabled:u,onClick:()=>{S("allowed-once")},children:a(u?"question.submitting":"approval.allowOnce")})]}):x?b.jsx("p",{className:p==="allowed-once"?"user-question-status":"user-question-status exception",children:x}):null,f?b.jsx("p",{className:"user-question-status exception",children:f}):null]})}function f3(n,l){if(!n)return"";const a=new Date(n);return Number.isNaN(a.getTime())?"":a.toLocaleTimeString(l==="zh"?"zh-CN":"en",{hour:"2-digit",minute:"2-digit"})}function d3({sessionId:n,segments:l,completed:a,failures:r,retries:u,turnEnds:o,tickets:f,now:h,canRetry:p,onRetry:g,onSupply:y,onOpenSession:m,onOpenFile:S,onOpenInbox:x,botLabel:k,chat:T=!1,cwd:C,connectionPhase:E,approvals:M=[],questionWaits:H,onCompose:W}){const ne=[];let O=null;const F=()=>{O&&(O.segments.length||r[O.turn]||u[O.turn]?.length)&&ne.push(O),O=null};for(const le of l){if(le.kind==="user"){F(),pb(le.text)||ne.push({type:"user",segment:le});continue}const Q=le.turn??-1;(!O||O.turn!==Q)&&(F(),O={type:"turn",turn:Q,seconds:a[Q],segments:[]}),O.segments.push(le)}F();const ie=new Set(ne.flatMap(le=>le.type==="turn"?[le.turn]:[]));for(const le of Object.keys(r)){const Q=Number(le);ie.has(Q)||ne.push({type:"turn",turn:Q,seconds:a[Q],segments:[]})}const he=f.map(le=>({...le,summary:Xe(le.summary),events:le.events.map(Q=>({...Q,text:Xe(Q.text)}))})),_=mb(he),Z=new Map(he.map(le=>[le.id,le])),ee=new Map;for(const le of ne)if(le.type==="turn"){for(const Q of Y0(le.segments))if(Q.type==="activity")for(const se of Q.segments){if(se.kind!=="tool")continue;const ue=yb(se);ue&&Z.has(ue)&&!ee.has(ue)&&ee.set(ue,se.id)}}const we=ne.reduce((le,Q)=>Q.type==="turn"?Math.max(le,Q.turn):le,-1),Re=gb(f);return b.jsxs(b.Fragment,{children:[ne.map((le,Q)=>le.type==="user"?b.jsx(h3,{segment:le.segment,botLabel:k,onOpenInbox:x,onOpenFile:S},le.segment.id):b.jsx(y3,{sessionId:n,cwd:C,connectionPhase:E,block:le,index:Q,blocks:ne,failures:r,retries:u,turnEnds:o,latestTurn:we,background:Re,byId:Z,anchorAt:ee,now:h,canRetry:p,onRetry:g,onSupply:y,onOpenSession:m,onOpenFile:S,chat:T,approvals:M,questionWaits:H,onCompose:W,trailingApprovals:Q===ne.length-1},`${n}:turn-${le.turn}`)),_.filter(le=>!ee.has(le.id)).map(le=>b.jsx(e1,{ticket:le,now:h,onSupply:y,onOpen:m},le.id))]})}function h3({segment:n,botLabel:l,onOpenInbox:a,onOpenFile:r}){const u=So(n.text),o=th(n.text),{locale:f}=Qe(),h=f3(n.time,f);if(o)return b.jsx(QO,{briefing:o,time:h,mark:n.id,onOpenFile:r});if(u){const p=Kw([{kind:"in",id:n.id,seq:n.seq,time:n.time,mail:u}],l);return b.jsx(X2,{who:p?.who??"BOT",preview:p?.preview??"",time:h,mark:n.id,onOpen:a})}return b.jsxs("div",{className:"user-row","data-turn":n.id,children:[b.jsx("div",{className:"user-bubble",children:n.text}),h?b.jsx("time",{children:h}):null]})}function p3(n,l,a){for(let r=l-1;r>=0;r-=1){const u=n[r];if(u?.type==="user"&&u.segment&&u.segment.text.trim()!==""){if(So(u.segment.text)||th(u.segment.text))continue;if(u.segment.turn==null||u.segment.turn===a)return u.segment.text;break}}return""}function m3(n,l){return n.slice(l+1).some(a=>a.type==="user")}function g3({seconds:n,failure:l,retries:a,prompt:r,continued:u,canRetry:o,onRetry:f,showLabel:h}){const{t:p}=Qe(),[g,y]=D.useState(!1);if(!l&&a.length===0)return null;const m=g||u;return b.jsxs("div",{className:"turn-failure",children:[h?b.jsxs("p",{className:"turn-failed-label",children:["Failed",n!=null?b.jsxs(b.Fragment,{children:[" ","· ",b.jsxs("span",{className:"duration",children:[n,"s"]})]}):null]}):null,a.map(S=>b.jsxs("details",{className:"retry-row",open:S.state==="scheduled",children:[b.jsxs("summary",{children:[S.state==="started"?"Retried model request":"Retrying model request"," (",S.retry,"/",S.maxRetries??"∞",") · ",Math.max(1,Math.ceil(S.delayMs/1e3)),"s"]}),b.jsxs("p",{children:["Retry delay: ",Math.round(S.delayMs),"ms"]}),b.jsxs("p",{children:["Failure reason: ",S.message]})]},`${S.retryId}:${S.retry}`)),l?b.jsxs("p",{className:"turn-error",role:"status",children:[b.jsx("span",{className:"turn-error-title",children:"This turn failed"}),b.jsx("span",{children:l.message}),l.code?b.jsx("code",{children:l.code}):null]}):null,l&&r&&!m?b.jsx("button",{type:"button",className:"retry-turn",disabled:!o,onClick:()=>{y(!0),f(r)},children:p("bot.retry")}):null]})}function y3({sessionId:n,block:l,index:a,blocks:r,failures:u,retries:o,turnEnds:f,latestTurn:h,background:p,byId:g,anchorAt:y,now:m,canRetry:S,onRetry:x,onSupply:k,onOpenSession:T,onOpenFile:C,chat:E=!1,cwd:M,connectionPhase:H,approvals:W=[],questionWaits:ne,onCompose:O,trailingApprovals:F=!1}){const{t:ie}=Qe(),he=Y0(l.segments),_=new Set,Z=Q=>ne?.[Q]??ne?.[`${n}:${Q}`],ee=Q=>W.filter(se=>_.has(se.requestId)?!1:se.callId&&Q.includes(se.callId)?(_.add(se.requestId),!0):!1),we=()=>F?W.filter(Q=>_.has(Q.requestId)?!1:(_.add(Q.requestId),!0)):[],Re=he.some(Q=>Q.type==="activity"),le=E&&f[l.turn]==="aborted"&&!u[l.turn]&&!(l.turn===h&&p);return b.jsx("div",{children:b.jsxs("div",{"data-turn":`turn:${l.turn}`,children:[he.map(Q=>{if(Q.type==="text")return b.jsx("div",{"data-segment":Q.segment.id,className:Q.segment.streaming?"assistant streaming":"assistant",children:b.jsx(_o,{text:Q.segment.text,streaming:Q.segment.streaming,onOpenFile:C})},Q.segment.id);if(Q.type==="question"){const ue=Z(Q.segment.callId);return b.jsxs(D.Fragment,{children:[b.jsx(s3,{segment:Q.segment,sessionId:n,onCompose:O,remainingMs:ue?.remainingMs,waitState:ue?.waitState}),ee([Q.segment.callId]).map(ke=>b.jsx(zd,{approval:ke,sessionId:n},ke.requestId))]},Q.segment.id)}const se=Q.segments.filter(ue=>ue.kind==="tool");return b.jsxs(D.Fragment,{children:[b.jsx(JO,{segments:Q.segments,cwd:M,tickets:[...g.values()],connectionPhase:H}),ee(se.map(ue=>ue.callId)).map(ue=>b.jsx(zd,{approval:ue,sessionId:n},ue.requestId)),se.filter(ue=>Mw(ue)).map(ue=>b.jsx(ZO,{text:Xe(Dw(ue.result,ie))},ue.id)),se.flatMap(ue=>{const ke=yb(ue),j=ke?g.get(ke):void 0;return!ke||!j||y.get(ke)!==ue.id?[]:[b.jsx(e1,{ticket:j,now:m,onSupply:k,onOpen:T},j.id)]})]},Q.id)}),we().map(Q=>b.jsx(zd,{approval:Q,sessionId:n},Q.requestId)),le?b.jsx("p",{className:"work-note",children:ie("bot.stopped")}):null,b.jsx(g3,{seconds:l.seconds,failure:u[l.turn],retries:o[l.turn]??[],prompt:p3(r,a,l.turn),continued:m3(r,a),canRetry:S,onRetry:x,showLabel:!Re}),l.turn===h&&f[l.turn]==="aborted"&&p?b.jsx("p",{className:"work-note",children:ie("bot.stoppedBackground")}):null]})})}function Fv(){const n=location.hash.replace(/^#\/?/,"").split("/");for(let l=0;l<n.length-1;l+=1){const a=n[l],r=n[l+1];if(a==="s"&&r)return decodeURIComponent(r)}return""}function Xv(n,l,a){if(!(a in l))return l;const r={...l};return delete r[a],sessionStorage.setItem(n,JSON.stringify(r)),r}function qd(n){try{const l=JSON.parse(sessionStorage.getItem(n)||"{}");return l&&typeof l=="object"?l:{}}catch{return{}}}function Zv(n){if(!n||typeof n!="object"||Array.isArray(n))return{};const l={};for(const[a,r]of Object.entries(n))typeof r=="string"&&r!==""&&(l[a]=r);return l}function Rd(n){fetch("/dsh-bot/api/sessions/previews",{method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify(n),keepalive:!0})}function Kv(n){return(n??"").split("/").filter(Boolean).at(-1)??""}function v3(){return new Promise(n=>{const l=location.protocol==="https:"?"wss:":"ws:",a=new WebSocket(`${l}//${location.host}/api/remote.mux`),r=window.setTimeout(()=>{a.close(),n([])},4e3),u=o=>{window.clearTimeout(r),a.close(),n(o)};a.addEventListener("open",()=>{a.send(JSON.stringify({type:"open",streamId:"archive",endpoint:"workspace/follow",payload:{args:{}}}))}),a.addEventListener("message",o=>{try{const f=JSON.parse(String(o.data)),h=f.value?.type==="baseline"?f.value.value?.archivedSessionIds:void 0;if(!Array.isArray(h))return;u(h.filter(p=>typeof p=="string"))}catch{}}),a.addEventListener("error",()=>u([]))})}function b3(){const{t:n,locale:l,setLocale:a}=Qe(),[r,u]=D.useState(Fv),[o,f]=D.useState([]),[h,p]=D.useState(""),[g,y]=D.useState(""),[m,S]=D.useState(!1),[x,k]=D.useState(()=>qd("dsh-bot.titles")),[T,C]=D.useState(()=>qd("dsh-bot.previews")),[E,M]=D.useState(_d),[H,W]=D.useState(""),[ne,O]=D.useState(null),[F,ie]=D.useState(r);F!==r&&(ie(r),M(_d()));const[he,_]=D.useState(null),[Z,ee]=D.useState({ready:!1,reason:"loading"}),[we,Re]=D.useState(null),[le,Q]=D.useState(null),[se,ue]=D.useState(!1),[ke,j]=D.useState(""),[We,dt]=D.useState(0),[z,q]=D.useState(0),[te,fe]=D.useState(""),[me,Te]=D.useState(""),[Ce,Ee]=D.useState(!1),[P,de]=D.useState(null),[at,_t]=D.useState(null),[xe,zt]=D.useState([]),[vt,Ze]=D.useState({}),[_e,rt]=D.useState(!1),[wt,un]=D.useState(!1),[Zt,Vt]=D.useState({}),[Rn]=D.useState(()=>R0(async()=>{const A=await lt("/authorization");if(A.status!==200)throw new Error("Authorization catalog unavailable");return{available:A.body.available,entries:A.body.entries}})),Yt=D.useRef(void 0),X=D.useRef(null),[ae,ye]=D.useState(null),[ge,ht]=D.useState(()=>new Set),[ze,kt]=D.useState(!1),[Gt,on]=D.useState(!1),[At,cn]=D.useState(!1),[_l,Ct]=D.useState(""),[Kt,Mn]=D.useState(0),[bt,Ti]=D.useState(()=>new Set),[Ai,zl]=D.useState({}),[Mo,Do]=D.useState({}),[Xi,fn]=D.useState(!1),[ui,dn]=D.useState({}),[pa,Lo]=D.useState(()=>Date.now()),[ma,ql]=D.useState(""),Rl=Fw(r,Kt);D.useEffect(()=>{zt([]),Ze({});const A=ej({visible:!document.hidden,fetch:async K=>{const oe=await lt(`/interactions?compact=1&sessionId=${encodeURIComponent(r)}`,{signal:K});if(oe.status!==200)throw new Error("Interactions unavailable");return oe.body},active:K=>{const oe=K;return!!(oe.questions?.length||oe.approvals?.some(Ne=>Ne.state==="open")||oe.authorization?.prompts?.length||oe.authorization?.inFlight?.length)},apply:K=>{const oe=K,Ne=Array.isArray(oe.approvals)?oe.approvals:[];zt(Ne);const be={};if(Array.isArray(oe.questions))for(const pt of oe.questions)typeof pt.callId=="string"&&pt.callId!==""&&(be[pt.callId]={remainingMs:pt.remainingMs,waitState:pt.waitState});Ze(be);const Le=oe.authorization,et=Le&&typeof Le=="object"?Le.prompts:[];un(Array.isArray(et)&&et.length>0);const $e=Le&&typeof Le=="object"?Le:{},Je=JSON.stringify([$e.catalogRevision,$e.available]);Yt.current!==Je&&(Yt.current=Je,Rn.invalidate()),Vt(pt=>JSON.stringify(pt)===JSON.stringify($e)?pt:$e)},schedule:(K,oe)=>{const Ne=window.setTimeout(K,oe);return()=>window.clearTimeout(Ne)}});X.current=A;const V=()=>A.setVisible(!document.hidden);return document.addEventListener("visibilitychange",V),()=>{A.close(),X.current===A&&(X.current=null),document.removeEventListener("visibilitychange",V)}},[r,Rn]),D.useEffect(()=>{lt("/cua").then(A=>rt(A.body.available===!0))},[]);const Zi=D.useRef(null),Xn=D.useRef(null),Ml=D.useRef(null),Ci=D.useRef(null),ga=D.useRef(new Set),Es=D.useRef(0),Dl=D.useRef(new Map),Ki=D.useRef(0),Ni=D.useRef(new Map),Ts=D.useRef(!1),Ll=D.useRef(r),ya=D.useRef(null);Ll.current=r;function oi(A){return Ai[A.sessionId]||x[A.sessionId]||A.title||Kv(A.cwd)||n("session.unnamed")}function Bl(A){const V=o.find(K=>K.sessionId===A);return V?oi(V):Ai[A]||x[A]||""}const or=Sb(E.segments),ji=r!==""&&H!==r&&(ne==null||ne.phase==="restoring"||ne.phase==="connecting"||ne.phase==="syncing"&&H!==r),As=ne?.fraction!=null?{loaded:Math.round(ne.fraction*1e3),total:1e3}:null,Tn=ne?.phase==="syncing"&&ne.fraction!=null,Nt=D.useMemo(()=>Zw(E.segments),[E.segments]),an=D.useMemo(()=>Sj(Nt),[Nt]),Ji=r?oi({sessionId:r,cwd:o.find(A=>A.sessionId===r)?.cwd,title:E.title||null}):n("app.title"),Cs=r?`/#/s/${encodeURIComponent(r)}`:"/";function $i(A){cn(!1),u(A),Ee(!1),ye(null),_(null),Te(""),Ct("");const V=A?`#/s/${encodeURIComponent(A)}`:"#/";location.hash!==V&&history.replaceState(null,"",V)}function Bo(A){if(!A||A===r)return;const V=r;cn(!1),u(A),Ee(!1),ye(null),_(null),Te(""),Ct("");const K=`#/s/${encodeURIComponent(A)}`;location.hash!==K&&history.pushState({kind:"worker",owner:V},"",K)}function cr(){if(cn(!1),Ee(!1),ye(null),history.state?.kind==="worker"){history.back();return}ma&&$i(ma)}D.useEffect(()=>{let A=!1;return v3().then(V=>{A||ht(new Set(V))}),()=>{A=!0}},[]);function Pi(A){const V=Cw(A);V&&(dn(V.signals),Do(V.cards),fn(!0));const K=A.desk;if(!K||typeof K!="object"||Array.isArray(K))return;const oe=K,Ne=oe.sessions;if(Ne&&typeof Ne=="object"&&!Array.isArray(Ne)){const $e=Ne,Je=$e.result;if(Je?.ok!==!0)p(Je?.error?.message||String($e.error||n("session.listUnavailable")));else if(p(""),f(ba(Je.value?.items)),Wi($e.previews),!Ts.current){Ts.current=!0;const pt=Zv($e.previews),ct={};for(const[tt,Ln]of Object.entries(qd("dsh-bot.previews")))ga.current.has(tt)||pt[tt]||!Ln||(ct[tt]=Ln);Object.keys(ct).length>0&&Rd({previews:ct})}}const be=oe.bots;if(be&&typeof be=="object"&&!Array.isArray(be)&&be.ok===!0){const $e=be,Je=Array.isArray($e.bots)?$e.bots:[],pt=Je.flatMap(tt=>{if(!tt||typeof tt!="object")return[];const Ln=tt.sessionId;return typeof Ln=="string"?[Ln]:[]}),ct={};for(const tt of Je){if(!tt||typeof tt!="object")continue;const Ln=tt.sessionId,qi=tt.name;typeof Ln=="string"&&typeof qi=="string"&&qi!==""&&(ct[Ln]=qi)}if(pt.length===0&&Array.isArray($e.sessionIds))for(const tt of $e.sessionIds)typeof tt=="string"&&pt.push(tt);Ti(new Set(pt)),zl(ct)}const Le=oe.health;if(Le&&typeof Le=="object"&&!Array.isArray(Le)){const $e=Le;Re($e),$e.execution&&ee({ready:$e.execution.ready===!0,reason:$e.execution.reason||($e.execution.ready===!0?"":"catalog_unreadable")})}const et=oe.usage;et&&typeof et=="object"&&!Array.isArray(et)&&Q(et)}D.useEffect(()=>{let A=!1;return(async()=>{try{const V=await lt("/sessions");if(A)return;const K=V.body.result;K?.ok===!0?(p(""),f(ba(K.value?.items)),Wi(V.body.previews)):V.status!==200&&p(K?.error?.message||n("session.listUnavailable"))}catch{}try{const V=await lt("/sessions/bots");if(A||V.body.ok!==!0)return;const K=Array.isArray(V.body.bots)?V.body.bots:[],oe=K.flatMap(be=>{if(!be||typeof be!="object")return[];const Le=be.sessionId;return typeof Le=="string"?[Le]:[]}),Ne={};for(const be of K){if(!be||typeof be!="object")continue;const Le=be.sessionId,et=be.name;typeof Le=="string"&&typeof et=="string"&&et!==""&&(Ne[Le]=et)}if(oe.length===0&&Array.isArray(V.body.sessionIds))for(const be of V.body.sessionIds)typeof be=="string"&&oe.push(be);Ti(new Set(oe)),zl(Ne)}catch{}})(),()=>{A=!0}},[]),D.useEffect(()=>{let A=!1,V=null,K=0,oe=2e3,Ne,be;const Le=Je=>{let pt;try{pt=JSON.parse(String(Je.data))}catch{return null}return pt.ok===!0?pt:null},et=()=>{if(V?.close(),Ne=void 0,be=void 0,A||document.hidden||typeof EventSource>"u")return;const Je=new EventSource(`/dsh-bot/api/live?sessionId=${encodeURIComponent(r)}`);V=Je,Je.addEventListener("interaction-error",()=>{!A&&V===Je&&X.current?.disconnected()}),Je.addEventListener("interactions",pt=>{if(A||V!==Je)return;const ct=Le(pt);ct?.sessionId===r&&(oe=2e3,X.current?.ingest(ct))}),Je.addEventListener("snapshot",pt=>{if(A||V!==Je)return;const ct=Le(pt);ct&&(oe=2e3,ct.desk!==void 0&&(Ne=ct.desk),ct.work!==void 0&&(be=ct.work),Pi(ct))}),Je.addEventListener("delta",pt=>{if(A||V!==Je)return;const ct=Le(pt);if(!ct)return;const tt={ok:!0};ct.desk!==void 0&&Ne!==void 0&&(Ne=ys(Ne,ct.desk),tt.desk=Ne),ct.work!==void 0&&be!==void 0&&(be=ys(be,ct.work),tt.work=be),(tt.desk!==void 0||tt.work!==void 0)&&Pi(tt)}),Je.addEventListener("error",()=>{A||V!==Je||(X.current?.disconnected(),Je.close(),V===Je&&(V=null),K=window.setTimeout(et,oe),oe=Math.min(15e3,oe*2))})},$e=()=>{window.clearTimeout(K),document.hidden?(V?.close(),V=null):(oe=2e3,et())};return document.addEventListener("visibilitychange",$e),et(),()=>{A=!0,document.removeEventListener("visibilitychange",$e),window.clearTimeout(K),V?.close()}},[r]),D.useEffect(()=>{const A=()=>{cn(!1),Ee(!1),ye(null),_(null),Te(""),Ct(""),u(Fv())};return window.addEventListener("hashchange",A),()=>window.removeEventListener("hashchange",A)},[]),D.useEffect(()=>{let A=!1;return Vv().then(K=>{A||(ya.current=Lv({follow:Rv({addressOf:oe=>ar(oe)}),page:Bv({addressOf:oe=>ar(oe)}),cdc:Hv({cache:K}),range:Dv(),checkpoint:K}))}),()=>{A=!0}},[]),D.useEffect(()=>{if(!r){W(""),O(null);return}M(_d()),O(null);let A=!1,V=null;return(async()=>{const K=await Vv();if(A)return;const oe=ya.current??Lv({follow:Rv({addressOf:be=>ar(be)}),page:Bv({addressOf:be=>ar(be)}),cdc:Hv({cache:K}),range:Dv(),checkpoint:K});ya.current=oe;const Ne=oe.open(r,{enhancement:"auto"});V=Ne,Ne.onBatch(be=>{A||Ll.current!==r||(M(Le=>{let et=Le;for(const $e of be.events)et=Vj(et,$e);return et}),W(r))}),Ne.onEphemeral(be=>{A||Ll.current!==r||M(Le=>Yj(Le,be))}),Ne.onStatus(be=>{A||Ll.current!==r||(O(be),(be.phase==="live"||be.phase==="stalled"||be.phase==="error")&&W(r))})})(),()=>{A=!0,V?.close()}},[r]),D.useEffect(()=>{!r||F!==r||!E.title||Ai[r]||k(A=>{if(A[r]===E.title)return A;const V={...A,[r]:E.title};return sessionStorage.setItem("dsh-bot.titles",JSON.stringify(V)),V})},[r,F,E.title,Ai]);const ci=!!r&&bt.has(r),Ht=ci&&Xi?Mo[r]??[]:[],Zn=ci&&Xi?r:"";D.useEffect(()=>{if(!r||!ua(r)){ql("");return}let A=!1;const V=Ew(r);return hs(`/dsh-bot/api/work/ticket?id=${encodeURIComponent(V)}`).then(K=>{if(A||K.body.ok!==!0||!K.body.ticket||typeof K.body.ticket!="object")return;const oe=K.body.ticket.owner_session_id;typeof oe=="string"&&ql(oe)}),()=>{A=!0}},[r]);const Oi=Ht.some(A=>A.status==="started");D.useEffect(()=>{if(!Oi)return;const A=window.setInterval(()=>Lo(Date.now()),1e3);return()=>window.clearInterval(A)},[Oi]);function Wi(A){const V=Zv(A);Object.keys(V).length!==0&&C(K=>{let oe=!1;const Ne={...K};for(const[be,Le]of Object.entries(V))Ne[be]||(Ne[be]=Le,oe=!0);return oe?(sessionStorage.setItem("dsh-bot.previews",JSON.stringify(Ne)),Ne):K})}function _i(){window.clearTimeout(Ki.current),Ki.current=0;const A=[...Dl.current];if(Dl.current.clear(),A.length!==0){if(A.length===1){const[V,K]=A[0]??[];V&&K&&Rd({sessionId:V,preview:K});return}Rd({previews:Object.fromEntries(A)})}}D.useEffect(()=>()=>{_i()},[]),D.useEffect(()=>{if(!r||F!==r)return;const A=Gj(E.segments);!A||Ni.current.get(r)===A||(Ni.current.set(r,A),C(V=>{if(V[r]===A)return V;const K={...V,[r]:A};return sessionStorage.setItem("dsh-bot.previews",JSON.stringify(K)),K}),Dl.current.set(r,A),window.clearTimeout(Ki.current),Ki.current=window.setTimeout(_i,400))},[r,F,E.segments]),D.useLayoutEffect(()=>{const A=Ci.current;if(!A||!P)return;const V=A.getBoundingClientRect(),K=Math.max(8,Math.min(P.x,window.innerWidth-V.width-8)),oe=Math.max(8,Math.min(P.y,window.innerHeight-V.height-8));(K!==P.x||oe!==P.y)&&de(Ne=>Ne&&{...Ne,x:K,y:oe}),A.querySelector("button")?.focus()},[P]),D.useEffect(()=>{if(!P)return;const A=()=>de(null),V=oe=>{const Ne=oe.target;Ne instanceof Node&&Ci.current?.contains(Ne)||A()},K=oe=>{oe.key==="Escape"&&A()};return document.addEventListener("pointerdown",V),document.addEventListener("keydown",K),document.addEventListener("scroll",A,!0),()=>{document.removeEventListener("pointerdown",V),document.removeEventListener("keydown",K),document.removeEventListener("scroll",A,!0)}},[P]),D.useEffect(()=>{if(!Ce)return;const A=K=>{const oe=K.target;oe instanceof Node&&Ml.current?.contains(oe)||Ee(!1)},V=K=>{K.key==="Escape"&&Ee(!1)};return document.addEventListener("pointerdown",A),document.addEventListener("keydown",V),()=>{document.removeEventListener("pointerdown",A),document.removeEventListener("keydown",V)}},[Ce]),D.useEffect(()=>{cn(!1)},[r]);const Rt=Ht.map(A=>`${A.id}:${A.status}:${A.revision}`).join(`
63
+ `);D.useEffect(()=>{const A=Zi.current;A&&(A.scrollTop=A.scrollHeight)},[E.segments,E.drafting,E.activity,r,At,Rt]);const fr=D.useMemo(()=>{const A=g.trim().toLowerCase();return o.filter(V=>ua(V.sessionId)||ge.has(V.sessionId)?!1:A?[oi(V),V.cwd??"",T[V.sessionId]??""].join(" ").toLowerCase().includes(A):!0)},[o,g,x,T,ge,Ai]).filter(A=>!A.blank),Kn=D.useMemo(()=>{const A=g.trim().toLowerCase();return o.filter(V=>V.blank!==!0||ua(V.sessionId)?!1:A?[oi(V),V.cwd??""].join(" ").toLowerCase().includes(A):!0)},[o,g,x,Ai]),Jn=ze||g.trim()!=="",el=D.useMemo(()=>!r||!bt.has(r)?[]:o.flatMap(A=>!bt.has(A.sessionId)||A.sessionId===r||ge.has(A.sessionId)||ua(A.sessionId)?[]:[{sessionId:A.sessionId,label:oi(A)}]),[o,bt,r,ge,Ai,x]),fi=r&&bt.has(r)?RO(ke,We):null,va=fi?`${fi.start}:${fi.query}`:"",$n=fi?BO(el,fi.query):[],Ns=fi!=null&&te!==va,Ve=Math.min(z,Math.max($n.length-1,0));D.useEffect(()=>{q(0)},[va]);function ba(A){const V=ga.current;return(A??[]).filter(K=>!V.has(K.sessionId))}function tl(A){ga.current.add(A),Dl.current.delete(A),Ni.current.delete(A),f(V=>V.filter(K=>K.sessionId!==A)),ht(V=>{const K=new Set(V);return K.delete(A),K}),k(V=>Xv("dsh-bot.titles",V,A)),C(V=>Xv("dsh-bot.previews",V,A)),Ti(V=>{if(!V.has(A))return V;const K=new Set(V);return K.delete(A),K}),zl(V=>{if(!(A in V))return V;const K={...V};return delete K[A],K}),r===A&&$i("")}function Ul(A,V){const K=new Set(ge);for(const oe of V)K.add(oe);if(Array.isArray(A))for(const oe of A)typeof oe=="string"&&K.add(oe);ht(K),V.includes(r)&&$i("")}async function Pn(A){const V=await lt(`/sessions/${encodeURIComponent(A)}/archive`,{method:"POST"});if(V.status!==200){const K=V.body.upstream;p(K?.message||(V.body.error==="not_blank"?n("session.notBlankArchive"):n("session.archiveFailed")));return}p(""),Ul(V.body.archivedSessionIds,[A])}function rn(A,V){A.preventDefault(),de({id:V,x:A.clientX,y:A.clientY})}async function js(A){const V=await lt(`/sessions/${encodeURIComponent(A)}/delete`,{method:"POST"});if(V.status!==200){const K=V.body.error,oe=typeof V.body.message=="string"?V.body.message:"";p(K==="running"?n("session.deleteRunning"):K==="attached"?n("session.deleteAttached"):oe||n("session.deleteFailed"));return}p(""),tl(A)}async function Ho(){if(Kn.length===0||!window.confirm(n("session.archiveConfirm",{count:String(Kn.length)})))return;const A=[];let V=[];for(const K of Kn){const oe=await lt(`/sessions/${encodeURIComponent(K.sessionId)}/archive`,{method:"POST"});if(oe.status!==200){const Ne=oe.body.upstream;p(Ne?.message||n("session.archiveSomeFailed"));break}A.push(K.sessionId),V=oe.body.archivedSessionIds}A.length>0&&Ul(V,A)}async function dr(A){const V=o.find(Ne=>Ne.sessionId===A),K=x[A]||Kv(V?.cwd)||n("session.blankName");if(!window.confirm(n("session.purgeOneConfirm",{name:K})))return;const oe=await lt(`/sessions/${encodeURIComponent(A)}/purge`,{method:"POST"});if(oe.status!==200){p(oe.body.error==="not_blank"?n("session.purgeNotBlank"):n("session.purgeFailed"));return}tl(A)}async function Os(){const A=Kn.filter(K=>K.blank===!0);if(A.length===0||!window.confirm(n("session.purgeAllConfirm",{count:String(A.length)})))return;const V=[];for(const K of A){if((await lt(`/sessions/${encodeURIComponent(K.sessionId)}/purge`,{method:"POST"})).status!==200){p(n("session.purgeSomeFailed"));break}V.push(K.sessionId),tl(K.sessionId)}V.length}async function Io(A,V,K){on(!1),K!==""&&(zl(be=>({...be,[A]:K})),Ti(be=>new Set([...be,A])),k(be=>{const Le={...be,[A]:K};return sessionStorage.setItem("dsh-bot.titles",JSON.stringify(Le)),Le}));const Ne=(await lt("/sessions")).body.result;f(ba(Ne?.value?.items)),$i(A),Ct(V),Mn(be=>be+1)}function hn(A,V){j(A),dt(V),window.requestAnimationFrame(()=>{const K=Xn.current;K&&(K.focus(),K.setSelectionRange(V,V))})}function xa(A){if(!fi)return;const V=LO(ke,We,fi.start,A.label,A.sessionId);hn(V.text,V.cursor)}function _s(A="/"){Ee(!1),j(V=>{const K=V.replace(/\s+$/,"");return K===""?A==="/"?"/":`${A} `:`${K} ${A==="/"?"/":`${A} `}`}),window.requestAnimationFrame(()=>Xn.current?.focus())}async function Sa(A){const V=he?.status==="accepted"&&E.drafting,K=Zn===r?Ht:[];if(!r||!A||!Z.ready||Ly(V,K,bt.has(r)))return;const oe=E.drafting;j(""),Te(""),Es.current+=1;const Ne=Number.MAX_SAFE_INTEGER-Es.current;M(et=>({...et,drafting:!0,segments:[...et.segments,{kind:"user",id:`optimistic:${Ne}`,text:A,time:Date.now(),seq:Ne,optimistic:!0}]}));const be=await lt("/tasks",{method:"POST",headers:{"content-type":"application/json","idempotency-key":crypto.randomUUID()},body:JSON.stringify({sessionId:r,text:A})}),Le=be.body.task;if(_(Le??null),be.status!==202){M($e=>({...$e,drafting:oe?$e.drafting:!1,segments:$e.segments.filter(Je=>!(Je.kind==="user"&&Je.optimistic&&Je.text===A))}));const et=be.body.execution;Te(et?.reason||bo(String(be.body.error||""),n("composer.notSent"),n))}}async function zi(){const A=ke.trim();A&&await Sa(A)}async function zs(A,V){const K=await hs("/dsh-bot/api/work/supply",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({sessionId:r,ticketId:A,text:V})});return K.status!==200||K.body.ok===!1?$v(K.body,n("composer.supplyFailed")):""}async function qs(){if(!he||he.status!=="accepted")return;const V=(await lt(`/tasks/${he.id}/cancel?sessionId=${encodeURIComponent(he.sessionId??"")}`,{method:"POST"})).body.task??he;_(V),V.status==="cancelled"&&M(K=>({...K,drafting:!1}))}const Dn=he?.status==="accepted"&&E.drafting,hr=Ly(Dn,Zn===r?Ht:[],ci),Rs=!!r&&Z.ready&&ke.trim()!==""&&!hr;function wa(A){if(!bt.has(A.sessionId))return null;const V=A.running===!0||A.sessionId===r&&(Dn||E.drafting),K=A.sessionId===r&&Zn===r?Ht:(ui[A.sessionId]??[]).map(oe=>({status:oe}));return _w(K,V)}return b.jsxs("div",{className:r?"shell in-chat":"shell",children:[b.jsxs("aside",{className:"side",children:[b.jsxs("div",{className:"side-top",children:[b.jsx("strong",{className:"brand",children:n("app.title")}),b.jsxs("span",{className:"side-actions",children:[b.jsx("button",{type:"button",className:"icon-btn","aria-label":n("session.search"),onClick:()=>S(A=>!A),children:b.jsx(VO,{})}),b.jsx("button",{type:"button",className:"icon-btn","aria-label":n("new.title"),onClick:()=>on(!0),children:b.jsx(Gv,{})})]})]}),m?b.jsx("input",{className:"filter",value:g,placeholder:n("session.searchPlaceholder"),onChange:A=>y(A.target.value)}):null,h?b.jsx("p",{className:"note",children:h}):null,_l?b.jsx("p",{className:"note ok",children:_l}):null,b.jsxs("ul",{className:"sessions",children:[fr.length===0&&Kn.length===0?b.jsx("li",{className:"empty",children:o.length?n("session.noMatch"):n("session.none")}):null,fr.map(A=>{const V=oi(A);return b.jsx("li",{onContextMenu:K=>rn(K,A.sessionId),children:b.jsxs("button",{type:"button",className:A.sessionId===r?"session selected":"session",title:A.cwd||A.sessionId,onClick:()=>$i(A.sessionId),children:[b.jsxs("span",{className:bt.has(A.sessionId)?"mark bot-mark":"mark",children:[bt.has(A.sessionId)?"BOT":Array.from(V)[0],b.jsx(Yv,{signal:wa(A)})]}),b.jsxs("span",{className:"copy",children:[b.jsx("span",{className:"name",children:V}),b.jsx("span",{className:"preview",children:(A.sessionId===r?fd(Ht,pa,n):"")||T[A.sessionId]||(A.running?n("session.running"):"")})]})]})},A.sessionId)}),Kn.length>0?b.jsxs("li",{className:"blank-head",children:[b.jsxs("button",{type:"button","aria-expanded":Jn,onClick:()=>kt(A=>!A),children:[n(Jn?"session.hide":"session.show")," ",n("session.blankCount",{count:String(Kn.length)})]}),b.jsx("button",{type:"button",onClick:()=>{Ho()},children:n("session.archiveAll")}),b.jsx("button",{type:"button",onClick:()=>{Os()},children:n("session.purgeAll")})]}):null,Jn?Kn.map(A=>{const V=oi(A);return b.jsxs("li",{className:"session-row",onContextMenu:K=>rn(K,A.sessionId),children:[b.jsxs("button",{type:"button",className:A.sessionId===r?"session selected":"session",title:A.cwd||A.sessionId,onClick:()=>$i(A.sessionId),children:[b.jsx("span",{className:bt.has(A.sessionId)?"mark bot-mark":"mark",children:bt.has(A.sessionId)?"BOT":Array.from(V)[0]}),b.jsxs("span",{className:"copy",children:[b.jsx("span",{className:"name",children:V}),b.jsx("span",{className:"preview",children:ge.has(A.sessionId)?n("session.archived"):n("session.blank")})]})]}),ge.has(A.sessionId)?null:b.jsx("button",{type:"button",className:"session-delete","aria-label":n("session.archiveLabel",{name:V}),onClick:()=>{Pn(A.sessionId)},children:n("session.archive")}),b.jsx("button",{type:"button",className:"session-delete purge","aria-label":n("session.purgeLabel",{name:V}),onClick:()=>{dr(A.sessionId)},children:n("session.purge")})]},A.sessionId)}):null]}),se?b.jsx(IO,{health:we,usage:le,execution:Z,model:E.model}):null,b.jsxs("div",{className:"me-row",children:[b.jsxs("button",{type:"button",className:"me",onClick:()=>ue(A=>!A),children:[b.jsx("span",{className:"mark me-mark",children:n("local.mark")}),b.jsx("span",{children:we?.primary?.reachable===!1?n("local.down"):n("local.here")})]}),b.jsx("button",{type:"button",className:"lang-switch",onClick:()=>a(l==="en"?"zh":"en"),children:n("lang.switch")})]})]}),b.jsxs("section",{className:"chat",children:[b.jsxs("header",{className:"chat-head",children:[At?b.jsx("button",{type:"button",className:"bot-chat-back",onClick:()=>cn(!1),children:n("nav.back")}):ua(r)?b.jsx("button",{type:"button",className:"back",onClick:cr,children:n("nav.back")}):b.jsx("button",{type:"button",className:"back",onClick:()=>u(""),children:n("nav.sessions")}),r&&bt.has(r)?b.jsxs("span",{className:"bot-badge",children:["BOT",b.jsx(Yv,{signal:wa({sessionId:r,running:o.find(A=>A.sessionId===r)?.running})})]}):null,b.jsx("h1",{children:At?n("nav.botMessages"):Ji}),!At&&fd(Ht,pa,n)?b.jsx("span",{className:"work-chip",children:fd(Ht,pa,n)}):null,b.jsx("a",{href:Cs,children:n("nav.official")})]}),ua(r)&&!At?b.jsxs("nav",{className:"work-crumb","aria-label":n("nav.where"),children:[b.jsx("button",{type:"button",onClick:cr,children:ma&&Bl(ma)||n("nav.mainSession")}),b.jsx("span",{"aria-hidden":"true",children:"/"}),b.jsx("span",{children:n("nav.worker")})]}):null,Rl&&!At?b.jsx("p",{className:"basis",children:Rl}):null,b.jsxs("div",{className:"chat-body",children:[b.jsx(UO,{active:ji||Tn,progress:As}),b.jsx("div",{className:"scroll",ref:Zi,"aria-busy":ji||Tn||void 0,children:b.jsxs("div",{className:"column",children:[r?null:b.jsx("p",{className:"empty-thread",children:n("nav.pick")}),r&&!ji&&!Tn&&!At&&Nt.length===0&&Ht.length===0?b.jsx("p",{className:"empty-thread",children:n("nav.empty")}):null,b.jsx(U2,{children:ji?null:At?b.jsx(Z2,{items:or,botLabel:Bl,onOpenFile:(A,V)=>ye({path:A,line:V})}):b.jsx(d3,{sessionId:r,cwd:o.find(A=>A.sessionId===r)?.cwd,connectionPhase:ne?.phase,segments:Nt,approvals:xe,questionWaits:vt,onCompose:A=>hn(A,A.length),completed:E.completed,failures:E.failures,retries:E.retries,turnEnds:E.turnEnds,tickets:Ht,now:pa,canRetry:!!r&&Z.ready&&!Dn,onRetry:A=>{Sa(A)},onSupply:zs,onOpenSession:Bo,onOpenFile:(A,V)=>ye({path:A,line:V}),onOpenInbox:()=>cn(!0),botLabel:Bl,chat:ci})},r)]})}),At||ji?null:b.jsx(W2,{root:Zi,marks:an,busyId:E.drafting&&E.turn!=null?`turn:${E.turn}`:void 0})]}),b.jsx("div",{className:"composer-wrap",hidden:At,children:b.jsxs("form",{className:"column",onSubmit:A=>{A.preventDefault(),zi()},children:[r&&!ji?b.jsx(yj,{segments:E.segments,drafting:E.drafting,currentTurn:E.turn,tickets:Ht,connectionPhase:ne?.phase,pendingApprovals:xe}):null,b.jsxs("div",{className:"card",children:[Ns?b.jsx("div",{className:"mention-menu",role:"listbox","aria-label":n("composer.mention"),children:$n.length===0?b.jsx("p",{className:"mention-empty",children:n("composer.noBot")}):$n.map((A,V)=>b.jsxs("button",{type:"button",role:"option","aria-selected":V===Ve,className:V===Ve?"active":"",onMouseDown:K=>{K.preventDefault(),xa(A)},children:[b.jsx("span",{className:"bot-badge",children:"BOT"}),b.jsx("span",{className:"mention-name",children:A.label})]},A.sessionId))}):null,b.jsx("textarea",{ref:Xn,value:ke,rows:1,placeholder:r?$d({segments:E.segments,drafting:E.drafting,currentTurn:E.turn,tickets:Ht,pendingApprovals:xe,t:n})?.text===n("question.waiting")||$d({segments:E.segments,drafting:E.drafting,currentTurn:E.turn,tickets:Ht,pendingApprovals:xe,t:n})?.text===n("approval.waiting")?n("question.waiting"):zw(Ht,n)??(ci&&Dn?n("composer.interrupt"):bt.has(r)?n("composer.mentionHint"):n("composer.task")):n("composer.pick"),disabled:!r,onChange:A=>{j(A.target.value),dt(A.target.selectionStart??A.target.value.length)},onSelect:A=>dt(A.currentTarget.selectionStart??0),onKeyDown:A=>{if(!A.nativeEvent.isComposing){if(Ns&&$n.length>0){if(A.key==="ArrowDown"){A.preventDefault(),q(V=>(V+1)%$n.length);return}if(A.key==="ArrowUp"){A.preventDefault(),q(V=>(V-1+$n.length)%$n.length);return}if(A.key==="Enter"||A.key==="Tab"){A.preventDefault();const V=$n[Ve];V&&xa(V);return}if(A.key==="Escape"){A.preventDefault(),fe(va);return}}A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),zi())}}}),b.jsxs("div",{className:"card-row",children:[b.jsxs("div",{className:"tools",ref:Ml,children:[b.jsx("button",{type:"button",className:"add","aria-label":n("composer.add"),"aria-haspopup":"menu","aria-expanded":Ce,disabled:!r,onClick:()=>Ee(A=>!A),children:b.jsx(Gv,{})}),Ce?b.jsxs("div",{className:"plus-menu",role:"menu",children:[b.jsx("button",{type:"button",role:"menuitem",onClick:()=>_s(),children:n("composer.command")}),b.jsx("button",{type:"button",role:"menuitem",onClick:()=>{Ee(!1),_t("permission")},children:n("permission.open")}),b.jsx("button",{type:"button",role:"menuitem",onClick:()=>{Ee(!1),_t("authorization")},children:n("auth.open")}),_e?b.jsx("button",{type:"button",role:"menuitem",onClick:()=>{Ee(!1),_t("cua")},children:n("cua.open")}):null,b.jsx("p",{className:"plus-note",children:n("composer.filesLater")})]}):null,E.preset?b.jsxs("button",{type:"button",className:"chip",onClick:()=>_t("permission"),children:[b.jsx(YO,{preset:E.preset}),I0(E.preset,n)]}):null]}),b.jsxs("div",{className:"trailing",children:[E.model?b.jsx("span",{className:"model",children:E.model}):null,Dn?b.jsx("button",{type:"button",className:"stop","aria-label":n("composer.cancel"),onClick:()=>{qs()},children:b.jsx("span",{className:"stop-icon"})}):null,hr?null:b.jsx("button",{type:"submit",className:"send","aria-label":n("composer.send"),disabled:!Rs,children:b.jsx(GO,{})})]})]})]}),b.jsx("p",{className:"stats",children:me||(Z.ready?HO(E):bo(Z.reason,Z.reason,n))})]})})]}),at==="permission"&&r?b.jsx(vj,{sessionId:r,current:E.preset,onClose:()=>_t(null),onChanged:()=>Mn(A=>A+1)}):null,at==="authorization"||wt&&at==null?b.jsx(bj,{authorization:Zt,catalog:Rn,onClose:()=>_t(null)}):null,at==="cua"&&_e?b.jsx(xj,{onClose:()=>_t(null)}):null,r&&ae?b.jsx(Uw,{sessionId:r,path:ae.path,line:ae.line,onClose:()=>ye(null)}):null,P?b.jsx("div",{ref:Ci,className:"session-menu",role:"menu","aria-label":n("session.menu"),style:{left:P.x,top:P.y},onContextMenu:A=>A.preventDefault(),children:b.jsx("button",{type:"button",role:"menuitem",onClick:()=>{const A=P.id;de(null),js(A)},children:n("session.delete")})}):null,Gt?b.jsx(Qw,{onClose:()=>on(!1),onCreated:(A,V,K)=>{Io(A,V,K)}}):null]})}const t1=document.querySelector("#root");if(!t1)throw new Error("missing root");HS.createRoot(t1).render(b.jsx(D.StrictMode,{children:b.jsx(xw,{children:b.jsx(b3,{})})}));