@amd-gaia/agent-ui 0.17.5 → 0.17.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-BJlmVnvj.js +453 -0
- package/dist/assets/{index-CzObDlwu.css → index-DDqg4jHs.css} +1 -1
- package/dist/index.html +2 -2
- package/main.cjs +91 -1
- package/package.json +1 -1
- package/services/backend-installer-progress-dialog.cjs +79 -45
- package/services/backend-installer.cjs +130 -15
- package/dist/assets/index-CdffaS1a.js +0 -438
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var tu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qm={exports:{}},Bu={},Gm={exports:{}},Ne={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Js=Symbol.for("react.element"),BE=Symbol.for("react.portal"),UE=Symbol.for("react.fragment"),HE=Symbol.for("react.strict_mode"),zE=Symbol.for("react.profiler"),$E=Symbol.for("react.provider"),YE=Symbol.for("react.context"),VE=Symbol.for("react.forward_ref"),WE=Symbol.for("react.suspense"),qE=Symbol.for("react.memo"),GE=Symbol.for("react.lazy"),af=Symbol.iterator;function QE(e){return e===null||typeof e!="object"?null:(e=af&&e[af]||e["@@iterator"],typeof e=="function"?e:null)}var Qm={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Km=Object.assign,Xm={};function Pi(e,t,n){this.props=e,this.context=t,this.refs=Xm,this.updater=n||Qm}Pi.prototype.isReactComponent={};Pi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Pi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Jm(){}Jm.prototype=Pi.prototype;function Ic(e,t,n){this.props=e,this.context=t,this.refs=Xm,this.updater=n||Qm}var Lc=Ic.prototype=new Jm;Lc.constructor=Ic;Km(Lc,Pi.prototype);Lc.isPureReactComponent=!0;var uf=Array.isArray,Zm=Object.prototype.hasOwnProperty,Dc={current:null},e0={key:!0,ref:!0,__self:!0,__source:!0};function t0(e,t,n){var r,i={},s=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)Zm.call(t,r)&&!e0.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1<u){for(var o=Array(u),c=0;c<u;c++)o[c]=arguments[c+2];i.children=o}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)i[r]===void 0&&(i[r]=u[r]);return{$$typeof:Js,type:e,key:s,ref:a,props:i,_owner:Dc.current}}function KE(e,t){return{$$typeof:Js,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Rc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Js}function XE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var lf=/\/+/g;function kl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?XE(""+e.key):t.toString(36)}function ja(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Js:case BE:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+kl(a,0):r,uf(i)?(n="",e!=null&&(n=e.replace(lf,"$&/")+"/"),ja(i,t,n,"",function(c){return c})):i!=null&&(Rc(i)&&(i=KE(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(lf,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",uf(e))for(var u=0;u<e.length;u++){s=e[u];var o=r+kl(s,u);a+=ja(s,t,n,o,i)}else if(o=QE(e),typeof o=="function")for(e=o.call(e),u=0;!(s=e.next()).done;)s=s.value,o=r+kl(s,u++),a+=ja(s,t,n,o,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function ha(e,t,n){if(e==null)return e;var r=[],i=0;return ja(e,r,"","",function(s){return t.call(n,s,i++)}),r}function JE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Dt={current:null},Fa={transition:null},ZE={ReactCurrentDispatcher:Dt,ReactCurrentBatchConfig:Fa,ReactCurrentOwner:Dc};function n0(){throw Error("act(...) is not supported in production builds of React.")}Ne.Children={map:ha,forEach:function(e,t,n){ha(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ha(e,function(){t++}),t},toArray:function(e){return ha(e,function(t){return t})||[]},only:function(e){if(!Rc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ne.Component=Pi;Ne.Fragment=UE;Ne.Profiler=zE;Ne.PureComponent=Ic;Ne.StrictMode=HE;Ne.Suspense=WE;Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ZE;Ne.act=n0;Ne.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Km({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=Dc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(o in t)Zm.call(t,o)&&!e0.hasOwnProperty(o)&&(r[o]=t[o]===void 0&&u!==void 0?u[o]:t[o])}var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){u=Array(o);for(var c=0;c<o;c++)u[c]=arguments[c+2];r.children=u}return{$$typeof:Js,type:e.type,key:i,ref:s,props:r,_owner:a}};Ne.createContext=function(e){return e={$$typeof:YE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:$E,_context:e},e.Consumer=e};Ne.createElement=t0;Ne.createFactory=function(e){var t=t0.bind(null,e);return t.type=e,t};Ne.createRef=function(){return{current:null}};Ne.forwardRef=function(e){return{$$typeof:VE,render:e}};Ne.isValidElement=Rc;Ne.lazy=function(e){return{$$typeof:GE,_payload:{_status:-1,_result:e},_init:JE}};Ne.memo=function(e,t){return{$$typeof:qE,type:e,compare:t===void 0?null:t}};Ne.startTransition=function(e){var t=Fa.transition;Fa.transition={};try{e()}finally{Fa.transition=t}};Ne.unstable_act=n0;Ne.useCallback=function(e,t){return Dt.current.useCallback(e,t)};Ne.useContext=function(e){return Dt.current.useContext(e)};Ne.useDebugValue=function(){};Ne.useDeferredValue=function(e){return Dt.current.useDeferredValue(e)};Ne.useEffect=function(e,t){return Dt.current.useEffect(e,t)};Ne.useId=function(){return Dt.current.useId()};Ne.useImperativeHandle=function(e,t,n){return Dt.current.useImperativeHandle(e,t,n)};Ne.useInsertionEffect=function(e,t){return Dt.current.useInsertionEffect(e,t)};Ne.useLayoutEffect=function(e,t){return Dt.current.useLayoutEffect(e,t)};Ne.useMemo=function(e,t){return Dt.current.useMemo(e,t)};Ne.useReducer=function(e,t,n){return Dt.current.useReducer(e,t,n)};Ne.useRef=function(e){return Dt.current.useRef(e)};Ne.useState=function(e){return Dt.current.useState(e)};Ne.useSyncExternalStore=function(e,t,n){return Dt.current.useSyncExternalStore(e,t,n)};Ne.useTransition=function(){return Dt.current.useTransition()};Ne.version="18.3.1";Gm.exports=Ne;var y=Gm.exports;const ws=Fu(y);/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var e2=y,t2=Symbol.for("react.element"),n2=Symbol.for("react.fragment"),r2=Object.prototype.hasOwnProperty,i2=e2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s2={key:!0,ref:!0,__self:!0,__source:!0};function r0(e,t,n){var r,i={},s=null,a=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)r2.call(t,r)&&!s2.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:t2,type:e,key:s,ref:a,props:i,_owner:i2.current}}Bu.Fragment=n2;Bu.jsx=r0;Bu.jsxs=r0;qm.exports=Bu;var l=qm.exports,To={},i0={exports:{}},en={},s0={exports:{}},a0={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(I,B){var b=I.length;I.push(B);e:for(;0<b;){var ee=b-1>>>1,ce=I[ee];if(0<i(ce,B))I[ee]=B,I[b]=ce,b=ee;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var B=I[0],b=I.pop();if(b!==B){I[0]=b;e:for(var ee=0,ce=I.length,N=ce>>>1;ee<N;){var fe=2*(ee+1)-1,be=I[fe],ge=fe+1,Oe=I[ge];if(0>i(be,b))ge<ce&&0>i(Oe,be)?(I[ee]=Oe,I[ge]=b,ee=ge):(I[ee]=be,I[fe]=b,ee=fe);else if(ge<ce&&0>i(Oe,b))I[ee]=Oe,I[ge]=b,ee=ge;else break e}}return B}function i(I,B){var b=I.sortIndex-B.sortIndex;return b!==0?b:I.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var o=[],c=[],f=1,h=null,m=3,p=!1,g=!1,x=!1,A=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(I){for(var B=n(c);B!==null;){if(B.callback===null)r(c);else if(B.startTime<=I)r(c),B.sortIndex=B.expirationTime,t(o,B);else break;B=n(c)}}function L(I){if(x=!1,k(I),!g)if(n(o)!==null)g=!0,ve(M);else{var B=n(c);B!==null&&ne(L,B.startTime-I)}}function M(I,B){g=!1,x&&(x=!1,E(D),D=-1),p=!0;var b=m;try{for(k(B),h=n(o);h!==null&&(!(h.expirationTime>B)||I&&!z());){var ee=h.callback;if(typeof ee=="function"){h.callback=null,m=h.priorityLevel;var ce=ee(h.expirationTime<=B);B=e.unstable_now(),typeof ce=="function"?h.callback=ce:h===n(o)&&r(o),k(B)}else r(o);h=n(o)}if(h!==null)var N=!0;else{var fe=n(c);fe!==null&&ne(L,fe.startTime-B),N=!1}return N}finally{h=null,m=b,p=!1}}var S=!1,O=null,D=-1,Y=5,w=-1;function z(){return!(e.unstable_now()-w<Y)}function K(){if(O!==null){var I=e.unstable_now();w=I;var B=!0;try{B=O(!0,I)}finally{B?de():(S=!1,O=null)}}else S=!1}var de;if(typeof T=="function")de=function(){T(K)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,oe=le.port2;le.port1.onmessage=K,de=function(){oe.postMessage(null)}}else de=function(){A(K,0)};function ve(I){O=I,S||(S=!0,de())}function ne(I,B){D=A(function(){I(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,ve(M))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(o)},e.unstable_next=function(I){switch(m){case 1:case 2:case 3:var B=3;break;default:B=m}var b=m;m=B;try{return I()}finally{m=b}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,B){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var b=m;m=I;try{return B()}finally{m=b}},e.unstable_scheduleCallback=function(I,B,b){var ee=e.unstable_now();switch(typeof b=="object"&&b!==null?(b=b.delay,b=typeof b=="number"&&0<b?ee+b:ee):b=ee,I){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=b+ce,I={id:f++,callback:B,priorityLevel:I,startTime:b,expirationTime:ce,sortIndex:-1},b>ee?(I.sortIndex=b,t(c,I),n(o)===null&&I===n(c)&&(x?(E(D),D=-1):x=!0,ne(L,b-ee))):(I.sortIndex=ce,t(o,I),g||p||(g=!0,ve(M))),I},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(I){var B=m;return function(){var b=m;m=B;try{return I.apply(this,arguments)}finally{m=b}}}})(a0);s0.exports=a0;var a2=s0.exports;/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var u2=y,Zt=a2;function G(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var u0=new Set,Is={};function Vr(e,t){Si(e,t),Si(e+"Capture",t)}function Si(e,t){for(Is[e]=t,e=0;e<t.length;e++)u0.add(t[e])}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yo=Object.prototype.hasOwnProperty,l2=/^[: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]*$/,of={},cf={};function o2(e){return yo.call(cf,e)?!0:yo.call(of,e)?!1:l2.test(e)?cf[e]=!0:(of[e]=!0,!1)}function c2(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function d2(e,t,n,r){if(t===null||typeof t>"u"||c2(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Rt(e,t,n,r,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var pt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pt[e]=new Rt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pt[t]=new Rt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pt[e]=new Rt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pt[e]=new Rt(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){pt[e]=new Rt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pt[e]=new Rt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pt[e]=new Rt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pt[e]=new Rt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pt[e]=new Rt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Oc=/[\-:]([a-z])/g;function Pc(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 t=e.replace(Oc,Pc);pt[t]=new Rt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Oc,Pc);pt[t]=new Rt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Oc,Pc);pt[t]=new Rt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pt[e]=new Rt(e,1,!1,e.toLowerCase(),null,!1,!1)});pt.xlinkHref=new Rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pt[e]=new Rt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mc(e,t,n,r){var i=pt.hasOwnProperty(t)?pt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(d2(t,n,i,r)&&(n=null),r||i===null?o2(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var qn=u2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ma=Symbol.for("react.element"),ii=Symbol.for("react.portal"),si=Symbol.for("react.fragment"),jc=Symbol.for("react.strict_mode"),xo=Symbol.for("react.profiler"),l0=Symbol.for("react.provider"),o0=Symbol.for("react.context"),Fc=Symbol.for("react.forward_ref"),bo=Symbol.for("react.suspense"),_o=Symbol.for("react.suspense_list"),Bc=Symbol.for("react.memo"),tr=Symbol.for("react.lazy"),c0=Symbol.for("react.offscreen"),df=Symbol.iterator;function Yi(e){return e===null||typeof e!="object"?null:(e=df&&e[df]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,Sl;function is(e){if(Sl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Sl=t&&t[1]||""}return`
|
|
34
|
+
`+Sl+e}var Cl=!1;function Nl(e,t){if(!e||Cl)return"";Cl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
|
|
35
|
+
`),s=r.stack.split(`
|
|
36
|
+
`),a=i.length-1,u=s.length-1;1<=a&&0<=u&&i[a]!==s[u];)u--;for(;1<=a&&0<=u;a--,u--)if(i[a]!==s[u]){if(a!==1||u!==1)do if(a--,u--,0>u||i[a]!==s[u]){var o=`
|
|
37
|
+
`+i[a].replace(" at new "," at ");return e.displayName&&o.includes("<anonymous>")&&(o=o.replace("<anonymous>",e.displayName)),o}while(1<=a&&0<=u);break}}}finally{Cl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?is(e):""}function f2(e){switch(e.tag){case 5:return is(e.type);case 16:return is("Lazy");case 13:return is("Suspense");case 19:return is("SuspenseList");case 0:case 2:case 15:return e=Nl(e.type,!1),e;case 11:return e=Nl(e.type.render,!1),e;case 1:return e=Nl(e.type,!0),e;default:return""}}function ko(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 si:return"Fragment";case ii:return"Portal";case xo:return"Profiler";case jc:return"StrictMode";case bo:return"Suspense";case _o:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case o0:return(e.displayName||"Context")+".Consumer";case l0:return(e._context.displayName||"Context")+".Provider";case Fc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bc:return t=e.displayName||null,t!==null?t:ko(e.type)||"Memo";case tr:t=e._payload,e=e._init;try{return ko(e(t))}catch{}}return null}function h2(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ko(t);case 8:return t===jc?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function gr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function d0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function m2(e){var t=d0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pa(e){e._valueTracker||(e._valueTracker=m2(e))}function f0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=d0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function nu(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 So(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ff(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function h0(e,t){t=t.checked,t!=null&&Mc(e,"checked",t,!1)}function Co(e,t){h0(e,t);var n=gr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?No(e,t.type,n):t.hasOwnProperty("defaultValue")&&No(e,t.type,gr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function No(e,t,n){(t!=="number"||nu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ss=Array.isArray;function Ei(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+gr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function vo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(G(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function mf(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(G(92));if(ss(n)){if(1<n.length)throw Error(G(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:gr(n)}}function m0(e,t){var n=gr(t.value),r=gr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function pf(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function p0(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 Ao(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?p0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ga,g0=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ga=ga||document.createElement("div"),ga.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ga.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ls(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cs={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},p2=["Webkit","ms","Moz","O"];Object.keys(cs).forEach(function(e){p2.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cs[t]=cs[e]})});function E0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||cs.hasOwnProperty(e)&&cs[e]?(""+t).trim():t+"px"}function T0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=E0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var g2=Ge({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 wo(e,t){if(t){if(g2[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(G(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(G(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(G(61))}if(t.style!=null&&typeof t.style!="object")throw Error(G(62))}}function Io(e,t){if(e.indexOf("-")===-1)return typeof t.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 Lo=null;function Uc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Do=null,Ti=null,yi=null;function gf(e){if(e=ta(e)){if(typeof Do!="function")throw Error(G(280));var t=e.stateNode;t&&(t=Yu(t),Do(e.stateNode,e.type,t))}}function y0(e){Ti?yi?yi.push(e):yi=[e]:Ti=e}function x0(){if(Ti){var e=Ti,t=yi;if(yi=Ti=null,gf(e),t)for(e=0;e<t.length;e++)gf(t[e])}}function b0(e,t){return e(t)}function _0(){}var vl=!1;function k0(e,t,n){if(vl)return e(t,n);vl=!0;try{return b0(e,t,n)}finally{vl=!1,(Ti!==null||yi!==null)&&(_0(),x0())}}function Ds(e,t){var n=e.stateNode;if(n===null)return null;var r=Yu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(G(231,t,typeof n));return n}var Ro=!1;if($n)try{var Vi={};Object.defineProperty(Vi,"passive",{get:function(){Ro=!0}}),window.addEventListener("test",Vi,Vi),window.removeEventListener("test",Vi,Vi)}catch{Ro=!1}function E2(e,t,n,r,i,s,a,u,o){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(f){this.onError(f)}}var ds=!1,ru=null,iu=!1,Oo=null,T2={onError:function(e){ds=!0,ru=e}};function y2(e,t,n,r,i,s,a,u,o){ds=!1,ru=null,E2.apply(T2,arguments)}function x2(e,t,n,r,i,s,a,u,o){if(y2.apply(this,arguments),ds){if(ds){var c=ru;ds=!1,ru=null}else throw Error(G(198));iu||(iu=!0,Oo=c)}}function Wr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function S0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ef(e){if(Wr(e)!==e)throw Error(G(188))}function b2(e){var t=e.alternate;if(!t){if(t=Wr(e),t===null)throw Error(G(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Ef(i),e;if(s===r)return Ef(i),t;s=s.sibling}throw Error(G(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,u=i.child;u;){if(u===n){a=!0,n=i,r=s;break}if(u===r){a=!0,r=i,n=s;break}u=u.sibling}if(!a){for(u=s.child;u;){if(u===n){a=!0,n=s,r=i;break}if(u===r){a=!0,r=s,n=i;break}u=u.sibling}if(!a)throw Error(G(189))}}if(n.alternate!==r)throw Error(G(190))}if(n.tag!==3)throw Error(G(188));return n.stateNode.current===n?e:t}function C0(e){return e=b2(e),e!==null?N0(e):null}function N0(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=N0(e);if(t!==null)return t;e=e.sibling}return null}var v0=Zt.unstable_scheduleCallback,Tf=Zt.unstable_cancelCallback,_2=Zt.unstable_shouldYield,k2=Zt.unstable_requestPaint,Xe=Zt.unstable_now,S2=Zt.unstable_getCurrentPriorityLevel,Hc=Zt.unstable_ImmediatePriority,A0=Zt.unstable_UserBlockingPriority,su=Zt.unstable_NormalPriority,C2=Zt.unstable_LowPriority,w0=Zt.unstable_IdlePriority,Uu=null,Ln=null;function N2(e){if(Ln&&typeof Ln.onCommitFiberRoot=="function")try{Ln.onCommitFiberRoot(Uu,e,void 0,(e.current.flags&128)===128)}catch{}}var En=Math.clz32?Math.clz32:w2,v2=Math.log,A2=Math.LN2;function w2(e){return e>>>=0,e===0?32:31-(v2(e)/A2|0)|0}var Ea=64,Ta=4194304;function as(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 au(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~i;u!==0?r=as(u):(s&=a,s!==0&&(r=as(s)))}else a=n&~i,a!==0?r=as(a):s!==0&&(r=as(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-En(t),i=1<<n,r|=e[n],t&=~i;return r}function I2(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 L2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-En(s),u=1<<a,o=i[a];o===-1?(!(u&n)||u&r)&&(i[a]=I2(u,t)):o<=t&&(e.expiredLanes|=u),s&=~u}}function Po(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function I0(){var e=Ea;return Ea<<=1,!(Ea&4194240)&&(Ea=64),e}function Al(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Zs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-En(t),e[t]=n}function D2(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-En(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function zc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-En(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var De=0;function L0(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var D0,$c,R0,O0,P0,Mo=!1,ya=[],lr=null,or=null,cr=null,Rs=new Map,Os=new Map,rr=[],R2="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 yf(e,t){switch(e){case"focusin":case"focusout":lr=null;break;case"dragenter":case"dragleave":or=null;break;case"mouseover":case"mouseout":cr=null;break;case"pointerover":case"pointerout":Rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Os.delete(t.pointerId)}}function Wi(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=ta(t),t!==null&&$c(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function O2(e,t,n,r,i){switch(t){case"focusin":return lr=Wi(lr,e,t,n,r,i),!0;case"dragenter":return or=Wi(or,e,t,n,r,i),!0;case"mouseover":return cr=Wi(cr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Rs.set(s,Wi(Rs.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Os.set(s,Wi(Os.get(s)||null,e,t,n,r,i)),!0}return!1}function M0(e){var t=wr(e.target);if(t!==null){var n=Wr(t);if(n!==null){if(t=n.tag,t===13){if(t=S0(n),t!==null){e.blockedOn=t,P0(e.priority,function(){R0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ba(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=jo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Lo=r,n.target.dispatchEvent(r),Lo=null}else return t=ta(n),t!==null&&$c(t),e.blockedOn=n,!1;t.shift()}return!0}function xf(e,t,n){Ba(e)&&n.delete(t)}function P2(){Mo=!1,lr!==null&&Ba(lr)&&(lr=null),or!==null&&Ba(or)&&(or=null),cr!==null&&Ba(cr)&&(cr=null),Rs.forEach(xf),Os.forEach(xf)}function qi(e,t){e.blockedOn===t&&(e.blockedOn=null,Mo||(Mo=!0,Zt.unstable_scheduleCallback(Zt.unstable_NormalPriority,P2)))}function Ps(e){function t(i){return qi(i,e)}if(0<ya.length){qi(ya[0],e);for(var n=1;n<ya.length;n++){var r=ya[n];r.blockedOn===e&&(r.blockedOn=null)}}for(lr!==null&&qi(lr,e),or!==null&&qi(or,e),cr!==null&&qi(cr,e),Rs.forEach(t),Os.forEach(t),n=0;n<rr.length;n++)r=rr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<rr.length&&(n=rr[0],n.blockedOn===null);)M0(n),n.blockedOn===null&&rr.shift()}var xi=qn.ReactCurrentBatchConfig,uu=!0;function M2(e,t,n,r){var i=De,s=xi.transition;xi.transition=null;try{De=1,Yc(e,t,n,r)}finally{De=i,xi.transition=s}}function j2(e,t,n,r){var i=De,s=xi.transition;xi.transition=null;try{De=4,Yc(e,t,n,r)}finally{De=i,xi.transition=s}}function Yc(e,t,n,r){if(uu){var i=jo(e,t,n,r);if(i===null)Fl(e,t,r,lu,n),yf(e,r);else if(O2(i,e,t,n,r))r.stopPropagation();else if(yf(e,r),t&4&&-1<R2.indexOf(e)){for(;i!==null;){var s=ta(i);if(s!==null&&D0(s),s=jo(e,t,n,r),s===null&&Fl(e,t,r,lu,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Fl(e,t,r,null,n)}}var lu=null;function jo(e,t,n,r){if(lu=null,e=Uc(r),e=wr(e),e!==null)if(t=Wr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=S0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return lu=e,null}function j0(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(S2()){case Hc:return 1;case A0:return 4;case su:case C2:return 16;case w0:return 536870912;default:return 16}default:return 16}}var sr=null,Vc=null,Ua=null;function F0(){if(Ua)return Ua;var e,t=Vc,n=t.length,r,i="value"in sr?sr.value:sr.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[s-r];r++);return Ua=i.slice(e,1<r?1-r:void 0)}function Ha(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function xa(){return!0}function bf(){return!1}function tn(e){function t(n,r,i,s,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(s):s[u]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?xa:bf,this.isPropagationStopped=bf,this}return Ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=xa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=xa)},persist:function(){},isPersistent:xa}),t}var Mi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wc=tn(Mi),ea=Ge({},Mi,{view:0,detail:0}),F2=tn(ea),wl,Il,Gi,Hu=Ge({},ea,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qc,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!==Gi&&(Gi&&e.type==="mousemove"?(wl=e.screenX-Gi.screenX,Il=e.screenY-Gi.screenY):Il=wl=0,Gi=e),wl)},movementY:function(e){return"movementY"in e?e.movementY:Il}}),_f=tn(Hu),B2=Ge({},Hu,{dataTransfer:0}),U2=tn(B2),H2=Ge({},ea,{relatedTarget:0}),Ll=tn(H2),z2=Ge({},Mi,{animationName:0,elapsedTime:0,pseudoElement:0}),$2=tn(z2),Y2=Ge({},Mi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),V2=tn(Y2),W2=Ge({},Mi,{data:0}),kf=tn(W2),q2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},G2={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"},Q2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function K2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Q2[e])?!!t[e]:!1}function qc(){return K2}var X2=Ge({},ea,{key:function(e){if(e.key){var t=q2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ha(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?G2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qc,charCode:function(e){return e.type==="keypress"?Ha(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ha(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),J2=tn(X2),Z2=Ge({},Hu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sf=tn(Z2),eT=Ge({},ea,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qc}),tT=tn(eT),nT=Ge({},Mi,{propertyName:0,elapsedTime:0,pseudoElement:0}),rT=tn(nT),iT=Ge({},Hu,{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}),sT=tn(iT),aT=[9,13,27,32],Gc=$n&&"CompositionEvent"in window,fs=null;$n&&"documentMode"in document&&(fs=document.documentMode);var uT=$n&&"TextEvent"in window&&!fs,B0=$n&&(!Gc||fs&&8<fs&&11>=fs),Cf=" ",Nf=!1;function U0(e,t){switch(e){case"keyup":return aT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function H0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ai=!1;function lT(e,t){switch(e){case"compositionend":return H0(t);case"keypress":return t.which!==32?null:(Nf=!0,Cf);case"textInput":return e=t.data,e===Cf&&Nf?null:e;default:return null}}function oT(e,t){if(ai)return e==="compositionend"||!Gc&&U0(e,t)?(e=F0(),Ua=Vc=sr=null,ai=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return B0&&t.locale!=="ko"?null:t.data;default:return null}}var cT={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 vf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!cT[e.type]:t==="textarea"}function z0(e,t,n,r){y0(r),t=ou(t,"onChange"),0<t.length&&(n=new Wc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var hs=null,Ms=null;function dT(e){Z0(e,0)}function zu(e){var t=oi(e);if(f0(t))return e}function fT(e,t){if(e==="change")return t}var $0=!1;if($n){var Dl;if($n){var Rl="oninput"in document;if(!Rl){var Af=document.createElement("div");Af.setAttribute("oninput","return;"),Rl=typeof Af.oninput=="function"}Dl=Rl}else Dl=!1;$0=Dl&&(!document.documentMode||9<document.documentMode)}function wf(){hs&&(hs.detachEvent("onpropertychange",Y0),Ms=hs=null)}function Y0(e){if(e.propertyName==="value"&&zu(Ms)){var t=[];z0(t,Ms,e,Uc(e)),k0(dT,t)}}function hT(e,t,n){e==="focusin"?(wf(),hs=t,Ms=n,hs.attachEvent("onpropertychange",Y0)):e==="focusout"&&wf()}function mT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return zu(Ms)}function pT(e,t){if(e==="click")return zu(t)}function gT(e,t){if(e==="input"||e==="change")return zu(t)}function ET(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xn=typeof Object.is=="function"?Object.is:ET;function js(e,t){if(xn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!yo.call(t,i)||!xn(e[i],t[i]))return!1}return!0}function If(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lf(e,t){var n=If(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=If(n)}}function V0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?V0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function W0(){for(var e=window,t=nu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=nu(e.document)}return t}function Qc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function TT(e){var t=W0(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&V0(n.ownerDocument.documentElement,n)){if(r!==null&&Qc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=Lf(n,s);var a=Lf(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var yT=$n&&"documentMode"in document&&11>=document.documentMode,ui=null,Fo=null,ms=null,Bo=!1;function Df(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Bo||ui==null||ui!==nu(r)||(r=ui,"selectionStart"in r&&Qc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ms&&js(ms,r)||(ms=r,r=ou(Fo,"onSelect"),0<r.length&&(t=new Wc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ui)))}function ba(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var li={animationend:ba("Animation","AnimationEnd"),animationiteration:ba("Animation","AnimationIteration"),animationstart:ba("Animation","AnimationStart"),transitionend:ba("Transition","TransitionEnd")},Ol={},q0={};$n&&(q0=document.createElement("div").style,"AnimationEvent"in window||(delete li.animationend.animation,delete li.animationiteration.animation,delete li.animationstart.animation),"TransitionEvent"in window||delete li.transitionend.transition);function $u(e){if(Ol[e])return Ol[e];if(!li[e])return e;var t=li[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in q0)return Ol[e]=t[n];return e}var G0=$u("animationend"),Q0=$u("animationiteration"),K0=$u("animationstart"),X0=$u("transitionend"),J0=new Map,Rf="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 yr(e,t){J0.set(e,t),Vr(t,[e])}for(var Pl=0;Pl<Rf.length;Pl++){var Ml=Rf[Pl],xT=Ml.toLowerCase(),bT=Ml[0].toUpperCase()+Ml.slice(1);yr(xT,"on"+bT)}yr(G0,"onAnimationEnd");yr(Q0,"onAnimationIteration");yr(K0,"onAnimationStart");yr("dblclick","onDoubleClick");yr("focusin","onFocus");yr("focusout","onBlur");yr(X0,"onTransitionEnd");Si("onMouseEnter",["mouseout","mouseover"]);Si("onMouseLeave",["mouseout","mouseover"]);Si("onPointerEnter",["pointerout","pointerover"]);Si("onPointerLeave",["pointerout","pointerover"]);Vr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Vr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Vr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Vr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Vr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Vr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var us="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(" "),_T=new Set("cancel close invalid load scroll toggle".split(" ").concat(us));function Of(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,x2(r,t,void 0,e),e.currentTarget=null}function Z0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var a=r.length-1;0<=a;a--){var u=r[a],o=u.instance,c=u.currentTarget;if(u=u.listener,o!==s&&i.isPropagationStopped())break e;Of(i,u,c),s=o}else for(a=0;a<r.length;a++){if(u=r[a],o=u.instance,c=u.currentTarget,u=u.listener,o!==s&&i.isPropagationStopped())break e;Of(i,u,c),s=o}}}if(iu)throw e=Oo,iu=!1,Oo=null,e}function He(e,t){var n=t[Yo];n===void 0&&(n=t[Yo]=new Set);var r=e+"__bubble";n.has(r)||(ep(t,e,2,!1),n.add(r))}function jl(e,t,n){var r=0;t&&(r|=4),ep(n,e,r,t)}var _a="_reactListening"+Math.random().toString(36).slice(2);function Fs(e){if(!e[_a]){e[_a]=!0,u0.forEach(function(n){n!=="selectionchange"&&(_T.has(n)||jl(n,!1,e),jl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_a]||(t[_a]=!0,jl("selectionchange",!1,t))}}function ep(e,t,n,r){switch(j0(t)){case 1:var i=M2;break;case 4:i=j2;break;default:i=Yc}n=i.bind(null,t,n,e),i=void 0,!Ro||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Fl(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var u=r.stateNode.containerInfo;if(u===i||u.nodeType===8&&u.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var o=a.tag;if((o===3||o===4)&&(o=a.stateNode.containerInfo,o===i||o.nodeType===8&&o.parentNode===i))return;a=a.return}for(;u!==null;){if(a=wr(u),a===null)return;if(o=a.tag,o===5||o===6){r=s=a;continue e}u=u.parentNode}}r=r.return}k0(function(){var c=s,f=Uc(n),h=[];e:{var m=J0.get(e);if(m!==void 0){var p=Wc,g=e;switch(e){case"keypress":if(Ha(n)===0)break e;case"keydown":case"keyup":p=J2;break;case"focusin":g="focus",p=Ll;break;case"focusout":g="blur",p=Ll;break;case"beforeblur":case"afterblur":p=Ll;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=_f;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=U2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=tT;break;case G0:case Q0:case K0:p=$2;break;case X0:p=rT;break;case"scroll":p=F2;break;case"wheel":p=sT;break;case"copy":case"cut":case"paste":p=V2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Sf}var x=(t&4)!==0,A=!x&&e==="scroll",E=x?m!==null?m+"Capture":null:m;x=[];for(var T=c,k;T!==null;){k=T;var L=k.stateNode;if(k.tag===5&&L!==null&&(k=L,E!==null&&(L=Ds(T,E),L!=null&&x.push(Bs(T,L,k)))),A)break;T=T.return}0<x.length&&(m=new p(m,g,null,n,f),h.push({event:m,listeners:x}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",m&&n!==Lo&&(g=n.relatedTarget||n.fromElement)&&(wr(g)||g[Yn]))break e;if((p||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=c,g=g?wr(g):null,g!==null&&(A=Wr(g),g!==A||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=c),p!==g)){if(x=_f,L="onMouseLeave",E="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(x=Sf,L="onPointerLeave",E="onPointerEnter",T="pointer"),A=p==null?m:oi(p),k=g==null?m:oi(g),m=new x(L,T+"leave",p,n,f),m.target=A,m.relatedTarget=k,L=null,wr(f)===c&&(x=new x(E,T+"enter",g,n,f),x.target=k,x.relatedTarget=A,L=x),A=L,p&&g)t:{for(x=p,E=g,T=0,k=x;k;k=Zr(k))T++;for(k=0,L=E;L;L=Zr(L))k++;for(;0<T-k;)x=Zr(x),T--;for(;0<k-T;)E=Zr(E),k--;for(;T--;){if(x===E||E!==null&&x===E.alternate)break t;x=Zr(x),E=Zr(E)}x=null}else x=null;p!==null&&Pf(h,m,p,x,!1),g!==null&&A!==null&&Pf(h,A,g,x,!0)}}e:{if(m=c?oi(c):window,p=m.nodeName&&m.nodeName.toLowerCase(),p==="select"||p==="input"&&m.type==="file")var M=fT;else if(vf(m))if($0)M=gT;else{M=mT;var S=hT}else(p=m.nodeName)&&p.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(M=pT);if(M&&(M=M(e,c))){z0(h,M,n,f);break e}S&&S(e,m,c),e==="focusout"&&(S=m._wrapperState)&&S.controlled&&m.type==="number"&&No(m,"number",m.value)}switch(S=c?oi(c):window,e){case"focusin":(vf(S)||S.contentEditable==="true")&&(ui=S,Fo=c,ms=null);break;case"focusout":ms=Fo=ui=null;break;case"mousedown":Bo=!0;break;case"contextmenu":case"mouseup":case"dragend":Bo=!1,Df(h,n,f);break;case"selectionchange":if(yT)break;case"keydown":case"keyup":Df(h,n,f)}var O;if(Gc)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else ai?U0(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(B0&&n.locale!=="ko"&&(ai||D!=="onCompositionStart"?D==="onCompositionEnd"&&ai&&(O=F0()):(sr=f,Vc="value"in sr?sr.value:sr.textContent,ai=!0)),S=ou(c,D),0<S.length&&(D=new kf(D,e,null,n,f),h.push({event:D,listeners:S}),O?D.data=O:(O=H0(n),O!==null&&(D.data=O)))),(O=uT?lT(e,n):oT(e,n))&&(c=ou(c,"onBeforeInput"),0<c.length&&(f=new kf("onBeforeInput","beforeinput",null,n,f),h.push({event:f,listeners:c}),f.data=O))}Z0(h,t)})}function Bs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ou(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Ds(e,n),s!=null&&r.unshift(Bs(e,s,i)),s=Ds(e,t),s!=null&&r.push(Bs(e,s,i))),e=e.return}return r}function Zr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Pf(e,t,n,r,i){for(var s=t._reactName,a=[];n!==null&&n!==r;){var u=n,o=u.alternate,c=u.stateNode;if(o!==null&&o===r)break;u.tag===5&&c!==null&&(u=c,i?(o=Ds(n,s),o!=null&&a.unshift(Bs(n,o,u))):i||(o=Ds(n,s),o!=null&&a.push(Bs(n,o,u)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var kT=/\r\n?/g,ST=/\u0000|\uFFFD/g;function Mf(e){return(typeof e=="string"?e:""+e).replace(kT,`
|
|
38
|
+
`).replace(ST,"")}function ka(e,t,n){if(t=Mf(t),Mf(e)!==t&&n)throw Error(G(425))}function cu(){}var Uo=null,Ho=null;function zo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $o=typeof setTimeout=="function"?setTimeout:void 0,CT=typeof clearTimeout=="function"?clearTimeout:void 0,jf=typeof Promise=="function"?Promise:void 0,NT=typeof queueMicrotask=="function"?queueMicrotask:typeof jf<"u"?function(e){return jf.resolve(null).then(e).catch(vT)}:$o;function vT(e){setTimeout(function(){throw e})}function Bl(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Ps(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Ps(t)}function dr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ff(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ji=Math.random().toString(36).slice(2),wn="__reactFiber$"+ji,Us="__reactProps$"+ji,Yn="__reactContainer$"+ji,Yo="__reactEvents$"+ji,AT="__reactListeners$"+ji,wT="__reactHandles$"+ji;function wr(e){var t=e[wn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yn]||n[wn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ff(e);e!==null;){if(n=e[wn])return n;e=Ff(e)}return t}e=n,n=e.parentNode}return null}function ta(e){return e=e[wn]||e[Yn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function oi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(G(33))}function Yu(e){return e[Us]||null}var Vo=[],ci=-1;function xr(e){return{current:e}}function ze(e){0>ci||(e.current=Vo[ci],Vo[ci]=null,ci--)}function Be(e,t){ci++,Vo[ci]=e.current,e.current=t}var Er={},Ct=xr(Er),Ut=xr(!1),jr=Er;function Ci(e,t){var n=e.type.contextTypes;if(!n)return Er;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ht(e){return e=e.childContextTypes,e!=null}function du(){ze(Ut),ze(Ct)}function Bf(e,t,n){if(Ct.current!==Er)throw Error(G(168));Be(Ct,t),Be(Ut,n)}function tp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(G(108,h2(e)||"Unknown",i));return Ge({},n,r)}function fu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Er,jr=Ct.current,Be(Ct,e),Be(Ut,Ut.current),!0}function Uf(e,t,n){var r=e.stateNode;if(!r)throw Error(G(169));n?(e=tp(e,t,jr),r.__reactInternalMemoizedMergedChildContext=e,ze(Ut),ze(Ct),Be(Ct,e)):ze(Ut),Be(Ut,n)}var jn=null,Vu=!1,Ul=!1;function np(e){jn===null?jn=[e]:jn.push(e)}function IT(e){Vu=!0,np(e)}function br(){if(!Ul&&jn!==null){Ul=!0;var e=0,t=De;try{var n=jn;for(De=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}jn=null,Vu=!1}catch(i){throw jn!==null&&(jn=jn.slice(e+1)),v0(Hc,br),i}finally{De=t,Ul=!1}}return null}var di=[],fi=0,hu=null,mu=0,nn=[],rn=0,Fr=null,Bn=1,Un="";function Nr(e,t){di[fi++]=mu,di[fi++]=hu,hu=e,mu=t}function rp(e,t,n){nn[rn++]=Bn,nn[rn++]=Un,nn[rn++]=Fr,Fr=e;var r=Bn;e=Un;var i=32-En(r)-1;r&=~(1<<i),n+=1;var s=32-En(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Bn=1<<32-En(t)+i|n<<i|r,Un=s+e}else Bn=1<<s|n<<i|r,Un=e}function Kc(e){e.return!==null&&(Nr(e,1),rp(e,1,0))}function Xc(e){for(;e===hu;)hu=di[--fi],di[fi]=null,mu=di[--fi],di[fi]=null;for(;e===Fr;)Fr=nn[--rn],nn[rn]=null,Un=nn[--rn],nn[rn]=null,Bn=nn[--rn],nn[rn]=null}var Xt=null,Kt=null,Ve=!1,gn=null;function ip(e,t){var n=un(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Hf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Xt=e,Kt=dr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Xt=e,Kt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Fr!==null?{id:Bn,overflow:Un}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=un(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Xt=e,Kt=null,!0):!1;default:return!1}}function Wo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qo(e){if(Ve){var t=Kt;if(t){var n=t;if(!Hf(e,t)){if(Wo(e))throw Error(G(418));t=dr(n.nextSibling);var r=Xt;t&&Hf(e,t)?ip(r,n):(e.flags=e.flags&-4097|2,Ve=!1,Xt=e)}}else{if(Wo(e))throw Error(G(418));e.flags=e.flags&-4097|2,Ve=!1,Xt=e}}}function zf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Xt=e}function Sa(e){if(e!==Xt)return!1;if(!Ve)return zf(e),Ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!zo(e.type,e.memoizedProps)),t&&(t=Kt)){if(Wo(e))throw sp(),Error(G(418));for(;t;)ip(e,t),t=dr(t.nextSibling)}if(zf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Kt=dr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Kt=null}}else Kt=Xt?dr(e.stateNode.nextSibling):null;return!0}function sp(){for(var e=Kt;e;)e=dr(e.nextSibling)}function Ni(){Kt=Xt=null,Ve=!1}function Jc(e){gn===null?gn=[e]:gn.push(e)}var LT=qn.ReactCurrentBatchConfig;function Qi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(G(309));var r=n.stateNode}if(!r)throw Error(G(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(a){var u=i.refs;a===null?delete u[s]:u[s]=a},t._stringRef=s,t)}if(typeof e!="string")throw Error(G(284));if(!n._owner)throw Error(G(290,e))}return e}function Ca(e,t){throw e=Object.prototype.toString.call(t),Error(G(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $f(e){var t=e._init;return t(e._payload)}function ap(e){function t(E,T){if(e){var k=E.deletions;k===null?(E.deletions=[T],E.flags|=16):k.push(T)}}function n(E,T){if(!e)return null;for(;T!==null;)t(E,T),T=T.sibling;return null}function r(E,T){for(E=new Map;T!==null;)T.key!==null?E.set(T.key,T):E.set(T.index,T),T=T.sibling;return E}function i(E,T){return E=pr(E,T),E.index=0,E.sibling=null,E}function s(E,T,k){return E.index=k,e?(k=E.alternate,k!==null?(k=k.index,k<T?(E.flags|=2,T):k):(E.flags|=2,T)):(E.flags|=1048576,T)}function a(E){return e&&E.alternate===null&&(E.flags|=2),E}function u(E,T,k,L){return T===null||T.tag!==6?(T=ql(k,E.mode,L),T.return=E,T):(T=i(T,k),T.return=E,T)}function o(E,T,k,L){var M=k.type;return M===si?f(E,T,k.props.children,L,k.key):T!==null&&(T.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===tr&&$f(M)===T.type)?(L=i(T,k.props),L.ref=Qi(E,T,k),L.return=E,L):(L=Ga(k.type,k.key,k.props,null,E.mode,L),L.ref=Qi(E,T,k),L.return=E,L)}function c(E,T,k,L){return T===null||T.tag!==4||T.stateNode.containerInfo!==k.containerInfo||T.stateNode.implementation!==k.implementation?(T=Gl(k,E.mode,L),T.return=E,T):(T=i(T,k.children||[]),T.return=E,T)}function f(E,T,k,L,M){return T===null||T.tag!==7?(T=Pr(k,E.mode,L,M),T.return=E,T):(T=i(T,k),T.return=E,T)}function h(E,T,k){if(typeof T=="string"&&T!==""||typeof T=="number")return T=ql(""+T,E.mode,k),T.return=E,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case ma:return k=Ga(T.type,T.key,T.props,null,E.mode,k),k.ref=Qi(E,null,T),k.return=E,k;case ii:return T=Gl(T,E.mode,k),T.return=E,T;case tr:var L=T._init;return h(E,L(T._payload),k)}if(ss(T)||Yi(T))return T=Pr(T,E.mode,k,null),T.return=E,T;Ca(E,T)}return null}function m(E,T,k,L){var M=T!==null?T.key:null;if(typeof k=="string"&&k!==""||typeof k=="number")return M!==null?null:u(E,T,""+k,L);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case ma:return k.key===M?o(E,T,k,L):null;case ii:return k.key===M?c(E,T,k,L):null;case tr:return M=k._init,m(E,T,M(k._payload),L)}if(ss(k)||Yi(k))return M!==null?null:f(E,T,k,L,null);Ca(E,k)}return null}function p(E,T,k,L,M){if(typeof L=="string"&&L!==""||typeof L=="number")return E=E.get(k)||null,u(T,E,""+L,M);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case ma:return E=E.get(L.key===null?k:L.key)||null,o(T,E,L,M);case ii:return E=E.get(L.key===null?k:L.key)||null,c(T,E,L,M);case tr:var S=L._init;return p(E,T,k,S(L._payload),M)}if(ss(L)||Yi(L))return E=E.get(k)||null,f(T,E,L,M,null);Ca(T,L)}return null}function g(E,T,k,L){for(var M=null,S=null,O=T,D=T=0,Y=null;O!==null&&D<k.length;D++){O.index>D?(Y=O,O=null):Y=O.sibling;var w=m(E,O,k[D],L);if(w===null){O===null&&(O=Y);break}e&&O&&w.alternate===null&&t(E,O),T=s(w,T,D),S===null?M=w:S.sibling=w,S=w,O=Y}if(D===k.length)return n(E,O),Ve&&Nr(E,D),M;if(O===null){for(;D<k.length;D++)O=h(E,k[D],L),O!==null&&(T=s(O,T,D),S===null?M=O:S.sibling=O,S=O);return Ve&&Nr(E,D),M}for(O=r(E,O);D<k.length;D++)Y=p(O,E,D,k[D],L),Y!==null&&(e&&Y.alternate!==null&&O.delete(Y.key===null?D:Y.key),T=s(Y,T,D),S===null?M=Y:S.sibling=Y,S=Y);return e&&O.forEach(function(z){return t(E,z)}),Ve&&Nr(E,D),M}function x(E,T,k,L){var M=Yi(k);if(typeof M!="function")throw Error(G(150));if(k=M.call(k),k==null)throw Error(G(151));for(var S=M=null,O=T,D=T=0,Y=null,w=k.next();O!==null&&!w.done;D++,w=k.next()){O.index>D?(Y=O,O=null):Y=O.sibling;var z=m(E,O,w.value,L);if(z===null){O===null&&(O=Y);break}e&&O&&z.alternate===null&&t(E,O),T=s(z,T,D),S===null?M=z:S.sibling=z,S=z,O=Y}if(w.done)return n(E,O),Ve&&Nr(E,D),M;if(O===null){for(;!w.done;D++,w=k.next())w=h(E,w.value,L),w!==null&&(T=s(w,T,D),S===null?M=w:S.sibling=w,S=w);return Ve&&Nr(E,D),M}for(O=r(E,O);!w.done;D++,w=k.next())w=p(O,E,D,w.value,L),w!==null&&(e&&w.alternate!==null&&O.delete(w.key===null?D:w.key),T=s(w,T,D),S===null?M=w:S.sibling=w,S=w);return e&&O.forEach(function(K){return t(E,K)}),Ve&&Nr(E,D),M}function A(E,T,k,L){if(typeof k=="object"&&k!==null&&k.type===si&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case ma:e:{for(var M=k.key,S=T;S!==null;){if(S.key===M){if(M=k.type,M===si){if(S.tag===7){n(E,S.sibling),T=i(S,k.props.children),T.return=E,E=T;break e}}else if(S.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===tr&&$f(M)===S.type){n(E,S.sibling),T=i(S,k.props),T.ref=Qi(E,S,k),T.return=E,E=T;break e}n(E,S);break}else t(E,S);S=S.sibling}k.type===si?(T=Pr(k.props.children,E.mode,L,k.key),T.return=E,E=T):(L=Ga(k.type,k.key,k.props,null,E.mode,L),L.ref=Qi(E,T,k),L.return=E,E=L)}return a(E);case ii:e:{for(S=k.key;T!==null;){if(T.key===S)if(T.tag===4&&T.stateNode.containerInfo===k.containerInfo&&T.stateNode.implementation===k.implementation){n(E,T.sibling),T=i(T,k.children||[]),T.return=E,E=T;break e}else{n(E,T);break}else t(E,T);T=T.sibling}T=Gl(k,E.mode,L),T.return=E,E=T}return a(E);case tr:return S=k._init,A(E,T,S(k._payload),L)}if(ss(k))return g(E,T,k,L);if(Yi(k))return x(E,T,k,L);Ca(E,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,T!==null&&T.tag===6?(n(E,T.sibling),T=i(T,k),T.return=E,E=T):(n(E,T),T=ql(k,E.mode,L),T.return=E,E=T),a(E)):n(E,T)}return A}var vi=ap(!0),up=ap(!1),pu=xr(null),gu=null,hi=null,Zc=null;function ed(){Zc=hi=gu=null}function td(e){var t=pu.current;ze(pu),e._currentValue=t}function Go(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function bi(e,t){gu=e,Zc=hi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Bt=!0),e.firstContext=null)}function on(e){var t=e._currentValue;if(Zc!==e)if(e={context:e,memoizedValue:t,next:null},hi===null){if(gu===null)throw Error(G(308));hi=e,gu.dependencies={lanes:0,firstContext:e}}else hi=hi.next=e;return t}var Ir=null;function nd(e){Ir===null?Ir=[e]:Ir.push(e)}function lp(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,nd(t)):(n.next=i.next,i.next=n),t.interleaved=n,Vn(e,r)}function Vn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var nr=!1;function rd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function op(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,we&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Vn(e,n)}return i=r.interleaved,i===null?(t.next=t,nd(r)):(t.next=i.next,i.next=t),r.interleaved=t,Vn(e,n)}function za(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zc(e,n)}}function Yf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Eu(e,t,n,r){var i=e.updateQueue;nr=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var o=u,c=o.next;o.next=null,a===null?s=c:a.next=c,a=o;var f=e.alternate;f!==null&&(f=f.updateQueue,u=f.lastBaseUpdate,u!==a&&(u===null?f.firstBaseUpdate=c:u.next=c,f.lastBaseUpdate=o))}if(s!==null){var h=i.baseState;a=0,f=c=o=null,u=s;do{var m=u.lane,p=u.eventTime;if((r&m)===m){f!==null&&(f=f.next={eventTime:p,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var g=e,x=u;switch(m=t,p=n,x.tag){case 1:if(g=x.payload,typeof g=="function"){h=g.call(p,h,m);break e}h=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=x.payload,m=typeof g=="function"?g.call(p,h,m):g,m==null)break e;h=Ge({},h,m);break e;case 2:nr=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,m=i.effects,m===null?i.effects=[u]:m.push(u))}else p={eventTime:p,lane:m,tag:u.tag,payload:u.payload,callback:u.callback,next:null},f===null?(c=f=p,o=h):f=f.next=p,a|=m;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;m=u,u=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(!0);if(f===null&&(o=h),i.baseState=o,i.firstBaseUpdate=c,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Ur|=a,e.lanes=a,e.memoizedState=h}}function Vf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(G(191,i));i.call(r)}}}var na={},Dn=xr(na),Hs=xr(na),zs=xr(na);function Lr(e){if(e===na)throw Error(G(174));return e}function id(e,t){switch(Be(zs,t),Be(Hs,e),Be(Dn,na),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ao(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ao(t,e)}ze(Dn),Be(Dn,t)}function Ai(){ze(Dn),ze(Hs),ze(zs)}function cp(e){Lr(zs.current);var t=Lr(Dn.current),n=Ao(t,e.type);t!==n&&(Be(Hs,e),Be(Dn,n))}function sd(e){Hs.current===e&&(ze(Dn),ze(Hs))}var We=xr(0);function Tu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hl=[];function ad(){for(var e=0;e<Hl.length;e++)Hl[e]._workInProgressVersionPrimary=null;Hl.length=0}var $a=qn.ReactCurrentDispatcher,zl=qn.ReactCurrentBatchConfig,Br=0,qe=null,tt=null,at=null,yu=!1,ps=!1,$s=0,DT=0;function xt(){throw Error(G(321))}function ud(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xn(e[n],t[n]))return!1;return!0}function ld(e,t,n,r,i,s){if(Br=s,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,$a.current=e===null||e.memoizedState===null?MT:jT,e=n(r,i),ps){s=0;do{if(ps=!1,$s=0,25<=s)throw Error(G(301));s+=1,at=tt=null,t.updateQueue=null,$a.current=FT,e=n(r,i)}while(ps)}if($a.current=xu,t=tt!==null&&tt.next!==null,Br=0,at=tt=qe=null,yu=!1,t)throw Error(G(300));return e}function od(){var e=$s!==0;return $s=0,e}function Nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?qe.memoizedState=at=e:at=at.next=e,at}function cn(){if(tt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=at===null?qe.memoizedState:at.next;if(t!==null)at=t,tt=e;else{if(e===null)throw Error(G(310));tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},at===null?qe.memoizedState=at=e:at=at.next=e}return at}function Ys(e,t){return typeof t=="function"?t(e):t}function $l(e){var t=cn(),n=t.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=e;var r=tt,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var u=a=null,o=null,c=s;do{var f=c.lane;if((Br&f)===f)o!==null&&(o=o.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var h={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};o===null?(u=o=h,a=r):o=o.next=h,qe.lanes|=f,Ur|=f}c=c.next}while(c!==null&&c!==s);o===null?a=r:o.next=u,xn(r,t.memoizedState)||(Bt=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=o,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,qe.lanes|=s,Ur|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Yl(e){var t=cn(),n=t.queue;if(n===null)throw Error(G(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);xn(s,t.memoizedState)||(Bt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function dp(){}function fp(e,t){var n=qe,r=cn(),i=t(),s=!xn(r.memoizedState,i);if(s&&(r.memoizedState=i,Bt=!0),r=r.queue,cd(pp.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||at!==null&&at.memoizedState.tag&1){if(n.flags|=2048,Vs(9,mp.bind(null,n,r,i,t),void 0,null),lt===null)throw Error(G(349));Br&30||hp(n,t,i)}return i}function hp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=qe.updateQueue,t===null?(t={lastEffect:null,stores:null},qe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function mp(e,t,n,r){t.value=n,t.getSnapshot=r,gp(t)&&Ep(e)}function pp(e,t,n){return n(function(){gp(t)&&Ep(e)})}function gp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xn(e,n)}catch{return!0}}function Ep(e){var t=Vn(e,1);t!==null&&Tn(t,e,1,-1)}function Wf(e){var t=Nn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ys,lastRenderedState:e},t.queue=e,e=e.dispatch=PT.bind(null,qe,e),[t.memoizedState,e]}function Vs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=qe.updateQueue,t===null?(t={lastEffect:null,stores:null},qe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Tp(){return cn().memoizedState}function Ya(e,t,n,r){var i=Nn();qe.flags|=e,i.memoizedState=Vs(1|t,n,void 0,r===void 0?null:r)}function Wu(e,t,n,r){var i=cn();r=r===void 0?null:r;var s=void 0;if(tt!==null){var a=tt.memoizedState;if(s=a.destroy,r!==null&&ud(r,a.deps)){i.memoizedState=Vs(t,n,s,r);return}}qe.flags|=e,i.memoizedState=Vs(1|t,n,s,r)}function qf(e,t){return Ya(8390656,8,e,t)}function cd(e,t){return Wu(2048,8,e,t)}function yp(e,t){return Wu(4,2,e,t)}function xp(e,t){return Wu(4,4,e,t)}function bp(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _p(e,t,n){return n=n!=null?n.concat([e]):null,Wu(4,4,bp.bind(null,t,e),n)}function dd(){}function kp(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ud(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Sp(e,t){var n=cn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ud(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Cp(e,t,n){return Br&21?(xn(n,t)||(n=I0(),qe.lanes|=n,Ur|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Bt=!0),e.memoizedState=n)}function RT(e,t){var n=De;De=n!==0&&4>n?n:4,e(!0);var r=zl.transition;zl.transition={};try{e(!1),t()}finally{De=n,zl.transition=r}}function Np(){return cn().memoizedState}function OT(e,t,n){var r=mr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},vp(e))Ap(t,n);else if(n=lp(e,t,n,r),n!==null){var i=It();Tn(n,e,r,i),wp(n,t,r)}}function PT(e,t,n){var r=mr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(vp(e))Ap(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,u=s(a,n);if(i.hasEagerState=!0,i.eagerState=u,xn(u,a)){var o=t.interleaved;o===null?(i.next=i,nd(t)):(i.next=o.next,o.next=i),t.interleaved=i;return}}catch{}finally{}n=lp(e,t,i,r),n!==null&&(i=It(),Tn(n,e,r,i),wp(n,t,r))}}function vp(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function Ap(e,t){ps=yu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zc(e,n)}}var xu={readContext:on,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useInsertionEffect:xt,useLayoutEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useMutableSource:xt,useSyncExternalStore:xt,useId:xt,unstable_isNewReconciler:!1},MT={readContext:on,useCallback:function(e,t){return Nn().memoizedState=[e,t===void 0?null:t],e},useContext:on,useEffect:qf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ya(4194308,4,bp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ya(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ya(4,2,e,t)},useMemo:function(e,t){var n=Nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Nn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=OT.bind(null,qe,e),[r.memoizedState,e]},useRef:function(e){var t=Nn();return e={current:e},t.memoizedState=e},useState:Wf,useDebugValue:dd,useDeferredValue:function(e){return Nn().memoizedState=e},useTransition:function(){var e=Wf(!1),t=e[0];return e=RT.bind(null,e[1]),Nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=qe,i=Nn();if(Ve){if(n===void 0)throw Error(G(407));n=n()}else{if(n=t(),lt===null)throw Error(G(349));Br&30||hp(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,qf(pp.bind(null,r,s,e),[e]),r.flags|=2048,Vs(9,mp.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Nn(),t=lt.identifierPrefix;if(Ve){var n=Un,r=Bn;n=(r&~(1<<32-En(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=$s++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=DT++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},jT={readContext:on,useCallback:kp,useContext:on,useEffect:cd,useImperativeHandle:_p,useInsertionEffect:yp,useLayoutEffect:xp,useMemo:Sp,useReducer:$l,useRef:Tp,useState:function(){return $l(Ys)},useDebugValue:dd,useDeferredValue:function(e){var t=cn();return Cp(t,tt.memoizedState,e)},useTransition:function(){var e=$l(Ys)[0],t=cn().memoizedState;return[e,t]},useMutableSource:dp,useSyncExternalStore:fp,useId:Np,unstable_isNewReconciler:!1},FT={readContext:on,useCallback:kp,useContext:on,useEffect:cd,useImperativeHandle:_p,useInsertionEffect:yp,useLayoutEffect:xp,useMemo:Sp,useReducer:Yl,useRef:Tp,useState:function(){return Yl(Ys)},useDebugValue:dd,useDeferredValue:function(e){var t=cn();return tt===null?t.memoizedState=e:Cp(t,tt.memoizedState,e)},useTransition:function(){var e=Yl(Ys)[0],t=cn().memoizedState;return[e,t]},useMutableSource:dp,useSyncExternalStore:fp,useId:Np,unstable_isNewReconciler:!1};function mn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Qo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qu={isMounted:function(e){return(e=e._reactInternals)?Wr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=It(),i=mr(e),s=zn(r,i);s.payload=t,n!=null&&(s.callback=n),t=fr(e,s,i),t!==null&&(Tn(t,e,i,r),za(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=It(),i=mr(e),s=zn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=fr(e,s,i),t!==null&&(Tn(t,e,i,r),za(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=It(),r=mr(e),i=zn(n,r);i.tag=2,t!=null&&(i.callback=t),t=fr(e,i,r),t!==null&&(Tn(t,e,r,n),za(t,e,r))}};function Gf(e,t,n,r,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,a):t.prototype&&t.prototype.isPureReactComponent?!js(n,r)||!js(i,s):!0}function Ip(e,t,n){var r=!1,i=Er,s=t.contextType;return typeof s=="object"&&s!==null?s=on(s):(i=Ht(t)?jr:Ct.current,r=t.contextTypes,s=(r=r!=null)?Ci(e,i):Er),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=qu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Qf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qu.enqueueReplaceState(t,t.state,null)}function Ko(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},rd(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=on(s):(s=Ht(t)?jr:Ct.current,i.context=Ci(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Qo(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&qu.enqueueReplaceState(i,i.state,null),Eu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function wi(e,t){try{var n="",r=t;do n+=f2(r),r=r.return;while(r);var i=n}catch(s){i=`
|
|
39
|
+
Error generating stack: `+s.message+`
|
|
40
|
+
`+s.stack}return{value:e,source:t,stack:i,digest:null}}function Vl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Xo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var BT=typeof WeakMap=="function"?WeakMap:Map;function Lp(e,t,n){n=zn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_u||(_u=!0,uc=r),Xo(e,t)},n}function Dp(e,t,n){n=zn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Xo(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Xo(e,t),typeof r!="function"&&(hr===null?hr=new Set([this]):hr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Kf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new BT;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ZT.bind(null,e,t,n),t.then(e,e))}function Xf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Jf(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=zn(-1,1),t.tag=2,fr(n,t,1))),n.lanes|=1),e)}var UT=qn.ReactCurrentOwner,Bt=!1;function At(e,t,n,r){t.child=e===null?up(t,null,n,r):vi(t,e.child,n,r)}function Zf(e,t,n,r,i){n=n.render;var s=t.ref;return bi(t,i),r=ld(e,t,n,r,s,i),n=od(),e!==null&&!Bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wn(e,t,i)):(Ve&&n&&Kc(t),t.flags|=1,At(e,t,r,i),t.child)}function eh(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!yd(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Rp(e,t,s,r,i)):(e=Ga(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:js,n(a,r)&&e.ref===t.ref)return Wn(e,t,i)}return t.flags|=1,e=pr(s,r),e.ref=t.ref,e.return=t,t.child=e}function Rp(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(js(s,r)&&e.ref===t.ref)if(Bt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Bt=!0);else return t.lanes=e.lanes,Wn(e,t,i)}return Jo(e,t,n,r,i)}function Op(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Be(pi,Qt),Qt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Be(pi,Qt),Qt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Be(pi,Qt),Qt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Be(pi,Qt),Qt|=r;return At(e,t,i,n),t.child}function Pp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Jo(e,t,n,r,i){var s=Ht(n)?jr:Ct.current;return s=Ci(t,s),bi(t,i),n=ld(e,t,n,r,s,i),r=od(),e!==null&&!Bt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wn(e,t,i)):(Ve&&r&&Kc(t),t.flags|=1,At(e,t,n,i),t.child)}function th(e,t,n,r,i){if(Ht(n)){var s=!0;fu(t)}else s=!1;if(bi(t,i),t.stateNode===null)Va(e,t),Ip(t,n,r),Ko(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,u=t.memoizedProps;a.props=u;var o=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=on(c):(c=Ht(n)?jr:Ct.current,c=Ci(t,c));var f=n.getDerivedStateFromProps,h=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";h||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==r||o!==c)&&Qf(t,a,r,c),nr=!1;var m=t.memoizedState;a.state=m,Eu(t,r,a,i),o=t.memoizedState,u!==r||m!==o||Ut.current||nr?(typeof f=="function"&&(Qo(t,n,f,r),o=t.memoizedState),(u=nr||Gf(t,n,u,r,m,o,c))?(h||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=o),a.props=r,a.state=o,a.context=c,r=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,op(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:mn(t.type,u),a.props=c,h=t.pendingProps,m=a.context,o=n.contextType,typeof o=="object"&&o!==null?o=on(o):(o=Ht(n)?jr:Ct.current,o=Ci(t,o));var p=n.getDerivedStateFromProps;(f=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==h||m!==o)&&Qf(t,a,r,o),nr=!1,m=t.memoizedState,a.state=m,Eu(t,r,a,i);var g=t.memoizedState;u!==h||m!==g||Ut.current||nr?(typeof p=="function"&&(Qo(t,n,p,r),g=t.memoizedState),(c=nr||Gf(t,n,c,r,m,g,o)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,g,o),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,g,o)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),a.props=r,a.state=g,a.context=o,r=c):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return Zo(e,t,n,r,s,i)}function Zo(e,t,n,r,i,s){Pp(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Uf(t,n,!1),Wn(e,t,s);r=t.stateNode,UT.current=t;var u=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=vi(t,e.child,null,s),t.child=vi(t,null,u,s)):At(e,t,u,s),t.memoizedState=r.state,i&&Uf(t,n,!0),t.child}function Mp(e){var t=e.stateNode;t.pendingContext?Bf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Bf(e,t.context,!1),id(e,t.containerInfo)}function nh(e,t,n,r,i){return Ni(),Jc(i),t.flags|=256,At(e,t,n,r),t.child}var ec={dehydrated:null,treeContext:null,retryLane:0};function tc(e){return{baseLanes:e,cachePool:null,transitions:null}}function jp(e,t,n){var r=t.pendingProps,i=We.current,s=!1,a=(t.flags&128)!==0,u;if((u=a)||(u=e!==null&&e.memoizedState===null?!1:(i&2)!==0),u?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Be(We,i&1),e===null)return qo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,s?(r=t.mode,s=t.child,a={mode:"hidden",children:a},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=Ku(a,r,0,null),e=Pr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=tc(n),t.memoizedState=ec,e):fd(t,a));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return HT(e,t,a,r,u,i,n);if(s){s=r.fallback,a=t.mode,i=e.child,u=i.sibling;var o={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=o,t.deletions=null):(r=pr(i,o),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?s=pr(u,s):(s=Pr(s,a,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,a=e.child.memoizedState,a=a===null?tc(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=ec,r}return s=e.child,e=s.sibling,r=pr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function fd(e,t){return t=Ku({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Na(e,t,n,r){return r!==null&&Jc(r),vi(t,e.child,null,n),e=fd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function HT(e,t,n,r,i,s,a){if(n)return t.flags&256?(t.flags&=-257,r=Vl(Error(G(422))),Na(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Ku({mode:"visible",children:r.children},i,0,null),s=Pr(s,i,a,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&vi(t,e.child,null,a),t.child.memoizedState=tc(a),t.memoizedState=ec,s);if(!(t.mode&1))return Na(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,s=Error(G(419)),r=Vl(s,r,void 0),Na(e,t,a,r)}if(u=(a&e.childLanes)!==0,Bt||u){if(r=lt,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Vn(e,i),Tn(r,e,i,-1))}return Td(),r=Vl(Error(G(421))),Na(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ey.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Kt=dr(i.nextSibling),Xt=t,Ve=!0,gn=null,e!==null&&(nn[rn++]=Bn,nn[rn++]=Un,nn[rn++]=Fr,Bn=e.id,Un=e.overflow,Fr=t),t=fd(t,r.children),t.flags|=4096,t)}function rh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Go(e.return,t,n)}function Wl(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Fp(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(At(e,t,r.children,n),r=We.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rh(e,n,t);else if(e.tag===19)rh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Be(We,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Tu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Wl(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Tu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Wl(t,!0,n,null,s);break;case"together":Wl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Va(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ur|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(G(153));if(t.child!==null){for(e=t.child,n=pr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function zT(e,t,n){switch(t.tag){case 3:Mp(t),Ni();break;case 5:cp(t);break;case 1:Ht(t.type)&&fu(t);break;case 4:id(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Be(pu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Be(We,We.current&1),t.flags|=128,null):n&t.child.childLanes?jp(e,t,n):(Be(We,We.current&1),e=Wn(e,t,n),e!==null?e.sibling:null);Be(We,We.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Fp(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Be(We,We.current),r)break;return null;case 22:case 23:return t.lanes=0,Op(e,t,n)}return Wn(e,t,n)}var Bp,nc,Up,Hp;Bp=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};nc=function(){};Up=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Lr(Dn.current);var s=null;switch(n){case"input":i=So(e,i),r=So(e,r),s=[];break;case"select":i=Ge({},i,{value:void 0}),r=Ge({},r,{value:void 0}),s=[];break;case"textarea":i=vo(e,i),r=vo(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=cu)}wo(n,r);var a;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var u=i[c];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Is.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var o=r[c];if(u=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&o!==u&&(o!=null||u!=null))if(c==="style")if(u){for(a in u)!u.hasOwnProperty(a)||o&&o.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in o)o.hasOwnProperty(a)&&u[a]!==o[a]&&(n||(n={}),n[a]=o[a])}else n||(s||(s=[]),s.push(c,n)),n=o;else c==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,u=u?u.__html:void 0,o!=null&&u!==o&&(s=s||[]).push(c,o)):c==="children"?typeof o!="string"&&typeof o!="number"||(s=s||[]).push(c,""+o):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Is.hasOwnProperty(c)?(o!=null&&c==="onScroll"&&He("scroll",e),s||u===o||(s=[])):(s=s||[]).push(c,o))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};Hp=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ki(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function $T(e,t,n){var r=t.pendingProps;switch(Xc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bt(t),null;case 1:return Ht(t.type)&&du(),bt(t),null;case 3:return r=t.stateNode,Ai(),ze(Ut),ze(Ct),ad(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Sa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,gn!==null&&(cc(gn),gn=null))),nc(e,t),bt(t),null;case 5:sd(t);var i=Lr(zs.current);if(n=t.type,e!==null&&t.stateNode!=null)Up(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(G(166));return bt(t),null}if(e=Lr(Dn.current),Sa(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[wn]=t,r[Us]=s,e=(t.mode&1)!==0,n){case"dialog":He("cancel",r),He("close",r);break;case"iframe":case"object":case"embed":He("load",r);break;case"video":case"audio":for(i=0;i<us.length;i++)He(us[i],r);break;case"source":He("error",r);break;case"img":case"image":case"link":He("error",r),He("load",r);break;case"details":He("toggle",r);break;case"input":ff(r,s),He("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},He("invalid",r);break;case"textarea":mf(r,s),He("invalid",r)}wo(n,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var u=s[a];a==="children"?typeof u=="string"?r.textContent!==u&&(s.suppressHydrationWarning!==!0&&ka(r.textContent,u,e),i=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(s.suppressHydrationWarning!==!0&&ka(r.textContent,u,e),i=["children",""+u]):Is.hasOwnProperty(a)&&u!=null&&a==="onScroll"&&He("scroll",r)}switch(n){case"input":pa(r),hf(r,s,!0);break;case"textarea":pa(r),pf(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=cu)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=p0(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[wn]=t,e[Us]=r,Bp(e,t,!1,!1),t.stateNode=e;e:{switch(a=Io(n,r),n){case"dialog":He("cancel",e),He("close",e),i=r;break;case"iframe":case"object":case"embed":He("load",e),i=r;break;case"video":case"audio":for(i=0;i<us.length;i++)He(us[i],e);i=r;break;case"source":He("error",e),i=r;break;case"img":case"image":case"link":He("error",e),He("load",e),i=r;break;case"details":He("toggle",e),i=r;break;case"input":ff(e,r),i=So(e,r),He("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ge({},r,{value:void 0}),He("invalid",e);break;case"textarea":mf(e,r),i=vo(e,r),He("invalid",e);break;default:i=r}wo(n,i),u=i;for(s in u)if(u.hasOwnProperty(s)){var o=u[s];s==="style"?T0(e,o):s==="dangerouslySetInnerHTML"?(o=o?o.__html:void 0,o!=null&&g0(e,o)):s==="children"?typeof o=="string"?(n!=="textarea"||o!=="")&&Ls(e,o):typeof o=="number"&&Ls(e,""+o):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Is.hasOwnProperty(s)?o!=null&&s==="onScroll"&&He("scroll",e):o!=null&&Mc(e,s,o,a))}switch(n){case"input":pa(e),hf(e,r,!1);break;case"textarea":pa(e),pf(e);break;case"option":r.value!=null&&e.setAttribute("value",""+gr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Ei(e,!!r.multiple,s,!1):r.defaultValue!=null&&Ei(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=cu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return bt(t),null;case 6:if(e&&t.stateNode!=null)Hp(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(G(166));if(n=Lr(zs.current),Lr(Dn.current),Sa(t)){if(r=t.stateNode,n=t.memoizedProps,r[wn]=t,(s=r.nodeValue!==n)&&(e=Xt,e!==null))switch(e.tag){case 3:ka(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ka(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[wn]=t,t.stateNode=r}return bt(t),null;case 13:if(ze(We),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ve&&Kt!==null&&t.mode&1&&!(t.flags&128))sp(),Ni(),t.flags|=98560,s=!1;else if(s=Sa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(G(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(G(317));s[wn]=t}else Ni(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;bt(t),s=!1}else gn!==null&&(cc(gn),gn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||We.current&1?nt===0&&(nt=3):Td())),t.updateQueue!==null&&(t.flags|=4),bt(t),null);case 4:return Ai(),nc(e,t),e===null&&Fs(t.stateNode.containerInfo),bt(t),null;case 10:return td(t.type._context),bt(t),null;case 17:return Ht(t.type)&&du(),bt(t),null;case 19:if(ze(We),s=t.memoizedState,s===null)return bt(t),null;if(r=(t.flags&128)!==0,a=s.rendering,a===null)if(r)Ki(s,!1);else{if(nt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Tu(e),a!==null){for(t.flags|=128,Ki(s,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Be(We,We.current&1|2),t.child}e=e.sibling}s.tail!==null&&Xe()>Ii&&(t.flags|=128,r=!0,Ki(s,!1),t.lanes=4194304)}else{if(!r)if(e=Tu(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ki(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!Ve)return bt(t),null}else 2*Xe()-s.renderingStartTime>Ii&&n!==1073741824&&(t.flags|=128,r=!0,Ki(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(n=s.last,n!==null?n.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Xe(),t.sibling=null,n=We.current,Be(We,r?n&1|2:n&1),t):(bt(t),null);case 22:case 23:return Ed(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Qt&1073741824&&(bt(t),t.subtreeFlags&6&&(t.flags|=8192)):bt(t),null;case 24:return null;case 25:return null}throw Error(G(156,t.tag))}function YT(e,t){switch(Xc(t),t.tag){case 1:return Ht(t.type)&&du(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ai(),ze(Ut),ze(Ct),ad(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sd(t),null;case 13:if(ze(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));Ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(We),null;case 4:return Ai(),null;case 10:return td(t.type._context),null;case 22:case 23:return Ed(),null;case 24:return null;default:return null}}var va=!1,_t=!1,VT=typeof WeakSet=="function"?WeakSet:Set,ie=null;function mi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qe(e,t,r)}else n.current=null}function rc(e,t,n){try{n()}catch(r){Qe(e,t,r)}}var ih=!1;function WT(e,t){if(Uo=uu,e=W0(),Qc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,u=-1,o=-1,c=0,f=0,h=e,m=null;t:for(;;){for(var p;h!==n||i!==0&&h.nodeType!==3||(u=a+i),h!==s||r!==0&&h.nodeType!==3||(o=a+r),h.nodeType===3&&(a+=h.nodeValue.length),(p=h.firstChild)!==null;)m=h,h=p;for(;;){if(h===e)break t;if(m===n&&++c===i&&(u=a),m===s&&++f===r&&(o=a),(p=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=p}n=u===-1||o===-1?null:{start:u,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ho={focusedElem:e,selectionRange:n},uu=!1,ie=t;ie!==null;)if(t=ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ie=e;else for(;ie!==null;){t=ie;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var x=g.memoizedProps,A=g.memoizedState,E=t.stateNode,T=E.getSnapshotBeforeUpdate(t.elementType===t.type?x:mn(t.type,x),A);E.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var k=t.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(G(163))}}catch(L){Qe(t,t.return,L)}if(e=t.sibling,e!==null){e.return=t.return,ie=e;break}ie=t.return}return g=ih,ih=!1,g}function gs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&rc(t,n,s)}i=i.next}while(i!==r)}}function Gu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ic(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function zp(e){var t=e.alternate;t!==null&&(e.alternate=null,zp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wn],delete t[Us],delete t[Yo],delete t[AT],delete t[wT])),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 $p(e){return e.tag===5||e.tag===3||e.tag===4}function sh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$p(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 sc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cu));else if(r!==4&&(e=e.child,e!==null))for(sc(e,t,n),e=e.sibling;e!==null;)sc(e,t,n),e=e.sibling}function ac(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ac(e,t,n),e=e.sibling;e!==null;)ac(e,t,n),e=e.sibling}var ft=null,pn=!1;function Qn(e,t,n){for(n=n.child;n!==null;)Yp(e,t,n),n=n.sibling}function Yp(e,t,n){if(Ln&&typeof Ln.onCommitFiberUnmount=="function")try{Ln.onCommitFiberUnmount(Uu,n)}catch{}switch(n.tag){case 5:_t||mi(n,t);case 6:var r=ft,i=pn;ft=null,Qn(e,t,n),ft=r,pn=i,ft!==null&&(pn?(e=ft,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ft.removeChild(n.stateNode));break;case 18:ft!==null&&(pn?(e=ft,n=n.stateNode,e.nodeType===8?Bl(e.parentNode,n):e.nodeType===1&&Bl(e,n),Ps(e)):Bl(ft,n.stateNode));break;case 4:r=ft,i=pn,ft=n.stateNode.containerInfo,pn=!0,Qn(e,t,n),ft=r,pn=i;break;case 0:case 11:case 14:case 15:if(!_t&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&rc(n,t,a),i=i.next}while(i!==r)}Qn(e,t,n);break;case 1:if(!_t&&(mi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Qe(n,t,u)}Qn(e,t,n);break;case 21:Qn(e,t,n);break;case 22:n.mode&1?(_t=(r=_t)||n.memoizedState!==null,Qn(e,t,n),_t=r):Qn(e,t,n);break;default:Qn(e,t,n)}}function ah(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new VT),t.forEach(function(r){var i=ty.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function fn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,a=t,u=a;e:for(;u!==null;){switch(u.tag){case 5:ft=u.stateNode,pn=!1;break e;case 3:ft=u.stateNode.containerInfo,pn=!0;break e;case 4:ft=u.stateNode.containerInfo,pn=!0;break e}u=u.return}if(ft===null)throw Error(G(160));Yp(s,a,i),ft=null,pn=!1;var o=i.alternate;o!==null&&(o.return=null),i.return=null}catch(c){Qe(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Vp(t,e),t=t.sibling}function Vp(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fn(t,e),Cn(e),r&4){try{gs(3,e,e.return),Gu(3,e)}catch(x){Qe(e,e.return,x)}try{gs(5,e,e.return)}catch(x){Qe(e,e.return,x)}}break;case 1:fn(t,e),Cn(e),r&512&&n!==null&&mi(n,n.return);break;case 5:if(fn(t,e),Cn(e),r&512&&n!==null&&mi(n,n.return),e.flags&32){var i=e.stateNode;try{Ls(i,"")}catch(x){Qe(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=n!==null?n.memoizedProps:s,u=e.type,o=e.updateQueue;if(e.updateQueue=null,o!==null)try{u==="input"&&s.type==="radio"&&s.name!=null&&h0(i,s),Io(u,a);var c=Io(u,s);for(a=0;a<o.length;a+=2){var f=o[a],h=o[a+1];f==="style"?T0(i,h):f==="dangerouslySetInnerHTML"?g0(i,h):f==="children"?Ls(i,h):Mc(i,f,h,c)}switch(u){case"input":Co(i,s);break;case"textarea":m0(i,s);break;case"select":var m=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Ei(i,!!s.multiple,p,!1):m!==!!s.multiple&&(s.defaultValue!=null?Ei(i,!!s.multiple,s.defaultValue,!0):Ei(i,!!s.multiple,s.multiple?[]:"",!1))}i[Us]=s}catch(x){Qe(e,e.return,x)}}break;case 6:if(fn(t,e),Cn(e),r&4){if(e.stateNode===null)throw Error(G(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){Qe(e,e.return,x)}}break;case 3:if(fn(t,e),Cn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ps(t.containerInfo)}catch(x){Qe(e,e.return,x)}break;case 4:fn(t,e),Cn(e);break;case 13:fn(t,e),Cn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(pd=Xe())),r&4&&ah(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(_t=(c=_t)||f,fn(t,e),_t=c):fn(t,e),Cn(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!f&&e.mode&1)for(ie=e,f=e.child;f!==null;){for(h=ie=f;ie!==null;){switch(m=ie,p=m.child,m.tag){case 0:case 11:case 14:case 15:gs(4,m,m.return);break;case 1:mi(m,m.return);var g=m.stateNode;if(typeof g.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(x){Qe(r,n,x)}}break;case 5:mi(m,m.return);break;case 22:if(m.memoizedState!==null){lh(h);continue}}p!==null?(p.return=m,ie=p):lh(h)}f=f.sibling}e:for(f=null,h=e;;){if(h.tag===5){if(f===null){f=h;try{i=h.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(u=h.stateNode,o=h.memoizedProps.style,a=o!=null&&o.hasOwnProperty("display")?o.display:null,u.style.display=E0("display",a))}catch(x){Qe(e,e.return,x)}}}else if(h.tag===6){if(f===null)try{h.stateNode.nodeValue=c?"":h.memoizedProps}catch(x){Qe(e,e.return,x)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;f===h&&(f=null),h=h.return}f===h&&(f=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:fn(t,e),Cn(e),r&4&&ah(e);break;case 21:break;default:fn(t,e),Cn(e)}}function Cn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if($p(n)){var r=n;break e}n=n.return}throw Error(G(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ls(i,""),r.flags&=-33);var s=sh(e);ac(e,s,i);break;case 3:case 4:var a=r.stateNode.containerInfo,u=sh(e);sc(e,u,a);break;default:throw Error(G(161))}}catch(o){Qe(e,e.return,o)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qT(e,t,n){ie=e,Wp(e)}function Wp(e,t,n){for(var r=(e.mode&1)!==0;ie!==null;){var i=ie,s=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||va;if(!a){var u=i.alternate,o=u!==null&&u.memoizedState!==null||_t;u=va;var c=_t;if(va=a,(_t=o)&&!c)for(ie=i;ie!==null;)a=ie,o=a.child,a.tag===22&&a.memoizedState!==null?oh(i):o!==null?(o.return=a,ie=o):oh(i);for(;s!==null;)ie=s,Wp(s),s=s.sibling;ie=i,va=u,_t=c}uh(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ie=s):uh(e)}}function uh(e){for(;ie!==null;){var t=ie;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:_t||Gu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!_t)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:mn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Vf(t,s,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Vf(t,a,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var o=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":o.autoFocus&&n.focus();break;case"img":o.src&&(n.src=o.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var f=c.memoizedState;if(f!==null){var h=f.dehydrated;h!==null&&Ps(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(G(163))}_t||t.flags&512&&ic(t)}catch(m){Qe(t,t.return,m)}}if(t===e){ie=null;break}if(n=t.sibling,n!==null){n.return=t.return,ie=n;break}ie=t.return}}function lh(e){for(;ie!==null;){var t=ie;if(t===e){ie=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ie=n;break}ie=t.return}}function oh(e){for(;ie!==null;){var t=ie;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Gu(4,t)}catch(o){Qe(t,n,o)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(o){Qe(t,i,o)}}var s=t.return;try{ic(t)}catch(o){Qe(t,s,o)}break;case 5:var a=t.return;try{ic(t)}catch(o){Qe(t,a,o)}}}catch(o){Qe(t,t.return,o)}if(t===e){ie=null;break}var u=t.sibling;if(u!==null){u.return=t.return,ie=u;break}ie=t.return}}var GT=Math.ceil,bu=qn.ReactCurrentDispatcher,hd=qn.ReactCurrentOwner,ln=qn.ReactCurrentBatchConfig,we=0,lt=null,et=null,mt=0,Qt=0,pi=xr(0),nt=0,Ws=null,Ur=0,Qu=0,md=0,Es=null,Ft=null,pd=0,Ii=1/0,Mn=null,_u=!1,uc=null,hr=null,Aa=!1,ar=null,ku=0,Ts=0,lc=null,Wa=-1,qa=0;function It(){return we&6?Xe():Wa!==-1?Wa:Wa=Xe()}function mr(e){return e.mode&1?we&2&&mt!==0?mt&-mt:LT.transition!==null?(qa===0&&(qa=I0()),qa):(e=De,e!==0||(e=window.event,e=e===void 0?16:j0(e.type)),e):1}function Tn(e,t,n,r){if(50<Ts)throw Ts=0,lc=null,Error(G(185));Zs(e,n,r),(!(we&2)||e!==lt)&&(e===lt&&(!(we&2)&&(Qu|=n),nt===4&&ir(e,mt)),zt(e,r),n===1&&we===0&&!(t.mode&1)&&(Ii=Xe()+500,Vu&&br()))}function zt(e,t){var n=e.callbackNode;L2(e,t);var r=au(e,e===lt?mt:0);if(r===0)n!==null&&Tf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Tf(n),t===1)e.tag===0?IT(ch.bind(null,e)):np(ch.bind(null,e)),NT(function(){!(we&6)&&br()}),n=null;else{switch(L0(r)){case 1:n=Hc;break;case 4:n=A0;break;case 16:n=su;break;case 536870912:n=w0;break;default:n=su}n=e1(n,qp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qp(e,t){if(Wa=-1,qa=0,we&6)throw Error(G(327));var n=e.callbackNode;if(_i()&&e.callbackNode!==n)return null;var r=au(e,e===lt?mt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Su(e,r);else{t=r;var i=we;we|=2;var s=Qp();(lt!==e||mt!==t)&&(Mn=null,Ii=Xe()+500,Or(e,t));do try{XT();break}catch(u){Gp(e,u)}while(!0);ed(),bu.current=s,we=i,et!==null?t=0:(lt=null,mt=0,t=nt)}if(t!==0){if(t===2&&(i=Po(e),i!==0&&(r=i,t=oc(e,i))),t===1)throw n=Ws,Or(e,0),ir(e,r),zt(e,Xe()),n;if(t===6)ir(e,r);else{if(i=e.current.alternate,!(r&30)&&!QT(i)&&(t=Su(e,r),t===2&&(s=Po(e),s!==0&&(r=s,t=oc(e,s))),t===1))throw n=Ws,Or(e,0),ir(e,r),zt(e,Xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(G(345));case 2:vr(e,Ft,Mn);break;case 3:if(ir(e,r),(r&130023424)===r&&(t=pd+500-Xe(),10<t)){if(au(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){It(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=$o(vr.bind(null,e,Ft,Mn),t);break}vr(e,Ft,Mn);break;case 4:if(ir(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-En(r);s=1<<a,a=t[a],a>i&&(i=a),r&=~s}if(r=i,r=Xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*GT(r/1960))-r,10<r){e.timeoutHandle=$o(vr.bind(null,e,Ft,Mn),r);break}vr(e,Ft,Mn);break;case 5:vr(e,Ft,Mn);break;default:throw Error(G(329))}}}return zt(e,Xe()),e.callbackNode===n?qp.bind(null,e):null}function oc(e,t){var n=Es;return e.current.memoizedState.isDehydrated&&(Or(e,t).flags|=256),e=Su(e,t),e!==2&&(t=Ft,Ft=n,t!==null&&cc(t)),e}function cc(e){Ft===null?Ft=e:Ft.push.apply(Ft,e)}function QT(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!xn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ir(e,t){for(t&=~md,t&=~Qu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-En(t),r=1<<n;e[n]=-1,t&=~r}}function ch(e){if(we&6)throw Error(G(327));_i();var t=au(e,0);if(!(t&1))return zt(e,Xe()),null;var n=Su(e,t);if(e.tag!==0&&n===2){var r=Po(e);r!==0&&(t=r,n=oc(e,r))}if(n===1)throw n=Ws,Or(e,0),ir(e,t),zt(e,Xe()),n;if(n===6)throw Error(G(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vr(e,Ft,Mn),zt(e,Xe()),null}function gd(e,t){var n=we;we|=1;try{return e(t)}finally{we=n,we===0&&(Ii=Xe()+500,Vu&&br())}}function Hr(e){ar!==null&&ar.tag===0&&!(we&6)&&_i();var t=we;we|=1;var n=ln.transition,r=De;try{if(ln.transition=null,De=1,e)return e()}finally{De=r,ln.transition=n,we=t,!(we&6)&&br()}}function Ed(){Qt=pi.current,ze(pi)}function Or(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,CT(n)),et!==null)for(n=et.return;n!==null;){var r=n;switch(Xc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&du();break;case 3:Ai(),ze(Ut),ze(Ct),ad();break;case 5:sd(r);break;case 4:Ai();break;case 13:ze(We);break;case 19:ze(We);break;case 10:td(r.type._context);break;case 22:case 23:Ed()}n=n.return}if(lt=e,et=e=pr(e.current,null),mt=Qt=t,nt=0,Ws=null,md=Qu=Ur=0,Ft=Es=null,Ir!==null){for(t=0;t<Ir.length;t++)if(n=Ir[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var a=s.next;s.next=i,r.next=a}n.pending=r}Ir=null}return e}function Gp(e,t){do{var n=et;try{if(ed(),$a.current=xu,yu){for(var r=qe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}yu=!1}if(Br=0,at=tt=qe=null,ps=!1,$s=0,hd.current=null,n===null||n.return===null){nt=1,Ws=t,et=null;break}e:{var s=e,a=n.return,u=n,o=t;if(t=mt,u.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){var c=o,f=u,h=f.tag;if(!(f.mode&1)&&(h===0||h===11||h===15)){var m=f.alternate;m?(f.updateQueue=m.updateQueue,f.memoizedState=m.memoizedState,f.lanes=m.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=Xf(a);if(p!==null){p.flags&=-257,Jf(p,a,u,s,t),p.mode&1&&Kf(s,c,t),t=p,o=c;var g=t.updateQueue;if(g===null){var x=new Set;x.add(o),t.updateQueue=x}else g.add(o);break e}else{if(!(t&1)){Kf(s,c,t),Td();break e}o=Error(G(426))}}else if(Ve&&u.mode&1){var A=Xf(a);if(A!==null){!(A.flags&65536)&&(A.flags|=256),Jf(A,a,u,s,t),Jc(wi(o,u));break e}}s=o=wi(o,u),nt!==4&&(nt=2),Es===null?Es=[s]:Es.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var E=Lp(s,o,t);Yf(s,E);break e;case 1:u=o;var T=s.type,k=s.stateNode;if(!(s.flags&128)&&(typeof T.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(hr===null||!hr.has(k)))){s.flags|=65536,t&=-t,s.lanes|=t;var L=Dp(s,u,t);Yf(s,L);break e}}s=s.return}while(s!==null)}Xp(n)}catch(M){t=M,et===n&&n!==null&&(et=n=n.return);continue}break}while(!0)}function Qp(){var e=bu.current;return bu.current=xu,e===null?xu:e}function Td(){(nt===0||nt===3||nt===2)&&(nt=4),lt===null||!(Ur&268435455)&&!(Qu&268435455)||ir(lt,mt)}function Su(e,t){var n=we;we|=2;var r=Qp();(lt!==e||mt!==t)&&(Mn=null,Or(e,t));do try{KT();break}catch(i){Gp(e,i)}while(!0);if(ed(),we=n,bu.current=r,et!==null)throw Error(G(261));return lt=null,mt=0,nt}function KT(){for(;et!==null;)Kp(et)}function XT(){for(;et!==null&&!_2();)Kp(et)}function Kp(e){var t=Zp(e.alternate,e,Qt);e.memoizedProps=e.pendingProps,t===null?Xp(e):et=t,hd.current=null}function Xp(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=YT(n,t),n!==null){n.flags&=32767,et=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{nt=6,et=null;return}}else if(n=$T(n,t,Qt),n!==null){et=n;return}if(t=t.sibling,t!==null){et=t;return}et=t=e}while(t!==null);nt===0&&(nt=5)}function vr(e,t,n){var r=De,i=ln.transition;try{ln.transition=null,De=1,JT(e,t,n,r)}finally{ln.transition=i,De=r}return null}function JT(e,t,n,r){do _i();while(ar!==null);if(we&6)throw Error(G(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(G(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(D2(e,s),e===lt&&(et=lt=null,mt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Aa||(Aa=!0,e1(su,function(){return _i(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=ln.transition,ln.transition=null;var a=De;De=1;var u=we;we|=4,hd.current=null,WT(e,n),Vp(n,e),TT(Ho),uu=!!Uo,Ho=Uo=null,e.current=n,qT(n),k2(),we=u,De=a,ln.transition=s}else e.current=n;if(Aa&&(Aa=!1,ar=e,ku=i),s=e.pendingLanes,s===0&&(hr=null),N2(n.stateNode),zt(e,Xe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(_u)throw _u=!1,e=uc,uc=null,e;return ku&1&&e.tag!==0&&_i(),s=e.pendingLanes,s&1?e===lc?Ts++:(Ts=0,lc=e):Ts=0,br(),null}function _i(){if(ar!==null){var e=L0(ku),t=ln.transition,n=De;try{if(ln.transition=null,De=16>e?16:e,ar===null)var r=!1;else{if(e=ar,ar=null,ku=0,we&6)throw Error(G(331));var i=we;for(we|=4,ie=e.current;ie!==null;){var s=ie,a=s.child;if(ie.flags&16){var u=s.deletions;if(u!==null){for(var o=0;o<u.length;o++){var c=u[o];for(ie=c;ie!==null;){var f=ie;switch(f.tag){case 0:case 11:case 15:gs(8,f,s)}var h=f.child;if(h!==null)h.return=f,ie=h;else for(;ie!==null;){f=ie;var m=f.sibling,p=f.return;if(zp(f),f===c){ie=null;break}if(m!==null){m.return=p,ie=m;break}ie=p}}}var g=s.alternate;if(g!==null){var x=g.child;if(x!==null){g.child=null;do{var A=x.sibling;x.sibling=null,x=A}while(x!==null)}}ie=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,ie=a;else e:for(;ie!==null;){if(s=ie,s.flags&2048)switch(s.tag){case 0:case 11:case 15:gs(9,s,s.return)}var E=s.sibling;if(E!==null){E.return=s.return,ie=E;break e}ie=s.return}}var T=e.current;for(ie=T;ie!==null;){a=ie;var k=a.child;if(a.subtreeFlags&2064&&k!==null)k.return=a,ie=k;else e:for(a=T;ie!==null;){if(u=ie,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Gu(9,u)}}catch(M){Qe(u,u.return,M)}if(u===a){ie=null;break e}var L=u.sibling;if(L!==null){L.return=u.return,ie=L;break e}ie=u.return}}if(we=i,br(),Ln&&typeof Ln.onPostCommitFiberRoot=="function")try{Ln.onPostCommitFiberRoot(Uu,e)}catch{}r=!0}return r}finally{De=n,ln.transition=t}}return!1}function dh(e,t,n){t=wi(n,t),t=Lp(e,t,1),e=fr(e,t,1),t=It(),e!==null&&(Zs(e,1,t),zt(e,t))}function Qe(e,t,n){if(e.tag===3)dh(e,e,n);else for(;t!==null;){if(t.tag===3){dh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(hr===null||!hr.has(r))){e=wi(n,e),e=Dp(t,e,1),t=fr(t,e,1),e=It(),t!==null&&(Zs(t,1,e),zt(t,e));break}}t=t.return}}function ZT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=It(),e.pingedLanes|=e.suspendedLanes&n,lt===e&&(mt&n)===n&&(nt===4||nt===3&&(mt&130023424)===mt&&500>Xe()-pd?Or(e,0):md|=n),zt(e,t)}function Jp(e,t){t===0&&(e.mode&1?(t=Ta,Ta<<=1,!(Ta&130023424)&&(Ta=4194304)):t=1);var n=It();e=Vn(e,t),e!==null&&(Zs(e,t,n),zt(e,n))}function ey(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jp(e,n)}function ty(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(G(314))}r!==null&&r.delete(t),Jp(e,n)}var Zp;Zp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ut.current)Bt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Bt=!1,zT(e,t,n);Bt=!!(e.flags&131072)}else Bt=!1,Ve&&t.flags&1048576&&rp(t,mu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Va(e,t),e=t.pendingProps;var i=Ci(t,Ct.current);bi(t,n),i=ld(null,t,r,e,i,n);var s=od();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ht(r)?(s=!0,fu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,rd(t),i.updater=qu,t.stateNode=i,i._reactInternals=t,Ko(t,r,e,n),t=Zo(null,t,r,!0,s,n)):(t.tag=0,Ve&&s&&Kc(t),At(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Va(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ry(r),e=mn(r,e),i){case 0:t=Jo(null,t,r,e,n);break e;case 1:t=th(null,t,r,e,n);break e;case 11:t=Zf(null,t,r,e,n);break e;case 14:t=eh(null,t,r,mn(r.type,e),n);break e}throw Error(G(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Jo(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),th(e,t,r,i,n);case 3:e:{if(Mp(t),e===null)throw Error(G(387));r=t.pendingProps,s=t.memoizedState,i=s.element,op(e,t),Eu(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=wi(Error(G(423)),t),t=nh(e,t,r,n,i);break e}else if(r!==i){i=wi(Error(G(424)),t),t=nh(e,t,r,n,i);break e}else for(Kt=dr(t.stateNode.containerInfo.firstChild),Xt=t,Ve=!0,gn=null,n=up(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ni(),r===i){t=Wn(e,t,n);break e}At(e,t,r,n)}t=t.child}return t;case 5:return cp(t),e===null&&qo(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,zo(r,i)?a=null:s!==null&&zo(r,s)&&(t.flags|=32),Pp(e,t),At(e,t,a,n),t.child;case 6:return e===null&&qo(t),null;case 13:return jp(e,t,n);case 4:return id(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=vi(t,null,r,n):At(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Zf(e,t,r,i,n);case 7:return At(e,t,t.pendingProps,n),t.child;case 8:return At(e,t,t.pendingProps.children,n),t.child;case 12:return At(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,Be(pu,r._currentValue),r._currentValue=a,s!==null)if(xn(s.value,a)){if(s.children===i.children&&!Ut.current){t=Wn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var u=s.dependencies;if(u!==null){a=s.child;for(var o=u.firstContext;o!==null;){if(o.context===r){if(s.tag===1){o=zn(-1,n&-n),o.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?o.next=o:(o.next=f.next,f.next=o),c.pending=o}}s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Go(s.return,n,t),u.lanes|=n;break}o=o.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(G(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Go(a,n,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}At(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,bi(t,n),i=on(i),r=r(i),t.flags|=1,At(e,t,r,n),t.child;case 14:return r=t.type,i=mn(r,t.pendingProps),i=mn(r.type,i),eh(e,t,r,i,n);case 15:return Rp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:mn(r,i),Va(e,t),t.tag=1,Ht(r)?(e=!0,fu(t)):e=!1,bi(t,n),Ip(t,r,i),Ko(t,r,i,n),Zo(null,t,r,!0,e,n);case 19:return Fp(e,t,n);case 22:return Op(e,t,n)}throw Error(G(156,t.tag))};function e1(e,t){return v0(e,t)}function ny(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(e,t,n,r){return new ny(e,t,n,r)}function yd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ry(e){if(typeof e=="function")return yd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fc)return 11;if(e===Bc)return 14}return 2}function pr(e,t){var n=e.alternate;return n===null?(n=un(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ga(e,t,n,r,i,s){var a=2;if(r=e,typeof e=="function")yd(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case si:return Pr(n.children,i,s,t);case jc:a=8,i|=8;break;case xo:return e=un(12,n,t,i|2),e.elementType=xo,e.lanes=s,e;case bo:return e=un(13,n,t,i),e.elementType=bo,e.lanes=s,e;case _o:return e=un(19,n,t,i),e.elementType=_o,e.lanes=s,e;case c0:return Ku(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l0:a=10;break e;case o0:a=9;break e;case Fc:a=11;break e;case Bc:a=14;break e;case tr:a=16,r=null;break e}throw Error(G(130,e==null?e:typeof e,""))}return t=un(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Pr(e,t,n,r){return e=un(7,e,r,t),e.lanes=n,e}function Ku(e,t,n,r){return e=un(22,e,r,t),e.elementType=c0,e.lanes=n,e.stateNode={isHidden:!1},e}function ql(e,t,n){return e=un(6,e,null,t),e.lanes=n,e}function Gl(e,t,n){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function iy(e,t,n,r,i){this.tag=t,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=Al(0),this.expirationTimes=Al(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Al(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function xd(e,t,n,r,i,s,a,u,o){return e=new iy(e,t,n,u,o),t===1?(t=1,s===!0&&(t|=8)):t=0,s=un(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rd(s),e}function sy(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ii,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function t1(e){if(!e)return Er;e=e._reactInternals;e:{if(Wr(e)!==e||e.tag!==1)throw Error(G(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ht(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(G(171))}if(e.tag===1){var n=e.type;if(Ht(n))return tp(e,n,t)}return t}function n1(e,t,n,r,i,s,a,u,o){return e=xd(n,r,!0,e,i,s,a,u,o),e.context=t1(null),n=e.current,r=It(),i=mr(n),s=zn(r,i),s.callback=t??null,fr(n,s,i),e.current.lanes=i,Zs(e,i,r),zt(e,r),e}function Xu(e,t,n,r){var i=t.current,s=It(),a=mr(i);return n=t1(n),t.context===null?t.context=n:t.pendingContext=n,t=zn(s,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=fr(i,t,a),e!==null&&(Tn(e,i,a,s),za(e,i,a)),a}function Cu(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 fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function bd(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function ay(){return null}var r1=typeof reportError=="function"?reportError:function(e){console.error(e)};function _d(e){this._internalRoot=e}Ju.prototype.render=_d.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));Xu(e,t,null,null)};Ju.prototype.unmount=_d.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Hr(function(){Xu(null,e,null,null)}),t[Yn]=null}};function Ju(e){this._internalRoot=e}Ju.prototype.unstable_scheduleHydration=function(e){if(e){var t=O0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<rr.length&&t!==0&&t<rr[n].priority;n++);rr.splice(n,0,e),n===0&&M0(e)}};function kd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Zu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function hh(){}function uy(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=Cu(a);s.call(c)}}var a=n1(t,r,e,0,null,!1,!1,"",hh);return e._reactRootContainer=a,e[Yn]=a.current,Fs(e.nodeType===8?e.parentNode:e),Hr(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var u=r;r=function(){var c=Cu(o);u.call(c)}}var o=xd(e,0,!1,null,null,!1,!1,"",hh);return e._reactRootContainer=o,e[Yn]=o.current,Fs(e.nodeType===8?e.parentNode:e),Hr(function(){Xu(t,o,n,r)}),o}function el(e,t,n,r,i){var s=n._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var u=i;i=function(){var o=Cu(a);u.call(o)}}Xu(t,a,e,i)}else a=uy(n,t,e,i,r);return Cu(a)}D0=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=as(t.pendingLanes);n!==0&&(zc(t,n|1),zt(t,Xe()),!(we&6)&&(Ii=Xe()+500,br()))}break;case 13:Hr(function(){var r=Vn(e,1);if(r!==null){var i=It();Tn(r,e,1,i)}}),bd(e,1)}};$c=function(e){if(e.tag===13){var t=Vn(e,134217728);if(t!==null){var n=It();Tn(t,e,134217728,n)}bd(e,134217728)}};R0=function(e){if(e.tag===13){var t=mr(e),n=Vn(e,t);if(n!==null){var r=It();Tn(n,e,t,r)}bd(e,t)}};O0=function(){return De};P0=function(e,t){var n=De;try{return De=e,t()}finally{De=n}};Do=function(e,t,n){switch(t){case"input":if(Co(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Yu(r);if(!i)throw Error(G(90));f0(r),Co(r,i)}}}break;case"textarea":m0(e,n);break;case"select":t=n.value,t!=null&&Ei(e,!!n.multiple,t,!1)}};b0=gd;_0=Hr;var ly={usingClientEntryPoint:!1,Events:[ta,oi,Yu,y0,x0,gd]},Xi={findFiberByHostInstance:wr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},oy={bundleType:Xi.bundleType,version:Xi.version,rendererPackageName:Xi.rendererPackageName,rendererConfig:Xi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=C0(e),e===null?null:e.stateNode},findFiberByHostInstance:Xi.findFiberByHostInstance||ay,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 wa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wa.isDisabled&&wa.supportsFiber)try{Uu=wa.inject(oy),Ln=wa}catch{}}en.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ly;en.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!kd(t))throw Error(G(200));return sy(e,t,null,n)};en.createRoot=function(e,t){if(!kd(e))throw Error(G(299));var n=!1,r="",i=r1;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=xd(e,1,!1,null,null,n,!1,r,i),e[Yn]=t.current,Fs(e.nodeType===8?e.parentNode:e),new _d(t)};en.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=C0(t),e=e===null?null:e.stateNode,e};en.flushSync=function(e){return Hr(e)};en.hydrate=function(e,t,n){if(!Zu(t))throw Error(G(200));return el(null,e,t,!0,n)};en.hydrateRoot=function(e,t,n){if(!kd(e))throw Error(G(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",a=r1;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=n1(t,null,e,1,n??null,i,!1,s,a),e[Yn]=t.current,Fs(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Ju(t)};en.render=function(e,t,n){if(!Zu(t))throw Error(G(200));return el(null,e,t,!1,n)};en.unmountComponentAtNode=function(e){if(!Zu(e))throw Error(G(40));return e._reactRootContainer?(Hr(function(){el(null,null,e,!1,function(){e._reactRootContainer=null,e[Yn]=null})}),!0):!1};en.unstable_batchedUpdates=gd;en.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zu(n))throw Error(G(200));if(e==null||e._reactInternals===void 0)throw Error(G(38));return el(e,t,n,!1,r)};en.version="18.3.1-next-f1338f8080-20240426";function i1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i1)}catch(e){console.error(e)}}i1(),i0.exports=en;var cy=i0.exports,mh=cy;To.createRoot=mh.createRoot,To.hydrateRoot=mh.hydrateRoot;/**
|
|
41
|
+
* @license lucide-react v0.312.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/var dy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
46
|
+
* @license lucide-react v0.312.0 - ISC
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the ISC license.
|
|
49
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/const fy=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),ae=(e,t)=>{const n=y.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:u="",children:o,...c},f)=>y.createElement("svg",{ref:f,...dy,width:i,height:i,stroke:r,strokeWidth:a?Number(s)*24/Number(i):s,className:["lucide",`lucide-${fy(e)}`,u].join(" "),...c},[...t.map(([h,m])=>y.createElement(h,m)),...Array.isArray(o)?o:[o]]));return n.displayName=`${e}`,n};/**
|
|
51
|
+
* @license lucide-react v0.312.0 - ISC
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the ISC license.
|
|
54
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/const Lt=ae("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
56
|
+
* @license lucide-react v0.312.0 - ISC
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the ISC license.
|
|
59
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/const Tr=ae("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
61
|
+
* @license lucide-react v0.312.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const hy=ae("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
66
|
+
* @license lucide-react v0.312.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const my=ae("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
71
|
+
* @license lucide-react v0.312.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const py=ae("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
76
|
+
* @license lucide-react v0.312.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const ph=ae("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
81
|
+
* @license lucide-react v0.312.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const ti=ae("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
|
|
86
|
+
* @license lucide-react v0.312.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const dc=ae("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
91
|
+
* @license lucide-react v0.312.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const gy=ae("Brain",[["path",{d:"M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 1.98-3A2.5 2.5 0 0 1 9.5 2Z",key:"1mhkh5"}],["path",{d:"M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-1.98-3A2.5 2.5 0 0 0 14.5 2Z",key:"1d6s00"}]]);/**
|
|
96
|
+
* @license lucide-react v0.312.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const Ey=ae("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
|
|
101
|
+
* @license lucide-react v0.312.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const zr=ae("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
106
|
+
* @license lucide-react v0.312.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const ra=ae("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
111
|
+
* @license lucide-react v0.312.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const tl=ae("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
116
|
+
* @license lucide-react v0.312.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const ia=ae("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
121
|
+
* @license lucide-react v0.312.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const Ty=ae("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
126
|
+
* @license lucide-react v0.312.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const s1=ae("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
131
|
+
* @license lucide-react v0.312.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const yy=ae("Code2",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
136
|
+
* @license lucide-react v0.312.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const xy=ae("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
141
|
+
* @license lucide-react v0.312.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const nl=ae("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
146
|
+
* @license lucide-react v0.312.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const by=ae("Cpu",[["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"9",y:"9",width:"6",height:"6",key:"o3kz5p"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
|
|
151
|
+
* @license lucide-react v0.312.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Ji=ae("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
156
|
+
* @license lucide-react v0.312.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const _y=ae("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
|
|
161
|
+
* @license lucide-react v0.312.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const $r=ae("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
166
|
+
* @license lucide-react v0.312.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const Qa=ae("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
171
|
+
* @license lucide-react v0.312.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const ky=ae("FilePen",[["path",{d:"M12 22h6a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v10",key:"x7tsz2"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10.4 12.6a2 2 0 1 1 3 3L8 21l-4 1 1-4Z",key:"o3xyfb"}]]);/**
|
|
176
|
+
* @license lucide-react v0.312.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const In=ae("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
181
|
+
* @license lucide-react v0.312.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const a1=ae("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
186
|
+
* @license lucide-react v0.312.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const Hn=ae("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
191
|
+
* @license lucide-react v0.312.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const gh=ae("FolderSearch",[["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.5-1.5",key:"3sg1j"}]]);/**
|
|
196
|
+
* @license lucide-react v0.312.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const u1=ae("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
201
|
+
* @license lucide-react v0.312.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const l1=ae("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
206
|
+
* @license lucide-react v0.312.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const Sy=ae("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
|
|
211
|
+
* @license lucide-react v0.312.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const Cy=ae("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);/**
|
|
216
|
+
* @license lucide-react v0.312.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const Ny=ae("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
|
|
221
|
+
* @license lucide-react v0.312.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const vy=ae("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
226
|
+
* @license lucide-react v0.312.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const Ay=ae("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
|
|
231
|
+
* @license lucide-react v0.312.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const ht=ae("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
236
|
+
* @license lucide-react v0.312.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const wy=ae("Loader",[["line",{x1:"12",x2:"12",y1:"2",y2:"6",key:"gza1u7"}],["line",{x1:"12",x2:"12",y1:"18",y2:"22",key:"1qhbu9"}],["line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76",key:"xae44r"}],["line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07",key:"bxnmvf"}],["line",{x1:"2",x2:"6",y1:"12",y2:"12",key:"89khin"}],["line",{x1:"18",x2:"22",y1:"12",y2:"12",key:"pb8tfm"}],["line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24",key:"1uxjnu"}],["line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93",key:"6duxfx"}]]);/**
|
|
241
|
+
* @license lucide-react v0.312.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const o1=ae("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
246
|
+
* @license lucide-react v0.312.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const Iy=ae("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
251
|
+
* @license lucide-react v0.312.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const Ly=ae("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
256
|
+
* @license lucide-react v0.312.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const Dy=ae("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
261
|
+
* @license lucide-react v0.312.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const Ry=ae("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
266
|
+
* @license lucide-react v0.312.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const Oy=ae("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
|
|
271
|
+
* @license lucide-react v0.312.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const Py=ae("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
|
|
276
|
+
* @license lucide-react v0.312.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const My=ae("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
|
|
281
|
+
* @license lucide-react v0.312.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const jy=ae("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z",key:"ymcmye"}]]);/**
|
|
286
|
+
* @license lucide-react v0.312.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const Sd=ae("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
291
|
+
* @license lucide-react v0.312.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const c1=ae("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
296
|
+
* @license lucide-react v0.312.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const Dr=ae("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
301
|
+
* @license lucide-react v0.312.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const Fy=ae("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
|
|
306
|
+
* @license lucide-react v0.312.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const By=ae("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
311
|
+
* @license lucide-react v0.312.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const Uy=ae("ShieldAlert",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
|
|
316
|
+
* @license lucide-react v0.312.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const d1=ae("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
|
|
321
|
+
* @license lucide-react v0.312.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const Hy=ae("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
|
|
326
|
+
* @license lucide-react v0.312.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const Eh=ae("StopCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{width:"6",height:"6",x:"9",y:"9",key:"1wrtvo"}]]);/**
|
|
331
|
+
* @license lucide-react v0.312.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const zy=ae("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
336
|
+
* @license lucide-react v0.312.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const $y=ae("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
|
|
341
|
+
* @license lucide-react v0.312.0 - ISC
|
|
342
|
+
*
|
|
343
|
+
* This source code is licensed under the ISC license.
|
|
344
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
+
*/const Nu=ae("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
346
|
+
* @license lucide-react v0.312.0 - ISC
|
|
347
|
+
*
|
|
348
|
+
* This source code is licensed under the ISC license.
|
|
349
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
+
*/const vu=ae("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
351
|
+
* @license lucide-react v0.312.0 - ISC
|
|
352
|
+
*
|
|
353
|
+
* This source code is licensed under the ISC license.
|
|
354
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
+
*/const qs=ae("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
|
|
356
|
+
* @license lucide-react v0.312.0 - ISC
|
|
357
|
+
*
|
|
358
|
+
* This source code is licensed under the ISC license.
|
|
359
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
+
*/const Yy=ae("WifiOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M8.5 16.5a5 5 0 0 1 7 0",key:"sej527"}],["path",{d:"M2 8.82a15 15 0 0 1 4.17-2.65",key:"11utq1"}],["path",{d:"M10.66 5c4.01-.36 8.14.9 11.34 3.76",key:"hxefdu"}],["path",{d:"M16.85 11.25a10 10 0 0 1 2.22 1.68",key:"q734kn"}],["path",{d:"M5 13a10 10 0 0 1 5.24-2.76",key:"piq4yl"}],["line",{x1:"12",x2:"12.01",y1:"20",y2:"20",key:"of4bc4"}]]);/**
|
|
361
|
+
* @license lucide-react v0.312.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*/const Vy=ae("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
366
|
+
* @license lucide-react v0.312.0 - ISC
|
|
367
|
+
*
|
|
368
|
+
* This source code is licensed under the ISC license.
|
|
369
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
+
*/const kt=ae("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
371
|
+
* @license lucide-react v0.312.0 - ISC
|
|
372
|
+
*
|
|
373
|
+
* This source code is licensed under the ISC license.
|
|
374
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
+
*/const f1=ae("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),Wy={},Th=e=>{let t;const n=new Set,r=(f,h)=>{const m=typeof f=="function"?f(t):f;if(!Object.is(m,t)){const p=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(g=>g(t,p))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>c,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(Wy?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,o);return o},qy=e=>e?Th(e):Th;var h1={exports:{}},m1={},p1={exports:{}},g1={};/**
|
|
376
|
+
* @license React
|
|
377
|
+
* use-sync-external-store-shim.production.js
|
|
378
|
+
*
|
|
379
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
380
|
+
*
|
|
381
|
+
* This source code is licensed under the MIT license found in the
|
|
382
|
+
* LICENSE file in the root directory of this source tree.
|
|
383
|
+
*/var Li=y;function Gy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qy=typeof Object.is=="function"?Object.is:Gy,Ky=Li.useState,Xy=Li.useEffect,Jy=Li.useLayoutEffect,Zy=Li.useDebugValue;function ex(e,t){var n=t(),r=Ky({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Jy(function(){i.value=n,i.getSnapshot=t,Ql(i)&&s({inst:i})},[e,n,t]),Xy(function(){return Ql(i)&&s({inst:i}),e(function(){Ql(i)&&s({inst:i})})},[e]),Zy(n),n}function Ql(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qy(e,n)}catch{return!0}}function tx(e,t){return t()}var nx=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?tx:ex;g1.useSyncExternalStore=Li.useSyncExternalStore!==void 0?Li.useSyncExternalStore:nx;p1.exports=g1;var rx=p1.exports;/**
|
|
384
|
+
* @license React
|
|
385
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
386
|
+
*
|
|
387
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
388
|
+
*
|
|
389
|
+
* This source code is licensed under the MIT license found in the
|
|
390
|
+
* LICENSE file in the root directory of this source tree.
|
|
391
|
+
*/var rl=y,ix=rx;function sx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ax=typeof Object.is=="function"?Object.is:sx,ux=ix.useSyncExternalStore,lx=rl.useRef,ox=rl.useEffect,cx=rl.useMemo,dx=rl.useDebugValue;m1.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=lx(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=cx(function(){function o(p){if(!c){if(c=!0,f=p,p=r(p),i!==void 0&&a.hasValue){var g=a.value;if(i(g,p))return h=g}return h=p}if(g=h,ax(f,p))return g;var x=r(p);return i!==void 0&&i(g,x)?(f=p,g):(f=p,h=x)}var c=!1,f,h,m=n===void 0?null:n;return[function(){return o(t())},m===null?void 0:function(){return o(m())}]},[t,n,r,i]);var u=ux(e,s[0],s[1]);return ox(function(){a.hasValue=!0,a.value=u},[u]),dx(u),u};h1.exports=m1;var fx=h1.exports;const hx=Fu(fx),E1={},{useDebugValue:mx}=ws,{useSyncExternalStoreWithSelector:px}=hx;let yh=!1;const gx=e=>e;function Ex(e,t=gx,n){(E1?"production":void 0)!=="production"&&n&&!yh&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),yh=!0);const r=px(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return mx(r),r}const xh=e=>{(E1?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?qy(e):e,n=(r,i)=>Ex(t,r,i);return Object.assign(n,t),n},T1=e=>e?xh(e):xh,xe=T1((e,t)=>({agents:[],activeAgentId:(()=>{try{return localStorage.getItem("gaia-active-agent-id")||"chat"}catch{return"chat"}})(),setAgents:n=>e({agents:n}),setActiveAgentId:n=>{try{localStorage.setItem("gaia-active-agent-id",n)}catch{}e({activeAgentId:n})},sessions:[],currentSessionId:null,pendingDeleteIds:[],setSessions:n=>e(r=>({sessions:n.filter(i=>!r.pendingDeleteIds.includes(i.id))})),setCurrentSession:n=>e({currentSessionId:n}),addSession:n=>e(r=>({sessions:[n,...r.sessions]})),removeSession:n=>e(r=>({sessions:r.sessions.filter(i=>i.id!==n),currentSessionId:r.currentSessionId===n?null:r.currentSessionId,messages:r.currentSessionId===n?[]:r.messages})),updateSessionInList:(n,r)=>e(i=>({sessions:i.sessions.map(s=>s.id===n?{...s,...r}:s)})),addPendingDelete:n=>e(r=>({pendingDeleteIds:[...r.pendingDeleteIds,n]})),removePendingDelete:n=>e(r=>({pendingDeleteIds:r.pendingDeleteIds.filter(i=>i!==n)})),messages:[],setMessages:n=>e({messages:n}),addMessage:n=>e(r=>({messages:[...r.messages,n]})),removeMessage:n=>e(r=>({messages:r.messages.filter(i=>i.id!==n)})),removeMessagesFrom:n=>e(r=>{const i=r.messages.findIndex(s=>s.id===n);return i===-1?r:{messages:r.messages.slice(0,i)}}),isStreaming:!1,streamingContent:"",setStreaming:n=>e({isStreaming:n}),appendStreamContent:n=>e(r=>({streamingContent:r.streamingContent+n})),setStreamContent:n=>e({streamingContent:n}),clearStreamContent:()=>e({streamingContent:""}),agentSteps:[],addAgentStep:n=>e(r=>({agentSteps:[...r.agentSteps.map(i=>({...i,active:!1})),n]})),updateLastAgentStep:n=>e(r=>{if(r.agentSteps.length===0)return r;const i=[...r.agentSteps];return i[i.length-1]={...i[i.length-1],...n},{agentSteps:i}}),appendThinkingContent:n=>e(r=>{if(r.agentSteps.length===0)return r;const i=[...r.agentSteps],s=i[i.length-1];return s.type!=="thinking"?r:(i[i.length-1]={...s,detail:(s.detail?s.detail+`
|
|
392
|
+
`:"")+n,active:!0},{agentSteps:i})}),updateLastToolStep:n=>e(r=>{if(r.agentSteps.length===0)return r;const i=[...r.agentSteps];for(let s=i.length-1;s>=0;s--)if(i[s].type==="tool")return i[s]={...i[s],...n},{agentSteps:i};return r}),clearAgentSteps:()=>e({agentSteps:[]}),documents:[],setDocuments:n=>e({documents:n}),systemStatus:null,backendConnected:!0,setSystemStatus:n=>e({systemStatus:n}),setBackendConnected:n=>e({backendConnected:n}),theme:(()=>{try{return localStorage.getItem("gaia-chat-theme")||"dark"}catch{return"dark"}})(),showDocLibrary:!1,showFileBrowser:!1,showSettings:!1,toggleTheme:()=>e(n=>{const r=n.theme==="dark"?"light":"dark";try{localStorage.setItem("gaia-chat-theme",r)}catch{}return document.documentElement.setAttribute("data-theme",r),{theme:r}}),sidebarOpen:typeof window<"u"?window.innerWidth>768:!0,sidebarCollapsed:(()=>{try{return typeof window<"u"&&localStorage.getItem("gaia-chat-sidebar-collapsed")==="true"}catch{return!1}})(),sidebarWidth:(()=>{try{return typeof window<"u"?parseInt(localStorage.getItem("gaia-chat-sidebar-width")||"300",10):300}catch{return 300}})(),isLoadingMessages:!1,pendingPrompt:null,setShowDocLibrary:n=>e({showDocLibrary:n}),setShowFileBrowser:n=>e({showFileBrowser:n}),setShowSettings:n=>e({showSettings:n}),toggleSidebar:()=>e(n=>({sidebarOpen:!n.sidebarOpen})),setSidebarOpen:n=>e({sidebarOpen:n}),toggleSidebarCollapsed:()=>e(n=>{const r=!n.sidebarCollapsed;try{localStorage.setItem("gaia-chat-sidebar-collapsed",String(r))}catch{}return{sidebarCollapsed:r}}),setSidebarCollapsed:n=>{try{localStorage.setItem("gaia-chat-sidebar-collapsed",String(n))}catch{}e({sidebarCollapsed:n})},setSidebarWidth:n=>{const r=Math.max(200,Math.min(500,n));try{localStorage.setItem("gaia-chat-sidebar-width",String(r))}catch{}e({sidebarWidth:r})},setLoadingMessages:n=>e({isLoadingMessages:n}),setPendingPrompt:n=>e({pendingPrompt:n})})),Tx=/^https?:\/\/(127\.0\.0\.1|localhost):\d+\/api$/,yx="http://localhost:4200/api";function Cd(){if(typeof window>"u")return"/api";if(window.location.protocol==="file:"){const e=new URLSearchParams(window.location.search).get("api");return e&&Tx.test(e)?e:yx}return"/api"}const xx={api:"#4fc3f7",store:"#ce93d8",chat:"#81c784",stream:"#ffb74d",ui:"#90a4ae",doc:"#a1887f",system:"#e57373",nav:"#fff176"},bx={api:"fetch",store:"state",chat:"chat",stream:"stream",ui:"ui",doc:"docs",system:"sys",nav:"nav"},Ka=(()=>{try{if(localStorage.getItem("gaia-debug")==="true")return!0;if(typeof location<"u"){const e=new URLSearchParams(location.search);if(e.has("debug")||e.has("verbose"))return!0}}catch{}return!1})();function Zi(){const e=new Date;return e.toLocaleTimeString("en-US",{hour12:!1})+"."+String(e.getMilliseconds()).padStart(3,"0")}function Kn(e){const t=xx[e]||"#ccc",r=`%c[${bx[e]||e}]`,i=`color: ${t}; font-weight: bold;`,s="color: #888; font-weight: normal;";return{info:(a,...u)=>{if(!Ka)return;const o=Zi();u.length>0?console.log(`${r} %c${o} %c${a}`,i,s,"color: inherit;",...u):console.log(`${r} %c${o} %c${a}`,i,s,"color: inherit;")},warn:(a,...u)=>{const o=Zi();console.warn(`${r} %c${o} %c${a}`,i,s,"color: inherit;",...u)},error:(a,...u)=>{const o=Zi();console.error(`${r} %c${o} %c${a}`,i,s,"color: inherit;",...u)},debug:(a,...u)=>{if(!Ka)return;const o=Zi();console.debug(`${r} %c${o} %c${a}`,i,s,"color: #999;",...u)},timed:(a,u,...o)=>{if(!Ka)return;const c=Math.round(performance.now()-u),f=Zi(),h=c>2e3?"color: #e57373;":c>500?"color: #ffb74d;":"color: #81c784;";o.length>0?console.log(`${r} %c${f} %c${a} %c(${c}ms)`,i,s,"color: inherit;",h,...o):console.log(`${r} %c${f} %c${a} %c(${c}ms)`,i,s,"color: inherit;",h)},time:()=>performance.now()}}const P={api:Kn("api"),store:Kn("store"),chat:Kn("chat"),stream:Kn("stream"),ui:Kn("ui"),doc:Kn("doc"),system:Kn("system"),nav:Kn("nav")};function _x(e){console.log("%c GAIA %c v"+e+" %c Local AI Desktop","background: #E23C40; color: white; font-weight: bold; padding: 4px 8px; border-radius: 4px 0 0 4px;","background: #333; color: #fff; padding: 4px 8px;","background: #1a1a1a; color: #888; padding: 4px 8px; border-radius: 0 4px 4px 0;"),console.log(Ka?"%cVerbose logging enabled. Categories: [fetch] [state] [chat] [stream] [ui] [docs] [sys] [nav]":'%cVerbose logging: add ?debug to URL or run localStorage.setItem("gaia-debug","true")',"color: #666; font-style: italic;")}const il=Cd();function y1(e,t){switch(e){case 403:return t||"Access denied.";case 404:return t||"The requested item was not found.";case 413:return t||"File too large to process.";case 500:return"Server error. Please try again.";case 502:return"Service unavailable. Is the backend running?";case 503:return t||"Service unavailable.";default:return t||`Request failed (HTTP ${e})`}}async function Te(e,t,n,r){const i=`${il}${t}`,s=P.api.time();P.api.info(`${e} ${i}`,n!==void 0?{body:n}:"");const u={method:e,headers:{...r,...n!==void 0?{"Content-Type":"application/json"}:{}},body:n!==void 0?JSON.stringify(n):void 0};let o;try{o=await fetch(i,u)}catch(h){throw P.api.error(`${e} ${i} - network error`,h),h}if(!o.ok){const h=await o.text().catch(()=>"");P.api.error(`${e} ${i} - HTTP ${o.status}`,{errorText:h});let m=h;try{m=JSON.parse(h).detail||h}catch{}throw new Error(y1(o.status,m))}if(!(o.headers.get("content-type")||"").includes("application/json")){P.api.timed(`${e} ${i} -> ${o.status} (no body)`,s);return}const f=await o.json();return P.api.timed(`${e} ${i} -> ${o.status}`,s,f),f}async function Nd(){return Te("GET","/system/status")}async function kx(){return Te("GET","/settings")}async function Sx(e){return Te("PUT","/settings",e)}async function Cx(e,t){return Te("POST","/system/load-model",{model_name:e,ctx_size:t})}async function Nx(e,t=!1){return Te("POST","/system/download-model",{model_name:e,force:t})}async function vd(){return Te("GET","/agents")}const sa={"x-gaia-ui":"1"};async function vx(){return Te("GET","/connectors")}async function Ax(e){return Te("GET",`/connectors/${e}`)}async function wx(e,t){return Te("POST",`/connectors/${e}/authorize`,{scopes:t},sa)}async function x1(e,t){return Te("POST",`/connectors/${e}/configure`,{config:t},sa)}async function b1(e){await Te("DELETE",`/connectors/${e}`,void 0,sa)}async function Ix(e){return Te("GET",`/connectors/${e}/grants`)}async function Lx(e,t,n){await Te("PUT",`/connectors/${e}/grants/${encodeURIComponent(t)}`,{scopes:n},sa)}async function Dx(e,t){await Te("DELETE",`/connectors/${e}/grants/${encodeURIComponent(t)}`,void 0,sa)}async function Rx(){return Te("GET","/sessions")}async function fc(e={}){return Te("POST","/sessions",e)}async function Kl(e,t){return Te("PUT",`/sessions/${e}`,t)}async function _1(e){return Te("DELETE",`/sessions/${e}`)}async function ls(e){return Te("GET",`/sessions/${e}/messages`)}async function Ox(e){return Te("GET",`/sessions/${e}/export?format=markdown`)}async function Px(e,t){return Te("DELETE",`/sessions/${e}/messages/${t}`)}async function Mx(e,t){return Te("DELETE",`/sessions/${e}/messages/${t}/and-below`)}const jx=new Set(["status","step","thinking","plan","tool_start","tool_end","tool_result","tool_args","tool_confirm","agent_error","permission_request"]);function Fx(e,t,n,r,i,s){let a;typeof n=="function"?a={onChunk:n,onAgentEvent:()=>{},onDone:()=>{},onError:m=>{P.stream.error("Unhandled stream error",m)}}:a=n;const u=new AbortController,o=P.stream.time();let c=0,f=0,h=0;return P.stream.info(`Starting SSE stream for session=${e}`,{messageLength:t.length}),fetch(`${il}/chat/send`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session_id:e,message:t,stream:!0,...s?{agent_type:s}:{}}),signal:u.signal}).then(async m=>{var E,T;if(P.stream.info(`SSE connection opened -> HTTP ${m.status}`),!m.ok){const k=await m.text().catch(()=>"");P.stream.error(`SSE connection failed: HTTP ${m.status}`,k),a.onError(new Error(`HTTP ${m.status}: ${k}`));return}const p=(E=m.body)==null?void 0:E.getReader();if(!p){P.stream.error("No response body reader available"),a.onError(new Error("No response body"));return}const g=new TextDecoder;let x="",A=!1;try{for(;;){const{done:k,value:L}=await p.read();if(k){P.stream.debug("SSE reader done (stream ended)");break}x+=g.decode(L,{stream:!0});const M=x.split(`
|
|
393
|
+
`);x=M.pop()||"";for(const S of M)if(S.startsWith("data: ")){const O=S.slice(6).trim();if(!O)continue;try{const D=JSON.parse(O);D.type==="chunk"?(c++,f+=(D.content||"").length,(c<=3||c%50===0)&&P.stream.debug(`Chunk #${c} (+${(D.content||"").length} chars)`),a.onChunk(D)):D.type==="answer"?a.onChunk(D):D.type==="done"?(A=!0,P.stream.timed(`Stream complete: ${c} chunks, ${f} chars, ${h} agent events`,o),a.onDone(D)):D.type==="error"?(P.stream.error("Stream error event:",D.content),a.onError(new Error(D.content||"Unknown error"))):D.type==="agent_created"?(P.stream.info(`Agent created: ${D.agent_id}`),(T=a.onAgentCreated)==null||T.call(a,D)):jx.has(D.type)?(h++,P.stream.debug(`Agent event: ${D.type}`,D),a.onAgentEvent(D)):P.stream.warn(`Unknown SSE event type: ${D.type}`,D)}catch{P.stream.warn("Malformed SSE data, skipping",{raw:O.slice(0,100)})}}}}finally{p.releaseLock()}A||(P.stream.timed(`SSE connection closed without done event: ${c} chunks, ${h} agent events`,o),a.onDone({type:"done"}))}).catch(m=>{m.name==="AbortError"?P.stream.warn(`Stream aborted by user after ${c} chunks`):(P.stream.error("Stream fetch error",m),a.onError(m))}),u}async function Bx(e,t,n,r){return Te("POST","/chat/confirm",{session_id:e,confirm_id:t,action:n,remember:r})}async function k1(e,t){return Te("POST","/chat/confirm-tool",{session_id:e,approved:t})}async function ni(){return Te("GET","/documents")}async function S1(e){return Te("POST","/documents/upload-path",{filepath:e})}async function C1(e){const t=`${il}/documents/upload`,n=P.api.time();P.api.info(`POST ${t}`,{fileName:e.name,size:e.size});const r=new FormData;r.append("file",e);let i;try{i=await fetch(t,{method:"POST",body:r})}catch(a){throw P.api.error(`POST ${t} - network error`,a),a}if(!i.ok){const a=await i.text().catch(()=>"");P.api.error(`POST ${t} - HTTP ${i.status}`,{errorText:a});let u=a;try{u=JSON.parse(a).detail||a}catch{}throw new Error(y1(i.status,u))}const s=await i.json();return P.api.timed(`POST ${t} -> ${i.status}`,n,s),s}async function Ux(e){return Te("DELETE",`/documents/${e}`)}async function Hx(e){return Te("GET",`/documents/${e}/status`)}async function zx(e){return Te("POST",`/documents/${e}/cancel`)}async function Au(e,t){return Te("POST",`/sessions/${e}/documents`,{document_id:t})}async function $x(e,t){return Te("DELETE",`/sessions/${e}/documents/${t}`)}async function Yx(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return Te("GET",`/files/browse${t}`)}async function Vx(e,t=!0){return Te("POST","/documents/index-folder",{folder_path:e,recursive:t})}async function Ad(e,t=!0){return Te("POST","/files/open",{path:e,reveal:t})}async function bh(e){const t=`${il}/files/upload`,n=P.api.time();P.api.info(`POST ${t}`,{fileName:e.name,size:e.size});const r=new FormData;r.append("file",e);const i=await fetch(t,{method:"POST",body:r});if(!i.ok){const a=await i.text().catch(()=>"Upload failed");throw P.api.error(`POST ${t} - HTTP ${i.status}`,{errorText:a}),new Error(`Upload failed: ${a}`)}const s=await i.json();return P.api.timed(`POST ${t} -> ${i.status}`,n,s),s}async function Wx(e,t,n){const r=new URLSearchParams({query:e});return t&&r.set("file_types",t),r.set("max_results",String(n)),Te("GET",`/files/search?${r}`)}async function qx(e,t){const n=new URLSearchParams({path:e});return Te("GET",`/files/preview?${n}`)}async function Gx(){return Te("POST","/tunnel/start")}async function Qx(){return Te("POST","/tunnel/stop")}async function N1(){return Te("GET","/tunnel/status")}async function Kx(){return Te("GET","/mcp/status")}const v1=""+new URL("gaia-robot-NKaQnEIp.png",import.meta.url).href;function _h({session:e,isActive:t,isPendingDelete:n,isDeleting:r,onSelect:i,onKeyDown:s,onDelete:a,formatTime:u}){return l.jsxs("div",{className:`session-item ${t?"active":""} ${r?"session-deleting":""}`,onClick:()=>i(e.id),onKeyDown:o=>s(o,e.id),role:"button",tabIndex:0,"aria-label":`Open task: ${e.title}`,"aria-current":t?"true":void 0,children:[l.jsx("span",{className:"session-title",children:e.title}),l.jsx("span",{className:"session-time",children:u(e.updated_at)}),n?l.jsxs("button",{className:"session-delete confirm",onClick:o=>a(o,e.id),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&a(o,e.id)},title:"Click to confirm delete","aria-label":`Confirm delete: ${e.title}`,children:[l.jsx(vu,{size:12}),l.jsx("span",{className:"confirm-label",children:"Delete?"})]}):l.jsx("button",{className:"session-delete",onClick:o=>a(o,e.id),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&a(o,e.id)},title:"Delete","aria-label":`Delete: ${e.title}`,children:l.jsx(vu,{size:13})})]})}function Xx({onNewTask:e,tunnelActive:t,tunnelLoading:n,onMobileToggle:r}){const{sessions:i,currentSessionId:s,setCurrentSession:a,removeSession:u,addSession:o,setMessages:c,theme:f,toggleTheme:h,setShowSettings:m,sidebarOpen:p,setSidebarOpen:g,setLoadingMessages:x,sidebarCollapsed:A,toggleSidebarCollapsed:E,sidebarWidth:T,setSidebarWidth:k,addPendingDelete:L,removePendingDelete:M}=xe(),[S,O]=y.useState(""),[D,Y]=y.useState(null),[w,z]=y.useState(null),[K,de]=y.useState(!1),[le,oe]=y.useState(null),ve=y.useRef(null),ne=y.useRef(null),I=y.useRef(null);y.useEffect(()=>{const se=()=>{var R;A?(E(),requestAnimationFrame(()=>{var W;return(W=ne.current)==null?void 0:W.focus()})):(R=ne.current)==null||R.focus()};return window.addEventListener("gaia:focus-search",se),()=>window.removeEventListener("gaia:focus-search",se)},[A,E]);const B=S?i.filter(se=>se.title.toLowerCase().includes(S.toLowerCase())):i,b=y.useMemo(()=>{if(S)return null;const se=new Date,R=new Date(se.getFullYear(),se.getMonth(),se.getDate()).getTime(),W=R-864e5,U=R-7*864e5,te=[{label:"Today",sessions:[]},{label:"Yesterday",sessions:[]},{label:"Previous 7 Days",sessions:[]},{label:"Older",sessions:[]}];for(const he of B){const ye=new Date(he.updated_at).getTime();ye>=R?te[0].sessions.push(he):ye>=W?te[1].sessions.push(he):ye>=U?te[2].sessions.push(he):te[3].sessions.push(he)}return te.filter(he=>he.sessions.length>0)},[B,S]),ee=y.useCallback(async se=>{var W;if(se===s)return;const R=((W=i.find(U=>U.id===se))==null?void 0:W.title)||"?";P.nav.info(`Selecting session: "${R}" (${se})`),a(se),c([]),x(!0),window.innerWidth<=768&&g(!1);try{const U=await ls(se);if(!(xe.getState().currentSessionId===se)){P.nav.debug(`Discarding stale message load for session=${se} (user switched away)`);return}c(U.messages||[]),P.nav.info(`Loaded ${(U.messages||[]).length} message(s) for "${R}"`)}catch(U){P.nav.error(`Failed to load messages for session ${se}`,U),c([])}finally{x(!1)}},[s,i,a,c,g,x]),ce=y.useCallback(async(se,R)=>{se.stopPropagation(),se.preventDefault();const W=i.find(te=>te.id===R),U=(W==null?void 0:W.title)||"?";if(D===R){P.chat.info(`Deleting session: "${U}" (${R})`),Y(null),z(R),L(R),_1(R).then(()=>{P.chat.info(`Session deleted from backend: "${U}"`),M(R)}).catch(he=>{P.chat.warn(`Backend delete failed for "${U}"`,he),M(R)}),le!=null&&le.timer&&clearTimeout(le.timer);const te=setTimeout(()=>{oe(null)},5e3);W&&oe({session:W,timer:te}),setTimeout(()=>{u(R),z(null)},250);return}P.chat.debug(`Delete pending confirmation for: "${U}" (${R})`),Y(R),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>Y(te=>te===R?null:te),3e3)},[D,i,u,le,L,M]),N=y.useCallback(()=>{if(!le)return;clearTimeout(le.timer);const{session:se}=le;P.chat.info(`Undo delete: re-creating "${se.title}"`),M(se.id),fc({title:se.title}).then(R=>{o(R),P.chat.info(`Undo delete: re-created "${R.title}" (new id=${R.id})`)}).catch(R=>{P.chat.warn(`Undo delete failed for "${se.title}"`,R)}),oe(null)},[le,o,M]);y.useEffect(()=>{if(!D)return;const se=()=>Y(null);return window.addEventListener("click",se,{once:!0}),()=>window.removeEventListener("click",se)},[D]);const fe=y.useCallback((se,R)=>{(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),ee(R))},[ee]),be=y.useRef(null),ge=y.useCallback(se=>{se.preventDefault(),de(!0),P.ui.debug("Sidebar resize started");const R=se.clientX,W=T,U=he=>{const ye=he.clientX-R;k(W+ye)},te=()=>{de(!1),document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",te),document.body.style.cursor="",document.body.style.userSelect="",be.current=null,P.ui.debug("Sidebar resize ended")};be.current=te,document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",U),document.addEventListener("mouseup",te)},[T,k]);y.useEffect(()=>()=>{be.current&&be.current(),I.current&&clearTimeout(I.current)},[]);const Oe=se=>{const R=new Date(se),U=new Date().getTime()-R.getTime(),te=Math.floor(U/6e4);if(te<1)return"now";if(te<60)return`${te}m`;const he=Math.floor(te/60);if(he<24)return`${he}h`;const ye=Math.floor(he/24);return ye<7?`${ye}d`:R.toLocaleDateString(void 0,{month:"short",day:"numeric"})},gt=typeof window<"u"&&window.innerWidth<=768?void 0:{width:A?56:T,minWidth:A?56:T};return l.jsxs("aside",{ref:ve,className:`sidebar ${p?"open":""} ${A?"collapsed":""} ${K?"resizing":""}`,style:gt,role:"complementary","aria-label":"Task sidebar",children:[l.jsxs("div",{className:"sidebar-top",children:[l.jsxs("div",{className:"sidebar-brand",children:[l.jsx("div",{className:"brand-icon","aria-hidden":"true",children:l.jsx("img",{src:v1,alt:"",width:28,height:28})}),l.jsxs("div",{className:"brand-text",children:[l.jsx("span",{className:"brand-name",children:"GAIA"}),l.jsxs("span",{className:"brand-version",children:["v","0.17.6"]}),l.jsx("span",{className:"beta-badge",children:"BETA"})]})]}),l.jsxs("div",{className:"sidebar-top-actions",children:[l.jsx("button",{className:"new-task-btn",onClick:e,title:"New Task","aria-label":"New Task",children:l.jsx(Sd,{size:18})}),l.jsx("button",{className:"collapse-btn",onClick:E,title:A?"Expand sidebar":"Collapse sidebar","aria-label":A?"Expand sidebar":"Collapse sidebar",children:A?l.jsx(Py,{size:18}):l.jsx(Oy,{size:18})})]})]}),l.jsxs("div",{className:"sidebar-search",children:[l.jsx(Dr,{size:14,className:"search-icon","aria-hidden":"true"}),l.jsx("input",{ref:ne,type:"text",placeholder:"Search... (Ctrl+K)",value:S,onChange:se=>O(se.target.value),"aria-label":"Search tasks"})]}),l.jsxs("nav",{className:"session-list","aria-label":"Task sessions",children:[B.length===0&&l.jsx("div",{className:"empty-hint",children:S?"No results":"No tasks yet"}),b?b.map(se=>l.jsxs("div",{children:[l.jsx("div",{className:"session-group-label",children:se.label}),se.sessions.map(R=>l.jsx(_h,{session:R,isActive:R.id===s,isPendingDelete:D===R.id,isDeleting:w===R.id,onSelect:ee,onKeyDown:fe,onDelete:ce,formatTime:Oe},R.id))]},se.label)):B.map(se=>l.jsx(_h,{session:se,isActive:se.id===s,isPendingDelete:D===se.id,isDeleting:w===se.id,onSelect:ee,onKeyDown:fe,onDelete:ce,formatTime:Oe},se.id))]}),l.jsxs("div",{className:"sidebar-bottom",children:[l.jsxs("div",{className:"privacy-badge",children:[l.jsx("span",{className:"privacy-dot","aria-hidden":"true"}),l.jsx("span",{children:"100% Local"}),l.jsxs("span",{className:"version-badge",children:["v","0.17.6"]})]}),l.jsxs("div",{className:"sidebar-actions",children:[r&&l.jsx("button",{className:`btn-icon mobile-toggle-btn ${t?"active":""} ${n?"loading":""}`,onClick:r,disabled:n,title:t?"Stop mobile access":"Enable mobile access","aria-label":t?"Stop mobile access":"Enable mobile access",children:l.jsx(d1,{size:17})}),l.jsx("button",{className:"btn-icon",onClick:()=>m(!0),title:"Settings","aria-label":"Settings",children:l.jsx(By,{size:17})}),l.jsx("button",{className:"btn-icon",onClick:h,title:"Toggle theme","aria-label":`Switch to ${f==="dark"?"light":"dark"} theme`,children:f==="dark"?l.jsx(zy,{size:17}):l.jsx(Ry,{size:17})})]})]}),!A&&l.jsx("div",{className:"sidebar-resize-handle",onMouseDown:ge,title:"Drag to resize sidebar","aria-hidden":"true"}),le&&l.jsxs("div",{className:"toast toast-undo",role:"status",children:["Deleted “",le.session.title,"”",l.jsx("span",{className:"toast-action",onClick:N,children:"Undo"})]})]})}function kh(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function A1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Jx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eb={};function Sh(e,t){return(eb.jsx?Zx:Jx).test(e)}const tb=/[ \t\n\f\r]/g;function nb(e){return typeof e=="object"?e.type==="text"?Ch(e.value):!1:Ch(e)}function Ch(e){return e.replace(tb,"")===""}class aa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}aa.prototype.normal={};aa.prototype.property={};aa.prototype.space=void 0;function w1(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new aa(n,r,t)}function Gs(e){return e.toLowerCase()}class $t{constructor(t,n){this.attribute=n,this.property=t}}$t.prototype.attribute="";$t.prototype.booleanish=!1;$t.prototype.boolean=!1;$t.prototype.commaOrSpaceSeparated=!1;$t.prototype.commaSeparated=!1;$t.prototype.defined=!1;$t.prototype.mustUseProperty=!1;$t.prototype.number=!1;$t.prototype.overloadedBoolean=!1;$t.prototype.property="";$t.prototype.spaceSeparated=!1;$t.prototype.space=void 0;let rb=0;const Ee=qr(),Ze=qr(),hc=qr(),Q=qr(),Fe=qr(),ki=qr(),Gt=qr();function qr(){return 2**++rb}const mc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:Ze,commaOrSpaceSeparated:Gt,commaSeparated:ki,number:Q,overloadedBoolean:hc,spaceSeparated:Fe},Symbol.toStringTag,{value:"Module"})),Xl=Object.keys(mc);class wd extends $t{constructor(t,n,r,i){let s=-1;if(super(t,n),Nh(this,"space",i),typeof r=="number")for(;++s<Xl.length;){const a=Xl[s];Nh(this,Xl[s],(r&mc[a])===mc[a])}}}wd.prototype.defined=!0;function Nh(e,t,n){n&&(e[t]=n)}function Fi(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new wd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Gs(r)]=r,n[Gs(s.attribute)]=r}return new aa(t,n,e.space)}const I1=Fi({properties:{ariaActiveDescendant:null,ariaAtomic:Ze,ariaAutoComplete:null,ariaBusy:Ze,ariaChecked:Ze,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:Fe,ariaCurrent:null,ariaDescribedBy:Fe,ariaDetails:null,ariaDisabled:Ze,ariaDropEffect:Fe,ariaErrorMessage:null,ariaExpanded:Ze,ariaFlowTo:Fe,ariaGrabbed:Ze,ariaHasPopup:null,ariaHidden:Ze,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Fe,ariaLevel:Q,ariaLive:null,ariaModal:Ze,ariaMultiLine:Ze,ariaMultiSelectable:Ze,ariaOrientation:null,ariaOwns:Fe,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:Ze,ariaReadOnly:Ze,ariaRelevant:null,ariaRequired:Ze,ariaRoleDescription:Fe,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:Ze,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function L1(e,t){return t in e?e[t]:t}function D1(e,t){return L1(e,t.toLowerCase())}const ib=Fi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ki,acceptCharset:Fe,accessKey:Fe,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Fe,autoFocus:Ee,autoPlay:Ee,blocking:Fe,capture:null,charSet:null,checked:Ee,cite:null,className:Fe,cols:Q,colSpan:null,content:null,contentEditable:Ze,controls:Ee,controlsList:Fe,coords:Q|ki,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:hc,draggable:Ze,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Fe,height:Q,hidden:hc,high:Q,href:null,hrefLang:null,htmlFor:Fe,httpEquiv:Fe,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Fe,itemRef:Fe,itemScope:Ee,itemType:Fe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:Q,pattern:null,ping:Fe,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Fe,required:Ee,reversed:Ee,rows:Q,rowSpan:Q,sandbox:Fe,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:Ze,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:Ee,useMap:null,value:Ze,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Fe,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:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:Ze,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:Q,security:null,unselectable:null},space:"html",transform:D1}),sb=Fi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Gt,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:Fe,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:Ee,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:ki,g2:ki,glyphName:ki,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:Gt,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,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:Fe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gt,rev:Gt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gt,requiredFeatures:Gt,requiredFonts:Gt,requiredFormats:Gt,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:Gt,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:Gt,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:Gt,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:L1}),R1=Fi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),O1=Fi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:D1}),P1=Fi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ab={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"},ub=/[A-Z]/g,vh=/-[a-z]/g,lb=/^data[-\w.:]+$/i;function sl(e,t){const n=Gs(t);let r=t,i=$t;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&lb.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(vh,cb);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!vh.test(s)){let a=s.replace(ub,ob);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=wd}return new i(r,t)}function ob(e){return"-"+e.toLowerCase()}function cb(e){return e.charAt(1).toUpperCase()}const ua=w1([I1,ib,R1,O1,P1],"html"),_r=w1([I1,sb,R1,O1,P1],"svg");function Ah(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function M1(e){return e.join(" ").trim()}var Id={},wh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,db=/\n/g,fb=/^\s*/,hb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,mb=/^:\s*/,pb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,gb=/^[;\s]*/,Eb=/^\s+|\s+$/g,Tb=`
|
|
394
|
+
`,Ih="/",Lh="*",Ar="",yb="comment",xb="declaration";function bb(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(g){var x=g.match(db);x&&(n+=x.length);var A=g.lastIndexOf(Tb);r=~A?g.length-A:r+g.length}function s(){var g={line:n,column:r};return function(x){return x.position=new a(g),c(),x}}function a(g){this.start=g,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function u(g){var x=new Error(t.source+":"+n+":"+r+": "+g);if(x.reason=g,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function o(g){var x=g.exec(e);if(x){var A=x[0];return i(A),e=e.slice(A.length),x}}function c(){o(fb)}function f(g){var x;for(g=g||[];x=h();)x!==!1&&g.push(x);return g}function h(){var g=s();if(!(Ih!=e.charAt(0)||Lh!=e.charAt(1))){for(var x=2;Ar!=e.charAt(x)&&(Lh!=e.charAt(x)||Ih!=e.charAt(x+1));)++x;if(x+=2,Ar===e.charAt(x-1))return u("End of comment missing");var A=e.slice(2,x-2);return r+=2,i(A),e=e.slice(x),r+=2,g({type:yb,comment:A})}}function m(){var g=s(),x=o(hb);if(x){if(h(),!o(mb))return u("property missing ':'");var A=o(pb),E=g({type:xb,property:Dh(x[0].replace(wh,Ar)),value:A?Dh(A[0].replace(wh,Ar)):Ar});return o(gb),E}}function p(){var g=[];f(g);for(var x;x=m();)x!==!1&&(g.push(x),f(g));return g}return c(),p()}function Dh(e){return e?e.replace(Eb,Ar):Ar}var _b=bb,kb=tu&&tu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Id,"__esModule",{value:!0});Id.default=Cb;const Sb=kb(_b);function Cb(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Sb.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:u}=s;i?t(a,u,s):u&&(n=n||{},n[a]=u)}),n}var al={};Object.defineProperty(al,"__esModule",{value:!0});al.camelCase=void 0;var Nb=/^--[a-zA-Z0-9_-]+$/,vb=/-([a-z])/g,Ab=/^[^-]+$/,wb=/^-(webkit|moz|ms|o|khtml)-/,Ib=/^-(ms)-/,Lb=function(e){return!e||Ab.test(e)||Nb.test(e)},Db=function(e,t){return t.toUpperCase()},Rh=function(e,t){return"".concat(t,"-")},Rb=function(e,t){return t===void 0&&(t={}),Lb(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Ib,Rh):e=e.replace(wb,Rh),e.replace(vb,Db))};al.camelCase=Rb;var Ob=tu&&tu.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Pb=Ob(Id),Mb=al;function pc(e,t){var n={};return!e||typeof e!="string"||(0,Pb.default)(e,function(r,i){r&&i&&(n[(0,Mb.camelCase)(r,t)]=i)}),n}pc.default=pc;var jb=pc;const Fb=Fu(jb),ul=j1("end"),Rn=j1("start");function j1(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Bb(e){const t=Rn(e),n=ul(e);if(t&&n)return{start:t,end:n}}function ys(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Oh(e.position):"start"in e||"end"in e?Oh(e):"line"in e||"column"in e?gc(e):""}function gc(e){return Ph(e&&e.line)+":"+Ph(e&&e.column)}function Oh(e){return gc(e&&e.start)+"-"+gc(e&&e.end)}function Ph(e){return e&&typeof e=="number"?e:1}class Nt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?s.ruleId=r:(s.source=r.slice(0,o),s.ruleId=r.slice(o+1))}if(!s.place&&s.ancestors&&s.ancestors){const o=s.ancestors[s.ancestors.length-1];o&&(s.place=o.position)}const u=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=ys(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Nt.prototype.file="";Nt.prototype.name="";Nt.prototype.reason="";Nt.prototype.message="";Nt.prototype.stack="";Nt.prototype.column=void 0;Nt.prototype.line=void 0;Nt.prototype.ancestors=void 0;Nt.prototype.cause=void 0;Nt.prototype.fatal=void 0;Nt.prototype.place=void 0;Nt.prototype.ruleId=void 0;Nt.prototype.source=void 0;const Ld={}.hasOwnProperty,Ub=new Map,Hb=/[A-Z]/g,zb=new Set(["table","tbody","thead","tfoot","tr"]),$b=new Set(["td","th"]),F1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yb(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Jb(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Xb(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?_r:ua,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=B1(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function B1(e,t,n){if(t.type==="element")return Vb(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Wb(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Gb(e,t,n);if(t.type==="mdxjsEsm")return qb(e,t);if(t.type==="root")return Qb(e,t,n);if(t.type==="text")return Kb(e,t)}function Vb(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=_r,e.schema=i),e.ancestors.push(t);const s=H1(e,t.tagName,!1),a=Zb(e,t);let u=Rd(e,t);return zb.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!nb(o):!0})),U1(e,a,s,t),Dd(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Wb(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Qs(e,t.position)}function qb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qs(e,t.position)}function Gb(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=_r,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:H1(e,t.name,!0),a=e_(e,t),u=Rd(e,t);return U1(e,a,s,t),Dd(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Qb(e,t,n){const r={};return Dd(r,Rd(e,t)),e.create(t,e.Fragment,r,n)}function Kb(e,t){return t.value}function U1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Dd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Xb(e,t,n){return r;function r(i,s,a,u){const c=Array.isArray(a.children)?n:t;return u?c(s,a,u):c(s,a)}}function Jb(e,t){return n;function n(r,i,s,a){const u=Array.isArray(s.children),o=Rn(r);return t(i,s,a,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function Zb(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ld.call(t.properties,i)){const s=t_(e,i,t.properties[i]);if(s){const[a,u]=s;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&$b.has(t.tagName)?r=u:n[a]=u}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function e_(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const u=a.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Qs(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,s=e.evaluater.evaluateExpression(u.expression)}else Qs(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Rd(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Ub;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const o=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(o){const c=i.get(o)||0;a=o+"-"+c,i.set(o,c+1)}}const u=B1(e,s,a);u!==void 0&&n.push(u)}return n}function t_(e,t,n){const r=sl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?A1(n):M1(n)),r.property==="style"){let i=typeof n=="object"?n:n_(e,String(n));return e.stylePropertyNameCase==="css"&&(i=r_(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ab[r.property]||r.property:r.attribute,n]}}function n_(e,t){try{return Fb(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Nt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=F1+"#cannot-parse-style-attribute",i}}function H1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const u=Sh(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:u,computed:!!(s&&u.type==="Literal"),optional:!1}:u}r=a}else r=Sh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ld.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Qs(e)}function Qs(e,t){const n=new Nt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=F1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function r_(e){const t={};let n;for(n in e)Ld.call(e,n)&&(t[i_(n)]=e[n]);return t}function i_(e){let t=e.replace(Hb,s_);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function s_(e){return"-"+e.toLowerCase()}const Jl={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"]},a_={};function Od(e,t){const n=a_,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return z1(e,r,i)}function z1(e,t,n){if(u_(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Mh(e.children,t,n)}return Array.isArray(e)?Mh(e,t,n):""}function Mh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=z1(e[i],t,n);return r.join("")}function u_(e){return!!(e&&typeof e=="object")}const jh=document.createElement("i");function Pd(e){const t="&"+e+";";jh.innerHTML=t;const n=jh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Jt(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function sn(e,t){return e.length>0?(Jt(e,e.length,0,t),e):t}const Fh={}.hasOwnProperty;function $1(e){const t={};let n=-1;for(;++n<e.length;)l_(t,e[n]);return t}function l_(e,t){let n;for(n in t){const i=(Fh.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){Fh.call(i,a)||(i[a]=[]);const u=s[a];o_(i[a],Array.isArray(u)?u:u?[u]:[])}}}function o_(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Jt(e,0,0,r)}function Y1(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wt=kr(/[A-Za-z]/),St=kr(/[\dA-Za-z]/),c_=kr(/[#-'*+\--9=?A-Z^-~]/);function wu(e){return e!==null&&(e<32||e===127)}const Ec=kr(/\d/),d_=kr(/[\dA-Fa-f]/),f_=kr(/[!-/:-@[-`{-~]/);function me(e){return e!==null&&e<-2}function Me(e){return e!==null&&(e<0||e===32)}function Ce(e){return e===-2||e===-1||e===32}const ll=kr(new RegExp("\\p{P}|\\p{S}","u")),Yr=kr(/\s/);function kr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bi(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&St(e.charCodeAt(n+1))&&St(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const u=e.charCodeAt(n+1);s<56320&&u>56319&&u<57344?(a=String.fromCharCode(s,u),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ae(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(o){return Ce(o)?(e.enter(n),u(o)):t(o)}function u(o){return Ce(o)&&s++<i?(e.consume(o),u):(e.exit(n),t(o))}}const h_={tokenize:m_};function m_(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ae(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),s(u)}function s(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,a(u)}function a(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return me(u)?(e.consume(u),e.exit("chunkText"),s):(e.consume(u),a)}}const p_={tokenize:g_},Bh={tokenize:E_};function g_(e){const t=this,n=[];let r=0,i,s,a;return u;function u(k){if(r<n.length){const L=n[r];return t.containerState=L[1],e.attempt(L[0].continuation,o,c)(k)}return c(k)}function o(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const L=t.events.length;let M=L,S;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){S=t.events[M][1].end;break}E(r);let O=L;for(;O<t.events.length;)t.events[O][1].end={...S},O++;return Jt(t.events,M+1,0,t.events.slice(L)),t.events.length=O,c(k)}return u(k)}function c(k){if(r===n.length){if(!i)return m(k);if(i.currentConstruct&&i.currentConstruct.concrete)return g(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Bh,f,h)(k)}function f(k){return i&&T(),E(r),m(k)}function h(k){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(k)}function m(k){return t.containerState={},e.attempt(Bh,p,g)(k)}function p(k){return r++,n.push([t.currentConstruct,t.containerState]),m(k)}function g(k){if(k===null){i&&T(),E(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),x(k)}function x(k){if(k===null){A(e.exit("chunkFlow"),!0),E(0),e.consume(k);return}return me(k)?(e.consume(k),A(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(k),x)}function A(k,L){const M=t.sliceStream(k);if(L&&M.push(null),k.previous=s,s&&(s.next=k),s=k,i.defineSkip(k.start),i.write(M),t.parser.lazy[k.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<a&&(!i.events[S][1].end||i.events[S][1].end.offset>a))return;const O=t.events.length;let D=O,Y,w;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(Y){w=t.events[D][1].end;break}Y=!0}for(E(r),S=O;S<t.events.length;)t.events[S][1].end={...w},S++;Jt(t.events,D+1,0,t.events.slice(O)),t.events.length=S}}function E(k){let L=n.length;for(;L-- >k;){const M=n[L];t.containerState=M[1],M[0].exit.call(t,e)}n.length=k}function T(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function E_(e,t,n){return Ae(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Di(e){if(e===null||Me(e)||Yr(e))return 1;if(ll(e))return 2}function ol(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Tc={name:"attention",resolveAll:T_,tokenize:y_};function T_(e,t){let n=-1,r,i,s,a,u,o,c,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},m={...e[n][1].start};Uh(h,-o),Uh(m,o),a={type:o>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},s={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:o>1?"strong":"emphasis",start:{...a.start},end:{...u.end}},e[r][1].end={...a.start},e[n][1].start={...u.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=sn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=sn(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=sn(c,ol(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=sn(c,[["exit",s,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=sn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Jt(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function y_(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Di(r);let s;return a;function a(o){return s=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===s)return e.consume(o),u;const c=e.exit("attentionSequence"),f=Di(o),h=!f||f===2&&i||n.includes(o),m=!i||i===2&&f||n.includes(r);return c._open=!!(s===42?h:h&&(i||!m)),c._close=!!(s===42?m:m&&(f||!h)),t(o)}}function Uh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const x_={name:"autolink",tokenize:b_};function b_(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(p){return wt(p)?(e.consume(p),a):p===64?n(p):c(p)}function a(p){return p===43||p===45||p===46||St(p)?(r=1,u(p)):c(p)}function u(p){return p===58?(e.consume(p),r=0,o):(p===43||p===45||p===46||St(p))&&r++<32?(e.consume(p),u):(r=0,c(p))}function o(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||wu(p)?n(p):(e.consume(p),o)}function c(p){return p===64?(e.consume(p),f):c_(p)?(e.consume(p),c):n(p)}function f(p){return St(p)?h(p):n(p)}function h(p){return p===46?(e.consume(p),r=0,f):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):m(p)}function m(p){if((p===45||St(p))&&r++<63){const g=p===45?m:h;return e.consume(p),g}return n(p)}}const la={partial:!0,tokenize:__};function __(e,t,n){return r;function r(s){return Ce(s)?Ae(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||me(s)?t(s):n(s)}}const V1={continuation:{tokenize:S_},exit:C_,name:"blockQuote",tokenize:k_};function k_(e,t,n){const r=this;return i;function i(a){if(a===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return Ce(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function S_(e,t,n){const r=this;return i;function i(a){return Ce(a)?Ae(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(V1,t,n)(a)}}function C_(e){e.exit("blockQuote")}const W1={name:"characterEscape",tokenize:N_};function N_(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return f_(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const q1={name:"characterReference",tokenize:v_};function v_(e,t,n){const r=this;let i=0,s,a;return u;function u(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),o}function o(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,a=St,f(h))}function c(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=d_,f):(e.enter("characterReferenceValue"),s=7,a=Ec,f(h))}function f(h){if(h===59&&i){const m=e.exit("characterReferenceValue");return a===St&&!Pd(r.sliceSerialize(m))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&i++<s?(e.consume(h),f):n(h)}}const Hh={partial:!0,tokenize:w_},zh={concrete:!0,name:"codeFenced",tokenize:A_};function A_(e,t,n){const r=this,i={partial:!0,tokenize:M};let s=0,a=0,u;return o;function o(S){return c(S)}function c(S){const O=r.events[r.events.length-1];return s=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,u=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(S)}function f(S){return S===u?(a++,e.consume(S),f):a<3?n(S):(e.exit("codeFencedFenceSequence"),Ce(S)?Ae(e,h,"whitespace")(S):h(S))}function h(S){return S===null||me(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(Hh,x,L)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||me(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(S)):Ce(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ae(e,p,"whitespace")(S)):S===96&&S===u?n(S):(e.consume(S),m)}function p(S){return S===null||me(S)?h(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||me(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(S)):S===96&&S===u?n(S):(e.consume(S),g)}function x(S){return e.attempt(i,L,A)(S)}function A(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),E}function E(S){return s>0&&Ce(S)?Ae(e,T,"linePrefix",s+1)(S):T(S)}function T(S){return S===null||me(S)?e.check(Hh,x,L)(S):(e.enter("codeFlowValue"),k(S))}function k(S){return S===null||me(S)?(e.exit("codeFlowValue"),T(S)):(e.consume(S),k)}function L(S){return e.exit("codeFenced"),t(S)}function M(S,O,D){let Y=0;return w;function w(oe){return S.enter("lineEnding"),S.consume(oe),S.exit("lineEnding"),z}function z(oe){return S.enter("codeFencedFence"),Ce(oe)?Ae(S,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):K(oe)}function K(oe){return oe===u?(S.enter("codeFencedFenceSequence"),de(oe)):D(oe)}function de(oe){return oe===u?(Y++,S.consume(oe),de):Y>=a?(S.exit("codeFencedFenceSequence"),Ce(oe)?Ae(S,le,"whitespace")(oe):le(oe)):D(oe)}function le(oe){return oe===null||me(oe)?(S.exit("codeFencedFence"),O(oe)):D(oe)}}}function w_(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Zl={name:"codeIndented",tokenize:L_},I_={partial:!0,tokenize:D_};function L_(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Ae(e,s,"linePrefix",5)(c)}function s(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?o(c):me(c)?e.attempt(I_,a,o)(c):(e.enter("codeFlowValue"),u(c))}function u(c){return c===null||me(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),u)}function o(c){return e.exit("codeIndented"),t(c)}}function D_(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):me(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ae(e,s,"linePrefix",5)(a)}function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):me(a)?i(a):n(a)}}const R_={name:"codeText",previous:P_,resolve:O_,tokenize:M_};function O_(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function P_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function M_(e,t,n){let r=0,i,s;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),u(h)}function u(h){return h===96?(e.consume(h),r++,u):(e.exit("codeTextSequence"),o(h))}function o(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),o):h===96?(s=e.enter("codeTextSequence"),i=0,f(h)):me(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),o):(e.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||me(h)?(e.exit("codeTextData"),o(h)):(e.consume(h),c)}function f(h){return h===96?(e.consume(h),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(s.type="codeTextData",c(h))}}class j_{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&es(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),es(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),es(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);es(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);es(this.left,n.reverse())}}}function es(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function G1(e){const t={};let n=-1,r,i,s,a,u,o,c;const f=new j_(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,s=0,s<o.length&&o[s][1].type==="lineEndingBlank"&&(s+=2),s<o.length&&o[s][1].type==="content"))for(;++s<o.length&&o[s][1].type!=="content";)o[s][1].type==="chunkText"&&(o[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,F_(f,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=f.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},u=f.slice(i,n),u.unshift(r),f.splice(i,n-i+1,u))}}return Jt(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function F_(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const u=a.events,o=[],c={};let f,h,m=-1,p=n,g=0,x=0;const A=[x];for(;p;){for(;e.get(++i)[1]!==p;);s.push(i),p._tokenizer||(f=r.sliceStream(p),p.next||f.push(null),h&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=n;++m<u.length;)u[m][0]==="exit"&&u[m-1][0]==="enter"&&u[m][1].type===u[m-1][1].type&&u[m][1].start.line!==u[m][1].end.line&&(x=m+1,A.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):A.pop(),m=A.length;m--;){const E=u.slice(A[m],A[m+1]),T=s.pop();o.push([T,T+E.length-1]),e.splice(T,2,E)}for(o.reverse(),m=-1;++m<o.length;)c[g+o[m][0]]=g+o[m][1],g+=o[m][1]-o[m][0]-1;return c}const B_={resolve:H_,tokenize:z_},U_={partial:!0,tokenize:$_};function H_(e){return G1(e),e}function z_(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?s(u):me(u)?e.check(U_,a,s)(u):(e.consume(u),i)}function s(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function a(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function $_(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ae(e,s,"linePrefix")}function s(a){if(a===null||me(a))return n(a);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Q1(e,t,n,r,i,s,a,u,o){const c=o||Number.POSITIVE_INFINITY;let f=0;return h;function h(E){return E===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(E),e.exit(s),m):E===null||E===32||E===41||wu(E)?n(E):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),x(E))}function m(E){return E===62?(e.enter(s),e.consume(E),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===62?(e.exit("chunkString"),e.exit(u),m(E)):E===null||E===60||me(E)?n(E):(e.consume(E),E===92?g:p)}function g(E){return E===60||E===62||E===92?(e.consume(E),p):p(E)}function x(E){return!f&&(E===null||E===41||Me(E))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(E)):f<c&&E===40?(e.consume(E),f++,x):E===41?(e.consume(E),f--,x):E===null||E===32||E===40||wu(E)?n(E):(e.consume(E),E===92?A:x)}function A(E){return E===40||E===41||E===92?(e.consume(E),x):x(E)}}function K1(e,t,n,r,i,s){const a=this;let u=0,o;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(s),f}function f(p){return u>999||p===null||p===91||p===93&&!o||p===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(s),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):me(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||me(p)||u++>999?(e.exit("chunkString"),f(p)):(e.consume(p),o||(o=!Ce(p)),p===92?m:h)}function m(p){return p===91||p===92||p===93?(e.consume(p),u++,h):h(p)}}function X1(e,t,n,r,i,s){let a;return u;function u(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,o):n(m)}function o(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(s),c(m))}function c(m){return m===a?(e.exit(s),o(a)):m===null?n(m):me(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Ae(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===a||m===null||me(m)?(e.exit("chunkString"),c(m)):(e.consume(m),m===92?h:f)}function h(m){return m===a||m===92?(e.consume(m),f):f(m)}}function xs(e,t){let n;return r;function r(i){return me(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ce(i)?Ae(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Y_={name:"definition",tokenize:W_},V_={partial:!0,tokenize:q_};function W_(e,t,n){const r=this;let i;return s;function s(p){return e.enter("definition"),a(p)}function a(p){return K1.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function u(p){return i=yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):n(p)}function o(p){return Me(p)?xs(e,c)(p):c(p)}function c(p){return Q1(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function f(p){return e.attempt(V_,h,h)(p)}function h(p){return Ce(p)?Ae(e,m,"whitespace")(p):m(p)}function m(p){return p===null||me(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function q_(e,t,n){return r;function r(u){return Me(u)?xs(e,i)(u):n(u)}function i(u){return X1(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return Ce(u)?Ae(e,a,"whitespace")(u):a(u)}function a(u){return u===null||me(u)?t(u):n(u)}}const G_={name:"hardBreakEscape",tokenize:Q_};function Q_(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return me(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const K_={name:"headingAtx",resolve:X_,tokenize:J_};function X_(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Jt(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function J_(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),s(f)}function s(f){return e.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(e.consume(f),a):f===null||Me(f)?(e.exit("atxHeadingSequence"),u(f)):n(f)}function u(f){return f===35?(e.enter("atxHeadingSequence"),o(f)):f===null||me(f)?(e.exit("atxHeading"),t(f)):Ce(f)?Ae(e,u,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function o(f){return f===35?(e.consume(f),o):(e.exit("atxHeadingSequence"),u(f))}function c(f){return f===null||f===35||Me(f)?(e.exit("atxHeadingText"),u(f)):(e.consume(f),c)}}const Z_=["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"],$h=["pre","script","style","textarea"],ek={concrete:!0,name:"htmlFlow",resolveTo:rk,tokenize:ik},tk={partial:!0,tokenize:ak},nk={partial:!0,tokenize:sk};function rk(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ik(e,t,n){const r=this;let i,s,a,u,o;return c;function c(N){return f(N)}function f(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),h}function h(N){return N===33?(e.consume(N),m):N===47?(e.consume(N),s=!0,x):N===63?(e.consume(N),i=3,r.interrupt?t:b):wt(N)?(e.consume(N),a=String.fromCharCode(N),A):n(N)}function m(N){return N===45?(e.consume(N),i=2,p):N===91?(e.consume(N),i=5,u=0,g):wt(N)?(e.consume(N),i=4,r.interrupt?t:b):n(N)}function p(N){return N===45?(e.consume(N),r.interrupt?t:b):n(N)}function g(N){const fe="CDATA[";return N===fe.charCodeAt(u++)?(e.consume(N),u===fe.length?r.interrupt?t:K:g):n(N)}function x(N){return wt(N)?(e.consume(N),a=String.fromCharCode(N),A):n(N)}function A(N){if(N===null||N===47||N===62||Me(N)){const fe=N===47,be=a.toLowerCase();return!fe&&!s&&$h.includes(be)?(i=1,r.interrupt?t(N):K(N)):Z_.includes(a.toLowerCase())?(i=6,fe?(e.consume(N),E):r.interrupt?t(N):K(N)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):s?T(N):k(N))}return N===45||St(N)?(e.consume(N),a+=String.fromCharCode(N),A):n(N)}function E(N){return N===62?(e.consume(N),r.interrupt?t:K):n(N)}function T(N){return Ce(N)?(e.consume(N),T):w(N)}function k(N){return N===47?(e.consume(N),w):N===58||N===95||wt(N)?(e.consume(N),L):Ce(N)?(e.consume(N),k):w(N)}function L(N){return N===45||N===46||N===58||N===95||St(N)?(e.consume(N),L):M(N)}function M(N){return N===61?(e.consume(N),S):Ce(N)?(e.consume(N),M):k(N)}function S(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),o=N,O):Ce(N)?(e.consume(N),S):D(N)}function O(N){return N===o?(e.consume(N),o=null,Y):N===null||me(N)?n(N):(e.consume(N),O)}function D(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Me(N)?M(N):(e.consume(N),D)}function Y(N){return N===47||N===62||Ce(N)?k(N):n(N)}function w(N){return N===62?(e.consume(N),z):n(N)}function z(N){return N===null||me(N)?K(N):Ce(N)?(e.consume(N),z):n(N)}function K(N){return N===45&&i===2?(e.consume(N),ve):N===60&&i===1?(e.consume(N),ne):N===62&&i===4?(e.consume(N),ee):N===63&&i===3?(e.consume(N),b):N===93&&i===5?(e.consume(N),B):me(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(tk,ce,de)(N)):N===null||me(N)?(e.exit("htmlFlowData"),de(N)):(e.consume(N),K)}function de(N){return e.check(nk,le,ce)(N)}function le(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),oe}function oe(N){return N===null||me(N)?de(N):(e.enter("htmlFlowData"),K(N))}function ve(N){return N===45?(e.consume(N),b):K(N)}function ne(N){return N===47?(e.consume(N),a="",I):K(N)}function I(N){if(N===62){const fe=a.toLowerCase();return $h.includes(fe)?(e.consume(N),ee):K(N)}return wt(N)&&a.length<8?(e.consume(N),a+=String.fromCharCode(N),I):K(N)}function B(N){return N===93?(e.consume(N),b):K(N)}function b(N){return N===62?(e.consume(N),ee):N===45&&i===2?(e.consume(N),b):K(N)}function ee(N){return N===null||me(N)?(e.exit("htmlFlowData"),ce(N)):(e.consume(N),ee)}function ce(N){return e.exit("htmlFlow"),t(N)}}function sk(e,t,n){const r=this;return i;function i(a){return me(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function ak(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(la,t,n)}}const uk={name:"htmlText",tokenize:lk};function lk(e,t,n){const r=this;let i,s,a;return u;function u(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),o}function o(b){return b===33?(e.consume(b),c):b===47?(e.consume(b),M):b===63?(e.consume(b),k):wt(b)?(e.consume(b),D):n(b)}function c(b){return b===45?(e.consume(b),f):b===91?(e.consume(b),s=0,g):wt(b)?(e.consume(b),T):n(b)}function f(b){return b===45?(e.consume(b),p):n(b)}function h(b){return b===null?n(b):b===45?(e.consume(b),m):me(b)?(a=h,ne(b)):(e.consume(b),h)}function m(b){return b===45?(e.consume(b),p):h(b)}function p(b){return b===62?ve(b):b===45?m(b):h(b)}function g(b){const ee="CDATA[";return b===ee.charCodeAt(s++)?(e.consume(b),s===ee.length?x:g):n(b)}function x(b){return b===null?n(b):b===93?(e.consume(b),A):me(b)?(a=x,ne(b)):(e.consume(b),x)}function A(b){return b===93?(e.consume(b),E):x(b)}function E(b){return b===62?ve(b):b===93?(e.consume(b),E):x(b)}function T(b){return b===null||b===62?ve(b):me(b)?(a=T,ne(b)):(e.consume(b),T)}function k(b){return b===null?n(b):b===63?(e.consume(b),L):me(b)?(a=k,ne(b)):(e.consume(b),k)}function L(b){return b===62?ve(b):k(b)}function M(b){return wt(b)?(e.consume(b),S):n(b)}function S(b){return b===45||St(b)?(e.consume(b),S):O(b)}function O(b){return me(b)?(a=O,ne(b)):Ce(b)?(e.consume(b),O):ve(b)}function D(b){return b===45||St(b)?(e.consume(b),D):b===47||b===62||Me(b)?Y(b):n(b)}function Y(b){return b===47?(e.consume(b),ve):b===58||b===95||wt(b)?(e.consume(b),w):me(b)?(a=Y,ne(b)):Ce(b)?(e.consume(b),Y):ve(b)}function w(b){return b===45||b===46||b===58||b===95||St(b)?(e.consume(b),w):z(b)}function z(b){return b===61?(e.consume(b),K):me(b)?(a=z,ne(b)):Ce(b)?(e.consume(b),z):Y(b)}function K(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),i=b,de):me(b)?(a=K,ne(b)):Ce(b)?(e.consume(b),K):(e.consume(b),le)}function de(b){return b===i?(e.consume(b),i=void 0,oe):b===null?n(b):me(b)?(a=de,ne(b)):(e.consume(b),de)}function le(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===47||b===62||Me(b)?Y(b):(e.consume(b),le)}function oe(b){return b===47||b===62||Me(b)?Y(b):n(b)}function ve(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}function ne(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),I}function I(b){return Ce(b)?Ae(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):B(b)}function B(b){return e.enter("htmlTextData"),a(b)}}const Md={name:"labelEnd",resolveAll:fk,resolveTo:hk,tokenize:mk},ok={tokenize:pk},ck={tokenize:gk},dk={tokenize:Ek};function fk(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Jt(e,0,e.length,n),e}function hk(e,t){let n=e.length,r=0,i,s,a,u;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const o={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},f={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return u=[["enter",o,t],["enter",c,t]],u=sn(u,e.slice(s+1,s+r+3)),u=sn(u,[["enter",f,t]]),u=sn(u,ol(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),u=sn(u,[["exit",f,t],e[a-2],e[a-1],["exit",c,t]]),u=sn(u,e.slice(a+1)),u=sn(u,[["exit",o,t]]),Jt(e,s,e.length,u),e}function mk(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return u;function u(m){return s?s._inactive?h(m):(a=r.parser.defined.includes(yn(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),o):n(m)}function o(m){return m===40?e.attempt(ok,f,a?f:h)(m):m===91?e.attempt(ck,f,a?c:h)(m):a?f(m):h(m)}function c(m){return e.attempt(dk,f,h)(m)}function f(m){return t(m)}function h(m){return s._balanced=!0,n(m)}}function pk(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return Me(h)?xs(e,s)(h):s(h)}function s(h){return h===41?f(h):Q1(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Me(h)?xs(e,o)(h):f(h)}function u(h){return n(h)}function o(h){return h===34||h===39||h===40?X1(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):f(h)}function c(h){return Me(h)?xs(e,f)(h):f(h)}function f(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function gk(e,t,n){const r=this;return i;function i(u){return K1.call(r,e,s,a,"reference","referenceMarker","referenceString")(u)}function s(u){return r.parser.defined.includes(yn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function Ek(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const Tk={name:"labelStartImage",resolveAll:Md.resolveAll,tokenize:yk};function yk(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),s}function s(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),a):n(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const xk={name:"labelStartLink",resolveAll:Md.resolveAll,tokenize:bk};function bk(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const eo={name:"lineEnding",tokenize:_k};function _k(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ae(e,t,"linePrefix")}}const Xa={name:"thematicBreak",tokenize:kk};function kk(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,u(c)}function u(c){return c===i?(e.enter("thematicBreakSequence"),o(c)):r>=3&&(c===null||me(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===i?(e.consume(c),r++,o):(e.exit("thematicBreakSequence"),Ce(c)?Ae(e,u,"whitespace")(c):u(c))}}const jt={continuation:{tokenize:vk},exit:wk,name:"list",tokenize:Nk},Sk={partial:!0,tokenize:Ik},Ck={partial:!0,tokenize:Ak};function Nk(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return u;function u(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Ec(p)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Xa,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return n(p)}function o(p){return Ec(p)&&++a<10?(e.consume(p),o):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(la,r.interrupt?n:f,e.attempt(Sk,m,h))}function f(p){return r.containerState.initialBlankLine=!0,s++,m(p)}function h(p){return Ce(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):n(p)}function m(p){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function vk(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(la,i,s);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ae(e,t,"listItemIndent",r.containerState.size+1)(u)}function s(u){return r.containerState.furtherBlankLines||!Ce(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Ck,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ae(e,e.attempt(jt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Ak(e,t,n){const r=this;return Ae(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function wk(e){e.exit(this.containerState.type)}function Ik(e,t,n){const r=this;return Ae(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!Ce(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Yh={name:"setextUnderline",resolveTo:Lk,tokenize:Dk};function Lk(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function Dk(e,t,n){const r=this;let i;return s;function s(c){let f=r.events.length,h;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){h=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),u(c)}function u(c){return c===i?(e.consume(c),u):(e.exit("setextHeadingLineSequence"),Ce(c)?Ae(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||me(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Rk={tokenize:Ok};function Ok(e){const t=this,n=e.attempt(la,r,e.attempt(this.parser.constructs.flowInitial,i,Ae(e,e.attempt(this.parser.constructs.flow,i,e.attempt(B_,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Pk={resolveAll:Z1()},Mk=J1("string"),jk=J1("text");function J1(e){return{resolveAll:Z1(e==="text"?Fk:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,u);return a;function a(f){return c(f)?s(f):u(f)}function u(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),o}function o(f){return c(f)?(n.exit("data"),s(f)):(n.consume(f),o)}function c(f){if(f===null)return!0;const h=i[f];let m=-1;if(h)for(;++m<h.length;){const p=h[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Z1(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function Fk(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,u=0,o;for(;s--;){const c=i[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(c===-2)o=!0,u++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const c={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const Bk={42:jt,43:jt,45:jt,48:jt,49:jt,50:jt,51:jt,52:jt,53:jt,54:jt,55:jt,56:jt,57:jt,62:V1},Uk={91:Y_},Hk={[-2]:Zl,[-1]:Zl,32:Zl},zk={35:K_,42:Xa,45:[Yh,Xa],60:ek,61:Yh,95:Xa,96:zh,126:zh},$k={38:q1,92:W1},Yk={[-5]:eo,[-4]:eo,[-3]:eo,33:Tk,38:q1,42:Tc,60:[x_,uk],91:xk,92:[G_,W1],93:Md,95:Tc,96:R_},Vk={null:[Tc,Pk]},Wk={null:[42,95]},qk={null:[]},Gk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Wk,contentInitial:Uk,disable:qk,document:Bk,flow:zk,flowInitial:Hk,insideSpan:Vk,string:$k,text:Yk},Symbol.toStringTag,{value:"Module"}));function Qk(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],u=[];const o={attempt:O(M),check:O(S),consume:T,enter:k,exit:L,interrupt:O(S,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:g,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:h};let f=t.tokenize.call(c,o);return t.resolveAll&&s.push(t),c;function h(z){return a=sn(a,z),A(),a[a.length-1]!==null?[]:(D(t,0),c.events=ol(s,c.events,c),c.events)}function m(z,K){return Xk(p(z),K)}function p(z){return Kk(a,z)}function g(){const{_bufferIndex:z,_index:K,line:de,column:le,offset:oe}=r;return{_bufferIndex:z,_index:K,line:de,column:le,offset:oe}}function x(z){i[z.line]=z.column,w()}function A(){let z;for(;r._index<a.length;){const K=a[r._index];if(typeof K=="string")for(z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<K.length;)E(K.charCodeAt(r._bufferIndex));else E(K)}}function E(z){f=f(z)}function T(z){me(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,w()):z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=z}function k(z,K){const de=K||{};return de.type=z,de.start=g(),c.events.push(["enter",de,c]),u.push(de),de}function L(z){const K=u.pop();return K.end=g(),c.events.push(["exit",K,c]),K}function M(z,K){D(z,K.from)}function S(z,K){K.restore()}function O(z,K){return de;function de(le,oe,ve){let ne,I,B,b;return Array.isArray(le)?ce(le):"tokenize"in le?ce([le]):ee(le);function ee(ge){return Oe;function Oe(rt){const gt=rt!==null&&ge[rt],se=rt!==null&&ge.null,R=[...Array.isArray(gt)?gt:gt?[gt]:[],...Array.isArray(se)?se:se?[se]:[]];return ce(R)(rt)}}function ce(ge){return ne=ge,I=0,ge.length===0?ve:N(ge[I])}function N(ge){return Oe;function Oe(rt){return b=Y(),B=ge,ge.partial||(c.currentConstruct=ge),ge.name&&c.parser.constructs.disable.null.includes(ge.name)?be():ge.tokenize.call(K?Object.assign(Object.create(c),K):c,o,fe,be)(rt)}}function fe(ge){return z(B,b),oe}function be(ge){return b.restore(),++I<ne.length?N(ne[I]):ve}}}function D(z,K){z.resolveAll&&!s.includes(z)&&s.push(z),z.resolve&&Jt(c.events,K,c.events.length-K,z.resolve(c.events.slice(K),c)),z.resolveTo&&(c.events=z.resolveTo(c.events,c))}function Y(){const z=g(),K=c.previous,de=c.currentConstruct,le=c.events.length,oe=Array.from(u);return{from:le,restore:ve};function ve(){r=z,c.previous=K,c.currentConstruct=de,c.events.length=le,u=oe,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Kk(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const u=a[0];typeof u=="string"?a[0]=u.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function Xk(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
|
|
395
|
+
`;break}case-3:{a=`\r
|
|
396
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function Jk(e){const r={constructs:$1([Gk,...(e||{}).extensions||[]]),content:i(h_),defined:[],document:i(p_),flow:i(Rk),lazy:{},string:i(Mk),text:i(jk)};return r;function i(s){return a;function a(u){return Qk(r,s,u)}}}function Zk(e){for(;!G1(e););return e}const Vh=/[\0\t\n\r]/g;function eS(){let e=1,t="",n=!0,r;return i;function i(s,a,u){const o=[];let c,f,h,m,p;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),h=0,t="",n&&(s.charCodeAt(0)===65279&&h++,n=void 0);h<s.length;){if(Vh.lastIndex=h,c=Vh.exec(s),m=c&&c.index!==void 0?c.index:s.length,p=s.charCodeAt(m),!c){t=s.slice(h);break}if(p===10&&h===m&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),h<m&&(o.push(s.slice(h,m)),e+=m-h),p){case 0:{o.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,o.push(-2);e++<f;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}h=m+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const tS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nS(e){return e.replace(tS,rS)}function rS(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return Y1(n.slice(s?2:1),s?16:10)}return Pd(n)||e}const eg={}.hasOwnProperty;function iS(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),sS(n)(Zk(Jk(n).document().write(eS()(e,t,!0))))}function sS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Yt),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:s(he),blockQuote:s(se),characterEscape:Y,characterReference:Y,codeFenced:s(R),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(R,a),codeText:s(W,a),codeTextData:Y,data:Y,codeFlowValue:Y,definition:s(U),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(te),hardBreakEscape:s(ye),hardBreakTrailing:s(ye),htmlFlow:s($e,a),htmlFlowData:Y,htmlText:s($e,a),htmlTextData:Y,image:s(Et),label:a,link:s(Yt),listItem:s(Sr),listItemValue:m,listOrdered:s(dn,h),listUnordered:s(dn),paragraph:s(Tl),reference:N,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(he),strong:s(yl),thematicBreak:s(Qr)},exit:{atxHeading:o(),atxHeadingSequence:M,autolink:o(),autolinkEmail:gt,autolinkProtocol:rt,blockQuote:o(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:ge,characterReference:Oe,codeFenced:o(A),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:w,codeIndented:o(E),codeText:o(oe),codeTextData:w,data:w,definition:o(),definitionDestinationString:L,definitionLabelString:T,definitionTitleString:k,emphasis:o(),hardBreakEscape:o(K),hardBreakTrailing:o(K),htmlFlow:o(de),htmlFlowData:w,htmlText:o(le),htmlTextData:w,image:o(ne),label:B,labelText:I,lineEnding:z,link:o(ve),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:fe,resourceDestinationString:b,resourceTitleString:ee,resource:ce,setextHeading:o(D),setextHeadingLineSequence:O,setextHeadingText:S,strong:o(),thematicBreak:o()}};tg(t,(e||{}).mdastExtensions||[]);const n={};return r;function r($){let X={type:"root",children:[]};const pe={stack:[X],tokenStack:[],config:t,enter:u,exit:c,buffer:a,resume:f,data:n},_e=[];let Ie=-1;for(;++Ie<$.length;)if($[Ie][1].type==="listOrdered"||$[Ie][1].type==="listUnordered")if($[Ie][0]==="enter")_e.push(Ie);else{const Ot=_e.pop();Ie=i($,Ot,Ie)}for(Ie=-1;++Ie<$.length;){const Ot=t[$[Ie][0]];eg.call(Ot,$[Ie][1].type)&&Ot[$[Ie][1].type].call(Object.assign({sliceSerialize:$[Ie][2].sliceSerialize},pe),$[Ie][1])}if(pe.tokenStack.length>0){const Ot=pe.tokenStack[pe.tokenStack.length-1];(Ot[1]||Wh).call(pe,void 0,Ot[0])}for(X.position={start:Xn($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:Xn($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<t.transforms.length;)X=t.transforms[Ie](X)||X;return X}function i($,X,pe){let _e=X-1,Ie=-1,Ot=!1,ot,ct,_n,kn;for(;++_e<=pe;){const Tt=$[_e];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?Ie++:Ie--,kn=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(ot&&!kn&&!Ie&&!_n&&(_n=_e),kn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:kn=void 0}if(!Ie&&Tt[0]==="enter"&&Tt[1].type==="listItemPrefix"||Ie===-1&&Tt[0]==="exit"&&(Tt[1].type==="listUnordered"||Tt[1].type==="listOrdered")){if(ot){let yt=_e;for(ct=void 0;yt--;){const Ue=$[yt];if(Ue[1].type==="lineEnding"||Ue[1].type==="lineEndingBlank"){if(Ue[0]==="exit")continue;ct&&($[ct][1].type="lineEndingBlank",Ot=!0),Ue[1].type="lineEnding",ct=yt}else if(!(Ue[1].type==="linePrefix"||Ue[1].type==="blockQuotePrefix"||Ue[1].type==="blockQuotePrefixWhitespace"||Ue[1].type==="blockQuoteMarker"||Ue[1].type==="listItemIndent"))break}_n&&(!ct||_n<ct)&&(ot._spread=!0),ot.end=Object.assign({},ct?$[ct][1].start:Tt[1].end),$.splice(ct||_e,0,["exit",ot,Tt[2]]),_e++,pe++}if(Tt[1].type==="listItemPrefix"){const yt={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};ot=yt,$.splice(_e,0,["enter",yt,Tt[2]]),_e++,pe++,_n=void 0,kn=!0}}}return $[X][1]._spread=Ot,pe}function s($,X){return pe;function pe(_e){u.call(this,$(_e),_e),X&&X.call(this,_e)}}function a(){this.stack.push({type:"fragment",children:[]})}function u($,X,pe){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([X,pe||void 0]),$.position={start:Xn(X.start),end:void 0}}function o($){return X;function X(pe){$&&$.call(this,pe),c.call(this,pe)}}function c($,X){const pe=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==$.type&&(X?X.call(this,$,_e[0]):(_e[1]||Wh).call(this,$,_e[0]));else throw new Error("Cannot close `"+$.type+"` ("+ys({start:$.start,end:$.end})+"): it’s not open");pe.position.end=Xn($.end)}function f(){return Od(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function m($){if(this.data.expectingFirstListItemValue){const X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function p(){const $=this.resume(),X=this.stack[this.stack.length-1];X.lang=$}function g(){const $=this.resume(),X=this.stack[this.stack.length-1];X.meta=$}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const $=this.resume(),X=this.stack[this.stack.length-1];X.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const $=this.resume(),X=this.stack[this.stack.length-1];X.value=$.replace(/(\r?\n|\r)$/g,"")}function T($){const X=this.resume(),pe=this.stack[this.stack.length-1];pe.label=X,pe.identifier=yn(this.sliceSerialize($)).toLowerCase()}function k(){const $=this.resume(),X=this.stack[this.stack.length-1];X.title=$}function L(){const $=this.resume(),X=this.stack[this.stack.length-1];X.url=$}function M($){const X=this.stack[this.stack.length-1];if(!X.depth){const pe=this.sliceSerialize($).length;X.depth=pe}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function O($){const X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function Y($){const pe=this.stack[this.stack.length-1].children;let _e=pe[pe.length-1];(!_e||_e.type!=="text")&&(_e=xl(),_e.position={start:Xn($.start),end:void 0},pe.push(_e)),this.stack.push(_e)}function w($){const X=this.stack.pop();X.value+=this.sliceSerialize($),X.position.end=Xn($.end)}function z($){const X=this.stack[this.stack.length-1];if(this.data.atHardBreak){const pe=X.children[X.children.length-1];pe.position.end=Xn($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(X.type)&&(Y.call(this,$),w.call(this,$))}function K(){this.data.atHardBreak=!0}function de(){const $=this.resume(),X=this.stack[this.stack.length-1];X.value=$}function le(){const $=this.resume(),X=this.stack[this.stack.length-1];X.value=$}function oe(){const $=this.resume(),X=this.stack[this.stack.length-1];X.value=$}function ve(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=X,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function ne(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=X,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function I($){const X=this.sliceSerialize($),pe=this.stack[this.stack.length-2];pe.label=nS(X),pe.identifier=yn(X).toLowerCase()}function B(){const $=this.stack[this.stack.length-1],X=this.resume(),pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,pe.type==="link"){const _e=$.children;pe.children=_e}else pe.alt=X}function b(){const $=this.resume(),X=this.stack[this.stack.length-1];X.url=$}function ee(){const $=this.resume(),X=this.stack[this.stack.length-1];X.title=$}function ce(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function fe($){const X=this.resume(),pe=this.stack[this.stack.length-1];pe.label=X,pe.identifier=yn(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function be($){this.data.characterReferenceType=$.type}function ge($){const X=this.sliceSerialize($),pe=this.data.characterReferenceType;let _e;pe?(_e=Y1(X,pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=Pd(X);const Ie=this.stack[this.stack.length-1];Ie.value+=_e}function Oe($){const X=this.stack.pop();X.position.end=Xn($.end)}function rt($){w.call(this,$);const X=this.stack[this.stack.length-1];X.url=this.sliceSerialize($)}function gt($){w.call(this,$);const X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize($)}function se(){return{type:"blockquote",children:[]}}function R(){return{type:"code",lang:null,meta:null,value:""}}function W(){return{type:"inlineCode",value:""}}function U(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function te(){return{type:"emphasis",children:[]}}function he(){return{type:"heading",depth:0,children:[]}}function ye(){return{type:"break"}}function $e(){return{type:"html",value:""}}function Et(){return{type:"image",title:null,url:"",alt:null}}function Yt(){return{type:"link",title:null,url:"",children:[]}}function dn($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function Sr($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function Tl(){return{type:"paragraph",children:[]}}function yl(){return{type:"strong",children:[]}}function xl(){return{type:"text",value:""}}function Qr(){return{type:"thematicBreak"}}}function Xn(e){return{line:e.line,column:e.column,offset:e.offset}}function tg(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?tg(e,r):aS(e,r)}}function aS(e,t){let n;for(n in t)if(eg.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Wh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ys({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ys({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ys({start:t.start,end:t.end})+") is still open")}function uS(e){const t=this;t.parser=n;function n(r){return iS(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function lS(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function oS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
397
|
+
`}]}function cS(e,t){const n=t.value?t.value+`
|
|
398
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function dS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Bi(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}function mS(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ng(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function gS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ng(e,t);const i={src:Bi(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function ES(e,t){const n={src:Bi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function TS(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function yS(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ng(e,t);const i={href:Bi(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function xS(e,t){const n={href:Bi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bS(e,t,n){const r=e.all(t),i=n?_S(n):rg(t),s={},a=[];if(typeof t.checked=="boolean"){const f=r[0];let h;f&&f.type==="element"&&f.tagName==="p"?h=f:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const f=r[u];(i||u!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
|
|
399
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}const o=r[r.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&a.push({type:"text",value:`
|
|
400
|
+
`});const c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function _S(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=rg(n[r])}return t}function rg(e){const t=e.spread;return t??e.children.length>1}function kS(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function SS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function NS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vS(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Rn(t.children[1]),o=ul(t.children[t.children.length-1]);u&&o&&(a.position={start:u,end:o}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function AS(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,u=a?a.length:t.children.length;let o=-1;const c=[];for(;++o<u;){const h=t.children[o],m={},p=a?a[o]:void 0;p&&(m.align=p);let g={type:"element",tagName:s,properties:m,children:[]};h&&(g.children=e.all(h),e.patch(h,g),g=e.applyData(h,g)),c.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function wS(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const qh=9,Gh=32;function IS(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Qh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Qh(t.slice(i),i>0,!1)),s.join("")}function Qh(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===qh||s===Gh;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===qh||s===Gh;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function LS(e,t){const n={type:"text",value:IS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function DS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const RS={blockquote:lS,break:oS,code:cS,delete:dS,emphasis:fS,footnoteReference:hS,heading:mS,html:pS,imageReference:gS,image:ES,inlineCode:TS,linkReference:yS,link:xS,listItem:bS,list:kS,paragraph:SS,root:CS,strong:NS,table:vS,tableCell:wS,tableRow:AS,text:LS,thematicBreak:DS,toml:Ia,yaml:Ia,definition:Ia,footnoteDefinition:Ia};function Ia(){}const ig=-1,cl=0,bs=1,Iu=2,jd=3,Fd=4,Bd=5,Ud=6,sg=7,ag=8,Kh=typeof self=="object"?self:globalThis,OS=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case cl:case ig:return n(a,i);case bs:{const u=n([],i);for(const o of a)u.push(r(o));return u}case Iu:{const u=n({},i);for(const[o,c]of a)u[r(o)]=r(c);return u}case jd:return n(new Date(a),i);case Fd:{const{source:u,flags:o}=a;return n(new RegExp(u,o),i)}case Bd:{const u=n(new Map,i);for(const[o,c]of a)u.set(r(o),r(c));return u}case Ud:{const u=n(new Set,i);for(const o of a)u.add(r(o));return u}case sg:{const{name:u,message:o}=a;return n(new Kh[u](o),i)}case ag:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:u}=new Uint8Array(a);return n(new DataView(u),a)}}return n(new Kh[s](a),i)};return r},Xh=e=>OS(new Map,e)(0),ei="",{toString:PS}={},{keys:MS}=Object,ts=e=>{const t=typeof e;if(t!=="object"||!e)return[cl,t];const n=PS.call(e).slice(8,-1);switch(n){case"Array":return[bs,ei];case"Object":return[Iu,ei];case"Date":return[jd,ei];case"RegExp":return[Fd,ei];case"Map":return[Bd,ei];case"Set":return[Ud,ei];case"DataView":return[bs,n]}return n.includes("Array")?[bs,n]:n.includes("Error")?[sg,n]:[Iu,n]},La=([e,t])=>e===cl&&(t==="function"||t==="symbol"),jS=(e,t,n,r)=>{const i=(a,u)=>{const o=r.push(a)-1;return n.set(u,o),o},s=a=>{if(n.has(a))return n.get(a);let[u,o]=ts(a);switch(u){case cl:{let f=a;switch(o){case"bigint":u=ag,f=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);f=null;break;case"undefined":return i([ig],a)}return i([u,f],a)}case bs:{if(o){let m=a;return o==="DataView"?m=new Uint8Array(a.buffer):o==="ArrayBuffer"&&(m=new Uint8Array(a)),i([o,[...m]],a)}const f=[],h=i([u,f],a);for(const m of a)f.push(s(m));return h}case Iu:{if(o)switch(o){case"BigInt":return i([o,a.toString()],a);case"Boolean":case"Number":case"String":return i([o,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const f=[],h=i([u,f],a);for(const m of MS(a))(e||!La(ts(a[m])))&&f.push([s(m),s(a[m])]);return h}case jd:return i([u,a.toISOString()],a);case Fd:{const{source:f,flags:h}=a;return i([u,{source:f,flags:h}],a)}case Bd:{const f=[],h=i([u,f],a);for(const[m,p]of a)(e||!(La(ts(m))||La(ts(p))))&&f.push([s(m),s(p)]);return h}case Ud:{const f=[],h=i([u,f],a);for(const m of a)(e||!La(ts(m)))&&f.push(s(m));return h}}const{message:c}=a;return i([u,{name:o,message:c}],a)};return s},Jh=(e,{json:t,lossy:n}={})=>{const r=[];return jS(!(t||n),!!t,new Map,r)(e),r},Ri=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Xh(Jh(e,t)):structuredClone(e):(e,t)=>Xh(Jh(e,t));function FS(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function BS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function US(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||FS,r=e.options.footnoteBackLabel||BS,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[o]);if(!c)continue;const f=e.all(c),h=String(c.identifier).toUpperCase(),m=Bi(h.toLowerCase());let p=0;const g=[],x=e.footnoteCounts.get(h);for(;x!==void 0&&++p<=x;){g.length>0&&g.push({type:"text",value:" "});let T=typeof n=="string"?n:n(o,p);typeof T=="string"&&(T={type:"text",value:T}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,p),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const A=f[f.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const T=A.children[A.children.length-1];T&&T.type==="text"?T.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...g)}else f.push(...g);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(f,!0)};e.patch(c,E),u.push(E)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ri(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
401
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
402
|
+
`}]}}const dl=function(e){if(e==null)return YS;if(typeof e=="function")return fl(e);if(typeof e=="object")return Array.isArray(e)?HS(e):zS(e);if(typeof e=="string")return $S(e);throw new Error("Expected function, string, or object as test")};function HS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=dl(e[n]);return fl(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function zS(e){const t=e;return fl(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function $S(e){return fl(t);function t(n){return n&&n.type===e}}function fl(e){return t;function t(n,r,i){return!!(VS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function YS(){return!0}function VS(e){return e!==null&&typeof e=="object"&&"type"in e}const ug=[],WS=!0,yc=!1,qS="skip";function lg(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=dl(i),a=r?-1:1;u(e,void 0,[])();function u(o,c,f){const h=o&&typeof o=="object"?o:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(o.type+(p?"<"+p+">":""))+")"})}return m;function m(){let p=ug,g,x,A;if((!t||s(o,c,f[f.length-1]||void 0))&&(p=GS(n(o,f)),p[0]===yc))return p;if("children"in o&&o.children){const E=o;if(E.children&&p[0]!==qS)for(x=(r?E.children.length:-1)+a,A=f.concat(E);x>-1&&x<E.children.length;){const T=E.children[x];if(g=u(T,x,A)(),g[0]===yc)return g;x=typeof g[1]=="number"?g[1]:x+a}}return p}}}function GS(e){return Array.isArray(e)?e:typeof e=="number"?[WS,e]:e==null?ug:[e]}function hl(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),lg(e,s,u,i);function u(o,c){const f=c[c.length-1],h=f?f.children.indexOf(o):void 0;return a(o,h,f)}}const xc={}.hasOwnProperty,QS={};function KS(e,t){const n=t||QS,r=new Map,i=new Map,s=new Map,a={...RS,...n.handlers},u={all:c,applyData:JS,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:o,options:n,patch:XS,wrap:e3};return hl(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?r:i,m=String(f.identifier).toUpperCase();h.has(m)||h.set(m,f)}}),u;function o(f,h){const m=f.type,p=u.handlers[m];if(xc.call(u.handlers,m)&&p)return p(u,f,h);if(u.options.passThrough&&u.options.passThrough.includes(m)){if("children"in f){const{children:x,...A}=f,E=Ri(A);return E.children=u.all(f),E}return Ri(f)}return(u.options.unknownHandler||ZS)(u,f,h)}function c(f){const h=[];if("children"in f){const m=f.children;let p=-1;for(;++p<m.length;){const g=u.one(m[p],f);if(g){if(p&&m[p-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=Zh(g.value)),!Array.isArray(g)&&g.type==="element")){const x=g.children[0];x&&x.type==="text"&&(x.value=Zh(x.value))}Array.isArray(g)?h.push(...g):h.push(g)}}}return h}}function XS(e,t){e.position&&(t.position=Bb(e))}function JS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,Ri(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function ZS(e,t){const n=t.data||{},r="value"in t&&!(xc.call(n,"hProperties")||xc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function e3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
403
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
404
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
405
|
+
`}),n}function Zh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function em(e,t){const n=KS(e,t),r=n.one(e,void 0),i=US(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
406
|
+
`},i),s}function t3(e,t){return e&&"run"in e?async function(n,r){const i=em(n,{file:r,...t});await e.run(i,r)}:function(n,r){return em(n,{file:r,...e||t})}}function tm(e){if(e)throw e}var Ja=Object.prototype.hasOwnProperty,og=Object.prototype.toString,nm=Object.defineProperty,rm=Object.getOwnPropertyDescriptor,im=function(t){return typeof Array.isArray=="function"?Array.isArray(t):og.call(t)==="[object Array]"},sm=function(t){if(!t||og.call(t)!=="[object Object]")return!1;var n=Ja.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ja.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Ja.call(t,i)},am=function(t,n){nm&&n.name==="__proto__"?nm(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},um=function(t,n){if(n==="__proto__")if(Ja.call(t,n)){if(rm)return rm(t,n).value}else return;return t[n]},n3=function e(){var t,n,r,i,s,a,u=arguments[0],o=1,c=arguments.length,f=!1;for(typeof u=="boolean"&&(f=u,u=arguments[1]||{},o=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});o<c;++o)if(t=arguments[o],t!=null)for(n in t)r=um(u,n),i=um(t,n),u!==i&&(f&&i&&(sm(i)||(s=im(i)))?(s?(s=!1,a=r&&im(r)?r:[]):a=r&&sm(r)?r:{},am(u,{name:n,newValue:e(f,a,i)})):typeof i<"u"&&am(u,{name:n,newValue:i}));return u};const to=Fu(n3);function bc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function r3(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...i);function u(o,...c){const f=e[++s];let h=-1;if(o){a(o);return}for(;++h<i.length;)(c[h]===null||c[h]===void 0)&&(c[h]=i[h]);i=c,f?i3(f,u)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function i3(e,t){let n;return r;function r(...a){const u=e.length>a.length;let o;u&&a.push(i);try{o=e.apply(this,a)}catch(c){const f=c;if(u&&n)throw f;return i(f)}u||(o&&o.then&&typeof o.then=="function"?o.then(s,i):o instanceof Error?i(o):s(o))}function i(a,...u){n||(n=!0,t(a,...u))}function s(a){i(null,a)}}const vn={basename:s3,dirname:a3,extname:u3,join:l3,sep:"/"};function s3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');oa(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function a3(e){if(oa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function u3(e){oa(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const u=e.codePointAt(t);if(u===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),u===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function l3(...e){let t=-1,n;for(;++t<e.length;)oa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":o3(n)}function o3(e){oa(e);const t=e.codePointAt(0)===47;let n=c3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function c3(e,t){let n="",r=0,i=-1,s=0,a=-1,u,o;for(;++a<=e.length;){if(a<e.length)u=e.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else u===46&&s>-1?s++:s=-1}return n}function oa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const d3={cwd:f3};function f3(){return"/"}function _c(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function h3(e){if(typeof e=="string")e=new URL(e);else if(!_c(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return m3(e)}function m3(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const no=["history","path","basename","stem","extname","dirname"];class cg{constructor(t){let n;t?_c(t)?n={path:t}:typeof t=="string"||p3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":d3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<no.length;){const s=no[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)no.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?vn.basename(this.path):void 0}set basename(t){io(t,"basename"),ro(t,"basename"),this.path=vn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vn.dirname(this.path):void 0}set dirname(t){lm(this.basename,"dirname"),this.path=vn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vn.extname(this.path):void 0}set extname(t){if(ro(t,"extname"),lm(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=vn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){_c(t)&&(t=h3(t)),io(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vn.basename(this.path,this.extname):void 0}set stem(t){io(t,"stem"),ro(t,"stem"),this.path=vn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Nt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ro(e,t){if(e&&e.includes(vn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vn.sep+"`")}function io(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function lm(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function p3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const g3=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},E3={}.hasOwnProperty;class Hd extends g3{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=r3()}copy(){const t=new Hd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(to(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(uo("data",this.frozen),this.namespace[t]=n,this):E3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(uo("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Da(t),r=this.parser||this.Parser;return so("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),so("process",this.parser||this.Parser),ao("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const u=Da(t),o=r.parse(u);r.run(o,u,function(f,h,m){if(f||!h||!m)return c(f);const p=h,g=r.stringify(p,m);x3(g)?m.value=g:m.result=g,c(f,m)});function c(f,h){f||!h?a(f):s?s(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),so("processSync",this.parser||this.Parser),ao("processSync",this.compiler||this.Compiler),this.process(t,i),cm("processSync","process",n),r;function i(s,a){n=!0,tm(s),r=a}}run(t,n,r){om(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,u){const o=Da(n);i.run(t,o,c);function c(f,h,m){const p=h||t;f?u(f):a?a(p):r(void 0,p,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),cm("runSync","run",r),i;function s(a,u){tm(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=Da(n),i=this.compiler||this.Compiler;return ao("stringify",i),om(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(uo("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...h]=c;o(f,h)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))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");u(c.plugins),c.settings&&(i.settings=to(!0,i.settings,c.settings))}function u(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const h=c[f];s(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,f){let h=-1,m=-1;for(;++h<r.length;)if(r[h][0]===c){m=h;break}if(m===-1)r.push([c,...f]);else if(f.length>0){let[p,...g]=f;const x=r[m][1];bc(x)&&bc(p)&&(p=to(!0,x,p)),r[m]=[c,p,...g]}}}}const T3=new Hd().freeze();function so(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ao(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function uo(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function om(e){if(!bc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Da(e){return y3(e)?e:new cg(e)}function y3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function x3(e){return typeof e=="string"||b3(e)}function b3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",dm=[],fm={allowDangerousHtml:!0},k3=/^(https?|ircs?|mailto|xmpp)$/i,S3=[{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:"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 C3(e){const t=N3(e),n=v3(e);return A3(t.runSync(t.parse(n),n),e)}function N3(e){const t=e.rehypePlugins||dm,n=e.remarkPlugins||dm,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...fm}:fm;return T3().use(uS).use(n).use(t3,r).use(t)}function v3(e){const t=e.children||"",n=new cg;return typeof t=="string"&&(n.value=t),n}function A3(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,u=t.unwrapDisallowed,o=t.urlTransform||w3;for(const f of S3)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+_3+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),hl(e,c),Yb(e,{Fragment:l.Fragment,components:i,ignoreInvalidStyle:!0,jsx:l.jsx,jsxs:l.jsxs,passKeys:!0,passNode:!0});function c(f,h,m){if(f.type==="raw"&&m&&typeof h=="number")return a?m.children.splice(h,1):m.children[h]={type:"text",value:f.value},h;if(f.type==="element"){let p;for(p in Jl)if(Object.hasOwn(Jl,p)&&Object.hasOwn(f.properties,p)){const g=f.properties[p],x=Jl[p];(x===null||x.includes(f.tagName))&&(f.properties[p]=o(String(g||""),p,f))}}if(f.type==="element"){let p=n?!n.includes(f.tagName):s?s.includes(f.tagName):!1;if(!p&&r&&typeof h=="number"&&(p=!r(f,h,m)),p&&m&&typeof h=="number")return u&&f.children?m.children.splice(h,1,...f.children):m.children.splice(h,1),h}}}function w3(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||k3.test(e.slice(0,t))?e:""}const hm=/[#.]/g;function I3(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){hm.lastIndex=i;const u=hm.exec(n),o=n.slice(i,u?u.index:n.length);o&&(s?s==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:a=o,i+=o.length),u&&(s=u[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function dg(e,t,n){const r=n?O3(n):void 0;function i(s,a,...u){let o;if(s==null){o={type:"root",children:[]};const c=a;u.unshift(c)}else{o=I3(s,t);const c=o.tagName.toLowerCase(),f=r?r.get(c):void 0;if(o.tagName=f||c,L3(a))u.unshift(a);else for(const[h,m]of Object.entries(a))D3(e,o.properties,h,m)}for(const c of u)kc(o.children,c);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return i}function L3(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function D3(e,t,n,r){const i=sl(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Ah(r):i.commaSeparated?s=kh(r):i.commaOrSpaceSeparated?s=Ah(kh(r).join(" ")):s=mm(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?R3(r):String(r);if(Array.isArray(s)){const a=[];for(const u of s)a.push(mm(i,i.property,u));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function kc(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)kc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?kc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function mm(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Gs(n)===Gs(t)))return!0}return n}function R3(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function O3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const P3=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],M3=dg(ua,"div"),j3=dg(_r,"g",P3);function F3(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let u=n[a];if(u===void 0){const o=pm(t,n[a-1]);u=o===-1?t.length+1:o+1,n[a]=u}if(u>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const u=n[n.length-1],o=pm(t,u),c=o===-1?t.length+1:o+1;if(u===c)break;n.push(c)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function pm(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
407
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Rr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},fg={}.hasOwnProperty,B3=Object.prototype;function U3(e,t){const n=t||{};return zd({file:n.file||void 0,location:!1,schema:n.space==="svg"?_r:ua,verbose:n.verbose||!1},e)}function zd(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Za(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:hg(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=F3(s),u=a.toPoint(0),o=a.toPoint(s.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Za(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Za(e,r,n),n}default:return n=H3(e,t),n}}function hg(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=zd(e,t[n]);r.push(i)}return r}function H3(e,t){const n=e.schema;e.schema=t.namespaceURI===Rr.svg?_r:ua;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;fg.call(B3,o)||(i[o]=u.value)}const a=(e.schema.space==="svg"?j3:M3)(t.tagName,i,hg(e,t.childNodes));if(Za(e,t,a),a.tagName==="template"){const u=t,o=u.sourceCodeLocation,c=o&&o.startTag&&gi(o.startTag),f=o&&o.endTag&&gi(o.endTag),h=zd(e,u.content);c&&f&&e.file&&(h.position={start:c.end,end:f.start}),a.content=h}return e.schema=n,a}function Za(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=z3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function z3(e,t,n){const r=gi(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)fg.call(n.attrs,a)&&(s[sl(e.schema,a).property]=gi(n.attrs[a]));n.startTag;const u=gi(n.startTag),o=n.endTag?gi(n.endTag):void 0,c={opening:u};o&&(c.closing=o),c.properties=s,t.data={position:c}}}return r}function gi(e){const t=gm({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=gm({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function gm(e){return e.line&&e.column?e:void 0}const Em={}.hasOwnProperty;function mg(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const u=r.handlers;if(i&&Em.call(i,e)){const o=String(i[e]);a=Em.call(u,o)?u[o]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const $3={},Y3={}.hasOwnProperty,pg=mg("type",{handlers:{root:W3,element:X3,text:Q3,comment:K3,doctype:G3}});function V3(e,t){const r=(t||$3).space;return pg(e,r==="svg"?_r:ua)}function W3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=$d(e.children,n,t),Ui(e,n),n}function q3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=$d(e.children,n,t),Ui(e,n),n}function G3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ui(e,t),t}function Q3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ui(e,t),t}function K3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ui(e,t),t}function X3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=_r);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&Y3.call(e.properties,s)){const o=J3(r,s,e.properties[s]);o&&i.push(o)}}const a=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Rr[a],childNodes:[],parentNode:null};return u.childNodes=$d(e.children,u,r),Ui(e,u),e.tagName==="template"&&e.content&&(u.content=q3(e.content,r)),u}function J3(e,t,n){const r=sl(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?A1(n):M1(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Rr[r.space]}return i}function $d(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=pg(e[r],n);s.parentNode=t,i.push(s)}return i}function Ui(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const Z3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],eC=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Ye="�";var _;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(_||(_={}));const Mt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function gg(e){return e>=55296&&e<=57343}function tC(e){return e>=56320&&e<=57343}function nC(e,t){return(e-55296)*1024+9216+t}function Eg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Tg(e){return e>=64976&&e<=65007||eC.has(e)}var H;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(H||(H={}));const rC=65536;class iC{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=rC,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:s}=this,a=i+n,u=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(tC(n))return this.pos++,this._addGap(),nC(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,_.EOF;return this._err(H.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;const r=this.html.charCodeAt(n);return r===_.CARRIAGE_RETURN?_.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;let t=this.html.charCodeAt(this.pos);return t===_.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,_.LINE_FEED):t===_.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,gg(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===_.LINE_FEED||t===_.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Eg(t)?this._err(H.controlCharacterInInputStream):Tg(t)&&this._err(H.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Se;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Se||(Se={}));function yg(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const sC=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),aC=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function uC(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=aC.get(e))!==null&&t!==void 0?t:e}var ut;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ut||(ut={}));const lC=32;var ur;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ur||(ur={}));function Sc(e){return e>=ut.ZERO&&e<=ut.NINE}function oC(e){return e>=ut.UPPER_A&&e<=ut.UPPER_F||e>=ut.LOWER_A&&e<=ut.LOWER_F}function cC(e){return e>=ut.UPPER_A&&e<=ut.UPPER_Z||e>=ut.LOWER_A&&e<=ut.LOWER_Z||Sc(e)}function dC(e){return e===ut.EQUALS||cC(e)}var st;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(st||(st={}));var Fn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Fn||(Fn={}));class fC{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=st.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Fn.Strict}startEntity(t){this.decodeMode=t,this.state=st.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case st.EntityStart:return t.charCodeAt(n)===ut.NUM?(this.state=st.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=st.NamedEntity,this.stateNamedEntity(t,n));case st.NumericStart:return this.stateNumericStart(t,n);case st.NumericDecimal:return this.stateNumericDecimal(t,n);case st.NumericHex:return this.stateNumericHex(t,n);case st.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|lC)===ut.LOWER_X?(this.state=st.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=st.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Sc(i)||oC(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Sc(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ut.SEMI)this.consumed+=1;else if(this.decodeMode===Fn.Strict)return 0;return this.emitCodePoint(uC(this.result),this.consumed),this.errors&&(t!==ut.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&ur.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=hC(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Fn.Attribute&&(s===0||dC(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&ur.VALUE_LENGTH)>>14,s!==0){if(a===ut.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Fn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&ur.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~ur.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case st.NamedEntity:return this.result!==0&&(this.decodeMode!==Fn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case st.NumericDecimal:return this.emitNumericEntity(0,2);case st.NumericHex:return this.emitNumericEntity(0,3);case st.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case st.EntityStart:return 0}}}function hC(e,t,n,r){const i=(t&ur.BRANCH_LENGTH)>>7,s=t&ur.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const o=r-s;return o<0||o>=i?-1:e[n+o]-1}let a=n,u=a+i-1;for(;a<=u;){const o=a+u>>>1,c=e[o];if(c<r)a=o+1;else if(c>r)u=o-1;else return e[o+i]}return-1}var V;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(V||(V={}));var Mr;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Mr||(Mr={}));var an;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(an||(an={}));var F;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(F||(F={}));var d;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(d||(d={}));const mC=new Map([[F.A,d.A],[F.ADDRESS,d.ADDRESS],[F.ANNOTATION_XML,d.ANNOTATION_XML],[F.APPLET,d.APPLET],[F.AREA,d.AREA],[F.ARTICLE,d.ARTICLE],[F.ASIDE,d.ASIDE],[F.B,d.B],[F.BASE,d.BASE],[F.BASEFONT,d.BASEFONT],[F.BGSOUND,d.BGSOUND],[F.BIG,d.BIG],[F.BLOCKQUOTE,d.BLOCKQUOTE],[F.BODY,d.BODY],[F.BR,d.BR],[F.BUTTON,d.BUTTON],[F.CAPTION,d.CAPTION],[F.CENTER,d.CENTER],[F.CODE,d.CODE],[F.COL,d.COL],[F.COLGROUP,d.COLGROUP],[F.DD,d.DD],[F.DESC,d.DESC],[F.DETAILS,d.DETAILS],[F.DIALOG,d.DIALOG],[F.DIR,d.DIR],[F.DIV,d.DIV],[F.DL,d.DL],[F.DT,d.DT],[F.EM,d.EM],[F.EMBED,d.EMBED],[F.FIELDSET,d.FIELDSET],[F.FIGCAPTION,d.FIGCAPTION],[F.FIGURE,d.FIGURE],[F.FONT,d.FONT],[F.FOOTER,d.FOOTER],[F.FOREIGN_OBJECT,d.FOREIGN_OBJECT],[F.FORM,d.FORM],[F.FRAME,d.FRAME],[F.FRAMESET,d.FRAMESET],[F.H1,d.H1],[F.H2,d.H2],[F.H3,d.H3],[F.H4,d.H4],[F.H5,d.H5],[F.H6,d.H6],[F.HEAD,d.HEAD],[F.HEADER,d.HEADER],[F.HGROUP,d.HGROUP],[F.HR,d.HR],[F.HTML,d.HTML],[F.I,d.I],[F.IMG,d.IMG],[F.IMAGE,d.IMAGE],[F.INPUT,d.INPUT],[F.IFRAME,d.IFRAME],[F.KEYGEN,d.KEYGEN],[F.LABEL,d.LABEL],[F.LI,d.LI],[F.LINK,d.LINK],[F.LISTING,d.LISTING],[F.MAIN,d.MAIN],[F.MALIGNMARK,d.MALIGNMARK],[F.MARQUEE,d.MARQUEE],[F.MATH,d.MATH],[F.MENU,d.MENU],[F.META,d.META],[F.MGLYPH,d.MGLYPH],[F.MI,d.MI],[F.MO,d.MO],[F.MN,d.MN],[F.MS,d.MS],[F.MTEXT,d.MTEXT],[F.NAV,d.NAV],[F.NOBR,d.NOBR],[F.NOFRAMES,d.NOFRAMES],[F.NOEMBED,d.NOEMBED],[F.NOSCRIPT,d.NOSCRIPT],[F.OBJECT,d.OBJECT],[F.OL,d.OL],[F.OPTGROUP,d.OPTGROUP],[F.OPTION,d.OPTION],[F.P,d.P],[F.PARAM,d.PARAM],[F.PLAINTEXT,d.PLAINTEXT],[F.PRE,d.PRE],[F.RB,d.RB],[F.RP,d.RP],[F.RT,d.RT],[F.RTC,d.RTC],[F.RUBY,d.RUBY],[F.S,d.S],[F.SCRIPT,d.SCRIPT],[F.SEARCH,d.SEARCH],[F.SECTION,d.SECTION],[F.SELECT,d.SELECT],[F.SOURCE,d.SOURCE],[F.SMALL,d.SMALL],[F.SPAN,d.SPAN],[F.STRIKE,d.STRIKE],[F.STRONG,d.STRONG],[F.STYLE,d.STYLE],[F.SUB,d.SUB],[F.SUMMARY,d.SUMMARY],[F.SUP,d.SUP],[F.TABLE,d.TABLE],[F.TBODY,d.TBODY],[F.TEMPLATE,d.TEMPLATE],[F.TEXTAREA,d.TEXTAREA],[F.TFOOT,d.TFOOT],[F.TD,d.TD],[F.TH,d.TH],[F.THEAD,d.THEAD],[F.TITLE,d.TITLE],[F.TR,d.TR],[F.TRACK,d.TRACK],[F.TT,d.TT],[F.U,d.U],[F.UL,d.UL],[F.SVG,d.SVG],[F.VAR,d.VAR],[F.WBR,d.WBR],[F.XMP,d.XMP]]);function Hi(e){var t;return(t=mC.get(e))!==null&&t!==void 0?t:d.UNKNOWN}const q=d,pC={[V.HTML]:new Set([q.ADDRESS,q.APPLET,q.AREA,q.ARTICLE,q.ASIDE,q.BASE,q.BASEFONT,q.BGSOUND,q.BLOCKQUOTE,q.BODY,q.BR,q.BUTTON,q.CAPTION,q.CENTER,q.COL,q.COLGROUP,q.DD,q.DETAILS,q.DIR,q.DIV,q.DL,q.DT,q.EMBED,q.FIELDSET,q.FIGCAPTION,q.FIGURE,q.FOOTER,q.FORM,q.FRAME,q.FRAMESET,q.H1,q.H2,q.H3,q.H4,q.H5,q.H6,q.HEAD,q.HEADER,q.HGROUP,q.HR,q.HTML,q.IFRAME,q.IMG,q.INPUT,q.LI,q.LINK,q.LISTING,q.MAIN,q.MARQUEE,q.MENU,q.META,q.NAV,q.NOEMBED,q.NOFRAMES,q.NOSCRIPT,q.OBJECT,q.OL,q.P,q.PARAM,q.PLAINTEXT,q.PRE,q.SCRIPT,q.SECTION,q.SELECT,q.SOURCE,q.STYLE,q.SUMMARY,q.TABLE,q.TBODY,q.TD,q.TEMPLATE,q.TEXTAREA,q.TFOOT,q.TH,q.THEAD,q.TITLE,q.TR,q.TRACK,q.UL,q.WBR,q.XMP]),[V.MATHML]:new Set([q.MI,q.MO,q.MN,q.MS,q.MTEXT,q.ANNOTATION_XML]),[V.SVG]:new Set([q.TITLE,q.FOREIGN_OBJECT,q.DESC]),[V.XLINK]:new Set,[V.XML]:new Set,[V.XMLNS]:new Set},Cc=new Set([q.H1,q.H2,q.H3,q.H4,q.H5,q.H6]);F.STYLE,F.SCRIPT,F.XMP,F.IFRAME,F.NOEMBED,F.NOFRAMES,F.PLAINTEXT;var C;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(C||(C={}));const Je={DATA:C.DATA,RCDATA:C.RCDATA,RAWTEXT:C.RAWTEXT,SCRIPT_DATA:C.SCRIPT_DATA,PLAINTEXT:C.PLAINTEXT,CDATA_SECTION:C.CDATA_SECTION};function gC(e){return e>=_.DIGIT_0&&e<=_.DIGIT_9}function os(e){return e>=_.LATIN_CAPITAL_A&&e<=_.LATIN_CAPITAL_Z}function EC(e){return e>=_.LATIN_SMALL_A&&e<=_.LATIN_SMALL_Z}function Zn(e){return EC(e)||os(e)}function Tm(e){return Zn(e)||gC(e)}function Ra(e){return e+32}function xg(e){return e===_.SPACE||e===_.LINE_FEED||e===_.TABULATION||e===_.FORM_FEED}function ym(e){return xg(e)||e===_.SOLIDUS||e===_.GREATER_THAN_SIGN}function TC(e){return e===_.NULL?H.nullCharacterReference:e>1114111?H.characterReferenceOutsideUnicodeRange:gg(e)?H.surrogateCharacterReference:Tg(e)?H.noncharacterCharacterReference:Eg(e)||e===_.CARRIAGE_RETURN?H.controlCharacterReference:null}class yC{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=C.DATA,this.returnState=C.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new iC(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new fC(sC,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(H.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(H.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=TC(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Se.START_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Se.END_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Se.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Se.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(yg(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(H.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Hi(t.tagName),t.type===Se.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(H.endTagWithAttributes),t.selfClosing&&this._err(H.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Se.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Se.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Se.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Se.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=xg(t)?Se.WHITESPACE_CHARACTER:t===_.NULL?Se.NULL_CHARACTER:Se.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Se.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=C.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Fn.Attribute:Fn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===C.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case C.DATA:{this._stateData(t);break}case C.RCDATA:{this._stateRcdata(t);break}case C.RAWTEXT:{this._stateRawtext(t);break}case C.SCRIPT_DATA:{this._stateScriptData(t);break}case C.PLAINTEXT:{this._statePlaintext(t);break}case C.TAG_OPEN:{this._stateTagOpen(t);break}case C.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case C.TAG_NAME:{this._stateTagName(t);break}case C.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case C.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case C.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case C.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case C.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case C.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case C.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case C.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case C.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case C.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case C.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case C.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case C.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case C.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case C.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case C.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case C.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case C.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case C.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case C.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case C.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case C.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case C.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case C.BOGUS_COMMENT:{this._stateBogusComment(t);break}case C.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case C.COMMENT_START:{this._stateCommentStart(t);break}case C.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case C.COMMENT:{this._stateComment(t);break}case C.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case C.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case C.COMMENT_END:{this._stateCommentEnd(t);break}case C.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case C.DOCTYPE:{this._stateDoctype(t);break}case C.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case C.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case C.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case C.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case C.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case C.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case C.CDATA_SECTION:{this._stateCdataSection(t);break}case C.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case C.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case C.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case C.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.TAG_OPEN;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitCodePoint(t);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case _.AMPERSAND:{this._startCharacterReference();break}case _.LESS_THAN_SIGN:{this.state=C.RCDATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(Ye);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.RAWTEXT_LESS_THAN_SIGN;break}case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(Ye);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(Ye);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(Ye);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Zn(t))this._createStartTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case _.EXCLAMATION_MARK:{this.state=C.MARKUP_DECLARATION_OPEN;break}case _.SOLIDUS:{this.state=C.END_TAG_OPEN;break}case _.QUESTION_MARK:{this._err(H.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t);break}case _.EOF:{this._err(H.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(H.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=C.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Zn(t))this._createEndTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case _.GREATER_THAN_SIGN:{this._err(H.missingEndTagName),this.state=C.DATA;break}case _.EOF:{this._err(H.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(H.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(H.unexpectedNullCharacter),n.tagName+=Ye;break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(os(t)?Ra(t):t)}}_stateRcdataLessThanSign(t){t===_.SOLIDUS?this.state=C.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Zn(t)?(this.state=C.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=C.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=C.BEFORE_ATTRIBUTE_NAME,!1;case _.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=C.SELF_CLOSING_START_TAG,!1;case _.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=C.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===_.SOLIDUS?this.state=C.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Zn(t)?(this.state=C.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case _.SOLIDUS:{this.state=C.SCRIPT_DATA_END_TAG_OPEN;break}case _.EXCLAMATION_MARK:{this.state=C.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=C.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Zn(t)?(this.state=C.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===_.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===_.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(Ye);break}case _.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(Ye);break}case _.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(Ye);break}case _.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===_.SOLIDUS?this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Zn(t)?(this._emitChars("<"),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Zn(t)?(this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Mt.SCRIPT,!1)&&ym(this.preprocessor.peek(Mt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Mt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(Ye);break}case _.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ye);break}case _.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ye);break}case _.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===_.SOLIDUS?(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Mt.SCRIPT,!1)&&ym(this.preprocessor.peek(Mt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Mt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=C.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._err(H.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=C.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this._leaveAttrName(),this.state=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._leaveAttrName(),this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:{this._err(H.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.currentAttr.name+=Ye;break}default:this.currentAttr.name+=String.fromCodePoint(os(t)?Ra(t):t)}}_stateAfterAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case _.EQUALS_SIGN:{this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=C.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{this.state=C.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this.state=C.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(H.missingAttributeValue),this.state=C.DATA,this.emitCurrentTagToken();break}default:this.state=C.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.currentAttr.value+=Ye;break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case _.APOSTROPHE:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.currentAttr.value+=Ye;break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.currentAttr.value+=Ye;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:case _.EQUALS_SIGN:case _.GRAVE_ACCENT:{this._err(H.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=C.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this._leaveAttrValue(),this.state=C.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this._err(H.missingWhitespaceBetweenAttributes),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case _.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this._err(H.unexpectedSolidusInTag),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case _.NULL:{this._err(H.unexpectedNullCharacter),n.data+=Ye;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Mt.DASH_DASH,!0)?(this._createCommentToken(Mt.DASH_DASH.length+1),this.state=C.COMMENT_START):this._consumeSequenceIfMatch(Mt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Mt.DOCTYPE.length+1),this.state=C.DOCTYPE):this._consumeSequenceIfMatch(Mt.CDATA_START,!0)?this.inForeignNode?this.state=C.CDATA_SECTION:(this._err(H.cdataInHtmlContent),this._createCommentToken(Mt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=C.BOGUS_COMMENT):this._ensureHibernation()||(this._err(H.incorrectlyOpenedComment),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_START_DASH;break}case _.GREATER_THAN_SIGN:{this._err(H.abruptClosingOfEmptyComment),this.state=C.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case _.GREATER_THAN_SIGN:{this._err(H.abruptClosingOfEmptyComment),this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(H.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END_DASH;break}case _.LESS_THAN_SIGN:{n.data+="<",this.state=C.COMMENT_LESS_THAN_SIGN;break}case _.NULL:{this._err(H.unexpectedNullCharacter),n.data+=Ye;break}case _.EOF:{this._err(H.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case _.EXCLAMATION_MARK:{n.data+="!",this.state=C.COMMENT_LESS_THAN_SIGN_BANG;break}case _.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===_.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=C.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===_.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=C.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==_.GREATER_THAN_SIGN&&t!==_.EOF&&this._err(H.nestedComment),this.state=C.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case _.EOF:{this._err(H.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case _.EXCLAMATION_MARK:{this.state=C.COMMENT_END_BANG;break}case _.HYPHEN_MINUS:{n.data+="-";break}case _.EOF:{this._err(H.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{n.data+="--!",this.state=C.COMMENT_END_DASH;break}case _.GREATER_THAN_SIGN:{this._err(H.incorrectlyClosedComment),this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(H.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=C.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case _.EOF:{this._err(H.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(H.missingWhitespaceBeforeDoctypeName),this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(os(t))this._createDoctypeToken(String.fromCharCode(Ra(t))),this.state=C.DOCTYPE_NAME;else switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.NULL:{this._err(H.unexpectedNullCharacter),this._createDoctypeToken(Ye),this.state=C.DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this._err(H.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(H.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=C.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.AFTER_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.NULL:{this._err(H.unexpectedNullCharacter),n.name+=Ye;break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(os(t)?Ra(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Mt.PUBLIC,!1)?this.state=C.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Mt.SYSTEM,!1)?this.state=C.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(H.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(H.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(H.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(H.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(H.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(H.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(H.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(H.unexpectedNullCharacter),n.publicId+=Ye;break}case _.GREATER_THAN_SIGN:{this._err(H.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case _.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(H.unexpectedNullCharacter),n.publicId+=Ye;break}case _.GREATER_THAN_SIGN:{this._err(H.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.QUOTATION_MARK:{this._err(H.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(H.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(H.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(H.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(H.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(H.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(H.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(H.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(H.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(H.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(H.unexpectedNullCharacter),n.systemId+=Ye;break}case _.GREATER_THAN_SIGN:{this._err(H.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case _.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(H.unexpectedNullCharacter),n.systemId+=Ye;break}case _.GREATER_THAN_SIGN:{this._err(H.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(H.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(H.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.NULL:{this._err(H.unexpectedNullCharacter);break}case _.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case _.RIGHT_SQUARE_BRACKET:{this.state=C.CDATA_SECTION_BRACKET;break}case _.EOF:{this._err(H.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===_.RIGHT_SQUARE_BRACKET?this.state=C.CDATA_SECTION_END:(this._emitChars("]"),this.state=C.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA;break}case _.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=C.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(_.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Tm(this.preprocessor.peek(1))?C.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Tm(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===_.SEMICOLON&&this._err(H.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const bg=new Set([d.DD,d.DT,d.LI,d.OPTGROUP,d.OPTION,d.P,d.RB,d.RP,d.RT,d.RTC]),xm=new Set([...bg,d.CAPTION,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]),Lu=new Set([d.APPLET,d.CAPTION,d.HTML,d.MARQUEE,d.OBJECT,d.TABLE,d.TD,d.TEMPLATE,d.TH]),xC=new Set([...Lu,d.OL,d.UL]),bC=new Set([...Lu,d.BUTTON]),bm=new Set([d.ANNOTATION_XML,d.MI,d.MN,d.MO,d.MS,d.MTEXT]),_m=new Set([d.DESC,d.FOREIGN_OBJECT,d.TITLE]),_C=new Set([d.TR,d.TEMPLATE,d.HTML]),kC=new Set([d.TBODY,d.TFOOT,d.THEAD,d.TEMPLATE,d.HTML]),SC=new Set([d.TABLE,d.TEMPLATE,d.HTML]),CC=new Set([d.TD,d.TH]);class NC{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=d.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===d.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===V.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==V.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Cc,V.HTML)}popUntilTableCellPopped(){this.popUntilPopped(CC,V.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(SC,V.HTML)}clearBackToTableBodyContext(){this.clearBackTo(kC,V.HTML)}clearBackToTableRowContext(){this.clearBackTo(_C,V.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===d.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===d.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case V.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case V.SVG:{if(_m.has(i))return!1;break}case V.MATHML:{if(bm.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Lu)}hasInListItemScope(t){return this.hasInDynamicScope(t,xC)}hasInButtonScope(t){return this.hasInDynamicScope(t,bC)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case V.HTML:{if(Cc.has(n))return!0;if(Lu.has(n))return!1;break}case V.SVG:{if(_m.has(n))return!1;break}case V.MATHML:{if(bm.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===V.HTML)switch(this.tagIDs[n]){case t:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===V.HTML)switch(this.tagIDs[t]){case d.TBODY:case d.THEAD:case d.TFOOT:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===V.HTML)switch(this.tagIDs[n]){case t:return!0;case d.OPTION:case d.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&bg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&xm.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&xm.has(this.currentTagId);)this.pop()}}const lo=3;var An;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(An||(An={}));const km={type:An.Marker};class vC{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===An.Marker)break;const{element:c}=o;if(this.treeAdapter.getTagName(c)===s&&this.treeAdapter.getNamespaceURI(c)===a){const f=this.treeAdapter.getAttrList(c);f.length===i&&r.push({idx:u,attrs:f})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<lo)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<lo)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const u=r[a];u.attrs.every(o=>i.get(o.name)===o.value)&&(s+=1,s>=lo&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(km)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:An.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:An.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(km);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===An.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===An.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===An.Element&&n.element===t)}}const er={createDocument(){return{nodeName:"#document",mode:an.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};er.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(er.isTextNode(n)){n.value+=t;return}}er.appendChild(e,er.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&er.isTextNode(r)?r.value+=t:er.insertBefore(e,er.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},_g="html",AC="about:legacy-compat",wC="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",kg=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],IC=[...kg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],LC=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Sg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],DC=[...Sg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Sm(e,t){return t.some(n=>e.startsWith(n))}function RC(e){return e.name===_g&&e.publicId===null&&(e.systemId===null||e.systemId===AC)}function OC(e){if(e.name!==_g)return an.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===wC)return an.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),LC.has(n))return an.QUIRKS;let r=t===null?IC:kg;if(Sm(n,r))return an.QUIRKS;if(r=t===null?Sg:DC,Sm(n,r))return an.LIMITED_QUIRKS}return an.NO_QUIRKS}const Cm={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},PC="definitionurl",MC="definitionURL",jC=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),FC=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:V.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:V.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:V.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:V.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:V.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:V.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:V.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:V.XML}],["xml:space",{prefix:"xml",name:"space",namespace:V.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:V.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:V.XMLNS}]]),BC=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),UC=new Set([d.B,d.BIG,d.BLOCKQUOTE,d.BODY,d.BR,d.CENTER,d.CODE,d.DD,d.DIV,d.DL,d.DT,d.EM,d.EMBED,d.H1,d.H2,d.H3,d.H4,d.H5,d.H6,d.HEAD,d.HR,d.I,d.IMG,d.LI,d.LISTING,d.MENU,d.META,d.NOBR,d.OL,d.P,d.PRE,d.RUBY,d.S,d.SMALL,d.SPAN,d.STRONG,d.STRIKE,d.SUB,d.SUP,d.TABLE,d.TT,d.U,d.UL,d.VAR]);function HC(e){const t=e.tagID;return t===d.FONT&&e.attrs.some(({name:r})=>r===Mr.COLOR||r===Mr.SIZE||r===Mr.FACE)||UC.has(t)}function Cg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===PC){e.attrs[t].name=MC;break}}function Ng(e){for(let t=0;t<e.attrs.length;t++){const n=jC.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Yd(e){for(let t=0;t<e.attrs.length;t++){const n=FC.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function zC(e){const t=BC.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Hi(e.tagName))}function $C(e,t){return t===V.MATHML&&(e===d.MI||e===d.MO||e===d.MN||e===d.MS||e===d.MTEXT)}function YC(e,t,n){if(t===V.MATHML&&e===d.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Mr.ENCODING){const i=n[r].value.toLowerCase();return i===Cm.TEXT_HTML||i===Cm.APPLICATION_XML}}return t===V.SVG&&(e===d.FOREIGN_OBJECT||e===d.DESC||e===d.TITLE)}function VC(e,t,n,r){return(!r||r===V.HTML)&&YC(e,t,n)||(!r||r===V.MATHML)&&$C(e,t)}const WC="hidden",qC=8,GC=3;var v;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(v||(v={}));const QC={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},vg=new Set([d.TABLE,d.TBODY,d.TFOOT,d.THEAD,d.TR]),Nm={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:er,onParseError:null};class vm{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=v.INITIAL,this.originalInsertionMode=v.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Nm,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new yC(this.options,this),this.activeFormattingElements=new vC(this.treeAdapter),this.fragmentContextID=r?Hi(this.treeAdapter.getTagName(r)):d.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new NC(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...Nm,...n};t??(t=r.treeAdapter.createElement(F.TEMPLATE,V.HTML,[]));const i=r.treeAdapter.createElement("documentmock",V.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===d.TEMPLATE&&s.tmplInsertionModeStack.unshift(v.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const s=(i=t.location)!==null&&i!==void 0?i:QC,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===V.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,V.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=v.TEXT}switchToPlaintextParsing(){this.insertionMode=v.TEXT,this.originalInsertionMode=v.IN_BODY,this.tokenizer.state=Je.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===F.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==V.HTML))switch(this.fragmentContextID){case d.TITLE:case d.TEXTAREA:{this.tokenizer.state=Je.RCDATA;break}case d.STYLE:case d.XMP:case d.IFRAME:case d.NOEMBED:case d.NOFRAMES:case d.NOSCRIPT:{this.tokenizer.state=Je.RAWTEXT;break}case d.SCRIPT:{this.tokenizer.state=Je.SCRIPT_DATA;break}case d.PLAINTEXT:{this.tokenizer.state=Je.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,V.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,V.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(F.HTML,V.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,d.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:o,endCol:c,endOffset:f}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:o,endCol:c,endOffset:f})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),s=n.type===Se.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===d.SVG&&this.treeAdapter.getTagName(n)===F.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===V.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===d.MGLYPH||t.tagID===d.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,V.HTML)}_processToken(t){switch(t.type){case Se.CHARACTER:{this.onCharacter(t);break}case Se.NULL_CHARACTER:{this.onNullCharacter(t);break}case Se.COMMENT:{this.onComment(t);break}case Se.DOCTYPE:{this.onDoctype(t);break}case Se.START_TAG:{this._processStartTag(t);break}case Se.END_TAG:{this.onEndTag(t);break}case Se.EOF:{this.onEof(t);break}case Se.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return VC(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===An.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=v.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(d.P),this.openElements.popUntilTagNamePopped(d.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case d.TR:{this.insertionMode=v.IN_ROW;return}case d.TBODY:case d.THEAD:case d.TFOOT:{this.insertionMode=v.IN_TABLE_BODY;return}case d.CAPTION:{this.insertionMode=v.IN_CAPTION;return}case d.COLGROUP:{this.insertionMode=v.IN_COLUMN_GROUP;return}case d.TABLE:{this.insertionMode=v.IN_TABLE;return}case d.BODY:{this.insertionMode=v.IN_BODY;return}case d.FRAMESET:{this.insertionMode=v.IN_FRAMESET;return}case d.SELECT:{this._resetInsertionModeForSelect(t);return}case d.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case d.HTML:{this.insertionMode=this.headElement?v.AFTER_HEAD:v.BEFORE_HEAD;return}case d.TD:case d.TH:{if(t>0){this.insertionMode=v.IN_CELL;return}break}case d.HEAD:{if(t>0){this.insertionMode=v.IN_HEAD;return}break}}this.insertionMode=v.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===d.TEMPLATE)break;if(r===d.TABLE){this.insertionMode=v.IN_SELECT_IN_TABLE;return}}this.insertionMode=v.IN_SELECT}_isElementCausesFosterParenting(t){return vg.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case d.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===V.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case d.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return pC[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Cv(this,t);return}switch(this.insertionMode){case v.INITIAL:{ns(this,t);break}case v.BEFORE_HTML:{_s(this,t);break}case v.BEFORE_HEAD:{ks(this,t);break}case v.IN_HEAD:{Ss(this,t);break}case v.IN_HEAD_NO_SCRIPT:{Cs(this,t);break}case v.AFTER_HEAD:{Ns(this,t);break}case v.IN_BODY:case v.IN_CAPTION:case v.IN_CELL:case v.IN_TEMPLATE:{wg(this,t);break}case v.TEXT:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:{oo(this,t);break}case v.IN_TABLE_TEXT:{Pg(this,t);break}case v.IN_COLUMN_GROUP:{Du(this,t);break}case v.AFTER_BODY:{Ru(this,t);break}case v.AFTER_AFTER_BODY:{eu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Sv(this,t);return}switch(this.insertionMode){case v.INITIAL:{ns(this,t);break}case v.BEFORE_HTML:{_s(this,t);break}case v.BEFORE_HEAD:{ks(this,t);break}case v.IN_HEAD:{Ss(this,t);break}case v.IN_HEAD_NO_SCRIPT:{Cs(this,t);break}case v.AFTER_HEAD:{Ns(this,t);break}case v.TEXT:{this._insertCharacters(t);break}case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:{oo(this,t);break}case v.IN_COLUMN_GROUP:{Du(this,t);break}case v.AFTER_BODY:{Ru(this,t);break}case v.AFTER_AFTER_BODY:{eu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Nc(this,t);return}switch(this.insertionMode){case v.INITIAL:case v.BEFORE_HTML:case v.BEFORE_HEAD:case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:case v.IN_BODY:case v.IN_TABLE:case v.IN_CAPTION:case v.IN_COLUMN_GROUP:case v.IN_TABLE_BODY:case v.IN_ROW:case v.IN_CELL:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:case v.IN_TEMPLATE:case v.IN_FRAMESET:case v.AFTER_FRAMESET:{Nc(this,t);break}case v.IN_TABLE_TEXT:{rs(this,t);break}case v.AFTER_BODY:{nN(this,t);break}case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:{rN(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case v.INITIAL:{iN(this,t);break}case v.BEFORE_HEAD:case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:{this._err(t,H.misplacedDoctype);break}case v.IN_TABLE_TEXT:{rs(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,H.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Nv(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case v.INITIAL:{ns(this,t);break}case v.BEFORE_HTML:{sN(this,t);break}case v.BEFORE_HEAD:{uN(this,t);break}case v.IN_HEAD:{bn(this,t);break}case v.IN_HEAD_NO_SCRIPT:{cN(this,t);break}case v.AFTER_HEAD:{fN(this,t);break}case v.IN_BODY:{vt(this,t);break}case v.IN_TABLE:{Oi(this,t);break}case v.IN_TABLE_TEXT:{rs(this,t);break}case v.IN_CAPTION:{lv(this,t);break}case v.IN_COLUMN_GROUP:{qd(this,t);break}case v.IN_TABLE_BODY:{gl(this,t);break}case v.IN_ROW:{El(this,t);break}case v.IN_CELL:{dv(this,t);break}case v.IN_SELECT:{Fg(this,t);break}case v.IN_SELECT_IN_TABLE:{hv(this,t);break}case v.IN_TEMPLATE:{pv(this,t);break}case v.AFTER_BODY:{Ev(this,t);break}case v.IN_FRAMESET:{Tv(this,t);break}case v.AFTER_FRAMESET:{xv(this,t);break}case v.AFTER_AFTER_BODY:{_v(this,t);break}case v.AFTER_AFTER_FRAMESET:{kv(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?vv(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case v.INITIAL:{ns(this,t);break}case v.BEFORE_HTML:{aN(this,t);break}case v.BEFORE_HEAD:{lN(this,t);break}case v.IN_HEAD:{oN(this,t);break}case v.IN_HEAD_NO_SCRIPT:{dN(this,t);break}case v.AFTER_HEAD:{hN(this,t);break}case v.IN_BODY:{pl(this,t);break}case v.TEXT:{JN(this,t);break}case v.IN_TABLE:{Ks(this,t);break}case v.IN_TABLE_TEXT:{rs(this,t);break}case v.IN_CAPTION:{ov(this,t);break}case v.IN_COLUMN_GROUP:{cv(this,t);break}case v.IN_TABLE_BODY:{vc(this,t);break}case v.IN_ROW:{jg(this,t);break}case v.IN_CELL:{fv(this,t);break}case v.IN_SELECT:{Bg(this,t);break}case v.IN_SELECT_IN_TABLE:{mv(this,t);break}case v.IN_TEMPLATE:{gv(this,t);break}case v.AFTER_BODY:{Hg(this,t);break}case v.IN_FRAMESET:{yv(this,t);break}case v.AFTER_FRAMESET:{bv(this,t);break}case v.AFTER_AFTER_BODY:{eu(this,t);break}}}onEof(t){switch(this.insertionMode){case v.INITIAL:{ns(this,t);break}case v.BEFORE_HTML:{_s(this,t);break}case v.BEFORE_HEAD:{ks(this,t);break}case v.IN_HEAD:{Ss(this,t);break}case v.IN_HEAD_NO_SCRIPT:{Cs(this,t);break}case v.AFTER_HEAD:{Ns(this,t);break}case v.IN_BODY:case v.IN_TABLE:case v.IN_CAPTION:case v.IN_COLUMN_GROUP:case v.IN_TABLE_BODY:case v.IN_ROW:case v.IN_CELL:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:{Rg(this,t);break}case v.TEXT:{ZN(this,t);break}case v.IN_TABLE_TEXT:{rs(this,t);break}case v.IN_TEMPLATE:{Ug(this,t);break}case v.AFTER_BODY:case v.IN_FRAMESET:case v.AFTER_FRAMESET:case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:{Wd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===_.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:case v.TEXT:case v.IN_COLUMN_GROUP:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:case v.IN_FRAMESET:case v.AFTER_FRAMESET:{this._insertCharacters(t);break}case v.IN_BODY:case v.IN_CAPTION:case v.IN_CELL:case v.IN_TEMPLATE:case v.AFTER_BODY:case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:{Ag(this,t);break}case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:{oo(this,t);break}case v.IN_TABLE_TEXT:{Og(this,t);break}}}}function KC(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Dg(e,t),n}function XC(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function JC(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const u=e.activeFormattingElements.getElementEntry(a),o=u&&s>=GC;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(a)):(a=ZC(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function ZC(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function eN(e,t,n){const r=e.treeAdapter.getTagName(t),i=Hi(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===d.TEMPLATE&&s===V.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function tN(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function Vd(e,t){for(let n=0;n<qC;n++){const r=KC(e,t);if(!r)break;const i=XC(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=JC(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&eN(e,a,s),tN(e,i,r)}}function Nc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function nN(e,t){e._appendCommentNode(t,e.openElements.items[0])}function rN(e,t){e._appendCommentNode(t,e.document)}function Wd(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function iN(e,t){e._setDocumentType(t);const n=t.forceQuirks?an.QUIRKS:OC(t);RC(t)||e._err(t,H.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=v.BEFORE_HTML}function ns(e,t){e._err(t,H.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,an.QUIRKS),e.insertionMode=v.BEFORE_HTML,e._processToken(t)}function sN(e,t){t.tagID===d.HTML?(e._insertElement(t,V.HTML),e.insertionMode=v.BEFORE_HEAD):_s(e,t)}function aN(e,t){const n=t.tagID;(n===d.HTML||n===d.HEAD||n===d.BODY||n===d.BR)&&_s(e,t)}function _s(e,t){e._insertFakeRootElement(),e.insertionMode=v.BEFORE_HEAD,e._processToken(t)}function uN(e,t){switch(t.tagID){case d.HTML:{vt(e,t);break}case d.HEAD:{e._insertElement(t,V.HTML),e.headElement=e.openElements.current,e.insertionMode=v.IN_HEAD;break}default:ks(e,t)}}function lN(e,t){const n=t.tagID;n===d.HEAD||n===d.BODY||n===d.HTML||n===d.BR?ks(e,t):e._err(t,H.endTagWithoutMatchingOpenElement)}function ks(e,t){e._insertFakeElement(F.HEAD,d.HEAD),e.headElement=e.openElements.current,e.insertionMode=v.IN_HEAD,e._processToken(t)}function bn(e,t){switch(t.tagID){case d.HTML:{vt(e,t);break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case d.TITLE:{e._switchToTextParsing(t,Je.RCDATA);break}case d.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Je.RAWTEXT):(e._insertElement(t,V.HTML),e.insertionMode=v.IN_HEAD_NO_SCRIPT);break}case d.NOFRAMES:case d.STYLE:{e._switchToTextParsing(t,Je.RAWTEXT);break}case d.SCRIPT:{e._switchToTextParsing(t,Je.SCRIPT_DATA);break}case d.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=v.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(v.IN_TEMPLATE);break}case d.HEAD:{e._err(t,H.misplacedStartTagForHeadElement);break}default:Ss(e,t)}}function oN(e,t){switch(t.tagID){case d.HEAD:{e.openElements.pop(),e.insertionMode=v.AFTER_HEAD;break}case d.BODY:case d.BR:case d.HTML:{Ss(e,t);break}case d.TEMPLATE:{Gr(e,t);break}default:e._err(t,H.endTagWithoutMatchingOpenElement)}}function Gr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==d.TEMPLATE&&e._err(t,H.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,H.endTagWithoutMatchingOpenElement)}function Ss(e,t){e.openElements.pop(),e.insertionMode=v.AFTER_HEAD,e._processToken(t)}function cN(e,t){switch(t.tagID){case d.HTML:{vt(e,t);break}case d.BASEFONT:case d.BGSOUND:case d.HEAD:case d.LINK:case d.META:case d.NOFRAMES:case d.STYLE:{bn(e,t);break}case d.NOSCRIPT:{e._err(t,H.nestedNoscriptInHead);break}default:Cs(e,t)}}function dN(e,t){switch(t.tagID){case d.NOSCRIPT:{e.openElements.pop(),e.insertionMode=v.IN_HEAD;break}case d.BR:{Cs(e,t);break}default:e._err(t,H.endTagWithoutMatchingOpenElement)}}function Cs(e,t){const n=t.type===Se.EOF?H.openElementsLeftAfterEof:H.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=v.IN_HEAD,e._processToken(t)}function fN(e,t){switch(t.tagID){case d.HTML:{vt(e,t);break}case d.BODY:{e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=v.IN_BODY;break}case d.FRAMESET:{e._insertElement(t,V.HTML),e.insertionMode=v.IN_FRAMESET;break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{e._err(t,H.abandonedHeadElementChild),e.openElements.push(e.headElement,d.HEAD),bn(e,t),e.openElements.remove(e.headElement);break}case d.HEAD:{e._err(t,H.misplacedStartTagForHeadElement);break}default:Ns(e,t)}}function hN(e,t){switch(t.tagID){case d.BODY:case d.HTML:case d.BR:{Ns(e,t);break}case d.TEMPLATE:{Gr(e,t);break}default:e._err(t,H.endTagWithoutMatchingOpenElement)}}function Ns(e,t){e._insertFakeElement(F.BODY,d.BODY),e.insertionMode=v.IN_BODY,ml(e,t)}function ml(e,t){switch(t.type){case Se.CHARACTER:{wg(e,t);break}case Se.WHITESPACE_CHARACTER:{Ag(e,t);break}case Se.COMMENT:{Nc(e,t);break}case Se.START_TAG:{vt(e,t);break}case Se.END_TAG:{pl(e,t);break}case Se.EOF:{Rg(e,t);break}}}function Ag(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function wg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function mN(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function pN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function gN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,V.HTML),e.insertionMode=v.IN_FRAMESET)}function EN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML)}function TN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Cc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,V.HTML)}function yN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function xN(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML),n||(e.formElement=e.openElements.current))}function bN(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===d.LI&&i===d.LI||(n===d.DD||n===d.DT)&&(i===d.DD||i===d.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==d.ADDRESS&&i!==d.DIV&&i!==d.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML)}function _N(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.tokenizer.state=Je.PLAINTEXT}function kN(e,t){e.openElements.hasInScope(d.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.framesetOk=!1}function SN(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(F.A);n&&(Vd(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function CN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function NN(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(d.NOBR)&&(Vd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,V.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function vN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function AN(e,t){e.treeAdapter.getDocumentMode(e.document)!==an.QUIRKS&&e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=v.IN_TABLE}function Ig(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,V.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Lg(e){const t=yg(e,Mr.TYPE);return t!=null&&t.toLowerCase()===WC}function wN(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,V.HTML),Lg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function IN(e,t){e._appendElement(t,V.HTML),t.ackSelfClosing=!0}function LN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._appendElement(t,V.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function DN(e,t){t.tagName=F.IMG,t.tagID=d.IMG,Ig(e,t)}function RN(e,t){e._insertElement(t,V.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Je.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=v.TEXT}function ON(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Je.RAWTEXT)}function PN(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Je.RAWTEXT)}function Am(e,t){e._switchToTextParsing(t,Je.RAWTEXT)}function MN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===v.IN_TABLE||e.insertionMode===v.IN_CAPTION||e.insertionMode===v.IN_TABLE_BODY||e.insertionMode===v.IN_ROW||e.insertionMode===v.IN_CELL?v.IN_SELECT_IN_TABLE:v.IN_SELECT}function jN(e,t){e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML)}function FN(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,V.HTML)}function BN(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(d.RTC),e._insertElement(t,V.HTML)}function UN(e,t){e._reconstructActiveFormattingElements(),Cg(t),Yd(t),t.selfClosing?e._appendElement(t,V.MATHML):e._insertElement(t,V.MATHML),t.ackSelfClosing=!0}function HN(e,t){e._reconstructActiveFormattingElements(),Ng(t),Yd(t),t.selfClosing?e._appendElement(t,V.SVG):e._insertElement(t,V.SVG),t.ackSelfClosing=!0}function wm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,V.HTML)}function vt(e,t){switch(t.tagID){case d.I:case d.S:case d.B:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.SMALL:case d.STRIKE:case d.STRONG:{CN(e,t);break}case d.A:{SN(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{TN(e,t);break}case d.P:case d.DL:case d.OL:case d.UL:case d.DIV:case d.DIR:case d.NAV:case d.MAIN:case d.MENU:case d.ASIDE:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.DETAILS:case d.ADDRESS:case d.ARTICLE:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{EN(e,t);break}case d.LI:case d.DD:case d.DT:{bN(e,t);break}case d.BR:case d.IMG:case d.WBR:case d.AREA:case d.EMBED:case d.KEYGEN:{Ig(e,t);break}case d.HR:{LN(e,t);break}case d.RB:case d.RTC:{FN(e,t);break}case d.RT:case d.RP:{BN(e,t);break}case d.PRE:case d.LISTING:{yN(e,t);break}case d.XMP:{ON(e,t);break}case d.SVG:{HN(e,t);break}case d.HTML:{mN(e,t);break}case d.BASE:case d.LINK:case d.META:case d.STYLE:case d.TITLE:case d.SCRIPT:case d.BGSOUND:case d.BASEFONT:case d.TEMPLATE:{bn(e,t);break}case d.BODY:{pN(e,t);break}case d.FORM:{xN(e,t);break}case d.NOBR:{NN(e,t);break}case d.MATH:{UN(e,t);break}case d.TABLE:{AN(e,t);break}case d.INPUT:{wN(e,t);break}case d.PARAM:case d.TRACK:case d.SOURCE:{IN(e,t);break}case d.IMAGE:{DN(e,t);break}case d.BUTTON:{kN(e,t);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{vN(e,t);break}case d.IFRAME:{PN(e,t);break}case d.SELECT:{MN(e,t);break}case d.OPTION:case d.OPTGROUP:{jN(e,t);break}case d.NOEMBED:case d.NOFRAMES:{Am(e,t);break}case d.FRAMESET:{gN(e,t);break}case d.TEXTAREA:{RN(e,t);break}case d.NOSCRIPT:{e.options.scriptingEnabled?Am(e,t):wm(e,t);break}case d.PLAINTEXT:{_N(e,t);break}case d.COL:case d.TH:case d.TD:case d.TR:case d.HEAD:case d.FRAME:case d.TBODY:case d.TFOOT:case d.THEAD:case d.CAPTION:case d.COLGROUP:break;default:wm(e,t)}}function zN(e,t){if(e.openElements.hasInScope(d.BODY)&&(e.insertionMode=v.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function $N(e,t){e.openElements.hasInScope(d.BODY)&&(e.insertionMode=v.AFTER_BODY,Hg(e,t))}function YN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function VN(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(d.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(d.FORM):n&&e.openElements.remove(n))}function WN(e){e.openElements.hasInButtonScope(d.P)||e._insertFakeElement(F.P,d.P),e._closePElement()}function qN(e){e.openElements.hasInListItemScope(d.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(d.LI),e.openElements.popUntilTagNamePopped(d.LI))}function GN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function QN(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function KN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function XN(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(F.BR,d.BR),e.openElements.pop(),e.framesetOk=!1}function Dg(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==d.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function pl(e,t){switch(t.tagID){case d.A:case d.B:case d.I:case d.S:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.NOBR:case d.SMALL:case d.STRIKE:case d.STRONG:{Vd(e,t);break}case d.P:{WN(e);break}case d.DL:case d.UL:case d.OL:case d.DIR:case d.DIV:case d.NAV:case d.PRE:case d.MAIN:case d.MENU:case d.ASIDE:case d.BUTTON:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.ADDRESS:case d.ARTICLE:case d.DETAILS:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.LISTING:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{YN(e,t);break}case d.LI:{qN(e);break}case d.DD:case d.DT:{GN(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{QN(e);break}case d.BR:{XN(e);break}case d.BODY:{zN(e,t);break}case d.HTML:{$N(e,t);break}case d.FORM:{VN(e);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{KN(e,t);break}case d.TEMPLATE:{Gr(e,t);break}default:Dg(e,t)}}function Rg(e,t){e.tmplInsertionModeStack.length>0?Ug(e,t):Wd(e,t)}function JN(e,t){var n;t.tagID===d.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function ZN(e,t){e._err(t,H.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function oo(e,t){if(e.openElements.currentTagId!==void 0&&vg.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=v.IN_TABLE_TEXT,t.type){case Se.CHARACTER:{Pg(e,t);break}case Se.WHITESPACE_CHARACTER:{Og(e,t);break}}else ca(e,t)}function ev(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,V.HTML),e.insertionMode=v.IN_CAPTION}function tv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,V.HTML),e.insertionMode=v.IN_COLUMN_GROUP}function nv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(F.COLGROUP,d.COLGROUP),e.insertionMode=v.IN_COLUMN_GROUP,qd(e,t)}function rv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,V.HTML),e.insertionMode=v.IN_TABLE_BODY}function iv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(F.TBODY,d.TBODY),e.insertionMode=v.IN_TABLE_BODY,gl(e,t)}function sv(e,t){e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function av(e,t){Lg(t)?e._appendElement(t,V.HTML):ca(e,t),t.ackSelfClosing=!0}function uv(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,V.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Oi(e,t){switch(t.tagID){case d.TD:case d.TH:case d.TR:{iv(e,t);break}case d.STYLE:case d.SCRIPT:case d.TEMPLATE:{bn(e,t);break}case d.COL:{nv(e,t);break}case d.FORM:{uv(e,t);break}case d.TABLE:{sv(e,t);break}case d.TBODY:case d.TFOOT:case d.THEAD:{rv(e,t);break}case d.INPUT:{av(e,t);break}case d.CAPTION:{ev(e,t);break}case d.COLGROUP:{tv(e,t);break}default:ca(e,t)}}function Ks(e,t){switch(t.tagID){case d.TABLE:{e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode());break}case d.TEMPLATE:{Gr(e,t);break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:ca(e,t)}}function ca(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ml(e,t),e.fosterParentingEnabled=n}function Og(e,t){e.pendingCharacterTokens.push(t)}function Pg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function rs(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ca(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Mg=new Set([d.CAPTION,d.COL,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]);function lv(e,t){const n=t.tagID;Mg.has(n)?e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=v.IN_TABLE,Oi(e,t)):vt(e,t)}function ov(e,t){const n=t.tagID;switch(n){case d.CAPTION:case d.TABLE:{e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=v.IN_TABLE,n===d.TABLE&&Ks(e,t));break}case d.BODY:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:pl(e,t)}}function qd(e,t){switch(t.tagID){case d.HTML:{vt(e,t);break}case d.COL:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case d.TEMPLATE:{bn(e,t);break}default:Du(e,t)}}function cv(e,t){switch(t.tagID){case d.COLGROUP:{e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=v.IN_TABLE);break}case d.TEMPLATE:{Gr(e,t);break}case d.COL:break;default:Du(e,t)}}function Du(e,t){e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=v.IN_TABLE,e._processToken(t))}function gl(e,t){switch(t.tagID){case d.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,V.HTML),e.insertionMode=v.IN_ROW;break}case d.TH:case d.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(F.TR,d.TR),e.insertionMode=v.IN_ROW,El(e,t);break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE,Oi(e,t));break}default:Oi(e,t)}}function vc(e,t){const n=t.tagID;switch(t.tagID){case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE);break}case d.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE,Ks(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:case d.TR:break;default:Ks(e,t)}}function El(e,t){switch(t.tagID){case d.TH:case d.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,V.HTML),e.insertionMode=v.IN_CELL,e.activeFormattingElements.insertMarker();break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,gl(e,t));break}default:Oi(e,t)}}function jg(e,t){switch(t.tagID){case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY);break}case d.TABLE:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,vc(e,t));break}case d.TBODY:case d.TFOOT:case d.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(d.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,vc(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:break;default:Ks(e,t)}}function dv(e,t){const n=t.tagID;Mg.has(n)?(e.openElements.hasInTableScope(d.TD)||e.openElements.hasInTableScope(d.TH))&&(e._closeTableCell(),El(e,t)):vt(e,t)}function fv(e,t){const n=t.tagID;switch(n){case d.TD:case d.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=v.IN_ROW);break}case d.TABLE:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),jg(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:break;default:pl(e,t)}}function Fg(e,t){switch(t.tagID){case d.HTML:{vt(e,t);break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._insertElement(t,V.HTML);break}case d.OPTGROUP:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._insertElement(t,V.HTML);break}case d.HR:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case d.INPUT:case d.KEYGEN:case d.TEXTAREA:case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),t.tagID!==d.SELECT&&e._processStartTag(t));break}case d.SCRIPT:case d.TEMPLATE:{bn(e,t);break}}}function Bg(e,t){switch(t.tagID){case d.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===d.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===d.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop();break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop();break}case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode());break}case d.TEMPLATE:{Gr(e,t);break}}}function hv(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Fg(e,t)}function mv(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Bg(e,t)}function pv(e,t){switch(t.tagID){case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{bn(e,t);break}case d.CAPTION:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.tmplInsertionModeStack[0]=v.IN_TABLE,e.insertionMode=v.IN_TABLE,Oi(e,t);break}case d.COL:{e.tmplInsertionModeStack[0]=v.IN_COLUMN_GROUP,e.insertionMode=v.IN_COLUMN_GROUP,qd(e,t);break}case d.TR:{e.tmplInsertionModeStack[0]=v.IN_TABLE_BODY,e.insertionMode=v.IN_TABLE_BODY,gl(e,t);break}case d.TD:case d.TH:{e.tmplInsertionModeStack[0]=v.IN_ROW,e.insertionMode=v.IN_ROW,El(e,t);break}default:e.tmplInsertionModeStack[0]=v.IN_BODY,e.insertionMode=v.IN_BODY,vt(e,t)}}function gv(e,t){t.tagID===d.TEMPLATE&&Gr(e,t)}function Ug(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Wd(e,t)}function Ev(e,t){t.tagID===d.HTML?vt(e,t):Ru(e,t)}function Hg(e,t){var n;if(t.tagID===d.HTML){if(e.fragmentContext||(e.insertionMode=v.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===d.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Ru(e,t)}function Ru(e,t){e.insertionMode=v.IN_BODY,ml(e,t)}function Tv(e,t){switch(t.tagID){case d.HTML:{vt(e,t);break}case d.FRAMESET:{e._insertElement(t,V.HTML);break}case d.FRAME:{e._appendElement(t,V.HTML),t.ackSelfClosing=!0;break}case d.NOFRAMES:{bn(e,t);break}}}function yv(e,t){t.tagID===d.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==d.FRAMESET&&(e.insertionMode=v.AFTER_FRAMESET))}function xv(e,t){switch(t.tagID){case d.HTML:{vt(e,t);break}case d.NOFRAMES:{bn(e,t);break}}}function bv(e,t){t.tagID===d.HTML&&(e.insertionMode=v.AFTER_AFTER_FRAMESET)}function _v(e,t){t.tagID===d.HTML?vt(e,t):eu(e,t)}function eu(e,t){e.insertionMode=v.IN_BODY,ml(e,t)}function kv(e,t){switch(t.tagID){case d.HTML:{vt(e,t);break}case d.NOFRAMES:{bn(e,t);break}}}function Sv(e,t){t.chars=Ye,e._insertCharacters(t)}function Cv(e,t){e._insertCharacters(t),e.framesetOk=!1}function zg(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==V.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Nv(e,t){if(HC(t))zg(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===V.MATHML?Cg(t):r===V.SVG&&(zC(t),Ng(t)),Yd(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function vv(e,t){if(t.tagID===d.P||t.tagID===d.BR){zg(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===V.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}F.AREA,F.BASE,F.BASEFONT,F.BGSOUND,F.BR,F.COL,F.EMBED,F.FRAME,F.HR,F.IMG,F.INPUT,F.KEYGEN,F.LINK,F.META,F.PARAM,F.SOURCE,F.TRACK,F.WBR;const Av=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,wv=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Im={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function $g(e,t){const n=Bv(e),r=mg("type",{handlers:{root:Iv,element:Lv,text:Dv,comment:Vg,doctype:Rv,raw:Pv},unknown:Mv}),i={parser:n?new vm(Im):vm.getFragmentParser(void 0,Im),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),zi(i,Rn());const s=n?i.parser.document:i.parser.getFragment(),a=U3(s,{file:i.options.file});return i.stitches&&hl(a,"comment",function(u,o,c){const f=u;if(f.value.stitch&&c&&o!==void 0){const h=c.children;return h[o]=f.value.stitch,o}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Yg(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Iv(e,t){Yg(e.children,t)}function Lv(e,t){jv(e,t),Yg(e.children,t),Fv(e,t)}function Dv(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Se.CHARACTER,chars:e.value,location:da(e)};zi(t,Rn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Rv(e,t){const n={type:Se.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:da(e)};zi(t,Rn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ov(e,t){t.stitches=!0;const n=Uv(e);if("children"in e&&"children"in n){const r=$g({type:"root",children:e.children},t.options);n.children=r.children}Vg({type:"comment",value:{stitch:n}},t)}function Vg(e,t){const n=e.value,r={type:Se.COMMENT,data:n,location:da(e)};zi(t,Rn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Pv(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Wg(t,Rn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Av,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function Mv(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Ov(n,t);else{let r="";throw wv.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function zi(e,t){Wg(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Je.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Wg(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function jv(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Je.PLAINTEXT)return;zi(t,Rn(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Rr.html;i===Rr.html&&n==="svg"&&(i=Rr.svg);const s=V3({...e,children:[]},{space:i===Rr.svg?"svg":"html"}),a={type:Se.START_TAG,tagName:n,tagID:Hi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:da(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Fv(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Z3.includes(n)||t.parser.tokenizer.state===Je.PLAINTEXT)return;zi(t,ul(e));const r={type:Se.END_TAG,tagName:n,tagID:Hi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:da(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Je.RCDATA||t.parser.tokenizer.state===Je.RAWTEXT||t.parser.tokenizer.state===Je.SCRIPT_DATA)&&(t.parser.tokenizer.state=Je.DATA)}function Bv(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function da(e){const t=Rn(e)||{line:void 0,column:void 0,offset:void 0},n=ul(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Uv(e){return"children"in e?Ri({...e,children:[]}):Ri(e)}function Hv(e){return function(t,n){return $g(t,{...e,file:n})}}function Lm(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function zv(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function $v(e,t,n){const i=dl((n||{}).ignore||[]),s=Yv(t);let a=-1;for(;++a<s.length;)lg(e,"text",u);function u(c,f){let h=-1,m;for(;++h<f.length;){const p=f[h],g=m?m.children:void 0;if(i(p,g?g.indexOf(p):void 0,m))return;m=p}if(m)return o(c,f)}function o(c,f){const h=f[f.length-1],m=s[a][0],p=s[a][1];let g=0;const A=h.children.indexOf(c);let E=!1,T=[];m.lastIndex=0;let k=m.exec(c.value);for(;k;){const L=k.index,M={index:k.index,input:k.input,stack:[...f,c]};let S=p(...k,M);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?m.lastIndex=L+1:(g!==L&&T.push({type:"text",value:c.value.slice(g,L)}),Array.isArray(S)?T.push(...S):S&&T.push(S),g=L+k[0].length,E=!0),!m.global)break;k=m.exec(c.value)}return E?(g<c.value.length&&T.push({type:"text",value:c.value.slice(g)}),h.children.splice(A,1,...T)):T=[c],A+T.length}}function Yv(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Vv(i[0]),Wv(i[1])])}return t}function Vv(e){return typeof e=="string"?new RegExp(zv(e),"g"):e}function Wv(e){return typeof e=="function"?e:function(){return e}}const co="phrasing",fo=["autolink","link","image","label"];function qv(){return{transforms:[eA],enter:{literalAutolink:Qv,literalAutolinkEmail:ho,literalAutolinkHttp:ho,literalAutolinkWww:ho},exit:{literalAutolink:Zv,literalAutolinkEmail:Jv,literalAutolinkHttp:Kv,literalAutolinkWww:Xv}}}function Gv(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:co,notInConstruct:fo},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:co,notInConstruct:fo},{character:":",before:"[ps]",after:"\\/",inConstruct:co,notInConstruct:fo}]}}function Qv(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ho(e){this.config.enter.autolinkProtocol.call(this,e)}function Kv(e){this.config.exit.autolinkProtocol.call(this,e)}function Xv(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Jv(e){this.config.exit.autolinkEmail.call(this,e)}function Zv(e){this.exit(e)}function eA(e){$v(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tA],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),nA]],{ignore:["link","linkReference"]})}function tA(e,t,n,r,i){let s="";if(!qg(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!rA(n)))return!1;const a=iA(n+r);if(!a[0])return!1;const u={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function nA(e,t,n,r){return!qg(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function rA(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function iA(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Lm(e,"(");let s=Lm(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function qg(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yr(n)||ll(n))&&(!t||n!==47)}Gg.peek=hA;function sA(){this.buffer()}function aA(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function uA(){this.buffer()}function lA(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function oA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function cA(e){this.exit(e)}function dA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fA(e){this.exit(e)}function hA(){return"["}function Gg(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),u=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),u(),a(),s+=i.move("]"),s}function mA(){return{enter:{gfmFootnoteCallString:sA,gfmFootnoteCall:aA,gfmFootnoteDefinitionLabelString:uA,gfmFootnoteDefinition:lA},exit:{gfmFootnoteCallString:oA,gfmFootnoteCall:cA,gfmFootnoteDefinitionLabelString:dA,gfmFootnoteDefinition:fA}}}function pA(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Gg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const u=s.createTracker(a);let o=u.move("[^");const c=s.enter("footnoteDefinition"),f=s.enter("label");return o+=u.move(s.safe(s.associationId(r),{before:o,after:"]"})),f(),o+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),o+=u.move((t?`
|
|
408
|
+
`:" ")+s.indentLines(s.containerFlow(r,u.current()),t?Qg:gA))),c(),o}}function gA(e,t,n){return t===0?e:Qg(e,t,n)}function Qg(e,t,n){return(n?"":" ")+e}const EA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Kg.peek=_A;function TA(){return{canContainEols:["delete"],enter:{strikethrough:xA},exit:{strikethrough:bA}}}function yA(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:EA}],handlers:{delete:Kg}}}function xA(e){this.enter({type:"delete",children:[]},e)}function bA(e){this.exit(e)}function Kg(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function _A(){return"~"}function kA(e){return e.length}function SA(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||kA,s=[],a=[],u=[],o=[];let c=0,f=-1;for(;++f<e.length;){const x=[],A=[];let E=-1;for(e[f].length>c&&(c=e[f].length);++E<e[f].length;){const T=CA(e[f][E]);if(n.alignDelimiters!==!1){const k=i(T);A[E]=k,(o[E]===void 0||k>o[E])&&(o[E]=k)}x.push(T)}a[f]=x,u[f]=A}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<c;)s[h]=Dm(r[h]);else{const x=Dm(r);for(;++h<c;)s[h]=x}h=-1;const m=[],p=[];for(;++h<c;){const x=s[h];let A="",E="";x===99?(A=":",E=":"):x===108?A=":":x===114&&(E=":");let T=n.alignDelimiters===!1?1:Math.max(1,o[h]-A.length-E.length);const k=A+"-".repeat(T)+E;n.alignDelimiters!==!1&&(T=A.length+T+E.length,T>o[h]&&(o[h]=T),p[h]=T),m[h]=k}a.splice(1,0,m),u.splice(1,0,p),f=-1;const g=[];for(;++f<a.length;){const x=a[f],A=u[f];h=-1;const E=[];for(;++h<c;){const T=x[h]||"";let k="",L="";if(n.alignDelimiters!==!1){const M=o[h]-(A[h]||0),S=s[h];S===114?k=" ".repeat(M):S===99?M%2?(k=" ".repeat(M/2+.5),L=" ".repeat(M/2-.5)):(k=" ".repeat(M/2),L=k):L=" ".repeat(M)}n.delimiterStart!==!1&&!h&&E.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&T==="")&&(n.delimiterStart!==!1||h)&&E.push(" "),n.alignDelimiters!==!1&&E.push(k),E.push(T),n.alignDelimiters!==!1&&E.push(L),n.padding!==!1&&E.push(" "),(n.delimiterEnd!==!1||h!==c-1)&&E.push("|")}g.push(n.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return g.join(`
|
|
409
|
+
`)}function CA(e){return e==null?"":String(e)}function Dm(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function NA(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),vA);return i(),a}function vA(e,t,n){return">"+(n?"":" ")+e}function AA(e,t){return Rm(e,t.inConstruct,!0)&&!Rm(e,t.notInConstruct,!1)}function Rm(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Om(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
410
|
+
`&&AA(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
411
|
+
`}function wA(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function IA(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function LA(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function DA(e,t,n,r){const i=LA(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(IA(e,n)){const h=n.enter("codeIndented"),m=n.indentLines(s,RA);return h(),m}const u=n.createTracker(r),o=i.repeat(Math.max(wA(s,i)+1,3)),c=n.enter("codeFenced");let f=u.move(o);if(e.lang){const h=n.enter(`codeFencedLang${a}`);f+=u.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...u.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${a}`);f+=u.move(" "),f+=u.move(n.safe(e.meta,{before:f,after:`
|
|
412
|
+
`,encode:["`"],...u.current()})),h()}return f+=u.move(`
|
|
413
|
+
`),s&&(f+=u.move(s+`
|
|
414
|
+
`)),f+=u.move(o),c(),f}function RA(e,t,n){return(n?"":" ")+e}function Gd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function OA(e,t,n,r){const i=Gd(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("[");return c+=o.move(n.safe(n.associationId(e),{before:c,after:"]",...o.current()})),c+=o.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
415
|
+
`,...o.current()}))),u(),e.title&&(u=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),a(),c}function PA(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Xs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ou(e,t,n){const r=Di(e),i=Di(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Xg.peek=MA;function Xg(e,t,n,r){const i=PA(n),s=n.enter("emphasis"),a=n.createTracker(r),u=a.move(i);let o=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const c=o.charCodeAt(0),f=Ou(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(o=Xs(c)+o.slice(1));const h=o.charCodeAt(o.length-1),m=Ou(r.after.charCodeAt(0),h,i);m.inside&&(o=o.slice(0,-1)+Xs(h));const p=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},u+o+p}function MA(e,t,n){return n.options.emphasis||"*"}function jA(e,t){let n=!1;return hl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,yc}),!!((!e.depth||e.depth<3)&&Od(e)&&(t.options.setext||n))}function FA(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(jA(e,n)){const f=n.enter("headingSetext"),h=n.enter("phrasing"),m=n.containerPhrasing(e,{...s.current(),before:`
|
|
416
|
+
`,after:`
|
|
417
|
+
`});return h(),f(),m+`
|
|
418
|
+
`+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
|
|
419
|
+
`))+1))}const a="#".repeat(i),u=n.enter("headingAtx"),o=n.enter("phrasing");s.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
420
|
+
`,...s.current()});return/^[\t ]/.test(c)&&(c=Xs(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),o(),u(),c}Jg.peek=BA;function Jg(e){return e.value||""}function BA(){return"<"}Zg.peek=UA;function Zg(e,t,n,r){const i=Gd(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let u=n.enter("label");const o=n.createTracker(r);let c=o.move("![");return c+=o.move(n.safe(e.alt,{before:c,after:"]",...o.current()})),c+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(u=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=n.enter(`title${s}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),u()),c+=o.move(")"),a(),c}function UA(){return"!"}eE.peek=HA;function eE(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const u=n.createTracker(r);let o=u.move("![");const c=n.safe(e.alt,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return a(),n.stack=f,s(),i==="full"||!c||c!==h?o+=u.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function HA(){return"!"}tE.peek=zA;function tE(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],u=n.compilePattern(a);let o;if(a.atBreak)for(;o=u.exec(r);){let c=o.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(o.index+1)}}return i+r+i}function zA(){return"`"}function nE(e,t){const n=Od(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}rE.peek=$A;function rE(e,t,n,r){const i=Gd(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,o;if(nE(e,n)){const f=n.stack;n.stack=[],u=n.enter("autolink");let h=a.move("<");return h+=a.move(n.containerPhrasing(e,{before:h,after:">",...a.current()})),h+=a.move(">"),u(),n.stack=f,h}u=n.enter("link"),o=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(o=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),o(),e.title&&(o=n.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),o()),c+=a.move(")"),u(),c}function $A(e,t,n){return nE(e,n)?"<":"["}iE.peek=YA;function iE(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const u=n.createTracker(r);let o=u.move("[");const c=n.containerPhrasing(e,{before:o,after:"]",...u.current()});o+=u.move(c+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:o,after:"]",...u.current()});return a(),n.stack=f,s(),i==="full"||!c||c!==h?o+=u.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=u.move("]"),o}function YA(){return"["}function Qd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function VA(e){const t=Qd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function WA(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function sE(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function qA(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?WA(n):Qd(n);const u=e.ordered?a==="."?")":".":VA(n);let o=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(o=!0),sE(n)===a&&f){let h=-1;for(;++h<e.children.length;){const m=e.children[h];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){o=!0;break}}}}o&&(a=u),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),c}function GA(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function QA(e,t,n,r){const i=GA(n);let s=n.bulletCurrent||Qd(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const u=n.createTracker(r);u.move(s+" ".repeat(a-s.length)),u.shift(a);const o=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,u.current()),f);return o(),c;function f(h,m,p){return m?(p?"":" ".repeat(a))+h:(p?s:s+" ".repeat(a-s.length))+h}}function KA(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const XA=dl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function JA(e,t,n,r){return(e.children.some(function(a){return XA(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function ZA(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}aE.peek=ew;function aE(e,t,n,r){const i=ZA(n),s=n.enter("strong"),a=n.createTracker(r),u=a.move(i+i);let o=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const c=o.charCodeAt(0),f=Ou(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(o=Xs(c)+o.slice(1));const h=o.charCodeAt(o.length-1),m=Ou(r.after.charCodeAt(0),h,i);m.inside&&(o=o.slice(0,-1)+Xs(h));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},u+o+p}function ew(e,t,n){return n.options.strong||"*"}function tw(e,t,n,r){return n.safe(e.value,r)}function nw(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function rw(e,t,n){const r=(sE(n)+(n.options.ruleSpaces?" ":"")).repeat(nw(n));return n.options.ruleSpaces?r.slice(0,-1):r}const uE={blockquote:NA,break:Om,code:DA,definition:OA,emphasis:Xg,hardBreak:Om,heading:FA,html:Jg,image:Zg,imageReference:eE,inlineCode:tE,link:rE,linkReference:iE,list:qA,listItem:QA,paragraph:KA,root:JA,strong:aE,text:tw,thematicBreak:rw};function iw(){return{enter:{table:sw,tableData:Pm,tableHeader:Pm,tableRow:uw},exit:{codeText:lw,table:aw,tableData:mo,tableHeader:mo,tableRow:mo}}}function sw(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function aw(e){this.exit(e),this.data.inTable=void 0}function uw(e){this.enter({type:"tableRow",children:[]},e)}function mo(e){this.exit(e)}function Pm(e){this.enter({type:"tableCell",children:[]},e)}function lw(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ow));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ow(e,t){return t==="|"?t:e}function cw(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
421
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:o,tableRow:u}};function a(p,g,x,A){return c(f(p,x,A),p.align)}function u(p,g,x,A){const E=h(p,x,A),T=c([E]);return T.slice(0,T.indexOf(`
|
|
422
|
+
`))}function o(p,g,x,A){const E=x.enter("tableCell"),T=x.enter("phrasing"),k=x.containerPhrasing(p,{...A,before:s,after:s});return T(),E(),k}function c(p,g){return SA(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(p,g,x){const A=p.children;let E=-1;const T=[],k=g.enter("table");for(;++E<A.length;)T[E]=h(A[E],g,x);return k(),T}function h(p,g,x){const A=p.children;let E=-1;const T=[],k=g.enter("tableRow");for(;++E<A.length;)T[E]=o(A[E],p,g,x);return k(),T}function m(p,g,x){let A=uE.inlineCode(p,g,x);return x.stack.includes("tableCell")&&(A=A.replace(/\|/g,"\\$&")),A}}function dw(){return{exit:{taskListCheckValueChecked:Mm,taskListCheckValueUnchecked:Mm,paragraph:hw}}}function fw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:mw}}}function Mm(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function hw(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const u=i[s];if(u.type==="paragraph"){a=u;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function mw(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);s&&u.move(a);let o=uE.listItem(e,t,n,{...r,...u.current()});return s&&(o=o.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),o;function c(f){return f+a}}function pw(){return[qv(),mA(),TA(),iw(),dw()]}function gw(e){return{extensions:[Gv(),pA(e),yA(),cw(e),fw()]}}const Ew={tokenize:kw,partial:!0},lE={tokenize:Sw,partial:!0},oE={tokenize:Cw,partial:!0},cE={tokenize:Nw,partial:!0},Tw={tokenize:vw,partial:!0},dE={name:"wwwAutolink",tokenize:bw,previous:hE},fE={name:"protocolAutolink",tokenize:_w,previous:mE},Gn={name:"emailAutolink",tokenize:xw,previous:pE},On={};function yw(){return{text:On}}let Cr=48;for(;Cr<123;)On[Cr]=Gn,Cr++,Cr===58?Cr=65:Cr===91&&(Cr=97);On[43]=Gn;On[45]=Gn;On[46]=Gn;On[95]=Gn;On[72]=[Gn,fE];On[104]=[Gn,fE];On[87]=[Gn,dE];On[119]=[Gn,dE];function xw(e,t,n){const r=this;let i,s;return a;function a(h){return!Ac(h)||!pE.call(r,r.previous)||Kd(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(h))}function u(h){return Ac(h)?(e.consume(h),u):h===64?(e.consume(h),o):n(h)}function o(h){return h===46?e.check(Tw,f,c)(h):h===45||h===95||St(h)?(s=!0,e.consume(h),o):f(h)}function c(h){return e.consume(h),i=!0,o}function f(h){return s&&i&&wt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function bw(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!hE.call(r,r.previous)||Kd(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ew,e.attempt(lE,e.attempt(oE,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function _w(e,t,n){const r=this;let i="",s=!1;return a;function a(h){return(h===72||h===104)&&mE.call(r,r.previous)&&!Kd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),u):n(h)}function u(h){if(wt(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),u;if(h===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(h),o}return n(h)}function o(h){return h===47?(e.consume(h),s?c:(s=!0,o)):n(h)}function c(h){return h===null||wu(h)||Me(h)||Yr(h)||ll(h)?n(h):e.attempt(lE,e.attempt(oE,f),n)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function kw(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function Sw(e,t,n){let r,i,s;return a;function a(c){return c===46||c===95?e.check(cE,o,u)(c):c===null||Me(c)||Yr(c)||c!==45&&ll(c)?o(c):(s=!0,e.consume(c),a)}function u(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),a}function o(c){return i||r||!s?n(c):t(c)}}function Cw(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(cE,t,s)(a):a===null||Me(a)||Yr(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function Nw(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),s):u===93?(e.consume(u),i):u===60||u===null||Me(u)||Yr(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Me(u)||Yr(u)?t(u):r(u)}function s(u){return wt(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):wt(u)?(e.consume(u),a):n(u)}}function vw(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return St(s)?n(s):t(s)}}function hE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Me(e)}function mE(e){return!wt(e)}function pE(e){return!(e===47||Ac(e))}function Ac(e){return e===43||e===45||e===46||e===95||St(e)}function Kd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Aw={tokenize:Mw,partial:!0};function ww(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Rw,continuation:{tokenize:Ow},exit:Pw}},text:{91:{name:"gfmFootnoteCall",tokenize:Dw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Iw,resolveTo:Lw}}}}function Iw(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const o=r.events[i][1];if(o.type==="labelImage"){a=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return u;function u(o){if(!a||!a._balanced)return n(o);const c=yn(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function Lw(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function Dw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return u;function u(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),o}function o(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(s>999||h===93&&!a||h===null||h===91||Me(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(yn(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return Me(h)||(a=!0),s++,e.consume(h),h===92?f:c}function f(h){return h===91||h===92||h===93?(e.consume(h),s++,c):c(h)}}function Rw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,u;return o;function o(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(a>999||g===93&&!u||g===null||g===91||Me(g))return n(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return s=yn(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Me(g)||(u=!0),a++,e.consume(g),g===92?h:f}function h(g){return g===91||g===92||g===93?(e.consume(g),a++,f):f(g)}function m(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ae(e,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return t(g)}}function Ow(e,t,n){return e.check(la,t,e.attempt(Aw,t,n))}function Pw(e){e.exit("gfmFootnoteDefinition")}function Mw(e,t,n){const r=this;return Ae(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function jw(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,u){let o=-1;for(;++o<a.length;)if(a[o][0]==="enter"&&a[o][1].type==="strikethroughSequenceTemporary"&&a[o][1]._close){let c=o;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[o][1].end.offset-a[o][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[o][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[o][1].end)},h={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[o][1].start)},m=[["enter",f,u],["enter",a[c][1],u],["exit",a[c][1],u],["enter",h,u]],p=u.parser.constructs.insideSpan.null;p&&Jt(m,m.length,0,ol(p,a.slice(c+1,o),u)),Jt(m,m.length,0,[["exit",h,u],["enter",a[o][1],u],["exit",a[o][1],u],["exit",f,u]]),Jt(a,c-1,o-c+3,m),o=c+m.length-2;break}}for(o=-1;++o<a.length;)a[o][1].type==="strikethroughSequenceTemporary"&&(a[o][1].type="data");return a}function s(a,u,o){const c=this.previous,f=this.events;let h=0;return m;function m(g){return c===126&&f[f.length-1][1].type!=="characterEscape"?o(g):(a.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const x=Di(c);if(g===126)return h>1?o(g):(a.consume(g),h++,p);if(h<2&&!n)return o(g);const A=a.exit("strikethroughSequenceTemporary"),E=Di(g);return A._open=!E||E===2&&!!x,A._close=!x||x===2&&!!E,u(g)}}}class Fw{constructor(){this.map=[]}add(t,n,r){Bw(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function Bw(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Uw(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Hw(){return{flow:{null:{name:"table",tokenize:zw,resolveAll:$w}}}}function zw(e,t,n){const r=this;let i=0,s=0,a;return u;function u(w){let z=r.events.length-1;for(;z>-1;){const le=r.events[z][1].type;if(le==="lineEnding"||le==="linePrefix")z--;else break}const K=z>-1?r.events[z][1].type:null,de=K==="tableHead"||K==="tableRow"?S:o;return de===S&&r.parser.lazy[r.now().line]?n(w):de(w)}function o(w){return e.enter("tableHead"),e.enter("tableRow"),c(w)}function c(w){return w===124||(a=!0,s+=1),f(w)}function f(w){return w===null?n(w):me(w)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),p):n(w):Ce(w)?Ae(e,f,"whitespace")(w):(s+=1,a&&(a=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),h(w)))}function h(w){return w===null||w===124||Me(w)?(e.exit("data"),f(w)):(e.consume(w),w===92?m:h)}function m(w){return w===92||w===124?(e.consume(w),h):h(w)}function p(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),a=!1,Ce(w)?Ae(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):g(w))}function g(w){return w===45||w===58?A(w):w===124?(a=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),x):M(w)}function x(w){return Ce(w)?Ae(e,A,"whitespace")(w):A(w)}function A(w){return w===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),E):w===45?(s+=1,E(w)):w===null||me(w)?L(w):M(w)}function E(w){return w===45?(e.enter("tableDelimiterFiller"),T(w)):M(w)}function T(w){return w===45?(e.consume(w),T):w===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(w))}function k(w){return Ce(w)?Ae(e,L,"whitespace")(w):L(w)}function L(w){return w===124?g(w):w===null||me(w)?!a||i!==s?M(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):M(w)}function M(w){return n(w)}function S(w){return e.enter("tableRow"),O(w)}function O(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),O):w===null||me(w)?(e.exit("tableRow"),t(w)):Ce(w)?Ae(e,O,"whitespace")(w):(e.enter("data"),D(w))}function D(w){return w===null||w===124||Me(w)?(e.exit("data"),O(w)):(e.consume(w),w===92?Y:D)}function Y(w){return w===92||w===124?(e.consume(w),D):D(w)}}function $w(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],u=!1,o=0,c,f,h;const m=new Fw;for(;++n<e.length;){const p=e[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(u=!1,o!==0&&(jm(m,t,o,c,f),f=void 0,o=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,h=void 0,s=[0,0,0,0],a=[0,n+1,0,0],u&&(u=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],h=Oa(m,t,s,i,void 0,h),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],h=Oa(m,t,s,i,void 0,h)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(u=!0,o=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(o=n,s[1]!==0?(a[0]=a[1],h=Oa(m,t,s,i,n,h)):a[1]!==0&&(h=Oa(m,t,a,i,n,h)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(o!==0&&jm(m,t,o,c,f),m.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=Uw(t.events,n))}return e}function Oa(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},ri(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const o=ri(t.events,n[1]);if(s={type:a,start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const c=ri(t.events,n[2]),f=ri(t.events,n[3]),h={type:u,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const m=t.events[n[2]],p=t.events[n[3]];if(m[1].end=Object.assign({},p[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,x=n[3]-n[2]-1;e.add(g,x,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(s.end=Object.assign({},ri(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function jm(e,t,n,r,i){const s=[],a=ri(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function ri(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Yw={name:"tasklistCheck",tokenize:Ww};function Vw(){return{text:{91:Yw}}}function Ww(e,t,n){const r=this;return i;function i(o){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),s)}function s(o){return Me(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),a):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),a):n(o)}function a(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(o)}function u(o){return me(o)?t(o):Ce(o)?e.check({tokenize:qw},t,n)(o):n(o)}}function qw(e,t,n){return Ae(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Gw(e){return $1([yw(),ww(),jw(e),Hw(),Vw()])}const Qw={};function Kw(e){const t=this,n=e||Qw,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Gw(n)),s.push(pw()),a.push(gw(n))}const Xw={search_file:{label:"Searched files",activeLabel:"Searching files",icon:Dr,color:"#3b82f6"},search_files:{label:"Searched files",activeLabel:"Searching files",icon:Dr,color:"#3b82f6"},search_file_content:{label:"Searched content",activeLabel:"Searching content",icon:Dr,color:"#3b82f6"},search_directory:{label:"Searched directory",activeLabel:"Searching directory",icon:Dr,color:"#3b82f6"},read_file:{label:"Read file",activeLabel:"Reading file",icon:In,color:"#8b5cf6"},write_file:{label:"Wrote file",activeLabel:"Writing file",icon:ky,color:"#f59e0b"},get_file_info:{label:"Got file info",activeLabel:"Getting file info",icon:In,color:"#8b5cf6"},browse_directory:{label:"Browsed directory",activeLabel:"Browsing directory",icon:Hn,color:"#a78bfa"},list_directory:{label:"Listed directory",activeLabel:"Listing directory",icon:Hn,color:"#a78bfa"},list_recent_files:{label:"Listed recent files",activeLabel:"Listing recent files",icon:Hn,color:"#a78bfa"},analyze_data_file:{label:"Analyzed data",activeLabel:"Analyzing data",icon:ph,color:"#ec4899"},run_shell_command:{label:"Ran command",activeLabel:"Running command",icon:Nu,color:"#22c55e"},execute_code:{label:"Executed code",activeLabel:"Executing code",icon:yy,color:"#f59e0b"},query_documents:{label:"Queried documents",activeLabel:"Querying documents",icon:ti,color:"#06b6d4"},query_specific_file:{label:"Queried file",activeLabel:"Querying file",icon:ti,color:"#06b6d4"},search_indexed_chunks:{label:"Searched chunks",activeLabel:"Searching chunks",icon:ti,color:"#06b6d4"},semantic_search:{label:"Searched documents",activeLabel:"Searching documents",icon:ti,color:"#06b6d4"},evaluate_retrieval:{label:"Evaluated retrieval",activeLabel:"Evaluating retrieval",icon:ti,color:"#06b6d4"},index_document:{label:"Indexed document",activeLabel:"Indexing document",icon:Ji,color:"#f97316"},index_directory:{label:"Indexed directory",activeLabel:"Indexing directory",icon:Ji,color:"#f97316"},index_file:{label:"Indexed file",activeLabel:"Indexing file",icon:Ji,color:"#f97316"},list_indexed_documents:{label:"Listed documents",activeLabel:"Listing documents",icon:Ji,color:"#f97316"},summarize_document:{label:"Summarized",activeLabel:"Summarizing",icon:In,color:"#8b5cf6"},dump_document:{label:"Extracted text",activeLabel:"Extracting text",icon:In,color:"#8b5cf6"},rag_status:{label:"Checked RAG status",activeLabel:"Checking RAG",icon:Ji,color:"#f97316"},add_watch_directory:{label:"Added watch dir",activeLabel:"Adding watch dir",icon:Hn,color:"#a78bfa"},web_search:{label:"Searched web",activeLabel:"Searching web",icon:l1,color:"#14b8a6"},analyze_data:{label:"Analyzed data",activeLabel:"Analyzing data",icon:ph,color:"#ec4899"}},Fm={label:"Used tool",activeLabel:"Using tool",icon:Vy,color:"#3b82f6"};function Jw(e){return e?e.startsWith("mcp_")?{label:"MCP tool",activeLabel:"Running MCP tool",icon:l1,color:"#7c3aed"}:Xw[e]||Fm:Fm}function Zw({steps:e,isActive:t,variant:n="inline"}){const[r,i]=y.useState(!1),[s,a]=y.useState(new Set),u=y.useRef(0),o=y.useRef(new Map),c=y.useRef(t);y.useEffect(()=>{c.current=t},[t]),y.useEffect(()=>()=>{o.current.forEach(S=>clearTimeout(S)),o.current.clear()},[]);const f=y.useMemo(()=>{const S=[];for(const O of e){const D=S[S.length-1];if(O.type==="thinking"&&D&&D.type==="thinking"){const Y=(D.detail||"")+(O.detail||"");S[S.length-1]={...O,detail:Y||D.detail};continue}if(O.type==="status"&&D&&D.type==="status"&&O.active!==!1){S[S.length-1]={...O,label:O.label||D.label};continue}if(O.type==="thinking"&&D&&D.type==="status"&&D.active!==!1){S[S.length-1]={...D,type:"thinking",detail:O.detail||D.detail,active:O.active};continue}if(O.type==="status"&&D&&D.type==="thinking"){S[S.length-1]={...D,label:O.label||D.label,active:O.active??D.active};continue}S.push(O)}return S},[e]),h=f.filter(S=>S.type==="tool"),[m,p]=y.useState(""),[g,x]=y.useState("all"),A=y.useMemo(()=>!m&&g==="all"?f:f.filter(S=>{var O;return S.type!=="tool"?!0:!(m&&!((O=S.tool)!=null&&O.toLowerCase().includes(m.toLowerCase()))||g==="success"&&S.success!==!0||g==="error"&&S.success!==!1)}),[f,m,g]),T=f.filter(S=>S.type==="error").length>0;y.useEffect(()=>{u.current=f.length;const S=f.filter(O=>O.type==="tool"&&!O.mcpServer).map(O=>O.id);S.length>0&&a(O=>{const D=new Set(O);return S.forEach(Y=>D.add(Y)),D})},[f]);const k=y.useCallback(S=>{const O=o.current.get(S);O&&(clearTimeout(O),o.current.delete(S)),a(D=>{const Y=new Set(D);return Y.has(S)?Y.delete(S):Y.add(S),Y})},[]);if(f.length===0)return null;const L=f.length,M=`${L} step${L!==1?"s":""}`+(h.length>0?` · ${h.length} tool${h.length!==1?"s":""}`:"");return l.jsxs("div",{className:`agent-activity ${n} ${t?"active":"done"} ${T?"has-errors":""}`,children:[l.jsxs("button",{className:"agent-summary-bar",onClick:()=>i(!r),"aria-expanded":r,"aria-label":r?"Collapse agent activity":"Expand agent activity",children:[l.jsxs("div",{className:"agent-summary-left",children:[T?l.jsx(Lt,{size:14,className:"agent-icon-error"}):l.jsx(f1,{size:14,className:"agent-icon-done"}),l.jsx("span",{className:"agent-summary-text",children:M})]}),l.jsx("div",{className:"agent-summary-right",children:r?l.jsx(tl,{size:14}):l.jsx(ia,{size:14})})]}),f.length>0&&l.jsxs("div",{className:`agent-flow-wrap ${r?"flow-expanded":"flow-collapsed"}`,children:[r&&h.length>=2&&l.jsxs("div",{className:"activity-filter-bar",children:[l.jsx("input",{type:"text",className:"activity-filter-input",placeholder:"Filter by tool name...","aria-label":"Filter by tool name",value:m,onChange:S=>p(S.target.value)}),l.jsxs("select",{className:"activity-filter-select","aria-label":"Filter by status",value:g,onChange:S=>x(S.target.value),children:[l.jsx("option",{value:"all",children:"All"}),l.jsx("option",{value:"success",children:"Success"}),l.jsx("option",{value:"error",children:"Error"})]})]}),l.jsx("div",{className:"agent-flow",children:A.map(S=>S.type==="thinking"?l.jsx(e6,{step:S},S.id):S.type==="status"?l.jsx(t6,{step:S},S.id):S.type==="tool"?l.jsx(i6,{step:S,isExpanded:s.has(S.id),onToggle:()=>k(S.id)},S.id):S.type==="plan"?l.jsx(s6,{step:S},S.id):S.type==="error"?l.jsx(a6,{step:S},S.id):null)})]})]})}function e6({step:e}){const t=e.detail||e.label||"",n=y.useRef(null);return y.useEffect(()=>{e.active&&n.current&&(n.current.scrollTop=n.current.scrollHeight)},[t,e.active]),t?l.jsxs("div",{ref:n,className:"flow-thought-hacker",children:[l.jsx("span",{children:t}),e.active&&l.jsx("span",{className:"flow-thought-cursor"})]}):null}function t6({step:e}){const t=e.detail||e.label||"";return t?l.jsx("div",{className:`flow-thought ${e.active?"active":""}`,children:l.jsx("span",{className:"flow-thought-text",children:t})}):null}function n6(e){const t=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])*[^\s*?"<>|,;)}\]]*/gi,n=[];let r=0,i;for(;(i=t.exec(e))!==null;){i.index>r&&n.push(e.slice(r,i.index));const s=i[0],a=s.replace(/[)}\]]+$/,""),u=()=>{Ad(a).catch(o=>P.ui.error("Failed to open path",o))};n.push(l.jsxs("span",{className:"tool-result-path",onClick:u,title:`Open: ${a}`,role:"button",tabIndex:0,onKeyDown:o=>{o.key==="Enter"&&u()},children:[l.jsx(Hn,{size:10,style:{flexShrink:0,opacity:.7}}),a]},i.index)),a.length<s.length&&n.push(s.slice(a.length)),r=i.index+s.length}return n.length===0?e:(r<e.length&&n.push(e.slice(r)),l.jsx(l.Fragment,{children:n}))}function r6({fileList:e}){const[t,n]=y.useState(!1),r=5,i=t?e.files:e.files.slice(0,r),s=e.total-r,a=(o,c)=>{const f=o.name||o.filename||o.file_name;return f?String(f):o.file_path?String(o.file_path).replace(/\\/g,"/").split("/").pop()||`File ${c+1}`:`File ${c+1}`},u=o=>o.directory?String(o.directory):"";return l.jsxs("div",{className:"file-list-view",children:[i.map((o,c)=>l.jsxs("div",{className:"file-list-item",children:[l.jsx(a1,{size:11,className:"file-list-icon"}),l.jsx("span",{className:"file-list-name",children:a(o,c)}),u(o)&&l.jsx("span",{className:"file-list-dir",children:u(o)})]},c)),s>0&&!t&&l.jsxs("button",{className:"file-list-more",onClick:()=>n(!0),children:["+",s," more"]}),t&&e.files.length<e.total&&l.jsxs("span",{className:"file-list-truncated",children:["Showing ",e.files.length," of ",e.total," files"]})]})}function i6({step:e,isExpanded:t,onToggle:n}){var o,c;const r=Jw(e.tool),i=r.icon,s=r.color,a=e.active?r.activeLabel:r.label,u=!!(e.detail||e.result||e.commandOutput||(c=(o=e.fileList)==null?void 0:o.files)!=null&&c.length);return l.jsxs("div",{className:`flow-tool ${e.active?"active":""} ${e.success===!1?"error":""}`,children:[l.jsxs("button",{className:"flow-tool-header",onClick:u?n:void 0,style:u?void 0:{cursor:"default"},children:[l.jsxs("div",{className:"flow-tool-left",children:[e.active?l.jsx(ht,{size:13,className:"flow-tool-spinner",style:{color:s}}):e.success===!1?l.jsx(Lt,{size:13,style:{color:"#ef4444"}}):e.success===!0?l.jsx(zr,{size:13,style:{color:"#22c55e"}}):l.jsx(i,{size:13,style:{color:s}}),l.jsx("span",{className:"flow-tool-label",children:a}),l.jsx("span",{className:"flow-tool-badge",style:{"--badge-color":s},children:e.tool}),e.mcpServer&&l.jsxs("span",{className:"flow-tool-mcp-server",children:["via ",e.mcpServer]})]}),l.jsxs("div",{className:"flow-tool-right",children:[e.latencyMs!=null&&!e.active&&l.jsxs("span",{className:"flow-tool-latency",children:[Math.round(e.latencyMs),"ms"]}),u&&l.jsx("span",{className:`flow-tool-chevron ${t?"expanded":""}`,children:l.jsx(ia,{size:12})})]})]}),t&&u&&l.jsxs("div",{className:"flow-tool-detail",children:[e.detail&&!e.commandOutput&&l.jsxs("div",{className:"step-detail-args",children:[l.jsx("span",{className:"detail-section-label",children:"Arguments"}),l.jsx("div",{className:"detail-args-content",children:o6(e.detail)})]}),e.commandOutput&&l.jsx(l6,{output:e.commandOutput}),e.result&&!e.commandOutput&&l.jsxs("div",{className:`step-detail-result ${e.success===!1?"result-error":"result-success"}`,children:[l.jsx("span",{className:"detail-section-label",children:e.success===!1?"Error":"Result"}),l.jsx("div",{className:"detail-result-content",children:n6(e.result)})]}),e.retrievalChunks&&e.retrievalChunks.length>0&&l.jsx(u6,{chunks:e.retrievalChunks}),e.fileList&&e.fileList.files.length>0&&l.jsx(r6,{fileList:e.fileList})]})]})}function s6({step:e}){const[t,n]=y.useState(!1);return!e.planSteps||e.planSteps.length===0?null:l.jsxs("div",{className:"flow-plan",children:[l.jsxs("button",{className:"flow-plan-header flow-plan-toggle",onClick:()=>n(r=>!r),"aria-expanded":t,title:t?"Collapse plan":"Expand plan",children:[l.jsx(Ay,{size:12}),l.jsx("span",{children:"Plan"}),l.jsxs("span",{className:"flow-plan-count",children:["(",e.planSteps.length,")"]}),t?l.jsx(tl,{size:11}):l.jsx(ia,{size:11})]}),t&&l.jsx("ol",{className:"flow-plan-list",children:e.planSteps.map((r,i)=>l.jsx("li",{className:"flow-plan-item",children:r},i))})]})}function a6({step:e}){return l.jsxs("div",{className:"flow-error",children:[l.jsx(Lt,{size:13}),l.jsx("span",{children:e.detail||e.label||"An error occurred"})]})}function u6({chunks:e}){const[t,n]=y.useState(new Set),r=i=>{n(s=>{const a=new Set(s);return a.has(i)?a.delete(i):a.add(i),a})};return l.jsxs("div",{className:"chunks-view",children:[l.jsxs("span",{className:"detail-section-label",children:["Retrieved Chunks (",e.length,")"]}),l.jsx("div",{className:"chunks-list",children:e.map(i=>{const s=t.has(i.id);return l.jsxs("div",{className:`chunk-card ${s?"expanded":""}`,children:[l.jsxs("button",{className:"chunk-header",onClick:()=>r(i.id),children:[l.jsxs("div",{className:"chunk-header-left",children:[l.jsx(ti,{size:11,style:{color:"#06b6d4",flexShrink:0}}),i.source&&l.jsx("span",{className:"chunk-source",children:i.source}),i.page!=null&&l.jsxs("span",{className:"chunk-page",children:["p.",i.page]}),i.score!=null&&i.score>0&&l.jsx("span",{className:"chunk-score",children:i.score.toFixed(2)})]}),l.jsx("span",{className:`chunk-chevron ${s?"expanded":""}`,children:l.jsx(ia,{size:11})})]}),l.jsx("div",{className:`chunk-body ${s?"show":""}`,children:s?l.jsx("pre",{className:"chunk-content",children:i.content}):l.jsx("div",{className:"chunk-preview",children:i.preview})})]},i.id)})})]})}function l6({output:e}){const[t,n]=y.useState(!1),r=y.useRef(null);y.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]);const i=y.useCallback(()=>{const u=e.stdout||e.stderr||"";navigator.clipboard.writeText(u).catch(()=>{}),n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>n(!1),2e3)},[e]),s=!!(e.stdout||e.stderr),a=e.returnCode!==0;return l.jsxs("div",{className:`cmd-output ${a?"cmd-error":""}`,children:[l.jsxs("div",{className:"cmd-header",children:[l.jsxs("div",{className:"cmd-header-left",children:[l.jsx(Nu,{size:12,className:"cmd-header-icon"}),l.jsx("span",{className:"cmd-header-title",children:"Terminal"}),e.cwd&&l.jsx("span",{className:"cmd-cwd",children:e.cwd})]}),l.jsxs("div",{className:"cmd-header-right",children:[e.durationSeconds!=null&&l.jsxs("span",{className:"cmd-duration",children:[e.durationSeconds.toFixed(1),"s"]}),e.returnCode!==0&&l.jsxs("span",{className:"cmd-exit-code",children:["exit ",e.returnCode]}),s&&l.jsx("button",{className:`cmd-copy ${t?"copied":""}`,onClick:i,title:t?"Copied!":"Copy output",children:t?l.jsx(ra,{size:11}):l.jsx(nl,{size:11})})]})]}),l.jsxs("div",{className:"cmd-line",children:[l.jsx("span",{className:"cmd-prompt",children:"$"}),l.jsx("span",{className:"cmd-text",children:e.command})]}),e.stdout&&l.jsx("pre",{className:"cmd-stdout",children:e.stdout}),e.stderr&&l.jsx("pre",{className:"cmd-stderr",children:e.stderr}),e.truncated&&l.jsx("div",{className:"cmd-truncated",children:"Output was truncated (exceeded size limit)"}),!s&&l.jsx("div",{className:"cmd-empty",children:"No output"})]})}function o6(e){const t=e.includes(`
|
|
423
|
+
`)?e.split(`
|
|
424
|
+
`).filter(Boolean):e.split(", ").filter(Boolean);return t.length<=1?l.jsx("span",{className:"arg-value",children:e}):l.jsx("div",{className:"args-grid",children:t.map((n,r)=>{const i=n.indexOf(":");if(i>0&&i<30){const s=n.slice(0,i).trim(),a=n.slice(i+1).trim();return l.jsxs("div",{className:"arg-row",children:[l.jsx("span",{className:"arg-key",children:s}),l.jsx("span",{className:"arg-value",children:a})]},r)}return l.jsx("div",{className:"arg-row",children:l.jsx("span",{className:"arg-value",children:n})},r)})})}function c6({active:e}){const t="Thinking...",[n,r]=y.useState(0),[i,s]=y.useState("typing"),a=y.useRef(e);return y.useEffect(()=>{if(i!=="typing")return;if(n>=t.length){s("idle");return}const u=setTimeout(()=>r(o=>o+1),30);return()=>clearTimeout(u)},[i,n]),y.useEffect(()=>{a.current&&!e&&s("erasing"),a.current=e},[e]),y.useEffect(()=>{if(i!=="erasing")return;if(n<=0){s("done");return}const u=setTimeout(()=>r(o=>o-1),20);return()=>clearTimeout(u)},[i,n]),y.useEffect(()=>{e&&i==="done"&&(r(0),s("typing"))},[e,i]),i==="done"?null:l.jsxs("span",{className:"thinking-indicator",children:[l.jsx("span",{className:"thinking-indicator-text",children:t.slice(0,n)}),e&&l.jsx("span",{className:"cursor"})]})}function d6(e){if(!e)return!1;const t=e.toLowerCase();return t.startsWith("error:")||t.startsWith("error -")||t.includes("traceback (most recent")||t.includes("object has no attribute")||t.includes("is lemonade server running")||t.includes("connection refused")||t.includes("failed to fetch")}const f6=/\s*\{\s*"?tool"?\s*:\s*"[^"]+"\s*,\s*"?tool_args"?\s*:\s*\{[^}]*\}\s*\}/g;function h6(e){const t=['"thought"','"answer"','"tool"'];let n="",r=0;for(;r<e.length;){const i=e.indexOf("{",r);if(i===-1){n+=e.slice(r);break}const s=e.slice(i,i+50);if(!t.some(f=>s.includes(f))){n+=e.slice(r,i+1),r=i+1;continue}n+=e.slice(r,i);let u=0,o=i;for(;o<e.length;o++)if(e[o]==="{")u++;else if(e[o]==="}"&&(u--,u===0))break;if(u!==0)break;const c=e.slice(i,o+1);try{const f=JSON.parse(c);f.answer&&(n+=f.answer)}catch{const f=c.indexOf('"answer"');if(f!==-1){const h=c.indexOf(":",f+8);if(h!==-1){let m=h+1;for(;m<c.length&&/\s/.test(c[m]);)m++;if(m<c.length&&c[m]==='"'){let p=c.slice(m+1);p.endsWith('"}')?p=p.slice(0,-2):p.endsWith('"')&&(p=p.slice(0,-1)),n+=p.replace(/\\"/g,'"').replace(/\\n/g,`
|
|
425
|
+
`).replace(/\\\\/g,"\\")}}}}r=o+1}return n}const m6=new Set(["python","py","javascript","js","typescript","ts","java","c","cpp","csharp","cs","go","rust","ruby","rb","php","swift","kotlin","scala","r","perl","lua","bash","sh","zsh","powershell","ps1","sql","html","css","scss","sass","less","xml","json","yaml","yml","toml","ini","csv","markdown","md","dockerfile","docker","makefile","cmake","nginx","apache","graphql","proto","protobuf","jsx","tsx","vue","svelte","dart","elixir","ex","erlang","haskell","hs","ocaml","ml","fsharp","fs","clojure","clj","lisp","scheme","racket","zig","nim","crystal","julia","matlab","octave","fortran","cobol","pascal","delphi","ada","assembly","asm","nasm","wasm","solidity","sol","verilog","vhdl","text","txt","plaintext","diff","patch","log"]);function p6(e){return e.replace(/```(\w*)[ \t]*\n([\s\S]*?)```/g,(t,n,r)=>{const i=n.toLowerCase();return i&&m6.has(i)?t:r.trim()})}function g6(e){if(!e)return e;let t=e;t=t.replace(f6,""),t=h6(t),t=t.replace(/<think>[\s\S]*?<\/think>/g,"");const n=(t.match(/\\n/g)||[]).length,r=(t.match(/\n/g)||[]).length;return n>2&&n>r*2&&(t=t.replace(/\\n/g,`
|
|
426
|
+
`),t=t.replace(/\\"/g,'"')),t=p6(t).trim(),t}function E6(e){if(!e)return"";const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const s=Math.floor(i/60);return s<24?`${s}h ago`:t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function Bm(e){return e?new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}):""}function T6(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function Um({message:e,isStreaming:t,showTerminalCursor:n,agentSteps:r,agentStepsActive:i,onDelete:s,onResend:a,latencyMs:u,agentName:o}){var M,S,O;const c=e.role==="assistant"&&d6(e.content),f=y.useMemo(()=>g6(e.content),[e.content]),[h,m]=y.useState(!1),[p,g]=y.useState(!1),x=y.useRef(null),A=y.useRef(null);y.useEffect(()=>()=>{x.current&&clearTimeout(x.current),A.current&&clearTimeout(A.current)},[]);const E=y.useCallback(()=>{var D;if((D=navigator.clipboard)!=null&&D.writeText)navigator.clipboard.writeText(e.content).catch(()=>{});else{const Y=document.createElement("textarea");Y.value=e.content,Y.style.position="fixed",Y.style.opacity="0",document.body.appendChild(Y),Y.select(),document.execCommand("copy"),document.body.removeChild(Y)}m(!0),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>m(!1),2e3)},[e.content]),T=y.useCallback(()=>{if(!p){g(!0),A.current&&clearTimeout(A.current),A.current=setTimeout(()=>g(!1),3e3);return}g(!1),A.current&&clearTimeout(A.current),s==null||s(e.id)},[p,e.id,s]),k=y.useCallback(()=>{a==null||a(e)},[e,a]),L=e.created_at?`${e.role==="user"?"Sent":"Replied"} ${Bm(e.created_at)}`:void 0;return l.jsx("div",{className:`msg msg-${e.role} ${c?"msg-error":""}`,title:L,children:l.jsxs("div",{className:"msg-inner",children:[l.jsxs("div",{className:"msg-header",children:[l.jsx("div",{className:"msg-header-left",children:e.role==="assistant"&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"msg-avatar msg-avatar-assistant","aria-hidden":"true",children:l.jsx("img",{src:v1,alt:""})}),l.jsx("span",{className:"msg-role-brand",children:"GAIA"}),(()=>{const Y=((o==null?void 0:o.trim())??"").replace(/^gaia\b\s*/i,"");return Y?l.jsx("span",{className:"msg-role-agent",children:Y}):null})(),(t||e.created_at)&&l.jsx("span",{className:"msg-header-sep",children:"|"}),t&&l.jsx(c6,{active:!!i||!f}),!t&&e.created_at&&l.jsx("span",{className:"msg-timestamp",children:E6(e.created_at)})]})}),!t&&l.jsxs("div",{className:"msg-actions",children:[e.role==="user"&&a&&l.jsx("button",{className:"msg-action-btn",onClick:k,title:"Resend message","aria-label":"Resend message",children:l.jsx(c1,{size:12})}),l.jsx("button",{className:`msg-copy ${h?"copied":""}`,onClick:E,title:h?"Copied!":"Copy message","aria-label":h?"Copied to clipboard":"Copy message",children:h?l.jsx(ra,{size:12}):l.jsx(nl,{size:12})}),s&&l.jsx("button",{className:`msg-action-btn msg-delete ${p?"confirm":""}`,onClick:T,title:p?"Click again to confirm":"Delete message","aria-label":p?"Confirm delete message":"Delete message",children:l.jsx(vu,{size:12})})]})]}),l.jsxs("div",{className:"msg-body",children:[r&&r.length>0&&l.jsx(Zw,{steps:r,isActive:i??!1,variant:i?"inline":"summary"}),c&&l.jsxs("div",{className:"error-banner",children:[l.jsx(Tr,{size:14}),l.jsx("span",{children:"Something went wrong"})]}),l.jsx(S6,{content:f,showCursor:(t||n)&&!!f&&!i}),e.role==="assistant"&&!t&&(e.stats||u!=null||e.created_at)&&l.jsxs("div",{className:"msg-stats","aria-label":"Message performance stats",children:[e.created_at&&l.jsx("span",{className:"msg-stats-ts",title:"Message timestamp",children:Bm(e.created_at)}),u!=null&&u>0&&l.jsx("span",{title:"Total response time",children:T6(u)}),((M=e.stats)==null?void 0:M.tokens_per_second)!=null&&e.stats.tokens_per_second>0&&l.jsxs("span",{title:"Tokens per second",children:[e.stats.tokens_per_second," tok/s"]}),((S=e.stats)==null?void 0:S.time_to_first_token)!=null&&e.stats.time_to_first_token>0&&l.jsxs("span",{title:"Time to first token",children:[(e.stats.time_to_first_token*1e3).toFixed(0),"ms TTFT"]}),((O=e.stats)==null?void 0:O.output_tokens)!=null&&e.stats.output_tokens>0&&l.jsxs("span",{title:"Input → output tokens",children:[(e.stats.input_tokens??0).toLocaleString()," → ",e.stats.output_tokens.toLocaleString()," tokens"]})]})]})]})})}function y6({lang:e,code:t}){const[n,r]=y.useState(!1),i=y.useRef(null);y.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const s=y.useCallback(()=>{var a;if((a=navigator.clipboard)!=null&&a.writeText)navigator.clipboard.writeText(t).catch(()=>{});else{const u=document.createElement("textarea");u.value=t,u.style.position="fixed",u.style.opacity="0",document.body.appendChild(u),u.select(),document.execCommand("copy"),document.body.removeChild(u)}r(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>r(!1),2e3)},[t]);return l.jsxs("div",{className:"code-block",children:[l.jsxs("div",{className:"code-header",children:[l.jsx("span",{className:"code-lang",children:e||"code"}),l.jsxs("button",{className:`code-copy ${n?"copied":""}`,onClick:s,title:n?"Copied!":"Copy","aria-label":n?"Copied to clipboard":"Copy code",children:[n?l.jsx(ra,{size:13}):l.jsx(nl,{size:13}),l.jsx("span",{children:n?"Copied":"Copy"})]})]}),l.jsx("pre",{children:l.jsx("code",{children:t})})]})}const x6=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])*[^\s*?"<>|,;)}\]]*\.\w{1,5}/gi,b6=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])+/gi;function _6({path:e}){const t=n=>{n.preventDefault(),Ad(e).catch(r=>{P.ui.error("Failed to open path",r)})};return l.jsxs("span",{className:"file-path-link",onClick:t,title:`Open in file explorer: ${e}`,role:"button",tabIndex:0,onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),t(n))},children:[l.jsx(Hn,{size:12,className:"file-path-icon"}),e]})}function k6(e){const t=new RegExp(`(${x6.source}|${b6.source})`,"gi"),n=[];let r=0,i;for(;(i=t.exec(e))!==null;)i.index>r&&n.push(e.slice(r,i.index)),n.push(l.jsx(_6,{path:i[0]},i.index)),r=t.lastIndex;return n.length===0?e:(r<e.length&&n.push(e.slice(r)),l.jsx(l.Fragment,{children:n}))}function Jn(e){return ws.Children.map(e,t=>typeof t=="string"?k6(t):t)}function S6({content:e,showCursor:t}){return!e&&!t?null:!e&&t?l.jsx("span",{className:"cursor"}):l.jsxs("div",{className:"md-content",children:[l.jsx(C3,{remarkPlugins:[Kw],rehypePlugins:[Hv],components:{code({className:n,children:r,...i}){return l.jsx("code",{className:"inline-code",...i,children:r})},pre({children:n}){var i,s;const r=ws.Children.toArray(n)[0];if(ws.isValidElement(r)&&(r.type==="code"||((i=r.props)==null?void 0:i.className)!==void 0||typeof((s=r.props)==null?void 0:s.children)=="string")){const a=r.props,u=(a==null?void 0:a.className)||"",o=/language-(\w+)/.exec(u),c=String((a==null?void 0:a.children)||"").replace(/\n$/,"");return l.jsx(y6,{lang:(o==null?void 0:o[1])||"",code:c})}return l.jsx("pre",{children:n})},table({children:n}){return l.jsx("div",{className:"md-table-wrap",children:l.jsx("table",{className:"md-table",children:n})})},a({href:n,children:r}){return l.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"md-link",children:r})},p({children:n}){return l.jsx("p",{className:"md-p",children:Jn(n)})},h1({children:n}){return l.jsx("h2",{className:"md-h2",children:Jn(n)})},h2({children:n}){return l.jsx("h3",{className:"md-h3",children:Jn(n)})},h3({children:n}){return l.jsx("h4",{className:"md-h4",children:Jn(n)})},ul({children:n}){return l.jsx("ul",{className:"md-ul",children:n})},ol({children:n}){return l.jsx("ol",{className:"md-ol",children:n})},li({children:n}){return l.jsx("li",{className:"md-li",children:Jn(n)})},blockquote({children:n}){return l.jsx("blockquote",{className:"md-blockquote",children:Jn(n)})},hr(){return l.jsx("hr",{className:"md-hr"})},td({children:n}){return l.jsx("td",{children:Jn(n)})},th({children:n}){return l.jsx("th",{children:Jn(n)})}},children:e}),t&&l.jsx("span",{className:"cursor"})]})}const C6=500,Pu="gaia_always_allow_tools",Mu=T1((e,t)=>({notifications:[],showPanel:!1,typeFilter:null,addNotification:n=>e(r=>({notifications:[n,...r.notifications].slice(0,C6)})),dismiss:n=>e(r=>({notifications:r.notifications.map(i=>i.id===n?{...i,dismissed:!0}:i)})),markRead:n=>e(r=>({notifications:r.notifications.map(i=>i.id===n?{...i,read:!0}:i)})),markAllRead:()=>e(n=>({notifications:n.notifications.map(r=>({...r,read:!0}))})),clearAll:()=>e({notifications:[]}),setShowPanel:n=>e({showPanel:n}),setTypeFilter:n=>e({typeFilter:n}),respondToPermission:async(n,r,i)=>{var o;const s=t().notifications.find(c=>c.id===n),a=s==null?void 0:s.agentId,u=window.gaiaAPI;if((o=u==null?void 0:u.notification)!=null&&o.respondPermission)try{await u.notification.respondPermission(n,r,i)}catch(c){console.error("[notificationStore] Failed to send permission response via IPC:",c);return}else if(a)try{await k1(a,r==="allow")}catch(c){console.error("[notificationStore] Failed to send permission response via REST:",c);return}if(r==="allow"&&i&&s!=null&&s.tool){const c=JSON.parse(localStorage.getItem(Pu)||"[]");c.includes(s.tool)||(c.push(s.tool),localStorage.setItem(Pu,JSON.stringify(c)))}e(c=>({notifications:c.notifications.map(f=>f.id===n?{...f,response:r,respondedAt:Date.now(),read:!0}:f)}))}})),N6=e=>e.notifications.find(t=>t.type==="permission_request"&&!t.response&&!t.dismissed)??null,gE="https://github.com/amd/gaia/issues/new",v6=[{label:"Image",extensions:new Set([".jpg",".jpeg",".png",".gif",".bmp",".tiff",".webp",".ico",".heic",".heif"]),message:"Image files cannot be indexed for text search.",alternatives:["Index PDFs that contain images — text is extracted automatically","Paste image descriptions or OCR text directly into the chat","Use GAIA's VLM agent for image analysis: gaia vlm"],featureTitle:"Support image file indexing and OCR"},{label:"Video",extensions:new Set([".mp4",".avi",".mkv",".mov",".wmv",".flv",".webm",".m4v"]),message:"Video files are not supported for indexing.",alternatives:["Extract subtitles or transcripts from videos and index those","Use GAIA's voice/talk mode for audio: gaia talk"],featureTitle:"Support video file indexing"},{label:"Audio",extensions:new Set([".mp3",".wav",".flac",".aac",".ogg",".wma",".m4a",".opus"]),message:"Audio files are not supported for indexing.",alternatives:["Use GAIA's voice mode for speech interaction: gaia talk","Transcribe audio to text first, then index the transcript"],featureTitle:"Support audio file transcription and indexing"},{label:"Archive",extensions:new Set([".zip",".rar",".7z",".tar",".gz",".bz2",".xz",".tgz"]),message:"Archive files must be extracted before indexing.",alternatives:["Extract the archive contents to a folder","Then index the folder or individual files from the Document Library"],featureTitle:"Support automatic archive extraction for indexing"},{label:"Executable",extensions:new Set([".exe",".msi",".dll",".so",".app",".dmg",".bin",".com"]),message:"Executable and binary files cannot be indexed.",alternatives:["Index source code files (.py, .js, .ts, .java, etc.) instead","Index documentation or README files from the project"],featureTitle:"Support binary file analysis"},{label:"Database",extensions:new Set([".sqlite",".db",".mdb",".accdb",".dbf"]),message:"Database files are not supported for direct indexing.",alternatives:["Export data to CSV or JSON format, then index those files","Use SQL queries to extract relevant data to a text file"],featureTitle:"Support database file indexing"},{label:"Microsoft Office",extensions:new Set([".doc",".docx",".ppt",".pptx",".xls"]),message:"Word, PowerPoint, and legacy Excel (.xls) files are not yet supported — GAIA does not currently ship parsers for these formats.",alternatives:["Save as PDF from Word or PowerPoint, then index the PDF","Re-save legacy .xls workbooks as .xlsx — GAIA supports modern Excel files"],featureTitle:"Support Microsoft Office (docx, pptx, xls) indexing"}];function vs(e){const t=e.toLowerCase().startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`;for(const n of v6)if(n.extensions.has(t))return n;return null}const A6=new Set([".pdf",".txt",".md",".csv",".json",".xlsx",".html",".htm",".xml",".svg",".yaml",".yml",".py",".js",".ts",".java",".c",".cpp",".h",".rs",".go",".rb",".sh",".bat",".ps1",".log",".cfg",".ini",".toml"]);function ju(e){const t=e.toLowerCase().startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`;return A6.has(t)}function EE(){const e="0.17.6",t=navigator.userAgent,n=navigator.platform||"unknown";return`**Environment:**
|
|
427
|
+
- GAIA Version: ${e}
|
|
428
|
+
- Platform: ${n}
|
|
429
|
+
- User Agent: ${t}
|
|
430
|
+
- Interface: Agent UI (Web)`}function Hm(e,t){const n=["## Feature Description","",`I would like GAIA to support: **${e}**`,"","## Use Case","","_Describe how you would use this feature:_","","## Current Workaround","","_Is there a workaround you are currently using?_","","---",EE(),"","_Submitted from GAIA Agent UI_"].join(`
|
|
431
|
+
`),r=new URLSearchParams({title:`[Feature] ${e}`,body:n,labels:"enhancement,agent-ui"});return`${gE}?${r.toString()}`}function wc(e,t){const n=["## Bug Description","",e,"","## Steps to Reproduce","","1. Open GAIA Agent UI","2. _Describe what you did:_","3. ","","## Expected Behavior","","_What did you expect to happen?_","","## Actual Behavior","","_What happened instead?_","","---",EE(),"","_Submitted from GAIA Agent UI_"].join(`
|
|
432
|
+
`),r=new URLSearchParams({title:`[Bug] ${e}`,body:n,labels:"bug,agent-ui"});return`${gE}?${r.toString()}`}function TE({filename:e,error:t,onDismiss:n,timeout:r=15e3}){var p;const i=y.useRef(null);y.useEffect(()=>(r>0&&(i.current=setTimeout(n,r)),()=>{i.current&&clearTimeout(i.current)}),[n,r]);const s=e.includes(".")?"."+((p=e.split(".").pop())==null?void 0:p.toLowerCase()):"",a=s?vs(s):null,u=t.toLowerCase().includes("unsupported file type")||t.toLowerCase().includes("not supported for indexing")||a!==null,o=t.toLowerCase().includes("fetch")||t.toLowerCase().includes("network")||t.toLowerCase().includes("connect");let c,f,h,m=Lt;return u&&a?(c=`${a.label} files not supported`,f=a.message,h=Hm(a.featureTitle),m=Tr):u?(c=`File type not supported: ${s}`,f="This file format cannot be indexed. Supported: PDF, TXT, MD, CSV, JSON, XLSX, HTML, XML, YAML, and 30+ code file formats.",h=Hm(`Support ${s} file indexing`),m=Tr):o?(c="Connection error",f="Could not reach the GAIA server. Make sure the backend is running.",h=wc(`Upload connection error for ${e}`),m=Lt):(c=`Failed to index "${e}"`,f=t||"An unexpected error occurred during indexing.",h=wc(`Indexing error: ${t.slice(0,80)}`),m=Ey),l.jsxs("div",{className:"upload-error-toast",role:"alert",children:[l.jsx(m,{size:16}),l.jsxs("div",{className:"upload-error-content",children:[l.jsx("div",{className:"upload-error-title",children:c}),l.jsxs("div",{className:"upload-error-detail",children:[f," ",u?l.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",children:"Request this feature →"}):l.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",children:"Report this issue →"})]})]}),l.jsx("button",{className:"upload-error-dismiss",onClick:n,"aria-label":"Dismiss",children:l.jsx(kt,{size:14})})]})}const w6=["Summarize a document","Find a file on my computer","Analyze a spreadsheet","Show my recent files"],I6=/\s*\{\s*"?(?:tool|thought|goal)"?\s*:\s*"[^"]*"[^}]*(?:"?tool_args"?\s*:\s*\{[^}]*\})?\s*\}/g;function L6(e){const t=e.trim();if(!t.startsWith("{")||!t.includes('"thought"')&&!t.includes('"answer"')&&!t.includes('"goal"'))return e;try{const a=JSON.parse(t);if(a.answer!==void 0)return String(a.answer)}catch{}const n=t.indexOf('"answer"');if(n===-1)return"";const r=t.indexOf(":",n+8);if(r===-1)return"";let i=r+1;for(;i<t.length&&/\s/.test(t[i]);)i++;if(i>=t.length||t[i]!=='"')return"";let s=t.slice(i+1);return s.endsWith('"}')?s=s.slice(0,-2):s.endsWith('"')&&(s=s.slice(0,-1)),s.replace(/\\"/g,'"').replace(/\\n/g,`
|
|
433
|
+
`).replace(/\\\\/g,"\\")}function po(e,t){var i;const n=++t.current,r=Date.now();switch(e.type){case"thinking":return{id:n,type:"thinking",label:"Thinking",detail:e.content,active:!0,timestamp:r};case"tool_start":return{id:n,type:"tool",label:"Using tool",tool:e.tool,detail:e.detail,active:!0,timestamp:r,mcpServer:e.mcp_server};case"plan":return{id:n,type:"plan",label:"Created plan",planSteps:e.steps,active:!1,success:!0,timestamp:r};case"step":return{id:n,type:"status",label:`Step ${e.step}${e.total?` of ${e.total}`:""}`,active:!0,timestamp:r};case"status":return(i=e.message)!=null&&i.startsWith("Agent: ")?null:{id:n,type:"status",label:e.message||e.status||"Working",active:e.status==="working",timestamp:r};case"agent_error":return{id:n,type:"error",label:"Error",detail:e.content,success:!1,active:!1,timestamp:r};default:return null}}function D6({sessionId:e,onCreateAgent:t,onAgentChange:n}){var tf,nf,rf;const{sessions:r,messages:i,setMessages:s,addMessage:a,removeMessage:u,removeMessagesFrom:o,updateSessionInList:c,isStreaming:f,streamingContent:h,setStreaming:m,setStreamContent:p,clearStreamContent:g,agentSteps:x,addAgentStep:A,updateLastAgentStep:E,appendThinkingContent:T,updateLastToolStep:k,clearAgentSteps:L,documents:M,setDocuments:S,setShowDocLibrary:O,setShowFileBrowser:D,isLoadingMessages:Y,setLoadingMessages:w,systemStatus:z,agents:K,activeAgentId:de,setActiveAgentId:le}=xe(),{addNotification:oe}=Mu(),ve=xe(j=>j.pendingPrompt),ne=r.find(j=>j.id===e),I=new Set((ne==null?void 0:ne.document_ids)??[]),B=M.filter(j=>I.has(j.id)),[b,ee]=y.useState(""),[ce,N]=y.useState(!1),[fe,be]=y.useState(""),[ge,Oe]=y.useState(!1),[rt,gt]=y.useState(!1),[se,R]=y.useState([]),[W,U]=y.useState([]),[te,he]=y.useState(!1),[ye,$e]=y.useState(null),[Et,Yt]=y.useState(!1),dn=y.useRef(null),Sr=(ne==null?void 0:ne.agent_type)||de,Tl=(tf=K.find(j=>j.id===(ne==null?void 0:ne.agent_type)))==null?void 0:tf.name,yl=(nf=K.find(j=>j.id===de))==null?void 0:nf.name;y.useEffect(()=>{if(!Et)return;const j=J=>{dn.current&&!dn.current.contains(J.target)&&Yt(!1)};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[Et]);const xl=y.useCallback(async j=>{if(Yt(!1),j===Sr)return;const J=Sr;if(le(j),i.length===0){c(e,{agent_type:j});try{await Kl(e,{agent_type:j})}catch{c(e,{agent_type:J}),le(J)}}else n==null||n(j)},[Sr,i.length,e,le,c,n]),[Qr,$]=y.useState(!1),X=y.useRef(""),pe=y.useRef([]),_e=y.useRef(!1);y.useEffect(()=>{h&&(X.current=h)},[h]),y.useEffect(()=>{x.length>0&&(pe.current=x.map(j=>({...j,active:!1})))},[x]),y.useEffect(()=>{if(!f&&_e.current){$(!0);const j=setTimeout(()=>{$(!1),X.current="",pe.current=[]},350);return()=>clearTimeout(j)}_e.current=f},[f]);const Ie=y.useRef(null),Ot=y.useRef(null),ot=y.useRef(null),ct=y.useRef(null),_n=y.useRef(0),kn=y.useRef(!1),Tt=y.useRef(()=>{}),yt=y.useRef(""),Ue=y.useRef(null),Kr=y.useRef(null),Jd=y.useRef(0),fa=y.useRef(!0),Zd=y.useCallback(()=>{Ue.current=null,yt.current&&p(yt.current)},[p]),bl=y.useRef(null),Xr=y.useRef(0);y.useEffect(()=>{P.chat.info(`ChatView mounted for session=${e}, loading messages...`);const j=P.chat.time();w(!0);let J=!1;const ue=(re=!1)=>{ls(e).then(ke=>{if(J)return;const Le=(ke.messages||[]).map(Pt=>({...Pt,agentSteps:Pt.agentSteps||Pt.agent_steps||void 0,stats:Pt.stats||Pt.inference_stats||void 0}));re?(s(Le),Xr.current=Le.length,P.chat.timed(`Loaded ${Le.length} message(s) for session=${e}`,j)):Le.length!==Xr.current&&!xe.getState().isStreaming&&(P.chat.info(`Messages changed externally: ${Xr.current} -> ${Le.length}`),s(Le),Xr.current=Le.length)}).catch(ke=>{J||re&&(P.chat.error(`Failed to load messages for session=${e}`,ke),s([]))}).finally(()=>{!J&&re&&w(!1)})};return ue(!0),bl.current=setInterval(()=>ue(!1),3e3),()=>{J=!0,bl.current&&clearInterval(bl.current)}},[e,s,w]),y.useEffect(()=>{ni().then(j=>S(j.documents||[])).catch(()=>{})},[S]),y.useEffect(()=>{const j=xe.getState().pendingPrompt;if(!j)return;P.chat.info(`Consuming pending prompt: "${j.slice(0,60)}"`),xe.getState().setPendingPrompt(null),ee(j);let J=!1;return requestAnimationFrame(()=>{J||Tt.current(j)}),()=>{J=!0}},[ve]),y.useEffect(()=>{if(!fa.current)return;const J=Date.now()-Jd.current,ue=100,re=()=>{var ke;Jd.current=Date.now(),(ke=Ie.current)==null||ke.scrollIntoView({behavior:"smooth"})};J>=ue&&re(),Kr.current&&clearTimeout(Kr.current),Kr.current=setTimeout(re,ue)},[i,h,x]),y.useEffect(()=>{var j;(j=ot.current)==null||j.focus()},[e]),y.useEffect(()=>()=>{ct.current&&(ct.current.abort(),ct.current=null),Ue.current!==null&&(cancelAnimationFrame(Ue.current),Ue.current=null),Kr.current&&(clearTimeout(Kr.current),Kr.current=null),yt.current="",U(j=>(j.forEach(J=>{J.url&&URL.revokeObjectURL(J.url)}),[]))},[e]);const bE=y.useCallback(()=>{const j=Ot.current;if(!j)return;const J=j.scrollHeight-j.scrollTop-j.clientHeight;fa.current=J<=80,gt(J>200)},[]),_E=y.useCallback(()=>{var j;fa.current=!0,(j=Ie.current)==null||j.scrollIntoView({behavior:"smooth"})},[]),_l=y.useCallback(()=>{P.stream.warn("User stopped generation"),ct.current&&(ct.current.abort(),ct.current=null),Ue.current!==null&&(cancelAnimationFrame(Ue.current),Ue.current=null);const j=xe.getState(),J=yt.current||j.streamingContent;if(J){P.stream.info(`Saving partial response (${J.length} chars)`);const ue=j.agentSteps,re={id:Date.now()+1,session_id:e,role:"assistant",content:J,created_at:new Date().toISOString(),rag_sources:null,agentSteps:ue.length>0?[...ue]:void 0};a(re)}yt.current="",m(!1),g(),R([]),L()},[e,a,m,g,L]);y.useEffect(()=>{const j=J=>{J.key==="Escape"&&f&&(J.preventDefault(),_l()),J.key==="k"&&(J.ctrlKey||J.metaKey)&&(J.preventDefault(),window.dispatchEvent(new CustomEvent("gaia:focus-search")))};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[f,_l]);const kE=j=>{ee(j.target.value);const J=j.target;J.style.height="auto",J.style.height=Math.min(J.scrollHeight,200)+"px"},SE=y.useCallback(async j=>{var re;const J=(re=j.clipboardData)==null?void 0:re.items;if(!J)return;const ue=[];for(const ke of Array.from(J))ke.type.startsWith("image/")&&ue.push(ke);if(ue.length!==0){j.preventDefault();for(const ke of ue){const Le=ke.getAsFile();if(!Le)continue;const Pt=`attach-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,$i=URL.createObjectURL(Le),it={id:Pt,file:Le,name:Le.name||`screenshot-${new Date().toISOString().slice(0,19).replace(/[T:]/g,"-")}.png`,url:$i,uploading:!0,uploaded:!1,isImage:!0};U(Vt=>[...Vt,it]),P.chat.info(`Pasted image: ${it.name} (${Le.size} bytes)`);try{const Vt=await bh(Le);U(Wt=>Wt.map(Z=>Z.id===Pt?{...Z,uploading:!1,uploaded:!0,serverUrl:Vt.url}:Z)),P.chat.info(`Upload complete: ${it.name} -> ${Vt.url}`)}catch(Vt){P.chat.error(`Upload failed: ${it.name}`,Vt),U(Wt=>Wt.map(Z=>Z.id===Pt?{...Z,uploading:!1,error:"Upload failed"}:Z))}}}},[]),CE=y.useCallback(async j=>{var ue;j.preventDefault(),j.stopPropagation(),Oe(!1);const J=(ue=j.dataTransfer)==null?void 0:ue.files;if(!(!J||J.length===0))for(const re of Array.from(J)){const ke=re.type.startsWith("image/"),Le=`attach-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,Pt=ke?URL.createObjectURL(re):"",$i={id:Le,file:re,name:re.name,url:Pt,uploading:!0,uploaded:!1,isImage:ke};U(it=>[...it,$i]),P.chat.info(`Dropped file: ${re.name} (${re.size} bytes, image=${ke})`);try{const it=await bh(re);U(Vt=>Vt.map(Wt=>Wt.id===Le?{...Wt,uploading:!1,uploaded:!0,serverUrl:it.url}:Wt)),P.chat.info(`Upload complete: ${re.name} -> ${it.url}`)}catch(it){P.chat.error(`Upload failed: ${re.name}`,it),U(Vt=>Vt.map(Wt=>Wt.id===Le?{...Wt,uploading:!1,error:"Upload failed"}:Wt))}}},[]),NE=y.useCallback(j=>{U(J=>{const ue=J.find(re=>re.id===j);return ue!=null&&ue.url&&URL.revokeObjectURL(ue.url),J.filter(re=>re.id!==j)})},[]),Jr=y.useCallback(async j=>{const J=(j||b).trim(),ue=W.length>0&&W.some(Z=>Z.uploaded);fa.current=!0;const re=(z==null?void 0:z.init_state)==="initializing";if(!J&&!ue||f||re){!J&&!ue&&P.chat.debug("Send blocked: empty message"),f&&P.chat.debug("Send blocked: already streaming"),re&&P.chat.debug("Send blocked: system initializing");return}let ke=J;const Le=W.filter(Z=>Z.uploaded&&Z.serverUrl);if(Le.length>0){const Z=Le.map(je=>je.isImage?``:`[${je.name}](${je.serverUrl})`).join(`
|
|
434
|
+
`);ke=ke?`${ke}
|
|
435
|
+
|
|
436
|
+
${Z}`:Z}P.chat.info(`Sending message to session=${e}`,{length:ke.length,preview:ke.slice(0,80)}),ee(""),ot.current&&(ot.current.style.height="auto",ot.current.focus()),U(Z=>(Z.forEach(je=>{je.url&&URL.revokeObjectURL(je.url)}),[]));const Pt={id:Date.now(),session_id:e,role:"user",content:ke,created_at:new Date().toISOString(),rag_sources:null};a(Pt),m(!0),g(),L(),R([]),_n.current=0,kn.current=!1,P.stream.info("Starting agent stream...");const $i=P.stream.time();let it="",Vt=!1;yt.current="";const Wt=Fx(e,ke,{onChunk:Z=>{const je=Z.content||"";if(je){Z.type==="answer"?it=je:(kn.current&&it.length>0&&(it+=`
|
|
437
|
+
|
|
438
|
+
`,kn.current=!1),it+=je);let Re=it.replace(I6,"").trim();if(Re=L6(Re),Re){const Ke=Re.lastIndexOf("{");if(Ke>-1){const qt=Re.slice(Ke);/^\{\s*"(?:thought|answer|goal|tool)"/.test(qt)&&(qt.match(/\{/g)||[]).length>(qt.match(/\}/g)||[]).length&&(Re=Re.slice(0,Ke).trim())}}yt.current=Re,Ue.current===null&&(Ue.current=requestAnimationFrame(Zd))}},onAgentEvent:Z=>{var Re,Ke,qt;if(Z.type==="tool_confirm"){if(!Z.confirm_id){console.error("[ChatView] tool_confirm event missing confirm_id, ignoring");return}const Pe=Z.tool||"";if(JSON.parse(localStorage.getItem(Pu)||"[]").includes(Pe)){Bx(e,Z.confirm_id,"allow",!1).catch(Sn=>console.error("[ChatView] auto-confirm failed:",Sn));return}const Pn={id:Z.confirm_id,type:"permission_request",agentId:"chat",agentName:"GAIA",title:`Allow ${Pe}?`,message:`The agent wants to execute: ${Pe}`,timestamp:Date.now(),read:!1,dismissed:!1,priority:"high",tool:Pe,toolArgs:Z.args,timeoutSeconds:Z.timeout_seconds??60};oe(Pn);return}if(Z.type==="permission_request"){const Pe=Z.tool||"";if(JSON.parse(localStorage.getItem(Pu)||"[]").includes(Pe)){k1(e,!0).catch(Sn=>console.error("[ChatView] auto-confirm failed:",Sn));return}const{addNotification:Pn}=Mu.getState();Pn({id:Z.confirm_id??`perm-${Date.now()}`,type:"permission_request",agentId:e,agentName:"GAIA",title:`Allow ${Pe}?`,message:`The agent wants to execute: ${Pe}`,timestamp:Date.now(),read:!1,dismissed:!1,priority:"high",tool:Pe,toolArgs:Z.args,timeoutSeconds:Z.timeout_seconds??60});return}if(Z.type==="tool_end"){k({active:!1,success:Z.success!==!1});return}if(Z.type==="tool_result"){const Pe={result:Z.summary||Z.title||"Done",active:!1,success:Z.success!==!1,latencyMs:Z.latency_ms};Z.command_output&&(Pe.commandOutput={command:Z.command_output.command,stdout:Z.command_output.stdout,stderr:Z.command_output.stderr,returnCode:Z.command_output.return_code,cwd:Z.command_output.cwd,durationSeconds:Z.command_output.duration_seconds,truncated:Z.command_output.truncated}),(Re=Z.result_data)!=null&&Re.chunks&&Z.result_data.chunks.length>0&&(Pe.retrievalChunks=Z.result_data.chunks.map(dt=>({id:dt.id,source:dt.source,sourcePath:dt.sourcePath,page:dt.page,score:dt.score,preview:dt.preview,content:dt.content}))),((Ke=Z.result_data)==null?void 0:Ke.type)==="file_list"&&((qt=Z.result_data.files)==null?void 0:qt.length)>0&&(Pe.fileList={files:Z.result_data.files,total:Z.result_data.total??Z.result_data.files.length}),k(Pe);return}if(Z.type==="tool_args"){k({detail:Z.detail||JSON.stringify(Z.args)});return}if(Z.type==="thinking"){const Pe=xe.getState().agentSteps,dt=Pe[Pe.length-1];if(dt&&dt.type==="thinking"){T(Z.content||"");return}const Pn=po(Z,_n);Pn&&A(Pn);return}if(Z.type==="status"){const Pe=Z.status,dt=(Z.message||"").trim();if(dt.toLowerCase().startsWith("executing "))return;if(Pe==="working"||Pe==="warning"||Pe==="info"){const Pn=xe.getState().agentSteps,Sn=Pn[Pn.length-1];if(Sn&&Sn.type==="status"&&Sn.active){E({label:dt||"Working",detail:dt});return}if(Sn&&Sn.type==="thinking"&&Sn.active){E({label:dt||"Thinking"});return}const sf=po(Z,_n);sf&&A(sf)}return}if(Z.type==="step")return;const je=po(Z,_n);je&&(A(je),Z.type==="tool_start"&&(kn.current=!0))},onDone:Z=>{if(Vt)return;Vt=!0,Ue.current!==null&&(cancelAnimationFrame(Ue.current),Ue.current=null),yt.current="";const je=Z.content||it;P.chat.timed(`Agent response complete: ${je.length} chars`,$i);const Re=xe.getState().agentSteps.map(Ke=>({...Ke,active:!1}));if(je){Xr.current=xe.getState().messages.length+1;const Ke={id:Z.message_id||Date.now()+1,session_id:e,role:"assistant",content:je,created_at:new Date().toISOString(),rag_sources:null,agentSteps:Re.length>0?Re:void 0,stats:Z.stats||void 0};a(Ke)}if(R(Re),m(!1),g(),L(),ot.current&&ot.current.focus(),setTimeout(()=>{ls(e).then(Ke=>{if(xe.getState().currentSessionId!==e)return;const qt=(Ke.messages||[]).map(Pe=>({...Pe,agentSteps:Pe.agentSteps||Pe.agent_steps||void 0,stats:Pe.stats||Pe.inference_stats||void 0}));s(qt),Xr.current=qt.length}).catch(()=>{})},300),ne&&ne.title==="New Task"){const Ke=J.slice(0,50)+(J.length>50?"...":"");Kl(e,{title:Ke}).then(()=>c(e,{title:Ke})).catch(qt=>P.chat.error("Auto-title failed",qt))}},onError:Z=>{Ue.current!==null&&(cancelAnimationFrame(Ue.current),Ue.current=null),yt.current="",P.chat.error(`Chat error for session=${e}`,Z);let je;const Re=Z.message||"",Ke=`
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
*Unexpected error?* [Report it on GitHub](${wc(Re.slice(0,80))})`;Re.includes("Lemonade")||Re.includes("LLM")||Re.includes("Could not get response")?je="Could not reach the LLM server. Make sure Lemonade Server is running:\n\n```\nlemonade-server serve\n```\n\nThen try sending your message again."+Ke:Z instanceof TypeError||Re.includes("fetch")||Re.includes("Failed to fetch")||Re.includes("NetworkError")?je="Cannot connect to the GAIA server. Make sure the backend is running:\n\n```\ngaia chat --ui\n```"+Ke:Re.includes("500")?je="The server encountered an error. This usually means Lemonade Server is not running or the model failed to load.\n\nStart Lemonade Server with:\n```\nlemonade-server serve\n```"+Ke:Re.includes("timed out")||Re.includes("timeout")||Re.includes("Timeout")?je=`The request timed out. The query may be too complex — try breaking it into simpler questions.
|
|
442
|
+
|
|
443
|
+
If Lemonade Server is running but responses are slow, the model may need more resources.`+Ke:je=`Error: ${Re}`+Ke;const qt={id:Date.now()+2,session_id:e,role:"assistant",content:je,created_at:new Date().toISOString(),rag_sources:null};a(qt),m(!1),g(),L()},onAgentCreated:()=>{vd().then(Z=>xe.getState().setAgents(Z.agents||[])).catch(()=>{})}},void 0,void 0,de);ct.current=Wt},[b,W,f,e,ne,a,s,m,Zd,g,c,A,E,T,k,L,de]);Tt.current=Jr,y.useEffect(()=>{!f&&ot.current&&ot.current.focus()},[f]);const vE=y.useCallback(async j=>{f||(P.chat.info(`Deleting message ${j} from session=${e}`),$e(j),setTimeout(async()=>{u(j),$e(null);try{await Px(e,j)}catch(J){P.chat.error(`Failed to delete message ${j}`,J),ls(e).then(ue=>{xe.getState().currentSessionId===e&&s(ue.messages||[])}).catch(()=>{})}},250))},[e,f,u,s]),AE=y.useCallback(async j=>{if(f||j.role!=="user")return;const J=j.content;P.chat.info(`Resending message ${j.id} from session=${e}`,{preview:J.slice(0,80)}),o(j.id);try{await Mx(e,j.id)}catch(ue){P.chat.error(`Failed to delete messages from ${j.id}`,ue),ls(e).then(re=>{xe.getState().currentSessionId===e&&s(re.messages||[])}).catch(()=>{});return}Jr(J)},[e,f,o,s,Jr]),wE=j=>{j.key==="Enter"&&!j.shiftKey&&(j.preventDefault(),Jr())},IE=()=>{be((ne==null?void 0:ne.title)||""),N(!0)},ef=async()=>{fe.trim()&&fe!==(ne==null?void 0:ne.title)&&(await Kl(e,{title:fe.trim()}),c(e,{title:fe.trim()})),N(!1)},LE=async()=>{try{const j=await Ox(e),J=new Blob([j.content],{type:"text/markdown"}),ue=URL.createObjectURL(J),re=document.createElement("a");re.href=ue;const ke=((ne==null?void 0:ne.title)||"chat").replace(/[/\\:*?"<>|]/g,"_").slice(0,100);re.download=`${ke}.md`,re.click(),URL.revokeObjectURL(ue)}catch(j){P.chat.error("Export failed",j)}},DE=y.useCallback(async(j,J)=>{j.stopPropagation();const ue=M.find(re=>re.id===J);P.doc.info(`Detaching document from session: ${(ue==null?void 0:ue.filename)||J}`);try{await $x(e,J);const re=xe.getState().sessions.find(Le=>Le.id===e),ke=((re==null?void 0:re.document_ids)??[]).filter(Le=>Le!==J);c(e,{document_ids:ke}),ke.length<=3&&he(!1),P.doc.info(`Detached document from session: ${(ue==null?void 0:ue.filename)||J}`)}catch(re){P.doc.error(`Failed to detach document: ${(ue==null?void 0:ue.filename)||J}`,re)}},[M,e,c]),RE=y.useCallback(async j=>{if(j.preventDefault(),j.stopPropagation(),Oe(!1),j.dataTransfer.files.length!==0)for(const J of Array.from(j.dataTransfer.files)){P.doc.info(`Dropped on chat view: ${J.name}`);try{const ue=await C1(J);if(e&&(ue!=null&&ue.id))try{await Au(e,ue.id);const re=xe.getState().sessions.find(Le=>Le.id===e),ke=(re==null?void 0:re.document_ids)??[];ke.includes(ue.id)||c(e,{document_ids:[...ke,ue.id]}),P.doc.info(`Auto-attached "${J.name}" to session ${e}`)}catch(re){P.doc.warn(`Could not attach dropped document to session: ${re}`)}}catch(ue){P.doc.error(`Upload failed: ${J.name}`,ue)}}},[e,c]),OE=j=>{j.preventDefault(),j.stopPropagation(),Oe(!0)},PE=j=>{j.preventDefault(),j.stopPropagation(),Oe(!1)},ME=j=>{ee(j),Jr(j)},jE=!Y&&i.length===0&&!f,FE=y.useMemo(()=>{const j=new Map;let J;for(const ue of i)if(ue.role==="user"&&ue.created_at)J=new Date(ue.created_at).getTime();else if(ue.role==="assistant"&&ue.created_at&&J!==void 0){const re=new Date(ue.created_at).getTime();re>J&&j.set(ue.id,re-J),J=void 0}return j},[i]);return l.jsxs("main",{className:`chat-view ${ge?"drag-active":""}`,onDrop:RE,onDragOver:OE,onDragLeave:PE,children:[l.jsxs("header",{className:"chat-header",children:[l.jsx("div",{className:"chat-header-left",children:ce?l.jsx("input",{className:"title-edit",value:fe,onChange:j=>be(j.target.value),onBlur:ef,onKeyDown:j=>j.key==="Enter"&&ef(),autoFocus:!0,"aria-label":"Edit chat title"}):l.jsxs(l.Fragment,{children:[l.jsx("h3",{className:"chat-title",children:(ne==null?void 0:ne.title)||"Chat"}),l.jsx("button",{className:"btn-icon-sm",onClick:IE,title:"Rename","aria-label":"Rename chat",children:l.jsx(jy,{size:13})})]})}),l.jsxs("div",{className:"chat-header-right",children:[l.jsxs("span",{className:`model-badge ${z!=null&&z.model_loaded?"":"no-model"}`,title:z!=null&&z.model_loaded&&(z!=null&&z.model_context_size)?`${z.model_loaded} · context window: ${z.model_context_size.toLocaleString()} tokens`:(z==null?void 0:z.model_loaded)||"No model loaded",children:[(z==null?void 0:z.model_loaded)||"No model loaded",(z==null?void 0:z.model_loaded)&&(z==null?void 0:z.model_context_size)!=null&&l.jsxs("span",{className:"model-ctx-size",children:[" · ",z.model_context_size%1024===0?`${z.model_context_size/1024}K`:z.model_context_size.toLocaleString()]})]}),l.jsx("button",{className:"btn-icon-sm",onClick:()=>O(!0),title:"Documents","aria-label":"Attach documents",children:l.jsx(My,{size:15})}),l.jsx("button",{className:"btn-icon-sm",onClick:()=>D(!0),title:"Browse files","aria-label":"Browse files",children:l.jsx(gh,{size:15})}),l.jsx("button",{className:"btn-icon-sm",onClick:LE,title:"Export","aria-label":"Export chat",children:l.jsx($r,{size:15})})]})]}),B.length>0&&(()=>{const j=[...B].sort((re,ke)=>{const Le=re.last_accessed_at||re.indexed_at||"";return(ke.last_accessed_at||ke.indexed_at||"").localeCompare(Le)}),J=te?j:j.slice(0,3),ue=j.length-3;return l.jsxs("div",{className:`doc-context-bar${te?" doc-context-expanded":""}`,"aria-label":`${B.length} indexed document${B.length!==1?"s":""}`,children:[l.jsx(zr,{size:12,className:"doc-context-icon"}),l.jsxs("span",{className:"doc-context-label",onClick:()=>O(!0),title:"Click to manage documents",role:"button",tabIndex:0,children:[B.length," indexed"]}),l.jsxs("div",{className:`doc-context-pills${te?" doc-context-pills-expanded":""}`,children:[J.map(re=>l.jsxs("span",{className:"doc-pill",title:re.filepath||re.filename,children:[l.jsx(In,{size:9,className:"doc-pill-icon"}),l.jsx("span",{className:"doc-pill-name",children:re.filename}),l.jsx("button",{className:"doc-pill-remove",onClick:ke=>DE(ke,re.id),title:`Remove ${re.filename} from this session`,"aria-label":`Remove ${re.filename} from this session`,children:l.jsx(kt,{size:10})})]},re.id)),!te&&ue>0&&l.jsxs("button",{className:"doc-pill-more",onClick:re=>{re.stopPropagation(),he(!0)},title:"Show all indexed files","aria-label":`Show ${ue} more files`,children:["+",ue," more"]}),te&&ue>0&&l.jsx("button",{className:"doc-pill-collapse",onClick:re=>{re.stopPropagation(),he(!1)},title:"Show fewer files","aria-label":"Collapse file list",children:"show less"})]})]})})(),l.jsxs("div",{className:"messages-scroll",ref:Ot,onScroll:bE,children:[Y&&l.jsx("div",{className:"skeleton-messages","aria-label":"Loading messages",children:[0,1,2].map(j=>l.jsxs("div",{className:"skeleton-msg",children:[l.jsxs("div",{className:"skeleton-header",children:[l.jsx("div",{className:"skeleton-avatar"}),l.jsx("div",{className:"skeleton-role"})]}),l.jsxs("div",{className:"skeleton-lines",children:[l.jsx("div",{className:"skeleton-line"}),l.jsx("div",{className:"skeleton-line"}),j!==2&&l.jsx("div",{className:"skeleton-line"})]})]},j))}),jE&&l.jsxs("div",{className:"empty-chat",children:[l.jsx("div",{className:"empty-chat-icon",children:l.jsx(Ly,{size:36,strokeWidth:1.2})}),l.jsx("h4",{className:"empty-chat-title",children:"What can I help you with?"}),l.jsx("p",{className:"empty-chat-desc",children:"Ask about your documents, search files, or analyze data — powered by local AI."}),l.jsx("div",{className:"empty-chat-suggestions",children:w6.map(j=>l.jsx("button",{className:"empty-chat-chip",onClick:()=>ME(j),children:j},j))})]}),i.map((j,J)=>{if(Qr&&j.role==="assistant"&&J===i.length-1)return null;const ke=FE.get(j.id);return l.jsx("div",{className:ye===j.id?"msg-deleting":void 0,children:l.jsx(Um,{message:j,showTerminalCursor:!1,agentSteps:j.role==="assistant"?j.agentSteps:void 0,onDelete:f?void 0:vE,onResend:!f&&j.role==="user"?AE:void 0,latencyMs:ke,agentName:j.role==="assistant"?Tl:void 0})},j.id)}),(f||Qr)&&l.jsx("div",{className:`streaming-bubble ${Qr?"stream-ending":"stream-active"}`,children:l.jsx(Um,{message:{id:-1,session_id:e,role:"assistant",content:(f?h:X.current)||"",created_at:"",rag_sources:null},isStreaming:f,showTerminalCursor:Qr,agentSteps:f?x:pe.current,agentStepsActive:f&&x.some(j=>j.active),agentName:yl})}),l.jsx("div",{ref:Ie})]}),rt&&l.jsx("button",{className:"scroll-bottom-btn",onClick:_E,title:"Scroll to bottom","aria-label":"Scroll to bottom",children:l.jsx(hy,{size:16})}),ge&&l.jsxs("div",{className:"drag-overlay",children:[l.jsx(qs,{size:32,strokeWidth:1.5}),l.jsx("span",{children:"Drop files to index"})]}),l.jsxs("div",{className:"input-area",children:[l.jsxs("div",{className:`input-box ${W.length>0?"has-attachments":""}`,onDrop:CE,onDragOver:j=>{j.preventDefault(),j.stopPropagation()},children:[l.jsxs("div",{className:"input-content",children:[W.length>0&&l.jsx("div",{className:"attachment-strip",children:W.map(j=>l.jsxs("div",{className:`attachment-preview ${j.error?"attachment-error":""}`,children:[j.isImage&&j.url?l.jsx("img",{src:j.url,alt:j.name,className:"attachment-thumb"}):l.jsx("div",{className:"attachment-file-icon",children:l.jsx(In,{size:16})}),l.jsx("span",{className:"attachment-name",title:j.name,children:j.name.length>20?j.name.slice(0,17)+"...":j.name}),j.uploading&&l.jsx("span",{className:"attachment-spinner"}),j.error&&l.jsx("span",{className:"attachment-error-text",children:j.error}),l.jsx("button",{className:"attachment-remove",onClick:()=>NE(j.id),title:"Remove","aria-label":`Remove ${j.name}`,children:l.jsx(kt,{size:12})})]},j.id))}),l.jsx("textarea",{ref:ot,className:"msg-input",value:b,onChange:kE,onKeyDown:wE,onPaste:SE,placeholder:"Type a message or paste an image... (Shift+Enter for new line)",rows:1,disabled:f||(z==null?void 0:z.init_state)==="initializing","aria-label":"Message input"})]}),l.jsxs("div",{className:"input-btns",children:[l.jsx("button",{className:"btn-icon-sm",onClick:()=>O(!0),title:"Upload document","aria-label":"Upload document",children:l.jsx(qs,{size:15})}),l.jsx("button",{className:"btn-icon-sm",onClick:()=>D(!0),title:"Browse files","aria-label":"Browse files",children:l.jsx(gh,{size:15})}),f?l.jsx("button",{className:"stop-btn",onClick:_l,title:"Stop generating","aria-label":"Stop generating",children:l.jsx(Hy,{size:14})}):l.jsx("button",{className:"send-btn",onClick:()=>Jr(),disabled:!b.trim()&&!W.some(j=>j.uploaded),title:"Send (Enter)","aria-label":"Send message",children:l.jsx(Fy,{size:16})})]})]}),l.jsxs("div",{className:"input-footer",children:[t&&l.jsxs(l.Fragment,{children:[l.jsx("button",{className:"create-agent-btn",onClick:t,title:"Build a custom agent","aria-label":"Build a custom agent",children:l.jsx(Sd,{size:10})}),K.length>1&&l.jsx("span",{className:"input-footer-sep"})]}),K.length>1&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"agent-picker",ref:dn,children:[l.jsxs("button",{className:"agent-picker-btn",onClick:()=>!f&&Yt(j=>!j),title:"Switch agent","aria-label":"Switch agent",disabled:f,children:[l.jsx(dc,{size:10}),l.jsx("span",{children:((rf=K.find(j=>j.id===Sr))==null?void 0:rf.name)||"Agent"}),l.jsx(tl,{size:10})]}),Et&&l.jsx("div",{className:"agent-picker-dropdown",children:K.map(j=>l.jsxs("button",{className:`agent-picker-option${j.id===Sr?" active":""}`,onClick:()=>xl(j.id),children:[l.jsx(dc,{size:12}),l.jsx("span",{children:j.name})]},j.id))})]}),l.jsx("span",{className:"input-footer-sep"})]}),l.jsxs("span",{className:"input-footer-item",children:[l.jsx(o1,{size:10}),l.jsx("span",{children:"100% local & private"})]}),l.jsx("span",{className:"input-footer-sep"}),l.jsxs("span",{className:"input-footer-item",children:[l.jsx("kbd",{className:"kbd-hint",children:"Enter"}),l.jsx("span",{children:"send"})]}),l.jsxs("span",{className:"input-footer-item",children:[l.jsx("kbd",{className:"kbd-hint",children:"Shift+Enter"}),l.jsx("span",{children:"new line"})]}),f&&l.jsxs("span",{className:"input-footer-item",children:[l.jsx("kbd",{className:"kbd-hint",children:"Esc"}),l.jsx("span",{children:"stop"})]}),l.jsx("span",{className:"input-footer-sep"}),l.jsxs("span",{className:"input-footer-item",children:[l.jsx("kbd",{className:"kbd-hint",children:"Ctrl+K"}),l.jsx("span",{children:"search"})]}),l.jsxs("span",{className:"input-footer-item",children:[l.jsx("kbd",{className:"kbd-hint",children:"Ctrl+V"}),l.jsx("span",{children:"paste image"})]})]})]})]})}const zm="GAIA",Pa="Your private AI assistant, running 100% locally on AMD Ryzen AI",R6=65,O6=350;function yE(e,t){return t===","||t==="."?60+Math.random()*50:t===" "?15+Math.random()*25:Math.random()<.35?8+Math.random()*12:Math.random()<.06?45+Math.random()*35:18+Math.random()*22}const P6=["Scan my Downloads and tell me what I should clean up","Index a folder of documents so I can chat about them","What have I been working on lately? Show my recent files","What hardware is in my PC? Tell me about my CPU and GPU"];function M6({onNewTask:e,onSendPrompt:t,onCreateAgent:n}){const{systemStatus:r,agents:i,activeAgentId:s,setActiveAgentId:a}=xe(),u=y.useMemo(()=>{var D;const O=i.find(Y=>Y.id===s);return(D=O==null?void 0:O.conversation_starters)!=null&&D.length?O.conversation_starters:P6},[i,s]),[o,c]=y.useState(""),[f,h]=y.useState(!1),[m,p]=y.useState(""),[g,x]=y.useState(!1),[A,E]=y.useState("title"),[T,k]=y.useState(!1),L=r!==null&&!r.initialized,M=(r==null?void 0:r.init_state)==="initializing",S=r!==null&&r.lemonade_running&&!r.model_loaded;return y.useEffect(()=>{let O=0;const D=setInterval(()=>{O++,O<=zm.length?c(zm.slice(0,O)):(clearInterval(D),h(!0))},R6);return()=>clearInterval(D)},[]),y.useEffect(()=>{if(!f)return;let O=!1;const D=setTimeout(()=>{if(O)return;E("subtitle");let w=0;const z=()=>{if(!O)if(w++,w<=Pa.length){p(Pa.slice(0,w));const K=Pa[w-1],de=w>1?Pa[w-2]:"",le=yE(K,de);Y.current=setTimeout(z,le)}else x(!0),E("done")};z()},O6),Y={current:null};return()=>{O=!0,clearTimeout(D),Y.current&&clearTimeout(Y.current)}},[f]),y.useEffect(()=>{if(!g)return;const O=setTimeout(()=>k(!0),200);return()=>clearTimeout(O)},[g]),l.jsx("main",{className:"welcome",children:l.jsxs("div",{className:`welcome-inner ${T?"content-revealed":""}`,children:[l.jsxs("h1",{className:`welcome-title${f?" typing-done":""}`,children:[o.length>=4?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"gaia-glow",children:o.slice(0,4)}),l.jsx("span",{children:o.slice(4)})]}):o,A==="title"&&l.jsx("span",{className:`terminal-cursor${f?" blink":""}`})]}),l.jsx("p",{className:"welcome-sub",children:l.jsxs("span",{className:"typewriter-text",children:[m,(A==="subtitle"||A==="done")&&l.jsx("span",{className:`terminal-cursor terminal-cursor-sub${A==="done"?" blink":""}`})]})}),l.jsxs("span",{className:"welcome-version",children:["v","0.17.6"," ",l.jsx("span",{className:"beta-badge",children:"BETA"})]}),l.jsxs("div",{className:"features",children:[l.jsx(Ma,{icon:l.jsx(o1,{size:22}),title:"Private",desc:"Data stays on your device",codeHint:"> encrypt --local",expandedDesc:"All processing happens on-device. No cloud, no tracking, complete data privacy."}),l.jsx(Ma,{icon:l.jsx(f1,{size:22}),title:"Fast",desc:"NPU acceleration",codeHint:"> npu.accelerate()",expandedDesc:"Hardware-accelerated with AMD Ryzen AI NPU for real-time local inference."}),l.jsx(Ma,{icon:l.jsx(In,{size:22}),title:"Smart",desc:"Document Q&A",codeHint:'> rag.query("...")',expandedDesc:"RAG-powered document Q&A — index files and chat with their contents."}),l.jsx(Ma,{icon:l.jsx(_y,{size:22}),title:"Free",desc:"No subscriptions",codeHint:"> license: MIT",expandedDesc:"No API keys, no subscriptions, no hidden costs. Fully open-source."})]}),i.length>1&&l.jsx("div",{className:"agent-pills",children:i.map(O=>l.jsxs("button",{className:`agent-pill${O.id===s?" active":""}`,onClick:()=>a(O.id),title:O.description||O.name,children:[l.jsx(dc,{size:14}),l.jsx("span",{children:O.name})]},O.id))}),L&&l.jsxs("div",{className:"welcome-setup-hint",children:[l.jsx(Nu,{size:14}),l.jsxs("span",{children:[l.jsx("strong",{children:"First time?"})," Run ",l.jsx("code",{children:"gaia init --profile chat"})," in a terminal to install Lemonade Server and download the required AI model",r!=null&&r.default_model_size_gb?` (~${r.default_model_size_gb.toFixed(1)} GB).`:"."]})]}),!L&&S&&l.jsxs("div",{className:"welcome-setup-hint",children:[l.jsx(Nu,{size:14}),l.jsxs("span",{children:["No model loaded. Run ",l.jsx("code",{children:"gaia init --profile chat"})," to download",r!=null&&r.default_model_size_gb?` (~${r.default_model_size_gb.toFixed(1)} GB).`:"."]})]}),l.jsxs("div",{className:"welcome-actions",children:[l.jsx("button",{className:"btn-primary start-btn",onClick:e,disabled:M,children:"Start a New Task"}),n&&l.jsxs("button",{className:"build-agent-btn",onClick:n,disabled:M,children:[l.jsx(Sd,{size:14}),"Build a Custom Agent"]})]}),l.jsxs("div",{className:"suggestions",children:[l.jsx("span",{className:"suggestions-label",children:"Try asking:"}),l.jsx("div",{className:"suggestion-chips",children:u.map(O=>l.jsx("button",{className:"chip",onClick:()=>t(O),disabled:M,children:O},O))})]}),l.jsx("p",{className:"welcome-copyright",children:"© 2025–2026 Advanced Micro Devices, Inc. All rights reserved."})]})})}function Ma({icon:e,title:t,desc:n,expandedDesc:r,codeHint:i}){const[s,a]=y.useState("idle"),[u,o]=y.useState(i),[c,f]=y.useState(""),h=y.useRef(null),m=()=>{a("erasing"),f("");let x=i.length;const A=()=>{if(x--,x>=0)o(i.slice(0,x)),h.current=setTimeout(A,15+Math.random()*20);else{a("typing"),o("");let E=0;const T=()=>{if(E++,E<=r.length){f(r.slice(0,E));const k=r[E-1],L=E>1?r[E-2]:"";h.current=setTimeout(T,yE(k,L))}else a("done")};T()}};A()},p=()=>{h.current&&clearTimeout(h.current),a("idle"),o(i),f("")};y.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const g=s!=="idle";return l.jsxs("div",{className:`feature-card ${g?"feature-hovered":""}`,onMouseEnter:m,onMouseLeave:p,children:[l.jsx("div",{className:"feature-icon",children:e}),l.jsx("h3",{children:t}),l.jsx("p",{children:n}),l.jsxs("div",{className:"feature-terminal",children:[s==="idle"&&l.jsx("span",{className:"feature-code-hint",children:i}),s==="erasing"&&l.jsxs("span",{className:"feature-inline",children:[l.jsx("span",{className:"feature-code-hint feature-code-erasing",children:u}),l.jsx("span",{className:"terminal-cursor terminal-cursor-sm"})]}),(s==="typing"||s==="done")&&l.jsxs("span",{className:"feature-inline",children:[l.jsx("span",{className:"feature-expanded-text",children:c}),l.jsx("span",{className:`terminal-cursor terminal-cursor-sm${s==="done"?" blink":""}`})]})]})]})}function j6(e){const t=Math.floor((Date.now()-e)/1e3);if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return`${n}m ${r}s`}function F6(e){try{const t=new Date(e);if(isNaN(t.getTime()))return"";const r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),s=Math.floor(i/60),a=Math.floor(s/60),u=Math.floor(a/24);return i<60?"just now":s<60?`${s}m ago`:a<24?`${a}h ago`:u===1?"yesterday":u<7?`${u}d ago`:t.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return""}}function B6(e){try{const t=new Date(e);return isNaN(t.getTime())?"":t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"})}catch{return""}}function U6(){const{documents:e,setDocuments:t,setShowDocLibrary:n,setShowFileBrowser:r,currentSessionId:i,sessions:s,updateSessionInList:a}=xe(),u=s.find(I=>I.id===i)??null,[o,c]=y.useState(!1),[f,h]=y.useState(!1),[m,p]=y.useState(""),[g,x]=y.useState(""),[A,E]=y.useState(null),T=y.useRef(new Map),[,k]=y.useState(0);y.useEffect(()=>{P.doc.info("Loading document library...");const I=P.doc.time();ni().then(B=>{const b=B.documents||[];t(b),P.doc.timed(`Loaded ${b.length} document(s), ${B.total_chunks||0} chunks, ${B.total_size_bytes||0} bytes total`,I)}).catch(B=>{P.doc.error("Failed to load documents",B),t([])})},[t]);const L=e.some(I=>I.indexing_status==="indexing"||I.indexing_status==="pending");y.useEffect(()=>{if(!L)return;const I=xe.getState().documents;for(const ee of I)(ee.indexing_status==="indexing"||ee.indexing_status==="pending")&&!T.current.has(ee.id)&&T.current.set(ee.id,Date.now());let B=!1;const b=setInterval(async()=>{if(k(ee=>ee+1),!B){B=!0;try{const ce=xe.getState().documents.filter(N=>N.indexing_status==="indexing"||N.indexing_status==="pending");for(const N of ce)try{const fe=await Hx(N.id);if(fe.indexing_status!=="indexing"&&fe.indexing_status!=="pending"){T.current.delete(N.id);const be=await ni();t(be.documents||[]);break}}catch{}}finally{B=!1}}},2e3);return()=>clearInterval(b)},[L,t]),y.useEffect(()=>{const I=new Set(e.filter(B=>B.indexing_status==="indexing"||B.indexing_status==="pending").map(B=>B.id));for(const B of T.current.keys())I.has(B)||T.current.delete(B)},[e]),y.useEffect(()=>{const I=setInterval(async()=>{try{const b=(await ni()).documents||[],ee=xe.getState().documents;(b.length!==ee.length||b.some((N,fe)=>{const be=ee.find(ge=>ge.id===N.id);return!be||be.indexing_status!==N.indexing_status||be.indexed_at!==N.indexed_at||be.chunk_count!==N.chunk_count}))&&(t(b),P.doc.debug("Document list refreshed (server-side changes detected)"))}catch{}},15e3);return()=>clearInterval(I)},[t]);const M=e.reduce((I,B)=>I+B.file_size,0),S=e.reduce((I,B)=>I+B.chunk_count,0),O=I=>{if(I<=0)return"0 B";const B=1024,b=["B","KB","MB","GB"],ee=Math.min(Math.floor(Math.log(I)/Math.log(B)),b.length-1);return parseFloat((I/Math.pow(B,ee)).toFixed(1))+" "+b[ee]},D=y.useCallback(async(I,B)=>{var ce;const b=I.includes(".")?"."+((ce=I.split(".").pop())==null?void 0:ce.toLowerCase()):"";if(b&&!ju(b)){const N=vs(b),fe=N?N.message:`The file type "${b}" is not supported for indexing.`;P.doc.warn(`Unsupported file type: ${I} (${b})`),E({filename:I,error:fe});return}P.doc.info(`Indexing document: ${I}`);const ee=P.doc.time();h(!0),p(`Indexing ${I}...`),E(null);try{const N=await B();if(P.doc.timed(`Indexed "${I}": ${(N==null?void 0:N.chunk_count)||"?"} chunks`,ee),i&&(N!=null&&N.id))try{await Au(i,N.id);const be=xe.getState().sessions.find(Oe=>Oe.id===i),ge=(be==null?void 0:be.document_ids)??[];ge.includes(N.id)||a(i,{document_ids:[...ge,N.id]}),P.doc.info(`Auto-attached "${I}" to session ${i}`)}catch(be){P.doc.warn(`Could not attach document to session: ${be}`)}const fe=await ni();t(fe.documents||[]),p("")}catch(N){P.doc.error(`Failed to index "${I}"`,N);const fe=N instanceof Error?N.message:"Upload failed";E({filename:I,error:fe}),p("")}finally{h(!1)}},[i,a,t]),Y=y.useCallback(async(I,B)=>{await D(B,()=>S1(I))},[D]),w=y.useCallback(async I=>{await D(I.name,()=>C1(I))},[D]),z=y.useCallback(async I=>{I.preventDefault(),c(!1);const B=Array.from(I.dataTransfer.files);P.doc.info(`Dropped ${B.length} file(s) into Document Library`);for(const b of B)await w(b)},[w]),K=y.useCallback(async I=>{const B=e.find(b=>b.id===I);P.doc.info(`Deleting document: ${(B==null?void 0:B.filename)||I}`);try{await Ux(I),T.current.delete(I),t(e.filter(b=>b.id!==I)),P.doc.info(`Deleted document: ${(B==null?void 0:B.filename)||I}`)}catch(b){P.doc.error(`Failed to delete document: ${(B==null?void 0:B.filename)||I}`,b)}},[e,t]),de=y.useCallback(async(I,B)=>{P.doc.info(`Opening folder for: ${I}`);try{await Ad(I,!0)}catch(b){P.doc.error(`Failed to open folder for: ${B}`,b)}},[]),le=y.useCallback(async I=>{const B=e.find(b=>b.id===I);P.doc.info(`Cancelling indexing for: ${(B==null?void 0:B.filename)||I}`);try{await zx(I),T.current.delete(I);const b=await ni();t(b.documents||[]),P.doc.info(`Cancelled indexing for: ${(B==null?void 0:B.filename)||I}`)}catch(b){P.doc.error(`Failed to cancel indexing: ${(B==null?void 0:B.filename)||I}`,b)}},[e,t]),oe=y.useCallback(async I=>{if(!i)return;const B=e.find(b=>b.id===I);P.doc.info(`Attaching document to session: ${(B==null?void 0:B.filename)||I}`);try{await Au(i,I);const b=xe.getState().sessions.find(ce=>ce.id===i),ee=(b==null?void 0:b.document_ids)??[];ee.includes(I)||a(i,{document_ids:[...ee,I]}),P.doc.info(`Attached "${(B==null?void 0:B.filename)||I}" to session ${i}`)}catch(b){P.doc.error(`Failed to attach document to session: ${(B==null?void 0:B.filename)||I}`,b)}},[i,e,a]),ve=y.useCallback(async I=>{I.preventDefault(),g.trim()&&(P.doc.info(`Indexing from path input: ${g.trim()}`),await Y(g.trim(),g.trim().split(/[\\/]/).pop()||"file"),x(""))},[g,Y]),ne=I=>{const B=I.indexing_status||"complete",b=T.current.get(I.id),ee=I.indexed_at?F6(I.indexed_at):"",ce=I.indexed_at?B6(I.indexed_at):"";switch(B){case"indexing":case"pending":return l.jsxs("div",{className:"doc-indexing-status",children:[l.jsxs("div",{className:"doc-indexing-bar",children:[l.jsx("div",{className:"doc-indexing-bar-track",children:l.jsx("div",{className:"doc-indexing-bar-fill"})}),l.jsxs("span",{className:"doc-indexing-label",children:[l.jsx(wy,{size:12,className:"doc-spin"}),"Indexing",b?` (${j6(b)})`:"..."]})]}),l.jsxs("button",{className:"btn-cancel",onClick:N=>{N.stopPropagation(),le(I.id)},title:"Cancel indexing","aria-label":`Cancel indexing ${I.filename}`,children:[l.jsx(Eh,{size:14}),"Cancel"]})]});case"failed":return l.jsxs("span",{className:"doc-status-badge doc-status-failed",children:[l.jsx(Lt,{size:12})," Failed"]});case"cancelled":return l.jsxs("span",{className:"doc-status-badge doc-status-cancelled",children:[l.jsx(Eh,{size:12})," Cancelled"]});case"missing":return l.jsxs("span",{className:"doc-status-badge doc-status-missing",children:[l.jsx(Lt,{size:12})," File missing"]});default:return l.jsxs("span",{className:"doc-meta",children:[O(I.file_size)," · ",I.chunk_count," chunks",ee&&l.jsxs("span",{className:"doc-timestamp",title:`Indexed: ${ce}`,children:[l.jsx(s1,{size:10}),ee]})]})}};return l.jsx("div",{className:"modal-overlay",onClick:()=>n(!1),role:"dialog","aria-modal":"true","aria-label":"Document Library",children:l.jsxs("div",{className:"modal-panel doc-modal",onClick:I=>I.stopPropagation(),children:[l.jsxs("div",{className:"modal-header",children:[l.jsx("h3",{children:"Document Library"}),l.jsx("button",{className:"btn-icon",onClick:()=>n(!1),"aria-label":"Close document library",children:l.jsx(kt,{size:18})})]}),l.jsxs("div",{className:"modal-body",children:[l.jsx("div",{className:`drop-zone ${o?"drag-over":""} ${f?"uploading":""}`,onDragOver:I=>{I.preventDefault(),c(!0)},onDragLeave:()=>c(!1),onDrop:z,children:f?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"upload-spinner"}),l.jsx("p",{children:m})]}):l.jsxs(l.Fragment,{children:[l.jsx(qs,{size:32,strokeWidth:1.5}),l.jsx("p",{children:"Drop files here to index"}),l.jsx("span",{className:"drop-hint",children:"PDF, TXT, MD, code files, and 50+ formats"})]})}),l.jsxs("form",{className:"path-input-form",onSubmit:ve,children:[l.jsx(Hn,{size:16,className:"path-icon"}),l.jsx("input",{type:"text",className:"path-input",value:g,onChange:I=>x(I.target.value),placeholder:"Or enter file path: C:\\docs\\manual.pdf","aria-label":"File path to index"}),l.jsx("button",{type:"submit",className:"btn-secondary",disabled:!g.trim()||f,children:"Index"}),l.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>{n(!1),r(!0)},title:"Browse files on this computer",children:[l.jsx(Dr,{size:14}),"Browse Files"]})]}),A&&l.jsx(TE,{filename:A.filename,error:A.error,onDismiss:()=>E(null)}),e.length>0&&l.jsxs("div",{className:"doc-stats",children:[l.jsxs("span",{children:[e.length," document",e.length!==1?"s":""]}),l.jsx("span",{children:"·"}),l.jsxs("span",{children:[S," chunks"]}),l.jsx("span",{children:"·"}),l.jsx("span",{children:O(M)})]}),l.jsxs("div",{className:"doc-list",children:[e.length===0&&!f&&l.jsxs("div",{className:"empty-docs",children:[l.jsx(In,{size:32,strokeWidth:1}),l.jsx("p",{children:"No documents indexed yet"}),l.jsx("span",{children:"Drop files above or enter a file path"})]}),e.map(I=>{var B;return l.jsxs("div",{className:`doc-row ${I.indexing_status==="indexing"?"doc-row-indexing":""}`,children:[l.jsxs("div",{className:"doc-info",children:[l.jsx("span",{className:"doc-name",children:I.filename}),ne(I)]}),l.jsxs("div",{className:"doc-row-actions",children:[I.filepath&&l.jsx("button",{className:"btn-icon-sm doc-open-folder",onClick:()=>de(I.filepath,I.filename),title:`Open folder: ${I.filepath}`,"aria-label":`Open containing folder for ${I.filename}`,children:l.jsx(Hn,{size:14})}),i&&I.indexing_status==="complete"&&!((B=u==null?void 0:u.document_ids)!=null&&B.includes(I.id))&&l.jsx("button",{className:"btn-icon-sm doc-attach",onClick:()=>oe(I.id),title:"Use in current session","aria-label":`Attach ${I.filename} to current session`,children:l.jsx(vy,{size:14})}),I.indexing_status!=="indexing"&&I.indexing_status!=="pending"&&l.jsx("button",{className:"btn-icon-sm doc-delete",onClick:()=>K(I.id),title:"Remove","aria-label":`Remove ${I.filename}`,children:l.jsx(vu,{size:14})})]})]},I.id)})]})]})]})})}function H6(e){if(e.type==="folder")return l.jsx(u1,{size:16});const t=(e.extension||"").toLowerCase();return[".csv",".xlsx",".xls",".tsv"].includes(t)?l.jsx($y,{size:16}):[".py",".js",".ts",".java",".c",".cpp",".go",".rs"].includes(t)?l.jsx(xy,{size:16}):[".pdf",".doc",".docx",".txt",".md"].includes(t)?l.jsx(In,{size:16}):l.jsx(a1,{size:16})}function z6(e){if(e<=0)return"";const t=1024,n=["B","KB","MB","GB"],r=Math.min(Math.floor(Math.log(e)/Math.log(t)),n.length-1);return parseFloat((e/Math.pow(t,r)).toFixed(1))+" "+n[r]}function $6(e){if(!e)return"";const t=new Date(e),n=new Date,r=n.getTime()-t.getTime(),i=Math.floor(r/36e5);if(i<1)return"Just now";if(i<24)return`${i}h ago`;const s=Math.floor(i/24);return s<7?`${s}d ago`:t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:t.getFullYear()!==n.getFullYear()?"numeric":void 0})}function Y6(e){switch(e){case"home":return l.jsx(Cy,{size:14});case"desktop":return l.jsx(Dy,{size:14});case"documents":return l.jsx(In,{size:14});case"download":return l.jsx($r,{size:14});default:return l.jsx(u1,{size:14})}}const V6=[{label:"All Files",value:""},{label:"Documents",value:"pdf,doc,docx,txt,md"},{label:"Spreadsheets",value:"csv,xlsx,xls,tsv"},{label:"Code",value:"py,js,ts,java,c,cpp,go,rs,rb,sh"},{label:"Data",value:"json,xml,yaml,yml,csv,tsv"}];async function $m(e,t,n,r){var h;const i=[],s=[];for(const m of e){const p=m.includes(".")?"."+((h=m.split(".").pop())==null?void 0:h.toLowerCase()):"";p&&!ju(p)?s.push(m):i.push(m)}const a=[],u=[];let o=0,c="";const f=new Set(t.filter(m=>m.type==="folder").map(m=>m.path));for(const m of i)try{if(f.has(m)){const p=await Vx(m),g=[];p.documents.forEach(x=>{x.id&&g.push(x.id)}),g.length>0&&(g.forEach(x=>a.push(x)),u.push(m))}else{const p=await S1(m);p!=null&&p.id&&(a.push(p.id),u.push(m))}}catch(p){o++,c=p instanceof Error?p.message:"Unknown error"}if(n&&a.length>0){for(const x of a)try{await Au(n,x)}catch(A){P.doc.warn(`Could not attach document to session: ${A}`)}const m=xe.getState().sessions.find(x=>x.id===n),p=(m==null?void 0:m.document_ids)??[],g=a.filter(x=>!p.includes(x));g.length>0&&r(n,{document_ids:[...p,...g]})}return{docIds:a,supported:i,succeededFiles:u,unsupported:s,failed:o,lastError:c}}function W6(){const{setShowFileBrowser:e,currentSessionId:t,updateSessionInList:n,setPendingPrompt:r}=xe(),[i,s]=y.useState(""),[a,u]=y.useState(null),[o,c]=y.useState([]),[f,h]=y.useState([]),[m,p]=y.useState(!1),[g,x]=y.useState(null),[A,E]=y.useState(""),[T,k]=y.useState(null),[L,M]=y.useState(!1),[S,O]=y.useState(""),[D,Y]=y.useState(new Set),[w,z]=y.useState(null),[K,de]=y.useState(!1),[le,oe]=y.useState(new Set),[ve,ne]=y.useState(null),I=y.useRef(null),[B,b]=y.useState(null),ee=y.useCallback(async R=>{p(!0),x(null),k(null),E("");try{const W=await Yx(R);s(W.current_path),u(W.parent_path),c(W.entries),W.quick_links.length>0&&h(W.quick_links),P.ui.info(`Browsing: ${W.current_path} (${W.entries.length} items)`)}catch(W){const U=W instanceof Error?W.message:"Failed to load directory";x(U),P.ui.error("Browse failed",W)}finally{p(!1)}},[]);y.useEffect(()=>{ee()},[ee]),y.useEffect(()=>()=>{I.current&&clearTimeout(I.current)},[]);const ce=y.useCallback(async()=>{if(!A.trim()){k(null);return}M(!0),x(null);try{const R=await Wx(A.trim(),S||void 0,30);k(R.results),P.ui.info(`Search "${A}": ${R.total} results`)}catch(R){const W=R instanceof Error?R.message:"Search failed";x(W),P.ui.error("Search failed",R)}finally{M(!1)}},[A,S]),N=R=>{R.key==="Enter"&&ce()},fe=y.useCallback(R=>{R.type==="folder"&&(ee(R.path),Y(new Set),z(null))},[ee]),be=y.useCallback(async R=>{de(!0);try{const W=await qx(R);z(W)}catch(W){P.ui.error("Preview failed",W)}finally{de(!1)}},[]),ge=y.useCallback(async()=>{if(D.size===0)return;const R=Array.from(D);if(b(null),!R.some(U=>{var he;const te=U.includes(".")?"."+((he=U.split(".").pop())==null?void 0:he.toLowerCase()):"";return!te||ju(te)})){const U=R[0],te=U.lastIndexOf("."),he=te>0?U.slice(te).toLowerCase():"",ye=vs(he);b({filename:R.length===1?U.split(/[\\/]/).pop()||U:`${R.length} files`,error:ye?ye.message:`File type "${he}" is not supported for indexing.`});return}oe(new Set(R)),ne(`Indexing ${R.length} file(s)...`);try{const U=await $m(R,o,t,n);if(U.failed>0)ne(`Done: ${U.docIds.length} indexed, ${U.failed} failed`),b({filename:`${U.failed} file(s)`,error:U.lastError||"Indexing failed for some files"});else{const te=U.unsupported.length>0?` (${U.unsupported.length} skipped — unsupported type)`:"";ne(`Successfully indexed ${U.docIds.length} file(s)${te}`)}I.current&&clearTimeout(I.current),I.current=setTimeout(()=>ne(null),5e3),Y(new Set)}catch(U){P.doc.error("Index selected failed",U),b({filename:R.length===1?R[0].split(/[\\/]/).pop()||R[0]:`${R.length} files`,error:U instanceof Error?U.message:"An unexpected error occurred."})}finally{oe(new Set)}},[D,t,n,o]),Oe=y.useCallback(async()=>{if(D.size===0)return;const R=Array.from(D);b(null),oe(new Set(R)),ne(`Indexing ${R.length} file(s) for analysis...`);try{const W=await $m(R,o,t,n);if(W.supported.length===0){const he=R[0].lastIndexOf("."),ye=he>0?R[0].slice(he).toLowerCase():"",$e=vs(ye);b({filename:R.length===1?R[0].split(/[\\/]/).pop()||R[0]:`${R.length} files`,error:($e==null?void 0:$e.message)??`File type "${ye}" is not supported for indexing.`});return}if(W.docIds.length===0){b({filename:W.supported.length===1?W.supported[0].split(/[\\/]/).pop()||W.supported[0]:`${W.supported.length} files`,error:"Failed to index selected file(s). Please try again."});return}W.failed>0&&ne(`Warning: ${W.failed} file(s) failed to index and will be excluded.`);const U=(W.succeededFiles.length>0?W.succeededFiles:W.supported).map(he=>he.split(/[\\/]/).pop()||he),te=U.length===1?`Please analyze this document for me: ${U[0]}`:`Please analyze these documents for me:
|
|
444
|
+
${U.map(he=>`- ${he}`).join(`
|
|
445
|
+
`)}`;r(te),e(!1),Y(new Set)}catch(W){P.doc.error("Ask Agent failed",W),b({filename:R.length===1?R[0].split(/[\\/]/).pop()||R[0]:`${R.length} files`,error:W instanceof Error?W.message:"An unexpected error occurred."})}finally{oe(new Set),ne(null)}},[D,t,n,o,r,e]),rt=i?i.replace(/\\/g,"/").split("/").filter(Boolean):[],gt=rt.map((R,W)=>({label:R,path:rt.slice(0,W+1).join("/")+(W===0&&R.includes(":")?"/":"")})),se=T?T.map(R=>({name:R.name,path:R.path,type:"file",size:R.size,extension:R.extension||"",modified:R.modified||""})):o;return l.jsx("div",{className:"modal-overlay",onClick:()=>e(!1),role:"dialog","aria-modal":"true","aria-label":"File Browser",children:l.jsxs("div",{className:`modal-panel file-browser-modal ${w?"has-preview":""}`,onClick:R=>R.stopPropagation(),children:[l.jsxs("div",{className:"modal-header",children:[l.jsxs("h3",{children:[l.jsx(Hn,{size:18})," File Browser"]}),l.jsx("button",{className:"btn-icon",onClick:()=>e(!1),"aria-label":"Close",children:l.jsx(kt,{size:18})})]}),l.jsxs("div",{className:"file-browser-body",children:[l.jsx("div",{className:"fb-quick-links",children:f.map(R=>l.jsxs("button",{className:"fb-quick-link",onClick:()=>ee(R.path),title:R.path,children:[Y6(R.icon),l.jsx("span",{children:R.name})]},R.path))}),l.jsxs("div",{className:"fb-search-bar",children:[l.jsxs("div",{className:"fb-search-input-wrap",children:[l.jsx(Dr,{size:14,className:"fb-search-icon"}),l.jsx("input",{type:"text",className:"fb-search-input",placeholder:"Search files on your PC...",value:A,onChange:R=>E(R.target.value),onKeyDown:N,"aria-label":"Search files"}),A&&l.jsx("button",{className:"fb-search-clear",onClick:()=>{E(""),k(null)},"aria-label":"Clear search",children:l.jsx(kt,{size:12})})]}),l.jsx("select",{className:"fb-type-filter",value:S,onChange:R=>O(R.target.value),"aria-label":"File type filter",children:V6.map(R=>l.jsx("option",{value:R.value,children:R.label},R.value))}),l.jsx("button",{className:"fb-search-btn",onClick:ce,disabled:!A.trim()||L,children:L?"Searching...":"Search"})]}),!T&&l.jsxs("div",{className:"fb-breadcrumb",children:[l.jsx("button",{className:"fb-crumb",onClick:()=>ee("/"),children:l.jsx(Sy,{size:12})}),gt.map((R,W)=>l.jsxs("span",{className:"fb-crumb-item",children:[l.jsx(ia,{size:12,className:"fb-crumb-sep"}),l.jsx("button",{className:"fb-crumb",onClick:()=>ee(R.path),children:R.label})]},W)),a&&l.jsx("button",{className:"fb-up-btn",onClick:()=>ee(a),title:"Go up",children:l.jsx(py,{size:14})})]}),T&&l.jsxs("div",{className:"fb-search-header",children:[l.jsxs("span",{children:["Found ",T.length,' result(s) for "',A,'"']}),l.jsx("button",{className:"fb-back-btn",onClick:()=>{k(null),E("")},children:"Back to browsing"})]}),g&&l.jsx("div",{className:"fb-error",children:g}),l.jsxs("div",{className:"fb-content",children:[l.jsxs("div",{className:"fb-file-list",children:[m&&l.jsx("div",{className:"fb-loading",children:"Loading..."}),!m&&se.length===0&&l.jsx("div",{className:"fb-empty",children:T?"No files found":"This folder is empty"}),!m&&se.map(R=>{var he;const W=R.extension||(R.name.includes(".")?"."+((he=R.name.split(".").pop())==null?void 0:he.toLowerCase()):""),U=R.type==="file"&&W&&!ju(W),te=U?vs(W):null;return l.jsxs("div",{className:`fb-entry ${R.type} ${D.has(R.path)?"selected":""} ${U?"unsupported":""}`,onClick:()=>R.type==="folder"?fe(R):be(R.path),onDoubleClick:()=>R.type==="folder"?fe(R):void 0,title:U?`${(te==null?void 0:te.label)||"This"} file type cannot be indexed`:R.path,children:[l.jsx("input",{type:"checkbox",className:"fb-entry-checkbox",checked:D.has(R.path),onChange:()=>{Y(ye=>{const $e=new Set(ye);return $e.has(R.path)?$e.delete(R.path):$e.add(R.path),$e})},onClick:ye=>ye.stopPropagation(),"aria-label":`Select ${R.name}`}),l.jsx("span",{className:"fb-entry-icon",children:H6(R)}),l.jsx("span",{className:"fb-entry-name",title:R.path,children:R.name}),U&&l.jsx("span",{className:"fb-unsupported-badge",children:"Not indexable"}),l.jsx("span",{className:"fb-entry-size",children:R.type==="file"?z6(R.size):""}),l.jsx("span",{className:"fb-entry-date",children:$6(R.modified)})]},R.path)})]}),w&&l.jsxs("div",{className:"fb-preview",children:[l.jsxs("div",{className:"fb-preview-header",children:[l.jsx("span",{className:"fb-preview-name",children:w.name}),l.jsx("button",{className:"btn-icon-sm",onClick:()=>z(null),"aria-label":"Close preview",children:l.jsx(kt,{size:14})})]}),l.jsxs("div",{className:"fb-preview-meta",children:[l.jsx("span",{children:w.size_display}),w.total_lines&&l.jsxs("span",{children:[w.total_lines," lines"]}),w.columns&&l.jsxs("span",{children:[w.columns.length," columns"]}),w.row_count!==null&&l.jsxs("span",{children:[w.row_count," rows"]})]}),w.columns&&l.jsxs("div",{className:"fb-preview-columns",children:[l.jsx("strong",{children:"Columns:"})," ",w.columns.join(", ")]}),K?l.jsx("div",{className:"fb-preview-loading",children:"Loading preview..."}):w.is_text&&w.preview_lines.length>0?l.jsx("pre",{className:"fb-preview-content",children:w.preview_lines.slice(0,30).join(`
|
|
446
|
+
`)}):l.jsx("div",{className:"fb-preview-binary",children:"Binary file - no preview available"})]})]}),B&&l.jsx(TE,{filename:B.filename,error:B.error,onDismiss:()=>b(null)}),l.jsxs("div",{className:"fb-actions",children:[l.jsx("div",{className:"fb-selection-info",children:D.size>0?`${D.size} item(s) selected`:"Select files to index or analyze"}),ve&&l.jsx("span",{className:"fb-index-status",children:ve}),l.jsxs("div",{className:"fb-action-btns",children:[l.jsxs("button",{className:"fb-action-btn secondary",onClick:ge,disabled:D.size===0||le.size>0,title:"Index selected files for RAG search",children:[l.jsx(qs,{size:14}),"Index Selected"]}),l.jsxs("button",{className:"fb-action-btn primary",onClick:Oe,disabled:D.size===0||le.size>0,title:"Index and send selected files to the chat agent for analysis",children:[l.jsx(gy,{size:14}),"Ask Agent"]})]})]})]})]})})}const As=32768,Xd="Qwen3.5-35B-A3B-GGUF",q6=3e5,G6=18e5,Q6=1e4;function xE(e){const[t,n]=y.useState(!1),[r,i]=y.useState(!1),s=y.useRef(null),a=y.useRef(null),u=y.useRef(null),o=y.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null),a.current&&(clearTimeout(a.current),a.current=null),u.current&&(clearInterval(u.current),u.current=null)},[]);y.useEffect(()=>o,[o]);const c=y.useCallback((p,g)=>{u.current&&clearInterval(u.current),u.current=setInterval(async()=>{var x,A;try{const E=await Nd();g==="load"?((x=E.model_loaded)==null?void 0:x.toLowerCase())===p.toLowerCase()&&(n(!1),s.current&&(clearTimeout(s.current),s.current=null),u.current&&(clearInterval(u.current),u.current=null)):(E.model_downloaded===!0||((A=E.model_loaded)==null?void 0:A.toLowerCase())===p.toLowerCase())&&(i(!1),a.current&&(clearTimeout(a.current),a.current=null),u.current&&(clearInterval(u.current),u.current=null))}catch{}},Q6)},[]),f=e??Xd,h=y.useCallback(async(p,g)=>{const x=p??f,A=g??As;n(!0);try{await Cx(x,A),P.system.info(`Load model triggered: ${x} (ctx=${A})`),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>n(!1),q6),c(x,"load")}catch(E){P.system.error("Failed to trigger model load",E),n(!1)}},[f,c]),m=y.useCallback(async(p=!1,g)=>{const x=g??f;i(!0);try{await Nx(x,p),P.system.info(`Download model triggered: ${x} (force=${p})`),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>i(!1),G6),c(x,"download")}catch(A){P.system.error("Failed to trigger model download",A),i(!1)}},[f,c]);return{isLoadingModel:t,isDownloadingModel:r,loadModel:h,downloadModel:m}}const Ym=Cd();function K6(){const{agents:e,setAgents:t}=xe(),[n,r]=y.useState({kind:"idle"}),i=y.useRef(null),s=y.useRef(null),a=y.useRef(null);y.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),y.useEffect(()=>{var g;n.kind==="error"&&((g=a.current)==null||g.scrollIntoView({behavior:"smooth",block:"nearest"}))},[n]);const u=y.useCallback((g,x=5e3)=>{r(g),s.current&&clearTimeout(s.current),(g.kind==="success"||g.kind==="error")&&(s.current=setTimeout(()=>r({kind:"idle"}),x))},[]),o=y.useCallback(async()=>{try{const g=await vd();t(g.agents||[])}catch(g){P.api.warn("Failed to refresh agents after import",g)}},[t]),c=e.filter(g=>g.source!=="builtin"),f=y.useCallback(async()=>{if(window.confirm(`Exported bundle contains your agent source files as-is. Any API keys, tokens, or credentials in agent.py will be included in the bundle. Review before sharing.
|
|
447
|
+
|
|
448
|
+
Continue?`)){u({kind:"working",message:"Exporting…"});try{const x=await fetch(`${Ym}/agents/export`,{method:"POST",headers:{"X-Gaia-UI":"1"}});if(!x.ok){const k=await x.text().catch(()=>"");let L=k;try{L=JSON.parse(k).detail||k}catch{}throw new Error(L||`Export failed (HTTP ${x.status})`)}const A=await x.blob(),E=URL.createObjectURL(A),T=document.createElement("a");T.href=E,T.download="gaia-agents-export.zip",document.body.appendChild(T),T.click(),document.body.removeChild(T),URL.revokeObjectURL(E),u({kind:"success",message:"Export downloaded."})}catch(x){console.error("Agent export failed:",x);const A=x instanceof Error?x.message:String(x);P.api.error("Agent export failed",x),u({kind:"error",message:`Export failed: ${A}`})}}},[u]),h=y.useCallback(()=>{var g;(g=i.current)==null||g.click()},[]),m=y.useCallback(async g=>{var k;const x=(k=g.target.files)==null?void 0:k[0];if(g.target.value="",!x)return;let A=null;if(x.size<=100*1024*1024)try{A=await X6(x)}catch(L){P.api.warn("Could not pre-read bundle.json from zip",L)}const E=A&&A.length>0?`Agents to install: ${A.join(", ")}`:"Agents to install: (unable to read bundle contents — contents will be validated by the server)";if(window.confirm(`Importing this bundle will run third-party Python code on your machine when the agent is selected. Only import bundles from sources you trust.
|
|
449
|
+
|
|
450
|
+
`+E+`
|
|
451
|
+
|
|
452
|
+
Import?`)){u({kind:"working",message:"Uploading…"});try{const L=new FormData;L.append("bundle",x,x.name);const M=await fetch(`${Ym}/agents/import`,{method:"POST",headers:{"X-Gaia-UI":"1"},body:L});if(!M.ok){const w=await M.text().catch(()=>"");let z=w;try{z=JSON.parse(w).detail||w}catch{}throw new Error(z||`Import failed (HTTP ${M.status})`)}const S=await M.json(),O=S.imported||[],D=S.overwritten||[];await o();let Y;if(O.length===0?Y="No agents imported":(Y=`Installed ${O.length} agent(s): ${O.join(", ")}`,D.length>0&&(Y+=` (replaced: ${D.join(", ")})`)),S.requires_restart&&(Y+=" — restart required for replaced agents to take full effect"),S.errors&&S.errors.length>0){const w=S.errors.map(z=>`${z.id}: ${z.error}`).join("; ");u({kind:"error",message:`${Y}. Errors: ${w}`})}else u({kind:"success",message:Y})}catch(L){console.error("Agent import failed:",L);const M=L instanceof Error?L.message:String(L);P.api.error("Agent import failed",L),u({kind:"error",message:`Import failed: ${M}`})}}},[u,o]),p=n.kind==="working";return l.jsxs("section",{className:"settings-section",children:[l.jsx("h4",{children:"Custom Agents"}),c.length===0?l.jsx("p",{className:"danger-warning",style:{marginBottom:12},children:"No custom agents installed yet. Import a bundle below to add one."}):l.jsx("div",{className:"status-grid",style:{marginBottom:12},children:c.map(g=>l.jsxs("div",{className:"status-row",children:[l.jsx("span",{className:"status-label",children:g.name}),l.jsxs("div",{className:"status-value-wrap",children:[l.jsx("span",{className:"status-value ok",children:g.id}),g.source&&g.source!=="builtin"&&l.jsx("span",{className:"status-hint",children:l.jsx("code",{children:g.source})})]})]},g.id))}),l.jsxs("div",{className:"setting-actions",style:{display:"flex",gap:8,flexWrap:"wrap"},children:[l.jsx("button",{className:"btn-model-save",onClick:f,disabled:p||c.length===0,title:c.length===0?"No custom agents to export":void 0,children:p&&n.message.startsWith("Export")?l.jsxs(l.Fragment,{children:[l.jsx(ht,{size:13,className:"btn-spinner"})," Exporting…"]}):l.jsxs(l.Fragment,{children:[l.jsx($r,{size:13,style:{verticalAlign:-2,marginRight:6}}),"Export All"]})}),l.jsx("button",{className:"btn-model-save",onClick:h,disabled:p,children:p&&n.message.startsWith("Upload")?l.jsxs(l.Fragment,{children:[l.jsx(ht,{size:13,className:"btn-spinner"})," Uploading…"]}):l.jsxs(l.Fragment,{children:[l.jsx(qs,{size:13,style:{verticalAlign:-2,marginRight:6}}),"Import"]})}),l.jsx("input",{ref:i,type:"file",accept:".zip,application/zip",style:{display:"none"},onChange:m})]}),n.kind!=="idle"&&l.jsxs("div",{ref:a,className:"danger-warning",style:{marginTop:12,display:"flex",alignItems:"center",gap:8,color:n.kind==="error"?"var(--accent-gold)":"var(--text-secondary)"},role:"status",children:[n.kind==="working"&&l.jsx(ht,{size:14,className:"btn-spinner"}),n.kind==="success"&&l.jsx(zr,{size:14}),n.kind==="error"&&l.jsx(Lt,{size:14}),l.jsx("span",{children:n.message})]})]})}async function X6(e){const t=await e.arrayBuffer(),n=new DataView(t),r=new Uint8Array(t),i=Math.min(t.byteLength,65557),s=t.byteLength-i;let a=-1;for(let f=t.byteLength-22;f>=s;f--)if(n.getUint32(f,!0)===101010256){a=f;break}if(a<0)return null;const u=n.getUint16(a+10,!0);let c=n.getUint32(a+16,!0);for(let f=0;f<u;f++){if(c+46>t.byteLength||n.getUint32(c,!0)!==33639248)return null;const h=n.getUint16(c+10,!0),m=n.getUint32(c+20,!0),p=n.getUint16(c+28,!0),g=n.getUint16(c+30,!0),x=n.getUint16(c+32,!0),A=n.getUint32(c+42,!0);if(new TextDecoder("utf-8").decode(r.subarray(c+46,c+46+p))==="bundle.json"){if(A+30>t.byteLength||n.getUint32(A,!0)!==67324752)return null;const T=n.getUint16(A+26,!0),k=n.getUint16(A+28,!0),L=A+30+T+k,M=L+m;if(M>t.byteLength)return null;const S=r.subarray(L,M);let O;if(h===0)O=new TextDecoder("utf-8").decode(S);else if(h===8){const w=new DecompressionStream("deflate-raw"),z=new Blob([S]).stream().pipeThrough(w),K=await new Response(z).arrayBuffer();O=new TextDecoder("utf-8").decode(K)}else return null;const D=JSON.parse(O),Y=D==null?void 0:D.agent_ids;return Array.isArray(Y)&&Y.every(w=>typeof w=="string")?Y:null}c+=46+p+g+x}return null}const Vm=P.api;function J6(e){switch(e){case"connector.configured":return"configured";case"connector.disconnected":return"disconnected";case"connection.revoked":return"disconnected";case"connector.oauth.completed":return"oauth_completed";case"connection.connected":return"oauth_completed";case"connector.oauth.error":return"oauth_error";case"connector.tested":return"tested";case"connector.grant.changed":return"grant_changed";default:return null}}function Z6(e){const t=y.useRef(e);y.useEffect(()=>{t.current=e},[e]),y.useEffect(()=>{const n=`${Cd()}/connectors/events`;let r=null,i=1e3,s=null,a=!1;const u=()=>{a||(r=new EventSource(n),r.onopen=()=>{i=1e3},r.onmessage=o=>{try{const c=JSON.parse(o.data),f=J6(c.type);if(f===null){Vm.debug("connectors-sse: ignoring event",c.type);return}const h=c.payload??{},m=h.connector_id??h.provider??null;t.current({connectorId:m,reason:f,payload:h})}catch(c){Vm.warn("connectors-sse: malformed event",c)}},r.onerror=()=>{r==null||r.close(),r=null,!a&&(s=setTimeout(u,i),i=Math.min(i*2,3e4))})};return u(),()=>{a=!0,s&&clearTimeout(s),r==null||r.close()}},[])}const eI={"https://www.googleapis.com/auth/gmail.readonly":"Read emails","https://www.googleapis.com/auth/gmail.modify":"Organize emails (archive, label, trash)","https://www.googleapis.com/auth/gmail.send":"Send emails on your behalf","https://www.googleapis.com/auth/gmail.compose":"Compose emails","https://www.googleapis.com/auth/calendar.readonly":"View calendar events","https://www.googleapis.com/auth/calendar.events":"Create & respond to calendar events","https://www.googleapis.com/auth/drive.readonly":"Read Google Drive files","https://www.googleapis.com/auth/drive.file":"Manage Drive files created by this app","https://www.googleapis.com/auth/spreadsheets.readonly":"Read Google Sheets","https://www.googleapis.com/auth/spreadsheets":"Edit Google Sheets",openid:"Identify you",email:"See your email address",profile:"See your basic profile info"};function tI(e){return eI[e]??e.split(/[/.:]/).pop()??e}function nI(){const[e,t]=y.useState([]),[n,r]=y.useState(!0),[i,s]=y.useState(null),[a,u]=y.useState(null),o=y.useCallback(async()=>{try{const{connectors:h}=await vx();t(h),s(null)}catch(h){s(h instanceof Error?h.message:String(h))}finally{r(!1)}},[]);y.useEffect(()=>{o()},[o]);const c=h=>u(m=>m===h?null:h),f=y.useCallback(async h=>{try{const m=await Ax(h);t(p=>p.map(g=>g.id===h?m:g))}catch{o()}},[o]);return Z6(y.useCallback(h=>{h.connectorId?f(h.connectorId):o()},[f,o])),l.jsxs("section",{className:"settings-section connectors-section",children:[l.jsx("h4",{children:"Connectors"}),l.jsx("p",{className:"settings-help",children:"Connect external accounts and MCP servers so agents can use them on your behalf. Each agent must be granted scopes individually."}),i&&l.jsxs("div",{className:"error-banner",children:[l.jsx(Lt,{size:14}),l.jsx("span",{children:i})]}),n?l.jsx("div",{className:"connectors-loading",children:l.jsx(ht,{size:16,className:"spin"})}):l.jsx("div",{className:"connectors-list",children:e.map(h=>l.jsx(rI,{connector:h,expanded:a===h.id,onToggle:()=>c(h.id),onChanged:()=>void f(h.id)},h.id))})]})}function rI({connector:e,expanded:t,onToggle:n,onChanged:r}){return l.jsxs("div",{className:`connector-tile${t?" connector-tile--open":""}`,children:[l.jsxs("button",{className:"connector-tile-header",onClick:n,"aria-expanded":t,children:[l.jsx("span",{className:"connector-tile-name",children:e.display_name}),l.jsx("span",{className:"connector-tile-type",children:e.type==="oauth_pkce"?"OAuth":"MCP"}),e.configured?l.jsxs("span",{className:"connector-status ok",children:[l.jsx(zr,{size:12}),e.account_id??"Configured"]}):l.jsx("span",{className:"connector-status idle",children:"Not configured"}),l.jsx("span",{className:"connector-tile-chevron",children:t?l.jsx(Ty,{size:14}):l.jsx(tl,{size:14})})]}),t&&l.jsxs("div",{className:"connector-detail",children:[e.type==="oauth_pkce"?l.jsx(iI,{connector:e,onChanged:r}):l.jsx(sI,{connector:e,onChanged:r}),e.configured&&l.jsx(uI,{connectorId:e.id})]})]})}function iI({connector:e,onChanged:t}){const[n,r]=y.useState(!1),[i,s]=y.useState(null),[a,u]=y.useState({});y.useEffect(()=>{const g=()=>{t()};return window.addEventListener("focus",g),()=>window.removeEventListener("focus",g)},[t]);const o=g=>{var A;const x=window;(A=x.gaia)!=null&&A.openExternal?x.gaia.openExternal(g):window.open(g,"_blank","noopener")},c=async()=>{var g;r(!0),s(null);try{const x=await wx(e.id,(g=e.available_scopes)!=null&&g.length?e.available_scopes:e.default_scopes);o(x.authorization_url)}catch(x){s(x instanceof Error?x.message:String(x))}finally{r(!1)}},f=async()=>{r(!0),s(null);try{await b1(e.id),t()}catch(g){s(g instanceof Error?g.message:String(g))}finally{r(!1)}},h=async()=>{var x;const g=(e.oauth_setup_fields??[]).filter(A=>{var E;return A.required!==!1&&!((E=a[A.key])!=null&&E.trim())}).map(A=>A.label);if(g.length){s(`Required: ${g.join(", ")}`);return}r(!0),s(null);try{const A=(x=e.available_scopes)!=null&&x.length?e.available_scopes:e.default_scopes,E=await x1(e.id,{...a,scopes:A}),T=typeof E.authorization_url=="string"?E.authorization_url:null;T&&o(T),t()}catch(A){s(A instanceof Error?A.message:String(A))}finally{r(!1)}},m=e.oauth_setup_fields??[],p=e.configurable===!1&&!e.configured&&m.length>0;return l.jsxs("div",{className:"configure-body",children:[e.description&&l.jsx("p",{className:"connector-desc",children:e.description}),p&&l.jsxs("div",{className:"oauth-setup-form",children:[l.jsx("p",{className:"connector-desc",children:"First-time setup — provide your OAuth client credentials below. They’re stored encrypted in your OS keyring and reused for future connections."}),m.map(g=>l.jsxs("label",{className:"oauth-setup-field",children:[l.jsx("span",{className:"oauth-setup-label",children:g.label}),l.jsx("input",{type:g.kind==="secret"?"password":"text",className:"oauth-setup-input",placeholder:g.placeholder,value:a[g.key]??"",onChange:x=>u(A=>({...A,[g.key]:x.target.value})),autoComplete:"off",spellCheck:!1}),g.help_md&&l.jsx("span",{className:"oauth-setup-help",children:g.help_md})]},g.key))]}),i&&l.jsxs("div",{className:"configure-error",children:[l.jsx(Lt,{size:12})," ",i]}),l.jsxs("div",{className:"configure-actions",children:[e.configured?l.jsx("button",{className:"btn-secondary",disabled:n,onClick:()=>void f(),children:n?l.jsx(ht,{size:12,className:"spin"}):"Disconnect"}):p?l.jsx("button",{className:"btn-primary",disabled:n,onClick:()=>void h(),children:n?l.jsx(ht,{size:12,className:"spin"}):l.jsxs(l.Fragment,{children:[l.jsx(Qa,{size:12})," Save & Connect"]})}):e.configurable===!1?l.jsx("span",{className:"connector-setup-required",title:e.config_error??void 0,children:"Setup required"}):l.jsx("button",{className:"btn-primary",disabled:n,onClick:()=>void c(),children:n?l.jsx(ht,{size:12,className:"spin"}):l.jsxs(l.Fragment,{children:[l.jsx(Qa,{size:12})," Connect"]})}),(e.docs_url||e.product_url)&&l.jsxs("a",{href:e.docs_url||e.product_url||"#",target:"_blank",rel:"noopener noreferrer",className:"connector-product-link",children:["Learn more ",l.jsx(Qa,{size:11})]})]})]})}function sI({connector:e,onChanged:t}){const[n,r]=y.useState(()=>Object.fromEntries(e.mcp_env_keys.map(m=>[m,""]))),[i,s]=y.useState(!1),[a,u]=y.useState(!1),[o,c]=y.useState(null);y.useEffect(()=>{r(Object.fromEntries(e.mcp_env_keys.map(m=>[m,""])))},[e.mcp_env_keys.join(",")]);const f=async()=>{const m=Object.fromEntries(Object.entries(n).filter(([,p])=>p.trim()!==""));if(Object.keys(m).length!==0){s(!0),c(null),u(!1);try{await x1(e.id,m),u(!0),t(),setTimeout(()=>u(!1),2200)}catch(p){c(p instanceof Error?p.message:String(p))}finally{s(!1)}}},h=async()=>{s(!0),c(null);try{await b1(e.id),r(Object.fromEntries(e.mcp_env_keys.map(m=>[m,""]))),t()}catch(m){c(m instanceof Error?m.message:String(m))}finally{s(!1)}};return l.jsxs("div",{className:"configure-body",children:[e.description&&l.jsx("p",{className:"connector-desc",children:e.description}),o&&l.jsxs("div",{className:"configure-error",children:[l.jsx(Lt,{size:12})," ",o]}),e.mcp_env_keys.map(m=>l.jsxs("div",{className:"mcp-key-row",children:[l.jsx("label",{className:"mcp-key-label",children:m}),l.jsx("input",{type:"password",className:"mcp-key-input",placeholder:e.configured?"••••••••":"Enter value",value:n[m]??"",onChange:p=>r(g=>({...g,[m]:p.target.value})),spellCheck:!1,autoComplete:"off"})]},m)),l.jsxs("div",{className:"configure-actions",children:[l.jsx("button",{className:`btn-model-save${a?" saved":""}`,disabled:i||Object.values(n).every(m=>m.trim()===""),onClick:()=>void f(),children:i?l.jsx(ht,{size:12,className:"spin"}):a?l.jsxs(l.Fragment,{children:[l.jsx(zr,{size:12})," Saved"]}):"Save"}),e.configured&&l.jsx("button",{className:"btn-secondary",disabled:i,onClick:()=>void h(),children:"Disconnect"}),e.product_url&&l.jsxs("a",{href:e.product_url,target:"_blank",rel:"noopener noreferrer",className:"connector-product-link",children:["Docs ",l.jsx(Qa,{size:11})]})]})]})}function aI({agent:e,connectorId:t,grantedScopes:n,onChanged:r}){var p;const i=(p=e.required_connections)==null?void 0:p.find(g=>g.connector_id===t),s=e.namespaced_agent_id;if(!i||!s)return null;const[a,u]=y.useState(()=>new Set(n)),[o,c]=y.useState(null),[f,h]=y.useState(null);y.useEffect(()=>{u(new Set(n))},[n.join(",")]);const m=async g=>{if(o!==null)return;const x=new Set(a);x.has(g)?x.delete(g):x.add(g),u(x),c(g),h(null);try{x.size===0?await Dx(t,s):await Lx(t,s,[...x]),r()}catch(A){u(new Set(n)),h(A instanceof Error?A.message:String(A))}finally{c(null)}};return l.jsxs("div",{className:"grant-agent-card",children:[l.jsx("div",{className:"grant-agent-card-name",children:e.name}),l.jsx("div",{className:"grant-scope-list",children:i.scopes.map(g=>l.jsxs("label",{className:"grant-scope-item",children:[l.jsx("span",{className:"grant-scope-label",children:tI(g)}),l.jsxs("span",{className:"toggle-switch",children:[l.jsx("input",{type:"checkbox",checked:a.has(g),onChange:()=>void m(g),disabled:o!==null}),l.jsx("span",{className:"toggle-track"})]})]},g))}),f&&l.jsxs("div",{className:"grant-scope-warning grant-scope-warning--error",children:[l.jsx(Lt,{size:11})," ",f]})]})}function uI({connectorId:e}){const{agents:t}=xe(),[n,r]=y.useState({}),[i,s]=y.useState(!0),a=y.useCallback(async()=>{try{const{grants:o}=await Ix(e);r(o)}catch{r({})}finally{s(!1)}},[e]);if(y.useEffect(()=>{a()},[a]),i)return null;const u=t.filter(o=>{var c;return o.namespaced_agent_id&&((c=o.required_connections)==null?void 0:c.some(f=>f.connector_id===e))});return l.jsxs("div",{className:"connection-grants",children:[l.jsx("div",{className:"grants-header",children:"Per-agent grants"}),u.length===0?l.jsx("div",{className:"grants-empty",children:"No agents require access to this connector."}):u.map(o=>l.jsx(aI,{agent:o,connectorId:e,grantedScopes:n[o.namespaced_agent_id]??[],onChanged:()=>void a()},o.namespaced_agent_id))]})}function lI(){const{setShowSettings:e,sessions:t,removeSession:n,agents:r}=xe(),[i,s]=y.useState(null),[a,u]=y.useState(!0),[o,c]=y.useState([]),[f,h]=y.useState(""),[m,p]=y.useState(""),[g,x]=y.useState(!1),[A,E]=y.useState(!1),[T,k]=y.useState(null),[L,M]=y.useState(!1),S=y.useRef(null);y.useEffect(()=>{P.system.info("Checking system status...");const R=P.system.time();Nd().then(W=>{s(W),P.system.timed("System status received",R,{lemonade:W.lemonade_running?"running":"stopped",model:W.model_loaded||"none",embedding:W.embedding_model_loaded?"yes":"no",disk:`${W.disk_space_gb}GB free`,memory:W.memory_available_gb!=null?`${W.memory_available_gb}GB available`:"unknown"}),W.lemonade_running||P.system.warn("Lemonade Server is NOT running.")}).catch(W=>{P.system.error("Failed to get system status",W),s(null)}).finally(()=>u(!1)),Kx().then(W=>c(W.servers)).catch(()=>{}),kx().then(W=>{const U=W.custom_model??"";h(U),p(U)}).catch(W=>{P.system.error("Failed to load settings",W)}).finally(()=>x(!0))},[]),y.useEffect(()=>()=>{S.current&&clearTimeout(S.current)},[]);const O=y.useCallback(async()=>{const R=f.trim(),W=R.length>0?R:"";E(!0),k(null),M(!1);try{P.system.info("Saving custom_model override",{custom_model:W});const te=(await Sx({custom_model:W})).custom_model??"";h(te),p(te),M(!0),S.current&&clearTimeout(S.current),S.current=setTimeout(()=>M(!1),2200)}catch(U){const te=U instanceof Error?U.message:String(U);P.system.error("Failed to save custom_model",U),k(te)}finally{E(!1)}},[f]),D=f.trim()!==m.trim(),Y=(i==null?void 0:i.default_model_name)??Xd,{isLoadingModel:w,isDownloadingModel:z,loadModel:K,downloadModel:de}=xE(Y),le=[{label:"4K",value:4096},{label:"8K",value:8192},{label:"16K",value:16384},{label:"32K",value:32768}],oe=(i==null?void 0:i.model_context_size)??null,[ve,ne]=y.useState("");y.useEffect(()=>{oe!=null&&ne(String(oe))},[oe]);const I=(()=>{const R=parseInt(ve,10);return Number.isFinite(R)&&R>0?R:null})(),B=I!=null&&I!==oe,b=(i==null?void 0:i.model_loaded)??Y,ee=y.useCallback(async()=>{I&&(P.system.info(`Reloading ${b} with ctx_size=${I}`),await K(b,I))},[I,b,K]),[ce,N]=y.useState(!1),fe=y.useRef(null);y.useEffect(()=>()=>{fe.current&&clearTimeout(fe.current)},[]);const be=y.useCallback(async()=>{if(!ce){N(!0),fe.current&&clearTimeout(fe.current),fe.current=setTimeout(()=>N(!1),4e3);return}N(!1),fe.current&&clearTimeout(fe.current),P.system.warn(`Clearing ALL data: ${t.length} session(s)`);const R=P.system.time();let W=0;for(const U of t)try{await _1(U.id),n(U.id),W++}catch(te){P.system.error(`Failed to delete session ${U.id}`,te)}P.system.timed(`Cleared ${W}/${t.length} session(s)`,R),e(!1)},[ce,t,n,e]),ge="0.17.6",Oe=!!(i!=null&&i.lemonade_running&&i.model_loaded&&i.expected_model_loaded===!1),rt=!!(i!=null&&i.lemonade_running&&i.model_loaded&&i.context_size_sufficient===!1),gt=!!(i!=null&&i.lemonade_running&&!i.model_loaded&&i.model_downloaded===!1),se=Oe||rt;return l.jsxs("div",{className:"settings-page",children:[l.jsxs("div",{className:"settings-page-header",children:[l.jsx("button",{className:"btn-icon settings-back-btn",onClick:()=>e(!1),"aria-label":"Back",children:l.jsx(my,{size:18})}),l.jsx("h3",{children:"Settings"})]}),l.jsxs("div",{className:"settings-page-body",children:[l.jsxs("section",{className:"settings-section",children:[l.jsx("h4",{children:"System Status"}),a?l.jsx("p",{className:"loading-text",children:"Checking system..."}):i?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"status-grid",children:[l.jsx(hn,{label:"Lemonade Server",value:i.lemonade_running?`Running${i.lemonade_version?` v${i.lemonade_version}`:""}`:"Not Running",ok:i.lemonade_running,hint:i.lemonade_running?void 0:i.initialized?"Run: lemonade-server serve":"Run: gaia init --profile chat"}),l.jsx(hn,{label:"Model",value:i.model_loaded||"None loaded",ok:!!i.model_loaded&&i.expected_model_loaded!==!1,hint:i.model_loaded?i.expected_model_loaded===!1?`Expected: ${Y}`:void 0:"Run: gaia init --profile chat"}),i.model_size_gb!=null&&l.jsx(hn,{label:"Model Size",value:`${i.model_size_gb} GB`,ok:!0}),i.model_device&&l.jsx(hn,{label:"Device",value:i.model_device.toUpperCase(),ok:i.model_device!=="cpu"}),i.model_context_size!=null&&l.jsx(hn,{label:"Context Window",value:`${(i.model_context_size/1024).toFixed(0)}K tokens`,ok:i.context_size_sufficient}),i.model_labels&&i.model_labels.length>0&&l.jsx(hn,{label:"Capabilities",value:i.model_labels.join(", "),ok:!0}),l.jsx(hn,{label:"Embedding Model",value:i.embedding_model_loaded?"Available":"Not loaded",ok:i.embedding_model_loaded}),i.gpu_name&&l.jsx(hn,{label:"GPU",value:`${i.gpu_name}${i.gpu_vram_gb?` (${i.gpu_vram_gb} GB)`:""}`,ok:!0}),l.jsx(hn,{label:"Disk Space",value:`${i.disk_space_gb} GB free`,ok:i.disk_space_gb>5,hint:!i.model_loaded&&i.disk_space_gb<30?`Models require ~25 GB — only ${i.disk_space_gb} GB available`:void 0}),l.jsx(hn,{label:"Memory",value:i.memory_available_gb!=null?`${i.memory_available_gb} GB available`:"unknown",ok:i.memory_available_gb!=null&&i.memory_available_gb>2}),i.processor_name&&l.jsx(hn,{label:"Processor",value:i.processor_name,ok:i.device_supported!==!1})]}),gt&&l.jsxs("div",{className:"model-action-row model-action-row--download",children:[l.jsxs("div",{className:"model-action-info",children:[l.jsx("span",{className:"model-action-label",children:"Model not downloaded."}),l.jsxs("span",{className:"model-action-desc",children:[l.jsx("strong",{children:Y})," is required for GAIA Chat (~25 GB)."]})]}),l.jsx("button",{className:"btn-model-action btn-model-action--download",onClick:()=>de(!1),disabled:z,children:z?l.jsxs(l.Fragment,{children:[l.jsx(ht,{size:13,className:"btn-spinner"})," Downloading…"]}):"Download"})]}),se&&l.jsxs("div",{className:"model-action-row model-action-row--load",children:[l.jsxs("div",{className:"model-action-info",children:[l.jsx("span",{className:"model-action-label",children:Oe?"Wrong model loaded.":"Context window too small."}),l.jsxs("span",{className:"model-action-desc",children:["Load ",l.jsx("strong",{children:Y})," with ",(As/1024).toFixed(0),"K token context."]})]}),l.jsx("button",{className:"btn-model-action btn-model-action--load",onClick:()=>K(),disabled:w,children:w?l.jsxs(l.Fragment,{children:[l.jsx(ht,{size:13,className:"btn-spinner"})," Loading…"]}):"Load Model"})]}),i.lemonade_running&&l.jsxs("div",{className:"force-redownload-row",children:[l.jsx("span",{className:"force-redownload-label",children:"If the model file is corrupted:"}),l.jsx("button",{className:"btn-force-redownload",onClick:()=>de(!0),disabled:z,children:z?l.jsxs(l.Fragment,{children:[l.jsx(ht,{size:12,className:"btn-spinner"})," Downloading…"]}):"Force Re-download"})]})]}):l.jsxs("div",{className:"status-error",children:[l.jsx("p",{children:"Could not connect to server"}),l.jsx("code",{children:"gaia chat --ui"})]})]}),l.jsxs("section",{className:"settings-section",children:[l.jsx("h4",{children:"Active Model"}),l.jsx("p",{className:"model-override-desc",children:"Override the model used by the active agent. Leave empty to use the current agent’s preferred model."}),l.jsxs("div",{className:"model-input-row",children:[l.jsx("input",{type:"text",className:`model-input${m?" has-override":""}`,placeholder:"Use agent default",value:f,onChange:R=>{h(R.target.value),k(null),M(!1)},onKeyDown:R=>{R.key==="Enter"&&!A&&D&&g&&(R.preventDefault(),O())},disabled:!g||A,spellCheck:!1,autoCapitalize:"off",autoCorrect:"off","aria-label":"Custom model override"}),l.jsx("div",{className:"model-btn-group",children:l.jsx("button",{className:`btn-model-save${L?" saved":""}`,onClick:()=>{O()},disabled:!g||A||!D&&!L,"aria-label":"Save custom model",children:A?l.jsxs(l.Fragment,{children:[l.jsx(ht,{size:13,className:"btn-spinner"})," Saving…"]}):L?l.jsxs(l.Fragment,{children:[l.jsx(zr,{size:13})," Saved"]}):"Save"})})]}),l.jsxs("p",{className:"model-status-hint",children:["Accepts a Lemonade model ID (e.g. ",l.jsx("code",{children:"Qwen3-4B-Instruct-2507-GGUF"}),")"," ","or a HuggingFace ID (e.g. ",l.jsx("code",{children:"unsloth/Qwen3-4B-GGUF"}),")."]}),T&&l.jsxs("div",{className:"model-warning",role:"alert",children:[l.jsx(Lt,{size:14}),l.jsxs("div",{className:"model-warning-content",children:[l.jsx("strong",{children:"Could not save"}),l.jsx("p",{children:T})]})]})]}),l.jsxs("section",{className:"settings-section",children:[l.jsx("h4",{children:"Context Size"}),l.jsx("p",{className:"model-override-desc",children:"Reload the active model with a different context window. Larger contexts use more memory and slow inference; going past the model’s training length may degrade quality."}),l.jsx("div",{className:"ctx-preset-row",children:le.map(R=>{const W=I===R.value;return l.jsx("button",{className:`btn-ctx-preset${W?" active":""}`,onClick:()=>ne(String(R.value)),disabled:w,type:"button",children:R.label},R.value)})}),l.jsxs("div",{className:"model-input-row",children:[l.jsx("input",{type:"number",className:"model-input",placeholder:oe!=null?String(oe):"4096",value:ve,min:512,step:1024,onChange:R=>ne(R.target.value),disabled:w,"aria-label":"Context size in tokens"}),l.jsx("div",{className:"model-btn-group",children:l.jsx("button",{className:"btn-model-save",onClick:()=>{ee()},disabled:w||!B||!(i!=null&&i.lemonade_running),"aria-label":"Reload model with new context size",children:w?l.jsxs(l.Fragment,{children:[l.jsx(ht,{size:13,className:"btn-spinner"})," Reloading…"]}):"Apply"})})]}),l.jsxs("p",{className:"model-status-hint",children:["Current: ",l.jsx("code",{children:oe!=null?`${oe.toLocaleString()} tokens`:"unknown"}),(i==null?void 0:i.model_loaded)&&l.jsxs(l.Fragment,{children:[" on ",l.jsx("code",{children:i.model_loaded})]}),"."]})]}),i&&i.memory_available_gb!=null&&(()=>{const R=i.memory_available_gb,W=r.filter(U=>U.min_memory_gb!=null&&U.min_memory_gb>R);return W.length===0?null:l.jsxs("section",{className:"settings-section",children:[l.jsx("h4",{children:"Memory Warnings"}),l.jsx("div",{className:"status-grid",children:W.map(U=>l.jsxs("div",{className:"status-row status-row--has-hint",children:[l.jsx("span",{className:"status-label",children:U.name}),l.jsxs("div",{className:"status-value-wrap",children:[l.jsxs("span",{className:"status-value warn memory-warning-value",children:[l.jsx(Lt,{size:12}),"Needs ~",U.min_memory_gb," GB free"]}),l.jsxs("span",{className:"status-hint",children:["Only ",i.memory_available_gb," GB available — model load may fail or swap heavily."]})]})]},U.id))})]})})(),o.length>0&&l.jsxs("section",{className:"settings-section",children:[l.jsx("h4",{children:"MCP Servers"}),l.jsx("div",{className:"status-grid",children:o.map(R=>l.jsxs("div",{className:"status-row",children:[l.jsx("span",{className:"status-label",children:R.name}),l.jsx("div",{className:"status-value-wrap",children:R.connected?l.jsxs("span",{className:"status-value ok mcp-status-connected",children:[l.jsx(zr,{size:12}),R.tool_count," tool",R.tool_count!==1?"s":""]}):l.jsxs("span",{className:"status-value warn mcp-status-failed",title:R.error??void 0,children:[l.jsx(Lt,{size:12}),"Failed"]})})]},R.name))})]}),l.jsx(K6,{}),l.jsx(nI,{}),l.jsxs("section",{className:"settings-section",children:[l.jsx("h4",{children:"About"}),l.jsxs("div",{className:"about-info",children:[l.jsxs("p",{children:["GAIA v",ge," ",l.jsx("span",{className:"beta-badge",children:"BETA"})]}),l.jsx("p",{className:"about-sub",children:"Privacy-first AI chat for AMD Ryzen AI PCs."})]})]}),l.jsxs("section",{className:"settings-section",children:[l.jsx("h4",{children:"Privacy & Data"}),l.jsxs("div",{className:"setting-row",children:[l.jsx("span",{children:"Data location"}),l.jsx("code",{className:"setting-path",children:"~/.gaia/chat/"})]}),l.jsx("div",{className:"danger-divider"}),l.jsxs("div",{className:"setting-actions",children:[l.jsx("p",{className:"danger-warning",children:"This will permanently delete all sessions, messages, and documents."}),l.jsx("button",{className:"btn-danger",onClick:be,children:ce?"Click again to confirm":"Clear All Data"})]})]})]})]})}function hn({label:e,value:t,ok:n,hint:r}){return l.jsxs("div",{className:`status-row${r?" status-row--has-hint":""}`,children:[l.jsx("span",{className:"status-label",children:e}),l.jsxs("div",{className:"status-value-wrap",children:[l.jsx("span",{className:`status-value ${n?"ok":"warn"}`,children:t}),r&&l.jsx("span",{className:"status-hint",children:l.jsx("code",{children:r})})]})]})}const oI="modulepreload",cI=function(e,t){return new URL(e,t).href},Wm={},dI=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),o=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=Promise.allSettled(n.map(c=>{if(c=cI(c,r),c in Wm)return;Wm[c]=!0;const f=c.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(!!r)for(let g=a.length-1;g>=0;g--){const x=a[g];if(x.href===c&&(!f||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${h}`))return;const p=document.createElement("link");if(p.rel=f?"stylesheet":oI,f||(p.as="script"),p.crossOrigin="",p.href=c,o&&p.setAttribute("nonce",o),document.head.appendChild(p),f)return new Promise((g,x)=>{p.addEventListener("load",g),p.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return i.then(a=>{for(const u of a||[])u.status==="rejected"&&s(u.reason);return t().catch(s)})};let go=null;function fI({isOpen:e,onClose:t,onStop:n,error:r}){const[i,s]=y.useState(null),[a,u]=y.useState(!1),o=y.useRef(null),c=y.useCallback(async()=>{try{const p=await N1();return s(p),p}catch(p){return P.system.error("Failed to fetch tunnel status",p),null}},[]);y.useEffect(()=>{if(!e||r)return;c();const p=setInterval(async()=>{const g=await c();g!=null&&g.active&&(g!=null&&g.url)&&clearInterval(p)},2e3);return()=>clearInterval(p)},[e,r,c]),y.useEffect(()=>{if(!(i!=null&&i.active)||!i.url||!i.token||!o.current)return;const p=`${i.url}/?token=${i.token}`;P.system.info(`Generating QR code for: ${p}`),(async()=>{if(!go)try{const A=await dI(()=>import("./browser-CTB2jwNe.js").then(E=>E.b),[],import.meta.url);go=A.default||A}catch{P.system.error("QR code library not available - install with: npm install qrcode");return}const x=document.documentElement.getAttribute("data-theme")==="dark";try{await go.toCanvas(o.current,p,{width:200,margin:2,color:{dark:x?"#e6edf3":"#111827",light:x?"#0d0d0d":"#ffffff"}})}catch(A){P.system.error("QR code generation failed",A)}})()},[i==null?void 0:i.active,i==null?void 0:i.url,i==null?void 0:i.token]);const f=y.useRef(null),h=y.useCallback(()=>{if(!(i!=null&&i.url)||!(i!=null&&i.token))return;const p=`${i.url}/?token=${i.token}`;navigator.clipboard.writeText(p).then(()=>{u(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>u(!1),2e3)})},[i]);if(y.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),!e)return null;const m=i!=null&&i.active&&(i!=null&&i.url)&&(i!=null&&i.token)?`${i.url}/?token=${i.token}`:"";return l.jsx("div",{className:"modal-overlay",onClick:t,role:"dialog","aria-modal":"true","aria-label":"Mobile Access",children:l.jsxs("div",{className:"modal-panel mobile-modal",onClick:p=>p.stopPropagation(),children:[l.jsxs("div",{className:"modal-header",children:[l.jsxs("h3",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(d1,{size:18}),"Mobile Access"]}),l.jsx("button",{className:"btn-icon",onClick:t,"aria-label":"Close",children:l.jsx(kt,{size:18})})]}),l.jsxs("div",{className:"modal-body mobile-modal-body",children:[l.jsxs("div",{className:"tunnel-status",children:[l.jsx("span",{className:`status-dot ${i!=null&&i.active?"active":r?"error":"starting"}`}),l.jsx("span",{children:i!=null&&i.active?"Tunnel active":r?"Connection failed":"Starting tunnel..."}),!(i!=null&&i.active)&&!r&&l.jsx("span",{className:"tunnel-spinner"})]}),r&&l.jsx("div",{className:"tunnel-error",children:r}),l.jsx("div",{className:"qr-code-area",children:i!=null&&i.active?l.jsx("canvas",{ref:o}):r?l.jsx("div",{className:"qr-placeholder error",children:"Failed to connect"}):l.jsxs("div",{className:"qr-placeholder",children:[l.jsx("div",{className:"placeholder-spinner"}),l.jsx("span",{children:"Connecting..."})]})}),(i==null?void 0:i.active)&&m&&l.jsxs("div",{className:"tunnel-url-area",children:[l.jsx("label",{children:"Mobile URL"}),l.jsxs("div",{className:"tunnel-url-row",children:[l.jsx("input",{type:"text",readOnly:!0,value:m}),l.jsxs("button",{className:`copy-url-btn ${a?"copied":""}`,onClick:h,title:"Copy URL",children:[a?l.jsx(ra,{size:13}):l.jsx(nl,{size:13}),a?"Copied":"Copy"]})]})]}),(i==null?void 0:i.active)&&(i==null?void 0:i.publicIp)&&(i==null?void 0:i.url)&&!i.url.includes("ngrok-free.app")&&l.jsxs("div",{className:"tunnel-password-hint",children:[l.jsx("label",{children:"Tunnel Password"}),l.jsx("div",{className:"tunnel-password-value",children:i.publicIp}),l.jsx("span",{className:"tunnel-password-note",children:"Enter this when the tunnel page asks for a password"})]}),l.jsx("div",{className:"mobile-instructions",children:l.jsxs("ol",{children:[l.jsx("li",{children:"Scan the QR code with your phone's camera"}),(i==null?void 0:i.url)&&!i.url.includes("ngrok-free.app")&&l.jsx("li",{children:"Enter the tunnel password shown above when prompted"}),l.jsx("li",{children:"Chat with GAIA from your mobile device"}),l.jsx("li",{children:"Your data stays secure via encrypted tunnel"})]})}),l.jsxs("div",{className:"mobile-access-actions",children:[(i==null?void 0:i.active)&&n&&l.jsx("button",{className:"btn-danger",onClick:n,title:"Close the tunnel and revoke the mobile URL",children:"Stop Tunnel"}),l.jsx("button",{className:"btn-secondary",onClick:t,children:"Close"})]})]})]})})}function hI({onRetry:e}){var k;const{backendConnected:t,systemStatus:n,currentSessionId:r,messages:i}=xe(),[s,a]=y.useState(!1),u=!!r&&i.length>0,o=(n==null?void 0:n.default_model_name)??Xd,{isLoadingModel:c,isDownloadingModel:f,loadModel:h,downloadModel:m}=xE(o),p=y.useRef(n==null?void 0:n.lemonade_running),g=y.useRef(n==null?void 0:n.model_downloaded),x=y.useRef(n==null?void 0:n.context_size_sufficient),A=y.useRef(n==null?void 0:n.expected_model_loaded);y.useEffect(()=>{if(u)return;const L=n==null?void 0:n.lemonade_running,M=n==null?void 0:n.model_downloaded,S=n==null?void 0:n.context_size_sufficient,O=n==null?void 0:n.expected_model_loaded;let D=!1;p.current!==L&&(p.current=L,L===!1&&(D=!0)),g.current!==M&&(g.current=M,M===!1&&(D=!0)),x.current!==S&&(x.current=S,S===!1&&(D=!0)),A.current!==O&&(A.current=O,O===!1&&(D=!0)),D&&a(!1)},[n,u]);const E=(n==null?void 0:n.download_progress)??null;if(f||(E==null?void 0:E.state)==="downloading"||(E==null?void 0:E.state)==="starting"||(E==null?void 0:E.state)==="error"){const L=n!=null&&n.default_model_size_gb?`~${n.default_model_size_gb.toFixed(1)} GB`:"large download",M=(E==null?void 0:E.state)==="error";return l.jsxs("div",{className:`connection-banner ${M?"connection-banner--error":"connection-banner--warning"}`,role:M?"alert":"status",children:[l.jsx("div",{className:"connection-banner__icon",children:M?l.jsx(Tr,{size:16}):l.jsx($r,{size:16})}),l.jsx("div",{className:"connection-banner__text",children:M?l.jsxs(l.Fragment,{children:["Download of ",l.jsx("strong",{children:o})," failed."," ",(E==null?void 0:E.message)&&l.jsx("span",{className:"connection-banner__hint",children:E.message})]}):l.jsxs(l.Fragment,{children:["Downloading ",l.jsx("strong",{children:o})," (",L,").",(E==null?void 0:E.state)==="downloading"&&E.file&&l.jsxs(l.Fragment,{children:[" ",l.jsxs("span",{className:"connection-banner__hint",children:["File ",E.file_index," / ",E.total_files,": ",l.jsx("code",{children:E.file})]})]})]})}),M?l.jsx("button",{className:"connection-banner__retry",onClick:()=>m(!1),children:"Retry"}):l.jsx("span",{className:"connection-banner__loading connection-banner__progress",children:E&&E.state==="downloading"&&E.total_bytes>0?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"connection-banner__progress-bar",role:"progressbar","aria-valuenow":E.percent,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Download progress",children:l.jsx("span",{className:"connection-banner__progress-fill",style:{width:`${E.percent}%`}})}),l.jsxs("span",{className:"connection-banner__progress-label",children:[E.percent,"% ·"," ",(E.downloaded_bytes/1e9).toFixed(2)," /"," ",(E.total_bytes/1e9).toFixed(2)," GB"]})]}):l.jsxs(l.Fragment,{children:[l.jsx(ht,{size:13,className:"connection-banner__spinner"}),(E==null?void 0:E.state)==="starting"?"Starting download…":"Downloading…"]})}),M&&l.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:l.jsx(kt,{size:14})})]})}if((n==null?void 0:n.init_state)==="initializing"){const L=(k=n.init_tasks)==null?void 0:k.find(S=>S.status==="running"),M=(L==null?void 0:L.name)||"Preparing AI system";return l.jsxs("div",{className:"connection-banner connection-banner--init",role:"status",children:[l.jsx("div",{className:"connection-banner__icon",children:l.jsx(ht,{size:16,className:"connection-banner__spinner"})}),l.jsxs("div",{className:"connection-banner__text",children:[M,l.jsxs("span",{className:"thinking-dots",children:[l.jsx("span",{children:"."}),l.jsx("span",{children:"."}),l.jsx("span",{children:"."})]})]})]})}if(s||u)return null;if(!t)return l.jsxs("div",{className:"connection-banner connection-banner--error",role:"alert",children:[l.jsx("div",{className:"connection-banner__icon",children:l.jsx(Yy,{size:16})}),l.jsxs("div",{className:"connection-banner__text",children:["Cannot connect to GAIA server."," ",l.jsxs("span",{className:"connection-banner__hint",children:["Start it with: ",l.jsx("code",{children:"gaia chat --ui"})]})]}),e&&l.jsx("button",{className:"connection-banner__retry",onClick:e,children:"Retry"})]});if(n&&!n.lemonade_running)return l.jsxs("div",{className:"connection-banner connection-banner--warning",role:"status",children:[l.jsx("div",{className:"connection-banner__icon",children:l.jsx(Tr,{size:16})}),l.jsxs("div",{className:"connection-banner__text",children:["LLM server is not responding — it may be busy or not running."," ",l.jsxs("span",{className:"connection-banner__hint",children:["If not started, run: ",l.jsx("code",{children:"lemonade-server serve"})]})]}),e&&l.jsx("button",{className:"connection-banner__retry",onClick:e,children:"Check again"}),l.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:l.jsx(kt,{size:14})})]});if(n&&n.lemonade_running&&!n.model_loaded&&n.model_downloaded===!1){const L=n.default_model_size_gb?`~${n.default_model_size_gb.toFixed(1)} GB`:"large download";return l.jsxs("div",{className:"connection-banner connection-banner--warning",role:"status",children:[l.jsx("div",{className:"connection-banner__icon",children:l.jsx($r,{size:16})}),l.jsxs("div",{className:"connection-banner__text",children:["Required model ",l.jsx("strong",{children:o})," is not downloaded (",L,")."]}),l.jsx("button",{className:"connection-banner__retry",onClick:()=>m(!1),children:"Download"}),e&&l.jsx("button",{className:"connection-banner__retry connection-banner__retry--secondary",onClick:e,children:"Recheck"}),l.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:l.jsx(kt,{size:14})})]})}if(n&&n.lemonade_running&&n.model_loaded&&n.expected_model_loaded===!1&&!n.embedding_model_loaded){const L=n.model_loaded,M=n.context_size_sufficient===!1;return l.jsxs("div",{className:"connection-banner connection-banner--warning",role:"status",children:[l.jsx("div",{className:"connection-banner__icon",children:l.jsx(by,{size:16})}),l.jsxs("div",{className:"connection-banner__text",children:["Wrong model loaded: ",l.jsx("strong",{children:L}),"."," ","GAIA Chat requires ",l.jsx("strong",{children:o}),".",M&&l.jsxs(l.Fragment,{children:[" ","Context window is also too small."]})]}),c?l.jsxs("span",{className:"connection-banner__loading",children:[l.jsx(ht,{size:13,className:"connection-banner__spinner"}),"Loading…"]}):l.jsx("button",{className:"connection-banner__retry",onClick:()=>h(),children:"Load Now"}),e&&!c&&l.jsx("button",{className:"connection-banner__retry connection-banner__retry--secondary",onClick:e,children:"Recheck"}),l.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:l.jsx(kt,{size:14})})]})}if(n&&n.lemonade_running&&n.model_loaded&&n.context_size_sufficient===!1){const L=n.model_context_size??0,M=n.lemonade_url??"http://localhost:13305";return l.jsxs("div",{className:"connection-banner connection-banner--warning",role:"status",children:[l.jsx("div",{className:"connection-banner__icon",children:l.jsx(Ny,{size:16})}),l.jsxs("div",{className:"connection-banner__text",children:["LLM context window is too small (",L.toLocaleString()," tokens;"," ",As.toLocaleString()," required)."," ",l.jsxs("span",{className:"connection-banner__hint",children:["In"," ",l.jsx("a",{className:"connection-banner__link",href:M,target:"_blank",rel:"noreferrer",children:"Lemonade"}),", set ctx‑size to ",As.toLocaleString(),", or restart with:"," ",l.jsxs("code",{children:["lemonade-server serve --ctx-size ",As]})]})]}),e&&l.jsx("button",{className:"connection-banner__retry",onClick:e,children:"Check again"}),l.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:l.jsx(kt,{size:14})})]})}return null}const mI={status:"idle",version:null,progress:0,releaseNotes:null,error:null};function pI(){const[e,t]=y.useState(mI);return y.useEffect(()=>{const n=window.gaiaUpdater;if(!n)return;let r=!0;n.getStatus().then(s=>{r&&s&&t(s)}).catch(()=>{});const i=n.onStatusChange(s=>{r&&s&&t(s)});return()=>{r=!1;try{i()}catch{}}},[]),e}function gI(){const e=pI(),[t,n]=y.useState(!1),r=y.useCallback(()=>{const i=window.gaiaUpdater;i==null||i.check().catch(()=>{})},[]);if(t||e.status==="idle"||e.status==="checking"||e.status==="disabled")return null;if(e.status==="downloading"){const i=Math.max(0,Math.min(100,e.progress));return l.jsxs("div",{className:"update-chip update-chip--downloading",role:"status","aria-live":"polite",title:`Downloading update${e.version?` ${e.version}`:""}…`,children:[l.jsx($r,{size:13,className:"update-chip__icon"}),l.jsxs("span",{className:"update-chip__label",children:["Downloading update… ",i,"%"]})]})}return e.status==="available"?l.jsxs("div",{className:"update-chip update-chip--available",role:"status",title:e.releaseNotes||"A new version is available.",children:[l.jsx($r,{size:13,className:"update-chip__icon"}),l.jsxs("span",{className:"update-chip__label",children:["Update available",e.version?`: ${e.version}`:""]}),l.jsx("button",{type:"button",className:"update-chip__dismiss",onClick:()=>n(!0),"aria-label":"Dismiss update notification",children:l.jsx(kt,{size:11})})]}):e.status==="downloaded"?l.jsxs("div",{className:"update-chip update-chip--ready",role:"status","aria-live":"polite",children:[l.jsx(c1,{size:13,className:"update-chip__icon"}),l.jsx("button",{type:"button",className:"update-chip__action",onClick:r,title:"Click to restart and apply the update",children:"Update ready — restart to apply"})]}):e.status==="error"?l.jsxs("div",{className:"update-chip update-chip--error",role:"status",title:e.error||"Update check failed.",children:[l.jsx(Tr,{size:13,className:"update-chip__icon"}),l.jsx("span",{className:"update-chip__label",children:"Update check failed"}),l.jsx("button",{type:"button",className:"update-chip__dismiss",onClick:()=>n(!0),"aria-label":"Dismiss update error",children:l.jsx(kt,{size:11})})]}):null}function EI(){const e=Mu(N6),t=Mu(n=>n.respondToPermission);return e?l.jsx("div",{className:"permission-overlay",role:"dialog","aria-modal":"true","aria-label":"Permission Request",children:l.jsx(TI,{notification:e,onRespond:t},e.id)}):null}function TI({notification:e,onRespond:t}){const n=e.timeoutSeconds!=null&&e.timeoutSeconds>0,[r,i]=y.useState(n?e.timeoutSeconds:null),s=y.useRef(null),[a,u]=y.useState(!1),[o,c]=y.useState(!1),f=y.useRef(!1),h=y.useRef(t);h.current=t,y.useEffect(()=>{if(n)return s.current=setInterval(()=>{i(A=>A===null||A<=1?(s.current&&clearInterval(s.current),0):A-1)},1e3),()=>{s.current&&clearInterval(s.current)}},[n]),y.useEffect(()=>{if(r===0){if(f.current)return;f.current=!0,u(!0),h.current(e.id,"deny",!1)}},[r,e.id]);const m=y.useCallback(async()=>{if(!f.current){f.current=!0,u(!0),s.current&&clearInterval(s.current);try{await t(e.id,"allow",o)}finally{f.current=!1,u(!1)}}},[e.id,t,o]),p=y.useCallback(async()=>{if(!f.current){f.current=!0,u(!0),s.current&&clearInterval(s.current);try{await t(e.id,"deny",!1)}finally{f.current=!1,u(!1)}}},[e.id,t]);y.useEffect(()=>{const A=E=>{E.key==="Enter"&&!E.shiftKey?(E.preventDefault(),m()):E.key==="Escape"&&(E.preventDefault(),p())};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[m,p]);const g=e.toolArgs,x=g&&Object.keys(g).length>0;return l.jsxs("div",{className:"permission-prompt",children:[l.jsxs("div",{className:"permission-header",children:[l.jsx("div",{className:"permission-header-icon",children:l.jsx(Uy,{size:24})}),l.jsxs("div",{className:"permission-header-text",children:[l.jsx("h2",{className:"permission-title",children:"Permission Request"}),l.jsx("span",{className:"permission-agent",children:e.agentName})]}),r!==null&&r>0&&l.jsxs("div",{className:"permission-countdown",title:"Auto-deny on timeout",children:[l.jsx(s1,{size:14}),l.jsxs("span",{children:[r,"s"]})]})]}),l.jsxs("div",{className:"permission-body",children:[l.jsx("p",{className:"permission-message",children:e.message}),e.tool&&l.jsxs("div",{className:"permission-tool-info",children:[l.jsxs("div",{className:"permission-tool-header",children:[l.jsx(Tr,{size:14}),l.jsx("span",{children:"Tool Invocation"})]}),l.jsx("div",{className:"permission-tool-name",children:l.jsx("code",{children:e.tool})}),x&&l.jsx("div",{className:"permission-tool-args",children:l.jsx("pre",{children:JSON.stringify(g,null,2)})})]}),e.priority==="critical"&&l.jsxs("div",{className:"permission-critical-banner",children:[l.jsx(Tr,{size:14}),l.jsx("span",{children:"This is a critical-tier operation"})]}),l.jsxs("label",{className:"permission-remember",children:[l.jsx("input",{type:"checkbox",checked:o,onChange:A=>c(A.target.checked),disabled:a}),l.jsx("span",{children:"Always allow this tool"})]})]}),l.jsxs("div",{className:"permission-actions",children:[l.jsxs("button",{className:"permission-btn permission-btn-deny",onClick:p,disabled:a,title:"Deny (Esc)",children:[l.jsx(kt,{size:16}),"Deny"]}),l.jsxs("button",{className:"permission-btn permission-btn-allow",onClick:m,disabled:a,title:"Allow (Enter)",children:[l.jsx(ra,{size:16}),"Allow"]})]}),l.jsxs("div",{className:"permission-hints",children:[l.jsxs("span",{children:[l.jsx("kbd",{children:"Enter"})," Allow"]}),l.jsxs("span",{children:[l.jsx("kbd",{children:"Esc"})," Deny"]})]})]})}function yI(e){return e.replace(/-/g,"").slice(0,7)}function xI(e,t){const n=t.replace(/^#/,"").toLowerCase();if(!n||n.length<4)return null;const r=e.find(i=>i.id.replace(/-/g,"").toLowerCase().startsWith(n));return r?r.id:null}function Eo({show:e,children:t,duration:n=250}){const[r,i]=y.useState(!1),[s,a]=y.useState("idle");return y.useEffect(()=>{if(e)i(!0),requestAnimationFrame(()=>a("entering"));else if(r){a("exiting");const u=setTimeout(()=>{i(!1),a("idle")},n);return()=>clearTimeout(u)}},[e,r,n]),r?l.jsx("div",{className:`animated-presence ${s}`,"data-duration":n,children:t}):null}function bI(){const{currentSessionId:e,setSessions:t,setCurrentSession:n,addSession:r,removeSession:i,updateSessionInList:s,setMessages:a,showDocLibrary:u,showFileBrowser:o,showSettings:c,sidebarOpen:f,toggleSidebar:h,setSidebarOpen:m,systemStatus:p,setSystemStatus:g,setBackendConnected:x,setAgents:A}=xe(),E=y.useRef(""),T=y.useCallback(async()=>{try{const te=(await vd()).agents||[],he=te.map(ye=>ye.id).sort().join(",");he!==E.current&&(E.current=he,A(te))}catch{}},[A]);y.useEffect(()=>{T();const U=setInterval(T,3e4);return()=>clearInterval(U)},[T]);const[k,L]=y.useState(!1),[M,S]=y.useState(!1),[O,D]=y.useState(!1),[Y,w]=y.useState(null),z=y.useRef(null),K=y.useRef(0),de=3,le=y.useCallback(async()=>{try{const U=await Nd();if(x(!0),U.lemonade_running)K.current=0,g(U);else if(K.current+=1,P.system.warn(`Lemonade health check failed (${K.current}/${de})`),K.current>=de)g(U);else{const te=xe.getState().systemStatus;te&&te.lemonade_running?g({...te,disk_space_gb:U.disk_space_gb,memory_available_gb:U.memory_available_gb}):g(U)}P.system.info("System status:",{lemonade:U.lemonade_running,model:U.model_loaded,failCount:K.current})}catch(U){P.system.warn("System status check failed",U),x(!1),g(null)}},[g,x]),oe=y.useRef(3e3);y.useEffect(()=>(le(),oe.current=3e3,z.current=setInterval(le,3e3),()=>{z.current&&clearInterval(z.current)}),[le]),y.useEffect(()=>{const U=p==null?void 0:p.init_state;if(!U||U==="initializing")return;const te=15e3;te!==oe.current&&(oe.current=te,z.current&&clearInterval(z.current),z.current=setInterval(le,te))},[p==null?void 0:p.init_state,le]);const ve=y.useRef(null),ne=y.useRef("");y.useEffect(()=>{_x("0.17.6"),P.system.info("App mounting, loading sessions...");const U=P.system.time(),te=ye=>ye.map($e=>`${$e.id}|${$e.updated_at}|${$e.title}`).join(`
|
|
453
|
+
`),he=(ye=!1)=>{Rx().then($e=>{const Et=$e.sessions||[];if(ye){t(Et),x(!0),ne.current=te(Et),P.system.timed(`Loaded ${Et.length} session(s)`,U);return}const Yt=xe.getState().sessions;if(Et.length===0&&Yt.length>0){P.system.warn(`Session poll returned 0 sessions but sidebar has ${Yt.length} — skipping update to prevent data loss`);return}const dn=te(Et);dn!==ne.current&&(P.system.info(`Session list changed (${Yt.length} → ${Et.length} sessions)`),t(Et),ne.current=dn)}).catch($e=>{ye&&(P.system.error("Failed to load sessions from backend",$e),P.system.warn("Is the Python backend running? Start it with: gaia chat --ui"))})};return he(!0),ve.current=setInterval(()=>he(!1),5e3),()=>{ve.current&&clearInterval(ve.current)}},[t,r,i,s,x]),y.useEffect(()=>{if(e)return;const te=new URLSearchParams(window.location.search).get("session"),he=window.location.hash.replace(/^#/,""),ye=te||he;if(!ye)return;P.nav.info(`URL session parameter: ${ye}`);const $e=setTimeout(()=>{const{sessions:Et}=xe.getState();let Yt=Et.some(dn=>dn.id===ye)?ye:xI(Et,ye);Yt?(n(Yt),a([])):P.nav.warn(`Session ${ye} not found in loaded sessions`)},500);return()=>clearTimeout($e)},[e,n,a]),y.useEffect(()=>{if(e){const U=yI(e);window.location.hash!==`#${U}`&&window.history.replaceState(null,"",`#${U}`)}else window.location.hash&&window.history.replaceState(null,"",window.location.pathname+window.location.search)},[e]),y.useEffect(()=>{N1().then(U=>{S(U.active===!0)}).catch(()=>{})},[]),y.useEffect(()=>{const U=()=>{window.innerWidth>768&&m(!0)};return window.addEventListener("resize",U),()=>window.removeEventListener("resize",U)},[m]);const[I,B]=y.useState(null),b=y.useCallback(async()=>{P.chat.info("Creating new task session..."),B(null);try{const{activeAgentId:U}=xe.getState(),te=await fc({title:"New Task",agent_type:U});P.chat.info(`Session created: id=${te.id}, title="${te.title}"`),r(te),n(te.id),a([]),window.innerWidth<=768&&m(!1)}catch(U){P.chat.error("Failed to create session",U),le(),B("Failed to create task. Is the server running?"),setTimeout(()=>B(null),6e3)}},[r,n,a,m,le]),ee=y.useCallback(async U=>{xe.getState().setActiveAgentId(U),await b()},[b]),{setPendingPrompt:ce}=xe(),N=y.useCallback(async U=>{P.chat.info(`New task with prompt: "${U.slice(0,60)}..."`),ce(U),await b()},[b,ce]),fe=y.useCallback(async()=>{P.chat.info("Creating builder agent session..."),B(null);try{ce("Hi, I'd like to create a new custom agent.");const U=await fc({title:"New Agent",agent_type:"builder"});P.chat.info(`Builder session created: id=${U.id}`),r(U),n(U.id),a([]),window.innerWidth<=768&&m(!1)}catch(U){ce(null),P.chat.error("Failed to create builder session",U),le(),B("Failed to create task. Is the server running?"),setTimeout(()=>B(null),6e3)}},[r,n,a,m,le,ce]),be=y.useCallback(async()=>{if(M){P.system.info("Reopening mobile access modal (tunnel already running)"),w(null),L(!0);return}P.system.info("Starting mobile access tunnel..."),L(!0),D(!0),w(null);try{const U=await Gx();U.error?(P.system.error("Tunnel failed to start:",U.error),S(!1),w(U.error)):(S(!0),P.system.info("Tunnel started successfully"))}catch(U){P.system.error("Tunnel start error:",U),S(!1),w(U instanceof Error?U.message:"Failed to connect")}finally{D(!1)}},[M]),ge=y.useCallback(async()=>{P.system.info("Stopping mobile access tunnel...");try{await Qx()}catch(U){P.system.warn("stopTunnel call failed (continuing)",U)}S(!1),w(null),L(!1)},[]);y.useEffect(()=>{const{sessions:U,setActiveAgentId:te}=xe.getState(),he=U.find(ye=>ye.id===e);he!=null&&he.agent_type&&te(he.agent_type)},[e]),y.useEffect(()=>{e?P.nav.info(`Viewing session: ${e}`):P.nav.info("Viewing welcome screen (no session selected)")},[e]),y.useEffect(()=>{u&&P.ui.info("Document Library opened")},[u]),y.useEffect(()=>{c&&P.ui.info("Settings page opened")},[c]);const[Oe,rt]=y.useState(typeof window<"u"&&window.innerWidth<=768);y.useEffect(()=>{const U=()=>rt(window.innerWidth<=768);return window.addEventListener("resize",U),()=>window.removeEventListener("resize",U)},[]);const[gt,se]=y.useState(!1),[R,W]=y.useState(null);return y.useEffect(()=>{if(e!==R){se(!0);const U=setTimeout(()=>{W(e),requestAnimationFrame(()=>{requestAnimationFrame(()=>{se(!1)})})},220);return()=>clearTimeout(U)}},[e,R]),l.jsxs("div",{className:"app",children:[l.jsx("button",{className:"sidebar-toggle",onClick:h,"aria-label":f?"Close sidebar":"Open sidebar",children:l.jsx(Iy,{size:18})}),l.jsx("div",{className:`sidebar-overlay ${f?"visible":""}`,onClick:()=>m(!1),"aria-hidden":"true"}),l.jsx(Xx,{onNewTask:b,tunnelActive:M,tunnelLoading:O,onMobileToggle:be}),l.jsx("div",{className:"main-content",children:c?l.jsx(lI,{}):l.jsxs(l.Fragment,{children:[l.jsx(hI,{onRetry:le}),l.jsx("div",{className:`view-container ${gt?"view-transitioning":""}`,children:R?l.jsx(D6,{sessionId:R,onCreateAgent:fe,onAgentChange:ee},R):l.jsx(M6,{onNewTask:b,onSendPrompt:N,onCreateAgent:fe})})]})}),l.jsx(Eo,{show:u,children:l.jsx(U6,{})}),l.jsx(Eo,{show:o,children:l.jsx(W6,{})}),!Oe&&l.jsx(Eo,{show:k,children:l.jsx(fI,{isOpen:k,onClose:()=>L(!1),onStop:ge,error:Y})}),l.jsx(EI,{}),l.jsx(gI,{}),I&&l.jsx("div",{className:"toast",role:"alert",children:I})]})}const _I=localStorage.getItem("gaia-chat-theme");_I!=="light"&&document.documentElement.setAttribute("data-theme","dark");To.createRoot(document.getElementById("root")).render(l.jsx(ws.StrictMode,{children:l.jsx(bI,{})}));
|