mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-11 17:26:57 +02:00
Trois défauts sans rapport entre eux, tous visibles à l'écran. Jauge de contexte bloquée à « 0 / N (0 %) » : le comptage exact vient de usage.prompt_tokens (include_usage), qu'un llama-server récent a cessé de renvoyer. On note désormais si l'usage est arrivé ; sinon la fin de tour publie l'estimation qui pilote déjà la compaction — approximative, mais jamais absente. Et la souscription envoie la valeur courante juste après le rattrapage : une page rechargée affichait zéro sur une discussion pourtant pleine, faute d'événement ctx_used dans la fenêtre rejouée. Espace disque : « il ne reste que 11,9 Go » sur un partage Unraid qui en a des centaines. /mnt/user est servi par shfs, un FUSE qui agrège plusieurs disques — statfs y renvoie l'espace d'un seul, et ce chiffre REFUSAIT l'installation du modèle. Les systèmes de fichiers qui approximent (FUSE, overlay, NFS, CIFS, Ceph, Gluster) sont reconnus par leur magie : leur chiffre reste affiché, précédé d'un « ~ », mais ne bloque plus rien. Panneau Fichiers : le panneau entier défilait, emportant vers le haut l'en-tête, le fil d'Ariane et le pied (occupation disque, bouton .zip) dès qu'il y avait quelques fichiers. Seule la liste défile maintenant ; le pied reste en bas et l'état vide se centre. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
89 lines
376 KiB
JavaScript
89 lines
376 KiB
JavaScript
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const c of a)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&o(u)}).observe(document,{childList:!0,subtree:!0});function r(a){const c={};return a.integrity&&(c.integrity=a.integrity),a.referrerPolicy&&(c.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?c.credentials="include":a.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(a){if(a.ep)return;a.ep=!0;const c=r(a);fetch(a.href,c)}})();function lo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ta={exports:{}},wi={},na={exports:{}},Ce={};/**
|
||
* @license React
|
||
* react.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Uf;function Jm(){if(Uf)return Ce;Uf=1;var t=Symbol.for("react.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.iterator;function v(P){return P===null||typeof P!="object"?null:(P=x&&P[x]||P["@@iterator"],typeof P=="function"?P:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,L={};function j(P,B,C){this.props=P,this.context=B,this.refs=L,this.updater=C||w}j.prototype.isReactComponent={},j.prototype.setState=function(P,B){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,B,"setState")},j.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function T(){}T.prototype=j.prototype;function O(P,B,C){this.props=P,this.context=B,this.refs=L,this.updater=C||w}var A=O.prototype=new T;A.constructor=O,E(A,j.prototype),A.isPureReactComponent=!0;var J=Array.isArray,le=Object.prototype.hasOwnProperty,D={current:null},ue={key:!0,ref:!0,__self:!0,__source:!0};function ce(P,B,C){var me,we={},he=null,Te=null;if(B!=null)for(me in B.ref!==void 0&&(Te=B.ref),B.key!==void 0&&(he=""+B.key),B)le.call(B,me)&&!ue.hasOwnProperty(me)&&(we[me]=B[me]);var Se=arguments.length-2;if(Se===1)we.children=C;else if(1<Se){for(var Ie=Array(Se),He=0;He<Se;He++)Ie[He]=arguments[He+2];we.children=Ie}if(P&&P.defaultProps)for(me in Se=P.defaultProps,Se)we[me]===void 0&&(we[me]=Se[me]);return{$$typeof:t,type:P,key:he,ref:Te,props:we,_owner:D.current}}function ge(P,B){return{$$typeof:t,type:P.type,key:B,ref:P.ref,props:P.props,_owner:P._owner}}function R(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function Y(P){var B={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(C){return B[C]})}var Z=/\/+/g;function ve(P,B){return typeof P=="object"&&P!==null&&P.key!=null?Y(""+P.key):B.toString(36)}function X(P,B,C,me,we){var he=typeof P;(he==="undefined"||he==="boolean")&&(P=null);var Te=!1;if(P===null)Te=!0;else switch(he){case"string":case"number":Te=!0;break;case"object":switch(P.$$typeof){case t:case i:Te=!0}}if(Te)return Te=P,we=we(Te),P=me===""?"."+ve(Te,0):me,J(we)?(C="",P!=null&&(C=P.replace(Z,"$&/")+"/"),X(we,B,C,"",function(He){return He})):we!=null&&(R(we)&&(we=ge(we,C+(!we.key||Te&&Te.key===we.key?"":(""+we.key).replace(Z,"$&/")+"/")+P)),B.push(we)),1;if(Te=0,me=me===""?".":me+":",J(P))for(var Se=0;Se<P.length;Se++){he=P[Se];var Ie=me+ve(he,Se);Te+=X(he,B,C,Ie,we)}else if(Ie=v(P),typeof Ie=="function")for(P=Ie.call(P),Se=0;!(he=P.next()).done;)he=he.value,Ie=me+ve(he,Se++),Te+=X(he,B,C,Ie,we);else if(he==="object")throw B=String(P),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return Te}function G(P,B,C){if(P==null)return P;var me=[],we=0;return X(P,me,"","",function(he){return B.call(C,he,we++)}),me}function $(P){if(P._status===-1){var B=P._result;B=B(),B.then(function(C){(P._status===0||P._status===-1)&&(P._status=1,P._result=C)},function(C){(P._status===0||P._status===-1)&&(P._status=2,P._result=C)}),P._status===-1&&(P._status=0,P._result=B)}if(P._status===1)return P._result.default;throw P._result}var se={current:null},U={transition:null},re={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:U,ReactCurrentOwner:D};function S(){throw Error("act(...) is not supported in production builds of React.")}return Ce.Children={map:G,forEach:function(P,B,C){G(P,function(){B.apply(this,arguments)},C)},count:function(P){var B=0;return G(P,function(){B++}),B},toArray:function(P){return G(P,function(B){return B})||[]},only:function(P){if(!R(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Ce.Component=j,Ce.Fragment=r,Ce.Profiler=a,Ce.PureComponent=O,Ce.StrictMode=o,Ce.Suspense=m,Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,Ce.act=S,Ce.cloneElement=function(P,B,C){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var me=E({},P.props),we=P.key,he=P.ref,Te=P._owner;if(B!=null){if(B.ref!==void 0&&(he=B.ref,Te=D.current),B.key!==void 0&&(we=""+B.key),P.type&&P.type.defaultProps)var Se=P.type.defaultProps;for(Ie in B)le.call(B,Ie)&&!ue.hasOwnProperty(Ie)&&(me[Ie]=B[Ie]===void 0&&Se!==void 0?Se[Ie]:B[Ie])}var Ie=arguments.length-2;if(Ie===1)me.children=C;else if(1<Ie){Se=Array(Ie);for(var He=0;He<Ie;He++)Se[He]=arguments[He+2];me.children=Se}return{$$typeof:t,type:P.type,key:we,ref:he,props:me,_owner:Te}},Ce.createContext=function(P){return P={$$typeof:u,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:c,_context:P},P.Consumer=P},Ce.createElement=ce,Ce.createFactory=function(P){var B=ce.bind(null,P);return B.type=P,B},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(P){return{$$typeof:d,render:P}},Ce.isValidElement=R,Ce.lazy=function(P){return{$$typeof:y,_payload:{_status:-1,_result:P},_init:$}},Ce.memo=function(P,B){return{$$typeof:h,type:P,compare:B===void 0?null:B}},Ce.startTransition=function(P){var B=U.transition;U.transition={};try{P()}finally{U.transition=B}},Ce.unstable_act=S,Ce.useCallback=function(P,B){return se.current.useCallback(P,B)},Ce.useContext=function(P){return se.current.useContext(P)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(P){return se.current.useDeferredValue(P)},Ce.useEffect=function(P,B){return se.current.useEffect(P,B)},Ce.useId=function(){return se.current.useId()},Ce.useImperativeHandle=function(P,B,C){return se.current.useImperativeHandle(P,B,C)},Ce.useInsertionEffect=function(P,B){return se.current.useInsertionEffect(P,B)},Ce.useLayoutEffect=function(P,B){return se.current.useLayoutEffect(P,B)},Ce.useMemo=function(P,B){return se.current.useMemo(P,B)},Ce.useReducer=function(P,B,C){return se.current.useReducer(P,B,C)},Ce.useRef=function(P){return se.current.useRef(P)},Ce.useState=function(P){return se.current.useState(P)},Ce.useSyncExternalStore=function(P,B,C){return se.current.useSyncExternalStore(P,B,C)},Ce.useTransition=function(){return se.current.useTransition()},Ce.version="18.3.1",Ce}var Vf;function Aa(){return Vf||(Vf=1,na.exports=Jm()),na.exports}/**
|
||
* @license React
|
||
* react-jsx-runtime.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Hf;function Zm(){if(Hf)return wi;Hf=1;var t=Aa(),i=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function u(d,m,h){var y,x={},v=null,w=null;h!==void 0&&(v=""+h),m.key!==void 0&&(v=""+m.key),m.ref!==void 0&&(w=m.ref);for(y in m)o.call(m,y)&&!c.hasOwnProperty(y)&&(x[y]=m[y]);if(d&&d.defaultProps)for(y in m=d.defaultProps,m)x[y]===void 0&&(x[y]=m[y]);return{$$typeof:i,type:d,key:v,ref:w,props:x,_owner:a.current}}return wi.Fragment=r,wi.jsx=u,wi.jsxs=u,wi}var Wf;function eg(){return Wf||(Wf=1,ta.exports=Zm()),ta.exports}var g=eg(),ne=Aa();const Ei=lo(ne);var Gl={},ra={exports:{}},xt={},ia={exports:{}},la={};/**
|
||
* @license React
|
||
* scheduler.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var qf;function tg(){return qf||(qf=1,(function(t){function i(U,re){var S=U.length;U.push(re);e:for(;0<S;){var P=S-1>>>1,B=U[P];if(0<a(B,re))U[P]=re,U[S]=B,S=P;else break e}}function r(U){return U.length===0?null:U[0]}function o(U){if(U.length===0)return null;var re=U[0],S=U.pop();if(S!==re){U[0]=S;e:for(var P=0,B=U.length,C=B>>>1;P<C;){var me=2*(P+1)-1,we=U[me],he=me+1,Te=U[he];if(0>a(we,S))he<B&&0>a(Te,we)?(U[P]=Te,U[he]=S,P=he):(U[P]=we,U[me]=S,P=me);else if(he<B&&0>a(Te,S))U[P]=Te,U[he]=S,P=he;else break e}}return re}function a(U,re){var S=U.sortIndex-re.sortIndex;return S!==0?S:U.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var u=Date,d=u.now();t.unstable_now=function(){return u.now()-d}}var m=[],h=[],y=1,x=null,v=3,w=!1,E=!1,L=!1,j=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(U){for(var re=r(h);re!==null;){if(re.callback===null)o(h);else if(re.startTime<=U)o(h),re.sortIndex=re.expirationTime,i(m,re);else break;re=r(h)}}function J(U){if(L=!1,A(U),!E)if(r(m)!==null)E=!0,$(le);else{var re=r(h);re!==null&&se(J,re.startTime-U)}}function le(U,re){E=!1,L&&(L=!1,T(ce),ce=-1),w=!0;var S=v;try{for(A(re),x=r(m);x!==null&&(!(x.expirationTime>re)||U&&!Y());){var P=x.callback;if(typeof P=="function"){x.callback=null,v=x.priorityLevel;var B=P(x.expirationTime<=re);re=t.unstable_now(),typeof B=="function"?x.callback=B:x===r(m)&&o(m),A(re)}else o(m);x=r(m)}if(x!==null)var C=!0;else{var me=r(h);me!==null&&se(J,me.startTime-re),C=!1}return C}finally{x=null,v=S,w=!1}}var D=!1,ue=null,ce=-1,ge=5,R=-1;function Y(){return!(t.unstable_now()-R<ge)}function Z(){if(ue!==null){var U=t.unstable_now();R=U;var re=!0;try{re=ue(!0,U)}finally{re?ve():(D=!1,ue=null)}}else D=!1}var ve;if(typeof O=="function")ve=function(){O(Z)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,G=X.port2;X.port1.onmessage=Z,ve=function(){G.postMessage(null)}}else ve=function(){j(Z,0)};function $(U){ue=U,D||(D=!0,ve())}function se(U,re){ce=j(function(){U(t.unstable_now())},re)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_continueExecution=function(){E||w||(E=!0,$(le))},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ge=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return r(m)},t.unstable_next=function(U){switch(v){case 1:case 2:case 3:var re=3;break;default:re=v}var S=v;v=re;try{return U()}finally{v=S}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(U,re){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var S=v;v=U;try{return re()}finally{v=S}},t.unstable_scheduleCallback=function(U,re,S){var P=t.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?P+S:P):S=P,U){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=S+B,U={id:y++,callback:re,priorityLevel:U,startTime:S,expirationTime:B,sortIndex:-1},S>P?(U.sortIndex=S,i(h,U),r(m)===null&&U===r(h)&&(L?(T(ce),ce=-1):L=!0,se(J,S-P))):(U.sortIndex=B,i(m,U),E||w||(E=!0,$(le))),U},t.unstable_shouldYield=Y,t.unstable_wrapCallback=function(U){var re=v;return function(){var S=v;v=re;try{return U.apply(this,arguments)}finally{v=S}}}})(la)),la}var Qf;function ng(){return Qf||(Qf=1,ia.exports=tg()),ia.exports}/**
|
||
* @license React
|
||
* react-dom.production.min.js
|
||
*
|
||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||
*
|
||
* This source code is licensed under the MIT license found in the
|
||
* LICENSE file in the root directory of this source tree.
|
||
*/var Gf;function rg(){if(Gf)return xt;Gf=1;var t=Aa(),i=ng();function r(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,l=1;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,a={};function c(e,n){u(e,n),u(e+"Capture",n)}function u(e,n){for(a[e]=n,e=0;e<n.length;e++)o.add(n[e])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,h=/^[: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]*$/,y={},x={};function v(e){return m.call(x,e)?!0:m.call(y,e)?!1:h.test(e)?x[e]=!0:(y[e]=!0,!1)}function w(e,n,l,s){if(l!==null&&l.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return s?!1:l!==null?!l.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function E(e,n,l,s){if(n===null||typeof n>"u"||w(e,n,l,s))return!0;if(s)return!1;if(l!==null)switch(l.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function L(e,n,l,s,f,p,k){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=s,this.attributeNamespace=f,this.mustUseProperty=l,this.propertyName=e,this.type=n,this.sanitizeURL=p,this.removeEmptyString=k}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){j[e]=new L(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];j[n]=new L(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){j[e]=new L(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){j[e]=new L(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){j[e]=new L(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){j[e]=new L(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){j[e]=new L(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){j[e]=new L(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){j[e]=new L(e,5,!1,e.toLowerCase(),null,!1,!1)});var T=/[\-:]([a-z])/g;function O(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(T,O);j[n]=new L(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(T,O);j[n]=new L(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(T,O);j[n]=new L(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){j[e]=new L(e,1,!1,e.toLowerCase(),null,!1,!1)}),j.xlinkHref=new L("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){j[e]=new L(e,1,!1,e.toLowerCase(),null,!0,!0)});function A(e,n,l,s){var f=j.hasOwnProperty(n)?j[n]:null;(f!==null?f.type!==0:s||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(E(n,l,f,s)&&(l=null),s||f===null?v(n)&&(l===null?e.removeAttribute(n):e.setAttribute(n,""+l)):f.mustUseProperty?e[f.propertyName]=l===null?f.type===3?!1:"":l:(n=f.attributeName,s=f.attributeNamespace,l===null?e.removeAttribute(n):(f=f.type,l=f===3||f===4&&l===!0?"":""+l,s?e.setAttributeNS(s,n,l):e.setAttribute(n,l))))}var J=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,le=Symbol.for("react.element"),D=Symbol.for("react.portal"),ue=Symbol.for("react.fragment"),ce=Symbol.for("react.strict_mode"),ge=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),Y=Symbol.for("react.context"),Z=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),U=Symbol.iterator;function re(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var S=Object.assign,P;function B(e){if(P===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);P=n&&n[1]||""}return`
|
||
`+P+e}var C=!1;function me(e,n){if(!e||C)return"";C=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(M){var s=M}Reflect.construct(e,[],n)}else{try{n.call()}catch(M){s=M}e.call(n.prototype)}else{try{throw Error()}catch(M){s=M}e()}}catch(M){if(M&&s&&typeof M.stack=="string"){for(var f=M.stack.split(`
|
||
`),p=s.stack.split(`
|
||
`),k=f.length-1,b=p.length-1;1<=k&&0<=b&&f[k]!==p[b];)b--;for(;1<=k&&0<=b;k--,b--)if(f[k]!==p[b]){if(k!==1||b!==1)do if(k--,b--,0>b||f[k]!==p[b]){var N=`
|
||
`+f[k].replace(" at new "," at ");return e.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",e.displayName)),N}while(1<=k&&0<=b);break}}}finally{C=!1,Error.prepareStackTrace=l}return(e=e?e.displayName||e.name:"")?B(e):""}function we(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return""}}function he(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ue:return"Fragment";case D:return"Portal";case ge:return"Profiler";case ce:return"StrictMode";case ve:return"Suspense";case X:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Y:return(e.displayName||"Context")+".Consumer";case R:return(e._context.displayName||"Context")+".Provider";case Z:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return n=e.displayName||null,n!==null?n:he(e.type)||"Memo";case $:n=e._payload,e=e._init;try{return he(e(n))}catch{}}return null}function Te(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return he(n);case 8:return n===ce?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Se(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ie(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function He(e){var n=Ie(e)?"checked":"value",l=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),s=""+e[n];if(!e.hasOwnProperty(n)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var f=l.get,p=l.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(k){s=""+k,p.call(this,k)}}),Object.defineProperty(e,n,{enumerable:l.enumerable}),{getValue:function(){return s},setValue:function(k){s=""+k},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Jt(e){e._valueTracker||(e._valueTracker=He(e))}function Di(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),s="";return e&&(s=Ie(e)?e.checked?"true":"false":e.value),e=s,e!==l?(n.setValue(e),!0):!1}function rr(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 Mr(e,n){var l=n.checked;return S({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l??e._wrapperState.initialChecked})}function Dr(e,n){var l=n.defaultValue==null?"":n.defaultValue,s=n.checked!=null?n.checked:n.defaultChecked;l=Se(n.value!=null?n.value:l),e._wrapperState={initialChecked:s,initialValue:l,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Ar(e,n){n=n.checked,n!=null&&A(e,"checked",n,!1)}function ir(e,n){Ar(e,n);var l=Se(n.value),s=n.type;if(l!=null)s==="number"?(l===0&&e.value===""||e.value!=l)&&(e.value=""+l):e.value!==""+l&&(e.value=""+l);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?lr(e,n.type,l):n.hasOwnProperty("defaultValue")&&lr(e,n.type,Se(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Ai(e,n,l){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var s=n.type;if(!(s!=="submit"&&s!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,l||n===e.value||(e.value=n),e.defaultValue=n}l=e.name,l!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,l!==""&&(e.name=l)}function lr(e,n,l){(n!=="number"||rr(e.ownerDocument)!==e)&&(l==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+l&&(e.defaultValue=""+l))}var fn=Array.isArray;function dn(e,n,l,s){if(e=e.options,n){n={};for(var f=0;f<l.length;f++)n["$"+l[f]]=!0;for(l=0;l<e.length;l++)f=n.hasOwnProperty("$"+e[l].value),e[l].selected!==f&&(e[l].selected=f),f&&s&&(e[l].defaultSelected=!0)}else{for(l=""+Se(l),n=null,f=0;f<e.length;f++){if(e[f].value===l){e[f].selected=!0,s&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function Or(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(r(91));return S({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Oi(e,n){var l=n.value;if(l==null){if(l=n.children,n=n.defaultValue,l!=null){if(n!=null)throw Error(r(92));if(fn(l)){if(1<l.length)throw Error(r(93));l=l[0]}n=l}n==null&&(n=""),l=n}e._wrapperState={initialValue:Se(l)}}function Fi(e,n){var l=Se(n.value),s=Se(n.defaultValue);l!=null&&(l=""+l,l!==e.value&&(e.value=l),n.defaultValue==null&&e.defaultValue!==l&&(e.defaultValue=l)),s!=null&&(e.defaultValue=""+s)}function $i(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function F(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function K(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?F(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xe,be=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,l,s,f){MSApp.execUnsafeLocalFunction(function(){return e(n,l,s,f)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(xe=xe||document.createElement("div"),xe.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=xe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Ne(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var Ze={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Zt=["Webkit","ms","Moz","O"];Object.keys(Ze).forEach(function(e){Zt.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Ze[n]=Ze[e]})});function _t(e,n,l){return n==null||typeof n=="boolean"||n===""?"":l||typeof n!="number"||n===0||Ze.hasOwnProperty(e)&&Ze[e]?(""+n).trim():n+"px"}function pn(e,n){e=e.style;for(var l in n)if(n.hasOwnProperty(l)){var s=l.indexOf("--")===0,f=_t(l,n[l],s);l==="float"&&(l="cssFloat"),s?e.setProperty(l,f):e[l]=f}}var An=S({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function et(e,n){if(n){if(An[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(r(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(r(61))}if(n.style!=null&&typeof n.style!="object")throw Error(r(62))}}function Ht(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";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 kt=null;function go(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xo=null,or=null,sr=null;function iu(e){if(e=oi(e)){if(typeof xo!="function")throw Error(r(280));var n=e.stateNode;n&&(n=ul(n),xo(e.stateNode,e.type,n))}}function lu(e){or?sr?sr.push(e):sr=[e]:or=e}function ou(){if(or){var e=or,n=sr;if(sr=or=null,iu(e),n)for(e=0;e<n.length;e++)iu(n[e])}}function su(e,n){return e(n)}function au(){}var yo=!1;function uu(e,n,l){if(yo)return e(n,l);yo=!0;try{return su(e,n,l)}finally{yo=!1,(or!==null||sr!==null)&&(au(),ou())}}function Fr(e,n){var l=e.stateNode;if(l===null)return null;var s=ul(l);if(s===null)return null;l=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(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(l&&typeof l!="function")throw Error(r(231,n,typeof l));return l}var vo=!1;if(d)try{var $r={};Object.defineProperty($r,"passive",{get:function(){vo=!0}}),window.addEventListener("test",$r,$r),window.removeEventListener("test",$r,$r)}catch{vo=!1}function ih(e,n,l,s,f,p,k,b,N){var M=Array.prototype.slice.call(arguments,3);try{n.apply(l,M)}catch(H){this.onError(H)}}var Br=!1,Bi=null,Ui=!1,ko=null,lh={onError:function(e){Br=!0,Bi=e}};function oh(e,n,l,s,f,p,k,b,N){Br=!1,Bi=null,ih.apply(lh,arguments)}function sh(e,n,l,s,f,p,k,b,N){if(oh.apply(this,arguments),Br){if(Br){var M=Bi;Br=!1,Bi=null}else throw Error(r(198));Ui||(Ui=!0,ko=M)}}function On(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function cu(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function fu(e){if(On(e)!==e)throw Error(r(188))}function ah(e){var n=e.alternate;if(!n){if(n=On(e),n===null)throw Error(r(188));return n!==e?null:e}for(var l=e,s=n;;){var f=l.return;if(f===null)break;var p=f.alternate;if(p===null){if(s=f.return,s!==null){l=s;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===l)return fu(f),e;if(p===s)return fu(f),n;p=p.sibling}throw Error(r(188))}if(l.return!==s.return)l=f,s=p;else{for(var k=!1,b=f.child;b;){if(b===l){k=!0,l=f,s=p;break}if(b===s){k=!0,s=f,l=p;break}b=b.sibling}if(!k){for(b=p.child;b;){if(b===l){k=!0,l=p,s=f;break}if(b===s){k=!0,s=p,l=f;break}b=b.sibling}if(!k)throw Error(r(189))}}if(l.alternate!==s)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:n}function du(e){return e=ah(e),e!==null?pu(e):null}function pu(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=pu(e);if(n!==null)return n;e=e.sibling}return null}var hu=i.unstable_scheduleCallback,mu=i.unstable_cancelCallback,uh=i.unstable_shouldYield,ch=i.unstable_requestPaint,Ue=i.unstable_now,fh=i.unstable_getCurrentPriorityLevel,wo=i.unstable_ImmediatePriority,gu=i.unstable_UserBlockingPriority,Vi=i.unstable_NormalPriority,dh=i.unstable_LowPriority,xu=i.unstable_IdlePriority,Hi=null,Wt=null;function ph(e){if(Wt&&typeof Wt.onCommitFiberRoot=="function")try{Wt.onCommitFiberRoot(Hi,e,void 0,(e.current.flags&128)===128)}catch{}}var Dt=Math.clz32?Math.clz32:gh,hh=Math.log,mh=Math.LN2;function gh(e){return e>>>=0,e===0?32:31-(hh(e)/mh|0)|0}var Wi=64,qi=4194304;function Ur(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Qi(e,n){var l=e.pendingLanes;if(l===0)return 0;var s=0,f=e.suspendedLanes,p=e.pingedLanes,k=l&268435455;if(k!==0){var b=k&~f;b!==0?s=Ur(b):(p&=k,p!==0&&(s=Ur(p)))}else k=l&~f,k!==0?s=Ur(k):p!==0&&(s=Ur(p));if(s===0)return 0;if(n!==0&&n!==s&&(n&f)===0&&(f=s&-s,p=n&-n,f>=p||f===16&&(p&4194240)!==0))return n;if((s&4)!==0&&(s|=l&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=s;0<n;)l=31-Dt(n),f=1<<l,s|=e[l],n&=~f;return s}function xh(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yh(e,n){for(var l=e.suspendedLanes,s=e.pingedLanes,f=e.expirationTimes,p=e.pendingLanes;0<p;){var k=31-Dt(p),b=1<<k,N=f[k];N===-1?((b&l)===0||(b&s)!==0)&&(f[k]=xh(b,n)):N<=n&&(e.expiredLanes|=b),p&=~b}}function So(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yu(){var e=Wi;return Wi<<=1,(Wi&4194240)===0&&(Wi=64),e}function bo(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function Vr(e,n,l){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Dt(n),e[n]=l}function vh(e,n){var l=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0<l;){var f=31-Dt(l),p=1<<f;n[f]=0,s[f]=-1,e[f]=-1,l&=~p}}function Co(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var s=31-Dt(l),f=1<<s;f&n|e[s]&n&&(e[s]|=n),l&=~f}}var ze=0;function vu(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var ku,jo,wu,Su,bu,Eo=!1,Gi=[],hn=null,mn=null,gn=null,Hr=new Map,Wr=new Map,xn=[],kh="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 submit".split(" ");function Cu(e,n){switch(e){case"focusin":case"focusout":hn=null;break;case"dragenter":case"dragleave":mn=null;break;case"mouseover":case"mouseout":gn=null;break;case"pointerover":case"pointerout":Hr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wr.delete(n.pointerId)}}function qr(e,n,l,s,f,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:l,eventSystemFlags:s,nativeEvent:p,targetContainers:[f]},n!==null&&(n=oi(n),n!==null&&jo(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function wh(e,n,l,s,f){switch(n){case"focusin":return hn=qr(hn,e,n,l,s,f),!0;case"dragenter":return mn=qr(mn,e,n,l,s,f),!0;case"mouseover":return gn=qr(gn,e,n,l,s,f),!0;case"pointerover":var p=f.pointerId;return Hr.set(p,qr(Hr.get(p)||null,e,n,l,s,f)),!0;case"gotpointercapture":return p=f.pointerId,Wr.set(p,qr(Wr.get(p)||null,e,n,l,s,f)),!0}return!1}function ju(e){var n=Fn(e.target);if(n!==null){var l=On(n);if(l!==null){if(n=l.tag,n===13){if(n=cu(l),n!==null){e.blockedOn=n,bu(e.priority,function(){wu(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ki(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=_o(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(l===null){l=e.nativeEvent;var s=new l.constructor(l.type,l);kt=s,l.target.dispatchEvent(s),kt=null}else return n=oi(l),n!==null&&jo(n),e.blockedOn=l,!1;n.shift()}return!0}function Eu(e,n,l){Ki(e)&&l.delete(n)}function Sh(){Eo=!1,hn!==null&&Ki(hn)&&(hn=null),mn!==null&&Ki(mn)&&(mn=null),gn!==null&&Ki(gn)&&(gn=null),Hr.forEach(Eu),Wr.forEach(Eu)}function Qr(e,n){e.blockedOn===n&&(e.blockedOn=null,Eo||(Eo=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Sh)))}function Gr(e){function n(f){return Qr(f,e)}if(0<Gi.length){Qr(Gi[0],e);for(var l=1;l<Gi.length;l++){var s=Gi[l];s.blockedOn===e&&(s.blockedOn=null)}}for(hn!==null&&Qr(hn,e),mn!==null&&Qr(mn,e),gn!==null&&Qr(gn,e),Hr.forEach(n),Wr.forEach(n),l=0;l<xn.length;l++)s=xn[l],s.blockedOn===e&&(s.blockedOn=null);for(;0<xn.length&&(l=xn[0],l.blockedOn===null);)ju(l),l.blockedOn===null&&xn.shift()}var ar=J.ReactCurrentBatchConfig,Yi=!0;function bh(e,n,l,s){var f=ze,p=ar.transition;ar.transition=null;try{ze=1,No(e,n,l,s)}finally{ze=f,ar.transition=p}}function Ch(e,n,l,s){var f=ze,p=ar.transition;ar.transition=null;try{ze=4,No(e,n,l,s)}finally{ze=f,ar.transition=p}}function No(e,n,l,s){if(Yi){var f=_o(e,n,l,s);if(f===null)Wo(e,n,s,Xi,l),Cu(e,s);else if(wh(f,e,n,l,s))s.stopPropagation();else if(Cu(e,s),n&4&&-1<kh.indexOf(e)){for(;f!==null;){var p=oi(f);if(p!==null&&ku(p),p=_o(e,n,l,s),p===null&&Wo(e,n,s,Xi,l),p===f)break;f=p}f!==null&&s.stopPropagation()}else Wo(e,n,s,null,l)}}var Xi=null;function _o(e,n,l,s){if(Xi=null,e=go(s),e=Fn(e),e!==null)if(n=On(e),n===null)e=null;else if(l=n.tag,l===13){if(e=cu(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Xi=e,null}function Nu(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(fh()){case wo:return 1;case gu:return 4;case Vi:case dh:return 16;case xu:return 536870912;default:return 16}default:return 16}}var yn=null,To=null,Ji=null;function _u(){if(Ji)return Ji;var e,n=To,l=n.length,s,f="value"in yn?yn.value:yn.textContent,p=f.length;for(e=0;e<l&&n[e]===f[e];e++);var k=l-e;for(s=1;s<=k&&n[l-s]===f[p-s];s++);return Ji=f.slice(e,1<s?1-s:void 0)}function Zi(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function el(){return!0}function Tu(){return!1}function wt(e){function n(l,s,f,p,k){this._reactName=l,this._targetInst=f,this.type=s,this.nativeEvent=p,this.target=k,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(l=e[b],this[b]=l?l(p):p[b]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?el:Tu,this.isPropagationStopped=Tu,this}return S(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=el)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=el)},persist:function(){},isPersistent:el}),n}var ur={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Po=wt(ur),Kr=S({},ur,{view:0,detail:0}),jh=wt(Kr),Io,zo,Yr,tl=S({},Kr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ro,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!==Yr&&(Yr&&e.type==="mousemove"?(Io=e.screenX-Yr.screenX,zo=e.screenY-Yr.screenY):zo=Io=0,Yr=e),Io)},movementY:function(e){return"movementY"in e?e.movementY:zo}}),Pu=wt(tl),Eh=S({},tl,{dataTransfer:0}),Nh=wt(Eh),_h=S({},Kr,{relatedTarget:0}),Lo=wt(_h),Th=S({},ur,{animationName:0,elapsedTime:0,pseudoElement:0}),Ph=wt(Th),Ih=S({},ur,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zh=wt(Ih),Lh=S({},ur,{data:0}),Iu=wt(Lh),Rh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mh={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"},Dh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ah(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Dh[e])?!!n[e]:!1}function Ro(){return Ah}var Oh=S({},Kr,{key:function(e){if(e.key){var n=Rh[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Zi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Mh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ro,charCode:function(e){return e.type==="keypress"?Zi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Zi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Fh=wt(Oh),$h=S({},tl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zu=wt($h),Bh=S({},Kr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ro}),Uh=wt(Bh),Vh=S({},ur,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hh=wt(Vh),Wh=S({},tl,{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}),qh=wt(Wh),Qh=[9,13,27,32],Mo=d&&"CompositionEvent"in window,Xr=null;d&&"documentMode"in document&&(Xr=document.documentMode);var Gh=d&&"TextEvent"in window&&!Xr,Lu=d&&(!Mo||Xr&&8<Xr&&11>=Xr),Ru=" ",Mu=!1;function Du(e,n){switch(e){case"keyup":return Qh.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Au(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cr=!1;function Kh(e,n){switch(e){case"compositionend":return Au(n);case"keypress":return n.which!==32?null:(Mu=!0,Ru);case"textInput":return e=n.data,e===Ru&&Mu?null:e;default:return null}}function Yh(e,n){if(cr)return e==="compositionend"||!Mo&&Du(e,n)?(e=_u(),Ji=To=yn=null,cr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Lu&&n.locale!=="ko"?null:n.data;default:return null}}var Xh={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 Ou(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Xh[e.type]:n==="textarea"}function Fu(e,n,l,s){lu(s),n=ol(n,"onChange"),0<n.length&&(l=new Po("onChange","change",null,l,s),e.push({event:l,listeners:n}))}var Jr=null,Zr=null;function Jh(e){rc(e,0)}function nl(e){var n=mr(e);if(Di(n))return e}function Zh(e,n){if(e==="change")return n}var $u=!1;if(d){var Do;if(d){var Ao="oninput"in document;if(!Ao){var Bu=document.createElement("div");Bu.setAttribute("oninput","return;"),Ao=typeof Bu.oninput=="function"}Do=Ao}else Do=!1;$u=Do&&(!document.documentMode||9<document.documentMode)}function Uu(){Jr&&(Jr.detachEvent("onpropertychange",Vu),Zr=Jr=null)}function Vu(e){if(e.propertyName==="value"&&nl(Zr)){var n=[];Fu(n,Zr,e,go(e)),uu(Jh,n)}}function em(e,n,l){e==="focusin"?(Uu(),Jr=n,Zr=l,Jr.attachEvent("onpropertychange",Vu)):e==="focusout"&&Uu()}function tm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return nl(Zr)}function nm(e,n){if(e==="click")return nl(n)}function rm(e,n){if(e==="input"||e==="change")return nl(n)}function im(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var At=typeof Object.is=="function"?Object.is:im;function ei(e,n){if(At(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),s=Object.keys(n);if(l.length!==s.length)return!1;for(s=0;s<l.length;s++){var f=l[s];if(!m.call(n,f)||!At(e[f],n[f]))return!1}return!0}function Hu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wu(e,n){var l=Hu(e);e=0;for(var s;l;){if(l.nodeType===3){if(s=e+l.textContent.length,e<=n&&s>=n)return{node:l,offset:n-e};e=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Hu(l)}}function qu(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?qu(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Qu(){for(var e=window,n=rr();n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=rr(e.document)}return n}function Oo(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function lm(e){var n=Qu(),l=e.focusedElem,s=e.selectionRange;if(n!==l&&l&&l.ownerDocument&&qu(l.ownerDocument.documentElement,l)){if(s!==null&&Oo(l)){if(n=s.start,e=s.end,e===void 0&&(e=n),"selectionStart"in l)l.selectionStart=n,l.selectionEnd=Math.min(e,l.value.length);else if(e=(n=l.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var f=l.textContent.length,p=Math.min(s.start,f);s=s.end===void 0?p:Math.min(s.end,f),!e.extend&&p>s&&(f=s,s=p,p=f),f=Wu(l,p);var k=Wu(l,s);f&&k&&(e.rangeCount!==1||e.anchorNode!==f.node||e.anchorOffset!==f.offset||e.focusNode!==k.node||e.focusOffset!==k.offset)&&(n=n.createRange(),n.setStart(f.node,f.offset),e.removeAllRanges(),p>s?(e.addRange(n),e.extend(k.node,k.offset)):(n.setEnd(k.node,k.offset),e.addRange(n)))}}for(n=[],e=l;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<n.length;l++)e=n[l],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var om=d&&"documentMode"in document&&11>=document.documentMode,fr=null,Fo=null,ti=null,$o=!1;function Gu(e,n,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;$o||fr==null||fr!==rr(s)||(s=fr,"selectionStart"in s&&Oo(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}),ti&&ei(ti,s)||(ti=s,s=ol(Fo,"onSelect"),0<s.length&&(n=new Po("onSelect","select",null,n,l),e.push({event:n,listeners:s}),n.target=fr)))}function rl(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var dr={animationend:rl("Animation","AnimationEnd"),animationiteration:rl("Animation","AnimationIteration"),animationstart:rl("Animation","AnimationStart"),transitionend:rl("Transition","TransitionEnd")},Bo={},Ku={};d&&(Ku=document.createElement("div").style,"AnimationEvent"in window||(delete dr.animationend.animation,delete dr.animationiteration.animation,delete dr.animationstart.animation),"TransitionEvent"in window||delete dr.transitionend.transition);function il(e){if(Bo[e])return Bo[e];if(!dr[e])return e;var n=dr[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in Ku)return Bo[e]=n[l];return e}var Yu=il("animationend"),Xu=il("animationiteration"),Ju=il("animationstart"),Zu=il("transitionend"),ec=new Map,tc="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function vn(e,n){ec.set(e,n),c(n,[e])}for(var Uo=0;Uo<tc.length;Uo++){var Vo=tc[Uo],sm=Vo.toLowerCase(),am=Vo[0].toUpperCase()+Vo.slice(1);vn(sm,"on"+am)}vn(Yu,"onAnimationEnd"),vn(Xu,"onAnimationIteration"),vn(Ju,"onAnimationStart"),vn("dblclick","onDoubleClick"),vn("focusin","onFocus"),vn("focusout","onBlur"),vn(Zu,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ni="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(" "),um=new Set("cancel close invalid load scroll toggle".split(" ").concat(ni));function nc(e,n,l){var s=e.type||"unknown-event";e.currentTarget=l,sh(s,n,void 0,e),e.currentTarget=null}function rc(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var s=e[l],f=s.event;s=s.listeners;e:{var p=void 0;if(n)for(var k=s.length-1;0<=k;k--){var b=s[k],N=b.instance,M=b.currentTarget;if(b=b.listener,N!==p&&f.isPropagationStopped())break e;nc(f,b,M),p=N}else for(k=0;k<s.length;k++){if(b=s[k],N=b.instance,M=b.currentTarget,b=b.listener,N!==p&&f.isPropagationStopped())break e;nc(f,b,M),p=N}}}if(Ui)throw e=ko,Ui=!1,ko=null,e}function De(e,n){var l=n[Xo];l===void 0&&(l=n[Xo]=new Set);var s=e+"__bubble";l.has(s)||(ic(n,e,2,!1),l.add(s))}function Ho(e,n,l){var s=0;n&&(s|=4),ic(l,e,s,n)}var ll="_reactListening"+Math.random().toString(36).slice(2);function ri(e){if(!e[ll]){e[ll]=!0,o.forEach(function(l){l!=="selectionchange"&&(um.has(l)||Ho(l,!1,e),Ho(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ll]||(n[ll]=!0,Ho("selectionchange",!1,n))}}function ic(e,n,l,s){switch(Nu(n)){case 1:var f=bh;break;case 4:f=Ch;break;default:f=No}l=f.bind(null,n,l,e),f=void 0,!vo||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),s?f!==void 0?e.addEventListener(n,l,{capture:!0,passive:f}):e.addEventListener(n,l,!0):f!==void 0?e.addEventListener(n,l,{passive:f}):e.addEventListener(n,l,!1)}function Wo(e,n,l,s,f){var p=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var k=s.tag;if(k===3||k===4){var b=s.stateNode.containerInfo;if(b===f||b.nodeType===8&&b.parentNode===f)break;if(k===4)for(k=s.return;k!==null;){var N=k.tag;if((N===3||N===4)&&(N=k.stateNode.containerInfo,N===f||N.nodeType===8&&N.parentNode===f))return;k=k.return}for(;b!==null;){if(k=Fn(b),k===null)return;if(N=k.tag,N===5||N===6){s=p=k;continue e}b=b.parentNode}}s=s.return}uu(function(){var M=p,H=go(l),W=[];e:{var V=ec.get(e);if(V!==void 0){var ee=Po,ie=e;switch(e){case"keypress":if(Zi(l)===0)break e;case"keydown":case"keyup":ee=Fh;break;case"focusin":ie="focus",ee=Lo;break;case"focusout":ie="blur",ee=Lo;break;case"beforeblur":case"afterblur":ee=Lo;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=Pu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=Nh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=Uh;break;case Yu:case Xu:case Ju:ee=Ph;break;case Zu:ee=Hh;break;case"scroll":ee=jh;break;case"wheel":ee=qh;break;case"copy":case"cut":case"paste":ee=zh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=zu}var oe=(n&4)!==0,Ve=!oe&&e==="scroll",I=oe?V!==null?V+"Capture":null:V;oe=[];for(var _=M,z;_!==null;){z=_;var Q=z.stateNode;if(z.tag===5&&Q!==null&&(z=Q,I!==null&&(Q=Fr(_,I),Q!=null&&oe.push(ii(_,Q,z)))),Ve)break;_=_.return}0<oe.length&&(V=new ee(V,ie,null,l,H),W.push({event:V,listeners:oe}))}}if((n&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",ee=e==="mouseout"||e==="pointerout",V&&l!==kt&&(ie=l.relatedTarget||l.fromElement)&&(Fn(ie)||ie[en]))break e;if((ee||V)&&(V=H.window===H?H:(V=H.ownerDocument)?V.defaultView||V.parentWindow:window,ee?(ie=l.relatedTarget||l.toElement,ee=M,ie=ie?Fn(ie):null,ie!==null&&(Ve=On(ie),ie!==Ve||ie.tag!==5&&ie.tag!==6)&&(ie=null)):(ee=null,ie=M),ee!==ie)){if(oe=Pu,Q="onMouseLeave",I="onMouseEnter",_="mouse",(e==="pointerout"||e==="pointerover")&&(oe=zu,Q="onPointerLeave",I="onPointerEnter",_="pointer"),Ve=ee==null?V:mr(ee),z=ie==null?V:mr(ie),V=new oe(Q,_+"leave",ee,l,H),V.target=Ve,V.relatedTarget=z,Q=null,Fn(H)===M&&(oe=new oe(I,_+"enter",ie,l,H),oe.target=z,oe.relatedTarget=Ve,Q=oe),Ve=Q,ee&&ie)t:{for(oe=ee,I=ie,_=0,z=oe;z;z=pr(z))_++;for(z=0,Q=I;Q;Q=pr(Q))z++;for(;0<_-z;)oe=pr(oe),_--;for(;0<z-_;)I=pr(I),z--;for(;_--;){if(oe===I||I!==null&&oe===I.alternate)break t;oe=pr(oe),I=pr(I)}oe=null}else oe=null;ee!==null&&lc(W,V,ee,oe,!1),ie!==null&&Ve!==null&&lc(W,Ve,ie,oe,!0)}}e:{if(V=M?mr(M):window,ee=V.nodeName&&V.nodeName.toLowerCase(),ee==="select"||ee==="input"&&V.type==="file")var ae=Zh;else if(Ou(V))if($u)ae=rm;else{ae=tm;var fe=em}else(ee=V.nodeName)&&ee.toLowerCase()==="input"&&(V.type==="checkbox"||V.type==="radio")&&(ae=nm);if(ae&&(ae=ae(e,M))){Fu(W,ae,l,H);break e}fe&&fe(e,V,M),e==="focusout"&&(fe=V._wrapperState)&&fe.controlled&&V.type==="number"&&lr(V,"number",V.value)}switch(fe=M?mr(M):window,e){case"focusin":(Ou(fe)||fe.contentEditable==="true")&&(fr=fe,Fo=M,ti=null);break;case"focusout":ti=Fo=fr=null;break;case"mousedown":$o=!0;break;case"contextmenu":case"mouseup":case"dragend":$o=!1,Gu(W,l,H);break;case"selectionchange":if(om)break;case"keydown":case"keyup":Gu(W,l,H)}var de;if(Mo)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else cr?Du(e,l)&&(ye="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ye="onCompositionStart");ye&&(Lu&&l.locale!=="ko"&&(cr||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&cr&&(de=_u()):(yn=H,To="value"in yn?yn.value:yn.textContent,cr=!0)),fe=ol(M,ye),0<fe.length&&(ye=new Iu(ye,e,null,l,H),W.push({event:ye,listeners:fe}),de?ye.data=de:(de=Au(l),de!==null&&(ye.data=de)))),(de=Gh?Kh(e,l):Yh(e,l))&&(M=ol(M,"onBeforeInput"),0<M.length&&(H=new Iu("onBeforeInput","beforeinput",null,l,H),W.push({event:H,listeners:M}),H.data=de))}rc(W,n)})}function ii(e,n,l){return{instance:e,listener:n,currentTarget:l}}function ol(e,n){for(var l=n+"Capture",s=[];e!==null;){var f=e,p=f.stateNode;f.tag===5&&p!==null&&(f=p,p=Fr(e,l),p!=null&&s.unshift(ii(e,p,f)),p=Fr(e,n),p!=null&&s.push(ii(e,p,f))),e=e.return}return s}function pr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function lc(e,n,l,s,f){for(var p=n._reactName,k=[];l!==null&&l!==s;){var b=l,N=b.alternate,M=b.stateNode;if(N!==null&&N===s)break;b.tag===5&&M!==null&&(b=M,f?(N=Fr(l,p),N!=null&&k.unshift(ii(l,N,b))):f||(N=Fr(l,p),N!=null&&k.push(ii(l,N,b)))),l=l.return}k.length!==0&&e.push({event:n,listeners:k})}var cm=/\r\n?/g,fm=/\u0000|\uFFFD/g;function oc(e){return(typeof e=="string"?e:""+e).replace(cm,`
|
||
`).replace(fm,"")}function sl(e,n,l){if(n=oc(n),oc(e)!==n&&l)throw Error(r(425))}function al(){}var qo=null,Qo=null;function Go(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Ko=typeof setTimeout=="function"?setTimeout:void 0,dm=typeof clearTimeout=="function"?clearTimeout:void 0,sc=typeof Promise=="function"?Promise:void 0,pm=typeof queueMicrotask=="function"?queueMicrotask:typeof sc<"u"?function(e){return sc.resolve(null).then(e).catch(hm)}:Ko;function hm(e){setTimeout(function(){throw e})}function Yo(e,n){var l=n,s=0;do{var f=l.nextSibling;if(e.removeChild(l),f&&f.nodeType===8)if(l=f.data,l==="/$"){if(s===0){e.removeChild(f),Gr(n);return}s--}else l!=="$"&&l!=="$?"&&l!=="$!"||s++;l=f}while(l);Gr(n)}function kn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function ac(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"){if(n===0)return e;n--}else l==="/$"&&n++}e=e.previousSibling}return null}var hr=Math.random().toString(36).slice(2),qt="__reactFiber$"+hr,li="__reactProps$"+hr,en="__reactContainer$"+hr,Xo="__reactEvents$"+hr,mm="__reactListeners$"+hr,gm="__reactHandles$"+hr;function Fn(e){var n=e[qt];if(n)return n;for(var l=e.parentNode;l;){if(n=l[en]||l[qt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=ac(e);e!==null;){if(l=e[qt])return l;e=ac(e)}return n}e=l,l=e.parentNode}return null}function oi(e){return e=e[qt]||e[en],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function mr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function ul(e){return e[li]||null}var Jo=[],gr=-1;function wn(e){return{current:e}}function Ae(e){0>gr||(e.current=Jo[gr],Jo[gr]=null,gr--)}function Me(e,n){gr++,Jo[gr]=e.current,e.current=n}var Sn={},rt=wn(Sn),dt=wn(!1),$n=Sn;function xr(e,n){var l=e.type.contextTypes;if(!l)return Sn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===n)return s.__reactInternalMemoizedMaskedChildContext;var f={},p;for(p in l)f[p]=n[p];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=f),f}function pt(e){return e=e.childContextTypes,e!=null}function cl(){Ae(dt),Ae(rt)}function uc(e,n,l){if(rt.current!==Sn)throw Error(r(168));Me(rt,n),Me(dt,l)}function cc(e,n,l){var s=e.stateNode;if(n=n.childContextTypes,typeof s.getChildContext!="function")return l;s=s.getChildContext();for(var f in s)if(!(f in n))throw Error(r(108,Te(e)||"Unknown",f));return S({},l,s)}function fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sn,$n=rt.current,Me(rt,e),Me(dt,dt.current),!0}function fc(e,n,l){var s=e.stateNode;if(!s)throw Error(r(169));l?(e=cc(e,n,$n),s.__reactInternalMemoizedMergedChildContext=e,Ae(dt),Ae(rt),Me(rt,e)):Ae(dt),Me(dt,l)}var tn=null,dl=!1,Zo=!1;function dc(e){tn===null?tn=[e]:tn.push(e)}function xm(e){dl=!0,dc(e)}function bn(){if(!Zo&&tn!==null){Zo=!0;var e=0,n=ze;try{var l=tn;for(ze=1;e<l.length;e++){var s=l[e];do s=s(!0);while(s!==null)}tn=null,dl=!1}catch(f){throw tn!==null&&(tn=tn.slice(e+1)),hu(wo,bn),f}finally{ze=n,Zo=!1}}return null}var yr=[],vr=0,pl=null,hl=0,Tt=[],Pt=0,Bn=null,nn=1,rn="";function Un(e,n){yr[vr++]=hl,yr[vr++]=pl,pl=e,hl=n}function pc(e,n,l){Tt[Pt++]=nn,Tt[Pt++]=rn,Tt[Pt++]=Bn,Bn=e;var s=nn;e=rn;var f=32-Dt(s)-1;s&=~(1<<f),l+=1;var p=32-Dt(n)+f;if(30<p){var k=f-f%5;p=(s&(1<<k)-1).toString(32),s>>=k,f-=k,nn=1<<32-Dt(n)+f|l<<f|s,rn=p+e}else nn=1<<p|l<<f|s,rn=e}function es(e){e.return!==null&&(Un(e,1),pc(e,1,0))}function ts(e){for(;e===pl;)pl=yr[--vr],yr[vr]=null,hl=yr[--vr],yr[vr]=null;for(;e===Bn;)Bn=Tt[--Pt],Tt[Pt]=null,rn=Tt[--Pt],Tt[Pt]=null,nn=Tt[--Pt],Tt[Pt]=null}var St=null,bt=null,Oe=!1,Ot=null;function hc(e,n){var l=Rt(5,null,null,0);l.elementType="DELETED",l.stateNode=n,l.return=e,n=e.deletions,n===null?(e.deletions=[l],e.flags|=16):n.push(l)}function mc(e,n){switch(e.tag){case 5:var l=e.type;return n=n.nodeType!==1||l.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,St=e,bt=kn(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,St=e,bt=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(l=Bn!==null?{id:nn,overflow:rn}:null,e.memoizedState={dehydrated:n,treeContext:l,retryLane:1073741824},l=Rt(18,null,null,0),l.stateNode=n,l.return=e,e.child=l,St=e,bt=null,!0):!1;default:return!1}}function ns(e){return(e.mode&1)!==0&&(e.flags&128)===0}function rs(e){if(Oe){var n=bt;if(n){var l=n;if(!mc(e,n)){if(ns(e))throw Error(r(418));n=kn(l.nextSibling);var s=St;n&&mc(e,n)?hc(s,l):(e.flags=e.flags&-4097|2,Oe=!1,St=e)}}else{if(ns(e))throw Error(r(418));e.flags=e.flags&-4097|2,Oe=!1,St=e}}}function gc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;St=e}function ml(e){if(e!==St)return!1;if(!Oe)return gc(e),Oe=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Go(e.type,e.memoizedProps)),n&&(n=bt)){if(ns(e))throw xc(),Error(r(418));for(;n;)hc(e,n),n=kn(n.nextSibling)}if(gc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"){if(n===0){bt=kn(e.nextSibling);break e}n--}else l!=="$"&&l!=="$!"&&l!=="$?"||n++}e=e.nextSibling}bt=null}}else bt=St?kn(e.stateNode.nextSibling):null;return!0}function xc(){for(var e=bt;e;)e=kn(e.nextSibling)}function kr(){bt=St=null,Oe=!1}function is(e){Ot===null?Ot=[e]:Ot.push(e)}var ym=J.ReactCurrentBatchConfig;function si(e,n,l){if(e=l.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(r(309));var s=l.stateNode}if(!s)throw Error(r(147,e));var f=s,p=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===p?n.ref:(n=function(k){var b=f.refs;k===null?delete b[p]:b[p]=k},n._stringRef=p,n)}if(typeof e!="string")throw Error(r(284));if(!l._owner)throw Error(r(290,e))}return e}function gl(e,n){throw e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function yc(e){var n=e._init;return n(e._payload)}function vc(e){function n(I,_){if(e){var z=I.deletions;z===null?(I.deletions=[_],I.flags|=16):z.push(_)}}function l(I,_){if(!e)return null;for(;_!==null;)n(I,_),_=_.sibling;return null}function s(I,_){for(I=new Map;_!==null;)_.key!==null?I.set(_.key,_):I.set(_.index,_),_=_.sibling;return I}function f(I,_){return I=In(I,_),I.index=0,I.sibling=null,I}function p(I,_,z){return I.index=z,e?(z=I.alternate,z!==null?(z=z.index,z<_?(I.flags|=2,_):z):(I.flags|=2,_)):(I.flags|=1048576,_)}function k(I){return e&&I.alternate===null&&(I.flags|=2),I}function b(I,_,z,Q){return _===null||_.tag!==6?(_=Ks(z,I.mode,Q),_.return=I,_):(_=f(_,z),_.return=I,_)}function N(I,_,z,Q){var ae=z.type;return ae===ue?H(I,_,z.props.children,Q,z.key):_!==null&&(_.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===$&&yc(ae)===_.type)?(Q=f(_,z.props),Q.ref=si(I,_,z),Q.return=I,Q):(Q=$l(z.type,z.key,z.props,null,I.mode,Q),Q.ref=si(I,_,z),Q.return=I,Q)}function M(I,_,z,Q){return _===null||_.tag!==4||_.stateNode.containerInfo!==z.containerInfo||_.stateNode.implementation!==z.implementation?(_=Ys(z,I.mode,Q),_.return=I,_):(_=f(_,z.children||[]),_.return=I,_)}function H(I,_,z,Q,ae){return _===null||_.tag!==7?(_=Yn(z,I.mode,Q,ae),_.return=I,_):(_=f(_,z),_.return=I,_)}function W(I,_,z){if(typeof _=="string"&&_!==""||typeof _=="number")return _=Ks(""+_,I.mode,z),_.return=I,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case le:return z=$l(_.type,_.key,_.props,null,I.mode,z),z.ref=si(I,null,_),z.return=I,z;case D:return _=Ys(_,I.mode,z),_.return=I,_;case $:var Q=_._init;return W(I,Q(_._payload),z)}if(fn(_)||re(_))return _=Yn(_,I.mode,z,null),_.return=I,_;gl(I,_)}return null}function V(I,_,z,Q){var ae=_!==null?_.key:null;if(typeof z=="string"&&z!==""||typeof z=="number")return ae!==null?null:b(I,_,""+z,Q);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case le:return z.key===ae?N(I,_,z,Q):null;case D:return z.key===ae?M(I,_,z,Q):null;case $:return ae=z._init,V(I,_,ae(z._payload),Q)}if(fn(z)||re(z))return ae!==null?null:H(I,_,z,Q,null);gl(I,z)}return null}function ee(I,_,z,Q,ae){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return I=I.get(z)||null,b(_,I,""+Q,ae);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case le:return I=I.get(Q.key===null?z:Q.key)||null,N(_,I,Q,ae);case D:return I=I.get(Q.key===null?z:Q.key)||null,M(_,I,Q,ae);case $:var fe=Q._init;return ee(I,_,z,fe(Q._payload),ae)}if(fn(Q)||re(Q))return I=I.get(z)||null,H(_,I,Q,ae,null);gl(_,Q)}return null}function ie(I,_,z,Q){for(var ae=null,fe=null,de=_,ye=_=0,Je=null;de!==null&&ye<z.length;ye++){de.index>ye?(Je=de,de=null):Je=de.sibling;var Pe=V(I,de,z[ye],Q);if(Pe===null){de===null&&(de=Je);break}e&&de&&Pe.alternate===null&&n(I,de),_=p(Pe,_,ye),fe===null?ae=Pe:fe.sibling=Pe,fe=Pe,de=Je}if(ye===z.length)return l(I,de),Oe&&Un(I,ye),ae;if(de===null){for(;ye<z.length;ye++)de=W(I,z[ye],Q),de!==null&&(_=p(de,_,ye),fe===null?ae=de:fe.sibling=de,fe=de);return Oe&&Un(I,ye),ae}for(de=s(I,de);ye<z.length;ye++)Je=ee(de,I,ye,z[ye],Q),Je!==null&&(e&&Je.alternate!==null&&de.delete(Je.key===null?ye:Je.key),_=p(Je,_,ye),fe===null?ae=Je:fe.sibling=Je,fe=Je);return e&&de.forEach(function(zn){return n(I,zn)}),Oe&&Un(I,ye),ae}function oe(I,_,z,Q){var ae=re(z);if(typeof ae!="function")throw Error(r(150));if(z=ae.call(z),z==null)throw Error(r(151));for(var fe=ae=null,de=_,ye=_=0,Je=null,Pe=z.next();de!==null&&!Pe.done;ye++,Pe=z.next()){de.index>ye?(Je=de,de=null):Je=de.sibling;var zn=V(I,de,Pe.value,Q);if(zn===null){de===null&&(de=Je);break}e&&de&&zn.alternate===null&&n(I,de),_=p(zn,_,ye),fe===null?ae=zn:fe.sibling=zn,fe=zn,de=Je}if(Pe.done)return l(I,de),Oe&&Un(I,ye),ae;if(de===null){for(;!Pe.done;ye++,Pe=z.next())Pe=W(I,Pe.value,Q),Pe!==null&&(_=p(Pe,_,ye),fe===null?ae=Pe:fe.sibling=Pe,fe=Pe);return Oe&&Un(I,ye),ae}for(de=s(I,de);!Pe.done;ye++,Pe=z.next())Pe=ee(de,I,ye,Pe.value,Q),Pe!==null&&(e&&Pe.alternate!==null&&de.delete(Pe.key===null?ye:Pe.key),_=p(Pe,_,ye),fe===null?ae=Pe:fe.sibling=Pe,fe=Pe);return e&&de.forEach(function(Xm){return n(I,Xm)}),Oe&&Un(I,ye),ae}function Ve(I,_,z,Q){if(typeof z=="object"&&z!==null&&z.type===ue&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case le:e:{for(var ae=z.key,fe=_;fe!==null;){if(fe.key===ae){if(ae=z.type,ae===ue){if(fe.tag===7){l(I,fe.sibling),_=f(fe,z.props.children),_.return=I,I=_;break e}}else if(fe.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===$&&yc(ae)===fe.type){l(I,fe.sibling),_=f(fe,z.props),_.ref=si(I,fe,z),_.return=I,I=_;break e}l(I,fe);break}else n(I,fe);fe=fe.sibling}z.type===ue?(_=Yn(z.props.children,I.mode,Q,z.key),_.return=I,I=_):(Q=$l(z.type,z.key,z.props,null,I.mode,Q),Q.ref=si(I,_,z),Q.return=I,I=Q)}return k(I);case D:e:{for(fe=z.key;_!==null;){if(_.key===fe)if(_.tag===4&&_.stateNode.containerInfo===z.containerInfo&&_.stateNode.implementation===z.implementation){l(I,_.sibling),_=f(_,z.children||[]),_.return=I,I=_;break e}else{l(I,_);break}else n(I,_);_=_.sibling}_=Ys(z,I.mode,Q),_.return=I,I=_}return k(I);case $:return fe=z._init,Ve(I,_,fe(z._payload),Q)}if(fn(z))return ie(I,_,z,Q);if(re(z))return oe(I,_,z,Q);gl(I,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,_!==null&&_.tag===6?(l(I,_.sibling),_=f(_,z),_.return=I,I=_):(l(I,_),_=Ks(z,I.mode,Q),_.return=I,I=_),k(I)):l(I,_)}return Ve}var wr=vc(!0),kc=vc(!1),xl=wn(null),yl=null,Sr=null,ls=null;function os(){ls=Sr=yl=null}function ss(e){var n=xl.current;Ae(xl),e._currentValue=n}function as(e,n,l){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===l)break;e=e.return}}function br(e,n){yl=e,ls=Sr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(ht=!0),e.firstContext=null)}function It(e){var n=e._currentValue;if(ls!==e)if(e={context:e,memoizedValue:n,next:null},Sr===null){if(yl===null)throw Error(r(308));Sr=e,yl.dependencies={lanes:0,firstContext:e}}else Sr=Sr.next=e;return n}var Vn=null;function us(e){Vn===null?Vn=[e]:Vn.push(e)}function wc(e,n,l,s){var f=n.interleaved;return f===null?(l.next=l,us(n)):(l.next=f.next,f.next=l),n.interleaved=l,ln(e,s)}function ln(e,n){e.lanes|=n;var l=e.alternate;for(l!==null&&(l.lanes|=n),l=e,e=e.return;e!==null;)e.childLanes|=n,l=e.alternate,l!==null&&(l.childLanes|=n),l=e,e=e.return;return l.tag===3?l.stateNode:null}var Cn=!1;function cs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Sc(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function on(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function jn(e,n,l){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(_e&2)!==0){var f=s.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),s.pending=n,ln(e,l)}return f=s.interleaved,f===null?(n.next=n,us(s)):(n.next=f.next,f.next=n),s.interleaved=n,ln(e,l)}function vl(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194240)!==0)){var s=n.lanes;s&=e.pendingLanes,l|=s,n.lanes=l,Co(e,l)}}function bc(e,n){var l=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var f=null,p=null;if(l=l.firstBaseUpdate,l!==null){do{var k={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};p===null?f=p=k:p=p.next=k,l=l.next}while(l!==null);p===null?f=p=n:p=p.next=n}else f=p=n;l={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:s.shared,effects:s.effects},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}function kl(e,n,l,s){var f=e.updateQueue;Cn=!1;var p=f.firstBaseUpdate,k=f.lastBaseUpdate,b=f.shared.pending;if(b!==null){f.shared.pending=null;var N=b,M=N.next;N.next=null,k===null?p=M:k.next=M,k=N;var H=e.alternate;H!==null&&(H=H.updateQueue,b=H.lastBaseUpdate,b!==k&&(b===null?H.firstBaseUpdate=M:b.next=M,H.lastBaseUpdate=N))}if(p!==null){var W=f.baseState;k=0,H=M=N=null,b=p;do{var V=b.lane,ee=b.eventTime;if((s&V)===V){H!==null&&(H=H.next={eventTime:ee,lane:0,tag:b.tag,payload:b.payload,callback:b.callback,next:null});e:{var ie=e,oe=b;switch(V=n,ee=l,oe.tag){case 1:if(ie=oe.payload,typeof ie=="function"){W=ie.call(ee,W,V);break e}W=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=oe.payload,V=typeof ie=="function"?ie.call(ee,W,V):ie,V==null)break e;W=S({},W,V);break e;case 2:Cn=!0}}b.callback!==null&&b.lane!==0&&(e.flags|=64,V=f.effects,V===null?f.effects=[b]:V.push(b))}else ee={eventTime:ee,lane:V,tag:b.tag,payload:b.payload,callback:b.callback,next:null},H===null?(M=H=ee,N=W):H=H.next=ee,k|=V;if(b=b.next,b===null){if(b=f.shared.pending,b===null)break;V=b,b=V.next,V.next=null,f.lastBaseUpdate=V,f.shared.pending=null}}while(!0);if(H===null&&(N=W),f.baseState=N,f.firstBaseUpdate=M,f.lastBaseUpdate=H,n=f.shared.interleaved,n!==null){f=n;do k|=f.lane,f=f.next;while(f!==n)}else p===null&&(f.shared.lanes=0);qn|=k,e.lanes=k,e.memoizedState=W}}function Cc(e,n,l){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var s=e[n],f=s.callback;if(f!==null){if(s.callback=null,s=l,typeof f!="function")throw Error(r(191,f));f.call(s)}}}var ai={},Qt=wn(ai),ui=wn(ai),ci=wn(ai);function Hn(e){if(e===ai)throw Error(r(174));return e}function fs(e,n){switch(Me(ci,n),Me(ui,e),Me(Qt,ai),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:K(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=K(n,e)}Ae(Qt),Me(Qt,n)}function Cr(){Ae(Qt),Ae(ui),Ae(ci)}function jc(e){Hn(ci.current);var n=Hn(Qt.current),l=K(n,e.type);n!==l&&(Me(ui,e),Me(Qt,l))}function ds(e){ui.current===e&&(Ae(Qt),Ae(ui))}var Fe=wn(0);function wl(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var ps=[];function hs(){for(var e=0;e<ps.length;e++)ps[e]._workInProgressVersionPrimary=null;ps.length=0}var Sl=J.ReactCurrentDispatcher,ms=J.ReactCurrentBatchConfig,Wn=0,$e=null,Ge=null,Ye=null,bl=!1,fi=!1,di=0,vm=0;function it(){throw Error(r(321))}function gs(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!At(e[l],n[l]))return!1;return!0}function xs(e,n,l,s,f,p){if(Wn=p,$e=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Sl.current=e===null||e.memoizedState===null?bm:Cm,e=l(s,f),fi){p=0;do{if(fi=!1,di=0,25<=p)throw Error(r(301));p+=1,Ye=Ge=null,n.updateQueue=null,Sl.current=jm,e=l(s,f)}while(fi)}if(Sl.current=El,n=Ge!==null&&Ge.next!==null,Wn=0,Ye=Ge=$e=null,bl=!1,n)throw Error(r(300));return e}function ys(){var e=di!==0;return di=0,e}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?$e.memoizedState=Ye=e:Ye=Ye.next=e,Ye}function zt(){if(Ge===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var n=Ye===null?$e.memoizedState:Ye.next;if(n!==null)Ye=n,Ge=e;else{if(e===null)throw Error(r(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},Ye===null?$e.memoizedState=Ye=e:Ye=Ye.next=e}return Ye}function pi(e,n){return typeof n=="function"?n(e):n}function vs(e){var n=zt(),l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var s=Ge,f=s.baseQueue,p=l.pending;if(p!==null){if(f!==null){var k=f.next;f.next=p.next,p.next=k}s.baseQueue=f=p,l.pending=null}if(f!==null){p=f.next,s=s.baseState;var b=k=null,N=null,M=p;do{var H=M.lane;if((Wn&H)===H)N!==null&&(N=N.next={lane:0,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),s=M.hasEagerState?M.eagerState:e(s,M.action);else{var W={lane:H,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null};N===null?(b=N=W,k=s):N=N.next=W,$e.lanes|=H,qn|=H}M=M.next}while(M!==null&&M!==p);N===null?k=s:N.next=b,At(s,n.memoizedState)||(ht=!0),n.memoizedState=s,n.baseState=k,n.baseQueue=N,l.lastRenderedState=s}if(e=l.interleaved,e!==null){f=e;do p=f.lane,$e.lanes|=p,qn|=p,f=f.next;while(f!==e)}else f===null&&(l.lanes=0);return[n.memoizedState,l.dispatch]}function ks(e){var n=zt(),l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var s=l.dispatch,f=l.pending,p=n.memoizedState;if(f!==null){l.pending=null;var k=f=f.next;do p=e(p,k.action),k=k.next;while(k!==f);At(p,n.memoizedState)||(ht=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),l.lastRenderedState=p}return[p,s]}function Ec(){}function Nc(e,n){var l=$e,s=zt(),f=n(),p=!At(s.memoizedState,f);if(p&&(s.memoizedState=f,ht=!0),s=s.queue,ws(Pc.bind(null,l,s,e),[e]),s.getSnapshot!==n||p||Ye!==null&&Ye.memoizedState.tag&1){if(l.flags|=2048,hi(9,Tc.bind(null,l,s,f,n),void 0,null),Xe===null)throw Error(r(349));(Wn&30)!==0||_c(l,n,f)}return f}function _c(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=$e.updateQueue,n===null?(n={lastEffect:null,stores:null},$e.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function Tc(e,n,l,s){n.value=l,n.getSnapshot=s,Ic(n)&&zc(e)}function Pc(e,n,l){return l(function(){Ic(n)&&zc(e)})}function Ic(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!At(e,l)}catch{return!0}}function zc(e){var n=ln(e,1);n!==null&&Ut(n,e,1,-1)}function Lc(e){var n=Gt();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:e},n.queue=e,e=e.dispatch=Sm.bind(null,$e,e),[n.memoizedState,e]}function hi(e,n,l,s){return e={tag:e,create:n,destroy:l,deps:s,next:null},n=$e.updateQueue,n===null?(n={lastEffect:null,stores:null},$e.updateQueue=n,n.lastEffect=e.next=e):(l=n.lastEffect,l===null?n.lastEffect=e.next=e:(s=l.next,l.next=e,e.next=s,n.lastEffect=e)),e}function Rc(){return zt().memoizedState}function Cl(e,n,l,s){var f=Gt();$e.flags|=e,f.memoizedState=hi(1|n,l,void 0,s===void 0?null:s)}function jl(e,n,l,s){var f=zt();s=s===void 0?null:s;var p=void 0;if(Ge!==null){var k=Ge.memoizedState;if(p=k.destroy,s!==null&&gs(s,k.deps)){f.memoizedState=hi(n,l,p,s);return}}$e.flags|=e,f.memoizedState=hi(1|n,l,p,s)}function Mc(e,n){return Cl(8390656,8,e,n)}function ws(e,n){return jl(2048,8,e,n)}function Dc(e,n){return jl(4,2,e,n)}function Ac(e,n){return jl(4,4,e,n)}function Oc(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Fc(e,n,l){return l=l!=null?l.concat([e]):null,jl(4,4,Oc.bind(null,n,e),l)}function Ss(){}function $c(e,n){var l=zt();n=n===void 0?null:n;var s=l.memoizedState;return s!==null&&n!==null&&gs(n,s[1])?s[0]:(l.memoizedState=[e,n],e)}function Bc(e,n){var l=zt();n=n===void 0?null:n;var s=l.memoizedState;return s!==null&&n!==null&&gs(n,s[1])?s[0]:(e=e(),l.memoizedState=[e,n],e)}function Uc(e,n,l){return(Wn&21)===0?(e.baseState&&(e.baseState=!1,ht=!0),e.memoizedState=l):(At(l,n)||(l=yu(),$e.lanes|=l,qn|=l,e.baseState=!0),n)}function km(e,n){var l=ze;ze=l!==0&&4>l?l:4,e(!0);var s=ms.transition;ms.transition={};try{e(!1),n()}finally{ze=l,ms.transition=s}}function Vc(){return zt().memoizedState}function wm(e,n,l){var s=Tn(e);if(l={lane:s,action:l,hasEagerState:!1,eagerState:null,next:null},Hc(e))Wc(n,l);else if(l=wc(e,n,l,s),l!==null){var f=ct();Ut(l,e,s,f),qc(l,n,s)}}function Sm(e,n,l){var s=Tn(e),f={lane:s,action:l,hasEagerState:!1,eagerState:null,next:null};if(Hc(e))Wc(n,f);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var k=n.lastRenderedState,b=p(k,l);if(f.hasEagerState=!0,f.eagerState=b,At(b,k)){var N=n.interleaved;N===null?(f.next=f,us(n)):(f.next=N.next,N.next=f),n.interleaved=f;return}}catch{}finally{}l=wc(e,n,f,s),l!==null&&(f=ct(),Ut(l,e,s,f),qc(l,n,s))}}function Hc(e){var n=e.alternate;return e===$e||n!==null&&n===$e}function Wc(e,n){fi=bl=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function qc(e,n,l){if((l&4194240)!==0){var s=n.lanes;s&=e.pendingLanes,l|=s,n.lanes=l,Co(e,l)}}var El={readContext:It,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},bm={readContext:It,useCallback:function(e,n){return Gt().memoizedState=[e,n===void 0?null:n],e},useContext:It,useEffect:Mc,useImperativeHandle:function(e,n,l){return l=l!=null?l.concat([e]):null,Cl(4194308,4,Oc.bind(null,n,e),l)},useLayoutEffect:function(e,n){return Cl(4194308,4,e,n)},useInsertionEffect:function(e,n){return Cl(4,2,e,n)},useMemo:function(e,n){var l=Gt();return n=n===void 0?null:n,e=e(),l.memoizedState=[e,n],e},useReducer:function(e,n,l){var s=Gt();return n=l!==void 0?l(n):n,s.memoizedState=s.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},s.queue=e,e=e.dispatch=wm.bind(null,$e,e),[s.memoizedState,e]},useRef:function(e){var n=Gt();return e={current:e},n.memoizedState=e},useState:Lc,useDebugValue:Ss,useDeferredValue:function(e){return Gt().memoizedState=e},useTransition:function(){var e=Lc(!1),n=e[0];return e=km.bind(null,e[1]),Gt().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,l){var s=$e,f=Gt();if(Oe){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),Xe===null)throw Error(r(349));(Wn&30)!==0||_c(s,n,l)}f.memoizedState=l;var p={value:l,getSnapshot:n};return f.queue=p,Mc(Pc.bind(null,s,p,e),[e]),s.flags|=2048,hi(9,Tc.bind(null,s,p,l,n),void 0,null),l},useId:function(){var e=Gt(),n=Xe.identifierPrefix;if(Oe){var l=rn,s=nn;l=(s&~(1<<32-Dt(s)-1)).toString(32)+l,n=":"+n+"R"+l,l=di++,0<l&&(n+="H"+l.toString(32)),n+=":"}else l=vm++,n=":"+n+"r"+l.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Cm={readContext:It,useCallback:$c,useContext:It,useEffect:ws,useImperativeHandle:Fc,useInsertionEffect:Dc,useLayoutEffect:Ac,useMemo:Bc,useReducer:vs,useRef:Rc,useState:function(){return vs(pi)},useDebugValue:Ss,useDeferredValue:function(e){var n=zt();return Uc(n,Ge.memoizedState,e)},useTransition:function(){var e=vs(pi)[0],n=zt().memoizedState;return[e,n]},useMutableSource:Ec,useSyncExternalStore:Nc,useId:Vc,unstable_isNewReconciler:!1},jm={readContext:It,useCallback:$c,useContext:It,useEffect:ws,useImperativeHandle:Fc,useInsertionEffect:Dc,useLayoutEffect:Ac,useMemo:Bc,useReducer:ks,useRef:Rc,useState:function(){return ks(pi)},useDebugValue:Ss,useDeferredValue:function(e){var n=zt();return Ge===null?n.memoizedState=e:Uc(n,Ge.memoizedState,e)},useTransition:function(){var e=ks(pi)[0],n=zt().memoizedState;return[e,n]},useMutableSource:Ec,useSyncExternalStore:Nc,useId:Vc,unstable_isNewReconciler:!1};function Ft(e,n){if(e&&e.defaultProps){n=S({},n),e=e.defaultProps;for(var l in e)n[l]===void 0&&(n[l]=e[l]);return n}return n}function bs(e,n,l,s){n=e.memoizedState,l=l(s,n),l=l==null?n:S({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Nl={isMounted:function(e){return(e=e._reactInternals)?On(e)===e:!1},enqueueSetState:function(e,n,l){e=e._reactInternals;var s=ct(),f=Tn(e),p=on(s,f);p.payload=n,l!=null&&(p.callback=l),n=jn(e,p,f),n!==null&&(Ut(n,e,f,s),vl(n,e,f))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var s=ct(),f=Tn(e),p=on(s,f);p.tag=1,p.payload=n,l!=null&&(p.callback=l),n=jn(e,p,f),n!==null&&(Ut(n,e,f,s),vl(n,e,f))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=ct(),s=Tn(e),f=on(l,s);f.tag=2,n!=null&&(f.callback=n),n=jn(e,f,s),n!==null&&(Ut(n,e,s,l),vl(n,e,s))}};function Qc(e,n,l,s,f,p,k){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,p,k):n.prototype&&n.prototype.isPureReactComponent?!ei(l,s)||!ei(f,p):!0}function Gc(e,n,l){var s=!1,f=Sn,p=n.contextType;return typeof p=="object"&&p!==null?p=It(p):(f=pt(n)?$n:rt.current,s=n.contextTypes,p=(s=s!=null)?xr(e,f):Sn),n=new n(l,p),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Nl,e.stateNode=n,n._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=f,e.__reactInternalMemoizedMaskedChildContext=p),n}function Kc(e,n,l,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,s),n.state!==e&&Nl.enqueueReplaceState(n,n.state,null)}function Cs(e,n,l,s){var f=e.stateNode;f.props=l,f.state=e.memoizedState,f.refs={},cs(e);var p=n.contextType;typeof p=="object"&&p!==null?f.context=It(p):(p=pt(n)?$n:rt.current,f.context=xr(e,p)),f.state=e.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(bs(e,n,p,l),f.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(n=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),n!==f.state&&Nl.enqueueReplaceState(f,f.state,null),kl(e,l,f,s),f.state=e.memoizedState),typeof f.componentDidMount=="function"&&(e.flags|=4194308)}function jr(e,n){try{var l="",s=n;do l+=we(s),s=s.return;while(s);var f=l}catch(p){f=`
|
||
Error generating stack: `+p.message+`
|
||
`+p.stack}return{value:e,source:n,stack:f,digest:null}}function js(e,n,l){return{value:e,source:null,stack:l??null,digest:n??null}}function Es(e,n){try{console.error(n.value)}catch(l){setTimeout(function(){throw l})}}var Em=typeof WeakMap=="function"?WeakMap:Map;function Yc(e,n,l){l=on(-1,l),l.tag=3,l.payload={element:null};var s=n.value;return l.callback=function(){Rl||(Rl=!0,Bs=s),Es(e,n)},l}function Xc(e,n,l){l=on(-1,l),l.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var f=n.value;l.payload=function(){return s(f)},l.callback=function(){Es(e,n)}}var p=e.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(l.callback=function(){Es(e,n),typeof s!="function"&&(Nn===null?Nn=new Set([this]):Nn.add(this));var k=n.stack;this.componentDidCatch(n.value,{componentStack:k!==null?k:""})}),l}function Jc(e,n,l){var s=e.pingCache;if(s===null){s=e.pingCache=new Em;var f=new Set;s.set(n,f)}else f=s.get(n),f===void 0&&(f=new Set,s.set(n,f));f.has(l)||(f.add(l),e=$m.bind(null,e,n,l),n.then(e,e))}function Zc(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function ef(e,n,l,s,f){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(n=on(-1,1),n.tag=2,jn(l,n,1))),l.lanes|=1),e):(e.flags|=65536,e.lanes=f,e)}var Nm=J.ReactCurrentOwner,ht=!1;function ut(e,n,l,s){n.child=e===null?kc(n,null,l,s):wr(n,e.child,l,s)}function tf(e,n,l,s,f){l=l.render;var p=n.ref;return br(n,f),s=xs(e,n,l,s,p,f),l=ys(),e!==null&&!ht?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~f,sn(e,n,f)):(Oe&&l&&es(n),n.flags|=1,ut(e,n,s,f),n.child)}function nf(e,n,l,s,f){if(e===null){var p=l.type;return typeof p=="function"&&!Gs(p)&&p.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(n.tag=15,n.type=p,rf(e,n,p,s,f)):(e=$l(l.type,null,s,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,(e.lanes&f)===0){var k=p.memoizedProps;if(l=l.compare,l=l!==null?l:ei,l(k,s)&&e.ref===n.ref)return sn(e,n,f)}return n.flags|=1,e=In(p,s),e.ref=n.ref,e.return=n,n.child=e}function rf(e,n,l,s,f){if(e!==null){var p=e.memoizedProps;if(ei(p,s)&&e.ref===n.ref)if(ht=!1,n.pendingProps=s=p,(e.lanes&f)!==0)(e.flags&131072)!==0&&(ht=!0);else return n.lanes=e.lanes,sn(e,n,f)}return Ns(e,n,l,s,f)}function lf(e,n,l){var s=n.pendingProps,f=s.children,p=e!==null?e.memoizedState:null;if(s.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Me(Nr,Ct),Ct|=l;else{if((l&1073741824)===0)return e=p!==null?p.baseLanes|l:l,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Me(Nr,Ct),Ct|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=p!==null?p.baseLanes:l,Me(Nr,Ct),Ct|=s}else p!==null?(s=p.baseLanes|l,n.memoizedState=null):s=l,Me(Nr,Ct),Ct|=s;return ut(e,n,f,l),n.child}function of(e,n){var l=n.ref;(e===null&&l!==null||e!==null&&e.ref!==l)&&(n.flags|=512,n.flags|=2097152)}function Ns(e,n,l,s,f){var p=pt(l)?$n:rt.current;return p=xr(n,p),br(n,f),l=xs(e,n,l,s,p,f),s=ys(),e!==null&&!ht?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~f,sn(e,n,f)):(Oe&&s&&es(n),n.flags|=1,ut(e,n,l,f),n.child)}function sf(e,n,l,s,f){if(pt(l)){var p=!0;fl(n)}else p=!1;if(br(n,f),n.stateNode===null)Tl(e,n),Gc(n,l,s),Cs(n,l,s,f),s=!0;else if(e===null){var k=n.stateNode,b=n.memoizedProps;k.props=b;var N=k.context,M=l.contextType;typeof M=="object"&&M!==null?M=It(M):(M=pt(l)?$n:rt.current,M=xr(n,M));var H=l.getDerivedStateFromProps,W=typeof H=="function"||typeof k.getSnapshotBeforeUpdate=="function";W||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(b!==s||N!==M)&&Kc(n,k,s,M),Cn=!1;var V=n.memoizedState;k.state=V,kl(n,s,k,f),N=n.memoizedState,b!==s||V!==N||dt.current||Cn?(typeof H=="function"&&(bs(n,l,H,s),N=n.memoizedState),(b=Cn||Qc(n,l,b,s,V,N,M))?(W||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(n.flags|=4194308)):(typeof k.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=N),k.props=s,k.state=N,k.context=M,s=b):(typeof k.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{k=n.stateNode,Sc(e,n),b=n.memoizedProps,M=n.type===n.elementType?b:Ft(n.type,b),k.props=M,W=n.pendingProps,V=k.context,N=l.contextType,typeof N=="object"&&N!==null?N=It(N):(N=pt(l)?$n:rt.current,N=xr(n,N));var ee=l.getDerivedStateFromProps;(H=typeof ee=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(b!==W||V!==N)&&Kc(n,k,s,N),Cn=!1,V=n.memoizedState,k.state=V,kl(n,s,k,f);var ie=n.memoizedState;b!==W||V!==ie||dt.current||Cn?(typeof ee=="function"&&(bs(n,l,ee,s),ie=n.memoizedState),(M=Cn||Qc(n,l,M,s,V,ie,N)||!1)?(H||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(s,ie,N),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(s,ie,N)),typeof k.componentDidUpdate=="function"&&(n.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof k.componentDidUpdate!="function"||b===e.memoizedProps&&V===e.memoizedState||(n.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&V===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=ie),k.props=s,k.state=ie,k.context=N,s=M):(typeof k.componentDidUpdate!="function"||b===e.memoizedProps&&V===e.memoizedState||(n.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&V===e.memoizedState||(n.flags|=1024),s=!1)}return _s(e,n,l,s,p,f)}function _s(e,n,l,s,f,p){of(e,n);var k=(n.flags&128)!==0;if(!s&&!k)return f&&fc(n,l,!1),sn(e,n,p);s=n.stateNode,Nm.current=n;var b=k&&typeof l.getDerivedStateFromError!="function"?null:s.render();return n.flags|=1,e!==null&&k?(n.child=wr(n,e.child,null,p),n.child=wr(n,null,b,p)):ut(e,n,b,p),n.memoizedState=s.state,f&&fc(n,l,!0),n.child}function af(e){var n=e.stateNode;n.pendingContext?uc(e,n.pendingContext,n.pendingContext!==n.context):n.context&&uc(e,n.context,!1),fs(e,n.containerInfo)}function uf(e,n,l,s,f){return kr(),is(f),n.flags|=256,ut(e,n,l,s),n.child}var Ts={dehydrated:null,treeContext:null,retryLane:0};function Ps(e){return{baseLanes:e,cachePool:null,transitions:null}}function cf(e,n,l){var s=n.pendingProps,f=Fe.current,p=!1,k=(n.flags&128)!==0,b;if((b=k)||(b=e!==null&&e.memoizedState===null?!1:(f&2)!==0),b?(p=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(f|=1),Me(Fe,f&1),e===null)return rs(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(k=s.children,e=s.fallback,p?(s=n.mode,p=n.child,k={mode:"hidden",children:k},(s&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=k):p=Bl(k,s,0,null),e=Yn(e,s,l,null),p.return=n,e.return=n,p.sibling=e,n.child=p,n.child.memoizedState=Ps(l),n.memoizedState=Ts,e):Is(n,k));if(f=e.memoizedState,f!==null&&(b=f.dehydrated,b!==null))return _m(e,n,k,s,b,f,l);if(p){p=s.fallback,k=n.mode,f=e.child,b=f.sibling;var N={mode:"hidden",children:s.children};return(k&1)===0&&n.child!==f?(s=n.child,s.childLanes=0,s.pendingProps=N,n.deletions=null):(s=In(f,N),s.subtreeFlags=f.subtreeFlags&14680064),b!==null?p=In(b,p):(p=Yn(p,k,l,null),p.flags|=2),p.return=n,s.return=n,s.sibling=p,n.child=s,s=p,p=n.child,k=e.child.memoizedState,k=k===null?Ps(l):{baseLanes:k.baseLanes|l,cachePool:null,transitions:k.transitions},p.memoizedState=k,p.childLanes=e.childLanes&~l,n.memoizedState=Ts,s}return p=e.child,e=p.sibling,s=In(p,{mode:"visible",children:s.children}),(n.mode&1)===0&&(s.lanes=l),s.return=n,s.sibling=null,e!==null&&(l=n.deletions,l===null?(n.deletions=[e],n.flags|=16):l.push(e)),n.child=s,n.memoizedState=null,s}function Is(e,n){return n=Bl({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function _l(e,n,l,s){return s!==null&&is(s),wr(n,e.child,null,l),e=Is(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function _m(e,n,l,s,f,p,k){if(l)return n.flags&256?(n.flags&=-257,s=js(Error(r(422))),_l(e,n,k,s)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(p=s.fallback,f=n.mode,s=Bl({mode:"visible",children:s.children},f,0,null),p=Yn(p,f,k,null),p.flags|=2,s.return=n,p.return=n,s.sibling=p,n.child=s,(n.mode&1)!==0&&wr(n,e.child,null,k),n.child.memoizedState=Ps(k),n.memoizedState=Ts,p);if((n.mode&1)===0)return _l(e,n,k,null);if(f.data==="$!"){if(s=f.nextSibling&&f.nextSibling.dataset,s)var b=s.dgst;return s=b,p=Error(r(419)),s=js(p,s,void 0),_l(e,n,k,s)}if(b=(k&e.childLanes)!==0,ht||b){if(s=Xe,s!==null){switch(k&-k){case 4:f=2;break;case 16:f=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:f=32;break;case 536870912:f=268435456;break;default:f=0}f=(f&(s.suspendedLanes|k))!==0?0:f,f!==0&&f!==p.retryLane&&(p.retryLane=f,ln(e,f),Ut(s,e,f,-1))}return Qs(),s=js(Error(r(421))),_l(e,n,k,s)}return f.data==="$?"?(n.flags|=128,n.child=e.child,n=Bm.bind(null,e),f._reactRetry=n,null):(e=p.treeContext,bt=kn(f.nextSibling),St=n,Oe=!0,Ot=null,e!==null&&(Tt[Pt++]=nn,Tt[Pt++]=rn,Tt[Pt++]=Bn,nn=e.id,rn=e.overflow,Bn=n),n=Is(n,s.children),n.flags|=4096,n)}function ff(e,n,l){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),as(e.return,n,l)}function zs(e,n,l,s,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:l,tailMode:f}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=s,p.tail=l,p.tailMode=f)}function df(e,n,l){var s=n.pendingProps,f=s.revealOrder,p=s.tail;if(ut(e,n,s.children,l),s=Fe.current,(s&2)!==0)s=s&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ff(e,l,n);else if(e.tag===19)ff(e,l,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if(Me(Fe,s),(n.mode&1)===0)n.memoizedState=null;else switch(f){case"forwards":for(l=n.child,f=null;l!==null;)e=l.alternate,e!==null&&wl(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=n.child,n.child=null):(f=l.sibling,l.sibling=null),zs(n,!1,f,l,p);break;case"backwards":for(l=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&wl(e)===null){n.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}zs(n,!0,l,null,p);break;case"together":zs(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Tl(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function sn(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),qn|=n.lanes,(l&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,l=In(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=In(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function Tm(e,n,l){switch(n.tag){case 3:af(n),kr();break;case 5:jc(n);break;case 1:pt(n.type)&&fl(n);break;case 4:fs(n,n.stateNode.containerInfo);break;case 10:var s=n.type._context,f=n.memoizedProps.value;Me(xl,s._currentValue),s._currentValue=f;break;case 13:if(s=n.memoizedState,s!==null)return s.dehydrated!==null?(Me(Fe,Fe.current&1),n.flags|=128,null):(l&n.child.childLanes)!==0?cf(e,n,l):(Me(Fe,Fe.current&1),e=sn(e,n,l),e!==null?e.sibling:null);Me(Fe,Fe.current&1);break;case 19:if(s=(l&n.childLanes)!==0,(e.flags&128)!==0){if(s)return df(e,n,l);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Me(Fe,Fe.current),s)break;return null;case 22:case 23:return n.lanes=0,lf(e,n,l)}return sn(e,n,l)}var pf,Ls,hf,mf;pf=function(e,n){for(var l=n.child;l!==null;){if(l.tag===5||l.tag===6)e.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===n)break;for(;l.sibling===null;){if(l.return===null||l.return===n)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Ls=function(){},hf=function(e,n,l,s){var f=e.memoizedProps;if(f!==s){e=n.stateNode,Hn(Qt.current);var p=null;switch(l){case"input":f=Mr(e,f),s=Mr(e,s),p=[];break;case"select":f=S({},f,{value:void 0}),s=S({},s,{value:void 0}),p=[];break;case"textarea":f=Or(e,f),s=Or(e,s),p=[];break;default:typeof f.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=al)}et(l,s);var k;l=null;for(M in f)if(!s.hasOwnProperty(M)&&f.hasOwnProperty(M)&&f[M]!=null)if(M==="style"){var b=f[M];for(k in b)b.hasOwnProperty(k)&&(l||(l={}),l[k]="")}else M!=="dangerouslySetInnerHTML"&&M!=="children"&&M!=="suppressContentEditableWarning"&&M!=="suppressHydrationWarning"&&M!=="autoFocus"&&(a.hasOwnProperty(M)?p||(p=[]):(p=p||[]).push(M,null));for(M in s){var N=s[M];if(b=f!=null?f[M]:void 0,s.hasOwnProperty(M)&&N!==b&&(N!=null||b!=null))if(M==="style")if(b){for(k in b)!b.hasOwnProperty(k)||N&&N.hasOwnProperty(k)||(l||(l={}),l[k]="");for(k in N)N.hasOwnProperty(k)&&b[k]!==N[k]&&(l||(l={}),l[k]=N[k])}else l||(p||(p=[]),p.push(M,l)),l=N;else M==="dangerouslySetInnerHTML"?(N=N?N.__html:void 0,b=b?b.__html:void 0,N!=null&&b!==N&&(p=p||[]).push(M,N)):M==="children"?typeof N!="string"&&typeof N!="number"||(p=p||[]).push(M,""+N):M!=="suppressContentEditableWarning"&&M!=="suppressHydrationWarning"&&(a.hasOwnProperty(M)?(N!=null&&M==="onScroll"&&De("scroll",e),p||b===N||(p=[])):(p=p||[]).push(M,N))}l&&(p=p||[]).push("style",l);var M=p;(n.updateQueue=M)&&(n.flags|=4)}},mf=function(e,n,l,s){l!==s&&(n.flags|=4)};function mi(e,n){if(!Oe)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function lt(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,s=0;if(n)for(var f=e.child;f!==null;)l|=f.lanes|f.childLanes,s|=f.subtreeFlags&14680064,s|=f.flags&14680064,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)l|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=s,e.childLanes=l,n}function Pm(e,n,l){var s=n.pendingProps;switch(ts(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(n),null;case 1:return pt(n.type)&&cl(),lt(n),null;case 3:return s=n.stateNode,Cr(),Ae(dt),Ae(rt),hs(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ml(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Ot!==null&&(Hs(Ot),Ot=null))),Ls(e,n),lt(n),null;case 5:ds(n);var f=Hn(ci.current);if(l=n.type,e!==null&&n.stateNode!=null)hf(e,n,l,s,f),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!s){if(n.stateNode===null)throw Error(r(166));return lt(n),null}if(e=Hn(Qt.current),ml(n)){s=n.stateNode,l=n.type;var p=n.memoizedProps;switch(s[qt]=n,s[li]=p,e=(n.mode&1)!==0,l){case"dialog":De("cancel",s),De("close",s);break;case"iframe":case"object":case"embed":De("load",s);break;case"video":case"audio":for(f=0;f<ni.length;f++)De(ni[f],s);break;case"source":De("error",s);break;case"img":case"image":case"link":De("error",s),De("load",s);break;case"details":De("toggle",s);break;case"input":Dr(s,p),De("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!p.multiple},De("invalid",s);break;case"textarea":Oi(s,p),De("invalid",s)}et(l,p),f=null;for(var k in p)if(p.hasOwnProperty(k)){var b=p[k];k==="children"?typeof b=="string"?s.textContent!==b&&(p.suppressHydrationWarning!==!0&&sl(s.textContent,b,e),f=["children",b]):typeof b=="number"&&s.textContent!==""+b&&(p.suppressHydrationWarning!==!0&&sl(s.textContent,b,e),f=["children",""+b]):a.hasOwnProperty(k)&&b!=null&&k==="onScroll"&&De("scroll",s)}switch(l){case"input":Jt(s),Ai(s,p,!0);break;case"textarea":Jt(s),$i(s);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(s.onclick=al)}s=f,n.updateQueue=s,s!==null&&(n.flags|=4)}else{k=f.nodeType===9?f:f.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=F(l)),e==="http://www.w3.org/1999/xhtml"?l==="script"?(e=k.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=k.createElement(l,{is:s.is}):(e=k.createElement(l),l==="select"&&(k=e,s.multiple?k.multiple=!0:s.size&&(k.size=s.size))):e=k.createElementNS(e,l),e[qt]=n,e[li]=s,pf(e,n,!1,!1),n.stateNode=e;e:{switch(k=Ht(l,s),l){case"dialog":De("cancel",e),De("close",e),f=s;break;case"iframe":case"object":case"embed":De("load",e),f=s;break;case"video":case"audio":for(f=0;f<ni.length;f++)De(ni[f],e);f=s;break;case"source":De("error",e),f=s;break;case"img":case"image":case"link":De("error",e),De("load",e),f=s;break;case"details":De("toggle",e),f=s;break;case"input":Dr(e,s),f=Mr(e,s),De("invalid",e);break;case"option":f=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},f=S({},s,{value:void 0}),De("invalid",e);break;case"textarea":Oi(e,s),f=Or(e,s),De("invalid",e);break;default:f=s}et(l,f),b=f;for(p in b)if(b.hasOwnProperty(p)){var N=b[p];p==="style"?pn(e,N):p==="dangerouslySetInnerHTML"?(N=N?N.__html:void 0,N!=null&&be(e,N)):p==="children"?typeof N=="string"?(l!=="textarea"||N!=="")&&Ne(e,N):typeof N=="number"&&Ne(e,""+N):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(a.hasOwnProperty(p)?N!=null&&p==="onScroll"&&De("scroll",e):N!=null&&A(e,p,N,k))}switch(l){case"input":Jt(e),Ai(e,s,!1);break;case"textarea":Jt(e),$i(e);break;case"option":s.value!=null&&e.setAttribute("value",""+Se(s.value));break;case"select":e.multiple=!!s.multiple,p=s.value,p!=null?dn(e,!!s.multiple,p,!1):s.defaultValue!=null&&dn(e,!!s.multiple,s.defaultValue,!0);break;default:typeof f.onClick=="function"&&(e.onclick=al)}switch(l){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return lt(n),null;case 6:if(e&&n.stateNode!=null)mf(e,n,e.memoizedProps,s);else{if(typeof s!="string"&&n.stateNode===null)throw Error(r(166));if(l=Hn(ci.current),Hn(Qt.current),ml(n)){if(s=n.stateNode,l=n.memoizedProps,s[qt]=n,(p=s.nodeValue!==l)&&(e=St,e!==null))switch(e.tag){case 3:sl(s.nodeValue,l,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&sl(s.nodeValue,l,(e.mode&1)!==0)}p&&(n.flags|=4)}else s=(l.nodeType===9?l:l.ownerDocument).createTextNode(s),s[qt]=n,n.stateNode=s}return lt(n),null;case 13:if(Ae(Fe),s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Oe&&bt!==null&&(n.mode&1)!==0&&(n.flags&128)===0)xc(),kr(),n.flags|=98560,p=!1;else if(p=ml(n),s!==null&&s.dehydrated!==null){if(e===null){if(!p)throw Error(r(318));if(p=n.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[qt]=n}else kr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;lt(n),p=!1}else Ot!==null&&(Hs(Ot),Ot=null),p=!0;if(!p)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=l,n):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(Fe.current&1)!==0?Ke===0&&(Ke=3):Qs())),n.updateQueue!==null&&(n.flags|=4),lt(n),null);case 4:return Cr(),Ls(e,n),e===null&&ri(n.stateNode.containerInfo),lt(n),null;case 10:return ss(n.type._context),lt(n),null;case 17:return pt(n.type)&&cl(),lt(n),null;case 19:if(Ae(Fe),p=n.memoizedState,p===null)return lt(n),null;if(s=(n.flags&128)!==0,k=p.rendering,k===null)if(s)mi(p,!1);else{if(Ke!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(k=wl(e),k!==null){for(n.flags|=128,mi(p,!1),s=k.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),n.subtreeFlags=0,s=l,l=n.child;l!==null;)p=l,e=s,p.flags&=14680066,k=p.alternate,k===null?(p.childLanes=0,p.lanes=e,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=k.childLanes,p.lanes=k.lanes,p.child=k.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=k.memoizedProps,p.memoizedState=k.memoizedState,p.updateQueue=k.updateQueue,p.type=k.type,e=k.dependencies,p.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),l=l.sibling;return Me(Fe,Fe.current&1|2),n.child}e=e.sibling}p.tail!==null&&Ue()>_r&&(n.flags|=128,s=!0,mi(p,!1),n.lanes=4194304)}else{if(!s)if(e=wl(k),e!==null){if(n.flags|=128,s=!0,l=e.updateQueue,l!==null&&(n.updateQueue=l,n.flags|=4),mi(p,!0),p.tail===null&&p.tailMode==="hidden"&&!k.alternate&&!Oe)return lt(n),null}else 2*Ue()-p.renderingStartTime>_r&&l!==1073741824&&(n.flags|=128,s=!0,mi(p,!1),n.lanes=4194304);p.isBackwards?(k.sibling=n.child,n.child=k):(l=p.last,l!==null?l.sibling=k:n.child=k,p.last=k)}return p.tail!==null?(n=p.tail,p.rendering=n,p.tail=n.sibling,p.renderingStartTime=Ue(),n.sibling=null,l=Fe.current,Me(Fe,s?l&1|2:l&1),n):(lt(n),null);case 22:case 23:return qs(),s=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(n.flags|=8192),s&&(n.mode&1)!==0?(Ct&1073741824)!==0&&(lt(n),n.subtreeFlags&6&&(n.flags|=8192)):lt(n),null;case 24:return null;case 25:return null}throw Error(r(156,n.tag))}function Im(e,n){switch(ts(n),n.tag){case 1:return pt(n.type)&&cl(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Cr(),Ae(dt),Ae(rt),hs(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return ds(n),null;case 13:if(Ae(Fe),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));kr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Ae(Fe),null;case 4:return Cr(),null;case 10:return ss(n.type._context),null;case 22:case 23:return qs(),null;case 24:return null;default:return null}}var Pl=!1,ot=!1,zm=typeof WeakSet=="function"?WeakSet:Set,te=null;function Er(e,n){var l=e.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(s){Be(e,n,s)}else l.current=null}function Rs(e,n,l){try{l()}catch(s){Be(e,n,s)}}var gf=!1;function Lm(e,n){if(qo=Yi,e=Qu(),Oo(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var s=l.getSelection&&l.getSelection();if(s&&s.rangeCount!==0){l=s.anchorNode;var f=s.anchorOffset,p=s.focusNode;s=s.focusOffset;try{l.nodeType,p.nodeType}catch{l=null;break e}var k=0,b=-1,N=-1,M=0,H=0,W=e,V=null;t:for(;;){for(var ee;W!==l||f!==0&&W.nodeType!==3||(b=k+f),W!==p||s!==0&&W.nodeType!==3||(N=k+s),W.nodeType===3&&(k+=W.nodeValue.length),(ee=W.firstChild)!==null;)V=W,W=ee;for(;;){if(W===e)break t;if(V===l&&++M===f&&(b=k),V===p&&++H===s&&(N=k),(ee=W.nextSibling)!==null)break;W=V,V=W.parentNode}W=ee}l=b===-1||N===-1?null:{start:b,end:N}}else l=null}l=l||{start:0,end:0}}else l=null;for(Qo={focusedElem:e,selectionRange:l},Yi=!1,te=n;te!==null;)if(n=te,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,te=e;else for(;te!==null;){n=te;try{var ie=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var oe=ie.memoizedProps,Ve=ie.memoizedState,I=n.stateNode,_=I.getSnapshotBeforeUpdate(n.elementType===n.type?oe:Ft(n.type,oe),Ve);I.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var z=n.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Q){Be(n,n.return,Q)}if(e=n.sibling,e!==null){e.return=n.return,te=e;break}te=n.return}return ie=gf,gf=!1,ie}function gi(e,n,l){var s=n.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var f=s=s.next;do{if((f.tag&e)===e){var p=f.destroy;f.destroy=void 0,p!==void 0&&Rs(n,l,p)}f=f.next}while(f!==s)}}function Il(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var l=n=n.next;do{if((l.tag&e)===e){var s=l.create;l.destroy=s()}l=l.next}while(l!==n)}}function Ms(e){var n=e.ref;if(n!==null){var l=e.stateNode;switch(e.tag){case 5:e=l;break;default:e=l}typeof n=="function"?n(e):n.current=e}}function xf(e){var n=e.alternate;n!==null&&(e.alternate=null,xf(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[qt],delete n[li],delete n[Xo],delete n[mm],delete n[gm])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function yf(e){return e.tag===5||e.tag===3||e.tag===4}function vf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yf(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.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 Ds(e,n,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?l.nodeType===8?l.parentNode.insertBefore(e,n):l.insertBefore(e,n):(l.nodeType===8?(n=l.parentNode,n.insertBefore(e,l)):(n=l,n.appendChild(e)),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=al));else if(s!==4&&(e=e.child,e!==null))for(Ds(e,n,l),e=e.sibling;e!==null;)Ds(e,n,l),e=e.sibling}function As(e,n,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(As(e,n,l),e=e.sibling;e!==null;)As(e,n,l),e=e.sibling}var tt=null,$t=!1;function En(e,n,l){for(l=l.child;l!==null;)kf(e,n,l),l=l.sibling}function kf(e,n,l){if(Wt&&typeof Wt.onCommitFiberUnmount=="function")try{Wt.onCommitFiberUnmount(Hi,l)}catch{}switch(l.tag){case 5:ot||Er(l,n);case 6:var s=tt,f=$t;tt=null,En(e,n,l),tt=s,$t=f,tt!==null&&($t?(e=tt,l=l.stateNode,e.nodeType===8?e.parentNode.removeChild(l):e.removeChild(l)):tt.removeChild(l.stateNode));break;case 18:tt!==null&&($t?(e=tt,l=l.stateNode,e.nodeType===8?Yo(e.parentNode,l):e.nodeType===1&&Yo(e,l),Gr(e)):Yo(tt,l.stateNode));break;case 4:s=tt,f=$t,tt=l.stateNode.containerInfo,$t=!0,En(e,n,l),tt=s,$t=f;break;case 0:case 11:case 14:case 15:if(!ot&&(s=l.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){f=s=s.next;do{var p=f,k=p.destroy;p=p.tag,k!==void 0&&((p&2)!==0||(p&4)!==0)&&Rs(l,n,k),f=f.next}while(f!==s)}En(e,n,l);break;case 1:if(!ot&&(Er(l,n),s=l.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=l.memoizedProps,s.state=l.memoizedState,s.componentWillUnmount()}catch(b){Be(l,n,b)}En(e,n,l);break;case 21:En(e,n,l);break;case 22:l.mode&1?(ot=(s=ot)||l.memoizedState!==null,En(e,n,l),ot=s):En(e,n,l);break;default:En(e,n,l)}}function wf(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var l=e.stateNode;l===null&&(l=e.stateNode=new zm),n.forEach(function(s){var f=Um.bind(null,e,s);l.has(s)||(l.add(s),s.then(f,f))})}}function Bt(e,n){var l=n.deletions;if(l!==null)for(var s=0;s<l.length;s++){var f=l[s];try{var p=e,k=n,b=k;e:for(;b!==null;){switch(b.tag){case 5:tt=b.stateNode,$t=!1;break e;case 3:tt=b.stateNode.containerInfo,$t=!0;break e;case 4:tt=b.stateNode.containerInfo,$t=!0;break e}b=b.return}if(tt===null)throw Error(r(160));kf(p,k,f),tt=null,$t=!1;var N=f.alternate;N!==null&&(N.return=null),f.return=null}catch(M){Be(f,n,M)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Sf(n,e),n=n.sibling}function Sf(e,n){var l=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(n,e),Kt(e),s&4){try{gi(3,e,e.return),Il(3,e)}catch(oe){Be(e,e.return,oe)}try{gi(5,e,e.return)}catch(oe){Be(e,e.return,oe)}}break;case 1:Bt(n,e),Kt(e),s&512&&l!==null&&Er(l,l.return);break;case 5:if(Bt(n,e),Kt(e),s&512&&l!==null&&Er(l,l.return),e.flags&32){var f=e.stateNode;try{Ne(f,"")}catch(oe){Be(e,e.return,oe)}}if(s&4&&(f=e.stateNode,f!=null)){var p=e.memoizedProps,k=l!==null?l.memoizedProps:p,b=e.type,N=e.updateQueue;if(e.updateQueue=null,N!==null)try{b==="input"&&p.type==="radio"&&p.name!=null&&Ar(f,p),Ht(b,k);var M=Ht(b,p);for(k=0;k<N.length;k+=2){var H=N[k],W=N[k+1];H==="style"?pn(f,W):H==="dangerouslySetInnerHTML"?be(f,W):H==="children"?Ne(f,W):A(f,H,W,M)}switch(b){case"input":ir(f,p);break;case"textarea":Fi(f,p);break;case"select":var V=f._wrapperState.wasMultiple;f._wrapperState.wasMultiple=!!p.multiple;var ee=p.value;ee!=null?dn(f,!!p.multiple,ee,!1):V!==!!p.multiple&&(p.defaultValue!=null?dn(f,!!p.multiple,p.defaultValue,!0):dn(f,!!p.multiple,p.multiple?[]:"",!1))}f[li]=p}catch(oe){Be(e,e.return,oe)}}break;case 6:if(Bt(n,e),Kt(e),s&4){if(e.stateNode===null)throw Error(r(162));f=e.stateNode,p=e.memoizedProps;try{f.nodeValue=p}catch(oe){Be(e,e.return,oe)}}break;case 3:if(Bt(n,e),Kt(e),s&4&&l!==null&&l.memoizedState.isDehydrated)try{Gr(n.containerInfo)}catch(oe){Be(e,e.return,oe)}break;case 4:Bt(n,e),Kt(e);break;case 13:Bt(n,e),Kt(e),f=e.child,f.flags&8192&&(p=f.memoizedState!==null,f.stateNode.isHidden=p,!p||f.alternate!==null&&f.alternate.memoizedState!==null||($s=Ue())),s&4&&wf(e);break;case 22:if(H=l!==null&&l.memoizedState!==null,e.mode&1?(ot=(M=ot)||H,Bt(n,e),ot=M):Bt(n,e),Kt(e),s&8192){if(M=e.memoizedState!==null,(e.stateNode.isHidden=M)&&!H&&(e.mode&1)!==0)for(te=e,H=e.child;H!==null;){for(W=te=H;te!==null;){switch(V=te,ee=V.child,V.tag){case 0:case 11:case 14:case 15:gi(4,V,V.return);break;case 1:Er(V,V.return);var ie=V.stateNode;if(typeof ie.componentWillUnmount=="function"){s=V,l=V.return;try{n=s,ie.props=n.memoizedProps,ie.state=n.memoizedState,ie.componentWillUnmount()}catch(oe){Be(s,l,oe)}}break;case 5:Er(V,V.return);break;case 22:if(V.memoizedState!==null){jf(W);continue}}ee!==null?(ee.return=V,te=ee):jf(W)}H=H.sibling}e:for(H=null,W=e;;){if(W.tag===5){if(H===null){H=W;try{f=W.stateNode,M?(p=f.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(b=W.stateNode,N=W.memoizedProps.style,k=N!=null&&N.hasOwnProperty("display")?N.display:null,b.style.display=_t("display",k))}catch(oe){Be(e,e.return,oe)}}}else if(W.tag===6){if(H===null)try{W.stateNode.nodeValue=M?"":W.memoizedProps}catch(oe){Be(e,e.return,oe)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===e)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===e)break e;for(;W.sibling===null;){if(W.return===null||W.return===e)break e;H===W&&(H=null),W=W.return}H===W&&(H=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:Bt(n,e),Kt(e),s&4&&wf(e);break;case 21:break;default:Bt(n,e),Kt(e)}}function Kt(e){var n=e.flags;if(n&2){try{e:{for(var l=e.return;l!==null;){if(yf(l)){var s=l;break e}l=l.return}throw Error(r(160))}switch(s.tag){case 5:var f=s.stateNode;s.flags&32&&(Ne(f,""),s.flags&=-33);var p=vf(e);As(e,p,f);break;case 3:case 4:var k=s.stateNode.containerInfo,b=vf(e);Ds(e,b,k);break;default:throw Error(r(161))}}catch(N){Be(e,e.return,N)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Rm(e,n,l){te=e,bf(e)}function bf(e,n,l){for(var s=(e.mode&1)!==0;te!==null;){var f=te,p=f.child;if(f.tag===22&&s){var k=f.memoizedState!==null||Pl;if(!k){var b=f.alternate,N=b!==null&&b.memoizedState!==null||ot;b=Pl;var M=ot;if(Pl=k,(ot=N)&&!M)for(te=f;te!==null;)k=te,N=k.child,k.tag===22&&k.memoizedState!==null?Ef(f):N!==null?(N.return=k,te=N):Ef(f);for(;p!==null;)te=p,bf(p),p=p.sibling;te=f,Pl=b,ot=M}Cf(e)}else(f.subtreeFlags&8772)!==0&&p!==null?(p.return=f,te=p):Cf(e)}}function Cf(e){for(;te!==null;){var n=te;if((n.flags&8772)!==0){var l=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:ot||Il(5,n);break;case 1:var s=n.stateNode;if(n.flags&4&&!ot)if(l===null)s.componentDidMount();else{var f=n.elementType===n.type?l.memoizedProps:Ft(n.type,l.memoizedProps);s.componentDidUpdate(f,l.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var p=n.updateQueue;p!==null&&Cc(n,p,s);break;case 3:var k=n.updateQueue;if(k!==null){if(l=null,n.child!==null)switch(n.child.tag){case 5:l=n.child.stateNode;break;case 1:l=n.child.stateNode}Cc(n,k,l)}break;case 5:var b=n.stateNode;if(l===null&&n.flags&4){l=b;var N=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":N.autoFocus&&l.focus();break;case"img":N.src&&(l.src=N.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var M=n.alternate;if(M!==null){var H=M.memoizedState;if(H!==null){var W=H.dehydrated;W!==null&&Gr(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}ot||n.flags&512&&Ms(n)}catch(V){Be(n,n.return,V)}}if(n===e){te=null;break}if(l=n.sibling,l!==null){l.return=n.return,te=l;break}te=n.return}}function jf(e){for(;te!==null;){var n=te;if(n===e){te=null;break}var l=n.sibling;if(l!==null){l.return=n.return,te=l;break}te=n.return}}function Ef(e){for(;te!==null;){var n=te;try{switch(n.tag){case 0:case 11:case 15:var l=n.return;try{Il(4,n)}catch(N){Be(n,l,N)}break;case 1:var s=n.stateNode;if(typeof s.componentDidMount=="function"){var f=n.return;try{s.componentDidMount()}catch(N){Be(n,f,N)}}var p=n.return;try{Ms(n)}catch(N){Be(n,p,N)}break;case 5:var k=n.return;try{Ms(n)}catch(N){Be(n,k,N)}}}catch(N){Be(n,n.return,N)}if(n===e){te=null;break}var b=n.sibling;if(b!==null){b.return=n.return,te=b;break}te=n.return}}var Mm=Math.ceil,zl=J.ReactCurrentDispatcher,Os=J.ReactCurrentOwner,Lt=J.ReactCurrentBatchConfig,_e=0,Xe=null,We=null,nt=0,Ct=0,Nr=wn(0),Ke=0,xi=null,qn=0,Ll=0,Fs=0,yi=null,mt=null,$s=0,_r=1/0,an=null,Rl=!1,Bs=null,Nn=null,Ml=!1,_n=null,Dl=0,vi=0,Us=null,Al=-1,Ol=0;function ct(){return(_e&6)!==0?Ue():Al!==-1?Al:Al=Ue()}function Tn(e){return(e.mode&1)===0?1:(_e&2)!==0&&nt!==0?nt&-nt:ym.transition!==null?(Ol===0&&(Ol=yu()),Ol):(e=ze,e!==0||(e=window.event,e=e===void 0?16:Nu(e.type)),e)}function Ut(e,n,l,s){if(50<vi)throw vi=0,Us=null,Error(r(185));Vr(e,l,s),((_e&2)===0||e!==Xe)&&(e===Xe&&((_e&2)===0&&(Ll|=l),Ke===4&&Pn(e,nt)),gt(e,s),l===1&&_e===0&&(n.mode&1)===0&&(_r=Ue()+500,dl&&bn()))}function gt(e,n){var l=e.callbackNode;yh(e,n);var s=Qi(e,e===Xe?nt:0);if(s===0)l!==null&&mu(l),e.callbackNode=null,e.callbackPriority=0;else if(n=s&-s,e.callbackPriority!==n){if(l!=null&&mu(l),n===1)e.tag===0?xm(_f.bind(null,e)):dc(_f.bind(null,e)),pm(function(){(_e&6)===0&&bn()}),l=null;else{switch(vu(s)){case 1:l=wo;break;case 4:l=gu;break;case 16:l=Vi;break;case 536870912:l=xu;break;default:l=Vi}l=Df(l,Nf.bind(null,e))}e.callbackPriority=n,e.callbackNode=l}}function Nf(e,n){if(Al=-1,Ol=0,(_e&6)!==0)throw Error(r(327));var l=e.callbackNode;if(Tr()&&e.callbackNode!==l)return null;var s=Qi(e,e===Xe?nt:0);if(s===0)return null;if((s&30)!==0||(s&e.expiredLanes)!==0||n)n=Fl(e,s);else{n=s;var f=_e;_e|=2;var p=Pf();(Xe!==e||nt!==n)&&(an=null,_r=Ue()+500,Gn(e,n));do try{Om();break}catch(b){Tf(e,b)}while(!0);os(),zl.current=p,_e=f,We!==null?n=0:(Xe=null,nt=0,n=Ke)}if(n!==0){if(n===2&&(f=So(e),f!==0&&(s=f,n=Vs(e,f))),n===1)throw l=xi,Gn(e,0),Pn(e,s),gt(e,Ue()),l;if(n===6)Pn(e,s);else{if(f=e.current.alternate,(s&30)===0&&!Dm(f)&&(n=Fl(e,s),n===2&&(p=So(e),p!==0&&(s=p,n=Vs(e,p))),n===1))throw l=xi,Gn(e,0),Pn(e,s),gt(e,Ue()),l;switch(e.finishedWork=f,e.finishedLanes=s,n){case 0:case 1:throw Error(r(345));case 2:Kn(e,mt,an);break;case 3:if(Pn(e,s),(s&130023424)===s&&(n=$s+500-Ue(),10<n)){if(Qi(e,0)!==0)break;if(f=e.suspendedLanes,(f&s)!==s){ct(),e.pingedLanes|=e.suspendedLanes&f;break}e.timeoutHandle=Ko(Kn.bind(null,e,mt,an),n);break}Kn(e,mt,an);break;case 4:if(Pn(e,s),(s&4194240)===s)break;for(n=e.eventTimes,f=-1;0<s;){var k=31-Dt(s);p=1<<k,k=n[k],k>f&&(f=k),s&=~p}if(s=f,s=Ue()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*Mm(s/1960))-s,10<s){e.timeoutHandle=Ko(Kn.bind(null,e,mt,an),s);break}Kn(e,mt,an);break;case 5:Kn(e,mt,an);break;default:throw Error(r(329))}}}return gt(e,Ue()),e.callbackNode===l?Nf.bind(null,e):null}function Vs(e,n){var l=yi;return e.current.memoizedState.isDehydrated&&(Gn(e,n).flags|=256),e=Fl(e,n),e!==2&&(n=mt,mt=l,n!==null&&Hs(n)),e}function Hs(e){mt===null?mt=e:mt.push.apply(mt,e)}function Dm(e){for(var n=e;;){if(n.flags&16384){var l=n.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var s=0;s<l.length;s++){var f=l[s],p=f.getSnapshot;f=f.value;try{if(!At(p(),f))return!1}catch{return!1}}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Pn(e,n){for(n&=~Fs,n&=~Ll,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var l=31-Dt(n),s=1<<l;e[l]=-1,n&=~s}}function _f(e){if((_e&6)!==0)throw Error(r(327));Tr();var n=Qi(e,0);if((n&1)===0)return gt(e,Ue()),null;var l=Fl(e,n);if(e.tag!==0&&l===2){var s=So(e);s!==0&&(n=s,l=Vs(e,s))}if(l===1)throw l=xi,Gn(e,0),Pn(e,n),gt(e,Ue()),l;if(l===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Kn(e,mt,an),gt(e,Ue()),null}function Ws(e,n){var l=_e;_e|=1;try{return e(n)}finally{_e=l,_e===0&&(_r=Ue()+500,dl&&bn())}}function Qn(e){_n!==null&&_n.tag===0&&(_e&6)===0&&Tr();var n=_e;_e|=1;var l=Lt.transition,s=ze;try{if(Lt.transition=null,ze=1,e)return e()}finally{ze=s,Lt.transition=l,_e=n,(_e&6)===0&&bn()}}function qs(){Ct=Nr.current,Ae(Nr)}function Gn(e,n){e.finishedWork=null,e.finishedLanes=0;var l=e.timeoutHandle;if(l!==-1&&(e.timeoutHandle=-1,dm(l)),We!==null)for(l=We.return;l!==null;){var s=l;switch(ts(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&cl();break;case 3:Cr(),Ae(dt),Ae(rt),hs();break;case 5:ds(s);break;case 4:Cr();break;case 13:Ae(Fe);break;case 19:Ae(Fe);break;case 10:ss(s.type._context);break;case 22:case 23:qs()}l=l.return}if(Xe=e,We=e=In(e.current,null),nt=Ct=n,Ke=0,xi=null,Fs=Ll=qn=0,mt=yi=null,Vn!==null){for(n=0;n<Vn.length;n++)if(l=Vn[n],s=l.interleaved,s!==null){l.interleaved=null;var f=s.next,p=l.pending;if(p!==null){var k=p.next;p.next=f,s.next=k}l.pending=s}Vn=null}return e}function Tf(e,n){do{var l=We;try{if(os(),Sl.current=El,bl){for(var s=$e.memoizedState;s!==null;){var f=s.queue;f!==null&&(f.pending=null),s=s.next}bl=!1}if(Wn=0,Ye=Ge=$e=null,fi=!1,di=0,Os.current=null,l===null||l.return===null){Ke=1,xi=n,We=null;break}e:{var p=e,k=l.return,b=l,N=n;if(n=nt,b.flags|=32768,N!==null&&typeof N=="object"&&typeof N.then=="function"){var M=N,H=b,W=H.tag;if((H.mode&1)===0&&(W===0||W===11||W===15)){var V=H.alternate;V?(H.updateQueue=V.updateQueue,H.memoizedState=V.memoizedState,H.lanes=V.lanes):(H.updateQueue=null,H.memoizedState=null)}var ee=Zc(k);if(ee!==null){ee.flags&=-257,ef(ee,k,b,p,n),ee.mode&1&&Jc(p,M,n),n=ee,N=M;var ie=n.updateQueue;if(ie===null){var oe=new Set;oe.add(N),n.updateQueue=oe}else ie.add(N);break e}else{if((n&1)===0){Jc(p,M,n),Qs();break e}N=Error(r(426))}}else if(Oe&&b.mode&1){var Ve=Zc(k);if(Ve!==null){(Ve.flags&65536)===0&&(Ve.flags|=256),ef(Ve,k,b,p,n),is(jr(N,b));break e}}p=N=jr(N,b),Ke!==4&&(Ke=2),yi===null?yi=[p]:yi.push(p),p=k;do{switch(p.tag){case 3:p.flags|=65536,n&=-n,p.lanes|=n;var I=Yc(p,N,n);bc(p,I);break e;case 1:b=N;var _=p.type,z=p.stateNode;if((p.flags&128)===0&&(typeof _.getDerivedStateFromError=="function"||z!==null&&typeof z.componentDidCatch=="function"&&(Nn===null||!Nn.has(z)))){p.flags|=65536,n&=-n,p.lanes|=n;var Q=Xc(p,b,n);bc(p,Q);break e}}p=p.return}while(p!==null)}zf(l)}catch(ae){n=ae,We===l&&l!==null&&(We=l=l.return);continue}break}while(!0)}function Pf(){var e=zl.current;return zl.current=El,e===null?El:e}function Qs(){(Ke===0||Ke===3||Ke===2)&&(Ke=4),Xe===null||(qn&268435455)===0&&(Ll&268435455)===0||Pn(Xe,nt)}function Fl(e,n){var l=_e;_e|=2;var s=Pf();(Xe!==e||nt!==n)&&(an=null,Gn(e,n));do try{Am();break}catch(f){Tf(e,f)}while(!0);if(os(),_e=l,zl.current=s,We!==null)throw Error(r(261));return Xe=null,nt=0,Ke}function Am(){for(;We!==null;)If(We)}function Om(){for(;We!==null&&!uh();)If(We)}function If(e){var n=Mf(e.alternate,e,Ct);e.memoizedProps=e.pendingProps,n===null?zf(e):We=n,Os.current=null}function zf(e){var n=e;do{var l=n.alternate;if(e=n.return,(n.flags&32768)===0){if(l=Pm(l,n,Ct),l!==null){We=l;return}}else{if(l=Im(l,n),l!==null){l.flags&=32767,We=l;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ke=6,We=null;return}}if(n=n.sibling,n!==null){We=n;return}We=n=e}while(n!==null);Ke===0&&(Ke=5)}function Kn(e,n,l){var s=ze,f=Lt.transition;try{Lt.transition=null,ze=1,Fm(e,n,l,s)}finally{Lt.transition=f,ze=s}return null}function Fm(e,n,l,s){do Tr();while(_n!==null);if((_e&6)!==0)throw Error(r(327));l=e.finishedWork;var f=e.finishedLanes;if(l===null)return null;if(e.finishedWork=null,e.finishedLanes=0,l===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var p=l.lanes|l.childLanes;if(vh(e,p),e===Xe&&(We=Xe=null,nt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||Ml||(Ml=!0,Df(Vi,function(){return Tr(),null})),p=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||p){p=Lt.transition,Lt.transition=null;var k=ze;ze=1;var b=_e;_e|=4,Os.current=null,Lm(e,l),Sf(l,e),lm(Qo),Yi=!!qo,Qo=qo=null,e.current=l,Rm(l),ch(),_e=b,ze=k,Lt.transition=p}else e.current=l;if(Ml&&(Ml=!1,_n=e,Dl=f),p=e.pendingLanes,p===0&&(Nn=null),ph(l.stateNode),gt(e,Ue()),n!==null)for(s=e.onRecoverableError,l=0;l<n.length;l++)f=n[l],s(f.value,{componentStack:f.stack,digest:f.digest});if(Rl)throw Rl=!1,e=Bs,Bs=null,e;return(Dl&1)!==0&&e.tag!==0&&Tr(),p=e.pendingLanes,(p&1)!==0?e===Us?vi++:(vi=0,Us=e):vi=0,bn(),null}function Tr(){if(_n!==null){var e=vu(Dl),n=Lt.transition,l=ze;try{if(Lt.transition=null,ze=16>e?16:e,_n===null)var s=!1;else{if(e=_n,_n=null,Dl=0,(_e&6)!==0)throw Error(r(331));var f=_e;for(_e|=4,te=e.current;te!==null;){var p=te,k=p.child;if((te.flags&16)!==0){var b=p.deletions;if(b!==null){for(var N=0;N<b.length;N++){var M=b[N];for(te=M;te!==null;){var H=te;switch(H.tag){case 0:case 11:case 15:gi(8,H,p)}var W=H.child;if(W!==null)W.return=H,te=W;else for(;te!==null;){H=te;var V=H.sibling,ee=H.return;if(xf(H),H===M){te=null;break}if(V!==null){V.return=ee,te=V;break}te=ee}}}var ie=p.alternate;if(ie!==null){var oe=ie.child;if(oe!==null){ie.child=null;do{var Ve=oe.sibling;oe.sibling=null,oe=Ve}while(oe!==null)}}te=p}}if((p.subtreeFlags&2064)!==0&&k!==null)k.return=p,te=k;else e:for(;te!==null;){if(p=te,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:gi(9,p,p.return)}var I=p.sibling;if(I!==null){I.return=p.return,te=I;break e}te=p.return}}var _=e.current;for(te=_;te!==null;){k=te;var z=k.child;if((k.subtreeFlags&2064)!==0&&z!==null)z.return=k,te=z;else e:for(k=_;te!==null;){if(b=te,(b.flags&2048)!==0)try{switch(b.tag){case 0:case 11:case 15:Il(9,b)}}catch(ae){Be(b,b.return,ae)}if(b===k){te=null;break e}var Q=b.sibling;if(Q!==null){Q.return=b.return,te=Q;break e}te=b.return}}if(_e=f,bn(),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(Hi,e)}catch{}s=!0}return s}finally{ze=l,Lt.transition=n}}return!1}function Lf(e,n,l){n=jr(l,n),n=Yc(e,n,1),e=jn(e,n,1),n=ct(),e!==null&&(Vr(e,1,n),gt(e,n))}function Be(e,n,l){if(e.tag===3)Lf(e,e,l);else for(;n!==null;){if(n.tag===3){Lf(n,e,l);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Nn===null||!Nn.has(s))){e=jr(l,e),e=Xc(n,e,1),n=jn(n,e,1),e=ct(),n!==null&&(Vr(n,1,e),gt(n,e));break}}n=n.return}}function $m(e,n,l){var s=e.pingCache;s!==null&&s.delete(n),n=ct(),e.pingedLanes|=e.suspendedLanes&l,Xe===e&&(nt&l)===l&&(Ke===4||Ke===3&&(nt&130023424)===nt&&500>Ue()-$s?Gn(e,0):Fs|=l),gt(e,n)}function Rf(e,n){n===0&&((e.mode&1)===0?n=1:(n=qi,qi<<=1,(qi&130023424)===0&&(qi=4194304)));var l=ct();e=ln(e,n),e!==null&&(Vr(e,n,l),gt(e,l))}function Bm(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),Rf(e,l)}function Um(e,n){var l=0;switch(e.tag){case 13:var s=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(r(314))}s!==null&&s.delete(n),Rf(e,l)}var Mf;Mf=function(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps||dt.current)ht=!0;else{if((e.lanes&l)===0&&(n.flags&128)===0)return ht=!1,Tm(e,n,l);ht=(e.flags&131072)!==0}else ht=!1,Oe&&(n.flags&1048576)!==0&&pc(n,hl,n.index);switch(n.lanes=0,n.tag){case 2:var s=n.type;Tl(e,n),e=n.pendingProps;var f=xr(n,rt.current);br(n,l),f=xs(null,n,s,e,f,l);var p=ys();return n.flags|=1,typeof f=="object"&&f!==null&&typeof f.render=="function"&&f.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,pt(s)?(p=!0,fl(n)):p=!1,n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,cs(n),f.updater=Nl,n.stateNode=f,f._reactInternals=n,Cs(n,s,e,l),n=_s(null,n,s,!0,p,l)):(n.tag=0,Oe&&p&&es(n),ut(null,n,f,l),n=n.child),n;case 16:s=n.elementType;e:{switch(Tl(e,n),e=n.pendingProps,f=s._init,s=f(s._payload),n.type=s,f=n.tag=Hm(s),e=Ft(s,e),f){case 0:n=Ns(null,n,s,e,l);break e;case 1:n=sf(null,n,s,e,l);break e;case 11:n=tf(null,n,s,e,l);break e;case 14:n=nf(null,n,s,Ft(s.type,e),l);break e}throw Error(r(306,s,""))}return n;case 0:return s=n.type,f=n.pendingProps,f=n.elementType===s?f:Ft(s,f),Ns(e,n,s,f,l);case 1:return s=n.type,f=n.pendingProps,f=n.elementType===s?f:Ft(s,f),sf(e,n,s,f,l);case 3:e:{if(af(n),e===null)throw Error(r(387));s=n.pendingProps,p=n.memoizedState,f=p.element,Sc(e,n),kl(n,s,null,l);var k=n.memoizedState;if(s=k.element,p.isDehydrated)if(p={element:s,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){f=jr(Error(r(423)),n),n=uf(e,n,s,l,f);break e}else if(s!==f){f=jr(Error(r(424)),n),n=uf(e,n,s,l,f);break e}else for(bt=kn(n.stateNode.containerInfo.firstChild),St=n,Oe=!0,Ot=null,l=kc(n,null,s,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(kr(),s===f){n=sn(e,n,l);break e}ut(e,n,s,l)}n=n.child}return n;case 5:return jc(n),e===null&&rs(n),s=n.type,f=n.pendingProps,p=e!==null?e.memoizedProps:null,k=f.children,Go(s,f)?k=null:p!==null&&Go(s,p)&&(n.flags|=32),of(e,n),ut(e,n,k,l),n.child;case 6:return e===null&&rs(n),null;case 13:return cf(e,n,l);case 4:return fs(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=wr(n,null,s,l):ut(e,n,s,l),n.child;case 11:return s=n.type,f=n.pendingProps,f=n.elementType===s?f:Ft(s,f),tf(e,n,s,f,l);case 7:return ut(e,n,n.pendingProps,l),n.child;case 8:return ut(e,n,n.pendingProps.children,l),n.child;case 12:return ut(e,n,n.pendingProps.children,l),n.child;case 10:e:{if(s=n.type._context,f=n.pendingProps,p=n.memoizedProps,k=f.value,Me(xl,s._currentValue),s._currentValue=k,p!==null)if(At(p.value,k)){if(p.children===f.children&&!dt.current){n=sn(e,n,l);break e}}else for(p=n.child,p!==null&&(p.return=n);p!==null;){var b=p.dependencies;if(b!==null){k=p.child;for(var N=b.firstContext;N!==null;){if(N.context===s){if(p.tag===1){N=on(-1,l&-l),N.tag=2;var M=p.updateQueue;if(M!==null){M=M.shared;var H=M.pending;H===null?N.next=N:(N.next=H.next,H.next=N),M.pending=N}}p.lanes|=l,N=p.alternate,N!==null&&(N.lanes|=l),as(p.return,l,n),b.lanes|=l;break}N=N.next}}else if(p.tag===10)k=p.type===n.type?null:p.child;else if(p.tag===18){if(k=p.return,k===null)throw Error(r(341));k.lanes|=l,b=k.alternate,b!==null&&(b.lanes|=l),as(k,l,n),k=p.sibling}else k=p.child;if(k!==null)k.return=p;else for(k=p;k!==null;){if(k===n){k=null;break}if(p=k.sibling,p!==null){p.return=k.return,k=p;break}k=k.return}p=k}ut(e,n,f.children,l),n=n.child}return n;case 9:return f=n.type,s=n.pendingProps.children,br(n,l),f=It(f),s=s(f),n.flags|=1,ut(e,n,s,l),n.child;case 14:return s=n.type,f=Ft(s,n.pendingProps),f=Ft(s.type,f),nf(e,n,s,f,l);case 15:return rf(e,n,n.type,n.pendingProps,l);case 17:return s=n.type,f=n.pendingProps,f=n.elementType===s?f:Ft(s,f),Tl(e,n),n.tag=1,pt(s)?(e=!0,fl(n)):e=!1,br(n,l),Gc(n,s,f),Cs(n,s,f,l),_s(null,n,s,!0,e,l);case 19:return df(e,n,l);case 22:return lf(e,n,l)}throw Error(r(156,n.tag))};function Df(e,n){return hu(e,n)}function Vm(e,n,l,s){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,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 Rt(e,n,l,s){return new Vm(e,n,l,s)}function Gs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hm(e){if(typeof e=="function")return Gs(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Z)return 11;if(e===G)return 14}return 2}function In(e,n){var l=e.alternate;return l===null?(l=Rt(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&14680064,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l}function $l(e,n,l,s,f,p){var k=2;if(s=e,typeof e=="function")Gs(e)&&(k=1);else if(typeof e=="string")k=5;else e:switch(e){case ue:return Yn(l.children,f,p,n);case ce:k=8,f|=8;break;case ge:return e=Rt(12,l,n,f|2),e.elementType=ge,e.lanes=p,e;case ve:return e=Rt(13,l,n,f),e.elementType=ve,e.lanes=p,e;case X:return e=Rt(19,l,n,f),e.elementType=X,e.lanes=p,e;case se:return Bl(l,f,p,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:k=10;break e;case Y:k=9;break e;case Z:k=11;break e;case G:k=14;break e;case $:k=16,s=null;break e}throw Error(r(130,e==null?e:typeof e,""))}return n=Rt(k,l,n,f),n.elementType=e,n.type=s,n.lanes=p,n}function Yn(e,n,l,s){return e=Rt(7,e,s,n),e.lanes=l,e}function Bl(e,n,l,s){return e=Rt(22,e,s,n),e.elementType=se,e.lanes=l,e.stateNode={isHidden:!1},e}function Ks(e,n,l){return e=Rt(6,e,null,n),e.lanes=l,e}function Ys(e,n,l){return n=Rt(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Wm(e,n,l,s,f){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=bo(0),this.expirationTimes=bo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bo(0),this.identifierPrefix=s,this.onRecoverableError=f,this.mutableSourceEagerHydrationData=null}function Xs(e,n,l,s,f,p,k,b,N){return e=new Wm(e,n,l,b,N),n===1?(n=1,p===!0&&(n|=8)):n=0,p=Rt(3,null,null,n),e.current=p,p.stateNode=e,p.memoizedState={element:s,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},cs(p),e}function qm(e,n,l){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:s==null?null:""+s,children:e,containerInfo:n,implementation:l}}function Af(e){if(!e)return Sn;e=e._reactInternals;e:{if(On(e)!==e||e.tag!==1)throw Error(r(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(pt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(r(171))}if(e.tag===1){var l=e.type;if(pt(l))return cc(e,l,n)}return n}function Of(e,n,l,s,f,p,k,b,N){return e=Xs(l,s,!0,e,f,p,k,b,N),e.context=Af(null),l=e.current,s=ct(),f=Tn(l),p=on(s,f),p.callback=n??null,jn(l,p,f),e.current.lanes=f,Vr(e,f,s),gt(e,s),e}function Ul(e,n,l,s){var f=n.current,p=ct(),k=Tn(f);return l=Af(l),n.context===null?n.context=l:n.pendingContext=l,n=on(p,k),n.payload={element:e},s=s===void 0?null:s,s!==null&&(n.callback=s),e=jn(f,n,k),e!==null&&(Ut(e,f,k,p),vl(e,f,k)),k}function Vl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ff(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function Js(e,n){Ff(e,n),(e=e.alternate)&&Ff(e,n)}function Qm(){return null}var $f=typeof reportError=="function"?reportError:function(e){console.error(e)};function Zs(e){this._internalRoot=e}Hl.prototype.render=Zs.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));Ul(e,n,null,null)},Hl.prototype.unmount=Zs.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Qn(function(){Ul(null,e,null,null)}),n[en]=null}};function Hl(e){this._internalRoot=e}Hl.prototype.unstable_scheduleHydration=function(e){if(e){var n=Su();e={blockedOn:null,target:e,priority:n};for(var l=0;l<xn.length&&n!==0&&n<xn[l].priority;l++);xn.splice(l,0,e),l===0&&ju(e)}};function ea(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Wl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Bf(){}function Gm(e,n,l,s,f){if(f){if(typeof s=="function"){var p=s;s=function(){var M=Vl(k);p.call(M)}}var k=Of(n,s,e,0,null,!1,!1,"",Bf);return e._reactRootContainer=k,e[en]=k.current,ri(e.nodeType===8?e.parentNode:e),Qn(),k}for(;f=e.lastChild;)e.removeChild(f);if(typeof s=="function"){var b=s;s=function(){var M=Vl(N);b.call(M)}}var N=Xs(e,0,!1,null,null,!1,!1,"",Bf);return e._reactRootContainer=N,e[en]=N.current,ri(e.nodeType===8?e.parentNode:e),Qn(function(){Ul(n,N,l,s)}),N}function ql(e,n,l,s,f){var p=l._reactRootContainer;if(p){var k=p;if(typeof f=="function"){var b=f;f=function(){var N=Vl(k);b.call(N)}}Ul(n,k,e,f)}else k=Gm(l,n,e,f,s);return Vl(k)}ku=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var l=Ur(n.pendingLanes);l!==0&&(Co(n,l|1),gt(n,Ue()),(_e&6)===0&&(_r=Ue()+500,bn()))}break;case 13:Qn(function(){var s=ln(e,1);if(s!==null){var f=ct();Ut(s,e,1,f)}}),Js(e,1)}},jo=function(e){if(e.tag===13){var n=ln(e,134217728);if(n!==null){var l=ct();Ut(n,e,134217728,l)}Js(e,134217728)}},wu=function(e){if(e.tag===13){var n=Tn(e),l=ln(e,n);if(l!==null){var s=ct();Ut(l,e,n,s)}Js(e,n)}},Su=function(){return ze},bu=function(e,n){var l=ze;try{return ze=e,n()}finally{ze=l}},xo=function(e,n,l){switch(n){case"input":if(ir(e,l),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<l.length;n++){var s=l[n];if(s!==e&&s.form===e.form){var f=ul(s);if(!f)throw Error(r(90));Di(s),ir(s,f)}}}break;case"textarea":Fi(e,l);break;case"select":n=l.value,n!=null&&dn(e,!!l.multiple,n,!1)}},su=Ws,au=Qn;var Km={usingClientEntryPoint:!1,Events:[oi,mr,ul,lu,ou,Ws]},ki={findFiberByHostInstance:Fn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ym={bundleType:ki.bundleType,version:ki.version,rendererPackageName:ki.rendererPackageName,rendererConfig:ki.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:J.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=du(e),e===null?null:e.stateNode},findFiberByHostInstance:ki.findFiberByHostInstance||Qm,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ql=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ql.isDisabled&&Ql.supportsFiber)try{Hi=Ql.inject(Ym),Wt=Ql}catch{}}return xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Km,xt.createPortal=function(e,n){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ea(n))throw Error(r(200));return qm(e,n,null,l)},xt.createRoot=function(e,n){if(!ea(e))throw Error(r(299));var l=!1,s="",f=$f;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(f=n.onRecoverableError)),n=Xs(e,1,!1,null,null,l,!1,s,f),e[en]=n.current,ri(e.nodeType===8?e.parentNode:e),new Zs(n)},xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=du(n),e=e===null?null:e.stateNode,e},xt.flushSync=function(e){return Qn(e)},xt.hydrate=function(e,n,l){if(!Wl(n))throw Error(r(200));return ql(null,e,n,!0,l)},xt.hydrateRoot=function(e,n,l){if(!ea(e))throw Error(r(405));var s=l!=null&&l.hydratedSources||null,f=!1,p="",k=$f;if(l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onRecoverableError!==void 0&&(k=l.onRecoverableError)),n=Of(n,null,e,1,l??null,f,!1,p,k),e[en]=n.current,ri(e),s)for(e=0;e<s.length;e++)l=s[e],f=l._getVersion,f=f(l._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[l,f]:n.mutableSourceEagerHydrationData.push(l,f);return new Hl(n)},xt.render=function(e,n,l){if(!Wl(n))throw Error(r(200));return ql(null,e,n,!1,l)},xt.unmountComponentAtNode=function(e){if(!Wl(e))throw Error(r(40));return e._reactRootContainer?(Qn(function(){ql(null,null,e,!1,function(){e._reactRootContainer=null,e[en]=null})}),!0):!1},xt.unstable_batchedUpdates=Ws,xt.unstable_renderSubtreeIntoContainer=function(e,n,l,s){if(!Wl(l))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return ql(e,n,l,!1,s)},xt.version="18.3.1-next-f1338f8080-20240426",xt}var Kf;function ig(){if(Kf)return ra.exports;Kf=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),ra.exports=rg(),ra.exports}var Yf;function lg(){if(Yf)return Gl;Yf=1;var t=ig();return Gl.createRoot=t.createRoot,Gl.hydrateRoot=t.hydrateRoot,Gl}var og=lg();const sg=lo(og),Nt=(t,i)=>({width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:i}),ag=({size:t=19,className:i})=>g.jsx("svg",{...Nt(t,i),children:g.jsx("path",{d:"M4 6h16v10H10l-4 3v-3H4z"})}),ug=({size:t=19,className:i})=>g.jsxs("svg",{...Nt(t,i),children:[g.jsx("circle",{cx:"12",cy:"12",r:"8.5"}),g.jsx("path",{d:"M12 7.5V12l3 1.8"})]}),cg=({size:t=19,className:i})=>g.jsx("svg",{...Nt(t,i),children:g.jsx("path",{d:"M4 7h6l2 2h8v9H4z"})}),fg=({size:t=19,className:i})=>g.jsxs("svg",{...Nt(t,i),children:[g.jsx("circle",{cx:"7",cy:"7",r:"2.4"}),g.jsx("circle",{cx:"17",cy:"7",r:"2.4"}),g.jsx("circle",{cx:"7",cy:"17",r:"2.4"}),g.jsx("circle",{cx:"17",cy:"17",r:"2.4"})]}),dg=({size:t=18,className:i})=>g.jsxs("svg",{...Nt(t,i),children:[g.jsx("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),g.jsx("line",{x1:"4",y1:"13",x2:"20",y2:"13"}),g.jsx("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),oo=({size:t=13,className:i})=>g.jsx("svg",{...Nt(t,i),strokeWidth:2,children:g.jsx("path",{d:"m6 9 6 6 6-6"})}),Qd=({size:t=13,className:i})=>g.jsx("svg",{...Nt(t,i),strokeWidth:2.2,children:g.jsx("path",{d:"M12 5v14M5 12h14"})}),Gd=({size:t=15,className:i})=>g.jsx("svg",{...Nt(t,i),children:g.jsx("path",{d:"M21 12a9 9 0 1 1-3-6.7M21 4v4h-4"})}),pg=({size:t=15,className:i})=>g.jsx("svg",{...Nt(t,i),strokeWidth:2.2,children:g.jsx("path",{d:"M5 12h14M13 6l6 6-6 6"})}),so=({size:t=14,className:i})=>g.jsx("svg",{...Nt(t,i),strokeWidth:1.9,children:g.jsx("path",{d:"M12 4v11m0 0 4-4m-4 4-4-4M5 20h14"})}),ao=({size:t=14,className:i})=>g.jsx("svg",{...Nt(t,i),strokeWidth:1.9,children:g.jsx("path",{d:"M4 7h16M10 7V5h4v2M9 7l.8 13h4.4L15 7M6.5 7l.7 13h9.6l.7-13"})}),hg=({size:t=14,className:i})=>g.jsxs("svg",{...Nt(t,i),strokeWidth:1.7,children:[g.jsx("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"}),g.jsx("path",{d:"M5 15V5a2 2 0 0 1 2-2h8"})]}),mg=({size:t=14,className:i})=>g.jsx("svg",{...Nt(t,i),strokeWidth:2.3,children:g.jsx("path",{d:"m5 12 4.5 4.5L19 7"})}),Kd=({size:t=30})=>g.jsx("div",{className:"flex items-center justify-center bg-accent",style:{width:t,height:t,border:"3px solid #fff",boxShadow:"3px 3px 0 #ff5436",borderRadius:7},children:g.jsx("div",{style:{width:t*.3,height:t*.3,background:"#fff"}})}),gg=[{id:"chat",label:"Chat",icon:g.jsx(ag,{})},{id:"history",label:"Historique",icon:g.jsx(ug,{})},{id:"files",label:"Fichiers",icon:g.jsx(cg,{})},{id:"tools",label:"Outils",icon:g.jsx(fg,{})}],Xf=t=>`flex h-10 w-10 items-center justify-center border-[3px] ${t?"border-white bg-accent text-white shadow-accent-soft":"border-chrome-3 text-on-dark-2 hover:text-white"}`;function xg({active:t,onChange:i}){return g.jsxs("div",{className:"flex w-[60px] flex-none flex-col items-center gap-2 border-r-[3px] border-line bg-bar py-3",children:[gg.map(r=>g.jsx("button",{onClick:()=>i(r.id),className:Xf(t===r.id),title:r.label,"aria-label":r.label,children:r.icon},r.id)),g.jsx("div",{className:"flex-1"}),g.jsx("button",{onClick:()=>i("settings"),className:Xf(t==="settings"),title:"Configuration","aria-label":"Configuration",children:g.jsx(dg,{})}),g.jsx("div",{className:"font-pixel flex h-[34px] w-[34px] items-center justify-center border-[3px] border-white bg-white text-[11px] text-line",children:"M"})]})}const Jf=t=>{let i;const r=new Set,o=(h,y)=>{const x=typeof h=="function"?h(i):h;if(!Object.is(x,i)){const v=i;i=y??(typeof x!="object"||x===null)?x:Object.assign({},i,x),r.forEach(w=>w(i,v))}},a=()=>i,d={setState:o,getState:a,getInitialState:()=>m,subscribe:h=>(r.add(h),()=>r.delete(h))},m=i=t(o,a,d);return d},yg=(t=>t?Jf(t):Jf),vg=t=>t;function kg(t,i=vg){const r=Ei.useSyncExternalStore(t.subscribe,Ei.useCallback(()=>i(t.getState()),[t,i]),Ei.useCallback(()=>i(t.getInitialState()),[t,i]));return Ei.useDebugValue(r),r}const Zf=t=>{const i=yg(t),r=o=>kg(i,o);return Object.assign(r,i),r},wg=(t=>t?Zf(t):Zf);async function Sg(){return(await fetch("/api/status")).json()}async function bg(){return(await fetch("/api/system/stats")).json()}const uo=t=>t?`&project=${encodeURIComponent(t)}`:"";async function Cg(t){try{return(await(await fetch(`/api/git/log?limit=40${uo(t)}`)).json()).commits}catch{return[]}}async function jg(t,i){const r=new URLSearchParams;t&&r.set("hash",t),i&&r.set("project",i);const o=r.toString(),a=await fetch(`/api/git/diff${o?`?${o}`:""}`);return a.ok?(await a.json()).diff:""}async function Eg(t,i){const r=await fetch("/api/git/revert",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({hash:t,project:i??null})});if(!r.ok)throw await un(r,"revert impossible");return r.json()}async function Ng(){return(await fetch("/api/system/hardware")).json()}async function _g(){try{return(await(await fetch("/api/version")).json()).version??"?"}catch{return"?"}}async function un(t,i){try{const r=await t.json();return new Error((r==null?void 0:r.detail)??(r==null?void 0:r.error)??i)}catch{return new Error(i)}}const Tg=t=>new Promise(i=>setTimeout(i,t));async function Pg(t,i="30m"){const r=await fetch("/api/models/warm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,keep_alive:i})});if(!r.ok)throw await un(r,`préchargement refusé (${r.status})`);const o=Date.now()+600*1e3;let a=1e3;for(;Date.now()<o;){const c=await fetch(`/api/models/warm/status?name=${encodeURIComponent(t)}`,{cache:"no-store"});if(!c.ok)throw await un(c,`suivi du préchargement refusé (${c.status})`);const u=await c.json();if(u.state==="loaded")return u;if(u.state==="error")throw new Error(u.error??"préchargement impossible");await Tg(a),a=Math.min(a*1.5,5e3)}throw new Error("préchargement toujours en cours après 10 minutes")}async function Ig(){try{return(await(await fetch("/api/models/loaded")).json()).loaded}catch{return[]}}async function zg(){return(await fetch("/api/models")).json()}async function Lg(t){const i=await fetch("/api/models",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})});if(!i.ok){const r=await i.json().catch(()=>null);throw new Error((r==null?void 0:r.detail)??`suppression refusée (${i.status})`)}}async function Rg(){return(await(await fetch("/api/bench")).json()).scores}async function Mg(t,i){let r;try{r=await fetch("/api/bench",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:t})})}catch(m){const h=m instanceof Error?m.message:"connexion impossible";throw new Error(/network error|failed to fetch|load failed/i.test(h)?"connexion au benchmark interrompue par le réseau ou le reverse proxy":h)}if(!r.ok)throw await un(r,`benchmark refusé (${r.status})`);if(!r.body)throw new Error("le serveur n'a pas renvoyé de progression");const o=r.body.getReader(),a=new TextDecoder;let c="",u=null;const d=m=>{let h="message";const y=[];for(const v of m.replace(/\r\n/g,`
|
||
`).split(`
|
||
`))v.startsWith("event:")?h=v.slice(6).trim():v.startsWith("data:")&&y.push(v.slice(5).trimStart());if(y.length===0)return;const x=JSON.parse(y.join(`
|
||
`));if(h==="task_start")i(x.task,null);else if(h==="task_done")i(x.task,x.score,x.detail);else{if(h==="error")throw new Error(x.message??"le benchmark a échoué");h==="done"&&(u={score:x.score,details:x.details,at:Date.now()/1e3})}};try{for(;;){const{done:m,value:h}=await o.read();if(m)break;c+=a.decode(h,{stream:!0}).replace(/\r\n/g,`
|
||
`);const y=c.split(`
|
||
|
||
`);c=y.pop()??"";for(const x of y)x.trim()&&d(x)}c+=a.decode(),c.trim()&&d(c)}catch(m){const h=m instanceof Error?m.message:"connexion interrompue";throw/network error|failed to fetch|load failed/i.test(h)?new Error("flux du benchmark interrompu par le reverse proxy"):m}if(!u)throw new Error("le benchmark s'est interrompu avant le résultat");return u}async function Dg(t){return(await fetch("/api/shell/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:t})})).json()}async function Ag(t){const i=t?`?model=${encodeURIComponent(t)}`:"";return(await fetch(`/api/config${i}`)).json()}async function Og(t,i){const r=i?`?model=${encodeURIComponent(i)}`:"";return(await(await fetch(`/api/config${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()).config}async function Fg(t){const i=t?`?project=${encodeURIComponent(t)}`:"";return(await(await fetch(`/api/files${i}`)).json()).tree}async function $g(t,i){const r=await fetch(`/api/files/content?path=${encodeURIComponent(t)}${uo(i)}`);return r.ok?(await r.json()).content:""}async function Bg(t,i){const r=await fetch(`/api/files?path=${encodeURIComponent(t)}${uo(i)}`,{method:"DELETE"});if(!r.ok)throw await un(r,`suppression impossible (${r.status})`)}function Oa(t,i){const r=document.createElement("a");r.href=`/api/files/download?path=${encodeURIComponent(t)}${uo(i)}`,r.download=t.split(/[\\/]/).pop()??"fichier",document.body.appendChild(r),r.click(),r.remove()}async function Ug(){return(await(await fetch("/api/mcp")).json()).servers}async function ed(t,i,r){const o=await fetch(`/api/mcp/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:i,params:r})});if(!o.ok)throw await un(o,"mise à jour MCP impossible");return(await o.json()).servers}async function Vg(t){return(await fetch(`/api/mcp/${t}/test`,{method:"POST"})).json()}async function Hg(){return(await(await fetch("/api/sessions")).json()).sessions}async function oa(t,i){return(await fetch("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"Nouvelle session",model:t,project:i??null})})).json()}async function Wg(){return(await fetch("/api/projects")).json()}async function qg(t){const i=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})});if(!i.ok)throw await un(i,"création du projet impossible")}async function Qg(t,i){const r=await fetch(`/api/sessions/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({project:i??""})});if(!r.ok)throw await un(r,"changement de projet impossible")}async function Gg(t){return(await fetch(`/api/sessions/${t}`)).json()}async function Kg(t){await fetch(`/api/sessions/${t}`,{method:"DELETE"})}async function Yg(t,i){const r=await fetch(`/api/sessions/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:i})});if(!r.ok)throw await un(r,`renommage impossible (${r.status})`)}async function Xg(t,i,r){var y,x;let o;try{o=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),signal:r})}catch(v){if(v instanceof DOMException&&v.name==="AbortError"){(y=i.onAbort)==null||y.call(i);return}const w=v instanceof Error?v.message:"serveur Loki injoignable";i.onError(/network error|failed to fetch/i.test(w)?"Serveur Loki injoignable. Vérifiez le reverse proxy et le conteneur.":w);return}if(!o.ok){let v=`requête refusée (${o.status})`;try{const w=await o.json();v=w.detail??w.error??v}catch{}i.onError(v);return}if(!o.body){i.onError("pas de flux de réponse");return}const a=o.body.getReader(),c=new TextDecoder;let u="",d=!1,m=!1;const h=v=>{var j,T;const w=v.replace(/\r\n/g,`
|
||
`);let E="message";const L=[];for(const O of w.split(`
|
||
`))O.startsWith("event:")?E=O.slice(6).trim():O.startsWith("data:")&&L.push(O.slice(5).trimStart());if(L.length!==0)try{const O=JSON.parse(L.join(`
|
||
`));E==="token"?i.onToken(O.content):E==="plan"?(j=i.onPlan)==null||j.call(i,O.steps):E==="revision"?(T=i.onRevision)==null||T.call(i,O.content):E==="thinking"?i.onThinking(O.content):E==="status"?i.onStatus(O.message):E==="notice"?i.onNotice(O.message):E==="tool_call"?i.onToolCall({...O,status:"running"}):E==="tool_result"?i.onToolResult(O):E==="tool_confirm"?i.onToolConfirm(O.command):E==="error"?(m=!0,i.onError(O.message)):E==="done"&&(d=!0,O.error?(m||i.onError(O.error),m=!0):m||i.onDone(O.content))}catch{m||(m=!0,i.onError("réponse illisible reçue du serveur"))}};try{for(;;){const{done:v,value:w}=await a.read();if(v)break;u+=c.decode(w,{stream:!0}).replace(/\r\n/g,`
|
||
`);const E=u.split(`
|
||
|
||
`);u=E.pop()??"";for(const L of E)L.trim()&&h(L)}u+=c.decode(),u.trim()&&h(u)}catch(v){if(!m){if(v instanceof DOMException&&v.name==="AbortError"){(x=i.onAbort)==null||x.call(i);return}m=!0;const w=v instanceof Error?v.message:"connexion interrompue";i.onError(/network error|failed to fetch/i.test(w)?"Connexion interrompue pendant le chargement du modèle. Vérifiez OLLAMA_HOST et le délai du reverse proxy.":w)}}!d&&!m&&i.onError("le serveur a fermé la réponse avant sa fin")}async function Jg(t,i){const r=await fetch("/api/models/pull",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})});if(!r.body)return;const o=r.body.getReader(),a=new TextDecoder;let c="";for(;;){const{done:u,value:d}=await o.read();if(u)break;c+=a.decode(d,{stream:!0});const m=c.split(`
|
||
|
||
`);c=m.pop()??"";for(const h of m){const y=h.replace(/^data: /,"").trim();if(!(!y||y==="[DONE]"))try{const x=JSON.parse(y),v=x.total&&x.completed?Math.round(x.completed/x.total*100):0;i(x.status??"",v)}catch{}}}}let Ln=null;const Qe=wg((t,i)=>({status:null,systemStats:null,loadedModels:[],warmingModel:null,warmError:null,models:[],selectedModel:"",loadingModels:!1,sessions:[],currentSessionId:null,messages:[],streaming:!1,streamingSessionId:null,streamContent:"",streamThinking:"",streamStatus:"",streamNotice:null,streamTools:[],streamPlan:[],fileTree:[],previewPath:null,previewContent:"",projects:[],config:null,availableTools:[],pendingShell:null,mode:"build",setMode:r=>t({mode:r}),approveShell:async()=>{const r=i().pendingShell;if(!r)return;t({pendingShell:null});let o;try{const a=await Dg(r);o=`J'ai validé la commande \`${r}\` (code ${a.exit_code}).
|
||
Sortie :
|
||
\`\`\`
|
||
${a.output||"(vide)"}
|
||
\`\`\``}catch{o=`Échec de l'exécution de \`${r}\`.`}await i().refreshFiles(),await i().sendMessage(o)},rejectShell:async()=>{const r=i().pendingShell;r&&(t({pendingShell:null}),await i().sendMessage(`J'ai refusé la commande \`${r}\`. N'exécute pas cette commande.`))},refreshConfig:async()=>{const r=i().selectedModel,{config:o,available_tools:a}=await Ag(r||void 0);i().selectedModel===r&&t({config:o,availableTools:a})},updateConfig:async r=>{const o=await Og(r,i().selectedModel||void 0);t({config:o})},openPreview:async r=>{const o=await $g(r,i().currentProject());t({previewPath:r,previewContent:o})},setSelectedModel:r=>{t({selectedModel:r,warmingModel:r||null,warmError:null}),(async()=>{var o;try{if(await i().refreshConfig(),!r||i().selectedModel!==r)return;const a=((o=i().config)==null?void 0:o.keep_alive)??"30m",c=await Pg(r,a);await i().refreshLoadedModels(),(c.processor==="cpu"||c.processor==="mixte")&&i().selectedModel===r&&t({warmError:c.processor==="cpu"?"Modèle chargé sur le CPU (trop gros pour la VRAM) — lent. Choisis un modèle plus petit ou une quantization plus légère.":`Modèle en partie sur GPU (${c.gpu_percent??"?"}%) : dépasse la VRAM, chargement plus lent.`})}catch(a){i().selectedModel===r&&t({warmError:a instanceof Error?a.message:"préchargement impossible"})}finally{i().warmingModel===r&&t({warmingModel:null})}})()},refreshFiles:async()=>{try{t({fileTree:await Fg(i().currentProject())})}catch{}},refreshProjects:async()=>{try{const{projects:r}=await Wg();t({projects:r})}catch{}},currentProject:()=>{const r=i().sessions.find(o=>o.id===i().currentSessionId);return(r==null?void 0:r.project)??null},setProject:async r=>{const o=i().currentSessionId;if(o)await Qg(o,r);else{const a=await oa(i().selectedModel||void 0,r);t({currentSessionId:a.id,messages:[]})}await i().refreshSessions(),t({previewPath:null,previewContent:""}),await i().refreshFiles()},refreshStatus:async()=>{try{const r=await Sg();t({status:r})}catch{t({status:{connected:!1,host:"",default_model:""}})}},refreshSystemStats:async()=>{try{t({systemStats:await bg()})}catch{t({systemStats:null})}},refreshLoadedModels:async()=>{t({loadedModels:await Ig()})},refreshModels:async()=>{var r;t({loadingModels:!0});try{const{models:o,default:a}=await zg(),c=new Set(o.map(m=>m.name)),u=i().selectedModel,d=c.has(u)?u:c.has(a)?a:((r=o[0])==null?void 0:r.name)??"";t({models:o}),i().setSelectedModel(d)}finally{t({loadingModels:!1})}},refreshSessions:async()=>{const r=await Hg();t({sessions:r})},newSession:async()=>{const r=await oa(i().selectedModel||void 0,i().currentProject()),o=i().streaming;t({currentSessionId:r.id,messages:[],...o?{}:{streamContent:"",streamStatus:"",streamNotice:null}}),await i().refreshSessions()},openSession:async r=>{const{messages:o}=await Gg(r),a=i().streaming;t({currentSessionId:r,messages:o,...a?{}:{streamContent:"",streamStatus:"",streamNotice:null}}),await i().refreshFiles()},removeSession:async r=>{await Kg(r),i().currentSessionId===r&&t({currentSessionId:null,messages:[]}),await i().refreshSessions()},renameSession:async(r,o)=>{const a=o.trim();a&&(await Yg(r,a),await i().refreshSessions())},removeFile:async r=>{await Bg(r,i().currentProject());const o=i().previewPath;o&&(o===r||o.startsWith(r+"/"))&&t({previewPath:null,previewContent:""}),await i().refreshFiles()},stopStreaming:()=>{Ln==null||Ln.abort(),Ln=null,t({streaming:!1,streamingSessionId:null,streamContent:"",streamThinking:"",streamStatus:"",streamNotice:null,streamTools:[],streamPlan:[],pendingShell:null}),i().refreshSessions()},sendMessage:async r=>{if(i().streaming||(r=r.trim(),!r))return;if(!i().selectedModel){const u={id:`err-${Date.now()}`,session_id:i().currentSessionId??"",role:"assistant",content:"⚠️ Aucun modèle Ollama installé ou sélectionné.",created_at:Date.now()/1e3};t({messages:[...i().messages,u]});return}let o=i().currentSessionId;try{if(!o){const u=await oa(i().selectedModel||void 0);o=u.id,t({currentSessionId:u.id})}}catch(u){const d=u instanceof Error?u.message:"backend injoignable",m={id:`err-${Date.now()}`,session_id:"",role:"assistant",content:`⚠️ Impossible de créer la session : ${d}`,created_at:Date.now()/1e3};t({messages:[...i().messages,m]});return}const a={id:`tmp-${Date.now()}`,session_id:o,role:"user",content:r,created_at:Date.now()/1e3};t({messages:[...i().messages,a],streaming:!0,streamingSessionId:o,streamContent:"",streamThinking:"",streamStatus:"Connexion à Ollama…",streamNotice:null,streamTools:[],pendingShell:null});const c=new AbortController;Ln=c,await Xg({session_id:o,content:r,model:i().selectedModel||void 0,mode:i().mode},{onToken:u=>t({streamContent:i().streamContent+u}),onThinking:u=>t({streamThinking:i().streamThinking+u}),onStatus:u=>t({streamStatus:u}),onPlan:u=>t({streamPlan:u}),onRevision:u=>t({streamContent:u}),onNotice:u=>t({streamNotice:u}),onToolCall:u=>t({streamTools:[...i().streamTools,u]}),onToolResult:u=>{const d=[...i().streamTools];for(let m=d.length-1;m>=0;m--)if(d[m].name===u.name&&d[m].status==="running"){d[m]={...d[m],...u};break}t({streamTools:d})},onToolConfirm:u=>t({pendingShell:u}),onDone:async()=>{Ln=null;const u=[...i().streamTools].reverse().find(d=>{var m;return d.name==="write_file"&&typeof((m=d.args)==null?void 0:m.path)=="string"&&/\.html?$/.test(d.args.path)});t({streaming:!1,streamingSessionId:null,streamContent:"",streamThinking:"",streamStatus:"",streamNotice:null,streamTools:[]}),await Promise.all([i().currentSessionId===o?i().openSession(o):Promise.resolve(),i().refreshSessions(),i().refreshFiles()]),u&&await i().openPreview(u.args.path)},onError:u=>{Ln=null;const d={id:`err-${Date.now()}`,session_id:o,role:"assistant",content:`⚠️ Erreur : ${u}`,created_at:Date.now()/1e3};t({streaming:!1,streamingSessionId:null,streamContent:"",streamThinking:"",streamStatus:"",streamNotice:null,streamTools:[],messages:i().currentSessionId===o?[...i().messages,d]:i().messages}),i().refreshSessions()},onAbort:()=>{Ln=null,t({streaming:!1,streamingSessionId:null,streamContent:"",streamThinking:"",streamStatus:"",streamNotice:null,streamTools:[],pendingShell:null}),i().refreshSessions()}},c.signal)}}));function Yd(t){const i=Date.now()/1e3-t;return i<60?"à l'instant":i<3600?`il y a ${Math.floor(i/60)} min`:i<86400?`il y a ${Math.floor(i/3600)} h`:`il y a ${Math.floor(i/86400)} j`}function Zg(){const{sessions:t,currentSessionId:i,streamingSessionId:r,newSession:o,openSession:a,removeSession:c,renameSession:u}=Qe(),[d,m]=ne.useState(!1),[h,y]=ne.useState(null),[x,v]=ne.useState(""),w=ne.useRef(null),E=t.find(j=>j.id===i);ne.useEffect(()=>{if(!d)return;const j=O=>{w.current&&!w.current.contains(O.target)&&(m(!1),y(null))},T=O=>{O.key==="Escape"&&(m(!1),y(null))};return document.addEventListener("mousedown",j),document.addEventListener("keydown",T),()=>{document.removeEventListener("mousedown",j),document.removeEventListener("keydown",T)}},[d]);const L=async j=>{const T=x.trim();y(null),T&&await u(j,T)};return g.jsxs("div",{ref:w,className:"relative",children:[g.jsxs("button",{onClick:()=>m(j=>!j),className:"flex cursor-pointer items-center gap-2 text-[13px] text-on-dark hover:text-white",title:"Sessions",children:[g.jsx("span",{className:"max-w-[220px] truncate",children:(E==null?void 0:E.title)??"Nouvelle session"}),g.jsx(oo,{className:"text-on-dark-3"})]}),d&&g.jsxs("div",{className:"absolute left-0 top-[calc(100%+9px)] z-30 w-[300px] border-[3px] border-line bg-chrome-2 shadow-hard",style:{borderRadius:7},children:[g.jsxs("button",{onClick:async()=>{m(!1),await o()},className:"flex w-full cursor-pointer items-center gap-2 border-b-[3px] border-chrome-3 px-3 py-2.5 text-[13px] font-bold text-accent hover:bg-chrome-3",children:[g.jsx(Qd,{}),"Nouvelle session"]}),g.jsxs("div",{className:"scr max-h-[320px] overflow-auto",children:[t.length===0&&g.jsx("div",{className:"px-3 py-4 text-center text-[12px] text-on-dark-3",children:"Aucune session enregistrée."}),t.map(j=>{const T=j.id===i,O=j.id===r;return g.jsxs("div",{onClick:()=>{h!==j.id&&(m(!1),a(j.id))},className:`group cursor-pointer border-b-2 border-chrome-3 px-3 py-2 last:border-b-0 ${T?"bg-chrome-3":"hover:bg-chrome-3"}`,children:[g.jsxs("div",{className:"flex items-center gap-1.5",children:[h===j.id?g.jsx("input",{autoFocus:!0,value:x,onChange:A=>v(A.target.value),onClick:A=>A.stopPropagation(),onKeyDown:A=>{A.key==="Enter"&&L(j.id),A.key==="Escape"&&(A.stopPropagation(),y(null))},onBlur:()=>y(null),className:"min-w-0 flex-1 border-2 border-line bg-card-deep px-1.5 py-0.5 text-[13px] text-white outline-none"}):g.jsx("span",{className:`min-w-0 flex-1 truncate text-[13px] ${T?"text-white":"text-on-dark"}`,children:j.title}),O&&g.jsx("span",{className:"flex-none border-2 border-line bg-accent px-1 py-0.5 text-[9px] leading-none text-white",title:"Session en cours de travail",children:"EN COURS"}),g.jsx("button",{onClick:A=>{A.stopPropagation(),y(j.id),v(j.title)},className:"hidden flex-none text-[11px] text-on-dark-3 hover:text-white group-hover:block",title:"Renommer la session",children:"✎"}),g.jsx("button",{onClick:A=>{A.stopPropagation(),window.confirm("Supprimer cette session ?")&&c(j.id)},className:"hidden flex-none text-on-dark-3 hover:text-accent group-hover:block",title:"Supprimer la session",children:g.jsx(ao,{size:12})})]}),g.jsxs("div",{className:"mt-0.5 text-[11px] text-on-dark-3",children:[Yd(j.updated_at)," · ",j.message_count??0," message",(j.message_count??0)>1?"s":""]})]},j.id)})]})]})]})}function ex(){const t=Qe(c=>c.status),i=Qe(c=>c.systemStats),r=(t==null?void 0:t.connected)??!1,[o,a]=ne.useState("");return ne.useEffect(()=>{_g().then(a)},[]),g.jsxs("div",{className:"flex h-[54px] flex-none items-center gap-3.5 border-b-[3px] border-line bg-bar px-4",children:[g.jsxs("div",{className:"flex items-center gap-2.5",children:[g.jsx(Kd,{}),g.jsx("div",{className:"font-pixel text-[14px] text-white",children:"LOKI"}),g.jsxs("div",{className:"text-[13px] leading-none text-on-dark-2",title:o?`build ${o}`:void 0,children:["agent local",o&&o!=="dev"&&g.jsxs("span",{className:"ml-1.5 text-on-dark-3",children:["· ",o.slice(0,7)]})]})]}),g.jsx("div",{className:"h-6 w-[3px] bg-chrome-3"}),g.jsx(Zg,{}),g.jsx("div",{className:"flex-1"}),i&&g.jsxs("div",{className:"flex h-8 items-center gap-2.5 border-[3px] border-chrome-3 bg-chrome-2 px-[11px] text-[13px] text-on-dark",children:[g.jsxs("span",{children:["CPU ",i.cpu_pct.toFixed(0),"%"]}),g.jsx("span",{className:"text-on-dark-3",children:"·"}),g.jsxs("span",{children:["RAM ",i.ram_pct.toFixed(0),"%"]}),i.gpu&&g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-on-dark-3",children:"·"}),g.jsxs("span",{children:["GPU ",i.gpu.util_pct.toFixed(0),"%"]}),g.jsxs("span",{className:"text-on-dark-3",children:["VRAM ",(i.gpu.vram_used_mb/1024).toFixed(1),"/",(i.gpu.vram_total_mb/1024).toFixed(1),"G"]})]})]}),g.jsxs("div",{className:"flex h-8 items-center gap-2 border-[3px] border-chrome-3 bg-chrome-2 px-[11px]",title:r?t==null?void 0:t.host:t==null?void 0:t.error,children:[g.jsx("span",{className:`h-[11px] w-[11px] border-2 border-line ${r?"bg-ok":"bg-warn"}`}),g.jsx("span",{className:"text-[13px] text-on-dark",children:"Ollama"}),g.jsx("span",{className:"text-[13px] text-on-dark-3",children:r?t==null?void 0:t.host.replace(/^https?:\/\//,""):"déconnecté"})]})]})}function tx(){const{sessions:t,currentSessionId:i,streamingSessionId:r,refreshSessions:o,refreshFiles:a,fileTree:c,newSession:u,openSession:d,removeSession:m}=Qe();return ne.useEffect(()=>{o(),a()},[o,a]),g.jsxs("div",{className:"flex w-[280px] flex-none flex-col border-r-[3px] border-line bg-panel",children:[g.jsxs("div",{className:"flex items-center justify-between px-4 pb-2.5 pt-4",children:[g.jsx("span",{className:"font-pixel text-[10px] text-label",children:"HISTORIQUE"}),g.jsxs("button",{onClick:u,className:"flex cursor-pointer items-center gap-1 text-[13px] text-accent",children:[g.jsx(Qd,{}),"Nouvelle"]})]}),g.jsxs("div",{className:"scr flex max-h-[45%] flex-col gap-2 overflow-auto px-3 py-1",children:[t.length===0&&g.jsx("div",{className:"px-1 py-2 text-xs text-muted-2",children:"Aucune session. Lance une conversation ci-dessous."}),t.map(h=>{const y=h.id===i,x=h.id===r;return g.jsxs("div",{onClick:()=>d(h.id),className:`group cursor-pointer border-[3px] border-line px-3 py-2.5 ${y?"bg-card-deep shadow-hard-accent":"bg-card"}`,style:{borderRadius:7},children:[g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("div",{className:`flex-1 truncate text-[14px] leading-tight ${y?"text-white":"text-ink-2"}`,children:h.title}),x&&g.jsx("span",{className:"flex-none border-2 border-line bg-accent px-1.5 py-0.5 text-[10px] leading-none text-white",title:"Session en cours de travail",children:"EN COURS"}),g.jsx("button",{onClick:v=>{v.stopPropagation(),m(h.id)},className:`hidden group-hover:block ${y?"text-on-dark-2 hover:text-accent":"text-muted-3 hover:text-warn"}`,title:"Supprimer",children:"×"})]}),g.jsxs("div",{className:"mt-1 text-[13px] text-muted-3",children:[Yd(h.updated_at)," · ",h.message_count??0," message",(h.message_count??0)>1?"s":""]})]},h.id)})]}),g.jsx("div",{className:"mx-0 my-4 h-[3px] bg-line"}),g.jsxs("div",{className:"flex items-center justify-between px-4 pb-2",children:[g.jsx("span",{className:"font-pixel text-[10px] text-label",children:"FICHIERS"}),g.jsx("span",{className:"text-[13px] text-muted-3",children:"workspace/"})]}),g.jsx("div",{className:"scr flex-1 overflow-auto px-3 pb-3.5 text-[14px]",children:c.length===0?g.jsxs("div",{className:"px-2 py-4 text-center text-muted-2",children:["Aucun fichier pour l'instant.",g.jsx("br",{}),"L'agent créera des fichiers ici."]}):g.jsx(Xd,{nodes:c,depth:0})})]})}function Xd({nodes:t,depth:i}){const{openPreview:r,previewPath:o,removeFile:a,currentProject:c}=Qe(),u=d=>{const m=d.type==="dir"?`Supprimer le dossier ${d.path} et tout son contenu ?`:`Supprimer ${d.path} ?`;window.confirm(m)&&a(d.path)};return g.jsx(g.Fragment,{children:t.map(d=>{const m=d.type==="file"&&d.path===o;return g.jsxs("div",{children:[g.jsxs("div",{onClick:()=>d.type==="file"&&r(d.path),className:`group mb-[3px] flex items-center gap-2 px-2 py-[5px] ${d.type==="file"?m?"cursor-pointer border-2 border-line bg-card-deep text-white":"cursor-pointer text-ink-2 hover:bg-base":"text-muted"}`,style:{paddingLeft:8+i*14},children:[d.type==="dir"?g.jsx("span",{className:"text-muted-2",children:"▾"}):g.jsx("span",{className:`h-2 w-2 border-2 ${m?"border-white bg-accent":"border-line bg-muted-2"}`}),g.jsx("span",{className:"min-w-0 flex-1 truncate",children:d.name}),d.type==="file"&&g.jsx("button",{onClick:h=>{h.stopPropagation(),Oa(d.path,c())},className:"hidden flex-none text-muted-2 hover:text-accent group-hover:block",title:`Télécharger ${d.name}`,children:g.jsx(so,{size:13})}),g.jsx("button",{onClick:h=>{h.stopPropagation(),u(d)},className:"hidden flex-none text-muted-2 hover:text-warn group-hover:block",title:`Supprimer ${d.name}`,children:g.jsx(ao,{size:13})})]}),d.children&&g.jsx(Xd,{nodes:d.children,depth:i+1})]},d.path)})})}function nx({call:t}){var d,m,h,y,x;const i=t.status==="running",r=t.status==="error",o=t.status==="pending",a=((d=t.args)==null?void 0:d.path)??((m=t.args)==null?void 0:m.query)??((h=t.args)==null?void 0:h.pattern)??((y=t.args)==null?void 0:y.command)??((x=t.args)==null?void 0:x.instruction),c=typeof a=="string"?`("${a.length>48?a.slice(0,48)+"…":a}")`:Object.keys(t.args??{}).length?"(…)":"()",u=t.name==="write_file"||t.name==="edit_file";return g.jsxs("div",{className:"mb-[11px] overflow-hidden border-[3px] border-line bg-card shadow-hard-sm",style:{borderRadius:7},children:[g.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5",children:[g.jsx("span",{className:`flex h-[26px] w-[26px] items-center justify-center border-2 border-line ${u?"bg-accent text-white":"bg-card-deep text-white"}`,children:g.jsx(rx,{name:t.name})}),g.jsx("span",{className:"text-[14px] text-ink",children:t.name}),g.jsx("span",{className:"text-[13px] text-muted-3",children:c}),g.jsx("div",{className:"flex-1"}),i?g.jsxs("span",{className:"flex items-center gap-1.5 text-[13px] text-muted-2",children:[g.jsx("span",{className:"h-2.5 w-2.5 animate-spin rounded-full border-2 border-muted-3 border-t-accent"}),"en cours"]}):o?g.jsx("span",{className:"text-[13px] text-accent",children:"⏸ à valider"}):g.jsx("span",{className:`flex items-center gap-1.5 text-[13px] ${r?"text-warn":"text-ok"}`,children:r?"✕ échec":"✓ terminé"})]}),t.summary&&!i&&g.jsxs("div",{className:"border-t-2 border-line-soft px-3 py-2 text-[13px] text-muted-2",children:["→ ",t.summary]})]})}function rx({name:t}){const i={width:13,height:13,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.9,strokeLinecap:"round",strokeLinejoin:"round"};return t==="write_file"||t==="edit_file"?g.jsx("svg",{...i,children:g.jsx("path",{d:"M5 19h14M7 14l9-9 3 3-9 9-4 1z"})}):t==="list_dir"?g.jsx("svg",{...i,children:g.jsx("path",{d:"M4 7h6l2 2h8v9H4z"})}):t==="code_task"?g.jsx("svg",{...i,children:g.jsx("path",{d:"m8 6-5 6 5 6M16 6l5 6-5 6"})}):t==="web_search"||t==="grep_search"?g.jsxs("svg",{...i,children:[g.jsx("circle",{cx:"11",cy:"11",r:"7"}),g.jsx("path",{d:"m21 21-4.3-4.3"})]}):t==="run_shell"?g.jsxs("svg",{...i,children:[g.jsx("path",{d:"m6 9 3 3-3 3M13 15h5"}),g.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"})]}):g.jsxs("svg",{...i,children:[g.jsx("path",{d:"M7 4h7l4 4v12H7z"}),g.jsx("path",{d:"M14 4v4h4"})]})}function ix(t,i){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const lx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ox=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sx={};function td(t,i){return(sx.jsx?ox:lx).test(t)}const ax=/[ \t\n\f\r]/g;function ux(t){return typeof t=="object"?t.type==="text"?nd(t.value):!1:nd(t)}function nd(t){return t.replace(ax,"")===""}class Li{constructor(i,r,o){this.normal=r,this.property=i,o&&(this.space=o)}}Li.prototype.normal={};Li.prototype.property={};Li.prototype.space=void 0;function Jd(t,i){const r={},o={};for(const a of t)Object.assign(r,a.property),Object.assign(o,a.normal);return new Li(r,o,i)}function Ea(t){return t.toLowerCase()}class vt{constructor(i,r){this.attribute=r,this.property=i}}vt.prototype.attribute="";vt.prototype.booleanish=!1;vt.prototype.boolean=!1;vt.prototype.commaOrSpaceSeparated=!1;vt.prototype.commaSeparated=!1;vt.prototype.defined=!1;vt.prototype.mustUseProperty=!1;vt.prototype.number=!1;vt.prototype.overloadedBoolean=!1;vt.prototype.property="";vt.prototype.spaceSeparated=!1;vt.prototype.space=void 0;let cx=0;const ke=nr(),qe=nr(),Na=nr(),q=nr(),Le=nr(),er=nr(),jt=nr();function nr(){return 2**++cx}const _a=Object.freeze(Object.defineProperty({__proto__:null,boolean:ke,booleanish:qe,commaOrSpaceSeparated:jt,commaSeparated:er,number:q,overloadedBoolean:Na,spaceSeparated:Le},Symbol.toStringTag,{value:"Module"})),sa=Object.keys(_a);class Fa extends vt{constructor(i,r,o,a){let c=-1;if(super(i,r),rd(this,"space",a),typeof o=="number")for(;++c<sa.length;){const u=sa[c];rd(this,sa[c],(o&_a[u])===_a[u])}}}Fa.prototype.defined=!0;function rd(t,i,r){r&&(t[i]=r)}function Lr(t){const i={},r={};for(const[o,a]of Object.entries(t.properties)){const c=new Fa(o,t.transform(t.attributes||{},o),a,t.space);t.mustUseProperty&&t.mustUseProperty.includes(o)&&(c.mustUseProperty=!0),i[o]=c,r[Ea(o)]=o,r[Ea(c.attribute)]=o}return new Li(i,r,t.space)}const Zd=Lr({properties:{ariaActiveDescendant:null,ariaAtomic:qe,ariaAutoComplete:null,ariaBusy:qe,ariaChecked:qe,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:Le,ariaCurrent:null,ariaDescribedBy:Le,ariaDetails:null,ariaDisabled:qe,ariaDropEffect:Le,ariaErrorMessage:null,ariaExpanded:qe,ariaFlowTo:Le,ariaGrabbed:qe,ariaHasPopup:null,ariaHidden:qe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Le,ariaLevel:q,ariaLive:null,ariaModal:qe,ariaMultiLine:qe,ariaMultiSelectable:qe,ariaOrientation:null,ariaOwns:Le,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:qe,ariaReadOnly:qe,ariaRelevant:null,ariaRequired:qe,ariaRoleDescription:Le,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:qe,ariaSetSize:q,ariaSort:null,ariaValueMax:q,ariaValueMin:q,ariaValueNow:q,ariaValueText:null,role:null},transform(t,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function ep(t,i){return i in t?t[i]:i}function tp(t,i){return ep(t,i.toLowerCase())}const fx=Lr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:er,acceptCharset:Le,accessKey:Le,action:null,allow:null,allowFullScreen:ke,allowPaymentRequest:ke,allowUserMedia:ke,alpha:ke,alt:null,as:null,async:ke,autoCapitalize:null,autoComplete:Le,autoFocus:ke,autoPlay:ke,blocking:Le,capture:null,charSet:null,checked:ke,cite:null,className:Le,closedBy:null,colorSpace:null,cols:q,colSpan:q,command:null,commandFor:null,content:null,contentEditable:qe,controls:ke,controlsList:Le,coords:q|er,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ke,defer:ke,dir:null,dirName:null,disabled:ke,download:Na,draggable:qe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ke,formTarget:null,headers:Le,height:q,hidden:Na,high:q,href:null,hrefLang:null,htmlFor:Le,httpEquiv:Le,id:null,imageSizes:null,imageSrcSet:null,inert:ke,inputMode:null,integrity:null,is:null,isMap:ke,itemId:null,itemProp:Le,itemRef:Le,itemScope:ke,itemType:Le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ke,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,multiple:ke,muted:ke,name:null,nonce:null,noModule:ke,noValidate:ke,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:ke,optimum:q,pattern:null,ping:Le,placeholder:null,playsInline:ke,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ke,referrerPolicy:null,rel:Le,required:ke,reversed:ke,rows:q,rowSpan:q,sandbox:Le,scope:null,scoped:ke,seamless:ke,selected:ke,shadowRootClonable:ke,shadowRootCustomElementRegistry:ke,shadowRootDelegatesFocus:ke,shadowRootMode:null,shadowRootSerializable:ke,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:qe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:q,step:null,style:null,tabIndex:q,target:null,title:null,translate:null,type:null,typeMustMatch:ke,useMap:null,value:qe,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Le,axis:null,background:null,bgColor:null,border:q,borderColor:null,bottomMargin:q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ke,declare:ke,event:null,face:null,frame:null,frameBorder:null,hSpace:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:ke,noHref:ke,noShade:ke,noWrap:ke,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:qe,standby:null,summary:null,text:null,topMargin:q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ke,disablePictureInPicture:ke,disableRemotePlayback:ke,exportParts:er,part:Le,prefix:null,property:null,results:q,security:null,unselectable:null},space:"html",transform:tp}),dx=Lr({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:jt,accentHeight:q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:q,amplitude:q,arabicForm:null,ascent:q,attributeName:null,attributeType:null,azimuth:q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:q,by:null,calcMode:null,capHeight:q,className:Le,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:q,diffuseConstant:q,direction:null,display:null,dur:null,divisor:q,dominantBaseline:null,download:ke,dx:null,dy:null,edgeMode:null,editable:null,elevation:q,enableBackground:null,end:null,event:null,exponent:q,externalResourcesRequired:null,fill:null,fillOpacity:q,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:er,g2:er,glyphName:er,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:q,horizOriginX:q,horizOriginY:q,id:null,ideographic:q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:q,k:q,k1:q,k2:q,k3:q,k4:q,kernelMatrix:jt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:q,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:q,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:q,overlineThickness:q,paintOrder:null,panose1:null,path:null,pathLength:q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jt,rev:jt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jt,requiredFeatures:jt,requiredFonts:jt,requiredFormats:jt,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:q,specularExponent:q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:q,strikethroughThickness:q,string:null,stroke:null,strokeDashArray:jt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:q,strokeOpacity:q,strokeWidth:null,style:null,surfaceScale:q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jt,tabIndex:q,tableValues:null,target:null,targetX:q,targetY:q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:q,underlineThickness:q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:q,values:null,vAlphabetic:q,vMathematical:q,vectorEffect:null,vHanging:q,vIdeographic:q,version:null,vertAdvY:q,vertOriginX:q,vertOriginY:q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ep}),np=Lr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,i){return"xlink:"+i.slice(5).toLowerCase()}}),rp=Lr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:tp}),ip=Lr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,i){return"xml:"+i.slice(3).toLowerCase()}}),px={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"},hx=/[A-Z]/g,id=/-[a-z]/g,mx=/^data[-\w.:]+$/i;function gx(t,i){const r=Ea(i);let o=i,a=vt;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&mx.test(i)){if(i.charAt(4)==="-"){const c=i.slice(5).replace(id,yx);o="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=i.slice(4);if(!id.test(c)){let u=c.replace(hx,xx);u.charAt(0)!=="-"&&(u="-"+u),i="data"+u}}a=Fa}return new a(o,i)}function xx(t){return"-"+t.toLowerCase()}function yx(t){return t.charAt(1).toUpperCase()}const vx=Jd([Zd,fx,np,rp,ip],"html"),$a=Jd([Zd,dx,np,rp,ip],"svg");function kx(t){return t.join(" ").trim()}var Pr={},aa,ld;function wx(){if(ld)return aa;ld=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,d=/^\s+|\s+$/g,m=`
|
||
`,h="/",y="*",x="",v="comment",w="declaration";function E(j,T){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];T=T||{};var O=1,A=1;function J(X){var G=X.match(i);G&&(O+=G.length);var $=X.lastIndexOf(m);A=~$?X.length-$:A+X.length}function le(){var X={line:O,column:A};return function(G){return G.position=new D(X),ge(),G}}function D(X){this.start=X,this.end={line:O,column:A},this.source=T.source}D.prototype.content=j;function ue(X){var G=new Error(T.source+":"+O+":"+A+": "+X);if(G.reason=X,G.filename=T.source,G.line=O,G.column=A,G.source=j,!T.silent)throw G}function ce(X){var G=X.exec(j);if(G){var $=G[0];return J($),j=j.slice($.length),G}}function ge(){ce(r)}function R(X){var G;for(X=X||[];G=Y();)G!==!1&&X.push(G);return X}function Y(){var X=le();if(!(h!=j.charAt(0)||y!=j.charAt(1))){for(var G=2;x!=j.charAt(G)&&(y!=j.charAt(G)||h!=j.charAt(G+1));)++G;if(G+=2,x===j.charAt(G-1))return ue("End of comment missing");var $=j.slice(2,G-2);return A+=2,J($),j=j.slice(G),A+=2,X({type:v,comment:$})}}function Z(){var X=le(),G=ce(o);if(G){if(Y(),!ce(a))return ue("property missing ':'");var $=ce(c),se=X({type:w,property:L(G[0].replace(t,x)),value:$?L($[0].replace(t,x)):x});return ce(u),se}}function ve(){var X=[];R(X);for(var G;G=Z();)G!==!1&&(X.push(G),R(X));return X}return ge(),ve()}function L(j){return j?j.replace(d,x):x}return aa=E,aa}var od;function Sx(){if(od)return Pr;od=1;var t=Pr&&Pr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.default=r;const i=t(wx());function r(o,a){let c=null;if(!o||typeof o!="string")return c;const u=(0,i.default)(o),d=typeof a=="function";return u.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:y}=m;d?a(h,y,m):y&&(c=c||{},c[h]=y)}),c}return Pr}var Si={},sd;function bx(){if(sd)return Si;sd=1,Object.defineProperty(Si,"__esModule",{value:!0}),Si.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,c=function(h){return!h||r.test(h)||t.test(h)},u=function(h,y){return y.toUpperCase()},d=function(h,y){return"".concat(y,"-")},m=function(h,y){return y===void 0&&(y={}),c(h)?h:(h=h.toLowerCase(),y.reactCompat?h=h.replace(a,d):h=h.replace(o,d),h.replace(i,u))};return Si.camelCase=m,Si}var bi,ad;function Cx(){if(ad)return bi;ad=1;var t=bi&&bi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},i=t(Sx()),r=bx();function o(a,c){var u={};return!a||typeof a!="string"||(0,i.default)(a,function(d,m){d&&m&&(u[(0,r.camelCase)(d,c)]=m)}),u}return o.default=o,bi=o,bi}var jx=Cx();const Ex=lo(jx),lp=op("end"),Ba=op("start");function op(t){return i;function i(r){const o=r&&r.position&&r.position[t]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function Nx(t){const i=Ba(t),r=lp(t);if(i&&r)return{start:i,end:r}}function _i(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?ud(t.position):"start"in t||"end"in t?ud(t):"line"in t||"column"in t?Ta(t):""}function Ta(t){return cd(t&&t.line)+":"+cd(t&&t.column)}function ud(t){return Ta(t&&t.start)+"-"+Ta(t&&t.end)}function cd(t){return t&&typeof t=="number"?t:1}class at extends Error{constructor(i,r,o){super(),typeof r=="string"&&(o=r,r=void 0);let a="",c={},u=!1;if(r&&("line"in r&&"column"in r?c={place:r}:"start"in r&&"end"in r?c={place:r}:"type"in r?c={ancestors:[r],place:r.position}:c={...r}),typeof i=="string"?a=i:!c.cause&&i&&(u=!0,a=i.message,c.cause=i),!c.ruleId&&!c.source&&typeof o=="string"){const m=o.indexOf(":");m===-1?c.ruleId=o:(c.source=o.slice(0,m),c.ruleId=o.slice(m+1))}if(!c.place&&c.ancestors&&c.ancestors){const m=c.ancestors[c.ancestors.length-1];m&&(c.place=m.position)}const d=c.place&&"start"in c.place?c.place.start:c.place;this.ancestors=c.ancestors||void 0,this.cause=c.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=d?d.line:void 0,this.name=_i(c.place)||"1:1",this.place=c.place||void 0,this.reason=this.message,this.ruleId=c.ruleId||void 0,this.source=c.source||void 0,this.stack=u&&c.cause&&typeof c.cause.stack=="string"?c.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}at.prototype.file="";at.prototype.name="";at.prototype.reason="";at.prototype.message="";at.prototype.stack="";at.prototype.column=void 0;at.prototype.line=void 0;at.prototype.ancestors=void 0;at.prototype.cause=void 0;at.prototype.fatal=void 0;at.prototype.place=void 0;at.prototype.ruleId=void 0;at.prototype.source=void 0;const Ua={}.hasOwnProperty,_x=new Map,Tx=/[A-Z]/g,Px=new Set(["table","tbody","thead","tfoot","tr"]),Ix=new Set(["td","th"]),sp="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function zx(t,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let o;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=$x(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=Fx(r,i.jsx,i.jsxs)}const a={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:o,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?$a:vx,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},c=ap(a,t,void 0);return c&&typeof c!="string"?c:a.create(t,a.Fragment,{children:c||void 0},void 0)}function ap(t,i,r){if(i.type==="element")return Lx(t,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return Rx(t,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return Dx(t,i,r);if(i.type==="mdxjsEsm")return Mx(t,i);if(i.type==="root")return Ax(t,i,r);if(i.type==="text")return Ox(t,i)}function Lx(t,i,r){const o=t.schema;let a=o;i.tagName.toLowerCase()==="svg"&&o.space==="html"&&(a=$a,t.schema=a),t.ancestors.push(i);const c=cp(t,i.tagName,!1),u=Bx(t,i);let d=Ha(t,i);return Px.has(i.tagName)&&(d=d.filter(function(m){return typeof m=="string"?!ux(m):!0})),up(t,u,c,i),Va(u,d),t.ancestors.pop(),t.schema=o,t.create(i,c,u,r)}function Rx(t,i){if(i.data&&i.data.estree&&t.evaluater){const o=i.data.estree.body[0];return o.type,t.evaluater.evaluateExpression(o.expression)}Ii(t,i.position)}function Mx(t,i){if(i.data&&i.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(i.data.estree);Ii(t,i.position)}function Dx(t,i,r){const o=t.schema;let a=o;i.name==="svg"&&o.space==="html"&&(a=$a,t.schema=a),t.ancestors.push(i);const c=i.name===null?t.Fragment:cp(t,i.name,!0),u=Ux(t,i),d=Ha(t,i);return up(t,u,c,i),Va(u,d),t.ancestors.pop(),t.schema=o,t.create(i,c,u,r)}function Ax(t,i,r){const o={};return Va(o,Ha(t,i)),t.create(i,t.Fragment,o,r)}function Ox(t,i){return i.value}function up(t,i,r,o){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(i.node=o)}function Va(t,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(t.children=r)}}function Fx(t,i,r){return o;function o(a,c,u,d){const h=Array.isArray(u.children)?r:i;return d?h(c,u,d):h(c,u)}}function $x(t,i){return r;function r(o,a,c,u){const d=Array.isArray(c.children),m=Ba(o);return i(a,c,u,d,{columnNumber:m?m.column-1:void 0,fileName:t,lineNumber:m?m.line:void 0},void 0)}}function Bx(t,i){const r={};let o,a;for(a in i.properties)if(a!=="children"&&Ua.call(i.properties,a)){const c=Vx(t,a,i.properties[a]);if(c){const[u,d]=c;t.tableCellAlignToStyle&&u==="align"&&typeof d=="string"&&Ix.has(i.tagName)?o=d:r[u]=d}}if(o){const c=r.style||(r.style={});c[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return r}function Ux(t,i){const r={};for(const o of i.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&t.evaluater){const c=o.data.estree.body[0];c.type;const u=c.expression;u.type;const d=u.properties[0];d.type,Object.assign(r,t.evaluater.evaluateExpression(d.argument))}else Ii(t,i.position);else{const a=o.name;let c;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&t.evaluater){const d=o.value.data.estree.body[0];d.type,c=t.evaluater.evaluateExpression(d.expression)}else Ii(t,i.position);else c=o.value===null?!0:o.value;r[a]=c}return r}function Ha(t,i){const r=[];let o=-1;const a=t.passKeys?new Map:_x;for(;++o<i.children.length;){const c=i.children[o];let u;if(t.passKeys){const m=c.type==="element"?c.tagName:c.type==="mdxJsxFlowElement"||c.type==="mdxJsxTextElement"?c.name:void 0;if(m){const h=a.get(m)||0;u=m+"-"+h,a.set(m,h+1)}}const d=ap(t,c,u);d!==void 0&&r.push(d)}return r}function Vx(t,i,r){const o=gx(t.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=o.commaSeparated?ix(r):kx(r)),o.property==="style"){let a=typeof r=="object"?r:Hx(t,String(r));return t.stylePropertyNameCase==="css"&&(a=Wx(a)),["style",a]}return[t.elementAttributeNameCase==="react"&&o.space?px[o.property]||o.property:o.attribute,r]}}function Hx(t,i){try{return Ex(i,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const o=r,a=new at("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=t.filePath||void 0,a.url=sp+"#cannot-parse-style-attribute",a}}function cp(t,i,r){let o;if(!r)o={type:"Literal",value:i};else if(i.includes(".")){const a=i.split(".");let c=-1,u;for(;++c<a.length;){const d=td(a[c])?{type:"Identifier",name:a[c]}:{type:"Literal",value:a[c]};u=u?{type:"MemberExpression",object:u,property:d,computed:!!(c&&d.type==="Literal"),optional:!1}:d}o=u}else o=td(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(o.type==="Literal"){const a=o.value;return Ua.call(t.components,a)?t.components[a]:a}if(t.evaluater)return t.evaluater.evaluateExpression(o);Ii(t)}function Ii(t,i){const r=new at("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=sp+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Wx(t){const i={};let r;for(r in t)Ua.call(t,r)&&(i[qx(r)]=t[r]);return i}function qx(t){let i=t.replace(Tx,Qx);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function Qx(t){return"-"+t.toLowerCase()}const ua={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"]},Gx={};function Wa(t,i){const r=Gx,o=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,a=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return fp(t,o,a)}function fp(t,i,r){if(Kx(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(i&&"alt"in t&&t.alt)return t.alt;if("children"in t)return fd(t.children,i,r)}return Array.isArray(t)?fd(t,i,r):""}function fd(t,i,r){const o=[];let a=-1;for(;++a<t.length;)o[a]=fp(t[a],i,r);return o.join("")}function Kx(t){return!!(t&&typeof t=="object")}const dd=document.createElement("i");function qa(t){const i="&"+t+";";dd.innerHTML=i;const r=dd.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===i?!1:r}function Et(t,i,r,o){const a=t.length;let c=0,u;if(i<0?i=-i>a?0:a+i:i=i>a?a:i,r=r>0?r:0,o.length<1e4)u=Array.from(o),u.unshift(i,r),t.splice(...u);else for(r&&t.splice(i,r);c<o.length;)u=o.slice(c,c+1e4),u.unshift(i,0),t.splice(...u),c+=1e4,i+=1e4}function Mt(t,i){return t.length>0?(Et(t,t.length,0,i),t):i}const pd={}.hasOwnProperty;function dp(t){const i={};let r=-1;for(;++r<t.length;)Yx(i,t[r]);return i}function Yx(t,i){let r;for(r in i){const a=(pd.call(t,r)?t[r]:void 0)||(t[r]={}),c=i[r];let u;if(c)for(u in c){pd.call(a,u)||(a[u]=[]);const d=c[u];Xx(a[u],Array.isArray(d)?d:d?[d]:[])}}}function Xx(t,i){let r=-1;const o=[];for(;++r<i.length;)(i[r].add==="after"?t:o).push(i[r]);Et(t,0,0,o)}function pp(t,i){const r=Number.parseInt(t,i);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Vt(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ft=Dn(/[A-Za-z]/),st=Dn(/[\dA-Za-z]/),Jx=Dn(/[#-'*+\--9=?A-Z^-~]/);function to(t){return t!==null&&(t<32||t===127)}const Pa=Dn(/\d/),Zx=Dn(/[\dA-Fa-f]/),ey=Dn(/[!-/:-@[-`{-~]/);function pe(t){return t!==null&&t<-2}function Re(t){return t!==null&&(t<0||t===32)}function je(t){return t===-2||t===-1||t===32}const co=Dn(new RegExp("\\p{P}|\\p{S}","u")),tr=Dn(/\s/);function Dn(t){return i;function i(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function Rr(t){const i=[];let r=-1,o=0,a=0;for(;++r<t.length;){const c=t.charCodeAt(r);let u="";if(c===37&&st(t.charCodeAt(r+1))&&st(t.charCodeAt(r+2)))a=2;else if(c<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(c))||(u=String.fromCharCode(c));else if(c>55295&&c<57344){const d=t.charCodeAt(r+1);c<56320&&d>56319&&d<57344?(u=String.fromCharCode(c,d),a=1):u="�"}else u=String.fromCharCode(c);u&&(i.push(t.slice(o,r),encodeURIComponent(u)),o=r+a+1,u=""),a&&(r+=a,a=0)}return i.join("")+t.slice(o)}function Ee(t,i,r,o){const a=o?o-1:Number.POSITIVE_INFINITY;let c=0;return u;function u(m){return je(m)?(t.enter(r),d(m)):i(m)}function d(m){return je(m)&&c++<a?(t.consume(m),d):(t.exit(r),i(m))}}const ty={tokenize:ny};function ny(t){const i=t.attempt(this.parser.constructs.contentInitial,o,a);let r;return i;function o(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Ee(t,i,"linePrefix")}function a(d){return t.enter("paragraph"),c(d)}function c(d){const m=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=m),r=m,u(d)}function u(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return pe(d)?(t.consume(d),t.exit("chunkText"),c):(t.consume(d),u)}}const ry={tokenize:iy},hd={tokenize:ly};function iy(t){const i=this,r=[];let o=0,a,c,u;return d;function d(A){if(o<r.length){const J=r[o];return i.containerState=J[1],t.attempt(J[0].continuation,m,h)(A)}return h(A)}function m(A){if(o++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,a&&O();const J=i.events.length;let le=J,D;for(;le--;)if(i.events[le][0]==="exit"&&i.events[le][1].type==="chunkFlow"){D=i.events[le][1].end;break}T(o);let ue=J;for(;ue<i.events.length;)i.events[ue][1].end={...D},ue++;return Et(i.events,le+1,0,i.events.slice(J)),i.events.length=ue,h(A)}return d(A)}function h(A){if(o===r.length){if(!a)return v(A);if(a.currentConstruct&&a.currentConstruct.concrete)return E(A);i.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return i.containerState={},t.check(hd,y,x)(A)}function y(A){return a&&O(),T(o),v(A)}function x(A){return i.parser.lazy[i.now().line]=o!==r.length,u=i.now().offset,E(A)}function v(A){return i.containerState={},t.attempt(hd,w,E)(A)}function w(A){return o++,r.push([i.currentConstruct,i.containerState]),v(A)}function E(A){if(A===null){a&&O(),T(0),t.consume(A);return}return a=a||i.parser.flow(i.now()),t.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:c}),L(A)}function L(A){if(A===null){j(t.exit("chunkFlow"),!0),T(0),t.consume(A);return}return pe(A)?(t.consume(A),j(t.exit("chunkFlow")),o=0,i.interrupt=void 0,d):(t.consume(A),L)}function j(A,J){const le=i.sliceStream(A);if(J&&le.push(null),A.previous=c,c&&(c.next=A),c=A,a.defineSkip(A.start),a.write(le),i.parser.lazy[A.start.line]){let D=a.events.length;for(;D--;)if(a.events[D][1].start.offset<u&&(!a.events[D][1].end||a.events[D][1].end.offset>u))return;const ue=i.events.length;let ce=ue,ge,R;for(;ce--;)if(i.events[ce][0]==="exit"&&i.events[ce][1].type==="chunkFlow"){if(ge){R=i.events[ce][1].end;break}ge=!0}for(T(o),D=ue;D<i.events.length;)i.events[D][1].end={...R},D++;Et(i.events,ce+1,0,i.events.slice(ue)),i.events.length=D}}function T(A){let J=r.length;for(;J-- >A;){const le=r[J];i.containerState=le[1],le[0].exit.call(i,t)}r.length=A}function O(){a.write([null]),c=void 0,a=void 0,i.containerState._closeFlow=void 0}}function ly(t,i,r){return Ee(t,t.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function zr(t){if(t===null||Re(t)||tr(t))return 1;if(co(t))return 2}function fo(t,i,r){const o=[];let a=-1;for(;++a<t.length;){const c=t[a].resolveAll;c&&!o.includes(c)&&(i=c(i,r),o.push(c))}return i}const Ia={name:"attention",resolveAll:oy,tokenize:sy};function oy(t,i){let r=-1,o,a,c,u,d,m,h,y;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(o=r;o--;)if(t[o][0]==="exit"&&t[o][1].type==="attentionSequence"&&t[o][1]._open&&i.sliceSerialize(t[o][1]).charCodeAt(0)===i.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[o][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[o][1].end.offset-t[o][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;m=t[o][1].end.offset-t[o][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const x={...t[o][1].end},v={...t[r][1].start};md(x,-m),md(v,m),u={type:m>1?"strongSequence":"emphasisSequence",start:x,end:{...t[o][1].end}},d={type:m>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:v},c={type:m>1?"strongText":"emphasisText",start:{...t[o][1].end},end:{...t[r][1].start}},a={type:m>1?"strong":"emphasis",start:{...u.start},end:{...d.end}},t[o][1].end={...u.start},t[r][1].start={...d.end},h=[],t[o][1].end.offset-t[o][1].start.offset&&(h=Mt(h,[["enter",t[o][1],i],["exit",t[o][1],i]])),h=Mt(h,[["enter",a,i],["enter",u,i],["exit",u,i],["enter",c,i]]),h=Mt(h,fo(i.parser.constructs.insideSpan.null,t.slice(o+1,r),i)),h=Mt(h,[["exit",c,i],["enter",d,i],["exit",d,i],["exit",a,i]]),t[r][1].end.offset-t[r][1].start.offset?(y=2,h=Mt(h,[["enter",t[r][1],i],["exit",t[r][1],i]])):y=0,Et(t,o-1,r-o+3,h),r=o+h.length-y-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function sy(t,i){const r=this.parser.constructs.attentionMarkers.null,o=this.previous,a=zr(o);let c;return u;function u(m){return c=m,t.enter("attentionSequence"),d(m)}function d(m){if(m===c)return t.consume(m),d;const h=t.exit("attentionSequence"),y=zr(m),x=!y||y===2&&a||r.includes(m),v=!a||a===2&&y||r.includes(o);return h._open=!!(c===42?x:x&&(a||!v)),h._close=!!(c===42?v:v&&(y||!x)),i(m)}}function md(t,i){t.column+=i,t.offset+=i,t._bufferIndex+=i}const ay={name:"autolink",tokenize:uy};function uy(t,i,r){let o=0;return a;function a(w){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(w),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),c}function c(w){return ft(w)?(t.consume(w),u):w===64?r(w):h(w)}function u(w){return w===43||w===45||w===46||st(w)?(o=1,d(w)):h(w)}function d(w){return w===58?(t.consume(w),o=0,m):(w===43||w===45||w===46||st(w))&&o++<32?(t.consume(w),d):(o=0,h(w))}function m(w){return w===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(w),t.exit("autolinkMarker"),t.exit("autolink"),i):w===null||w===32||w===60||to(w)?r(w):(t.consume(w),m)}function h(w){return w===64?(t.consume(w),y):Jx(w)?(t.consume(w),h):r(w)}function y(w){return st(w)?x(w):r(w)}function x(w){return w===46?(t.consume(w),o=0,y):w===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(w),t.exit("autolinkMarker"),t.exit("autolink"),i):v(w)}function v(w){if((w===45||st(w))&&o++<63){const E=w===45?v:x;return t.consume(w),E}return r(w)}}const Ri={partial:!0,tokenize:cy};function cy(t,i,r){return o;function o(c){return je(c)?Ee(t,a,"linePrefix")(c):a(c)}function a(c){return c===null||pe(c)?i(c):r(c)}}const hp={continuation:{tokenize:dy},exit:py,name:"blockQuote",tokenize:fy};function fy(t,i,r){const o=this;return a;function a(u){if(u===62){const d=o.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(u),t.exit("blockQuoteMarker"),c}return r(u)}function c(u){return je(u)?(t.enter("blockQuotePrefixWhitespace"),t.consume(u),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),i):(t.exit("blockQuotePrefix"),i(u))}}function dy(t,i,r){const o=this;return a;function a(u){return je(u)?Ee(t,c,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):c(u)}function c(u){return t.attempt(hp,i,r)(u)}}function py(t){t.exit("blockQuote")}const mp={name:"characterEscape",tokenize:hy};function hy(t,i,r){return o;function o(c){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(c),t.exit("escapeMarker"),a}function a(c){return ey(c)?(t.enter("characterEscapeValue"),t.consume(c),t.exit("characterEscapeValue"),t.exit("characterEscape"),i):r(c)}}const gp={name:"characterReference",tokenize:my};function my(t,i,r){const o=this;let a=0,c,u;return d;function d(x){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(x),t.exit("characterReferenceMarker"),m}function m(x){return x===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(x),t.exit("characterReferenceMarkerNumeric"),h):(t.enter("characterReferenceValue"),c=31,u=st,y(x))}function h(x){return x===88||x===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(x),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),c=6,u=Zx,y):(t.enter("characterReferenceValue"),c=7,u=Pa,y(x))}function y(x){if(x===59&&a){const v=t.exit("characterReferenceValue");return u===st&&!qa(o.sliceSerialize(v))?r(x):(t.enter("characterReferenceMarker"),t.consume(x),t.exit("characterReferenceMarker"),t.exit("characterReference"),i)}return u(x)&&a++<c?(t.consume(x),y):r(x)}}const gd={partial:!0,tokenize:xy},xd={concrete:!0,name:"codeFenced",tokenize:gy};function gy(t,i,r){const o=this,a={partial:!0,tokenize:le};let c=0,u=0,d;return m;function m(D){return h(D)}function h(D){const ue=o.events[o.events.length-1];return c=ue&&ue[1].type==="linePrefix"?ue[2].sliceSerialize(ue[1],!0).length:0,d=D,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(D)}function y(D){return D===d?(u++,t.consume(D),y):u<3?r(D):(t.exit("codeFencedFenceSequence"),je(D)?Ee(t,x,"whitespace")(D):x(D))}function x(D){return D===null||pe(D)?(t.exit("codeFencedFence"),o.interrupt?i(D):t.check(gd,L,J)(D)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),v(D))}function v(D){return D===null||pe(D)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),x(D)):je(D)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ee(t,w,"whitespace")(D)):D===96&&D===d?r(D):(t.consume(D),v)}function w(D){return D===null||pe(D)?x(D):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),E(D))}function E(D){return D===null||pe(D)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),x(D)):D===96&&D===d?r(D):(t.consume(D),E)}function L(D){return t.attempt(a,J,j)(D)}function j(D){return t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),T}function T(D){return c>0&&je(D)?Ee(t,O,"linePrefix",c+1)(D):O(D)}function O(D){return D===null||pe(D)?t.check(gd,L,J)(D):(t.enter("codeFlowValue"),A(D))}function A(D){return D===null||pe(D)?(t.exit("codeFlowValue"),O(D)):(t.consume(D),A)}function J(D){return t.exit("codeFenced"),i(D)}function le(D,ue,ce){let ge=0;return R;function R(G){return D.enter("lineEnding"),D.consume(G),D.exit("lineEnding"),Y}function Y(G){return D.enter("codeFencedFence"),je(G)?Ee(D,Z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):Z(G)}function Z(G){return G===d?(D.enter("codeFencedFenceSequence"),ve(G)):ce(G)}function ve(G){return G===d?(ge++,D.consume(G),ve):ge>=u?(D.exit("codeFencedFenceSequence"),je(G)?Ee(D,X,"whitespace")(G):X(G)):ce(G)}function X(G){return G===null||pe(G)?(D.exit("codeFencedFence"),ue(G)):ce(G)}}}function xy(t,i,r){const o=this;return a;function a(u){return u===null?r(u):(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),c)}function c(u){return o.parser.lazy[o.now().line]?r(u):i(u)}}const ca={name:"codeIndented",tokenize:vy},yy={partial:!0,tokenize:ky};function vy(t,i,r){const o=this;return a;function a(h){return t.enter("codeIndented"),Ee(t,c,"linePrefix",5)(h)}function c(h){const y=o.events[o.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?u(h):r(h)}function u(h){return h===null?m(h):pe(h)?t.attempt(yy,u,m)(h):(t.enter("codeFlowValue"),d(h))}function d(h){return h===null||pe(h)?(t.exit("codeFlowValue"),u(h)):(t.consume(h),d)}function m(h){return t.exit("codeIndented"),i(h)}}function ky(t,i,r){const o=this;return a;function a(u){return o.parser.lazy[o.now().line]?r(u):pe(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),a):Ee(t,c,"linePrefix",5)(u)}function c(u){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(u):pe(u)?a(u):r(u)}}const wy={name:"codeText",previous:by,resolve:Sy,tokenize:Cy};function Sy(t){let i=t.length-4,r=3,o,a;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[i][1].type==="lineEnding"||t[i][1].type==="space")){for(o=r;++o<i;)if(t[o][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(o=r-1,i++;++o<=i;)a===void 0?o!==i&&t[o][1].type!=="lineEnding"&&(a=o):(o===i||t[o][1].type==="lineEnding")&&(t[a][1].type="codeTextData",o!==a+2&&(t[a][1].end=t[o-1][1].end,t.splice(a+2,o-a-2),i-=o-a-2,o=a+2),a=void 0);return t}function by(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Cy(t,i,r){let o=0,a,c;return u;function u(x){return t.enter("codeText"),t.enter("codeTextSequence"),d(x)}function d(x){return x===96?(t.consume(x),o++,d):(t.exit("codeTextSequence"),m(x))}function m(x){return x===null?r(x):x===32?(t.enter("space"),t.consume(x),t.exit("space"),m):x===96?(c=t.enter("codeTextSequence"),a=0,y(x)):pe(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),m):(t.enter("codeTextData"),h(x))}function h(x){return x===null||x===32||x===96||pe(x)?(t.exit("codeTextData"),m(x)):(t.consume(x),h)}function y(x){return x===96?(t.consume(x),a++,y):a===o?(t.exit("codeTextSequence"),t.exit("codeText"),i(x)):(c.type="codeTextData",h(x))}}class jy{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const o=r??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(i,o):i>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(i,r,o){const a=r||0;this.setCursor(Math.trunc(i));const c=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return o&&Ci(this.left,o),c.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),Ci(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),Ci(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);Ci(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);Ci(this.left,r.reverse())}}}function Ci(t,i){let r=0;if(i.length<1e4)t.push(...i);else for(;r<i.length;)t.push(...i.slice(r,r+1e4)),r+=1e4}function xp(t){const i={};let r=-1,o,a,c,u,d,m,h;const y=new jy(t);for(;++r<y.length;){for(;r in i;)r=i[r];if(o=y.get(r),r&&o[1].type==="chunkFlow"&&y.get(r-1)[1].type==="listItemPrefix"&&(m=o[1]._tokenizer.events,c=0,c<m.length&&m[c][1].type==="lineEndingBlank"&&(c+=2),c<m.length&&m[c][1].type==="content"))for(;++c<m.length&&m[c][1].type!=="content";)m[c][1].type==="chunkText"&&(m[c][1]._isInFirstContentOfListItem=!0,c++);if(o[0]==="enter")o[1].contentType&&(Object.assign(i,Ey(y,r)),r=i[r],h=!0);else if(o[1]._container){for(c=r,a=void 0;c--;)if(u=y.get(c),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(a&&(y.get(a)[1].type="lineEndingBlank"),u[1].type="lineEnding",a=c);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;a&&(o[1].end={...y.get(a)[1].start},d=y.slice(a,r),d.unshift(o),y.splice(a,r-a+1,d))}}return Et(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!h}function Ey(t,i){const r=t.get(i)[1],o=t.get(i)[2];let a=i-1;const c=[];let u=r._tokenizer;u||(u=o.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const d=u.events,m=[],h={};let y,x,v=-1,w=r,E=0,L=0;const j=[L];for(;w;){for(;t.get(++a)[1]!==w;);c.push(a),w._tokenizer||(y=o.sliceStream(w),w.next||y.push(null),x&&u.defineSkip(w.start),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(y),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),x=w,w=w.next}for(w=r;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(L=v+1,j.push(L),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(u.events=[],w?(w._tokenizer=void 0,w.previous=void 0):j.pop(),v=j.length;v--;){const T=d.slice(j[v],j[v+1]),O=c.pop();m.push([O,O+T.length-1]),t.splice(O,2,T)}for(m.reverse(),v=-1;++v<m.length;)h[E+m[v][0]]=E+m[v][1],E+=m[v][1]-m[v][0]-1;return h}const Ny={resolve:Ty,tokenize:Py},_y={partial:!0,tokenize:Iy};function Ty(t){return xp(t),t}function Py(t,i){let r;return o;function o(d){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),a(d)}function a(d){return d===null?c(d):pe(d)?t.check(_y,u,c)(d):(t.consume(d),a)}function c(d){return t.exit("chunkContent"),t.exit("content"),i(d)}function u(d){return t.consume(d),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,a}}function Iy(t,i,r){const o=this;return a;function a(u){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),Ee(t,c,"linePrefix")}function c(u){if(u===null||pe(u))return r(u);const d=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(u):t.interrupt(o.parser.constructs.flow,r,i)(u)}}function yp(t,i,r,o,a,c,u,d,m){const h=m||Number.POSITIVE_INFINITY;let y=0;return x;function x(T){return T===60?(t.enter(o),t.enter(a),t.enter(c),t.consume(T),t.exit(c),v):T===null||T===32||T===41||to(T)?r(T):(t.enter(o),t.enter(u),t.enter(d),t.enter("chunkString",{contentType:"string"}),L(T))}function v(T){return T===62?(t.enter(c),t.consume(T),t.exit(c),t.exit(a),t.exit(o),i):(t.enter(d),t.enter("chunkString",{contentType:"string"}),w(T))}function w(T){return T===62?(t.exit("chunkString"),t.exit(d),v(T)):T===null||T===60||pe(T)?r(T):(t.consume(T),T===92?E:w)}function E(T){return T===60||T===62||T===92?(t.consume(T),w):w(T)}function L(T){return!y&&(T===null||T===41||Re(T))?(t.exit("chunkString"),t.exit(d),t.exit(u),t.exit(o),i(T)):y<h&&T===40?(t.consume(T),y++,L):T===41?(t.consume(T),y--,L):T===null||T===32||T===40||to(T)?r(T):(t.consume(T),T===92?j:L)}function j(T){return T===40||T===41||T===92?(t.consume(T),L):L(T)}}function vp(t,i,r,o,a,c){const u=this;let d=0,m;return h;function h(w){return t.enter(o),t.enter(a),t.consume(w),t.exit(a),t.enter(c),y}function y(w){return d>999||w===null||w===91||w===93&&!m||w===94&&!d&&"_hiddenFootnoteSupport"in u.parser.constructs?r(w):w===93?(t.exit(c),t.enter(a),t.consume(w),t.exit(a),t.exit(o),i):pe(w)?(t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),x(w))}function x(w){return w===null||w===91||w===93||pe(w)||d++>999?(t.exit("chunkString"),y(w)):(t.consume(w),m||(m=!je(w)),w===92?v:x)}function v(w){return w===91||w===92||w===93?(t.consume(w),d++,x):x(w)}}function kp(t,i,r,o,a,c){let u;return d;function d(v){return v===34||v===39||v===40?(t.enter(o),t.enter(a),t.consume(v),t.exit(a),u=v===40?41:v,m):r(v)}function m(v){return v===u?(t.enter(a),t.consume(v),t.exit(a),t.exit(o),i):(t.enter(c),h(v))}function h(v){return v===u?(t.exit(c),m(u)):v===null?r(v):pe(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),Ee(t,h,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===u||v===null||pe(v)?(t.exit("chunkString"),h(v)):(t.consume(v),v===92?x:y)}function x(v){return v===u||v===92?(t.consume(v),y):y(v)}}function Ti(t,i){let r;return o;function o(a){return pe(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),r=!0,o):je(a)?Ee(t,o,r?"linePrefix":"lineSuffix")(a):i(a)}}const zy={name:"definition",tokenize:Ry},Ly={partial:!0,tokenize:My};function Ry(t,i,r){const o=this;let a;return c;function c(w){return t.enter("definition"),u(w)}function u(w){return vp.call(o,t,d,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function d(w){return a=Vt(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),w===58?(t.enter("definitionMarker"),t.consume(w),t.exit("definitionMarker"),m):r(w)}function m(w){return Re(w)?Ti(t,h)(w):h(w)}function h(w){return yp(t,y,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function y(w){return t.attempt(Ly,x,x)(w)}function x(w){return je(w)?Ee(t,v,"whitespace")(w):v(w)}function v(w){return w===null||pe(w)?(t.exit("definition"),o.parser.defined.push(a),i(w)):r(w)}}function My(t,i,r){return o;function o(d){return Re(d)?Ti(t,a)(d):r(d)}function a(d){return kp(t,c,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function c(d){return je(d)?Ee(t,u,"whitespace")(d):u(d)}function u(d){return d===null||pe(d)?i(d):r(d)}}const Dy={name:"hardBreakEscape",tokenize:Ay};function Ay(t,i,r){return o;function o(c){return t.enter("hardBreakEscape"),t.consume(c),a}function a(c){return pe(c)?(t.exit("hardBreakEscape"),i(c)):r(c)}}const Oy={name:"headingAtx",resolve:Fy,tokenize:$y};function Fy(t,i){let r=t.length-2,o=3,a,c;return t[o][1].type==="whitespace"&&(o+=2),r-2>o&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(o===r-1||r-4>o&&t[r-2][1].type==="whitespace")&&(r-=o+1===r?2:4),r>o&&(a={type:"atxHeadingText",start:t[o][1].start,end:t[r][1].end},c={type:"chunkText",start:t[o][1].start,end:t[r][1].end,contentType:"text"},Et(t,o,r-o+1,[["enter",a,i],["enter",c,i],["exit",c,i],["exit",a,i]])),t}function $y(t,i,r){let o=0;return a;function a(y){return t.enter("atxHeading"),c(y)}function c(y){return t.enter("atxHeadingSequence"),u(y)}function u(y){return y===35&&o++<6?(t.consume(y),u):y===null||Re(y)?(t.exit("atxHeadingSequence"),d(y)):r(y)}function d(y){return y===35?(t.enter("atxHeadingSequence"),m(y)):y===null||pe(y)?(t.exit("atxHeading"),i(y)):je(y)?Ee(t,d,"whitespace")(y):(t.enter("atxHeadingText"),h(y))}function m(y){return y===35?(t.consume(y),m):(t.exit("atxHeadingSequence"),d(y))}function h(y){return y===null||y===35||Re(y)?(t.exit("atxHeadingText"),d(y)):(t.consume(y),h)}}const By=["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"],yd=["pre","script","style","textarea"],Uy={concrete:!0,name:"htmlFlow",resolveTo:Wy,tokenize:qy},Vy={partial:!0,tokenize:Gy},Hy={partial:!0,tokenize:Qy};function Wy(t){let i=t.length;for(;i--&&!(t[i][0]==="enter"&&t[i][1].type==="htmlFlow"););return i>1&&t[i-2][1].type==="linePrefix"&&(t[i][1].start=t[i-2][1].start,t[i+1][1].start=t[i-2][1].start,t.splice(i-2,2)),t}function qy(t,i,r){const o=this;let a,c,u,d,m;return h;function h(C){return y(C)}function y(C){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(C),x}function x(C){return C===33?(t.consume(C),v):C===47?(t.consume(C),c=!0,L):C===63?(t.consume(C),a=3,o.interrupt?i:S):ft(C)?(t.consume(C),u=String.fromCharCode(C),j):r(C)}function v(C){return C===45?(t.consume(C),a=2,w):C===91?(t.consume(C),a=5,d=0,E):ft(C)?(t.consume(C),a=4,o.interrupt?i:S):r(C)}function w(C){return C===45?(t.consume(C),o.interrupt?i:S):r(C)}function E(C){const me="CDATA[";return C===me.charCodeAt(d++)?(t.consume(C),d===me.length?o.interrupt?i:Z:E):r(C)}function L(C){return ft(C)?(t.consume(C),u=String.fromCharCode(C),j):r(C)}function j(C){if(C===null||C===47||C===62||Re(C)){const me=C===47,we=u.toLowerCase();return!me&&!c&&yd.includes(we)?(a=1,o.interrupt?i(C):Z(C)):By.includes(u.toLowerCase())?(a=6,me?(t.consume(C),T):o.interrupt?i(C):Z(C)):(a=7,o.interrupt&&!o.parser.lazy[o.now().line]?r(C):c?O(C):A(C))}return C===45||st(C)?(t.consume(C),u+=String.fromCharCode(C),j):r(C)}function T(C){return C===62?(t.consume(C),o.interrupt?i:Z):r(C)}function O(C){return je(C)?(t.consume(C),O):R(C)}function A(C){return C===47?(t.consume(C),R):C===58||C===95||ft(C)?(t.consume(C),J):je(C)?(t.consume(C),A):R(C)}function J(C){return C===45||C===46||C===58||C===95||st(C)?(t.consume(C),J):le(C)}function le(C){return C===61?(t.consume(C),D):je(C)?(t.consume(C),le):A(C)}function D(C){return C===null||C===60||C===61||C===62||C===96?r(C):C===34||C===39?(t.consume(C),m=C,ue):je(C)?(t.consume(C),D):ce(C)}function ue(C){return C===m?(t.consume(C),m=null,ge):C===null||pe(C)?r(C):(t.consume(C),ue)}function ce(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Re(C)?le(C):(t.consume(C),ce)}function ge(C){return C===47||C===62||je(C)?A(C):r(C)}function R(C){return C===62?(t.consume(C),Y):r(C)}function Y(C){return C===null||pe(C)?Z(C):je(C)?(t.consume(C),Y):r(C)}function Z(C){return C===45&&a===2?(t.consume(C),$):C===60&&a===1?(t.consume(C),se):C===62&&a===4?(t.consume(C),P):C===63&&a===3?(t.consume(C),S):C===93&&a===5?(t.consume(C),re):pe(C)&&(a===6||a===7)?(t.exit("htmlFlowData"),t.check(Vy,B,ve)(C)):C===null||pe(C)?(t.exit("htmlFlowData"),ve(C)):(t.consume(C),Z)}function ve(C){return t.check(Hy,X,B)(C)}function X(C){return t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),G}function G(C){return C===null||pe(C)?ve(C):(t.enter("htmlFlowData"),Z(C))}function $(C){return C===45?(t.consume(C),S):Z(C)}function se(C){return C===47?(t.consume(C),u="",U):Z(C)}function U(C){if(C===62){const me=u.toLowerCase();return yd.includes(me)?(t.consume(C),P):Z(C)}return ft(C)&&u.length<8?(t.consume(C),u+=String.fromCharCode(C),U):Z(C)}function re(C){return C===93?(t.consume(C),S):Z(C)}function S(C){return C===62?(t.consume(C),P):C===45&&a===2?(t.consume(C),S):Z(C)}function P(C){return C===null||pe(C)?(t.exit("htmlFlowData"),B(C)):(t.consume(C),P)}function B(C){return t.exit("htmlFlow"),i(C)}}function Qy(t,i,r){const o=this;return a;function a(u){return pe(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),c):r(u)}function c(u){return o.parser.lazy[o.now().line]?r(u):i(u)}}function Gy(t,i,r){return o;function o(a){return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),t.attempt(Ri,i,r)}}const Ky={name:"htmlText",tokenize:Yy};function Yy(t,i,r){const o=this;let a,c,u;return d;function d(S){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(S),m}function m(S){return S===33?(t.consume(S),h):S===47?(t.consume(S),le):S===63?(t.consume(S),A):ft(S)?(t.consume(S),ce):r(S)}function h(S){return S===45?(t.consume(S),y):S===91?(t.consume(S),c=0,E):ft(S)?(t.consume(S),O):r(S)}function y(S){return S===45?(t.consume(S),w):r(S)}function x(S){return S===null?r(S):S===45?(t.consume(S),v):pe(S)?(u=x,se(S)):(t.consume(S),x)}function v(S){return S===45?(t.consume(S),w):x(S)}function w(S){return S===62?$(S):S===45?v(S):x(S)}function E(S){const P="CDATA[";return S===P.charCodeAt(c++)?(t.consume(S),c===P.length?L:E):r(S)}function L(S){return S===null?r(S):S===93?(t.consume(S),j):pe(S)?(u=L,se(S)):(t.consume(S),L)}function j(S){return S===93?(t.consume(S),T):L(S)}function T(S){return S===62?$(S):S===93?(t.consume(S),T):L(S)}function O(S){return S===null||S===62?$(S):pe(S)?(u=O,se(S)):(t.consume(S),O)}function A(S){return S===null?r(S):S===63?(t.consume(S),J):pe(S)?(u=A,se(S)):(t.consume(S),A)}function J(S){return S===62?$(S):A(S)}function le(S){return ft(S)?(t.consume(S),D):r(S)}function D(S){return S===45||st(S)?(t.consume(S),D):ue(S)}function ue(S){return pe(S)?(u=ue,se(S)):je(S)?(t.consume(S),ue):$(S)}function ce(S){return S===45||st(S)?(t.consume(S),ce):S===47||S===62||Re(S)?ge(S):r(S)}function ge(S){return S===47?(t.consume(S),$):S===58||S===95||ft(S)?(t.consume(S),R):pe(S)?(u=ge,se(S)):je(S)?(t.consume(S),ge):$(S)}function R(S){return S===45||S===46||S===58||S===95||st(S)?(t.consume(S),R):Y(S)}function Y(S){return S===61?(t.consume(S),Z):pe(S)?(u=Y,se(S)):je(S)?(t.consume(S),Y):ge(S)}function Z(S){return S===null||S===60||S===61||S===62||S===96?r(S):S===34||S===39?(t.consume(S),a=S,ve):pe(S)?(u=Z,se(S)):je(S)?(t.consume(S),Z):(t.consume(S),X)}function ve(S){return S===a?(t.consume(S),a=void 0,G):S===null?r(S):pe(S)?(u=ve,se(S)):(t.consume(S),ve)}function X(S){return S===null||S===34||S===39||S===60||S===61||S===96?r(S):S===47||S===62||Re(S)?ge(S):(t.consume(S),X)}function G(S){return S===47||S===62||Re(S)?ge(S):r(S)}function $(S){return S===62?(t.consume(S),t.exit("htmlTextData"),t.exit("htmlText"),i):r(S)}function se(S){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),U}function U(S){return je(S)?Ee(t,re,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):re(S)}function re(S){return t.enter("htmlTextData"),u(S)}}const Qa={name:"labelEnd",resolveAll:e1,resolveTo:t1,tokenize:n1},Xy={tokenize:r1},Jy={tokenize:i1},Zy={tokenize:l1};function e1(t){let i=-1;const r=[];for(;++i<t.length;){const o=t[i][1];if(r.push(t[i]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const a=o.type==="labelImage"?4:2;o.type="data",i+=a}}return t.length!==r.length&&Et(t,0,t.length,r),t}function t1(t,i){let r=t.length,o=0,a,c,u,d;for(;r--;)if(a=t[r][1],c){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;t[r][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(u){if(t[r][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(c=r,a.type!=="labelLink")){o=2;break}}else a.type==="labelEnd"&&(u=r);const m={type:t[c][1].type==="labelLink"?"link":"image",start:{...t[c][1].start},end:{...t[t.length-1][1].end}},h={type:"label",start:{...t[c][1].start},end:{...t[u][1].end}},y={type:"labelText",start:{...t[c+o+2][1].end},end:{...t[u-2][1].start}};return d=[["enter",m,i],["enter",h,i]],d=Mt(d,t.slice(c+1,c+o+3)),d=Mt(d,[["enter",y,i]]),d=Mt(d,fo(i.parser.constructs.insideSpan.null,t.slice(c+o+4,u-3),i)),d=Mt(d,[["exit",y,i],t[u-2],t[u-1],["exit",h,i]]),d=Mt(d,t.slice(u+1)),d=Mt(d,[["exit",m,i]]),Et(t,c,t.length,d),t}function n1(t,i,r){const o=this;let a=o.events.length,c,u;for(;a--;)if((o.events[a][1].type==="labelImage"||o.events[a][1].type==="labelLink")&&!o.events[a][1]._balanced){c=o.events[a][1];break}return d;function d(v){return c?c._inactive?x(v):(u=o.parser.defined.includes(Vt(o.sliceSerialize({start:c.end,end:o.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(v),t.exit("labelMarker"),t.exit("labelEnd"),m):r(v)}function m(v){return v===40?t.attempt(Xy,y,u?y:x)(v):v===91?t.attempt(Jy,y,u?h:x)(v):u?y(v):x(v)}function h(v){return t.attempt(Zy,y,x)(v)}function y(v){return i(v)}function x(v){return c._balanced=!0,r(v)}}function r1(t,i,r){return o;function o(x){return t.enter("resource"),t.enter("resourceMarker"),t.consume(x),t.exit("resourceMarker"),a}function a(x){return Re(x)?Ti(t,c)(x):c(x)}function c(x){return x===41?y(x):yp(t,u,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function u(x){return Re(x)?Ti(t,m)(x):y(x)}function d(x){return r(x)}function m(x){return x===34||x===39||x===40?kp(t,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):y(x)}function h(x){return Re(x)?Ti(t,y)(x):y(x)}function y(x){return x===41?(t.enter("resourceMarker"),t.consume(x),t.exit("resourceMarker"),t.exit("resource"),i):r(x)}}function i1(t,i,r){const o=this;return a;function a(d){return vp.call(o,t,c,u,"reference","referenceMarker","referenceString")(d)}function c(d){return o.parser.defined.includes(Vt(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?i(d):r(d)}function u(d){return r(d)}}function l1(t,i,r){return o;function o(c){return t.enter("reference"),t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),a}function a(c){return c===93?(t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),t.exit("reference"),i):r(c)}}const o1={name:"labelStartImage",resolveAll:Qa.resolveAll,tokenize:s1};function s1(t,i,r){const o=this;return a;function a(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),c}function c(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),u):r(d)}function u(d){return d===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(d):i(d)}}const a1={name:"labelStartLink",resolveAll:Qa.resolveAll,tokenize:u1};function u1(t,i,r){const o=this;return a;function a(u){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(u),t.exit("labelMarker"),t.exit("labelLink"),c}function c(u){return u===94&&"_hiddenFootnoteSupport"in o.parser.constructs?r(u):i(u)}}const fa={name:"lineEnding",tokenize:c1};function c1(t,i){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),Ee(t,i,"linePrefix")}}const eo={name:"thematicBreak",tokenize:f1};function f1(t,i,r){let o=0,a;return c;function c(h){return t.enter("thematicBreak"),u(h)}function u(h){return a=h,d(h)}function d(h){return h===a?(t.enter("thematicBreakSequence"),m(h)):o>=3&&(h===null||pe(h))?(t.exit("thematicBreak"),i(h)):r(h)}function m(h){return h===a?(t.consume(h),o++,m):(t.exit("thematicBreakSequence"),je(h)?Ee(t,d,"whitespace")(h):d(h))}}const yt={continuation:{tokenize:m1},exit:x1,name:"list",tokenize:h1},d1={partial:!0,tokenize:y1},p1={partial:!0,tokenize:g1};function h1(t,i,r){const o=this,a=o.events[o.events.length-1];let c=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,u=0;return d;function d(w){const E=o.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!o.containerState.marker||w===o.containerState.marker:Pa(w)){if(o.containerState.type||(o.containerState.type=E,t.enter(E,{_container:!0})),E==="listUnordered")return t.enter("listItemPrefix"),w===42||w===45?t.check(eo,r,h)(w):h(w);if(!o.interrupt||w===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),m(w)}return r(w)}function m(w){return Pa(w)&&++u<10?(t.consume(w),m):(!o.interrupt||u<2)&&(o.containerState.marker?w===o.containerState.marker:w===41||w===46)?(t.exit("listItemValue"),h(w)):r(w)}function h(w){return t.enter("listItemMarker"),t.consume(w),t.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||w,t.check(Ri,o.interrupt?r:y,t.attempt(d1,v,x))}function y(w){return o.containerState.initialBlankLine=!0,c++,v(w)}function x(w){return je(w)?(t.enter("listItemPrefixWhitespace"),t.consume(w),t.exit("listItemPrefixWhitespace"),v):r(w)}function v(w){return o.containerState.size=c+o.sliceSerialize(t.exit("listItemPrefix"),!0).length,i(w)}}function m1(t,i,r){const o=this;return o.containerState._closeFlow=void 0,t.check(Ri,a,c);function a(d){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ee(t,i,"listItemIndent",o.containerState.size+1)(d)}function c(d){return o.containerState.furtherBlankLines||!je(d)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,u(d)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,t.attempt(p1,i,u)(d))}function u(d){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ee(t,t.attempt(yt,i,r),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function g1(t,i,r){const o=this;return Ee(t,a,"listItemIndent",o.containerState.size+1);function a(c){const u=o.events[o.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===o.containerState.size?i(c):r(c)}}function x1(t){t.exit(this.containerState.type)}function y1(t,i,r){const o=this;return Ee(t,a,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(c){const u=o.events[o.events.length-1];return!je(c)&&u&&u[1].type==="listItemPrefixWhitespace"?i(c):r(c)}}const vd={name:"setextUnderline",resolveTo:v1,tokenize:k1};function v1(t,i){let r=t.length,o,a,c;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){o=r;break}t[r][1].type==="paragraph"&&(a=r)}else t[r][1].type==="content"&&t.splice(r,1),!c&&t[r][1].type==="definition"&&(c=r);const u={type:"setextHeading",start:{...t[o][1].start},end:{...t[t.length-1][1].end}};return t[a][1].type="setextHeadingText",c?(t.splice(a,0,["enter",u,i]),t.splice(c+1,0,["exit",t[o][1],i]),t[o][1].end={...t[c][1].end}):t[o][1]=u,t.push(["exit",u,i]),t}function k1(t,i,r){const o=this;let a;return c;function c(h){let y=o.events.length,x;for(;y--;)if(o.events[y][1].type!=="lineEnding"&&o.events[y][1].type!=="linePrefix"&&o.events[y][1].type!=="content"){x=o.events[y][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||x)?(t.enter("setextHeadingLine"),a=h,u(h)):r(h)}function u(h){return t.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===a?(t.consume(h),d):(t.exit("setextHeadingLineSequence"),je(h)?Ee(t,m,"lineSuffix")(h):m(h))}function m(h){return h===null||pe(h)?(t.exit("setextHeadingLine"),i(h)):r(h)}}const w1={tokenize:S1};function S1(t){const i=this,r=t.attempt(Ri,o,t.attempt(this.parser.constructs.flowInitial,a,Ee(t,t.attempt(this.parser.constructs.flow,a,t.attempt(Ny,a)),"linePrefix")));return r;function o(c){if(c===null){t.consume(c);return}return t.enter("lineEndingBlank"),t.consume(c),t.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function a(c){if(c===null){t.consume(c);return}return t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),i.currentConstruct=void 0,r}}const b1={resolveAll:Sp()},C1=wp("string"),j1=wp("text");function wp(t){return{resolveAll:Sp(t==="text"?E1:void 0),tokenize:i};function i(r){const o=this,a=this.parser.constructs[t],c=r.attempt(a,u,d);return u;function u(y){return h(y)?c(y):d(y)}function d(y){if(y===null){r.consume(y);return}return r.enter("data"),r.consume(y),m}function m(y){return h(y)?(r.exit("data"),c(y)):(r.consume(y),m)}function h(y){if(y===null)return!0;const x=a[y];let v=-1;if(x)for(;++v<x.length;){const w=x[v];if(!w.previous||w.previous.call(o,o.previous))return!0}return!1}}}function Sp(t){return i;function i(r,o){let a=-1,c;for(;++a<=r.length;)c===void 0?r[a]&&r[a][1].type==="data"&&(c=a,a++):(!r[a]||r[a][1].type!=="data")&&(a!==c+2&&(r[c][1].end=r[a-1][1].end,r.splice(c+2,a-c-2),a=c+2),c=void 0);return t?t(r,o):r}}function E1(t,i){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const o=t[r-1][1],a=i.sliceStream(o);let c=a.length,u=-1,d=0,m;for(;c--;){const h=a[c];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)d++,u--;if(u)break;u=-1}else if(h===-2)m=!0,d++;else if(h!==-1){c++;break}}if(i._contentTypeTextTrailing&&r===t.length&&(d=0),d){const h={type:r===t.length||m||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:c?u:o.start._bufferIndex+u,_index:o.start._index+c,line:o.end.line,column:o.end.column-d,offset:o.end.offset-d},end:{...o.end}};o.end={...h.start},o.start.offset===o.end.offset?Object.assign(o,h):(t.splice(r,0,["enter",h,i],["exit",h,i]),r+=2)}r++}return t}const N1={42:yt,43:yt,45:yt,48:yt,49:yt,50:yt,51:yt,52:yt,53:yt,54:yt,55:yt,56:yt,57:yt,62:hp},_1={91:zy},T1={[-2]:ca,[-1]:ca,32:ca},P1={35:Oy,42:eo,45:[vd,eo],60:Uy,61:vd,95:eo,96:xd,126:xd},I1={38:gp,92:mp},z1={[-5]:fa,[-4]:fa,[-3]:fa,33:o1,38:gp,42:Ia,60:[ay,Ky],91:a1,92:[Dy,mp],93:Qa,95:Ia,96:wy},L1={null:[Ia,b1]},R1={null:[42,95]},M1={null:[]},D1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:R1,contentInitial:_1,disable:M1,document:N1,flow:P1,flowInitial:T1,insideSpan:L1,string:I1,text:z1},Symbol.toStringTag,{value:"Module"}));function A1(t,i,r){let o={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const a={},c=[];let u=[],d=[];const m={attempt:ue(le),check:ue(D),consume:O,enter:A,exit:J,interrupt:ue(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:L,events:[],now:E,parser:t,previous:null,sliceSerialize:v,sliceStream:w,write:x};let y=i.tokenize.call(h,m);return i.resolveAll&&c.push(i),h;function x(Y){return u=Mt(u,Y),j(),u[u.length-1]!==null?[]:(ce(i,0),h.events=fo(c,h.events,h),h.events)}function v(Y,Z){return F1(w(Y),Z)}function w(Y){return O1(u,Y)}function E(){const{_bufferIndex:Y,_index:Z,line:ve,column:X,offset:G}=o;return{_bufferIndex:Y,_index:Z,line:ve,column:X,offset:G}}function L(Y){a[Y.line]=Y.column,R()}function j(){let Y;for(;o._index<u.length;){const Z=u[o._index];if(typeof Z=="string")for(Y=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===Y&&o._bufferIndex<Z.length;)T(Z.charCodeAt(o._bufferIndex));else T(Z)}}function T(Y){y=y(Y)}function O(Y){pe(Y)?(o.line++,o.column=1,o.offset+=Y===-3?2:1,R()):Y!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===u[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=Y}function A(Y,Z){const ve=Z||{};return ve.type=Y,ve.start=E(),h.events.push(["enter",ve,h]),d.push(ve),ve}function J(Y){const Z=d.pop();return Z.end=E(),h.events.push(["exit",Z,h]),Z}function le(Y,Z){ce(Y,Z.from)}function D(Y,Z){Z.restore()}function ue(Y,Z){return ve;function ve(X,G,$){let se,U,re,S;return Array.isArray(X)?B(X):"tokenize"in X?B([X]):P(X);function P(he){return Te;function Te(Se){const Ie=Se!==null&&he[Se],He=Se!==null&&he.null,Jt=[...Array.isArray(Ie)?Ie:Ie?[Ie]:[],...Array.isArray(He)?He:He?[He]:[]];return B(Jt)(Se)}}function B(he){return se=he,U=0,he.length===0?$:C(he[U])}function C(he){return Te;function Te(Se){return S=ge(),re=he,he.partial||(h.currentConstruct=he),he.name&&h.parser.constructs.disable.null.includes(he.name)?we():he.tokenize.call(Z?Object.assign(Object.create(h),Z):h,m,me,we)(Se)}}function me(he){return Y(re,S),G}function we(he){return S.restore(),++U<se.length?C(se[U]):$}}}function ce(Y,Z){Y.resolveAll&&!c.includes(Y)&&c.push(Y),Y.resolve&&Et(h.events,Z,h.events.length-Z,Y.resolve(h.events.slice(Z),h)),Y.resolveTo&&(h.events=Y.resolveTo(h.events,h))}function ge(){const Y=E(),Z=h.previous,ve=h.currentConstruct,X=h.events.length,G=Array.from(d);return{from:X,restore:$};function $(){o=Y,h.previous=Z,h.currentConstruct=ve,h.events.length=X,d=G,R()}}function R(){o.line in a&&o.column<2&&(o.column=a[o.line],o.offset+=a[o.line]-1)}}function O1(t,i){const r=i.start._index,o=i.start._bufferIndex,a=i.end._index,c=i.end._bufferIndex;let u;if(r===a)u=[t[r].slice(o,c)];else{if(u=t.slice(r,a),o>-1){const d=u[0];typeof d=="string"?u[0]=d.slice(o):u.shift()}c>0&&u.push(t[a].slice(0,c))}return u}function F1(t,i){let r=-1;const o=[];let a;for(;++r<t.length;){const c=t[r];let u;if(typeof c=="string")u=c;else switch(c){case-5:{u="\r";break}case-4:{u=`
|
||
`;break}case-3:{u=`\r
|
||
`;break}case-2:{u=i?" ":" ";break}case-1:{if(!i&&a)continue;u=" ";break}default:u=String.fromCharCode(c)}a=c===-2,o.push(u)}return o.join("")}function $1(t){const o={constructs:dp([D1,...(t||{}).extensions||[]]),content:a(ty),defined:[],document:a(ry),flow:a(w1),lazy:{},string:a(C1),text:a(j1)};return o;function a(c){return u;function u(d){return A1(o,c,d)}}}function B1(t){for(;!xp(t););return t}const kd=/[\0\t\n\r]/g;function U1(){let t=1,i="",r=!0,o;return a;function a(c,u,d){const m=[];let h,y,x,v,w;for(c=i+(typeof c=="string"?c.toString():new TextDecoder(u||void 0).decode(c)),x=0,i="",r&&(c.charCodeAt(0)===65279&&x++,r=void 0);x<c.length;){if(kd.lastIndex=x,h=kd.exec(c),v=h&&h.index!==void 0?h.index:c.length,w=c.charCodeAt(v),!h){i=c.slice(x);break}if(w===10&&x===v&&o)m.push(-3),o=void 0;else switch(o&&(m.push(-5),o=void 0),x<v&&(m.push(c.slice(x,v)),t+=v-x),w){case 0:{m.push(65533),t++;break}case 9:{for(y=Math.ceil(t/4)*4,m.push(-2);t++<y;)m.push(-1);break}case 10:{m.push(-4),t=1;break}default:o=!0,t=1}x=v+1}return d&&(o&&m.push(-5),i&&m.push(i),m.push(null)),m}}const V1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function H1(t){return t.replace(V1,W1)}function W1(t,i,r){if(i)return i;if(r.charCodeAt(0)===35){const a=r.charCodeAt(1),c=a===120||a===88;return pp(r.slice(c?2:1),c?16:10)}return qa(r)||t}const bp={}.hasOwnProperty;function q1(t,i,r){return i&&typeof i=="object"&&(r=i,i=void 0),Q1(r)(B1($1(r).document().write(U1()(t,i,!0))))}function Q1(t){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(lr),autolinkProtocol:ge,autolinkEmail:ge,atxHeading:c(Dr),blockQuote:c(He),characterEscape:ge,characterReference:ge,codeFenced:c(Jt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:c(Jt,u),codeText:c(Di,u),codeTextData:ge,data:ge,codeFlowValue:ge,definition:c(rr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:c(Mr),hardBreakEscape:c(Ar),hardBreakTrailing:c(Ar),htmlFlow:c(ir,u),htmlFlowData:ge,htmlText:c(ir,u),htmlTextData:ge,image:c(Ai),label:u,link:c(lr),listItem:c(dn),listItemValue:v,listOrdered:c(fn,x),listUnordered:c(fn),paragraph:c(Or),reference:C,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:c(Dr),strong:c(Oi),thematicBreak:c($i)},exit:{atxHeading:m(),atxHeadingSequence:le,autolink:m(),autolinkEmail:Ie,autolinkProtocol:Se,blockQuote:m(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:we,characterReferenceMarkerNumeric:we,characterReferenceValue:he,characterReference:Te,codeFenced:m(j),codeFencedFence:L,codeFencedFenceInfo:w,codeFencedFenceMeta:E,codeFlowValue:R,codeIndented:m(T),codeText:m(G),codeTextData:R,data:R,definition:m(),definitionDestinationString:J,definitionLabelString:O,definitionTitleString:A,emphasis:m(),hardBreakEscape:m(Z),hardBreakTrailing:m(Z),htmlFlow:m(ve),htmlFlowData:R,htmlText:m(X),htmlTextData:R,image:m(se),label:re,labelText:U,lineEnding:Y,link:m($),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:me,resourceDestinationString:S,resourceTitleString:P,resource:B,setextHeading:m(ce),setextHeadingLineSequence:ue,setextHeadingText:D,strong:m(),thematicBreak:m()}};Cp(i,(t||{}).mdastExtensions||[]);const r={};return o;function o(F){let K={type:"root",children:[]};const xe={stack:[K],tokenStack:[],config:i,enter:d,exit:h,buffer:u,resume:y,data:r},be=[];let Ne=-1;for(;++Ne<F.length;)if(F[Ne][1].type==="listOrdered"||F[Ne][1].type==="listUnordered")if(F[Ne][0]==="enter")be.push(Ne);else{const Ze=be.pop();Ne=a(F,Ze,Ne)}for(Ne=-1;++Ne<F.length;){const Ze=i[F[Ne][0]];bp.call(Ze,F[Ne][1].type)&&Ze[F[Ne][1].type].call(Object.assign({sliceSerialize:F[Ne][2].sliceSerialize},xe),F[Ne][1])}if(xe.tokenStack.length>0){const Ze=xe.tokenStack[xe.tokenStack.length-1];(Ze[1]||wd).call(xe,void 0,Ze[0])}for(K.position={start:Rn(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:Rn(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},Ne=-1;++Ne<i.transforms.length;)K=i.transforms[Ne](K)||K;return K}function a(F,K,xe){let be=K-1,Ne=-1,Ze=!1,Zt,_t,pn,An;for(;++be<=xe;){const et=F[be];switch(et[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{et[0]==="enter"?Ne++:Ne--,An=void 0;break}case"lineEndingBlank":{et[0]==="enter"&&(Zt&&!An&&!Ne&&!pn&&(pn=be),An=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:An=void 0}if(!Ne&&et[0]==="enter"&&et[1].type==="listItemPrefix"||Ne===-1&&et[0]==="exit"&&(et[1].type==="listUnordered"||et[1].type==="listOrdered")){if(Zt){let Ht=be;for(_t=void 0;Ht--;){const kt=F[Ht];if(kt[1].type==="lineEnding"||kt[1].type==="lineEndingBlank"){if(kt[0]==="exit")continue;_t&&(F[_t][1].type="lineEndingBlank",Ze=!0),kt[1].type="lineEnding",_t=Ht}else if(!(kt[1].type==="linePrefix"||kt[1].type==="blockQuotePrefix"||kt[1].type==="blockQuotePrefixWhitespace"||kt[1].type==="blockQuoteMarker"||kt[1].type==="listItemIndent"))break}pn&&(!_t||pn<_t)&&(Zt._spread=!0),Zt.end=Object.assign({},_t?F[_t][1].start:et[1].end),F.splice(_t||be,0,["exit",Zt,et[2]]),be++,xe++}if(et[1].type==="listItemPrefix"){const Ht={type:"listItem",_spread:!1,start:Object.assign({},et[1].start),end:void 0};Zt=Ht,F.splice(be,0,["enter",Ht,et[2]]),be++,xe++,pn=void 0,An=!0}}}return F[K][1]._spread=Ze,xe}function c(F,K){return xe;function xe(be){d.call(this,F(be),be),K&&K.call(this,be)}}function u(){this.stack.push({type:"fragment",children:[]})}function d(F,K,xe){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([K,xe||void 0]),F.position={start:Rn(K.start),end:void 0}}function m(F){return K;function K(xe){F&&F.call(this,xe),h.call(this,xe)}}function h(F,K){const xe=this.stack.pop(),be=this.tokenStack.pop();if(be)be[0].type!==F.type&&(K?K.call(this,F,be[0]):(be[1]||wd).call(this,F,be[0]));else throw new Error("Cannot close `"+F.type+"` ("+_i({start:F.start,end:F.end})+"): it’s not open");xe.position.end=Rn(F.end)}function y(){return Wa(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function v(F){if(this.data.expectingFirstListItemValue){const K=this.stack[this.stack.length-2];K.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function w(){const F=this.resume(),K=this.stack[this.stack.length-1];K.lang=F}function E(){const F=this.resume(),K=this.stack[this.stack.length-1];K.meta=F}function L(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const F=this.resume(),K=this.stack[this.stack.length-1];K.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const F=this.resume(),K=this.stack[this.stack.length-1];K.value=F.replace(/(\r?\n|\r)$/g,"")}function O(F){const K=this.resume(),xe=this.stack[this.stack.length-1];xe.label=K,xe.identifier=Vt(this.sliceSerialize(F)).toLowerCase()}function A(){const F=this.resume(),K=this.stack[this.stack.length-1];K.title=F}function J(){const F=this.resume(),K=this.stack[this.stack.length-1];K.url=F}function le(F){const K=this.stack[this.stack.length-1];if(!K.depth){const xe=this.sliceSerialize(F).length;K.depth=xe}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function ue(F){const K=this.stack[this.stack.length-1];K.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function ce(){this.data.setextHeadingSlurpLineEnding=void 0}function ge(F){const xe=this.stack[this.stack.length-1].children;let be=xe[xe.length-1];(!be||be.type!=="text")&&(be=Fi(),be.position={start:Rn(F.start),end:void 0},xe.push(be)),this.stack.push(be)}function R(F){const K=this.stack.pop();K.value+=this.sliceSerialize(F),K.position.end=Rn(F.end)}function Y(F){const K=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=K.children[K.children.length-1];xe.position.end=Rn(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(K.type)&&(ge.call(this,F),R.call(this,F))}function Z(){this.data.atHardBreak=!0}function ve(){const F=this.resume(),K=this.stack[this.stack.length-1];K.value=F}function X(){const F=this.resume(),K=this.stack[this.stack.length-1];K.value=F}function G(){const F=this.resume(),K=this.stack[this.stack.length-1];K.value=F}function $(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=K,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function se(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=K,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function U(F){const K=this.sliceSerialize(F),xe=this.stack[this.stack.length-2];xe.label=H1(K),xe.identifier=Vt(K).toLowerCase()}function re(){const F=this.stack[this.stack.length-1],K=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const be=F.children;xe.children=be}else xe.alt=K}function S(){const F=this.resume(),K=this.stack[this.stack.length-1];K.url=F}function P(){const F=this.resume(),K=this.stack[this.stack.length-1];K.title=F}function B(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function me(F){const K=this.resume(),xe=this.stack[this.stack.length-1];xe.label=K,xe.identifier=Vt(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function we(F){this.data.characterReferenceType=F.type}function he(F){const K=this.sliceSerialize(F),xe=this.data.characterReferenceType;let be;xe?(be=pp(K,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):be=qa(K);const Ne=this.stack[this.stack.length-1];Ne.value+=be}function Te(F){const K=this.stack.pop();K.position.end=Rn(F.end)}function Se(F){R.call(this,F);const K=this.stack[this.stack.length-1];K.url=this.sliceSerialize(F)}function Ie(F){R.call(this,F);const K=this.stack[this.stack.length-1];K.url="mailto:"+this.sliceSerialize(F)}function He(){return{type:"blockquote",children:[]}}function Jt(){return{type:"code",lang:null,meta:null,value:""}}function Di(){return{type:"inlineCode",value:""}}function rr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Mr(){return{type:"emphasis",children:[]}}function Dr(){return{type:"heading",depth:0,children:[]}}function Ar(){return{type:"break"}}function ir(){return{type:"html",value:""}}function Ai(){return{type:"image",title:null,url:"",alt:null}}function lr(){return{type:"link",title:null,url:"",children:[]}}function fn(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function dn(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function Or(){return{type:"paragraph",children:[]}}function Oi(){return{type:"strong",children:[]}}function Fi(){return{type:"text",value:""}}function $i(){return{type:"thematicBreak"}}}function Rn(t){return{line:t.line,column:t.column,offset:t.offset}}function Cp(t,i){let r=-1;for(;++r<i.length;){const o=i[r];Array.isArray(o)?Cp(t,o):G1(t,o)}}function G1(t,i){let r;for(r in i)if(bp.call(i,r))switch(r){case"canContainEols":{const o=i[r];o&&t[r].push(...o);break}case"transforms":{const o=i[r];o&&t[r].push(...o);break}case"enter":case"exit":{const o=i[r];o&&Object.assign(t[r],o);break}}}function wd(t,i){throw t?new Error("Cannot close `"+t.type+"` ("+_i({start:t.start,end:t.end})+"): a different token (`"+i.type+"`, "+_i({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+_i({start:i.start,end:i.end})+") is still open")}function K1(t){const i=this;i.parser=r;function r(o){return q1(o,{...i.data("settings"),...t,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function Y1(t,i){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(i),!0)};return t.patch(i,r),t.applyData(i,r)}function X1(t,i){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(i,r),[t.applyData(i,r),{type:"text",value:`
|
||
`}]}function J1(t,i){const r=i.value?i.value+`
|
||
`:"",o={},a=i.lang?i.lang.split(/\s+/):[];a.length>0&&(o.className=["language-"+a[0]]);let c={type:"element",tagName:"code",properties:o,children:[{type:"text",value:r}]};return i.meta&&(c.data={meta:i.meta}),t.patch(i,c),c=t.applyData(i,c),c={type:"element",tagName:"pre",properties:{},children:[c]},t.patch(i,c),c}function Z1(t,i){const r={type:"element",tagName:"del",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function ev(t,i){const r={type:"element",tagName:"em",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function tv(t,i){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",o=String(i.identifier).toUpperCase(),a=Rr(o.toLowerCase()),c=t.footnoteOrder.indexOf(o);let u,d=t.footnoteCounts.get(o);d===void 0?(d=0,t.footnoteOrder.push(o),u=t.footnoteOrder.length):u=c+1,d+=1,t.footnoteCounts.set(o,d);const m={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+a,id:r+"fnref-"+a+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};t.patch(i,m);const h={type:"element",tagName:"sup",properties:{},children:[m]};return t.patch(i,h),t.applyData(i,h)}function nv(t,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function rv(t,i){if(t.options.allowDangerousHtml){const r={type:"raw",value:i.value};return t.patch(i,r),t.applyData(i,r)}}function jp(t,i){const r=i.referenceType;let o="]";if(r==="collapsed"?o+="[]":r==="full"&&(o+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+o}];const a=t.all(i),c=a[0];c&&c.type==="text"?c.value="["+c.value:a.unshift({type:"text",value:"["});const u=a[a.length-1];return u&&u.type==="text"?u.value+=o:a.push({type:"text",value:o}),a}function iv(t,i){const r=String(i.identifier).toUpperCase(),o=t.definitionById.get(r);if(!o)return jp(t,i);const a={src:Rr(o.url||""),alt:i.alt};o.title!==null&&o.title!==void 0&&(a.title=o.title);const c={type:"element",tagName:"img",properties:a,children:[]};return t.patch(i,c),t.applyData(i,c)}function lv(t,i){const r={src:Rr(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const o={type:"element",tagName:"img",properties:r,children:[]};return t.patch(i,o),t.applyData(i,o)}function ov(t,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};t.patch(i,r);const o={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(i,o),t.applyData(i,o)}function sv(t,i){const r=String(i.identifier).toUpperCase(),o=t.definitionById.get(r);if(!o)return jp(t,i);const a={href:Rr(o.url||"")};o.title!==null&&o.title!==void 0&&(a.title=o.title);const c={type:"element",tagName:"a",properties:a,children:t.all(i)};return t.patch(i,c),t.applyData(i,c)}function av(t,i){const r={href:Rr(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const o={type:"element",tagName:"a",properties:r,children:t.all(i)};return t.patch(i,o),t.applyData(i,o)}function uv(t,i,r){const o=t.all(i),a=r?cv(r):Ep(i),c={},u=[];if(typeof i.checked=="boolean"){const y=o[0];let x;y&&y.type==="element"&&y.tagName==="p"?x=y:(x={type:"element",tagName:"p",properties:{},children:[]},o.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),c.className=["task-list-item"]}let d=-1;for(;++d<o.length;){const y=o[d];(a||d!==0||y.type!=="element"||y.tagName!=="p")&&u.push({type:"text",value:`
|
||
`}),y.type==="element"&&y.tagName==="p"&&!a?u.push(...y.children):u.push(y)}const m=o[o.length-1];m&&(a||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
|
||
`});const h={type:"element",tagName:"li",properties:c,children:u};return t.patch(i,h),t.applyData(i,h)}function cv(t){let i=!1;if(t.type==="list"){i=t.spread||!1;const r=t.children;let o=-1;for(;!i&&++o<r.length;)i=Ep(r[o])}return i}function Ep(t){const i=t.spread;return i??t.children.length>1}function fv(t,i){const r={},o=t.all(i);let a=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++a<o.length;){const u=o[a];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const c={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:t.wrap(o,!0)};return t.patch(i,c),t.applyData(i,c)}function dv(t,i){const r={type:"element",tagName:"p",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function pv(t,i){const r={type:"root",children:t.wrap(t.all(i))};return t.patch(i,r),t.applyData(i,r)}function hv(t,i){const r={type:"element",tagName:"strong",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function mv(t,i){const r=t.all(i),o=r.shift(),a=[];if(o){const u={type:"element",tagName:"thead",properties:{},children:t.wrap([o],!0)};t.patch(i.children[0],u),a.push(u)}if(r.length>0){const u={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},d=Ba(i.children[1]),m=lp(i.children[i.children.length-1]);d&&m&&(u.position={start:d,end:m}),a.push(u)}const c={type:"element",tagName:"table",properties:{},children:t.wrap(a,!0)};return t.patch(i,c),t.applyData(i,c)}function gv(t,i,r){const o=r?r.children:void 0,c=(o?o.indexOf(i):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,d=u?u.length:i.children.length;let m=-1;const h=[];for(;++m<d;){const x=i.children[m],v={},w=u?u[m]:void 0;w&&(v.align=w);let E={type:"element",tagName:c,properties:v,children:[]};x&&(E.children=t.all(x),t.patch(x,E),E=t.applyData(x,E)),h.push(E)}const y={type:"element",tagName:"tr",properties:{},children:t.wrap(h,!0)};return t.patch(i,y),t.applyData(i,y)}function xv(t,i){const r={type:"element",tagName:"td",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}const Sd=9,bd=32;function yv(t){const i=String(t),r=/\r?\n|\r/g;let o=r.exec(i),a=0;const c=[];for(;o;)c.push(Cd(i.slice(a,o.index),a>0,!0),o[0]),a=o.index+o[0].length,o=r.exec(i);return c.push(Cd(i.slice(a),a>0,!1)),c.join("")}function Cd(t,i,r){let o=0,a=t.length;if(i){let c=t.codePointAt(o);for(;c===Sd||c===bd;)o++,c=t.codePointAt(o)}if(r){let c=t.codePointAt(a-1);for(;c===Sd||c===bd;)a--,c=t.codePointAt(a-1)}return a>o?t.slice(o,a):""}function vv(t,i){const r={type:"text",value:yv(String(i.value))};return t.patch(i,r),t.applyData(i,r)}function kv(t,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(i,r),t.applyData(i,r)}const wv={blockquote:Y1,break:X1,code:J1,delete:Z1,emphasis:ev,footnoteReference:tv,heading:nv,html:rv,imageReference:iv,image:lv,inlineCode:ov,linkReference:sv,link:av,listItem:uv,list:fv,paragraph:dv,root:pv,strong:hv,table:mv,tableCell:xv,tableRow:gv,text:vv,thematicBreak:kv,toml:Kl,yaml:Kl,definition:Kl,footnoteDefinition:Kl};function Kl(){}const Np=-1,po=0,Pi=1,no=2,Ga=3,Ka=4,Ya=5,Xa=6,_p=7,Tp=8,Sv=typeof self=="object"?self:globalThis,jd=(t,i)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new Sv[t](i)},bv=(t,i)=>{const r=(a,c)=>(t.set(c,a),a),o=a=>{if(t.has(a))return t.get(a);const[c,u]=i[a];switch(c){case po:case Np:return r(u,a);case Pi:{const d=r([],a);for(const m of u)d.push(o(m));return d}case no:{const d=r({},a);for(const[m,h]of u)d[o(m)]=o(h);return d}case Ga:return r(new Date(u),a);case Ka:{const{source:d,flags:m}=u;return r(new RegExp(d,m),a)}case Ya:{const d=r(new Map,a);for(const[m,h]of u)d.set(o(m),o(h));return d}case Xa:{const d=r(new Set,a);for(const m of u)d.add(o(m));return d}case _p:{const{name:d,message:m}=u;return r(jd(d,m),a)}case Tp:return r(BigInt(u),a);case"BigInt":return r(Object(BigInt(u)),a);case"ArrayBuffer":return r(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:d}=new Uint8Array(u);return r(new DataView(d),u)}}return r(jd(c,u),a)};return o},Ed=t=>bv(new Map,t)(0),Zn="",{toString:Cv}={},{keys:jv}=Object,ji=t=>{const i=typeof t;if(i!=="object"||!t)return[po,i];const r=Cv.call(t).slice(8,-1);switch(r){case"Array":return[Pi,Zn];case"Object":return[no,Zn];case"Date":return[Ga,Zn];case"RegExp":return[Ka,Zn];case"Map":return[Ya,Zn];case"Set":return[Xa,Zn];case"DataView":return[Pi,r]}return r.includes("Array")?[Pi,r]:r.includes("Error")?[_p,r]:[no,r]},Yl=([t,i])=>t===po&&(i==="function"||i==="symbol"),Ev=(t,i,r,o)=>{const a=(u,d)=>{const m=o.push(u)-1;return r.set(d,m),m},c=u=>{if(r.has(u))return r.get(u);let[d,m]=ji(u);switch(d){case po:{let y=u;switch(m){case"bigint":d=Tp,y=u.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+m);y=null;break;case"undefined":return a([Np],u)}return a([d,y],u)}case Pi:{if(m){let v=u;return m==="DataView"?v=new Uint8Array(u.buffer):m==="ArrayBuffer"&&(v=new Uint8Array(u)),a([m,[...v]],u)}const y=[],x=a([d,y],u);for(const v of u)y.push(c(v));return x}case no:{if(m)switch(m){case"BigInt":return a([m,u.toString()],u);case"Boolean":case"Number":case"String":return a([m,u.valueOf()],u)}if(i&&"toJSON"in u)return c(u.toJSON());const y=[],x=a([d,y],u);for(const v of jv(u))(t||!Yl(ji(u[v])))&&y.push([c(v),c(u[v])]);return x}case Ga:return a([d,isNaN(u.getTime())?Zn:u.toISOString()],u);case Ka:{const{source:y,flags:x}=u;return a([d,{source:y,flags:x}],u)}case Ya:{const y=[],x=a([d,y],u);for(const[v,w]of u)(t||!(Yl(ji(v))||Yl(ji(w))))&&y.push([c(v),c(w)]);return x}case Xa:{const y=[],x=a([d,y],u);for(const v of u)(t||!Yl(ji(v)))&&y.push(c(v));return x}}const{message:h}=u;return a([d,{name:m,message:h}],u)};return c},Nd=(t,{json:i,lossy:r}={})=>{const o=[];return Ev(!(i||r),!!i,new Map,o)(t),o},ro=typeof structuredClone=="function"?(t,i)=>i&&("json"in i||"lossy"in i)?Ed(Nd(t,i)):structuredClone(t):(t,i)=>Ed(Nd(t,i));function Nv(t,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function _v(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function Tv(t){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||Nv,o=t.options.footnoteBackLabel||_v,a=t.options.footnoteLabel||"Footnotes",c=t.options.footnoteLabelTagName||"h2",u=t.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let m=-1;for(;++m<t.footnoteOrder.length;){const h=t.footnoteById.get(t.footnoteOrder[m]);if(!h)continue;const y=t.all(h),x=String(h.identifier).toUpperCase(),v=Rr(x.toLowerCase());let w=0;const E=[],L=t.footnoteCounts.get(x);for(;L!==void 0&&++w<=L;){E.length>0&&E.push({type:"text",value:" "});let O=typeof r=="string"?r:r(m,w);typeof O=="string"&&(O={type:"text",value:O}),E.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+v+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(m,w),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const j=y[y.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const O=j.children[j.children.length-1];O&&O.type==="text"?O.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...E)}else y.push(...E);const T={type:"element",tagName:"li",properties:{id:i+"fn-"+v},children:t.wrap(y,!0)};t.patch(h,T),d.push(T)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:c,properties:{...ro(u),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
||
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
|
||
`}]}}const ho=(function(t){if(t==null)return Lv;if(typeof t=="function")return mo(t);if(typeof t=="object")return Array.isArray(t)?Pv(t):Iv(t);if(typeof t=="string")return zv(t);throw new Error("Expected function, string, or object as test")});function Pv(t){const i=[];let r=-1;for(;++r<t.length;)i[r]=ho(t[r]);return mo(o);function o(...a){let c=-1;for(;++c<i.length;)if(i[c].apply(this,a))return!0;return!1}}function Iv(t){const i=t;return mo(r);function r(o){const a=o;let c;for(c in t)if(a[c]!==i[c])return!1;return!0}}function zv(t){return mo(i);function i(r){return r&&r.type===t}}function mo(t){return i;function i(r,o,a){return!!(Rv(r)&&t.call(this,r,typeof o=="number"?o:void 0,a||void 0))}}function Lv(){return!0}function Rv(t){return t!==null&&typeof t=="object"&&"type"in t}const Pp=[],Mv=!0,za=!1,Dv="skip";function Ip(t,i,r,o){let a;typeof i=="function"&&typeof r!="function"?(o=r,r=i):a=i;const c=ho(a),u=o?-1:1;d(t,void 0,[])();function d(m,h,y){const x=m&&typeof m=="object"?m:{};if(typeof x.type=="string"){const w=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(m.type+(w?"<"+w+">":""))+")"})}return v;function v(){let w=Pp,E,L,j;if((!i||c(m,h,y[y.length-1]||void 0))&&(w=Av(r(m,y)),w[0]===za))return w;if("children"in m&&m.children){const T=m;if(T.children&&w[0]!==Dv)for(L=(o?T.children.length:-1)+u,j=y.concat(T);L>-1&&L<T.children.length;){const O=T.children[L];if(E=d(O,L,j)(),E[0]===za)return E;L=typeof E[1]=="number"?E[1]:L+u}}return w}}}function Av(t){return Array.isArray(t)?t:typeof t=="number"?[Mv,t]:t==null?Pp:[t]}function Ja(t,i,r,o){let a,c,u;typeof i=="function"&&typeof r!="function"?(c=void 0,u=i,a=r):(c=i,u=r,a=o),Ip(t,c,d,a);function d(m,h){const y=h[h.length-1],x=y?y.children.indexOf(m):void 0;return u(m,x,y)}}const La={}.hasOwnProperty,Ov={};function Fv(t,i){const r=i||Ov,o=new Map,a=new Map,c=new Map,u={...wv,...r.handlers},d={all:h,applyData:Bv,definitionById:o,footnoteById:a,footnoteCounts:c,footnoteOrder:[],handlers:u,one:m,options:r,patch:$v,wrap:Vv};return Ja(t,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const x=y.type==="definition"?o:a,v=String(y.identifier).toUpperCase();x.has(v)||x.set(v,y)}}),d;function m(y,x){const v=y.type,w=d.handlers[v];if(La.call(d.handlers,v)&&w)return w(d,y,x);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in y){const{children:L,...j}=y,T=ro(j);return T.children=d.all(y),T}return ro(y)}return(d.options.unknownHandler||Uv)(d,y,x)}function h(y){const x=[];if("children"in y){const v=y.children;let w=-1;for(;++w<v.length;){const E=d.one(v[w],y);if(E){if(w&&v[w-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=_d(E.value)),!Array.isArray(E)&&E.type==="element")){const L=E.children[0];L&&L.type==="text"&&(L.value=_d(L.value))}Array.isArray(E)?x.push(...E):x.push(E)}}}return x}}function $v(t,i){t.position&&(i.position=Nx(t))}function Bv(t,i){let r=i;if(t&&t.data){const o=t.data.hName,a=t.data.hChildren,c=t.data.hProperties;if(typeof o=="string")if(r.type==="element")r.tagName=o;else{const u="children"in r?r.children:[r];r={type:"element",tagName:o,properties:{},children:u}}r.type==="element"&&c&&Object.assign(r.properties,ro(c)),"children"in r&&r.children&&a!==null&&a!==void 0&&(r.children=a)}return r}function Uv(t,i){const r=i.data||{},o="value"in i&&!(La.call(r,"hProperties")||La.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:t.all(i)};return t.patch(i,o),t.applyData(i,o)}function Vv(t,i){const r=[];let o=-1;for(i&&r.push({type:"text",value:`
|
||
`});++o<t.length;)o&&r.push({type:"text",value:`
|
||
`}),r.push(t[o]);return i&&t.length>0&&r.push({type:"text",value:`
|
||
`}),r}function _d(t){let i=0,r=t.charCodeAt(i);for(;r===9||r===32;)i++,r=t.charCodeAt(i);return t.slice(i)}function Td(t,i){const r=Fv(t,i),o=r.one(t,void 0),a=Tv(r),c=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return a&&c.children.push({type:"text",value:`
|
||
`},a),c}function Hv(t,i){return t&&"run"in t?async function(r,o){const a=Td(r,{file:o,...i});await t.run(a,o)}:function(r,o){return Td(r,{file:o,...t||i})}}function Pd(t){if(t)throw t}var da,Id;function Wv(){if(Id)return da;Id=1;var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):i.call(h)==="[object Array]"},c=function(h){if(!h||i.call(h)!=="[object Object]")return!1;var y=t.call(h,"constructor"),x=h.constructor&&h.constructor.prototype&&t.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!y&&!x)return!1;var v;for(v in h);return typeof v>"u"||t.call(h,v)},u=function(h,y){r&&y.name==="__proto__"?r(h,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):h[y.name]=y.newValue},d=function(h,y){if(y==="__proto__")if(t.call(h,y)){if(o)return o(h,y).value}else return;return h[y]};return da=function m(){var h,y,x,v,w,E,L=arguments[0],j=1,T=arguments.length,O=!1;for(typeof L=="boolean"&&(O=L,L=arguments[1]||{},j=2),(L==null||typeof L!="object"&&typeof L!="function")&&(L={});j<T;++j)if(h=arguments[j],h!=null)for(y in h)x=d(L,y),v=d(h,y),L!==v&&(O&&v&&(c(v)||(w=a(v)))?(w?(w=!1,E=x&&a(x)?x:[]):E=x&&c(x)?x:{},u(L,{name:y,newValue:m(O,E,v)})):typeof v<"u"&&u(L,{name:y,newValue:v}));return L},da}var qv=Wv();const pa=lo(qv);function Ra(t){if(typeof t!="object"||t===null)return!1;const i=Object.getPrototypeOf(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Qv(){const t=[],i={run:r,use:o};return i;function r(...a){let c=-1;const u=a.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);d(null,...a);function d(m,...h){const y=t[++c];let x=-1;if(m){u(m);return}for(;++x<a.length;)(h[x]===null||h[x]===void 0)&&(h[x]=a[x]);a=h,y?Gv(y,d)(...h):u(null,...h)}}function o(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return t.push(a),i}}function Gv(t,i){let r;return o;function o(...u){const d=t.length>u.length;let m;d&&u.push(a);try{m=t.apply(this,u)}catch(h){const y=h;if(d&&r)throw y;return a(y)}d||(m&&m.then&&typeof m.then=="function"?m.then(c,a):m instanceof Error?a(m):c(m))}function a(u,...d){r||(r=!0,i(u,...d))}function c(u){a(null,u)}}const Yt={basename:Kv,dirname:Yv,extname:Xv,join:Jv,sep:"/"};function Kv(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');Mi(t);let r=0,o=-1,a=t.length,c;if(i===void 0||i.length===0||i.length>t.length){for(;a--;)if(t.codePointAt(a)===47){if(c){r=a+1;break}}else o<0&&(c=!0,o=a+1);return o<0?"":t.slice(r,o)}if(i===t)return"";let u=-1,d=i.length-1;for(;a--;)if(t.codePointAt(a)===47){if(c){r=a+1;break}}else u<0&&(c=!0,u=a+1),d>-1&&(t.codePointAt(a)===i.codePointAt(d--)?d<0&&(o=a):(d=-1,o=u));return r===o?o=u:o<0&&(o=t.length),t.slice(r,o)}function Yv(t){if(Mi(t),t.length===0)return".";let i=-1,r=t.length,o;for(;--r;)if(t.codePointAt(r)===47){if(o){i=r;break}}else o||(o=!0);return i<0?t.codePointAt(0)===47?"/":".":i===1&&t.codePointAt(0)===47?"//":t.slice(0,i)}function Xv(t){Mi(t);let i=t.length,r=-1,o=0,a=-1,c=0,u;for(;i--;){const d=t.codePointAt(i);if(d===47){if(u){o=i+1;break}continue}r<0&&(u=!0,r=i+1),d===46?a<0?a=i:c!==1&&(c=1):a>-1&&(c=-1)}return a<0||r<0||c===0||c===1&&a===r-1&&a===o+1?"":t.slice(a,r)}function Jv(...t){let i=-1,r;for(;++i<t.length;)Mi(t[i]),t[i]&&(r=r===void 0?t[i]:r+"/"+t[i]);return r===void 0?".":Zv(r)}function Zv(t){Mi(t);const i=t.codePointAt(0)===47;let r=ek(t,!i);return r.length===0&&!i&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),i?"/"+r:r}function ek(t,i){let r="",o=0,a=-1,c=0,u=-1,d,m;for(;++u<=t.length;){if(u<t.length)d=t.codePointAt(u);else{if(d===47)break;d=47}if(d===47){if(!(a===u-1||c===1))if(a!==u-1&&c===2){if(r.length<2||o!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(m=r.lastIndexOf("/"),m!==r.length-1){m<0?(r="",o=0):(r=r.slice(0,m),o=r.length-1-r.lastIndexOf("/")),a=u,c=0;continue}}else if(r.length>0){r="",o=0,a=u,c=0;continue}}i&&(r=r.length>0?r+"/..":"..",o=2)}else r.length>0?r+="/"+t.slice(a+1,u):r=t.slice(a+1,u),o=u-a-1;a=u,c=0}else d===46&&c>-1?c++:c=-1}return r}function Mi(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const tk={cwd:nk};function nk(){return"/"}function Ma(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function rk(t){if(typeof t=="string")t=new URL(t);else if(!Ma(t)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(t.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return ik(t)}function ik(t){if(t.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const i=t.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const o=i.codePointAt(r+2);if(o===70||o===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(i)}const ha=["history","path","basename","stem","extname","dirname"];class zp{constructor(i){let r;i?Ma(i)?r={path:i}:typeof i=="string"||lk(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":tk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<ha.length;){const c=ha[o];c in r&&r[c]!==void 0&&r[c]!==null&&(this[c]=c==="history"?[...r[c]]:r[c])}let a;for(a in r)ha.includes(a)||(this[a]=r[a])}get basename(){return typeof this.path=="string"?Yt.basename(this.path):void 0}set basename(i){ga(i,"basename"),ma(i,"basename"),this.path=Yt.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?Yt.dirname(this.path):void 0}set dirname(i){zd(this.basename,"dirname"),this.path=Yt.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?Yt.extname(this.path):void 0}set extname(i){if(ma(i,"extname"),zd(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yt.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){Ma(i)&&(i=rk(i)),ga(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?Yt.basename(this.path,this.extname):void 0}set stem(i){ga(i,"stem"),ma(i,"stem"),this.path=Yt.join(this.dirname||"",i+(this.extname||""))}fail(i,r,o){const a=this.message(i,r,o);throw a.fatal=!0,a}info(i,r,o){const a=this.message(i,r,o);return a.fatal=void 0,a}message(i,r,o){const a=new at(i,r,o);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function ma(t,i){if(t&&t.includes(Yt.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+Yt.sep+"`")}function ga(t,i){if(!t)throw new Error("`"+i+"` cannot be empty")}function zd(t,i){if(!t)throw new Error("Setting `"+i+"` requires `path` to be set too")}function lk(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const ok=(function(t){const o=this.constructor.prototype,a=o[t],c=function(){return a.apply(c,arguments)};return Object.setPrototypeOf(c,o),c}),sk={}.hasOwnProperty;class Za extends ok{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=Qv()}copy(){const i=new Za;let r=-1;for(;++r<this.attachers.length;){const o=this.attachers[r];i.use(...o)}return i.data(pa(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(va("data",this.frozen),this.namespace[i]=r,this):sk.call(this.namespace,i)&&this.namespace[i]||void 0:i?(va("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const a=r.call(i,...o);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=Xl(i),o=this.parser||this.Parser;return xa("parse",o),o(String(r),r)}process(i,r){const o=this;return this.freeze(),xa("process",this.parser||this.Parser),ya("process",this.compiler||this.Compiler),r?a(void 0,r):new Promise(a);function a(c,u){const d=Xl(i),m=o.parse(d);o.run(m,d,function(y,x,v){if(y||!x||!v)return h(y);const w=x,E=o.stringify(w,v);ck(E)?v.value=E:v.result=E,h(y,v)});function h(y,x){y||!x?u(y):c?c(x):r(void 0,x)}}}processSync(i){let r=!1,o;return this.freeze(),xa("processSync",this.parser||this.Parser),ya("processSync",this.compiler||this.Compiler),this.process(i,a),Rd("processSync","process",r),o;function a(c,u){r=!0,Pd(c),o=u}}run(i,r,o){Ld(i),this.freeze();const a=this.transformers;return!o&&typeof r=="function"&&(o=r,r=void 0),o?c(void 0,o):new Promise(c);function c(u,d){const m=Xl(r);a.run(i,m,h);function h(y,x,v){const w=x||i;y?d(y):u?u(w):o(void 0,w,v)}}}runSync(i,r){let o=!1,a;return this.run(i,r,c),Rd("runSync","run",o),a;function c(u,d){Pd(u),a=d,o=!0}}stringify(i,r){this.freeze();const o=Xl(r),a=this.compiler||this.Compiler;return ya("stringify",a),Ld(i),a(i,o)}use(i,...r){const o=this.attachers,a=this.namespace;if(va("use",this.frozen),i!=null)if(typeof i=="function")m(i,r);else if(typeof i=="object")Array.isArray(i)?d(i):u(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function c(h){if(typeof h=="function")m(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[y,...x]=h;m(y,x)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(a.settings=pa(!0,a.settings,h.settings))}function d(h){let y=-1;if(h!=null)if(Array.isArray(h))for(;++y<h.length;){const x=h[y];c(x)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,y){let x=-1,v=-1;for(;++x<o.length;)if(o[x][0]===h){v=x;break}if(v===-1)o.push([h,...y]);else if(y.length>0){let[w,...E]=y;const L=o[v][1];Ra(L)&&Ra(w)&&(w=pa(!0,L,w)),o[v]=[h,w,...E]}}}}const ak=new Za().freeze();function xa(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function ya(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function va(t,i){if(i)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ld(t){if(!Ra(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Rd(t,i,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+i+"` instead")}function Xl(t){return uk(t)?t:new zp(t)}function uk(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function ck(t){return typeof t=="string"||fk(t)}function fk(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const dk="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Md=[],Dd={allowDangerousHtml:!0},pk=/^(https?|ircs?|mailto|xmpp)$/i,hk=[{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 mk(t){const i=gk(t),r=xk(t);return yk(i.runSync(i.parse(r),r),t)}function gk(t){const i=t.rehypePlugins||Md,r=t.remarkPlugins||Md,o=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Dd}:Dd;return ak().use(K1).use(r).use(Hv,o).use(i)}function xk(t){const i=t.children||"",r=new zp;return typeof i=="string"&&(r.value=i),r}function yk(t,i){const r=i.allowedElements,o=i.allowElement,a=i.components,c=i.disallowedElements,u=i.skipHtml,d=i.unwrapDisallowed,m=i.urlTransform||vk;for(const y of hk)Object.hasOwn(i,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+dk+y.id,void 0);return Ja(t,h),zx(t,{Fragment:g.Fragment,components:a,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function h(y,x,v){if(y.type==="raw"&&v&&typeof x=="number")return u?v.children.splice(x,1):v.children[x]={type:"text",value:y.value},x;if(y.type==="element"){let w;for(w in ua)if(Object.hasOwn(ua,w)&&Object.hasOwn(y.properties,w)){const E=y.properties[w],L=ua[w];(L===null||L.includes(y.tagName))&&(y.properties[w]=m(String(E||""),w,y))}}if(y.type==="element"){let w=r?!r.includes(y.tagName):c?c.includes(y.tagName):!1;if(!w&&o&&typeof x=="number"&&(w=!o(y,x,v)),w&&v&&typeof x=="number")return d&&y.children?v.children.splice(x,1,...y.children):v.children.splice(x,1),x}}}function vk(t){const i=t.indexOf(":"),r=t.indexOf("?"),o=t.indexOf("#"),a=t.indexOf("/");return i===-1||a!==-1&&i>a||r!==-1&&i>r||o!==-1&&i>o||pk.test(t.slice(0,i))?t:""}function Ad(t,i){const r=String(t);if(typeof i!="string")throw new TypeError("Expected character");let o=0,a=r.indexOf(i);for(;a!==-1;)o++,a=r.indexOf(i,a+i.length);return o}function kk(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wk(t,i,r){const a=ho((r||{}).ignore||[]),c=Sk(i);let u=-1;for(;++u<c.length;)Ip(t,"text",d);function d(h,y){let x=-1,v;for(;++x<y.length;){const w=y[x],E=v?v.children:void 0;if(a(w,E?E.indexOf(w):void 0,v))return;v=w}if(v)return m(h,y)}function m(h,y){const x=y[y.length-1],v=c[u][0],w=c[u][1];let E=0;const j=x.children.indexOf(h);let T=!1,O=[];v.lastIndex=0;let A=v.exec(h.value);for(;A;){const J=A.index,le={index:A.index,input:A.input,stack:[...y,h]};let D=w(...A,le);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?v.lastIndex=J+1:(E!==J&&O.push({type:"text",value:h.value.slice(E,J)}),Array.isArray(D)?O.push(...D):D&&O.push(D),E=J+A[0].length,T=!0),!v.global)break;A=v.exec(h.value)}return T?(E<h.value.length&&O.push({type:"text",value:h.value.slice(E)}),x.children.splice(j,1,...O)):O=[h],j+O.length}}function Sk(t){const i=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let o=-1;for(;++o<r.length;){const a=r[o];i.push([bk(a[0]),Ck(a[1])])}return i}function bk(t){return typeof t=="string"?new RegExp(kk(t),"g"):t}function Ck(t){return typeof t=="function"?t:function(){return t}}const ka="phrasing",wa=["autolink","link","image","label"];function jk(){return{transforms:[zk],enter:{literalAutolink:Nk,literalAutolinkEmail:Sa,literalAutolinkHttp:Sa,literalAutolinkWww:Sa},exit:{literalAutolink:Ik,literalAutolinkEmail:Pk,literalAutolinkHttp:_k,literalAutolinkWww:Tk}}}function Ek(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ka,notInConstruct:wa},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ka,notInConstruct:wa},{character:":",before:"[ps]",after:"\\/",inConstruct:ka,notInConstruct:wa}]}}function Nk(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Sa(t){this.config.enter.autolinkProtocol.call(this,t)}function _k(t){this.config.exit.autolinkProtocol.call(this,t)}function Tk(t){this.config.exit.data.call(this,t);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(t)}function Pk(t){this.config.exit.autolinkEmail.call(this,t)}function Ik(t){this.exit(t)}function zk(t){wk(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Lk],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Rk]],{ignore:["link","linkReference"]})}function Lk(t,i,r,o,a){let c="";if(!Lp(a)||(/^w/i.test(i)&&(r=i+r,i="",c="http://"),!Mk(r)))return!1;const u=Dk(r+o);if(!u[0])return!1;const d={type:"link",title:null,url:c+i+u[0],children:[{type:"text",value:i+u[0]}]};return u[1]?[d,{type:"text",value:u[1]}]:d}function Rk(t,i,r,o){return!Lp(o,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+r,children:[{type:"text",value:i+"@"+r}]}}function Mk(t){const i=t.split(".");return!(i.length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))}function Dk(t){const i=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!i)return[t,void 0];t=t.slice(0,i.index);let r=i[0],o=r.indexOf(")");const a=Ad(t,"(");let c=Ad(t,")");for(;o!==-1&&a>c;)t+=r.slice(0,o+1),r=r.slice(o+1),o=r.indexOf(")"),c++;return[t,r]}function Lp(t,i){const r=t.input.charCodeAt(t.index-1);return(t.index===0||tr(r)||co(r))&&(!i||r!==47)}Rp.peek=Wk;function Ak(){this.buffer()}function Ok(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Fk(){this.buffer()}function $k(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Bk(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Vt(this.sliceSerialize(t)).toLowerCase(),r.label=i}function Uk(t){this.exit(t)}function Vk(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Vt(this.sliceSerialize(t)).toLowerCase(),r.label=i}function Hk(t){this.exit(t)}function Wk(){return"["}function Rp(t,i,r,o){const a=r.createTracker(o);let c=a.move("[^");const u=r.enter("footnoteReference"),d=r.enter("reference");return c+=a.move(r.safe(r.associationId(t),{after:"]",before:c})),d(),u(),c+=a.move("]"),c}function qk(){return{enter:{gfmFootnoteCallString:Ak,gfmFootnoteCall:Ok,gfmFootnoteDefinitionLabelString:Fk,gfmFootnoteDefinition:$k},exit:{gfmFootnoteCallString:Bk,gfmFootnoteCall:Uk,gfmFootnoteDefinitionLabelString:Vk,gfmFootnoteDefinition:Hk}}}function Qk(t){let i=!1;return t&&t.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:r,footnoteReference:Rp},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(o,a,c,u){const d=c.createTracker(u);let m=d.move("[^");const h=c.enter("footnoteDefinition"),y=c.enter("label");return m+=d.move(c.safe(c.associationId(o),{before:m,after:"]"})),y(),m+=d.move("]:"),o.children&&o.children.length>0&&(d.shift(4),m+=d.move((i?`
|
||
`:" ")+c.indentLines(c.containerFlow(o,d.current()),i?Mp:Gk))),h(),m}}function Gk(t,i,r){return i===0?t:Mp(t,i,r)}function Mp(t,i,r){return(r?"":" ")+t}const Kk=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Dp.peek=ew;function Yk(){return{canContainEols:["delete"],enter:{strikethrough:Jk},exit:{strikethrough:Zk}}}function Xk(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Kk}],handlers:{delete:Dp}}}function Jk(t){this.enter({type:"delete",children:[]},t)}function Zk(t){this.exit(t)}function Dp(t,i,r,o){const a=r.createTracker(o),c=r.enter("strikethrough");let u=a.move("~~");return u+=r.containerPhrasing(t,{...a.current(),before:u,after:"~"}),u+=a.move("~~"),c(),u}function ew(){return"~"}function tw(t){return t.length}function nw(t,i){const r=i||{},o=(r.align||[]).concat(),a=r.stringLength||tw,c=[],u=[],d=[],m=[];let h=0,y=-1;for(;++y<t.length;){const L=[],j=[];let T=-1;for(t[y].length>h&&(h=t[y].length);++T<t[y].length;){const O=rw(t[y][T]);if(r.alignDelimiters!==!1){const A=a(O);j[T]=A,(m[T]===void 0||A>m[T])&&(m[T]=A)}L.push(O)}u[y]=L,d[y]=j}let x=-1;if(typeof o=="object"&&"length"in o)for(;++x<h;)c[x]=Od(o[x]);else{const L=Od(o);for(;++x<h;)c[x]=L}x=-1;const v=[],w=[];for(;++x<h;){const L=c[x];let j="",T="";L===99?(j=":",T=":"):L===108?j=":":L===114&&(T=":");let O=r.alignDelimiters===!1?1:Math.max(1,m[x]-j.length-T.length);const A=j+"-".repeat(O)+T;r.alignDelimiters!==!1&&(O=j.length+O+T.length,O>m[x]&&(m[x]=O),w[x]=O),v[x]=A}u.splice(1,0,v),d.splice(1,0,w),y=-1;const E=[];for(;++y<u.length;){const L=u[y],j=d[y];x=-1;const T=[];for(;++x<h;){const O=L[x]||"";let A="",J="";if(r.alignDelimiters!==!1){const le=m[x]-(j[x]||0),D=c[x];D===114?A=" ".repeat(le):D===99?le%2?(A=" ".repeat(le/2+.5),J=" ".repeat(le/2-.5)):(A=" ".repeat(le/2),J=A):J=" ".repeat(le)}r.delimiterStart!==!1&&!x&&T.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&O==="")&&(r.delimiterStart!==!1||x)&&T.push(" "),r.alignDelimiters!==!1&&T.push(A),T.push(O),r.alignDelimiters!==!1&&T.push(J),r.padding!==!1&&T.push(" "),(r.delimiterEnd!==!1||x!==h-1)&&T.push("|")}E.push(r.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return E.join(`
|
||
`)}function rw(t){return t==null?"":String(t)}function Od(t){const i=typeof t=="string"?t.codePointAt(0):0;return i===67||i===99?99:i===76||i===108?108:i===82||i===114?114:0}function iw(t,i,r,o){const a=r.enter("blockquote"),c=r.createTracker(o);c.move("> "),c.shift(2);const u=r.indentLines(r.containerFlow(t,c.current()),lw);return a(),u}function lw(t,i,r){return">"+(r?"":" ")+t}function ow(t,i){return Fd(t,i.inConstruct,!0)&&!Fd(t,i.notInConstruct,!1)}function Fd(t,i,r){if(typeof i=="string"&&(i=[i]),!i||i.length===0)return r;let o=-1;for(;++o<i.length;)if(t.includes(i[o]))return!0;return!1}function $d(t,i,r,o){let a=-1;for(;++a<r.unsafe.length;)if(r.unsafe[a].character===`
|
||
`&&ow(r.stack,r.unsafe[a]))return/[ \t]/.test(o.before)?"":" ";return`\\
|
||
`}function sw(t,i){const r=String(t);let o=r.indexOf(i),a=o,c=0,u=0;if(typeof i!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===a?++c>u&&(u=c):c=1,a=o+i.length,o=r.indexOf(i,a);return u}function aw(t,i){return!!(i.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function uw(t){const i=t.options.fence||"`";if(i!=="`"&&i!=="~")throw new Error("Cannot serialize code with `"+i+"` for `options.fence`, expected `` ` `` or `~`");return i}function cw(t,i,r,o){const a=uw(r),c=t.value||"",u=a==="`"?"GraveAccent":"Tilde";if(aw(t,r)){const x=r.enter("codeIndented"),v=r.indentLines(c,fw);return x(),v}const d=r.createTracker(o),m=a.repeat(Math.max(sw(c,a)+1,3)),h=r.enter("codeFenced");let y=d.move(m);if(t.lang){const x=r.enter(`codeFencedLang${u}`);y+=d.move(r.safe(t.lang,{before:y,after:" ",encode:["`"],...d.current()})),x()}if(t.lang&&t.meta){const x=r.enter(`codeFencedMeta${u}`);y+=d.move(" "),y+=d.move(r.safe(t.meta,{before:y,after:`
|
||
`,encode:["`"],...d.current()})),x()}return y+=d.move(`
|
||
`),c&&(y+=d.move(c+`
|
||
`)),y+=d.move(m),h(),y}function fw(t,i,r){return(r?"":" ")+t}function eu(t){const i=t.options.quote||'"';if(i!=='"'&&i!=="'")throw new Error("Cannot serialize title with `"+i+"` for `options.quote`, expected `\"`, or `'`");return i}function dw(t,i,r,o){const a=eu(r),c=a==='"'?"Quote":"Apostrophe",u=r.enter("definition");let d=r.enter("label");const m=r.createTracker(o);let h=m.move("[");return h+=m.move(r.safe(r.associationId(t),{before:h,after:"]",...m.current()})),h+=m.move("]: "),d(),!t.url||/[\0- \u007F]/.test(t.url)?(d=r.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(r.safe(t.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(d=r.enter("destinationRaw"),h+=m.move(r.safe(t.url,{before:h,after:t.title?" ":`
|
||
`,...m.current()}))),d(),t.title&&(d=r.enter(`title${c}`),h+=m.move(" "+a),h+=m.move(r.safe(t.title,{before:h,after:a,...m.current()})),h+=m.move(a),d()),u(),h}function pw(t){const i=t.options.emphasis||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize emphasis with `"+i+"` for `options.emphasis`, expected `*`, or `_`");return i}function zi(t){return"&#x"+t.toString(16).toUpperCase()+";"}function io(t,i,r){const o=zr(t),a=zr(i);return o===void 0?a===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ap.peek=hw;function Ap(t,i,r,o){const a=pw(r),c=r.enter("emphasis"),u=r.createTracker(o),d=u.move(a);let m=u.move(r.containerPhrasing(t,{after:a,before:d,...u.current()}));const h=m.charCodeAt(0),y=io(o.before.charCodeAt(o.before.length-1),h,a);y.inside&&(m=zi(h)+m.slice(1));const x=m.charCodeAt(m.length-1),v=io(o.after.charCodeAt(0),x,a);v.inside&&(m=m.slice(0,-1)+zi(x));const w=u.move(a);return c(),r.attentionEncodeSurroundingInfo={after:v.outside,before:y.outside},d+m+w}function hw(t,i,r){return r.options.emphasis||"*"}function mw(t,i){let r=!1;return Ja(t,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return r=!0,za}),!!((!t.depth||t.depth<3)&&Wa(t)&&(i.options.setext||r))}function gw(t,i,r,o){const a=Math.max(Math.min(6,t.depth||1),1),c=r.createTracker(o);if(mw(t,r)){const y=r.enter("headingSetext"),x=r.enter("phrasing"),v=r.containerPhrasing(t,{...c.current(),before:`
|
||
`,after:`
|
||
`});return x(),y(),v+`
|
||
`+(a===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
||
`))+1))}const u="#".repeat(a),d=r.enter("headingAtx"),m=r.enter("phrasing");c.move(u+" ");let h=r.containerPhrasing(t,{before:"# ",after:`
|
||
`,...c.current()});return/^[\t ]/.test(h)&&(h=zi(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,r.options.closeAtx&&(h+=" "+u),m(),d(),h}Op.peek=xw;function Op(t){return t.value||""}function xw(){return"<"}Fp.peek=yw;function Fp(t,i,r,o){const a=eu(r),c=a==='"'?"Quote":"Apostrophe",u=r.enter("image");let d=r.enter("label");const m=r.createTracker(o);let h=m.move("![");return h+=m.move(r.safe(t.alt,{before:h,after:"]",...m.current()})),h+=m.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=r.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(r.safe(t.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(d=r.enter("destinationRaw"),h+=m.move(r.safe(t.url,{before:h,after:t.title?" ":")",...m.current()}))),d(),t.title&&(d=r.enter(`title${c}`),h+=m.move(" "+a),h+=m.move(r.safe(t.title,{before:h,after:a,...m.current()})),h+=m.move(a),d()),h+=m.move(")"),u(),h}function yw(){return"!"}$p.peek=vw;function $p(t,i,r,o){const a=t.referenceType,c=r.enter("imageReference");let u=r.enter("label");const d=r.createTracker(o);let m=d.move("![");const h=r.safe(t.alt,{before:m,after:"]",...d.current()});m+=d.move(h+"]["),u();const y=r.stack;r.stack=[],u=r.enter("reference");const x=r.safe(r.associationId(t),{before:m,after:"]",...d.current()});return u(),r.stack=y,c(),a==="full"||!h||h!==x?m+=d.move(x+"]"):a==="shortcut"?m=m.slice(0,-1):m+=d.move("]"),m}function vw(){return"!"}Bp.peek=kw;function Bp(t,i,r){let o=t.value||"",a="`",c=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(o);)a+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++c<r.unsafe.length;){const u=r.unsafe[c],d=r.compilePattern(u);let m;if(u.atBreak)for(;m=d.exec(o);){let h=m.index;o.charCodeAt(h)===10&&o.charCodeAt(h-1)===13&&h--,o=o.slice(0,h)+" "+o.slice(m.index+1)}}return a+o+a}function kw(){return"`"}function Up(t,i){const r=Wa(t);return!!(!i.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}Vp.peek=ww;function Vp(t,i,r,o){const a=eu(r),c=a==='"'?"Quote":"Apostrophe",u=r.createTracker(o);let d,m;if(Up(t,r)){const y=r.stack;r.stack=[],d=r.enter("autolink");let x=u.move("<");return x+=u.move(r.containerPhrasing(t,{before:x,after:">",...u.current()})),x+=u.move(">"),d(),r.stack=y,x}d=r.enter("link"),m=r.enter("label");let h=u.move("[");return h+=u.move(r.containerPhrasing(t,{before:h,after:"](",...u.current()})),h+=u.move("]("),m(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(m=r.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(r.safe(t.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(m=r.enter("destinationRaw"),h+=u.move(r.safe(t.url,{before:h,after:t.title?" ":")",...u.current()}))),m(),t.title&&(m=r.enter(`title${c}`),h+=u.move(" "+a),h+=u.move(r.safe(t.title,{before:h,after:a,...u.current()})),h+=u.move(a),m()),h+=u.move(")"),d(),h}function ww(t,i,r){return Up(t,r)?"<":"["}Hp.peek=Sw;function Hp(t,i,r,o){const a=t.referenceType,c=r.enter("linkReference");let u=r.enter("label");const d=r.createTracker(o);let m=d.move("[");const h=r.containerPhrasing(t,{before:m,after:"]",...d.current()});m+=d.move(h+"]["),u();const y=r.stack;r.stack=[],u=r.enter("reference");const x=r.safe(r.associationId(t),{before:m,after:"]",...d.current()});return u(),r.stack=y,c(),a==="full"||!h||h!==x?m+=d.move(x+"]"):a==="shortcut"?m=m.slice(0,-1):m+=d.move("]"),m}function Sw(){return"["}function tu(t){const i=t.options.bullet||"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bullet`, expected `*`, `+`, or `-`");return i}function bw(t){const i=tu(t),r=t.options.bulletOther;if(!r)return i==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===i)throw new Error("Expected `bullet` (`"+i+"`) and `bulletOther` (`"+r+"`) to be different");return r}function Cw(t){const i=t.options.bulletOrdered||".";if(i!=="."&&i!==")")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOrdered`, expected `.` or `)`");return i}function Wp(t){const i=t.options.rule||"*";if(i!=="*"&&i!=="-"&&i!=="_")throw new Error("Cannot serialize rules with `"+i+"` for `options.rule`, expected `*`, `-`, or `_`");return i}function jw(t,i,r,o){const a=r.enter("list"),c=r.bulletCurrent;let u=t.ordered?Cw(r):tu(r);const d=t.ordered?u==="."?")":".":bw(r);let m=i&&r.bulletLastUsed?u===r.bulletLastUsed:!1;if(!t.ordered){const y=t.children?t.children[0]:void 0;if((u==="*"||u==="-")&&y&&(!y.children||!y.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(m=!0),Wp(r)===u&&y){let x=-1;for(;++x<t.children.length;){const v=t.children[x];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(u=d),r.bulletCurrent=u;const h=r.containerFlow(t,o);return r.bulletLastUsed=u,r.bulletCurrent=c,a(),h}function Ew(t){const i=t.options.listItemIndent||"one";if(i!=="tab"&&i!=="one"&&i!=="mixed")throw new Error("Cannot serialize items with `"+i+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return i}function Nw(t,i,r,o){const a=Ew(r);let c=r.bulletCurrent||tu(r);i&&i.type==="list"&&i.ordered&&(c=(typeof i.start=="number"&&i.start>-1?i.start:1)+(r.options.incrementListMarker===!1?0:i.children.indexOf(t))+c);let u=c.length+1;(a==="tab"||a==="mixed"&&(i&&i.type==="list"&&i.spread||t.spread))&&(u=Math.ceil(u/4)*4);const d=r.createTracker(o);d.move(c+" ".repeat(u-c.length)),d.shift(u);const m=r.enter("listItem"),h=r.indentLines(r.containerFlow(t,d.current()),y);return m(),h;function y(x,v,w){return v?(w?"":" ".repeat(u))+x:(w?c:c+" ".repeat(u-c.length))+x}}function _w(t,i,r,o){const a=r.enter("paragraph"),c=r.enter("phrasing"),u=r.containerPhrasing(t,o);return c(),a(),u}const Tw=ho(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Pw(t,i,r,o){return(t.children.some(function(u){return Tw(u)})?r.containerPhrasing:r.containerFlow).call(r,t,o)}function Iw(t){const i=t.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}qp.peek=zw;function qp(t,i,r,o){const a=Iw(r),c=r.enter("strong"),u=r.createTracker(o),d=u.move(a+a);let m=u.move(r.containerPhrasing(t,{after:a,before:d,...u.current()}));const h=m.charCodeAt(0),y=io(o.before.charCodeAt(o.before.length-1),h,a);y.inside&&(m=zi(h)+m.slice(1));const x=m.charCodeAt(m.length-1),v=io(o.after.charCodeAt(0),x,a);v.inside&&(m=m.slice(0,-1)+zi(x));const w=u.move(a+a);return c(),r.attentionEncodeSurroundingInfo={after:v.outside,before:y.outside},d+m+w}function zw(t,i,r){return r.options.strong||"*"}function Lw(t,i,r,o){return r.safe(t.value,o)}function Rw(t){const i=t.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}function Mw(t,i,r){const o=(Wp(r)+(r.options.ruleSpaces?" ":"")).repeat(Rw(r));return r.options.ruleSpaces?o.slice(0,-1):o}const Qp={blockquote:iw,break:$d,code:cw,definition:dw,emphasis:Ap,hardBreak:$d,heading:gw,html:Op,image:Fp,imageReference:$p,inlineCode:Bp,link:Vp,linkReference:Hp,list:jw,listItem:Nw,paragraph:_w,root:Pw,strong:qp,text:Lw,thematicBreak:Mw};function Dw(){return{enter:{table:Aw,tableData:Bd,tableHeader:Bd,tableRow:Fw},exit:{codeText:$w,table:Ow,tableData:ba,tableHeader:ba,tableRow:ba}}}function Aw(t){const i=t._align;this.enter({type:"table",align:i.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function Ow(t){this.exit(t),this.data.inTable=void 0}function Fw(t){this.enter({type:"tableRow",children:[]},t)}function ba(t){this.exit(t)}function Bd(t){this.enter({type:"tableCell",children:[]},t)}function $w(t){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,Bw));const r=this.stack[this.stack.length-1];r.type,r.value=i,this.exit(t)}function Bw(t,i){return i==="|"?i:t}function Uw(t){const i=t||{},r=i.tableCellPadding,o=i.tablePipeAlign,a=i.stringLength,c=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
||
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:u,tableCell:m,tableRow:d}};function u(w,E,L,j){return h(y(w,L,j),w.align)}function d(w,E,L,j){const T=x(w,L,j),O=h([T]);return O.slice(0,O.indexOf(`
|
||
`))}function m(w,E,L,j){const T=L.enter("tableCell"),O=L.enter("phrasing"),A=L.containerPhrasing(w,{...j,before:c,after:c});return O(),T(),A}function h(w,E){return nw(w,{align:E,alignDelimiters:o,padding:r,stringLength:a})}function y(w,E,L){const j=w.children;let T=-1;const O=[],A=E.enter("table");for(;++T<j.length;)O[T]=x(j[T],E,L);return A(),O}function x(w,E,L){const j=w.children;let T=-1;const O=[],A=E.enter("tableRow");for(;++T<j.length;)O[T]=m(j[T],w,E,L);return A(),O}function v(w,E,L){let j=Qp.inlineCode(w,E,L);return L.stack.includes("tableCell")&&(j=j.replace(/\|/g,"\\$&")),j}}function Vw(){return{exit:{taskListCheckValueChecked:Ud,taskListCheckValueUnchecked:Ud,paragraph:Ww}}}function Hw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:qw}}}function Ud(t){const i=this.stack[this.stack.length-2];i.type,i.checked=t.type==="taskListCheckValueChecked"}function Ww(t){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const o=r.children[0];if(o&&o.type==="text"){const a=i.children;let c=-1,u;for(;++c<a.length;){const d=a[c];if(d.type==="paragraph"){u=d;break}}u===r&&(o.value=o.value.slice(1),o.value.length===0?r.children.shift():r.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,r.position.start=Object.assign({},o.position.start)))}}this.exit(t)}function qw(t,i,r,o){const a=t.children[0],c=typeof t.checked=="boolean"&&a&&a.type==="paragraph",u="["+(t.checked?"x":" ")+"] ",d=r.createTracker(o);c&&d.move(u);let m=Qp.listItem(t,i,r,{...o,...d.current()});return c&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),m;function h(y){return y+u}}function Qw(){return[jk(),qk(),Yk(),Dw(),Vw()]}function Gw(t){return{extensions:[Ek(),Qk(t),Xk(),Uw(t),Hw()]}}const Kw={tokenize:t0,partial:!0},Gp={tokenize:n0,partial:!0},Kp={tokenize:r0,partial:!0},Yp={tokenize:i0,partial:!0},Yw={tokenize:l0,partial:!0},Xp={name:"wwwAutolink",tokenize:Zw,previous:Zp},Jp={name:"protocolAutolink",tokenize:e0,previous:eh},cn={name:"emailAutolink",tokenize:Jw,previous:th},Xt={};function Xw(){return{text:Xt}}let Xn=48;for(;Xn<123;)Xt[Xn]=cn,Xn++,Xn===58?Xn=65:Xn===91&&(Xn=97);Xt[43]=cn;Xt[45]=cn;Xt[46]=cn;Xt[95]=cn;Xt[72]=[cn,Jp];Xt[104]=[cn,Jp];Xt[87]=[cn,Xp];Xt[119]=[cn,Xp];function Jw(t,i,r){const o=this;let a,c;return u;function u(x){return!Da(x)||!th.call(o,o.previous)||nu(o.events)?r(x):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(x))}function d(x){return Da(x)?(t.consume(x),d):x===64?(t.consume(x),m):r(x)}function m(x){return x===46?t.check(Yw,y,h)(x):x===45||x===95||st(x)?(c=!0,t.consume(x),m):y(x)}function h(x){return t.consume(x),a=!0,m}function y(x){return c&&a&&ft(o.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),i(x)):r(x)}}function Zw(t,i,r){const o=this;return a;function a(u){return u!==87&&u!==119||!Zp.call(o,o.previous)||nu(o.events)?r(u):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Kw,t.attempt(Gp,t.attempt(Kp,c),r),r)(u))}function c(u){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),i(u)}}function e0(t,i,r){const o=this;let a="",c=!1;return u;function u(x){return(x===72||x===104)&&eh.call(o,o.previous)&&!nu(o.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),a+=String.fromCodePoint(x),t.consume(x),d):r(x)}function d(x){if(ft(x)&&a.length<5)return a+=String.fromCodePoint(x),t.consume(x),d;if(x===58){const v=a.toLowerCase();if(v==="http"||v==="https")return t.consume(x),m}return r(x)}function m(x){return x===47?(t.consume(x),c?h:(c=!0,m)):r(x)}function h(x){return x===null||to(x)||Re(x)||tr(x)||co(x)?r(x):t.attempt(Gp,t.attempt(Kp,y),r)(x)}function y(x){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),i(x)}}function t0(t,i,r){let o=0;return a;function a(u){return(u===87||u===119)&&o<3?(o++,t.consume(u),a):u===46&&o===3?(t.consume(u),c):r(u)}function c(u){return u===null?r(u):i(u)}}function n0(t,i,r){let o,a,c;return u;function u(h){return h===46||h===95?t.check(Yp,m,d)(h):h===null||Re(h)||tr(h)||h!==45&&co(h)?m(h):(c=!0,t.consume(h),u)}function d(h){return h===95?o=!0:(a=o,o=void 0),t.consume(h),u}function m(h){return a||o||!c?r(h):i(h)}}function r0(t,i){let r=0,o=0;return a;function a(u){return u===40?(r++,t.consume(u),a):u===41&&o<r?c(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?t.check(Yp,i,c)(u):u===null||Re(u)||tr(u)?i(u):(t.consume(u),a)}function c(u){return u===41&&o++,t.consume(u),a}}function i0(t,i,r){return o;function o(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(t.consume(d),o):d===38?(t.consume(d),c):d===93?(t.consume(d),a):d===60||d===null||Re(d)||tr(d)?i(d):r(d)}function a(d){return d===null||d===40||d===91||Re(d)||tr(d)?i(d):o(d)}function c(d){return ft(d)?u(d):r(d)}function u(d){return d===59?(t.consume(d),o):ft(d)?(t.consume(d),u):r(d)}}function l0(t,i,r){return o;function o(c){return t.consume(c),a}function a(c){return st(c)?r(c):i(c)}}function Zp(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Re(t)}function eh(t){return!ft(t)}function th(t){return!(t===47||Da(t))}function Da(t){return t===43||t===45||t===46||t===95||st(t)}function nu(t){let i=t.length,r=!1;for(;i--;){const o=t[i][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){r=!0;break}if(o._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const o0={tokenize:h0,partial:!0};function s0(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:f0,continuation:{tokenize:d0},exit:p0}},text:{91:{name:"gfmFootnoteCall",tokenize:c0},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:a0,resolveTo:u0}}}}function a0(t,i,r){const o=this;let a=o.events.length;const c=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let u;for(;a--;){const m=o.events[a][1];if(m.type==="labelImage"){u=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return d;function d(m){if(!u||!u._balanced)return r(m);const h=Vt(o.sliceSerialize({start:u.end,end:o.now()}));return h.codePointAt(0)!==94||!c.includes(h.slice(1))?r(m):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(m),t.exit("gfmFootnoteCallLabelMarker"),i(m))}}function u0(t,i){let r=t.length;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const c={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},t[t.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},c.start),end:Object.assign({},c.end)},d=[t[r+1],t[r+2],["enter",o,i],t[r+3],t[r+4],["enter",a,i],["exit",a,i],["enter",c,i],["enter",u,i],["exit",u,i],["exit",c,i],t[t.length-2],t[t.length-1],["exit",o,i]];return t.splice(r,t.length-r+1,...d),t}function c0(t,i,r){const o=this,a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let c=0,u;return d;function d(x){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(x),t.exit("gfmFootnoteCallLabelMarker"),m}function m(x){return x!==94?r(x):(t.enter("gfmFootnoteCallMarker"),t.consume(x),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",h)}function h(x){if(c>999||x===93&&!u||x===null||x===91||Re(x))return r(x);if(x===93){t.exit("chunkString");const v=t.exit("gfmFootnoteCallString");return a.includes(Vt(o.sliceSerialize(v)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(x),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),i):r(x)}return Re(x)||(u=!0),c++,t.consume(x),x===92?y:h}function y(x){return x===91||x===92||x===93?(t.consume(x),c++,h):h(x)}}function f0(t,i,r){const o=this,a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let c,u=0,d;return m;function m(E){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(E){return E===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):r(E)}function y(E){if(u>999||E===93&&!d||E===null||E===91||Re(E))return r(E);if(E===93){t.exit("chunkString");const L=t.exit("gfmFootnoteDefinitionLabelString");return c=Vt(o.sliceSerialize(L)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),v}return Re(E)||(d=!0),u++,t.consume(E),E===92?x:y}function x(E){return E===91||E===92||E===93?(t.consume(E),u++,y):y(E)}function v(E){return E===58?(t.enter("definitionMarker"),t.consume(E),t.exit("definitionMarker"),a.includes(c)||a.push(c),Ee(t,w,"gfmFootnoteDefinitionWhitespace")):r(E)}function w(E){return i(E)}}function d0(t,i,r){return t.check(Ri,i,t.attempt(o0,i,r))}function p0(t){t.exit("gfmFootnoteDefinition")}function h0(t,i,r){const o=this;return Ee(t,a,"gfmFootnoteDefinitionIndent",5);function a(c){const u=o.events[o.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?i(c):r(c)}}function m0(t){let r=(t||{}).singleTilde;const o={name:"strikethrough",tokenize:c,resolveAll:a};return r==null&&(r=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function a(u,d){let m=-1;for(;++m<u.length;)if(u[m][0]==="enter"&&u[m][1].type==="strikethroughSequenceTemporary"&&u[m][1]._close){let h=m;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[m][1].end.offset-u[m][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[m][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[m][1].end)},x={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[m][1].start)},v=[["enter",y,d],["enter",u[h][1],d],["exit",u[h][1],d],["enter",x,d]],w=d.parser.constructs.insideSpan.null;w&&Et(v,v.length,0,fo(w,u.slice(h+1,m),d)),Et(v,v.length,0,[["exit",x,d],["enter",u[m][1],d],["exit",u[m][1],d],["exit",y,d]]),Et(u,h-1,m-h+3,v),m=h+v.length-2;break}}for(m=-1;++m<u.length;)u[m][1].type==="strikethroughSequenceTemporary"&&(u[m][1].type="data");return u}function c(u,d,m){const h=this.previous,y=this.events;let x=0;return v;function v(E){return h===126&&y[y.length-1][1].type!=="characterEscape"?m(E):(u.enter("strikethroughSequenceTemporary"),w(E))}function w(E){const L=zr(h);if(E===126)return x>1?m(E):(u.consume(E),x++,w);if(x<2&&!r)return m(E);const j=u.exit("strikethroughSequenceTemporary"),T=zr(E);return j._open=!T||T===2&&!!L,j._close=!L||L===2&&!!T,d(E)}}}class g0{constructor(){this.map=[]}add(i,r,o){x0(this,i,r,o)}consume(i){if(this.map.sort(function(c,u){return c[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const o=[];for(;r>0;)r-=1,o.push(i.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),i.length=this.map[r][0];o.push(i.slice()),i.length=0;let a=o.pop();for(;a;){for(const c of a)i.push(c);a=o.pop()}this.map.length=0}}function x0(t,i,r,o){let a=0;if(!(r===0&&o.length===0)){for(;a<t.map.length;){if(t.map[a][0]===i){t.map[a][1]+=r,t.map[a][2].push(...o);return}a+=1}t.map.push([i,r,o])}}function y0(t,i){let r=!1;const o=[];for(;i<t.length;){const a=t[i];if(r){if(a[0]==="enter")a[1].type==="tableContent"&&o.push(t[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(t[i-1][1].type==="tableDelimiterMarker"){const c=o.length-1;o[c]=o[c]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(r=!0);i+=1}return o}function v0(){return{flow:{null:{name:"table",tokenize:k0,resolveAll:w0}}}}function k0(t,i,r){const o=this;let a=0,c=0,u;return d;function d(R){let Y=o.events.length-1;for(;Y>-1;){const X=o.events[Y][1].type;if(X==="lineEnding"||X==="linePrefix")Y--;else break}const Z=Y>-1?o.events[Y][1].type:null,ve=Z==="tableHead"||Z==="tableRow"?D:m;return ve===D&&o.parser.lazy[o.now().line]?r(R):ve(R)}function m(R){return t.enter("tableHead"),t.enter("tableRow"),h(R)}function h(R){return R===124||(u=!0,c+=1),y(R)}function y(R){return R===null?r(R):pe(R)?c>1?(c=0,o.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),w):r(R):je(R)?Ee(t,y,"whitespace")(R):(c+=1,u&&(u=!1,a+=1),R===124?(t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),u=!0,y):(t.enter("data"),x(R)))}function x(R){return R===null||R===124||Re(R)?(t.exit("data"),y(R)):(t.consume(R),R===92?v:x)}function v(R){return R===92||R===124?(t.consume(R),x):x(R)}function w(R){return o.interrupt=!1,o.parser.lazy[o.now().line]?r(R):(t.enter("tableDelimiterRow"),u=!1,je(R)?Ee(t,E,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):E(R))}function E(R){return R===45||R===58?j(R):R===124?(u=!0,t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),L):le(R)}function L(R){return je(R)?Ee(t,j,"whitespace")(R):j(R)}function j(R){return R===58?(c+=1,u=!0,t.enter("tableDelimiterMarker"),t.consume(R),t.exit("tableDelimiterMarker"),T):R===45?(c+=1,T(R)):R===null||pe(R)?J(R):le(R)}function T(R){return R===45?(t.enter("tableDelimiterFiller"),O(R)):le(R)}function O(R){return R===45?(t.consume(R),O):R===58?(u=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(R),t.exit("tableDelimiterMarker"),A):(t.exit("tableDelimiterFiller"),A(R))}function A(R){return je(R)?Ee(t,J,"whitespace")(R):J(R)}function J(R){return R===124?E(R):R===null||pe(R)?!u||a!==c?le(R):(t.exit("tableDelimiterRow"),t.exit("tableHead"),i(R)):le(R)}function le(R){return r(R)}function D(R){return t.enter("tableRow"),ue(R)}function ue(R){return R===124?(t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),ue):R===null||pe(R)?(t.exit("tableRow"),i(R)):je(R)?Ee(t,ue,"whitespace")(R):(t.enter("data"),ce(R))}function ce(R){return R===null||R===124||Re(R)?(t.exit("data"),ue(R)):(t.consume(R),R===92?ge:ce)}function ge(R){return R===92||R===124?(t.consume(R),ce):ce(R)}}function w0(t,i){let r=-1,o=!0,a=0,c=[0,0,0,0],u=[0,0,0,0],d=!1,m=0,h,y,x;const v=new g0;for(;++r<t.length;){const w=t[r],E=w[1];w[0]==="enter"?E.type==="tableHead"?(d=!1,m!==0&&(Vd(v,i,m,h,y),y=void 0,m=0),h={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},v.add(r,0,[["enter",h,i]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(o=!0,x=void 0,c=[0,0,0,0],u=[0,r+1,0,0],d&&(d=!1,y={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},v.add(r,0,[["enter",y,i]])),a=E.type==="tableDelimiterRow"?2:y?3:1):a&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(o=!1,u[2]===0&&(c[1]!==0&&(u[0]=u[1],x=Jl(v,i,c,a,void 0,x),c=[0,0,0,0]),u[2]=r)):E.type==="tableCellDivider"&&(o?o=!1:(c[1]!==0&&(u[0]=u[1],x=Jl(v,i,c,a,void 0,x)),c=u,u=[c[1],r,0,0])):E.type==="tableHead"?(d=!0,m=r):E.type==="tableRow"||E.type==="tableDelimiterRow"?(m=r,c[1]!==0?(u[0]=u[1],x=Jl(v,i,c,a,r,x)):u[1]!==0&&(x=Jl(v,i,u,a,r,x)),a=0):a&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(u[3]=r)}for(m!==0&&Vd(v,i,m,h,y),v.consume(i.events),r=-1;++r<i.events.length;){const w=i.events[r];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=y0(i.events,r))}return t}function Jl(t,i,r,o,a,c){const u=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",d="tableContent";r[0]!==0&&(c.end=Object.assign({},Ir(i.events,r[0])),t.add(r[0],0,[["exit",c,i]]));const m=Ir(i.events,r[1]);if(c={type:u,start:Object.assign({},m),end:Object.assign({},m)},t.add(r[1],0,[["enter",c,i]]),r[2]!==0){const h=Ir(i.events,r[2]),y=Ir(i.events,r[3]),x={type:d,start:Object.assign({},h),end:Object.assign({},y)};if(t.add(r[2],0,[["enter",x,i]]),o!==2){const v=i.events[r[2]],w=i.events[r[3]];if(v[1].end=Object.assign({},w[1].end),v[1].type="chunkText",v[1].contentType="text",r[3]>r[2]+1){const E=r[2]+1,L=r[3]-r[2]-1;t.add(E,L,[])}}t.add(r[3]+1,0,[["exit",x,i]])}return a!==void 0&&(c.end=Object.assign({},Ir(i.events,a)),t.add(a,0,[["exit",c,i]]),c=void 0),c}function Vd(t,i,r,o,a){const c=[],u=Ir(i.events,r);a&&(a.end=Object.assign({},u),c.push(["exit",a,i])),o.end=Object.assign({},u),c.push(["exit",o,i]),t.add(r+1,0,c)}function Ir(t,i){const r=t[i],o=r[0]==="enter"?"start":"end";return r[1][o]}const S0={name:"tasklistCheck",tokenize:C0};function b0(){return{text:{91:S0}}}function C0(t,i,r){const o=this;return a;function a(m){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?r(m):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),c)}function c(m){return Re(m)?(t.enter("taskListCheckValueUnchecked"),t.consume(m),t.exit("taskListCheckValueUnchecked"),u):m===88||m===120?(t.enter("taskListCheckValueChecked"),t.consume(m),t.exit("taskListCheckValueChecked"),u):r(m)}function u(m){return m===93?(t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),d):r(m)}function d(m){return pe(m)?i(m):je(m)?t.check({tokenize:j0},i,r)(m):r(m)}}function j0(t,i,r){return Ee(t,o,"whitespace");function o(a){return a===null?r(a):i(a)}}function E0(t){return dp([Xw(),s0(),m0(t),v0(),b0()])}const N0={};function _0(t){const i=this,r=t||N0,o=i.data(),a=o.micromarkExtensions||(o.micromarkExtensions=[]),c=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),u=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);a.push(E0(r)),c.push(Qw()),u.push(Gw(r))}function Hd(t){const i=document.createElement("textarea");i.value=t,i.setAttribute("readonly",""),i.style.position="fixed",i.style.left="-9999px",i.style.top="0",document.body.appendChild(i),i.select();const r=document.execCommand("copy");if(i.remove(),!r)throw new Error("copy failed")}function T0({lang:t,code:i}){const[r,o]=ne.useState(!1),[a,c]=ne.useState(!1),u=async()=>{var d;try{(d=navigator.clipboard)!=null&&d.writeText?await navigator.clipboard.writeText(i):Hd(i),o(!0),c(!1),setTimeout(()=>o(!1),1500)}catch{try{Hd(i),o(!0),c(!1),setTimeout(()=>o(!1),1500)}catch{c(!0),setTimeout(()=>c(!1),1800)}}};return g.jsxs("div",{className:"my-2 overflow-hidden border-[3px] border-line bg-card-deep shadow-hard-sm",style:{borderRadius:7},children:[g.jsxs("div",{className:"flex items-center justify-between border-b-2 border-chrome-2 px-3 py-1.5",children:[g.jsx("span",{className:"font-mono text-[10.5px] uppercase tracking-wide text-on-dark-2",children:t||"code"}),g.jsxs("button",{type:"button",onClick:u,className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[11px] text-on-dark-2 transition-colors hover:text-white",children:[r?g.jsx(mg,{size:13}):g.jsx(hg,{size:13}),a?"Erreur":r?"Copié":"Copier"]})]}),g.jsx("pre",{className:"scr m-0 overflow-auto p-3 font-mono text-[12px] leading-relaxed text-on-dark",children:g.jsx("code",{children:i})})]})}const P0={pre:({children:t})=>g.jsx(g.Fragment,{children:t}),code({className:t,children:i}){const r=String(i).replace(/\n$/,""),o=/language-(\w+)/.exec(t||"");return o||r.includes(`
|
||
`)?g.jsx(T0,{lang:(o==null?void 0:o[1])??"",code:r}):g.jsx("code",{className:"rounded bg-sunken px-1 py-0.5 font-mono text-[12px] text-accent-1",children:i})},h1:({children:t})=>g.jsx("h1",{className:"mb-2 mt-3 text-[17px] font-bold text-ink first:mt-0",children:t}),h2:({children:t})=>g.jsx("h2",{className:"mb-2 mt-3 text-[15px] font-bold text-ink first:mt-0",children:t}),h3:({children:t})=>g.jsx("h3",{className:"mb-1.5 mt-2.5 text-[13.5px] font-bold text-ink first:mt-0",children:t}),p:({children:t})=>g.jsx("p",{className:"my-2 first:mt-0 last:mb-0",children:t}),ul:({children:t})=>g.jsx("ul",{className:"my-2 list-disc space-y-1 pl-5 marker:text-muted-3",children:t}),ol:({children:t})=>g.jsx("ol",{className:"my-2 list-decimal space-y-1 pl-5 marker:text-muted-3",children:t}),li:({children:t})=>g.jsx("li",{className:"leading-relaxed",children:t}),a:({href:t,children:i})=>g.jsx("a",{href:t,target:"_blank",rel:"noreferrer",className:"text-accent underline decoration-accent/40 underline-offset-2 hover:decoration-accent",children:i}),strong:({children:t})=>g.jsx("strong",{className:"font-semibold text-ink",children:t}),em:({children:t})=>g.jsx("em",{className:"italic",children:t}),blockquote:({children:t})=>g.jsx("blockquote",{className:"my-2 border-l-2 border-line-strong pl-3 text-muted",children:t}),hr:()=>g.jsx("hr",{className:"my-3 border-line-soft"}),table:({children:t})=>g.jsx("div",{className:"my-2 overflow-x-auto",children:g.jsx("table",{className:"w-full border-collapse text-[12.5px]",children:t})}),th:({children:t})=>g.jsx("th",{className:"border border-line-strong bg-card-deep px-2.5 py-1.5 text-left font-semibold text-ink-2",children:t}),td:({children:t})=>g.jsx("td",{className:"border border-line-soft px-2.5 py-1.5",children:t})};function I0({text:t}){return g.jsx(mk,{remarkPlugins:[_0],components:P0,children:t})}function z0(){const{projects:t,refreshProjects:i,currentProject:r,setProject:o}=Qe(),[a,c]=ne.useState(!1),[u,d]=ne.useState(!1),[m,h]=ne.useState(""),[y,x]=ne.useState(null),v=ne.useRef(null),w=r();ne.useEffect(()=>{a&&i()},[a,i]),ne.useEffect(()=>{if(!a)return;const j=T=>{v.current&&!v.current.contains(T.target)&&(c(!1),d(!1),x(null))};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[a]);const E=async j=>{c(!1),await o(j)},L=async()=>{const j=m.trim();if(j)try{await qg(j),d(!1),h(""),await E(j)}catch(T){x(T instanceof Error?T.message:"création impossible")}};return g.jsxs("div",{ref:v,className:"relative",children:[g.jsxs("button",{onClick:()=>c(j=>!j),className:"flex h-8 items-center gap-1.5 border-2 border-line bg-base px-2.5 text-[12px] text-ink-2",title:"Projet de travail de cette session",children:["📁 ",g.jsx("span",{className:"max-w-[140px] truncate",children:w??"workspace"})]}),a&&g.jsxs("div",{className:"absolute bottom-[calc(100%+6px)] left-0 z-30 w-[240px] border-[3px] border-line bg-card shadow-hard",style:{borderRadius:7},children:[g.jsx("button",{onClick:()=>E(null),className:`block w-full px-3 py-2 text-left text-[13px] text-ink-2 hover:bg-base ${w===null?"bg-base font-bold":""}`,children:"workspace (racine)"}),t.map(j=>g.jsxs("button",{onClick:()=>E(j.name),className:`block w-full border-t-2 border-line-soft px-3 py-2 text-left text-[13px] text-ink-2 hover:bg-base ${w===j.name?"bg-base font-bold":""}`,children:["📁 ",j.name,g.jsxs("span",{className:"ml-1.5 text-[11px] text-muted-2",children:[j.files," fichier",j.files>1?"s":""]})]},j.name)),g.jsxs("div",{className:"border-t-2 border-line-soft p-2",children:[u?g.jsx("input",{autoFocus:!0,value:m,onChange:j=>h(j.target.value),onKeyDown:j=>{j.key==="Enter"&&L(),j.key==="Escape"&&(d(!1),x(null))},placeholder:"nom-du-projet",className:"w-full border-2 border-line bg-base px-2 py-1 text-[12px] text-ink outline-none"}):g.jsx("button",{onClick:()=>d(!0),className:"w-full text-left text-[13px] font-bold text-accent",children:"+ Nouveau projet"}),y&&g.jsx("div",{className:"mt-1 text-[11px] text-warn",children:y})]})]})]})}function L0({variant:t="top"}){const{models:i,selectedModel:r,setSelectedModel:o,loadedModels:a,warmingModel:c,warmError:u}=Qe(),[d,m]=ne.useState(!1),h=ne.useRef(null),y=v=>a.find(w=>w.name===v),x=y(r);return ne.useEffect(()=>{const v=w=>{h.current&&!h.current.contains(w.target)&&m(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]),g.jsxs("div",{className:"relative",ref:h,children:[g.jsxs("button",{onClick:()=>m(v=>!v),className:t==="composer"?"flex h-8 min-w-0 max-w-[220px] items-center gap-1.5 border-2 border-line bg-accent px-2.5 text-[13px] text-white":"flex h-[34px] min-w-0 max-w-[260px] items-center gap-2 border-[3px] border-white bg-accent px-3 text-white shadow-accent-soft",title:r||void 0,style:{borderRadius:7},children:[g.jsx("span",{className:`h-2.5 w-2.5 border-2 border-line ${c===r?"bg-accent animate-pulse":x?x.on_gpu?"bg-ok":"bg-warn":"bg-white"}`,title:u||(c===r?"préchargement en cours…":x?x.on_gpu?"chargé sur GPU":`chargé (${x.gpu_percent}% GPU)`:"à charger")}),g.jsx("span",{className:"min-w-0 truncate text-[14px] leading-none",children:r||"—"}),g.jsx(oo,{size:12,className:"flex-none"})]}),d&&g.jsxs("div",{className:`absolute z-20 w-64 border-[3px] border-line bg-card p-1 shadow-hard ${t==="composer"?"bottom-[calc(100%+6px)] left-0":"right-0 top-11"}`,children:[i.length===0&&g.jsx("div",{className:"px-3 py-2 text-xs text-muted-2",children:"Aucun modèle installé"}),i.map(v=>g.jsxs("button",{onClick:()=>{o(v.name),m(!1)},className:`flex w-full items-center gap-2 px-2 py-2 text-left hover:bg-base ${v.name===r?"bg-base":""}`,children:[g.jsx("span",{className:`h-2 w-2 border-2 border-line ${v.name===r?"bg-accent":"bg-card"}`}),g.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-ink-2",title:v.name,children:v.name}),y(v.name)&&g.jsx("span",{className:`h-1.5 w-1.5 border border-line ${y(v.name).on_gpu?"bg-ok":"bg-warn"}`,title:y(v.name).on_gpu?"chargé GPU":"chargé CPU"}),v.size_go>0&&g.jsxs("span",{className:"text-[10px] text-muted-2",children:[v.size_go," Go"]})]},v.name))]})]})}function R0(){const{selectedModel:t,messages:i,streaming:r,streamingSessionId:o,streamContent:a,streamThinking:c,streamStatus:u,streamNotice:d,streamTools:m,streamPlan:h,sendMessage:y,currentSessionId:x,config:v,pendingShell:w,approveShell:E,rejectShell:L,sessions:j,stopStreaming:T}=Qe(),O=v?Object.values(v.tools).filter(Boolean).length:0,[A,J]=ne.useState(""),le=ne.useRef(null);ne.useEffect(()=>{var Y;(Y=le.current)==null||Y.scrollTo({top:le.current.scrollHeight})},[i,a,c,m,h]);const D=()=>{!A.trim()||r||(y(A),J(""))},ue=Y=>{Y.key==="Enter"&&!Y.shiftKey&&(Y.preventDefault(),D())},ce=r&&x===o,ge=j.find(Y=>Y.id===o),R=i.length===0&&!ce;return g.jsxs("div",{className:"flex min-w-0 flex-1 flex-col bg-base",children:[g.jsxs("div",{className:"flex h-[46px] flex-none items-center gap-2 border-b-[3px] border-line bg-panel px-4",children:[g.jsx(ja,{children:"⚑ Invite système"}),g.jsxs(ja,{children:[g.jsx("span",{className:"h-2 w-2 border-2 border-line bg-ok"}),O," outil",O>1?"s":""]}),g.jsxs(ja,{children:["Temp"," ",g.jsx("b",{className:"text-accent",children:v?v.temperature.toFixed(1):"—"})]}),g.jsx("div",{className:"flex-1"}),g.jsx("span",{className:"text-[13px] text-muted-3",children:x?`${i.length} message${i.length>1?"s":""}`:"aucune session"})]}),g.jsx("div",{ref:le,className:"scr flex-1 overflow-auto px-7 py-6",children:R?g.jsxs("div",{className:"mx-auto flex max-w-[680px] flex-col items-center justify-center gap-4 pt-24 text-center",children:[g.jsx(Kd,{size:48}),g.jsx("div",{className:"font-pixel text-[15px] text-ink",children:"PRÊT À TRAVAILLER"}),g.jsx("div",{className:"max-w-[380px] text-[14px] leading-relaxed text-muted",children:"Décris une tâche à l'agent. Outils fichiers et aperçu en direct disponibles."})]}):g.jsxs("div",{className:"mx-auto flex max-w-[680px] flex-col gap-5",children:[i.map(Y=>g.jsx(Wd,{msg:Y},Y.id)),ce&&g.jsx(Wd,{msg:{id:"stream",session_id:"",role:"assistant",content:a,model:t,meta:{tools:m,plan:h},created_at:Date.now()/1e3},pending:!0,pendingStatus:u,notice:d,thinking:c}),ce&&w&&g.jsx(O0,{command:w,onApprove:E,onReject:L})]})}),g.jsx("div",{className:"flex-none border-t-[3px] border-line bg-panel px-7 pb-[18px] pt-3.5",children:g.jsx("div",{className:"mx-auto max-w-[680px]",children:g.jsxs("div",{className:"border-[3px] border-line bg-card p-3 shadow-hard",style:{borderRadius:8},children:[g.jsx("textarea",{rows:1,value:A,onChange:Y=>J(Y.target.value),onKeyDown:ue,placeholder:"Envoyer un message à l'agent…",className:"min-h-[40px] w-full resize-none bg-transparent text-[14px] leading-relaxed text-ink outline-none placeholder:text-muted-3"}),g.jsxs("div",{className:"mt-1.5 flex items-center gap-2",children:[g.jsx(M0,{}),g.jsx(z0,{}),g.jsx(L0,{variant:"composer"}),r&&!ce?g.jsxs("span",{className:"min-w-0 flex-1 truncate text-[13px] text-accent",children:["Travail en cours : ",(ge==null?void 0:ge.title)??"session ouverte"]}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"flex-1"}),g.jsx("span",{className:"text-[13px] text-muted-3",children:"⏎ envoyer · ⇧⏎ ligne"})]}),g.jsxs("button",{onClick:r?T:D,disabled:!r&&!A.trim(),className:`flex h-[38px] items-center gap-1.5 border-[3px] border-line px-4 text-[14px] text-white shadow-hard-accent disabled:opacity-40 ${r?"bg-warn":"bg-card-deep"}`,style:{borderRadius:7},children:[r?"ARRÊTER":"ENVOYER",!r&&g.jsx(pg,{})]})]})]})})})]})}const Ca=[{id:"plan",label:"Plan",icon:"🔍",desc:"Lecture seule : analyse et propose, sans rien modifier"},{id:"build",label:"Build",icon:"🔨",desc:"Normal : écrit les fichiers, confirme les commandes shell"},{id:"yolo",label:"Yolo",icon:"⚡",desc:"Auto : approuve tout, y compris le shell"}];function M0(){const{mode:t,setMode:i}=Qe(),[r,o]=ne.useState(!1),a=ne.useRef(null);ne.useEffect(()=>{const u=d=>{a.current&&!a.current.contains(d.target)&&o(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]);const c=Ca.find(u=>u.id===t)??Ca[1];return g.jsxs("div",{className:"relative",ref:a,children:[g.jsxs("button",{onClick:()=>o(u=>!u),className:`flex h-8 items-center gap-1.5 border-2 border-line px-2.5 text-[13px] ${t==="plan"?"bg-info text-white":t==="yolo"?"bg-accent text-white":"bg-card text-ink-2"}`,title:c.desc,children:[g.jsx("span",{children:c.icon}),g.jsx("span",{children:c.label}),g.jsx(oo,{size:11})]}),r&&g.jsx("div",{className:"absolute bottom-10 left-0 z-20 w-64 border-[3px] border-line bg-card p-1 shadow-hard",children:Ca.map(u=>g.jsxs("button",{onClick:()=>{i(u.id),o(!1)},className:`flex w-full flex-col items-start gap-0.5 px-2 py-2 text-left hover:bg-base ${u.id===t?"bg-base":""}`,children:[g.jsxs("span",{className:"text-[13px] text-ink",children:[u.icon," ",u.label]}),g.jsx("span",{className:"text-[11px] leading-tight text-muted-2",children:u.desc})]},u.id))})]})}function D0({steps:t}){return g.jsxs("div",{className:"mb-[11px] overflow-hidden border-[3px] border-line bg-card shadow-hard-sm",style:{borderRadius:7},children:[g.jsxs("div",{className:"flex items-center gap-2 border-b-2 border-line-soft px-3 py-2",children:[g.jsx("span",{className:"font-pixel text-[9px] text-accent",children:"PLAN"}),g.jsxs("span",{className:"text-[12px] text-muted-2",children:[t.length," étape",t.length>1?"s":""]})]}),g.jsx("ol",{className:"m-0 list-none px-3 py-2",children:t.map((i,r)=>g.jsxs("li",{className:"flex gap-2 py-[3px] text-[13px] text-ink-2",children:[g.jsx("span",{className:"flex h-[18px] w-[18px] flex-none items-center justify-center border-2 border-line bg-base text-[11px] text-ink",children:r+1}),g.jsx("span",{className:"min-w-0",children:i})]},r))})]})}function Wd({msg:t,pending:i,pendingStatus:r,notice:o,thinking:a}){var u,d,m,h,y;const c=new Date(t.created_at*1e3).toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"});return t.role==="user"?g.jsxs("div",{className:"flex gap-3",children:[g.jsx("div",{className:"font-pixel flex h-[34px] w-[34px] flex-none items-center justify-center border-[3px] border-line bg-card-deep text-[11px] text-white",children:"M"}),g.jsxs("div",{className:"flex-1",children:[g.jsxs("div",{className:"mb-1.5 flex items-baseline gap-2",children:[g.jsx("span",{className:"text-[14px] text-ink",children:"VOUS"}),g.jsx("span",{className:"text-[13px] text-muted-3",children:c})]}),g.jsx("div",{className:"border-[3px] border-line bg-card px-[14px] py-3 text-[14px] leading-snug text-ink shadow-hard-sm whitespace-pre-wrap",style:{borderRadius:7},children:t.content})]})]}):g.jsxs("div",{className:"flex gap-3",children:[g.jsx("div",{className:"flex h-[34px] w-[34px] flex-none items-center justify-center border-[3px] border-line bg-accent",children:g.jsx("div",{style:{width:10,height:10,background:"#fff"}})}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"mb-2 flex items-baseline gap-2",children:[g.jsx("span",{className:"text-[14px] text-ink",children:"LOKI"}),g.jsxs("span",{className:"text-[13px] text-muted-3",children:[t.model?`${t.model} · `:"",c]})]}),g.jsx(A0,{text:a??((u=t.meta)==null?void 0:u.thinking)??"",live:!!i}),(((m=(d=t.meta)==null?void 0:d.plan)==null?void 0:m.length)??0)>0&&g.jsx(D0,{steps:t.meta.plan}),(((h=t.meta)==null?void 0:h.tools)??[]).map((x,v)=>g.jsx(nx,{call:x},v)),o&&g.jsx("div",{className:"mb-2 border-[3px] border-line bg-card px-3 py-2 text-[13px] text-warn",children:o}),(t.content||i)&&g.jsxs("div",{className:"text-[14px] leading-[1.5] text-ink-2",children:[t.content?g.jsx(I0,{text:t.content}):g.jsx("span",{className:"text-muted-2",children:r||"Génération…"}),i&&g.jsx("span",{className:"ml-0.5 inline-block h-3.5 w-[7px] animate-pulse bg-accent align-middle"})]}),!i&&((y=t.meta)==null?void 0:y.stats)&&g.jsxs("div",{className:"mt-2 flex items-center gap-2.5 text-[12px] text-muted-3",children:[t.meta.stats.tokens_per_sec!=null&&g.jsxs("span",{className:"text-accent-2",children:[t.meta.stats.tokens_per_sec," tok/s"]}),g.jsxs("span",{children:[t.meta.stats.eval_count," jetons"]}),t.meta.stats.prompt_eval_count>0&&g.jsxs("span",{children:["· ",t.meta.stats.prompt_eval_count," en entrée"]})]})]})]})}function A0({text:t,live:i}){const[r,o]=ne.useState(i),a=ne.useRef(null);return ne.useEffect(()=>{i&&o(!0)},[i]),ne.useEffect(()=>{var c;r&&i&&((c=a.current)==null||c.scrollTo({top:a.current.scrollHeight}))},[t,r,i]),t?g.jsxs("div",{className:"mb-[11px] overflow-hidden border-[3px] border-line bg-card shadow-hard-sm",style:{borderRadius:7},children:[g.jsxs("button",{onClick:()=>o(c=>!c),className:"flex w-full items-center gap-2 px-3 py-2 text-left",children:[g.jsx(oo,{size:12,className:`text-ink-2 transition-transform ${r?"":"-rotate-90"}`}),g.jsx("span",{className:"text-[13px] font-medium text-ink",children:"Raisonnement"}),i&&g.jsxs("span",{className:"flex items-center gap-1 text-[12px] text-accent",children:[g.jsx("span",{className:"h-2 w-2 animate-pulse border-2 border-line bg-accent"}),"en cours…"]}),g.jsx("span",{className:"ml-auto text-[12px] text-muted-3",children:r?"réduire":"afficher"})]}),r&&g.jsx("div",{ref:a,className:"scr max-h-[200px] min-h-[60px] resize-y overflow-auto whitespace-pre-wrap border-t-2 border-line-soft bg-card-deep px-3 py-2 text-[12.5px] leading-relaxed text-on-dark-2",children:t})]}):null}function O0({command:t,onApprove:i,onReject:r}){return g.jsxs("div",{className:"ml-[46px] overflow-hidden border-[3px] border-line bg-card shadow-hard",style:{borderRadius:7},children:[g.jsxs("div",{className:"flex items-center gap-2 border-b-2 border-line px-3 py-2.5",children:[g.jsx("span",{className:"text-[14px] text-accent",children:"run_shell"}),g.jsx("span",{className:"text-[13px] text-muted-2",children:"· commande sensible à valider"})]}),g.jsxs("div",{className:"px-3 py-3",children:[g.jsxs("pre",{className:"m-0 mb-3 overflow-auto whitespace-pre-wrap border-2 border-line bg-card-deep px-3 py-2.5 text-[12.5px] text-on-dark",children:["$ ",t]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:i,className:"flex h-[32px] items-center gap-1.5 border-[3px] border-line bg-card-deep px-3.5 text-[13px] text-white shadow-hard-accent",style:{borderRadius:7},children:"Approuver & exécuter"}),g.jsx("button",{onClick:r,className:"flex h-[32px] items-center border-[3px] border-line bg-card px-3.5 text-[13px] text-ink-2",style:{borderRadius:7},children:"Refuser"})]})]})]})}function ja({children:t}){return g.jsx("div",{className:"flex h-7 items-center gap-1.5 border-2 border-line bg-card px-2.5 text-[13px] text-ink-2",children:t})}function qd(){const{previewPath:t,previewContent:i,messages:r,streamTools:o,removeFile:a}=Qe(),[c,u]=ne.useState("preview"),[d,m]=ne.useState(()=>{const j=Number(window.localStorage.getItem("loki.preview.width"));return Number.isFinite(j)&&j>=300?j:452}),h=j=>{const T=Math.max(300,Math.min(j,window.innerWidth-520));m(T),window.localStorage.setItem("loki.preview.width",String(T))},y=j=>{j.preventDefault();const T=j.clientX,O=d,A=le=>h(O+T-le.clientX),J=()=>{window.removeEventListener("pointermove",A),window.removeEventListener("pointerup",J)};window.addEventListener("pointermove",A),window.addEventListener("pointerup",J)},x=t?/\.html?$/.test(t):!1,[v,w]=ne.useState(()=>window.localStorage.getItem("loki.preview.collapsed")==="1"),E=()=>{w(j=>(window.localStorage.setItem("loki.preview.collapsed",j?"0":"1"),!j))},L=[...r.flatMap(j=>{var T;return((T=j.meta)==null?void 0:T.tools)??[]}),...o];return v?g.jsxs("div",{className:"flex w-9 flex-none flex-col items-center border-l-[3px] border-line bg-panel pt-3",children:[g.jsx("button",{onClick:E,title:"Déplier l'aperçu",className:"text-[15px] text-muted-2 hover:text-accent",children:"⇤"}),g.jsx("div",{className:"mt-3 rotate-90 whitespace-nowrap text-[10px] font-bold tracking-wide text-muted-3",children:"APERÇU"})]}):g.jsxs("div",{className:"relative flex flex-none flex-col border-l-[3px] border-line bg-panel",style:{width:d},children:[g.jsx("div",{role:"separator","aria-label":"Redimensionner le panneau d'aperçu","aria-orientation":"vertical",tabIndex:0,onPointerDown:y,onKeyDown:j=>{j.key==="ArrowLeft"&&h(d+20),j.key==="ArrowRight"&&h(d-20)},className:"absolute -left-[6px] top-0 z-20 h-full w-[9px] cursor-col-resize bg-transparent hover:bg-accent/50 focus:bg-accent/50 focus:outline-none",title:"Glisser pour redimensionner"}),g.jsxs("div",{className:"flex h-[46px] flex-none items-center gap-1.5 border-b-[3px] border-line bg-base px-3",children:[g.jsx(Zl,{active:c==="preview",onClick:()=>u("preview"),children:"Aperçu"}),g.jsx(Zl,{active:c==="code",onClick:()=>u("code"),children:"Code"}),g.jsxs(Zl,{active:c==="logs",onClick:()=>u("logs"),children:["Logs",g.jsx("span",{className:"font-pixel ml-1.5 border-2 border-line bg-accent px-1 py-0.5 text-[8px] text-white",children:L.length})]}),g.jsx(Zl,{active:c==="git",onClick:()=>u("git"),children:"Git"}),g.jsx("div",{className:"flex-1"}),g.jsx("button",{onClick:E,title:"Replier l'aperçu",className:"px-2 text-[15px] text-muted-2 hover:text-accent",children:"⇥"})]}),g.jsxs("div",{className:"flex flex-none items-center gap-2 px-3 py-2.5",children:[g.jsxs("div",{className:"flex h-8 flex-1 items-center gap-2 border-[3px] border-line bg-card px-[11px]",children:[g.jsx("span",{className:"text-[13px]",children:"🔒"}),g.jsx("span",{className:"truncate text-[13px] text-muted-2",children:t?`workspace/${t}`:"workspace/"})]}),t&&g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:()=>Oa(t,Qe.getState().currentProject()),className:"flex h-8 items-center gap-1.5 border-[3px] border-line bg-card px-2.5 text-[12px] text-accent",title:`Télécharger ${t}`,children:[g.jsx(so,{size:13}),"Télécharger"]}),g.jsxs("button",{onClick:()=>{window.confirm(`Supprimer ${t} ?`)&&a(t)},className:"flex h-8 items-center gap-1.5 border-[3px] border-line bg-card px-2.5 text-[12px] text-warn",title:`Supprimer ${t}`,children:[g.jsx(ao,{size:13}),"Supprimer"]})]})]}),c==="git"?g.jsx(F0,{}):c==="logs"?g.jsx("div",{className:"scr mx-3 mb-3 flex-1 overflow-auto border-[3px] border-line bg-card-deep p-3 text-[12.5px]",children:L.length===0?g.jsx("div",{className:"py-10 text-center text-on-dark-3",children:"Aucune activité d'outil pour cette session."}):L.map((j,T)=>{var O,A,J;return g.jsxs("div",{className:"flex items-center gap-2 border-b-2 border-chrome-2 py-[7px] last:border-0",children:[g.jsx("span",{className:j.status==="error"||j.status==="pending"?"text-accent":j.status==="running"?"text-on-dark-2":"text-ok",children:j.status==="error"?"✕":j.status==="pending"?"⏸":j.status==="running"?"…":"✓"}),g.jsx("span",{className:"text-on-dark",children:j.name}),g.jsx("span",{className:"flex-1 truncate text-on-dark-3",children:((O=j.args)==null?void 0:O.path)??((A=j.args)==null?void 0:A.query)??((J=j.args)==null?void 0:J.command)??""}),g.jsx("span",{className:"text-on-dark-3",children:j.summary})]},T)})}):g.jsx("div",{className:"scr mx-3 mb-3 flex-1 overflow-auto border-[3px] border-line bg-[#faf6ef] shadow-hard",children:t?c==="code"?g.jsx("pre",{className:"m-0 whitespace-pre-wrap p-4 text-[12px] leading-relaxed text-[#2a2018]",children:i}):x?g.jsx("iframe",{title:"aperçu",srcDoc:i,className:"h-full w-full border-0 bg-white",sandbox:"allow-scripts"}):g.jsx("pre",{className:"m-0 whitespace-pre-wrap p-4 text-[12px] leading-relaxed text-[#2a2018]",children:i}):g.jsx(B0,{children:"L'aperçu s'affichera ici dès que l'agent générera un fichier (clique aussi un fichier à gauche)."})})]})}function F0(){const t=Qe(j=>j.refreshFiles),r=Qe(j=>j.currentProject)(),[o,a]=ne.useState([]),[c,u]=ne.useState(null),[d,m]=ne.useState(""),[h,y]=ne.useState(null),[x,v]=ne.useState(null),w=()=>Cg(r).then(a).catch(()=>{});ne.useEffect(()=>{w()},[r]);const E=async j=>{u(j),m("Chargement…"),m(await jg(j,r)||"(diff vide)")},L=async j=>{if(window.confirm(`Annuler le commit ${j.slice(0,7)} ? (crée un commit inverse)`)){y(j),v(null);try{await Eg(j,r),await w(),await t(),c===j&&u(null)}catch(T){v(T instanceof Error?T.message:"revert impossible")}finally{y(null)}}};return g.jsxs("div",{className:"scr mx-3 mb-3 flex flex-1 flex-col overflow-hidden border-[3px] border-line bg-card",children:[x&&g.jsx("div",{className:"border-b-2 border-line bg-warn/10 px-3 py-2 text-[12px] text-warn",children:x}),g.jsx("div",{className:"scr max-h-[45%] overflow-auto border-b-2 border-line",children:o.length===0?g.jsx("div",{className:"p-4 text-center text-[12px] text-muted-2",children:"Aucun commit. L'agent commitera chaque modification de code ici."}):o.map(j=>g.jsxs("div",{className:`flex items-center gap-2 border-b border-line-soft px-3 py-2 last:border-0 ${c===j.hash?"bg-base":""}`,children:[g.jsxs("button",{onClick:()=>E(j.hash),className:"min-w-0 flex-1 text-left",title:j.subject,children:[g.jsx("div",{className:"truncate text-[13px] text-ink",children:j.subject}),g.jsxs("div",{className:"text-[11px] text-muted-2",children:[j.hash," · ",j.when," · ",j.files_changed," fichier",j.files_changed>1?"s":""]})]}),g.jsx("button",{onClick:()=>L(j.hash),disabled:h===j.hash,className:"flex-none border-2 border-line bg-card px-2 py-1 text-[11px] text-warn disabled:opacity-40",title:"Annuler ce commit (revert)",children:h===j.hash?"…":"↶ Annuler"})]},j.full_hash))}),g.jsx("div",{className:"scr flex-1 overflow-auto bg-card-deep p-3",children:c?g.jsx($0,{diff:d}):g.jsx("div",{className:"py-8 text-center text-[12px] text-on-dark-3",children:"Clique un commit pour voir ses modifications."})})]})}function $0({diff:t}){return g.jsx("pre",{className:"m-0 whitespace-pre-wrap text-[11.5px] leading-relaxed",children:t.split(`
|
||
`).map((i,r)=>{let o="text-on-dark-2";return i.startsWith("+")&&!i.startsWith("+++")?o="text-ok":i.startsWith("-")&&!i.startsWith("---")?o="text-accent":i.startsWith("@@")?o="text-info":/^(commit|Author|Date|diff|index)/.test(i)&&(o="text-on-dark-3"),g.jsx("div",{className:o,children:i||" "},r)})})}function B0({children:t}){return g.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center",children:[g.jsx("div",{className:"font-pixel text-[10px] text-[#a98b63]",children:"AUCUN APERÇU"}),g.jsx("div",{className:"max-w-[240px] text-[13px] text-[#8a7a66]",children:t})]})}function Zl({children:t,active:i,onClick:r}){return g.jsx("button",{onClick:r,className:`flex h-[30px] items-center border-[3px] border-line px-[13px] text-[13px] ${i?"bg-card-deep text-white":"bg-card text-muted"}`,children:t})}const U0={read_file:"Lire un fichier du projet",write_file:"Créer / modifier un fichier",edit_file:"Modification chirurgicale (recherche/remplacement)",list_dir:"Lister un répertoire",grep_search:"Chercher dans les fichiers",code_task:"Moteur code (multi-fichiers, git)",web_search:"Recherche web",run_shell:"Exécuter une commande"},V0=new Set(["run_shell"]);function H0(){const{models:t,selectedModel:i,setSelectedModel:r,refreshModels:o,loadedModels:a,warmingModel:c,warmError:u,status:d,config:m,availableTools:h,refreshConfig:y,updateConfig:x}=Qe(),[v,w]=ne.useState(m),[E,L]=ne.useState(!1);ne.useEffect(()=>{y()},[y,i]),ne.useEffect(()=>{m&&w(m)},[m]);const[j,T]=ne.useState(""),[O,A]=ne.useState(null),[J,le]=ne.useState(0),[D,ue]=ne.useState(null),[ce,ge]=ne.useState(null),R=async $=>{if(window.confirm(`Supprimer définitivement le modèle ${$} ?`)){ue($),ge(null);try{await Lg($),await o()}catch(se){ge(se instanceof Error?se.message:"suppression impossible")}finally{ue(null)}}},Y=async()=>{if(j.trim()){A("démarrage…"),le(0);try{await Jg(j.trim(),($,se)=>{A($),se&&le(se)}),A("terminé"),await o()}catch{A("échec")}}},Z=v&&m&&JSON.stringify(v)!==JSON.stringify(m),ve=async()=>{v&&(await x(v),L(!0),setTimeout(()=>L(!1),2e3))},X=($,se)=>w(U=>U&&{...U,[$]:se}),G=v?Object.values(v.tools).filter(Boolean).length:0;return g.jsx("div",{className:"scr flex-1 overflow-auto bg-base px-[30px] py-[26px]",children:g.jsxs("div",{className:"mx-auto max-w-[1000px]",children:[g.jsxs("div",{className:"mb-[22px] flex items-end justify-between",children:[g.jsxs("div",{children:[g.jsx("div",{className:"font-pixel text-[13px] text-ink",children:"MODÈLE & GÉNÉRATION"}),g.jsx("div",{className:"mt-2 text-[14px] text-muted-2",children:"Choisis le modèle local et règle son comportement. Les changements sont sauvegardés pour le modèle sélectionné."})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsxs("div",{className:"flex items-center gap-1.5 text-[13px] text-ok",children:[g.jsx("span",{className:"h-2 w-2 border-2 border-line bg-ok"}),d!=null&&d.connected?"Ollama connecté":"Ollama déconnecté"]}),g.jsx("button",{onClick:ve,disabled:!Z,className:"flex h-[34px] items-center gap-1.5 border-[3px] border-line bg-accent px-4 text-[14px] text-white shadow-accent-soft disabled:opacity-40",style:{borderRadius:7},children:E?"✓ ENREGISTRÉ":Z?"ENREGISTRER":"À JOUR"})]})]}),v?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"grid grid-cols-2 items-start gap-[18px]",children:[g.jsxs(Mn,{children:[g.jsxs("div",{className:"mb-3.5 flex items-center justify-between",children:[g.jsx("div",{className:"font-pixel text-[11px] text-ink",children:"MODÈLE OLLAMA"}),g.jsxs("button",{onClick:o,className:"flex h-7 items-center gap-1.5 border-2 border-line bg-card-soft px-2.5 text-[13px] text-muted-2",children:[g.jsx(Gd,{size:12}),"Actualiser"]})]}),g.jsxs("div",{className:"flex flex-col gap-2",children:[t.length===0&&g.jsx("div",{className:"border-2 border-line bg-base p-4 text-center text-[13px] text-muted-2",children:"Aucun modèle installé. Télécharge-en un ci-dessous."}),t.map($=>{const se=$.name===i,U=a.find(S=>S.name===$.name),re=c===$.name;return g.jsxs("div",{className:`flex items-center gap-3 border-[3px] border-line p-3 text-left ${se?"bg-card-deep":"bg-card-soft"}`,children:[g.jsxs("button",{onClick:()=>r($.name),className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[g.jsx("span",{className:`flex h-[18px] w-[18px] flex-none items-center justify-center border-[3px] ${se?"border-accent":"border-muted-3"}`,children:se&&g.jsx("span",{className:"h-2 w-2 bg-accent"})}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:`truncate text-[14px] ${se?"text-white":"text-ink"}`,children:$.name}),$.name===(d==null?void 0:d.default_model)&&g.jsx("span",{className:"font-pixel flex-none border-2 border-white bg-accent px-1.5 py-0.5 text-[7px] text-white",children:"DÉFAUT"})]}),g.jsx("div",{className:`mt-1 text-[13px] ${se?"text-on-dark-2":"text-muted-2"}`,children:[$.size_go?`${$.size_go} Go`:null,$.quantization,$.parameter_size,$.family].filter(Boolean).join(" · ")}),g.jsxs("div",{className:"mt-1.5 flex items-center gap-1.5 text-[11px]",children:[g.jsx("span",{className:`h-2 w-2 border border-line ${re?"bg-accent animate-pulse":U!=null&&U.on_gpu?"bg-ok":U?"bg-warn":"bg-card"}`}),g.jsx("span",{className:se?"text-on-dark-2":"text-muted-2",children:re?"Préchargement en cours…":U!=null&&U.on_gpu?"Chargé sur GPU":U?`Chargé · ${U.gpu_percent}% GPU`:"Non chargé"})]})]})]}),g.jsx("button",{onClick:()=>R($.name),disabled:D===$.name,className:"flex-none border-2 border-line bg-base px-2 py-1 text-[12px] text-warn disabled:opacity-50",title:`Supprimer ${$.name}`,children:D===$.name?"…":"Supprimer"})]},$.name)}),ce&&g.jsx("div",{className:"border-2 border-warn bg-base px-3 py-2 text-[12px] text-warn",children:ce}),u&&g.jsxs("div",{className:"border-2 border-warn bg-base px-3 py-2 text-[12px] text-warn",children:["Préchargement : ",u]})]}),g.jsx("div",{className:"my-4 h-[3px] bg-line"}),g.jsx("div",{className:"font-pixel mb-2.5 text-[10px] text-label",children:"TÉLÉCHARGER"}),g.jsxs("div",{className:"mb-3 flex gap-2",children:[g.jsx("input",{value:j,onChange:$=>T($.target.value),placeholder:"gemma2:9b",className:"h-9 flex-1 border-[3px] border-line bg-card-soft px-3 text-[13px] text-ink outline-none placeholder:text-muted-3"}),g.jsxs("button",{onClick:Y,className:"flex h-9 items-center gap-1.5 border-[3px] border-line bg-card-deep px-3.5 text-[13px] text-white",children:[g.jsx(so,{}),"Récupérer"]})]}),O&&g.jsxs("div",{className:"border-[3px] border-line bg-card-soft p-3",children:[g.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[g.jsx("span",{className:"text-[13px] text-ink-2",children:j}),g.jsxs("span",{className:"text-[13px] text-accent",children:[O," ",J?`· ${J}%`:""]})]}),g.jsx("div",{className:"flex h-3.5 gap-px border-2 border-line bg-card p-px",children:g.jsx("span",{className:"bg-accent transition-all",style:{width:`${J}%`}})})]})]}),g.jsxs("div",{className:"flex flex-col gap-[18px]",children:[g.jsxs(Mn,{children:[g.jsx("div",{className:"font-pixel mb-4 text-[11px] text-ink",children:"GÉNÉRATION"}),g.jsx(Jn,{label:"Température",value:v.temperature,min:0,max:2,step:.05,fmt:$=>$.toFixed(2),onChange:$=>X("temperature",$)}),g.jsx(Jn,{label:"Top-P",value:v.top_p,min:0,max:1,step:.05,fmt:$=>$.toFixed(2),onChange:$=>X("top_p",$)}),g.jsx(Jn,{label:"Top-K",value:v.top_k,min:1,max:100,step:1,fmt:$=>String(Math.round($)),onChange:$=>X("top_k",Math.round($))}),g.jsx(Jn,{label:"Jetons max",value:v.max_tokens,min:256,max:8192,step:128,fmt:$=>String(Math.round($)),onChange:$=>X("max_tokens",Math.round($))}),g.jsx(Jn,{label:"Cache KV / contexte",value:v.num_ctx,min:2048,max:32768,step:1024,fmt:$=>`${Math.round($/1024)}K`,onChange:$=>X("num_ctx",Math.round($))}),g.jsx(Jn,{label:"Couches GPU",value:v.num_gpu,min:-1,max:120,step:1,fmt:$=>$<0?"auto":String(Math.round($)),onChange:$=>X("num_gpu",Math.round($))}),g.jsx(Jn,{label:"Batch",value:v.num_batch,min:64,max:1024,step:64,fmt:$=>String(Math.round($)),onChange:$=>X("num_batch",Math.round($)),last:!0}),g.jsxs("div",{className:"mt-4 flex items-center gap-3 border-2 border-line bg-base px-3 py-2.5",children:[g.jsxs("div",{className:"flex-1",children:[g.jsx("div",{className:"text-[14px] text-ink",children:"Mode réflexion"}),g.jsx("div",{className:"text-[12px] text-muted-2",children:"Désactive si le modèle ne renvoie que du raisonnement sans réponse."})]}),g.jsx(Ni,{on:v.think,onClick:()=>X("think",!v.think)})]}),g.jsxs("div",{className:"mt-3 border-2 border-line bg-card-soft px-3 py-2 text-[12px] leading-relaxed text-muted-2",children:["La précision KV (",g.jsx("code",{children:"f16"}),"/",g.jsx("code",{children:"q8_0"}),") est un réglage global du serveur Ollama et nécessite son redémarrage."]})]}),g.jsxs(Mn,{children:[g.jsxs("div",{className:"mb-3.5 flex items-center justify-between",children:[g.jsx("div",{className:"font-pixel text-[11px] text-ink",children:"OUTILS"}),g.jsxs("span",{className:"text-[13px] text-muted-2",children:[G," / ",h.length," actifs"]})]}),h.map(($,se)=>{const U=v.tools[$]??!1;return g.jsxs("div",{className:`flex items-center gap-3 py-2 ${se>0?"border-t-2 border-line-soft":""}`,children:[g.jsx("span",{className:`w-32 flex-none text-[14px] ${U?"text-ink":"text-muted-3"}`,children:$}),g.jsxs("span",{className:"flex-1 text-[13px] text-muted-2",children:[U0[$]??"",V0.has($)&&g.jsx("span",{className:"text-accent",children:" · sensible"})]}),g.jsx(Ni,{on:U,onClick:()=>X("tools",{...v.tools,[$]:!U})})]},$)}),v.tools.run_shell&&g.jsxs("div",{className:"mt-2 flex items-center gap-3 border-2 border-line bg-base px-3 py-2.5",children:[g.jsx("span",{className:"flex-1 text-[13px] text-ink-2",children:"Demander une validation avant chaque commande shell"}),g.jsx(Ni,{on:v.confirm_shell,onClick:()=>X("confirm_shell",!v.confirm_shell)})]})]}),g.jsxs(Mn,{children:[g.jsx("div",{className:"mb-3.5 font-pixel text-[11px] text-ink",children:"INTELLIGENCE"}),[["plan_mode","Plan-puis-exécute","Décompose les demandes complexes en étapes"],["self_review","Auto-critique (Qualité +)","Relit et révise la réponse avant de la donner"],["rag_enabled","Mémoire long-terme (RAG)","Se souvient des anciennes sessions (modèle d'embedding requis)"],["skills_enabled","Skills automatiques","Méthodes expertes injectées selon la tâche (débogage, web, refactor…)"]].map(([$,se,U],re)=>g.jsxs("div",{className:`flex items-center gap-3 py-2 ${re>0?"border-t-2 border-line-soft":""}`,children:[g.jsxs("span",{className:"flex-1",children:[g.jsx("span",{className:"block text-[14px] text-ink",children:se}),g.jsx("span",{className:"block text-[12px] text-muted-2",children:U})]}),g.jsx(Ni,{on:!!v[$],onClick:()=>X($,!v[$])})]},$)),g.jsxs("div",{className:"mt-2 flex items-center gap-3 border-t-2 border-line-soft pt-3",children:[g.jsxs("span",{className:"flex-1",children:[g.jsx("span",{className:"block text-[14px] text-ink",children:"Maintien en VRAM (préchargement)"}),g.jsx("span",{className:"block text-[12px] text-muted-2",children:"Garde le modèle chargé pour des réponses instantanées"})]}),g.jsxs("select",{value:v.keep_alive,onChange:$=>X("keep_alive",$.target.value),className:"h-8 border-[3px] border-line bg-card px-2 text-[13px] text-ink",children:[g.jsx("option",{value:"0",children:"Décharger aussitôt"}),g.jsx("option",{value:"5m",children:"5 min"}),g.jsx("option",{value:"30m",children:"30 min"}),g.jsx("option",{value:"2h",children:"2 heures"}),g.jsx("option",{value:"-1",children:"Toujours"})]})]})]}),g.jsx(W0,{}),g.jsx(q0,{}),g.jsx(Q0,{})]})]}),g.jsxs(Mn,{className:"mt-[18px]",children:[g.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[g.jsx("div",{className:"font-pixel text-[11px] text-ink",children:"INVITE SYSTÈME"}),g.jsxs("span",{className:"text-[13px] text-muted-2",children:[v.system_prompt.length," caractères"]})]}),g.jsx("textarea",{value:v.system_prompt,onChange:$=>X("system_prompt",$.target.value),rows:6,className:"scr w-full resize-y border-[3px] border-line bg-card-deep p-4 text-[13px] leading-[1.6] text-on-dark outline-none"})]})]}):g.jsx("div",{className:"py-20 text-center text-muted-2",children:"Chargement de la configuration…"})]})})}function W0(){const[t,i]=ne.useState([]),[r,o]=ne.useState(null),[a,c]=ne.useState({});ne.useEffect(()=>{Ug().then(i).catch(()=>{})},[]);const u=async h=>{i(await ed(h.id,!h.enabled,h.params))},d=async(h,y,x)=>{i(await ed(h.id,h.enabled,{...h.params,[y]:x}))},m=async h=>{o(h.id);try{const y=await Vg(h.id);c(x=>({...x,[h.id]:y.ok?`✓ ${y.tools.length} outil(s) : ${y.tools.join(", ").slice(0,120)}`:`✗ ${y.error??"échec"}`}))}finally{o(null)}};return g.jsxs(Mn,{children:[g.jsx("div",{className:"mb-1 font-pixel text-[11px] text-ink",children:"SERVEURS MCP"}),g.jsx("div",{className:"mb-3.5 text-[12px] text-muted-2",children:"Outils professionnels pour l'agent (navigateur, docs, web). Désactivé = zéro coût."}),g.jsx("div",{className:"flex flex-col gap-3",children:t.map(h=>g.jsxs("div",{className:"border-[3px] border-line bg-base p-3",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:`h-[11px] w-[11px] flex-none border-2 border-line ${h.state==="connected"?"bg-ok":h.state==="error"?"bg-warn":"bg-muted-2"}`,title:h.error??h.state}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"text-[14px] font-semibold text-ink",children:[h.label,h.tools>0&&g.jsxs("span",{className:"ml-2 text-[11px] text-muted-2",children:[h.tools," outil(s)"]})]}),g.jsx("div",{className:"truncate text-[12px] text-muted-2",children:h.description})]}),g.jsx("button",{onClick:()=>m(h),disabled:r===h.id,className:"border-2 border-line bg-card px-2 py-1 text-[11px] text-ink-2",children:r===h.id?"test…":"Tester"}),g.jsx(Ni,{on:h.enabled,onClick:()=>u(h)})]}),(h.url_param||h.env_params.length>0)&&g.jsxs("div",{className:"mt-2 flex flex-col gap-1.5",children:[h.url_param&&g.jsx("input",{defaultValue:h.params.command??"",onBlur:y=>d(h,"command",y.target.value),placeholder:"commande stdio (ex. npx -y mon-mcp) ou URL",className:"border-2 border-line bg-card px-2 py-1 text-[12px] text-ink"}),h.env_params.map(y=>g.jsx("input",{defaultValue:h.params[y]??"",onBlur:x=>d(h,y,x.target.value),placeholder:y,className:"border-2 border-line bg-card px-2 py-1 text-[12px] text-ink"},y))]}),h.error&&g.jsx("div",{className:"mt-1.5 text-[12px] text-warn",children:h.error}),a[h.id]&&g.jsx("div",{className:"mt-1.5 text-[12px] text-muted-2",children:a[h.id]})]},h.id))})]})}function q0(){const[t,i]=ne.useState(null),r=()=>Ng().then(i).catch(()=>{});return ne.useEffect(()=>{r();const o=setInterval(r,5e3);return()=>clearInterval(o)},[]),g.jsxs(Mn,{children:[g.jsxs("div",{className:"mb-3.5 flex items-center justify-between",children:[g.jsx("div",{className:"font-pixel text-[11px] text-ink",children:"MATÉRIEL"}),g.jsxs("button",{onClick:r,className:"flex h-7 items-center gap-1.5 border-2 border-line bg-card-soft px-2.5 text-[13px] text-muted-2",children:[g.jsx(Gd,{size:12}),"Rafraîchir"]})]}),g.jsx("div",{className:"mb-1 text-[12px] font-bold uppercase tracking-wide text-label",children:"GPU vu par Loki (conteneur)"}),t!=null&&t.loki_gpus.length?t.loki_gpus.map(o=>g.jsx("div",{className:"border-2 border-line bg-base px-3 py-2 text-[13px]",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-ink",children:o.name}),g.jsxs("span",{className:"text-muted-2",children:[(o.vram_used_mb/1024).toFixed(1),"/",(o.vram_total_mb/1024).toFixed(1)," Go · ",o.util_pct.toFixed(0),"%"]})]})},o.index)):t!=null&&t.gpu_override?g.jsxs("div",{className:"border-2 border-line bg-base px-3 py-2 text-[13px] text-ink",children:[t.gpu_override.name," ·"," ",(t.gpu_override.vram_total_mb/1024).toFixed(0)," Go"," ",g.jsx("span",{className:"text-muted-2",children:"(valeur déclarée)"}),g.jsxs("div",{className:"mt-1 text-[11px] text-muted-2",children:["C'est la valeur de ",g.jsx("code",{children:"GPU_VRAM_MB"})," que tu as fixée, pas une détection réelle. Corrige-la (ex. 16000 pour 16 Go) ou mets 0."]})]}):g.jsxs("div",{className:"border-2 border-line bg-base px-3 py-2 text-[12px] text-muted-2",children:["Aucun GPU visible depuis le conteneur — normal si Ollama tourne sur une autre machine. Déclare ",g.jsx("code",{children:"GPU_VRAM_MB"})," pour l'auto-réglage."]}),g.jsxs("div",{className:"mb-1 mt-3 text-[12px] font-bold uppercase tracking-wide text-label",children:["Ollama ",t!=null&&t.ollama_is_local?"(local)":"(distant)"]}),g.jsxs("div",{className:"border-2 border-line bg-base px-3 py-2 text-[13px]",children:[g.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[g.jsx("span",{className:`h-2 w-2 border-2 border-line ${t!=null&&t.ollama.connected?"bg-ok":"bg-warn"}`}),g.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-2",title:t==null?void 0:t.ollama.host,children:t==null?void 0:t.ollama.host}),(t==null?void 0:t.ollama.version)&&g.jsxs("span",{className:"text-[11px] text-muted-3",children:["v",t.ollama.version]})]}),t!=null&&t.ollama.running.length?t.ollama.running.map(o=>g.jsxs("div",{className:"flex items-center gap-2 py-[2px]",children:[g.jsx("span",{className:"min-w-0 flex-1 truncate text-ink",title:o.name,children:o.name}),g.jsxs("span",{className:o.processor==="GPU"?"text-ok":o.processor==="CPU"?"text-warn":"text-ink",children:[o.processor,o.processor==="mixte"?` ${o.gpu_percent}%`:""]}),g.jsxs("span",{className:"text-[11px] text-muted-3",children:[(o.vram_mb/1024).toFixed(1),"G VRAM"]})]},o.name)):g.jsx("div",{className:"text-[12px] text-muted-2",children:"Aucun modèle chargé actuellement."})]}),g.jsx("div",{className:"mt-2 text-[11px] leading-relaxed text-muted-3",children:t==null?void 0:t.note})]})}function Q0(){const t=Qe(x=>x.selectedModel),[i,r]=ne.useState({}),[o,a]=ne.useState(!1),[c,u]=ne.useState(null),[d,m]=ne.useState([]);ne.useEffect(()=>{Rg().then(r).catch(()=>{})},[]);const h=async()=>{if(!(!t||o)){a(!0),u(null),m([]);try{const x=await Mg(t,(v,w,E)=>{m(L=>[...L.filter(T=>T.task!==v),{task:v,score:w,detail:E}])});x&&r(v=>({...v,[t]:x}))}catch(x){u(x instanceof Error?x.message:"benchmark impossible")}finally{a(!1)}}},y=i[t];return g.jsxs(Mn,{children:[g.jsxs("div",{className:"mb-3.5 flex items-center justify-between",children:[g.jsx("div",{className:"font-pixel text-[11px] text-ink",children:"BENCHMARK"}),g.jsx("button",{onClick:h,disabled:o||!t,className:"flex h-8 items-center gap-1.5 border-[3px] border-line bg-accent px-3 text-[13px] text-white shadow-accent-soft disabled:opacity-40",style:{borderRadius:7},children:o?"ÉVALUATION…":"TESTER CE MODÈLE"})]}),g.jsxs("div",{className:"mb-2 text-[13px] text-muted-2",children:["5 mini-épreuves (outils, code, consignes, JSON, format) — score /100 pour ",g.jsx("b",{className:"text-ink",children:t||"—"}),"."]}),o&&g.jsx("div",{className:"border-2 border-line bg-base px-3 py-2",children:d.map(x=>g.jsxs("div",{className:"flex items-center gap-2 py-[2px] text-[13px]",children:[g.jsx("span",{className:"flex-1 text-ink-2",children:x.task}),x.score===null?g.jsx("span",{className:"text-muted-3",children:"…"}):g.jsxs("span",{className:x.score>=14?"text-ok":x.score>=8?"text-ink":"text-warn",children:[x.score,"/20"]})]},x.task))}),c&&g.jsxs("div",{className:"border-2 border-warn bg-base px-3 py-2 text-[12px] text-warn",children:["Échec du test : ",c]}),!o&&y&&g.jsxs("div",{className:"border-2 border-line bg-base px-3 py-2",children:[g.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[g.jsx("span",{className:"text-[13px] text-ink",children:"Score"}),g.jsxs("span",{className:`font-pixel text-[13px] ${y.score>=70?"text-ok":y.score>=45?"text-ink":"text-warn"}`,children:[y.score,"/100"]})]}),y.details.map(x=>g.jsxs("div",{className:"flex items-center gap-2 py-[2px] text-[12px]",children:[g.jsx("span",{className:"flex-1 text-muted-2",children:x.task}),g.jsxs("span",{className:"text-muted",title:x.detail,children:[x.score,"/20"]})]},x.task))]}),Object.keys(i).length>1&&g.jsxs("div",{className:"mt-2 text-[12px] text-muted-2",children:["Autres :"," ",Object.entries(i).filter(([x])=>x!==t).map(([x,v])=>`${x} (${v.score})`).join(" · ")]})]})}function Mn({children:t,className:i=""}){return g.jsx("div",{className:`border-[3px] border-line bg-card p-4 shadow-hard-lg ${i}`,style:{borderRadius:9},children:t})}function Ni({on:t,onClick:i}){return g.jsx("button",{onClick:i,className:`relative h-5 w-[38px] flex-none ${t?"bg-card-deep":"border-2 border-line bg-base"}`,children:g.jsx("span",{className:`absolute h-3.5 w-3.5 ${t?"right-0.5 top-0.5 bg-accent":"left-0.5 top-[3px] bg-muted-3"}`})})}function Jn({label:t,value:i,min:r,max:o,step:a,fmt:c,onChange:u,last:d}){const m=(i-r)/(o-r)*100;return g.jsxs("div",{className:d?"":"mb-[15px]",children:[g.jsxs("div",{className:"mb-[7px] flex items-center justify-between",children:[g.jsx("span",{className:"text-[13px] text-ink-2",children:t}),g.jsx("span",{className:"text-[13px] text-accent",children:c(i)})]}),g.jsxs("div",{className:"relative h-[14px] border-2 border-line bg-card",children:[g.jsx("div",{className:"absolute left-0 top-0 bottom-0 bg-line",style:{width:`${m}%`}}),g.jsx("div",{className:"absolute top-1/2 h-5 w-4 -translate-x-1/2 -translate-y-1/2 border-[3px] border-line bg-accent",style:{left:`${m}%`}}),g.jsx("input",{type:"range",min:r,max:o,step:a,value:i,onChange:h=>u(parseFloat(h.target.value)),className:"absolute inset-0 h-full w-full cursor-pointer opacity-0"})]})]})}function G0({onOpen:t}){const{sessions:i,refreshSessions:r,openSession:o,removeSession:a}=Qe();return ne.useEffect(()=>{r()},[r]),g.jsx(ru,{title:"Historique",subtitle:"Toutes les conversations enregistrées localement.",children:g.jsxs("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2 xl:grid-cols-3",children:[i.map(c=>g.jsxs("div",{className:"border-[3px] border-line bg-card p-4 shadow-hard",children:[g.jsx("div",{className:"truncate text-[15px] font-semibold text-ink",children:c.title}),g.jsxs("div",{className:"mt-1 text-[12px] text-muted-2",children:[c.message_count??0," message(s) · ",new Date(c.updated_at*1e3).toLocaleString("fr-FR")]}),g.jsxs("div",{className:"mt-4 flex gap-2",children:[g.jsx("button",{onClick:async()=>{await o(c.id),t()},className:"border-2 border-line bg-accent px-3 py-1.5 text-[12px] font-bold text-white",children:"Ouvrir"}),g.jsx("button",{onClick:()=>a(c.id),className:"border-2 border-line bg-base px-3 py-1.5 text-[12px] text-warn",children:"Supprimer"})]})]},c.id)),i.length===0&&g.jsx(rh,{text:"Aucune conversation enregistrée."})]})})}function K0(){const{fileTree:t,refreshFiles:i}=Qe();return ne.useEffect(()=>{i()},[i]),g.jsx(ru,{title:"Fichiers",subtitle:"Workspace créé et modifié par l’agent.",children:g.jsx("div",{className:"border-[3px] border-line bg-panel p-3 shadow-hard",children:t.length?g.jsx(nh,{nodes:t,depth:0}):g.jsx(rh,{text:"Le workspace est vide."})})})}function nh({nodes:t,depth:i}){const{openPreview:r,previewPath:o,removeFile:a,currentProject:c}=Qe(),u=d=>{const m=d.type==="dir"?`Supprimer le dossier ${d.path} et tout son contenu ?`:`Supprimer ${d.path} ?`;window.confirm(m)&&a(d.path)};return g.jsx(g.Fragment,{children:t.map(d=>g.jsxs("div",{children:[g.jsxs("div",{className:`mb-1 flex items-center gap-2 border-2 px-3 py-2 ${d.path===o?"border-accent bg-card-deep text-white":"border-line bg-card text-ink-2"}`,style:{marginLeft:i*18},children:[g.jsxs("button",{onClick:()=>d.type==="file"&&r(d.path),className:"flex min-w-0 flex-1 items-center gap-2 text-left",children:[g.jsx("span",{children:d.type==="dir"?"▾":"▪"}),g.jsx("span",{className:"truncate",children:d.name}),d.size!==void 0&&g.jsx("span",{className:"ml-auto text-[11px] text-muted-2",children:X0(d.size)})]}),d.type==="file"&&g.jsxs("button",{onClick:()=>Oa(d.path,c()),className:"flex items-center gap-1 border-2 border-line bg-base px-2 py-1 text-[11px] text-accent",title:`Télécharger ${d.name}`,children:[g.jsx(so,{size:12})," Télécharger"]}),g.jsxs("button",{onClick:()=>u(d),className:"flex items-center gap-1 border-2 border-line bg-base px-2 py-1 text-[11px] text-warn",title:`Supprimer ${d.name}`,children:[g.jsx(ao,{size:12})," Supprimer"]})]}),d.children&&g.jsx(nh,{nodes:d.children,depth:i+1})]},d.path))})}function Y0({onSettings:t}){const{config:i,availableTools:r,refreshConfig:o,selectedModel:a}=Qe();return ne.useEffect(()=>{o()},[o,a]),g.jsxs(ru,{title:"Outils",subtitle:`Capacités proposées à ${a||"l’agent"}.`,children:[g.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3",children:r.map(c=>{const u=(i==null?void 0:i.tools[c])??!1;return g.jsx("div",{className:"border-[3px] border-line bg-card p-4 shadow-hard",children:g.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g.jsx("span",{className:"font-mono text-[14px] text-ink",children:c}),g.jsx("span",{className:`border-2 border-line px-2 py-1 text-[10px] ${u?"bg-ok text-white":"bg-base text-muted-2"}`,children:u?"ACTIF":"INACTIF"})]})},c)})}),g.jsx("button",{onClick:t,className:"mt-5 border-[3px] border-line bg-accent px-4 py-2 text-[13px] font-bold text-white shadow-hard",children:"Configurer les outils"})]})}function ru({title:t,subtitle:i,children:r}){return g.jsx("div",{className:"scr min-w-0 flex-1 overflow-auto bg-base p-7",children:g.jsxs("div",{className:"mx-auto max-w-[1100px]",children:[g.jsx("h1",{className:"m-0 text-xl font-bold text-ink",children:t}),g.jsx("p",{className:"mb-6 mt-1 text-[13px] text-muted-2",children:i}),r]})})}function rh({text:t}){return g.jsx("div",{className:"border-2 border-line bg-card p-8 text-center text-muted-2",children:t})}function X0(t){return t<1024?`${t} o`:t<1024*1024?`${Math.round(t/1024)} Ko`:`${(t/1024/1024).toFixed(1)} Mo`}function J0(){const[t,i]=ne.useState("chat"),{refreshStatus:r,refreshSystemStats:o,refreshModels:a,refreshLoadedModels:c,refreshSessions:u}=Qe();return ne.useEffect(()=>{r(),o(),a(),c(),u();const d=setInterval(r,1e4),m=setInterval(o,5e3),h=setInterval(c,8e3);return()=>{clearInterval(d),clearInterval(m),clearInterval(h)}},[r,o,a,c,u]),g.jsxs("div",{className:"flex h-full flex-col bg-base text-ink",children:[g.jsx(ex,{}),g.jsxs("div",{className:"flex min-h-0 flex-1",children:[g.jsx(xg,{active:t,onChange:i}),t==="chat"&&g.jsxs(g.Fragment,{children:[g.jsx(tx,{}),g.jsx(R0,{}),g.jsx(qd,{})]}),t==="history"&&g.jsx(G0,{onOpen:()=>i("chat")}),t==="files"&&g.jsxs(g.Fragment,{children:[g.jsx(K0,{}),g.jsx(qd,{})]}),t==="tools"&&g.jsx(Y0,{onSettings:()=>i("settings")}),t==="settings"&&g.jsx(H0,{})]})]})}sg.createRoot(document.getElementById("root")).render(g.jsx(Ei.StrictMode,{children:g.jsx(J0,{})}));
|